From 09976b09140c412f81a38cc00191f88bee4a9437 Mon Sep 17 00:00:00 2001 From: bj456736 <161294296+bj456736@users.noreply.github.com> Date: Mon, 17 Aug 2026 20:19:15 +0800 Subject: [PATCH] feat(cli): add --web-title and expose it via /meta (#2989) * feat(cli): add --web-title and expose it via /meta * refactor(kap-server): pass optional web_title directly in /meta Per the repo rule for optional object properties, pass undefined directly instead of a conditional spread; serialization omits the unset value. * fix(cli): sync web bundle with instance tab title support The committed dist-web bundle predates the document title feature, so a released `kimi web --web-title` served a client that never read web_title. Rebuilt from code-app (feat/web-document-title) via sync:web; the bundle now titles tabs from web_title or the active workspace directory. * ci: retrigger checks after flaky harness cleanup failure --------- Co-authored-by: wbxl2000 Co-authored-by: bj456736 --- .changeset/web-title-flag.md | 5 + ...-DAv0N-7R.js => CodeBlockNode-CZYIqTV_.js} | 4 +- .../assets/DesignSystemView-C2ybIYYn.js | 13 + .../assets/DesignSystemView-DT_ORWRp.css | 1 + .../assets/DesignSystemView-OnWAAu0u.js | 13 - .../assets/DesignSystemView-T_JuY7qG.css | 1 - ...ooltip-BCqOrYcp.js => Tooltip-CbHFsn-6.js} | 2 +- ...fb.js => abnfDiagram-VRR7QNED-COKyJfaN.js} | 2 +- .../{arc-VnV5ZHHs.js => arc-BNlcm8Io.js} | 2 +- ... architectureDiagram-ZJ3FMSHR-pdH2rk7i.js} | 2 +- ...i.js => blockDiagram-677ZJIJ3-Cp3c1EWu.js} | 2 +- ...QmKj.js => c4Diagram-LMCZKHZV-Dus3HzI2.js} | 2 +- .../dist-web/assets/channel-CCgkeAox.js | 1 - .../dist-web/assets/channel-DPT3_xql.js | 1 + ...BRQfHNsr.js => chunk-2Q5K7J3B-CqtdGPMZ.js} | 2 +- ...BjbI6vv4.js => chunk-32BRIVSS-Dx199TNh.js} | 2 +- ...BgO5oPj2.js => chunk-5VM5RSS4-D5nhu_pI.js} | 2 +- ...CnbEmu7W.js => chunk-EX3LRPZG-5GJmdVbS.js} | 2 +- ...CPYc1Q95.js => chunk-JWPE2WC7-BtckK32c.js} | 2 +- ...t9_0csvx.js => chunk-MOJQB5TN-B49sRSVS.js} | 2 +- ...ClGLd9-g.js => chunk-RYQCIY6F-DYUKYgim.js} | 2 +- ...DRWtsWPL.js => chunk-V7JOEXUC-Bj6HhMBf.js} | 2 +- ...CFZ-U2wY.js => chunk-VR4S4FIN-JAO0vJUe.js} | 2 +- ...AKdWVjUf.js => chunk-XXDRQBXY-BYo5O_6D.js} | 2 +- .../assets/classDiagram-OUVF2IWQ-BeJtrUxZ.js | 1 + .../assets/classDiagram-OUVF2IWQ-joxy0H72.js | 1 - .../classDiagram-v2-EOCWNBFH-BeJtrUxZ.js | 1 + .../classDiagram-v2-EOCWNBFH-joxy0H72.js | 1 - ...a.js => cose-bilkent-JH36ORCC-Bvd7lU_r.js} | 2 +- ...q_W2rg.js => cynefin-VYW2F7L2-Dac1VpFl.js} | 2 +- ...js => cynefinDiagram-TSTJHNR4-cH6p2fBn.js} | 2 +- ...D_g3ijKj.js => dagre-VKFMJZFB-BCr0U4UL.js} | 2 +- ...AKjn07.js => diagram-FQU43EPY-DPlhFZdP.js} | 2 +- ...EBRets.js => diagram-G47NLZAW-D-tFNEyZ.js} | 2 +- ...lkvbtN.js => diagram-NH7WQ7WH-CZRzvszj.js} | 2 +- ...S8iR3C.js => diagram-OA4YK3LP-B2qPmny7.js} | 2 +- ...l5s4A_.js => diagram-WEI45ONY-BhWQTWhi.js} | 2 +- ...BL.js => ebnfDiagram-CCIWWBDH-C7ceb06g.js} | 2 +- ...dkRL.js => erDiagram-Q63AITRT-CnsIdx2o.js} | 2 +- ...A6.js => flowDiagram-23GEKE2U-CBIszsQp.js} | 2 +- ...m.js => ganttDiagram-NO4QXBWP-Bp3UvmyY.js} | 2 +- ...s => gitGraphDiagram-IHSO6WYX-BH8WCC4D.js} | 2 +- .../dist-web/assets/index-BkulrdXm.css | 1 - .../dist-web/assets/index-C_ObXpF5.css | 1 + .../dist-web/assets/index-CgXirkUy.js | 651 ----------------- .../{index-Bpfqls0z.js => index-Cj2NmNUG.js} | 4 +- .../{index-CbkQVtd0.js => index-DcbRorFd.js} | 2 +- .../dist-web/assets/index-_5lXYMaO.js | 652 ++++++++++++++++++ .../{index-D7acQhzk.js => index-wuJEF9t-.js} | 2 +- ...ndex10-1H9a2FKj.js => index10-C561zpWg.js} | 2 +- ...ndex11-DDroxORK.js => index11-Cx5Yh-Ch.js} | 2 +- ...{index5-Bc_8yuJc.js => index5-BHVixm2V.js} | 2 +- ...{index6-ByC5gnox.js => index6-DeApd9L_.js} | 2 +- ...{index7-1my_tbsi.js => index7-DyLV34jk.js} | 2 +- ...{index8-DPCQMDEU.js => index8-B1ktcQVe.js} | 2 +- ...pE.js => infoDiagram-FWYZ7A6U-CqPgDY2n.js} | 2 +- ...s => ishikawaDiagram-FXEZZL3T-BrPR76fO.js} | 2 +- ...js => journeyDiagram-5HDEW3XC-M5m-6IMM.js} | 2 +- ...=> kanban-definition-HUTT4EX6-RlJqNQKm.js} | 2 +- ...{linear-DLrQx2aB.js => linear-BWc4ICs9.js} | 2 +- ...e-DHQD1STq.js => mermaid.core-DpBz6UHc.js} | 8 +- ...> mindmap-definition-LN4V7U3C-G8LQJrFP.js} | 2 +- ...ypV.js => pegDiagram-2B236MQR-Bqe1YNn0.js} | 2 +- ...bIK.js => pieDiagram-ENE6RG2P-CJ6o_adA.js} | 2 +- ...s => quadrantDiagram-ABIIQ3AL-BBv6VFSq.js} | 2 +- ...s => railroadDiagram-RFXS5EU6-7QSjLg66.js} | 2 +- ...> requirementDiagram-TGXJPOKE-CGyvAsFO.js} | 2 +- ....js => sankeyDiagram-HTMAVEWB-CYJzk73F.js} | 2 +- ...s => sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js} | 2 +- ...us.js => sizeCapture-X5ZJPWSS-C2VEYVmu.js} | 2 +- ...o.js => stateDiagram-2N3HPSRC-DxGZaCFf.js} | 2 +- .../stateDiagram-v2-6OUMAXLB-BudL4GKN.js | 1 + .../stateDiagram-v2-6OUMAXLB-D-BVu44I.js | 1 - ...1F1o.js => swimlanes-5IMT3BWC-BaZl8tge.js} | 4 +- .../swimlanesDiagram-G3AALYLV-1XCKB3VS.js | 8 - .../swimlanesDiagram-G3AALYLV-WxMWFajS.js | 8 + ... timeline-definition-FHXFAJF6-zMligh5P.js} | 2 +- ...co.js => vennDiagram-L72KCM5P-KpUZjKlm.js} | 2 +- ...js => vue.runtime.esm-bundler-D5Z_EMXj.js} | 2 +- ...js => wardleyDiagram-EHGQE667-9gU-F74d.js} | 2 +- ...js => xychartDiagram-FW5EYKEG-BJN2UZpr.js} | 2 +- apps/kimi-code/dist-web/index.html | 4 +- apps/kimi-code/src/cli/sub/web/run.ts | 5 + apps/kimi-code/src/cli/sub/web/shared.ts | 5 + apps/kimi-code/test/cli/web/web.test.ts | 27 + packages/kap-server/src/protocol/rest-meta.ts | 7 + packages/kap-server/src/routes/meta.ts | 7 + .../src/routes/registerApiV1Routes.ts | 7 + packages/kap-server/src/start.ts | 8 + packages/kap-server/test/meta.test.ts | 46 ++ 90 files changed, 866 insertions(+), 748 deletions(-) create mode 100644 .changeset/web-title-flag.md rename apps/kimi-code/dist-web/assets/{CodeBlockNode-DAv0N-7R.js => CodeBlockNode-CZYIqTV_.js} (99%) create mode 100644 apps/kimi-code/dist-web/assets/DesignSystemView-C2ybIYYn.js create mode 100644 apps/kimi-code/dist-web/assets/DesignSystemView-DT_ORWRp.css delete mode 100644 apps/kimi-code/dist-web/assets/DesignSystemView-OnWAAu0u.js delete mode 100644 apps/kimi-code/dist-web/assets/DesignSystemView-T_JuY7qG.css rename apps/kimi-code/dist-web/assets/{Tooltip-BCqOrYcp.js => Tooltip-CbHFsn-6.js} (98%) rename apps/kimi-code/dist-web/assets/{abnfDiagram-VRR7QNED-C1nSQTfb.js => abnfDiagram-VRR7QNED-COKyJfaN.js} (86%) rename apps/kimi-code/dist-web/assets/{arc-VnV5ZHHs.js => arc-BNlcm8Io.js} (98%) rename apps/kimi-code/dist-web/assets/{architectureDiagram-ZJ3FMSHR-vHnTqMir.js => architectureDiagram-ZJ3FMSHR-pdH2rk7i.js} (99%) rename apps/kimi-code/dist-web/assets/{blockDiagram-677ZJIJ3-DbZfwKqi.js => blockDiagram-677ZJIJ3-Cp3c1EWu.js} (99%) rename apps/kimi-code/dist-web/assets/{c4Diagram-LMCZKHZV-D9CNQmKj.js => c4Diagram-LMCZKHZV-Dus3HzI2.js} (99%) delete mode 100644 apps/kimi-code/dist-web/assets/channel-CCgkeAox.js create mode 100644 apps/kimi-code/dist-web/assets/channel-DPT3_xql.js rename apps/kimi-code/dist-web/assets/{chunk-2Q5K7J3B-BRQfHNsr.js => chunk-2Q5K7J3B-CqtdGPMZ.js} (67%) rename apps/kimi-code/dist-web/assets/{chunk-32BRIVSS-BjbI6vv4.js => chunk-32BRIVSS-Dx199TNh.js} (96%) rename apps/kimi-code/dist-web/assets/{chunk-5VM5RSS4-BgO5oPj2.js => chunk-5VM5RSS4-D5nhu_pI.js} (83%) rename apps/kimi-code/dist-web/assets/{chunk-EX3LRPZG-CnbEmu7W.js => chunk-EX3LRPZG-5GJmdVbS.js} (99%) rename apps/kimi-code/dist-web/assets/{chunk-JWPE2WC7-CPYc1Q95.js => chunk-JWPE2WC7-BtckK32c.js} (71%) rename apps/kimi-code/dist-web/assets/{chunk-MOJQB5TN-t9_0csvx.js => chunk-MOJQB5TN-B49sRSVS.js} (99%) rename apps/kimi-code/dist-web/assets/{chunk-RYQCIY6F-ClGLd9-g.js => chunk-RYQCIY6F-DYUKYgim.js} (99%) rename apps/kimi-code/dist-web/assets/{chunk-V7JOEXUC-DRWtsWPL.js => chunk-V7JOEXUC-Bj6HhMBf.js} (99%) rename apps/kimi-code/dist-web/assets/{chunk-VR4S4FIN-CFZ-U2wY.js => chunk-VR4S4FIN-JAO0vJUe.js} (87%) rename apps/kimi-code/dist-web/assets/{chunk-XXDRQBXY-AKdWVjUf.js => chunk-XXDRQBXY-BYo5O_6D.js} (72%) create mode 100644 apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-BeJtrUxZ.js delete mode 100644 apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-joxy0H72.js create mode 100644 apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-BeJtrUxZ.js delete mode 100644 apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-joxy0H72.js rename apps/kimi-code/dist-web/assets/{cose-bilkent-JH36ORCC-CxHxs_ia.js => cose-bilkent-JH36ORCC-Bvd7lU_r.js} (99%) rename apps/kimi-code/dist-web/assets/{cynefin-VYW2F7L2-Cbq_W2rg.js => cynefin-VYW2F7L2-Dac1VpFl.js} (99%) rename apps/kimi-code/dist-web/assets/{cynefinDiagram-TSTJHNR4-DV_qWAFu.js => cynefinDiagram-TSTJHNR4-cH6p2fBn.js} (98%) rename apps/kimi-code/dist-web/assets/{dagre-VKFMJZFB-D_g3ijKj.js => dagre-VKFMJZFB-BCr0U4UL.js} (97%) rename apps/kimi-code/dist-web/assets/{diagram-FQU43EPY-BsAKjn07.js => diagram-FQU43EPY-DPlhFZdP.js} (98%) rename apps/kimi-code/dist-web/assets/{diagram-G47NLZAW-BuEBRets.js => diagram-G47NLZAW-D-tFNEyZ.js} (97%) rename apps/kimi-code/dist-web/assets/{diagram-NH7WQ7WH-DulkvbtN.js => diagram-NH7WQ7WH-CZRzvszj.js} (93%) rename apps/kimi-code/dist-web/assets/{diagram-OA4YK3LP-CkS8iR3C.js => diagram-OA4YK3LP-B2qPmny7.js} (96%) rename apps/kimi-code/dist-web/assets/{diagram-WEI45ONY-Dcl5s4A_.js => diagram-WEI45ONY-BhWQTWhi.js} (95%) rename apps/kimi-code/dist-web/assets/{ebnfDiagram-CCIWWBDH-D-Jk-ZBL.js => ebnfDiagram-CCIWWBDH-C7ceb06g.js} (87%) rename apps/kimi-code/dist-web/assets/{erDiagram-Q63AITRT-Ba0EdkRL.js => erDiagram-Q63AITRT-CnsIdx2o.js} (99%) rename apps/kimi-code/dist-web/assets/{flowDiagram-23GEKE2U-C0UVrrA6.js => flowDiagram-23GEKE2U-CBIszsQp.js} (99%) rename apps/kimi-code/dist-web/assets/{ganttDiagram-NO4QXBWP-JXL1f3pm.js => ganttDiagram-NO4QXBWP-Bp3UvmyY.js} (99%) rename apps/kimi-code/dist-web/assets/{gitGraphDiagram-IHSO6WYX-koxYdU4T.js => gitGraphDiagram-IHSO6WYX-BH8WCC4D.js} (99%) delete mode 100644 apps/kimi-code/dist-web/assets/index-BkulrdXm.css create mode 100644 apps/kimi-code/dist-web/assets/index-C_ObXpF5.css delete mode 100644 apps/kimi-code/dist-web/assets/index-CgXirkUy.js rename apps/kimi-code/dist-web/assets/{index-Bpfqls0z.js => index-Cj2NmNUG.js} (99%) rename apps/kimi-code/dist-web/assets/{index-CbkQVtd0.js => index-DcbRorFd.js} (99%) create mode 100644 apps/kimi-code/dist-web/assets/index-_5lXYMaO.js rename apps/kimi-code/dist-web/assets/{index-D7acQhzk.js => index-wuJEF9t-.js} (99%) rename apps/kimi-code/dist-web/assets/{index10-1H9a2FKj.js => index10-C561zpWg.js} (99%) rename apps/kimi-code/dist-web/assets/{index11-DDroxORK.js => index11-Cx5Yh-Ch.js} (99%) rename apps/kimi-code/dist-web/assets/{index5-Bc_8yuJc.js => index5-BHVixm2V.js} (95%) rename apps/kimi-code/dist-web/assets/{index6-ByC5gnox.js => index6-DeApd9L_.js} (98%) rename apps/kimi-code/dist-web/assets/{index7-1my_tbsi.js => index7-DyLV34jk.js} (98%) rename apps/kimi-code/dist-web/assets/{index8-DPCQMDEU.js => index8-B1ktcQVe.js} (99%) rename apps/kimi-code/dist-web/assets/{infoDiagram-FWYZ7A6U-CLfieRpE.js => infoDiagram-FWYZ7A6U-CqPgDY2n.js} (69%) rename apps/kimi-code/dist-web/assets/{ishikawaDiagram-FXEZZL3T-BghMxuhr.js => ishikawaDiagram-FXEZZL3T-BrPR76fO.js} (99%) rename apps/kimi-code/dist-web/assets/{journeyDiagram-5HDEW3XC-CP_Jp2XI.js => journeyDiagram-5HDEW3XC-M5m-6IMM.js} (98%) rename apps/kimi-code/dist-web/assets/{kanban-definition-HUTT4EX6-B_pkJKY_.js => kanban-definition-HUTT4EX6-RlJqNQKm.js} (99%) rename apps/kimi-code/dist-web/assets/{linear-DLrQx2aB.js => linear-BWc4ICs9.js} (98%) rename apps/kimi-code/dist-web/assets/{mermaid.core-DHQD1STq.js => mermaid.core-DpBz6UHc.js} (99%) rename apps/kimi-code/dist-web/assets/{mindmap-definition-LN4V7U3C-CKYrzvBu.js => mindmap-definition-LN4V7U3C-G8LQJrFP.js} (98%) rename apps/kimi-code/dist-web/assets/{pegDiagram-2B236MQR-DasvmypV.js => pegDiagram-2B236MQR-Bqe1YNn0.js} (87%) rename apps/kimi-code/dist-web/assets/{pieDiagram-ENE6RG2P-BRTgRbIK.js => pieDiagram-ENE6RG2P-CJ6o_adA.js} (94%) rename apps/kimi-code/dist-web/assets/{quadrantDiagram-ABIIQ3AL-Cqd6UTPe.js => quadrantDiagram-ABIIQ3AL-BBv6VFSq.js} (99%) rename apps/kimi-code/dist-web/assets/{railroadDiagram-RFXS5EU6-nXFgW9ad.js => railroadDiagram-RFXS5EU6-7QSjLg66.js} (84%) rename apps/kimi-code/dist-web/assets/{requirementDiagram-TGXJPOKE-C7bAU0jd.js => requirementDiagram-TGXJPOKE-CGyvAsFO.js} (99%) rename apps/kimi-code/dist-web/assets/{sankeyDiagram-HTMAVEWB-DVlRtVRy.js => sankeyDiagram-HTMAVEWB-CYJzk73F.js} (99%) rename apps/kimi-code/dist-web/assets/{sequenceDiagram-DBY2YBRQ-AbAJXDB5.js => sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js} (99%) rename apps/kimi-code/dist-web/assets/{sizeCapture-X5ZJPWSS-B-P0cHus.js => sizeCapture-X5ZJPWSS-C2VEYVmu.js} (86%) rename apps/kimi-code/dist-web/assets/{stateDiagram-2N3HPSRC-DvqaD8Eo.js => stateDiagram-2N3HPSRC-DxGZaCFf.js} (96%) create mode 100644 apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-BudL4GKN.js delete mode 100644 apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-D-BVu44I.js rename apps/kimi-code/dist-web/assets/{swimlanes-5IMT3BWC-D0t01F1o.js => swimlanes-5IMT3BWC-BaZl8tge.js} (99%) delete mode 100644 apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-1XCKB3VS.js create mode 100644 apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-WxMWFajS.js rename apps/kimi-code/dist-web/assets/{timeline-definition-FHXFAJF6-doJ2oiYT.js => timeline-definition-FHXFAJF6-zMligh5P.js} (99%) rename apps/kimi-code/dist-web/assets/{vennDiagram-L72KCM5P-De4w5Aco.js => vennDiagram-L72KCM5P-KpUZjKlm.js} (99%) rename apps/kimi-code/dist-web/assets/{vue.runtime.esm-bundler-B6hrKKNQ.js => vue.runtime.esm-bundler-D5Z_EMXj.js} (98%) rename apps/kimi-code/dist-web/assets/{wardleyDiagram-EHGQE667-CiqgclaU.js => wardleyDiagram-EHGQE667-9gU-F74d.js} (99%) rename apps/kimi-code/dist-web/assets/{xychartDiagram-FW5EYKEG-DvB4kNEE.js => xychartDiagram-FW5EYKEG-BJN2UZpr.js} (99%) diff --git a/.changeset/web-title-flag.md b/.changeset/web-title-flag.md new file mode 100644 index 000000000..1b65910c7 --- /dev/null +++ b/.changeset/web-title-flag.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Add `kimi web --web-title ` to set a custom browser tab title for the web UI instance, so multiple instances on different machines are easy to tell apart; without the flag the tab title shows the active workspace's directory name. diff --git a/apps/kimi-code/dist-web/assets/CodeBlockNode-DAv0N-7R.js b/apps/kimi-code/dist-web/assets/CodeBlockNode-CZYIqTV_.js similarity index 99% rename from apps/kimi-code/dist-web/assets/CodeBlockNode-DAv0N-7R.js rename to apps/kimi-code/dist-web/assets/CodeBlockNode-CZYIqTV_.js index 71310c09d..fe2b6d5e2 100644 --- a/apps/kimi-code/dist-web/assets/CodeBlockNode-DAv0N-7R.js +++ b/apps/kimi-code/dist-web/assets/CodeBlockNode-CZYIqTV_.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bpfqls0z.js","assets/index-CgXirkUy.js","assets/index-BkulrdXm.css"])))=>i.map(i=>d[i]); -import{bR as xi,cb as Si,bQ as Ho,M as pl,bl as Ci,af as fl,bY as Mi,cc as Bi,b$ as hl,aU as $,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Mo,aD as No,bE as ue,az as Li,cd as wn,c8 as mt,aI as To,aL as Y,s as Sn,aw as Vt,au as pt,bk as J,ce as Bo,u as ie,I as Ro,A as Oi,bJ as Gt,aY as ht,bL as vl,v as w,t as we,bB as ml,bb as Be,q as b,b7 as $i,cf as zi,cg as bn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as A,cl as Eo,cm as Di,cn as Ai,co as Wt,cp as Fo,bO as Do,T as ji,G as qi,F as Po,g as Wi,c7 as _i,b_ as Ii}from"./index-CgXirkUy.js";import{i as fe,t as kn}from"./safeRaf-DGuzXxDK.js";var xn=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,M)).next())});let Lo=!1,_t=null,It=null,Ut=null;function Ui(){return xn(this,null,function*(){if(Ut)return Ut;Ut=xn(null,null,function*(){if(!It)try{if(It=(function(k){const M=k;if(typeof M?.useMonaco=="function")return M;const y=k?.default;return typeof y?.useMonaco=="function"?y:null})(yield xi(()=>import("./index-Bpfqls0z.js"),__vite__mapDeps([0,1,2]))),!It)return null}catch{return null}try{return yield(function(k){return xn(this,null,function*(){return Lo?void 0:_t||(_t=xn(null,null,function*(){const y=globalThis?.MonacoEnvironment;y&&(typeof y.getWorker=="function"||typeof y.getWorkerUrl=="function")||typeof k?.preloadMonacoWorkers!="function"||(yield k.preloadMonacoWorkers()),Lo=!0}).finally(()=>{_t=null}),_t)})})(It),Si(),It}catch{return null}});try{return yield Ut}finally{Ut=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Oo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,$o=(k,M,y)=>M in k?Vi(k,M,{enumerable:!0,configurable:!0,writable:!0,value:y}):k[M]=y,U=(k,M)=>{for(var y in M||(M={}))Yi.call(M,y)&&$o(k,y,M[y]);if(Oo)for(var y of Oo(M))Qi.call(M,y)&&$o(k,y,M[y]);return k},Me=(k,M)=>Gi(k,Ji(M)),j=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,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=pl({__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(k,{emit:M}){const y=k,te=M,ne=$(!1),be=$(null),ke=$(null);function r(){mt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",H,{once:!0,capture:!0})}function P(){mt(!0),ne.value=!1}function H(Q){var v,z;const wt=Q.target;(v=be.value)!=null&&v.contains(wt)||(z=ke.value)!=null&&z.contains(wt)?document.addEventListener("click",H,{once:!0,capture:!0}):P()}const re=b(()=>y.showFontSizeButtons&&y.enableFontSizeControl||y.showExpandButton||y.isPreviewable&&y.showPreviewButton),{t:T}=hl(),gt=b(()=>y.showTooltips!==!1);function Ge(Q,v){gt.value&&_i(Q.currentTarget,v,"top",!1,void 0,y.isDark)}function Ee(){gt.value&&mt()}function yt(Q){Ge(Q,y.copyText?T("common.copied")||"Copied":T("common.copy")||"Copy")}const gl=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)<=((v=y.codeFontMin)!=null?v:0)}),Jt=b(()=>!y.fontBaselineReady||y.codeFontSize===y.defaultCodeFontSize),Yt=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)>=((v=y.codeFontMax)!=null?v:100)});return(Q,v)=>(Y(),ie(Po,null,[y.showHeader?(Y(),ie("div",Xi,[ht(Q.$slots,"header-left"),ht(Q.$slots,"header-right",{},()=>[w("div",Ki,[k.diffStats?(Y(),ie("div",{key:0,class:"code-diff-stats","aria-label":k.diffStatsAriaLabel},[w("span",er,"-"+Be(k.diffStats.removed),1),w("span",tr,"+"+Be(k.diffStats.added),1)],8,Zi)):we("",!0),y.showCopyButton?(Y(),ie("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":k.copyText?J(T)("common.copied")||"Copied":J(T)("common.copy")||"Copy",onClick:v[0]||(v[0]=z=>te("copy")),onMouseenter:v[1]||(v[1]=z=>yt(z)),onFocus:v[2]||(v[2]=z=>yt(z)),onMouseleave:Ee,onBlur:Ee},[k.copyText?(Y(),ie("svg",or,[...v[14]||(v[14]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(Y(),ie("svg",lr,[...v[13]||(v[13]=[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),w("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)):we("",!0),y.showCollapseButton?(Y(),ie("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":k.isCollapsed,onClick:v[3]||(v[3]=z=>te("toggleCollapse")),onMouseenter:v[4]||(v[4]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onFocus:v[5]||(v[5]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onMouseleave:Ee,onBlur:Ee},[(Y(),ie("svg",{style:Vt({rotate:k.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"},[...v[15]||(v[15]=[w("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)):we("",!0),re.value?(Y(),ie("div",rr,[w("button",{ref_key:"moreBtnRef",ref:ke,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:Do(r,["stop"]),onMouseenter:v[6]||(v[6]=z=>Ge(z,J(T)("common.more")||"More")),onFocus:v[7]||(v[7]=z=>Ge(z,J(T)("common.more")||"More")),onMouseleave:Ee,onBlur:Ee},[...v[16]||(v[16]=[qi('<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><g fill="currentColor"><circle cx="12" cy="5" r="1.5"></circle><circle cx="12" cy="12" r="1.5"></circle><circle cx="12" cy="19" r="1.5"></circle></g></svg>',1)])],40,ar),Ro(Wi,{name:"code-menu"},{default:Gt(()=>[ne.value?(Y(),ie("div",{key:0,ref_key:"moreMenuRef",ref:be,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"},[y.showFontSizeButtons&&y.enableFontSizeControl?(Y(),ie(Po,{key:0},[w("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:gl.value,onClick:v[8]||(v[8]=z=>{J(mt)(!0),te("decreaseFont")})},[v[17]||(v[17]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),w("span",null,Be(J(T)("common.fontSmaller")||"Font size −"),1)],8,ur),w("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:Jt.value,onClick:v[9]||(v[9]=z=>{J(mt)(!0),te("resetFont")})},[v[18]||(v[18]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),w("path",{d:"M3 3v5h5"})])],-1)),w("span",null,Be(J(T)("common.fontReset")||"Font size reset"),1)],8,sr),w("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:Yt.value,onClick:v[10]||(v[10]=z=>{J(mt)(!0),te("increaseFont")})},[v[19]||(v[19]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),w("span",null,Be(J(T)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):we("",!0),y.showExpandButton?(Y(),ie("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:v[11]||(v[11]=z=>{P(),te("toggleExpand")})},[k.isExpanded?(Y(),ie("svg",cr,[...v[20]||(v[20]=[w("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)])])):(Y(),ie("svg",fr,[...v[21]||(v[21]=[w("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)])])),w("span",null,Be(k.isExpanded?J(T)("common.collapse")||"Collapse":J(T)("common.expand")||"Expand"),1)])):we("",!0),k.isPreviewable&&y.showPreviewButton?(Y(),ie("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:v[12]||(v[12]=z=>{P(),te("preview")})},[v[22]||(v[22]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("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"}),w("circle",{cx:"12",cy:"12",r:"3"})])],-1)),w("span",null,Be(J(T)("common.preview")||"Preview"),1)])):we("",!0)],512)):we("",!0)]),_:1})])):we("",!0)])])])):we("",!0),vl(w("div",{class:pt(["code-block-shell-content",{"code-block-shell-content--collapsed":k.isCollapsed}])},[ht(Q.$slots,"default")],2),[[ml,!!k.stream||!k.loading]]),vl(w("div",vr,[ht(Q.$slots,"loading",{},()=>[v[23]||(v[23]=w("div",{class:"loading-skeleton"},[w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line short"})],-1))])],512),[[ml,!k.stream&&k.loading]]),w("span",mr,Be(k.copyText?J(T)("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=Ho(pl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(k){const M=k,y=import.meta!==void 0&&!1;let te=null;const{t:ne}=hl(),be=b(()=>{const P=M.code||"",H=P.trim().toLowerCase();return H.startsWith("<!doctype")||H.startsWith("<html")||H.startsWith("<body")?P:`<!doctype html> +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Cj2NmNUG.js","assets/index-_5lXYMaO.js","assets/index-C_ObXpF5.css"])))=>i.map(i=>d[i]); +import{bR as xi,cb as Si,bQ as Ho,M as pl,bl as Ci,af as fl,bY as Mi,cc as Bi,b$ as hl,aU as $,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Mo,aD as No,bE as ue,az as Li,cd as wn,c8 as mt,aI as To,aL as Y,s as Sn,aw as Vt,au as pt,bk as J,ce as Bo,u as ie,I as Ro,A as Oi,bJ as Gt,aY as ht,bL as vl,v as w,t as we,bB as ml,bb as Be,q as b,b7 as $i,cf as zi,cg as bn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as A,cl as Eo,cm as Di,cn as Ai,co as Wt,cp as Fo,bO as Do,T as ji,G as qi,F as Po,g as Wi,c7 as _i,b_ as Ii}from"./index-_5lXYMaO.js";import{i as fe,t as kn}from"./safeRaf-DGuzXxDK.js";var xn=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,M)).next())});let Lo=!1,_t=null,It=null,Ut=null;function Ui(){return xn(this,null,function*(){if(Ut)return Ut;Ut=xn(null,null,function*(){if(!It)try{if(It=(function(k){const M=k;if(typeof M?.useMonaco=="function")return M;const y=k?.default;return typeof y?.useMonaco=="function"?y:null})(yield xi(()=>import("./index-Cj2NmNUG.js"),__vite__mapDeps([0,1,2]))),!It)return null}catch{return null}try{return yield(function(k){return xn(this,null,function*(){return Lo?void 0:_t||(_t=xn(null,null,function*(){const y=globalThis?.MonacoEnvironment;y&&(typeof y.getWorker=="function"||typeof y.getWorkerUrl=="function")||typeof k?.preloadMonacoWorkers!="function"||(yield k.preloadMonacoWorkers()),Lo=!0}).finally(()=>{_t=null}),_t)})})(It),Si(),It}catch{return null}});try{return yield Ut}finally{Ut=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Oo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,$o=(k,M,y)=>M in k?Vi(k,M,{enumerable:!0,configurable:!0,writable:!0,value:y}):k[M]=y,U=(k,M)=>{for(var y in M||(M={}))Yi.call(M,y)&&$o(k,y,M[y]);if(Oo)for(var y of Oo(M))Qi.call(M,y)&&$o(k,y,M[y]);return k},Me=(k,M)=>Gi(k,Ji(M)),j=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,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=pl({__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(k,{emit:M}){const y=k,te=M,ne=$(!1),be=$(null),ke=$(null);function r(){mt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",H,{once:!0,capture:!0})}function P(){mt(!0),ne.value=!1}function H(Q){var v,z;const wt=Q.target;(v=be.value)!=null&&v.contains(wt)||(z=ke.value)!=null&&z.contains(wt)?document.addEventListener("click",H,{once:!0,capture:!0}):P()}const re=b(()=>y.showFontSizeButtons&&y.enableFontSizeControl||y.showExpandButton||y.isPreviewable&&y.showPreviewButton),{t:T}=hl(),gt=b(()=>y.showTooltips!==!1);function Ge(Q,v){gt.value&&_i(Q.currentTarget,v,"top",!1,void 0,y.isDark)}function Ee(){gt.value&&mt()}function yt(Q){Ge(Q,y.copyText?T("common.copied")||"Copied":T("common.copy")||"Copy")}const gl=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)<=((v=y.codeFontMin)!=null?v:0)}),Jt=b(()=>!y.fontBaselineReady||y.codeFontSize===y.defaultCodeFontSize),Yt=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)>=((v=y.codeFontMax)!=null?v:100)});return(Q,v)=>(Y(),ie(Po,null,[y.showHeader?(Y(),ie("div",Xi,[ht(Q.$slots,"header-left"),ht(Q.$slots,"header-right",{},()=>[w("div",Ki,[k.diffStats?(Y(),ie("div",{key:0,class:"code-diff-stats","aria-label":k.diffStatsAriaLabel},[w("span",er,"-"+Be(k.diffStats.removed),1),w("span",tr,"+"+Be(k.diffStats.added),1)],8,Zi)):we("",!0),y.showCopyButton?(Y(),ie("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":k.copyText?J(T)("common.copied")||"Copied":J(T)("common.copy")||"Copy",onClick:v[0]||(v[0]=z=>te("copy")),onMouseenter:v[1]||(v[1]=z=>yt(z)),onFocus:v[2]||(v[2]=z=>yt(z)),onMouseleave:Ee,onBlur:Ee},[k.copyText?(Y(),ie("svg",or,[...v[14]||(v[14]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(Y(),ie("svg",lr,[...v[13]||(v[13]=[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),w("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)):we("",!0),y.showCollapseButton?(Y(),ie("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":k.isCollapsed,onClick:v[3]||(v[3]=z=>te("toggleCollapse")),onMouseenter:v[4]||(v[4]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onFocus:v[5]||(v[5]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onMouseleave:Ee,onBlur:Ee},[(Y(),ie("svg",{style:Vt({rotate:k.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"},[...v[15]||(v[15]=[w("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)):we("",!0),re.value?(Y(),ie("div",rr,[w("button",{ref_key:"moreBtnRef",ref:ke,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:Do(r,["stop"]),onMouseenter:v[6]||(v[6]=z=>Ge(z,J(T)("common.more")||"More")),onFocus:v[7]||(v[7]=z=>Ge(z,J(T)("common.more")||"More")),onMouseleave:Ee,onBlur:Ee},[...v[16]||(v[16]=[qi('<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><g fill="currentColor"><circle cx="12" cy="5" r="1.5"></circle><circle cx="12" cy="12" r="1.5"></circle><circle cx="12" cy="19" r="1.5"></circle></g></svg>',1)])],40,ar),Ro(Wi,{name:"code-menu"},{default:Gt(()=>[ne.value?(Y(),ie("div",{key:0,ref_key:"moreMenuRef",ref:be,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"},[y.showFontSizeButtons&&y.enableFontSizeControl?(Y(),ie(Po,{key:0},[w("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:gl.value,onClick:v[8]||(v[8]=z=>{J(mt)(!0),te("decreaseFont")})},[v[17]||(v[17]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),w("span",null,Be(J(T)("common.fontSmaller")||"Font size −"),1)],8,ur),w("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:Jt.value,onClick:v[9]||(v[9]=z=>{J(mt)(!0),te("resetFont")})},[v[18]||(v[18]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),w("path",{d:"M3 3v5h5"})])],-1)),w("span",null,Be(J(T)("common.fontReset")||"Font size reset"),1)],8,sr),w("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:Yt.value,onClick:v[10]||(v[10]=z=>{J(mt)(!0),te("increaseFont")})},[v[19]||(v[19]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),w("span",null,Be(J(T)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):we("",!0),y.showExpandButton?(Y(),ie("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:v[11]||(v[11]=z=>{P(),te("toggleExpand")})},[k.isExpanded?(Y(),ie("svg",cr,[...v[20]||(v[20]=[w("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)])])):(Y(),ie("svg",fr,[...v[21]||(v[21]=[w("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)])])),w("span",null,Be(k.isExpanded?J(T)("common.collapse")||"Collapse":J(T)("common.expand")||"Expand"),1)])):we("",!0),k.isPreviewable&&y.showPreviewButton?(Y(),ie("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:v[12]||(v[12]=z=>{P(),te("preview")})},[v[22]||(v[22]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("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"}),w("circle",{cx:"12",cy:"12",r:"3"})])],-1)),w("span",null,Be(J(T)("common.preview")||"Preview"),1)])):we("",!0)],512)):we("",!0)]),_:1})])):we("",!0)])])])):we("",!0),vl(w("div",{class:pt(["code-block-shell-content",{"code-block-shell-content--collapsed":k.isCollapsed}])},[ht(Q.$slots,"default")],2),[[ml,!!k.stream||!k.loading]]),vl(w("div",vr,[ht(Q.$slots,"loading",{},()=>[v[23]||(v[23]=w("div",{class:"loading-skeleton"},[w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line short"})],-1))])],512),[[ml,!k.stream&&k.loading]]),w("span",mr,Be(k.copyText?J(T)("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=Ho(pl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(k){const M=k,y=import.meta!==void 0&&!1;let te=null;const{t:ne}=hl(),be=b(()=>{const P=M.code||"",H=P.trim().toLowerCase();return H.startsWith("<!doctype")||H.startsWith("<html")||H.startsWith("<body")?P:`<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-C2ybIYYn.js b/apps/kimi-code/dist-web/assets/DesignSystemView-C2ybIYYn.js new file mode 100644 index 000000000..674645153 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/DesignSystemView-C2ybIYYn.js @@ -0,0 +1,13 @@ +import{M as T,aD as q,aI as B,aL as n,u as l,v as t,G as c,H as e,F as h,aX as y,bb as k,I as s,bk as d,cx as o,cy as A,cz as x,cA as M,cB as p,cC as I,cD as E}from"./index-_5lXYMaO.js";const V={class:"ds-page"},D={class:"layout"},H={class:"content"},L={class:"content-inner"},R={id:"tokens"},O={class:"icon-sizes"},W={class:"sz"},N={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},U={class:"sz"},P={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},F={class:"sz"},j={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},G={class:"icon-grid"},K={class:"icon-group-label"},J={class:"ic-name"},Q={id:"primitives"},Y={class:"stage-wrap"},Z={class:"stage p"},X={class:"p-pill",style:{color:"var(--p-warning)"}},$={class:"stage-wrap"},_={class:"stage p col"},aa={class:"demo-row"},ta={class:"p-btn primary disabled"},ea={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},sa={class:"stage-wrap"},da={class:"stage p col"},oa={class:"demo-row"},ca={class:"stage-wrap"},ia={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},na={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},la={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ra={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},va={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ba={id:"chat"},fa={class:"stage-wrap"},pa={class:"stage p col"},ha={style:{"max-width":"560px",width:"100%"}},ua={class:"stage-wrap"},ga={class:"stage p col",style:{"align-items":"center",background:"#fff"}},ma={class:"p-composer",style:{width:"100%","max-width":"620px"}},wa={class:"p-composer-bar"},ya={class:"p-composer-left"},ka={class:"p-pill",style:{color:"var(--p-warning)"}},xa={class:"stage-wrap"},Ca={class:"stage p",style:{background:"var(--p-bg)"}},Sa={class:"am-mock"},za={class:"am-mock-row focus"},Ta={class:"am-mock-row"},qa={class:"am-mock-row"},Ba={class:"am-mock-row"},Aa={class:"dt"},Ma={class:"dw-spin"},Ia={class:"stage-wrap"},Ea={class:"stage p",style:{background:"var(--p-bg)"}},Va={class:"dw-bar"},Da={class:"dw-pill"},Ha={class:"dw-pill"},La={class:"dw-pill on"},Ra={class:"dw-running"},Oa={class:"dw-pill"},Wa={class:"stage-wrap"},Na={class:"stage p col",style:{background:"var(--p-bg)",gap:"var(--space-4)"}},Ua={class:"dw-panel"},Pa={class:"dw-head"},Fa={class:"dw-tab"},ja={class:"dw-chips"},Ga={class:"dw-chip on"},Ka={class:"dw-chip"},Ja={class:"dw-chip"},Qa={class:"dw-chip"},Ya={class:"dw-body col"},Za={class:"dw-row"},Xa={class:"dw-row"},$a={class:"dw-row fail"},_a={class:"dw-row cancelled"},at={class:"dw-panel"},tt={class:"dw-head"},et={class:"dw-tab"},st={class:"dw-chips"},dt={class:"dw-chip on"},ot={class:"dw-chip"},ct={class:"dw-chip"},it={class:"dw-chip"},nt={class:"dw-body grid"},lt={class:"dw-card"},rt={class:"cf"},vt={class:"cm"},bt={class:"cs"},ft={class:"sl"},pt={class:"tm"},ht={class:"dw-card"},ut={class:"cf"},gt={class:"cm"},mt={class:"cs"},wt={class:"sl"},yt={class:"tm"},kt={class:"dw-card fail"},xt={class:"cf"},Ct={class:"cm"},St={class:"cs"},zt={class:"sl"},Tt={class:"tm"},qt={class:"dw-card"},Bt={class:"cf"},At={class:"cm"},Mt={class:"cs"},It={class:"sl"},Et={class:"tm"},Vt="/repo",Dt=T({__name:"DesignSystemView",emits:["close"],setup(Ht,{emit:C}){const S=[{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 z=C;function g(){z("close")}let f=null;function m(b){b.key==="Escape"&&g()}return q(()=>{document.addEventListener("keydown",m);const b=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;b.forEach(v=>{const i=v.getAttribute("href");if(!i)return;const w=document.getElementById(i.slice(1));w&&a.set(w,v)});let r=null;f=new IntersectionObserver(v=>{v.forEach(i=>{i.isIntersecting&&(r&&r.classList.remove("active"),r=a.get(i.target)??null,r&&r.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((v,i)=>f.observe(i)),b.length&&b[0].classList.add("active")}),B(()=>{document.removeEventListener("keydown",m),f&&(f.disconnect(),f=null)}),(b,a)=>(n(),l("div",V,[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",D,[a[146]||(a[146]=c('<aside class="sidebar" data-v-8cbfa422><div class="brand" data-v-8cbfa422><div class="brand-mark" data-v-8cbfa422>K</div><div class="brand-name" data-v-8cbfa422>Kimi Web</div></div><div class="brand-sub" data-v-8cbfa422>Design System · v1.0</div><div class="nav-group" data-v-8cbfa422>Navigate</div><nav class="nav" id="nav" data-v-8cbfa422><a href="#overview" data-v-8cbfa422><span class="num" data-v-8cbfa422>00</span>Overview</a><a href="#principles" data-v-8cbfa422><span class="num" data-v-8cbfa422>01</span>Design Principles</a><a href="#tokens" data-v-8cbfa422><span class="num" data-v-8cbfa422>02</span>Design Tokens</a><a href="#primitives" data-v-8cbfa422><span class="num" data-v-8cbfa422>03</span>Primitives</a><a href="#chat" data-v-8cbfa422><span class="num" data-v-8cbfa422>04</span>Chat Interface</a><a href="#themes" data-v-8cbfa422><span class="num" data-v-8cbfa422>05</span>Theming</a><a href="#rules" data-v-8cbfa422><span class="num" data-v-8cbfa422>06</span>Style Rules</a><a href="#shell" data-v-8cbfa422><span class="num" data-v-8cbfa422>07</span>App Shell & Sidebar</a><a href="#a11y" data-v-8cbfa422><span class="num" data-v-8cbfa422>08</span>Accessibility</a><a href="#dialogs" data-v-8cbfa422><span class="num" data-v-8cbfa422>09</span>Dialogs</a></nav><div class="nav-group" data-v-8cbfa422>Companion output</div><nav class="nav" data-v-8cbfa422><a href="#tokens" data-v-8cbfa422><span class="num" data-v-8cbfa422>↗</span>Token list</a><a href="#primitives" data-v-8cbfa422><span class="num" data-v-8cbfa422>↗</span>Component API</a><a href="#rules" data-v-8cbfa422><span class="num" data-v-8cbfa422>↗</span>Style rules</a></nav></aside>',1)),t("main",H,[t("div",L,[a[144]||(a[144]=c('<section id="overview" data-v-8cbfa422><div class="hero" data-v-8cbfa422><span class="eyebrow" data-v-8cbfa422>● Design System · v1.0</span><h1 data-v-8cbfa422>Kimi Web <span class="grad" data-v-8cbfa422>Design System</span></h1><p class="lead" data-v-8cbfa422> 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. </p><div class="hero-meta" data-v-8cbfa422><span class="meta-chip" data-v-8cbfa422><span class="dot" data-v-8cbfa422></span> Scope <b data-v-8cbfa422>apps/kimi-web</b></span><span class="meta-chip" data-v-8cbfa422>Component primitives</span><span class="meta-chip" data-v-8cbfa422>Theme <b data-v-8cbfa422>1 set · 4 customizable colors</b></span><span class="meta-chip" data-v-8cbfa422>Light / dark mode</span></div></div><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>This spec is the single reference when changing the web UI.</b> 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. </div></div></section><section id="principles" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>01</span><h2 class="sec-title" data-v-8cbfa422>Design Principles</h2></div><p class="sec-desc" data-v-8cbfa422> 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. </p><ul class="clean check" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>Consistency</b> —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.</li><li data-v-8cbfa422><b data-v-8cbfa422>Hierarchy</b> —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".</li><li data-v-8cbfa422><b data-v-8cbfa422>Proximity</b> —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.</li><li data-v-8cbfa422><b data-v-8cbfa422>Feedback</b> —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.</li><li data-v-8cbfa422><b data-v-8cbfa422>Breathing room</b> —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.</li><li data-v-8cbfa422><b data-v-8cbfa422>Accessibility (A11y)</b> —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.</li><li data-v-8cbfa422><b data-v-8cbfa422>Reduction</b> —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.</li></ul><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422><b data-v-8cbfa422>Brand tone (the do-not list)</b>: calm, clinical, never exaggerated. <span class="pill red" style="margin:0 4px;" data-v-8cbfa422>Reject</span> 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. </div></div><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>Declare design intent first (Design Read)</b>: 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. </div></div></section>',2)),t("section",R,[a[7]||(a[7]=c(`<div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>02</span><h2 class="sec-title" data-v-8cbfa422>Design Tokens</h2></div><p class="sec-desc" data-v-8cbfa422> Collapse every visual decision into tokens. <b data-v-8cbfa422>Color tokens keep the existing short names and fill out the semantics</b> (lowering migration cost), while <b data-v-8cbfa422>spacing, z-index, motion, and font-weight</b> fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage. </p><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>Naming convention</b>: <code data-v-8cbfa422>--<category>-<role>-<state></code>. For example <code data-v-8cbfa422>--color-text-muted</code>, <code data-v-8cbfa422>--radius-md</code>, <code data-v-8cbfa422>--space-4</code>. To reduce churn, the existing short names (<code data-v-8cbfa422>--bg</code> / <code data-v-8cbfa422>--ink</code> / <code data-v-8cbfa422>--line</code> / <code data-v-8cbfa422>--blue</code> …) are kept as <b data-v-8cbfa422>compatibility aliases</b> for one release cycle. </div></div><h3 class="sub" data-v-8cbfa422>Color</h3><p data-v-8cbfa422>Semantic-first, in three layers: <b data-v-8cbfa422>background / text / border</b> + <b data-v-8cbfa422>accent</b> + <b data-v-8cbfa422>status colors</b>. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.</p><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422>The table below shows the <b data-v-8cbfa422>semantic tokens</b>. Each ships a light value in <code data-v-8cbfa422>:root</code> and a dark override in the <code data-v-8cbfa422>data-color-scheme</code> blocks — for example <code data-v-8cbfa422>--color-bg</code> is <code data-v-8cbfa422>#ffffff</code> in light and <code data-v-8cbfa422>#121212</code> in dark; <code data-v-8cbfa422>--color-accent</code> is the brand blue (<code data-v-8cbfa422>#1783ff</code> light / <code data-v-8cbfa422>#1a88ff</code> dark). The <b data-v-8cbfa422>semantic status colors</b> (success / warning / danger / info) are independent palettes, one set each for light / dark.</div></div><div class="palette" data-v-8cbfa422><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#ffffff;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>bg</div><div class="cv" data-v-8cbfa422>#ffffff / #121212</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#f5f5f5;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>surface</div><div class="cv" data-v-8cbfa422>#f5f5f5 / #1f1f1f</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#f5f5f5;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>surface-sunken</div><div class="cv" data-v-8cbfa422>#f5f5f5 / #121212</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#f5f5f5;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>well</div><div class="cv" data-v-8cbfa422>#f5f5f5 / #1f1f1f</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#f5f5f5;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>surface-deep</div><div class="cv" data-v-8cbfa422>#f5f5f5 / #0d0d0d</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#fff;border:0.5px solid rgba(0,0,0,.13);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>surface-overlay</div><div class="cv" data-v-8cbfa422>#ffffff / rgba(255,255,255,.1)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:rgba(0,0,0,.05);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>selected</div><div class="cv" data-v-8cbfa422>rgba(0,0,0,.05) / rgba(255,255,255,.1)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:rgba(0,0,0,.9);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>fg</div><div class="cv" data-v-8cbfa422>rgba(0,0,0,.9) / rgba(255,255,255,.84)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:rgba(0,0,0,.6);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>fg-muted</div><div class="cv" data-v-8cbfa422>rgba(0,0,0,.6) / rgba(255,255,255,.56)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:rgba(0,0,0,.13);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>line</div><div class="cv" data-v-8cbfa422>rgba(0,0,0,.13) / rgba(255,255,255,.12)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:rgba(0,0,0,.05);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>subtle</div><div class="cv" data-v-8cbfa422>rgba(0,0,0,.05) / rgba(255,255,255,.05)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#1783ff;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>accent (KMBlue)</div><div class="cv" data-v-8cbfa422>#1783ff / #1a88ff</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#e8f3ff;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>accent-soft</div><div class="cv" data-v-8cbfa422>#e8f3ff / rgba(26,136,255,.1)</div></div></div></div><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Light</th><th data-v-8cbfa422>Dark</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-bg</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#121212;" data-v-8cbfa422></span>#121212</td><td data-v-8cbfa422>Page background</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-surface</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f5f5f5;" data-v-8cbfa422></span>#f5f5f5</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#1f1f1f;" data-v-8cbfa422></span>#1f1f1f</td><td data-v-8cbfa422>Panel / sidebar / card head</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-surface-raised</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#292929;" data-v-8cbfa422></span>#292929</td><td data-v-8cbfa422>Raised card / dialog / input</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-menu-bg</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.95);" data-v-8cbfa422></span>rgba(255,255,255,.95)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(41,41,41,.95);" data-v-8cbfa422></span>rgba(41,41,41,.95)</td><td data-v-8cbfa422>Floating menu panel — frosted glass over <code data-v-8cbfa422>--p-menu-backdrop</code> blur</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-surface-overlay</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-8cbfa422></span>rgba(255,255,255,.1)</td><td data-v-8cbfa422>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</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-well</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f5f5f5;" data-v-8cbfa422></span>#f5f5f5</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#1f1f1f;" data-v-8cbfa422></span>#1f1f1f</td><td data-v-8cbfa422>Content 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 (<code data-v-8cbfa422>#121212</code>) vanishes into the page there</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-surface-deep</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f5f5f5;" data-v-8cbfa422></span>#f5f5f5</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0d0d0d;" data-v-8cbfa422></span>#0d0d0d</td><td data-v-8cbfa422>Deep chrome plane one step BELOW the page (panel headers, diff gutters) — dark drops under <code data-v-8cbfa422>--color-bg</code> so chrome framing stays darker than the content it frames</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-text</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.9);" data-v-8cbfa422></span>rgba(0,0,0,.9)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.84);" data-v-8cbfa422></span>rgba(255,255,255,.84)</td><td data-v-8cbfa422>Body text / headings</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-text-strong</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#000;" data-v-8cbfa422></span>#000000</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;box-shadow:inset 0 0 0 1px #ddd;" data-v-8cbfa422></span>#ffffff</td><td data-v-8cbfa422>Max foreground emphasis — menu-row label & icon on hover</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-text-muted</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-8cbfa422></span>rgba(0,0,0,.6)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.56);" data-v-8cbfa422></span>rgba(255,255,255,.56)</td><td data-v-8cbfa422>Secondary text / placeholder</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-line</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.13);" data-v-8cbfa422></span>rgba(0,0,0,.13)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.12);" data-v-8cbfa422></span>rgba(255,255,255,.12)</td><td data-v-8cbfa422>Divider / card border</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-subtle</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.05);" data-v-8cbfa422></span>rgba(0,0,0,.05)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.05);" data-v-8cbfa422></span>rgba(255,255,255,.05)</td><td data-v-8cbfa422>Subtle hairline — tertiary separators below <code data-v-8cbfa422>--color-line</code> (diff-gutter column rules, quiet dividers inside wells)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-selected</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.05);" data-v-8cbfa422></span>rgba(0,0,0,.05)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-8cbfa422></span>rgba(255,255,255,.1)</td><td data-v-8cbfa422>Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-hover</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.03);" data-v-8cbfa422></span>rgba(0,0,0,.03)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.05);" data-v-8cbfa422></span>rgba(255,255,255,.05)</td><td data-v-8cbfa422>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)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-selected-hover</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.08);" data-v-8cbfa422></span>rgba(0,0,0,.08)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.14);" data-v-8cbfa422></span>rgba(255,255,255,.14)</td><td data-v-8cbfa422>Hover of a control RESTING at the selected fill (work cards) — one rung above f2, below f3: hover deepens/brightens a step, never drops below the rest state</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-inline-code-bg</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.03);" data-v-8cbfa422></span>rgba(0,0,0,.03)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-8cbfa422></span>rgba(255,255,255,.1)</td><td data-v-8cbfa422>Inline-code chip fill — fills.f1 / fills.f2; dark lifts off any dark surface (sunken == bg there)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-media-alpha-bg-1</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#858585;" data-v-8cbfa422></span>≈#858585</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#76797e;" data-v-8cbfa422></span>≈#76797e</td><td data-v-8cbfa422>Checkerboard square A of the <code data-v-8cbfa422><img></code> alpha canvas — color-mix of <code data-v-8cbfa422>--color-bg</code>/<code data-v-8cbfa422>--color-text</code> (52/48); applied via <code data-v-8cbfa422>--media-alpha-canvas</code> (16px period)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-media-alpha-bg-2</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#6b6b6b;" data-v-8cbfa422></span>≈#6b6b6b</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#8c8f93;" data-v-8cbfa422></span>≈#8c8f93</td><td data-v-8cbfa422>Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-sidebar-bg</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f9fbfc;" data-v-8cbfa422></span>#f9fbfc</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0d0d0d;" data-v-8cbfa422></span>#0d0d0d</td><td data-v-8cbfa422>Sidebar surface — one step off <code data-v-8cbfa422>--color-bg</code> (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</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-scrim</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.4);" data-v-8cbfa422></span>rgba(0,0,0,.4)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-8cbfa422></span>rgba(0,0,0,.6)</td><td data-v-8cbfa422>Modal scrim — the dark veil behind dialogs/lightboxes (mask.base; legacy hardcoded overlays can migrate here)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-scrim-strong</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-8cbfa422></span>rgba(0,0,0,.6)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.75);" data-v-8cbfa422></span>rgba(0,0,0,.75)</td><td data-v-8cbfa422>Stronger scrim for full-screen media previews (mask.strong — the PhotoSwipe image preview backdrop)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-text-on-scrim</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>same</td><td data-v-8cbfa422>Text drawn on the scrim (captions over the media lightbox)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-accent</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#1783ff;" data-v-8cbfa422></span>#1783ff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#1a88ff;" data-v-8cbfa422></span>#1a88ff</td><td data-v-8cbfa422>Primary action / link / focus</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-success</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0e7a38;" data-v-8cbfa422></span>#0e7a38</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#3fb950;" data-v-8cbfa422></span>#3fb950</td><td data-v-8cbfa422>Success / pass</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-warning</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#a9610a;" data-v-8cbfa422></span>#a9610a</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#d29922;" data-v-8cbfa422></span>#d29922</td><td data-v-8cbfa422>Warning / pending</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-danger</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#c0392b;" data-v-8cbfa422></span>#c0392b</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f85149;" data-v-8cbfa422></span>#f85149</td><td data-v-8cbfa422>Danger / error / abort</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Palette</h4><p data-v-8cbfa422>The palette <b data-v-8cbfa422>is</b> the production kimi.com palette (design tokens <code data-v-8cbfa422>tokens.json</code>): neutral-gray surfaces, an alpha-based label / fill / separator ramp (<code data-v-8cbfa422>labels.*</code> / <code data-v-8cbfa422>fills.*</code> / <code data-v-8cbfa422>separator.s1</code>), the KMBlue accent, and a true neutral dark ladder (<code data-v-8cbfa422>#121212 → #1f1f1f → #292929</code>; the deep chrome plane and sidebar derive one step below at <code data-v-8cbfa422>#0d0d0d</code> — the palette has nothing darker than primary).</p><p data-v-8cbfa422>The ONE deliberate exception is the <b data-v-8cbfa422>status hues</b>: success / warning / danger / done keep the app's own WCAG-tuned ramp (≥4.5:1 on the neutral surfaces) — the production status colours (positiveGreen <code data-v-8cbfa422>#16c456</code>, orange <code data-v-8cbfa422>#ff9500</code>, danger red <code data-v-8cbfa422>#ff3849</code>) are too bright against it. Diff add/del bands happen to coincide (both use the production 25% fills in light, 14% in dark).</p><h4 class="mini" data-v-8cbfa422>Surface usage</h4><p data-v-8cbfa422>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 <code data-v-8cbfa422>--p-surface-raised</code> 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 <code data-v-8cbfa422>--color-surface-sunken</code> for a content carrier — it equals <code data-v-8cbfa422>--color-bg</code> in dark and the fill vanishes; use <code data-v-8cbfa422>--color-well</code>. Sunken stays correct INSIDE surface / raised cards, where it is a genuine recess. Field controls (selects, steppers) on a raised card use <code data-v-8cbfa422>--color-surface-overlay</code>, the top fill rung; floating layers keep <code data-v-8cbfa422>--color-surface-raised</code> — their elevation is shadow + hairline, not a lighter fill.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Light</th><th data-v-8cbfa422>Dark</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-surface-overlay</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#22272e;" data-v-8cbfa422></span>#22272e</td><td data-v-8cbfa422>Field controls on raised cards — select, stepper (top fill rung; light = white)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-surface-raised</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#1c2128;" data-v-8cbfa422></span>#1c2128</td><td data-v-8cbfa422>Raised card / dialog / input (raised layer)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-well</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f3f5f8;" data-v-8cbfa422></span>#f3f5f8</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#13181e;" data-v-8cbfa422></span>#13181e</td><td data-v-8cbfa422>Code block / tool output / list carrier directly on the page (content well — light: recessed, dark: one rung above the page)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-surface</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fafbfc;" data-v-8cbfa422></span>#fafbfc</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#13181e;" data-v-8cbfa422></span>#13181e</td><td data-v-8cbfa422>Panel / sidebar / card head (default flat layer)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-surface-sunken</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f3f5f8;" data-v-8cbfa422></span>#f3f5f8</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0d1117;" data-v-8cbfa422></span>#0d1117</td><td data-v-8cbfa422>Recessed area INSIDE a surface / raised card — never a content carrier on the page (sunken layer)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-bg</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0d1117;" data-v-8cbfa422></span>#0d1117</td><td data-v-8cbfa422>Page background</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-surface-deep</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fafbfc;" data-v-8cbfa422></span>#fafbfc</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0a0d12;" data-v-8cbfa422></span>#0a0d12</td><td data-v-8cbfa422>Panel header / diff gutter (deep chrome layer — below the page in dark)</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Borders & hairlines</h4><p data-v-8cbfa422>Three line tokens, three jobs: <code data-v-8cbfa422>--color-line</code> is the default structural separator, <code data-v-8cbfa422>--color-subtle</code> the tertiary separator that must stay quieter (diff-gutter column rules, quiet dividers inside wells), and <code data-v-8cbfa422>--color-line-strong</code> the edge of interactive controls (inputs, selects, secondary buttons). Width is one: <b data-v-8cbfa422>0.5px</b> — 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 <code data-v-8cbfa422>--line</code> / <code data-v-8cbfa422>--line2</code> alias <code data-v-8cbfa422>--color-line</code> / <code data-v-8cbfa422>--color-subtle</code> for one cycle; new work references the v2 names.)</p><h4 class="mini" data-v-8cbfa422>Focus ring</h4><p data-v-8cbfa422>All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a <code data-v-8cbfa422>box-shadow</code> focus ring.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-focus-ring</td><td class="val" data-v-8cbfa422>0 0 0 3px var(--p-accent-soft)</td><td data-v-8cbfa422>Default focus ring (link, menu item, switch, checkbox)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-focus-ring-strong</td><td class="val" data-v-8cbfa422>0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)</td><td data-v-8cbfa422>Strong focus ring (button, primary action)</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Text selection</h4><p data-v-8cbfa422>The text-selection color uses <code data-v-8cbfa422>--p-selection</code> uniformly (light <code data-v-8cbfa422>rgba(23,131,255,.18)</code> / dark <code data-v-8cbfa422>rgba(88,166,255,.32)</code>), applied by the global <code data-v-8cbfa422>::selection</code> rule; do not set a separate highlight background.</p><h4 class="mini" data-v-8cbfa422>Disabled state</h4><p data-v-8cbfa422>All disabled controls use <code data-v-8cbfa422>opacity:.5</code> + <code data-v-8cbfa422>cursor:not-allowed</code> uniformly; do not separately grey out or recolor.</p><h3 class="sub" data-v-8cbfa422>Font families</h3><p data-v-8cbfa422>Kimi Web uses two font tokens: <b data-v-8cbfa422>--font-ui</b> (UI and body, with Schibsted Grotesk for Latin and Noto Sans SC for Simplified Chinese) and <b data-v-8cbfa422>--font-mono</b> (code and monospace). Components always reference the variables; do not hard-code font names.</p><h4 class="mini" data-v-8cbfa422>--font-ui · UI & body (Schibsted Grotesk + Noto Sans SC)</h4><p data-v-8cbfa422>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:</p><div class="code" data-v-8cbfa422><div class="code-bar" data-v-8cbfa422><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="fn" data-v-8cbfa422>--font-ui</span></div><pre data-v-8cbfa422>--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";</pre></div><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>Schibsted Grotesk first: self-hosted Latin UI and body text, with normal and italic variable faces.</li><li data-v-8cbfa422>Western fallbacks next: Helvetica Neue / Arial for environments where Schibsted Grotesk cannot load.</li><li data-v-8cbfa422>Noto Sans SC Variable next: bundled Simplified Chinese glyphs with a weight range of 100–900.</li><li data-v-8cbfa422>System UI fallbacks last: PingFang SC / Microsoft YaHei, platform UI fonts, and emoji fonts.</li></ul><h4 class="mini" data-v-8cbfa422>--font-mono · Code & monospace</h4><p data-v-8cbfa422>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:</p><div class="code" data-v-8cbfa422><div class="code-bar" data-v-8cbfa422><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="fn" data-v-8cbfa422>--font-mono</span></div><pre data-v-8cbfa422>--font-mono: "JetBrains Mono Variable", "JetBrains Mono", + ui-monospace, "SF Mono", Menlo, Consolas, monospace;</pre></div><h4 class="mini" data-v-8cbfa422>Loading strategy</h4><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Font</th><th data-v-8cbfa422>Source</th><th data-v-8cbfa422>Bundled</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>JetBrains Mono</td><td class="val" data-v-8cbfa422>@fontsource-variable/jetbrains-mono</td><td class="val" data-v-8cbfa422>✓ self-hosted</td><td data-v-8cbfa422>monospace / code (--font-mono)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Schibsted Grotesk</td><td class="val" data-v-8cbfa422>prepare-fonts → app-ui/assets/fonts</td><td class="val" data-v-8cbfa422>✓ generated + bundled</td><td data-v-8cbfa422>UI / body / display (--font-ui, --font-display), wght 400-900, normal + italic</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Noto Sans SC</td><td class="val" data-v-8cbfa422>prepare-fonts → app-ui/assets/fonts</td><td class="val" data-v-8cbfa422>✓ generated + bundled</td><td data-v-8cbfa422>Simplified Chinese UI / body, wght 100–900</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>System UI / CJK fonts</td><td class="val" data-v-8cbfa422>operating system</td><td class="val" data-v-8cbfa422>—</td><td data-v-8cbfa422>late fallback for UI / body</td></tr></tbody></table><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422> 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. </div></div><h4 class="mini" data-v-8cbfa422>Usage rules</h4><ul class="clean check" data-v-8cbfa422><li data-v-8cbfa422>Components always use <code data-v-8cbfa422>var(--font-ui)</code> / <code data-v-8cbfa422>var(--font-mono)</code>; do not hard-code font names like <code data-v-8cbfa422>'Schibsted Grotesk'</code> / <code data-v-8cbfa422>'JetBrains Mono'</code>.</li><li data-v-8cbfa422>Body / UI use <code data-v-8cbfa422>--font-ui</code> (Schibsted Grotesk for Latin, Noto Sans SC for Simplified Chinese); code / monospace use <code data-v-8cbfa422>--font-mono</code> (JetBrains Mono).</li><li data-v-8cbfa422>Schibsted Grotesk is loaded from complete variable faces, including normal and italic styles; <code data-v-8cbfa422>font-optical-sizing: auto</code> is enabled globally.</li><li data-v-8cbfa422>Noto Sans SC is loaded from one complete weight-variable WOFF2 asset. Platform CJK fonts stay late in the fallback chain.</li></ul><h3 class="sub" data-v-8cbfa422>Type scale & weight</h3><p data-v-8cbfa422>The user font-size preference is one of four named steps (<code data-v-8cbfa422>small / medium / large / xlarge</code>, Medium default) written to <code data-v-8cbfa422>data-font-scale</code> on <code data-v-8cbfa422><html></code>; the step name is persisted, never a px value. The step only moves <code data-v-8cbfa422>--base-font</code>; every size token derives additively (<code data-v-8cbfa422>default + shift</code>), and line heights are locked to integer px via <code data-v-8cbfa422>round(size × ratio, 1px)</code> — never a unitless ratio.</p><p data-v-8cbfa422>Two token groups share the shift but keep their own ratios: <b data-v-8cbfa422>--ui-*</b> for chrome (tight, 1.40–1.50) and <b data-v-8cbfa422>--md-*</b> 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 <code data-v-8cbfa422>min()</code> — do not remove). Use the <code data-v-8cbfa422>.text-ui-*</code> / <code data-v-8cbfa422>.text-md-*</code> utility classes; legacy aliases <code data-v-8cbfa422>--ui-font-size</code> (→ <code data-v-8cbfa422>--ui-b2</code>), <code data-v-8cbfa422>--content-font-size</code> (→ <code data-v-8cbfa422>--md-b1</code>) and the whole 6-level <code data-v-8cbfa422>--text-*</code> 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 (<code data-v-8cbfa422>--ui-b2</code>); dropdown menu items sit one rung below (<code data-v-8cbfa422>--text-sm</code> = b2 − 1px) — both still follow the user's font scale.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-8cbfa422><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-t1);font-weight:500;" data-v-8cbfa422>Section Title</div><div class="type-meta" data-v-8cbfa422>--ui-t1 · title (cap 22)</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-t2);font-weight:500;" data-v-8cbfa422>Card title</div><div class="type-meta" data-v-8cbfa422>--ui-t2 · subtitle</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-b1);font-weight:500;" data-v-8cbfa422>UI emphasis</div><div class="type-meta" data-v-8cbfa422>--ui-b1 · body strong</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-b2);" data-v-8cbfa422>UI control / button / form</div><div class="type-meta" data-v-8cbfa422>--ui-b2 · body</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-c1);" data-v-8cbfa422>Helper text / table</div><div class="type-meta" data-v-8cbfa422>--ui-c1 · caption</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-c2);" data-v-8cbfa422>Badge / timestamp</div><div class="type-meta" data-v-8cbfa422>--ui-c2 · non-critical only</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--md-h1);font-weight:600;" data-v-8cbfa422>Markdown H1</div><div class="type-meta" data-v-8cbfa422>--md-h1</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--md-b1);" data-v-8cbfa422>Chat body / message bubbles / composer</div><div class="type-meta" data-v-8cbfa422>--md-b1 · prose body</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--md-b2);" data-v-8cbfa422>Quote / table</div><div class="type-meta" data-v-8cbfa422>--md-b2 · secondary</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--md-b3);font-family:var(--font-mono);" data-v-8cbfa422>Code block / inline code</div><div class="type-meta" data-v-8cbfa422>--md-b3 · weak / code</div></div></div><p data-v-8cbfa422>The fixed product type tokens still define scale-independent defaults: transcript prose enables <code data-v-8cbfa422>text-autospace: normal</code> for mixed CJK and Latin text. Drop stray <code data-v-8cbfa422>font-weight: 650 / 750</code>; converge on 400 / 500 (regular / emphasis), with a dedicated 600 weight for sidebar section labels.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--font-ui</td><td class="val" data-v-8cbfa422>"Schibsted Grotesk Variable", …, "Noto Sans SC Variable", …</td><td data-v-8cbfa422>UI & body (Schibsted Grotesk + Noto Sans SC)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--font-kbd</td><td class="val" data-v-8cbfa422>"Schibsted Grotesk Variable", system-ui, sans-serif</td><td data-v-8cbfa422>keyboard shortcut keycaps</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--font-mono</td><td class="val" data-v-8cbfa422>JetBrains Mono…</td><td data-v-8cbfa422>code, Bash commands, line numbers, diffs</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>data-font-scale</td><td class="val" data-v-8cbfa422>small / medium / large / xlarge</td><td data-v-8cbfa422>user preference on <html>; sets --base-font (12–18px), Medium = 14px default</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--ui-t0…--ui-c2</td><td class="val" data-v-8cbfa422>default + --ui-shift, t0/t1 capped via min()</td><td data-v-8cbfa422>chrome type ramp (title / subtitle / body / caption); .text-ui-* classes</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--md-h1…--md-b3</td><td class="val" data-v-8cbfa422>default + --md-shift</td><td data-v-8cbfa422>Markdown ramp (headings / body / secondary / code); .text-md-* classes</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--ui-font-size / --content-font-size</td><td class="val" data-v-8cbfa422>var(--ui-b2) / var(--md-b1)</td><td data-v-8cbfa422>legacy aliases kept on the ramp</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--code-font-size</td><td class="val" data-v-8cbfa422>calc(var(--content-font-size) - 2px)</td><td data-v-8cbfa422>standalone code surfaces (diff view, file preview, tool cards) — one step below body, 12px @ Medium; prose-embedded code stays on the --md-* ramp</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--text-xs / sm / base / lg / xl / 2xl</td><td class="val" data-v-8cbfa422>c1 / b2−1 / b2 / t2 / t1 / t0</td><td data-v-8cbfa422>legacy ramp, aliased into the scale</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--leading-tight/normal/prose/relaxed</td><td class="val" data-v-8cbfa422>1.25 / 1.5 / 1.6 / 1.7</td><td data-v-8cbfa422>headings / UI / chat prose / long text</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--weight-regular/option-label/medium/ui-strong</td><td class="val" data-v-8cbfa422>400 / 475 / 500 / 525</td><td data-v-8cbfa422>body / settings labels / emphasis / compact UI emphasis</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--weight-section-label</td><td class="val" data-v-8cbfa422>600</td><td data-v-8cbfa422>sidebar section labels</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Icon size</h4><p data-v-8cbfa422>Icons use three size tokens uniformly. The global <code data-v-8cbfa422>.p-ic</code> default is 16px (<code data-v-8cbfa422>--p-ic-md</code>); components pick as needed, and random pixel sizes are forbidden.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-ic-sm</td><td class="val" data-v-8cbfa422>14px</td><td data-v-8cbfa422>small button, badge, menu item, inline link icon</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-ic-md</td><td class="val" data-v-8cbfa422>16px</td><td data-v-8cbfa422>default (button, icon button, toolbar)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-ic-lg</td><td class="val" data-v-8cbfa422>20px</td><td data-v-8cbfa422>Toast status icon, empty-state illustration</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Icon</h4><p data-v-8cbfa422>Icons always come from the centralized registry <code data-v-8cbfa422>lib/icons.ts</code>: in templates use the <code data-v-8cbfa422><Icon name size /></code> component (<code data-v-8cbfa422>components/ui/Icon.vue</code>); for <code data-v-8cbfa422>v-html</code> contexts (such as a tool glyph) use <code data-v-8cbfa422>iconSvg(name, size)</code>. <b data-v-8cbfa422>Do not hand-write <code data-v-8cbfa422><svg></code></b> — the <code data-v-8cbfa422>scripts/check-style.mjs</code> <code data-v-8cbfa422>icon-from-registry</code> rule flags stray SVGs. Every glyph shares the 24×24 source grid and <code data-v-8cbfa422>currentColor</code> (colour follows text); size uses the three tokens below, and only icons imported in <code data-v-8cbfa422>lib/icons.ts</code> are bundled by <a href="https://github.com/unplugin/unplugin-icons" data-v-8cbfa422>unplugin-icons</a> at build time. Three collections feed the registry, in this order of preference: <b data-v-8cbfa422><code data-v-8cbfa422>~icons/kimi/*</code></b> — Kimi Design System icons (24×24 outlined, 1.8px stroke), local SVGs under <code data-v-8cbfa422>src/icons/kimi/</code> registered as a custom collection in the Vite config, used whenever a Kimi glyph exists for the intent; <b data-v-8cbfa422><code data-v-8cbfa422>~icons/tabler/*</code></b> — Tabler Icons (MIT), for the few gaps it uniquely covers (today: the right-panel toggle); and <b data-v-8cbfa422><code data-v-8cbfa422>~icons/ri/*</code></b> — <a href="https://remixicon.com/" data-v-8cbfa422>Remix Icon</a> (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 <code data-v-8cbfa422>lib/icons.ts</code> header). When an icon is missing, prefer a glyph from the Kimi icon set: copy the SVG into <code data-v-8cbfa422>src/icons/kimi/</code> (kebab-case name, monochrome <code data-v-8cbfa422>currentColor</code>) and register it — two static imports (component + <code data-v-8cbfa422>?raw</code> string) plus one entry in <code data-v-8cbfa422>ICONS</code>; reach for Remix only when no Kimi glyph fits, and never draw paths in a component.</p><h4 class="mini" data-v-8cbfa422>Size scale</h4>`,49)),t("div",O,[t("div",W,[(n(),l("svg",N,[...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",U,[(n(),l("svg",P,[...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",F,[(n(),l("svg",j,[...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",G,[(n(!0),l(h,null,y(d(A),([r,v])=>(n(),l(h,{key:r},[t("div",K,k(r),1),(n(!0),l(h,null,y(v,i=>(n(),l("div",{key:i,class:"icon-cell"},[s(d(o),{name:i},null,8,["name"]),t("span",J,k(i),1)]))),128))],64))),128))]),a[10]||(a[10]=c('<p data-v-8cbfa422>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.</p><p data-v-8cbfa422>A few <b data-v-8cbfa422>special graphics</b> are not in the registry; each has a dedicated component maintained in one place, and must not be copied by hand: <code data-v-8cbfa422><ContextRing :pct /></code> (the Composer context progress ring, data-driven), <code data-v-8cbfa422><AuthStateIcon kind /></code> (the success / expired / error colored illustrations in the login flow), <code data-v-8cbfa422><Spinner /></code> (loading state). Status dots (such as in the Provider list) always use CSS dots (<code data-v-8cbfa422>border-radius:50%</code>), not SVG. The <code data-v-8cbfa422>scripts/check-style.mjs</code> <code data-v-8cbfa422>icon-from-registry</code> rule exempts the above and the brand mark; all other hand-written <code data-v-8cbfa422><svg></code> is flagged.</p><h3 class="sub" data-v-8cbfa422>Spacing</h3><p data-v-8cbfa422>A 4px base grid. All spacing, gaps, and padding inside and outside components come from this scale — no arbitrary pixels.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-8cbfa422><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:4px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-1 · 4</div><div class="space-use" data-v-8cbfa422>icon gap, badge padding</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:6px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-1-5 · 6</div><div class="space-use" data-v-8cbfa422>workbar pill icon ↔ label</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:8px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-2 · 8</div><div class="space-use" data-v-8cbfa422>control gap, small padding</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:12px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-3 · 12</div><div class="space-use" data-v-8cbfa422>button padding, form-item gap</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:16px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-4 · 16</div><div class="space-use" data-v-8cbfa422>card padding, grid gap</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:20px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-5 · 20</div><div class="space-use" data-v-8cbfa422>dialog padding</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:24px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-6 · 24</div><div class="space-use" data-v-8cbfa422>section gap</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:32px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-8 · 32</div><div class="space-use" data-v-8cbfa422>large section gap</div></div></div><h4 class="mini" data-v-8cbfa422>Dense list (sidebar / file tree)</h4><p data-v-8cbfa422>High-density navigation lists like the sidebar share one rhythm, all on the 4px grid: <b data-v-8cbfa422>in-row vertical padding</b> <code data-v-8cbfa422>--space-1</code> (4px), <b data-v-8cbfa422>no margin between rows</b> (the hover pill provides the separation); <b data-v-8cbfa422>section gap</b> (between logo / search / action buttons / group title / list) uniformly <code data-v-8cbfa422>--space-2</code> (8px); <b data-v-8cbfa422>between groups</b> <code data-v-8cbfa422>--space-2</code>; the brand header is slightly looser at the top (<code data-v-8cbfa422>--space-3</code>). When building similar lists, reuse this scale — do not hand-write 1/6/7/10px.</p><h3 class="sub" data-v-8cbfa422>Radius</h3><p data-v-8cbfa422>Merge the existing 14 values <b data-v-8cbfa422>into the nearest</b> 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 <code data-v-8cbfa422>superellipse(1.5)</code> so the flatter curve stays visually concentric with its controls.</p><div class="radius-grid" data-v-8cbfa422><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:4px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>xs · 4</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:6px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>sm · 6</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:8px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>md · 8</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:12px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>lg · 12</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:16px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>xl · 16</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:20px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>2xl · 20</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:32px;corner-shape:superellipse(1.5);" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>composer · 32 / 1.5</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:999px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>full · 999</span></div></div><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th><th data-v-8cbfa422>Merged from</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-xs</td><td class="val" data-v-8cbfa422>4px</td><td data-v-8cbfa422>small badge, inline tag</td><td class="val" data-v-8cbfa422>2/3/4px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-sm</td><td class="val" data-v-8cbfa422>6px</td><td data-v-8cbfa422>small button, icon button, menu item</td><td class="val" data-v-8cbfa422>5/6px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-md</td><td class="val" data-v-8cbfa422>8px</td><td data-v-8cbfa422>button, input, badge, card</td><td class="val" data-v-8cbfa422>7/8/9px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-lg</td><td class="val" data-v-8cbfa422>12px</td><td data-v-8cbfa422>menu, toast, bubble, floating card</td><td class="val" data-v-8cbfa422>10/12px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-xl</td><td class="val" data-v-8cbfa422>16px</td><td data-v-8cbfa422>container baseline: dialogs, settings cards, sheets, work panel</td><td class="val" data-v-8cbfa422>13/16px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-2xl</td><td class="val" data-v-8cbfa422>20px</td><td data-v-8cbfa422>workspace attachment card bottom (<code data-v-8cbfa422>0 0 2xl 2xl</code>) tucked under the composer</td><td class="val" data-v-8cbfa422>18/20px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-composer</td><td class="val" data-v-8cbfa422>32px</td><td data-v-8cbfa422>Composer shell, with <code data-v-8cbfa422>--corner-shape-composer</code></td><td class="val" data-v-8cbfa422>product-specific</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-menu-row</td><td class="val" data-v-8cbfa422>25.3px</td><td data-v-8cbfa422>Menu rows inset 6px inside a composer-radius frame (diagonal-exact concentric)</td><td class="val" data-v-8cbfa422>product-specific</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-full</td><td class="val" data-v-8cbfa422>999px</td><td data-v-8cbfa422>pill badge, avatar, send button</td><td class="val" data-v-8cbfa422>999px / 50%</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Elevation & z-index</h3><p data-v-8cbfa422>Shadows express only "elevation", never decoration (no colored glow). z-index is unified into a scale, eradicating <code data-v-8cbfa422>9999</code>-style one-upping.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-8cbfa422><div class="radius-grid" style="align-items:stretch;" data-v-8cbfa422><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border:none;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>sm · dropdown menu / sticky</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border:none;background:#fff;box-shadow:0 4px 12px rgba(16,24,40,.07),0 2px 4px rgba(16,24,40,.05);" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>md · Toast</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border:none;background:#fff;box-shadow:0 12px 32px rgba(16,24,40,.12),0 4px 10px rgba(16,24,40,.08);" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>lg · overlay (reserved)</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border:none;background:#fff;box-shadow:0 24px 64px rgba(16,24,40,.18),0 8px 20px rgba(16,24,40,.10);" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>xl · dialog</span></div></div></div><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Z-index Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-base</td><td class="val" data-v-8cbfa422>0</td><td data-v-8cbfa422>normal flow</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-raised</td><td class="val" data-v-8cbfa422>1</td><td data-v-8cbfa422>in-component local stacking (menu scroll thumbs, strip badges, floating pills) — never a global layer</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-sticky</td><td class="val" data-v-8cbfa422>100</td><td data-v-8cbfa422>sticky header / sidebar</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-dropdown</td><td class="val" data-v-8cbfa422>200</td><td data-v-8cbfa422>dropdown menu</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-overlay</td><td class="val" data-v-8cbfa422>300</td><td data-v-8cbfa422>overlay / bottom Sheet</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-modal</td><td class="val" data-v-8cbfa422>400</td><td data-v-8cbfa422>dialog — sibling overlays tie-break by DOM order, so the global confirm (ConfirmDialogHost) mounts on demand to always land last / on top</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-modal-dropdown</td><td class="val" data-v-8cbfa422>500</td><td data-v-8cbfa422>menus / popovers that open above a modal dialog (teleported to <body>, e.g. the settings SecondaryModelPicker cascade)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-toast</td><td class="val" data-v-8cbfa422>600</td><td data-v-8cbfa422>toast</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-tooltip</td><td class="val" data-v-8cbfa422>650</td><td data-v-8cbfa422>tooltip bubble — transient and pointer-events none, so it sits above everything (dialogs, toasts) to stay visible anywhere</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-max</td><td class="val" data-v-8cbfa422>9999</td><td data-v-8cbfa422>reserved: only this tier for extreme fallback</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Motion</h3><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--ease-out</td><td class="val" data-v-8cbfa422>cubic-bezier(0.16, 1, 0.3, 1)</td><td data-v-8cbfa422>enter, hover, expand</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--ease-in-out</td><td class="val" data-v-8cbfa422>cubic-bezier(0.4, 0, 0.2, 1)</td><td data-v-8cbfa422>panel width, layout changes</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--duration-fast</td><td class="val" data-v-8cbfa422>120ms</td><td data-v-8cbfa422>press, focus</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--duration-base</td><td class="val" data-v-8cbfa422>160ms</td><td data-v-8cbfa422>hover, show/hide</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--duration-slow</td><td class="val" data-v-8cbfa422>260ms</td><td data-v-8cbfa422>dialog, Sheet, layout</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--duration-hover-intent</td><td class="val" data-v-8cbfa422>250ms</td><td data-v-8cbfa422>hover-intent reveal gate (TOC rail)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--duration-flash</td><td class="val" data-v-8cbfa422>1200ms</td><td data-v-8cbfa422>one-shot attention flashes (search locate, provider-row added) — a highlight timeout, past the show/hide ramp on purpose</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--anim-rive-spin</td><td class="val" data-v-8cbfa422>416.7ms</td><td data-v-8cbfa422>new-chat / folder-plus icon: plus spin on hover</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--anim-leftbar</td><td class="val" data-v-8cbfa422>533.3ms</td><td data-v-8cbfa422>sidebar toggle icon: arrow fly-in on hover</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--anim-leftbar-shrink</td><td class="val" data-v-8cbfa422>200ms</td><td data-v-8cbfa422>sidebar toggle icon: divider shrink on hover</td></tr></tbody></table><p data-v-8cbfa422>The <code data-v-8cbfa422>--anim-*</code> lengths are track timings ported verbatim from the designer's Rive exports, so they sit outside the <code data-v-8cbfa422>--duration-*</code> ramp on purpose — retiming the ramp must not distort them. Their interpolation stays <code data-v-8cbfa422>linear</code> 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 (<code data-v-8cbfa422>#bar-divider</code>, <code data-v-8cbfa422>#bar-arrow</code> / <code data-v-8cbfa422>#bar-arrow-expand</code>, <code data-v-8cbfa422>#p1</code>, <code data-v-8cbfa422>#af-p1</code>) so every instance of the icon animates, and all revert on mouse-out. They still fall under the global reduced-motion switch below.</p><h4 class="mini" data-v-8cbfa422>Reduced motion</h4><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422> Under <code data-v-8cbfa422>@media (prefers-reduced-motion: reduce)</code>, all animation and transition durations drop to about <code data-v-8cbfa422>0.001ms</code> (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 <code data-v-8cbfa422>transition-delay</code>: a hover-intent gate (the conversation TOC's 250ms reveal) decides <i data-v-8cbfa422>whether</i> hidden content appears, and clearing it would make pointer fly-bys strobe content for reduced-motion users. </div></div><h3 class="sub" data-v-8cbfa422>Layout & breakpoints</h3><p data-v-8cbfa422>Layout sizes and responsive breakpoints are tokenized too: sidebar width, content reading-column width, and two global breakpoints. Components should not hard-code pixels.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-sidebar-w</td><td class="val" data-v-8cbfa422>264px</td><td data-v-8cbfa422>left session sidebar width</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-content-max</td><td class="val" data-v-8cbfa422>760px</td><td data-v-8cbfa422>chat reading-column max width (regular chat prose)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-content-wide</td><td class="val" data-v-8cbfa422>920px</td><td data-v-8cbfa422>wide content (settings / panel)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-table-max</td><td class="val" data-v-8cbfa422>1040px</td><td data-v-8cbfa422>desktop wide-table max width (see §04)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-table-cell-max</td><td class="val" data-v-8cbfa422>700px</td><td data-v-8cbfa422>max width of a single table column; longer cell content wraps (see §04)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-bp-sm</td><td class="val" data-v-8cbfa422>640px</td><td data-v-8cbfa422>mobile / desktop boundary</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-bp-md</td><td class="val" data-v-8cbfa422>980px</td><td data-v-8cbfa422>narrow / wide screen boundary</td></tr></tbody></table><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422> At ≤640px: dialogs become bottom Sheets, the sidebar collapses into an expandable drawer, and Composer toolbar controls are allowed to wrap. </div></div>',24))]),t("section",Q,[a[27]||(a[27]=c(`<div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>03</span><h2 class="sec-title" data-v-8cbfa422>Primitives</h2></div><p class="sec-desc" data-v-8cbfa422> Component primitives are the "smallest correct units" of the site UI. Each primitive exposes variants along only two dimensions — <code data-v-8cbfa422>variant</code> / <code data-v-8cbfa422>size</code> — with appearance driven by tokens, so it naturally supports light / dark mode and customizable theme colors. </p><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422> For every interactive primitive, the <b data-v-8cbfa422>keyboard behavior, focus, and ARIA contract are in §08 Accessibility</b>. New primitives must ship with a keyboard model — mouse-only interaction is not enough. </div></div><h3 class="sub" data-v-8cbfa422>Component selection guide</h3><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Scenario</th><th data-v-8cbfa422>Use</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td data-v-8cbfa422>Primary action (submit / confirm)</td><td data-v-8cbfa422><code data-v-8cbfa422>Button variant=primary</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Secondary action / cancel</td><td data-v-8cbfa422><code data-v-8cbfa422>Button secondary</code> / <code data-v-8cbfa422>ghost</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Destructive action (delete / abort)</td><td data-v-8cbfa422><code data-v-8cbfa422>Button danger</code> / <code data-v-8cbfa422>danger-soft</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Status marker</td><td data-v-8cbfa422><code data-v-8cbfa422>Badge</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Toolbar filter / model switch</td><td data-v-8cbfa422><code data-v-8cbfa422>Pill</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>2–5 mutually exclusive options</td><td data-v-8cbfa422><code data-v-8cbfa422>SegmentedControl</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Top tabs</td><td data-v-8cbfa422><code data-v-8cbfa422>Tabs</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Switch / multi-select</td><td data-v-8cbfa422><code data-v-8cbfa422>Switch</code> / <code data-v-8cbfa422>Checkbox</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Scrollable regions with overlay controls</td><td data-v-8cbfa422><code data-v-8cbfa422>ScrollArea</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Floating content card / list action menu</td><td data-v-8cbfa422><code data-v-8cbfa422>Card</code> / <code data-v-8cbfa422>Menu</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Inline notice / global toast</td><td data-v-8cbfa422><code data-v-8cbfa422>Banner</code> / <code data-v-8cbfa422>Toast</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Dialog / confirmation · bottom panel (mobile)</td><td data-v-8cbfa422><code data-v-8cbfa422>Dialog</code> / <code data-v-8cbfa422>Sheet</code></td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Button</h3><p data-v-8cbfa422>4 semantic variants × 3 sizes. The primary action <code data-v-8cbfa422>primary</code> takes its color from the current theme color (§05 can switch between the blue and black families). Radius uses <code data-v-8cbfa422>--radius-md</code> uniformly (small size <code data-v-8cbfa422>--radius-sm</code>), weight 600, with a visible focus ring.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Variant matrix <span class="tag spec" data-v-8cbfa422>light</span></span><span class="sactions" data-v-8cbfa422><span class="tab on" data-v-8cbfa422>preview</span></span></div><div class="stage p col" data-v-8cbfa422><span class="stage-label" data-v-8cbfa422>medium · default</span><div class="demo-row" data-v-8cbfa422><button class="p-btn primary" data-v-8cbfa422>Primary action</button><button class="p-btn secondary" data-v-8cbfa422>Secondary action</button><button class="p-btn ghost" data-v-8cbfa422>Ghost button</button><button class="p-btn danger-soft" data-v-8cbfa422>Destructive (soft)</button><button class="p-btn danger" data-v-8cbfa422>Destructive action</button></div><span class="stage-label" data-v-8cbfa422>small</span><div class="demo-row" data-v-8cbfa422><button class="p-btn primary sm" data-v-8cbfa422>Confirm</button><button class="p-btn secondary sm" data-v-8cbfa422>Cancel</button><button class="p-btn ghost sm" data-v-8cbfa422>More</button></div><span class="stage-label" data-v-8cbfa422>With icon / state</span><div class="demo-row" data-v-8cbfa422><button class="p-btn primary" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-8cbfa422></path></svg>New chat</button><button class="p-btn secondary" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg>Copied</button><button class="p-btn primary disabled" data-v-8cbfa422>Loading…</button></div></div></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Dark skin <span class="tag spec" data-v-8cbfa422>dark</span></span></div><div class="stage dark p col" data-p="dark" data-v-8cbfa422><div class="demo-row" data-v-8cbfa422><button class="p-btn primary" data-v-8cbfa422>Primary action</button><button class="p-btn secondary" data-v-8cbfa422>Secondary action</button><button class="p-btn ghost" data-v-8cbfa422>Ghost button</button><button class="p-btn danger" data-v-8cbfa422>Destructive action</button></div></div></div><h4 class="mini" data-v-8cbfa422>API</h4><div class="code" data-v-8cbfa422><div class="code-bar" data-v-8cbfa422><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="fn" data-v-8cbfa422>Button.vue · usage</span></div><pre data-v-8cbfa422><span class="k" data-v-8cbfa422><Button</span> <span class="p" data-v-8cbfa422>variant</span>=<span class="s" data-v-8cbfa422>"primary"</span> <span class="p" data-v-8cbfa422>size</span>=<span class="s" data-v-8cbfa422>"md"</span> <span class="p" data-v-8cbfa422>:loading</span>=<span class="s" data-v-8cbfa422>"submitting"</span><span class="k" data-v-8cbfa422>></span>Save<span class="k" data-v-8cbfa422></Button></span> + <span class="c" data-v-8cbfa422>// variant: primary | secondary | ghost | danger | danger-soft</span> + <span class="c" data-v-8cbfa422>// size: sm | md | lg</span></pre></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>States</span></div><div class="stage p" data-v-8cbfa422><div class="demo-row" data-v-8cbfa422><button class="p-btn primary" disabled style="opacity:.5;cursor:not-allowed;" data-v-8cbfa422>Disabled primary</button><button class="p-btn primary" data-v-8cbfa422><svg class="p-spinner sm" viewBox="0 0 24 24" data-v-8cbfa422><circle class="track" cx="12" cy="12" r="9" data-v-8cbfa422></circle><circle class="arc" cx="12" cy="12" r="9" data-v-8cbfa422></circle></svg>Submitting</button><button class="p-btn danger" disabled style="opacity:.5;cursor:not-allowed;" data-v-8cbfa422>Disabled danger</button></div></div></div><h3 class="sub" data-v-8cbfa422>IconButton</h3><p data-v-8cbfa422>Unified into three sizes — 26 / 32 / 44px — with the neutral <code data-v-8cbfa422>--color-hover</code> wash on hover and a visible focus ring. Replaces the ad-hoc icon + click areas scattered across components today.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>IconButton</span></div><div class="stage p" data-v-8cbfa422><button class="p-icon-btn" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-8cbfa422></path></svg></button><button class="p-icon-btn" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-8cbfa422></path></svg></button><button class="p-icon-btn" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-8cbfa422></path></svg></button><button class="p-icon-btn sm" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975z" data-v-8cbfa422></path></svg></button><button class="p-icon-btn sm" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg></button></div></div><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422> The desktop IconButton comes in <code data-v-8cbfa422>sm</code> 26 / <code data-v-8cbfa422>md</code> 32; on touch devices the tap target should be ≥ 44px, so use <code data-v-8cbfa422>lg</code> 44px, satisfying the §01 accessibility principle (the mobile three-piece set uses <code data-v-8cbfa422>lg</code>). Icon-only buttons must also name themselves on hover: pass <code data-v-8cbfa422>tooltip</code> (usually the same text as <code data-v-8cbfa422>label</code> — <code data-v-8cbfa422>label</code> alone only sets the aria-label); bare icon <code data-v-8cbfa422><button></code>/<code data-v-8cbfa422><a></code> triggers wrap the <code data-v-8cbfa422>Tooltip</code> component directly. </div></div><h3 class="sub" data-v-8cbfa422>Badge · Chip · Pill</h3><p data-v-8cbfa422>Collapsed into two kinds: <b data-v-8cbfa422>Badge</b> (status badge, with an optional status dot) and <b data-v-8cbfa422>Pill</b> (the clickable pill in the composer toolbar). Radius, font size, and padding are all unified.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Badge · status badge</span></div><div class="stage p col" data-v-8cbfa422><span class="stage-label" data-v-8cbfa422>Semantic variants</span><div class="demo-row" data-v-8cbfa422><span class="p-badge neutral" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>pending</span><span class="p-badge info" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>running</span><span class="p-badge success" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>completed</span><span class="p-badge warning" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>needs confirmation</span><span class="p-badge danger" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>failed</span><span class="p-badge solid" data-v-8cbfa422>KIMI</span></div><span class="stage-label" data-v-8cbfa422>With icon / small size</span><div class="demo-row" data-v-8cbfa422><span class="p-badge info" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1m1 2v14h14V5z" data-v-8cbfa422></path></svg>plan</span><span class="p-badge success sm" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>passed</span><span class="p-badge neutral sm" data-v-8cbfa422>read-only</span></div></div></div>`,19)),t("div",Y,[a[14]||(a[14]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Pill · toolbar pill (composer)")],-1)),t("div",Z,[a[12]||(a[12]=c('<span class="p-pill" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><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" data-v-8cbfa422></path></svg><span class="pp-strong" data-v-8cbfa422>kimi-k2</span><span class="pp-sub" data-v-8cbfa422>· thinking</span><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-8cbfa422></path></svg></span>',1)),t("span",X,[s(d(o),{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]=c(`<h3 class="sub" data-v-8cbfa422>Kbd · keyboard shortcut</h3><p data-v-8cbfa422><b data-v-8cbfa422>Kbd</b> renders a shortcut as keycaps — one block per key, never inline text like <code data-v-8cbfa422>(⌘K)</code>. Caps are 18px tall (Badge sm rhythm): transparent ground with a 0.5px hairline edge, 11px <code data-v-8cbfa422>--font-kbd</code> (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.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Kbd · keycaps</span></div><div class="stage p" data-v-8cbfa422><span class="p-kbd" data-v-8cbfa422><kbd data-v-8cbfa422>⌘</kbd><kbd data-v-8cbfa422>K</kbd></span><span class="p-kbd" data-v-8cbfa422><kbd data-v-8cbfa422>Ctrl</kbd><kbd data-v-8cbfa422>K</kbd></span><span class="p-kbd" data-v-8cbfa422><kbd data-v-8cbfa422>⌘</kbd><kbd data-v-8cbfa422>⇧</kbd><kbd data-v-8cbfa422>P</kbd></span></div></div><h3 class="sub" data-v-8cbfa422>Card / Surface</h3><p data-v-8cbfa422>All cards across the site share <b data-v-8cbfa422>one structure</b> — <code data-v-8cbfa422>head / body / foot</code> — and come in two tiers by visual weight:</p><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>Operation card</b> —— composite "process" content such as the Swarm overview. (Individual tool calls are NOT cards anymore: they render as quiet borderless lines, see §04.) Flat shell: <code data-v-8cbfa422>0.5px</code> hairline, <code data-v-8cbfa422>--radius-md</code>, no shadow. The head is compact mono with no fill, low weight by default, not competing with the conversation.</li><li data-v-8cbfa422><b data-v-8cbfa422>Attention card</b> —— content that needs a user decision, such as Question / Approval. A floating neutral card: white raised surface, <code data-v-8cbfa422>--radius-lg</code>, a faint popover shadow (<code data-v-8cbfa422>--shadow-menu</code>), a plain dark title head, and a hairline footer whose actions read in number-key order (chips on the buttons) leading to one solid primary action. No semantic color band.</li></ul><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Operation card · compact mono head (no fill)</span></div><div class="stage p col" data-v-8cbfa422><div class="p-card" style="max-width:460px;" data-v-8cbfa422><div class="p-card-head" data-v-8cbfa422><span class="p-card-title" data-v-8cbfa422>read_file</span><span class="p-badge info sm" style="margin-left:auto;" data-v-8cbfa422>session.ts</span></div><div class="p-card-body" data-v-8cbfa422>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.</div></div></div></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Attention card · floating neutral surface (no color band)</span></div><div class="stage p col" data-v-8cbfa422><div class="p-action" style="max-width:460px;" data-v-8cbfa422><div class="p-action-head" data-v-8cbfa422><span class="p-action-title" data-v-8cbfa422>A decision needs your confirmation</span></div><div class="p-action-body" data-v-8cbfa422>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.</div><div class="p-action-foot" data-v-8cbfa422><button class="p-btn ghost sm" data-v-8cbfa422>Dismiss</button><button class="p-btn primary sm" data-v-8cbfa422>Confirm</button></div></div></div></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Activity run · a summary row expands into the folded lines</span></div><div class="stage p col" data-v-8cbfa422><div class="p-tool-group open" style="max-width:460px;" data-v-8cbfa422><div class="p-tool-group-head" data-v-8cbfa422><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tg-title" data-v-8cbfa422>Read 2 files</span></div><div class="p-tool-row" data-v-8cbfa422><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>session.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><span class="tr-chip" data-v-8cbfa422>34 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div><div class="p-tool-row" data-v-8cbfa422><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>middleware.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><span class="tr-chip" data-v-8cbfa422>58 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div></div></div></div><ul class="clean check" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>One structure, two shells</b>: every card is <code data-v-8cbfa422>head / body / foot</code>; operation cards are flat + 0.5px hairline + radius-md with no shadow, while the attention card is the single exception — raised surface, radius-lg and a soft shadow, because it floats above the transcript in place of the composer.</li><li data-v-8cbfa422><b data-v-8cbfa422>Differences are intentional</b>: operation cards keep a compact mono head; attention cards get a plain dark title head and footer actions.</li><li data-v-8cbfa422><b data-v-8cbfa422>Grouping</b>: consecutive activity (thinking + tool calls of any kind, cards included) folds into ONE activity-run row — a smart summary sentence that expands into the items in order; only text and successful media tools (inline media is the turn's output) stay out and break the run (see §04).</li><li data-v-8cbfa422><b data-v-8cbfa422>Turn fold</b>: once an assistant turn settles, everything before its final text block (thinking, activity runs, interim text, standalone cards) folds into ONE bare "Worked Ns" row — no glyph, a faint one-line label + rotating chevron sharing the activity-run head's padding and hover language; while the turn streams the row stays hidden and the body forced open, and on settle the row appears and folds itself back. The span is the turn's elapsed time (daemon duration once settled, server message stamps for history; approval/question waits included by design), reading the generic "Work details" without any stamp. The final text — and anything after it, so trailing media / cards stay on screen — never folds; a text-only turn renders no row at all (see §04).</li><li data-v-8cbfa422><b data-v-8cbfa422>Status dots</b>: running (pulsing blue) / done (green) / failed (red), sharing one color vocabulary (see §04 tool calls).</li></ul><h3 class="sub" data-v-8cbfa422>Input / Select / Textarea</h3><p data-v-8cbfa422>Unified 38px height (32px small), <code data-v-8cbfa422>--radius-md</code> radius, <code data-v-8cbfa422>--color-surface-overlay</code> background, and a unified blue focus ring (<code data-v-8cbfa422>0 0 0 3px accent-soft</code>). Select is a custom combobox and listbox, not a native <code data-v-8cbfa422><select></code>; 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.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Form primitives</span></div><div class="stage p col" data-v-8cbfa422><div class="demo-row" style="align-items:flex-start;" data-v-8cbfa422><div class="p-field demo-grow" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>Workspace name</label><input class="p-input" placeholder="e.g. frontend" data-v-8cbfa422><span class="p-hint" data-v-8cbfa422>Only letters, numbers, and hyphens are allowed.</span></div><div class="p-field demo-grow" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>Model provider</label><button class="p-select" type="button" data-v-8cbfa422>Anthropic</button></div></div><div class="p-field" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>System prompt</label><textarea class="p-textarea" placeholder="Describe this Agent's role and boundaries…" data-v-8cbfa422></textarea></div></div></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>States</span></div><div class="stage p col" data-v-8cbfa422><div class="demo-row" style="align-items:flex-start;" data-v-8cbfa422><div class="p-field demo-grow" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>Workspace name</label><input class="p-input" value="my workspace!" style="border-color:var(--p-danger);" data-v-8cbfa422><span class="p-field-error" data-v-8cbfa422>Please enter a valid workspace name</span></div><div class="p-field demo-grow" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>Display name</label><input class="p-input" value="frontend" data-v-8cbfa422><span class="p-hint" data-v-8cbfa422>Normal state · validation passed</span></div></div></div></div><h3 class="sub" data-v-8cbfa422>Code / Diff</h3><p data-v-8cbfa422><b data-v-8cbfa422>Diff controls</b>: 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 <code data-v-8cbfa422>list</code> and <code data-v-8cbfa422>tree-view</code> 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.</p><p data-v-8cbfa422><b data-v-8cbfa422>Diff empty state</b>: Centre the clean-workspace message in the available panel height and lead with a quiet 32px status icon.</p><p data-v-8cbfa422><b data-v-8cbfa422>Diff detail body</b>: the right-side diff detail reuses <code data-v-8cbfa422>HighlightedCode</code> 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 data-v-8cbfa422>--code-font-size</code> (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.</p><p data-v-8cbfa422>Inline code, code blocks, and diff contents use the monospace font (<code data-v-8cbfa422>--p-font-mono</code>); 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 <code data-v-8cbfa422>+</code> / <code data-v-8cbfa422>-</code> row colors to express additions and deletions — additions use a success light background, deletions use a danger light background, with no gradients.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Code / Diff</span></div><div class="stage p col" data-v-8cbfa422><span class="stage-label" data-v-8cbfa422>inline code</span><div data-v-8cbfa422>The server uses <code class="p-code-inline" data-v-8cbfa422>jwt.verify(token)</code> to verify the signature, returning 401 on failure.</div><span class="stage-label" data-v-8cbfa422>code block</span><div class="p-code-block" data-v-8cbfa422><div class="p-code-block-head" data-v-8cbfa422><span data-v-8cbfa422>session.ts</span><button class="p-icon-btn sm" aria-label="Copy" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z" data-v-8cbfa422></path></svg></button></div><pre data-v-8cbfa422>import { verify } from './jwt'; + + export function auth(token: string) { + return verify(token, process.env.JWT_SECRET!); + }</pre></div><span class="stage-label" data-v-8cbfa422>diff</span><div class="p-diff" data-v-8cbfa422><div class="p-diff-head" data-v-8cbfa422>session.ts · +3 -1</div><div class="p-diff-row" data-v-8cbfa422><span class="pm" data-v-8cbfa422></span><span class="p-diff-code" data-v-8cbfa422>import { verify } from './jwt';</span></div><div class="p-diff-row del" data-v-8cbfa422><span class="pm" data-v-8cbfa422>-</span><span class="p-diff-code" data-v-8cbfa422>const secret = 'dev-secret';</span></div><div class="p-diff-row add" data-v-8cbfa422><span class="pm" data-v-8cbfa422>+</span><span class="p-diff-code" data-v-8cbfa422>const secret = process.env.JWT_SECRET!;</span></div><div class="p-diff-row" data-v-8cbfa422><span class="pm" data-v-8cbfa422></span><span class="p-diff-code" data-v-8cbfa422>return verify(token, secret);</span></div></div></div></div><h3 class="sub" data-v-8cbfa422>Dialog</h3><p data-v-8cbfa422>One dialog primitive replaces 6 hand-written implementations: unified <code data-v-8cbfa422>--radius-xl</code> radius, <code data-v-8cbfa422>--shadow-xl</code> shadow, 20px head padding, right-aligned footer actions, and an IconButton close button.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Dialog primitive</span></div><div class="stage p col" style="align-items:center;" data-v-8cbfa422><div class="p-dialog" data-v-8cbfa422><div class="p-dialog-head" data-v-8cbfa422><div data-v-8cbfa422><div class="p-dialog-title" data-v-8cbfa422>New chat</div><div class="p-dialog-desc" data-v-8cbfa422>Create an independent Agent chat in the current workspace.</div></div><button class="p-icon-btn sm" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-8cbfa422></path></svg></button></div><div class="p-dialog-body" data-v-8cbfa422><div class="p-field" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>Chat title (optional)</label><input class="p-input" placeholder="Generated automatically" data-v-8cbfa422></div></div><div class="p-dialog-foot" data-v-8cbfa422><button class="p-btn secondary" data-v-8cbfa422>Cancel</button><button class="p-btn primary" data-v-8cbfa422>Create</button></div></div></div></div><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>Size & height</b>: Dialog offers three widths — <code data-v-8cbfa422>md</code> 440 / <code data-v-8cbfa422>lg</code> 640 / <code data-v-8cbfa422>xl</code> 760 (<code data-v-8cbfa422>--p-content-max</code>) — chosen by content weight. Height comes in two kinds: <code data-v-8cbfa422>auto</code> (default, grows with content up to <code data-v-8cbfa422>max-height</code>) and <code data-v-8cbfa422>fixed</code> (constant height <code data-v-8cbfa422>min(680px, 100vh - 64px)</code>, with overflow scrolled inside the body). <b data-v-8cbfa422>Content / multi-tab dialogs</b> (settings, model picker, provider manager, folder browser) always use <code data-v-8cbfa422>fixed</code> so the frame size stays constant and doesn't jump when switching tabs or content length; short confirmation dialogs keep <code data-v-8cbfa422>auto</code>. 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 <code data-v-8cbfa422>--color-hover</code> wash as hover, with the label simply brightening to <code data-v-8cbfa422>--color-text</code> — the Kimi app settings nav's recipe (<code data-v-8cbfa422>.ss-nav-item--active</code> → <code data-v-8cbfa422>Fills-F1</code>, no accent tint, no weight change); section captions use 16px UI text in <code data-v-8cbfa422>--color-text</code>. Every setting row has a plain-language description; option labels use <code data-v-8cbfa422>--color-text</code> 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 <code data-v-8cbfa422>--color-surface</code> so each group (<code data-v-8cbfa422>--color-surface-raised</code>) 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 <code data-v-8cbfa422>folder-closed</code> registry icon, and Restore actions lead with the <code data-v-8cbfa422>undo</code> icon. Archive counts use weight 500; timestamps and workspace paths use the UI font. </div></div><p data-v-8cbfa422><b data-v-8cbfa422>Dialog backdrop</b>: Use a restrained 28% neutral overlay so the workspace remains legible without competing with the modal.</p><p data-v-8cbfa422><b data-v-8cbfa422>Settings regions</b>: 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.</p><p data-v-8cbfa422><b data-v-8cbfa422>Archived sessions</b>: Start with the localized page title. Do not add a repeated English kicker above it.</p><p data-v-8cbfa422><b data-v-8cbfa422>Settings interaction</b>: Notification labels and descriptions are not selectable; their switches remain fully interactive.</p><p data-v-8cbfa422><b data-v-8cbfa422>Conversation chrome</b>: 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).</p><p data-v-8cbfa422><b data-v-8cbfa422>Session search</b>: 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.</p><p data-v-8cbfa422><b data-v-8cbfa422>Model picker</b>: 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.</p><h3 class="sub" data-v-8cbfa422>Toast</h3><p data-v-8cbfa422>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 <b data-v-8cbfa422>undoable action</b> there is a second, lighter form — the <b data-v-8cbfa422>Action toast</b> (<code data-v-8cbfa422>ActionToast.vue</code>): a pill floating top-center just below the 48px header, carrying a one-line sentence whose actions are plain inline <code data-v-8cbfa422><button></code>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 <code data-v-8cbfa422><Transition></code>. First used by session archive (Undo / Settings); warnings keep the bottom-right <code data-v-8cbfa422>Toast</code> stack.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Toast</span></div><div class="stage p col" data-v-8cbfa422><div class="p-toast success" data-v-8cbfa422><span class="ti" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg></span><div data-v-8cbfa422><div class="tt" data-v-8cbfa422>Connected to server</div><div class="td" data-v-8cbfa422>The local server is responding normally; you can start a new chat.</div></div></div><div class="p-toast warning" data-v-8cbfa422><span class="ti" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z" data-v-8cbfa422></path></svg></span><div data-v-8cbfa422><div class="tt" data-v-8cbfa422>Context usage 82%</div><div class="td" data-v-8cbfa422>Consider running /compact to free up space.</div></div></div></div></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Action toast</span></div><div class="stage p col" data-v-8cbfa422><div class="p-action-toast" data-v-8cbfa422><button class="lk" data-v-8cbfa422>Undo</button><span data-v-8cbfa422>or view archived chats in</span><button class="lk" data-v-8cbfa422>Settings</button><svg class="p-ic x" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><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" data-v-8cbfa422></path></svg></div></div></div><h3 class="sub" data-v-8cbfa422>Spinner</h3><p data-v-8cbfa422>Loaders fall into two categories by scenario — <b data-v-8cbfa422>do not mix them</b>:</p><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>Spinner (plain · SVG ring)</b> —— the default loader. Used for button loading, app startup (GlobalLoading), and general inline waits — "everything else".</li><li data-v-8cbfa422><b data-v-8cbfa422>WorkingIndicator (小蓝 mascot · brand signature)</b> —— used <b data-v-8cbfa422>only</b> for the chat working state after a prompt is sent (the sending placeholder in ChatPane, the send → first-token loading in SideChatPanel). The label follows the phase: "Requesting…" until the assistant's reply starts, then "Working…".</li></ul><h4 class="mini" data-v-8cbfa422>Spinner · plain loader (default)</h4>`,39)),t("div",$,[a[18]||(a[18]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Spinner · common scenarios")],-1)),t("div",_,[t("div",aa,[a[17]||(a[17]=c('<svg class="p-spinner" viewBox="0 0 24 24" data-v-8cbfa422><circle class="track" cx="12" cy="12" r="9" data-v-8cbfa422></circle><circle class="arc" cx="12" cy="12" r="9" data-v-8cbfa422></circle></svg><span class="p-thinking" data-v-8cbfa422><svg class="p-spinner sm" viewBox="0 0 24 24" data-v-8cbfa422><circle class="track" cx="12" cy="12" r="9" data-v-8cbfa422></circle><circle class="arc" cx="12" cy="12" r="9" data-v-8cbfa422></circle></svg>Loading…</span>',2)),t("button",ta,[(n(),l("svg",ea,[...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",sa,[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",oa,[s(x,{label:"Requesting…"}),s(x,{label:"Working…"})])])]),a[30]||(a[30]=c('<div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422>The chat working state is rendered uniformly by <code data-v-8cbfa422>WorkingIndicator</code> — the 小蓝 mascot (<code data-v-8cbfa422>KimiMascot</code>, 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.</div></div><h3 class="sub" data-v-8cbfa422>Link</h3><p data-v-8cbfa422>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 <code data-v-8cbfa422>.muted</code> variant uses the secondary text color. Used for in-text jumps, external links, "view all", and other lightweight actions.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Link · inline link</span></div><div class="stage p col" data-v-8cbfa422><div class="demo-row" style="font-size:var(--p-font-size-base);color:var(--p-text);" data-v-8cbfa422><span data-v-8cbfa422>Read the full <a class="p-link" href="#" data-v-8cbfa422>design token docs</a> before building.</span><a class="p-link" href="#" data-v-8cbfa422>View on GitHub<svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><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" data-v-8cbfa422></path></svg></a><a class="p-link muted" href="#" data-v-8cbfa422>View history</a></div></div></div><h3 class="sub" data-v-8cbfa422>Menu / Dropdown</h3><p data-v-8cbfa422>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.</p><p data-v-8cbfa422>Dropdown menu panel: frosted glass — the translucent <code data-v-8cbfa422>--color-menu-bg</code> fill over a blurred, saturated page backdrop (<code data-v-8cbfa422>--p-menu-backdrop</code>) — plus hairline + light shadow (<code data-v-8cbfa422>--shadow-menu</code>, 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 <code data-v-8cbfa422>lg</code> (≥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 <code data-v-8cbfa422>--duration-base</code> (exit <code data-v-8cbfa422>--duration-fast</code>), 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.</p><p data-v-8cbfa422>Row states: hover uses the mode-aware <code data-v-8cbfa422>--color-hover</code> wash (it lightens under dark, never darkens); a leading icon sits one rung below the label (<code data-v-8cbfa422>--muted</code>), and on hover both label and icon step up to <code data-v-8cbfa422>--color-text-strong</code>, the max foreground tier. Selection keeps the accent pair (<code data-v-8cbfa422>--color-accent-soft</code> / <code data-v-8cbfa422>--color-accent-hover</code>); danger keeps its own colour.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Menu · dropdown menu</span></div><div class="stage p col" style="align-items:flex-start;" data-v-8cbfa422><div class="p-menu" data-v-8cbfa422><div class="p-menu-item" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg>Open file</div><div class="p-menu-item active" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg>Selected item</div><div class="p-menu-item disabled" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><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 16M8.523 7.109l8.368 8.368a6 6 0 0 1-1.414 1.414L7.109 8.523A6 6 0 0 1 8.523 7.11" data-v-8cbfa422></path></svg>Disabled item</div><div class="p-menu-sep" data-v-8cbfa422></div><div class="p-menu-item danger" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-8cbfa422></path></svg>Delete chat</div></div></div></div><h3 class="sub" data-v-8cbfa422>SegmentedControl</h3><p data-v-8cbfa422>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: <code data-v-8cbfa422>md</code> (default, settings pages), <code data-v-8cbfa422>sm</code> (compact rows), and <code data-v-8cbfa422>xs</code> (dense menus such as the composer model dropdown — 20px items, 12px labels).</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>SegmentedControl</span></div><div class="stage p col" data-v-8cbfa422><div class="p-seg" data-v-8cbfa422><span class="p-seg-item on" data-v-8cbfa422>Light</span><span class="p-seg-item" data-v-8cbfa422>Dark</span><span class="p-seg-item" data-v-8cbfa422>Follow system</span></div></div></div><h3 class="sub" data-v-8cbfa422>SecondaryModelPicker</h3><p data-v-8cbfa422>Linked model + thinking-effort picker (settings → Agent → Subagents, experimental; <code data-v-8cbfa422>components/settings/SecondaryModelPicker.vue</code>, 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 <code data-v-8cbfa422>model · effort</code>, 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 (<code data-v-8cbfa422>--color-menu-bg</code> / <code data-v-8cbfa422>--p-menu-backdrop</code> / <code data-v-8cbfa422>--shadow-lg</code>). The menu <b data-v-8cbfa422>teleports to <code data-v-8cbfa422><body></code> with <code data-v-8cbfa422>position: fixed</code></b> — it opens on top of the settings modal (on the <code data-v-8cbfa422>--z-modal-dropdown</code> 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 <code data-v-8cbfa422>chevron-right</code> 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 (<code data-v-8cbfa422>segmentsFor</code>): effort models get <code data-v-8cbfa422>off</code> + their declared levels (always-thinking ones get no off), boolean-thinking models get <code data-v-8cbfa422>on</code>/<code data-v-8cbfa422>off</code>, unsupported models get <code data-v-8cbfa422>off</code> 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 <code data-v-8cbfa422>preventDefault</code>s 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 → <code data-v-8cbfa422>dialog</code> menu holding a model <code data-v-8cbfa422>listbox</code> plus the effort <code data-v-8cbfa422>listbox</code> flyout with <code data-v-8cbfa422>option</code> rows. The menu itself flips upward when the trigger sits near the viewport bottom.</p><h3 class="sub" data-v-8cbfa422>Tabs</h3><p data-v-8cbfa422>Tabs with a bottom hairline, used for grouping and switching sibling content. The current tab is marked with accent text + an accent underline.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Tabs</span></div><div class="stage p col" data-v-8cbfa422><div class="p-tabs" data-v-8cbfa422><span class="p-tab on" data-v-8cbfa422>General</span><span class="p-tab" data-v-8cbfa422>Agent</span><span class="p-tab" data-v-8cbfa422>Advanced</span></div></div></div><h3 class="sub" data-v-8cbfa422>Switch</h3><p data-v-8cbfa422>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.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Switch</span></div><div class="stage p" data-v-8cbfa422><span class="p-switch on" data-v-8cbfa422></span><span class="p-switch" data-v-8cbfa422></span></div></div><h3 class="sub" data-v-8cbfa422>Checkbox</h3><p data-v-8cbfa422>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.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Checkbox</span></div><div class="stage p" data-v-8cbfa422><span class="p-check on" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg></span><span class="p-check" data-v-8cbfa422></span><label style="display:inline-flex;align-items:center;gap:8px;color:var(--p-text);font-size:var(--p-font-size-base);cursor:pointer;" data-v-8cbfa422><span class="p-check on" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg></span>Enable auto-save</label></div></div><h3 class="sub" data-v-8cbfa422>Avatar</h3><p data-v-8cbfa422>A 32px default avatar with md radius; <code data-v-8cbfa422>.sm</code> is 24px. Can hold an initial or an icon; falls back to this placeholder when there is no image.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Avatar</span></div><div class="stage p" data-v-8cbfa422><span class="p-avatar" data-v-8cbfa422>K</span><span class="p-avatar" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M4 22a8 8 0 1 1 16 0h-2a6 6 0 0 0-12 0zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6s6 2.685 6 6s-2.685 6-6 6m0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4" data-v-8cbfa422></path></svg></span><span class="p-avatar sm" data-v-8cbfa422>K</span></div></div><h3 class="sub" data-v-8cbfa422>EmptyState</h3><p data-v-8cbfa422>A centered placeholder for empty lists / panels: a 48px faint icon + title + hint, avoiding blank pages.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>EmptyState</span></div><div class="stage p col" data-v-8cbfa422><div class="p-empty" style="width:100%;border:0.5px dashed var(--p-line);border-radius:var(--p-r-lg);" data-v-8cbfa422><svg class="em-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1zm-.692-2H20V5H4v13.385zM8 10h8v2H8z" data-v-8cbfa422></path></svg><div class="em-title" data-v-8cbfa422>No chats yet</div><div class="em-hint" data-v-8cbfa422>Click "New chat" to start a conversation with Kimi</div></div></div></div><h3 class="sub" data-v-8cbfa422>Divider</h3><p data-v-8cbfa422>A 0.5px hairline divider (<code data-v-8cbfa422>--p-line</code>); <code data-v-8cbfa422>.p-divider-v</code> is the vertical divider, used between inline elements.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Divider</span></div><div class="stage p col" data-v-8cbfa422><div style="width:100%;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-8cbfa422>Content above</div><hr class="p-divider" data-v-8cbfa422><div style="width:100%;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-8cbfa422>Content below</div><div style="display:flex;align-items:center;gap:10px;height:24px;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-8cbfa422><span data-v-8cbfa422>kimi-k2</span><span class="p-divider-v" data-v-8cbfa422></span><span data-v-8cbfa422>thinking</span></div></div></div><h3 class="sub" data-v-8cbfa422>Tooltip</h3><p data-v-8cbfa422>A CSS-only hover hint, wrapped in <code data-v-8cbfa422>.p-tip</code>. Inverted background (<code data-v-8cbfa422>--p-text</code> / <code data-v-8cbfa422>--p-bg</code>), single line, no wrapping — carries only short notes.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Tooltip (hover the button)</span></div><div class="stage p" data-v-8cbfa422><span class="p-tip" data-v-8cbfa422><button class="p-icon-btn" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-8cbfa422></path></svg></button><span class="p-tooltip" data-v-8cbfa422>New chat</span></span></div></div><h3 class="sub" data-v-8cbfa422>Banner</h3><p data-v-8cbfa422>An inline notice bar placed at the top of a content area. Three states — <code data-v-8cbfa422>.info</code> / <code data-v-8cbfa422>.warning</code> / <code data-v-8cbfa422>.danger</code> — each with a matching 18px icon.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Banner</span></div><div class="stage p col" data-v-8cbfa422><div class="p-banner info" data-v-8cbfa422><svg class="bn-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><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 16M11 7h2v2h-2zm0 4h2v6h-2z" data-v-8cbfa422></path></svg>Connected to server</div><div class="p-banner warning" data-v-8cbfa422><svg class="bn-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z" data-v-8cbfa422></path></svg>Currently in yolo mode; tool calls will run automatically</div></div></div><h3 class="sub" data-v-8cbfa422>Sheet / BottomSheet</h3><p data-v-8cbfa422>A mobile bottom slide-up panel: xl top radius + drag handle, xl shadow. At ≤640px, dialogs become bottom-anchored Sheets.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>BottomSheet</span></div><div class="stage p col" style="align-items:center;" data-v-8cbfa422><div class="p-sheet" style="width:100%;max-width:360px;" data-v-8cbfa422><div class="p-sheet-handle" data-v-8cbfa422></div><div style="font-size:var(--p-font-size-base);font-weight:700;color:var(--p-text);margin-bottom:8px;" data-v-8cbfa422>Choose a model</div><div class="p-menu-item" style="padding:8px 10px;" data-v-8cbfa422>kimi-k2 · thinking</div><div class="p-menu-item" style="padding:8px 10px;" data-v-8cbfa422>kimi-k2 · instant</div></div></div></div><h3 class="sub" data-v-8cbfa422>Skeleton</h3><p data-v-8cbfa422>A placeholder for loading content, using a breathing opacity animation (no gradients), following the <code data-v-8cbfa422>no-gradient-text</code> rule. Composed into titles / text lines / avatars.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Skeleton</span></div><div class="stage p col" data-v-8cbfa422><div style="display:flex;flex-direction:column;gap:10px;width:100%;max-width:360px;" data-v-8cbfa422><div class="p-skeleton" style="height:16px;width:55%;" data-v-8cbfa422></div><div class="p-skeleton" style="height:12px;width:100%;" data-v-8cbfa422></div><div class="p-skeleton" style="height:12px;width:82%;" data-v-8cbfa422></div><div class="p-skeleton" style="height:32px;width:32px;border-radius:var(--p-r-full);" data-v-8cbfa422></div></div></div></div><h3 class="sub" data-v-8cbfa422>Command Bar</h3><p data-v-8cbfa422>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 <code data-v-8cbfa422>Button primary</code>; the command area uses a mono light-grey background.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Command Bar</span></div><div class="stage p col" data-v-8cbfa422><div class="p-cmdbar" style="max-width:620px;" data-v-8cbfa422><button class="p-btn primary" data-v-8cbfa422>Install Kimi Web ▾</button><span class="p-cmd" data-v-8cbfa422><span class="cmd-text" data-v-8cbfa422>curl -fsSL https://code.kimi.com/install.sh | bash</span><button class="cmd-copy" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z" data-v-8cbfa422></path></svg></button></span></div></div></div><h3 class="sub" data-v-8cbfa422>TopBar</h3><p data-v-8cbfa422>The application top bar. Solid by default; the <code data-v-8cbfa422>.frost</code> variant is translucent + background blur, used <b data-v-8cbfa422>only for sticky navigation bars</b>. Together with the floating menu surfaces (Menu / Dropdown), it is one of the two exceptions to the <code data-v-8cbfa422>no-glassmorphism</code> rule (see §06).</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>TopBar · solid / frosted glass</span></div><div class="stage p col" style="gap:14px;background:radial-gradient(circle at 18% 30%,rgba(23,131,255,.16),transparent 42%),radial-gradient(circle at 82% 75%,rgba(20,23,28,.10),transparent 46%),var(--p-surface-sunken);" data-v-8cbfa422><div class="p-topbar" style="width:100%;max-width:580px;" data-v-8cbfa422><span class="tb-title" data-v-8cbfa422>Solid TopBar</span><span class="tb-actions" data-v-8cbfa422><button class="p-icon-btn sm" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-8cbfa422></path></svg></button></span></div><div class="p-topbar frost" style="width:100%;max-width:580px;" data-v-8cbfa422><span class="tb-title" data-v-8cbfa422>Frosted-glass TopBar · .frost</span><span class="tb-actions" data-v-8cbfa422><button class="p-icon-btn sm" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-8cbfa422></path></svg></button></span></div></div></div><h3 class="sub" data-v-8cbfa422>Find Bar · transcript search</h3><p data-v-8cbfa422>The in-transcript find bar (Cmd/Ctrl+F), implemented by <code data-v-8cbfa422>components/chat/TranscriptSearch.vue</code>. A floating card pinned to the transcript's top-right (<code data-v-8cbfa422>top: --panel-head-h + --space-3</code>, <code data-v-8cbfa422>right: --space-3</code> — equal inset on both axes), <code data-v-8cbfa422>--z-sticky</code>, raised surface + 0.5px hairline + <code data-v-8cbfa422>--shadow-menu</code>. <b data-v-8cbfa422>One radius for both states</b>: <code data-v-8cbfa422>--radius-2xl</code> is a full capsule at the collapsed height and a card once the footer expands — never animate between two radii.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Part</th><th data-v-8cbfa422>Rule</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Input row</td><td data-v-8cbfa422>Search icon (muted) + <b data-v-8cbfa422>bare input</b> — 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 <code data-v-8cbfa422>IconButton sm</code> (concentric with the capsule end); a 0.5px hairline separator before it. Height comes from the grid: 32px control (<code data-v-8cbfa422>--space-8</code>) + 2× <code data-v-8cbfa422>--space-1</code> padding = 40px — at which <code data-v-8cbfa422>--radius-2xl</code> is exactly the half-height capsule.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Footer (results)</td><td data-v-8cbfa422>Expands via the 0fr→1fr grid fold (<code data-v-8cbfa422>--duration-slow</code>), hairline top separator, prev/next <code data-v-8cbfa422>IconButton sm</code> left, right-aligned muted count (<code data-v-8cbfa422>N/M results</code> · <code data-v-8cbfa422>--ui-font-size-sm</code>). Only exists once a query has settled — while typing or empty, the bar stays a bare pill.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>States</td><td data-v-8cbfa422>collapsed (empty query) / searching (<code data-v-8cbfa422>Spinner sm</code> in the input row during the ~800ms debounce) / results / no-results (count reads "No results", nav disabled). Disabled is uniformly <code data-v-8cbfa422>opacity:.5</code>.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Focus</td><td data-v-8cbfa422>Composer-style: a neutral hairline overlay (<code data-v-8cbfa422>::after</code> + <code data-v-8cbfa422>--color-composer-focus-line</code>) fading in on <code data-v-8cbfa422>:focus-within</code>. No accent ring.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Match ink</td><td data-v-8cbfa422>CSS Custom Highlight API — the bar mutates no transcript DOM. All matches: <code data-v-8cbfa422>--color-search-match</code> (yellow); current: <code data-v-8cbfa422>--color-search-match-current</code> + a 2px <code data-v-8cbfa422>--color-warning</code> outline ring (a positioned overlay — highlight pseudos can't paint box outlines). Tokens live in <code data-v-8cbfa422>app-ui/style.css</code> with light/dark pairs.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Keyboard</td><td data-v-8cbfa422>Cmd/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).</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Matching semantics</td><td data-v-8cbfa422>Rendered transcript DOM only (unloaded older pages are out of scope), capped at 1000 matches (count reads <code data-v-8cbfa422>N/1000+</code>). Matches span inline nodes within one block, never cross block breaks; <code data-v-8cbfa422>inert</code> and <code data-v-8cbfa422>display:none</code> content is excluded. Stepping scrolls the match's own rect into view, not its parent element.</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>SectionLabel</h3><p data-v-8cbfa422>A small group title for sidebar lists, used to section the content below (such as <code data-v-8cbfa422>Workspaces</code> in the sidebar). Spec: 13px / 700 / uppercase / letter-spacing <code data-v-8cbfa422>.08em</code>, color <code data-v-8cbfa422>--color-fg-faint</code>; left-aligned to the row's starting padding (<code data-v-8cbfa422>--sb-pad-x</code>), keeping the same indent as the group rows below. For scripts without case (such as Chinese), <code data-v-8cbfa422>text-transform:uppercase</code> simply has no effect — no special handling needed.</p>',55)),t("div",ca,[a[26]||(a[26]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Sidebar · group title")],-1)),t("div",ia,[a[25]||(a[25]=t("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),t("div",na,[(n(),l("svg",la,[...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",ra,[(n(),l("svg",va,[...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",ba,[a[136]||(a[136]=c('<div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>04</span><h2 class="sec-title" data-v-8cbfa422>Chat Interface Overhaul</h2></div><p class="sec-desc" data-v-8cbfa422> The message stream is the core of Kimi Web. Tool calls render as <b data-v-8cbfa422>quiet activity lines</b> — one borderless line per call, bespoke per tool kind, auto-grouped, expanding on demand — while Question / Approval elevate to a <b data-v-8cbfa422>floating neutral surface</b> because they need a decision, and the Swarm composite keeps a card; the Composer collapses into a single rounded container. </p><h3 class="sub" data-v-8cbfa422>Unified message stream</h3><p data-v-8cbfa422>User-message bubbles follow the kimiwork production recipe (<code data-v-8cbfa422>MessageItem .user-bubble</code>): a neutral <code data-v-8cbfa422>--color-user-bubble-bg</code> fill (BubbleGray — <code data-v-8cbfa422>#f5f5f5</code> light / <code data-v-8cbfa422>#292929</code> dark), uniform <code data-v-8cbfa422>--radius-lg</code> corners, no border, no shadow.</p><p data-v-8cbfa422>Message timestamps use 12px UI text at weight 500, matching the compact metadata scale without switching to a monospace face.</p><p data-v-8cbfa422>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.</p><p data-v-8cbfa422>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 <code data-v-8cbfa422>aria-expanded</code> — chat-surface disclosure controls do not use the §03 Button primitive.</p><p data-v-8cbfa422>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.</p><p data-v-8cbfa422>Thinking is an inline, borderless disclosure row in the message stream — never a side panel. The k15 bulb (the <code data-v-8cbfa422>thinking</code> 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 <code data-v-8cbfa422>· Ns</code> (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.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Conversation · 760px reading column</span></div><div class="stage p col" style="align-items:center;background:#fff;" data-v-8cbfa422><div class="demo-chat" data-v-8cbfa422><div class="p-bubble-user" data-v-8cbfa422>Please change the login endpoint to JWT and add the corresponding unit tests.</div><span class="p-thinking" data-v-8cbfa422><span style="font-size:15px;line-height:1;" data-v-8cbfa422>🌔</span>Analyzing the auth module…</span><div class="p-tool-group open" data-v-8cbfa422><div class="p-tool-group-head" data-v-8cbfa422><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tg-title" data-v-8cbfa422>Read 2 files</span><svg class="tg-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg></div><div class="p-tool-row expanded" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>session.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth · :12-45</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>34 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div><div class="p-tool-detail" data-v-8cbfa422><div class="p-code" data-v-8cbfa422>12 export function verify(token: string) {<br data-v-8cbfa422>13 return jwt.verify(token, getSecret());<br data-v-8cbfa422>14 }</div></div><div class="p-tool-row" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>middleware.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>58 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div></div><div class="p-tool-row" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414 1.414l1.414-1.414l-1.414-1.414l-1.414 1.414zM4 21h16v-2H4v2z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Edit</span><span class="tr-file" data-v-8cbfa422>middleware.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-add" data-v-8cbfa422>+12</span><span class="tr-del" data-v-8cbfa422>−4</span><span class="tr-bar" aria-hidden="true" data-v-8cbfa422><span style="flex:12;background:var(--p-success);" data-v-8cbfa422></span><span style="flex:4;background:var(--p-danger);" data-v-8cbfa422></span></span><span class="tr-ok" data-v-8cbfa422>✓</span></div><div class="p-tool-row" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Search</span><span class="tr-mono" data-v-8cbfa422>"jwt.verify"</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>4 results</span><span class="tr-ok" data-v-8cbfa422>✓</span></div><div class="p-msg" data-v-8cbfa422><p data-v-8cbfa422>I looked at the structure of <code data-v-8cbfa422>src/auth</code>; it is currently based on a session cookie. The scope of the change is below — once you confirm, I'll start.</p></div><div class="p-action" data-v-8cbfa422><div class="p-action-head" data-v-8cbfa422><span class="p-action-title" data-v-8cbfa422>A decision needs your confirmation</span></div><div class="p-action-body" data-v-8cbfa422>How long should the JWT expiry be? Default 7 days, refresh token 30 days.</div><div class="p-action-foot" data-v-8cbfa422><button class="p-btn ghost sm" data-v-8cbfa422>Customize</button><button class="p-btn primary sm" data-v-8cbfa422>Use default</button></div></div><div class="p-action" data-v-8cbfa422><div class="p-action-head" data-v-8cbfa422><span class="p-action-title" data-v-8cbfa422>Write permission required</span></div><div class="p-action-body" data-v-8cbfa422>About to modify <code data-v-8cbfa422>src/auth/middleware.ts</code>, 42 lines changed. Allow?</div><div class="p-action-foot" data-v-8cbfa422><button class="p-btn primary sm" data-v-8cbfa422>Allow this time</button><button class="p-btn ghost sm" data-v-8cbfa422>Always allow</button><button class="p-btn ghost sm" data-v-8cbfa422>Deny</button></div></div><div class="p-todo" data-v-8cbfa422><div class="p-todo-row done" data-v-8cbfa422><span class="p-todo-check" data-v-8cbfa422><svg viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg></span>Replace session with JWT signing</div><div class="p-todo-row active" data-v-8cbfa422><span class="p-todo-check" data-v-8cbfa422><svg viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><circle cx="12" cy="12" r="3.5" data-v-8cbfa422></circle></svg></span>Refactor the auth middleware</div><div class="p-todo-row" data-v-8cbfa422><span class="p-todo-check" data-v-8cbfa422><svg viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><circle cx="12" cy="12" r="3.5" data-v-8cbfa422></circle></svg></span>Add unit tests</div></div></div></div></div><p data-v-8cbfa422><b data-v-8cbfa422>Wide markdown tables (desktop):</b> regular chat prose stays within the 760px reading column (<code data-v-8cbfa422>--p-content-max</code>), 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 (<code data-v-8cbfa422>--p-table-max</code>), 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 (<code data-v-8cbfa422>--p-table-cell-max</code>), 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.</p><h3 class="sub" data-v-8cbfa422>Tool calls: quiet activity lines, bespoke per tool</h3><p data-v-8cbfa422>High-frequency calls like <code data-v-8cbfa422>read</code> / <code data-v-8cbfa422>bash</code> / <code data-v-8cbfa422>grep</code> are "operational noise" — boxed, collapsible cards quickly drown out the conversation. Tool calls therefore render as <b data-v-8cbfa422>one quiet borderless line</b> 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:</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Three visual-weight tiers</span></div><div class="stage p col" data-v-8cbfa422><span class="stage-label" data-v-8cbfa422>① Tool line · lightest (default) — bespoke content per tool, no card chrome</span><div class="p-tool-row" style="align-self:stretch;" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm3 3h5v2H7V8zm0 4h8v2H7v-2z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Run</span><span class="tr-mono" data-v-8cbfa422>pnpm run build && pnpm lint</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>0.8s</span><span class="tr-ok" data-v-8cbfa422>✓</span></div><span class="stage-label" data-v-8cbfa422>② Activity run · medium (consecutive quiet activity — thinking + tool lines — folds to one smart-summary row)</span><div class="p-tool-group" data-v-8cbfa422><div class="p-tool-group-head" data-v-8cbfa422><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tg-title" data-v-8cbfa422>Read 3 files</span><svg class="tg-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg></div></div><span class="stage-label" data-v-8cbfa422>③ Sub Agent identity card · one per delegation — task title + agent type; the whole card opens the side panel (no in-stream expansion, never grouped)</span><div class="p-agent-card" data-v-8cbfa422><span class="pa-ic" data-v-8cbfa422><svg viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M13.5 2c0 .444-.193.843-.5 1.118V5h5a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h5V3.118A1.5 1.5 0 1 1 13.5 2M6 7a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1zm-4 3H0v6h2zm20 0h2v6h-2zM9 14.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m6 0a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3" data-v-8cbfa422></path></svg></span><span class="pa-main" data-v-8cbfa422><span class="pa-task" data-v-8cbfa422>分析双引擎架构</span><span class="pa-type" data-v-8cbfa422>Explore</span></span><span class="pa-ok" data-v-8cbfa422>✓</span><span class="pa-go" data-v-8cbfa422>→</span></div><span class="stage-label" data-v-8cbfa422>④ Decision card · heavy (only question / approval, needs user input)</span><div class="p-action" data-v-8cbfa422><div class="p-action-head" data-v-8cbfa422><span class="p-action-title" data-v-8cbfa422>Write permission required</span></div><div class="p-action-body" data-v-8cbfa422>About to modify <code data-v-8cbfa422>src/auth/middleware.ts</code>, 42 lines changed.</div></div></div></div><ul class="clean check" data-v-8cbfa422><li data-v-8cbfa422>A tool call renders as <b data-v-8cbfa422>one quiet borderless line</b> (~24px, the thinking row's rhythm): leading glyph, tool-specific content, trailing meta + status. There is no card chrome and no hover wash — the chevron hugging the line's text (thinking-row style, never pushed to the far edge) is the only disclosure affordance, a real <code data-v-8cbfa422><button></code> carrying <code data-v-8cbfa422>aria-expanded</code> (keyboard path); the head itself is a plain click target (mouse path), so trailing slots may hold genuine buttons of their own (e.g. Agent's "open detail").</li><li data-v-8cbfa422><b data-v-8cbfa422>One type scale for the whole stream</b>: thinking rows, fold summary rows and tool lines all set 13px UI text; in-line mono and trailing meta run one step down at 12px (a monospace x-height reads larger, so 12px sits level next to 13px). Hierarchy comes from colour, never from size jumps or bold — everything on the line is regular weight: the only dark object is the file-name button (<code data-v-8cbfa422>--color-text</code> — the one interactive place to go); the action label (Run / Read / Edit…), the mono command / pattern and secondary context all sit at <code data-v-8cbfa422>--color-text-muted</code>; auxiliary elements (glyphs, chevrons, trailing meta) stay <code data-v-8cbfa422>--color-text-faint</code>. The stream thus reads in three quiet tiers: prose in text, tool lines in muted, thinking / captions in faint. Line content is centre-aligned so mono-only rows (Bash) sit level with the icon and chevron. Truncating line content (the CSS-ellipsis spans) sets <code data-v-8cbfa422>--leading-tight</code> rather than the row's <code data-v-8cbfa422>line-height: 1</code> — a 1em line box is shorter than the font's ascent + descent, so <code data-v-8cbfa422>overflow: hidden</code> would clip descenders (j / p / g / y); mono runs take the font's own <code data-v-8cbfa422>normal</code> leading instead, since JetBrains Mono's ≈1.32em metrics exceed <code data-v-8cbfa422>--leading-tight</code>. The 16px chevron still drives the ~24px row height.</li><li data-v-8cbfa422><b data-v-8cbfa422>Every tool kind composes its own line, leading with the tool's localized action label</b> (Run / Read / Edit / Write / Search / Find / Fetch…): Bash pairs its label with the full command in mono (CSS-truncated) plus a duration chip; Read / Edit / Write follow the label with the file name as a real button (opens the file preview) followed by the directory, a <code data-v-8cbfa422>:line-range</code> or a <code data-v-8cbfa422>+N −M</code> stat with a mini segmented bar; Grep shows the pattern in mono plus a match count; Glob / Ls list paths; Todo carries the active task with a done/total progress bar; goal tools show a coloured status pill; ExitPlanMode expands into a read-only plan receipt with its persisted review outcome. Unrecognized tools fall back to glyph + localized label + argument summary.</li><li data-v-8cbfa422><b data-v-8cbfa422>The settled question is the one exception to the quiet line</b>: once AskUserQuestion settles with a recognized answer, it becomes a small <b data-v-8cbfa422>receipt card</b> — the question card's echo (raised surface, hairline edge, lg radius, <code data-v-8cbfa422>--shadow-xs</code>, flush with the stream's left edge, ≤560px). The card echoes only the picks, checked with the live QuestionCard's CSS glyph language one step down (14px); passed-over options are not echoed. Dismissed (or zero-answer) collapses to a slim italic one-line card; while running, and for unrecognized output (background launch / error), it stays the plain quiet disclosure line with the raw output.</li><li data-v-8cbfa422>Clicking a line <b data-v-8cbfa422>expands it in place</b>; the detail hangs below at the line's own left edge (no inset), so it reads as part of the stream rather than as a separate card. Details are one of: the mono output panel (content-well surface, hairline edge, 12-line scroll cap), the inline diff, or clickable match / file lists (<code data-v-8cbfa422>path:line</code> opens the preview at that line). Code-bearing details — the Read content, the Edit diff, the Write content — are <b data-v-8cbfa422>syntax-highlighted by file type</b> (github-light / github-dark, following the colour scheme), with the Read output's real line numbers as the gutter; highlighting mounts lazily on first expand and degrades to plain text for unknown languages or oversized content.</li><li data-v-8cbfa422>Rows sit <b data-v-8cbfa422>flush with the message stream's left edge</b> (same alignment as prose and the thinking row): no inset, no hover wash, and the glyph rides the thinking row's 4px icon-to-text rhythm with no padded slot. Expanded rows inside a group stack directly on the shared rhythm — no dividers.</li><li data-v-8cbfa422>Consecutive activity — thinking segments and tool calls of ANY kind, quiet lines and richer cards alike — <b data-v-8cbfa422>folds into ONE activity-run row</b>: a smart summary sentence that aggregates the run per tool kind in first-appearance order (<code data-v-8cbfa422>Read 2 files · Ran 5 commands (1 failed) · 26s</code>), the failure clause hanging on its kind in danger red, the total span faint at the tail — one line, ellipsis-truncated, the full sentence in the title tooltip. Thinking items fold into the run but are not narrated in the sentence. The row shares the thinking row's language (borderless faint text row, text-colour hover only, one whole-row button with a rotating chevron) but rides a roomier 8px vertical padding — 30px against the quiet lines' 22px, so the turn-level summary keeps its presence between prose paragraphs; while the turn streams through the run the row stays expanded and the summary turns live (current action + cumulative per-kind stats + ticking whole seconds), and once every item settles it folds itself back — even if the user expanded it mid-run (the thinking block's vocabulary); a settled → running transition (the stream appending to the same run) reopens it. The glyph carries the state: the current step's own icon breathing while running, green ✓ / red ✕ once settled. A run needs <b data-v-8cbfa422>≥ 2 steps</b> — a lone step renders standalone as the block it always was. <b data-v-8cbfa422>Text never folds</b> (it breaks the run), and neither do successful media tools (no card — inline media is the turn's output); everything else folds, cards included: Todo / Goal progress narration, the sub-agent identity card, Question / Swarm cards and unrecognized kinds (skills, MCP tools) all join the run — the stay-expanded-while-live rule keeps a card visible exactly while it is active. The expanded run is the items flat in order (thinking rows + tool rows), each with its own in-row details intact — the lines keep their own 4px row rhythm but breathe 8px apart, with a small inset below the head.</li><li data-v-8cbfa422><b data-v-8cbfa422>Above the activity run sits the turn fold</b> (<code data-v-8cbfa422>TurnFold.vue</code>): when an assistant turn settles, every block before the LAST text block — thinking segments, activity runs, interim text paragraphs, Todo / Goal / sub-agent cards — folds into a single bare row reading <code data-v-8cbfa422>Worked 4m57s</code> (whole seconds, no glyph, no summary sentence), expanding into the folded blocks in order, each with its own rendering intact. The span is the turn's ELAPSED time (<code data-v-8cbfa422>turnWorkMs</code>): it ticks from the stamped start while the turn is open — approval/question waits included by design, so no park bookkeeping exists — then reads the daemon's own <code data-v-8cbfa422>durationMs</code> once settled (the server message stamps for history turns); the wall clock only feeds the live tick, so throttled tabs, session switches and remounts cannot corrupt the settled value. Without any stamp the row falls back to the generic <code data-v-8cbfa422>Work details</code>. Streaming turns show no row and a forced-open body — the live transcript is untouched, the fold lands only when the stream moves past the turn (or the turn parks). The split never hides the turn's output: the final text block and any trailing blocks (inline media, standalone cards) stay visible, and a text-only turn folds nothing. Fold state is a plain component ref — nothing persists, switching sessions resets to folded. Inside the right-side sub-agent transcript, disclosure bodies open instantly while their chevrons retain the standard rotation: animating the height of a full historical stream would relayout the entire panel on every animation frame.</li><li data-v-8cbfa422><b data-v-8cbfa422>A sub-agent delegation is an identity card</b> — never a quiet line: the card carries the TASK as its title and the agent type as a quiet meta line, while the orchestrator's full prompt stays out of the stream on purpose. The whole card is one action (the quiet shell vocabulary: raised surface, hairline edge, large radius, no shadow): click to open the subagent's live progress in the side panel — there is no in-stream expansion.</li><li data-v-8cbfa422>Status keeps the shared vocabulary: running (pulsing accent dot) / done (green ✓) / failed (red ✗), at the line's right edge. <b data-v-8cbfa422>Only two types keep a full card</b>: <code data-v-8cbfa422>Question</code> and <code data-v-8cbfa422>Approval</code> — they genuinely need the user's attention. The Swarm composite keeps one quiet card (raised surface, 0.5px hairline, large radius) for its phase overview + member accordion.</li><li data-v-8cbfa422><b data-v-8cbfa422>A task notification is a status card, not a quiet line</b> (<code data-v-8cbfa422>NotificationCard.vue</code>): the hidden <code data-v-8cbfa422><notification></code> injections (background-task / sub-agent settlement) render where they landed in the turn — a 28px status chip + title/sub head tinted with the toast status token pairs (completed → success, failed / timed_out / lost → danger, killed → warning, else neutral surface), expanding in place to the fields, the body, an output-file row (copy path) and the raw payload. ≥2 CONSECUTIVE notifications merge into one neutral group card (count + per-item status dots + compact rows, each expanding on its own). Notifications break the activity run but are never turn boundaries, and they <b data-v-8cbfa422>never fold</b> — a notification is an event worth noticing, not process noise, so it punches out of the turn fold and renders right after the fold row, in order.</li><li data-v-8cbfa422><b data-v-8cbfa422>A turn that dies on a model-request failure leaves a persistent terminal card</b> at the transcript tail (ChatPane's <code data-v-8cbfa422>.turn-failed</code>): the notification card's danger shell (danger-soft surface, danger hairline, 24px status chip with the warning glyph) carrying a title keyed by the wire error kind (model failure vs step-limit stop), the provider message as a muted sub, a mono diagnostics meta (code · HTTP status · request id), and exactly ONE secondary sm action — Continue, which submits a short continue prompt through the normal path. It renders only while the session sits idle on <code data-v-8cbfa422>lastTurnReason === 'failed'</code> (a turn with zero assistant output included, so it pins to the tail rather than any assistant row), it is not dismissible, and it vanishes the moment a new turn starts. While the turn is still fighting, the working indicator instead narrates the retry backoff ("retrying n/max" from the live <code data-v-8cbfa422>agent.status.updated</code> phase) — a retrying turn never shows the card. The transient error toast now fires only for background sessions; the viewed session's failure is fully covered by the card.</li><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Turn failed card · persistent terminal marker + one resume action</span></div><div class="stage p col" data-v-8cbfa422><div class="p-turn-failed" data-v-8cbfa422><span class="tf-chip" data-v-8cbfa422><svg viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><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" data-v-8cbfa422></path><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" data-v-8cbfa422></path><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" data-v-8cbfa422></path></svg></span><div class="tf-main" data-v-8cbfa422><span class="tf-title" data-v-8cbfa422>模型请求失败,本轮对话已中断</span><span class="tf-sub" data-v-8cbfa422>429 The engine is currently overloaded, please try again later</span><span class="tf-meta" data-v-8cbfa422>provider.rate_limit · HTTP 429 · req_01KZ8Y…</span></div><button class="p-btn secondary sm" data-v-8cbfa422>继续</button></div></div></div><li data-v-8cbfa422><b data-v-8cbfa422>A goal-continuation turn carries a provenance row</b>: the hidden <code data-v-8cbfa422>goal_continuation</code> trigger (goal mode's self-driven next turn — a turn boundary, unlike task notifications) never renders its machine prompt; instead the assistant turn it opens shows one faint 12px line flush with the stream's left edge — the <code data-v-8cbfa422>target</code> glyph shared with the Goal tool (this turn belongs to the goal) + a localized label — ABOVE the turn's content and OUTSIDE the turn fold, so the row survives as the turn's provenance after settling. The marker lands with the trigger (before the first assistant block), and while the newest exchange is a goal-continuation turn the undo affordances (edit-and-resend, Esc undo) are suppressed — rewinding would drop the hidden trigger while refilling the older user text.</li><li data-v-8cbfa422><b data-v-8cbfa422>A settled turn's file changes are one summary card</b> (<code data-v-8cbfa422>TurnFilesSummary.vue</code>): between the turn's final text and its footer, a §03 <code data-v-8cbfa422>Card</code> (hairline border, no shadow — NOT the quiet tool line, the artifacts are worth a discrete object) lists every file the turn's Edit / Write calls touched. The head reads "N files changed" with the aggregate <code data-v-8cbfa422>+A −D</code> and the mini diffbar; the aggregate hides whenever any row's stats are incomplete (a Write or an underivable edit makes the total a lower bound, never presented as exact). Each row is one clickable workspace-relative path (short and self-locating; a file outside the cwd stays absolute) with its per-file <code data-v-8cbfa422>+A −D</code> at the right edge. The row's action keys on the tool kind, and the stats tell it apart: a <b data-v-8cbfa422>Write</b> has no per-file count (its diff is underivable) and opens the whole file in the preview; an <b data-v-8cbfa422>Edit / MultiEdit</b> carries its <code data-v-8cbfa422>+A −D</code> and opens that file's <b data-v-8cbfa422>turn diff</b> in the right-side detail layer (<code data-v-8cbfa422>TurnDiffPanel.vue</code> — the turn's own X→Y change, not the git diff), whose header keeps an open-file action. The first three files show inline; the rest collapse behind a "N more files" ghost-button row in the card's foot. Where nothing handles the row action (the BTW side chat), the card renders its file rows as plain text instead of links.</li></ul>',15)),t("div",fa,[a[31]||(a[31]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Turn files summary · a real TurnFilesSummary (fixed sample)")],-1)),t("div",pa,[t("div",ha,[s(M,{changes:S,cwd:Vt,onOpenDiff:u,onOpenFile:u})])])]),a[137]||(a[137]=c('<div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Tool Call · quiet lines (expand on demand)</span></div><div class="stage p" data-v-8cbfa422><div class="p-tool-group open" data-v-8cbfa422><div class="p-tool-group-head" data-v-8cbfa422><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tg-title" data-v-8cbfa422>Read 2 files</span></div><div class="p-tool-row expanded" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>session.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth · :12-45</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>34 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div><div class="p-tool-detail" data-v-8cbfa422><div class="p-code" style="font-size:11px;padding:7px 9px;" data-v-8cbfa422>12 export function verify(…</div></div><div class="p-tool-row" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>middleware.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>58 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div></div><div class="p-tool-row" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414 1.414l1.414-1.414l-1.414-1.414l-1.414 1.414zM4 21h16v-2H4v2z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Edit</span><span class="tr-file" data-v-8cbfa422>middleware.ts</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-add" data-v-8cbfa422>+12</span><span class="tr-del" data-v-8cbfa422>−4</span><span class="tr-bar" aria-hidden="true" data-v-8cbfa422><span style="flex:12;background:var(--p-success);" data-v-8cbfa422></span><span style="flex:4;background:var(--p-danger);" data-v-8cbfa422></span></span><span class="tr-ok" data-v-8cbfa422>✓</span></div></div></div><h3 class="sub" data-v-8cbfa422>Decision cards · Question / Approval</h3><p data-v-8cbfa422>The two attention cards replace the composer in the dock and share one contract: a floating neutral shell (<code data-v-8cbfa422>--color-surface-raised</code> + hairline + <code data-v-8cbfa422>--radius-lg</code> + <code data-v-8cbfa422>--shadow-menu</code>), 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.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Plan review · pinned option rows, second-line descriptions</span></div><div class="stage p col" data-v-8cbfa422><div class="p-action" style="max-width:520px;" data-v-8cbfa422><div class="p-action-head" data-v-8cbfa422><span class="p-action-title" data-v-8cbfa422>按这份 plan 开始实现?</span></div><div class="p-action-body" data-v-8cbfa422>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.</div><div class="p-opts" data-v-8cbfa422><div class="p-opt" data-v-8cbfa422><span class="n" data-v-8cbfa422>1</span><span class="p-opt-text" data-v-8cbfa422><span class="l" data-v-8cbfa422>方案 A:静态徽章</span><span class="d" data-v-8cbfa422>零依赖、渲染稳定,升级时需手动同步版本号。</span></span></div><div class="p-opt" data-v-8cbfa422><span class="n" data-v-8cbfa422>2</span><span class="p-opt-text" data-v-8cbfa422><span class="l" data-v-8cbfa422>方案 B:动态徽章</span><span class="d" data-v-8cbfa422>版本自动同步免维护,但要求仓库公开可访问。</span></span></div></div><div class="p-action-foot" data-v-8cbfa422><button class="p-btn ghost sm" data-v-8cbfa422>修改</button><button class="p-btn ghost sm" data-v-8cbfa422>拒绝并退出</button></div></div></div></div><ul class="clean check" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>Footer contract</b>: actions are left-aligned in number-key order (1·2·3·4), each carrying a number chip — sized by <code data-v-8cbfa422>--p-chip-num</code> over <code data-v-8cbfa422>--color-inline-code-bg</code>, the same chip vocabulary as option rows and the multi-step chip; exactly one <code data-v-8cbfa422>primary</code> action, the rest are <code data-v-8cbfa422>ghost</code>. Feedback mode swaps the whole footer for submit / cancel.</li><li data-v-8cbfa422><b data-v-8cbfa422>Body by kind</b>: Write approvals preview the incoming content with <code data-v-8cbfa422>HighlightedCode</code> (syntax-highlighted, 24-row cap with scroll); Edit approvals render the before/after hunk as a highlighted line diff. Plan / diff / file kinds get a head expand toggle that lifts the cap so the block fills the card; the card itself never exceeds the pane (only the scroll area shrinks) — with the dock work pills visible, the dock takes over the same height budget as a flex column, so an expanded card yields the pills' height instead of pushing them past the pane's top edge. Once the plan scrolls, a soft shadow fades in at the scroll area's top edge — the sidebar's scroll-linked seam language, so clipped content reads as passing under the card chrome.</li><li data-v-8cbfa422><b data-v-8cbfa422>Danger hint</b>: destructive shell commands (rm -rf, sudo, force-push…) show a <code data-v-8cbfa422>danger-soft</code> filled hint row under the command — detection is a display-layer heuristic on the client.</li><li data-v-8cbfa422><b data-v-8cbfa422>Minimized</b>: the card collapses to a thin bar with a mono peek of the subject; the whole bar is the expand click target.</li><li data-v-8cbfa422><b data-v-8cbfa422>Question card</b>: the title is the question itself (2-line clamp), with a step chip for multi-question flows and a × dismiss button. Options use CSS radio/checkbox glyphs (accent when selected); the number chip and glyph top-align with the option text, optically centred on the label's first line. The footer follows the same left-aligned action contract (primary first, ghosts after), with the keyboard hint pinned to the right edge; keyboard: ↑↓ moves (Space toggles in multi), digits pick, Enter advances/submits, Esc dismisses.</li></ul><h3 class="sub" data-v-8cbfa422>Composer</h3><p data-v-8cbfa422>Unified into a single raised container: <code data-v-8cbfa422>--radius-composer</code> (32px) with <code data-v-8cbfa422>--corner-shape-composer: superellipse(1.5)</code> and a stable 0.5px edge. Focus crossfades a low-chroma line-and-accent edge over <code data-v-8cbfa422>--duration-slow</code> with <code data-v-8cbfa422>--ease-in-out</code>, while the neutral shadow stays unchanged — there is no added halo and no layout shift. The composer input (a ProseMirror contenteditable on desktop, a textarea on the web during the migration) uses <code data-v-8cbfa422>text-autospace: normal</code> 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 (<code data-v-8cbfa422>--composer-send-icon-size</code>, the production kimi.com size; it sits outside the <code data-v-8cbfa422>--p-ic-*</code> scale on purpose).</p><p data-v-8cbfa422><b data-v-8cbfa422>Fill and edge tokens</b>: the card's fill and rest border are their own tokens — <code data-v-8cbfa422>--color-composer-bg</code> and <code data-v-8cbfa422>--color-composer-line</code> — running the kimiwork / kimi.com production input recipe (<code data-v-8cbfa422>.chat-input__shell</code>): fill = <code data-v-8cbfa422>groupedBackground.secondary</code> (#ffffff light / #1f1f1f dark), rest border = <code data-v-8cbfa422>separator.s1</code> (13% black / 12% white), focus line = <code data-v-8cbfa422>fills.f4</code> (25% in both schemes), and <code data-v-8cbfa422>--shadow-input</code> = <code data-v-8cbfa422>effect.shadow.inputDefault</code> (<code data-v-8cbfa422>0 5px 16px -4px rgba(0,0,0,0.07)</code>, 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.</p><p data-v-8cbfa422><b data-v-8cbfa422>Send button tokens</b>: the send circle runs on <code data-v-8cbfa422>--color-send-bg</code> / <code data-v-8cbfa422>--color-send-bg-hover</code> / <code data-v-8cbfa422>--color-send-icon</code> (+ <code data-v-8cbfa422>*-disabled</code>, <code data-v-8cbfa422>--opacity-send-disabled</code>, <code data-v-8cbfa422>--shadow-send[-hover]</code>), following the production recipe (<code data-v-8cbfa422>.chat-input__send</code>): a neutral <code data-v-8cbfa422>labels.primary</code> fill (90% black light / 84% white dark, hover #252525 / 84.8%) with the production lift shadow (<code data-v-8cbfa422>0 7px 16px -13px 38% + 0 1px 2px 7%</code>, one step larger on hover), a <code data-v-8cbfa422>groupedBackground.secondary</code> glyph, and a disabled state of the same vocabulary — <code data-v-8cbfa422>fills.f2</code> fill with a <code data-v-8cbfa422>labels.quaternary</code> 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.</p><p data-v-8cbfa422><b data-v-8cbfa422>Layering, anchors, and motion</b>: the dock normally stays at <code data-v-8cbfa422>--z-sticky</code> so the Latest Messages pill can remain visible above its veil. While any Composer popup or work panel is open, the dock temporarily joins <code data-v-8cbfa422>--z-dropdown</code>, ensuring permission, work-mode, and model menus — and the work panel — 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 <code data-v-8cbfa422>--shadow-menu</code> and the same trigger-corner pop motion as Session Row menus: 0.97 scale with a 2px shift toward the trigger, <code data-v-8cbfa422>--duration-base</code> on entry, and <code data-v-8cbfa422>--duration-fast</code> on exit.</p><p data-v-8cbfa422><b data-v-8cbfa422>Attachment strip</b>: attachments hang inside the composer card above the input as two grouped rows — images/videos as shared <code data-v-8cbfa422>MediaThumb</code> rounded thumbnails, files as the shared <code data-v-8cbfa422>AttachmentChip</code> 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 <code data-v-8cbfa422>MediaLightbox</code> preview, which owns Escape via the shared dialog stack: images go through PhotoSwipe (<code data-v-8cbfa422>@moonshot-ai/app-client</code>'s <code data-v-8cbfa422>lib/mediaPreview</code>) and zoom out of the clicked thumbnail (scrim = <code data-v-8cbfa422>--color-scrim-strong</code>, caption = <code data-v-8cbfa422>--color-text-on-scrim</code>; the slide area is inset — 24px sides matching the video modal, 56px top/bottom clearing the close button and caption — so a viewport-filling image never kisses the edges), videos keep the custom modal. Both share the <code data-v-8cbfa422>--color-scrim-strong</code> backdrop and the same close button — the raised 36px circle (<code data-v-8cbfa422>.media-lightbox-close</code>) fixed at the viewport's top-right, rendered by <code data-v-8cbfa422>MediaLightbox</code> for both (PhotoSwipe's own top bar is disabled; zoom stays on wheel / pinch / image click). ReadMedia tool cards open it too (an App-level instance fed by the <code data-v-8cbfa422>openMedia</code> chain): the image zooms out of the card's thumbnail, and videos show as a static play tile that opens the modal player — no more right-side-panel detour or inline <code data-v-8cbfa422><video></code>.</p>',11)),t("div",ua,[a[38]||(a[38]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Composer")],-1)),t("div",ga,[t("div",ma,[a[36]||(a[36]=t("div",{class:"p-composer-ta ph"},"Message Kimi, / to run a command, @ to reference a file…",-1)),t("div",wa,[t("div",ya,[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",ka,[s(d(o),{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]=c('<div class="p-composer-right" data-v-8cbfa422><span class="p-pill" data-v-8cbfa422><span class="pp-strong" data-v-8cbfa422>kimi-k2</span><span class="pp-sub" data-v-8cbfa422>· thinking</span><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-8cbfa422></path></svg></span><button class="p-send" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M13 7.828V20h-2V7.828l-5.364 5.364l-1.414-1.414L12 4l7.778 7.778l-1.414 1.414z" data-v-8cbfa422></path></svg></button></div>',1))])]),a[37]||(a[37]=c('<div class="p-composer-strip" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M4 5a1 1 0 0 1 1-1h5l2 2h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5z" data-v-8cbfa422></path></svg>kimi-code-web<svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-8cbfa422></path></svg></div>',1))])]),a[138]||(a[138]=c('<div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>Site-wide consistency</b>: the composer uses one 32px superellipse shell and one 32px desktop control height. The add (+), permission, 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 <code data-v-8cbfa422>--color-text</code> fill with a <code data-v-8cbfa422>--color-bg</code> 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 <code data-v-8cbfa422>hand</code>, yolo <code data-v-8cbfa422>shield-question</code>, auto <code data-v-8cbfa422>full-access</code> — 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 work pills and panels — pill vocabulary, panel shell and motion, the two-tone head, per-kind bodies, filtering, and the open/cancel model — are specified in <b data-v-8cbfa422>Dock · work pills & panels</b> below. </div></div><p data-v-8cbfa422><b data-v-8cbfa422>Workspace attachment card</b>: on the empty session, the workspace picker is a <b data-v-8cbfa422>separate attachment card</b> tucked under the composer — and the composer card itself stays complete (its own 0.5px border, <code data-v-8cbfa422>--radius-composer</code> corners with <code data-v-8cbfa422>--corner-shape-composer</code>, 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 <code data-v-8cbfa422>--space-4</code> slides behind the card (the card is raised to <code data-v-8cbfa422>--z-sticky</code>), its square top edge stays hidden, and only the rounded bottom (<code data-v-8cbfa422>0 0 --radius-xl --radius-xl</code>) shows. Background <code data-v-8cbfa422>--color-hover</code> at 60% via <code data-v-8cbfa422>color-mix</code> (≈0.03 black in light, self-adapting in dark), no border, no shadow. Inside sits one quiet capsule trigger: transparent, <code data-v-8cbfa422>--radius-full</code>, 16px leading icon and 12px label at weight 475 in <code data-v-8cbfa422>--color-text-muted</code>; hover deepens to <code data-v-8cbfa422>--color-selected</code> and the label turns <code data-v-8cbfa422>--color-text</code>. The dropdown follows the §03 menu spec and is viewport-aware (flips above when more room, clamps max-height to the scrollport); at <code data-v-8cbfa422>--z-dropdown</code> it outranks both the card and the fixed click-outside backdrop (<code data-v-8cbfa422>--z-sticky</code>), which renders outside the composer because the card's <code data-v-8cbfa422>container-type</code> captures <code data-v-8cbfa422>position: fixed</code> descendants.</p><h3 class="sub" data-v-8cbfa422>Autocomplete menus</h3><p data-v-8cbfa422>The slash, mention, and add popups share one geometry, all on dedicated tokens: the <code data-v-8cbfa422>--color-menu-bg-frost</code> surface (the frostier recipe), frame padding <code data-v-8cbfa422>--menu-row-hug</code>, rows at <code data-v-8cbfa422>--menu-row-padding-block</code> × <code data-v-8cbfa422>--menu-row-padding-inline</code> with <code data-v-8cbfa422>--radius-menu-row</code> caps on the <code data-v-8cbfa422>--corner-shape-menu</code> curve, an icon-to-label gap of <code data-v-8cbfa422>--menu-row-gap-icon</code>, and a <code data-v-8cbfa422>--menu-rows-seam</code> between stacked rows. Touch rows pad to <code data-v-8cbfa422>--menu-row-touch-padding-block</code> with a hard floor of <code data-v-8cbfa422>--touch-target-min</code>. Scroll height caps at <code data-v-8cbfa422>--p-slash-menu-h</code> / <code data-v-8cbfa422>--p-mention-menu-h</code> / <code data-v-8cbfa422>--p-add-menu-h</code>; the scroll-edge fade is <code data-v-8cbfa422>--menu-scroll-fade</code>, and the overlay thumb rides <code data-v-8cbfa422>--menu-scrollbar-width</code> / <code data-v-8cbfa422>--menu-scrollbar-edge</code> / <code data-v-8cbfa422>--menu-scrollbar-track-inset</code> / <code data-v-8cbfa422>--menu-scrollbar-thumb-min</code> in <code data-v-8cbfa422>--color-menu-scrollbar</code> (hover <code data-v-8cbfa422>--color-menu-scrollbar-hover</code>) — 3px visually, with a wider invisible drag strip.</p><h3 class="sub" data-v-8cbfa422>Add menu</h3><p data-v-8cbfa422>The composer's <b data-v-8cbfa422>+ button</b> opens the add menu — the autocomplete family's action-list member: one column of icon + label (+ muted description) rows (Files, Goal, Plan, Swarm) on the same frost surface and row geometry as the slash/mention popups, capped at <code data-v-8cbfa422>--p-add-menu-h</code>. Semantically it is an action menu, not an autocomplete listbox: rows are <code data-v-8cbfa422>menuitem</code> commands, DOM focus moves into the menu (arrows navigate, Enter activates, Escape closes), and the + button carries <code data-v-8cbfa422>aria-haspopup="menu"</code> — the textarea's combobox ARIA never points at it.</p><p data-v-8cbfa422><b data-v-8cbfa422>Design decision: deliberately NOT the §03 Menu/MenuItem primitives.</b> Those are the trigger-dropdown family (sidebar, user menu, session rows) — <code data-v-8cbfa422>--color-menu-bg</code>, <code data-v-8cbfa422>--radius-lg</code>, a min-width box. The add menu instead shares the composer menus' material (the frostier surface, the composer corner curve, rows hugging the frame at the composer's text column, muted description sub-lines). Bending MenuItem into that material would require exactly the per-screen appearance overrides the primitive contract forbids, so the add menu keeps bespoke rows built directly on the shared <code data-v-8cbfa422>--menu-row-*</code> tokens. This paragraph is the canonical record of that choice — reviews should not re-litigate it.</p>',7)),t("div",xa,[a[46]||(a[46]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Add menu — family surface, icon + label + desc rows, keyboard focus wash")],-1)),t("div",Ca,[t("div",Sa,[t("span",za,[s(d(o),{name:"attachment",size:"sm"}),a[39]||(a[39]=t("span",{class:"n"},"Files",-1))]),t("span",Ta,[s(d(o),{name:"target",size:"sm"}),a[40]||(a[40]=t("span",{class:"n"},"Goal",-1)),a[41]||(a[41]=t("span",{class:"d"},"Set a goal to keep pursuing",-1))]),t("span",qa,[s(d(o),{name:"file-edit",size:"sm"}),a[42]||(a[42]=t("span",{class:"n"},"Plan",-1)),a[43]||(a[43]=t("span",{class:"d"},"Turn plan mode on",-1))]),t("span",Ba,[s(d(o),{name:"sparkles",size:"sm"}),a[44]||(a[44]=t("span",{class:"n"},"Swarm",-1)),a[45]||(a[45]=t("span",{class:"d"},"Turn swarm mode on",-1))])])])]),a[139]||(a[139]=c('<h3 class="sub" data-v-8cbfa422>Work modes</h3><p data-v-8cbfa422><b data-v-8cbfa422>Plan and Goal are the primary work modes — mutually exclusive, at most one armed at a time.</b> Arming happens only through the slash commands (<code data-v-8cbfa422>/plan</code>, <code data-v-8cbfa422>/goal</code>) or the add menu; an armed mode renders as the input row's leading pill — a neutral <code data-v-8cbfa422>--color-surface</code> chip with the mode's 14px icon, its label, and a × that disarms. The × is an IconButton sized <code data-v-8cbfa422>--wm-x-size</code> (below the sm default, so its hover wash never outgrows the pill's rounded end) with a <code data-v-8cbfa422>--wm-x-ring</code> hit reserve that stays inside the textarea's indent; on touch it meets <code data-v-8cbfa422>--touch-target-min</code>. The input's first-line text indent reserves exactly the pill's width (the desktop ProseMirror editor applies it to the first paragraph), so the caret and placeholder slide right rather than colliding; arming Goal also swaps the placeholder to its objective prompt. Sending with Goal armed creates the goal and the pill hands off to the dock's goal pill; a live goal does NOT lock the primary modes — <code data-v-8cbfa422>/goal</code> then just focuses the goal's panel, and <code data-v-8cbfa422>/plan</code> still arms (the only hard rule: one message cannot both create a goal and enter plan — the goal write carries the plan disarm atomically — and a failed mode write is treated as a send failure: the optimistic message rolls back, the error toasts). Swarm is deliberately NOT a mode: an orthogonal toolbar chip with its own enable confirmation, disarmed from the chip's ×.</p><h3 class="sub" data-v-8cbfa422>Dock · work pills & panels</h3><p data-v-8cbfa422><b data-v-8cbfa422>Work pills</b> (<code data-v-8cbfa422>WorkPill.vue</code>): the dock's workbar above the composer carries one pill vocabulary — font-driven by flex computation: the 1.5em leading icon and the label's own line box (<code data-v-8cbfa422>--text-base</code> at <code data-v-8cbfa422>--leading-normal</code>) both come to 21px at the 14px UI text, and 8px block padding wraps them to 37px, nothing pinning pixels, so the pills rescale with the font; borderless, with <code data-v-8cbfa422>--radius-lg</code> rounded-square corners, filled at the fills ladder's <code data-v-8cbfa422>--color-selected</code> rung over the shared <code data-v-8cbfa422>--p-menu-backdrop</code> blur — the panel's frosted recipe scaled down to a chip, so transcript text never reads through the light fill (the neutral hover wash layers on top — one layer, never two), the icon at full text colour, <code data-v-8cbfa422>--space-2</code> / <code data-v-8cbfa422>--space-3</code> block / inline padding — the trailing side adds a <code data-v-8cbfa422>--space-05</code> optical compensation against the leading glyph — and a <code data-v-8cbfa422>--space-1-5</code> content gap. Every pill stays expanded — the Code client does not collapse status chips — carrying icon + label and a trailing meta that answers one question — what is live on this surface right now — for background bash tasks, background sub-agents, todos, and the goal alike; the row insets to the composer's text column — dock inline inset + the card's 0.5px border + the input wrap's 16px inline padding — not the card edge. The active pill keeps the wash on permanently — one fills-ladder step deeper, neutral. The meta is always muted ink and surface-specific: the goal carries its status word, colour-coded by state (active <code data-v-8cbfa422>--color-success</code>, paused <code data-v-8cbfa422>--color-warning</code>, blocked <code data-v-8cbfa422>--color-danger</code>); the bash and sub-agent pills carry a pulsing dot and the running count, only while something runs (a quiet absence otherwise); the todos carry the done/total fraction. The plan pill joins the row only once plan mode is live server-side or a persisted plan exists — a merely armed directive stays in the composer's inline work-mode pill (its × cancels) and never reaches this bar, so every pill here reads as live server truth rather than local intent. Narrow panes wrap the row instead of clipping (the dock height observes); below the <code data-v-8cbfa422>--p-bp-sm</code> breakpoint the pills collapse to their icons — label and meta hide (the threshold is read from the token, never a hardcoded width).</p><p data-v-8cbfa422><b data-v-8cbfa422>Panel shell & motion</b>: a pill toggles the shared work panel — the menu family material: 70% page background via <code data-v-8cbfa422>color-mix</code> over the shared <code data-v-8cbfa422>--p-menu-backdrop</code> blur (the frostier recipe, see §06 Glassmorphism exemption), a 0.5px <code data-v-8cbfa422>--color-line</code> edge, <code data-v-8cbfa422>--radius-2xl</code>, and the menu panel's <code data-v-8cbfa422>--shadow-menu</code>. The panel pops from the clicked pill along the trigger-corner motion tokens (<code data-v-8cbfa422>--motion-panel-scale</code> / <code data-v-8cbfa422>--motion-panel-shift</code>), and switching pills replays the pop from the newly clicked pill (the shell is keyed by panel kind); while it is open the dock raises to <code data-v-8cbfa422>--z-dropdown</code> so it clears the transcript's new-message pill, and every window-drag strip pauses so an outside press reaches the page and dismisses. The panel owns Escape while open (a document-capture handler guarded by the shared IME latch, so a candidate-cancelling Escape is never swallowed), and a scrolled body dissolves toward the head through the <code data-v-8cbfa422>--menu-scroll-fade</code> alpha mask instead of hard-clipping. Height is content-sized up to <code data-v-8cbfa422>min(360px, 50vh)</code>; the filtered panels pin instead — see Filtering & sizing. The panel is chrome: nothing inside it is text-selectable, the head's filter chips included.</p><p data-v-8cbfa422><b data-v-8cbfa422>Panel head</b> (<code data-v-8cbfa422>WorkPanelHead.vue</code>): every work panel head is one tab row — a leading icon at the pill's 1.5em glyph size, the panel title at full text colour, and a muted trailing meta (<code data-v-8cbfa422>--color-text-muted</code>) carrying that panel's one live number, joined by the row's <code data-v-8cbfa422>--space-2</code> gap with no separator glyph: the goal's wall-clock time, the bash / sub-agent running count, the todos' done/total. Actions right-align in the head: the goal's pause / resume / cancel / close as quiet neutral IconButtons (cancel deliberately shares that neutral vocabulary), the plan's open-in-side-panel, dismiss-directive (shown only while the directive is live), and close, and the bash / sub-agent filter chips as a SegmentedControl. The plan head's meta carries the latest plan's review outcome. On touch these meet the 44px minimum (<code data-v-8cbfa422>--touch-target-min</code>) via the <code data-v-8cbfa422>hover: none</code> capability query — a width-only gate would miss tablets — and below 480px the head wraps so the actions take a full row.</p><p data-v-8cbfa422><b data-v-8cbfa422>Panel bodies</b>: todos read as a quiet list — a green <code data-v-8cbfa422>circle-check</code> for done, a hollow ring for pending, an xs Spinner for in-progress. The goal's detail (full objective, completion criterion, rendered with the chat Markdown renderer) fills the body — no footer strip. Bash tasks are long rows (<code data-v-8cbfa422>TasksPane.vue</code>): a StatusDot while running, <code data-v-8cbfa422>circle-check</code> when done, a close glyph for failed and for cancelled (a user stop is neutral, never reported as a failure), the command as the meta line, and a bare duration that renders only when computable — never the raw protocol status word. Sub-agents form a card grid (<code data-v-8cbfa422>SubagentGrid.vue</code>) — an auto-fill grid (minmax <code data-v-8cbfa422>--p-subagent-card-min</code>) of cards at the <code data-v-8cbfa422>--color-selected</code> rung with <code data-v-8cbfa422>--radius-lg</code> corners; each card carries the task name, a stable session-wide number (creation order across the session's background sub-agents — unique even across swarms; once shown it sticks, so late-arriving history takes the next tail number), an optional prompt meta line one size down (<code data-v-8cbfa422>--text-sm</code>), an icon-led model · effort line and the status row a further size down (<code data-v-8cbfa422>--text-xs</code>) — the status row pairs the task-row state glyph with the localized label, plus a clock-led bare duration that renders only when computable; the full-bleed <code data-v-8cbfa422>circle-check</code> (drawn for the todo rows' ring family) is scaled onto the shared icon grid wherever it sits beside other glyphs (task rows, cards, filter chips). A failed row tints its name <code data-v-8cbfa422>--color-danger</code>; a cancelled one stays neutral. Rows hover with a rounded strip that grows by padding and a matching negative margin — the row metrics never shift. The row stop is danger-coloured; the card cancel reveals on hover and is always visible on touch as a <code data-v-8cbfa422>--touch-target-min</code> corner target. Every pane's empty state is centered and muted. State and time labels — the head meta included — set <code data-v-8cbfa422>text-autospace: normal</code>, the transcript's mixed CJK/numeric spacing rule, so durations like 9小时2分 breathe.</p><p data-v-8cbfa422><b data-v-8cbfa422>State vocabulary</b>: two glyph families meet here by design — the activity dot (shared with the transcript's tool rows and swarm members) backs the task rows, the todo rows speak the default loader ring, and the sub-agent cards skip glyphs in favour of a localized text label:</p>',8)),t("table",Aa,[a[83]||(a[83]=t("thead",null,[t("tr",null,[t("th",null,"Surface"),t("th",null,"State"),t("th",null,"Meaning"),t("th",null,"Glyph"),t("th",null,"Ink")])],-1)),t("tbody",null,[t("tr",null,[a[48]||(a[48]=t("td",null,"Bash rows",-1)),a[49]||(a[49]=t("td",{class:"tk"},"running",-1)),a[50]||(a[50]=t("td",null,"Task in flight",-1)),t("td",null,[s(d(p),{status:"running"}),a[47]||(a[47]=e(" pulsing dot",-1))]),a[51]||(a[51]=t("td",null,[t("code",null,"--color-accent")],-1))]),t("tr",null,[a[54]||(a[54]=t("td",null,null,-1)),a[55]||(a[55]=t("td",{class:"tk"},"done",-1)),a[56]||(a[56]=t("td",null,"Finished cleanly",-1)),t("td",null,[s(d(o),{name:"circle-check",size:"sm"}),a[52]||(a[52]=e()),a[53]||(a[53]=t("code",null,"circle-check",-1))]),a[57]||(a[57]=t("td",null,[t("code",null,"--color-success")],-1))]),t("tr",null,[a[60]||(a[60]=t("td",null,null,-1)),a[61]||(a[61]=t("td",{class:"tk"},"failed",-1)),a[62]||(a[62]=t("td",null,"Errored — the row's name tints to match",-1)),t("td",null,[s(d(o),{name:"close",size:"sm"}),a[58]||(a[58]=e()),a[59]||(a[59]=t("code",null,"close",-1))]),a[63]||(a[63]=t("td",null,[t("code",null,"--color-danger")],-1))]),t("tr",null,[a[66]||(a[66]=t("td",null,null,-1)),a[67]||(a[67]=t("td",{class:"tk"},"cancelled",-1)),a[68]||(a[68]=t("td",null,"User stop — neutral, never a failure",-1)),t("td",null,[s(d(o),{name:"close",size:"sm"}),a[64]||(a[64]=e()),a[65]||(a[65]=t("code",null,"close",-1))]),a[69]||(a[69]=t("td",null,[t("code",null,"--color-text-muted")],-1))]),t("tr",null,[a[71]||(a[71]=t("td",null,"Todo rows",-1)),a[72]||(a[72]=t("td",{class:"tk"},"in_progress",-1)),a[73]||(a[73]=t("td",null,"Being worked on",-1)),t("td",null,[t("span",Ma,[s(d(I),{size:"xs"})]),a[70]||(a[70]=e(" xs Spinner ring",-1))]),a[74]||(a[74]=t("td",null,[e("the row's own ink ("),t("code",null,"--color-text"),e(")")],-1))]),a[81]||(a[81]=t("tr",null,[t("td"),t("td",{class:"tk"},"pending"),t("td",null,"Not started"),t("td",null,[t("span",{class:"dw-ring"}),e(" hollow ring")]),t("td",null,[t("code",null,"--color-line-strong"),e(" stroke")])],-1)),t("tr",null,[a[77]||(a[77]=t("td",null,null,-1)),a[78]||(a[78]=t("td",{class:"tk"},"done",-1)),a[79]||(a[79]=t("td",null,"Completed",-1)),t("td",null,[s(d(o),{name:"circle-check",size:"md"}),a[75]||(a[75]=e()),a[76]||(a[76]=t("code",null,"circle-check",-1))]),a[80]||(a[80]=t("td",null,[t("code",null,"--color-success")],-1))]),a[82]||(a[82]=t("tr",null,[t("td",null,"Sub-agent cards"),t("td",{class:"tk"},"all"),t("td",null,"The task-row glyph plus a localized label — failed alone tints danger — with a clock-led bare duration trailing"),t("td",null,"glyph + label"),t("td",null,"muted / danger")],-1))])]),a[140]||(a[140]=c("<p data-v-8cbfa422><b data-v-8cbfa422>Filtering & sizing</b>: the bash and sub-agent heads carry the same four icon-led filter chips — recent (<code data-v-8cbfa422>clock</code>; running + the five most recently finished), running (<code data-v-8cbfa422>play</code>), done (<code data-v-8cbfa422>circle-check</code>; every terminal state), all (<code data-v-8cbfa422>list</code>) — and both filtered panels pin to <code data-v-8cbfa422>--p-dock-panel-h</code> so filtering never resizes the panel; the body scrolls inside. When the head runs out of room the chips collapse into a dropdown menu (<code data-v-8cbfa422>FilterControl.vue</code> measures the head itself, so the switch follows the panel's own width, not the viewport; the menu teleports to <code data-v-8cbfa422><body></code> and anchors to the trigger, so the panel's clip and backdrop-filter never squeeze it); the head title never wraps and is never clipped — once the filter is a dropdown the head always fits. An empty pane names its filter (no completed tasks is not no tasks).</p><p data-v-8cbfa422><b data-v-8cbfa422>Opening & cancelling</b>: clicking a row or card opens the task's detail in the right-side panel. Opening is gated: the overlay navigation button renders only when a stable <code data-v-8cbfa422>agentId</code> (on-demand transcript) or locally held output exists, so a REST-only cold-loaded row stays inert instead of opening an empty panel — and says so with the not-allowed cursor. Open and cancel are sibling controls (a full-cover overlay button, the stop IconButton floating above it): no nested interactives, and the stop action exists only while the task runs.</p>",2)),t("div",Ia,[a[94]||(a[94]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Work pills — one vocabulary, a live count or status where one exists")],-1)),t("div",Ea,[t("div",Va,[t("span",Da,[s(d(o),{name:"target",size:"md"}),a[84]||(a[84]=t("span",null,"Goal",-1)),a[85]||(a[85]=e()),a[86]||(a[86]=t("span",{class:"dw-live"},"Active",-1))]),t("span",Ha,[s(d(o),{name:"terminal",size:"md"}),a[87]||(a[87]=t("span",null,"Bash",-1))]),t("span",La,[s(d(o),{name:"sparkles",size:"md"}),a[89]||(a[89]=t("span",null,"Sub Agent",-1)),a[90]||(a[90]=e()),t("span",Ra,[s(d(p),{status:"running"}),a[88]||(a[88]=e("3",-1))])]),t("span",Oa,[s(d(o),{name:"list",size:"md"}),a[91]||(a[91]=t("span",null,"Progress",-1)),a[92]||(a[92]=e()),a[93]||(a[93]=t("span",{class:"dw-count"},"3/7",-1))])])])]),t("div",Wa,[a[135]||(a[135]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Work panels — two-tone head, filter chips, rows & card grid")],-1)),t("div",Na,[t("div",Ua,[t("div",Pa,[t("span",Fa,[s(d(o),{name:"terminal",size:"md"}),a[95]||(a[95]=e("Bash ",-1)),a[96]||(a[96]=t("span",{class:"dw-meta"},"1 running",-1))]),t("span",ja,[t("span",Ga,[s(d(o),{name:"clock",size:"sm"}),a[97]||(a[97]=e("Recent",-1))]),t("span",Ka,[s(d(o),{name:"play",size:"sm"}),a[98]||(a[98]=e("Running",-1))]),t("span",Ja,[s(d(o),{name:"circle-check",size:"sm"}),a[99]||(a[99]=e("Done",-1))]),t("span",Qa,[s(d(o),{name:"list",size:"sm"}),a[100]||(a[100]=e("All",-1))])])]),t("div",Ya,[t("div",Za,[s(d(p),{status:"running"}),a[101]||(a[101]=t("span",{class:"nm"},"pnpm test -- --watch",-1)),a[102]||(a[102]=t("span",{class:"tm"},"0:42",-1))]),t("div",Xa,[s(d(o),{name:"circle-check",size:"sm",class:"ok"}),a[103]||(a[103]=t("span",{class:"nm"},"pnpm run build",-1)),a[104]||(a[104]=t("span",{class:"tm"},"3m12s",-1))]),t("div",$a,[s(d(o),{name:"close",size:"sm"}),a[105]||(a[105]=t("span",{class:"nm"},"pnpm lint",-1)),a[106]||(a[106]=t("span",{class:"tm"},"1m05s",-1))]),t("div",_a,[s(d(o),{name:"close",size:"sm"}),a[107]||(a[107]=t("span",{class:"nm"},"node scripts/migrate.mjs",-1)),a[108]||(a[108]=t("span",{class:"tm"},"0:18",-1))])])]),t("div",at,[t("div",tt,[t("span",et,[s(d(o),{name:"sparkles",size:"md"}),a[109]||(a[109]=e("Sub Agent ",-1)),a[110]||(a[110]=t("span",{class:"dw-meta"},"1 running",-1))]),t("span",st,[t("span",dt,[s(d(o),{name:"clock",size:"sm"}),a[111]||(a[111]=e("Recent",-1))]),t("span",ot,[s(d(o),{name:"play",size:"sm"}),a[112]||(a[112]=e("Running",-1))]),t("span",ct,[s(d(o),{name:"circle-check",size:"sm"}),a[113]||(a[113]=e("Done",-1))]),t("span",it,[s(d(o),{name:"list",size:"sm"}),a[114]||(a[114]=e("All",-1))])])]),t("div",nt,[t("div",lt,[a[118]||(a[118]=t("div",{class:"ct"},[t("span",{class:"nu"},"01"),t("span",{class:"nm"},"Explore the auth module")],-1)),a[119]||(a[119]=t("div",{class:"ds"},"Map every callsite of the legacy token refresh and report findings",-1)),t("div",rt,[t("div",vt,[s(d(o),{name:"robot",size:"sm"}),a[115]||(a[115]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",bt,[t("span",ft,[s(d(p),{status:"running"}),a[116]||(a[116]=e("Running",-1))]),t("span",pt,[s(d(o),{name:"clock",size:"sm"}),a[117]||(a[117]=e("0:42",-1))])])])]),t("div",ht,[a[123]||(a[123]=t("div",{class:"ct"},[t("span",{class:"nu"},"02"),t("span",{class:"nm"},"Draft the release notes")],-1)),a[124]||(a[124]=t("div",{class:"ds"},"Summarize the merged PRs since the last tag into user-facing notes",-1)),t("div",ut,[t("div",gt,[s(d(o),{name:"robot",size:"sm"}),a[120]||(a[120]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",mt,[t("span",wt,[s(d(o),{name:"circle-check",size:"sm",class:"ok"}),a[121]||(a[121]=e("Done",-1))]),t("span",yt,[s(d(o),{name:"clock",size:"sm"}),a[122]||(a[122]=e("3m12s",-1))])])])]),t("div",kt,[a[128]||(a[128]=t("div",{class:"ct"},[t("span",{class:"nu"},"03"),t("span",{class:"nm"},"Run the integration tests")],-1)),a[129]||(a[129]=t("div",{class:"ds"},"pnpm test against the staging daemon",-1)),t("div",xt,[t("div",Ct,[s(d(o),{name:"robot",size:"sm"}),a[125]||(a[125]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",St,[t("span",zt,[s(d(o),{name:"close",size:"sm"}),a[126]||(a[126]=e("Failed",-1))]),t("span",Tt,[s(d(o),{name:"clock",size:"sm"}),a[127]||(a[127]=e("1m05s",-1))])])])]),t("div",qt,[a[133]||(a[133]=t("div",{class:"ct"},[t("span",{class:"nu"},"04"),t("span",{class:"nm"},"Migrate the config files")],-1)),a[134]||(a[134]=t("div",{class:"ds"},"Rewrite the workspace configs to the new schema",-1)),t("div",Bt,[t("div",At,[s(d(o),{name:"robot",size:"sm"}),a[130]||(a[130]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",Mt,[t("span",It,[s(d(o),{name:"close",size:"sm"}),a[131]||(a[131]=e("Cancelled",-1))]),t("span",Et,[s(d(o),{name:"clock",size:"sm"}),a[132]||(a[132]=e("0:18",-1))])])])])])])])]),a[141]||(a[141]=t("h3",{class:"sub"},"Responsive",-1)),a[142]||(a[142]=t("p",null,[e("See §02 "),t("code",null,"--p-bp-sm"),e(" 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.")],-1)),a[143]||(a[143]=t("div",{class:"callout info"},[t("span",{class:"ico"},"i"),t("div",null," 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. ")],-1))]),a[145]||(a[145]=c('<section id="themes" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>05</span><h2 class="sec-title" data-v-8cbfa422>Theming</h2></div><p class="sec-desc" data-v-8cbfa422> Kimi Web uses <b data-v-8cbfa422>one unified theme</b>: the same components, fonts, radii, shadows, and surfaces — theming only swaps color values. Every semantic color token ships a light value in <code data-v-8cbfa422>:root</code> and a dark override in the <code data-v-8cbfa422>data-color-scheme</code> blocks; the semantic status colors (success / warning / danger) are independent palettes, one set each for light / dark. </p><h3 class="sub" data-v-8cbfa422>Accent</h3><p data-v-8cbfa422>The app has <b data-v-8cbfa422>one accent</b>: the brand blue (<code data-v-8cbfa422>--color-accent</code>, <code data-v-8cbfa422>#1783ff</code> light / <code data-v-8cbfa422>#58a6ff</code> 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 <code data-v-8cbfa422>--color-selected</code> so it reads as location, not as an action.</p><h3 class="sub" data-v-8cbfa422>Light / dark mode</h3><p data-v-8cbfa422>Each semantic token ships a light value in <code data-v-8cbfa422>:root</code> and a dark override in the two <code data-v-8cbfa422>data-color-scheme</code> blocks (explicit choice, or following the OS preference via <code data-v-8cbfa422>prefers-color-scheme</code>). Switching light / dark simply swaps between these two sets of derived tokens, with zero structural change.</p><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422><b data-v-8cbfa422>Benefits of one theme</b>: 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. </div></div></section><section id="rules" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>06</span><h2 class="sec-title" data-v-8cbfa422>Style Rules</h2></div><p class="sec-desc" data-v-8cbfa422> 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. </p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Rule ID</th><th data-v-8cbfa422>What it detects</th><th data-v-8cbfa422>Action</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-gradient-text</td><td data-v-8cbfa422>gradient text / gradient background</td><td data-v-8cbfa422><span class="pill red" data-v-8cbfa422>Forbidden</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-glassmorphism</td><td data-v-8cbfa422><code data-v-8cbfa422>backdrop-filter: blur</code> (<b data-v-8cbfa422>TopBar sticky nav bar</b> and <b data-v-8cbfa422>menu surfaces via <code data-v-8cbfa422>--p-menu-backdrop</code></b> are the exceptions)</td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>TopBar + menus exempt</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-color-glow</td><td data-v-8cbfa422>colored / large-radius box-shadow glow</td><td data-v-8cbfa422><span class="pill red" data-v-8cbfa422>Forbidden</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-emoji-icon</td><td data-v-8cbfa422>using emoji as a functional icon (no exceptions). Emoji inside <b data-v-8cbfa422>user content</b> — session titles, messages — is not chrome and is out of scope (see §07 Session row's emoji icon)</td><td data-v-8cbfa422><span class="pill red" data-v-8cbfa422>Forbidden</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-hardcoded-hex</td><td data-v-8cbfa422>unregistered hex color inside a component <code data-v-8cbfa422><style></code></td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>Warning</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-hardcoded-font</td><td data-v-8cbfa422>hard-coded <code data-v-8cbfa422>font-family</code> in a component (e.g. <code data-v-8cbfa422>'Inter'</code>) instead of <code data-v-8cbfa422>var(--font-ui)</code></td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>Warning</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>radius-from-scale</td><td data-v-8cbfa422>radius value not in <code data-v-8cbfa422>{4,6,8,12,16,20,999}</code></td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>Warning</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>z-from-scale</td><td data-v-8cbfa422>z-index using an unregistered large number</td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>Warning</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>weight-from-scale</td><td data-v-8cbfa422>font-weight not in <code data-v-8cbfa422>{400,500}</code></td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>Warning</span></td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>State matrix</h3><p data-v-8cbfa422>Every interactive primitive should define the following states where applicable; missing ones are flagged by the style rules. <code data-v-8cbfa422>focus-visible</code> always uses <code data-v-8cbfa422>--p-focus-ring</code> (appears only on keyboard focus, see §08); <code data-v-8cbfa422>disabled</code> is uniformly <code data-v-8cbfa422>opacity:.5</code>.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>State</th><th data-v-8cbfa422>Button</th><th data-v-8cbfa422>Input</th><th data-v-8cbfa422>Card</th><th data-v-8cbfa422>Menu item</th><th data-v-8cbfa422>Switch</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>default</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>hover</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>active / pressed</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>focus-visible</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>✓</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>disabled</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>loading</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>selected / active</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>error</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>readonly</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Chat working indicator</h3><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422> The chat working state ("prompt sent, turn unfinished") is a brand signature of Kimi Web, rendered uniformly by the <code data-v-8cbfa422>WorkingIndicator</code> component: the 小蓝 mascot plus a phase label — "Requesting…" until the assistant's reply starts, "Working…" once it is streaming. All other loading states (including <code data-v-8cbfa422>ActivityNotice</code>) use the plain <code data-v-8cbfa422>Spinner</code>. </div></div><h3 class="sub" data-v-8cbfa422>Glassmorphism exemption</h3><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422><code data-v-8cbfa422>backdrop-filter: blur</code> is banned site-wide, with <b data-v-8cbfa422>two exceptions</b>: the <code data-v-8cbfa422>.frost</code> variant of <code data-v-8cbfa422>TopBar</code> — 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 and the composer dropdowns use the <code data-v-8cbfa422>--color-menu-bg</code> token (a 95% surface), while the autocomplete family — slash/mention popups and the dock work panel — deliberately runs a frostier recipe of its own: 70% page background (single-sourced as <code data-v-8cbfa422>--color-menu-bg-frost</code>) over the shared <code data-v-8cbfa422>--p-menu-backdrop</code> blur, which stays the single-sourced blur token across all of them. The dock's work surfaces — the work panel and its pills, persistent over the scrolling transcript — ride that same frostier recipe (specified per-surface in §04 (Dock · work pills & panels)) rather than a bespoke one. No other component (card, dialog, Toast, panel) may use glassmorphism; violations are flagged under <code data-v-8cbfa422>no-glassmorphism</code>, and menu blur with ad-hoc values (anything but the token) is flagged too. </div></div><div class="footer" data-v-8cbfa422><span data-v-8cbfa422>Kimi Web Design System · v1.0</span><span data-v-8cbfa422>The reference when changing the web UI</span></div></section><section id="shell" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>07</span><h2 class="sec-title" data-v-8cbfa422>App Shell & Sidebar</h2></div><p class="sec-desc" data-v-8cbfa422> 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. </p><h3 class="sub" data-v-8cbfa422>Layout grid</h3><p data-v-8cbfa422>On web it is a single-row 5-track grid: the sidebar and the right panel each occupy a permanent <code data-v-8cbfa422>auto</code> 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.)</p><div class="code" data-v-8cbfa422><div class="code-bar" data-v-8cbfa422><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="fn" data-v-8cbfa422>App.vue · .app</span></div><pre data-v-8cbfa422>grid-template-columns: auto 0 minmax(0, 1fr) 0 auto;\n /* sidebar ↑ ↑handle ↑conversation ↑handle ↑right panel (auto) */</pre></div><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>sidebar width</td><td class="val" data-v-8cbfa422>270px default (adjustable)</td><td data-v-8cbfa422>expanded sidebar width, changed by dragging the ResizeHandle; should approach §02's <code data-v-8cbfa422>--p-sidebar-w</code> (264px)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--preview-w</td><td class="val" data-v-8cbfa422>460px</td><td data-v-8cbfa422>width of the right preview panel when open</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--panel-head-h</td><td class="val" data-v-8cbfa422>48px</td><td data-v-8cbfa422>unified height for all right panel heads + the conversation column head; both use a 0.5px bottom hairline</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-bp-sm</td><td class="val" data-v-8cbfa422>640px</td><td data-v-8cbfa422>≤640 switches to a mobile single column (top bar + conversation), no sidebar / handle / right panel</td></tr></tbody></table><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>The right panel track exists permanently, with its width toggling between <code data-v-8cbfa422>0 ↔ var(--preview-w)</code> and no transition — animating a grid track would relayout the whole app grid every frame (when open it squeezes the conversation column, rather than switching templates).</li><li data-v-8cbfa422>The sidebar collapses SYMMETRICALLY to the right panel: its container width animates to 0 while the content keeps its fixed width anchored to the right edge (clipped, sliding out left — no reflow, hairline stays on the clipped content). No rail remains. The collapse control differs by platform: on <b data-v-8cbfa422>macOS desktop</b> the toggle is a single resident floating IconButton pinned beside the traffic lights (rendered in both states, only the glyph swaps — the sidebar slides underneath it, never moves or flashes); on <b data-v-8cbfa422>Windows / web</b> the collapse button lives inside the sidebar header (right-aligned), and a floating expand button appears at the top-left only while collapsed. The conversation header uses a 0.5px bottom hairline and pads left in step with the transition while collapsed.</li><li data-v-8cbfa422>All grid children must have <code data-v-8cbfa422>min-height:0; min-width:0</code>, so only the inner scroll containers scroll and the page itself does not scroll.</li></ul><h3 class="sub" data-v-8cbfa422>Sidebar alignment system (<code data-v-8cbfa422>--sb-*</code>)</h3><p data-v-8cbfa422>All sidebar rows (group head, session row, New chat, search, and Settings buttons) share 4 custom properties. Their 16px icon slots and <code data-v-8cbfa422>--sb-gap</code> place every label on the same x-axis as the workspace name.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--sb-inset</td><td class="val" data-v-8cbfa422>12px</td><td data-v-8cbfa422>row box (hover/selected pill) inset from the sidebar edges — matches the brand header's 12px padding</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--sb-pad-x</td><td class="val" data-v-8cbfa422>20px</td><td data-v-8cbfa422>content start x (= --sb-inset + 8px row padding)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--sb-gutter</td><td class="val" data-v-8cbfa422>16px</td><td data-v-8cbfa422>leading icon slot width — matches the workspace folder icon so the session title aligns under the workspace name</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--sb-gap</td><td class="val" data-v-8cbfa422>8px</td><td data-v-8cbfa422>gap between the icon slot and the text</td></tr></tbody></table><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422> The session title's starting x = <code data-v-8cbfa422>--sb-pad-x + --sb-gutter + --sb-gap</code>. 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. </div></div><h3 class="sub" data-v-8cbfa422>Sidebar structure</h3><p data-v-8cbfa422>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 <code data-v-8cbfa422>position: sticky</code>, 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 <code data-v-8cbfa422>--color-sidebar-bg</code> (one step off <code data-v-8cbfa422>--color-bg</code>: 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 <code data-v-8cbfa422>--sb-hover</code> (= the global <code data-v-8cbfa422>--color-hover</code> wash); the selected row uses the lighter <code data-v-8cbfa422>--sb-selected</code> wash derived from <code data-v-8cbfa422>--color-selected</code> — On macOS desktop the sidebar is instead <b data-v-8cbfa422>frosted</b>: the window carries a native <code data-v-8cbfa422>NSVisualEffectView</code> ('menu' vibrancy, following the in-app scheme via the nativeTheme mirror, its state pinned to <code data-v-8cbfa422>inactive</code> so the material keeps its flat pressed-down colour — ≈ #282829 dark / #E7E7E7 light — with no active/inactive drift) and the sidebar column drops <code data-v-8cbfa422>--color-sidebar-bg</code> for a single translucent <code data-v-8cbfa422>--color-sidebar-tint</code> wash that presses the pinned material one step — ≈ #282829 → ≈ #1e1e1f in dark (<code data-v-8cbfa422>rgba(0,0,0,0.25)</code>), ≈ #E7E7E7 → ≈ #f1f1f1 in light (<code data-v-8cbfa422>rgba(255,255,255,0.4)</code>) — with header and footer staying transparent so the tint reads as one uniform pane; the root chain (<code data-v-8cbfa422>html/body/#app/.app</code>) stays unpainted only under the <code data-v-8cbfa422>macos-desktop</code> + <code data-v-8cbfa422>vibrancy</code> 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 <code data-v-8cbfa422>--color-sidebar-bg</code>, while the traffic-light layout keeps keying off <code data-v-8cbfa422>macos-desktop</code> 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 <code data-v-8cbfa422>mask-image</code> 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 <code data-v-8cbfa422>text-overflow</code> becomes <code data-v-8cbfa422>clip</code> so a long tail dissolves instead of dotting.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Block</th><th data-v-8cbfa422>Use</th><th data-v-8cbfa422>Note</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td data-v-8cbfa422>Brand header</td><td data-v-8cbfa422>logo + name + collapse IconButton (right-aligned)</td><td data-v-8cbfa422>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)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>New chat</td><td data-v-8cbfa422>full-width left-aligned button (custom)</td><td data-v-8cbfa422>500-weight label; same rhythm as the session rows in the list (left-aligned, hover = <code data-v-8cbfa422>--sb-hover</code>). <b data-v-8cbfa422>Do not</b> use Button (centered, breaks the rhythm)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Search</td><td data-v-8cbfa422>bare search row (custom)</td><td data-v-8cbfa422>500-weight label; no border, hover/focus shows the faint <code data-v-8cbfa422>--color-hover</code> wash; icon + label, with the <code data-v-8cbfa422>Kbd</code> keycaps (⌘K / Ctrl K) pushed to the trailing edge — label and shortcut are justified apart. <b data-v-8cbfa422>Do not</b> use Input (the 38px bordered version is too heavy). It is a direct sibling of New chat in the action group</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Section label</td><td data-v-8cbfa422><code data-v-8cbfa422>.p-section-label</code></td><td data-v-8cbfa422>uppercase muted small titles like "Workspaces", using <code data-v-8cbfa422>--weight-section-label</code> (600)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Pinned head</td><td data-v-8cbfa422>fixed block above the scroll container (<code data-v-8cbfa422>.sessions-head</code>): the pinned section (<code data-v-8cbfa422>PinnedSessionList.vue</code>) + the "Workspaces" section label</td><td data-v-8cbfa422>stays put while the workspace groups scroll; owns the top scroll-linked seam (hairline + fade, only while scrolled). Pinned rows render in pure recency order (updatedAt desc — no manual ordering, no attention tiering): drag a session row in to pin it (the drop spot carries no position meaning), drag a pinned row out to unpin. The pinned section folds via its label chevron (persisted, <code data-v-8cbfa422>kimi-web.pinned-collapsed</code>) 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</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Workspace head / session row</td><td data-v-8cbfa422>see next two sections</td><td data-v-8cbfa422>share <code data-v-8cbfa422>--sb-*</code> alignment</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>User-menu footer</td><td data-v-8cbfa422>account area (<code data-v-8cbfa422>components/UserMenu.vue</code>) opening an upward §03 menu</td><td data-v-8cbfa422>pinned row under the session list, separated by a 0.5px <code data-v-8cbfa422>--line</code> 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 (used-percent values via <code data-v-8cbfa422>settings.planUsage.usedPct</code>, 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, and the whole menu (flyouts included) runs one step above the §03 default density — base-size labels, taller rows</td></tr></tbody></table><div class="callout warn" data-v-8cbfa422><span class="ico" data-v-8cbfa422>!</span><div data-v-8cbfa422><b data-v-8cbfa422>Why New chat / search / inline rename don't use Button / Input:</b> 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. </div></div><h3 class="sub" data-v-8cbfa422>Session row</h3><p data-v-8cbfa422>A session row is an inset rounded pill, structured as: <code data-v-8cbfa422>status slot → title → time → attention Badge → hover actions (pin / archive)</code>.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Part</th><th data-v-8cbfa422>Rule</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td data-v-8cbfa422>Container</td><td data-v-8cbfa422><code data-v-8cbfa422>padding: 8px 8px</code> inside the list's <code data-v-8cbfa422>--sb-inset</code> gutter, <code data-v-8cbfa422>radius-sm</code>; <b data-v-8cbfa422>no fixed/min height</b> — row height is font-driven (title <code data-v-8cbfa422>line-height: --leading-tight</code>, ≈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 = <code data-v-8cbfa422>--sb-hover</code> (the global <code data-v-8cbfa422>--color-hover</code> wash); active = <code data-v-8cbfa422>--sb-selected</code> (75% of the global selected wash) — neutral, no accent tint, no border, no weight change</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Status slot (lead)</td><td data-v-8cbfa422>fixed <code data-v-8cbfa422>--sb-gutter</code> width; running = <code data-v-8cbfa422>Spinner</code> sm, otherwise unread = 7px accent dot; empty while an attention Badge owns the row — one status at a time, decided by the shared <code data-v-8cbfa422>SessionDisplayStatus</code> enum (app-core <code data-v-8cbfa422>sessionDisplayStatus.ts</code>: approval › question › running › aborted › unread)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Title</td><td data-v-8cbfa422>flex:1 with truncation and <code data-v-8cbfa422>user-select:none</code>; double-click enters inline rename (compact input, not Input), whose text remains selectable</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Emoji icon</td><td data-v-8cbfa422>the session icon is the title's LEADING emoji cluster (app-core <code data-v-8cbfa422>splitSessionEmoji</code> — 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 <code data-v-8cbfa422><button></code> for a11y), and clicking it opens <code data-v-8cbfa422>SessionEmojiPicker</code> — 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 + <code data-v-8cbfa422>--z-dropdown</code>, 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</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Time</td><td data-v-8cbfa422>mono xs, <code data-v-8cbfa422>fg-faint</code>; yields to the hover actions on hover</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Attention Badge</td><td data-v-8cbfa422><code data-v-8cbfa422>Badge</code> sm: info (needs answer) / warning (needs approval) / danger (aborted)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Hover actions</td><td data-v-8cbfa422><code data-v-8cbfa422>IconButton</code> 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</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Flat-style variant (flat list + pinned section)</td><td data-v-8cbfa422>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 <code data-v-8cbfa422>cwdLabel</code>): ① no leading status slot — the title is left-aligned at the row's content edge; ② a second line under the title: <code data-v-8cbfa422>folder-closed</code> icon sm + the cwd's final directory name (<code data-v-8cbfa422>-</code> when the session has no cwd), xs faint like the time — except the icon, which takes <code data-v-8cbfa422>--color-text-muted</code> (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 small tag (<code data-v-8cbfa422>git-pull-request</code> icon + #number, 2xs medium on a soft ground with a hairline edge and radius-sm corners — a mini §03 Badge) sits at the line's right edge, state-colored the GitHub way (open = <code data-v-8cbfa422>--color-success-soft</code> ground + <code data-v-8cbfa422>--color-success</code> text, merged = <code data-v-8cbfa422>--color-done-soft</code> + <code data-v-8cbfa422>--color-done</code> purple, closed = neutral sunken) 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 <code data-v-8cbfa422>cwdLabel</code> and keep the classic structure. The flat ↔ grouped switch lives in a dropdown on the SESSIONS section label (fixed <code data-v-8cbfa422>list-settings</code> 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)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Archive</td><td data-v-8cbfa422>no confirm — the hover archive button / menu item archives immediately, then App.vue shows the §03 <code data-v-8cbfa422>ActionToast</code> (top-center) with Undo (restores the session) and Settings (opens the archived list)</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Workspace group</h3><p data-v-8cbfa422>The group head and session rows share <code data-v-8cbfa422>--sb-*</code>: folder icon (open/closed) → name, with the kebab and "+" revealed on hover.</p><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>The folder icon leads the row (switching icons between open and closed states) with the plain <code data-v-8cbfa422>--sb-gap</code> before the name — it does not pad out the <code data-v-8cbfa422>--sb-gutter</code> slot.</li><li data-v-8cbfa422>The name uses 500 weight with muted color (<code data-v-8cbfa422>--color-text-muted</code>, one step lighter than session titles), so group heads remain clear without competing with list content. No path subtitle; hovering the name shows the full root path in a <code data-v-8cbfa422>Tooltip</code>.</li><li data-v-8cbfa422>The kebab (menu) and "+" (new chat in this workspace) both use <code data-v-8cbfa422>IconButton</code> sm inside a floating actions layer anchored to the row's right edge — no reserved layout space, so the name uses the full row width when idle. Shown on hover, keyboard focus, or while the menu is open; the layer backs itself with the sidebar surface (container background) plus the row hover wash (an <code data-v-8cbfa422>::after</code> shown only while the row is hovered), so its color exactly equals the row's current background and the overlapped name tail doesn't bleed through (hidden via <code data-v-8cbfa422>opacity:0</code>, staying in the tab order). On macOS desktop the layer paints nothing at all — the name's <code data-v-8cbfa422>mask-image</code> fade (see the sidebar section above) dissolves the tail before it reaches the buttons</li><li data-v-8cbfa422>The group is collapsible; when collapsed its session list is hidden.</li><li data-v-8cbfa422>While the active workspace has no session selected (the draft state — e.g. right after adding the workspace, or after New chat), the group head carries the same neutral <code data-v-8cbfa422>--sb-selected</code> fill as a selected session row (selection reads as "where I am"; the fill wins over hover). Once a session is selected or created, the fill moves to that session row.</li></ul><h3 class="sub" data-v-8cbfa422>Show more & collapse</h3><p data-v-8cbfa422>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.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Part</th><th data-v-8cbfa422>Rule</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Row</td><td data-v-8cbfa422>a 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), <code data-v-8cbfa422>radius-sm</code>; hover = <code data-v-8cbfa422>--sb-hover</code> (no text recolor); <code data-v-8cbfa422>:focus-visible</code> uses <code data-v-8cbfa422>--p-focus-ring</code></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Chevron</td><td data-v-8cbfa422>sm (down = expand, up = collapse); the row indents by <code data-v-8cbfa422>--sb-gutter + --sb-gap</code> so the first button's chevron starts exactly at the session-title x, lining the control's leading edge up with the titles above</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Label</td><td data-v-8cbfa422><code data-v-8cbfa422>font-ui</code>, <code data-v-8cbfa422>text-xs</code>, <code data-v-8cbfa422>--color-text-muted</code>; truncated</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Separator</td><td data-v-8cbfa422>faint middot (<code data-v-8cbfa422>--color-text-faint</code>) with <code data-v-8cbfa422>--space-1</code> side margins, rendered only when both controls are present</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Behavior</td><td data-v-8cbfa422>each 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</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>ResizeHandle</h3><p data-v-8cbfa422>A 4px grab strip layered over the 1px column border (<code data-v-8cbfa422>margin: 0 -2px</code> 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.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Rule</th><th data-v-8cbfa422>Value</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td data-v-8cbfa422>Width / cursor</td><td data-v-8cbfa422>4px strip, 2px bar / <code data-v-8cbfa422>col-resize</code> mid-range; <code data-v-8cbfa422>w-resize</code> / <code data-v-8cbfa422>e-resize</code> at the drag limits (hints the direction that still resizes)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Normal / hover / drag</td><td data-v-8cbfa422>transparent / <code data-v-8cbfa422>--color-selected</code> (f2) / <code data-v-8cbfa422>--color-line-strong</code> (f3) — the neutral ramp one step up, never accent</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Layer</td><td data-v-8cbfa422><code data-v-8cbfa422>--z-dropdown</code>, above pane-level sticky chrome (chat dock at <code data-v-8cbfa422>--z-sticky</code>) so the overhang stays visible and grabbable</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Behavior</td><td data-v-8cbfa422>panel width follows the pointer 1:1 while dragging (the parent disables transitions to avoid lag); on release it is persisted to localStorage</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Right panel</h3><p data-v-8cbfa422>The right panels (file preview / Diff / compaction summary / sub-agent / side chat) share one track and one head primitive.</p><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>The panel head uses the <code data-v-8cbfa422>PanelHeader</code> primitive (48px = <code data-v-8cbfa422>--panel-head-h</code>), the same height as the conversation column head, so the hairline runs as one line.</li><li data-v-8cbfa422>Panel head: bold mono title + optional muted subtitle + middle slot (Badge / control / path) + close IconButton on the right.</li><li data-v-8cbfa422>When opened, the panel width snaps from <code data-v-8cbfa422>0 → var(--preview-w)</code> with no animation, squeezing the conversation column in a single layout.</li><li data-v-8cbfa422>At ≤640px the panel becomes a full-screen overlay (<code data-v-8cbfa422>position:fixed; inset:0</code>).</li></ul><h3 class="sub" data-v-8cbfa422>Bottom terminal panel (desktop-only)</h3><p data-v-8cbfa422>The native terminal (<code data-v-8cbfa422>components/terminal/</code>) 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 <code data-v-8cbfa422>0 ↔ var(--terminal-h)</code> (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.</p><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>Resize: a horizontal twin of the ResizeHandle (4px strip over the 0.5px top hairline, <code data-v-8cbfa422>row-resize</code> mid-range, <code data-v-8cbfa422>n/s-resize</code> at the limits, same neutral f2/f3 ramp, never accent). The shared <code data-v-8cbfa422>useResizable</code> hook owns it via <code data-v-8cbfa422>axis: 'y'</code>; the height var is written imperatively during a drag (same no-Vue-rerender rule as <code data-v-8cbfa422>--preview-w</code>).</li><li data-v-8cbfa422>Toolbar (32px, 0.5px bottom hairline): tab strip on the left — each tab is a compact <code data-v-8cbfa422>radius-sm</code> pill (leading terminal glyph, muted while exited + shell label + hover close affordance), the active tab uses <code data-v-8cbfa422>--color-selected</code>, hover <code data-v-8cbfa422>--color-hover</code>; a "+" action appends a tab. Tabs follow the §08 tablist keyboard model (roving tabindex, ←/→/Home/End), the close affordance is its own button (no nested interactives), and the height separator is keyboard-operable (↑/↓ in steps, value exposed). Trailing actions: restart (only while the active tab exited) and a collapse chevron. Collapsing sets <code data-v-8cbfa422>inert</code> on the region — the xterm instances and their scrollback stay mounted but leave the tab order.</li><li data-v-8cbfa422>The xterm canvas cannot resolve CSS variables either, so its palette is resolved from the live <code data-v-8cbfa422>--color-*</code> tokens at runtime (re-read on scheme flips; the ANSI hues the status ramp doesn't cover use dedicated <code data-v-8cbfa422>--color-term-magenta/cyan</code> tokens); the font is the app JetBrains Mono stack sized off the content token scale. While focused, the panel owns every key except the registered app shortcuts (chat-level Esc / find / select-all chords stay inert inside it).</li><li data-v-8cbfa422>Entries: the chat header's terminal IconButton (right of Open in, lit while the panel is open) — on the empty-composer state, where no chat header renders, the same button floats at the conversation's top-right instead — plus <code data-v-8cbfa422>ctrl+`</code> (⌃` on macOS — VS Code's binding; ⌘` stays free for the OS window switcher — customizable in the shortcut registry), and the View menu's Toggle Terminal item. New tabs spawn in the visible workspace root. Terminal state is per session: switching sessions swaps the visible bucket while the others keep their PTYs and xterm views alive (scrollback survives a round trip; the ten most recent sessions are kept, LRU). The panel never renders on mobile / web.</li></ul><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>One-sentence principle:</b> 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. </div></div></section><section id="a11y" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>08</span><h2 class="sec-title" data-v-8cbfa422>Accessibility (pragmatic edition)</h2></div><p class="sec-desc" data-v-8cbfa422> Kimi Web is a local developer tool; it <b data-v-8cbfa422>does not target a specific WCAG conformance level</b>, 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. </p><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>On the "ugly" focus ring:</b> the focus visibility required below always uses <code data-v-8cbfa422>:focus-visible</code> (not <code data-v-8cbfa422>:focus</code>). It appears <b data-v-8cbfa422>only on keyboard focus</b>; mouse clicks don't trigger it, so it doesn't pollute the mouse-driven visual; the ring's strength is tuned uniformly with <code data-v-8cbfa422>--p-focus-ring</code>, not overridden per place. </div></div><h4 class="mini" data-v-8cbfa422>1. Contrast & color</h4><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>Body text vs. background contrast <b data-v-8cbfa422>≥ 4.5:1</b>; control borders, icons, and key graphics <b data-v-8cbfa422>≥ 3:1</b>. When changing theme colors / dark mode, verify against §05 together.</li><li data-v-8cbfa422><b data-v-8cbfa422>Button text vs. button background</b>, and <b data-v-8cbfa422>form controls</b> (input, placeholder, helper / error text) <b data-v-8cbfa422>vs. their section background</b> must all have contrast ≥ 4.5:1 (large text ≥ 3:1). White-on-white text, a transparent borderless button floating over the page background, and a light placeholder on a near-white background are all flagged by the style rules.</li><li data-v-8cbfa422><b data-v-8cbfa422>State is not conveyed by color alone.</b> Error, selected, and disabled states also carry text, an icon, or a shape change (for example an error state is not just red, but also carries text or an icon).</li></ul><h4 class="mini" data-v-8cbfa422>2. Keyboard operable</h4><p data-v-8cbfa422>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:</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Control</th><th data-v-8cbfa422>Keyboard behavior</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Dialog</td><td data-v-8cbfa422><code data-v-8cbfa422>Tab</code> cycles within the dialog (focus trap); <code data-v-8cbfa422>Esc</code> closes; focus returns to the trigger element after closing.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Menu</td><td data-v-8cbfa422><code data-v-8cbfa422>↑</code> / <code data-v-8cbfa422>↓</code> move the highlight, <code data-v-8cbfa422>Enter</code> selects, <code data-v-8cbfa422>Esc</code> closes.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Tabs</td><td data-v-8cbfa422><code data-v-8cbfa422>←</code> / <code data-v-8cbfa422>→</code> switch tabs (roving tabindex); only the current tab is in the Tab sequence.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Switch / Segmented</td><td data-v-8cbfa422><code data-v-8cbfa422>←</code> / <code data-v-8cbfa422>→</code> or <code data-v-8cbfa422>Space</code> / <code data-v-8cbfa422>Enter</code> to toggle.</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>3. Focus visibility</h4><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>Every interactive element must have a visible focus indicator on keyboard focus, uniformly via <code data-v-8cbfa422>:focus-visible</code> + <code data-v-8cbfa422>--p-focus-ring</code> (primary actions may use <code data-v-8cbfa422>--p-focus-ring-strong</code>).</li><li data-v-8cbfa422>Bare <code data-v-8cbfa422>outline: none</code> is forbidden. To remove the default outline, you must provide an equivalent replacement style.</li></ul><h4 class="mini" data-v-8cbfa422>4. Labels & semantics</h4><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>Semantic HTML first</b> (button / a / input / dialog…); ARIA is added only when native semantics fall short.</li><li data-v-8cbfa422>Icon-only buttons must have an <code data-v-8cbfa422>aria-label</code> — <code data-v-8cbfa422>IconButton</code> already enforces this with a required <code data-v-8cbfa422>label</code> prop.</li><li data-v-8cbfa422>Dialog: <code data-v-8cbfa422>role="dialog"</code> + <code data-v-8cbfa422>aria-modal="true"</code>, with the title as the dialog's accessible name.</li><li data-v-8cbfa422>Purely decorative SVG / icons get <code data-v-8cbfa422>aria-hidden="true"</code> to avoid being read out by screen readers.</li></ul><h4 class="mini" data-v-8cbfa422>5. Target size</h4><p data-v-8cbfa422>Desktop click targets <b data-v-8cbfa422>≥ 32px</b>; touch devices <b data-v-8cbfa422>≥ 44px</b> (consistent with the §01 principle and the IconButton <code data-v-8cbfa422>lg</code> tier).</p><h4 class="mini" data-v-8cbfa422>6. Reduced motion</h4><p data-v-8cbfa422>Handled uniformly in the global styles per §02's <code data-v-8cbfa422>@media (prefers-reduced-motion: reduce)</code>; components do not check this individually. The chat working indicator's mascot renders its static fallback.</p><h4 class="mini" data-v-8cbfa422>7. Live announcements (non-mandatory)</h4><p data-v-8cbfa422>Screen-reader announcements are <b data-v-8cbfa422>not a mandatory contract</b> in this product. Short hints like Toast can use <code data-v-8cbfa422>role="status"</code> / <code data-v-8cbfa422>aria-live</code>; 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.</p><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422><b data-v-8cbfa422>Explicitly not mandatory for now:</b> 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. </div></div></section><section id="dialogs" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>09</span><h2 class="sec-title" data-v-8cbfa422>Dialogs</h2></div><p class="sec-desc" data-v-8cbfa422> 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. </p><h3 class="sub" data-v-8cbfa422>The frame (recap)</h3><p data-v-8cbfa422> All dialogs share the §03 primitive: <code data-v-8cbfa422>--radius-xl</code> radius, <code data-v-8cbfa422>--shadow-xl</code> shadow, a restrained 28% neutral backdrop, a head (title + IconButton close), a body, and a right-aligned foot. Widths <code data-v-8cbfa422>md</code> 440 / <code data-v-8cbfa422>lg</code> 640 / <code data-v-8cbfa422>xl</code> 760 and <code data-v-8cbfa422>auto</code> / <code data-v-8cbfa422>fixed</code> height are chosen per §03. One interruptive overlay at a time; <code data-v-8cbfa422>Esc</code> closes; focus is trapped and restored. A blocking flow that must be resolved rather than dismissed (server token) uses <code data-v-8cbfa422>hideClose</code> with <code data-v-8cbfa422>closeOnOverlay</code>/<code data-v-8cbfa422>closeOnEsc</code> off — never a hand-written overlay. </p><h3 class="sub" data-v-8cbfa422>Anatomy A — padded (forms & confirmations)</h3><p data-v-8cbfa422> The default: the body carries its own padding and the caller drops content straight in. Confirmations put their Buttons in the <code data-v-8cbfa422>#foot</code> slot (right-aligned, cancel → confirm). Used by: confirm, login, status panel, server token. </p><h3 class="sub" data-v-8cbfa422>Anatomy B — flush (pickers & browsers)</h3><p data-v-8cbfa422><code data-v-8cbfa422>:padded="false"</code> with <code data-v-8cbfa422>height="fixed"</code>; 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. </p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Zone</th><th data-v-8cbfa422>Contract</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Search</td><td data-v-8cbfa422>The boxed §03 Input, inset 22px so its edge aligns with the head title. Autofocus on open. No leading icon, no borderless variant.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Filter chips</td><td data-v-8cbfa422>Optional. 28px pill: transparent + muted text by default, <code data-v-8cbfa422>--color-hover</code> on hover, <code data-v-8cbfa422>--color-selected</code> + medium <code data-v-8cbfa422>--color-text</code> when active. Horizontally scrollable with the scrollbar hidden. Never a row of Buttons.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>List</td><td data-v-8cbfa422><code data-v-8cbfa422>flex:1</code>, owns the vertical scrolling, padded 4px 8px so rows bleed near the dialog edge. <code data-v-8cbfa422>role="listbox"</code>; rows carry <code data-v-8cbfa422>role="option"</code> + <code data-v-8cbfa422>aria-selected</code>.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Row</td><td data-v-8cbfa422>8px 12px padding, <code data-v-8cbfa422>--radius-md</code>. Two quiet lines: name 14/20 (medium when current) and a meta line 12/18 in <code data-v-8cbfa422>--color-text-faint</code> — 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.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Row states</td><td data-v-8cbfa422>Hover / keyboard-selected → <code data-v-8cbfa422>--color-hover</code>; current → <code data-v-8cbfa422>--color-selected</code> — 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 <code data-v-8cbfa422>--star</code> when starred.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>State rows</td><td data-v-8cbfa422>Loading / unavailable / empty: centered on both axes, muted 14px; warning color only for the unavailable case.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Shortcut bar</td><td data-v-8cbfa422>The footer: full-bleed, padding 8px 16px, <code data-v-8cbfa422>border-top --color-line</code>, left-aligned. Keyboard hints are Kbd keycaps + 12px <code data-v-8cbfa422>--color-text-faint</code> labels, groups separated by "·", the whole bar <code data-v-8cbfa422>aria-hidden</code>. An instructional sentence (folder browser) reuses the same bar without keycaps.</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Keyboard & behavior contract</h4><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422><code data-v-8cbfa422>↑</code>/<code data-v-8cbfa422>↓</code> move a keyboard selection (rendered identical to hover) and always <code data-v-8cbfa422>scrollIntoView({ block: 'nearest' })</code>; <code data-v-8cbfa422>Enter</code> selects and closes; <code data-v-8cbfa422>Esc</code> closes.</li><li data-v-8cbfa422>Pointer hover drives the same selection index, so keyboard and mouse never disagree about which row is active.</li><li data-v-8cbfa422>Rows transition <code data-v-8cbfa422>background</code> only (<code data-v-8cbfa422>--duration-fast</code> ease-out); the open/close animation lives in the primitive, not in the consumer.</li><li data-v-8cbfa422>Selection is a fill, not a border (surface over stroke). Accent blue is reserved for actions — primary buttons and focus rings — never for "which row am I on".</li></ul><h4 class="mini" data-v-8cbfa422>Dialog map</h4><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Dialog</th><th data-v-8cbfa422>Anatomy</th><th data-v-8cbfa422>Composition</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Model picker</td><td data-v-8cbfa422>flush · lg · fixed</td><td data-v-8cbfa422>search + provider chips + model rows + shortcut bar</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Session search</td><td data-v-8cbfa422>flush · lg · fixed</td><td data-v-8cbfa422>search + result rows (sidebar-style alignment: one icon gutter, shared left text edge, shared right meta edge; workspace rows single-line name + right-aligned path, session rows title + time over a workspace · snippet meta line; quiet uppercase section heads with counts; empty query shows a few top workspaces + recent sessions) + shortcut bar</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Folder browser</td><td data-v-8cbfa422>flush · lg · fixed</td><td data-v-8cbfa422>breadcrumb bar + filter bar + folder rows + actions + hint bar</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Provider manager</td><td data-v-8cbfa422>flush · xl · fixed</td><td data-v-8cbfa422>management rows with inset dividers (rows are not selectable) + add section + shortcut bar</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Confirm / Login / Status</td><td data-v-8cbfa422>padded · md · auto</td><td data-v-8cbfa422>title + message or form + right-aligned foot</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>App update (desktop)</td><td data-v-8cbfa422>padded · lg · auto</td><td data-v-8cbfa422>version 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)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Server token</td><td data-v-8cbfa422>padded · md · auto</td><td data-v-8cbfa422><code data-v-8cbfa422>hideClose</code>, no Esc/overlay close — resolved only by a valid token</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Settings</td><td data-v-8cbfa422>flush · xl · fixed</td><td data-v-8cbfa422>page-like exception: side-nav region, per §03</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Onboarding wizard</td><td data-v-8cbfa422>not a Dialog</td><td data-v-8cbfa422>full-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 <code data-v-8cbfa422>--color-line</code> hairline, <code data-v-8cbfa422>--color-accent</code> border + <code data-v-8cbfa422>--color-accent-soft</code> fill when selected</td></tr></tbody></table><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422><b data-v-8cbfa422>Design intent:</b> 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. </div></div></section>',5))])])])]))}}),Rt=E(Dt,[["__scopeId","data-v-8cbfa422"]]);export{Rt as default}; diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-DT_ORWRp.css b/apps/kimi-code/dist-web/assets/DesignSystemView-DT_ORWRp.css new file mode 100644 index 000000000..5d141c49a --- /dev/null +++ b/apps/kimi-code/dist-web/assets/DesignSystemView-DT_ORWRp.css @@ -0,0 +1 @@ +.ds-page[data-v-8cbfa422]{--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-8cbfa422] *,.ds-page[data-v-8cbfa422] *:before,.ds-page[data-v-8cbfa422] *:after{box-sizing:border-box}.ds-page[data-v-8cbfa422]{scroll-behavior:smooth}.ds-page[data-v-8cbfa422]{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-8cbfa422],h2[data-v-8cbfa422],h3[data-v-8cbfa422],h4[data-v-8cbfa422]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-8cbfa422]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-8cbfa422]{color:var(--d-accent-2);text-decoration:none}a[data-v-8cbfa422]:hover{text-decoration:underline}code[data-v-8cbfa422],pre[data-v-8cbfa422],.mono[data-v-8cbfa422]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-8cbfa422]{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-8cbfa422]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-8cbfa422]{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-8cbfa422]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-8cbfa422]{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-8cbfa422]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-8cbfa422]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-8cbfa422]{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-8cbfa422]{font-size:12px;font-weight:600;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-8cbfa422]{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-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-8cbfa422]:hover{background:var(--color-hover);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-8cbfa422]{background:var(--color-hover);color:var(--d-fg)}.nav a.active .num[data-v-8cbfa422]{color:var(--d-fg-soft)}.content[data-v-8cbfa422]{min-width:0}.content-inner[data-v-8cbfa422]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-8cbfa422]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-8cbfa422]{margin-top:72px}.hero[data-v-8cbfa422]{padding:8px 0 40px;border-bottom:.5px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-8cbfa422]{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-8cbfa422]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-8cbfa422]{color:var(--d-accent)}.hero p.lead[data-v-8cbfa422]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-8cbfa422]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-8cbfa422]{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-8cbfa422]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-8cbfa422]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-8cbfa422]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-8cbfa422]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-8cbfa422]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-8cbfa422]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-8cbfa422]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-8cbfa422]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-8cbfa422]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-8cbfa422]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-8cbfa422]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-8cbfa422]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-8cbfa422]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-8cbfa422]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-8cbfa422]{color:var(--d-amber)}.stat.bad[data-v-8cbfa422]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-8cbfa422]{color:var(--d-red)}.stat.good[data-v-8cbfa422]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-8cbfa422]{color:var(--d-green)}.panel[data-v-8cbfa422]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-8cbfa422]{padding:22px}.panel-soft[data-v-8cbfa422]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px}.callout[data-v-8cbfa422]{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-8cbfa422]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-8cbfa422]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-8cbfa422]{background:var(--d-accent);color:#fff}.callout.warn[data-v-8cbfa422]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-8cbfa422]{background:var(--d-amber);color:#fff}.callout.good[data-v-8cbfa422]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-8cbfa422]{background:var(--d-green);color:#fff}table.dt[data-v-8cbfa422]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{border-bottom:none}table.dt td.tk[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-8cbfa422]{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-8cbfa422]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-8cbfa422]{border:.5px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-8cbfa422]{height:56px;border-bottom:.5px solid var(--d-line)}.color-meta[data-v-8cbfa422]{padding:10px 12px 12px}.color-meta .cn[data-v-8cbfa422]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-8cbfa422]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:.5px solid var(--d-line-2)}.type-row[data-v-8cbfa422]:last-child{border-bottom:none}.type-sample[data-v-8cbfa422]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-8cbfa422]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-8cbfa422]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:.5px solid var(--d-line-2)}.space-row[data-v-8cbfa422]:last-child{border-bottom:none}.space-bar[data-v-8cbfa422]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-8cbfa422]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-8cbfa422]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-8cbfa422]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-8cbfa422]{width:64px;height:64px;border:.5px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-8cbfa422]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-8cbfa422]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-8cbfa422]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-8cbfa422]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-8cbfa422]{display:flex;gap:6px}.tab[data-v-8cbfa422]{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-8cbfa422]{background:var(--d-bg);color:var(--d-fg);border:.5px solid var(--d-line)}.stage[data-v-8cbfa422]{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-8cbfa422]{flex-direction:column;align-items:stretch}.stage.dark[data-v-8cbfa422]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#0d1117}.stage-label[data-v-8cbfa422]{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-8cbfa422]{color:#6b7280}.ba[data-v-8cbfa422]{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-8cbfa422]{min-width:0}.ba-col+.ba-col[data-v-8cbfa422]{border-left:.5px solid var(--d-line)}.ba-head[data-v-8cbfa422]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:.5px solid var(--d-line)}.ba-head.before[data-v-8cbfa422]{background:var(--d-red-soft)}.ba-head.after[data-v-8cbfa422]{background:var(--d-green-soft)}.ba-head .bh[data-v-8cbfa422]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-8cbfa422]{color:var(--d-red)}.ba-head.after .bh[data-v-8cbfa422]{color:var(--d-green)}.ba-head .bh small[data-v-8cbfa422]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-8cbfa422]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-8cbfa422]{background:#fff}.code[data-v-8cbfa422]{background:#0d1117;border-radius:12px;overflow:hidden;margin:16px 0;border:.5px solid #1c2128}.code-bar[data-v-8cbfa422]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#13181e;border-bottom:.5px solid #1c2128}.code-bar .d[data-v-8cbfa422]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-8cbfa422]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-8cbfa422]{color:#8b949e}.code .k[data-v-8cbfa422]{color:#ff7b72}.code .s[data-v-8cbfa422]{color:#a5d6ff}.code .p[data-v-8cbfa422]{color:#79c0ff}.code .n[data-v-8cbfa422]{color:#d2a8ff}.code .v[data-v-8cbfa422]{color:#ffa657}.pill[data-v-8cbfa422]{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-8cbfa422]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-8cbfa422]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-8cbfa422]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-8cbfa422]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-8cbfa422]{font-family:JetBrains Mono,monospace}ul.clean[data-v-8cbfa422]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-8cbfa422]{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-8cbfa422]:last-child{border-bottom:none}ul.clean li[data-v-8cbfa422]: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-8cbfa422]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-8cbfa422]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-8cbfa422]{color:var(--d-fg)}ul.clean li .path[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-8cbfa422]{position:relative;margin:24px 0}.phase[data-v-8cbfa422]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-8cbfa422]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-8cbfa422]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-8cbfa422]{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-8cbfa422]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-8cbfa422]{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-8cbfa422]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-8cbfa422]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-8cbfa422]{margin:0}.matrix[data-v-8cbfa422]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-8cbfa422]{border:.5px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-8cbfa422]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-8cbfa422]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-8cbfa422]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-8cbfa422]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-8cbfa422]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-8cbfa422]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{grid-template-columns:1fr}.sidebar[data-v-8cbfa422]{position:static;height:auto}.nav[data-v-8cbfa422]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-8cbfa422]{padding:40px 22px 80px}.stat-grid[data-v-8cbfa422]{grid-template-columns:repeat(2,1fr)}.ba[data-v-8cbfa422]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-8cbfa422]{border-left:none;border-top:.5px solid var(--d-line)}.palette[data-v-8cbfa422]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-8cbfa422]{grid-template-columns:1fr}}.ds-page .p[data-v-8cbfa422],.ds-page .stage.p-skin[data-v-8cbfa422],.ds-page [data-p][data-v-8cbfa422]{--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-8cbfa422]{--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-8cbfa422]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-8cbfa422]{--_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-8cbfa422]:active{transform:scale(.98)}.p-btn[data-v-8cbfa422]: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-8cbfa422]{width:16px;height:16px}.p-btn.sm[data-v-8cbfa422]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-8cbfa422]{width:14px;height:14px}.p-btn.lg[data-v-8cbfa422]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-8cbfa422]{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-8cbfa422]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-8cbfa422]{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-8cbfa422]:hover{background:var(--p-hover);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-8cbfa422]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-8cbfa422]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-btn.danger[data-v-8cbfa422]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-8cbfa422]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-8cbfa422]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-8cbfa422]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn[disabled][data-v-8cbfa422],.p-btn.disabled[data-v-8cbfa422]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-8cbfa422]{--_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-8cbfa422]:hover{background:var(--p-hover);color:var(--p-text)}.p-icon-btn[data-v-8cbfa422]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-8cbfa422]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-8cbfa422]{--_s: 44px}.p-icon-btn .p-ic[data-v-8cbfa422]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-8cbfa422]{width:20px;height:20px}.p-badge[data-v-8cbfa422]{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-8cbfa422]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-8cbfa422]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-8cbfa422]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-8cbfa422]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-8cbfa422]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-8cbfa422]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-8cbfa422]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-8cbfa422]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-8cbfa422]{width:12px;height:12px}.p-kbd[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-pill .pp-strong[data-v-8cbfa422]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-8cbfa422]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-8cbfa422]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-8cbfa422]{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-8cbfa422]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-8cbfa422]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-8cbfa422]{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-8cbfa422]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-8cbfa422]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-8cbfa422],.p-select[data-v-8cbfa422],.p-textarea[data-v-8cbfa422]{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-8cbfa422]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-select[data-v-8cbfa422]{display:flex;align-items:center;justify-content:space-between;text-align:left}.p-select[data-v-8cbfa422]:after{content:"⌄";color:var(--p-text-muted)}.p-input[data-v-8cbfa422]:hover,.p-select[data-v-8cbfa422]:hover,.p-textarea[data-v-8cbfa422]:hover{border-color:var(--p-line-strong)}.p-input[data-v-8cbfa422]:focus,.p-select[data-v-8cbfa422]:focus,.p-textarea[data-v-8cbfa422]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-8cbfa422]::placeholder,.p-textarea[data-v-8cbfa422]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-8cbfa422]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-8cbfa422]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-8cbfa422]{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-8cbfa422]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-8cbfa422]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-8cbfa422]{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-8cbfa422]{padding:4px 22px 18px}.p-dialog-foot[data-v-8cbfa422]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-8cbfa422]{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-8cbfa422]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-8cbfa422]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-8cbfa422]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-8cbfa422]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-8cbfa422]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-action-toast[data-v-8cbfa422]{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-8cbfa422]{border:0;padding:0;background:none;color:var(--p-accent);cursor:pointer;font:inherit}.p-action-toast .x[data-v-8cbfa422]{color:var(--p-text-muted);width:14px;height:14px}.p-spinner[data-v-8cbfa422]{width:18px;height:18px;animation:p-spin-8cbfa422 .85s linear infinite}.p-spinner.sm[data-v-8cbfa422]{width:14px;height:14px}.p-spinner circle[data-v-8cbfa422]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-8cbfa422]{stroke:var(--p-line)}.p-spinner .arc[data-v-8cbfa422]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-8cbfa422{to{transform:rotate(360deg)}}.p-thinking[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{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-8cbfa422]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{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-8cbfa422]{display:flex;align-items:center;gap:9px;padding:14px 16px 0}.p-action-title[data-v-8cbfa422]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-action-body[data-v-8cbfa422]{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-8cbfa422]{display:flex;gap:8px;margin-top:12px;padding:10px 16px;border-top:.5px solid var(--p-line)}.p-opts[data-v-8cbfa422]{display:flex;flex-direction:column;gap:2px;margin-top:12px;padding:12px 16px;border-top:.5px solid var(--p-line)}.p-opt[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{display:flex;flex-direction:column;gap:2px;min-width:0}.p-opt-text .l[data-v-8cbfa422]{font-weight:500}.p-opt-text .d[data-v-8cbfa422]{font-size:var(--p-font-size-xs);color:var(--p-text-muted);line-height:var(--p-leading-normal)}.p-todo[data-v-8cbfa422]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-8cbfa422]{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-8cbfa422]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-8cbfa422]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-8cbfa422]{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-8cbfa422]{width:14px;height:14px}.p-todo-row.active .p-todo-check[data-v-8cbfa422]{color:var(--p-accent)}.p-todo-row.done .p-todo-check[data-v-8cbfa422]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-8cbfa422]{color:var(--p-accent);font-weight:500}.p-dot[data-v-8cbfa422]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-8cbfa422]{background:var(--p-success)}.p-dot.error[data-v-8cbfa422]{background:var(--p-danger)}.p-dot.running[data-v-8cbfa422]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-8cbfa422 1.4s ease-out infinite}@keyframes p-pulse-8cbfa422{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-8cbfa422]{overflow:hidden}.p-tool-group-head[data-v-8cbfa422]{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-8cbfa422]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-group-head[data-v-8cbfa422]:hover{color:var(--p-text)}.p-tool-group-head .tg-title[data-v-8cbfa422]{font-weight:500}.p-tool-group-head .tg-meta[data-v-8cbfa422]{color:var(--p-text-faint);font-weight:400}.p-tool-group-head .tg-car[data-v-8cbfa422]{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-8cbfa422]{transform:rotate(90deg)}.p-tool-row[data-v-8cbfa422]{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-8cbfa422]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-8cbfa422]{font-weight:400;color:var(--p-text-muted);flex:none}.p-tool-row .tr-file[data-v-8cbfa422]{font-weight:400;color:var(--p-text);flex:none}.p-tool-row .tr-file[data-v-8cbfa422]:hover{color:var(--p-accent);text-decoration:underline;text-underline-offset:3px}.p-tool-row .tr-mono[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add[data-v-8cbfa422]{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-8cbfa422],.p-tool-row .tr-add~.tr-add[data-v-8cbfa422]{margin-left:0}.p-tool-row .tr-del[data-v-8cbfa422]{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-8cbfa422]{display:inline-flex;width:36px;height:3px;border-radius:999px;overflow:hidden;gap:1px;flex:none}.p-tool-row .tr-ok[data-v-8cbfa422]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-8cbfa422]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-agent-card[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{width:14px;height:14px}.p-agent-card .pa-main[data-v-8cbfa422]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-agent-card .pa-task[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-agent-card .pa-go[data-v-8cbfa422]{color:var(--p-text-faint);flex:none}.p-tool-row.expanded .tr-car[data-v-8cbfa422]{transform:rotate(90deg)}.p-tool-detail[data-v-8cbfa422]{padding:2px 8px 4px 0}.p-tool-detail .p-code[data-v-8cbfa422]{margin-top:4px}.p-composer[data-v-8cbfa422]{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-8cbfa422]: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-8cbfa422]:focus-within:after{opacity:1}.p-composer-ta[data-v-8cbfa422]{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-8cbfa422]{color:var(--p-text-faint)}.p-composer-bar[data-v-8cbfa422]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px 8px}.p-composer-strip[data-v-8cbfa422]{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-8cbfa422]{width:16px;height:16px;color:var(--p-text-faint)}.p-composer-left[data-v-8cbfa422],.p-composer-right[data-v-8cbfa422]{display:flex;align-items:center;gap:4px}.p-composer .p-icon-btn[data-v-8cbfa422]{border-radius:var(--p-r-full)}.p-send[data-v-8cbfa422]{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-8cbfa422]: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-8cbfa422]:hover:after{opacity:.28}.p-send[data-v-8cbfa422]:active{transform:scale(.92)}.p-send .p-ic[data-v-8cbfa422]{width:16px;height:16px}.dw-bar[data-v-8cbfa422]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5)}.am-mock[data-v-8cbfa422]{display:flex;flex-direction:column;gap:var(--menu-rows-seam);width:100%;max-width:420px;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--p-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--p-sh-menu);font-family:var(--font-ui)}.am-mock-row[data-v-8cbfa422]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:.5px solid transparent;border-radius:var(--radius-menu-row);corner-shape:var(--corner-shape-menu);color:var(--p-text);font-size:var(--p-font-size-base)}.am-mock-row.focus[data-v-8cbfa422]{background:var(--color-selected)}.am-mock-row .n[data-v-8cbfa422]{font-weight:var(--weight-medium)}.am-mock-row .d[data-v-8cbfa422]{margin-left:var(--space-1);color:var(--p-text-muted);font-size:var(--text-sm)}.dw-pill[data-v-8cbfa422]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1-5);padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-normal)}.dw-pill[data-v-8cbfa422] svg{width:1.5em;height:1.5em}.dw-pill.on[data-v-8cbfa422]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);pointer-events:none}.dw-pill .dw-count[data-v-8cbfa422]{color:var(--p-text-muted)}.dw-pill .dw-running[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted)}.dw-pill .dw-live[data-v-8cbfa422]{color:var(--p-success);font-weight:var(--weight-medium)}.dw-panel[data-v-8cbfa422]{width:100%;border:.5px solid var(--p-line);border-radius:var(--radius-2xl);background:color-mix(in srgb,var(--p-bg) 70%,transparent);box-shadow:var(--p-sh-menu);overflow:hidden}.dw-head[data-v-8cbfa422]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-4) var(--space-4) 0}.dw-tab[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:var(--space-2);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-tab[data-v-8cbfa422] svg{width:1.5em;height:1.5em}.dw-tab .dw-meta[data-v-8cbfa422]{color:var(--p-text-muted)}.dw-chips[data-v-8cbfa422]{margin-left:auto;display:inline-flex;gap:var(--space-05);padding:var(--space-05);background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md)}.dw-chip[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--p-sp-3);border-radius:var(--p-r-sm);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-chip.on[data-v-8cbfa422]{color:var(--p-text);background:var(--p-surface-raised);box-shadow:var(--p-sh-sm)}.dw-body[data-v-8cbfa422]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dw-body.col[data-v-8cbfa422]{display:flex;flex-direction:column}.dw-row[data-v-8cbfa422]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) 0;color:var(--p-text);font-size:var(--p-font-size-base)}.dw-row .nm[data-v-8cbfa422]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-row .tm[data-v-8cbfa422]{flex:none;color:var(--p-text-muted);font-variant-numeric:tabular-nums}.dw-row .ok[data-v-8cbfa422]{color:var(--p-success);transform:scale(.91)}.dw-row.fail .nm[data-v-8cbfa422],.dw-row.fail[data-v-8cbfa422] svg{color:var(--p-danger)}.dw-row.cancelled[data-v-8cbfa422] svg{color:var(--p-text-muted)}.dw-body.grid[data-v-8cbfa422]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.dw-card[data-v-8cbfa422]{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.dw-card .ct[data-v-8cbfa422]{display:flex;align-items:center;gap:var(--space-2)}.dw-card .nm[data-v-8cbfa422]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium)}.dw-card .nu[data-v-8cbfa422]{flex:none;color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-variant-numeric:tabular-nums}.dw-card .ds[data-v-8cbfa422]{color:var(--p-text-muted);font-size:var(--p-font-size-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.dw-card .cs[data-v-8cbfa422]{display:flex;align-items:center;justify-content:space-between;color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cf[data-v-8cbfa422]{display:flex;flex-direction:column;gap:var(--space-1)}.dw-card .cm[data-v-8cbfa422]{display:flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cm span[data-v-8cbfa422]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-card .cs .sl[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:var(--space-1)}.dw-card .cs .sl .ok[data-v-8cbfa422]{color:var(--p-success);transform:scale(.91)}.dw-card .cs .tm[data-v-8cbfa422]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);font-variant-numeric:tabular-nums}.dw-card.fail .cs .sl[data-v-8cbfa422]{color:var(--p-danger)}.dw-ring[data-v-8cbfa422]{display:inline-block;width:var(--p-ic-md);height:var(--p-ic-md);border:1.5px solid var(--p-line-strong);border-radius:var(--radius-full);vertical-align:middle}.dw-spin[data-v-8cbfa422]{display:inline-flex;color:var(--p-text);vertical-align:middle}.dt td .kw-dot[data-v-8cbfa422],.dt td[data-v-8cbfa422] svg{vertical-align:middle}.p[data-v-8cbfa422] ::selection,[data-p][data-v-8cbfa422] ::selection{background:var(--p-selection)}.p-link[data-v-8cbfa422]{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-8cbfa422]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-8cbfa422]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-8cbfa422]{color:var(--p-text-muted)}.p-link.muted[data-v-8cbfa422]:hover{color:var(--p-text)}.p-link .p-ic[data-v-8cbfa422]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-menu-item.active[data-v-8cbfa422],.p-menu-item.active[data-v-8cbfa422]:hover{background:var(--p-hover);color:var(--p-text)}.p-menu-item.danger[data-v-8cbfa422]{color:var(--p-danger)}.p-menu-item.danger[data-v-8cbfa422]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-8cbfa422]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-8cbfa422]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-8cbfa422]{width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--p-muted)}.p-menu-item:hover .p-ic[data-v-8cbfa422]{color:var(--p-text-strong)}.p-menu-item.active .p-ic[data-v-8cbfa422]{color:var(--p-accent-hover)}.p-menu-item.danger .p-ic[data-v-8cbfa422]{color:var(--p-danger)}.p-menu-item.lg[data-v-8cbfa422]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-sm)}.p-menu-sep[data-v-8cbfa422]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]:hover{color:var(--p-text)}.p-seg-item.on[data-v-8cbfa422]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-sm)}.p-tabs[data-v-8cbfa422]{display:flex;align-items:center;gap:0;border-bottom:.5px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-8cbfa422]{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-8cbfa422]:hover{color:var(--p-text)}.p-tab.on[data-v-8cbfa422]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-8cbfa422]{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-8cbfa422]: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-8cbfa422]:hover:after{transform:scaleX(1.125)}.p-switch.on[data-v-8cbfa422]{background:var(--p-accent)}.p-switch.on[data-v-8cbfa422]:after{transform:translate(16px);transform-origin:right center}.p-switch.on[data-v-8cbfa422]:hover:after{transform:translate(16px) scaleX(1.125)}.p-switch[data-v-8cbfa422]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-8cbfa422]{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-8cbfa422]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-8cbfa422]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-8cbfa422]{width:12px;height:12px}.p-avatar[data-v-8cbfa422]{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-8cbfa422]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-8cbfa422]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-8cbfa422]{width:13px;height:13px}.p-empty[data-v-8cbfa422]{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-8cbfa422]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-8cbfa422]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-8cbfa422]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-8cbfa422]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-8cbfa422]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-turn-failed[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.p-turn-failed .tf-main[data-v-8cbfa422]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-turn-failed .tf-title[data-v-8cbfa422]{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-8cbfa422],.p-turn-failed .tf-meta[data-v-8cbfa422]{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-8cbfa422]{font-family:var(--font-mono);color:var(--color-text-faint)}.p-tip[data-v-8cbfa422]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-8cbfa422]{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-8cbfa422]{opacity:1}.p-banner[data-v-8cbfa422]{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-8cbfa422]{width:18px;height:18px;flex:none}.p-banner.info[data-v-8cbfa422]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-8cbfa422]{color:var(--p-accent)}.p-banner.warning[data-v-8cbfa422]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-8cbfa422]{color:var(--p-warning)}.p-banner.danger[data-v-8cbfa422]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-8cbfa422]{color:var(--p-danger)}.p-sheet[data-v-8cbfa422]{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-8cbfa422]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-8cbfa422]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-8cbfa422 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-8cbfa422{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-8cbfa422]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-8cbfa422]{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-8cbfa422]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-8cbfa422]{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-8cbfa422]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-8cbfa422]{width:15px;height:15px}.p-topbar[data-v-8cbfa422]{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-8cbfa422]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-8cbfa422]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-8cbfa422]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-8cbfa422]{background:#161b22b8;border-color:#ffffff14}.demo-row[data-v-8cbfa422]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-8cbfa422]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-8cbfa422]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-8cbfa422]{flex:1;min-width:0}.demo-chat[data-v-8cbfa422]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-8cbfa422]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-8cbfa422]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-8cbfa422]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]{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-8cbfa422]{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-8cbfa422]{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-8cbfa422]{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-8cbfa422]{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-8cbfa422]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-8cbfa422]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-8cbfa422]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-8cbfa422]{color:var(--p-success)}.p-diff-row.del[data-v-8cbfa422]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-8cbfa422]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-8cbfa422]{color:var(--p-text)}.p-field-error[data-v-8cbfa422]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-8cbfa422]{vertical-align:middle}.p-btn .p-spinner .track[data-v-8cbfa422]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-8cbfa422]{stroke:currentColor}.ds-page[data-v-8cbfa422]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-8cbfa422]{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-8cbfa422]{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-8cbfa422]:hover{background:var(--color-hover)}.ds-topbar-title[data-v-8cbfa422]{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-OnWAAu0u.js b/apps/kimi-code/dist-web/assets/DesignSystemView-OnWAAu0u.js deleted file mode 100644 index c5ab47373..000000000 --- a/apps/kimi-code/dist-web/assets/DesignSystemView-OnWAAu0u.js +++ /dev/null @@ -1,13 +0,0 @@ -import{M as T,aD as q,aI as B,aL as f,u as l,v as a,G as i,H as t,F as u,aX as y,bb as k,I as s,bk as d,cx as o,cy as A,cz as x,cA as M,cB as h,cC as I,cD as E}from"./index-CgXirkUy.js";const V={class:"ds-page"},D={class:"layout"},H={class:"content"},L={class:"content-inner"},R={id:"tokens"},O={class:"icon-sizes"},W={class:"sz"},N={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},U={class:"sz"},P={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},F={class:"sz"},j={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},G={class:"icon-grid"},K={class:"icon-group-label"},J={class:"ic-name"},Q={id:"primitives"},Y={class:"stage-wrap"},Z={class:"stage p"},X={class:"p-pill",style:{color:"var(--p-warning)"}},$={class:"stage-wrap"},_={class:"stage p col"},ee={class:"demo-row"},ae={class:"p-btn primary disabled"},te={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},se={class:"stage-wrap"},de={class:"stage p col"},oe={class:"demo-row"},ie={class:"stage-wrap"},ne={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},fe={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},le={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},re={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ce={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ve={id:"chat"},pe={class:"stage-wrap"},he={class:"stage p col"},ue={style:{"max-width":"560px",width:"100%"}},ge={class:"stage-wrap"},me={class:"stage p col",style:{"align-items":"center",background:"#fff"}},be={class:"p-composer",style:{width:"100%","max-width":"620px"}},we={class:"p-composer-bar"},ye={class:"p-composer-left"},ke={class:"p-pill",style:{color:"var(--p-warning)"}},xe={class:"stage-wrap"},Ce={class:"stage p",style:{background:"var(--p-bg)"}},Se={class:"am-mock"},ze={class:"am-mock-row focus"},Te={class:"am-mock-row"},qe={class:"am-mock-row"},Be={class:"am-mock-row"},Ae={class:"dt"},Me={class:"dw-spin"},Ie={class:"stage-wrap"},Ee={class:"stage p",style:{background:"var(--p-bg)"}},Ve={class:"dw-bar"},De={class:"dw-pill"},He={class:"dw-pill"},Le={class:"dw-pill on"},Re={class:"dw-running"},Oe={class:"dw-pill"},We={class:"stage-wrap"},Ne={class:"stage p col",style:{background:"var(--p-bg)",gap:"var(--space-4)"}},Ue={class:"dw-panel"},Pe={class:"dw-head"},Fe={class:"dw-tab"},je={class:"dw-chips"},Ge={class:"dw-chip on"},Ke={class:"dw-chip"},Je={class:"dw-chip"},Qe={class:"dw-chip"},Ye={class:"dw-body col"},Ze={class:"dw-row"},Xe={class:"dw-row"},$e={class:"dw-row fail"},_e={class:"dw-row cancelled"},ea={class:"dw-panel"},aa={class:"dw-head"},ta={class:"dw-tab"},sa={class:"dw-chips"},da={class:"dw-chip on"},oa={class:"dw-chip"},ia={class:"dw-chip"},na={class:"dw-chip"},fa={class:"dw-body grid"},la={class:"dw-card"},ra={class:"cf"},ca={class:"cm"},va={class:"cs"},pa={class:"sl"},ha={class:"tm"},ua={class:"dw-card"},ga={class:"cf"},ma={class:"cm"},ba={class:"cs"},wa={class:"sl"},ya={class:"tm"},ka={class:"dw-card fail"},xa={class:"cf"},Ca={class:"cm"},Sa={class:"cs"},za={class:"sl"},Ta={class:"tm"},qa={class:"dw-card"},Ba={class:"cf"},Aa={class:"cm"},Ma={class:"cs"},Ia={class:"sl"},Ea={class:"tm"},Va="/repo",Da=T({__name:"DesignSystemView",emits:["close"],setup(Ha,{emit:C}){const S=[{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 g(){}const z=C;function m(){z("close")}let p=null;function b(v){v.key==="Escape"&&m()}return q(()=>{document.addEventListener("keydown",b);const v=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),e=new Map;v.forEach(c=>{const n=c.getAttribute("href");if(!n)return;const w=document.getElementById(n.slice(1));w&&e.set(w,c)});let r=null;p=new IntersectionObserver(c=>{c.forEach(n=>{n.isIntersecting&&(r&&r.classList.remove("active"),r=e.get(n.target)??null,r&&r.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),e.forEach((c,n)=>p.observe(n)),v.length&&v[0].classList.add("active")}),B(()=>{document.removeEventListener("keydown",b),p&&(p.disconnect(),p=null)}),(v,e)=>(f(),l("div",V,[a("div",{class:"ds-topbar"},[a("button",{class:"ds-back",type:"button",onClick:m},"← Back"),e[0]||(e[0]=a("span",{class:"ds-topbar-title"},"Design system",-1))]),a("div",D,[e[146]||(e[146]=i('<aside class="sidebar" data-v-fe383fe9><div class="brand" data-v-fe383fe9><div class="brand-mark" data-v-fe383fe9>K</div><div class="brand-name" data-v-fe383fe9>Kimi Web</div></div><div class="brand-sub" data-v-fe383fe9>Design System · v1.0</div><div class="nav-group" data-v-fe383fe9>Navigate</div><nav class="nav" id="nav" data-v-fe383fe9><a href="#overview" data-v-fe383fe9><span class="num" data-v-fe383fe9>00</span>Overview</a><a href="#principles" data-v-fe383fe9><span class="num" data-v-fe383fe9>01</span>Design Principles</a><a href="#tokens" data-v-fe383fe9><span class="num" data-v-fe383fe9>02</span>Design Tokens</a><a href="#primitives" data-v-fe383fe9><span class="num" data-v-fe383fe9>03</span>Primitives</a><a href="#chat" data-v-fe383fe9><span class="num" data-v-fe383fe9>04</span>Chat Interface</a><a href="#themes" data-v-fe383fe9><span class="num" data-v-fe383fe9>05</span>Theming</a><a href="#rules" data-v-fe383fe9><span class="num" data-v-fe383fe9>06</span>Style Rules</a><a href="#shell" data-v-fe383fe9><span class="num" data-v-fe383fe9>07</span>App Shell & Sidebar</a><a href="#a11y" data-v-fe383fe9><span class="num" data-v-fe383fe9>08</span>Accessibility</a><a href="#dialogs" data-v-fe383fe9><span class="num" data-v-fe383fe9>09</span>Dialogs</a></nav><div class="nav-group" data-v-fe383fe9>Companion output</div><nav class="nav" data-v-fe383fe9><a href="#tokens" data-v-fe383fe9><span class="num" data-v-fe383fe9>↗</span>Token list</a><a href="#primitives" data-v-fe383fe9><span class="num" data-v-fe383fe9>↗</span>Component API</a><a href="#rules" data-v-fe383fe9><span class="num" data-v-fe383fe9>↗</span>Style rules</a></nav></aside>',1)),a("main",H,[a("div",L,[e[144]||(e[144]=i('<section id="overview" data-v-fe383fe9><div class="hero" data-v-fe383fe9><span class="eyebrow" data-v-fe383fe9>● Design System · v1.0</span><h1 data-v-fe383fe9>Kimi Web <span class="grad" data-v-fe383fe9>Design System</span></h1><p class="lead" data-v-fe383fe9> 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. </p><div class="hero-meta" data-v-fe383fe9><span class="meta-chip" data-v-fe383fe9><span class="dot" data-v-fe383fe9></span> Scope <b data-v-fe383fe9>apps/kimi-web</b></span><span class="meta-chip" data-v-fe383fe9>Component primitives</span><span class="meta-chip" data-v-fe383fe9>Theme <b data-v-fe383fe9>1 set · 4 customizable colors</b></span><span class="meta-chip" data-v-fe383fe9>Light / dark mode</span></div></div><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9><b data-v-fe383fe9>This spec is the single reference when changing the web UI.</b> 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. </div></div></section><section id="principles" data-v-fe383fe9><div class="sec-head" data-v-fe383fe9><span class="sec-num" data-v-fe383fe9>01</span><h2 class="sec-title" data-v-fe383fe9>Design Principles</h2></div><p class="sec-desc" data-v-fe383fe9> 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. </p><ul class="clean check" data-v-fe383fe9><li data-v-fe383fe9><b data-v-fe383fe9>Consistency</b> —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.</li><li data-v-fe383fe9><b data-v-fe383fe9>Hierarchy</b> —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".</li><li data-v-fe383fe9><b data-v-fe383fe9>Proximity</b> —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.</li><li data-v-fe383fe9><b data-v-fe383fe9>Feedback</b> —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.</li><li data-v-fe383fe9><b data-v-fe383fe9>Breathing room</b> —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.</li><li data-v-fe383fe9><b data-v-fe383fe9>Accessibility (A11y)</b> —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.</li><li data-v-fe383fe9><b data-v-fe383fe9>Reduction</b> —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.</li></ul><div class="callout good" data-v-fe383fe9><span class="ico" data-v-fe383fe9>✓</span><div data-v-fe383fe9><b data-v-fe383fe9>Brand tone (the do-not list)</b>: calm, clinical, never exaggerated. <span class="pill red" style="margin:0 4px;" data-v-fe383fe9>Reject</span> 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. </div></div><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9><b data-v-fe383fe9>Declare design intent first (Design Read)</b>: 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. </div></div></section>',2)),a("section",R,[e[7]||(e[7]=i(`<div class="sec-head" data-v-fe383fe9><span class="sec-num" data-v-fe383fe9>02</span><h2 class="sec-title" data-v-fe383fe9>Design Tokens</h2></div><p class="sec-desc" data-v-fe383fe9> Collapse every visual decision into tokens. <b data-v-fe383fe9>Color tokens keep the existing short names and fill out the semantics</b> (lowering migration cost), while <b data-v-fe383fe9>spacing, z-index, motion, and font-weight</b> fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage. </p><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9><b data-v-fe383fe9>Naming convention</b>: <code data-v-fe383fe9>--<category>-<role>-<state></code>. For example <code data-v-fe383fe9>--color-text-muted</code>, <code data-v-fe383fe9>--radius-md</code>, <code data-v-fe383fe9>--space-4</code>. To reduce churn, the existing short names (<code data-v-fe383fe9>--bg</code> / <code data-v-fe383fe9>--ink</code> / <code data-v-fe383fe9>--line</code> / <code data-v-fe383fe9>--blue</code> …) are kept as <b data-v-fe383fe9>compatibility aliases</b> for one release cycle. </div></div><h3 class="sub" data-v-fe383fe9>Color</h3><p data-v-fe383fe9>Semantic-first, in three layers: <b data-v-fe383fe9>background / text / border</b> + <b data-v-fe383fe9>accent</b> + <b data-v-fe383fe9>status colors</b>. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.</p><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9>The table below shows the <b data-v-fe383fe9>semantic tokens</b>. Each ships a light value in <code data-v-fe383fe9>:root</code> and a dark override in the <code data-v-fe383fe9>data-color-scheme</code> blocks — for example <code data-v-fe383fe9>--color-bg</code> is <code data-v-fe383fe9>#ffffff</code> in light and <code data-v-fe383fe9>#121212</code> in dark; <code data-v-fe383fe9>--color-accent</code> is the brand blue (<code data-v-fe383fe9>#1783ff</code> light / <code data-v-fe383fe9>#1a88ff</code> dark). The <b data-v-fe383fe9>semantic status colors</b> (success / warning / danger / info) are independent palettes, one set each for light / dark.</div></div><div class="palette" data-v-fe383fe9><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:#ffffff;" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>bg</div><div class="cv" data-v-fe383fe9>#ffffff / #121212</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:#f5f5f5;" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>surface</div><div class="cv" data-v-fe383fe9>#f5f5f5 / #1f1f1f</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:#f5f5f5;" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>surface-sunken</div><div class="cv" data-v-fe383fe9>#f5f5f5 / #121212</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:#f5f5f5;" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>well</div><div class="cv" data-v-fe383fe9>#f5f5f5 / #1f1f1f</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:#f5f5f5;" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>surface-deep</div><div class="cv" data-v-fe383fe9>#f5f5f5 / #0d0d0d</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:#fff;border:0.5px solid rgba(0,0,0,.13);" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>surface-overlay</div><div class="cv" data-v-fe383fe9>#ffffff / rgba(255,255,255,.1)</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:rgba(0,0,0,.05);" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>selected</div><div class="cv" data-v-fe383fe9>rgba(0,0,0,.05) / rgba(255,255,255,.1)</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:rgba(0,0,0,.9);" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>fg</div><div class="cv" data-v-fe383fe9>rgba(0,0,0,.9) / rgba(255,255,255,.84)</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:rgba(0,0,0,.6);" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>fg-muted</div><div class="cv" data-v-fe383fe9>rgba(0,0,0,.6) / rgba(255,255,255,.56)</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:rgba(0,0,0,.13);" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>line</div><div class="cv" data-v-fe383fe9>rgba(0,0,0,.13) / rgba(255,255,255,.12)</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:rgba(0,0,0,.05);" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>subtle</div><div class="cv" data-v-fe383fe9>rgba(0,0,0,.05) / rgba(255,255,255,.05)</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:#1783ff;" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>accent (KMBlue)</div><div class="cv" data-v-fe383fe9>#1783ff / #1a88ff</div></div></div><div class="color-card" data-v-fe383fe9><div class="color-chip" style="background:#e8f3ff;" data-v-fe383fe9></div><div class="color-meta" data-v-fe383fe9><div class="cn" data-v-fe383fe9>accent-soft</div><div class="cv" data-v-fe383fe9>#e8f3ff / rgba(26,136,255,.1)</div></div></div></div><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Token</th><th data-v-fe383fe9>Light</th><th data-v-fe383fe9>Dark</th><th data-v-fe383fe9>Usage</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-bg</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#fff;" data-v-fe383fe9></span>#ffffff</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#121212;" data-v-fe383fe9></span>#121212</td><td data-v-fe383fe9>Page background</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-surface</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#f5f5f5;" data-v-fe383fe9></span>#f5f5f5</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#1f1f1f;" data-v-fe383fe9></span>#1f1f1f</td><td data-v-fe383fe9>Panel / sidebar / card head</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-surface-raised</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#fff;" data-v-fe383fe9></span>#ffffff</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#292929;" data-v-fe383fe9></span>#292929</td><td data-v-fe383fe9>Raised card / dialog / input</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-menu-bg</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(255,255,255,.95);" data-v-fe383fe9></span>rgba(255,255,255,.95)</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(41,41,41,.95);" data-v-fe383fe9></span>rgba(41,41,41,.95)</td><td data-v-fe383fe9>Floating menu panel — frosted glass over <code data-v-fe383fe9>--p-menu-backdrop</code> blur</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-surface-overlay</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#fff;" data-v-fe383fe9></span>#ffffff</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-fe383fe9></span>rgba(255,255,255,.1)</td><td data-v-fe383fe9>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</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-well</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#f5f5f5;" data-v-fe383fe9></span>#f5f5f5</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#1f1f1f;" data-v-fe383fe9></span>#1f1f1f</td><td data-v-fe383fe9>Content 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 (<code data-v-fe383fe9>#121212</code>) vanishes into the page there</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-surface-deep</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#f5f5f5;" data-v-fe383fe9></span>#f5f5f5</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#0d0d0d;" data-v-fe383fe9></span>#0d0d0d</td><td data-v-fe383fe9>Deep chrome plane one step BELOW the page (panel headers, diff gutters) — dark drops under <code data-v-fe383fe9>--color-bg</code> so chrome framing stays darker than the content it frames</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-text</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.9);" data-v-fe383fe9></span>rgba(0,0,0,.9)</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(255,255,255,.84);" data-v-fe383fe9></span>rgba(255,255,255,.84)</td><td data-v-fe383fe9>Body text / headings</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-text-strong</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#000;" data-v-fe383fe9></span>#000000</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#fff;box-shadow:inset 0 0 0 1px #ddd;" data-v-fe383fe9></span>#ffffff</td><td data-v-fe383fe9>Max foreground emphasis — menu-row label & icon on hover</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-text-muted</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-fe383fe9></span>rgba(0,0,0,.6)</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(255,255,255,.56);" data-v-fe383fe9></span>rgba(255,255,255,.56)</td><td data-v-fe383fe9>Secondary text / placeholder</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-line</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.13);" data-v-fe383fe9></span>rgba(0,0,0,.13)</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(255,255,255,.12);" data-v-fe383fe9></span>rgba(255,255,255,.12)</td><td data-v-fe383fe9>Divider / card border</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-subtle</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.05);" data-v-fe383fe9></span>rgba(0,0,0,.05)</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(255,255,255,.05);" data-v-fe383fe9></span>rgba(255,255,255,.05)</td><td data-v-fe383fe9>Subtle hairline — tertiary separators below <code data-v-fe383fe9>--color-line</code> (diff-gutter column rules, quiet dividers inside wells)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-selected</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.05);" data-v-fe383fe9></span>rgba(0,0,0,.05)</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-fe383fe9></span>rgba(255,255,255,.1)</td><td data-v-fe383fe9>Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-hover</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.03);" data-v-fe383fe9></span>rgba(0,0,0,.03)</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(255,255,255,.05);" data-v-fe383fe9></span>rgba(255,255,255,.05)</td><td data-v-fe383fe9>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)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-selected-hover</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.08);" data-v-fe383fe9></span>rgba(0,0,0,.08)</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(255,255,255,.14);" data-v-fe383fe9></span>rgba(255,255,255,.14)</td><td data-v-fe383fe9>Hover of a control RESTING at the selected fill (work cards) — one rung above f2, below f3: hover deepens/brightens a step, never drops below the rest state</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-inline-code-bg</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.03);" data-v-fe383fe9></span>rgba(0,0,0,.03)</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-fe383fe9></span>rgba(255,255,255,.1)</td><td data-v-fe383fe9>Inline-code chip fill — fills.f1 / fills.f2; dark lifts off any dark surface (sunken == bg there)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-media-alpha-bg-1</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#858585;" data-v-fe383fe9></span>≈#858585</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#76797e;" data-v-fe383fe9></span>≈#76797e</td><td data-v-fe383fe9>Checkerboard square A of the <code data-v-fe383fe9><img></code> alpha canvas — color-mix of <code data-v-fe383fe9>--color-bg</code>/<code data-v-fe383fe9>--color-text</code> (52/48); applied via <code data-v-fe383fe9>--media-alpha-canvas</code> (16px period)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-media-alpha-bg-2</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#6b6b6b;" data-v-fe383fe9></span>≈#6b6b6b</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#8c8f93;" data-v-fe383fe9></span>≈#8c8f93</td><td data-v-fe383fe9>Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-sidebar-bg</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#f9fbfc;" data-v-fe383fe9></span>#f9fbfc</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#0d0d0d;" data-v-fe383fe9></span>#0d0d0d</td><td data-v-fe383fe9>Sidebar surface — one step off <code data-v-fe383fe9>--color-bg</code> (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</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-scrim</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.4);" data-v-fe383fe9></span>rgba(0,0,0,.4)</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-fe383fe9></span>rgba(0,0,0,.6)</td><td data-v-fe383fe9>Modal scrim — the dark veil behind dialogs/lightboxes (mask.base; legacy hardcoded overlays can migrate here)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-scrim-strong</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-fe383fe9></span>rgba(0,0,0,.6)</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:rgba(0,0,0,.75);" data-v-fe383fe9></span>rgba(0,0,0,.75)</td><td data-v-fe383fe9>Stronger scrim for full-screen media previews (mask.strong — the PhotoSwipe image preview backdrop)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-text-on-scrim</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#fff;" data-v-fe383fe9></span>#ffffff</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#fff;" data-v-fe383fe9></span>same</td><td data-v-fe383fe9>Text drawn on the scrim (captions over the media lightbox)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-accent</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#1783ff;" data-v-fe383fe9></span>#1783ff</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#1a88ff;" data-v-fe383fe9></span>#1a88ff</td><td data-v-fe383fe9>Primary action / link / focus</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-success</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#0e7a38;" data-v-fe383fe9></span>#0e7a38</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#3fb950;" data-v-fe383fe9></span>#3fb950</td><td data-v-fe383fe9>Success / pass</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-warning</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#a9610a;" data-v-fe383fe9></span>#a9610a</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#d29922;" data-v-fe383fe9></span>#d29922</td><td data-v-fe383fe9>Warning / pending</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--color-danger</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#c0392b;" data-v-fe383fe9></span>#c0392b</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#f85149;" data-v-fe383fe9></span>#f85149</td><td data-v-fe383fe9>Danger / error / abort</td></tr></tbody></table><h4 class="mini" data-v-fe383fe9>Palette</h4><p data-v-fe383fe9>The palette <b data-v-fe383fe9>is</b> the production kimi.com palette (design tokens <code data-v-fe383fe9>tokens.json</code>): neutral-gray surfaces, an alpha-based label / fill / separator ramp (<code data-v-fe383fe9>labels.*</code> / <code data-v-fe383fe9>fills.*</code> / <code data-v-fe383fe9>separator.s1</code>), the KMBlue accent, and a true neutral dark ladder (<code data-v-fe383fe9>#121212 → #1f1f1f → #292929</code>; the deep chrome plane and sidebar derive one step below at <code data-v-fe383fe9>#0d0d0d</code> — the palette has nothing darker than primary).</p><p data-v-fe383fe9>The ONE deliberate exception is the <b data-v-fe383fe9>status hues</b>: success / warning / danger / done keep the app's own WCAG-tuned ramp (≥4.5:1 on the neutral surfaces) — the production status colours (positiveGreen <code data-v-fe383fe9>#16c456</code>, orange <code data-v-fe383fe9>#ff9500</code>, danger red <code data-v-fe383fe9>#ff3849</code>) are too bright against it. Diff add/del bands happen to coincide (both use the production 25% fills in light, 14% in dark).</p><h4 class="mini" data-v-fe383fe9>Surface usage</h4><p data-v-fe383fe9>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 <code data-v-fe383fe9>--p-surface-raised</code> 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 <code data-v-fe383fe9>--color-surface-sunken</code> for a content carrier — it equals <code data-v-fe383fe9>--color-bg</code> in dark and the fill vanishes; use <code data-v-fe383fe9>--color-well</code>. Sunken stays correct INSIDE surface / raised cards, where it is a genuine recess. Field controls (selects, steppers) on a raised card use <code data-v-fe383fe9>--color-surface-overlay</code>, the top fill rung; floating layers keep <code data-v-fe383fe9>--color-surface-raised</code> — their elevation is shadow + hairline, not a lighter fill.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Token</th><th data-v-fe383fe9>Light</th><th data-v-fe383fe9>Dark</th><th data-v-fe383fe9>Usage</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-surface-overlay</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#fff;" data-v-fe383fe9></span>#ffffff</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#22272e;" data-v-fe383fe9></span>#22272e</td><td data-v-fe383fe9>Field controls on raised cards — select, stepper (top fill rung; light = white)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-surface-raised</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#fff;" data-v-fe383fe9></span>#ffffff</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#1c2128;" data-v-fe383fe9></span>#1c2128</td><td data-v-fe383fe9>Raised card / dialog / input (raised layer)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-well</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#f3f5f8;" data-v-fe383fe9></span>#f3f5f8</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#13181e;" data-v-fe383fe9></span>#13181e</td><td data-v-fe383fe9>Code block / tool output / list carrier directly on the page (content well — light: recessed, dark: one rung above the page)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-surface</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#fafbfc;" data-v-fe383fe9></span>#fafbfc</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#13181e;" data-v-fe383fe9></span>#13181e</td><td data-v-fe383fe9>Panel / sidebar / card head (default flat layer)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-surface-sunken</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#f3f5f8;" data-v-fe383fe9></span>#f3f5f8</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#0d1117;" data-v-fe383fe9></span>#0d1117</td><td data-v-fe383fe9>Recessed area INSIDE a surface / raised card — never a content carrier on the page (sunken layer)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-bg</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#fff;" data-v-fe383fe9></span>#ffffff</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#0d1117;" data-v-fe383fe9></span>#0d1117</td><td data-v-fe383fe9>Page background</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-surface-deep</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#fafbfc;" data-v-fe383fe9></span>#fafbfc</td><td class="val" data-v-fe383fe9><span class="swatch" style="background:#0a0d12;" data-v-fe383fe9></span>#0a0d12</td><td data-v-fe383fe9>Panel header / diff gutter (deep chrome layer — below the page in dark)</td></tr></tbody></table><h4 class="mini" data-v-fe383fe9>Borders & hairlines</h4><p data-v-fe383fe9>Three line tokens, three jobs: <code data-v-fe383fe9>--color-line</code> is the default structural separator, <code data-v-fe383fe9>--color-subtle</code> the tertiary separator that must stay quieter (diff-gutter column rules, quiet dividers inside wells), and <code data-v-fe383fe9>--color-line-strong</code> the edge of interactive controls (inputs, selects, secondary buttons). Width is one: <b data-v-fe383fe9>0.5px</b> — 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 <code data-v-fe383fe9>--line</code> / <code data-v-fe383fe9>--line2</code> alias <code data-v-fe383fe9>--color-line</code> / <code data-v-fe383fe9>--color-subtle</code> for one cycle; new work references the v2 names.)</p><h4 class="mini" data-v-fe383fe9>Focus ring</h4><p data-v-fe383fe9>All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a <code data-v-fe383fe9>box-shadow</code> focus ring.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Token</th><th data-v-fe383fe9>Value</th><th data-v-fe383fe9>Usage</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-focus-ring</td><td class="val" data-v-fe383fe9>0 0 0 3px var(--p-accent-soft)</td><td data-v-fe383fe9>Default focus ring (link, menu item, switch, checkbox)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-focus-ring-strong</td><td class="val" data-v-fe383fe9>0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)</td><td data-v-fe383fe9>Strong focus ring (button, primary action)</td></tr></tbody></table><h4 class="mini" data-v-fe383fe9>Text selection</h4><p data-v-fe383fe9>The text-selection color uses <code data-v-fe383fe9>--p-selection</code> uniformly (light <code data-v-fe383fe9>rgba(23,131,255,.18)</code> / dark <code data-v-fe383fe9>rgba(88,166,255,.32)</code>), applied by the global <code data-v-fe383fe9>::selection</code> rule; do not set a separate highlight background.</p><h4 class="mini" data-v-fe383fe9>Disabled state</h4><p data-v-fe383fe9>All disabled controls use <code data-v-fe383fe9>opacity:.5</code> + <code data-v-fe383fe9>cursor:not-allowed</code> uniformly; do not separately grey out or recolor.</p><h3 class="sub" data-v-fe383fe9>Font families</h3><p data-v-fe383fe9>Kimi Web uses two font tokens: <b data-v-fe383fe9>--font-ui</b> (UI and body, with Schibsted Grotesk for Latin and Noto Sans SC for Simplified Chinese) and <b data-v-fe383fe9>--font-mono</b> (code and monospace). Components always reference the variables; do not hard-code font names.</p><h4 class="mini" data-v-fe383fe9>--font-ui · UI & body (Schibsted Grotesk + Noto Sans SC)</h4><p data-v-fe383fe9>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:</p><div class="code" data-v-fe383fe9><div class="code-bar" data-v-fe383fe9><span class="d" data-v-fe383fe9></span><span class="d" data-v-fe383fe9></span><span class="d" data-v-fe383fe9></span><span class="fn" data-v-fe383fe9>--font-ui</span></div><pre data-v-fe383fe9>--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";</pre></div><ul class="clean" data-v-fe383fe9><li data-v-fe383fe9>Schibsted Grotesk first: self-hosted Latin UI and body text, with normal and italic variable faces.</li><li data-v-fe383fe9>Western fallbacks next: Helvetica Neue / Arial for environments where Schibsted Grotesk cannot load.</li><li data-v-fe383fe9>Noto Sans SC Variable next: bundled Simplified Chinese glyphs with a weight range of 100–900.</li><li data-v-fe383fe9>System UI fallbacks last: PingFang SC / Microsoft YaHei, platform UI fonts, and emoji fonts.</li></ul><h4 class="mini" data-v-fe383fe9>--font-mono · Code & monospace</h4><p data-v-fe383fe9>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:</p><div class="code" data-v-fe383fe9><div class="code-bar" data-v-fe383fe9><span class="d" data-v-fe383fe9></span><span class="d" data-v-fe383fe9></span><span class="d" data-v-fe383fe9></span><span class="fn" data-v-fe383fe9>--font-mono</span></div><pre data-v-fe383fe9>--font-mono: "JetBrains Mono Variable", "JetBrains Mono", - ui-monospace, "SF Mono", Menlo, Consolas, monospace;</pre></div><h4 class="mini" data-v-fe383fe9>Loading strategy</h4><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Font</th><th data-v-fe383fe9>Source</th><th data-v-fe383fe9>Bundled</th><th data-v-fe383fe9>Usage</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>JetBrains Mono</td><td class="val" data-v-fe383fe9>@fontsource-variable/jetbrains-mono</td><td class="val" data-v-fe383fe9>✓ self-hosted</td><td data-v-fe383fe9>monospace / code (--font-mono)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Schibsted Grotesk</td><td class="val" data-v-fe383fe9>prepare-fonts → app-ui/assets/fonts</td><td class="val" data-v-fe383fe9>✓ generated + bundled</td><td data-v-fe383fe9>UI / body / display (--font-ui, --font-display), wght 400-900, normal + italic</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Noto Sans SC</td><td class="val" data-v-fe383fe9>prepare-fonts → app-ui/assets/fonts</td><td class="val" data-v-fe383fe9>✓ generated + bundled</td><td data-v-fe383fe9>Simplified Chinese UI / body, wght 100–900</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>System UI / CJK fonts</td><td class="val" data-v-fe383fe9>operating system</td><td class="val" data-v-fe383fe9>—</td><td data-v-fe383fe9>late fallback for UI / body</td></tr></tbody></table><div class="callout good" data-v-fe383fe9><span class="ico" data-v-fe383fe9>✓</span><div data-v-fe383fe9> 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. </div></div><h4 class="mini" data-v-fe383fe9>Usage rules</h4><ul class="clean check" data-v-fe383fe9><li data-v-fe383fe9>Components always use <code data-v-fe383fe9>var(--font-ui)</code> / <code data-v-fe383fe9>var(--font-mono)</code>; do not hard-code font names like <code data-v-fe383fe9>'Schibsted Grotesk'</code> / <code data-v-fe383fe9>'JetBrains Mono'</code>.</li><li data-v-fe383fe9>Body / UI use <code data-v-fe383fe9>--font-ui</code> (Schibsted Grotesk for Latin, Noto Sans SC for Simplified Chinese); code / monospace use <code data-v-fe383fe9>--font-mono</code> (JetBrains Mono).</li><li data-v-fe383fe9>Schibsted Grotesk is loaded from complete variable faces, including normal and italic styles; <code data-v-fe383fe9>font-optical-sizing: auto</code> is enabled globally.</li><li data-v-fe383fe9>Noto Sans SC is loaded from one complete weight-variable WOFF2 asset. Platform CJK fonts stay late in the fallback chain.</li></ul><h3 class="sub" data-v-fe383fe9>Type scale & weight</h3><p data-v-fe383fe9>The user font-size preference is one of four named steps (<code data-v-fe383fe9>small / medium / large / xlarge</code>, Medium default) written to <code data-v-fe383fe9>data-font-scale</code> on <code data-v-fe383fe9><html></code>; the step name is persisted, never a px value. The step only moves <code data-v-fe383fe9>--base-font</code>; every size token derives additively (<code data-v-fe383fe9>default + shift</code>), and line heights are locked to integer px via <code data-v-fe383fe9>round(size × ratio, 1px)</code> — never a unitless ratio.</p><p data-v-fe383fe9>Two token groups share the shift but keep their own ratios: <b data-v-fe383fe9>--ui-*</b> for chrome (tight, 1.40–1.50) and <b data-v-fe383fe9>--md-*</b> 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 <code data-v-fe383fe9>min()</code> — do not remove). Use the <code data-v-fe383fe9>.text-ui-*</code> / <code data-v-fe383fe9>.text-md-*</code> utility classes; legacy aliases <code data-v-fe383fe9>--ui-font-size</code> (→ <code data-v-fe383fe9>--ui-b2</code>), <code data-v-fe383fe9>--content-font-size</code> (→ <code data-v-fe383fe9>--md-b1</code>) and the whole 6-level <code data-v-fe383fe9>--text-*</code> 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 (<code data-v-fe383fe9>--ui-b2</code>); dropdown menu items sit one rung below (<code data-v-fe383fe9>--text-sm</code> = b2 − 1px) — both still follow the user's font scale.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-fe383fe9><div class="type-row" data-v-fe383fe9><div class="type-sample" style="font-size:var(--ui-t1);font-weight:500;" data-v-fe383fe9>Section Title</div><div class="type-meta" data-v-fe383fe9>--ui-t1 · title (cap 22)</div></div><div class="type-row" data-v-fe383fe9><div class="type-sample" style="font-size:var(--ui-t2);font-weight:500;" data-v-fe383fe9>Card title</div><div class="type-meta" data-v-fe383fe9>--ui-t2 · subtitle</div></div><div class="type-row" data-v-fe383fe9><div class="type-sample" style="font-size:var(--ui-b1);font-weight:500;" data-v-fe383fe9>UI emphasis</div><div class="type-meta" data-v-fe383fe9>--ui-b1 · body strong</div></div><div class="type-row" data-v-fe383fe9><div class="type-sample" style="font-size:var(--ui-b2);" data-v-fe383fe9>UI control / button / form</div><div class="type-meta" data-v-fe383fe9>--ui-b2 · body</div></div><div class="type-row" data-v-fe383fe9><div class="type-sample" style="font-size:var(--ui-c1);" data-v-fe383fe9>Helper text / table</div><div class="type-meta" data-v-fe383fe9>--ui-c1 · caption</div></div><div class="type-row" data-v-fe383fe9><div class="type-sample" style="font-size:var(--ui-c2);" data-v-fe383fe9>Badge / timestamp</div><div class="type-meta" data-v-fe383fe9>--ui-c2 · non-critical only</div></div><div class="type-row" data-v-fe383fe9><div class="type-sample" style="font-size:var(--md-h1);font-weight:600;" data-v-fe383fe9>Markdown H1</div><div class="type-meta" data-v-fe383fe9>--md-h1</div></div><div class="type-row" data-v-fe383fe9><div class="type-sample" style="font-size:var(--md-b1);" data-v-fe383fe9>Chat body / message bubbles / composer</div><div class="type-meta" data-v-fe383fe9>--md-b1 · prose body</div></div><div class="type-row" data-v-fe383fe9><div class="type-sample" style="font-size:var(--md-b2);" data-v-fe383fe9>Quote / table</div><div class="type-meta" data-v-fe383fe9>--md-b2 · secondary</div></div><div class="type-row" data-v-fe383fe9><div class="type-sample" style="font-size:var(--md-b3);font-family:var(--font-mono);" data-v-fe383fe9>Code block / inline code</div><div class="type-meta" data-v-fe383fe9>--md-b3 · weak / code</div></div></div><p data-v-fe383fe9>The fixed product type tokens still define scale-independent defaults: transcript prose enables <code data-v-fe383fe9>text-autospace: normal</code> for mixed CJK and Latin text. Drop stray <code data-v-fe383fe9>font-weight: 650 / 750</code>; converge on 400 / 500 (regular / emphasis), with a dedicated 600 weight for sidebar section labels.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Token</th><th data-v-fe383fe9>Value</th><th data-v-fe383fe9>Usage</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--font-ui</td><td class="val" data-v-fe383fe9>"Schibsted Grotesk Variable", …, "Noto Sans SC Variable", …</td><td data-v-fe383fe9>UI & body (Schibsted Grotesk + Noto Sans SC)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--font-kbd</td><td class="val" data-v-fe383fe9>"Schibsted Grotesk Variable", system-ui, sans-serif</td><td data-v-fe383fe9>keyboard shortcut keycaps</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--font-mono</td><td class="val" data-v-fe383fe9>JetBrains Mono…</td><td data-v-fe383fe9>code, Bash commands, line numbers, diffs</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>data-font-scale</td><td class="val" data-v-fe383fe9>small / medium / large / xlarge</td><td data-v-fe383fe9>user preference on <html>; sets --base-font (12–18px), Medium = 14px default</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--ui-t0…--ui-c2</td><td class="val" data-v-fe383fe9>default + --ui-shift, t0/t1 capped via min()</td><td data-v-fe383fe9>chrome type ramp (title / subtitle / body / caption); .text-ui-* classes</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--md-h1…--md-b3</td><td class="val" data-v-fe383fe9>default + --md-shift</td><td data-v-fe383fe9>Markdown ramp (headings / body / secondary / code); .text-md-* classes</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--ui-font-size / --content-font-size</td><td class="val" data-v-fe383fe9>var(--ui-b2) / var(--md-b1)</td><td data-v-fe383fe9>legacy aliases kept on the ramp</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--code-font-size</td><td class="val" data-v-fe383fe9>calc(var(--content-font-size) - 2px)</td><td data-v-fe383fe9>standalone code surfaces (diff view, file preview, tool cards) — one step below body, 12px @ Medium; prose-embedded code stays on the --md-* ramp</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--text-xs / sm / base / lg / xl / 2xl</td><td class="val" data-v-fe383fe9>c1 / b2−1 / b2 / t2 / t1 / t0</td><td data-v-fe383fe9>legacy ramp, aliased into the scale</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--leading-tight/normal/prose/relaxed</td><td class="val" data-v-fe383fe9>1.25 / 1.5 / 1.6 / 1.7</td><td data-v-fe383fe9>headings / UI / chat prose / long text</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--weight-regular/option-label/medium/ui-strong</td><td class="val" data-v-fe383fe9>400 / 475 / 500 / 525</td><td data-v-fe383fe9>body / settings labels / emphasis / compact UI emphasis</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--weight-section-label</td><td class="val" data-v-fe383fe9>600</td><td data-v-fe383fe9>sidebar section labels</td></tr></tbody></table><h4 class="mini" data-v-fe383fe9>Icon size</h4><p data-v-fe383fe9>Icons use three size tokens uniformly. The global <code data-v-fe383fe9>.p-ic</code> default is 16px (<code data-v-fe383fe9>--p-ic-md</code>); components pick as needed, and random pixel sizes are forbidden.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Token</th><th data-v-fe383fe9>Value</th><th data-v-fe383fe9>Usage</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-ic-sm</td><td class="val" data-v-fe383fe9>14px</td><td data-v-fe383fe9>small button, badge, menu item, inline link icon</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-ic-md</td><td class="val" data-v-fe383fe9>16px</td><td data-v-fe383fe9>default (button, icon button, toolbar)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-ic-lg</td><td class="val" data-v-fe383fe9>20px</td><td data-v-fe383fe9>Toast status icon, empty-state illustration</td></tr></tbody></table><h4 class="mini" data-v-fe383fe9>Icon</h4><p data-v-fe383fe9>Icons always come from the centralized registry <code data-v-fe383fe9>lib/icons.ts</code>: in templates use the <code data-v-fe383fe9><Icon name size /></code> component (<code data-v-fe383fe9>components/ui/Icon.vue</code>); for <code data-v-fe383fe9>v-html</code> contexts (such as a tool glyph) use <code data-v-fe383fe9>iconSvg(name, size)</code>. <b data-v-fe383fe9>Do not hand-write <code data-v-fe383fe9><svg></code></b> — the <code data-v-fe383fe9>scripts/check-style.mjs</code> <code data-v-fe383fe9>icon-from-registry</code> rule flags stray SVGs. Every glyph shares the 24×24 source grid and <code data-v-fe383fe9>currentColor</code> (colour follows text); size uses the three tokens below, and only icons imported in <code data-v-fe383fe9>lib/icons.ts</code> are bundled by <a href="https://github.com/unplugin/unplugin-icons" data-v-fe383fe9>unplugin-icons</a> at build time. Three collections feed the registry, in this order of preference: <b data-v-fe383fe9><code data-v-fe383fe9>~icons/kimi/*</code></b> — Kimi Design System icons (24×24 outlined, 1.8px stroke), local SVGs under <code data-v-fe383fe9>src/icons/kimi/</code> registered as a custom collection in the Vite config, used whenever a Kimi glyph exists for the intent; <b data-v-fe383fe9><code data-v-fe383fe9>~icons/tabler/*</code></b> — Tabler Icons (MIT), for the few gaps it uniquely covers (today: the right-panel toggle); and <b data-v-fe383fe9><code data-v-fe383fe9>~icons/ri/*</code></b> — <a href="https://remixicon.com/" data-v-fe383fe9>Remix Icon</a> (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 <code data-v-fe383fe9>lib/icons.ts</code> header). When an icon is missing, prefer a glyph from the Kimi icon set: copy the SVG into <code data-v-fe383fe9>src/icons/kimi/</code> (kebab-case name, monochrome <code data-v-fe383fe9>currentColor</code>) and register it — two static imports (component + <code data-v-fe383fe9>?raw</code> string) plus one entry in <code data-v-fe383fe9>ICONS</code>; reach for Remix only when no Kimi glyph fits, and never draw paths in a component.</p><h4 class="mini" data-v-fe383fe9>Size scale</h4>`,49)),a("div",O,[a("div",W,[(f(),l("svg",N,[...e[1]||(e[1]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[2]||(e[2]=t("sm · 14",-1))]),a("div",U,[(f(),l("svg",P,[...e[3]||(e[3]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[4]||(e[4]=t("md · 16",-1))]),a("div",F,[(f(),l("svg",j,[...e[5]||(e[5]=[a("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),e[6]||(e[6]=t("lg · 20",-1))])]),e[8]||(e[8]=a("h4",{class:"mini"},"Icon library",-1)),e[9]||(e[9]=a("p",null,[t("Currently registered icons, grouped by purpose. The display order and grouping are defined by "),a("code",null,"ICON_GROUPS"),t(" in "),a("code",null,"lib/icons.ts"),t(" (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",G,[(f(!0),l(u,null,y(d(A),([r,c])=>(f(),l(u,{key:r},[a("div",K,k(r),1),(f(!0),l(u,null,y(c,n=>(f(),l("div",{key:n,class:"icon-cell"},[s(d(o),{name:n},null,8,["name"]),a("span",J,k(n),1)]))),128))],64))),128))]),e[10]||(e[10]=i('<p data-v-fe383fe9>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.</p><p data-v-fe383fe9>A few <b data-v-fe383fe9>special graphics</b> are not in the registry; each has a dedicated component maintained in one place, and must not be copied by hand: <code data-v-fe383fe9><ContextRing :pct /></code> (the Composer context progress ring, data-driven), <code data-v-fe383fe9><AuthStateIcon kind /></code> (the success / expired / error colored illustrations in the login flow), <code data-v-fe383fe9><Spinner /></code> (loading state). Status dots (such as in the Provider list) always use CSS dots (<code data-v-fe383fe9>border-radius:50%</code>), not SVG. The <code data-v-fe383fe9>scripts/check-style.mjs</code> <code data-v-fe383fe9>icon-from-registry</code> rule exempts the above and the brand mark; all other hand-written <code data-v-fe383fe9><svg></code> is flagged.</p><h3 class="sub" data-v-fe383fe9>Spacing</h3><p data-v-fe383fe9>A 4px base grid. All spacing, gaps, and padding inside and outside components come from this scale — no arbitrary pixels.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-fe383fe9><div class="space-row" data-v-fe383fe9><div class="space-bar" style="width:4px;" data-v-fe383fe9></div><div class="space-meta" data-v-fe383fe9>--space-1 · 4</div><div class="space-use" data-v-fe383fe9>icon gap, badge padding</div></div><div class="space-row" data-v-fe383fe9><div class="space-bar" style="width:6px;" data-v-fe383fe9></div><div class="space-meta" data-v-fe383fe9>--space-1-5 · 6</div><div class="space-use" data-v-fe383fe9>workbar pill icon ↔ label</div></div><div class="space-row" data-v-fe383fe9><div class="space-bar" style="width:8px;" data-v-fe383fe9></div><div class="space-meta" data-v-fe383fe9>--space-2 · 8</div><div class="space-use" data-v-fe383fe9>control gap, small padding</div></div><div class="space-row" data-v-fe383fe9><div class="space-bar" style="width:12px;" data-v-fe383fe9></div><div class="space-meta" data-v-fe383fe9>--space-3 · 12</div><div class="space-use" data-v-fe383fe9>button padding, form-item gap</div></div><div class="space-row" data-v-fe383fe9><div class="space-bar" style="width:16px;" data-v-fe383fe9></div><div class="space-meta" data-v-fe383fe9>--space-4 · 16</div><div class="space-use" data-v-fe383fe9>card padding, grid gap</div></div><div class="space-row" data-v-fe383fe9><div class="space-bar" style="width:20px;" data-v-fe383fe9></div><div class="space-meta" data-v-fe383fe9>--space-5 · 20</div><div class="space-use" data-v-fe383fe9>dialog padding</div></div><div class="space-row" data-v-fe383fe9><div class="space-bar" style="width:24px;" data-v-fe383fe9></div><div class="space-meta" data-v-fe383fe9>--space-6 · 24</div><div class="space-use" data-v-fe383fe9>section gap</div></div><div class="space-row" data-v-fe383fe9><div class="space-bar" style="width:32px;" data-v-fe383fe9></div><div class="space-meta" data-v-fe383fe9>--space-8 · 32</div><div class="space-use" data-v-fe383fe9>large section gap</div></div></div><h4 class="mini" data-v-fe383fe9>Dense list (sidebar / file tree)</h4><p data-v-fe383fe9>High-density navigation lists like the sidebar share one rhythm, all on the 4px grid: <b data-v-fe383fe9>in-row vertical padding</b> <code data-v-fe383fe9>--space-1</code> (4px), <b data-v-fe383fe9>no margin between rows</b> (the hover pill provides the separation); <b data-v-fe383fe9>section gap</b> (between logo / search / action buttons / group title / list) uniformly <code data-v-fe383fe9>--space-2</code> (8px); <b data-v-fe383fe9>between groups</b> <code data-v-fe383fe9>--space-2</code>; the brand header is slightly looser at the top (<code data-v-fe383fe9>--space-3</code>). When building similar lists, reuse this scale — do not hand-write 1/6/7/10px.</p><h3 class="sub" data-v-fe383fe9>Radius</h3><p data-v-fe383fe9>Merge the existing 14 values <b data-v-fe383fe9>into the nearest</b> 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 <code data-v-fe383fe9>superellipse(1.5)</code> so the flatter curve stays visually concentric with its controls.</p><div class="radius-grid" data-v-fe383fe9><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border-radius:4px;" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>xs · 4</span></div><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border-radius:6px;" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>sm · 6</span></div><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border-radius:8px;" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>md · 8</span></div><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border-radius:12px;" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>lg · 12</span></div><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border-radius:16px;" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>xl · 16</span></div><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border-radius:20px;" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>2xl · 20</span></div><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border-radius:32px;corner-shape:superellipse(1.5);" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>composer · 32 / 1.5</span></div><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border-radius:999px;" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>full · 999</span></div></div><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Token</th><th data-v-fe383fe9>Value</th><th data-v-fe383fe9>Usage</th><th data-v-fe383fe9>Merged from</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--radius-xs</td><td class="val" data-v-fe383fe9>4px</td><td data-v-fe383fe9>small badge, inline tag</td><td class="val" data-v-fe383fe9>2/3/4px →</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--radius-sm</td><td class="val" data-v-fe383fe9>6px</td><td data-v-fe383fe9>small button, icon button, menu item</td><td class="val" data-v-fe383fe9>5/6px →</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--radius-md</td><td class="val" data-v-fe383fe9>8px</td><td data-v-fe383fe9>button, input, badge, card</td><td class="val" data-v-fe383fe9>7/8/9px →</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--radius-lg</td><td class="val" data-v-fe383fe9>12px</td><td data-v-fe383fe9>menu, toast, bubble, floating card</td><td class="val" data-v-fe383fe9>10/12px →</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--radius-xl</td><td class="val" data-v-fe383fe9>16px</td><td data-v-fe383fe9>container baseline: dialogs, settings cards, sheets, work panel</td><td class="val" data-v-fe383fe9>13/16px →</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--radius-2xl</td><td class="val" data-v-fe383fe9>20px</td><td data-v-fe383fe9>workspace attachment card bottom (<code data-v-fe383fe9>0 0 2xl 2xl</code>) tucked under the composer</td><td class="val" data-v-fe383fe9>18/20px →</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--radius-composer</td><td class="val" data-v-fe383fe9>32px</td><td data-v-fe383fe9>Composer shell, with <code data-v-fe383fe9>--corner-shape-composer</code></td><td class="val" data-v-fe383fe9>product-specific</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--radius-menu-row</td><td class="val" data-v-fe383fe9>25.3px</td><td data-v-fe383fe9>Menu rows inset 6px inside a composer-radius frame (diagonal-exact concentric)</td><td class="val" data-v-fe383fe9>product-specific</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--radius-full</td><td class="val" data-v-fe383fe9>999px</td><td data-v-fe383fe9>pill badge, avatar, send button</td><td class="val" data-v-fe383fe9>999px / 50%</td></tr></tbody></table><h3 class="sub" data-v-fe383fe9>Elevation & z-index</h3><p data-v-fe383fe9>Shadows express only "elevation", never decoration (no colored glow). z-index is unified into a scale, eradicating <code data-v-fe383fe9>9999</code>-style one-upping.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-fe383fe9><div class="radius-grid" style="align-items:stretch;" data-v-fe383fe9><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border:none;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>sm · dropdown menu / sticky</span></div><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border:none;background:#fff;box-shadow:0 4px 12px rgba(16,24,40,.07),0 2px 4px rgba(16,24,40,.05);" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>md · Toast</span></div><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border:none;background:#fff;box-shadow:0 12px 32px rgba(16,24,40,.12),0 4px 10px rgba(16,24,40,.08);" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>lg · overlay (reserved)</span></div><div class="radius-item" data-v-fe383fe9><div class="radius-box" style="border:none;background:#fff;box-shadow:0 24px 64px rgba(16,24,40,.18),0 8px 20px rgba(16,24,40,.10);" data-v-fe383fe9></div><span class="rl" data-v-fe383fe9>xl · dialog</span></div></div></div><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Z-index Token</th><th data-v-fe383fe9>Value</th><th data-v-fe383fe9>Usage</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--z-base</td><td class="val" data-v-fe383fe9>0</td><td data-v-fe383fe9>normal flow</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--z-raised</td><td class="val" data-v-fe383fe9>1</td><td data-v-fe383fe9>in-component local stacking (menu scroll thumbs, strip badges, floating pills) — never a global layer</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--z-sticky</td><td class="val" data-v-fe383fe9>100</td><td data-v-fe383fe9>sticky header / sidebar</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--z-dropdown</td><td class="val" data-v-fe383fe9>200</td><td data-v-fe383fe9>dropdown menu</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--z-overlay</td><td class="val" data-v-fe383fe9>300</td><td data-v-fe383fe9>overlay / bottom Sheet</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--z-modal</td><td class="val" data-v-fe383fe9>400</td><td data-v-fe383fe9>dialog — sibling overlays tie-break by DOM order, so the global confirm (ConfirmDialogHost) mounts on demand to always land last / on top</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--z-modal-dropdown</td><td class="val" data-v-fe383fe9>500</td><td data-v-fe383fe9>menus / popovers that open above a modal dialog (teleported to <body>, e.g. the settings SecondaryModelPicker cascade)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--z-toast</td><td class="val" data-v-fe383fe9>600</td><td data-v-fe383fe9>toast</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--z-tooltip</td><td class="val" data-v-fe383fe9>650</td><td data-v-fe383fe9>tooltip bubble — transient and pointer-events none, so it sits above everything (dialogs, toasts) to stay visible anywhere</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--z-max</td><td class="val" data-v-fe383fe9>9999</td><td data-v-fe383fe9>reserved: only this tier for extreme fallback</td></tr></tbody></table><h3 class="sub" data-v-fe383fe9>Motion</h3><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Token</th><th data-v-fe383fe9>Value</th><th data-v-fe383fe9>Usage</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--ease-out</td><td class="val" data-v-fe383fe9>cubic-bezier(0.16, 1, 0.3, 1)</td><td data-v-fe383fe9>enter, hover, expand</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--ease-in-out</td><td class="val" data-v-fe383fe9>cubic-bezier(0.4, 0, 0.2, 1)</td><td data-v-fe383fe9>panel width, layout changes</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--duration-fast</td><td class="val" data-v-fe383fe9>120ms</td><td data-v-fe383fe9>press, focus</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--duration-base</td><td class="val" data-v-fe383fe9>160ms</td><td data-v-fe383fe9>hover, show/hide</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--duration-slow</td><td class="val" data-v-fe383fe9>260ms</td><td data-v-fe383fe9>dialog, Sheet, layout</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--duration-hover-intent</td><td class="val" data-v-fe383fe9>250ms</td><td data-v-fe383fe9>hover-intent reveal gate (TOC rail)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--anim-rive-spin</td><td class="val" data-v-fe383fe9>416.7ms</td><td data-v-fe383fe9>new-chat / folder-plus icon: plus spin on hover</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--anim-leftbar</td><td class="val" data-v-fe383fe9>533.3ms</td><td data-v-fe383fe9>sidebar toggle icon: arrow fly-in on hover</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--anim-leftbar-shrink</td><td class="val" data-v-fe383fe9>200ms</td><td data-v-fe383fe9>sidebar toggle icon: divider shrink on hover</td></tr></tbody></table><p data-v-fe383fe9>The <code data-v-fe383fe9>--anim-*</code> lengths are track timings ported verbatim from the designer's Rive exports, so they sit outside the <code data-v-fe383fe9>--duration-*</code> ramp on purpose — retiming the ramp must not distort them. Their interpolation stays <code data-v-fe383fe9>linear</code> 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 (<code data-v-fe383fe9>#bar-divider</code>, <code data-v-fe383fe9>#bar-arrow</code> / <code data-v-fe383fe9>#bar-arrow-expand</code>, <code data-v-fe383fe9>#p1</code>, <code data-v-fe383fe9>#af-p1</code>) so every instance of the icon animates, and all revert on mouse-out. They still fall under the global reduced-motion switch below.</p><h4 class="mini" data-v-fe383fe9>Reduced motion</h4><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9> Under <code data-v-fe383fe9>@media (prefers-reduced-motion: reduce)</code>, all animation and transition durations drop to about <code data-v-fe383fe9>0.001ms</code> (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 <code data-v-fe383fe9>transition-delay</code>: a hover-intent gate (the conversation TOC's 250ms reveal) decides <i data-v-fe383fe9>whether</i> hidden content appears, and clearing it would make pointer fly-bys strobe content for reduced-motion users. </div></div><h3 class="sub" data-v-fe383fe9>Layout & breakpoints</h3><p data-v-fe383fe9>Layout sizes and responsive breakpoints are tokenized too: sidebar width, content reading-column width, and two global breakpoints. Components should not hard-code pixels.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Token</th><th data-v-fe383fe9>Value</th><th data-v-fe383fe9>Usage</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-sidebar-w</td><td class="val" data-v-fe383fe9>264px</td><td data-v-fe383fe9>left session sidebar width</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-content-max</td><td class="val" data-v-fe383fe9>760px</td><td data-v-fe383fe9>chat reading-column max width (regular chat prose)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-content-wide</td><td class="val" data-v-fe383fe9>920px</td><td data-v-fe383fe9>wide content (settings / panel)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-table-max</td><td class="val" data-v-fe383fe9>1040px</td><td data-v-fe383fe9>desktop wide-table max width (see §04)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-table-cell-max</td><td class="val" data-v-fe383fe9>700px</td><td data-v-fe383fe9>max width of a single table column; longer cell content wraps (see §04)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-bp-sm</td><td class="val" data-v-fe383fe9>640px</td><td data-v-fe383fe9>mobile / desktop boundary</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-bp-md</td><td class="val" data-v-fe383fe9>980px</td><td data-v-fe383fe9>narrow / wide screen boundary</td></tr></tbody></table><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9> At ≤640px: dialogs become bottom Sheets, the sidebar collapses into an expandable drawer, and Composer toolbar controls are allowed to wrap. </div></div>',24))]),a("section",Q,[e[27]||(e[27]=i(`<div class="sec-head" data-v-fe383fe9><span class="sec-num" data-v-fe383fe9>03</span><h2 class="sec-title" data-v-fe383fe9>Primitives</h2></div><p class="sec-desc" data-v-fe383fe9> Component primitives are the "smallest correct units" of the site UI. Each primitive exposes variants along only two dimensions — <code data-v-fe383fe9>variant</code> / <code data-v-fe383fe9>size</code> — with appearance driven by tokens, so it naturally supports light / dark mode and customizable theme colors. </p><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9> For every interactive primitive, the <b data-v-fe383fe9>keyboard behavior, focus, and ARIA contract are in §08 Accessibility</b>. New primitives must ship with a keyboard model — mouse-only interaction is not enough. </div></div><h3 class="sub" data-v-fe383fe9>Component selection guide</h3><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Scenario</th><th data-v-fe383fe9>Use</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td data-v-fe383fe9>Primary action (submit / confirm)</td><td data-v-fe383fe9><code data-v-fe383fe9>Button variant=primary</code></td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Secondary action / cancel</td><td data-v-fe383fe9><code data-v-fe383fe9>Button secondary</code> / <code data-v-fe383fe9>ghost</code></td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Destructive action (delete / abort)</td><td data-v-fe383fe9><code data-v-fe383fe9>Button danger</code> / <code data-v-fe383fe9>danger-soft</code></td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Status marker</td><td data-v-fe383fe9><code data-v-fe383fe9>Badge</code></td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Toolbar filter / model switch</td><td data-v-fe383fe9><code data-v-fe383fe9>Pill</code></td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>2–5 mutually exclusive options</td><td data-v-fe383fe9><code data-v-fe383fe9>SegmentedControl</code></td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Top tabs</td><td data-v-fe383fe9><code data-v-fe383fe9>Tabs</code></td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Switch / multi-select</td><td data-v-fe383fe9><code data-v-fe383fe9>Switch</code> / <code data-v-fe383fe9>Checkbox</code></td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Scrollable regions with overlay controls</td><td data-v-fe383fe9><code data-v-fe383fe9>ScrollArea</code></td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Floating content card / list action menu</td><td data-v-fe383fe9><code data-v-fe383fe9>Card</code> / <code data-v-fe383fe9>Menu</code></td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Inline notice / global toast</td><td data-v-fe383fe9><code data-v-fe383fe9>Banner</code> / <code data-v-fe383fe9>Toast</code></td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Dialog / confirmation · bottom panel (mobile)</td><td data-v-fe383fe9><code data-v-fe383fe9>Dialog</code> / <code data-v-fe383fe9>Sheet</code></td></tr></tbody></table><h3 class="sub" data-v-fe383fe9>Button</h3><p data-v-fe383fe9>4 semantic variants × 3 sizes. The primary action <code data-v-fe383fe9>primary</code> takes its color from the current theme color (§05 can switch between the blue and black families). Radius uses <code data-v-fe383fe9>--radius-md</code> uniformly (small size <code data-v-fe383fe9>--radius-sm</code>), weight 600, with a visible focus ring.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Variant matrix <span class="tag spec" data-v-fe383fe9>light</span></span><span class="sactions" data-v-fe383fe9><span class="tab on" data-v-fe383fe9>preview</span></span></div><div class="stage p col" data-v-fe383fe9><span class="stage-label" data-v-fe383fe9>medium · default</span><div class="demo-row" data-v-fe383fe9><button class="p-btn primary" data-v-fe383fe9>Primary action</button><button class="p-btn secondary" data-v-fe383fe9>Secondary action</button><button class="p-btn ghost" data-v-fe383fe9>Ghost button</button><button class="p-btn danger-soft" data-v-fe383fe9>Destructive (soft)</button><button class="p-btn danger" data-v-fe383fe9>Destructive action</button></div><span class="stage-label" data-v-fe383fe9>small</span><div class="demo-row" data-v-fe383fe9><button class="p-btn primary sm" data-v-fe383fe9>Confirm</button><button class="p-btn secondary sm" data-v-fe383fe9>Cancel</button><button class="p-btn ghost sm" data-v-fe383fe9>More</button></div><span class="stage-label" data-v-fe383fe9>With icon / state</span><div class="demo-row" data-v-fe383fe9><button class="p-btn primary" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-fe383fe9></path></svg>New chat</button><button class="p-btn secondary" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-fe383fe9></path></svg>Copied</button><button class="p-btn primary disabled" data-v-fe383fe9>Loading…</button></div></div></div><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Dark skin <span class="tag spec" data-v-fe383fe9>dark</span></span></div><div class="stage dark p col" data-p="dark" data-v-fe383fe9><div class="demo-row" data-v-fe383fe9><button class="p-btn primary" data-v-fe383fe9>Primary action</button><button class="p-btn secondary" data-v-fe383fe9>Secondary action</button><button class="p-btn ghost" data-v-fe383fe9>Ghost button</button><button class="p-btn danger" data-v-fe383fe9>Destructive action</button></div></div></div><h4 class="mini" data-v-fe383fe9>API</h4><div class="code" data-v-fe383fe9><div class="code-bar" data-v-fe383fe9><span class="d" data-v-fe383fe9></span><span class="d" data-v-fe383fe9></span><span class="d" data-v-fe383fe9></span><span class="fn" data-v-fe383fe9>Button.vue · usage</span></div><pre data-v-fe383fe9><span class="k" data-v-fe383fe9><Button</span> <span class="p" data-v-fe383fe9>variant</span>=<span class="s" data-v-fe383fe9>"primary"</span> <span class="p" data-v-fe383fe9>size</span>=<span class="s" data-v-fe383fe9>"md"</span> <span class="p" data-v-fe383fe9>:loading</span>=<span class="s" data-v-fe383fe9>"submitting"</span><span class="k" data-v-fe383fe9>></span>Save<span class="k" data-v-fe383fe9></Button></span> - <span class="c" data-v-fe383fe9>// variant: primary | secondary | ghost | danger | danger-soft</span> - <span class="c" data-v-fe383fe9>// size: sm | md | lg</span></pre></div><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>States</span></div><div class="stage p" data-v-fe383fe9><div class="demo-row" data-v-fe383fe9><button class="p-btn primary" disabled style="opacity:.5;cursor:not-allowed;" data-v-fe383fe9>Disabled primary</button><button class="p-btn primary" data-v-fe383fe9><svg class="p-spinner sm" viewBox="0 0 24 24" data-v-fe383fe9><circle class="track" cx="12" cy="12" r="9" data-v-fe383fe9></circle><circle class="arc" cx="12" cy="12" r="9" data-v-fe383fe9></circle></svg>Submitting</button><button class="p-btn danger" disabled style="opacity:.5;cursor:not-allowed;" data-v-fe383fe9>Disabled danger</button></div></div></div><h3 class="sub" data-v-fe383fe9>IconButton</h3><p data-v-fe383fe9>Unified into three sizes — 26 / 32 / 44px — with the neutral <code data-v-fe383fe9>--color-hover</code> wash on hover and a visible focus ring. Replaces the ad-hoc icon + click areas scattered across components today.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>IconButton</span></div><div class="stage p" data-v-fe383fe9><button class="p-icon-btn" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-fe383fe9></path></svg></button><button class="p-icon-btn" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-fe383fe9></path></svg></button><button class="p-icon-btn" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-fe383fe9></path></svg></button><button class="p-icon-btn sm" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975z" data-v-fe383fe9></path></svg></button><button class="p-icon-btn sm" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-fe383fe9></path></svg></button></div></div><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9> The desktop IconButton comes in <code data-v-fe383fe9>sm</code> 26 / <code data-v-fe383fe9>md</code> 32; on touch devices the tap target should be ≥ 44px, so use <code data-v-fe383fe9>lg</code> 44px, satisfying the §01 accessibility principle (the mobile three-piece set uses <code data-v-fe383fe9>lg</code>). Icon-only buttons must also name themselves on hover: pass <code data-v-fe383fe9>tooltip</code> (usually the same text as <code data-v-fe383fe9>label</code> — <code data-v-fe383fe9>label</code> alone only sets the aria-label); bare icon <code data-v-fe383fe9><button></code>/<code data-v-fe383fe9><a></code> triggers wrap the <code data-v-fe383fe9>Tooltip</code> component directly. </div></div><h3 class="sub" data-v-fe383fe9>Badge · Chip · Pill</h3><p data-v-fe383fe9>Collapsed into two kinds: <b data-v-fe383fe9>Badge</b> (status badge, with an optional status dot) and <b data-v-fe383fe9>Pill</b> (the clickable pill in the composer toolbar). Radius, font size, and padding are all unified.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Badge · status badge</span></div><div class="stage p col" data-v-fe383fe9><span class="stage-label" data-v-fe383fe9>Semantic variants</span><div class="demo-row" data-v-fe383fe9><span class="p-badge neutral" data-v-fe383fe9><span class="bd" data-v-fe383fe9></span>pending</span><span class="p-badge info" data-v-fe383fe9><span class="bd" data-v-fe383fe9></span>running</span><span class="p-badge success" data-v-fe383fe9><span class="bd" data-v-fe383fe9></span>completed</span><span class="p-badge warning" data-v-fe383fe9><span class="bd" data-v-fe383fe9></span>needs confirmation</span><span class="p-badge danger" data-v-fe383fe9><span class="bd" data-v-fe383fe9></span>failed</span><span class="p-badge solid" data-v-fe383fe9>KIMI</span></div><span class="stage-label" data-v-fe383fe9>With icon / small size</span><div class="demo-row" data-v-fe383fe9><span class="p-badge info" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1m1 2v14h14V5z" data-v-fe383fe9></path></svg>plan</span><span class="p-badge success sm" data-v-fe383fe9><span class="bd" data-v-fe383fe9></span>passed</span><span class="p-badge neutral sm" data-v-fe383fe9>read-only</span></div></div></div>`,19)),a("div",Y,[e[14]||(e[14]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Pill · toolbar pill (composer)")],-1)),a("div",Z,[e[12]||(e[12]=i('<span class="p-pill" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><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" data-v-fe383fe9></path></svg><span class="pp-strong" data-v-fe383fe9>kimi-k2</span><span class="pp-sub" data-v-fe383fe9>· thinking</span><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-fe383fe9></path></svg></span>',1)),a("span",X,[s(d(o),{name:"shield-question",size:"sm"}),e[11]||(e[11]=t("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"})]),t("12k / 200k")],-1))])]),e[28]||(e[28]=i(`<h3 class="sub" data-v-fe383fe9>Kbd · keyboard shortcut</h3><p data-v-fe383fe9><b data-v-fe383fe9>Kbd</b> renders a shortcut as keycaps — one block per key, never inline text like <code data-v-fe383fe9>(⌘K)</code>. Caps are 18px tall (Badge sm rhythm): transparent ground with a 0.5px hairline edge, 11px <code data-v-fe383fe9>--font-kbd</code> (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.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Kbd · keycaps</span></div><div class="stage p" data-v-fe383fe9><span class="p-kbd" data-v-fe383fe9><kbd data-v-fe383fe9>⌘</kbd><kbd data-v-fe383fe9>K</kbd></span><span class="p-kbd" data-v-fe383fe9><kbd data-v-fe383fe9>Ctrl</kbd><kbd data-v-fe383fe9>K</kbd></span><span class="p-kbd" data-v-fe383fe9><kbd data-v-fe383fe9>⌘</kbd><kbd data-v-fe383fe9>⇧</kbd><kbd data-v-fe383fe9>P</kbd></span></div></div><h3 class="sub" data-v-fe383fe9>Card / Surface</h3><p data-v-fe383fe9>All cards across the site share <b data-v-fe383fe9>one structure</b> — <code data-v-fe383fe9>head / body / foot</code> — and come in two tiers by visual weight:</p><ul class="clean" data-v-fe383fe9><li data-v-fe383fe9><b data-v-fe383fe9>Operation card</b> —— composite "process" content such as the Swarm overview. (Individual tool calls are NOT cards anymore: they render as quiet borderless lines, see §04.) Flat shell: <code data-v-fe383fe9>0.5px</code> hairline, <code data-v-fe383fe9>--radius-md</code>, no shadow. The head is compact mono with no fill, low weight by default, not competing with the conversation.</li><li data-v-fe383fe9><b data-v-fe383fe9>Attention card</b> —— content that needs a user decision, such as Question / Approval. A floating neutral card: white raised surface, <code data-v-fe383fe9>--radius-lg</code>, a faint popover shadow (<code data-v-fe383fe9>--shadow-menu</code>), a plain dark title head, and a hairline footer whose actions read in number-key order (chips on the buttons) leading to one solid primary action. No semantic color band.</li></ul><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Operation card · compact mono head (no fill)</span></div><div class="stage p col" data-v-fe383fe9><div class="p-card" style="max-width:460px;" data-v-fe383fe9><div class="p-card-head" data-v-fe383fe9><span class="p-card-title" data-v-fe383fe9>read_file</span><span class="p-badge info sm" style="margin-left:auto;" data-v-fe383fe9>session.ts</span></div><div class="p-card-body" data-v-fe383fe9>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.</div></div></div></div><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Attention card · floating neutral surface (no color band)</span></div><div class="stage p col" data-v-fe383fe9><div class="p-action" style="max-width:460px;" data-v-fe383fe9><div class="p-action-head" data-v-fe383fe9><span class="p-action-title" data-v-fe383fe9>A decision needs your confirmation</span></div><div class="p-action-body" data-v-fe383fe9>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.</div><div class="p-action-foot" data-v-fe383fe9><button class="p-btn ghost sm" data-v-fe383fe9>Dismiss</button><button class="p-btn primary sm" data-v-fe383fe9>Confirm</button></div></div></div></div><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Activity run · a summary row expands into the folded lines</span></div><div class="stage p col" data-v-fe383fe9><div class="p-tool-group open" style="max-width:460px;" data-v-fe383fe9><div class="p-tool-group-head" data-v-fe383fe9><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-fe383fe9></path></svg><span class="tg-title" data-v-fe383fe9>Read 2 files</span></div><div class="p-tool-row" data-v-fe383fe9><span class="tr-name" data-v-fe383fe9>Read</span><span class="tr-file" data-v-fe383fe9>session.ts</span><span class="tr-faint" data-v-fe383fe9>src/auth</span><span class="tr-chip" data-v-fe383fe9>34 lines</span><span class="tr-ok" data-v-fe383fe9>✓</span></div><div class="p-tool-row" data-v-fe383fe9><span class="tr-name" data-v-fe383fe9>Read</span><span class="tr-file" data-v-fe383fe9>middleware.ts</span><span class="tr-faint" data-v-fe383fe9>src/auth</span><span class="tr-chip" data-v-fe383fe9>58 lines</span><span class="tr-ok" data-v-fe383fe9>✓</span></div></div></div></div><ul class="clean check" data-v-fe383fe9><li data-v-fe383fe9><b data-v-fe383fe9>One structure, two shells</b>: every card is <code data-v-fe383fe9>head / body / foot</code>; operation cards are flat + 0.5px hairline + radius-md with no shadow, while the attention card is the single exception — raised surface, radius-lg and a soft shadow, because it floats above the transcript in place of the composer.</li><li data-v-fe383fe9><b data-v-fe383fe9>Differences are intentional</b>: operation cards keep a compact mono head; attention cards get a plain dark title head and footer actions.</li><li data-v-fe383fe9><b data-v-fe383fe9>Grouping</b>: consecutive activity (thinking + tool calls of any kind, cards included) folds into ONE activity-run row — a smart summary sentence that expands into the items in order; only text and successful media tools (inline media is the turn's output) stay out and break the run (see §04).</li><li data-v-fe383fe9><b data-v-fe383fe9>Turn fold</b>: once an assistant turn settles, everything before its final text block (thinking, activity runs, interim text, standalone cards) folds into ONE bare "Worked Ns" row — no glyph, a faint one-line label + rotating chevron sharing the activity-run head's padding and hover language; while the turn streams the row stays hidden and the body forced open, and on settle the row appears and folds itself back. The span is the turn's elapsed time (daemon duration once settled, server message stamps for history; approval/question waits included by design), reading the generic "Work details" without any stamp. The final text — and anything after it, so trailing media / cards stay on screen — never folds; a text-only turn renders no row at all (see §04).</li><li data-v-fe383fe9><b data-v-fe383fe9>Status dots</b>: running (pulsing blue) / done (green) / failed (red), sharing one color vocabulary (see §04 tool calls).</li></ul><h3 class="sub" data-v-fe383fe9>Input / Select / Textarea</h3><p data-v-fe383fe9>Unified 38px height (32px small), <code data-v-fe383fe9>--radius-md</code> radius, <code data-v-fe383fe9>--color-surface-overlay</code> background, and a unified blue focus ring (<code data-v-fe383fe9>0 0 0 3px accent-soft</code>). Select is a custom combobox and listbox, not a native <code data-v-fe383fe9><select></code>; 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.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Form primitives</span></div><div class="stage p col" data-v-fe383fe9><div class="demo-row" style="align-items:flex-start;" data-v-fe383fe9><div class="p-field demo-grow" data-v-fe383fe9><label class="p-label" data-v-fe383fe9>Workspace name</label><input class="p-input" placeholder="e.g. frontend" data-v-fe383fe9><span class="p-hint" data-v-fe383fe9>Only letters, numbers, and hyphens are allowed.</span></div><div class="p-field demo-grow" data-v-fe383fe9><label class="p-label" data-v-fe383fe9>Model provider</label><button class="p-select" type="button" data-v-fe383fe9>Anthropic</button></div></div><div class="p-field" data-v-fe383fe9><label class="p-label" data-v-fe383fe9>System prompt</label><textarea class="p-textarea" placeholder="Describe this Agent's role and boundaries…" data-v-fe383fe9></textarea></div></div></div><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>States</span></div><div class="stage p col" data-v-fe383fe9><div class="demo-row" style="align-items:flex-start;" data-v-fe383fe9><div class="p-field demo-grow" data-v-fe383fe9><label class="p-label" data-v-fe383fe9>Workspace name</label><input class="p-input" value="my workspace!" style="border-color:var(--p-danger);" data-v-fe383fe9><span class="p-field-error" data-v-fe383fe9>Please enter a valid workspace name</span></div><div class="p-field demo-grow" data-v-fe383fe9><label class="p-label" data-v-fe383fe9>Display name</label><input class="p-input" value="frontend" data-v-fe383fe9><span class="p-hint" data-v-fe383fe9>Normal state · validation passed</span></div></div></div></div><h3 class="sub" data-v-fe383fe9>Code / Diff</h3><p data-v-fe383fe9><b data-v-fe383fe9>Diff controls</b>: 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 <code data-v-fe383fe9>list</code> and <code data-v-fe383fe9>tree-view</code> 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.</p><p data-v-fe383fe9><b data-v-fe383fe9>Diff empty state</b>: Centre the clean-workspace message in the available panel height and lead with a quiet 32px status icon.</p><p data-v-fe383fe9><b data-v-fe383fe9>Diff detail body</b>: the right-side diff detail reuses <code data-v-fe383fe9>HighlightedCode</code> 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 data-v-fe383fe9>--code-font-size</code> (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.</p><p data-v-fe383fe9>Inline code, code blocks, and diff contents use the monospace font (<code data-v-fe383fe9>--p-font-mono</code>); 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 <code data-v-fe383fe9>+</code> / <code data-v-fe383fe9>-</code> row colors to express additions and deletions — additions use a success light background, deletions use a danger light background, with no gradients.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Code / Diff</span></div><div class="stage p col" data-v-fe383fe9><span class="stage-label" data-v-fe383fe9>inline code</span><div data-v-fe383fe9>The server uses <code class="p-code-inline" data-v-fe383fe9>jwt.verify(token)</code> to verify the signature, returning 401 on failure.</div><span class="stage-label" data-v-fe383fe9>code block</span><div class="p-code-block" data-v-fe383fe9><div class="p-code-block-head" data-v-fe383fe9><span data-v-fe383fe9>session.ts</span><button class="p-icon-btn sm" aria-label="Copy" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z" data-v-fe383fe9></path></svg></button></div><pre data-v-fe383fe9>import { verify } from './jwt'; - - export function auth(token: string) { - return verify(token, process.env.JWT_SECRET!); - }</pre></div><span class="stage-label" data-v-fe383fe9>diff</span><div class="p-diff" data-v-fe383fe9><div class="p-diff-head" data-v-fe383fe9>session.ts · +3 -1</div><div class="p-diff-row" data-v-fe383fe9><span class="pm" data-v-fe383fe9></span><span class="p-diff-code" data-v-fe383fe9>import { verify } from './jwt';</span></div><div class="p-diff-row del" data-v-fe383fe9><span class="pm" data-v-fe383fe9>-</span><span class="p-diff-code" data-v-fe383fe9>const secret = 'dev-secret';</span></div><div class="p-diff-row add" data-v-fe383fe9><span class="pm" data-v-fe383fe9>+</span><span class="p-diff-code" data-v-fe383fe9>const secret = process.env.JWT_SECRET!;</span></div><div class="p-diff-row" data-v-fe383fe9><span class="pm" data-v-fe383fe9></span><span class="p-diff-code" data-v-fe383fe9>return verify(token, secret);</span></div></div></div></div><h3 class="sub" data-v-fe383fe9>Dialog</h3><p data-v-fe383fe9>One dialog primitive replaces 6 hand-written implementations: unified <code data-v-fe383fe9>--radius-xl</code> radius, <code data-v-fe383fe9>--shadow-xl</code> shadow, 20px head padding, right-aligned footer actions, and an IconButton close button.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Dialog primitive</span></div><div class="stage p col" style="align-items:center;" data-v-fe383fe9><div class="p-dialog" data-v-fe383fe9><div class="p-dialog-head" data-v-fe383fe9><div data-v-fe383fe9><div class="p-dialog-title" data-v-fe383fe9>New chat</div><div class="p-dialog-desc" data-v-fe383fe9>Create an independent Agent chat in the current workspace.</div></div><button class="p-icon-btn sm" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-fe383fe9></path></svg></button></div><div class="p-dialog-body" data-v-fe383fe9><div class="p-field" data-v-fe383fe9><label class="p-label" data-v-fe383fe9>Chat title (optional)</label><input class="p-input" placeholder="Generated automatically" data-v-fe383fe9></div></div><div class="p-dialog-foot" data-v-fe383fe9><button class="p-btn secondary" data-v-fe383fe9>Cancel</button><button class="p-btn primary" data-v-fe383fe9>Create</button></div></div></div></div><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9><b data-v-fe383fe9>Size & height</b>: Dialog offers three widths — <code data-v-fe383fe9>md</code> 440 / <code data-v-fe383fe9>lg</code> 640 / <code data-v-fe383fe9>xl</code> 760 (<code data-v-fe383fe9>--p-content-max</code>) — chosen by content weight. Height comes in two kinds: <code data-v-fe383fe9>auto</code> (default, grows with content up to <code data-v-fe383fe9>max-height</code>) and <code data-v-fe383fe9>fixed</code> (constant height <code data-v-fe383fe9>min(680px, 100vh - 64px)</code>, with overflow scrolled inside the body). <b data-v-fe383fe9>Content / multi-tab dialogs</b> (settings, model picker, provider manager, folder browser) always use <code data-v-fe383fe9>fixed</code> so the frame size stays constant and doesn't jump when switching tabs or content length; short confirmation dialogs keep <code data-v-fe383fe9>auto</code>. 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 <code data-v-fe383fe9>--color-hover</code> wash as hover, with the label simply brightening to <code data-v-fe383fe9>--color-text</code> — the Kimi app settings nav's recipe (<code data-v-fe383fe9>.ss-nav-item--active</code> → <code data-v-fe383fe9>Fills-F1</code>, no accent tint, no weight change); section captions use 16px UI text in <code data-v-fe383fe9>--color-text</code>. Every setting row has a plain-language description; option labels use <code data-v-fe383fe9>--color-text</code> 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 <code data-v-fe383fe9>--color-surface</code> so each group (<code data-v-fe383fe9>--color-surface-raised</code>) 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 <code data-v-fe383fe9>folder-closed</code> registry icon, and Restore actions lead with the <code data-v-fe383fe9>undo</code> icon. Archive counts use weight 500; timestamps and workspace paths use the UI font. </div></div><p data-v-fe383fe9><b data-v-fe383fe9>Dialog backdrop</b>: Use a restrained 28% neutral overlay so the workspace remains legible without competing with the modal.</p><p data-v-fe383fe9><b data-v-fe383fe9>Settings regions</b>: 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.</p><p data-v-fe383fe9><b data-v-fe383fe9>Archived sessions</b>: Start with the localized page title. Do not add a repeated English kicker above it.</p><p data-v-fe383fe9><b data-v-fe383fe9>Settings interaction</b>: Notification labels and descriptions are not selectable; their switches remain fully interactive.</p><p data-v-fe383fe9><b data-v-fe383fe9>Conversation chrome</b>: 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).</p><p data-v-fe383fe9><b data-v-fe383fe9>Session search</b>: 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.</p><p data-v-fe383fe9><b data-v-fe383fe9>Model picker</b>: 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.</p><h3 class="sub" data-v-fe383fe9>Toast</h3><p data-v-fe383fe9>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 <b data-v-fe383fe9>undoable action</b> there is a second, lighter form — the <b data-v-fe383fe9>Action toast</b> (<code data-v-fe383fe9>ActionToast.vue</code>): a pill floating top-center just below the 48px header, carrying a one-line sentence whose actions are plain inline <code data-v-fe383fe9><button></code>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 <code data-v-fe383fe9><Transition></code>. First used by session archive (Undo / Settings); warnings keep the bottom-right <code data-v-fe383fe9>Toast</code> stack.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Toast</span></div><div class="stage p col" data-v-fe383fe9><div class="p-toast success" data-v-fe383fe9><span class="ti" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-fe383fe9></path></svg></span><div data-v-fe383fe9><div class="tt" data-v-fe383fe9>Connected to server</div><div class="td" data-v-fe383fe9>The local server is responding normally; you can start a new chat.</div></div></div><div class="p-toast warning" data-v-fe383fe9><span class="ti" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z" data-v-fe383fe9></path></svg></span><div data-v-fe383fe9><div class="tt" data-v-fe383fe9>Context usage 82%</div><div class="td" data-v-fe383fe9>Consider running /compact to free up space.</div></div></div></div></div><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Action toast</span></div><div class="stage p col" data-v-fe383fe9><div class="p-action-toast" data-v-fe383fe9><button class="lk" data-v-fe383fe9>Undo</button><span data-v-fe383fe9>or view archived chats in</span><button class="lk" data-v-fe383fe9>Settings</button><svg class="p-ic x" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><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" data-v-fe383fe9></path></svg></div></div></div><h3 class="sub" data-v-fe383fe9>Spinner</h3><p data-v-fe383fe9>Loaders fall into two categories by scenario — <b data-v-fe383fe9>do not mix them</b>:</p><ul class="clean" data-v-fe383fe9><li data-v-fe383fe9><b data-v-fe383fe9>Spinner (plain · SVG ring)</b> —— the default loader. Used for button loading, app startup (GlobalLoading), and general inline waits — "everything else".</li><li data-v-fe383fe9><b data-v-fe383fe9>WorkingIndicator (小蓝 mascot · brand signature)</b> —— used <b data-v-fe383fe9>only</b> for the chat working state after a prompt is sent (the sending placeholder in ChatPane, the send → first-token loading in SideChatPanel). The label follows the phase: "Requesting…" until the assistant's reply starts, then "Working…".</li></ul><h4 class="mini" data-v-fe383fe9>Spinner · plain loader (default)</h4>`,39)),a("div",$,[e[18]||(e[18]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Spinner · common scenarios")],-1)),a("div",_,[a("div",ee,[e[17]||(e[17]=i('<svg class="p-spinner" viewBox="0 0 24 24" data-v-fe383fe9><circle class="track" cx="12" cy="12" r="9" data-v-fe383fe9></circle><circle class="arc" cx="12" cy="12" r="9" data-v-fe383fe9></circle></svg><span class="p-thinking" data-v-fe383fe9><svg class="p-spinner sm" viewBox="0 0 24 24" data-v-fe383fe9><circle class="track" cx="12" cy="12" r="9" data-v-fe383fe9></circle><circle class="arc" cx="12" cy="12" r="9" data-v-fe383fe9></circle></svg>Loading…</span>',2)),a("button",ae,[(f(),l("svg",te,[...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]=t("Submitting",-1))])])])]),e[29]||(e[29]=a("h4",{class:"mini"},"WorkingIndicator · 小蓝 mascot (only the chat working state)",-1)),a("div",se,[e[20]||(e[20]=a("div",{class:"stage-bar"},[a("span",{class:"st"},[t("WorkingIndicator · chat working state only "),a("span",{class:"tag spec"},"signature")])],-1)),a("div",de,[e[19]||(e[19]=a("span",{class:"stage-label"},"Usage · only while the chat has an unfinished prompt",-1)),a("div",oe,[s(x,{label:"Requesting…"}),s(x,{label:"Working…"})])])]),e[30]||(e[30]=i('<div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9>The chat working state is rendered uniformly by <code data-v-fe383fe9>WorkingIndicator</code> — the 小蓝 mascot (<code data-v-fe383fe9>KimiMascot</code>, 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.</div></div><h3 class="sub" data-v-fe383fe9>Link</h3><p data-v-fe383fe9>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 <code data-v-fe383fe9>.muted</code> variant uses the secondary text color. Used for in-text jumps, external links, "view all", and other lightweight actions.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Link · inline link</span></div><div class="stage p col" data-v-fe383fe9><div class="demo-row" style="font-size:var(--p-font-size-base);color:var(--p-text);" data-v-fe383fe9><span data-v-fe383fe9>Read the full <a class="p-link" href="#" data-v-fe383fe9>design token docs</a> before building.</span><a class="p-link" href="#" data-v-fe383fe9>View on GitHub<svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><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" data-v-fe383fe9></path></svg></a><a class="p-link muted" href="#" data-v-fe383fe9>View history</a></div></div></div><h3 class="sub" data-v-fe383fe9>Menu / Dropdown</h3><p data-v-fe383fe9>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.</p><p data-v-fe383fe9>Dropdown menu panel: frosted glass — the translucent <code data-v-fe383fe9>--color-menu-bg</code> fill over a blurred, saturated page backdrop (<code data-v-fe383fe9>--p-menu-backdrop</code>) — plus hairline + light shadow (<code data-v-fe383fe9>--shadow-menu</code>, 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 <code data-v-fe383fe9>lg</code> (≥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 <code data-v-fe383fe9>--duration-base</code> (exit <code data-v-fe383fe9>--duration-fast</code>), 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.</p><p data-v-fe383fe9>Row states: hover uses the mode-aware <code data-v-fe383fe9>--color-hover</code> wash (it lightens under dark, never darkens); a leading icon sits one rung below the label (<code data-v-fe383fe9>--muted</code>), and on hover both label and icon step up to <code data-v-fe383fe9>--color-text-strong</code>, the max foreground tier. Selection keeps the accent pair (<code data-v-fe383fe9>--color-accent-soft</code> / <code data-v-fe383fe9>--color-accent-hover</code>); danger keeps its own colour.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Menu · dropdown menu</span></div><div class="stage p col" style="align-items:flex-start;" data-v-fe383fe9><div class="p-menu" data-v-fe383fe9><div class="p-menu-item" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-fe383fe9></path></svg>Open file</div><div class="p-menu-item active" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-fe383fe9></path></svg>Selected item</div><div class="p-menu-item disabled" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><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 16M8.523 7.109l8.368 8.368a6 6 0 0 1-1.414 1.414L7.109 8.523A6 6 0 0 1 8.523 7.11" data-v-fe383fe9></path></svg>Disabled item</div><div class="p-menu-sep" data-v-fe383fe9></div><div class="p-menu-item danger" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-fe383fe9></path></svg>Delete chat</div></div></div></div><h3 class="sub" data-v-fe383fe9>SegmentedControl</h3><p data-v-fe383fe9>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: <code data-v-fe383fe9>md</code> (default, settings pages), <code data-v-fe383fe9>sm</code> (compact rows), and <code data-v-fe383fe9>xs</code> (dense menus such as the composer model dropdown — 20px items, 12px labels).</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>SegmentedControl</span></div><div class="stage p col" data-v-fe383fe9><div class="p-seg" data-v-fe383fe9><span class="p-seg-item on" data-v-fe383fe9>Light</span><span class="p-seg-item" data-v-fe383fe9>Dark</span><span class="p-seg-item" data-v-fe383fe9>Follow system</span></div></div></div><h3 class="sub" data-v-fe383fe9>SecondaryModelPicker</h3><p data-v-fe383fe9>Linked model + thinking-effort picker (settings → Agent → Subagents, experimental; <code data-v-fe383fe9>components/settings/SecondaryModelPicker.vue</code>, 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 <code data-v-fe383fe9>model · effort</code>, 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 (<code data-v-fe383fe9>--color-menu-bg</code> / <code data-v-fe383fe9>--p-menu-backdrop</code> / <code data-v-fe383fe9>--shadow-lg</code>). The menu <b data-v-fe383fe9>teleports to <code data-v-fe383fe9><body></code> with <code data-v-fe383fe9>position: fixed</code></b> — it opens on top of the settings modal (on the <code data-v-fe383fe9>--z-modal-dropdown</code> 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 <code data-v-fe383fe9>chevron-right</code> 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 (<code data-v-fe383fe9>segmentsFor</code>): effort models get <code data-v-fe383fe9>off</code> + their declared levels (always-thinking ones get no off), boolean-thinking models get <code data-v-fe383fe9>on</code>/<code data-v-fe383fe9>off</code>, unsupported models get <code data-v-fe383fe9>off</code> 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 <code data-v-fe383fe9>preventDefault</code>s 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 → <code data-v-fe383fe9>dialog</code> menu holding a model <code data-v-fe383fe9>listbox</code> plus the effort <code data-v-fe383fe9>listbox</code> flyout with <code data-v-fe383fe9>option</code> rows. The menu itself flips upward when the trigger sits near the viewport bottom.</p><h3 class="sub" data-v-fe383fe9>Tabs</h3><p data-v-fe383fe9>Tabs with a bottom hairline, used for grouping and switching sibling content. The current tab is marked with accent text + an accent underline.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Tabs</span></div><div class="stage p col" data-v-fe383fe9><div class="p-tabs" data-v-fe383fe9><span class="p-tab on" data-v-fe383fe9>General</span><span class="p-tab" data-v-fe383fe9>Agent</span><span class="p-tab" data-v-fe383fe9>Advanced</span></div></div></div><h3 class="sub" data-v-fe383fe9>Switch</h3><p data-v-fe383fe9>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.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Switch</span></div><div class="stage p" data-v-fe383fe9><span class="p-switch on" data-v-fe383fe9></span><span class="p-switch" data-v-fe383fe9></span></div></div><h3 class="sub" data-v-fe383fe9>Checkbox</h3><p data-v-fe383fe9>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.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Checkbox</span></div><div class="stage p" data-v-fe383fe9><span class="p-check on" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-fe383fe9></path></svg></span><span class="p-check" data-v-fe383fe9></span><label style="display:inline-flex;align-items:center;gap:8px;color:var(--p-text);font-size:var(--p-font-size-base);cursor:pointer;" data-v-fe383fe9><span class="p-check on" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-fe383fe9></path></svg></span>Enable auto-save</label></div></div><h3 class="sub" data-v-fe383fe9>Avatar</h3><p data-v-fe383fe9>A 32px default avatar with md radius; <code data-v-fe383fe9>.sm</code> is 24px. Can hold an initial or an icon; falls back to this placeholder when there is no image.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Avatar</span></div><div class="stage p" data-v-fe383fe9><span class="p-avatar" data-v-fe383fe9>K</span><span class="p-avatar" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M4 22a8 8 0 1 1 16 0h-2a6 6 0 0 0-12 0zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6s6 2.685 6 6s-2.685 6-6 6m0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4" data-v-fe383fe9></path></svg></span><span class="p-avatar sm" data-v-fe383fe9>K</span></div></div><h3 class="sub" data-v-fe383fe9>EmptyState</h3><p data-v-fe383fe9>A centered placeholder for empty lists / panels: a 48px faint icon + title + hint, avoiding blank pages.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>EmptyState</span></div><div class="stage p col" data-v-fe383fe9><div class="p-empty" style="width:100%;border:0.5px dashed var(--p-line);border-radius:var(--p-r-lg);" data-v-fe383fe9><svg class="em-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1zm-.692-2H20V5H4v13.385zM8 10h8v2H8z" data-v-fe383fe9></path></svg><div class="em-title" data-v-fe383fe9>No chats yet</div><div class="em-hint" data-v-fe383fe9>Click "New chat" to start a conversation with Kimi</div></div></div></div><h3 class="sub" data-v-fe383fe9>Divider</h3><p data-v-fe383fe9>A 0.5px hairline divider (<code data-v-fe383fe9>--p-line</code>); <code data-v-fe383fe9>.p-divider-v</code> is the vertical divider, used between inline elements.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Divider</span></div><div class="stage p col" data-v-fe383fe9><div style="width:100%;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-fe383fe9>Content above</div><hr class="p-divider" data-v-fe383fe9><div style="width:100%;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-fe383fe9>Content below</div><div style="display:flex;align-items:center;gap:10px;height:24px;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-fe383fe9><span data-v-fe383fe9>kimi-k2</span><span class="p-divider-v" data-v-fe383fe9></span><span data-v-fe383fe9>thinking</span></div></div></div><h3 class="sub" data-v-fe383fe9>Tooltip</h3><p data-v-fe383fe9>A CSS-only hover hint, wrapped in <code data-v-fe383fe9>.p-tip</code>. Inverted background (<code data-v-fe383fe9>--p-text</code> / <code data-v-fe383fe9>--p-bg</code>), single line, no wrapping — carries only short notes.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Tooltip (hover the button)</span></div><div class="stage p" data-v-fe383fe9><span class="p-tip" data-v-fe383fe9><button class="p-icon-btn" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-fe383fe9></path></svg></button><span class="p-tooltip" data-v-fe383fe9>New chat</span></span></div></div><h3 class="sub" data-v-fe383fe9>Banner</h3><p data-v-fe383fe9>An inline notice bar placed at the top of a content area. Three states — <code data-v-fe383fe9>.info</code> / <code data-v-fe383fe9>.warning</code> / <code data-v-fe383fe9>.danger</code> — each with a matching 18px icon.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Banner</span></div><div class="stage p col" data-v-fe383fe9><div class="p-banner info" data-v-fe383fe9><svg class="bn-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><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 16M11 7h2v2h-2zm0 4h2v6h-2z" data-v-fe383fe9></path></svg>Connected to server</div><div class="p-banner warning" data-v-fe383fe9><svg class="bn-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z" data-v-fe383fe9></path></svg>Currently in yolo mode; tool calls will run automatically</div></div></div><h3 class="sub" data-v-fe383fe9>Sheet / BottomSheet</h3><p data-v-fe383fe9>A mobile bottom slide-up panel: xl top radius + drag handle, xl shadow. At ≤640px, dialogs become bottom-anchored Sheets.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>BottomSheet</span></div><div class="stage p col" style="align-items:center;" data-v-fe383fe9><div class="p-sheet" style="width:100%;max-width:360px;" data-v-fe383fe9><div class="p-sheet-handle" data-v-fe383fe9></div><div style="font-size:var(--p-font-size-base);font-weight:700;color:var(--p-text);margin-bottom:8px;" data-v-fe383fe9>Choose a model</div><div class="p-menu-item" style="padding:8px 10px;" data-v-fe383fe9>kimi-k2 · thinking</div><div class="p-menu-item" style="padding:8px 10px;" data-v-fe383fe9>kimi-k2 · instant</div></div></div></div><h3 class="sub" data-v-fe383fe9>Skeleton</h3><p data-v-fe383fe9>A placeholder for loading content, using a breathing opacity animation (no gradients), following the <code data-v-fe383fe9>no-gradient-text</code> rule. Composed into titles / text lines / avatars.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Skeleton</span></div><div class="stage p col" data-v-fe383fe9><div style="display:flex;flex-direction:column;gap:10px;width:100%;max-width:360px;" data-v-fe383fe9><div class="p-skeleton" style="height:16px;width:55%;" data-v-fe383fe9></div><div class="p-skeleton" style="height:12px;width:100%;" data-v-fe383fe9></div><div class="p-skeleton" style="height:12px;width:82%;" data-v-fe383fe9></div><div class="p-skeleton" style="height:32px;width:32px;border-radius:var(--p-r-full);" data-v-fe383fe9></div></div></div></div><h3 class="sub" data-v-fe383fe9>Command Bar</h3><p data-v-fe383fe9>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 <code data-v-fe383fe9>Button primary</code>; the command area uses a mono light-grey background.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Command Bar</span></div><div class="stage p col" data-v-fe383fe9><div class="p-cmdbar" style="max-width:620px;" data-v-fe383fe9><button class="p-btn primary" data-v-fe383fe9>Install Kimi Web ▾</button><span class="p-cmd" data-v-fe383fe9><span class="cmd-text" data-v-fe383fe9>curl -fsSL https://code.kimi.com/install.sh | bash</span><button class="cmd-copy" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z" data-v-fe383fe9></path></svg></button></span></div></div></div><h3 class="sub" data-v-fe383fe9>TopBar</h3><p data-v-fe383fe9>The application top bar. Solid by default; the <code data-v-fe383fe9>.frost</code> variant is translucent + background blur, used <b data-v-fe383fe9>only for sticky navigation bars</b>. Together with the floating menu surfaces (Menu / Dropdown), it is one of the two exceptions to the <code data-v-fe383fe9>no-glassmorphism</code> rule (see §06).</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>TopBar · solid / frosted glass</span></div><div class="stage p col" style="gap:14px;background:radial-gradient(circle at 18% 30%,rgba(23,131,255,.16),transparent 42%),radial-gradient(circle at 82% 75%,rgba(20,23,28,.10),transparent 46%),var(--p-surface-sunken);" data-v-fe383fe9><div class="p-topbar" style="width:100%;max-width:580px;" data-v-fe383fe9><span class="tb-title" data-v-fe383fe9>Solid TopBar</span><span class="tb-actions" data-v-fe383fe9><button class="p-icon-btn sm" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-fe383fe9></path></svg></button></span></div><div class="p-topbar frost" style="width:100%;max-width:580px;" data-v-fe383fe9><span class="tb-title" data-v-fe383fe9>Frosted-glass TopBar · .frost</span><span class="tb-actions" data-v-fe383fe9><button class="p-icon-btn sm" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-fe383fe9></path></svg></button></span></div></div></div><h3 class="sub" data-v-fe383fe9>Find Bar · transcript search</h3><p data-v-fe383fe9>The in-transcript find bar (Cmd/Ctrl+F), implemented by <code data-v-fe383fe9>components/chat/TranscriptSearch.vue</code>. A floating card pinned to the transcript's top-right (<code data-v-fe383fe9>top: --panel-head-h + --space-3</code>, <code data-v-fe383fe9>right: --space-3</code> — equal inset on both axes), <code data-v-fe383fe9>--z-sticky</code>, raised surface + 0.5px hairline + <code data-v-fe383fe9>--shadow-menu</code>. <b data-v-fe383fe9>One radius for both states</b>: <code data-v-fe383fe9>--radius-2xl</code> is a full capsule at the collapsed height and a card once the footer expands — never animate between two radii.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Part</th><th data-v-fe383fe9>Rule</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Input row</td><td data-v-fe383fe9>Search icon (muted) + <b data-v-fe383fe9>bare input</b> — 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 <code data-v-fe383fe9>IconButton sm</code> (concentric with the capsule end); a 0.5px hairline separator before it. Height comes from the grid: 32px control (<code data-v-fe383fe9>--space-8</code>) + 2× <code data-v-fe383fe9>--space-1</code> padding = 40px — at which <code data-v-fe383fe9>--radius-2xl</code> is exactly the half-height capsule.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Footer (results)</td><td data-v-fe383fe9>Expands via the 0fr→1fr grid fold (<code data-v-fe383fe9>--duration-slow</code>), hairline top separator, prev/next <code data-v-fe383fe9>IconButton sm</code> left, right-aligned muted count (<code data-v-fe383fe9>N/M results</code> · <code data-v-fe383fe9>--ui-font-size-sm</code>). Only exists once a query has settled — while typing or empty, the bar stays a bare pill.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>States</td><td data-v-fe383fe9>collapsed (empty query) / searching (<code data-v-fe383fe9>Spinner sm</code> in the input row during the ~800ms debounce) / results / no-results (count reads "No results", nav disabled). Disabled is uniformly <code data-v-fe383fe9>opacity:.5</code>.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Focus</td><td data-v-fe383fe9>Composer-style: a neutral hairline overlay (<code data-v-fe383fe9>::after</code> + <code data-v-fe383fe9>--color-composer-focus-line</code>) fading in on <code data-v-fe383fe9>:focus-within</code>. No accent ring.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Match ink</td><td data-v-fe383fe9>CSS Custom Highlight API — the bar mutates no transcript DOM. All matches: <code data-v-fe383fe9>--color-search-match</code> (yellow); current: <code data-v-fe383fe9>--color-search-match-current</code> + a 2px <code data-v-fe383fe9>--color-warning</code> outline ring (a positioned overlay — highlight pseudos can't paint box outlines). Tokens live in <code data-v-fe383fe9>app-ui/style.css</code> with light/dark pairs.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Keyboard</td><td data-v-fe383fe9>Cmd/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).</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Matching semantics</td><td data-v-fe383fe9>Rendered transcript DOM only (unloaded older pages are out of scope), capped at 1000 matches (count reads <code data-v-fe383fe9>N/1000+</code>). Matches span inline nodes within one block, never cross block breaks; <code data-v-fe383fe9>inert</code> and <code data-v-fe383fe9>display:none</code> content is excluded. Stepping scrolls the match's own rect into view, not its parent element.</td></tr></tbody></table><h3 class="sub" data-v-fe383fe9>SectionLabel</h3><p data-v-fe383fe9>A small group title for sidebar lists, used to section the content below (such as <code data-v-fe383fe9>Workspaces</code> in the sidebar). Spec: 13px / 700 / uppercase / letter-spacing <code data-v-fe383fe9>.08em</code>, color <code data-v-fe383fe9>--color-fg-faint</code>; left-aligned to the row's starting padding (<code data-v-fe383fe9>--sb-pad-x</code>), keeping the same indent as the group rows below. For scripts without case (such as Chinese), <code data-v-fe383fe9>text-transform:uppercase</code> simply has no effect — no special handling needed.</p>',55)),a("div",ie,[e[26]||(e[26]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Sidebar · group title")],-1)),a("div",ne,[e[25]||(e[25]=a("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),a("div",fe,[(f(),l("svg",le,[...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]=t(" kimi-code-web ",-1))]),a("div",re,[(f(),l("svg",ce,[...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]=t(" playground ",-1))])])])]),a("section",ve,[e[136]||(e[136]=i('<div class="sec-head" data-v-fe383fe9><span class="sec-num" data-v-fe383fe9>04</span><h2 class="sec-title" data-v-fe383fe9>Chat Interface Overhaul</h2></div><p class="sec-desc" data-v-fe383fe9> The message stream is the core of Kimi Web. Tool calls render as <b data-v-fe383fe9>quiet activity lines</b> — one borderless line per call, bespoke per tool kind, auto-grouped, expanding on demand — while Question / Approval elevate to a <b data-v-fe383fe9>floating neutral surface</b> because they need a decision, and the Swarm composite keeps a card; the Composer collapses into a single rounded container. </p><h3 class="sub" data-v-fe383fe9>Unified message stream</h3><p data-v-fe383fe9>User-message bubbles follow the kimiwork production recipe (<code data-v-fe383fe9>MessageItem .user-bubble</code>): a neutral <code data-v-fe383fe9>--color-user-bubble-bg</code> fill (BubbleGray — <code data-v-fe383fe9>#f5f5f5</code> light / <code data-v-fe383fe9>#292929</code> dark), uniform <code data-v-fe383fe9>--radius-lg</code> corners, no border, no shadow.</p><p data-v-fe383fe9>Message timestamps use 12px UI text at weight 500, matching the compact metadata scale without switching to a monospace face.</p><p data-v-fe383fe9>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.</p><p data-v-fe383fe9>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 <code data-v-fe383fe9>aria-expanded</code> — chat-surface disclosure controls do not use the §03 Button primitive.</p><p data-v-fe383fe9>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.</p><p data-v-fe383fe9>Thinking is an inline, borderless disclosure row in the message stream — never a side panel. The k15 bulb (the <code data-v-fe383fe9>thinking</code> 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 <code data-v-fe383fe9>· Ns</code> (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.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Conversation · 760px reading column</span></div><div class="stage p col" style="align-items:center;background:#fff;" data-v-fe383fe9><div class="demo-chat" data-v-fe383fe9><div class="p-bubble-user" data-v-fe383fe9>Please change the login endpoint to JWT and add the corresponding unit tests.</div><span class="p-thinking" data-v-fe383fe9><span style="font-size:15px;line-height:1;" data-v-fe383fe9>🌔</span>Analyzing the auth module…</span><div class="p-tool-group open" data-v-fe383fe9><div class="p-tool-group-head" data-v-fe383fe9><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-fe383fe9></path></svg><span class="tg-title" data-v-fe383fe9>Read 2 files</span><svg class="tg-car" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-fe383fe9></path></svg></div><div class="p-tool-row expanded" data-v-fe383fe9><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-fe383fe9></path></svg><span class="tr-name" data-v-fe383fe9>Read</span><span class="tr-file" data-v-fe383fe9>session.ts</span><span class="tr-faint" data-v-fe383fe9>src/auth · :12-45</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-fe383fe9></path></svg><span class="tr-chip" data-v-fe383fe9>34 lines</span><span class="tr-ok" data-v-fe383fe9>✓</span></div><div class="p-tool-detail" data-v-fe383fe9><div class="p-code" data-v-fe383fe9>12 export function verify(token: string) {<br data-v-fe383fe9>13 return jwt.verify(token, getSecret());<br data-v-fe383fe9>14 }</div></div><div class="p-tool-row" data-v-fe383fe9><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-fe383fe9></path></svg><span class="tr-name" data-v-fe383fe9>Read</span><span class="tr-file" data-v-fe383fe9>middleware.ts</span><span class="tr-faint" data-v-fe383fe9>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-fe383fe9></path></svg><span class="tr-chip" data-v-fe383fe9>58 lines</span><span class="tr-ok" data-v-fe383fe9>✓</span></div></div><div class="p-tool-row" data-v-fe383fe9><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414 1.414l1.414-1.414l-1.414-1.414l-1.414 1.414zM4 21h16v-2H4v2z" data-v-fe383fe9></path></svg><span class="tr-name" data-v-fe383fe9>Edit</span><span class="tr-file" data-v-fe383fe9>middleware.ts</span><span class="tr-faint" data-v-fe383fe9>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-fe383fe9></path></svg><span class="tr-add" data-v-fe383fe9>+12</span><span class="tr-del" data-v-fe383fe9>−4</span><span class="tr-bar" aria-hidden="true" data-v-fe383fe9><span style="flex:12;background:var(--p-success);" data-v-fe383fe9></span><span style="flex:4;background:var(--p-danger);" data-v-fe383fe9></span></span><span class="tr-ok" data-v-fe383fe9>✓</span></div><div class="p-tool-row" data-v-fe383fe9><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975z" data-v-fe383fe9></path></svg><span class="tr-name" data-v-fe383fe9>Search</span><span class="tr-mono" data-v-fe383fe9>"jwt.verify"</span><span class="tr-faint" data-v-fe383fe9>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-fe383fe9></path></svg><span class="tr-chip" data-v-fe383fe9>4 results</span><span class="tr-ok" data-v-fe383fe9>✓</span></div><div class="p-msg" data-v-fe383fe9><p data-v-fe383fe9>I looked at the structure of <code data-v-fe383fe9>src/auth</code>; it is currently based on a session cookie. The scope of the change is below — once you confirm, I'll start.</p></div><div class="p-action" data-v-fe383fe9><div class="p-action-head" data-v-fe383fe9><span class="p-action-title" data-v-fe383fe9>A decision needs your confirmation</span></div><div class="p-action-body" data-v-fe383fe9>How long should the JWT expiry be? Default 7 days, refresh token 30 days.</div><div class="p-action-foot" data-v-fe383fe9><button class="p-btn ghost sm" data-v-fe383fe9>Customize</button><button class="p-btn primary sm" data-v-fe383fe9>Use default</button></div></div><div class="p-action" data-v-fe383fe9><div class="p-action-head" data-v-fe383fe9><span class="p-action-title" data-v-fe383fe9>Write permission required</span></div><div class="p-action-body" data-v-fe383fe9>About to modify <code data-v-fe383fe9>src/auth/middleware.ts</code>, 42 lines changed. Allow?</div><div class="p-action-foot" data-v-fe383fe9><button class="p-btn primary sm" data-v-fe383fe9>Allow this time</button><button class="p-btn ghost sm" data-v-fe383fe9>Always allow</button><button class="p-btn ghost sm" data-v-fe383fe9>Deny</button></div></div><div class="p-todo" data-v-fe383fe9><div class="p-todo-row done" data-v-fe383fe9><span class="p-todo-check" data-v-fe383fe9><svg viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-fe383fe9></path></svg></span>Replace session with JWT signing</div><div class="p-todo-row active" data-v-fe383fe9><span class="p-todo-check" data-v-fe383fe9><svg viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><circle cx="12" cy="12" r="3.5" data-v-fe383fe9></circle></svg></span>Refactor the auth middleware</div><div class="p-todo-row" data-v-fe383fe9><span class="p-todo-check" data-v-fe383fe9><svg viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><circle cx="12" cy="12" r="3.5" data-v-fe383fe9></circle></svg></span>Add unit tests</div></div></div></div></div><p data-v-fe383fe9><b data-v-fe383fe9>Wide markdown tables (desktop):</b> regular chat prose stays within the 760px reading column (<code data-v-fe383fe9>--p-content-max</code>), 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 (<code data-v-fe383fe9>--p-table-max</code>), 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 (<code data-v-fe383fe9>--p-table-cell-max</code>), 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.</p><h3 class="sub" data-v-fe383fe9>Tool calls: quiet activity lines, bespoke per tool</h3><p data-v-fe383fe9>High-frequency calls like <code data-v-fe383fe9>read</code> / <code data-v-fe383fe9>bash</code> / <code data-v-fe383fe9>grep</code> are "operational noise" — boxed, collapsible cards quickly drown out the conversation. Tool calls therefore render as <b data-v-fe383fe9>one quiet borderless line</b> 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:</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Three visual-weight tiers</span></div><div class="stage p col" data-v-fe383fe9><span class="stage-label" data-v-fe383fe9>① Tool line · lightest (default) — bespoke content per tool, no card chrome</span><div class="p-tool-row" style="align-self:stretch;" data-v-fe383fe9><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm3 3h5v2H7V8zm0 4h8v2H7v-2z" data-v-fe383fe9></path></svg><span class="tr-name" data-v-fe383fe9>Run</span><span class="tr-mono" data-v-fe383fe9>pnpm run build && pnpm lint</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-fe383fe9></path></svg><span class="tr-chip" data-v-fe383fe9>0.8s</span><span class="tr-ok" data-v-fe383fe9>✓</span></div><span class="stage-label" data-v-fe383fe9>② Activity run · medium (consecutive quiet activity — thinking + tool lines — folds to one smart-summary row)</span><div class="p-tool-group" data-v-fe383fe9><div class="p-tool-group-head" data-v-fe383fe9><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-fe383fe9></path></svg><span class="tg-title" data-v-fe383fe9>Read 3 files</span><svg class="tg-car" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-fe383fe9></path></svg></div></div><span class="stage-label" data-v-fe383fe9>③ Sub Agent identity card · one per delegation — task title + agent type; the whole card opens the side panel (no in-stream expansion, never grouped)</span><div class="p-agent-card" data-v-fe383fe9><span class="pa-ic" data-v-fe383fe9><svg viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M13.5 2c0 .444-.193.843-.5 1.118V5h5a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h5V3.118A1.5 1.5 0 1 1 13.5 2M6 7a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1zm-4 3H0v6h2zm20 0h2v6h-2zM9 14.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m6 0a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3" data-v-fe383fe9></path></svg></span><span class="pa-main" data-v-fe383fe9><span class="pa-task" data-v-fe383fe9>分析双引擎架构</span><span class="pa-type" data-v-fe383fe9>Explore</span></span><span class="pa-ok" data-v-fe383fe9>✓</span><span class="pa-go" data-v-fe383fe9>→</span></div><span class="stage-label" data-v-fe383fe9>④ Decision card · heavy (only question / approval, needs user input)</span><div class="p-action" data-v-fe383fe9><div class="p-action-head" data-v-fe383fe9><span class="p-action-title" data-v-fe383fe9>Write permission required</span></div><div class="p-action-body" data-v-fe383fe9>About to modify <code data-v-fe383fe9>src/auth/middleware.ts</code>, 42 lines changed.</div></div></div></div><ul class="clean check" data-v-fe383fe9><li data-v-fe383fe9>A tool call renders as <b data-v-fe383fe9>one quiet borderless line</b> (~24px, the thinking row's rhythm): leading glyph, tool-specific content, trailing meta + status. There is no card chrome and no hover wash — the chevron hugging the line's text (thinking-row style, never pushed to the far edge) is the only disclosure affordance, a real <code data-v-fe383fe9><button></code> carrying <code data-v-fe383fe9>aria-expanded</code> (keyboard path); the head itself is a plain click target (mouse path), so trailing slots may hold genuine buttons of their own (e.g. Agent's "open detail").</li><li data-v-fe383fe9><b data-v-fe383fe9>One type scale for the whole stream</b>: thinking rows, fold summary rows and tool lines all set 13px UI text; in-line mono and trailing meta run one step down at 12px (a monospace x-height reads larger, so 12px sits level next to 13px). Hierarchy comes from colour, never from size jumps or bold — everything on the line is regular weight: the only dark object is the file-name button (<code data-v-fe383fe9>--color-text</code> — the one interactive place to go); the action label (Run / Read / Edit…), the mono command / pattern and secondary context all sit at <code data-v-fe383fe9>--color-text-muted</code>; auxiliary elements (glyphs, chevrons, trailing meta) stay <code data-v-fe383fe9>--color-text-faint</code>. The stream thus reads in three quiet tiers: prose in text, tool lines in muted, thinking / captions in faint. Line content is centre-aligned so mono-only rows (Bash) sit level with the icon and chevron. Truncating line content (the CSS-ellipsis spans) sets <code data-v-fe383fe9>--leading-tight</code> rather than the row's <code data-v-fe383fe9>line-height: 1</code> — a 1em line box is shorter than the font's ascent + descent, so <code data-v-fe383fe9>overflow: hidden</code> would clip descenders (j / p / g / y); mono runs take the font's own <code data-v-fe383fe9>normal</code> leading instead, since JetBrains Mono's ≈1.32em metrics exceed <code data-v-fe383fe9>--leading-tight</code>. The 16px chevron still drives the ~24px row height.</li><li data-v-fe383fe9><b data-v-fe383fe9>Every tool kind composes its own line, leading with the tool's localized action label</b> (Run / Read / Edit / Write / Search / Find / Fetch…): Bash pairs its label with the full command in mono (CSS-truncated) plus a duration chip; Read / Edit / Write follow the label with the file name as a real button (opens the file preview) followed by the directory, a <code data-v-fe383fe9>:line-range</code> or a <code data-v-fe383fe9>+N −M</code> stat with a mini segmented bar; Grep shows the pattern in mono plus a match count; Glob / Ls list paths; Todo carries the active task with a done/total progress bar; goal tools show a coloured status pill; ExitPlanMode expands into a read-only plan receipt with its persisted review outcome. Unrecognized tools fall back to glyph + localized label + argument summary.</li><li data-v-fe383fe9><b data-v-fe383fe9>The settled question is the one exception to the quiet line</b>: once AskUserQuestion settles with a recognized answer, it becomes a small <b data-v-fe383fe9>receipt card</b> — the question card's echo (raised surface, hairline edge, lg radius, <code data-v-fe383fe9>--shadow-xs</code>, flush with the stream's left edge, ≤560px). The card echoes only the picks, checked with the live QuestionCard's CSS glyph language one step down (14px); passed-over options are not echoed. Dismissed (or zero-answer) collapses to a slim italic one-line card; while running, and for unrecognized output (background launch / error), it stays the plain quiet disclosure line with the raw output.</li><li data-v-fe383fe9>Clicking a line <b data-v-fe383fe9>expands it in place</b>; the detail hangs below at the line's own left edge (no inset), so it reads as part of the stream rather than as a separate card. Details are one of: the mono output panel (content-well surface, hairline edge, 12-line scroll cap), the inline diff, or clickable match / file lists (<code data-v-fe383fe9>path:line</code> opens the preview at that line). Code-bearing details — the Read content, the Edit diff, the Write content — are <b data-v-fe383fe9>syntax-highlighted by file type</b> (github-light / github-dark, following the colour scheme), with the Read output's real line numbers as the gutter; highlighting mounts lazily on first expand and degrades to plain text for unknown languages or oversized content.</li><li data-v-fe383fe9>Rows sit <b data-v-fe383fe9>flush with the message stream's left edge</b> (same alignment as prose and the thinking row): no inset, no hover wash, and the glyph rides the thinking row's 4px icon-to-text rhythm with no padded slot. Expanded rows inside a group stack directly on the shared rhythm — no dividers.</li><li data-v-fe383fe9>Consecutive activity — thinking segments and tool calls of ANY kind, quiet lines and richer cards alike — <b data-v-fe383fe9>folds into ONE activity-run row</b>: a smart summary sentence that aggregates the run per tool kind in first-appearance order (<code data-v-fe383fe9>Read 2 files · Ran 5 commands (1 failed) · 26s</code>), the failure clause hanging on its kind in danger red, the total span faint at the tail — one line, ellipsis-truncated, the full sentence in the title tooltip. Thinking items fold into the run but are not narrated in the sentence. The row shares the thinking row's language (borderless faint text row, text-colour hover only, one whole-row button with a rotating chevron) but rides a roomier 8px vertical padding — 30px against the quiet lines' 22px, so the turn-level summary keeps its presence between prose paragraphs; while the turn streams through the run the row stays expanded and the summary turns live (current action + cumulative per-kind stats + ticking whole seconds), and once every item settles it folds itself back — even if the user expanded it mid-run (the thinking block's vocabulary); a settled → running transition (the stream appending to the same run) reopens it. The glyph carries the state: the current step's own icon breathing while running, green ✓ / red ✕ once settled. A run needs <b data-v-fe383fe9>≥ 2 steps</b> — a lone step renders standalone as the block it always was. <b data-v-fe383fe9>Text never folds</b> (it breaks the run), and neither do successful media tools (no card — inline media is the turn's output); everything else folds, cards included: Todo / Goal progress narration, the sub-agent identity card, Question / Swarm cards and unrecognized kinds (skills, MCP tools) all join the run — the stay-expanded-while-live rule keeps a card visible exactly while it is active. The expanded run is the items flat in order (thinking rows + tool rows), each with its own in-row details intact — the lines keep their own 4px row rhythm but breathe 8px apart, with a small inset below the head.</li><li data-v-fe383fe9><b data-v-fe383fe9>Above the activity run sits the turn fold</b> (<code data-v-fe383fe9>TurnFold.vue</code>): when an assistant turn settles, every block before the LAST text block — thinking segments, activity runs, interim text paragraphs, Todo / Goal / sub-agent cards — folds into a single bare row reading <code data-v-fe383fe9>Worked 4m57s</code> (whole seconds, no glyph, no summary sentence), expanding into the folded blocks in order, each with its own rendering intact. The span is the turn's ELAPSED time (<code data-v-fe383fe9>turnWorkMs</code>): it ticks from the stamped start while the turn is open — approval/question waits included by design, so no park bookkeeping exists — then reads the daemon's own <code data-v-fe383fe9>durationMs</code> once settled (the server message stamps for history turns); the wall clock only feeds the live tick, so throttled tabs, session switches and remounts cannot corrupt the settled value. Without any stamp the row falls back to the generic <code data-v-fe383fe9>Work details</code>. Streaming turns show no row and a forced-open body — the live transcript is untouched, the fold lands only when the stream moves past the turn (or the turn parks). The split never hides the turn's output: the final text block and any trailing blocks (inline media, standalone cards) stay visible, and a text-only turn folds nothing. Fold state is a plain component ref — nothing persists, switching sessions resets to folded. Inside the right-side sub-agent transcript, disclosure bodies open instantly while their chevrons retain the standard rotation: animating the height of a full historical stream would relayout the entire panel on every animation frame.</li><li data-v-fe383fe9><b data-v-fe383fe9>A sub-agent delegation is an identity card</b> — never a quiet line: the card carries the TASK as its title and the agent type as a quiet meta line, while the orchestrator's full prompt stays out of the stream on purpose. The whole card is one action (the quiet shell vocabulary: raised surface, hairline edge, large radius, no shadow): click to open the subagent's live progress in the side panel — there is no in-stream expansion.</li><li data-v-fe383fe9>Status keeps the shared vocabulary: running (pulsing accent dot) / done (green ✓) / failed (red ✗), at the line's right edge. <b data-v-fe383fe9>Only two types keep a full card</b>: <code data-v-fe383fe9>Question</code> and <code data-v-fe383fe9>Approval</code> — they genuinely need the user's attention. The Swarm composite keeps one quiet card (raised surface, 0.5px hairline, large radius) for its phase overview + member accordion.</li><li data-v-fe383fe9><b data-v-fe383fe9>A task notification is a status card, not a quiet line</b> (<code data-v-fe383fe9>NotificationCard.vue</code>): the hidden <code data-v-fe383fe9><notification></code> injections (background-task / sub-agent settlement) render where they landed in the turn — a 28px status chip + title/sub head tinted with the toast status token pairs (completed → success, failed / timed_out / lost → danger, killed → warning, else neutral surface), expanding in place to the fields, the body, an output-file row (copy path) and the raw payload. ≥2 CONSECUTIVE notifications merge into one neutral group card (count + per-item status dots + compact rows, each expanding on its own). Notifications break the activity run but are never turn boundaries, and they <b data-v-fe383fe9>never fold</b> — a notification is an event worth noticing, not process noise, so it punches out of the turn fold and renders right after the fold row, in order.</li><li data-v-fe383fe9><b data-v-fe383fe9>A turn that dies on a model-request failure leaves a persistent terminal card</b> at the transcript tail (ChatPane's <code data-v-fe383fe9>.turn-failed</code>): the notification card's danger shell (danger-soft surface, danger hairline, 24px status chip with the warning glyph) carrying a title keyed by the wire error kind (model failure vs step-limit stop), the provider message as a muted sub, a mono diagnostics meta (code · HTTP status · request id), and exactly ONE secondary sm action — Continue, which submits a short continue prompt through the normal path. It renders only while the session sits idle on <code data-v-fe383fe9>lastTurnReason === 'failed'</code> (a turn with zero assistant output included, so it pins to the tail rather than any assistant row), it is not dismissible, and it vanishes the moment a new turn starts. While the turn is still fighting, the working indicator instead narrates the retry backoff ("retrying n/max" from the live <code data-v-fe383fe9>agent.status.updated</code> phase) — a retrying turn never shows the card. The transient error toast now fires only for background sessions; the viewed session's failure is fully covered by the card.</li><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Turn failed card · persistent terminal marker + one resume action</span></div><div class="stage p col" data-v-fe383fe9><div class="p-turn-failed" data-v-fe383fe9><span class="tf-chip" data-v-fe383fe9><svg viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><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" data-v-fe383fe9></path><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" data-v-fe383fe9></path><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" data-v-fe383fe9></path></svg></span><div class="tf-main" data-v-fe383fe9><span class="tf-title" data-v-fe383fe9>模型请求失败,本轮对话已中断</span><span class="tf-sub" data-v-fe383fe9>429 The engine is currently overloaded, please try again later</span><span class="tf-meta" data-v-fe383fe9>provider.rate_limit · HTTP 429 · req_01KZ8Y…</span></div><button class="p-btn secondary sm" data-v-fe383fe9>继续</button></div></div></div><li data-v-fe383fe9><b data-v-fe383fe9>A goal-continuation turn carries a provenance row</b>: the hidden <code data-v-fe383fe9>goal_continuation</code> trigger (goal mode's self-driven next turn — a turn boundary, unlike task notifications) never renders its machine prompt; instead the assistant turn it opens shows one faint 12px line flush with the stream's left edge — the <code data-v-fe383fe9>target</code> glyph shared with the Goal tool (this turn belongs to the goal) + a localized label — ABOVE the turn's content and OUTSIDE the turn fold, so the row survives as the turn's provenance after settling. The marker lands with the trigger (before the first assistant block), and while the newest exchange is a goal-continuation turn the undo affordances (edit-and-resend, Esc undo) are suppressed — rewinding would drop the hidden trigger while refilling the older user text.</li><li data-v-fe383fe9><b data-v-fe383fe9>A settled turn's file changes are one summary card</b> (<code data-v-fe383fe9>TurnFilesSummary.vue</code>): between the turn's final text and its footer, a §03 <code data-v-fe383fe9>Card</code> (hairline border, no shadow — NOT the quiet tool line, the artifacts are worth a discrete object) lists every file the turn's Edit / Write calls touched. The head reads "N files changed" with the aggregate <code data-v-fe383fe9>+A −D</code> and the mini diffbar; the aggregate hides whenever any row's stats are incomplete (a Write or an underivable edit makes the total a lower bound, never presented as exact). Each row is one clickable workspace-relative path (short and self-locating; a file outside the cwd stays absolute) with its per-file <code data-v-fe383fe9>+A −D</code> at the right edge. The row's action keys on the tool kind, and the stats tell it apart: a <b data-v-fe383fe9>Write</b> has no per-file count (its diff is underivable) and opens the whole file in the preview; an <b data-v-fe383fe9>Edit / MultiEdit</b> carries its <code data-v-fe383fe9>+A −D</code> and opens that file's <b data-v-fe383fe9>turn diff</b> in the right-side detail layer (<code data-v-fe383fe9>TurnDiffPanel.vue</code> — the turn's own X→Y change, not the git diff), whose header keeps an open-file action. The first three files show inline; the rest collapse behind a "N more files" ghost-button row in the card's foot. Where nothing handles the row action (the BTW side chat), the card renders its file rows as plain text instead of links.</li></ul>',15)),a("div",pe,[e[31]||(e[31]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Turn files summary · a real TurnFilesSummary (fixed sample)")],-1)),a("div",he,[a("div",ue,[s(M,{changes:S,cwd:Va,onOpenDiff:g,onOpenFile:g})])])]),e[137]||(e[137]=i('<div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Tool Call · quiet lines (expand on demand)</span></div><div class="stage p" data-v-fe383fe9><div class="p-tool-group open" data-v-fe383fe9><div class="p-tool-group-head" data-v-fe383fe9><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-fe383fe9></path></svg><span class="tg-title" data-v-fe383fe9>Read 2 files</span></div><div class="p-tool-row expanded" data-v-fe383fe9><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-fe383fe9></path></svg><span class="tr-name" data-v-fe383fe9>Read</span><span class="tr-file" data-v-fe383fe9>session.ts</span><span class="tr-faint" data-v-fe383fe9>src/auth · :12-45</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-fe383fe9></path></svg><span class="tr-chip" data-v-fe383fe9>34 lines</span><span class="tr-ok" data-v-fe383fe9>✓</span></div><div class="p-tool-detail" data-v-fe383fe9><div class="p-code" style="font-size:11px;padding:7px 9px;" data-v-fe383fe9>12 export function verify(…</div></div><div class="p-tool-row" data-v-fe383fe9><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-fe383fe9></path></svg><span class="tr-name" data-v-fe383fe9>Read</span><span class="tr-file" data-v-fe383fe9>middleware.ts</span><span class="tr-faint" data-v-fe383fe9>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-fe383fe9></path></svg><span class="tr-chip" data-v-fe383fe9>58 lines</span><span class="tr-ok" data-v-fe383fe9>✓</span></div></div><div class="p-tool-row" data-v-fe383fe9><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414 1.414l1.414-1.414l-1.414-1.414l-1.414 1.414zM4 21h16v-2H4v2z" data-v-fe383fe9></path></svg><span class="tr-name" data-v-fe383fe9>Edit</span><span class="tr-file" data-v-fe383fe9>middleware.ts</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-fe383fe9></path></svg><span class="tr-add" data-v-fe383fe9>+12</span><span class="tr-del" data-v-fe383fe9>−4</span><span class="tr-bar" aria-hidden="true" data-v-fe383fe9><span style="flex:12;background:var(--p-success);" data-v-fe383fe9></span><span style="flex:4;background:var(--p-danger);" data-v-fe383fe9></span></span><span class="tr-ok" data-v-fe383fe9>✓</span></div></div></div><h3 class="sub" data-v-fe383fe9>Decision cards · Question / Approval</h3><p data-v-fe383fe9>The two attention cards replace the composer in the dock and share one contract: a floating neutral shell (<code data-v-fe383fe9>--color-surface-raised</code> + hairline + <code data-v-fe383fe9>--radius-lg</code> + <code data-v-fe383fe9>--shadow-menu</code>), 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.</p><div class="stage-wrap" data-v-fe383fe9><div class="stage-bar" data-v-fe383fe9><span class="st" data-v-fe383fe9>Plan review · pinned option rows, second-line descriptions</span></div><div class="stage p col" data-v-fe383fe9><div class="p-action" style="max-width:520px;" data-v-fe383fe9><div class="p-action-head" data-v-fe383fe9><span class="p-action-title" data-v-fe383fe9>按这份 plan 开始实现?</span></div><div class="p-action-body" data-v-fe383fe9>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.</div><div class="p-opts" data-v-fe383fe9><div class="p-opt" data-v-fe383fe9><span class="n" data-v-fe383fe9>1</span><span class="p-opt-text" data-v-fe383fe9><span class="l" data-v-fe383fe9>方案 A:静态徽章</span><span class="d" data-v-fe383fe9>零依赖、渲染稳定,升级时需手动同步版本号。</span></span></div><div class="p-opt" data-v-fe383fe9><span class="n" data-v-fe383fe9>2</span><span class="p-opt-text" data-v-fe383fe9><span class="l" data-v-fe383fe9>方案 B:动态徽章</span><span class="d" data-v-fe383fe9>版本自动同步免维护,但要求仓库公开可访问。</span></span></div></div><div class="p-action-foot" data-v-fe383fe9><button class="p-btn ghost sm" data-v-fe383fe9>修改</button><button class="p-btn ghost sm" data-v-fe383fe9>拒绝并退出</button></div></div></div></div><ul class="clean check" data-v-fe383fe9><li data-v-fe383fe9><b data-v-fe383fe9>Footer contract</b>: actions are left-aligned in number-key order (1·2·3·4), each carrying a number chip — sized by <code data-v-fe383fe9>--p-chip-num</code> over <code data-v-fe383fe9>--color-inline-code-bg</code>, the same chip vocabulary as option rows and the multi-step chip; exactly one <code data-v-fe383fe9>primary</code> action, the rest are <code data-v-fe383fe9>ghost</code>. Feedback mode swaps the whole footer for submit / cancel.</li><li data-v-fe383fe9><b data-v-fe383fe9>Body by kind</b>: Write approvals preview the incoming content with <code data-v-fe383fe9>HighlightedCode</code> (syntax-highlighted, 24-row cap with scroll); Edit approvals render the before/after hunk as a highlighted line diff. Plan / diff / file kinds get a head expand toggle that lifts the cap so the block fills the card; the card itself never exceeds the pane (only the scroll area shrinks) — with the dock work pills visible, the dock takes over the same height budget as a flex column, so an expanded card yields the pills' height instead of pushing them past the pane's top edge. Once the plan scrolls, a soft shadow fades in at the scroll area's top edge — the sidebar's scroll-linked seam language, so clipped content reads as passing under the card chrome.</li><li data-v-fe383fe9><b data-v-fe383fe9>Danger hint</b>: destructive shell commands (rm -rf, sudo, force-push…) show a <code data-v-fe383fe9>danger-soft</code> filled hint row under the command — detection is a display-layer heuristic on the client.</li><li data-v-fe383fe9><b data-v-fe383fe9>Minimized</b>: the card collapses to a thin bar with a mono peek of the subject; the whole bar is the expand click target.</li><li data-v-fe383fe9><b data-v-fe383fe9>Question card</b>: the title is the question itself (2-line clamp), with a step chip for multi-question flows and a × dismiss button. Options use CSS radio/checkbox glyphs (accent when selected); the number chip and glyph top-align with the option text, optically centred on the label's first line. The footer follows the same left-aligned action contract (primary first, ghosts after), with the keyboard hint pinned to the right edge; keyboard: ↑↓ moves (Space toggles in multi), digits pick, Enter advances/submits, Esc dismisses.</li></ul><h3 class="sub" data-v-fe383fe9>Composer</h3><p data-v-fe383fe9>Unified into a single raised container: <code data-v-fe383fe9>--radius-composer</code> (32px) with <code data-v-fe383fe9>--corner-shape-composer: superellipse(1.5)</code> and a stable 0.5px edge. Focus crossfades a low-chroma line-and-accent edge over <code data-v-fe383fe9>--duration-slow</code> with <code data-v-fe383fe9>--ease-in-out</code>, while the neutral shadow stays unchanged — there is no added halo and no layout shift. The composer input (a ProseMirror contenteditable on desktop, a textarea on the web during the migration) uses <code data-v-fe383fe9>text-autospace: normal</code> 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 (<code data-v-fe383fe9>--composer-send-icon-size</code>, the production kimi.com size; it sits outside the <code data-v-fe383fe9>--p-ic-*</code> scale on purpose).</p><p data-v-fe383fe9><b data-v-fe383fe9>Fill and edge tokens</b>: the card's fill and rest border are their own tokens — <code data-v-fe383fe9>--color-composer-bg</code> and <code data-v-fe383fe9>--color-composer-line</code> — running the kimiwork / kimi.com production input recipe (<code data-v-fe383fe9>.chat-input__shell</code>): fill = <code data-v-fe383fe9>groupedBackground.secondary</code> (#ffffff light / #1f1f1f dark), rest border = <code data-v-fe383fe9>separator.s1</code> (13% black / 12% white), focus line = <code data-v-fe383fe9>fills.f4</code> (25% in both schemes), and <code data-v-fe383fe9>--shadow-input</code> = <code data-v-fe383fe9>effect.shadow.inputDefault</code> (<code data-v-fe383fe9>0 5px 16px -4px rgba(0,0,0,0.07)</code>, 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.</p><p data-v-fe383fe9><b data-v-fe383fe9>Send button tokens</b>: the send circle runs on <code data-v-fe383fe9>--color-send-bg</code> / <code data-v-fe383fe9>--color-send-bg-hover</code> / <code data-v-fe383fe9>--color-send-icon</code> (+ <code data-v-fe383fe9>*-disabled</code>, <code data-v-fe383fe9>--opacity-send-disabled</code>, <code data-v-fe383fe9>--shadow-send[-hover]</code>), following the production recipe (<code data-v-fe383fe9>.chat-input__send</code>): a neutral <code data-v-fe383fe9>labels.primary</code> fill (90% black light / 84% white dark, hover #252525 / 84.8%) with the production lift shadow (<code data-v-fe383fe9>0 7px 16px -13px 38% + 0 1px 2px 7%</code>, one step larger on hover), a <code data-v-fe383fe9>groupedBackground.secondary</code> glyph, and a disabled state of the same vocabulary — <code data-v-fe383fe9>fills.f2</code> fill with a <code data-v-fe383fe9>labels.quaternary</code> 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.</p><p data-v-fe383fe9><b data-v-fe383fe9>Layering, anchors, and motion</b>: the dock normally stays at <code data-v-fe383fe9>--z-sticky</code> so the Latest Messages pill can remain visible above its veil. While any Composer popup or work panel is open, the dock temporarily joins <code data-v-fe383fe9>--z-dropdown</code>, ensuring permission, work-mode, and model menus — and the work panel — 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 <code data-v-fe383fe9>--shadow-menu</code> and the same trigger-corner pop motion as Session Row menus: 0.97 scale with a 2px shift toward the trigger, <code data-v-fe383fe9>--duration-base</code> on entry, and <code data-v-fe383fe9>--duration-fast</code> on exit.</p><p data-v-fe383fe9><b data-v-fe383fe9>Attachment strip</b>: attachments hang inside the composer card above the input as two grouped rows — images/videos as shared <code data-v-fe383fe9>MediaThumb</code> rounded thumbnails, files as the shared <code data-v-fe383fe9>AttachmentChip</code> 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 <code data-v-fe383fe9>MediaLightbox</code> preview, which owns Escape via the shared dialog stack: images go through PhotoSwipe (<code data-v-fe383fe9>@moonshot-ai/app-client</code>'s <code data-v-fe383fe9>lib/mediaPreview</code>) and zoom out of the clicked thumbnail (scrim = <code data-v-fe383fe9>--color-scrim-strong</code>, caption = <code data-v-fe383fe9>--color-text-on-scrim</code>; the slide area is inset — 24px sides matching the video modal, 56px top/bottom clearing the close button and caption — so a viewport-filling image never kisses the edges), videos keep the custom modal. Both share the <code data-v-fe383fe9>--color-scrim-strong</code> backdrop and the same close button — the raised 36px circle (<code data-v-fe383fe9>.media-lightbox-close</code>) fixed at the viewport's top-right, rendered by <code data-v-fe383fe9>MediaLightbox</code> for both (PhotoSwipe's own top bar is disabled; zoom stays on wheel / pinch / image click). ReadMedia tool cards open it too (an App-level instance fed by the <code data-v-fe383fe9>openMedia</code> chain): the image zooms out of the card's thumbnail, and videos show as a static play tile that opens the modal player — no more right-side-panel detour or inline <code data-v-fe383fe9><video></code>.</p>',11)),a("div",ge,[e[38]||(e[38]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Composer")],-1)),a("div",me,[a("div",be,[e[36]||(e[36]=a("div",{class:"p-composer-ta ph"},"Message Kimi, / to run a command, @ to reference a file…",-1)),a("div",we,[a("div",ye,[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",ke,[s(d(o),{name:"shield-question",size:"sm"}),e[32]||(e[32]=t("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"})]),t("plan")],-1))]),e[35]||(e[35]=i('<div class="p-composer-right" data-v-fe383fe9><span class="p-pill" data-v-fe383fe9><span class="pp-strong" data-v-fe383fe9>kimi-k2</span><span class="pp-sub" data-v-fe383fe9>· thinking</span><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-fe383fe9></path></svg></span><button class="p-send" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M13 7.828V20h-2V7.828l-5.364 5.364l-1.414-1.414L12 4l7.778 7.778l-1.414 1.414z" data-v-fe383fe9></path></svg></button></div>',1))])]),e[37]||(e[37]=i('<div class="p-composer-strip" data-v-fe383fe9><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="M4 5a1 1 0 0 1 1-1h5l2 2h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5z" data-v-fe383fe9></path></svg>kimi-code-web<svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-fe383fe9><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-fe383fe9></path></svg></div>',1))])]),e[138]||(e[138]=i('<div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9><b data-v-fe383fe9>Site-wide consistency</b>: the composer uses one 32px superellipse shell and one 32px desktop control height. The add (+), permission, 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 <code data-v-fe383fe9>--color-text</code> fill with a <code data-v-fe383fe9>--color-bg</code> 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 <code data-v-fe383fe9>hand</code>, yolo <code data-v-fe383fe9>shield-question</code>, auto <code data-v-fe383fe9>full-access</code> — 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 work pills and panels — pill vocabulary, panel shell and motion, the two-tone head, per-kind bodies, filtering, and the open/cancel model — are specified in <b data-v-fe383fe9>Dock · work pills & panels</b> below. </div></div><p data-v-fe383fe9><b data-v-fe383fe9>Workspace attachment card</b>: on the empty session, the workspace picker is a <b data-v-fe383fe9>separate attachment card</b> tucked under the composer — and the composer card itself stays complete (its own 0.5px border, <code data-v-fe383fe9>--radius-composer</code> corners with <code data-v-fe383fe9>--corner-shape-composer</code>, 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 <code data-v-fe383fe9>--space-4</code> slides behind the card (the card is raised to <code data-v-fe383fe9>--z-sticky</code>), its square top edge stays hidden, and only the rounded bottom (<code data-v-fe383fe9>0 0 --radius-xl --radius-xl</code>) shows. Background <code data-v-fe383fe9>--color-hover</code> at 60% via <code data-v-fe383fe9>color-mix</code> (≈0.03 black in light, self-adapting in dark), no border, no shadow. Inside sits one quiet capsule trigger: transparent, <code data-v-fe383fe9>--radius-full</code>, 16px leading icon and 12px label at weight 475 in <code data-v-fe383fe9>--color-text-muted</code>; hover deepens to <code data-v-fe383fe9>--color-selected</code> and the label turns <code data-v-fe383fe9>--color-text</code>. The dropdown follows the §03 menu spec and is viewport-aware (flips above when more room, clamps max-height to the scrollport); at <code data-v-fe383fe9>--z-dropdown</code> it outranks both the card and the fixed click-outside backdrop (<code data-v-fe383fe9>--z-sticky</code>), which renders outside the composer because the card's <code data-v-fe383fe9>container-type</code> captures <code data-v-fe383fe9>position: fixed</code> descendants.</p><h3 class="sub" data-v-fe383fe9>Autocomplete menus</h3><p data-v-fe383fe9>The slash, mention, and add popups share one geometry, all on dedicated tokens: the <code data-v-fe383fe9>--color-menu-bg-frost</code> surface (the frostier recipe), frame padding <code data-v-fe383fe9>--menu-row-hug</code>, rows at <code data-v-fe383fe9>--menu-row-padding-block</code> × <code data-v-fe383fe9>--menu-row-padding-inline</code> with <code data-v-fe383fe9>--radius-menu-row</code> caps on the <code data-v-fe383fe9>--corner-shape-menu</code> curve, an icon-to-label gap of <code data-v-fe383fe9>--menu-row-gap-icon</code>, and a <code data-v-fe383fe9>--menu-rows-seam</code> between stacked rows. Touch rows pad to <code data-v-fe383fe9>--menu-row-touch-padding-block</code> with a hard floor of <code data-v-fe383fe9>--touch-target-min</code>. Scroll height caps at <code data-v-fe383fe9>--p-slash-menu-h</code> / <code data-v-fe383fe9>--p-mention-menu-h</code> / <code data-v-fe383fe9>--p-add-menu-h</code>; the scroll-edge fade is <code data-v-fe383fe9>--menu-scroll-fade</code>, and the overlay thumb rides <code data-v-fe383fe9>--menu-scrollbar-width</code> / <code data-v-fe383fe9>--menu-scrollbar-edge</code> / <code data-v-fe383fe9>--menu-scrollbar-track-inset</code> / <code data-v-fe383fe9>--menu-scrollbar-thumb-min</code> in <code data-v-fe383fe9>--color-menu-scrollbar</code> (hover <code data-v-fe383fe9>--color-menu-scrollbar-hover</code>) — 3px visually, with a wider invisible drag strip.</p><h3 class="sub" data-v-fe383fe9>Add menu</h3><p data-v-fe383fe9>The composer's <b data-v-fe383fe9>+ button</b> opens the add menu — the autocomplete family's action-list member: one column of icon + label (+ muted description) rows (Files, Goal, Plan, Swarm) on the same frost surface and row geometry as the slash/mention popups, capped at <code data-v-fe383fe9>--p-add-menu-h</code>. Semantically it is an action menu, not an autocomplete listbox: rows are <code data-v-fe383fe9>menuitem</code> commands, DOM focus moves into the menu (arrows navigate, Enter activates, Escape closes), and the + button carries <code data-v-fe383fe9>aria-haspopup="menu"</code> — the textarea's combobox ARIA never points at it.</p><p data-v-fe383fe9><b data-v-fe383fe9>Design decision: deliberately NOT the §03 Menu/MenuItem primitives.</b> Those are the trigger-dropdown family (sidebar, user menu, session rows) — <code data-v-fe383fe9>--color-menu-bg</code>, <code data-v-fe383fe9>--radius-lg</code>, a min-width box. The add menu instead shares the composer menus' material (the frostier surface, the composer corner curve, rows hugging the frame at the composer's text column, muted description sub-lines). Bending MenuItem into that material would require exactly the per-screen appearance overrides the primitive contract forbids, so the add menu keeps bespoke rows built directly on the shared <code data-v-fe383fe9>--menu-row-*</code> tokens. This paragraph is the canonical record of that choice — reviews should not re-litigate it.</p>',7)),a("div",xe,[e[46]||(e[46]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Add menu — family surface, icon + label + desc rows, keyboard focus wash")],-1)),a("div",Ce,[a("div",Se,[a("span",ze,[s(d(o),{name:"attachment",size:"sm"}),e[39]||(e[39]=a("span",{class:"n"},"Files",-1))]),a("span",Te,[s(d(o),{name:"target",size:"sm"}),e[40]||(e[40]=a("span",{class:"n"},"Goal",-1)),e[41]||(e[41]=a("span",{class:"d"},"Set a goal to keep pursuing",-1))]),a("span",qe,[s(d(o),{name:"file-edit",size:"sm"}),e[42]||(e[42]=a("span",{class:"n"},"Plan",-1)),e[43]||(e[43]=a("span",{class:"d"},"Turn plan mode on",-1))]),a("span",Be,[s(d(o),{name:"sparkles",size:"sm"}),e[44]||(e[44]=a("span",{class:"n"},"Swarm",-1)),e[45]||(e[45]=a("span",{class:"d"},"Turn swarm mode on",-1))])])])]),e[139]||(e[139]=i('<h3 class="sub" data-v-fe383fe9>Work modes</h3><p data-v-fe383fe9><b data-v-fe383fe9>Plan and Goal are the primary work modes — mutually exclusive, at most one armed at a time.</b> Arming happens only through the slash commands (<code data-v-fe383fe9>/plan</code>, <code data-v-fe383fe9>/goal</code>) or the add menu; an armed mode renders as the input row's leading pill — a neutral <code data-v-fe383fe9>--color-surface</code> chip with the mode's 14px icon, its label, and a × that disarms. The × is an IconButton sized <code data-v-fe383fe9>--wm-x-size</code> (below the sm default, so its hover wash never outgrows the pill's rounded end) with a <code data-v-fe383fe9>--wm-x-ring</code> hit reserve that stays inside the textarea's indent; on touch it meets <code data-v-fe383fe9>--touch-target-min</code>. The input's first-line text indent reserves exactly the pill's width (the desktop ProseMirror editor applies it to the first paragraph), so the caret and placeholder slide right rather than colliding; arming Goal also swaps the placeholder to its objective prompt. Sending with Goal armed creates the goal and the pill hands off to the dock's goal pill; a live goal does NOT lock the primary modes — <code data-v-fe383fe9>/goal</code> then just focuses the goal's panel, and <code data-v-fe383fe9>/plan</code> still arms (the only hard rule: one message cannot both create a goal and enter plan — the goal write carries the plan disarm atomically — and a failed mode write is treated as a send failure: the optimistic message rolls back, the error toasts). Swarm is deliberately NOT a mode: an orthogonal toolbar chip with its own enable confirmation, disarmed from the chip's ×.</p><h3 class="sub" data-v-fe383fe9>Dock · work pills & panels</h3><p data-v-fe383fe9><b data-v-fe383fe9>Work pills</b> (<code data-v-fe383fe9>WorkPill.vue</code>): the dock's workbar above the composer carries one pill vocabulary — font-driven by flex computation: the 1.5em leading icon and the label's own line box (<code data-v-fe383fe9>--text-base</code> at <code data-v-fe383fe9>--leading-normal</code>) both come to 21px at the 14px UI text, and 8px block padding wraps them to 37px, nothing pinning pixels, so the pills rescale with the font; borderless, with <code data-v-fe383fe9>--radius-lg</code> rounded-square corners, filled at the fills ladder's <code data-v-fe383fe9>--color-selected</code> rung over the shared <code data-v-fe383fe9>--p-menu-backdrop</code> blur — the panel's frosted recipe scaled down to a chip, so transcript text never reads through the light fill (the neutral hover wash layers on top — one layer, never two), the icon at full text colour, <code data-v-fe383fe9>--space-2</code> / <code data-v-fe383fe9>--space-3</code> block / inline padding — the trailing side adds a <code data-v-fe383fe9>--space-05</code> optical compensation against the leading glyph — and a <code data-v-fe383fe9>--space-1-5</code> content gap. Every pill stays expanded — the Code client does not collapse status chips — carrying icon + label and a trailing meta that answers one question — what is live on this surface right now — for background bash tasks, background sub-agents, todos, and the goal alike; the row insets to the composer's text column — dock inline inset + the card's 0.5px border + the input wrap's 16px inline padding — not the card edge. The active pill keeps the wash on permanently — one fills-ladder step deeper, neutral. The meta is always muted ink and surface-specific: the goal carries its status word, colour-coded by state (active <code data-v-fe383fe9>--color-success</code>, paused <code data-v-fe383fe9>--color-warning</code>, blocked <code data-v-fe383fe9>--color-danger</code>); the bash and sub-agent pills carry a pulsing dot and the running count, only while something runs (a quiet absence otherwise); the todos carry the done/total fraction. The plan pill joins the row only once plan mode is live server-side or a persisted plan exists — a merely armed directive stays in the composer's inline work-mode pill (its × cancels) and never reaches this bar, so every pill here reads as live server truth rather than local intent. Narrow panes wrap the row instead of clipping (the dock height observes); below the <code data-v-fe383fe9>--p-bp-sm</code> breakpoint the pills collapse to their icons — label and meta hide (the threshold is read from the token, never a hardcoded width).</p><p data-v-fe383fe9><b data-v-fe383fe9>Panel shell & motion</b>: a pill toggles the shared work panel — the menu family material: 70% page background via <code data-v-fe383fe9>color-mix</code> over the shared <code data-v-fe383fe9>--p-menu-backdrop</code> blur (the frostier recipe, see §06 Glassmorphism exemption), a 0.5px <code data-v-fe383fe9>--color-line</code> edge, <code data-v-fe383fe9>--radius-2xl</code>, and the menu panel's <code data-v-fe383fe9>--shadow-menu</code>. The panel pops from the clicked pill along the trigger-corner motion tokens (<code data-v-fe383fe9>--motion-panel-scale</code> / <code data-v-fe383fe9>--motion-panel-shift</code>), and switching pills replays the pop from the newly clicked pill (the shell is keyed by panel kind); while it is open the dock raises to <code data-v-fe383fe9>--z-dropdown</code> so it clears the transcript's new-message pill, and every window-drag strip pauses so an outside press reaches the page and dismisses. The panel owns Escape while open (a document-capture handler guarded by the shared IME latch, so a candidate-cancelling Escape is never swallowed), and a scrolled body dissolves toward the head through the <code data-v-fe383fe9>--menu-scroll-fade</code> alpha mask instead of hard-clipping. Height is content-sized up to <code data-v-fe383fe9>min(360px, 50vh)</code>; the filtered panels pin instead — see Filtering & sizing. The panel is chrome: nothing inside it is text-selectable, the head's filter chips included.</p><p data-v-fe383fe9><b data-v-fe383fe9>Panel head</b> (<code data-v-fe383fe9>WorkPanelHead.vue</code>): every work panel head is one tab row — a leading icon at the pill's 1.5em glyph size, the panel title at full text colour, and a muted trailing meta (<code data-v-fe383fe9>--color-text-muted</code>) carrying that panel's one live number, joined by the row's <code data-v-fe383fe9>--space-2</code> gap with no separator glyph: the goal's wall-clock time, the bash / sub-agent running count, the todos' done/total. Actions right-align in the head: the goal's pause / resume / cancel / close as quiet neutral IconButtons (cancel deliberately shares that neutral vocabulary), the plan's open-in-side-panel, dismiss-directive (shown only while the directive is live), and close, and the bash / sub-agent filter chips as a SegmentedControl. The plan head's meta carries the latest plan's review outcome. On touch these meet the 44px minimum (<code data-v-fe383fe9>--touch-target-min</code>) via the <code data-v-fe383fe9>hover: none</code> capability query — a width-only gate would miss tablets — and below 480px the head wraps so the actions take a full row.</p><p data-v-fe383fe9><b data-v-fe383fe9>Panel bodies</b>: todos read as a quiet list — a green <code data-v-fe383fe9>circle-check</code> for done, a hollow ring for pending, an xs Spinner for in-progress. The goal's detail (full objective, completion criterion, rendered with the chat Markdown renderer) fills the body — no footer strip. Bash tasks are long rows (<code data-v-fe383fe9>TasksPane.vue</code>): a StatusDot while running, <code data-v-fe383fe9>circle-check</code> when done, a close glyph for failed and for cancelled (a user stop is neutral, never reported as a failure), the command as the meta line, and a bare duration that renders only when computable — never the raw protocol status word. Sub-agents form a card grid (<code data-v-fe383fe9>SubagentGrid.vue</code>) — an auto-fill grid (minmax <code data-v-fe383fe9>--p-subagent-card-min</code>) of cards at the <code data-v-fe383fe9>--color-selected</code> rung with <code data-v-fe383fe9>--radius-lg</code> corners; each card carries the task name, a stable session-wide number (creation order across the session's background sub-agents — unique even across swarms; once shown it sticks, so late-arriving history takes the next tail number), an optional prompt meta line one size down (<code data-v-fe383fe9>--text-sm</code>), an icon-led model · effort line and the status row a further size down (<code data-v-fe383fe9>--text-xs</code>) — the status row pairs the task-row state glyph with the localized label, plus a clock-led bare duration that renders only when computable; the full-bleed <code data-v-fe383fe9>circle-check</code> (drawn for the todo rows' ring family) is scaled onto the shared icon grid wherever it sits beside other glyphs (task rows, cards, filter chips). A failed row tints its name <code data-v-fe383fe9>--color-danger</code>; a cancelled one stays neutral. Rows hover with a rounded strip that grows by padding and a matching negative margin — the row metrics never shift. The row stop is danger-coloured; the card cancel reveals on hover and is always visible on touch as a <code data-v-fe383fe9>--touch-target-min</code> corner target. Every pane's empty state is centered and muted. State and time labels — the head meta included — set <code data-v-fe383fe9>text-autospace: normal</code>, the transcript's mixed CJK/numeric spacing rule, so durations like 9小时2分 breathe.</p><p data-v-fe383fe9><b data-v-fe383fe9>State vocabulary</b>: two glyph families meet here by design — the activity dot (shared with the transcript's tool rows and swarm members) backs the task rows, the todo rows speak the default loader ring, and the sub-agent cards skip glyphs in favour of a localized text label:</p>',8)),a("table",Ae,[e[83]||(e[83]=a("thead",null,[a("tr",null,[a("th",null,"Surface"),a("th",null,"State"),a("th",null,"Meaning"),a("th",null,"Glyph"),a("th",null,"Ink")])],-1)),a("tbody",null,[a("tr",null,[e[48]||(e[48]=a("td",null,"Bash rows",-1)),e[49]||(e[49]=a("td",{class:"tk"},"running",-1)),e[50]||(e[50]=a("td",null,"Task in flight",-1)),a("td",null,[s(d(h),{status:"running"}),e[47]||(e[47]=t(" pulsing dot",-1))]),e[51]||(e[51]=a("td",null,[a("code",null,"--color-accent")],-1))]),a("tr",null,[e[54]||(e[54]=a("td",null,null,-1)),e[55]||(e[55]=a("td",{class:"tk"},"done",-1)),e[56]||(e[56]=a("td",null,"Finished cleanly",-1)),a("td",null,[s(d(o),{name:"circle-check",size:"sm"}),e[52]||(e[52]=t()),e[53]||(e[53]=a("code",null,"circle-check",-1))]),e[57]||(e[57]=a("td",null,[a("code",null,"--color-success")],-1))]),a("tr",null,[e[60]||(e[60]=a("td",null,null,-1)),e[61]||(e[61]=a("td",{class:"tk"},"failed",-1)),e[62]||(e[62]=a("td",null,"Errored — the row's name tints to match",-1)),a("td",null,[s(d(o),{name:"close",size:"sm"}),e[58]||(e[58]=t()),e[59]||(e[59]=a("code",null,"close",-1))]),e[63]||(e[63]=a("td",null,[a("code",null,"--color-danger")],-1))]),a("tr",null,[e[66]||(e[66]=a("td",null,null,-1)),e[67]||(e[67]=a("td",{class:"tk"},"cancelled",-1)),e[68]||(e[68]=a("td",null,"User stop — neutral, never a failure",-1)),a("td",null,[s(d(o),{name:"close",size:"sm"}),e[64]||(e[64]=t()),e[65]||(e[65]=a("code",null,"close",-1))]),e[69]||(e[69]=a("td",null,[a("code",null,"--color-text-muted")],-1))]),a("tr",null,[e[71]||(e[71]=a("td",null,"Todo rows",-1)),e[72]||(e[72]=a("td",{class:"tk"},"in_progress",-1)),e[73]||(e[73]=a("td",null,"Being worked on",-1)),a("td",null,[a("span",Me,[s(d(I),{size:"xs"})]),e[70]||(e[70]=t(" xs Spinner ring",-1))]),e[74]||(e[74]=a("td",null,[t("the row's own ink ("),a("code",null,"--color-text"),t(")")],-1))]),e[81]||(e[81]=a("tr",null,[a("td"),a("td",{class:"tk"},"pending"),a("td",null,"Not started"),a("td",null,[a("span",{class:"dw-ring"}),t(" hollow ring")]),a("td",null,[a("code",null,"--color-line-strong"),t(" stroke")])],-1)),a("tr",null,[e[77]||(e[77]=a("td",null,null,-1)),e[78]||(e[78]=a("td",{class:"tk"},"done",-1)),e[79]||(e[79]=a("td",null,"Completed",-1)),a("td",null,[s(d(o),{name:"circle-check",size:"md"}),e[75]||(e[75]=t()),e[76]||(e[76]=a("code",null,"circle-check",-1))]),e[80]||(e[80]=a("td",null,[a("code",null,"--color-success")],-1))]),e[82]||(e[82]=a("tr",null,[a("td",null,"Sub-agent cards"),a("td",{class:"tk"},"all"),a("td",null,"The task-row glyph plus a localized label — failed alone tints danger — with a clock-led bare duration trailing"),a("td",null,"glyph + label"),a("td",null,"muted / danger")],-1))])]),e[140]||(e[140]=i("<p data-v-fe383fe9><b data-v-fe383fe9>Filtering & sizing</b>: the bash and sub-agent heads carry the same four icon-led filter chips — recent (<code data-v-fe383fe9>clock</code>; running + the five most recently finished), running (<code data-v-fe383fe9>play</code>), done (<code data-v-fe383fe9>circle-check</code>; every terminal state), all (<code data-v-fe383fe9>list</code>) — and both filtered panels pin to <code data-v-fe383fe9>--p-dock-panel-h</code> so filtering never resizes the panel; the body scrolls inside. When the head runs out of room the chips collapse into a dropdown menu (<code data-v-fe383fe9>FilterControl.vue</code> measures the head itself, so the switch follows the panel's own width, not the viewport; the menu teleports to <code data-v-fe383fe9><body></code> and anchors to the trigger, so the panel's clip and backdrop-filter never squeeze it); the head title never wraps and is never clipped — once the filter is a dropdown the head always fits. An empty pane names its filter (no completed tasks is not no tasks).</p><p data-v-fe383fe9><b data-v-fe383fe9>Opening & cancelling</b>: clicking a row or card opens the task's detail in the right-side panel. Opening is gated: the overlay navigation button renders only when a stable <code data-v-fe383fe9>agentId</code> (on-demand transcript) or locally held output exists, so a REST-only cold-loaded row stays inert instead of opening an empty panel — and says so with the not-allowed cursor. Open and cancel are sibling controls (a full-cover overlay button, the stop IconButton floating above it): no nested interactives, and the stop action exists only while the task runs.</p>",2)),a("div",Ie,[e[94]||(e[94]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Work pills — one vocabulary, a live count or status where one exists")],-1)),a("div",Ee,[a("div",Ve,[a("span",De,[s(d(o),{name:"target",size:"md"}),e[84]||(e[84]=a("span",null,"Goal",-1)),e[85]||(e[85]=t()),e[86]||(e[86]=a("span",{class:"dw-live"},"Active",-1))]),a("span",He,[s(d(o),{name:"terminal",size:"md"}),e[87]||(e[87]=a("span",null,"Bash",-1))]),a("span",Le,[s(d(o),{name:"sparkles",size:"md"}),e[89]||(e[89]=a("span",null,"Sub Agent",-1)),e[90]||(e[90]=t()),a("span",Re,[s(d(h),{status:"running"}),e[88]||(e[88]=t("3",-1))])]),a("span",Oe,[s(d(o),{name:"list",size:"md"}),e[91]||(e[91]=a("span",null,"Progress",-1)),e[92]||(e[92]=t()),e[93]||(e[93]=a("span",{class:"dw-count"},"3/7",-1))])])])]),a("div",We,[e[135]||(e[135]=a("div",{class:"stage-bar"},[a("span",{class:"st"},"Work panels — two-tone head, filter chips, rows & card grid")],-1)),a("div",Ne,[a("div",Ue,[a("div",Pe,[a("span",Fe,[s(d(o),{name:"terminal",size:"md"}),e[95]||(e[95]=t("Bash ",-1)),e[96]||(e[96]=a("span",{class:"dw-meta"},"1 running",-1))]),a("span",je,[a("span",Ge,[s(d(o),{name:"clock",size:"sm"}),e[97]||(e[97]=t("Recent",-1))]),a("span",Ke,[s(d(o),{name:"play",size:"sm"}),e[98]||(e[98]=t("Running",-1))]),a("span",Je,[s(d(o),{name:"circle-check",size:"sm"}),e[99]||(e[99]=t("Done",-1))]),a("span",Qe,[s(d(o),{name:"list",size:"sm"}),e[100]||(e[100]=t("All",-1))])])]),a("div",Ye,[a("div",Ze,[s(d(h),{status:"running"}),e[101]||(e[101]=a("span",{class:"nm"},"pnpm test -- --watch",-1)),e[102]||(e[102]=a("span",{class:"tm"},"0:42",-1))]),a("div",Xe,[s(d(o),{name:"circle-check",size:"sm",class:"ok"}),e[103]||(e[103]=a("span",{class:"nm"},"pnpm run build",-1)),e[104]||(e[104]=a("span",{class:"tm"},"3m12s",-1))]),a("div",$e,[s(d(o),{name:"close",size:"sm"}),e[105]||(e[105]=a("span",{class:"nm"},"pnpm lint",-1)),e[106]||(e[106]=a("span",{class:"tm"},"1m05s",-1))]),a("div",_e,[s(d(o),{name:"close",size:"sm"}),e[107]||(e[107]=a("span",{class:"nm"},"node scripts/migrate.mjs",-1)),e[108]||(e[108]=a("span",{class:"tm"},"0:18",-1))])])]),a("div",ea,[a("div",aa,[a("span",ta,[s(d(o),{name:"sparkles",size:"md"}),e[109]||(e[109]=t("Sub Agent ",-1)),e[110]||(e[110]=a("span",{class:"dw-meta"},"1 running",-1))]),a("span",sa,[a("span",da,[s(d(o),{name:"clock",size:"sm"}),e[111]||(e[111]=t("Recent",-1))]),a("span",oa,[s(d(o),{name:"play",size:"sm"}),e[112]||(e[112]=t("Running",-1))]),a("span",ia,[s(d(o),{name:"circle-check",size:"sm"}),e[113]||(e[113]=t("Done",-1))]),a("span",na,[s(d(o),{name:"list",size:"sm"}),e[114]||(e[114]=t("All",-1))])])]),a("div",fa,[a("div",la,[e[118]||(e[118]=a("div",{class:"ct"},[a("span",{class:"nu"},"01"),a("span",{class:"nm"},"Explore the auth module")],-1)),e[119]||(e[119]=a("div",{class:"ds"},"Map every callsite of the legacy token refresh and report findings",-1)),a("div",ra,[a("div",ca,[s(d(o),{name:"robot",size:"sm"}),e[115]||(e[115]=a("span",null,"kimi-k2 · thinking",-1))]),a("div",va,[a("span",pa,[s(d(h),{status:"running"}),e[116]||(e[116]=t("Running",-1))]),a("span",ha,[s(d(o),{name:"clock",size:"sm"}),e[117]||(e[117]=t("0:42",-1))])])])]),a("div",ua,[e[123]||(e[123]=a("div",{class:"ct"},[a("span",{class:"nu"},"02"),a("span",{class:"nm"},"Draft the release notes")],-1)),e[124]||(e[124]=a("div",{class:"ds"},"Summarize the merged PRs since the last tag into user-facing notes",-1)),a("div",ga,[a("div",ma,[s(d(o),{name:"robot",size:"sm"}),e[120]||(e[120]=a("span",null,"kimi-k2 · thinking",-1))]),a("div",ba,[a("span",wa,[s(d(o),{name:"circle-check",size:"sm",class:"ok"}),e[121]||(e[121]=t("Done",-1))]),a("span",ya,[s(d(o),{name:"clock",size:"sm"}),e[122]||(e[122]=t("3m12s",-1))])])])]),a("div",ka,[e[128]||(e[128]=a("div",{class:"ct"},[a("span",{class:"nu"},"03"),a("span",{class:"nm"},"Run the integration tests")],-1)),e[129]||(e[129]=a("div",{class:"ds"},"pnpm test against the staging daemon",-1)),a("div",xa,[a("div",Ca,[s(d(o),{name:"robot",size:"sm"}),e[125]||(e[125]=a("span",null,"kimi-k2 · thinking",-1))]),a("div",Sa,[a("span",za,[s(d(o),{name:"close",size:"sm"}),e[126]||(e[126]=t("Failed",-1))]),a("span",Ta,[s(d(o),{name:"clock",size:"sm"}),e[127]||(e[127]=t("1m05s",-1))])])])]),a("div",qa,[e[133]||(e[133]=a("div",{class:"ct"},[a("span",{class:"nu"},"04"),a("span",{class:"nm"},"Migrate the config files")],-1)),e[134]||(e[134]=a("div",{class:"ds"},"Rewrite the workspace configs to the new schema",-1)),a("div",Ba,[a("div",Aa,[s(d(o),{name:"robot",size:"sm"}),e[130]||(e[130]=a("span",null,"kimi-k2 · thinking",-1))]),a("div",Ma,[a("span",Ia,[s(d(o),{name:"close",size:"sm"}),e[131]||(e[131]=t("Cancelled",-1))]),a("span",Ea,[s(d(o),{name:"clock",size:"sm"}),e[132]||(e[132]=t("0:18",-1))])])])])])])])]),e[141]||(e[141]=a("h3",{class:"sub"},"Responsive",-1)),e[142]||(e[142]=a("p",null,[t("See §02 "),a("code",null,"--p-bp-sm"),t(" 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.")],-1)),e[143]||(e[143]=a("div",{class:"callout info"},[a("span",{class:"ico"},"i"),a("div",null," 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. ")],-1))]),e[145]||(e[145]=i('<section id="themes" data-v-fe383fe9><div class="sec-head" data-v-fe383fe9><span class="sec-num" data-v-fe383fe9>05</span><h2 class="sec-title" data-v-fe383fe9>Theming</h2></div><p class="sec-desc" data-v-fe383fe9> Kimi Web uses <b data-v-fe383fe9>one unified theme</b>: the same components, fonts, radii, shadows, and surfaces — theming only swaps color values. Every semantic color token ships a light value in <code data-v-fe383fe9>:root</code> and a dark override in the <code data-v-fe383fe9>data-color-scheme</code> blocks; the semantic status colors (success / warning / danger) are independent palettes, one set each for light / dark. </p><h3 class="sub" data-v-fe383fe9>Accent</h3><p data-v-fe383fe9>The app has <b data-v-fe383fe9>one accent</b>: the brand blue (<code data-v-fe383fe9>--color-accent</code>, <code data-v-fe383fe9>#1783ff</code> light / <code data-v-fe383fe9>#58a6ff</code> 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 <code data-v-fe383fe9>--color-selected</code> so it reads as location, not as an action.</p><h3 class="sub" data-v-fe383fe9>Light / dark mode</h3><p data-v-fe383fe9>Each semantic token ships a light value in <code data-v-fe383fe9>:root</code> and a dark override in the two <code data-v-fe383fe9>data-color-scheme</code> blocks (explicit choice, or following the OS preference via <code data-v-fe383fe9>prefers-color-scheme</code>). Switching light / dark simply swaps between these two sets of derived tokens, with zero structural change.</p><div class="callout good" data-v-fe383fe9><span class="ico" data-v-fe383fe9>✓</span><div data-v-fe383fe9><b data-v-fe383fe9>Benefits of one theme</b>: 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. </div></div></section><section id="rules" data-v-fe383fe9><div class="sec-head" data-v-fe383fe9><span class="sec-num" data-v-fe383fe9>06</span><h2 class="sec-title" data-v-fe383fe9>Style Rules</h2></div><p class="sec-desc" data-v-fe383fe9> 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. </p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Rule ID</th><th data-v-fe383fe9>What it detects</th><th data-v-fe383fe9>Action</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>no-gradient-text</td><td data-v-fe383fe9>gradient text / gradient background</td><td data-v-fe383fe9><span class="pill red" data-v-fe383fe9>Forbidden</span></td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>no-glassmorphism</td><td data-v-fe383fe9><code data-v-fe383fe9>backdrop-filter: blur</code> (<b data-v-fe383fe9>TopBar sticky nav bar</b> and <b data-v-fe383fe9>menu surfaces via <code data-v-fe383fe9>--p-menu-backdrop</code></b> are the exceptions)</td><td data-v-fe383fe9><span class="pill amber" data-v-fe383fe9>TopBar + menus exempt</span></td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>no-color-glow</td><td data-v-fe383fe9>colored / large-radius box-shadow glow</td><td data-v-fe383fe9><span class="pill red" data-v-fe383fe9>Forbidden</span></td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>no-emoji-icon</td><td data-v-fe383fe9>using emoji as a functional icon (no exceptions). Emoji inside <b data-v-fe383fe9>user content</b> — session titles, messages — is not chrome and is out of scope (see §07 Session row's emoji icon)</td><td data-v-fe383fe9><span class="pill red" data-v-fe383fe9>Forbidden</span></td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>no-hardcoded-hex</td><td data-v-fe383fe9>unregistered hex color inside a component <code data-v-fe383fe9><style></code></td><td data-v-fe383fe9><span class="pill amber" data-v-fe383fe9>Warning</span></td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>no-hardcoded-font</td><td data-v-fe383fe9>hard-coded <code data-v-fe383fe9>font-family</code> in a component (e.g. <code data-v-fe383fe9>'Inter'</code>) instead of <code data-v-fe383fe9>var(--font-ui)</code></td><td data-v-fe383fe9><span class="pill amber" data-v-fe383fe9>Warning</span></td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>radius-from-scale</td><td data-v-fe383fe9>radius value not in <code data-v-fe383fe9>{4,6,8,12,16,20,999}</code></td><td data-v-fe383fe9><span class="pill amber" data-v-fe383fe9>Warning</span></td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>z-from-scale</td><td data-v-fe383fe9>z-index using an unregistered large number</td><td data-v-fe383fe9><span class="pill amber" data-v-fe383fe9>Warning</span></td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>weight-from-scale</td><td data-v-fe383fe9>font-weight not in <code data-v-fe383fe9>{400,500}</code></td><td data-v-fe383fe9><span class="pill amber" data-v-fe383fe9>Warning</span></td></tr></tbody></table><h3 class="sub" data-v-fe383fe9>State matrix</h3><p data-v-fe383fe9>Every interactive primitive should define the following states where applicable; missing ones are flagged by the style rules. <code data-v-fe383fe9>focus-visible</code> always uses <code data-v-fe383fe9>--p-focus-ring</code> (appears only on keyboard focus, see §08); <code data-v-fe383fe9>disabled</code> is uniformly <code data-v-fe383fe9>opacity:.5</code>.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>State</th><th data-v-fe383fe9>Button</th><th data-v-fe383fe9>Input</th><th data-v-fe383fe9>Card</th><th data-v-fe383fe9>Menu item</th><th data-v-fe383fe9>Switch</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>default</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>✓</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>hover</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>—</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>active / pressed</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>focus-visible</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>✓</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>disabled</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>—</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>loading</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>selected / active</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>✓</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>error</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>readonly</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>✓</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td><td data-v-fe383fe9>—</td></tr></tbody></table><h3 class="sub" data-v-fe383fe9>Chat working indicator</h3><div class="callout good" data-v-fe383fe9><span class="ico" data-v-fe383fe9>✓</span><div data-v-fe383fe9> The chat working state ("prompt sent, turn unfinished") is a brand signature of Kimi Web, rendered uniformly by the <code data-v-fe383fe9>WorkingIndicator</code> component: the 小蓝 mascot plus a phase label — "Requesting…" until the assistant's reply starts, "Working…" once it is streaming. All other loading states (including <code data-v-fe383fe9>ActivityNotice</code>) use the plain <code data-v-fe383fe9>Spinner</code>. </div></div><h3 class="sub" data-v-fe383fe9>Glassmorphism exemption</h3><div class="callout good" data-v-fe383fe9><span class="ico" data-v-fe383fe9>✓</span><div data-v-fe383fe9><code data-v-fe383fe9>backdrop-filter: blur</code> is banned site-wide, with <b data-v-fe383fe9>two exceptions</b>: the <code data-v-fe383fe9>.frost</code> variant of <code data-v-fe383fe9>TopBar</code> — 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 and the composer dropdowns use the <code data-v-fe383fe9>--color-menu-bg</code> token (a 95% surface), while the autocomplete family — slash/mention popups and the dock work panel — deliberately runs a frostier recipe of its own: 70% page background (single-sourced as <code data-v-fe383fe9>--color-menu-bg-frost</code>) over the shared <code data-v-fe383fe9>--p-menu-backdrop</code> blur, which stays the single-sourced blur token across all of them. The dock's work surfaces — the work panel and its pills, persistent over the scrolling transcript — ride that same frostier recipe (specified per-surface in §04 (Dock · work pills & panels)) rather than a bespoke one. No other component (card, dialog, Toast, panel) may use glassmorphism; violations are flagged under <code data-v-fe383fe9>no-glassmorphism</code>, and menu blur with ad-hoc values (anything but the token) is flagged too. </div></div><div class="footer" data-v-fe383fe9><span data-v-fe383fe9>Kimi Web Design System · v1.0</span><span data-v-fe383fe9>The reference when changing the web UI</span></div></section><section id="shell" data-v-fe383fe9><div class="sec-head" data-v-fe383fe9><span class="sec-num" data-v-fe383fe9>07</span><h2 class="sec-title" data-v-fe383fe9>App Shell & Sidebar</h2></div><p class="sec-desc" data-v-fe383fe9> 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. </p><h3 class="sub" data-v-fe383fe9>Layout grid</h3><p data-v-fe383fe9>On web it is a single-row 5-track grid: the sidebar and the right panel each occupy a permanent <code data-v-fe383fe9>auto</code> 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.)</p><div class="code" data-v-fe383fe9><div class="code-bar" data-v-fe383fe9><span class="d" data-v-fe383fe9></span><span class="d" data-v-fe383fe9></span><span class="d" data-v-fe383fe9></span><span class="fn" data-v-fe383fe9>App.vue · .app</span></div><pre data-v-fe383fe9>grid-template-columns: auto 0 minmax(0, 1fr) 0 auto;\n /* sidebar ↑ ↑handle ↑conversation ↑handle ↑right panel (auto) */</pre></div><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Token</th><th data-v-fe383fe9>Value</th><th data-v-fe383fe9>Usage</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>sidebar width</td><td class="val" data-v-fe383fe9>270px default (adjustable)</td><td data-v-fe383fe9>expanded sidebar width, changed by dragging the ResizeHandle; should approach §02's <code data-v-fe383fe9>--p-sidebar-w</code> (264px)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--preview-w</td><td class="val" data-v-fe383fe9>460px</td><td data-v-fe383fe9>width of the right preview panel when open</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--panel-head-h</td><td class="val" data-v-fe383fe9>48px</td><td data-v-fe383fe9>unified height for all right panel heads + the conversation column head; both use a 0.5px bottom hairline</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--p-bp-sm</td><td class="val" data-v-fe383fe9>640px</td><td data-v-fe383fe9>≤640 switches to a mobile single column (top bar + conversation), no sidebar / handle / right panel</td></tr></tbody></table><ul class="clean" data-v-fe383fe9><li data-v-fe383fe9>The right panel track exists permanently, with its width toggling between <code data-v-fe383fe9>0 ↔ var(--preview-w)</code> and no transition — animating a grid track would relayout the whole app grid every frame (when open it squeezes the conversation column, rather than switching templates).</li><li data-v-fe383fe9>The sidebar collapses SYMMETRICALLY to the right panel: its container width animates to 0 while the content keeps its fixed width anchored to the right edge (clipped, sliding out left — no reflow, hairline stays on the clipped content). No rail remains. The collapse control differs by platform: on <b data-v-fe383fe9>macOS desktop</b> the toggle is a single resident floating IconButton pinned beside the traffic lights (rendered in both states, only the glyph swaps — the sidebar slides underneath it, never moves or flashes); on <b data-v-fe383fe9>Windows / web</b> the collapse button lives inside the sidebar header (right-aligned), and a floating expand button appears at the top-left only while collapsed. The conversation header uses a 0.5px bottom hairline and pads left in step with the transition while collapsed.</li><li data-v-fe383fe9>All grid children must have <code data-v-fe383fe9>min-height:0; min-width:0</code>, so only the inner scroll containers scroll and the page itself does not scroll.</li></ul><h3 class="sub" data-v-fe383fe9>Sidebar alignment system (<code data-v-fe383fe9>--sb-*</code>)</h3><p data-v-fe383fe9>All sidebar rows (group head, session row, New chat, search, and Settings buttons) share 4 custom properties. Their 16px icon slots and <code data-v-fe383fe9>--sb-gap</code> place every label on the same x-axis as the workspace name.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Token</th><th data-v-fe383fe9>Value</th><th data-v-fe383fe9>Usage</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--sb-inset</td><td class="val" data-v-fe383fe9>12px</td><td data-v-fe383fe9>row box (hover/selected pill) inset from the sidebar edges — matches the brand header's 12px padding</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--sb-pad-x</td><td class="val" data-v-fe383fe9>20px</td><td data-v-fe383fe9>content start x (= --sb-inset + 8px row padding)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--sb-gutter</td><td class="val" data-v-fe383fe9>16px</td><td data-v-fe383fe9>leading icon slot width — matches the workspace folder icon so the session title aligns under the workspace name</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>--sb-gap</td><td class="val" data-v-fe383fe9>8px</td><td data-v-fe383fe9>gap between the icon slot and the text</td></tr></tbody></table><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9> The session title's starting x = <code data-v-fe383fe9>--sb-pad-x + --sb-gutter + --sb-gap</code>. 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. </div></div><h3 class="sub" data-v-fe383fe9>Sidebar structure</h3><p data-v-fe383fe9>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 <code data-v-fe383fe9>position: sticky</code>, 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 <code data-v-fe383fe9>--color-sidebar-bg</code> (one step off <code data-v-fe383fe9>--color-bg</code>: 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 <code data-v-fe383fe9>--sb-hover</code> (= the global <code data-v-fe383fe9>--color-hover</code> wash); the selected row uses the lighter <code data-v-fe383fe9>--sb-selected</code> wash derived from <code data-v-fe383fe9>--color-selected</code> — On macOS desktop the sidebar is instead <b data-v-fe383fe9>frosted</b>: the window carries a native <code data-v-fe383fe9>NSVisualEffectView</code> ('menu' vibrancy, following the in-app scheme via the nativeTheme mirror, its state pinned to <code data-v-fe383fe9>inactive</code> so the material keeps its flat pressed-down colour — ≈ #282829 dark / #E7E7E7 light — with no active/inactive drift) and the sidebar column drops <code data-v-fe383fe9>--color-sidebar-bg</code> for a single translucent <code data-v-fe383fe9>--color-sidebar-tint</code> wash that presses the pinned material one step — ≈ #282829 → ≈ #1e1e1f in dark (<code data-v-fe383fe9>rgba(0,0,0,0.25)</code>), ≈ #E7E7E7 → ≈ #f1f1f1 in light (<code data-v-fe383fe9>rgba(255,255,255,0.4)</code>) — with header and footer staying transparent so the tint reads as one uniform pane; the root chain (<code data-v-fe383fe9>html/body/#app/.app</code>) stays unpainted only under the <code data-v-fe383fe9>macos-desktop</code> + <code data-v-fe383fe9>vibrancy</code> 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 <code data-v-fe383fe9>--color-sidebar-bg</code>, while the traffic-light layout keeps keying off <code data-v-fe383fe9>macos-desktop</code> 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 <code data-v-fe383fe9>mask-image</code> 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 <code data-v-fe383fe9>text-overflow</code> becomes <code data-v-fe383fe9>clip</code> so a long tail dissolves instead of dotting.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Block</th><th data-v-fe383fe9>Use</th><th data-v-fe383fe9>Note</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td data-v-fe383fe9>Brand header</td><td data-v-fe383fe9>logo + name + collapse IconButton (right-aligned)</td><td data-v-fe383fe9>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)</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>New chat</td><td data-v-fe383fe9>full-width left-aligned button (custom)</td><td data-v-fe383fe9>500-weight label; same rhythm as the session rows in the list (left-aligned, hover = <code data-v-fe383fe9>--sb-hover</code>). <b data-v-fe383fe9>Do not</b> use Button (centered, breaks the rhythm)</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Search</td><td data-v-fe383fe9>bare search row (custom)</td><td data-v-fe383fe9>500-weight label; no border, hover/focus shows the faint <code data-v-fe383fe9>--color-hover</code> wash; icon + label, with the <code data-v-fe383fe9>Kbd</code> keycaps (⌘K / Ctrl K) pushed to the trailing edge — label and shortcut are justified apart. <b data-v-fe383fe9>Do not</b> use Input (the 38px bordered version is too heavy). It is a direct sibling of New chat in the action group</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Section label</td><td data-v-fe383fe9><code data-v-fe383fe9>.p-section-label</code></td><td data-v-fe383fe9>uppercase muted small titles like "Workspaces", using <code data-v-fe383fe9>--weight-section-label</code> (600)</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Pinned head</td><td data-v-fe383fe9>fixed block above the scroll container (<code data-v-fe383fe9>.sessions-head</code>): the pinned section (<code data-v-fe383fe9>PinnedSessionList.vue</code>) + the "Workspaces" section label</td><td data-v-fe383fe9>stays put while the workspace groups scroll; owns the top scroll-linked seam (hairline + fade, only while scrolled). Pinned rows render in pure recency order (updatedAt desc — no manual ordering, no attention tiering): drag a session row in to pin it (the drop spot carries no position meaning), drag a pinned row out to unpin. The pinned section folds via its label chevron (persisted, <code data-v-fe383fe9>kimi-web.pinned-collapsed</code>) 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</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Workspace head / session row</td><td data-v-fe383fe9>see next two sections</td><td data-v-fe383fe9>share <code data-v-fe383fe9>--sb-*</code> alignment</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>User-menu footer</td><td data-v-fe383fe9>account area (<code data-v-fe383fe9>components/UserMenu.vue</code>) opening an upward §03 menu</td><td data-v-fe383fe9>pinned row under the session list, separated by a 0.5px <code data-v-fe383fe9>--line</code> 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 (used-percent values via <code data-v-fe383fe9>settings.planUsage.usedPct</code>, 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, and the whole menu (flyouts included) runs one step above the §03 default density — base-size labels, taller rows</td></tr></tbody></table><div class="callout warn" data-v-fe383fe9><span class="ico" data-v-fe383fe9>!</span><div data-v-fe383fe9><b data-v-fe383fe9>Why New chat / search / inline rename don't use Button / Input:</b> 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. </div></div><h3 class="sub" data-v-fe383fe9>Session row</h3><p data-v-fe383fe9>A session row is an inset rounded pill, structured as: <code data-v-fe383fe9>status slot → title → time → attention Badge → hover actions (pin / archive)</code>.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Part</th><th data-v-fe383fe9>Rule</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td data-v-fe383fe9>Container</td><td data-v-fe383fe9><code data-v-fe383fe9>padding: 8px 8px</code> inside the list's <code data-v-fe383fe9>--sb-inset</code> gutter, <code data-v-fe383fe9>radius-sm</code>; <b data-v-fe383fe9>no fixed/min height</b> — row height is font-driven (title <code data-v-fe383fe9>line-height: --leading-tight</code>, ≈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 = <code data-v-fe383fe9>--sb-hover</code> (the global <code data-v-fe383fe9>--color-hover</code> wash); active = <code data-v-fe383fe9>--sb-selected</code> (75% of the global selected wash) — neutral, no accent tint, no border, no weight change</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Status slot (lead)</td><td data-v-fe383fe9>fixed <code data-v-fe383fe9>--sb-gutter</code> width; running = <code data-v-fe383fe9>Spinner</code> sm, otherwise unread = 7px accent dot; empty while an attention Badge owns the row — one status at a time, decided by the shared <code data-v-fe383fe9>SessionDisplayStatus</code> enum (app-core <code data-v-fe383fe9>sessionDisplayStatus.ts</code>: approval › question › running › aborted › unread)</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Title</td><td data-v-fe383fe9>flex:1 with truncation and <code data-v-fe383fe9>user-select:none</code>; double-click enters inline rename (compact input, not Input), whose text remains selectable</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Emoji icon</td><td data-v-fe383fe9>the session icon is the title's LEADING emoji cluster (app-core <code data-v-fe383fe9>splitSessionEmoji</code> — 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 <code data-v-fe383fe9><button></code> for a11y), and clicking it opens <code data-v-fe383fe9>SessionEmojiPicker</code> — 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 + <code data-v-fe383fe9>--z-dropdown</code>, 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</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Time</td><td data-v-fe383fe9>mono xs, <code data-v-fe383fe9>fg-faint</code>; yields to the hover actions on hover</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Attention Badge</td><td data-v-fe383fe9><code data-v-fe383fe9>Badge</code> sm: info (needs answer) / warning (needs approval) / danger (aborted)</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Hover actions</td><td data-v-fe383fe9><code data-v-fe383fe9>IconButton</code> 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</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Flat-style variant (flat list + pinned section)</td><td data-v-fe383fe9>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 <code data-v-fe383fe9>cwdLabel</code>): ① no leading status slot — the title is left-aligned at the row's content edge; ② a second line under the title: <code data-v-fe383fe9>folder-closed</code> icon sm + the cwd's final directory name (<code data-v-fe383fe9>-</code> when the session has no cwd), xs faint like the time — except the icon, which takes <code data-v-fe383fe9>--color-text-muted</code> (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 small tag (<code data-v-fe383fe9>git-pull-request</code> icon + #number, 2xs medium on a soft ground with a hairline edge and radius-sm corners — a mini §03 Badge) sits at the line's right edge, state-colored the GitHub way (open = <code data-v-fe383fe9>--color-success-soft</code> ground + <code data-v-fe383fe9>--color-success</code> text, merged = <code data-v-fe383fe9>--color-done-soft</code> + <code data-v-fe383fe9>--color-done</code> purple, closed = neutral sunken) 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 <code data-v-fe383fe9>cwdLabel</code> and keep the classic structure. The flat ↔ grouped switch lives in a dropdown on the SESSIONS section label (fixed <code data-v-fe383fe9>list-settings</code> 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)</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Archive</td><td data-v-fe383fe9>no confirm — the hover archive button / menu item archives immediately, then App.vue shows the §03 <code data-v-fe383fe9>ActionToast</code> (top-center) with Undo (restores the session) and Settings (opens the archived list)</td></tr></tbody></table><h3 class="sub" data-v-fe383fe9>Workspace group</h3><p data-v-fe383fe9>The group head and session rows share <code data-v-fe383fe9>--sb-*</code>: folder icon (open/closed) → name, with the kebab and "+" revealed on hover.</p><ul class="clean" data-v-fe383fe9><li data-v-fe383fe9>The folder icon leads the row (switching icons between open and closed states) with the plain <code data-v-fe383fe9>--sb-gap</code> before the name — it does not pad out the <code data-v-fe383fe9>--sb-gutter</code> slot.</li><li data-v-fe383fe9>The name uses 500 weight with muted color (<code data-v-fe383fe9>--color-text-muted</code>, one step lighter than session titles), so group heads remain clear without competing with list content. No path subtitle; hovering the name shows the full root path in a <code data-v-fe383fe9>Tooltip</code>.</li><li data-v-fe383fe9>The kebab (menu) and "+" (new chat in this workspace) both use <code data-v-fe383fe9>IconButton</code> sm inside a floating actions layer anchored to the row's right edge — no reserved layout space, so the name uses the full row width when idle. Shown on hover, keyboard focus, or while the menu is open; the layer backs itself with the sidebar surface (container background) plus the row hover wash (an <code data-v-fe383fe9>::after</code> shown only while the row is hovered), so its color exactly equals the row's current background and the overlapped name tail doesn't bleed through (hidden via <code data-v-fe383fe9>opacity:0</code>, staying in the tab order). On macOS desktop the layer paints nothing at all — the name's <code data-v-fe383fe9>mask-image</code> fade (see the sidebar section above) dissolves the tail before it reaches the buttons</li><li data-v-fe383fe9>The group is collapsible; when collapsed its session list is hidden.</li><li data-v-fe383fe9>While the active workspace has no session selected (the draft state — e.g. right after adding the workspace, or after New chat), the group head carries the same neutral <code data-v-fe383fe9>--sb-selected</code> fill as a selected session row (selection reads as "where I am"; the fill wins over hover). Once a session is selected or created, the fill moves to that session row.</li></ul><h3 class="sub" data-v-fe383fe9>Show more & collapse</h3><p data-v-fe383fe9>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.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Part</th><th data-v-fe383fe9>Rule</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Row</td><td data-v-fe383fe9>a 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), <code data-v-fe383fe9>radius-sm</code>; hover = <code data-v-fe383fe9>--sb-hover</code> (no text recolor); <code data-v-fe383fe9>:focus-visible</code> uses <code data-v-fe383fe9>--p-focus-ring</code></td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Chevron</td><td data-v-fe383fe9>sm (down = expand, up = collapse); the row indents by <code data-v-fe383fe9>--sb-gutter + --sb-gap</code> so the first button's chevron starts exactly at the session-title x, lining the control's leading edge up with the titles above</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Label</td><td data-v-fe383fe9><code data-v-fe383fe9>font-ui</code>, <code data-v-fe383fe9>text-xs</code>, <code data-v-fe383fe9>--color-text-muted</code>; truncated</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Separator</td><td data-v-fe383fe9>faint middot (<code data-v-fe383fe9>--color-text-faint</code>) with <code data-v-fe383fe9>--space-1</code> side margins, rendered only when both controls are present</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Behavior</td><td data-v-fe383fe9>each 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</td></tr></tbody></table><h3 class="sub" data-v-fe383fe9>ResizeHandle</h3><p data-v-fe383fe9>A 4px grab strip layered over the 1px column border (<code data-v-fe383fe9>margin: 0 -2px</code> 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.</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Rule</th><th data-v-fe383fe9>Value</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td data-v-fe383fe9>Width / cursor</td><td data-v-fe383fe9>4px strip, 2px bar / <code data-v-fe383fe9>col-resize</code> mid-range; <code data-v-fe383fe9>w-resize</code> / <code data-v-fe383fe9>e-resize</code> at the drag limits (hints the direction that still resizes)</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Normal / hover / drag</td><td data-v-fe383fe9>transparent / <code data-v-fe383fe9>--color-selected</code> (f2) / <code data-v-fe383fe9>--color-line-strong</code> (f3) — the neutral ramp one step up, never accent</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Layer</td><td data-v-fe383fe9><code data-v-fe383fe9>--z-dropdown</code>, above pane-level sticky chrome (chat dock at <code data-v-fe383fe9>--z-sticky</code>) so the overhang stays visible and grabbable</td></tr><tr data-v-fe383fe9><td data-v-fe383fe9>Behavior</td><td data-v-fe383fe9>panel width follows the pointer 1:1 while dragging (the parent disables transitions to avoid lag); on release it is persisted to localStorage</td></tr></tbody></table><h3 class="sub" data-v-fe383fe9>Right panel</h3><p data-v-fe383fe9>The right panels (file preview / Diff / compaction summary / sub-agent / side chat) share one track and one head primitive.</p><ul class="clean" data-v-fe383fe9><li data-v-fe383fe9>The panel head uses the <code data-v-fe383fe9>PanelHeader</code> primitive (48px = <code data-v-fe383fe9>--panel-head-h</code>), the same height as the conversation column head, so the hairline runs as one line.</li><li data-v-fe383fe9>Panel head: bold mono title + optional muted subtitle + middle slot (Badge / control / path) + close IconButton on the right.</li><li data-v-fe383fe9>When opened, the panel width snaps from <code data-v-fe383fe9>0 → var(--preview-w)</code> with no animation, squeezing the conversation column in a single layout.</li><li data-v-fe383fe9>At ≤640px the panel becomes a full-screen overlay (<code data-v-fe383fe9>position:fixed; inset:0</code>).</li></ul><h3 class="sub" data-v-fe383fe9>Bottom terminal panel (desktop-only)</h3><p data-v-fe383fe9>The native terminal (<code data-v-fe383fe9>components/terminal/</code>) 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 <code data-v-fe383fe9>0 ↔ var(--terminal-h)</code> (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.</p><ul class="clean" data-v-fe383fe9><li data-v-fe383fe9>Resize: a horizontal twin of the ResizeHandle (4px strip over the 0.5px top hairline, <code data-v-fe383fe9>row-resize</code> mid-range, <code data-v-fe383fe9>n/s-resize</code> at the limits, same neutral f2/f3 ramp, never accent). The shared <code data-v-fe383fe9>useResizable</code> hook owns it via <code data-v-fe383fe9>axis: 'y'</code>; the height var is written imperatively during a drag (same no-Vue-rerender rule as <code data-v-fe383fe9>--preview-w</code>).</li><li data-v-fe383fe9>Toolbar (32px, 0.5px bottom hairline): tab strip on the left — each tab is a compact <code data-v-fe383fe9>radius-sm</code> pill (leading terminal glyph, muted while exited + shell label + hover close affordance), the active tab uses <code data-v-fe383fe9>--color-selected</code>, hover <code data-v-fe383fe9>--color-hover</code>; a "+" action appends a tab. Tabs follow the §08 tablist keyboard model (roving tabindex, ←/→/Home/End), the close affordance is its own button (no nested interactives), and the height separator is keyboard-operable (↑/↓ in steps, value exposed). Trailing actions: restart (only while the active tab exited) and a collapse chevron. Collapsing sets <code data-v-fe383fe9>inert</code> on the region — the xterm instances and their scrollback stay mounted but leave the tab order.</li><li data-v-fe383fe9>The xterm canvas cannot resolve CSS variables either, so its palette is resolved from the live <code data-v-fe383fe9>--color-*</code> tokens at runtime (re-read on scheme flips; the ANSI hues the status ramp doesn't cover use dedicated <code data-v-fe383fe9>--color-term-magenta/cyan</code> tokens); the font is the app JetBrains Mono stack sized off the content token scale. While focused, the panel owns every key except the registered app shortcuts (chat-level Esc / find / select-all chords stay inert inside it).</li><li data-v-fe383fe9>Entries: the chat header's terminal IconButton (right of Open in, lit while the panel is open) — on the empty-composer state, where no chat header renders, the same button floats at the conversation's top-right instead — plus <code data-v-fe383fe9>ctrl+`</code> (⌃` on macOS — VS Code's binding; ⌘` stays free for the OS window switcher — customizable in the shortcut registry), and the View menu's Toggle Terminal item. New tabs spawn in the visible workspace root. Terminal state is per session: switching sessions swaps the visible bucket while the others keep their PTYs and xterm views alive (scrollback survives a round trip; the ten most recent sessions are kept, LRU). The panel never renders on mobile / web.</li></ul><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9><b data-v-fe383fe9>One-sentence principle:</b> 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. </div></div></section><section id="a11y" data-v-fe383fe9><div class="sec-head" data-v-fe383fe9><span class="sec-num" data-v-fe383fe9>08</span><h2 class="sec-title" data-v-fe383fe9>Accessibility (pragmatic edition)</h2></div><p class="sec-desc" data-v-fe383fe9> Kimi Web is a local developer tool; it <b data-v-fe383fe9>does not target a specific WCAG conformance level</b>, 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. </p><div class="callout info" data-v-fe383fe9><span class="ico" data-v-fe383fe9>i</span><div data-v-fe383fe9><b data-v-fe383fe9>On the "ugly" focus ring:</b> the focus visibility required below always uses <code data-v-fe383fe9>:focus-visible</code> (not <code data-v-fe383fe9>:focus</code>). It appears <b data-v-fe383fe9>only on keyboard focus</b>; mouse clicks don't trigger it, so it doesn't pollute the mouse-driven visual; the ring's strength is tuned uniformly with <code data-v-fe383fe9>--p-focus-ring</code>, not overridden per place. </div></div><h4 class="mini" data-v-fe383fe9>1. Contrast & color</h4><ul class="clean" data-v-fe383fe9><li data-v-fe383fe9>Body text vs. background contrast <b data-v-fe383fe9>≥ 4.5:1</b>; control borders, icons, and key graphics <b data-v-fe383fe9>≥ 3:1</b>. When changing theme colors / dark mode, verify against §05 together.</li><li data-v-fe383fe9><b data-v-fe383fe9>Button text vs. button background</b>, and <b data-v-fe383fe9>form controls</b> (input, placeholder, helper / error text) <b data-v-fe383fe9>vs. their section background</b> must all have contrast ≥ 4.5:1 (large text ≥ 3:1). White-on-white text, a transparent borderless button floating over the page background, and a light placeholder on a near-white background are all flagged by the style rules.</li><li data-v-fe383fe9><b data-v-fe383fe9>State is not conveyed by color alone.</b> Error, selected, and disabled states also carry text, an icon, or a shape change (for example an error state is not just red, but also carries text or an icon).</li></ul><h4 class="mini" data-v-fe383fe9>2. Keyboard operable</h4><p data-v-fe383fe9>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:</p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Control</th><th data-v-fe383fe9>Keyboard behavior</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Dialog</td><td data-v-fe383fe9><code data-v-fe383fe9>Tab</code> cycles within the dialog (focus trap); <code data-v-fe383fe9>Esc</code> closes; focus returns to the trigger element after closing.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Menu</td><td data-v-fe383fe9><code data-v-fe383fe9>↑</code> / <code data-v-fe383fe9>↓</code> move the highlight, <code data-v-fe383fe9>Enter</code> selects, <code data-v-fe383fe9>Esc</code> closes.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Tabs</td><td data-v-fe383fe9><code data-v-fe383fe9>←</code> / <code data-v-fe383fe9>→</code> switch tabs (roving tabindex); only the current tab is in the Tab sequence.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Switch / Segmented</td><td data-v-fe383fe9><code data-v-fe383fe9>←</code> / <code data-v-fe383fe9>→</code> or <code data-v-fe383fe9>Space</code> / <code data-v-fe383fe9>Enter</code> to toggle.</td></tr></tbody></table><h4 class="mini" data-v-fe383fe9>3. Focus visibility</h4><ul class="clean" data-v-fe383fe9><li data-v-fe383fe9>Every interactive element must have a visible focus indicator on keyboard focus, uniformly via <code data-v-fe383fe9>:focus-visible</code> + <code data-v-fe383fe9>--p-focus-ring</code> (primary actions may use <code data-v-fe383fe9>--p-focus-ring-strong</code>).</li><li data-v-fe383fe9>Bare <code data-v-fe383fe9>outline: none</code> is forbidden. To remove the default outline, you must provide an equivalent replacement style.</li></ul><h4 class="mini" data-v-fe383fe9>4. Labels & semantics</h4><ul class="clean" data-v-fe383fe9><li data-v-fe383fe9><b data-v-fe383fe9>Semantic HTML first</b> (button / a / input / dialog…); ARIA is added only when native semantics fall short.</li><li data-v-fe383fe9>Icon-only buttons must have an <code data-v-fe383fe9>aria-label</code> — <code data-v-fe383fe9>IconButton</code> already enforces this with a required <code data-v-fe383fe9>label</code> prop.</li><li data-v-fe383fe9>Dialog: <code data-v-fe383fe9>role="dialog"</code> + <code data-v-fe383fe9>aria-modal="true"</code>, with the title as the dialog's accessible name.</li><li data-v-fe383fe9>Purely decorative SVG / icons get <code data-v-fe383fe9>aria-hidden="true"</code> to avoid being read out by screen readers.</li></ul><h4 class="mini" data-v-fe383fe9>5. Target size</h4><p data-v-fe383fe9>Desktop click targets <b data-v-fe383fe9>≥ 32px</b>; touch devices <b data-v-fe383fe9>≥ 44px</b> (consistent with the §01 principle and the IconButton <code data-v-fe383fe9>lg</code> tier).</p><h4 class="mini" data-v-fe383fe9>6. Reduced motion</h4><p data-v-fe383fe9>Handled uniformly in the global styles per §02's <code data-v-fe383fe9>@media (prefers-reduced-motion: reduce)</code>; components do not check this individually. The chat working indicator's mascot renders its static fallback.</p><h4 class="mini" data-v-fe383fe9>7. Live announcements (non-mandatory)</h4><p data-v-fe383fe9>Screen-reader announcements are <b data-v-fe383fe9>not a mandatory contract</b> in this product. Short hints like Toast can use <code data-v-fe383fe9>role="status"</code> / <code data-v-fe383fe9>aria-live</code>; 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.</p><div class="callout good" data-v-fe383fe9><span class="ico" data-v-fe383fe9>✓</span><div data-v-fe383fe9><b data-v-fe383fe9>Explicitly not mandatory for now:</b> 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. </div></div></section><section id="dialogs" data-v-fe383fe9><div class="sec-head" data-v-fe383fe9><span class="sec-num" data-v-fe383fe9>09</span><h2 class="sec-title" data-v-fe383fe9>Dialogs</h2></div><p class="sec-desc" data-v-fe383fe9> 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. </p><h3 class="sub" data-v-fe383fe9>The frame (recap)</h3><p data-v-fe383fe9> All dialogs share the §03 primitive: <code data-v-fe383fe9>--radius-xl</code> radius, <code data-v-fe383fe9>--shadow-xl</code> shadow, a restrained 28% neutral backdrop, a head (title + IconButton close), a body, and a right-aligned foot. Widths <code data-v-fe383fe9>md</code> 440 / <code data-v-fe383fe9>lg</code> 640 / <code data-v-fe383fe9>xl</code> 760 and <code data-v-fe383fe9>auto</code> / <code data-v-fe383fe9>fixed</code> height are chosen per §03. One interruptive overlay at a time; <code data-v-fe383fe9>Esc</code> closes; focus is trapped and restored. A blocking flow that must be resolved rather than dismissed (server token) uses <code data-v-fe383fe9>hideClose</code> with <code data-v-fe383fe9>closeOnOverlay</code>/<code data-v-fe383fe9>closeOnEsc</code> off — never a hand-written overlay. </p><h3 class="sub" data-v-fe383fe9>Anatomy A — padded (forms & confirmations)</h3><p data-v-fe383fe9> The default: the body carries its own padding and the caller drops content straight in. Confirmations put their Buttons in the <code data-v-fe383fe9>#foot</code> slot (right-aligned, cancel → confirm). Used by: confirm, login, status panel, server token. </p><h3 class="sub" data-v-fe383fe9>Anatomy B — flush (pickers & browsers)</h3><p data-v-fe383fe9><code data-v-fe383fe9>:padded="false"</code> with <code data-v-fe383fe9>height="fixed"</code>; 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. </p><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Zone</th><th data-v-fe383fe9>Contract</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Search</td><td data-v-fe383fe9>The boxed §03 Input, inset 22px so its edge aligns with the head title. Autofocus on open. No leading icon, no borderless variant.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Filter chips</td><td data-v-fe383fe9>Optional. 28px pill: transparent + muted text by default, <code data-v-fe383fe9>--color-hover</code> on hover, <code data-v-fe383fe9>--color-selected</code> + medium <code data-v-fe383fe9>--color-text</code> when active. Horizontally scrollable with the scrollbar hidden. Never a row of Buttons.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>List</td><td data-v-fe383fe9><code data-v-fe383fe9>flex:1</code>, owns the vertical scrolling, padded 4px 8px so rows bleed near the dialog edge. <code data-v-fe383fe9>role="listbox"</code>; rows carry <code data-v-fe383fe9>role="option"</code> + <code data-v-fe383fe9>aria-selected</code>.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Row</td><td data-v-fe383fe9>8px 12px padding, <code data-v-fe383fe9>--radius-md</code>. Two quiet lines: name 14/20 (medium when current) and a meta line 12/18 in <code data-v-fe383fe9>--color-text-faint</code> — 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.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Row states</td><td data-v-fe383fe9>Hover / keyboard-selected → <code data-v-fe383fe9>--color-hover</code>; current → <code data-v-fe383fe9>--color-selected</code> — 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 <code data-v-fe383fe9>--star</code> when starred.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>State rows</td><td data-v-fe383fe9>Loading / unavailable / empty: centered on both axes, muted 14px; warning color only for the unavailable case.</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Shortcut bar</td><td data-v-fe383fe9>The footer: full-bleed, padding 8px 16px, <code data-v-fe383fe9>border-top --color-line</code>, left-aligned. Keyboard hints are Kbd keycaps + 12px <code data-v-fe383fe9>--color-text-faint</code> labels, groups separated by "·", the whole bar <code data-v-fe383fe9>aria-hidden</code>. An instructional sentence (folder browser) reuses the same bar without keycaps.</td></tr></tbody></table><h4 class="mini" data-v-fe383fe9>Keyboard & behavior contract</h4><ul class="clean" data-v-fe383fe9><li data-v-fe383fe9><code data-v-fe383fe9>↑</code>/<code data-v-fe383fe9>↓</code> move a keyboard selection (rendered identical to hover) and always <code data-v-fe383fe9>scrollIntoView({ block: 'nearest' })</code>; <code data-v-fe383fe9>Enter</code> selects and closes; <code data-v-fe383fe9>Esc</code> closes.</li><li data-v-fe383fe9>Pointer hover drives the same selection index, so keyboard and mouse never disagree about which row is active.</li><li data-v-fe383fe9>Rows transition <code data-v-fe383fe9>background</code> only (<code data-v-fe383fe9>--duration-fast</code> ease-out); the open/close animation lives in the primitive, not in the consumer.</li><li data-v-fe383fe9>Selection is a fill, not a border (surface over stroke). Accent blue is reserved for actions — primary buttons and focus rings — never for "which row am I on".</li></ul><h4 class="mini" data-v-fe383fe9>Dialog map</h4><table class="dt" data-v-fe383fe9><thead data-v-fe383fe9><tr data-v-fe383fe9><th data-v-fe383fe9>Dialog</th><th data-v-fe383fe9>Anatomy</th><th data-v-fe383fe9>Composition</th></tr></thead><tbody data-v-fe383fe9><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Model picker</td><td data-v-fe383fe9>flush · lg · fixed</td><td data-v-fe383fe9>search + provider chips + model rows + shortcut bar</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Session search</td><td data-v-fe383fe9>flush · lg · fixed</td><td data-v-fe383fe9>search + result rows + shortcut bar</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Folder browser</td><td data-v-fe383fe9>flush · lg · fixed</td><td data-v-fe383fe9>breadcrumb bar + filter bar + folder rows + actions + hint bar</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Provider manager</td><td data-v-fe383fe9>flush · xl · fixed</td><td data-v-fe383fe9>management rows with inset dividers (rows are not selectable) + add section + shortcut bar</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Confirm / Login / Status</td><td data-v-fe383fe9>padded · md · auto</td><td data-v-fe383fe9>title + message or form + right-aligned foot</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>App update (desktop)</td><td data-v-fe383fe9>padded · lg · auto</td><td data-v-fe383fe9>version 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)</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Server token</td><td data-v-fe383fe9>padded · md · auto</td><td data-v-fe383fe9><code data-v-fe383fe9>hideClose</code>, no Esc/overlay close — resolved only by a valid token</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Settings</td><td data-v-fe383fe9>flush · xl · fixed</td><td data-v-fe383fe9>page-like exception: side-nav region, per §03</td></tr><tr data-v-fe383fe9><td class="tk" data-v-fe383fe9>Onboarding wizard</td><td data-v-fe383fe9>not a Dialog</td><td data-v-fe383fe9>full-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 <code data-v-fe383fe9>--color-line</code> hairline, <code data-v-fe383fe9>--color-accent</code> border + <code data-v-fe383fe9>--color-accent-soft</code> fill when selected</td></tr></tbody></table><div class="callout good" data-v-fe383fe9><span class="ico" data-v-fe383fe9>✓</span><div data-v-fe383fe9><b data-v-fe383fe9>Design intent:</b> 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. </div></div></section>',5))])])])]))}}),Ra=E(Da,[["__scopeId","data-v-fe383fe9"]]);export{Ra as default}; diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-T_JuY7qG.css b/apps/kimi-code/dist-web/assets/DesignSystemView-T_JuY7qG.css deleted file mode 100644 index 7b2ffc18e..000000000 --- a/apps/kimi-code/dist-web/assets/DesignSystemView-T_JuY7qG.css +++ /dev/null @@ -1 +0,0 @@ -.ds-page[data-v-fe383fe9]{--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-fe383fe9] *,.ds-page[data-v-fe383fe9] *:before,.ds-page[data-v-fe383fe9] *:after{box-sizing:border-box}.ds-page[data-v-fe383fe9]{scroll-behavior:smooth}.ds-page[data-v-fe383fe9]{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-fe383fe9],h2[data-v-fe383fe9],h3[data-v-fe383fe9],h4[data-v-fe383fe9]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-fe383fe9]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-fe383fe9]{color:var(--d-accent-2);text-decoration:none}a[data-v-fe383fe9]:hover{text-decoration:underline}code[data-v-fe383fe9],pre[data-v-fe383fe9],.mono[data-v-fe383fe9]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-fe383fe9]{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-fe383fe9]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-fe383fe9]{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-fe383fe9]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-fe383fe9]{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-fe383fe9]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-fe383fe9]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-fe383fe9]{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-fe383fe9]{font-size:12px;font-weight:600;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-fe383fe9]{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-fe383fe9]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-fe383fe9]:hover{background:var(--color-hover);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-fe383fe9]{background:var(--color-hover);color:var(--d-fg)}.nav a.active .num[data-v-fe383fe9]{color:var(--d-fg-soft)}.content[data-v-fe383fe9]{min-width:0}.content-inner[data-v-fe383fe9]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-fe383fe9]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-fe383fe9]{margin-top:72px}.hero[data-v-fe383fe9]{padding:8px 0 40px;border-bottom:.5px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-fe383fe9]{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-fe383fe9]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-fe383fe9]{color:var(--d-accent)}.hero p.lead[data-v-fe383fe9]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-fe383fe9]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-fe383fe9]{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-fe383fe9]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-fe383fe9]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-fe383fe9]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-fe383fe9]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-fe383fe9]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-fe383fe9]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-fe383fe9]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-fe383fe9]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-fe383fe9]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-fe383fe9]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-fe383fe9]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-fe383fe9]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-fe383fe9]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-fe383fe9]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-fe383fe9]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-fe383fe9]{color:var(--d-amber)}.stat.bad[data-v-fe383fe9]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-fe383fe9]{color:var(--d-red)}.stat.good[data-v-fe383fe9]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-fe383fe9]{color:var(--d-green)}.panel[data-v-fe383fe9]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-fe383fe9]{padding:22px}.panel-soft[data-v-fe383fe9]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px}.callout[data-v-fe383fe9]{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-fe383fe9]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-fe383fe9]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-fe383fe9]{background:var(--d-accent);color:#fff}.callout.warn[data-v-fe383fe9]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-fe383fe9]{background:var(--d-amber);color:#fff}.callout.good[data-v-fe383fe9]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-fe383fe9]{background:var(--d-green);color:#fff}table.dt[data-v-fe383fe9]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{border-bottom:none}table.dt td.tk[data-v-fe383fe9]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-fe383fe9]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-fe383fe9]{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-fe383fe9]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-fe383fe9]{border:.5px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-fe383fe9]{height:56px;border-bottom:.5px solid var(--d-line)}.color-meta[data-v-fe383fe9]{padding:10px 12px 12px}.color-meta .cn[data-v-fe383fe9]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-fe383fe9]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-fe383fe9]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:.5px solid var(--d-line-2)}.type-row[data-v-fe383fe9]:last-child{border-bottom:none}.type-sample[data-v-fe383fe9]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-fe383fe9]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-fe383fe9]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:.5px solid var(--d-line-2)}.space-row[data-v-fe383fe9]:last-child{border-bottom:none}.space-bar[data-v-fe383fe9]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-fe383fe9]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-fe383fe9]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-fe383fe9]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-fe383fe9]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-fe383fe9]{width:64px;height:64px;border:.5px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-fe383fe9]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-fe383fe9]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-fe383fe9]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-fe383fe9]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-fe383fe9]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-fe383fe9]{display:flex;gap:6px}.tab[data-v-fe383fe9]{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-fe383fe9]{background:var(--d-bg);color:var(--d-fg);border:.5px solid var(--d-line)}.stage[data-v-fe383fe9]{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-fe383fe9]{flex-direction:column;align-items:stretch}.stage.dark[data-v-fe383fe9]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#0d1117}.stage-label[data-v-fe383fe9]{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-fe383fe9]{color:#6b7280}.ba[data-v-fe383fe9]{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-fe383fe9]{min-width:0}.ba-col+.ba-col[data-v-fe383fe9]{border-left:.5px solid var(--d-line)}.ba-head[data-v-fe383fe9]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:.5px solid var(--d-line)}.ba-head.before[data-v-fe383fe9]{background:var(--d-red-soft)}.ba-head.after[data-v-fe383fe9]{background:var(--d-green-soft)}.ba-head .bh[data-v-fe383fe9]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-fe383fe9]{color:var(--d-red)}.ba-head.after .bh[data-v-fe383fe9]{color:var(--d-green)}.ba-head .bh small[data-v-fe383fe9]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-fe383fe9]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-fe383fe9]{background:#fff}.code[data-v-fe383fe9]{background:#0d1117;border-radius:12px;overflow:hidden;margin:16px 0;border:.5px solid #1c2128}.code-bar[data-v-fe383fe9]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#13181e;border-bottom:.5px solid #1c2128}.code-bar .d[data-v-fe383fe9]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-fe383fe9]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-fe383fe9]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-fe383fe9]{color:#8b949e}.code .k[data-v-fe383fe9]{color:#ff7b72}.code .s[data-v-fe383fe9]{color:#a5d6ff}.code .p[data-v-fe383fe9]{color:#79c0ff}.code .n[data-v-fe383fe9]{color:#d2a8ff}.code .v[data-v-fe383fe9]{color:#ffa657}.pill[data-v-fe383fe9]{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-fe383fe9]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-fe383fe9]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-fe383fe9]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-fe383fe9]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-fe383fe9]{font-family:JetBrains Mono,monospace}ul.clean[data-v-fe383fe9]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-fe383fe9]{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-fe383fe9]:last-child{border-bottom:none}ul.clean li[data-v-fe383fe9]: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-fe383fe9]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-fe383fe9]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-fe383fe9]{color:var(--d-fg)}ul.clean li .path[data-v-fe383fe9]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-fe383fe9]{position:relative;margin:24px 0}.phase[data-v-fe383fe9]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-fe383fe9]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-fe383fe9]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-fe383fe9]{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-fe383fe9]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-fe383fe9]{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-fe383fe9]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-fe383fe9]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-fe383fe9]{margin:0}.matrix[data-v-fe383fe9]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-fe383fe9]{border:.5px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-fe383fe9]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-fe383fe9]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-fe383fe9]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-fe383fe9]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-fe383fe9]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-fe383fe9]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{grid-template-columns:1fr}.sidebar[data-v-fe383fe9]{position:static;height:auto}.nav[data-v-fe383fe9]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-fe383fe9]{padding:40px 22px 80px}.stat-grid[data-v-fe383fe9]{grid-template-columns:repeat(2,1fr)}.ba[data-v-fe383fe9]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-fe383fe9]{border-left:none;border-top:.5px solid var(--d-line)}.palette[data-v-fe383fe9]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-fe383fe9]{grid-template-columns:1fr}}.ds-page .p[data-v-fe383fe9],.ds-page .stage.p-skin[data-v-fe383fe9],.ds-page [data-p][data-v-fe383fe9]{--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-fe383fe9]{--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-fe383fe9]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-fe383fe9]{--_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-fe383fe9]:active{transform:scale(.98)}.p-btn[data-v-fe383fe9]: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-fe383fe9]{width:16px;height:16px}.p-btn.sm[data-v-fe383fe9]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-fe383fe9]{width:14px;height:14px}.p-btn.lg[data-v-fe383fe9]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-fe383fe9]{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-fe383fe9]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-fe383fe9]{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-fe383fe9]:hover{background:var(--p-hover);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-fe383fe9]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-fe383fe9]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-btn.danger[data-v-fe383fe9]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-fe383fe9]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-fe383fe9]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-fe383fe9]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn[disabled][data-v-fe383fe9],.p-btn.disabled[data-v-fe383fe9]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-fe383fe9]{--_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-fe383fe9]:hover{background:var(--p-hover);color:var(--p-text)}.p-icon-btn[data-v-fe383fe9]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-fe383fe9]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-fe383fe9]{--_s: 44px}.p-icon-btn .p-ic[data-v-fe383fe9]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-fe383fe9]{width:20px;height:20px}.p-badge[data-v-fe383fe9]{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-fe383fe9]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-fe383fe9]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-fe383fe9]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-fe383fe9]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-fe383fe9]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-fe383fe9]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-fe383fe9]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-fe383fe9]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-fe383fe9]{width:12px;height:12px}.p-kbd[data-v-fe383fe9]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-pill .pp-strong[data-v-fe383fe9]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-fe383fe9]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-fe383fe9]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-fe383fe9]{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-fe383fe9]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-fe383fe9]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-fe383fe9]{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-fe383fe9]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-fe383fe9]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-fe383fe9],.p-select[data-v-fe383fe9],.p-textarea[data-v-fe383fe9]{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-fe383fe9]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-select[data-v-fe383fe9]{display:flex;align-items:center;justify-content:space-between;text-align:left}.p-select[data-v-fe383fe9]:after{content:"⌄";color:var(--p-text-muted)}.p-input[data-v-fe383fe9]:hover,.p-select[data-v-fe383fe9]:hover,.p-textarea[data-v-fe383fe9]:hover{border-color:var(--p-line-strong)}.p-input[data-v-fe383fe9]:focus,.p-select[data-v-fe383fe9]:focus,.p-textarea[data-v-fe383fe9]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-fe383fe9]::placeholder,.p-textarea[data-v-fe383fe9]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-fe383fe9]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-fe383fe9]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-fe383fe9]{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-fe383fe9]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-fe383fe9]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-fe383fe9]{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-fe383fe9]{padding:4px 22px 18px}.p-dialog-foot[data-v-fe383fe9]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-fe383fe9]{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-fe383fe9]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-fe383fe9]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-fe383fe9]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-fe383fe9]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-fe383fe9]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-action-toast[data-v-fe383fe9]{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-fe383fe9]{border:0;padding:0;background:none;color:var(--p-accent);cursor:pointer;font:inherit}.p-action-toast .x[data-v-fe383fe9]{color:var(--p-text-muted);width:14px;height:14px}.p-spinner[data-v-fe383fe9]{width:18px;height:18px;animation:p-spin-fe383fe9 .85s linear infinite}.p-spinner.sm[data-v-fe383fe9]{width:14px;height:14px}.p-spinner circle[data-v-fe383fe9]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-fe383fe9]{stroke:var(--p-line)}.p-spinner .arc[data-v-fe383fe9]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-fe383fe9{to{transform:rotate(360deg)}}.p-thinking[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{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-fe383fe9]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{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-fe383fe9]{display:flex;align-items:center;gap:9px;padding:14px 16px 0}.p-action-title[data-v-fe383fe9]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-action-body[data-v-fe383fe9]{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-fe383fe9]{display:flex;gap:8px;margin-top:12px;padding:10px 16px;border-top:.5px solid var(--p-line)}.p-opts[data-v-fe383fe9]{display:flex;flex-direction:column;gap:2px;margin-top:12px;padding:12px 16px;border-top:.5px solid var(--p-line)}.p-opt[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{display:flex;flex-direction:column;gap:2px;min-width:0}.p-opt-text .l[data-v-fe383fe9]{font-weight:500}.p-opt-text .d[data-v-fe383fe9]{font-size:var(--p-font-size-xs);color:var(--p-text-muted);line-height:var(--p-leading-normal)}.p-todo[data-v-fe383fe9]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-fe383fe9]{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-fe383fe9]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-fe383fe9]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-fe383fe9]{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-fe383fe9]{width:14px;height:14px}.p-todo-row.active .p-todo-check[data-v-fe383fe9]{color:var(--p-accent)}.p-todo-row.done .p-todo-check[data-v-fe383fe9]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-fe383fe9]{color:var(--p-accent);font-weight:500}.p-dot[data-v-fe383fe9]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-fe383fe9]{background:var(--p-success)}.p-dot.error[data-v-fe383fe9]{background:var(--p-danger)}.p-dot.running[data-v-fe383fe9]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-fe383fe9 1.4s ease-out infinite}@keyframes p-pulse-fe383fe9{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-fe383fe9]{overflow:hidden}.p-tool-group-head[data-v-fe383fe9]{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-fe383fe9]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-group-head[data-v-fe383fe9]:hover{color:var(--p-text)}.p-tool-group-head .tg-title[data-v-fe383fe9]{font-weight:500}.p-tool-group-head .tg-meta[data-v-fe383fe9]{color:var(--p-text-faint);font-weight:400}.p-tool-group-head .tg-car[data-v-fe383fe9]{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-fe383fe9]{transform:rotate(90deg)}.p-tool-row[data-v-fe383fe9]{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-fe383fe9]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-fe383fe9]{font-weight:400;color:var(--p-text-muted);flex:none}.p-tool-row .tr-file[data-v-fe383fe9]{font-weight:400;color:var(--p-text);flex:none}.p-tool-row .tr-file[data-v-fe383fe9]:hover{color:var(--p-accent);text-decoration:underline;text-underline-offset:3px}.p-tool-row .tr-mono[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add[data-v-fe383fe9]{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-fe383fe9],.p-tool-row .tr-add~.tr-add[data-v-fe383fe9]{margin-left:0}.p-tool-row .tr-del[data-v-fe383fe9]{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-fe383fe9]{display:inline-flex;width:36px;height:3px;border-radius:999px;overflow:hidden;gap:1px;flex:none}.p-tool-row .tr-ok[data-v-fe383fe9]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-fe383fe9]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-agent-card[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{width:14px;height:14px}.p-agent-card .pa-main[data-v-fe383fe9]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-agent-card .pa-task[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-agent-card .pa-go[data-v-fe383fe9]{color:var(--p-text-faint);flex:none}.p-tool-row.expanded .tr-car[data-v-fe383fe9]{transform:rotate(90deg)}.p-tool-detail[data-v-fe383fe9]{padding:2px 8px 4px 0}.p-tool-detail .p-code[data-v-fe383fe9]{margin-top:4px}.p-composer[data-v-fe383fe9]{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-fe383fe9]: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-fe383fe9]:focus-within:after{opacity:1}.p-composer-ta[data-v-fe383fe9]{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-fe383fe9]{color:var(--p-text-faint)}.p-composer-bar[data-v-fe383fe9]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px 8px}.p-composer-strip[data-v-fe383fe9]{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-fe383fe9]{width:16px;height:16px;color:var(--p-text-faint)}.p-composer-left[data-v-fe383fe9],.p-composer-right[data-v-fe383fe9]{display:flex;align-items:center;gap:4px}.p-composer .p-icon-btn[data-v-fe383fe9]{border-radius:var(--p-r-full)}.p-send[data-v-fe383fe9]{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-fe383fe9]: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-fe383fe9]:hover:after{opacity:.28}.p-send[data-v-fe383fe9]:active{transform:scale(.92)}.p-send .p-ic[data-v-fe383fe9]{width:16px;height:16px}.dw-bar[data-v-fe383fe9]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5)}.am-mock[data-v-fe383fe9]{display:flex;flex-direction:column;gap:var(--menu-rows-seam);width:100%;max-width:420px;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--p-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--p-sh-menu);font-family:var(--font-ui)}.am-mock-row[data-v-fe383fe9]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:.5px solid transparent;border-radius:var(--radius-menu-row);corner-shape:var(--corner-shape-menu);color:var(--p-text);font-size:var(--p-font-size-base)}.am-mock-row.focus[data-v-fe383fe9]{background:var(--color-selected)}.am-mock-row .n[data-v-fe383fe9]{font-weight:var(--weight-medium)}.am-mock-row .d[data-v-fe383fe9]{margin-left:var(--space-1);color:var(--p-text-muted);font-size:var(--text-sm)}.dw-pill[data-v-fe383fe9]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1-5);padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-normal)}.dw-pill[data-v-fe383fe9] svg{width:1.5em;height:1.5em}.dw-pill.on[data-v-fe383fe9]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);pointer-events:none}.dw-pill .dw-count[data-v-fe383fe9]{color:var(--p-text-muted)}.dw-pill .dw-running[data-v-fe383fe9]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted)}.dw-pill .dw-live[data-v-fe383fe9]{color:var(--p-success);font-weight:var(--weight-medium)}.dw-panel[data-v-fe383fe9]{width:100%;border:.5px solid var(--p-line);border-radius:var(--radius-2xl);background:color-mix(in srgb,var(--p-bg) 70%,transparent);box-shadow:var(--p-sh-menu);overflow:hidden}.dw-head[data-v-fe383fe9]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-4) var(--space-4) 0}.dw-tab[data-v-fe383fe9]{display:inline-flex;align-items:center;gap:var(--space-2);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-tab[data-v-fe383fe9] svg{width:1.5em;height:1.5em}.dw-tab .dw-meta[data-v-fe383fe9]{color:var(--p-text-muted)}.dw-chips[data-v-fe383fe9]{margin-left:auto;display:inline-flex;gap:var(--space-05);padding:var(--space-05);background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md)}.dw-chip[data-v-fe383fe9]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--p-sp-3);border-radius:var(--p-r-sm);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-chip.on[data-v-fe383fe9]{color:var(--p-text);background:var(--p-surface-raised);box-shadow:var(--p-sh-sm)}.dw-body[data-v-fe383fe9]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dw-body.col[data-v-fe383fe9]{display:flex;flex-direction:column}.dw-row[data-v-fe383fe9]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) 0;color:var(--p-text);font-size:var(--p-font-size-base)}.dw-row .nm[data-v-fe383fe9]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-row .tm[data-v-fe383fe9]{flex:none;color:var(--p-text-muted);font-variant-numeric:tabular-nums}.dw-row .ok[data-v-fe383fe9]{color:var(--p-success);transform:scale(.91)}.dw-row.fail .nm[data-v-fe383fe9],.dw-row.fail[data-v-fe383fe9] svg{color:var(--p-danger)}.dw-row.cancelled[data-v-fe383fe9] svg{color:var(--p-text-muted)}.dw-body.grid[data-v-fe383fe9]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.dw-card[data-v-fe383fe9]{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.dw-card .ct[data-v-fe383fe9]{display:flex;align-items:center;gap:var(--space-2)}.dw-card .nm[data-v-fe383fe9]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium)}.dw-card .nu[data-v-fe383fe9]{flex:none;color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-variant-numeric:tabular-nums}.dw-card .ds[data-v-fe383fe9]{color:var(--p-text-muted);font-size:var(--p-font-size-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.dw-card .cs[data-v-fe383fe9]{display:flex;align-items:center;justify-content:space-between;color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cf[data-v-fe383fe9]{display:flex;flex-direction:column;gap:var(--space-1)}.dw-card .cm[data-v-fe383fe9]{display:flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cm span[data-v-fe383fe9]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-card .cs .sl[data-v-fe383fe9]{display:inline-flex;align-items:center;gap:var(--space-1)}.dw-card .cs .sl .ok[data-v-fe383fe9]{color:var(--p-success);transform:scale(.91)}.dw-card .cs .tm[data-v-fe383fe9]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);font-variant-numeric:tabular-nums}.dw-card.fail .cs .sl[data-v-fe383fe9]{color:var(--p-danger)}.dw-ring[data-v-fe383fe9]{display:inline-block;width:var(--p-ic-md);height:var(--p-ic-md);border:1.5px solid var(--p-line-strong);border-radius:var(--radius-full);vertical-align:middle}.dw-spin[data-v-fe383fe9]{display:inline-flex;color:var(--p-text);vertical-align:middle}.dt td .kw-dot[data-v-fe383fe9],.dt td[data-v-fe383fe9] svg{vertical-align:middle}.p[data-v-fe383fe9] ::selection,[data-p][data-v-fe383fe9] ::selection{background:var(--p-selection)}.p-link[data-v-fe383fe9]{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-fe383fe9]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-fe383fe9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-fe383fe9]{color:var(--p-text-muted)}.p-link.muted[data-v-fe383fe9]:hover{color:var(--p-text)}.p-link .p-ic[data-v-fe383fe9]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-menu-item.active[data-v-fe383fe9],.p-menu-item.active[data-v-fe383fe9]:hover{background:var(--p-hover);color:var(--p-text)}.p-menu-item.danger[data-v-fe383fe9]{color:var(--p-danger)}.p-menu-item.danger[data-v-fe383fe9]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-fe383fe9]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-fe383fe9]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-fe383fe9]{width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--p-muted)}.p-menu-item:hover .p-ic[data-v-fe383fe9]{color:var(--p-text-strong)}.p-menu-item.active .p-ic[data-v-fe383fe9]{color:var(--p-accent-hover)}.p-menu-item.danger .p-ic[data-v-fe383fe9]{color:var(--p-danger)}.p-menu-item.lg[data-v-fe383fe9]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-sm)}.p-menu-sep[data-v-fe383fe9]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]:hover{color:var(--p-text)}.p-seg-item.on[data-v-fe383fe9]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-sm)}.p-tabs[data-v-fe383fe9]{display:flex;align-items:center;gap:0;border-bottom:.5px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-fe383fe9]{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-fe383fe9]:hover{color:var(--p-text)}.p-tab.on[data-v-fe383fe9]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-fe383fe9]{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-fe383fe9]: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-fe383fe9]:hover:after{transform:scaleX(1.125)}.p-switch.on[data-v-fe383fe9]{background:var(--p-accent)}.p-switch.on[data-v-fe383fe9]:after{transform:translate(16px);transform-origin:right center}.p-switch.on[data-v-fe383fe9]:hover:after{transform:translate(16px) scaleX(1.125)}.p-switch[data-v-fe383fe9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-fe383fe9]{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-fe383fe9]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-fe383fe9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-fe383fe9]{width:12px;height:12px}.p-avatar[data-v-fe383fe9]{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-fe383fe9]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-fe383fe9]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-fe383fe9]{width:13px;height:13px}.p-empty[data-v-fe383fe9]{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-fe383fe9]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-fe383fe9]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-fe383fe9]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-fe383fe9]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-fe383fe9]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-turn-failed[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.p-turn-failed .tf-main[data-v-fe383fe9]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-turn-failed .tf-title[data-v-fe383fe9]{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-fe383fe9],.p-turn-failed .tf-meta[data-v-fe383fe9]{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-fe383fe9]{font-family:var(--font-mono);color:var(--color-text-faint)}.p-tip[data-v-fe383fe9]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-fe383fe9]{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-fe383fe9]{opacity:1}.p-banner[data-v-fe383fe9]{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-fe383fe9]{width:18px;height:18px;flex:none}.p-banner.info[data-v-fe383fe9]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-fe383fe9]{color:var(--p-accent)}.p-banner.warning[data-v-fe383fe9]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-fe383fe9]{color:var(--p-warning)}.p-banner.danger[data-v-fe383fe9]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-fe383fe9]{color:var(--p-danger)}.p-sheet[data-v-fe383fe9]{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-fe383fe9]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-fe383fe9]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-fe383fe9 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-fe383fe9{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-fe383fe9]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-fe383fe9]{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-fe383fe9]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-fe383fe9]{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-fe383fe9]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-fe383fe9]{width:15px;height:15px}.p-topbar[data-v-fe383fe9]{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-fe383fe9]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-fe383fe9]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-fe383fe9]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-fe383fe9]{background:#161b22b8;border-color:#ffffff14}.demo-row[data-v-fe383fe9]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-fe383fe9]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-fe383fe9]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-fe383fe9]{flex:1;min-width:0}.demo-chat[data-v-fe383fe9]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-fe383fe9]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-fe383fe9]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-fe383fe9]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]{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-fe383fe9]{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-fe383fe9]{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-fe383fe9]{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-fe383fe9]{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-fe383fe9]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-fe383fe9]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-fe383fe9]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-fe383fe9]{color:var(--p-success)}.p-diff-row.del[data-v-fe383fe9]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-fe383fe9]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-fe383fe9]{color:var(--p-text)}.p-field-error[data-v-fe383fe9]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-fe383fe9]{vertical-align:middle}.p-btn .p-spinner .track[data-v-fe383fe9]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-fe383fe9]{stroke:currentColor}.ds-page[data-v-fe383fe9]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-fe383fe9]{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-fe383fe9]{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-fe383fe9]:hover{background:var(--color-hover)}.ds-topbar-title[data-v-fe383fe9]{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-BCqOrYcp.js b/apps/kimi-code/dist-web/assets/Tooltip-CbHFsn-6.js similarity index 98% rename from apps/kimi-code/dist-web/assets/Tooltip-BCqOrYcp.js rename to apps/kimi-code/dist-web/assets/Tooltip-CbHFsn-6.js index 4ef900720..8ed667768 100644 --- a/apps/kimi-code/dist-web/assets/Tooltip-BCqOrYcp.js +++ b/apps/kimi-code/dist-web/assets/Tooltip-CbHFsn-6.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-CgXirkUy.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-_5lXYMaO.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-C1nSQTfb.js b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-COKyJfaN.js similarity index 86% rename from apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-C1nSQTfb.js rename to apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-COKyJfaN.js index 51f190300..e11d6fbc5 100644 --- a/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-C1nSQTfb.js +++ b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-COKyJfaN.js @@ -1 +1 @@ -import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-t9_0csvx.js";import{p as f}from"./chunk-JWPE2WC7-CPYc1Q95.js";import{_ as n,l as o}from"./mermaid.core-DHQD1STq.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.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-B49sRSVS.js";import{p as f}from"./chunk-JWPE2WC7-BtckK32c.js";import{_ as n,l as o}from"./mermaid.core-DpBz6UHc.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.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-VnV5ZHHs.js b/apps/kimi-code/dist-web/assets/arc-BNlcm8Io.js similarity index 98% rename from apps/kimi-code/dist-web/assets/arc-VnV5ZHHs.js rename to apps/kimi-code/dist-web/assets/arc-BNlcm8Io.js index 45781797e..39ad59a17 100644 --- a/apps/kimi-code/dist-web/assets/arc-VnV5ZHHs.js +++ b/apps/kimi-code/dist-web/assets/arc-BNlcm8Io.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-DHQD1STq.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*a<y))return a=(n*(h-R)-d*(l-v))/a,[l+a*D,h+a*i]}function W(l,h,q,O,v,R,K){var u=l-q,D=h-O,i=(K?R:-R)/j(u*u+D*D),n=i*D,d=-i*u,a=l+n,s=h+d,f=q+n,c=O+d,L=(a+f)/2,t=(s+c)/2,m=f-a,g=c-s,A=m*m+g*g,T=v-R,P=a*c-f*s,E=(g<0?-1:1)*j(on(0,T*T*A-P*P)),G=(P*g-m*E)/A,H=(-P*m-g*E)/A,w=(P*g+m*E)/A,p=(-P*m+g*E)/A,x=G-L,e=H-t,r=w-L,M=p-t;return x*x+e*e>r*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()),s<a&&(d=s,s=a,a=d),!(s>y))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(L<un)if(S=pn(Q,V,X,Y,F,U,B,C)){var Z=Q-S[0],$=V-S[1],k=F-S[0],b=U-S[1],nn=1/I(fn((Z*k+$*b)/(j(Z*Z+$*$)*j(k*k+b*b)))/2),en=j(S[0]*S[0]+S[1]*S[1]);p=_(w,(a-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}E>y?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),x<w?u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),u.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(u.moveTo(Q,V),u.arc(0,0,s,m,g,!t)):u.moveTo(Q,V),!(a>y)||!(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),p<w?u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,a,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),u.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):u.arc(0,0,a,T,A,t)}if(u.closePath(),n)return u=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-un/2;return[N(d)*n,I(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:J(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:J(+n),i):h},i.cornerRadius=function(n){return arguments.length?(q=typeof n=="function"?n:J(+n),i):q},i.padRadius=function(n){return arguments.length?(O=n==null?null:typeof n=="function"?n:J(+n),i):O},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:J(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:J(+n),i):R},i.padAngle=function(n){return arguments.length?(K=typeof n=="function"?n:J(+n),i):K},i.context=function(n){return arguments.length?(u=n??null,i):u},i}export{hn as d}; +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-DpBz6UHc.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*a<y))return a=(n*(h-R)-d*(l-v))/a,[l+a*D,h+a*i]}function W(l,h,q,O,v,R,K){var u=l-q,D=h-O,i=(K?R:-R)/j(u*u+D*D),n=i*D,d=-i*u,a=l+n,s=h+d,f=q+n,c=O+d,L=(a+f)/2,t=(s+c)/2,m=f-a,g=c-s,A=m*m+g*g,T=v-R,P=a*c-f*s,E=(g<0?-1:1)*j(on(0,T*T*A-P*P)),G=(P*g-m*E)/A,H=(-P*m-g*E)/A,w=(P*g+m*E)/A,p=(-P*m+g*E)/A,x=G-L,e=H-t,r=w-L,M=p-t;return x*x+e*e>r*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()),s<a&&(d=s,s=a,a=d),!(s>y))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(L<un)if(S=pn(Q,V,X,Y,F,U,B,C)){var Z=Q-S[0],$=V-S[1],k=F-S[0],b=U-S[1],nn=1/I(fn((Z*k+$*b)/(j(Z*Z+$*$)*j(k*k+b*b)))/2),en=j(S[0]*S[0]+S[1]*S[1]);p=_(w,(a-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}E>y?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),x<w?u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),u.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(u.moveTo(Q,V),u.arc(0,0,s,m,g,!t)):u.moveTo(Q,V),!(a>y)||!(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),p<w?u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,a,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),u.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):u.arc(0,0,a,T,A,t)}if(u.closePath(),n)return u=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-un/2;return[N(d)*n,I(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:J(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:J(+n),i):h},i.cornerRadius=function(n){return arguments.length?(q=typeof n=="function"?n:J(+n),i):q},i.padRadius=function(n){return arguments.length?(O=n==null?null:typeof n=="function"?n:J(+n),i):O},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:J(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:J(+n),i):R},i.padAngle=function(n){return arguments.length?(K=typeof n=="function"?n:J(+n),i):K},i.context=function(n){return arguments.length?(u=n??null,i):u},i}export{hn as d}; diff --git a/apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-vHnTqMir.js b/apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-pdH2rk7i.js similarity index 99% rename from apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-vHnTqMir.js rename to apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-pdH2rk7i.js index 2f036e0d3..acb376a31 100644 --- a/apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-vHnTqMir.js +++ b/apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-pdH2rk7i.js @@ -1,4 +1,4 @@ -import{p as ke}from"./chunk-JWPE2WC7-CPYc1Q95.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-DHQD1STq.js";import{p as fr}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import{c as Fe}from"./cytoscape.esm-OyMbaexL.js";import{g as cr}from"./_commonjsHelpers-CqkleIqs.js";import"./index-CgXirkUy.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;l<c.length;l++)s=c[l],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},e.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},e.prototype.scatter=function(){var t,s,o=-r.INITIAL_WORLD_BOUNDARY,c=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+a.nextDouble()*(c-o)+o;var l=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+a.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},e.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(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<d;C++)g=T[C],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var S=this.nodes.indexOf(l);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(c instanceof f){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var w=g.source.edges.indexOf(g),P=g.target.edges.indexOf(g);if(!(w>-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;w<S;w++){var P=C[w];T=P.getTop(),g=P.getLeft(),c>T&&(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;M<V;M++){var _=U[M];c&&_.child!=null&&_.updateBounds(),C=_.getLeft(),S=_.getRight(),w=_.getTop(),P=_.getBottom(),l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var n=new e(l,g,T-l,d-g);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),U[0].getParent().paddingLeft!=null?B=U[0].getParent().paddingLeft:B=this.margin,this.left=n.x-B,this.right=n.x+n.width+B,this.top=n.y-B,this.bottom=n.y+n.height+B},s.calculateBounds=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=c.length,U=0;U<B;U++){var V=c[U];C=V.getLeft(),S=V.getRight(),w=V.getTop(),P=V.getBottom(),l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var M=new e(l,g,T-l,d-g);return M},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,g=0;g<T;g++){var d=l[g];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=i.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,g=this.nodes[0],d,C,S=g.withChildren();for(S.forEach(function(M){l.push(M),T.add(M)});l.length!==0;){g=l.shift(),d=g.getEdges();for(var w=d.length,P=0;P<w;P++){var B=d[P];if(C=B.getOtherEndInGraph(g,this),C!=null&&!T.has(C)){var U=C.withChildren();U.forEach(function(M){l.push(M),T.add(M)})}}}if(this.isConnected=!1,T.size>=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<u;t++)e=f[t],a.remove(e);var s=[];s=s.concat(a.getNodes());var o;u=s.length;for(var t=0;t<u;t++)o=s[t],a.remove(o);a==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(a);this.graphs.splice(c,1),a.parent=null}else if(r instanceof h){if(e=r,e==null)throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(!(e.source!=null&&e.target!=null))throw"Source and/or target is null!";if(!(e.source.edges.indexOf(e)!=-1&&e.target.edges.indexOf(e)!=-1))throw"Source and/or target doesn't know this edge!";var c=e.source.edges.indexOf(e);if(e.source.edges.splice(c,1),c=e.target.edges.indexOf(e),e.target.edges.splice(c,1),!(e.source.owner!=null&&e.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(e.source.owner.getGraphManager().edges.indexOf(e)==-1)throw"Not in owner graph manager's edge list!";var c=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(c,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],a=this.getGraphs(),f=a.length,e=0;e<f;e++)r=r.concat(a[e].getNodes());this.allNodes=r}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],a=this.getGraphs();a.length;for(var f=0;f<a.length;f++)r=r.concat(a[f].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(r,a){if(!(r!=null&&a!=null))throw"assert failed";if(r==a)return!0;var f=r.getOwner(),e;do{if(e=f.getParent(),e==null)break;if(e==a)return!0;if(f=e.getOwner(),f==null)break}while(!0);f=a.getOwner();do{if(e=f.getParent(),e==null)break;if(e==r)return!0;if(f=e.getOwner(),f==null)break}while(!0);return!1},i.prototype.calcLowestCommonAncestors=function(){for(var r,a,f,e,u,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(r=t[o],a=r.source,f=r.target,r.lca=null,r.sourceInLca=a,r.targetInLca=f,a==f){r.lca=a.getOwner();continue}for(e=a.getOwner();r.lca==null;){for(r.targetInLca=f,u=f.getOwner();r.lca==null;){if(u==e){r.lca=u;break}if(u==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=u.getParent(),u=r.targetInLca.getOwner()}if(e==this.rootGraph)break;r.lca==null&&(r.sourceInLca=e.getParent(),e=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(r,a){if(r==a)return r.getOwner();var f=r.getOwner();do{if(f==null)break;var e=a.getOwner();do{if(e==null)break;if(e==f)return e;e=e.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},i.prototype.calcInclusionTreeDepths=function(r,a){r==null&&a==null&&(r=this.rootGraph,a=1);for(var f,e=r.getNodes(),u=e.length,t=0;t<u;t++)f=e[t],f.inclusionTreeDepth=a,f.child!=null&&this.calcInclusionTreeDepths(f.child,a+1)},i.prototype.includesInvalidEdge=function(){for(var r,a=[],f=this.edges.length,e=0;e<f;e++)r=this.edges[e],this.isOneAncestorOfOther(r.source,r.target)&&a.push(r);for(var e=0;e<a.length;e++)this.remove(a[e]);return!1},A.exports=i}),(function(A,G,N){var v=N(12);function h(){}h.calcSeparationAmount=function(i,r,a,f){if(!i.intersects(r))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(i,r,e),a[0]=Math.min(i.getRight(),r.getRight())-Math.max(i.x,r.x),a[1]=Math.min(i.getBottom(),r.getBottom())-Math.max(i.y,r.y),i.getX()<=r.getX()&&i.getRight()>=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]<s?s=a[0]:t=a[1],a[0]=-1*e[0]*(s/2+f),a[1]=-1*e[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(i,r,a){i.getCenterX()<r.getCenterX()?a[0]=-1:a[0]=1,i.getCenterY()<r.getCenterY()?a[1]=-1:a[1]=1},h.getIntersection2=function(i,r,a){var f=i.getCenterX(),e=i.getCenterY(),u=r.getCenterX(),t=r.getCenterY();if(i.intersects(r))return a[0]=f,a[1]=e,a[2]=u,a[3]=t,!0;var s=i.getX(),o=i.getY(),c=i.getRight(),l=i.getX(),T=i.getBottom(),g=i.getRight(),d=i.getWidthHalf(),C=i.getHeightHalf(),S=r.getX(),w=r.getY(),P=r.getRight(),B=r.getX(),U=r.getBottom(),V=r.getRight(),M=r.getWidthHalf(),_=r.getHeightHalf(),n=!1,E=!1;if(f===u){if(e>t)return a[0]=f,a[1]=o,a[2]=u,a[3]=U,!1;if(e<t)return a[0]=f,a[1]=T,a[2]=u,a[3]=w,!1}else if(e===t){if(f>u)return a[0]=s,a[1]=e,a[2]=P,a[3]=t,!1;if(f<u)return a[0]=c,a[1]=e,a[2]=S,a[3]=t,!1}else{var p=i.height/i.width,m=r.height/r.width,y=(t-e)/(u-f),I=void 0,O=void 0,R=void 0,W=void 0,x=void 0,Q=void 0;if(-p===y?f>u?(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<i?e+=Math.PI:f<r&&(e+=this.TWO_PI)):f<r?e=this.ONE_AND_HALF_PI:e=this.HALF_PI,e},h.doIntersect=function(i,r,a,f){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=(t-e)*(T-c)-(l-o)*(s-u);if(g===0)return!1;var d=((T-c)*(l-e)+(o-l)*(T-u))/g,C=((u-s)*(l-e)+(t-e)*(T-u))/g;return 0<d&&d<1&&0<C&&C<1},h.findCircleLineIntersections=function(i,r,a,f,e,u,t){var s=(a-i)*(a-i)+(f-r)*(f-r),o=2*((i-e)*(a-i)+(r-u)*(f-r)),c=(i-e)*(i-e)+(r-u)*(r-u)-t*t,l=o*o-4*s*c;if(l>=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<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}return function(u,t,s){return t&&e(u.prototype,t),s&&e(u,s),u}})();function h(e,u){if(!(e instanceof u))throw new TypeError("Cannot call a class as a function")}var i=function(u){return{value:u,next:null,prev:null}},r=function(u,t,s,o){return u!==null?u.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=u,t.next=s,o.length++,t},a=function(u,t){var s=u.prev,o=u.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,u.prev=u.next=null,t.length--,u},f=(function(){function e(u){var t=this;h(this,e),this.length=0,this.head=null,this.tail=null,u?.forEach(function(s){return t.push(s)})}return v(e,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,i(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,i(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,i(t),null,this)}},{key:"unshift",value:function(t){return r(null,i(t),this.head,this)}},{key:"remove",value:function(t){return a(t,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),e})();A.exports=f}),(function(A,G,N){function v(h,i,r){this.x=null,this.y=null,h==null&&i==null&&r==null?(this.x=0,this.y=0):typeof h=="number"&&typeof i=="number"&&r==null?(this.x=h,this.y=i):h.constructor.name=="Point"&&i==null&&r==null&&(r=h,this.x=r.x,this.y=r.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(h,i,r){h.constructor.name=="Point"&&i==null&&r==null?(r=h,this.setLocation(r.x,r.y)):typeof h=="number"&&typeof i=="number"&&r==null&&(parseInt(h)==h&&parseInt(i)==i?this.move(h,i):(this.x=Math.floor(h+.5),this.y=Math.floor(i+.5)))},v.prototype.move=function(h,i){this.x=h,this.y=i},v.prototype.translate=function(h,i){this.x+=h,this.y+=i},v.prototype.equals=function(h){if(h.constructor.name=="Point"){var i=h;return this.x==i.x&&this.y==i.y}return this==h},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=v}),(function(A,G,N){function v(h,i,r,a){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&i!=null&&r!=null&&a!=null&&(this.x=h,this.y=i,this.width=r,this.height=a)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(h){this.x=h},v.prototype.getY=function(){return this.y},v.prototype.setY=function(h){this.y=h},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},A.exports=v}),(function(A,G,N){var v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function h(){}h.lastID=0,h.createID=function(i){return h.isPrimitive(i)?i:(i.uniqueID!=null||(i.uniqueID=h.getString(),h.lastID++),i.uniqueID)},h.getString=function(i){return i==null&&(i=h.lastID),"Object#"+i},h.isPrimitive=function(i){var r=typeof i>"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);c<o.length;c++)l[c]=o[c];return l}else return Array.from(o)}var h=N(0),i=N(7),r=N(3),a=N(1),f=N(6),e=N(5),u=N(17),t=N(29);function s(o){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new i(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new r(this.graphManager,o)},s.prototype.newEdge=function(o){return new a(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),h.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof r){var c=o;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(o instanceof a){var d=o;if(d.vGraphObject!=null){var C=d.vGraphObject;C.update(d)}}else if(o instanceof f){var S=o;if(S.vGraphObject!=null){var w=S.vGraphObject;w.update(S)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new e(0,0));else{var c=new u,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),g,d=0;d<T.length;d++)g=T[d],g.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=o.getNodes(),g=0;g<T.length;g++)c=T[g],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<l.length;g++)l[g].getChild()!=null&&(T=!1);if(!T)return o;var d=new Set,C=[],S=new Map,w=[];for(w=w.concat(l);w.length>0&&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<B.length;g++){var U=B[g].getOtherEnd(P);if(S.get(P)!=U)if(!d.has(U))C.push(U),S.set(U,P);else{c=!1;break}}}if(!c)o=[];else{var V=[].concat(v(d));o.push(V);for(var g=0;g<V.length;g++){var M=V[g],_=w.indexOf(M);_>-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;g<o.bendpoints.length;g++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var C=this.newEdge(null);this.graphManager.add(C,l,d),c.add(d),l=d}var C=this.newEdge(null);return this.graphManager.add(C,l,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(v(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var l=o[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),g=0;g<T.length;g++){var d=T[g],C=new e(d.getCenterX(),d.getCenterY()),S=l.bendpoints.get(g);S.x=C.x,S.y=C.y,d.getOwner().remove(d)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(o,c,l,T){if(l!=null&&T!=null){var g=c;if(o<=50){var d=c/l;g-=(c-d)/50*(50-o)}else{var C=c*T;g+=(C-c)/50*(o-50)}return g}else{var S,w;return o<=50?(S=9*c/500,w=c/10):(S=9*c/50,w=-8*c),S*o+w}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var l=[],T=new Map,g=!1,d=null;(c.length==1||c.length==2)&&(g=!0,d=c[0]);for(var C=0;C<c.length;C++){var S=c[C],w=S.getNeighborsList().size;T.set(S,S.getNeighborsList().size),w==1&&l.push(S)}var P=[];for(P=P.concat(l);!g;){var B=[];B=B.concat(P),P=[];for(var C=0;C<c.length;C++){var S=c[C],U=c.indexOf(S);U>=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);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var h=N(15),i=N(4),r=N(0),a=N(8),f=N(9);function e(){h.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}e.prototype=Object.create(h.prototype);for(var u in h)e[u]=h[u];e.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},e.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,l,T,g,d=this.getGraphManager().getAllEdges(),C=0;C<d.length;C++)t=d[C],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*r.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},e.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>i.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;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},e.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&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;o<g.length;o++)l=g[o],this.calculateRepulsionForceOfANode(l,d,t,s),d.add(l);else for(o=0;o<g.length;o++)for(l=g[o],c=o+1;c<g.length;c++)T=g[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},e.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},e.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},e.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),l,T,g,d;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-s),g=T*(t.lengthX/l),d=T*(t.lengthY/l),o.springForceX+=g,o.springForceY+=d,c.springForceX-=g,c.springForceY-=d)},e.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),g,d,C,S,w,P,B;if(o.intersects(c)){a.calcSeparationAmount(o,c,l,i.DEFAULT_EDGE_LENGTH/2),P=2*l[0],B=2*l[1];var U=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=U*P,t.repulsionForceY-=U*B,s.repulsionForceX+=U*P,s.repulsionForceY+=U*B}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(g=c.getCenterX()-o.getCenterX(),d=c.getCenterY()-o.getCenterY()):(a.getIntersection(o,c,T),g=T[2]-T[0],d=T[3]-T[1]),Math.abs(g)<i.MIN_REPULSION_DIST&&(g=f.sign(g)*i.MIN_REPULSION_DIST),Math.abs(d)<i.MIN_REPULSION_DIST&&(d=f.sign(d)*i.MIN_REPULSION_DIST),C=g*g+d*d,S=Math.sqrt(C),w=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/C,P=w*g/S,B=w*d/S,t.repulsionForceX-=P,t.repulsionForceY-=B,s.repulsionForceX+=P,s.repulsionForceY+=B},e.prototype.calcGravitationalForce=function(t){var s,o,c,l,T,g,d,C;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-o,T=t.getCenterY()-c,g=Math.abs(l)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(C=s.getEstimatedSize()*this.gravityRangeFactor,(g>C||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<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},e.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(o);for(var l=0;l<s;l++)for(var T=0;T<o;T++)c[l][T]=new Array;return c},e.prototype.addNodeToGrid=function(t,s,o){var c=0,l=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var d=c;d<=l;d++)for(var C=T;C<=g;C++)this.grid[d][C].push(t),t.setGridCoordinates(c,l,T,g)},e.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},e.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var l=new Set;t.surrounding=new Array;for(var T,g=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var C=t.startY-1;C<t.finishY+2;C++)if(!(d<0||C<0||d>=g.length||C>=g[0].length)){for(var S=0;S<g[d][C].length;S++)if(T=g[d][C][S],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!l.has(T)){var w=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);w<=this.repulsionRange&&P<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(v(l))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},e.prototype.calcRepulsionRange=function(){return 0},A.exports=e}),(function(A,G,N){var v=N(1),h=N(4);function i(a,f,e){v.call(this,a,f,e),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}i.prototype=Object.create(v.prototype);for(var r in v)i[r]=v[r];A.exports=i}),(function(A,G,N){var v=N(3),h=N(4);function i(a,f,e,u){v.call(this,a,f,e,u),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}i.prototype=Object.create(v.prototype);for(var r in v)i[r]=v[r];i.prototype.setGridCoordinates=function(a,f,e,u){this.startX=a,this.finishX=f,this.startY=e,this.finishY=u},A.exports=i}),(function(A,G,N){function v(h,i){this.width=0,this.height=0,h!==null&&i!==null&&(this.height=i,this.width=h)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},A.exports=v}),(function(A,G,N){var v=N(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(i,r){var a=v.createID(i);this.contains(a)||(this.map[a]=r,this.keys.push(i))},h.prototype.contains=function(i){return v.createID(i),this.map[i]!=null},h.prototype.get=function(i){var r=v.createID(i);return this.map[r]},h.prototype.keySet=function(){return this.keys},A.exports=h}),(function(A,G,N){var v=N(14);function h(){this.set={}}h.prototype.add=function(i){var r=v.createID(i);this.contains(r)||(this.set[r]=i)},h.prototype.remove=function(i){delete this.set[v.createID(i)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(i){return this.set[v.createID(i)]==i},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(i){for(var r=Object.keys(this.set),a=r.length,f=0;f<a;f++)i.push(this.set[r[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(i){for(var r=i.length,a=0;a<r;a++){var f=i[a];this.add(f)}},A.exports=h}),(function(A,G,N){function v(){}v.multMat=function(h,i){for(var r=[],a=0;a<h.length;a++){r[a]=[];for(var f=0;f<i[0].length;f++){r[a][f]=0;for(var e=0;e<h[0].length;e++)r[a][f]+=h[a][e]*i[e][f]}}return r},v.transpose=function(h){for(var i=[],r=0;r<h[0].length;r++){i[r]=[];for(var a=0;a<h.length;a++)i[r][a]=h[a][r]}return i},v.multCons=function(h,i){for(var r=[],a=0;a<h.length;a++)r[a]=h[a]*i;return r},v.minusOp=function(h,i){for(var r=[],a=0;a<h.length;a++)r[a]=h[a]-i[a];return r},v.dotProduct=function(h,i){for(var r=0,a=0;a<h.length;a++)r+=h[a]*i[a];return r},v.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},v.normalize=function(h){for(var i=[],r=this.mag(h),a=0;a<h.length;a++)i[a]=h[a]/r;return i},v.multGamma=function(h){for(var i=[],r=0,a=0;a<h.length;a++)r+=h[a];r*=-1/h.length;for(var f=0;f<h.length;f++)i[f]=r+h[f];return i},v.multL=function(h,i,r){for(var a=[],f=[],e=[],u=0;u<i[0].length;u++){for(var t=0,s=0;s<i.length;s++)t+=-.5*i[s][u]*h[s];f[u]=t}for(var o=0;o<r.length;o++){for(var c=0,l=0;l<r.length;l++)c+=r[o][l]*f[l];e[o]=c}for(var T=0;T<i.length;T++){for(var g=0,d=0;d<i[0].length;d++)g+=i[T][d]*e[d];a[T]=g}return a},A.exports=v}),(function(A,G,N){var v=(function(){function a(f,e){for(var u=0;u<e.length;u++){var t=e[u];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,e,u){return e&&a(f.prototype,e),u&&a(f,u),f}})();function h(a,f){if(!(a instanceof f))throw new TypeError("Cannot call a class as a function")}var i=N(11),r=(function(){function a(f,e){h(this,a),(e!==null||e!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var u=void 0;f instanceof i?u=f.size():u=f.length,this._quicksort(f,0,u-1)}return v(a,[{key:"_quicksort",value:function(e,u,t){if(u<t){var s=this._partition(e,u,t);this._quicksort(e,u,s),this._quicksort(e,s+1,t)}}},{key:"_partition",value:function(e,u,t){for(var s=this._get(e,u),o=u,c=t;;){for(;this.compareFunction(s,this._get(e,c));)c--;for(;this.compareFunction(this._get(e,o),s);)o++;if(o<c)this._swap(e,o,c),o++,c--;else return c}}},{key:"_get",value:function(e,u){return e instanceof i?e.get_object_at(u):e[u]}},{key:"_set",value:function(e,u,t){e instanceof i?e.set_object_at(u,t):e[u]=t}},{key:"_swap",value:function(e,u,t){var s=this._get(e,u);this._set(e,u,this._get(e,t)),this._set(e,t,s)}},{key:"_defaultCompareFunction",value:function(e,u){return u>e}}]),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;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.m,i]),this.V=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var r=(function(Tt){for(var Ct=[];Tt-- >0;)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<Math.max(e,u);t++){if(t<e){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=v.hypot(this.s[t],h[s][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)h[o][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<e,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=l*h[g][t]}r[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<e))for(var d=t;d<this.m;d++)this.U[d][t]=h[d][t];if(t<u){r[t]=0;for(var C=t+1;C<this.n;C++)r[t]=v.hypot(r[t],r[C]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var S=t+1;S<this.n;S++)r[S]/=r[t];r[t+1]+=1}if(r[t]=-r[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,r[t]!==0)){for(var w=t+1;w<this.m;w++)a[w]=0;for(var P=t+1;P<this.n;P++)for(var B=t+1;B<this.m;B++)a[B]+=r[P]*h[B][P];for(var U=t+1;U<this.n;U++)for(var V=-r[U]/r[t+1],M=t+1;M<this.m;M++)h[M][U]+=V*a[M]}for(var _=t+1;_<this.n;_++)this.V[_][t]=r[_]}}var n=Math.min(this.n,this.m+1);e<this.n&&(this.s[e]=h[e][e]),this.m<n&&(this.s[n-1]=0),u+1<n&&(r[u]=h[u][n-1]),r[n-1]=0;{for(var E=e;E<i;E++){for(var p=0;p<this.m;p++)this.U[p][E]=0;this.U[E][E]=1}for(var m=e-1;m>=0;m--)if(this.s[m]!==0){for(var y=m+1;y<i;y++){for(var I=0,O=m;O<this.m;O++)I+=this.U[O][m]*this.U[O][y];I=-I/this.U[m][m];for(var R=m;R<this.m;R++)this.U[R][y]+=I*this.U[R][m]}for(var W=m;W<this.m;W++)this.U[W][m]=-this.U[W][m];this.U[m][m]=1+this.U[m][m];for(var x=0;x<m-1;x++)this.U[x][m]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][m]=0;this.U[m][m]=1}}for(var z=this.n-1;z>=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z<u,r[z]!==0))for(var X=z+1;X<i;X++){for(var rt=0,$=z+1;$<this.n;$++)rt+=this.V[$][z]*this.V[$][X];rt=-rt/this.V[z+1][z];for(var D=z+1;D<this.n;D++)this.V[D][X]+=rt*this.V[D][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var k=n-1,tt=Math.pow(2,-52),ht=Math.pow(2,-966);n>0;){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.n;mt++)Et=wt*this.V[mt][ut]+Ot*this.V[mt][n-1],this.V[mt][n-1]=-Ot*this.V[mt][ut]+wt*this.V[mt][n-1],this.V[mt][ut]=Et}}break;case 2:{var Dt=r[J-1];r[J-1]=0;for(var Rt=J;Rt<n;Rt++){var Ht=v.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*r[Rt],r[Rt]=Ut*r[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][J-1],this.U[Ft][J-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][J-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(r[n-2])),Math.abs(this.s[J])),Math.abs(r[J])),Vt=this.s[n-1]/Yt,F=this.s[n-2]/Yt,Y=r[n-2]/Yt,Z=this.s[J]/Yt,K=r[J]/Yt,q=((F+Vt)*(F-Vt)+Y*Y)/2,at=Vt*Y*(Vt*Y),ct=0;(function(Tt,Ct){return Tt||Ct})(q!==0,at!==0)&&(ct=Math.sqrt(q*q+at),q<0&&(ct=-ct),ct=at/(q+ct));for(var nt=(Z+Vt)*(Z-Vt)+ct,et=Z*K,j=J;j<n-1;j++){var dt=v.hypot(nt,et),At=nt/dt,pt=et/dt;j!==J&&(r[j-1]=dt),nt=At*this.s[j]+pt*r[j],r[j]=At*r[j]-pt*this.s[j],et=pt*this.s[j+1],this.s[j+1]=At*this.s[j+1];for(var xt=0;xt<this.n;xt++)dt=At*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+At*this.V[xt][j+1],this.V[xt][j]=dt;if(dt=v.hypot(nt,et),At=nt/dt,pt=et/dt,this.s[j]=dt,nt=At*r[j]+pt*this.s[j+1],this.s[j+1]=-pt*r[j]+At*this.s[j+1],et=pt*r[j+1],r[j+1]=At*r[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)dt=At*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+At*this.U[lt][j+1],this.U[lt][j]=dt}r[n-2]=nt}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var ot=0;ot<=k;ot++)this.V[ot][J]=-this.V[ot][J]}for(;J<k&&!(this.s[J]>=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,J<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][J+1],this.V[ft][J+1]=this.V[ft][J],this.V[ft][J]=Lt;if(J<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][J+1],this.U[st][J+1]=this.U[st][J],this.U[st][J]=Lt;J++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},v.hypot=function(h,i){var r=void 0;return Math.abs(h)>Math.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;e<f.length;e++){var u=f[e];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(a,u.key,u)}}return function(a,f,e){return f&&r(a.prototype,f),e&&r(a,e),a}})();function h(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var i=(function(){function r(a,f){var e=arguments.length>2&&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<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(r,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var u=1;u<this.iMax;u++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[u-1]===this.sequence2[t-1]?s=this.grid[u-1][t-1]+this.match_score:s=this.grid[u-1][t-1]+this.mismatch_penalty;var o=this.grid[u-1][t]+this.gap_penalty,c=this.grid[u][t-1]+this.gap_penalty,l=[s,o,c],T=this.arrayAllMaxIndexes(l);this.grid[u][t]=l[T[0]],this.tracebackGrid[u][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var e=f[0],u=this.tracebackGrid[e.pos[0]][e.pos[1]];u[0]&&f.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),u[1]&&f.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),u[2]&&f.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),e.pos[0]===0&&e.pos[1]===0&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,e){for(var u=[],t=-1;(t=f.indexOf(e,t+1))!==-1;)u.push(t);return u}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),r})();A.exports=i}),(function(A,G,N){var v=function(){};v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),A.exports=v}),(function(A,G,N){function v(){this.listeners=[]}var h=v.prototype;h.addListener=function(i,r){this.listeners.push({event:i,callback:r})},h.removeListener=function(i,r){for(var a=this.listeners.length;a>=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<this.listeners.length;a++){var f=this.listeners[a];i===f.event&&f.callback(r)}},A.exports=v})])})})(le)),le.exports}var dr=he.exports,Oe;function vr(){return Oe||(Oe=1,(function(L,b){(function(G,N){L.exports=N(ur())})(dr,function(A){return(()=>{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;p<n.length;p++){var m=n[p].rect,y=n[p].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},M.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},M.prototype.moveNodes=function(){for(var n=this.getAllNodes(),E,p=0;p<n.length;p++)E=n[p],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)E=n[p],E.move()},M.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),p=0;p<E.length;p++){var m=E[p];this.idToNodeMap.set(m.id,m)}var y=function D(H){for(var k=H.getChild().getNodes(),tt,ht=0,J=0;J<k.length;J++)tt=k[J],tt.getChild()==null?n.fixedNodeSet.has(tt.id)&&(ht+=100):ht+=D(tt);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(k){n.fixedNodeSet.add(k.nodeId)});for(var E=this.graphManager.getAllNodes(),m,p=0;p<E.length;p++)if(m=E[p],m.getChild()!=null){var I=y(m);I>0&&(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<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){O.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){R.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var H,k,tt;for(tt=D.length-1;tt>=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;p<E.length;p++){for(var m=0,y=0;y<E[p].length;y++){if(this.fixedNodeSet.has(E[p][y])){m=0;break}m+=this.idToNodeMap.get(E[p][y]).displacementX}for(var I=m/E[p].length,y=0;y<E[p].length;y++)this.idToNodeMap.get(E[p][y]).displacementX=I}if(this.constraints.alignmentConstraint.horizontal)for(var O=this.constraints.alignmentConstraint.horizontal,p=0;p<O.length;p++){for(var R=0,y=0;y<O[p].length;y++){if(this.fixedNodeSet.has(O[p][y])){R=0;break}R+=this.idToNodeMap.get(O[p][y]).displacementY}for(var W=R/O[p].length,y=0;y<O[p].length;y++)this.idToNodeMap.get(O[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var D=0;n.dummyToNodeForVerticalAlignment.has($)?D=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).displacementX:D=n.idToNodeMap.get($).displacementX,n.nodeToRelativeConstraintMapHorizontal.get($).forEach(function(H){if(H.right){var k=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=n.nodeToTempPositionMapHorizontal.get($)-n.nodeToTempPositionMapHorizontal.get(H.left)+D;k<H.gap&&(D+=H.gap-k)}}),n.nodeToTempPositionMapHorizontal.set($,n.nodeToTempPositionMapHorizontal.get($)+D),n.dummyToNodeForVerticalAlignment.has($)?n.dummyToNodeForVerticalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementX=D}):n.idToNodeMap.get($).displacementX=D}}),this.nodesInRelativeVertical.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var D=0;n.dummyToNodeForHorizontalAlignment.has($)?D=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get($)[0]).displacementY:D=n.idToNodeMap.get($).displacementY,n.nodeToRelativeConstraintMapVertical.get($).forEach(function(H){if(H.bottom){var k=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=n.nodeToTempPositionMapVertical.get($)-n.nodeToTempPositionMapVertical.get(H.top)+D;k<H.gap&&(D+=H.gap-k)}}),n.nodeToTempPositionMapVertical.set($,n.nodeToTempPositionMapVertical.get($)+D),n.dummyToNodeForHorizontalAlignment.has($)?n.dummyToNodeForHorizontalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementY=D}):n.idToNodeMap.get($).displacementY=D}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var X=this.dummyToNodeForVerticalAlignment.get(x[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else Q+=this.idToNodeMap.get(x[y]).displacementX,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=rt}):this.idToNodeMap.get(x[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(k){n.idToNodeMap.get(k).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var X=this.dummyToNodeForHorizontalAlignment.get(x[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else Q+=this.idToNodeMap.get(x[y]).displacementY,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(J){n.idToNodeMap.get(J).displacementY=rt}):this.idToNodeMap.get(x[y]).displacementY=rt}}}},M.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],E,p=this.graphManager.getGraphs(),m=p.length,y;for(y=0;y<m;y++)E=p[y],E.updateConnected(),E.isConnected||(n=n.concat(E.getNodes()));return n},M.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var E=new Set,p;for(p=0;p<n.length;p++){var m=n[p];if(!E.has(m)){var y=m.getSource(),I=m.getTarget();if(y==I)m.getBendpoints().push(new d),m.getBendpoints().push(new d),this.createDummyNodesForBendpoints(m),E.add(m);else{var O=[];if(O=O.concat(y.getEdgeListToNode(I)),O=O.concat(I.getEdgeListToNode(y)),!E.has(O[0])){if(O.length>1){var R;for(R=0;R<O.length;R++){var W=O[R];W.getBendpoints().push(new d),this.createDummyNodesForBendpoints(W)}}O.forEach(function(x){E.add(x)})}}}if(E.size==n.length)break}},M.prototype.positionNodesRadially=function(n){for(var E=new g(0,0),p=Math.ceil(Math.sqrt(n.length)),m=0,y=0,I=0,O=new d(0,0),R=0;R<n.length;R++){R%p==0&&(I=0,y=m,R!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),m=0);var W=n[R],x=S.findCenterOfTree(W);E.x=I,E.y=y,O=M.radialLayout(W,x,E),O.y>m&&(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;O<n.length;O++){var R=n[O];R.transform(I)}var W=new d(y.getMaxX(),y.getMaxY());return I.inverseTransformPoint(W)},M.branchRadialLayout=function(n,E,p,m,y,I){var O=(m-p+1)/2;O<0&&(O+=180);var R=(O+p)%360,W=R*P.TWO_PI/360,x=y*Math.cos(W),Q=y*Math.sin(W);n.setCenter(x,Q);var z=[];z=z.concat(n.getEdges());var X=z.length;E!=null&&X--;for(var rt=0,$=z.length,D,H=n.getEdgesBetween(E);H.length>1;){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;p<n.length;p++){var m=n[p],y=m.getDiagonal();y>E&&(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<m.length;y++){var I=m[y],O=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(O.id==null||!this.getToBeTiled(O))&&p.push(I)}for(var y=0;y<p.length;y++){var I=p[y],R=I.getParent().id;typeof E[R]>"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;$<E[W].length;$++){var D=E[W][$];rt.remove(D),X.add(D)}}})},M.prototype.clearCompounds=function(){var n={},E={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)E[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,E)},M.prototype.clearZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var m=n.idToDummyNode[p];if(E[p]=n.tileNodes(n.memberGroups[p],m.paddingLeft+m.paddingRight),m.rect.width=E[p].width,m.rect.height=E[p].height,m.setCenter(E[p].centerX,E[p].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=m.rect.width,I=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(y+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>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;y<m.length;y++){var I=m[y];if(this.getNodeDegree(I)>0)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;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},M.prototype.getNodeDegreeWithChildren=function(n){var E=this.getNodeDegree(n);if(n.getChild()==null)return E;for(var p=n.getChild().getNodes(),m=0;m<p.length;m++){var y=p[m];E+=this.getNodeDegreeWithChildren(y)}return E},M.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},M.prototype.fillCompexOrderByDFS=function(n){for(var E=0;E<n.length;E++){var p=n[E];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},M.prototype.adjustLocations=function(n,E,p,m,y,I,O){E+=m+I,p+=y+O;for(var R=E,W=0;W<n.rows.length;W++){var x=n.rows[W];E=R;for(var Q=0,z=0;z<x.length;z++){var X=x[z];X.rect.x=E,X.rect.y=p,E+=X.rect.width+n.horizontalPadding,X.rect.height>Q&&(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 I<y?O=m:O=p,O},M.prototype.getOrgRatio=function(n){var E=n.width,p=n.height,m=E/p;return m<1&&(m=1/m),m},M.prototype.calcIdealRowWidth=function(n,E){var p=o.TILING_PADDING_VERTICAL,m=o.TILING_PADDING_HORIZONTAL,y=n.length,I=0,O=0,R=0;n.forEach(function($){I+=$.getWidth(),O+=$.getHeight(),$.getWidth()>R&&(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;z<n.length;z++){var X=n[z];x+=X.getCenterX(),Q+=X.getCenterY()}O.centerX=x/n.length,O.centerY=Q/n.length;for(var z=0;z<n.length;z++){var X=n[z];if(O.rows.length==0)this.insertNodeToRow(O,X,0,E);else if(this.canAddHorizontal(O,X.rect.width,X.rect.height)){var rt=O.rows.length-1;O.idealRowWidth||(rt=this.getShortestRowIndex(O)),this.insertNodeToRow(O,X,rt,E)}else this.insertNodeToRow(O,X,O.rows.length,E);this.shiftToLastRow(O)}return O},M.prototype.insertNodeToRow=function(n,E,p,m){var y=m;if(p==n.rows.length){var I=[];n.rows.push(I),n.rowWidth.push(y),n.rowHeight.push(0)}var O=n.rowWidth[p]+E.rect.width;n.rows[p].length>0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,n.width<O&&(n.width=O);var R=E.rect.height;p>0&&(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;m<n.rows.length;m++)n.rowWidth[m]<p&&(E=m,p=n.rowWidth[m]);return E},M.prototype.getLongestRowIndex=function(n){for(var E=-1,p=Number.MIN_VALUE,m=0;m<n.rows.length;m++)n.rowWidth[m]>p&&(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]<p&&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.width<E?x=(n.height+R)/E:x=(n.height+R)/n.width,x<1&&(x=1/x),W<1&&(W=1/W),W<x},M.prototype.shiftToLastRow=function(n){var E=this.getLongestRowIndex(n),p=n.rowWidth.length-1,m=n.rows[E],y=m[m.length-1],I=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>I&&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;R<m.length;R++)m[R].height>O&&(O=m[R].height);E>0&&(O+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=O,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var x=n.rowHeight[E]+n.rowHeight[p];n.height+=x-W,this.shiftToLastRow(n)}},M.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},M.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},M.prototype.reduceTrees=function(){for(var n=[],E=!0,p;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var I=0;I<m.length;I++)if(p=m[I],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var O=p.getEdges()[0].getOtherEnd(p),R=new C(p.getCenterX()-O.getCenterX(),p.getCenterY()-O.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),R])}else y.push([p,p.getEdges()[0],p.getOwner()]);E=!0}if(E==!0){for(var W=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(W.push(y[x]),y[x][0].getOwner().remove(y[x][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},M.prototype.growTree=function(n){for(var E=n.length,p=n[E-1],m,y=0;y<p.length;y++)m=p[y],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},M.prototype.findPlaceforPrunedNode=function(n){var E,p,m=n[0];if(m==n[1].source?p=n[1].target:p=n[1].source,o.PURE_INCREMENTAL)m.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,I=p.finishX,O=p.startY,R=p.finishY,W=0,x=0,Q=0,z=0,X=[W,Q,x,z];if(O>0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(I<this.grid.length-1)for(var rt=O;rt<=R;rt++)X[1]+=this.grid[I+1][rt].length+this.grid[I][rt].length-1;if(R<this.grid[0].length-1)for(var rt=y;rt<=I;rt++)X[2]+=this.grid[rt][R+1].length+this.grid[rt][R].length-1;if(y>0)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<X.length;k++)X[k]<$?($=X[k],D=1,H=k):X[k]==$&&D++;if(D==3&&$==0)X[0]==0&&X[1]==0&&X[2]==0?E=1:X[0]==0&&X[1]==0&&X[3]==0?E=0:X[0]==0&&X[2]==0&&X[3]==0?E=3:X[1]==0&&X[2]==0&&X[3]==0&&(E=2);else if(D==2&&$==0){var tt=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?tt==0?E=0:E=1:X[0]==0&&X[2]==0?tt==0?E=0:E=2:X[0]==0&&X[3]==0?tt==0?E=0:E=3:X[1]==0&&X[2]==0?tt==0?E=1:E=2:X[1]==0&&X[3]==0?tt==0?E=1:E=3:tt==0?E=2:E=3}else if(D==4&&$==0){var tt=Math.floor(Math.random()*4);E=tt}else E=H;E==0?m.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+m.getWidth()/2,p.getCenterY()):E==2?m.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-m.getWidth()/2,p.getCenterY())}},i.exports=M}),991:((i,r,a)=>{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<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=s,l.displacementY+=o):l.propogateDisplacementToChildren(s,o)},u.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.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},u.prototype.setPred1=function(s){this.pred1=s},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(s){this.next=s},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(s){this.processed=s},u.prototype.isProcessed=function(){return processed},i.exports=u}),902:((i,r,a)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var e=a(806),u=a(551).LinkedList,t=a(551).Matrix,s=a(551).SVD;function o(){}o.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,d=[],C=[],S=c.getAllNodes(),w=0,P=0;P<S.length;P++){var B=S[P];B.getChild()==null&&(g.set(B.id,w++),d.push(B.getCenterX()),C.push(B.getCenterY()),T.set(B.id,B))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(F){!F.gap&&F.gap!=0&&(F.left?F.gap=e.DEFAULT_EDGE_LENGTH+T.get(F.left).getWidth()/2+T.get(F.right).getWidth()/2:F.gap=e.DEFAULT_EDGE_LENGTH+T.get(F.top).getHeight()/2+T.get(F.bottom).getHeight()/2)});var U=function(Y,Z){return{x:Y.x-Z.x,y:Y.y-Z.y}},V=function(Y){var Z=0,K=0;return Y.forEach(function(q){Z+=d[g.get(q)],K+=C[g.get(q)]}),{x:Z/Y.size,y:K/Y.size}},M=function(Y,Z,K,q,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt.add(Bt)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;Y.forEach(function(lt,ot){nt.set(ot,0)}),Y.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var et=new Map,j=new Map,dt=new u;nt.forEach(function(lt,ot){lt==0?(dt.push(ot),K||(Z=="horizontal"?et.set(ot,g.has(ot)?d[g.get(ot)]:q.get(ot)):et.set(ot,g.has(ot)?C[g.get(ot)]:q.get(ot)))):et.set(ot,Number.NEGATIVE_INFINITY),K&&j.set(ot,new Set([ot]))}),K&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){K.has(st)&&ot.push(st)}),ot.length>0){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)<et.get(ot)+ft.gap)if(K&&K.has(ft.id)){var st=void 0;if(Z=="horizontal"?st=g.has(ft.id)?d[g.get(ft.id)]:q.get(ft.id):st=g.has(ft.id)?C[g.get(ft.id)]:q.get(ft.id),et.set(ft.id,st),st<et.get(ot)+ft.gap){var Xt=et.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){et.set(Tt,et.get(Tt)-Xt)})}}else et.set(ft.id,et.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&dt.push(ft.id),K&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};dt.length!=0;)At();if(K){var pt=new Set;Y.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;K.has(Bt)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(lt))[0])&&(bt=!0,zt=kt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,Bt=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;Z=="horizontal"?kt=g.has(St)?d[g.get(St)]:q.get(St):kt=g.has(St)?C[g.get(St)]:q.get(St);var Kt=et.get(St);kt<Lt&&(Lt=kt),kt>st&&(st=kt),Kt<ft&&(ft=Kt),Kt>Xt&&(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;ct<g.size;ct++)d[ct]=-1*d[ct],C[ct]=-1*C[ct];else if(Z>K)for(var nt=0;nt<g.size;nt++)d[nt]=-1*d[nt];else if(q>at)for(var et=0;et<g.size;et++)C[et]=-1*C[et]},n=function(Y){var Z=[],K=new u,q=new Set,at=0;return Y.forEach(function(ct,nt){if(!q.has(nt)){Z[at]=[];var et=nt;for(K.push(et),q.add(et),Z[at].push(et);K.length!=0;){et=K.shift();var j=Y.get(et);j.forEach(function(dt){q.has(dt.id)||(K.push(dt.id),q.add(dt.id),Z[at].push(dt.id))})}at++}}),Z},E=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(q).push(at),Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},p=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},m=[],y=[],I=!1,O=!1,R=new Set,W=new Map,x=new Map,Q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(F){R.add(F.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(F){F.left?(W.has(F.left)?W.get(F.left).push({id:F.right,gap:F.gap,direction:"horizontal"}):W.set(F.left,[{id:F.right,gap:F.gap,direction:"horizontal"}]),W.has(F.right)||W.set(F.right,[])):(W.has(F.top)?W.get(F.top).push({id:F.bottom,gap:F.gap,direction:"vertical"}):W.set(F.top,[{id:F.bottom,gap:F.gap,direction:"vertical"}]),W.has(F.bottom)||W.set(F.bottom,[]))}),x=E(W),Q=n(x)),e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)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;K<Y.length;K++)Z(K);I=!0}if(l.alignmentConstraint.horizontal){for(var q=l.alignmentConstraint.horizontal,at=function(et){var j=new Set;q[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).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;ct<q.length;ct++)at(ct);I=!0}l.relativePlacementConstraint&&(O=!0)})();else if(l.relativePlacementConstraint){for(var z=0,X=0,rt=0;rt<Q.length;rt++)Q[rt].length>z&&(z=Q[rt].length,X=rt);if(z<x.size/2)_(l.relativePlacementConstraint),I=!1,O=!1;else{var $=new Map,D=new Map,H=[];Q[X].forEach(function(F){W.get(F).forEach(function(Y){Y.direction=="horizontal"?($.has(F)?$.get(F).push(Y):$.set(F,[Y]),$.has(Y.id)||$.set(Y.id,[]),H.push({left:F,right:Y.id})):(D.has(F)?D.get(F).push(Y):D.set(F,[Y]),D.has(Y.id)||D.set(Y.id,[]),H.push({top:F,bottom:Y.id}))})}),_(H),O=!1;var k=M($,"horizontal"),tt=M(D,"vertical");Q[X].forEach(function(F,Y){y[Y]=[d[g.get(F)],C[g.get(F)]],m[Y]=[],k.has(F)?m[Y][0]=k.get(F):m[Y][0]=d[g.get(F)],tt.has(F)?m[Y][1]=tt.get(F):m[Y][1]=C[g.get(F)]}),I=!0}}if(I){for(var ht=void 0,J=t.transpose(m),It=t.transpose(y),Nt=0;Nt<J.length;Nt++)J[Nt]=t.multGamma(J[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(J,t.transpose(It)),it=s.svd(vt);ht=t.multMat(it.V,t.transpose(it.U));for(var ut=0;ut<g.size;ut++){var Et=[d[ut],C[ut]],wt=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];d[ut]=t.dotProduct(Et,wt),C[ut]=t.dotProduct(Et,Ot)}O&&_(l.relativePlacementConstraint)}}if(e.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){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;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(Y){var Z=new Set;Ut[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=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<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var F=new Map,Y=new Map,Z=new Map,K=new Map,q=new Map,at=new Map,ct=new Set,nt=new Set;if(R.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var et=l.alignmentConstraint.vertical,j=function(yt){Z.set("dummy"+yt,[]),et[yt].forEach(function(Mt){F.set(Mt,"dummy"+yt),Z.get("dummy"+yt).push(Mt),R.has(Mt)&&ct.add("dummy"+yt)}),q.set("dummy"+yt,d[g.get(et[yt][0])])},dt=0;dt<et.length;dt++)j(dt);if(l.alignmentConstraint.horizontal)for(var At=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),At[yt].forEach(function(Mt){Y.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),R.has(Mt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,C[g.get(At[yt][0])])},xt=0;xt<At.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var Zt=void 0,$t=void 0;Mt.direction=="horizontal"?(Zt=F.get(yt)?F.get(yt):yt,F.get(Mt.id)?$t={id:F.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,lt.has(Zt)?lt.get(Zt).push($t):lt.set(Zt,[$t]),lt.has($t.id)||lt.set($t.id,[])):(Zt=Y.get(yt)?Y.get(yt):yt,Y.get(Mt.id)?$t={id:Y.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,ot.has(Zt)?ot.get(Zt).push($t):ot.set(Zt,[$t]),ot.has($t.id)||ot.set($t.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt(Bt)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=E(lt),zt=E(ot),St=n(bt),kt=n(zt),Kt=p(lt),fe=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(Mt){fe.get(Mt).length==0&&jt[yt].push(Mt)})});var _t=M(lt,"horizontal",ct,q,Qt),Jt=M(ot,"vertical",nt,at,jt),ne=function(yt){Z.get(yt)?Z.get(yt).forEach(function(Mt){d[g.get(Mt)]=_t.get(yt)}):d[g.get(yt)]=_t.get(yt)},te=!0,ee=!1,Ne=void 0;try{for(var ce=_t.keys()[Symbol.iterator](),Le;!(te=(Le=ce.next()).done);te=!0){var ge=Le.value;ne(ge)}}catch(Gt){ee=!0,Ne=Gt}finally{try{!te&&ce.return&&ce.return()}finally{if(ee)throw Ne}}var $e=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){C[g.get(Mt)]=Jt.get(yt)}):C[g.get(yt)]=Jt.get(yt)},ue=!0,Ce=!1,we=void 0;try{for(var de=Jt.keys()[Symbol.iterator](),Ae;!(ue=(Ae=de.next()).done);ue=!0){var ge=Ae.value;$e(ge)}}catch(Gt){Ce=!0,we=Gt}finally{try{!ue&&de.return&&de.return()}finally{if(Ce)throw we}}})()}for(var Yt=0;Yt<S.length;Yt++){var Vt=S[Yt];Vt.getChild()==null&&Vt.setCenter(d[g.get(Vt.id)],C[g.get(Vt.id)])}},i.exports=o}),551:(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(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<a;e++)f[e-1]=arguments[e];return f.forEach(function(u){Object.keys(u).forEach(function(t){return r[t]=u[t]})}),r}}),548:((i,r,a)=>{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;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var g=l.parent()[0];g!=null;){if(s[g.id()])return!1;g=g.parent()[0]}return!0});return c},u.connectComponents=function(t,s,o,c){var l=new e,T=new Set,g=[],d=void 0,C=void 0,S=void 0,w=!1,P=1,B=[],U=[],V=function(){var _=t.collection();U.push(_);var n=o[0],E=t.collection();E.merge(n).merge(n.descendants().intersection(s)),g.push(n),E.forEach(function(y){l.push(y),T.add(y),_.merge(y)});for(var p=function(){n=l.shift();var I=t.collection();n.neighborhood().nodes().forEach(function(x){s.intersection(n.edgesWith(x)).length>0&&I.merge(x)});for(var O=0;O<I.length;O++){var R=I[O];if(d=o.intersection(R.union(R.ancestors())),d!=null&&!T.has(d[0])){var W=d.union(d.descendants());W.forEach(function(x){l.push(x),T.add(x),_.merge(x),o.has(x)&&g.push(x)})}}};l.length!=0;)p();if(_.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(I){_.has(I.source())&&_.has(I.target())&&_.merge(I)})}),g.length==o.length&&(w=!0),!w||w&&P>1){C=g[0],S=C.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<S&&(S=y.connectedEdges().length,C=y)}),B.push(C.id());var m=t.collection();m.merge(g[0]),g.forEach(function(y){m.merge(y)}),g=[],o=o.difference(m),P++}};do V();while(!w);return c&&B.length>0&&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;E<c&&(c=E),p>l&&(l=p),m<T&&(T=m),y>g&&(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;z<c&&(c=z),X>l&&(l=X),rt<T&&(T=rt),$>g&&(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;V<U;V++){var M=B[V];C=s[c.get(M.id())]-M.width()/2,S=s[c.get(M.id())]+M.width()/2,w=o[c.get(M.id())]-M.height()/2,P=o[c.get(M.id())]+M.height()/2,l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var _={};return _.topLeftX=l,_.topLeftY=g,_.width=T-l,_.height=d-g,_},u.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||o.merge(c)}),o},i.exports=u}),816:((i,r,a)=>{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;$<rt;$++){var D=Q[$],H=null;D.intersection(p).length==0&&(H=D.children());var k=void 0,tt=D.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(D.outerWidth()!=null&&D.outerHeight()!=null)if(X.randomize)if(!D.isParent())k=x.add(new u(z.graphManager,new t(V[U.get(D.id())]-tt.w/2,M[U.get(D.id())]-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else{var ht=f.calcBoundingBox(D,V,M,U);D.intersection(p).length==0?k=x.add(new u(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(ht.width,ht.height))):k=x.add(new u(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(parseFloat(tt.w),parseFloat(tt.h))))}else k=x.add(new u(z.graphManager,new t(D.position("x")-tt.w/2,D.position("y")-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else k=x.add(new u(this.graphManager));if(k.id=D.data("id"),k.nodeRepulsion=E(X.nodeRepulsion,D),k.paddingLeft=parseInt(D.css("padding")),k.paddingTop=parseInt(D.css("padding")),k.paddingRight=parseInt(D.css("padding")),k.paddingBottom=parseInt(D.css("padding")),X.nodeDimensionsIncludeLabels&&(k.labelWidth=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,k.labelHeight=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,k.labelPosVertical=D.css("text-valign"),k.labelPosHorizontal=D.css("text-halign")),_[D.data("id")]=k,isNaN(k.rect.x)&&(k.rect.x=0),isNaN(k.rect.y)&&(k.rect.y=0),H!=null&&H.length>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;$<z.length;$++){var D=z[$],H=_[D.data("source")],k=_[D.data("target")];if(H&&k&&H!==k&&H.getEdgesBetween(k).length==0){var tt=Q.add(x.newEdge(),H,k);tt.id=D.id(),tt.idealLength=E(d.idealEdgeLength,D),tt.edgeElasticity=E(d.edgeElasticity,D),X+=tt.idealLength,rt++}}d.idealEdgeLength!=null&&(rt>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;w<S.length;w++){var P=S[w];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(C,P.key,P)}}return function(C,S,w){return S&&d(C.prototype,S),w&&d(C,w),C}})();function e(d,C){if(!(d instanceof C))throw new TypeError("Cannot call a class as a function")}var u=a(658),t=a(548),s=a(657),o=s.spectralLayout,c=a(816),l=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(C){return 4500},idealEdgeLength:function(C){return 50},edgeElasticity:function(C){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=(function(){function d(C){e(this,d),this.options=u({},T,C)}return f(d,[{key:"run",value:function(){var S=this,w=this.options,P=w.cy,B=w.eles,U=[],V=[],M=void 0,_=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var n=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;n&&(w.tile=!1,w.packComponents=!1);var E=void 0,p=!1;if(P.layoutUtilities&&w.packComponents&&(E=P.layoutUtilities("get"),E||(E=P.layoutUtilities()),p=!0),B.nodes().length>0)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<R;){Y=Math.floor(Math.random()*E),K=!1;for(var q=0;q<Z;q++)if(U[q]==Y){K=!0;break}if(!K)U[Z]=Y,Z++;else continue}},x=function(Y,Z,K){for(var q=[],at=0,ct=0,nt=0,et=void 0,j=[],dt=0,At=1,pt=0;pt<E;pt++)j[pt]=p;for(q[ct]=Y,j[Y]=0;ct>=at;){nt=q[at++];for(var xt=w[nt],lt=0;lt<xt.length;lt++)et=C.get(xt[lt]),j[et]==p&&(j[et]=j[nt]+1,q[++ct]=et);M[nt][Z]=j[nt]*O}if(K){for(var ot=0;ot<E;ot++)M[ot][Z]<V[ot]&&(V[ot]=M[ot][Z]);for(var Lt=0;Lt<E;Lt++)V[Lt]>dt&&(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<E;q++)V[q]=p;for(var at=0;at<R;at++)U[at]=Z,Z=x(Z,at,Y)}else{W();for(var K=0;K<R;K++)x(U[K],K,Y)}for(var ct=0;ct<E;ct++)for(var nt=0;nt<R;nt++)M[ct][nt]*=M[ct][nt];for(var et=0;et<R;et++)_[et]=[];for(var j=0;j<R;j++)for(var dt=0;dt<R;dt++)_[j][dt]=M[U[dt]][j]},z=function(){for(var Y=u.svd(_),Z=Y.S,K=Y.U,q=Y.V,at=Z[0]*Z[0]*Z[0],ct=[],nt=0;nt<R;nt++){ct[nt]=[];for(var et=0;et<R;et++)ct[nt][et]=0,nt==et&&(ct[nt][et]=Z[nt]/(Z[nt]*Z[nt]+at/(Z[nt]*Z[nt])))}n=e.multMat(e.multMat(q,ct),e.transpose(K))},X=function(){for(var Y=void 0,Z=void 0,K=[],q=[],at=[],ct=[],nt=0;nt<E;nt++)K[nt]=Math.random(),q[nt]=Math.random();K=e.normalize(K),q=e.normalize(q);for(var et=m,j=m,dt=void 0;;){for(var At=0;At<E;At++)at[At]=K[At];if(K=e.multGamma(e.multL(e.multGamma(at),M,n)),Y=e.dotProduct(at,K),K=e.normalize(K),et=e.dotProduct(at,K),dt=Math.abs(et/j),dt<=1+y&&dt>=1)break;j=et}for(var pt=0;pt<E;pt++)at[pt]=K[pt];for(j=m;;){for(var xt=0;xt<E;xt++)ct[xt]=q[xt];if(ct=e.minusOp(ct,e.multCons(at,e.dotProduct(at,ct))),q=e.multGamma(e.multL(e.multGamma(ct),M,n)),Z=e.dotProduct(ct,q),q=e.normalize(q),et=e.dotProduct(ct,q),dt=Math.abs(et/j),dt<=1+y&&dt>=1)break;j=et}for(var lt=0;lt<E;lt++)ct[lt]=q[lt];P=e.multCons(at,Math.sqrt(Math.abs(Y))),B=e.multCons(ct,Math.sqrt(Math.abs(Z)))};f.connectComponents(c,l,f.getTopMostNodes(T),d),g.forEach(function(F){f.connectComponents(c,l,f.getTopMostNodes(F.descendants().intersection(l)),d)});for(var rt=0,$=0;$<T.length;$++)T[$].isParent()||C.set(T[$].id(),rt++);var D=!0,H=!1,k=void 0;try{for(var tt=d.keys()[Symbol.iterator](),ht;!(D=(ht=tt.next()).done);D=!0){var J=ht.value;C.set(J,rt++)}}catch(F){H=!0,k=F}finally{try{!D&&tt.return&&tt.return()}finally{if(H)throw k}}for(var It=0;It<C.size;It++)w[It]=[];g.forEach(function(F){for(var Y=F.children().intersection(l);Y.nodes(":childless").length==0;)Y=Y.nodes()[0].children().intersection(l);var Z=0,K=Y.nodes(":childless")[0].connectedEdges().length;Y.nodes(":childless").forEach(function(q,at){q.connectedEdges().length<K&&(K=q.connectedEdges().length,Z=at)}),S.set(F.id(),Y.nodes(":childless")[Z].id())}),T.forEach(function(F){var Y=void 0;F.isParent()?Y=C.get(S.get(F.id())):Y=C.get(F.id()),F.neighborhood().nodes().forEach(function(Z){l.intersection(F.edgesWith(Z)).length>0&&(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<o.sampleSize?E:o.sampleSize;for(var Dt=0;Dt<E;Dt++)M[Dt]=[];for(var Rt=0;Rt<R;Rt++)n[Rt]=[];return o.quality=="draft"||o.step=="all"?(Q(I),z(),X(),mt={nodeIndexes:C,xCoords:P,yCoords:B}):(C.forEach(function(F,Y){P.push(c.getElementById(Y).position("x")),B.push(c.getElementById(Y).position("y"))}),mt={nodeIndexes:C,xCoords:P,yCoords:B}),mt}else{var Ht=C.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(P.push(Pt.x),B.push(Pt.y),E==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();P.push(Pt.x+Ft/2+Vt/2+o.idealEdgeLength),B.push(Pt.y)}return mt={nodeIndexes:C,xCoords:P,yCoords:B},mt}};i.exports={spectralLayout:t}}),579:((i,r,a)=>{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-BtckK32c.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-DpBz6UHc.js";import{p as fr}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import{c as Fe}from"./cytoscape.esm-OyMbaexL.js";import{g as cr}from"./_commonjsHelpers-CqkleIqs.js";import"./index-_5lXYMaO.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;l<c.length;l++)s=c[l],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},e.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},e.prototype.scatter=function(){var t,s,o=-r.INITIAL_WORLD_BOUNDARY,c=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+a.nextDouble()*(c-o)+o;var l=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+a.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},e.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(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<d;C++)g=T[C],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var S=this.nodes.indexOf(l);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(c instanceof f){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var w=g.source.edges.indexOf(g),P=g.target.edges.indexOf(g);if(!(w>-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;w<S;w++){var P=C[w];T=P.getTop(),g=P.getLeft(),c>T&&(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;M<V;M++){var _=U[M];c&&_.child!=null&&_.updateBounds(),C=_.getLeft(),S=_.getRight(),w=_.getTop(),P=_.getBottom(),l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var n=new e(l,g,T-l,d-g);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),U[0].getParent().paddingLeft!=null?B=U[0].getParent().paddingLeft:B=this.margin,this.left=n.x-B,this.right=n.x+n.width+B,this.top=n.y-B,this.bottom=n.y+n.height+B},s.calculateBounds=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=c.length,U=0;U<B;U++){var V=c[U];C=V.getLeft(),S=V.getRight(),w=V.getTop(),P=V.getBottom(),l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var M=new e(l,g,T-l,d-g);return M},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,g=0;g<T;g++){var d=l[g];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=i.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,g=this.nodes[0],d,C,S=g.withChildren();for(S.forEach(function(M){l.push(M),T.add(M)});l.length!==0;){g=l.shift(),d=g.getEdges();for(var w=d.length,P=0;P<w;P++){var B=d[P];if(C=B.getOtherEndInGraph(g,this),C!=null&&!T.has(C)){var U=C.withChildren();U.forEach(function(M){l.push(M),T.add(M)})}}}if(this.isConnected=!1,T.size>=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<u;t++)e=f[t],a.remove(e);var s=[];s=s.concat(a.getNodes());var o;u=s.length;for(var t=0;t<u;t++)o=s[t],a.remove(o);a==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(a);this.graphs.splice(c,1),a.parent=null}else if(r instanceof h){if(e=r,e==null)throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(!(e.source!=null&&e.target!=null))throw"Source and/or target is null!";if(!(e.source.edges.indexOf(e)!=-1&&e.target.edges.indexOf(e)!=-1))throw"Source and/or target doesn't know this edge!";var c=e.source.edges.indexOf(e);if(e.source.edges.splice(c,1),c=e.target.edges.indexOf(e),e.target.edges.splice(c,1),!(e.source.owner!=null&&e.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(e.source.owner.getGraphManager().edges.indexOf(e)==-1)throw"Not in owner graph manager's edge list!";var c=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(c,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],a=this.getGraphs(),f=a.length,e=0;e<f;e++)r=r.concat(a[e].getNodes());this.allNodes=r}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],a=this.getGraphs();a.length;for(var f=0;f<a.length;f++)r=r.concat(a[f].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(r,a){if(!(r!=null&&a!=null))throw"assert failed";if(r==a)return!0;var f=r.getOwner(),e;do{if(e=f.getParent(),e==null)break;if(e==a)return!0;if(f=e.getOwner(),f==null)break}while(!0);f=a.getOwner();do{if(e=f.getParent(),e==null)break;if(e==r)return!0;if(f=e.getOwner(),f==null)break}while(!0);return!1},i.prototype.calcLowestCommonAncestors=function(){for(var r,a,f,e,u,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(r=t[o],a=r.source,f=r.target,r.lca=null,r.sourceInLca=a,r.targetInLca=f,a==f){r.lca=a.getOwner();continue}for(e=a.getOwner();r.lca==null;){for(r.targetInLca=f,u=f.getOwner();r.lca==null;){if(u==e){r.lca=u;break}if(u==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=u.getParent(),u=r.targetInLca.getOwner()}if(e==this.rootGraph)break;r.lca==null&&(r.sourceInLca=e.getParent(),e=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(r,a){if(r==a)return r.getOwner();var f=r.getOwner();do{if(f==null)break;var e=a.getOwner();do{if(e==null)break;if(e==f)return e;e=e.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},i.prototype.calcInclusionTreeDepths=function(r,a){r==null&&a==null&&(r=this.rootGraph,a=1);for(var f,e=r.getNodes(),u=e.length,t=0;t<u;t++)f=e[t],f.inclusionTreeDepth=a,f.child!=null&&this.calcInclusionTreeDepths(f.child,a+1)},i.prototype.includesInvalidEdge=function(){for(var r,a=[],f=this.edges.length,e=0;e<f;e++)r=this.edges[e],this.isOneAncestorOfOther(r.source,r.target)&&a.push(r);for(var e=0;e<a.length;e++)this.remove(a[e]);return!1},A.exports=i}),(function(A,G,N){var v=N(12);function h(){}h.calcSeparationAmount=function(i,r,a,f){if(!i.intersects(r))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(i,r,e),a[0]=Math.min(i.getRight(),r.getRight())-Math.max(i.x,r.x),a[1]=Math.min(i.getBottom(),r.getBottom())-Math.max(i.y,r.y),i.getX()<=r.getX()&&i.getRight()>=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]<s?s=a[0]:t=a[1],a[0]=-1*e[0]*(s/2+f),a[1]=-1*e[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(i,r,a){i.getCenterX()<r.getCenterX()?a[0]=-1:a[0]=1,i.getCenterY()<r.getCenterY()?a[1]=-1:a[1]=1},h.getIntersection2=function(i,r,a){var f=i.getCenterX(),e=i.getCenterY(),u=r.getCenterX(),t=r.getCenterY();if(i.intersects(r))return a[0]=f,a[1]=e,a[2]=u,a[3]=t,!0;var s=i.getX(),o=i.getY(),c=i.getRight(),l=i.getX(),T=i.getBottom(),g=i.getRight(),d=i.getWidthHalf(),C=i.getHeightHalf(),S=r.getX(),w=r.getY(),P=r.getRight(),B=r.getX(),U=r.getBottom(),V=r.getRight(),M=r.getWidthHalf(),_=r.getHeightHalf(),n=!1,E=!1;if(f===u){if(e>t)return a[0]=f,a[1]=o,a[2]=u,a[3]=U,!1;if(e<t)return a[0]=f,a[1]=T,a[2]=u,a[3]=w,!1}else if(e===t){if(f>u)return a[0]=s,a[1]=e,a[2]=P,a[3]=t,!1;if(f<u)return a[0]=c,a[1]=e,a[2]=S,a[3]=t,!1}else{var p=i.height/i.width,m=r.height/r.width,y=(t-e)/(u-f),I=void 0,O=void 0,R=void 0,W=void 0,x=void 0,Q=void 0;if(-p===y?f>u?(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<i?e+=Math.PI:f<r&&(e+=this.TWO_PI)):f<r?e=this.ONE_AND_HALF_PI:e=this.HALF_PI,e},h.doIntersect=function(i,r,a,f){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=(t-e)*(T-c)-(l-o)*(s-u);if(g===0)return!1;var d=((T-c)*(l-e)+(o-l)*(T-u))/g,C=((u-s)*(l-e)+(t-e)*(T-u))/g;return 0<d&&d<1&&0<C&&C<1},h.findCircleLineIntersections=function(i,r,a,f,e,u,t){var s=(a-i)*(a-i)+(f-r)*(f-r),o=2*((i-e)*(a-i)+(r-u)*(f-r)),c=(i-e)*(i-e)+(r-u)*(r-u)-t*t,l=o*o-4*s*c;if(l>=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<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}return function(u,t,s){return t&&e(u.prototype,t),s&&e(u,s),u}})();function h(e,u){if(!(e instanceof u))throw new TypeError("Cannot call a class as a function")}var i=function(u){return{value:u,next:null,prev:null}},r=function(u,t,s,o){return u!==null?u.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=u,t.next=s,o.length++,t},a=function(u,t){var s=u.prev,o=u.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,u.prev=u.next=null,t.length--,u},f=(function(){function e(u){var t=this;h(this,e),this.length=0,this.head=null,this.tail=null,u?.forEach(function(s){return t.push(s)})}return v(e,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,i(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,i(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,i(t),null,this)}},{key:"unshift",value:function(t){return r(null,i(t),this.head,this)}},{key:"remove",value:function(t){return a(t,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),e})();A.exports=f}),(function(A,G,N){function v(h,i,r){this.x=null,this.y=null,h==null&&i==null&&r==null?(this.x=0,this.y=0):typeof h=="number"&&typeof i=="number"&&r==null?(this.x=h,this.y=i):h.constructor.name=="Point"&&i==null&&r==null&&(r=h,this.x=r.x,this.y=r.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(h,i,r){h.constructor.name=="Point"&&i==null&&r==null?(r=h,this.setLocation(r.x,r.y)):typeof h=="number"&&typeof i=="number"&&r==null&&(parseInt(h)==h&&parseInt(i)==i?this.move(h,i):(this.x=Math.floor(h+.5),this.y=Math.floor(i+.5)))},v.prototype.move=function(h,i){this.x=h,this.y=i},v.prototype.translate=function(h,i){this.x+=h,this.y+=i},v.prototype.equals=function(h){if(h.constructor.name=="Point"){var i=h;return this.x==i.x&&this.y==i.y}return this==h},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=v}),(function(A,G,N){function v(h,i,r,a){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&i!=null&&r!=null&&a!=null&&(this.x=h,this.y=i,this.width=r,this.height=a)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(h){this.x=h},v.prototype.getY=function(){return this.y},v.prototype.setY=function(h){this.y=h},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},A.exports=v}),(function(A,G,N){var v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function h(){}h.lastID=0,h.createID=function(i){return h.isPrimitive(i)?i:(i.uniqueID!=null||(i.uniqueID=h.getString(),h.lastID++),i.uniqueID)},h.getString=function(i){return i==null&&(i=h.lastID),"Object#"+i},h.isPrimitive=function(i){var r=typeof i>"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);c<o.length;c++)l[c]=o[c];return l}else return Array.from(o)}var h=N(0),i=N(7),r=N(3),a=N(1),f=N(6),e=N(5),u=N(17),t=N(29);function s(o){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new i(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new r(this.graphManager,o)},s.prototype.newEdge=function(o){return new a(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),h.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof r){var c=o;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(o instanceof a){var d=o;if(d.vGraphObject!=null){var C=d.vGraphObject;C.update(d)}}else if(o instanceof f){var S=o;if(S.vGraphObject!=null){var w=S.vGraphObject;w.update(S)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new e(0,0));else{var c=new u,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),g,d=0;d<T.length;d++)g=T[d],g.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=o.getNodes(),g=0;g<T.length;g++)c=T[g],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<l.length;g++)l[g].getChild()!=null&&(T=!1);if(!T)return o;var d=new Set,C=[],S=new Map,w=[];for(w=w.concat(l);w.length>0&&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<B.length;g++){var U=B[g].getOtherEnd(P);if(S.get(P)!=U)if(!d.has(U))C.push(U),S.set(U,P);else{c=!1;break}}}if(!c)o=[];else{var V=[].concat(v(d));o.push(V);for(var g=0;g<V.length;g++){var M=V[g],_=w.indexOf(M);_>-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;g<o.bendpoints.length;g++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var C=this.newEdge(null);this.graphManager.add(C,l,d),c.add(d),l=d}var C=this.newEdge(null);return this.graphManager.add(C,l,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(v(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var l=o[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),g=0;g<T.length;g++){var d=T[g],C=new e(d.getCenterX(),d.getCenterY()),S=l.bendpoints.get(g);S.x=C.x,S.y=C.y,d.getOwner().remove(d)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(o,c,l,T){if(l!=null&&T!=null){var g=c;if(o<=50){var d=c/l;g-=(c-d)/50*(50-o)}else{var C=c*T;g+=(C-c)/50*(o-50)}return g}else{var S,w;return o<=50?(S=9*c/500,w=c/10):(S=9*c/50,w=-8*c),S*o+w}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var l=[],T=new Map,g=!1,d=null;(c.length==1||c.length==2)&&(g=!0,d=c[0]);for(var C=0;C<c.length;C++){var S=c[C],w=S.getNeighborsList().size;T.set(S,S.getNeighborsList().size),w==1&&l.push(S)}var P=[];for(P=P.concat(l);!g;){var B=[];B=B.concat(P),P=[];for(var C=0;C<c.length;C++){var S=c[C],U=c.indexOf(S);U>=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);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var h=N(15),i=N(4),r=N(0),a=N(8),f=N(9);function e(){h.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}e.prototype=Object.create(h.prototype);for(var u in h)e[u]=h[u];e.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},e.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,l,T,g,d=this.getGraphManager().getAllEdges(),C=0;C<d.length;C++)t=d[C],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*r.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},e.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>i.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;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},e.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&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;o<g.length;o++)l=g[o],this.calculateRepulsionForceOfANode(l,d,t,s),d.add(l);else for(o=0;o<g.length;o++)for(l=g[o],c=o+1;c<g.length;c++)T=g[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},e.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},e.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},e.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),l,T,g,d;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-s),g=T*(t.lengthX/l),d=T*(t.lengthY/l),o.springForceX+=g,o.springForceY+=d,c.springForceX-=g,c.springForceY-=d)},e.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),g,d,C,S,w,P,B;if(o.intersects(c)){a.calcSeparationAmount(o,c,l,i.DEFAULT_EDGE_LENGTH/2),P=2*l[0],B=2*l[1];var U=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=U*P,t.repulsionForceY-=U*B,s.repulsionForceX+=U*P,s.repulsionForceY+=U*B}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(g=c.getCenterX()-o.getCenterX(),d=c.getCenterY()-o.getCenterY()):(a.getIntersection(o,c,T),g=T[2]-T[0],d=T[3]-T[1]),Math.abs(g)<i.MIN_REPULSION_DIST&&(g=f.sign(g)*i.MIN_REPULSION_DIST),Math.abs(d)<i.MIN_REPULSION_DIST&&(d=f.sign(d)*i.MIN_REPULSION_DIST),C=g*g+d*d,S=Math.sqrt(C),w=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/C,P=w*g/S,B=w*d/S,t.repulsionForceX-=P,t.repulsionForceY-=B,s.repulsionForceX+=P,s.repulsionForceY+=B},e.prototype.calcGravitationalForce=function(t){var s,o,c,l,T,g,d,C;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-o,T=t.getCenterY()-c,g=Math.abs(l)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(C=s.getEstimatedSize()*this.gravityRangeFactor,(g>C||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<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},e.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(o);for(var l=0;l<s;l++)for(var T=0;T<o;T++)c[l][T]=new Array;return c},e.prototype.addNodeToGrid=function(t,s,o){var c=0,l=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var d=c;d<=l;d++)for(var C=T;C<=g;C++)this.grid[d][C].push(t),t.setGridCoordinates(c,l,T,g)},e.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},e.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var l=new Set;t.surrounding=new Array;for(var T,g=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var C=t.startY-1;C<t.finishY+2;C++)if(!(d<0||C<0||d>=g.length||C>=g[0].length)){for(var S=0;S<g[d][C].length;S++)if(T=g[d][C][S],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!l.has(T)){var w=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);w<=this.repulsionRange&&P<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(v(l))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},e.prototype.calcRepulsionRange=function(){return 0},A.exports=e}),(function(A,G,N){var v=N(1),h=N(4);function i(a,f,e){v.call(this,a,f,e),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}i.prototype=Object.create(v.prototype);for(var r in v)i[r]=v[r];A.exports=i}),(function(A,G,N){var v=N(3),h=N(4);function i(a,f,e,u){v.call(this,a,f,e,u),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}i.prototype=Object.create(v.prototype);for(var r in v)i[r]=v[r];i.prototype.setGridCoordinates=function(a,f,e,u){this.startX=a,this.finishX=f,this.startY=e,this.finishY=u},A.exports=i}),(function(A,G,N){function v(h,i){this.width=0,this.height=0,h!==null&&i!==null&&(this.height=i,this.width=h)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},A.exports=v}),(function(A,G,N){var v=N(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(i,r){var a=v.createID(i);this.contains(a)||(this.map[a]=r,this.keys.push(i))},h.prototype.contains=function(i){return v.createID(i),this.map[i]!=null},h.prototype.get=function(i){var r=v.createID(i);return this.map[r]},h.prototype.keySet=function(){return this.keys},A.exports=h}),(function(A,G,N){var v=N(14);function h(){this.set={}}h.prototype.add=function(i){var r=v.createID(i);this.contains(r)||(this.set[r]=i)},h.prototype.remove=function(i){delete this.set[v.createID(i)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(i){return this.set[v.createID(i)]==i},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(i){for(var r=Object.keys(this.set),a=r.length,f=0;f<a;f++)i.push(this.set[r[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(i){for(var r=i.length,a=0;a<r;a++){var f=i[a];this.add(f)}},A.exports=h}),(function(A,G,N){function v(){}v.multMat=function(h,i){for(var r=[],a=0;a<h.length;a++){r[a]=[];for(var f=0;f<i[0].length;f++){r[a][f]=0;for(var e=0;e<h[0].length;e++)r[a][f]+=h[a][e]*i[e][f]}}return r},v.transpose=function(h){for(var i=[],r=0;r<h[0].length;r++){i[r]=[];for(var a=0;a<h.length;a++)i[r][a]=h[a][r]}return i},v.multCons=function(h,i){for(var r=[],a=0;a<h.length;a++)r[a]=h[a]*i;return r},v.minusOp=function(h,i){for(var r=[],a=0;a<h.length;a++)r[a]=h[a]-i[a];return r},v.dotProduct=function(h,i){for(var r=0,a=0;a<h.length;a++)r+=h[a]*i[a];return r},v.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},v.normalize=function(h){for(var i=[],r=this.mag(h),a=0;a<h.length;a++)i[a]=h[a]/r;return i},v.multGamma=function(h){for(var i=[],r=0,a=0;a<h.length;a++)r+=h[a];r*=-1/h.length;for(var f=0;f<h.length;f++)i[f]=r+h[f];return i},v.multL=function(h,i,r){for(var a=[],f=[],e=[],u=0;u<i[0].length;u++){for(var t=0,s=0;s<i.length;s++)t+=-.5*i[s][u]*h[s];f[u]=t}for(var o=0;o<r.length;o++){for(var c=0,l=0;l<r.length;l++)c+=r[o][l]*f[l];e[o]=c}for(var T=0;T<i.length;T++){for(var g=0,d=0;d<i[0].length;d++)g+=i[T][d]*e[d];a[T]=g}return a},A.exports=v}),(function(A,G,N){var v=(function(){function a(f,e){for(var u=0;u<e.length;u++){var t=e[u];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,e,u){return e&&a(f.prototype,e),u&&a(f,u),f}})();function h(a,f){if(!(a instanceof f))throw new TypeError("Cannot call a class as a function")}var i=N(11),r=(function(){function a(f,e){h(this,a),(e!==null||e!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var u=void 0;f instanceof i?u=f.size():u=f.length,this._quicksort(f,0,u-1)}return v(a,[{key:"_quicksort",value:function(e,u,t){if(u<t){var s=this._partition(e,u,t);this._quicksort(e,u,s),this._quicksort(e,s+1,t)}}},{key:"_partition",value:function(e,u,t){for(var s=this._get(e,u),o=u,c=t;;){for(;this.compareFunction(s,this._get(e,c));)c--;for(;this.compareFunction(this._get(e,o),s);)o++;if(o<c)this._swap(e,o,c),o++,c--;else return c}}},{key:"_get",value:function(e,u){return e instanceof i?e.get_object_at(u):e[u]}},{key:"_set",value:function(e,u,t){e instanceof i?e.set_object_at(u,t):e[u]=t}},{key:"_swap",value:function(e,u,t){var s=this._get(e,u);this._set(e,u,this._get(e,t)),this._set(e,t,s)}},{key:"_defaultCompareFunction",value:function(e,u){return u>e}}]),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;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.m,i]),this.V=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var r=(function(Tt){for(var Ct=[];Tt-- >0;)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<Math.max(e,u);t++){if(t<e){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=v.hypot(this.s[t],h[s][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)h[o][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<e,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=l*h[g][t]}r[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<e))for(var d=t;d<this.m;d++)this.U[d][t]=h[d][t];if(t<u){r[t]=0;for(var C=t+1;C<this.n;C++)r[t]=v.hypot(r[t],r[C]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var S=t+1;S<this.n;S++)r[S]/=r[t];r[t+1]+=1}if(r[t]=-r[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,r[t]!==0)){for(var w=t+1;w<this.m;w++)a[w]=0;for(var P=t+1;P<this.n;P++)for(var B=t+1;B<this.m;B++)a[B]+=r[P]*h[B][P];for(var U=t+1;U<this.n;U++)for(var V=-r[U]/r[t+1],M=t+1;M<this.m;M++)h[M][U]+=V*a[M]}for(var _=t+1;_<this.n;_++)this.V[_][t]=r[_]}}var n=Math.min(this.n,this.m+1);e<this.n&&(this.s[e]=h[e][e]),this.m<n&&(this.s[n-1]=0),u+1<n&&(r[u]=h[u][n-1]),r[n-1]=0;{for(var E=e;E<i;E++){for(var p=0;p<this.m;p++)this.U[p][E]=0;this.U[E][E]=1}for(var m=e-1;m>=0;m--)if(this.s[m]!==0){for(var y=m+1;y<i;y++){for(var I=0,O=m;O<this.m;O++)I+=this.U[O][m]*this.U[O][y];I=-I/this.U[m][m];for(var R=m;R<this.m;R++)this.U[R][y]+=I*this.U[R][m]}for(var W=m;W<this.m;W++)this.U[W][m]=-this.U[W][m];this.U[m][m]=1+this.U[m][m];for(var x=0;x<m-1;x++)this.U[x][m]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][m]=0;this.U[m][m]=1}}for(var z=this.n-1;z>=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z<u,r[z]!==0))for(var X=z+1;X<i;X++){for(var rt=0,$=z+1;$<this.n;$++)rt+=this.V[$][z]*this.V[$][X];rt=-rt/this.V[z+1][z];for(var D=z+1;D<this.n;D++)this.V[D][X]+=rt*this.V[D][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var k=n-1,tt=Math.pow(2,-52),ht=Math.pow(2,-966);n>0;){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.n;mt++)Et=wt*this.V[mt][ut]+Ot*this.V[mt][n-1],this.V[mt][n-1]=-Ot*this.V[mt][ut]+wt*this.V[mt][n-1],this.V[mt][ut]=Et}}break;case 2:{var Dt=r[J-1];r[J-1]=0;for(var Rt=J;Rt<n;Rt++){var Ht=v.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*r[Rt],r[Rt]=Ut*r[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][J-1],this.U[Ft][J-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][J-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(r[n-2])),Math.abs(this.s[J])),Math.abs(r[J])),Vt=this.s[n-1]/Yt,F=this.s[n-2]/Yt,Y=r[n-2]/Yt,Z=this.s[J]/Yt,K=r[J]/Yt,q=((F+Vt)*(F-Vt)+Y*Y)/2,at=Vt*Y*(Vt*Y),ct=0;(function(Tt,Ct){return Tt||Ct})(q!==0,at!==0)&&(ct=Math.sqrt(q*q+at),q<0&&(ct=-ct),ct=at/(q+ct));for(var nt=(Z+Vt)*(Z-Vt)+ct,et=Z*K,j=J;j<n-1;j++){var dt=v.hypot(nt,et),At=nt/dt,pt=et/dt;j!==J&&(r[j-1]=dt),nt=At*this.s[j]+pt*r[j],r[j]=At*r[j]-pt*this.s[j],et=pt*this.s[j+1],this.s[j+1]=At*this.s[j+1];for(var xt=0;xt<this.n;xt++)dt=At*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+At*this.V[xt][j+1],this.V[xt][j]=dt;if(dt=v.hypot(nt,et),At=nt/dt,pt=et/dt,this.s[j]=dt,nt=At*r[j]+pt*this.s[j+1],this.s[j+1]=-pt*r[j]+At*this.s[j+1],et=pt*r[j+1],r[j+1]=At*r[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)dt=At*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+At*this.U[lt][j+1],this.U[lt][j]=dt}r[n-2]=nt}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var ot=0;ot<=k;ot++)this.V[ot][J]=-this.V[ot][J]}for(;J<k&&!(this.s[J]>=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,J<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][J+1],this.V[ft][J+1]=this.V[ft][J],this.V[ft][J]=Lt;if(J<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][J+1],this.U[st][J+1]=this.U[st][J],this.U[st][J]=Lt;J++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},v.hypot=function(h,i){var r=void 0;return Math.abs(h)>Math.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;e<f.length;e++){var u=f[e];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(a,u.key,u)}}return function(a,f,e){return f&&r(a.prototype,f),e&&r(a,e),a}})();function h(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var i=(function(){function r(a,f){var e=arguments.length>2&&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<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(r,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var u=1;u<this.iMax;u++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[u-1]===this.sequence2[t-1]?s=this.grid[u-1][t-1]+this.match_score:s=this.grid[u-1][t-1]+this.mismatch_penalty;var o=this.grid[u-1][t]+this.gap_penalty,c=this.grid[u][t-1]+this.gap_penalty,l=[s,o,c],T=this.arrayAllMaxIndexes(l);this.grid[u][t]=l[T[0]],this.tracebackGrid[u][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var e=f[0],u=this.tracebackGrid[e.pos[0]][e.pos[1]];u[0]&&f.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),u[1]&&f.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),u[2]&&f.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),e.pos[0]===0&&e.pos[1]===0&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,e){for(var u=[],t=-1;(t=f.indexOf(e,t+1))!==-1;)u.push(t);return u}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),r})();A.exports=i}),(function(A,G,N){var v=function(){};v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),A.exports=v}),(function(A,G,N){function v(){this.listeners=[]}var h=v.prototype;h.addListener=function(i,r){this.listeners.push({event:i,callback:r})},h.removeListener=function(i,r){for(var a=this.listeners.length;a>=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<this.listeners.length;a++){var f=this.listeners[a];i===f.event&&f.callback(r)}},A.exports=v})])})})(le)),le.exports}var dr=he.exports,Oe;function vr(){return Oe||(Oe=1,(function(L,b){(function(G,N){L.exports=N(ur())})(dr,function(A){return(()=>{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;p<n.length;p++){var m=n[p].rect,y=n[p].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},M.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},M.prototype.moveNodes=function(){for(var n=this.getAllNodes(),E,p=0;p<n.length;p++)E=n[p],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)E=n[p],E.move()},M.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),p=0;p<E.length;p++){var m=E[p];this.idToNodeMap.set(m.id,m)}var y=function D(H){for(var k=H.getChild().getNodes(),tt,ht=0,J=0;J<k.length;J++)tt=k[J],tt.getChild()==null?n.fixedNodeSet.has(tt.id)&&(ht+=100):ht+=D(tt);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(k){n.fixedNodeSet.add(k.nodeId)});for(var E=this.graphManager.getAllNodes(),m,p=0;p<E.length;p++)if(m=E[p],m.getChild()!=null){var I=y(m);I>0&&(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<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){O.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){R.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var H,k,tt;for(tt=D.length-1;tt>=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;p<E.length;p++){for(var m=0,y=0;y<E[p].length;y++){if(this.fixedNodeSet.has(E[p][y])){m=0;break}m+=this.idToNodeMap.get(E[p][y]).displacementX}for(var I=m/E[p].length,y=0;y<E[p].length;y++)this.idToNodeMap.get(E[p][y]).displacementX=I}if(this.constraints.alignmentConstraint.horizontal)for(var O=this.constraints.alignmentConstraint.horizontal,p=0;p<O.length;p++){for(var R=0,y=0;y<O[p].length;y++){if(this.fixedNodeSet.has(O[p][y])){R=0;break}R+=this.idToNodeMap.get(O[p][y]).displacementY}for(var W=R/O[p].length,y=0;y<O[p].length;y++)this.idToNodeMap.get(O[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var D=0;n.dummyToNodeForVerticalAlignment.has($)?D=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).displacementX:D=n.idToNodeMap.get($).displacementX,n.nodeToRelativeConstraintMapHorizontal.get($).forEach(function(H){if(H.right){var k=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=n.nodeToTempPositionMapHorizontal.get($)-n.nodeToTempPositionMapHorizontal.get(H.left)+D;k<H.gap&&(D+=H.gap-k)}}),n.nodeToTempPositionMapHorizontal.set($,n.nodeToTempPositionMapHorizontal.get($)+D),n.dummyToNodeForVerticalAlignment.has($)?n.dummyToNodeForVerticalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementX=D}):n.idToNodeMap.get($).displacementX=D}}),this.nodesInRelativeVertical.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var D=0;n.dummyToNodeForHorizontalAlignment.has($)?D=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get($)[0]).displacementY:D=n.idToNodeMap.get($).displacementY,n.nodeToRelativeConstraintMapVertical.get($).forEach(function(H){if(H.bottom){var k=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=n.nodeToTempPositionMapVertical.get($)-n.nodeToTempPositionMapVertical.get(H.top)+D;k<H.gap&&(D+=H.gap-k)}}),n.nodeToTempPositionMapVertical.set($,n.nodeToTempPositionMapVertical.get($)+D),n.dummyToNodeForHorizontalAlignment.has($)?n.dummyToNodeForHorizontalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementY=D}):n.idToNodeMap.get($).displacementY=D}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var X=this.dummyToNodeForVerticalAlignment.get(x[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else Q+=this.idToNodeMap.get(x[y]).displacementX,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=rt}):this.idToNodeMap.get(x[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(k){n.idToNodeMap.get(k).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var X=this.dummyToNodeForHorizontalAlignment.get(x[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else Q+=this.idToNodeMap.get(x[y]).displacementY,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(J){n.idToNodeMap.get(J).displacementY=rt}):this.idToNodeMap.get(x[y]).displacementY=rt}}}},M.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],E,p=this.graphManager.getGraphs(),m=p.length,y;for(y=0;y<m;y++)E=p[y],E.updateConnected(),E.isConnected||(n=n.concat(E.getNodes()));return n},M.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var E=new Set,p;for(p=0;p<n.length;p++){var m=n[p];if(!E.has(m)){var y=m.getSource(),I=m.getTarget();if(y==I)m.getBendpoints().push(new d),m.getBendpoints().push(new d),this.createDummyNodesForBendpoints(m),E.add(m);else{var O=[];if(O=O.concat(y.getEdgeListToNode(I)),O=O.concat(I.getEdgeListToNode(y)),!E.has(O[0])){if(O.length>1){var R;for(R=0;R<O.length;R++){var W=O[R];W.getBendpoints().push(new d),this.createDummyNodesForBendpoints(W)}}O.forEach(function(x){E.add(x)})}}}if(E.size==n.length)break}},M.prototype.positionNodesRadially=function(n){for(var E=new g(0,0),p=Math.ceil(Math.sqrt(n.length)),m=0,y=0,I=0,O=new d(0,0),R=0;R<n.length;R++){R%p==0&&(I=0,y=m,R!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),m=0);var W=n[R],x=S.findCenterOfTree(W);E.x=I,E.y=y,O=M.radialLayout(W,x,E),O.y>m&&(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;O<n.length;O++){var R=n[O];R.transform(I)}var W=new d(y.getMaxX(),y.getMaxY());return I.inverseTransformPoint(W)},M.branchRadialLayout=function(n,E,p,m,y,I){var O=(m-p+1)/2;O<0&&(O+=180);var R=(O+p)%360,W=R*P.TWO_PI/360,x=y*Math.cos(W),Q=y*Math.sin(W);n.setCenter(x,Q);var z=[];z=z.concat(n.getEdges());var X=z.length;E!=null&&X--;for(var rt=0,$=z.length,D,H=n.getEdgesBetween(E);H.length>1;){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;p<n.length;p++){var m=n[p],y=m.getDiagonal();y>E&&(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<m.length;y++){var I=m[y],O=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(O.id==null||!this.getToBeTiled(O))&&p.push(I)}for(var y=0;y<p.length;y++){var I=p[y],R=I.getParent().id;typeof E[R]>"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;$<E[W].length;$++){var D=E[W][$];rt.remove(D),X.add(D)}}})},M.prototype.clearCompounds=function(){var n={},E={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)E[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,E)},M.prototype.clearZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var m=n.idToDummyNode[p];if(E[p]=n.tileNodes(n.memberGroups[p],m.paddingLeft+m.paddingRight),m.rect.width=E[p].width,m.rect.height=E[p].height,m.setCenter(E[p].centerX,E[p].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=m.rect.width,I=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(y+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>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;y<m.length;y++){var I=m[y];if(this.getNodeDegree(I)>0)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;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},M.prototype.getNodeDegreeWithChildren=function(n){var E=this.getNodeDegree(n);if(n.getChild()==null)return E;for(var p=n.getChild().getNodes(),m=0;m<p.length;m++){var y=p[m];E+=this.getNodeDegreeWithChildren(y)}return E},M.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},M.prototype.fillCompexOrderByDFS=function(n){for(var E=0;E<n.length;E++){var p=n[E];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},M.prototype.adjustLocations=function(n,E,p,m,y,I,O){E+=m+I,p+=y+O;for(var R=E,W=0;W<n.rows.length;W++){var x=n.rows[W];E=R;for(var Q=0,z=0;z<x.length;z++){var X=x[z];X.rect.x=E,X.rect.y=p,E+=X.rect.width+n.horizontalPadding,X.rect.height>Q&&(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 I<y?O=m:O=p,O},M.prototype.getOrgRatio=function(n){var E=n.width,p=n.height,m=E/p;return m<1&&(m=1/m),m},M.prototype.calcIdealRowWidth=function(n,E){var p=o.TILING_PADDING_VERTICAL,m=o.TILING_PADDING_HORIZONTAL,y=n.length,I=0,O=0,R=0;n.forEach(function($){I+=$.getWidth(),O+=$.getHeight(),$.getWidth()>R&&(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;z<n.length;z++){var X=n[z];x+=X.getCenterX(),Q+=X.getCenterY()}O.centerX=x/n.length,O.centerY=Q/n.length;for(var z=0;z<n.length;z++){var X=n[z];if(O.rows.length==0)this.insertNodeToRow(O,X,0,E);else if(this.canAddHorizontal(O,X.rect.width,X.rect.height)){var rt=O.rows.length-1;O.idealRowWidth||(rt=this.getShortestRowIndex(O)),this.insertNodeToRow(O,X,rt,E)}else this.insertNodeToRow(O,X,O.rows.length,E);this.shiftToLastRow(O)}return O},M.prototype.insertNodeToRow=function(n,E,p,m){var y=m;if(p==n.rows.length){var I=[];n.rows.push(I),n.rowWidth.push(y),n.rowHeight.push(0)}var O=n.rowWidth[p]+E.rect.width;n.rows[p].length>0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,n.width<O&&(n.width=O);var R=E.rect.height;p>0&&(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;m<n.rows.length;m++)n.rowWidth[m]<p&&(E=m,p=n.rowWidth[m]);return E},M.prototype.getLongestRowIndex=function(n){for(var E=-1,p=Number.MIN_VALUE,m=0;m<n.rows.length;m++)n.rowWidth[m]>p&&(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]<p&&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.width<E?x=(n.height+R)/E:x=(n.height+R)/n.width,x<1&&(x=1/x),W<1&&(W=1/W),W<x},M.prototype.shiftToLastRow=function(n){var E=this.getLongestRowIndex(n),p=n.rowWidth.length-1,m=n.rows[E],y=m[m.length-1],I=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>I&&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;R<m.length;R++)m[R].height>O&&(O=m[R].height);E>0&&(O+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=O,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var x=n.rowHeight[E]+n.rowHeight[p];n.height+=x-W,this.shiftToLastRow(n)}},M.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},M.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},M.prototype.reduceTrees=function(){for(var n=[],E=!0,p;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var I=0;I<m.length;I++)if(p=m[I],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var O=p.getEdges()[0].getOtherEnd(p),R=new C(p.getCenterX()-O.getCenterX(),p.getCenterY()-O.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),R])}else y.push([p,p.getEdges()[0],p.getOwner()]);E=!0}if(E==!0){for(var W=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(W.push(y[x]),y[x][0].getOwner().remove(y[x][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},M.prototype.growTree=function(n){for(var E=n.length,p=n[E-1],m,y=0;y<p.length;y++)m=p[y],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},M.prototype.findPlaceforPrunedNode=function(n){var E,p,m=n[0];if(m==n[1].source?p=n[1].target:p=n[1].source,o.PURE_INCREMENTAL)m.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,I=p.finishX,O=p.startY,R=p.finishY,W=0,x=0,Q=0,z=0,X=[W,Q,x,z];if(O>0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(I<this.grid.length-1)for(var rt=O;rt<=R;rt++)X[1]+=this.grid[I+1][rt].length+this.grid[I][rt].length-1;if(R<this.grid[0].length-1)for(var rt=y;rt<=I;rt++)X[2]+=this.grid[rt][R+1].length+this.grid[rt][R].length-1;if(y>0)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<X.length;k++)X[k]<$?($=X[k],D=1,H=k):X[k]==$&&D++;if(D==3&&$==0)X[0]==0&&X[1]==0&&X[2]==0?E=1:X[0]==0&&X[1]==0&&X[3]==0?E=0:X[0]==0&&X[2]==0&&X[3]==0?E=3:X[1]==0&&X[2]==0&&X[3]==0&&(E=2);else if(D==2&&$==0){var tt=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?tt==0?E=0:E=1:X[0]==0&&X[2]==0?tt==0?E=0:E=2:X[0]==0&&X[3]==0?tt==0?E=0:E=3:X[1]==0&&X[2]==0?tt==0?E=1:E=2:X[1]==0&&X[3]==0?tt==0?E=1:E=3:tt==0?E=2:E=3}else if(D==4&&$==0){var tt=Math.floor(Math.random()*4);E=tt}else E=H;E==0?m.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+m.getWidth()/2,p.getCenterY()):E==2?m.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-m.getWidth()/2,p.getCenterY())}},i.exports=M}),991:((i,r,a)=>{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<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=s,l.displacementY+=o):l.propogateDisplacementToChildren(s,o)},u.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.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},u.prototype.setPred1=function(s){this.pred1=s},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(s){this.next=s},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(s){this.processed=s},u.prototype.isProcessed=function(){return processed},i.exports=u}),902:((i,r,a)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var e=a(806),u=a(551).LinkedList,t=a(551).Matrix,s=a(551).SVD;function o(){}o.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,d=[],C=[],S=c.getAllNodes(),w=0,P=0;P<S.length;P++){var B=S[P];B.getChild()==null&&(g.set(B.id,w++),d.push(B.getCenterX()),C.push(B.getCenterY()),T.set(B.id,B))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(F){!F.gap&&F.gap!=0&&(F.left?F.gap=e.DEFAULT_EDGE_LENGTH+T.get(F.left).getWidth()/2+T.get(F.right).getWidth()/2:F.gap=e.DEFAULT_EDGE_LENGTH+T.get(F.top).getHeight()/2+T.get(F.bottom).getHeight()/2)});var U=function(Y,Z){return{x:Y.x-Z.x,y:Y.y-Z.y}},V=function(Y){var Z=0,K=0;return Y.forEach(function(q){Z+=d[g.get(q)],K+=C[g.get(q)]}),{x:Z/Y.size,y:K/Y.size}},M=function(Y,Z,K,q,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt.add(Bt)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;Y.forEach(function(lt,ot){nt.set(ot,0)}),Y.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var et=new Map,j=new Map,dt=new u;nt.forEach(function(lt,ot){lt==0?(dt.push(ot),K||(Z=="horizontal"?et.set(ot,g.has(ot)?d[g.get(ot)]:q.get(ot)):et.set(ot,g.has(ot)?C[g.get(ot)]:q.get(ot)))):et.set(ot,Number.NEGATIVE_INFINITY),K&&j.set(ot,new Set([ot]))}),K&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){K.has(st)&&ot.push(st)}),ot.length>0){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)<et.get(ot)+ft.gap)if(K&&K.has(ft.id)){var st=void 0;if(Z=="horizontal"?st=g.has(ft.id)?d[g.get(ft.id)]:q.get(ft.id):st=g.has(ft.id)?C[g.get(ft.id)]:q.get(ft.id),et.set(ft.id,st),st<et.get(ot)+ft.gap){var Xt=et.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){et.set(Tt,et.get(Tt)-Xt)})}}else et.set(ft.id,et.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&dt.push(ft.id),K&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};dt.length!=0;)At();if(K){var pt=new Set;Y.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;K.has(Bt)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(lt))[0])&&(bt=!0,zt=kt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,Bt=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;Z=="horizontal"?kt=g.has(St)?d[g.get(St)]:q.get(St):kt=g.has(St)?C[g.get(St)]:q.get(St);var Kt=et.get(St);kt<Lt&&(Lt=kt),kt>st&&(st=kt),Kt<ft&&(ft=Kt),Kt>Xt&&(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;ct<g.size;ct++)d[ct]=-1*d[ct],C[ct]=-1*C[ct];else if(Z>K)for(var nt=0;nt<g.size;nt++)d[nt]=-1*d[nt];else if(q>at)for(var et=0;et<g.size;et++)C[et]=-1*C[et]},n=function(Y){var Z=[],K=new u,q=new Set,at=0;return Y.forEach(function(ct,nt){if(!q.has(nt)){Z[at]=[];var et=nt;for(K.push(et),q.add(et),Z[at].push(et);K.length!=0;){et=K.shift();var j=Y.get(et);j.forEach(function(dt){q.has(dt.id)||(K.push(dt.id),q.add(dt.id),Z[at].push(dt.id))})}at++}}),Z},E=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(q).push(at),Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},p=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},m=[],y=[],I=!1,O=!1,R=new Set,W=new Map,x=new Map,Q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(F){R.add(F.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(F){F.left?(W.has(F.left)?W.get(F.left).push({id:F.right,gap:F.gap,direction:"horizontal"}):W.set(F.left,[{id:F.right,gap:F.gap,direction:"horizontal"}]),W.has(F.right)||W.set(F.right,[])):(W.has(F.top)?W.get(F.top).push({id:F.bottom,gap:F.gap,direction:"vertical"}):W.set(F.top,[{id:F.bottom,gap:F.gap,direction:"vertical"}]),W.has(F.bottom)||W.set(F.bottom,[]))}),x=E(W),Q=n(x)),e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)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;K<Y.length;K++)Z(K);I=!0}if(l.alignmentConstraint.horizontal){for(var q=l.alignmentConstraint.horizontal,at=function(et){var j=new Set;q[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).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;ct<q.length;ct++)at(ct);I=!0}l.relativePlacementConstraint&&(O=!0)})();else if(l.relativePlacementConstraint){for(var z=0,X=0,rt=0;rt<Q.length;rt++)Q[rt].length>z&&(z=Q[rt].length,X=rt);if(z<x.size/2)_(l.relativePlacementConstraint),I=!1,O=!1;else{var $=new Map,D=new Map,H=[];Q[X].forEach(function(F){W.get(F).forEach(function(Y){Y.direction=="horizontal"?($.has(F)?$.get(F).push(Y):$.set(F,[Y]),$.has(Y.id)||$.set(Y.id,[]),H.push({left:F,right:Y.id})):(D.has(F)?D.get(F).push(Y):D.set(F,[Y]),D.has(Y.id)||D.set(Y.id,[]),H.push({top:F,bottom:Y.id}))})}),_(H),O=!1;var k=M($,"horizontal"),tt=M(D,"vertical");Q[X].forEach(function(F,Y){y[Y]=[d[g.get(F)],C[g.get(F)]],m[Y]=[],k.has(F)?m[Y][0]=k.get(F):m[Y][0]=d[g.get(F)],tt.has(F)?m[Y][1]=tt.get(F):m[Y][1]=C[g.get(F)]}),I=!0}}if(I){for(var ht=void 0,J=t.transpose(m),It=t.transpose(y),Nt=0;Nt<J.length;Nt++)J[Nt]=t.multGamma(J[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(J,t.transpose(It)),it=s.svd(vt);ht=t.multMat(it.V,t.transpose(it.U));for(var ut=0;ut<g.size;ut++){var Et=[d[ut],C[ut]],wt=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];d[ut]=t.dotProduct(Et,wt),C[ut]=t.dotProduct(Et,Ot)}O&&_(l.relativePlacementConstraint)}}if(e.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){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;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(Y){var Z=new Set;Ut[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=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<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var F=new Map,Y=new Map,Z=new Map,K=new Map,q=new Map,at=new Map,ct=new Set,nt=new Set;if(R.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var et=l.alignmentConstraint.vertical,j=function(yt){Z.set("dummy"+yt,[]),et[yt].forEach(function(Mt){F.set(Mt,"dummy"+yt),Z.get("dummy"+yt).push(Mt),R.has(Mt)&&ct.add("dummy"+yt)}),q.set("dummy"+yt,d[g.get(et[yt][0])])},dt=0;dt<et.length;dt++)j(dt);if(l.alignmentConstraint.horizontal)for(var At=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),At[yt].forEach(function(Mt){Y.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),R.has(Mt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,C[g.get(At[yt][0])])},xt=0;xt<At.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var Zt=void 0,$t=void 0;Mt.direction=="horizontal"?(Zt=F.get(yt)?F.get(yt):yt,F.get(Mt.id)?$t={id:F.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,lt.has(Zt)?lt.get(Zt).push($t):lt.set(Zt,[$t]),lt.has($t.id)||lt.set($t.id,[])):(Zt=Y.get(yt)?Y.get(yt):yt,Y.get(Mt.id)?$t={id:Y.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,ot.has(Zt)?ot.get(Zt).push($t):ot.set(Zt,[$t]),ot.has($t.id)||ot.set($t.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt(Bt)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=E(lt),zt=E(ot),St=n(bt),kt=n(zt),Kt=p(lt),fe=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(Mt){fe.get(Mt).length==0&&jt[yt].push(Mt)})});var _t=M(lt,"horizontal",ct,q,Qt),Jt=M(ot,"vertical",nt,at,jt),ne=function(yt){Z.get(yt)?Z.get(yt).forEach(function(Mt){d[g.get(Mt)]=_t.get(yt)}):d[g.get(yt)]=_t.get(yt)},te=!0,ee=!1,Ne=void 0;try{for(var ce=_t.keys()[Symbol.iterator](),Le;!(te=(Le=ce.next()).done);te=!0){var ge=Le.value;ne(ge)}}catch(Gt){ee=!0,Ne=Gt}finally{try{!te&&ce.return&&ce.return()}finally{if(ee)throw Ne}}var $e=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){C[g.get(Mt)]=Jt.get(yt)}):C[g.get(yt)]=Jt.get(yt)},ue=!0,Ce=!1,we=void 0;try{for(var de=Jt.keys()[Symbol.iterator](),Ae;!(ue=(Ae=de.next()).done);ue=!0){var ge=Ae.value;$e(ge)}}catch(Gt){Ce=!0,we=Gt}finally{try{!ue&&de.return&&de.return()}finally{if(Ce)throw we}}})()}for(var Yt=0;Yt<S.length;Yt++){var Vt=S[Yt];Vt.getChild()==null&&Vt.setCenter(d[g.get(Vt.id)],C[g.get(Vt.id)])}},i.exports=o}),551:(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(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<a;e++)f[e-1]=arguments[e];return f.forEach(function(u){Object.keys(u).forEach(function(t){return r[t]=u[t]})}),r}}),548:((i,r,a)=>{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;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var g=l.parent()[0];g!=null;){if(s[g.id()])return!1;g=g.parent()[0]}return!0});return c},u.connectComponents=function(t,s,o,c){var l=new e,T=new Set,g=[],d=void 0,C=void 0,S=void 0,w=!1,P=1,B=[],U=[],V=function(){var _=t.collection();U.push(_);var n=o[0],E=t.collection();E.merge(n).merge(n.descendants().intersection(s)),g.push(n),E.forEach(function(y){l.push(y),T.add(y),_.merge(y)});for(var p=function(){n=l.shift();var I=t.collection();n.neighborhood().nodes().forEach(function(x){s.intersection(n.edgesWith(x)).length>0&&I.merge(x)});for(var O=0;O<I.length;O++){var R=I[O];if(d=o.intersection(R.union(R.ancestors())),d!=null&&!T.has(d[0])){var W=d.union(d.descendants());W.forEach(function(x){l.push(x),T.add(x),_.merge(x),o.has(x)&&g.push(x)})}}};l.length!=0;)p();if(_.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(I){_.has(I.source())&&_.has(I.target())&&_.merge(I)})}),g.length==o.length&&(w=!0),!w||w&&P>1){C=g[0],S=C.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<S&&(S=y.connectedEdges().length,C=y)}),B.push(C.id());var m=t.collection();m.merge(g[0]),g.forEach(function(y){m.merge(y)}),g=[],o=o.difference(m),P++}};do V();while(!w);return c&&B.length>0&&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;E<c&&(c=E),p>l&&(l=p),m<T&&(T=m),y>g&&(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;z<c&&(c=z),X>l&&(l=X),rt<T&&(T=rt),$>g&&(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;V<U;V++){var M=B[V];C=s[c.get(M.id())]-M.width()/2,S=s[c.get(M.id())]+M.width()/2,w=o[c.get(M.id())]-M.height()/2,P=o[c.get(M.id())]+M.height()/2,l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var _={};return _.topLeftX=l,_.topLeftY=g,_.width=T-l,_.height=d-g,_},u.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||o.merge(c)}),o},i.exports=u}),816:((i,r,a)=>{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;$<rt;$++){var D=Q[$],H=null;D.intersection(p).length==0&&(H=D.children());var k=void 0,tt=D.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(D.outerWidth()!=null&&D.outerHeight()!=null)if(X.randomize)if(!D.isParent())k=x.add(new u(z.graphManager,new t(V[U.get(D.id())]-tt.w/2,M[U.get(D.id())]-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else{var ht=f.calcBoundingBox(D,V,M,U);D.intersection(p).length==0?k=x.add(new u(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(ht.width,ht.height))):k=x.add(new u(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(parseFloat(tt.w),parseFloat(tt.h))))}else k=x.add(new u(z.graphManager,new t(D.position("x")-tt.w/2,D.position("y")-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else k=x.add(new u(this.graphManager));if(k.id=D.data("id"),k.nodeRepulsion=E(X.nodeRepulsion,D),k.paddingLeft=parseInt(D.css("padding")),k.paddingTop=parseInt(D.css("padding")),k.paddingRight=parseInt(D.css("padding")),k.paddingBottom=parseInt(D.css("padding")),X.nodeDimensionsIncludeLabels&&(k.labelWidth=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,k.labelHeight=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,k.labelPosVertical=D.css("text-valign"),k.labelPosHorizontal=D.css("text-halign")),_[D.data("id")]=k,isNaN(k.rect.x)&&(k.rect.x=0),isNaN(k.rect.y)&&(k.rect.y=0),H!=null&&H.length>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;$<z.length;$++){var D=z[$],H=_[D.data("source")],k=_[D.data("target")];if(H&&k&&H!==k&&H.getEdgesBetween(k).length==0){var tt=Q.add(x.newEdge(),H,k);tt.id=D.id(),tt.idealLength=E(d.idealEdgeLength,D),tt.edgeElasticity=E(d.edgeElasticity,D),X+=tt.idealLength,rt++}}d.idealEdgeLength!=null&&(rt>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;w<S.length;w++){var P=S[w];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(C,P.key,P)}}return function(C,S,w){return S&&d(C.prototype,S),w&&d(C,w),C}})();function e(d,C){if(!(d instanceof C))throw new TypeError("Cannot call a class as a function")}var u=a(658),t=a(548),s=a(657),o=s.spectralLayout,c=a(816),l=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(C){return 4500},idealEdgeLength:function(C){return 50},edgeElasticity:function(C){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=(function(){function d(C){e(this,d),this.options=u({},T,C)}return f(d,[{key:"run",value:function(){var S=this,w=this.options,P=w.cy,B=w.eles,U=[],V=[],M=void 0,_=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var n=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;n&&(w.tile=!1,w.packComponents=!1);var E=void 0,p=!1;if(P.layoutUtilities&&w.packComponents&&(E=P.layoutUtilities("get"),E||(E=P.layoutUtilities()),p=!0),B.nodes().length>0)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<R;){Y=Math.floor(Math.random()*E),K=!1;for(var q=0;q<Z;q++)if(U[q]==Y){K=!0;break}if(!K)U[Z]=Y,Z++;else continue}},x=function(Y,Z,K){for(var q=[],at=0,ct=0,nt=0,et=void 0,j=[],dt=0,At=1,pt=0;pt<E;pt++)j[pt]=p;for(q[ct]=Y,j[Y]=0;ct>=at;){nt=q[at++];for(var xt=w[nt],lt=0;lt<xt.length;lt++)et=C.get(xt[lt]),j[et]==p&&(j[et]=j[nt]+1,q[++ct]=et);M[nt][Z]=j[nt]*O}if(K){for(var ot=0;ot<E;ot++)M[ot][Z]<V[ot]&&(V[ot]=M[ot][Z]);for(var Lt=0;Lt<E;Lt++)V[Lt]>dt&&(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<E;q++)V[q]=p;for(var at=0;at<R;at++)U[at]=Z,Z=x(Z,at,Y)}else{W();for(var K=0;K<R;K++)x(U[K],K,Y)}for(var ct=0;ct<E;ct++)for(var nt=0;nt<R;nt++)M[ct][nt]*=M[ct][nt];for(var et=0;et<R;et++)_[et]=[];for(var j=0;j<R;j++)for(var dt=0;dt<R;dt++)_[j][dt]=M[U[dt]][j]},z=function(){for(var Y=u.svd(_),Z=Y.S,K=Y.U,q=Y.V,at=Z[0]*Z[0]*Z[0],ct=[],nt=0;nt<R;nt++){ct[nt]=[];for(var et=0;et<R;et++)ct[nt][et]=0,nt==et&&(ct[nt][et]=Z[nt]/(Z[nt]*Z[nt]+at/(Z[nt]*Z[nt])))}n=e.multMat(e.multMat(q,ct),e.transpose(K))},X=function(){for(var Y=void 0,Z=void 0,K=[],q=[],at=[],ct=[],nt=0;nt<E;nt++)K[nt]=Math.random(),q[nt]=Math.random();K=e.normalize(K),q=e.normalize(q);for(var et=m,j=m,dt=void 0;;){for(var At=0;At<E;At++)at[At]=K[At];if(K=e.multGamma(e.multL(e.multGamma(at),M,n)),Y=e.dotProduct(at,K),K=e.normalize(K),et=e.dotProduct(at,K),dt=Math.abs(et/j),dt<=1+y&&dt>=1)break;j=et}for(var pt=0;pt<E;pt++)at[pt]=K[pt];for(j=m;;){for(var xt=0;xt<E;xt++)ct[xt]=q[xt];if(ct=e.minusOp(ct,e.multCons(at,e.dotProduct(at,ct))),q=e.multGamma(e.multL(e.multGamma(ct),M,n)),Z=e.dotProduct(ct,q),q=e.normalize(q),et=e.dotProduct(ct,q),dt=Math.abs(et/j),dt<=1+y&&dt>=1)break;j=et}for(var lt=0;lt<E;lt++)ct[lt]=q[lt];P=e.multCons(at,Math.sqrt(Math.abs(Y))),B=e.multCons(ct,Math.sqrt(Math.abs(Z)))};f.connectComponents(c,l,f.getTopMostNodes(T),d),g.forEach(function(F){f.connectComponents(c,l,f.getTopMostNodes(F.descendants().intersection(l)),d)});for(var rt=0,$=0;$<T.length;$++)T[$].isParent()||C.set(T[$].id(),rt++);var D=!0,H=!1,k=void 0;try{for(var tt=d.keys()[Symbol.iterator](),ht;!(D=(ht=tt.next()).done);D=!0){var J=ht.value;C.set(J,rt++)}}catch(F){H=!0,k=F}finally{try{!D&&tt.return&&tt.return()}finally{if(H)throw k}}for(var It=0;It<C.size;It++)w[It]=[];g.forEach(function(F){for(var Y=F.children().intersection(l);Y.nodes(":childless").length==0;)Y=Y.nodes()[0].children().intersection(l);var Z=0,K=Y.nodes(":childless")[0].connectedEdges().length;Y.nodes(":childless").forEach(function(q,at){q.connectedEdges().length<K&&(K=q.connectedEdges().length,Z=at)}),S.set(F.id(),Y.nodes(":childless")[Z].id())}),T.forEach(function(F){var Y=void 0;F.isParent()?Y=C.get(S.get(F.id())):Y=C.get(F.id()),F.neighborhood().nodes().forEach(function(Z){l.intersection(F.edgesWith(Z)).length>0&&(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<o.sampleSize?E:o.sampleSize;for(var Dt=0;Dt<E;Dt++)M[Dt]=[];for(var Rt=0;Rt<R;Rt++)n[Rt]=[];return o.quality=="draft"||o.step=="all"?(Q(I),z(),X(),mt={nodeIndexes:C,xCoords:P,yCoords:B}):(C.forEach(function(F,Y){P.push(c.getElementById(Y).position("x")),B.push(c.getElementById(Y).position("y"))}),mt={nodeIndexes:C,xCoords:P,yCoords:B}),mt}else{var Ht=C.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(P.push(Pt.x),B.push(Pt.y),E==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();P.push(Pt.x+Ft/2+Vt/2+o.idealEdgeLength),B.push(Pt.y)}return mt={nodeIndexes:C,xCoords:P,yCoords:B},mt}};i.exports={spectralLayout:t}}),579:((i,r,a)=>{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-DbZfwKqi.js b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-Cp3c1EWu.js similarity index 99% rename from apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-DbZfwKqi.js rename to apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-Cp3c1EWu.js index 8df2b8d81..64eddae6d 100644 --- a/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-DbZfwKqi.js +++ b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-Cp3c1EWu.js @@ -1,4 +1,4 @@ -import{g as de}from"./chunk-5VM5RSS4-BgO5oPj2.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-DHQD1STq.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-CCgkeAox.js";import"./index-CgXirkUy.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.length;s++){const i=a[s];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function er(e,t){const a=t.valueOf().length;for(const s in t)Object.hasOwn(t,s)&&(Number.isNaN(Number(s))||Number(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-D5nhu_pI.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-DpBz6UHc.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-DPT3_xql.js";import"./index-_5lXYMaO.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.length;s++){const i=a[s];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function er(e,t){const a=t.valueOf().length;for(const s in t)Object.hasOwn(t,s)&&(Number.isNaN(Number(s))||Number(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-D9CNQmKj.js b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Dus3HzI2.js similarity index 99% rename from apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-D9CNQmKj.js rename to apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Dus3HzI2.js index 16eb2240c..d4d8cfc8c 100644 --- a/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-D9CNQmKj.js +++ b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Dus3HzI2.js @@ -1,4 +1,4 @@ -import{g as Oe,d as Re}from"./chunk-32BRIVSS-BjbI6vv4.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-DHQD1STq.js";import"./index-CgXirkUy.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-Dx199TNh.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-DpBz6UHc.js";import"./index-_5lXYMaO.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-CCgkeAox.js b/apps/kimi-code/dist-web/assets/channel-CCgkeAox.js deleted file mode 100644 index e6b61c30a..000000000 --- a/apps/kimi-code/dist-web/assets/channel-CCgkeAox.js +++ /dev/null @@ -1 +0,0 @@ -import{U as a,C as n}from"./mermaid.core-DHQD1STq.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-DPT3_xql.js b/apps/kimi-code/dist-web/assets/channel-DPT3_xql.js new file mode 100644 index 000000000..c57055344 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/channel-DPT3_xql.js @@ -0,0 +1 @@ +import{U as a,C as n}from"./mermaid.core-DpBz6UHc.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-BRQfHNsr.js b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-CqtdGPMZ.js similarity index 67% rename from apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-BRQfHNsr.js rename to apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-CqtdGPMZ.js index ffee3ba37..4ea053058 100644 --- a/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-BRQfHNsr.js +++ b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-CqtdGPMZ.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-DHQD1STq.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-DpBz6UHc.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-BjbI6vv4.js b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-Dx199TNh.js similarity index 96% rename from apps/kimi-code/dist-web/assets/chunk-32BRIVSS-BjbI6vv4.js rename to apps/kimi-code/dist-web/assets/chunk-32BRIVSS-Dx199TNh.js index ee2a957d6..cde86f94e 100644 --- a/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-BjbI6vv4.js +++ b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-Dx199TNh.js @@ -1 +1 @@ -import{_ as i,d as l,n as d,j as o}from"./mermaid.core-DHQD1STq.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-DpBz6UHc.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-BgO5oPj2.js b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-D5nhu_pI.js similarity index 83% rename from apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-BgO5oPj2.js rename to apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-D5nhu_pI.js index 2910c093c..8149e170a 100644 --- a/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-BgO5oPj2.js +++ b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-D5nhu_pI.js @@ -1,4 +1,4 @@ -import{_ as e}from"./mermaid.core-DHQD1STq.js";var l=e(()=>` +import{_ as e}from"./mermaid.core-DpBz6UHc.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-CnbEmu7W.js b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-5GJmdVbS.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-CnbEmu7W.js rename to apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-5GJmdVbS.js index 307b549de..64e467ea3 100644 --- a/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-CnbEmu7W.js +++ b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-5GJmdVbS.js @@ -1,4 +1,4 @@ -import{g as te}from"./chunk-XXDRQBXY-AKdWVjUf.js";import{s as ee}from"./chunk-VR4S4FIN-CFZ-U2wY.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-DHQD1STq.js";import{f as fe}from"./chunk-32BRIVSS-BjbI6vv4.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-BYo5O_6D.js";import{s as ee}from"./chunk-VR4S4FIN-JAO0vJUe.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-DpBz6UHc.js";import{f as fe}from"./chunk-32BRIVSS-Dx199TNh.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-CPYc1Q95.js b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-BtckK32c.js similarity index 71% rename from apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-CPYc1Q95.js rename to apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-BtckK32c.js index 4b3100838..68ab08f9e 100644 --- a/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-CPYc1Q95.js +++ b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-BtckK32c.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-DHQD1STq.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-DpBz6UHc.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-t9_0csvx.js b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-B49sRSVS.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-t9_0csvx.js rename to apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-B49sRSVS.js index 8d05c04c4..a8a3bc17a 100644 --- a/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-t9_0csvx.js +++ b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-B49sRSVS.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-DHQD1STq.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-DpBz6UHc.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-ClGLd9-g.js b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-DYUKYgim.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-ClGLd9-g.js rename to apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-DYUKYgim.js index 196cef7d1..d2e328936 100644 --- a/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-ClGLd9-g.js +++ b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-DYUKYgim.js @@ -1 +1 @@ -import{_ as u,l as i}from"./mermaid.core-DHQD1STq.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-DpBz6UHc.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-DRWtsWPL.js b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-Bj6HhMBf.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DRWtsWPL.js rename to apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-Bj6HhMBf.js index 1ae7e2e75..a5a83e168 100644 --- a/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DRWtsWPL.js +++ b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-Bj6HhMBf.js @@ -1,4 +1,4 @@ -import{g as tt}from"./chunk-5VM5RSS4-BgO5oPj2.js";import{g as st}from"./chunk-XXDRQBXY-AKdWVjUf.js";import{s as it}from"./chunk-VR4S4FIN-CFZ-U2wY.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-DHQD1STq.js";import{f as gt}from"./chunk-32BRIVSS-BjbI6vv4.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-D5nhu_pI.js";import{g as st}from"./chunk-XXDRQBXY-BYo5O_6D.js";import{s as it}from"./chunk-VR4S4FIN-JAO0vJUe.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-DpBz6UHc.js";import{f as gt}from"./chunk-32BRIVSS-Dx199TNh.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-CFZ-U2wY.js b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-JAO0vJUe.js similarity index 87% rename from apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CFZ-U2wY.js rename to apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-JAO0vJUe.js index 7fd3c7431..5c308a5cf 100644 --- a/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CFZ-U2wY.js +++ b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-JAO0vJUe.js @@ -1 +1 @@ -import{_ as a,e as w,l as x}from"./mermaid.core-DHQD1STq.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-DpBz6UHc.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-AKdWVjUf.js b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BYo5O_6D.js similarity index 72% rename from apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-AKdWVjUf.js rename to apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BYo5O_6D.js index e5581bb56..50b653fd9 100644 --- a/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-AKdWVjUf.js +++ b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BYo5O_6D.js @@ -1 +1 @@ -import{_ as a,d as o}from"./mermaid.core-DHQD1STq.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-DpBz6UHc.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-BeJtrUxZ.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-BeJtrUxZ.js new file mode 100644 index 000000000..238087840 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-BeJtrUxZ.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-Bj6HhMBf.js";import{_ as i}from"./mermaid.core-DpBz6UHc.js";import"./chunk-5VM5RSS4-D5nhu_pI.js";import"./chunk-XXDRQBXY-BYo5O_6D.js";import"./chunk-VR4S4FIN-JAO0vJUe.js";import"./chunk-32BRIVSS-Dx199TNh.js";import"./index-_5lXYMaO.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-joxy0H72.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-joxy0H72.js deleted file mode 100644 index 443564847..000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-joxy0H72.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-DRWtsWPL.js";import{_ as i}from"./mermaid.core-DHQD1STq.js";import"./chunk-5VM5RSS4-BgO5oPj2.js";import"./chunk-XXDRQBXY-AKdWVjUf.js";import"./chunk-VR4S4FIN-CFZ-U2wY.js";import"./chunk-32BRIVSS-BjbI6vv4.js";import"./index-CgXirkUy.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-BeJtrUxZ.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-BeJtrUxZ.js new file mode 100644 index 000000000..238087840 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-BeJtrUxZ.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-Bj6HhMBf.js";import{_ as i}from"./mermaid.core-DpBz6UHc.js";import"./chunk-5VM5RSS4-D5nhu_pI.js";import"./chunk-XXDRQBXY-BYo5O_6D.js";import"./chunk-VR4S4FIN-JAO0vJUe.js";import"./chunk-32BRIVSS-Dx199TNh.js";import"./index-_5lXYMaO.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-joxy0H72.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-joxy0H72.js deleted file mode 100644 index 443564847..000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-joxy0H72.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-DRWtsWPL.js";import{_ as i}from"./mermaid.core-DHQD1STq.js";import"./chunk-5VM5RSS4-BgO5oPj2.js";import"./chunk-XXDRQBXY-AKdWVjUf.js";import"./chunk-VR4S4FIN-CFZ-U2wY.js";import"./chunk-32BRIVSS-BjbI6vv4.js";import"./index-CgXirkUy.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-CxHxs_ia.js b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-Bvd7lU_r.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-CxHxs_ia.js rename to apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-Bvd7lU_r.js index 8f77feecd..8ea3f7e22 100644 --- a/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-CxHxs_ia.js +++ b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-Bvd7lU_r.js @@ -1 +1 @@ -import{_ as V,l as k,d as lt}from"./mermaid.core-DHQD1STq.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import{g as gt}from"./_commonjsHelpers-CqkleIqs.js";import"./index-CgXirkUy.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;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(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<T;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-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;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(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;m<A;m++){var C=E[m];p&&C.child!=null&&C.updateBounds(),y=C.getLeft(),O=C.getRight(),s=C.getTop(),f=C.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var R=new n(v,u,D-v,T-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),E[0].getParent().paddingLeft!=null?c=E[0].getParent().paddingLeft:c=this.margin,this.left=R.x-c,this.right=R.x+R.width+c,this.top=R.y-c,this.bottom=R.y+R.height+c},h.calculateBounds=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=p.length,E=0;E<c;E++){var A=p[E];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var m=new n(v,u,D-v,T-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var T=v[u];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],T,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),T=u.getEdges();for(var s=T.length,f=0;f<s;f++){var c=T[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var E=y.withChildren();E.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=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<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t}),(function(N,I,L){var o=L(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,I,L){var o=L(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=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]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),T=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),E=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),C=i.getHeightHalf(),R=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,Y=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,U=void 0,P=void 0,_=void 0,X=void 0;if(-S===w?g>d?(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)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){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=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var T=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<T&&T<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,I,L){function o(){}o.sign=function(e){return e>0?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<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}})();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=(function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d?.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n})();N.exports=g}),(function(N,I,L){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o}),(function(N,I,L){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o}),(function(N,I,L){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"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);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=L(0),t=L(6),i=L(3),l=L(1),g=L(5),n=L(4),d=L(17),r=L(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var T=a;if(T.vGraphObject!=null){var y=T.vGraphObject;y.update(T)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,T=0;T<D.length;T++)u=D[T],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var T=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&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<c.length;u++){var E=c[u].getOtherEnd(f);if(O.get(f)!=E)if(!T.has(E))y.push(E),O.set(E,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(T));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],C=s.indexOf(m);C>-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;u<a.bendpoints.length;u++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),D.add(T);var y=this.newEdge(null);this.graphManager.add(y,v,T),p.add(T),v=T}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var T=D[u],y=new n(T.getCenterX(),T.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,T.getOwner().remove(T)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var T=p/v;u-=(p-T)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,T=null;(p.length==1||p.length==2)&&(u=!0,T=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],E=p.indexOf(O);E>=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);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=L(15),t=L(7),i=L(0),l=L(8),g=L(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),T=0;T<u.length;T++)r=u[T],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.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;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&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;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,T,r,h),T.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,T;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),T=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=T,p.springForceX-=u,p.springForceY-=T)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,T,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var E=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=E*f,r.repulsionForceY-=E*c,h.repulsionForceX+=E*f,h.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),T=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],T=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=g.sign(T)*t.MIN_REPULSION_DIST),y=u*u+T*T,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*T/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,T,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,T=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||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<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var T=p;T<=v;T++)for(var y=D;y<=u;y++)this.grid[T][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(T<0||y<0||T>=u.length||y>=u[0].length)){for(var O=0;O<u[T][y].length;O++)if(D=u[T][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,L){var o=L(1),e=L(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t}),(function(N,I,L){var o=L(3);function e(i,l,g,n){o.call(this,i,l,g,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e}),(function(N,I,L){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o}),(function(N,I,L){var o=L(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,I,L){var o=L(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e}),(function(N,I,L){var o=(function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}})();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=L(11),i=(function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}})();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=(function(){function i(l,g){var n=arguments.length>2&&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<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i})();N.exports=t}),(function(N,I,L){var o=function(){};o.FDLayout=L(18),o.FDLayoutConstants=L(7),o.FDLayoutEdge=L(19),o.FDLayoutNode=L(20),o.DimensionD=L(21),o.HashMap=L(22),o.HashSet=L(23),o.IGeometry=L(8),o.IMath=L(9),o.Integer=L(10),o.Point=L(12),o.PointD=L(4),o.RandomSeed=L(16),o.RectangleD=L(13),o.Transform=L(17),o.UniqueIDGeneretor=L(14),o.Quicksort=L(24),o.LinkedList=L(11),o.LGraphObject=L(2),o.LGraph=L(5),o.LEdge=L(1),o.LGraphManager=L(6),o.LNode=L(3),o.Layout=L(15),o.LayoutConstants=L(0),o.NeedlemanWunsch=L(25),N.exports=o}),(function(N,I,L){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=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;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o})])})})(Q)),Q.exports}var ct=$.exports,z;function pt(){return z||(z=1,(function(G,b){(function(I,L){G.exports=L(ft())})(ct,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.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;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i}),(function(I,L,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,T=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.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(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)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;c<s.length;c++){var E=s[c].rect,A=s[c].id;f[A]={id:A,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),E=c.length,A;for(A=0;A<E;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var E=s[c];if(!f.has(E)){var A=E.getSource(),m=E.getTarget();if(A==m)E.getBendpoints().push(new a),E.getBendpoints().push(new a),this.createDummyNodesForBendpoints(E),f.add(E);else{var C=[];if(C=C.concat(A.getEdgeListToNode(m)),C=C.concat(m.getEdgeListToNode(A)),!f.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var M=C[R];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}C.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),E=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=E,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>E&&(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;C<s.length;C++){var R=s[C];R.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,E,A,m){var C=(E-c+1)/2;C<0&&(C+=180);var R=(C+c)%360,M=R*D.TWO_PI/360,S=A*Math.cos(M),Y=A*Math.sin(M);s.setCenter(S,Y);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,U=w.length,P,_=s.getEdgesBetween(f);_.length>1;){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;c<s.length;c++){var E=s[c],A=E.getDiagonal();A>f&&(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<E.length;A++){var m=E[A],C=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(C.id==null||!this.getToBeTiled(C))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],R=m.getParent().id;typeof f[R]>"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<f[M].length;U++){var P=f[M][U];F.remove(P),x.add(P)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var E=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=f[c].width,E.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=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;A<E.length;A++){var m=E[A];if(this.getNodeDegree(m)>0)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;E<f.length;E++){var A=f[E];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),E=0;E<c.length;E++){var A=c[E];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,E,A){f+=E,c+=A;for(var m=f,C=0;C<s.rows.length;C++){var R=s.rows[C];f=m;for(var M=0,S=0;S<R.length;S++){var Y=R[S];Y.rect.x=f,Y.rect.y=c,f+=Y.rect.width+s.horizontalPadding,Y.rect.height>M&&(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.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var C=s[m];A.rows.length==0?this.insertNodeToRow(A,C,0,f):this.canAddHorizontal(A,C.rect.width,C.rect.height)?this.insertNodeToRow(A,C,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,C,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,E){var A=E;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var C=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width<C&&(s.width=C);var R=f.rect.height;c>0&&(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;E<s.rows.length;E++)s.rowWidth[E]<c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(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]<c&&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.width<f?R=(s.height+m)/f:R=(s.height+m)/s.width,R<1&&(R=1/R),C<1&&(C=1/C),C<R},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,E=s.rows[f],A=E[E.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&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;R<E.length;R++)E[R].height>C&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var E=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<E.length;m++)c=E[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var C=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(C.push(A[R]),A[R][0].getOwner().remove(A[R][0]));s.push(C),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],E,A=0;A<c.length;A++)E=c[A],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,E=s[0];E==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,C=c.startY,R=c.finishY,M=0,S=0,Y=0,w=0,x=[M,Y,S,w];if(C>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m<this.grid.length-1)for(var F=C;F<=R;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(R<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][R+1].length+this.grid[F][R].length-1;if(A>0)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;X<x.length;X++)x[X]<U?(U=x[X],P=1,_=X):x[X]==U&&P++;if(P==3&&U==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(P==2&&U==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(P==4&&U==0){var H=Math.floor(Math.random()*4);f=H}else f=_;f==0?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):f==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):f==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,L,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e})])})})($)),$.exports}var dt=Z.exports,J;function vt(){return J||(J=1,(function(G,b){(function(I,L){G.exports=L(pt())})(dt,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var T={};for(var y in D)T[y]=D[y];for(var y in u)T[y]=u[y];return T}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,T=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var E=0;E<c.length;E++){var A=c[E],m=this.idToLNode[A.data("source")],C=this.idToLNode[A.data("target")];if(m!==C&&m.getEdgesBetween(C).length==0){var R=s.add(y.newEdge(),m,C);R.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),U=O.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},S=function Y(){for(var w=function(){T.fit&&T.cy.fit(T.eles,T.padding),D||(D=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,U=0;U<x&&!F;U++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var P=O.layout.getPositionsData();T.eles.nodes().positions(function(_,X){if(typeof _=="number"&&(_=X),!_.isParent()){for(var H=_.id(),W=P[H],B=_;W==null&&(W=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[H]=W,B=B.parent()[0],B!=null););return W!=null?{x:W.x,y:W.y}:{x:_.position("x"),y:_.position("y")}}}),w(),u=requestAnimationFrame(Y)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},T=0;T<D.length;T++)u[D[T].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,T){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(T.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,C=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=C}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){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-DpBz6UHc.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import{g as gt}from"./_commonjsHelpers-CqkleIqs.js";import"./index-_5lXYMaO.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;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(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<T;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-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;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(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;m<A;m++){var C=E[m];p&&C.child!=null&&C.updateBounds(),y=C.getLeft(),O=C.getRight(),s=C.getTop(),f=C.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var R=new n(v,u,D-v,T-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),E[0].getParent().paddingLeft!=null?c=E[0].getParent().paddingLeft:c=this.margin,this.left=R.x-c,this.right=R.x+R.width+c,this.top=R.y-c,this.bottom=R.y+R.height+c},h.calculateBounds=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=p.length,E=0;E<c;E++){var A=p[E];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var m=new n(v,u,D-v,T-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var T=v[u];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],T,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),T=u.getEdges();for(var s=T.length,f=0;f<s;f++){var c=T[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var E=y.withChildren();E.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=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<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t}),(function(N,I,L){var o=L(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,I,L){var o=L(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=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]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),T=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),E=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),C=i.getHeightHalf(),R=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,Y=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,U=void 0,P=void 0,_=void 0,X=void 0;if(-S===w?g>d?(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)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){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=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var T=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<T&&T<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,I,L){function o(){}o.sign=function(e){return e>0?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<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}})();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=(function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d?.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n})();N.exports=g}),(function(N,I,L){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o}),(function(N,I,L){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o}),(function(N,I,L){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"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);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=L(0),t=L(6),i=L(3),l=L(1),g=L(5),n=L(4),d=L(17),r=L(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var T=a;if(T.vGraphObject!=null){var y=T.vGraphObject;y.update(T)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,T=0;T<D.length;T++)u=D[T],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var T=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&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<c.length;u++){var E=c[u].getOtherEnd(f);if(O.get(f)!=E)if(!T.has(E))y.push(E),O.set(E,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(T));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],C=s.indexOf(m);C>-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;u<a.bendpoints.length;u++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),D.add(T);var y=this.newEdge(null);this.graphManager.add(y,v,T),p.add(T),v=T}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var T=D[u],y=new n(T.getCenterX(),T.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,T.getOwner().remove(T)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var T=p/v;u-=(p-T)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,T=null;(p.length==1||p.length==2)&&(u=!0,T=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],E=p.indexOf(O);E>=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);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=L(15),t=L(7),i=L(0),l=L(8),g=L(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),T=0;T<u.length;T++)r=u[T],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.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;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&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;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,T,r,h),T.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,T;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),T=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=T,p.springForceX-=u,p.springForceY-=T)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,T,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var E=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=E*f,r.repulsionForceY-=E*c,h.repulsionForceX+=E*f,h.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),T=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],T=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=g.sign(T)*t.MIN_REPULSION_DIST),y=u*u+T*T,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*T/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,T,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,T=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||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<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var T=p;T<=v;T++)for(var y=D;y<=u;y++)this.grid[T][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(T<0||y<0||T>=u.length||y>=u[0].length)){for(var O=0;O<u[T][y].length;O++)if(D=u[T][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,L){var o=L(1),e=L(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t}),(function(N,I,L){var o=L(3);function e(i,l,g,n){o.call(this,i,l,g,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e}),(function(N,I,L){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o}),(function(N,I,L){var o=L(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,I,L){var o=L(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e}),(function(N,I,L){var o=(function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}})();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=L(11),i=(function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}})();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=(function(){function i(l,g){var n=arguments.length>2&&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<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i})();N.exports=t}),(function(N,I,L){var o=function(){};o.FDLayout=L(18),o.FDLayoutConstants=L(7),o.FDLayoutEdge=L(19),o.FDLayoutNode=L(20),o.DimensionD=L(21),o.HashMap=L(22),o.HashSet=L(23),o.IGeometry=L(8),o.IMath=L(9),o.Integer=L(10),o.Point=L(12),o.PointD=L(4),o.RandomSeed=L(16),o.RectangleD=L(13),o.Transform=L(17),o.UniqueIDGeneretor=L(14),o.Quicksort=L(24),o.LinkedList=L(11),o.LGraphObject=L(2),o.LGraph=L(5),o.LEdge=L(1),o.LGraphManager=L(6),o.LNode=L(3),o.Layout=L(15),o.LayoutConstants=L(0),o.NeedlemanWunsch=L(25),N.exports=o}),(function(N,I,L){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=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;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o})])})})(Q)),Q.exports}var ct=$.exports,z;function pt(){return z||(z=1,(function(G,b){(function(I,L){G.exports=L(ft())})(ct,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.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;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i}),(function(I,L,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,T=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.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(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)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;c<s.length;c++){var E=s[c].rect,A=s[c].id;f[A]={id:A,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),E=c.length,A;for(A=0;A<E;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var E=s[c];if(!f.has(E)){var A=E.getSource(),m=E.getTarget();if(A==m)E.getBendpoints().push(new a),E.getBendpoints().push(new a),this.createDummyNodesForBendpoints(E),f.add(E);else{var C=[];if(C=C.concat(A.getEdgeListToNode(m)),C=C.concat(m.getEdgeListToNode(A)),!f.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var M=C[R];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}C.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),E=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=E,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>E&&(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;C<s.length;C++){var R=s[C];R.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,E,A,m){var C=(E-c+1)/2;C<0&&(C+=180);var R=(C+c)%360,M=R*D.TWO_PI/360,S=A*Math.cos(M),Y=A*Math.sin(M);s.setCenter(S,Y);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,U=w.length,P,_=s.getEdgesBetween(f);_.length>1;){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;c<s.length;c++){var E=s[c],A=E.getDiagonal();A>f&&(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<E.length;A++){var m=E[A],C=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(C.id==null||!this.getToBeTiled(C))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],R=m.getParent().id;typeof f[R]>"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<f[M].length;U++){var P=f[M][U];F.remove(P),x.add(P)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var E=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=f[c].width,E.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=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;A<E.length;A++){var m=E[A];if(this.getNodeDegree(m)>0)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;E<f.length;E++){var A=f[E];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),E=0;E<c.length;E++){var A=c[E];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,E,A){f+=E,c+=A;for(var m=f,C=0;C<s.rows.length;C++){var R=s.rows[C];f=m;for(var M=0,S=0;S<R.length;S++){var Y=R[S];Y.rect.x=f,Y.rect.y=c,f+=Y.rect.width+s.horizontalPadding,Y.rect.height>M&&(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.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var C=s[m];A.rows.length==0?this.insertNodeToRow(A,C,0,f):this.canAddHorizontal(A,C.rect.width,C.rect.height)?this.insertNodeToRow(A,C,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,C,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,E){var A=E;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var C=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width<C&&(s.width=C);var R=f.rect.height;c>0&&(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;E<s.rows.length;E++)s.rowWidth[E]<c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(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]<c&&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.width<f?R=(s.height+m)/f:R=(s.height+m)/s.width,R<1&&(R=1/R),C<1&&(C=1/C),C<R},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,E=s.rows[f],A=E[E.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&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;R<E.length;R++)E[R].height>C&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var E=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<E.length;m++)c=E[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var C=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(C.push(A[R]),A[R][0].getOwner().remove(A[R][0]));s.push(C),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],E,A=0;A<c.length;A++)E=c[A],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,E=s[0];E==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,C=c.startY,R=c.finishY,M=0,S=0,Y=0,w=0,x=[M,Y,S,w];if(C>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m<this.grid.length-1)for(var F=C;F<=R;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(R<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][R+1].length+this.grid[F][R].length-1;if(A>0)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;X<x.length;X++)x[X]<U?(U=x[X],P=1,_=X):x[X]==U&&P++;if(P==3&&U==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(P==2&&U==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(P==4&&U==0){var H=Math.floor(Math.random()*4);f=H}else f=_;f==0?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):f==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):f==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,L,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e})])})})($)),$.exports}var dt=Z.exports,J;function vt(){return J||(J=1,(function(G,b){(function(I,L){G.exports=L(pt())})(dt,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var T={};for(var y in D)T[y]=D[y];for(var y in u)T[y]=u[y];return T}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,T=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var E=0;E<c.length;E++){var A=c[E],m=this.idToLNode[A.data("source")],C=this.idToLNode[A.data("target")];if(m!==C&&m.getEdgesBetween(C).length==0){var R=s.add(y.newEdge(),m,C);R.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),U=O.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},S=function Y(){for(var w=function(){T.fit&&T.cy.fit(T.eles,T.padding),D||(D=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,U=0;U<x&&!F;U++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var P=O.layout.getPositionsData();T.eles.nodes().positions(function(_,X){if(typeof _=="number"&&(_=X),!_.isParent()){for(var H=_.id(),W=P[H],B=_;W==null&&(W=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[H]=W,B=B.parent()[0],B!=null););return W!=null?{x:W.x,y:W.y}:{x:_.position("x"),y:_.position("y")}}}),w(),u=requestAnimationFrame(Y)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},T=0;T<D.length;T++)u[D[T].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,T){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(T.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,C=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=C}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){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-Cbq_W2rg.js b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-Dac1VpFl.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-Cbq_W2rg.js rename to apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-Dac1VpFl.js index 14e64b780..023c32b83 100644 --- a/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-Cbq_W2rg.js +++ b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-Dac1VpFl.js @@ -1,4 +1,4 @@ -import{bR as et}from"./index-CgXirkUy.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-_5lXYMaO.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<u.length&&d<c.length;)o(u[f],c[d])<=0?s[m++]=u[f++]:s[m++]=c[d++];for(;f<u.length;)s[m++]=u[f++];for(;d<c.length;)s[m++]=c[d++];return s}i(a,"mergeSort")})(Rf||(Rf={})),lh=class{static{i(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,r=!0;for(let n=0;n<t.length;n++){r&&(e.push(n),r=!1);let a=t.charAt(n);r=a==="\r"||a===` `,a==="\r"&&n+1<t.length&&t.charAt(n+1)===` diff --git a/apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-DV_qWAFu.js b/apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-cH6p2fBn.js similarity index 98% rename from apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-DV_qWAFu.js rename to apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-cH6p2fBn.js index d1669ab9f..9b41a344f 100644 --- a/apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-DV_qWAFu.js +++ b/apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-cH6p2fBn.js @@ -1,4 +1,4 @@ -import{p as xt}from"./chunk-JWPE2WC7-CPYc1Q95.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-DHQD1STq.js";import{p as Bt}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.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<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}s(st,"hashString");function it(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:st(e)}s(it,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,I=e/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*17)*m*2-m;d.push({x:c+p,y:o*I})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*31+7),F=p.x+h,R=f,_=i.x-h;D+=` C${F},${R} ${_},${f} ${i.x},${i.y}`}return D}s(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,I=t/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*23)*m*2-m;d.push({x:o*I,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*37+11),F=f,R=p.y+h,_=f,z=i.y-h;D+=` C${F},${R} ${_},${z} ${i.x},${i.y}`}return D}s(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}s(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}s(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Ft=s((t,e)=>{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-BtckK32c.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-DpBz6UHc.js";import{p as Bt}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.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<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}s(st,"hashString");function it(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:st(e)}s(it,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,I=e/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*17)*m*2-m;d.push({x:c+p,y:o*I})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*31+7),F=p.x+h,R=f,_=i.x-h;D+=` C${F},${R} ${_},${f} ${i.x},${i.y}`}return D}s(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,I=t/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*23)*m*2-m;d.push({x:o*I,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*37+11),F=f,R=p.y+h,_=f,z=i.y-h;D+=` C${F},${R} ${_},${z} ${i.x},${i.y}`}return D}s(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}s(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}s(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Ft=s((t,e)=>{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-D_g3ijKj.js b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BCr0U4UL.js similarity index 97% rename from apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-D_g3ijKj.js rename to apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BCr0U4UL.js index 54765ae7a..1a525e5c9 100644 --- a/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-D_g3ijKj.js +++ b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BCr0U4UL.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-ClGLd9-g.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-DHQD1STq.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-CgXirkUy.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-DYUKYgim.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-DpBz6UHc.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-_5lXYMaO.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-BsAKjn07.js b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DPlhFZdP.js similarity index 98% rename from apps/kimi-code/dist-web/assets/diagram-FQU43EPY-BsAKjn07.js rename to apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DPlhFZdP.js index ea78fd0de..cc6a1f752 100644 --- a/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-BsAKjn07.js +++ b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DPlhFZdP.js @@ -1,3 +1,3 @@ -import{p as re}from"./chunk-JWPE2WC7-CPYc1Q95.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-DHQD1STq.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.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&&a<t}).map(i=>Number.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:"<br/>"};let c=`<b>${P(a,t.textMaxWidth,d)}</b>`;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-BtckK32c.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-DpBz6UHc.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.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&&a<t}).map(i=>Number.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:"<br/>"};let c=`<b>${P(a,t.textMaxWidth,d)}</b>`;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+="<br/>")}const m=r!==void 0;m&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);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;p<f.length;p++){const w=f[p],R=f[p-1];w.y=R.y+R.height+s.swimlaneGap}return h}o(Y,"evolveFramePositioned");function z(e,n){return e===0&&n.sourceFrames.length===0}o(z,"isFirstFrame");function K(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}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-BuEBRets.js b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-D-tFNEyZ.js similarity index 97% rename from apps/kimi-code/dist-web/assets/diagram-G47NLZAW-BuEBRets.js rename to apps/kimi-code/dist-web/assets/diagram-G47NLZAW-D-tFNEyZ.js index 374c7adee..ad4b9ff9f 100644 --- a/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-BuEBRets.js +++ b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-D-tFNEyZ.js @@ -1,4 +1,4 @@ -import{p as me}from"./chunk-JWPE2WC7-CPYc1Q95.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-DHQD1STq.js";import{s as Fe}from"./chunk-VR4S4FIN-CFZ-U2wY.js";import{p as Ne}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-CgXirkUy.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<d;++h)l.push(o[h]);for(;n=r.pop();)e.call(a,n,++g,this);return this}function De(e,a){let n=-1;for(const l of this)if(e.call(a,l,++n,this))return l}function Pe(e){return this.eachAfter(function(a){for(var n=+e(a.data)||0,l=a.children,r=l&&l.length;--r>=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<o;++r)n.push(l[r]);while(n.length)}function ae(e,a){e instanceof Map?(e=[void 0,e],a===void 0&&(a=Ye)):a===void 0&&(a=Xe);for(var n=new U(e),l,r=[n],o,h,d,g;l=r.pop();)if((h=a(l.data))&&(g=(h=Array.from(h)).length))for(l.children=h,d=g-1;d>=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;++d<g;)h=o[d],h.y0=n,h.y1=r,h.x0=a,h.x1=a+=h.value*c}function Qe(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(r-n)/e.value;++d<g;)h=o[d],h.x0=a,h.x1=l,h.y0=n,h.y1=n+=h.value*c}var et=(1+Math.sqrt(5))/2;function tt(e,a,n,l,r,o){for(var h=[],d=a.children,g,c,p=0,b=0,s=d.length,x,S,v=a.value,u,y,N,$,V,E,M;p<s;){x=r-n,S=o-l;do u=d[b++].value;while(!u&&b<s);for(y=N=u,E=Math.max(S/x,x/S)/(v*e),M=u*u*E,V=Math.max(N/M,M/y);b<s;++b){if(u+=c=d[b].value,c<y&&(y=c),c>N&&(N=c),M=u*u*E,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x<S,children:d.slice(p,b)}),g.dice?Ke(g,n,l,r,v?l+=S*u/v:o):Qe(g,n,l,v?n+=x*u/v:r,o),v-=u,p=b}return h}const at=(function e(a){function n(l,r,o,h,d){tt(a,l,r,o,h,d)}return n.ratio=function(l){return e((l=+l)>1?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<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),s.x0=S,s.y0=v,s.x1=u,s.y1=y,s.children&&(x=r[s.depth+1]=o(s)/2,S+=c(s)-x,v+=h(s)-x,u-=d(s)-x,y-=g(s)-x,u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),e(s,S,v,u,y))}return p.round=function(s){return arguments.length?(a=!!s,p):a},p.size=function(s){return arguments.length?(n=+s[0],l=+s[1],p):[n,l]},p.tile=function(s){return arguments.length?(e=Ze(s),p):e},p.padding=function(s){return arguments.length?p.paddingInner(s).paddingOuter(s):p.paddingInner()},p.paddingInner=function(s){return arguments.length?(o=typeof s=="function"?s:q(+s),p):o},p.paddingOuter=function(s){return arguments.length?p.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):p.paddingTop()},p.paddingTop=function(s){return arguments.length?(h=typeof s=="function"?s:q(+s),p):h},p.paddingRight=function(s){return arguments.length?(d=typeof s=="function"?s:q(+s),p):d},p.paddingBottom=function(s){return arguments.length?(g=typeof s=="function"?s:q(+s),p):g},p.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:q(+s),p):c},p}var ie=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ve,this.getAccTitle=xe,this.setDiagramTitle=be,this.getDiagramTitle=we,this.getAccDescription=Ce,this.setAccDescription=Te}static{w(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=Le,a=te();return Q({...e.treemap,...a.treemap??{}})}addNode(e,a){this.nodes.push(e),this.levels.set(e,a),a===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,a){const n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=a.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");l&&l.forEach(r=>{$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(T<re||P<re){i.style("display","none");return}let m=parseInt(i.style("font-size"),10);const _=.6;for(;L.getComputedTextLength()>T&&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*_))),!(F<H&&m===D));)i.style("font-size",`${m}px`),k=m+J+F;i.style("font-size",`${m}px`),A?(m<D||P<D)&&i.style("display","none"):(L.getComputedTextLength()>T||m<D||P<m)&&i.style("display","none")}),o.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",i=>(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<H?f.style("display","none"):f.style("display",null)});const pe=o.diagramPadding??8;Fe(b,pe,"flowchart",o?.useMaxWidth||!1)},"draw"),ot=w(function(e,a){return a.db.getClasses()},"getClasses"),ct={draw:it,getClasses:ot},ht={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},dt=w(({treemap:e}={})=>{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-BtckK32c.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-DpBz6UHc.js";import{s as Fe}from"./chunk-VR4S4FIN-JAO0vJUe.js";import{p as Ne}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-_5lXYMaO.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<d;++h)l.push(o[h]);for(;n=r.pop();)e.call(a,n,++g,this);return this}function De(e,a){let n=-1;for(const l of this)if(e.call(a,l,++n,this))return l}function Pe(e){return this.eachAfter(function(a){for(var n=+e(a.data)||0,l=a.children,r=l&&l.length;--r>=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<o;++r)n.push(l[r]);while(n.length)}function ae(e,a){e instanceof Map?(e=[void 0,e],a===void 0&&(a=Ye)):a===void 0&&(a=Xe);for(var n=new U(e),l,r=[n],o,h,d,g;l=r.pop();)if((h=a(l.data))&&(g=(h=Array.from(h)).length))for(l.children=h,d=g-1;d>=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;++d<g;)h=o[d],h.y0=n,h.y1=r,h.x0=a,h.x1=a+=h.value*c}function Qe(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(r-n)/e.value;++d<g;)h=o[d],h.x0=a,h.x1=l,h.y0=n,h.y1=n+=h.value*c}var et=(1+Math.sqrt(5))/2;function tt(e,a,n,l,r,o){for(var h=[],d=a.children,g,c,p=0,b=0,s=d.length,x,S,v=a.value,u,y,N,$,V,E,M;p<s;){x=r-n,S=o-l;do u=d[b++].value;while(!u&&b<s);for(y=N=u,E=Math.max(S/x,x/S)/(v*e),M=u*u*E,V=Math.max(N/M,M/y);b<s;++b){if(u+=c=d[b].value,c<y&&(y=c),c>N&&(N=c),M=u*u*E,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x<S,children:d.slice(p,b)}),g.dice?Ke(g,n,l,r,v?l+=S*u/v:o):Qe(g,n,l,v?n+=x*u/v:r,o),v-=u,p=b}return h}const at=(function e(a){function n(l,r,o,h,d){tt(a,l,r,o,h,d)}return n.ratio=function(l){return e((l=+l)>1?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<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),s.x0=S,s.y0=v,s.x1=u,s.y1=y,s.children&&(x=r[s.depth+1]=o(s)/2,S+=c(s)-x,v+=h(s)-x,u-=d(s)-x,y-=g(s)-x,u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),e(s,S,v,u,y))}return p.round=function(s){return arguments.length?(a=!!s,p):a},p.size=function(s){return arguments.length?(n=+s[0],l=+s[1],p):[n,l]},p.tile=function(s){return arguments.length?(e=Ze(s),p):e},p.padding=function(s){return arguments.length?p.paddingInner(s).paddingOuter(s):p.paddingInner()},p.paddingInner=function(s){return arguments.length?(o=typeof s=="function"?s:q(+s),p):o},p.paddingOuter=function(s){return arguments.length?p.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):p.paddingTop()},p.paddingTop=function(s){return arguments.length?(h=typeof s=="function"?s:q(+s),p):h},p.paddingRight=function(s){return arguments.length?(d=typeof s=="function"?s:q(+s),p):d},p.paddingBottom=function(s){return arguments.length?(g=typeof s=="function"?s:q(+s),p):g},p.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:q(+s),p):c},p}var ie=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ve,this.getAccTitle=xe,this.setDiagramTitle=be,this.getDiagramTitle=we,this.getAccDescription=Ce,this.setAccDescription=Te}static{w(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=Le,a=te();return Q({...e.treemap,...a.treemap??{}})}addNode(e,a){this.nodes.push(e),this.levels.set(e,a),a===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,a){const n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=a.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");l&&l.forEach(r=>{$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(T<re||P<re){i.style("display","none");return}let m=parseInt(i.style("font-size"),10);const _=.6;for(;L.getComputedTextLength()>T&&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*_))),!(F<H&&m===D));)i.style("font-size",`${m}px`),k=m+J+F;i.style("font-size",`${m}px`),A?(m<D||P<D)&&i.style("display","none"):(L.getComputedTextLength()>T||m<D||P<m)&&i.style("display","none")}),o.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",i=>(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<H?f.style("display","none"):f.style("display",null)});const pe=o.diagramPadding??8;Fe(b,pe,"flowchart",o?.useMaxWidth||!1)},"draw"),ot=w(function(e,a){return a.db.getClasses()},"getClasses"),ct={draw:it,getClasses:ot},ht={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},dt=w(({treemap:e}={})=>{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-DulkvbtN.js b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CZRzvszj.js similarity index 93% rename from apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-DulkvbtN.js rename to apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CZRzvszj.js index 797dc08a7..8138d268e 100644 --- a/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-DulkvbtN.js +++ b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CZRzvszj.js @@ -1,4 +1,4 @@ -import{p as B}from"./chunk-JWPE2WC7-CPYc1Q95.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-DHQD1STq.js";import{p as _}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.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<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,m.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&e.getPacket().length<L;){const[p,s]=Y({start:a,end:i,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(e.pushWord(o),o=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}e.pushWord(o)},"populate"),Y=b((t,e,r)=>{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-BtckK32c.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-DpBz6UHc.js";import{p as _}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.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<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,m.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&e.getPacket().length<L;){const[p,s]=Y({start:a,end:i,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(e.pushWord(o),o=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}e.pushWord(o)},"populate"),Y=b((t,e,r)=>{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-CkS8iR3C.js b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-B2qPmny7.js similarity index 96% rename from apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-CkS8iR3C.js rename to apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-B2qPmny7.js index 0c55f3afa..8dd08f1e0 100644 --- a/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-CkS8iR3C.js +++ b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-B2qPmny7.js @@ -1,4 +1,4 @@ -import{I as X}from"./chunk-2Q5K7J3B-BRQfHNsr.js";import{p as O}from"./chunk-JWPE2WC7-CPYc1Q95.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-DHQD1STq.js";import{p as ne}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.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-CqtdGPMZ.js";import{p as O}from"./chunk-JWPE2WC7-BtckK32c.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-DpBz6UHc.js";import{p as ne}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.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<e.length;s++){const o=e[s];o.trim()===""||k.test(o)||$.test(o)||V.test(o)||i.push(o.replace(/\t/g," "))}if(!L(i))return{text:n,lineMap:t};const a=_(i),c=[];let l=0;for(let s=0;s<=r;s++)c.push(e[s]),l++,t.set(l,s+1);for(let s=r+1;s<e.length;s++){const o=e[s],h=o.trim(),p=s+1;if(h===""){c.push(o),l++,t.set(l,p);continue}if(k.test(o)){c.push(o),l++,t.set(l,p);continue}if($.test(o)){c.push(o),l++,t.set(l,p);continue}if(V.test(o))continue;const d=o.replace(/\t/g," "),w=S.exec(d);if(w?.index!==void 0){const g=w.index,m=Math.round(g/a)+1;let u=g+1;for(;u<d.length&&re.test(d[u]);)u++;for(;u<d.length&&d[u]===" ";)u++;const v=d.slice(u).trimEnd();if(!v)throw new Error(`Line ${p}: Empty node — expected a filename or directory name after the box-drawing prefix`);const W=ie.repeat(m);c.push(W+v),l++,t.set(l,p)}else{if(/^[\s─━│┃└┗├┣]+$/.test(d))continue;if(E.test(d))c.push(o),l++,t.set(l,p);else{if(/^\s+/.test(d))throw new Error(`Line ${p}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);c.push(o),l++,t.set(l,p)}}}return{text:c.join(` `),lineMap:t}}f(R,"preprocessBoxDrawing");var x=new X(()=>({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:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};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-Dcl5s4A_.js b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-BhWQTWhi.js similarity index 95% rename from apps/kimi-code/dist-web/assets/diagram-WEI45ONY-Dcl5s4A_.js rename to apps/kimi-code/dist-web/assets/diagram-WEI45ONY-BhWQTWhi.js index 0442f662f..471c02d8f 100644 --- a/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-Dcl5s4A_.js +++ b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-BhWQTWhi.js @@ -1,4 +1,4 @@ -import{p as k}from"./chunk-JWPE2WC7-CPYc1Q95.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-DHQD1STq.js";import{p as H}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.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<r;i++){const l=e*(i+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const i=t.length;for(let l=0;l<r;l++){const n=e*(l+1)/r,o=t.map((d,p)=>{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<s;i++){const l=t[i].label,n=2*i*Math.PI/s-Math.PI/2,o=Math.cos(n),d=Math.sin(n);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=o>.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<e;s++){const i=a[(s-1+e)%e],l=a[s],n=a[(s+1)%e],o=a[(s+2)%e],d={x:l.x+(n.x-i.x)*t,y:l.y+(n.y-i.y)*t},p={x:n.x-(o.x-l.x)*t,y:n.y-(o.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}c(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,i=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((n,o)=>{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<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=` +import{p as k}from"./chunk-JWPE2WC7-BtckK32c.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-DpBz6UHc.js";import{p as H}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.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<r;i++){const l=e*(i+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const i=t.length;for(let l=0;l<r;l++){const n=e*(l+1)/r,o=t.map((d,p)=>{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<s;i++){const l=t[i].label,n=2*i*Math.PI/s-Math.PI/2,o=Math.cos(n),d=Math.sin(n);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=o>.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<e;s++){const i=a[(s-1+e)%e],l=a[s],n=a[(s+1)%e],o=a[(s+2)%e],d={x:l.x+(n.x-i.x)*t,y:l.y+(n.y-i.y)*t},p={x:n.x-(o.x-l.x)*t,y:n.y-(o.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}c(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,i=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((n,o)=>{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<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=` .radarCurve-${r} { color: ${s}; fill: ${s}; diff --git a/apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-D-Jk-ZBL.js b/apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-C7ceb06g.js similarity index 87% rename from apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-D-Jk-ZBL.js rename to apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-C7ceb06g.js index 1964cc6d0..09f2c2342 100644 --- a/apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-D-Jk-ZBL.js +++ b/apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-C7ceb06g.js @@ -1 +1 @@ -import{g as l,r as m,d as n}from"./chunk-MOJQB5TN-t9_0csvx.js";import{p}from"./chunk-JWPE2WC7-CPYc1Q95.js";import{_ as t,l as o}from"./mermaid.core-DHQD1STq.js";import{M as u,a as f}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.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}; +import{g as l,r as m,d as n}from"./chunk-MOJQB5TN-B49sRSVS.js";import{p}from"./chunk-JWPE2WC7-BtckK32c.js";import{_ as t,l as o}from"./mermaid.core-DpBz6UHc.js";import{M as u,a as f}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.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-Ba0EdkRL.js b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-CnsIdx2o.js similarity index 99% rename from apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-Ba0EdkRL.js rename to apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-CnsIdx2o.js index a2667dd5d..c3bea349b 100644 --- a/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-Ba0EdkRL.js +++ b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-CnsIdx2o.js @@ -1,4 +1,4 @@ -import{g as Mt}from"./chunk-XXDRQBXY-AKdWVjUf.js";import{s as Bt}from"./chunk-VR4S4FIN-CFZ-U2wY.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-DHQD1STq.js";import{c as Jt}from"./channel-CCgkeAox.js";import"./index-CgXirkUy.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-BYo5O_6D.js";import{s as Bt}from"./chunk-VR4S4FIN-JAO0vJUe.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-DpBz6UHc.js";import{c as Jt}from"./channel-DPT3_xql.js";import"./index-_5lXYMaO.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-C0UVrrA6.js b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CBIszsQp.js similarity index 99% rename from apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-C0UVrrA6.js rename to apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CBIszsQp.js index de6a4b53b..f48968424 100644 --- a/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-C0UVrrA6.js +++ b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CBIszsQp.js @@ -1,4 +1,4 @@ -import{g as He}from"./chunk-5VM5RSS4-BgO5oPj2.js";import{g as Xe}from"./chunk-XXDRQBXY-AKdWVjUf.js";import{s as Qe}from"./chunk-VR4S4FIN-CFZ-U2wY.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-DHQD1STq.js";import{f as ft}from"./chunk-32BRIVSS-BjbI6vv4.js";import{c as gt}from"./channel-CCgkeAox.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-D5nhu_pI.js";import{g as Xe}from"./chunk-XXDRQBXY-BYo5O_6D.js";import{s as Qe}from"./chunk-VR4S4FIN-JAO0vJUe.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-DpBz6UHc.js";import{f as ft}from"./chunk-32BRIVSS-Dx199TNh.js";import{c as gt}from"./channel-DPT3_xql.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-JXL1f3pm.js b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-Bp3UvmyY.js similarity index 99% rename from apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-JXL1f3pm.js rename to apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-Bp3UvmyY.js index 30cb6f8d6..0777e866b 100644 --- a/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-JXL1f3pm.js +++ b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-Bp3UvmyY.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-DHQD1STq.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-DLrQx2aB.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-CgXirkUy.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===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 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.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*hr;return new ht(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function be(t,e,n,r){return arguments.length===1?yr(t):new ht(t,e,n,r??1)}function ht(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function pn(t){if(isNaN(t.h))return new ft(t.l,0,0,t.opacity);var e=t.h*dr;return new ft(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}cn(ht,be,un(ln,{brighter(t){return new ht(this.h,this.c,this.l+ne*(t??1),this.opacity)},darker(t){return new ht(this.h,this.c,this.l-ne*(t??1),this.opacity)},rgb(){return pn(this).rgb()}}));function kr(t){return function(e,n){var r=t((e=be(e)).h,(n=be(n)).h),i=ue(e.c,n.c),s=ue(e.l,n.l),a=ue(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const pr=kr(Hn);function vr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const ge=new Date,ye=new Date;function nt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(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<y-s?a:y},i.offset=(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),!(s<a)||!(y>0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(S<s&&s<a);return F},i.filter=s=>nt(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 _=w<S;_&&([S,w]=[w,S]);const Y=P&&typeof P.range=="function"?P:F(S,w,P),X=Y?Y.range(S,+w+1):[];return _?X.reverse():X}function F(S,w,P){const _=Math.abs(w-S)/P,Y=Qn(([,,v])=>v).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]<a[Y][2]/_?Y-1:Y];return X.every(B)}return[y,F]}const[Yr,Fr]=_r(kt,Rt,zt,xt,Pt,Nt);function pe(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ve(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $t(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ur(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,F=t.shortMonths,S=Ot(i),w=Ht(i),P=Ot(s),_=Ht(s),Y=Ot(a),X=Ht(a),B=Ot(y),v=Ht(y),U=Ot(F),R=Ht(F),E={a:m,A:I,b:o,B:W,c:null,d:Xe,e:Xe,f:ti,g:li,G:di,H:Qr,I:Jr,j:Kr,L:Dn,m:ei,M:ni,p:u,q:K,Q:Qe,s:Je,S:ri,u:ii,U:si,V:ai,w:oi,W:ci,x:null,X:null,y:ui,Y:fi,Z:hi,"%":je},z={a:l,A:$,b:O,B:j,c:null,d:Ge,e:Ge,f:ki,g:Si,G:Yi,H:mi,I:gi,j:yi,L:Cn,m:pi,M:vi,p:H,q:J,Q:Qe,s:Je,S:Ti,u:xi,U:bi,V:wi,w:Di,W:Mi,x:null,X:null,y:Ci,Y:_i,Z:Fi,"%":je},G={a:x,A:C,b:M,B:D,c,d:Be,e:Be,f:Zr,g:qe,G:ze,H:Ze,I:Ze,j:Rr,L:Br,m:Vr,M:zr,p:L,q:Pr,Q:Gr,s:jr,S:qr,u:Wr,U:$r,V:Or,w:Ar,W:Hr,x:g,X:b,y:qe,Y:ze,Z:Nr,"%":Xr};E.x=T(n,E),E.X=T(r,E),E.c=T(e,E),z.x=T(n,z),z.X=T(r,z),z.c=T(e,z);function T(h,N){return function(V){var f=[],tt=-1,A=0,Q=h.length,Z,st,at;for(V instanceof Date||(V=new Date(+V));++tt<Q;)h.charCodeAt(tt)===37&&(f.push(h.slice(A,tt)),(st=Re[Z=h.charAt(++tt)])!=null?Z=h.charAt(++tt):st=Z==="e"?" ":"0",(at=N[Z])&&(Z=at(V,st)),f.push(Z),A=tt+1);return f.push(h.slice(A,tt)),f.join("")}}function k(h,N){return function(V){var f=$t(1900,void 0,1),tt=p(f,h,V+="",0),A,Q;if(tt!=V.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(N&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>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<A;){if(f>=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<n?new Array(n-s+1).join(e)+i:i)}function Lr(t){return t.replace(Ir,"\\$&")}function Ot(t){return new RegExp("^(?:"+t.map(Lr).join("|")+")","i")}function Ht(t){return new Map(t.map((e,n)=>[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)<T?Y:y(T)<T?X:a(T)<T?B:s(T)<T?v:r(T)<T?i(T)<T?U:R:n(T)<T?E:z)(T)}return w.invert=function(T){return new Date(P(T))},w.domain=function(T){return arguments.length?_(Array.from(T,Ii)):_().map(Ei)},w.ticks=function(T){var k=_();return t(k[0],k[k.length-1],T??10)},w.tickFormat=function(T,k){return k==null?G:S(k)},w.nice=function(T){var k=_();return(!T||typeof T.range!="function")&&(T=e(k[0],k[k.length-1],T??10)),T?_(vr(k,T)):w},w.copy=function(){return Kn(w,_n(t,e,n,r,i,s,a,y,F,S))},w}function Li(){return er.apply(_n(Yr,Fr,kt,Rt,zt,xt,Pt,Nt,vt,ie).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var jt={exports:{}},Ai=jt.exports,Ke;function Wi(){return Ke||(Ke=1,(function(t,e){(function(n,r){t.exports=r()})(Ai,(function(){var n="day";return function(r,i,s){var a=function(S){return S.add(4-S.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var w,P,_,Y,X=a(this),B=(w=this.isoWeekYear(),P=this.$u,_=(P?s.utc:s)().year(w).startOf("year"),Y=4-_.isoWeekday(),_.isoWeekday()>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<z;G+=1){var T=E[G],k=X[T],p=k&&k[0],L=k&&k[1];E[G]=L?{regex:p,parser:L}:T.replace(/^\[|\]$/g,"")}return function(x){for(var C={},M=0,D=0;M<z;M+=1){var c=E[M];if(typeof c=="string")D+=c.length;else{var g=c.regex,b=c.parser,m=x.slice(D),I=g.exec(m)[0];b.call(C,I),x=x.replace(I,"")}}return(function(o){var W=o.afternoon;if(W!==void 0){var u=o.hours;W?u<12&&(o.hours+=12):u===12&&(o.hours=0),delete o.afternoon}})(C),C}}return function(v,U,R){R.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(S=v.parseTwoDigitYear);var E=U.prototype,z=E.parse;E.parse=function(G){var T=G.date,k=G.utc,p=G.args;this.$u=k;var L=p[1];if(typeof L=="string"){var x=p[2]===!0,C=p[3]===!0,M=x||C,D=p[2];C&&(D=p[2]),F=this.$locale(),!x&&D&&(F=R.Ls[D]),this.$d=(function(m,I,o,W){try{if(["x","X"].indexOf(I)>-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-DpBz6UHc.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-BWc4ICs9.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-_5lXYMaO.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===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 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.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*hr;return new ht(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function be(t,e,n,r){return arguments.length===1?yr(t):new ht(t,e,n,r??1)}function ht(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function pn(t){if(isNaN(t.h))return new ft(t.l,0,0,t.opacity);var e=t.h*dr;return new ft(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}cn(ht,be,un(ln,{brighter(t){return new ht(this.h,this.c,this.l+ne*(t??1),this.opacity)},darker(t){return new ht(this.h,this.c,this.l-ne*(t??1),this.opacity)},rgb(){return pn(this).rgb()}}));function kr(t){return function(e,n){var r=t((e=be(e)).h,(n=be(n)).h),i=ue(e.c,n.c),s=ue(e.l,n.l),a=ue(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const pr=kr(Hn);function vr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const ge=new Date,ye=new Date;function nt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(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<y-s?a:y},i.offset=(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),!(s<a)||!(y>0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(S<s&&s<a);return F},i.filter=s=>nt(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 _=w<S;_&&([S,w]=[w,S]);const Y=P&&typeof P.range=="function"?P:F(S,w,P),X=Y?Y.range(S,+w+1):[];return _?X.reverse():X}function F(S,w,P){const _=Math.abs(w-S)/P,Y=Qn(([,,v])=>v).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]<a[Y][2]/_?Y-1:Y];return X.every(B)}return[y,F]}const[Yr,Fr]=_r(kt,Rt,zt,xt,Pt,Nt);function pe(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ve(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $t(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ur(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,F=t.shortMonths,S=Ot(i),w=Ht(i),P=Ot(s),_=Ht(s),Y=Ot(a),X=Ht(a),B=Ot(y),v=Ht(y),U=Ot(F),R=Ht(F),E={a:m,A:I,b:o,B:W,c:null,d:Xe,e:Xe,f:ti,g:li,G:di,H:Qr,I:Jr,j:Kr,L:Dn,m:ei,M:ni,p:u,q:K,Q:Qe,s:Je,S:ri,u:ii,U:si,V:ai,w:oi,W:ci,x:null,X:null,y:ui,Y:fi,Z:hi,"%":je},z={a:l,A:$,b:O,B:j,c:null,d:Ge,e:Ge,f:ki,g:Si,G:Yi,H:mi,I:gi,j:yi,L:Cn,m:pi,M:vi,p:H,q:J,Q:Qe,s:Je,S:Ti,u:xi,U:bi,V:wi,w:Di,W:Mi,x:null,X:null,y:Ci,Y:_i,Z:Fi,"%":je},G={a:x,A:C,b:M,B:D,c,d:Be,e:Be,f:Zr,g:qe,G:ze,H:Ze,I:Ze,j:Rr,L:Br,m:Vr,M:zr,p:L,q:Pr,Q:Gr,s:jr,S:qr,u:Wr,U:$r,V:Or,w:Ar,W:Hr,x:g,X:b,y:qe,Y:ze,Z:Nr,"%":Xr};E.x=T(n,E),E.X=T(r,E),E.c=T(e,E),z.x=T(n,z),z.X=T(r,z),z.c=T(e,z);function T(h,N){return function(V){var f=[],tt=-1,A=0,Q=h.length,Z,st,at;for(V instanceof Date||(V=new Date(+V));++tt<Q;)h.charCodeAt(tt)===37&&(f.push(h.slice(A,tt)),(st=Re[Z=h.charAt(++tt)])!=null?Z=h.charAt(++tt):st=Z==="e"?" ":"0",(at=N[Z])&&(Z=at(V,st)),f.push(Z),A=tt+1);return f.push(h.slice(A,tt)),f.join("")}}function k(h,N){return function(V){var f=$t(1900,void 0,1),tt=p(f,h,V+="",0),A,Q;if(tt!=V.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(N&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>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<A;){if(f>=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<n?new Array(n-s+1).join(e)+i:i)}function Lr(t){return t.replace(Ir,"\\$&")}function Ot(t){return new RegExp("^(?:"+t.map(Lr).join("|")+")","i")}function Ht(t){return new Map(t.map((e,n)=>[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)<T?Y:y(T)<T?X:a(T)<T?B:s(T)<T?v:r(T)<T?i(T)<T?U:R:n(T)<T?E:z)(T)}return w.invert=function(T){return new Date(P(T))},w.domain=function(T){return arguments.length?_(Array.from(T,Ii)):_().map(Ei)},w.ticks=function(T){var k=_();return t(k[0],k[k.length-1],T??10)},w.tickFormat=function(T,k){return k==null?G:S(k)},w.nice=function(T){var k=_();return(!T||typeof T.range!="function")&&(T=e(k[0],k[k.length-1],T??10)),T?_(vr(k,T)):w},w.copy=function(){return Kn(w,_n(t,e,n,r,i,s,a,y,F,S))},w}function Li(){return er.apply(_n(Yr,Fr,kt,Rt,zt,xt,Pt,Nt,vt,ie).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var jt={exports:{}},Ai=jt.exports,Ke;function Wi(){return Ke||(Ke=1,(function(t,e){(function(n,r){t.exports=r()})(Ai,(function(){var n="day";return function(r,i,s){var a=function(S){return S.add(4-S.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var w,P,_,Y,X=a(this),B=(w=this.isoWeekYear(),P=this.$u,_=(P?s.utc:s)().year(w).startOf("year"),Y=4-_.isoWeekday(),_.isoWeekday()>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<z;G+=1){var T=E[G],k=X[T],p=k&&k[0],L=k&&k[1];E[G]=L?{regex:p,parser:L}:T.replace(/^\[|\]$/g,"")}return function(x){for(var C={},M=0,D=0;M<z;M+=1){var c=E[M];if(typeof c=="string")D+=c.length;else{var g=c.regex,b=c.parser,m=x.slice(D),I=g.exec(m)[0];b.call(C,I),x=x.replace(I,"")}}return(function(o){var W=o.afternoon;if(W!==void 0){var u=o.hours;W?u<12&&(o.hours+=12):u===12&&(o.hours=0),delete o.afternoon}})(C),C}}return function(v,U,R){R.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(S=v.parseTwoDigitYear);var E=U.prototype,z=E.parse;E.parse=function(G){var T=G.date,k=G.utc,p=G.args;this.$u=k;var L=p[1];if(typeof L=="string"){var x=p[2]===!0,C=p[3]===!0,M=x||C,D=p[2];C&&(D=p[2]),F=this.$locale(),!x&&D&&(F=R.Ls[D]),this.$d=(function(m,I,o,W){try{if(["x","X"].indexOf(I)>-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-koxYdU4T.js b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BH8WCC4D.js similarity index 99% rename from apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-koxYdU4T.js rename to apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BH8WCC4D.js index 290fc91a8..779ec7618 100644 --- a/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-koxYdU4T.js +++ b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BH8WCC4D.js @@ -1,4 +1,4 @@ -import{I as le}from"./chunk-2Q5K7J3B-BRQfHNsr.js";import{p as he}from"./chunk-JWPE2WC7-CPYc1Q95.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-DHQD1STq.js";import{p as Ee}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.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|<br\s*\/?>/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-CqtdGPMZ.js";import{p as he}from"./chunk-JWPE2WC7-BtckK32c.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-DpBz6UHc.js";import{p as Ee}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.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|<br\s*\/?>/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-BkulrdXm.css b/apps/kimi-code/dist-web/assets/index-BkulrdXm.css deleted file mode 100644 index 3aa9729d1..000000000 --- a/apps/kimi-code/dist-web/assets/index-BkulrdXm.css +++ /dev/null @@ -1 +0,0 @@ -.ui-tip__bubble[data-v-93bacf6d]{position:fixed;z-index:var(--z-tooltip);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tip-lines);max-width:280px;padding:4px 8px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:1.35;overflow:hidden;overflow-wrap:anywhere;pointer-events:none;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.ui-tip__bubble.positioned[data-v-93bacf6d]{opacity:1}.ui-icon-button[data-v-2cbeca98]{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.ui-icon-button[data-v-2cbeca98]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text)}.ui-icon-button[data-v-2cbeca98]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-icon-button[data-v-2cbeca98]:disabled{opacity:.5;cursor:not-allowed}.ui-icon-button--sm[data-v-2cbeca98]{width:var(--icon-button-sm);height:var(--icon-button-sm);border-radius:var(--radius-sm)}.ui-icon-button--md[data-v-2cbeca98]{width:32px;height:32px}.ui-icon-button--lg[data-v-2cbeca98]{width:44px;height:44px}.ui-icon-button[data-v-2cbeca98] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--sm[data-v-2cbeca98] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--lg[data-v-2cbeca98] svg{width:var(--p-ic-lg);height:var(--p-ic-lg)}.ui-action-toast-host[data-v-e6936dfd]{position:fixed;top:calc(48px + var(--space-2));left:50%;translate:-50% 0;z-index:var(--z-toast);max-width:calc(100vw - 32px)}.ui-action-toast[data-v-e6936dfd]{display:flex;align-items:center;gap:var(--space-2);padding:4px 6px 4px 14px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.45;color:var(--color-text);white-space:nowrap}.ui-action-toast__body[data-v-e6936dfd]{min-width:0}.ui-action-toast__body button[data-v-e6936dfd-s]{border:0;padding:0;background:none;color:var(--color-accent);cursor:pointer;font:inherit}.ui-action-toast__body button[data-v-e6936dfd-s]:hover{color:var(--color-accent-hover);text-decoration:underline}.ui-action-toast__body button[data-v-e6936dfd-s]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--radius-xs)}.ui-action-toast__close[data-v-e6936dfd]{flex:none}.ui-badge[data-v-d879fe18]{display:inline-flex;align-items:center;gap:6px;border-radius:var(--radius-full);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;border:.5px solid transparent}.ui-badge--md[data-v-d879fe18]{height:22px;padding:0 9px;font-size:var(--text-xs)}.ui-badge--sm[data-v-d879fe18]{height:18px;padding:0 7px;font-size:11px}.ui-badge__dot[data-v-d879fe18]{width:6px;height:6px;border-radius:var(--radius-full);background:currentColor;flex:none}.ui-badge--neutral[data-v-d879fe18]{background:var(--color-surface-sunken);color:var(--color-text-muted);border-color:var(--color-line)}.ui-badge--info[data-v-d879fe18]{background:var(--color-accent-soft);color:var(--color-accent-hover);border-color:var(--color-accent-bd)}.ui-badge--success[data-v-d879fe18]{background:var(--color-success-soft);color:var(--color-success);border-color:var(--color-success-bd)}.ui-badge--warning[data-v-d879fe18]{background:var(--color-warning-soft);color:var(--color-warning);border-color:var(--color-warning-bd)}.ui-badge--danger[data-v-d879fe18]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-badge--solid[data-v-d879fe18]{background:var(--color-text);color:var(--color-bg)}.ui-banner[data-v-6d739c6d]{display:flex;align-items:center;gap:10px;padding:10px 14px;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal)}.ui-banner__icon[data-v-6d739c6d]{display:inline-flex;flex:none}.ui-banner__icon svg[data-v-6d739c6d]{width:18px;height:18px}.ui-banner--info[data-v-6d739c6d]{background:var(--color-accent-soft);border-color:var(--color-accent-bd)}.ui-banner--warning[data-v-6d739c6d]{background:var(--color-warning-soft);border-color:var(--color-warning-bd)}.ui-banner--danger[data-v-6d739c6d]{background:var(--color-danger-soft);border-color:var(--color-danger-bd)}.ui-banner--info .ui-banner__icon[data-v-6d739c6d]{color:var(--color-accent)}.ui-banner--warning .ui-banner__icon[data-v-6d739c6d]{color:var(--color-warning)}.ui-banner--danger .ui-banner__icon[data-v-6d739c6d]{color:var(--color-danger)}.ui-spinner[data-v-476ed1b4]{display:inline-flex;flex:none;color:var(--color-accent)}.ui-spinner--xs[data-v-476ed1b4]{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-spinner--xs .ui-spinner__track[data-v-476ed1b4],.ui-spinner--xs .ui-spinner__arc[data-v-476ed1b4]{r:10.875px;stroke-width:calc(var(--p-ring-stroke) * 1.5)}.ui-spinner--xs .ui-spinner__arc[data-v-476ed1b4]{stroke-dasharray:67.7 67.7;stroke-dashoffset:45.9}.ui-spinner--sm[data-v-476ed1b4]{width:14px;height:14px}.ui-spinner--md[data-v-476ed1b4]{width:18px;height:18px}.ui-spinner--lg[data-v-476ed1b4]{width:28px;height:28px}.ui-spinner__svg[data-v-476ed1b4]{width:100%;height:100%}.ui-spinner__track[data-v-476ed1b4]{fill:none;stroke:var(--color-line);stroke-width:2.2}.ui-spinner__arc[data-v-476ed1b4]{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-dasharray:56 56;stroke-dashoffset:38}.ui-button[data-v-01b5ec22]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);border:.5px solid transparent;border-radius:var(--radius-md);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;cursor:pointer;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.ui-button[data-v-01b5ec22]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ui-button[data-v-01b5ec22]:not(:disabled):active{transform:scale(.98)}.ui-button[data-v-01b5ec22]:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.ui-button--sm[data-v-01b5ec22]{height:30px;padding:0 var(--space-3);font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-button--md[data-v-01b5ec22]{height:36px;padding:0 var(--space-4);font-size:var(--text-base)}.ui-button--lg[data-v-01b5ec22]{height:42px;padding:0 var(--space-5);font-size:15px;border-radius:var(--radius-lg)}.ui-button__content[data-v-01b5ec22]{display:inline-flex;align-items:center;gap:var(--space-2)}.ui-button__content[data-v-01b5ec22] svg{flex:none}.ui-button__content[data-v-01b5ec22] svg:not([width]){width:1em;height:1em}.ui-button--primary[data-v-01b5ec22]{background:var(--color-accent);color:var(--color-text-on-accent);border-color:var(--color-accent);box-shadow:var(--shadow-xs)}.ui-button--primary[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ui-button--secondary[data-v-01b5ec22]{background:var(--color-surface-raised);color:var(--color-text);border-color:var(--color-line-strong);box-shadow:var(--shadow-xs)}.ui-button--secondary[data-v-01b5ec22]:not(:disabled):hover{border-color:var(--color-line-strong);background:var(--color-hover)}.ui-button--ghost[data-v-01b5ec22]{background:transparent;color:var(--color-text-muted);border-color:transparent}.ui-button--ghost[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-hover);color:var(--color-text-strong)}.ui-button--danger[data-v-01b5ec22]{background:var(--color-danger);color:var(--color-text-on-accent);border-color:var(--color-danger);box-shadow:var(--shadow-xs)}.ui-button--danger[data-v-01b5ec22]:not(:disabled):hover{filter:brightness(.96)}.ui-button--danger-soft[data-v-01b5ec22]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-button--danger-soft[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-danger);color:var(--color-text-on-accent);border-color:var(--color-danger)}.ui-button.is-loading .ui-button__content[data-v-01b5ec22]{opacity:.7}.ui-button .ui-button__spinner[data-v-01b5ec22]{flex:none;color:inherit}.ui-button__spinner[data-v-01b5ec22] .ui-spinner__track{opacity:.35}.ui-card[data-v-fbd05138]{background:var(--color-surface);border:.5px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.ui-card.is-elevated[data-v-fbd05138]{box-shadow:var(--shadow-md);border-color:transparent}.ui-card__head[data-v-fbd05138]{display:flex;align-items:center;gap:var(--space-2);padding:10px 14px;border-bottom:.5px solid var(--color-line);background:var(--color-surface);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.ui-card__body[data-v-fbd05138]{padding:14px;color:var(--color-text-muted)}.ui-card__foot[data-v-fbd05138]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding:10px 14px;border-top:.5px solid var(--color-line);background:var(--color-surface)}.ui-check[data-v-d4bf4026]{display:inline-flex;align-items:center;gap:var(--space-2);cursor:pointer}.ui-check.is-disabled[data-v-d4bf4026]{opacity:.5;cursor:not-allowed}.ui-check__input[data-v-d4bf4026]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.ui-check__box[data-v-d4bf4026]{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;flex:none;border:.5px solid var(--color-line-strong);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text-on-accent);transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out)}.ui-check.is-on .ui-check__box[data-v-d4bf4026]{background:var(--color-accent);border-color:var(--color-accent)}.ui-check__input:focus-visible+.ui-check__box[data-v-d4bf4026]{box-shadow:var(--p-focus-ring)}.ui-check__box svg[data-v-d4bf4026]{width:12px;height:12px}.ui-check__label[data-v-d4bf4026]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text)}.ctx-ring[data-v-de787cf2]{width:16px;height:16px;flex:none;transform:rotate(-90deg)}.ctx-ring-track[data-v-de787cf2]{stroke:var(--line)}.ctx-ring-fill[data-v-de787cf2]{stroke:var(--color-accent);transition:stroke-dashoffset .3s ease,stroke .3s ease}.ui-dialog__overlay[data-v-ebbc1a68]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:#0d111747;animation:kimi-dialog-overlay-in-ebbc1a68 var(--duration-base) var(--ease-out)}@keyframes kimi-dialog-overlay-in-ebbc1a68{0%{opacity:0}to{opacity:1}}.ui-dialog[data-v-ebbc1a68]{max-height:calc(100vh - var(--space-8) * 2);display:flex;flex-direction:column;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);outline:none;overflow:hidden;animation:kimi-card-in var(--duration-slow) var(--ease-out)}.ui-dialog--md[data-v-ebbc1a68]{width:min(440px,100%)}.ui-dialog--lg[data-v-ebbc1a68]{width:min(640px,100%)}.ui-dialog--xl[data-v-ebbc1a68]{width:min(var(--p-content-max),100%)}.ui-dialog--fixed-height[data-v-ebbc1a68]{height:min(680px,calc(100vh - var(--space-8) * 2))}.ui-dialog--grouped[data-v-ebbc1a68]{background:var(--color-bg)}.ui-dialog--flush .ui-dialog__body[data-v-ebbc1a68]{padding:0}.ui-dialog__head[data-v-ebbc1a68]{display:flex;align-items:flex-start;gap:var(--space-3);padding:20px 22px 14px}.ui-dialog__titles[data-v-ebbc1a68]{flex:1;min-width:0}.ui-dialog__title[data-v-ebbc1a68]{font-size:var(--text-lg);font-weight:500;color:var(--color-text);line-height:var(--leading-tight)}.ui-dialog__desc[data-v-ebbc1a68]{margin-top:4px;font-size:var(--text-base);color:var(--color-text-muted)}.ui-dialog__close[data-v-ebbc1a68]{flex:none;margin-top:-2px}.ui-dialog__body[data-v-ebbc1a68]{flex:1;min-height:0;padding:4px 22px 18px;color:var(--color-text);overflow:auto}.ui-dialog__foot[data-v-ebbc1a68]{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.ui-empty[data-v-6da80932]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-8) var(--space-4);text-align:center;color:var(--color-text-muted)}.ui-empty__icon[data-v-6da80932]{color:var(--color-text-faint)}.ui-empty__icon[data-v-6da80932] svg{width:48px;height:48px}.ui-empty__title[data-v-6da80932]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-empty__hint[data-v-6da80932]{font-size:var(--text-sm);color:var(--color-text-muted)}.ui-field[data-v-a8de5f7f]{display:flex;flex-direction:column;gap:6px}.ui-field__label[data-v-a8de5f7f]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-field__hint[data-v-a8de5f7f]{font-size:var(--text-xs);color:var(--color-text-faint)}.ui-field__error[data-v-a8de5f7f]{font-size:var(--text-xs);color:var(--color-danger)}.ui-input[data-v-f1cdf732]{width:100%;border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-overlay);box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-input--md[data-v-f1cdf732]{height:38px}.ui-input--sm[data-v-f1cdf732]{height:32px;font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-input[data-v-f1cdf732]::placeholder{color:var(--color-text-faint)}.ui-input[data-v-f1cdf732]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-input[data-v-f1cdf732]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-input[data-v-f1cdf732]:disabled{opacity:.5;cursor:not-allowed}.ui-input[readonly][data-v-f1cdf732]{background:var(--color-surface-sunken)}.ui-input.has-error[data-v-f1cdf732]{border-color:var(--color-danger)}.ui-input.has-error[data-v-f1cdf732]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}.ui-kbd[data-v-04b30ce2]{display:inline-flex;align-items:center;gap:3px;flex:none}.ui-kbd__key[data-v-04b30ce2]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:.5px solid var(--color-line);border-radius:var(--radius-xs);background:transparent;color:inherit;font-family:var(--font-kbd);font-size:11px;line-height:1}.ui-menu[data-v-9be2c64a]{min-width:180px;padding:3.5px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);display:flex;flex-direction:column}.ui-menu-item[data-v-3427559a]{display:flex;align-items:center;gap:7px;width:100%;padding:5px 9px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-option-label);line-height:var(--leading-tight);text-align:left;cursor:pointer;transition:background var(--duration-base),color var(--duration-base)}.ui-menu-item[data-v-3427559a]:hover:not(:disabled):not(.is-active):not(.is-danger){background:var(--color-hover);color:var(--color-text-strong)}.ui-menu-item[data-v-3427559a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-menu-item[data-v-3427559a]:disabled{opacity:.5;cursor:not-allowed}.ui-menu-item.is-active[data-v-3427559a]{background:var(--color-hover);color:var(--color-text)}.ui-menu-item.is-danger[data-v-3427559a]{color:var(--color-danger)}.ui-menu-item.is-danger[data-v-3427559a]:hover:not(:disabled){background:var(--color-danger-soft)}.ui-menu-item[data-v-3427559a] svg{display:block;width:16px;height:16px;flex:none;color:var(--muted);transition:color var(--duration-base)}.ui-menu-item[data-v-3427559a]:hover:not(:disabled):not(.is-active):not(.is-danger) svg{color:var(--color-text-strong)}.ui-menu-item.is-active[data-v-3427559a] svg{color:var(--color-text)}.ui-menu-item.is-danger[data-v-3427559a] svg{color:var(--color-danger)}.ui-menu-item--lg[data-v-3427559a]{min-height:44px;padding:12px 14px;font-size:var(--text-sm)}.ui-menu-sep[data-v-3427559a]{height:1px;margin:4px 0;background:var(--color-line)}.ui-tip[data-v-414bd903]{display:contents}.ui-panel-header[data-v-eb14b05d]{flex:none;display:flex;align-items:center;gap:var(--space-2);height:var(--panel-head-h, 48px);padding:0 var(--panel-head-inset, 11px) 0 var(--space-3);box-sizing:border-box;min-width:0;border-bottom:.5px solid var(--color-line);background:var(--color-surface-deep)}.ui-panel-header__title[data-v-eb14b05d]{flex:none;font:var(--weight-semibold) var(--ui-b2) var(--font-ui);color:var(--color-text)}.ui-panel-header__sub[data-v-eb14b05d]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--ui-c1) var(--font-mono);color:var(--color-text-muted)}.ui-panel-header__close[data-v-eb14b05d]{flex:none;margin-left:auto}.ui-panel-header.wrap[data-v-eb14b05d]{flex-wrap:wrap;height:auto;min-height:var(--panel-head-h, 48px);padding-top:3px;padding-bottom:3px;gap:4px 6px}.ui-panel-header.wrap .ui-panel-header__close[data-v-eb14b05d]{margin-left:0}.ui-pill[data-v-fe6a2873]{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:default;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}button.ui-pill[data-v-fe6a2873]{cursor:pointer}button.ui-pill[data-v-fe6a2873]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text-strong)}button.ui-pill[data-v-fe6a2873]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}button.ui-pill[data-v-fe6a2873]:disabled{opacity:.5;cursor:not-allowed}.ui-pill.is-active[data-v-fe6a2873]{background:var(--color-accent-soft);color:var(--color-accent)}.ui-pill[data-v-fe6a2873] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);flex:none;color:var(--color-text-faint)}.ui-scroll-area[data-v-9c504ebc]{position:relative;min-width:0;min-height:0;overflow:hidden}.ui-scroll-area__viewport[data-v-9c504ebc]{width:100%;height:100%;overscroll-behavior:contain;scrollbar-width:none}.ui-scroll-area__viewport[data-v-9c504ebc]::-webkit-scrollbar{display:none}.ui-scroll-area__viewport[data-v-9c504ebc]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ui-scroll-area__bar[data-v-9c504ebc]{position:absolute;z-index:3;opacity:0;pointer-events:none;touch-action:none;transition:opacity var(--duration-base) var(--ease-out)}.ui-scroll-area__bar.is-visible[data-v-9c504ebc]{opacity:1;pointer-events:auto}.ui-scroll-area__bar--vertical[data-v-9c504ebc]{inset:2px 2px 2px auto;width:10px}.ui-scroll-area__bar--horizontal[data-v-9c504ebc]{inset:auto 2px 2px;height:10px}.ui-scroll-area__thumb[data-v-9c504ebc]{position:absolute;display:block;border-radius:999px;background:color-mix(in srgb,var(--color-text-muted) 62%,transparent);transition:background var(--duration-fast) var(--ease-out),width var(--duration-fast) var(--ease-out),height var(--duration-fast) var(--ease-out)}.ui-scroll-area__bar--vertical .ui-scroll-area__thumb[data-v-9c504ebc]{right:1px;width:4px}.ui-scroll-area__bar--horizontal .ui-scroll-area__thumb[data-v-9c504ebc]{bottom:1px;height:4px}.ui-scroll-area__bar:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__thumb[data-v-9c504ebc]:active{background:color-mix(in srgb,var(--color-text-muted) 82%,transparent)}.ui-scroll-area__bar--vertical:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__bar--vertical .ui-scroll-area__thumb[data-v-9c504ebc]:active{width:6px}.ui-scroll-area__bar--horizontal:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__bar--horizontal .ui-scroll-area__thumb[data-v-9c504ebc]:active{height:6px}.ui-seg[data-v-b09ef1d1]{position:relative;display:inline-flex;gap:2px;padding:2px;background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md)}.ui-seg__indicator[data-v-b09ef1d1]{position:absolute;top:0;left:0;z-index:0;border-radius:var(--radius-sm);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);opacity:0;pointer-events:none;transition:transform var(--duration-base) var(--ease-out),width var(--duration-base) var(--ease-out),height var(--duration-base) var(--ease-out),opacity var(--duration-fast) var(--ease-out)}.ui-seg__indicator.is-ready[data-v-b09ef1d1]{opacity:1}.ui-seg__item[data-v-b09ef1d1]{position:relative;z-index:1;display:inline-flex;align-items:center;gap:var(--space-1);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-weight:var(--weight-medium);cursor:pointer;line-height:1;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-seg__swatch[data-v-b09ef1d1]{width:7px;height:7px;border:.5px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:50%;flex:none}.ui-seg__icon[data-v-b09ef1d1]{flex:none}.ui-seg--md .ui-seg__item[data-v-b09ef1d1]{padding:5px var(--space-3);font-size:var(--text-sm)}.ui-seg--sm .ui-seg__item[data-v-b09ef1d1]{height:24px;padding:0 var(--space-2);font-size:var(--text-sm)}.ui-seg--xs .ui-seg__item[data-v-b09ef1d1]{height:20px;padding:0 var(--space-2);font-size:var(--text-xs)}.ui-seg__item[data-v-b09ef1d1]:hover:not(.is-on){color:var(--color-text)}.ui-seg__item.is-on[data-v-b09ef1d1]{color:var(--color-text)}.ui-seg__item[data-v-b09ef1d1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-select[data-v-63f5dcbc]{position:relative;width:100%;font-family:var(--font-ui)}.ui-select.is-open[data-v-63f5dcbc]{z-index:var(--z-dropdown)}.ui-select__trigger[data-v-63f5dcbc]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:100%;padding:0 var(--space-3);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out)}.ui-select--md[data-v-63f5dcbc]{height:38px}.ui-select--sm[data-v-63f5dcbc]{height:32px}.ui-select--sm .ui-select__trigger[data-v-63f5dcbc]{font-size:var(--text-sm)}.ui-select__trigger[data-v-63f5dcbc]:hover:not(:disabled){border-color:var(--color-line-strong)}.ui-select__trigger[data-v-63f5dcbc]:focus-visible,.ui-select.is-open .ui-select__trigger[data-v-63f5dcbc]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-select.has-error .ui-select__trigger[data-v-63f5dcbc]{border-color:var(--color-danger)}.ui-select.has-error .ui-select__trigger[data-v-63f5dcbc]:focus-visible{box-shadow:0 0 0 3px var(--color-danger-soft)}.ui-select__value[data-v-63f5dcbc]{min-width:0;flex:1;display:flex;align-items:center;gap:var(--space-2);overflow:hidden;white-space:nowrap}.ui-select__value-text[data-v-63f5dcbc]{min-width:0;overflow:hidden;text-overflow:ellipsis}.ui-select__value.is-placeholder[data-v-63f5dcbc]{color:var(--color-text-faint)}.ui-select__icon[data-v-63f5dcbc]{flex:none;width:14px;height:14px;border-radius:3px}.ui-select__icon--option[data-v-63f5dcbc]{width:16px;height:16px;border-radius:4px}.ui-select__chevron[data-v-63f5dcbc]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-base) var(--ease-out)}.ui-select.is-open .ui-select__chevron[data-v-63f5dcbc]{transform:rotate(180deg)}.ui-select.is-disabled[data-v-63f5dcbc]{opacity:.5}.ui-select.is-disabled .ui-select__trigger[data-v-63f5dcbc]{cursor:not-allowed}.ui-select__menu[data-v-63f5dcbc]{position:absolute;z-index:var(--z-dropdown);top:calc(100% + var(--space-1));left:0;width:100%;max-height:260px;overflow-y:auto;padding:var(--space-1);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.ui-select__group[data-v-63f5dcbc]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ui-select__option[data-v-63f5dcbc]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.ui-select__option.is-active[data-v-63f5dcbc]{background:var(--color-hover);color:var(--color-text-strong)}.ui-select__option[data-v-63f5dcbc]:disabled{opacity:.45;cursor:not-allowed}.ui-select__check[data-v-63f5dcbc]{flex:none;color:transparent}.ui-select__option.is-selected .ui-select__check[data-v-63f5dcbc]{color:var(--color-accent)}.kw-dot[data-v-644d641a]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-text-faint);flex:none}.kw-dot--ok[data-v-644d641a]{background:var(--color-success)}.kw-dot--error[data-v-644d641a]{background:var(--color-danger)}.kw-dot--suspended[data-v-644d641a]{background:var(--color-warning)}.kw-dot--running[data-v-644d641a]{background:var(--color-accent);animation:kw-dot-pulse-644d641a 1.4s var(--ease-out) infinite}@keyframes kw-dot-pulse-644d641a{0%{box-shadow:0 0 color-mix(in srgb,var(--color-accent) 40%,transparent)}to{box-shadow:0 0 0 6px transparent}}.ui-switch[data-v-2fc56545]{position:relative;width:36px;height:20px;flex:none;padding:0;border:.5px solid var(--color-line-strong);border-radius:var(--radius-full);background:var(--color-line-strong);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ui-switch.is-on[data-v-2fc56545]{background:var(--color-accent)}.ui-switch[data-v-2fc56545]:disabled{opacity:.5;cursor:not-allowed}.ui-switch[data-v-2fc56545]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-switch__thumb[data-v-2fc56545]{position:absolute;top:1.5px;left:1.5px;width:16px;height:16px;border-radius:var(--radius-full);background:var(--color-text-on-accent);box-shadow:var(--shadow-xs);transform-origin:left center;transition:transform var(--duration-base) var(--ease-out)}.ui-switch:not(:disabled):hover .ui-switch__thumb[data-v-2fc56545]{transform:scaleX(1.125)}.ui-switch.is-on .ui-switch__thumb[data-v-2fc56545]{transform:translate(16px);transform-origin:right center}.ui-switch.is-on:not(:disabled):hover .ui-switch__thumb[data-v-2fc56545]{transform:translate(16px) scaleX(1.125)}.ui-toast[data-v-62bc76d1]{display:flex;align-items:flex-start;gap:11px;width:360px;max-width:100%;padding:13px 14px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);line-height:1.45}.ui-toast__icon[data-v-62bc76d1]{flex:none;width:20px;height:20px;margin-top:1px;border-radius:var(--radius-full);display:grid;place-items:center;background:var(--color-accent-soft);color:var(--color-accent)}.ui-toast__icon svg[data-v-62bc76d1]{width:12px;height:12px}.ui-toast--success .ui-toast__icon[data-v-62bc76d1]{background:var(--color-success-soft);color:var(--color-success)}.ui-toast--warning .ui-toast__icon[data-v-62bc76d1]{background:var(--color-warning-soft);color:var(--color-warning)}.ui-toast--danger .ui-toast__icon[data-v-62bc76d1]{background:var(--color-danger-soft);color:var(--color-danger)}.ui-toast--danger[data-v-62bc76d1]{border-color:color-mix(in srgb,var(--color-danger) 35%,transparent)}.ui-toast__body[data-v-62bc76d1]{flex:1;min-width:0}.ui-toast__title[data-v-62bc76d1]{font-size:var(--text-base);font-weight:500;color:var(--color-text);overflow-wrap:anywhere}.ui-toast__msg[data-v-62bc76d1]{margin-top:2px;font-size:var(--text-sm);color:var(--color-text-muted);overflow-wrap:anywhere}.ui-toast--danger .ui-toast__msg[data-v-62bc76d1]{color:var(--color-danger)}.ui-toast__close[data-v-62bc76d1]{flex:none;margin:-3px -4px 0 0}.sd-search[data-v-d69c7a8c]{position:relative;margin:0 22px;padding-bottom:var(--space-1)}.sd-search[data-v-d69c7a8c] .ui-input{padding-right:30px}.search-clear[data-v-d69c7a8c]{position:absolute;top:0;bottom:var(--space-1);right:var(--space-2);margin-block:auto;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-hover);color:var(--color-text-faint);cursor:pointer;visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast),background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.search-clear.is-on[data-v-d69c7a8c]{visibility:visible;opacity:1}.search-clear[data-v-d69c7a8c]:hover{background:var(--color-selected);color:var(--color-text-muted)}.search-clear[data-v-d69c7a8c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}@media(prefers-reduced-motion:reduce){.search-clear[data-v-d69c7a8c]{transition:none}}.sd-body[data-v-d69c7a8c]{height:100%;min-height:0;display:flex;flex-direction:column;gap:var(--space-2);padding-top:4px}.sd-list[data-v-d69c7a8c]{flex:1;min-height:0;overflow-y:auto;padding:var(--space-1) var(--space-2)}.sd-row[data-v-d69c7a8c]{display:flex;flex-direction:column;gap:2px;width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:none;cursor:pointer;text-align:left;font-family:var(--font-ui);color:var(--color-text)}.sd-row[data-v-d69c7a8c]:hover{background:var(--color-hover)}.sd-row.on[data-v-d69c7a8c]{background:var(--color-selected)}.sd-row.active .sd-title[data-v-d69c7a8c]{color:var(--color-accent-hover)}.sd-meta[data-v-d69c7a8c]{display:flex;align-items:center;gap:var(--space-1);min-width:0;font-size:var(--text-xs);color:var(--color-text-muted)}.sd-folder[data-v-d69c7a8c]{flex:none;color:var(--color-text-muted)}.sd-ws[data-v-d69c7a8c]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-time[data-v-d69c7a8c]{flex:none;font-family:var(--font-mono);color:var(--color-text-faint)}.sd-title[data-v-d69c7a8c]{min-width:0;font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-snippet[data-v-d69c7a8c]{min-width:0;font-size:var(--text-sm);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-title[data-v-d69c7a8c] mark{background:var(--color-accent-soft);color:inherit;font-weight:var(--weight-semibold);border-radius:var(--radius-xs);padding:0 1px}.sd-meta[data-v-d69c7a8c] mark,.sd-snippet[data-v-d69c7a8c] mark{background:var(--color-accent-soft);color:var(--color-text);font-weight:var(--weight-medium);border-radius:var(--radius-xs);padding:0 1px}.sd-empty[data-v-d69c7a8c]{height:100%;display:flex;align-items:center;justify-content:center}.sd-foot[data-v-d69c7a8c]{flex:none;display:flex;align-items:center;gap:var(--space-1);padding:var(--space-2) var(--space-4);border-top:.5px solid var(--color-line);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.sd-hint[data-v-d69c7a8c]{display:inline-flex;align-items:center;gap:var(--space-1)}.sd-dot[data-v-d69c7a8c]{margin:0 var(--space-1)}:where(.markstream-vue) button{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.markstream-vue li:has(.checkbox-node){list-style-type:none;margin-left:calc(-1 * var(--ms-flow-list-indent))}.markstream-vue .text-node{white-space:pre-wrap;overflow-wrap:break-word}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.markstream-vue .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.markstream-vue .pointer-events-none{pointer-events:none}.markstream-vue .\!visible{visibility:visible!important}.markstream-vue .visible{visibility:visible}.markstream-vue .collapse{visibility:collapse}.markstream-vue .static{position:static}.markstream-vue .fixed{position:fixed}.markstream-vue .absolute{position:absolute}.markstream-vue .relative{position:relative}.markstream-vue .inset-0{inset:0}.markstream-vue .right-2{right:8px}.markstream-vue .right-6{right:24px}.markstream-vue .top-2{top:8px}.markstream-vue .top-6{top:24px}.markstream-vue .z-10{z-index:10}.markstream-vue .z-50{z-index:50}.markstream-vue .m-0{margin:0}.markstream-vue .mx-0\.5{margin-left:2px;margin-right:2px}.markstream-vue .mr-2{margin-right:8px}.markstream-vue .mt-2{margin-top:8px}.markstream-vue .block{display:block}.markstream-vue .inline{display:inline}.markstream-vue .flex{display:flex}.markstream-vue .inline-flex{display:inline-flex}.markstream-vue .table{display:table}.markstream-vue .flow-root{display:flow-root}.markstream-vue .grid{display:grid}.markstream-vue .contents{display:contents}.markstream-vue .list-item{display:list-item}.markstream-vue .hidden{display:none}.markstream-vue .h-4{height:16px}.markstream-vue .h-full{height:100%}.markstream-vue .max-h-full{max-height:100%}.markstream-vue .min-h-full{min-height:100%}.markstream-vue .w-2\/3{width:66.666667%}.markstream-vue .w-4{width:16px}.markstream-vue .w-4\/5{width:80%}.markstream-vue .w-full{width:100%}.markstream-vue .min-w-\[160px\]{min-width:160px}.markstream-vue .max-w-full{max-width:100%}.markstream-vue .flex-1{flex:1 1 0%}.markstream-vue .flex-shrink{flex-shrink:1}.markstream-vue .flex-shrink-0{flex-shrink:0}.markstream-vue .shrink{flex-shrink:1}.markstream-vue .shrink-0{flex-shrink:0}.markstream-vue .border-collapse{border-collapse:collapse}.markstream-vue .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.markstream-vue .animate-spin{animation:spin 1s linear infinite}.markstream-vue .cursor-grab{cursor:grab}.markstream-vue .cursor-grabbing{cursor:grabbing}.markstream-vue .cursor-not-allowed{cursor:not-allowed}.markstream-vue .cursor-pointer{cursor:pointer}.markstream-vue .resize{resize:both}.markstream-vue .list-decimal{list-style-type:decimal}.markstream-vue .list-disc{list-style-type:disc}.markstream-vue .flex-wrap{flex-wrap:wrap}.markstream-vue .items-center{align-items:center}.markstream-vue .items-baseline{align-items:baseline}.markstream-vue .justify-center{justify-content:center}.markstream-vue .justify-between{justify-content:space-between}.markstream-vue .gap-0\.5{gap:2px}.markstream-vue .gap-1\.5{gap:6px}.markstream-vue .gap-2{gap:8px}.markstream-vue .gap-\[var\(--ms-gap-header-actions\)\]{gap:var(--ms-gap-header-actions)}.markstream-vue .gap-x-1{-moz-column-gap:4px;column-gap:4px}.markstream-vue .gap-x-2{-moz-column-gap:8px;column-gap:8px}.markstream-vue .overflow-hidden{overflow:hidden}.markstream-vue .overflow-x-auto{overflow-x:auto}.markstream-vue .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markstream-vue .whitespace-nowrap{white-space:nowrap}.markstream-vue .whitespace-pre-wrap{white-space:pre-wrap}.markstream-vue .rounded{border-radius:calc(var(--ms-radius) * .5)}.markstream-vue .rounded-lg{border-radius:var(--ms-radius)}.markstream-vue .rounded-md{border-radius:calc(var(--ms-radius) * .75)}.markstream-vue .border{border-width:1px}.markstream-vue .border-b{border-bottom-width:1px}.markstream-vue .border-t{border-top-width:1px}.markstream-vue .border-\[var\(--code-border\)\]{border-color:var(--code-border)}.markstream-vue .border-\[var\(--footnote-border\)\]{border-color:var(--footnote-border)}.markstream-vue .border-\[var\(--hr-border\)\]{border-color:var(--hr-border)}.markstream-vue .bg-\[hsl\(var\(--ms-popover\)\)\]{background-color:hsl(var(--ms-popover))}.markstream-vue .bg-\[var\(--code-header-bg\)\]{background-color:var(--code-header-bg)}.markstream-vue .p-0{padding:0}.markstream-vue .p-1{padding:4px}.markstream-vue .p-4{padding:16px}.markstream-vue .p-\[var\(--ms-action-btn-padding\)\]{padding:var(--ms-action-btn-padding)}.markstream-vue .px-1\.5{padding-left:6px;padding-right:6px}.markstream-vue .px-2{padding-left:8px;padding-right:8px}.markstream-vue .px-4{padding-left:16px;padding-right:16px}.markstream-vue .px-\[var\(--ms-inset-panel-x\)\]{padding-left:var(--ms-inset-panel-x);padding-right:var(--ms-inset-panel-x)}.markstream-vue .py-0\.5{padding-top:2px;padding-bottom:2px}.markstream-vue .py-1\.5{padding-top:6px;padding-bottom:6px}.markstream-vue .py-\[var\(--ms-inset-panel-y\)\]{padding-top:var(--ms-inset-panel-y);padding-bottom:var(--ms-inset-panel-y)}.markstream-vue .pb-3{padding-bottom:12px}.markstream-vue .pt-2{padding-top:8px}.markstream-vue .text-left{text-align:left}.markstream-vue .text-center{text-align:center}.markstream-vue .text-right{text-align:right}.markstream-vue .font-mono{font-family:var(--ms-font-mono)}.markstream-vue .text-\[length\:var\(--ms-text-label\)\]{font-size:var(--ms-text-label)}.markstream-vue .text-sm{font-size:14px;line-height:20px}.markstream-vue .text-xs{font-size:12px;line-height:16px}.markstream-vue .font-medium{font-weight:500}.markstream-vue .font-semibold{font-weight:600}.markstream-vue .uppercase{text-transform:uppercase}.markstream-vue .lowercase{text-transform:lowercase}.markstream-vue .italic{font-style:italic}.markstream-vue .leading-\[normal\]{line-height:normal}.markstream-vue .leading-none{line-height:1}.markstream-vue .leading-relaxed{line-height:1.625}.markstream-vue .text-\[\#0366d6\]{--tw-text-opacity: 1;color:rgb(3 102 214 / var(--tw-text-opacity, 1))}.markstream-vue .text-\[hsl\(var\(--ms-popover-foreground\)\)\]{color:hsl(var(--ms-popover-foreground))}.markstream-vue .text-\[var\(--code-action-fg\)\]{color:var(--code-action-fg)}.markstream-vue .text-\[var\(--code-fg\)\]{color:var(--code-fg)}.markstream-vue .underline{text-decoration-line:underline}.markstream-vue .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markstream-vue .opacity-0{opacity:0}.markstream-vue .opacity-50{opacity:.5}.markstream-vue .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.markstream-vue .shadow-\[var\(--ms-shadow-popover\)\]{--tw-shadow-color: var(--ms-shadow-popover);--tw-shadow: var(--tw-shadow-colored)}.markstream-vue .outline{outline-style:solid}.markstream-vue .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-\[height\]{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.markstream-vue .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.markstream-vue{--ms-background: 0 0% 100%;--ms-foreground: 0 0% 10%;--ms-muted: 0 0% 96.5%;--ms-muted-foreground: 0 0% 43%;--ms-secondary: 0 0% 93.5%;--ms-secondary-foreground: 0 0% 10%;--ms-accent: 0 0% 91%;--ms-accent-foreground: 0 0% 10%;--ms-primary: 0 0% 10%;--ms-primary-foreground: 0 0% 100%;--ms-destructive: 0 62% 52%;--ms-destructive-foreground: 0 0% 100%;--ms-border: 0 0% 87%;--ms-ring: 0 0% 10%;--ms-popover: 0 0% 100%;--ms-popover-foreground: 0 0% 10%;--ms-radius: 8px;--ms-info: 215 60% 50%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 56% 39%;--ms-success-foreground: 0 0% 100%;--ms-warning: 38 64% 46%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 50% 36%;--ms-diff-removed: 0 58% 48%;--ms-highlight: 50 60% 72%;--ms-highlight-foreground: 0 0% 0%;--ms-font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--ms-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace}.dark .markstream-vue,.markstream-vue.dark{--ms-background: 0 0% 7%;--ms-foreground: 0 0% 93%;--ms-muted: 0 0% 12%;--ms-muted-foreground: 0 0% 60%;--ms-secondary: 0 0% 16%;--ms-secondary-foreground: 0 0% 93%;--ms-accent: 0 0% 24%;--ms-accent-foreground: 0 0% 93%;--ms-primary: 0 0% 93%;--ms-primary-foreground: 0 0% 10%;--ms-destructive: 0 60% 50%;--ms-destructive-foreground: 0 0% 93%;--ms-border: 0 0% 20%;--ms-ring: 0 0% 80%;--ms-popover: 0 0% 9%;--ms-popover-foreground: 0 0% 93%;--ms-info: 215 55% 62%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 48% 55%;--ms-success-foreground: 0 0% 100%;--ms-warning: 32 65% 58%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 42% 60%;--ms-diff-removed: 0 58% 58%;--ms-highlight: 48 65% 50%;--ms-highlight-foreground: 0 0% 0%;--ms-shadow-subtle: 0 1px 3px 0 hsl(0 0% 0% / .25);--ms-shadow-popover: 0 4px 6px -1px hsl(0 0% 0% / .2), 0 2px 4px -2px hsl(0 0% 0% / .15);--ms-shadow-modal: 0 10px 15px -3px hsl(0 0% 0% / .5), 0 4px 6px -4px hsl(0 0% 0% / .4);--ms-shadow-preview: 0 10px 40px hsl(0 0% 0% / .6);--tooltip-bg: hsl(0 0% 12%);--tooltip-fg: hsl(0 0% 72%);--code-bg: #111827;--code-header-bg: hsl(var(--ms-muted));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 12%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 12%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 12%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 12%, transparent)}.markstream-vue{font-family:var(--ms-font-sans);font-size:var(--ms-text-body);line-height:var(--ms-leading-body);--inline-code-bg: hsl(var(--ms-secondary));--inline-code-fg: hsl(var(--ms-foreground) / .75);--inline-code-border: hsl(var(--ms-border) / .9);--code-bg: #fff;--code-fg: hsl(var(--ms-foreground));--code-border: hsl(var(--ms-border));--code-header-bg: hsl(var(--ms-secondary));--code-selection-bg: hsl(var(--ms-accent) / .3);--code-line-number: hsl(var(--ms-muted-foreground));--markstream-code-line-number-align: right;--code-action-fg: hsl(var(--ms-muted-foreground));--code-action-hover-bg: hsl(var(--ms-accent));--code-action-hover-fg: hsl(var(--ms-accent-foreground));--code-action-active-bg: hsl(var(--ms-primary));--code-action-active-fg: hsl(var(--ms-primary-foreground));--diff-added-fg: hsl(var(--ms-diff-added));--diff-removed-fg: hsl(var(--ms-diff-removed));--diff-added-bg: hsl(var(--ms-diff-added) / .1);--diff-added-inline-bg: hsl(var(--ms-diff-added) / .2);--diff-removed-bg: hsl(var(--ms-diff-removed) / .1);--diff-removed-inline-bg: hsl(var(--ms-diff-removed) / .2);--blockquote-border: hsl(var(--ms-muted-foreground) / .2);--admonition-bg: hsl(var(--ms-muted));--admonition-border: hsl(var(--ms-border));--admonition-fg: hsl(var(--ms-foreground));--admonition-muted: hsl(var(--ms-muted-foreground));--admonition-header-bg: hsl(var(--ms-muted) / .5);--admonition-note: hsl(var(--ms-info));--admonition-tip: hsl(var(--ms-success));--admonition-warning: hsl(var(--ms-warning));--admonition-danger: hsl(var(--ms-destructive));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 6%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 6%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 6%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 6%, transparent);--table-border: hsl(var(--ms-border));--table-header-bg: hsl(var(--ms-muted));--link-color: hsl(var(--ms-info));--list-marker: hsl(var(--ms-muted-foreground) / .5);--list-counter-marker: hsl(var(--ms-muted-foreground));--hr-border: hsl(var(--ms-border));--highlight-bg: hsl(var(--ms-highlight));--footnote-border: hsl(var(--ms-border));--tooltip-bg: hsl(0 0% 18%);--tooltip-fg: hsl(0 0% 88%);--tooltip-border: hsl(var(--ms-border));--modal-overlay: hsl(0 0% 0% / .7);--modal-bg: hsl(var(--ms-popover));--modal-fg: hsl(var(--ms-popover-foreground));--diagram-bg: hsl(var(--ms-muted));--diagram-border: hsl(var(--ms-border));--diagram-header-bg: hsl(var(--ms-muted));--loading-spinner: hsl(var(--ms-muted-foreground));--loading-shimmer: hsl(var(--ms-muted) / .5);--image-placeholder-bg: hsl(var(--ms-muted));--focus-ring: hsl(var(--ms-ring));--ms-space-1: 4px;--ms-space-1_5: 6px;--ms-space-2: 8px;--ms-space-2_5: 10px;--ms-space-3: 12px;--ms-space-4: 16px;--ms-space-5: 20px;--ms-space-6: 24px;--ms-space-8: 32px;--ms-space-12: 48px;--ms-flow-paragraph-y: 1.5em;--ms-flow-list-y: 1em;--ms-flow-list-item-y: .25em;--ms-flow-list-indent: 1.625em ;--ms-flow-list-indent-mobile: calc(14 / 9 * 1em);--ms-flow-table-y: 2em;--ms-flow-table-cell: .5em .75em;--ms-flow-blockquote-y: 1.25em;--ms-flow-blockquote-indent: 1.25em;--ms-flow-admonition-y: 1.25em;--ms-flow-footnote-y: .5em;--ms-flow-hr-y: 2.5em;--ms-flow-diagram-y: 1.5em;--ms-flow-codeblock-y: 1.5em;--ms-flow-definition-term-mt: .75em;--ms-flow-definition-desc-ml: 1.25em;--ms-flow-definition-desc-mb: .5em;--ms-flow-heading-1-mt: 0;--ms-flow-heading-1-mb: 1em;--ms-flow-heading-2-mt: 2em;--ms-flow-heading-2-mb: .75em;--ms-flow-heading-3-mt: 1.5em;--ms-flow-heading-3-mb: .6em;--ms-flow-heading-4-mt: 1.25em;--ms-flow-heading-4-mb: .4em;--ms-flow-heading-5-mt: 1em;--ms-flow-heading-5-mb: .25em;--ms-flow-heading-6-mt: 1em;--ms-flow-heading-6-mb: .25em;--ms-text-body: 16px;--ms-leading-body: 1.75;--ms-text-h1: 36px;--ms-text-h2: 24px;--ms-text-h3: 20px;--ms-text-h4: 16px;--ms-text-h5: 16px;--ms-text-h6: 16px;--ms-leading-h1: 1.2;--ms-leading-h2: 1.35;--ms-leading-h3: 1.5;--ms-weight-h1: 700;--ms-weight-h2: 600;--ms-weight-h3: 600;--ms-weight-h4: 600;--ms-text-label: 12px;--ms-action-btn-padding: 6px;--ms-action-btn-icon: 14px;--ms-inset-panel-x: 10px;--ms-inset-panel-y: 6px;--ms-inset-panel-body-sm: 8px;--ms-inset-panel-body: 16px;--ms-inset-admonition-body-top: 8px;--ms-inset-admonition-body-bottom: 12px;--ms-gap-header: var(--ms-space-4);--ms-gap-header-main: var(--ms-space-2_5);--ms-gap-header-actions: var(--ms-space-2);--ms-shadow-subtle: 0 1px 3px 0 hsl(var(--ms-foreground) / .06);--ms-shadow-popover: 0 4px 6px -1px hsl(var(--ms-foreground) / .1), 0 2px 4px -2px hsl(var(--ms-foreground) / .1);--ms-shadow-modal: 0 10px 15px -3px hsl(var(--ms-foreground) / .1), 0 4px 6px -4px hsl(var(--ms-foreground) / .1);--ms-shadow-preview: 0 10px 40px hsl(var(--ms-foreground) / .25);--ms-duration-fast: .12s;--ms-duration-standard: .18s;--ms-duration-overlay: .2s;--ms-duration-emphasis: .22s;--ms-duration-slow: .3s;--ms-duration-stream: .28s;--ms-ease-linear: linear;--ms-ease-standard: ease;--ms-ease-out: ease-out;--ms-ease-in-out: ease-in-out;--ms-ease-spring: cubic-bezier(.16, 1, .3, 1);--ms-border-width: 1px;--ms-border-width-strong: 4px;--ms-focus-ring-width: 2px;--ms-focus-ring-offset: 2px;--ms-size-diagram-min-height: 360px;--ms-size-code-max-height: 500px;--ms-size-image-max-width: 384px;--ms-size-image-min-width: 128px;--ms-size-image-min-height: 1.5em;--ms-size-math-min-height: 40px;--ms-size-skeleton-min-height: 120px}body>div[id^=dmermaid-]{position:fixed;top:-10000px;left:0;width:100%;visibility:hidden;pointer-events:none}.markstream-vue .hover\:bg-\[var\(--code-action-hover-bg\)\]:hover{background-color:var(--code-action-hover-bg)}.markstream-vue .hover\:text-\[var\(--code-action-hover-fg\)\]:hover{color:var(--code-action-hover-fg)}.markstream-vue .hover\:underline:hover{text-decoration-line:underline}.markstream-vue .active\:scale-\[0\.96\]:active{--tw-scale-x: .96;--tw-scale-y: .96;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.markstream-vue .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.markstream-vue .disabled\:opacity-40:disabled{opacity:.4}.checkbox-node[data-v-be21ab83]{display:inline-flex;align-items:center;margin-right:.5em;vertical-align:-.15em}.checkbox-icon[data-v-be21ab83]{flex-shrink:0}.checkbox-unchecked[data-v-be21ab83]{color:hsl(var(--ms-muted-foreground) / .5)}.checkbox-checked[data-v-be21ab83]{color:hsl(var(--ms-info))}.emoji-node[data-v-de55dc97]{display:inline-block}.footnote-reference[data-v-c1463a29]{font-size:.75em;line-height:0}.footnote-link[data-v-c1463a29]{color:var(--link-color);text-decoration:none}.footnote-link[data-v-c1463a29]:hover{text-decoration:underline}.html-inline-node[data-v-d17f12b0]{display:inline}.html-inline-node--loading[data-v-d17f12b0]{opacity:.85}.inline-code[data-v-4e331c97]{display:inline;font-family:var(--ms-font-mono);font-size:.8125em;line-height:inherit;color:var(--inline-code-fg);background-color:var(--inline-code-bg);padding:.15em .35em;border-radius:.25em;white-space:normal;word-break:break-word;max-width:100%;-webkit-box-decoration-break:clone;box-decoration-break:clone}.inline-code-stream-delta[data-v-4e331c97]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both}.inline-code-stream-delta--a[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-a-4e331c97}.inline-code-stream-delta--b[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-b-4e331c97}@keyframes inline-code-stream-update-fade-a-4e331c97{0%{opacity:0}to{opacity:1}}@keyframes inline-code-stream-update-fade-b-4e331c97{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.inline-code-stream-delta[data-v-4e331c97]{animation:none!important}}.image-node-container[data-v-046e82ac]{display:inline-block;position:relative;vertical-align:middle;max-width:var(--ms-size-image-max-width)}.image-node__img[data-v-046e82ac]{display:inline-block;max-width:100%;min-width:var(--ms-size-image-min-width);min-height:var(--ms-size-image-min-height);height:auto;vertical-align:middle;transition:opacity var(--ms-duration-emphasis) var(--ms-ease-standard)}.image-node__img.is-loading[data-v-046e82ac]{opacity:0}.image-node__img.is-loaded[data-v-046e82ac]{opacity:1}.image-node__img.has-natural-size[data-v-046e82ac]{min-width:0;min-height:0}.image-placeholder[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:var(--ms-size-image-min-width);min-height:128px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));overflow:hidden;vertical-align:middle}.image-shimmer-overlay[data-v-046e82ac]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:hsl(var(--ms-muted));overflow:hidden}.image-shimmer-overlay .image-shimmer[data-v-046e82ac]{width:100%;height:100%}.image-shimmer[data-v-046e82ac]{display:block;width:100%;height:100%;min-height:128px;background:linear-gradient(90deg,hsl(var(--ms-muted)),hsl(var(--ms-muted-foreground) / .06),hsl(var(--ms-muted)));background-size:200% 100%;animation:image-shimmer-046e82ac 1.5s ease-in-out infinite}.image-node-container[data-markstream-viewport-pending=true] .image-shimmer[data-v-046e82ac]{animation:none}@keyframes image-shimmer-046e82ac{0%{background-position:100% 0}to{background-position:-100% 0}}.image-error[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:16px 24px;min-height:64px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground));font-size:var(--ms-text-label);vertical-align:middle}.image-node__raw-text[data-v-046e82ac]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}@media(prefers-reduced-motion:reduce){.image-shimmer[data-v-046e82ac]{animation:none!important}}.markstream-vue pre[class^=language-],.markstream-vue pre[class*=" language-"]{white-space:pre;overflow:auto;-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-variant-ligatures:none;contain:content;backface-visibility:hidden;transform:translateZ(0);-webkit-font-smoothing:antialiased}.markstream-vue pre[class^=language-]>code,.markstream-vue pre[class*=" language-"]>code{display:block}.markstream-vue pre[data-markstream-pre="1"]:not(.markstream-pre--diff-preview){background:var(--code-bg);color:var(--code-fg)}.markstream-vue pre.markstream-pre--line-numbers{position:relative}.markstream-vue pre.code-pre-fallback[data-markstream-code-loading="1"]{--markstream-pre-line-number-top: var(--markstream-code-padding-y, 8px);--markstream-pre-line-number-left: 0px;--markstream-pre-line-number-width: 2ch;--markstream-pre-line-number-padding-left: 2ch;--markstream-pre-line-number-padding-right: 1ch;--markstream-pre-line-number-separator-width: 2px;--markstream-code-padding-left: calc(6ch + 2px) ;box-sizing:border-box;width:100%;margin:0;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left);overflow:auto;border:0;border-radius:0;background:var(--code-bg);color:var(--code-fg);font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace );font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers{position:absolute;top:var(--markstream-pre-line-number-top, 0);left:var(--markstream-pre-line-number-left, 0);box-sizing:content-box;display:flex;flex-direction:column;align-items:flex-end;width:var(--markstream-pre-line-number-width, 2ch);min-width:var(--markstream-pre-line-number-width, 2ch);padding-left:var(--markstream-pre-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-line-number-padding-right, 1ch);border-right:var(--markstream-pre-line-number-separator-width, 2px) solid transparent;color:var(--code-line-number);font:inherit;font-variant-numeric:tabular-nums;line-height:inherit;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--line-numbers:not(.markstream-pre--diff-preview):not(.code-pre-fallback)>.markstream-pre__code{box-sizing:border-box;min-width:100%;padding-left:var(--markstream-code-padding-left, 52px);padding-right:var(--markstream-code-padding-x, 12px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-number{display:block;min-height:1lh}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-numbers-text{display:block;min-height:1lh;text-align:right;white-space:pre}.markstream-vue pre.markstream-pre--diff-preview{box-sizing:border-box;padding-left:0;padding-right:0;width:100%;--markstream-pre-diff-gutter-marker-width: var(--stream-monaco-gutter-marker-width, 4px);--markstream-pre-diff-gutter-gap: var(--stream-monaco-gutter-gap, 1ch);--markstream-pre-diff-code-gap: var(--stream-monaco-diff-code-gap, 1ch);--markstream-pre-diff-code-padding: var(--stream-monaco-diff-code-padding, 0px);--markstream-diff-added-fg: var(--diff-added-fg, #2f8f68);--markstream-diff-removed-fg: var(--diff-removed-fg, #c24141);--markstream-diff-added-line-fill: var(--diff-added-bg, rgb(47 143 104 / 12%));--markstream-diff-removed-line-fill: var(--diff-removed-bg, rgb(194 65 65 / 12%));--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-diff-removed-gutter: linear-gradient( 90deg, var(--markstream-diff-removed-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-pre-diff-line-number-width: var( --stream-monaco-line-number-width, 2ch );--markstream-pre-diff-line-number-padding-left: var(--stream-monaco-line-number-padding-left, 2ch);--markstream-pre-diff-line-number-padding-right: var(--stream-monaco-line-number-padding-right, 1ch);--markstream-pre-diff-line-number-separator-width: var(--stream-monaco-line-number-separator-width, 2px);--markstream-pre-diff-line-number-box-width: calc( var(--markstream-pre-diff-line-number-padding-left) + var(--markstream-pre-diff-line-number-width) + var(--markstream-pre-diff-line-number-padding-right) + var(--markstream-pre-diff-line-number-separator-width) );--markstream-pre-diff-line-number-bg: var( --stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg, transparent) );--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-original-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );--markstream-pre-diff-line-number-align: var(--markstream-diff-line-number-align, right);--markstream-pre-diff-code-fill-left: calc( var(--markstream-pre-diff-line-number-left) + var(--markstream-pre-diff-line-number-box-width) );--markstream-pre-diff-code-left: calc( var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-line-number-gap-to-code) + var(--markstream-pre-diff-code-padding) )}.markstream-vue pre.markstream-pre--diff-preview::-webkit-scrollbar{width:12px;height:12px}.markstream-vue pre.markstream-pre--diff-preview.is-wrap{white-space:pre-wrap;overflow-wrap:anywhere}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline{--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px )}.markstream-vue pre.markstream-pre--diff-preview>.markstream-pre__diff-code{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);font:inherit;line-height:inherit;min-width:100%;width:100%}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline>.markstream-pre__diff-code{grid-template-columns:minmax(0,1fr)}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap)>.markstream-pre__diff-code{grid-template-columns:minmax(100%,max-content);width:100%;min-width:-moz-max-content;min-width:max-content}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane{min-width:0;overflow:hidden}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{overflow-x:auto;overflow-y:hidden}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane-content{display:block;min-width:100%}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane-content{width:-moz-max-content;width:max-content}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap) .markstream-pre__diff-pane{min-width:-moz-max-content;min-width:max-content;width:100%;overflow:visible}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane--modified{--markstream-pre-diff-pane-divider-width: 1px;--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );box-shadow:inset 1px 0 var(--markstream-diff-pane-divider, hsl(var(--ms-border)))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified{--markstream-pre-diff-line-number-left: calc( var(--stream-monaco-line-number-left, 0px) + var(--markstream-pre-diff-pane-divider-width) )}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-rail{left:var(--markstream-pre-diff-pane-divider-width)}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line{padding-left:calc(var(--markstream-pre-diff-code-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line:before{left:calc(var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline .markstream-pre__diff-pane--modified{box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line{position:relative;display:block;box-sizing:border-box;width:100%;min-width:100%;min-height:var( --markstream-pre-diff-synced-row-height, var(--markstream-pre-diff-line-height, 18px) );padding-left:var(--markstream-pre-diff-code-left);line-height:var(--markstream-pre-diff-line-height, 18px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:before{content:"";position:absolute;left:var(--markstream-pre-diff-code-fill-left);right:0;top:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;border-radius:0;background:transparent}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:after{content:"";position:absolute;left:var(--markstream-pre-diff-line-number-left);top:0;width:var(--markstream-pre-diff-line-number-box-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-rail{position:absolute;z-index:2;top:0;left:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );width:var(--markstream-pre-diff-gutter-marker-width, 4px);min-width:var(--markstream-pre-diff-gutter-marker-width, 4px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-number{position:absolute;z-index:1;top:0;left:var(--markstream-pre-diff-line-number-left);width:var(--markstream-pre-diff-line-number-width);min-width:var(--markstream-pre-diff-line-number-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );box-sizing:content-box;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none;padding-left:var(--markstream-pre-diff-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-diff-line-number-padding-right, 1ch);border-right:var(--markstream-pre-diff-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg, var(--code-bg));color:var(--code-line-number);font-variant-numeric:tabular-nums;line-height:var(--markstream-pre-diff-line-height, 18px);text-align:var(--markstream-pre-diff-line-number-align, right);-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent));color:var(--stream-monaco-added-fg, var(--markstream-diff-added-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent));color:var(--stream-monaco-removed-fg, var(--markstream-diff-removed-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content{position:relative;z-index:1;display:block;width:-moz-max-content;width:max-content;min-width:100%;line-height:var(--markstream-pre-diff-line-height, 18px);white-space:inherit;overflow-wrap:normal;word-break:normal;line-break:auto}.markstream-vue pre.markstream-pre--diff-preview.is-wrap .markstream-pre__diff-content{width:auto;min-width:0;overflow-wrap:inherit}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content-inner{white-space:inherit;overflow-wrap:inherit;word-break:inherit;line-break:inherit;-webkit-box-decoration-break:clone;box-decoration-break:clone}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk{color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk:before{background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:before{background-image:linear-gradient(-45deg,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 12.5%,transparent 12.5%,transparent 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 62.5%,transparent 62.5%,transparent 100%);background-size:10px 10px;opacity:.38}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-number,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-content{display:none}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-collapsed:not(.code-pre-fallback){height:auto!important;min-height:0!important}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed{min-height:28px;padding-left:0;color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)));line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:before{left:0;height:28px;background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, rgb(0 0 0 / 4%)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-number{display:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-content{width:100%;min-width:0;padding-left:calc(var(--markstream-pre-diff-code-left) + 12px);line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:before{background:linear-gradient(var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent)),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:before{background:linear-gradient(var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent)),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:after{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))}.markstream-vue pre[class^=language-]:focus,.markstream-vue pre[class*=" language-"]:focus{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.text-node[data-v-fd79037c]{display:inline;font-weight:inherit;vertical-align:baseline}.text-node-center[data-v-fd79037c]{display:inline-flex;justify-content:center;width:100%}.text-node-stream-delta[data-v-fd79037c]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both;will-change:opacity}.text-node-stream-delta--a[data-v-fd79037c]{animation-name:text-node-stream-update-fade-a-fd79037c}.text-node-stream-delta--b[data-v-fd79037c]{animation-name:text-node-stream-update-fade-b-fd79037c}@keyframes text-node-stream-update-fade-a-fd79037c{0%{opacity:0}to{opacity:1}}@keyframes text-node-stream-update-fade-b-fd79037c{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.text-node-stream-delta[data-v-fd79037c]{animation:none!important}}.reference-node[data-v-775c65e4]{background-color:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground))}.reference-node[data-v-775c65e4]:hover{background-color:hsl(var(--ms-secondary))}.superscript-node[data-v-24160b22]{font-size:.8em;vertical-align:super}.subscript-node[data-v-197fa13b]{font-size:.8em;vertical-align:sub}.strong-node[data-v-a8647104]{font-weight:700}.strikethrough-node[data-v-b7a531fa]{text-decoration:line-through}.link-node[data-v-367e6ca4]{color:var(--link-color);text-decoration:none}.link-node[data-v-367e6ca4]:hover{text-decoration:underline;text-underline-offset:3.2px}.link-loading .link-text-wrapper[data-v-367e6ca4]{position:relative}.link-loading[data-v-367e6ca4]{color:var(--link-color)}.link-loading .link-text[data-v-367e6ca4]{position:relative;z-index:2}.link-loading-indicator[data-v-367e6ca4]{position:absolute;left:0;right:0;height:var(--underline-height, 2px);bottom:var(--underline-bottom, -3px);background:currentColor;border-radius:999px;will-change:opacity;opacity:var(--underline-rest-opacity, .18);animation:underlinePulse-367e6ca4 var(--underline-duration, 1.6s) var(--underline-timing, ease-in-out) var(--underline-iteration, infinite)}@keyframes underlinePulse-367e6ca4{0%,to{opacity:var(--underline-rest-opacity, .18)}50%{opacity:var(--underline-opacity, .35)}}@media(prefers-reduced-motion:reduce){.link-loading-indicator[data-v-367e6ca4]{animation:none;opacity:var(--underline-rest-opacity, .18)}}.insert-node[data-v-1e2c29d4]{text-decoration:underline}.highlight-node[data-v-7a62982a]{background-color:var(--highlight-bg);padding:0 3.2px;border-radius:.2em}.emphasis-node[data-v-2a5aafbf]{font-style:italic}.hard-break[data-v-50c58f70]{display:block}.blockquote[data-v-abfecebc]{font-weight:400;font-style:normal;color:var(--blockquote-fg, hsl(var(--ms-muted-foreground)));border-left:3px solid var(--blockquote-border);margin-top:var(--ms-flow-blockquote-y);margin-bottom:var(--ms-flow-blockquote-y);padding-left:var(--ms-flow-blockquote-indent)}.blockquote>.paragraph-node[data-v-abfecebc]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}.blockquote>.paragraph-node[data-v-abfecebc]:first-child{margin-top:0}.blockquote>.paragraph-node[data-v-abfecebc]:last-child{margin-bottom:0}.blockquote[data-v-abfecebc] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.definition-list[data-v-4e103b30]{margin:0 0 16px}.definition-term[data-v-4e103b30]{font-weight:600;margin-top:var(--ms-flow-definition-term-mt)}.definition-desc[data-v-4e103b30]{margin-left:var(--ms-flow-definition-desc-ml);margin-bottom:var(--ms-flow-definition-desc-mb)}.definition-list[data-v-4e103b30] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.footnote-anchor[data-v-e1eb37b6]{margin-left:8px;color:var(--link-color)}.footnote-node{margin-top:var(--ms-flow-footnote-y);margin-bottom:var(--ms-flow-footnote-y)}.markstream-vue [class*=footnote-] .markdown-renderer,.markstream-vue .flex-1 .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.heading-node[data-v-7122dbe1]{font-weight:500;line-height:1.25}hr+.heading-node[data-v-7122dbe1]{margin-top:0}.heading-1[data-v-7122dbe1]{font-size:var(--ms-text-h1);line-height:var(--ms-leading-h1);font-weight:var(--ms-weight-h1);margin-top:var(--ms-flow-heading-1-mt);margin-bottom:var(--ms-flow-heading-1-mb)}.heading-2[data-v-7122dbe1]{font-size:var(--ms-text-h2);line-height:var(--ms-leading-h2);font-weight:var(--ms-weight-h2);margin-top:var(--ms-flow-heading-2-mt);margin-bottom:var(--ms-flow-heading-2-mb)}.heading-3[data-v-7122dbe1]{font-size:var(--ms-text-h3);line-height:var(--ms-leading-h3);font-weight:var(--ms-weight-h3);margin-top:var(--ms-flow-heading-3-mt);margin-bottom:var(--ms-flow-heading-3-mb)}.heading-4[data-v-7122dbe1]{font-size:var(--ms-text-h4);font-weight:var(--ms-weight-h4);margin-top:var(--ms-flow-heading-4-mt);margin-bottom:var(--ms-flow-heading-4-mb)}.heading-5[data-v-7122dbe1]{font-size:var(--ms-text-h5);margin-top:var(--ms-flow-heading-5-mt);margin-bottom:var(--ms-flow-heading-5-mb)}.heading-6[data-v-7122dbe1]{font-size:var(--ms-text-h6);margin-top:var(--ms-flow-heading-6-mt);margin-bottom:var(--ms-flow-heading-6-mb)}.list-item[data-v-617214f9]{margin:var(--ms-flow-list-item-y) 0;padding-left:var(--ms-space-1_5)}ol>.list-item[data-v-617214f9]::marker{color:var(--list-counter-marker);line-height:1.6}ul>.list-item[data-v-617214f9]::marker{color:var(--list-marker)}.list-item>.paragraph-node[data-v-617214f9]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:0}.list-item[data-v-617214f9] .markdown-renderer{content-visibility:visible;contain-intrinsic-size:0px 0px;contain:content}.list-node[data-v-99cb95e0]{margin-top:var(--ms-flow-list-y);margin-bottom:var(--ms-flow-list-y);padding-left:var(--ms-flow-list-indent)}.list-decimal[data-v-99cb95e0]{list-style-type:decimal}.list-disc[data-v-99cb95e0]{list-style-type:disc}@media(max-width:1023px){.list-disc[data-v-99cb95e0]{margin-top:calc(4/3*1em);margin-bottom:calc(4/3*1em);padding-left:var(--ms-flow-list-indent-mobile)}}.html-block-node__raw[data-v-e140a874]{white-space:pre-wrap;overflow-wrap:anywhere;opacity:.85}.html-block-node__placeholder[data-v-e140a874]{display:flex;flex-direction:column;gap:5.6px;padding:8px 0}.html-block-node__placeholder-bar[data-v-e140a874]{display:block;height:12.8px;border-radius:9999px;background-image:linear-gradient(90deg,var(--loading-shimmer),transparent,var(--loading-shimmer));background-size:200% 100%}.paragraph-node[data-v-c59ff506]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}li .paragraph-node[data-v-c59ff506]{margin:0}.table-node-wrapper[data-v-39f87b5d]{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scrollbar-gutter:stable}.table-node[data-v-39f87b5d]{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;margin:var(--ms-flow-table-y) 0;font-size:inherit;border:1px solid var(--table-border);border-radius:var(--ms-radius);overflow:hidden;box-shadow:var(--ms-shadow-subtle)}.table-node[data-v-39f87b5d] th,.table-node[data-v-39f87b5d] td{border-bottom:1px solid var(--table-border);border-right:1px solid var(--table-border);padding:var(--ms-flow-table-cell);white-space:normal;overflow-wrap:break-word;word-break:normal}.table-node[data-v-39f87b5d] th:last-child,.table-node[data-v-39f87b5d] td:last-child{border-right:none}.table-node[data-v-39f87b5d] tbody tr:last-child td{border-bottom:none}.table-node[data-v-39f87b5d] thead th{position:relative;font-weight:600;background-color:var(--table-header-bg);border-bottom-width:2px}.table-node__resize-handle[data-v-39f87b5d]{position:absolute;top:0;right:-4px;bottom:0;z-index:1;width:8px;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none}.table-node__resize-handle[data-v-39f87b5d]:after{content:"";position:absolute;top:.35em;bottom:.35em;left:50%;width:2px;border-radius:9999px;background:color-mix(in srgb,var(--table-border) 45%,hsl(var(--ms-foreground)));opacity:0;transform:translate(-50%);transition:opacity var(--ms-duration-fast) var(--ms-ease-standard)}.table-node__resize-handle[data-v-39f87b5d]:hover:after,.table-node__resize-handle[data-v-39f87b5d]:focus-visible:after{opacity:1}.table-node[data-v-39f87b5d] tbody tr:nth-child(2n){background-color:hsl(var(--ms-muted) / .35)}.table-node[data-v-39f87b5d] tbody tr:hover{background-color:var(--code-action-hover-bg)}.table-node--loading tbody td[data-v-39f87b5d]{position:relative;overflow:hidden}.table-node--loading tbody td[data-v-39f87b5d]>*{visibility:hidden}.table-node--loading tbody td[data-v-39f87b5d]:after{content:"";position:absolute;inset:0;border-radius:calc(var(--ms-radius) * .5);background:linear-gradient(90deg,var(--loading-shimmer) 25%,var(--loading-shimmer) 50%,var(--loading-shimmer) 75%);background-size:200% 100%;animation:table-node-shimmer-39f87b5d 1.2s linear infinite;will-change:background-position}.table-node__loading[data-v-39f87b5d]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.table-node__spinner[data-v-39f87b5d]{width:40px;height:40px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-39f87b5d],.table-node-fade-leave-active[data-v-39f87b5d]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-39f87b5d],.table-node-fade-leave-to[data-v-39f87b5d]{opacity:0}[data-v-39f87b5d] .table-node .markdown-renderer{display:contents;content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}[data-v-39f87b5d] .table-node .markdown-renderer .node-slot,[data-v-39f87b5d] .table-node .markdown-renderer .node-content,[data-v-39f87b5d] .table-node .markdown-renderer .node-space{display:contents}[data-v-39f87b5d] .table-node .text-node,[data-v-39f87b5d] .table-node code{white-space:inherit;overflow-wrap:inherit;word-break:inherit;max-width:none}@keyframes table-node-shimmer-39f87b5d{0%{background-position:0% 0%}50%{background-position:100% 0%}to{background-position:200% 0%}}.hr+.table-node-wrapper[data-v-39f87b5d]{margin-top:0}.hr+.table-node-wrapper .table-node[data-v-39f87b5d]{margin-top:0}.sr-only[data-v-39f87b5d]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hr-node[data-v-39b2349c]{border-top-width:1px;border-color:var(--hr-border);margin:var(--ms-flow-hr-y) 0}.vmr-container[data-v-911e41c4]{margin-top:16px;margin-bottom:16px;border-radius:var(--ms-radius);border-width:1px;padding:16px;border-left-width:var(--ms-border-width-strong)}.height-estimation-probes[data-v-3e0766e2]{position:absolute;left:-100000px;top:0;visibility:hidden;pointer-events:none;overflow:hidden;z-index:-1}.node-content[data-v-3e0766e2]{width:100%}.node-content-flow-root[data-v-3e0766e2]{display:flow-root}.markdown-renderer[data-v-a9489508]{position:relative;contain:layout;content-visibility:auto;contain-intrinsic-size:800px 600px}.markdown-renderer.virtualized[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:auto}.markdown-renderer.stable-layout[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:none}.node-slot[data-v-a9489508],.node-content[data-v-a9489508]{width:100%}.markdown-renderer.virtualized .node-slot[data-v-a9489508],.markdown-renderer.virtualized .node-content[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-slot[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-content[data-v-a9489508]{display:flow-root}.node-placeholder[data-v-a9489508]{width:100%;min-height:16px;margin:4px 0}.node-placeholder[data-v-a9489508]:first-child{margin-top:0}.node-spacer[data-v-a9489508]{width:100%}.unknown-node[data-v-a9489508]{color:hsl(var(--ms-muted-foreground));font-style:italic;margin:var(--ms-flow-paragraph-y) 0}.typewriter-cursor[data-v-a9489508]{position:absolute;left:0;top:0;display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;visibility:hidden;animation:typewriter-cursor-blink-a9489508 1s steps(1,end) infinite}@keyframes typewriter-cursor-blink-a9489508{0%,49%{opacity:1}50%,to{opacity:0}}.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{content:"";display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;animation:typewriter-cursor-blink 1s steps(1,end) infinite}@media(prefers-reduced-motion:reduce){.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{animation:none}}.markstream-vue .fade-enter-from{opacity:0}.markstream-vue .fade-enter-active{transition:opacity var(--fade-duration, .28s) var(--fade-ease, cubic-bezier(.33, 0, .67, 1));will-change:opacity}.markstream-vue .fade-enter-to{opacity:1}.admonition[data-v-a83480e1]{position:relative;margin:var(--ms-flow-admonition-y) 0;padding:.25em .75em .375em;border:1px solid var(--admonition-border);border-radius:var(--ms-radius);color:var(--admonition-fg)}.admonition-legend[data-v-a83480e1]{position:absolute;top:0;left:.75em;transform:translateY(-50%);display:inline-flex;align-items:center;gap:.35em;padding:0 .5em;background-color:hsl(var(--ms-background));font-size:13px;font-weight:600;line-height:1}.admonition-icon[data-v-a83480e1]{flex-shrink:0}.admonition-title[data-v-a83480e1]{white-space:nowrap}.admonition-content[data-v-a83480e1]{padding-top:.25em;color:var(--admonition-fg)}.admonition-note[data-v-a83480e1],.admonition-info[data-v-a83480e1]{border-color:hsl(var(--ms-info) / .3);background-color:hsl(var(--ms-info) / .04)}.admonition-note .admonition-legend[data-v-a83480e1],.admonition-info .admonition-legend[data-v-a83480e1]{color:var(--admonition-note)}.admonition-tip[data-v-a83480e1]{border-color:hsl(var(--ms-success) / .3);background-color:hsl(var(--ms-success) / .04)}.admonition-tip .admonition-legend[data-v-a83480e1]{color:var(--admonition-tip)}.admonition-warning[data-v-a83480e1],.admonition-caution[data-v-a83480e1]{border-color:hsl(var(--ms-warning) / .3);background-color:hsl(var(--ms-warning) / .04)}.admonition-warning .admonition-legend[data-v-a83480e1],.admonition-caution .admonition-legend[data-v-a83480e1]{color:var(--admonition-warning)}.admonition-danger[data-v-a83480e1],.admonition-error[data-v-a83480e1]{border-color:hsl(var(--ms-destructive) / .3);background-color:hsl(var(--ms-destructive) / .04)}.admonition-danger .admonition-legend[data-v-a83480e1],.admonition-error .admonition-legend[data-v-a83480e1]{color:var(--admonition-danger)}.admonition-toggle[data-v-a83480e1]{margin-left:.25em;background:transparent;border:none;color:inherit;cursor:pointer;padding:2px;border-radius:calc(var(--ms-radius) * .5);display:inline-flex;align-items:center;transition:background-color var(--ms-duration-fast) var(--ms-ease-standard)}.admonition-toggle[data-v-a83480e1]:hover{background-color:hsl(var(--ms-accent))}.admonition-toggle[data-v-a83480e1]:focus-visible{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.admonition-content[data-v-a83480e1] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.tooltip-element[data-v-c606ee4c]{z-index:9999;display:inline-block;max-width:320px;padding:4px 8px;border-radius:calc(var(--ms-radius) * .75);font-size:12px;line-height:1.4;white-space:normal;word-break:break-word;pointer-events:none;background-color:var(--tooltip-bg);color:var(--tooltip-fg);box-shadow:inset 0 1px #ffffff26,0 0 0 1px #0000001f,var(--ms-shadow-popover);transition:transform var(--ms-duration-emphasis) var(--ms-ease-spring),box-shadow var(--ms-duration-emphasis) var(--ms-ease-spring)}.tooltip-arrow[data-v-c606ee4c]{position:absolute;width:6px;height:6px;background:inherit;transform:rotate(45deg)}.tooltip-arrow[data-placement^=top][data-v-c606ee4c]{bottom:-3px}.tooltip-arrow[data-placement^=bottom][data-v-c606ee4c]{top:-3px}.tooltip-arrow[data-placement^=left][data-v-c606ee4c]{right:-3px}.tooltip-arrow[data-placement^=right][data-v-c606ee4c]{left:-3px}.tooltip-enter-active[data-v-c606ee4c]{transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.tooltip-leave-active[data-v-c606ee4c]{transition:opacity .12s ease-in,transform .12s ease-in}.tooltip-enter-from[data-v-c606ee4c]{opacity:0;transform:scale(.96)}.tooltip-enter-to[data-v-c606ee4c],.tooltip-leave-from[data-v-c606ee4c]{opacity:1;transform:scale(1)}.tooltip-leave-to[data-v-c606ee4c]{opacity:0;transform:scale(.97)}.action-icon{width:var(--ms-action-btn-icon, 14px);height:var(--ms-action-btn-icon, 14px);max-width:20px;max-height:20px}.code-block-container{margin:var(--ms-flow-codeblock-y) 0;contain:layout style;container-type:inline-size;background:var(--code-bg);border-color:var(--code-border);color:var(--code-fg);box-shadow:var(--ms-shadow-subtle)}.code-block-header{position:relative;z-index:1;gap:var(--ms-gap-header);border-radius:var(--ms-radius) var(--ms-radius) 0 0;overflow:visible}.code-block-header .code-header-main{min-width:0;flex:1 1 auto;display:flex;align-items:center;gap:var(--ms-gap-header-main);overflow:hidden}.code-block-header .code-header-copy{min-width:0;display:grid;gap:2px}.code-block-header .code-header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ms-text-label);font-weight:500;color:var(--code-action-fg)}.code-block-header .code-header-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--code-line-number)}.code-block-header .code-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--ms-gap-header-actions);flex-wrap:wrap}.code-block-header .icon-slot{display:inline-flex;align-items:center;justify-content:center}.code-block-header .icon-slot svg,.code-block-header .icon-slot img{display:block;width:100%;height:100%}.code-diff-stats{display:inline-flex;align-items:center;gap:var(--ms-space-1_5);margin-right:var(--ms-space-1);font-size:var(--ms-text-label);font-weight:600;line-height:1;font-variant-numeric:tabular-nums}.code-diff-stat{display:inline-flex;align-items:center;padding:2px 6px;border-radius:var(--ms-radius);line-height:1}.code-diff-stat.removed{color:var(--diff-removed-fg);background:hsl(var(--ms-diff-removed) / .1)}.code-diff-stat.added{color:var(--diff-added-fg);background:hsl(var(--ms-diff-added) / .1)}.code-more-menu{position:absolute;top:100%;right:0;margin-top:4px;z-index:50;border-radius:var(--ms-radius)}.code-block-shell-content,.code-loading-placeholder{overflow:hidden;border-radius:0 0 var(--ms-radius) var(--ms-radius);contain:content}.code-block-shell-content--collapsed{height:0;min-height:0;visibility:hidden;pointer-events:none}.code-menu-enter-active,.code-menu-leave-active{transform-origin:top right}.code-menu-enter-active{transition:opacity .22s cubic-bezier(.16,1,.3,1),transform .22s cubic-bezier(.16,1,.3,1)}.code-menu-leave-active{transition:opacity .14s ease-in,transform .14s ease-in}.code-menu-enter-from{opacity:0;transform:scale(.9) translateY(-4px)}.code-menu-leave-to{opacity:0;transform:scale(.95) translateY(-2px)}.html-preview-frame__backdrop[data-v-24e66176]{position:fixed;inset:0;background-color:var(--modal-overlay);display:flex;align-items:center;justify-content:center;z-index:50}.html-preview-frame[data-v-24e66176]{width:80vw;max-width:960px;height:70vh;background-color:var(--modal-bg);color:var(--modal-fg);border-radius:calc(var(--ms-radius) * 2);overflow:hidden;box-shadow:var(--ms-shadow-preview);display:flex;flex-direction:column}.html-preview-frame__header[data-v-24e66176]{display:flex;justify-content:space-between;align-items:center;padding:6.4px 12px;border-bottom:1px solid var(--code-border)}.html-preview-frame__title[data-v-24e66176]{display:inline-flex;align-items:center;gap:6.4px;font-size:12px;font-weight:500;letter-spacing:.02em;text-transform:uppercase;opacity:.85}.html-preview-frame__dot[data-v-24e66176]{width:8px;height:8px;border-radius:999px;background-color:hsl(var(--ms-success))}.html-preview-frame__label[data-v-24e66176]{white-space:nowrap}.html-preview-frame__close[data-v-24e66176]{border:none;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:var(--modal-fg)}.html-preview-frame__iframe[data-v-24e66176]{width:100%;height:100%;border:none;display:block}@media(max-width:640px){.html-preview-frame[data-v-24e66176]{width:100vw;height:80vh;border-radius:0}}.code-block-container[data-v-ef6e4bb8]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--vscode-editor-selectionBackground: var(--markstream-code-fallback-selection-bg);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 16px 40px -32px hsl(var(--ms-foreground) / .18);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .92);--markstream-diff-editor-bg: hsl(var(--ms-background));--markstream-diff-editor-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-bg: hsl(var(--ms-muted));--markstream-diff-unchanged-divider: hsl(var(--ms-background) / .94);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .26);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: linear-gradient(180deg, var(--code-bg) 0%, hsl(var(--ms-muted)) 100%);--markstream-diff-panel-bg-soft: var(--code-bg);--markstream-diff-panel-bg-strong: var(--code-bg);--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .42);--markstream-diff-gutter-bg: transparent;--markstream-diff-gutter-guide: hsl(var(--ms-border) / .72);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(var(--ms-muted) / .45);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: var(--diff-added-fg);--markstream-diff-removed-fg: var(--diff-removed-fg);--markstream-diff-added-line: var(--diff-added-bg);--markstream-diff-removed-line: var(--diff-removed-bg);--markstream-diff-added-inline: var(--diff-added-inline-bg);--markstream-diff-removed-inline: var(--diff-removed-inline-bg);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: var(--diff-added-bg);--markstream-diff-removed-line-fill: var(--diff-removed-bg)}.code-block-container.is-dark[data-v-ef6e4bb8]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 18px 40px -30px hsl(var(--ms-foreground) / .84);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .82);--markstream-diff-editor-bg: #121212;--markstream-diff-editor-fg: #e5e5e5;--markstream-diff-unchanged-fg: #d4d4d4;--markstream-diff-unchanged-bg: #262626;--markstream-diff-unchanged-divider: hsl(0 0% 100% / .08);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .72);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: #121212;--markstream-diff-panel-bg-soft: #121212;--markstream-diff-panel-bg-strong: #121212;--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .34);--markstream-diff-gutter-bg: linear-gradient( 180deg, hsl(0 0% 7% / .94) 0%, hsl(0 0% 7% / .98) 100% );--markstream-diff-gutter-guide: hsl(var(--ms-muted-foreground) / .08);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(0 0% 7% / .98);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: hsl(152 42% 60%);--markstream-diff-removed-fg: hsl(0 58% 58%);--markstream-diff-added-line: hsl(152 42% 60% / .18);--markstream-diff-removed-line: hsl(0 58% 58% / .18);--markstream-diff-added-inline: hsl(152 42% 60% / .28);--markstream-diff-removed-inline: hsl(0 58% 58% / .28);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: hsl(152 42% 60% / .18);--markstream-diff-removed-line-fill: hsl(0 58% 58% / .18)}.code-editor-container[data-v-ef6e4bb8]{transition:none;box-sizing:border-box;min-width:0;width:100%}.code-block-container.is-diff .code-editor-container[data-v-ef6e4bb8]{transition:none}.code-editor-layer[data-v-ef6e4bb8]{display:grid;min-width:0;position:relative}.code-editor-layer--collapsed[data-v-ef6e4bb8]{height:0;min-height:0;overflow:hidden;visibility:hidden;pointer-events:none}.code-editor-layer>.code-editor-container[data-v-ef6e4bb8]{grid-area:1 / 1;z-index:1}.code-editor-layer>pre.code-pre-fallback[data-v-ef6e4bb8]{grid-area:1 / 1;position:relative;z-index:2}.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .monaco-editor-background,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .lines-content{background:var(--vscode-editor-background, var(--markstream-code-fallback-bg))!important}.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-lines,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-line,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-line span,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .line-numbers{color:var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))!important}.code-block-container.is-diff[data-v-ef6e4bb8]{color:var(--markstream-diff-shell-fg);border-color:var(--markstream-diff-shell-border);background:var(--markstream-diff-shell-bg);box-shadow:var(--markstream-diff-shell-shadow);--vscode-editor-selectionBackground: var(--markstream-diff-action-hover);--code-fg: var(--markstream-diff-shell-fg);--code-header-bg: transparent;--code-border: var(--markstream-diff-header-border);--code-line-number: var(--markstream-diff-shell-muted);--code-action-fg: var(--markstream-diff-shell-muted)}.code-block-container.is-diff .code-editor-layer[data-v-ef6e4bb8]{background:transparent;--vscode-editor-background: var(--markstream-diff-editor-bg);--vscode-editor-foreground: var(--markstream-diff-editor-fg);--vscode-diffEditor-unchangedRegionForeground: var(--markstream-diff-unchanged-fg);--vscode-diffEditor-unchangedRegionBackground: var(--markstream-diff-unchanged-bg);--vscode-focusBorder: var(--markstream-diff-focus);--vscode-widget-shadow: var(--markstream-diff-widget-shadow);--vscode-editor-selectionBackground: color-mix( in srgb, var(--markstream-diff-editor-bg) 90%, var(--markstream-diff-editor-fg) 10% );--stream-monaco-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-editor-fg: var(--markstream-diff-editor-fg);--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg);--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg);--stream-monaco-frame-radius: 0;--stream-monaco-fixed-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-frame-border: transparent;--stream-monaco-frame-shadow: none;--stream-monaco-panel-bg: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-soft: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-strong: var(--markstream-diff-editor-bg);--stream-monaco-panel-border: transparent;--stream-monaco-pane-divider: var(--markstream-diff-pane-divider);--stream-monaco-gutter-bg: var(--markstream-diff-gutter-bg);--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide);--stream-monaco-gutter-marker-width: 4px;--stream-monaco-gutter-gap: 1ch;--stream-monaco-line-number-bg: var(--markstream-diff-line-number-bg);--stream-monaco-line-number: var(--markstream-diff-line-number);--stream-monaco-line-number-active: var(--markstream-diff-line-number-active);--stream-monaco-line-number-left: 0px;--stream-monaco-line-number-width: 2ch;--stream-monaco-line-number-padding-left: 2ch;--stream-monaco-line-number-padding-right: 1ch;--stream-monaco-line-number-separator-width: 2px;--stream-monaco-layout-character-width: var(--markstream-code-layout-character-width, 1ch);--stream-monaco-line-number-box-width: calc( var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-line-number-separator-width) );--stream-monaco-diff-code-gap: 1ch;--stream-monaco-diff-code-padding: 0px;--stream-monaco-line-number-gap-to-code: var(--stream-monaco-diff-code-gap);--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) );--stream-monaco-original-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-original-scrollable-left: var(--stream-monaco-original-margin-width);--stream-monaco-original-scrollable-width: calc( 100% - var(--stream-monaco-original-margin-width) );--stream-monaco-modified-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-modified-scrollable-left: var(--stream-monaco-modified-margin-width);--stream-monaco-modified-scrollable-width: calc( 100% - var(--stream-monaco-modified-margin-width) );--stream-monaco-added-fg: var(--markstream-diff-added-fg);--stream-monaco-removed-fg: var(--markstream-diff-removed-fg);--stream-monaco-added-line: var(--markstream-diff-added-line);--stream-monaco-removed-line: var(--markstream-diff-removed-line);--stream-monaco-added-inline: var(--markstream-diff-added-inline);--stream-monaco-removed-inline: var(--markstream-diff-removed-inline);--stream-monaco-added-outline: transparent;--stream-monaco-removed-outline: transparent;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border);--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border);--stream-monaco-added-line-shadow: none;--stream-monaco-removed-line-shadow: none;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter);--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter);--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill);--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill);--stream-monaco-added-border: hsl(var(--ms-diff-added) / .25);--stream-monaco-removed-border: hsl(var(--ms-diff-removed) / .25);--stream-monaco-widget-shadow: var(--markstream-diff-widget-shadow)}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers{left:var(--stream-monaco-line-number-left)!important;width:var(--stream-monaco-line-number-width)!important;min-width:var(--stream-monaco-line-number-width)!important;box-sizing:content-box!important;background:var(--stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg))!important;padding-left:var(--stream-monaco-line-number-padding-left, 2ch)!important;padding-right:var(--stream-monaco-line-number-padding-right, 1ch)!important;border-right:var(--stream-monaco-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg)!important;text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums;box-shadow:none}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays .line-numbers *{text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-editor .stream-monaco-fallback-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-delete.line-numbers{background:var(--stream-monaco-removed-line-fill)!important;color:var(--stream-monaco-removed-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-editor .stream-monaco-fallback-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-insert.line-numbers{background:var(--stream-monaco-added-line-fill)!important;color:var(--stream-monaco-added-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .monaco-editor,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays{--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) ) !important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff){--markstream-code-line-number-box-width: calc( var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + 2px );--markstream-code-content-left: calc( var(--markstream-code-line-number-box-width) + var(--markstream-code-layout-character-width, 1ch) )}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin-view-overlays{width:var(--markstream-code-content-left)!important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .line-numbers{left:0!important;width:2ch!important;min-width:2ch!important;box-sizing:content-box!important;padding-left:2ch!important;padding-right:1ch!important;border-right:2px solid var(--vscode-editor-background)!important;text-align:var(--markstream-code-line-number-align, right)!important;font-variant-numeric:tabular-nums}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .monaco-scrollable-element.editor-scrollable{left:var(--markstream-code-content-left)!important;width:calc(100% - var(--markstream-code-content-left))!important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .lines-content{left:0!important}.code-editor-container[data-markstream-host-hidden=true][data-v-ef6e4bb8]{position:absolute;inset:0;width:100%;height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden;visibility:hidden;pointer-events:none}pre.code-pre-fallback[data-v-ef6e4bb8]{margin:0;box-sizing:border-box;width:100%;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left, 52px);background:var(--markstream-code-fallback-bg, var(--code-bg, #fff));color:var(--markstream-code-fallback-fg, var(--code-fg));backface-visibility:visible;transform:none;-webkit-font-smoothing:auto;font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px);font-weight:400;font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace )}pre.code-pre-fallback[data-v-ef6e4bb8] code{font-size:inherit;font-weight:inherit;line-height:inherit;font-family:inherit}pre.code-pre-fallback.is-wrap[data-v-ef6e4bb8]{white-space:pre-wrap;overflow-wrap:anywhere}pre.code-pre-fallback.markstream-pre--diff-preview[data-v-ef6e4bb8]{padding-left:0;padding-right:0}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview{background:var(--markstream-diff-editor-bg);transition:none}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-pane{box-sizing:border-box;padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added:after,.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after,.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays>.gutter-insert>.cmdr.gutter-insert{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-added-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays>.gutter-delete>.cmdr.gutter-delete{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-removed-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}@media(prefers-reduced-motion:reduce){.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview{transition:none}}.code-block-container.is-rendering .code-height-placeholder[data-v-ef6e4bb8]{background-size:400% 100%;animation:code-skeleton-shimmer-ef6e4bb8 1.2s ease-in-out infinite;min-height:var(--ms-size-skeleton-min-height);background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%)}.code-loading-placeholder[data-v-ef6e4bb8]{padding:16px;min-height:var(--ms-size-skeleton-min-height)}.loading-skeleton[data-v-ef6e4bb8]{display:flex;flex-direction:column;gap:12px}.skeleton-line[data-v-ef6e4bb8]{height:16px;background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%);background-size:400% 100%;animation:code-skeleton-shimmer-ef6e4bb8 1.2s ease-in-out infinite;border-radius:calc(var(--ms-radius) * .5)}.skeleton-line.short[data-v-ef6e4bb8]{width:60%}.code-block-container[data-markstream-viewport-pending=true] .code-height-placeholder[data-v-ef6e4bb8],.code-block-container[data-markstream-viewport-pending=true] .skeleton-line[data-v-ef6e4bb8]{animation:none}@keyframes code-skeleton-shimmer-ef6e4bb8{0%{background-position:100% 0}to{background-position:0 0}}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center{border-radius:var(--ms-radius)!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;min-height:28px!important;transition:background-color .14s ease,border-color .14s ease!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 4%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 10%,transparent)!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center{background:transparent!important;border-color:transparent!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 6%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 12%,transparent)!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center .stream-monaco-unchanged-count:before{content:"";display:inline-block;width:14px;height:14px;margin-right:4px;flex-shrink:0;background:currentColor;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");mask-size:contain;-webkit-mask-size:contain;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}[data-v-ef6e4bb8] .monaco-diff-editor .diffOverview{background-color:var(--vscode-editor-background)}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .diffOverview,[data-v-ef6e4bb8] .stream-monaco-diff-root .decorationsOverviewRuler{display:none!important;width:0!important;min-width:0!important;max-width:0!important;border:0!important;background:transparent!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-diff-editor{border:0!important;border-radius:0!important;box-shadow:none!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-clickable)>*:not(a){visibility:hidden!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines-compact .text{opacity:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root{--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide) !important;--stream-monaco-gutter-gap: var(--markstream-diff-gutter-gap) !important;--stream-monaco-line-number: var(--markstream-diff-line-number) !important;--stream-monaco-line-number-active: var(--markstream-diff-line-number-active) !important;--stream-monaco-added-fg: var(--markstream-diff-added-fg) !important;--stream-monaco-removed-fg: var(--markstream-diff-removed-fg) !important;--stream-monaco-added-line: var(--markstream-diff-added-line) !important;--stream-monaco-removed-line: var(--markstream-diff-removed-line) !important;--stream-monaco-added-inline: var(--markstream-diff-added-inline) !important;--stream-monaco-removed-inline: var(--markstream-diff-removed-inline) !important;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border) !important;--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border) !important;--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill) !important;--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill) !important;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter) !important;--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter) !important;--stream-monaco-added-line-shadow: none !important;--stream-monaco-removed-line-shadow: none !important;--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;box-sizing:border-box;min-width:0;width:100%}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .overflow-guard,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side),[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .overflow-guard{min-width:0!important;width:100%!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-scrollable-element.editor-scrollable,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-scrollable-element.editor-scrollable{left:var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width))!important;width:calc(100% - var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width)))!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .editor.modified .view-lines .view-line.stream-monaco-line-insert-fill,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .editor.original .view-lines .view-line.stream-monaco-line-delete-fill{width:1000000px!important}.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-fallback-inline-delete-line{box-sizing:border-box;padding-left:var(--stream-monaco-diff-code-padding, 0px)}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .scrollbar.horizontal,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .scrollbar.horizontal{display:none!important;height:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .view-lines.line-delete{margin-left:0!important;width:100%!important;background:var(--stream-monaco-removed-line-fill)!important;box-shadow:var(--stream-monaco-removed-line-shadow)!important;display:block!important;height:-moz-max-content!important;height:max-content!important;min-height:18px!important;overflow:visible!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .gutter-delete,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .inline-deleted-margin-view-zone,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .stream-monaco-fallback-inline-delete-margin{background:var(--stream-monaco-removed-gutter),var(--stream-monaco-removed-line-fill)!important;display:block!important;height:100%!important;min-height:18px!important;overflow:visible!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-unchanged-bridge-source),[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;background:var(--stream-monaco-unchanged-bg)!important;color:var(--stream-monaco-unchanged-fg)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{right:calc(var(--stream-monaco-gutter-marker-width) - var(--stream-monaco-unchanged-rail-width) / 2 + (var(--stream-monaco-gutter-gap) * 2))!important;width:auto!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important;color:var(--markstream-diff-unchanged-fg)!important;padding-left:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important;padding-right:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge.stream-monaco-diff-unchanged-bridge-line-info .stream-monaco-unchanged-rail,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail{border-right-color:var(--markstream-diff-unchanged-divider)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal{border-bottom-color:transparent!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-both .stream-monaco-unchanged-reveal:first-child{border-bottom-color:var(--markstream-diff-unchanged-divider)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-top-only .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-bottom-only .stream-monaco-unchanged-reveal{border-bottom:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-meta,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-count,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-metadata-label,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{color:var(--markstream-diff-unchanged-fg)!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center{align-items:center;justify-content:center}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center{align-items:center;justify-content:center!important;position:relative}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center:not(.stream-monaco-clickable){opacity:0!important;pointer-events:none!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center .stream-monaco-unchanged-meta{justify-content:center!important;padding:0 28px!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center>div:first-child{align-items:center;display:flex;justify-content:center!important;min-width:100%;width:100%!important}[data-v-ef6e4bb8] .markstream-inline-fold-proxy{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:calc(var(--ms-radius) * .5);box-shadow:none;cursor:pointer;inset:0;padding:0;pointer-events:auto;position:absolute;z-index:2}[data-v-ef6e4bb8] .markstream-inline-fold-proxy:hover,[data-v-ef6e4bb8] .markstream-inline-fold-proxy:focus-visible{background:transparent}[data-v-ef6e4bb8] .markstream-inline-fold-proxy:focus-visible{outline:1px solid var(--vscode-focusBorder, currentColor);outline-offset:-1px}.math-inline-wrapper[data-v-6c556261]{position:relative;display:inline-block}.math-inline[data-v-6c556261]{display:inline-block;vertical-align:middle}.math-inline--fallback[data-v-6c556261]{white-space:pre-wrap}.math-inline__loading[data-v-6c556261]{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.math-inline__spinner[data-v-6c556261]{width:16px;height:16px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-6c556261],.table-node-fade-leave-active[data-v-6c556261]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-6c556261],.table-node-fade-leave-to[data-v-6c556261]{opacity:0}.sr-only[data-v-6c556261]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.math-block[data-v-939191ad]{min-height:var(--ms-size-math-min-height);transition:min-height var(--ms-duration-overlay) var(--ms-ease-standard)}.math-loading-overlay[data-v-939191ad]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(2px);min-height:var(--ms-size-math-min-height)}.math-loading-spinner[data-v-939191ad]{width:20px;height:20px;border:2px solid color-mix(in srgb,var(--loading-spinner) 15%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);border-radius:50%;animation:math-spin-939191ad .8s linear infinite}@keyframes math-spin-939191ad{to{transform:rotate(360deg)}}.math-rendering[data-v-939191ad]{opacity:.3;transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.math-block__fallback[data-v-939191ad]{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.math-fade-enter-active[data-v-939191ad],.math-fade-leave-active[data-v-939191ad]{transition:all var(--ms-duration-slow) var(--ms-ease-standard)}.math-fade-enter-from[data-v-939191ad],.math-fade-leave-to[data-v-939191ad]{opacity:0}.action-icon{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot{display:inline-flex;align-items:center;justify-content:center}.icon-slot svg{display:block;width:100%;height:100%}.mermaid-block-container[data-v-73c385f8]{margin:var(--ms-flow-diagram-y) 0;border-color:var(--diagram-border)}.mermaid-block-header[data-v-73c385f8]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border)}.mermaid-label-text[data-v-73c385f8]{color:var(--code-action-fg)}.mermaid-mode-toggle-group[data-v-73c385f8]{background:transparent}.mermaid-mode-btn[data-v-73c385f8]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6}.mermaid-mode-btn[data-v-73c385f8]:hover{opacity:.9}.mermaid-mode-btn.is-active[data-v-73c385f8]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.mermaid-header-actions[data-v-73c385f8]{gap:var(--ms-gap-header-actions)}.mermaid-action-btn[data-v-73c385f8]{font-family:inherit;font-size:var(--ms-text-label);color:var(--code-action-fg)}.mermaid-action-btn[data-v-73c385f8]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.mermaid-action-btn[data-v-73c385f8]:active{transform:scale(.98)}.mermaid-source-panel[data-v-73c385f8]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.mermaid-source-code[data-v-73c385f8]{color:hsl(var(--ms-foreground))}.mermaid-preview-area[data-v-73c385f8]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-standard)}.mermaid-modal-overlay[data-v-73c385f8]{background:var(--modal-overlay)}.mermaid-modal-panel[data-v-73c385f8]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}._mermaid[data-v-73c385f8]{position:relative;font-family:inherit;content-visibility:auto;contain:content;contain-intrinsic-size:var(--ms-size-diagram-min-height) 240px}._mermaid[data-v-73c385f8] [data-mermaid-svg-layer]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:100%;min-height:100%}._mermaid[data-v-73c385f8] svg{width:100%;height:auto;max-height:100%;display:block}.fullscreen ._mermaid[data-v-73c385f8] svg{max-height:none}.fullscreen[data-v-73c385f8]{width:100%;max-height:100%!important;height:100%!important}.mermaid-dialog-enter-from[data-v-73c385f8],.mermaid-dialog-leave-to[data-v-73c385f8]{opacity:0}.mermaid-dialog-enter-active[data-v-73c385f8],.mermaid-dialog-leave-active[data-v-73c385f8]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.mermaid-dialog-enter-from .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-to .dialog-panel[data-v-73c385f8]{transform:translateY(8px) scale(.98);opacity:.98}.mermaid-dialog-enter-to .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-from .dialog-panel[data-v-73c385f8]{transform:translateY(0) scale(1);opacity:1}.mermaid-dialog-enter-active .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-active .dialog-panel[data-v-73c385f8]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-block-container[data-v-de34ec4b]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.infographic-block-header[data-v-de34ec4b]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.infographic-label[data-v-de34ec4b]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}.action-icon[data-v-de34ec4b]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot[data-v-de34ec4b]{display:inline-flex;align-items:center;justify-content:center}.icon-slot[data-v-de34ec4b] svg{display:block;width:100%;height:100%}.infographic-mode-toggle[data-v-de34ec4b]{background:transparent}.infographic-mode-btn[data-v-de34ec4b]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:color .15s,background-color .15s,opacity .15s}.infographic-mode-btn[data-v-de34ec4b]:hover{opacity:.9}.infographic-mode-btn.is-active[data-v-de34ec4b]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.infographic-header-actions[data-v-de34ec4b]{gap:var(--ms-gap-header-actions)}.infographic-action-btn[data-v-de34ec4b]{font-family:inherit;color:var(--code-action-fg);transition:background-color .15s,color .15s}.infographic-action-btn[data-v-de34ec4b]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.infographic-action-btn[data-v-de34ec4b]:active{transform:scale(.98)}.infographic-source[data-v-de34ec4b]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.infographic-source-code[data-v-de34ec4b]{color:hsl(var(--ms-foreground))}.infographic-preview[data-v-de34ec4b]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-fast)}.infographic-pending-source[data-v-de34ec4b]{position:absolute;inset:0;z-index:1;margin:0;padding:var(--ms-inset-panel-body);overflow:auto;color:hsl(var(--ms-foreground));text-align:left;background:var(--diagram-bg)}.infographic-modal-overlay[data-v-de34ec4b]{background:var(--modal-overlay)}.infographic-modal-panel[data-v-de34ec4b]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}.fullscreen[data-v-de34ec4b]{width:100%;max-height:100%!important;height:100%!important}.infographic-dialog-enter-from[data-v-de34ec4b],.infographic-dialog-leave-to[data-v-de34ec4b]{opacity:0}.infographic-dialog-enter-active[data-v-de34ec4b],.infographic-dialog-leave-active[data-v-de34ec4b]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-dialog-enter-from .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-to .dialog-panel[data-v-de34ec4b]{transform:translateY(8px) scale(.98);opacity:.98}.infographic-dialog-enter-to .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-from .dialog-panel[data-v-de34ec4b]{transform:translateY(0) scale(1);opacity:1}.infographic-dialog-enter-active .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-active .dialog-panel[data-v-de34ec4b]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.d2-block-container[data-v-3b434cf5]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.d2-block-header[data-v-3b434cf5]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.d2-mode-toggle[data-v-3b434cf5]{background:transparent}.mode-btn[data-v-3b434cf5]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:opacity .2s,color .2s,background-color .2s}.mode-btn[data-v-3b434cf5]:hover{opacity:.9}.mode-btn.is-active[data-v-3b434cf5]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.d2-header-actions[data-v-3b434cf5]{gap:var(--ms-gap-header-actions)}.d2-action-btn[data-v-3b434cf5]{color:var(--code-action-fg);opacity:.7;transition:opacity .2s,background-color .15s,color .15s}.d2-action-btn[data-v-3b434cf5]:hover{opacity:1;background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.d2-action-btn[data-v-3b434cf5]:disabled{opacity:.3;cursor:not-allowed}.d2-block-body[data-v-3b434cf5]{position:relative}.d2-source[data-v-3b434cf5]{padding:var(--ms-inset-panel-body) var(--ms-inset-panel-x);font-family:var(--vscode-editor-font-family, "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}.d2-code[data-v-3b434cf5]{white-space:pre;font-size:14px;line-height:1.5}.d2-render[data-v-3b434cf5]{max-height:var(--ms-size-code-max-height);overflow:auto}.d2-svg[data-v-3b434cf5] svg.markstream-d2-root-svg{width:100%;max-width:100%;height:auto;display:block}.d2-label[data-v-3b434cf5]{font-size:var(--ms-text-label)}.action-icon[data-v-3b434cf5]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.d2-error[data-v-3b434cf5]{color:hsl(var(--ms-destructive))}.markstream-virtual-timeline[data-v-1303f06e]{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;overflow:auto;overflow-anchor:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__spacer[data-v-1303f06e],.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e]{opacity:0;visibility:hidden;pointer-events:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e],.markstream-virtual-timeline__item.is-restored-height-floor[data-v-1303f06e]{height:var(--markstream-virtual-item-size);overflow:hidden}.markstream-virtual-timeline__restore-loading[data-v-1303f06e]{position:absolute;top:0;left:0;right:0;z-index:10;display:grid;place-items:center;pointer-events:none;overflow:hidden;background:Canvas;contain:strict}.markstream-virtual-timeline__restore-loading-card[data-v-1303f06e]{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid rgb(148 163 184 / 32%);border-radius:999px;background:#ffffffeb;color:#334155;font-size:13px;box-shadow:0 8px 24px #0f172a14}.markstream-virtual-timeline__restore-spinner[data-v-1303f06e]{width:14px;height:14px;border:2px solid rgb(148 163 184 / 35%);border-top-color:#334155;border-radius:999px;animation:markstream-timeline-restore-spin-1303f06e .8s linear infinite}@keyframes markstream-timeline-restore-spin-1303f06e{to{transform:rotate(360deg)}}.markstream-virtual-timeline__spacer[data-v-1303f06e]{flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__item[data-v-1303f06e]{display:flow-root;flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__default-item[data-v-1303f06e]{margin:8px 0;padding:10px 12px;border:1px solid rgb(148 163 184 / 32%);border-radius:8px;background:#f8fafc;color:#0f172a;line-height:1.5;white-space:pre-wrap}.markstream-virtual-timeline__default-item--system-divider[data-v-1303f06e]{border:0;background:transparent;color:#64748b;font-size:12px;text-align:center}.markstream-virtual-timeline__default-item--error[data-v-1303f06e]{border-color:#f8717173;background:#fef2f2;color:#991b1b}.markstream-virtual-timeline__status[data-v-1303f06e]{display:inline-flex;margin-right:8px;color:#475569;font-size:12px;text-transform:uppercase}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.17.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.md[data-v-2a3e373d]{font:400 var(--content-font-size)/1.6 var(--font-ui);line-height:round(calc(var(--content-font-size) * 1.625),1px);color:var(--color-text);word-break:break-word}.md[data-v-2a3e373d] .markdown-renderer{font:400 var(--content-font-size)/1.6 var(--font-ui);line-height:round(calc(var(--content-font-size) * 1.625),1px);color:var(--color-text)}.md[data-v-2a3e373d] .markstream-vue,.md[data-v-2a3e373d] .markdown-renderer{--code-bg: var(--color-surface-sunken);--code-fg: var(--color-text);--code-border: var(--color-line);--code-header-bg: var(--color-surface);--code-action-fg: var(--color-text-muted);--code-action-hover-fg: var(--color-accent);--markstream-code-fallback-bg: var(--color-surface-sunken);--markstream-code-fallback-fg: var(--color-text);--markstream-code-border-color: var(--color-line);--inline-code-bg: var(--color-inline-code-bg);--inline-code-fg: var(--color-text);--inline-code-border: transparent}.md[data-v-2a3e373d] .md-file-link{appearance:none;display:inline;border:0;padding:0;background:transparent;color:var(--color-accent-hover);font:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;cursor:pointer}.md[data-v-2a3e373d] .md-file-link:hover{color:var(--color-accent)}.md[data-v-2a3e373d] .inline-code .md-file-link{text-underline-offset:1.5px}.md[data-v-2a3e373d] .markdown-renderer p,.md[data-v-2a3e373d] .markdown-renderer li{font-size:var(--content-font-size);line-height:round(calc(var(--content-font-size) * 1.625),1px)}.md[data-v-2a3e373d] .markdown-renderer blockquote,.md[data-v-2a3e373d] .markdown-renderer td,.md[data-v-2a3e373d] .markdown-renderer th{font-size:var(--md-b2)}.md[data-v-2a3e373d] .markdown-renderer img{background:var(--media-alpha-canvas)}.md[data-v-2a3e373d] strong{color:color-mix(in srgb,var(--color-text) 86%,var(--color-text-muted));font-weight:var(--weight-semibold)}.md[data-v-2a3e373d] h1,.md[data-v-2a3e373d] h2,.md[data-v-2a3e373d] h3,.md[data-v-2a3e373d] h4{color:var(--color-text);font-optical-sizing:auto;font-weight:600;margin:.85em 0 .35em}.md[data-v-2a3e373d] h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px);border-bottom:1px solid var(--color-line);padding-bottom:4px}.md[data-v-2a3e373d] h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.md[data-v-2a3e373d] h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.md[data-v-2a3e373d] h4{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px);color:var(--color-text-muted)}.md[data-v-2a3e373d] p{margin:0}.md[data-v-2a3e373d] .node-slot+.node-slot{margin-top:var(--content-font-size)}.md[data-v-2a3e373d] .node-slot+.node-slot:has(h1),.md[data-v-2a3e373d] .node-slot+.node-slot:has(h2){margin-top:calc(var(--content-font-size) * 2)}.md[data-v-2a3e373d] .node-slot+.node-slot:has(h3),.md[data-v-2a3e373d] .node-slot+.node-slot:has(h4){margin-top:calc(var(--content-font-size) * 1.5)}.md[data-v-2a3e373d] ul,.md[data-v-2a3e373d] ol{--md-dot: round(calc(var(--content-font-size) * .375), 1px);list-style:none;margin:0;padding-left:calc(var(--content-font-size) * 2)}.md[data-v-2a3e373d] li{position:relative;margin:0;padding:0}.md[data-v-2a3e373d] li+li{margin-top:round(calc(var(--content-font-size) * .75),1px)}.md[data-v-2a3e373d] li>ul,.md[data-v-2a3e373d] li>ol{margin-top:round(calc(var(--content-font-size) * .75),1px);padding-left:calc(var(--content-font-size) * 1.5)}.md[data-v-2a3e373d] ul>li:before{content:"";position:absolute;left:calc((var(--md-dot) + var(--content-font-size) * 2) / -2);top:calc((round(calc(var(--content-font-size) * 1.625),1px) - var(--md-dot)) / 2);width:var(--md-dot);height:var(--md-dot);border-radius:50%;background:color-mix(in srgb,var(--color-text) 90%,transparent)}.md[data-v-2a3e373d] ul>li:has(>input[type=checkbox]):before,.md[data-v-2a3e373d] ul>li:has(>p>input[type=checkbox]):before{content:none}.md[data-v-2a3e373d] ul ul>li:before{background:transparent;border:1px solid color-mix(in srgb,var(--color-text) 90%,transparent);box-sizing:border-box}.md[data-v-2a3e373d] ol{counter-reset:md-ol}.md[data-v-2a3e373d] ol[start],.md[data-v-2a3e373d] ol:has(>li[value]){counter-reset:none;list-style:decimal}.md[data-v-2a3e373d] ol[start]>li,.md[data-v-2a3e373d] ol:has(>li[value])>li{counter-increment:none}.md[data-v-2a3e373d] ol[start]>li:before,.md[data-v-2a3e373d] ol:has(>li[value])>li:before{content:none}.md[data-v-2a3e373d] ol>li{counter-increment:md-ol}.md[data-v-2a3e373d] ol>li:before{content:counter(md-ol) ".";position:absolute;top:0;left:calc(var(--content-font-size) * -2);width:calc(var(--content-font-size) * 2);line-height:round(calc(var(--content-font-size) * 1.625),1px);text-align:center;color:var(--color-text)}.md[data-v-2a3e373d] :not(pre)>code,.md[data-v-2a3e373d] .inline-code{font:.9em var(--font-mono);background:var(--color-inline-code-bg);color:var(--color-text);border:0;padding:0 4px;border-radius:var(--radius-sm)}.md[data-v-2a3e373d] strong code,.md[data-v-2a3e373d] strong .inline-code,.md[data-v-2a3e373d] b code,.md[data-v-2a3e373d] b .inline-code{font-weight:var(--weight-semibold)}.md[data-v-2a3e373d] .code-block-container{margin:.6em 0;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);box-shadow:var(--shadow-xs);overflow:hidden;--vscode-editor-font-size: var(--text-sm);--vscode-editor-line-height: calc(var(--text-sm) * 1.65)}.md[data-v-2a3e373d] .code-block-header{background:var(--color-surface);border-bottom:.5px solid var(--color-line);padding:4px 6px 4px 12px;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.md[data-v-2a3e373d] .code-block-header *{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.md[data-v-2a3e373d] .code-block-header .code-header-main{font-family:var(--font-ui)}.md[data-v-2a3e373d] .code-block-header .code-action-btn{color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-2a3e373d] .code-block-header .code-action-btn:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-2a3e373d] .code-block-header .code-action-btn:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-2a3e373d] .code-block-header .code-action-btn *{pointer-events:none}.md[data-v-2a3e373d] .code-block-shell-content,.md[data-v-2a3e373d] .markstream-pre{background:var(--color-well)}.md[data-v-2a3e373d] .code-editor-container{line-height:1.65;--diffs-gap-block: var(--space-3)}.md[data-v-2a3e373d] .code-editor-container diffs-container{--diffs-line-height: 1.65em}.md[data-v-2a3e373d] .code-pre-fallback>.markstream-pre__line-numbers{display:none}.md[data-v-2a3e373d] .code-block-container .code-pre-fallback{padding-left:1ch;line-height:1.65!important}.md[data-v-2a3e373d] .code-block-container pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers),.md[data-v-2a3e373d] .markstream-pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers){margin:0;padding:12px 14px;overflow-x:auto;font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-2a3e373d] .code-block-container pre code{font:inherit;color:var(--color-text);background:none;border:none;padding:0;border-radius:0}.md[data-v-2a3e373d] .markstream-pre,.md[data-v-2a3e373d] .code-pre-fallback,.md[data-v-2a3e373d] .code-block-shell-content pre:not(.shiki),.md[data-v-2a3e373d] .code-block-shell-content pre:not(.shiki) code{color:var(--color-text)}.md[data-v-2a3e373d] a{color:var(--color-accent);text-decoration:none}.md[data-v-2a3e373d] a:hover{text-decoration:underline}.md[data-v-2a3e373d] .katex-display{overflow-x:auto;overflow-y:hidden;padding:2px 0 6px;margin:.6em 0}.md[data-v-2a3e373d] .math-inline{vertical-align:baseline}.md[data-v-2a3e373d] blockquote{position:relative;margin:0;padding:0 0 0 round(calc(var(--content-font-size) * 1.5),1px);border-left:none;color:var(--color-text)}.md[data-v-2a3e373d] blockquote:before{content:"";position:absolute;left:calc(round(calc(var(--content-font-size) * 1.5),1px)/2 - 1px);top:2px;bottom:2px;width:2px;border-radius:2px;background:var(--color-line)}.md[data-v-2a3e373d] .blockquote>.paragraph-node{margin:0}.md[data-v-2a3e373d] .blockquote>.paragraph-node+.paragraph-node{margin-top:var(--content-font-size)}.md[data-v-2a3e373d] hr{border:none;border-top:1px solid var(--color-line);margin:0}.md[data-v-2a3e373d] table:not(.table-node){border-collapse:collapse;font-size:var(--text-lg);margin:.5em 0}.md[data-v-2a3e373d] table:not(.table-node) th,.md[data-v-2a3e373d] table:not(.table-node) td{border:1px solid var(--color-line);padding:4px 10px;text-align:left}.md[data-v-2a3e373d] table:not(.table-node) th{background:var(--color-surface);color:var(--color-text);font-weight:var(--weight-medium)}.md[data-v-2a3e373d] .table-node-wrapper{width:100%;max-width:100%!important;min-width:0;overflow-x:auto!important;scrollbar-gutter:auto!important;position:relative;--table-cell-cap: var(--p-table-cell-max)}.md[data-v-2a3e373d] .table-node{--table-border: var(--color-line);--table-header-bg: var(--color-surface);font-size:var(--text-lg);margin:.5em 0;width:max-content!important;min-width:100%;max-width:none!important;table-layout:auto!important}.md[data-v-2a3e373d] .table-node th,.md[data-v-2a3e373d] .table-node td{text-align:left;vertical-align:top;max-width:var(--table-cell-cap)}.md[data-v-2a3e373d] .table-node .text-node{display:inline-block;max-width:var(--table-cell-cap);vertical-align:top}.md[data-v-2a3e373d] .md-table-fade{display:none;position:absolute;top:0;bottom:0;right:0;width:36px;z-index:1;background:linear-gradient(to right,transparent,color-mix(in srgb,var(--color-bg) 65%,transparent) 55%,var(--color-bg));pointer-events:none;transition:opacity var(--duration-base) var(--ease-out)}.md[data-v-2a3e373d] .md-table-at-end .md-table-fade{opacity:0}.md[data-v-2a3e373d] .md-table-toggle{display:none;position:absolute;top:6px;right:6px;z-index:2;align-items:center;justify-content:center;width:26px;height:26px;color:var(--color-text-muted);background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-sm);box-shadow:var(--shadow-sm);cursor:pointer;opacity:0;transition:opacity var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}@container (min-width: 760px){.md[data-v-2a3e373d] .md-table-fade.md-table-toggle--show,.md[data-v-2a3e373d] .md-table-toggle.md-table-toggle--show{display:block}.md[data-v-2a3e373d] .md-table-toggle.md-table-toggle--show{display:inline-flex}}.md[data-v-2a3e373d] .table-node-wrapper:hover .md-table-toggle.md-table-toggle--show,.md[data-v-2a3e373d] .table-node-wrapper:focus-within .md-table-toggle.md-table-toggle--show,.md[data-v-2a3e373d] .table-node-wrapper.md-table-wide .md-table-toggle.md-table-toggle--show{opacity:1}.md[data-v-2a3e373d] .md-table-toggle:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-2a3e373d] .md-table-toggle:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-2a3e373d] .md-table-toggle svg{display:block}.md[data-v-2a3e373d] .table-node tbody tr:hover{background-color:transparent!important}.diff-wrap[data-v-2a3e373d]{margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden}.diff-bar[data-v-2a3e373d]{display:flex;align-items:center;gap:6px;padding:4px 12px;background:var(--color-surface);border-bottom:1px solid var(--color-line);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.diff-lang[data-v-2a3e373d]{margin-right:auto}.diff-copy[data-v-2a3e373d]{display:inline-flex;align-items:center;justify-content:center;color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;padding:2px 6px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.diff-copy[data-v-2a3e373d]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.diff-copy[data-v-2a3e373d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.diff-pre[data-v-2a3e373d]{margin:0;padding:12px 0;overflow-x:auto;background:var(--color-surface-sunken)}.diff-pre code[data-v-2a3e373d]{display:block;width:max-content;min-width:100%;font:var(--text-sm)/1.65 var(--font-mono);color:var(--color-text)}.diff-line[data-v-2a3e373d]{display:block;width:100%;padding:0 14px}.diff-sign[data-v-2a3e373d]{display:inline-block;width:14px;text-align:center;color:var(--color-text-muted);user-select:none}.diff-text[data-v-2a3e373d]{color:var(--color-text)}.diff-add[data-v-2a3e373d]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.diff-add .diff-sign[data-v-2a3e373d]{color:var(--color-success)}.diff-del[data-v-2a3e373d]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diff-del .diff-sign[data-v-2a3e373d]{color:var(--color-danger)}.diff-hunk[data-v-2a3e373d]{background:var(--color-surface)}.diff-hunk .diff-text[data-v-2a3e373d]{color:var(--color-text-muted)}.md[data-v-2a3e373d],.md .markdown-renderer[data-v-2a3e373d]{font-family:var(--sans)}.md .code-block-container[data-v-2a3e373d],.md .diff-wrap[data-v-2a3e373d]{border-radius:var(--radius-md)}.md :not(pre)>code[data-v-2a3e373d],.md .inline-code[data-v-2a3e373d]{border-radius:var(--radius-sm)}.upd[data-v-2b5c23f7]{display:inline-flex;flex:none;-webkit-app-region:no-drag;animation:upd-in-2b5c23f7 var(--duration-base) var(--ease-out)}@keyframes upd-in-2b5c23f7{0%{opacity:0;transform:scale(.85)}}.upd-pill[data-v-2b5c23f7]{display:inline-flex;align-items:center;gap:var(--space-1);padding:0 var(--space-2);border:none;border-radius:var(--radius-full);background:var(--color-warning);color:var(--color-text-on-accent);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);line-height:var(--leading-normal);white-space:nowrap;cursor:pointer;transition:filter var(--duration-fast) var(--ease-out)}.upd-pill[data-v-2b5c23f7]:hover{filter:brightness(1.1)}.upd-pill[data-v-2b5c23f7]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.upd-pill-icon[data-v-2b5c23f7]{flex:none;color:var(--color-text-on-accent)}.upd[data-state=downloading] .upd-pill-text[data-v-2b5c23f7]{display:inline-block;min-width:4ch;text-align:left;font-variant-numeric:tabular-nums}@container sidebar-col (max-width: 250px){.upd-pill[data-v-2b5c23f7]{padding:var(--space-1)}.upd-pill-text[data-v-2b5c23f7]{display:none}}.upd-meta[data-v-2b5c23f7]{margin:0;font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--color-text-faint)}.upd-message[data-v-2b5c23f7]{margin:0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted);word-break:break-all}.upd-notes[data-v-2b5c23f7]{margin-top:var(--space-3);padding-top:var(--space-3);border-top:1px solid var(--color-line);max-height:min(360px,45vh);overflow-y:auto;font-size:var(--text-sm);line-height:var(--leading-normal);color:var(--color-text)}.upd-notes-title[data-v-2b5c23f7]{margin:0 0 var(--space-2);font-size:var(--text-xs);font-weight:var(--weight-medium);color:var(--color-text-faint)}.upd-notes[data-v-2b5c23f7] ul,.upd-notes[data-v-2b5c23f7] p{margin:0}.upd-notes[data-v-2b5c23f7] li+li{margin-top:var(--space-1)}.upd-notes[data-v-2b5c23f7] h3{margin:var(--space-3) 0 var(--space-1);font-size:var(--text-sm);font-weight:var(--weight-medium);line-height:var(--leading-normal);color:var(--color-text)}.upd-notes[data-v-2b5c23f7] h3:first-child{margin-top:0}.upd-notes[data-v-2b5c23f7]:first-child{margin-top:0;padding-top:0;border-top:none}.upd-foot[data-v-2b5c23f7]{display:flex;flex-direction:column;align-items:stretch;gap:var(--space-3);width:100%}.upd-foot-actions[data-v-2b5c23f7]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2)}.upd-auto[data-v-2b5c23f7]{align-self:flex-end}.upd-progress[data-v-2b5c23f7]{margin-top:var(--space-3);height:var(--space-1);border-radius:var(--radius-xs);background:var(--color-line);overflow:hidden}.upd-progress-fill[data-v-2b5c23f7]{height:100%;border-radius:var(--radius-xs);background:var(--color-accent);transition:width var(--duration-base) var(--ease-out)}.user-menu-trigger[data-v-ee9821b4]{display:flex;align-items:center;gap:var(--sb-gap);width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);cursor:pointer;text-align:left}.user-menu-trigger[data-v-ee9821b4]:hover,.user-menu-trigger[aria-expanded=true][data-v-ee9821b4]{background:var(--sb-hover)}.user-menu-trigger[data-v-ee9821b4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.user-menu-trigger svg[data-v-ee9821b4]{flex:none}.user-menu-avatar[data-v-ee9821b4]{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex:none;border-radius:var(--radius-full);background:var(--color-surface-sunken);color:var(--color-text-muted);overflow:hidden}.user-menu-avatar img[data-v-ee9821b4]{width:100%;height:100%;object-fit:cover}.user-menu-name[data-v-ee9821b4]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-menu[data-v-ee9821b4]{position:fixed;top:0;left:0;z-index:var(--z-dropdown);max-height:calc(100vh - 16px);overflow-y:auto;overflow-x:hidden}.user-submenu[data-v-ee9821b4]{position:fixed;top:0;left:0;z-index:var(--z-dropdown);width:max-content;max-height:calc(100vh - 16px);overflow-y:auto;overflow-x:hidden}.menu-pop-enter-active[data-v-ee9821b4]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-ee9821b4]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-ee9821b4],.menu-pop-leave-to[data-v-ee9821b4]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, 2px))}.user-menu .ui-menu-item[data-v-ee9821b4],.user-submenu .ui-menu-item[data-v-ee9821b4]{padding:var(--space-2) 9px;font-size:var(--text-base)}.user-menu-usage[data-v-ee9821b4]{display:flex;flex-direction:column;gap:var(--space-1-5);padding:var(--space-2) var(--space-3)}.user-menu-usage-state[data-v-ee9821b4]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-1) 0;color:var(--color-text-muted);font-size:var(--text-base)}.user-menu-usage-error[data-v-ee9821b4]{flex:1;min-width:0}.user-menu-usage-empty[data-v-ee9821b4]{color:var(--color-text-faint)}.user-menu-usage-row[data-v-ee9821b4]{display:flex;align-items:flex-start;gap:var(--space-3)}.user-menu-usage-main[data-v-ee9821b4]{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-05)}.user-menu-usage-label[data-v-ee9821b4]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.user-menu-usage-hint[data-v-ee9821b4]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);color:var(--color-text-faint)}.user-menu-usage-value[data-v-ee9821b4]{flex:none;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);font-variant-numeric:tabular-nums;white-space:nowrap}.user-menu-usage-value.sev-warn[data-v-ee9821b4]{color:var(--color-warning)}.user-menu-usage-value.sev-danger[data-v-ee9821b4]{color:var(--color-danger)}.user-menu-item-label[data-v-ee9821b4]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-menu-login-label[data-v-ee9821b4]{color:var(--color-accent)}.user-menu-row-value[data-v-ee9821b4]{flex:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);color:var(--color-text-faint)}.emoji-picker[data-v-b0dbbae4]{--ep-cell: 26px}.ep-search[data-v-b0dbbae4]{display:flex;align-items:center;gap:var(--space-2);margin:var(--space-1);padding:0 var(--space-2);border-radius:var(--radius-sm);color:var(--color-text-faint)}.ep-search[data-v-b0dbbae4]:hover,.ep-search[data-v-b0dbbae4]:focus-within{background:var(--color-surface-sunken)}.ep-input[data-v-b0dbbae4]{flex:1;min-width:0;height:calc(var(--ep-cell) + 2px);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;outline:none}.ep-input[data-v-b0dbbae4]::placeholder{color:var(--color-text-faint)}.ep-scroll[data-v-b0dbbae4]{max-height:calc(var(--ep-cell) * 10 + var(--space-1));overflow-y:auto;padding:0 var(--space-1)}.ep-label[data-v-b0dbbae4]{padding:var(--space-1) var(--space-2);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--color-text-faint);user-select:none}.ep-grid[data-v-b0dbbae4]{display:grid;grid-template-columns:repeat(8,var(--ep-cell));gap:var(--space-1);padding-bottom:var(--space-1)}.ep-e[data-v-b0dbbae4]{height:var(--ep-cell);display:grid;place-items:center;padding:0;font-size:var(--text-lg);background:transparent;border:none;border-radius:var(--radius-xs);cursor:pointer}.ep-e[data-v-b0dbbae4]:hover{background:var(--color-hover)}.ep-e[data-v-b0dbbae4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ep-e.sel[data-v-b0dbbae4]{background:var(--color-accent-soft)}.ep-empty[data-v-b0dbbae4]{padding:var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);text-align:center;user-select:none}.se[data-v-8cccabc6]{--se-pad-x: var(--space-2);display:block;margin:0;padding:8px var(--se-pad-x);border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);cursor:pointer;position:relative}.se[data-v-8cccabc6]:hover{background:var(--sb-hover, var(--color-hover));color:var(--color-text)}.se.on[data-v-8cccabc6]{background:var(--sb-selected, var(--color-selected));color:var(--color-text)}.row[data-v-8cccabc6]{display:flex;align-items:center;gap:var(--sb-gap, 6px);min-width:0}.left[data-v-8cccabc6]{display:flex;align-items:center;flex:1;min-width:0}.lead[data-v-8cccabc6]{width:var(--sb-gutter, 16px);flex:none;display:inline-flex;align-items:center;justify-content:center}.unread-dot[data-v-8cccabc6]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-accent)}.t[data-v-8cccabc6]{--sb-fade: 0px;--sb-fade-len: 16px;color:inherit;font-size:var(--ui-font-size-sm);font-weight:450;line-height:var(--leading-tight);user-select:none;flex:1;min-width:0;overflow:hidden;text-overflow:clip;white-space:nowrap;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)));mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)))}.se:hover .t[data-v-8cccabc6]{--sb-fade: 34px;--sb-fade-len: 26px}.se:has(.ui-badge):hover .t[data-v-8cccabc6]{--sb-fade: 0px;--sb-fade-len: 16px}.t .emoji[data-v-8cccabc6]{padding:0;background:transparent;border:none;cursor:pointer}.t .emoji[data-v-8cccabc6]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sub[data-v-8cccabc6]{display:flex;align-items:center;gap:var(--space-1);margin:var(--space-1) 0 0;color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-tight);user-select:none}.sub-icon[data-v-8cccabc6]{flex:none;color:var(--color-text-muted)}.pr[data-v-8cccabc6]{display:inline-flex;align-items:center;gap:var(--space-05);flex:none;padding:1px var(--space-1);border:.5px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-2xs);font-weight:var(--weight-medium);line-height:1;cursor:pointer}.pr[data-v-8cccabc6]:hover{border-color:var(--color-line-strong)}.pr[data-v-8cccabc6]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.pr--open[data-v-8cccabc6],.pr--open[data-v-8cccabc6]:hover{background:var(--color-success-soft);border-color:var(--color-success-bd);color:var(--color-success)}.pr--merged[data-v-8cccabc6],.pr--merged[data-v-8cccabc6]:hover{background:var(--color-done-soft);border-color:var(--color-done-bd);color:var(--color-done)}.sub-text[data-v-8cccabc6]{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ts[data-v-8cccabc6]{color:var(--color-text-faint);font-size:var(--text-xs);font-family:var(--font-ui);font-weight:475;line-height:var(--leading-tight);font-variant-numeric:tabular-nums;text-align:right}.act[data-v-8cccabc6]{position:relative;flex:none;align-self:stretch;display:inline-flex;align-items:center;justify-content:flex-end;gap:var(--sb-gap, 6px);min-width:26px}.act .ha[data-v-8cccabc6]{position:absolute;top:0;bottom:0;right:calc(3px - var(--se-pad-x));display:inline-flex;align-items:center;gap:2px;opacity:0;visibility:hidden;border-radius:var(--radius-sm);transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.se:hover .ha[data-v-8cccabc6]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.act .ts[data-v-8cccabc6]{transition:opacity var(--duration-fast) var(--ease-out)}.se:hover .act .ts[data-v-8cccabc6]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.act .st[data-v-8cccabc6]{display:inline-flex;align-items:center;transition:opacity var(--duration-fast) var(--ease-out)}.se:hover .act .st[data-v-8cccabc6]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.act .ui-badge[data-v-8cccabc6]{transition:opacity var(--duration-fast) var(--ease-out)}.se.flat:hover .act .ui-badge[data-v-8cccabc6]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.menu[data-v-8cccabc6],.picker[data-v-8cccabc6]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-pop-enter-active[data-v-8cccabc6]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-8cccabc6]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-8cccabc6],.menu-pop-leave-to[data-v-8cccabc6]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}.menu-time[data-v-8cccabc6]{padding:6px 10px;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);cursor:default;user-select:text}.rename-wrap[data-v-8cccabc6]{position:relative;display:flex;align-items:center;flex:1;min-width:0;background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs)}.rename-input[data-v-8cccabc6]{flex:1;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;padding:1px 4px;outline:none;min-width:0}.rename-wrap.generating .rename-input[data-v-8cccabc6]{visibility:hidden}.gen-dots[data-v-8cccabc6]{position:absolute;left:6px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:3px;pointer-events:none}.gen-dots i[data-v-8cccabc6]{width:3px;height:3px;border-radius:var(--radius-full, 50%);background:var(--color-accent);animation:gen-title-dot-8cccabc6 .9s var(--ease-out) infinite}.gen-dots i[data-v-8cccabc6]:nth-child(2){animation-delay:.15s}.gen-dots i[data-v-8cccabc6]:nth-child(3){animation-delay:.3s}@keyframes gen-title-dot-8cccabc6{0%,60%,to{opacity:.3;transform:translate(0)}30%{opacity:1;transform:translate(2px)}}.gen-title-btn[data-v-8cccabc6]{flex:none;margin-right:1px;color:var(--color-accent)}.gen-title-btn[data-v-8cccabc6]:hover:not(:disabled){color:var(--color-accent-hover);background:transparent}.sessions .se[data-v-8cccabc6]{margin:0;border-radius:var(--radius-sm);--se-pad-x: calc(var(--sb-pad-x, 20px) - var(--sb-inset, 12px));padding:8px var(--se-pad-x)}.sessions .se.flat+.se.flat[data-v-8cccabc6]{margin-top:var(--space-05)}.sessions .se .rename-input[data-v-8cccabc6]{border-radius:var(--radius-sm);font-family:var(--sans)}.group.dragging[data-v-d0f8b852]{opacity:.45}.group.pinned-drag-active[data-v-d0f8b852],.group.pinned-drop-hover[data-v-d0f8b852]{border-radius:var(--radius-sm)}.group.pinned-drag-active[data-v-d0f8b852]{box-shadow:inset 0 0 0 1px var(--color-accent)}.group.pinned-drop-hover[data-v-d0f8b852]{box-shadow:inset 0 0 0 2px var(--color-accent)}.group.pinned-drop-blocked[data-v-d0f8b852],.group.pinned-drop-blocked[data-v-d0f8b852] *{cursor:no-drop}.group-sessions[data-v-d0f8b852]{height:auto;overflow:hidden;transition:height var(--duration-base) var(--ease-out)}.group-sessions.collapsed[data-v-d0f8b852]{height:0}.gh[data-v-d0f8b852]{display:flex;flex-direction:column;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text);user-select:none;position:relative;cursor:grab}.gh[data-v-d0f8b852]:active{cursor:grabbing}.gh[data-v-d0f8b852]:hover{background:var(--sb-hover, var(--color-hover))}.gh.on[data-v-d0f8b852]{background:var(--sb-selected, var(--color-selected))}.gh-top[data-v-d0f8b852]{position:relative;display:flex;align-items:center;gap:var(--sb-gap)}.gh-folder[data-v-d0f8b852]{flex:none;color:var(--color-text-muted)}.gh-name[data-v-d0f8b852]{font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text-muted);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.gh-actions[data-v-d0f8b852]{position:absolute;right:calc(3px - (var(--sb-pad-x) - var(--sb-inset)));top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:var(--space-1);padding-left:var(--space-1);border-radius:var(--radius-sm);isolation:isolate;opacity:0;pointer-events:none}.gh-name[data-v-d0f8b852]{--sb-fade: 0px;--sb-fade-len: 16px;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)));mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)))}.gh:hover .gh-name[data-v-d0f8b852],.gh:focus-within .gh-name[data-v-d0f8b852],.gh:has(.gh-actions.open) .gh-name[data-v-d0f8b852]{--sb-fade: 64px;--sb-fade-len: 26px}.gh-actions[data-v-d0f8b852]>*{position:relative;z-index:1}.gh:hover .gh-actions[data-v-d0f8b852],.gh:focus-within .gh-actions[data-v-d0f8b852],.gh-actions.open[data-v-d0f8b852]{opacity:1;pointer-events:auto}.gh-more.open[data-v-d0f8b852]{color:var(--color-text);background:var(--color-line)}.group-empty[data-v-d0f8b852]{padding:var(--space-1) var(--space-2) var(--space-1) calc(var(--sb-pad-x) - var(--sb-inset) + var(--sb-gutter) + var(--sb-gap));font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui);user-select:none}.show-more-row[data-v-d0f8b852]{display:flex;align-items:center;padding-left:calc(var(--sb-gutter) + var(--sb-gap))}.show-more[data-v-d0f8b852]{display:flex;align-items:center;gap:var(--sb-gap);margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));min-width:0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);text-align:left;cursor:pointer}.show-more[data-v-d0f8b852]:hover{background:var(--sb-hover, var(--color-hover))}.show-more[data-v-d0f8b852]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-sep[data-v-d0f8b852]{margin:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);user-select:none}.show-more-label[data-v-d0f8b852]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gh-rename[data-v-d0f8b852]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-regular);color:var(--color-text);background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.gh-rename[data-v-d0f8b852]{border-radius:var(--radius-sm);font-family:var(--sans)}.gh-add[data-v-d0f8b852]{color:var(--faint)}.gh-add[data-v-d0f8b852]:hover{color:var(--dim)}.pinned-label[data-v-9032f3f8]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--faint);user-select:none}.pinned-title[data-v-9032f3f8]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pinned-toggle[data-v-9032f3f8]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.pinned-label:hover .pinned-toggle[data-v-9032f3f8],.pinned-label:focus-within .pinned-toggle[data-v-9032f3f8],.pinned-toggle--on[data-v-9032f3f8]{opacity:1}.pinned-toggle[data-v-9032f3f8]:hover{color:var(--dim)}.pinned-toggle svg[data-v-9032f3f8]{width:13px;height:13px}.pinned-rows[data-v-9032f3f8]{max-height:40vh;overflow-y:auto}.pinned-rows[data-v-9032f3f8]::-webkit-scrollbar{width:4px}.pinned-rows[data-v-9032f3f8]::-webkit-scrollbar-track{background:transparent}.pinned-rows[data-v-9032f3f8]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.pinned-rows[data-v-9032f3f8]:hover::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.pinned-rows[data-v-9032f3f8]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.pin-row.dragging[data-v-9032f3f8]{opacity:.45}.pinned.drop-active[data-v-9032f3f8]{border-radius:var(--radius-sm);box-shadow:inset 0 0 0 1px var(--color-accent)}.side[data-v-3b960952]{background:var(--color-sidebar-bg);display:flex;flex-direction:row;justify-content:flex-end;overflow:hidden;min-width:0;height:100%;transition:width .28s cubic-bezier(.4,0,.2,1),visibility .28s;--sb-inset: var(--space-2);--sb-pad-x: var(--space-4);--sb-gutter: 16px;--sb-gap: var(--space-2);--sb-hover: var(--color-hover);--sb-selected: color-mix(in srgb, var(--color-selected) 75%, transparent)}.side.no-anim[data-v-3b960952]{transition:none}.side.collapsed[data-v-3b960952]{visibility:hidden}.col[data-v-3b960952]{flex:none;min-width:0;display:flex;flex-direction:column;min-height:0;width:100%;box-sizing:border-box;border-right:.5px solid var(--line);container-type:inline-size;container-name:sidebar-col;position:relative}.ch[data-v-3b960952]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:var(--space-3);min-height:calc(26px + 2 * var(--space-3));width:100%;box-sizing:border-box}.side.macos-desktop .ch[data-v-3b960952]{padding-left:80px;-webkit-app-region:drag}.side.macos-desktop .ch-brand[data-v-3b960952]{display:none}.ch-logo[data-v-3b960952]{height:22px;width:32px;flex:none;display:block;cursor:pointer;user-select:none;touch-action:none;transition:transform .18s ease}.ch-logo[data-v-3b960952]:hover{transform:scale(1.08)}.ch-brand[data-v-3b960952]{display:flex;align-items:center;gap:8px;min-width:0;flex:1;user-select:none;touch-action:none}.ch-tail[data-v-3b960952]{display:flex;align-items:center;gap:var(--space-2);flex:none;min-width:0;margin-left:auto}.ch-name[data-v-3b960952]{font-size:var(--ui-font-size);font-weight:500;line-height:22px;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container sidebar-col (max-width: 250px){.ch-name[data-v-3b960952]{display:none}}.sidebar-actions[data-v-3b960952]{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 var(--space-2);padding:0 var(--sb-inset) var(--space-1);position:relative;z-index:1;background:var(--color-sidebar-bg)}.sessions-head[data-v-3b960952]{position:relative;z-index:1;padding:var(--space-3) var(--sb-inset) 0;border-bottom:.5px solid transparent;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.sessions-head[data-v-3b960952]:after,.side-footer[data-v-3b960952]:before{content:"";position:absolute;left:0;right:0;height:13px;pointer-events:none;opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sessions-head[data-v-3b960952]:after{top:100%;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.5%,transparent),transparent 35%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1%,transparent),transparent 65%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) .75%,transparent),transparent);transition-duration:var(--duration-slow)}.sessions-head--scrolled[data-v-3b960952]{border-bottom-color:var(--line)}.sessions-head--scrolled[data-v-3b960952]:after{opacity:1}.btn-new-chat[data-v-3b960952]{grid-column:1 / -1;display:flex;align-items:center;gap:var(--sb-gap);width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);cursor:pointer;text-align:left}.sidebar-actions--has-workspace-action .btn-new-chat[data-v-3b960952]{grid-column:1}.btn-new-chat[data-v-3b960952]:hover{background:var(--sb-hover)}.btn-new-chat[data-v-3b960952]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-new-chat svg[data-v-3b960952]{flex:none}.btn-new-chat span[data-v-3b960952]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btn-new-chat[data-v-3b960952] .ui-kbd{margin-left:auto}.btn-new-chat[data-v-3b960952] .ui-kbd,.search[data-v-3b960952] .ui-kbd{opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.btn-new-chat[data-v-3b960952]:hover .ui-kbd,.btn-new-chat[data-v-3b960952]:focus-visible .ui-kbd,.search[data-v-3b960952]:hover .ui-kbd,.search[data-v-3b960952]:focus-visible .ui-kbd{opacity:1}.search[data-v-3b960952]{grid-column:1 / -1;display:flex;align-items:center;gap:var(--sb-gap);width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.search[data-v-3b960952]:hover{background:var(--sb-hover)}.search[data-v-3b960952]:focus-visible{background:var(--sb-hover);color:var(--color-text);outline:2px solid var(--color-accent-bd);outline-offset:-2px}.search-icon[data-v-3b960952]{flex:none;transform:translateY(-.5px)}.search-input[data-v-3b960952]{flex:1;min-width:0;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sessions[data-v-3b960952]{flex:1;overflow-y:auto;padding:0 var(--sb-inset) var(--space-3);min-height:0}.sessions[data-v-3b960952]::-webkit-scrollbar{width:4px}.sessions[data-v-3b960952]::-webkit-scrollbar-track{background:transparent}.sessions[data-v-3b960952]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.sessions.scrolling[data-v-3b960952]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.sessions.scrolling[data-v-3b960952]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.side-footer[data-v-3b960952]{flex:none;position:relative;z-index:1;padding:var(--space-2) var(--sb-inset);border-top:.5px solid var(--line);background:var(--color-sidebar-bg)}.side-footer[data-v-3b960952]:before{bottom:100%;background:linear-gradient(to top,color-mix(in srgb,var(--color-text) 1.5%,transparent),transparent 35%),linear-gradient(to top,color-mix(in srgb,var(--color-text) 1%,transparent),transparent 65%),linear-gradient(to top,color-mix(in srgb,var(--color-text) .75%,transparent),transparent);transition-duration:var(--duration-slow)}.side-footer--shadowed[data-v-3b960952]:before{opacity:1}.side-section-label[data-v-3b960952]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--faint);user-select:none}.side-section-title[data-v-3b960952]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sessions-head .pinned+.side-section-label[data-v-3b960952]{margin-top:var(--space-2)}.side-section-toggle[data-v-3b960952]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.side-section-label:hover .side-section-toggle[data-v-3b960952],.side-section-label:focus-within .side-section-toggle[data-v-3b960952]{opacity:1}.side-section-toggle[data-v-3b960952]:hover{color:var(--dim)}.side-section-toggle svg[data-v-3b960952]{width:13px;height:13px}.side-section-actions[data-v-3b960952]{display:flex;align-items:center;gap:2px}.ws-drop-target.drop-before[data-v-3b960952]{box-shadow:inset 0 2px 0 var(--color-accent)}.ws-drop-target.drop-after[data-v-3b960952]{box-shadow:inset 0 -2px 0 var(--color-accent)}.sessions.pinned-drag-active[data-v-3b960952]{box-shadow:inset 0 0 0 1px var(--color-accent)}.sessions.flat-pinned-drop-hover[data-v-3b960952]{box-shadow:inset 0 0 0 2px var(--color-accent)}.show-more-row[data-v-3b960952]{display:flex;align-items:center;justify-content:center}.show-more[data-v-3b960952]{display:flex;align-items:center;justify-content:center;gap:var(--space-1);margin:0;padding:6px var(--space-3);min-width:0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);cursor:pointer}.show-more[data-v-3b960952]:hover{background:var(--sb-hover, var(--color-hover))}.show-more[data-v-3b960952]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-label[data-v-3b960952]{flex:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.folder-drop-overlay[data-v-3b960952]{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;padding:var(--space-3);box-sizing:border-box;background:color-mix(in srgb,var(--color-sidebar-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.folder-drop-overlay.show[data-v-3b960952]{opacity:1;visibility:visible}.folder-drop-card[data-v-3b960952]{display:flex;align-items:center;gap:var(--space-3);max-width:100%;box-sizing:border-box;padding:var(--space-4);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.folder-drop-card svg[data-v-3b960952]{flex:none}.folder-drop-card span[data-v-3b960952]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty[data-v-3b960952]{padding:var(--space-6) var(--space-3);text-align:center;color:var(--faint);font-size:calc(var(--ui-font-size) - 3px);line-height:1.6}.ws-menu[data-v-3b960952],.gh-menu[data-v-3b960952],.view-menu[data-v-3b960952]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.view-menu-label[data-v-3b960952]{padding:var(--space-1) var(--space-2) var(--space-05);font-size:var(--text-xs);color:var(--faint);user-select:none}.view-menu-check[data-v-3b960952]{margin-left:auto;display:inline-flex}.menu-pop-enter-active[data-v-3b960952]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-3b960952]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-3b960952],.menu-pop-leave-to[data-v-3b960952]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}[data-v-3b960952] .workspace-rename-item{font-size:var(--text-xs);font-weight:var(--weight-option-label)}.section-menu-check[data-v-3b960952]{display:inline-flex;flex:none;width:14px}.rh[data-v-1c6dfdc5]{width:4px;flex:none;position:relative;align-self:stretch;background:transparent;touch-action:none;margin:0 -2px;z-index:var(--z-dropdown)}.rh-bar[data-v-1c6dfdc5]{position:absolute;inset:0 1px;background:transparent;transition:background .12s}.rh:hover .rh-bar[data-v-1c6dfdc5]{background:var(--color-selected)}.rh.dragging .rh-bar[data-v-1c6dfdc5]{background:var(--color-line-strong)}.op[data-v-ab413c67]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);background:var(--color-well);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-word;max-height:12lh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.op-empty[data-v-ab413c67]{color:var(--color-text-faint);font-style:italic}.agent-card[data-v-5bbb3a70]{margin:var(--space-1) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.agent-card[data-v-5bbb3a70]:hover{border-color:var(--color-line-strong)}.agent-card.err[data-v-5bbb3a70]{border-color:color-mix(in srgb,var(--color-danger) 45%,var(--bg))}.head[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-2) var(--space-3);border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);text-align:left;cursor:pointer}.head[data-v-5bbb3a70]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.head[data-v-5bbb3a70]:disabled{cursor:default}.lead[data-v-5bbb3a70]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-surface-sunken);color:var(--color-text-muted);flex:none}.main[data-v-5bbb3a70]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.task[data-v-5bbb3a70]{font-size:var(--ui-font-size);line-height:var(--leading-caption);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.type[data-v-5bbb3a70]{font-size:var(--text-xs);line-height:var(--leading-caption);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tail[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-2);flex:none}.st[data-v-5bbb3a70]{display:inline-flex;align-items:center}.st.ok[data-v-5bbb3a70]{color:var(--color-success)}.st.error[data-v-5bbb3a70]{color:var(--color-danger)}.go[data-v-5bbb3a70]{color:var(--color-text-faint);transition:color var(--duration-base) var(--ease-out)}.agent-card:hover .head:not(:disabled) .go[data-v-5bbb3a70]{color:var(--color-text)}.go.car[data-v-5bbb3a70]{transition:color var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.go.car.open[data-v-5bbb3a70]{transform:rotate(90deg)}.saved-result[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);text-align:left;cursor:pointer}.saved-result[data-v-5bbb3a70]:hover{color:var(--color-text-muted)}.saved-result[data-v-5bbb3a70]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.saved-result__chevron[data-v-5bbb3a70]{transition:transform var(--duration-base) var(--ease-out)}.saved-result__chevron.open[data-v-5bbb3a70]{transform:rotate(90deg)}.result[data-v-5bbb3a70]{padding:var(--space-2) var(--space-3)}.result--legacy[data-v-5bbb3a70]{border-top:.5px solid var(--color-line)}.tl-head[data-v-58658159]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) 0;border-radius:var(--radius-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left}.tl-head.clickable[data-v-58658159]{cursor:pointer;user-select:none}.tl-ic[data-v-58658159]{display:inline-flex;align-items:center;justify-content:flex-start;flex:none;color:var(--color-text-faint)}.tl-main[data-v-58658159]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-1)}.tl-tail[data-v-58658159]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}.tl-status[data-v-58658159]{display:inline-flex;align-items:center;flex:none}.tl-status.ok[data-v-58658159]{color:var(--color-success)}.tl-status.error[data-v-58658159]{color:var(--color-danger)}.tl-car[data-v-58658159]{display:inline-flex;align-items:center;justify-content:center;align-self:center;width:16px;height:16px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);cursor:pointer;flex:none}.tl-car[data-v-58658159]:hover{color:var(--color-text)}.tl-car[data-v-58658159]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-car-ic[data-v-58658159]{transition:transform var(--duration-base) var(--ease-out)}.tool-line.open .tl-car-ic[data-v-58658159]{transform:rotate(90deg)}.tl-body[data-v-58658159]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tl-body.open[data-v-58658159]{grid-template-rows:minmax(0,1fr)}.tl-body-inner[data-v-58658159]{min-height:0;overflow:hidden;padding:2px var(--space-2) var(--space-1) 0}.tl-main .tl-name[data-v-58658159-s]{font-weight:var(--weight-regular);color:var(--color-text-muted);flex:none}.tl-main .tl-dim[data-v-58658159-s]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-faint[data-v-58658159-s]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-mono[data-v-58658159-s]{font-family:var(--font-mono);font-size:var(--text-xs);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);line-height:normal;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-file[data-v-58658159-s]{font-weight:var(--weight-regular);color:var(--color-text);line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer}.tl-main .tl-file[data-v-58658159-s]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-main .tl-file[data-v-58658159-s]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-tail .tl-pill[data-v-58658159-s]{font-size:var(--text-xs);line-height:1.5;padding:0 var(--space-2);border-radius:var(--radius-full);flex:none;white-space:nowrap}.tl-tail .tl-chip[data-v-58658159-s]{color:var(--color-text-faint);font-size:var(--text-xs);flex:none;white-space:nowrap}.tl-tail .tl-add[data-v-58658159-s]{color:var(--color-success);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tl-tail .tl-del[data-v-58658159-s]{color:var(--color-danger);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.ask-receipt[data-v-f29eda04]{max-width:560px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-xs);padding:var(--space-2) var(--space-3) 10px;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.ask-receipt.flat[data-v-f29eda04]{color:var(--color-text-faint);font-style:italic;padding-top:6px;padding-bottom:6px}.rc-head[data-v-f29eda04]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text-faint);font-size:var(--text-xs);margin-bottom:6px}.rc-st[data-v-f29eda04]{margin-left:auto;color:var(--color-success);display:inline-flex}.rc-q+.rc-q[data-v-f29eda04]{margin-top:6px}.rc-qtext[data-v-f29eda04]{display:flex;align-items:baseline;gap:var(--space-2);margin-bottom:3px;font-weight:var(--weight-medium);color:var(--color-text)}.rc-opt[data-v-f29eda04]{display:flex;align-items:center;gap:var(--space-2);padding:1.5px 0;color:var(--color-text)}.rc-qskip[data-v-f29eda04]{padding:1.5px 0;color:var(--color-text-faint);font-style:italic}.rc-lb[data-v-f29eda04]{min-width:0}.rc-ds[data-v-f29eda04]{color:var(--color-text-faint);font-size:var(--text-xs)}.rc-g[data-v-f29eda04]{width:14px;height:14px;flex:none;border:.5px solid var(--color-line-strong);position:relative}.rc-g.chk[data-v-f29eda04]{border-radius:var(--radius-xs)}.rc-g.rad[data-v-f29eda04]{border-radius:50%}.rc-g.on[data-v-f29eda04]{border-color:var(--color-accent)}.rc-g.chk.on[data-v-f29eda04]{background:var(--color-accent)}.rc-g.chk.on[data-v-f29eda04]:after{content:"";position:absolute;left:3.5px;top:.5px;width:4px;height:8px;border-right:1.5px solid var(--color-text-on-accent);border-bottom:1.5px solid var(--color-text-on-accent);transform:rotate(45deg)}.rc-g.rad.on[data-v-f29eda04]:after{content:"";position:absolute;inset:2.5px;border-radius:50%;background:var(--color-accent)}.cmd-echo[data-v-8869dd42]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.hl-code[data-v-6735e4da]{border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:auto;max-height:calc(24 * 1.5 * var(--ui-font-size));overscroll-behavior:contain;font-family:var(--font-mono);font-size:var(--code-font-size);line-height:var(--leading-normal);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none}.hl-code[data-v-6735e4da]:not(.framed){border:none;border-radius:0;background:transparent;max-height:none;overflow:visible}.hl-body[data-v-6735e4da]{width:max-content;min-width:100%;padding:var(--space-1) 0 var(--space-2)}.hl-code.plain-pad .hl-body[data-v-6735e4da]{padding-left:var(--space-3)}.hl-row[data-v-6735e4da]{display:flex;align-items:flex-start;min-height:calc(1em * var(--leading-normal));white-space:pre;width:100%}.hl-gutter[data-v-6735e4da]{flex:none;box-sizing:content-box;min-width:var(--gutter-ch, 4ch);padding:0 var(--space-2);text-align:right;color:var(--color-text-faint);user-select:none;border-right:.5px solid var(--color-line);font-variant-numeric:tabular-nums}.hl-sign[data-v-6735e4da]{flex:none;width:16px;text-align:center;color:var(--color-text-muted);user-select:none}.hl-text[data-v-6735e4da]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.hl-gutter+.hl-text[data-v-6735e4da]{padding-left:var(--space-2)}.row-add[data-v-6735e4da]{background:var(--color-diff-add-bg)}.row-add .hl-sign[data-v-6735e4da]{color:var(--color-success)}.row-del[data-v-6735e4da]{background:var(--color-diff-del-bg)}.row-del .hl-sign[data-v-6735e4da]{color:var(--color-danger)}.row-hunk[data-v-6735e4da]{background:var(--color-surface-sunken)}.row-hunk .hl-text[data-v-6735e4da]{color:var(--color-text-muted)}.hl-code.gutter .row-add[data-v-6735e4da]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.hl-code.gutter .row-del[data-v-6735e4da]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diffbar[data-v-bbf61950]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;gap:1px;flex:none}.seg-add[data-v-bbf61950]{background:var(--color-success)}.seg-del[data-v-bbf61950]{background:var(--color-danger)}.gl[data-v-b12a8498]{display:inline-flex;align-items:center}.arg-full[data-v-b12a8498]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.file-list[data-v-3936099e]{display:flex;flex-direction:column;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-1);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.file-row[data-v-3936099e]{width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.file-row[data-v-3936099e]:hover{background:var(--color-hover);color:var(--color-accent)}.file-row[data-v-3936099e]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-pill.pill-active[data-v-862274de]{color:var(--color-accent);background:var(--color-accent-soft)}.tl-pill.pill-done[data-v-862274de]{color:var(--color-success);background:var(--color-success-soft)}.tl-pill.pill-blocked[data-v-862274de]{color:var(--color-warning);background:var(--color-warning-soft)}.goal-block[data-v-862274de]{margin-bottom:var(--space-1)}.goal-text[data-v-862274de]{color:var(--color-text);font-size:calc(var(--content-font-size) - 1px);line-height:1.6;white-space:pre-wrap;word-break:break-word}.goal-criterion[data-v-862274de]{color:var(--color-text-muted);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;margin-top:2px;white-space:pre-wrap;word-break:break-word}.match-list[data-v-899c1a48]{display:flex;flex-direction:column;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-1);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.match-row[data-v-899c1a48]{display:flex;align-items:baseline;gap:var(--space-2);width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);text-align:left;cursor:default}.match-row.link[data-v-899c1a48]{cursor:pointer}.match-row.link[data-v-899c1a48]:hover{background:var(--color-hover)}.match-row[data-v-899c1a48]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mref[data-v-899c1a48]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-faint)}.match-row.link:hover .mref[data-v-899c1a48]{color:var(--color-accent)}.mtext[data-v-899c1a48]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.is-resolving[data-v-0826404b]{visibility:hidden}.media-tool[data-v-3bc3ee1a]{display:inline-flex;flex-direction:column;gap:6px;max-width:320px}.media-title[data-v-3bc3ee1a]{font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-image-button[data-v-3bc3ee1a]{padding:0;border:none;background:transparent;cursor:pointer;border-radius:var(--radius-md);overflow:hidden}.media-image[data-v-3bc3ee1a]{display:block;max-width:100%;border-radius:var(--radius-md);background:var(--media-alpha-canvas)}.media-video[data-v-3bc3ee1a],.media-audio[data-v-3bc3ee1a]{max-width:100%;border-radius:var(--radius-md)}.media-video[data-v-3bc3ee1a]{display:block}.media-video-button[data-v-3bc3ee1a]{position:relative}.media-video-tile[data-v-3bc3ee1a]{display:block;width:320px;max-width:100%;aspect-ratio:16 / 9;background:var(--color-well)}.media-play-badge[data-v-3bc3ee1a]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.plan-glyph[data-v-8dff80a1]{display:inline-flex;align-items:center}.plan-path[data-v-8dff80a1]{display:block;max-width:100%;margin:0 0 var(--space-2);padding:0;overflow:hidden;border:none;background:transparent;color:var(--color-accent);font-family:var(--font-mono);font-size:var(--text-xs);text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.plan-path[data-v-8dff80a1]:hover{text-decoration:underline}.plan-path[data-v-8dff80a1]:focus-visible{outline:none;border-radius:var(--radius-xs);box-shadow:var(--p-focus-ring)}.plan-content[data-v-8dff80a1]{padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);color:var(--color-text)}.plan-review[data-v-8dff80a1]{display:flex;flex-direction:column;gap:var(--space-1);margin-top:var(--space-2);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal)}.plan-review>div[data-v-8dff80a1]{display:flex;align-items:baseline;gap:var(--space-2)}.review-label[data-v-8dff80a1]{flex:none;color:var(--color-text-faint)}.review-feedback[data-v-8dff80a1]{white-space:pre-wrap}.path-link[data-v-0edbdd82]{display:block;width:100%;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 0 var(--space-1);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);color:var(--color-text-muted);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.path-link[data-v-0edbdd82]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.path-link[data-v-0edbdd82]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.swarm-card[data-v-f7b643ea]{margin:0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.swarm-card.err[data-v-f7b643ea]{border-color:color-mix(in srgb,var(--color-danger) 45%,var(--bg))}.head[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:34px;padding:0 var(--space-2) 0 var(--space-3);border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--ui-font-size);text-align:left;cursor:pointer;user-select:none}.head[data-v-f7b643ea]:hover{background:var(--color-hover);color:var(--color-text)}.head[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ic[data-v-f7b643ea]{color:var(--color-text-faint);flex:none}.title[data-v-f7b643ea]{font-weight:var(--weight-medium);color:var(--color-text);flex:none}.meta[data-v-f7b643ea]{color:var(--color-text-faint);flex:none}.sum-txt[data-v-f7b643ea]{color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-f7b643ea]{margin-left:auto;display:flex;align-items:center;gap:var(--space-2);flex:none;color:var(--color-text-muted);font-size:var(--text-xs)}.status[data-v-f7b643ea]{display:inline-flex;align-items:center;flex:none}.status[data-v-f7b643ea]:has(>svg){color:var(--color-success)}.err .status[data-v-f7b643ea]:has(>svg){color:var(--color-danger)}.chip[data-v-f7b643ea]{color:var(--color-text-muted);font-family:var(--font-mono)}.tm[data-v-f7b643ea]{color:var(--color-text-faint);font-family:var(--font-mono)}.car[data-v-f7b643ea]{margin-left:2px;color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.swarm-card.open .car[data-v-f7b643ea]{transform:rotate(90deg)}.body[data-v-f7b643ea]{border-top:.5px solid var(--color-line)}.overview[data-v-f7b643ea]{padding:10px var(--space-3) var(--space-2);border-bottom:.5px solid var(--color-line)}.overview-line[data-v-f7b643ea]{display:flex;align-items:baseline;gap:var(--space-2)}.big[data-v-f7b643ea]{font-family:var(--font-mono);font-weight:var(--weight-medium);color:var(--color-text);font-size:15px}.lbl[data-v-f7b643ea]{color:var(--color-text-muted);font-size:var(--text-xs)}.seg[data-v-f7b643ea]{display:flex;height:5px;border-radius:var(--radius-full);overflow:hidden;margin:var(--space-2) 0 var(--space-1);gap:2px}.seg>span[data-v-f7b643ea]{height:100%;border-radius:var(--radius-full);min-width:3px}.s-ok[data-v-f7b643ea]{background:var(--color-success)}.s-run[data-v-f7b643ea]{background:var(--color-accent)}.s-warn[data-v-f7b643ea]{background:var(--color-warning)}.s-fail[data-v-f7b643ea]{background:var(--color-danger)}.s-queue[data-v-f7b643ea]{background:var(--color-line)}.legend[data-v-f7b643ea]{display:flex;flex-wrap:wrap;gap:10px}.legend span[data-v-f7b643ea]{display:inline-flex;align-items:center;gap:5px;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted)}.lg-dot[data-v-f7b643ea]{width:6px;height:6px;border-radius:var(--radius-full)}.member[data-v-f7b643ea]{border-bottom:.5px solid var(--color-line)}.member[data-v-f7b643ea]:last-child{border-bottom:none}.member-head[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:30px;padding:0 var(--space-2) 0 var(--space-3);border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);text-align:left;cursor:pointer;user-select:none}.member-head[data-v-f7b643ea]:not(:disabled):hover{background:var(--color-hover)}.member-head[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.member-head[data-v-f7b643ea]:disabled{cursor:default}.row-dot[data-v-f7b643ea]{flex:none}.mname[data-v-f7b643ea]{flex:none;min-width:0;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium);color:var(--color-text)}.mact[data-v-f7b643ea]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font-size:var(--text-xs)}.mphase[data-v-f7b643ea]{flex:none;margin-left:auto;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.phase-completed .mphase[data-v-f7b643ea]{color:var(--color-success)}.phase-failed .mphase[data-v-f7b643ea]{color:var(--color-danger)}.phase-working .mphase[data-v-f7b643ea]{color:var(--color-accent)}.phase-suspended .mphase[data-v-f7b643ea]{color:var(--color-warning)}.mcar[data-v-f7b643ea]{margin-left:var(--space-1);color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.member.open .mcar[data-v-f7b643ea]{transform:rotate(90deg)}.member-saved[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);text-align:left;cursor:pointer}.member-saved[data-v-f7b643ea]:hover{color:var(--color-text-muted)}.member-saved[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.member-saved-car[data-v-f7b643ea]{transition:transform var(--duration-base) var(--ease-out)}.member-saved-car.open[data-v-f7b643ea]{transform:rotate(90deg)}.member-body[data-v-f7b643ea]{padding:var(--space-1) var(--space-3) 10px 31px;color:var(--color-text-muted);font-size:calc(var(--content-font-size) - 2px);line-height:1.65;white-space:pre-wrap;word-break:break-word}.waiting[data-v-f7b643ea]{padding:6px var(--space-3) 10px;color:var(--color-text-muted);font-size:var(--text-xs)}.fallback-output[data-v-f7b643ea]{padding:10px var(--space-3);color:var(--color-text);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;white-space:pre-wrap;word-break:break-word}.status-glyph[data-v-f1aedfd0]{flex:none;width:16px;display:inline-flex;align-items:center;justify-content:center;user-select:none}.status-glyph.s-run[data-v-f1aedfd0]{color:var(--color-accent)}.status-glyph.s-done[data-v-f1aedfd0]{color:var(--color-success)}.status-glyph.s-fail[data-v-f1aedfd0]{color:var(--color-danger)}.status-glyph.s-pending[data-v-f1aedfd0]{color:var(--color-text-faint)}.todo-bar[data-v-1b7f51f3]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.todo-fill[data-v-1b7f51f3]{background:var(--color-success);border-radius:var(--radius-full);transition:width var(--duration-slow) var(--ease-out)}.todo-list[data-v-1b7f51f3]{display:flex;flex-direction:column;gap:1px;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-2) var(--space-3);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.todo-row[data-v-1b7f51f3]{display:flex;align-items:center;gap:7px;padding:2px 0;font-size:calc(var(--content-font-size) - 1px);color:var(--color-text)}.todo-title[data-v-1b7f51f3]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.4}.todo-row.s-in_progress .todo-title[data-v-1b7f51f3]{font-weight:var(--weight-medium)}.todo-row.s-done .todo-title[data-v-1b7f51f3]{color:var(--color-text-faint);text-decoration:line-through}.fetch-url[data-v-8c248fcc]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;color:var(--color-text-faint);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.think[data-v-7d463c2a]{margin:0}.think-head[data-v-7d463c2a]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.think-head[data-v-7d463c2a]:hover{color:var(--color-text)}.think-head[data-v-7d463c2a]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.think-bulb[data-v-7d463c2a]{flex:none}.think-title[data-v-7d463c2a]{font-weight:var(--weight-medium)}.think-time[data-v-7d463c2a]{color:var(--color-text-faint);font-weight:400;flex:none}.think.streaming .think-title[data-v-7d463c2a]{animation:think-breathe-7d463c2a 1.6s var(--ease-in-out) infinite}@keyframes think-breathe-7d463c2a{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.think.streaming .think-title[data-v-7d463c2a]{animation:none}}.think-car[data-v-7d463c2a]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.think.open .think-car[data-v-7d463c2a]{transform:rotate(90deg)}.think-body[data-v-7d463c2a]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.think-body.instant[data-v-7d463c2a]{transition:none}.think-body.open[data-v-7d463c2a]{grid-template-rows:minmax(0,1fr)}.think-body-inner[data-v-7d463c2a]{min-height:0;overflow:hidden}.think-text[data-v-7d463c2a]{font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:400;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word;margin:0;padding:var(--space-1) 0 var(--space-2)}.mob .think-text[data-v-7d463c2a]{color:var(--color-text-faint);line-height:var(--leading-normal)}.activity-run[data-v-91eb361a]{display:flex;flex-direction:column;animation:kimi-card-in var(--duration-base) var(--ease-out)}.ar-head[data-v-91eb361a]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.ar-head[data-v-91eb361a]:hover{color:var(--color-text)}.ar-head[data-v-91eb361a]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ar-glyph[data-v-91eb361a]{display:inline-flex;align-items:center;flex:none;color:var(--color-text-faint)}.ar-glyph.ok[data-v-91eb361a]{color:var(--color-success)}.ar-glyph.err[data-v-91eb361a]{color:var(--color-danger)}.ar-glyph.run[data-v-91eb361a]{color:var(--color-text-muted);animation:ar-breathe-91eb361a 1.6s var(--ease-in-out) infinite}@keyframes ar-breathe-91eb361a{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.ar-glyph.run[data-v-91eb361a]{animation:none}}.ar-sum[data-v-91eb361a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.ar-danger[data-v-91eb361a]{color:var(--color-danger)}.ar-faint[data-v-91eb361a],.ar-sep[data-v-91eb361a]{color:var(--color-text-faint)}.ar-car[data-v-91eb361a]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.activity-run.open .ar-car[data-v-91eb361a]{transform:rotate(90deg)}.ar-body[data-v-91eb361a]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.ar-body.open[data-v-91eb361a]{grid-template-rows:minmax(0,1fr)}.ar-body-inner[data-v-91eb361a]{min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:var(--space-2);padding-top:var(--space-1)}.msg-time[data-v-9153170e]{display:inline-flex;align-items:center;min-height:22px;box-sizing:border-box;padding:2px 5px;border-radius:var(--radius-sm);color:var(--muted);font-size:var(--text-xs);font-weight:var(--weight-medium);line-height:1;opacity:.7;white-space:nowrap}.ntf[data-v-69e0a1db],.ntf-group-card[data-v-69e0a1db]{margin:var(--space-2) 0;border:.5px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface);box-shadow:var(--shadow-xs);overflow:hidden;animation:kimi-card-in var(--duration-slow) var(--ease-out)}.ntf.ok[data-v-69e0a1db]{background:var(--color-success-soft);border-color:var(--color-success-bd)}.ntf.err[data-v-69e0a1db]{background:var(--color-danger-soft);border-color:var(--color-danger-bd)}.ntf.warn[data-v-69e0a1db]{background:var(--color-warning-soft);border-color:var(--color-warning-bd)}.ntf-head[data-v-69e0a1db]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-2) var(--space-3);border:none;text-align:left;user-select:none}.ntf-chip[data-v-69e0a1db]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);flex:none;color:var(--color-text-muted)}.ntf.ok .ntf-chip[data-v-69e0a1db]{color:var(--color-success)}.ntf.err .ntf-chip[data-v-69e0a1db]{color:var(--color-danger)}.ntf.warn .ntf-chip[data-v-69e0a1db]{color:var(--color-warning)}.ntf-main[data-v-69e0a1db]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.ntf-title[data-v-69e0a1db]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.ntf-sub[data-v-69e0a1db]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ntf-side[data-v-69e0a1db]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1);font-size:var(--text-xs);color:var(--color-text-faint)}.ntf-side .st[data-v-69e0a1db]{font-weight:var(--weight-medium)}.ntf.ok .st[data-v-69e0a1db],.ng-item.ok .st[data-v-69e0a1db]{color:var(--color-success)}.ntf.err .st[data-v-69e0a1db],.ng-item.err .st[data-v-69e0a1db]{color:var(--color-danger)}.ntf.warn .st[data-v-69e0a1db],.ng-item.warn .st[data-v-69e0a1db]{color:var(--color-warning)}.ntf-car[data-v-69e0a1db]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.ntf.open>.ntf-head .ntf-car[data-v-69e0a1db],.ntf-group-card.open>.ntf-head .ntf-car[data-v-69e0a1db],.ng-item.open>.ntf-head .ntf-car[data-v-69e0a1db]{transform:rotate(90deg)}.ntf-body-in[data-v-69e0a1db]{margin:0 var(--space-3) var(--space-3);padding-top:var(--space-3);border-top:.5px solid var(--color-line);display:flex;flex-direction:column;gap:var(--space-2)}.ntf.ok .ntf-body-in[data-v-69e0a1db],.ng-item.ok .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-success-bd)}.ntf.err .ntf-body-in[data-v-69e0a1db],.ng-item.err .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-danger-bd)}.ntf.warn .ntf-body-in[data-v-69e0a1db],.ng-item.warn .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-warning-bd)}.nd-fields[data-v-69e0a1db]{display:grid;grid-template-columns:auto 1fr;gap:var(--space-1) var(--space-3)}.nd-fields .k[data-v-69e0a1db]{color:var(--color-text-faint);font-size:var(--text-xs)}.nd-fields .v[data-v-69e0a1db]{color:var(--color-text-muted);font-size:var(--text-xs);font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nd-body[data-v-69e0a1db]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.nd-out[data-v-69e0a1db]{display:flex;align-items:center;gap:var(--space-2);background:var(--color-surface-raised);border-radius:var(--radius-md);padding:var(--space-1) var(--space-2);box-shadow:var(--shadow-xs)}.nd-out-ic[data-v-69e0a1db]{color:var(--color-text-faint);flex:none}.nd-out .path[data-v-69e0a1db]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left}.nd-act[data-v-69e0a1db]{display:inline-flex;align-items:center;height:var(--space-6);padding:0 var(--space-2);border-radius:var(--radius-full);font-size:var(--text-xs);color:var(--color-text-muted);border:.5px solid var(--color-line-strong);background:var(--color-surface-raised);flex:none;transition:color var(--duration-fast) var(--ease-out)}.nd-act[data-v-69e0a1db]:hover{color:var(--color-text)}.nd-raw summary[data-v-69e0a1db]{list-style:none;display:flex;align-items:center;gap:var(--space-1);cursor:pointer;color:var(--color-text-faint);font-size:var(--text-xs);user-select:none}.nd-raw summary[data-v-69e0a1db]::-webkit-details-marker{display:none}.nd-raw summary[data-v-69e0a1db]:hover{color:var(--color-text)}.nd-raw-car[data-v-69e0a1db]{transition:transform var(--duration-base) var(--ease-out)}.nd-raw[open] .nd-raw-car[data-v-69e0a1db]{transform:rotate(90deg)}.nd-raw pre[data-v-69e0a1db]{margin:var(--space-2) 0 0;padding:var(--space-2) var(--space-3);background:var(--color-surface-raised);border-radius:var(--radius-sm);box-shadow:var(--shadow-xs);font-size:var(--text-xs);line-height:1.55;color:var(--color-text-muted);overflow-x:auto;white-space:pre}.ng-dots[data-v-69e0a1db]{display:inline-flex;gap:var(--space-1);margin-right:var(--space-1)}.dot[data-v-69e0a1db]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--color-text-faint)}.dot.done[data-v-69e0a1db]{background:var(--color-success)}.dot.error[data-v-69e0a1db]{background:var(--color-danger)}.dot.warn[data-v-69e0a1db]{background:var(--color-warning)}.ng-list[data-v-69e0a1db]{display:flex;flex-direction:column}.ng-item[data-v-69e0a1db]{border-top:.5px solid var(--color-subtle)}.ng-item>.ntf-head[data-v-69e0a1db]{padding:var(--space-1) var(--space-3)}.ng-item .ntf-chip[data-v-69e0a1db]{width:22px;height:22px;border-radius:var(--radius-sm);box-shadow:none;background:transparent}.ng-item.ok .ntf-chip[data-v-69e0a1db]{color:var(--color-success)}.ng-item.err .ntf-chip[data-v-69e0a1db]{color:var(--color-danger)}.ng-item.warn .ntf-chip[data-v-69e0a1db]{color:var(--color-warning)}.ng-item .ntf-title[data-v-69e0a1db]{font-weight:var(--weight-regular);color:var(--color-text-muted)}.ng-item.open .ntf-title[data-v-69e0a1db]{color:var(--color-text)}.turn-fold[data-v-66797f5d]{display:flex;flex-direction:column}.tf-head[data-v-66797f5d]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.tf-head[data-v-66797f5d]:hover{color:var(--color-text)}.tf-head[data-v-66797f5d]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.tf-sum[data-v-66797f5d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.tf-car[data-v-66797f5d]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.turn-fold.open .tf-car[data-v-66797f5d]{transform:rotate(90deg)}.tf-body[data-v-66797f5d]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tf-body.open[data-v-66797f5d]{grid-template-rows:minmax(0,1fr)}.tf-body-inner[data-v-66797f5d]{min-height:0;overflow:hidden;display:flex;flex-direction:column}.tf-body-inner>.msg[data-v-66797f5d],.tf-body-inner[data-v-66797f5d]>.think,.tf-body-inner[data-v-66797f5d]>.tool-group,.tf-body-inner[data-v-66797f5d]>.activity-run,.tf-body-inner[data-v-66797f5d]>.agent-card,.tf-body-inner[data-v-66797f5d]>.agent-group,.tf-body-inner[data-v-66797f5d]>.tool-line,.tf-body-inner[data-v-66797f5d]>.swarm-card,.tf-body-inner[data-v-66797f5d]>.media-tool,.tf-body-inner[data-v-66797f5d]>.ask-receipt{margin-top:var(--chat-block-gap)}.turn-fold.streaming .tf-body-inner>.msg[data-v-66797f5d]:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.think:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.tool-group:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.activity-run:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.agent-card:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.agent-group:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.tool-line:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.swarm-card:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.media-tool:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.ask-receipt:first-child{margin-top:0}.tf-body-inner .msg[data-v-66797f5d]{font-size:var(--ui-font-size);line-height:var(--leading-prose);color:var(--color-text);font-weight:var(--weight-medium)}.tf-body-inner .msg[data-v-66797f5d] p{margin:0}.tf-body-inner .msg[data-v-66797f5d] p+p{margin-top:var(--space-2)}@container (min-width: 760px){.tf-body-inner .msg[data-v-66797f5d] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.tf-body-inner .msg[data-v-66797f5d] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}.tf-body-inner .msg[data-v-66797f5d] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}}@media(max-width:640px){.tf-body-inner .msg[data-v-66797f5d]{font-size:var(--ui-font-size-xl)}}.turn-files[data-v-f37da416]{margin-top:var(--chat-block-gap)}.turn-files[data-v-f37da416] .ui-card__head{font-family:var(--font-ui);font-weight:var(--weight-regular);padding:var(--space-2) var(--space-3)}.turn-files[data-v-f37da416] .ui-card__body{padding:var(--space-1) var(--space-3)}.turn-files[data-v-f37da416] .ui-card__foot{padding:0;justify-content:stretch}.tf-ic[data-v-f37da416]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.tf-title[data-v-f37da416]{font-size:var(--text-sm);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-stats[data-v-f37da416]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.tf-add[data-v-f37da416],.tf-del[data-v-f37da416]{font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tf-add[data-v-f37da416]{color:var(--color-success)}.tf-del[data-v-f37da416]{color:var(--color-danger)}.tf-list[data-v-f37da416]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.tf-row[data-v-f37da416]{display:flex;align-items:center;gap:var(--space-1);min-width:0;padding:var(--space-1) 0;font-size:var(--text-sm);line-height:var(--leading-tight)}.tf-file[data-v-f37da416]{display:flex;align-items:baseline;border:none;border-radius:var(--radius-xs);background:transparent;padding:0;font-family:inherit;font-size:inherit;color:var(--color-text);flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-align:left}button.tf-file[data-v-f37da416]{cursor:pointer}button.tf-file[data-v-f37da416]:hover{text-decoration:underline;text-decoration-color:var(--color-text-faint);text-underline-offset:3px}.tf-file[data-v-f37da416]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tf-dir[data-v-f37da416]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--color-text-faint)}.tf-base[data-v-f37da416]{flex:none;font-weight:var(--weight-medium);color:var(--color-text)}.tf-more[data-v-f37da416]{width:100%;justify-content:flex-start;border-radius:0}.turn-files .tf-more[data-v-f37da416]:not(:disabled):active{transform:none}.tf-more-car[data-v-f37da416]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.tf-more-car.open[data-v-f37da416]{transform:rotate(180deg)}.diffbar[data-v-f37da416]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;flex:none}.seg-add[data-v-f37da416]{background:var(--color-success)}.seg-del[data-v-f37da416]{background:var(--color-danger)}.activity-notice[data-v-cc29061f]{display:inline-flex;align-items:center;gap:9px;align-self:flex-start;margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.cn[data-v-9f79345d]{margin:0;align-self:flex-end;max-width:78%;display:flex;flex-direction:column;align-items:flex-end}.cn-head[data-v-9f79345d]{align-self:flex-end;display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal);overflow-wrap:anywhere}.cn-head-ico[data-v-9f79345d]{flex:none}.cn-head.error .cn-head-ico[data-v-9f79345d]{color:var(--color-danger)}.cn-bubble[data-v-9f79345d]{box-sizing:border-box;max-width:100%;padding:10px 12px;background:var(--color-user-bubble-bg);border-radius:var(--radius-lg);color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.cn-meta[data-v-9f79345d]{margin-top:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal)}/*! PhotoSwipe main CSS by Dmytro Semenov | photoswipe.com */.pswp{--pswp-bg: #000;--pswp-placeholder-bg: #222;--pswp-root-z-index: 100000;--pswp-preloader-color: rgba(79, 79, 79, .4);--pswp-preloader-color-secondary: rgba(255, 255, 255, .9);--pswp-icon-color: #fff;--pswp-icon-color-secondary: #4f4f4f;--pswp-icon-stroke-color: #4f4f4f;--pswp-icon-stroke-width: 2px;--pswp-error-text-color: var(--pswp-icon-color)}.pswp{position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--pswp-root-z-index);display:none;touch-action:none;outline:0;opacity:.003;contain:layout style size;-webkit-tap-highlight-color:rgba(0,0,0,0)}.pswp:focus{outline:0}.pswp *{box-sizing:border-box}.pswp img{max-width:none}.pswp--open{display:block}.pswp,.pswp__bg{transform:translateZ(0);will-change:opacity}.pswp__bg{opacity:.005;background:var(--pswp-bg)}.pswp,.pswp__scroll-wrap{overflow:hidden}.pswp__scroll-wrap,.pswp__bg,.pswp__container,.pswp__item,.pswp__content,.pswp__img,.pswp__zoom-wrap{position:absolute;top:0;left:0;width:100%;height:100%}.pswp__img,.pswp__zoom-wrap{width:auto;height:auto}.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img{cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img,.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active,.pswp__img{cursor:-webkit-zoom-out;cursor:-moz-zoom-out;cursor:zoom-out}.pswp__container,.pswp__img,.pswp__button,.pswp__counter{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pswp__item{z-index:1;overflow:hidden}.pswp__hidden{display:none!important}.pswp__content{pointer-events:none}.pswp__content>*{pointer-events:auto}.pswp__error-msg-container{display:grid}.pswp__error-msg{margin:auto;font-size:1em;line-height:1;color:var(--pswp-error-text-color)}.pswp .pswp__hide-on-close{opacity:.005;will-change:opacity;transition:opacity var(--pswp-transition-duration) cubic-bezier(.4,0,.22,1);z-index:10;pointer-events:none}.pswp--ui-visible .pswp__hide-on-close{opacity:1;pointer-events:auto}.pswp__button{position:relative;display:block;width:50px;height:60px;padding:0;margin:0;overflow:hidden;cursor:pointer;background:none;border:0;box-shadow:none;opacity:.85;-webkit-appearance:none;-webkit-touch-callout:none}.pswp__button:hover,.pswp__button:active,.pswp__button:focus{transition:none;padding:0;background:none;border:0;box-shadow:none;opacity:1}.pswp__button:disabled{opacity:.3;cursor:auto}.pswp__icn{fill:var(--pswp-icon-color);color:var(--pswp-icon-color-secondary)}.pswp__icn{position:absolute;top:14px;left:9px;width:32px;height:32px;overflow:hidden;pointer-events:none}.pswp__icn-shadow{stroke:var(--pswp-icon-stroke-color);stroke-width:var(--pswp-icon-stroke-width);fill:none}.pswp__icn:focus{outline:0}div.pswp__img--placeholder,.pswp__img--with-bg{background:var(--pswp-placeholder-bg)}.pswp__top-bar{position:absolute;left:0;top:0;width:100%;height:60px;display:flex;flex-direction:row;justify-content:flex-end;z-index:10;pointer-events:none!important}.pswp__top-bar>*{pointer-events:auto;will-change:opacity}.pswp__button--close{margin-right:6px}.pswp__button--arrow{position:absolute;width:75px;height:100px;top:50%;margin-top:-50px}.pswp__button--arrow:disabled{display:none;cursor:default}.pswp__button--arrow .pswp__icn{top:50%;margin-top:-30px;width:60px;height:60px;background:none;border-radius:0}.pswp--one-slide .pswp__button--arrow{display:none}.pswp--touch .pswp__button--arrow{visibility:hidden}.pswp--has_mouse .pswp__button--arrow{visibility:visible}.pswp__button--arrow--prev{right:auto;left:0}.pswp__button--arrow--next{right:0}.pswp__button--arrow--next .pswp__icn{left:auto;right:14px;transform:scaleX(-1)}.pswp__button--zoom{display:none}.pswp--zoom-allowed .pswp__button--zoom{display:block}.pswp--zoomed-in .pswp__zoom-icn-bar-v{display:none}.pswp__preloader{position:relative;overflow:hidden;width:50px;height:60px;margin-right:auto}.pswp__preloader .pswp__icn{opacity:0;transition:opacity .2s linear;animation:pswp-clockwise .6s linear infinite}.pswp__preloader--active .pswp__icn{opacity:.85}@keyframes pswp-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.pswp__counter{height:30px;margin-top:15px;margin-inline-start:20px;font-size:14px;line-height:30px;color:var(--pswp-icon-color);text-shadow:1px 1px 3px var(--pswp-icon-color-secondary);opacity:.85}.pswp--one-slide .pswp__counter{display:none}.pswp{--pswp-root-z-index: var(--z-modal);--pswp-bg: var(--color-scrim-strong)}.media-preview-caption{position:absolute;left:0;right:0;bottom:var(--space-4);padding:0 var(--space-6);color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.media-lightbox[data-v-6c0c564d]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:var(--color-scrim-strong)}.media-lightbox-card[data-v-6c0c564d]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(960px,calc(100vw - var(--space-6) * 2));max-height:calc(100vh - var(--space-6) * 2)}.media-lightbox-frame[data-v-6c0c564d]{max-width:100%;border-radius:var(--radius-md);overflow:hidden;background:var(--color-bg);box-shadow:var(--shadow-xl)}.media-lightbox-media[data-v-6c0c564d]{display:block;max-width:100%;max-height:calc(100vh - var(--space-6) * 4);object-fit:contain}.media-lightbox-name[data-v-6c0c564d]{max-width:100%;color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-lightbox-close[data-v-6c0c564d]{position:fixed;top:var(--space-4);right:var(--space-6);display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-sm);cursor:pointer;z-index:var(--z-modal-dropdown)}.media-lightbox-close[data-v-6c0c564d]:before{content:"";position:absolute;inset:-6px}.media-lightbox-close[data-v-6c0c564d]:hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.media-thumb[data-v-a7ab7e98]{position:relative;flex:none;display:inline-flex}.media-thumb-btn[data-v-a7ab7e98]{display:block;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:hidden;cursor:pointer;transition:border-color var(--duration-fast) ease}.media-thumb-btn[data-v-a7ab7e98]:hover{border-color:var(--color-line-strong)}.media-thumb-btn[data-v-a7ab7e98]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.media-thumb-media[data-v-a7ab7e98]{display:block;width:64px;height:64px;object-fit:cover}.media-thumb-tile[data-v-a7ab7e98]{object-fit:none}.media-thumb-badge[data-v-a7ab7e98]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.media-thumb-badge.is-error[data-v-a7ab7e98]{color:var(--color-danger);border-color:var(--color-danger-bd)}.media-thumb.is-error .media-thumb-btn[data-v-a7ab7e98]{border-color:var(--color-danger-bd)}.media-thumb-rm[data-v-a7ab7e98]{position:absolute;top:var(--space-1);right:var(--space-1);z-index:1;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:var(--color-scrim);color:var(--color-text-on-scrim);cursor:pointer}.media-thumb-rm[data-v-a7ab7e98]:hover{background:var(--color-text);color:var(--color-bg)}.media-thumb-rm[data-v-a7ab7e98]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.att-chip[data-v-f3a3043a]{display:inline-flex;align-items:center;gap:6px;max-width:220px;padding:4px 9px 4px var(--att-chip-pad-left, 5px);background:var(--color-well);border:.5px solid var(--color-line);border-radius:999px;font-size:var(--ui-font-size-sm);transition:border-color var(--duration-fast) ease}.att-chip[data-v-f3a3043a]:hover{border-color:var(--color-line-strong)}.att-activate[data-v-f3a3043a]{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}.att-activate[data-v-f3a3043a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:999px}.att-tile[data-v-f3a3043a]{width:20px;height:20px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--color-text-muted);background:var(--color-surface-sunken)}.att-tile[data-v-f3a3043a] .att-thumb{width:100%;height:100%;object-fit:cover;display:block}.att-name[data-v-f3a3043a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.att-chip.is-error[data-v-f3a3043a]{border-color:var(--color-danger-bd)}.att-chip.is-error .att-err[data-v-f3a3043a]{flex:none;display:flex;align-items:center;color:var(--color-danger)}.att-rm[data-v-f3a3043a]{flex:none;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--color-text-faint);cursor:pointer}.att-rm[data-v-f3a3043a]:hover{background:var(--color-hover);color:var(--color-text)}.att-rm[data-v-f3a3043a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mascot-host[data-v-75a5cb70]{position:relative;width:100%;aspect-ratio:72 / 100}.mascot-fallback[data-v-75a5cb70]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:86.5%;height:auto}.mascot-canvas[data-v-75a5cb70]{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .25s ease}.mascot-canvas.ready[data-v-75a5cb70]{opacity:1}@media(prefers-reduced-motion:reduce){.mascot-canvas[data-v-75a5cb70]{transition:none}}.working-indicator[data-v-8abb44ef]{display:inline-flex;align-items:center;gap:var(--space-2);align-self:flex-start;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.wi-mascot[data-v-8abb44ef]{flex:none;width:40px}.wi-label[data-v-8abb44ef]{animation:wi-breathe-8abb44ef 1.6s var(--ease-in-out) infinite}@keyframes wi-breathe-8abb44ef{0%,to{opacity:1}50%{opacity:.45}}.chat-empty[data-v-2304fd80]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px 16px;color:var(--faint);text-align:center}.chat-empty-text[data-v-2304fd80]{font-size:var(--ui-font-size-sm)}.chat-loading[data-v-2304fd80]{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:24px 16px;color:var(--muted)}.chat-loading-text[data-v-2304fd80]{font-size:var(--ui-font-size-sm)}.chat[data-v-2304fd80]{--chat-turn-gap: 16px;--chat-block-gap: 10px;--chat-section-gap: 18px;display:flex;flex-direction:column;gap:0;padding:16px 14px 20px;flex:1;min-height:0;position:relative}.chat .chat-empty[data-v-2304fd80]{align-self:stretch}.open-unsupported[data-v-2304fd80]{position:absolute;bottom:16px;left:50%;transform:translate(-50%);max-width:min(90%,480px);padding:6px 12px;border-radius:var(--radius-md);border:.5px solid var(--color-line);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;z-index:var(--z-sticky)}.chat>.u-turn[data-v-2304fd80],.chat>.a-msg[data-v-2304fd80],.chat>.compact-divider[data-v-2304fd80],.chat>.cron-notice[data-v-2304fd80],.chat>.sending-placeholder[data-v-2304fd80],.chat[data-v-2304fd80]>.activity-notice{margin-top:var(--chat-turn-gap)}.chat>.a-msg[data-v-2304fd80]{margin-top:10px}.chat>.u-turn[data-v-2304fd80]:first-child,.chat>.a-msg[data-v-2304fd80]:first-child,.chat>.compact-divider[data-v-2304fd80]:first-child,.chat>.cron-notice[data-v-2304fd80]:first-child,.chat>.sending-placeholder[data-v-2304fd80]:first-child,.chat[data-v-2304fd80]>.activity-notice:first-child{margin-top:0}.u-turn[data-v-2304fd80]{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-start;width:100%}.u-bub[data-v-2304fd80]{align-self:flex-end;max-width:78%;background:var(--color-user-bubble-bg);color:var(--color-text);border-radius:var(--radius-lg);padding:10px 12px;font-size:var(--content-font-size);line-height:var(--leading-normal)}.u-meta[data-v-2304fd80]{align-self:flex-end;display:flex;justify-content:flex-end;align-items:center;max-width:78%;margin-top:var(--space-2);margin-right:4px}.u-meta .u-edit[data-v-2304fd80]{min-height:22px;box-sizing:border-box}.u-text[data-v-2304fd80]{white-space:pre-wrap;overflow-wrap:anywhere}.u-text-wrap[data-v-2304fd80]{position:relative;display:flex;flex-direction:column}.u-text-wrap-args[data-v-2304fd80]{margin-top:var(--space-1)}.u-text-wrap.is-clamped[data-v-2304fd80]{min-width:120px}.u-text-wrap.is-clamped>.u-text[data-v-2304fd80],.u-text-wrap.is-clamped>.skill-act-args[data-v-2304fd80],.u-text-wrap.is-clamped>.q-body[data-v-2304fd80]{max-height:10lh;overflow:hidden;mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh));-webkit-mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh))}.u-text-toggle[data-v-2304fd80]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:center;margin-top:var(--space-2);padding:var(--space-2) var(--space-4);border:none;border-radius:var(--radius-full);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:1;cursor:pointer;user-select:none;transition:box-shadow var(--duration-base) var(--ease-out)}.u-text-toggle[data-v-2304fd80]:hover{box-shadow:var(--shadow-md)}.u-text-toggle[data-v-2304fd80]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.u-text-wrap.is-clamped .u-text-toggle[data-v-2304fd80]{position:absolute;bottom:0;left:50%;transform:translate(-50%);margin-top:0}.u-text-toggle-car[data-v-2304fd80]{transition:transform var(--duration-base) var(--ease-out)}.u-text-toggle[aria-expanded=true] .u-text-toggle-car[data-v-2304fd80]{transform:rotate(180deg)}.u-edit[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s}.u-edit svg[data-v-2304fd80]{display:block;flex:none}.u-edit[data-v-2304fd80]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-armed[data-v-2304fd80]{--undo-hint-duration: 5s;gap:var(--space-1);opacity:1;color:var(--color-text);animation:u-edit-armed-blink-2304fd80 var(--undo-hint-duration) linear forwards}.u-edit-armed[data-v-2304fd80]:hover{color:var(--color-accent);background:var(--hover)}.u-edit-hint[data-v-2304fd80]{display:inline-flex;align-items:center;gap:var(--space-1);font-size:var(--text-xs);font-weight:var(--weight-medium);white-space:nowrap}@keyframes u-edit-armed-blink-2304fd80{0%,55%{opacity:1}62%{opacity:.45}69%{opacity:1}75%{opacity:.4}81%{opacity:.95}86%{opacity:.35}91%{opacity:.85}95%{opacity:.3}to{opacity:0}}@media(prefers-reduced-motion:reduce){.u-edit-armed[data-v-2304fd80]{animation:none}}.u-copy[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.u-copy svg[data-v-2304fd80]{display:block;flex:none}.u-copy[data-v-2304fd80]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-wrap[data-v-2304fd80]{display:flex;justify-content:flex-end}.chat>.u-edit-wrap[data-v-2304fd80]{margin-top:4px}.chat>.u-edit-wrap+.a-msg[data-v-2304fd80]{margin-top:8px}.compact-divider[data-v-2304fd80]{display:flex;align-items:center;gap:10px;align-self:stretch;width:100%;margin:var(--chat-section-gap) 0 0}.chat>.compact-divider[data-v-2304fd80]:first-child{margin-top:0}.cd-line[data-v-2304fd80]{flex:1;height:1px;background:var(--line)}.cd-label[data-v-2304fd80]{flex:none;display:inline-flex;align-items:center;gap:8px;max-width:80%;font-size:var(--text-base);color:var(--muted);white-space:nowrap}.cd-btn[data-v-2304fd80]{background:none;border:none;padding:0;cursor:pointer;font:inherit;font-size:var(--text-base);color:var(--muted)}.cd-view[data-v-2304fd80]{color:var(--color-accent)}.cd-btn:hover .cd-view[data-v-2304fd80]{text-decoration:underline}.chat>.turn-failed[data-v-2304fd80]{margin-top:var(--chat-turn-gap)}.chat>.turn-failed[data-v-2304fd80]:first-child{margin-top:0}.turn-failed[data-v-2304fd80]{display:flex;align-items:center;gap:var(--space-2);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);animation:kimi-card-in var(--duration-slow) var(--ease-out)}.tf-chip[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);flex:none;color:var(--color-danger)}.tf-main[data-v-2304fd80]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.tf-title[data-v-2304fd80]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.tf-sub[data-v-2304fd80]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-meta[data-v-2304fd80]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.goal-prov[data-v-2304fd80]{display:flex;align-items:center;gap:var(--space-1);margin-bottom:var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-normal);user-select:none}.a-msg[data-v-2304fd80]{align-self:flex-start;max-width:94%;width:94%}.a-msg-ft[data-v-2304fd80]{display:flex;justify-content:flex-start;align-items:center;gap:8px;height:auto;margin-top:var(--chat-block-gap);overflow:visible}.a-time[data-v-2304fd80]{display:inline-flex;align-items:center;font-size:var(--text-base);color:var(--muted);line-height:1}.a-cpbtn[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.a-cpbtn[data-v-2304fd80]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.a-cpbtn svg[data-v-2304fd80]{display:block;flex:none}@media(hover:none){.a-msg-ft[data-v-2304fd80]{height:auto;margin-top:var(--chat-block-gap);opacity:1;pointer-events:auto}.a-cpbtn[data-v-2304fd80]{font-size:var(--ui-font-size-sm);padding:8px 10px;margin:-4px -6px}}.a-msg .msg[data-v-2304fd80]{font-size:var(--ui-font-size);line-height:var(--leading-prose);color:var(--color-text);font-weight:500}.a-msg .msg[data-v-2304fd80] p{margin:0}.a-msg .msg[data-v-2304fd80] p+p{margin-top:8px}.a-msg>.msg[data-v-2304fd80],.a-msg[data-v-2304fd80]>.think,.a-msg[data-v-2304fd80]>.tool-group,.a-msg[data-v-2304fd80]>.activity-run,.a-msg[data-v-2304fd80]>.agent-card,.a-msg[data-v-2304fd80]>.agent-group,.a-msg[data-v-2304fd80]>.tool-line,.a-msg[data-v-2304fd80]>.swarm-card,.a-msg[data-v-2304fd80]>.media-tool,.a-msg[data-v-2304fd80]>.ask-receipt{margin-top:var(--chat-block-gap)}.a-msg>.msg[data-v-2304fd80]:first-child,.a-msg[data-v-2304fd80]>.think:first-child,.a-msg[data-v-2304fd80]>.tool-group:first-child,.a-msg[data-v-2304fd80]>.activity-run:first-child,.a-msg[data-v-2304fd80]>.agent-card:first-child,.a-msg[data-v-2304fd80]>.agent-group:first-child,.a-msg[data-v-2304fd80]>.tool-line:first-child,.a-msg[data-v-2304fd80]>.swarm-card:first-child,.a-msg[data-v-2304fd80]>.media-tool:first-child,.a-msg[data-v-2304fd80]>.ask-receipt:first-child{margin-top:0}.a-msg>.goal-prov:first-child+.msg[data-v-2304fd80],.a-msg>.goal-prov[data-v-2304fd80]:first-child+.think,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.tool-group,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.activity-run,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.agent-card,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.agent-group,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.tool-line,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.swarm-card,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.media-tool,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.ask-receipt,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.turn-fold{margin-top:0}.a-msg[data-v-2304fd80] :not(pre)>code{font:.9em var(--font-mono);background:var(--color-inline-code-bg);border:.5px solid var(--color-line);border-radius:var(--radius-sm);padding:1px 6px;color:var(--color-accent-hover)}@container (min-width: 760px){.a-msg .msg[data-v-2304fd80] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.a-msg .msg[data-v-2304fd80] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}.a-msg .msg[data-v-2304fd80] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}}.u-media[data-v-2304fd80]{display:flex;flex-wrap:wrap;gap:var(--space-2)}.u-media[data-v-2304fd80]:not(:last-child){margin-bottom:var(--space-2)}.u-atts[data-v-2304fd80]{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.sending-placeholder[data-v-2304fd80]{align-self:flex-start;padding:10px 0}.skill-act[data-v-2304fd80]{display:flex;flex-direction:column;gap:2px}.skill-act-head[data-v-2304fd80]{font-size:var(--ui-font-size-sm);font-weight:500;color:var(--color-accent-hover);display:flex;align-items:center;gap:6px}.skill-act-arrow[data-v-2304fd80]{color:var(--color-accent);font-size:var(--text-base)}.skill-act-args[data-v-2304fd80]{font-size:var(--text-base);color:var(--muted);padding-left:17px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:640px){.chat[data-v-2304fd80]{box-sizing:border-box;width:100%;padding:14px max(12px,var(--safe-right)) 18px max(12px,var(--safe-left))}.u-bub[data-v-2304fd80]{max-width:min(88%,calc(100vw - 52px))}.a-msg[data-v-2304fd80]{width:100%;max-width:100%}.u-bub .u-text[data-v-2304fd80],.a-msg .msg[data-v-2304fd80]{font-size:var(--ui-font-size-xl)}.a-msg[data-v-2304fd80] .md,.a-msg[data-v-2304fd80] .markdown-renderer,.a-msg[data-v-2304fd80] .code-block-container,.a-msg[data-v-2304fd80] .diff-wrap,.a-msg[data-v-2304fd80] pre{max-width:100%}.a-msg[data-v-2304fd80] .code-block-container pre,.a-msg[data-v-2304fd80] .diff-pre{overflow-x:auto;-webkit-overflow-scrolling:touch}.a-msg[data-v-2304fd80] .media-tool.mob{width:min(44vw,160px)}.cd-label[data-v-2304fd80]{min-width:0;max-width:calc(100% - 48px);overflow:hidden;text-overflow:ellipsis}.u-edit-confirm[data-v-2304fd80]{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100vw - 28px)}.ts[data-v-2304fd80]{font-size:var(--ui-font-size-sm)}.chat-empty-text[data-v-2304fd80],.chat-loading-text[data-v-2304fd80]{font-size:var(--ui-font-size-lg)}.cd-label[data-v-2304fd80],.cd-btn[data-v-2304fd80]{font-size:var(--ui-font-size)}}.top-sentinel[data-v-2304fd80]{display:flex;align-items:center;justify-content:center;padding:12px 0;min-height:28px;user-select:none}.top-sentinel-loading[data-v-2304fd80]{opacity:.8}.top-sentinel-btn[data-v-2304fd80]{appearance:none;border:.5px solid var(--border);background:transparent;color:var(--muted);font-size:var(--ui-font-size-sm);padding:4px 12px;border-radius:999px;cursor:pointer;transition:color .15s ease,border-color .15s ease}.top-sentinel-btn[data-v-2304fd80]:hover{color:var(--fg);border-color:var(--fg)}.top-sentinel-text[data-v-2304fd80]{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--ui-font-size-sm)}.chat[data-v-2304fd80]{background:transparent}.chat[data-v-2304fd80]{gap:0;padding:22px 20px 26px}.u-bub[data-v-2304fd80]{background:var(--color-user-bubble-bg);border-radius:var(--radius-lg);padding:10px 12px}.a-msg[data-v-2304fd80]{max-width:100%;width:100%}.chat>.q-stack[data-v-2304fd80]{margin-top:var(--chat-turn-gap)}.chat>.q-stack[data-v-2304fd80]:first-child{margin-top:0}.q-stack[data-v-2304fd80]{align-self:flex-end;width:100%;display:flex;flex-direction:column;gap:8px}.q-head[data-v-2304fd80]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 6px;color:var(--color-text-faint);font-size:var(--ui-font-size-xs)}.q-title[data-v-2304fd80]{display:inline-flex;align-items:center;gap:6px}.q-title b[data-v-2304fd80]{color:var(--color-accent-hover);font-weight:var(--weight-medium)}.q-hint[data-v-2304fd80]{color:var(--color-text-faint)}.q-turn[data-v-2304fd80]{position:relative}.q-bub[data-v-2304fd80]{display:flex;align-items:center;gap:8px;width:fit-content;background:var(--color-surface-raised);border:.5px dashed var(--color-accent-bd);padding:8px 8px 8px 6px;transition:border-color .12s ease,background .12s ease}.q-bub[data-v-2304fd80]:hover{border-color:var(--color-accent);background:var(--color-accent-soft)}.q-grip[data-v-2304fd80]{flex:none;display:inline-flex;align-items:center;padding:2px;color:var(--color-text-faint);cursor:grab;opacity:.7}.q-grip[data-v-2304fd80]:hover{opacity:1}.q-grip[data-v-2304fd80]:active{cursor:grabbing}.q-clamp[data-v-2304fd80]{flex:1;min-width:0}.q-body[data-v-2304fd80]{flex:1;min-width:0;background:none;border:none;padding:0;margin:0;font:inherit;color:var(--color-text);text-align:left;cursor:pointer;opacity:.82}.q-bub:hover .q-body[data-v-2304fd80]{opacity:1}.q-body[data-v-2304fd80]:disabled{cursor:default}.q-text[data-v-2304fd80]{white-space:pre-wrap;overflow-wrap:anywhere}.q-text-placeholder[data-v-2304fd80]{display:inline-flex;align-items:center;gap:4px;color:var(--color-text-muted)}.q-imgs[data-v-2304fd80]{display:flex;gap:4px;flex:none}.q-img[data-v-2304fd80]{width:28px;height:28px;object-fit:cover;border-radius:var(--radius-sm);border:.5px solid var(--color-line)}.q-file[data-v-2304fd80]{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px;border-radius:var(--radius-sm);border:.5px solid var(--color-line);color:var(--color-text-muted);font-size:calc(var(--ui-font-size) - 3px);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.q-tag[data-v-2304fd80]{flex:none;padding:1px 6px;border-radius:var(--radius-full);font-size:var(--ui-font-size-xs);font-weight:var(--weight-medium);line-height:var(--leading-caption);white-space:nowrap}.q-tag-next[data-v-2304fd80]{color:var(--color-accent-hover);background:var(--color-accent-soft);border:.5px solid var(--color-accent-bd)}.q-tag-idx[data-v-2304fd80]{color:var(--color-text-faint);background:var(--color-surface-sunken);border:.5px solid var(--color-line)}.q-rm[data-v-2304fd80]{flex:none;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;border-radius:var(--radius-sm);color:var(--color-text-faint);cursor:pointer;opacity:0;transition:opacity .12s ease,background .12s ease,color .12s ease}.q-bub:hover .q-rm[data-v-2304fd80],.q-bub:focus-within .q-rm[data-v-2304fd80],.q-rm[data-v-2304fd80]:focus-visible{opacity:1}.q-rm[data-v-2304fd80]:hover{background:var(--color-danger-soft);color:var(--color-danger)}.q-turn.q-dragging .q-bub[data-v-2304fd80]{opacity:.45}.q-turn.drop-before[data-v-2304fd80]:before,.q-turn.drop-after[data-v-2304fd80]:after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--color-accent);border-radius:var(--radius-full);z-index:1}.q-turn.drop-before[data-v-2304fd80]:before{top:-5px}.q-turn.drop-after[data-v-2304fd80]:after{bottom:-5px}.chat-header[data-v-cac58d83]{flex:none;display:flex;align-items:center;gap:14px;height:var(--panel-head-h, 48px);padding:0 16px;border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui);min-width:0;user-select:none;container-type:inline-size}.chat-header.macos-desktop[data-v-cac58d83]{-webkit-app-region:drag}.chat-header.macos-desktop button[data-v-cac58d83],.chat-header.macos-desktop input[data-v-cac58d83]{-webkit-app-region:no-drag}.ch-id[data-v-cac58d83]{display:flex;align-items:center;gap:6px;min-width:0;flex:none;max-width:46%}.ch-ws[data-v-cac58d83]{color:var(--color-text-muted);font-size:var(--text-base);font-weight:var(--weight-medium);flex:none}.ch-sep[data-v-cac58d83]{color:var(--color-text-faint);flex:none}.ch-ses[data-v-cac58d83]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ch-rename[data-v-cac58d83]{flex:1;min-width:0;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none;user-select:text}.ch-git[data-v-cac58d83]{display:flex;align-items:center;gap:4px;border:none;background:transparent;padding:0;color:var(--muted);font-family:var(--font-ui);font-size:calc(var(--ui-font-size) - 2px);flex:0 1 auto;max-width:none;min-width:0;cursor:pointer}.ch-git:hover .ch-branch[data-v-cac58d83]{color:var(--color-text)}.ch-branch-icon[data-v-cac58d83]{flex:none;color:var(--color-text-muted)}.ch-branch[data-v-cac58d83]{color:var(--dim);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:4px}.ch-detached[data-v-cac58d83]{color:var(--muted);font-style:italic}.ch-pill[data-v-cac58d83]{display:inline-flex;align-items:center;gap:3px;padding:1px 5px;border-radius:999px;background:var(--panel);border:.5px solid var(--line);font-size:calc(var(--ui-font-size) - 3px)}.ch-sync-pill[data-v-cac58d83]{border-color:var(--line)}.ch-diff-pill[data-v-cac58d83]{border-color:color-mix(in srgb,var(--color-success) 20%,var(--line));font-variant-numeric:tabular-nums}.ch-ahead[data-v-cac58d83]{color:var(--color-warning);flex:none}.ch-behind[data-v-cac58d83]{color:var(--color-accent-hover);flex:none}.ch-add[data-v-cac58d83]{color:var(--color-success);flex:none}.ch-del[data-v-cac58d83]{color:var(--color-danger);flex:none}.ch-spacer[data-v-cac58d83]{flex:1;min-width:0}@container (max-width: 720px){.ch-ws[data-v-cac58d83],.ch-sep[data-v-cac58d83]{display:none}.ch-id[data-v-cac58d83]{flex:1;max-width:none}.ch-spacer[data-v-cac58d83]{flex:0}}.chat-header .ch-act-more[data-v-cac58d83]{width:24px;height:24px;border-radius:var(--radius-sm)}.chat-header .ch-act-more[data-v-cac58d83] svg{width:14px;height:14px}.ch-act-more.open[data-v-cac58d83]{background:var(--color-well);color:var(--color-text)}.ch-dev[data-v-cac58d83]{display:inline-flex;align-items:center;height:22px;padding:0 9px;flex:none;border:.5px solid var(--color-warning-bd);border-radius:var(--radius-full);background:var(--color-warning-soft);color:var(--color-warning);font-size:var(--text-xs);font-weight:500}.ch-pr[data-v-cac58d83]{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 9px;flex:none;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-well);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:500;cursor:pointer}.ch-pr svg[data-v-cac58d83]{flex:none}.ch-pr.pr-open[data-v-cac58d83]{color:var(--color-success);border-color:var(--color-success-bd);background:var(--color-success-soft)}.ch-pr.pr-merged[data-v-cac58d83]{color:var(--color-done);border-color:var(--color-done-bd);background:var(--color-done-soft)}.ch-pr.pr-closed[data-v-cac58d83]{color:var(--color-danger);border-color:var(--color-danger-bd);background:var(--color-danger-soft)}.ch-pr.pr-draft[data-v-cac58d83],.ch-pr.pr-unknown[data-v-cac58d83]{color:var(--color-text-muted);border-color:var(--color-line-strong);background:var(--color-well)}.ch-pr[data-v-cac58d83]:hover{border-color:var(--color-line-strong)}.ch-menu[data-v-cac58d83]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-pop-enter-active[data-v-cac58d83]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-cac58d83]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-cac58d83],.menu-pop-leave-to[data-v-cac58d83]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}@media(max-width:980px){.ch-act-label[data-v-cac58d83]{display:none}}@media(max-width:640px){.chat-header[data-v-cac58d83]{display:none}}.slash-menu[data-menu-frame][data-v-98398dd7]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.slash-scroll[data-v-98398dd7]{max-height:var(--p-slash-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.slash-scroll[data-v-98398dd7]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-98398dd7]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.slash-menu:hover .scroll-thumb[data-v-98398dd7]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-98398dd7]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.slash-item[data-v-98398dd7]{display:flex;align-items:baseline;gap:var(--space-2);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:var(--p-hairline) solid transparent;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-b2);border-radius:var(--radius-menu-row);corner-shape:var(--corner-shape-menu)}.slash-item[data-v-98398dd7]:hover{background:var(--color-hover)}.slash-item.active[data-v-98398dd7]{background:var(--color-selected)}.slash-item+.slash-item[data-v-98398dd7]{margin-top:var(--menu-rows-seam)}.slash-name[data-v-98398dd7]{flex:none;max-width:60%;color:var(--color-text);font-weight:500;min-width:0;line-height:var(--leading-normal);overflow-wrap:anywhere}.slash-match[data-v-98398dd7]{font-weight:var(--weight-semibold)}.slash-empty[data-v-98398dd7]{padding:var(--space-1-5) var(--space-1);color:var(--color-text-muted)}@media(hover:none){.slash-item[data-v-98398dd7]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.slash-desc[data-v-98398dd7]{flex:1;min-width:0;color:var(--color-text-muted);font-size:var(--ui-b2);font-weight:var(--weight-regular);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-desc-match[data-v-98398dd7]{font-weight:var(--weight-semibold)}@media(max-width:520px){.slash-item[data-v-98398dd7]{flex-direction:column;align-items:stretch;gap:var(--space-05)}.slash-name[data-v-98398dd7]{max-width:none}}.mention-menu[data-menu-frame][data-v-53eca905]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.mention-scroll[data-v-53eca905]{max-height:var(--p-mention-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.mention-scroll[data-v-53eca905]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-53eca905]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.mention-menu:hover .scroll-thumb[data-v-53eca905]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-53eca905]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.mention-state[data-v-53eca905]{padding:var(--space-2) var(--space-1);font-family:var(--font-ui);font-size:var(--ui-b2)}.dim[data-v-53eca905]{color:var(--color-text-muted)}.mention-item[data-v-53eca905]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:var(--p-hairline) solid transparent;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-b2);border-radius:var(--radius-menu-row);corner-shape:var(--corner-shape-menu)}.mention-icon[data-v-53eca905]{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;color:var(--muted);flex-shrink:0}.mention-icon[data-v-53eca905] svg{width:13px;height:13px;display:block}.mention-item:hover .mention-icon[data-v-53eca905],.mention-item.active .mention-icon[data-v-53eca905]{color:var(--color-text-strong)}.mention-item[data-v-53eca905]:hover{background:var(--color-hover)}.mention-item:hover .mention-name[data-v-53eca905],.mention-item.active .mention-name[data-v-53eca905]{color:var(--color-text-strong)}.mention-item.active[data-v-53eca905]{background:var(--color-selected)}.mention-item+.mention-item[data-v-53eca905]{margin-top:var(--menu-rows-seam)}@media(hover:none){.mention-item[data-v-53eca905]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.mention-name[data-v-53eca905]{color:var(--color-text);font-weight:500;min-width:80px;flex-shrink:0}.mention-path[data-v-53eca905]{color:var(--color-text-muted);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.composer[data-v-a4ef2d7c]{padding:7px var(--dock-inline-right, 16px) 12px var(--dock-inline-left, 16px);background:transparent;transition:background .12s}.composer.drag-over[data-v-a4ef2d7c]{background:var(--color-accent-soft)}.drop-overlay[data-v-a4ef2d7c]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.drop-overlay.show[data-v-a4ef2d7c]{opacity:1;visibility:visible}.drop-card[data-v-a4ef2d7c]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4) var(--space-6);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.composer-card[data-v-a4ef2d7c]{--composer-control-size: var(--space-8);--composer-send-size: var(--composer-control-size);--composer-control-inset: var(--space-2);position:relative;border:.5px solid var(--color-composer-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);background:var(--color-composer-bg);box-shadow:var(--shadow-input);user-select:none;container-type:inline-size}.composer-card[data-v-a4ef2d7c]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.composer-card[data-v-a4ef2d7c]:focus-within:after{opacity:1}.att-strip[data-v-a4ef2d7c]{position:relative;padding:calc(var(--space-4) + var(--space-05)) var(--space-4) 0 calc(var(--space-4) + var(--space-05))}.att-scroll[data-v-a4ef2d7c]{max-height:calc(128px + var(--space-2));overflow-y:auto;margin-right:calc(var(--icon-button-sm) + var(--space-1))}.att-scroll-content[data-v-a4ef2d7c]{display:flex;flex-direction:column;gap:var(--space-2);padding-right:var(--space-1)}.att-scroll.is-overflowing[data-v-a4ef2d7c]{padding-bottom:var(--space-6)}.att-more[data-v-a4ef2d7c]{position:absolute;left:var(--space-4);bottom:var(--space-1);z-index:var(--z-raised);display:inline-flex;align-items:center;height:18px;padding:0 var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--text-xs);box-shadow:var(--shadow-sm);pointer-events:none}.att-row[data-v-a4ef2d7c]{display:flex;flex-wrap:wrap;gap:6px}.att-row-media[data-v-a4ef2d7c]{gap:var(--space-2)}.att-scroll-content[data-v-a4ef2d7c] .att-chip{corner-shape:superellipse(1.5)}.att-scroll-content[data-v-a4ef2d7c] .att-tile{margin-left:calc(-1 * (var(--att-chip-pad-left, 5px) + var(--space-05)))}.att-clear[data-v-a4ef2d7c]{position:absolute;top:calc(var(--space-4) + var(--space-05));right:var(--space-4);z-index:var(--z-raised)}.file-input-hidden[data-v-a4ef2d7c]{display:none}.cin-wrap[data-v-a4ef2d7c]{position:relative;padding:14px 16px 8px}.input-row[data-v-a4ef2d7c]{position:relative;display:flex;align-items:flex-start;gap:var(--space-2)}.expand-btn[data-v-a4ef2d7c]{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:none;border-radius:6px;background:transparent;color:var(--dim);cursor:pointer;padding:0;transition:background .12s,color .12s}.expand-btn[data-v-a4ef2d7c]:hover{background:var(--panel2);color:var(--color-text)}.expand-btn[data-v-a4ef2d7c]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.ph[data-v-a4ef2d7c]{color:var(--faint);caret-color:var(--color-text);flex:1;border:none;outline:none;resize:none;font-family:var(--font-ui);font-size:var(--content-font-size);text-autospace:normal;background:transparent;min-height:36px;max-height:25vh;overflow-y:auto;scrollbar-width:none;line-height:1.5;margin-bottom:6px;user-select:text}.ph[data-v-a4ef2d7c]::-webkit-scrollbar{display:none}.ph[data-v-a4ef2d7c]::placeholder{color:var(--muted)}.ph[data-v-a4ef2d7c]:not(:placeholder-shown){color:var(--color-text)}.composer.expanded .ph[data-v-a4ef2d7c]{min-height:70vh;max-height:70vh}.compact-chip[data-v-a4ef2d7c]{height:var(--composer-control-size);padding:0 var(--space-2);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-warning);font-family:var(--mono);font-size:var(--ui-font-size);cursor:pointer;line-height:1;flex:none;transition:background var(--duration-base) var(--ease-out)}.compact-chip[data-v-a4ef2d7c]:hover{background:var(--color-hover)}.composer-attach[data-v-a4ef2d7c]{width:var(--composer-control-size);height:var(--composer-control-size);border-radius:var(--radius-full)}.add-menu[data-v-a4ef2d7c]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;z-index:var(--z-dropdown);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--shadow-menu);padding:var(--space-1-5) var(--space-3);display:flex;flex-direction:column;gap:var(--menu-rows-seam);font-family:var(--font-ui);transform-origin:bottom left}.am-scroll[data-v-a4ef2d7c]{max-height:var(--p-add-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none;display:flex;flex-direction:column;gap:var(--menu-rows-seam)}.am-scroll[data-v-a4ef2d7c]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-a4ef2d7c]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);pointer-events:none;z-index:var(--z-raised)}.add-menu:hover .scroll-thumb[data-v-a4ef2d7c]{background:var(--color-menu-scrollbar-hover)}.am-row[data-v-a4ef2d7c]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:.5px solid transparent;border-radius:var(--radius-menu-row);corner-shape:superellipse(1.5);background:none;cursor:pointer;font-size:var(--ui-font-size);color:var(--color-text);text-align:left;transition:background var(--duration-base) var(--ease-out)}.am-row[data-v-a4ef2d7c]:hover{background:var(--color-hover)}.am-row[data-v-a4ef2d7c]:focus-visible{background:var(--color-selected);outline:none}@media(hover:none){.am-row[data-v-a4ef2d7c]{padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.am-row:hover .am-icon[data-v-a4ef2d7c],.am-row:focus-visible .am-icon[data-v-a4ef2d7c]{color:var(--color-text)}.am-icon[data-v-a4ef2d7c]{flex:none;width:var(--p-ic-sm);display:flex;justify-content:center;color:var(--color-text-muted);transition:color var(--duration-base) var(--ease-out)}.am-name[data-v-a4ef2d7c]{flex:none;font-weight:var(--weight-medium)}.am-desc[data-v-a4ef2d7c]{margin-left:var(--space-1);color:var(--color-text-muted);font-size:var(--ui-font-size-sm)}.send[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-send-bg);color:var(--color-send-icon);border:none;box-shadow:var(--shadow-send);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background var(--duration-slow) var(--ease-out),transform var(--duration-fast) var(--ease-out),box-shadow var(--duration-slow) var(--ease-out);position:relative}.send[data-v-a4ef2d7c]:hover:not(:disabled){background:var(--color-send-bg-hover);box-shadow:var(--shadow-send-hover)}.send[data-v-a4ef2d7c]:active{transform:scale(.92)}.send[data-v-a4ef2d7c]:disabled{cursor:not-allowed;background:var(--color-send-bg-disabled);color:var(--color-send-icon-disabled);opacity:var(--opacity-send-disabled)}.send[data-v-a4ef2d7c]:disabled:active{transform:none}.send.is-starting[data-v-a4ef2d7c]:disabled{background:var(--color-send-bg);color:var(--color-send-icon)}.send.is-starting[data-v-a4ef2d7c] .ui-spinner{color:var(--color-send-icon)}.send.is-starting[data-v-a4ef2d7c] .ui-spinner__track{stroke:color-mix(in srgb,var(--color-send-icon) 32%,transparent)}.send svg[data-v-a4ef2d7c]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.stop[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-subtle);color:var(--color-stop-glyph);border:none;box-shadow:var(--shadow-xs);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .16s ease,color .16s ease,transform .12s ease}.stop[data-v-a4ef2d7c]:hover{background:var(--color-danger);color:var(--color-text-on-accent)}.stop[data-v-a4ef2d7c]:active{transform:scale(.92)}.stop svg[data-v-a4ef2d7c]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.toolbar[data-v-a4ef2d7c]{display:flex;align-items:center;justify-content:space-between;padding:var(--space-1) var(--composer-control-inset) var(--composer-control-inset);position:relative}.menu-measure[data-v-a4ef2d7c]{position:absolute;width:max-content;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.toolbar-left[data-v-a4ef2d7c],.toolbar-right[data-v-a4ef2d7c]{display:flex;align-items:center;gap:var(--space-1);min-width:0}.toolbar-left[data-v-a4ef2d7c]{flex:0 1 auto;overflow:hidden}.toolbar-right[data-v-a4ef2d7c]{flex:1 1 0;justify-content:flex-end}.perm-pill[data-v-a4ef2d7c],.swarm-chip[data-v-a4ef2d7c],.model-pill[data-v-a4ef2d7c]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1);height:var(--composer-control-size);padding:0 var(--space-3);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:pointer;user-select:none;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.perm-pill[data-v-a4ef2d7c]{font-size:var(--ui-font-size-sm)}.perm-pill[data-v-a4ef2d7c]:after,.swarm-chip[data-v-a4ef2d7c]:after,.model-pill[data-v-a4ef2d7c]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-full);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.perm-pill[data-v-a4ef2d7c]:hover:after,.swarm-chip[data-v-a4ef2d7c]:hover:after,.model-pill[data-v-a4ef2d7c]:hover:after{opacity:1}.perm-pill.open[data-v-a4ef2d7c],.model-pill.open[data-v-a4ef2d7c]{background:var(--color-accent-soft)}.swarm-chip[data-v-a4ef2d7c]{cursor:default}.swarm-x[data-v-a4ef2d7c]{margin-right:calc(var(--composer-control-size) / 2 - var(--space-3) - var(--icon-button-sm) / 2);color:inherit;opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.swarm-chip:hover .swarm-x[data-v-a4ef2d7c],.swarm-x[data-v-a4ef2d7c]:focus-visible{opacity:1}@media(hover:none){.swarm-x[data-v-a4ef2d7c]{opacity:1;position:relative}.swarm-x[data-v-a4ef2d7c]:before{content:"";position:absolute;inset:calc(-1 * (var(--touch-target-min) - var(--icon-button-sm)) / 2)}}.perm-pill.perm-manual[data-v-a4ef2d7c]{color:var(--dim)}.perm-pill.perm-yolo[data-v-a4ef2d7c]{color:var(--color-warning)}.perm-pill.perm-auto[data-v-a4ef2d7c]{color:var(--color-danger)}.perm-pill-icon[data-v-a4ef2d7c]{flex:none}@container (max-width: 620px){.perm-pill[data-v-a4ef2d7c]{width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.perm-pill-label[data-v-a4ef2d7c]{display:none}.swarm-chip[data-v-a4ef2d7c]{position:relative;width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center}.swarm-label[data-v-a4ef2d7c]{display:none}.swarm-ic[data-v-a4ef2d7c]{transition:opacity var(--duration-base) var(--ease-out)}.swarm-chip:hover .swarm-ic[data-v-a4ef2d7c]{opacity:0}.swarm-x[data-v-a4ef2d7c]{position:absolute;inset:0;width:auto;height:auto;margin-right:0}@media(hover:none){.swarm-chip[data-v-a4ef2d7c]{width:var(--touch-target-min);height:var(--touch-target-min)}.swarm-chip:hover .swarm-ic[data-v-a4ef2d7c]{opacity:1}.swarm-x[data-v-a4ef2d7c]{inset:0;width:auto;height:auto;opacity:1;background:transparent}.swarm-x[data-v-a4ef2d7c]:before{inset:0 0 auto auto;width:var(--p-ic-md);height:var(--p-ic-md);border-radius:var(--radius-full);background:var(--color-selected)}.swarm-x[data-v-a4ef2d7c] svg{position:absolute;top:calc(var(--space-1-5) / 2);right:calc(var(--space-1-5) / 2);width:calc(var(--p-ic-md) - var(--space-1-5));height:calc(var(--p-ic-md) - var(--space-1-5))}}}.ctx-group[data-v-a4ef2d7c]{display:flex;align-items:center;gap:4px;flex-shrink:0;padding:2px 0;border-radius:var(--radius-xs)}.ctx-group[data-v-a4ef2d7c]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.model-pill[data-v-a4ef2d7c]{gap:var(--space-1);line-height:var(--leading-normal);overflow:hidden;flex:0 1 auto;min-width:0;max-width:320px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.model-pill[data-v-a4ef2d7c]:active{transform:scale(.97)}.model-pill[data-v-a4ef2d7c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-pill .mp-name[data-v-a4ef2d7c]{flex:0 1 auto;font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.model-pill .think-suffix[data-v-a4ef2d7c]{color:var(--color-accent);font-weight:var(--weight-medium);flex-shrink:0}.model-pill .cv[data-v-a4ef2d7c]{color:var(--faint);flex:none;transition:transform var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.model-pill:hover .cv[data-v-a4ef2d7c],.model-pill.open .cv[data-v-a4ef2d7c]{color:var(--dim)}.model-pill.open .cv[data-v-a4ef2d7c]{transform:rotate(180deg)}.model-pill.login-pill[data-v-a4ef2d7c]{flex:none;color:var(--color-accent)}.model-pill.login-pill .mp-name[data-v-a4ef2d7c]{color:var(--color-accent)}.model-dropdown[data-v-a4ef2d7c]{position:absolute;bottom:calc(100% + 4px);right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));z-index:var(--z-dropdown);min-width:200px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1);display:flex;flex-direction:column;gap:1px;font-family:var(--font-ui);transform-origin:bottom right}.composer-menu-pop-enter-active[data-v-a4ef2d7c]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.composer-menu-pop-leave-active[data-v-a4ef2d7c]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.composer-menu-pop-enter-from[data-v-a4ef2d7c],.composer-menu-pop-leave-to[data-v-a4ef2d7c]{opacity:0;transform:scale(.97) translateY(2px)}.md-list[data-v-a4ef2d7c]{display:flex;flex-direction:column;gap:1px;max-height:min(320px,40vh);overflow-y:auto;overscroll-behavior:contain}.md-section[data-v-a4ef2d7c]{padding:4px 9px 2px;font-size:var(--text-xs);color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:var(--weight-semibold)}.md-row[data-v-a4ef2d7c]{display:flex;align-items:center;gap:7px;width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);padding:5px 9px;border-radius:6px;text-align:left;transition:background var(--duration-base) var(--ease-out)}.md-row[data-v-a4ef2d7c]:hover{background:var(--color-hover)}.md-row:hover .md-name[data-v-a4ef2d7c]{color:var(--color-text-strong)}.md-row[data-v-a4ef2d7c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md-row[data-v-a4ef2d7c]:disabled{cursor:default;opacity:.58}.md-row[data-v-a4ef2d7c]:disabled:hover{background:none}.md-row.is-current[data-v-a4ef2d7c]{background:var(--color-selected)}.md-note[data-v-a4ef2d7c]{margin-left:auto;color:var(--muted);font-size:var(--ui-font-size-xs)}.md-row-more .md-more-icon[data-v-a4ef2d7c]{color:var(--dim)}.md-row-more .md-more-arrow[data-v-a4ef2d7c]{color:var(--faint);flex:none;transition:color var(--duration-base) var(--ease-out)}.md-row-more:hover .md-more-arrow[data-v-a4ef2d7c]{color:var(--dim)}.md-check[data-v-a4ef2d7c]{width:14px;flex:none;color:var(--color-accent);font-weight:500;display:flex;justify-content:center}.md-name[data-v-a4ef2d7c]{flex:1;transition:color var(--duration-base) var(--ease-out)}.md-provider[data-v-a4ef2d7c]{color:var(--muted);font-size:var(--ui-font-size-xs);flex:none}.md-star[data-v-a4ef2d7c]{color:var(--star);flex:none;margin-left:auto}.md-divider[data-v-a4ef2d7c]{height:1px;background:var(--line);margin:3px 0}.md-thinking[data-v-a4ef2d7c]{display:flex;align-items:center;gap:8px;padding:6px 9px;border-radius:var(--radius-sm)}.md-thinking .md-name[data-v-a4ef2d7c]{font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);flex:none}.md-thinking .md-note[data-v-a4ef2d7c],.md-thinking .ui-seg[data-v-a4ef2d7c]{margin-left:auto}.md-cache-note[data-v-a4ef2d7c]{width:0;min-width:100%;padding:2px 7px 4px;color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.4}.perm-dropdown[data-v-a4ef2d7c]{position:absolute;bottom:calc(100% + 4px);left:var(--composer-control-inset);z-index:var(--z-dropdown);min-width:220px;width:max-content;max-width:calc(100vw - var(--space-8));background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:5px;display:flex;flex-direction:column;gap:1px;transform-origin:bottom left}.pd-row[data-v-a4ef2d7c]{display:grid;grid-template-columns:var(--p-ic-md) var(--composer-menu-desc-width, max-content) var(--p-ic-sm);column-gap:7px;row-gap:2px;align-items:start;width:100%;background:none;border:none;cursor:pointer;padding:6px 7px;border-radius:6px;text-align:left}.pd-row[data-v-a4ef2d7c]:hover,.pd-row.is-current[data-v-a4ef2d7c]{background:var(--color-hover)}.pd-icon[data-v-a4ef2d7c]{grid-column:1;grid-row:1;width:var(--p-ic-md);min-height:1lh;display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-check[data-v-a4ef2d7c]{grid-column:3;grid-row:1;width:var(--p-ic-sm);min-height:1lh;color:var(--color-accent);font-size:var(--ui-font-size);font-weight:var(--weight-medium);display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-info[data-v-a4ef2d7c]{display:contents}.pd-name[data-v-a4ef2d7c]{grid-column:2;grid-row:1;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight)}.pd-desc[data-v-a4ef2d7c]{grid-column:2;grid-row:2;width:var(--composer-menu-desc-width, auto);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-caption);color:var(--muted);line-height:var(--leading-tight)}.wm-pill[data-v-a4ef2d7c]{position:absolute;top:0;left:0;margin-left:calc(-1 * var(--space-05));z-index:var(--z-raised);display:inline-flex;align-items:center;gap:var(--space-1);height:calc(var(--content-font-size) * 1.5);padding:0 calc((var(--content-font-size) * 1.5 - var(--wm-x-size)) / 2) 0 var(--space-2);border:none;border-radius:var(--radius-full);background:var(--color-surface);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:calc(var(--content-font-size) * 1.5);white-space:nowrap;user-select:none}.wm-x[data-v-a4ef2d7c]{position:relative;width:var(--wm-x-size);height:var(--wm-x-size);border-radius:var(--radius-full)}.wm-x[data-v-a4ef2d7c]:before{content:"";position:absolute;inset:calc(-1 * var(--wm-x-ring))}@media(hover:none){.wm-x[data-v-a4ef2d7c]:before{inset:calc((var(--wm-x-size) - var(--touch-target-min)) / 2)}}@media(max-width:980px){.perm-pill[data-v-a4ef2d7c]{max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media(max-width:640px){.composer[data-v-a4ef2d7c]{padding:9px var(--dock-inline-right, max(12px, var(--safe-right))) max(24px,var(--safe-bottom)) var(--dock-inline-left, max(12px, var(--safe-left)))}.composer-card[data-v-a4ef2d7c]{--composer-control-size: 36px;max-width:100%}.input-row[data-v-a4ef2d7c]{gap:6px;min-width:0}.send[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.send svg[data-v-a4ef2d7c]{display:none}.send[data-v-a4ef2d7c]:after{content:"↑";font-size:17px;line-height:1;color:var(--bg)}.stop[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.stop svg[data-v-a4ef2d7c]{display:none}.stop[data-v-a4ef2d7c]:after{content:"■";font-size:17px;line-height:1}.perm-pill[data-v-a4ef2d7c],.wm-pill[data-v-a4ef2d7c]{display:none}.model-dropdown[data-v-a4ef2d7c]{right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));left:auto;min-width:180px;max-width:calc(100vw - 24px)}.ph[data-v-a4ef2d7c]{font-size:16px}.model-pill[data-v-a4ef2d7c],.attach-btn[data-v-a4ef2d7c]{font-size:var(--ui-font-size)}.toolbar[data-v-a4ef2d7c]{gap:6px;min-width:0}.toolbar-left[data-v-a4ef2d7c],.toolbar-right[data-v-a4ef2d7c]{min-width:0}.model-pill[data-v-a4ef2d7c]{max-width:min(52vw,220px)}.model-pill .mp-name[data-v-a4ef2d7c]{max-width:min(40vw,170px)}.md-row[data-v-a4ef2d7c],.md-section[data-v-a4ef2d7c]{font-size:var(--ui-font-size)}.md-thinking[data-v-a4ef2d7c]{flex-wrap:wrap;row-gap:6px}.md-thinking .ui-seg[data-v-a4ef2d7c]{margin-left:0}.pd-name[data-v-a4ef2d7c]{font-size:var(--ui-font-size)}.pd-desc[data-v-a4ef2d7c]{font-size:var(--text-xs)}}.goal-panel[data-v-cdb3e8b0]{display:flex;flex-direction:column;gap:var(--space-2);overflow-wrap:anywhere}.goal-criterion[data-v-cdb3e8b0]{padding-top:var(--space-2);border-top:.5px solid var(--color-line)}.goal-criterion-label[data-v-cdb3e8b0]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-section-label);line-height:var(--leading-normal);margin-bottom:var(--space-1)}.plan-panel[data-v-dea23306]{display:flex;flex-direction:column;gap:var(--space-2)}.plan-review-row[data-v-dea23306]{display:flex;gap:var(--space-2);font-size:var(--text-sm)}.plan-review-label[data-v-dea23306]{flex:none;color:var(--color-text-muted)}.plan-review-feedback[data-v-dea23306]{color:var(--color-text-muted)}.plan-path-only[data-v-dea23306]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-1)}.plan-path-hint[data-v-dea23306]{color:var(--color-text-muted);font-size:var(--text-sm)}.plan-path[data-v-dea23306]{max-width:100%;font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plan-empty[data-v-dea23306]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.plan-empty-ico[data-v-dea23306]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}.qcard[data-v-ca95f2cd]{margin:var(--space-2) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);overflow:hidden;animation:kimi-card-in var(--duration-base) var(--ease-out)}.qcard.minimized[data-v-ca95f2cd]{transition:background var(--duration-fast) var(--ease-out)}.qcard.minimized[data-v-ca95f2cd]:hover{background:var(--color-hover)}.qh[data-v-ca95f2cd]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-3) var(--space-4) 0}.qcard.minimized .qh[data-v-ca95f2cd]{padding-bottom:var(--space-3);align-items:center}.qcard.minimized .qh.clickable[data-v-ca95f2cd]{cursor:pointer}.qh-chip[data-v-ca95f2cd]{width:var(--p-chip-num);height:var(--p-chip-num);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.qtitle[data-v-ca95f2cd]{flex:1;min-width:0;color:var(--color-text);font-size:var(--text-lg);font-weight:var(--weight-semibold);line-height:var(--leading-tight);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.qcard.minimized .qtitle[data-v-ca95f2cd]{display:block;white-space:nowrap;text-overflow:ellipsis}.qmin[data-v-ca95f2cd],.qclose[data-v-ca95f2cd]{flex:none;margin-top:calc((var(--text-lg) * var(--leading-tight) - var(--icon-button-sm)) / 2)}.qmin[data-v-ca95f2cd]{margin-left:auto}.qcard.minimized .qmin[data-v-ca95f2cd],.qcard.minimized .qclose[data-v-ca95f2cd]{margin-top:0}.qbody[data-v-ca95f2cd]{padding:var(--space-3) var(--space-4) 0;color:var(--color-text);font:var(--text-base)/var(--leading-normal) var(--font-ui)}.qmdbody[data-v-ca95f2cd]{margin-bottom:var(--space-2)}.qopts[data-v-ca95f2cd]{display:flex;flex-direction:column;gap:2px;margin-top:var(--space-2)}.qopt[data-v-ca95f2cd]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);cursor:pointer;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text);transition:background var(--duration-fast) var(--ease-out);user-select:none}.qopt[data-v-ca95f2cd]:hover,.qopt.highlighted[data-v-ca95f2cd]{background:var(--color-hover)}.qopt-key[data-v-ca95f2cd]{width:var(--p-chip-num);height:var(--p-chip-num);margin-top:calc((var(--text-base) * var(--leading-normal) - var(--p-chip-num)) / 2);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.qopt-key[data-v-ca95f2cd]:empty{background:transparent}.qopt-glyph[data-v-ca95f2cd]{width:16px;height:16px;margin-top:calc((var(--text-base) * var(--leading-normal) - 16px) / 2);flex:none;border:.5px solid var(--color-line-strong);position:relative;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.qopt-glyph.rad[data-v-ca95f2cd]{border-radius:50%}.qopt-glyph.chk[data-v-ca95f2cd]{border-radius:var(--radius-xs)}.qopt.selected .qopt-glyph[data-v-ca95f2cd]{border-color:var(--color-accent)}.qopt.selected .qopt-glyph.rad[data-v-ca95f2cd]:after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--color-accent)}.qopt.selected .qopt-glyph.chk[data-v-ca95f2cd]{background:var(--color-accent)}.qopt.selected .qopt-glyph.chk[data-v-ca95f2cd]:after{content:"";position:absolute;left:4.5px;top:1.5px;width:4px;height:8px;border-right:1.5px solid var(--color-text-on-accent);border-bottom:1.5px solid var(--color-text-on-accent);transform:rotate(45deg)}.qopt-text[data-v-ca95f2cd]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.qopt-label[data-v-ca95f2cd]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.qopt-desc[data-v-ca95f2cd]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui)}.other-input[data-v-ca95f2cd]{flex:1;font:var(--text-base) var(--font-ui);border:none;border-bottom:.5px solid var(--color-line);outline:none;padding:2px var(--space-1);color:var(--color-text);background:transparent;min-width:0}.other-input[data-v-ca95f2cd]:focus-visible{border-bottom-color:var(--color-accent);box-shadow:0 1px 0 0 var(--color-accent)}.qfoot[data-v-ca95f2cd]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-3);padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.qbtns[data-v-ca95f2cd]{display:flex;align-items:center;gap:var(--space-1)}.qhint[data-v-ca95f2cd]{margin-left:auto;color:var(--color-text-faint);font:var(--text-xs) var(--font-ui);user-select:none}@media(max-width:640px){.qopt[data-v-ca95f2cd]{min-height:44px;padding:var(--space-3)}.other-input[data-v-ca95f2cd]{flex-basis:100%;min-height:28px}.qfoot[data-v-ca95f2cd]{flex-direction:column;align-items:stretch}.qhint[data-v-ca95f2cd]{display:none}.qbtns[data-v-ca95f2cd]{flex-direction:column;gap:var(--space-2)}.qbtns[data-v-ca95f2cd] .ui-button{width:100%;min-height:46px}}.appr[data-v-cd852243]{display:flex;flex-direction:column;max-height:calc(100dvh - 72px);margin:var(--space-2) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);overflow:hidden;animation:kimi-card-in var(--duration-base) var(--ease-out)}.appr>.ah[data-v-cd852243],.appr>.af[data-v-cd852243]{flex:none}.appr.minimized[data-v-cd852243]{transition:background var(--duration-fast) var(--ease-out)}.appr.minimized[data-v-cd852243]:hover{background:var(--color-hover)}.ah[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-3) var(--space-4) 0;flex-wrap:nowrap}.appr.minimized .ah[data-v-cd852243]{padding-bottom:var(--space-3)}.appr.minimized .ah.clickable[data-v-cd852243]{cursor:pointer}.akind[data-v-cd852243]{color:var(--color-text);font-size:var(--text-lg);font-weight:var(--weight-semibold);white-space:nowrap;flex:none}.apeek[data-v-cd852243]{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.amin[data-v-cd852243],.aexpand[data-v-cd852243]{margin-left:auto;flex:none}.aexpand+.amin[data-v-cd852243]{margin-left:0}.ab[data-v-cd852243]{display:flex;flex-direction:column;flex:1;min-height:0;padding:var(--space-3) var(--space-4) 0}.ab[data-v-cd852243]>*{flex:none}.ab>.body-plan-wrap[data-v-cd852243]{flex:1}.plan-path[data-v-cd852243]{display:block;width:100%;margin-bottom:var(--space-2);padding:0;border:none;background:transparent;color:var(--color-accent);font:var(--text-xs) var(--font-mono);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.plan-path[data-v-cd852243]:hover{text-decoration:underline}.plan-path[data-v-cd852243]:focus-visible{outline:none;text-decoration:underline;border-radius:var(--radius-xs);box-shadow:var(--p-focus-ring)}.body-code[data-v-cd852243]{display:flex;flex-direction:column;min-height:0}.body-code.expanded[data-v-cd852243]{flex:1}.body-code.expanded[data-v-cd852243] .hl-code{max-height:none;flex:1}.code-path[data-v-cd852243]{flex:none;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shell-cmd[data-v-cd852243]{font:var(--text-sm) var(--font-mono);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-all;max-height:160px;overflow-y:auto;color:var(--color-text)}.shell-dollar[data-v-cd852243]{color:var(--color-accent-hover);font-weight:var(--weight-medium);margin-right:var(--space-2)}.shell-cwd[data-v-cd852243]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-top:var(--space-1)}.shell-danger[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-2);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui);background:var(--color-danger-soft)}.shell-danger-ic[data-v-cd852243]{flex:none}.body-chip[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.chip-label[data-v-cd852243]{background:var(--color-inline-code-bg);border-radius:var(--radius-sm);padding:2px var(--space-2);font:var(--weight-semibold) var(--text-xs) var(--font-mono);color:var(--color-text-muted);white-space:nowrap}.chip-value[data-v-cd852243]{font:var(--text-sm) var(--font-mono);color:var(--color-text);word-break:break-all}.chip-detail[data-v-cd852243]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted)}.todo-item[data-v-cd852243]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-1) 0;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.todo-glyph[data-v-cd852243]{color:var(--color-accent);font-size:var(--text-sm);flex:none;width:14px}.todo-title[data-v-cd852243]{color:var(--color-text)}.todo-done[data-v-cd852243]{color:var(--color-text-muted);text-decoration:line-through}.body-generic[data-v-cd852243]{font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text);word-break:break-word}.body-plan-wrap[data-v-cd852243]{display:flex;flex-direction:column;min-height:0;position:relative}.body-plan-wrap[data-v-cd852243]:before{content:"";position:absolute;top:0;left:0;right:0;height:18px;z-index:1;pointer-events:none;opacity:0;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 2.5%,transparent),transparent 35%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.75%,transparent),transparent 65%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.25%,transparent),transparent);transition:opacity var(--duration-slow) var(--ease-out)}.body-plan-wrap.scrolled[data-v-cd852243]:before{opacity:1}.body-plan-wrap>.plan-opts[data-v-cd852243]{flex:none}.body-plan[data-v-cd852243]{max-height:50vh;overflow-y:auto;min-height:0}.body-plan.expanded[data-v-cd852243]{max-height:none;flex:1}.plan-opts[data-v-cd852243]{display:flex;flex-direction:column;gap:2px;margin-top:var(--space-3);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.popt[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-3);width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text);font:var(--text-sm)/var(--leading-normal) var(--font-ui);text-align:left;cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.popt[data-v-cd852243]:hover:not(:disabled){background:var(--color-hover)}.popt[data-v-cd852243]:focus-visible{outline:none;background:var(--color-hover);box-shadow:var(--p-focus-ring)}.popt[data-v-cd852243]:disabled{cursor:default;opacity:.6}.popt-key[data-v-cd852243]{width:var(--p-chip-num);height:var(--p-chip-num);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.popt-text[data-v-cd852243]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.popt-label[data-v-cd852243]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.popt-desc[data-v-cd852243]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui)}.popt-spin[data-v-cd852243]{flex:none;color:var(--color-text-muted)}.feedback-wrap[data-v-cd852243]{margin-top:var(--space-3)}.feedback-ta[data-v-cd852243]{width:100%;box-sizing:border-box;font:var(--text-sm) var(--font-ui);padding:var(--space-2) var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-md);resize:none;outline:none;color:var(--color-text);background:var(--color-surface)}.feedback-ta[data-v-cd852243]:focus-visible{border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.feedback-hint[data-v-cd852243]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted);margin-top:var(--space-1)}.af[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-3);padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.abtns[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-1)}.knum[data-v-cd852243]{min-width:16px;height:16px;padding:0 3px;border-radius:var(--radius-xs);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/16px var(--font-ui);text-align:center}.abtns .ui-button--primary .knum[data-v-cd852243]{background:color-mix(in srgb,var(--color-text-on-accent) 28%,transparent);color:var(--color-text-on-accent)}@media(max-width:640px){.popt[data-v-cd852243]{min-height:44px;padding:var(--space-3)}.af[data-v-cd852243]{flex-direction:column;align-items:stretch}.abtns[data-v-cd852243]{flex-direction:column;margin-left:0;gap:var(--space-2)}.abtns[data-v-cd852243] .ui-button{width:100%;min-height:46px}.abtns .amain[data-v-cd852243]{order:-1}}.taskspane[data-v-d5a5712a]{flex:1;min-height:0;display:flex;flex-direction:column}.tp-list[data-v-d5a5712a]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--space-05)}.tp-row[data-v-d5a5712a]{padding:var(--space-1) 0}.tp-row.fail .tp-name[data-v-d5a5712a]{color:var(--color-danger)}.tp-main[data-v-d5a5712a]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-base)}.tp-row.expandable>.tp-main[data-v-d5a5712a]{position:relative;border-radius:var(--radius-lg);padding:var(--space-1) var(--space-2);margin:calc(-1 * var(--space-1)) 0}.tp-row.expandable>.tp-main[data-v-d5a5712a]:hover{background:var(--color-hover)}.tp-row[data-v-d5a5712a]:not(.expandable){cursor:not-allowed}.tp-open[data-v-d5a5712a]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.tp-open[data-v-d5a5712a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tp-chevron[data-v-d5a5712a]{flex:none;color:var(--muted)}.tp-name[data-v-d5a5712a]{color:var(--color-text);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-meta[data-v-d5a5712a]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted)}.tp-glyph[data-v-d5a5712a]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center}.tp-done[data-v-d5a5712a]{color:var(--color-success);transform:scale(.91)}.tp-cancelled[data-v-d5a5712a]{color:var(--color-text-muted)}.tp-fail[data-v-d5a5712a]{color:var(--color-danger)}.tp-time[data-v-d5a5712a]{flex:none;font-size:var(--text-base);color:var(--muted);font-variant-numeric:tabular-nums;text-autospace:normal}.tp-model[data-v-d5a5712a]{flex:0 1 auto;min-width:0;font-size:var(--text-base);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-stop[data-v-d5a5712a]{position:relative;flex:none;color:var(--color-danger)}.tp-stop[data-v-d5a5712a]:hover{color:var(--color-danger)}@media(hover:none){.tp-stop[data-v-d5a5712a]{width:var(--touch-target-min);height:var(--touch-target-min)}.tp-row.expandable>.tp-main[data-v-d5a5712a]{min-height:var(--touch-target-min)}}.tp-empty[data-v-d5a5712a]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--faint);font-size:var(--ui-font-size-sm);user-select:none}@media(max-width:640px){.tp-main[data-v-d5a5712a]{flex-wrap:wrap;row-gap:var(--space-1)}.tp-name[data-v-d5a5712a]{font-size:var(--ui-font-size-sm)}}.sg-empty[data-v-f7e4b600]{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-text-faint);font-size:var(--text-sm);user-select:none}.sg-grid[data-v-f7e4b600]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.sg-card[data-v-f7e4b600]{position:relative;display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.sg-card.openable[data-v-f7e4b600]{cursor:pointer}.sg-card.openable[data-v-f7e4b600]:hover{background:var(--color-selected-hover)}.sg-card[data-v-f7e4b600]:not(.openable){cursor:not-allowed}.sg-open[data-v-f7e4b600]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.sg-open[data-v-f7e4b600]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sg-top[data-v-f7e4b600]{display:flex;align-items:center;gap:var(--space-2)}.sg-name[data-v-f7e4b600]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.sg-num[data-v-f7e4b600]{flex:none;color:var(--color-text-muted);font-size:var(--text-sm);font-variant-numeric:tabular-nums}.sg-card:has(.sg-cancel) .sg-top[data-v-f7e4b600]{padding-right:calc(var(--icon-button-sm) + var(--space-1))}@media(hover:none){.sg-card:has(.sg-cancel) .sg-top[data-v-f7e4b600]{padding-right:calc(var(--touch-target-min) + var(--space-1))}}.sg-desc[data-v-f7e4b600]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.sg-foot[data-v-f7e4b600]{display:flex;flex-direction:column;gap:var(--space-1)}.sg-model[data-v-f7e4b600]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs)}.sg-model span[data-v-f7e4b600]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sg-status[data-v-f7e4b600]{display:flex;align-items:center}.sg-state[data-v-f7e4b600]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);text-autospace:normal}.sg-ic-done[data-v-f7e4b600]{color:var(--color-success);transform:scale(.91)}.s-fail .sg-state[data-v-f7e4b600]{color:var(--color-danger)}.sg-time[data-v-f7e4b600]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-variant-numeric:tabular-nums;text-autospace:normal}.sg-cancel[data-v-f7e4b600]{position:absolute;top:var(--space-2);right:var(--space-2);color:var(--color-text-muted);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sg-card:hover .sg-cancel[data-v-f7e4b600],.sg-cancel[data-v-f7e4b600]:focus-visible{opacity:1}.sg-cancel[data-v-f7e4b600]:hover{color:var(--color-danger)}@media(hover:none){.sg-cancel[data-v-f7e4b600]{top:0;right:0;width:var(--touch-target-min);height:var(--touch-target-min);opacity:1}}.todo-card[data-v-f090f678]{display:flex;flex-direction:column;gap:var(--space-3);font-size:var(--text-base)}.tc-row[data-v-f090f678]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text)}.tc-name[data-v-f090f678]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:var(--leading-caption)}.tc-row.s-in_progress .tc-name[data-v-f090f678]{font-weight:var(--weight-medium)}.tc-row.s-pending .tc-name[data-v-f090f678]{color:var(--color-text-muted)}.tc-glyph[data-v-f090f678]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-full)}.tc-glyph.g-done[data-v-f090f678]{color:var(--color-success)}.tc-glyph.g-pending[data-v-f090f678]{border:var(--p-ring-stroke) solid var(--color-line-strong)}.tc-glyph .tc-spin[data-v-f090f678]{color:var(--color-text)}.tc-empty[data-v-f090f678]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.tc-empty-ico[data-v-f090f678]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}@media(max-width:640px){.todo-card[data-v-f090f678]{font-size:var(--text-lg)}.tc-row[data-v-f090f678]{padding:var(--space-2) var(--space-3)}}.wp-head-tab[data-v-82048a74]{display:inline-flex;align-items:center;gap:var(--space-2);padding:0;border:.5px solid transparent;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap;flex:none}.wp-head-tab[data-v-82048a74] svg{width:1.5em;height:1.5em}.wp-head-meta[data-v-82048a74]{color:var(--color-text-muted);text-autospace:normal}.wp-head-actions[data-v-82048a74]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}@media(max-width:480px){.wp-head-actions[data-v-82048a74]{flex-basis:100%;margin-left:0}}@media(hover:none){.wp-head-actions[data-v-82048a74] .ui-seg__item{min-height:var(--touch-target-min)}}@media(max-width:640px),(hover:none){.wp-head-actions[data-v-82048a74] .ui-seg__item{height:var(--touch-target-min)}.wp-head-actions[data-v-82048a74] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}.wp-head-actions[data-v-82048a74] .fc-trigger{min-height:var(--touch-target-min)}}.filter-control[data-v-153e0d9c]{display:inline-flex;min-width:0}.fc-chevron[data-v-153e0d9c]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.fc-trigger[aria-expanded=true] .fc-chevron[data-v-153e0d9c]{transform:rotate(180deg)}.fc-menu[data-v-153e0d9c]{position:fixed;z-index:var(--z-dropdown)}.fc-menu[data-v-153e0d9c] .ui-menu{min-width:0}.fc-label[data-v-153e0d9c]{flex:1;white-space:nowrap}.filter-control[data-v-153e0d9c] .ui-seg__item[data-icon=circle-check] .ui-seg__icon,.fc-menu .kw-icon[data-icon=circle-check][data-v-153e0d9c]{transform:scale(.91)}.fc-check[data-v-153e0d9c]{color:var(--color-accent)}.chat-dock[data-v-e91fb967]{--dock-inline-left: 16px;--dock-inline-right: 16px;box-sizing:border-box;width:100%;max-width:calc(var(--read-max) + var(--panes-scrollbar-width, 0px));padding-right:var(--panes-scrollbar-width, 0px);flex:none;position:absolute;inset:auto 0 0;background:transparent;z-index:var(--z-sticky)}.chat-dock.has-popup[data-v-e91fb967]{z-index:var(--z-dropdown)}.chat-dock.align-center[data-v-e91fb967]{margin-left:auto;margin-right:auto}.chat-dock.align-left[data-v-e91fb967]{margin-left:0;margin-right:auto}.chat-dock.align-mobile[data-v-e91fb967]{max-width:none}.chat-dock[data-v-e91fb967]:before{--fade: 48px;--veil: 72px;content:"";position:absolute;top:calc(-1 * var(--fade));right:0;bottom:0;left:0;z-index:0;pointer-events:none;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-bg) 0%,transparent),color-mix(in srgb,var(--color-bg) 30%,transparent) 21px,color-mix(in srgb,var(--color-bg) 70%,transparent) 45px,var(--color-bg) var(--veil))}.chat-dock[data-v-e91fb967]>*{position:relative;z-index:1}.dock-work-panel[data-v-e91fb967]{position:absolute;left:16px;right:calc(16px + var(--panes-scrollbar-width, 0px));bottom:100%;background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);margin-bottom:var(--space-2);max-height:min(360px,50vh);display:flex;flex-direction:column;overflow:hidden;user-select:none}.dock-work-panel.panel-todos .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-head[data-v-e91fb967]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-body[data-v-e91fb967]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-todos .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-plan .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-head[data-v-e91fb967]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-plan .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-tab[data-v-e91fb967]{padding:0;line-height:var(--leading-solid)}.dock-work-panel.panel-goal .gh-time[data-v-e91fb967]{color:var(--color-text-muted)}.dock-work-panel.panel-todos .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-plan .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-body[data-v-e91fb967]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-subagent[data-v-e91fb967],.dock-work-panel.panel-bash[data-v-e91fb967]{height:min(var(--p-dock-panel-h),50vh)}.dock-work-tab.tab-progress[data-v-e91fb967]{display:inline-flex;align-items:center;gap:var(--space-2)}.dock-work-head[data-v-e91fb967]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:.5px solid var(--color-line);position:relative;z-index:1}.dock-work-body[data-v-e91fb967]{padding:var(--space-2) var(--space-3);overflow-y:auto;min-height:0;display:flex;flex-direction:column}@media(max-width:480px){.dock-work-head[data-v-e91fb967]{flex-wrap:wrap}}.dock-work-panel.body-scrolled-up .dock-work-body[data-v-e91fb967]{mask-image:linear-gradient(to bottom,transparent,black var(--menu-scroll-fade))}.dock-work-body[data-v-e91fb967] .taskspane{border:none;background:transparent;padding:0}.dock-work-body[data-v-e91fb967] .taskspane .tp-head{display:none}.dock-workbar[data-v-e91fb967]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5);padding:var(--space-1) calc(var(--dock-inline-right) + var(--space-4) + var(--p-hairline)) var(--space-05) calc(var(--dock-inline-left) + var(--space-4) + var(--p-hairline))}.dock-workbar[data-v-e91fb967] .ui-pill{position:relative;gap:var(--space-1-5);height:auto;padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border:none;border-radius:var(--radius-lg);background:var(--color-selected);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);color:var(--color-text);font-size:var(--text-base);line-height:var(--leading-normal)}.dock-workbar[data-v-e91fb967] .ui-pill svg{width:1.5em;height:1.5em;color:inherit}.dock-workbar[data-v-e91fb967] .ui-pill:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.dock-workbar[data-v-e91fb967] .ui-pill:hover:not(:disabled):after,.dock-workbar[data-v-e91fb967] .ui-pill.is-active:after{opacity:1}.chat-dock.pills-compact .dock-workbar[data-v-e91fb967] .ui-pill{padding:var(--space-2)}.chat-dock.pills-compact .dock-workbar[data-v-e91fb967] .ui-pill>span{display:none}.dock-workbar .dw-count[data-v-e91fb967]{color:var(--color-text-muted)}.dock-workbar .dw-running[data-v-e91fb967]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted)}.dock-workbar .dw-goal-status[data-v-e91fb967]{font-weight:var(--weight-medium)}.dock-workbar .dw-goal-status--active[data-v-e91fb967]{color:var(--color-success)}.dock-workbar .dw-goal-status--paused[data-v-e91fb967]{color:var(--color-warning)}.dock-workbar .dw-goal-status--blocked[data-v-e91fb967]{color:var(--color-danger)}.dock-approval[data-v-e91fb967]{margin-top:8px}.chat-dock.has-approval[data-v-e91fb967]{display:flex;flex-direction:column;max-height:calc(100dvh - 72px)}.chat-dock.has-approval>.dock-workbar[data-v-e91fb967]{flex:none}.chat-dock.has-approval>.dock-approval[data-v-e91fb967]{min-height:0}@media(max-width:640px){.chat-dock[data-v-e91fb967]{--dock-inline-left: max(12px, var(--safe-left));--dock-inline-right: max(12px, var(--safe-right))}.dock-work-panel[data-v-e91fb967]{left:10px;right:calc(10px + var(--panes-scrollbar-width, 0px))}.dock-work-head-actions[data-v-e91fb967] .ui-seg__item{height:var(--touch-target-min)}.dock-work-head-actions[data-v-e91fb967] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}}.chat-dock[data-v-e91fb967]:not(.align-mobile) .composer{padding-bottom:14px}.dock-panel-enter-active[data-v-e91fb967]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.dock-panel-leave-active[data-v-e91fb967]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.dock-panel-enter-from[data-v-e91fb967],.dock-panel-leave-to[data-v-e91fb967]{opacity:0;transform:translateY(var(--motion-panel-shift)) scale(var(--motion-panel-scale))}.conversation-toc[data-v-b8ba267a]{position:absolute;z-index:var(--z-sticky);top:50%;transform:translateY(-50%);--toc-content-max: min( var(--p-content-max), calc(100cqi - var(--space-5) - var(--space-5)) );left:calc(50% + (var(--toc-content-max) / 2) + 14px);max-height:calc(100% - 160px);display:flex;flex-direction:column;justify-content:center;opacity:.5;transition:opacity var(--duration-base) var(--ease-out)}.conversation-toc[data-v-b8ba267a]:before{content:"";position:absolute;inset:0 -48px 0 -14px;z-index:0}.conversation-toc[data-v-b8ba267a]:hover,.conversation-toc[data-v-b8ba267a]:focus-within{opacity:1}.conversation-toc[data-v-b8ba267a]:hover:not(:focus-within){transition-delay:var(--duration-hover-intent)}.toc-scroll[data-v-b8ba267a]{position:relative;z-index:1;display:flex;flex-direction:column;gap:7px;padding:8px 0;min-height:0;overflow-y:auto;scrollbar-width:none}.toc-scroll[data-v-b8ba267a]::-webkit-scrollbar{display:none}.toc-row[data-v-b8ba267a]{display:flex;align-items:center;gap:10px;height:18px;padding:0;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;white-space:nowrap}.toc-row[data-v-b8ba267a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.toc-bar[data-v-b8ba267a]{flex:none;width:3px;height:14px;border-radius:var(--radius-full);background:var(--color-accent);opacity:.3;transition:opacity var(--duration-fast) var(--ease-out),height var(--duration-fast) var(--ease-out)}.toc-label[data-v-b8ba267a]{display:block;max-width:0;overflow:hidden;opacity:0;text-overflow:ellipsis;transition:max-width .22s var(--ease-out),opacity var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.conversation-toc:hover .toc-bar[data-v-b8ba267a],.conversation-toc:focus-within .toc-bar[data-v-b8ba267a]{height:18px;opacity:.5}.conversation-toc:hover .toc-label[data-v-b8ba267a],.conversation-toc:focus-within .toc-label[data-v-b8ba267a]{max-width:220px;opacity:1}.conversation-toc:hover:not(:focus-within) .toc-bar[data-v-b8ba267a]{transition-delay:0ms,var(--duration-hover-intent)}.conversation-toc:hover:not(:focus-within) .toc-label[data-v-b8ba267a]{transition-delay:var(--duration-hover-intent),var(--duration-hover-intent),0ms}.toc-row.active .toc-bar[data-v-b8ba267a]{opacity:1;height:18px}.toc-row.active .toc-label[data-v-b8ba267a]{color:var(--color-accent);font-weight:var(--weight-medium)}.toc-row:hover .toc-bar[data-v-b8ba267a]{opacity:1}.toc-row:hover .toc-label[data-v-b8ba267a]{color:var(--color-text)}.conversation-toc.toc-clipped[data-v-b8ba267a]{visibility:hidden;pointer-events:none}.tsearch[data-v-26f3fed5]{position:absolute;top:calc(var(--panel-head-h, 48px) + var(--space-3));right:var(--space-3);z-index:var(--z-sticky);width:min(var(--p-findbar-w),calc(100% - var(--space-3) * 2));background:var(--color-surface-raised);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);animation:kimi-card-in var(--duration-slow) var(--ease-out)}.tsearch.mobile[data-v-26f3fed5]{top:var(--space-3)}.tsearch[data-v-26f3fed5]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-2xl);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.tsearch[data-v-26f3fed5]:focus-within:after{opacity:1}.tsearch-main[data-v-26f3fed5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) var(--space-2);min-height:calc(var(--space-8) + 2 * var(--space-1))}.tsearch-icon[data-v-26f3fed5]{flex:none;margin-left:var(--space-1);color:var(--color-text-muted)}.tsearch-input[data-v-26f3fed5]{flex:1;min-width:0;height:var(--space-8);padding:0;border:none;background:transparent;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text)}.tsearch-input[data-v-26f3fed5]:focus-visible{outline:none}.tsearch-input[data-v-26f3fed5]::placeholder{color:var(--color-text-muted)}.tsearch-spin[data-v-26f3fed5]{display:inline-flex;flex:none}.tsearch-sep[data-v-26f3fed5]{flex:none;width:var(--p-hairline);height:var(--space-4);background:var(--color-line)}.tsearch .tsearch-close[data-v-26f3fed5]{border-radius:var(--radius-full)}.tsearch-foot-wrap[data-v-26f3fed5]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.tsearch-foot-wrap.open[data-v-26f3fed5]{grid-template-rows:1fr}.tsearch-foot[data-v-26f3fed5]{overflow:hidden;min-height:0;display:flex;align-items:center;gap:var(--space-1);padding:0 var(--space-2)}.tsearch-foot-wrap.open .tsearch-foot[data-v-26f3fed5]{padding:var(--space-1) var(--space-2);border-top:var(--p-hairline) solid var(--color-line)}.tsearch-count[data-v-26f3fed5]{margin-left:auto;padding-right:var(--space-1);font-size:var(--ui-font-size-sm);color:var(--color-text-muted);white-space:nowrap;user-select:none}.tsearch-rings[data-v-26f3fed5]{position:absolute;inset:0;pointer-events:none}.tsearch-ring[data-v-26f3fed5]{position:absolute;box-sizing:content-box;border:var(--p-findring-w) solid var(--color-warning);margin:calc(-1 * var(--p-findring-w));border-radius:var(--radius-xs);pointer-events:none}.doodle-host[data-v-b7d865dd]{position:relative;width:100%;aspect-ratio:338 / 152;display:flex;align-items:center;justify-content:center}.doodle-canvas[data-v-b7d865dd]{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .25s ease}.doodle-canvas.ready[data-v-b7d865dd]{opacity:1}@media(prefers-reduced-motion:reduce){.doodle-canvas[data-v-b7d865dd]{transition:none}}.con[data-v-8c7ebe8d]{--read-max: 760px;display:flex;flex-direction:column;min-width:0;height:100%;position:relative;container-type:inline-size}.empty-drag[data-v-8c7ebe8d]{position:absolute;top:0;left:0;right:0;height:var(--panel-head-h, 48px)}.empty-drag.macos-desktop[data-v-8c7ebe8d]{-webkit-app-region:drag}.panes[data-v-8c7ebe8d]{flex:1;min-height:0;overflow-y:auto;overflow-anchor:auto;scrollbar-gutter:stable}.panes[data-v-8c7ebe8d]::-webkit-scrollbar{width:4px}.panes[data-v-8c7ebe8d]::-webkit-scrollbar-thumb{background:transparent;transition:background var(--duration-base) var(--ease-out)}.panes.scrolling[data-v-8c7ebe8d]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.panes.scrolling[data-v-8c7ebe8d]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.panes.session-settling .chat[data-v-8c7ebe8d]>*:not(.chat-loading){visibility:hidden}.panes.is-following[data-v-8c7ebe8d],.panes.history-prepending[data-v-8c7ebe8d],.panes.is-pinned[data-v-8c7ebe8d]{overflow-anchor:none}.chat-layout[data-v-8c7ebe8d]{display:flex;flex-direction:column;height:100%;min-height:0;position:relative}.chat-scroll[data-v-8c7ebe8d]{flex:1;min-height:0;position:relative}.content-wrap[data-v-8c7ebe8d]{width:100%;max-width:var(--read-max);min-height:100%;box-sizing:border-box;padding-bottom:var(--chat-dock-height, 0px);display:flex;flex-direction:column;flex-shrink:0}.content-wrap.align-center[data-v-8c7ebe8d]{margin-left:auto;margin-right:auto}.content-wrap.align-left[data-v-8c7ebe8d]{margin-left:0;margin-right:auto}.content-wrap.align-mobile[data-v-8c7ebe8d]{max-width:none}@media(max-width:640px){.con.mobile[data-v-8c7ebe8d]{min-width:0;overflow:hidden}.con.mobile .panes[data-v-8c7ebe8d]{scrollbar-gutter:auto;-webkit-overflow-scrolling:touch}.content-wrap.align-mobile[data-v-8c7ebe8d]{width:100%;min-width:0}}.empty-spacer[data-v-8c7ebe8d]{flex:1}.empty-hint[data-v-8c7ebe8d]{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:0 16px 16px;color:var(--color-text);font-family:var(--font-ui);user-select:none}.empty-hint-title[data-v-8c7ebe8d]{font-size:calc(var(--ui-font-size) + 16px);font-optical-sizing:auto;font-weight:600}.empty-hint-title.is-starting[data-v-8c7ebe8d]{display:inline-flex;align-items:center;gap:9px;color:var(--dim);font-weight:400}.empty-doodle[data-v-8c7ebe8d]{width:min(340px,62vw)}.empty-hint-text[data-v-8c7ebe8d]{display:inline-block;font-size:var(--text-base);color:var(--dim);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upgrade-banner[data-v-8c7ebe8d]{flex:none;display:flex;align-items:center;gap:var(--space-3);margin:0 var(--dock-inline-right, 16px) var(--space-2) var(--dock-inline-left, 16px);padding:var(--space-2) var(--space-3);border:.5px solid var(--color-accent-bd);border-radius:var(--radius-xl);background:var(--color-accent-soft)}.upgrade-banner-icon[data-v-8c7ebe8d]{flex:none;color:var(--color-accent)}.upgrade-banner-text[data-v-8c7ebe8d]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text)}.upgrade-banner-cta[data-v-8c7ebe8d]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-accent);cursor:pointer}.upgrade-banner-cta[data-v-8c7ebe8d]:hover{color:var(--color-accent-hover)}.empty-composer[data-v-8c7ebe8d] .composer-card{position:relative;z-index:var(--z-sticky)}.empty-composer[data-v-8c7ebe8d]:not(.expanded) .ph{min-height:3lh}.ws-bar[data-v-8c7ebe8d]{margin-top:calc(-1 * var(--space-4));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(--font-ui)}.ws-anchor[data-v-8c7ebe8d]{position:relative}.ws-chip[data-v-8c7ebe8d]{display:inline-flex;align-items:center;gap:var(--space-2);max-width:100%;padding:var(--space-2) var(--space-3);background:none;border:none;border-radius:var(--radius-full);color:var(--color-text-muted);font-family:inherit;font-size:var(--ui-font-size-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ws-chip[data-v-8c7ebe8d]:hover,.ws-chip.open[data-v-8c7ebe8d]{background:var(--color-selected);color:var(--color-text)}.ws-chip[data-v-8c7ebe8d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ws-chip>.kw-icon[data-v-8c7ebe8d]{flex:none}.ws-chip-name[data-v-8c7ebe8d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-option-label)}.ws-chip-chev[data-v-8c7ebe8d]{flex:none;transition:transform var(--duration-base) var(--ease-out)}.ws-chip.open .ws-chip-chev[data-v-8c7ebe8d]{transform:rotate(180deg)}.ws-chip.ws-ghost[data-v-8c7ebe8d]{color:var(--color-text-muted)}.ws-chip.ws-ghost[data-v-8c7ebe8d]:hover{color:var(--color-text)}.ws-backdrop[data-v-8c7ebe8d]{position:fixed;inset:0;z-index:var(--z-sticky)}.ws-panel[data-v-8c7ebe8d]{position:absolute;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);left:0;top:calc(100% + var(--space-1));z-index:var(--z-dropdown);width:max-content;min-width:min(calc(var(--space-8) * 8),100%);max-width:100%;max-height:calc(var(--space-8) * 10);overflow:hidden auto;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);padding:var(--space-1);animation:ws-pop-8c7ebe8d var(--duration-base) var(--ease-out)}.ws-panel.up[data-v-8c7ebe8d]{top:auto;bottom:calc(100% + var(--space-1));animation-name:ws-pop-up-8c7ebe8d}@keyframes ws-pop-8c7ebe8d{0%{opacity:0;transform:translateY(calc(-1 * var(--space-1))) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes ws-pop-up-8c7ebe8d{0%{opacity:0;transform:translateY(var(--space-1)) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.ws-caption[data-v-8c7ebe8d]{padding:var(--space-1) var(--space-2);font-size:var(--text-xs);font-weight:var(--weight-medium);color:var(--color-text-faint);user-select:none}.ws-row[data-v-8c7ebe8d]{display:flex;align-items:center;gap:var(--space-2);width:100%;text-align:left;background:none;border:none;border-radius:var(--radius-sm);padding:var(--space-1) var(--space-2);cursor:pointer;font-family:var(--font-ui)}.ws-row>.kw-icon[data-v-8c7ebe8d]{flex:none;color:var(--muted)}.ws-row[data-v-8c7ebe8d]:hover{background:var(--color-hover)}.ws-row.on[data-v-8c7ebe8d]{background:var(--color-selected)}.ws-row[data-v-8c7ebe8d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ws-info[data-v-8c7ebe8d]{flex:1;min-width:0;display:flex;flex-direction:column}.ws-name[data-v-8c7ebe8d]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-option-label);color:var(--color-text);line-height:var(--leading-normal)}.ws-path[data-v-8c7ebe8d]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs);font-weight:var(--weight-option-label);color:var(--muted);line-height:var(--leading-normal)}.ws-check[data-v-8c7ebe8d]{flex:none;margin-left:var(--space-3);color:var(--color-text)}.ws-divider[data-v-8c7ebe8d]{height:1px;margin:var(--space-1) var(--space-2);background:var(--line)}.ws-action[data-v-8c7ebe8d]{display:flex;align-items:center;gap:var(--space-2);width:100%;text-align:left;background:none;border:none;border-radius:var(--radius-sm);padding:var(--space-2);cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-action>.kw-icon[data-v-8c7ebe8d]{flex:none;color:var(--muted)}.ws-action span[data-v-8c7ebe8d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-action[data-v-8c7ebe8d]:hover{background:var(--color-hover);color:var(--color-text)}.ws-action:hover>.kw-icon[data-v-8c7ebe8d]{color:var(--dim)}.ws-action[data-v-8c7ebe8d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.chat-scroll[data-v-8c7ebe8d]{display:flex;flex-direction:column}.mobile .panes[data-v-8c7ebe8d]:has(>.chat-layout){overflow:hidden;scrollbar-gutter:auto}.newmsg-pill[data-v-8c7ebe8d]{position:absolute;left:50%;bottom:12px;transform:translate(-50%);display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:.5px solid var(--line);background:var(--panel);color:var(--color-text);font-size:var(--text-xs);font-weight:var(--weight-ui-strong);cursor:pointer;box-shadow:var(--shadow-sm);z-index:var(--z-sticky)}.pill-chevron[data-v-8c7ebe8d]{width:12px;height:12px}.pill-enter-active[data-v-8c7ebe8d],.pill-leave-active[data-v-8c7ebe8d]{transition:opacity .2s ease,transform .2s ease}.pill-enter-from[data-v-8c7ebe8d],.pill-leave-to[data-v-8c7ebe8d]{opacity:0;transform:translate(-50%) translateY(8px)}.undo-toast[data-v-8c7ebe8d]{position:absolute;left:50%;top:60px;transform:translate(-50%);padding:8px 14px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--bg);font-size:var(--ui-font-size-sm);z-index:var(--z-sticky);box-shadow:var(--shadow-sm)}.undo-toast-text[data-v-8c7ebe8d]{display:flex;align-items:center;gap:8px}.undo-toast-enter-active[data-v-8c7ebe8d],.undo-toast-leave-active[data-v-8c7ebe8d]{transition:opacity .15s ease,transform .15s ease}.undo-toast-enter-from[data-v-8c7ebe8d],.undo-toast-leave-to[data-v-8c7ebe8d]{opacity:0;transform:translate(-50%) translateY(-6px)}.con[data-v-8c7ebe8d]{background:var(--bg)}.newmsg-pill[data-v-8c7ebe8d]{font-family:var(--sans)}.file-preview[data-v-4c55a361]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono);min-width:0;container-type:inline-size}.fp-empty[data-v-4c55a361],.fp-loading[data-v-4c55a361]{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted);font-size:var(--ui-font-size)}.fp-path[data-v-4c55a361]{flex:1 1 60px;min-width:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left;font-size:var(--ui-font-size-xs);color:var(--muted);font-weight:400}.fp-meta[data-v-4c55a361]{display:flex;align-items:center;gap:8px;flex:none}@container (max-width: 539px){.fp-meta[data-v-4c55a361]{display:none}}.fp-lines[data-v-4c55a361],.fp-size[data-v-4c55a361]{font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--muted);white-space:nowrap}.fp-search[data-v-4c55a361]{display:flex;align-items:center;gap:4px;flex:1 1 110px;min-width:70px;max-width:200px}.fp-search-input[data-v-4c55a361]{flex:1;min-width:0;height:26px;border:.5px solid var(--color-line);border-radius:var(--radius-sm);padding:2px 7px;background:var(--color-surface-raised);color:var(--color-text);font:var(--text-xs) var(--font-mono)}.fp-search-count[data-v-4c55a361]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px));min-width:18px;text-align:right}.fp-download[data-v-4c55a361]{display:inline-grid;place-items:center;width:26px;height:26px;flex:none;border-radius:var(--radius-sm);color:var(--color-text-muted)}.fp-download[data-v-4c55a361]:hover{background:var(--color-hover);color:var(--color-text)}.fp-download[data-v-4c55a361]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.fp-download svg[data-v-4c55a361]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.fp-check[data-v-4c55a361]{color:var(--color-success)}.fp-body[data-v-4c55a361]{--fp-search-hit-bg: color-mix(in srgb, var(--star) 22%, var(--bg));--fp-search-active-bg: color-mix(in srgb, var(--star) 36%, var(--bg));flex:1;min-height:0;overflow:auto}.fp-markdown[data-v-4c55a361]{padding:16px 20px}.fp-code[data-v-4c55a361]{background:var(--bg)}.fp-code[data-v-4c55a361] .hl-row.hit,.fp-table tr.hit td[data-v-4c55a361]{background:var(--fp-search-hit-bg)}.fp-code[data-v-4c55a361] .hl-row.active,.fp-table tr.active td[data-v-4c55a361]{background:var(--fp-search-active-bg)}.fp-code[data-v-4c55a361] .hl-row.target,.fp-table tr.target th[data-v-4c55a361],.fp-table tr.target td[data-v-4c55a361]{background:var(--color-accent-soft)}.fp-html-frame[data-v-4c55a361],.fp-pdf-frame[data-v-4c55a361]{width:100%;height:100%;border:0;background:var(--color-surface-raised)}.fp-pdf-wrap[data-v-4c55a361]{background:var(--panel2)}.fp-table-wrap[data-v-4c55a361]{background:var(--bg)}.fp-table[data-v-4c55a361]{border-collapse:collapse;min-width:100%;font:var(--code-font-size)/var(--leading-normal) var(--mono)}.fp-table th[data-v-4c55a361]{position:sticky;left:0;z-index:1;width:44px;min-width:44px;padding:2px 8px;text-align:right;color:var(--faint);background:var(--panel);border-right:.5px solid var(--line2);user-select:none}.fp-table td[data-v-4c55a361]{padding:2px 10px;border-right:.5px solid var(--line2);border-bottom:.5px solid var(--line2);white-space:pre}.fp-image-wrap[data-v-4c55a361]{display:flex;align-items:center;justify-content:center;padding:24px;background:var(--panel2)}.fp-image[data-v-4c55a361]{max-width:100%;max-height:100%;object-fit:contain;border:.5px solid var(--line);border-radius:4px;background:var(--media-alpha-canvas)}.fp-image.actual[data-v-4c55a361]{max-width:none;max-height:none}.fp-binary-wrap[data-v-4c55a361]{display:flex;align-items:center;justify-content:center}.fp-binary-card[data-v-4c55a361]{display:flex;align-items:center;gap:12px;padding:20px 24px;border:.5px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font-size:var(--ui-font-size);margin:32px auto;max-width:480px}.fp-binary-icon[data-v-4c55a361]{color:var(--faint);flex:none}.fp-error[data-v-4c55a361]{flex-direction:column;padding:24px;text-align:center}@keyframes spin-4c55a361{to{transform:rotate(360deg)}}.spinner[data-v-4c55a361]{display:inline-block;width:14px;height:14px;border:.5px solid var(--line);border-top-color:var(--color-accent);border-radius:50%;animation:spin-4c55a361 .7s linear infinite}@media(max-width:640px){.fp-lines[data-v-4c55a361]{display:none}.fp-markdown[data-v-4c55a361]{padding:14px 16px}.fp-body.fp-code[data-v-4c55a361]{-webkit-overflow-scrolling:touch}}.fp-empty[data-v-4c55a361],.fp-loading[data-v-4c55a361]{font-family:var(--sans)}.fp-binary-card[data-v-4c55a361]{border:.5px solid var(--color-line);border-radius:var(--radius-md)}.fp-binary-label[data-v-4c55a361]{font-family:var(--sans)}.fp-image[data-v-4c55a361]{border-radius:var(--radius-md)}.seg-btn[data-v-4c55a361]{font-family:var(--sans)}.tp[data-v-afb1f46f]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--color-bg)}.tp-body[data-v-afb1f46f]{flex:1;min-height:0;overflow-y:auto;margin:0;padding:12px 14px;font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:400;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word}.agent-panel[data-v-84a2873f]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-bg)}.agent-transcript[data-v-84a2873f]{flex:1;min-height:0;overflow-y:auto}.agent-transcript[data-v-84a2873f] .think-body,.agent-transcript[data-v-84a2873f] .ar-body,.agent-transcript[data-v-84a2873f] .tf-body,.agent-transcript[data-v-84a2873f] .bb,.agent-transcript[data-v-84a2873f] .tl-body{transition:none}.agent-error[data-v-84a2873f]{color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.agent-fallback[data-v-84a2873f]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4)}.sc[data-v-bb28a4e0]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.sc-body[data-v-bb28a4e0]{flex:1;min-height:0;overflow-y:auto}.sc-empty[data-v-bb28a4e0]{padding:24px 16px;text-align:center;color:var(--muted);font-size:var(--ui-font-size)}.sc-composer[data-v-bb28a4e0]{flex:none;display:flex;align-items:flex-end;gap:6px;padding:8px 10px;border-top:.5px solid var(--color-line);background:var(--color-surface-raised)}.sc-input[data-v-bb28a4e0]{flex:1;min-width:0;resize:none;border:.5px solid var(--color-line);border-radius:var(--r-sm);padding:7px 9px;background:var(--bg);color:var(--color-text);font:var(--ui-font-size)/1.5 var(--sans);outline:none;max-height:160px}.sc-input[data-v-bb28a4e0]:focus{border-color:var(--color-accent-bd)}.sc-send[data-v-bb28a4e0]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:var(--r-sm);background:var(--color-accent);color:var(--color-text-on-accent);cursor:pointer}.sc-send[data-v-bb28a4e0]:disabled{opacity:.4;cursor:default}.sc-send[data-v-bb28a4e0]:not(:disabled):hover{background:var(--color-accent-hover)}.sc-loading[data-v-bb28a4e0]{flex:none;padding:8px 12px 12px}.sc-body[data-v-bb28a4e0] .sending-placeholder,.sc-body[data-v-bb28a4e0] .sending-line{display:none}.changes-pane[data-v-7d5ab9c7]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono)}.dv-path[data-v-7d5ab9c7],.dv-change-count[data-v-7d5ab9c7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:var(--muted)}.dv-change-count[data-v-7d5ab9c7]{flex:1;align-self:stretch;display:inline-flex;align-items:center;font-family:var(--font-ui)}.dv-path[data-v-7d5ab9c7]{font-family:var(--font-ui)}.ch-head[data-v-7d5ab9c7]{display:flex;align-items:center;gap:8px;padding:8px var(--space-3);border-bottom:.5px solid var(--line);background:var(--panel);font-size:var(--text-base);color:var(--dim);flex:none;white-space:nowrap;overflow:hidden;font-family:var(--font-ui);user-select:none}.br-heading[data-v-7d5ab9c7]{display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.br-icon[data-v-7d5ab9c7]{flex:none;color:var(--muted)}.br-label[data-v-7d5ab9c7]{color:var(--muted);font-size:var(--text-xs);font-weight:500}.br-name[data-v-7d5ab9c7]{color:var(--color-text);font-weight:500;font-size:var(--text-xs)}.sync-info[data-v-7d5ab9c7]{display:flex;align-items:center;gap:4px}.ahead[data-v-7d5ab9c7]{color:var(--color-accent);font-size:var(--text-xs)}.behind[data-v-7d5ab9c7]{color:var(--color-warning);font-size:var(--text-xs)}.empty-head[data-v-7d5ab9c7]{color:var(--muted);font-size:var(--text-base)}.ch-list[data-v-7d5ab9c7]{flex:1;min-height:0}.ch-list-content[data-v-7d5ab9c7]{min-height:100%;padding:4px 0}.ch-row[data-v-7d5ab9c7]{display:flex;align-items:center;gap:6px;padding:3px 8px;cursor:pointer;font-size:var(--text-xs);line-height:1.6;width:100%;background:none;border:none;text-align:left;font-family:var(--font-ui);color:inherit}.ch-row[data-v-7d5ab9c7]:hover{background:var(--panel2)}.ch-row[data-v-7d5ab9c7]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ch-tree[data-v-7d5ab9c7]{--tree-base-indent: 14px;--tree-indent-step: 12px;font-family:var(--font-ui)}.tree-list[data-v-7d5ab9c7]{list-style:none;margin:0}.tree-node[data-v-7d5ab9c7]{overflow:hidden;interpolate-size:allow-keywords}.tree-collapse-enter-active[data-v-7d5ab9c7],.tree-collapse-leave-active[data-v-7d5ab9c7]{transition:block-size var(--duration-base) var(--ease-out),opacity var(--duration-fast) var(--ease-out),transform var(--duration-base) var(--ease-out)}.tree-collapse-enter-from[data-v-7d5ab9c7],.tree-collapse-leave-to[data-v-7d5ab9c7]{block-size:0;opacity:0;transform:translateY(-3px)}.tree-collapse-enter-to[data-v-7d5ab9c7],.tree-collapse-leave-from[data-v-7d5ab9c7]{block-size:auto;opacity:1;transform:translateY(0)}.tree-row[data-v-7d5ab9c7]{position:relative;display:flex;align-items:center;gap:6px;width:100%;margin-top:1px;padding:3px 8px;background:none;border:none;text-align:left;font-family:inherit;font-size:var(--text-xs);color:inherit;cursor:pointer}.tree-row[data-v-7d5ab9c7]:before{content:"";position:absolute;top:0;bottom:0;left:calc(var(--tree-base-indent) + 6px);width:calc(var(--tree-depth, 0) * var(--tree-indent-step));background:repeating-linear-gradient(to right,var(--color-line) 0 1px,transparent 1px var(--tree-indent-step));pointer-events:none}.tree-row[data-v-7d5ab9c7]:hover{background:var(--panel2)}.tree-row[data-v-7d5ab9c7]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.tree-folder[data-v-7d5ab9c7]{color:var(--color-text);font-weight:500}.tree-file[data-v-7d5ab9c7]{color:var(--color-text);font-weight:450}.tree-icon[data-v-7d5ab9c7]{flex:none;color:var(--muted)}.tree-name[data-v-7d5ab9c7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge[data-v-7d5ab9c7]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:var(--radius-xs);font-size:max(9px,calc(var(--ui-font-size) - 4px));font-weight:500;flex:none;user-select:none}.badge.modified[data-v-7d5ab9c7]{background:var(--color-warning-soft);color:var(--color-warning)}.badge.added[data-v-7d5ab9c7]{background:var(--color-success-soft);color:var(--color-success)}.badge.deleted[data-v-7d5ab9c7]{background:var(--color-danger-soft);color:var(--color-danger)}.badge.renamed[data-v-7d5ab9c7]{background:var(--color-done-soft);color:var(--color-done)}.badge.untracked[data-v-7d5ab9c7]{background:var(--color-success-soft);color:var(--color-success)}.badge.conflicted[data-v-7d5ab9c7]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger);font-size:max(9px,calc(var(--ui-font-size) - 5px))}.badge.ignored[data-v-7d5ab9c7]{background:var(--color-well);color:var(--faint)}.badge.clean[data-v-7d5ab9c7]{background:transparent;color:var(--faint)}.badge.unknown[data-v-7d5ab9c7]{background:var(--color-well);color:var(--muted)}.fpath[data-v-7d5ab9c7]{color:var(--color-text);font-size:var(--text-xs);font-weight:450;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:left;min-width:0}.fpath[data-v-7d5ab9c7]:before,.fpath[data-v-7d5ab9c7]:after{content:"‎"}.empty-state[data-v-7d5ab9c7]{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:32px 20px;color:var(--muted);font-size:var(--ui-font-size);text-align:center;user-select:none}.empty-state-icon[data-v-7d5ab9c7]{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--color-well);color:var(--color-text-muted)}.diff-head[data-v-7d5ab9c7]{display:flex;align-items:center;gap:10px;padding:6px 12px;border-bottom:.5px solid var(--line);background:var(--panel);flex:none;white-space:nowrap;overflow:hidden}.dv-lines-wrap[data-v-7d5ab9c7]{flex:1;min-height:0;overflow:auto}.diff-content-enter-active[data-v-7d5ab9c7],.diff-content-leave-active[data-v-7d5ab9c7]{transition:opacity var(--duration-base) var(--ease-out)}.diff-content-enter-from[data-v-7d5ab9c7],.diff-content-leave-to[data-v-7d5ab9c7]{opacity:0}@media(max-width:640px){.ch-head[data-v-7d5ab9c7]{padding:10px 14px}.ch-list[data-v-7d5ab9c7]{padding:2px 0 12px}.ch-row[data-v-7d5ab9c7]{min-height:44px;padding:8px 14px;gap:12px;font-size:var(--text-xs)}.ch-row[data-v-7d5ab9c7]:active{background:var(--panel2)}.badge[data-v-7d5ab9c7]{width:18px;height:18px}.fpath[data-v-7d5ab9c7]{font-size:var(--text-xs)}.tree-row[data-v-7d5ab9c7]{min-height:40px;padding:8px 14px}.diff-head[data-v-7d5ab9c7]{padding:8px 12px;gap:10px}.diff-path[data-v-7d5ab9c7]{font-size:var(--text-base)}}.changes-pane .empty-state[data-v-7d5ab9c7],.br-label[data-v-7d5ab9c7],.empty-head[data-v-7d5ab9c7]{font-family:var(--sans)}.ch-row[data-v-7d5ab9c7],.ct-row[data-v-7d5ab9c7]{margin:1px 6px;width:calc(100% - 12px);border-radius:var(--radius-md)}.changes-pane .badge[data-v-7d5ab9c7],.changed-tree .badge[data-v-7d5ab9c7]{border-radius:var(--radius-sm)}.change-count[data-v-7d5ab9c7]{font-family:var(--sans);border-radius:999px}.td[data-v-fdd0bc05]{display:flex;flex-direction:column;height:100%;min-height:0}.td-path[data-v-fdd0bc05]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--ui-c1) var(--font-mono);color:var(--color-text-muted)}.td-body[data-v-fdd0bc05]{flex:1;min-height:0;overflow:auto}.td-empty[data-v-fdd0bc05]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);height:100%;padding:var(--space-6);color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.mp[data-v-3ba22330]{display:flex;flex-direction:column;gap:var(--space-2);height:100%;min-height:0;padding-top:4px}.search-wrap[data-v-3ba22330]{position:relative;margin:0 22px;padding-bottom:var(--space-1)}.search-wrap[data-v-3ba22330] .ui-input{padding-right:30px}.search-clear[data-v-3ba22330]{position:absolute;top:0;bottom:var(--space-1);right:var(--space-2);margin-block:auto;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-hover);color:var(--color-text-faint);cursor:pointer;visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast),background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.search-clear.is-on[data-v-3ba22330]{visibility:visible;opacity:1}.search-clear[data-v-3ba22330]:hover{background:var(--color-selected);color:var(--color-text-muted)}.search-clear[data-v-3ba22330]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.chip-strip[data-v-3ba22330]{display:flex;gap:var(--space-1);margin:0 22px;overflow-x:auto;scrollbar-width:none}.chip-strip[data-v-3ba22330]::-webkit-scrollbar{display:none}.chip[data-v-3ba22330]{flex:none;height:28px;padding:0 var(--space-3);border:none;border-radius:var(--radius-full);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base);white-space:nowrap;cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.chip[data-v-3ba22330]:hover{background:var(--color-hover);color:var(--color-text)}.chip.is-active[data-v-3ba22330]{background:var(--color-selected);color:var(--color-text);font-weight:var(--weight-medium)}.chip[data-v-3ba22330]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-list[data-v-3ba22330]{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;padding:var(--space-1) var(--space-2)}.model-row[data-v-3ba22330]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);cursor:pointer;color:var(--color-text);min-width:0;transition:background var(--duration-fast) var(--ease-out)}.model-row[data-v-3ba22330]:hover,.model-row.is-selected[data-v-3ba22330]{background:var(--color-hover)}.model-row.is-current[data-v-3ba22330]{background:var(--color-selected)}.model-main[data-v-3ba22330]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.model-name[data-v-3ba22330]{font-family:var(--font-ui);font-size:var(--text-base);line-height:20px;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-row.is-current .model-name[data-v-3ba22330]{font-weight:var(--weight-medium)}.model-meta[data-v-3ba22330]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:18px;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-side[data-v-3ba22330]{display:flex;align-items:center;gap:var(--space-1);flex:none}.model-check[data-v-3ba22330]{color:var(--color-text)}.model-star[data-v-3ba22330]{color:var(--color-text-faint);visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast)}.model-row:hover .model-star[data-v-3ba22330],.model-row.is-selected .model-star[data-v-3ba22330],.model-star.is-starred[data-v-3ba22330],.model-star[data-v-3ba22330]:focus-visible{visibility:visible;opacity:1}.model-star.is-starred[data-v-3ba22330]{color:var(--star)}@media(hover:none){.model-star[data-v-3ba22330]{visibility:visible;opacity:1}}.state-row[data-v-3ba22330]{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:var(--space-2);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.state-row.unavail[data-v-3ba22330]{color:var(--color-warning)}.empty[data-v-3ba22330]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.footer-hint[data-v-3ba22330]{flex:none;display:flex;align-items:center;gap:var(--space-1);padding:var(--space-2) var(--space-4);border-top:.5px solid var(--color-line);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.hint-dot[data-v-3ba22330]{margin:0 var(--space-1)}@media(prefers-reduced-motion:reduce){.chip[data-v-3ba22330],.model-row[data-v-3ba22330],.model-star[data-v-3ba22330],.search-clear[data-v-3ba22330]{transition:none}}.center-body[data-v-0b06fca3]{display:flex;flex-direction:column;align-items:center;gap:var(--space-3);padding:var(--space-8) 0 var(--space-4);text-align:center}.center-text[data-v-0b06fca3]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.success-text[data-v-0b06fca3]{color:var(--color-success)}.err-text[data-v-0b06fca3]{color:var(--color-danger)}.warn-text[data-v-0b06fca3]{color:var(--color-warning);font-size:var(--text-base)}.center-hint[data-v-0b06fca3]{font-size:var(--text-sm);color:var(--color-text-muted)}.nb[data-v-0b06fca3]{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-2) 0 var(--space-4)}.nb-lead[data-v-0b06fca3]{font-size:var(--text-base);color:var(--color-text);line-height:var(--leading-normal)}.nb-primary[data-v-0b06fca3]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);width:100%;min-height:40px;padding:0 var(--space-4);background:var(--color-accent);color:var(--color-text-on-accent);border:.5px solid var(--color-accent);border-radius:var(--radius-md);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);cursor:pointer;text-decoration:none;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out)}.nb-primary[data-v-0b06fca3]:hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.nb-or[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-3);color:var(--color-text-muted);font-size:var(--text-xs);letter-spacing:.06em}.nb-or[data-v-0b06fca3]:before,.nb-or[data-v-0b06fca3]:after{content:"";flex:1;height:1px;background:var(--color-line)}.nb-fallback[data-v-0b06fca3]{display:flex;flex-direction:column;gap:var(--space-2)}.nb-fb-text[data-v-0b06fca3]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.nb-fb-link[data-v-0b06fca3]{color:var(--color-accent);text-decoration:none;border-bottom:.5px solid var(--color-accent-bd)}.nb-fb-link[data-v-0b06fca3]:hover{border-bottom-color:var(--color-accent)}.nb-code-row[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-3);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3)}.nb-code[data-v-0b06fca3]{flex:1;font-family:var(--font-mono);font-size:var(--text-xl);font-weight:var(--weight-medium);color:var(--color-text);letter-spacing:.14em}.nb-link[data-v-0b06fca3]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text}.nb-copy.is-copied[data-v-0b06fca3]{color:var(--color-success);border-color:var(--color-success-bd)}.nb-status[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.nb-status-text[data-v-0b06fca3]{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--color-text-muted);flex:1}.nb-countdown[data-v-0b06fca3]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);font-variant-numeric:tabular-nums}.actions[data-v-0b06fca3]{display:flex;justify-content:flex-end;gap:var(--space-3);padding-top:var(--space-4)}@media(max-width:640px){.center-body[data-v-0b06fca3],.nb[data-v-0b06fca3]{overflow-y:auto;-webkit-overflow-scrolling:touch}.nb-code-row[data-v-0b06fca3],.nb-status[data-v-0b06fca3],.actions[data-v-0b06fca3]{flex-wrap:wrap}.nb-code[data-v-0b06fca3]{min-width:0;overflow-wrap:anywhere;letter-spacing:.08em}.nb-copy[data-v-0b06fca3]{min-height:34px}.nb-primary[data-v-0b06fca3]{min-height:44px}.nb-status-text[data-v-0b06fca3]{min-width:0}}.pf-form[data-v-ac0597e3]{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-4) var(--space-4) var(--space-5);border-top:.5px solid var(--color-line)}.pf-guard[data-v-ac0597e3] .ui-banner__text{display:flex;align-items:center;gap:var(--space-2);width:100%}.pf-guard .msg[data-v-ac0597e3]{flex:1}.pf-field[data-v-ac0597e3]{display:flex;flex-direction:column;gap:6px}.pf-key-wrap[data-v-ac0597e3]{position:relative}.pf-key-wrap[data-v-ac0597e3] .ui-input{padding-right:calc(var(--icon-button-sm) + var(--space-2))}.pf-key-eye[data-v-ac0597e3]{position:absolute;right:var(--space-1);top:50%;transform:translateY(-50%)}.pf-field-label[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.req[data-v-ac0597e3]{color:var(--color-danger)}.pf-models[data-v-ac0597e3]{display:flex;flex-direction:column;gap:var(--space-2)}.pf-model-grid[data-v-ac0597e3]{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,2fr) auto;gap:var(--space-2);align-items:center}.pf-model-head span[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.pf-models-empty[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.pf-foot[data-v-ac0597e3]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-4);border-top:.5px solid var(--color-line)}.pf-foot .spacer[data-v-ac0597e3]{flex:1}.pf-confirm-msg[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-danger)}.pf-managed-note[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}@media(max-width:640px){.pf-model-grid[data-v-ac0597e3]{grid-template-columns:minmax(0,1fr) auto}}.af[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4) var(--space-4) var(--space-5);border-top:.5px solid var(--color-line)}.af-guard[data-v-9e5ec0a8] .ui-banner__text{display:flex;align-items:center;gap:var(--space-2);width:100%}.af-guard .msg[data-v-9e5ec0a8]{flex:1}.af-catalog[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:var(--space-3)}.af-center[data-v-9e5ec0a8]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-4) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.af-error[data-v-9e5ec0a8]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-2)}.af-list[data-v-9e5ec0a8]{display:flex;flex-direction:column;max-height:320px;overflow-y:auto;border:.5px solid var(--color-line);border-radius:var(--radius-md)}.af-list[data-v-9e5ec0a8]>*+*{border-top:.5px solid var(--color-line)}.af-entry[data-v-9e5ec0a8]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:34px;padding:var(--space-1) var(--space-3);border:none;background:transparent;text-align:left;font-family:var(--font-ui);color:var(--color-text);cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.af-entry[data-v-9e5ec0a8]:hover:not(:disabled){background:var(--color-hover)}.af-entry[data-v-9e5ec0a8]:disabled{cursor:not-allowed;opacity:.55}.af-entry-name[data-v-9e5ec0a8]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-medium)}.af-entry .grow[data-v-9e5ec0a8]{flex:1;min-width:0}.af-entry-count[data-v-9e5ec0a8],.af-entry-reason[data-v-9e5ec0a8]{flex:none;font-size:var(--text-xs);color:var(--color-text-faint);white-space:nowrap}.af-empty[data-v-9e5ec0a8]{padding:var(--space-4);text-align:center;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm)}.af-import[data-v-9e5ec0a8],.af-registry[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:var(--space-4)}.af-hint[data-v-9e5ec0a8]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.af-back[data-v-9e5ec0a8]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:flex-start;padding:0;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer;transition:color var(--duration-fast) var(--ease-out)}.af-back[data-v-9e5ec0a8]:hover{color:var(--color-text)}.af-field[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:6px}.af-label[data-v-9e5ec0a8]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.req[data-v-9e5ec0a8]{color:var(--color-danger)}.af-key-wrap[data-v-9e5ec0a8]{position:relative}.af-key-wrap[data-v-9e5ec0a8] .ui-input{padding-right:calc(var(--icon-button-sm) + var(--space-2))}.af-key-eye[data-v-9e5ec0a8]{position:absolute;right:var(--space-1);top:50%;transform:translateY(-50%)}.af-note[data-v-9e5ec0a8]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.af-foot[data-v-9e5ec0a8]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding-top:var(--space-4);border-top:.5px solid var(--color-line)}.af-manual[data-v-9e5ec0a8] .pf-form{padding:0;border-top:none}.pp[data-v-9aa0e3a8]{display:flex;flex-direction:column}.pp-head[data-v-9aa0e3a8]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.pp-title[data-v-9aa0e3a8]{margin:0;font-family:var(--font-ui);font-size:var(--text-lg);font-weight:var(--weight-medium);color:var(--color-text)}.pp-loading[data-v-9aa0e3a8]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-4) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.pp-group[data-v-9aa0e3a8]{overflow:hidden;border:.5px solid var(--color-line);border-radius:var(--radius-xl);background:var(--color-surface-raised)}.pp-group[data-v-9aa0e3a8]:has(.ui-select.is-open){position:relative;z-index:var(--z-dropdown);overflow:visible}.pp-group[data-v-9aa0e3a8]>*+*{border-top:.5px solid var(--color-line)}.pp-row[data-v-9aa0e3a8]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:40px;padding:var(--space-2) var(--space-4);border:none;background:transparent;text-align:left;font-family:var(--font-ui);color:var(--color-text);cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.pp-row[data-v-9aa0e3a8]:hover{background:var(--color-hover)}.pp-item.open>.pp-row[data-v-9aa0e3a8]{background:var(--color-surface-sunken)}.pp-row .grow[data-v-9aa0e3a8]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-2)}.pp-id[data-v-9aa0e3a8]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pp-count[data-v-9aa0e3a8]{flex:none;font-size:var(--text-xs);color:var(--color-text-faint);white-space:nowrap}.pp-chev[data-v-9aa0e3a8]{display:inline-flex;flex:none;color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.pp-item.open .pp-chev[data-v-9aa0e3a8]{transform:rotate(90deg)}.pp-add-row[data-v-9aa0e3a8]{gap:var(--space-2);color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.pp-acc[data-v-9aa0e3a8]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.pp-item.open>.pp-acc[data-v-9aa0e3a8]{grid-template-rows:1fr}.pp-acc-in[data-v-9aa0e3a8]{overflow:hidden;min-height:0}.pp-item.open .pp-acc-in[data-v-9aa0e3a8]{overflow:visible}.pp-item.flash>.pp-row[data-v-9aa0e3a8]{animation:pp-flash-9aa0e3a8 1.2s var(--ease-out)}@keyframes pp-flash-9aa0e3a8{0%{background:var(--color-accent-soft)}to{background:transparent}}.pp-empty[data-v-9aa0e3a8]{padding:var(--space-5) var(--space-4);color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);text-align:center}.sec[data-v-5711dff8]{margin-bottom:var(--space-5)}.sec-title[data-v-5711dff8]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);margin:0 0 var(--space-3)}.pu-group[data-v-5711dff8]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.pu-row[data-v-5711dff8]{display:flex;align-items:center;gap:var(--space-3);min-height:52px;padding:var(--space-3) var(--space-4)}.pu-main[data-v-5711dff8]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pu-label[data-v-5711dff8]{font-size:var(--text-sm);color:var(--color-text)}.pu-hint[data-v-5711dff8]{font-size:var(--text-xs);color:var(--color-text-faint)}.sec[data-v-f39cdded]{margin-bottom:var(--space-5)}.sec-title[data-v-f39cdded]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);margin:0 0 var(--space-3)}.pu-group[data-v-f39cdded]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.pu-row[data-v-f39cdded]{display:flex;align-items:center;gap:var(--space-3);min-height:52px;padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.pu-row[data-v-f39cdded]:first-child{border-top:none}.pu-state[data-v-f39cdded]{color:var(--color-text-muted);font-size:var(--text-sm)}.pu-error-text[data-v-f39cdded]{flex:1;min-width:0}.pu-empty[data-v-f39cdded]{color:var(--color-text-faint)}.pu-main[data-v-f39cdded]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pu-label[data-v-f39cdded]{font-size:var(--text-sm);color:var(--color-text)}.pu-hint[data-v-f39cdded]{font-size:var(--text-xs);color:var(--color-text-faint)}.pu-value[data-v-f39cdded]{flex:none;font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);font-variant-numeric:tabular-nums;white-space:nowrap}.pu-value-sub[data-v-f39cdded]{font-weight:var(--weight-regular);color:var(--color-text-faint)}.pu-meter[data-v-f39cdded]{flex:none;width:120px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden}.pu-meter i[data-v-f39cdded]{display:block;height:100%;border-radius:var(--radius-full);background:var(--color-accent);transition:width var(--duration-base) var(--ease-out)}.pu-meter i.sev-warn[data-v-f39cdded]{background:var(--color-warning)}.pu-meter i.sev-danger[data-v-f39cdded]{background:var(--color-danger)}.sm-picker[data-v-eb75e643]{position:relative;width:100%;font-family:var(--font-ui)}.sm-picker__trigger[data-v-eb75e643]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:38px;padding:0 var(--space-3);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out)}.sm-picker__trigger[data-v-eb75e643]:focus-visible,.sm-picker.is-open .sm-picker__trigger[data-v-eb75e643]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.sm-picker__value[data-v-eb75e643]{min-width:0;flex:1;display:flex;align-items:center;overflow:hidden;white-space:nowrap}.sm-picker__value-text[data-v-eb75e643]{min-width:0;overflow:hidden;text-overflow:ellipsis}.sm-picker__value.is-placeholder[data-v-eb75e643]{color:var(--color-text-faint)}.sm-picker__chevron[data-v-eb75e643]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-base) var(--ease-out)}.sm-picker.is-open .sm-picker__chevron[data-v-eb75e643]{transform:rotate(180deg)}.sm-picker__menu[data-v-eb75e643]{position:fixed;z-index:var(--z-modal-dropdown);width:252px;max-width:calc(100vw - 64px);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__models[data-v-eb75e643]{max-height:280px;overflow-y:auto;padding:var(--space-1);border-radius:var(--radius-md)}.sm-picker__flyout[data-v-eb75e643]{position:absolute;width:180px;max-height:280px;overflow-y:auto;padding:var(--space-1);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__flyout--right[data-v-eb75e643]{left:calc(100% + var(--space-1))}.sm-picker__flyout--left[data-v-eb75e643]{right:calc(100% + var(--space-1))}.sm-picker__group[data-v-eb75e643]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.sm-picker__option[data-v-eb75e643]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.sm-picker__option.is-active[data-v-eb75e643]{background:var(--color-hover);color:var(--color-text-strong)}.sm-picker__option.is-muted[data-v-eb75e643]{color:var(--color-text-muted)}.sm-picker__option-label[data-v-eb75e643]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm-picker__check[data-v-eb75e643]{flex:none;color:transparent}.sm-picker__option.is-selected .sm-picker__check[data-v-eb75e643]{color:var(--color-accent)}.sm-picker__flyout-caret[data-v-eb75e643]{flex:none;margin-left:auto;color:var(--color-text-faint)}.sd[data-v-ca0381a0]{display:grid;grid-template-columns:148px 1fr;grid-template-areas:"tabs region";min-height:0;height:100%;user-select:none}.sd[data-v-ca0381a0] :is(input,textarea,[contenteditable=true]){user-select:text}.settings-region[data-v-ca0381a0]{display:flex;min-width:0;min-height:0;flex-direction:column;grid-area:region}.settings-region-header[data-v-ca0381a0],.settings-tabs-header[data-v-ca0381a0]{display:flex;align-items:center;height:calc(var(--space-4) + var(--icon-button-sm) + var(--space-2));box-sizing:border-box}.settings-region-header[data-v-ca0381a0]{justify-content:flex-end;padding-right:var(--space-5)}.settings-tabs-header[data-v-ca0381a0]{padding-inline:var(--space-3)}.settings-dialog-title[data-v-ca0381a0]{margin:0;font-family:var(--font-ui);font-size:var(--text-lg);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text)}.settings-tabs[data-v-ca0381a0]{display:flex;flex-direction:column;width:148px;padding:0 var(--space-2) var(--space-2);gap:2px;overflow-y:auto;border-right:.5px solid var(--color-line);grid-area:tabs}.settings-tab-list[data-v-ca0381a0]{display:flex;flex-direction:column;gap:2px}.tab[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-2);text-align:left;padding:8px 10px;border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-ui-strong);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.tab[data-v-ca0381a0]:hover{background:var(--color-hover);color:var(--color-text-strong)}.tab.on[data-v-ca0381a0]{background:var(--color-hover);color:var(--color-text)}.tab[data-v-ca0381a0]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.body[data-v-ca0381a0]{display:flex;flex-direction:column;overflow-y:auto;padding:var(--space-2) 32px var(--space-5);flex:1;min-width:0}.body[data-v-ca0381a0]::-webkit-scrollbar{width:4px}.body[data-v-ca0381a0]::-webkit-scrollbar-track{background:transparent}.body[data-v-ca0381a0]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.body.scrolling[data-v-ca0381a0]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.body.scrolling[data-v-ca0381a0]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.panel[data-v-ca0381a0]{display:block}.sec[data-v-ca0381a0]{padding:var(--space-4) 0}.panel>.sec[data-v-ca0381a0]:first-child{padding-top:0}.sec-head[data-v-ca0381a0]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.sec-title[data-v-ca0381a0]{margin:0 0 var(--space-3);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);letter-spacing:0;color:var(--color-text)}.notification-settings[data-v-ca0381a0]{user-select:none}.sec-head .sec-title[data-v-ca0381a0]{margin-bottom:0}.row[data-v-ca0381a0]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:38px;padding:var(--space-1) 0}.settings-group[data-v-ca0381a0]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.settings-group[data-v-ca0381a0]:has(.ui-select.is-open){position:relative;z-index:var(--z-dropdown);overflow:visible}.settings-group>.row[data-v-ca0381a0]{min-height:52px;padding:var(--space-4);border-top:.5px solid var(--color-line)}.settings-group>.row[data-v-ca0381a0]:first-child{border-top:none}.settings-group>.empty-config[data-v-ca0381a0]{padding:var(--space-3)}.account-row[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4)}.account-avatar[data-v-ca0381a0]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--color-surface-sunken);color:var(--color-text-muted)}.account-avatar img[data-v-ca0381a0]{width:100%;height:100%;border-radius:50%;object-fit:cover}.account-name-row[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-2);min-width:0}.account-level[data-v-ca0381a0]{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}.account-meta[data-v-ca0381a0]{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.account-name[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-sub[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rlabel[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);font-weight:var(--weight-option-label);display:flex;flex-direction:column;gap:0}.rvalue[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted);max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rvalue.mono[data-v-ca0381a0]{font-family:var(--font-mono);font-size:var(--text-xs)}.hint[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);color:var(--color-text-faint)}.body[data-v-ca0381a0] .ui-seg,.body[data-v-ca0381a0] .ui-select__trigger,.body[data-v-ca0381a0] .ui-button,.archive-search[data-v-ca0381a0]{border-width:.5px}.select-wrap[data-v-ca0381a0]{min-width:220px;max-width:min(320px,50vw);flex:none}.empty-config[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:var(--space-1) 0}@media(max-width:640px){.sd[data-v-ca0381a0]{grid-template-columns:1fr;grid-template-rows:auto 1fr;grid-template-areas:"tabs" "region"}.settings-tabs[data-v-ca0381a0]{width:auto;padding:0;overflow-x:visible;border-right:none;border-bottom:.5px solid var(--color-line)}.settings-tabs-header[data-v-ca0381a0]{padding:var(--space-3)}.settings-tab-list[data-v-ca0381a0]{flex-direction:row;gap:var(--space-1);overflow-x:auto;padding:0 var(--space-3) var(--space-2)}.settings-region-header[data-v-ca0381a0]{padding:var(--space-3)}.body[data-v-ca0381a0]{padding-inline:var(--space-3)}.tab[data-v-ca0381a0]{white-space:nowrap;flex:none}.row[data-v-ca0381a0]{align-items:flex-start;flex-direction:column}.settings-group[data-v-ca0381a0]{margin-inline:0}.select-wrap[data-v-ca0381a0]{width:100%;max-width:none}}.setting-card[data-v-ca0381a0]{border-radius:var(--radius-xl);overflow:hidden;background:var(--color-surface)}.panel-head[data-v-ca0381a0]{margin-bottom:var(--space-4)}.panel-title[data-v-ca0381a0]{margin:0 0 var(--space-2);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);letter-spacing:0;color:var(--color-text)}.panel-desc[data-v-ca0381a0]{margin:0;font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--color-text-muted);max-width:560px}.archive-toolbar[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-4);flex-wrap:wrap}.archive-search[data-v-ca0381a0]{flex:1;min-width:200px;height:36px;display:flex;align-items:center;gap:var(--space-2);padding:0 var(--space-3);border-radius:var(--radius-md);border:.5px solid var(--color-line);color:var(--color-text-faint);font-size:var(--text-xs);background:var(--color-surface-overlay);transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.archive-search[data-v-ca0381a0]:focus-within{border-color:var(--color-accent);box-shadow:var(--p-focus-ring);color:var(--color-text-muted)}.archive-search svg[data-v-ca0381a0]{width:15px;height:15px;flex:none}.archive-search input[data-v-ca0381a0]{width:100%;border:none;outline:none;background:transparent;font:inherit;color:var(--color-text)}.archive-list[data-v-ca0381a0]{display:flex;flex-direction:column;gap:var(--space-4)}.archive-card .setting-card[data-v-ca0381a0]{margin-bottom:0}.archive-workspace[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-2);margin:0 2px var(--space-2);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.archive-workspace svg[data-v-ca0381a0]{width:16px;height:16px;color:var(--color-text-faint);flex:none}.archive-workspace .path[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-workspace .count[data-v-ca0381a0]{margin-left:auto;color:var(--color-text-faint);font-weight:var(--weight-medium);font-size:var(--text-xs);flex:none}.archive-row[data-v-ca0381a0]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-3);align-items:center;padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.archive-row[data-v-ca0381a0]:first-child{border-top:none}.archive-row[data-v-ca0381a0]:hover{background:var(--color-hover)}.archive-meta[data-v-ca0381a0]{min-width:0}.archive-name[data-v-ca0381a0]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-time[data-v-ca0381a0]{margin-top:2px;font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui)}.archive-draining[data-v-ca0381a0]{margin-bottom:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);background:var(--color-accent-soft);color:var(--color-accent-hover);font-size:var(--text-xs)}.archive-empty[data-v-ca0381a0]{padding:var(--space-6) var(--space-4);border-radius:var(--radius-xl);color:var(--color-text-faint);font-size:var(--text-xs);text-align:center;background:var(--color-surface)}@media(max-width:640px){.archive-toolbar[data-v-ca0381a0]{flex-direction:column;align-items:stretch}.archive-search[data-v-ca0381a0]{min-width:0}}[data-v-ca0381a0] .ui-dialog{width:min(980px,96vw)}[data-v-ca0381a0] .ui-dialog--fixed-height{height:min(780px,calc(100vh - var(--space-8) * 2))}.aw[data-v-fea98be5]{padding-top:4px}.crumbbar[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) 22px;border-bottom:.5px solid var(--color-line)}.crumbs[data-v-fea98be5]{display:flex;align-items:center;flex-wrap:wrap;gap:1px;min-width:0;font-size:var(--text-sm)}.crumb-sep[data-v-fea98be5]{color:var(--color-text-muted)}.crumb[data-v-fea98be5]{background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:1px var(--space-1);border-radius:var(--radius-xs)}.crumb[data-v-fea98be5]:hover{color:var(--color-text);background:var(--color-hover)}.crumb.last[data-v-fea98be5]{color:var(--color-text);font-weight:var(--weight-medium)}.filterbar[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) 22px;border-bottom:.5px solid var(--color-line)}.filter-icon[data-v-fea98be5]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.filter-input[data-v-fea98be5]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-base);padding:var(--space-1) 0;border:none;background:none;color:var(--color-text);outline:none}.filter-input[data-v-fea98be5]::placeholder{color:var(--color-text-muted)}.search-rel[data-v-fea98be5]{color:var(--color-text)}.folder-list[data-v-fea98be5]{height:300px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.fl-loading[data-v-fea98be5],.fl-empty[data-v-fea98be5]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.folder-row[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);text-align:left;padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);transition:background var(--duration-fast) var(--ease-out)}.folder-row[data-v-fea98be5]:hover{background:var(--color-hover)}.dir-icon[data-v-fea98be5]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.folder-name[data-v-fea98be5]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text)}.paste-section[data-v-fea98be5]{padding:var(--space-3) 22px;border-top:.5px solid var(--color-line)}.paste-section.paste-only[data-v-fea98be5]{border-top:none}.paste-row[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2)}.paste-input-wrap[data-v-fea98be5]{flex:1;min-width:0}.add-error[data-v-fea98be5]{margin:0 22px var(--space-2);padding:var(--space-2) var(--space-3);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-danger);background:var(--color-danger-soft);border:.5px solid var(--color-danger-bd);border-radius:var(--radius-sm)}.actions[data-v-fea98be5]{display:flex;justify-content:flex-end;gap:var(--space-2);padding:var(--space-3) 22px}.footer-hint[data-v-fea98be5]{padding:var(--space-2) var(--space-4);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint);border-top:.5px solid var(--color-line)}@media(max-width:640px){.folder-row[data-v-fea98be5]{min-height:44px}.crumbbar[data-v-fea98be5]{align-items:flex-start}.actions[data-v-fea98be5]{flex-wrap:wrap}}.confirm-dialog__message[data-v-aa5422da]{margin:0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.rows[data-v-340d1b31]{margin:0;padding:0}.row[data-v-340d1b31]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) 0;font-size:var(--text-base)}.row dt[data-v-340d1b31]{width:96px;flex:none;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:var(--text-xs)}.row dd[data-v-340d1b31]{margin:0;color:var(--color-text);font-weight:var(--weight-medium);display:flex;align-items:center;gap:var(--space-2);min-width:0}.row dd.plan-on[data-v-340d1b31],.row dd.swarm-on[data-v-340d1b31]{color:var(--color-accent)}.ctx-text[data-v-340d1b31]{flex:none}.bar[data-v-340d1b31]{width:80px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.bar i[data-v-340d1b31]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.rows[data-v-340d1b31]{overflow-y:auto;-webkit-overflow-scrolling:touch}.row[data-v-340d1b31]{align-items:flex-start;flex-direction:column;gap:var(--space-1);min-height:48px}.row dt[data-v-340d1b31]{width:auto}.row dd[data-v-340d1b31]{max-width:100%;flex-wrap:wrap}}.toasts[data-v-ac44e9ef]{position:fixed;right:16px;bottom:84px;display:flex;flex-direction:column;gap:var(--space-2);z-index:var(--z-toast);width:min(440px,calc(100vw - 32px));max-height:56vh;overflow-y:auto}.toast-enter-active[data-v-ac44e9ef],.toast-leave-active[data-v-ac44e9ef]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.toast-enter-from[data-v-ac44e9ef],.toast-leave-to[data-v-ac44e9ef]{opacity:0;transform:translate(16px)}.toast-move[data-v-ac44e9ef]{transition:transform var(--duration-base) var(--ease-out)}.actions[data-v-ac44e9ef]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}.link[data-v-ac44e9ef]{border:0;padding:0;background:none;color:var(--color-accent);cursor:pointer;font:inherit;font-size:var(--ui-font-size-xs)}.link[data-v-ac44e9ef]:hover{text-decoration:underline}.details[data-v-ac44e9ef]{display:grid;gap:5px;margin:8px 0 0;padding:8px;border:.5px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken)}.detail-row[data-v-ac44e9ef]{display:grid;grid-template-columns:minmax(88px,.34fr) minmax(0,1fr);gap:8px}.detail-row dt[data-v-ac44e9ef]{color:var(--color-text-muted)}.detail-row dd[data-v-ac44e9ef]{margin:0;color:var(--color-text);overflow-wrap:anywhere;white-space:pre-wrap}@media(max-width:640px){.toasts[data-v-ac44e9ef]{left:12px;right:12px;bottom:calc(var(--dock-h, 76px) + 8px);width:auto;max-height:50vh}.detail-row[data-v-ac44e9ef]{grid-template-columns:1fr;gap:2px}}.topbar[data-v-7f357087]{display:flex;align-items:center;gap:10px;height:calc(50px + var(--safe-top));flex:none;padding:var(--safe-top) max(12px,var(--safe-right)) 0 max(12px,var(--safe-left));border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui)}.wsq[data-v-7f357087]{flex:none;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-text);color:var(--color-bg);display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-weight:var(--weight-medium);font-size:var(--ui-font-size-sm)}.tb-mid[data-v-7f357087]{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:center;gap:1px;background:none;border:none;padding:0;cursor:pointer;text-align:left}.tb-path[data-v-7f357087]{display:flex;align-items:center;gap:5px;font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .ws[data-v-7f357087]{color:var(--color-text)}.tb-path .sl[data-v-7f357087]{color:var(--color-text-faint)}.tb-path .se[data-v-7f357087]{color:var(--color-text);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .cv[data-v-7f357087]{color:var(--color-text-faint);flex:none}.tb-sub[data-v-7f357087]{display:flex;align-items:center;gap:5px;font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-sub .rd[data-v-7f357087]{flex:none;width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-text-faint)}.tb-sub .rd.on[data-v-7f357087]{background:var(--color-success)}.topbar .tb-path[data-v-7f357087]{font-family:var(--sans)}.sheet-root[data-v-c3d5dadc]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;flex-direction:column;justify-content:flex-end}.sheet-scrim[data-v-c3d5dadc]{position:absolute;inset:0;background:#0d111773}.sheet-panel[data-v-c3d5dadc]{position:relative;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-bottom:none;border-radius:var(--radius-xl) var(--radius-xl) 0 0;box-shadow:var(--shadow-xl);max-height:86vh;display:flex;flex-direction:column;min-height:0;font-family:var(--font-ui);color:var(--color-text)}.sheet-grab[data-v-c3d5dadc]{flex:none;align-self:center;width:56px;height:18px;padding:0;border:none;background:none;cursor:pointer;position:relative;margin-top:4px}.sheet-grab[data-v-c3d5dadc]:after{content:"";position:absolute;left:50%;top:7px;transform:translate(-50%);width:38px;height:5px;border-radius:var(--radius-full);background:var(--color-line)}.sheet-head[data-v-c3d5dadc]{flex:none;display:flex;align-items:center;justify-content:space-between;padding:6px 16px 10px}.sheet-title[data-v-c3d5dadc]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.sheet-body[data-v-c3d5dadc]{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:max(16px,var(--safe-bottom))}.sheet-enter-active[data-v-c3d5dadc],.sheet-leave-active[data-v-c3d5dadc]{transition:opacity var(--duration-slow) var(--ease-out)}.sheet-enter-active .sheet-panel[data-v-c3d5dadc],.sheet-leave-active .sheet-panel[data-v-c3d5dadc]{transition:transform var(--duration-slow) var(--ease-out)}.sheet-enter-from[data-v-c3d5dadc],.sheet-leave-to[data-v-c3d5dadc]{opacity:0}.sheet-enter-from .sheet-panel[data-v-c3d5dadc],.sheet-leave-to .sheet-panel[data-v-c3d5dadc]{transform:translateY(102%)}.newrow[data-v-67278201]{display:flex;align-items:center;gap:10px;width:100%;padding:var(--space-3) var(--space-4);background:none;border:none;border-radius:var(--radius-md);color:var(--color-accent);font-weight:500;font-size:var(--text-base);cursor:pointer;text-align:left}.newrow[data-v-67278201]:hover{background:var(--color-hover)}.newrow[data-v-67278201]:active{background:var(--color-surface-sunken)}.newrow.secondary[data-v-67278201]{padding-top:var(--space-2);padding-bottom:var(--space-2);color:var(--color-text-muted);font-weight:400}.newrow.secondary[data-v-67278201]:hover{background:var(--color-hover)}.newrow.secondary[data-v-67278201]:active{background:var(--color-surface-sunken);color:var(--color-text)}.mlist[data-v-67278201]{--m-pad: 16px;--m-gutter: 15px;--m-gap: 8px;--m-indent: calc(var(--m-pad) + var(--m-gutter) + var(--m-gap));padding-bottom:var(--space-1)}.mempty[data-v-67278201]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-faint);font-size:var(--ui-font-size)}.mempty.small[data-v-67278201]{padding:10px 16px 12px var(--m-indent);text-align:left;font-size:var(--ui-font-size-xs)}.mgroup[data-v-67278201]{padding-top:2px}.mgh[data-v-67278201]{display:flex;align-items:center;gap:var(--m-gap);padding:10px var(--m-pad) 6px;border-radius:var(--radius-md);cursor:pointer;user-select:none;position:relative}.mgh[data-v-67278201]:hover{background:var(--color-hover)}.mgh[data-v-67278201]:active{background:var(--color-surface-sunken)}.mgh-folder[data-v-67278201]{flex:none;color:var(--color-text-muted)}.mgh-main[data-v-67278201]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.mgh-name[data-v-67278201]{font-size:var(--ui-font-size-lg);font-weight:550;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-path[data-v-67278201]{font-size:var(--text-base);font-weight:425;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-add[data-v-67278201]{margin:-10px -12px -10px 0}.mgh-add[data-v-67278201]:active{color:var(--color-text);background:var(--color-hover)}.mgh-more[data-v-67278201]{margin:-10px -8px}.mgh-more[data-v-67278201]:active{color:var(--color-text);background:var(--color-hover)}.srow[data-v-67278201]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--m-pad) var(--space-3) var(--m-indent);border-radius:var(--radius-md);cursor:pointer;position:relative}.srow[data-v-67278201]:hover{background:var(--color-hover)}.srow[data-v-67278201]:active{background:var(--color-surface-sunken)}.srow.cur[data-v-67278201]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.srow .m[data-v-67278201]{flex:1;min-width:0}.srow .m .t[data-v-67278201]{font-size:var(--text-base);font-weight:450;line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow.cur .m .t[data-v-67278201]{color:var(--color-accent-hover)}.srow .m .t.run[data-v-67278201]{position:relative}.srow .m .t.run[data-v-67278201]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-accent);animation:mRunPulse-67278201 1.4s ease-in-out infinite}@keyframes mRunPulse-67278201{0%,to{opacity:1}50%{opacity:.35}}.srow .m .t.aborted[data-v-67278201]{position:relative}.srow .m .t.aborted[data-v-67278201]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-danger)}.srow .m .s[data-v-67278201]{font-size:var(--text-base);font-weight:475;font-variant-numeric:tabular-nums;color:var(--color-text-faint);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att[data-v-67278201]{flex:none;font-family:var(--font-mono);font-size:max(9px,calc(var(--ui-font-size) - 4px));color:var(--color-text-on-accent);background:var(--color-warning);border-radius:var(--radius-full);padding:1px 7px}.srow .kb[data-v-67278201]:active{color:var(--color-text);background:var(--color-hover)}.kmenu[data-v-67278201]{position:absolute;right:12px;top:44px;z-index:var(--z-dropdown);min-width:96px;overflow:hidden}.wsmenu[data-v-67278201]{top:calc(100% - 4px);right:var(--m-pad);min-width:132px}.mshow-more-row[data-v-67278201]{display:flex;align-items:center;padding-left:calc(var(--m-indent) - var(--space-3))}.mshow-more[data-v-67278201]{display:flex;align-items:center;gap:var(--space-2);min-height:44px;padding:var(--space-1) var(--space-3);background:none;border:none;border-radius:var(--radius-md);color:var(--color-text-muted);font-size:var(--text-base);cursor:pointer;text-align:left}.mshow-more[data-v-67278201]:active{color:var(--color-accent-hover);background:var(--color-hover)}.mshow-more-sep[data-v-67278201]{margin:0 var(--space-1);color:var(--color-text-faint);user-select:none}.newrow[data-v-67278201]{font-family:var(--sans)}.mlist .srow[data-v-67278201]{margin:1px 8px;border-radius:var(--radius-md);border-bottom:none;padding:12px calc(var(--m-pad, 16px) - 8px) 12px calc(var(--m-indent, 39px) - 8px)}.mlist .srow.cur[data-v-67278201]{box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.group-title[data-v-81e94fd3]{padding:var(--space-3) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-faint)}.srow[data-v-81e94fd3]:disabled{opacity:.5;cursor:not-allowed}.srow[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:52px;padding:var(--space-3);background:none;border:none;border-radius:var(--radius-md);cursor:pointer;text-align:left;color:var(--color-text)}.srow[data-v-81e94fd3]:hover:not(.read-only){background:var(--color-hover)}.srow[data-v-81e94fd3]:active:not(.read-only){background:var(--color-surface-sunken)}.srow.read-only[data-v-81e94fd3]{cursor:default}.srow-main[data-v-81e94fd3]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.srow-label[data-v-81e94fd3]{font-size:var(--text-base);color:var(--color-text)}.srow-sub[data-v-81e94fd3]{font-size:var(--text-base);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow-val[data-v-81e94fd3]{flex:none;font-family:var(--font-mono);font-size:var(--ui-font-size);font-weight:500;color:var(--color-accent-hover)}.srow-val.dim[data-v-81e94fd3]{font-weight:400;color:var(--color-text-muted)}.cache-note[data-v-81e94fd3]{padding:0 var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);line-height:1.4}.chev[data-v-81e94fd3]{flex:none;color:var(--color-text-faint);font-size:17px;line-height:1}.toggle[data-v-81e94fd3]{flex:none;width:44px;height:26px;border-radius:var(--radius-full);background:var(--color-line);position:relative;transition:background .18s}.toggle.on[data-v-81e94fd3]{background:var(--color-accent)}.toggle[data-v-81e94fd3]:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:var(--radius-full);box-sizing:border-box;background:var(--color-bg);border:.5px solid var(--color-line);box-shadow:var(--shadow-xs);transition:left .18s}.toggle.on[data-v-81e94fd3]:after{left:21px}.srow.pref[data-v-81e94fd3]{cursor:default}.srow.acct.in .srow-label[data-v-81e94fd3]{color:var(--color-accent-hover);font-weight:500}.srow.acct.out .srow-label[data-v-81e94fd3]{color:var(--color-danger)}.acct-avatar[data-v-81e94fd3]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--color-surface-sunken);color:var(--color-text-muted)}.acct-avatar img[data-v-81e94fd3]{width:100%;height:100%;border-radius:50%;object-fit:cover}.acct-name-row[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-2);min-width:0}.acct-name-row .srow-label[data-v-81e94fd3]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.acct-level[data-v-81e94fd3]{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}.ctx-meter[data-v-81e94fd3]{flex:none;width:96px;height:7px;border-radius:var(--radius-full);background:var(--color-surface-sunken);overflow:hidden}.ctx-meter i[data-v-81e94fd3]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.srow[data-v-81e94fd3]{align-items:flex-start;gap:10px;min-width:0;padding:14px max(14px,var(--safe-right)) 14px max(14px,var(--safe-left))}.group-title[data-v-81e94fd3],.cache-note[data-v-81e94fd3]{padding-left:max(14px,var(--safe-left));padding-right:max(14px,var(--safe-right))}.srow-main[data-v-81e94fd3]{flex:1 1 auto}.srow-sub[data-v-81e94fd3]{white-space:normal;overflow-wrap:anywhere}.srow.pref[data-v-81e94fd3]{flex-wrap:wrap}.srow.pref .srow-main[data-v-81e94fd3]{flex:1 0 100%}.srow-val[data-v-81e94fd3],.chev[data-v-81e94fd3],.toggle[data-v-81e94fd3],.ctx-meter[data-v-81e94fd3]{margin-top:2px}}.srow[data-v-81e94fd3],.srow-sub[data-v-81e94fd3],.srow-val[data-v-81e94fd3],.cache-note[data-v-81e94fd3]{font-family:var(--sans)}.arch-subhead[data-v-81e94fd3]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-2) var(--space-3) var(--space-1)}.arch-back[data-v-81e94fd3]{display:inline-flex;align-items:center;gap:2px;border:none;background:none;padding:var(--space-1) var(--space-2) var(--space-1) 0;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-accent-hover);cursor:pointer}.chev.back[data-v-81e94fd3]{font-size:20px}.arch-count[data-v-81e94fd3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.arch-tools[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);flex-wrap:wrap}.arch-search-input[data-v-81e94fd3]{flex:1;min-width:160px}.arch-row[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-3);min-height:56px;padding:var(--space-2) var(--space-3);border-top:.5px solid var(--color-line)}.arch-row[data-v-81e94fd3]:first-of-type{border-top:none}.arch-meta[data-v-81e94fd3]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.arch-name[data-v-81e94fd3]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arch-time[data-v-81e94fd3]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.arch-empty[data-v-81e94fd3]{padding:var(--space-6) var(--space-4);text-align:center;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.brand-logo[data-v-f04205a8]{display:block;flex:none;cursor:pointer;user-select:none;touch-action:manipulation}.ls-cards[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-3)}.ls-card[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);width:100%;padding:var(--space-4);background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);font-family:var(--font-ui);text-align:left;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.ls-card[data-v-1ff21828]:hover{border-color:var(--color-line-strong);background:var(--color-surface)}.ls-card[data-v-1ff21828]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ls-card-logo[data-v-1ff21828]{align-self:flex-start}.ls-card-icon[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;color:var(--color-text-muted)}.ls-card-text[data-v-1ff21828]{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-1)}.ls-card-title[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-lg);font-weight:var(--weight-medium);color:var(--color-text)}.ls-reco[data-v-1ff21828]{padding:2px var(--space-2);border-radius:var(--radius-full);background:var(--color-accent-soft);color:var(--color-accent);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ls-card-hint[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.ls-card-chevron[data-v-1ff21828]{color:var(--color-text-faint);flex:none}.ls-done-card[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4);background:var(--color-surface-raised);border:.5px solid var(--color-success-bd);border-radius:var(--radius-lg)}.ls-done-badge[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-full);background:var(--color-success-soft);color:var(--color-success);flex:none}.ls-flow[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-4)}.ls-center[data-v-1ff21828]{display:flex;flex-direction:column;align-items:center;gap:var(--space-3);padding:var(--space-6) 0 var(--space-2);text-align:center}.ls-center-text[data-v-1ff21828]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.ls-success-text[data-v-1ff21828]{color:var(--color-success)}.ls-err-text[data-v-1ff21828]{color:var(--color-danger)}.ls-warn-text[data-v-1ff21828]{color:var(--color-warning)}.ls-center-hint[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted)}.ls-device[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-4)}.ls-lead[data-v-1ff21828]{font-size:var(--text-base);color:var(--color-text);line-height:var(--leading-normal)}.ls-primary[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);width:100%;min-height:40px;padding:0 var(--space-4);background:var(--color-accent);color:var(--color-text-on-accent);border:.5px solid var(--color-accent);border-radius:var(--radius-md);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);cursor:pointer;text-decoration:none;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out)}.ls-primary[data-v-1ff21828]:hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ls-or[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);color:var(--color-text-muted);font-size:var(--text-xs);letter-spacing:.06em}.ls-or[data-v-1ff21828]:before,.ls-or[data-v-1ff21828]:after{content:"";flex:1;height:1px;background:var(--color-line)}.ls-fb-text[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.ls-fb-link[data-v-1ff21828]{color:var(--color-accent);text-decoration:none;border-bottom:.5px solid var(--color-accent-bd)}.ls-fb-link[data-v-1ff21828]:hover{border-bottom-color:var(--color-accent)}.ls-code-row[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3)}.ls-code[data-v-1ff21828]{flex:1;font-family:var(--font-mono);font-size:var(--text-xl);font-weight:var(--weight-medium);color:var(--color-text);letter-spacing:.14em}.ls-link[data-v-1ff21828]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text}.ls-copy.is-copied[data-v-1ff21828]{color:var(--color-success);border-color:var(--color-success-bd)}.ls-status[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.ls-status-text[data-v-1ff21828]{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--color-text-muted);flex:1}.ls-countdown[data-v-1ff21828]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);font-variant-numeric:tabular-nums}.ls-actions[data-v-1ff21828]{display:flex;justify-content:flex-end;gap:var(--space-3)}@media(max-width:640px){.ls-code-row[data-v-1ff21828],.ls-status[data-v-1ff21828],.ls-actions[data-v-1ff21828]{flex-wrap:wrap}.ls-code[data-v-1ff21828]{min-width:0;overflow-wrap:anywhere;letter-spacing:.08em}.ls-status-text[data-v-1ff21828]{min-width:0}}.wizard[data-v-6546a2d8]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);overflow-y:auto;font-family:var(--font-ui)}.wiz-body[data-v-6546a2d8]{flex:1;display:flex;flex-direction:column;align-items:center;width:min(560px,100%);margin:0 auto;padding:max(var(--space-8),12vh) var(--space-5) var(--space-6)}.wiz-step[data-v-6546a2d8]{display:flex;flex-direction:column;align-items:center;width:100%;flex:1;min-height:0}.wiz-step-fill[data-v-6546a2d8]{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;width:100%}.wiz-title[data-v-6546a2d8]{margin:var(--space-4) 0 0;font-size:var(--text-2xl);font-weight:var(--weight-semibold);line-height:var(--leading-tight);color:var(--color-text);text-align:center}.wiz-sub[data-v-6546a2d8]{margin:var(--space-2) 0 var(--space-6);font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted);text-align:center;max-width:460px}.pref-group[data-v-6546a2d8]{width:100%;margin-bottom:var(--space-5)}.pref-label[data-v-6546a2d8]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted);margin-bottom:var(--space-2)}.opt-card[data-v-6546a2d8]{display:flex;align-items:center;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);font-family:var(--font-ui);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.opt-card[data-v-6546a2d8]:hover{border-color:var(--color-line-strong)}.opt-card[data-v-6546a2d8]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.opt-card.selected[data-v-6546a2d8]{border-color:var(--color-accent);background:var(--color-accent-soft)}.opt-label[data-v-6546a2d8]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.lang-cards[data-v-6546a2d8]{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-3);width:100%}.lang-card[data-v-6546a2d8]{gap:var(--space-3);padding:var(--space-4)}.opt-radio[data-v-6546a2d8]{width:18px;height:18px;border-radius:var(--radius-full);border:.5px solid var(--color-line-strong);background:var(--color-surface-raised);flex:none;display:inline-flex;align-items:center;justify-content:center;transition:border-color var(--duration-fast) var(--ease-out)}.opt-radio[data-v-6546a2d8]:after{content:"";width:8px;height:8px;border-radius:var(--radius-full);background:transparent;transition:background var(--duration-fast) var(--ease-out)}.opt-radio.on[data-v-6546a2d8]{border-color:var(--color-accent)}.opt-radio.on[data-v-6546a2d8]:after{background:var(--color-accent)}.theme-cards[data-v-6546a2d8]{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-3);width:100%}.theme-card[data-v-6546a2d8]{flex-direction:column;gap:var(--space-3);padding:var(--space-3)}.tp[data-v-6546a2d8]{display:flex;width:100%;aspect-ratio:16 / 10;border:.5px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.tp-light[data-v-6546a2d8]{background:#fff}.tp-dark[data-v-6546a2d8]{background:#0d1117}.tp-half[data-v-6546a2d8]{flex:1;display:flex;min-width:0}.tp-half-light[data-v-6546a2d8]{background:#fff}.tp-half-dark[data-v-6546a2d8]{background:#0d1117}.tp-side[data-v-6546a2d8]{width:30%;flex:none}.tp-light .tp-side[data-v-6546a2d8],.tp-half-light .tp-side[data-v-6546a2d8]{background:#0000000d}.tp-dark .tp-side[data-v-6546a2d8],.tp-half-dark .tp-side[data-v-6546a2d8]{background:#ffffff12}.tp-lines[data-v-6546a2d8]{flex:1;display:flex;flex-direction:column;gap:6px;padding:14% 12%}.tp-lines span[data-v-6546a2d8]{height:6px;border-radius:var(--radius-full)}.tp-lines span[data-v-6546a2d8]:nth-child(1){width:62%}.tp-lines span[data-v-6546a2d8]:nth-child(2){width:88%}.tp-lines span[data-v-6546a2d8]:nth-child(3){width:44%}.tp-light .tp-lines span[data-v-6546a2d8],.tp-half-light .tp-lines span[data-v-6546a2d8]{background:#00000024}.tp-dark .tp-lines span[data-v-6546a2d8],.tp-half-dark .tp-lines span[data-v-6546a2d8]{background:#ffffff38}.wiz-foot[data-v-6546a2d8]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);width:100%;margin-top:auto;padding:var(--space-8) 0 max(var(--space-8),8vh)}.wiz-foot-ghost[data-v-6546a2d8]{display:flex;gap:var(--space-3);min-height:32px;align-items:center}.wiz-foot-ghost[data-v-6546a2d8] .ui-button--ghost:not(:disabled):hover{background:transparent;color:var(--color-text)}.wiz-primary[data-v-6546a2d8]{min-width:140px}@media(max-width:640px){.theme-cards[data-v-6546a2d8]{grid-template-columns:1fr}}.gload[data-v-ab85ede1]{position:fixed;top:0;left:0;width:100vw;height:100vh;height:100dvh;min-width:100vw;min-height:100dvh;z-index:var(--z-toast);display:flex;align-items:center;justify-content:center;background:var(--bg)}.gload-box[data-v-ab85ede1]{display:flex;flex-direction:column;align-items:center;gap:22px;transform:translateY(-6%)}.gload-logo[data-v-ab85ede1]{width:128px;height:auto;color:var(--color-text);animation:gload-pop-ab85ede1 .55s cubic-bezier(.22,1,.36,1) both}.gload-text[data-v-ab85ede1]{font-family:var(--mono);font-size:var(--text-base);color:var(--muted);letter-spacing:.04em}@keyframes gload-pop-ab85ede1{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.gload-logo[data-v-ab85ede1]{animation:none}}.gload-text[data-v-ab85ede1]{font-family:var(--sans)}.kap-root[data-v-2b13888e]{height:100vh;display:flex;flex-direction:column;background:var(--bg);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2.5px);color:var(--color-text)}.kap-head[data-v-2b13888e]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:.5px solid var(--line);background:var(--panel)}.kap-count[data-v-2b13888e]{color:var(--muted)}.kap-head-actions[data-v-2b13888e]{margin-left:auto;display:flex;gap:6px}.kap-head-actions button[data-v-2b13888e],.kap-view-toggle button[data-v-2b13888e]{padding:3px 8px;border:.5px solid var(--line);border-radius:6px;background:var(--bg);color:var(--muted);font:inherit;cursor:pointer}.kap-head-actions button[data-v-2b13888e]:hover,.kap-view-toggle button[data-v-2b13888e]:hover{color:var(--color-text)}.kap-head-actions button.on[data-v-2b13888e],.kap-view-toggle button.on[data-v-2b13888e]{color:var(--color-accent-hover);border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.kap-filters[data-v-2b13888e]{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:7px 10px;border-bottom:.5px solid var(--line)}.kap-filters select[data-v-2b13888e],.kap-filters input[type=text][data-v-2b13888e]{padding:3px 6px;border:.5px solid var(--line);border-radius:6px;background:var(--bg);color:var(--color-text);font:inherit;min-width:0}.kap-filters input[type=text][data-v-2b13888e]{flex:1;min-width:120px}.kap-check[data-v-2b13888e]{display:inline-flex;align-items:center;gap:4px;color:var(--muted);white-space:nowrap}.kap-view-toggle[data-v-2b13888e]{display:flex;gap:0}.kap-view-toggle button[data-v-2b13888e]:first-child{border-radius:6px 0 0 6px;border-right:none}.kap-view-toggle button[data-v-2b13888e]:last-child{border-radius:0 6px 6px 0}.kap-list[data-v-2b13888e]{flex:1;min-height:0;overflow-y:auto}.kap-empty[data-v-2b13888e]{padding:18px 12px;color:var(--muted);text-align:center}.kap-row[data-v-2b13888e]{display:flex;align-items:baseline;gap:7px;width:100%;padding:3px 10px;border:none;border-bottom:.5px solid var(--line);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.kap-row[data-v-2b13888e]:hover{background:var(--panel2)}.kap-row.expanded[data-v-2b13888e]{background:var(--color-accent-soft)}.kap-ts[data-v-2b13888e]{flex:none;color:var(--muted)}.kap-badge[data-v-2b13888e]{flex:none;padding:0 5px;border-radius:var(--radius-sm);font-size:max(9px,calc(var(--ui-font-size) - 4.5px));font-weight:500;line-height:1.7}.b-rest[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.b-in[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-success)}.b-out[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-warning)}.b-life[data-v-2b13888e]{background:var(--panel2);color:var(--muted)}.b-err[data-v-2b13888e]{background:var(--color-warning);color:var(--bg)}.kap-label[data-v-2b13888e]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kap-detail[data-v-2b13888e]{border-bottom:.5px solid var(--line);background:var(--bg);padding:6px 10px 10px}.kap-detail-actions[data-v-2b13888e]{display:flex;justify-content:flex-end;margin-bottom:4px}.kap-detail-actions button[data-v-2b13888e]{padding:2px 8px;border:.5px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font:inherit;cursor:pointer}.kap-detail-actions button[data-v-2b13888e]:hover{color:var(--color-text)}.kap-detail pre[data-v-2b13888e]{margin:0;max-height:320px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:calc(var(--ui-font-size) - 3px);line-height:1.45}.kap-agg[data-v-2b13888e]{flex:1;min-height:0;overflow-y:auto;padding:8px 10px}.kap-agg h4[data-v-2b13888e]{margin:8px 0 4px;font-size:calc(var(--ui-font-size) - 2.5px);color:var(--muted)}.kap-agg table[data-v-2b13888e]{width:100%;border-collapse:collapse}.kap-agg th[data-v-2b13888e],.kap-agg td[data-v-2b13888e]{padding:3px 6px;border-bottom:.5px solid var(--line);text-align:left;vertical-align:top}.kap-agg th[data-v-2b13888e]{color:var(--muted);font-weight:500}.kap-agg .num[data-v-2b13888e]{text-align:right}.kap-agg .err[data-v-2b13888e]{color:var(--color-warning);font-weight:500}.kap-agg .mono[data-v-2b13888e]{word-break:break-all}.kap-fab[data-v-21de79fc]{position:fixed;right:10px;bottom:10px;z-index:var(--z-overlay);padding:5px 9px;border:.5px solid var(--line);border-radius:8px;background:var(--panel);color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 3px);font-weight:500;letter-spacing:.04em;cursor:pointer;opacity:.75}.kap-fab[data-v-21de79fc]:hover{opacity:1;color:var(--color-accent)}.server-auth-hint[data-v-331563ff]{margin:0 0 var(--space-3);font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.server-auth-hint code[data-v-331563ff]{padding:1px 5px;font-family:var(--font-mono);font-size:var(--text-xs);background:var(--color-surface-sunken);border-radius:var(--radius-xs)}.internal-build-tag[data-v-14c3d0e0]{flex:none;display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:999px;background:#f5a623;color:#3a2a00;font-size:11px;font-weight:700;letter-spacing:.01em;line-height:1.4;white-space:nowrap;user-select:none}.gload-fade-leave-active[data-v-26193eae]{transition:opacity .28s ease}.gload-fade-leave-to[data-v-26193eae]{opacity:0}.action-toast-enter-active[data-v-26193eae],.action-toast-leave-active[data-v-26193eae]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.action-toast-leave-active[data-v-26193eae]{transition-duration:var(--duration-fast);pointer-events:none}.action-toast-enter-from[data-v-26193eae],.action-toast-leave-to[data-v-26193eae]{opacity:0;transform:translateY(-6px)}.app-shell[data-v-26193eae]{position:fixed;top:var(--app-top, 0px);left:0;right:0;height:100vh;height:100dvh;height:var(--app-height, 100dvh);display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}.app[data-v-26193eae]{flex:1;min-height:0;position:relative;display:grid;grid-template-columns:auto 0 minmax(0,1fr) 0 auto;background:var(--bg);color:var(--color-text);overflow:hidden;box-sizing:border-box}.app[data-v-26193eae]>*{min-height:0;min-width:0}.app>.side[data-v-26193eae]{grid-column:1}.side-handle[data-v-26193eae]{grid-column:2}.app:not(.mobile)>.con[data-v-26193eae]{grid-column:3}.preview-handle[data-v-26193eae]{grid-column:4}.sidebar-toggle-btn[data-v-26193eae]{position:absolute;top:11px;left:16px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-26193eae .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .sidebar-toggle-btn[data-v-26193eae]{left:84px;animation:none}.new-chat-btn[data-v-26193eae]{position:absolute;top:11px;left:42px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-26193eae .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .new-chat-btn[data-v-26193eae]{left:110px}@keyframes sidebar-toggle-btn-in-26193eae{0%{opacity:0}}.internal-build-fab[data-v-26193eae]{position:absolute;right:var(--space-3);bottom:var(--space-3);z-index:var(--z-sticky);pointer-events:none}.app.mobile[data-v-26193eae]{grid-template-columns:1fr;grid-template-rows:auto 1fr}.global-preview[data-v-26193eae]{--preview-w: 460px;grid-column:5;min-width:0;min-height:0;width:0;background:var(--bg);overflow:hidden}.global-preview.open[data-v-26193eae]{width:var(--preview-w)}.global-preview[data-v-26193eae]:not(.mobile)>*{width:var(--preview-w);height:100%;box-sizing:border-box;border-left:.5px solid var(--line)}.global-preview.mobile[data-v-26193eae]{position:fixed;inset:0;z-index:var(--z-sticky);width:auto;transition:none;border-top:.5px solid var(--color-text)}:root{--panel-head-h: 48px;--panel-head-inset: calc((var(--panel-head-h) - var(--icon-button-sm)) / 2)}.app:not(.mobile) .chat-header{transition:padding-left .28s cubic-bezier(.4,0,.2,1)}.app.sidebar-collapsed .chat-header{padding-left:78px}.app.sidebar-collapsed.macos-desktop .chat-header{padding-left:146px}.app.macos-desktop .global-preview .ui-panel-header{-webkit-app-region:drag}.app.macos-desktop .global-preview .ui-panel-header button,.app.macos-desktop .global-preview .ui-panel-header input{-webkit-app-region:no-drag}.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .chat-header,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .side .ch,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .global-preview .ui-panel-header{-webkit-app-region:no-drag}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--dim: rgba(0, 0, 0, .6);--muted: rgba(0, 0, 0, .45);--faint: rgba(0, 0, 0, .3);--line: var(--color-line);--line2: var(--color-subtle);--canvas: #f9fbfc;--sh: 0 1px 3px rgba(28, 40, 66, .05), 0 6px 18px rgba(28, 40, 66, .06);--shc: 0 1px 2px rgba(28, 40, 66, .05);--panel: #f5f5f5;--panel2: rgba(0, 0, 0, .05);--bg: #ffffff;--blue: #1783ff;--blue2: #167ff7;--soft: #e8f3ff;--bd: rgba(23, 131, 255, .25);--logo: #1783ff;--bluebg: #e8f3ff;--blueln: rgba(23, 131, 255, .25);--ok: #0e7a38;--warn: #a9610a;--star: #eab308;--err: #c0392b;--hover: var(--color-hover);--r-xs: var(--radius-sm);--r-sm: var(--radius-md);--r-md: var(--radius-lg);--r-lg: var(--radius-xl);--ui-font-size: var(--ui-b2);--ui-font-size-sm: calc(var(--ui-font-size) - 1px);--ui-font-size-xs: calc(var(--ui-font-size) - 2px);--ui-font-size-lg: calc(var(--ui-font-size) + 1px);--ui-font-size-xl: calc(var(--ui-font-size) + 2px);--content-font-size: var(--md-b1);--code-font-size: calc(var(--content-font-size) - 2px);--mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--sans: var(--font-ui);color-scheme:light dark}html[data-color-scheme=light]{color-scheme:light}html[data-color-scheme=system]{color-scheme:light dark}html[data-color-scheme=dark]{color-scheme:dark;--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35)}}:root{--color-bg: #ffffff;--color-surface: #f5f5f5;--color-surface-raised: #ffffff;--color-surface-overlay: #ffffff;--color-surface-sunken: #f5f5f5;--color-inline-code-bg: rgba(0, 0, 0, .03);--color-well: #f5f5f5;--color-surface-deep: #f5f5f5;--color-media-alpha-bg-1: color-mix(in srgb, var(--color-bg) 52%, var(--color-text) 48%);--color-media-alpha-bg-2: color-mix(in srgb, var(--color-bg) 42%, var(--color-text) 58%);--media-alpha-canvas: conic-gradient( var(--color-media-alpha-bg-1) 25%, var(--color-media-alpha-bg-2) 0 50%, var(--color-media-alpha-bg-1) 0 75%, var(--color-media-alpha-bg-2) 0 ) 0 0 / 16px 16px;--color-text: rgba(0, 0, 0, .9);--color-text-strong: #000000;--color-text-muted: rgba(0, 0, 0, .6);--color-text-faint: rgba(0, 0, 0, .45);--color-text-on-accent: #ffffff;--color-line: rgba(0, 0, 0, .13);--color-subtle: rgba(0, 0, 0, .05);--color-line-strong: rgba(0, 0, 0, .15);--color-scrim: rgba(0, 0, 0, .4);--color-scrim-strong: rgba(0, 0, 0, .6);--color-text-on-scrim: #ffffff;--color-selected: rgba(0, 0, 0, .05);--color-selected-hover: rgba(0, 0, 0, .08);--color-hover: rgba(0, 0, 0, .03);--color-sidebar-bg: #f9fbfc;--color-user-bubble-bg: #f5f5f5;--color-accent: #1783ff;--color-accent-hover: #167ff7;--color-accent-soft: #e8f3ff;--color-accent-bd: rgba(23, 131, 255, .25);--color-success: #0e7a38;--color-success-soft: #e7f6ee;--color-success-bd: #bfe3cc;--color-warning: #a9610a;--color-warning-soft: #fbf1e0;--color-warning-bd: #f0d9b8;--color-danger: #c0392b;--color-danger-soft: #fbeaea;--color-danger-bd: #f0cccc;--color-diff-add-bg: rgba(22, 196, 86, .25);--color-diff-del-bg: rgba(255, 56, 73, .25);--color-done: #8250df;--color-done-soft: #f3e8ff;--color-done-bd: #e0ccff;--color-info: #1783ff;--color-term-magenta: #8250df;--color-term-cyan: #1b7c83;--color-term-black: #24292f;--space-05: 2px;--space-1: 4px;--space-1-5: 6px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-8: 32px;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-2xl: 20px;--radius-composer: 32px;--corner-shape-composer: superellipse(1.5);--radius-menu-row: 25.3px;--corner-shape-menu: var(--corner-shape-composer);--color-menu-bg-frost: color-mix(in srgb, var(--color-bg) 70%, transparent);--color-menu-scrollbar: color-mix(in srgb, var(--color-text) 16%, transparent);--color-menu-scrollbar-hover: color-mix(in srgb, var(--color-text) 48%, transparent);--radius-full: 999px;--menu-scroll-fade: var(--space-5);--menu-row-hug: var(--space-1-5);--menu-rows-seam: 1px;--menu-row-gap-icon: 7px;--menu-row-padding-block: calc(var(--menu-row-hug) - var(--p-hairline));--menu-row-padding-inline: calc(var(--space-4) - var(--space-3) + var(--menu-row-hug) - var(--p-hairline));--menu-row-touch-padding-block: 11px;--menu-scrollbar-width: 3px;--menu-scrollbar-edge: calc(var(--menu-row-hug) + var(--p-hairline) - var(--menu-scrollbar-width));--menu-scrollbar-track-inset: calc(var(--radius-composer) - var(--space-1-5));--menu-scrollbar-thumb-min: 24px;--att-chip-pad-left: 5px;--wm-x-size: calc(var(--p-ic-sm) + var(--space-1));--wm-x-ring: var(--space-1-5);--z-base: 0;--z-raised: 1;--z-sticky: 100;--z-dropdown: 200;--z-overlay: 300;--z-modal: 400;--z-modal-dropdown: 500;--z-toast: 600;--z-tooltip: 650;--z-max: 9999;--shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);--shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);--shadow-menu: 0 6px 18px lch(0% 0 0 / .02), 0 3px 9px lch(0% 0 0 / .04), 0 1px 1px lch(0% 0 0 / .04);--color-menu-bg: rgba(255, 255, 255, .95);--p-menu-backdrop: blur(24px) saturate(1.8);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(16, 24, 40, .07), 0 2px 4px rgba(16, 24, 40, .05);--shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 4px 10px rgba(16, 24, 40, .08);--shadow-xl: 0 24px 64px rgba(16, 24, 40, .18), 0 8px 20px rgba(16, 24, 40, .1);--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-in-out: cubic-bezier(.4, 0, .2, 1);--duration-fast: .12s;--duration-base: .16s;--duration-slow: .26s;--duration-hover-intent: .25s;--motion-panel-shift: 2px;--motion-panel-scale: .97;--color-composer-bg: #ffffff;--color-composer-line: rgba(0, 0, 0, .13);--color-composer-focus-line: rgba(0, 0, 0, .25);--color-send-bg: rgba(0, 0, 0, .9);--color-send-bg-hover: #252525;--color-send-icon: #ffffff;--color-stop-glyph: var(--color-danger);--color-send-bg-disabled: rgba(0, 0, 0, .05);--color-send-icon-disabled: rgba(0, 0, 0, .27);--opacity-send-disabled: 1;--shadow-send: 0 7px 16px -13px rgba(0, 0, 0, .38), 0 1px 2px rgba(0, 0, 0, .07);--shadow-send-hover: 0 8px 18px -13px rgba(0, 0, 0, .42), 0 1px 3px rgba(0, 0, 0, .09);--composer-send-icon-size: 28px;--font-ui-latin: "Schibsted Grotesk Variable", "Helvetica Neue", Arial;--font-ui: var(--font-ui-latin), "Noto Sans SC Variable", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-display: var(--font-ui);--font-kbd: "Schibsted Grotesk Variable", system-ui, sans-serif;--font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--text-2xs: calc(var(--ui-c1) - 1px);--text-xs: var(--ui-c1);--text-sm: calc(var(--ui-b2) - 1px);--text-base: var(--ui-b2);--text-lg: var(--ui-t2);--text-xl: var(--ui-t1);--text-2xl: var(--ui-t0);--leading-solid: 1;--leading-tight: 1.25;--leading-caption: 1.4;--leading-normal: 1.5;--leading-prose: 1.6;--leading-relaxed: 1.7;--weight-regular: 400;--weight-caption: 450;--weight-option-label: 475;--weight-medium: 500;--weight-ui-strong: 525;--weight-section-label: 600;--weight-semibold: 700;--ui-shift: calc(var(--base-font, 14px) - 14px);--md-shift: var(--ui-shift);--ui-t0: min(calc(20px + var(--ui-shift)), 24px);--ui-t1: min(calc(18px + var(--ui-shift)), 22px);--ui-t2: calc(16px + var(--ui-shift));--ui-b1: calc(15px + var(--ui-shift));--ui-b2: calc(14px + var(--ui-shift));--ui-c1: calc(12px + var(--ui-shift));--ui-c2: calc(10px + var(--ui-shift));--md-h1: calc(22px + var(--md-shift));--md-h2: calc(20px + var(--md-shift));--md-h3: calc(18px + var(--md-shift));--md-b1: calc(14px + var(--md-shift));--md-b2: calc(13px + var(--md-shift));--md-b3: calc(13px + var(--md-shift));--p-focus-ring: 0 0 0 3px var(--color-accent-soft);--p-focus-ring-strong: 0 0 0 3px var(--color-accent-soft), 0 0 0 1px var(--color-accent);--p-selection: rgba(23, 131, 255, .2);--p-ic-sm: 14px;--p-ic-md: 16px;--p-ring-stroke: 1.5px;--p-ic-lg: 20px;--p-empty-ico: 28px;--p-hairline: .5px;--p-findring-w: 2px;--icon-button-sm: 26px;--touch-target-min: 44px;--p-chip-num: 20px;--p-sidebar-w: 264px;--p-content-max: 760px;--p-content-wide: 920px;--p-table-max: 1040px;--p-table-cell-max: 700px;--p-findbar-w: 340px;--p-dock-panel-h: 320px;--p-subagent-card-min: 180px;--p-slash-menu-h: 228px;--p-mention-menu-h: 208px;--p-add-menu-h: var(--p-slash-menu-h);--p-bp-sm: 640px;--p-bp-md: 980px}:root,html[data-font-scale=medium]{--base-font: 14px}html[data-font-scale=small]{--base-font: 12px}html[data-font-scale=large]{--base-font: 16px}html[data-font-scale=xlarge]{--base-font: 18px}.text-ui-t0{font-size:var(--ui-t0);line-height:round(calc(var(--ui-t0) * 1.4),1px)}.text-ui-t1{font-size:var(--ui-t1);line-height:round(calc(var(--ui-t1) * 1.44),1px)}.text-ui-t2{font-size:var(--ui-t2);line-height:round(calc(var(--ui-t2) * 1.5),1px)}.text-ui-b1{font-size:var(--ui-b1);line-height:round(calc(var(--ui-b1) * 1.47),1px)}.text-ui-b2{font-size:var(--ui-b2);line-height:round(calc(var(--ui-b2) * 1.42),1px)}.text-ui-c1{font-size:var(--ui-c1);line-height:round(calc(var(--ui-c1) * 1.5),1px)}.text-ui-c2{font-size:var(--ui-c2);line-height:round(calc(var(--ui-c2) * 1.4),1px)}.text-md-h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px)}.text-md-h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.text-md-h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.text-md-b1{font-size:var(--md-b1);line-height:round(calc(var(--md-b1) * 1.625),1px)}.text-md-b2{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px)}.text-md-b3{font-size:var(--md-b3);line-height:round(calc(var(--md-b3) * 1.57),1px)}html[data-color-scheme=dark]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-info: #1a88ff;--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-info: #1a88ff;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32)}}:root{--color-sidebar-tint: rgba(255, 255, 255, .4)}html[data-color-scheme=dark]{--color-sidebar-tint: rgba(0, 0, 0, .25)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-sidebar-tint: rgba(0, 0, 0, .25)}}:root{--color-search-match: #ffe066;--color-search-match-current: #ffc531}html[data-color-scheme=dark]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55)}}::highlight(kimi-transcript-search){background-color:var(--color-search-match)}::highlight(kimi-transcript-search-current){background-color:var(--color-search-match-current)}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/NotoSansSC_wght_-BkPpiACN.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:normal;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk_wght_-DIzGrWVg.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:italic;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk-Italic_wght_-DjkBGo1z.woff2) format("woff2-variations")}*,*:before,*:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;tab-size:4}body{margin:0}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit;margin:0}p,blockquote,dl,dd,figure,pre{margin:0}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}b,strong{font-weight:var(--weight-medium)}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{margin:0;padding:0;font-family:inherit;font-size:100%;line-height:inherit;color:inherit}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background:transparent;background-image:none}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block}img,video{max-width:100%;height:auto}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1}table{border-collapse:collapse;border-color:inherit;text-indent:0}hr{height:0;color:inherit;border-top-width:1px}fieldset{margin:0;padding:0}legend{padding:0}dialog{padding:0}summary{display:list-item}[hidden]{display:none}@supports (interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}:root{--safe-top: env(safe-area-inset-top, 0px);--safe-right: env(safe-area-inset-right, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--safe-left: env(safe-area-inset-left, 0px)}.kw-icon{display:inline-block;flex:none;vertical-align:-.15em}code,pre,kbd,samp,tt{font-feature-settings:"liga" 0,"calt" 0,"ss01" 0;font-variant-ligatures:none}html,body,#app{height:100%;margin:0;background:var(--bg)}#app{position:fixed;inset:0}html,body{overflow:hidden}@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--color-text) 12%,transparent) transparent}}*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:999px}*::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}*::-webkit-scrollbar-corner{background:transparent}body{font-family:var(--sans);color:var(--color-text);background:var(--bg);font-size:var(--ui-font-size);font-weight:400;line-height:1.6;font-optical-sizing:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto;font-synthesis:none;text-size-adjust:100%;-webkit-hyphens:none;hyphens:none}@media(max-width:640px){.backdrop{align-items:flex-end;justify-content:stretch}.backdrop .dialog{width:100%;max-width:100%;max-height:88vh;border-radius:var(--radius-xl) var(--radius-xl) 0 0;border-left:none;border-right:none;border-bottom:none;border-top:.5px solid var(--line);box-shadow:0 -10px 30px #0000002e;animation:kimi-sheet-up .26s cubic-bezier(.4,0,.2,1)}}@keyframes kimi-sheet-up{0%{transform:translateY(101%)}to{transform:translateY(0)}}.backdrop,.ob-backdrop{min-width:100vw!important;min-height:100vh!important;min-height:100dvh!important}@keyframes kimi-card-in{0%{opacity:0;transform:translateY(8px) scale(.995)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes kimi-check-in{0%{opacity:0;transform:scale(.4)}60%{opacity:1;transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){*{animation-duration:.001ms!important;animation-delay:0ms!important;transition-duration:.001ms!important}}.ch-eyes{animation:kimi-eye-look 16s ease-in-out infinite}.ch-eye{transform-box:fill-box;transform-origin:center;animation:kimi-eye-blink 11s ease-in-out infinite}@keyframes kimi-eye-look{0%,42%{transform:translate(0)}47%,53%{transform:translate(2px)}58%,80%{transform:translate(0)}84%,90%{transform:translate(-2px)}95%,to{transform:translate(0)}}@keyframes kimi-eye-blink{0%,94%,to{transform:scaleY(1)}96.5%,98%{transform:scaleY(.12)}}@media(prefers-reduced-motion:reduce){.ch-eyes,.ch-eye{animation:none}}.blink-now .ch-eye{animation:kimi-eye-blink-once .24s ease-in-out}@keyframes kimi-eye-blink-once{0%,to{transform:scaleY(1)}50%{transform:scaleY(.1)}}.md .markdown-renderer img{min-width:0;min-height:0}.app{font-size:var(--ui-font-size)}.md,.md .markdown-renderer,.md .markdown-renderer p,.md .markdown-renderer li,.u-bub,.u-bub .u-text,.a-msg .msg,.ph{font-size:var(--content-font-size)}.md .markdown-renderer blockquote,.md .markdown-renderer td,.md .markdown-renderer th{font-size:var(--md-b2)}.md,.u-bub .u-text,.a-msg .msg{text-autospace:normal}.md .code-block-container pre,.md .markstream-pre,.md .code-block-container pre code,.md .diff-pre code,.md .markdown-renderer :not(pre)>code,.md .markdown-renderer .inline-code,.a-msg code{font-size:var(--md-b3)}.md .markdown-renderer :is(h1,h2,h3,h4) :not(pre)>code,.md .markdown-renderer :is(h1,h2,h3,h4) .inline-code{font-size:.9em}.queue-item,.queue-text,.ctx-num,.model-pill,.perm-pill,.mode-pill,.compact-chip,.qcard,.qtext,.qopt,.qbtn,.srow,.srow-val{font-size:var(--ui-font-size)}.qopt-desc,.srow-label{font-size:var(--ui-font-size-sm)}.code-block-header,.code-block-header *,.diff-lang,.queue-label,.qopt-key,.qstep,.srow-sub{font-size:var(--ui-font-size-xs)}@media(max-width:640px){.u-bub .u-text,.a-msg .msg,.ph{font-size:max(16px,var(--ui-font-size-xl))}}:root{--anim-rive-spin: .4167s;--anim-leftbar: .5333s;--anim-leftbar-shrink: .2s}#bar-divider{transform-box:view-box;transform-origin:9.3px 12px;transition:transform var(--anim-leftbar-shrink) linear}svg:hover #bar-divider,button:hover #bar-divider{transform:translate(-1.5px) scaleY(.5)}#bar-arrow{transform-box:view-box;transform-origin:0 0;transform:translate(63.95833%,50.625%) scale(0)}svg:hover #bar-arrow,button:hover #bar-arrow{animation:leftbar-arrow var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow{0%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:0}3.125%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:1}15.625%{transform:translate(59.0125%,50.625%) scale(-1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}}#bar-arrow-expand{transform-box:view-box;transform-origin:0 0;transform:translate(52.08333%,50.625%) scale(0)}svg:hover #bar-arrow-expand,button:hover #bar-arrow-expand{animation:leftbar-arrow-expand var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow-expand{0%{transform:translate(37.02917%,50.625%) scale(.6);opacity:0}3.125%{transform:translate(37.02917%,50.625%) scale(.6);opacity:1}15.625%{transform:translate(40.9875%,50.625%) scale(1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(1);opacity:1}}#p1{transform-box:view-box;transform-origin:0 0}svg:hover #p1,button:hover #p1{animation:nc-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes nc-plus-spin{0%{transform:translate(11.5px,11.5px)}8%{transform:translate(11.501px,11.48px) rotate(1.1795deg) scale(1.02022)}12%{transform:translate(11.511px,11.46px) rotate(2.8374deg) scale(1.03026)}20%{transform:translate(11.562px,11.401px) rotate(8.8167deg) scale(1.05041)}24%{transform:translate(11.608px,11.361px) rotate(13.4726deg) scale(1.06017)}32%{transform:translate(11.751px,11.278px) rotate(25.9719deg) scale(1.08008)}48%{transform:translate(12.149px,11.222px) rotate(55.8418deg) scale(1.12025)}52%{transform:translate(12.235px,11.236px) rotate(62.0737deg) scale(1.12953)}60%{transform:translate(12.371px,11.276px) rotate(72.1167deg) scale(1.14954)}68%{transform:translate(12.446px,11.346px) rotate(79.3018deg) scale(1.12048)}76%{transform:translate(12.488px,11.403px) rotate(84.2633deg) scale(1.09046)}88%{transform:translate(12.509px,11.464px) rotate(88.52deg) scale(1.04535)}to{transform:translate(12.5px,11.5px) rotate(90deg)}}#af-p1{transform-box:view-box;transform-origin:18.4px 16.3px}svg:hover #af-p1,button:hover #af-p1{animation:folder-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes folder-plus-spin{0%{transform:none}8%{transform:rotate(1.1795deg) scale(1.02022)}12%{transform:rotate(2.8374deg) scale(1.03026)}20%{transform:rotate(8.8167deg) scale(1.05041)}24%{transform:rotate(13.4726deg) scale(1.06017)}32%{transform:rotate(25.9719deg) scale(1.08008)}48%{transform:rotate(55.8418deg) scale(1.12025)}52%{transform:rotate(62.0737deg) scale(1.12953)}60%{transform:rotate(72.1167deg) scale(1.14954)}68%{transform:rotate(79.3018deg) scale(1.12048)}76%{transform:rotate(84.2633deg) scale(1.09046)}88%{transform:rotate(88.52deg) scale(1.04535)}to{transform:rotate(90deg)}} diff --git a/apps/kimi-code/dist-web/assets/index-C_ObXpF5.css b/apps/kimi-code/dist-web/assets/index-C_ObXpF5.css new file mode 100644 index 000000000..bd137eadf --- /dev/null +++ b/apps/kimi-code/dist-web/assets/index-C_ObXpF5.css @@ -0,0 +1 @@ +.ui-tip__bubble[data-v-93bacf6d]{position:fixed;z-index:var(--z-tooltip);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tip-lines);max-width:280px;padding:4px 8px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:1.35;overflow:hidden;overflow-wrap:anywhere;pointer-events:none;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.ui-tip__bubble.positioned[data-v-93bacf6d]{opacity:1}.ui-icon-button[data-v-2cbeca98]{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.ui-icon-button[data-v-2cbeca98]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text)}.ui-icon-button[data-v-2cbeca98]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-icon-button[data-v-2cbeca98]:disabled{opacity:.5;cursor:not-allowed}.ui-icon-button--sm[data-v-2cbeca98]{width:var(--icon-button-sm);height:var(--icon-button-sm);border-radius:var(--radius-sm)}.ui-icon-button--md[data-v-2cbeca98]{width:32px;height:32px}.ui-icon-button--lg[data-v-2cbeca98]{width:44px;height:44px}.ui-icon-button[data-v-2cbeca98] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--sm[data-v-2cbeca98] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--lg[data-v-2cbeca98] svg{width:var(--p-ic-lg);height:var(--p-ic-lg)}.ui-action-toast-host[data-v-e6936dfd]{position:fixed;top:calc(48px + var(--space-2));left:50%;translate:-50% 0;z-index:var(--z-toast);max-width:calc(100vw - 32px)}.ui-action-toast[data-v-e6936dfd]{display:flex;align-items:center;gap:var(--space-2);padding:4px 6px 4px 14px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.45;color:var(--color-text);white-space:nowrap}.ui-action-toast__body[data-v-e6936dfd]{min-width:0}.ui-action-toast__body button[data-v-e6936dfd-s]{border:0;padding:0;background:none;color:var(--color-accent);cursor:pointer;font:inherit}.ui-action-toast__body button[data-v-e6936dfd-s]:hover{color:var(--color-accent-hover);text-decoration:underline}.ui-action-toast__body button[data-v-e6936dfd-s]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--radius-xs)}.ui-action-toast__close[data-v-e6936dfd]{flex:none}.ui-badge[data-v-d879fe18]{display:inline-flex;align-items:center;gap:6px;border-radius:var(--radius-full);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;border:.5px solid transparent}.ui-badge--md[data-v-d879fe18]{height:22px;padding:0 9px;font-size:var(--text-xs)}.ui-badge--sm[data-v-d879fe18]{height:18px;padding:0 7px;font-size:11px}.ui-badge__dot[data-v-d879fe18]{width:6px;height:6px;border-radius:var(--radius-full);background:currentColor;flex:none}.ui-badge--neutral[data-v-d879fe18]{background:var(--color-surface-sunken);color:var(--color-text-muted);border-color:var(--color-line)}.ui-badge--info[data-v-d879fe18]{background:var(--color-accent-soft);color:var(--color-accent-hover);border-color:var(--color-accent-bd)}.ui-badge--success[data-v-d879fe18]{background:var(--color-success-soft);color:var(--color-success);border-color:var(--color-success-bd)}.ui-badge--warning[data-v-d879fe18]{background:var(--color-warning-soft);color:var(--color-warning);border-color:var(--color-warning-bd)}.ui-badge--danger[data-v-d879fe18]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-badge--solid[data-v-d879fe18]{background:var(--color-text);color:var(--color-bg)}.ui-banner[data-v-6d739c6d]{display:flex;align-items:center;gap:10px;padding:10px 14px;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal)}.ui-banner__icon[data-v-6d739c6d]{display:inline-flex;flex:none}.ui-banner__icon svg[data-v-6d739c6d]{width:18px;height:18px}.ui-banner--info[data-v-6d739c6d]{background:var(--color-accent-soft);border-color:var(--color-accent-bd)}.ui-banner--warning[data-v-6d739c6d]{background:var(--color-warning-soft);border-color:var(--color-warning-bd)}.ui-banner--danger[data-v-6d739c6d]{background:var(--color-danger-soft);border-color:var(--color-danger-bd)}.ui-banner--info .ui-banner__icon[data-v-6d739c6d]{color:var(--color-accent)}.ui-banner--warning .ui-banner__icon[data-v-6d739c6d]{color:var(--color-warning)}.ui-banner--danger .ui-banner__icon[data-v-6d739c6d]{color:var(--color-danger)}.ui-spinner[data-v-476ed1b4]{display:inline-flex;flex:none;color:var(--color-accent)}.ui-spinner--xs[data-v-476ed1b4]{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-spinner--xs .ui-spinner__track[data-v-476ed1b4],.ui-spinner--xs .ui-spinner__arc[data-v-476ed1b4]{r:10.875px;stroke-width:calc(var(--p-ring-stroke) * 1.5)}.ui-spinner--xs .ui-spinner__arc[data-v-476ed1b4]{stroke-dasharray:67.7 67.7;stroke-dashoffset:45.9}.ui-spinner--sm[data-v-476ed1b4]{width:14px;height:14px}.ui-spinner--md[data-v-476ed1b4]{width:18px;height:18px}.ui-spinner--lg[data-v-476ed1b4]{width:28px;height:28px}.ui-spinner__svg[data-v-476ed1b4]{width:100%;height:100%}.ui-spinner__track[data-v-476ed1b4]{fill:none;stroke:var(--color-line);stroke-width:2.2}.ui-spinner__arc[data-v-476ed1b4]{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-dasharray:56 56;stroke-dashoffset:38}.ui-button[data-v-01b5ec22]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);border:.5px solid transparent;border-radius:var(--radius-md);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;cursor:pointer;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.ui-button[data-v-01b5ec22]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ui-button[data-v-01b5ec22]:not(:disabled):active{transform:scale(.98)}.ui-button[data-v-01b5ec22]:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.ui-button--sm[data-v-01b5ec22]{height:30px;padding:0 var(--space-3);font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-button--md[data-v-01b5ec22]{height:36px;padding:0 var(--space-4);font-size:var(--text-base)}.ui-button--lg[data-v-01b5ec22]{height:42px;padding:0 var(--space-5);font-size:15px;border-radius:var(--radius-lg)}.ui-button__content[data-v-01b5ec22]{display:inline-flex;align-items:center;gap:var(--space-2)}.ui-button__content[data-v-01b5ec22] svg{flex:none}.ui-button__content[data-v-01b5ec22] svg:not([width]){width:1em;height:1em}.ui-button--primary[data-v-01b5ec22]{background:var(--color-accent);color:var(--color-text-on-accent);border-color:var(--color-accent);box-shadow:var(--shadow-xs)}.ui-button--primary[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ui-button--secondary[data-v-01b5ec22]{background:var(--color-surface-raised);color:var(--color-text);border-color:var(--color-line-strong);box-shadow:var(--shadow-xs)}.ui-button--secondary[data-v-01b5ec22]:not(:disabled):hover{border-color:var(--color-line-strong);background:var(--color-hover)}.ui-button--ghost[data-v-01b5ec22]{background:transparent;color:var(--color-text-muted);border-color:transparent}.ui-button--ghost[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-hover);color:var(--color-text-strong)}.ui-button--danger[data-v-01b5ec22]{background:var(--color-danger);color:var(--color-text-on-accent);border-color:var(--color-danger);box-shadow:var(--shadow-xs)}.ui-button--danger[data-v-01b5ec22]:not(:disabled):hover{filter:brightness(.96)}.ui-button--danger-soft[data-v-01b5ec22]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-button--danger-soft[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-danger);color:var(--color-text-on-accent);border-color:var(--color-danger)}.ui-button.is-loading .ui-button__content[data-v-01b5ec22]{opacity:.7}.ui-button .ui-button__spinner[data-v-01b5ec22]{flex:none;color:inherit}.ui-button__spinner[data-v-01b5ec22] .ui-spinner__track{opacity:.35}.ui-card[data-v-fbd05138]{background:var(--color-surface);border:.5px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.ui-card.is-elevated[data-v-fbd05138]{box-shadow:var(--shadow-md);border-color:transparent}.ui-card__head[data-v-fbd05138]{display:flex;align-items:center;gap:var(--space-2);padding:10px 14px;border-bottom:.5px solid var(--color-line);background:var(--color-surface);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.ui-card__body[data-v-fbd05138]{padding:14px;color:var(--color-text-muted)}.ui-card__foot[data-v-fbd05138]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding:10px 14px;border-top:.5px solid var(--color-line);background:var(--color-surface)}.ui-check[data-v-d4bf4026]{display:inline-flex;align-items:center;gap:var(--space-2);cursor:pointer}.ui-check.is-disabled[data-v-d4bf4026]{opacity:.5;cursor:not-allowed}.ui-check__input[data-v-d4bf4026]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.ui-check__box[data-v-d4bf4026]{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;flex:none;border:.5px solid var(--color-line-strong);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text-on-accent);transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out)}.ui-check.is-on .ui-check__box[data-v-d4bf4026]{background:var(--color-accent);border-color:var(--color-accent)}.ui-check__input:focus-visible+.ui-check__box[data-v-d4bf4026]{box-shadow:var(--p-focus-ring)}.ui-check__box svg[data-v-d4bf4026]{width:12px;height:12px}.ui-check__label[data-v-d4bf4026]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text)}.ctx-ring[data-v-de787cf2]{width:16px;height:16px;flex:none;transform:rotate(-90deg)}.ctx-ring-track[data-v-de787cf2]{stroke:var(--line)}.ctx-ring-fill[data-v-de787cf2]{stroke:var(--color-accent);transition:stroke-dashoffset .3s ease,stroke .3s ease}.ui-dialog__overlay[data-v-ebbc1a68]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:#0d111747;animation:kimi-dialog-overlay-in-ebbc1a68 var(--duration-base) var(--ease-out)}@keyframes kimi-dialog-overlay-in-ebbc1a68{0%{opacity:0}to{opacity:1}}.ui-dialog[data-v-ebbc1a68]{max-height:calc(100vh - var(--space-8) * 2);display:flex;flex-direction:column;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);outline:none;overflow:hidden;animation:kimi-card-in var(--duration-slow) var(--ease-out)}.ui-dialog--md[data-v-ebbc1a68]{width:min(440px,100%)}.ui-dialog--lg[data-v-ebbc1a68]{width:min(640px,100%)}.ui-dialog--xl[data-v-ebbc1a68]{width:min(var(--p-content-max),100%)}.ui-dialog--fixed-height[data-v-ebbc1a68]{height:min(680px,calc(100vh - var(--space-8) * 2))}.ui-dialog--grouped[data-v-ebbc1a68]{background:var(--color-bg)}.ui-dialog--flush .ui-dialog__body[data-v-ebbc1a68]{padding:0}.ui-dialog__head[data-v-ebbc1a68]{display:flex;align-items:flex-start;gap:var(--space-3);padding:20px 22px 14px}.ui-dialog__titles[data-v-ebbc1a68]{flex:1;min-width:0}.ui-dialog__title[data-v-ebbc1a68]{font-size:var(--text-lg);font-weight:500;color:var(--color-text);line-height:var(--leading-tight)}.ui-dialog__desc[data-v-ebbc1a68]{margin-top:4px;font-size:var(--text-base);color:var(--color-text-muted)}.ui-dialog__close[data-v-ebbc1a68]{flex:none;margin-top:-2px}.ui-dialog__body[data-v-ebbc1a68]{flex:1;min-height:0;padding:4px 22px 18px;color:var(--color-text);overflow:auto}.ui-dialog__foot[data-v-ebbc1a68]{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.ui-empty[data-v-6da80932]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-8) var(--space-4);text-align:center;color:var(--color-text-muted)}.ui-empty__icon[data-v-6da80932]{color:var(--color-text-faint)}.ui-empty__icon[data-v-6da80932] svg{width:48px;height:48px}.ui-empty__title[data-v-6da80932]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-empty__hint[data-v-6da80932]{font-size:var(--text-sm);color:var(--color-text-muted)}.ui-field[data-v-a8de5f7f]{display:flex;flex-direction:column;gap:6px}.ui-field__label[data-v-a8de5f7f]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-field__hint[data-v-a8de5f7f]{font-size:var(--text-xs);color:var(--color-text-faint)}.ui-field__error[data-v-a8de5f7f]{font-size:var(--text-xs);color:var(--color-danger)}.ui-input[data-v-f1cdf732]{width:100%;border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-overlay);box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-input--md[data-v-f1cdf732]{height:38px}.ui-input--sm[data-v-f1cdf732]{height:32px;font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-input[data-v-f1cdf732]::placeholder{color:var(--color-text-faint)}.ui-input[data-v-f1cdf732]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-input[data-v-f1cdf732]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-input[data-v-f1cdf732]:disabled{opacity:.5;cursor:not-allowed}.ui-input[readonly][data-v-f1cdf732]{background:var(--color-surface-sunken)}.ui-input.has-error[data-v-f1cdf732]{border-color:var(--color-danger)}.ui-input.has-error[data-v-f1cdf732]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}.ui-kbd[data-v-04b30ce2]{display:inline-flex;align-items:center;gap:3px;flex:none}.ui-kbd__key[data-v-04b30ce2]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:.5px solid var(--color-line);border-radius:var(--radius-xs);background:transparent;color:inherit;font-family:var(--font-kbd);font-size:11px;line-height:1}.ui-menu[data-v-9be2c64a]{min-width:180px;padding:3.5px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);display:flex;flex-direction:column}.ui-menu-item[data-v-3427559a]{display:flex;align-items:center;gap:7px;width:100%;padding:5px 9px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-option-label);line-height:var(--leading-tight);text-align:left;cursor:pointer;transition:background var(--duration-base),color var(--duration-base)}.ui-menu-item[data-v-3427559a]:hover:not(:disabled):not(.is-active):not(.is-danger){background:var(--color-hover);color:var(--color-text-strong)}.ui-menu-item[data-v-3427559a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-menu-item[data-v-3427559a]:disabled{opacity:.5;cursor:not-allowed}.ui-menu-item.is-active[data-v-3427559a]{background:var(--color-hover);color:var(--color-text)}.ui-menu-item.is-danger[data-v-3427559a]{color:var(--color-danger)}.ui-menu-item.is-danger[data-v-3427559a]:hover:not(:disabled){background:var(--color-danger-soft)}.ui-menu-item[data-v-3427559a] svg{display:block;width:16px;height:16px;flex:none;color:var(--muted);transition:color var(--duration-base)}.ui-menu-item[data-v-3427559a]:hover:not(:disabled):not(.is-active):not(.is-danger) svg{color:var(--color-text-strong)}.ui-menu-item.is-active[data-v-3427559a] svg{color:var(--color-text)}.ui-menu-item.is-danger[data-v-3427559a] svg{color:var(--color-danger)}.ui-menu-item--lg[data-v-3427559a]{min-height:44px;padding:12px 14px;font-size:var(--text-sm)}.ui-menu-sep[data-v-3427559a]{height:1px;margin:4px 0;background:var(--color-line)}.ui-tip[data-v-414bd903]{display:contents}.ui-panel-header[data-v-eb14b05d]{flex:none;display:flex;align-items:center;gap:var(--space-2);height:var(--panel-head-h, 48px);padding:0 var(--panel-head-inset, 11px) 0 var(--space-3);box-sizing:border-box;min-width:0;border-bottom:.5px solid var(--color-line);background:var(--color-surface-deep)}.ui-panel-header__title[data-v-eb14b05d]{flex:none;font:var(--weight-semibold) var(--ui-b2) var(--font-ui);color:var(--color-text)}.ui-panel-header__sub[data-v-eb14b05d]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--ui-c1) var(--font-mono);color:var(--color-text-muted)}.ui-panel-header__close[data-v-eb14b05d]{flex:none;margin-left:auto}.ui-panel-header.wrap[data-v-eb14b05d]{flex-wrap:wrap;height:auto;min-height:var(--panel-head-h, 48px);padding-top:3px;padding-bottom:3px;gap:4px 6px}.ui-panel-header.wrap .ui-panel-header__close[data-v-eb14b05d]{margin-left:0}.ui-pill[data-v-fe6a2873]{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:default;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}button.ui-pill[data-v-fe6a2873]{cursor:pointer}button.ui-pill[data-v-fe6a2873]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text-strong)}button.ui-pill[data-v-fe6a2873]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}button.ui-pill[data-v-fe6a2873]:disabled{opacity:.5;cursor:not-allowed}.ui-pill.is-active[data-v-fe6a2873]{background:var(--color-accent-soft);color:var(--color-accent)}.ui-pill[data-v-fe6a2873] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);flex:none;color:var(--color-text-faint)}.ui-scroll-area[data-v-9c504ebc]{position:relative;min-width:0;min-height:0;overflow:hidden}.ui-scroll-area__viewport[data-v-9c504ebc]{width:100%;height:100%;overscroll-behavior:contain;scrollbar-width:none}.ui-scroll-area__viewport[data-v-9c504ebc]::-webkit-scrollbar{display:none}.ui-scroll-area__viewport[data-v-9c504ebc]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ui-scroll-area__bar[data-v-9c504ebc]{position:absolute;z-index:3;opacity:0;pointer-events:none;touch-action:none;transition:opacity var(--duration-base) var(--ease-out)}.ui-scroll-area__bar.is-visible[data-v-9c504ebc]{opacity:1;pointer-events:auto}.ui-scroll-area__bar--vertical[data-v-9c504ebc]{inset:2px 2px 2px auto;width:10px}.ui-scroll-area__bar--horizontal[data-v-9c504ebc]{inset:auto 2px 2px;height:10px}.ui-scroll-area__thumb[data-v-9c504ebc]{position:absolute;display:block;border-radius:999px;background:color-mix(in srgb,var(--color-text-muted) 62%,transparent);transition:background var(--duration-fast) var(--ease-out),width var(--duration-fast) var(--ease-out),height var(--duration-fast) var(--ease-out)}.ui-scroll-area__bar--vertical .ui-scroll-area__thumb[data-v-9c504ebc]{right:1px;width:4px}.ui-scroll-area__bar--horizontal .ui-scroll-area__thumb[data-v-9c504ebc]{bottom:1px;height:4px}.ui-scroll-area__bar:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__thumb[data-v-9c504ebc]:active{background:color-mix(in srgb,var(--color-text-muted) 82%,transparent)}.ui-scroll-area__bar--vertical:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__bar--vertical .ui-scroll-area__thumb[data-v-9c504ebc]:active{width:6px}.ui-scroll-area__bar--horizontal:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__bar--horizontal .ui-scroll-area__thumb[data-v-9c504ebc]:active{height:6px}.ui-seg[data-v-b09ef1d1]{position:relative;display:inline-flex;gap:2px;padding:2px;background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md)}.ui-seg__indicator[data-v-b09ef1d1]{position:absolute;top:0;left:0;z-index:0;border-radius:var(--radius-sm);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);opacity:0;pointer-events:none;transition:transform var(--duration-base) var(--ease-out),width var(--duration-base) var(--ease-out),height var(--duration-base) var(--ease-out),opacity var(--duration-fast) var(--ease-out)}.ui-seg__indicator.is-ready[data-v-b09ef1d1]{opacity:1}.ui-seg__item[data-v-b09ef1d1]{position:relative;z-index:1;display:inline-flex;align-items:center;gap:var(--space-1);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-weight:var(--weight-medium);cursor:pointer;line-height:1;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-seg__swatch[data-v-b09ef1d1]{width:7px;height:7px;border:.5px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:50%;flex:none}.ui-seg__icon[data-v-b09ef1d1]{flex:none}.ui-seg--md .ui-seg__item[data-v-b09ef1d1]{padding:5px var(--space-3);font-size:var(--text-sm)}.ui-seg--sm .ui-seg__item[data-v-b09ef1d1]{height:24px;padding:0 var(--space-2);font-size:var(--text-sm)}.ui-seg--xs .ui-seg__item[data-v-b09ef1d1]{height:20px;padding:0 var(--space-2);font-size:var(--text-xs)}.ui-seg__item[data-v-b09ef1d1]:hover:not(.is-on){color:var(--color-text)}.ui-seg__item.is-on[data-v-b09ef1d1]{color:var(--color-text)}.ui-seg__item[data-v-b09ef1d1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-select[data-v-63f5dcbc]{position:relative;width:100%;font-family:var(--font-ui)}.ui-select.is-open[data-v-63f5dcbc]{z-index:var(--z-dropdown)}.ui-select__trigger[data-v-63f5dcbc]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:100%;padding:0 var(--space-3);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out)}.ui-select--md[data-v-63f5dcbc]{height:38px}.ui-select--sm[data-v-63f5dcbc]{height:32px}.ui-select--sm .ui-select__trigger[data-v-63f5dcbc]{font-size:var(--text-sm)}.ui-select__trigger[data-v-63f5dcbc]:hover:not(:disabled){border-color:var(--color-line-strong)}.ui-select__trigger[data-v-63f5dcbc]:focus-visible,.ui-select.is-open .ui-select__trigger[data-v-63f5dcbc]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-select.has-error .ui-select__trigger[data-v-63f5dcbc]{border-color:var(--color-danger)}.ui-select.has-error .ui-select__trigger[data-v-63f5dcbc]:focus-visible{box-shadow:0 0 0 3px var(--color-danger-soft)}.ui-select__value[data-v-63f5dcbc]{min-width:0;flex:1;display:flex;align-items:center;gap:var(--space-2);overflow:hidden;white-space:nowrap}.ui-select__value-text[data-v-63f5dcbc]{min-width:0;overflow:hidden;text-overflow:ellipsis}.ui-select__value.is-placeholder[data-v-63f5dcbc]{color:var(--color-text-faint)}.ui-select__icon[data-v-63f5dcbc]{flex:none;width:14px;height:14px;border-radius:3px}.ui-select__icon--option[data-v-63f5dcbc]{width:16px;height:16px;border-radius:4px}.ui-select__chevron[data-v-63f5dcbc]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-base) var(--ease-out)}.ui-select.is-open .ui-select__chevron[data-v-63f5dcbc]{transform:rotate(180deg)}.ui-select.is-disabled[data-v-63f5dcbc]{opacity:.5}.ui-select.is-disabled .ui-select__trigger[data-v-63f5dcbc]{cursor:not-allowed}.ui-select__menu[data-v-63f5dcbc]{position:absolute;z-index:var(--z-dropdown);top:calc(100% + var(--space-1));left:0;width:100%;max-height:260px;overflow-y:auto;padding:var(--space-1);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.ui-select__group[data-v-63f5dcbc]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ui-select__option[data-v-63f5dcbc]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.ui-select__option.is-active[data-v-63f5dcbc]{background:var(--color-hover);color:var(--color-text-strong)}.ui-select__option[data-v-63f5dcbc]:disabled{opacity:.45;cursor:not-allowed}.ui-select__check[data-v-63f5dcbc]{flex:none;color:transparent}.ui-select__option.is-selected .ui-select__check[data-v-63f5dcbc]{color:var(--color-accent)}.kw-dot[data-v-390a778a]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-text-faint);flex:none}.kw-dot--ok[data-v-390a778a]{background:var(--color-success)}.kw-dot--error[data-v-390a778a]{background:var(--color-danger)}.kw-dot--suspended[data-v-390a778a]{background:var(--color-warning)}.kw-dot--running[data-v-390a778a]{background:var(--color-accent);position:relative}.kw-dot--running[data-v-390a778a]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-full);background:color-mix(in srgb,var(--color-accent) 40%,transparent);animation:kw-dot-pulse-390a778a 1.4s var(--ease-out) infinite}@keyframes kw-dot-pulse-390a778a{0%{transform:scale(1);opacity:1}to{transform:scale(2.7);opacity:0}}.ui-switch[data-v-2fc56545]{position:relative;width:36px;height:20px;flex:none;padding:0;border:.5px solid var(--color-line-strong);border-radius:var(--radius-full);background:var(--color-line-strong);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ui-switch.is-on[data-v-2fc56545]{background:var(--color-accent)}.ui-switch[data-v-2fc56545]:disabled{opacity:.5;cursor:not-allowed}.ui-switch[data-v-2fc56545]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-switch__thumb[data-v-2fc56545]{position:absolute;top:1.5px;left:1.5px;width:16px;height:16px;border-radius:var(--radius-full);background:var(--color-text-on-accent);box-shadow:var(--shadow-xs);transform-origin:left center;transition:transform var(--duration-base) var(--ease-out)}.ui-switch:not(:disabled):hover .ui-switch__thumb[data-v-2fc56545]{transform:scaleX(1.125)}.ui-switch.is-on .ui-switch__thumb[data-v-2fc56545]{transform:translate(16px);transform-origin:right center}.ui-switch.is-on:not(:disabled):hover .ui-switch__thumb[data-v-2fc56545]{transform:translate(16px) scaleX(1.125)}.ui-toast[data-v-62bc76d1]{display:flex;align-items:flex-start;gap:11px;width:360px;max-width:100%;padding:13px 14px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);line-height:1.45}.ui-toast__icon[data-v-62bc76d1]{flex:none;width:20px;height:20px;margin-top:1px;border-radius:var(--radius-full);display:grid;place-items:center;background:var(--color-accent-soft);color:var(--color-accent)}.ui-toast__icon svg[data-v-62bc76d1]{width:12px;height:12px}.ui-toast--success .ui-toast__icon[data-v-62bc76d1]{background:var(--color-success-soft);color:var(--color-success)}.ui-toast--warning .ui-toast__icon[data-v-62bc76d1]{background:var(--color-warning-soft);color:var(--color-warning)}.ui-toast--danger .ui-toast__icon[data-v-62bc76d1]{background:var(--color-danger-soft);color:var(--color-danger)}.ui-toast--danger[data-v-62bc76d1]{border-color:color-mix(in srgb,var(--color-danger) 35%,transparent)}.ui-toast__body[data-v-62bc76d1]{flex:1;min-width:0}.ui-toast__title[data-v-62bc76d1]{font-size:var(--text-base);font-weight:500;color:var(--color-text);overflow-wrap:anywhere}.ui-toast__msg[data-v-62bc76d1]{margin-top:2px;font-size:var(--text-sm);color:var(--color-text-muted);overflow-wrap:anywhere}.ui-toast--danger .ui-toast__msg[data-v-62bc76d1]{color:var(--color-danger)}.ui-toast__close[data-v-62bc76d1]{flex:none;margin:-3px -4px 0 0}.sd-search[data-v-5bf43f78]{position:relative;margin:0 22px;padding-bottom:var(--space-1)}.sd-search[data-v-5bf43f78] .ui-input{padding-right:30px}.search-clear[data-v-5bf43f78]{position:absolute;top:0;bottom:var(--space-1);right:var(--space-2);margin-block:auto;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-hover);color:var(--color-text-faint);cursor:pointer;visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast),background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.search-clear.is-on[data-v-5bf43f78]{visibility:visible;opacity:1}.search-clear[data-v-5bf43f78]:hover{background:var(--color-selected);color:var(--color-text-muted)}.search-clear[data-v-5bf43f78]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}@media(prefers-reduced-motion:reduce){.search-clear[data-v-5bf43f78]{transition:none}}.sd-body[data-v-5bf43f78]{height:100%;min-height:0;display:flex;flex-direction:column;gap:var(--space-2);padding-top:4px}.sd-list[data-v-5bf43f78]{flex:1;min-height:0;overflow-y:auto;padding:var(--space-1) var(--space-2);--sd-gutter: var(--p-ic-md);--sd-gap: var(--space-2)}.sd-section[data-v-5bf43f78]{display:flex;align-items:baseline;gap:var(--space-1);padding:var(--space-2) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--color-text-faint);user-select:none}.sd-section-count[data-v-5bf43f78]{font-weight:var(--weight-regular)}.sd-section[data-v-5bf43f78]:first-child{padding-top:var(--space-1)}.sd-section[data-v-5bf43f78]:not(:first-child){margin-top:var(--space-1);border-top:var(--p-hairline) solid var(--color-line)}.sd-row[data-v-5bf43f78]{display:flex;flex-direction:column;gap:2px;width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:none;cursor:pointer;text-align:left;font-family:var(--font-ui);color:var(--color-text)}.sd-row[data-v-5bf43f78]:hover{background:var(--color-hover)}.sd-row.on[data-v-5bf43f78]{background:var(--color-selected)}.sd-row.active .sd-title[data-v-5bf43f78]{color:var(--color-accent-hover)}.sd-row-ws[data-v-5bf43f78]{flex-direction:row;align-items:center;gap:var(--sd-gap)}.sd-folder[data-v-5bf43f78]{flex:none;width:var(--sd-gutter);color:var(--color-text-muted)}.sd-ws-name[data-v-5bf43f78]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.sd-ws-path[data-v-5bf43f78]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;font-size:var(--text-xs);color:var(--color-text-faint)}.sd-line1[data-v-5bf43f78],.sd-line2[data-v-5bf43f78]{padding-left:calc(var(--sd-gutter) + var(--sd-gap))}.sd-line1[data-v-5bf43f78]{display:flex;align-items:baseline;gap:var(--space-2);min-width:0}.sd-title[data-v-5bf43f78]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.sd-time[data-v-5bf43f78]{flex:none;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.sd-line2[data-v-5bf43f78]{display:flex;align-items:center;gap:var(--space-1);min-width:0;font-size:var(--text-xs);color:var(--color-text-muted)}.sd-meta-ws[data-v-5bf43f78]{flex:none;max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-meta-sep[data-v-5bf43f78]{color:var(--color-text-faint)}.sd-meta-snippet[data-v-5bf43f78]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-title[data-v-5bf43f78] mark,.sd-ws-name[data-v-5bf43f78] mark{background:var(--color-accent-soft);color:inherit;font-weight:var(--weight-semibold);border-radius:var(--radius-xs);padding:0 1px}.sd-line2[data-v-5bf43f78] mark,.sd-ws-path[data-v-5bf43f78] mark{background:var(--color-accent-soft);color:var(--color-text);font-weight:var(--weight-medium);border-radius:var(--radius-xs);padding:0 1px}.sd-empty[data-v-5bf43f78]{height:100%;display:flex;align-items:center;justify-content:center}.sd-foot[data-v-5bf43f78]{flex:none;display:flex;align-items:center;gap:var(--space-1);padding:var(--space-2) var(--space-4);border-top:.5px solid var(--color-line);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.sd-hint[data-v-5bf43f78]{display:inline-flex;align-items:center;gap:var(--space-1)}.sd-dot[data-v-5bf43f78]{margin:0 var(--space-1)}:where(.markstream-vue) button{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.markstream-vue li:has(.checkbox-node){list-style-type:none;margin-left:calc(-1 * var(--ms-flow-list-indent))}.markstream-vue .text-node{white-space:pre-wrap;overflow-wrap:break-word}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.markstream-vue .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.markstream-vue .pointer-events-none{pointer-events:none}.markstream-vue .\!visible{visibility:visible!important}.markstream-vue .visible{visibility:visible}.markstream-vue .collapse{visibility:collapse}.markstream-vue .static{position:static}.markstream-vue .fixed{position:fixed}.markstream-vue .absolute{position:absolute}.markstream-vue .relative{position:relative}.markstream-vue .inset-0{inset:0}.markstream-vue .right-2{right:8px}.markstream-vue .right-6{right:24px}.markstream-vue .top-2{top:8px}.markstream-vue .top-6{top:24px}.markstream-vue .z-10{z-index:10}.markstream-vue .z-50{z-index:50}.markstream-vue .m-0{margin:0}.markstream-vue .mx-0\.5{margin-left:2px;margin-right:2px}.markstream-vue .mr-2{margin-right:8px}.markstream-vue .mt-2{margin-top:8px}.markstream-vue .block{display:block}.markstream-vue .inline{display:inline}.markstream-vue .flex{display:flex}.markstream-vue .inline-flex{display:inline-flex}.markstream-vue .table{display:table}.markstream-vue .flow-root{display:flow-root}.markstream-vue .grid{display:grid}.markstream-vue .contents{display:contents}.markstream-vue .list-item{display:list-item}.markstream-vue .hidden{display:none}.markstream-vue .h-4{height:16px}.markstream-vue .h-full{height:100%}.markstream-vue .max-h-full{max-height:100%}.markstream-vue .min-h-full{min-height:100%}.markstream-vue .w-2\/3{width:66.666667%}.markstream-vue .w-4{width:16px}.markstream-vue .w-4\/5{width:80%}.markstream-vue .w-full{width:100%}.markstream-vue .min-w-\[160px\]{min-width:160px}.markstream-vue .max-w-full{max-width:100%}.markstream-vue .flex-1{flex:1 1 0%}.markstream-vue .flex-shrink{flex-shrink:1}.markstream-vue .flex-shrink-0{flex-shrink:0}.markstream-vue .shrink{flex-shrink:1}.markstream-vue .shrink-0{flex-shrink:0}.markstream-vue .border-collapse{border-collapse:collapse}.markstream-vue .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.markstream-vue .animate-spin{animation:spin 1s linear infinite}.markstream-vue .cursor-grab{cursor:grab}.markstream-vue .cursor-grabbing{cursor:grabbing}.markstream-vue .cursor-not-allowed{cursor:not-allowed}.markstream-vue .cursor-pointer{cursor:pointer}.markstream-vue .resize{resize:both}.markstream-vue .list-decimal{list-style-type:decimal}.markstream-vue .list-disc{list-style-type:disc}.markstream-vue .flex-wrap{flex-wrap:wrap}.markstream-vue .items-center{align-items:center}.markstream-vue .items-baseline{align-items:baseline}.markstream-vue .justify-center{justify-content:center}.markstream-vue .justify-between{justify-content:space-between}.markstream-vue .gap-0\.5{gap:2px}.markstream-vue .gap-1\.5{gap:6px}.markstream-vue .gap-2{gap:8px}.markstream-vue .gap-\[var\(--ms-gap-header-actions\)\]{gap:var(--ms-gap-header-actions)}.markstream-vue .gap-x-1{-moz-column-gap:4px;column-gap:4px}.markstream-vue .gap-x-2{-moz-column-gap:8px;column-gap:8px}.markstream-vue .overflow-hidden{overflow:hidden}.markstream-vue .overflow-x-auto{overflow-x:auto}.markstream-vue .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markstream-vue .whitespace-nowrap{white-space:nowrap}.markstream-vue .whitespace-pre-wrap{white-space:pre-wrap}.markstream-vue .rounded{border-radius:calc(var(--ms-radius) * .5)}.markstream-vue .rounded-lg{border-radius:var(--ms-radius)}.markstream-vue .rounded-md{border-radius:calc(var(--ms-radius) * .75)}.markstream-vue .border{border-width:1px}.markstream-vue .border-b{border-bottom-width:1px}.markstream-vue .border-t{border-top-width:1px}.markstream-vue .border-\[var\(--code-border\)\]{border-color:var(--code-border)}.markstream-vue .border-\[var\(--footnote-border\)\]{border-color:var(--footnote-border)}.markstream-vue .border-\[var\(--hr-border\)\]{border-color:var(--hr-border)}.markstream-vue .bg-\[hsl\(var\(--ms-popover\)\)\]{background-color:hsl(var(--ms-popover))}.markstream-vue .bg-\[var\(--code-header-bg\)\]{background-color:var(--code-header-bg)}.markstream-vue .p-0{padding:0}.markstream-vue .p-1{padding:4px}.markstream-vue .p-4{padding:16px}.markstream-vue .p-\[var\(--ms-action-btn-padding\)\]{padding:var(--ms-action-btn-padding)}.markstream-vue .px-1\.5{padding-left:6px;padding-right:6px}.markstream-vue .px-2{padding-left:8px;padding-right:8px}.markstream-vue .px-4{padding-left:16px;padding-right:16px}.markstream-vue .px-\[var\(--ms-inset-panel-x\)\]{padding-left:var(--ms-inset-panel-x);padding-right:var(--ms-inset-panel-x)}.markstream-vue .py-0\.5{padding-top:2px;padding-bottom:2px}.markstream-vue .py-1\.5{padding-top:6px;padding-bottom:6px}.markstream-vue .py-\[var\(--ms-inset-panel-y\)\]{padding-top:var(--ms-inset-panel-y);padding-bottom:var(--ms-inset-panel-y)}.markstream-vue .pb-3{padding-bottom:12px}.markstream-vue .pt-2{padding-top:8px}.markstream-vue .text-left{text-align:left}.markstream-vue .text-center{text-align:center}.markstream-vue .text-right{text-align:right}.markstream-vue .font-mono{font-family:var(--ms-font-mono)}.markstream-vue .text-\[length\:var\(--ms-text-label\)\]{font-size:var(--ms-text-label)}.markstream-vue .text-sm{font-size:14px;line-height:20px}.markstream-vue .text-xs{font-size:12px;line-height:16px}.markstream-vue .font-medium{font-weight:500}.markstream-vue .font-semibold{font-weight:600}.markstream-vue .uppercase{text-transform:uppercase}.markstream-vue .lowercase{text-transform:lowercase}.markstream-vue .italic{font-style:italic}.markstream-vue .leading-\[normal\]{line-height:normal}.markstream-vue .leading-none{line-height:1}.markstream-vue .leading-relaxed{line-height:1.625}.markstream-vue .text-\[\#0366d6\]{--tw-text-opacity: 1;color:rgb(3 102 214 / var(--tw-text-opacity, 1))}.markstream-vue .text-\[hsl\(var\(--ms-popover-foreground\)\)\]{color:hsl(var(--ms-popover-foreground))}.markstream-vue .text-\[var\(--code-action-fg\)\]{color:var(--code-action-fg)}.markstream-vue .text-\[var\(--code-fg\)\]{color:var(--code-fg)}.markstream-vue .underline{text-decoration-line:underline}.markstream-vue .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markstream-vue .opacity-0{opacity:0}.markstream-vue .opacity-50{opacity:.5}.markstream-vue .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.markstream-vue .shadow-\[var\(--ms-shadow-popover\)\]{--tw-shadow-color: var(--ms-shadow-popover);--tw-shadow: var(--tw-shadow-colored)}.markstream-vue .outline{outline-style:solid}.markstream-vue .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-\[height\]{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.markstream-vue .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.markstream-vue{--ms-background: 0 0% 100%;--ms-foreground: 0 0% 10%;--ms-muted: 0 0% 96.5%;--ms-muted-foreground: 0 0% 43%;--ms-secondary: 0 0% 93.5%;--ms-secondary-foreground: 0 0% 10%;--ms-accent: 0 0% 91%;--ms-accent-foreground: 0 0% 10%;--ms-primary: 0 0% 10%;--ms-primary-foreground: 0 0% 100%;--ms-destructive: 0 62% 52%;--ms-destructive-foreground: 0 0% 100%;--ms-border: 0 0% 87%;--ms-ring: 0 0% 10%;--ms-popover: 0 0% 100%;--ms-popover-foreground: 0 0% 10%;--ms-radius: 8px;--ms-info: 215 60% 50%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 56% 39%;--ms-success-foreground: 0 0% 100%;--ms-warning: 38 64% 46%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 50% 36%;--ms-diff-removed: 0 58% 48%;--ms-highlight: 50 60% 72%;--ms-highlight-foreground: 0 0% 0%;--ms-font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--ms-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace}.dark .markstream-vue,.markstream-vue.dark{--ms-background: 0 0% 7%;--ms-foreground: 0 0% 93%;--ms-muted: 0 0% 12%;--ms-muted-foreground: 0 0% 60%;--ms-secondary: 0 0% 16%;--ms-secondary-foreground: 0 0% 93%;--ms-accent: 0 0% 24%;--ms-accent-foreground: 0 0% 93%;--ms-primary: 0 0% 93%;--ms-primary-foreground: 0 0% 10%;--ms-destructive: 0 60% 50%;--ms-destructive-foreground: 0 0% 93%;--ms-border: 0 0% 20%;--ms-ring: 0 0% 80%;--ms-popover: 0 0% 9%;--ms-popover-foreground: 0 0% 93%;--ms-info: 215 55% 62%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 48% 55%;--ms-success-foreground: 0 0% 100%;--ms-warning: 32 65% 58%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 42% 60%;--ms-diff-removed: 0 58% 58%;--ms-highlight: 48 65% 50%;--ms-highlight-foreground: 0 0% 0%;--ms-shadow-subtle: 0 1px 3px 0 hsl(0 0% 0% / .25);--ms-shadow-popover: 0 4px 6px -1px hsl(0 0% 0% / .2), 0 2px 4px -2px hsl(0 0% 0% / .15);--ms-shadow-modal: 0 10px 15px -3px hsl(0 0% 0% / .5), 0 4px 6px -4px hsl(0 0% 0% / .4);--ms-shadow-preview: 0 10px 40px hsl(0 0% 0% / .6);--tooltip-bg: hsl(0 0% 12%);--tooltip-fg: hsl(0 0% 72%);--code-bg: #111827;--code-header-bg: hsl(var(--ms-muted));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 12%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 12%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 12%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 12%, transparent)}.markstream-vue{font-family:var(--ms-font-sans);font-size:var(--ms-text-body);line-height:var(--ms-leading-body);--inline-code-bg: hsl(var(--ms-secondary));--inline-code-fg: hsl(var(--ms-foreground) / .75);--inline-code-border: hsl(var(--ms-border) / .9);--code-bg: #fff;--code-fg: hsl(var(--ms-foreground));--code-border: hsl(var(--ms-border));--code-header-bg: hsl(var(--ms-secondary));--code-selection-bg: hsl(var(--ms-accent) / .3);--code-line-number: hsl(var(--ms-muted-foreground));--markstream-code-line-number-align: right;--code-action-fg: hsl(var(--ms-muted-foreground));--code-action-hover-bg: hsl(var(--ms-accent));--code-action-hover-fg: hsl(var(--ms-accent-foreground));--code-action-active-bg: hsl(var(--ms-primary));--code-action-active-fg: hsl(var(--ms-primary-foreground));--diff-added-fg: hsl(var(--ms-diff-added));--diff-removed-fg: hsl(var(--ms-diff-removed));--diff-added-bg: hsl(var(--ms-diff-added) / .1);--diff-added-inline-bg: hsl(var(--ms-diff-added) / .2);--diff-removed-bg: hsl(var(--ms-diff-removed) / .1);--diff-removed-inline-bg: hsl(var(--ms-diff-removed) / .2);--blockquote-border: hsl(var(--ms-muted-foreground) / .2);--admonition-bg: hsl(var(--ms-muted));--admonition-border: hsl(var(--ms-border));--admonition-fg: hsl(var(--ms-foreground));--admonition-muted: hsl(var(--ms-muted-foreground));--admonition-header-bg: hsl(var(--ms-muted) / .5);--admonition-note: hsl(var(--ms-info));--admonition-tip: hsl(var(--ms-success));--admonition-warning: hsl(var(--ms-warning));--admonition-danger: hsl(var(--ms-destructive));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 6%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 6%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 6%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 6%, transparent);--table-border: hsl(var(--ms-border));--table-header-bg: hsl(var(--ms-muted));--link-color: hsl(var(--ms-info));--list-marker: hsl(var(--ms-muted-foreground) / .5);--list-counter-marker: hsl(var(--ms-muted-foreground));--hr-border: hsl(var(--ms-border));--highlight-bg: hsl(var(--ms-highlight));--footnote-border: hsl(var(--ms-border));--tooltip-bg: hsl(0 0% 18%);--tooltip-fg: hsl(0 0% 88%);--tooltip-border: hsl(var(--ms-border));--modal-overlay: hsl(0 0% 0% / .7);--modal-bg: hsl(var(--ms-popover));--modal-fg: hsl(var(--ms-popover-foreground));--diagram-bg: hsl(var(--ms-muted));--diagram-border: hsl(var(--ms-border));--diagram-header-bg: hsl(var(--ms-muted));--loading-spinner: hsl(var(--ms-muted-foreground));--loading-shimmer: hsl(var(--ms-muted) / .5);--image-placeholder-bg: hsl(var(--ms-muted));--focus-ring: hsl(var(--ms-ring));--ms-space-1: 4px;--ms-space-1_5: 6px;--ms-space-2: 8px;--ms-space-2_5: 10px;--ms-space-3: 12px;--ms-space-4: 16px;--ms-space-5: 20px;--ms-space-6: 24px;--ms-space-8: 32px;--ms-space-12: 48px;--ms-flow-paragraph-y: 1.5em;--ms-flow-list-y: 1em;--ms-flow-list-item-y: .25em;--ms-flow-list-indent: 1.625em ;--ms-flow-list-indent-mobile: calc(14 / 9 * 1em);--ms-flow-table-y: 2em;--ms-flow-table-cell: .5em .75em;--ms-flow-blockquote-y: 1.25em;--ms-flow-blockquote-indent: 1.25em;--ms-flow-admonition-y: 1.25em;--ms-flow-footnote-y: .5em;--ms-flow-hr-y: 2.5em;--ms-flow-diagram-y: 1.5em;--ms-flow-codeblock-y: 1.5em;--ms-flow-definition-term-mt: .75em;--ms-flow-definition-desc-ml: 1.25em;--ms-flow-definition-desc-mb: .5em;--ms-flow-heading-1-mt: 0;--ms-flow-heading-1-mb: 1em;--ms-flow-heading-2-mt: 2em;--ms-flow-heading-2-mb: .75em;--ms-flow-heading-3-mt: 1.5em;--ms-flow-heading-3-mb: .6em;--ms-flow-heading-4-mt: 1.25em;--ms-flow-heading-4-mb: .4em;--ms-flow-heading-5-mt: 1em;--ms-flow-heading-5-mb: .25em;--ms-flow-heading-6-mt: 1em;--ms-flow-heading-6-mb: .25em;--ms-text-body: 16px;--ms-leading-body: 1.75;--ms-text-h1: 36px;--ms-text-h2: 24px;--ms-text-h3: 20px;--ms-text-h4: 16px;--ms-text-h5: 16px;--ms-text-h6: 16px;--ms-leading-h1: 1.2;--ms-leading-h2: 1.35;--ms-leading-h3: 1.5;--ms-weight-h1: 700;--ms-weight-h2: 600;--ms-weight-h3: 600;--ms-weight-h4: 600;--ms-text-label: 12px;--ms-action-btn-padding: 6px;--ms-action-btn-icon: 14px;--ms-inset-panel-x: 10px;--ms-inset-panel-y: 6px;--ms-inset-panel-body-sm: 8px;--ms-inset-panel-body: 16px;--ms-inset-admonition-body-top: 8px;--ms-inset-admonition-body-bottom: 12px;--ms-gap-header: var(--ms-space-4);--ms-gap-header-main: var(--ms-space-2_5);--ms-gap-header-actions: var(--ms-space-2);--ms-shadow-subtle: 0 1px 3px 0 hsl(var(--ms-foreground) / .06);--ms-shadow-popover: 0 4px 6px -1px hsl(var(--ms-foreground) / .1), 0 2px 4px -2px hsl(var(--ms-foreground) / .1);--ms-shadow-modal: 0 10px 15px -3px hsl(var(--ms-foreground) / .1), 0 4px 6px -4px hsl(var(--ms-foreground) / .1);--ms-shadow-preview: 0 10px 40px hsl(var(--ms-foreground) / .25);--ms-duration-fast: .12s;--ms-duration-standard: .18s;--ms-duration-overlay: .2s;--ms-duration-emphasis: .22s;--ms-duration-slow: .3s;--ms-duration-stream: .28s;--ms-ease-linear: linear;--ms-ease-standard: ease;--ms-ease-out: ease-out;--ms-ease-in-out: ease-in-out;--ms-ease-spring: cubic-bezier(.16, 1, .3, 1);--ms-border-width: 1px;--ms-border-width-strong: 4px;--ms-focus-ring-width: 2px;--ms-focus-ring-offset: 2px;--ms-size-diagram-min-height: 360px;--ms-size-code-max-height: 500px;--ms-size-image-max-width: 384px;--ms-size-image-min-width: 128px;--ms-size-image-min-height: 1.5em;--ms-size-math-min-height: 40px;--ms-size-skeleton-min-height: 120px}body>div[id^=dmermaid-]{position:fixed;top:-10000px;left:0;width:100%;visibility:hidden;pointer-events:none}.markstream-vue .hover\:bg-\[var\(--code-action-hover-bg\)\]:hover{background-color:var(--code-action-hover-bg)}.markstream-vue .hover\:text-\[var\(--code-action-hover-fg\)\]:hover{color:var(--code-action-hover-fg)}.markstream-vue .hover\:underline:hover{text-decoration-line:underline}.markstream-vue .active\:scale-\[0\.96\]:active{--tw-scale-x: .96;--tw-scale-y: .96;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.markstream-vue .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.markstream-vue .disabled\:opacity-40:disabled{opacity:.4}.checkbox-node[data-v-be21ab83]{display:inline-flex;align-items:center;margin-right:.5em;vertical-align:-.15em}.checkbox-icon[data-v-be21ab83]{flex-shrink:0}.checkbox-unchecked[data-v-be21ab83]{color:hsl(var(--ms-muted-foreground) / .5)}.checkbox-checked[data-v-be21ab83]{color:hsl(var(--ms-info))}.emoji-node[data-v-de55dc97]{display:inline-block}.footnote-reference[data-v-c1463a29]{font-size:.75em;line-height:0}.footnote-link[data-v-c1463a29]{color:var(--link-color);text-decoration:none}.footnote-link[data-v-c1463a29]:hover{text-decoration:underline}.html-inline-node[data-v-d17f12b0]{display:inline}.html-inline-node--loading[data-v-d17f12b0]{opacity:.85}.inline-code[data-v-4e331c97]{display:inline;font-family:var(--ms-font-mono);font-size:.8125em;line-height:inherit;color:var(--inline-code-fg);background-color:var(--inline-code-bg);padding:.15em .35em;border-radius:.25em;white-space:normal;word-break:break-word;max-width:100%;-webkit-box-decoration-break:clone;box-decoration-break:clone}.inline-code-stream-delta[data-v-4e331c97]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both}.inline-code-stream-delta--a[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-a-4e331c97}.inline-code-stream-delta--b[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-b-4e331c97}@keyframes inline-code-stream-update-fade-a-4e331c97{0%{opacity:0}to{opacity:1}}@keyframes inline-code-stream-update-fade-b-4e331c97{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.inline-code-stream-delta[data-v-4e331c97]{animation:none!important}}.image-node-container[data-v-046e82ac]{display:inline-block;position:relative;vertical-align:middle;max-width:var(--ms-size-image-max-width)}.image-node__img[data-v-046e82ac]{display:inline-block;max-width:100%;min-width:var(--ms-size-image-min-width);min-height:var(--ms-size-image-min-height);height:auto;vertical-align:middle;transition:opacity var(--ms-duration-emphasis) var(--ms-ease-standard)}.image-node__img.is-loading[data-v-046e82ac]{opacity:0}.image-node__img.is-loaded[data-v-046e82ac]{opacity:1}.image-node__img.has-natural-size[data-v-046e82ac]{min-width:0;min-height:0}.image-placeholder[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:var(--ms-size-image-min-width);min-height:128px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));overflow:hidden;vertical-align:middle}.image-shimmer-overlay[data-v-046e82ac]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:hsl(var(--ms-muted));overflow:hidden}.image-shimmer-overlay .image-shimmer[data-v-046e82ac]{width:100%;height:100%}.image-shimmer[data-v-046e82ac]{display:block;width:100%;height:100%;min-height:128px;background:linear-gradient(90deg,hsl(var(--ms-muted)),hsl(var(--ms-muted-foreground) / .06),hsl(var(--ms-muted)));background-size:200% 100%;animation:image-shimmer-046e82ac 1.5s ease-in-out infinite}.image-node-container[data-markstream-viewport-pending=true] .image-shimmer[data-v-046e82ac]{animation:none}@keyframes image-shimmer-046e82ac{0%{background-position:100% 0}to{background-position:-100% 0}}.image-error[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:16px 24px;min-height:64px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground));font-size:var(--ms-text-label);vertical-align:middle}.image-node__raw-text[data-v-046e82ac]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}@media(prefers-reduced-motion:reduce){.image-shimmer[data-v-046e82ac]{animation:none!important}}.markstream-vue pre[class^=language-],.markstream-vue pre[class*=" language-"]{white-space:pre;overflow:auto;-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-variant-ligatures:none;contain:content;backface-visibility:hidden;transform:translateZ(0);-webkit-font-smoothing:antialiased}.markstream-vue pre[class^=language-]>code,.markstream-vue pre[class*=" language-"]>code{display:block}.markstream-vue pre[data-markstream-pre="1"]:not(.markstream-pre--diff-preview){background:var(--code-bg);color:var(--code-fg)}.markstream-vue pre.markstream-pre--line-numbers{position:relative}.markstream-vue pre.code-pre-fallback[data-markstream-code-loading="1"]{--markstream-pre-line-number-top: var(--markstream-code-padding-y, 8px);--markstream-pre-line-number-left: 0px;--markstream-pre-line-number-width: 2ch;--markstream-pre-line-number-padding-left: 2ch;--markstream-pre-line-number-padding-right: 1ch;--markstream-pre-line-number-separator-width: 2px;--markstream-code-padding-left: calc(6ch + 2px) ;box-sizing:border-box;width:100%;margin:0;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left);overflow:auto;border:0;border-radius:0;background:var(--code-bg);color:var(--code-fg);font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace );font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers{position:absolute;top:var(--markstream-pre-line-number-top, 0);left:var(--markstream-pre-line-number-left, 0);box-sizing:content-box;display:flex;flex-direction:column;align-items:flex-end;width:var(--markstream-pre-line-number-width, 2ch);min-width:var(--markstream-pre-line-number-width, 2ch);padding-left:var(--markstream-pre-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-line-number-padding-right, 1ch);border-right:var(--markstream-pre-line-number-separator-width, 2px) solid transparent;color:var(--code-line-number);font:inherit;font-variant-numeric:tabular-nums;line-height:inherit;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--line-numbers:not(.markstream-pre--diff-preview):not(.code-pre-fallback)>.markstream-pre__code{box-sizing:border-box;min-width:100%;padding-left:var(--markstream-code-padding-left, 52px);padding-right:var(--markstream-code-padding-x, 12px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-number{display:block;min-height:1lh}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-numbers-text{display:block;min-height:1lh;text-align:right;white-space:pre}.markstream-vue pre.markstream-pre--diff-preview{box-sizing:border-box;padding-left:0;padding-right:0;width:100%;--markstream-pre-diff-gutter-marker-width: var(--stream-monaco-gutter-marker-width, 4px);--markstream-pre-diff-gutter-gap: var(--stream-monaco-gutter-gap, 1ch);--markstream-pre-diff-code-gap: var(--stream-monaco-diff-code-gap, 1ch);--markstream-pre-diff-code-padding: var(--stream-monaco-diff-code-padding, 0px);--markstream-diff-added-fg: var(--diff-added-fg, #2f8f68);--markstream-diff-removed-fg: var(--diff-removed-fg, #c24141);--markstream-diff-added-line-fill: var(--diff-added-bg, rgb(47 143 104 / 12%));--markstream-diff-removed-line-fill: var(--diff-removed-bg, rgb(194 65 65 / 12%));--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-diff-removed-gutter: linear-gradient( 90deg, var(--markstream-diff-removed-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-pre-diff-line-number-width: var( --stream-monaco-line-number-width, 2ch );--markstream-pre-diff-line-number-padding-left: var(--stream-monaco-line-number-padding-left, 2ch);--markstream-pre-diff-line-number-padding-right: var(--stream-monaco-line-number-padding-right, 1ch);--markstream-pre-diff-line-number-separator-width: var(--stream-monaco-line-number-separator-width, 2px);--markstream-pre-diff-line-number-box-width: calc( var(--markstream-pre-diff-line-number-padding-left) + var(--markstream-pre-diff-line-number-width) + var(--markstream-pre-diff-line-number-padding-right) + var(--markstream-pre-diff-line-number-separator-width) );--markstream-pre-diff-line-number-bg: var( --stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg, transparent) );--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-original-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );--markstream-pre-diff-line-number-align: var(--markstream-diff-line-number-align, right);--markstream-pre-diff-code-fill-left: calc( var(--markstream-pre-diff-line-number-left) + var(--markstream-pre-diff-line-number-box-width) );--markstream-pre-diff-code-left: calc( var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-line-number-gap-to-code) + var(--markstream-pre-diff-code-padding) )}.markstream-vue pre.markstream-pre--diff-preview::-webkit-scrollbar{width:12px;height:12px}.markstream-vue pre.markstream-pre--diff-preview.is-wrap{white-space:pre-wrap;overflow-wrap:anywhere}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline{--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px )}.markstream-vue pre.markstream-pre--diff-preview>.markstream-pre__diff-code{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);font:inherit;line-height:inherit;min-width:100%;width:100%}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline>.markstream-pre__diff-code{grid-template-columns:minmax(0,1fr)}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap)>.markstream-pre__diff-code{grid-template-columns:minmax(100%,max-content);width:100%;min-width:-moz-max-content;min-width:max-content}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane{min-width:0;overflow:hidden}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{overflow-x:auto;overflow-y:hidden}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane-content{display:block;min-width:100%}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane-content{width:-moz-max-content;width:max-content}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap) .markstream-pre__diff-pane{min-width:-moz-max-content;min-width:max-content;width:100%;overflow:visible}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane--modified{--markstream-pre-diff-pane-divider-width: 1px;--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );box-shadow:inset 1px 0 var(--markstream-diff-pane-divider, hsl(var(--ms-border)))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified{--markstream-pre-diff-line-number-left: calc( var(--stream-monaco-line-number-left, 0px) + var(--markstream-pre-diff-pane-divider-width) )}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-rail{left:var(--markstream-pre-diff-pane-divider-width)}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line{padding-left:calc(var(--markstream-pre-diff-code-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line:before{left:calc(var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline .markstream-pre__diff-pane--modified{box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line{position:relative;display:block;box-sizing:border-box;width:100%;min-width:100%;min-height:var( --markstream-pre-diff-synced-row-height, var(--markstream-pre-diff-line-height, 18px) );padding-left:var(--markstream-pre-diff-code-left);line-height:var(--markstream-pre-diff-line-height, 18px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:before{content:"";position:absolute;left:var(--markstream-pre-diff-code-fill-left);right:0;top:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;border-radius:0;background:transparent}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:after{content:"";position:absolute;left:var(--markstream-pre-diff-line-number-left);top:0;width:var(--markstream-pre-diff-line-number-box-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-rail{position:absolute;z-index:2;top:0;left:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );width:var(--markstream-pre-diff-gutter-marker-width, 4px);min-width:var(--markstream-pre-diff-gutter-marker-width, 4px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-number{position:absolute;z-index:1;top:0;left:var(--markstream-pre-diff-line-number-left);width:var(--markstream-pre-diff-line-number-width);min-width:var(--markstream-pre-diff-line-number-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );box-sizing:content-box;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none;padding-left:var(--markstream-pre-diff-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-diff-line-number-padding-right, 1ch);border-right:var(--markstream-pre-diff-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg, var(--code-bg));color:var(--code-line-number);font-variant-numeric:tabular-nums;line-height:var(--markstream-pre-diff-line-height, 18px);text-align:var(--markstream-pre-diff-line-number-align, right);-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent));color:var(--stream-monaco-added-fg, var(--markstream-diff-added-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent));color:var(--stream-monaco-removed-fg, var(--markstream-diff-removed-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content{position:relative;z-index:1;display:block;width:-moz-max-content;width:max-content;min-width:100%;line-height:var(--markstream-pre-diff-line-height, 18px);white-space:inherit;overflow-wrap:normal;word-break:normal;line-break:auto}.markstream-vue pre.markstream-pre--diff-preview.is-wrap .markstream-pre__diff-content{width:auto;min-width:0;overflow-wrap:inherit}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content-inner{white-space:inherit;overflow-wrap:inherit;word-break:inherit;line-break:inherit;-webkit-box-decoration-break:clone;box-decoration-break:clone}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk{color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk:before{background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:before{background-image:linear-gradient(-45deg,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 12.5%,transparent 12.5%,transparent 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 62.5%,transparent 62.5%,transparent 100%);background-size:10px 10px;opacity:.38}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-number,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-content{display:none}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-collapsed:not(.code-pre-fallback){height:auto!important;min-height:0!important}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed{min-height:28px;padding-left:0;color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)));line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:before{left:0;height:28px;background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, rgb(0 0 0 / 4%)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-number{display:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-content{width:100%;min-width:0;padding-left:calc(var(--markstream-pre-diff-code-left) + 12px);line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:before{background:linear-gradient(var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent)),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:before{background:linear-gradient(var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent)),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:after{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))}.markstream-vue pre[class^=language-]:focus,.markstream-vue pre[class*=" language-"]:focus{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.text-node[data-v-fd79037c]{display:inline;font-weight:inherit;vertical-align:baseline}.text-node-center[data-v-fd79037c]{display:inline-flex;justify-content:center;width:100%}.text-node-stream-delta[data-v-fd79037c]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both;will-change:opacity}.text-node-stream-delta--a[data-v-fd79037c]{animation-name:text-node-stream-update-fade-a-fd79037c}.text-node-stream-delta--b[data-v-fd79037c]{animation-name:text-node-stream-update-fade-b-fd79037c}@keyframes text-node-stream-update-fade-a-fd79037c{0%{opacity:0}to{opacity:1}}@keyframes text-node-stream-update-fade-b-fd79037c{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.text-node-stream-delta[data-v-fd79037c]{animation:none!important}}.reference-node[data-v-775c65e4]{background-color:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground))}.reference-node[data-v-775c65e4]:hover{background-color:hsl(var(--ms-secondary))}.superscript-node[data-v-24160b22]{font-size:.8em;vertical-align:super}.subscript-node[data-v-197fa13b]{font-size:.8em;vertical-align:sub}.strong-node[data-v-a8647104]{font-weight:700}.strikethrough-node[data-v-b7a531fa]{text-decoration:line-through}.link-node[data-v-367e6ca4]{color:var(--link-color);text-decoration:none}.link-node[data-v-367e6ca4]:hover{text-decoration:underline;text-underline-offset:3.2px}.link-loading .link-text-wrapper[data-v-367e6ca4]{position:relative}.link-loading[data-v-367e6ca4]{color:var(--link-color)}.link-loading .link-text[data-v-367e6ca4]{position:relative;z-index:2}.link-loading-indicator[data-v-367e6ca4]{position:absolute;left:0;right:0;height:var(--underline-height, 2px);bottom:var(--underline-bottom, -3px);background:currentColor;border-radius:999px;will-change:opacity;opacity:var(--underline-rest-opacity, .18);animation:underlinePulse-367e6ca4 var(--underline-duration, 1.6s) var(--underline-timing, ease-in-out) var(--underline-iteration, infinite)}@keyframes underlinePulse-367e6ca4{0%,to{opacity:var(--underline-rest-opacity, .18)}50%{opacity:var(--underline-opacity, .35)}}@media(prefers-reduced-motion:reduce){.link-loading-indicator[data-v-367e6ca4]{animation:none;opacity:var(--underline-rest-opacity, .18)}}.insert-node[data-v-1e2c29d4]{text-decoration:underline}.highlight-node[data-v-7a62982a]{background-color:var(--highlight-bg);padding:0 3.2px;border-radius:.2em}.emphasis-node[data-v-2a5aafbf]{font-style:italic}.hard-break[data-v-50c58f70]{display:block}.blockquote[data-v-abfecebc]{font-weight:400;font-style:normal;color:var(--blockquote-fg, hsl(var(--ms-muted-foreground)));border-left:3px solid var(--blockquote-border);margin-top:var(--ms-flow-blockquote-y);margin-bottom:var(--ms-flow-blockquote-y);padding-left:var(--ms-flow-blockquote-indent)}.blockquote>.paragraph-node[data-v-abfecebc]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}.blockquote>.paragraph-node[data-v-abfecebc]:first-child{margin-top:0}.blockquote>.paragraph-node[data-v-abfecebc]:last-child{margin-bottom:0}.blockquote[data-v-abfecebc] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.definition-list[data-v-4e103b30]{margin:0 0 16px}.definition-term[data-v-4e103b30]{font-weight:600;margin-top:var(--ms-flow-definition-term-mt)}.definition-desc[data-v-4e103b30]{margin-left:var(--ms-flow-definition-desc-ml);margin-bottom:var(--ms-flow-definition-desc-mb)}.definition-list[data-v-4e103b30] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.footnote-anchor[data-v-e1eb37b6]{margin-left:8px;color:var(--link-color)}.footnote-node{margin-top:var(--ms-flow-footnote-y);margin-bottom:var(--ms-flow-footnote-y)}.markstream-vue [class*=footnote-] .markdown-renderer,.markstream-vue .flex-1 .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.heading-node[data-v-7122dbe1]{font-weight:500;line-height:1.25}hr+.heading-node[data-v-7122dbe1]{margin-top:0}.heading-1[data-v-7122dbe1]{font-size:var(--ms-text-h1);line-height:var(--ms-leading-h1);font-weight:var(--ms-weight-h1);margin-top:var(--ms-flow-heading-1-mt);margin-bottom:var(--ms-flow-heading-1-mb)}.heading-2[data-v-7122dbe1]{font-size:var(--ms-text-h2);line-height:var(--ms-leading-h2);font-weight:var(--ms-weight-h2);margin-top:var(--ms-flow-heading-2-mt);margin-bottom:var(--ms-flow-heading-2-mb)}.heading-3[data-v-7122dbe1]{font-size:var(--ms-text-h3);line-height:var(--ms-leading-h3);font-weight:var(--ms-weight-h3);margin-top:var(--ms-flow-heading-3-mt);margin-bottom:var(--ms-flow-heading-3-mb)}.heading-4[data-v-7122dbe1]{font-size:var(--ms-text-h4);font-weight:var(--ms-weight-h4);margin-top:var(--ms-flow-heading-4-mt);margin-bottom:var(--ms-flow-heading-4-mb)}.heading-5[data-v-7122dbe1]{font-size:var(--ms-text-h5);margin-top:var(--ms-flow-heading-5-mt);margin-bottom:var(--ms-flow-heading-5-mb)}.heading-6[data-v-7122dbe1]{font-size:var(--ms-text-h6);margin-top:var(--ms-flow-heading-6-mt);margin-bottom:var(--ms-flow-heading-6-mb)}.list-item[data-v-617214f9]{margin:var(--ms-flow-list-item-y) 0;padding-left:var(--ms-space-1_5)}ol>.list-item[data-v-617214f9]::marker{color:var(--list-counter-marker);line-height:1.6}ul>.list-item[data-v-617214f9]::marker{color:var(--list-marker)}.list-item>.paragraph-node[data-v-617214f9]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:0}.list-item[data-v-617214f9] .markdown-renderer{content-visibility:visible;contain-intrinsic-size:0px 0px;contain:content}.list-node[data-v-99cb95e0]{margin-top:var(--ms-flow-list-y);margin-bottom:var(--ms-flow-list-y);padding-left:var(--ms-flow-list-indent)}.list-decimal[data-v-99cb95e0]{list-style-type:decimal}.list-disc[data-v-99cb95e0]{list-style-type:disc}@media(max-width:1023px){.list-disc[data-v-99cb95e0]{margin-top:calc(4/3*1em);margin-bottom:calc(4/3*1em);padding-left:var(--ms-flow-list-indent-mobile)}}.html-block-node__raw[data-v-e140a874]{white-space:pre-wrap;overflow-wrap:anywhere;opacity:.85}.html-block-node__placeholder[data-v-e140a874]{display:flex;flex-direction:column;gap:5.6px;padding:8px 0}.html-block-node__placeholder-bar[data-v-e140a874]{display:block;height:12.8px;border-radius:9999px;background-image:linear-gradient(90deg,var(--loading-shimmer),transparent,var(--loading-shimmer));background-size:200% 100%}.paragraph-node[data-v-c59ff506]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}li .paragraph-node[data-v-c59ff506]{margin:0}.table-node-wrapper[data-v-39f87b5d]{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scrollbar-gutter:stable}.table-node[data-v-39f87b5d]{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;margin:var(--ms-flow-table-y) 0;font-size:inherit;border:1px solid var(--table-border);border-radius:var(--ms-radius);overflow:hidden;box-shadow:var(--ms-shadow-subtle)}.table-node[data-v-39f87b5d] th,.table-node[data-v-39f87b5d] td{border-bottom:1px solid var(--table-border);border-right:1px solid var(--table-border);padding:var(--ms-flow-table-cell);white-space:normal;overflow-wrap:break-word;word-break:normal}.table-node[data-v-39f87b5d] th:last-child,.table-node[data-v-39f87b5d] td:last-child{border-right:none}.table-node[data-v-39f87b5d] tbody tr:last-child td{border-bottom:none}.table-node[data-v-39f87b5d] thead th{position:relative;font-weight:600;background-color:var(--table-header-bg);border-bottom-width:2px}.table-node__resize-handle[data-v-39f87b5d]{position:absolute;top:0;right:-4px;bottom:0;z-index:1;width:8px;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none}.table-node__resize-handle[data-v-39f87b5d]:after{content:"";position:absolute;top:.35em;bottom:.35em;left:50%;width:2px;border-radius:9999px;background:color-mix(in srgb,var(--table-border) 45%,hsl(var(--ms-foreground)));opacity:0;transform:translate(-50%);transition:opacity var(--ms-duration-fast) var(--ms-ease-standard)}.table-node__resize-handle[data-v-39f87b5d]:hover:after,.table-node__resize-handle[data-v-39f87b5d]:focus-visible:after{opacity:1}.table-node[data-v-39f87b5d] tbody tr:nth-child(2n){background-color:hsl(var(--ms-muted) / .35)}.table-node[data-v-39f87b5d] tbody tr:hover{background-color:var(--code-action-hover-bg)}.table-node--loading tbody td[data-v-39f87b5d]{position:relative;overflow:hidden}.table-node--loading tbody td[data-v-39f87b5d]>*{visibility:hidden}.table-node--loading tbody td[data-v-39f87b5d]:after{content:"";position:absolute;inset:0;border-radius:calc(var(--ms-radius) * .5);background:linear-gradient(90deg,var(--loading-shimmer) 25%,var(--loading-shimmer) 50%,var(--loading-shimmer) 75%);background-size:200% 100%;animation:table-node-shimmer-39f87b5d 1.2s linear infinite;will-change:background-position}.table-node__loading[data-v-39f87b5d]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.table-node__spinner[data-v-39f87b5d]{width:40px;height:40px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-39f87b5d],.table-node-fade-leave-active[data-v-39f87b5d]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-39f87b5d],.table-node-fade-leave-to[data-v-39f87b5d]{opacity:0}[data-v-39f87b5d] .table-node .markdown-renderer{display:contents;content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}[data-v-39f87b5d] .table-node .markdown-renderer .node-slot,[data-v-39f87b5d] .table-node .markdown-renderer .node-content,[data-v-39f87b5d] .table-node .markdown-renderer .node-space{display:contents}[data-v-39f87b5d] .table-node .text-node,[data-v-39f87b5d] .table-node code{white-space:inherit;overflow-wrap:inherit;word-break:inherit;max-width:none}@keyframes table-node-shimmer-39f87b5d{0%{background-position:0% 0%}50%{background-position:100% 0%}to{background-position:200% 0%}}.hr+.table-node-wrapper[data-v-39f87b5d]{margin-top:0}.hr+.table-node-wrapper .table-node[data-v-39f87b5d]{margin-top:0}.sr-only[data-v-39f87b5d]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hr-node[data-v-39b2349c]{border-top-width:1px;border-color:var(--hr-border);margin:var(--ms-flow-hr-y) 0}.vmr-container[data-v-911e41c4]{margin-top:16px;margin-bottom:16px;border-radius:var(--ms-radius);border-width:1px;padding:16px;border-left-width:var(--ms-border-width-strong)}.height-estimation-probes[data-v-3e0766e2]{position:absolute;left:-100000px;top:0;visibility:hidden;pointer-events:none;overflow:hidden;z-index:-1}.node-content[data-v-3e0766e2]{width:100%}.node-content-flow-root[data-v-3e0766e2]{display:flow-root}.markdown-renderer[data-v-a9489508]{position:relative;contain:layout;content-visibility:auto;contain-intrinsic-size:800px 600px}.markdown-renderer.virtualized[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:auto}.markdown-renderer.stable-layout[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:none}.node-slot[data-v-a9489508],.node-content[data-v-a9489508]{width:100%}.markdown-renderer.virtualized .node-slot[data-v-a9489508],.markdown-renderer.virtualized .node-content[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-slot[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-content[data-v-a9489508]{display:flow-root}.node-placeholder[data-v-a9489508]{width:100%;min-height:16px;margin:4px 0}.node-placeholder[data-v-a9489508]:first-child{margin-top:0}.node-spacer[data-v-a9489508]{width:100%}.unknown-node[data-v-a9489508]{color:hsl(var(--ms-muted-foreground));font-style:italic;margin:var(--ms-flow-paragraph-y) 0}.typewriter-cursor[data-v-a9489508]{position:absolute;left:0;top:0;display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;visibility:hidden;animation:typewriter-cursor-blink-a9489508 1s steps(1,end) infinite}@keyframes typewriter-cursor-blink-a9489508{0%,49%{opacity:1}50%,to{opacity:0}}.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{content:"";display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;animation:typewriter-cursor-blink 1s steps(1,end) infinite}@media(prefers-reduced-motion:reduce){.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{animation:none}}.markstream-vue .fade-enter-from{opacity:0}.markstream-vue .fade-enter-active{transition:opacity var(--fade-duration, .28s) var(--fade-ease, cubic-bezier(.33, 0, .67, 1));will-change:opacity}.markstream-vue .fade-enter-to{opacity:1}.admonition[data-v-a83480e1]{position:relative;margin:var(--ms-flow-admonition-y) 0;padding:.25em .75em .375em;border:1px solid var(--admonition-border);border-radius:var(--ms-radius);color:var(--admonition-fg)}.admonition-legend[data-v-a83480e1]{position:absolute;top:0;left:.75em;transform:translateY(-50%);display:inline-flex;align-items:center;gap:.35em;padding:0 .5em;background-color:hsl(var(--ms-background));font-size:13px;font-weight:600;line-height:1}.admonition-icon[data-v-a83480e1]{flex-shrink:0}.admonition-title[data-v-a83480e1]{white-space:nowrap}.admonition-content[data-v-a83480e1]{padding-top:.25em;color:var(--admonition-fg)}.admonition-note[data-v-a83480e1],.admonition-info[data-v-a83480e1]{border-color:hsl(var(--ms-info) / .3);background-color:hsl(var(--ms-info) / .04)}.admonition-note .admonition-legend[data-v-a83480e1],.admonition-info .admonition-legend[data-v-a83480e1]{color:var(--admonition-note)}.admonition-tip[data-v-a83480e1]{border-color:hsl(var(--ms-success) / .3);background-color:hsl(var(--ms-success) / .04)}.admonition-tip .admonition-legend[data-v-a83480e1]{color:var(--admonition-tip)}.admonition-warning[data-v-a83480e1],.admonition-caution[data-v-a83480e1]{border-color:hsl(var(--ms-warning) / .3);background-color:hsl(var(--ms-warning) / .04)}.admonition-warning .admonition-legend[data-v-a83480e1],.admonition-caution .admonition-legend[data-v-a83480e1]{color:var(--admonition-warning)}.admonition-danger[data-v-a83480e1],.admonition-error[data-v-a83480e1]{border-color:hsl(var(--ms-destructive) / .3);background-color:hsl(var(--ms-destructive) / .04)}.admonition-danger .admonition-legend[data-v-a83480e1],.admonition-error .admonition-legend[data-v-a83480e1]{color:var(--admonition-danger)}.admonition-toggle[data-v-a83480e1]{margin-left:.25em;background:transparent;border:none;color:inherit;cursor:pointer;padding:2px;border-radius:calc(var(--ms-radius) * .5);display:inline-flex;align-items:center;transition:background-color var(--ms-duration-fast) var(--ms-ease-standard)}.admonition-toggle[data-v-a83480e1]:hover{background-color:hsl(var(--ms-accent))}.admonition-toggle[data-v-a83480e1]:focus-visible{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.admonition-content[data-v-a83480e1] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.tooltip-element[data-v-c606ee4c]{z-index:9999;display:inline-block;max-width:320px;padding:4px 8px;border-radius:calc(var(--ms-radius) * .75);font-size:12px;line-height:1.4;white-space:normal;word-break:break-word;pointer-events:none;background-color:var(--tooltip-bg);color:var(--tooltip-fg);box-shadow:inset 0 1px #ffffff26,0 0 0 1px #0000001f,var(--ms-shadow-popover);transition:transform var(--ms-duration-emphasis) var(--ms-ease-spring),box-shadow var(--ms-duration-emphasis) var(--ms-ease-spring)}.tooltip-arrow[data-v-c606ee4c]{position:absolute;width:6px;height:6px;background:inherit;transform:rotate(45deg)}.tooltip-arrow[data-placement^=top][data-v-c606ee4c]{bottom:-3px}.tooltip-arrow[data-placement^=bottom][data-v-c606ee4c]{top:-3px}.tooltip-arrow[data-placement^=left][data-v-c606ee4c]{right:-3px}.tooltip-arrow[data-placement^=right][data-v-c606ee4c]{left:-3px}.tooltip-enter-active[data-v-c606ee4c]{transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.tooltip-leave-active[data-v-c606ee4c]{transition:opacity .12s ease-in,transform .12s ease-in}.tooltip-enter-from[data-v-c606ee4c]{opacity:0;transform:scale(.96)}.tooltip-enter-to[data-v-c606ee4c],.tooltip-leave-from[data-v-c606ee4c]{opacity:1;transform:scale(1)}.tooltip-leave-to[data-v-c606ee4c]{opacity:0;transform:scale(.97)}.action-icon{width:var(--ms-action-btn-icon, 14px);height:var(--ms-action-btn-icon, 14px);max-width:20px;max-height:20px}.code-block-container{margin:var(--ms-flow-codeblock-y) 0;contain:layout style;container-type:inline-size;background:var(--code-bg);border-color:var(--code-border);color:var(--code-fg);box-shadow:var(--ms-shadow-subtle)}.code-block-header{position:relative;z-index:1;gap:var(--ms-gap-header);border-radius:var(--ms-radius) var(--ms-radius) 0 0;overflow:visible}.code-block-header .code-header-main{min-width:0;flex:1 1 auto;display:flex;align-items:center;gap:var(--ms-gap-header-main);overflow:hidden}.code-block-header .code-header-copy{min-width:0;display:grid;gap:2px}.code-block-header .code-header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ms-text-label);font-weight:500;color:var(--code-action-fg)}.code-block-header .code-header-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--code-line-number)}.code-block-header .code-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--ms-gap-header-actions);flex-wrap:wrap}.code-block-header .icon-slot{display:inline-flex;align-items:center;justify-content:center}.code-block-header .icon-slot svg,.code-block-header .icon-slot img{display:block;width:100%;height:100%}.code-diff-stats{display:inline-flex;align-items:center;gap:var(--ms-space-1_5);margin-right:var(--ms-space-1);font-size:var(--ms-text-label);font-weight:600;line-height:1;font-variant-numeric:tabular-nums}.code-diff-stat{display:inline-flex;align-items:center;padding:2px 6px;border-radius:var(--ms-radius);line-height:1}.code-diff-stat.removed{color:var(--diff-removed-fg);background:hsl(var(--ms-diff-removed) / .1)}.code-diff-stat.added{color:var(--diff-added-fg);background:hsl(var(--ms-diff-added) / .1)}.code-more-menu{position:absolute;top:100%;right:0;margin-top:4px;z-index:50;border-radius:var(--ms-radius)}.code-block-shell-content,.code-loading-placeholder{overflow:hidden;border-radius:0 0 var(--ms-radius) var(--ms-radius);contain:content}.code-block-shell-content--collapsed{height:0;min-height:0;visibility:hidden;pointer-events:none}.code-menu-enter-active,.code-menu-leave-active{transform-origin:top right}.code-menu-enter-active{transition:opacity .22s cubic-bezier(.16,1,.3,1),transform .22s cubic-bezier(.16,1,.3,1)}.code-menu-leave-active{transition:opacity .14s ease-in,transform .14s ease-in}.code-menu-enter-from{opacity:0;transform:scale(.9) translateY(-4px)}.code-menu-leave-to{opacity:0;transform:scale(.95) translateY(-2px)}.html-preview-frame__backdrop[data-v-24e66176]{position:fixed;inset:0;background-color:var(--modal-overlay);display:flex;align-items:center;justify-content:center;z-index:50}.html-preview-frame[data-v-24e66176]{width:80vw;max-width:960px;height:70vh;background-color:var(--modal-bg);color:var(--modal-fg);border-radius:calc(var(--ms-radius) * 2);overflow:hidden;box-shadow:var(--ms-shadow-preview);display:flex;flex-direction:column}.html-preview-frame__header[data-v-24e66176]{display:flex;justify-content:space-between;align-items:center;padding:6.4px 12px;border-bottom:1px solid var(--code-border)}.html-preview-frame__title[data-v-24e66176]{display:inline-flex;align-items:center;gap:6.4px;font-size:12px;font-weight:500;letter-spacing:.02em;text-transform:uppercase;opacity:.85}.html-preview-frame__dot[data-v-24e66176]{width:8px;height:8px;border-radius:999px;background-color:hsl(var(--ms-success))}.html-preview-frame__label[data-v-24e66176]{white-space:nowrap}.html-preview-frame__close[data-v-24e66176]{border:none;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:var(--modal-fg)}.html-preview-frame__iframe[data-v-24e66176]{width:100%;height:100%;border:none;display:block}@media(max-width:640px){.html-preview-frame[data-v-24e66176]{width:100vw;height:80vh;border-radius:0}}.code-block-container[data-v-ef6e4bb8]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--vscode-editor-selectionBackground: var(--markstream-code-fallback-selection-bg);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 16px 40px -32px hsl(var(--ms-foreground) / .18);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .92);--markstream-diff-editor-bg: hsl(var(--ms-background));--markstream-diff-editor-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-bg: hsl(var(--ms-muted));--markstream-diff-unchanged-divider: hsl(var(--ms-background) / .94);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .26);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: linear-gradient(180deg, var(--code-bg) 0%, hsl(var(--ms-muted)) 100%);--markstream-diff-panel-bg-soft: var(--code-bg);--markstream-diff-panel-bg-strong: var(--code-bg);--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .42);--markstream-diff-gutter-bg: transparent;--markstream-diff-gutter-guide: hsl(var(--ms-border) / .72);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(var(--ms-muted) / .45);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: var(--diff-added-fg);--markstream-diff-removed-fg: var(--diff-removed-fg);--markstream-diff-added-line: var(--diff-added-bg);--markstream-diff-removed-line: var(--diff-removed-bg);--markstream-diff-added-inline: var(--diff-added-inline-bg);--markstream-diff-removed-inline: var(--diff-removed-inline-bg);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: var(--diff-added-bg);--markstream-diff-removed-line-fill: var(--diff-removed-bg)}.code-block-container.is-dark[data-v-ef6e4bb8]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 18px 40px -30px hsl(var(--ms-foreground) / .84);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .82);--markstream-diff-editor-bg: #121212;--markstream-diff-editor-fg: #e5e5e5;--markstream-diff-unchanged-fg: #d4d4d4;--markstream-diff-unchanged-bg: #262626;--markstream-diff-unchanged-divider: hsl(0 0% 100% / .08);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .72);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: #121212;--markstream-diff-panel-bg-soft: #121212;--markstream-diff-panel-bg-strong: #121212;--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .34);--markstream-diff-gutter-bg: linear-gradient( 180deg, hsl(0 0% 7% / .94) 0%, hsl(0 0% 7% / .98) 100% );--markstream-diff-gutter-guide: hsl(var(--ms-muted-foreground) / .08);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(0 0% 7% / .98);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: hsl(152 42% 60%);--markstream-diff-removed-fg: hsl(0 58% 58%);--markstream-diff-added-line: hsl(152 42% 60% / .18);--markstream-diff-removed-line: hsl(0 58% 58% / .18);--markstream-diff-added-inline: hsl(152 42% 60% / .28);--markstream-diff-removed-inline: hsl(0 58% 58% / .28);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: hsl(152 42% 60% / .18);--markstream-diff-removed-line-fill: hsl(0 58% 58% / .18)}.code-editor-container[data-v-ef6e4bb8]{transition:none;box-sizing:border-box;min-width:0;width:100%}.code-block-container.is-diff .code-editor-container[data-v-ef6e4bb8]{transition:none}.code-editor-layer[data-v-ef6e4bb8]{display:grid;min-width:0;position:relative}.code-editor-layer--collapsed[data-v-ef6e4bb8]{height:0;min-height:0;overflow:hidden;visibility:hidden;pointer-events:none}.code-editor-layer>.code-editor-container[data-v-ef6e4bb8]{grid-area:1 / 1;z-index:1}.code-editor-layer>pre.code-pre-fallback[data-v-ef6e4bb8]{grid-area:1 / 1;position:relative;z-index:2}.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .monaco-editor-background,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .lines-content{background:var(--vscode-editor-background, var(--markstream-code-fallback-bg))!important}.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-lines,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-line,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-line span,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .line-numbers{color:var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))!important}.code-block-container.is-diff[data-v-ef6e4bb8]{color:var(--markstream-diff-shell-fg);border-color:var(--markstream-diff-shell-border);background:var(--markstream-diff-shell-bg);box-shadow:var(--markstream-diff-shell-shadow);--vscode-editor-selectionBackground: var(--markstream-diff-action-hover);--code-fg: var(--markstream-diff-shell-fg);--code-header-bg: transparent;--code-border: var(--markstream-diff-header-border);--code-line-number: var(--markstream-diff-shell-muted);--code-action-fg: var(--markstream-diff-shell-muted)}.code-block-container.is-diff .code-editor-layer[data-v-ef6e4bb8]{background:transparent;--vscode-editor-background: var(--markstream-diff-editor-bg);--vscode-editor-foreground: var(--markstream-diff-editor-fg);--vscode-diffEditor-unchangedRegionForeground: var(--markstream-diff-unchanged-fg);--vscode-diffEditor-unchangedRegionBackground: var(--markstream-diff-unchanged-bg);--vscode-focusBorder: var(--markstream-diff-focus);--vscode-widget-shadow: var(--markstream-diff-widget-shadow);--vscode-editor-selectionBackground: color-mix( in srgb, var(--markstream-diff-editor-bg) 90%, var(--markstream-diff-editor-fg) 10% );--stream-monaco-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-editor-fg: var(--markstream-diff-editor-fg);--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg);--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg);--stream-monaco-frame-radius: 0;--stream-monaco-fixed-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-frame-border: transparent;--stream-monaco-frame-shadow: none;--stream-monaco-panel-bg: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-soft: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-strong: var(--markstream-diff-editor-bg);--stream-monaco-panel-border: transparent;--stream-monaco-pane-divider: var(--markstream-diff-pane-divider);--stream-monaco-gutter-bg: var(--markstream-diff-gutter-bg);--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide);--stream-monaco-gutter-marker-width: 4px;--stream-monaco-gutter-gap: 1ch;--stream-monaco-line-number-bg: var(--markstream-diff-line-number-bg);--stream-monaco-line-number: var(--markstream-diff-line-number);--stream-monaco-line-number-active: var(--markstream-diff-line-number-active);--stream-monaco-line-number-left: 0px;--stream-monaco-line-number-width: 2ch;--stream-monaco-line-number-padding-left: 2ch;--stream-monaco-line-number-padding-right: 1ch;--stream-monaco-line-number-separator-width: 2px;--stream-monaco-layout-character-width: var(--markstream-code-layout-character-width, 1ch);--stream-monaco-line-number-box-width: calc( var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-line-number-separator-width) );--stream-monaco-diff-code-gap: 1ch;--stream-monaco-diff-code-padding: 0px;--stream-monaco-line-number-gap-to-code: var(--stream-monaco-diff-code-gap);--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) );--stream-monaco-original-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-original-scrollable-left: var(--stream-monaco-original-margin-width);--stream-monaco-original-scrollable-width: calc( 100% - var(--stream-monaco-original-margin-width) );--stream-monaco-modified-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-modified-scrollable-left: var(--stream-monaco-modified-margin-width);--stream-monaco-modified-scrollable-width: calc( 100% - var(--stream-monaco-modified-margin-width) );--stream-monaco-added-fg: var(--markstream-diff-added-fg);--stream-monaco-removed-fg: var(--markstream-diff-removed-fg);--stream-monaco-added-line: var(--markstream-diff-added-line);--stream-monaco-removed-line: var(--markstream-diff-removed-line);--stream-monaco-added-inline: var(--markstream-diff-added-inline);--stream-monaco-removed-inline: var(--markstream-diff-removed-inline);--stream-monaco-added-outline: transparent;--stream-monaco-removed-outline: transparent;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border);--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border);--stream-monaco-added-line-shadow: none;--stream-monaco-removed-line-shadow: none;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter);--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter);--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill);--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill);--stream-monaco-added-border: hsl(var(--ms-diff-added) / .25);--stream-monaco-removed-border: hsl(var(--ms-diff-removed) / .25);--stream-monaco-widget-shadow: var(--markstream-diff-widget-shadow)}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers{left:var(--stream-monaco-line-number-left)!important;width:var(--stream-monaco-line-number-width)!important;min-width:var(--stream-monaco-line-number-width)!important;box-sizing:content-box!important;background:var(--stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg))!important;padding-left:var(--stream-monaco-line-number-padding-left, 2ch)!important;padding-right:var(--stream-monaco-line-number-padding-right, 1ch)!important;border-right:var(--stream-monaco-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg)!important;text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums;box-shadow:none}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays .line-numbers *{text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-editor .stream-monaco-fallback-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-delete.line-numbers{background:var(--stream-monaco-removed-line-fill)!important;color:var(--stream-monaco-removed-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-editor .stream-monaco-fallback-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-insert.line-numbers{background:var(--stream-monaco-added-line-fill)!important;color:var(--stream-monaco-added-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .monaco-editor,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays{--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) ) !important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff){--markstream-code-line-number-box-width: calc( var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + 2px );--markstream-code-content-left: calc( var(--markstream-code-line-number-box-width) + var(--markstream-code-layout-character-width, 1ch) )}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin-view-overlays{width:var(--markstream-code-content-left)!important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .line-numbers{left:0!important;width:2ch!important;min-width:2ch!important;box-sizing:content-box!important;padding-left:2ch!important;padding-right:1ch!important;border-right:2px solid var(--vscode-editor-background)!important;text-align:var(--markstream-code-line-number-align, right)!important;font-variant-numeric:tabular-nums}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .monaco-scrollable-element.editor-scrollable{left:var(--markstream-code-content-left)!important;width:calc(100% - var(--markstream-code-content-left))!important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .lines-content{left:0!important}.code-editor-container[data-markstream-host-hidden=true][data-v-ef6e4bb8]{position:absolute;inset:0;width:100%;height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden;visibility:hidden;pointer-events:none}pre.code-pre-fallback[data-v-ef6e4bb8]{margin:0;box-sizing:border-box;width:100%;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left, 52px);background:var(--markstream-code-fallback-bg, var(--code-bg, #fff));color:var(--markstream-code-fallback-fg, var(--code-fg));backface-visibility:visible;transform:none;-webkit-font-smoothing:auto;font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px);font-weight:400;font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace )}pre.code-pre-fallback[data-v-ef6e4bb8] code{font-size:inherit;font-weight:inherit;line-height:inherit;font-family:inherit}pre.code-pre-fallback.is-wrap[data-v-ef6e4bb8]{white-space:pre-wrap;overflow-wrap:anywhere}pre.code-pre-fallback.markstream-pre--diff-preview[data-v-ef6e4bb8]{padding-left:0;padding-right:0}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview{background:var(--markstream-diff-editor-bg);transition:none}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-pane{box-sizing:border-box;padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added:after,.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after,.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays>.gutter-insert>.cmdr.gutter-insert{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-added-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays>.gutter-delete>.cmdr.gutter-delete{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-removed-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}@media(prefers-reduced-motion:reduce){.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview{transition:none}}.code-block-container.is-rendering .code-height-placeholder[data-v-ef6e4bb8]{background-size:400% 100%;animation:code-skeleton-shimmer-ef6e4bb8 1.2s ease-in-out infinite;min-height:var(--ms-size-skeleton-min-height);background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%)}.code-loading-placeholder[data-v-ef6e4bb8]{padding:16px;min-height:var(--ms-size-skeleton-min-height)}.loading-skeleton[data-v-ef6e4bb8]{display:flex;flex-direction:column;gap:12px}.skeleton-line[data-v-ef6e4bb8]{height:16px;background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%);background-size:400% 100%;animation:code-skeleton-shimmer-ef6e4bb8 1.2s ease-in-out infinite;border-radius:calc(var(--ms-radius) * .5)}.skeleton-line.short[data-v-ef6e4bb8]{width:60%}.code-block-container[data-markstream-viewport-pending=true] .code-height-placeholder[data-v-ef6e4bb8],.code-block-container[data-markstream-viewport-pending=true] .skeleton-line[data-v-ef6e4bb8]{animation:none}@keyframes code-skeleton-shimmer-ef6e4bb8{0%{background-position:100% 0}to{background-position:0 0}}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center{border-radius:var(--ms-radius)!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;min-height:28px!important;transition:background-color .14s ease,border-color .14s ease!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 4%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 10%,transparent)!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center{background:transparent!important;border-color:transparent!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 6%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 12%,transparent)!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center .stream-monaco-unchanged-count:before{content:"";display:inline-block;width:14px;height:14px;margin-right:4px;flex-shrink:0;background:currentColor;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");mask-size:contain;-webkit-mask-size:contain;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}[data-v-ef6e4bb8] .monaco-diff-editor .diffOverview{background-color:var(--vscode-editor-background)}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .diffOverview,[data-v-ef6e4bb8] .stream-monaco-diff-root .decorationsOverviewRuler{display:none!important;width:0!important;min-width:0!important;max-width:0!important;border:0!important;background:transparent!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-diff-editor{border:0!important;border-radius:0!important;box-shadow:none!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-clickable)>*:not(a){visibility:hidden!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines-compact .text{opacity:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root{--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide) !important;--stream-monaco-gutter-gap: var(--markstream-diff-gutter-gap) !important;--stream-monaco-line-number: var(--markstream-diff-line-number) !important;--stream-monaco-line-number-active: var(--markstream-diff-line-number-active) !important;--stream-monaco-added-fg: var(--markstream-diff-added-fg) !important;--stream-monaco-removed-fg: var(--markstream-diff-removed-fg) !important;--stream-monaco-added-line: var(--markstream-diff-added-line) !important;--stream-monaco-removed-line: var(--markstream-diff-removed-line) !important;--stream-monaco-added-inline: var(--markstream-diff-added-inline) !important;--stream-monaco-removed-inline: var(--markstream-diff-removed-inline) !important;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border) !important;--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border) !important;--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill) !important;--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill) !important;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter) !important;--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter) !important;--stream-monaco-added-line-shadow: none !important;--stream-monaco-removed-line-shadow: none !important;--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;box-sizing:border-box;min-width:0;width:100%}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .overflow-guard,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side),[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .overflow-guard{min-width:0!important;width:100%!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-scrollable-element.editor-scrollable,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-scrollable-element.editor-scrollable{left:var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width))!important;width:calc(100% - var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width)))!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .editor.modified .view-lines .view-line.stream-monaco-line-insert-fill,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .editor.original .view-lines .view-line.stream-monaco-line-delete-fill{width:1000000px!important}.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-fallback-inline-delete-line{box-sizing:border-box;padding-left:var(--stream-monaco-diff-code-padding, 0px)}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .scrollbar.horizontal,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .scrollbar.horizontal{display:none!important;height:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .view-lines.line-delete{margin-left:0!important;width:100%!important;background:var(--stream-monaco-removed-line-fill)!important;box-shadow:var(--stream-monaco-removed-line-shadow)!important;display:block!important;height:-moz-max-content!important;height:max-content!important;min-height:18px!important;overflow:visible!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .gutter-delete,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .inline-deleted-margin-view-zone,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .stream-monaco-fallback-inline-delete-margin{background:var(--stream-monaco-removed-gutter),var(--stream-monaco-removed-line-fill)!important;display:block!important;height:100%!important;min-height:18px!important;overflow:visible!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-unchanged-bridge-source),[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;background:var(--stream-monaco-unchanged-bg)!important;color:var(--stream-monaco-unchanged-fg)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{right:calc(var(--stream-monaco-gutter-marker-width) - var(--stream-monaco-unchanged-rail-width) / 2 + (var(--stream-monaco-gutter-gap) * 2))!important;width:auto!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important;color:var(--markstream-diff-unchanged-fg)!important;padding-left:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important;padding-right:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge.stream-monaco-diff-unchanged-bridge-line-info .stream-monaco-unchanged-rail,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail{border-right-color:var(--markstream-diff-unchanged-divider)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal{border-bottom-color:transparent!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-both .stream-monaco-unchanged-reveal:first-child{border-bottom-color:var(--markstream-diff-unchanged-divider)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-top-only .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-bottom-only .stream-monaco-unchanged-reveal{border-bottom:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-meta,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-count,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-metadata-label,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{color:var(--markstream-diff-unchanged-fg)!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center{align-items:center;justify-content:center}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center{align-items:center;justify-content:center!important;position:relative}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center:not(.stream-monaco-clickable){opacity:0!important;pointer-events:none!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center .stream-monaco-unchanged-meta{justify-content:center!important;padding:0 28px!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center>div:first-child{align-items:center;display:flex;justify-content:center!important;min-width:100%;width:100%!important}[data-v-ef6e4bb8] .markstream-inline-fold-proxy{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:calc(var(--ms-radius) * .5);box-shadow:none;cursor:pointer;inset:0;padding:0;pointer-events:auto;position:absolute;z-index:2}[data-v-ef6e4bb8] .markstream-inline-fold-proxy:hover,[data-v-ef6e4bb8] .markstream-inline-fold-proxy:focus-visible{background:transparent}[data-v-ef6e4bb8] .markstream-inline-fold-proxy:focus-visible{outline:1px solid var(--vscode-focusBorder, currentColor);outline-offset:-1px}.math-inline-wrapper[data-v-6c556261]{position:relative;display:inline-block}.math-inline[data-v-6c556261]{display:inline-block;vertical-align:middle}.math-inline--fallback[data-v-6c556261]{white-space:pre-wrap}.math-inline__loading[data-v-6c556261]{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.math-inline__spinner[data-v-6c556261]{width:16px;height:16px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-6c556261],.table-node-fade-leave-active[data-v-6c556261]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-6c556261],.table-node-fade-leave-to[data-v-6c556261]{opacity:0}.sr-only[data-v-6c556261]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.math-block[data-v-939191ad]{min-height:var(--ms-size-math-min-height);transition:min-height var(--ms-duration-overlay) var(--ms-ease-standard)}.math-loading-overlay[data-v-939191ad]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(2px);min-height:var(--ms-size-math-min-height)}.math-loading-spinner[data-v-939191ad]{width:20px;height:20px;border:2px solid color-mix(in srgb,var(--loading-spinner) 15%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);border-radius:50%;animation:math-spin-939191ad .8s linear infinite}@keyframes math-spin-939191ad{to{transform:rotate(360deg)}}.math-rendering[data-v-939191ad]{opacity:.3;transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.math-block__fallback[data-v-939191ad]{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.math-fade-enter-active[data-v-939191ad],.math-fade-leave-active[data-v-939191ad]{transition:all var(--ms-duration-slow) var(--ms-ease-standard)}.math-fade-enter-from[data-v-939191ad],.math-fade-leave-to[data-v-939191ad]{opacity:0}.action-icon{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot{display:inline-flex;align-items:center;justify-content:center}.icon-slot svg{display:block;width:100%;height:100%}.mermaid-block-container[data-v-73c385f8]{margin:var(--ms-flow-diagram-y) 0;border-color:var(--diagram-border)}.mermaid-block-header[data-v-73c385f8]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border)}.mermaid-label-text[data-v-73c385f8]{color:var(--code-action-fg)}.mermaid-mode-toggle-group[data-v-73c385f8]{background:transparent}.mermaid-mode-btn[data-v-73c385f8]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6}.mermaid-mode-btn[data-v-73c385f8]:hover{opacity:.9}.mermaid-mode-btn.is-active[data-v-73c385f8]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.mermaid-header-actions[data-v-73c385f8]{gap:var(--ms-gap-header-actions)}.mermaid-action-btn[data-v-73c385f8]{font-family:inherit;font-size:var(--ms-text-label);color:var(--code-action-fg)}.mermaid-action-btn[data-v-73c385f8]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.mermaid-action-btn[data-v-73c385f8]:active{transform:scale(.98)}.mermaid-source-panel[data-v-73c385f8]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.mermaid-source-code[data-v-73c385f8]{color:hsl(var(--ms-foreground))}.mermaid-preview-area[data-v-73c385f8]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-standard)}.mermaid-modal-overlay[data-v-73c385f8]{background:var(--modal-overlay)}.mermaid-modal-panel[data-v-73c385f8]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}._mermaid[data-v-73c385f8]{position:relative;font-family:inherit;content-visibility:auto;contain:content;contain-intrinsic-size:var(--ms-size-diagram-min-height) 240px}._mermaid[data-v-73c385f8] [data-mermaid-svg-layer]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:100%;min-height:100%}._mermaid[data-v-73c385f8] svg{width:100%;height:auto;max-height:100%;display:block}.fullscreen ._mermaid[data-v-73c385f8] svg{max-height:none}.fullscreen[data-v-73c385f8]{width:100%;max-height:100%!important;height:100%!important}.mermaid-dialog-enter-from[data-v-73c385f8],.mermaid-dialog-leave-to[data-v-73c385f8]{opacity:0}.mermaid-dialog-enter-active[data-v-73c385f8],.mermaid-dialog-leave-active[data-v-73c385f8]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.mermaid-dialog-enter-from .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-to .dialog-panel[data-v-73c385f8]{transform:translateY(8px) scale(.98);opacity:.98}.mermaid-dialog-enter-to .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-from .dialog-panel[data-v-73c385f8]{transform:translateY(0) scale(1);opacity:1}.mermaid-dialog-enter-active .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-active .dialog-panel[data-v-73c385f8]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-block-container[data-v-de34ec4b]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.infographic-block-header[data-v-de34ec4b]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.infographic-label[data-v-de34ec4b]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}.action-icon[data-v-de34ec4b]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot[data-v-de34ec4b]{display:inline-flex;align-items:center;justify-content:center}.icon-slot[data-v-de34ec4b] svg{display:block;width:100%;height:100%}.infographic-mode-toggle[data-v-de34ec4b]{background:transparent}.infographic-mode-btn[data-v-de34ec4b]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:color .15s,background-color .15s,opacity .15s}.infographic-mode-btn[data-v-de34ec4b]:hover{opacity:.9}.infographic-mode-btn.is-active[data-v-de34ec4b]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.infographic-header-actions[data-v-de34ec4b]{gap:var(--ms-gap-header-actions)}.infographic-action-btn[data-v-de34ec4b]{font-family:inherit;color:var(--code-action-fg);transition:background-color .15s,color .15s}.infographic-action-btn[data-v-de34ec4b]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.infographic-action-btn[data-v-de34ec4b]:active{transform:scale(.98)}.infographic-source[data-v-de34ec4b]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.infographic-source-code[data-v-de34ec4b]{color:hsl(var(--ms-foreground))}.infographic-preview[data-v-de34ec4b]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-fast)}.infographic-pending-source[data-v-de34ec4b]{position:absolute;inset:0;z-index:1;margin:0;padding:var(--ms-inset-panel-body);overflow:auto;color:hsl(var(--ms-foreground));text-align:left;background:var(--diagram-bg)}.infographic-modal-overlay[data-v-de34ec4b]{background:var(--modal-overlay)}.infographic-modal-panel[data-v-de34ec4b]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}.fullscreen[data-v-de34ec4b]{width:100%;max-height:100%!important;height:100%!important}.infographic-dialog-enter-from[data-v-de34ec4b],.infographic-dialog-leave-to[data-v-de34ec4b]{opacity:0}.infographic-dialog-enter-active[data-v-de34ec4b],.infographic-dialog-leave-active[data-v-de34ec4b]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-dialog-enter-from .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-to .dialog-panel[data-v-de34ec4b]{transform:translateY(8px) scale(.98);opacity:.98}.infographic-dialog-enter-to .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-from .dialog-panel[data-v-de34ec4b]{transform:translateY(0) scale(1);opacity:1}.infographic-dialog-enter-active .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-active .dialog-panel[data-v-de34ec4b]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.d2-block-container[data-v-3b434cf5]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.d2-block-header[data-v-3b434cf5]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.d2-mode-toggle[data-v-3b434cf5]{background:transparent}.mode-btn[data-v-3b434cf5]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:opacity .2s,color .2s,background-color .2s}.mode-btn[data-v-3b434cf5]:hover{opacity:.9}.mode-btn.is-active[data-v-3b434cf5]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.d2-header-actions[data-v-3b434cf5]{gap:var(--ms-gap-header-actions)}.d2-action-btn[data-v-3b434cf5]{color:var(--code-action-fg);opacity:.7;transition:opacity .2s,background-color .15s,color .15s}.d2-action-btn[data-v-3b434cf5]:hover{opacity:1;background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.d2-action-btn[data-v-3b434cf5]:disabled{opacity:.3;cursor:not-allowed}.d2-block-body[data-v-3b434cf5]{position:relative}.d2-source[data-v-3b434cf5]{padding:var(--ms-inset-panel-body) var(--ms-inset-panel-x);font-family:var(--vscode-editor-font-family, "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}.d2-code[data-v-3b434cf5]{white-space:pre;font-size:14px;line-height:1.5}.d2-render[data-v-3b434cf5]{max-height:var(--ms-size-code-max-height);overflow:auto}.d2-svg[data-v-3b434cf5] svg.markstream-d2-root-svg{width:100%;max-width:100%;height:auto;display:block}.d2-label[data-v-3b434cf5]{font-size:var(--ms-text-label)}.action-icon[data-v-3b434cf5]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.d2-error[data-v-3b434cf5]{color:hsl(var(--ms-destructive))}.markstream-virtual-timeline[data-v-1303f06e]{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;overflow:auto;overflow-anchor:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__spacer[data-v-1303f06e],.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e]{opacity:0;visibility:hidden;pointer-events:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e],.markstream-virtual-timeline__item.is-restored-height-floor[data-v-1303f06e]{height:var(--markstream-virtual-item-size);overflow:hidden}.markstream-virtual-timeline__restore-loading[data-v-1303f06e]{position:absolute;top:0;left:0;right:0;z-index:10;display:grid;place-items:center;pointer-events:none;overflow:hidden;background:Canvas;contain:strict}.markstream-virtual-timeline__restore-loading-card[data-v-1303f06e]{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid rgb(148 163 184 / 32%);border-radius:999px;background:#ffffffeb;color:#334155;font-size:13px;box-shadow:0 8px 24px #0f172a14}.markstream-virtual-timeline__restore-spinner[data-v-1303f06e]{width:14px;height:14px;border:2px solid rgb(148 163 184 / 35%);border-top-color:#334155;border-radius:999px;animation:markstream-timeline-restore-spin-1303f06e .8s linear infinite}@keyframes markstream-timeline-restore-spin-1303f06e{to{transform:rotate(360deg)}}.markstream-virtual-timeline__spacer[data-v-1303f06e]{flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__item[data-v-1303f06e]{display:flow-root;flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__default-item[data-v-1303f06e]{margin:8px 0;padding:10px 12px;border:1px solid rgb(148 163 184 / 32%);border-radius:8px;background:#f8fafc;color:#0f172a;line-height:1.5;white-space:pre-wrap}.markstream-virtual-timeline__default-item--system-divider[data-v-1303f06e]{border:0;background:transparent;color:#64748b;font-size:12px;text-align:center}.markstream-virtual-timeline__default-item--error[data-v-1303f06e]{border-color:#f8717173;background:#fef2f2;color:#991b1b}.markstream-virtual-timeline__status[data-v-1303f06e]{display:inline-flex;margin-right:8px;color:#475569;font-size:12px;text-transform:uppercase}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.17.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.md[data-v-f0354d0f]{font:400 var(--content-font-size)/1.6 var(--font-ui);line-height:round(calc(var(--content-font-size) * 1.625),1px);color:var(--color-text);word-break:break-word}.md[data-v-f0354d0f] .markdown-renderer{font:400 var(--content-font-size)/1.6 var(--font-ui);line-height:round(calc(var(--content-font-size) * 1.625),1px);color:var(--color-text)}.md[data-v-f0354d0f] .markstream-vue,.md[data-v-f0354d0f] .markdown-renderer{--code-bg: var(--color-surface-sunken);--code-fg: var(--color-text);--code-border: var(--color-line);--code-header-bg: var(--color-surface);--code-action-fg: var(--color-text-muted);--code-action-hover-fg: var(--color-accent);--markstream-code-fallback-bg: var(--color-surface-sunken);--markstream-code-fallback-fg: var(--color-text);--markstream-code-border-color: var(--color-line);--inline-code-bg: var(--color-inline-code-bg);--inline-code-fg: var(--color-text);--inline-code-border: transparent}.md[data-v-f0354d0f] .md-file-link{appearance:none;display:inline;border:0;padding:0;background:transparent;color:var(--color-accent-hover);font:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;cursor:pointer}.md[data-v-f0354d0f] .md-file-link:hover{color:var(--color-accent)}.md[data-v-f0354d0f] .inline-code .md-file-link{text-underline-offset:1.5px}.md[data-v-f0354d0f] .markdown-renderer p,.md[data-v-f0354d0f] .markdown-renderer li{font-size:var(--content-font-size);line-height:round(calc(var(--content-font-size) * 1.625),1px)}.md[data-v-f0354d0f] .markdown-renderer blockquote,.md[data-v-f0354d0f] .markdown-renderer td,.md[data-v-f0354d0f] .markdown-renderer th{font-size:var(--md-b2)}.md[data-v-f0354d0f] .markdown-renderer img{background:var(--media-alpha-canvas)}.md[data-v-f0354d0f] strong{color:color-mix(in srgb,var(--color-text) 86%,var(--color-text-muted));font-weight:var(--weight-semibold)}.md[data-v-f0354d0f] h1,.md[data-v-f0354d0f] h2,.md[data-v-f0354d0f] h3,.md[data-v-f0354d0f] h4{color:var(--color-text);font-optical-sizing:auto;font-weight:600;margin:.85em 0 .35em}.md[data-v-f0354d0f] h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px);border-bottom:1px solid var(--color-line);padding-bottom:4px}.md[data-v-f0354d0f] h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.md[data-v-f0354d0f] h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.md[data-v-f0354d0f] h4{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px);color:var(--color-text-muted)}.md[data-v-f0354d0f] p{margin:0}.md[data-v-f0354d0f] .node-slot+.node-slot{margin-top:var(--content-font-size)}.md[data-v-f0354d0f] .node-slot+.node-slot:has(h1),.md[data-v-f0354d0f] .node-slot+.node-slot:has(h2){margin-top:calc(var(--content-font-size) * 2)}.md[data-v-f0354d0f] .node-slot+.node-slot:has(h3),.md[data-v-f0354d0f] .node-slot+.node-slot:has(h4){margin-top:calc(var(--content-font-size) * 1.5)}.md[data-v-f0354d0f] ul,.md[data-v-f0354d0f] ol{--md-dot: round(calc(var(--content-font-size) * .375), 1px);list-style:none;margin:0;padding-left:calc(var(--content-font-size) * 2)}.md[data-v-f0354d0f] li{position:relative;margin:0;padding:0}.md[data-v-f0354d0f] li+li{margin-top:round(calc(var(--content-font-size) * .75),1px)}.md[data-v-f0354d0f] li>ul,.md[data-v-f0354d0f] li>ol{margin-top:round(calc(var(--content-font-size) * .75),1px);padding-left:calc(var(--content-font-size) * 1.5)}.md[data-v-f0354d0f] ul>li:before{content:"";position:absolute;left:calc((var(--md-dot) + var(--content-font-size) * 2) / -2);top:calc((round(calc(var(--content-font-size) * 1.625),1px) - var(--md-dot)) / 2);width:var(--md-dot);height:var(--md-dot);border-radius:50%;background:color-mix(in srgb,var(--color-text) 90%,transparent)}.md[data-v-f0354d0f] ul>li:has(>input[type=checkbox]):before,.md[data-v-f0354d0f] ul>li:has(>p>input[type=checkbox]):before{content:none}.md[data-v-f0354d0f] ul ul>li:before{background:transparent;border:1px solid color-mix(in srgb,var(--color-text) 90%,transparent);box-sizing:border-box}.md[data-v-f0354d0f] ol{counter-reset:md-ol}.md[data-v-f0354d0f] ol[start],.md[data-v-f0354d0f] ol:has(>li[value]){counter-reset:none;list-style:decimal}.md[data-v-f0354d0f] ol[start]>li,.md[data-v-f0354d0f] ol:has(>li[value])>li{counter-increment:none}.md[data-v-f0354d0f] ol[start]>li:before,.md[data-v-f0354d0f] ol:has(>li[value])>li:before{content:none}.md[data-v-f0354d0f] ol>li{counter-increment:md-ol}.md[data-v-f0354d0f] ol>li:before{content:counter(md-ol) ".";position:absolute;top:0;left:calc(var(--content-font-size) * -2);width:calc(var(--content-font-size) * 2);line-height:round(calc(var(--content-font-size) * 1.625),1px);text-align:center;color:var(--color-text)}.md[data-v-f0354d0f] :not(pre)>code,.md[data-v-f0354d0f] .inline-code{font:.9em var(--font-mono);background:var(--color-inline-code-bg);color:var(--color-text);border:0;padding:0 4px;border-radius:var(--radius-sm)}.md[data-v-f0354d0f] strong code,.md[data-v-f0354d0f] strong .inline-code,.md[data-v-f0354d0f] b code,.md[data-v-f0354d0f] b .inline-code{font-weight:var(--weight-semibold)}.md[data-v-f0354d0f] .code-block-container{margin:.6em 0;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);box-shadow:var(--shadow-xs);overflow:hidden;--vscode-editor-font-size: var(--text-sm);--vscode-editor-line-height: calc(var(--text-sm) * 1.65)}.md[data-v-f0354d0f] .code-block-header{background:var(--color-surface);border-bottom:.5px solid var(--color-line);padding:4px 6px 4px 12px;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.md[data-v-f0354d0f] .code-block-header *{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.md[data-v-f0354d0f] .code-block-header .code-header-main{font-family:var(--font-ui)}.md[data-v-f0354d0f] .code-block-header .code-action-btn{color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-f0354d0f] .code-block-header .code-action-btn:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-f0354d0f] .code-block-header .code-action-btn:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-f0354d0f] .code-block-header .code-action-btn *{pointer-events:none}.md[data-v-f0354d0f] .code-block-shell-content,.md[data-v-f0354d0f] .markstream-pre{background:var(--color-well)}.md[data-v-f0354d0f] .code-editor-container{line-height:1.65;--diffs-gap-block: var(--space-3)}.md[data-v-f0354d0f] .code-editor-container diffs-container{--diffs-line-height: 1.65em}.md[data-v-f0354d0f] .code-pre-fallback>.markstream-pre__line-numbers{display:none}.md[data-v-f0354d0f] .code-block-container .code-pre-fallback{padding-left:1ch;line-height:1.65!important}.md[data-v-f0354d0f] .code-block-container pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers),.md[data-v-f0354d0f] .markstream-pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers){margin:0;padding:12px 14px;overflow-x:auto;font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-f0354d0f] .code-block-container pre code{font:inherit;color:var(--color-text);background:none;border:none;padding:0;border-radius:0}.md[data-v-f0354d0f] .markstream-pre,.md[data-v-f0354d0f] .code-pre-fallback,.md[data-v-f0354d0f] .code-block-shell-content pre:not(.shiki),.md[data-v-f0354d0f] .code-block-shell-content pre:not(.shiki) code{color:var(--color-text)}.md[data-v-f0354d0f] a{color:var(--color-accent);text-decoration:none}.md[data-v-f0354d0f] a:hover{text-decoration:underline}.md[data-v-f0354d0f] .katex-display{overflow-x:auto;overflow-y:hidden;padding:2px 0 6px;margin:.6em 0}.md[data-v-f0354d0f] .math-inline{vertical-align:baseline}.md[data-v-f0354d0f] blockquote{position:relative;margin:0;padding:0 0 0 round(calc(var(--content-font-size) * 1.5),1px);border-left:none;color:var(--color-text)}.md[data-v-f0354d0f] blockquote:before{content:"";position:absolute;left:calc(round(calc(var(--content-font-size) * 1.5),1px)/2 - 1px);top:2px;bottom:2px;width:2px;border-radius:2px;background:var(--color-line)}.md[data-v-f0354d0f] .blockquote>.paragraph-node{margin:0}.md[data-v-f0354d0f] .blockquote>.paragraph-node+.paragraph-node{margin-top:var(--content-font-size)}.md[data-v-f0354d0f] hr{border:none;border-top:1px solid var(--color-line);margin:0}.md[data-v-f0354d0f] table:not(.table-node){border-collapse:collapse;font-size:var(--text-lg);margin:.5em 0}.md[data-v-f0354d0f] table:not(.table-node) th,.md[data-v-f0354d0f] table:not(.table-node) td{border:1px solid var(--color-line);padding:4px 10px;text-align:left}.md[data-v-f0354d0f] table:not(.table-node) th{background:var(--color-surface);color:var(--color-text);font-weight:var(--weight-medium)}.md[data-v-f0354d0f] .table-node-wrapper{width:100%;max-width:100%!important;min-width:0;overflow-x:auto!important;scrollbar-gutter:auto!important;position:relative;--table-cell-cap: var(--p-table-cell-max)}.md[data-v-f0354d0f] .table-node{--table-border: var(--color-line);--table-header-bg: var(--color-surface);font-size:var(--text-lg);margin:.5em 0;width:max-content!important;min-width:100%;max-width:none!important;table-layout:auto!important}.md[data-v-f0354d0f] .table-node th,.md[data-v-f0354d0f] .table-node td{text-align:left;vertical-align:top;max-width:var(--table-cell-cap)}.md[data-v-f0354d0f] .table-node .text-node{display:inline-block;max-width:var(--table-cell-cap);vertical-align:top}.md[data-v-f0354d0f] .md-table-fade{display:none;position:absolute;top:0;bottom:0;right:0;width:36px;z-index:1;background:linear-gradient(to right,transparent,color-mix(in srgb,var(--color-bg) 65%,transparent) 55%,var(--color-bg));pointer-events:none;transition:opacity var(--duration-base) var(--ease-out)}.md[data-v-f0354d0f] .md-table-at-end .md-table-fade{opacity:0}.md[data-v-f0354d0f] .md-table-toggle{display:none;position:absolute;top:6px;right:6px;z-index:2;align-items:center;justify-content:center;width:26px;height:26px;color:var(--color-text-muted);background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-sm);box-shadow:var(--shadow-sm);cursor:pointer;opacity:0;transition:opacity var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}@container (min-width: 760px){.md[data-v-f0354d0f] .md-table-fade.md-table-toggle--show,.md[data-v-f0354d0f] .md-table-toggle.md-table-toggle--show{display:block}.md[data-v-f0354d0f] .md-table-toggle.md-table-toggle--show{display:inline-flex}}.md[data-v-f0354d0f] .table-node-wrapper:hover .md-table-toggle.md-table-toggle--show,.md[data-v-f0354d0f] .table-node-wrapper:focus-within .md-table-toggle.md-table-toggle--show,.md[data-v-f0354d0f] .table-node-wrapper.md-table-wide .md-table-toggle.md-table-toggle--show{opacity:1}.md[data-v-f0354d0f] .md-table-toggle:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-f0354d0f] .md-table-toggle:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-f0354d0f] .md-table-toggle svg{display:block}.md[data-v-f0354d0f] .table-node tbody tr:hover{background-color:transparent!important}.md-frontmatter[data-v-f0354d0f]{margin:0 0 var(--space-2);padding:var(--space-3) var(--space-4);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);box-shadow:var(--shadow-xs);overflow-x:auto;color:var(--color-text-muted);font:var(--text-sm)/1.65 var(--font-mono)}.diff-wrap[data-v-f0354d0f]{margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden}.diff-bar[data-v-f0354d0f]{display:flex;align-items:center;gap:6px;padding:4px 12px;background:var(--color-surface);border-bottom:1px solid var(--color-line);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.diff-lang[data-v-f0354d0f]{margin-right:auto}.diff-copy[data-v-f0354d0f]{display:inline-flex;align-items:center;justify-content:center;color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;padding:2px 6px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.diff-copy[data-v-f0354d0f]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.diff-copy[data-v-f0354d0f]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.diff-pre[data-v-f0354d0f]{margin:0;padding:12px 0;overflow-x:auto;background:var(--color-surface-sunken)}.diff-pre code[data-v-f0354d0f]{display:block;width:max-content;min-width:100%;font:var(--text-sm)/1.65 var(--font-mono);color:var(--color-text)}.diff-line[data-v-f0354d0f]{display:block;width:100%;padding:0 14px}.diff-sign[data-v-f0354d0f]{display:inline-block;width:14px;text-align:center;color:var(--color-text-muted);user-select:none}.diff-text[data-v-f0354d0f]{color:var(--color-text)}.diff-add[data-v-f0354d0f]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.diff-add .diff-sign[data-v-f0354d0f]{color:var(--color-success)}.diff-del[data-v-f0354d0f]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diff-del .diff-sign[data-v-f0354d0f]{color:var(--color-danger)}.diff-hunk[data-v-f0354d0f]{background:var(--color-surface)}.diff-hunk .diff-text[data-v-f0354d0f]{color:var(--color-text-muted)}.md[data-v-f0354d0f],.md .markdown-renderer[data-v-f0354d0f]{font-family:var(--sans)}.md .code-block-container[data-v-f0354d0f],.md .diff-wrap[data-v-f0354d0f]{border-radius:var(--radius-md)}.md :not(pre)>code[data-v-f0354d0f],.md .inline-code[data-v-f0354d0f]{border-radius:var(--radius-sm)}.upd[data-v-2b5c23f7]{display:inline-flex;flex:none;-webkit-app-region:no-drag;animation:upd-in-2b5c23f7 var(--duration-base) var(--ease-out)}@keyframes upd-in-2b5c23f7{0%{opacity:0;transform:scale(.85)}}.upd-pill[data-v-2b5c23f7]{display:inline-flex;align-items:center;gap:var(--space-1);padding:0 var(--space-2);border:none;border-radius:var(--radius-full);background:var(--color-warning);color:var(--color-text-on-accent);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);line-height:var(--leading-normal);white-space:nowrap;cursor:pointer;transition:filter var(--duration-fast) var(--ease-out)}.upd-pill[data-v-2b5c23f7]:hover{filter:brightness(1.1)}.upd-pill[data-v-2b5c23f7]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.upd-pill-icon[data-v-2b5c23f7]{flex:none;color:var(--color-text-on-accent)}.upd[data-state=downloading] .upd-pill-text[data-v-2b5c23f7]{display:inline-block;min-width:4ch;text-align:left;font-variant-numeric:tabular-nums}@container sidebar-col (max-width: 250px){.upd-pill[data-v-2b5c23f7]{padding:var(--space-1)}.upd-pill-text[data-v-2b5c23f7]{display:none}}.upd-meta[data-v-2b5c23f7]{margin:0;font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--color-text-faint)}.upd-message[data-v-2b5c23f7]{margin:0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted);word-break:break-all}.upd-notes[data-v-2b5c23f7]{margin-top:var(--space-3);padding-top:var(--space-3);border-top:1px solid var(--color-line);max-height:min(360px,45vh);overflow-y:auto;font-size:var(--text-sm);line-height:var(--leading-normal);color:var(--color-text)}.upd-notes-title[data-v-2b5c23f7]{margin:0 0 var(--space-2);font-size:var(--text-xs);font-weight:var(--weight-medium);color:var(--color-text-faint)}.upd-notes[data-v-2b5c23f7] ul,.upd-notes[data-v-2b5c23f7] p{margin:0}.upd-notes[data-v-2b5c23f7] li+li{margin-top:var(--space-1)}.upd-notes[data-v-2b5c23f7] h3{margin:var(--space-3) 0 var(--space-1);font-size:var(--text-sm);font-weight:var(--weight-medium);line-height:var(--leading-normal);color:var(--color-text)}.upd-notes[data-v-2b5c23f7] h3:first-child{margin-top:0}.upd-notes[data-v-2b5c23f7]:first-child{margin-top:0;padding-top:0;border-top:none}.upd-foot[data-v-2b5c23f7]{display:flex;flex-direction:column;align-items:stretch;gap:var(--space-3);width:100%}.upd-foot-actions[data-v-2b5c23f7]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2)}.upd-auto[data-v-2b5c23f7]{align-self:flex-end}.upd-progress[data-v-2b5c23f7]{margin-top:var(--space-3);height:var(--space-1);border-radius:var(--radius-xs);background:var(--color-line);overflow:hidden}.upd-progress-fill[data-v-2b5c23f7]{height:100%;border-radius:var(--radius-xs);background:var(--color-accent);transition:width var(--duration-base) var(--ease-out)}.user-menu-trigger[data-v-ee9821b4]{display:flex;align-items:center;gap:var(--sb-gap);width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);cursor:pointer;text-align:left}.user-menu-trigger[data-v-ee9821b4]:hover,.user-menu-trigger[aria-expanded=true][data-v-ee9821b4]{background:var(--sb-hover)}.user-menu-trigger[data-v-ee9821b4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.user-menu-trigger svg[data-v-ee9821b4]{flex:none}.user-menu-avatar[data-v-ee9821b4]{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex:none;border-radius:var(--radius-full);background:var(--color-surface-sunken);color:var(--color-text-muted);overflow:hidden}.user-menu-avatar img[data-v-ee9821b4]{width:100%;height:100%;object-fit:cover}.user-menu-name[data-v-ee9821b4]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-menu[data-v-ee9821b4]{position:fixed;top:0;left:0;z-index:var(--z-dropdown);max-height:calc(100vh - 16px);overflow-y:auto;overflow-x:hidden}.user-submenu[data-v-ee9821b4]{position:fixed;top:0;left:0;z-index:var(--z-dropdown);width:max-content;max-height:calc(100vh - 16px);overflow-y:auto;overflow-x:hidden}.menu-pop-enter-active[data-v-ee9821b4]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-ee9821b4]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-ee9821b4],.menu-pop-leave-to[data-v-ee9821b4]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, 2px))}.user-menu .ui-menu-item[data-v-ee9821b4],.user-submenu .ui-menu-item[data-v-ee9821b4]{padding:var(--space-2) 9px;font-size:var(--text-base)}.user-menu-usage[data-v-ee9821b4]{display:flex;flex-direction:column;gap:var(--space-1-5);padding:var(--space-2) var(--space-3)}.user-menu-usage-state[data-v-ee9821b4]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-1) 0;color:var(--color-text-muted);font-size:var(--text-base)}.user-menu-usage-error[data-v-ee9821b4]{flex:1;min-width:0}.user-menu-usage-empty[data-v-ee9821b4]{color:var(--color-text-faint)}.user-menu-usage-row[data-v-ee9821b4]{display:flex;align-items:flex-start;gap:var(--space-3)}.user-menu-usage-main[data-v-ee9821b4]{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-05)}.user-menu-usage-label[data-v-ee9821b4]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.user-menu-usage-hint[data-v-ee9821b4]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);color:var(--color-text-faint)}.user-menu-usage-value[data-v-ee9821b4]{flex:none;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);font-variant-numeric:tabular-nums;white-space:nowrap}.user-menu-usage-value.sev-warn[data-v-ee9821b4]{color:var(--color-warning)}.user-menu-usage-value.sev-danger[data-v-ee9821b4]{color:var(--color-danger)}.user-menu-item-label[data-v-ee9821b4]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-menu-login-label[data-v-ee9821b4]{color:var(--color-accent)}.user-menu-row-value[data-v-ee9821b4]{flex:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);color:var(--color-text-faint)}.emoji-picker[data-v-b0dbbae4]{--ep-cell: 26px}.ep-search[data-v-b0dbbae4]{display:flex;align-items:center;gap:var(--space-2);margin:var(--space-1);padding:0 var(--space-2);border-radius:var(--radius-sm);color:var(--color-text-faint)}.ep-search[data-v-b0dbbae4]:hover,.ep-search[data-v-b0dbbae4]:focus-within{background:var(--color-surface-sunken)}.ep-input[data-v-b0dbbae4]{flex:1;min-width:0;height:calc(var(--ep-cell) + 2px);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;outline:none}.ep-input[data-v-b0dbbae4]::placeholder{color:var(--color-text-faint)}.ep-scroll[data-v-b0dbbae4]{max-height:calc(var(--ep-cell) * 10 + var(--space-1));overflow-y:auto;padding:0 var(--space-1)}.ep-label[data-v-b0dbbae4]{padding:var(--space-1) var(--space-2);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--color-text-faint);user-select:none}.ep-grid[data-v-b0dbbae4]{display:grid;grid-template-columns:repeat(8,var(--ep-cell));gap:var(--space-1);padding-bottom:var(--space-1)}.ep-e[data-v-b0dbbae4]{height:var(--ep-cell);display:grid;place-items:center;padding:0;font-size:var(--text-lg);background:transparent;border:none;border-radius:var(--radius-xs);cursor:pointer}.ep-e[data-v-b0dbbae4]:hover{background:var(--color-hover)}.ep-e[data-v-b0dbbae4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ep-e.sel[data-v-b0dbbae4]{background:var(--color-accent-soft)}.ep-empty[data-v-b0dbbae4]{padding:var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);text-align:center;user-select:none}.se[data-v-8cccabc6]{--se-pad-x: var(--space-2);display:block;margin:0;padding:8px var(--se-pad-x);border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);cursor:pointer;position:relative}.se[data-v-8cccabc6]:hover{background:var(--sb-hover, var(--color-hover));color:var(--color-text)}.se.on[data-v-8cccabc6]{background:var(--sb-selected, var(--color-selected));color:var(--color-text)}.row[data-v-8cccabc6]{display:flex;align-items:center;gap:var(--sb-gap, 6px);min-width:0}.left[data-v-8cccabc6]{display:flex;align-items:center;flex:1;min-width:0}.lead[data-v-8cccabc6]{width:var(--sb-gutter, 16px);flex:none;display:inline-flex;align-items:center;justify-content:center}.unread-dot[data-v-8cccabc6]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-accent)}.t[data-v-8cccabc6]{--sb-fade: 0px;--sb-fade-len: 16px;color:inherit;font-size:var(--ui-font-size-sm);font-weight:450;line-height:var(--leading-tight);user-select:none;flex:1;min-width:0;overflow:hidden;text-overflow:clip;white-space:nowrap;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)));mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)))}.se:hover .t[data-v-8cccabc6]{--sb-fade: 34px;--sb-fade-len: 26px}.se:has(.ui-badge):hover .t[data-v-8cccabc6]{--sb-fade: 0px;--sb-fade-len: 16px}.t .emoji[data-v-8cccabc6]{padding:0;background:transparent;border:none;cursor:pointer}.t .emoji[data-v-8cccabc6]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sub[data-v-8cccabc6]{display:flex;align-items:center;gap:var(--space-1);margin:var(--space-1) 0 0;color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-tight);user-select:none}.sub-icon[data-v-8cccabc6]{flex:none;color:var(--color-text-muted)}.pr[data-v-8cccabc6]{display:inline-flex;align-items:center;gap:var(--space-05);flex:none;padding:1px var(--space-1);border:.5px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-2xs);font-weight:var(--weight-medium);line-height:1;cursor:pointer}.pr[data-v-8cccabc6]:hover{border-color:var(--color-line-strong)}.pr[data-v-8cccabc6]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.pr--open[data-v-8cccabc6],.pr--open[data-v-8cccabc6]:hover{background:var(--color-success-soft);border-color:var(--color-success-bd);color:var(--color-success)}.pr--merged[data-v-8cccabc6],.pr--merged[data-v-8cccabc6]:hover{background:var(--color-done-soft);border-color:var(--color-done-bd);color:var(--color-done)}.sub-text[data-v-8cccabc6]{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ts[data-v-8cccabc6]{color:var(--color-text-faint);font-size:var(--text-xs);font-family:var(--font-ui);font-weight:475;line-height:var(--leading-tight);font-variant-numeric:tabular-nums;text-align:right}.act[data-v-8cccabc6]{position:relative;flex:none;align-self:stretch;display:inline-flex;align-items:center;justify-content:flex-end;gap:var(--sb-gap, 6px);min-width:26px}.act .ha[data-v-8cccabc6]{position:absolute;top:0;bottom:0;right:calc(3px - var(--se-pad-x));display:inline-flex;align-items:center;gap:2px;opacity:0;visibility:hidden;border-radius:var(--radius-sm);transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.se:hover .ha[data-v-8cccabc6]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.act .ts[data-v-8cccabc6]{transition:opacity var(--duration-fast) var(--ease-out)}.se:hover .act .ts[data-v-8cccabc6]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.act .st[data-v-8cccabc6]{display:inline-flex;align-items:center;transition:opacity var(--duration-fast) var(--ease-out)}.se:hover .act .st[data-v-8cccabc6]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.act .ui-badge[data-v-8cccabc6]{transition:opacity var(--duration-fast) var(--ease-out)}.se.flat:hover .act .ui-badge[data-v-8cccabc6]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.menu[data-v-8cccabc6],.picker[data-v-8cccabc6]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-pop-enter-active[data-v-8cccabc6]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-8cccabc6]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-8cccabc6],.menu-pop-leave-to[data-v-8cccabc6]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}.menu-time[data-v-8cccabc6]{padding:6px 10px;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);cursor:default;user-select:text}.rename-wrap[data-v-8cccabc6]{position:relative;display:flex;align-items:center;flex:1;min-width:0;background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs)}.rename-input[data-v-8cccabc6]{flex:1;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;padding:1px 4px;outline:none;min-width:0}.rename-wrap.generating .rename-input[data-v-8cccabc6]{visibility:hidden}.gen-dots[data-v-8cccabc6]{position:absolute;left:6px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:3px;pointer-events:none}.gen-dots i[data-v-8cccabc6]{width:3px;height:3px;border-radius:var(--radius-full, 50%);background:var(--color-accent);animation:gen-title-dot-8cccabc6 .9s var(--ease-out) infinite}.gen-dots i[data-v-8cccabc6]:nth-child(2){animation-delay:.15s}.gen-dots i[data-v-8cccabc6]:nth-child(3){animation-delay:.3s}@keyframes gen-title-dot-8cccabc6{0%,60%,to{opacity:.3;transform:translate(0)}30%{opacity:1;transform:translate(2px)}}.gen-title-btn[data-v-8cccabc6]{flex:none;margin-right:1px;color:var(--color-accent)}.gen-title-btn[data-v-8cccabc6]:hover:not(:disabled){color:var(--color-accent-hover);background:transparent}.sessions .se[data-v-8cccabc6]{margin:0;border-radius:var(--radius-sm);--se-pad-x: calc(var(--sb-pad-x, 20px) - var(--sb-inset, 12px));padding:8px var(--se-pad-x)}.sessions .se.flat+.se.flat[data-v-8cccabc6]{margin-top:var(--space-05)}.sessions .se .rename-input[data-v-8cccabc6]{border-radius:var(--radius-sm);font-family:var(--sans)}.group.dragging[data-v-08d57eaf]{opacity:.45}.group.pinned-drag-active[data-v-08d57eaf],.group.pinned-drop-hover[data-v-08d57eaf]{border-radius:var(--radius-sm)}.group.pinned-drag-active[data-v-08d57eaf]{box-shadow:inset 0 0 0 1px var(--color-accent)}.group.pinned-drop-hover[data-v-08d57eaf]{box-shadow:inset 0 0 0 2px var(--color-accent)}.group.pinned-drop-blocked[data-v-08d57eaf],.group.pinned-drop-blocked[data-v-08d57eaf] *{cursor:no-drop}.se-locate-flash[data-v-08d57eaf]{isolation:isolate}.se-locate-flash[data-v-08d57eaf]:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:var(--radius-sm);background:var(--color-accent-soft);pointer-events:none;animation:se-locate-fade-08d57eaf var(--duration-flash) var(--ease-out) forwards}@keyframes se-locate-fade-08d57eaf{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.se-locate-flash[data-v-08d57eaf]:before{animation:none}}.group-sessions[data-v-08d57eaf]{height:auto;overflow:hidden;transition:height var(--duration-base) var(--ease-out)}.group-sessions.collapsed[data-v-08d57eaf]{height:0}.gh[data-v-08d57eaf]{display:flex;flex-direction:column;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text);user-select:none;position:relative;cursor:grab}.gh[data-v-08d57eaf]:active{cursor:grabbing}.gh[data-v-08d57eaf]:hover{background:var(--sb-hover, var(--color-hover))}.gh.on[data-v-08d57eaf]{background:var(--sb-selected, var(--color-selected))}.gh-top[data-v-08d57eaf]{position:relative;display:flex;align-items:center;gap:var(--sb-gap)}.gh-folder[data-v-08d57eaf]{flex:none;color:var(--color-text-muted)}.gh-name[data-v-08d57eaf]{font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text-muted);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.gh-actions[data-v-08d57eaf]{position:absolute;right:calc(3px - (var(--sb-pad-x) - var(--sb-inset)));top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:var(--space-1);padding-left:var(--space-1);border-radius:var(--radius-sm);isolation:isolate;opacity:0;pointer-events:none}.gh-name[data-v-08d57eaf]{--sb-fade: 0px;--sb-fade-len: 16px;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)));mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)))}.gh:hover .gh-name[data-v-08d57eaf],.gh:focus-within .gh-name[data-v-08d57eaf],.gh:has(.gh-actions.open) .gh-name[data-v-08d57eaf]{--sb-fade: 64px;--sb-fade-len: 26px}.gh-actions[data-v-08d57eaf]>*{position:relative;z-index:1}.gh:hover .gh-actions[data-v-08d57eaf],.gh:focus-within .gh-actions[data-v-08d57eaf],.gh-actions.open[data-v-08d57eaf]{opacity:1;pointer-events:auto}.gh-more.open[data-v-08d57eaf]{color:var(--color-text);background:var(--color-line)}.group-empty[data-v-08d57eaf]{padding:var(--space-1) var(--space-2) var(--space-1) calc(var(--sb-pad-x) - var(--sb-inset) + var(--sb-gutter) + var(--sb-gap));font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui);user-select:none}.show-more-row[data-v-08d57eaf]{display:flex;align-items:center;padding-left:calc(var(--sb-gutter) + var(--sb-gap))}.show-more[data-v-08d57eaf]{display:flex;align-items:center;gap:var(--sb-gap);margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));min-width:0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);text-align:left;cursor:pointer}.show-more[data-v-08d57eaf]:hover{background:var(--sb-hover, var(--color-hover))}.show-more[data-v-08d57eaf]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-sep[data-v-08d57eaf]{margin:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);user-select:none}.show-more-label[data-v-08d57eaf]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gh-rename[data-v-08d57eaf]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-regular);color:var(--color-text);background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.gh-rename[data-v-08d57eaf]{border-radius:var(--radius-sm);font-family:var(--sans)}.gh-add[data-v-08d57eaf]{color:var(--faint)}.gh-add[data-v-08d57eaf]:hover{color:var(--dim)}.pinned-label[data-v-728c6a88]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--faint);user-select:none}.pinned-title[data-v-728c6a88]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pinned-toggle[data-v-728c6a88]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.pinned-label:hover .pinned-toggle[data-v-728c6a88],.pinned-label:focus-within .pinned-toggle[data-v-728c6a88],.pinned-toggle--on[data-v-728c6a88]{opacity:1}.pinned-toggle[data-v-728c6a88]:hover{color:var(--dim)}.pinned-toggle svg[data-v-728c6a88]{width:13px;height:13px}.se-locate-flash[data-v-728c6a88]{isolation:isolate}.se-locate-flash[data-v-728c6a88]:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:var(--radius-sm);background:var(--color-accent-soft);pointer-events:none;animation:se-locate-fade-728c6a88 var(--duration-flash) var(--ease-out) forwards}@keyframes se-locate-fade-728c6a88{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.se-locate-flash[data-v-728c6a88]:before{animation:none}}.pinned-rows[data-v-728c6a88]{max-height:40vh;overflow-y:auto}.pinned-rows[data-v-728c6a88]::-webkit-scrollbar{width:4px}.pinned-rows[data-v-728c6a88]::-webkit-scrollbar-track{background:transparent}.pinned-rows[data-v-728c6a88]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.pinned-rows[data-v-728c6a88]:hover::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.pinned-rows[data-v-728c6a88]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.pin-row.dragging[data-v-728c6a88]{opacity:.45}.pinned.drop-active[data-v-728c6a88]{border-radius:var(--radius-sm);box-shadow:inset 0 0 0 1px var(--color-accent)}.side[data-v-fb698df7]{background:var(--color-sidebar-bg);display:flex;flex-direction:row;justify-content:flex-end;overflow:hidden;min-width:0;height:100%;transition:width .28s cubic-bezier(.4,0,.2,1),visibility .28s;--sb-inset: var(--space-2);--sb-pad-x: var(--space-4);--sb-gutter: 16px;--sb-gap: var(--space-2);--sb-hover: var(--color-hover);--sb-selected: color-mix(in srgb, var(--color-selected) 75%, transparent)}.side.no-anim[data-v-fb698df7]{transition:none}.side.collapsed[data-v-fb698df7]{visibility:hidden}.col[data-v-fb698df7]{flex:none;min-width:0;display:flex;flex-direction:column;min-height:0;width:100%;box-sizing:border-box;border-right:.5px solid var(--line);container-type:inline-size;container-name:sidebar-col;position:relative}.ch[data-v-fb698df7]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:var(--space-3);min-height:calc(26px + 2 * var(--space-3));width:100%;box-sizing:border-box}.side.macos-desktop .ch[data-v-fb698df7]{padding-left:80px;-webkit-app-region:drag}.side.macos-desktop .ch-brand[data-v-fb698df7]{display:none}.ch-logo[data-v-fb698df7]{height:22px;width:32px;flex:none;display:block;cursor:pointer;user-select:none;touch-action:none;transition:transform .18s ease}.ch-logo[data-v-fb698df7]:hover{transform:scale(1.08)}.ch-brand[data-v-fb698df7]{display:flex;align-items:center;gap:8px;min-width:0;flex:1;user-select:none;touch-action:none}.ch-tail[data-v-fb698df7]{display:flex;align-items:center;gap:var(--space-2);flex:none;min-width:0;margin-left:auto}.ch-name[data-v-fb698df7]{font-size:var(--ui-font-size);font-weight:500;line-height:22px;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container sidebar-col (max-width: 250px){.ch-name[data-v-fb698df7]{display:none}}.sidebar-actions[data-v-fb698df7]{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 var(--space-2);padding:0 var(--sb-inset) var(--space-1);position:relative;z-index:1;background:var(--color-sidebar-bg)}.sessions-head[data-v-fb698df7]{position:relative;z-index:1;padding:var(--space-3) var(--sb-inset) 0;border-bottom:.5px solid transparent;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.sessions-head[data-v-fb698df7]:after,.side-footer[data-v-fb698df7]:before{content:"";position:absolute;left:0;right:0;height:13px;pointer-events:none;opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sessions-head[data-v-fb698df7]:after{top:100%;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.5%,transparent),transparent 35%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1%,transparent),transparent 65%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) .75%,transparent),transparent);transition-duration:var(--duration-slow)}.sessions-head--scrolled[data-v-fb698df7]{border-bottom-color:var(--line)}.sessions-head--scrolled[data-v-fb698df7]:after{opacity:1}.btn-new-chat[data-v-fb698df7]{grid-column:1 / -1;display:flex;align-items:center;gap:var(--sb-gap);width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);cursor:pointer;text-align:left}.sidebar-actions--has-workspace-action .btn-new-chat[data-v-fb698df7]{grid-column:1}.btn-new-chat[data-v-fb698df7]:hover{background:var(--sb-hover)}.btn-new-chat[data-v-fb698df7]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-new-chat svg[data-v-fb698df7]{flex:none}.btn-new-chat span[data-v-fb698df7]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btn-new-chat[data-v-fb698df7] .ui-kbd{margin-left:auto}.btn-new-chat[data-v-fb698df7] .ui-kbd,.search[data-v-fb698df7] .ui-kbd{opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.btn-new-chat[data-v-fb698df7]:hover .ui-kbd,.btn-new-chat[data-v-fb698df7]:focus-visible .ui-kbd,.search[data-v-fb698df7]:hover .ui-kbd,.search[data-v-fb698df7]:focus-visible .ui-kbd{opacity:1}.search[data-v-fb698df7]{grid-column:1 / -1;display:flex;align-items:center;gap:var(--sb-gap);width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.search[data-v-fb698df7]:hover{background:var(--sb-hover)}.search[data-v-fb698df7]:focus-visible{background:var(--sb-hover);color:var(--color-text);outline:2px solid var(--color-accent-bd);outline-offset:-2px}.search-icon[data-v-fb698df7]{flex:none;transform:translateY(-.5px)}.search-input[data-v-fb698df7]{flex:1;min-width:0;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sessions[data-v-fb698df7]{flex:1;overflow-y:auto;padding:0 var(--sb-inset) var(--space-3);min-height:0}.sessions[data-v-fb698df7]::-webkit-scrollbar{width:4px}.sessions[data-v-fb698df7]::-webkit-scrollbar-track{background:transparent}.sessions[data-v-fb698df7]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.sessions.scrolling[data-v-fb698df7]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.sessions.scrolling[data-v-fb698df7]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.side-footer[data-v-fb698df7]{flex:none;position:relative;z-index:1;padding:var(--space-2) var(--sb-inset);border-top:.5px solid var(--line);background:var(--color-sidebar-bg)}.side-footer[data-v-fb698df7]:before{bottom:100%;background:linear-gradient(to top,color-mix(in srgb,var(--color-text) 1.5%,transparent),transparent 35%),linear-gradient(to top,color-mix(in srgb,var(--color-text) 1%,transparent),transparent 65%),linear-gradient(to top,color-mix(in srgb,var(--color-text) .75%,transparent),transparent);transition-duration:var(--duration-slow)}.side-footer--shadowed[data-v-fb698df7]:before{opacity:1}.side-section-label[data-v-fb698df7]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--faint);user-select:none}.side-section-title[data-v-fb698df7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sessions-head .pinned+.side-section-label[data-v-fb698df7]{margin-top:var(--space-2)}.side-section-toggle[data-v-fb698df7]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.side-section-label:hover .side-section-toggle[data-v-fb698df7],.side-section-label:focus-within .side-section-toggle[data-v-fb698df7]{opacity:1}.side-section-toggle[data-v-fb698df7]:hover{color:var(--dim)}.side-section-toggle svg[data-v-fb698df7]{width:13px;height:13px}.side-section-actions[data-v-fb698df7]{display:flex;align-items:center;gap:2px}.ws-drop-target.drop-before[data-v-fb698df7]{box-shadow:inset 0 2px 0 var(--color-accent)}.ws-drop-target.drop-after[data-v-fb698df7]{box-shadow:inset 0 -2px 0 var(--color-accent)}.ws-drop-target.ws-locate-flash[data-v-fb698df7] .gh{isolation:isolate}.ws-drop-target.ws-locate-flash[data-v-fb698df7] .gh:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:var(--radius-sm);background:var(--color-accent-soft);pointer-events:none;animation:ws-locate-fade-fb698df7 var(--duration-flash) var(--ease-out) forwards}@keyframes ws-locate-fade-fb698df7{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.ws-drop-target.ws-locate-flash[data-v-fb698df7] .gh:before{animation:none}}.sessions.pinned-drag-active[data-v-fb698df7]{box-shadow:inset 0 0 0 1px var(--color-accent)}.sessions.flat-pinned-drop-hover[data-v-fb698df7]{box-shadow:inset 0 0 0 2px var(--color-accent)}.show-more-row[data-v-fb698df7]{display:flex;align-items:center;justify-content:center}.show-more[data-v-fb698df7]{display:flex;align-items:center;justify-content:center;gap:var(--space-1);margin:0;padding:6px var(--space-3);min-width:0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);cursor:pointer}.show-more[data-v-fb698df7]:hover{background:var(--sb-hover, var(--color-hover))}.show-more[data-v-fb698df7]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-label[data-v-fb698df7]{flex:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.folder-drop-overlay[data-v-fb698df7]{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;padding:var(--space-3);box-sizing:border-box;background:color-mix(in srgb,var(--color-sidebar-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.folder-drop-overlay.show[data-v-fb698df7]{opacity:1;visibility:visible}.folder-drop-card[data-v-fb698df7]{display:flex;align-items:center;gap:var(--space-3);max-width:100%;box-sizing:border-box;padding:var(--space-4);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.folder-drop-card svg[data-v-fb698df7]{flex:none}.folder-drop-card span[data-v-fb698df7]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty[data-v-fb698df7]{padding:var(--space-6) var(--space-3);text-align:center;color:var(--faint);font-size:calc(var(--ui-font-size) - 3px);line-height:1.6}.ws-menu[data-v-fb698df7],.gh-menu[data-v-fb698df7],.view-menu[data-v-fb698df7]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.view-menu-label[data-v-fb698df7]{padding:var(--space-1) var(--space-2) var(--space-05);font-size:var(--text-xs);color:var(--faint);user-select:none}.view-menu-check[data-v-fb698df7]{margin-left:auto;display:inline-flex}.menu-pop-enter-active[data-v-fb698df7]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-fb698df7]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-fb698df7],.menu-pop-leave-to[data-v-fb698df7]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}[data-v-fb698df7] .workspace-rename-item{font-size:var(--text-xs);font-weight:var(--weight-option-label)}.section-menu-check[data-v-fb698df7]{display:inline-flex;flex:none;width:14px}.rh[data-v-1c6dfdc5]{width:4px;flex:none;position:relative;align-self:stretch;background:transparent;touch-action:none;margin:0 -2px;z-index:var(--z-dropdown)}.rh-bar[data-v-1c6dfdc5]{position:absolute;inset:0 1px;background:transparent;transition:background .12s}.rh:hover .rh-bar[data-v-1c6dfdc5]{background:var(--color-selected)}.rh.dragging .rh-bar[data-v-1c6dfdc5]{background:var(--color-line-strong)}.op[data-v-ab413c67]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);background:var(--color-well);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-word;max-height:12lh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.op-empty[data-v-ab413c67]{color:var(--color-text-faint);font-style:italic}.agent-card[data-v-5bbb3a70]{margin:var(--space-1) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.agent-card[data-v-5bbb3a70]:hover{border-color:var(--color-line-strong)}.agent-card.err[data-v-5bbb3a70]{border-color:color-mix(in srgb,var(--color-danger) 45%,var(--bg))}.head[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-2) var(--space-3);border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);text-align:left;cursor:pointer}.head[data-v-5bbb3a70]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.head[data-v-5bbb3a70]:disabled{cursor:default}.lead[data-v-5bbb3a70]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-surface-sunken);color:var(--color-text-muted);flex:none}.main[data-v-5bbb3a70]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.task[data-v-5bbb3a70]{font-size:var(--ui-font-size);line-height:var(--leading-caption);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.type[data-v-5bbb3a70]{font-size:var(--text-xs);line-height:var(--leading-caption);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tail[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-2);flex:none}.st[data-v-5bbb3a70]{display:inline-flex;align-items:center}.st.ok[data-v-5bbb3a70]{color:var(--color-success)}.st.error[data-v-5bbb3a70]{color:var(--color-danger)}.go[data-v-5bbb3a70]{color:var(--color-text-faint);transition:color var(--duration-base) var(--ease-out)}.agent-card:hover .head:not(:disabled) .go[data-v-5bbb3a70]{color:var(--color-text)}.go.car[data-v-5bbb3a70]{transition:color var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.go.car.open[data-v-5bbb3a70]{transform:rotate(90deg)}.saved-result[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);text-align:left;cursor:pointer}.saved-result[data-v-5bbb3a70]:hover{color:var(--color-text-muted)}.saved-result[data-v-5bbb3a70]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.saved-result__chevron[data-v-5bbb3a70]{transition:transform var(--duration-base) var(--ease-out)}.saved-result__chevron.open[data-v-5bbb3a70]{transform:rotate(90deg)}.result[data-v-5bbb3a70]{padding:var(--space-2) var(--space-3)}.result--legacy[data-v-5bbb3a70]{border-top:.5px solid var(--color-line)}.tl-head[data-v-58658159]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) 0;border-radius:var(--radius-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left}.tl-head.clickable[data-v-58658159]{cursor:pointer;user-select:none}.tl-ic[data-v-58658159]{display:inline-flex;align-items:center;justify-content:flex-start;flex:none;color:var(--color-text-faint)}.tl-main[data-v-58658159]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-1)}.tl-tail[data-v-58658159]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}.tl-status[data-v-58658159]{display:inline-flex;align-items:center;flex:none}.tl-status.ok[data-v-58658159]{color:var(--color-success)}.tl-status.error[data-v-58658159]{color:var(--color-danger)}.tl-car[data-v-58658159]{display:inline-flex;align-items:center;justify-content:center;align-self:center;width:16px;height:16px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);cursor:pointer;flex:none}.tl-car[data-v-58658159]:hover{color:var(--color-text)}.tl-car[data-v-58658159]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-car-ic[data-v-58658159]{transition:transform var(--duration-base) var(--ease-out)}.tool-line.open .tl-car-ic[data-v-58658159]{transform:rotate(90deg)}.tl-body[data-v-58658159]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tl-body.open[data-v-58658159]{grid-template-rows:minmax(0,1fr)}.tl-body-inner[data-v-58658159]{min-height:0;overflow:hidden;padding:2px var(--space-2) var(--space-1) 0}.tl-main .tl-name[data-v-58658159-s]{font-weight:var(--weight-regular);color:var(--color-text-muted);flex:none}.tl-main .tl-dim[data-v-58658159-s]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-faint[data-v-58658159-s]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-mono[data-v-58658159-s]{font-family:var(--font-mono);font-size:var(--text-xs);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);line-height:normal;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-file[data-v-58658159-s]{font-weight:var(--weight-regular);color:var(--color-text);line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer}.tl-main .tl-file[data-v-58658159-s]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-main .tl-file[data-v-58658159-s]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-tail .tl-pill[data-v-58658159-s]{font-size:var(--text-xs);line-height:1.5;padding:0 var(--space-2);border-radius:var(--radius-full);flex:none;white-space:nowrap}.tl-tail .tl-chip[data-v-58658159-s]{color:var(--color-text-faint);font-size:var(--text-xs);flex:none;white-space:nowrap}.tl-tail .tl-add[data-v-58658159-s]{color:var(--color-success);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tl-tail .tl-del[data-v-58658159-s]{color:var(--color-danger);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.ask-receipt[data-v-f29eda04]{max-width:560px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-xs);padding:var(--space-2) var(--space-3) 10px;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.ask-receipt.flat[data-v-f29eda04]{color:var(--color-text-faint);font-style:italic;padding-top:6px;padding-bottom:6px}.rc-head[data-v-f29eda04]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text-faint);font-size:var(--text-xs);margin-bottom:6px}.rc-st[data-v-f29eda04]{margin-left:auto;color:var(--color-success);display:inline-flex}.rc-q+.rc-q[data-v-f29eda04]{margin-top:6px}.rc-qtext[data-v-f29eda04]{display:flex;align-items:baseline;gap:var(--space-2);margin-bottom:3px;font-weight:var(--weight-medium);color:var(--color-text)}.rc-opt[data-v-f29eda04]{display:flex;align-items:center;gap:var(--space-2);padding:1.5px 0;color:var(--color-text)}.rc-qskip[data-v-f29eda04]{padding:1.5px 0;color:var(--color-text-faint);font-style:italic}.rc-lb[data-v-f29eda04]{min-width:0}.rc-ds[data-v-f29eda04]{color:var(--color-text-faint);font-size:var(--text-xs)}.rc-g[data-v-f29eda04]{width:14px;height:14px;flex:none;border:.5px solid var(--color-line-strong);position:relative}.rc-g.chk[data-v-f29eda04]{border-radius:var(--radius-xs)}.rc-g.rad[data-v-f29eda04]{border-radius:50%}.rc-g.on[data-v-f29eda04]{border-color:var(--color-accent)}.rc-g.chk.on[data-v-f29eda04]{background:var(--color-accent)}.rc-g.chk.on[data-v-f29eda04]:after{content:"";position:absolute;left:3.5px;top:.5px;width:4px;height:8px;border-right:1.5px solid var(--color-text-on-accent);border-bottom:1.5px solid var(--color-text-on-accent);transform:rotate(45deg)}.rc-g.rad.on[data-v-f29eda04]:after{content:"";position:absolute;inset:2.5px;border-radius:50%;background:var(--color-accent)}.cmd-echo[data-v-8869dd42]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.hl-code[data-v-6735e4da]{border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:auto;max-height:calc(24 * 1.5 * var(--ui-font-size));overscroll-behavior:contain;font-family:var(--font-mono);font-size:var(--code-font-size);line-height:var(--leading-normal);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none}.hl-code[data-v-6735e4da]:not(.framed){border:none;border-radius:0;background:transparent;max-height:none;overflow:visible}.hl-body[data-v-6735e4da]{width:max-content;min-width:100%;padding:var(--space-1) 0 var(--space-2)}.hl-code.plain-pad .hl-body[data-v-6735e4da]{padding-left:var(--space-3)}.hl-row[data-v-6735e4da]{display:flex;align-items:flex-start;min-height:calc(1em * var(--leading-normal));white-space:pre;width:100%}.hl-gutter[data-v-6735e4da]{flex:none;box-sizing:content-box;min-width:var(--gutter-ch, 4ch);padding:0 var(--space-2);text-align:right;color:var(--color-text-faint);user-select:none;border-right:.5px solid var(--color-line);font-variant-numeric:tabular-nums}.hl-sign[data-v-6735e4da]{flex:none;width:16px;text-align:center;color:var(--color-text-muted);user-select:none}.hl-text[data-v-6735e4da]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.hl-gutter+.hl-text[data-v-6735e4da]{padding-left:var(--space-2)}.row-add[data-v-6735e4da]{background:var(--color-diff-add-bg)}.row-add .hl-sign[data-v-6735e4da]{color:var(--color-success)}.row-del[data-v-6735e4da]{background:var(--color-diff-del-bg)}.row-del .hl-sign[data-v-6735e4da]{color:var(--color-danger)}.row-hunk[data-v-6735e4da]{background:var(--color-surface-sunken)}.row-hunk .hl-text[data-v-6735e4da]{color:var(--color-text-muted)}.hl-code.gutter .row-add[data-v-6735e4da]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.hl-code.gutter .row-del[data-v-6735e4da]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diffbar[data-v-bbf61950]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;gap:1px;flex:none}.seg-add[data-v-bbf61950]{background:var(--color-success)}.seg-del[data-v-bbf61950]{background:var(--color-danger)}.gl[data-v-b12a8498]{display:inline-flex;align-items:center}.arg-full[data-v-b12a8498]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.file-list[data-v-3936099e]{display:flex;flex-direction:column;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-1);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.file-row[data-v-3936099e]{width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.file-row[data-v-3936099e]:hover{background:var(--color-hover);color:var(--color-accent)}.file-row[data-v-3936099e]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-pill.pill-active[data-v-862274de]{color:var(--color-accent);background:var(--color-accent-soft)}.tl-pill.pill-done[data-v-862274de]{color:var(--color-success);background:var(--color-success-soft)}.tl-pill.pill-blocked[data-v-862274de]{color:var(--color-warning);background:var(--color-warning-soft)}.goal-block[data-v-862274de]{margin-bottom:var(--space-1)}.goal-text[data-v-862274de]{color:var(--color-text);font-size:calc(var(--content-font-size) - 1px);line-height:1.6;white-space:pre-wrap;word-break:break-word}.goal-criterion[data-v-862274de]{color:var(--color-text-muted);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;margin-top:2px;white-space:pre-wrap;word-break:break-word}.match-list[data-v-899c1a48]{display:flex;flex-direction:column;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-1);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.match-row[data-v-899c1a48]{display:flex;align-items:baseline;gap:var(--space-2);width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);text-align:left;cursor:default}.match-row.link[data-v-899c1a48]{cursor:pointer}.match-row.link[data-v-899c1a48]:hover{background:var(--color-hover)}.match-row[data-v-899c1a48]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mref[data-v-899c1a48]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-faint)}.match-row.link:hover .mref[data-v-899c1a48]{color:var(--color-accent)}.mtext[data-v-899c1a48]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.is-resolving[data-v-0826404b]{visibility:hidden}.media-tool[data-v-3bc3ee1a]{display:inline-flex;flex-direction:column;gap:6px;max-width:320px}.media-title[data-v-3bc3ee1a]{font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-image-button[data-v-3bc3ee1a]{padding:0;border:none;background:transparent;cursor:pointer;border-radius:var(--radius-md);overflow:hidden}.media-image[data-v-3bc3ee1a]{display:block;max-width:100%;border-radius:var(--radius-md);background:var(--media-alpha-canvas)}.media-video[data-v-3bc3ee1a],.media-audio[data-v-3bc3ee1a]{max-width:100%;border-radius:var(--radius-md)}.media-video[data-v-3bc3ee1a]{display:block}.media-video-button[data-v-3bc3ee1a]{position:relative}.media-video-tile[data-v-3bc3ee1a]{display:block;width:320px;max-width:100%;aspect-ratio:16 / 9;background:var(--color-well)}.media-play-badge[data-v-3bc3ee1a]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.plan-glyph[data-v-8dff80a1]{display:inline-flex;align-items:center}.plan-path[data-v-8dff80a1]{display:block;max-width:100%;margin:0 0 var(--space-2);padding:0;overflow:hidden;border:none;background:transparent;color:var(--color-accent);font-family:var(--font-mono);font-size:var(--text-xs);text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.plan-path[data-v-8dff80a1]:hover{text-decoration:underline}.plan-path[data-v-8dff80a1]:focus-visible{outline:none;border-radius:var(--radius-xs);box-shadow:var(--p-focus-ring)}.plan-content[data-v-8dff80a1]{padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);color:var(--color-text)}.plan-review[data-v-8dff80a1]{display:flex;flex-direction:column;gap:var(--space-1);margin-top:var(--space-2);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal)}.plan-review>div[data-v-8dff80a1]{display:flex;align-items:baseline;gap:var(--space-2)}.review-label[data-v-8dff80a1]{flex:none;color:var(--color-text-faint)}.review-feedback[data-v-8dff80a1]{white-space:pre-wrap}.path-link[data-v-0edbdd82]{display:block;width:100%;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 0 var(--space-1);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);color:var(--color-text-muted);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.path-link[data-v-0edbdd82]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.path-link[data-v-0edbdd82]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.swarm-card[data-v-f7b643ea]{margin:0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.swarm-card.err[data-v-f7b643ea]{border-color:color-mix(in srgb,var(--color-danger) 45%,var(--bg))}.head[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:34px;padding:0 var(--space-2) 0 var(--space-3);border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--ui-font-size);text-align:left;cursor:pointer;user-select:none}.head[data-v-f7b643ea]:hover{background:var(--color-hover);color:var(--color-text)}.head[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ic[data-v-f7b643ea]{color:var(--color-text-faint);flex:none}.title[data-v-f7b643ea]{font-weight:var(--weight-medium);color:var(--color-text);flex:none}.meta[data-v-f7b643ea]{color:var(--color-text-faint);flex:none}.sum-txt[data-v-f7b643ea]{color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-f7b643ea]{margin-left:auto;display:flex;align-items:center;gap:var(--space-2);flex:none;color:var(--color-text-muted);font-size:var(--text-xs)}.status[data-v-f7b643ea]{display:inline-flex;align-items:center;flex:none}.status[data-v-f7b643ea]:has(>svg){color:var(--color-success)}.err .status[data-v-f7b643ea]:has(>svg){color:var(--color-danger)}.chip[data-v-f7b643ea]{color:var(--color-text-muted);font-family:var(--font-mono)}.tm[data-v-f7b643ea]{color:var(--color-text-faint);font-family:var(--font-mono)}.car[data-v-f7b643ea]{margin-left:2px;color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.swarm-card.open .car[data-v-f7b643ea]{transform:rotate(90deg)}.body[data-v-f7b643ea]{border-top:.5px solid var(--color-line)}.overview[data-v-f7b643ea]{padding:10px var(--space-3) var(--space-2);border-bottom:.5px solid var(--color-line)}.overview-line[data-v-f7b643ea]{display:flex;align-items:baseline;gap:var(--space-2)}.big[data-v-f7b643ea]{font-family:var(--font-mono);font-weight:var(--weight-medium);color:var(--color-text);font-size:15px}.lbl[data-v-f7b643ea]{color:var(--color-text-muted);font-size:var(--text-xs)}.seg[data-v-f7b643ea]{display:flex;height:5px;border-radius:var(--radius-full);overflow:hidden;margin:var(--space-2) 0 var(--space-1);gap:2px}.seg>span[data-v-f7b643ea]{height:100%;border-radius:var(--radius-full);min-width:3px}.s-ok[data-v-f7b643ea]{background:var(--color-success)}.s-run[data-v-f7b643ea]{background:var(--color-accent)}.s-warn[data-v-f7b643ea]{background:var(--color-warning)}.s-fail[data-v-f7b643ea]{background:var(--color-danger)}.s-queue[data-v-f7b643ea]{background:var(--color-line)}.legend[data-v-f7b643ea]{display:flex;flex-wrap:wrap;gap:10px}.legend span[data-v-f7b643ea]{display:inline-flex;align-items:center;gap:5px;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted)}.lg-dot[data-v-f7b643ea]{width:6px;height:6px;border-radius:var(--radius-full)}.member[data-v-f7b643ea]{border-bottom:.5px solid var(--color-line)}.member[data-v-f7b643ea]:last-child{border-bottom:none}.member-head[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:30px;padding:0 var(--space-2) 0 var(--space-3);border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);text-align:left;cursor:pointer;user-select:none}.member-head[data-v-f7b643ea]:not(:disabled):hover{background:var(--color-hover)}.member-head[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.member-head[data-v-f7b643ea]:disabled{cursor:default}.row-dot[data-v-f7b643ea]{flex:none}.mname[data-v-f7b643ea]{flex:none;min-width:0;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium);color:var(--color-text)}.mact[data-v-f7b643ea]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font-size:var(--text-xs)}.mphase[data-v-f7b643ea]{flex:none;margin-left:auto;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.phase-completed .mphase[data-v-f7b643ea]{color:var(--color-success)}.phase-failed .mphase[data-v-f7b643ea]{color:var(--color-danger)}.phase-working .mphase[data-v-f7b643ea]{color:var(--color-accent)}.phase-suspended .mphase[data-v-f7b643ea]{color:var(--color-warning)}.mcar[data-v-f7b643ea]{margin-left:var(--space-1);color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.member.open .mcar[data-v-f7b643ea]{transform:rotate(90deg)}.member-saved[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);text-align:left;cursor:pointer}.member-saved[data-v-f7b643ea]:hover{color:var(--color-text-muted)}.member-saved[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.member-saved-car[data-v-f7b643ea]{transition:transform var(--duration-base) var(--ease-out)}.member-saved-car.open[data-v-f7b643ea]{transform:rotate(90deg)}.member-body[data-v-f7b643ea]{padding:var(--space-1) var(--space-3) 10px 31px;color:var(--color-text-muted);font-size:calc(var(--content-font-size) - 2px);line-height:1.65;white-space:pre-wrap;word-break:break-word}.waiting[data-v-f7b643ea]{padding:6px var(--space-3) 10px;color:var(--color-text-muted);font-size:var(--text-xs)}.fallback-output[data-v-f7b643ea]{padding:10px var(--space-3);color:var(--color-text);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;white-space:pre-wrap;word-break:break-word}.status-glyph[data-v-f1aedfd0]{flex:none;width:16px;display:inline-flex;align-items:center;justify-content:center;user-select:none}.status-glyph.s-run[data-v-f1aedfd0]{color:var(--color-accent)}.status-glyph.s-done[data-v-f1aedfd0]{color:var(--color-success)}.status-glyph.s-fail[data-v-f1aedfd0]{color:var(--color-danger)}.status-glyph.s-pending[data-v-f1aedfd0]{color:var(--color-text-faint)}.todo-bar[data-v-1b7f51f3]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.todo-fill[data-v-1b7f51f3]{background:var(--color-success);border-radius:var(--radius-full);transition:width var(--duration-slow) var(--ease-out)}.todo-list[data-v-1b7f51f3]{display:flex;flex-direction:column;gap:1px;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-2) var(--space-3);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.todo-row[data-v-1b7f51f3]{display:flex;align-items:center;gap:7px;padding:2px 0;font-size:calc(var(--content-font-size) - 1px);color:var(--color-text)}.todo-title[data-v-1b7f51f3]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.4}.todo-row.s-in_progress .todo-title[data-v-1b7f51f3]{font-weight:var(--weight-medium)}.todo-row.s-done .todo-title[data-v-1b7f51f3]{color:var(--color-text-faint);text-decoration:line-through}.fetch-url[data-v-8c248fcc]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;color:var(--color-text-faint);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.think[data-v-7d463c2a]{margin:0}.think-head[data-v-7d463c2a]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.think-head[data-v-7d463c2a]:hover{color:var(--color-text)}.think-head[data-v-7d463c2a]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.think-bulb[data-v-7d463c2a]{flex:none}.think-title[data-v-7d463c2a]{font-weight:var(--weight-medium)}.think-time[data-v-7d463c2a]{color:var(--color-text-faint);font-weight:400;flex:none}.think.streaming .think-title[data-v-7d463c2a]{animation:think-breathe-7d463c2a 1.6s var(--ease-in-out) infinite}@keyframes think-breathe-7d463c2a{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.think.streaming .think-title[data-v-7d463c2a]{animation:none}}.think-car[data-v-7d463c2a]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.think.open .think-car[data-v-7d463c2a]{transform:rotate(90deg)}.think-body[data-v-7d463c2a]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.think-body.instant[data-v-7d463c2a]{transition:none}.think-body.open[data-v-7d463c2a]{grid-template-rows:minmax(0,1fr)}.think-body-inner[data-v-7d463c2a]{min-height:0;overflow:hidden}.think-text[data-v-7d463c2a]{font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:400;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word;margin:0;padding:var(--space-1) 0 var(--space-2)}.mob .think-text[data-v-7d463c2a]{color:var(--color-text-faint);line-height:var(--leading-normal)}.activity-run[data-v-91eb361a]{display:flex;flex-direction:column;animation:kimi-card-in var(--duration-base) var(--ease-out)}.ar-head[data-v-91eb361a]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.ar-head[data-v-91eb361a]:hover{color:var(--color-text)}.ar-head[data-v-91eb361a]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ar-glyph[data-v-91eb361a]{display:inline-flex;align-items:center;flex:none;color:var(--color-text-faint)}.ar-glyph.ok[data-v-91eb361a]{color:var(--color-success)}.ar-glyph.err[data-v-91eb361a]{color:var(--color-danger)}.ar-glyph.run[data-v-91eb361a]{color:var(--color-text-muted);animation:ar-breathe-91eb361a 1.6s var(--ease-in-out) infinite}@keyframes ar-breathe-91eb361a{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.ar-glyph.run[data-v-91eb361a]{animation:none}}.ar-sum[data-v-91eb361a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.ar-danger[data-v-91eb361a]{color:var(--color-danger)}.ar-faint[data-v-91eb361a],.ar-sep[data-v-91eb361a]{color:var(--color-text-faint)}.ar-car[data-v-91eb361a]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.activity-run.open .ar-car[data-v-91eb361a]{transform:rotate(90deg)}.ar-body[data-v-91eb361a]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.ar-body.open[data-v-91eb361a]{grid-template-rows:minmax(0,1fr)}.ar-body-inner[data-v-91eb361a]{min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:var(--space-2);padding-top:var(--space-1)}.msg-time[data-v-9153170e]{display:inline-flex;align-items:center;min-height:22px;box-sizing:border-box;padding:2px 5px;border-radius:var(--radius-sm);color:var(--muted);font-size:var(--text-xs);font-weight:var(--weight-medium);line-height:1;opacity:.7;white-space:nowrap}.ntf[data-v-69e0a1db],.ntf-group-card[data-v-69e0a1db]{margin:var(--space-2) 0;border:.5px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface);box-shadow:var(--shadow-xs);overflow:hidden;animation:kimi-card-in var(--duration-slow) var(--ease-out)}.ntf.ok[data-v-69e0a1db]{background:var(--color-success-soft);border-color:var(--color-success-bd)}.ntf.err[data-v-69e0a1db]{background:var(--color-danger-soft);border-color:var(--color-danger-bd)}.ntf.warn[data-v-69e0a1db]{background:var(--color-warning-soft);border-color:var(--color-warning-bd)}.ntf-head[data-v-69e0a1db]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-2) var(--space-3);border:none;text-align:left;user-select:none}.ntf-chip[data-v-69e0a1db]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);flex:none;color:var(--color-text-muted)}.ntf.ok .ntf-chip[data-v-69e0a1db]{color:var(--color-success)}.ntf.err .ntf-chip[data-v-69e0a1db]{color:var(--color-danger)}.ntf.warn .ntf-chip[data-v-69e0a1db]{color:var(--color-warning)}.ntf-main[data-v-69e0a1db]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.ntf-title[data-v-69e0a1db]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.ntf-sub[data-v-69e0a1db]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ntf-side[data-v-69e0a1db]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1);font-size:var(--text-xs);color:var(--color-text-faint)}.ntf-side .st[data-v-69e0a1db]{font-weight:var(--weight-medium)}.ntf.ok .st[data-v-69e0a1db],.ng-item.ok .st[data-v-69e0a1db]{color:var(--color-success)}.ntf.err .st[data-v-69e0a1db],.ng-item.err .st[data-v-69e0a1db]{color:var(--color-danger)}.ntf.warn .st[data-v-69e0a1db],.ng-item.warn .st[data-v-69e0a1db]{color:var(--color-warning)}.ntf-car[data-v-69e0a1db]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.ntf.open>.ntf-head .ntf-car[data-v-69e0a1db],.ntf-group-card.open>.ntf-head .ntf-car[data-v-69e0a1db],.ng-item.open>.ntf-head .ntf-car[data-v-69e0a1db]{transform:rotate(90deg)}.ntf-body-in[data-v-69e0a1db]{margin:0 var(--space-3) var(--space-3);padding-top:var(--space-3);border-top:.5px solid var(--color-line);display:flex;flex-direction:column;gap:var(--space-2)}.ntf.ok .ntf-body-in[data-v-69e0a1db],.ng-item.ok .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-success-bd)}.ntf.err .ntf-body-in[data-v-69e0a1db],.ng-item.err .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-danger-bd)}.ntf.warn .ntf-body-in[data-v-69e0a1db],.ng-item.warn .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-warning-bd)}.nd-fields[data-v-69e0a1db]{display:grid;grid-template-columns:auto 1fr;gap:var(--space-1) var(--space-3)}.nd-fields .k[data-v-69e0a1db]{color:var(--color-text-faint);font-size:var(--text-xs)}.nd-fields .v[data-v-69e0a1db]{color:var(--color-text-muted);font-size:var(--text-xs);font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nd-body[data-v-69e0a1db]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.nd-out[data-v-69e0a1db]{display:flex;align-items:center;gap:var(--space-2);background:var(--color-surface-raised);border-radius:var(--radius-md);padding:var(--space-1) var(--space-2);box-shadow:var(--shadow-xs)}.nd-out-ic[data-v-69e0a1db]{color:var(--color-text-faint);flex:none}.nd-out .path[data-v-69e0a1db]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left}.nd-act[data-v-69e0a1db]{display:inline-flex;align-items:center;height:var(--space-6);padding:0 var(--space-2);border-radius:var(--radius-full);font-size:var(--text-xs);color:var(--color-text-muted);border:.5px solid var(--color-line-strong);background:var(--color-surface-raised);flex:none;transition:color var(--duration-fast) var(--ease-out)}.nd-act[data-v-69e0a1db]:hover{color:var(--color-text)}.nd-raw summary[data-v-69e0a1db]{list-style:none;display:flex;align-items:center;gap:var(--space-1);cursor:pointer;color:var(--color-text-faint);font-size:var(--text-xs);user-select:none}.nd-raw summary[data-v-69e0a1db]::-webkit-details-marker{display:none}.nd-raw summary[data-v-69e0a1db]:hover{color:var(--color-text)}.nd-raw-car[data-v-69e0a1db]{transition:transform var(--duration-base) var(--ease-out)}.nd-raw[open] .nd-raw-car[data-v-69e0a1db]{transform:rotate(90deg)}.nd-raw pre[data-v-69e0a1db]{margin:var(--space-2) 0 0;padding:var(--space-2) var(--space-3);background:var(--color-surface-raised);border-radius:var(--radius-sm);box-shadow:var(--shadow-xs);font-size:var(--text-xs);line-height:1.55;color:var(--color-text-muted);overflow-x:auto;white-space:pre}.ng-dots[data-v-69e0a1db]{display:inline-flex;gap:var(--space-1);margin-right:var(--space-1)}.dot[data-v-69e0a1db]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--color-text-faint)}.dot.done[data-v-69e0a1db]{background:var(--color-success)}.dot.error[data-v-69e0a1db]{background:var(--color-danger)}.dot.warn[data-v-69e0a1db]{background:var(--color-warning)}.ng-list[data-v-69e0a1db]{display:flex;flex-direction:column}.ng-item[data-v-69e0a1db]{border-top:.5px solid var(--color-subtle)}.ng-item>.ntf-head[data-v-69e0a1db]{padding:var(--space-1) var(--space-3)}.ng-item .ntf-chip[data-v-69e0a1db]{width:22px;height:22px;border-radius:var(--radius-sm);box-shadow:none;background:transparent}.ng-item.ok .ntf-chip[data-v-69e0a1db]{color:var(--color-success)}.ng-item.err .ntf-chip[data-v-69e0a1db]{color:var(--color-danger)}.ng-item.warn .ntf-chip[data-v-69e0a1db]{color:var(--color-warning)}.ng-item .ntf-title[data-v-69e0a1db]{font-weight:var(--weight-regular);color:var(--color-text-muted)}.ng-item.open .ntf-title[data-v-69e0a1db]{color:var(--color-text)}.turn-fold[data-v-66797f5d]{display:flex;flex-direction:column}.tf-head[data-v-66797f5d]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.tf-head[data-v-66797f5d]:hover{color:var(--color-text)}.tf-head[data-v-66797f5d]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.tf-sum[data-v-66797f5d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.tf-car[data-v-66797f5d]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.turn-fold.open .tf-car[data-v-66797f5d]{transform:rotate(90deg)}.tf-body[data-v-66797f5d]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tf-body.open[data-v-66797f5d]{grid-template-rows:minmax(0,1fr)}.tf-body-inner[data-v-66797f5d]{min-height:0;overflow:hidden;display:flex;flex-direction:column}.tf-body-inner>.msg[data-v-66797f5d],.tf-body-inner[data-v-66797f5d]>.think,.tf-body-inner[data-v-66797f5d]>.tool-group,.tf-body-inner[data-v-66797f5d]>.activity-run,.tf-body-inner[data-v-66797f5d]>.agent-card,.tf-body-inner[data-v-66797f5d]>.agent-group,.tf-body-inner[data-v-66797f5d]>.tool-line,.tf-body-inner[data-v-66797f5d]>.swarm-card,.tf-body-inner[data-v-66797f5d]>.media-tool,.tf-body-inner[data-v-66797f5d]>.ask-receipt{margin-top:var(--chat-block-gap)}.turn-fold.streaming .tf-body-inner>.msg[data-v-66797f5d]:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.think:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.tool-group:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.activity-run:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.agent-card:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.agent-group:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.tool-line:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.swarm-card:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.media-tool:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.ask-receipt:first-child{margin-top:0}.tf-body-inner .msg[data-v-66797f5d]{font-size:var(--ui-font-size);line-height:var(--leading-prose);color:var(--color-text);font-weight:var(--weight-medium)}.tf-body-inner .msg[data-v-66797f5d] p{margin:0}.tf-body-inner .msg[data-v-66797f5d] p+p{margin-top:var(--space-2)}@container (min-width: 760px){.tf-body-inner .msg[data-v-66797f5d] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.tf-body-inner .msg[data-v-66797f5d] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}.tf-body-inner .msg[data-v-66797f5d] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}}@media(max-width:640px){.tf-body-inner .msg[data-v-66797f5d]{font-size:var(--ui-font-size-xl)}}.turn-files[data-v-f37da416]{margin-top:var(--chat-block-gap)}.turn-files[data-v-f37da416] .ui-card__head{font-family:var(--font-ui);font-weight:var(--weight-regular);padding:var(--space-2) var(--space-3)}.turn-files[data-v-f37da416] .ui-card__body{padding:var(--space-1) var(--space-3)}.turn-files[data-v-f37da416] .ui-card__foot{padding:0;justify-content:stretch}.tf-ic[data-v-f37da416]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.tf-title[data-v-f37da416]{font-size:var(--text-sm);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-stats[data-v-f37da416]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.tf-add[data-v-f37da416],.tf-del[data-v-f37da416]{font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tf-add[data-v-f37da416]{color:var(--color-success)}.tf-del[data-v-f37da416]{color:var(--color-danger)}.tf-list[data-v-f37da416]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.tf-row[data-v-f37da416]{display:flex;align-items:center;gap:var(--space-1);min-width:0;padding:var(--space-1) 0;font-size:var(--text-sm);line-height:var(--leading-tight)}.tf-file[data-v-f37da416]{display:flex;align-items:baseline;border:none;border-radius:var(--radius-xs);background:transparent;padding:0;font-family:inherit;font-size:inherit;color:var(--color-text);flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-align:left}button.tf-file[data-v-f37da416]{cursor:pointer}button.tf-file[data-v-f37da416]:hover{text-decoration:underline;text-decoration-color:var(--color-text-faint);text-underline-offset:3px}.tf-file[data-v-f37da416]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tf-dir[data-v-f37da416]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--color-text-faint)}.tf-base[data-v-f37da416]{flex:none;font-weight:var(--weight-medium);color:var(--color-text)}.tf-more[data-v-f37da416]{width:100%;justify-content:flex-start;border-radius:0}.turn-files .tf-more[data-v-f37da416]:not(:disabled):active{transform:none}.tf-more-car[data-v-f37da416]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.tf-more-car.open[data-v-f37da416]{transform:rotate(180deg)}.diffbar[data-v-f37da416]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;flex:none}.seg-add[data-v-f37da416]{background:var(--color-success)}.seg-del[data-v-f37da416]{background:var(--color-danger)}.activity-notice[data-v-cc29061f]{display:inline-flex;align-items:center;gap:9px;align-self:flex-start;margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.cn[data-v-9f79345d]{margin:0;align-self:flex-end;max-width:78%;display:flex;flex-direction:column;align-items:flex-end}.cn-head[data-v-9f79345d]{align-self:flex-end;display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal);overflow-wrap:anywhere}.cn-head-ico[data-v-9f79345d]{flex:none}.cn-head.error .cn-head-ico[data-v-9f79345d]{color:var(--color-danger)}.cn-bubble[data-v-9f79345d]{box-sizing:border-box;max-width:100%;padding:10px 12px;background:var(--color-user-bubble-bg);border-radius:var(--radius-lg);color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.cn-meta[data-v-9f79345d]{margin-top:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal)}/*! PhotoSwipe main CSS by Dmytro Semenov | photoswipe.com */.pswp{--pswp-bg: #000;--pswp-placeholder-bg: #222;--pswp-root-z-index: 100000;--pswp-preloader-color: rgba(79, 79, 79, .4);--pswp-preloader-color-secondary: rgba(255, 255, 255, .9);--pswp-icon-color: #fff;--pswp-icon-color-secondary: #4f4f4f;--pswp-icon-stroke-color: #4f4f4f;--pswp-icon-stroke-width: 2px;--pswp-error-text-color: var(--pswp-icon-color)}.pswp{position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--pswp-root-z-index);display:none;touch-action:none;outline:0;opacity:.003;contain:layout style size;-webkit-tap-highlight-color:rgba(0,0,0,0)}.pswp:focus{outline:0}.pswp *{box-sizing:border-box}.pswp img{max-width:none}.pswp--open{display:block}.pswp,.pswp__bg{transform:translateZ(0);will-change:opacity}.pswp__bg{opacity:.005;background:var(--pswp-bg)}.pswp,.pswp__scroll-wrap{overflow:hidden}.pswp__scroll-wrap,.pswp__bg,.pswp__container,.pswp__item,.pswp__content,.pswp__img,.pswp__zoom-wrap{position:absolute;top:0;left:0;width:100%;height:100%}.pswp__img,.pswp__zoom-wrap{width:auto;height:auto}.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img{cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img,.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active,.pswp__img{cursor:-webkit-zoom-out;cursor:-moz-zoom-out;cursor:zoom-out}.pswp__container,.pswp__img,.pswp__button,.pswp__counter{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pswp__item{z-index:1;overflow:hidden}.pswp__hidden{display:none!important}.pswp__content{pointer-events:none}.pswp__content>*{pointer-events:auto}.pswp__error-msg-container{display:grid}.pswp__error-msg{margin:auto;font-size:1em;line-height:1;color:var(--pswp-error-text-color)}.pswp .pswp__hide-on-close{opacity:.005;will-change:opacity;transition:opacity var(--pswp-transition-duration) cubic-bezier(.4,0,.22,1);z-index:10;pointer-events:none}.pswp--ui-visible .pswp__hide-on-close{opacity:1;pointer-events:auto}.pswp__button{position:relative;display:block;width:50px;height:60px;padding:0;margin:0;overflow:hidden;cursor:pointer;background:none;border:0;box-shadow:none;opacity:.85;-webkit-appearance:none;-webkit-touch-callout:none}.pswp__button:hover,.pswp__button:active,.pswp__button:focus{transition:none;padding:0;background:none;border:0;box-shadow:none;opacity:1}.pswp__button:disabled{opacity:.3;cursor:auto}.pswp__icn{fill:var(--pswp-icon-color);color:var(--pswp-icon-color-secondary)}.pswp__icn{position:absolute;top:14px;left:9px;width:32px;height:32px;overflow:hidden;pointer-events:none}.pswp__icn-shadow{stroke:var(--pswp-icon-stroke-color);stroke-width:var(--pswp-icon-stroke-width);fill:none}.pswp__icn:focus{outline:0}div.pswp__img--placeholder,.pswp__img--with-bg{background:var(--pswp-placeholder-bg)}.pswp__top-bar{position:absolute;left:0;top:0;width:100%;height:60px;display:flex;flex-direction:row;justify-content:flex-end;z-index:10;pointer-events:none!important}.pswp__top-bar>*{pointer-events:auto;will-change:opacity}.pswp__button--close{margin-right:6px}.pswp__button--arrow{position:absolute;width:75px;height:100px;top:50%;margin-top:-50px}.pswp__button--arrow:disabled{display:none;cursor:default}.pswp__button--arrow .pswp__icn{top:50%;margin-top:-30px;width:60px;height:60px;background:none;border-radius:0}.pswp--one-slide .pswp__button--arrow{display:none}.pswp--touch .pswp__button--arrow{visibility:hidden}.pswp--has_mouse .pswp__button--arrow{visibility:visible}.pswp__button--arrow--prev{right:auto;left:0}.pswp__button--arrow--next{right:0}.pswp__button--arrow--next .pswp__icn{left:auto;right:14px;transform:scaleX(-1)}.pswp__button--zoom{display:none}.pswp--zoom-allowed .pswp__button--zoom{display:block}.pswp--zoomed-in .pswp__zoom-icn-bar-v{display:none}.pswp__preloader{position:relative;overflow:hidden;width:50px;height:60px;margin-right:auto}.pswp__preloader .pswp__icn{opacity:0;transition:opacity .2s linear;animation:pswp-clockwise .6s linear infinite}.pswp__preloader--active .pswp__icn{opacity:.85}@keyframes pswp-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.pswp__counter{height:30px;margin-top:15px;margin-inline-start:20px;font-size:14px;line-height:30px;color:var(--pswp-icon-color);text-shadow:1px 1px 3px var(--pswp-icon-color-secondary);opacity:.85}.pswp--one-slide .pswp__counter{display:none}.pswp{--pswp-root-z-index: var(--z-modal);--pswp-bg: var(--color-scrim-strong)}.media-preview-caption{position:absolute;left:0;right:0;bottom:var(--space-4);padding:0 var(--space-6);color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.media-lightbox[data-v-6c0c564d]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:var(--color-scrim-strong)}.media-lightbox-card[data-v-6c0c564d]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(960px,calc(100vw - var(--space-6) * 2));max-height:calc(100vh - var(--space-6) * 2)}.media-lightbox-frame[data-v-6c0c564d]{max-width:100%;border-radius:var(--radius-md);overflow:hidden;background:var(--color-bg);box-shadow:var(--shadow-xl)}.media-lightbox-media[data-v-6c0c564d]{display:block;max-width:100%;max-height:calc(100vh - var(--space-6) * 4);object-fit:contain}.media-lightbox-name[data-v-6c0c564d]{max-width:100%;color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-lightbox-close[data-v-6c0c564d]{position:fixed;top:var(--space-4);right:var(--space-6);display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-sm);cursor:pointer;z-index:var(--z-modal-dropdown)}.media-lightbox-close[data-v-6c0c564d]:before{content:"";position:absolute;inset:-6px}.media-lightbox-close[data-v-6c0c564d]:hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.media-thumb[data-v-a7ab7e98]{position:relative;flex:none;display:inline-flex}.media-thumb-btn[data-v-a7ab7e98]{display:block;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:hidden;cursor:pointer;transition:border-color var(--duration-fast) ease}.media-thumb-btn[data-v-a7ab7e98]:hover{border-color:var(--color-line-strong)}.media-thumb-btn[data-v-a7ab7e98]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.media-thumb-media[data-v-a7ab7e98]{display:block;width:64px;height:64px;object-fit:cover}.media-thumb-tile[data-v-a7ab7e98]{object-fit:none}.media-thumb-badge[data-v-a7ab7e98]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.media-thumb-badge.is-error[data-v-a7ab7e98]{color:var(--color-danger);border-color:var(--color-danger-bd)}.media-thumb.is-error .media-thumb-btn[data-v-a7ab7e98]{border-color:var(--color-danger-bd)}.media-thumb-rm[data-v-a7ab7e98]{position:absolute;top:var(--space-1);right:var(--space-1);z-index:1;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:var(--color-scrim);color:var(--color-text-on-scrim);cursor:pointer}.media-thumb-rm[data-v-a7ab7e98]:hover{background:var(--color-text);color:var(--color-bg)}.media-thumb-rm[data-v-a7ab7e98]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.att-chip[data-v-f3a3043a]{display:inline-flex;align-items:center;gap:6px;max-width:220px;padding:4px 9px 4px var(--att-chip-pad-left, 5px);background:var(--color-well);border:.5px solid var(--color-line);border-radius:999px;font-size:var(--ui-font-size-sm);transition:border-color var(--duration-fast) ease}.att-chip[data-v-f3a3043a]:hover{border-color:var(--color-line-strong)}.att-activate[data-v-f3a3043a]{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}.att-activate[data-v-f3a3043a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:999px}.att-tile[data-v-f3a3043a]{width:20px;height:20px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--color-text-muted);background:var(--color-surface-sunken)}.att-tile[data-v-f3a3043a] .att-thumb{width:100%;height:100%;object-fit:cover;display:block}.att-name[data-v-f3a3043a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.att-chip.is-error[data-v-f3a3043a]{border-color:var(--color-danger-bd)}.att-chip.is-error .att-err[data-v-f3a3043a]{flex:none;display:flex;align-items:center;color:var(--color-danger)}.att-rm[data-v-f3a3043a]{flex:none;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--color-text-faint);cursor:pointer}.att-rm[data-v-f3a3043a]:hover{background:var(--color-hover);color:var(--color-text)}.att-rm[data-v-f3a3043a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mascot-host[data-v-27600ac7]{position:relative;width:100%;aspect-ratio:72 / 100}.mascot-fallback[data-v-27600ac7]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:86.5%;height:auto}.mascot-canvas[data-v-27600ac7]{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .25s ease}.mascot-canvas.ready[data-v-27600ac7]{opacity:1}@media(prefers-reduced-motion:reduce){.mascot-canvas[data-v-27600ac7]{transition:none}}.working-indicator[data-v-8abb44ef]{display:inline-flex;align-items:center;gap:var(--space-2);align-self:flex-start;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.wi-mascot[data-v-8abb44ef]{flex:none;width:40px}.wi-label[data-v-8abb44ef]{animation:wi-breathe-8abb44ef 1.6s var(--ease-in-out) infinite}@keyframes wi-breathe-8abb44ef{0%,to{opacity:1}50%{opacity:.45}}.chat-empty[data-v-2304fd80]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px 16px;color:var(--faint);text-align:center}.chat-empty-text[data-v-2304fd80]{font-size:var(--ui-font-size-sm)}.chat-loading[data-v-2304fd80]{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:24px 16px;color:var(--muted)}.chat-loading-text[data-v-2304fd80]{font-size:var(--ui-font-size-sm)}.chat[data-v-2304fd80]{--chat-turn-gap: 16px;--chat-block-gap: 10px;--chat-section-gap: 18px;display:flex;flex-direction:column;gap:0;padding:16px 14px 20px;flex:1;min-height:0;position:relative}.chat .chat-empty[data-v-2304fd80]{align-self:stretch}.open-unsupported[data-v-2304fd80]{position:absolute;bottom:16px;left:50%;transform:translate(-50%);max-width:min(90%,480px);padding:6px 12px;border-radius:var(--radius-md);border:.5px solid var(--color-line);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;z-index:var(--z-sticky)}.chat>.u-turn[data-v-2304fd80],.chat>.a-msg[data-v-2304fd80],.chat>.compact-divider[data-v-2304fd80],.chat>.cron-notice[data-v-2304fd80],.chat>.sending-placeholder[data-v-2304fd80],.chat[data-v-2304fd80]>.activity-notice{margin-top:var(--chat-turn-gap)}.chat>.a-msg[data-v-2304fd80]{margin-top:10px}.chat>.u-turn[data-v-2304fd80]:first-child,.chat>.a-msg[data-v-2304fd80]:first-child,.chat>.compact-divider[data-v-2304fd80]:first-child,.chat>.cron-notice[data-v-2304fd80]:first-child,.chat>.sending-placeholder[data-v-2304fd80]:first-child,.chat[data-v-2304fd80]>.activity-notice:first-child{margin-top:0}.u-turn[data-v-2304fd80]{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-start;width:100%}.u-bub[data-v-2304fd80]{align-self:flex-end;max-width:78%;background:var(--color-user-bubble-bg);color:var(--color-text);border-radius:var(--radius-lg);padding:10px 12px;font-size:var(--content-font-size);line-height:var(--leading-normal)}.u-meta[data-v-2304fd80]{align-self:flex-end;display:flex;justify-content:flex-end;align-items:center;max-width:78%;margin-top:var(--space-2);margin-right:4px}.u-meta .u-edit[data-v-2304fd80]{min-height:22px;box-sizing:border-box}.u-text[data-v-2304fd80]{white-space:pre-wrap;overflow-wrap:anywhere}.u-text-wrap[data-v-2304fd80]{position:relative;display:flex;flex-direction:column}.u-text-wrap-args[data-v-2304fd80]{margin-top:var(--space-1)}.u-text-wrap.is-clamped[data-v-2304fd80]{min-width:120px}.u-text-wrap.is-clamped>.u-text[data-v-2304fd80],.u-text-wrap.is-clamped>.skill-act-args[data-v-2304fd80],.u-text-wrap.is-clamped>.q-body[data-v-2304fd80]{max-height:10lh;overflow:hidden;mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh));-webkit-mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh))}.u-text-toggle[data-v-2304fd80]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:center;margin-top:var(--space-2);padding:var(--space-2) var(--space-4);border:none;border-radius:var(--radius-full);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:1;cursor:pointer;user-select:none;transition:box-shadow var(--duration-base) var(--ease-out)}.u-text-toggle[data-v-2304fd80]:hover{box-shadow:var(--shadow-md)}.u-text-toggle[data-v-2304fd80]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.u-text-wrap.is-clamped .u-text-toggle[data-v-2304fd80]{position:absolute;bottom:0;left:50%;transform:translate(-50%);margin-top:0}.u-text-toggle-car[data-v-2304fd80]{transition:transform var(--duration-base) var(--ease-out)}.u-text-toggle[aria-expanded=true] .u-text-toggle-car[data-v-2304fd80]{transform:rotate(180deg)}.u-edit[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s}.u-edit svg[data-v-2304fd80]{display:block;flex:none}.u-edit[data-v-2304fd80]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-armed[data-v-2304fd80]{--undo-hint-duration: 5s;gap:var(--space-1);opacity:1;color:var(--color-text);animation:u-edit-armed-blink-2304fd80 var(--undo-hint-duration) linear forwards}.u-edit-armed[data-v-2304fd80]:hover{color:var(--color-accent);background:var(--hover)}.u-edit-hint[data-v-2304fd80]{display:inline-flex;align-items:center;gap:var(--space-1);font-size:var(--text-xs);font-weight:var(--weight-medium);white-space:nowrap}@keyframes u-edit-armed-blink-2304fd80{0%,55%{opacity:1}62%{opacity:.45}69%{opacity:1}75%{opacity:.4}81%{opacity:.95}86%{opacity:.35}91%{opacity:.85}95%{opacity:.3}to{opacity:0}}@media(prefers-reduced-motion:reduce){.u-edit-armed[data-v-2304fd80]{animation:none}}.u-copy[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.u-copy svg[data-v-2304fd80]{display:block;flex:none}.u-copy[data-v-2304fd80]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-wrap[data-v-2304fd80]{display:flex;justify-content:flex-end}.chat>.u-edit-wrap[data-v-2304fd80]{margin-top:4px}.chat>.u-edit-wrap+.a-msg[data-v-2304fd80]{margin-top:8px}.compact-divider[data-v-2304fd80]{display:flex;align-items:center;gap:10px;align-self:stretch;width:100%;margin:var(--chat-section-gap) 0 0}.chat>.compact-divider[data-v-2304fd80]:first-child{margin-top:0}.cd-line[data-v-2304fd80]{flex:1;height:1px;background:var(--line)}.cd-label[data-v-2304fd80]{flex:none;display:inline-flex;align-items:center;gap:8px;max-width:80%;font-size:var(--text-base);color:var(--muted);white-space:nowrap}.cd-btn[data-v-2304fd80]{background:none;border:none;padding:0;cursor:pointer;font:inherit;font-size:var(--text-base);color:var(--muted)}.cd-view[data-v-2304fd80]{color:var(--color-accent)}.cd-btn:hover .cd-view[data-v-2304fd80]{text-decoration:underline}.chat>.turn-failed[data-v-2304fd80]{margin-top:var(--chat-turn-gap)}.chat>.turn-failed[data-v-2304fd80]:first-child{margin-top:0}.turn-failed[data-v-2304fd80]{display:flex;align-items:center;gap:var(--space-2);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);animation:kimi-card-in var(--duration-slow) var(--ease-out)}.tf-chip[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);flex:none;color:var(--color-danger)}.tf-main[data-v-2304fd80]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.tf-title[data-v-2304fd80]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.tf-sub[data-v-2304fd80]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-meta[data-v-2304fd80]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.goal-prov[data-v-2304fd80]{display:flex;align-items:center;gap:var(--space-1);margin-bottom:var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-normal);user-select:none}.a-msg[data-v-2304fd80]{align-self:flex-start;max-width:94%;width:94%}.a-msg-ft[data-v-2304fd80]{display:flex;justify-content:flex-start;align-items:center;gap:8px;height:auto;margin-top:var(--chat-block-gap);overflow:visible}.a-time[data-v-2304fd80]{display:inline-flex;align-items:center;font-size:var(--text-base);color:var(--muted);line-height:1}.a-cpbtn[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.a-cpbtn[data-v-2304fd80]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.a-cpbtn svg[data-v-2304fd80]{display:block;flex:none}@media(hover:none){.a-msg-ft[data-v-2304fd80]{height:auto;margin-top:var(--chat-block-gap);opacity:1;pointer-events:auto}.a-cpbtn[data-v-2304fd80]{font-size:var(--ui-font-size-sm);padding:8px 10px;margin:-4px -6px}}.a-msg .msg[data-v-2304fd80]{font-size:var(--ui-font-size);line-height:var(--leading-prose);color:var(--color-text);font-weight:500}.a-msg .msg[data-v-2304fd80] p{margin:0}.a-msg .msg[data-v-2304fd80] p+p{margin-top:8px}.a-msg>.msg[data-v-2304fd80],.a-msg[data-v-2304fd80]>.think,.a-msg[data-v-2304fd80]>.tool-group,.a-msg[data-v-2304fd80]>.activity-run,.a-msg[data-v-2304fd80]>.agent-card,.a-msg[data-v-2304fd80]>.agent-group,.a-msg[data-v-2304fd80]>.tool-line,.a-msg[data-v-2304fd80]>.swarm-card,.a-msg[data-v-2304fd80]>.media-tool,.a-msg[data-v-2304fd80]>.ask-receipt{margin-top:var(--chat-block-gap)}.a-msg>.msg[data-v-2304fd80]:first-child,.a-msg[data-v-2304fd80]>.think:first-child,.a-msg[data-v-2304fd80]>.tool-group:first-child,.a-msg[data-v-2304fd80]>.activity-run:first-child,.a-msg[data-v-2304fd80]>.agent-card:first-child,.a-msg[data-v-2304fd80]>.agent-group:first-child,.a-msg[data-v-2304fd80]>.tool-line:first-child,.a-msg[data-v-2304fd80]>.swarm-card:first-child,.a-msg[data-v-2304fd80]>.media-tool:first-child,.a-msg[data-v-2304fd80]>.ask-receipt:first-child{margin-top:0}.a-msg>.goal-prov:first-child+.msg[data-v-2304fd80],.a-msg>.goal-prov[data-v-2304fd80]:first-child+.think,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.tool-group,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.activity-run,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.agent-card,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.agent-group,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.tool-line,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.swarm-card,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.media-tool,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.ask-receipt,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.turn-fold{margin-top:0}.a-msg[data-v-2304fd80] :not(pre)>code{font:.9em var(--font-mono);background:var(--color-inline-code-bg);border:.5px solid var(--color-line);border-radius:var(--radius-sm);padding:1px 6px;color:var(--color-accent-hover)}@container (min-width: 760px){.a-msg .msg[data-v-2304fd80] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.a-msg .msg[data-v-2304fd80] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}.a-msg .msg[data-v-2304fd80] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}}.u-media[data-v-2304fd80]{display:flex;flex-wrap:wrap;gap:var(--space-2)}.u-media[data-v-2304fd80]:not(:last-child){margin-bottom:var(--space-2)}.u-atts[data-v-2304fd80]{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.sending-placeholder[data-v-2304fd80]{align-self:flex-start;padding:10px 0}.skill-act[data-v-2304fd80]{display:flex;flex-direction:column;gap:2px}.skill-act-head[data-v-2304fd80]{font-size:var(--ui-font-size-sm);font-weight:500;color:var(--color-accent-hover);display:flex;align-items:center;gap:6px}.skill-act-arrow[data-v-2304fd80]{color:var(--color-accent);font-size:var(--text-base)}.skill-act-args[data-v-2304fd80]{font-size:var(--text-base);color:var(--muted);padding-left:17px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:640px){.chat[data-v-2304fd80]{box-sizing:border-box;width:100%;padding:14px max(12px,var(--safe-right)) 18px max(12px,var(--safe-left))}.u-bub[data-v-2304fd80]{max-width:min(88%,calc(100vw - 52px))}.a-msg[data-v-2304fd80]{width:100%;max-width:100%}.u-bub .u-text[data-v-2304fd80],.a-msg .msg[data-v-2304fd80]{font-size:var(--ui-font-size-xl)}.a-msg[data-v-2304fd80] .md,.a-msg[data-v-2304fd80] .markdown-renderer,.a-msg[data-v-2304fd80] .code-block-container,.a-msg[data-v-2304fd80] .diff-wrap,.a-msg[data-v-2304fd80] pre{max-width:100%}.a-msg[data-v-2304fd80] .code-block-container pre,.a-msg[data-v-2304fd80] .diff-pre{overflow-x:auto;-webkit-overflow-scrolling:touch}.a-msg[data-v-2304fd80] .media-tool.mob{width:min(44vw,160px)}.cd-label[data-v-2304fd80]{min-width:0;max-width:calc(100% - 48px);overflow:hidden;text-overflow:ellipsis}.u-edit-confirm[data-v-2304fd80]{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100vw - 28px)}.ts[data-v-2304fd80]{font-size:var(--ui-font-size-sm)}.chat-empty-text[data-v-2304fd80],.chat-loading-text[data-v-2304fd80]{font-size:var(--ui-font-size-lg)}.cd-label[data-v-2304fd80],.cd-btn[data-v-2304fd80]{font-size:var(--ui-font-size)}}.top-sentinel[data-v-2304fd80]{display:flex;align-items:center;justify-content:center;padding:12px 0;min-height:28px;user-select:none}.top-sentinel-loading[data-v-2304fd80]{opacity:.8}.top-sentinel-btn[data-v-2304fd80]{appearance:none;border:.5px solid var(--border);background:transparent;color:var(--muted);font-size:var(--ui-font-size-sm);padding:4px 12px;border-radius:999px;cursor:pointer;transition:color .15s ease,border-color .15s ease}.top-sentinel-btn[data-v-2304fd80]:hover{color:var(--fg);border-color:var(--fg)}.top-sentinel-text[data-v-2304fd80]{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--ui-font-size-sm)}.chat[data-v-2304fd80]{background:transparent}.chat[data-v-2304fd80]{gap:0;padding:22px 20px 26px}.u-bub[data-v-2304fd80]{background:var(--color-user-bubble-bg);border-radius:var(--radius-lg);padding:10px 12px}.a-msg[data-v-2304fd80]{max-width:100%;width:100%}.chat>.q-stack[data-v-2304fd80]{margin-top:var(--chat-turn-gap)}.chat>.q-stack[data-v-2304fd80]:first-child{margin-top:0}.q-stack[data-v-2304fd80]{align-self:flex-end;width:100%;display:flex;flex-direction:column;gap:8px}.q-head[data-v-2304fd80]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 6px;color:var(--color-text-faint);font-size:var(--ui-font-size-xs)}.q-title[data-v-2304fd80]{display:inline-flex;align-items:center;gap:6px}.q-title b[data-v-2304fd80]{color:var(--color-accent-hover);font-weight:var(--weight-medium)}.q-hint[data-v-2304fd80]{color:var(--color-text-faint)}.q-turn[data-v-2304fd80]{position:relative}.q-bub[data-v-2304fd80]{display:flex;align-items:center;gap:8px;width:fit-content;background:var(--color-surface-raised);border:.5px dashed var(--color-accent-bd);padding:8px 8px 8px 6px;transition:border-color .12s ease,background .12s ease}.q-bub[data-v-2304fd80]:hover{border-color:var(--color-accent);background:var(--color-accent-soft)}.q-grip[data-v-2304fd80]{flex:none;display:inline-flex;align-items:center;padding:2px;color:var(--color-text-faint);cursor:grab;opacity:.7}.q-grip[data-v-2304fd80]:hover{opacity:1}.q-grip[data-v-2304fd80]:active{cursor:grabbing}.q-clamp[data-v-2304fd80]{flex:1;min-width:0}.q-body[data-v-2304fd80]{flex:1;min-width:0;background:none;border:none;padding:0;margin:0;font:inherit;color:var(--color-text);text-align:left;cursor:pointer;opacity:.82}.q-bub:hover .q-body[data-v-2304fd80]{opacity:1}.q-body[data-v-2304fd80]:disabled{cursor:default}.q-text[data-v-2304fd80]{white-space:pre-wrap;overflow-wrap:anywhere}.q-text-placeholder[data-v-2304fd80]{display:inline-flex;align-items:center;gap:4px;color:var(--color-text-muted)}.q-imgs[data-v-2304fd80]{display:flex;gap:4px;flex:none}.q-img[data-v-2304fd80]{width:28px;height:28px;object-fit:cover;border-radius:var(--radius-sm);border:.5px solid var(--color-line)}.q-file[data-v-2304fd80]{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px;border-radius:var(--radius-sm);border:.5px solid var(--color-line);color:var(--color-text-muted);font-size:calc(var(--ui-font-size) - 3px);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.q-tag[data-v-2304fd80]{flex:none;padding:1px 6px;border-radius:var(--radius-full);font-size:var(--ui-font-size-xs);font-weight:var(--weight-medium);line-height:var(--leading-caption);white-space:nowrap}.q-tag-next[data-v-2304fd80]{color:var(--color-accent-hover);background:var(--color-accent-soft);border:.5px solid var(--color-accent-bd)}.q-tag-idx[data-v-2304fd80]{color:var(--color-text-faint);background:var(--color-surface-sunken);border:.5px solid var(--color-line)}.q-rm[data-v-2304fd80]{flex:none;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;border-radius:var(--radius-sm);color:var(--color-text-faint);cursor:pointer;opacity:0;transition:opacity .12s ease,background .12s ease,color .12s ease}.q-bub:hover .q-rm[data-v-2304fd80],.q-bub:focus-within .q-rm[data-v-2304fd80],.q-rm[data-v-2304fd80]:focus-visible{opacity:1}.q-rm[data-v-2304fd80]:hover{background:var(--color-danger-soft);color:var(--color-danger)}.q-turn.q-dragging .q-bub[data-v-2304fd80]{opacity:.45}.q-turn.drop-before[data-v-2304fd80]:before,.q-turn.drop-after[data-v-2304fd80]:after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--color-accent);border-radius:var(--radius-full);z-index:1}.q-turn.drop-before[data-v-2304fd80]:before{top:-5px}.q-turn.drop-after[data-v-2304fd80]:after{bottom:-5px}.chat-header[data-v-cac58d83]{flex:none;display:flex;align-items:center;gap:14px;height:var(--panel-head-h, 48px);padding:0 16px;border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui);min-width:0;user-select:none;container-type:inline-size}.chat-header.macos-desktop[data-v-cac58d83]{-webkit-app-region:drag}.chat-header.macos-desktop button[data-v-cac58d83],.chat-header.macos-desktop input[data-v-cac58d83]{-webkit-app-region:no-drag}.ch-id[data-v-cac58d83]{display:flex;align-items:center;gap:6px;min-width:0;flex:none;max-width:46%}.ch-ws[data-v-cac58d83]{color:var(--color-text-muted);font-size:var(--text-base);font-weight:var(--weight-medium);flex:none}.ch-sep[data-v-cac58d83]{color:var(--color-text-faint);flex:none}.ch-ses[data-v-cac58d83]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ch-rename[data-v-cac58d83]{flex:1;min-width:0;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none;user-select:text}.ch-git[data-v-cac58d83]{display:flex;align-items:center;gap:4px;border:none;background:transparent;padding:0;color:var(--muted);font-family:var(--font-ui);font-size:calc(var(--ui-font-size) - 2px);flex:0 1 auto;max-width:none;min-width:0;cursor:pointer}.ch-git:hover .ch-branch[data-v-cac58d83]{color:var(--color-text)}.ch-branch-icon[data-v-cac58d83]{flex:none;color:var(--color-text-muted)}.ch-branch[data-v-cac58d83]{color:var(--dim);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:4px}.ch-detached[data-v-cac58d83]{color:var(--muted);font-style:italic}.ch-pill[data-v-cac58d83]{display:inline-flex;align-items:center;gap:3px;padding:1px 5px;border-radius:999px;background:var(--panel);border:.5px solid var(--line);font-size:calc(var(--ui-font-size) - 3px)}.ch-sync-pill[data-v-cac58d83]{border-color:var(--line)}.ch-diff-pill[data-v-cac58d83]{border-color:color-mix(in srgb,var(--color-success) 20%,var(--line));font-variant-numeric:tabular-nums}.ch-ahead[data-v-cac58d83]{color:var(--color-warning);flex:none}.ch-behind[data-v-cac58d83]{color:var(--color-accent-hover);flex:none}.ch-add[data-v-cac58d83]{color:var(--color-success);flex:none}.ch-del[data-v-cac58d83]{color:var(--color-danger);flex:none}.ch-spacer[data-v-cac58d83]{flex:1;min-width:0}@container (max-width: 720px){.ch-ws[data-v-cac58d83],.ch-sep[data-v-cac58d83]{display:none}.ch-id[data-v-cac58d83]{flex:1;max-width:none}.ch-spacer[data-v-cac58d83]{flex:0}}.chat-header .ch-act-more[data-v-cac58d83]{width:24px;height:24px;border-radius:var(--radius-sm)}.chat-header .ch-act-more[data-v-cac58d83] svg{width:14px;height:14px}.ch-act-more.open[data-v-cac58d83]{background:var(--color-well);color:var(--color-text)}.ch-dev[data-v-cac58d83]{display:inline-flex;align-items:center;height:22px;padding:0 9px;flex:none;border:.5px solid var(--color-warning-bd);border-radius:var(--radius-full);background:var(--color-warning-soft);color:var(--color-warning);font-size:var(--text-xs);font-weight:500}.ch-pr[data-v-cac58d83]{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 9px;flex:none;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-well);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:500;cursor:pointer}.ch-pr svg[data-v-cac58d83]{flex:none}.ch-pr.pr-open[data-v-cac58d83]{color:var(--color-success);border-color:var(--color-success-bd);background:var(--color-success-soft)}.ch-pr.pr-merged[data-v-cac58d83]{color:var(--color-done);border-color:var(--color-done-bd);background:var(--color-done-soft)}.ch-pr.pr-closed[data-v-cac58d83]{color:var(--color-danger);border-color:var(--color-danger-bd);background:var(--color-danger-soft)}.ch-pr.pr-draft[data-v-cac58d83],.ch-pr.pr-unknown[data-v-cac58d83]{color:var(--color-text-muted);border-color:var(--color-line-strong);background:var(--color-well)}.ch-pr[data-v-cac58d83]:hover{border-color:var(--color-line-strong)}.ch-menu[data-v-cac58d83]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-pop-enter-active[data-v-cac58d83]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-cac58d83]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-cac58d83],.menu-pop-leave-to[data-v-cac58d83]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}@media(max-width:980px){.ch-act-label[data-v-cac58d83]{display:none}}@media(max-width:640px){.chat-header[data-v-cac58d83]{display:none}}.slash-menu[data-menu-frame][data-v-98398dd7]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.slash-scroll[data-v-98398dd7]{max-height:var(--p-slash-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.slash-scroll[data-v-98398dd7]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-98398dd7]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.slash-menu:hover .scroll-thumb[data-v-98398dd7]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-98398dd7]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.slash-item[data-v-98398dd7]{display:flex;align-items:baseline;gap:var(--space-2);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:var(--p-hairline) solid transparent;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-b2);border-radius:var(--radius-menu-row);corner-shape:var(--corner-shape-menu)}.slash-item[data-v-98398dd7]:hover{background:var(--color-hover)}.slash-item.active[data-v-98398dd7]{background:var(--color-selected)}.slash-item+.slash-item[data-v-98398dd7]{margin-top:var(--menu-rows-seam)}.slash-name[data-v-98398dd7]{flex:none;max-width:60%;color:var(--color-text);font-weight:500;min-width:0;line-height:var(--leading-normal);overflow-wrap:anywhere}.slash-match[data-v-98398dd7]{font-weight:var(--weight-semibold)}.slash-empty[data-v-98398dd7]{padding:var(--space-1-5) var(--space-1);color:var(--color-text-muted)}@media(hover:none){.slash-item[data-v-98398dd7]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.slash-desc[data-v-98398dd7]{flex:1;min-width:0;color:var(--color-text-muted);font-size:var(--ui-b2);font-weight:var(--weight-regular);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-desc-match[data-v-98398dd7]{font-weight:var(--weight-semibold)}@media(max-width:520px){.slash-item[data-v-98398dd7]{flex-direction:column;align-items:stretch;gap:var(--space-05)}.slash-name[data-v-98398dd7]{max-width:none}}.mention-menu[data-menu-frame][data-v-53eca905]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.mention-scroll[data-v-53eca905]{max-height:var(--p-mention-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.mention-scroll[data-v-53eca905]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-53eca905]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.mention-menu:hover .scroll-thumb[data-v-53eca905]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-53eca905]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.mention-state[data-v-53eca905]{padding:var(--space-2) var(--space-1);font-family:var(--font-ui);font-size:var(--ui-b2)}.dim[data-v-53eca905]{color:var(--color-text-muted)}.mention-item[data-v-53eca905]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:var(--p-hairline) solid transparent;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-b2);border-radius:var(--radius-menu-row);corner-shape:var(--corner-shape-menu)}.mention-icon[data-v-53eca905]{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;color:var(--muted);flex-shrink:0}.mention-icon[data-v-53eca905] svg{width:13px;height:13px;display:block}.mention-item:hover .mention-icon[data-v-53eca905],.mention-item.active .mention-icon[data-v-53eca905]{color:var(--color-text-strong)}.mention-item[data-v-53eca905]:hover{background:var(--color-hover)}.mention-item:hover .mention-name[data-v-53eca905],.mention-item.active .mention-name[data-v-53eca905]{color:var(--color-text-strong)}.mention-item.active[data-v-53eca905]{background:var(--color-selected)}.mention-item+.mention-item[data-v-53eca905]{margin-top:var(--menu-rows-seam)}@media(hover:none){.mention-item[data-v-53eca905]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.mention-name[data-v-53eca905]{color:var(--color-text);font-weight:500;min-width:80px;flex-shrink:0}.mention-path[data-v-53eca905]{color:var(--color-text-muted);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.composer[data-v-a4ef2d7c]{padding:7px var(--dock-inline-right, 16px) 12px var(--dock-inline-left, 16px);background:transparent;transition:background .12s}.composer.drag-over[data-v-a4ef2d7c]{background:var(--color-accent-soft)}.drop-overlay[data-v-a4ef2d7c]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.drop-overlay.show[data-v-a4ef2d7c]{opacity:1;visibility:visible}.drop-card[data-v-a4ef2d7c]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4) var(--space-6);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.composer-card[data-v-a4ef2d7c]{--composer-control-size: var(--space-8);--composer-send-size: var(--composer-control-size);--composer-control-inset: var(--space-2);position:relative;border:.5px solid var(--color-composer-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);background:var(--color-composer-bg);box-shadow:var(--shadow-input);user-select:none;container-type:inline-size}.composer-card[data-v-a4ef2d7c]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.composer-card[data-v-a4ef2d7c]:focus-within:after{opacity:1}.att-strip[data-v-a4ef2d7c]{position:relative;padding:calc(var(--space-4) + var(--space-05)) var(--space-4) 0 calc(var(--space-4) + var(--space-05))}.att-scroll[data-v-a4ef2d7c]{max-height:calc(128px + var(--space-2));overflow-y:auto;margin-right:calc(var(--icon-button-sm) + var(--space-1))}.att-scroll-content[data-v-a4ef2d7c]{display:flex;flex-direction:column;gap:var(--space-2);padding-right:var(--space-1)}.att-scroll.is-overflowing[data-v-a4ef2d7c]{padding-bottom:var(--space-6)}.att-more[data-v-a4ef2d7c]{position:absolute;left:var(--space-4);bottom:var(--space-1);z-index:var(--z-raised);display:inline-flex;align-items:center;height:18px;padding:0 var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--text-xs);box-shadow:var(--shadow-sm);pointer-events:none}.att-row[data-v-a4ef2d7c]{display:flex;flex-wrap:wrap;gap:6px}.att-row-media[data-v-a4ef2d7c]{gap:var(--space-2)}.att-scroll-content[data-v-a4ef2d7c] .att-chip{corner-shape:superellipse(1.5)}.att-scroll-content[data-v-a4ef2d7c] .att-tile{margin-left:calc(-1 * (var(--att-chip-pad-left, 5px) + var(--space-05)))}.att-clear[data-v-a4ef2d7c]{position:absolute;top:calc(var(--space-4) + var(--space-05));right:var(--space-4);z-index:var(--z-raised)}.file-input-hidden[data-v-a4ef2d7c]{display:none}.cin-wrap[data-v-a4ef2d7c]{position:relative;padding:14px 16px 8px}.input-row[data-v-a4ef2d7c]{position:relative;display:flex;align-items:flex-start;gap:var(--space-2)}.expand-btn[data-v-a4ef2d7c]{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:none;border-radius:6px;background:transparent;color:var(--dim);cursor:pointer;padding:0;transition:background .12s,color .12s}.expand-btn[data-v-a4ef2d7c]:hover{background:var(--panel2);color:var(--color-text)}.expand-btn[data-v-a4ef2d7c]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.ph[data-v-a4ef2d7c]{color:var(--faint);caret-color:var(--color-text);flex:1;border:none;outline:none;resize:none;font-family:var(--font-ui);font-size:var(--content-font-size);text-autospace:normal;background:transparent;min-height:36px;max-height:25vh;overflow-y:auto;scrollbar-width:none;line-height:1.5;margin-bottom:6px;user-select:text}.ph[data-v-a4ef2d7c]::-webkit-scrollbar{display:none}.ph[data-v-a4ef2d7c]::placeholder{color:var(--muted)}.ph[data-v-a4ef2d7c]:not(:placeholder-shown){color:var(--color-text)}.composer.expanded .ph[data-v-a4ef2d7c]{min-height:70vh;max-height:70vh}.compact-chip[data-v-a4ef2d7c]{height:var(--composer-control-size);padding:0 var(--space-2);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-warning);font-family:var(--mono);font-size:var(--ui-font-size);cursor:pointer;line-height:1;flex:none;transition:background var(--duration-base) var(--ease-out)}.compact-chip[data-v-a4ef2d7c]:hover{background:var(--color-hover)}.composer-attach[data-v-a4ef2d7c]{width:var(--composer-control-size);height:var(--composer-control-size);border-radius:var(--radius-full)}.add-menu[data-v-a4ef2d7c]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;z-index:var(--z-dropdown);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--shadow-menu);padding:var(--space-1-5) var(--space-3);display:flex;flex-direction:column;gap:var(--menu-rows-seam);font-family:var(--font-ui);transform-origin:bottom left}.am-scroll[data-v-a4ef2d7c]{max-height:var(--p-add-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none;display:flex;flex-direction:column;gap:var(--menu-rows-seam)}.am-scroll[data-v-a4ef2d7c]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-a4ef2d7c]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);pointer-events:none;z-index:var(--z-raised)}.add-menu:hover .scroll-thumb[data-v-a4ef2d7c]{background:var(--color-menu-scrollbar-hover)}.am-row[data-v-a4ef2d7c]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:.5px solid transparent;border-radius:var(--radius-menu-row);corner-shape:superellipse(1.5);background:none;cursor:pointer;font-size:var(--ui-font-size);color:var(--color-text);text-align:left;transition:background var(--duration-base) var(--ease-out)}.am-row[data-v-a4ef2d7c]:hover{background:var(--color-hover)}.am-row[data-v-a4ef2d7c]:focus-visible{background:var(--color-selected);outline:none}@media(hover:none){.am-row[data-v-a4ef2d7c]{padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.am-row:hover .am-icon[data-v-a4ef2d7c],.am-row:focus-visible .am-icon[data-v-a4ef2d7c]{color:var(--color-text)}.am-icon[data-v-a4ef2d7c]{flex:none;width:var(--p-ic-sm);display:flex;justify-content:center;color:var(--color-text-muted);transition:color var(--duration-base) var(--ease-out)}.am-name[data-v-a4ef2d7c]{flex:none;font-weight:var(--weight-medium)}.am-desc[data-v-a4ef2d7c]{margin-left:var(--space-1);color:var(--color-text-muted);font-size:var(--ui-font-size-sm)}.send[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-send-bg);color:var(--color-send-icon);border:none;box-shadow:var(--shadow-send);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background var(--duration-slow) var(--ease-out),transform var(--duration-fast) var(--ease-out),box-shadow var(--duration-slow) var(--ease-out);position:relative}.send[data-v-a4ef2d7c]:hover:not(:disabled){background:var(--color-send-bg-hover);box-shadow:var(--shadow-send-hover)}.send[data-v-a4ef2d7c]:active{transform:scale(.92)}.send[data-v-a4ef2d7c]:disabled{cursor:not-allowed;background:var(--color-send-bg-disabled);color:var(--color-send-icon-disabled);opacity:var(--opacity-send-disabled)}.send[data-v-a4ef2d7c]:disabled:active{transform:none}.send.is-starting[data-v-a4ef2d7c]:disabled{background:var(--color-send-bg);color:var(--color-send-icon)}.send.is-starting[data-v-a4ef2d7c] .ui-spinner{color:var(--color-send-icon)}.send.is-starting[data-v-a4ef2d7c] .ui-spinner__track{stroke:color-mix(in srgb,var(--color-send-icon) 32%,transparent)}.send svg[data-v-a4ef2d7c]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.stop[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-subtle);color:var(--color-stop-glyph);border:none;box-shadow:var(--shadow-xs);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .16s ease,color .16s ease,transform .12s ease}.stop[data-v-a4ef2d7c]:hover{background:var(--color-danger);color:var(--color-text-on-accent)}.stop[data-v-a4ef2d7c]:active{transform:scale(.92)}.stop svg[data-v-a4ef2d7c]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.toolbar[data-v-a4ef2d7c]{display:flex;align-items:center;justify-content:space-between;padding:var(--space-1) var(--composer-control-inset) var(--composer-control-inset);position:relative}.menu-measure[data-v-a4ef2d7c]{position:absolute;width:max-content;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.toolbar-left[data-v-a4ef2d7c],.toolbar-right[data-v-a4ef2d7c]{display:flex;align-items:center;gap:var(--space-1);min-width:0}.toolbar-left[data-v-a4ef2d7c]{flex:0 1 auto;overflow:hidden}.toolbar-right[data-v-a4ef2d7c]{flex:1 1 0;justify-content:flex-end}.perm-pill[data-v-a4ef2d7c],.swarm-chip[data-v-a4ef2d7c],.model-pill[data-v-a4ef2d7c]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1);height:var(--composer-control-size);padding:0 var(--space-3);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:pointer;user-select:none;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.perm-pill[data-v-a4ef2d7c]{font-size:var(--ui-font-size-sm)}.perm-pill[data-v-a4ef2d7c]:after,.swarm-chip[data-v-a4ef2d7c]:after,.model-pill[data-v-a4ef2d7c]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-full);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.perm-pill[data-v-a4ef2d7c]:hover:after,.swarm-chip[data-v-a4ef2d7c]:hover:after,.model-pill[data-v-a4ef2d7c]:hover:after{opacity:1}.perm-pill.open[data-v-a4ef2d7c],.model-pill.open[data-v-a4ef2d7c]{background:var(--color-accent-soft)}.swarm-chip[data-v-a4ef2d7c]{cursor:default}.swarm-x[data-v-a4ef2d7c]{margin-right:calc(var(--composer-control-size) / 2 - var(--space-3) - var(--icon-button-sm) / 2);color:inherit;opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.swarm-chip:hover .swarm-x[data-v-a4ef2d7c],.swarm-x[data-v-a4ef2d7c]:focus-visible{opacity:1}@media(hover:none){.swarm-x[data-v-a4ef2d7c]{opacity:1;position:relative}.swarm-x[data-v-a4ef2d7c]:before{content:"";position:absolute;inset:calc(-1 * (var(--touch-target-min) - var(--icon-button-sm)) / 2)}}.perm-pill.perm-manual[data-v-a4ef2d7c]{color:var(--dim)}.perm-pill.perm-yolo[data-v-a4ef2d7c]{color:var(--color-warning)}.perm-pill.perm-auto[data-v-a4ef2d7c]{color:var(--color-danger)}.perm-pill-icon[data-v-a4ef2d7c]{flex:none}@container (max-width: 620px){.perm-pill[data-v-a4ef2d7c]{width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.perm-pill-label[data-v-a4ef2d7c]{display:none}.swarm-chip[data-v-a4ef2d7c]{position:relative;width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center}.swarm-label[data-v-a4ef2d7c]{display:none}.swarm-ic[data-v-a4ef2d7c]{transition:opacity var(--duration-base) var(--ease-out)}.swarm-chip:hover .swarm-ic[data-v-a4ef2d7c]{opacity:0}.swarm-x[data-v-a4ef2d7c]{position:absolute;inset:0;width:auto;height:auto;margin-right:0}@media(hover:none){.swarm-chip[data-v-a4ef2d7c]{width:var(--touch-target-min);height:var(--touch-target-min)}.swarm-chip:hover .swarm-ic[data-v-a4ef2d7c]{opacity:1}.swarm-x[data-v-a4ef2d7c]{inset:0;width:auto;height:auto;opacity:1;background:transparent}.swarm-x[data-v-a4ef2d7c]:before{inset:0 0 auto auto;width:var(--p-ic-md);height:var(--p-ic-md);border-radius:var(--radius-full);background:var(--color-selected)}.swarm-x[data-v-a4ef2d7c] svg{position:absolute;top:calc(var(--space-1-5) / 2);right:calc(var(--space-1-5) / 2);width:calc(var(--p-ic-md) - var(--space-1-5));height:calc(var(--p-ic-md) - var(--space-1-5))}}}.ctx-group[data-v-a4ef2d7c]{display:flex;align-items:center;gap:4px;flex-shrink:0;padding:2px 0;border-radius:var(--radius-xs)}.ctx-group[data-v-a4ef2d7c]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.model-pill[data-v-a4ef2d7c]{gap:var(--space-1);line-height:var(--leading-normal);overflow:hidden;flex:0 1 auto;min-width:0;max-width:320px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.model-pill[data-v-a4ef2d7c]:active{transform:scale(.97)}.model-pill[data-v-a4ef2d7c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-pill .mp-name[data-v-a4ef2d7c]{flex:0 1 auto;font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.model-pill .think-suffix[data-v-a4ef2d7c]{color:var(--color-accent);font-weight:var(--weight-medium);flex-shrink:0}.model-pill .cv[data-v-a4ef2d7c]{color:var(--faint);flex:none;transition:transform var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.model-pill:hover .cv[data-v-a4ef2d7c],.model-pill.open .cv[data-v-a4ef2d7c]{color:var(--dim)}.model-pill.open .cv[data-v-a4ef2d7c]{transform:rotate(180deg)}.model-pill.login-pill[data-v-a4ef2d7c]{flex:none;color:var(--color-accent)}.model-pill.login-pill .mp-name[data-v-a4ef2d7c]{color:var(--color-accent)}.model-dropdown[data-v-a4ef2d7c]{position:absolute;bottom:calc(100% + 4px);right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));z-index:var(--z-dropdown);min-width:200px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1);display:flex;flex-direction:column;gap:1px;font-family:var(--font-ui);transform-origin:bottom right}.composer-menu-pop-enter-active[data-v-a4ef2d7c]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.composer-menu-pop-leave-active[data-v-a4ef2d7c]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.composer-menu-pop-enter-from[data-v-a4ef2d7c],.composer-menu-pop-leave-to[data-v-a4ef2d7c]{opacity:0;transform:scale(.97) translateY(2px)}.md-list[data-v-a4ef2d7c]{display:flex;flex-direction:column;gap:1px;max-height:min(320px,40vh);overflow-y:auto;overscroll-behavior:contain}.md-section[data-v-a4ef2d7c]{padding:4px 9px 2px;font-size:var(--text-xs);color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:var(--weight-semibold)}.md-row[data-v-a4ef2d7c]{display:flex;align-items:center;gap:7px;width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);padding:5px 9px;border-radius:6px;text-align:left;transition:background var(--duration-base) var(--ease-out)}.md-row[data-v-a4ef2d7c]:hover{background:var(--color-hover)}.md-row:hover .md-name[data-v-a4ef2d7c]{color:var(--color-text-strong)}.md-row[data-v-a4ef2d7c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md-row[data-v-a4ef2d7c]:disabled{cursor:default;opacity:.58}.md-row[data-v-a4ef2d7c]:disabled:hover{background:none}.md-row.is-current[data-v-a4ef2d7c]{background:var(--color-selected)}.md-note[data-v-a4ef2d7c]{margin-left:auto;color:var(--muted);font-size:var(--ui-font-size-xs)}.md-row-more .md-more-icon[data-v-a4ef2d7c]{color:var(--dim)}.md-row-more .md-more-arrow[data-v-a4ef2d7c]{color:var(--faint);flex:none;transition:color var(--duration-base) var(--ease-out)}.md-row-more:hover .md-more-arrow[data-v-a4ef2d7c]{color:var(--dim)}.md-check[data-v-a4ef2d7c]{width:14px;flex:none;color:var(--color-accent);font-weight:500;display:flex;justify-content:center}.md-name[data-v-a4ef2d7c]{flex:1;transition:color var(--duration-base) var(--ease-out)}.md-provider[data-v-a4ef2d7c]{color:var(--muted);font-size:var(--ui-font-size-xs);flex:none}.md-star[data-v-a4ef2d7c]{color:var(--star);flex:none;margin-left:auto}.md-divider[data-v-a4ef2d7c]{height:1px;background:var(--line);margin:3px 0}.md-thinking[data-v-a4ef2d7c]{display:flex;align-items:center;gap:8px;padding:6px 9px;border-radius:var(--radius-sm)}.md-thinking .md-name[data-v-a4ef2d7c]{font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);flex:none}.md-thinking .md-note[data-v-a4ef2d7c],.md-thinking .ui-seg[data-v-a4ef2d7c]{margin-left:auto}.md-cache-note[data-v-a4ef2d7c]{width:0;min-width:100%;padding:2px 7px 4px;color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.4}.perm-dropdown[data-v-a4ef2d7c]{position:absolute;bottom:calc(100% + 4px);left:var(--composer-control-inset);z-index:var(--z-dropdown);min-width:220px;width:max-content;max-width:calc(100vw - var(--space-8));background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:5px;display:flex;flex-direction:column;gap:1px;transform-origin:bottom left}.pd-row[data-v-a4ef2d7c]{display:grid;grid-template-columns:var(--p-ic-md) var(--composer-menu-desc-width, max-content) var(--p-ic-sm);column-gap:7px;row-gap:2px;align-items:start;width:100%;background:none;border:none;cursor:pointer;padding:6px 7px;border-radius:6px;text-align:left}.pd-row[data-v-a4ef2d7c]:hover,.pd-row.is-current[data-v-a4ef2d7c]{background:var(--color-hover)}.pd-icon[data-v-a4ef2d7c]{grid-column:1;grid-row:1;width:var(--p-ic-md);min-height:1lh;display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-check[data-v-a4ef2d7c]{grid-column:3;grid-row:1;width:var(--p-ic-sm);min-height:1lh;color:var(--color-accent);font-size:var(--ui-font-size);font-weight:var(--weight-medium);display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-info[data-v-a4ef2d7c]{display:contents}.pd-name[data-v-a4ef2d7c]{grid-column:2;grid-row:1;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight)}.pd-desc[data-v-a4ef2d7c]{grid-column:2;grid-row:2;width:var(--composer-menu-desc-width, auto);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-caption);color:var(--muted);line-height:var(--leading-tight)}.wm-pill[data-v-a4ef2d7c]{position:absolute;top:0;left:0;margin-left:calc(-1 * var(--space-05));z-index:var(--z-raised);display:inline-flex;align-items:center;gap:var(--space-1);height:calc(var(--content-font-size) * 1.5);padding:0 calc((var(--content-font-size) * 1.5 - var(--wm-x-size)) / 2) 0 var(--space-2);border:none;border-radius:var(--radius-full);background:var(--color-surface);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:calc(var(--content-font-size) * 1.5);white-space:nowrap;user-select:none}.wm-x[data-v-a4ef2d7c]{position:relative;width:var(--wm-x-size);height:var(--wm-x-size);border-radius:var(--radius-full)}.wm-x[data-v-a4ef2d7c]:before{content:"";position:absolute;inset:calc(-1 * var(--wm-x-ring))}@media(hover:none){.wm-x[data-v-a4ef2d7c]:before{inset:calc((var(--wm-x-size) - var(--touch-target-min)) / 2)}}@media(max-width:980px){.perm-pill[data-v-a4ef2d7c]{max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media(max-width:640px){.composer[data-v-a4ef2d7c]{padding:9px var(--dock-inline-right, max(12px, var(--safe-right))) max(24px,var(--safe-bottom)) var(--dock-inline-left, max(12px, var(--safe-left)))}.composer-card[data-v-a4ef2d7c]{--composer-control-size: 36px;max-width:100%}.input-row[data-v-a4ef2d7c]{gap:6px;min-width:0}.send[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.send svg[data-v-a4ef2d7c]{display:none}.send[data-v-a4ef2d7c]:after{content:"↑";font-size:17px;line-height:1;color:var(--bg)}.stop[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.stop svg[data-v-a4ef2d7c]{display:none}.stop[data-v-a4ef2d7c]:after{content:"■";font-size:17px;line-height:1}.perm-pill[data-v-a4ef2d7c],.wm-pill[data-v-a4ef2d7c]{display:none}.model-dropdown[data-v-a4ef2d7c]{right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));left:auto;min-width:180px;max-width:calc(100vw - 24px)}.ph[data-v-a4ef2d7c]{font-size:16px}.model-pill[data-v-a4ef2d7c],.attach-btn[data-v-a4ef2d7c]{font-size:var(--ui-font-size)}.toolbar[data-v-a4ef2d7c]{gap:6px;min-width:0}.toolbar-left[data-v-a4ef2d7c],.toolbar-right[data-v-a4ef2d7c]{min-width:0}.model-pill[data-v-a4ef2d7c]{max-width:min(52vw,220px)}.model-pill .mp-name[data-v-a4ef2d7c]{max-width:min(40vw,170px)}.md-row[data-v-a4ef2d7c],.md-section[data-v-a4ef2d7c]{font-size:var(--ui-font-size)}.md-thinking[data-v-a4ef2d7c]{flex-wrap:wrap;row-gap:6px}.md-thinking .ui-seg[data-v-a4ef2d7c]{margin-left:0}.pd-name[data-v-a4ef2d7c]{font-size:var(--ui-font-size)}.pd-desc[data-v-a4ef2d7c]{font-size:var(--text-xs)}}.goal-panel[data-v-cdb3e8b0]{display:flex;flex-direction:column;gap:var(--space-2);overflow-wrap:anywhere}.goal-criterion[data-v-cdb3e8b0]{padding-top:var(--space-2);border-top:.5px solid var(--color-line)}.goal-criterion-label[data-v-cdb3e8b0]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-section-label);line-height:var(--leading-normal);margin-bottom:var(--space-1)}.plan-panel[data-v-dea23306]{display:flex;flex-direction:column;gap:var(--space-2)}.plan-review-row[data-v-dea23306]{display:flex;gap:var(--space-2);font-size:var(--text-sm)}.plan-review-label[data-v-dea23306]{flex:none;color:var(--color-text-muted)}.plan-review-feedback[data-v-dea23306]{color:var(--color-text-muted)}.plan-path-only[data-v-dea23306]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-1)}.plan-path-hint[data-v-dea23306]{color:var(--color-text-muted);font-size:var(--text-sm)}.plan-path[data-v-dea23306]{max-width:100%;font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plan-empty[data-v-dea23306]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.plan-empty-ico[data-v-dea23306]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}.qcard[data-v-ca95f2cd]{margin:var(--space-2) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);overflow:hidden;animation:kimi-card-in var(--duration-base) var(--ease-out)}.qcard.minimized[data-v-ca95f2cd]{transition:background var(--duration-fast) var(--ease-out)}.qcard.minimized[data-v-ca95f2cd]:hover{background:var(--color-hover)}.qh[data-v-ca95f2cd]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-3) var(--space-4) 0}.qcard.minimized .qh[data-v-ca95f2cd]{padding-bottom:var(--space-3);align-items:center}.qcard.minimized .qh.clickable[data-v-ca95f2cd]{cursor:pointer}.qh-chip[data-v-ca95f2cd]{width:var(--p-chip-num);height:var(--p-chip-num);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.qtitle[data-v-ca95f2cd]{flex:1;min-width:0;color:var(--color-text);font-size:var(--text-lg);font-weight:var(--weight-semibold);line-height:var(--leading-tight);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.qcard.minimized .qtitle[data-v-ca95f2cd]{display:block;white-space:nowrap;text-overflow:ellipsis}.qmin[data-v-ca95f2cd],.qclose[data-v-ca95f2cd]{flex:none;margin-top:calc((var(--text-lg) * var(--leading-tight) - var(--icon-button-sm)) / 2)}.qmin[data-v-ca95f2cd]{margin-left:auto}.qcard.minimized .qmin[data-v-ca95f2cd],.qcard.minimized .qclose[data-v-ca95f2cd]{margin-top:0}.qbody[data-v-ca95f2cd]{padding:var(--space-3) var(--space-4) 0;color:var(--color-text);font:var(--text-base)/var(--leading-normal) var(--font-ui)}.qmdbody[data-v-ca95f2cd]{margin-bottom:var(--space-2)}.qopts[data-v-ca95f2cd]{display:flex;flex-direction:column;gap:2px;margin-top:var(--space-2)}.qopt[data-v-ca95f2cd]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);cursor:pointer;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text);transition:background var(--duration-fast) var(--ease-out);user-select:none}.qopt[data-v-ca95f2cd]:hover,.qopt.highlighted[data-v-ca95f2cd]{background:var(--color-hover)}.qopt-key[data-v-ca95f2cd]{width:var(--p-chip-num);height:var(--p-chip-num);margin-top:calc((var(--text-base) * var(--leading-normal) - var(--p-chip-num)) / 2);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.qopt-key[data-v-ca95f2cd]:empty{background:transparent}.qopt-glyph[data-v-ca95f2cd]{width:16px;height:16px;margin-top:calc((var(--text-base) * var(--leading-normal) - 16px) / 2);flex:none;border:.5px solid var(--color-line-strong);position:relative;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.qopt-glyph.rad[data-v-ca95f2cd]{border-radius:50%}.qopt-glyph.chk[data-v-ca95f2cd]{border-radius:var(--radius-xs)}.qopt.selected .qopt-glyph[data-v-ca95f2cd]{border-color:var(--color-accent)}.qopt.selected .qopt-glyph.rad[data-v-ca95f2cd]:after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--color-accent)}.qopt.selected .qopt-glyph.chk[data-v-ca95f2cd]{background:var(--color-accent)}.qopt.selected .qopt-glyph.chk[data-v-ca95f2cd]:after{content:"";position:absolute;left:4.5px;top:1.5px;width:4px;height:8px;border-right:1.5px solid var(--color-text-on-accent);border-bottom:1.5px solid var(--color-text-on-accent);transform:rotate(45deg)}.qopt-text[data-v-ca95f2cd]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.qopt-label[data-v-ca95f2cd]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.qopt-desc[data-v-ca95f2cd]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui)}.other-input[data-v-ca95f2cd]{flex:1;font:var(--text-base) var(--font-ui);border:none;border-bottom:.5px solid var(--color-line);outline:none;padding:2px var(--space-1);color:var(--color-text);background:transparent;min-width:0}.other-input[data-v-ca95f2cd]:focus-visible{border-bottom-color:var(--color-accent);box-shadow:0 1px 0 0 var(--color-accent)}.qfoot[data-v-ca95f2cd]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-3);padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.qbtns[data-v-ca95f2cd]{display:flex;align-items:center;gap:var(--space-1)}.qhint[data-v-ca95f2cd]{margin-left:auto;color:var(--color-text-faint);font:var(--text-xs) var(--font-ui);user-select:none}@media(max-width:640px){.qopt[data-v-ca95f2cd]{min-height:44px;padding:var(--space-3)}.other-input[data-v-ca95f2cd]{flex-basis:100%;min-height:28px}.qfoot[data-v-ca95f2cd]{flex-direction:column;align-items:stretch}.qhint[data-v-ca95f2cd]{display:none}.qbtns[data-v-ca95f2cd]{flex-direction:column;gap:var(--space-2)}.qbtns[data-v-ca95f2cd] .ui-button{width:100%;min-height:46px}}.appr[data-v-cd852243]{display:flex;flex-direction:column;max-height:calc(100dvh - 72px);margin:var(--space-2) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);overflow:hidden;animation:kimi-card-in var(--duration-base) var(--ease-out)}.appr>.ah[data-v-cd852243],.appr>.af[data-v-cd852243]{flex:none}.appr.minimized[data-v-cd852243]{transition:background var(--duration-fast) var(--ease-out)}.appr.minimized[data-v-cd852243]:hover{background:var(--color-hover)}.ah[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-3) var(--space-4) 0;flex-wrap:nowrap}.appr.minimized .ah[data-v-cd852243]{padding-bottom:var(--space-3)}.appr.minimized .ah.clickable[data-v-cd852243]{cursor:pointer}.akind[data-v-cd852243]{color:var(--color-text);font-size:var(--text-lg);font-weight:var(--weight-semibold);white-space:nowrap;flex:none}.apeek[data-v-cd852243]{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.amin[data-v-cd852243],.aexpand[data-v-cd852243]{margin-left:auto;flex:none}.aexpand+.amin[data-v-cd852243]{margin-left:0}.ab[data-v-cd852243]{display:flex;flex-direction:column;flex:1;min-height:0;padding:var(--space-3) var(--space-4) 0}.ab[data-v-cd852243]>*{flex:none}.ab>.body-plan-wrap[data-v-cd852243]{flex:1}.plan-path[data-v-cd852243]{display:block;width:100%;margin-bottom:var(--space-2);padding:0;border:none;background:transparent;color:var(--color-accent);font:var(--text-xs) var(--font-mono);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.plan-path[data-v-cd852243]:hover{text-decoration:underline}.plan-path[data-v-cd852243]:focus-visible{outline:none;text-decoration:underline;border-radius:var(--radius-xs);box-shadow:var(--p-focus-ring)}.body-code[data-v-cd852243]{display:flex;flex-direction:column;min-height:0}.body-code.expanded[data-v-cd852243]{flex:1}.body-code.expanded[data-v-cd852243] .hl-code{max-height:none;flex:1}.code-path[data-v-cd852243]{flex:none;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shell-cmd[data-v-cd852243]{font:var(--text-sm) var(--font-mono);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-all;max-height:160px;overflow-y:auto;color:var(--color-text)}.shell-dollar[data-v-cd852243]{color:var(--color-accent-hover);font-weight:var(--weight-medium);margin-right:var(--space-2)}.shell-cwd[data-v-cd852243]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-top:var(--space-1)}.shell-danger[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-2);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui);background:var(--color-danger-soft)}.shell-danger-ic[data-v-cd852243]{flex:none}.body-chip[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.chip-label[data-v-cd852243]{background:var(--color-inline-code-bg);border-radius:var(--radius-sm);padding:2px var(--space-2);font:var(--weight-semibold) var(--text-xs) var(--font-mono);color:var(--color-text-muted);white-space:nowrap}.chip-value[data-v-cd852243]{font:var(--text-sm) var(--font-mono);color:var(--color-text);word-break:break-all}.chip-detail[data-v-cd852243]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted)}.todo-item[data-v-cd852243]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-1) 0;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.todo-glyph[data-v-cd852243]{color:var(--color-accent);font-size:var(--text-sm);flex:none;width:14px}.todo-title[data-v-cd852243]{color:var(--color-text)}.todo-done[data-v-cd852243]{color:var(--color-text-muted);text-decoration:line-through}.body-generic[data-v-cd852243]{font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text);word-break:break-word}.body-plan-wrap[data-v-cd852243]{display:flex;flex-direction:column;min-height:0;position:relative}.body-plan-wrap[data-v-cd852243]:before{content:"";position:absolute;top:0;left:0;right:0;height:18px;z-index:1;pointer-events:none;opacity:0;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 2.5%,transparent),transparent 35%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.75%,transparent),transparent 65%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.25%,transparent),transparent);transition:opacity var(--duration-slow) var(--ease-out)}.body-plan-wrap.scrolled[data-v-cd852243]:before{opacity:1}.body-plan-wrap>.plan-opts[data-v-cd852243]{flex:none}.body-plan[data-v-cd852243]{max-height:50vh;overflow-y:auto;min-height:0}.body-plan.expanded[data-v-cd852243]{max-height:none;flex:1}.plan-opts[data-v-cd852243]{display:flex;flex-direction:column;gap:2px;margin-top:var(--space-3);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.popt[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-3);width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text);font:var(--text-sm)/var(--leading-normal) var(--font-ui);text-align:left;cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.popt[data-v-cd852243]:hover:not(:disabled){background:var(--color-hover)}.popt[data-v-cd852243]:focus-visible{outline:none;background:var(--color-hover);box-shadow:var(--p-focus-ring)}.popt[data-v-cd852243]:disabled{cursor:default;opacity:.6}.popt-key[data-v-cd852243]{width:var(--p-chip-num);height:var(--p-chip-num);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.popt-text[data-v-cd852243]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.popt-label[data-v-cd852243]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.popt-desc[data-v-cd852243]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui)}.popt-spin[data-v-cd852243]{flex:none;color:var(--color-text-muted)}.feedback-wrap[data-v-cd852243]{margin-top:var(--space-3)}.feedback-ta[data-v-cd852243]{width:100%;box-sizing:border-box;font:var(--text-sm) var(--font-ui);padding:var(--space-2) var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-md);resize:none;outline:none;color:var(--color-text);background:var(--color-surface)}.feedback-ta[data-v-cd852243]:focus-visible{border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.feedback-hint[data-v-cd852243]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted);margin-top:var(--space-1)}.af[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-3);padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.abtns[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-1)}.knum[data-v-cd852243]{min-width:16px;height:16px;padding:0 3px;border-radius:var(--radius-xs);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/16px var(--font-ui);text-align:center}.abtns .ui-button--primary .knum[data-v-cd852243]{background:color-mix(in srgb,var(--color-text-on-accent) 28%,transparent);color:var(--color-text-on-accent)}@media(max-width:640px){.popt[data-v-cd852243]{min-height:44px;padding:var(--space-3)}.af[data-v-cd852243]{flex-direction:column;align-items:stretch}.abtns[data-v-cd852243]{flex-direction:column;margin-left:0;gap:var(--space-2)}.abtns[data-v-cd852243] .ui-button{width:100%;min-height:46px}.abtns .amain[data-v-cd852243]{order:-1}}.taskspane[data-v-d5a5712a]{flex:1;min-height:0;display:flex;flex-direction:column}.tp-list[data-v-d5a5712a]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--space-05)}.tp-row[data-v-d5a5712a]{padding:var(--space-1) 0}.tp-row.fail .tp-name[data-v-d5a5712a]{color:var(--color-danger)}.tp-main[data-v-d5a5712a]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-base)}.tp-row.expandable>.tp-main[data-v-d5a5712a]{position:relative;border-radius:var(--radius-lg);padding:var(--space-1) var(--space-2);margin:calc(-1 * var(--space-1)) 0}.tp-row.expandable>.tp-main[data-v-d5a5712a]:hover{background:var(--color-hover)}.tp-row[data-v-d5a5712a]:not(.expandable){cursor:not-allowed}.tp-open[data-v-d5a5712a]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.tp-open[data-v-d5a5712a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tp-chevron[data-v-d5a5712a]{flex:none;color:var(--muted)}.tp-name[data-v-d5a5712a]{color:var(--color-text);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-meta[data-v-d5a5712a]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted)}.tp-glyph[data-v-d5a5712a]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center}.tp-done[data-v-d5a5712a]{color:var(--color-success);transform:scale(.91)}.tp-cancelled[data-v-d5a5712a]{color:var(--color-text-muted)}.tp-fail[data-v-d5a5712a]{color:var(--color-danger)}.tp-time[data-v-d5a5712a]{flex:none;font-size:var(--text-base);color:var(--muted);font-variant-numeric:tabular-nums;text-autospace:normal}.tp-model[data-v-d5a5712a]{flex:0 1 auto;min-width:0;font-size:var(--text-base);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-stop[data-v-d5a5712a]{position:relative;flex:none;color:var(--color-danger)}.tp-stop[data-v-d5a5712a]:hover{color:var(--color-danger)}@media(hover:none){.tp-stop[data-v-d5a5712a]{width:var(--touch-target-min);height:var(--touch-target-min)}.tp-row.expandable>.tp-main[data-v-d5a5712a]{min-height:var(--touch-target-min)}}.tp-empty[data-v-d5a5712a]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--faint);font-size:var(--ui-font-size-sm);user-select:none}@media(max-width:640px){.tp-main[data-v-d5a5712a]{flex-wrap:wrap;row-gap:var(--space-1)}.tp-name[data-v-d5a5712a]{font-size:var(--ui-font-size-sm)}}.sg-empty[data-v-f7e4b600]{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-text-faint);font-size:var(--text-sm);user-select:none}.sg-grid[data-v-f7e4b600]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.sg-card[data-v-f7e4b600]{position:relative;display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.sg-card.openable[data-v-f7e4b600]{cursor:pointer}.sg-card.openable[data-v-f7e4b600]:hover{background:var(--color-selected-hover)}.sg-card[data-v-f7e4b600]:not(.openable){cursor:not-allowed}.sg-open[data-v-f7e4b600]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.sg-open[data-v-f7e4b600]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sg-top[data-v-f7e4b600]{display:flex;align-items:center;gap:var(--space-2)}.sg-name[data-v-f7e4b600]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.sg-num[data-v-f7e4b600]{flex:none;color:var(--color-text-muted);font-size:var(--text-sm);font-variant-numeric:tabular-nums}.sg-card:has(.sg-cancel) .sg-top[data-v-f7e4b600]{padding-right:calc(var(--icon-button-sm) + var(--space-1))}@media(hover:none){.sg-card:has(.sg-cancel) .sg-top[data-v-f7e4b600]{padding-right:calc(var(--touch-target-min) + var(--space-1))}}.sg-desc[data-v-f7e4b600]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.sg-foot[data-v-f7e4b600]{display:flex;flex-direction:column;gap:var(--space-1)}.sg-model[data-v-f7e4b600]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs)}.sg-model span[data-v-f7e4b600]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sg-status[data-v-f7e4b600]{display:flex;align-items:center}.sg-state[data-v-f7e4b600]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);text-autospace:normal}.sg-ic-done[data-v-f7e4b600]{color:var(--color-success);transform:scale(.91)}.s-fail .sg-state[data-v-f7e4b600]{color:var(--color-danger)}.sg-time[data-v-f7e4b600]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-variant-numeric:tabular-nums;text-autospace:normal}.sg-cancel[data-v-f7e4b600]{position:absolute;top:var(--space-2);right:var(--space-2);color:var(--color-text-muted);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sg-card:hover .sg-cancel[data-v-f7e4b600],.sg-cancel[data-v-f7e4b600]:focus-visible{opacity:1}.sg-cancel[data-v-f7e4b600]:hover{color:var(--color-danger)}@media(hover:none){.sg-cancel[data-v-f7e4b600]{top:0;right:0;width:var(--touch-target-min);height:var(--touch-target-min);opacity:1}}.todo-card[data-v-f090f678]{display:flex;flex-direction:column;gap:var(--space-3);font-size:var(--text-base)}.tc-row[data-v-f090f678]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text)}.tc-name[data-v-f090f678]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:var(--leading-caption)}.tc-row.s-in_progress .tc-name[data-v-f090f678]{font-weight:var(--weight-medium)}.tc-row.s-pending .tc-name[data-v-f090f678]{color:var(--color-text-muted)}.tc-glyph[data-v-f090f678]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-full)}.tc-glyph.g-done[data-v-f090f678]{color:var(--color-success)}.tc-glyph.g-pending[data-v-f090f678]{border:var(--p-ring-stroke) solid var(--color-line-strong)}.tc-glyph .tc-spin[data-v-f090f678]{color:var(--color-text)}.tc-empty[data-v-f090f678]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.tc-empty-ico[data-v-f090f678]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}@media(max-width:640px){.todo-card[data-v-f090f678]{font-size:var(--text-lg)}.tc-row[data-v-f090f678]{padding:var(--space-2) var(--space-3)}}.wp-head-tab[data-v-82048a74]{display:inline-flex;align-items:center;gap:var(--space-2);padding:0;border:.5px solid transparent;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap;flex:none}.wp-head-tab[data-v-82048a74] svg{width:1.5em;height:1.5em}.wp-head-meta[data-v-82048a74]{color:var(--color-text-muted);text-autospace:normal}.wp-head-actions[data-v-82048a74]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}@media(max-width:480px){.wp-head-actions[data-v-82048a74]{flex-basis:100%;margin-left:0}}@media(hover:none){.wp-head-actions[data-v-82048a74] .ui-seg__item{min-height:var(--touch-target-min)}}@media(max-width:640px),(hover:none){.wp-head-actions[data-v-82048a74] .ui-seg__item{height:var(--touch-target-min)}.wp-head-actions[data-v-82048a74] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}.wp-head-actions[data-v-82048a74] .fc-trigger{min-height:var(--touch-target-min)}}.filter-control[data-v-153e0d9c]{display:inline-flex;min-width:0}.fc-chevron[data-v-153e0d9c]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.fc-trigger[aria-expanded=true] .fc-chevron[data-v-153e0d9c]{transform:rotate(180deg)}.fc-menu[data-v-153e0d9c]{position:fixed;z-index:var(--z-dropdown)}.fc-menu[data-v-153e0d9c] .ui-menu{min-width:0}.fc-label[data-v-153e0d9c]{flex:1;white-space:nowrap}.filter-control[data-v-153e0d9c] .ui-seg__item[data-icon=circle-check] .ui-seg__icon,.fc-menu .kw-icon[data-icon=circle-check][data-v-153e0d9c]{transform:scale(.91)}.fc-check[data-v-153e0d9c]{color:var(--color-accent)}.chat-dock[data-v-e91fb967]{--dock-inline-left: 16px;--dock-inline-right: 16px;box-sizing:border-box;width:100%;max-width:calc(var(--read-max) + var(--panes-scrollbar-width, 0px));padding-right:var(--panes-scrollbar-width, 0px);flex:none;position:absolute;inset:auto 0 0;background:transparent;z-index:var(--z-sticky)}.chat-dock.has-popup[data-v-e91fb967]{z-index:var(--z-dropdown)}.chat-dock.align-center[data-v-e91fb967]{margin-left:auto;margin-right:auto}.chat-dock.align-left[data-v-e91fb967]{margin-left:0;margin-right:auto}.chat-dock.align-mobile[data-v-e91fb967]{max-width:none}.chat-dock[data-v-e91fb967]:before{--fade: 48px;--veil: 72px;content:"";position:absolute;top:calc(-1 * var(--fade));right:0;bottom:0;left:0;z-index:0;pointer-events:none;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-bg) 0%,transparent),color-mix(in srgb,var(--color-bg) 30%,transparent) 21px,color-mix(in srgb,var(--color-bg) 70%,transparent) 45px,var(--color-bg) var(--veil))}.chat-dock[data-v-e91fb967]>*{position:relative;z-index:1}.dock-work-panel[data-v-e91fb967]{position:absolute;left:16px;right:calc(16px + var(--panes-scrollbar-width, 0px));bottom:100%;background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);margin-bottom:var(--space-2);max-height:min(360px,50vh);display:flex;flex-direction:column;overflow:hidden;user-select:none}.dock-work-panel.panel-todos .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-head[data-v-e91fb967]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-body[data-v-e91fb967]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-todos .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-plan .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-head[data-v-e91fb967]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-plan .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-tab[data-v-e91fb967]{padding:0;line-height:var(--leading-solid)}.dock-work-panel.panel-goal .gh-time[data-v-e91fb967]{color:var(--color-text-muted)}.dock-work-panel.panel-todos .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-plan .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-body[data-v-e91fb967]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-subagent[data-v-e91fb967],.dock-work-panel.panel-bash[data-v-e91fb967]{height:min(var(--p-dock-panel-h),50vh)}.dock-work-tab.tab-progress[data-v-e91fb967]{display:inline-flex;align-items:center;gap:var(--space-2)}.dock-work-head[data-v-e91fb967]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:.5px solid var(--color-line);position:relative;z-index:1}.dock-work-body[data-v-e91fb967]{padding:var(--space-2) var(--space-3);overflow-y:auto;min-height:0;display:flex;flex-direction:column}@media(max-width:480px){.dock-work-head[data-v-e91fb967]{flex-wrap:wrap}}.dock-work-panel.body-scrolled-up .dock-work-body[data-v-e91fb967]{mask-image:linear-gradient(to bottom,transparent,black var(--menu-scroll-fade))}.dock-work-body[data-v-e91fb967] .taskspane{border:none;background:transparent;padding:0}.dock-work-body[data-v-e91fb967] .taskspane .tp-head{display:none}.dock-workbar[data-v-e91fb967]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5);padding:var(--space-1) calc(var(--dock-inline-right) + var(--space-4) + var(--p-hairline)) var(--space-05) calc(var(--dock-inline-left) + var(--space-4) + var(--p-hairline))}.dock-workbar[data-v-e91fb967] .ui-pill{position:relative;gap:var(--space-1-5);height:auto;padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border:none;border-radius:var(--radius-lg);background:var(--color-selected);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);color:var(--color-text);font-size:var(--text-base);line-height:var(--leading-normal)}.dock-workbar[data-v-e91fb967] .ui-pill svg{width:1.5em;height:1.5em;color:inherit}.dock-workbar[data-v-e91fb967] .ui-pill:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.dock-workbar[data-v-e91fb967] .ui-pill:hover:not(:disabled):after,.dock-workbar[data-v-e91fb967] .ui-pill.is-active:after{opacity:1}.chat-dock.pills-compact .dock-workbar[data-v-e91fb967] .ui-pill{padding:var(--space-2)}.chat-dock.pills-compact .dock-workbar[data-v-e91fb967] .ui-pill>span{display:none}.dock-workbar .dw-count[data-v-e91fb967]{color:var(--color-text-muted)}.dock-workbar .dw-running[data-v-e91fb967]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted)}.dock-workbar .dw-goal-status[data-v-e91fb967]{font-weight:var(--weight-medium)}.dock-workbar .dw-goal-status--active[data-v-e91fb967]{color:var(--color-success)}.dock-workbar .dw-goal-status--paused[data-v-e91fb967]{color:var(--color-warning)}.dock-workbar .dw-goal-status--blocked[data-v-e91fb967]{color:var(--color-danger)}.dock-approval[data-v-e91fb967]{margin-top:8px}.chat-dock.has-approval[data-v-e91fb967]{display:flex;flex-direction:column;max-height:calc(100dvh - 72px)}.chat-dock.has-approval>.dock-workbar[data-v-e91fb967]{flex:none}.chat-dock.has-approval>.dock-approval[data-v-e91fb967]{min-height:0}@media(max-width:640px){.chat-dock[data-v-e91fb967]{--dock-inline-left: max(12px, var(--safe-left));--dock-inline-right: max(12px, var(--safe-right))}.dock-work-panel[data-v-e91fb967]{left:10px;right:calc(10px + var(--panes-scrollbar-width, 0px))}.dock-work-head-actions[data-v-e91fb967] .ui-seg__item{height:var(--touch-target-min)}.dock-work-head-actions[data-v-e91fb967] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}}.chat-dock[data-v-e91fb967]:not(.align-mobile) .composer{padding-bottom:14px}.dock-panel-enter-active[data-v-e91fb967]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.dock-panel-leave-active[data-v-e91fb967]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.dock-panel-enter-from[data-v-e91fb967],.dock-panel-leave-to[data-v-e91fb967]{opacity:0;transform:translateY(var(--motion-panel-shift)) scale(var(--motion-panel-scale))}.conversation-toc[data-v-b8ba267a]{position:absolute;z-index:var(--z-sticky);top:50%;transform:translateY(-50%);--toc-content-max: min( var(--p-content-max), calc(100cqi - var(--space-5) - var(--space-5)) );left:calc(50% + (var(--toc-content-max) / 2) + 14px);max-height:calc(100% - 160px);display:flex;flex-direction:column;justify-content:center;opacity:.5;transition:opacity var(--duration-base) var(--ease-out)}.conversation-toc[data-v-b8ba267a]:before{content:"";position:absolute;inset:0 -48px 0 -14px;z-index:0}.conversation-toc[data-v-b8ba267a]:hover,.conversation-toc[data-v-b8ba267a]:focus-within{opacity:1}.conversation-toc[data-v-b8ba267a]:hover:not(:focus-within){transition-delay:var(--duration-hover-intent)}.toc-scroll[data-v-b8ba267a]{position:relative;z-index:1;display:flex;flex-direction:column;gap:7px;padding:8px 0;min-height:0;overflow-y:auto;scrollbar-width:none}.toc-scroll[data-v-b8ba267a]::-webkit-scrollbar{display:none}.toc-row[data-v-b8ba267a]{display:flex;align-items:center;gap:10px;height:18px;padding:0;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;white-space:nowrap}.toc-row[data-v-b8ba267a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.toc-bar[data-v-b8ba267a]{flex:none;width:3px;height:14px;border-radius:var(--radius-full);background:var(--color-accent);opacity:.3;transition:opacity var(--duration-fast) var(--ease-out),height var(--duration-fast) var(--ease-out)}.toc-label[data-v-b8ba267a]{display:block;max-width:0;overflow:hidden;opacity:0;text-overflow:ellipsis;transition:max-width .22s var(--ease-out),opacity var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.conversation-toc:hover .toc-bar[data-v-b8ba267a],.conversation-toc:focus-within .toc-bar[data-v-b8ba267a]{height:18px;opacity:.5}.conversation-toc:hover .toc-label[data-v-b8ba267a],.conversation-toc:focus-within .toc-label[data-v-b8ba267a]{max-width:220px;opacity:1}.conversation-toc:hover:not(:focus-within) .toc-bar[data-v-b8ba267a]{transition-delay:0ms,var(--duration-hover-intent)}.conversation-toc:hover:not(:focus-within) .toc-label[data-v-b8ba267a]{transition-delay:var(--duration-hover-intent),var(--duration-hover-intent),0ms}.toc-row.active .toc-bar[data-v-b8ba267a]{opacity:1;height:18px}.toc-row.active .toc-label[data-v-b8ba267a]{color:var(--color-accent);font-weight:var(--weight-medium)}.toc-row:hover .toc-bar[data-v-b8ba267a]{opacity:1}.toc-row:hover .toc-label[data-v-b8ba267a]{color:var(--color-text)}.conversation-toc.toc-clipped[data-v-b8ba267a]{visibility:hidden;pointer-events:none}.tsearch[data-v-26f3fed5]{position:absolute;top:calc(var(--panel-head-h, 48px) + var(--space-3));right:var(--space-3);z-index:var(--z-sticky);width:min(var(--p-findbar-w),calc(100% - var(--space-3) * 2));background:var(--color-surface-raised);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);animation:kimi-card-in var(--duration-slow) var(--ease-out)}.tsearch.mobile[data-v-26f3fed5]{top:var(--space-3)}.tsearch[data-v-26f3fed5]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-2xl);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.tsearch[data-v-26f3fed5]:focus-within:after{opacity:1}.tsearch-main[data-v-26f3fed5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) var(--space-2);min-height:calc(var(--space-8) + 2 * var(--space-1))}.tsearch-icon[data-v-26f3fed5]{flex:none;margin-left:var(--space-1);color:var(--color-text-muted)}.tsearch-input[data-v-26f3fed5]{flex:1;min-width:0;height:var(--space-8);padding:0;border:none;background:transparent;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text)}.tsearch-input[data-v-26f3fed5]:focus-visible{outline:none}.tsearch-input[data-v-26f3fed5]::placeholder{color:var(--color-text-muted)}.tsearch-spin[data-v-26f3fed5]{display:inline-flex;flex:none}.tsearch-sep[data-v-26f3fed5]{flex:none;width:var(--p-hairline);height:var(--space-4);background:var(--color-line)}.tsearch .tsearch-close[data-v-26f3fed5]{border-radius:var(--radius-full)}.tsearch-foot-wrap[data-v-26f3fed5]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.tsearch-foot-wrap.open[data-v-26f3fed5]{grid-template-rows:1fr}.tsearch-foot[data-v-26f3fed5]{overflow:hidden;min-height:0;display:flex;align-items:center;gap:var(--space-1);padding:0 var(--space-2)}.tsearch-foot-wrap.open .tsearch-foot[data-v-26f3fed5]{padding:var(--space-1) var(--space-2);border-top:var(--p-hairline) solid var(--color-line)}.tsearch-count[data-v-26f3fed5]{margin-left:auto;padding-right:var(--space-1);font-size:var(--ui-font-size-sm);color:var(--color-text-muted);white-space:nowrap;user-select:none}.tsearch-rings[data-v-26f3fed5]{position:absolute;inset:0;pointer-events:none}.tsearch-ring[data-v-26f3fed5]{position:absolute;box-sizing:content-box;border:var(--p-findring-w) solid var(--color-warning);margin:calc(-1 * var(--p-findring-w));border-radius:var(--radius-xs);pointer-events:none}.doodle-host[data-v-694a2ad0]{position:relative;width:100%;aspect-ratio:338 / 152;display:flex;align-items:center;justify-content:center}.doodle-canvas[data-v-694a2ad0]{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .25s ease}.doodle-canvas.ready[data-v-694a2ad0]{opacity:1}@media(prefers-reduced-motion:reduce){.doodle-canvas[data-v-694a2ad0]{transition:none}}.con[data-v-8c7ebe8d]{--read-max: 760px;display:flex;flex-direction:column;min-width:0;height:100%;position:relative;container-type:inline-size}.empty-drag[data-v-8c7ebe8d]{position:absolute;top:0;left:0;right:0;height:var(--panel-head-h, 48px)}.empty-drag.macos-desktop[data-v-8c7ebe8d]{-webkit-app-region:drag}.panes[data-v-8c7ebe8d]{flex:1;min-height:0;overflow-y:auto;overflow-anchor:auto;scrollbar-gutter:stable}.panes[data-v-8c7ebe8d]::-webkit-scrollbar{width:4px}.panes[data-v-8c7ebe8d]::-webkit-scrollbar-thumb{background:transparent;transition:background var(--duration-base) var(--ease-out)}.panes.scrolling[data-v-8c7ebe8d]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.panes.scrolling[data-v-8c7ebe8d]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.panes.session-settling .chat[data-v-8c7ebe8d]>*:not(.chat-loading){visibility:hidden}.panes.is-following[data-v-8c7ebe8d],.panes.history-prepending[data-v-8c7ebe8d],.panes.is-pinned[data-v-8c7ebe8d]{overflow-anchor:none}.chat-layout[data-v-8c7ebe8d]{display:flex;flex-direction:column;height:100%;min-height:0;position:relative}.chat-scroll[data-v-8c7ebe8d]{flex:1;min-height:0;position:relative}.content-wrap[data-v-8c7ebe8d]{width:100%;max-width:var(--read-max);min-height:100%;box-sizing:border-box;padding-bottom:var(--chat-dock-height, 0px);display:flex;flex-direction:column;flex-shrink:0}.content-wrap.align-center[data-v-8c7ebe8d]{margin-left:auto;margin-right:auto}.content-wrap.align-left[data-v-8c7ebe8d]{margin-left:0;margin-right:auto}.content-wrap.align-mobile[data-v-8c7ebe8d]{max-width:none}@media(max-width:640px){.con.mobile[data-v-8c7ebe8d]{min-width:0;overflow:hidden}.con.mobile .panes[data-v-8c7ebe8d]{scrollbar-gutter:auto;-webkit-overflow-scrolling:touch}.content-wrap.align-mobile[data-v-8c7ebe8d]{width:100%;min-width:0}}.empty-spacer[data-v-8c7ebe8d]{flex:1}.empty-hint[data-v-8c7ebe8d]{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:0 16px 16px;color:var(--color-text);font-family:var(--font-ui);user-select:none}.empty-hint-title[data-v-8c7ebe8d]{font-size:calc(var(--ui-font-size) + 16px);font-optical-sizing:auto;font-weight:600}.empty-hint-title.is-starting[data-v-8c7ebe8d]{display:inline-flex;align-items:center;gap:9px;color:var(--dim);font-weight:400}.empty-doodle[data-v-8c7ebe8d]{width:min(340px,62vw)}.empty-hint-text[data-v-8c7ebe8d]{display:inline-block;font-size:var(--text-base);color:var(--dim);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upgrade-banner[data-v-8c7ebe8d]{flex:none;display:flex;align-items:center;gap:var(--space-3);margin:0 var(--dock-inline-right, 16px) var(--space-2) var(--dock-inline-left, 16px);padding:var(--space-2) var(--space-3);border:.5px solid var(--color-accent-bd);border-radius:var(--radius-xl);background:var(--color-accent-soft)}.upgrade-banner-icon[data-v-8c7ebe8d]{flex:none;color:var(--color-accent)}.upgrade-banner-text[data-v-8c7ebe8d]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text)}.upgrade-banner-cta[data-v-8c7ebe8d]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-accent);cursor:pointer}.upgrade-banner-cta[data-v-8c7ebe8d]:hover{color:var(--color-accent-hover)}.empty-composer[data-v-8c7ebe8d] .composer-card{position:relative;z-index:var(--z-sticky)}.empty-composer[data-v-8c7ebe8d]:not(.expanded) .ph{min-height:3lh}.ws-bar[data-v-8c7ebe8d]{margin-top:calc(-1 * var(--space-4));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(--font-ui)}.ws-anchor[data-v-8c7ebe8d]{position:relative}.ws-chip[data-v-8c7ebe8d]{display:inline-flex;align-items:center;gap:var(--space-2);max-width:100%;padding:var(--space-2) var(--space-3);background:none;border:none;border-radius:var(--radius-full);color:var(--color-text-muted);font-family:inherit;font-size:var(--ui-font-size-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ws-chip[data-v-8c7ebe8d]:hover,.ws-chip.open[data-v-8c7ebe8d]{background:var(--color-selected);color:var(--color-text)}.ws-chip[data-v-8c7ebe8d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ws-chip>.kw-icon[data-v-8c7ebe8d]{flex:none}.ws-chip-name[data-v-8c7ebe8d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-option-label)}.ws-chip-chev[data-v-8c7ebe8d]{flex:none;transition:transform var(--duration-base) var(--ease-out)}.ws-chip.open .ws-chip-chev[data-v-8c7ebe8d]{transform:rotate(180deg)}.ws-chip.ws-ghost[data-v-8c7ebe8d]{color:var(--color-text-muted)}.ws-chip.ws-ghost[data-v-8c7ebe8d]:hover{color:var(--color-text)}.ws-backdrop[data-v-8c7ebe8d]{position:fixed;inset:0;z-index:var(--z-sticky)}.ws-panel[data-v-8c7ebe8d]{position:absolute;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);left:0;top:calc(100% + var(--space-1));z-index:var(--z-dropdown);width:max-content;min-width:min(calc(var(--space-8) * 8),100%);max-width:100%;max-height:calc(var(--space-8) * 10);overflow:hidden auto;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);padding:var(--space-1);animation:ws-pop-8c7ebe8d var(--duration-base) var(--ease-out)}.ws-panel.up[data-v-8c7ebe8d]{top:auto;bottom:calc(100% + var(--space-1));animation-name:ws-pop-up-8c7ebe8d}@keyframes ws-pop-8c7ebe8d{0%{opacity:0;transform:translateY(calc(-1 * var(--space-1))) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes ws-pop-up-8c7ebe8d{0%{opacity:0;transform:translateY(var(--space-1)) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.ws-caption[data-v-8c7ebe8d]{padding:var(--space-1) var(--space-2);font-size:var(--text-xs);font-weight:var(--weight-medium);color:var(--color-text-faint);user-select:none}.ws-row[data-v-8c7ebe8d]{display:flex;align-items:center;gap:var(--space-2);width:100%;text-align:left;background:none;border:none;border-radius:var(--radius-sm);padding:var(--space-1) var(--space-2);cursor:pointer;font-family:var(--font-ui)}.ws-row>.kw-icon[data-v-8c7ebe8d]{flex:none;color:var(--muted)}.ws-row[data-v-8c7ebe8d]:hover{background:var(--color-hover)}.ws-row.on[data-v-8c7ebe8d]{background:var(--color-selected)}.ws-row[data-v-8c7ebe8d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ws-info[data-v-8c7ebe8d]{flex:1;min-width:0;display:flex;flex-direction:column}.ws-name[data-v-8c7ebe8d]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-option-label);color:var(--color-text);line-height:var(--leading-normal)}.ws-path[data-v-8c7ebe8d]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs);font-weight:var(--weight-option-label);color:var(--muted);line-height:var(--leading-normal)}.ws-check[data-v-8c7ebe8d]{flex:none;margin-left:var(--space-3);color:var(--color-text)}.ws-divider[data-v-8c7ebe8d]{height:1px;margin:var(--space-1) var(--space-2);background:var(--line)}.ws-action[data-v-8c7ebe8d]{display:flex;align-items:center;gap:var(--space-2);width:100%;text-align:left;background:none;border:none;border-radius:var(--radius-sm);padding:var(--space-2);cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-action>.kw-icon[data-v-8c7ebe8d]{flex:none;color:var(--muted)}.ws-action span[data-v-8c7ebe8d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-action[data-v-8c7ebe8d]:hover{background:var(--color-hover);color:var(--color-text)}.ws-action:hover>.kw-icon[data-v-8c7ebe8d]{color:var(--dim)}.ws-action[data-v-8c7ebe8d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.chat-scroll[data-v-8c7ebe8d]{display:flex;flex-direction:column}.mobile .panes[data-v-8c7ebe8d]:has(>.chat-layout){overflow:hidden;scrollbar-gutter:auto}.newmsg-pill[data-v-8c7ebe8d]{position:absolute;left:50%;bottom:12px;transform:translate(-50%);display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:.5px solid var(--line);background:var(--panel);color:var(--color-text);font-size:var(--text-xs);font-weight:var(--weight-ui-strong);cursor:pointer;box-shadow:var(--shadow-sm);z-index:var(--z-sticky)}.pill-chevron[data-v-8c7ebe8d]{width:12px;height:12px}.pill-enter-active[data-v-8c7ebe8d],.pill-leave-active[data-v-8c7ebe8d]{transition:opacity .2s ease,transform .2s ease}.pill-enter-from[data-v-8c7ebe8d],.pill-leave-to[data-v-8c7ebe8d]{opacity:0;transform:translate(-50%) translateY(8px)}.undo-toast[data-v-8c7ebe8d]{position:absolute;left:50%;top:60px;transform:translate(-50%);padding:8px 14px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--bg);font-size:var(--ui-font-size-sm);z-index:var(--z-sticky);box-shadow:var(--shadow-sm)}.undo-toast-text[data-v-8c7ebe8d]{display:flex;align-items:center;gap:8px}.undo-toast-enter-active[data-v-8c7ebe8d],.undo-toast-leave-active[data-v-8c7ebe8d]{transition:opacity .15s ease,transform .15s ease}.undo-toast-enter-from[data-v-8c7ebe8d],.undo-toast-leave-to[data-v-8c7ebe8d]{opacity:0;transform:translate(-50%) translateY(-6px)}.con[data-v-8c7ebe8d]{background:var(--bg)}.newmsg-pill[data-v-8c7ebe8d]{font-family:var(--sans)}.file-preview[data-v-4c55a361]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono);min-width:0;container-type:inline-size}.fp-empty[data-v-4c55a361],.fp-loading[data-v-4c55a361]{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted);font-size:var(--ui-font-size)}.fp-path[data-v-4c55a361]{flex:1 1 60px;min-width:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left;font-size:var(--ui-font-size-xs);color:var(--muted);font-weight:400}.fp-meta[data-v-4c55a361]{display:flex;align-items:center;gap:8px;flex:none}@container (max-width: 539px){.fp-meta[data-v-4c55a361]{display:none}}.fp-lines[data-v-4c55a361],.fp-size[data-v-4c55a361]{font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--muted);white-space:nowrap}.fp-search[data-v-4c55a361]{display:flex;align-items:center;gap:4px;flex:1 1 110px;min-width:70px;max-width:200px}.fp-search-input[data-v-4c55a361]{flex:1;min-width:0;height:26px;border:.5px solid var(--color-line);border-radius:var(--radius-sm);padding:2px 7px;background:var(--color-surface-raised);color:var(--color-text);font:var(--text-xs) var(--font-mono)}.fp-search-count[data-v-4c55a361]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px));min-width:18px;text-align:right}.fp-download[data-v-4c55a361]{display:inline-grid;place-items:center;width:26px;height:26px;flex:none;border-radius:var(--radius-sm);color:var(--color-text-muted)}.fp-download[data-v-4c55a361]:hover{background:var(--color-hover);color:var(--color-text)}.fp-download[data-v-4c55a361]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.fp-download svg[data-v-4c55a361]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.fp-check[data-v-4c55a361]{color:var(--color-success)}.fp-body[data-v-4c55a361]{--fp-search-hit-bg: color-mix(in srgb, var(--star) 22%, var(--bg));--fp-search-active-bg: color-mix(in srgb, var(--star) 36%, var(--bg));flex:1;min-height:0;overflow:auto}.fp-markdown[data-v-4c55a361]{padding:16px 20px}.fp-code[data-v-4c55a361]{background:var(--bg)}.fp-code[data-v-4c55a361] .hl-row.hit,.fp-table tr.hit td[data-v-4c55a361]{background:var(--fp-search-hit-bg)}.fp-code[data-v-4c55a361] .hl-row.active,.fp-table tr.active td[data-v-4c55a361]{background:var(--fp-search-active-bg)}.fp-code[data-v-4c55a361] .hl-row.target,.fp-table tr.target th[data-v-4c55a361],.fp-table tr.target td[data-v-4c55a361]{background:var(--color-accent-soft)}.fp-html-frame[data-v-4c55a361],.fp-pdf-frame[data-v-4c55a361]{width:100%;height:100%;border:0;background:var(--color-surface-raised)}.fp-pdf-wrap[data-v-4c55a361]{background:var(--panel2)}.fp-table-wrap[data-v-4c55a361]{background:var(--bg)}.fp-table[data-v-4c55a361]{border-collapse:collapse;min-width:100%;font:var(--code-font-size)/var(--leading-normal) var(--mono)}.fp-table th[data-v-4c55a361]{position:sticky;left:0;z-index:1;width:44px;min-width:44px;padding:2px 8px;text-align:right;color:var(--faint);background:var(--panel);border-right:.5px solid var(--line2);user-select:none}.fp-table td[data-v-4c55a361]{padding:2px 10px;border-right:.5px solid var(--line2);border-bottom:.5px solid var(--line2);white-space:pre}.fp-image-wrap[data-v-4c55a361]{display:flex;align-items:center;justify-content:center;padding:24px;background:var(--panel2)}.fp-image[data-v-4c55a361]{max-width:100%;max-height:100%;object-fit:contain;border:.5px solid var(--line);border-radius:4px;background:var(--media-alpha-canvas)}.fp-image.actual[data-v-4c55a361]{max-width:none;max-height:none}.fp-binary-wrap[data-v-4c55a361]{display:flex;align-items:center;justify-content:center}.fp-binary-card[data-v-4c55a361]{display:flex;align-items:center;gap:12px;padding:20px 24px;border:.5px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font-size:var(--ui-font-size);margin:32px auto;max-width:480px}.fp-binary-icon[data-v-4c55a361]{color:var(--faint);flex:none}.fp-error[data-v-4c55a361]{flex-direction:column;padding:24px;text-align:center}@keyframes spin-4c55a361{to{transform:rotate(360deg)}}.spinner[data-v-4c55a361]{display:inline-block;width:14px;height:14px;border:.5px solid var(--line);border-top-color:var(--color-accent);border-radius:50%;animation:spin-4c55a361 .7s linear infinite}@media(max-width:640px){.fp-lines[data-v-4c55a361]{display:none}.fp-markdown[data-v-4c55a361]{padding:14px 16px}.fp-body.fp-code[data-v-4c55a361]{-webkit-overflow-scrolling:touch}}.fp-empty[data-v-4c55a361],.fp-loading[data-v-4c55a361]{font-family:var(--sans)}.fp-binary-card[data-v-4c55a361]{border:.5px solid var(--color-line);border-radius:var(--radius-md)}.fp-binary-label[data-v-4c55a361]{font-family:var(--sans)}.fp-image[data-v-4c55a361]{border-radius:var(--radius-md)}.seg-btn[data-v-4c55a361]{font-family:var(--sans)}.tp[data-v-afb1f46f]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--color-bg)}.tp-body[data-v-afb1f46f]{flex:1;min-height:0;overflow-y:auto;margin:0;padding:12px 14px;font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:400;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word}.agent-panel[data-v-84a2873f]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-bg)}.agent-transcript[data-v-84a2873f]{flex:1;min-height:0;overflow-y:auto}.agent-transcript[data-v-84a2873f] .think-body,.agent-transcript[data-v-84a2873f] .ar-body,.agent-transcript[data-v-84a2873f] .tf-body,.agent-transcript[data-v-84a2873f] .bb,.agent-transcript[data-v-84a2873f] .tl-body{transition:none}.agent-error[data-v-84a2873f]{color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.agent-fallback[data-v-84a2873f]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4)}.sc[data-v-bb28a4e0]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.sc-body[data-v-bb28a4e0]{flex:1;min-height:0;overflow-y:auto}.sc-empty[data-v-bb28a4e0]{padding:24px 16px;text-align:center;color:var(--muted);font-size:var(--ui-font-size)}.sc-composer[data-v-bb28a4e0]{flex:none;display:flex;align-items:flex-end;gap:6px;padding:8px 10px;border-top:.5px solid var(--color-line);background:var(--color-surface-raised)}.sc-input[data-v-bb28a4e0]{flex:1;min-width:0;resize:none;border:.5px solid var(--color-line);border-radius:var(--r-sm);padding:7px 9px;background:var(--bg);color:var(--color-text);font:var(--ui-font-size)/1.5 var(--sans);outline:none;max-height:160px}.sc-input[data-v-bb28a4e0]:focus{border-color:var(--color-accent-bd)}.sc-send[data-v-bb28a4e0]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:var(--r-sm);background:var(--color-accent);color:var(--color-text-on-accent);cursor:pointer}.sc-send[data-v-bb28a4e0]:disabled{opacity:.4;cursor:default}.sc-send[data-v-bb28a4e0]:not(:disabled):hover{background:var(--color-accent-hover)}.sc-loading[data-v-bb28a4e0]{flex:none;padding:8px 12px 12px}.sc-body[data-v-bb28a4e0] .sending-placeholder,.sc-body[data-v-bb28a4e0] .sending-line{display:none}.changes-pane[data-v-7d5ab9c7]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono)}.dv-path[data-v-7d5ab9c7],.dv-change-count[data-v-7d5ab9c7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:var(--muted)}.dv-change-count[data-v-7d5ab9c7]{flex:1;align-self:stretch;display:inline-flex;align-items:center;font-family:var(--font-ui)}.dv-path[data-v-7d5ab9c7]{font-family:var(--font-ui)}.ch-head[data-v-7d5ab9c7]{display:flex;align-items:center;gap:8px;padding:8px var(--space-3);border-bottom:.5px solid var(--line);background:var(--panel);font-size:var(--text-base);color:var(--dim);flex:none;white-space:nowrap;overflow:hidden;font-family:var(--font-ui);user-select:none}.br-heading[data-v-7d5ab9c7]{display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.br-icon[data-v-7d5ab9c7]{flex:none;color:var(--muted)}.br-label[data-v-7d5ab9c7]{color:var(--muted);font-size:var(--text-xs);font-weight:500}.br-name[data-v-7d5ab9c7]{color:var(--color-text);font-weight:500;font-size:var(--text-xs)}.sync-info[data-v-7d5ab9c7]{display:flex;align-items:center;gap:4px}.ahead[data-v-7d5ab9c7]{color:var(--color-accent);font-size:var(--text-xs)}.behind[data-v-7d5ab9c7]{color:var(--color-warning);font-size:var(--text-xs)}.empty-head[data-v-7d5ab9c7]{color:var(--muted);font-size:var(--text-base)}.ch-list[data-v-7d5ab9c7]{flex:1;min-height:0}.ch-list-content[data-v-7d5ab9c7]{min-height:100%;padding:4px 0}.ch-row[data-v-7d5ab9c7]{display:flex;align-items:center;gap:6px;padding:3px 8px;cursor:pointer;font-size:var(--text-xs);line-height:1.6;width:100%;background:none;border:none;text-align:left;font-family:var(--font-ui);color:inherit}.ch-row[data-v-7d5ab9c7]:hover{background:var(--panel2)}.ch-row[data-v-7d5ab9c7]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ch-tree[data-v-7d5ab9c7]{--tree-base-indent: 14px;--tree-indent-step: 12px;font-family:var(--font-ui)}.tree-list[data-v-7d5ab9c7]{list-style:none;margin:0}.tree-node[data-v-7d5ab9c7]{overflow:hidden;interpolate-size:allow-keywords}.tree-collapse-enter-active[data-v-7d5ab9c7],.tree-collapse-leave-active[data-v-7d5ab9c7]{transition:block-size var(--duration-base) var(--ease-out),opacity var(--duration-fast) var(--ease-out),transform var(--duration-base) var(--ease-out)}.tree-collapse-enter-from[data-v-7d5ab9c7],.tree-collapse-leave-to[data-v-7d5ab9c7]{block-size:0;opacity:0;transform:translateY(-3px)}.tree-collapse-enter-to[data-v-7d5ab9c7],.tree-collapse-leave-from[data-v-7d5ab9c7]{block-size:auto;opacity:1;transform:translateY(0)}.tree-row[data-v-7d5ab9c7]{position:relative;display:flex;align-items:center;gap:6px;width:100%;margin-top:1px;padding:3px 8px;background:none;border:none;text-align:left;font-family:inherit;font-size:var(--text-xs);color:inherit;cursor:pointer}.tree-row[data-v-7d5ab9c7]:before{content:"";position:absolute;top:0;bottom:0;left:calc(var(--tree-base-indent) + 6px);width:calc(var(--tree-depth, 0) * var(--tree-indent-step));background:repeating-linear-gradient(to right,var(--color-line) 0 1px,transparent 1px var(--tree-indent-step));pointer-events:none}.tree-row[data-v-7d5ab9c7]:hover{background:var(--panel2)}.tree-row[data-v-7d5ab9c7]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.tree-folder[data-v-7d5ab9c7]{color:var(--color-text);font-weight:500}.tree-file[data-v-7d5ab9c7]{color:var(--color-text);font-weight:450}.tree-icon[data-v-7d5ab9c7]{flex:none;color:var(--muted)}.tree-name[data-v-7d5ab9c7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge[data-v-7d5ab9c7]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:var(--radius-xs);font-size:max(9px,calc(var(--ui-font-size) - 4px));font-weight:500;flex:none;user-select:none}.badge.modified[data-v-7d5ab9c7]{background:var(--color-warning-soft);color:var(--color-warning)}.badge.added[data-v-7d5ab9c7]{background:var(--color-success-soft);color:var(--color-success)}.badge.deleted[data-v-7d5ab9c7]{background:var(--color-danger-soft);color:var(--color-danger)}.badge.renamed[data-v-7d5ab9c7]{background:var(--color-done-soft);color:var(--color-done)}.badge.untracked[data-v-7d5ab9c7]{background:var(--color-success-soft);color:var(--color-success)}.badge.conflicted[data-v-7d5ab9c7]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger);font-size:max(9px,calc(var(--ui-font-size) - 5px))}.badge.ignored[data-v-7d5ab9c7]{background:var(--color-well);color:var(--faint)}.badge.clean[data-v-7d5ab9c7]{background:transparent;color:var(--faint)}.badge.unknown[data-v-7d5ab9c7]{background:var(--color-well);color:var(--muted)}.fpath[data-v-7d5ab9c7]{color:var(--color-text);font-size:var(--text-xs);font-weight:450;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:left;min-width:0}.fpath[data-v-7d5ab9c7]:before,.fpath[data-v-7d5ab9c7]:after{content:"‎"}.empty-state[data-v-7d5ab9c7]{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:32px 20px;color:var(--muted);font-size:var(--ui-font-size);text-align:center;user-select:none}.empty-state-icon[data-v-7d5ab9c7]{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--color-well);color:var(--color-text-muted)}.diff-head[data-v-7d5ab9c7]{display:flex;align-items:center;gap:10px;padding:6px 12px;border-bottom:.5px solid var(--line);background:var(--panel);flex:none;white-space:nowrap;overflow:hidden}.dv-lines-wrap[data-v-7d5ab9c7]{flex:1;min-height:0;overflow:auto}.diff-content-enter-active[data-v-7d5ab9c7],.diff-content-leave-active[data-v-7d5ab9c7]{transition:opacity var(--duration-base) var(--ease-out)}.diff-content-enter-from[data-v-7d5ab9c7],.diff-content-leave-to[data-v-7d5ab9c7]{opacity:0}@media(max-width:640px){.ch-head[data-v-7d5ab9c7]{padding:10px 14px}.ch-list[data-v-7d5ab9c7]{padding:2px 0 12px}.ch-row[data-v-7d5ab9c7]{min-height:44px;padding:8px 14px;gap:12px;font-size:var(--text-xs)}.ch-row[data-v-7d5ab9c7]:active{background:var(--panel2)}.badge[data-v-7d5ab9c7]{width:18px;height:18px}.fpath[data-v-7d5ab9c7]{font-size:var(--text-xs)}.tree-row[data-v-7d5ab9c7]{min-height:40px;padding:8px 14px}.diff-head[data-v-7d5ab9c7]{padding:8px 12px;gap:10px}.diff-path[data-v-7d5ab9c7]{font-size:var(--text-base)}}.changes-pane .empty-state[data-v-7d5ab9c7],.br-label[data-v-7d5ab9c7],.empty-head[data-v-7d5ab9c7]{font-family:var(--sans)}.ch-row[data-v-7d5ab9c7],.ct-row[data-v-7d5ab9c7]{margin:1px 6px;width:calc(100% - 12px);border-radius:var(--radius-md)}.changes-pane .badge[data-v-7d5ab9c7],.changed-tree .badge[data-v-7d5ab9c7]{border-radius:var(--radius-sm)}.change-count[data-v-7d5ab9c7]{font-family:var(--sans);border-radius:999px}.td[data-v-fdd0bc05]{display:flex;flex-direction:column;height:100%;min-height:0}.td-path[data-v-fdd0bc05]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--ui-c1) var(--font-mono);color:var(--color-text-muted)}.td-body[data-v-fdd0bc05]{flex:1;min-height:0;overflow:auto}.td-empty[data-v-fdd0bc05]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);height:100%;padding:var(--space-6);color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.mp[data-v-3ba22330]{display:flex;flex-direction:column;gap:var(--space-2);height:100%;min-height:0;padding-top:4px}.search-wrap[data-v-3ba22330]{position:relative;margin:0 22px;padding-bottom:var(--space-1)}.search-wrap[data-v-3ba22330] .ui-input{padding-right:30px}.search-clear[data-v-3ba22330]{position:absolute;top:0;bottom:var(--space-1);right:var(--space-2);margin-block:auto;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-hover);color:var(--color-text-faint);cursor:pointer;visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast),background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.search-clear.is-on[data-v-3ba22330]{visibility:visible;opacity:1}.search-clear[data-v-3ba22330]:hover{background:var(--color-selected);color:var(--color-text-muted)}.search-clear[data-v-3ba22330]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.chip-strip[data-v-3ba22330]{display:flex;gap:var(--space-1);margin:0 22px;overflow-x:auto;scrollbar-width:none}.chip-strip[data-v-3ba22330]::-webkit-scrollbar{display:none}.chip[data-v-3ba22330]{flex:none;height:28px;padding:0 var(--space-3);border:none;border-radius:var(--radius-full);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base);white-space:nowrap;cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.chip[data-v-3ba22330]:hover{background:var(--color-hover);color:var(--color-text)}.chip.is-active[data-v-3ba22330]{background:var(--color-selected);color:var(--color-text);font-weight:var(--weight-medium)}.chip[data-v-3ba22330]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-list[data-v-3ba22330]{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;padding:var(--space-1) var(--space-2)}.model-row[data-v-3ba22330]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);cursor:pointer;color:var(--color-text);min-width:0;transition:background var(--duration-fast) var(--ease-out)}.model-row[data-v-3ba22330]:hover,.model-row.is-selected[data-v-3ba22330]{background:var(--color-hover)}.model-row.is-current[data-v-3ba22330]{background:var(--color-selected)}.model-main[data-v-3ba22330]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.model-name[data-v-3ba22330]{font-family:var(--font-ui);font-size:var(--text-base);line-height:20px;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-row.is-current .model-name[data-v-3ba22330]{font-weight:var(--weight-medium)}.model-meta[data-v-3ba22330]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:18px;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-side[data-v-3ba22330]{display:flex;align-items:center;gap:var(--space-1);flex:none}.model-check[data-v-3ba22330]{color:var(--color-text)}.model-star[data-v-3ba22330]{color:var(--color-text-faint);visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast)}.model-row:hover .model-star[data-v-3ba22330],.model-row.is-selected .model-star[data-v-3ba22330],.model-star.is-starred[data-v-3ba22330],.model-star[data-v-3ba22330]:focus-visible{visibility:visible;opacity:1}.model-star.is-starred[data-v-3ba22330]{color:var(--star)}@media(hover:none){.model-star[data-v-3ba22330]{visibility:visible;opacity:1}}.state-row[data-v-3ba22330]{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:var(--space-2);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.state-row.unavail[data-v-3ba22330]{color:var(--color-warning)}.empty[data-v-3ba22330]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.footer-hint[data-v-3ba22330]{flex:none;display:flex;align-items:center;gap:var(--space-1);padding:var(--space-2) var(--space-4);border-top:.5px solid var(--color-line);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.hint-dot[data-v-3ba22330]{margin:0 var(--space-1)}@media(prefers-reduced-motion:reduce){.chip[data-v-3ba22330],.model-row[data-v-3ba22330],.model-star[data-v-3ba22330],.search-clear[data-v-3ba22330]{transition:none}}.center-body[data-v-0b06fca3]{display:flex;flex-direction:column;align-items:center;gap:var(--space-3);padding:var(--space-8) 0 var(--space-4);text-align:center}.center-text[data-v-0b06fca3]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.success-text[data-v-0b06fca3]{color:var(--color-success)}.err-text[data-v-0b06fca3]{color:var(--color-danger)}.warn-text[data-v-0b06fca3]{color:var(--color-warning);font-size:var(--text-base)}.center-hint[data-v-0b06fca3]{font-size:var(--text-sm);color:var(--color-text-muted)}.nb[data-v-0b06fca3]{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-2) 0 var(--space-4)}.nb-lead[data-v-0b06fca3]{font-size:var(--text-base);color:var(--color-text);line-height:var(--leading-normal)}.nb-primary[data-v-0b06fca3]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);width:100%;min-height:40px;padding:0 var(--space-4);background:var(--color-accent);color:var(--color-text-on-accent);border:.5px solid var(--color-accent);border-radius:var(--radius-md);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);cursor:pointer;text-decoration:none;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out)}.nb-primary[data-v-0b06fca3]:hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.nb-or[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-3);color:var(--color-text-muted);font-size:var(--text-xs);letter-spacing:.06em}.nb-or[data-v-0b06fca3]:before,.nb-or[data-v-0b06fca3]:after{content:"";flex:1;height:1px;background:var(--color-line)}.nb-fallback[data-v-0b06fca3]{display:flex;flex-direction:column;gap:var(--space-2)}.nb-fb-text[data-v-0b06fca3]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.nb-fb-link[data-v-0b06fca3]{color:var(--color-accent);text-decoration:none;border-bottom:.5px solid var(--color-accent-bd)}.nb-fb-link[data-v-0b06fca3]:hover{border-bottom-color:var(--color-accent)}.nb-code-row[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-3);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3)}.nb-code[data-v-0b06fca3]{flex:1;font-family:var(--font-mono);font-size:var(--text-xl);font-weight:var(--weight-medium);color:var(--color-text);letter-spacing:.14em}.nb-link[data-v-0b06fca3]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text}.nb-copy.is-copied[data-v-0b06fca3]{color:var(--color-success);border-color:var(--color-success-bd)}.nb-status[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.nb-status-text[data-v-0b06fca3]{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--color-text-muted);flex:1}.nb-countdown[data-v-0b06fca3]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);font-variant-numeric:tabular-nums}.actions[data-v-0b06fca3]{display:flex;justify-content:flex-end;gap:var(--space-3);padding-top:var(--space-4)}@media(max-width:640px){.center-body[data-v-0b06fca3],.nb[data-v-0b06fca3]{overflow-y:auto;-webkit-overflow-scrolling:touch}.nb-code-row[data-v-0b06fca3],.nb-status[data-v-0b06fca3],.actions[data-v-0b06fca3]{flex-wrap:wrap}.nb-code[data-v-0b06fca3]{min-width:0;overflow-wrap:anywhere;letter-spacing:.08em}.nb-copy[data-v-0b06fca3]{min-height:34px}.nb-primary[data-v-0b06fca3]{min-height:44px}.nb-status-text[data-v-0b06fca3]{min-width:0}}.pf-form[data-v-ac0597e3]{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-4) var(--space-4) var(--space-5);border-top:.5px solid var(--color-line)}.pf-guard[data-v-ac0597e3] .ui-banner__text{display:flex;align-items:center;gap:var(--space-2);width:100%}.pf-guard .msg[data-v-ac0597e3]{flex:1}.pf-field[data-v-ac0597e3]{display:flex;flex-direction:column;gap:6px}.pf-key-wrap[data-v-ac0597e3]{position:relative}.pf-key-wrap[data-v-ac0597e3] .ui-input{padding-right:calc(var(--icon-button-sm) + var(--space-2))}.pf-key-eye[data-v-ac0597e3]{position:absolute;right:var(--space-1);top:50%;transform:translateY(-50%)}.pf-field-label[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.req[data-v-ac0597e3]{color:var(--color-danger)}.pf-models[data-v-ac0597e3]{display:flex;flex-direction:column;gap:var(--space-2)}.pf-model-grid[data-v-ac0597e3]{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,2fr) auto;gap:var(--space-2);align-items:center}.pf-model-head span[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.pf-models-empty[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.pf-foot[data-v-ac0597e3]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-4);border-top:.5px solid var(--color-line)}.pf-foot .spacer[data-v-ac0597e3]{flex:1}.pf-confirm-msg[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-danger)}.pf-managed-note[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}@media(max-width:640px){.pf-model-grid[data-v-ac0597e3]{grid-template-columns:minmax(0,1fr) auto}}.af[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4) var(--space-4) var(--space-5);border-top:.5px solid var(--color-line)}.af-guard[data-v-9e5ec0a8] .ui-banner__text{display:flex;align-items:center;gap:var(--space-2);width:100%}.af-guard .msg[data-v-9e5ec0a8]{flex:1}.af-catalog[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:var(--space-3)}.af-center[data-v-9e5ec0a8]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-4) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.af-error[data-v-9e5ec0a8]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-2)}.af-list[data-v-9e5ec0a8]{display:flex;flex-direction:column;max-height:320px;overflow-y:auto;border:.5px solid var(--color-line);border-radius:var(--radius-md)}.af-list[data-v-9e5ec0a8]>*+*{border-top:.5px solid var(--color-line)}.af-entry[data-v-9e5ec0a8]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:34px;padding:var(--space-1) var(--space-3);border:none;background:transparent;text-align:left;font-family:var(--font-ui);color:var(--color-text);cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.af-entry[data-v-9e5ec0a8]:hover:not(:disabled){background:var(--color-hover)}.af-entry[data-v-9e5ec0a8]:disabled{cursor:not-allowed;opacity:.55}.af-entry-name[data-v-9e5ec0a8]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-medium)}.af-entry .grow[data-v-9e5ec0a8]{flex:1;min-width:0}.af-entry-count[data-v-9e5ec0a8],.af-entry-reason[data-v-9e5ec0a8]{flex:none;font-size:var(--text-xs);color:var(--color-text-faint);white-space:nowrap}.af-empty[data-v-9e5ec0a8]{padding:var(--space-4);text-align:center;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm)}.af-import[data-v-9e5ec0a8],.af-registry[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:var(--space-4)}.af-hint[data-v-9e5ec0a8]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.af-back[data-v-9e5ec0a8]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:flex-start;padding:0;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer;transition:color var(--duration-fast) var(--ease-out)}.af-back[data-v-9e5ec0a8]:hover{color:var(--color-text)}.af-field[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:6px}.af-label[data-v-9e5ec0a8]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.req[data-v-9e5ec0a8]{color:var(--color-danger)}.af-key-wrap[data-v-9e5ec0a8]{position:relative}.af-key-wrap[data-v-9e5ec0a8] .ui-input{padding-right:calc(var(--icon-button-sm) + var(--space-2))}.af-key-eye[data-v-9e5ec0a8]{position:absolute;right:var(--space-1);top:50%;transform:translateY(-50%)}.af-note[data-v-9e5ec0a8]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.af-foot[data-v-9e5ec0a8]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding-top:var(--space-4);border-top:.5px solid var(--color-line)}.af-manual[data-v-9e5ec0a8] .pf-form{padding:0;border-top:none}.pp[data-v-9aa0e3a8]{display:flex;flex-direction:column}.pp-head[data-v-9aa0e3a8]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.pp-title[data-v-9aa0e3a8]{margin:0;font-family:var(--font-ui);font-size:var(--text-lg);font-weight:var(--weight-medium);color:var(--color-text)}.pp-loading[data-v-9aa0e3a8]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-4) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.pp-group[data-v-9aa0e3a8]{overflow:hidden;border:.5px solid var(--color-line);border-radius:var(--radius-xl);background:var(--color-surface-raised)}.pp-group[data-v-9aa0e3a8]:has(.ui-select.is-open){position:relative;z-index:var(--z-dropdown);overflow:visible}.pp-group[data-v-9aa0e3a8]>*+*{border-top:.5px solid var(--color-line)}.pp-row[data-v-9aa0e3a8]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:40px;padding:var(--space-2) var(--space-4);border:none;background:transparent;text-align:left;font-family:var(--font-ui);color:var(--color-text);cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.pp-row[data-v-9aa0e3a8]:hover{background:var(--color-hover)}.pp-item.open>.pp-row[data-v-9aa0e3a8]{background:var(--color-surface-sunken)}.pp-row .grow[data-v-9aa0e3a8]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-2)}.pp-id[data-v-9aa0e3a8]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pp-count[data-v-9aa0e3a8]{flex:none;font-size:var(--text-xs);color:var(--color-text-faint);white-space:nowrap}.pp-chev[data-v-9aa0e3a8]{display:inline-flex;flex:none;color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.pp-item.open .pp-chev[data-v-9aa0e3a8]{transform:rotate(90deg)}.pp-add-row[data-v-9aa0e3a8]{gap:var(--space-2);color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.pp-acc[data-v-9aa0e3a8]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.pp-item.open>.pp-acc[data-v-9aa0e3a8]{grid-template-rows:1fr}.pp-acc-in[data-v-9aa0e3a8]{overflow:hidden;min-height:0}.pp-item.open .pp-acc-in[data-v-9aa0e3a8]{overflow:visible}.pp-item.flash>.pp-row[data-v-9aa0e3a8]{animation:pp-flash-9aa0e3a8 1.2s var(--ease-out)}@keyframes pp-flash-9aa0e3a8{0%{background:var(--color-accent-soft)}to{background:transparent}}.pp-empty[data-v-9aa0e3a8]{padding:var(--space-5) var(--space-4);color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);text-align:center}.sec[data-v-5711dff8]{margin-bottom:var(--space-5)}.sec-title[data-v-5711dff8]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);margin:0 0 var(--space-3)}.pu-group[data-v-5711dff8]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.pu-row[data-v-5711dff8]{display:flex;align-items:center;gap:var(--space-3);min-height:52px;padding:var(--space-3) var(--space-4)}.pu-main[data-v-5711dff8]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pu-label[data-v-5711dff8]{font-size:var(--text-sm);color:var(--color-text)}.pu-hint[data-v-5711dff8]{font-size:var(--text-xs);color:var(--color-text-faint)}.sec[data-v-f39cdded]{margin-bottom:var(--space-5)}.sec-title[data-v-f39cdded]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);margin:0 0 var(--space-3)}.pu-group[data-v-f39cdded]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.pu-row[data-v-f39cdded]{display:flex;align-items:center;gap:var(--space-3);min-height:52px;padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.pu-row[data-v-f39cdded]:first-child{border-top:none}.pu-state[data-v-f39cdded]{color:var(--color-text-muted);font-size:var(--text-sm)}.pu-error-text[data-v-f39cdded]{flex:1;min-width:0}.pu-empty[data-v-f39cdded]{color:var(--color-text-faint)}.pu-main[data-v-f39cdded]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pu-label[data-v-f39cdded]{font-size:var(--text-sm);color:var(--color-text)}.pu-hint[data-v-f39cdded]{font-size:var(--text-xs);color:var(--color-text-faint)}.pu-value[data-v-f39cdded]{flex:none;font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);font-variant-numeric:tabular-nums;white-space:nowrap}.pu-value-sub[data-v-f39cdded]{font-weight:var(--weight-regular);color:var(--color-text-faint)}.pu-meter[data-v-f39cdded]{flex:none;width:120px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden}.pu-meter i[data-v-f39cdded]{display:block;height:100%;border-radius:var(--radius-full);background:var(--color-accent);transition:width var(--duration-base) var(--ease-out)}.pu-meter i.sev-warn[data-v-f39cdded]{background:var(--color-warning)}.pu-meter i.sev-danger[data-v-f39cdded]{background:var(--color-danger)}.sm-picker[data-v-eb75e643]{position:relative;width:100%;font-family:var(--font-ui)}.sm-picker__trigger[data-v-eb75e643]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:38px;padding:0 var(--space-3);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out)}.sm-picker__trigger[data-v-eb75e643]:focus-visible,.sm-picker.is-open .sm-picker__trigger[data-v-eb75e643]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.sm-picker__value[data-v-eb75e643]{min-width:0;flex:1;display:flex;align-items:center;overflow:hidden;white-space:nowrap}.sm-picker__value-text[data-v-eb75e643]{min-width:0;overflow:hidden;text-overflow:ellipsis}.sm-picker__value.is-placeholder[data-v-eb75e643]{color:var(--color-text-faint)}.sm-picker__chevron[data-v-eb75e643]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-base) var(--ease-out)}.sm-picker.is-open .sm-picker__chevron[data-v-eb75e643]{transform:rotate(180deg)}.sm-picker__menu[data-v-eb75e643]{position:fixed;z-index:var(--z-modal-dropdown);width:252px;max-width:calc(100vw - 64px);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__models[data-v-eb75e643]{max-height:280px;overflow-y:auto;padding:var(--space-1);border-radius:var(--radius-md)}.sm-picker__flyout[data-v-eb75e643]{position:absolute;width:180px;max-height:280px;overflow-y:auto;padding:var(--space-1);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__flyout--right[data-v-eb75e643]{left:calc(100% + var(--space-1))}.sm-picker__flyout--left[data-v-eb75e643]{right:calc(100% + var(--space-1))}.sm-picker__group[data-v-eb75e643]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.sm-picker__option[data-v-eb75e643]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.sm-picker__option.is-active[data-v-eb75e643]{background:var(--color-hover);color:var(--color-text-strong)}.sm-picker__option.is-muted[data-v-eb75e643]{color:var(--color-text-muted)}.sm-picker__option-label[data-v-eb75e643]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm-picker__check[data-v-eb75e643]{flex:none;color:transparent}.sm-picker__option.is-selected .sm-picker__check[data-v-eb75e643]{color:var(--color-accent)}.sm-picker__flyout-caret[data-v-eb75e643]{flex:none;margin-left:auto;color:var(--color-text-faint)}.sd[data-v-ca0381a0]{display:grid;grid-template-columns:148px 1fr;grid-template-areas:"tabs region";min-height:0;height:100%;user-select:none}.sd[data-v-ca0381a0] :is(input,textarea,[contenteditable=true]){user-select:text}.settings-region[data-v-ca0381a0]{display:flex;min-width:0;min-height:0;flex-direction:column;grid-area:region}.settings-region-header[data-v-ca0381a0],.settings-tabs-header[data-v-ca0381a0]{display:flex;align-items:center;height:calc(var(--space-4) + var(--icon-button-sm) + var(--space-2));box-sizing:border-box}.settings-region-header[data-v-ca0381a0]{justify-content:flex-end;padding-right:var(--space-5)}.settings-tabs-header[data-v-ca0381a0]{padding-inline:var(--space-3)}.settings-dialog-title[data-v-ca0381a0]{margin:0;font-family:var(--font-ui);font-size:var(--text-lg);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text)}.settings-tabs[data-v-ca0381a0]{display:flex;flex-direction:column;width:148px;padding:0 var(--space-2) var(--space-2);gap:2px;overflow-y:auto;border-right:.5px solid var(--color-line);grid-area:tabs}.settings-tab-list[data-v-ca0381a0]{display:flex;flex-direction:column;gap:2px}.tab[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-2);text-align:left;padding:8px 10px;border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-ui-strong);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.tab[data-v-ca0381a0]:hover{background:var(--color-hover);color:var(--color-text-strong)}.tab.on[data-v-ca0381a0]{background:var(--color-hover);color:var(--color-text)}.tab[data-v-ca0381a0]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.body[data-v-ca0381a0]{display:flex;flex-direction:column;overflow-y:auto;padding:var(--space-2) 32px var(--space-5);flex:1;min-width:0}.body[data-v-ca0381a0]::-webkit-scrollbar{width:4px}.body[data-v-ca0381a0]::-webkit-scrollbar-track{background:transparent}.body[data-v-ca0381a0]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.body.scrolling[data-v-ca0381a0]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.body.scrolling[data-v-ca0381a0]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.panel[data-v-ca0381a0]{display:block}.sec[data-v-ca0381a0]{padding:var(--space-4) 0}.panel>.sec[data-v-ca0381a0]:first-child{padding-top:0}.sec-head[data-v-ca0381a0]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.sec-title[data-v-ca0381a0]{margin:0 0 var(--space-3);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);letter-spacing:0;color:var(--color-text)}.notification-settings[data-v-ca0381a0]{user-select:none}.sec-head .sec-title[data-v-ca0381a0]{margin-bottom:0}.row[data-v-ca0381a0]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:38px;padding:var(--space-1) 0}.settings-group[data-v-ca0381a0]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.settings-group[data-v-ca0381a0]:has(.ui-select.is-open){position:relative;z-index:var(--z-dropdown);overflow:visible}.settings-group>.row[data-v-ca0381a0]{min-height:52px;padding:var(--space-4);border-top:.5px solid var(--color-line)}.settings-group>.row[data-v-ca0381a0]:first-child{border-top:none}.settings-group>.empty-config[data-v-ca0381a0]{padding:var(--space-3)}.account-row[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4)}.account-avatar[data-v-ca0381a0]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--color-surface-sunken);color:var(--color-text-muted)}.account-avatar img[data-v-ca0381a0]{width:100%;height:100%;border-radius:50%;object-fit:cover}.account-name-row[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-2);min-width:0}.account-level[data-v-ca0381a0]{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}.account-meta[data-v-ca0381a0]{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.account-name[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-sub[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rlabel[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);font-weight:var(--weight-option-label);display:flex;flex-direction:column;gap:0}.rvalue[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted);max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rvalue.mono[data-v-ca0381a0]{font-family:var(--font-mono);font-size:var(--text-xs)}.hint[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);color:var(--color-text-faint)}.body[data-v-ca0381a0] .ui-seg,.body[data-v-ca0381a0] .ui-select__trigger,.body[data-v-ca0381a0] .ui-button,.archive-search[data-v-ca0381a0]{border-width:.5px}.select-wrap[data-v-ca0381a0]{min-width:220px;max-width:min(320px,50vw);flex:none}.empty-config[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:var(--space-1) 0}@media(max-width:640px){.sd[data-v-ca0381a0]{grid-template-columns:1fr;grid-template-rows:auto 1fr;grid-template-areas:"tabs" "region"}.settings-tabs[data-v-ca0381a0]{width:auto;padding:0;overflow-x:visible;border-right:none;border-bottom:.5px solid var(--color-line)}.settings-tabs-header[data-v-ca0381a0]{padding:var(--space-3)}.settings-tab-list[data-v-ca0381a0]{flex-direction:row;gap:var(--space-1);overflow-x:auto;padding:0 var(--space-3) var(--space-2)}.settings-region-header[data-v-ca0381a0]{padding:var(--space-3)}.body[data-v-ca0381a0]{padding-inline:var(--space-3)}.tab[data-v-ca0381a0]{white-space:nowrap;flex:none}.row[data-v-ca0381a0]{align-items:flex-start;flex-direction:column}.settings-group[data-v-ca0381a0]{margin-inline:0}.select-wrap[data-v-ca0381a0]{width:100%;max-width:none}}.setting-card[data-v-ca0381a0]{border-radius:var(--radius-xl);overflow:hidden;background:var(--color-surface)}.panel-head[data-v-ca0381a0]{margin-bottom:var(--space-4)}.panel-title[data-v-ca0381a0]{margin:0 0 var(--space-2);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);letter-spacing:0;color:var(--color-text)}.panel-desc[data-v-ca0381a0]{margin:0;font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--color-text-muted);max-width:560px}.archive-toolbar[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-4);flex-wrap:wrap}.archive-search[data-v-ca0381a0]{flex:1;min-width:200px;height:36px;display:flex;align-items:center;gap:var(--space-2);padding:0 var(--space-3);border-radius:var(--radius-md);border:.5px solid var(--color-line);color:var(--color-text-faint);font-size:var(--text-xs);background:var(--color-surface-overlay);transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.archive-search[data-v-ca0381a0]:focus-within{border-color:var(--color-accent);box-shadow:var(--p-focus-ring);color:var(--color-text-muted)}.archive-search svg[data-v-ca0381a0]{width:15px;height:15px;flex:none}.archive-search input[data-v-ca0381a0]{width:100%;border:none;outline:none;background:transparent;font:inherit;color:var(--color-text)}.archive-list[data-v-ca0381a0]{display:flex;flex-direction:column;gap:var(--space-4)}.archive-card .setting-card[data-v-ca0381a0]{margin-bottom:0}.archive-workspace[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-2);margin:0 2px var(--space-2);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.archive-workspace svg[data-v-ca0381a0]{width:16px;height:16px;color:var(--color-text-faint);flex:none}.archive-workspace .path[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-workspace .count[data-v-ca0381a0]{margin-left:auto;color:var(--color-text-faint);font-weight:var(--weight-medium);font-size:var(--text-xs);flex:none}.archive-row[data-v-ca0381a0]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-3);align-items:center;padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.archive-row[data-v-ca0381a0]:first-child{border-top:none}.archive-row[data-v-ca0381a0]:hover{background:var(--color-hover)}.archive-meta[data-v-ca0381a0]{min-width:0}.archive-name[data-v-ca0381a0]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-time[data-v-ca0381a0]{margin-top:2px;font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui)}.archive-draining[data-v-ca0381a0]{margin-bottom:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);background:var(--color-accent-soft);color:var(--color-accent-hover);font-size:var(--text-xs)}.archive-empty[data-v-ca0381a0]{padding:var(--space-6) var(--space-4);border-radius:var(--radius-xl);color:var(--color-text-faint);font-size:var(--text-xs);text-align:center;background:var(--color-surface)}@media(max-width:640px){.archive-toolbar[data-v-ca0381a0]{flex-direction:column;align-items:stretch}.archive-search[data-v-ca0381a0]{min-width:0}}[data-v-ca0381a0] .ui-dialog{width:min(980px,96vw)}[data-v-ca0381a0] .ui-dialog--fixed-height{height:min(780px,calc(100vh - var(--space-8) * 2))}.aw[data-v-fea98be5]{padding-top:4px}.crumbbar[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) 22px;border-bottom:.5px solid var(--color-line)}.crumbs[data-v-fea98be5]{display:flex;align-items:center;flex-wrap:wrap;gap:1px;min-width:0;font-size:var(--text-sm)}.crumb-sep[data-v-fea98be5]{color:var(--color-text-muted)}.crumb[data-v-fea98be5]{background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:1px var(--space-1);border-radius:var(--radius-xs)}.crumb[data-v-fea98be5]:hover{color:var(--color-text);background:var(--color-hover)}.crumb.last[data-v-fea98be5]{color:var(--color-text);font-weight:var(--weight-medium)}.filterbar[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) 22px;border-bottom:.5px solid var(--color-line)}.filter-icon[data-v-fea98be5]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.filter-input[data-v-fea98be5]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-base);padding:var(--space-1) 0;border:none;background:none;color:var(--color-text);outline:none}.filter-input[data-v-fea98be5]::placeholder{color:var(--color-text-muted)}.search-rel[data-v-fea98be5]{color:var(--color-text)}.folder-list[data-v-fea98be5]{height:300px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.fl-loading[data-v-fea98be5],.fl-empty[data-v-fea98be5]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.folder-row[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);text-align:left;padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);transition:background var(--duration-fast) var(--ease-out)}.folder-row[data-v-fea98be5]:hover{background:var(--color-hover)}.dir-icon[data-v-fea98be5]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.folder-name[data-v-fea98be5]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text)}.paste-section[data-v-fea98be5]{padding:var(--space-3) 22px;border-top:.5px solid var(--color-line)}.paste-section.paste-only[data-v-fea98be5]{border-top:none}.paste-row[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2)}.paste-input-wrap[data-v-fea98be5]{flex:1;min-width:0}.add-error[data-v-fea98be5]{margin:0 22px var(--space-2);padding:var(--space-2) var(--space-3);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-danger);background:var(--color-danger-soft);border:.5px solid var(--color-danger-bd);border-radius:var(--radius-sm)}.actions[data-v-fea98be5]{display:flex;justify-content:flex-end;gap:var(--space-2);padding:var(--space-3) 22px}.footer-hint[data-v-fea98be5]{padding:var(--space-2) var(--space-4);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint);border-top:.5px solid var(--color-line)}@media(max-width:640px){.folder-row[data-v-fea98be5]{min-height:44px}.crumbbar[data-v-fea98be5]{align-items:flex-start}.actions[data-v-fea98be5]{flex-wrap:wrap}}.confirm-dialog__message[data-v-aa5422da]{margin:0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.rows[data-v-340d1b31]{margin:0;padding:0}.row[data-v-340d1b31]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) 0;font-size:var(--text-base)}.row dt[data-v-340d1b31]{width:96px;flex:none;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:var(--text-xs)}.row dd[data-v-340d1b31]{margin:0;color:var(--color-text);font-weight:var(--weight-medium);display:flex;align-items:center;gap:var(--space-2);min-width:0}.row dd.plan-on[data-v-340d1b31],.row dd.swarm-on[data-v-340d1b31]{color:var(--color-accent)}.ctx-text[data-v-340d1b31]{flex:none}.bar[data-v-340d1b31]{width:80px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.bar i[data-v-340d1b31]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.rows[data-v-340d1b31]{overflow-y:auto;-webkit-overflow-scrolling:touch}.row[data-v-340d1b31]{align-items:flex-start;flex-direction:column;gap:var(--space-1);min-height:48px}.row dt[data-v-340d1b31]{width:auto}.row dd[data-v-340d1b31]{max-width:100%;flex-wrap:wrap}}.toasts[data-v-ac44e9ef]{position:fixed;right:16px;bottom:84px;display:flex;flex-direction:column;gap:var(--space-2);z-index:var(--z-toast);width:min(440px,calc(100vw - 32px));max-height:56vh;overflow-y:auto}.toast-enter-active[data-v-ac44e9ef],.toast-leave-active[data-v-ac44e9ef]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.toast-enter-from[data-v-ac44e9ef],.toast-leave-to[data-v-ac44e9ef]{opacity:0;transform:translate(16px)}.toast-move[data-v-ac44e9ef]{transition:transform var(--duration-base) var(--ease-out)}.actions[data-v-ac44e9ef]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}.link[data-v-ac44e9ef]{border:0;padding:0;background:none;color:var(--color-accent);cursor:pointer;font:inherit;font-size:var(--ui-font-size-xs)}.link[data-v-ac44e9ef]:hover{text-decoration:underline}.details[data-v-ac44e9ef]{display:grid;gap:5px;margin:8px 0 0;padding:8px;border:.5px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken)}.detail-row[data-v-ac44e9ef]{display:grid;grid-template-columns:minmax(88px,.34fr) minmax(0,1fr);gap:8px}.detail-row dt[data-v-ac44e9ef]{color:var(--color-text-muted)}.detail-row dd[data-v-ac44e9ef]{margin:0;color:var(--color-text);overflow-wrap:anywhere;white-space:pre-wrap}@media(max-width:640px){.toasts[data-v-ac44e9ef]{left:12px;right:12px;bottom:calc(var(--dock-h, 76px) + 8px);width:auto;max-height:50vh}.detail-row[data-v-ac44e9ef]{grid-template-columns:1fr;gap:2px}}.topbar[data-v-7f357087]{display:flex;align-items:center;gap:10px;height:calc(50px + var(--safe-top));flex:none;padding:var(--safe-top) max(12px,var(--safe-right)) 0 max(12px,var(--safe-left));border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui)}.wsq[data-v-7f357087]{flex:none;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-text);color:var(--color-bg);display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-weight:var(--weight-medium);font-size:var(--ui-font-size-sm)}.tb-mid[data-v-7f357087]{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:center;gap:1px;background:none;border:none;padding:0;cursor:pointer;text-align:left}.tb-path[data-v-7f357087]{display:flex;align-items:center;gap:5px;font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .ws[data-v-7f357087]{color:var(--color-text)}.tb-path .sl[data-v-7f357087]{color:var(--color-text-faint)}.tb-path .se[data-v-7f357087]{color:var(--color-text);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .cv[data-v-7f357087]{color:var(--color-text-faint);flex:none}.tb-sub[data-v-7f357087]{display:flex;align-items:center;gap:5px;font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-sub .rd[data-v-7f357087]{flex:none;width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-text-faint)}.tb-sub .rd.on[data-v-7f357087]{background:var(--color-success)}.topbar .tb-path[data-v-7f357087]{font-family:var(--sans)}.sheet-root[data-v-c3d5dadc]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;flex-direction:column;justify-content:flex-end}.sheet-scrim[data-v-c3d5dadc]{position:absolute;inset:0;background:#0d111773}.sheet-panel[data-v-c3d5dadc]{position:relative;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-bottom:none;border-radius:var(--radius-xl) var(--radius-xl) 0 0;box-shadow:var(--shadow-xl);max-height:86vh;display:flex;flex-direction:column;min-height:0;font-family:var(--font-ui);color:var(--color-text)}.sheet-grab[data-v-c3d5dadc]{flex:none;align-self:center;width:56px;height:18px;padding:0;border:none;background:none;cursor:pointer;position:relative;margin-top:4px}.sheet-grab[data-v-c3d5dadc]:after{content:"";position:absolute;left:50%;top:7px;transform:translate(-50%);width:38px;height:5px;border-radius:var(--radius-full);background:var(--color-line)}.sheet-head[data-v-c3d5dadc]{flex:none;display:flex;align-items:center;justify-content:space-between;padding:6px 16px 10px}.sheet-title[data-v-c3d5dadc]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.sheet-body[data-v-c3d5dadc]{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:max(16px,var(--safe-bottom))}.sheet-enter-active[data-v-c3d5dadc],.sheet-leave-active[data-v-c3d5dadc]{transition:opacity var(--duration-slow) var(--ease-out)}.sheet-enter-active .sheet-panel[data-v-c3d5dadc],.sheet-leave-active .sheet-panel[data-v-c3d5dadc]{transition:transform var(--duration-slow) var(--ease-out)}.sheet-enter-from[data-v-c3d5dadc],.sheet-leave-to[data-v-c3d5dadc]{opacity:0}.sheet-enter-from .sheet-panel[data-v-c3d5dadc],.sheet-leave-to .sheet-panel[data-v-c3d5dadc]{transform:translateY(102%)}.newrow[data-v-67278201]{display:flex;align-items:center;gap:10px;width:100%;padding:var(--space-3) var(--space-4);background:none;border:none;border-radius:var(--radius-md);color:var(--color-accent);font-weight:500;font-size:var(--text-base);cursor:pointer;text-align:left}.newrow[data-v-67278201]:hover{background:var(--color-hover)}.newrow[data-v-67278201]:active{background:var(--color-surface-sunken)}.newrow.secondary[data-v-67278201]{padding-top:var(--space-2);padding-bottom:var(--space-2);color:var(--color-text-muted);font-weight:400}.newrow.secondary[data-v-67278201]:hover{background:var(--color-hover)}.newrow.secondary[data-v-67278201]:active{background:var(--color-surface-sunken);color:var(--color-text)}.mlist[data-v-67278201]{--m-pad: 16px;--m-gutter: 15px;--m-gap: 8px;--m-indent: calc(var(--m-pad) + var(--m-gutter) + var(--m-gap));padding-bottom:var(--space-1)}.mempty[data-v-67278201]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-faint);font-size:var(--ui-font-size)}.mempty.small[data-v-67278201]{padding:10px 16px 12px var(--m-indent);text-align:left;font-size:var(--ui-font-size-xs)}.mgroup[data-v-67278201]{padding-top:2px}.mgh[data-v-67278201]{display:flex;align-items:center;gap:var(--m-gap);padding:10px var(--m-pad) 6px;border-radius:var(--radius-md);cursor:pointer;user-select:none;position:relative}.mgh[data-v-67278201]:hover{background:var(--color-hover)}.mgh[data-v-67278201]:active{background:var(--color-surface-sunken)}.mgh-folder[data-v-67278201]{flex:none;color:var(--color-text-muted)}.mgh-main[data-v-67278201]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.mgh-name[data-v-67278201]{font-size:var(--ui-font-size-lg);font-weight:550;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-path[data-v-67278201]{font-size:var(--text-base);font-weight:425;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-add[data-v-67278201]{margin:-10px -12px -10px 0}.mgh-add[data-v-67278201]:active{color:var(--color-text);background:var(--color-hover)}.mgh-more[data-v-67278201]{margin:-10px -8px}.mgh-more[data-v-67278201]:active{color:var(--color-text);background:var(--color-hover)}.srow[data-v-67278201]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--m-pad) var(--space-3) var(--m-indent);border-radius:var(--radius-md);cursor:pointer;position:relative}.srow[data-v-67278201]:hover{background:var(--color-hover)}.srow[data-v-67278201]:active{background:var(--color-surface-sunken)}.srow.cur[data-v-67278201]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.srow .m[data-v-67278201]{flex:1;min-width:0}.srow .m .t[data-v-67278201]{font-size:var(--text-base);font-weight:450;line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow.cur .m .t[data-v-67278201]{color:var(--color-accent-hover)}.srow .m .t.run[data-v-67278201]{position:relative}.srow .m .t.run[data-v-67278201]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-accent);animation:mRunPulse-67278201 1.4s ease-in-out infinite}@keyframes mRunPulse-67278201{0%,to{opacity:1}50%{opacity:.35}}.srow .m .t.aborted[data-v-67278201]{position:relative}.srow .m .t.aborted[data-v-67278201]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-danger)}.srow .m .s[data-v-67278201]{font-size:var(--text-base);font-weight:475;font-variant-numeric:tabular-nums;color:var(--color-text-faint);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att[data-v-67278201]{flex:none;font-family:var(--font-mono);font-size:max(9px,calc(var(--ui-font-size) - 4px));color:var(--color-text-on-accent);background:var(--color-warning);border-radius:var(--radius-full);padding:1px 7px}.srow .kb[data-v-67278201]:active{color:var(--color-text);background:var(--color-hover)}.kmenu[data-v-67278201]{position:absolute;right:12px;top:44px;z-index:var(--z-dropdown);min-width:96px;overflow:hidden}.wsmenu[data-v-67278201]{top:calc(100% - 4px);right:var(--m-pad);min-width:132px}.mshow-more-row[data-v-67278201]{display:flex;align-items:center;padding-left:calc(var(--m-indent) - var(--space-3))}.mshow-more[data-v-67278201]{display:flex;align-items:center;gap:var(--space-2);min-height:44px;padding:var(--space-1) var(--space-3);background:none;border:none;border-radius:var(--radius-md);color:var(--color-text-muted);font-size:var(--text-base);cursor:pointer;text-align:left}.mshow-more[data-v-67278201]:active{color:var(--color-accent-hover);background:var(--color-hover)}.mshow-more-sep[data-v-67278201]{margin:0 var(--space-1);color:var(--color-text-faint);user-select:none}.newrow[data-v-67278201]{font-family:var(--sans)}.mlist .srow[data-v-67278201]{margin:1px 8px;border-radius:var(--radius-md);border-bottom:none;padding:12px calc(var(--m-pad, 16px) - 8px) 12px calc(var(--m-indent, 39px) - 8px)}.mlist .srow.cur[data-v-67278201]{box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.group-title[data-v-81e94fd3]{padding:var(--space-3) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-faint)}.srow[data-v-81e94fd3]:disabled{opacity:.5;cursor:not-allowed}.srow[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:52px;padding:var(--space-3);background:none;border:none;border-radius:var(--radius-md);cursor:pointer;text-align:left;color:var(--color-text)}.srow[data-v-81e94fd3]:hover:not(.read-only){background:var(--color-hover)}.srow[data-v-81e94fd3]:active:not(.read-only){background:var(--color-surface-sunken)}.srow.read-only[data-v-81e94fd3]{cursor:default}.srow-main[data-v-81e94fd3]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.srow-label[data-v-81e94fd3]{font-size:var(--text-base);color:var(--color-text)}.srow-sub[data-v-81e94fd3]{font-size:var(--text-base);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow-val[data-v-81e94fd3]{flex:none;font-family:var(--font-mono);font-size:var(--ui-font-size);font-weight:500;color:var(--color-accent-hover)}.srow-val.dim[data-v-81e94fd3]{font-weight:400;color:var(--color-text-muted)}.cache-note[data-v-81e94fd3]{padding:0 var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);line-height:1.4}.chev[data-v-81e94fd3]{flex:none;color:var(--color-text-faint);font-size:17px;line-height:1}.toggle[data-v-81e94fd3]{flex:none;width:44px;height:26px;border-radius:var(--radius-full);background:var(--color-line);position:relative;transition:background .18s}.toggle.on[data-v-81e94fd3]{background:var(--color-accent)}.toggle[data-v-81e94fd3]:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:var(--radius-full);box-sizing:border-box;background:var(--color-bg);border:.5px solid var(--color-line);box-shadow:var(--shadow-xs);transition:left .18s}.toggle.on[data-v-81e94fd3]:after{left:21px}.srow.pref[data-v-81e94fd3]{cursor:default}.srow.acct.in .srow-label[data-v-81e94fd3]{color:var(--color-accent-hover);font-weight:500}.srow.acct.out .srow-label[data-v-81e94fd3]{color:var(--color-danger)}.acct-avatar[data-v-81e94fd3]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--color-surface-sunken);color:var(--color-text-muted)}.acct-avatar img[data-v-81e94fd3]{width:100%;height:100%;border-radius:50%;object-fit:cover}.acct-name-row[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-2);min-width:0}.acct-name-row .srow-label[data-v-81e94fd3]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.acct-level[data-v-81e94fd3]{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}.ctx-meter[data-v-81e94fd3]{flex:none;width:96px;height:7px;border-radius:var(--radius-full);background:var(--color-surface-sunken);overflow:hidden}.ctx-meter i[data-v-81e94fd3]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.srow[data-v-81e94fd3]{align-items:flex-start;gap:10px;min-width:0;padding:14px max(14px,var(--safe-right)) 14px max(14px,var(--safe-left))}.group-title[data-v-81e94fd3],.cache-note[data-v-81e94fd3]{padding-left:max(14px,var(--safe-left));padding-right:max(14px,var(--safe-right))}.srow-main[data-v-81e94fd3]{flex:1 1 auto}.srow-sub[data-v-81e94fd3]{white-space:normal;overflow-wrap:anywhere}.srow.pref[data-v-81e94fd3]{flex-wrap:wrap}.srow.pref .srow-main[data-v-81e94fd3]{flex:1 0 100%}.srow-val[data-v-81e94fd3],.chev[data-v-81e94fd3],.toggle[data-v-81e94fd3],.ctx-meter[data-v-81e94fd3]{margin-top:2px}}.srow[data-v-81e94fd3],.srow-sub[data-v-81e94fd3],.srow-val[data-v-81e94fd3],.cache-note[data-v-81e94fd3]{font-family:var(--sans)}.arch-subhead[data-v-81e94fd3]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-2) var(--space-3) var(--space-1)}.arch-back[data-v-81e94fd3]{display:inline-flex;align-items:center;gap:2px;border:none;background:none;padding:var(--space-1) var(--space-2) var(--space-1) 0;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-accent-hover);cursor:pointer}.chev.back[data-v-81e94fd3]{font-size:20px}.arch-count[data-v-81e94fd3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.arch-tools[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);flex-wrap:wrap}.arch-search-input[data-v-81e94fd3]{flex:1;min-width:160px}.arch-row[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-3);min-height:56px;padding:var(--space-2) var(--space-3);border-top:.5px solid var(--color-line)}.arch-row[data-v-81e94fd3]:first-of-type{border-top:none}.arch-meta[data-v-81e94fd3]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.arch-name[data-v-81e94fd3]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arch-time[data-v-81e94fd3]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.arch-empty[data-v-81e94fd3]{padding:var(--space-6) var(--space-4);text-align:center;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.brand-logo[data-v-f04205a8]{display:block;flex:none;cursor:pointer;user-select:none;touch-action:manipulation}.ls-cards[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-3)}.ls-card[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);width:100%;padding:var(--space-4);background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);font-family:var(--font-ui);text-align:left;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.ls-card[data-v-1ff21828]:hover{border-color:var(--color-line-strong);background:var(--color-surface)}.ls-card[data-v-1ff21828]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ls-card-logo[data-v-1ff21828]{align-self:flex-start}.ls-card-icon[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;color:var(--color-text-muted)}.ls-card-text[data-v-1ff21828]{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-1)}.ls-card-title[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-lg);font-weight:var(--weight-medium);color:var(--color-text)}.ls-reco[data-v-1ff21828]{padding:2px var(--space-2);border-radius:var(--radius-full);background:var(--color-accent-soft);color:var(--color-accent);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ls-card-hint[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.ls-card-chevron[data-v-1ff21828]{color:var(--color-text-faint);flex:none}.ls-done-card[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4);background:var(--color-surface-raised);border:.5px solid var(--color-success-bd);border-radius:var(--radius-lg)}.ls-done-badge[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-full);background:var(--color-success-soft);color:var(--color-success);flex:none}.ls-flow[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-4)}.ls-center[data-v-1ff21828]{display:flex;flex-direction:column;align-items:center;gap:var(--space-3);padding:var(--space-6) 0 var(--space-2);text-align:center}.ls-center-text[data-v-1ff21828]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.ls-success-text[data-v-1ff21828]{color:var(--color-success)}.ls-err-text[data-v-1ff21828]{color:var(--color-danger)}.ls-warn-text[data-v-1ff21828]{color:var(--color-warning)}.ls-center-hint[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted)}.ls-device[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-4)}.ls-lead[data-v-1ff21828]{font-size:var(--text-base);color:var(--color-text);line-height:var(--leading-normal)}.ls-primary[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);width:100%;min-height:40px;padding:0 var(--space-4);background:var(--color-accent);color:var(--color-text-on-accent);border:.5px solid var(--color-accent);border-radius:var(--radius-md);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);cursor:pointer;text-decoration:none;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out)}.ls-primary[data-v-1ff21828]:hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ls-or[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);color:var(--color-text-muted);font-size:var(--text-xs);letter-spacing:.06em}.ls-or[data-v-1ff21828]:before,.ls-or[data-v-1ff21828]:after{content:"";flex:1;height:1px;background:var(--color-line)}.ls-fb-text[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.ls-fb-link[data-v-1ff21828]{color:var(--color-accent);text-decoration:none;border-bottom:.5px solid var(--color-accent-bd)}.ls-fb-link[data-v-1ff21828]:hover{border-bottom-color:var(--color-accent)}.ls-code-row[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3)}.ls-code[data-v-1ff21828]{flex:1;font-family:var(--font-mono);font-size:var(--text-xl);font-weight:var(--weight-medium);color:var(--color-text);letter-spacing:.14em}.ls-link[data-v-1ff21828]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text}.ls-copy.is-copied[data-v-1ff21828]{color:var(--color-success);border-color:var(--color-success-bd)}.ls-status[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.ls-status-text[data-v-1ff21828]{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--color-text-muted);flex:1}.ls-countdown[data-v-1ff21828]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);font-variant-numeric:tabular-nums}.ls-actions[data-v-1ff21828]{display:flex;justify-content:flex-end;gap:var(--space-3)}@media(max-width:640px){.ls-code-row[data-v-1ff21828],.ls-status[data-v-1ff21828],.ls-actions[data-v-1ff21828]{flex-wrap:wrap}.ls-code[data-v-1ff21828]{min-width:0;overflow-wrap:anywhere;letter-spacing:.08em}.ls-status-text[data-v-1ff21828]{min-width:0}}.wizard[data-v-6546a2d8]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);overflow-y:auto;font-family:var(--font-ui)}.wiz-body[data-v-6546a2d8]{flex:1;display:flex;flex-direction:column;align-items:center;width:min(560px,100%);margin:0 auto;padding:max(var(--space-8),12vh) var(--space-5) var(--space-6)}.wiz-step[data-v-6546a2d8]{display:flex;flex-direction:column;align-items:center;width:100%;flex:1;min-height:0}.wiz-step-fill[data-v-6546a2d8]{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;width:100%}.wiz-title[data-v-6546a2d8]{margin:var(--space-4) 0 0;font-size:var(--text-2xl);font-weight:var(--weight-semibold);line-height:var(--leading-tight);color:var(--color-text);text-align:center}.wiz-sub[data-v-6546a2d8]{margin:var(--space-2) 0 var(--space-6);font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted);text-align:center;max-width:460px}.pref-group[data-v-6546a2d8]{width:100%;margin-bottom:var(--space-5)}.pref-label[data-v-6546a2d8]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted);margin-bottom:var(--space-2)}.opt-card[data-v-6546a2d8]{display:flex;align-items:center;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);font-family:var(--font-ui);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.opt-card[data-v-6546a2d8]:hover{border-color:var(--color-line-strong)}.opt-card[data-v-6546a2d8]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.opt-card.selected[data-v-6546a2d8]{border-color:var(--color-accent);background:var(--color-accent-soft)}.opt-label[data-v-6546a2d8]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.lang-cards[data-v-6546a2d8]{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-3);width:100%}.lang-card[data-v-6546a2d8]{gap:var(--space-3);padding:var(--space-4)}.opt-radio[data-v-6546a2d8]{width:18px;height:18px;border-radius:var(--radius-full);border:.5px solid var(--color-line-strong);background:var(--color-surface-raised);flex:none;display:inline-flex;align-items:center;justify-content:center;transition:border-color var(--duration-fast) var(--ease-out)}.opt-radio[data-v-6546a2d8]:after{content:"";width:8px;height:8px;border-radius:var(--radius-full);background:transparent;transition:background var(--duration-fast) var(--ease-out)}.opt-radio.on[data-v-6546a2d8]{border-color:var(--color-accent)}.opt-radio.on[data-v-6546a2d8]:after{background:var(--color-accent)}.theme-cards[data-v-6546a2d8]{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-3);width:100%}.theme-card[data-v-6546a2d8]{flex-direction:column;gap:var(--space-3);padding:var(--space-3)}.tp[data-v-6546a2d8]{display:flex;width:100%;aspect-ratio:16 / 10;border:.5px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.tp-light[data-v-6546a2d8]{background:#fff}.tp-dark[data-v-6546a2d8]{background:#0d1117}.tp-half[data-v-6546a2d8]{flex:1;display:flex;min-width:0}.tp-half-light[data-v-6546a2d8]{background:#fff}.tp-half-dark[data-v-6546a2d8]{background:#0d1117}.tp-side[data-v-6546a2d8]{width:30%;flex:none}.tp-light .tp-side[data-v-6546a2d8],.tp-half-light .tp-side[data-v-6546a2d8]{background:#0000000d}.tp-dark .tp-side[data-v-6546a2d8],.tp-half-dark .tp-side[data-v-6546a2d8]{background:#ffffff12}.tp-lines[data-v-6546a2d8]{flex:1;display:flex;flex-direction:column;gap:6px;padding:14% 12%}.tp-lines span[data-v-6546a2d8]{height:6px;border-radius:var(--radius-full)}.tp-lines span[data-v-6546a2d8]:nth-child(1){width:62%}.tp-lines span[data-v-6546a2d8]:nth-child(2){width:88%}.tp-lines span[data-v-6546a2d8]:nth-child(3){width:44%}.tp-light .tp-lines span[data-v-6546a2d8],.tp-half-light .tp-lines span[data-v-6546a2d8]{background:#00000024}.tp-dark .tp-lines span[data-v-6546a2d8],.tp-half-dark .tp-lines span[data-v-6546a2d8]{background:#ffffff38}.wiz-foot[data-v-6546a2d8]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);width:100%;margin-top:auto;padding:var(--space-8) 0 max(var(--space-8),8vh)}.wiz-foot-ghost[data-v-6546a2d8]{display:flex;gap:var(--space-3);min-height:32px;align-items:center}.wiz-foot-ghost[data-v-6546a2d8] .ui-button--ghost:not(:disabled):hover{background:transparent;color:var(--color-text)}.wiz-primary[data-v-6546a2d8]{min-width:140px}@media(max-width:640px){.theme-cards[data-v-6546a2d8]{grid-template-columns:1fr}}.gload[data-v-ab85ede1]{position:fixed;top:0;left:0;width:100vw;height:100vh;height:100dvh;min-width:100vw;min-height:100dvh;z-index:var(--z-toast);display:flex;align-items:center;justify-content:center;background:var(--bg)}.gload-box[data-v-ab85ede1]{display:flex;flex-direction:column;align-items:center;gap:22px;transform:translateY(-6%)}.gload-logo[data-v-ab85ede1]{width:128px;height:auto;color:var(--color-text);animation:gload-pop-ab85ede1 .55s cubic-bezier(.22,1,.36,1) both}.gload-text[data-v-ab85ede1]{font-family:var(--mono);font-size:var(--text-base);color:var(--muted);letter-spacing:.04em}@keyframes gload-pop-ab85ede1{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.gload-logo[data-v-ab85ede1]{animation:none}}.gload-text[data-v-ab85ede1]{font-family:var(--sans)}.kap-root[data-v-2b13888e]{height:100vh;display:flex;flex-direction:column;background:var(--bg);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2.5px);color:var(--color-text)}.kap-head[data-v-2b13888e]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:.5px solid var(--line);background:var(--panel)}.kap-count[data-v-2b13888e]{color:var(--muted)}.kap-head-actions[data-v-2b13888e]{margin-left:auto;display:flex;gap:6px}.kap-head-actions button[data-v-2b13888e],.kap-view-toggle button[data-v-2b13888e]{padding:3px 8px;border:.5px solid var(--line);border-radius:6px;background:var(--bg);color:var(--muted);font:inherit;cursor:pointer}.kap-head-actions button[data-v-2b13888e]:hover,.kap-view-toggle button[data-v-2b13888e]:hover{color:var(--color-text)}.kap-head-actions button.on[data-v-2b13888e],.kap-view-toggle button.on[data-v-2b13888e]{color:var(--color-accent-hover);border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.kap-filters[data-v-2b13888e]{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:7px 10px;border-bottom:.5px solid var(--line)}.kap-filters select[data-v-2b13888e],.kap-filters input[type=text][data-v-2b13888e]{padding:3px 6px;border:.5px solid var(--line);border-radius:6px;background:var(--bg);color:var(--color-text);font:inherit;min-width:0}.kap-filters input[type=text][data-v-2b13888e]{flex:1;min-width:120px}.kap-check[data-v-2b13888e]{display:inline-flex;align-items:center;gap:4px;color:var(--muted);white-space:nowrap}.kap-view-toggle[data-v-2b13888e]{display:flex;gap:0}.kap-view-toggle button[data-v-2b13888e]:first-child{border-radius:6px 0 0 6px;border-right:none}.kap-view-toggle button[data-v-2b13888e]:last-child{border-radius:0 6px 6px 0}.kap-list[data-v-2b13888e]{flex:1;min-height:0;overflow-y:auto}.kap-empty[data-v-2b13888e]{padding:18px 12px;color:var(--muted);text-align:center}.kap-row[data-v-2b13888e]{display:flex;align-items:baseline;gap:7px;width:100%;padding:3px 10px;border:none;border-bottom:.5px solid var(--line);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.kap-row[data-v-2b13888e]:hover{background:var(--panel2)}.kap-row.expanded[data-v-2b13888e]{background:var(--color-accent-soft)}.kap-ts[data-v-2b13888e]{flex:none;color:var(--muted)}.kap-badge[data-v-2b13888e]{flex:none;padding:0 5px;border-radius:var(--radius-sm);font-size:max(9px,calc(var(--ui-font-size) - 4.5px));font-weight:500;line-height:1.7}.b-rest[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.b-in[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-success)}.b-out[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-warning)}.b-life[data-v-2b13888e]{background:var(--panel2);color:var(--muted)}.b-err[data-v-2b13888e]{background:var(--color-warning);color:var(--bg)}.kap-label[data-v-2b13888e]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kap-detail[data-v-2b13888e]{border-bottom:.5px solid var(--line);background:var(--bg);padding:6px 10px 10px}.kap-detail-actions[data-v-2b13888e]{display:flex;justify-content:flex-end;margin-bottom:4px}.kap-detail-actions button[data-v-2b13888e]{padding:2px 8px;border:.5px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font:inherit;cursor:pointer}.kap-detail-actions button[data-v-2b13888e]:hover{color:var(--color-text)}.kap-detail pre[data-v-2b13888e]{margin:0;max-height:320px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:calc(var(--ui-font-size) - 3px);line-height:1.45}.kap-agg[data-v-2b13888e]{flex:1;min-height:0;overflow-y:auto;padding:8px 10px}.kap-agg h4[data-v-2b13888e]{margin:8px 0 4px;font-size:calc(var(--ui-font-size) - 2.5px);color:var(--muted)}.kap-agg table[data-v-2b13888e]{width:100%;border-collapse:collapse}.kap-agg th[data-v-2b13888e],.kap-agg td[data-v-2b13888e]{padding:3px 6px;border-bottom:.5px solid var(--line);text-align:left;vertical-align:top}.kap-agg th[data-v-2b13888e]{color:var(--muted);font-weight:500}.kap-agg .num[data-v-2b13888e]{text-align:right}.kap-agg .err[data-v-2b13888e]{color:var(--color-warning);font-weight:500}.kap-agg .mono[data-v-2b13888e]{word-break:break-all}.kap-fab[data-v-21de79fc]{position:fixed;right:10px;bottom:10px;z-index:var(--z-overlay);padding:5px 9px;border:.5px solid var(--line);border-radius:8px;background:var(--panel);color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 3px);font-weight:500;letter-spacing:.04em;cursor:pointer;opacity:.75}.kap-fab[data-v-21de79fc]:hover{opacity:1;color:var(--color-accent)}.server-auth-hint[data-v-331563ff]{margin:0 0 var(--space-3);font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.server-auth-hint code[data-v-331563ff]{padding:1px 5px;font-family:var(--font-mono);font-size:var(--text-xs);background:var(--color-surface-sunken);border-radius:var(--radius-xs)}.internal-build-tag[data-v-14c3d0e0]{flex:none;display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:999px;background:#f5a623;color:#3a2a00;font-size:11px;font-weight:700;letter-spacing:.01em;line-height:1.4;white-space:nowrap;user-select:none}.gload-fade-leave-active[data-v-01f1cfe9]{transition:opacity .28s ease}.gload-fade-leave-to[data-v-01f1cfe9]{opacity:0}.action-toast-enter-active[data-v-01f1cfe9],.action-toast-leave-active[data-v-01f1cfe9]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.action-toast-leave-active[data-v-01f1cfe9]{transition-duration:var(--duration-fast);pointer-events:none}.action-toast-enter-from[data-v-01f1cfe9],.action-toast-leave-to[data-v-01f1cfe9]{opacity:0;transform:translateY(-6px)}.app-shell[data-v-01f1cfe9]{position:fixed;top:var(--app-top, 0px);left:0;right:0;height:100vh;height:100dvh;height:var(--app-height, 100dvh);display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}.app[data-v-01f1cfe9]{flex:1;min-height:0;position:relative;display:grid;grid-template-columns:auto 0 minmax(0,1fr) 0 auto;background:var(--bg);color:var(--color-text);overflow:hidden;box-sizing:border-box}.app[data-v-01f1cfe9]>*{min-height:0;min-width:0}.app>.side[data-v-01f1cfe9]{grid-column:1}.side-handle[data-v-01f1cfe9]{grid-column:2}.app:not(.mobile)>.con[data-v-01f1cfe9]{grid-column:3}.preview-handle[data-v-01f1cfe9]{grid-column:4}.sidebar-toggle-btn[data-v-01f1cfe9]{position:absolute;top:11px;left:16px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-01f1cfe9 .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .sidebar-toggle-btn[data-v-01f1cfe9]{left:84px;animation:none}.new-chat-btn[data-v-01f1cfe9]{position:absolute;top:11px;left:42px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-01f1cfe9 .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .new-chat-btn[data-v-01f1cfe9]{left:110px}@keyframes sidebar-toggle-btn-in-01f1cfe9{0%{opacity:0}}.internal-build-fab[data-v-01f1cfe9]{position:absolute;right:var(--space-3);bottom:var(--space-3);z-index:var(--z-sticky);pointer-events:none}.app.mobile[data-v-01f1cfe9]{grid-template-columns:1fr;grid-template-rows:auto 1fr}.global-preview[data-v-01f1cfe9]{--preview-w: 460px;grid-column:5;min-width:0;min-height:0;width:0;background:var(--bg);overflow:hidden}.global-preview.open[data-v-01f1cfe9]{width:var(--preview-w)}.global-preview[data-v-01f1cfe9]:not(.mobile)>*{width:var(--preview-w);height:100%;box-sizing:border-box;border-left:.5px solid var(--line)}.global-preview.mobile[data-v-01f1cfe9]{position:fixed;inset:0;z-index:var(--z-sticky);width:auto;transition:none;border-top:.5px solid var(--color-text)}:root{--panel-head-h: 48px;--panel-head-inset: calc((var(--panel-head-h) - var(--icon-button-sm)) / 2)}.app:not(.mobile) .chat-header{transition:padding-left .28s cubic-bezier(.4,0,.2,1)}.app.sidebar-collapsed .chat-header{padding-left:78px}.app.sidebar-collapsed.macos-desktop .chat-header{padding-left:146px}.app.macos-desktop .global-preview .ui-panel-header{-webkit-app-region:drag}.app.macos-desktop .global-preview .ui-panel-header button,.app.macos-desktop .global-preview .ui-panel-header input{-webkit-app-region:no-drag}.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .chat-header,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .side .ch,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .global-preview .ui-panel-header{-webkit-app-region:no-drag}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--dim: rgba(0, 0, 0, .6);--muted: rgba(0, 0, 0, .45);--faint: rgba(0, 0, 0, .3);--line: var(--color-line);--line2: var(--color-subtle);--canvas: #f9fbfc;--sh: 0 1px 3px rgba(28, 40, 66, .05), 0 6px 18px rgba(28, 40, 66, .06);--shc: 0 1px 2px rgba(28, 40, 66, .05);--panel: #f5f5f5;--panel2: rgba(0, 0, 0, .05);--bg: #ffffff;--blue: #1783ff;--blue2: #167ff7;--soft: #e8f3ff;--bd: rgba(23, 131, 255, .25);--logo: #1783ff;--bluebg: #e8f3ff;--blueln: rgba(23, 131, 255, .25);--ok: #0e7a38;--warn: #a9610a;--star: #eab308;--err: #c0392b;--hover: var(--color-hover);--r-xs: var(--radius-sm);--r-sm: var(--radius-md);--r-md: var(--radius-lg);--r-lg: var(--radius-xl);--ui-font-size: var(--ui-b2);--ui-font-size-sm: calc(var(--ui-font-size) - 1px);--ui-font-size-xs: calc(var(--ui-font-size) - 2px);--ui-font-size-lg: calc(var(--ui-font-size) + 1px);--ui-font-size-xl: calc(var(--ui-font-size) + 2px);--content-font-size: var(--md-b1);--code-font-size: calc(var(--content-font-size) - 2px);--mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--sans: var(--font-ui);color-scheme:light dark}html[data-color-scheme=light]{color-scheme:light}html[data-color-scheme=system]{color-scheme:light dark}html[data-color-scheme=dark]{color-scheme:dark;--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35)}}:root{--color-bg: #ffffff;--color-surface: #f5f5f5;--color-surface-raised: #ffffff;--color-surface-overlay: #ffffff;--color-surface-sunken: #f5f5f5;--color-inline-code-bg: rgba(0, 0, 0, .03);--color-well: #f5f5f5;--color-surface-deep: #f5f5f5;--color-media-alpha-bg-1: color-mix(in srgb, var(--color-bg) 52%, var(--color-text) 48%);--color-media-alpha-bg-2: color-mix(in srgb, var(--color-bg) 42%, var(--color-text) 58%);--media-alpha-canvas: conic-gradient( var(--color-media-alpha-bg-1) 25%, var(--color-media-alpha-bg-2) 0 50%, var(--color-media-alpha-bg-1) 0 75%, var(--color-media-alpha-bg-2) 0 ) 0 0 / 16px 16px;--color-text: rgba(0, 0, 0, .9);--color-text-strong: #000000;--color-text-muted: rgba(0, 0, 0, .6);--color-text-faint: rgba(0, 0, 0, .45);--color-text-on-accent: #ffffff;--color-line: rgba(0, 0, 0, .13);--color-subtle: rgba(0, 0, 0, .05);--color-line-strong: rgba(0, 0, 0, .15);--color-scrim: rgba(0, 0, 0, .4);--color-scrim-strong: rgba(0, 0, 0, .6);--color-text-on-scrim: #ffffff;--color-selected: rgba(0, 0, 0, .05);--color-selected-hover: rgba(0, 0, 0, .08);--color-hover: rgba(0, 0, 0, .03);--color-sidebar-bg: #f9fbfc;--color-user-bubble-bg: #f5f5f5;--color-accent: #1783ff;--color-accent-hover: #167ff7;--color-accent-soft: #e8f3ff;--color-accent-bd: rgba(23, 131, 255, .25);--color-success: #0e7a38;--color-success-soft: #e7f6ee;--color-success-bd: #bfe3cc;--color-warning: #a9610a;--color-warning-soft: #fbf1e0;--color-warning-bd: #f0d9b8;--color-danger: #c0392b;--color-danger-soft: #fbeaea;--color-danger-bd: #f0cccc;--color-diff-add-bg: rgba(22, 196, 86, .25);--color-diff-del-bg: rgba(255, 56, 73, .25);--color-done: #8250df;--color-done-soft: #f3e8ff;--color-done-bd: #e0ccff;--color-info: #1783ff;--color-term-magenta: #8250df;--color-term-cyan: #1b7c83;--color-term-black: #24292f;--space-05: 2px;--space-1: 4px;--space-1-5: 6px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-8: 32px;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-2xl: 20px;--radius-composer: 32px;--corner-shape-composer: superellipse(1.5);--radius-menu-row: 25.3px;--corner-shape-menu: var(--corner-shape-composer);--color-menu-bg-frost: color-mix(in srgb, var(--color-bg) 70%, transparent);--color-menu-scrollbar: color-mix(in srgb, var(--color-text) 16%, transparent);--color-menu-scrollbar-hover: color-mix(in srgb, var(--color-text) 48%, transparent);--radius-full: 999px;--menu-scroll-fade: var(--space-5);--menu-row-hug: var(--space-1-5);--menu-rows-seam: 1px;--menu-row-gap-icon: 7px;--menu-row-padding-block: calc(var(--menu-row-hug) - var(--p-hairline));--menu-row-padding-inline: calc(var(--space-4) - var(--space-3) + var(--menu-row-hug) - var(--p-hairline));--menu-row-touch-padding-block: 11px;--menu-scrollbar-width: 3px;--menu-scrollbar-edge: calc(var(--menu-row-hug) + var(--p-hairline) - var(--menu-scrollbar-width));--menu-scrollbar-track-inset: calc(var(--radius-composer) - var(--space-1-5));--menu-scrollbar-thumb-min: 24px;--att-chip-pad-left: 5px;--wm-x-size: calc(var(--p-ic-sm) + var(--space-1));--wm-x-ring: var(--space-1-5);--z-base: 0;--z-raised: 1;--z-sticky: 100;--z-dropdown: 200;--z-overlay: 300;--z-modal: 400;--z-modal-dropdown: 500;--z-toast: 600;--z-tooltip: 650;--z-max: 9999;--shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);--shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);--shadow-menu: 0 6px 18px lch(0% 0 0 / .02), 0 3px 9px lch(0% 0 0 / .04), 0 1px 1px lch(0% 0 0 / .04);--color-menu-bg: rgba(255, 255, 255, .95);--p-menu-backdrop: blur(24px) saturate(1.8);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(16, 24, 40, .07), 0 2px 4px rgba(16, 24, 40, .05);--shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 4px 10px rgba(16, 24, 40, .08);--shadow-xl: 0 24px 64px rgba(16, 24, 40, .18), 0 8px 20px rgba(16, 24, 40, .1);--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-in-out: cubic-bezier(.4, 0, .2, 1);--duration-fast: .12s;--duration-base: .16s;--duration-slow: .26s;--duration-hover-intent: .25s;--duration-flash: 1.2s;--motion-panel-shift: 2px;--motion-panel-scale: .97;--color-composer-bg: #ffffff;--color-composer-line: rgba(0, 0, 0, .13);--color-composer-focus-line: rgba(0, 0, 0, .25);--color-send-bg: rgba(0, 0, 0, .9);--color-send-bg-hover: #252525;--color-send-icon: #ffffff;--color-stop-glyph: var(--color-danger);--color-send-bg-disabled: rgba(0, 0, 0, .05);--color-send-icon-disabled: rgba(0, 0, 0, .27);--opacity-send-disabled: 1;--shadow-send: 0 7px 16px -13px rgba(0, 0, 0, .38), 0 1px 2px rgba(0, 0, 0, .07);--shadow-send-hover: 0 8px 18px -13px rgba(0, 0, 0, .42), 0 1px 3px rgba(0, 0, 0, .09);--composer-send-icon-size: 28px;--font-ui-latin: "Schibsted Grotesk Variable", "Helvetica Neue", Arial;--font-ui: var(--font-ui-latin), "Noto Sans SC Variable", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-display: var(--font-ui);--font-kbd: "Schibsted Grotesk Variable", system-ui, sans-serif;--font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--text-2xs: calc(var(--ui-c1) - 1px);--text-xs: var(--ui-c1);--text-sm: calc(var(--ui-b2) - 1px);--text-base: var(--ui-b2);--text-lg: var(--ui-t2);--text-xl: var(--ui-t1);--text-2xl: var(--ui-t0);--leading-solid: 1;--leading-tight: 1.25;--leading-caption: 1.4;--leading-normal: 1.5;--leading-prose: 1.6;--leading-relaxed: 1.7;--weight-regular: 400;--weight-caption: 450;--weight-option-label: 475;--weight-medium: 500;--weight-ui-strong: 525;--weight-section-label: 600;--weight-semibold: 700;--ui-shift: calc(var(--base-font, 14px) - 14px);--md-shift: var(--ui-shift);--ui-t0: min(calc(20px + var(--ui-shift)), 24px);--ui-t1: min(calc(18px + var(--ui-shift)), 22px);--ui-t2: calc(16px + var(--ui-shift));--ui-b1: calc(15px + var(--ui-shift));--ui-b2: calc(14px + var(--ui-shift));--ui-c1: calc(12px + var(--ui-shift));--ui-c2: calc(10px + var(--ui-shift));--md-h1: calc(22px + var(--md-shift));--md-h2: calc(20px + var(--md-shift));--md-h3: calc(18px + var(--md-shift));--md-b1: calc(14px + var(--md-shift));--md-b2: calc(13px + var(--md-shift));--md-b3: calc(13px + var(--md-shift));--p-focus-ring: 0 0 0 3px var(--color-accent-soft);--p-focus-ring-strong: 0 0 0 3px var(--color-accent-soft), 0 0 0 1px var(--color-accent);--p-selection: rgba(23, 131, 255, .2);--p-ic-sm: 14px;--p-ic-md: 16px;--p-ring-stroke: 1.5px;--p-ic-lg: 20px;--p-empty-ico: 28px;--p-hairline: .5px;--p-findring-w: 2px;--icon-button-sm: 26px;--touch-target-min: 44px;--p-chip-num: 20px;--p-sidebar-w: 264px;--p-content-max: 760px;--p-content-wide: 920px;--p-table-max: 1040px;--p-table-cell-max: 700px;--p-findbar-w: 340px;--p-dock-panel-h: 320px;--p-subagent-card-min: 180px;--p-slash-menu-h: 228px;--p-mention-menu-h: 208px;--p-add-menu-h: var(--p-slash-menu-h);--p-bp-sm: 640px;--p-bp-md: 980px}:root,html[data-font-scale=medium]{--base-font: 14px}html[data-font-scale=small]{--base-font: 12px}html[data-font-scale=large]{--base-font: 16px}html[data-font-scale=xlarge]{--base-font: 18px}.text-ui-t0{font-size:var(--ui-t0);line-height:round(calc(var(--ui-t0) * 1.4),1px)}.text-ui-t1{font-size:var(--ui-t1);line-height:round(calc(var(--ui-t1) * 1.44),1px)}.text-ui-t2{font-size:var(--ui-t2);line-height:round(calc(var(--ui-t2) * 1.5),1px)}.text-ui-b1{font-size:var(--ui-b1);line-height:round(calc(var(--ui-b1) * 1.47),1px)}.text-ui-b2{font-size:var(--ui-b2);line-height:round(calc(var(--ui-b2) * 1.42),1px)}.text-ui-c1{font-size:var(--ui-c1);line-height:round(calc(var(--ui-c1) * 1.5),1px)}.text-ui-c2{font-size:var(--ui-c2);line-height:round(calc(var(--ui-c2) * 1.4),1px)}.text-md-h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px)}.text-md-h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.text-md-h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.text-md-b1{font-size:var(--md-b1);line-height:round(calc(var(--md-b1) * 1.625),1px)}.text-md-b2{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px)}.text-md-b3{font-size:var(--md-b3);line-height:round(calc(var(--md-b3) * 1.57),1px)}html[data-color-scheme=dark]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-info: #1a88ff;--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-info: #1a88ff;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32)}}:root{--color-sidebar-tint: rgba(255, 255, 255, .4)}html[data-color-scheme=dark]{--color-sidebar-tint: rgba(0, 0, 0, .25)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-sidebar-tint: rgba(0, 0, 0, .25)}}:root{--color-search-match: #ffe066;--color-search-match-current: #ffc531}html[data-color-scheme=dark]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55)}}::highlight(kimi-transcript-search){background-color:var(--color-search-match)}::highlight(kimi-transcript-search-current){background-color:var(--color-search-match-current)}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/NotoSansSC_wght_-BkPpiACN.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:normal;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk_wght_-DIzGrWVg.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:italic;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk-Italic_wght_-DjkBGo1z.woff2) format("woff2-variations")}*,*:before,*:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;tab-size:4}body{margin:0}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit;margin:0}p,blockquote,dl,dd,figure,pre{margin:0}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}b,strong{font-weight:var(--weight-medium)}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{margin:0;padding:0;font-family:inherit;font-size:100%;line-height:inherit;color:inherit}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background:transparent;background-image:none}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block}img,video{max-width:100%;height:auto}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1}table{border-collapse:collapse;border-color:inherit;text-indent:0}hr{height:0;color:inherit;border-top-width:1px}fieldset{margin:0;padding:0}legend{padding:0}dialog{padding:0}summary{display:list-item}[hidden]{display:none}@supports (interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}:root{--safe-top: env(safe-area-inset-top, 0px);--safe-right: env(safe-area-inset-right, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--safe-left: env(safe-area-inset-left, 0px)}.kw-icon{display:inline-block;flex:none;vertical-align:-.15em}code,pre,kbd,samp,tt{font-feature-settings:"liga" 0,"calt" 0,"ss01" 0;font-variant-ligatures:none}html,body,#app{height:100%;margin:0;background:var(--bg)}#app{position:fixed;inset:0}html,body{overflow:hidden}@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--color-text) 12%,transparent) transparent}}*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:999px}*::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}*::-webkit-scrollbar-corner{background:transparent}body{font-family:var(--sans);color:var(--color-text);background:var(--bg);font-size:var(--ui-font-size);font-weight:400;line-height:1.6;font-optical-sizing:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto;font-synthesis:none;text-size-adjust:100%;-webkit-hyphens:none;hyphens:none}@media(max-width:640px){.backdrop{align-items:flex-end;justify-content:stretch}.backdrop .dialog{width:100%;max-width:100%;max-height:88vh;border-radius:var(--radius-xl) var(--radius-xl) 0 0;border-left:none;border-right:none;border-bottom:none;border-top:.5px solid var(--line);box-shadow:0 -10px 30px #0000002e;animation:kimi-sheet-up .26s cubic-bezier(.4,0,.2,1)}}@keyframes kimi-sheet-up{0%{transform:translateY(101%)}to{transform:translateY(0)}}.backdrop,.ob-backdrop{min-width:100vw!important;min-height:100vh!important;min-height:100dvh!important}@keyframes kimi-card-in{0%{opacity:0;transform:translateY(8px) scale(.995)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes kimi-check-in{0%{opacity:0;transform:scale(.4)}60%{opacity:1;transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-delay:0ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}.ch-eyes{animation:kimi-eye-look 16s ease-in-out infinite}.ch-eye{transform-box:fill-box;transform-origin:center;animation:kimi-eye-blink 11s ease-in-out infinite}@keyframes kimi-eye-look{0%,42%{transform:translate(0)}47%,53%{transform:translate(2px)}58%,80%{transform:translate(0)}84%,90%{transform:translate(-2px)}95%,to{transform:translate(0)}}@keyframes kimi-eye-blink{0%,94%,to{transform:scaleY(1)}96.5%,98%{transform:scaleY(.12)}}@media(prefers-reduced-motion:reduce){.ch-eyes,.ch-eye{animation:none}}.blink-now .ch-eye{animation:kimi-eye-blink-once .24s ease-in-out}@keyframes kimi-eye-blink-once{0%,to{transform:scaleY(1)}50%{transform:scaleY(.1)}}.md .markdown-renderer img{min-width:0;min-height:0}.app{font-size:var(--ui-font-size)}.md,.md .markdown-renderer,.md .markdown-renderer p,.md .markdown-renderer li,.u-bub,.u-bub .u-text,.a-msg .msg,.ph{font-size:var(--content-font-size)}.md .markdown-renderer blockquote,.md .markdown-renderer td,.md .markdown-renderer th{font-size:var(--md-b2)}.md,.u-bub .u-text,.a-msg .msg{text-autospace:normal}.md .code-block-container pre,.md .markstream-pre,.md .code-block-container pre code,.md .diff-pre code,.md .markdown-renderer :not(pre)>code,.md .markdown-renderer .inline-code,.a-msg code{font-size:var(--md-b3)}.md .markdown-renderer :is(h1,h2,h3,h4) :not(pre)>code,.md .markdown-renderer :is(h1,h2,h3,h4) .inline-code{font-size:.9em}.queue-item,.queue-text,.ctx-num,.model-pill,.perm-pill,.mode-pill,.compact-chip,.qcard,.qtext,.qopt,.qbtn,.srow,.srow-val{font-size:var(--ui-font-size)}.qopt-desc,.srow-label{font-size:var(--ui-font-size-sm)}.code-block-header,.code-block-header *,.diff-lang,.queue-label,.qopt-key,.qstep,.srow-sub{font-size:var(--ui-font-size-xs)}@media(max-width:640px){.u-bub .u-text,.a-msg .msg,.ph{font-size:max(16px,var(--ui-font-size-xl))}}:root{--anim-rive-spin: .4167s;--anim-leftbar: .5333s;--anim-leftbar-shrink: .2s}#bar-divider{transform-box:view-box;transform-origin:9.3px 12px;transition:transform var(--anim-leftbar-shrink) linear}svg:hover #bar-divider,button:hover #bar-divider{transform:translate(-1.5px) scaleY(.5)}#bar-arrow{transform-box:view-box;transform-origin:0 0;transform:translate(63.95833%,50.625%) scale(0)}svg:hover #bar-arrow,button:hover #bar-arrow{animation:leftbar-arrow var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow{0%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:0}3.125%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:1}15.625%{transform:translate(59.0125%,50.625%) scale(-1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}}#bar-arrow-expand{transform-box:view-box;transform-origin:0 0;transform:translate(52.08333%,50.625%) scale(0)}svg:hover #bar-arrow-expand,button:hover #bar-arrow-expand{animation:leftbar-arrow-expand var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow-expand{0%{transform:translate(37.02917%,50.625%) scale(.6);opacity:0}3.125%{transform:translate(37.02917%,50.625%) scale(.6);opacity:1}15.625%{transform:translate(40.9875%,50.625%) scale(1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(1);opacity:1}}#p1{transform-box:view-box;transform-origin:0 0}svg:hover #p1,button:hover #p1{animation:nc-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes nc-plus-spin{0%{transform:translate(11.5px,11.5px)}8%{transform:translate(11.501px,11.48px) rotate(1.1795deg) scale(1.02022)}12%{transform:translate(11.511px,11.46px) rotate(2.8374deg) scale(1.03026)}20%{transform:translate(11.562px,11.401px) rotate(8.8167deg) scale(1.05041)}24%{transform:translate(11.608px,11.361px) rotate(13.4726deg) scale(1.06017)}32%{transform:translate(11.751px,11.278px) rotate(25.9719deg) scale(1.08008)}48%{transform:translate(12.149px,11.222px) rotate(55.8418deg) scale(1.12025)}52%{transform:translate(12.235px,11.236px) rotate(62.0737deg) scale(1.12953)}60%{transform:translate(12.371px,11.276px) rotate(72.1167deg) scale(1.14954)}68%{transform:translate(12.446px,11.346px) rotate(79.3018deg) scale(1.12048)}76%{transform:translate(12.488px,11.403px) rotate(84.2633deg) scale(1.09046)}88%{transform:translate(12.509px,11.464px) rotate(88.52deg) scale(1.04535)}to{transform:translate(12.5px,11.5px) rotate(90deg)}}#af-p1{transform-box:view-box;transform-origin:18.4px 16.3px}svg:hover #af-p1,button:hover #af-p1{animation:folder-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes folder-plus-spin{0%{transform:none}8%{transform:rotate(1.1795deg) scale(1.02022)}12%{transform:rotate(2.8374deg) scale(1.03026)}20%{transform:rotate(8.8167deg) scale(1.05041)}24%{transform:rotate(13.4726deg) scale(1.06017)}32%{transform:rotate(25.9719deg) scale(1.08008)}48%{transform:rotate(55.8418deg) scale(1.12025)}52%{transform:rotate(62.0737deg) scale(1.12953)}60%{transform:rotate(72.1167deg) scale(1.14954)}68%{transform:rotate(79.3018deg) scale(1.12048)}76%{transform:rotate(84.2633deg) scale(1.09046)}88%{transform:rotate(88.52deg) scale(1.04535)}to{transform:rotate(90deg)}} diff --git a/apps/kimi-code/dist-web/assets/index-CgXirkUy.js b/apps/kimi-code/dist-web/assets/index-CgXirkUy.js deleted file mode 100644 index c4634e058..000000000 --- a/apps/kimi-code/dist-web/assets/index-CgXirkUy.js +++ /dev/null @@ -1,651 +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-DHQD1STq.js","assets/_commonjsHelpers-CqkleIqs.js","assets/CodeBlockNode-DAv0N-7R.js","assets/safeRaf-DGuzXxDK.js","assets/index5-Bc_8yuJc.js","assets/index11-DDroxORK.js","assets/DesignSystemView-OnWAAu0u.js","assets/DesignSystemView-T_JuY7qG.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"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();/** -* @vue/shared v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function T2(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Dn={},ef=[],Rr=()=>{},wM=()=>!1,dp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),L2=e=>e.startsWith("onUpdate:"),pi=Object.assign,j8=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Rz=Object.prototype.hasOwnProperty,si=(e,t)=>Rz.call(e,t),Xt=Array.isArray,tf=e=>$f(e)==="[object Map]",nd=e=>$f(e)==="[object Set]",O6=e=>$f(e)==="[object Date]",Oz=e=>$f(e)==="[object RegExp]",pn=e=>typeof e=="function",Ai=e=>typeof e=="string",Cr=e=>typeof e=="symbol",oi=e=>e!==null&&typeof e=="object",H8=e=>(oi(e)||pn(e))&&pn(e.then)&&pn(e.catch),xM=Object.prototype.toString,$f=e=>xM.call(e),Pz=e=>$f(e).slice(8,-1),N2=e=>$f(e)==="[object Object]",F2=e=>Ai(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Nc=T2(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),B2=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},jz=/-\w/g,Ts=B2(e=>e.replace(jz,t=>t.slice(1).toUpperCase())),Hz=/\B([A-Z])/g,Yo=B2(e=>e.replace(Hz,"-$1").toLowerCase()),$2=B2(e=>e.charAt(0).toUpperCase()+e.slice(1)),pg=B2(e=>e?`on${$2(e)}`:""),Ps=(e,t)=>!Object.is(e,t),nf=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},_M=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},D2=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Vg=e=>{const t=Ai(e)?Number(e):NaN;return isNaN(t)?e:t};let P6;const z2=()=>P6||(P6=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Wz="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",qz=T2(Wz);function Vt(e){if(Xt(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],s=Ai(i)?Zz(i):Vt(i);if(s)for(const o in s)t[o]=s[o]}return t}else if(Ai(e)||oi(e))return e}const Uz=/;(?![^(]*\))/g,Kz=/:([^]+)/,Vz=/\/\*[^]*?\*\//g;function Zz(e){const t={};return e.replace(Vz,"").split(Uz).forEach(n=>{if(n){const i=n.split(Kz);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function $e(e){let t="";if(Ai(e))t=e;else if(Xt(e))for(let n=0;n<e.length;n++){const i=$e(e[n]);i&&(t+=i+" ")}else if(oi(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Gz(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Ai(t)&&(e.class=$e(t)),n&&(e.style=Vt(n)),e}const Qz="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Yz=T2(Qz);function SM(e){return!!e||e===""}function Jz(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=xa(e[i],t[i]);return n}function xa(e,t){if(e===t)return!0;let n=O6(e),i=O6(t);if(n||i)return n&&i?e.getTime()===t.getTime():!1;if(n=Cr(e),i=Cr(t),n||i)return e===t;if(n=Xt(e),i=Xt(t),n||i)return n&&i?Jz(e,t):!1;if(n=oi(e),i=oi(t),n||i){if(!n||!i)return!1;const s=Object.keys(e).length,o=Object.keys(t).length;if(s!==o)return!1;for(const r in e){const l=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(l&&!a||!l&&a||!xa(e[r],t[r]))return!1}}return String(e)===String(t)}function R2(e,t){return e.findIndex(n=>xa(n,t))}const MM=e=>!!(e&&e.__v_isRef===!0),B=e=>Ai(e)?e:e==null?"":Xt(e)||oi(e)&&(e.toString===xM||!pn(e.toString))?MM(e)?B(e.value):JSON.stringify(e,IM,2):String(e),IM=(e,t)=>MM(t)?IM(e,t.value):tf(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,s],o)=>(n[L9(i,o)+" =>"]=s,n),{})}:nd(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>L9(n))}:Cr(t)?L9(t):oi(t)&&!Xt(t)&&!N2(t)?String(t):t,L9=(e,t="")=>{var n;return Cr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function Xz(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 _s;class EM{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&&_s&&(_s.active?(this.parent=_s,this.index=(_s.scopes||(_s.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;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=_s;try{return _s=this,t()}finally{_s=n}}}on(){++this._on===1&&(this.prevScope=_s,_s=this)}off(){if(this._on>0&&--this._on===0){if(_s===this)_s=this.prevScope;else{let t=_s;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,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function eR(e){return new EM(e)}function O2(){return _s}function Df(e,t=!1){_s&&_s.cleanups.push(e)}let _i;const N9=new WeakSet;class Zg{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,_s&&(_s.active?_s.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,N9.has(this)&&(N9.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||LM(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,j6(this),NM(this);const t=_i,n=ll;_i=this,ll=!0;try{return this.fn()}finally{FM(this),_i=t,ll=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)U8(t);this.deps=this.depsTail=void 0,j6(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?N9.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){w4(this)&&this.run()}get dirty(){return w4(this)}}let TM=0,ih,sh;function LM(e,t=!1){if(e.flags|=8,t){e.next=sh,sh=e;return}e.next=ih,ih=e}function W8(){TM++}function q8(){if(--TM>0)return;if(sh){let t=sh;for(sh=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ih;){let t=ih;for(ih=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function NM(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function FM(e){let t,n=e.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),U8(i),tR(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=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&&(BM(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function BM(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Nh)||(e.globalVersion=Nh,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!w4(e))))return;e.flags|=2;const t=e.dep,n=_i,i=ll;_i=e,ll=!0;try{NM(e);const s=e.fn(e._value);(t.version===0||Ps(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{_i=n,ll=i,FM(e),e.flags&=-3}}function U8(e,t=!1){const{dep:n,prevSub:i,nextSub:s}=e;if(i&&(i.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)U8(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function tR(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function tQe(e,t){e.effect instanceof Zg&&(e=e.effect.fn);const n=new Zg(e);t&&pi(n,t);try{n.run()}catch(s){throw n.stop(),s}const i=n.run.bind(n);return i.effect=n,i}function nQe(e){e.effect.stop()}let ll=!0;const $M=[];function jl(){$M.push(ll),ll=!1}function Hl(){const e=$M.pop();ll=e===void 0?!0:e}function j6(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=_i;_i=void 0;try{t()}finally{_i=n}}}let Nh=0;class nR{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 P2{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(!_i||!ll||_i===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==_i)n=this.activeLink=new nR(_i,this),_i.deps?(n.prevDep=_i.depsTail,_i.depsTail.nextDep=n,_i.depsTail=n):_i.deps=_i.depsTail=n,DM(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=_i.depsTail,n.nextDep=void 0,_i.depsTail.nextDep=n,_i.depsTail=n,_i.deps===n&&(_i.deps=i)}return n}trigger(t){this.version++,Nh++,this.notify(t)}notify(t){W8();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{q8()}}}function DM(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)DM(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Gg=new WeakMap,Fc=Symbol(""),x4=Symbol(""),Fh=Symbol("");function go(e,t,n){if(ll&&_i){let i=Gg.get(e);i||Gg.set(e,i=new Map);let s=i.get(n);s||(i.set(n,s=new P2),s.map=i,s.key=n),s.track()}}function fa(e,t,n,i,s,o){const r=Gg.get(e);if(!r){Nh++;return}const l=a=>{a&&a.trigger()};if(W8(),t==="clear")r.forEach(l);else{const a=Xt(e),u=a&&F2(n);if(a&&n==="length"){const c=Number(i);r.forEach((d,f)=>{(f==="length"||f===Fh||!Cr(f)&&f>=c)&&l(d)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),u&&l(r.get(Fh)),t){case"add":a?u&&l(r.get("length")):(l(r.get(Fc)),tf(e)&&l(r.get(x4)));break;case"delete":a||(l(r.get(Fc)),tf(e)&&l(r.get(x4)));break;case"set":tf(e)&&l(r.get(Fc));break}}q8()}function iR(e,t){const n=Gg.get(e);return n&&n.get(t)}function xd(e){const t=Vn(e);return t===e?t:(go(t,"iterate",Fh),mr(e)?t:t.map(cl))}function j2(e){return go(e=Vn(e),"iterate",Fh),e}function Fl(e,t){return _a(e)?wf(du(e)?cl(t):t):cl(t)}const sR={__proto__:null,[Symbol.iterator](){return F9(this,Symbol.iterator,e=>Fl(this,e))},concat(...e){return xd(this).concat(...e.map(t=>Xt(t)?xd(t):t))},entries(){return F9(this,"entries",e=>(e[1]=Fl(this,e[1]),e))},every(e,t){return sa(this,"every",e,t,void 0,arguments)},filter(e,t){return sa(this,"filter",e,t,n=>n.map(i=>Fl(this,i)),arguments)},find(e,t){return sa(this,"find",e,t,n=>Fl(this,n),arguments)},findIndex(e,t){return sa(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return sa(this,"findLast",e,t,n=>Fl(this,n),arguments)},findLastIndex(e,t){return sa(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return sa(this,"forEach",e,t,void 0,arguments)},includes(...e){return B9(this,"includes",e)},indexOf(...e){return B9(this,"indexOf",e)},join(e){return xd(this).join(e)},lastIndexOf(...e){return B9(this,"lastIndexOf",e)},map(e,t){return sa(this,"map",e,t,void 0,arguments)},pop(){return y1(this,"pop")},push(...e){return y1(this,"push",e)},reduce(e,...t){return H6(this,"reduce",e,t)},reduceRight(e,...t){return H6(this,"reduceRight",e,t)},shift(){return y1(this,"shift")},some(e,t){return sa(this,"some",e,t,void 0,arguments)},splice(...e){return y1(this,"splice",e)},toReversed(){return xd(this).toReversed()},toSorted(e){return xd(this).toSorted(e)},toSpliced(...e){return xd(this).toSpliced(...e)},unshift(...e){return y1(this,"unshift",e)},values(){return F9(this,"values",e=>Fl(this,e))}};function F9(e,t,n){const i=j2(e),s=i[t]();return i!==e&&!mr(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const oR=Array.prototype;function sa(e,t,n,i,s,o){const r=j2(e),l=r!==e&&!mr(e),a=r[t];if(a!==oR[t]){const d=a.apply(e,o);return l?cl(d):d}let u=n;r!==e&&(l?u=function(d,f){return n.call(this,Fl(e,d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=a.call(r,u,i);return l&&s?s(c):c}function H6(e,t,n,i){const s=j2(e),o=s!==e&&!mr(e);let r=n,l=!1;s!==e&&(o?(l=i.length===0,r=function(u,c,d){return l&&(l=!1,u=Fl(e,u)),n.call(this,u,Fl(e,c),d,e)}):n.length>3&&(r=function(u,c,d){return n.call(this,u,c,d,e)}));const a=s[t](r,...i);return l?Fl(e,a):a}function B9(e,t,n){const i=Vn(e);go(i,"iterate",Fh);const s=i[t](...n);return(s===-1||s===!1)&&q2(n[0])?(n[0]=Vn(n[0]),i[t](...n)):s}function y1(e,t,n=[]){jl(),W8();const i=Vn(e)[t].apply(e,n);return q8(),Hl(),i}const rR=T2("__proto__,__v_isRef,__isVue"),zM=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Cr));function lR(e){Cr(e)||(e=String(e));const t=Vn(this);return go(t,"has",e),t.hasOwnProperty(e)}class RM{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return i===(s?o?qM:WM:o?HM:jM).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const r=Xt(t);if(!s){let a;if(r&&(a=sR[n]))return a;if(n==="hasOwnProperty")return lR}const l=Reflect.get(t,n,ss(t)?t:i);if((Cr(n)?zM.has(n):rR(n))||(s||go(t,"get",n),o))return l;if(ss(l)){const a=r&&F2(n)?l:l.value;return s&&oi(a)?S4(a):a}return oi(l)?s?S4(l):Es(l):l}}class OM extends RM{constructor(t=!1){super(!1,t)}set(t,n,i,s){let o=t[n];const r=Xt(t)&&F2(n);if(!this._isShallow){const u=_a(o);if(!mr(i)&&!_a(i)&&(o=Vn(o),i=Vn(i)),!r&&ss(o)&&!ss(i))return u||(o.value=i),!0}const l=r?Number(n)<t.length:si(t,n),a=Reflect.set(t,n,i,ss(t)?t:s);return t===Vn(s)&&a&&(l?Ps(i,o)&&fa(t,"set",n,i):fa(t,"add",n,i)),a}deleteProperty(t,n){const i=si(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&i&&fa(t,"delete",n,void 0),s}has(t,n){const i=Reflect.has(t,n);return(!Cr(n)||!zM.has(n))&&go(t,"has",n),i}ownKeys(t){return go(t,"iterate",Xt(t)?"length":Fc),Reflect.ownKeys(t)}}class PM extends RM{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const aR=new OM,uR=new PM,cR=new OM(!0),dR=new PM(!0),_4=e=>e,p0=e=>Reflect.getPrototypeOf(e);function fR(e,t,n){return function(...i){const s=this.__v_raw,o=Vn(s),r=tf(o),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,u=s[e](...i),c=n?_4:t?wf:cl;return!t&&go(o,"iterate",a?x4:Fc),pi(Object.create(u),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}}})}}function g0(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function hR(e,t){const n={get(s){const o=this.__v_raw,r=Vn(o),l=Vn(s);e||(Ps(s,l)&&go(r,"get",s),go(r,"get",l));const{has:a}=p0(r),u=t?_4:e?wf:cl;if(a.call(r,s))return u(o.get(s));if(a.call(r,l))return u(o.get(l));o!==r&&o.get(s)},get size(){const s=this.__v_raw;return!e&&go(Vn(s),"iterate",Fc),s.size},has(s){const o=this.__v_raw,r=Vn(o),l=Vn(s);return e||(Ps(s,l)&&go(r,"has",s),go(r,"has",l)),s===l?o.has(s):o.has(s)||o.has(l)},forEach(s,o){const r=this,l=r.__v_raw,a=Vn(l),u=t?_4:e?wf:cl;return!e&&go(a,"iterate",Fc),l.forEach((c,d)=>s.call(o,u(c),u(d),r))}};return pi(n,e?{add:g0("add"),set:g0("set"),delete:g0("delete"),clear:g0("clear")}:{add(s){const o=Vn(this),r=p0(o),l=Vn(s),a=!t&&!mr(s)&&!_a(s)?l:s;return r.has.call(o,a)||Ps(s,a)&&r.has.call(o,s)||Ps(l,a)&&r.has.call(o,l)||(o.add(a),fa(o,"add",a,a)),this},set(s,o){!t&&!mr(o)&&!_a(o)&&(o=Vn(o));const r=Vn(this),{has:l,get:a}=p0(r);let u=l.call(r,s);u||(s=Vn(s),u=l.call(r,s));const c=a.call(r,s);return r.set(s,o),u?Ps(o,c)&&fa(r,"set",s,o):fa(r,"add",s,o),this},delete(s){const o=Vn(this),{has:r,get:l}=p0(o);let a=r.call(o,s);a||(s=Vn(s),a=r.call(o,s)),l&&l.call(o,s);const u=o.delete(s);return a&&fa(o,"delete",s,void 0),u},clear(){const s=Vn(this),o=s.size!==0,r=s.clear();return o&&fa(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=fR(s,e,t)}),n}function H2(e,t){const n=hR(e,t);return(i,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?i:Reflect.get(si(n,s)&&s in i?n:i,s,o)}const pR={get:H2(!1,!1)},gR={get:H2(!1,!0)},mR={get:H2(!0,!1)},vR={get:H2(!0,!0)},jM=new WeakMap,HM=new WeakMap,WM=new WeakMap,qM=new WeakMap;function yR(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Es(e){return _a(e)?e:W2(e,!1,aR,pR,jM)}function UM(e){return W2(e,!1,cR,gR,HM)}function S4(e){return W2(e,!0,uR,mR,WM)}function iQe(e){return W2(e,!0,dR,vR,qM)}function W2(e,t,n,i,s){if(!oi(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=s.get(e);if(o)return o;const r=yR(Pz(e));if(r===0)return e;const l=new Proxy(e,r===2?i:n);return s.set(e,l),l}function du(e){return _a(e)?du(e.__v_raw):!!(e&&e.__v_isReactive)}function _a(e){return!!(e&&e.__v_isReadonly)}function mr(e){return!!(e&&e.__v_isShallow)}function q2(e){return e?!!e.__v_raw:!1}function Vn(e){const t=e&&e.__v_raw;return t?Vn(t):e}function wt(e){return!si(e,"__v_skip")&&Object.isExtensible(e)&&_M(e,"__v_skip",!0),e}const cl=e=>oi(e)?Es(e):e,wf=e=>oi(e)?S4(e):e;function ss(e){return e?e.__v_isRef===!0:!1}function G(e){return KM(e,!1)}function gl(e){return KM(e,!0)}function KM(e,t){return ss(e)?e:new bR(e,t)}class bR{constructor(t,n){this.dep=new P2,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Vn(t),this._value=n?t:cl(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||mr(t)||_a(t);t=i?t:Vn(t),Ps(t,n)&&(this._rawValue=t,this._value=i?t:cl(t),this.dep.trigger())}}function kR(e){e.dep&&e.dep.trigger()}function h(e){return ss(e)?e.value:e}function gg(e){return pn(e)?e():h(e)}const AR={get:(e,t,n)=>t==="__v_raw"?e:h(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const s=e[t];return ss(s)&&!ss(n)?(s.value=n,!0):Reflect.set(e,t,n,i)}};function VM(e){return du(e)?e:new Proxy(e,AR)}class CR{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new P2,{get:i,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function wR(e){return new CR(e)}function sQe(e){const t=Xt(e)?new Array(e.length):{};for(const n in e)t[n]=ZM(e,n);return t}class xR{constructor(t,n,i){this._object=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._key=Cr(n)?n:String(n),this._raw=Vn(t);let s=!0,o=t;if(!Xt(t)||Cr(this._key)||!F2(this._key))do s=!q2(o)||mr(o);while(s&&(o=o.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=h(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ss(this._raw[this._key])){const n=this._object[this._key];if(ss(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return iR(this._raw,this._key)}}class _R{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 oQe(e,t,n){return ss(e)?e:pn(e)?new _R(e):oi(e)&&arguments.length>1?ZM(e,t,n):G(e)}function ZM(e,t,n){return new xR(e,t,n)}class SR{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new P2(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Nh-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&_i!==this)return LM(this,!0),!0}get value(){const t=this.dep.track();return BM(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function MR(e,t,n=!1){let i,s;return pn(e)?i=e:(i=e.get,s=e.set),new SR(i,s,n)}const rQe={GET:"get",HAS:"has",ITERATE:"iterate"},lQe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},m0={},Qg=new WeakMap;let eu;function aQe(){return eu}function IR(e,t=!1,n=eu){if(n){let i=Qg.get(n);i||Qg.set(n,i=[]),i.push(e)}}function ER(e,t,n=Dn){const{immediate:i,deep:s,once:o,scheduler:r,augmentJob:l,call:a}=n,u=v=>s?v:mr(v)||s===!1||s===0?ha(v,1):ha(v);let c,d,f,p,g=!1,m=!1;if(ss(e)?(d=()=>e.value,g=mr(e)):du(e)?(d=()=>u(e),g=!0):Xt(e)?(m=!0,g=e.some(v=>du(v)||mr(v)),d=()=>e.map(v=>{if(ss(v))return v.value;if(du(v))return u(v);if(pn(v))return a?a(v,2):v()})):pn(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){jl();try{f()}finally{Hl()}}const v=eu;eu=c;try{return a?a(e,3,[p]):e(p)}finally{eu=v}}:d=Rr,t&&s){const v=d,x=s===!0?1/0:s;d=()=>ha(v(),x)}const y=O2(),w=()=>{c.stop(),y&&y.active&&j8(y.effects,c)};if(o&&t){const v=t;t=(...x)=>{const S=v(...x);return w(),S}}let k=m?new Array(e.length).fill(m0):m0;const A=v=>{if(!(!(c.flags&1)||!c.dirty&&!v))if(t){const x=c.run();if(v||s||g||(m?x.some((S,I)=>Ps(S,k[I])):Ps(x,k))){f&&f();const S=eu;eu=c;try{const I=[x,k===m0?void 0:m&&k[0]===m0?[]:k,p];k=x,a?a(t,3,I):t(...I)}finally{eu=S}}}else c.run()};return l&&l(A),c=new Zg(d),c.scheduler=r?()=>r(A,!1):A,p=v=>IR(v,!1,c),f=c.onStop=()=>{const v=Qg.get(c);if(v){if(a)a(v,4);else for(const x of v)x();Qg.delete(c)}},t?i?A(!0):k=c.run():r?r(A.bind(null,!0),!0):c.run(),w.pause=c.pause.bind(c),w.resume=c.resume.bind(c),w.stop=w,w}function ha(e,t=1/0,n){if(t<=0||!oi(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ss(e))ha(e.value,t,n);else if(Xt(e))for(let i=0;i<e.length;i++)ha(e[i],t,n);else if(nd(e)||tf(e))e.forEach(i=>{ha(i,t,n)});else if(N2(e)){for(const i in e)ha(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&ha(e[i],t,n)}return e}/** -* @vue/runtime-core v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const GM=[];function TR(e){GM.push(e)}function LR(){GM.pop()}function uQe(e,t){}const cQe={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"},NR={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 fp(e,t,n,i){try{return i?e(...i):e()}catch(s){zf(s,t,n)}}function Pr(e,t,n,i){if(pn(e)){const s=fp(e,t,n,i);return s&&H8(s)&&s.catch(o=>{zf(o,t,n)}),s}if(Xt(e)){const s=[];for(let o=0;o<e.length;o++)s.push(Pr(e[o],t,n,i));return s}}function zf(e,t,n,i=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||Dn;if(t){let l=t.parent;const a=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,a,u)===!1)return}l=l.parent}if(o){jl(),fp(o,null,10,[e,a,u]),Hl();return}}FR(e,n,s,i,r)}function FR(e,t,n,i=!0,s=!1){if(s)throw e;console.error(e)}const Eo=[];let Tl=-1;const sf=[];let tu=null,Dd=0;const QM=Promise.resolve();let Yg=null;function At(e){const t=Yg||QM;return e?t.then(this?e.bind(this):e):t}function BR(e){let t=Tl+1,n=Eo.length;for(;t<n;){const i=t+n>>>1,s=Eo[i],o=Bh(s);o<e||o===e&&s.flags&2?t=i+1:n=i}return t}function K8(e){if(!(e.flags&1)){const t=Bh(e),n=Eo[Eo.length-1];!n||!(e.flags&2)&&t>=Bh(n)?Eo.push(e):Eo.splice(BR(t),0,e),e.flags|=1,YM()}}function YM(){Yg||(Yg=QM.then(JM))}function Jg(e){Xt(e)?sf.push(...e):tu&&e.id===-1?tu.splice(Dd+1,0,e):e.flags&1||(sf.push(e),e.flags|=1),YM()}function W6(e,t,n=Tl+1){for(;n<Eo.length;n++){const i=Eo[n];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;Eo.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Xg(e){if(sf.length){const t=[...new Set(sf)].sort((n,i)=>Bh(n)-Bh(i));if(sf.length=0,tu){tu.push(...t);return}for(tu=t,Dd=0;Dd<tu.length;Dd++){const n=tu[Dd];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}tu=null,Dd=0}}const Bh=e=>e.id==null?e.flags&2?-1:1/0:e.id;function JM(e){try{for(Tl=0;Tl<Eo.length;Tl++){const t=Eo[Tl];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),fp(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Tl<Eo.length;Tl++){const t=Eo[Tl];t&&(t.flags&=-2)}Tl=-1,Eo.length=0,Xg(),Yg=null,(Eo.length||sf.length)&&JM()}}let zd,v0=[];function XM(e,t){var n,i;zd=e,zd?(zd.enabled=!0,v0.forEach(({event:s,args:o})=>zd.emit(s,...o)),v0=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{XM(o,t)}),setTimeout(()=>{zd||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,v0=[])},3e3)):v0=[]}let to=null,U2=null;function $h(e){const t=to;return to=e,U2=e&&e.type.__scopeId||null,t}function dQe(e){U2=e}function fQe(){U2=null}const hQe=e=>he;function he(e,t=to,n){if(!t||e._n)return e;const i=(...s)=>{i._d&&om(-1);const o=$h(t);let r;try{r=e(...s)}finally{$h(o),i._d&&om(1)}return r};return i._n=!0,i._c=!0,i._d=!0,i}function Nn(e,t){if(to===null)return e;const n=mp(to),i=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,r,l,a=Dn]=t[s];o&&(pn(o)&&(o={mounted:o,updated:o}),o.deep&&ha(r),i.push({dir:o,instance:n,value:r,oldValue:void 0,arg:l,modifiers:a}))}return e}function Nl(e,t,n,i){const s=e.dirs,o=t&&t.dirs;for(let r=0;r<s.length;r++){const l=s[r];o&&(l.oldValue=o[r].value);let a=l.dir[i];a&&(jl(),Pr(a,n,8,[e.el,l,e,t]),Hl())}}function Pn(e,t){if(eo){let n=eo.provides;const i=eo.parent&&eo.parent.provides;i===n&&(n=eo.provides=Object.create(i)),n[e]=t}}function un(e,t,n=!1){const i=ys();if(i||Bc){let s=Bc?Bc._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&pn(t)?t.call(i&&i.proxy):t}}function pQe(){return!!(ys()||Bc)}const $R=Symbol.for("v-scx"),DR=()=>un($R);function M4(e,t){return hp(e,null,t)}function gQe(e,t){return hp(e,null,{flush:"post"})}function zR(e,t){return hp(e,null,{flush:"sync"})}function Ge(e,t,n){return hp(e,t,n)}function hp(e,t,n=Dn){const{immediate:i,deep:s,flush:o,once:r}=n,l=pi({},n),a=t&&i||!t&&o!=="post";let u;if(Wc){if(o==="sync"){const p=DR();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Rr,p.resume=Rr,p.pause=Rr,p}}const c=eo;l.call=(p,g,m)=>Pr(p,c,g,m);let d=!1;o==="post"?l.scheduler=p=>{cs(p,c&&c.suspense)}:o!=="sync"&&(d=!0,l.scheduler=(p,g)=>{g?p():K8(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=ER(e,t,l);return Wc&&(u?u.push(f):a&&f()),f}function RR(e,t,n){const i=this.proxy,s=Ai(e)?e.includes(".")?eI(i,e):()=>i[e]:e.bind(i,i);let o;pn(t)?o=t:(o=t.handler,n=t);const r=Of(this),l=hp(s,o.bind(i),n);return r(),l}function eI(e,t){const n=t.split(".");return()=>{let i=e;for(let s=0;s<n.length&&i;s++)i=i[n[s]];return i}}const Ga=new WeakMap,tI=Symbol("_vte"),nI=e=>e.__isTeleport,bc=e=>e&&(e.disabled||e.disabled===""),OR=e=>e&&(e.defer||e.defer===""),q6=e=>typeof SVGElement<"u"&&e instanceof SVGElement,U6=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,I4=(e,t)=>{const n=e&&e.to;return Ai(n)?t?t(n):null:n},PR={name:"Teleport",__isTeleport:!0,process(e,t,n,i,s,o,r,l,a,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:g,createText:m,createComment:y,parentNode:w}}=u,k=bc(t.props);let{dynamicChildren:A}=t;const v=(I,_,E)=>{I.shapeFlag&16&&c(I.children,_,E,s,o,r,l,a)},x=(I=t)=>{const _=bc(I.props),E=I.target=I4(I.props,g),N=E4(E,I,m,p);E&&(r!=="svg"&&q6(E)?r="svg":r!=="mathml"&&U6(E)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(E),_||(v(I,E,N),D1(I,!1)))},S=I=>{const _=()=>{if(Ga.get(I)===_){if(Ga.delete(I),bc(I.props)){const E=w(I.el)||n;v(I,E,I.anchor),D1(I,!0)}x(I)}};Ga.set(I,_),cs(_,o)};if(e==null){const I=t.el=m(""),_=t.anchor=m("");if(p(I,n,i),p(_,n,i),OR(t.props)||o&&o.pendingBranch){S(t);return}k&&(v(t,n,_),D1(t,!0)),x()}else{t.el=e.el;const I=t.anchor=e.anchor,_=Ga.get(e);if(_){_.flags|=8,Ga.delete(e),S(t);return}t.targetStart=e.targetStart;const E=t.target=e.target,N=t.targetAnchor=e.targetAnchor,D=bc(e.props),T=D?n:E,$=D?I:N;if(r==="svg"||q6(E)?r="svg":(r==="mathml"||U6(E))&&(r="mathml"),A?(f(e.dynamicChildren,A,T,s,o,r,l),n5(e,t,!0)):a||d(e,t,T,$,s,o,r,l,!1),k)D?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):y0(t,n,I,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const O=I4(t.props,g);O&&(t.target=O,y0(t,O,null,u,0))}else D&&y0(t,E,N,u,1);D1(t,k)}},remove(e,t,n,{um:i,o:{remove:s}},o){const{shapeFlag:r,children:l,anchor:a,targetStart:u,targetAnchor:c,target:d,props:f}=e,p=bc(f),g=o||!p,m=Ga.get(e);if(m&&(m.flags|=8,Ga.delete(e)),d&&(s(u),s(c)),o&&s(a),!m&&(p||d)&&r&16)for(let y=0;y<l.length;y++){const w=l[y];i(w,t,n,g,!!w.dynamicChildren)}},move:y0,hydrate:jR};function y0(e,t,n,{o:{insert:i},m:s},o=2){o===0&&i(e.targetAnchor,t,n);const{el:r,anchor:l,shapeFlag:a,children:u,props:c}=e,d=o===2;if(d&&i(r,t,n),!Ga.has(e)&&(!d||bc(c))&&a&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&i(l,t,n)}function jR(e,t,n,i,s,o,{o:{nextSibling:r,parentNode:l,querySelector:a,insert:u,createText:c}},d){function f(y,w){let k=w;for(;k;){if(k&&k.nodeType===8){if(k.data==="teleport start anchor")t.targetStart=k;else if(k.data==="teleport anchor"){t.targetAnchor=k,y._lpa=t.targetAnchor&&r(t.targetAnchor);break}}k=r(k)}}function p(y,w){w.anchor=d(r(y),w,l(y),n,i,s,o)}const g=t.target=I4(t.props,a),m=bc(t.props);if(g){const y=g._lpa||g.firstChild;t.shapeFlag&16&&(m?(p(e,t),f(g,y),t.targetAnchor||E4(g,t,c,u,l(e)===g?e:null)):(t.anchor=r(e),f(g,y),t.targetAnchor||E4(g,t,c,u),d(y&&r(y),t,g,n,i,s,o))),D1(t,m)}else m&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=r(e));return t.anchor&&r(t.anchor)}const jr=PR;function D1(e,t){const n=e.ctx;if(n&&n.ut){let i,s;for(t?(i=e.el,s=e.anchor):(i=e.targetStart,s=e.targetAnchor);i&&i!==s;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function E4(e,t,n,i,s=null){const o=t.targetStart=n(""),r=t.targetAnchor=n("");return o[tI]=r,e&&(i(o,e,s),i(r,e,s)),r}const Br=Symbol("_leaveCb"),b1=Symbol("_enterCb");function iI(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return gn(()=>{e.isMounted=!0}),Gn(()=>{e.isUnmounting=!0}),e}const Ir=[Function,Array],sI={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ir,onEnter:Ir,onAfterEnter:Ir,onEnterCancelled:Ir,onBeforeLeave:Ir,onLeave:Ir,onAfterLeave:Ir,onLeaveCancelled:Ir,onBeforeAppear:Ir,onAppear:Ir,onAfterAppear:Ir,onAppearCancelled:Ir},oI=e=>{const t=e.subTree;return t.component?oI(t.component):t},HR={name:"BaseTransition",props:sI,setup(e,{slots:t}){const n=ys(),i=iI();return()=>{const s=t.default&&V8(t.default(),!0),o=s&&s.length?rI(s):n.subTree?te():void 0;if(!o)return;const r=Vn(e),{mode:l}=r;if(i.isLeaving)return $9(o);const a=K6(o);if(!a)return $9(o);let u=Dh(a,r,i,n,d=>u=d);a.type!==hs&&yu(a,u);let c=n.subTree&&K6(n.subTree);if(c&&c.type!==hs&&!tl(c,a)&&oI(n).type!==hs){let d=Dh(c,r,i,n);if(yu(c,d),l==="out-in"&&a.type!==hs)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},$9(o);l==="in-out"&&a.type!==hs?d.delayLeave=(f,p,g)=>{const m=lI(i,c);m[String(c.key)]=c,f[Br]=()=>{p(),f[Br]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{g(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return o}}};function rI(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==hs){t=n;break}}return t}const WR=HR;function lI(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function Dh(e,t,n,i,s){const{appear:o,mode:r,persisted:l=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:g,onLeaveCancelled:m,onBeforeAppear:y,onAppear:w,onAfterAppear:k,onAppearCancelled:A}=t,v=String(e.key),x=lI(n,e),S=(E,N)=>{E&&Pr(E,i,9,N)},I=(E,N)=>{const D=N[1];S(E,N),Xt(E)?E.every(T=>T.length<=1)&&D():E.length<=1&&D()},_={mode:r,persisted:l,beforeEnter(E){let N=a;if(!n.isMounted)if(o)N=y||a;else return;E[Br]&&E[Br](!0);const D=x[v];D&&tl(e,D)&&D.el[Br]&&D.el[Br](),S(N,[E])},enter(E){if(x[v]===e)return;let N=u,D=c,T=d;if(!n.isMounted)if(o)N=w||u,D=k||c,T=A||d;else return;let $=!1;E[b1]=P=>{$||($=!0,P?S(T,[E]):S(D,[E]),_.delayedLeave&&_.delayedLeave(),E[b1]=void 0)};const O=E[b1].bind(null,!1);N?I(N,[E,O]):O()},leave(E,N){const D=String(e.key);if(E[b1]&&E[b1](!0),n.isUnmounting)return N();S(f,[E]);let T=!1;E[Br]=O=>{T||(T=!0,N(),O?S(m,[E]):S(g,[E]),E[Br]=void 0,x[D]===e&&delete x[D])};const $=E[Br].bind(null,!1);x[D]=e,p?I(p,[E,$]):$()},clone(E){const N=Dh(E,t,n,i,s);return s&&s(N),N}};return _}function $9(e){if(pp(e))return e=Sa(e),e.children=null,e}function K6(e){if(!pp(e))return nI(e.type)&&e.children?rI(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&&pn(n.default))return n.default()}}function yu(e,t){e.shapeFlag&6&&e.component?(e.transition=t,yu(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 V8(e,t=!1,n){let i=[],s=0;for(let o=0;o<e.length;o++){let r=e[o];const l=n==null?r.key:String(n)+String(r.key!=null?r.key:o);r.type===Be?(r.patchFlag&128&&s++,i=i.concat(V8(r.children,t,l))):(t||r.type!==hs)&&i.push(l!=null?Sa(r,{key:l}):r)}if(s>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}function nt(e,t){return pn(e)?pi({name:e.name},t,{setup:e}):e}function qR(){const e=ys();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Z8(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function mQe(e){const t=ys(),n=gl(null);if(t){const s=t.refs===Dn?t.refs={}:t.refs;Object.defineProperty(s,e,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}function V6(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const em=new WeakMap;function of(e,t,n,i,s=!1){if(Xt(e)){e.forEach((m,y)=>of(m,t&&(Xt(t)?t[y]:t),n,i,s));return}if(ka(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&of(e,t,n,i.component.subTree);return}const o=i.shapeFlag&4?mp(i.component):i.el,r=s?null:o,{i:l,r:a}=e,u=t&&t.r,c=l.refs===Dn?l.refs={}:l.refs,d=l.setupState,f=Vn(d),p=d===Dn?wM:m=>V6(c,m)?!1:si(f,m),g=(m,y)=>!(y&&V6(c,y));if(u!=null&&u!==a){if(Z6(t),Ai(u))c[u]=null,p(u)&&(d[u]=null);else if(ss(u)){const m=t;g(u,m.k)&&(u.value=null),m.k&&(c[m.k]=null)}}if(pn(a)){jl();try{fp(a,l,12,[r,c])}finally{Hl()}}else{const m=Ai(a),y=ss(a);if(m||y){const w=()=>{if(e.f){const k=m?p(a)?d[a]:c[a]:g()||!e.k?a.value:c[e.k];if(s)Xt(k)&&j8(k,o);else if(Xt(k))k.includes(o)||k.push(o);else if(m)c[a]=[o],p(a)&&(d[a]=c[a]);else{const A=[o];g(a,e.k)&&(a.value=A),e.k&&(c[e.k]=A)}}else m?(c[a]=r,p(a)&&(d[a]=r)):y&&(g(a,e.k)&&(a.value=r),e.k&&(c[e.k]=r))};if(r){const k=()=>{w(),em.delete(e)};k.id=-1,em.set(e,k),cs(k,n)}else Z6(e),w()}}}function Z6(e){const t=em.get(e);t&&(t.flags|=8,em.delete(e))}let G6=!1;const _d=()=>{G6||(console.error("Hydration completed but contains mismatches."),G6=!0)},UR=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",KR=e=>e.namespaceURI.includes("MathML"),b0=e=>{if(e.nodeType===1){if(UR(e))return"svg";if(KR(e))return"mathml"}},qd=e=>e.nodeType===8;function VR(e){const{mt:t,p:n,o:{patchProp:i,createText:s,nextSibling:o,parentNode:r,remove:l,insert:a,createComment:u}}=e,c=(A,v)=>{if(!v.hasChildNodes()){n(null,A,v),Xg(),v._vnode=A;return}d(v.firstChild,A,null,null,null),Xg(),v._vnode=A},d=(A,v,x,S,I,_=!1)=>{_=_||!!v.dynamicChildren;const E=qd(A)&&A.data==="[",N=()=>m(A,v,x,S,I,E),{type:D,ref:T,shapeFlag:$,patchFlag:O}=v;let P=A.nodeType;v.el=A,O===-2&&(_=!1,v.dynamicChildren=null);let R=null;switch(D){case fu:P!==3?v.children===""?(a(v.el=s(""),r(A),A),R=A):R=N():(A.data!==v.children&&(_d(),A.data=v.children),R=o(A));break;case hs:k(A)?(R=o(A),w(v.el=A.content.firstChild,A,x)):P!==8||E?R=N():R=o(A);break;case lf:if(E&&(A=o(A),P=A.nodeType),P===1||P===3){R=A;const j=!v.children.length;for(let z=0;z<v.staticCount;z++)j&&(v.children+=R.nodeType===1?R.outerHTML:R.data),z===v.staticCount-1&&(v.anchor=R),R=o(R);return E?o(R):R}else N();break;case Be:E?R=g(A,v,x,S,I,_):R=N();break;default:if($&1)(P!==1||v.type.toLowerCase()!==A.tagName.toLowerCase())&&!k(A)?R=N():R=f(A,v,x,S,I,_);else if($&6){v.slotScopeIds=I;const j=r(A);if(E?R=y(A):qd(A)&&A.data==="teleport start"?R=y(A,A.data,"teleport end"):R=o(A),t(v,j,null,x,S,b0(j),_),ka(v)&&!v.type.__asyncResolved){let z;E?(z=V(Be),z.anchor=R?R.previousSibling:j.lastChild):z=A.nodeType===3?qe(""):V("div"),z.el=A,v.component.subTree=z}}else $&64?P!==8?R=N():R=v.type.hydrate(A,v,x,S,I,_,e,p):$&128&&(R=v.type.hydrate(A,v,x,S,b0(r(A)),I,_,e,d))}return T!=null&&of(T,null,S,v),R},f=(A,v,x,S,I,_)=>{_=_||!!v.dynamicChildren;const{type:E,dynamicProps:N,props:D,patchFlag:T,shapeFlag:$,dirs:O,transition:P}=v,R=E==="input"||E==="option",j=!!N;if(R||j||T!==-1){O&&Nl(v,null,x,"created");let z=!1;if(k(A)){z=MI(null,P)&&x&&x.vnode.props&&x.vnode.props.appear;const q=A.content.firstChild;if(z){const W=q.getAttribute("class");W&&(q.$cls=W),P.beforeEnter(q)}w(q,A,x),v.el=A=q}if($&16&&!(D&&(D.innerHTML||D.textContent))){let q=p(A.firstChild,v,A,x,S,I,_);for(q&&!mg(A,1)&&_d();q;){const W=q;q=q.nextSibling,l(W)}}else if($&8){let q=v.children;q[0]===` -`&&(A.tagName==="PRE"||A.tagName==="TEXTAREA")&&(q=q.slice(1));const{textContent:W}=A;W!==q&&W!==q.replace(/\r\n|\r/g,` -`)&&(mg(A,0)||_d(),A.textContent=v.children)}if(D){if(R||j||!_||T&48){const q=A.tagName.includes("-");for(const W in D)(R&&(W.endsWith("value")||W==="indeterminate")||dp(W)&&!Nc(W)||W[0]==="."||q&&!Nc(W)||N&&N.includes(W))&&i(A,W,null,D[W],void 0,x)}else if(D.onClick)i(A,"onClick",null,D.onClick,void 0,x);else if(T&4&&du(D.style))for(const q in D.style)D.style[q]}let K;(K=D&&D.onVnodeBeforeMount)&&Ko(K,x,v),O&&Nl(v,null,x,"beforeMount"),((K=D&&D.onVnodeMounted)||O||z)&&LI(()=>{K&&Ko(K,x,v),z&&P.enter(A),O&&Nl(v,null,x,"mounted")},S)}return A.nextSibling},p=(A,v,x,S,I,_,E)=>{E=E||!!v.dynamicChildren;const N=v.children,D=N.length;let T=!1;for(let $=0;$<D;$++){const O=E?N[$]:N[$]=Qo(N[$]),P=O.type===fu;A?(P&&!E&&$+1<D&&Qo(N[$+1]).type===fu&&(a(s(A.data.slice(O.children.length)),x,o(A)),A.data=O.children),A=d(A,O,S,I,_,E)):P&&!O.children?a(O.el=s(""),x):(T||(T=!0,mg(x,1)||_d()),n(null,O,x,null,S,I,b0(x),_))}return A},g=(A,v,x,S,I,_)=>{const{slotScopeIds:E}=v;E&&(I=I?I.concat(E):E);const N=r(A),D=p(o(A),v,N,x,S,I,_);return D&&qd(D)&&D.data==="]"?o(v.anchor=D):(_d(),a(v.anchor=u("]"),N,D),D)},m=(A,v,x,S,I,_)=>{if(GR(A,v)||_d(),v.el=null,_){const D=y(A);for(;;){const T=o(A);if(T&&T!==D)l(T);else break}}const E=o(A),N=r(A);return l(A),n(null,v,N,E,x,S,b0(N),I),x&&(x.vnode.el=v.el,Z2(x,v.el)),E},y=(A,v="[",x="]")=>{let S=0;for(;A;)if(A=o(A),A&&qd(A)&&(A.data===v&&S++,A.data===x)){if(S===0)return o(A);S--}return A},w=(A,v,x)=>{const S=v.parentNode;S&&S.replaceChild(A,v);let I=x;for(;I;)I.vnode.el===v&&(I.vnode.el=I.subTree.el=A),I=I.parent},k=A=>A.nodeType===1&&A.tagName==="TEMPLATE";return[c,d]}const tm="data-allow-mismatch",ZR={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function mg(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(tm);)e=e.parentElement;return G8(e&&e.getAttribute(tm),t)}function G8(e,t){if(e==null)return!1;if(e==="")return!0;{const n=e.split(",");return t===0&&n.includes("children")?!0:n.includes(ZR[t])}}function GR(e,t){return mg(e.parentElement,1)||QR(e)||YR(t)}function QR(e){return e.nodeType===1&&G8(e.getAttribute(tm),1)}function YR({props:e}){const t=e&&e[tm];return typeof t=="string"&&G8(t,1)}const JR=z2().requestIdleCallback||(e=>setTimeout(e,1)),XR=z2().cancelIdleCallback||(e=>clearTimeout(e)),vQe=(e=1e4)=>t=>{const n=JR(t,{timeout:e});return()=>XR(n)};function eO(e){const{top:t,left:n,bottom:i,right:s}=e.getBoundingClientRect(),{innerHeight:o,innerWidth:r}=window;return(t>0&&t<o||i>0&&i<o)&&(n>0&&n<r||s>0&&s<r)}const yQe=e=>(t,n)=>{const i=new IntersectionObserver(s=>{for(const o of s)if(o.isIntersecting){i.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(eO(s))return t(),i.disconnect(),!1;i.observe(s)}}),()=>i.disconnect()},bQe=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},kQe=(e=[])=>(t,n)=>{Ai(e)&&(e=[e]);let i=!1;const s=r=>{i||(i=!0,o(),t(),r.target.dispatchEvent(new r.constructor(r.type,r)))},o=()=>{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})}),o};function tO(e,t){if(qd(e)&&e.data==="["){let n=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(qd(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else t(e)}const ka=e=>!!e.type.__asyncLoader;function sl(e){pn(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:i,delay:s=200,hydrate:o,timeout:r,suspensible:l=!0,onError:a}=e;let u=null,c,d=0;const f=()=>(d++,u=null,p()),p=()=>{let g;return u||(g=u=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((y,w)=>{a(m,()=>y(f()),()=>w(m),d+1)});throw m}).then(m=>g!==u&&u?u:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),c=m,m)))};return nt({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(g,m,y){let w=!1;(m.bu||(m.bu=[])).push(()=>w=!0);const k=()=>{w||y()},A=o?()=>{const v=o(k,x=>tO(g,x));v&&(m.bum||(m.bum=[])).push(v)}:k;c?A():p().then(()=>!m.isUnmounted&&A())},get __asyncResolved(){return c},setup(){const g=eo;if(Z8(g),c)return()=>k0(c,g);const m=x=>{u=null,zf(x,g,13,!i)};if(l&&g.suspense||Wc)return p().then(x=>()=>k0(x,g)).catch(x=>(m(x),()=>i?V(i,{error:x}):null));const y=G(!1),w=G(),k=G(!!s);let A,v;return Cn(()=>{A!=null&&clearTimeout(A),v!=null&&clearTimeout(v)}),s&&(v=setTimeout(()=>{g.isUnmounted||(k.value=!1)},s)),r!=null&&(A=setTimeout(()=>{if(!g.isUnmounted&&!y.value&&!w.value){const x=new Error(`Async component timed out after ${r}ms.`);m(x),w.value=x}},r)),p().then(()=>{g.isUnmounted||(y.value=!0,g.parent&&pp(g.parent.vnode)&&g.parent.update())}).catch(x=>{if(g.isUnmounted){u=null;return}m(x),w.value=x}),()=>{if(y.value&&c)return k0(c,g);if(w.value&&i)return V(i,{error:w.value});if(n&&!k.value)return k0(n,g)}}})}function k0(e,t){const{ref:n,props:i,children:s,ce:o}=t.vnode,r=V(e,i,s);return r.ref=n,r.ce=o,delete t.vnode.ce,r}const pp=e=>e.type.__isKeepAlive,nO={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=ys(),i=n.ctx;if(!i.renderer)return()=>{const k=t.default&&t.default();return k&&k.length===1?k[0]:k};const s=new Map,o=new Set;let r=null;const l=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:d}}}=i,f=d("div");i.activate=(k,A,v,x,S)=>{const I=k.component;u(k,A,v,0,l),a(I.vnode,k,A,v,I,l,x,k.slotScopeIds,S),cs(()=>{I.isDeactivated=!1,I.a&&nf(I.a);const _=k.props&&k.props.onVnodeMounted;_&&Ko(_,I.parent,k)},l)},i.deactivate=k=>{const A=k.component;im(A.m),im(A.a),u(k,f,null,1,l),cs(()=>{A.da&&nf(A.da);const v=k.props&&k.props.onVnodeUnmounted;v&&Ko(v,A.parent,k),A.isDeactivated=!0},l)};function p(k){D9(k),c(k,n,l,!0)}function g(k){s.forEach((A,v)=>{const x=R4(ka(A)?A.type.__asyncResolved||{}:A.type);x&&!k(x)&&m(v)})}function m(k){const A=s.get(k);A&&(!r||!tl(A,r))?p(A):r&&D9(r),s.delete(k),o.delete(k)}Ge(()=>[e.include,e.exclude],([k,A])=>{k&&g(v=>z1(k,v)),A&&g(v=>!z1(A,v))},{flush:"post",deep:!0});let y=null;const w=()=>{y!=null&&(sm(n.subTree.type)?cs(()=>{s.set(y,A0(n.subTree))},n.subTree.suspense):s.set(y,A0(n.subTree)))};return gn(w),gp(w),Gn(()=>{s.forEach(k=>{const{subTree:A,suspense:v}=n,x=A0(A);if(k.type===x.type&&k.key===x.key){D9(x);const S=x.component.da;S&&cs(S,v);return}p(k)})}),()=>{if(y=null,!t.default)return r=null;const k=t.default(),A=k[0];if(k.length>1)return r=null,k;if(!bu(A)||!(A.shapeFlag&4)&&!(A.shapeFlag&128))return r=null,A;let v=A0(A);if(v.type===hs)return r=null,v;const x=v.type,S=R4(ka(v)?v.type.__asyncResolved||{}:x),{include:I,exclude:_,max:E}=e;if(I&&(!S||!z1(I,S))||_&&S&&z1(_,S))return v.shapeFlag&=-257,r=v,A;const N=v.key==null?x:v.key,D=s.get(N);return v.el&&(v=Sa(v),A.shapeFlag&128&&(A.ssContent=v)),y=N,D?(v.el=D.el,v.component=D.component,v.transition&&yu(v,v.transition),v.shapeFlag|=512,o.delete(N),o.add(N)):(o.add(N),E&&o.size>parseInt(E,10)&&m(o.values().next().value)),v.shapeFlag|=256,r=v,sm(A.type)?A:v}}},AQe=nO;function z1(e,t){return Xt(e)?e.some(n=>z1(n,t)):Ai(e)?e.split(",").includes(t):Oz(e)?(e.lastIndex=0,e.test(t)):!1}function iO(e,t){aI(e,"a",t)}function sO(e,t){aI(e,"da",t)}function aI(e,t,n=eo){const i=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(K2(t,i,n),n){let s=n.parent;for(;s&&s.parent;)pp(s.parent.vnode)&&oO(i,t,n,s),s=s.parent}}function oO(e,t,n,i){const s=K2(t,e,i,!0);Cn(()=>{j8(i[t],s)},n)}function D9(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function A0(e){return e.shapeFlag&128?e.ssContent:e}function K2(e,t,n=eo,i=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{jl();const l=Of(n),a=Pr(t,n,e,r);return l(),Hl(),a});return i?s.unshift(o):s.push(o),o}}const Ta=e=>(t,n=eo)=>{(!Wc||e==="sp")&&K2(e,(...i)=>t(...i),n)},rO=Ta("bm"),gn=Ta("m"),uI=Ta("bu"),gp=Ta("u"),Gn=Ta("bum"),Cn=Ta("um"),lO=Ta("sp"),aO=Ta("rtg"),uO=Ta("rtc");function cO(e,t=eo){K2("ec",e,t)}const Q8="components",dO="directives";function fO(e,t){return Y8(Q8,e,!0,t)||e}const cI=Symbol.for("v-ndc");function Ss(e){return Ai(e)?Y8(Q8,e,!1)||e:e||cI}function CQe(e){return Y8(dO,e)}function Y8(e,t,n=!0,i=!1){const s=to||eo;if(s){const o=s.type;if(e===Q8){const l=R4(o,!1);if(l&&(l===t||l===Ts(t)||l===$2(Ts(t))))return o}const r=Q6(s[e]||o[e],t)||Q6(s.appContext[e],t);return!r&&i?o:r}}function Q6(e,t){return e&&(e[t]||e[Ts(t)]||e[$2(Ts(t))])}function yt(e,t,n,i){let s;const o=n&&n[i],r=Xt(e);if(r||Ai(e)){const l=r&&du(e);let a=!1,u=!1;l&&(a=!mr(e),u=_a(e),e=j2(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(a?u?wf(cl(e[c])):cl(e[c]):e[c],c,void 0,o&&o[c])}else if(typeof e=="number"){s=new Array(e);for(let l=0;l<e;l++)s[l]=t(l+1,l,void 0,o&&o[l])}else if(oi(e))if(e[Symbol.iterator])s=Array.from(e,(l,a)=>t(l,a,void 0,o&&o[a]));else{const l=Object.keys(e);s=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];s[a]=t(e[c],c,a,o&&o[a])}}else s=[];return n&&(n[i]=s),s}function dI(e,t){for(let n=0;n<t.length;n++){const i=t[n];if(Xt(i))for(let s=0;s<i.length;s++)e[i[s].name]=i[s].fn;else i&&(e[i.name]=i.key?(...s)=>{const o=i.fn(...s);return o&&(o.key=i.key),o}:i.fn)}return e}function En(e,t,n={},i,s){if(to.ce||to.parent&&ka(to.parent)&&to.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),b(),de(Be,null,[V("slot",n,i&&i())],u?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),b();const r=o&&J8(o(n)),l=n.key||r&&r.key,a=de(Be,{key:(l&&!Cr(l)?l:`_${t}`)+(!r&&i?"_fb":"")},r||(i?i():[]),r&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function J8(e){return e.some(t=>bu(t)?!(t.type===hs||t.type===Be&&!J8(t.children)):!0)?e:null}function wQe(e,t){const n={};for(const i in e)n[t&&/[A-Z]/.test(i)?`on:${i}`:pg(i)]=e[i];return n}const T4=e=>e?zI(e)?mp(e):T4(e.parent):null,oh=pi(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=>X8(e),$forceUpdate:e=>e.f||(e.f=()=>{K8(e.update)}),$nextTick:e=>e.n||(e.n=At.bind(e.proxy)),$watch:e=>RR.bind(e)}),z9=(e,t)=>e!==Dn&&!e.__isScriptSetup&&si(e,t),L4={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:o,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const f=r[t];if(f!==void 0)switch(f){case 1:return i[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(z9(i,t))return r[t]=1,i[t];if(s!==Dn&&si(s,t))return r[t]=2,s[t];if(si(o,t))return r[t]=3,o[t];if(n!==Dn&&si(n,t))return r[t]=4,n[t];N4&&(r[t]=0)}}const u=oh[t];let c,d;if(u)return t==="$attrs"&&go(e.attrs,"get",""),u(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==Dn&&si(n,t))return r[t]=4,n[t];if(d=a.config.globalProperties,si(d,t))return d[t]},set({_:e},t,n){const{data:i,setupState:s,ctx:o}=e;return z9(s,t)?(s[t]=n,!0):i!==Dn&&si(i,t)?(i[t]=n,!0):si(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:s,props:o,type:r}},l){let a;return!!(n[l]||e!==Dn&&l[0]!=="$"&&si(e,l)||z9(t,l)||si(o,l)||si(i,l)||si(oh,l)||si(s.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:si(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},hO=pi({},L4,{get(e,t){if(t!==Symbol.unscopables)return L4.get(e,t,e)},has(e,t){return t[0]!=="_"&&!qz(t)}});function xQe(){return null}function _Qe(){return null}function SQe(e){}function MQe(e){}function IQe(){return null}function EQe(){}function TQe(e,t){return null}function LQe(){return fI().slots}function Rf(){return fI().attrs}function fI(e){const t=ys();return t.setupContext||(t.setupContext=PI(t))}function zh(e){return Xt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function NQe(e,t){const n=zh(e);for(const i in t){if(i.startsWith("__skip"))continue;let s=n[i];s?Xt(s)||pn(s)?s=n[i]={type:s,default:t[i]}:s.default=t[i]:s===null&&(s=n[i]={default:t[i]}),s&&t[`__skip_${i}`]&&(s.skipFactory=!0)}return n}function FQe(e,t){return!e||!t?e||t:Xt(e)&&Xt(t)?e.concat(t):pi({},zh(e),zh(t))}function BQe(e,t){const n={};for(const i in e)t.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>e[i]});return n}function $Qe(e){const t=ys(),n=Wc;let i=e();Oh(),n&&af(!1);const s=()=>{Of(t),n&&af(!0)},o=()=>{ys()!==t&&t.scope.off(),Oh(),n&&af(!1)};return H8(i)&&(i=i.catch(r=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(o)),r})),[i,()=>{s(),Promise.resolve().then(o)}]}let N4=!0;function pO(e){const t=X8(e),n=e.proxy,i=e.ctx;N4=!1,t.beforeCreate&&Y6(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:r,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:g,activated:m,deactivated:y,beforeDestroy:w,beforeUnmount:k,destroyed:A,unmounted:v,render:x,renderTracked:S,renderTriggered:I,errorCaptured:_,serverPrefetch:E,expose:N,inheritAttrs:D,components:T,directives:$,filters:O}=t;if(u&&gO(u,i,null),r)for(const j in r){const z=r[j];pn(z)&&(i[j]=z.bind(n))}if(s){const j=s.call(n,n);oi(j)&&(e.data=Es(j))}if(N4=!0,o)for(const j in o){const z=o[j],K=pn(z)?z.bind(n,n):pn(z.get)?z.get.bind(n,n):Rr,q=!pn(z)&&pn(z.set)?z.set.bind(n):Rr,W=F({get:K,set:q});Object.defineProperty(i,j,{enumerable:!0,configurable:!0,get:()=>W.value,set:Z=>W.value=Z})}if(l)for(const j in l)hI(l[j],i,n,j);if(a){const j=pn(a)?a.call(n):a;Reflect.ownKeys(j).forEach(z=>{Pn(z,j[z])})}c&&Y6(c,e,"c");function R(j,z){Xt(z)?z.forEach(K=>j(K.bind(n))):z&&j(z.bind(n))}if(R(rO,d),R(gn,f),R(uI,p),R(gp,g),R(iO,m),R(sO,y),R(cO,_),R(uO,S),R(aO,I),R(Gn,k),R(Cn,v),R(lO,E),Xt(N))if(N.length){const j=e.exposed||(e.exposed={});N.forEach(z=>{Object.defineProperty(j,z,{get:()=>n[z],set:K=>n[z]=K,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===Rr&&(e.render=x),D!=null&&(e.inheritAttrs=D),T&&(e.components=T),$&&(e.directives=$),E&&Z8(e)}function gO(e,t,n=Rr){Xt(e)&&(e=F4(e));for(const i in e){const s=e[i];let o;oi(s)?"default"in s?o=un(s.from||i,s.default,!0):o=un(s.from||i):o=un(s),ss(o)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[i]=o}}function Y6(e,t,n){Pr(Xt(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function hI(e,t,n,i){let s=i.includes(".")?eI(n,i):()=>n[i];if(Ai(e)){const o=t[e];pn(o)&&Ge(s,o)}else if(pn(e))Ge(s,e.bind(n));else if(oi(e))if(Xt(e))e.forEach(o=>hI(o,t,n,i));else{const o=pn(e.handler)?e.handler.bind(n):t[e.handler];pn(o)&&Ge(s,o,e)}}function X8(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,l=o.get(t);let a;return l?a=l:!s.length&&!n&&!i?a=t:(a={},s.length&&s.forEach(u=>nm(a,u,r,!0)),nm(a,t,r)),oi(t)&&o.set(t,a),a}function nm(e,t,n,i=!1){const{mixins:s,extends:o}=t;o&&nm(e,o,n,!0),s&&s.forEach(r=>nm(e,r,n,!0));for(const r in t)if(!(i&&r==="expose")){const l=mO[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const mO={data:J6,props:X6,emits:X6,methods:R1,computed:R1,beforeCreate:_o,created:_o,beforeMount:_o,mounted:_o,beforeUpdate:_o,updated:_o,beforeDestroy:_o,beforeUnmount:_o,destroyed:_o,unmounted:_o,activated:_o,deactivated:_o,errorCaptured:_o,serverPrefetch:_o,components:R1,directives:R1,watch:yO,provide:J6,inject:vO};function J6(e,t){return t?e?function(){return pi(pn(e)?e.call(this,this):e,pn(t)?t.call(this,this):t)}:t:e}function vO(e,t){return R1(F4(e),F4(t))}function F4(e){if(Xt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function _o(e,t){return e?[...new Set([].concat(e,t))]:t}function R1(e,t){return e?pi(Object.create(null),e,t):t}function X6(e,t){return e?Xt(e)&&Xt(t)?[...new Set([...e,...t])]:pi(Object.create(null),zh(e),zh(t??{})):t}function yO(e,t){if(!e)return t;if(!t)return e;const n=pi(Object.create(null),e);for(const i in t)n[i]=_o(e[i],t[i]);return n}function pI(){return{app:null,config:{isNativeTag:wM,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let bO=0;function kO(e,t){return function(i,s=null){pn(i)||(i=pi({},i)),s!=null&&!oi(s)&&(s=null);const o=pI(),r=new WeakSet,l=[];let a=!1;const u=o.app={_uid:bO++,_component:i,_props:s,_container:null,_context:o,_instance:null,version:GO,get config(){return o.config},set config(c){},use(c,...d){return r.has(c)||(c&&pn(c.install)?(r.add(c),c.install(u,...d)):pn(c)&&(r.add(c),c(u,...d))),u},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),u},component(c,d){return d?(o.components[c]=d,u):o.components[c]},directive(c,d){return d?(o.directives[c]=d,u):o.directives[c]},mount(c,d,f){if(!a){const p=u._ceVNode||V(i,s);return p.appContext=o,f===!0?f="svg":f===!1&&(f=void 0),d&&t?t(p,c):e(p,c,f),a=!0,u._container=c,c.__vue_app__=u,mp(p.component)}},onUnmount(c){l.push(c)},unmount(){a&&(Pr(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return o.provides[c]=d,u},runWithContext(c){const d=Bc;Bc=u;try{return c()}finally{Bc=d}}};return u}}let Bc=null;function DQe(e,t,n=Dn){const i=ys(),s=Ts(t),o=Yo(t),r=gI(e,s),l=wR((a,u)=>{let c,d=Dn,f;return zR(()=>{const p=e[s];Ps(c,p)&&(c=p,u())}),{get(){return a(),n.get?n.get(c):c},set(p){const g=n.set?n.set(p):p;if(!Ps(g,c)&&!(d!==Dn&&Ps(p,d)))return;const m=i.vnode.props,y=!!(m&&(t in m||s in m||o in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${o}`in m));y||(c=p,u()),i.emit(`update:${t}`,g),Ps(p,d)&&(Ps(p,g)&&!Ps(g,f)||y&&d!==Dn&&!Ps(g,c))&&u(),d=p,f=g}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?r||Dn:l,done:!1}:{done:!0}}}},l}const gI=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ts(t)}Modifiers`]||e[`${Yo(t)}Modifiers`];function AO(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||Dn;let s=n;const o=t.startsWith("update:"),r=o&&gI(i,t.slice(7));r&&(r.trim&&(s=n.map(c=>Ai(c)?c.trim():c)),r.number&&(s=n.map(D2)));let l,a=i[l=pg(t)]||i[l=pg(Ts(t))];!a&&o&&(a=i[l=pg(Yo(t))]),a&&Pr(a,e,6,s);const u=i[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Pr(u,e,6,s)}}const CO=new WeakMap;function mI(e,t,n=!1){const i=n?CO:t.emitsCache,s=i.get(e);if(s!==void 0)return s;const o=e.emits;let r={},l=!1;if(!pn(e)){const a=u=>{const c=mI(u,t,!0);c&&(l=!0,pi(r,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(oi(e)&&i.set(e,null),null):(Xt(o)?o.forEach(a=>r[a]=null):pi(r,o),oi(e)&&i.set(e,r),r)}function V2(e,t){return!e||!dp(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),si(e,t[0].toLowerCase()+t.slice(1))||si(e,Yo(t))||si(e,t))}function vg(e){const{type:t,vnode:n,proxy:i,withProxy:s,propsOptions:[o],slots:r,attrs:l,emit:a,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:g,inheritAttrs:m}=e,y=$h(e);let w,k;try{if(n.shapeFlag&4){const v=s||i,x=v;w=Qo(u.call(x,v,c,d,p,f,g)),k=l}else{const v=t;w=Qo(v.length>1?v(d,{attrs:l,slots:r,emit:a}):v(d,null)),k=t.props?l:xO(l)}}catch(v){rh.length=0,zf(v,e,1),w=V(hs)}let A=w;if(k&&m!==!1){const v=Object.keys(k),{shapeFlag:x}=A;v.length&&x&7&&(o&&v.some(L2)&&(k=_O(k,o)),A=Sa(A,k,!1,!0))}return n.dirs&&(A=Sa(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&yu(A,n.transition),w=A,$h(y),w}function wO(e,t=!0){let n;for(let i=0;i<e.length;i++){const s=e[i];if(bu(s)){if(s.type!==hs||s.children==="v-if"){if(n)return;n=s}}else return}return n}const xO=e=>{let t;for(const n in e)(n==="class"||n==="style"||dp(n))&&((t||(t={}))[n]=e[n]);return t},_O=(e,t)=>{const n={};for(const i in e)(!L2(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function SO(e,t,n){const{props:i,children:s,component:o}=e,{props:r,children:l,patchFlag:a}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return i?e7(i,r,u):!!r;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(vI(r,i,f)&&!V2(u,f))return!0}}}else return(s||l)&&(!l||!l.$stable)?!0:i===r?!1:i?r?e7(i,r,u):!0:!!r;return!1}function e7(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let s=0;s<i.length;s++){const o=i[s];if(vI(t,e,o)&&!V2(n,o))return!0}return!1}function vI(e,t,n){const i=e[n],s=t[n];return n==="style"&&oi(i)&&oi(s)?!xa(i,s):i!==s}function Z2({vnode:e,parent:t,suspense:n},i){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.suspense.vnode.el=s.el=i,e=s),s===e)(e=t.vnode).el=i,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=i)}const yI={},bI=()=>Object.create(yI),kI=e=>Object.getPrototypeOf(e)===yI;function MO(e,t,n,i=!1){const s={},o=bI();e.propsDefaults=Object.create(null),AI(e,t,s,o);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);n?e.props=i?s:UM(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function IO(e,t,n,i){const{props:s,attrs:o,vnode:{patchFlag:r}}=e,l=Vn(s),[a]=e.propsOptions;let u=!1;if((i||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(V2(e.emitsOptions,f))continue;const p=t[f];if(a)if(si(o,f))p!==o[f]&&(o[f]=p,u=!0);else{const g=Ts(f);s[g]=B4(a,l,g,p,e,!1)}else p!==o[f]&&(o[f]=p,u=!0)}}}else{AI(e,t,s,o)&&(u=!0);let c;for(const d in l)(!t||!si(t,d)&&((c=Yo(d))===d||!si(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=B4(a,l,d,void 0,e,!0)):delete s[d]);if(o!==l)for(const d in o)(!t||!si(t,d))&&(delete o[d],u=!0)}u&&fa(e.attrs,"set","")}function AI(e,t,n,i){const[s,o]=e.propsOptions;let r=!1,l;if(t)for(let a in t){if(Nc(a))continue;const u=t[a];let c;s&&si(s,c=Ts(a))?!o||!o.includes(c)?n[c]=u:(l||(l={}))[c]=u:V2(e.emitsOptions,a)||(!(a in i)||u!==i[a])&&(i[a]=u,r=!0)}if(o){const a=Vn(n),u=l||Dn;for(let c=0;c<o.length;c++){const d=o[c];n[d]=B4(s,a,d,u[d],e,!si(u,d))}}return r}function B4(e,t,n,i,s,o){const r=e[n];if(r!=null){const l=si(r,"default");if(l&&i===void 0){const a=r.default;if(r.type!==Function&&!r.skipFactory&&pn(a)){const{propsDefaults:u}=s;if(n in u)i=u[n];else{const c=Of(s);i=u[n]=a.call(null,t),c()}}else i=a;s.ce&&s.ce._setProp(n,i)}r[0]&&(o&&!l?i=!1:r[1]&&(i===""||i===Yo(n))&&(i=!0))}return i}const EO=new WeakMap;function CI(e,t,n=!1){const i=n?EO:t.propsCache,s=i.get(e);if(s)return s;const o=e.props,r={},l=[];let a=!1;if(!pn(e)){const c=d=>{a=!0;const[f,p]=CI(d,t,!0);pi(r,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!a)return oi(e)&&i.set(e,ef),ef;if(Xt(o))for(let c=0;c<o.length;c++){const d=Ts(o[c]);t7(d)&&(r[d]=Dn)}else if(o)for(const c in o){const d=Ts(c);if(t7(d)){const f=o[c],p=r[d]=Xt(f)||pn(f)?{type:f}:pi({},f),g=p.type;let m=!1,y=!0;if(Xt(g))for(let w=0;w<g.length;++w){const k=g[w],A=pn(k)&&k.name;if(A==="Boolean"){m=!0;break}else A==="String"&&(y=!1)}else m=pn(g)&&g.name==="Boolean";p[0]=m,p[1]=y,(m||si(p,"default"))&&l.push(d)}}const u=[r,l];return oi(e)&&i.set(e,u),u}function t7(e){return e[0]!=="$"&&!Nc(e)}const e5=e=>e==="_"||e==="_ctx"||e==="$stable",t5=e=>Xt(e)?e.map(Qo):[Qo(e)],TO=(e,t,n)=>{if(t._n)return t;const i=he((...s)=>t5(t(...s)),n);return i._c=!1,i},wI=(e,t,n)=>{const i=e._ctx;for(const s in e){if(e5(s))continue;const o=e[s];if(pn(o))t[s]=TO(s,o,i);else if(o!=null){const r=t5(o);t[s]=()=>r}}},xI=(e,t)=>{const n=t5(t);e.slots.default=()=>n},_I=(e,t,n)=>{for(const i in t)(n||!e5(i))&&(e[i]=t[i])},LO=(e,t,n)=>{const i=e.slots=bI();if(e.vnode.shapeFlag&32){const s=t._;s?(_I(i,t,n),n&&_M(i,"_",s,!0)):wI(t,i)}else t&&xI(e,t)},NO=(e,t,n)=>{const{vnode:i,slots:s}=e;let o=!0,r=Dn;if(i.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:_I(s,t,n):(o=!t.$stable,wI(t,s)),r=t}else t&&(xI(e,t),r={default:1});if(o)for(const l in s)!e5(l)&&r[l]==null&&delete s[l]},cs=LI;function FO(e){return SI(e)}function BO(e){return SI(e,VR)}function SI(e,t){const n=z2();n.__VUE__=!0;const{insert:i,remove:s,patchProp:o,createElement:r,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=Rr,insertStaticContent:g}=e,m=(H,Y,ve,re=null,se=null,U=null,J=void 0,ce=null,ge=!!Y.dynamicChildren)=>{if(H===Y)return;H&&!tl(H,Y)&&(re=Se(H),Z(H,se,U,!0),H=null),Y.patchFlag===-2&&(ge=!1,Y.dynamicChildren=null);const{type:Me,ref:Pe,shapeFlag:ke}=Y;switch(Me){case fu:y(H,Y,ve,re);break;case hs:w(H,Y,ve,re);break;case lf:H==null&&k(Y,ve,re,J);break;case Be:T(H,Y,ve,re,se,U,J,ce,ge);break;default:ke&1?x(H,Y,ve,re,se,U,J,ce,ge):ke&6?$(H,Y,ve,re,se,U,J,ce,ge):(ke&64||ke&128)&&Me.process(H,Y,ve,re,se,U,J,ce,ge,Ne)}Pe!=null&&se?of(Pe,H&&H.ref,U,Y||H,!Y):Pe==null&&H&&H.ref!=null&&of(H.ref,null,U,H,!0)},y=(H,Y,ve,re)=>{if(H==null)i(Y.el=l(Y.children),ve,re);else{const se=Y.el=H.el;Y.children!==H.children&&u(se,Y.children)}},w=(H,Y,ve,re)=>{H==null?i(Y.el=a(Y.children||""),ve,re):Y.el=H.el},k=(H,Y,ve,re)=>{[H.el,H.anchor]=g(H.children,Y,ve,re,H.el,H.anchor)},A=({el:H,anchor:Y},ve,re)=>{let se;for(;H&&H!==Y;)se=f(H),i(H,ve,re),H=se;i(Y,ve,re)},v=({el:H,anchor:Y})=>{let ve;for(;H&&H!==Y;)ve=f(H),s(H),H=ve;s(Y)},x=(H,Y,ve,re,se,U,J,ce,ge)=>{if(Y.type==="svg"?J="svg":Y.type==="math"&&(J="mathml"),H==null)S(Y,ve,re,se,U,J,ce,ge);else{const Me=H.el&&H.el._isVueCE?H.el:null;try{Me&&Me._beginPatch(),E(H,Y,se,U,J,ce,ge)}finally{Me&&Me._endPatch()}}},S=(H,Y,ve,re,se,U,J,ce)=>{let ge,Me;const{props:Pe,shapeFlag:ke,transition:Le,dirs:it}=H;if(ge=H.el=r(H.type,U,Pe&&Pe.is,Pe),ke&8?c(ge,H.children):ke&16&&_(H.children,ge,null,re,se,R9(H,U),J,ce),it&&Nl(H,null,re,"created"),I(ge,H,H.scopeId,J,re),Pe){for(const De in Pe)De!=="value"&&!Nc(De)&&o(ge,De,null,Pe[De],U,re);"value"in Pe&&o(ge,"value",null,Pe.value,U),(Me=Pe.onVnodeBeforeMount)&&Ko(Me,re,H)}it&&Nl(H,null,re,"beforeMount");const Fe=MI(se,Le);Fe&&Le.beforeEnter(ge),i(ge,Y,ve),((Me=Pe&&Pe.onVnodeMounted)||Fe||it)&&cs(()=>{try{Me&&Ko(Me,re,H),Fe&&Le.enter(ge),it&&Nl(H,null,re,"mounted")}finally{}},se)},I=(H,Y,ve,re,se)=>{if(ve&&p(H,ve),re)for(let U=0;U<re.length;U++)p(H,re[U]);if(se){let U=se.subTree;if(Y===U||sm(U.type)&&(U.ssContent===Y||U.ssFallback===Y)){const J=se.vnode;I(H,J,J.scopeId,J.slotScopeIds,se.parent)}}},_=(H,Y,ve,re,se,U,J,ce,ge=0)=>{for(let Me=ge;Me<H.length;Me++){const Pe=H[Me]=ce?da(H[Me]):Qo(H[Me]);m(null,Pe,Y,ve,re,se,U,J,ce)}},E=(H,Y,ve,re,se,U,J)=>{const ce=Y.el=H.el;let{patchFlag:ge,dynamicChildren:Me,dirs:Pe}=Y;ge|=H.patchFlag&16;const ke=H.props||Dn,Le=Y.props||Dn;let it;if(ve&&ic(ve,!1),(it=Le.onVnodeBeforeUpdate)&&Ko(it,ve,Y,H),Pe&&Nl(Y,H,ve,"beforeUpdate"),ve&&ic(ve,!0),Me&&(!H.dynamicChildren||H.dynamicChildren.length!==Me.length)&&(ge=0,J=!1,Me=null),(ke.innerHTML&&Le.innerHTML==null||ke.textContent&&Le.textContent==null)&&c(ce,""),Me?N(H.dynamicChildren,Me,ce,ve,re,R9(Y,se),U):J||z(H,Y,ce,null,ve,re,R9(Y,se),U,!1),ge>0){if(ge&16)D(ce,ke,Le,ve,se);else if(ge&2&&ke.class!==Le.class&&o(ce,"class",null,Le.class,se),ge&4&&o(ce,"style",ke.style,Le.style,se),ge&8){const Fe=Y.dynamicProps;for(let De=0;De<Fe.length;De++){const Ke=Fe[De],gt=ke[Ke],lt=Le[Ke];(lt!==gt||Ke==="value")&&o(ce,Ke,gt,lt,se,ve)}}ge&1&&H.children!==Y.children&&c(ce,Y.children)}else!J&&Me==null&&D(ce,ke,Le,ve,se);((it=Le.onVnodeUpdated)||Pe)&&cs(()=>{it&&Ko(it,ve,Y,H),Pe&&Nl(Y,H,ve,"updated")},re)},N=(H,Y,ve,re,se,U,J)=>{for(let ce=0;ce<Y.length;ce++){const ge=H[ce],Me=Y[ce],Pe=ge.el&&(ge.type===Be||!tl(ge,Me)||ge.shapeFlag&198)?d(ge.el):ve;m(ge,Me,Pe,null,re,se,U,J,!0)}},D=(H,Y,ve,re,se)=>{if(Y!==ve){if(Y!==Dn)for(const U in Y)!Nc(U)&&!(U in ve)&&o(H,U,Y[U],null,se,re);for(const U in ve){if(Nc(U))continue;const J=ve[U],ce=Y[U];J!==ce&&U!=="value"&&o(H,U,ce,J,se,re)}"value"in ve&&o(H,"value",Y.value,ve.value,se)}},T=(H,Y,ve,re,se,U,J,ce,ge)=>{const Me=Y.el=H?H.el:l(""),Pe=Y.anchor=H?H.anchor:l("");let{patchFlag:ke,dynamicChildren:Le,slotScopeIds:it}=Y;it&&(ce=ce?ce.concat(it):it),H==null?(i(Me,ve,re),i(Pe,ve,re),_(Y.children||[],ve,Pe,se,U,J,ce,ge)):ke>0&&ke&64&&Le&&H.dynamicChildren&&H.dynamicChildren.length===Le.length?(N(H.dynamicChildren,Le,ve,se,U,J,ce),(Y.key!=null||se&&Y===se.subTree)&&n5(H,Y,!0)):z(H,Y,ve,Pe,se,U,J,ce,ge)},$=(H,Y,ve,re,se,U,J,ce,ge)=>{Y.slotScopeIds=ce,H==null?Y.shapeFlag&512?se.ctx.activate(Y,ve,re,J,ge):O(Y,ve,re,se,U,J,ge):P(H,Y,ge)},O=(H,Y,ve,re,se,U,J)=>{const ce=H.component=DI(H,re,se);if(pp(H)&&(ce.ctx.renderer=Ne),RI(ce,!1,J),ce.asyncDep){if(se&&se.registerDep(ce,R,J),!H.el){const ge=ce.subTree=V(hs);w(null,ge,Y,ve),H.placeholder=ge.el}}else R(ce,H,Y,ve,se,U,J)},P=(H,Y,ve)=>{const re=Y.component=H.component;if(SO(H,Y,ve))if(re.asyncDep&&!re.asyncResolved){j(re,Y,ve);return}else re.next=Y,re.update();else Y.el=H.el,re.vnode=Y},R=(H,Y,ve,re,se,U,J)=>{const ce=()=>{if(H.isMounted){let{next:ke,bu:Le,u:it,parent:Fe,vnode:De}=H;{const Lt=II(H);if(Lt){ke&&(ke.el=De.el,j(H,ke,J)),Lt.asyncDep.then(()=>{cs(()=>{H.isUnmounted||Me()},se)});return}}let Ke=ke,gt;ic(H,!1),ke?(ke.el=De.el,j(H,ke,J)):ke=De,Le&&nf(Le),(gt=ke.props&&ke.props.onVnodeBeforeUpdate)&&Ko(gt,Fe,ke,De),ic(H,!0);const lt=vg(H),ft=H.subTree;H.subTree=lt,m(ft,lt,d(ft.el),Se(ft),H,se,U),ke.el=lt.el,Ke===null&&Z2(H,lt.el),it&&cs(it,se),(gt=ke.props&&ke.props.onVnodeUpdated)&&cs(()=>Ko(gt,Fe,ke,De),se)}else{let ke;const{el:Le,props:it}=Y,{bm:Fe,m:De,parent:Ke,root:gt,type:lt}=H,ft=ka(Y);if(ic(H,!1),Fe&&nf(Fe),!ft&&(ke=it&&it.onVnodeBeforeMount)&&Ko(ke,Ke,Y),ic(H,!0),Le&&ye){const Lt=()=>{H.subTree=vg(H),ye(Le,H.subTree,H,se,null)};ft&<.__asyncHydrate?lt.__asyncHydrate(Le,H,Lt):Lt()}else{gt.ce&>.ce._hasShadowRoot()&>.ce._injectChildStyle(lt,H.parent?H.parent.type:void 0);const Lt=H.subTree=vg(H);m(null,Lt,ve,re,H,se,U),Y.el=Lt.el}if(De&&cs(De,se),!ft&&(ke=it&&it.onVnodeMounted)){const Lt=Y;cs(()=>Ko(ke,Ke,Lt),se)}(Y.shapeFlag&256||Ke&&ka(Ke.vnode)&&Ke.vnode.shapeFlag&256)&&H.a&&cs(H.a,se),H.isMounted=!0,Y=ve=re=null}};H.scope.on();const ge=H.effect=new Zg(ce);H.scope.off();const Me=H.update=ge.run.bind(ge),Pe=H.job=ge.runIfDirty.bind(ge);Pe.i=H,Pe.id=H.uid,ge.scheduler=()=>K8(Pe),ic(H,!0),Me()},j=(H,Y,ve)=>{Y.component=H;const re=H.vnode.props;H.vnode=Y,H.next=null,IO(H,Y.props,re,ve),NO(H,Y.children,ve),jl(),W6(H),Hl()},z=(H,Y,ve,re,se,U,J,ce,ge=!1)=>{const Me=H&&H.children,Pe=H?H.shapeFlag:0,ke=Y.children,{patchFlag:Le,shapeFlag:it}=Y;if(Le>0){if(Le&128){q(Me,ke,ve,re,se,U,J,ce,ge);return}else if(Le&256){K(Me,ke,ve,re,se,U,J,ce,ge);return}}it&8?(Pe&16&&ie(Me,se,U),ke!==Me&&c(ve,ke)):Pe&16?it&16?q(Me,ke,ve,re,se,U,J,ce,ge):ie(Me,se,U,!0):(Pe&8&&c(ve,""),it&16&&_(ke,ve,re,se,U,J,ce,ge))},K=(H,Y,ve,re,se,U,J,ce,ge)=>{H=H||ef,Y=Y||ef;const Me=H.length,Pe=Y.length,ke=Math.min(Me,Pe);let Le;for(Le=0;Le<ke;Le++){const it=Y[Le]=ge?da(Y[Le]):Qo(Y[Le]);m(H[Le],it,ve,null,se,U,J,ce,ge)}Me>Pe?ie(H,se,U,!0,!1,ke):_(Y,ve,re,se,U,J,ce,ge,ke)},q=(H,Y,ve,re,se,U,J,ce,ge)=>{let Me=0;const Pe=Y.length;let ke=H.length-1,Le=Pe-1;for(;Me<=ke&&Me<=Le;){const it=H[Me],Fe=Y[Me]=ge?da(Y[Me]):Qo(Y[Me]);if(tl(it,Fe))m(it,Fe,ve,null,se,U,J,ce,ge);else break;Me++}for(;Me<=ke&&Me<=Le;){const it=H[ke],Fe=Y[Le]=ge?da(Y[Le]):Qo(Y[Le]);if(tl(it,Fe))m(it,Fe,ve,null,se,U,J,ce,ge);else break;ke--,Le--}if(Me>ke){if(Me<=Le){const it=Le+1,Fe=it<Pe?Y[it].el:re;for(;Me<=Le;)m(null,Y[Me]=ge?da(Y[Me]):Qo(Y[Me]),ve,Fe,se,U,J,ce,ge),Me++}}else if(Me>Le)for(;Me<=ke;)Z(H[Me],se,U,!0),Me++;else{const it=Me,Fe=Me,De=new Map;for(Me=Fe;Me<=Le;Me++){const Qt=Y[Me]=ge?da(Y[Me]):Qo(Y[Me]);Qt.key!=null&&De.set(Qt.key,Me)}let Ke,gt=0;const lt=Le-Fe+1;let ft=!1,Lt=0;const bn=new Array(lt);for(Me=0;Me<lt;Me++)bn[Me]=0;for(Me=it;Me<=ke;Me++){const Qt=H[Me];if(gt>=lt){Z(Qt,se,U,!0);continue}let kn;if(Qt.key!=null)kn=De.get(Qt.key);else for(Ke=Fe;Ke<=Le;Ke++)if(bn[Ke-Fe]===0&&tl(Qt,Y[Ke])){kn=Ke;break}kn===void 0?Z(Qt,se,U,!0):(bn[kn-Fe]=Me+1,kn>=Lt?Lt=kn:ft=!0,m(Qt,Y[kn],ve,null,se,U,J,ce,ge),gt++)}const Gt=ft?$O(bn):ef;for(Ke=Gt.length-1,Me=lt-1;Me>=0;Me--){const Qt=Fe+Me,kn=Y[Qt],_n=Y[Qt+1],je=Qt+1<Pe?_n.el||EI(_n):re;bn[Me]===0?m(null,kn,ve,je,se,U,J,ce,ge):ft&&(Ke<0||Me!==Gt[Ke]?W(kn,ve,je,2):Ke--)}}},W=(H,Y,ve,re,se=null)=>{const{el:U,type:J,transition:ce,children:ge,shapeFlag:Me}=H;if(Me&6){W(H.component.subTree,Y,ve,re);return}if(Me&128){H.suspense.move(Y,ve,re);return}if(Me&64){J.move(H,Y,ve,Ne);return}if(J===Be){i(U,Y,ve);for(let ke=0;ke<ge.length;ke++)W(ge[ke],Y,ve,re);i(H.anchor,Y,ve);return}if(J===lf){A(H,Y,ve);return}if(re!==2&&Me&1&&ce)if(re===0)ce.persisted&&!U[Br]?i(U,Y,ve):(ce.beforeEnter(U),i(U,Y,ve),cs(()=>ce.enter(U),se));else{const{leave:ke,delayLeave:Le,afterLeave:it}=ce,Fe=()=>{H.ctx.isUnmounted?s(U):i(U,Y,ve)},De=()=>{const Ke=U._isLeaving||!!U[Br];U._isLeaving&&U[Br](!0),ce.persisted&&!Ke?Fe():ke(U,()=>{Fe(),it&&it()})};Le?Le(U,Fe,De):De()}else i(U,Y,ve)},Z=(H,Y,ve,re=!1,se=!1)=>{const{type:U,props:J,ref:ce,children:ge,dynamicChildren:Me,shapeFlag:Pe,patchFlag:ke,dirs:Le,cacheIndex:it,memo:Fe}=H;if(ke===-2&&(se=!1),ce!=null&&(jl(),of(ce,null,ve,H,!0),Hl()),it!=null&&(Y.renderCache[it]=void 0),Pe&256){Y.ctx.deactivate(H);return}const De=Pe&1&&Le,Ke=!ka(H);let gt;if(Ke&&(gt=J&&J.onVnodeBeforeUnmount)&&Ko(gt,Y,H),Pe&6)ue(H.component,ve,re);else{if(Pe&128){H.suspense.unmount(ve,re);return}De&&Nl(H,null,Y,"beforeUnmount"),Pe&64?H.type.remove(H,Y,ve,Ne,re):Me&&!Me.hasOnce&&(U!==Be||ke>0&&ke&64)?ie(Me,Y,ve,!1,!0):(U===Be&&ke&384||!se&&Pe&16)&&ie(ge,Y,ve),re&&ne(H)}const lt=Fe!=null&&it==null;(Ke&&(gt=J&&J.onVnodeUnmounted)||De||lt)&&cs(()=>{gt&&Ko(gt,Y,H),De&&Nl(H,null,Y,"unmounted"),lt&&(H.el=null)},ve)},ne=H=>{const{type:Y,el:ve,anchor:re,transition:se}=H;if(Y===Be){X(ve,re);return}if(Y===lf){v(H);return}const U=()=>{s(ve),se&&!se.persisted&&se.afterLeave&&se.afterLeave()};if(H.shapeFlag&1&&se&&!se.persisted){const{leave:J,delayLeave:ce}=se,ge=()=>J(ve,U);ce?ce(H.el,U,ge):ge()}else U()},X=(H,Y)=>{let ve;for(;H!==Y;)ve=f(H),s(H),H=ve;s(Y)},ue=(H,Y,ve)=>{const{bum:re,scope:se,job:U,subTree:J,um:ce,m:ge,a:Me}=H;im(ge),im(Me),re&&nf(re),se.stop(),U&&(U.flags|=8,Z(J,H,Y,ve)),ce&&cs(ce,Y),cs(()=>{H.isUnmounted=!0},Y)},ie=(H,Y,ve,re=!1,se=!1,U=0)=>{for(let J=U;J<H.length;J++)Z(H[J],Y,ve,re,se)},Se=H=>{if(H.shapeFlag&6)return Se(H.component.subTree);if(H.shapeFlag&128)return H.suspense.next();const Y=f(H.anchor||H.el),ve=Y&&Y[tI];return ve?f(ve):Y};let fe=!1;const pe=(H,Y,ve)=>{let re;H==null?Y._vnode&&(Z(Y._vnode,null,null,!0),re=Y._vnode.component):m(Y._vnode||null,H,Y,null,null,null,ve),Y._vnode=H,fe||(fe=!0,W6(re),Xg(),fe=!1)},Ne={p:m,um:Z,m:W,r:ne,mt:O,mc:_,pc:z,pbc:N,n:Se,o:e};let ee,ye;return t&&([ee,ye]=t(Ne)),{render:pe,hydrate:ee,createApp:kO(pe,ee)}}function R9({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 ic({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function MI(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function n5(e,t,n=!1){const i=e.children,s=t.children;if(Xt(i)&&Xt(s))for(let o=0;o<i.length;o++){const r=i[o];let l=s[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=s[o]=da(s[o]),l.el=r.el),!n&&l.patchFlag!==-2&&n5(r,l)),l.type===fu&&(l.patchFlag===-1&&(l=s[o]=da(l)),l.el=r.el),l.type===hs&&!l.el&&(l.el=r.el)}}function $O(e){const t=e.slice(),n=[0];let i,s,o,r,l;const a=e.length;for(i=0;i<a;i++){const u=e[i];if(u!==0){if(s=n[n.length-1],e[s]<u){t[i]=s,n.push(i);continue}for(o=0,r=n.length-1;o<r;)l=o+r>>1,e[n[l]]<u?o=l+1:r=l;u<e[n[o]]&&(o>0&&(t[i]=n[o-1]),n[o]=i)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=t[r];return n}function II(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:II(t)}function im(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function EI(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?EI(t.subTree):null}const sm=e=>e.__isSuspense;let $4=0;const DO={name:"Suspense",__isSuspense:!0,process(e,t,n,i,s,o,r,l,a,u){if(e==null)zO(t,n,i,s,o,r,l,a,u);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}RO(e,t,n,i,s,r,l,a,u)}},hydrate:OO,normalize:PO},zQe=DO;function Rh(e,t){const n=e.props&&e.props[t];pn(n)&&n()}function zO(e,t,n,i,s,o,r,l,a){const{p:u,o:{createElement:c}}=a,d=c("div"),f=e.suspense=TI(e,s,i,t,d,n,o,r,l,a);u(null,f.pendingBranch=e.ssContent,d,null,i,f,o,r),f.deps>0?(Rh(e,"onPending"),Rh(e,"onFallback"),u(null,e.ssFallback,t,n,i,null,o,r),rf(f,e.ssFallback)):f.resolve(!1,!0)}function RO(e,t,n,i,s,o,r,l,{p:a,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:g,pendingBranch:m,isInFallback:y,isHydrating:w}=d;if(m)d.pendingBranch=f,tl(m,f)?(a(m,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0?d.resolve():y&&(w||(a(g,p,n,i,s,null,o,r,l),rf(d,p)))):(d.pendingId=$4++,w?(d.isHydrating=!1,d.activeBranch=m):u(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),y?(a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0?d.resolve():(a(g,p,n,i,s,null,o,r,l),rf(d,p))):g&&tl(g,f)?(a(g,f,n,i,s,d,o,r,l),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0&&d.resolve()));else if(g&&tl(g,f))a(g,f,n,i,s,d,o,r,l),rf(d,f);else if(Rh(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=$4++,a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0)d.resolve();else{const{timeout:k,pendingId:A}=d;k>0?setTimeout(()=>{d.pendingId===A&&d.fallback(p)},k):k===0&&d.fallback(p)}}function TI(e,t,n,i,s,o,r,l,a,u,c=!1){const{p:d,m:f,um:p,n:g,o:{parentNode:m,remove:y}}=u;let w;const k=jO(e);k&&t&&t.pendingBranch&&(w=t.pendingId,t.deps++);const A=e.props?Vg(e.props.timeout):void 0,v=o,x={vnode:e,parent:t,parentComponent:n,namespace:r,container:i,hiddenContainer:s,deps:0,pendingId:$4++,timeout:typeof A=="number"?A:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(S=!1,I=!1){const{vnode:_,activeBranch:E,pendingBranch:N,pendingId:D,effects:T,parentComponent:$,container:O,isInFallback:P}=x;let R=!1;if(x.isHydrating)x.isHydrating=!1;else if(!S){R=E&&N.transition&&N.transition.mode==="out-in";let K=!1;R&&(E.transition.afterLeave=()=>{D===x.pendingId&&(f(N,O,o===v&&!K?g(E):o,0),Jg(T),P&&_.ssFallback&&(_.ssFallback.el=null))}),E&&!x.isFallbackMountPending&&(m(E.el)===O&&(o=g(E),K=!0),p(E,$,x,!0),!R&&P&&_.ssFallback&&cs(()=>_.ssFallback.el=null,x)),R||f(N,O,o,0)}x.isFallbackMountPending=!1,rf(x,N),x.pendingBranch=null,x.isInFallback=!1;let j=x.parent,z=!1;for(;j;){if(j.pendingBranch){j.effects.push(...T),z=!0;break}j=j.parent}!z&&!R&&Jg(T),x.effects=[],k&&t&&t.pendingBranch&&w===t.pendingId&&(t.deps--,t.deps===0&&!I&&t.resolve()),Rh(_,"onResolve")},fallback(S){if(!x.pendingBranch)return;const{vnode:I,activeBranch:_,parentComponent:E,container:N,namespace:D}=x;Rh(I,"onFallback");const T=g(_),$=()=>{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,S,N,T,E,null,D,l,a),rf(x,S))},O=S.transition&&S.transition.mode==="out-in";O&&(x.isFallbackMountPending=!0,_.transition.afterLeave=$),x.isInFallback=!0,p(_,E,null,!0),O||$()},move(S,I,_){x.activeBranch&&f(x.activeBranch,S,I,_),x.container=S},next(){return x.activeBranch&&g(x.activeBranch)},registerDep(S,I,_){const E=!!x.pendingBranch;E&&x.deps++;const N=S.vnode.el;S.asyncDep.catch(D=>{zf(D,S,0)}).then(D=>{if(S.isUnmounted||x.isUnmounted||x.pendingId!==S.suspenseId)return;Oh(),S.asyncResolved=!0;const{vnode:T}=S;D4(S,D,!1),N&&(T.el=N);const $=!N&&S.subTree.el;I(S,T,m(N||S.subTree.el),N?null:g(S.subTree),x,r,_),$&&(T.placeholder=null,y($)),Z2(S,T.el),E&&--x.deps===0&&x.resolve()})},unmount(S,I){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,S,I),x.pendingBranch&&p(x.pendingBranch,n,S,I)}};return x}function OO(e,t,n,i,s,o,r,l,a){const u=t.suspense=TI(t,i,n,e.parentNode,document.createElement("div"),null,s,o,r,l,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,o,r);return u.deps===0&&u.resolve(!1,!0),c}function PO(e){const{shapeFlag:t,children:n}=e,i=t&32;e.ssContent=n7(i?n.default:n),e.ssFallback=i?n7(n.fallback):V(hs)}function n7(e){let t;if(pn(e)){const n=Hc&&e._c;n&&(e._d=!1,b()),e=e(),n&&(e._d=!0,t=yo,NI())}return Xt(e)&&(e=wO(e)),e=Qo(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function LI(e,t){t&&t.pendingBranch?Xt(e)?t.effects.push(...e):t.effects.push(e):Jg(e)}function rf(e,t){e.activeBranch=t;const{vnode:n,parentComponent:i}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,i&&i.subTree===n&&(i.vnode.el=s,Z2(i,s))}function jO(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Be=Symbol.for("v-fgt"),fu=Symbol.for("v-txt"),hs=Symbol.for("v-cmt"),lf=Symbol.for("v-stc"),rh=[];let yo=null;function b(e=!1){rh.push(yo=e?null:[])}function NI(){rh.pop(),yo=rh[rh.length-1]||null}let Hc=1;function om(e,t=!1){Hc+=e,e<0&&yo&&t&&(yo.hasOnce=!0)}function FI(e){return e.dynamicChildren=Hc>0?yo||ef:null,NI(),Hc>0&&yo&&yo.push(e),e}function M(e,t,n,i,s,o){return FI(C(e,t,n,i,s,o,!0))}function de(e,t,n,i,s){return FI(V(e,t,n,i,s,!0))}function bu(e){return e?e.__v_isVNode===!0:!1}function tl(e,t){return e.type===t.type&&e.key===t.key}function RQe(e){}const BI=({key:e})=>e??null,yg=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ai(e)||ss(e)||pn(e)?{i:to,r:e,k:t,f:!!n}:e:null);function C(e,t=null,n=null,i=0,s=null,o=e===Be?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&BI(t),ref:t&&yg(t),scopeId:U2,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:o,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:to};return l?(rm(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=Ai(n)?8:16),Hc>0&&!r&&yo&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&yo.push(a),a}const V=HO;function HO(e,t=null,n=null,i=0,s=null,o=!1){if((!e||e===cI)&&(e=hs),bu(e)){const l=Sa(e,t,!0);return n&&rm(l,n),Hc>0&&!o&&yo&&(l.shapeFlag&6?yo[yo.indexOf(e)]=l:yo.push(l)),l.patchFlag=-2,l}if(VO(e)&&(e=e.__vccOpts),t){t=$I(t);let{class:l,style:a}=t;l&&!Ai(l)&&(t.class=$e(l)),oi(a)&&(q2(a)&&!Xt(a)&&(a=pi({},a)),t.style=Vt(a))}const r=Ai(e)?1:sm(e)?128:nI(e)?64:oi(e)?4:pn(e)?2:0;return C(e,t,n,i,s,r,o,!0)}function $I(e){return e?q2(e)||kI(e)?pi({},e):e:null}function Sa(e,t,n=!1,i=!1){const{props:s,ref:o,patchFlag:r,children:l,transition:a}=e,u=t?Jn(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&BI(u),ref:t&&t.ref?n&&o?Xt(o)?o.concat(yg(t)):[o,yg(t)]:yg(t):o,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!==Be?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&&Sa(e.ssContent),ssFallback:e.ssFallback&&Sa(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&i&&yu(c,a.clone(c)),c}function qe(e=" ",t=0){return V(fu,null,e,t)}function Tu(e,t){const n=V(lf,null,e);return n.staticCount=t,n}function te(e="",t=!1){return t?(b(),de(hs,null,e)):V(hs,null,e)}function Qo(e){return e==null||typeof e=="boolean"?V(hs):Xt(e)?V(Be,null,e.slice()):bu(e)?da(e):V(fu,null,String(e))}function da(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Sa(e)}function rm(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(Xt(t))n=16;else if(typeof t=="object")if(i&65){const s=t.default;s&&(s._c&&(s._d=!1),rm(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!kI(t)?t._ctx=to:s===3&&to&&(to.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(pn(t)){if(i&65){rm(e,{default:t});return}t={default:t,_ctx:to},n=32}else t=String(t),i&64?(n=16,t=[qe(t)]):n=8;e.children=t,e.shapeFlag|=n}function Jn(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const s in i)if(s==="class")t.class!==i.class&&(t.class=$e([t.class,i.class]));else if(s==="style")t.style=Vt([t.style,i.style]);else if(dp(s)){const o=t[s],r=i[s];r&&o!==r&&!(Xt(o)&&o.includes(r))?t[s]=o?[].concat(o,r):r:r==null&&o==null&&!L2(s)&&(t[s]=r)}else s!==""&&(t[s]=i[s])}return t}function Ko(e,t,n,i=null){Pr(e,t,7,[n,i])}const WO=pI();let qO=0;function DI(e,t,n){const i=e.type,s=(t?t.appContext:e.appContext)||WO,o={uid:qO++,vnode:e,type:i,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new EM(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:CI(i,s),emitsOptions:mI(i,s),emit:null,emitted:null,propsDefaults:Dn,inheritAttrs:i.inheritAttrs,ctx:Dn,data:Dn,props:Dn,attrs:Dn,slots:Dn,refs:Dn,setupState:Dn,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=AO.bind(null,o),e.ce&&e.ce(o),o}let eo=null;const ys=()=>eo||to;let lm,af;{const e=z2(),t=(n,i)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(i),o=>{s.length>1?s.forEach(r=>r(o)):s[0](o)}};lm=t("__VUE_INSTANCE_SETTERS__",n=>eo=n),af=t("__VUE_SSR_SETTERS__",n=>Wc=n)}const Of=e=>{const t=eo;return lm(e),e.scope.on(),()=>{e.scope.off(),lm(t)}},Oh=()=>{eo&&eo.scope.off(),lm(null)};function zI(e){return e.vnode.shapeFlag&4}let Wc=!1;function RI(e,t=!1,n=!1){t&&af(t);const{props:i,children:s}=e.vnode,o=zI(e);MO(e,i,o,t),LO(e,s,n||t);const r=o?UO(e,t):void 0;return t&&af(!1),r}function UO(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,L4);const{setup:i}=n;if(i){jl();const s=e.setupContext=i.length>1?PI(e):null,o=Of(e),r=fp(i,e,0,[e.props,s]),l=H8(r);if(Hl(),o(),(l||e.sp)&&!ka(e)&&Z8(e),l){if(r.then(Oh,Oh),t)return r.then(a=>{D4(e,a,t)}).catch(a=>{zf(a,e,0)});e.asyncDep=r}else D4(e,r,t)}else OI(e,t)}function D4(e,t,n){pn(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:oi(t)&&(e.setupState=VM(t)),OI(e,n)}let am,z4;function OQe(e){am=e,z4=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,hO))}}const PQe=()=>!am;function OI(e,t,n){const i=e.type;if(!e.render){if(!t&&am&&!i.render){const s=i.template||X8(e).template;if(s){const{isCustomElement:o,compilerOptions:r}=e.appContext.config,{delimiters:l,compilerOptions:a}=i,u=pi(pi({isCustomElement:o,delimiters:l},r),a);i.render=am(s,u)}}e.render=i.render||Rr,z4&&z4(e)}{const s=Of(e);jl();try{pO(e)}finally{Hl(),s()}}}const KO={get(e,t){return go(e,"get",""),e[t]}};function PI(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,KO),slots:e.slots,emit:e.emit,expose:t}}function mp(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(VM(wt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in oh)return oh[n](e)},has(t,n){return n in t||n in oh}})):e.proxy}function R4(e,t=!0){return pn(e)?e.displayName||e.name:e.name||t&&e.__name}function VO(e){return pn(e)&&"__vccOpts"in e}const F=(e,t)=>MR(e,t,Wc);function dn(e,t,n){try{om(-1);const i=arguments.length;return i===2?oi(t)&&!Xt(t)?bu(t)?V(e,null,[t]):V(e,t):V(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&bu(n)&&(n=[n]),V(e,t,n))}finally{om(1)}}function jQe(){}function HQe(e,t,n,i){const s=n[i];if(s&&ZO(s,e))return s;const o=t();return o.memo=e.slice(),o.cacheIndex=i,n[i]=o}function ZO(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let i=0;i<n.length;i++)if(Ps(n[i],t[i]))return!1;return Hc>0&&yo&&yo.push(e),!0}const GO="3.5.39",WQe=Rr,qQe=NR,UQe=zd,KQe=XM,QO={createComponentInstance:DI,setupComponent:RI,renderComponentRoot:vg,setCurrentRenderingInstance:$h,isVNode:bu,normalizeVNode:Qo,getComponentPublicInstance:mp,ensureValidVNode:J8,pushWarningContext:TR,popWarningContext:LR},VQe=QO,ZQe=null,GQe=null,QQe=null;/** -* @vue/runtime-dom v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let O4;const i7=typeof window<"u"&&window.trustedTypes;if(i7)try{O4=i7.createPolicy("vue",{createHTML:e=>e})}catch{}const jI=O4?e=>O4.createHTML(e):e=>e,YO="http://www.w3.org/2000/svg",JO="http://www.w3.org/1998/Math/MathML",aa=typeof document<"u"?document:null,s7=aa&&aa.createElement("template"),XO={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const s=t==="svg"?aa.createElementNS(YO,e):t==="mathml"?aa.createElementNS(JO,e):n?aa.createElement(e,{is:n}):aa.createElement(e);return e==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:e=>aa.createTextNode(e),createComment:e=>aa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>aa.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,s,o){const r=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{s7.innerHTML=jI(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const l=s7.content;if(i==="svg"||i==="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]}},Pa="transition",k1="animation",xf=Symbol("_vtc"),HI={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},WI=pi({},sI,HI),eP=e=>(e.displayName="Transition",e.props=WI,e),gs=eP((e,{slots:t})=>dn(WR,qI(e),t)),sc=(e,t=[])=>{Xt(e)?e.forEach(n=>n(...t)):e&&e(...t)},o7=e=>e?Xt(e)?e.some(t=>t.length>1):e.length>1:!1;function qI(e){const t={};for(const T in e)T in HI||(t[T]=e[T]);if(e.css===!1)return t;const{name:n="v",type:i,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=o,appearActiveClass:u=r,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,g=tP(s),m=g&&g[0],y=g&&g[1],{onBeforeEnter:w,onEnter:k,onEnterCancelled:A,onLeave:v,onLeaveCancelled:x,onBeforeAppear:S=w,onAppear:I=k,onAppearCancelled:_=A}=t,E=(T,$,O,P)=>{T._enterCancelled=P,Qa(T,$?c:l),Qa(T,$?u:r),O&&O()},N=(T,$)=>{T._isLeaving=!1,Qa(T,d),Qa(T,p),Qa(T,f),$&&$()},D=T=>($,O)=>{const P=T?I:k,R=()=>E($,T,O);sc(P,[$,R]),r7(()=>{Qa($,T?a:o),El($,T?c:l),o7(P)||l7($,i,m,R)})};return pi(t,{onBeforeEnter(T){sc(w,[T]),El(T,o),El(T,r)},onBeforeAppear(T){sc(S,[T]),El(T,a),El(T,u)},onEnter:D(!1),onAppear:D(!0),onLeave(T,$){T._isLeaving=!0;const O=()=>N(T,$);El(T,d),T._enterCancelled?(El(T,f),P4(T)):(P4(T),El(T,f)),r7(()=>{T._isLeaving&&(Qa(T,d),El(T,p),o7(v)||l7(T,i,y,O))}),sc(v,[T,O])},onEnterCancelled(T){E(T,!1,void 0,!0),sc(A,[T])},onAppearCancelled(T){E(T,!0,void 0,!0),sc(_,[T])},onLeaveCancelled(T){N(T),sc(x,[T])}})}function tP(e){if(e==null)return null;if(oi(e))return[O9(e.enter),O9(e.leave)];{const t=O9(e);return[t,t]}}function O9(e){return Vg(e)}function El(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[xf]||(e[xf]=new Set)).add(t)}function Qa(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[xf];n&&(n.delete(t),n.size||(e[xf]=void 0))}function r7(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let nP=0;function l7(e,t,n,i){const s=e._endId=++nP,o=()=>{s===e._endId&&i()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:l,propCount:a}=UI(e,t);if(!r)return i();const u=r+"end";let c=0;const d=()=>{e.removeEventListener(u,f),o()},f=p=>{p.target===e&&++c>=a&&d()};setTimeout(()=>{c<a&&d()},l+1),e.addEventListener(u,f)}function UI(e,t){const n=window.getComputedStyle(e),i=g=>(n[g]||"").split(", "),s=i(`${Pa}Delay`),o=i(`${Pa}Duration`),r=a7(s,o),l=i(`${k1}Delay`),a=i(`${k1}Duration`),u=a7(l,a);let c=null,d=0,f=0;t===Pa?r>0&&(c=Pa,d=r,f=o.length):t===k1?u>0&&(c=k1,d=u,f=a.length):(d=Math.max(r,u),c=d>0?r>u?Pa:k1:null,f=c?c===Pa?o.length:a.length:0);const p=c===Pa&&/\b(?:transform|all)(?:,|$)/.test(i(`${Pa}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function a7(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>u7(n)+u7(e[i])))}function u7(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function P4(e){return(e?e.ownerDocument:document).body.offsetHeight}function iP(e,t,n){const i=e[xf];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const um=Symbol("_vod"),i5=Symbol("_vsh"),is={name:"show",beforeMount(e,{value:t},{transition:n}){e[um]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):A1(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),A1(e,!0),i.enter(e)):i.leave(e,()=>{A1(e,!1)}):A1(e,t))},beforeUnmount(e,{value:t}){A1(e,t)}};function A1(e,t){e.style.display=t?e[um]:"none",e[i5]=!t}function sP(){is.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const KI=Symbol("");function YQe(e){const t=ys();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>cm(o,s))},i=()=>{const s=e(t.proxy);t.ce?cm(t.ce,s):j4(t.subTree,s),n(s)};uI(()=>{Jg(i)}),gn(()=>{Ge(i,Rr,{flush:"post"});const s=new MutationObserver(i);s.observe(t.subTree.el.parentNode,{childList:!0}),Cn(()=>s.disconnect())})}function j4(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{j4(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)cm(e.el,t);else if(e.type===Be)e.children.forEach(n=>j4(n,t));else if(e.type===lf){let{el:n,anchor:i}=e;for(;n&&(cm(n,t),n!==i);)n=n.nextSibling}}function cm(e,t){if(e.nodeType===1){const n=e.style;let i="";for(const s in t){const o=Xz(t[s]);n.setProperty(`--${s}`,o),i+=`--${s}: ${o};`}n[KI]=i}}const oP=/(?:^|;)\s*display\s*:/;function rP(e,t,n){const i=e.style,s=Ai(n);let o=!1;if(n&&!s){if(t)if(Ai(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&O1(i,l,"")}else for(const r in t)n[r]==null&&O1(i,r,"");for(const r in n){r==="display"&&(o=!0);const l=n[r];l!=null?aP(e,r,!Ai(t)&&t?t[r]:void 0,l)||O1(i,r,l):O1(i,r,"")}}else if(s){if(t!==n){const r=i[KI];r&&(n+=";"+r),i.cssText=n,o=oP.test(n)}}else t&&e.removeAttribute("style");um in e&&(e[um]=o?i.display:"",e[i5]&&(i.display="none"))}const c7=/\s*!important$/;function O1(e,t,n){if(Xt(n))n.forEach(i=>O1(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=lP(e,t);c7.test(n)?e.setProperty(Yo(i),n.replace(c7,""),"important"):e[i]=n}}const d7=["Webkit","Moz","ms"],P9={};function lP(e,t){const n=P9[t];if(n)return n;let i=Ts(t);if(i!=="filter"&&i in e)return P9[t]=i;i=$2(i);for(let s=0;s<d7.length;s++){const o=d7[s]+i;if(o in e)return P9[t]=o}return t}function aP(e,t,n,i){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ai(i)&&n===i}const f7="http://www.w3.org/1999/xlink";function h7(e,t,n,i,s,o=Yz(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(f7,t.slice(6,t.length)):e.setAttributeNS(f7,t,n):n==null||o&&!SM(n)?e.removeAttribute(t):e.setAttribute(t,o?"":Cr(n)?String(n):n)}function p7(e,t,n,i,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?jI(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const l=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=SM(n):n==null&&l==="string"?(n="",r=!0):l==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(s||t)}function pa(e,t,n,i){e.addEventListener(t,n,i)}function uP(e,t,n,i){e.removeEventListener(t,n,i)}const g7=Symbol("_vei");function cP(e,t,n,i,s=null){const o=e[g7]||(e[g7]={}),r=o[t];if(i&&r)r.value=i;else{const[l,a]=hP(t);if(i){const u=o[t]=mP(i,s);pa(e,l,u,a)}else r&&(uP(e,l,r,a),o[t]=void 0)}}const dP=/(Once|Passive|Capture)$/,fP=/^on:?(?:Once|Passive|Capture)$/;function hP(e){let t,n;for(;(n=e.match(dP))&&!fP.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Yo(e.slice(2)),t]}let j9=0;const pP=Promise.resolve(),gP=()=>j9||(pP.then(()=>j9=0),j9=Date.now());function mP(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;const s=n.value;if(Xt(s)){const o=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{o.call(i),i._stopped=!0};const r=s.slice(),l=[i];for(let a=0;a<r.length&&!i._stopped;a++){const u=r[a];u&&Pr(u,t,5,l)}}else Pr(s,t,5,[i])};return n.value=e,n.attached=gP(),n}const m7=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,vP=(e,t,n,i,s,o)=>{const r=s==="svg";t==="class"?iP(e,i,r):t==="style"?rP(e,n,i):dp(t)?L2(t)||cP(e,t,n,i,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):yP(e,t,i,r))?(p7(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&h7(e,t,i,r,o,t!=="value")):e._isVueCE&&(bP(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ai(i)))?p7(e,Ts(t),i,o,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),h7(e,t,i,r))};function yP(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&m7(t)&&pn(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 m7(t)&&Ai(n)?!1:t in e}function bP(e,t){const n=e._def.props;if(!n)return!1;const i=Ts(t);return Array.isArray(n)?n.some(s=>Ts(s)===i):Object.keys(n).some(s=>Ts(s)===i)}const v7={};function kP(e,t,n){let i=nt(e,t);N2(i)&&(i=pi({},i,t));class s extends s5{constructor(r){super(i,r,n)}}return s.def=i,s}const JQe=((e,t)=>kP(e,t,DP)),AP=typeof HTMLElement<"u"?HTMLElement:class{};class s5 extends AP{constructor(t,n={},i=hm){super(),this._def=t,this._props=n,this._createApp=i,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&&i!==hm?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(pi({},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 s5){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,At(()=>{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 i=0;i<this.attributes.length;i++)this._setAttr(this.attributes[i].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(i,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:r}=i;let l;if(o&&!Xt(o))for(const a in o){const u=o[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=Vg(this._props[a])),(l||(l=Object.create(null)))[Ts(a)]=!0)}this._numberProps=l,this._resolveProps(i),this.shadowRoot&&this._applyStyles(r),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>{i.configureApp=this._def.configureApp,t(this._def=i,!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 i in n)si(this,i)||Object.defineProperty(this,i,{get:()=>h(n[i])})}_resolveProps(t){const{props:n}=t,i=Xt(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&i.includes(s)&&this._setProp(s,this[s]);for(const s of i.map(Ts))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(o){this._setProp(s,o,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let i=n?this.getAttribute(t):v7;const s=Ts(t);n&&this._numberProps&&this._numberProps[s]&&(i=Vg(i)),this._setProp(s,i,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,i=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===v7?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),i)){const o=this._ob;o&&(this._processMutations(o.takeRecords()),o.disconnect()),n===!0?this.setAttribute(Yo(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Yo(t),n+""):n||this.removeAttribute(Yo(t)),o&&o.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),$P(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=V(this._def,pi(t,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const s=(o,r)=>{this.dispatchEvent(new CustomEvent(o,N2(r[0])?pi({detail:r},r[0]):{detail:r}))};i.emit=(o,...r)=>{s(o,r),Yo(o)!==o&&s(Yo(o),r)},this._setParent()}),n}_applyStyles(t,n,i){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,o=this.shadowRoot,r=i?this._getStyleAnchor(i)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(o);let l=null;for(let a=t.length-1;a>=0;a--){const u=document.createElement("style");s&&u.setAttribute("nonce",s),u.textContent=t[a],o.insertBefore(u,l||r),l=u,a===0&&(i||this._styleAnchors.set(this._def,u),n&&this._styleAnchors.set(n,u))}}_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<t.childNodes.length;n++){const i=t.childNodes[n];if(!(i instanceof HTMLStyleElement))return i}return null}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(t[i]||(t[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let i=0;i<t.length;i++){const s=t[i],o=s.getAttribute("name")||"default",r=this._slots[o],l=s.parentNode;if(r)for(const a of r){if(n&&a.nodeType===1){const u=n+"-s",c=document.createTreeWalker(a,1);a.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}l.insertBefore(a,s)}else for(;s.firstChild;)l.insertBefore(s.firstChild,s);l.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const n=new Set;for(const i of t){const s=i.querySelectorAll("slot");for(let o=0;o<s.length;o++)n.add(s[o])}return Array.from(n)}_injectChildStyle(t,n){this._applyStyles(t.styles,t,n)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(t){}}function CP(e){const t=ys(),n=t&&t.ce;return n||null}function XQe(){const e=CP();return e&&e.shadowRoot}function eYe(e="$style"){{const t=ys();if(!t)return Dn;const n=t.type.__cssModules;if(!n)return Dn;const i=n[e];return i||Dn}}const VI=new WeakMap,ZI=new WeakMap,dm=Symbol("_moveCb"),y7=Symbol("_enterCb"),wP=e=>(delete e.props.mode,e),xP=wP({name:"TransitionGroup",props:pi({},WI,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ys(),i=iI();let s,o;return gp(()=>{if(!s.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!IP(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(_P),s.forEach(SP);const l=s.filter(MP);P4(n.vnode.el),l.forEach(a=>{const u=a.el,c=u.style;El(u,r),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[dm]=f=>{f&&f.target!==u||(!f||f.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[dm]=null,Qa(u,r))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const r=Vn(e),l=qI(r);let a=r.tag||Be;if(s=[],o)for(let u=0;u<o.length;u++){const c=o[u];c.el&&c.el instanceof Element&&!c.el[i5]&&(s.push(c),yu(c,Dh(c,l,i,n)),VI.set(c,QI(c.el)))}o=t.default?V8(t.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&yu(c,Dh(c,l,i,n))}return V(a,null,o)}}}),GI=xP;function _P(e){const t=e.el;t[dm]&&t[dm](),t[y7]&&t[y7]()}function SP(e){ZI.set(e,QI(e.el))}function MP(e){const t=VI.get(e),n=ZI.get(e),i=t.left-n.left,s=t.top-n.top;if(i||s){const o=e.el,r=o.style,l=o.getBoundingClientRect();let a=1,u=1;return o.offsetWidth&&(a=l.width/o.offsetWidth),o.offsetHeight&&(u=l.height/o.offsetHeight),(!Number.isFinite(a)||a===0)&&(a=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(a-1)<.01&&(a=1),Math.abs(u-1)<.01&&(u=1),r.transform=r.webkitTransform=`translate(${i/a}px,${s/u}px)`,r.transitionDuration="0s",e}}function QI(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function IP(e,t,n){const i=e.cloneNode(),s=e[xf];s&&s.forEach(l=>{l.split(/\s+/).forEach(a=>a&&i.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&i.classList.add(l)),i.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(i);const{hasTransform:r}=UI(i);return o.removeChild(i),r}const ku=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Xt(t)?n=>nf(t,n):t};function EP(e){e.target.composing=!0}function b7(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Or=Symbol("_assign");function k7(e,t,n){return t&&(e=e.trim()),n&&(e=D2(e)),e}const Ao={created(e,{modifiers:{lazy:t,trim:n,number:i}},s){e[Or]=ku(s);const o=i||s.props&&s.props.type==="number";pa(e,t?"change":"input",r=>{r.target.composing||e[Or](k7(e.value,n,o))}),(n||o)&&pa(e,"change",()=>{e.value=k7(e.value,n,o)}),t||(pa(e,"compositionstart",EP),pa(e,"compositionend",b7),pa(e,"change",b7))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:s,number:o}},r){if(e[Or]=ku(r),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?D2(e.value):e.value,a=t??"";if(l===a)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(i&&t===n||s&&e.value.trim()===a)||(e.value=a)}},fm={deep:!0,created(e,t,n){e[Or]=ku(n),pa(e,"change",()=>{const i=e._modelValue,s=_f(e),o=e.checked,r=e[Or];if(Xt(i)){const l=R2(i,s),a=l!==-1;if(o&&!a)r(i.concat(s));else if(!o&&a){const u=[...i];u.splice(l,1),r(u)}}else if(nd(i)){const l=new Set(i);o?l.add(s):l.delete(s),r(l)}else r(JI(e,o))})},mounted:A7,beforeUpdate(e,t,n){e[Or]=ku(n),A7(e,t,n)}};function A7(e,{value:t,oldValue:n},i){e._modelValue=t;let s;if(Xt(t))s=R2(t,i.props.value)>-1;else if(nd(t))s=t.has(i.props.value);else{if(t===n)return;s=xa(t,JI(e,!0))}e.checked!==s&&(e.checked=s)}const YI={created(e,{value:t},n){e.checked=xa(t,n.props.value),e[Or]=ku(n),pa(e,"change",()=>{e[Or](_f(e))})},beforeUpdate(e,{value:t,oldValue:n},i){e[Or]=ku(i),t!==n&&(e.checked=xa(t,i.props.value))}},H4={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const s=nd(t);pa(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?D2(_f(r)):_f(r));e[Or](e.multiple?s?new Set(o):o:o[0]),e._assigning=!0,At(()=>{e._assigning=!1})}),e[Or]=ku(i)},mounted(e,{value:t}){C7(e,t)},beforeUpdate(e,t,n){e[Or]=ku(n)},updated(e,{value:t}){e._assigning||C7(e,t)}};function C7(e,t){const n=e.multiple,i=Xt(t);if(!(n&&!i&&!nd(t))){for(let s=0,o=e.options.length;s<o;s++){const r=e.options[s],l=_f(r);if(n)if(i){const a=typeof l;a==="string"||a==="number"?r.selected=t.some(u=>String(u)===String(l)):r.selected=R2(t,l)>-1}else r.selected=t.has(l);else if(xa(_f(r),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function _f(e){return"_value"in e?e._value:e.value}function JI(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const TP={created(e,t,n){C0(e,t,n,null,"created")},mounted(e,t,n){C0(e,t,n,null,"mounted")},beforeUpdate(e,t,n,i){C0(e,t,n,i,"beforeUpdate")},updated(e,t,n,i){C0(e,t,n,i,"updated")}};function XI(e,t){switch(e){case"SELECT":return H4;case"TEXTAREA":return Ao;default:switch(t){case"checkbox":return fm;case"radio":return YI;default:return Ao}}}function C0(e,t,n,i,s){const r=XI(e.tagName,n.props&&n.props.type)[s];r&&r(e,t,n,i)}function LP(){Ao.getSSRProps=({value:e})=>({value:e}),YI.getSSRProps=({value:e},t)=>{if(t.props&&xa(t.props.value,e))return{checked:!0}},fm.getSSRProps=({value:e},t)=>{if(Xt(e)){if(t.props&&R2(e,t.props.value)>-1)return{checked:!0}}else if(nd(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},TP.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=XI(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const NP=["ctrl","shift","alt","meta"],FP={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)=>NP.some(n=>e[`${n}Key`]&&!t.includes(n))},It=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=((s,...o)=>{for(let r=0;r<t.length;r++){const l=FP[t[r]];if(l&&l(s,t))return}return e(s,...o)}))},BP={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Hr=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=(s=>{if(!("key"in s))return;const o=Yo(s.key);if(t.some(r=>r===o||BP[r]===o))return e(s)}))},eE=pi({patchProp:vP},XO);let lh,w7=!1;function tE(){return lh||(lh=FO(eE))}function nE(){return lh=w7?lh:BO(eE),w7=!0,lh}const $P=((...e)=>{tE().render(...e)}),tYe=((...e)=>{nE().hydrate(...e)}),hm=((...e)=>{const t=tE().createApp(...e),{mount:n}=t;return t.mount=i=>{const s=sE(i);if(!s)return;const o=t._component;!pn(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,iE(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t}),DP=((...e)=>{const t=nE().createApp(...e),{mount:n}=t;return t.mount=i=>{const s=sE(i);if(s)return n(s,!0,iE(s))},t});function iE(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sE(e){return Ai(e)?document.querySelector(e):e}let x7=!1;const nYe=()=>{x7||(x7=!0,LP(),sP())};/*! - * shared v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function zP(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const pm=typeof window<"u",Lu=(e,t=!1)=>t?Symbol.for(e):Symbol(e),RP=(e,t,n)=>OP({l:e,k:t,s:n}),OP=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ps=e=>typeof e=="number"&&isFinite(e),oE=e=>r5(e)==="[object Date]",Sf=e=>r5(e)==="[object RegExp]",G2=e=>Hn(e)&&Object.keys(e).length===0,ms=Object.assign,PP=Object.create,ki=(e=null)=>PP(e);let _7;const _c=()=>_7||(_7=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:ki());function S7(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function jP(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}const HP=/^\s*javascript\s*(?::|�*58;?|�*3a;?|:?)/i,WP=/^(?:href|src|action|formaction)$/i;function o5(e){return HP.test(e)}function qP(e){const t=/url\s*\(/gi;let n="",i=0,s;for(;(s=t.exec(e))!==null;){const o=s.index,r=t.lastIndex-1;let l=r+1,a=1,u=null;for(;l<e.length;l++){const f=e[l];if(u){f===u&&(u=null);continue}if(f==='"'||f==="'")u=f;else if(f==="(")a++;else if(f===")"&&(a--,a===0))break}if(a!==0)break;const c=e.slice(r+1,l).trim(),d=c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'")?c.slice(1,-1).trim():c;n+=e.slice(i,o),n+=o5(d)?"url(about:blank)":e.slice(o,l+1),i=l+1}return n+e.slice(i)}function M7(e,t){if(WP.test(e)&&o5(t))return"about:blank";const n=e.toLowerCase()==="style"?qP(t):t;return jP(n)}function UP(e){return e=e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(n,i,s)=>`${i}="${M7(i,s)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(n,i,s)=>`${i}='${M7(i,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,i,s)=>o5(s)?`${i}about:blank`:n),e}const KP=Object.prototype.hasOwnProperty;function Dr(e,t){return KP.call(e,t)}const Yi=Array.isArray,Bi=e=>typeof e=="function",Kt=e=>typeof e=="string",ei=e=>typeof e=="boolean",ni=e=>e!==null&&typeof e=="object",VP=e=>ni(e)&&Bi(e.then)&&Bi(e.catch),rE=Object.prototype.toString,r5=e=>rE.call(e),Hn=e=>r5(e)==="[object Object]",ZP=e=>e==null?"":Yi(e)||Hn(e)&&e.toString===rE?JSON.stringify(e,null,2):String(e);function l5(e,t=""){return e.reduce((n,i,s)=>s===0?n+i:n+t+i,"")}const w0=e=>!ni(e)||Yi(e);function bg(e,t){if(w0(e)||w0(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:i,des:s}=n.pop();Object.keys(i).forEach(o=>{o!=="__proto__"&&(ni(i[o])&&!ni(s[o])&&(s[o]=Array.isArray(i[o])?[]:ki()),w0(s[o])||w0(i[o])?s[o]=i[o]:n.push({src:i[o],des:s[o]}))})}}/*! - * message-compiler v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function GP(e,t,n){return{line:e,column:t,offset:n}}function W4(e,t,n){return{start:e,end:t}}const ui={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},QP=17;function Q2(e,t,n={}){const{domain:i,messages:s,args:o}=n,r=e,l=new SyntaxError(String(r));return l.code=e,t&&(l.location=t),l.domain=i,l}function YP(e){throw e}const xl=" ",JP="\r",fo=` -`,XP="\u2028",ej="\u2029";function tj(e){const t=e;let n=0,i=1,s=1,o=0;const r=I=>t[I]===JP&&t[I+1]===fo,l=I=>t[I]===fo,a=I=>t[I]===ej,u=I=>t[I]===XP,c=I=>r(I)||l(I)||a(I)||u(I),d=()=>n,f=()=>i,p=()=>s,g=()=>o,m=I=>r(I)||a(I)||u(I)?fo:t[I],y=()=>m(n),w=()=>m(n+o);function k(){return o=0,c(n)&&(i++,s=0),r(n)&&n++,n++,s++,t[n]}function A(){return r(n+o)&&o++,o++,t[n+o]}function v(){n=0,i=1,s=1,o=0}function x(I=0){o=I}function S(){const I=n+o;for(;I!==n;)k();o=0}return{index:d,line:f,column:p,peekOffset:g,charAt:m,currentChar:y,currentPeek:w,next:k,peek:A,reset:v,resetPeek:x,skipToPeek:S}}const oa=void 0,nj=".",I7="'",ij="tokenizer";function sj(e,t={}){const n=t.location!==!1,i=tj(e),s=()=>i.index(),o=()=>GP(i.line(),i.column(),i.index()),r=o(),l=s(),a={currentType:13,offset:l,startLoc:r,endLoc:r,lastType:13,lastOffset:l,lastStartLoc:r,lastEndLoc:r,braceNest:0,inLinked:!1,text:""},u=()=>a,{onError:c}=t;function d(U,J,ce,...ge){const Me=u();if(J.column+=ce,J.offset+=ce,c){const Pe=n?W4(Me.startLoc,J):null,ke=Q2(U,Pe,{domain:ij,args:ge});c(ke)}}function f(U,J,ce){U.endLoc=o(),U.currentType=J;const ge={type:J};return n&&(ge.loc=W4(U.startLoc,U.endLoc)),ce!=null&&(ge.value=ce),ge}const p=U=>f(U,13);function g(U,J){return U.currentChar()===J?(U.next(),J):(d(ui.EXPECTED_TOKEN,o(),0,J),"")}function m(U){let J="";for(;U.currentPeek()===xl||U.currentPeek()===fo;)J+=U.currentPeek(),U.peek();return J}function y(U){const J=m(U);return U.skipToPeek(),J}function w(U){if(U===oa)return!1;const J=U.charCodeAt(0);return J>=97&&J<=122||J>=65&&J<=90||J===95}function k(U){if(U===oa)return!1;const J=U.charCodeAt(0);return J>=48&&J<=57}function A(U,J){const{currentType:ce}=J;if(ce!==2)return!1;m(U);const ge=w(U.currentPeek());return U.resetPeek(),ge}function v(U,J){const{currentType:ce}=J;if(ce!==2)return!1;m(U);const ge=U.currentPeek()==="-"?U.peek():U.currentPeek(),Me=k(ge);return U.resetPeek(),Me}function x(U,J){const{currentType:ce}=J;if(ce!==2)return!1;m(U);const ge=U.currentPeek()===I7;return U.resetPeek(),ge}function S(U,J){const{currentType:ce}=J;if(ce!==7)return!1;m(U);const ge=U.currentPeek()===".";return U.resetPeek(),ge}function I(U,J){const{currentType:ce}=J;if(ce!==8)return!1;m(U);const ge=w(U.currentPeek());return U.resetPeek(),ge}function _(U,J){const{currentType:ce}=J;if(!(ce===7||ce===11))return!1;m(U);const ge=U.currentPeek()===":";return U.resetPeek(),ge}function E(U,J){const{currentType:ce}=J;if(ce!==9)return!1;const ge=()=>{const Pe=U.currentPeek();return Pe==="{"?w(U.peek()):Pe==="@"||Pe==="|"||Pe===":"||Pe==="."||Pe===xl||!Pe?!1:Pe===fo?(U.peek(),ge()):D(U,!1)},Me=ge();return U.resetPeek(),Me}function N(U){m(U);const J=U.currentPeek()==="|";return U.resetPeek(),J}function D(U,J=!0){const ce=(Me=!1,Pe="")=>{const ke=U.currentPeek();return ke==="{"||ke==="@"||!ke?Me:ke==="|"?!(Pe===xl||Pe===fo):ke===xl?(U.peek(),ce(!0,xl)):ke===fo?(U.peek(),ce(!0,fo)):!0},ge=ce();return J&&U.resetPeek(),ge}function T(U,J){const ce=U.currentChar();return ce===oa?oa:J(ce)?(U.next(),ce):null}function $(U){const J=U.charCodeAt(0);return J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===95||J===36}function O(U){return T(U,$)}function P(U){const J=U.charCodeAt(0);return J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===95||J===36||J===45}function R(U){return T(U,P)}function j(U){const J=U.charCodeAt(0);return J>=48&&J<=57}function z(U){return T(U,j)}function K(U){const J=U.charCodeAt(0);return J>=48&&J<=57||J>=65&&J<=70||J>=97&&J<=102}function q(U){return T(U,K)}function W(U){let J="",ce="";for(;J=z(U);)ce+=J;return ce}function Z(U){let J="";for(;;){const ce=U.currentChar();if(ce==="\\"){const ge=U.peek();ge==="{"||ge==="}"||ge==="@"||ge==="|"||ge==="\\"?(J+=ce+ge,U.next(),U.next()):(U.resetPeek(),J+=ce,U.next())}else{if(ce==="{"||ce==="}"||ce==="@"||ce==="|"||!ce)break;if(ce===xl||ce===fo)if(D(U))J+=ce,U.next();else{if(N(U))break;J+=ce,U.next()}else J+=ce,U.next()}}return J}function ne(U){y(U);let J="",ce="";for(;J=R(U);)ce+=J;const ge=U.currentChar();if(ge&&ge!=="}"&&ge!==oa&&ge!==xl&&ge!==fo&&ge!==" "){const Me=Ne(U);return d(ui.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,ce+Me),ce+Me}return U.currentChar()===oa&&d(ui.UNTERMINATED_CLOSING_BRACE,o(),0),ce}function X(U){y(U);let J="";return U.currentChar()==="-"?(U.next(),J+=`-${W(U)}`):J+=W(U),U.currentChar()===oa&&d(ui.UNTERMINATED_CLOSING_BRACE,o(),0),J}function ue(U){return U!==I7&&U!==fo}function ie(U){y(U),g(U,"'");let J="",ce="";for(;J=T(U,ue);)J==="\\"?ce+=Se(U):ce+=J;const ge=U.currentChar();return ge===fo||ge===oa?(d(ui.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),ge===fo&&(U.next(),g(U,"'")),ce):(g(U,"'"),ce)}function Se(U){const J=U.currentChar();switch(J){case"\\":case"'":return U.next(),`\\${J}`;case"u":return fe(U,J,4);case"U":return fe(U,J,6);default:return d(ui.UNKNOWN_ESCAPE_SEQUENCE,o(),0,J),""}}function fe(U,J,ce){g(U,J);let ge="";for(let Me=0;Me<ce;Me++){const Pe=q(U);if(!Pe){d(ui.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${J}${ge}${U.currentChar()}`);break}ge+=Pe}return`\\${J}${ge}`}function pe(U){return U!=="{"&&U!=="}"&&U!==xl&&U!==fo}function Ne(U){y(U);let J="",ce="";for(;J=T(U,pe);)ce+=J;return ce}function ee(U){let J="",ce="";for(;J=O(U);)ce+=J;return ce}function ye(U){const J=ce=>{const ge=U.currentChar();return ge==="{"||ge==="@"||ge==="|"||ge==="("||ge===")"||!ge||ge===xl?ce:(ce+=ge,U.next(),J(ce))};return J("")}function H(U){y(U);const J=g(U,"|");return y(U),J}function Y(U,J){let ce=null;switch(U.currentChar()){case"{":return J.braceNest>=1&&d(ui.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),U.next(),ce=f(J,2,"{"),y(U),J.braceNest++,ce;case"}":return J.braceNest>0&&J.currentType===2&&d(ui.EMPTY_PLACEHOLDER,o(),0),U.next(),ce=f(J,3,"}"),J.braceNest--,J.braceNest>0&&y(U),J.inLinked&&J.braceNest===0&&(J.inLinked=!1),ce;case"@":return J.braceNest>0&&d(ui.UNTERMINATED_CLOSING_BRACE,o(),0),ce=ve(U,J)||p(J),J.braceNest=0,ce;default:{let Me=!0,Pe=!0,ke=!0;if(N(U))return J.braceNest>0&&d(ui.UNTERMINATED_CLOSING_BRACE,o(),0),ce=f(J,1,H(U)),J.braceNest=0,J.inLinked=!1,ce;if(J.braceNest>0&&(J.currentType===4||J.currentType===5||J.currentType===6))return d(ui.UNTERMINATED_CLOSING_BRACE,o(),0),J.braceNest=0,re(U,J);if(Me=A(U,J))return ce=f(J,4,ne(U)),y(U),ce;if(Pe=v(U,J))return ce=f(J,5,X(U)),y(U),ce;if(ke=x(U,J))return ce=f(J,6,ie(U)),y(U),ce;if(!Me&&!Pe&&!ke)return ce=f(J,12,Ne(U)),d(ui.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,ce.value),y(U),ce;break}}return ce}function ve(U,J){const{currentType:ce}=J;let ge=null;const Me=U.currentChar();switch((ce===7||ce===8||ce===11||ce===9)&&(Me===fo||Me===xl)&&d(ui.INVALID_LINKED_FORMAT,o(),0),Me){case"@":return U.next(),ge=f(J,7,"@"),J.inLinked=!0,ge;case".":return y(U),U.next(),f(J,8,".");case":":return y(U),U.next(),f(J,9,":");default:return N(U)?(ge=f(J,1,H(U)),J.braceNest=0,J.inLinked=!1,ge):S(U,J)||_(U,J)?(y(U),ve(U,J)):I(U,J)?(y(U),f(J,11,ee(U))):E(U,J)?(y(U),Me==="{"?Y(U,J)||ge:f(J,10,ye(U))):(ce===7&&d(ui.INVALID_LINKED_FORMAT,o(),0),J.braceNest=0,J.inLinked=!1,re(U,J))}}function re(U,J){let ce={type:13};if(J.braceNest>0)return Y(U,J)||p(J);if(J.inLinked)return ve(U,J)||p(J);switch(U.currentChar()){case"{":return Y(U,J)||p(J);case"}":return d(ui.UNBALANCED_CLOSING_BRACE,o(),0),U.next(),f(J,3,"}");case"@":return ve(U,J)||p(J);default:{if(N(U))return ce=f(J,1,H(U)),J.braceNest=0,J.inLinked=!1,ce;if(D(U))return f(J,0,Z(U));break}}return ce}function se(){const{currentType:U,offset:J,startLoc:ce,endLoc:ge}=a;return a.lastType=U,a.lastOffset=J,a.lastStartLoc=ce,a.lastEndLoc=ge,a.offset=s(),a.startLoc=o(),i.currentChar()===oa?f(a,13):re(i,a)}return{nextToken:se,currentOffset:s,currentPosition:o,context:u}}const oj="parser",rj=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,lj=/\\([\\@{}|])/g;function aj(e,t){return t}function uj(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(t||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function cj(e={}){const t=e.location!==!1,{onError:n}=e;function i(w,k,A,v,...x){const S=w.currentPosition();if(S.offset+=v,S.column+=v,n){const I=t?W4(A,S):null,_=Q2(k,I,{domain:oj,args:x});n(_)}}function s(w,k,A){const v={type:w};return t&&(v.start=k,v.end=k,v.loc={start:A,end:A}),v}function o(w,k,A,v){t&&(w.end=k,w.loc&&(w.loc.end=A))}function r(w,k){const A=w.context(),v=s(3,A.offset,A.startLoc);return v.value=k.replace(lj,aj),o(v,w.currentOffset(),w.currentPosition()),v}function l(w,k){const A=w.context(),{lastOffset:v,lastStartLoc:x}=A,S=s(5,v,x);return S.index=parseInt(k,10),w.nextToken(),o(S,w.currentOffset(),w.currentPosition()),S}function a(w,k){const A=w.context(),{lastOffset:v,lastStartLoc:x}=A,S=s(4,v,x);return S.key=k,w.nextToken(),o(S,w.currentOffset(),w.currentPosition()),S}function u(w,k){const A=w.context(),{lastOffset:v,lastStartLoc:x}=A,S=s(9,v,x);return S.value=k.replace(rj,uj),w.nextToken(),o(S,w.currentOffset(),w.currentPosition()),S}function c(w){const k=w.nextToken(),A=w.context(),{lastOffset:v,lastStartLoc:x}=A,S=s(8,v,x);return k.type!==11?(i(w,ui.UNEXPECTED_EMPTY_LINKED_MODIFIER,A.lastStartLoc,0),S.value="",o(S,v,x),{nextConsumeToken:k,node:S}):(k.value==null&&i(w,ui.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,_l(k)),S.value=k.value||"",o(S,w.currentOffset(),w.currentPosition()),{node:S})}function d(w,k){const A=w.context(),v=s(7,A.offset,A.startLoc);return v.value=k,o(v,w.currentOffset(),w.currentPosition()),v}function f(w){const k=w.context(),A=s(6,k.offset,k.startLoc);let v=w.nextToken();if(v.type===8){const x=c(w);A.modifier=x.node,v=x.nextConsumeToken||w.nextToken()}switch(v.type!==9&&i(w,ui.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,_l(v)),v=w.nextToken(),v.type===2&&(v=w.nextToken()),v.type){case 10:v.value==null&&i(w,ui.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,_l(v)),A.key=d(w,v.value||"");break;case 4:v.value==null&&i(w,ui.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,_l(v)),A.key=a(w,v.value||"");break;case 5:v.value==null&&i(w,ui.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,_l(v)),A.key=l(w,v.value||"");break;case 6:v.value==null&&i(w,ui.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,_l(v)),A.key=u(w,v.value||"");break;default:{i(w,ui.UNEXPECTED_EMPTY_LINKED_KEY,k.lastStartLoc,0);const x=w.context(),S=s(7,x.offset,x.startLoc);return S.value="",o(S,x.offset,x.startLoc),A.key=S,o(A,x.offset,x.startLoc),{nextConsumeToken:v,node:A}}}return o(A,w.currentOffset(),w.currentPosition()),{node:A}}function p(w){const k=w.context(),A=k.currentType===1?w.currentOffset():k.offset,v=k.currentType===1?k.endLoc:k.startLoc,x=s(2,A,v);x.items=[];let S=null;do{const E=S||w.nextToken();switch(S=null,E.type){case 0:E.value==null&&i(w,ui.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,_l(E)),x.items.push(r(w,E.value||""));break;case 5:E.value==null&&i(w,ui.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,_l(E)),x.items.push(l(w,E.value||""));break;case 4:E.value==null&&i(w,ui.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,_l(E)),x.items.push(a(w,E.value||""));break;case 6:E.value==null&&i(w,ui.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,_l(E)),x.items.push(u(w,E.value||""));break;case 7:{const N=f(w);x.items.push(N.node),S=N.nextConsumeToken||null;break}}}while(k.currentType!==13&&k.currentType!==1);const I=k.currentType===1?k.lastOffset:w.currentOffset(),_=k.currentType===1?k.lastEndLoc:w.currentPosition();return o(x,I,_),x}function g(w,k,A,v){const x=w.context();let S=v.items.length===0;const I=s(1,k,A);I.cases=[],I.cases.push(v);do{const _=p(w);S||(S=_.items.length===0),I.cases.push(_)}while(x.currentType!==13);return S&&i(w,ui.MUST_HAVE_MESSAGES_IN_PLURAL,A,0),o(I,w.currentOffset(),w.currentPosition()),I}function m(w){const k=w.context(),{offset:A,startLoc:v}=k,x=p(w);return k.currentType===13?x:g(w,A,v,x)}function y(w){const k=sj(w,ms({},e)),A=k.context(),v=s(0,A.offset,A.startLoc);return t&&v.loc&&(v.loc.source=w),v.body=m(k),e.onCacheKey&&(v.cacheKey=e.onCacheKey(w)),A.currentType!==13&&i(k,ui.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,w[A.offset]||""),o(v,k.currentOffset(),k.currentPosition()),v}return{parse:y}}function _l(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 dj(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:o=>(n.helpers.add(o),o)}}function E7(e,t){for(let n=0;n<e.length;n++)a5(e[n],t)}function a5(e,t){switch(e.type){case 1:E7(e.cases,t),t.helper("plural");break;case 2:E7(e.items,t);break;case 6:{a5(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function fj(e,t={}){const n=dj(e);n.helper("normalize"),e.body&&a5(e.body,n);const i=n.context();e.helpers=Array.from(i.helpers)}function hj(e){const t=e.body;return t.type===2?T7(t):t.cases.forEach(n=>T7(n)),e}function T7(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;n<e.items.length;n++){const i=e.items[n];if(!(i.type===3||i.type===9)||i.value==null)break;t.push(i.value)}if(t.length===e.items.length){e.static=l5(t);for(let n=0;n<e.items.length;n++){const i=e.items[n];(i.type===3||i.type===9)&&delete i.value}}}}function Rd(e){switch(e.t=e.type,e.type){case 0:{const t=e;Rd(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let i=0;i<n.length;i++)Rd(n[i]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let i=0;i<n.length;i++)Rd(n[i]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;Rd(t.key),t.k=t.key,delete t.key,t.modifier&&(Rd(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function pj(e,t){const{filename:n,breakLineCode:i,needIndent:s}=t,o=t.location!==!1,r={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:s,indentLevel:0};o&&e.loc&&(r.source=e.loc.source);const l=()=>r;function a(m,y){r.code+=m}function u(m,y=!0){const w=y?i:"";a(s?w+" ".repeat(m):w)}function c(m=!0){const y=++r.indentLevel;m&&u(y)}function d(m=!0){const y=--r.indentLevel;m&&u(y)}function f(){u(r.indentLevel)}return{context:l,push:a,indent:c,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>r.needIndent}}function gj(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Mf(e,t.key),t.modifier?(e.push(", "),Mf(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function mj(e,t){const{helper:n,needIndent:i}=e;e.push(`${n("normalize")}([`),e.indent(i());const s=t.items.length;for(let o=0;o<s&&(Mf(e,t.items[o]),o!==s-1);o++)e.push(", ");e.deindent(i()),e.push("])")}function vj(e,t){const{helper:n,needIndent:i}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(i());const s=t.cases.length;for(let o=0;o<s&&(Mf(e,t.cases[o]),o!==s-1);o++)e.push(", ");e.deindent(i()),e.push("])")}}function yj(e,t){t.body?Mf(e,t.body):e.push("null")}function Mf(e,t){const{helper:n}=e;switch(t.type){case 0:yj(e,t);break;case 1:vj(e,t);break;case 2:mj(e,t);break;case 6:gj(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const bj=(e,t={})=>{const n=Kt(t.mode)?t.mode:"normal",i=Kt(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` -`,o=t.needIndent?t.needIndent:n!=="arrow",r=e.helpers||[],l=pj(e,{filename:i,breakLineCode:s,needIndent:o});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(o),r.length>0&&(l.push(`const { ${l5(r.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),Mf(l,e),l.deindent(o),l.push("}"),delete e.helpers;const{code:a,map:u}=l.context();return{ast:e,code:a,map:u?u.toJSON():void 0}};function kj(e,t={}){const n=ms({},t),i=!!n.jit,s=!!n.minify,o=n.optimize==null?!0:n.optimize,l=cj(n).parse(e);return i?(o&&hj(l),s&&Rd(l),{ast:l,code:""}):(fj(l,n),bj(l,n))}/*! - * core-base v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function Aj(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(_c().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(_c().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Ol(e){return ni(e)&&u5(e)===0&&(Dr(e,"b")||Dr(e,"body"))}const lE=["b","body"];function Cj(e){return Nu(e,lE)}const aE=["c","cases"];function wj(e){return Nu(e,aE,[])}const uE=["s","static"];function xj(e){return Nu(e,uE)}const cE=["i","items"];function _j(e){return Nu(e,cE,[])}const dE=["t","type"];function u5(e){return Nu(e,dE)}const fE=["v","value"];function x0(e,t){const n=Nu(e,fE);if(n!=null)return n;throw Ph(t)}const hE=["m","modifier"];function Sj(e){return Nu(e,hE)}const pE=["k","key"];function Mj(e){const t=Nu(e,pE);if(t)return t;throw Ph(6)}function Nu(e,t,n){for(let i=0;i<t.length;i++){const s=t[i];if(Dr(e,s)&&e[s]!=null)return e[s]}return n}const gE=[...lE,...aE,...uE,...cE,...pE,...hE,...fE,...dE];function Ph(e){return new Error(`unhandled node type: ${e}`)}function H9(e){return n=>Ij(n,e)}function Ij(e,t){const n=Cj(t);if(n==null)throw Ph(0);if(u5(n)===1){const o=wj(n);return e.plural(o.reduce((r,l)=>[...r,L7(e,l)],[]))}else return L7(e,n)}function L7(e,t){const n=xj(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const i=_j(t).reduce((s,o)=>[...s,q4(e,o)],[]);return e.normalize(i)}}function q4(e,t){const n=u5(t);switch(n){case 3:return x0(t,n);case 9:return x0(t,n);case 4:{const i=t;if(Dr(i,"k")&&i.k)return e.interpolate(e.named(i.k));if(Dr(i,"key")&&i.key)return e.interpolate(e.named(i.key));throw Ph(n)}case 5:{const i=t;if(Dr(i,"i")&&ps(i.i))return e.interpolate(e.list(i.i));if(Dr(i,"index")&&ps(i.index))return e.interpolate(e.list(i.index));throw Ph(n)}case 6:{const i=t,s=Sj(i),o=Mj(i);return e.linked(q4(e,o),s?q4(e,s):void 0,e.type)}case 7:return x0(t,n);case 8:return x0(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Ej=e=>e;let _0=ki();function Tj(e,t={}){let n=!1;const i=t.onError||YP;return t.onError=s=>{n=!0,i(s)},{...kj(e,t),detectError:n}}function Lj(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Kt(e)){ei(t.warnHtmlMessage)&&t.warnHtmlMessage;const i=(t.onCacheKey||Ej)(e),s=_0[i];if(s)return s;const{ast:o,detectError:r}=Tj(e,{...t,location:!1,jit:!0}),l=H9(o);return r?l:_0[i]=l}else{const n=e.cacheKey;if(n){const i=_0[n];return i||(_0[n]=H9(e))}else return H9(e)}}let jh=null;function Nj(e){jh=e}function Fj(e,t,n){jh&&jh.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const Bj=$j("function:translate");function $j(e){return t=>jh&&jh.emit(e,t)}const ma={INVALID_ARGUMENT:QP,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},Dj=24;function va(e){return Q2(e,null,void 0)}function c5(e,t){return t.locale!=null?N7(t.locale):N7(e.locale)}let W9;function N7(e){if(Kt(e))return e;if(Bi(e)){if(e.resolvedOnce&&W9!=null)return W9;if(e.constructor.name==="Function"){const t=e();if(VP(t))throw va(ma.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return W9=t}else throw va(ma.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw va(ma.NOT_SUPPORT_LOCALE_TYPE)}function zj(e,t,n){return[...new Set([n,...Yi(t)?t:ni(t)?Object.keys(t):Kt(t)?[t]:[n]])]}function U4(e,t,n){const i=Kt(n)?n:Hh,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let o=s.__localeChainCache.get(i);if(!o){o=[];let r=[n];for(;Yi(r);)r=F7(o,r,t);const l=Yi(t)||!Hn(t)?t:t.default?t.default:null;r=Kt(l)?[l]:l,Yi(r)&&F7(o,r,!1),s.__localeChainCache.set(i,o)}return o}function F7(e,t,n){let i=!0;for(let s=0;s<t.length&&ei(i);s++){const o=t[s];Kt(o)&&(i=Rj(e,t[s],n))}return i}function Rj(e,t,n){let i;const s=t.split("-");do{const o=s.join("-");i=Oj(e,o,n),s.splice(-1,1)}while(s.length&&i===!0);return i}function Oj(e,t,n){let i=!1;if(!e.includes(t)&&(i=!0,t)){i=t[t.length-1]!=="!";const s=t.replace(/!/g,"");e.push(s),(Yi(n)||Hn(n))&&n[s]&&(i=n[s])}return i}const Fu=[];Fu[0]={w:[0],i:[3,0],"[":[4],o:[7]};Fu[1]={w:[1],".":[2],"[":[4],o:[7]};Fu[2]={w:[2],i:[3,0],0:[3,0]};Fu[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};Fu[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};Fu[5]={"'":[4,0],o:8,l:[5,0]};Fu[6]={'"':[4,0],o:8,l:[6,0]};const Pj=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function jj(e){return Pj.test(e)}function Hj(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function Wj(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function qj(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:jj(t)?Hj(t):"*"+t}function Uj(e){const t=[];let n=-1,i=0,s=0,o,r,l,a,u,c,d;const f=[];f[0]=()=>{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--,i=4,f[0]();else{if(s=0,r===void 0||(r=qj(r),r===!1))return!1;f[1]()}};function p(){const g=e[n+1];if(i===5&&g==="'"||i===6&&g==='"')return n++,l="\\"+g,f[0](),!0}for(;i!==null;)if(n++,o=e[n],!(o==="\\"&&p())){if(a=Wj(o),d=Fu[i],u=d[a]||d.l||8,u===8||(i=u[0],u[1]!==void 0&&(c=f[u[1]],c&&(l=o,c()===!1))))return;if(i===7)return t}}const B7=new Map;function Kj(e,t){return ni(e)?e[t]:null}function Vj(e,t){if(!ni(e))return null;let n=B7.get(t);if(n||(n=Uj(t),n&&B7.set(t,n)),!n)return null;const i=n.length;let s=e,o=0;for(;o<i;){const r=n[o];if(gE.includes(r)&&Ol(s)||!ni(s)||!Dr(s,r))return null;const l=s[r];if(l===void 0||Bi(s))return null;s=l,o++}return s}const Zj="11.4.6",Y2=-1,Hh="en-US",gm="",$7=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Gj(){return{upper:(e,t)=>t==="text"&&Kt(e)?e.toUpperCase():t==="vnode"&&ni(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Kt(e)?e.toLowerCase():t==="vnode"&&ni(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Kt(e)?$7(e):t==="vnode"&&ni(e)&&"__v_isVNode"in e?$7(e.children):e}}let mE;function Qj(e){mE=e}let vE;function Yj(e){vE=e}let yE;function Jj(e){yE=e}let bE=null;const Xj=e=>{bE=e},eH=()=>bE;let kE=null;const D7=e=>{kE=e},tH=()=>kE;let z7=0;function nH(e={}){const t=Bi(e.onWarn)?e.onWarn:zP,n=Kt(e.version)?e.version:Zj,i=Kt(e.locale)||Bi(e.locale)?e.locale:Hh,s=Bi(i)?Hh:i,o=Yi(e.fallbackLocale)||Hn(e.fallbackLocale)||Kt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,r=Hn(e.messages)?e.messages:q9(s),l=Hn(e.datetimeFormats)?e.datetimeFormats:q9(s),a=Hn(e.numberFormats)?e.numberFormats:q9(s),u=ms(ki(),e.modifiers,Gj()),c=e.pluralRules||ki(),d=Bi(e.missing)?e.missing:null,f=ei(e.missingWarn)||Sf(e.missingWarn)?e.missingWarn:!0,p=ei(e.fallbackWarn)||Sf(e.fallbackWarn)?e.fallbackWarn:!0,g=!!e.fallbackFormat,m=!!e.unresolving,y=Bi(e.postTranslation)?e.postTranslation:null,w=Hn(e.processor)?e.processor:null,k=ei(e.warnHtmlMessage)?e.warnHtmlMessage:!0,A=!!e.escapeParameter,v=Bi(e.messageCompiler)?e.messageCompiler:mE,x=Bi(e.messageResolver)?e.messageResolver:vE||Kj,S=Bi(e.localeFallbacker)?e.localeFallbacker:yE||zj,I=ni(e.fallbackContext)?e.fallbackContext:void 0,_=e,E=ni(_.__datetimeFormatters)?_.__datetimeFormatters:new Map,N=ni(_.__numberFormatters)?_.__numberFormatters:new Map,D=ni(_.__meta)?_.__meta:{};z7++;const T={version:n,cid:z7,locale:i,fallbackLocale:o,messages:r,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:g,unresolving:m,postTranslation:y,processor:w,warnHtmlMessage:k,escapeParameter:A,messageCompiler:v,messageResolver:x,localeFallbacker:S,fallbackContext:I,onWarn:t,__meta:D};return T.datetimeFormats=l,T.numberFormats=a,T.__datetimeFormatters=E,T.__numberFormatters=N,__INTLIFY_PROD_DEVTOOLS__&&Fj(T,n,D),T}const q9=e=>({[e]:ki()});function d5(e,t,n,i,s){const{missing:o,onWarn:r}=e;if(o!==null){const l=o(e,n,t,s);return Kt(l)?l:t}else return t}function C1(e,t,n){const i=e;i.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function iH(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function sH(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let i=n+1;i<t.length;i++)if(iH(e,t[i]))return!0;return!1}function R7(e,...t){const{datetimeFormats:n,unresolving:i,fallbackLocale:s,onWarn:o,localeFallbacker:r}=e,{__datetimeFormatters:l}=e;if(!Kt(t[0])&&!oE(t[0])&&!ps(t[0]))return gm;const[a,u,c,d]=K4(...t),f=ei(c.missingWarn)?c.missingWarn:e.missingWarn;ei(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,g=c5(e,c),m=r(e,s,g);if(!Kt(a)||a===""){const S=new Intl.DateTimeFormat(g.replace(/!/g,""),d);return p?S.formatToParts(u):S.format(u)}let y={},w,k=null;const A="datetime format";for(let S=0;S<m.length&&(w=m[S],y=n[w]||{},k=y[a],!Hn(k));S++)d5(e,a,w,f,A);if(!Hn(k)||!Kt(w))return i?Y2:a;let v=`${w}__${a}`;G2(d)||(v=`${v}__${JSON.stringify(d)}`);let x=l.get(v);return x||(x=new Intl.DateTimeFormat(w,ms({},k,d)),l.set(v,x)),p?x.formatToParts(u):x.format(u)}const AE=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function K4(...e){const[t,n,i,s]=e,o=ki();let r=ki(),l;if(Kt(t)){const a=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!a)throw va(ma.INVALID_ISO_DATE_ARGUMENT);const u=a[3]?a[3].trim().startsWith("T")?`${a[1].trim()}${a[3].trim()}`:`${a[1].trim()}T${a[3].trim()}`:a[1].trim();l=new Date(u);try{l.toISOString()}catch{throw va(ma.INVALID_ISO_DATE_ARGUMENT)}}else if(oE(t)){if(isNaN(t.getTime()))throw va(ma.INVALID_DATE_ARGUMENT);l=t}else if(ps(t))l=t;else throw va(ma.INVALID_ARGUMENT);return Kt(n)?o.key=n:Hn(n)&&Object.keys(n).forEach(a=>{AE.includes(a)?r[a]=n[a]:o[a]=n[a]}),Kt(i)?o.locale=i:Hn(i)&&(r=i),Hn(s)&&(r=s),[o.key||"",l,o,r]}function O7(e,t,n){const i=e;for(const s in n){const o=`${t}__${s}`;i.__datetimeFormatters.has(o)&&i.__datetimeFormatters.delete(o)}}function P7(e,...t){const{numberFormats:n,unresolving:i,fallbackLocale:s,onWarn:o,localeFallbacker:r}=e,{__numberFormatters:l}=e;if(!ps(t[0]))return gm;const[a,u,c,d]=V4(...t),f=ei(c.missingWarn)?c.missingWarn:e.missingWarn;ei(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,g=c5(e,c),m=r(e,s,g);if(!Kt(a)||a===""){const S=new Intl.NumberFormat(g.replace(/!/g,""),d);return p?S.formatToParts(u):S.format(u)}let y={},w,k=null;const A="number format";for(let S=0;S<m.length&&(w=m[S],y=n[w]||{},k=y[a],!Hn(k));S++)d5(e,a,w,f,A);if(!Hn(k)||!Kt(w))return i?Y2:a;let v=`${w}__${a}`;G2(d)||(v=`${v}__${JSON.stringify(d)}`);let x=l.get(v);return x||(x=new Intl.NumberFormat(w,ms({},k,d)),l.set(v,x)),p?x.formatToParts(u):x.format(u)}const CE=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function V4(...e){const[t,n,i,s]=e,o=ki();let r=ki();if(!ps(t))throw va(ma.INVALID_ARGUMENT);const l=t;return Kt(n)?o.key=n:Hn(n)&&Object.keys(n).forEach(a=>{CE.includes(a)?r[a]=n[a]:o[a]=n[a]}),Kt(i)?o.locale=i:Hn(i)&&(r=i),Hn(s)&&(r=s),[o.key||"",l,o,r]}function j7(e,t,n){const i=e;for(const s in n){const o=`${t}__${s}`;i.__numberFormatters.has(o)&&i.__numberFormatters.delete(o)}}const oH=e=>e,rH=e=>"",lH="text",aH=e=>e.length===0?"":l5(e),uH=ZP;function U9(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function cH(e){const t=ps(e.pluralIndex)?e.pluralIndex:-1;return ps(e.named?.count)?e.named.count:ps(e.named?.n)?e.named.n:t}function dH(e={}){const t=e.locale,n=cH(e),i=Kt(t)&&Bi(e.pluralRules?.[t])?e.pluralRules[t]:U9,s=i===U9?void 0:U9,o=w=>w[i(n,w.length,s)],r=e.list||[],l=w=>r[w],a=e.named||ki();ps(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const u=w=>a[w];function c(w,k){const A=Bi(e.messages)?e.messages(w,!!k):ni(e.messages)?e.messages[w]:!1;return A||(e.parent?e.parent.message(w):rH)}const d=w=>e.modifiers?e.modifiers[w]:oH,f=Bi(e.processor?.normalize)?e.processor.normalize:aH,p=Bi(e.processor?.interpolate)?e.processor.interpolate:uH,g=Kt(e.processor?.type)?e.processor.type:lH,y={list:l,named:u,plural:o,linked:(w,...k)=>{const[A,v]=k;let x="text",S="";k.length===1?ni(A)?(S=A.modifier||S,x=A.type||x):Kt(A)&&(S=A||S):k.length===2&&(Kt(A)&&(S=A||S),Kt(v)&&(x=v||x));const I=c(w,!0)(y),_=I===""||I===void 0?w:I,E=x==="vnode"&&Yi(_)&&S?_[0]:_;return S?d(S)(E,x):E},message:c,type:g,interpolate:p,normalize:f,values:ms(ki(),r,a)};return y}const H7=()=>"",$r=e=>Bi(e);function W7(e,...t){const{fallbackFormat:n,postTranslation:i,unresolving:s,messageCompiler:o,fallbackLocale:r,messages:l}=e,[a,u]=Z4(...t),c=ei(u.missingWarn)?u.missingWarn:e.missingWarn,d=ei(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,f=ei(u.escapeParameter)?u.escapeParameter:e.escapeParameter,p=!!u.resolvedMessage,g=Kt(u.default)||ei(u.default)?ei(u.default)?o?a:()=>a:u.default:n?o?a:()=>a:null,m=n||g!=null&&(Kt(g)||Bi(g)),y=c5(e,u);f&&fH(u);let[w,k,A]=p?[a,y,l[y]||ki()]:wE(e,a,y,r,d,c),v=w,x=a;if(!p&&!(Kt(v)||Ol(v)||$r(v))&&m&&(v=g,x=v),!p&&(!(Kt(v)||Ol(v)||$r(v))||!Kt(k)))return s?Y2:a;let S=!1;const I=()=>{S=!0},_=$r(v)?v:xE(e,a,k,v,x,I);if(S)return v;const E=gH(e,k,A,u),N=dH(E),D=hH(e,_,N);let T=i?i(D,a):D;if(f&&Kt(T)&&(T=UP(T)),__INTLIFY_PROD_DEVTOOLS__){const $={timestamp:Date.now(),key:Kt(a)?a:$r(v)?v.key:"",locale:k||($r(v)?v.locale:""),format:Kt(v)?v:$r(v)?v.source:"",message:T};$.meta=ms({},e.__meta,eH()||{}),Bj($)}return T}function fH(e){Yi(e.list)?e.list=e.list.map(t=>Kt(t)?S7(t):t):ni(e.named)&&Object.keys(e.named).forEach(t=>{Kt(e.named[t])&&(e.named[t]=S7(e.named[t]))})}function wE(e,t,n,i,s,o){const{messages:r,onWarn:l,messageResolver:a,localeFallbacker:u}=e,c=u(e,i,n);let d=ki(),f,p=null;const g="translate";for(let m=0;m<c.length&&(f=c[m],d=r[f]||ki(),(p=a(d,t))===null&&(p=d[t]),!(Kt(p)||Ol(p)||$r(p)));m++)if(!sH(f,c)){const y=d5(e,t,f,o,g);y!==t&&(p=y)}return[p,f,d]}function xE(e,t,n,i,s,o){const{messageCompiler:r,warnHtmlMessage:l}=e;if($r(i)){const u=i;return u.locale=u.locale||n,u.key=u.key||t,u}if(r==null){const u=(()=>i);return u.locale=n,u.key=t,u}const a=r(i,pH(e,n,s,i,l,o));return a.locale=n,a.key=t,a.source=i,a}function hH(e,t,n){return t(n)}function Z4(...e){const[t,n,i]=e,s=ki();if(!Kt(t)&&!ps(t)&&!$r(t)&&!Ol(t))throw va(ma.INVALID_ARGUMENT);const o=ps(t)?String(t):($r(t),t);return ps(n)?s.plural=n:Kt(n)?s.default=n:Hn(n)&&!G2(n)?s.named=n:Yi(n)&&(s.list=n),ps(i)?s.plural=i:Kt(i)?s.default=i:Hn(i)&&ms(s,i),[o,s]}function pH(e,t,n,i,s,o){return{locale:t,key:n,warnHtmlMessage:s,onError:r=>{throw o&&o(r),r},onCacheKey:r=>RP(t,n,r)}}function gH(e,t,n,i){const{modifiers:s,pluralRules:o,messageResolver:r,fallbackLocale:l,fallbackWarn:a,missingWarn:u,fallbackContext:c}=e,f={locale:t,modifiers:s,pluralRules:o,messages:(p,g)=>{let m=r(n,p);if(m==null&&(c||g)){const[y,,w]=wE(c||e,p,t,l,a,u);m=y??r(w,p)}if(Kt(m)||Ol(m)){let y=!1;const k=xE(e,p,t,m,p,()=>{y=!0});return y?H7:k}else return $r(m)?m:H7}};return e.processor&&(f.processor=e.processor),i.list&&(f.list=i.list),i.named&&(f.named=i.named),ps(i.plural)&&(f.pluralIndex=i.plural),f}Aj();/*! - * vue-i18n v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */const mH="11.4.6";function vH(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(_c().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(_c().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(_c().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(_c().__INTLIFY_PROD_DEVTOOLS__=!1)}const No={UNEXPECTED_RETURN_TYPE:Dj,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 Jo(e,...t){return Q2(e,null,void 0)}const G4=Lu("__translateVNode"),Q4=Lu("__datetimeParts"),Y4=Lu("__numberParts"),_E=Lu("__setPluralRules"),SE=Lu("__injectWithOption"),Ud=Lu("__dispose");function Wh(e){if(!ni(e)||Ol(e))return e;for(const t in e)if(Dr(e,t))if(!t.includes("."))ni(e[t])&&Wh(e[t]);else{const n=t.split("."),i=n.length-1;let s=e,o=!1;for(let r=0;r<i;r++){if(n[r]==="__proto__")throw new Error(`unsafe key: ${n[r]}`);if(n[r]in s||(s[n[r]]=ki()),!ni(s[n[r]])){o=!0;break}s=s[n[r]]}if(o||(Ol(s)?gE.includes(n[i])||delete e[t]:(s[n[i]]=e[t],delete e[t])),!Ol(s)){const r=s[n[i]];ni(r)&&Wh(r)}}return e}function f5(e,t){const{messages:n,__i18n:i,messageResolver:s,flatJson:o}=t,r=Hn(n)?n:Yi(i)?ki():{[e]:ki()};if(Yi(i)&&i.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:a,resource:u}=l;a?(r[a]=r[a]||ki(),bg(u,r[a])):bg(u,r)}else Kt(l)&&bg(JSON.parse(l),r)}),s==null&&o)for(const l in r)Dr(r,l)&&Wh(r[l]);return r}function ME(e){return e.type}function IE(e,t,n){let i=ni(t.messages)?t.messages:ki();"__i18nGlobal"in n&&(i=f5(e.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const s=Object.keys(i);s.length&&s.forEach(o=>{e.mergeLocaleMessage(o,i[o])});{if(ni(t.datetimeFormats)){const o=Object.keys(t.datetimeFormats);o.length&&o.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(ni(t.numberFormats)){const o=Object.keys(t.numberFormats);o.length&&o.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function q7(e){return V(fu,null,e,0)}function qh(){return ys()}const U7="__INTLIFY_META__",K7=()=>[],yH=()=>!1;let V7=0;function Z7(e){return((t,n,i,s)=>e(n,i,qh()||void 0,s))}const bH=()=>{const e=qh();let t=null;return e&&(t=ME(e)[U7])?{[U7]:t}:null};function mm(e={}){const{__root:t,__injectWithOption:n}=e,i=t===void 0,s=e.flatJson,o=pm?G:gl;let r=ei(e.inheritLocale)?e.inheritLocale:!0;const l=o(t&&r?t.locale.value:Kt(e.locale)?e.locale:Hh),a=o(t&&r?t.fallbackLocale.value:Kt(e.fallbackLocale)||Yi(e.fallbackLocale)||Hn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),u=o(f5(l.value,e)),c=o(Hn(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=o(Hn(e.numberFormats)?e.numberFormats:{[l.value]:{}});let f=t?t.missingWarn:ei(e.missingWarn)||Sf(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:ei(e.fallbackWarn)||Sf(e.fallbackWarn)?e.fallbackWarn:!0,g=t?t.fallbackRoot:ei(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,y=Bi(e.missing)?e.missing:null,w=Bi(e.missing)?Z7(e.missing):null,k=Bi(e.postTranslation)?e.postTranslation:null,A=t?t.warnHtmlMessage:ei(e.warnHtmlMessage)?e.warnHtmlMessage:!0,v=!!e.escapeParameter;const x=t?t.modifiers:Hn(e.modifiers)?e.modifiers:{};let S=e.pluralRules||t&&t.pluralRules,I;I=(()=>{i&&D7(null);const ke={version:mH,locale:l.value,fallbackLocale:a.value,messages:u.value,modifiers:x,pluralRules:S,missing:w===null?void 0:w,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:!0,postTranslation:k===null?void 0:k,warnHtmlMessage:A,escapeParameter:v,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ke.datetimeFormats=c.value,ke.numberFormats=d.value,ke.__datetimeFormatters=Hn(I)?I.__datetimeFormatters:void 0,ke.__numberFormatters=Hn(I)?I.__numberFormatters:void 0;const Le=nH(ke);return i&&D7(Le),Le})(),C1(I,l.value,a.value);function E(){return[l.value,a.value,u.value,c.value,d.value]}const N=F({get:()=>l.value,set:ke=>{I.locale=ke,l.value=ke}}),D=F({get:()=>a.value,set:ke=>{I.fallbackLocale=ke,a.value=ke,C1(I,l.value,ke)}}),T=F(()=>u.value),$=F(()=>c.value),O=F(()=>d.value);function P(){return Bi(k)?k:null}function R(ke){k=ke,I.postTranslation=ke}function j(){return y}function z(ke){ke!==null&&(w=Z7(ke)),y=ke,I.missing=w}const K=(ke,Le,it,Fe,De,Ke)=>{E();let gt;try{__INTLIFY_PROD_DEVTOOLS__,i||(I.fallbackContext=t?tH():void 0),gt=ke(I)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(I.fallbackContext=void 0)}if(it!=="translate exists"&&ps(gt)&>===Y2||it==="translate exists"&&!gt){const[lt,ft]=Le();return t&&g?Fe(t):De(lt)}else{if(Ke(gt))return gt;throw Jo(No.UNEXPECTED_RETURN_TYPE)}};function q(...ke){return K(Le=>Reflect.apply(W7,null,[Le,...ke]),()=>Z4(...ke),"translate",Le=>Reflect.apply(Le.t,Le,[...ke]),Le=>Le,Le=>Kt(Le))}function W(...ke){const[Le,it,Fe]=ke;if(Fe&&!ni(Fe))throw Jo(No.INVALID_ARGUMENT);return q(Le,it,ms({resolvedMessage:!0},Fe||{}))}function Z(...ke){return K(Le=>Reflect.apply(R7,null,[Le,...ke]),()=>K4(...ke),"datetime format",Le=>Reflect.apply(Le.d,Le,[...ke]),()=>gm,Le=>Kt(Le)||Yi(Le))}function ne(...ke){return K(Le=>Reflect.apply(P7,null,[Le,...ke]),()=>V4(...ke),"number format",Le=>Reflect.apply(Le.n,Le,[...ke]),()=>gm,Le=>Kt(Le)||Yi(Le))}function X(ke){return ke.map(Le=>Kt(Le)||ps(Le)||ei(Le)?q7(String(Le)):Le)}const ie={normalize:X,interpolate:ke=>ke,type:"vnode"};function Se(...ke){return K(Le=>{let it;const Fe=Le;try{Fe.processor=ie,it=Reflect.apply(W7,null,[Fe,...ke])}finally{Fe.processor=null}return it},()=>Z4(...ke),"translate",Le=>Le[G4](...ke),Le=>[q7(Le)],Le=>Yi(Le))}function fe(...ke){return K(Le=>Reflect.apply(P7,null,[Le,...ke]),()=>V4(...ke),"number format",Le=>Le[Y4](...ke),K7,Le=>Kt(Le)||Yi(Le))}function pe(...ke){return K(Le=>Reflect.apply(R7,null,[Le,...ke]),()=>K4(...ke),"datetime format",Le=>Le[Q4](...ke),K7,Le=>Kt(Le)||Yi(Le))}function Ne(ke){S=ke,I.pluralRules=S}function ee(ke,Le){return K(()=>{if(!ke)return!1;const it=Kt(Le)?Le:l.value,Fe=Kt(Le)?[it]:U4(I,a.value,it);for(let De=0;De<Fe.length;De++){const Ke=Y(Fe[De]);let gt=I.messageResolver(Ke,ke);if(gt===null&&(gt=Ke[ke]),Ol(gt)||$r(gt)||Kt(gt))return!0}return!1},()=>[ke],"translate exists",it=>Reflect.apply(it.te,it,[ke,Le]),yH,it=>ei(it))}function ye(ke){let Le=null;const it=U4(I,a.value,l.value);for(let Fe=0;Fe<it.length;Fe++){const De=u.value[it[Fe]]||{},Ke=I.messageResolver(De,ke);if(Ke!=null){Le=Ke;break}}return Le}function H(ke){const Le=ye(ke);return Le??(t?t.tm(ke)||{}:{})}function Y(ke){return u.value[ke]||{}}function ve(ke,Le){if(s){const it={[ke]:Le};for(const Fe in it)Dr(it,Fe)&&Wh(it[Fe]);Le=it[ke]}u.value[ke]=Le,I.messages=u.value}function re(ke,Le){u.value[ke]=u.value[ke]||{};const it={[ke]:Le};if(s)for(const Fe in it)Dr(it,Fe)&&Wh(it[Fe]);Le=it[ke],bg(Le,u.value[ke]),I.messages=u.value}function se(ke){return c.value[ke]||{}}function U(ke,Le){c.value[ke]=Le,I.datetimeFormats=c.value,O7(I,ke,Le)}function J(ke,Le){c.value[ke]=ms(c.value[ke]||{},Le),I.datetimeFormats=c.value,O7(I,ke,Le)}function ce(ke){return d.value[ke]||{}}function ge(ke,Le){d.value[ke]=Le,I.numberFormats=d.value,j7(I,ke,Le)}function Me(ke,Le){d.value[ke]=ms(d.value[ke]||{},Le),I.numberFormats=d.value,j7(I,ke,Le)}V7++,t&&pm&&(Ge(t.locale,ke=>{r&&(l.value=ke,I.locale=ke,C1(I,l.value,a.value))}),Ge(t.fallbackLocale,ke=>{r&&(a.value=ke,I.fallbackLocale=ke,C1(I,l.value,a.value))}));const Pe={id:V7,locale:N,fallbackLocale:D,get inheritLocale(){return r},set inheritLocale(ke){r=ke,ke&&t&&(l.value=t.locale.value,a.value=t.fallbackLocale.value,C1(I,l.value,a.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:T,get modifiers(){return x},get pluralRules(){return S||{}},get isGlobal(){return i},get missingWarn(){return f},set missingWarn(ke){f=ke,I.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(ke){p=ke,I.fallbackWarn=p},get fallbackRoot(){return g},set fallbackRoot(ke){g=ke},get fallbackFormat(){return m},set fallbackFormat(ke){m=ke,I.fallbackFormat=m},get warnHtmlMessage(){return A},set warnHtmlMessage(ke){A=ke,I.warnHtmlMessage=ke},get escapeParameter(){return v},set escapeParameter(ke){v=ke,I.escapeParameter=ke},t:q,getLocaleMessage:Y,setLocaleMessage:ve,mergeLocaleMessage:re,getPostTranslationHandler:P,setPostTranslationHandler:R,getMissingHandler:j,setMissingHandler:z,[_E]:Ne};return Pe.datetimeFormats=$,Pe.numberFormats=O,Pe.rt=W,Pe.te=ee,Pe.tm=H,Pe.d=Z,Pe.n=ne,Pe.getDateTimeFormat=se,Pe.setDateTimeFormat=U,Pe.mergeDateTimeFormat=J,Pe.getNumberFormat=ce,Pe.setNumberFormat=ge,Pe.mergeNumberFormat=Me,Pe[SE]=n,Pe[G4]=Se,Pe[Q4]=pe,Pe[Y4]=fe,Pe}function kH(e){const t=Kt(e.locale)?e.locale:Hh,n=Kt(e.fallbackLocale)||Yi(e.fallbackLocale)||Hn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,i=Bi(e.missing)?e.missing:void 0,s=ei(e.silentTranslationWarn)||Sf(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,o=ei(e.silentFallbackWarn)||Sf(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=ei(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,a=Hn(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Bi(e.postTranslation)?e.postTranslation:void 0,d=Kt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=ei(e.sync)?e.sync:!0;let g=e.messages;if(Hn(e.sharedMessages)){const x=e.sharedMessages;g=Object.keys(x).reduce((I,_)=>{const E=I[_]||(I[_]={});return ms(E,x[_]),I},g||{})}const{__i18n:m,__root:y,__injectWithOption:w}=e,k=e.datetimeFormats,A=e.numberFormats,v=e.flatJson;return{locale:t,fallbackLocale:n,messages:g,flatJson:v,datetimeFormats:k,numberFormats:A,missing:i,missingWarn:s,fallbackWarn:o,fallbackRoot:r,fallbackFormat:l,modifiers:a,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:m,__root:y,__injectWithOption:w}}function J4(e={}){const t=mm(kH(e)),{__extender:n}=e,i={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 ei(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=ei(s)?!s:s},get silentFallbackWarn(){return ei(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=ei(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,o){return t.te(s,o)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,o){t.setLocaleMessage(s,o)},mergeLocaleMessage(s,o){t.mergeLocaleMessage(s,o)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,o){t.setDateTimeFormat(s,o)},mergeDateTimeFormat(s,o){t.mergeDateTimeFormat(s,o)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,o){t.setNumberFormat(s,o)},mergeNumberFormat(s,o){t.mergeNumberFormat(s,o)}};return i.__extender=n,i}function AH(e,t,n){return{beforeCreate(){const i=qh();if(!i)throw Jo(No.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const o=s.i18n;if(s.__i18n&&(o.__i18n=s.__i18n),o.__root=t,this===this.$root)this.$i18n=G7(e,o);else{o.__injectWithOption=!0,o.__extender=n.__vueI18nExtend,this.$i18n=J4(o);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=G7(e,s);else{this.$i18n=J4({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&IE(t,s,s),this.$t=(...o)=>this.$i18n.t(...o),this.$rt=(...o)=>this.$i18n.rt(...o),this.$te=(o,r)=>this.$i18n.te(o,r),this.$d=(...o)=>this.$i18n.d(...o),this.$n=(...o)=>this.$i18n.n(...o),this.$tm=o=>this.$i18n.tm(o),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=qh();if(!i)throw Jo(No.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(i),delete this.$i18n)}}}function G7(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[_E](t.pluralizationRules||e.pluralizationRules);const n=f5(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(i=>e.mergeLocaleMessage(i,n[i])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(i=>e.mergeDateTimeFormat(i,t.datetimeFormats[i])),t.numberFormats&&Object.keys(t.numberFormats).forEach(i=>e.mergeNumberFormat(i,t.numberFormats[i])),e}const h5={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function CH({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((i,s)=>[...i,...s.type===Be?s.children:[s]],[]):t.reduce((n,i)=>{const s=e[i];return s&&(n[i]=s()),n},ki())}function EE(){return Be}const wH=nt({name:"i18n-t",props:ms({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>ps(e)||!isNaN(e)}},h5),setup(e,t){const{slots:n,attrs:i}=t,s=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return()=>{const o=()=>{const a=Object.keys(n).filter(d=>d[0]!=="_"),u=ki();e.locale&&(u.locale=e.locale),e.plural!==void 0&&(u.plural=Kt(e.plural)?+e.plural:e.plural);const c=CH(t,a);return s[G4](e.keypath,c,u)},r=ms(ki(),i),l=Kt(e.tag)||ni(e.tag)?e.tag:EE();return ni(l)?dn(l,r,{default:o}):dn(l,r,o())}}}),Q7=wH;function xH(e){return Yi(e)&&!Kt(e[0])}function TE(e,t,n,i){const{slots:s,attrs:o}=t;return()=>{const r=()=>{const u={part:!0};let c=ki();e.locale&&(u.locale=e.locale),Kt(e.format)?u.key=e.format:ni(e.format)&&(Kt(e.format.key)&&(u.key=e.format.key),c=Object.keys(e.format).reduce((p,g)=>n.includes(g)?ms(ki(),p,{[g]:e.format[g]}):p,ki()));const d=i(e.value,u,c);let f=[u.key];return Yi(d)?f=d.map((p,g)=>{const m=s[p.type],y=m?m({[p.type]:p.value,index:g,parts:d}):[p.value];return xH(y)&&(y[0].key=`${p.type}-${g}`),y}):Kt(d)&&(f=[d]),f},l=ms(ki(),o),a=Kt(e.tag)||ni(e.tag)?e.tag:EE();return ni(a)?dn(a,l,{default:r}):dn(a,l,r())}}const _H=nt({name:"i18n-n",props:ms({value:{type:Number,required:!0},format:{type:[String,Object]}},h5),setup(e,t){const n=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return TE(e,t,CE,(...i)=>n[Y4](...i))}}),Y7=_H;function SH(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const i=n.__getInstance(t);return i!=null?i.__composer:e.global.__composer}}function MH(e){const t=r=>{const{instance:l,value:a}=r;if(!l||!l.$)throw Jo(No.UNEXPECTED_ERROR);const u=SH(e,l.$),c=J7(a);return[Reflect.apply(u.t,u,[...X7(c)]),u]};return{created:(r,l)=>{const[a,u]=t(l);pm&&(r.__i18nWatcher=Ge(u.locale,()=>{l.instance&&l.instance.$forceUpdate()})),r.__composer=u,r.textContent=a},unmounted:r=>{pm&&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,u=J7(l);r.textContent=Reflect.apply(a.t,a,[...X7(u)])}},getSSRProps:r=>{const[l]=t(r);return{textContent:l}}}}function J7(e){if(Kt(e))return{path:e};if(Hn(e)){if(!("path"in e))throw Jo(No.REQUIRED_VALUE,"path");return e}else throw Jo(No.INVALID_VALUE)}function X7(e){const{path:t,locale:n,args:i,choice:s,plural:o}=e,r={},l=i||{};return Kt(n)&&(r.locale=n),ps(s)&&(r.plural=s),ps(o)&&(r.plural=o),[t,l,r]}function IH(e,t,...n){const i=Hn(n[0])?n[0]:{};(ei(i.globalInstall)?i.globalInstall:!0)&&([Q7.name,"I18nT"].forEach(o=>e.component(o,Q7)),[Y7.name,"I18nN"].forEach(o=>e.component(o,Y7)),[nA.name,"I18nD"].forEach(o=>e.component(o,nA))),e.directive("t",MH(t))}const EH=Lu("global-vue-i18n");function TH(e={}){const t=__VUE_I18N_LEGACY_API__&&ei(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=ei(e.globalInjection)?e.globalInjection:!0,i=new Map,[s,o]=LH(e,t),r=Lu("");function l(d){return i.get(d)||null}function a(d,f){i.set(d,f)}function u(d){i.delete(d)}const c={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__,c),Hn(f[0])){const m=f[0];c.__composerExtend=m.__composerExtend,c.__vueI18nExtend=m.__vueI18nExtend}let p=null;!t&&n&&(p=RH(d,c.global)),__VUE_I18N_FULL_INSTALL__&&IH(d,c,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(AH(o,o.__composer,c));const g=d.unmount;d.unmount=()=>{p&&p(),c.dispose(),g()}},get global(){return o},dispose(){s.stop()},__instances:i,__getInstance:l,__setInstance:a,__deleteInstance:u};return c}function Bt(e={}){const t=qh();if(t==null)throw Jo(No.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Jo(No.NOT_INSTALLED);const n=NH(t),i=BH(n),s=ME(t),o=FH(e,s);if(o==="global")return IE(i,e,s),i;if(o==="parent"){let a=eA(n,t,e.__useComponent);return a==null&&(a=i),a}if(o==="isolated"){if(n.mode!=="composition")throw Jo(No.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=n,u=ms({},e),c=eA(n,t);u.__root=c||i;const d=mm(u);return a.__composerExtend&&(d[Ud]=a.__composerExtend(d)),O2()&&Df(()=>{const p=d[Ud];p&&(p(),delete d[Ud])}),d}const r=n;let l=r.__getInstance(t);if(l==null){const a=ms({},e);"__i18n"in s&&(a.__i18n=s.__i18n),i&&(a.__root=i),l=mm(a),r.__composerExtend&&(l[Ud]=r.__composerExtend(l)),DH(r,t,l),r.__setInstance(t,l)}return l}function LH(e,t){const n=eR(),i=__VUE_I18N_LEGACY_API__&&t?n.run(()=>J4(e)):n.run(()=>mm(e));if(i==null)throw Jo(No.UNEXPECTED_ERROR);return[n,i]}function NH(e){const t=un(e.isCE?EH:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Jo(e.isCE?No.NOT_INSTALLED_WITH_PROVIDE:No.UNEXPECTED_ERROR);return t}function FH(e,t){return G2(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function BH(e){return e.mode==="composition"?e.global:e.global.__composer}function eA(e,t,n=!1){let i=null;const s=t.root;let o=$H(t,n);for(;o!=null;){const r=e;if(e.mode==="composition")i=r.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const l=r.__getInstance(o);l!=null&&(i=l.__composer,n&&i&&!i[SE]&&(i=null))}if(i!=null||s===o)break;o=o.parent}return i}function $H(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function DH(e,t,n){gn(()=>{},t),Cn(()=>{const i=n;e.__deleteInstance(t);const s=i[Ud];s&&(s(),delete i[Ud])},t)}const zH=["locale","fallbackLocale","availableLocales"],tA=["t","rt","d","n","tm","te"];function RH(e,t){const n=Object.create(null);return zH.forEach(s=>{const o=Object.getOwnPropertyDescriptor(t,s);if(!o)throw Jo(No.UNEXPECTED_ERROR);const r=ss(o.value)?{get(){return o.value.value},set(l){o.value.value=l}}:{get(){return o.get&&o.get()}};Object.defineProperty(n,s,r)}),e.config.globalProperties.$i18n=n,tA.forEach(s=>{const o=Object.getOwnPropertyDescriptor(t,s);if(!o||!o.value)throw Jo(No.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,o)}),()=>{delete e.config.globalProperties.$i18n,tA.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const OH=nt({name:"i18n-d",props:ms({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},h5),setup(e,t){const n=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return TE(e,t,AE,(...i)=>n[Q4](...i))}}),nA=OH;vH();Qj(Lj);Yj(Vj);Jj(U4);if(__INTLIFY_PROD_DEVTOOLS__){const e=_c();e.__INTLIFY__=!0,Nj(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const PH={preview:"Preview",confirm:"Confirm",cancel:"Cancel",close:"Close",dismiss:"Dismiss",loading:"Loading",copy:"Copy"},jH={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"},HH={workspaceMeta:"workspace · {branch}",sessionsHeader:"sessions",workspaces:"Workspaces",viewSwitcher:"View options",viewGroup:"View",viewFlat:"Flat list",viewGrouped:"Group by workspace",sortGroup:"Sort order",sortManual:"Manual",sortRecent:"Recent activity",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",genTitle:"Gen Title",genTitleUnavailable:"Title generation unavailable — needs a managed Kimi Code login and at least one message",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",upgradeMembership:"Upgrade membership",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",loadMore:"Load 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"},WH={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:"Failed",abortedTitle:"This session's latest turn ended on an error"},qH={jumpToLatestAria:"Jump to latest message",toc:"Conversation outline",newMessages:"Latest messages",loading:"Loading…",starting:"Starting conversation…",requesting:"Requesting…",working:"Working…",workingRetry:"Model request failed — retrying ({n}/{max})…",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:"Undo edit",undoConfirm:"Undo last message?",escUndoHintPre:"Press",escUndoHintPost:"again to undo",undone:"Undone — the message is back in the composer",turnInterrupted:"Manually stopped",turnFailed:"Model request failed — this turn was interrupted",turnFailedMaxSteps:"Step limit reached — this turn was interrupted",turnFailedResume:"Continue",turnFailedResumeText:"Continue",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"}},UH={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",planOn:"on",planOff:"off",planTooltip:"Toggle plan mode (research before editing)",workModeDismiss:"Exit mode",goalLabel:"Goal",timeUnitHour:"h",timeUnitMinute:"m",timeUnitSecond:"s",planEmptyArmed:"Plan mode is on — the plan the agent writes will show up here.",planEmptyIdle:"No plan yet — turn plan mode on and the agent’s plan will show up here.",swarmLabel:"Swarm",swarmDismiss:"Turn off Swarm",modeOff:"Off",goalPlaceholder:"What should the agent achieve?",planPlaceholder:"What should the agent plan for?",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"},KH={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",addMenu:"Add",addFiles:"Files",addGoalDesc:"Set a goal to keep pursuing",addPlanDesc:"Turn plan mode on",addSwarmDesc:"Turn swarm mode on",noCommands:"No commands",previewAttachment:"Preview {name}",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}"},VH={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.",rcSubtitle:"Remote Control session",rcChecking:"Checking sign-in status…",rcLead:"This Remote Control session requires authorization. Sign in with your Kimi account to continue.",rcAuthorize:"Open authorization page",rcUserCodeLabel:"Authorization code",rcSuccessHint:"Redirecting…",rcExpiredTitle:"Authorization expired or declined",rcStartErrorTitle:"Could not start sign-in",rcConnectionErrorHint:"Check your connection and try again.",rcSuccessNoRedirect:"You can close this page now."},ZH={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"},GH={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"},QH={justNow:"just now"},YH={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"},JH={back:"‹ Previous question",nextQuestion:"Next question ›",otherDefault:"Other…",submit:"Submit",dismiss:"Dismiss",minimize:"Minimize",expand:"Expand",hint:"↑↓ to choose · Enter to confirm"},XH={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",todoProgressTitle:"Progress",stateDone:"Done",stateFail:"Failed",stateCancelled:"Cancelled",filterRecent:"Recent",filterRunning:"Running",filterDone:"Done",filterAll:"All",running:"running",closePanel:"Close panel",openPanel:"Open in the side panel",timingRunning:"Running · {time}",timingDone:"Done · {time}",emptyTasks:"No background tasks running",emptyRecent:"No recent tasks",emptyRunning:"No running tasks",emptyDone:"No completed tasks",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.",copyCommand:"Copy command",copyOutput:"Copy output"},eW={panelTitle:"Thinking",streaming:"Thinking…",close:"Close"},tW={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"},nW={},iW={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"}},sW={searching:"Searching…",noMatch:"No matches"},oW={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",daemonTimeoutMessage:"The Kimi server did not respond within the wait limit. The operation may still complete in the background — refresh later to check, or try again.",daemonTimeoutTitle:"Kimi server response timed out",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."}},rW={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 <task> runs a task in swarm"},goal:{desc:"Create/control a goal: /goal <objective>, /goal pause{'|'}resume{'|'}cancel"},btw:{desc:"Side chat: /btw <question> 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.",started:"Exporting session…",done:"Session exported.",tooLarge:"Session data exceeds the export size limit. Export it from a terminal instead: kimi export {sessionId} -o session.zip"},status:{desc:"View session status"},undo:{desc:"Undo the last message"}},lW={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",doneSubWithCancelled:"{completed} completed · {failed} failed · {cancelled} cancelled",phaseQueued:"Queued",phaseWorking:"Working",phaseSuspended:"Suspended",phaseCompleted:"Completed",phaseFailed:"Failed",phaseCancelled:"Cancelled",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",pathOnlyHint:"No inline content — open it in the side panel:",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"}},aW={resizeHandleAria:"Resize sidebar width",resizePreviewAria:"Resize preview panel width",detailPanelAria:"Detail panel"},uW={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",goalModeSub:"Goal mode",swarmModeSub:"Swarm mode",archivedSessions:"Archived sessions",archivedSessionsSub:"Browse and restore archived sessions",archivedBack:"Back"},cW={colorSchemeLabel:"Appearance",light:"Moon bright",dark:"Moon dark",system:"System"},dW={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"}},fW={title:"Settings",internalTest:"Internal Test",close:"Close (Esc)",tabs:{general:"General",agent:"Agent",account:"Account",providers:"Providers",advanced:"Advanced",archived:"Archived",shortcuts:"Hotkeys",plugins:"Plugins"},plugins:{retry:"Retry",builtIn:"Built-in",official:"Official",thirdParty:"Third-party",installed:"Installed",install:"Install",update:"Update",remove:"Remove",enabled:"Enabled",homepage:"Homepage",empty:"No plugins found",hasErrors:"Error",customInstall:"Install custom plugin",customInstallPlaceholder:"https://… or /path/to/plugin",customInstallHint:"Accepts an https zip URL, a GitHub repo URL, or a local directory path.",extensionHintTitle:"One step left: install the browser extension",extensionGuide:"Manual install",dismissHint:"Dismiss",catalogUnavailable:"The marketplace catalog is currently unreachable; installed plugins remain manageable below.",source:{"local-path":"Local","zip-url":"ZIP",github:"GitHub"},counts:{skill:"1 skill | {n} skills",mcp:"1 MCP server | {n} MCP servers",mcpEnabled:"{n} on",hook:"1 hook | {n} hooks",command:"1 command | {n} commands"}},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…"},hW={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"},pW={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"},gW={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"},mW={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}]"},vW={common:PH,app:jH,sidebar:HH,workspace:WH,conversation:qH,status:UH,composer:KH,login:VH,providers:ZH,model:GH,sessions:QH,approval:YH,question:JH,tasks:XH,thinking:eW,diff:tW,fileTree:nW,filePreview:iW,mention:sW,warnings:oW,commands:rW,tools:lW,layout:aW,mobile:uW,theme:cW,onboarding:dW,settings:fW,header:hW,sideChat:pW,shortcuts:gW,terminal:mW},yW={preview:"预览",confirm:"确认",cancel:"取消",close:"关闭",dismiss:"关闭",loading:"加载中",copy:"复制"},bW={authBannerMessage:"未登录 · 需要登录 Kimi Code 才能开始对话",authBannerLogin:"登录",connecting:"连接中…",internalBuildBanner:"仅供内部测试",menuFile:"文件",menuEdit:"编辑",menuView:"视图",menuHelp:"帮助",applicationMenu:"应用菜单"},kW={workspaceMeta:"workspace · {branch}",sessionsHeader:"会话",workspaces:"工作区",viewSwitcher:"视图选项",viewGroup:"视图",viewFlat:"平铺列表",viewGrouped:"按工作区分组",sortGroup:"排序",sortManual:"手动排序",sortRecent:"按最近活动",collapseAll:"折叠全部工作区",expandAll:"展开全部工作区",newSession:"新建会话",newChat:"新建会话",newWorkspace:"新建工作区",dropToAddWorkspace:"松开鼠标添加工作区",emptyState:"还没有会话 · 点击 新建会话 开始",options:"选项",rename:"重命名",genTitle:"生成标题",genTitleUnavailable:"无法生成标题:需要登录 Kimi Code 托管账号,且会话中已有消息",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:"升级",upgradeMembership:"会员升级",logoutConfirmTitle:"退出登录",logoutConfirmMessage:"确定要退出当前账号吗?",language:"语言",backendTitle:"后端 {backend} · {endpoint} — 点击切换",noSessions:"暂无对话",allPinned:"有 {count} 条对话被置顶",showMore:"展开更多",loadMore:"加载更多",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:"以后自动下载并安装更新"},AW={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:"此会话的上一轮对话因错误中断"},CW={jumpToLatestAria:"跳到最新消息",toc:"对话目录",newMessages:"最新消息",loading:"加载中…",starting:"正在创建对话…",requesting:"请求中…",working:"工作中…",workingRetry:"模型请求失败,正在重试(第 {n}/{max} 次)…",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:"已手动终止",turnFailed:"模型请求失败,本轮对话已中断",turnFailedMaxSteps:"达到本轮步数上限,对话已中断",turnFailedResume:"继续",turnFailedResumeText:"继续",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:"关闭搜索"}},wW={connectionConnected:"已连接",connectionConnecting:"连接中…",connectionDisconnected:"未连接",ctxTooltip:"使用 {used} / {max} tokens ({pct}%)",modelLabel:"模型",permissionManual:"逐条确认",permissionAuto:"完全自主",permissionYolo:"自动通过",permissionManualDesc:"每个工具操作都需要你手动确认",permissionAutoDesc:"完全自主运行,智能体自己做决定,不再询问",permissionYoloDesc:"自动批准工具操作,但遇到关键问题仍会询问",planLabel:"计划",planOn:"开",planOff:"关",planTooltip:"切换计划模式(先调研再修改)",workModeDismiss:"退出模式",goalLabel:"目标",timeUnitHour:"小时",timeUnitMinute:"分",timeUnitSecond:"秒",planEmptyArmed:"计划模式已开启,智能体写出计划后会显示在这里",planEmptyIdle:"还没有计划——开启计划模式后,智能体写出的计划会显示在这里",swarmLabel:"Swarm",swarmDismiss:"关闭 Swarm",modeOff:"未启用",goalPlaceholder:"让智能体完成什么目标?",planPlaceholder:"让智能体先规划什么?",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:"进行中"},xW={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:"添加附件",addMenu:"添加",addFiles:"文件",addGoalDesc:"设定目标并持续推进",addPlanDesc:"启用计划模式",addSwarmDesc:"启用 swarm 模式",noCommands:"无匹配命令",previewAttachment:"预览 {name}",interrupt:"中断",interruptTitle:"中断当前操作",expandTitle:"展开输入框进行多行编辑",collapseTitle:"收起输入框",emptyConversationTitle:"Kimi Code",emptyConversation:"还没有消息 —— 在下方输入开始对话",upgradeBanner:"升级你的 Kimi 账户来使用 Kimi Code",quickStartPlaceholder:"输入消息开始新对话…",thinkingSuffix:" · 思考",thinkingSuffixEffort:" · {level}"},_W={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 模型开始对话。",rcSubtitle:"远程控制会话",rcChecking:"正在检查登录状态…",rcLead:"此远程控制会话需要授权。使用 Kimi 账号登录后即可继续。",rcAuthorize:"打开授权页",rcUserCodeLabel:"授权码",rcSuccessHint:"正在跳转…",rcExpiredTitle:"授权已过期或被取消",rcStartErrorTitle:"无法开始登录",rcConnectionErrorHint:"请检查网络连接后重试。",rcSuccessNoRedirect:"现在可以关闭本页了。"},SW={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:"关闭"},MW={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:"关闭"},IW={justNow:"刚刚"},EW={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:"还原"},TW={back:"‹ 上一题",nextQuestion:"下一题 ›",otherDefault:"其他…",submit:"提交",dismiss:"放弃",minimize:"最小化",expand:"展开",hint:"↑↓ 选择 · Enter 确认"},LW={tag:"任务",summary:"{run} 运行中 · {done} 完成",copy:"复制",calling:"调用 {label}",fieldTask:"任务",fieldOutput:"输出",fieldProgress:"进度",fieldResult:"结果",moreLines:"…(还有 {count} 行)",copied:"已复制",stop:"stop",defaultDescription:"后台任务",dockTasks:"后台任务",dockBash:"后台 Bash",dockSubagent:"子 Agent",dockTodos:"待办",todoProgressTitle:"当前进度",stateDone:"完成",stateFail:"失败",stateCancelled:"已取消",filterRecent:"最近",filterRunning:"进行中",filterDone:"已完成",filterAll:"全部",running:"运行中",closePanel:"关闭面板",openPanel:"在侧边栏打开",timingRunning:"运行中 · {time}",timingDone:"完成 · {time}",emptyTasks:"暂无后台任务",emptyRecent:"暂无最近任务",emptyRunning:"暂无运行中的任务",emptyDone:"暂无已完成的任务",emptyBash:"暂无后台 Bash 任务",emptySubagent:"暂无子 Agent 任务",emptyTodo:"暂无待办事项",openTab:"查看全部后台任务",openDetail:"查看",collapse:"折叠",expand:"展开",transcriptLoadError:"无法加载这个子 Agent 的对话。",copyCommand:"复制命令",copyOutput:"复制输出"},NW={panelTitle:"思考过程",streaming:"思考中…",close:"关闭"},FW={title:"改动",branch:"分支",aheadTitle:"领先远程",behindTitle:"落后远程",fileCountOne:"{number} 个文件",fileCountOther:"{number} 个文件",empty:"无 git 改动",clean:"工作区干净,无改动",back:"返回",loading:"正在加载 diff…",noDiff:"该文件没有行级改动",emptyFile:"空文件",list:"列表",tree:"树形",close:"关闭"},BW={},$W={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:"无法读取这个文件"}},DW={searching:"搜索中…",noMatch:"无匹配"},zW={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 服务器",daemonTimeoutMessage:"Kimi 服务器在等待时限内没有响应。操作可能仍在后台执行,请稍后刷新确认结果,或重试。",daemonTimeoutTitle:"Kimi 服务器响应超时",diagnostics:"诊断信息",hideDetails:"收起详情",operationFailedMessage:"刚才的操作没有完成,请稍后重试。",operationFailedTitle:"操作失败",sessionSnapshotMessage:"Web 没能加载当前会话内容。请确认 Kimi 服务器仍在运行,或刷新页面重试。",sessionSnapshotTitle:"无法加载当前会话内容",showDetails:"查看详情",copyDetails:"复制诊断信息",copied:"已复制",wsTitle:"实时连接出错",goal:{alreadyExists:"当前会话已有一个进行中的目标,请先取消它再创建新目标。",notFound:"没有找到可操作的目标,可能它已经结束或被取消。",statusInvalid:"当前目标状态不支持这个操作。",notResumable:"这个目标无法恢复(可能已取消或已完成)。",objectiveTooLong:"目标描述太长了,请精简后重试。"}},RW={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:"请先打开一个会话再导出。",started:"正在导出会话…",done:"会话导出完成。",tooLarge:"会话数据超过导出大小限制,可在终端用 CLI 导出:kimi export {sessionId} -o session.zip"},status:{desc:"查看会话状态"},undo:{desc:"撤销上一条消息"}},OW={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}",doneSubWithCancelled:"完成 {completed} · 失败 {failed} · 已取消 {cancelled}",phaseQueued:"排队",phaseWorking:"运行中",phaseSuspended:"暂停",phaseCompleted:"完成",phaseFailed:"失败",phaseCancelled:"已取消",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:"已选择",pathOnlyHint:"该计划未保存内联内容,可在侧边栏打开:",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:"未作答"}},PW={resizeHandleAria:"调整侧栏宽度",resizePreviewAria:"调整预览面板宽度",detailPanelAria:"详情面板"},jW={openSwitcher:"切换会话 / 工作区",openSettings:"会话设置",settingsTitle:"会话设置",groupSession:"当前会话",groupApp:"应用偏好",sheetLabel:"面板",closeSheet:"关闭",tapToCycle:"点击切换",running:"运行中",idle:"空闲",sessionCount:"{n} 个会话",newSession:"新建会话",permManualSub:"每个工具都确认",permAutoSub:"完全自主,不再提问",permYoloSub:"自动批准工具,仍可能提问",planModeSub:"计划模式",goalModeSub:"目标模式",swarmModeSub:"Swarm 模式",archivedSessions:"已归档会话",archivedSessionsSub:"查看并恢复已归档会话",archivedBack:"返回"},HW={colorSchemeLabel:"外观",light:"月之亮面",dark:"月之暗面",system:"跟随系统"},WW={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:"跳过,稍后再说"}},qW={title:"设置",internalTest:"内部测试",close:"关闭 (Esc)",tabs:{general:"通用",agent:"Agent",account:"账户",providers:"供应商",advanced:"高级",archived:"已归档",shortcuts:"快捷键",plugins:"插件"},plugins:{retry:"重试",builtIn:"内置",official:"官方",thirdParty:"第三方",installed:"已安装",install:"安装",update:"更新",remove:"移除",enabled:"启用",homepage:"主页",empty:"没有找到插件",hasErrors:"错误",customInstall:"安装自定义插件",customInstallPlaceholder:"https://… 或 /本地/目录",customInstallHint:"支持 https zip 链接、GitHub 仓库地址或本地目录路径。",extensionHintTitle:"还差一步:安装浏览器扩展",extensionGuide:"手动安装",dismissHint:"知道了",catalogUnavailable:"插件市场目录暂时不可达;已安装的插件仍可正常管理。",source:{"local-path":"本地","zip-url":"ZIP",github:"GitHub"},counts:{skill:"{n} 个技能",mcp:"{n} 个 MCP 服务",mcpEnabled:"启用 {n} 个",hook:"{n} 个钩子",command:"{n} 个命令"}},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:"正在加载全部归档会话…"},UW={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:"开发环境运行中"},KW={title:"侧边聊天",subtitle:"从当前会话 fork",empty:"在侧边随手问一句 —— 它共享当前会话的上下文。",placeholder:"问问侧边聊天…",send:"发送"},VW={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:"自定义"},ZW={panelAria:"终端",toolbarAria:"终端标签页",resizeAria:"调整终端面板高度",toggle:"切换终端",newTab:"新建终端",closeTab:"关闭终端",restartTab:"重启终端",collapse:"收起终端面板",empty:"还没有终端,点击新建一个",processExited:"[进程已退出]",processExitedWithCode:"[进程已退出,退出码 {code}]"},GW={common:yW,app:bW,sidebar:kW,workspace:AW,conversation:CW,status:wW,composer:xW,login:_W,providers:SW,model:MW,sessions:IW,approval:EW,question:TW,tasks:LW,thinking:NW,diff:FW,fileTree:BW,filePreview:$W,mention:DW,warnings:zW,commands:RW,tools:OW,layout:PW,mobile:jW,theme:HW,onboarding:WW,settings:qW,header:UW,sideChat:KW,shortcuts:VW,terminal:ZW},QW={en:vW,zh:GW},YW="kimi-locale";function LE(){let e=null;try{e=globalThis.localStorage?.getItem(YW)??null}catch{e=null}return e==="en"||e==="zh"?e:globalThis.navigator?.language?.toLowerCase().startsWith("zh")?"zh":"en"}function JW(e){const t=e.locale??LE();return TH({legacy:!1,locale:t,fallbackLocale:"en",messages:QW})}const NE=Symbol("KimiI18n"),XW={t:e=>e};function Pf(){const e=un(NE,null);if(e)return e;try{const t=Bt();return{t:(n,i)=>t.t(n,i),locale:t.locale.value}}catch{return XW}}const ja=6,Ha=8,eq=150,tq=nt({__name:"TooltipBubble",props:{target:{default:null},delegate:{default:null},text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=e,n=G(),i=G(!1),s=G(!1),o=G({maxWidth:`${t.maxWidth}px`});let r,l=null,a;function u(){if(t.target)return t.target;const I=t.delegate;return I?I.firstElementChild??I:null}function c(I){const _=n.value;if(!_)return;const E=I.getBoundingClientRect(),N=_.offsetWidth,D=_.offsetHeight,T=window.innerWidth,$=window.innerHeight;let O=t.placement;O==="top"&&E.top-ja-D<Ha?O="bottom":O==="bottom"&&E.bottom+ja+D>$-Ha?O="top":O==="left"&&E.left-ja-N<Ha?O="right":O==="right"&&E.right+ja+N>T-Ha&&(O="left");let P=0,R=0;O==="top"?(P=E.top-ja-D,R=E.left+E.width/2-N/2):O==="bottom"?(P=E.bottom+ja,R=E.left+E.width/2-N/2):O==="left"?(P=E.top+E.height/2-D/2,R=E.left-ja-N):(P=E.top+E.height/2-D/2,R=E.right+ja),R=Math.min(Math.max(R,Ha),T-Ha-N),P=Math.min(Math.max(P,Ha),$-Ha-D),o.value={maxWidth:`${t.maxWidth}px`,top:`${Math.round(P)}px`,left:`${Math.round(R)}px`}}function d(){if(!t.text)return;const I=u();I&&(window.clearTimeout(r),r=window.setTimeout(()=>{i.value=!0,s.value=!1,At(()=>{c(I),s.value=!0})},eq))}function f(){window.clearTimeout(r),i.value=!1,s.value=!1}function p(){d()}function g(){f()}function m(I){return I instanceof Element?I.closest(".ui-tip"):null}function y(I){const _=t.delegate;if(!_)return;if(m(I.target)!==_){f();return}const E=I.relatedTarget;E instanceof Element&&_.contains(E)&&m(E)===_||d()}function w(I){const _=t.delegate;if(!_)return;const E=I.relatedTarget;E instanceof Element&&_.contains(E)||f()}function k(I){m(I.target)===t.delegate&&d()}function A(){f()}function v(){l&&(t.delegate?(l.removeEventListener("mouseover",y),l.removeEventListener("mouseout",w),l.removeEventListener("focusin",k),l.removeEventListener("focusout",A)):(l.removeEventListener("mouseenter",p),l.removeEventListener("mouseleave",g),l.removeEventListener("focusin",p),l.removeEventListener("focusout",g)),l=null)}function x(){v(),a?.disconnect(),a=void 0;const I=t.target??t.delegate;I&&(l=I,t.delegate?(I.addEventListener("mouseover",y),I.addEventListener("mouseout",w),I.addEventListener("focusin",k),I.addEventListener("focusout",A),a=new MutationObserver(()=>{i.value&&f()}),a.observe(I,{childList:!0})):(I.addEventListener("mouseenter",p),I.addEventListener("mouseleave",g),I.addEventListener("focusin",p),I.addEventListener("focusout",g)))}Ge(()=>[t.target,t.delegate],()=>{f(),x()});function S(){i.value&&f()}return gn(()=>{x(),window.addEventListener("scroll",S,!0),window.addEventListener("resize",S)}),Gn(()=>{window.clearTimeout(r),a?.disconnect(),v(),window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S)}),(I,_)=>i.value?(b(),de(jr,{key:0,to:"body"},[C("div",{ref_key:"bubble",ref:n,class:$e(["ui-tip__bubble",{positioned:s.value}]),style:Vt([o.value,{"--tip-lines":e.maxLines}]),role:"tooltip"},B(e.text),7)])):te("",!0)}}),vt=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},FE=vt(tq,[["__scopeId","data-v-93bacf6d"]]),nq=["type","disabled","aria-label"],iq=nt({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},label:{},tooltip:{},type:{default:"button"}},setup(e,{expose:t}){const n=G();return t({el:n}),(i,s)=>(b(),M("button",{ref_key:"el",ref:n,class:$e(["ui-icon-button",`ui-icon-button--${e.size}`]),type:e.type,disabled:e.disabled,"aria-label":e.label},[En(i.$slots,"default",{},void 0,!0),e.tooltip?(b(),de(FE,{key:0,target:n.value??null,text:e.tooltip},null,8,["target","text"])):te("",!0)],10,nq))}}),rn=vt(iq,[["__scopeId","data-v-2cbeca98"]]),BE=Symbol("IconResolver"),sq={sm:14,md:16,lg:20},Ce=nt({__name:"Icon",props:{name:{},size:{default:"md"},label:{}},setup(e){const t=e,n=un(BE,()=>{}),i=F(()=>n(t.name)),s=F(()=>sq[t.size]);return(o,r)=>i.value?(b(),de(Ss(i.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)}}),oq={class:"ui-action-toast-host"},rq={class:"ui-action-toast__body"},lq=nt({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Pf();let o=null,r=0,l=0;function a(d){o=setTimeout(()=>i("dismiss",n.dismissToken),d),r=Date.now()+d}function u(){o!==null&&(clearTimeout(o),o=null,l=Math.max(0,r-Date.now()))}function c(){o===null&&a(l)}return a(n.duration),Cn(()=>{o!==null&&clearTimeout(o)}),(d,f)=>(b(),M("div",oq,[C("div",{class:"ui-action-toast",role:"status",onPointerenter:u,onPointerleave:c},[C("span",rq,[En(d.$slots,"default")]),V(rn,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??h(s)("common.dismiss"),tooltip:e.dismissLabel??h(s)("common.dismiss"),onClick:f[0]||(f[0]=p=>i("dismiss",e.dismissToken))},{default:he(()=>[V(Ce,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],32)]))}}),aq=vt(lq,[["__scopeId","data-v-e6936dfd"]]),uq={key:0,width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",stroke:"var(--color-success)","stroke-width":"2","aria-hidden":"true"},cq={key:1,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-danger)","stroke-width":"1.5","aria-hidden":"true"},dq={key:2,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-warning)","stroke-width":"1.5","aria-hidden":"true"},uf=nt({__name:"AuthStateIcon",props:{kind:{}},setup(e){return(t,n)=>e.kind==="success"?(b(),M("svg",uq,[...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"?(b(),M("svg",cq,[...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)])])):(b(),M("svg",dq,[...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)])]))}}),fq={key:0,class:"ui-badge__dot","aria-hidden":"true"},hq=nt({__name:"Badge",props:{variant:{default:"neutral"},size:{default:"md"},dot:{type:Boolean}},setup(e){return(t,n)=>(b(),M("span",{class:$e(["ui-badge",[`ui-badge--${e.variant}`,`ui-badge--${e.size}`]])},[e.dot?(b(),M("span",fq)):te("",!0),En(t.$slots,"default",{},void 0,!0)],2))}}),Pl=vt(hq,[["__scopeId","data-v-d879fe18"]]),pq={class:"ui-banner__icon","aria-hidden":"true"},gq={class:"ui-banner__text"},mq=nt({__name:"Banner",props:{variant:{default:"info"}},setup(e){return(t,n)=>(b(),M("div",{class:$e(["ui-banner",`ui-banner--${e.variant}`]),role:"status"},[C("span",pq,[En(t.$slots,"icon",{},()=>[e.variant==="info"?(b(),de(Ce,{key:0,name:"info",size:"md"})):(b(),de(Ce,{key:1,name:"alert-triangle",size:"md"}))],!0)]),C("span",gq,[En(t.$slots,"default",{},void 0,!0)])],2))}}),kc=vt(mq,[["__scopeId","data-v-6d739c6d"]]),vq=["aria-label"],yq=nt({__name:"Spinner",props:{size:{default:"md"},label:{}},setup(e){const{t}=Pf(),n=G(null);let i,s;function o(){const r=n.value;if(r){if(s?.matches){i?.cancel(),i=void 0;return}i||(i=r.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:850,iterations:1/0}),i.startTime=0)}}return gn(()=>{const r=n.value;!r||typeof r.animate!="function"||(s=window.matchMedia("(prefers-reduced-motion: reduce)"),s.addEventListener("change",o),o())}),Gn(()=>{s?.removeEventListener("change",o),s=void 0,i?.cancel(),i=void 0}),(r,l)=>(b(),M("span",{ref_key:"boxRef",ref:n,class:$e(["ui-spinner",`ui-spinner--${e.size}`]),role:"status","aria-label":e.label??h(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,vq))}}),Ii=vt(yq,[["__scopeId","data-v-476ed1b4"]]),bq=["type","disabled"],kq={class:"ui-button__content"},Aq=nt({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},loading:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(b(),M("button",{class:$e(["ui-button",[`ui-button--${e.variant}`,`ui-button--${e.size}`,{"is-loading":e.loading}]]),type:e.type,disabled:e.disabled||e.loading},[e.loading?(b(),de(Ii,{key:0,size:"sm",class:"ui-button__spinner"})):te("",!0),C("span",kq,[En(t.$slots,"default",{},void 0,!0)])],10,bq))}}),Ht=vt(Aq,[["__scopeId","data-v-01b5ec22"]]),Cq={key:0,class:"ui-card__head"},wq={class:"ui-card__body"},xq={key:1,class:"ui-card__foot"},_q=nt({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(b(),M("div",{class:$e(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(b(),M("div",Cq,[En(t.$slots,"head",{},void 0,!0)])):te("",!0),C("div",wq,[En(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(b(),M("div",xq,[En(t.$slots,"foot",{},void 0,!0)])):te("",!0)],2))}}),Sq=vt(_q,[["__scopeId","data-v-fbd05138"]]),Mq=["checked","disabled"],Iq={class:"ui-check__box","aria-hidden":"true"},Eq={key:0,class:"ui-check__label"},Tq=nt({__name:"Checkbox",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(i,s)=>(b(),M("label",{class:$e(["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]=o=>n("update:modelValue",o.target.checked))},null,40,Mq),C("span",Iq,[e.modelValue?(b(),de(Ce,{key:0,name:"check",size:"md"})):te("",!0)]),i.$slots.default?(b(),M("span",Eq,[En(i.$slots,"default",{},void 0,!0)])):te("",!0)],2))}}),Lq=vt(Tq,[["__scopeId","data-v-d4bf4026"]]),Nq={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},Fq=["stroke-dasharray","stroke-dashoffset"],K9=7,Bq=nt({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*K9;return(i,s)=>(b(),M("svg",Nq,[C("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:K9,fill:"none","stroke-width":"2.5"}),C("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:K9,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,Fq)]))}}),$q=vt(Bq,[["__scopeId","data-v-de787cf2"]]),vo=G(0),Dq=["aria-label"],zq={key:0,class:"ui-dialog__head"},Rq={class:"ui-dialog__titles"},Oq={key:0,class:"ui-dialog__title"},Pq={key:1,class:"ui-dialog__desc"},jq={class:"ui-dialog__body"},Hq={key:1,class:"ui-dialog__foot"},Wq='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',qq=nt({__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,i=t,{t:s}=Pf(),o=G(null);let r=null;function l(){i("update:open",!1),i("close")}function a(){return o.value?Array.from(o.value.querySelectorAll(Wq)):[]}function u(){const{initialFocus:f}=n;return f?typeof f=="function"?f()??null:typeof f=="string"?o.value?.querySelector(f)??null:o.value?.contains(f)?f:null:null}function c(f){if(!n.open)return;if(f.key==="Escape"&&n.closeOnEsc){f.preventDefault(),l();return}if(f.key!=="Tab")return;const p=a(),g=p[0],m=p[p.length-1];if(!g||!m){f.preventDefault(),o.value?.focus();return}const y=document.activeElement;f.shiftKey&&y===g?(f.preventDefault(),m.focus()):!f.shiftKey&&y===m&&(f.preventDefault(),g.focus())}function d(f){n.closeOnOverlay&&f.target===f.currentTarget&&l()}return Ge(()=>n.open,async f=>{if(f){vo.value+=1,r=document.activeElement,await At();const p=u(),g=a();(p??g[0]??o.value)?.focus()}else vo.value=Math.max(0,vo.value-1),r instanceof HTMLElement&&(r.focus(),r=null)},{immediate:!0}),typeof window<"u"&&window.addEventListener("keydown",c),Gn(()=>{typeof window<"u"&&window.removeEventListener("keydown",c),n.open&&(vo.value=Math.max(0,vo.value-1),r instanceof HTMLElement&&r.focus())}),(f,p)=>(b(),de(jr,{to:"body"},[e.open?(b(),M("div",{key:0,class:"ui-dialog__overlay",onMousedown:d},[C("div",{ref_key:"panel",ref:o,class:$e(["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?(b(),M("div",zq,[En(f.$slots,"head",{},()=>[C("div",Rq,[e.title?(b(),M("div",Oq,B(e.title),1)):te("",!0),e.description?(b(),M("div",Pq,B(e.description),1)):te("",!0)])],!0),e.hideClose?te("",!0):(b(),de(rn,{key:0,class:"ui-dialog__close",size:"sm",label:h(s)("common.close"),tooltip:h(s)("common.close"),onClick:l},{default:he(()=>[V(Ce,{name:"close",size:"md"})]),_:1},8,["label","tooltip"]))])):te("",!0),C("div",jq,[En(f.$slots,"default",{},void 0,!0)]),f.$slots.foot?(b(),M("div",Hq,[En(f.$slots,"foot",{},void 0,!0)])):te("",!0)],10,Dq)],32)):te("",!0)]))}}),La=vt(qq,[["__scopeId","data-v-ebbc1a68"]]),Uq={class:"ui-empty"},Kq={key:0,class:"ui-empty__icon","aria-hidden":"true"},Vq={key:1,class:"ui-empty__title"},Zq={key:2,class:"ui-empty__hint"},Gq=nt({__name:"EmptyState",props:{title:{},hint:{}},setup(e){return(t,n)=>(b(),M("div",Uq,[t.$slots.icon?(b(),M("span",Kq,[En(t.$slots,"icon",{},void 0,!0)])):te("",!0),e.title?(b(),M("div",Vq,B(e.title),1)):te("",!0),e.hint?(b(),M("div",Zq,B(e.hint),1)):te("",!0),En(t.$slots,"default",{},void 0,!0)]))}}),Qq=vt(Gq,[["__scopeId","data-v-6da80932"]]),Yq={key:0,class:"ui-field__label"},Jq={key:1,class:"ui-field__error"},Xq={key:2,class:"ui-field__hint"},eU=nt({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(b(),M("div",{class:$e(["ui-field",{"has-error":!!e.error}])},[e.label?(b(),M("label",Yq,B(e.label),1)):te("",!0),En(t.$slots,"default",{},void 0,!0),e.error?(b(),M("span",Jq,B(e.error),1)):e.hint?(b(),M("span",Xq,B(e.hint),1)):te("",!0)],2))}}),tU=vt(eU,[["__scopeId","data-v-a8de5f7f"]]),nU=["type","value","placeholder","disabled","readonly"],iU=nt({__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 i=n,s=G();function o(a){i("update:modelValue",a.target.value)}function r(){s.value?.focus()}function l(){s.value?.select()}return t({focus:r,select:l,el:s}),(a,u)=>(b(),M("input",{ref_key:"el",ref:s,class:$e(["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:o,onFocus:u[0]||(u[0]=c=>a.$emit("focus",c)),onBlur:u[1]||(u[1]=c=>a.$emit("blur",c))},null,42,nU))}}),Xs=vt(iU,[["__scopeId","data-v-f1cdf732"]]),sU={class:"ui-kbd"},oU=nt({__name:"Kbd",props:{keys:{}},setup(e){return(t,n)=>(b(),M("span",sU,[(b(!0),M(Be,null,yt(e.keys,i=>(b(),M("kbd",{key:i,class:"ui-kbd__key"},B(i),1))),128))]))}}),Aa=vt(oU,[["__scopeId","data-v-04b30ce2"]]),rU=["role"],lU=nt({__name:"Menu",props:{role:{default:"menu"}},setup(e,{expose:t}){const n=G();return t({el:n}),(i,s)=>(b(),M("div",{ref_key:"el",ref:n,class:"ui-menu",role:e.role},[En(i.$slots,"default",{},void 0,!0)],8,rU))}}),al=vt(lU,[["__scopeId","data-v-9be2c64a"]]),aU={key:0,class:"ui-menu-sep",role:"separator"},uU=["role","disabled"],cU=nt({__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?(b(),M("div",aU)):(b(),M("button",{key:1,class:$e(["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]=i=>t.$emit("click",i))},[En(t.$slots,"default",{},void 0,!0)],10,uU))}}),yn=vt(cU,[["__scopeId","data-v-3427559a"]]),dU=nt({__name:"Tooltip",props:{text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=G();return(n,i)=>(b(),M(Be,null,[C("span",{ref_key:"trigger",ref:t,class:"ui-tip"},[En(n.$slots,"default",{},void 0,!0)],512),V(FE,{delegate:t.value??null,text:e.text,placement:e.placement,"max-width":e.maxWidth,"max-lines":e.maxLines},null,8,["delegate","text","placement","max-width","max-lines"])],64))}}),mn=vt(dU,[["__scopeId","data-v-414bd903"]]),fU={class:"ui-panel-header__title"},hU={key:0,class:"ui-panel-header__sub"},pU=nt({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{},closeIcon:{default:"close"},wrap:{type:Boolean}},emits:["close"],setup(e){const{t}=Pf();return(n,i)=>(b(),M("div",{class:$e(["ui-panel-header",{wrap:e.wrap}])},[C("span",fU,B(e.title),1),V(mn,{text:e.subtitle},{default:he(()=>[e.subtitle?(b(),M("span",hU,B(e.subtitle),1)):te("",!0)]),_:1},8,["text"]),En(n.$slots,"default",{},void 0,!0),e.closable?(b(),de(rn,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel??h(t)("common.close"),tooltip:e.closeLabel??h(t)("common.close"),onClick:i[0]||(i[0]=s=>n.$emit("close"))},{default:he(()=>[V(Ce,{name:e.closeIcon,size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])):te("",!0)],2))}}),qc=vt(pU,[["__scopeId","data-v-eb14b05d"]]),gU=["disabled","aria-pressed"],mU=nt({__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?(b(),M("button",{key:0,class:$e(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=i=>t.$emit("click",i))},[En(t.$slots,"default",{},void 0,!0)],10,gU)):(b(),M("span",{key:1,class:$e(["ui-pill",{"is-active":e.active}])},[En(t.$slots,"default",{},void 0,!0)],2))}}),$E=vt(mU,[["__scopeId","data-v-fe6a2873"]]),vU=nt({__name:"ScrollArea",props:{orientation:{default:"vertical"},hideDelay:{default:600}},setup(e,{expose:t}){const n=e,i=G(null),s=G(null),o=G(!1),r=G({overflow:!1,size:0,offset:0}),l=G({overflow:!1,size:0,offset:0}),a=G(null);let u=null,c=null,d=null;const f=F(()=>({overflowX:n.orientation==="vertical"?"hidden":"auto",overflowY:n.orientation==="horizontal"?"hidden":"auto"})),p=F(()=>({height:`${r.value.size}px`,transform:`translateY(${r.value.offset}px)`})),g=F(()=>({width:`${l.value.size}px`,transform:`translateX(${l.value.offset}px)`}));function m(E,N,D){if(!(N>E+1)||E<=0)return{overflow:!1,size:0,offset:0};const $=Math.max(0,E-4),O=Math.min($,Math.max(24,$*E/N)),P=Math.max(0,$-O),R=Math.max(1,N-E);return{overflow:!0,size:O,offset:P*D/R}}function y(){const E=s.value;if(!E)return;const N=m(E.clientHeight,E.scrollHeight,E.scrollTop),D=m(E.clientWidth,E.scrollWidth,E.scrollLeft);(N.overflow!==r.value.overflow||N.size!==r.value.size||N.offset!==r.value.offset)&&(r.value=N),(D.overflow!==l.value.overflow||D.size!==l.value.size||D.offset!==l.value.offset)&&(l.value=D)}function w(){u!==null&&clearTimeout(u),u=null}function k(){w(),o.value=!0}function A(){w(),!(a.value||i.value?.matches(":hover, :focus-within"))&&(u=setTimeout(()=>{o.value=!1,u=null},n.hideDelay))}function v(){y(),k(),A()}function x(E,N){const D=s.value;D&&(N.preventDefault(),k(),a.value={axis:E,pointerId:N.pointerId,startPointer:E==="vertical"?N.clientY:N.clientX,startScroll:E==="vertical"?D.scrollTop:D.scrollLeft},N.currentTarget.setPointerCapture(N.pointerId))}function S(E){const N=a.value,D=s.value;if(!N||N.pointerId!==E.pointerId||!D)return;const T=N.axis==="vertical"?E.clientY:E.clientX,$=N.axis==="vertical"?D.clientHeight:D.clientWidth,O=N.axis==="vertical"?D.scrollHeight:D.scrollWidth,P=N.axis==="vertical"?r.value.size:l.value.size,R=Math.max(1,$-4-P),j=(T-N.startPointer)*(O-$)/R;N.axis==="vertical"?D.scrollTop=N.startScroll+j:D.scrollLeft=N.startScroll+j}function I(E){!a.value||a.value.pointerId!==E.pointerId||(a.value=null,A())}function _(){const E=s.value;if(!(!E||!c))for(const N of E.children)c.observe(N)}return gn(async()=>{await At();const E=s.value;E&&(c=new ResizeObserver(y),c.observe(E),_(),d=new MutationObserver(()=>{_(),y()}),d.observe(E,{childList:!0,subtree:!0,characterData:!0}),y())}),Gn(()=>{w(),c?.disconnect(),d?.disconnect()}),t({viewport:s,updateMetrics:y}),(E,N)=>(b(),M("div",{ref_key:"root",ref:i,class:"ui-scroll-area",onPointerenter:k,onPointerleave:A,onFocusin:k,onFocusout:A},[C("div",{ref_key:"viewport",ref:s,class:"ui-scroll-area__viewport",style:Vt(f.value),tabindex:"0",onScroll:v},[En(E.$slots,"default",{},void 0,!0)],36),r.value.overflow&&n.orientation!=="horizontal"?(b(),M("div",{key:0,class:$e(["ui-scroll-area__bar ui-scroll-area__bar--vertical",{"is-visible":o.value}]),"aria-hidden":"true"},[C("span",{class:"ui-scroll-area__thumb",style:Vt(p.value),onPointerdown:N[0]||(N[0]=D=>x("vertical",D)),onPointermove:S,onPointerup:I,onPointercancel:I},null,36)],2)):te("",!0),l.value.overflow&&n.orientation!=="vertical"?(b(),M("div",{key:1,class:$e(["ui-scroll-area__bar ui-scroll-area__bar--horizontal",{"is-visible":o.value}]),"aria-hidden":"true"},[C("span",{class:"ui-scroll-area__thumb",style:Vt(g.value),onPointerdown:N[1]||(N[1]=D=>x("horizontal",D)),onPointermove:S,onPointerup:I,onPointercancel:I},null,36)],2)):te("",!0)],544))}}),iA=vt(vU,[["__scopeId","data-v-9c504ebc"]]),yU=["data-icon","aria-selected","onClick"],bU=nt({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,s=G(null),o=G([]),r=G(!1),l=G({});let a=null;function u(d,f){d instanceof HTMLElement&&(o.value[f]=d)}async function c(){await At();const d=n.options.findIndex(p=>p.value===n.modelValue),f=o.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 Ge(()=>[n.modelValue,n.options.length],c,{immediate:!0}),gn(()=>{a=new ResizeObserver(()=>c()),s.value&&a.observe(s.value);for(const d of o.value)a.observe(d);c()}),Gn(()=>a?.disconnect()),(d,f)=>(b(),M("div",{ref_key:"root",ref:s,class:$e(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[C("span",{class:$e(["ui-seg__indicator",{"is-ready":r.value}]),style:Vt(l.value),"aria-hidden":"true"},null,6),(b(!0),M(Be,null,yt(e.options,(p,g)=>(b(),M("button",{key:p.value,ref_for:!0,ref:m=>u(m,g),class:$e(["ui-seg__item",{"is-on":p.value===e.modelValue}]),"data-icon":p.icon,type:"button",role:"tab","aria-selected":p.value===e.modelValue,onClick:m=>i("update:modelValue",p.value)},[p.icon?(b(),de(Ce,{key:0,class:"ui-seg__icon",name:p.icon,size:"sm"},null,8,["name"])):te("",!0),p.swatch?(b(),M("span",{key:1,class:"ui-seg__swatch",style:Vt({backgroundColor:p.swatch})},null,4)):te("",!0),qe(" "+B(p.label),1)],10,yU))),128))],2))}}),bo=vt(bU,[["__scopeId","data-v-b09ef1d1"]]),kU=["aria-expanded","disabled"],AU=["src"],CU={class:"ui-select__value-text"},wU={key:0,class:"ui-select__group"},xU=["aria-selected","disabled","onMouseenter","onClick"],_U=["src"],SU=nt({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,i=t,s=Rf(),o=G(null),r=G(null),l=G(null),a=G([]),u=G(!1),c=G(-1),d=`ui-select-${Math.random().toString(36).slice(2,9)}`,f=F(()=>n.options.findIndex(_=>String(_.value)===String(n.modelValue??""))),p=F(()=>n.options[f.value]),g=F(()=>p.value?.label??n.placeholder);function m(_,E){a.value[E]=_ instanceof HTMLElement?_:null}function y(){const _=l.value,E=a.value[c.value];!_||!E||(_.scrollTop=E.offsetTop-(_.clientHeight-E.offsetHeight)/2)}function w(){n.disabled||u.value||(u.value=!0,c.value=f.value>=0?f.value:n.options.findIndex(_=>!_.disabled),At(y))}function k({restoreFocus:_=!1}={}){u.value&&(u.value=!1,_&&At(()=>r.value?.focus()))}function A(){u.value?k():w()}function v(_){_.disabled||(String(_.value)!==String(n.modelValue??"")&&i("update:modelValue",_.value),k({restoreFocus:!0}))}function x(_){if(u.value||w(),n.options.length===0)return;let E=c.value;for(let N=0;N<n.options.length;N+=1)if(E=(E+_+n.options.length)%n.options.length,!n.options[E]?.disabled){c.value=E,At(y);return}}function S(_){if(_.key==="ArrowDown")_.preventDefault(),x(1);else if(_.key==="ArrowUp")_.preventDefault(),x(-1);else if(_.key==="Enter"||_.key===" ")if(_.preventDefault(),!u.value)w();else{const E=n.options[c.value];E&&v(E)}else if(_.key==="Escape")_.preventDefault(),k();else if(_.key==="Home"||_.key==="End"){_.preventDefault();const E=n.options.map((N,D)=>N.disabled?-1:D).filter(N=>N>=0);c.value=_.key==="Home"?E[0]??-1:E.at(-1)??-1,At(y)}}function I(_){o.value?.contains(_.target)||k()}return gn(()=>document.addEventListener("pointerdown",I)),Cn(()=>document.removeEventListener("pointerdown",I)),(_,E)=>(b(),M("div",{ref_key:"rootRef",ref:o,class:$e(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error,"is-open":u.value,"is-disabled":e.disabled}]])},[C("button",Jn({ref_key:"triggerRef",ref:r},h(s),{class:"ui-select__trigger",type:"button",role:"combobox","aria-controls":d,"aria-expanded":u.value,"aria-haspopup":"listbox",disabled:e.disabled,onClick:A,onKeydown:S}),[C("span",{class:$e(["ui-select__value",{"is-placeholder":!p.value}])},[p.value?.icon?(b(),M("img",{key:0,class:"ui-select__icon",src:p.value.icon,alt:""},null,8,AU)):te("",!0),C("span",CU,B(g.value),1)],2),V(Ce,{class:"ui-select__chevron",name:"chevron-down",size:"sm"})],16,kU),u.value?(b(),M("div",{key:0,id:d,ref_key:"listRef",ref:l,class:"ui-select__menu",role:"listbox"},[(b(!0),M(Be,null,yt(e.options,(N,D)=>(b(),M(Be,{key:`${N.group??""}:${N.value}`},[N.group&&N.group!==e.options[D-1]?.group?(b(),M("div",wU,B(N.group),1)):te("",!0),C("button",{ref_for:!0,ref:T=>m(T,D),class:$e(["ui-select__option",{"is-selected":D===f.value,"is-active":D===c.value}]),type:"button",role:"option","aria-selected":D===f.value,disabled:N.disabled,onMouseenter:T=>c.value=D,onClick:T=>v(N)},[V(Ce,{class:"ui-select__check",name:"check",size:"sm"}),N.icon?(b(),M("img",{key:0,class:"ui-select__icon ui-select__icon--option",src:N.icon,alt:""},null,8,_U)):te("",!0),C("span",null,B(N.label),1)],42,xU)],64))),128))],512)):te("",!0)],2))}}),X4=vt(SU,[["__scopeId","data-v-63f5dcbc"]]),MU=nt({__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"fail":case"danger":return"error";case"running":case"run":case"working":case"in_progress":case"active":return"running";case"suspended":return"suspended";default:return"idle"}}const i=F(()=>n(t.status));return(s,o)=>(b(),M("span",{class:$e(["kw-dot",`kw-dot--${i.value}`]),"aria-hidden":"true"},null,2))}}),dl=vt(MU,[["__scopeId","data-v-644d641a"]]),IU=["aria-checked","aria-label","disabled"],EU=nt({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(i,s)=>(b(),M("button",{class:$e(["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]=o=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[C("span",{class:"ui-switch__thumb"},null,-1)])],10,IU))}}),Sd=vt(EU,[["__scopeId","data-v-2fc56545"]]),TU={class:"ui-toast__icon","aria-hidden":"true"},LU={class:"ui-toast__body"},NU={class:"ui-toast__title"},FU={key:0,class:"ui-toast__msg"},BU=nt({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{}},emits:["dismiss"],setup(e){const{t}=Pf();return(n,i)=>(b(),M("div",{class:$e(["ui-toast",`ui-toast--${e.variant}`])},[C("span",TU,[En(n.$slots,"icon",{},()=>[e.variant==="success"?(b(),de(Ce,{key:0,name:"check"})):e.variant==="danger"?(b(),de(Ce,{key:1,name:"close"})):e.variant==="warning"?(b(),de(Ce,{key:2,name:"alert-triangle"})):(b(),de(Ce,{key:3,name:"info"}))],!0)]),C("div",LU,[C("div",NU,B(e.title),1),e.message?(b(),M("div",FU,B(e.message),1)):te("",!0),En(n.$slots,"default",{},void 0,!0)]),V(rn,{class:"ui-toast__close",size:"sm",label:e.dismissLabel??h(t)("common.dismiss"),tooltip:e.dismissLabel??h(t)("common.dismiss"),onClick:i[0]||(i[0]=s=>n.$emit("dismiss"))},{default:he(()=>[V(Ce,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],2))}}),$U=vt(BU,[["__scopeId","data-v-62bc76d1"]]),DU=100;function qr(){let e=!1,t=0;function n(){e=!0,t=0}function i(){e=!1,t=Date.now()}function s(){e=!1,t=0}function o(r){return e||r.isComposing||r.keyCode===229||Date.now()-t<DU}return typeof window<"u"&&(window.addEventListener("focusin",s,!0),window.addEventListener("focusout",s,!0)),Cn(()=>{typeof window<"u"&&(window.removeEventListener("focusin",s,!0),window.removeEventListener("focusout",s,!0))}),{handleCompositionStart:n,handleCompositionEnd:i,resetComposition:s,isComposingKeyEvent:o}}function Kd(e,t,n="/api/v1"){return`${e}${n}${t.startsWith("/")?t:`/${t}`}`}function zU(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 p5={};class au 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 ra 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 g5 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 Os(e){return e instanceof au||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function J2(e){return e instanceof ra||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}function RU(e){return J2(e)&&typeof e.cause=="object"&&e.cause!==null&&e.cause.name==="TimeoutError"}function OU(e){return e instanceof g5||typeof e=="object"&&e!==null&&e.name==="FileTooLargeError"&&typeof e.limit=="number"}const PU=41301,jU=40922;function HU(e){return Os(e)&&e.code===jU}const P1=3e4,S0=5*6e4,sA=5*6e4,DE="0123456789ABCDEFGHJKMNPQRSTVWXYZ",oA=500,zE=40101;function rA(e,t){for(const[n,i]of Object.entries(t))if(i!==void 0)if(Array.isArray(i))for(const s of i)s!==void 0&&e.append(n,String(s));else e.set(n,String(i))}function M0(e=P1){try{return AbortSignal.timeout(e)}catch{return}}function WU(e,t){let n="",i=e;for(let s=0;s<t;s++)n=DE[i%32]+n,i=Math.floor(i/32);return n}function qU(e){const t=new Uint8Array(e);if(globalThis.crypto?.getRandomValues)globalThis.crypto.getRandomValues(t);else for(let n=0;n<t.length;n++)t[n]=Math.floor(Math.random()*256);return Array.from(t,n=>DE[n%32]).join("")}function I0(){return`${WU(Date.now(),10)}${qU(16)}`}function UU(e){try{const t=[];return e.forEach((n,i)=>{typeof n=="string"?t.push({field:i,value:n}):t.push({field:i,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function V9(e){try{const t=await e.text();return t?t.length>oA?`${t.slice(0,oA)}...`:t:void 0}catch{return}}class lA{constructor(t){this.opts=t,this.tracer=t.tracer??p5}tracer;async get(t,n){return this.request("GET",t,void 0,n)}async getBlob(t,n,i){let s=Kd(this.opts.origin,t,this.opts.restBasePath);if(n){const c=new URLSearchParams;rA(c,n);const d=c.toString();d&&(s=`${s}?${d}`)}const o=I0(),r={"X-Request-Id":o};this.addClientHeaders(r);const l=Date.now();this.tracer.restRequest?.({method:"GET",path:t,url:s,requestId:o});let a;try{a=await fetch(s,{method:"GET",headers:r,signal:M0()})}catch(c){throw this.tracer.restFailure?.({method:"GET",path:t,requestId:o,phase:"fetch",durationMs:Date.now()-l,error:c}),new ra({message:`Network error calling GET ${t}`,cause:c,method:"GET",path:t,url:s,requestId:o,phase:"fetch",timeoutMs:P1,timestamp:Date.now(),durationMs:Date.now()-l})}if(a.ok){this.tracer.restResponse?.({method:"GET",path:t,requestId:o,status:a.status,durationMs:Date.now()-l,code:0,msg:""});const c=Number(a.headers.get("content-length")??0);if(i?.maxBytes!==void 0&&c>i.maxBytes)throw a.body?.cancel(),new g5({size:c,limit:i.maxBytes});return a.blob()}let u;try{u=await a.clone().json()}catch{}throw this.checkAuthRequired(a,u?.code??0),this.tracer.restResponse?.({method:"GET",path:t,requestId:o,status:a.status,durationMs:Date.now()-l,code:u?.code??a.status,msg:u?.msg??a.statusText,envelopeRequestId:u?.request_id}),new au({code:u?.code??a.status,msg:u?.msg??a.statusText,requestId:u?.request_id??o,details:u?.details,timestamp:Date.now(),durationMs:Date.now()-l})}async post(t,n,i){return this.request("POST",t,n,void 0,i?.allowCodes,i?.timeoutMs)}async postZip(t,n,i){const s="POST",o=Kd(this.opts.origin,t,this.opts.restBasePath),r=I0(),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:o,requestId:r,body:i});let u;try{u=await fetch(o,{method:s,headers:l,body:JSON.stringify(n),signal:M0(S0)})}catch(p){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"fetch",durationMs:Date.now()-a,error:p}),new ra({message:`Network error calling ${s} ${t}`,cause:p,method:s,path:t,url:o,requestId:r,phase:"fetch",timeoutMs:S0,timestamp:Date.now(),durationMs:Date.now()-a})}const c=u.headers.get("content-type")??void 0,d=c?.split(";",1)[0]?.trim().toLowerCase();if(!u.ok||d!=="application/zip"){let p;try{p=await u.clone().json()}catch{}if(this.checkAuthRequired(u,p?.code??0),!u.ok||p!==void 0&&p.code!==0){const y=p?.code??u.status,w=p?.msg??u.statusText;throw this.tracer.restResponse?.({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:y,msg:w,envelopeRequestId:p?.request_id}),new au({code:y,msg:w,requestId:p?.request_id??r,details:p?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const g=u.clone(),m=new TypeError(`Expected application/zip, received ${c??"no content type"}`);throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:m}),new ra({message:`Invalid ZIP response from ${s} ${t}`,cause:m,method:s,path:t,url:o,requestId:r,phase:"parse",timeoutMs:S0,status:u.status,statusText:u.statusText,contentType:c,bodyPreview:await V9(g),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await u.blob()}catch(p){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:p}),new ra({message:`Failed to read ZIP response from ${s} ${t}`,cause:p,method:s,path:t,url:o,requestId:r,phase:"parse",timeoutMs:S0,status:u.status,statusText:u.statusText,contentType:c,timestamp:Date.now(),durationMs:Date.now()-a})}return this.tracer.restResponse?.({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:u.headers.get("content-disposition")??void 0}}async postForm(t,n){const i=Kd(this.opts.origin,t,this.opts.restBasePath),s=I0(),o={"X-Request-Id":s};this.addClientHeaders(o);const r=Date.now();this.tracer.restRequest?.({method:"POST",path:t,url:i,requestId:s,body:UU(n)});let l;try{l=await fetch(i,{method:"POST",headers:o,body:n,signal:M0()})}catch(c){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-r,error:c}),new ra({message:`Network error calling POST ${t}`,cause:c,method:"POST",path:t,url:i,requestId:s,phase:"fetch",timeoutMs:P1,timestamp:Date.now(),durationMs:Date.now()-r})}let a;const u=l.clone();try{a=await l.json()}catch(c){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-r,status:l.status,error:c}),new ra({message:`Failed to parse JSON response from POST ${t}`,cause:c,method:"POST",path:t,url:i,requestId:s,phase:"parse",timeoutMs:P1,status:l.status,statusText:l.statusText,contentType:l.headers.get("content-type")??void 0,bodyPreview:await V9(u),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){const c=a.code??l.status;throw new au({code:c,msg:a.msg??l.statusText,requestId:a.request_id??s,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,i,s,o=[],r=P1){let l=Kd(this.opts.origin,n,this.opts.restBasePath);if(s){const g=new URLSearchParams;rA(g,s);const m=g.toString();m&&(l=`${l}?${m}`)}const a=I0(),u={"X-Request-Id":a};this.addClientHeaders(u),i!==void 0&&(u["Content-Type"]="application/json; charset=utf-8");const c=Date.now();this.tracer.restRequest?.({method:t,path:n,url:l,requestId:a,body:i});let d;try{d=await fetch(l,{method:t,headers:u,body:i!==void 0?JSON.stringify(i):void 0,signal:M0(r)})}catch(g){throw this.tracer.restFailure?.({method:t,path:n,requestId:a,phase:"fetch",durationMs:Date.now()-c,error:g}),new ra({message:`Network error calling ${t} ${n}`,cause:g,method:t,path:n,url:l,requestId:a,phase:"fetch",timeoutMs:r,timestamp:Date.now(),durationMs:Date.now()-c})}let f;const p=d.clone();try{const g=await d.text();f=d.status===204&&g===""?{code:0,msg:"",data:null,request_id:a}:JSON.parse(g)}catch(g){throw this.tracer.restFailure?.({method:t,path:n,requestId:a,phase:"parse",durationMs:Date.now()-c,status:d.status,error:g}),new ra({message:`Failed to parse JSON response from ${t} ${n}`,cause:g,method:t,path:n,url:l,requestId:a,phase:"parse",timeoutMs:r,status:d.status,statusText:d.statusText,contentType:d.headers.get("content-type")??void 0,bodyPreview:await V9(p),timestamp:Date.now(),durationMs:Date.now()-c})}if(this.tracer.restResponse?.({method:t,path:n,requestId:a,status:d.status,durationMs:Date.now()-c,code:f.code,msg:f.msg,envelopeRequestId:f.request_id,data:f.data}),this.checkAuthRequired(d,f.code),f.code!==0&&!o.includes(f.code))throw new au({code:typeof f.code=="number"?f.code:d.status,msg:typeof f.msg=="string"&&f.msg.length>0?f.msg:`HTTP ${d.status}${d.statusText?` ${d.statusText}`:""}`,requestId:f.request_id??a,details:f.details,timestamp:Date.now(),durationMs:Date.now()-c});return f.data}addClientHeaders(t){const n=this.opts.credentialStore?.getToken();n!==void 0&&(t.Authorization=`Bearer ${n}`);const i=this.opts.identity;i!==void 0&&(t["X-Kimi-Client-Id"]=i.clientId,t["X-Kimi-Client-Name"]=i.clientName,t["X-Kimi-Client-Version"]=i.clientVersion,t["X-Kimi-Client-Ui-Mode"]=i.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===zE)&&this.opts.credentialStore?.markAuthRequired?.()}}function RE(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 vm(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function KU(e,t,n){return{...t,model:t.model.length>0?t.model:e.model,usage:vm(t.usage)?e.usage:t.usage,updatedAt:!n&&t.updatedAt>e.updatedAt?t.updatedAt:e.updatedAt,pullRequest:t.pullRequest??e.pullRequest}}function Gr(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,archivedAt:e.archived_at,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:RE(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 VU(e){const t=e.activity.status;return{id:e.id,title:e.meta.title??e.meta.last_prompt??e.id.slice(0,12),createdAt:new Date(e.meta.created_at).toISOString(),updatedAt:new Date(e.meta.updated_at).toISOString(),busy:t==="running",pendingInteraction:t==="approval"?"approval":t==="question"?"question":void 0,lastTurnReason:t==="failed"?"failed":void 0,archived:e.meta.archived,archivedAt:e.meta.archived_at==null?void 0:new Date(e.meta.archived_at).toISOString(),lastPrompt:e.meta.last_prompt??void 0,cwd:e.workspace.cwd??"",model:"",pullRequest:e.git===void 0?void 0:e.git.pull_request,usage:{inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalCostUsd:0,contextTokens:0,contextLimit:0,turnCount:0},messageCount:0,lastSeq:0,workspaceId:e.workspace.id.length>0?e.workspace.id:void 0}}function ah(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function aA(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 m5(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:aA(e.source)};case"video":return{type:"video",source:aA(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 e3(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(m5),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function OE(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 ZU(e){return{content:e.content.map(OE),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 GU(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function PE(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 QU(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function YU(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map(QU),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function jE(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(YU),createdAt:e.created_at}}function JU(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 XU(e){const t={};for(const[n,i]of Object.entries(e.answers))t[n]=JU(i);return{answers:t,method:e.method,note:e.note}}function kg(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,model:e.model,thinkingEffort:e.thinking_effort,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 uA(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 Wa(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Md(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Er(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function HE(e){if(!e||typeof e!="object")return null;const t=e,n=Wa(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const i=t.budget,s=i&&typeof i=="object"?i:{};return{goalId:Wa(t,"goalId")??Wa(t,"goal_id")??"goal",objective:Wa(t,"objective")??"",completionCriterion:Wa(t,"completionCriterion")??Wa(t,"completion_criterion"),status:n,turnsUsed:Md(t,"turnsUsed")??Md(t,"turns_used")??0,tokensUsed:Md(t,"tokensUsed")??Md(t,"tokens_used")??0,wallClockMs:Md(t,"wallClockMs")??Md(t,"wall_clock_ms")??0,terminalReason:Wa(t,"terminalReason")??Wa(t,"terminal_reason"),budget:{tokenBudget:Er(s,"tokenBudget")??Er(s,"token_budget"),remainingTokens:Er(s,"remainingTokens")??Er(s,"remaining_tokens"),turnBudget:Er(s,"turnBudget")??Er(s,"turn_budget"),remainingTurns:Er(s,"remainingTurns")??Er(s,"remaining_turns"),wallClockBudgetMs:Er(s,"wallClockBudgetMs")??Er(s,"wall_clock_budget_ms"),remainingWallClockMs:Er(s,"remainingWallClockMs")??Er(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function eK(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:Gr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:Gr(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:ah(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:ah(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:RE(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=HE(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:e3(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(m5),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:PE(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,feedback:t.payload.feedback,selectedLabel:t.payload.selected_label};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:jE(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:kg(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.plugin.changed":return{type:"pluginsChanged"};case"event.capability.changed":return{type:"capabilityChanged",capabilityId:t.payload.capability_id,install:t.payload.install};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:t3(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 tK(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 Id(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 cA(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 t3(e){const t={};for(const[n,i]of Object.entries(e.providers))t[n]={type:i.type,baseUrl:i.base_url,defaultModel:i.default_model,hasApiKey:i.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 nK(e){return e.session_id}function iK(e){return e.seq}function sK(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}const oK={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function rK(e,t){switch(t.op){case"reset":return lK(e,t);case"turn.upsert":return uK(e,t.turn);case"step.upsert":return dK(e,t.turnId,t.step);case"frame.upsert":return hK(e,t);case"append":return gK(e,t);case"marker.upsert":return fA(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return fA(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return yK(e,t.task);case"interaction.upsert":return bK(e,t.interaction);case"attachment.upsert":return AK(e,t.attachment);case"todo.upsert":return wK(e,t.todo);case"prompt.upsert":return _K(e,t.prompt);case"meta.merge":return IK(e,t.meta);case"items.remove":return vK(e,t.ids)}}function lK(e,t){const n=new Set;for(const i of t.snapshot.interactions)i.state==="pending"&&n.add(i.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(i=>[i.taskId,i])),interactions:new Map(t.snapshot.interactions.map(i=>[i.interactionId,i])),attachments:new Map(t.snapshot.attachments.map(i=>[i.attachmentId,i])),todos:new Map(t.snapshot.todos.map(i=>[i.todoId,i])),prompts:new Map(t.snapshot.prompts.map(i=>[i.promptId,i])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function dA(e,t){return{...e,kind:"turn",steps:[...t]}}function WE(e){return{kind:"turn",turnId:e,ordinal:sK(e),state:"running",origin:{kind:"other"},steps:[]}}function aK(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function If(e,t){const n=e.items.find(i=>i.kind==="turn"&&i.turnId===t);return n?.kind==="turn"?n:void 0}function v5(e,t){const n=[...e];let i=n.length;for(let s=0;s<n.length;s+=1){const o=n[s];if(o?.kind==="turn"&&o.ordinal>t.ordinal){i=s;break}}return n.splice(i,0,t),n}function X2(e,t,n){return e.map(i=>i.kind==="turn"&&i.turnId===t?n(i):i)}function uK(e,t){const n=If(e,t.turnId);return n?cK(n,t)?{state:e,changed:!1}:{state:{...e,items:X2(e.items,t.turnId,i=>dA(t,i.steps))},changed:!0}:{state:{...e,items:v5(e.items,dA(t,[]))},changed:!0}}function cK(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 dK(e,t,n){const i=If(e,t)??WE(t),s=i.steps.findIndex(u=>u.stepId===n.stepId);let o,r=!0;if(s>=0){const u=i.steps[s];u&&fK(u,n)?(r=!1,o=i.steps):o=i.steps.map(c=>c.stepId===n.stepId?{...n,kind:"step",frames:c.frames}:c)}else o=[...i.steps,{...n,kind:"step",frames:[]}].toSorted((u,c)=>u.ordinal-c.ordinal);if(!r)return{state:e,changed:!1};const l={...i,steps:[...o]},a=If(e,t)?X2(e.items,t,()=>l):v5(e.items,l);return{state:{...e,items:a},changed:!0}}function fK(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 hK(e,t){const n=If(e,t.turnId)??WE(t.turnId),i=n.steps.find(c=>c.stepId===t.stepId)??aK(t.stepId,t.turnId),s=i.frames.findIndex(c=>c.frameId===t.frame.frameId);let o;if(s>=0){const c=i.frames[s];if(c!==void 0&&pK(c,t.frame))return{state:e,changed:!1};o=i.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else o=[...i.frames,t.frame];const r={...i,frames:[...o]},l=n.steps.some(c=>c.stepId===t.stepId)?n.steps.map(c=>c.stepId===t.stepId?r:c):[...n.steps,r].toSorted((c,d)=>c.ordinal-d.ordinal),a={...n,steps:l},u=If(e,t.turnId)?X2(e.items,t.turnId,()=>a):v5(e.items,a);return{state:{...e,items:u},changed:!0}}function pK(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 gK(e,t){if(t.target.type==="task")return mK(e,t);const{turnId:n,stepId:i,frameId:s}=t.target,o=If(e,n),r=o?.steps.find(f=>f.stepId===i),l=r?.frames.find(f=>f.frameId===s);if(!o||!r||!l||l.kind!=="text"&&l.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=qE(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 u={...l,text:a.text},c={...r,frames:r.frames.map(f=>f.frameId===s?u:f)},d={...o,steps:o.steps.map(f=>f.stepId===i?c:f)};return{state:{...e,items:X2(e.items,n,()=>d)},changed:!0}}function mK(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,i=e.tasks.get(n),s=i?.outputTail??"",o=qE(s,t.offset,t.text);if(o.gap)return{state:e,changed:!1,gap:o.gap};if(!o.changed)return{state:e,changed:!1};const r=i?{...i,outputTail:o.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:o.text},l=new Map(e.tasks);return l.set(n,r),{state:{...e,tasks:l},changed:!0}}function qE(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 i=e.length-t;return e.slice(t)!==n.slice(0,i)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(i>0?n.slice(i):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function fA(e,t,n,i){if(e.items.some(o=>n3(o)===n)){let o=!1;const r=e.items.map(l=>n3(l)!==n||l===t?l:(o=!0,t));return o?{state:{...e,items:r},changed:!0}:{state:e,changed:!1}}if(i!==void 0){const o=[...e.items];let r=o.length;for(let l=0;l<o.length;l+=1){const a=o[l];if(a?.kind==="turn"&&a.ordinal>=i){r=l;break}}return o.splice(r,0,t),{state:{...e,items:o},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function n3(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function vK(e,t){const n=new Set(t),i=e.items.filter(l=>l.kind==="turn"&&n.has(l.turnId)),s=e.items.filter(l=>!n.has(n3(l)));if(s.length===e.items.length)return{state:e,changed:!1};let o=e.pendingInteractions,r=e.interactions;if(i.length>0){const l=new Set,a=new Set(o),u=new Set;for(const c of i)for(const d of c.steps)for(const f of d.frames)f.kind==="tool"&&l.add(f.toolCallId);for(const c of r.values())c.toolCallId!==void 0&&l.has(c.toolCallId)&&(u.add(c.interactionId),a.delete(c.interactionId));if(u.size>0){const c=new Map(r);for(const d of u)c.delete(d);r=c}o=a}return{state:{...e,items:s,interactions:r,pendingInteractions:o},changed:!0}}function yK(e,t){const n=e.tasks.get(t.taskId);if(n&&MK(n,t))return{state:e,changed:!1};const i=new Map(e.tasks);return i.set(t.taskId,t),{state:{...e,tasks:i},changed:!0}}function bK(e,t){const n=e.interactions.get(t.interactionId);if(n&&kK(n,t))return{state:e,changed:!1};const i=new Map(e.interactions);i.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const o=new Set(s);o.add(t.interactionId),s=o}}else if(s.has(t.interactionId)){const o=new Set(s);o.delete(t.interactionId),s=o}return{state:{...e,interactions:i,pendingInteractions:s},changed:!0}}function kK(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function AK(e,t){const n=e.attachments.get(t.attachmentId);if(n&&CK(n,t))return{state:e,changed:!1};const i=new Map(e.attachments);return i.set(t.attachmentId,t),{state:{...e,attachments:i},changed:!0}}function CK(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function wK(e,t){const n=e.todos.get(t.todoId);if(n&&xK(n,t))return{state:e,changed:!1};const i=new Map(e.todos);return i.set(t.todoId,t),{state:{...e,todos:i},changed:!0}}function xK(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function _K(e,t){const n=e.prompts.get(t.promptId);if(n&&SK(n,t))return{state:e,changed:!1};const i=new Map(e.prompts);return i.set(t.promptId,t),{state:{...e,prompts:i},changed:!0}}function SK(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 MK(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 IK(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,i=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:i};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 EK{constructor(t){this.agentId=t}#e=oK;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let i,s=this.#e;for(const o of t){const r=rK(s,o);if(r.gap){i={target:o.target,...r.gap};continue}r.changed&&(s=r.state,n.push(o))}if(this.#e=s,n.length>0){const o={agentId:this.agentId,ops:n};for(const r of this.#t)r(o)}return{accepted:n,gap:i}}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(i=>i.kind==="turn"&&i.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,i=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((o,r)=>r.kind==="turn"?o+1:o,0);if(s>t.tailTurns){const o=s-t.tailTurns,r=[];let l=0;for(const a of n)if(a.kind==="turn"){if(l+=1,l<=o)continue;r.push(a)}else l>o&&r.push(a);n=r,i=!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:i}}}function pt(e,t,n){function i(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 u=r.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){const f=c[d];f in l||(l[f]=u[f].bind(l))}}const s=n?.Parent??Object;class o extends s{}Object.defineProperty(o,"name",{value:e});function r(l){var a;const u=n?.Parent?new o:this;i(u,l),(a=u._zod).deferred??(a.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(r,"init",{value:i}),Object.defineProperty(r,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(r,"name",{value:e}),r}class cf extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class UE extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const KE={};function Au(e){return KE}function VE(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,s])=>t.indexOf(+i)===-1).map(([i,s])=>s)}function i3(e,t){return typeof t=="bigint"?t.toString():t}function ev(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function y5(e){return e==null}function b5(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function TK(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let s=(i.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(i)){const a=i.match(/\d?e-(\d?)/);a?.[1]&&(s=Number.parseInt(a[1]))}const o=n>s?n:s,r=Number.parseInt(e.toFixed(o).replace(".","")),l=Number.parseInt(t.toFixed(o).replace(".",""));return r%l/10**o}const hA=Symbol("evaluating");function di(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==hA)return i===void 0&&(i=hA,i=n()),i},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function id(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Bu(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function pA(e){return JSON.stringify(e)}function LK(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ZE="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Uh(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const NK=ev(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ef(e){if(Uh(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Uh(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function GE(e){return Ef(e)?{...e}:Array.isArray(e)?[...e]:e}const FK=new Set(["string","number","symbol"]);function Tf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $u(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function ln(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 BK(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const $K={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 DK(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=Bu(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 id(this,"shape",r),r},checks:[]});return $u(e,o)}function zK(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=Bu(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 id(this,"shape",r),r},checks:[]});return $u(e,o)}function RK(e,t){if(!Ef(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const r in t)if(Object.getOwnPropertyDescriptor(o,r)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=Bu(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return id(this,"shape",o),o}});return $u(e,s)}function OK(e,t){if(!Ef(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Bu(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return id(this,"shape",i),i}});return $u(e,n)}function PK(e,t){const n=Bu(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return id(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return $u(e,n)}function jK(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=Bu(t._zod.def,{get shape(){const l=t._zod.def.shape,a={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(a[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)a[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return id(this,"shape",a),a},checks:[]});return $u(t,r)}function HK(e,t,n){const i=Bu(t._zod.def,{get shape(){const s=t._zod.def.shape,o={...s};if(n)for(const r in n){if(!(r in o))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(o[r]=new e({type:"nonoptional",innerType:s[r]}))}else for(const r in s)o[r]=new e({type:"nonoptional",innerType:s[r]});return id(this,"shape",o),o}});return $u(t,i)}function Vd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Zd(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function E0(e){return typeof e=="string"?e:e?.message}function Cu(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const s=E0(e.inst?._zod.def?.error?.(e))??E0(t?.error?.(e))??E0(n.customError?.(e))??E0(n.localeError?.(e))??"Invalid input";i.message=s}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function k5(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Kh(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const QE=(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,i3,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},YE=pt("$ZodError",QE),JE=pt("$ZodError",QE,{Parent:Error});function WK(e,t=n=>n.message){const n={},i=[];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))):i.push(t(s));return{formErrors:i,fieldErrors:n}}function qK(e,t=n=>n.message){const n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(r=>i({issues:r}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let r=n,l=0;for(;l<o.path.length;){const a=o.path[l];l===o.path.length-1?(r[a]=r[a]||{_errors:[]},r[a]._errors.push(t(o))):r[a]=r[a]||{_errors:[]},r=r[a],l++}}};return i(e),n}const A5=e=>(t,n,i,s)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise)throw new cf;if(r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>Cu(a,o,Au())));throw ZE(l,s?.callee),l}return r.value},C5=e=>async(t,n,i,s)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise&&(r=await r),r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>Cu(a,o,Au())));throw ZE(l,s?.callee),l}return r.value},tv=e=>(t,n,i)=>{const s=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new cf;return o.issues.length?{success:!1,error:new(e??YE)(o.issues.map(r=>Cu(r,s,Au())))}:{success:!0,data:o.value}},UK=tv(JE),nv=e=>async(t,n,i)=>{const s=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},s);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(r=>Cu(r,s,Au())))}:{success:!0,data:o.value}},KK=nv(JE),VK=e=>(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return A5(e)(t,n,s)},ZK=e=>(t,n,i)=>A5(e)(t,n,i),GK=e=>async(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return C5(e)(t,n,s)},QK=e=>async(t,n,i)=>C5(e)(t,n,i),YK=e=>(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return tv(e)(t,n,s)},JK=e=>(t,n,i)=>tv(e)(t,n,i),XK=e=>async(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return nv(e)(t,n,s)},eV=e=>async(t,n,i)=>nv(e)(t,n,i),tV=/^[cC][^\s-]{8,}$/,nV=/^[0-9a-z]+$/,iV=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,sV=/^[0-9a-vA-V]{20}$/,oV=/^[A-Za-z0-9]{27}$/,rV=/^[a-zA-Z0-9_-]{21}$/,lV=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,aV=/^([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})$/,gA=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)$/,uV=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,cV="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function dV(){return new RegExp(cV,"u")}const fV=/^(?:(?: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])$/,hV=/^(([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}|:))$/,pV=/^((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])$/,gV=/^(([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])$/,mV=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,XE=/^[A-Za-z0-9_-]*$/,vV=/^\+[1-9]\d{6,14}$/,eT="(?:(?:\\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])))",yV=new RegExp(`^${eT}$`);function tT(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 bV(e){return new RegExp(`^${tT(e)}$`)}function kV(e){const t=tT({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${eT}T(?:${i})$`)}const AV=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},CV=/^-?\d+$/,nT=/^-?\d+(?:\.\d+)?$/,wV=/^(?:true|false)$/i,xV=/^[^A-Z]*$/,_V=/^[^a-z]*$/,or=pt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),iT={number:"number",bigint:"bigint",object:"date"},sT=pt("$ZodCheckLessThan",(e,t)=>{or.init(e,t);const n=iT[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,o=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),oT=pt("$ZodCheckGreaterThan",(e,t)=>{or.init(e,t);const n=iT[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,o=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),SV=pt("$ZodCheckMultipleOf",(e,t)=>{or.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.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):TK(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})}}),MV=pt("$ZodCheckNumberFormat",(e,t)=>{or.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[s,o]=$K[t.format];e._zod.onattach.push(r=>{const l=r._zod.bag;l.format=t.format,l.minimum=s,l.maximum=o,n&&(l.pattern=CV)}),e._zod.check=r=>{const l=r.value;if(n){if(!Number.isInteger(l)){r.issues.push({expected:i,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:i,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:i,inclusive:!0,continue:!t.abort});return}}l<s&&r.issues.push({origin:"number",input:l,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),l>o&&r.issues.push({origin:"number",input:l,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),IV=pt("$ZodCheckMaxLength",(e,t)=>{var n;or.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!y5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const s=i.value;if(s.length<=t.maximum)return;const r=k5(s);i.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),EV=pt("$ZodCheckMinLength",(e,t)=>{var n;or.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!y5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const s=i.value;if(s.length>=t.minimum)return;const r=k5(s);i.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),TV=pt("$ZodCheckLengthEquals",(e,t)=>{var n;or.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!y5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=i=>{const s=i.value,o=s.length;if(o===t.length)return;const r=k5(s),l=o>t.length;i.issues.push({origin:r,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),iv=pt("$ZodCheckStringFormat",(e,t)=>{var n,i;or.init(e,t),e._zod.onattach.push(s=>{const o=s._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.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})}):(i=e._zod).check??(i.check=()=>{})}),LV=pt("$ZodCheckRegex",(e,t)=>{iv.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})}}),NV=pt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=xV),iv.init(e,t)}),FV=pt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=_V),iv.init(e,t)}),BV=pt("$ZodCheckIncludes",(e,t)=>{or.init(e,t);const n=Tf(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(s=>{const o=s._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),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})}}),$V=pt("$ZodCheckStartsWith",(e,t)=>{or.init(e,t);const n=new RegExp(`^${Tf(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),DV=pt("$ZodCheckEndsWith",(e,t)=>{or.init(e,t);const n=new RegExp(`.*${Tf(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),zV=pt("$ZodCheckOverwrite",(e,t)=>{or.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class RV{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 i=t.split(` -`).filter(r=>r),s=Math.min(...i.map(r=>r.length-r.trimStart().length)),o=i.map(r=>r.slice(s)).map(r=>" ".repeat(this.indent*2)+r);for(const r of o)this.content.push(r)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,s.join(` -`))}}const OV={major:4,minor:3,patch:6},qi=pt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=OV;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const s of i)for(const o of s._zod.onattach)o(e);if(i.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 u=Vd(r),c;for(const d of l){if(d._zod.def.when){if(!d._zod.def.when(r))continue}else if(u)continue;const f=r.issues.length,p=d._zod.check(r);if(p instanceof Promise&&a?.async===!1)throw new cf;if(c||p instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await p,r.issues.length!==f&&(u||(u=Vd(r,f)))});else{if(r.issues.length===f)continue;u||(u=Vd(r,f))}}return c?c.then(()=>r):r},o=(r,l,a)=>{if(Vd(r))return r.aborted=!0,r;const u=s(l,i,a);if(u instanceof Promise){if(a.async===!1)throw new cf;return u.then(c=>e._zod.parse(c,a))}return e._zod.parse(u,a)};e._zod.run=(r,l)=>{if(l.skipChecks)return e._zod.parse(r,l);if(l.direction==="backward"){const u=e._zod.parse({value:r.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(c=>o(c,r,l)):o(u,r,l)}const a=e._zod.parse(r,l);if(a instanceof Promise){if(l.async===!1)throw new cf;return a.then(u=>s(u,i,l))}return s(a,i,l)}}di(e,"~standard",()=>({validate:s=>{try{const o=UK(e,s);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return KK(e,s).then(r=>r.success?{value:r.data}:{issues:r.error?.issues})}},vendor:"zod",version:1}))}),w5=pt("$ZodString",(e,t)=>{qi.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??AV(e._zod.bag),e._zod.parse=(n,i)=>{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}}),Di=pt("$ZodStringFormat",(e,t)=>{iv.init(e,t),w5.init(e,t)}),PV=pt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=aV),Di.init(e,t)}),jV=pt("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=gA(i))}else t.pattern??(t.pattern=gA());Di.init(e,t)}),HV=pt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=uV),Di.init(e,t)}),WV=pt("$ZodURL",(e,t)=>{Di.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),s=new URL(i);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=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),qV=pt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=dV()),Di.init(e,t)}),UV=pt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=rV),Di.init(e,t)}),KV=pt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tV),Di.init(e,t)}),VV=pt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=nV),Di.init(e,t)}),ZV=pt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=iV),Di.init(e,t)}),GV=pt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=sV),Di.init(e,t)}),QV=pt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=oV),Di.init(e,t)}),YV=pt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=kV(t)),Di.init(e,t)}),JV=pt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=yV),Di.init(e,t)}),XV=pt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=bV(t)),Di.init(e,t)}),eZ=pt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=lV),Di.init(e,t)}),tZ=pt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=fV),Di.init(e,t),e._zod.bag.format="ipv4"}),nZ=pt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=hV),Di.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})}}}),iZ=pt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=pV),Di.init(e,t)}),sZ=pt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=gV),Di.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[s,o]=i;if(!o)throw new Error;const r=Number(o);if(`${r}`!==o)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 rT(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const oZ=pt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=mV),Di.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{rT(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function rZ(e){if(!XE.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return rT(n)}const lZ=pt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=XE),Di.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{rZ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),aZ=pt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=vV),Di.init(e,t)});function uZ(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const s=JSON.parse(atob(i));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const cZ=pt("$ZodJWT",(e,t)=>{Di.init(e,t),e._zod.check=n=>{uZ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),lT=pt("$ZodNumber",(e,t)=>{qi.init(e,t),e._zod.pattern=e._zod.bag.pattern??nT,e._zod.parse=(n,i)=>{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 o=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,...o?{received:o}:{}}),n}}),dZ=pt("$ZodNumberFormat",(e,t)=>{MV.init(e,t),lT.init(e,t)}),fZ=pt("$ZodBoolean",(e,t)=>{qi.init(e,t),e._zod.pattern=wV,e._zod.parse=(n,i)=>{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}}),hZ=pt("$ZodUnknown",(e,t)=>{qi.init(e,t),e._zod.parse=n=>n}),pZ=pt("$ZodNever",(e,t)=>{qi.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function mA(e,t,n){e.issues.length&&t.issues.push(...Zd(n,e.issues)),t.value[n]=e.value}const gZ=pt("$ZodArray",(e,t)=>{qi.init(e,t),e._zod.parse=(n,i)=>{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 o=[];for(let r=0;r<s.length;r++){const l=s[r],a=t.element._zod.run({value:l,issues:[]},i);a instanceof Promise?o.push(a.then(u=>mA(u,n,r))):mA(a,n,r)}return o.length?Promise.all(o).then(()=>n):n}});function ym(e,t,n,i,s){if(e.issues.length){if(s&&!(n in i))return;t.issues.push(...Zd(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function aT(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=BK(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function uT(e,t,n,i,s,o){const r=[],l=s.keySet,a=s.catchall._zod,u=a.def.type,c=a.optout==="optional";for(const d in t){if(l.has(d))continue;if(u==="never"){r.push(d);continue}const f=a.run({value:t[d],issues:[]},i);f instanceof Promise?e.push(f.then(p=>ym(p,n,d,t,c))):ym(f,n,d,t,c)}return r.length&&n.issues.push({code:"unrecognized_keys",keys:r,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const mZ=pt("$ZodObject",(e,t)=>{if(qi.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 i=ev(()=>aT(t));di(e._zod,"propValues",()=>{const l=t.shape,a={};for(const u in l){const c=l[u]._zod;if(c.values){a[u]??(a[u]=new Set);for(const d of c.values)a[u].add(d)}}return a});const s=Uh,o=t.catchall;let r;e._zod.parse=(l,a)=>{r??(r=i.value);const u=l.value;if(!s(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const c=[],d=r.shape;for(const f of r.keys){const p=d[f],g=p._zod.optout==="optional",m=p._zod.run({value:u[f],issues:[]},a);m instanceof Promise?c.push(m.then(y=>ym(y,l,f,u,g))):ym(m,l,f,u,g)}return o?uT(c,u,l,a,i.value,e):c.length?Promise.all(c).then(()=>l):l}}),vZ=pt("$ZodObjectJIT",(e,t)=>{mZ.init(e,t);const n=e._zod.parse,i=ev(()=>aT(t)),s=f=>{const p=new RV(["shape","payload","ctx"]),g=i.value,m=A=>{const v=pA(A);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};p.write("const input = payload.value;");const y=Object.create(null);let w=0;for(const A of g.keys)y[A]=`key_${w++}`;p.write("const newResult = {};");for(const A of g.keys){const v=y[A],x=pA(A),I=f[A]?._zod?.optout==="optional";p.write(`const ${v} = ${m(A)};`),I?p.write(` - if (${v}.issues.length) { - if (${x} in input) { - payload.issues = payload.issues.concat(${v}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${x}, ...iss.path] : [${x}] - }))); - } - } - - if (${v}.value === undefined) { - if (${x} in input) { - newResult[${x}] = undefined; - } - } else { - newResult[${x}] = ${v}.value; - } - - `):p.write(` - if (${v}.issues.length) { - payload.issues = payload.issues.concat(${v}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${x}, ...iss.path] : [${x}] - }))); - } - - if (${v}.value === undefined) { - if (${x} in input) { - newResult[${x}] = undefined; - } - } else { - newResult[${x}] = ${v}.value; - } - - `)}p.write("payload.value = newResult;"),p.write("return payload;");const k=p.compile();return(A,v)=>k(f,A,v)};let o;const r=Uh,l=!KE.jitless,u=l&&NK.value,c=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=i.value);const g=f.value;return r(g)?l&&u&&p?.async===!1&&p.jitless!==!0?(o||(o=s(t.shape)),f=o(f,p),c?uT([],g,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function vA(e,t,n,i){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const s=e.filter(o=>!Vd(o));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(o=>o.issues.map(r=>Cu(r,i,Au())))}),t)}const cT=pt("$ZodUnion",(e,t)=>{qi.init(e,t),di(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),di(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),di(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),di(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${s.map(o=>b5(o.source)).join("|")})$`)}});const n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(s,o)=>{if(n)return i(s,o);let r=!1;const l=[];for(const a of t.options){const u=a._zod.run({value:s.value,issues:[]},o);if(u instanceof Promise)l.push(u),r=!0;else{if(u.issues.length===0)return u;l.push(u)}}return r?Promise.all(l).then(a=>vA(a,s,e,o)):vA(l,s,e,o)}}),yZ=pt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,cT.init(e,t);const n=e._zod.parse;di(e._zod,"propValues",()=>{const s={};for(const o of t.options){const r=o._zod.propValues;if(!r||Object.keys(r).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[l,a]of Object.entries(r)){s[l]||(s[l]=new Set);for(const u of a)s[l].add(u)}}return s});const i=ev(()=>{const s=t.options,o=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(o.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);o.set(a,r)}}return o});e._zod.parse=(s,o)=>{const r=s.value;if(!Uh(r))return s.issues.push({code:"invalid_type",expected:"object",input:r,inst:e}),s;const l=i.value.get(r?.[t.discriminator]);return l?l._zod.run(s,o):t.unionFallback?n(s,o):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:r,path:[t.discriminator],inst:e}),s)}}),bZ=pt("$ZodIntersection",(e,t)=>{qi.init(e,t),e._zod.parse=(n,i)=>{const s=n.value,o=t.left._zod.run({value:s,issues:[]},i),r=t.right._zod.run({value:s,issues:[]},i);return o instanceof Promise||r instanceof Promise?Promise.all([o,r]).then(([a,u])=>yA(n,a,u)):yA(n,o,r)}});function s3(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(Ef(e)&&Ef(t)){const n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),s={...e,...t};for(const o of i){const r=s3(e[o],t[o]);if(!r.valid)return{valid:!1,mergeErrorPath:[o,...r.mergeErrorPath]};s[o]=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 i=0;i<e.length;i++){const s=e[i],o=t[i],r=s3(s,o);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function yA(e,t,n){const i=new Map;let s;for(const l of t.issues)if(l.code==="unrecognized_keys"){s??(s=l);for(const a of l.keys)i.has(a)||i.set(a,{}),i.get(a).l=!0}else e.issues.push(l);for(const l of n.issues)if(l.code==="unrecognized_keys")for(const a of l.keys)i.has(a)||i.set(a,{}),i.get(a).r=!0;else e.issues.push(l);const o=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(o.length&&s&&e.issues.push({...s,keys:o}),Vd(e))return e;const r=s3(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 kZ=pt("$ZodRecord",(e,t)=>{qi.init(e,t),e._zod.parse=(n,i)=>{const s=n.value;if(!Ef(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const o=[],r=t.keyType._zod.values;if(r){n.value={};const l=new Set;for(const u of r)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){l.add(typeof u=="number"?u.toString():u);const c=t.valueType._zod.run({value:s[u],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&n.issues.push(...Zd(u,d.issues)),n.value[u]=d.value})):(c.issues.length&&n.issues.push(...Zd(u,c.issues)),n.value[u]=c.value)}let a;for(const u in s)l.has(u)||(a=a??[],a.push(u));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:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&nT.test(l)&&a.issues.length){const d=t.keyType._zod.run({value:Number(l),issues:[]},i);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=>Cu(d,i,Au())),input:l,path:[l],inst:e});continue}const c=t.valueType._zod.run({value:s[l],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&n.issues.push(...Zd(l,d.issues)),n.value[a.value]=d.value})):(c.issues.length&&n.issues.push(...Zd(l,c.issues)),n.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),AZ=pt("$ZodEnum",(e,t)=>{qi.init(e,t);const n=VE(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(s=>FK.has(typeof s)).map(s=>typeof s=="string"?Tf(s):s.toString()).join("|")})$`),e._zod.parse=(s,o)=>{const r=s.value;return i.has(r)||s.issues.push({code:"invalid_value",values:n,input:r,inst:e}),s}}),CZ=pt("$ZodLiteral",(e,t)=>{if(qi.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(i=>typeof i=="string"?Tf(i):i?Tf(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,s)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),wZ=pt("$ZodTransform",(e,t)=>{qi.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new UE(e.constructor.name);const s=t.transform(n.value,n);if(i.async)return(s instanceof Promise?s:Promise.resolve(s)).then(r=>(n.value=r,n));if(s instanceof Promise)throw new cf;return n.value=s,n}});function bA(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const dT=pt("$ZodOptional",(e,t)=>{qi.init(e,t),e._zod.optin="optional",e._zod.optout="optional",di(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),di(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${b5(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>bA(o,n.value)):bA(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),xZ=pt("$ZodExactOptional",(e,t)=>{dT.init(e,t),di(e._zod,"values",()=>t.innerType._zod.values),di(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),_Z=pt("$ZodNullable",(e,t)=>{qi.init(e,t),di(e._zod,"optin",()=>t.innerType._zod.optin),di(e._zod,"optout",()=>t.innerType._zod.optout),di(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${b5(n.source)}|null)$`):void 0}),di(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),SZ=pt("$ZodDefault",(e,t)=>{qi.init(e,t),e._zod.optin="optional",di(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>kA(o,t)):kA(s,t)}});function kA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const MZ=pt("$ZodPrefault",(e,t)=>{qi.init(e,t),e._zod.optin="optional",di(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),IZ=pt("$ZodNonOptional",(e,t)=>{qi.init(e,t),di(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>AA(o,e)):AA(s,e)}});function AA(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 EZ=pt("$ZodCatch",(e,t)=>{qi.init(e,t),di(e._zod,"optin",()=>t.innerType._zod.optin),di(e._zod,"optout",()=>t.innerType._zod.optout),di(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(r=>Cu(r,i,Au()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(o=>Cu(o,i,Au()))},input:n.value}),n.issues=[]),n)}}),TZ=pt("$ZodPipe",(e,t)=>{qi.init(e,t),di(e._zod,"values",()=>t.in._zod.values),di(e._zod,"optin",()=>t.in._zod.optin),di(e._zod,"optout",()=>t.out._zod.optout),di(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(n,i);return o instanceof Promise?o.then(r=>T0(r,t.in,i)):T0(o,t.in,i)}const s=t.in._zod.run(n,i);return s instanceof Promise?s.then(o=>T0(o,t.out,i)):T0(s,t.out,i)}});function T0(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const LZ=pt("$ZodReadonly",(e,t)=>{qi.init(e,t),di(e._zod,"propValues",()=>t.innerType._zod.propValues),di(e._zod,"values",()=>t.innerType._zod.values),di(e._zod,"optin",()=>t.innerType?._zod?.optin),di(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(CA):CA(s)}});function CA(e){return e.value=Object.freeze(e.value),e}const NZ=pt("$ZodCustom",(e,t)=>{or.init(e,t),qi.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,s=t.fn(i);if(s instanceof Promise)return s.then(o=>wA(o,n,i,e));wA(s,n,i,e)}});function wA(e,t,n,i){if(!e){const s={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),t.issues.push(Kh(s))}}var xA;class FZ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.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 i={...this.get(n)??{}};delete i.id;const s={...i,...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 BZ(){return new FZ}(xA=globalThis).__zod_globalRegistry??(xA.__zod_globalRegistry=BZ());const j1=globalThis.__zod_globalRegistry;function $Z(e,t){return new e({type:"string",...ln(t)})}function DZ(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ln(t)})}function _A(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ln(t)})}function zZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ln(t)})}function RZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ln(t)})}function OZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ln(t)})}function PZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ln(t)})}function jZ(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ln(t)})}function HZ(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ln(t)})}function WZ(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ln(t)})}function qZ(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ln(t)})}function UZ(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ln(t)})}function KZ(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ln(t)})}function VZ(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ln(t)})}function ZZ(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ln(t)})}function GZ(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ln(t)})}function QZ(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ln(t)})}function YZ(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ln(t)})}function JZ(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ln(t)})}function XZ(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ln(t)})}function eG(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ln(t)})}function tG(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ln(t)})}function nG(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ln(t)})}function iG(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ln(t)})}function sG(e,t){return new e({type:"string",format:"date",check:"string_format",...ln(t)})}function oG(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ln(t)})}function rG(e,t){return new e({type:"string",format:"duration",check:"string_format",...ln(t)})}function lG(e,t){return new e({type:"number",checks:[],...ln(t)})}function aG(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ln(t)})}function uG(e,t){return new e({type:"boolean",...ln(t)})}function cG(e){return new e({type:"unknown"})}function dG(e,t){return new e({type:"never",...ln(t)})}function SA(e,t){return new sT({check:"less_than",...ln(t),value:e,inclusive:!1})}function Z9(e,t){return new sT({check:"less_than",...ln(t),value:e,inclusive:!0})}function MA(e,t){return new oT({check:"greater_than",...ln(t),value:e,inclusive:!1})}function G9(e,t){return new oT({check:"greater_than",...ln(t),value:e,inclusive:!0})}function IA(e,t){return new SV({check:"multiple_of",...ln(t),value:e})}function fT(e,t){return new IV({check:"max_length",...ln(t),maximum:e})}function bm(e,t){return new EV({check:"min_length",...ln(t),minimum:e})}function hT(e,t){return new TV({check:"length_equals",...ln(t),length:e})}function fG(e,t){return new LV({check:"string_format",format:"regex",...ln(t),pattern:e})}function hG(e){return new NV({check:"string_format",format:"lowercase",...ln(e)})}function pG(e){return new FV({check:"string_format",format:"uppercase",...ln(e)})}function gG(e,t){return new BV({check:"string_format",format:"includes",...ln(t),includes:e})}function mG(e,t){return new $V({check:"string_format",format:"starts_with",...ln(t),prefix:e})}function vG(e,t){return new DV({check:"string_format",format:"ends_with",...ln(t),suffix:e})}function jf(e){return new zV({check:"overwrite",tx:e})}function yG(e){return jf(t=>t.normalize(e))}function bG(){return jf(e=>e.trim())}function kG(){return jf(e=>e.toLowerCase())}function AG(){return jf(e=>e.toUpperCase())}function CG(){return jf(e=>LK(e))}function wG(e,t,n){return new e({type:"array",element:t,...ln(n)})}function xG(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ln(n)})}function _G(e){const t=SG(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Kh(i,n.value,t._zod.def));else{const s=i;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(Kh(s))}},e(n.value,n)));return t}function SG(e,t){const n=new or({check:"custom",...ln(t)});return n._zod.check=e,n}function pT(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??j1,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 vs(e,t,n={path:[],schemaPath:[]}){var i;const s=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.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 c={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,r.schema,c);else{const f=r.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,f,c)}const d=e._zod.parent;d&&(r.ref||(r.ref=d),vs(d,t,c),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(r.schema,a),t.io==="input"&&So(e)&&(delete r.schema.examples,delete r.schema.default),t.io==="input"&&r.schema._prefault&&((i=r.schema).default??(i.default=r.schema._prefault)),delete r.schema._prefault,t.seen.get(e).schema}function gT(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const r of e.seen.entries()){const l=e.metadataRegistry.get(r[0])?.id;if(l){const a=i.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.`);i.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??(g=>g);if(d)return{ref:f(d)};const p=r[1].defId??r[1].schema.id??`schema${e.counter++}`;return r[1].defId=p,{defId:p,ref:`${f("__shared")}#/${l}/${p}`}}if(r[1]===n)return{ref:"#"};const u=`#/${l}/`,c=r[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:u+c}},o=r=>{if(r[1].schema.$ref)return;const l=r[1],{ref:a,defId:u}=s(r);l.def={...l.schema},u&&(l.defId=u);const c=l.schema;for(const d in c)delete c[d];c.$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("/")}/<root> - -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]){o(r);continue}if(e.external){const u=e.external.registry.get(r[0])?.id;if(t!==r[0]&&u){o(r);continue}}if(e.metadataRegistry.get(r[0])?.id){o(r);continue}if(l.cycle){o(r);continue}if(l.count>1&&e.reused==="ref"){o(r);continue}}}function mT(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=r=>{const l=e.seen.get(r);if(l.ref===null)return;const a=l.def??l.schema,u={...a},c=l.ref;if(l.ref=null,c){i(c);const f=e.seen.get(c),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(p)):Object.assign(a,p),Object.assign(a,u),r._zod.parent===c)for(const m in a)m==="$ref"||m==="allOf"||m in u||delete a[m];if(p.$ref&&f.def)for(const m in a)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(a[m])===JSON.stringify(f.def[m])&&delete a[m]}const d=r._zod.parent;if(d&&d!==c){i(d);const f=e.seen.get(d);if(f?.schema.$ref&&(a.$ref=f.schema.$ref,f.def))for(const p in a)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(a[p])===JSON.stringify(f.def[p])&&delete a[p]}e.override({zodSchema:r,jsonSchema:a,path:l.path??[]})};for(const r of[...e.seen.entries()].reverse())i(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 o=e.external?.defs??{};for(const r of e.seen.entries()){const l=r[1];l.def&&l.defId&&(o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?s.$defs=o:s.definitions=o);try{const r=JSON.parse(JSON.stringify(s));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:km(t,"input",e.processors),output:km(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch{throw new Error("Error converting schema to JSON.")}}function So(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return So(i.element,n);if(i.type==="set")return So(i.valueType,n);if(i.type==="lazy")return So(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return So(i.innerType,n);if(i.type==="intersection")return So(i.left,n)||So(i.right,n);if(i.type==="record"||i.type==="map")return So(i.keyType,n)||So(i.valueType,n);if(i.type==="pipe")return So(i.in,n)||So(i.out,n);if(i.type==="object"){for(const s in i.shape)if(So(i.shape[s],n))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(So(s,n))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(So(s,n))return!0;return!!(i.rest&&So(i.rest,n))}return!1}const MG=(e,t={})=>n=>{const i=pT({...n,processors:t});return vs(e,i),gT(i,e),mT(i,e)},km=(e,t,n={})=>i=>{const{libraryOptions:s,target:o}=i??{},r=pT({...s??{},target:o,io:t,processors:n});return vs(e,r),gT(r,e),mT(r,e)},IG={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},EG=(e,t,n,i)=>{const s=n;s.type="string";const{minimum:o,maximum:r,format:l,patterns:a,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(s.minLength=o),typeof r=="number"&&(s.maxLength=r),l&&(s.format=IG[l]??l,s.format===""&&delete s.format,l==="time"&&delete s.format),u&&(s.contentEncoding=u),a&&a.size>0){const c=[...a];c.length===1?s.pattern=c[0].source:c.length>1&&(s.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},TG=(e,t,n,i)=>{const s=n,{minimum:o,maximum:r,format:l,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof l=="string"&&l.includes("int")?s.type="integer":s.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=c,s.exclusiveMinimum=!0):s.exclusiveMinimum=c),typeof o=="number"&&(s.minimum=o,typeof c=="number"&&t.target!=="draft-04"&&(c>=o?delete s.minimum:delete s.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u),typeof r=="number"&&(s.maximum=r,typeof u=="number"&&t.target!=="draft-04"&&(u<=r?delete s.maximum:delete s.exclusiveMaximum)),typeof a=="number"&&(s.multipleOf=a)},LG=(e,t,n,i)=>{n.type="boolean"},NG=(e,t,n,i)=>{n.not={}},FG=(e,t,n,i)=>{},BG=(e,t,n,i)=>{const s=e._zod.def,o=VE(s.entries);o.every(r=>typeof r=="number")&&(n.type="number"),o.every(r=>typeof r=="string")&&(n.type="string"),n.enum=o},$G=(e,t,n,i)=>{const s=e._zod.def,o=[];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");o.push(Number(r))}else o.push(r);if(o.length!==0)if(o.length===1){const r=o[0];n.type=r===null?"null":typeof r,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[r]:n.const=r}else o.every(r=>typeof r=="number")&&(n.type="number"),o.every(r=>typeof r=="string")&&(n.type="string"),o.every(r=>typeof r=="boolean")&&(n.type="boolean"),o.every(r=>r===null)&&(n.type="null"),n.enum=o},DG=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},zG=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},RG=(e,t,n,i)=>{const s=n,o=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=vs(o.element,t,{...i,path:[...i.path,"items"]})},OG=(e,t,n,i)=>{const s=n,o=e._zod.def;s.type="object",s.properties={};const r=o.shape;for(const u in r)s.properties[u]=vs(r[u],t,{...i,path:[...i.path,"properties",u]});const l=new Set(Object.keys(r)),a=new Set([...l].filter(u=>{const c=o.shape[u]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));a.size>0&&(s.required=Array.from(a)),o.catchall?._zod.def.type==="never"?s.additionalProperties=!1:o.catchall?o.catchall&&(s.additionalProperties=vs(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},PG=(e,t,n,i)=>{const s=e._zod.def,o=s.inclusive===!1,r=s.options.map((l,a)=>vs(l,t,{...i,path:[...i.path,o?"oneOf":"anyOf",a]}));o?n.oneOf=r:n.anyOf=r},jG=(e,t,n,i)=>{const s=e._zod.def,o=vs(s.left,t,{...i,path:[...i.path,"allOf",0]}),r=vs(s.right,t,{...i,path:[...i.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,a=[...l(o)?o.allOf:[o],...l(r)?r.allOf:[r]];n.allOf=a},HG=(e,t,n,i)=>{const s=n,o=e._zod.def;s.type="object";const r=o.keyType,a=r._zod.bag?.patterns;if(o.mode==="loose"&&a&&a.size>0){const c=vs(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=vs(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),s.additionalProperties=vs(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const u=r._zod.values;if(u){const c=[...u].filter(d=>typeof d=="string"||typeof d=="number");c.length>0&&(s.required=c)}},WG=(e,t,n,i)=>{const s=e._zod.def,o=vs(s.innerType,t,i),r=t.seen.get(e);t.target==="openapi-3.0"?(r.ref=s.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},qG=(e,t,n,i)=>{const s=e._zod.def;vs(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType},UG=(e,t,n,i)=>{const s=e._zod.def;vs(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},KG=(e,t,n,i)=>{const s=e._zod.def;vs(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},VG=(e,t,n,i)=>{const s=e._zod.def;vs(s.innerType,t,i);const o=t.seen.get(e);o.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},ZG=(e,t,n,i)=>{const s=e._zod.def,o=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;vs(o,t,i);const r=t.seen.get(e);r.ref=o},GG=(e,t,n,i)=>{const s=e._zod.def;vs(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,n.readOnly=!0},vT=(e,t,n,i)=>{const s=e._zod.def;vs(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType},QG=pt("ZodISODateTime",(e,t)=>{YV.init(e,t),Ki.init(e,t)});function YG(e){return iG(QG,e)}const JG=pt("ZodISODate",(e,t)=>{JV.init(e,t),Ki.init(e,t)});function XG(e){return sG(JG,e)}const eQ=pt("ZodISOTime",(e,t)=>{XV.init(e,t),Ki.init(e,t)});function tQ(e){return oG(eQ,e)}const nQ=pt("ZodISODuration",(e,t)=>{eZ.init(e,t),Ki.init(e,t)});function iQ(e){return rG(nQ,e)}const sQ=(e,t)=>{YE.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>qK(e,n)},flatten:{value:n=>WK(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,i3,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,i3,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ur=pt("ZodError",sQ,{Parent:Error}),oQ=A5(Ur),rQ=C5(Ur),lQ=tv(Ur),aQ=nv(Ur),uQ=VK(Ur),cQ=ZK(Ur),dQ=GK(Ur),fQ=QK(Ur),hQ=YK(Ur),pQ=JK(Ur),gQ=XK(Ur),mQ=eV(Ur),Ui=pt("ZodType",(e,t)=>(qi.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:km(e,"input"),output:km(e,"output")}}),e.toJSONSchema=MG(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Bu(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>$u(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>oQ(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>lQ(e,n,i),e.parseAsync=async(n,i)=>rQ(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>aQ(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>uQ(e,n,i),e.decode=(n,i)=>cQ(e,n,i),e.encodeAsync=async(n,i)=>dQ(e,n,i),e.decodeAsync=async(n,i)=>fQ(e,n,i),e.safeEncode=(n,i)=>hQ(e,n,i),e.safeDecode=(n,i)=>pQ(e,n,i),e.safeEncodeAsync=async(n,i)=>gQ(e,n,i),e.safeDecodeAsync=async(n,i)=>mQ(e,n,i),e.refine=(n,i)=>e.check(cY(n,i)),e.superRefine=n=>e.check(dY(n)),e.overwrite=n=>e.check(jf(n)),e.optional=()=>LA(e),e.exactOptional=()=>YQ(e),e.nullable=()=>NA(e),e.nullish=()=>LA(NA(e)),e.nonoptional=n=>iY(e,n),e.array=()=>Xn(e),e.or=n=>HQ([e,n]),e.and=n=>UQ(e,n),e.transform=n=>FA(e,GQ(n)),e.default=n=>eY(e,n),e.prefault=n=>nY(e,n),e.catch=n=>oY(e,n),e.pipe=n=>FA(e,n),e.readonly=()=>aY(e),e.describe=n=>{const i=e.clone();return j1.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return j1.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return j1.get(e);const i=e.clone();return j1.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),yT=pt("_ZodString",(e,t)=>{w5.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(i,s,o)=>EG(e,i,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(fG(...i)),e.includes=(...i)=>e.check(gG(...i)),e.startsWith=(...i)=>e.check(mG(...i)),e.endsWith=(...i)=>e.check(vG(...i)),e.min=(...i)=>e.check(bm(...i)),e.max=(...i)=>e.check(fT(...i)),e.length=(...i)=>e.check(hT(...i)),e.nonempty=(...i)=>e.check(bm(1,...i)),e.lowercase=i=>e.check(hG(i)),e.uppercase=i=>e.check(pG(i)),e.trim=()=>e.check(bG()),e.normalize=(...i)=>e.check(yG(...i)),e.toLowerCase=()=>e.check(kG()),e.toUpperCase=()=>e.check(AG()),e.slugify=()=>e.check(CG())}),vQ=pt("ZodString",(e,t)=>{w5.init(e,t),yT.init(e,t),e.email=n=>e.check(DZ(yQ,n)),e.url=n=>e.check(jZ(bQ,n)),e.jwt=n=>e.check(nG(BQ,n)),e.emoji=n=>e.check(HZ(kQ,n)),e.guid=n=>e.check(_A(EA,n)),e.uuid=n=>e.check(zZ(L0,n)),e.uuidv4=n=>e.check(RZ(L0,n)),e.uuidv6=n=>e.check(OZ(L0,n)),e.uuidv7=n=>e.check(PZ(L0,n)),e.nanoid=n=>e.check(WZ(AQ,n)),e.guid=n=>e.check(_A(EA,n)),e.cuid=n=>e.check(qZ(CQ,n)),e.cuid2=n=>e.check(UZ(wQ,n)),e.ulid=n=>e.check(KZ(xQ,n)),e.base64=n=>e.check(XZ(LQ,n)),e.base64url=n=>e.check(eG(NQ,n)),e.xid=n=>e.check(VZ(_Q,n)),e.ksuid=n=>e.check(ZZ(SQ,n)),e.ipv4=n=>e.check(GZ(MQ,n)),e.ipv6=n=>e.check(QZ(IQ,n)),e.cidrv4=n=>e.check(YZ(EQ,n)),e.cidrv6=n=>e.check(JZ(TQ,n)),e.e164=n=>e.check(tG(FQ,n)),e.datetime=n=>e.check(YG(n)),e.date=n=>e.check(XG(n)),e.time=n=>e.check(tQ(n)),e.duration=n=>e.check(iQ(n))});function _t(e){return $Z(vQ,e)}const Ki=pt("ZodStringFormat",(e,t)=>{Di.init(e,t),yT.init(e,t)}),yQ=pt("ZodEmail",(e,t)=>{HV.init(e,t),Ki.init(e,t)}),EA=pt("ZodGUID",(e,t)=>{PV.init(e,t),Ki.init(e,t)}),L0=pt("ZodUUID",(e,t)=>{jV.init(e,t),Ki.init(e,t)}),bQ=pt("ZodURL",(e,t)=>{WV.init(e,t),Ki.init(e,t)}),kQ=pt("ZodEmoji",(e,t)=>{qV.init(e,t),Ki.init(e,t)}),AQ=pt("ZodNanoID",(e,t)=>{UV.init(e,t),Ki.init(e,t)}),CQ=pt("ZodCUID",(e,t)=>{KV.init(e,t),Ki.init(e,t)}),wQ=pt("ZodCUID2",(e,t)=>{VV.init(e,t),Ki.init(e,t)}),xQ=pt("ZodULID",(e,t)=>{ZV.init(e,t),Ki.init(e,t)}),_Q=pt("ZodXID",(e,t)=>{GV.init(e,t),Ki.init(e,t)}),SQ=pt("ZodKSUID",(e,t)=>{QV.init(e,t),Ki.init(e,t)}),MQ=pt("ZodIPv4",(e,t)=>{tZ.init(e,t),Ki.init(e,t)}),IQ=pt("ZodIPv6",(e,t)=>{nZ.init(e,t),Ki.init(e,t)}),EQ=pt("ZodCIDRv4",(e,t)=>{iZ.init(e,t),Ki.init(e,t)}),TQ=pt("ZodCIDRv6",(e,t)=>{sZ.init(e,t),Ki.init(e,t)}),LQ=pt("ZodBase64",(e,t)=>{oZ.init(e,t),Ki.init(e,t)}),NQ=pt("ZodBase64URL",(e,t)=>{lZ.init(e,t),Ki.init(e,t)}),FQ=pt("ZodE164",(e,t)=>{aZ.init(e,t),Ki.init(e,t)}),BQ=pt("ZodJWT",(e,t)=>{cZ.init(e,t),Ki.init(e,t)}),bT=pt("ZodNumber",(e,t)=>{lT.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(i,s,o)=>TG(e,i,s),e.gt=(i,s)=>e.check(MA(i,s)),e.gte=(i,s)=>e.check(G9(i,s)),e.min=(i,s)=>e.check(G9(i,s)),e.lt=(i,s)=>e.check(SA(i,s)),e.lte=(i,s)=>e.check(Z9(i,s)),e.max=(i,s)=>e.check(Z9(i,s)),e.int=i=>e.check(TA(i)),e.safe=i=>e.check(TA(i)),e.positive=i=>e.check(MA(0,i)),e.nonnegative=i=>e.check(G9(0,i)),e.negative=i=>e.check(SA(0,i)),e.nonpositive=i=>e.check(Z9(0,i)),e.multipleOf=(i,s)=>e.check(IA(i,s)),e.step=(i,s)=>e.check(IA(i,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 Jt(e){return lG(bT,e)}const $Q=pt("ZodNumberFormat",(e,t)=>{dZ.init(e,t),bT.init(e,t)});function TA(e){return aG($Q,e)}const DQ=pt("ZodBoolean",(e,t)=>{fZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>LG(e,n,i)});function vp(e){return uG(DQ,e)}const zQ=pt("ZodUnknown",(e,t)=>{hZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>FG()});function Ms(){return cG(zQ)}const RQ=pt("ZodNever",(e,t)=>{pZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>NG(e,n,i)});function OQ(e){return dG(RQ,e)}const PQ=pt("ZodArray",(e,t)=>{gZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>RG(e,n,i,s),e.element=t.element,e.min=(n,i)=>e.check(bm(n,i)),e.nonempty=n=>e.check(bm(1,n)),e.max=(n,i)=>e.check(fT(n,i)),e.length=(n,i)=>e.check(hT(n,i)),e.unwrap=()=>e.element});function Xn(e,t){return wG(PQ,e,t)}const jQ=pt("ZodObject",(e,t)=>{vZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>OG(e,n,i,s),di(e,"shape",()=>t.shape),e.keyof=()=>$i(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ms()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ms()}),e.strict=()=>e.clone({...e._zod.def,catchall:OQ()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>RK(e,n),e.safeExtend=n=>OK(e,n),e.merge=n=>PK(e,n),e.pick=n=>DK(e,n),e.omit=n=>zK(e,n),e.partial=(...n)=>jK(AT,e,n[0]),e.required=(...n)=>HK(CT,e,n[0])});function Dt(e,t){const n={type:"object",shape:e??{},...ln(t)};return new jQ(n)}const kT=pt("ZodUnion",(e,t)=>{cT.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>PG(e,n,i,s),e.options=t.options});function HQ(e,t){return new kT({type:"union",options:e,...ln(t)})}const WQ=pt("ZodDiscriminatedUnion",(e,t)=>{kT.init(e,t),yZ.init(e,t)});function Du(e,t,n){return new WQ({type:"union",options:t,discriminator:e,...ln(n)})}const qQ=pt("ZodIntersection",(e,t)=>{bZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>jG(e,n,i,s)});function UQ(e,t){return new qQ({type:"intersection",left:e,right:t})}const KQ=pt("ZodRecord",(e,t)=>{kZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>HG(e,n,i,s),e.keyType=t.keyType,e.valueType=t.valueType});function x5(e,t,n){return new KQ({type:"record",keyType:e,valueType:t,...ln(n)})}const o3=pt("ZodEnum",(e,t)=>{AZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(i,s,o)=>BG(e,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,s)=>{const o={};for(const r of i)if(n.has(r))o[r]=t.entries[r];else throw new Error(`Key ${r} not found in enum`);return new o3({...t,checks:[],...ln(s),entries:o})},e.exclude=(i,s)=>{const o={...t.entries};for(const r of i)if(n.has(r))delete o[r];else throw new Error(`Key ${r} not found in enum`);return new o3({...t,checks:[],...ln(s),entries:o})}});function $i(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new o3({type:"enum",entries:n,...ln(t)})}const VQ=pt("ZodLiteral",(e,t)=>{CZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>$G(e,n,i),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 xn(e,t){return new VQ({type:"literal",values:Array.isArray(e)?e:[e],...ln(t)})}const ZQ=pt("ZodTransform",(e,t)=>{wZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>zG(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new UE(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(Kh(o,n.value,t));else{const r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(Kh(r))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(o=>(n.value=o,n)):(n.value=s,n)}});function GQ(e){return new ZQ({type:"transform",transform:e})}const AT=pt("ZodOptional",(e,t)=>{dT.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>vT(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function LA(e){return new AT({type:"optional",innerType:e})}const QQ=pt("ZodExactOptional",(e,t)=>{xZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>vT(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function YQ(e){return new QQ({type:"optional",innerType:e})}const JQ=pt("ZodNullable",(e,t)=>{_Z.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>WG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function NA(e){return new JQ({type:"nullable",innerType:e})}const XQ=pt("ZodDefault",(e,t)=>{SZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>UG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function eY(e,t){return new XQ({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():GE(t)}})}const tY=pt("ZodPrefault",(e,t)=>{MZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>KG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function nY(e,t){return new tY({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():GE(t)}})}const CT=pt("ZodNonOptional",(e,t)=>{IZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>qG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function iY(e,t){return new CT({type:"nonoptional",innerType:e,...ln(t)})}const sY=pt("ZodCatch",(e,t)=>{EZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>VG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function oY(e,t){return new sY({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const rY=pt("ZodPipe",(e,t)=>{TZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>ZG(e,n,i,s),e.in=t.in,e.out=t.out});function FA(e,t){return new rY({type:"pipe",in:e,out:t})}const lY=pt("ZodReadonly",(e,t)=>{LZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>GG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function aY(e){return new lY({type:"readonly",innerType:e})}const uY=pt("ZodCustom",(e,t)=>{NZ.init(e,t),Ui.init(e,t),e._zod.processJSONSchema=(n,i,s)=>DG(e,n)});function cY(e,t={}){return xG(uY,e,t)}function dY(e){return _G(e)}const Uc=_t().min(1),_5=_t().min(1),yp=_t().min(1),Kc=_t().min(1),wr=_t().min(1),fY=/^[A-Za-z0-9._-]{1,128}$/;function hY(e){return fY.test(e)&&e!=="."&&e!==".."}const wT=Du("kind",[Dt({kind:xn("user"),payload:Ms().optional()}),Dt({kind:xn("cron"),taskId:Kc.optional(),payload:Ms().optional()}),Dt({kind:xn("task"),taskId:Kc,payload:Ms().optional()}),Dt({kind:xn("hook"),payload:Ms().optional()}),Dt({kind:xn("compaction"),payload:Ms().optional()}),Dt({kind:xn("side"),payload:Ms().optional()}),Dt({kind:xn("other"),payload:Ms().optional()})]),pY=Dt({inputTokens:Jt().optional(),outputTokens:Jt().optional(),cachedTokens:Jt().optional(),cost:Jt().optional()}),uh=Dt({inputOther:Jt(),output:Jt(),inputCacheRead:Jt(),inputCacheCreation:Jt()}),gY=Dt({llmFirstTokenLatencyMs:Jt().optional(),llmStreamDurationMs:Jt().optional(),llmRequestBuildMs:Jt().optional(),llmServerFirstTokenMs:Jt().optional(),llmServerDecodeMs:Jt().optional(),llmClientConsumeMs:Jt().optional()}),mY=Dt({failedAttempt:Jt(),nextAttempt:Jt(),maxAttempts:Jt(),delayMs:Jt(),errorName:_t(),errorMessage:_t(),statusCode:Jt().optional()}),xT=$i(["queued","running","completed","failed","cancelled"]),vY=$i(["running","completed","interrupted","failed"]),yY=Dt({kind:xn("text"),frameId:yp,role:$i(["assistant","user"]),text:_t(),attachmentIds:Xn(_t()).optional(),taskId:Kc.optional()}),bY=Dt({kind:xn("thinking"),frameId:yp,text:_t()}),kY=Dt({agentId:wr,role:$i(["child","member"]).optional()}),AY=Dt({kind:$i(["stdout","stderr","progress","status","custom"]),text:_t().optional(),percent:Jt().optional(),customKind:_t().optional(),customData:Ms().optional()}),CY=Dt({kind:xn("tool"),frameId:yp,toolCallId:_t(),name:_t(),view:_t().optional(),state:$i(["running","done","error"]),input:Ms().optional(),output:Ms().optional(),display:Ms().optional(),error:_t().optional(),inputText:_t().optional(),progress:AY.optional(),taskId:Kc.optional(),approvalId:_t().optional(),todoId:_t().optional(),agentRefs:Xn(kY).optional()}),S5=Dt({interactionId:_t(),interactionKind:$i(["approval","question"]),toolCallId:_t().optional(),state:$i(["pending","approved","rejected","cancelled","answered","dismissed"]),request:Ms().optional(),response:Ms().optional()}),wY=Dt({kind:xn("notice"),frameId:yp,level:$i(["error","warning","info"]),source:_t().optional(),message:_t(),detail:Ms().optional()}),_T=Du("kind",[yY,bY,CY,wY]),ST=Dt({kind:xn("step"),stepId:_5,turnId:Uc,ordinal:Jt().int(),state:vY,frames:Xn(_T),startedAt:_t().optional(),endedAt:_t().optional(),usage:uh.optional(),finishReason:_t().optional(),timing:gY.optional(),retry:mY.optional(),endReason:_t().optional(),endMessage:_t().optional()}),MT=Dt({kind:xn("turn"),turnId:Uc,ordinal:Jt().int(),state:xT,origin:wT,prompt:_t().optional(),attachmentIds:Xn(_t()).optional(),steps:Xn(ST),startedAt:_t().optional(),endedAt:_t().optional(),usage:pY.optional(),durationMs:Jt().optional(),error:_t().optional()}),IT=Dt({kind:xn("marker"),markerId:_t(),marker:_t(),payload:Ms().optional(),at:_t().optional()}),ET=Dt({kind:xn("taskref"),refId:_t(),taskId:Kc,at:_t().optional()}),TT=Du("kind",[MT,IT,ET]),M5=Dt({taskId:Kc,kind:$i(["shell","subagent","tool","other"]),state:$i(["running","completed","failed","timed_out","killed","lost"]),detached:vp(),description:_t().optional(),agentId:wr.optional(),outputTail:_t(),startedAt:_t().optional(),endedAt:_t().optional(),resultSummary:_t().optional(),error:_t().optional(),stateReason:_t().optional(),usage:uh.optional()}),xY=Dt({objective:_t(),status:$i(["active","paused","blocked","complete"]),completionCriterion:_t().optional(),budgetUsed:Jt().optional(),budgetLimit:Jt().optional()}),_Y=Dt({plan:Dt({reviewPath:_t().optional(),version:Jt().optional()}).optional(),swarm:Dt({trigger:_t().optional()}).optional()}),SY=Dt({plan:Dt({reviewPath:_t().optional(),version:Jt().optional()}).nullable().optional(),swarm:Dt({trigger:_t().optional()}).nullable().optional()}),MY=Du("kind",[Dt({kind:xn("idle")}),Dt({kind:xn("running"),turnId:Jt(),step:Jt(),stepId:_t(),since:Jt()}),Dt({kind:xn("streaming"),turnId:Jt(),step:Jt(),stepId:_t(),stream:$i(["assistant","thinking","tool_call"]),toolCallId:_t().optional(),toolName:_t().optional(),since:Jt()}),Dt({kind:xn("tool_call"),turnId:Jt(),step:Jt(),toolCallId:_t(),name:_t(),since:Jt()}),Dt({kind:xn("retrying"),turnId:Jt(),step:Jt(),stepId:_t(),failedAttempt:Jt(),nextAttempt:Jt(),maxAttempts:Jt(),delayMs:Jt(),errorName:_t().optional(),statusCode:Jt().optional(),since:Jt()}),Dt({kind:xn("awaiting_approval"),turnId:Jt(),step:Jt().optional(),approval:Ms().optional(),since:Jt()}),Dt({kind:xn("interrupted"),turnId:Jt(),step:Jt().optional(),reason:$i(["aborted","max_steps","error"]),message:_t().optional(),at:Jt()}),Dt({kind:xn("ended"),turnId:Jt(),reason:$i(["completed","cancelled","failed","blocked"]),durationMs:Jt().optional(),at:Jt()})]),IY=Dt({byModel:x5(_t(),uh).optional(),currentTurn:uh.optional(),total:uh.optional()}),EY=Dt({model:_t().optional(),thinkingEffort:_t().optional(),usage:IY.optional(),contextTokens:Jt().optional(),maxContextTokens:Jt().optional(),contextUsage:Jt().optional(),permission:$i(["manual","yolo","auto"]).optional(),phase:MY.optional()}),I5=Dt({goal:xY.optional(),modes:_Y.optional(),activity:$i(["idle","turn","disposing","unknown"]).optional(),agent:EY.optional()}),TY=I5.extend({modes:SY.optional()}),sv=Dt({attachmentId:_t(),mediaType:_t(),name:_t().optional(),size:Jt().optional(),source:Du("kind",[Dt({kind:xn("url"),url:_t()}),Dt({kind:xn("file"),fileId:_t()})]).optional(),placeholder:_t().optional()}),LY=Dt({title:_t(),status:$i(["pending","in_progress","done"])}),E5=Dt({todoId:_t(),items:Xn(LY),updatedAt:_t().optional()}),T5=Dt({promptId:_t(),status:$i(["running","queued","blocked","completed","failed","aborted"]),userMessageId:_t().optional(),content:Ms().optional(),createdAt:_t(),finishedAt:_t().optional(),steeredAt:_t().optional()}),LT=Dt({items:Xn(TT),tasks:Xn(M5),interactions:Xn(S5).default([]),attachments:Xn(sv).default([]),todos:Xn(E5).default([]),prompts:Xn(T5).default([]),meta:I5,hasMoreOlder:vp().optional()}),NY=MT.omit({steps:!0}),FY=ST.omit({frames:!0}),BY=Du("type",[Dt({type:xn("frame"),turnId:Uc,stepId:_5,frameId:yp}),Dt({type:xn("task"),taskId:Kc})]),L5=Du("op",[Dt({op:xn("reset"),agentId:wr,snapshot:LT}),Dt({op:xn("turn.upsert"),turn:NY}),Dt({op:xn("step.upsert"),turnId:Uc,step:FY}),Dt({op:xn("frame.upsert"),turnId:Uc,stepId:_5,frame:_T}),Dt({op:xn("append"),target:BY,offset:Jt().int().nonnegative(),text:_t()}),Dt({op:xn("marker.upsert"),item:IT,beforeTurn:Jt().int().optional()}),Dt({op:xn("taskref.upsert"),item:ET,beforeTurn:Jt().int().optional()}),Dt({op:xn("task.upsert"),task:M5}),Dt({op:xn("interaction.upsert"),interaction:S5}),Dt({op:xn("attachment.upsert"),attachment:sv}),Dt({op:xn("todo.upsert"),todo:E5}),Dt({op:xn("prompt.upsert"),prompt:T5}),Dt({op:xn("meta.merge"),meta:TY}),Dt({op:xn("items.remove"),ids:Xn(_t())})]);Dt({agentId:wr,ops:Xn(L5)});const $Y=$i(["off","turn","block","delta"]),Lf=Jt().int().nonnegative(),DY=x5(_t(),$Y);Dt({session_id:_t().min(1),transcript:DY,transcript_since:x5(_t(),Lf).optional()});Dt({agent_id:wr,before_turn:_t().min(1).optional(),after_turn:_t().min(1).optional(),page_size:Jt().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"]}),hY(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const zY=Dt({agentId:wr,type:$i(["main","sub","independent"]).optional(),parentAgentId:wr.optional(),label:_t().optional(),createdAt:_t().optional(),disposedAt:_t().optional()}),RY=Dt({agent_id:wr,items:Xn(TT),has_more:vp(),tasks:Xn(M5),interactions:Xn(S5).default([]),attachments:Xn(sv).default([]),todos:Xn(E5).default([]),prompts:Xn(T5).default([]),meta:I5,agents:Xn(zY),pending_interactions:Xn(_t()),seq:Lf.optional()});Dt({agent_id:wr,batches:Xn(Dt({seq:Lf,ops:Xn(L5)})),latest_seq:Lf,complete:vp()});const OY=Dt({turn_id:Uc,ordinal:Jt().int(),state:xT,origin:wT,prompt:_t(),attachment_ids:Xn(_t()).optional(),started_at:_t().optional()});Dt({agents:Xn(Dt({agent_id:wr,messages:Xn(OY),attachments:Xn(sv).default([])}))});const PY=Dt({state:$i(["pending","approved","rejected","cancelled"]),selected_option:_t().optional(),feedback:_t().optional()}),jY=Dt({tool_call_id:_t(),turn_id:Uc,source:$i(["interaction","display","output"]),plan:_t(),path:_t().optional(),options:Xn(Dt({label:_t(),description:_t().optional()})).optional(),review:PY.optional()});Dt({agent_id:wr,plans:Xn(jY)});const HY=Dt({agent_id:wr,snapshot:LT,has_more_older:vp(),seq:Lf.optional()}),WY=Dt({agent_id:wr,ops:Xn(L5),seq:Lf.optional()}),NT=HY.extend({type:xn("transcript.reset")}),FT=WY.extend({type:xn("transcript.ops")});Du("type",[NT,FT]);const BA=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"]),qY=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"]),UY=new Set(["server_hello","ack","ping","resync_required","error","pong"]),KY=new Set(["assistant.delta","thinking.delta"]);function VY(e,t){if(UY.has(e))return{route:"ignore"};const n=e.startsWith("event."),i=n?e.slice(6):e;return KY.has(i)?ZY(t)?{route:"agent",agentType:i}:{route:"protocol"}:n?qY.has(i)?{route:"protocol"}:BA.has(i)?{route:"agent",agentType:i}:{route:"protocol"}:BA.has(i)?{route:"agent",agentType:i}:{route:"agent",agentType:i}}function ZY(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 GY="kimi-code.bearer.",QY=3e4;class YY{constructor(t){this.opts=t,this.tracer=t.tracer??p5}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?[`${GY}${t}`]:void 0,i=new WebSocket(this.opts.wsUrl,n);this.ws=i,i.onopen=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"open"})},i.onmessage=s=>{this.lastActivityAt=Date.now();try{const o=JSON.parse(String(s.data));this.tracer.wsEvent?.({kind:"in",frame:o}),this.handleFrame(o)}catch(o){this.tracer.wsEvent?.({kind:"lifecycle",event:"parse-error",detail:{error:String(o)}}),this.opts.handlers.onError(0,`Failed to parse WS frame: ${String(o)}`,!1)}},i.onerror=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"error"}),this.opts.handlers.onError(0,"WebSocket error",!1)},i.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 i=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);i!==-1&&this.pendingSubscriptions.splice(i,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(i=>i.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,i){this.transcriptSubscriptions.set(t,{agentId:n,...i!==void 0?{sinceSeq:i}:{}}),this.connected&&this.sendTranscriptSubscribe(t,n,i)}unsubscribeTranscript(t,n){const i=this.transcriptSubscriptions.get(t);(n===void 0||i===void 0||n.includes(i.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 i=this.sideChannelAgents.get(t);if(i===void 0&&(i=new Set,this.sideChannelAgents.set(t,i)),i.has(n))return;i.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,i){const s=N0(t,n),o=this.terminalAttachments.get(s),r=i??o?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:r}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,r)}terminalInput(t,n,i){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:i}})}terminalResize(t,n,i,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:i,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(N0(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(N0(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,QY),i=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:i}}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,i=t.type;if(i==="transcript.reset"){const s=NT.safeParse({type:i,...n.payload}),o=n.session_id;if(!s.success||typeof o!="string"){this.opts.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const r=s.data;this.opts.handlers.onTranscriptReset?.(o,r.agent_id,{...r.snapshot,hasMoreOlder:r.has_more_older},r.seq);const l=this.transcriptSubscriptions.get(o);l?.agentId===r.agent_id&&r.seq!==void 0&&(l.sinceSeq=r.seq);return}if(i==="transcript.ops"){const s=FT.safeParse({type:i,...n.payload}),o=n.session_id;if(!s.success||typeof o!="string"){this.opts.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const r=s.data,l=this.opts.handlers.onTranscriptOps?.(o,r.agent_id,r.ops,r.seq),a=this.transcriptSubscriptions.get(o);l!==!1&&a?.agentId===r.agent_id&&r.seq!==void 0&&(a.sinceSeq=r.seq);return}switch(i){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,o=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:o}),this.opts.handlers.onResync(s,n.payload.current_seq,o);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,o=n.terminal_id,r=n.seq,l=N0(s,o),a=this.terminalAttachments.get(l);a&&this.terminalAttachments.set(l,{...a,lastSeq:Math.max(a.lastSeq,r)});const u=typeof n.payload?.data=="string"?n.payload.data:"";this.opts.handlers.onTerminalOutput?.(s,o,u,r);break}case"terminal_exit":{const s=n.session_id,o=n.terminal_id,r=n.payload?.exit_code,l=typeof r=="number"?r:null;this.opts.handlers.onTerminalExit?.(s,o,l);break}default:{this.trackCursor(n);const s=n.type,o=VY(s,n.payload);if(o.route==="protocol"){this.opts.handlers.onWireEvent(n);break}if(o.route==="agent"){if(this.opts.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const r=n,l=n;this.opts.handlers.onRawAgentEvent({type:o.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,o]of this.subscriptions.entries())n[s]=o;const i=this.nextId();this.clientHelloId=i,this.send({type:"client_hello",id:i,payload:{client_id:this.opts.clientId,subscriptions:t,cursors:n,...this.opts.mainAgentOnly?{agent_filter:this.rawAgentFilter(t)}:{}}});for(const[s,o]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(s,o.agentId,o.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,i){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...i!==void 0?{transcript_since:{[n]:i}}:{}}})}sendTerminalAttach(t,n,i){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:i>0?i:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,i=t.seq;if(typeof n!="string"||typeof i!="number")return;const s=this.subscriptions.get(n);if(!s||i<=s.seq&&s.epoch!==void 0)return;const o=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(i,s.seq),epoch:o})}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 N0(e,t){return`${e}\0${t}`}async function JY(e,t,n){const i=await e.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=RY.parse(i),o={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,...o,agents:s.agents,pendingInteractions:s.pending_interactions,...s.seq!==void 0?{seq:s.seq}:{}}}const Q9=10485760,XY=40001;function eJ(e,t){if(e===void 0)return t;let n;const i=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(i!==void 0)try{n=decodeURIComponent(i.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 $A(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 Y9(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 DA(e){return e==="auto_compact"||e==="manual_compact"}class tJ{constructor(t){this.opts=t,this.tracer=t.tracer??p5,this.http=new lA({origin:t.origin,identity:t.identity,tracer:this.tracer,credentialStore:t.credentialStore}),this.httpV2=new lA({origin:t.origin,identity:t.identity,tracer:this.tracer,credentialStore:t.credentialStore,restBasePath:"/api/v2"})}http;httpV2;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},i=await this.http.get("/sessions",n);return{items:i.items.map(Gr),hasMore:i.has_more}}async listSessionsV2(t){const n={sort:t?.sort,page_size:t?.pageSize,page_token:t?.pageToken,"meta.updated_after":t?.updatedAfter,"meta.archived":t?.archived===void 0?void 0:String(t.archived),include:t?.include,"workspace.id":t?.workspaceIds,"activity.status":t?.statuses},i=await this.httpV2.get("/sessions",n);return{items:i.items,hasMore:i.has_more,nextPageToken:i.next_page_token}}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 i=await this.http.post("/sessions",n);return Gr(i)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return Gr(n)}async updateSession(t,n){const i={};n.title!==void 0&&(i.title=n.title),n.cwd!==void 0&&(i.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&&(i.agent_config=s);const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,i);return Gr(o)}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 HE(n)}async getSessionPlans(t,n){const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript/plan`,{agent_id:n.agentId,tool_call_id:n.toolCallId});return i.plans.map(s=>({agentId:i.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(o=>({label:o.label,...o.description!==void 0?{description:o.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 Gr(n)}async listMessages(t,n){const i={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,i);return{items:s.items.map(e3),hasMore:s.has_more}}async getSessionSnapshot(t){const n=Date.now();this.tracer.traceKeyEvent?.("session:snapshot:start",{sessionId:t});try{const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:i.as_of_seq,epoch:i.epoch,session:Gr(i.session),messages:i.messages.items.map(e3),hasMoreMessages:i.messages.has_more,inFlightTurn:i.in_flight_turn===null?null:{turnId:i.in_flight_turn.turn_id,assistantText:i.in_flight_turn.assistant_text,thinkingText:i.in_flight_turn.thinking_text,runningTools:i.in_flight_turn.running_tools.map(o=>({toolCallId:o.tool_call_id,name:o.name,args:o.args,description:o.description,lastProgress:o.last_progress})),promptId:i.in_flight_turn.current_prompt_id},pendingApprovals:i.pending_approvals.map(PE),pendingQuestions:i.pending_questions.map(jE),subagents:(i.subagents??[]).map(o=>kg(o,o.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(i){throw this.tracer.traceKeyEvent?.("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...$A(i)}),i}}async getSessionTranscript(t,n){return JY(this.http,t,n)}async exportSession(t,n,i){const s=n===void 0?0:new TextEncoder().encode(n).byteLength,o=n===void 0||n.length===0?0:n.split(` -`).length,r=`/sessions/${encodeURIComponent(t)}/export`,l={web_log_bytes:s,web_log_entries:o},a=i?.desktop===!0;let u;try{u=await this.http.postZip(r,{web_log:n,...a?{desktop:!0}:{}},l)}catch(d){if(a&&Os(d)&&d.code===XY)u=await this.http.postZip(r,{web_log:n},l);else throw d}const c=`${t}.zip`;return{blob:u.blob,fileName:eJ(u.contentDisposition,c)}}async submitPrompt(t,n){const i=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`,ZU(n));return this.tracer.traceKeyEvent?.("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-i}),{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()-i,...$A(s)}),s}}async steerPrompts(t,n){const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:i.steered,promptIds:i.prompt_ids}}async abortPrompt(t,n){const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:i.aborted,atSeq:i.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 generateSessionTitle(t,n){try{const i={};n?.force===!0&&(i.force=!0),n?.source!==void 0&&(i.source=n.source);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/title/generate`,i);return typeof s?.title=="string"&&s.title.length>0?s.title:null}catch{return null}}async forkSession(t,n){const i={};n?.title!==void 0&&(i.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,i,{timeoutMs:sA});return Gr(s)}async createChildSession(t,n){const i={};n?.title!==void 0&&(i.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,i,{timeoutMs:sA});return Gr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(Gr)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,i){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,GU(i));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,i){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,XU(i));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 i={status:n};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,i)).items.map(o=>kg(o))}async getTask(t,n,i){const s={with_output:i?.withOutput,output_bytes:i?.outputBytes},o=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s);return kg(o)}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(Y9)}async createTerminal(t,n={}){const i={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,i);return Y9(s)}async getTerminal(t,n){const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return Y9(i)}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(i=>({name:i.name,description:i.description,source:i.source}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(i=>({name:i.name,description:i.description,source:i.source}))}async activateSkill(t,n,i,s){const o={};i!==void 0&&i.length>0&&(o.args=i),s!==void 0&&s.length>0&&(o.attachments=s.map(OE));const r=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o);return{activated:r.activated,skillName:r.skill_name}}async listCapabilities(){return(await this.http.get("/capabilities")).capabilities??[]}async getCapability(t){return this.http.get(`/capabilities/${encodeURIComponent(t)}`)}async installCapability(t){return this.http.post(`/capabilities/${encodeURIComponent(t)}:install`,{})}async listPlugins(){return(await this.http.get("/plugins")).plugins??[]}async listPluginMarketplace(){return(await this.http.get("/plugins/marketplace")).entries??[]}async installPlugin(t){return this.http.post("/plugins",{source:t})}async setPluginEnabled(t,n){return this.http.post(`/plugins/${encodeURIComponent(t)}:${n?"enable":"disable"}`,{})}async removePlugin(t){return this.http.post(`/plugins/${encodeURIComponent(t)}:remove`,{})}async listDirectory(t,n){const i={};n.path!==void 0&&(i.path=n.path),n.depth!==void 0&&(i.depth=n.depth),n.includeGitStatus!==void 0&&(i.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,i),o=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([r,l])=>[r,l.map(uA)])):void 0;return{items:s.items.map(uA),childrenByPath:o,truncated:s.truncated}}async readFile(t,n){const i={path:n.path};n.offset!==void 0&&(i.offset=n.offset),n.length!==void 0&&(i.length=n.length);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,i);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 i={workspace:t,query:n.query};n.limit!==void 0&&(i.limit=n.limit);const s=await this.http.post("/workspace/fs:search",i);return{items:s.items.map(o=>({path:o.path,name:o.name,kind:o.kind,score:o.score,matchPositions:o.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const i={pattern:n.pattern};n.regex!==void 0&&(i.regex=n.regex),n.caseSensitive!==void 0&&(i.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,i);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const i={};n!==void 0&&(i.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,i);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 i=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:i.path,diff:i.diff,truncated:i.truncated??!1}}getFileDownloadUrl(t,n){const i=n.split("/").map(s=>encodeURIComponent(s)).join("/");return Kd(this.opts.origin,`/sessions/${encodeURIComponent(t)}/fs/${i}:download`)}async openFile(t,n){const i={path:n.path};return n.line!==void 0&&(i.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,i)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async openInApp(t,n,i,s){const o={app_id:n,path:i};s!==void 0&&(o.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,o)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(ah)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const i=await this.http.post("/workspaces",n);return ah(i)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const i=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return ah(i)}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(i=>({name:i.name,path:i.path,isDir:i.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(tK)}async listProviders(){return(await this.http.get("/providers")).items.map(Id)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),i=Id(n);return n.api_key!==void 0?{...i,apiKey:n.api_key}:i}async addProvider(t){const n={id:t.id??"",type:t.type,models:(t.models??[]).map(s=>{const o={model:s.model,max_context_size:s.maxContextSize};return s.displayName!==void 0&&(o.display_name=s.displayName),s.capabilities!==void 0&&(o.capabilities=s.capabilities),s.maxOutputSize!==void 0&&(o.max_output_size=s.maxOutputSize),s.supportEfforts!==void 0&&(o.support_efforts=s.supportEfforts),s.adaptiveThinking!==void 0&&(o.adaptive_thinking=s.adaptiveThinking),o})};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 i=await this.http.post("/providers",n);return Id(i)}async updateProvider(t,n){const i={type:n.type,models:(n.models??[]).map(o=>{const r={model:o.model,max_context_size:o.maxContextSize};return o.displayName!==void 0&&(r.display_name=o.displayName),o.capabilities!==void 0&&(r.capabilities=o.capabilities),o.maxOutputSize!==void 0&&(r.max_output_size=o.maxOutputSize),o.supportEfforts!==void 0&&(r.support_efforts=o.supportEfforts),o.adaptiveThinking!==void 0&&(r.adaptive_thinking=o.adaptiveThinking),r})};n.newId!==void 0&&(i.new_id=n.newId),n.apiKey!==void 0&&(i.api_key=n.apiKey),n.baseUrl!==void 0&&(i.base_url=n.baseUrl),n.defaultModel!==void 0&&(i.default_model=n.defaultModel);const s=await this.http.put(`/providers/${encodeURIComponent(t)}`,i);return{provider:Id(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(cA)}async getCatalogProvider(t){const n=await this.http.get(`/catalog/providers/${encodeURIComponent(t)}`);return cA(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 i=await this.http.post("/providers:import_catalog",n);return{provider:Id(i.provider),modelsImported:i.models_imported}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const i=await this.http.post("/providers:import_registry",n);return{providers:i.providers.map(Id),modelsImported:i.models_imported}}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return J9(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return J9(t)}async refreshOAuthProviderModels(){const t=await this.http.post("/providers:refresh_oauth");return J9(t)}async getConfig(){const t=await this.http.get("/config");return t3(t)}async setConfig(t){const n={},i={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[o,r]of Object.entries(t)){const l=i[o];l!==void 0&&(n[l]=r)}const s=await this.http.post("/config",n);return t3(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=i=>({name:i.name,window:i.window,used:i.used,limit:i.limit,resetAt:i.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 i=await this.http.postForm("/files",n);return{id:i.id,name:i.name,mediaType:i.media_type,size:i.size}}getFileUrl(t){return Kd(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:Q9});if(n.size>Q9)throw new g5({size:n.size,limit:Q9});const i=n.type,s=!nJ(i),o=i||(s?"application/octet-stream":"text/plain");if(s){const l=await iJ(n);return{path:t,content:l,encoding:"base64",mime:o,isBinary:!0,size:n.size}}const r=await n.text();return{path:t,content:r,encoding:"utf-8",mime:o,isBinary:!1,size:n.size}}connectEvents(t){const n=zU(this.opts.origin,this.opts.identity.clientId),i=this.opts.projectorFactory(),s=new YY({wsUrl:n,clientId:this.opts.identity.clientId,tracer:this.tracer,credentialStore:this.opts.credentialStore,mainAgentOnly:this.opts.mainAgentOnly,handlers:{onWireEvent:o=>{const r=nK(o),l=iK(o),a=eK(o);a.type==="historyCompacted"&&!DA(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:r,seq:l})},onRawAgentEvent:o=>{const{type:r,seq:l,session_id:a,payload:u,offset:c}=o,d=i.project(r,u,a,{offset:c});for(const f of d){const p=u?.turnId,g=f.type==="assistantDelta"&&typeof p=="number"&&typeof c=="number"&&(r==="assistant.delta"||r==="thinking.delta")?{turnId:p,offset:c,kind:r==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!DA(f.reason)&&t.onResync(a,l),t.onEvent(f,{sessionId:a,seq:l,stream:g})}},onResync:(o,r,l)=>{i.reset(o),t.onResync(o,r,l)},onConnectionState:o=>{t.onConnectionChange(o)},onReplayComplete:()=>{t.onReplayComplete?.()},onError:(o,r,l)=>{t.onError(o,r,l)},onTerminalOutput:(o,r,l,a)=>{t.onTerminalOutput?.(o,r,l,a)},onTerminalExit:(o,r,l)=>{t.onTerminalExit?.(o,r,l)},onTranscriptReset:(o,r,l,a)=>{t.onTranscriptReset?.(o,r,l,a)},onTranscriptOps:(o,r,l,a)=>t.onTranscriptOps?.(o,r,l,a)??!0}});return s.connect(),{subscribe(o,r){s.subscribe(o,r??{seq:0})},unsubscribe(o){s.unsubscribe(o)},subscribeTranscript(o,r,l){s.subscribeTranscript(o,r,l)},unsubscribeTranscript(o,r){s.unsubscribeTranscript(o,r)},seedSnapshot(o,r){if(r.inFlightTurn===null){i.reset(o);return}const l=i.seedInFlight(o,r.inFlightTurn);for(const a of l)t.onEvent(a,{sessionId:o,seq:r.asOfSeq})},bindNextPromptId(o,r){i.bindNextPromptId(o,r)},abort(o,r){s.abort(o,r)},terminalAttach(o,r,l){s.terminalAttach(o,r,l)},terminalInput(o,r,l){s.terminalInput(o,r,l)},terminalResize(o,r,l,a){s.terminalResize(o,r,l,a)},terminalDetach(o,r){s.terminalDetach(o,r)},terminalClose(o,r){s.terminalClose(o,r)},markSideChannelAgent(o,r){s.markSideChannelAgent(o,r),i.markSideChannelAgent(r)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function J9(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 nJ(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 iJ(e){return new Promise((t,n)=>{const i=new FileReader;i.onload=()=>{const s=String(i.result);t(s.slice(s.indexOf(",")+1))},i.onerror=()=>n(i.error),i.readAsDataURL(e)})}function sJ(){return window.kimiDesktop}function BT(e,t,n){const i=n.length===0?void 0:n.length===1?n[0]:n;try{sJ()?.log?.(e,t,i)}catch{}}function Bl(e,...t){console.warn(e,...t),BT("warn",e,t)}function ga(e,...t){console.error(e,...t),BT("error",e,t)}const oJ={multiedit:"multi_edit",multiedits:"multi_edit",shell:"bash",run:"bash",exec:"bash",ripgrep:"grep",rg:"grep",find:"glob",fetch:"web_fetch",webfetch:"web_fetch",url_fetch:"web_fetch",urlfetch:"web_fetch",list:"ls",listdir:"ls",list_dir:"ls",todowrite:"todo",todo_write:"todo",todoread:"todo",todolist:"todo",todo_list:"todo",agent:"task",subagent:"task",websearch:"search",web_search:"search",create_goal:"creategoal",get_goal:"getgoal",set_goal_budget:"setgoalbudget",update_goal:"updategoal"};function so(e){const t=(e??"").trim().toLowerCase().replace(/[\s-]+/g,"_");return oJ[t]??t}const rJ={read:"tools.label.read",bash:"tools.label.bash",edit:"tools.label.edit",multi_edit:"tools.label.edit",write:"tools.label.write",grep:"tools.label.grep",glob:"tools.label.glob",ls:"tools.label.ls",web_fetch:"tools.label.web_fetch",search:"tools.label.search",todo:"tools.label.todo",task:"tools.label.task",agentswarm:"tools.label.swarm",askuserquestion:"tools.label.ask_user",exitplanmode:"tools.label.plan",creategoal:"tools.label.goal_create",getgoal:"tools.label.goal_get",setgoalbudget:"tools.label.goal_budget",updategoal:"tools.label.goal_update"};function $T(e,t){const n=rJ[so(t)];return n?e(n):t}const DT=80;function lJ(e,t=DT){const n=e.trim();return n.length>t?n.slice(0,t-1)+"…":n}function aJ(e,t){const n=e.trim();return!!(n===""||n==="{}"||n==="[]"||n==="null"||t&&Object.keys(t).length===0)}function uJ(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function zn(e){return typeof e=="string"&&e.length>0?e:void 0}function Ya(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function cJ(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean)[0];return n?`${t.host}/${n}`:t.host}catch{return e.replace(/^https?:\/\//,"")}}function X9(e){return zn(e.path)??zn(e.file_path)??zn(e.filePath)??zn(e.filename)}const dJ={active:"status.goalStatusActive",blocked:"status.goalStatusBlocked",complete:"status.goalStatusComplete"};function fJ(e,t){const n=zn(t);if(!n)return;const i=dJ[n];return i?e(i):n}function hJ(e,t){const n=Ya(t.value),i=zn(t.unit);if(!(n===void 0||!i))switch(i){case"turns":return e("tools.goal.turns",{value:n});case"tokens":return e("tools.goal.tokens",{value:n});case"milliseconds":return e("tools.goal.milliseconds",{value:n});case"seconds":return e("tools.goal.seconds",{value:n});case"minutes":return e("tools.goal.minutes",{value:n});case"hours":return e("tools.goal.hours",{value:n});default:return e("tools.goal.budget",{value:n,unit:i})}}function N5(e,t,n,i=!1){const s=(o,r=DT)=>i?o.trim():lJ(o,r);try{const o=uJ(n);if(!i&&aJ(n,o))return"";const r=()=>s(n.replace(/^·\s*/,""));if(!o)return r();switch(so(t)){case"read":{const l=X9(o);if(!l)return r();const a=Ya(o.offset)??Ya(o.line_start)??Ya(o.start_line),u=Ya(o.limit)??Ya(o.length),c=Ya(o.line_end)??Ya(o.end_line)??(a!==void 0&&u!==void 0?a+u:void 0);return s(a!==void 0&&c!==void 0?`${l}:${a}-${c}`:a!==void 0?`${l}:${a}`:l)}case"write":{const l=X9(o);return l?s(`${l} ${e("tools.chip.created")}`):r()}case"edit":case"multi_edit":{const l=X9(o);return l?s(l):r()}case"bash":{const l=zn(o.command)??zn(o.cmd)??zn(o.script);return l?l.trim():r()}case"grep":case"search":{const l=zn(o.pattern)??zn(o.query)??zn(o.regex),a=zn(o.path)??zn(o.glob)??zn(o.include);return l&&a?s(e("tools.summary.inScope",{value:l,scope:a})):l?s(l):r()}case"glob":{const l=zn(o.pattern)??zn(o.glob)??zn(o.query),a=zn(o.path)??zn(o.cwd);return l&&a?s(e("tools.summary.inScope",{value:l,scope:a})):l?s(l):zn(o.path)?s(zn(o.path)):r()}case"ls":{const l=zn(o.path)??zn(o.dir)??zn(o.directory)??zn(o.cwd);return l?s(l):r()}case"web_fetch":{const l=zn(o.url)??zn(o.uri);return l?s(cJ(l)):r()}case"todo":case"task":{const l=zn(o.description)??zn(o.title)??zn(o.prompt)??zn(o.name)??zn(o.subagent_type);if(l)return s(l);const a=Array.isArray(o.todos)?o.todos:Array.isArray(o.items)?o.items:void 0;return a?s(e("tools.chip.todos",{count:a.length})):r()}case"creategoal":{if(i)return r();const l=zn(o.objective),a=zn(o.completionCriterion);return l&&a?s(e("tools.goal.objectiveWithCriterion",{objective:l,criterion:a})):l?s(l):r()}case"getgoal":return i?r():"";case"setgoalbudget":{if(i)return r();const l=hJ(e,o);return l?s(l):r()}case"updategoal":{if(i)return r();const l=fJ(e,o.status);return l?s(e("tools.goal.status",{status:l})):r()}default:return r()}}catch{return n}}function pJ(e,t){try{switch(so(t.name)){case"bash":return t.timing?t.timing:"";case"read":{if(t.output&&t.output.length>0){const n=t.output.length;return e("tools.chip.lines",{count:n})}return""}case"edit":case"multi_edit":case"write":{if(t.output){for(const i of t.output){const s=i.match(/\+(\d+).*[-−](\d+)/);if(s)return`+${s[1]} −${s[2]}`}const n=t.output.find(i=>/\d+/.test(i));if(n){const i=n.match(/\+(\d+)/),s=n.match(/[-−](\d+)/);if(i||s)return`${i?`+${i[1]}`:""} ${s?`−${s[1]}`:""}`.trim()}if(t.status!=="error")return e("tools.chip.edited")}return""}case"grep":case"search":return t.output&&t.output.length>0?e("tools.chip.results",{count:t.output.length}):"";default:return""}}catch{return""}}const gJ="main",mJ=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.use","tool.call.started","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.completed","prompt.aborted","error"]);function Ll(e="msg_"){const t=Date.now().toString(36).padStart(10,"0"),n=Math.random().toString(36).slice(2,12).padEnd(10,"0");return`${e}${t}${n}`}function vJ(e){if(!e||typeof e!="object")return{input:0,output:0,cacheRead:0,cacheCreate:0};const t=e;return{input:t.inputOther??t.input_tokens??0,output:t.output??t.output_tokens??0,cacheRead:t.inputCacheRead??t.cache_read_input_tokens??0,cacheCreate:t.inputCacheCreation??t.cache_creation_input_tokens??0}}function zA(){return{turnPromptId:new Map,currentPromptId:void 0,currentAssistantMsgId:void 0,turnTextLen:0,turnThinkLen:0,toolStartTimes:new Map,totalInput:0,totalOutput:0,totalCacheRead:0,totalCacheCreate:0,contextTokens:0,contextLimit:0,turnCount:0,model:"",messages:[],subagentMeta:new Map,retryReuseMsgId:void 0,retryActive:!1}}function Fi(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Rs(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Tr(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function yJ(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,i=n&&typeof n=="object"?n:{},s=Fi(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const o=Fi(t,"goalId")??Fi(t,"goal_id")??"goal",r=Fi(t,"objective")??"";return{goalId:o,objective:r,completionCriterion:Fi(t,"completionCriterion")??Fi(t,"completion_criterion"),status:s,turnsUsed:Rs(t,"turnsUsed")??Rs(t,"turns_used")??0,tokensUsed:Rs(t,"tokensUsed")??Rs(t,"tokens_used")??0,wallClockMs:Rs(t,"wallClockMs")??Rs(t,"wall_clock_ms")??0,terminalReason:Fi(t,"terminalReason")??Fi(t,"terminal_reason"),budget:{tokenBudget:Tr(i,"tokenBudget")??Tr(i,"token_budget"),remainingTokens:Tr(i,"remainingTokens")??Tr(i,"remaining_tokens"),turnBudget:Tr(i,"turnBudget")??Tr(i,"turn_budget"),remainingTurns:Tr(i,"remainingTurns")??Tr(i,"remaining_turns"),wallClockBudgetMs:Tr(i,"wallClockBudgetMs")??Tr(i,"wall_clock_budget_ms"),remainingWallClockMs:Tr(i,"remainingWallClockMs")??Tr(i,"remaining_wall_clock_ms"),overBudget:i.overBudget===!0||i.over_budget===!0}}}function Ac(e,t,n,i,s){if(typeof i!="string"||i.length===0)return null;const r={...t.subagentMeta.get(i)??{id:i,agentId:i,sessionId:n,kind:"subagent",description:e("tasks.dockSubagent"),status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},...s,id:i,sessionId:n,kind:"subagent"};return t.subagentMeta.set(i,r),r}function bJ(e,t,n){if(t==="turn.step.started")return null;if(t==="tool.use"||t==="tool.call.started"){const i=Fi(n,"name")??Fi(n,"toolName")??"tool",s=$T(e,kJ(i)),o=AJ(e,i,n.args??n.input);return o?`Calling ${s}: ${o}`:`Calling ${s}`}if(t==="tool.progress"){const i=n.update;if(i&&typeof i=="object"){const o=Fi(i,"text");if(o)return ey(o);const r=Fi(i,"message");if(r)return ey(r)}const s=Fi(n,"message");if(s)return ey(s)}return null}function kJ(e){return e.replace(/_\d+$/,"")}const RA=2e3;function ey(e){return e.length>RA?`${e.slice(0,RA)}…`:e}function AJ(e,t,n){if(n==null)return"";const i=typeof n=="string"?n:JSON.stringify(n);return N5(e,t,i)}function CJ(e,t,n,i,s,o,r){if(r.has(i)&&s==="turn.step.started")return[];if(s==="assistant.delta"){const d=Fi(o,"delta");if(!d)return[];const f=t.subagentMeta.get(i),p=Ac(e,t,n,i,{status:"running",subagentPhase:"working",startedAt:f?.startedAt??new Date().toISOString()}),g=[];return p&&g.push({type:"taskCreated",sessionId:n,task:p}),g.push({type:"taskProgress",sessionId:n,taskId:i,outputChunk:d,stream:"stdout",kind:"text"}),g}const l=bJ(e,s,o);if(l===null||l.length===0)return[];const a=t.subagentMeta.get(i),u=Ac(e,t,n,i,{status:"running",subagentPhase:"working",startedAt:a?.startedAt??new Date().toISOString()}),c=[];return u&&c.push({type:"taskCreated",sessionId:n,task:u}),c.push({type:"taskProgress",sessionId:n,taskId:i,outputChunk:l,stream:"stdout"}),c}function oc(e){return{...e,content:e.content.map(t=>({...t}))}}function OA(e,t,n){const i={id:Ll("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(i),i}function wJ(e,t,n,i,s,o){const r={id:i,sessionId:t,role:"user",content:s,createdAt:o,promptId:n};return e.messages.push(r),r}function PA(e){return Array.isArray(e)?e.map(t=>m5(t)):[]}function jA(e,t,n,i){const s=e.messages.find(r=>r.id===t);if(!s)return-1;const o=s.content.at(-1);return o&&o.type===n?(n==="text"?o.text+=i:o.thinking+=i,s.content.length-1):(s.content.push(n==="text"?{type:"text",text:i}:{type:"thinking",thinking:i}),s.content.length-1)}function xJ(e,t,n,i,s,o){const r=e.messages.find(l=>l.id===t);r&&r.content.push({type:"toolUse",toolCallId:n,toolName:i,input:s,outputLines:o})}function _J(e){const t=e.update,n=t&&typeof t=="object"?t:null,s=(n?.stream??n?.kind??e.stream)==="stderr"?"stderr":"stdout",o=typeof n?.text=="string"&&n.text||typeof n?.message=="string"&&n.message||typeof e.chunk=="string"&&e.chunk||typeof e.output=="string"&&e.output||typeof e.message=="string"&&e.message||"";return o.length>0?{outputChunk:o,stream:s}:null}function HA(e,t){e.messages.find(n=>n.id===t)}function SJ(e,t,n,i,s,o){const r={id:Ll("msg_"),sessionId:t,role:"tool",content:[{type:"toolResult",toolCallId:n,output:i,isError:s}],createdAt:new Date().toISOString(),promptId:o};return e.messages.push(r),r}function w1(e,t){return e.messages.find(n=>n.id===t)}function WA(e){return{inputTokens:e.totalInput,outputTokens:e.totalOutput,cacheReadTokens:e.totalCacheRead,cacheCreationTokens:e.totalCacheCreate,totalCostUsd:0,contextTokens:e.contextTokens,contextLimit:e.contextLimit,turnCount:e.turnCount}}function MJ(e){const{t}=e,n=new Map,i=new Set;function s(f){let p=n.get(f);return p||(p=zA(),n.set(f,p)),p}function o(f){n.set(f,zA())}function r(f){i.add(f)}function l(f,p){const g=s(f);g.currentPromptId=p}function a(f,p){o(f);const g=s(f),m=p.promptId??Ll("pr_");g.currentPromptId=m,g.turnPromptId.set(p.turnId,m);const y=OA(g,f,m);p.thinkingText.length>0&&y.content.push({type:"thinking",thinking:p.thinkingText}),p.assistantText.length>0&&y.content.push({type:"text",text:p.assistantText});for(const w of p.runningTools){const k=typeof w.lastProgress?.text=="string"&&w.lastProgress.text.length>0?[w.lastProgress.text]:void 0;y.content.push({type:"toolUse",toolCallId:w.toolCallId,toolName:w.name,input:w.args??{},outputLines:k}),g.toolStartTimes.set(w.toolCallId,Date.now())}return g.currentAssistantMsgId=y.id,g.turnTextLen=p.assistantText.length,g.turnThinkLen=p.thinkingText.length,[{type:"messageCreated",message:oc(y)}]}function u(f,p,g,m){try{return d(f,p,g,m)}catch(y){return ga("[agentProjector] Error projecting event:",f,y instanceof Error?y.message:y),[]}}function c(f,p){return p===void 0?"append":p<f?"skip":p>f?"gap":"append"}function d(f,p,g,m){const y=s(g),w=p,k=[],A=w?.agentId;if(typeof A=="string"&&A!==gJ){const v=i.has(A);if(f==="prompt.submitted"){if(!v)return[];const x=w?.promptId,S=w?.userMessageId;if(!x||!S)return[];const I=PA(w?.content);return I.length===0?[]:[{type:"messageCreated",agentId:A,message:{id:S,sessionId:g,role:"user",content:I,createdAt:typeof w?.createdAt=="string"?w.createdAt:new Date().toISOString(),promptId:x}}]}if(v&&(f==="thinking.delta"||f==="assistant.delta")){const x=w?.delta??"";return x?[{type:"agentDelta",sessionId:g,agentId:A,delta:{[f==="thinking.delta"?"thinking":"text"]:x}}]:[]}if(v&&f==="turn.ended")return[{type:"agentTurnEnded",sessionId:g,agentId:A,reason:w?.reason}];if(mJ.has(f))return CJ(t,y,g,A,f,w??{},i)}switch(f){case"session.meta.updated":{const v=w?.patch?.title??w?.title,x=w?.patch?.lastPrompt,S={};typeof v=="string"&&v.length>0&&(S.title=v),typeof x=="string"&&(S.lastPrompt=x),(S.title!==void 0||S.lastPrompt!==void 0)&&k.push({type:"sessionMetaUpdated",sessionId:g,...S});break}case"prompt.submitted":{const v=w?.promptId,x=w?.userMessageId;if(!v||!x)break;const S=PA(w?.content);if(S.length===0)break;y.currentPromptId=v;const I=wJ(y,g,v,x,S,typeof w?.createdAt=="string"?w.createdAt:new Date().toISOString());k.push({type:"messageCreated",message:oc(I),...typeof A=="string"?{agentId:A}:{}});break}case"turn.started":{const v=w?.turnId,x=y.currentPromptId??Ll("pr_");y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x),y.turnTextLen=0,y.turnThinkLen=0;const S=w?.origin;if(S&&typeof S=="object"&&S.kind==="system_trigger"&&S.name==="goal_continuation"){const I={id:v!==void 0?`goal_cont_${v}`:Ll("goal_"),sessionId:g,role:"user",content:[{type:"text",text:Fi(w??{},"prompt")??""}],createdAt:new Date().toISOString(),metadata:{origin:S}};y.messages.push(I),k.push({type:"turnActiveChanged",sessionId:g,active:!0}),k.push({type:"messageCreated",message:oc(I)});break}k.push({type:"turnActiveChanged",sessionId:g,active:!0});break}case"turn.step.started":{const v=w?.turnId;y.retryActive&&(y.retryActive=!1,k.push({type:"turnRetry",sessionId:g,retry:void 0}));let x=y.turnPromptId.get(v)??y.currentPromptId;if(x||(x=Ll("pr_"),y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x)),y.turnTextLen=0,y.turnThinkLen=0,y.retryReuseMsgId!==void 0){const I=y.retryReuseMsgId;if(y.retryReuseMsgId=void 0,w1(y,I)!==void 0){y.currentAssistantMsgId=I;break}}const S=OA(y,g,x);y.currentAssistantMsgId=S.id,k.push({type:"messageCreated",message:oc(S)});break}case"thinking.delta":{const v=y.currentAssistantMsgId;if(!v)break;const x=w?.delta??"";if(!x)break;m?.offset===0&&y.turnThinkLen>0&&(y.turnThinkLen=0);const S=c(y.turnThinkLen,m?.offset);if(S==="skip")break;if(S==="gap"){k.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"delta_gap"});break}const I=jA(y,v,"thinking",x);if(I<0)break;y.turnThinkLen+=x.length,k.push({type:"assistantDelta",sessionId:g,messageId:v,contentIndex:I,delta:{thinking:x}});break}case"assistant.delta":{const v=y.currentAssistantMsgId;if(!v)break;const x=w?.delta??"";if(!x)break;m?.offset===0&&y.turnTextLen>0&&(y.turnTextLen=0);const S=c(y.turnTextLen,m?.offset);if(S==="skip")break;if(S==="gap"){k.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"delta_gap"});break}const I=jA(y,v,"text",x);if(I<0)break;y.turnTextLen+=x.length,k.push({type:"assistantDelta",sessionId:g,messageId:v,contentIndex:I,delta:{text:x}});break}case"tool.use":case"tool.call.started":{const v=y.currentAssistantMsgId,x=w?.turnId,S=y.turnPromptId.get(x)??y.currentPromptId;if(!v||!S)break;const I=w?.toolCallId,_=w?.name??w?.toolName??"",E=w?.args??w?.input??{};xJ(y,v,I,_,E);const N=w1(y,v);N&&N.content.length-1,y.toolStartTimes.set(I,Date.now()),N&&k.push({type:"messageUpdated",sessionId:g,messageId:v,content:N.content.map(D=>({...D})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const v=w?.toolCallId,x=_J(w??{});v&&x&&k.push({type:"toolOutput",sessionId:g,toolCallId:v,outputChunk:x.outputChunk,stream:x.stream});break}case"tool.result":{const v=w?.turnId;let x=y.turnPromptId.get(v)??y.currentPromptId;x||(x=Ll("pr_"),y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x));const S=w?.toolCallId,I=w?.output,_=w?.isError??!1;y.toolStartTimes.get(S)??Date.now(),y.toolStartTimes.delete(S);const E=SJ(y,g,S,I,_,x);k.push({type:"messageCreated",message:oc(E)}),y.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const v=y.currentAssistantMsgId,x=vJ(w?.usage);if(y.totalInput+=x.input,y.totalOutput+=x.output,y.totalCacheRead+=x.cacheRead,y.totalCacheCreate+=x.cacheCreate,v){HA(y,v);const S=w1(y,v);S&&k.push({type:"messageUpdated",sessionId:g,messageId:v,content:S.content.map(I=>({...I})),status:"completed"})}break}case"agent.status.updated":{w?.model&&(y.model=w.model),w?.contextTokens!==void 0&&(y.contextTokens=w.contextTokens),w?.maxContextTokens!==void 0&&(y.contextLimit=w.maxContextTokens);const v=w?.phase;v!=null&&v.kind==="retrying"?(y.retryActive=!0,k.push({type:"turnRetry",sessionId:g,retry:{failedAttempt:Rs(v,"failedAttempt")??0,nextAttempt:Rs(v,"nextAttempt")??0,maxAttempts:Rs(v,"maxAttempts")??0,delayMs:Rs(v,"delayMs")??0,errorName:Fi(v,"errorName"),statusCode:Rs(v,"statusCode"),turnId:Rs(v,"turnId")}})):y.retryActive&&v!==void 0&&v!==null&&typeof v.kind=="string"&&(y.retryActive=!1,k.push({type:"turnRetry",sessionId:g,retry:void 0})),k.push({type:"sessionUsageUpdated",sessionId:g,usage:WA(y),model:y.model||void 0,swarmMode:w?.swarmMode===!0?!0:w?.swarmMode===!1?!1:void 0,planMode:w?.planMode===!0?!0:w?.planMode===!1?!1:void 0,thinking:typeof w?.thinkingEffort=="string"&&w.thinkingEffort.length>0?w.thinkingEffort:void 0});break}case"turn.ended":{const v=y.currentAssistantMsgId,x=w?.reason??"completed",S=Rs(w??{},"durationMs"),I=w?.turnId,_=(I!==void 0?y.turnPromptId.get(I):void 0)??y.currentPromptId;if(k.push({type:"turnActiveChanged",sessionId:g,active:!1,reason:w?.reason,promptId:_}),v){HA(y,v);const N=w1(y,v);N&&k.push({type:"messageUpdated",sessionId:g,messageId:v,content:N.content.map(D=>({...D})),status:x==="failed"||x==="blocked"?"error":"completed",durationMs:S})}y.turnCount++;const E=WA(y);k.push({type:"sessionUsageUpdated",sessionId:g,usage:E}),y.currentAssistantMsgId=void 0,y.currentPromptId=void 0,y.turnTextLen=0,y.turnThinkLen=0,y.retryReuseMsgId=void 0;break}case"prompt.completed":{const v=w?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptCompleted",sessionId:g,promptId:v,reason:w?.reason??"completed"});break}case"prompt.aborted":{const v=w?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptAborted",sessionId:g,promptId:v});break}case"turn.step.retrying":{y.retryActive=!0,k.push({type:"turnRetry",sessionId:g,retry:{failedAttempt:Rs(w??{},"failedAttempt")??0,nextAttempt:Rs(w??{},"nextAttempt")??0,maxAttempts:Rs(w??{},"maxAttempts")??0,delayMs:Rs(w??{},"delayMs")??0,errorName:Fi(w??{},"errorName"),statusCode:Rs(w??{},"statusCode"),turnId:typeof w?.turnId=="number"?w.turnId:void 0}});const v=y.currentAssistantMsgId;if(v!==void 0){const x=w1(y,v);x!==void 0&&(x.content=x.content.filter(S=>S.type!=="text"&&S.type!=="thinking"&&S.type!=="toolUse"),k.push({type:"messageUpdated",sessionId:g,messageId:v,content:x.content.map(S=>({...S})),status:"pending"}),y.retryReuseMsgId=v)}y.turnTextLen=0,y.turnThinkLen=0,y.toolStartTimes.clear();break}case"turn.step.interrupted":{y.currentAssistantMsgId=void 0,y.retryReuseMsgId=void 0;break}case"subagent.spawned":{const v=typeof w?.subagentId=="string"&&w.subagentId.length>0?w.subagentId:Ll("task_"),x={id:v,agentId:v,sessionId:g,kind:"subagent",description:typeof w?.description=="string"?w.description:w?.subagentName??t("tasks.dockSubagent"),status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued",subagentType:typeof w?.subagentName=="string"?w.subagentName:void 0,model:typeof w?.model=="string"&&w.model.length>0?w.model:void 0,thinkingEffort:typeof w?.thinkingEffort=="string"&&w.thinkingEffort.length>0?w.thinkingEffort:void 0,parentToolCallId:typeof w?.parentToolCallId=="string"?w.parentToolCallId:void 0,swarmIndex:typeof w?.swarmIndex=="number"?w.swarmIndex:void 0,runInBackground:w?.runInBackground===!0};y.subagentMeta.set(x.id,x),k.push({type:"taskCreated",sessionId:g,task:x});break}case"subagent.started":{const v=Ac(t,y,g,w?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString()});v&&k.push({type:"taskCreated",sessionId:g,task:v});break}case"subagent.suspended":{const v=Ac(t,y,g,w?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof w?.reason=="string"?w.reason:void 0});v&&k.push({type:"taskCreated",sessionId:g,task:v});break}case"subagent.completed":{const v=typeof w?.resultSummary=="string"?w.resultSummary:void 0,x=Ac(t,y,g,w?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:v});x&&k.push({type:"taskCreated",sessionId:g,task:x}),k.push({type:"taskCompleted",sessionId:g,taskId:w?.subagentId??"",status:"completed",outputPreview:v});break}case"subagent.failed":{const v=typeof w?.error=="string"?w.error:void 0,x=Ac(t,y,g,w?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:v});x&&k.push({type:"taskCreated",sessionId:g,task:x}),k.push({type:"taskCompleted",sessionId:g,taskId:w?.subagentId??"",status:"failed",outputPreview:v});break}case"error":{k.push({type:"unknown",raw:{_agentError:!0,code:w?.code,message:w?.message,name:w?.name,details:w?.details,retryable:w?.retryable}});break}case"task.notified":{const v=Fi(w??{},"notificationType"),x=Fi(w??{},"sourceKind"),S=Fi(w??{},"sourceId");if(!v||!x||!S)break;const I=v.startsWith("task.")?v.slice(5):v,_=`task:${S}:${I}`,E=P=>P.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">"),N=Fi(w??{},"title")??"",D=Fi(w??{},"severity")??"",T=Fi(w??{},"body")??"",$=`<notification id="${_}" category="task" type="${E(v)}" source_kind="${E(x)}" source_id="${E(S)}"> -`+(N!==""?`Title: ${E(N)} -`:"")+(D!==""?`Severity: ${E(D)} -`:"")+(T!==""?`${E(T)} -`:"")+"</notification>",O={id:`task_ntf_${_}`,sessionId:g,role:"user",content:[{type:"text",text:$}],createdAt:new Date().toISOString(),metadata:{origin:{kind:"task",taskId:S,status:I,notificationId:_}}};y.messages.push(O),k.push({type:"messageCreated",message:oc(O)});break}case"warning":{k.push({type:"unknown",raw:{_agentWarning:!0,message:w?.message}});break}case"task.started":case"background.task.started":{const v=w?.info??{},x=typeof v.startedAt=="number"?new Date(v.startedAt).toISOString():void 0,S=typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):Ll("task_"),I=typeof v.description=="string"?v.description:typeof v.command=="string"?v.command:t("tasks.defaultDescription");if(v.kind==="agent"){const E=typeof v.agentId=="string"&&v.agentId.length>0?v.agentId:void 0;if(E!==void 0){const N=Ac(t,y,g,E,{description:I,backgroundTaskId:S,runInBackground:!0});N&&k.push({type:"taskCreated",sessionId:g,task:N})}else k.push({type:"taskCreated",sessionId:g,task:{id:S,sessionId:g,kind:"subagent",description:I,status:"running",createdAt:x??new Date().toISOString(),startedAt:x,subagentPhase:"queued",runInBackground:!0}});break}const _=typeof v.command=="string"?v.command:void 0;k.push({type:"taskCreated",sessionId:g,task:{id:S,sessionId:g,kind:"bash",description:I,command:_,status:"running",createdAt:x??new Date().toISOString(),startedAt:x,outputPreview:_!==void 0?`$ ${_}`:void 0}});break}case"task.terminated":case"background.task.terminated":{const v=w?.info??{},x=v.status==="failed"||typeof v.exitCode=="number"&&v.exitCode!==0;k.push({type:"taskCompleted",sessionId:g,taskId:typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):"",status:x?"failed":"completed"});break}case"compaction.completed":{const v=w?.result??{};k.push({type:"compactionCompleted",sessionId:g,tokensBefore:typeof v.tokensBefore=="number"?v.tokensBefore:void 0,tokensAfter:typeof v.tokensAfter=="number"?v.tokensAfter:void 0,summary:typeof v.summary=="string"?v.summary:void 0}),k.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{k.push({type:"compactionStarted",sessionId:g,trigger:w?.trigger==="manual"?"manual":"auto",instruction:typeof w?.instruction=="string"?w.instruction:void 0});break}case"compaction.cancelled":{k.push({type:"compactionCancelled",sessionId:g});break}case"goal.updated":{const v=yJ(w?.snapshot??null);k.push({type:"goalUpdated",sessionId:g,goal:v?.status==="complete"?null:v});break}case"cron.fired":{const v=w?.origin,x=Fi(w??{},"prompt");if(v&&typeof v=="object"&&v.kind==="cron_job"&&x){const S={id:Ll("cron_"),sessionId:g,role:"user",content:[{type:"text",text:x}],createdAt:new Date().toISOString(),metadata:{origin:v}};y.messages.push(S),k.push({type:"messageCreated",message:oc(S)})}break}}return k}return{project:u,bindNextPromptId:l,seedInFlight:a,reset:o,markSideChannelAgent:r}}function IJ(e){return new tJ({origin:e.origin,identity:e.identity,tracer:e.tracer,credentialStore:e.credentialStore,projectorFactory:()=>MJ({t:e.t}),mainAgentOnly:e.mainAgentOnly})}const zT="kimiWeb.compaction",EJ={t:e=>e},TJ="kimiWeb.optimisticUserMessage",qA="Sub Agent";function H1(e,t,n=e.length){for(let i=0;i<n;i++){const s=e[i];s.type==="thinking"&&s.startedAt!==void 0&&s.durationMs===void 0&&(e[i]={...s,durationMs:Math.max(0,t-Date.parse(s.startedAt))})}}function UA(e,t,n){const i=e.messagesBySession[t];if(i)for(let s=i.length-1;s>=0;s--){const o=i[s];if(o.role!=="assistant")continue;if(!o.content.some(u=>u.type==="thinking"&&u.startedAt!==void 0&&u.durationMs===void 0))return;const l=[...o.content];H1(l,n);const a=[...i];a[s]={...o,content:l},e.messagesBySession[t]=a;return}}function KA(e){const t=Date.parse(e);return Number.isNaN(t)?Date.now():t}function LJ(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},turnEndedPromptIdBySession:{},turnErrorBySession:{},turnRetryBySession:{},compactionBySession:{},warnings:[]}}function NJ(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},turnErrorBySession:{...e.turnErrorBySession},turnRetryBySession:{...e.turnRetryBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function FJ(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const i=e.lastSeqBySession[t]??0;n>i&&(e.lastSeqBySession[t]=n)}}function rc(e,t){const n=new Date().toISOString();e.sessions=e.sessions.map(i=>i.id===t&&n>i.updatedAt?{...i,updatedAt:n}:i)}function qa(e,t){return t.seq>(e.lastSeqBySession[t.sessionId]??0)}function VA(e){return e.role==="user"&&e.metadata?.[TJ]===!0}function BJ(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function $J(e){return e.metadata?.origin?.kind==="system_trigger"}function DJ(e,t){const n=t.userMessageId??t.id;for(let s=e.length-1;s>=0;s--){const o=e[s];if(VA(o)&&o.userMessageId===n)return s}const i=t.promptId;if(i!==void 0)for(let s=e.length-1;s>=0;s--){const o=e[s];if(VA(o)&&o.promptId===i)return s}return-1}function zJ(e,t,n){let i=!1;const s=e.map(o=>{let r=!1;const l=o.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(r=!0,{...a,outputLines:[...a.outputLines??[],n]}));return r?(i=!0,{...o,content:l}):o});return i?s:e}const RJ={"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 OJ(e,t){const n=[],i=(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})};i(t("warnings.details.code"),e.code);const s=e.details??{};i(t("warnings.details.status"),s.statusCode),i(t("warnings.details.requestId"),s.requestId),i(t("warnings.details.errorName"),e.name);for(const[r,l]of Object.entries(s))r==="statusCode"||r==="requestId"||i(r,l);const o=(e.code!==void 0?RJ[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${o}`),message:e.message,details:n.length>0?n:void 0}}function PJ(e,t,n,i=EJ){const s=NJ(e);switch(FJ(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(o=>o.id===t.session.id?{...t.session,pullRequest:o.pullRequest}:o);break}case"sessionDeleted":{const o=t.sessionId;s.sessions=s.sessions.filter(r=>r.id!==o),delete s.messagesBySession[o],delete s.tasksBySession[o],delete s.goalBySession[o],delete s.approvalsBySession[o],delete s.questionsBySession[o],delete s.lastSeqBySession[o],delete s.turnActiveBySession[o],delete s.turnEndedPromptIdBySession[o],delete s.turnErrorBySession[o],delete s.turnRetryBySession[o],s.activeSessionId===o&&(s.activeSessionId=void 0);break}case"sessionWorkChanged":{if(!qa(e,n))break;let o;s.sessions=s.sessions.map(r=>r.id!==t.sessionId?r:(o=t.pendingInteraction??(t.busy?r.pendingInteraction:"none"),{...r,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?r.mainTurnActive:!1),pendingInteraction:o,lastTurnReason:t.lastTurnReason})),o==="none"?(delete s.approvalsBySession[t.sessionId],delete s.questionsBySession[t.sessionId]):o==="question"&&delete s.approvalsBySession[t.sessionId],t.mainTurnActive===!0?s.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&(e.turnActiveBySession[t.sessionId]&&rc(s,t.sessionId),delete s.turnActiveBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId]);break}case"sessionMetaUpdated":{s.sessions=s.sessions.map(o=>o.id===t.sessionId?{...o,title:t.title??o.title,lastPrompt:t.lastPrompt??o.lastPrompt}:o);break}case"sessionUsageUpdated":{s.sessions=s.sessions.map(o=>{if(o.id!==t.sessionId)return o;const r=t.model&&t.model.length>0?t.model:o.model;return{...o,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 o=t.sessionId,r=s.compactionBySession[o],{[o]:l,...a}=s.compactionBySession;if(s.compactionBySession=a,Object.prototype.hasOwnProperty.call(s.messagesBySession,o)){const u=s.messagesBySession[o]??[],c=`compaction_${o}_${n.seq}`;if(!u.some(d=>d.id===c)){const d={trigger:r?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};s.messagesBySession[o]=[...u,{id:c,sessionId:o,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[zT]:d}}]}}break}case"compactionCancelled":{const{[t.sessionId]:o,...r}=s.compactionBySession;s.compactionBySession=r;break}case"messageCreated":{const o=t.message.sessionId,r=s.messagesBySession[o]??[];if(!r.some(a=>a.id===t.message.id)){if(t.message.role==="user"&&!BJ(t.message)&&!$J(t.message)){const a=DJ(r,t.message);if(a!==-1){const u=[...r],c=u[a];u[a]={...t.message,id:c.id,promptId:t.message.promptId??c.promptId,userMessageId:t.message.userMessageId??t.message.id,metadata:{...t.message.metadata,...c.metadata}},s.messagesBySession[o]=u;break}}s.messagesBySession[o]=[...r,t.message]}break}case"messageUpdated":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=r.map(l=>{if(l.id!==t.messageId)return l;const a=t.content.map((c,d)=>{const f=l.content[d];return c.type==="thinking"&&f?.type==="thinking"?{...c,startedAt:f.startedAt,durationMs:f.durationMs}:c}),u=Date.now();return H1(a,u,a.length-1),(t.status!=="pending"||t.durationMs!==void 0)&&H1(a,u),{...l,content:a,durationMs:t.durationMs??l.durationMs,endedAt:t.durationMs!==void 0?l.endedAt??new Date(u).toISOString():l.endedAt}});break}case"assistantDelta":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=r.map(l=>{if(l.id!==t.messageId)return l;const a=[...l.content],u=t.contentIndex,c=a.length<=u;for(;a.length<=u;)a.push({type:"text",text:""});const d=a[u];let f;return t.delta.text!==void 0?d.type==="text"&&!c?f={type:"text",text:d.text+t.delta.text}:(f={type:"text",text:t.delta.text},H1(a,Date.now(),u)):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()},H1(a,Date.now(),u)):f=d,a[u]=f,{...l,content:a}});break}case"toolOutput":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=zJ(r,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const o=t.sessionId,r=s.approvalsBySession[o]??[];r.some(u=>u.approvalId===t.approval.approvalId)||(s.approvalsBySession[o]=[...r,t.approval],qa(e,n)&&(UA(s,o,KA(t.approval.createdAt)),rc(s,o)));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 o=t.sessionId,r=t.approvalId,l=s.approvalsBySession[o]??[];s.approvalsBySession[o]=l.filter(a=>a.approvalId!==r);break}case"questionRequested":{const o=t.sessionId,r=s.questionsBySession[o]??[];r.some(a=>a.questionId===t.question.questionId)||(s.questionsBySession[o]=[...r,t.question],qa(e,n)&&(UA(s,o,KA(t.question.createdAt)),rc(s,o)));break}case"questionAnswered":case"questionDismissed":{const o=t.sessionId,r=t.questionId,l=s.questionsBySession[o]??[];s.questionsBySession[o]=l.filter(a=>a.questionId!==r);break}case"taskCreated":{const o=t.sessionId,r=s.tasksBySession[o]??[],l=r.findIndex(a=>a.id===t.task.id);if(l===-1)s.tasksBySession[o]=[...r,t.task];else{const a=[...r],u=r[l];a[l]={...t.task,outputLines:u.outputLines,text:u.text,description:t.task.description===qA&&u.description!==qA?u.description:t.task.description,swarmIndex:t.task.swarmIndex??u.swarmIndex,parentToolCallId:t.task.parentToolCallId??u.parentToolCallId,subagentType:t.task.subagentType??u.subagentType,model:t.task.model??u.model,thinkingEffort:t.task.thinkingEffort??u.thinkingEffort,runInBackground:t.task.runInBackground??u.runInBackground,backgroundTaskId:t.task.backgroundTaskId??u.backgroundTaskId,agentId:t.task.agentId??u.agentId},s.tasksBySession[o]=a}break}case"taskProgress":{const o=t.sessionId,r=s.tasksBySession[o]??[];s.tasksBySession[o]=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 u=[...a,t.outputChunk];return{...l,outputLines:l.kind==="subagent"?u:u.slice(-40)}});break}case"taskCompleted":{const o=t.sessionId,r=s.tasksBySession[o]??[];s.tasksBySession[o]=r.map(l=>l.id!==t.taskId?l:{...l,status:t.status,completedAt:l.completedAt??new Date().toISOString(),completedAtEstimated:l.completedAt===void 0?!0:l.completedAtEstimated,outputPreview:t.outputPreview,outputBytes:t.outputBytes});break}case"goalUpdated":{const o=t.sessionId;s.goalVersionBySession[o]=(s.goalVersionBySession[o]??0)+1,t.goal===null||t.goal.status==="complete"?delete s.goalBySession[o]:s.goalBySession[o]=t.goal;break}case"configChanged":{s.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":{t.reason==="blocked"&&qa(e,n)&&rc(s,t.sessionId);break}case"promptAborted":{if(t.promptId===e.turnEndedPromptIdBySession[t.sessionId])break;qa(e,n)&&rc(s,t.sessionId);break}case"turnActiveChanged":{if(!qa(e,n))break;s.sessions=s.sessions.map(o=>o.id===t.sessionId?{...o,mainTurnActive:t.active}:o),t.active?(s.turnActiveBySession[t.sessionId]=!0,delete s.turnEndedPromptIdBySession[t.sessionId],delete s.turnErrorBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId],rc(s,t.sessionId)):(delete s.turnActiveBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId],t.promptId!==void 0&&(s.turnEndedPromptIdBySession[t.sessionId]=t.promptId),rc(s,t.sessionId));break}case"turnRetry":{if(!qa(e,n))break;t.retry===void 0?delete s.turnRetryBySession[t.sessionId]:s.turnRetryBySession[t.sessionId]=t.retry;break}case"unknown":{const o=t.raw;if(!(o&&o._noop===!0))if(o&&o._agentError){if(qa(e,n)){if(n.sessionId!==void 0){const r=o.details??{};s.turnErrorBySession[n.sessionId]={code:o.code,message:o.message,name:o.name,retryable:o.retryable,statusCode:typeof r.statusCode=="number"?r.statusCode:void 0,requestId:typeof r.requestId=="string"?r.requestId:void 0}}(n.sessionId===void 0||n.sessionId!==e.activeSessionId)&&(s.warnings=[...s.warnings,OJ(o,i.t)])}}else if(o&&o._agentWarning){const r=o.message??o.code??i.t("warnings.agentWarningFallback");s.warnings=[...s.warnings,`${i.t("warnings.noteLabel")}: ${r}`]}else{const r=o?.type??"(unknown)";s.warnings=[...s.warnings,i.t("warnings.unhandledEvent",{type:r})]}break}}return s}function jJ(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Uo(e,t){for(const n of Object.keys(t))Object.is(e[n],t[n])||(e[n]=t[n]);for(const n of Object.keys(e))n in t||delete e[n]}const HJ=[{pattern:/\brm\s+(?:-[a-zA-Z]*[rf][a-zA-Z]*|--recursive|--force)\b/,detail:"rm -rf"},{pattern:/\bsudo\b/,detail:"sudo"},{pattern:/\bmkfs(?:\.[a-z0-9]+)?\b/,detail:"mkfs"},{pattern:/\bdd\b[^|;&]*\bof=/,detail:"dd of=…"},{pattern:/>\s*\/dev\/(?:sd|nvme|disk|hd)/,detail:"> /dev/…"},{pattern:/:\(\)\s*\{/,detail:"fork bomb"},{pattern:/\bgit\s+push\b[^|;&]*(?:--force(?:-with-lease)?\b|\s-f\b)/,detail:"git push --force"},{pattern:/\bchmod\s+(?:-[a-zA-Z]+\s+)*777\b/,detail:"chmod 777"},{pattern:/\b(?:curl|wget)\b[^|;&]*\|\s*(?:sudo\s+)?(?:ba|z)?sh\b/,detail:"curl | sh"},{pattern:/\b(?:shutdown|reboot|poweroff|halt)\b/,detail:"shutdown / reboot"}];function RT(e){const t=e.replace(/"[^"]*"|'[^']*'/g," ");for(const{pattern:n,detail:i}of HJ)if(n.test(t))return i}const OT="kimiWeb.taskNotification",WJ=/<notification\b([^>]*)>([\s\S]*?)<\/notification>/g,qJ=/([\w-]+)="([^"]*)"/g,UJ=/<output-file\b([^>]*)>[\s\S]*?<\/output-file>/,KJ=/^Title: (.*)$/m,VJ=/^Severity: (.*)$/m;function r3(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function ZA(e){const t={};for(const n of e.matchAll(qJ))n[1]!==void 0&&n[2]!==void 0&&(t[n[1]]=r3(n[2]));return t}function ZJ(e,t,n){const i=ZA(e),s=KJ.exec(t)?.[1]?.trim()??"",o=VJ.exec(t)?.[1]?.trim()??"";let r=t.split(` -`).filter(c=>!c.startsWith("Title: ")&&!c.startsWith("Severity: ")).join(` -`);const l=r.search(/^<\w/m);l!==-1&&(r=r.slice(0,l)),r=r.trim();const a=UJ.exec(t),u=a?(()=>{const c=ZA(a[1]??""),d=Number(c.bytes);return c.path!==void 0&&c.path!==""?{path:c.path,bytes:Number.isFinite(d)?d:void 0}:void 0})():void 0;return{id:i.id??"",category:i.category??"",type:i.type??"",sourceKind:i.source_kind??"",sourceId:i.source_id??"",agentId:i.agent_id,title:r3(s),severity:o,body:r3(r),outputFile:u,raw:n}}function GJ(e){if(!e.includes("<notification"))return[];const t=[];for(const n of e.matchAll(WJ))n[1]===void 0||n[2]===void 0||t.push(ZJ(n[1],n[2],n[0]));return t}function QJ(e){const t=e?.[OT];if(typeof t!="object"||t===null)return;const n=t;for(const i of["id","category","type","sourceKind","sourceId","title","severity","body","raw"])if(typeof n[i]!="string")return;return t}function Ag(e){for(const t of["completed","failed","timed_out","killed","lost"])if(e.type.endsWith(`.${t}`))return t;return"info"}function YJ(e){const t=Ag(e);return t==="completed"?"ok":t==="failed"||t==="timed_out"||t==="lost"?"err":t==="killed"?"warn":e.severity==="error"?"err":e.severity==="warning"?"warn":"info"}const JJ=1e6,GA=5e3;function Wl(e){return e===""?[]:e.endsWith(` -`)?e.slice(0,-1).split(` -`):e.split(` -`)}function Nf(e,t){const n=Wl(e),i=Wl(t),s=n.length,o=i.length;if(s===0&&o===0)return[];if(s>GA||o>GA||(s+1)*(o+1)>JJ)return null;const r=Array.from({length:s+1},()=>Array.from({length:o+1},()=>0));for(let p=1;p<=s;p++)for(let g=1;g<=o;g++)r[p][g]=n[p-1]===i[g-1]?r[p-1][g-1]+1:Math.max(r[p-1][g],r[p][g-1]);const l=[];let a=s,u=o;for(;a>0||u>0;)a>0&&u>0&&n[a-1]===i[u-1]?(l.push({type:"context",text:n[a-1]}),a--,u--):u>0&&(a===0||r[a][u-1]>=r[a-1][u])?(l.push({type:"add",text:i[u-1]}),u--):(l.push({type:"del",text:n[a-1]}),a--);l.reverse();const c=[];let d=1,f=1;for(const p of l)p.type==="context"?(c.push({type:"context",text:p.text,oldNo:d,newNo:f}),d++,f++):p.type==="add"?(c.push({type:"add",text:p.text,newNo:f}),f++):(c.push({type:"del",text:p.text,oldNo:d}),d++);return c}const QA=500;function Am(e,t){const n=[],i=Wl(e),s=Wl(t),o=Math.min(i.length,QA),r=Math.min(s.length,QA);for(let l=1;l<=o;l++)n.push({type:"del",text:i[l-1],oldNo:l});i.length>o&&n.push({type:"context",text:`… ${i.length-o} more lines …`});for(let l=1;l<=r;l++)n.push({type:"add",text:s[l-1],newNo:l});return s.length>r&&n.push({type:"context",text:`… ${s.length-r} more lines …`}),n}function PT(e){let t=0,n=0;for(const i of e)i.type==="add"?t++:i.type==="del"&&n++;return{added:t,removed:n}}const XJ=/^read[_-]?media(?:file)?$/i,eX=/^data:([^;]+);base64,(.*)$/s,tX=/^<(image|video|audio)\s+path="([^"]+)">$/,nX=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,iX=/Mime type:\s*([^.\s]+)/i,sX=/Size:\s*(\d+)\s*bytes/i,oX=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,rX="<system>Image compressed to fit model limits:",lX=/<system>Image compressed to fit model limits:[\s\S]*?<\/system>/g;function aX(e){return e.includes(rX)?e.replace(lX,""):e}function uX(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function YA(e){const t=nX.exec(e.trim());return t?{kind:t[1],path:uX(t[2])}:null}const jT=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,cX=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function l3(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),i=n>0?t.slice(0,n):t;return jT.test(i)?i:void 0}const dX=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function JA(e){const t=dX.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",i=cX.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:i!==void 0&&jT.test(i)?i:void 0}}function fX(e){if(e.length===0)return 0;const t=e.endsWith("==")?2:e.endsWith("=")?1:0;return Math.floor(e.length*3/4)-t}function hX(e){if(Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function pX(e){const t=e.type,n=t==="image_url"?"image":t==="video_url"?"video":t==="audio_url"?"audio":null;if(n===null)return null;const s=e[n==="image"?"imageUrl":n==="video"?"videoUrl":"audioUrl"];if(typeof s!="object"||s===null)return null;const o=s.url;return typeof o=="string"?{kind:n,url:o}:null}function gX(e,t){if(!XJ.test(e))return;const n=hX(t);if(n===null)return;let i,s,o,r,l,a=null;for(const c of n){if(typeof c!="object"||c===null)continue;const d=c;if(d.type==="text"&&typeof d.text=="string"){const p=d.text,g=tX.exec(p);g&&(s=g[1],i=g[2]);const m=iX.exec(p);m?.[1]&&(o=m[1]);const y=sX.exec(p);y?.[1]&&(r=Number(y[1]));const w=oX.exec(p);w?.[1]&&w[2]&&(l=`${w[1]}x${w[2]}`);continue}const f=pX(d);f&&(a=f)}if(a===null)return;const u=eX.exec(a.url);return u?.[1]&&(o=u[1]),u?.[2]&&(r=fX(u[2])),{kind:a.kind??s??"image",url:a.url,path:i,fileId:a.url.startsWith("ms://")&&i!==void 0?l3(i):void 0,mimeType:o,bytes:Number.isFinite(r)?r:void 0,dimensions:l}}function F5(e){if(e!=null){if(typeof e=="string")return e.split(` -`);if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="string")t.push(...n.split(` -`));else if(n&&typeof n=="object"){const i=n;i.type==="text"&&typeof i.text=="string"?t.push(...i.text.split(` -`)):i.type==="think"&&typeof i.think=="string"?t.push(...i.think.split(` -`)):i.type==="image_url"||i.type==="image"?t.push("[image]"):typeof i.type=="string"?t.push(`[${i.type}]`):t.push(JSON.stringify(n))}return t.length>0?t:void 0}return[JSON.stringify(e)]}}function mX(e,t){if(so(e)==="task")for(const n of t??[]){const i=/^agent_id:\s*(\S+)\s*$/.exec(n);if(i?.[1])return i[1]}}function vX(e,t){return{id:e.agentId??e.id,toolCallId:e.parentToolCallId,name:e.description,subagentType:e.subagentType,prompt:e.command??t,model:e.model,thinkingEffort:e.thinkingEffort,phase:e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase??"working",status:e.status,summary:e.outputPreview,outputLines:e.outputLines,text:e.text,suspendedReason:e.suspendedReason,swarmIndex:e.swarmIndex}}function yX(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const i=typeof t.path=="string"?t.path:"";if(Array.isArray(t.diff))return{kind:"diff",path:i,diff:t.diff};const s=typeof t.old_text=="string"?t.old_text:typeof t.before=="string"?t.before:void 0,o=typeof t.new_text=="string"?t.new_text:typeof t.after=="string"?t.after:void 0;if(s!==void 0&&o!==void 0){const r=Nf(s,o)??Am(s,o);return{kind:"diff",path:i,diff:r}}return{kind:"diff",path:i,diff:[]}}if(n==="file_io"){const i=typeof t.path=="string"?t.path:"",s=typeof t.operation=="string"?t.operation:"";if(s==="write"&&typeof t.content=="string")return{kind:"file",path:i,content:t.content};if(s==="edit"&&typeof t.before=="string"&&typeof t.after=="string"){const r=Nf(t.before,t.after)??Am(t.before,t.after);return{kind:"diff",path:i,diff:r}}const o=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:s||n,path:i,detail:o}}if(n==="shell"||n==="command"){const i=typeof t.command=="string"?t.command:e.action;return{kind:"shell",command:i,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:RT(i)}}if(n==="file_content"||n==="file")return{kind:"file",path:typeof t.path=="string"?t.path:"",content:typeof t.content=="string"?t.content:"",language:typeof t.language=="string"?t.language:void 0};if(n==="file_op"||n==="fileop")return{kind:"fileop",op:typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,path:typeof t.path=="string"?t.path:"",detail:typeof t.detail=="string"?t.detail:void 0};if(n==="url_fetch"||n==="url")return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:typeof t.url=="string"?t.url:e.action};if(n==="search")return{kind:"search",query:typeof t.query=="string"?t.query:e.action,scope:typeof t.scope=="string"?t.scope:void 0};if(n==="invocation"||n==="agent_call"||n==="skill_call")return{kind:"invocation",kind2:typeof t.kind=="string"?t.kind:n,name:typeof t.name=="string"?t.name:e.toolName,description:typeof t.description=="string"?t.description:void 0};if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(o=>{const r=o??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const i=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:i,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function bX(e){const t=`<prompt> -`,n=` -</prompt>`,i=e.indexOf(t),s=e.lastIndexOf(n);return i>=0&&s>=i+t.length?e.slice(i+t.length,s):kX(e)}function kX(e){const t=e.split(` -`);return t.length>=2&&t[0]?.startsWith("<cron-fire ")&&t.at(-1)==="</cron-fire>"?t.slice(1,-1).join(` -`):e}function AX(e){const t=e.metadata?.origin;if(t?.kind==="cron_job"||t?.kind==="cron_missed")return t.kind}function CX(e){const t=e.content.filter(n=>n.type==="text").map(n=>n.text).join(` -`);return bX(t)}function wX(e,t){const n=e.metadata?.origin??{},i=CX(e);return t==="cron_missed"?{text:i,cron:{missedCount:typeof n.count=="number"?n.count:void 0}}:{text:i,cron:{jobId:typeof n.jobId=="string"?n.jobId:void 0,cron:typeof n.cron=="string"?n.cron:void 0,recurring:typeof n.recurring=="boolean"?n.recurring:void 0,coalescedCount:typeof n.coalescedCount=="number"?n.coalescedCount:void 0,stale:typeof n.stale=="boolean"?n.stale:void 0}}}function xX(e,t,n){const{text:i,cron:s}=wX(e,n);return{id:e.id,role:"cron",no:t,text:i,createdAt:e.createdAt,cron:s}}function _X(e){const t=e.metadata?.origin,n=t?.kind;return n===void 0||n==="user"?!0:n==="skill_activation"||n==="plugin_command"?t?.trigger==="user-slash":!1}function SX(e){return e.metadata?.origin?.kind==="compaction_summary"}function MX(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function IX(e){if(!e||e.length===0)return;const t="Plan saved to: ";for(const n of e)if(n.startsWith(t))return n.slice(t.length).trim()}function EX(e){const t=[];for(const n of e){const i=t.at(-1);n.type==="text"&&i?.type==="text"?i.text+=n.text:n.type==="thinking"&&i?.type==="thinking"?i.thinking+=n.thinking:n.type==="thinking"?t.push({type:"thinking",thinking:n.thinking}):t.push({...n})}return JSON.stringify(t)}function HT(e,t,n,i=!0,s={},o={},r){const l=[];let a=r?.startNo??1;const u=r?.collect,c=new Map;for(const m of t)c.set(m.toolCallId,m);let d=null;function f(m=!1){if(!d)return;const y=d;if(d=null,!m&&y.blocks.length===0&&y.textParts.length===0&&y.thinkingParts.length===0&&y.tools.length===0)return;if(!m||!i)for(let k=0;k<y.tools.length;k++){const A=y.tools[k];if(A.status!=="running")continue;const v={...A,status:"ok"};y.tools[k]=v;const x=y.blocks.find(S=>S.kind==="tool"&&S.tool.id===v.id);x&&x.kind==="tool"&&(x.tool=v)}const w={id:y.id,role:"assistant",no:a++,text:y.textParts.join(` -`),thinking:y.thinkingParts.length>0?y.thinkingParts.join(` -`):void 0,tools:y.tools.length>0?y.tools:void 0,blocks:y.blocks.length>0?y.blocks:void 0,approval:y.approval,approvalId:y.approvalId,durationMs:y.durationMs,createdAt:y.createdAt,endedAt:y.endedAt,goalContinuation:y.goalContinuation};l.push(w),u?.(w,y.sources)}function p(m,y){let w=null;for(const k of y)if(k.type==="text"){if(k.text){w==="text"?m.textParts[m.textParts.length-1]+=k.text:m.textParts.push(k.text);const A=m.blocks.at(-1);A&&A.kind==="text"?A.text+=(w==="text"?"":` -`)+k.text:m.blocks.push({kind:"text",text:k.text}),w="text"}}else if(k.type==="thinking"){if(k.thinking){w==="thinking"?m.thinkingParts[m.thinkingParts.length-1]+=k.thinking:m.thinkingParts.push(k.thinking);const A=m.blocks.at(-1);if(A&&A.kind==="thinking"){A.thinking+=(w==="thinking"?"":` -`)+k.thinking;const v=[A.startedAt,k.startedAt].filter(I=>I!==void 0).sort()[0],x=A.startedAt!==void 0&&A.durationMs===void 0||k.startedAt!==void 0&&k.durationMs===void 0,S=[A,k].flatMap(I=>I.startedAt!==void 0&&I.durationMs!==void 0?[Date.parse(I.startedAt)+I.durationMs]:[]);A.startedAt=v,A.durationMs=!x&&v!==void 0&&S.length>0?Math.max(...S)-Date.parse(v):void 0}else m.blocks.push({kind:"thinking",thinking:k.thinking,startedAt:k.startedAt,durationMs:k.durationMs});w="thinking"}}else if(k.type==="toolUse"){w=null;const A=c.get(k.toolCallId),v=k.toolName==="ExitPlanMode"?o[k.toolCallId]:void 0,x={id:k.toolCallId,name:k.toolName,arg:typeof k.input=="string"?k.input:JSON.stringify(k.input),agentId:so(k.toolName)==="task"?k.agentRefs?.find(S=>S.role!=="member")?.agentId??k.agentRefs?.[0]?.agentId:void 0,status:"running",output:k.outputLines,plan:v,planPath:k.toolName==="ExitPlanMode"?v?.path??s[k.toolCallId]?.path:void 0};m.tools.push(x),m.blocks.push({kind:"tool",tool:x}),A&&(m.approval=yX(A),m.approvalId=A.approvalId)}else if(k.type==="toolResult"){w=null;const A=m.tools.findIndex(v=>v.id===k.toolCallId);if(A!==-1){const v=m.tools[A],x=F5(k.output),S={...v,status:k.isError?"error":"ok",output:x,media:k.isError?void 0:gX(v.name,k.output),agentId:v.agentId??mX(v.name,x)};S.name==="ExitPlanMode"&&!S.planPath&&(S.planPath=IX(S.output)),m.tools[A]=S;const I=m.blocks.find(_=>_.kind==="tool"&&_.tool.id===k.toolCallId);I&&I.kind==="tool"&&(I.tool=S)}}else w=null}function g(m){if(m.type==="image"||m.type==="video"){const y=m.type,w=m.source;if(w.kind==="url")return{url:w.url,kind:y};if(w.kind==="base64")return{url:`data:${w.mediaType};base64,${w.data}`,kind:y};if(w.kind==="file"&&n)return{url:n(w.fileId),kind:y,fileId:w.fileId}}if(m.type==="file"&&n){if(m.mediaType.startsWith("image/"))return{url:n(m.fileId),kind:"image",fileId:m.fileId};if(m.mediaType.startsWith("video/"))return{url:n(m.fileId),kind:"video",fileId:m.fileId}}}for(const m of e){if(m.role==="system")continue;if(SX(m)){f();const v=m.metadata?.[zT],x={id:m.id,role:"compaction",no:a,text:m.content.filter(S=>S.type==="text").map(S=>S.text).join(` -`),compaction:{trigger:v?.trigger,tokensBefore:v?.tokensBefore,tokensAfter:v?.tokensAfter}};l.push(x),u?.(x,[m]);continue}if(m.role==="user"){const v=AX(m),x=m.metadata?.origin?.kind,S=x==="skill_activation"&&m.metadata?.origin?.trigger!=="user-slash";if(v===void 0&&(x==="injection"||S))continue;if(v===void 0&&(x==="task"||x==="background_task"||x==="task_notification")){const $=m.content.filter(R=>R.type==="text").map(R=>R.text).join(` -`),O=QJ(m.metadata),P=O!==void 0?[O]:GJ($);if(P.length>0){d??={id:m.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[m],createdAt:m.createdAt};for(const R of P)d.blocks.push({kind:"notification",notification:{...R,createdAt:m.createdAt}})}continue}if(f(),v!==void 0){const $=xX(m,a++,v);l.push($),u?.($,[m]);continue}if(x==="system_trigger"&&m.metadata?.origin?.name==="goal_continuation"){d={id:m.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[m],createdAt:m.createdAt,goalContinuation:!0};continue}if(!_X(m))continue;const I=m.metadata?.origin,_=I?.kind==="skill_activation"&&I?.trigger==="user-slash",E=I?.kind==="plugin_command"&&I?.trigger==="user-slash",N=[],D=[];for(const $ of m.content){if($.type==="text")if(_){const P=YA($.text);if(P&&(P.kind==="video"||P.kind==="image")&&n){const j=l3(P.path);if(j){D.push({url:n(j),kind:P.kind,fileId:j});continue}}const R=JA($.text);R&&D.push({kind:"file",url:R.fileId&&n?n(R.fileId):"",fileId:R.fileId,name:R.name,mediaType:R.mediaType,size:R.size})}else if(E)N.push(I.commandArgs??"");else{const P=YA($.text);if(P&&(P.kind==="video"||P.kind==="image")&&n){const z=l3(P.path);if(z){D.push({url:n(z),kind:P.kind,fileId:z});continue}}const R=JA($.text);if(R){D.push({kind:"file",url:R.fileId&&n?n(R.fileId):"",fileId:R.fileId,name:R.name,mediaType:R.mediaType,size:R.size});continue}const j=aX($.text);if(j!==$.text&&j.trim().length===0)continue;N.push(j)}const O=g($);if(O){D.push({url:O.url,kind:O.kind,name:$.type==="file"?$.name:void 0,fileId:O.fileId});continue}$.type==="file"&&n&&D.push({kind:"file",url:n($.fileId),fileId:$.fileId,name:$.name,mediaType:$.mediaType||void 0,size:$.size})}const T={id:m.id,role:"user",no:a++,text:_?I?.skillArgs??"":N.join(` -`),attachments:D.length>0?D:void 0,skillActivation:_?{name:I.skillName,args:I.skillArgs}:void 0,pluginCommand:E?{pluginId:I.pluginId,commandName:I.commandName,args:I.commandArgs}:void 0,createdAt:m.createdAt};l.push(T),u?.(T,[m]);continue}if(m.role==="tool"){d&&(d.sources.push(m),p(d,m.content),d.endedAt=m.createdAt);continue}const y=m.promptId;MX(d,y)?d!==null&&d.promptId===void 0&&y!==void 0&&(d.promptId=y):(f(),d={id:m.id,promptId:y,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[],durationMs:m.durationMs,createdAt:m.createdAt});const k=d;if(k===null)continue;const A=EX(m.content);k.promptId!==void 0&&k.seenSigs.has(A)||(k.seenSigs.add(A),k.sources.push(m),m.durationMs!==void 0&&(k.durationMs=m.durationMs),p(k,m.content),m.endedAt!==void 0?k.endedAt=m.endedAt:m.id!==k.id&&(k.endedAt=m.createdAt))}return f(!0),l}function TX(e,t,n){const i=e.items.filter(u=>u.kind==="turn"),s=i[0]?.turnId,o=i.length===1?s:void 0,r=new Map(e.tasks.map(u=>[u.taskId,u])),l=e.items.flatMap(u=>u.kind==="turn"?LX(u,e.attachments,r,u.turnId===s?n?.createdAt:void 0,u.turnId===o?n?.disposedAt:void 0):[]),a=e.meta.activity==="turn";return HT(l,[],t,a).map(FX)}function LX(e,t,n,i,s){const o=[],r=new Map(t.map(d=>[d.attachmentId,d])),l=BX([e.startedAt,...e.steps.map(d=>d.startedAt),i])??"",a=XA(e.endedAt)??XA(s),u=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 p=$X(r.get(f));p!==void 0&&d.push(p)}o.push({id:`${e.turnId}:input`,sessionId:"",role:"user",content:d,createdAt:l,promptId:u,metadata:e.origin.kind==="task"&&e.prompt.includes("<notification")?{origin:e.origin.payload??e.origin}:void 0})}for(const d of e.steps)for(const f of d.frames)if(f.kind==="text"){if(f.text.length===0)continue;if(f.role==="user"){if(f.taskId===void 0)continue;const p=NX(f.taskId,f.text,n.get(f.taskId));o.push({id:f.frameId,sessionId:"",role:"user",content:[{type:"text",text:f.text}],createdAt:d.startedAt??l,promptId:u,metadata:{origin:{kind:"task",taskId:f.taskId},[OT]:p}});continue}o.push({id:f.frameId,sessionId:"",role:"assistant",content:[{type:"text",text:f.text}],createdAt:d.startedAt??l,promptId:u})}else if(f.kind==="thinking"){if(f.text.length===0)continue;o.push({id:f.frameId,sessionId:"",role:"assistant",content:[{type:"thinking",thinking:f.text,startedAt:d.startedAt,durationMs:eC(d.startedAt,d.endedAt)}],createdAt:d.startedAt??l,promptId:u})}else f.kind==="tool"&&(o.push({id:`${f.frameId}:call`,sessionId:"",role:"assistant",content:[{type:"toolUse",toolCallId:f.toolCallId,toolName:f.name,input:f.input??f.display??{},outputLines:f.state==="running"?F5(f.output):void 0,agentRefs:f.agentRefs}],createdAt:d.startedAt??l,promptId:u}),f.state!=="running"&&o.push({id:`${f.frameId}:result`,sessionId:"",role:"tool",content:[{type:"toolResult",toolCallId:f.toolCallId,output:f.output??f.error??"",isError:f.state==="error"}],createdAt:d.endedAt??d.startedAt??l,promptId:u}));const c=e.durationMs??eC(l||void 0,a);if(c!==void 0){const d=o.findLastIndex(f=>f.role==="assistant");d>=0&&(o[d]={...o[d],durationMs:c})}return o}function NX(e,t,n){const[i="",...s]=t.split(` -`),o=n?.state??"info";return{id:`task:${e}:${o}`,category:"task",type:`task.${o}`,sourceKind:n?.kind==="subagent"?"subagent":"background_task",sourceId:e,agentId:n?.agentId,title:i.trim(),severity:o==="completed"?"info":"warning",body:s.join(` -`).trim(),raw:t}}function FX(e){if(e.createdAt!==""&&e.endedAt!=="")return e;const t={...e};return t.createdAt===""&&delete t.createdAt,t.endedAt===""&&delete t.endedAt,t}function BX(e){let t;for(const n of e){if(n===void 0)continue;const i=Date.parse(n);Number.isFinite(i)&&(t===void 0||i<t.time)&&(t={value:n,time:i})}return t?.value}function XA(e){return e!==void 0&&Number.isFinite(Date.parse(e))?e:void 0}function $X(e){if(e?.source!==void 0){if(e.mediaType.startsWith("image/"))return{type:"image",source:e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId}};if(e.mediaType.startsWith("video/"))return{type:"video",source:e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId}};if(e.source.kind==="file")return{type:"file",fileId:e.source.fileId,name:e.name??e.attachmentId,mediaType:e.mediaType,size:e.size??0}}}function eC(e,t){if(e===void 0||t===void 0)return;const n=Date.parse(t)-Date.parse(e);return Number.isFinite(n)&&n>=0?n:void 0}const tC=6e3,a3=256*1024,DX=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;function nC(e,t){return t===0?e:e-1}function zX(e,t){const n=Wl(t),i=[];let s=0;for(const o of e){if(o.type==="hunk"){const r=DX.exec(o.text);if(!r)return null;const l=nC(Number(r[1]),r[2]===void 0?1:Number(r[2])),a=nC(Number(r[3]),r[4]===void 0?1:Number(r[4]));if(a<s||a>n.length)return null;for(;s<a;)i.push(n[s++]);if(i.length!==l)return null;continue}if(o.oldNo===void 0&&o.newNo===void 0)return null;if(o.type==="del"){i.push(o.text);continue}if(s>=n.length||n[s]!==o.text)return null;s++,o.type==="context"&&i.push(o.text)}for(;s<n.length;)i.push(n[s++]);return i.join(` -`)}async function RX(e,t){if(t.truncated||e.length===0)return null;const n=await t.readNewText()??"";if(n.length>a3||Wl(n).length>tC)return null;const i=zX(e,n);return i===null||i.length>a3||Wl(i).length>tC?null:{before:i,after:n}}const OX=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function PX(e){return OX.has(e.type)}const jX=50,HX=100,u3=32*1024,WX={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,jX)},cancelTask(e){clearTimeout(e)}};function qX(e,t,n={}){const i=n.scheduler??WX,s=Math.max(1,Math.floor(n.maxItemsPerSlice??HX)),o=[];let r=0,l=null,a=null,u=0,c=!1;const d=()=>o.length-r,f=()=>{u+=1,l!==null&&(i.cancelFrame(l),l=null),a!==null&&(i.cancelTask(a),a=null)},p=()=>{r===o.length?(o.length=0,r=0):r>=1024&&(o.splice(0,r),r=0)};let g;const m=()=>{if(c||l!==null||a!==null||d()===0)return;const w=++u,k=()=>{w===u&&g()};l=i.requestFrame(k),a=i.requestTask(k)};g=()=>{f();let w=0;for(;!c&&w<s&&r<o.length;){const k=o[r++];e(k),w+=1}p(),m()};const y=(w=>{if(!c){if(t(w)){const k=o.length>r?o.at(-1):void 0,A=k===void 0?void 0:n.coalesce?.(k,w);A===void 0?o.push(w):o[o.length-1]=A,m();return}if(d()===0){e(w);return}o.push(w),g()}});return y.flush=()=>{if(!c){for(f();!c&&r<o.length;)e(o[r++]);p()}},y.discard=w=>{if(c||d()===0)return;let k=r;for(let A=r;A<o.length;A+=1){const v=o[A];w(v)||(o[k++]=v)}o.length=k,p(),d()===0?f():m()},y.dispose=()=>{c||(c=!0,f(),o.length=0,r=0)},y}function c3(e){if(e.type==="assistantDelta"){if(e.delta.text!==void 0&&e.delta.thinking===void 0)return{kind:"text",value:e.delta.text};if(e.delta.thinking!==void 0&&e.delta.text===void 0)return{kind:"thinking",value:e.delta.thinking}}}function UX(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,i=c3(t);if(n===void 0||i===void 0||n.kind!==i.kind||i.value.length<=u3)return[e];const s=[];let o=0;for(;o<i.value.length;){let r=Math.min(o+u3,i.value.length);r<i.value.length&&r>o&&/[\uD800-\uDBFF]/u.test(i.value[r-1])&&/[\uDC00-\uDFFF]/u.test(i.value[r])&&(r-=1);const l=i.value.slice(o,r);s.push({appEvent:{...t,delta:i.kind==="text"?{text:l}:{thinking:l}},meta:{...e.meta,stream:{...n,offset:n.offset+o}}}),o=r}return s}function KX(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,i=t.meta.stream,s=c3(e.appEvent),o=c3(t.appEvent);if(n===void 0||i===void 0||s===void 0||o===void 0||e.meta.sessionId!==t.meta.sessionId||e.appEvent.sessionId!==t.appEvent.sessionId||e.appEvent.messageId!==t.appEvent.messageId||e.appEvent.contentIndex!==t.appEvent.contentIndex||n.turnId!==i.turnId||n.kind!==i.kind||s.kind!==o.kind||n.kind!==s.kind||i.kind!==o.kind||i.offset!==n.offset+s.value.length||s.value.length+o.value.length>u3)return;const r=s.value+o.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:r}:{thinking:r}},meta:{...t.meta,stream:{...n}}}}function VX(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function ZX(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant")for(let i=n.content.length-1;i>=0;i--){const s=n.content[i];if(s.type!=="toolUse"||so(s.toolName)!=="todo")continue;let o=s.input;if(typeof o=="string")try{o=JSON.parse(o)}catch{continue}const r=o?.todos;if(Array.isArray(r))return r.flatMap(l=>{const a=l??{},u=typeof a.title=="string"?a.title:typeof a.content=="string"?a.content:"";return u?[{title:u,status:VX(a.status)}]:[]})}}return[]}function GX(e){return e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("old mode")||e.startsWith("new mode")||e.startsWith("similarity index")||e.startsWith("dissimilarity index")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("copy from")||e.startsWith("copy to")||e.startsWith("Binary files")}function QX(e){const t=[];if(!e)return t;let n=0,i=0,s=!1;for(const o of e.split(` -`)){if(o.startsWith("diff --git")){s=!1;continue}if(!s&&GX(o))continue;if(o.startsWith("@@")){const a=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(o);a&&(n=Number.parseInt(a[1],10),i=Number.parseInt(a[2],10)),s=!0,t.push({type:"hunk",text:o});continue}if(!s||o.startsWith("\\"))continue;const r=o.charAt(0),l=o.slice(1);r==="+"?(t.push({type:"add",text:l,newNo:i}),i+=1):r==="-"?(t.push({type:"del",text:l,oldNo:n}),n+=1):r===" "&&(t.push({type:"context",text:l,oldNo:n,newNo:i}),n+=1,i+=1)}return t}function iC(e){return e?e.split(` -`).map(t=>t.trimEnd()).filter(Boolean).at(-1)??"":""}function YX(e){return e.suspendedReason||iC(e.text)||iC(e.outputLines?.join(` -`))||e.summary||""}function JX(e){return e.suspendedReason?e.suspendedReason:e.text?e.text:e.outputLines&&e.outputLines.length>0?e.outputLines.join(` -`):e.summary??""}function XX(e){return e==="completed"?"completed":e==="failed"?"failed":e==="aborted"?"cancelled":"working"}function sC(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:XX(e.outcome),body:e.body}}function eee(e,t){return!!(t.agentId&&e.agentId===t.agentId||t.item&&e.name.includes(t.item))}function tee(e,t){const n=e.map(s=>({id:s.id,agentId:s.agentId,name:s.name,activity:YX(s),phase:s.phase,body:JX(s)}));if(!t)return n;const i=t.subagents.filter(s=>(s.outcome==="aborted"||s.state==="not_started")&&!e.some(o=>eee(o,s))).map((s,o)=>sC(s,o));return n.length>0?[...n,...i]:t.subagents.map((s,o)=>sC(s,o))}const nee=["queued","working","suspended","completed","failed","cancelled"];function WT(e){return e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase?e.subagentPhase:"working"}function iee(){return{queued:0,working:0,suspended:0,completed:0,failed:0,cancelled:0}}function see(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.swarmIndex===void 0)continue;const i=n.parentToolCallId??"swarm",s=t.get(i)??[];s.push({id:n.id,agentId:n.agentId,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,phase:WT(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,swarmIndex:n.swarmIndex}),t.set(i,s)}return[...t.entries()].map(([n,i])=>{const s=i.toSorted((r,l)=>r.swarmIndex-l.swarmIndex||r.id.localeCompare(l.id)),o=iee();for(const r of s)o[r.phase]++;return{id:n,members:s,counts:o}}).filter(n=>n.members.length>1).toSorted((n,i)=>{const s=n.members.at(0)?.swarmIndex??0,o=i.members.at(0)?.swarmIndex??0;return s!==o?s-o:n.id.localeCompare(i.id)})}function oee(e){let t=0,n=0;for(const i of e){n+=i.members.length;for(const s of nee)(s==="completed"||s==="failed"||s==="cancelled")&&(t+=i.counts[s])}return{done:t,total:n}}function ree(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||!n.parentToolCallId)continue;const i=t.get(n.parentToolCallId)??[];i.push({id:n.id,agentId:n.agentId,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,phase:WT(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,swarmIndex:n.swarmIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,i)}for(const[n,i]of t)t.set(n,i.toSorted((s,o)=>s.swarmIndex-o.swarmIndex||s.id.localeCompare(o.id)));return t}function B5(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function qT(e){for(const t of["path","file_path","filePath","filename"]){const n=e[t];if(typeof n=="string"&&n.length>0)return n}}const W1=100*1024;function UT(e){const t=so(e.name);if(t!=="edit"&&t!=="multi_edit")return null;const n=B5(e.arg);if(!n)return null;if(t==="edit"){if(n.replace_all===!0)return null;const l=typeof n.old_string=="string"?n.old_string:void 0,a=typeof n.new_string=="string"?n.new_string:void 0;return l===void 0||a===void 0||l.length>W1||a.length>W1?null:Nf(l,a)}const i=Array.isArray(n.edits)?n.edits:void 0;if(!i||i.length===0)return null;const s=[];let o=0,r=0;for(const l of i){if(!l||typeof l!="object")return null;const a=l;if(a.replace_all===!0)return null;const u=typeof a.old_string=="string"?a.old_string:void 0,c=typeof a.new_string=="string"?a.new_string:void 0;if(u===void 0||c===void 0||u.length>W1||c.length>W1)return null;const d=Nf(u,c);if(d===null)return null;s.length>0&&s.push({type:"hunk",text:"···"});for(const f of d)s.push({...f,oldNo:f.oldNo!==void 0?f.oldNo+o:void 0,newNo:f.newNo!==void 0?f.newNo+r:void 0});o+=Wl(u).length,r+=Wl(c).length}return s}const lee=5e3;function aee(e){if(so(e.name)!=="write")return null;const t=B5(e.arg);return!t||typeof t.content!="string"||t.content.length>W1||t.content.split(` -`).length>lee?null:{content:t.content,path:qT(t)}}function oC(e){const t=B5(e.arg);return t?qT(t):void 0}function KT(){let e=[],t=null,n=null,i=null,s,o=!0;const r=new WeakMap,l=a=>{const{messages:u,approvals:c}=a,d=a.sessionActive??!0,f=a.planReviewByToolCallId??{},p=a.plansByToolCallId??{},g=(I,_)=>r.set(I,_);let m=n!==null;if(m){const I=n,_=Object.keys(f);m=_.length===Object.keys(I).length&&_.every(E=>f[E]===I[E])}let y=i!==null;if(y){const I=i,_=Object.keys(p);y=_.length===Object.keys(I).length&&_.every(E=>p[E]===I[E])}const w=e.length>0&&c===t&&m&&y&&a.getFileUrl===s;let k=0,A=0,v=1;if(w){let I=-1;for(let _=e.length-1;_>=0;_--)if(e[_].role==="assistant"){I=_;break}for(let _=0;_<e.length;_++){const E=e[_],N=r.get(E);if(!N||N.length===0||_===I&&d!==o)break;let D=A+N.length<=u.length;for(let T=0;D&&T<N.length;T++)u[A+T]!==N[T]&&(D=!1);if(!D||_===I&&A+N.length!==u.length)break;k++,A+=N.length,E.role!=="compaction"&&v++}}const x=HT(u.slice(A),c,a.getFileUrl,d,f,p,{startNo:v,collect:g}),S=k>0?[...e.slice(0,k),...x]:x;return e=S,t=c,n={...f},i={...p},s=a.getFileUrl,o=d,S};return l.reset=()=>{e=[],t=null,n=null,i=null,s=void 0,o=!0},l}const VT=["light","dark","system"],uee=["small","medium","large","xlarge"],ty="medium",ZT="kimi-web.color-scheme",d3="kimi-web.font-scale",rC="kimi-web.ui-font-size";function f3(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function $5(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function cee(e){try{globalThis.localStorage.removeItem(e)}catch{}}function dee(){const e=f3(ZT);return e&&VT.includes(e)?e:"system"}const F0={light:"#ffffff",dark:"#121212"};function fee(e){if(typeof document>"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"?F0.dark:e==="light"?F0.light:null;t.forEach(i=>{const o=(i.getAttribute("media")??"").includes("dark")?F0.dark:F0.light;i.setAttribute("content",n??o)})}function GT(e){return uee.includes(e)}function hee(e){return e<=13?"small":e<=15?"medium":e<=17?"large":"xlarge"}function pee(){const e=f3(d3);if(e==="xxlarge")return"xlarge";if(e!==null)return GT(e)?e:ty;const t=f3(rC);if(t===null)return ty;const n=Number(t),i=Number.isFinite(n)?hee(n):ty;return $5(d3,i),cee(rC),i}function gee(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=e)}const D5=G(dee()),z5=G(pee());let lC=!1;function mee(){lC||(lC=!0,Ge(D5,fee,{immediate:!0}),Ge(z5,gee,{immediate:!0}))}function vee(e){VT.includes(e)&&(D5.value=e,$5(ZT,e))}function yee(e){GT(e)&&(z5.value=e,$5(d3,e))}function QT(){return mee(),{colorScheme:D5,fontScale:z5,setColorScheme:vee,setFontScale:yee}}const B0=G(!1);let aC=!1;function ny(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function ov(){return!aC&&typeof window<"u"&&typeof document<"u"&&(aC=!0,B0.value=ny(),new MutationObserver(()=>{B0.value=ny()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{B0.value=ny()})),B0}const bee=Symbol("KimiWebClientFacade"),kee="modulepreload",Aee=function(e){return"/"+e},uC={},Ji=function(t,n,i){let s=Promise.resolve();if(n&&n.length>0){let r=function(u){return Promise.all(u.map(c=>Promise.resolve(c).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(u=>{if(u=Aee(u),u in uC)return;uC[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":kee,c||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(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"&&o(l.reason);return t().catch(o)})};function Ma(e,t){const n=t??{h:"h",m:"m",s:"s"},i=Math.max(0,Math.floor(e/1e3));if(i<60)return i===0?"":`${i}${n.s}`;const s=Math.floor(i/60);if(s<60){const l=i%60;return l===0?`${s}${n.m}`:`${s}${n.m}${l}${n.s}`}const o=Math.floor(s/60),r=s%60;return r===0?`${o}${n.h}`:`${o}${n.h}${r}${n.m}`}const YT=new Set(["read","bash","grep","search","glob","ls","web_fetch","edit","write"]);function JT(e){const t=so(e);return t==="multi_edit"?"edit":t}function XT(e){const t=[],n=new Map;for(const i of e){if(i.kind==="thinking")continue;const s=JT(i.tool.name);let o=n.get(s);o||(o={count:0,errors:0},n.set(s,o),t.push(s)),o.count++,i.tool.status==="error"&&o.errors++}return{order:t,byKind:n}}function eL(e,t,n){return YT.has(t)?e(`tools.group.typed.${t}.done`,{count:n}):e("tools.group.countOther",{count:n})}function tL(e,t){return{text:e("tools.activity.failedClause",{count:t}),tone:"danger"}}function nL(e){return e.map(t=>t.fragments.map(n=>n.text).join("")).join(" · ")}function Cee(e,t,n={}){const{order:i,byKind:s}=XT(t),o=[];let r=!1;for(const l of i){const a=s.get(l);if(!a)continue;const u=[{text:eL(e,l,a.count),tone:"normal"}];a.errors>0&&(r=!0,u.push(tL(e,a.errors))),o.push({fragments:u})}if(n.durationMs!==void 0){const l=Ma(n.durationMs);l&&o.push({fragments:[{text:l,tone:"faint"}]})}return{clauses:o,plain:nL(o),hasError:r}}function wee(e,t){if(t.kind==="thinking")return{fragments:[{text:e("thinking.streaming"),tone:"normal"}]};const n=JT(t.tool.name);let i=N5(e,t.tool.name,t.tool.arg);if(n==="write"&&i){const o=e("tools.chip.created");i.endsWith(o)&&(i=i.slice(0,i.length-o.length).trimEnd())}return{fragments:[{text:i&&YT.has(n)?e(`tools.activity.doing.${n}`,{subject:i}):e("tools.activity.busy"),tone:"normal"}]}}function xee(e,t,n){const i=t.filter(c=>c!==n&&!(c.kind==="tool"&&c.tool.status==="running")),{order:s,byKind:o}=XT(i),r=e("tools.activity.liveDonePrefix"),l=[];for(const c of s){const d=o.get(c);if(!d)continue;const f=[{text:`${r}${eL(e,c,d.count)}`,tone:"faint"}];d.errors>0&&f.push(tL(e,d.errors)),l.push({fragments:f})}const a=n===null?null:wee(e,n),u=a?[a,...l]:l;return{current:a,done:l,plain:nL(u)}}async function no(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 _ee(e)}function _ee(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 See={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},Mee={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function Iee(e){const t=e?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!t)return;const n=Mee[t];if(n)return n;const i=t.lastIndexOf(".");if(!(i<=0))return See[t.slice(i+1)]}const Eee="kimi_desktop",Tee="platform",cC="kimi-desktop",dC="kimi-desktop-platform";function Lee(){let e=!1,t=null;try{const n=new URLSearchParams(window.location.search);n.has(Eee)?(sessionStorage.setItem(cC,"1"),e=!0):e=e||sessionStorage.getItem(cC)==="1";const i=n.get(Tee);i?(sessionStorage.setItem(dC,i),t=i):t=sessionStorage.getItem(dC)}catch{}return{isDesktop:e,platform:t}}const h3=Lee(),Hf=h3.isDesktop,$c=h3.isDesktop&&h3.platform==="darwin",Nee=["faces","nature","food","activity","objects","symbols"],Fee=[["😀","faces","grinning smile happy 笑 开心"],["😄","faces","smile happy joy 笑 开心 高兴"],["😁","faces","grin beaming 咧嘴笑 开心"],["😂","faces","joy laugh tears 笑哭 爆笑"],["🤣","faces","rofl laugh rolling 笑翻 爆笑"],["😊","faces","blush shy happy 微笑 害羞"],["😉","faces","wink 眨眼"],["😍","faces","heart eyes love 爱心眼 喜欢 爱"],["🥰","faces","smiling hearts love 爱心 喜欢"],["😘","faces","kiss 飞吻 亲亲"],["😋","faces","yum tongue 好吃 馋"],["🤪","faces","zany crazy 鬼脸 疯"],["🤔","faces","thinking hmm consider 思考 想"],["🤨","faces","skeptical eyebrow 怀疑 挑眉"],["😐","faces","neutral meh 面无表情 无语"],["😑","faces","expressionless 面无表情 无语"],["🙄","faces","eye roll 翻白眼 无语"],["😶","faces","no mouth silent 无言 沉默"],["🫡","faces","salute 敬礼 收到"],["🤫","faces","shush quiet 嘘 安静"],["🤭","faces","oops giggle 捂嘴 偷笑"],["😴","faces","sleeping sleepy 睡觉 困"],["😪","faces","sleepy tired 困 疲惫"],["😷","faces","mask sick 口罩 生病"],["🤒","faces","sick fever 生病 发烧"],["🤕","faces","hurt bandage 受伤"],["🤢","faces","nauseated 恶心"],["🤯","faces","mind blown explode 震惊 爆炸"],["🥳","faces","party celebrate 庆祝 派对"],["🤩","faces","star struck 星星眼 激动"],["😎","faces","cool sunglasses 酷 墨镜"],["🥸","faces","disguise 伪装 假扮"],["🤓","faces","nerd geek 书呆子 学霸"],["😢","faces","cry sad 哭 难过"],["😭","faces","sob cry loudly 大哭 痛哭"],["😤","faces","triumph huff 哼 生气"],["😡","faces","angry rage mad 生气 愤怒"],["🤬","faces","swearing cursing 骂人 爆粗"],["😱","faces","scream fear 尖叫 害怕"],["😨","faces","fearful 害怕 恐惧"],["🥵","faces","hot heat 热 出汗"],["🥶","faces","cold freezing 冷 冻"],["🥴","faces","woozy drunk 晕 醉"],["😇","faces","angel innocent 天使 无辜"],["🙃","faces","upside down silly 倒脸 哭笑不得"],["💀","faces","skull dead 骷髅 笑死"],["👻","faces","ghost 鬼 幽灵"],["👍","faces","thumbs up like good 赞 好"],["👎","faces","thumbs down dislike 踩 差"],["👏","faces","clap applause 鼓掌 厉害"],["🙌","faces","raise hands celebrate 举手 庆祝"],["🙏","faces","pray thanks please 拜托 感谢 祈祷"],["💪","faces","muscle strong flex 加油 强壮 肌肉"],["👀","faces","eyes look watch 看 围观 眼睛"],["🤝","faces","handshake deal 握手 合作"],["✌️","faces","victory peace 胜利 耶"],["👋","faces","wave hello bye 挥手 你好 再见"],["🤞","faces","crossed fingers luck 祈祷 好运"],["👌","faces","ok okay 好的 可以"],["🫶","faces","heart hands love 比心 爱心"],["✍️","faces","writing hand 写字 记录"],["🧠","faces","brain smart 大脑 聪明"],["🦾","faces","mechanical arm 机械臂 力量"],["👤","faces","person user profile 个人 用户"],["👥","faces","people team group 团队 多人"],["🐶","nature","dog puppy 狗 小狗"],["🐱","nature","cat kitten 猫 小猫"],["🐭","nature","mouse rat 老鼠"],["🐹","nature","hamster 仓鼠"],["🐰","nature","rabbit bunny 兔子"],["🦊","nature","fox 狐狸"],["🐻","nature","bear 熊"],["🐼","nature","panda 熊猫"],["🐨","nature","koala 考拉"],["🐯","nature","tiger 老虎"],["🦁","nature","lion 狮子"],["🐮","nature","cow 牛"],["🐷","nature","pig 猪"],["🐸","nature","frog 青蛙"],["🐵","nature","monkey 猴子"],["🐔","nature","chicken 鸡"],["🐧","nature","penguin 企鹅"],["🐦","nature","bird 鸟"],["🐣","nature","chick hatching 小鸡 孵化"],["🦆","nature","duck 鸭子"],["🦉","nature","owl 猫头鹰"],["🐝","nature","bee 蜜蜂"],["🐛","nature","bug caterpillar 虫子 毛虫"],["🦋","nature","butterfly 蝴蝶"],["🐌","nature","snail slow 蜗牛 慢"],["🐢","nature","turtle slow 乌龟 慢"],["🐍","nature","snake 蛇"],["🐙","nature","octopus 章鱼"],["🦑","nature","squid 鱿鱼"],["🦐","nature","shrimp 虾"],["🦀","nature","crab 螃蟹"],["🐠","nature","tropical fish 鱼 热带鱼"],["🐳","nature","whale 鲸鱼"],["🦈","nature","shark 鲨鱼"],["🐊","nature","crocodile 鳄鱼"],["🦄","nature","unicorn 独角兽"],["🐴","nature","horse 马"],["🐑","nature","sheep 羊 绵羊"],["🐐","nature","goat 山羊"],["🦜","nature","parrot 鹦鹉"],["🌸","nature","blossom flower sakura 樱花 花"],["🌹","nature","rose flower 玫瑰 花"],["🌻","nature","sunflower 向日葵"],["🌷","nature","tulip 郁金香"],["🌱","nature","seedling sprout 发芽 幼苗"],["🌲","nature","tree evergreen 树 松树"],["🌳","nature","deciduous tree 树 大树"],["🌵","nature","cactus 仙人掌"],["🍀","nature","clover luck 四叶草 幸运"],["🍁","nature","maple leaf autumn 枫叶 秋天"],["🍄","nature","mushroom 蘑菇"],["🌈","nature","rainbow 彩虹"],["☀️","nature","sun sunny 太阳 晴"],["🌙","nature","moon crescent 月亮"],["⭐","nature","star 星星"],["🌟","nature","glowing star 星星 闪亮"],["☁️","nature","cloud 云"],["⛅","nature","partly cloudy 多云"],["🌧️","nature","rain rainy 下雨"],["❄️","nature","snowflake snow 雪 雪花"],["⛄","nature","snowman 雪人"],["⚡","nature","lightning bolt 闪电"],["🔥","nature","fire hot 火 燃"],["🌊","nature","wave ocean sea 海浪"],["🏔️","nature","mountain snow 雪山 山"],["☕","food","coffee 咖啡"],["🍵","food","tea 茶"],["🧋","food","bubble tea boba 奶茶"],["🥛","food","milk 牛奶"],["🍺","food","beer 啤酒"],["🍷","food","wine 红酒"],["🥂","food","champagne cheers 香槟 干杯"],["🥤","food","cup straw soda 饮料 可乐"],["🧃","food","juice box 果汁"],["🍎","food","apple 苹果"],["🍊","food","orange tangerine 橙子 橘子"],["🍋","food","lemon 柠檬"],["🍉","food","watermelon 西瓜"],["🍓","food","strawberry 草莓"],["🍑","food","peach 桃子"],["🥭","food","mango 芒果"],["🍍","food","pineapple 菠萝"],["🥝","food","kiwi 猕猴桃"],["🍇","food","grapes 葡萄"],["🍒","food","cherries 樱桃"],["🥑","food","avocado 牛油果"],["🥦","food","broccoli 西兰花"],["🌽","food","corn 玉米"],["🌶️","food","hot pepper spicy 辣椒 辣"],["🍔","food","burger hamburger 汉堡"],["🍟","food","fries 薯条"],["🍕","food","pizza 披萨"],["🌭","food","hot dog 热狗"],["🥪","food","sandwich 三明治"],["🌮","food","taco 墨西哥卷"],["🍜","food","ramen noodles 拉面 面条"],["🍝","food","spaghetti pasta 意面"],["🍣","food","sushi 寿司"],["🍱","food","bento 便当"],["🥟","food","dumpling 饺子"],["🍚","food","rice 米饭"],["🍞","food","bread 面包"],["🥐","food","croissant 可颂 牛角包"],["🧀","food","cheese 奶酪 芝士"],["🍳","food","cooking egg 煎蛋 做饭"],["🍦","food","ice cream 冰淇淋"],["🍰","food","cake 蛋糕"],["🎂","food","birthday cake 生日蛋糕"],["🍫","food","chocolate 巧克力"],["🍩","food","donut doughnut 甜甜圈"],["🍪","food","cookie 饼干"],["🍭","food","lollipop 棒棒糖"],["⚽","activity","soccer football 足球"],["🏀","activity","basketball 篮球"],["🏈","activity","american football 橄榄球"],["⚾","activity","baseball 棒球"],["🎾","activity","tennis 网球"],["🏐","activity","volleyball 排球"],["🏓","activity","ping pong 乒乓球"],["🏸","activity","badminton 羽毛球"],["🥊","activity","boxing 拳击"],["⛳","activity","golf 高尔夫"],["🎣","activity","fishing 钓鱼"],["🏊","activity","swim 游泳"],["🏄","activity","surf 冲浪"],["🚴","activity","cycling 骑行"],["🏋️","activity","weightlifting gym 举重 健身"],["🧘","activity","yoga meditation 瑜伽 冥想"],["🎮","activity","video game controller 游戏 游戏机"],["🎲","activity","dice 骰子"],["🎯","activity","target bullseye 目标 靶心"],["🎳","activity","bowling 保龄球"],["🎰","activity","slot machine 老虎机"],["♟️","activity","chess 国际象棋 棋"],["🎸","activity","guitar 吉他"],["🎹","activity","piano keyboard 钢琴"],["🥁","activity","drum 鼓"],["🎤","activity","microphone sing 麦克风 唱歌"],["🎧","activity","headphones 耳机"],["🎬","activity","clapper movie 电影 拍摄"],["🎨","activity","art palette paint 画画 艺术"],["🎭","activity","theater masks 戏剧 面具"],["🎪","activity","circus 马戏团"],["🎡","activity","ferris wheel 摩天轮"],["✈️","activity","airplane travel flight 飞机 旅行"],["🚗","activity","car drive 汽车 车"],["🚕","activity","taxi 出租车"],["🚌","activity","bus 公交车"],["🚑","activity","ambulance 救护车"],["🚒","activity","fire engine 消防车"],["🚀","activity","rocket launch ship 火箭 发射"],["🛸","activity","ufo flying saucer 飞碟"],["🚲","activity","bicycle bike 自行车"],["🛴","activity","scooter 滑板车"],["🚄","activity","bullet train 高铁 动车"],["🚢","activity","ship 船 轮船"],["⛵","activity","sailboat 帆船"],["🏠","activity","house home 房子 家"],["🏢","activity","office building 公司 办公楼"],["🏥","activity","hospital 医院"],["🏫","activity","school 学校"],["🏖️","activity","beach vacation 海滩 度假"],["⛺","activity","camping tent 露营 帐篷"],["🌋","activity","volcano 火山"],["🗺️","activity","map world 地图"],["🧭","activity","compass 指南针"],["💻","objects","laptop computer 电脑 笔记本"],["🖥️","objects","desktop computer 台式机 电脑"],["⌨️","objects","keyboard 键盘"],["🖱️","objects","computer mouse 鼠标"],["📱","objects","phone mobile 手机"],["🔋","objects","battery 电池"],["🔌","objects","plug electric 插头"],["💾","objects","floppy save 软盘 保存"],["📀","objects","cd disc 光盘"],["🎥","objects","movie camera 摄像机"],["📷","objects","camera 相机"],["🔭","objects","telescope 望远镜"],["📡","objects","satellite antenna 卫星 天线"],["🌐","objects","globe web internet 网络 全球 互联网"],["🕯️","objects","candle 蜡烛"],["💡","objects","bulb idea light 灯泡 点子"],["🔦","objects","flashlight 手电筒"],["📁","objects","folder 文件夹"],["📂","objects","open folder 文件夹 打开"],["🗂️","objects","card index archive 归档 索引"],["📅","objects","calendar date 日历 日期"],["📌","objects","pin pushpin 图钉 置顶"],["📍","objects","round pin location 定位 位置"],["📎","objects","paperclip attachment 回形针 附件"],["✂️","objects","scissors cut 剪刀 剪切"],["📏","objects","ruler 尺子"],["📝","objects","memo note write 备忘 记录"],["✏️","objects","pencil edit write 铅笔 编辑"],["📄","objects","document page 文档 文件"],["📃","objects","page curl 文档 文件"],["📑","objects","bookmark tabs 标签页 文档"],["📚","objects","books 书 书籍"],["📖","objects","open book 打开的书 阅读"],["🔖","objects","bookmark 书签"],["🏷️","objects","label tag 标签"],["📊","objects","bar chart stats 图表 统计"],["📈","objects","chart up growth 上涨 增长"],["📉","objects","chart down 下跌 下降"],["🔍","objects","search magnifier 搜索 查找"],["🔎","objects","search magnifier right 搜索 查找"],["🔒","objects","lock locked 锁 锁定"],["🔓","objects","unlock open 解锁"],["🔑","objects","key 钥匙 密钥"],["🔧","objects","wrench tool 扳手 工具"],["🔨","objects","hammer 锤子"],["🛠️","objects","tools hammer wrench 工具 修理"],["🧰","objects","toolbox 工具箱 工具"],["🪛","objects","screwdriver 螺丝刀 工具"],["🔩","objects","nut and bolt screw 螺母 螺栓"],["🏗️","objects","building construction crane 施工 建造"],["⚙️","objects","gear settings 齿轮 设置"],["🧲","objects","magnet 磁铁"],["⚗️","objects","alembic 蒸馏器 实验"],["🧪","objects","test tube experiment 实验 试管"],["🔬","objects","microscope science 显微镜 科学"],["🤖","objects","robot bot 机器人"],["👾","objects","alien monster game 外星人 游戏"],["💣","objects","bomb 炸弹"],["🧨","objects","firecracker 爆竹"],["🗑️","objects","trash delete 垃圾桶 删除"],["🧹","objects","broom clean 扫帚 清理"],["🧻","objects","toilet paper 纸巾"],["🧽","objects","sponge 海绵"],["📦","objects","package box 包裹 箱子"],["✉️","objects","envelope mail 邮件 信封"],["📮","objects","mailbox postbox 邮箱"],["📧","objects","email mail 邮件"],["📥","objects","inbox tray receive 收件箱 接收"],["📤","objects","outbox tray send 发件箱 发送"],["📞","objects","telephone receiver call phone 电话 通话"],["💬","objects","speech balloon chat message bubble 聊天 对话 气泡 消息"],["💭","objects","thought balloon thinking 思考 想法 气泡"],["📣","objects","megaphone announcement 喇叭 公告"],["📢","objects","loudspeaker broadcast 广播 喇叭 通知"],["🚨","objects","police light alert emergency 警报 告警 紧急"],["🗳️","objects","ballot box vote 投票箱 投票"],["🔗","objects","link chain 链接 连接"],["🧩","objects","puzzle piece plugin 拼图 插件"],["🪄","objects","magic wand 魔法 魔杖"],["🛡️","objects","shield security 盾牌 安全"],["⚔️","objects","crossed swords 交叉剑 战斗"],["💳","objects","credit card 信用卡"],["💰","objects","money bag 钱袋 钱"],["🧾","objects","receipt 收据 小票"],["📿","objects","prayer beads 念珠"],["💍","objects","ring 戒指"],["👑","objects","crown 皇冠"],["🎩","objects","top hat 礼帽"],["🎒","objects","backpack 背包 书包"],["👓","objects","glasses 眼镜"],["🌂","objects","umbrella 雨伞"],["🕰️","objects","mantel clock 座钟"],["⌚","objects","watch 手表"],["⏱️","objects","stopwatch 秒表"],["🧯","objects","fire extinguisher 灭火器"],["🩹","objects","bandage patch fix 创可贴 补丁 修复"],["🎓","objects","graduation cap study learn 毕业 学习"],["🎫","objects","ticket 票 门票 工单"],["✅","symbols","check done complete 完成 对勾"],["✔️","symbols","checkmark correct 对勾 正确"],["❌","symbols","cross x wrong 错误 叉"],["❓","symbols","question help 问题 问号"],["❔","symbols","white question 问题 问号"],["❗","symbols","exclamation important 感叹号 重要"],["❕","symbols","white exclamation 感叹号"],["⚠️","symbols","warning caution 警告 注意"],["🚧","symbols","construction wip 施工 进行中"],["🚫","symbols","prohibited no 禁止"],["💥","symbols","boom explosion 爆炸"],["✨","symbols","sparkles shiny 闪亮 星星"],["🎉","symbols","tada party celebrate 庆祝 撒花"],["🎊","symbols","confetti party 庆祝 彩带"],["🏆","symbols","trophy champion 奖杯 冠军"],["🥇","symbols","gold medal first 金牌 第一"],["🥈","symbols","silver medal second 银牌 第二"],["🥉","symbols","bronze medal third 铜牌 第三"],["🎖️","symbols","military medal 勋章"],["🚩","symbols","red flag mark 红旗 标记"],["🏁","symbols","checkered flag finish 终点 完成"],["⏳","symbols","hourglass time waiting 沙漏 时间"],["⌛","symbols","hourglass done 沙漏 时间"],["🕐","symbols","clock one time 时钟 一点"],["⏰","symbols","alarm clock 闹钟"],["🔔","symbols","bell notification 铃铛 通知"],["🔕","symbols","bell slash mute 静音 免打扰"],["🕹️","symbols","joystick game 摇杆 游戏"],["🔴","symbols","red circle record 红圆 录制"],["🟢","symbols","green circle online 绿圆 在线"],["🟡","symbols","yellow circle 黄圆"],["🟠","symbols","orange circle 橙圆"],["🔵","symbols","blue circle 蓝圆"],["🟣","symbols","purple circle 紫圆"],["⚫","symbols","black circle 黑圆"],["⚪","symbols","white circle 白圆"],["🟥","symbols","red square 红方"],["🟩","symbols","green square 绿方"],["🟦","symbols","blue square 蓝方"],["🔺","symbols","red triangle up 三角 上"],["🔻","symbols","triangle down 三角 下"],["🔸","symbols","diamond orange 菱形"],["🔹","symbols","diamond blue 菱形"],["💠","symbols","diamond dot 菱形 花"],["🔶","symbols","diamond orange big 菱形"],["🔷","symbols","diamond blue big 菱形"],["▶️","symbols","play 播放"],["⏸️","symbols","pause 暂停"],["⏹️","symbols","stop 停止"],["⏺️","symbols","record 录制"],["⏩","symbols","fast forward 快进"],["⏪","symbols","rewind 快退"],["🔀","symbols","shuffle 随机 打乱"],["🔁","symbols","repeat 重复 循环"],["🔂","symbols","repeat one 单曲循环"],["🔄","symbols","refresh sync 刷新 同步"],["🔃","symbols","reload 重载"],["➕","symbols","plus add 加 新增"],["➖","symbols","minus 减"],["➗","symbols","divide 除"],["✖️","symbols","multiply 乘"],["💲","symbols","dollar money 美元 钱"],["™️","symbols","trademark 商标"],["©️","symbols","copyright 版权"],["®️","symbols","registered 注册商标"],["↔️","symbols","left right arrow 左右箭头"],["⬆️","symbols","up arrow 上箭头"],["⬇️","symbols","down arrow 下箭头"],["➡️","symbols","right arrow 右箭头"],["⬅️","symbols","left arrow 左箭头"],["🔙","symbols","back 返回"],["🔜","symbols","soon 很快"],["🔝","symbols","top 置顶 顶部"],["💤","symbols","zzz sleep 睡觉"],["🆕","symbols","new 新 新品"],["🆒","symbols","cool 酷"],["🆓","symbols","free 免费"],["🆗","symbols","ok 可以"],["🆙","symbols","up 提升"],["🆚","symbols","vs versus 对比"],["♾️","symbols","infinity 无限"],["💯","symbols","hundred perfect 满分 一百"],["💢","symbols","anger 生气"],["♨️","symbols","hot springs 温泉"],["🚸","symbols","children crossing 注意儿童"],["🔞","symbols","no one under eighteen 十八禁"],["📵","symbols","no mobile phones 禁止手机"],["❤️","symbols","red heart love 红心 爱"],["🧡","symbols","orange heart 橙心"],["💛","symbols","yellow heart 黄心"],["💚","symbols","green heart 绿心"],["💙","symbols","blue heart 蓝心"],["💜","symbols","purple heart 紫心"],["🖤","symbols","black heart 黑心"],["🤍","symbols","white heart 白心"],["🤎","symbols","brown heart 棕心"],["💔","symbols","broken heart 心碎"],["💕","symbols","two hearts 双心 爱心"],["💖","symbols","sparkling heart 闪亮的心"],["💗","symbols","growing heart 心动"]],iL=Fee.map(([e,t,n])=>({emoji:e,group:t,keywords:n}));function Bee(e,t=24){const n=e.trim().toLowerCase();if(!n)return[];const i=[];for(const s of iL)if((s.keywords.includes(n)||s.emoji===n)&&(i.push(s.emoji),i.length>=t))break;return i}const $ee=8;function Dee(e,t,n=$ee){return[t,...e.filter(i=>i!==t)].slice(0,n)}function sL(e,t){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const i=new Date,s=c=>String(c).padStart(2,"0"),o=`${s(n.getHours())}:${s(n.getMinutes())}`,r=n.getFullYear()===i.getFullYear(),l=n.getMonth()===i.getMonth(),a=n.getDate()===i.getDate();if(r&&l&&a)return o;const u=new Date(i);return u.setDate(i.getDate()-1),n.getFullYear()===u.getFullYear()&&n.getMonth()===u.getMonth()&&n.getDate()===u.getDate()?`${t} ${o}`:r?`${s(n.getMonth()+1)}-${s(n.getDate())} ${o}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${o}`}catch{return e}}function Ia(e){if(e>=1024*1024)return`${fC(e/(1024*1024))}M`;if(e>=1024){const t=e/1024;return`${t>=100?Math.round(t):fC(t)}k`}return String(e)}function fC(e){const t=e.toFixed(1);return t.endsWith(".0")?t.slice(0,-2):t}function Wf(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const zee=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function Jr(e){const t=e.replaceAll("\\","/"),n=zee.test(t),i=t.replace(/\/+$/,"");return n?i.toLowerCase():i}function Ree(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:i,sessionsHasMoreByWorkspace:s}=e,o=new Set(i.map(Jr)),r=new Map;for(const f of t){const p=Jr(f.root);o.has(p)||r.has(p)||r.set(p,{...f})}for(const f of n){const p=f.cwd;if(!p)continue;const g=Jr(p);o.has(g)||r.has(g)||r.set(g,{id:f.workspaceId??p,root:p,name:Wf(p),sessionCount:0})}const l=new Map;for(const f of t){const p=Jr(f.root);l.has(p)||l.set(p,f.id)}const a=new Map;for(const f of n){const p=l.get(Jr(f.cwd))??f.workspaceId??f.cwd;a.set(p,(a.get(p)??0)+1)}const u=[];for(const f of t){const p=Jr(f.root);!o.has(p)&&!u.includes(p)&&u.push(p)}const c=[...r.keys()].filter(f=>!u.includes(f));c.sort((f,p)=>r.get(f).root.localeCompare(r.get(p).root));const d=[];for(const f of[...u,...c]){const p=r.get(f),g=a.get(p.id)??a.get(p.root)??0,m=s[p.id]===!1?g:Math.max(p.sessionCount,g);d.push({...p,sessionCount:m})}return d}function Oee(e,t){if(e===void 0||e.length===0)return;const n=t?.find(i=>i.id===e)??t?.find(i=>i.model===e);return n?.displayName||n?.model||(e.includes("/")?e.split("/").pop():e)}function Pee(e){if(!(e===void 0||e.length===0||e==="off"||e==="on"))return e}function rv(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function oL(e){return e?.supportEfforts??[]}function jee(e){return e[Math.floor(e.length/2)]}function Vh(e){if(rv(e)==="unsupported")return"off";const t=oL(e);return t.length>0?e?.defaultEffort??jee(t):"on"}function bp(e){const t=oL(e),n=rv(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function p3(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function Hee(e){return e!=="off"}function Wee(e,t){return bp(e).includes(t)}function R5(e,t){return t==="off"?"off":t==="on"?Vh(e):t}function Cm(e,t){return t??Vh(e)}function qee(e,t){if(e==="off")return{enabled:!1};if(e==="on")return{enabled:!0};const n=t?.at(-1);return n!==void 0&&e===n?{enabled:!0}:{enabled:!0,effort:e}}function Uee(e,t,n){return!n||e===void 0?t:Vh(e)}let Kee=0;function g3(e,t){const n=++Kee;return e.pendingThinkingBySession[t]=n,n}function Ca(e,t,n){return n===void 0||e.pendingThinkingBySession[t]!==n?!1:(delete e.pendingThinkingBySession[t],!0)}function rL(e,t,n){e.pendingThinkingBySession[t]===void 0&&(e.thinkingBySession[t]=n)}function lL(){return window.kimiDesktop}function $0(){return typeof lL()?.getPathForFile=="function"}function aL(e){const t=lL()?.getPathForFile;if(typeof t!="function")return null;try{return t(e)}catch{return null}}function iy(e){return Array.from(e.dataTransfer?.items??[]).some(t=>t.kind==="file"&&t.type==="")}function m3(e,t=aL){const n=Array.from(e.dataTransfer?.items??[]);if(n.length===0)return{files:Array.from(e.dataTransfer?.files??[]),folderPaths:[]};const i=[],s=[],o=new Set;for(const r of n){if(r.kind!=="file")continue;const l=r.getAsFile();if(l)if(r.webkitGetAsEntry()?.isDirectory===!0){const a=t(l);if(!a||o.has(a))continue;o.add(a),s.push(a)}else i.push(l)}return{files:i,folderPaths:s}}function Vee(e,t=aL){return m3(e,t).folderPaths}const Zee=/<summary>([\s\S]*?)<\/summary>/,Gee=/<resume_hint>([\s\S]*?)<\/resume_hint>/,sy=/<subagent\b([^>]*)>|<\/subagent>/g,Qee="</subagent>",hC=/(completed|failed|aborted):\s*(\d+)/g,pC=/([a-z_]+)="([^"]*)"/g;function Yee(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function Jee(e){const t={};pC.lastIndex=0;let n;for(;(n=pC.exec(e))!==null;)t[n[1]]=Yee(n[2]);return t}function Xee(e){const t={completed:0,failed:0,aborted:0};hC.lastIndex=0;let n;for(;(n=hC.exec(e))!==null;){const i=n[1];t[i]=Number(n[2])}return t}function ete(e,t){const n=Jee(e);return{outcome:n.outcome??"completed",item:n.item,agentId:n.agent_id,mode:n.mode,state:n.state,body:t.trim()}}function tte(e){const t=[],n=[];sy.lastIndex=0;let i;for(;(i=sy.exec(e))!==null;)if(i[0]===Qee){if(n.length===0)continue;const s=n.pop();s&&n.length===0&&t.push(ete(s.attrs,e.slice(s.bodyStart,i.index)))}else n.length===0?n.push({attrs:i[1]??"",bodyStart:sy.lastIndex}):n.push(null);return t}function nte(e){if(e==null)return null;const t=Array.isArray(e)?e.join(` -`):e;if(!t.includes("<agent_swarm_result>"))return null;const n=Zee.exec(t)?.[1]?.trim()??"",{completed:i,failed:s,aborted:o}=Xee(n),r=Gee.exec(t)?.[1]?.trim(),l=tte(t),a=i+s+o;return{summary:n,completed:i,failed:s,aborted:o,total:a>0?a:l.length,subagents:l,resumeHint:r}}const ite=/^[A-Za-z]:[\\/]/;function gC(e){return ite.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function lv(e,t){if(!t)return null;const n=c=>c.replace(/\\/g,"/"),i=n(e);let s=n(t);s.length>1&&(s=s.replace(/\/+$/,""));const o=gC(s)||gC(i),r=o?s.toLowerCase():s,l=o?i.toLowerCase():i,a=r.endsWith("/")?r:`${r}/`;if(l!==r&&!l.startsWith(a))return null;const u=l===r?"":i.slice(a.length);return u.split("/").includes("..")?null:u||null}const wm="application/x-kimi-session-row";function ste(e,t){return e.includes(t)?e:[...e,t]}function uL(e,t){return e.includes(t)?e.filter(n=>n!==t):e}function ote(e,t){const n=new Set(t),i=new Map,s=[];for(const r of e)n.has(r.id)?i.set(r.id,r):s.push(r);const o=[];for(const r of t){const l=i.get(r);l!==void 0&&o.push(l)}return{pinned:o,unpinned:s}}function rte(e,t,n){return e.find(i=>i.window?.duration===t&&i.window?.unit===n)}const lte=30;function ate(e){return e!==void 0&&e<lte}function cL(e,t){if(e.window!==void 0){const{duration:n,unit:i}=e.window;return i==="week"?t("settings.planUsage.weekLimit",{n}):i==="day"?t("settings.planUsage.dayLimit",{n}):i==="hour"?t("settings.planUsage.hourLimit",{n}):t("settings.planUsage.minuteLimit",{n})}return e.name??t("settings.planUsage.genericLimit")}function dL(e,t){const n=Date.parse(e);if(Number.isNaN(n))return"";const i=Math.floor((n-Date.now())/1e3);if(i<=0)return t("settings.planUsage.resetDone");const s=Math.floor(i/86400),o=Math.floor(i%86400/3600),r=Math.floor(i%3600/60),l=[];return s>0?(l.push(t("settings.planUsage.durationDay",{n:s})),l.push(t("settings.planUsage.durationHour",{n:o})),l.push(t("settings.planUsage.durationMinute",{n:r}))):o>0?(l.push(t("settings.planUsage.durationHour",{n:o})),l.push(t("settings.planUsage.durationMinute",{n:r}))):r>0?l.push(t("settings.planUsage.durationMinute",{n:r})):l.push(t("settings.planUsage.durationSecond",{n:i})),t("settings.planUsage.resetsIn",{duration:l.join(" ")})}function v3(e,t){if(t<=0)return"ok";const n=e/t;return n>=.85?"danger":n>=.5?"warn":"ok"}function Cg(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))}function ute(e,t){const n=(e/100).toFixed(2);switch(t.toUpperCase()){case"CNY":return{symbol:"¥",number:n};case"USD":return{symbol:"$",number:n};default:return{symbol:"",number:`${n} ${t}`}}}const cte=["kimi","openai","openai_responses","anthropic","google-genai","vertexai"];function D0(){return{model:"",maxContextSize:"",displayName:"",capabilities:["tool_use","thinking"],supportEfforts:[],adaptiveThinking:!0}}function y3(e,t){const n=[];for(const i of Object.values(t??{})){if(i===null||typeof i!="object")continue;const s=i;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(o=>typeof o=="string"):[],supportEfforts:Array.isArray(s.supportEfforts)?s.supportEfforts.filter(o=>typeof o=="string"):[],...typeof s.adaptiveThinking=="boolean"?{adaptiveThinking:s.adaptiveThinking}:{}})}return n}const fL=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function dte(e,t={}){const n=e.id.trim();if(n==="")return"idRequired";if(!fL.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 i of e.models){if(i.model.trim()==="")return"modelRequired";const s=i.maxContextSize.trim();if(s==="")return"contextSizeRequired";if(!/^\d+$/.test(s)||Number(s)<1)return"contextSizeInvalid"}return null}function hL(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 fte(e){const t=e.apiKey.trim(),n=e.baseUrl.trim();return{id:e.id.trim(),type:e.type,models:hL(e.models),...t===""?{}:{apiKey:t},...n===""?{}:{baseUrl:n}}}function hte(e,t,n){const i=hL(e.models),s=e.id.trim(),o=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:i,...o===""&&n?.includeBlankApiKey!==!0?{}:{apiKey:o},...r===""?{}:{baseUrl:r},...a!==""&&i.some(u=>u.model===a)?{defaultModel:a}:{}}}function pL(e){return e.id==="managed:kimi-code"&&e.type==="kimi"}const pte=/^(\d+)\t(.*)$/;function gte(e){const t=e.at(-1)===""?e.slice(0,-1):e;if(t.length===0)return null;const n=[],i=[];for(const s of t){const o=pte.exec(s);if(!o)return null;i.push(Number(o[1])),n.push(o[2]??"")}return{contents:n,lineNumbers:i}}function gL(e,t){for(const n of e.stateMachineNames){const i=(e.stateMachineInputs(n)??[]).find(s=>s.name===t);if(i!==void 0)return i}return null}function mte(e,t){const n=gL(e,t);return n!==null&&typeof n.fire=="function"?(n.fire(),!0):!1}function mC(e,t,n){const i=gL(e,t);return i!==null&&typeof i.value==typeof n?(i.value=n,!0):!1}const vte={"&":"&","<":"<",">":">",'"':""","'":"'"};function vC(e){return e.replace(/[&<>"']/g,t=>vte[t]??t)}function yte(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function bte(e,t,n=40){const i=e.replace(/\s+/g," ").trim();if(i.length===0)return"";const s=t.trim();if(s.length===0)return yC(i,n*2);const o=i.toLowerCase().indexOf(s.toLowerCase());if(o<0)return yC(i,n*2);const r=Math.max(0,o-n),l=Math.min(i.length,o+s.length+n),a=r>0,u=l<i.length;return`${a?"…":""}${i.slice(r,l)}${u?"…":""}`}function yC(e,t){return e.length<=t?e:`${e.slice(0,t)}…`}function oy(e,t){const n=vC(e),i=t.trim();if(i.length===0)return n;const s=new RegExp(yte(vC(i)),"gi");return n.replace(s,o=>`<mark>${o}</mark>`)}const Ys="kimi-web.server-credential",kte="token",Ate=10080*60*1e3;let zl;const b3=new Set;function Cte(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(kte);if(!n)return;const i=new URL(window.location.href);return i.hash="",window.history.replaceState(window.history.state,"",`${i.pathname}${i.search}`),n}function k3(e){return{version:1,credential:e,expiresAt:Date.now()+Ate}}function wte(e){return JSON.stringify(e)}function O5(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 A3(e){globalThis.localStorage?.setItem(Ys,wte(e))}function xte(){try{const e=globalThis.localStorage?.getItem(Ys);if(e){const n=O5(e);if(n===void 0){const i=k3(e);let s=!1;try{A3(i),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(Ys)===e&&globalThis.localStorage?.removeItem(Ys),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(Ys)}catch{}return s?i:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(Ys),globalThis.localStorage?.getItem(Ys)===e&&globalThis.localStorage?.removeItem(Ys);return}const t=globalThis.sessionStorage?.getItem(Ys);if(t){const n=k3(t);let i=!1;try{A3(n),i=!0}catch{}try{globalThis.sessionStorage?.removeItem(Ys),i=!0}catch{}return i?n:void 0}return}catch{return}}function _te(){const e=Cte();return e?(mL(e),!0):(zl=xte(),zl!==void 0)}function Ste(){if(zl!==void 0){if(zl.expiresAt<=Date.now()){Mte(zl);return}return zl.credential}}function Mte(e){zl=void 0;try{globalThis.sessionStorage?.removeItem(Ys);const t=globalThis.localStorage?.getItem(Ys),n=t==null?void 0:O5(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(Ys)}catch{}}function mL(e){const t=k3(e);zl=t;try{A3(t)}catch{}try{globalThis.sessionStorage?.removeItem(Ys)}catch{}}function Ite(){const e=zl;zl=void 0;try{const t=globalThis.localStorage?.getItem(Ys),i=(t==null?void 0:O5(t))?.credential??t;e!==void 0&&i===e.credential&&globalThis.localStorage?.removeItem(Ys),globalThis.sessionStorage?.removeItem(Ys)}catch{}}function Ete(e){return b3.add(e),()=>{b3.delete(e)}}function Tte(){Ite();for(const e of b3)try{e()}catch{}}function P5(e){return e.approvalCount>0?"awaiting-approval":e.questionCount>0?"awaiting-question":e.pendingInteraction==="approval"?"awaiting-approval":e.pendingInteraction==="question"?"awaiting-question":e.busy?"running":e.lastTurnReason==="failed"?"aborted":e.unread?"unread":"idle"}let bC;function Lte(e){if(typeof Intl.Segmenter=="function")return bC??=new Intl.Segmenter("und",{granularity:"grapheme"}),bC.segment(e)}const Nte=/\p{Emoji_Presentation}/u,Fte=/\p{Regional_Indicator}/u,Bte=/\p{Extended_Pictographic}/u,$te="️";function Dte(e){return Nte.test(e)||Fte.test(e)?!0:Bte.test(e)&&e.includes($te)}function vL(e){const t=Lte(e)?.[Symbol.iterator]().next().value;if(t===void 0||!Dte(t.segment))return{emoji:null,rest:e};const n=e.slice(t.index+t.segment.length).replace(/^\s+/,"");return{emoji:t.segment,rest:n}}function zte(e,t){const{rest:n}=vL(e),i=t?.trim()??"";return i?n?`${i} ${n}`:i:n}function Rte(e,t){const n=e.findIndex(o=>o.id===t.id);if(n!==-1&&e[n].updatedAt===t.updatedAt)return e.map(o=>o.id===t.id?t:o);const i=e.filter(o=>o.id!==t.id),s=i.findIndex(o=>o.updatedAt<t.updatedAt);return s===-1?[...i,t]:[...i.slice(0,s),t,...i.slice(s)]}const C3="/sessions/";function kC(e){const{pathname:t}=e;if(!t.startsWith(C3))return;const n=t.slice(C3.length);if(!(!n||n.includes("/")))try{const i=decodeURIComponent(n);return i.length>0?i:void 0}catch{return}}function Ote(e){return e===void 0||e.length===0?"/":`${C3}${encodeURIComponent(e)}`}function zu(e){return Array.isArray?Array.isArray(e):bL(e)==="[object Array]"}function Pte(e){if(typeof e=="string")return e;if(typeof e=="bigint")return e.toString();const t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function w3(e){return e==null?"":Pte(e)}function mo(e){return typeof e=="string"}function wg(e){return typeof e=="number"}function jte(e){return e===!0||e===!1||Hte(e)&&bL(e)=="[object Boolean]"}function yL(e){return typeof e=="object"}function Hte(e){return yL(e)&&e!==null}function hr(e){return e!=null}function z0(e){return!e.trim().length}function bL(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Wte="Incorrect 'index' type",x3="Invalid doc index: must be a non-negative integer within the bounds of the docs array",qte=e=>`Invalid value for key ${e}`,Ute=e=>`Pattern length exceeds max of ${e}.`,Kte=e=>`Missing ${e} property in key`,Vte=e=>`Property 'weight' in key '${e}' must be a positive integer`,Zte="Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.",AC=Object.prototype.hasOwnProperty;var Gte=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{const i=kL(n);this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function kL(e){let t=null,n=null,i=null,s=1,o=null;if(mo(e)||zu(e))i=e,t=CC(e),n=xg(e);else{if(!AC.call(e,"name"))throw new Error(Kte("name"));const r=e.name;if(i=r,AC.call(e,"weight")&&e.weight!==void 0&&(s=e.weight,s<=0))throw new Error(Vte(xg(r)));t=CC(r),n=xg(r),o=e.getFn??null}return{path:t,id:n,weight:s,src:i,getFn:o}}function CC(e){return zu(e)?e:e.split(".")}function xg(e){return zu(e)?e.join("."):e}function Qte(e,t){const n=[];let i=!1;const s=(o,r,l,a)=>{if(hr(o))if(!r[l])n.push(a!==void 0?{v:o,i:a}:o);else{const u=o[r[l]];if(!hr(u))return;if(l===r.length-1&&(mo(u)||wg(u)||jte(u)||typeof u=="bigint"))n.push(a!==void 0?{v:w3(u),i:a}:w3(u));else if(zu(u)){i=!0;for(let c=0,d=u.length;c<d;c+=1)s(u[c],r,l+1,c)}else r.length&&s(u,r,l+1,a)}};return s(e,mo(t)?t.split("."):t,0),i?n:n[0]}const Yte={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Jte={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Xte={location:0,threshold:.6,distance:100},ene={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:Qte,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},vn=Object.freeze({...Jte,...Yte,...Xte,...ene});function tne(e){return e>=9&&e<=13||e===32||e===160}function nne(e=1,t=3){const n=new Map,i=Math.pow(10,t);return{get(s){let o=0,r=!1;for(let a=0;a<s.length;a++)tne(s.charCodeAt(a))?r=!1:r||(o++,r=!0);if(o===0&&(o=1),n.has(o))return n.get(o);const l=Math.round(i/Math.pow(o,.5*e))/i;return n.set(o,l),l},clear(){n.clear()}}}var j5=class{constructor({getFn:e=vn.getFn,fieldNormWeight:t=vn.fieldNormWeight}={}){this.norm=nne(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,n)=>{this._keysMap[t.id]=n})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(mo(this.docs[0]))for(let n=0;n<e;n++){const i=this._createStringRecord(this.docs[n],n);i&&(this.records[t++]=i)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(x3);if(mo(e)){const i=this._createStringRecord(e,t);return i&&this.records.push(i),i}const n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(x3);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const i of e)Number.isInteger(i)&&i>=0&&t.add(i);if(t.size===0)return;this.records=this.records.filter(i=>!t.has(i.i));const n=Array.from(t).sort((i,s)=>i-s);for(const i of this.records){let s=0,o=n.length;for(;s<o;){const r=s+o>>>1;n[r]<i.i?s=r+1:o=r}i.i-=s}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!hr(e)||z0(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const n={i:t,$:{}};for(let i=0,s=this.keys.length;i<s;i++){const o=this.keys[i],r=o.getFn?o.getFn(e):this.getFn(e,o.path);if(hr(r)){if(zu(r)){const l=[];for(let a=0,u=r.length;a<u;a+=1){const c=r[a];if(hr(c)){if(mo(c)){if(!z0(c)){const d={v:c,i:a,n:this.norm.get(c)};l.push(d)}}else if(hr(c.v)){const d=mo(c.v)?c.v:w3(c.v);if(!z0(d)){const f={v:d,i:c.i,n:this.norm.get(d)};l.push(f)}}}}n.$[i]=l}else if(mo(r)&&!z0(r)){const l={v:r,n:this.norm.get(r)};n.$[i]=l}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function AL(e,t,{getFn:n=vn.getFn,fieldNormWeight:i=vn.fieldNormWeight}={}){const s=new j5({getFn:n,fieldNormWeight:i});return s.setKeys(e.map(kL)),s.setSources(t),s.create(),s}function ine(e,{getFn:t=vn.getFn,fieldNormWeight:n=vn.fieldNormWeight}={}){const{keys:i,records:s}=e,o=new j5({getFn:t,fieldNormWeight:n});return o.setKeys(i),o.setIndexRecords(s),o}function sne(e=[],t=vn.minMatchCharLength){const n=[];let i=-1,s=-1,o=0;for(let r=e.length;o<r;o+=1){const l=e[o];l&&i===-1?i=o:!l&&i!==-1&&(s=o-1,s-i+1>=t&&n.push([i,s]),i=-1)}return e[o-1]&&o-i>=t&&n.push([i,o-1]),n}function one(e,t,n,{location:i=vn.location,distance:s=vn.distance,threshold:o=vn.threshold,findAllMatches:r=vn.findAllMatches,minMatchCharLength:l=vn.minMatchCharLength,includeMatches:a=vn.includeMatches,ignoreLocation:u=vn.ignoreLocation}={}){if(t.length>32)throw new Error(Ute(32));const c=t.length,d=e.length,f=Math.max(0,Math.min(i,d));let p=o,g=f;const m=(E,N)=>{const D=E/c;if(u)return D;const T=Math.abs(f-N);return s?D+T/s:T?1:D},y=l>1||a,w=y?Array(d):[];let k;for(;(k=e.indexOf(t,g))>-1;){const E=m(0,k);if(p=Math.min(E,p),g=k+c,y){let N=0;for(;N<c;)w[k+N]=1,N+=1}}g=-1;let A=[],v=1,x=0,S=c+d;const I=1<<c-1;for(let E=0;E<c;E+=1){let N=0,D=S;for(;N<D;)m(E,f+D)<=p?N=D:S=D,D=Math.floor((S-N)/2+N);S=D;let T=Math.max(1,f-D+1);const $=r?d:Math.min(f+D,d)+c,O=Array($+2);O[$+1]=(1<<E)-1;for(let P=$;P>=T;P-=1){const R=P-1,j=n[e[R]];if(O[P]=(O[P+1]<<1|1)&j,E&&(O[P]|=(A[P+1]|A[P])<<1|1|A[P+1]),O[P]&I&&(v=m(E,R),v<=p)){if(p=v,g=R,x=E,g<=f)break;T=Math.max(1,2*f-g)}}if(m(E+1,f)>p)break;A=O}if(y&&g>=0){const E=Math.min(d-1,g+c-1+x);for(let N=g;N<=E;N+=1)n[e[N]]&&(w[N]=1)}const _={isMatch:g>=0,score:Math.max(.001,v)};if(y){const E=sne(w,l);E.length?a&&(_.indices=E):_.isMatch=!1}return _}function rne(e){const t={};for(let n=0,i=e.length;n<i;n+=1){const s=e.charAt(n);t[s]=(t[s]||0)|1<<i-n-1}return t}function H5(e){if(e.length<=1)return e;e.sort((n,i)=>n[0]-i[0]||n[1]-i[1]);const t=[e[0]];for(let n=1,i=e.length;n<i;n+=1){const s=t[t.length-1],o=e[n];o[0]<=s[1]+1?s[1]=Math.max(s[1],o[1]):t.push(o)}return t}const CL={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},lne=new RegExp("["+Object.keys(CL).join("")+"]","g"),Zh=typeof String.prototype.normalize=="function"?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(lne,t=>CL[t]):e=>e;var W5=class{constructor(e,{location:t=vn.location,threshold:n=vn.threshold,distance:i=vn.distance,includeMatches:s=vn.includeMatches,findAllMatches:o=vn.findAllMatches,minMatchCharLength:r=vn.minMatchCharLength,isCaseSensitive:l=vn.isCaseSensitive,ignoreDiacritics:a=vn.ignoreDiacritics,ignoreLocation:u=vn.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:i,includeMatches:s,findAllMatches:o,minMatchCharLength:r,isCaseSensitive:l,ignoreDiacritics:a,ignoreLocation:u},e=l?e:e.toLowerCase(),e=a?Zh(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const c=(f,p)=>{this.chunks.push({pattern:f,alphabet:rne(f),startIndex:p})},d=this.pattern.length;if(d>32){let f=0;const p=d%32,g=d-p;for(;f<g;)c(this.pattern.substr(f,32),f),f+=32;if(p){const m=d-32;c(this.pattern.substr(m),m)}}else c(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i}=this.options;if(e=t?e:e.toLowerCase(),e=n?Zh(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};const g={isMatch:!0,score:0};return i&&(g.indices=[[0,e.length-1]]),g}const{location:s,distance:o,threshold:r,findAllMatches:l,minMatchCharLength:a,ignoreLocation:u}=this.options,c=[];let d=0,f=!1;this.chunks.forEach(({pattern:g,alphabet:m,startIndex:y})=>{const{isMatch:w,score:k,indices:A}=one(e,g,m,{location:s+y,distance:o,threshold:r,findAllMatches:l,minMatchCharLength:a,includeMatches:i,ignoreLocation:u});w&&(f=!0),d+=k,w&&A&&c.push(...A)});const p={isMatch:f,score:f?d/this.chunks.length:1};return f&&i&&(p.indices=H5(c)),p}};const ane=new Set(["fuzzy","include"]);function une(e){return e.startsWith("inverse")}const _3=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const n=t===e;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n=0,i;const s=[],o=e.length;for(;(i=t.indexOf(e,n))>-1;)n=i+o,s.push([i,n-1]);const r=!!s.length;return{isMatch:r,score:r?0:1,indices:s}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const n=t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const n=!t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const n=!t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const n=t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const n=t.indexOf(e)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const n=new W5(e,{location:t.location??vn.location,threshold:t.threshold??vn.threshold,distance:t.distance??vn.distance,includeMatches:t.includeMatches??vn.includeMatches,findAllMatches:t.findAllMatches??vn.findAllMatches,minMatchCharLength:t.minMatchCharLength??vn.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??vn.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??vn.ignoreDiacritics,ignoreLocation:t.ignoreLocation??vn.ignoreLocation});return{type:"fuzzy",search(i){return n.searchIn(i)}}}}],wC=_3.length,cne="\0",dne="|";function fne(e){const t=[],n=e.length;let i=0;for(;i<n;){for(;i<n&&e[i]===" ";)i++;if(i>=n)break;let s=i;for(;s<n&&e[s]!==" "&&e[s]!=='"';)s++;if(s<n&&e[s]==='"'){for(s++;s<n;){if(e[s]==='"'){const o=s+1;if(o>=n||e[o]===" "){s++;break}if(e[o]==="$"&&(o+1>=n||e[o+1]===" ")){s+=2;break}}s++}t.push(e.substring(i,s)),i=s}else{for(;s<n&&e[s]!==" ";)s++;t.push(e.substring(i,s)),i=s}}return t}function xC(e,t){const n=e.match(t);return n?n[1]:null}function hne(e,t={}){return e.replace(/\\\|/g,cne).split(dne).map(n=>{const i=fne(n.replace(/\u0000/g,"|").trim()).filter(o=>o&&!!o.trim()),s=[];for(let o=0,r=i.length;o<r;o+=1){const l=i[o];let a=!1,u=-1;for(;!a&&++u<wC;){const c=_3[u],d=xC(l,c.multiRegex);d&&(s.push(c.create(d,t)),a=!0)}if(!a)for(u=-1;++u<wC;){const c=_3[u],d=xC(l,c.singleRegex);if(d){s.push(c.create(d,t));break}}}return s})}var pne=class{constructor(e,{isCaseSensitive:t=vn.isCaseSensitive,ignoreDiacritics:n=vn.ignoreDiacritics,includeMatches:i=vn.includeMatches,minMatchCharLength:s=vn.minMatchCharLength,ignoreLocation:o=vn.ignoreLocation,findAllMatches:r=vn.findAllMatches,location:l=vn.location,threshold:a=vn.threshold,distance:u=vn.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i,minMatchCharLength:s,findAllMatches:r,ignoreLocation:o,location:l,threshold:a,distance:u},e=t?e:e.toLowerCase(),e=n?Zh(e):e,this.pattern=e,this.query=hne(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:i,ignoreDiacritics:s}=this.options;e=i?e:e.toLowerCase(),e=s?Zh(e):e;let o=0;const r=[];let l=0,a=!1;for(let u=0,c=t.length;u<c;u+=1){const d=t[u];r.length=0,o=0,a=!1;for(let f=0,p=d.length;f<p;f+=1){const g=d[f],{isMatch:m,indices:y,score:w}=g.search(e);if(m)o+=1,l+=w,une(g.type)&&(a=!0),n&&(ane.has(g.type)?r.push(...y):r.push(y));else{l=0,o=0,r.length=0,a=!1;break}}if(o){const f={isMatch:!0,score:l/o};return a&&(f.hasInverse=!0),n&&(f.indices=H5(r)),f}}return{isMatch:!1,score:1}}};const S3=[];function q5(...e){S3.push(...e)}function xm(e,t){for(let n=0,i=S3.length;n<i;n+=1){const s=S3[n];if(s.condition(e,t))return new s(e,t)}return new W5(e,t)}const _m={AND:"$and",OR:"$or"},M3={PATH:"$path",PATTERN:"$val"},I3=e=>!!(e[_m.AND]||e[_m.OR]),gne=e=>!!e[M3.PATH],mne=e=>!zu(e)&&yL(e)&&!I3(e),_C=e=>({[_m.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function wL(e,t,{auto:n=!0}={}){const i=s=>{if(mo(s)){const a={keyId:null,pattern:s};return n&&(a.searcher=xm(s,t)),a}const o=Object.keys(s),r=gne(s);if(!r&&o.length>1&&!I3(s))return i(_C(s));if(mne(s)){const a=r?s[M3.PATH]:o[0],u=r?s[M3.PATTERN]:s[a];if(!mo(u))throw new Error(qte(a));const c={keyId:xg(a),pattern:u};return n&&(c.searcher=xm(u,t)),c}const l={children:[],operator:o[0]};return o.forEach(a=>{const u=s[a];zu(u)&&u.forEach(c=>{l.children.push(i(c))})}),l};return I3(e)||(e=_C(e)),i(e)}function E3(e,{ignoreFieldNorm:t=vn.ignoreFieldNorm}){let n=1;return e.forEach(({key:i,norm:s,score:o})=>{const r=i?i.weight:null;n*=Math.pow(o===0&&r?Number.EPSILON:o,(r||1)*(t?1:s))}),n}function vne(e,{ignoreFieldNorm:t=vn.ignoreFieldNorm}){e.forEach(n=>{n.score=E3(n.matches,{ignoreFieldNorm:t})})}var yne=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){const t=this.heap;for(;e>0;){const n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;const i=t[e];t[e]=t[n],t[n]=i,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let i=e;do{e=i;const s=2*e+1,o=2*e+2;if(s<n&&this.comparator(t[s],t[i])>0&&(i=s),o<n&&this.comparator(t[o],t[i])>0&&(i=o),i!==e){const r=t[e];t[e]=t[i],t[i]=r}}while(i!==e)}};function bne(e){const t=[];return e.matches.forEach(n=>{if(!hr(n.indices)||!n.indices.length)return;const i={indices:n.indices,value:n.value};n.key&&(i.key=n.key.id),n.idx>-1&&(i.refIndex=n.idx),t.push(i)}),t}function kne(e,t,{includeMatches:n=vn.includeMatches,includeScore:i=vn.includeScore}={}){return e.map(s=>{const{idx:o}=s,r={item:t[o],refIndex:o};return n&&(r.matches=bne(s)),i&&(r.score=s.score),r})}const Ane=/[\p{L}\p{M}\p{N}_]+/gu,SC=new WeakSet;function Cne(e){SC.has(e)||(SC.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function wne(e){if(typeof e=="function"){let t=!1;return n=>{const i=e(n);if(!t&&(t=!0,!Array.isArray(i)||i.some(s=>typeof s!="string")))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(i)?"array containing non-strings":typeof i}.`);return i}}return e instanceof RegExp?(e.global||Cne(e),t=>t.match(e)||[]):t=>t.match(Ane)||[]}function T3({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){const i=wne(n);return{tokenize(s){return e||(s=s.toLowerCase()),t&&(s=Zh(s)),i(s)}}}var xne=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=T3({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const n=this.analyzer.tokenize(e),{df:i,fieldCount:s}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const o of n){this.termSearchers.push(new W5(o,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const r=i.get(o)||0,l=Math.log(1+(s-r+.5)/(r+.5));this.idfWeights.push(l)}this.combineAll=t.tokenMatch==="all",this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,i=0,s=0,o=0;const r=this.combineAll&&!this.useMask?new Set:null;for(let u=0;u<this.termSearchers.length;u++){const c=this.termSearchers[u].searchIn(e),d=this.idfWeights[u];i+=d,c.isMatch&&(s++,n+=d*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?o|=1<<u:r.add(u)))}if(s===0)return{isMatch:!1,score:1};const l=i>0?1-n/i:0,a={isMatch:!0,score:Math.max(.001,l)};return this.options.includeMatches&&t.length&&(a.indices=H5(t)),this.combineAll&&(this.useMask?a.matchedMask=o:a.matchedTerms=r,a.termCount=this.numTerms),a}};function ry(e,t,n,i){const s=i.tokenize(t);if(!s.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);const o=new Set(s);let r=e.docTermFieldHits.get(n);r||(r=new Map,e.docTermFieldHits.set(n,r));for(const l of o)r.set(l,(r.get(l)||0)+1),e.df.set(l,(e.df.get(l)||0)+1)}function xL(e,t,n,i){const{i:s,v:o,$:r}=t;if(o!==void 0){ry(e,o,s,i);return}if(r)for(let l=0;l<n;l++){const a=r[l];if(a)if(Array.isArray(a))for(const u of a)ry(e,u.v,s,i);else ry(e,a.v,s,i)}}function _ne(e,t,n){const i={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const s of e)xL(i,s,t,n);return i}function Sne(e,t,n,i){xL(e,t,n,i)}function Mne(e,t){const n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);const i=e.docTermFieldHits.get(t);if(i){for(const[s,o]of i){const r=(e.df.get(s)||0)-o;r<=0?e.df.delete(s):e.df.set(s,r)}e.docTermFieldHits.delete(t)}}function MC(e,t){if(t.length===0)return;const n=Array.from(new Set(t)).sort((l,a)=>l-a);for(const l of n)Mne(e,l);const i=l=>{let a=0,u=n.length;for(;a<u;){const c=a+u>>>1;n[c]<l?a=c+1:u=c}return l-a},s=n[0],o=new Map;for(const[l,a]of e.docFieldCount)o.set(l>s?i(l):l,a);e.docFieldCount=o;const r=new Map;for(const[l,a]of e.docTermFieldHits)r.set(l>s?i(l):l,a);e.docTermFieldHits=r}var Ru=class{constructor(e,t,n){this.options={...vn,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Gte(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=xm(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof j5))throw new Error(Wte);if(this._myIndex=t||AL(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=T3({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=_ne(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(e){if(!hr(e))return;this._docs.push(e);const t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){const n=T3({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});Sne(this._invertedIndex,t,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(e=()=>!1){const t=[],n=[];for(let i=0,s=this._docs.length;i<s;i+=1)e(this._docs[i],i)&&(t.push(this._docs[i]),n.push(i));if(n.length){this._invertedIndex&&MC(this._invertedIndex,n);const i=new Set(n);this._docs=this._docs.filter((s,o)=>!i.has(o)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw new Error(x3);this._invertedIndex&&MC(this._invertedIndex,[e]);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){const{limit:n=-1}=t||{},{includeMatches:i,includeScore:s,shouldSort:o,sortFn:r,ignoreFieldNorm:l}=this.options;if(mo(e)&&!e.trim()){let f=this._docs.map((p,g)=>({item:p,refIndex:g}));return wg(n)&&n>-1&&(f=f.slice(0,n)),f}const a=o&&wg(n)&&n>0&&mo(e),u=r,c=(f,p)=>u(f,p)||f.idx-p.idx;let d;if(a){const f=new yne(n,c);mo(this._docs[0])?this._searchStringList(e,{heap:f,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:f,ignoreFieldNorm:l}),d=f.extractSorted()}else d=mo(e)?mo(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),vne(d,{ignoreFieldNorm:l}),o&&d.sort(mo(e)?c:u),wg(n)&&n>-1&&(d=d.slice(0,n));return kne(d,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:o}=this._myIndex,r=t?null:[];return o.forEach(({v:l,i:a,n:u})=>{if(!hr(l))return;const c=i.searchIn(l);if(c.isMatch){const d={score:c.score,value:l,norm:u,indices:c.indices};s&&(d.matchedMask=c.matchedMask,d.matchedTerms=c.matchedTerms,d.termCount=c.termCount);const f=[d];if(!s||this._coversAllTokens(f)){const p={item:l,idx:a,matches:f};t?(p.score=E3(p.matches,{ignoreFieldNorm:n}),t.insert(p)):r.push(p)}}}),r}_searchLogical(e){const t=wL(e,this.options),n=this._normalizedKeys(),i=(l,a,u)=>{if(!("children"in l)){const{keyId:p,searcher:g}=l;let m;return p===null?(m=[],n.forEach((y,w)=>{m.push(...this._findMatches({key:y,value:a[w],searcher:g}))})):m=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(a,p),searcher:g}),m&&m.length?[{idx:u,item:a,matches:m}]:[]}const{children:c,operator:d}=l,f=[];for(let p=0,g=c.length;p<g;p+=1){const m=c[p],y=i(m,a,u);if(y.length)f.push(...y);else if(d===_m.AND)return[]}return f},s=this._myIndex.records,o=new Map,r=[];return s.forEach(({$:l,i:a})=>{if(hr(l)){const u=i(t,l,a);u.length&&(o.has(a)||(o.set(a,{idx:a,item:l,matches:[]}),r.push(o.get(a))),u.forEach(({matches:c})=>{o.get(a).matches.push(...c)}))}}),r}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:o}=this._myIndex,r=this._normalizedKeys(),l=t?null:[];return o.forEach(({$:a,i:u})=>{if(!hr(a))return;const c=[];let d=!1,f=!1;if(r.forEach((p,g)=>{const m=this._findMatches({key:p,value:a[g],searcher:i});m.length?(c.push(...m),m[0].hasInverse&&(f=!0)):d=!0}),!(f&&d)&&c.length&&(!s||this._coversAllTokens(c))){const p={idx:u,item:a,matches:c};t?(p.score=E3(p.matches,{ignoreFieldNorm:n}),t.insert(p)):l.push(p)}}),l}_findMatches({key:e,value:t,searcher:n}){if(!hr(t))return[];const i=[];if(zu(t))t.forEach(({v:s,i:o,n:r})=>{if(!hr(s))return;const l=n.searchIn(s);if(l.isMatch){const a={score:l.score,key:e,value:s,idx:o,norm:r,indices:l.indices,hasInverse:l.hasInverse};l.termCount!==void 0&&(a.matchedMask=l.matchedMask,a.matchedTerms=l.matchedTerms,a.termCount=l.termCount),i.push(a)}});else{const{v:s,n:o}=t,r=n.searchIn(s);if(r.isMatch){const l={score:r.score,key:e,value:s,norm:o,indices:r.indices,hasInverse:r.hasInverse};r.termCount!==void 0&&(l.matchedMask=r.matchedMask,l.matchedTerms=r.matchedTerms,l.termCount=r.termCount),i.push(l)}}return i}_coversAllTokens(e){const t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let i=0;for(let s=0;s<e.length;s++)i|=e[s].matchedMask||0;return i===2**t-1}const n=new Set;for(let i=0;i<e.length;i++){const s=e[i].matchedTerms;if(s)for(const o of s)n.add(o)}return n.size===t}};Ru.version="7.5.0";Ru.createIndex=AL;Ru.parseIndex=ine;Ru.config=vn;Ru.match=function(e,t,n){if(n&&n.useTokenSearch)throw new Error(Zte);return xm(e,{...vn,...n}).searchIn(t)};Ru.parseQuery=wL;q5(pne);q5(xne);Ru.use=function(...e){e.forEach(t=>q5(t))};var Ine=Ru;const Ene=/^[\uD800-\uDBFF]$/,Tne=/^[\uDC00-\uDFFF]$/,Lne=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var IC;(function(e){e[e.Unknown=1e-13]="Unknown",e[e.Rule=1e-12]="Rule",e[e.DICT=2e-8]="DICT",e[e.Surname=1]="Surname",e[e.Custom=1]="Custom"})(IC||(IC={}));const xr={Normal:1,Surname:10,Custom:100};function nl(e){var t;return e.length-(((t=e.match(Lne))===null||t===void 0?void 0:t.length)||0)}function L3(e){const t=[];let n=0;for(;n<e.length;){const i=e[n];Ene.test(i)&&Tne.test(e[n+1])?(t.push(e.substring(n,n+2)),n+=2):(t.push(i),n+=1)}return t}class _L{constructor(){this.NumberDICT=[],this.StringDICT=new Map}get(t){if(t.length>1)return this.StringDICT.get(t);{const n=t.charCodeAt(0);return this.NumberDICT[n]}}set(t,n){if(t.length>1)this.StringDICT.set(t,n);else{const i=t.charCodeAt(0);this.NumberDICT[i]=n}}clear(){this.NumberDICT=[],this.StringDICT.clear()}}const Nne=["zh","ch","sh","z","c","s","b","p","m","f","d","t","n","l","g","k","h","j","q","x","r","y","w",""],Fne=["j","q","x"],Bne=["uān","uán","uǎn","uàn","uan","uē","ué","uě","uè","ue","ūn","ún","ǔn","ùn","un","ū","ú","ǔ","ù","u"],$ne={uān:"üān",uán:"üán",uǎn:"üǎn",uàn:"üàn",uan:"üan",uē:"üē",ué:"üé",uě:"üě",uè:"üè",ue:"üe",ūn:"ǖn",ún:"ǘn",ǔn:"ǚn",ùn:"ǜn",un:"ün",ū:"ǖ",ú:"ǘ",ǔ:"ǚ",ù:"ǜ",u:"ü"},Dne=["ia","ian","iang","iao","ie","iu","iong","ua","uai","uan","uang","ue","ui","uo","üan","üe","van","ve"],EC={一:"yì",二:"èr",三:"sān",四:"sì",五:"wǔ",六:"liù",七:"qī",八:"bā",九:"jiǔ",十:"shí",百:"bǎi",千:"qiān",万:"wàn",亿:"yì",单:"dān",两:"liǎng",双:"shuāng",多:"duō",几:"jǐ",十一:"shí yī",零一:"líng yī",第一:"dì yī",一十:"yī shí",一十一:"yī shí yī"},TC={重:"chóng",行:"háng",斗:"dǒu",更:"gēng"};function zne(){const e={零一:"líng yī","〇一":"líng yī",十一:"shí yī",一十:"yī shí",第一:"dì yī",一十一:"yī shí yī"};for(let t in EC)for(let n in TC){const i=`${t}${n}`,s=`${EC[t]} ${TC[n]}`;e[i]=s}return e}const LC=zne(),Rne=Object.keys(LC).map(e=>({zh:e,pinyin:LC[e],probability:1e-12,length:nl(e),priority:xr.Normal,dict:Symbol("rule")})),SL={不:{bú:[4]},一:{yí:[4],yì:[1,2,3]}},One={不:["的","而","之","后","也","还","地"],一:["的","而","之","后","也","还","是"]},Pne=Object.keys(SL),N3={南宫:"nán gōng",第五:"dì wǔ",万俟:"mò qí",司马:"sī mǎ",上官:"shàng guān",欧阳:"ōu yáng",夏侯:"xià hóu",诸葛:"zhū gě",闻人:"wén rén",东方:"dōng fāng",赫连:"hè lián",皇甫:"huáng fǔ",尉迟:"yù chí",公羊:"gōng yáng",澹台:"tán tái",公冶:"gōng yě",宗政:"zōng zhèng",濮阳:"pú yáng",淳于:"chún yú",太叔:"tài shū",申屠:"shēn tú",公孙:"gōng sūn",仲孙:"zhòng sūn",轩辕:"xuān yuán",令狐:"líng hú",钟离:"zhōng lí",宇文:"yǔ wén",长孙:"zhǎng sūn",慕容:"mù róng",鲜于:"xiān yú",闾丘:"lǘ qiū",司徒:"sī tú",司空:"sī kōng",亓官:"qí guān",司寇:"sī kòu",仉督:"zhǎng dū",子车:"zǐ jū",颛孙:"zhuān sūn",端木:"duān mù",巫马:"wū mǎ",公西:"gōng xī",漆雕:"qī diāo",乐正:"yuè zhèng",壤驷:"rǎng sì",公良:"gōng liáng",拓跋:"tuò bá",夹谷:"jiá gǔ",宰父:"zǎi fǔ",榖梁:"gǔ liáng",段干:"duàn gān",百里:"bǎi lǐ",东郭:"dōng guō",南门:"nán mén",呼延:"hū yán",羊舌:"yáng shé",梁丘:"liáng qiū",左丘:"zuǒ qiū",东门:"dōng mén",西门:"xī mén",句龙:"gōu lóng",毌丘:"guàn qiū",赵:"zhào",钱:"qián",孙:"sūn",李:"lǐ",周:"zhōu",吴:"wú",郑:"zhèng",王:"wáng",冯:"féng",陈:"chén",褚:"chǔ",卫:"wèi",蒋:"jiǎng",沈:"shěn",韩:"hán",杨:"yáng",朱:"zhū",秦:"qín",尤:"yóu",许:"xǔ",何:"hé",吕:"lǚ",施:"shī",张:"zhāng",孔:"kǒng",曹:"cáo",严:"yán",华:"huà",金:"jīn",魏:"wèi",陶:"táo",姜:"jiāng",戚:"qī",谢:"xiè",邹:"zōu",喻:"yù",柏:"bǎi",水:"shuǐ",窦:"dòu",章:"zhāng",云:"yún",苏:"sū",潘:"pān",葛:"gě",奚:"xī",范:"fàn",彭:"péng",郎:"láng",鲁:"lǔ",韦:"wéi",昌:"chāng",马:"mǎ",苗:"miáo",凤:"fèng",花:"huā",方:"fāng",俞:"yú",任:"rén",袁:"yuán",柳:"liǔ",酆:"fēng",鲍:"bào",史:"shǐ",唐:"táng",费:"fèi",廉:"lián",岑:"cén",薛:"xuē",雷:"léi",贺:"hè",倪:"ní",汤:"tāng",滕:"téng",殷:"yīn",罗:"luó",毕:"bì",郝:"hǎo",邬:"wū",安:"ān",常:"cháng",乐:"yuè",于:"yú",时:"shí",傅:"fù",皮:"pí",卞:"biàn",齐:"qí",康:"kāng",伍:"wǔ",余:"yú",元:"yuán",卜:"bǔ",顾:"gù",孟:"mèng",平:"píng",黄:"huáng",和:"hé",穆:"mù",萧:"xiāo",尹:"yǐn",姚:"yáo",邵:"shào",湛:"zhàn",汪:"wāng",祁:"qí",毛:"máo",禹:"yǔ",狄:"dí",米:"mǐ",贝:"bèi",明:"míng",臧:"zāng",计:"jì",伏:"fú",成:"chéng",戴:"dài",谈:"tán",宋:"sòng",茅:"máo",庞:"páng",熊:"xióng",纪:"jǐ",舒:"shū",屈:"qū",项:"xiàng",祝:"zhù",董:"dǒng",梁:"liáng",杜:"dù",阮:"ruǎn",蓝:"lán",闵:"mǐn",席:"xí",季:"jì",麻:"má",强:"qiáng",贾:"jiǎ",路:"lù",娄:"lóu",危:"wēi",江:"jiāng",童:"tóng",颜:"yán",郭:"guō",梅:"méi",盛:"shèng",林:"lín",刁:"diāo",钟:"zhōng",徐:"xú",邱:"qiū",骆:"luò",高:"gāo",夏:"xià",蔡:"cài",田:"tián",樊:"fán",胡:"hú",凌:"líng",霍:"huò",虞:"yú",万:"wàn",支:"zhī",柯:"kē",昝:"zǎn",管:"guǎn",卢:"lú",莫:"mò",经:"jīng",房:"fáng",裘:"qiú",缪:"miào",干:"gān",解:"xiè",应:"yīng",宗:"zōng",丁:"dīng",宣:"xuān",贲:"bēn",邓:"dèng",郁:"yù",单:"shàn",杭:"háng",洪:"hóng",包:"bāo",诸:"zhū",左:"zuǒ",石:"shí",崔:"cuī",吉:"jí",钮:"niǔ",龚:"gōng",程:"chéng",嵇:"jī",邢:"xíng",滑:"huá",裴:"péi",陆:"lù",荣:"róng",翁:"wēng",荀:"xún",羊:"yáng",於:"yū",惠:"huì",甄:"zhēn",曲:"qū",家:"jiā",封:"fēng",芮:"ruì",羿:"yì",储:"chǔ",靳:"jìn",汲:"jí",邴:"bǐng",糜:"mí",松:"sōng",井:"jǐng",段:"duàn",富:"fù",巫:"wū",乌:"wū",焦:"jiāo",巴:"bā",弓:"gōng",牧:"mù",隗:"wěi",山:"shān",谷:"gǔ",车:"chē",侯:"hóu",宓:"mì",蓬:"péng",全:"quán",郗:"xī",班:"bān",仰:"yǎng",秋:"qiū",仲:"zhòng",伊:"yī",宫:"gōng",宁:"nìng",仇:"qiú",栾:"luán",暴:"bào",甘:"gān",钭:"tǒu",厉:"lì",戎:"róng",祖:"zǔ",武:"wǔ",符:"fú",刘:"liú",景:"jǐng",詹:"zhān",束:"shù",龙:"lóng",叶:"yè",幸:"xìng",司:"sī",韶:"sháo",郜:"gào",黎:"lí",蓟:"jì",薄:"bó",印:"yìn",宿:"sù",白:"bái",怀:"huái",蒲:"pú",邰:"tái",从:"cóng",鄂:"è",索:"suǒ",咸:"xián",籍:"jí",赖:"lài",卓:"zhuó",蔺:"lìn",屠:"tú",蒙:"méng",池:"chí",乔:"qiáo",阴:"yīn",鬱:"yù",胥:"xū",能:"nài",苍:"cāng",双:"shuāng",闻:"wén",莘:"shēn",党:"dǎng",翟:"zhái",谭:"tán",贡:"gòng",劳:"láo",逄:"páng",姬:"jī",申:"shēn",扶:"fú",堵:"dǔ",冉:"rǎn",宰:"zǎi",郦:"lì",雍:"yōng",郤:"xì",璩:"qú",桑:"sāng",桂:"guì",濮:"pú",牛:"niú",寿:"shòu",通:"tōng",边:"biān",扈:"hù",燕:"yān",冀:"jì",郏:"jiá",浦:"pǔ",尚:"shàng",农:"nóng",温:"wēn",别:"bié",庄:"zhuāng",晏:"yàn",柴:"chái",瞿:"qú",阎:"yán",充:"chōng",慕:"mù",连:"lián",茹:"rú",习:"xí",宦:"huàn",艾:"ài",鱼:"yú",容:"róng",向:"xiàng",古:"gǔ",易:"yì",慎:"shèn",戈:"gē",廖:"liào",庾:"yǔ",终:"zhōng",暨:"jì",居:"jū",衡:"héng",步:"bù",都:"dū",耿:"gěng",满:"mǎn",弘:"hóng",匡:"kuāng",国:"guó",文:"wén",寇:"kòu",广:"guǎng",禄:"lù",阙:"quē",东:"dōng",欧:"ōu",殳:"shū",沃:"wò",利:"lì",蔚:"wèi",越:"yuè",夔:"kuí",隆:"lóng",师:"shī",巩:"gǒng",厍:"shè",聂:"niè",晁:"cháo",勾:"gōu",敖:"áo",融:"róng",冷:"lěng",訾:"zī",辛:"xīn",阚:"kàn",那:"nā",简:"jiǎn",饶:"ráo",空:"kōng",曾:"zēng",母:"mǔ",沙:"shā",乜:"niè",养:"yǎng",鞠:"jū",须:"xū",丰:"fēng",巢:"cháo",关:"guān",蒯:"kuǎi",相:"xiàng",查:"zhā",后:"hòu",荆:"jīng",红:"hóng",游:"yóu",竺:"zhú",权:"quán",逯:"lù",盖:"gě",益:"yì",桓:"huán",公:"gōng",牟:"móu",哈:"hǎ",言:"yán",福:"fú",肖:"xiāo",区:"ōu",覃:"qín",朴:"piáo",繁:"pó",员:"yùn",句:"gōu",要:"yāo",过:"guō",钻:"zuān",谌:"chén",折:"shé",召:"shào",郄:"qiè",撒:"sǎ",甯:"nìng",六:"lù",啜:"chuài",行:"xíng"},jne=Object.keys(N3).map(e=>({zh:e,pinyin:N3[e],probability:1+nl(e),length:nl(e),priority:xr.Surname,dict:Symbol("surname")})),NC={"bǎng páng pāng":["膀"],líng:["〇","伶","凌","刢","囹","坽","夌","姈","婈","孁","岺","彾","掕","昤","朎","柃","棂","櫺","欞","泠","淩","澪","灵","燯","爧","狑","玲","琌","瓴","皊","砱","祾","秢","竛","笭","紷","綾","绫","羐","羚","翎","聆","舲","苓","菱","蓤","蔆","蕶","蛉","衑","裬","詅","跉","軨","輘","酃","醽","鈴","錂","铃","閝","陵","零","霊","霗","霛","霝","靈","駖","魿","鯪","鲮","鴒","鸰","鹷","麢","齡","齢","龄","龗","㥄"],yī:["一","乊","伊","依","医","吚","咿","噫","壱","壹","夁","嫛","嬄","弌","揖","撎","檹","毉","洢","渏","漪","瑿","畩","祎","禕","稦","繄","蛜","衤","譩","辷","郼","醫","銥","铱","鷖","鹥","黟","黳"],"dīng zhēng":["丁"],"kǎo qiǎo yú":["丂"],qī:["七","倛","僛","凄","嘁","墄","娸","悽","慼","慽","戚","捿","柒","桤","桼","棲","榿","欺","沏","淒","漆","紪","緀","萋","褄","諆","迉","郪","鏚","霋","魌","鶈"],shàng:["丄","尙","尚","恦","緔","绱"],xià:["丅","下","乤","圷","夏","夓","懗","梺","疜","睱","罅","鎼","鏬"],hǎn:["丆","喊","浫","罕","豃","㘎"],"wàn mò":["万"],zhàng:["丈","仗","墇","嶂","帐","帳","幛","扙","杖","涱","痮","瘬","瘴","瞕","粀","胀","脹","賬","账","障"],sān:["三","厁","叁","弎","毵","毶","毿","犙","鬖"],"shàng shǎng shang":["上"],"qí jī":["丌","其","奇"],"bù fǒu":["不"],"yǔ yù yú":["与"],miǎn:["丏","偭","免","冕","勉","勔","喕","娩","愐","汅","沔","湎","睌","緬","缅","腼","葂","靦","鮸","𩾃"],gài:["丐","乢","匃","匄","戤","概","槩","槪","溉","漑","瓂","葢","鈣","钙","𬮿"],chǒu:["丑","丒","侴","吜","杽","瞅","矁","醜","魗"],zhuān:["专","叀","嫥","専","專","瑼","甎","砖","磗","磚","蟤","諯","鄟","顓","颛","鱄","䏝"],"qiě jū":["且"],pī:["丕","伓","伾","噼","坯","岯","憵","批","披","炋","狉","狓","砒","磇","礔","礕","秛","秠","耚","豾","邳","鈚","鉟","銔","錃","錍","霹","駓","髬","魾","𬳵"],shì:["世","丗","亊","事","仕","侍","冟","势","勢","卋","呩","嗜","噬","士","奭","嬕","室","市","式","弑","弒","恀","恃","戺","拭","揓","是","昰","枾","柿","栻","澨","烒","煶","眂","眎","眡","睗","示","礻","筮","簭","舐","舓","襫","視","视","觢","試","誓","諡","謚","试","谥","貰","贳","軾","轼","逝","遾","釈","释","釋","鈰","鉃","鉽","铈","飾","餙","餝","饰","鰘","䏡","𬤊"],qiū:["丘","丠","坵","媝","恘","恷","楸","秋","秌","穐","篍","緧","萩","蘒","蚯","蝵","蟗","蠤","趥","邱","鞦","鞧","鰌","鰍","鳅","鶖","鹙","龝"],bǐng:["丙","屛","怲","抦","昞","昺","柄","棅","炳","禀","秉","稟","苪","蛃","邴","鈵","陃","鞆","餅","餠","饼"],yè:["业","亱","僷","墷","夜","嶪","嶫","抴","捙","擛","擪","擫","晔","曄","曅","曗","曳","曵","枼","枽","業","洂","液","澲","烨","燁","爗","璍","皣","瞱","瞸","礏","腋","葉","謁","谒","邺","鄴","鍱","鐷","靥","靨","頁","页","餣","饁","馌","驜","鵺","鸈"],cóng:["丛","从","叢","婃","孮","従","徔","徖","悰","樷","欉","淙","灇","爜","琮","藂","誴","賨","賩","錝"],dōng:["东","倲","冬","咚","埬","岽","崬","徚","昸","東","氡","氭","涷","笗","苳","菄","蝀","鮗","鯟","鶇","鶫","鸫","鼕","𬟽"],sī:["丝","俬","凘","厮","司","咝","嘶","噝","媤","廝","恖","撕","斯","楒","泀","澌","燍","禗","禠","私","糹","絲","緦","纟","缌","罳","蕬","虒","蛳","蜤","螄","蟖","蟴","鉰","銯","鍶","鐁","锶","颸","飔","騦","鷥","鸶","鼶","㟃"],chéng:["丞","呈","城","埕","堘","塍","塖","宬","峸","惩","懲","成","承","挰","掁","揨","枨","棖","橙","檙","洆","溗","澂","珵","珹","畻","程","窚","筬","絾","脭","荿","誠","诚","郕","酲","鋮","铖","騬","鯎"],diū:["丟","丢","銩","铥"],liǎng:["両","两","兩","唡","啢","掚","緉","脼","蜽","裲","魉","魎","𬜯"],yǒu:["丣","卣","友","梄","湵","牖","禉","羑","聈","苃","莠","蜏","酉","銪","铕","黝"],yán:["严","厳","啱","喦","嚴","塩","壛","壧","妍","姸","娫","娮","岩","嵒","嵓","巌","巖","巗","延","揅","昖","楌","檐","櫩","欕","沿","炎","炏","狿","琂","盐","碞","筵","簷","莚","蔅","虤","蜒","言","訁","訮","詽","讠","郔","閆","閻","闫","阎","顏","顔","颜","鹽","麣","𫄧"],bìng:["並","併","倂","傡","垪","摒","栤","病","窉","竝","誁","靐","鮩"],"sàng sāng":["丧"],gǔn:["丨","惃","滚","滾","磙","緄","绲","蓘","蔉","衮","袞","輥","辊","鮌","鯀","鲧"],jiū:["丩","勼","啾","揪","揫","朻","究","糾","纠","萛","赳","阄","鬏","鬮","鳩","鸠"],"gè gě":["个","個","各"],yā:["丫","圧","孲","庘","押","枒","桠","椏","錏","鐚","鴉","鴨","鵶","鸦","鸭"],pán:["丬","媻","幋","槃","洀","瀊","爿","盘","盤","磐","縏","蒰","蟠","蹒","蹣","鎜","鞶"],"zhōng zhòng":["中"],jǐ:["丮","妀","己","戟","挤","掎","撠","擠","橶","泲","犱","脊","虮","蟣","魢","鱾","麂"],jiè:["丯","介","借","唶","堺","屆","届","岕","庎","徣","戒","楐","犗","玠","琾","界","畍","疥","砎","蚧","蛶","衸","褯","誡","诫","鎅","骱","魪"],fēng:["丰","仹","偑","僼","凨","凬","凮","妦","寷","封","峯","峰","崶","枫","楓","檒","沣","沨","渢","灃","烽","犎","猦","琒","疯","瘋","盽","砜","碸","篈","蘴","蜂","蠭","豐","鄷","酆","鋒","鎽","鏠","锋","霻","靊","飌","麷"],"guàn kuàng":["丱"],chuàn:["串","汌","玔","賗","釧","钏"],chǎn:["丳","产","冁","剷","囅","嵼","旵","浐","滻","灛","產","産","簅","蒇","蕆","諂","譂","讇","谄","鏟","铲","閳","闡","阐","骣","𬊤"],lín:["临","冧","壣","崊","嶙","斴","晽","暽","林","潾","瀶","燐","琳","璘","瞵","碄","磷","粦","粼","繗","翷","臨","轔","辚","遴","邻","鄰","鏻","阾","隣","霖","驎","鱗","鳞","麐","麟","𬴊","𬭸"],zhuó:["丵","劅","卓","啄","圴","妰","娺","撯","擆","擢","斫","斮","斱","斲","斵","晫","椓","浊","浞","濁","灼","烵","琸","硺","禚","窡","籗","籱","罬","茁","蠗","蠿","諁","諑","謶","诼","酌","鐲","镯","鵫","鷟","䓬","𬸦"],zhǔ:["丶","主","劯","嘱","囑","宔","帾","拄","渚","濐","煑","煮","燝","瞩","矚","罜","詝","陼","鸀","麈","𬣞"],bā:["丷","仈","八","叭","哵","夿","岜","巴","捌","朳","玐","疤","笆","粑","羓","芭","蚆","豝","釟"],wán:["丸","刓","完","岏","抏","捖","汍","烷","玩","琓","笂","紈","纨","翫","芄","貦","頑","顽"],dān:["丹","勯","匰","単","妉","媅","殚","殫","甔","眈","砃","箪","簞","耼","耽","聃","聸","褝","襌","躭","郸","鄲","酖","頕"],"wèi wéi":["为"],"jǐng dǎn":["丼"],"lì lí":["丽"],jǔ:["举","弆","挙","擧","椇","榉","榘","櫸","欅","矩","筥","聥","舉","莒","蒟","襷","踽","齟","龃"],piě:["丿","苤","鐅","𬭯"],fú:["乀","伏","俘","凫","刜","匐","咈","哹","垘","孚","岪","巿","帗","幅","幞","弗","彿","怫","扶","柫","栿","桴","氟","泭","浮","涪","澓","炥","玸","甶","畉","癁","祓","福","稪","符","箙","紱","紼","絥","綍","绂","绋","罘","罦","翇","艀","芙","芣","苻","茀","茯","菔","葍","虙","蚨","蜉","蝠","袚","袱","襆","襥","諨","豧","踾","輻","辐","郛","鉘","鉜","韍","韨","颫","髴","鮄","鮲","鳧","鳬","鴔","鵩","黻"],"yí jí":["乁"],yì:["乂","义","亄","亦","亿","伇","伿","佾","俋","億","兿","刈","劓","劮","勚","勩","匇","呓","呭","呹","唈","囈","圛","坄","垼","埸","奕","嫕","嬑","寱","屹","峄","嶧","帟","帠","幆","廙","异","弈","弋","役","忆","怈","怿","悒","意","憶","懌","懿","抑","挹","敡","易","晹","曀","曎","杙","枍","棭","榏","槸","檍","歝","殔","殪","殹","毅","浂","浥","浳","湙","溢","潩","澺","瀷","炈","焲","熠","熤","熼","燚","燡","燱","獈","玴","異","疫","痬","瘗","瘞","瘱","癔","益","瞖","穓","竩","篒","縊","繶","繹","绎","缢","義","羿","翊","翌","翳","翼","耴","肄","肊","膉","臆","艗","艺","芅","苅","萟","蓺","薏","藙","藝","蘙","虉","蜴","螠","衪","袣","裔","裛","褹","襼","訲","訳","詍","詣","誼","譯","議","讛","议","译","诣","谊","豙","豛","豷","貖","贀","跇","轶","逸","邑","鄓","醷","釴","鈠","鎰","鐿","镒","镱","阣","隿","霬","饐","駅","驛","驿","骮","鮨","鶂","鶃","鶍","鷁","鷊","鷧","鷾","鸃","鹝","鹢","黓","齸","𬬩","㑊","𫄷","𬟁"],nǎi:["乃","倷","奶","嬭","廼","氖","疓","艿","迺","釢"],wǔ:["乄","五","仵","伍","侮","倵","儛","午","啎","妩","娬","嫵","庑","廡","忤","怃","憮","摀","武","潕","熓","牾","玝","珷","瑦","甒","碔","舞","躌","迕","逜","陚","鵡","鹉","𣲘"],jiǔ:["久","乆","九","乣","奺","杦","汣","灸","玖","紤","舏","酒","镹","韭","韮"],"tuō zhé":["乇","杔","馲"],"me mó ma yāo":["么"],zhī:["之","倁","卮","巵","搘","支","栀","梔","椥","榰","汁","泜","疷","祗","祬","秓","稙","綕","肢","胑","胝","脂","芝","蘵","蜘","衼","隻","鳷","鴲","鼅","𦭜"],"wū wù":["乌"],zhà:["乍","咤","宱","搾","榨","溠","痄","蚱","詐","诈","醡","霅","䃎"],hū:["乎","乯","匢","匫","呼","唿","嘑","垀","寣","幠","忽","惚","昒","歑","泘","淴","滹","烀","苸","虍","虖","謼","軤","轷","雐"],fá:["乏","伐","傠","坺","垡","墢","姂","栰","浌","瞂","笩","筏","罚","罰","罸","藅","閥","阀"],"lè yuè yào lào":["乐","樂"],yín:["乑","吟","噖","嚚","圁","垠","夤","婬","寅","峾","崟","崯","檭","殥","泿","淫","滛","烎","犾","狺","璌","硍","碒","荶","蔩","訔","訚","訡","誾","鄞","鈝","銀","银","霪","鷣","齦"],pīng:["乒","俜","娉","涄","甹","砯","聠","艵","頩"],pāng:["乓","滂","胮","膖","雱","霶"],qiáo:["乔","侨","僑","嫶","憔","桥","槗","樵","橋","櫵","犞","瞧","硚","礄","荍","荞","蕎","藮","譙","趫","鐈","鞒","鞽","顦"],hǔ:["乕","琥","萀","虎","虝","錿","鯱"],guāi:["乖"],"chéng shèng":["乗","乘","娍"],yǐ:["乙","乛","以","倚","偯","嬟","崺","已","庡","扆","攺","敼","旑","旖","檥","矣","礒","笖","舣","艤","苡","苢","蚁","螘","蟻","裿","踦","輢","轙","逘","酏","釔","鈘","鉯","钇","顗","鳦","齮","𫖮","𬺈"],"háo yǐ":["乚"],"niè miē":["乜"],qǐ:["乞","企","启","唘","啓","啔","啟","婍","屺","杞","棨","玘","盀","綺","绮","芑","諬","起","邔","闙"],yě:["也","冶","嘢","埜","壄","漜","野"],xí:["习","喺","媳","嶍","席","椺","檄","漝","習","蓆","袭","襲","覡","觋","謵","趘","郋","鎴","隰","霫","飁","騱","騽","驨","鰼","鳛","𠅤","𫘬"],xiāng:["乡","厢","廂","忀","楿","欀","湘","瓖","稥","箱","緗","缃","膷","芗","萫","葙","薌","襄","郷","鄉","鄊","鄕","鑲","镶","香","驤","骧","鱜","麘","𬙋"],shū:["书","倏","倐","儵","叔","姝","尗","抒","掓","摅","攄","書","枢","梳","樞","殊","殳","毹","毺","淑","瀭","焂","疎","疏","紓","綀","纾","舒","菽","蔬","踈","軗","輸","输","鄃","陎","鮛","鵨"],dǒu:["乧","抖","枓","蚪","鈄","阧","陡"],shǐ:["乨","使","兘","史","始","宩","屎","榁","矢","笶","豕","鉂","駛","驶"],jī:["乩","僟","击","刉","刏","剞","叽","唧","喞","嗘","嘰","圾","基","墼","姬","屐","嵆","嵇","撃","擊","朞","机","枅","樭","機","毄","激","犄","玑","璣","畸","畿","癪","矶","磯","积","積","笄","筓","箕","簊","緁","羁","羇","羈","耭","肌","芨","虀","覉","覊","譏","譤","讥","賫","賷","赍","跻","踑","躋","躸","銈","錤","鐖","鑇","鑙","隮","雞","鞿","韲","飢","饑","饥","魕","鳮","鶏","鶺","鷄","鸄","鸡","齎","齏","齑","𬯀","𫓯","𫓹","𫌀"],náng:["乪","嚢","欜","蠰","饢"],jiā:["乫","佳","傢","加","嘉","抸","枷","梜","毠","泇","浃","浹","犌","猳","珈","痂","笳","糘","耞","腵","葭","袈","豭","貑","跏","迦","鉫","鎵","镓","鴐","麚","𬂩"],jù:["乬","倨","倶","具","剧","劇","勮","埧","埾","壉","姖","屦","屨","岠","巨","巪","怇","惧","愳","懅","懼","拒","拠","昛","歫","洰","澽","炬","烥","犋","秬","窭","窶","簴","粔","耟","聚","虡","蚷","詎","讵","豦","距","踞","躆","遽","邭","醵","鉅","鐻","钜","颶","飓","駏","鮔"],shí:["乭","十","埘","塒","姼","实","実","寔","實","峕","嵵","时","旹","時","榯","湜","溡","炻","祏","竍","蚀","蝕","辻","遈","鉐","飠","饣","鮖","鰣","鲥","鼫","鼭"],mǎo:["乮","冇","卯","峁","戼","昴","泖","笷","蓩","鉚","铆"],mǎi:["买","嘪","荬","蕒","買","鷶"],luàn:["乱","亂","釠"],rǔ:["乳","擩","汝","肗","辱","鄏"],xué:["乴","学","學","峃","嶨","斈","泶","澩","燢","穴","茓","袕","踅","鷽","鸴"],yǎn:["䶮","乵","俨","偃","儼","兖","兗","厣","厴","噞","孍","嵃","巘","巚","弇","愝","戭","扊","抁","掩","揜","曮","椼","檿","沇","渷","演","琰","甗","眼","罨","萒","蝘","衍","褗","躽","遃","郾","隒","顩","魇","魘","鰋","鶠","黡","黤","黬","黭","黶","鼴","鼹","齴","龑","𬸘","𬙂","𪩘"],fǔ:["乶","俌","俛","俯","府","弣","抚","拊","撫","斧","椨","滏","焤","甫","盙","簠","腐","腑","蜅","輔","辅","郙","釜","釡","阝","頫","鬴","黼","㕮","𫖯"],shā:["乷","唦","杀","桬","殺","毮","猀","痧","砂","硰","紗","繺","纱","蔱","裟","鎩","铩","閷","髿","魦","鯊","鯋","鲨"],nǎ:["乸","雫"],qián:["乹","亁","仱","偂","前","墘","媊","岒","拑","掮","榩","橬","歬","潛","潜","濳","灊","箝","葥","虔","軡","鈐","鉗","銭","錢","鎆","钤","钱","钳","靬","騚","騝","鰬","黔","黚"],suǒ:["乺","唢","嗩","所","暛","溑","溹","琐","琑","瑣","索","褨","鎖","鎻","鏁","锁"],yú:["乻","于","亐","伃","余","堣","堬","妤","娛","娯","娱","嬩","崳","嵎","嵛","愚","扵","揄","旟","楡","楰","榆","欤","歈","歟","歶","渔","渝","湡","漁","澞","牏","狳","玗","玙","瑜","璵","盂","睮","窬","竽","籅","羭","腴","臾","舁","舆","艅","茰","萮","萸","蕍","蘛","虞","虶","蝓","螸","衧","褕","覦","觎","諛","謣","谀","踰","輿","轝","逾","邘","酑","鍝","隅","雓","雩","餘","馀","騟","骬","髃","魚","魣","鮽","鯲","鰅","鱼","鷠","鸆","齵"],zhù:["乼","伫","佇","住","坾","墸","壴","嵀","拀","杼","柱","樦","殶","注","炷","疰","眝","祝","祩","竚","筯","箸","篫","簗","紵","紸","纻","羜","翥","苎","莇","蛀","註","貯","贮","跓","軴","鉒","鋳","鑄","铸","馵","駐","驻"],zhě:["乽","者","褶","襵","赭","踷","鍺","锗"],"qián gān":["乾"],"zhì luàn":["乿"],guī:["亀","圭","妫","媯","嫢","嬀","帰","归","摫","椝","槻","槼","櫷","歸","珪","瑰","璝","瓌","皈","瞡","硅","茥","蘬","規","规","邽","郌","閨","闺","騩","鬶","鬹"],"lǐn lìn":["亃"],jué:["亅","决","刔","劂","匷","厥","噊","孒","孓","崛","崫","嶥","彏","憠","憰","戄","抉","挗","掘","攫","桷","橛","橜","欮","氒","決","灍","焳","熦","爑","爴","爵","獗","玃","玦","玨","珏","瑴","瘚","矍","矡","砄","絕","絶","绝","臄","芵","蕝","蕨","虳","蟨","蟩","觖","觮","觼","訣","譎","诀","谲","貜","赽","趉","蹷","躩","鈌","鐍","鐝","钁","镢","鴂","鴃","鷢","𫘝","㵐","𫔎"],"le liǎo":["了"],"gè mā":["亇"],"yǔ yú":["予","懙"],zhēng:["争","佂","凧","姃","媜","峥","崝","崢","征","徰","炡","烝","爭","狰","猙","癥","眐","睁","睜","筝","箏","篜","聇","脀","蒸","踭","鉦","錚","鏳","鬇"],èr:["二","刵","咡","弍","弐","樲","誀","貮","貳","贰","髶"],chù:["亍","傗","儊","怵","憷","搐","斶","歜","珿","琡","矗","竌","絀","绌","臅","触","觸","豖","鄐","閦","黜"],kuī:["亏","刲","岿","巋","盔","窥","窺","聧","虧","闚","顝"],yún:["云","伝","勻","匀","囩","妘","愪","抣","昀","橒","沄","涢","溳","澐","熉","畇","秐","筼","篔","紜","縜","纭","耘","芸","蒷","蕓","郧","鄖","鋆","雲"],hù:["互","冱","嗀","嚛","婟","嫭","嫮","岵","帍","弖","怙","戶","户","戸","戽","扈","护","昈","槴","沍","沪","滬","熩","瓠","祜","笏","簄","粐","綔","蔰","護","豰","鄠","鍙","頀","鱯","鳠","鳸","鸌","鹱"],qí:["亓","剘","埼","岐","岓","崎","嵜","愭","掑","斉","斊","旂","旗","棊","棋","檱","櫀","歧","淇","濝","猉","玂","琦","琪","璂","畦","疧","碁","碕","祁","祈","祺","禥","竒","簯","簱","籏","粸","綥","綦","肵","脐","臍","艩","芪","萁","萕","蕲","藄","蘄","蚑","蚚","蛴","蜝","蜞","螧","蠐","褀","軝","鄿","釮","錡","锜","陭","頎","颀","騎","騏","騹","骐","骑","鬐","鬿","鯕","鰭","鲯","鳍","鵸","鶀","麒","麡","𨙸","𬨂","䓫"],jǐng:["井","儆","刭","剄","坓","宑","幜","憬","暻","殌","汫","汬","澋","璄","璟","璥","穽","肼","蟼","警","阱","頚","頸"],sì:["亖","佀","価","儩","兕","嗣","四","姒","娰","孠","寺","巳","柶","榹","汜","泗","泤","洍","洠","涘","瀃","牭","祀","禩","竢","笥","耜","肂","肆","蕼","覗","貄","釲","鈶","鈻","飤","飼","饲","駟","騃","驷"],suì:["亗","嬘","岁","嵗","旞","檖","歲","歳","澻","煫","燧","璲","砕","碎","祟","禭","穂","穗","穟","繀","繐","繸","襚","誶","譢","谇","賥","邃","鐆","鐩","隧","韢","𫟦","𬭼"],gèn:["亘","亙","揯","搄","茛"],yà:["亚","亜","俹","冴","劜","圔","圠","埡","娅","婭","揠","氩","氬","犽","砑","稏","聐","襾","覀","訝","讶","迓","齾"],"xiē suò":["些"],"qí zhāi":["亝","齊"],"yā yà":["亞","压","垭","壓","铔"],"jí qì":["亟","焏"],tóu:["亠","投","頭","骰"],"wáng wú":["亡"],"kàng háng gāng":["亢"],dà:["亣","眔"],jiāo:["交","僬","娇","嬌","峧","嶕","嶣","憍","椒","浇","澆","焦","礁","穚","簥","胶","膠","膲","茭","茮","蕉","虠","蛟","蟭","跤","轇","郊","鐎","驕","骄","鮫","鲛","鵁","鷦","鷮","鹪","䴔"],hài:["亥","嗐","害","氦","餀","饚","駭","駴","骇"],"hēng pēng":["亨"],mǔ:["亩","姆","峔","拇","母","牡","牳","畂","畆","畒","畝","畞","畮","砪","胟","踇","鉧","𬭁","𧿹"],ye:["亪"],xiǎng:["享","亯","响","想","晑","蚃","蠁","響","飨","餉","饗","饷","鮝","鯗","鱶","鲞"],jīng:["京","亰","兢","坕","坙","婛","惊","旌","旍","晶","橸","泾","涇","猄","睛","秔","稉","粳","精","経","經","綡","聙","腈","茎","荆","荊","菁","葏","驚","鯨","鲸","鶁","鶄","麖","麠","鼱","䴖"],tíng:["亭","停","婷","嵉","庭","廷","楟","榳","筳","聤","莛","葶","蜓","蝏","諪","邒","霆","鼮","䗴"],liàng:["亮","喨","悢","晾","湸","諒","谅","輌","輛","辆","鍄"],"qīn qìng":["亲","親"],bó:["亳","仢","侼","僰","博","帛","愽","懪","挬","搏","欂","浡","淿","渤","煿","牔","狛","瓝","礴","秡","箔","簙","糪","胉","脖","膊","舶","艊","萡","葧","袯","襏","襮","謈","踣","郣","鈸","鉑","鋍","鎛","鑮","钹","铂","镈","餺","馎","馛","馞","駁","駮","驳","髆","鵓","鹁"],yòu:["亴","佑","佦","侑","又","右","哊","唀","囿","姷","宥","峟","幼","狖","祐","蚴","誘","诱","貁","迶","酭","釉","鼬"],xiè:["亵","伳","偞","偰","僁","卨","卸","噧","塮","夑","媟","屑","屧","廨","徢","懈","暬","械","榍","榭","泻","洩","渫","澥","瀉","瀣","灺","炧","炨","燮","爕","獬","祄","禼","糏","紲","絏","絬","繲","纈","绁","缷","薢","薤","蟹","蠏","褉","褻","謝","谢","躞","邂","靾","韰","齂","齘","齛","齥","𬹼","𤫉"],"dǎn dàn":["亶","馾"],lián:["亷","劆","匲","匳","嗹","噒","奁","奩","嫾","帘","廉","怜","憐","涟","漣","濂","濓","瀮","熑","燫","簾","籢","籨","縺","翴","联","聨","聫","聮","聯","臁","莲","蓮","薕","螊","蠊","裢","褳","覝","謰","蹥","连","連","鎌","鐮","镰","鬑","鰱","鲢"],duǒ:["亸","哚","嚲","埵","崜","朵","朶","綞","缍","趓","躱","躲","軃"],"wěi mén":["亹","斖"],rén:["人","亻","仁","壬","忈","忎","朲","秂","芢","魜","鵀"],jí:["亼","亽","伋","佶","偮","卙","即","卽","及","叝","吉","堲","塉","姞","嫉","岌","嵴","嶯","彶","忣","急","愱","戢","揤","极","棘","楫","極","槉","檝","殛","汲","湒","潗","疾","瘠","皍","笈","箿","籍","級","级","膌","艥","蒺","蕀","蕺","蝍","螏","襋","觙","谻","踖","蹐","躤","輯","轚","辑","郆","銡","鍓","鏶","集","雧","霵","鹡","㴔"],wáng:["亾","仼","兦","莣","蚟"],"shén shí":["什"],lè:["仂","叻","忇","氻","泐","玏","砳","簕","艻","阞","韷","餎","鰳","鱳","鳓"],dīng:["仃","叮","帄","玎","疔","盯","耵","虰","靪"],zè:["仄","崱","庂","捑","昃","昗","汄"],"jǐn jìn":["仅","僅","嫤"],"pú pū":["仆"],"chóu qiú":["仇"],zhǎng:["仉","幥","掌","礃"],jīn:["今","堻","巾","惍","斤","津","珒","琻","璡","砛","筋","荕","衿","襟","觔","金","釒","釿","钅","鹶","黅","𬬱"],bīng:["仌","仒","兵","冫","冰","掤","氷","鋲"],réng:["仍","礽","芿","辸","陾"],fó:["仏","坲","梻"],"jīn sǎn":["仐"],lún:["仑","伦","侖","倫","囵","圇","婨","崘","崙","棆","沦","淪","磮","腀","菕","蜦","踚","輪","轮","錀","陯","鯩","𬬭"],cāng:["仓","仺","倉","凔","嵢","沧","滄","濸","獊","舱","艙","苍","蒼","螥","鸧"],"zǎi zǐ zī":["仔"],tā:["他","塌","它","榙","溻","牠","祂","褟","趿","遢","闧"],fù:["付","偩","傅","冨","副","咐","坿","复","妇","婦","媍","嬔","富","復","椱","祔","禣","竎","緮","縛","缚","腹","萯","蕧","蚹","蛗","蝜","蝮","袝","複","覄","覆","訃","詂","讣","負","賦","賻","负","赋","赙","赴","輹","鍑","鍢","阜","附","馥","駙","驸","鮒","鰒","鲋","鳆","㳇"],xiān:["仙","仚","佡","僊","僲","先","嘕","奾","屳","廯","忺","憸","掀","暹","杴","氙","珗","祆","秈","籼","繊","纎","纖","苮","褼","襳","跹","蹮","躚","酰","鍁","锨","韯","韱","馦","鱻","鶱","𬸣"],"tuō chà duó":["仛"],hóng:["仜","吰","垬","妅","娂","宏","宖","弘","彋","汯","泓","洪","浤","渱","潂","玒","玜","竑","竤","篊","粠","紘","紭","綋","纮","翃","翝","耾","苰","荭","葒","葓","谹","谼","鈜","鉷","鋐","閎","闳","霐","霟","鞃","魟","鴻","鸿","黉","黌","𫟹","𬭎"],tóng:["仝","佟","哃","峂","峝","庝","彤","晍","曈","桐","氃","浵","潼","犝","獞","眮","瞳","砼","秱","童","粡","膧","茼","蚒","詷","赨","酮","鉖","鉵","銅","铜","餇","鮦","鲖","𫍣","𦒍"],rèn:["仞","仭","刃","刄","妊","姙","屻","岃","扨","牣","祍","紉","紝","絍","纫","纴","肕","腍","衽","袵","訒","認","认","讱","軔","轫","鈓","靭","靱","韌","韧","飪","餁","饪"],qiān:["仟","佥","僉","千","圲","奷","孯","岍","悭","愆","慳","扦","拪","搴","撁","攐","攑","攓","杄","櫏","汘","汧","牵","牽","竏","签","簽","籖","籤","粁","芊","茾","蚈","褰","諐","謙","谦","谸","迁","遷","釺","鈆","鉛","鏲","钎","阡","韆","顅","騫","骞","鬜","鬝","鵮","鹐"],"gǎn hàn":["仠"],"yì gē":["仡"],dài:["代","侢","叇","垈","埭","岱","帒","带","帯","帶","廗","怠","戴","曃","柋","殆","瀻","玳","瑇","甙","簤","紿","緿","绐","艜","蝳","袋","襶","貣","贷","蹛","軑","軚","軩","轪","迨","霴","靆","鴏","黛","黱"],"lìng líng lǐng":["令"],chào:["仦","耖","觘"],"cháng zhǎng":["仧","兏","長","长"],sā:["仨"],cháng:["仩","偿","償","嘗","嚐","嫦","尝","常","徜","瑺","瓺","甞","肠","腸","膓","苌","萇","镸","鱨","鲿"],yí:["仪","侇","儀","冝","匜","咦","圯","夷","姨","宐","宜","宧","寲","峓","嶬","嶷","巸","彛","彜","彝","彞","怡","恞","扅","暆","栘","椬","椸","沂","洟","熪","瓵","痍","移","簃","籎","羠","胰","萓","蛦","螔","觺","謻","貽","贻","跠","迻","遺","鏔","頉","頤","頥","顊","颐","饴","鮧","鴺"],mù:["仫","凩","募","墓","幕","幙","慔","慕","暮","暯","木","楘","毣","沐","炑","牧","狇","目","睦","穆","艒","苜","莯","蚞","鉬","钼","雮","霂"],"men mén":["们"],fǎn:["仮","反","橎","返"],"chào miǎo":["仯"],"yǎng áng":["仰"],zhòng:["仲","众","堹","妕","媑","狆","眾","祌","筗","茽","蚛","衆","衶","諥"],"pǐ pí":["仳"],wò:["仴","偓","卧","媉","幄","握","楃","沃","渥","濣","瓁","瞃","硪","肟","腛","臥","齷","龌"],jiàn:["件","俴","健","僭","剑","剣","剱","劍","劎","劒","劔","墹","寋","建","徤","擶","旔","楗","毽","洊","涧","澗","牮","珔","瞷","磵","礀","箭","糋","繝","腱","臶","舰","艦","荐","薦","覸","諓","諫","譛","谏","賎","賤","贱","趝","践","踐","踺","轞","鉴","鍳","鍵","鐱","鑑","鑒","鑬","鑳","键","間","餞","饯","𬣡"],"jià jiè jie":["价"],"yǎo fó":["仸"],"rèn rén":["任"],"fèn bīn":["份"],dī:["仾","低","啲","埞","堤","岻","彽","樀","滴","磾","秪","羝","袛","趆","隄","鞮","䃅"],fǎng:["仿","倣","旊","昉","昘","瓬","眆","紡","纺","舫","訪","访","髣","鶭"],zhōng:["伀","刣","妐","幒","彸","忠","柊","汷","泈","炂","盅","籦","終","终","舯","蔠","蜙","螤","螽","衳","衷","蹱","鈡","鍾","鐘","钟","锺","鴤","鼨"],pèi:["伂","佩","姵","帔","斾","旆","沛","浿","珮","蓜","轡","辔","配","霈","馷"],diào:["伄","吊","弔","掉","瘹","盄","窎","窵","竨","訋","釣","鈟","銱","鋽","鑃","钓","铞","雿","魡"],dùn:["伅","潡","炖","燉","盾","砘","碷","踲","逇","遁","遯","鈍","钝"],wěn:["伆","刎","吻","呅","抆","桽","稳","穏","穩","紊","肳","脗"],xǐn:["伈"],kàng:["伉","匟","囥","抗","炕","鈧","钪"],ài:["伌","僾","塧","壒","嫒","嬡","愛","懓","暧","曖","爱","瑷","璦","皧","瞹","砹","硋","碍","礙","薆","譺","賹","鑀","隘","靉","餲","馤","鱫","鴱"],"jì qí":["伎","薺"],"xiū xǔ":["休"],"jìn yín":["伒"],dǎn:["伔","刐","撢","玬","瓭","紞","胆","膽","衴","賧","赕","黕","𬘘"],fū:["伕","呋","娐","孵","尃","怤","懯","敷","旉","玞","砆","稃","筟","糐","綒","肤","膚","荂","荴","衭","趺","跗","邞","鄜","酜","鈇","麩","麬","麱","麸","𫓧"],tǎng:["伖","傥","儻","埫","戃","曭","爣","矘","躺","鎲","钂","镋"],yōu:["优","優","呦","嚘","峳","幽","忧","悠","憂","攸","櫌","滺","瀀","纋","羪","耰","逌","鄾","麀"],huǒ:["伙","夥","火","煷","邩","鈥","钬"],"huì kuài":["会","會","浍","璯"],yǔ:["伛","俁","俣","偊","傴","匬","噳","圄","圉","宇","寙","屿","嶼","庾","挧","敔","斞","楀","瑀","瘐","祤","禹","穥","窳","羽","與","萭","貐","鄅","頨","麌","齬","龉","㺄"],cuì:["伜","啛","忰","悴","毳","淬","焠","疩","瘁","竁","粋","粹","紣","綷","翆","翠","脃","脆","脺","膬","膵","臎","萃","襊","顇"],sǎn:["伞","傘","糤","繖","饊","馓"],wěi:["伟","伪","偉","偽","僞","儰","娓","寪","屗","崣","嶉","徫","愇","捤","暐","梶","洧","浘","渨","炜","煒","猥","玮","瑋","痿","緯","纬","腲","艉","芛","苇","荱","萎","葦","蒍","蔿","蜼","諉","诿","踓","鍡","韑","韙","韡","韪","頠","颹","骩","骪","骫","鮪","鲔","𫇭","𬀩","𬱟"],"chuán zhuàn":["传","傳"],"chē jū":["伡","俥","车"],"jū chē":["車"],yá:["伢","厑","厓","堐","岈","崕","崖","涯","漄","牙","玡","琊","睚","笌","芽","蚜","衙","齖"],qiàn:["伣","俔","倩","儙","刋","壍","嬱","悓","棈","椠","槧","欠","歉","皘","篏","篟","縴","芡","蒨","蔳","輤","𬘬"],shāng:["伤","傷","商","墒","慯","殇","殤","滳","漡","熵","蔏","螪","觞","觴","謪","鬺"],chāng:["伥","倀","娼","昌","椙","淐","猖","琩","菖","裮","錩","锠","閶","阊","鯧","鲳","鼚"],"chen cāng":["伧"],xùn:["伨","侚","卂","噀","巺","巽","徇","愻","殉","殾","汛","潠","狥","蕈","訊","訓","訙","训","讯","迅","迿","逊","遜","鑂","顨","馴","驯"],xìn:["伩","囟","孞","脪","舋","衅","訫","釁","阠","顖"],chǐ:["伬","侈","卶","叺","呎","垑","恥","歯","耻","肔","胣","蚇","裭","褫","豉","鉹","齒","齿"],"xián xuán":["伭"],"nú nǔ":["伮"],"bó bǎi":["伯"],"gū gù":["估"],nǐ:["伱","你","儞","孴","拟","擬","旎","晲","狔","苨","薿","隬"],"nì ní":["伲"],bàn:["伴","办","半","姅","怑","扮","瓣","秚","絆","绊","辦","鉡","靽"],xù:["伵","侐","勖","勗","卹","叙","垿","壻","婿","序","恤","敍","敘","旭","昫","朂","槒","欰","殈","汿","沀","洫","溆","漵","潊","烅","烼","煦","獝","珬","盢","瞁","稸","絮","続","緒","緖","續","绪","续","聓","聟","蓄","藚","訹","賉","酗","頊","鱮","㳚"],zhòu:["伷","僽","冑","呪","咒","咮","宙","昼","晝","甃","皱","皺","籀","籒","籕","粙","紂","縐","纣","绉","胄","荮","葤","詋","酎","駎","驟","骤","㤘","㑇"],shēn:["伸","侁","兟","呻","堔","妽","娠","屾","峷","扟","敒","曑","柛","氠","深","燊","珅","甡","甧","申","眒","砷","穼","籶","籸","糂","紳","绅","罙","罧","葠","蓡","蔘","薓","裑","訷","詵","诜","身","駪","鯓","鯵","鰺","鲹","鵢","𬳽"],qū:["伹","佉","匤","呿","坥","屈","岖","岴","嶇","憈","抾","敺","浀","煀","祛","筁","粬","胠","蛆","蛐","袪","覻","詘","诎","趍","躯","軀","阹","駆","駈","驅","驱","髷","魼","鰸","鱋","鶌","麯","麴","麹","黢","㭕","𪨰","䓛"],"sì cì":["伺"],bēng:["伻","嘣","奟","崩","嵭","閍"],"sì shì":["似"],"jiā qié gā":["伽"],"yǐ chì":["佁"],"diàn tián":["佃","钿"],"hān gàn":["佄"],mài:["佅","劢","勱","卖","唛","売","脈","衇","賣","迈","邁","霡","霢","麥","麦","鿏"],dàn:["但","僤","啖","啗","啿","噉","嚪","帎","憺","旦","柦","氮","沊","泹","淡","狚","疍","癚","禫","窞","腅","萏","蓞","蛋","蜑","觛","訑","誕","诞","贉","霮","餤","饏","駳","髧","鴠","𫢸"],bù:["佈","勏","吥","咘","埗","埠","布","廍","怖","悑","步","歨","歩","瓿","篰","荹","蔀","踄","部","郶","鈈","钚","餢"],bǐ:["佊","俾","匕","夶","妣","彼","朼","柀","比","毞","沘","疕","秕","笔","筆","粃","聛","舭","貏","鄙"],"zhāo shào":["佋"],cǐ:["佌","此","泚","皉","𫚖"],wèi:["位","卫","味","喂","墛","媦","慰","懀","未","渭","煟","熭","犚","猬","畏","緭","罻","胃","苿","菋","藯","蘶","蝟","螱","衛","衞","褽","謂","讆","讏","谓","躗","躛","軎","轊","鏏","霨","餧","餵","饖","魏","鮇","鳚"],zuǒ:["佐","左","繓"],yǎng:["佒","傟","养","坱","岟","慃","懩","攁","氧","氱","炴","痒","癢","礢","紻","蝆","軮","養","駚"],"tǐ tī":["体","體"],zhàn:["佔","偡","嶘","战","戦","戰","栈","桟","棧","湛","站","綻","绽","菚","蘸","虥","虦","譧","轏","驏"],"hé hē hè":["何"],bì:["佖","咇","哔","嗶","坒","堛","壁","奰","妼","婢","嬖","币","幣","幤","庇","庳","廦","弊","弻","弼","彃","必","怭","愊","愎","敝","斃","梐","毕","毖","毙","湢","滗","滭","潷","煏","熚","狴","獘","獙","珌","璧","畀","畢","疪","痹","痺","皕","睤","碧","筚","箅","箆","篦","篳","粊","綼","縪","繴","罼","腷","苾","荜","萆","萞","蓖","蓽","蔽","薜","蜌","袐","襅","襞","襣","觱","詖","诐","貱","贔","赑","跸","蹕","躃","躄","避","邲","鄨","鄪","鉍","鏎","鐴","铋","閇","閉","閟","闭","陛","韠","飶","饆","馝","駜","驆","髀","魓","鮅","鷝","鷩","鼊"],tuó:["佗","坨","堶","岮","槖","橐","沱","砣","砤","碢","紽","詑","跎","酡","阤","陀","陁","駝","駞","騨","驒","驝","驼","鮀","鴕","鸵","鼉","鼍","鼧","𬶍"],shé:["佘","舌","虵","蛥"],"yì dié":["佚","昳","泆","軼"],"fó fú bì bó":["佛"],"zuò zuō":["作"],gōu:["佝","沟","溝","痀","篝","簼","緱","缑","袧","褠","鈎","鉤","钩","鞲","韝"],nìng:["佞","侫","倿","寕","泞","澝","濘"],qú:["佢","劬","戵","斪","欋","欔","氍","淭","灈","爠","璖","璩","癯","磲","籧","絇","胊","臞","菃","葋","蕖","蘧","蟝","蠷","蠼","衐","衢","躣","軥","鑺","鴝","鸜","鸲","鼩"],"yōng yòng":["佣"],wǎ:["佤","咓","砙","邷"],kǎ:["佧","垰","胩","裃","鉲"],bāo:["佨","勹","包","孢","煲","笣","胞","苞","蕔","裦","褒","襃","闁","齙","龅"],"huái huí":["佪"],"gé hè":["佫"],lǎo:["佬","咾","恅","栳","狫","珯","硓","老","耂","荖","蛯","轑","銠","铑","鮱"],xiáng:["佭","庠","栙","祥","絴","翔","詳","跭"],gé:["佮","匌","呄","嗝","塥","愅","挌","搿","槅","櫊","滆","膈","臵","茖","觡","諽","輵","轕","閣","阁","隔","鞷","韐","韚","騔","骼","鮯"],yáng:["佯","劷","垟","崸","徉","扬","揚","敭","旸","昜","暘","杨","楊","洋","炀","珜","疡","瘍","眻","蛘","諹","輰","鍚","钖","阦","阳","陽","霷","颺","飏","鰑","鴹","鸉"],bǎi:["佰","捭","摆","擺","栢","百","竡","粨","襬"],fǎ:["佱","峜","法","灋","砝","鍅"],mǐng:["佲","凕","姳","慏","酩"],"èr nài":["佴"],hěn:["佷","很","狠","詪","𬣳"],huó:["佸","活"],guǐ:["佹","匦","匭","厬","垝","姽","宄","庋","庪","恑","晷","湀","癸","祪","簋","蛫","蟡","觤","詭","诡","軌","轨","陒","鬼"],quán:["佺","全","啳","埢","姾","峑","巏","拳","搼","权","楾","権","權","泉","洤","湶","牷","犈","瑔","痊","硂","筌","縓","荃","葲","蜷","蠸","觠","詮","诠","跧","踡","輇","辁","醛","銓","铨","闎","顴","颧","駩","騡","鬈","鰁","鳈","齤"],tiāo:["佻","庣","旫","祧","聎"],jiǎo:["佼","儌","孂","挢","搅","撟","撹","攪","敫","敽","敿","晈","暞","曒","灚","燞","狡","璬","皎","皦","絞","纐","绞","腳","臫","蟜","譑","賋","踋","鉸","铰","餃","饺","鱎","龣"],cì:["佽","刾","庛","朿","栨","次","絘","茦","莿","蛓","螆","賜","赐"],xíng:["侀","刑","哘","型","娙","形","洐","硎","蛵","邢","郉","鈃","鉶","銒","钘","铏","陉","陘","餳","𫰛"],tuō:["侂","咃","咜","圫","托","拕","拖","汑","脫","脱","莌","袥","託","讬","飥","饦","魠","鮵"],kǎn:["侃","偘","冚","坎","惂","砍","莰","輡","轗","顑"],zhí:["侄","値","值","埴","執","姪","嬂","戠","执","摭","植","樴","淔","漐","直","禃","絷","縶","聀","职","職","膱","蟙","跖","踯","蹠","躑","軄","釞","馽"],gāi:["侅","垓","姟","峐","晐","畡","祴","荄","該","该","豥","賅","賌","赅","陔"],lái:["來","俫","倈","崃","崍","庲","来","梾","棶","涞","淶","猍","琜","筙","箂","莱","萊","逨","郲","錸","铼","騋","鯠","鶆","麳"],kuǎ:["侉","咵","垮","銙"],gōng:["侊","公","功","匑","匔","塨","宫","宮","工","幊","弓","恭","攻","杛","碽","糼","糿","肱","觥","觵","躬","躳","髸","龔","龚","䢼"],lì:["例","俐","俪","傈","儮","儷","凓","利","力","励","勵","历","厉","厤","厯","厲","叓","吏","呖","唎","唳","嚦","囇","坜","塛","壢","娳","婯","屴","岦","悧","悷","慄","戾","搮","暦","曆","曞","朸","枥","栃","栗","栛","檪","櫔","櫪","欐","歴","歷","沥","沴","涖","溧","濿","瀝","爏","犡","猁","珕","瑮","瓅","瓑","瓥","疬","痢","癧","盭","睙","砅","砺","砾","磿","礪","礫","礰","禲","秝","立","笠","篥","粒","粝","糲","脷","苈","茘","荔","莅","莉","蒚","蒞","藶","蚸","蛎","蛠","蜧","蝷","蠇","蠣","詈","讈","赲","轢","轣","轹","酈","鉝","隶","隷","雳","靂","靋","鬁","鳨","鴗","鷅","麜","𫵷","𬍛"],yīn:["侌","凐","喑","噾","囙","因","垔","堙","姻","婣","愔","慇","栶","氤","洇","溵","濦","瘖","禋","秵","筃","絪","緸","茵","蒑","蔭","裀","諲","銦","铟","闉","阥","阴","陰","陻","隂","霒","霠","鞇","音","韾","駰","骃","齗","𬘡","𬤇","𬮱"],mǐ:["侎","孊","弭","敉","洣","渳","灖","米","粎","羋","脒","芈","葞","蔝","銤"],zhū:["侏","株","槠","橥","櫧","櫫","洙","潴","瀦","猪","珠","硃","秼","絑","茱","蕏","蛛","蝫","蠩","袾","誅","諸","诛","诸","豬","跦","邾","銖","铢","駯","鮢","鯺","鴸","鼄"],ān:["侒","偣","媕","安","峖","庵","桉","氨","盦","盫","腤","菴","萻","葊","蓭","誝","諳","谙","鞌","鞍","韽","馣","鮟","鵪","鶕","鹌","𩽾"],lù:["侓","僇","勎","勠","圥","坴","塶","娽","峍","廘","彔","录","戮","摝","椂","樚","淕","淥","渌","漉","潞","琭","璐","甪","盝","睩","硉","祿","禄","稑","穋","箓","簏","簬","簵","簶","籙","粶","蔍","蕗","虂","螰","賂","赂","趢","路","踛","蹗","輅","轆","辂","辘","逯","醁","錄","録","錴","鏴","陸","騄","騼","鯥","鴼","鵦","鵱","鷺","鹭","鹿","麓","𫘧"],móu:["侔","劺","恈","眸","蛑","謀","谋","踎","鍪","鴾","麰"],ér:["侕","儿","児","兒","峏","栭","洏","粫","而","胹","荋","袻","輀","轜","陑","隭","髵","鮞","鲕","鴯","鸸"],"dòng tǒng tóng":["侗"],chà:["侘","奼","姹","岔","汊","詫","诧"],chì:["侙","傺","勅","勑","叱","啻","彳","恜","慗","憏","懘","抶","敕","斥","杘","湁","灻","炽","烾","熾","痓","痸","瘛","翄","翅","翤","翨","腟","赤","趩","遫","鉓","雴","飭","饬","鶒","鷘"],"gòng gōng":["供","共"],zhōu:["侜","周","喌","州","徟","洲","淍","炿","烐","珘","矪","舟","謅","譸","诌","賙","赒","輈","輖","辀","週","郮","銂","霌","駲","騆","鵃","鸼"],rú:["侞","儒","嚅","如","嬬","孺","帤","曘","桇","渪","濡","筎","茹","蕠","薷","蝡","蠕","袽","襦","邚","醹","銣","铷","顬","颥","鱬","鴑","鴽"],"jiàn cún":["侟"],xiá:["侠","俠","匣","峡","峽","敮","暇","柙","炠","烚","狎","狭","狹","珨","瑕","硖","硤","碬","祫","筪","縖","翈","舝","舺","蕸","赮","轄","辖","遐","鍜","鎋","陜","陿","霞","騢","魻","鶷","黠"],lǚ:["侣","侶","儢","吕","呂","屡","屢","履","挔","捛","旅","梠","焒","祣","稆","穭","絽","縷","缕","膂","膐","褛","褸","郘","鋁","铝"],ta:["侤"],"jiǎo yáo":["侥","僥","徺"],zhēn:["侦","偵","寊","帧","帪","幀","搸","斟","桢","楨","榛","樼","殝","浈","湞","潧","澵","獉","珍","珎","瑧","甄","眞","真","砧","碪","祯","禎","禛","箴","胗","臻","葴","蒖","蓁","薽","貞","贞","轃","遉","酙","針","鉁","錱","鍼","针","鱵"],"cè zè zhāi":["侧","側"],kuài:["侩","儈","凷","哙","噲","圦","块","塊","巜","廥","快","旝","欳","狯","獪","筷","糩","脍","膾","郐","鄶","鱠","鲙"],chái:["侪","儕","喍","柴","犲","祡","豺"],nóng:["侬","儂","农","哝","噥","檂","欁","浓","濃","燶","禯","秾","穠","脓","膿","蕽","襛","譨","農","辳","醲","鬞","𬪩"],jǐn:["侭","儘","卺","厪","巹","槿","漌","瑾","紧","緊","菫","蓳","謹","谨","錦","锦","饉","馑"],"hóu hòu":["侯","矦"],jiǒng:["侰","僒","冏","囧","泂","澃","炯","烱","煚","煛","熲","燛","窘","綗","褧","迥","逈","顈","颎","䌹"],"chěng tǐng":["侱"],"zhèn zhēn":["侲","揕"],zuò:["侳","做","唑","坐","岝","岞","座","祚","糳","胙","葃","葄","蓙","袏","阼"],qīn:["侵","兓","媇","嵚","嶔","欽","衾","誛","钦","顉","駸","骎","鮼"],jú:["侷","啹","婅","局","巈","椈","橘","泦","淗","湨","焗","犑","狊","粷","菊","蘜","趜","跼","蹫","輂","郹","閰","駶","驧","鵙","鵴","鶪","鼰","鼳","䴗"],"shù dōu":["侸"],tǐng:["侹","圢","娗","挺","涏","烶","珽","脡","艇","誔","頲","颋"],shèn:["侺","愼","慎","昚","涁","渗","滲","瘆","瘮","眘","祳","肾","胂","脤","腎","蜃","蜄","鋠"],"tuì tuó":["侻"],nán:["侽","喃","娚","抩","暔","枏","柟","楠","男","畘","莮","萳","遖"],xiāo:["侾","哓","嘵","嚻","囂","婋","宯","宵","庨","彇","揱","枭","枵","梟","櫹","歊","毊","消","潇","瀟","灱","灲","烋","焇","猇","獢","痚","痟","硝","硣","窙","箫","簘","簫","綃","绡","翛","膮","萧","蕭","虈","虓","蟂","蟏","蟰","蠨","踃","逍","銷","销","霄","颵","驍","骁","髇","髐","魈","鴞","鴵","鷍","鸮"],"biàn pián":["便","緶","缏"],tuǐ:["俀","腿","蹆","骽"],xì:["係","匸","卌","呬","墍","屃","屓","屭","忥","怬","恄","椞","潝","潟","澙","熂","犔","磶","禊","細","綌","縘","细","绤","舃","舄","蕮","虩","衋","覤","赩","趇","郤","釳","阋","隙","隟","霼","餼","饩","鬩","黖"],cù:["促","媨","憱","猝","瘄","瘯","簇","縬","脨","蔟","誎","趗","踧","踿","蹙","蹴","蹵","醋","顣","鼀"],é:["俄","囮","娥","峉","峨","峩","涐","珴","皒","睋","磀","莪","訛","誐","譌","讹","迗","鈋","鋨","锇","頟","額","额","魤","鵝","鵞","鹅"],qiú:["俅","叴","唒","囚","崷","巯","巰","扏","梂","殏","毬","求","汓","泅","浗","湭","煪","犰","玌","球","璆","皳","盚","紌","絿","肍","芁","莍","虬","虯","蛷","裘","觓","觩","訄","訅","賕","赇","逎","逑","遒","酋","釚","釻","銶","頄","鮂","鯄","鰽","鼽","𨱇"],xú:["俆","徐","禑"],"guàng kuāng":["俇"],kù:["俈","喾","嚳","库","庫","廤","瘔","絝","绔","袴","裤","褲","酷"],wù:["俉","务","務","勿","卼","坞","塢","奦","婺","寤","屼","岉","嵨","忢","悞","悟","悮","戊","扤","晤","杌","溩","焐","熃","物","痦","矹","窹","粅","蘁","誤","误","鋈","阢","隖","雾","霚","霧","靰","騖","骛","鶩","鹜","鼿","齀"],jùn:["俊","儁","呁","埈","寯","峻","懏","捃","攟","晙","棞","燇","珺","畯","竣","箟","蜠","賐","郡","陖","餕","馂","駿","骏","鵔","鵕","鵘","䐃"],liáng:["俍","墚","梁","椋","樑","粮","粱","糧","良","輬","辌","𫟅"],zǔ:["俎","唨","爼","祖","組","组","詛","诅","鎺","阻","靻"],"qiào xiào":["俏"],yǒng:["俑","勇","勈","咏","埇","塎","嵱","彮","怺","恿","悀","惥","愑","愹","慂","柡","栐","永","泳","湧","甬","蛹","詠","踊","踴","鯒","鲬"],hùn:["俒","倱","圂","尡","慁","掍","溷","焝","睴","觨","諢","诨"],jìng:["俓","傹","境","妌","婙","婧","弪","弳","径","徑","敬","曔","桱","梷","浄","瀞","獍","痉","痙","竞","竟","竫","競","竸","胫","脛","莖","誩","踁","迳","逕","鏡","镜","靖","静","靜","鵛"],sàn:["俕","閐"],pěi:["俖"],sú:["俗"],xī:["俙","僖","兮","凞","卥","厀","吸","唏","唽","嘻","噏","嚱","夕","奚","嬆","嬉","屖","嵠","巇","希","徆","徯","息","悉","悕","惁","惜","昔","晞","晰","晳","曦","析","桸","榽","樨","橀","欷","氥","汐","浠","淅","渓","溪","烯","焁","焈","焟","熄","熈","熙","熹","熺","熻","燨","爔","牺","犀","犠","犧","琋","瘜","皙","睎","瞦","矽","硒","磎","礂","稀","穸","窸","粞","糦","緆","繥","羲","翕","翖","肸","肹","膝","舾","莃","菥","蒠","蜥","螅","蟋","蠵","西","觹","觽","觿","譆","谿","豀","豨","豯","貕","赥","邜","鄎","酅","醯","釸","錫","鏭","鐊","鑴","锡","隵","餏","饎","饻","鯑","鵗","鸂","鼷"],lǐ:["俚","娌","峢","峲","李","欚","浬","澧","理","礼","禮","粴","裏","裡","豊","逦","邐","醴","鋰","锂","鯉","鱧","鱱","鲤","鳢"],bǎo:["保","堢","媬","宝","寚","寳","寶","珤","緥","葆","藵","褓","賲","靌","飹","飽","饱","駂","鳵","鴇","鸨"],"yú shù yù":["俞"],"sì qí":["俟"],"xìn shēn":["信"],xiū:["俢","修","咻","庥","樇","烌","羞","脙","脩","臹","貅","銝","鎀","飍","饈","馐","髤","髹","鮴","鱃","鵂","鸺","䗛"],dì:["俤","偙","僀","埊","墑","墬","娣","帝","怟","旳","梊","焍","玓","甋","眱","睇","碲","祶","禘","第","締","缔","腣","菂","蒂","蔕","蝃","蝭","螮","諦","谛","踶","递","逓","遞","遰","鉪","𤧛","䗖"],chóu:["俦","儔","嬦","惆","愁","懤","栦","燽","畴","疇","皗","稠","筹","籌","絒","綢","绸","菗","詶","讎","讐","踌","躊","酧","酬","醻","雔","雠","雦"],zhì:["俧","偫","儨","制","劕","垁","娡","寘","帙","帜","幟","庢","庤","廌","彘","徏","徝","志","忮","懥","懫","挃","挚","掷","摯","擲","旘","晊","智","栉","桎","梽","櫍","櫛","治","洷","滍","滞","滯","潌","瀄","炙","熫","狾","猘","璏","瓆","痔","痣","礩","祑","秩","秷","稚","稺","穉","窒","紩","緻","置","翐","膣","至","致","芖","蛭","袟","袠","製","覟","觗","觯","觶","誌","豑","豒","貭","質","贄","质","贽","跱","踬","躓","輊","轾","郅","銍","鋕","鑕","铚","锧","陟","隲","雉","駤","騭","騺","驇","骘","鯯","鴙","鷙","鸷","𬃊"],"liǎ liǎng":["俩"],jiǎn:["俭","倹","儉","减","剪","堿","弿","彅","戩","戬","拣","挸","捡","揀","撿","枧","柬","梘","检","検","檢","減","湕","瀽","瑐","睑","瞼","硷","碱","礆","笕","筧","简","簡","絸","繭","翦","茧","藆","蠒","裥","襇","襉","襺","詃","謇","謭","譾","谫","趼","蹇","鐗","鬋","鰎","鹸","鹻","鹼"],huò:["俰","咟","嚯","嚿","奯","彠","惑","或","擭","旤","曤","檴","沎","湱","瀖","獲","癨","眓","矐","祸","禍","穫","窢","耯","臛","艧","获","蒦","藿","蠖","謋","貨","货","鍃","鑊","镬","雘","霍","靃","韄","㸌"],"jù jū":["俱","据","鋸","锯"],xiào:["俲","傚","効","咲","哮","啸","嘋","嘨","嘯","孝","效","斅","斆","歗","涍","熽","笑","詨","誟"],pái:["俳","徘","牌","犤","猅","簰","簲","輫"],biào:["俵","鰾","鳔"],"chù tì":["俶"],fèi:["俷","剕","厞","吠","屝","废","廃","廢","昲","曊","櫠","沸","濷","狒","癈","肺","萉","費","费","鐨","镄","陫","靅","鼣"],fèng:["俸","凤","奉","湗","焨","煈","賵","赗","鳯","鳳","鴌"],ǎn:["俺","唵","埯","揞","罯","銨","铵"],bèi:["俻","倍","偝","偹","備","僃","备","悖","惫","愂","憊","昁","梖","焙","牬","犕","狈","狽","珼","琲","碚","禙","糒","苝","蓓","蛽","褙","貝","贝","軰","輩","辈","邶","郥","鄁","鋇","鐾","钡","鞁","鞴","𬇙"],yù:["俼","儥","喅","喩","喻","域","堉","妪","嫗","寓","峪","嶎","庽","彧","御","愈","慾","戫","昱","棛","棜","棫","櫲","欎","欝","欲","毓","浴","淯","滪","潏","澦","灪","焴","煜","燏","燠","爩","狱","獄","玉","琙","瘉","癒","砡","硢","硲","礇","礖","礜","禦","秗","稢","稶","篽","籞","籲","粖","緎","罭","聿","肀","艈","芋","芌","茟","蒮","蓣","蓹","蕷","蘌","蜟","蜮","袬","裕","誉","諭","譽","谕","豫","軉","輍","逳","遇","遹","郁","醧","鈺","鋊","錥","鐭","钰","閾","阈","雤","霱","預","预","飫","饇","饫","馭","驈","驭","鬰","鬱","鬻","魊","鱊","鳿","鴥","鴧","鴪","鵒","鷸","鸒","鹆","鹬"],xīn:["俽","噺","妡","嬜","廞","心","忄","忻","惞","新","昕","杺","欣","歆","炘","盺","薪","訢","辛","邤","鈊","鋅","鑫","锌","馨","馫","䜣","𫷷"],"hǔ chí":["俿"],jiù:["倃","僦","匓","匛","匶","厩","咎","就","廄","廏","廐","慦","捄","救","旧","柩","柾","桕","欍","殧","疚","臼","舅","舊","鯦","鷲","鹫","麔","齨","㠇"],yáo:["倄","傜","嗂","垚","堯","姚","媱","尧","尭","峣","嶢","嶤","徭","揺","搖","摇","摿","暚","榣","烑","爻","猺","珧","瑤","瑶","磘","窑","窯","窰","肴","蘨","謠","謡","谣","軺","轺","遙","遥","邎","顤","颻","飖","餆","餚","鰩","鱙","鳐"],"cuì zú":["倅"],"liǎng liǎ":["倆"],wǎn:["倇","唍","婉","惋","挽","晚","晥","晩","晼","梚","椀","琬","畹","皖","盌","碗","綩","綰","绾","脘","萖","踠","輓","鋔"],zǒng:["倊","偬","傯","嵸","总","惣","捴","搃","摠","燪","総","緫","縂","總","蓗"],guān:["倌","关","官","棺","瘝","癏","窤","蒄","関","闗","關","鰥","鱞","鳏"],tiǎn:["倎","唺","忝","悿","晪","殄","淟","睓","腆","舔","覥","觍","賟","錪","餂"],mén:["們","扪","捫","璊","菛","虋","鍆","钔","門","閅","门","𫞩"],"dǎo dào":["倒"],"tán tàn":["倓","埮"],"juè jué":["倔"],chuí:["倕","垂","埀","捶","搥","桘","棰","槌","箠","腄","菙","錘","鎚","锤","陲","顀"],xìng:["倖","姓","婞","嬹","幸","性","悻","杏","涬","緈","臖","荇","莕","葕"],péng:["倗","傰","塜","塳","弸","憉","捀","朋","棚","椖","樥","硼","稝","竼","篷","纄","膨","芃","蓬","蘕","蟚","蟛","袶","輣","錋","鑝","韸","韼","騯","髼","鬅","鬔","鵬","鹏"],"tǎng cháng":["倘"],hòu:["候","厚","后","垕","堠","後","洉","茩","豞","逅","郈","鮜","鱟","鲎","鲘"],tì:["倜","剃","嚏","嚔","屉","屜","悌","悐","惕","惖","戻","掦","替","朑","歒","殢","涕","瓋","笹","籊","薙","褅","逖","逷","髰","鬀","鬄"],gàn:["倝","凎","幹","榦","檊","淦","灨","盰","紺","绀","詌","贑","赣","骭","㽏"],"liàng jìng":["倞","靓"],suī:["倠","哸","夊","滖","濉","眭","睢","芕","荽","荾","虽","雖","鞖"],"chàng chāng":["倡"],jié:["倢","偼","傑","刦","刧","刼","劫","劼","卩","卪","婕","媫","孑","岊","崨","嵥","嶻","巀","幯","截","捷","掶","擮","昅","杢","杰","桀","桝","楬","楶","榤","洁","滐","潔","狤","睫","礍","竭","節","羯","莭","蓵","蛣","蜐","蠘","蠞","蠽","衱","袺","訐","詰","誱","讦","踕","迼","鉣","鍻","镼","頡","鮚","鲒","㛃"],"kǒng kōng":["倥"],juàn:["倦","劵","奆","慻","桊","淃","狷","獧","眷","睊","睠","絭","絹","绢","罥","羂","腃","蔨","鄄","餋"],zōng:["倧","堫","宗","嵏","嵕","惾","朡","棕","椶","熧","猣","磫","緃","翪","腙","葼","蝬","豵","踨","踪","蹤","鍐","鑁","騌","騣","骔","鬃","鬉","鬷","鯮","鯼"],ní:["倪","坭","埿","尼","屔","怩","淣","猊","籾","聣","蚭","蜺","觬","貎","跜","輗","郳","鈮","铌","霓","馜","鯢","鲵","麑","齯","𫐐","𫠜"],zhuō:["倬","拙","捉","桌","梲","棁","棳","槕","涿","窧","鐯","䦃"],"wō wēi":["倭"],luǒ:["倮","剆","曪","瘰","癳","臝","蓏","蠃","裸","躶"],sōng:["倯","凇","娀","崧","嵩","庺","憽","松","枀","枩","柗","梥","檧","淞","濍","硹","菘","鬆"],lèng:["倰","堎","愣","睖","踜"],zì:["倳","剚","字","恣","渍","漬","牸","眥","眦","胔","胾","自","茡","荢"],bèn:["倴","坌","捹","撪","渀","笨","逩"],cǎi:["倸","啋","婇","彩","採","棌","毝","睬","綵","跴","踩"],zhài:["债","債","寨","瘵","砦"],yē:["倻","吔","噎","擨","暍","椰","歋","潱","蠮"],shà:["倽","唼","喢","歃","箑","翜","翣","萐","閯","霎"],qīng:["倾","傾","卿","圊","寈","氢","氫","淸","清","蜻","軽","輕","轻","郬","錆","鑋","靑","青","鯖"],yīng:["偀","嘤","噟","嚶","婴","媖","嫈","嬰","孆","孾","愥","撄","攖","朠","桜","樱","櫻","渶","煐","珱","瑛","璎","瓔","甇","甖","碤","礯","緓","纓","绬","缨","罂","罃","罌","膺","英","莺","蘡","蝧","蠳","褮","譻","賏","軈","鑍","锳","霙","韺","鴬","鶑","鶧","鶯","鷪","鷹","鸎","鸚","鹦","鹰","䓨"],"chēng chèn":["偁","爯"],ruǎn:["偄","朊","瑌","瓀","碝","礝","腝","軟","輭","软","阮"],"zhòng tóng":["偅"],chǔn:["偆","惷","睶","萶","蠢","賰"],"jiǎ jià":["假"],"jì jié":["偈"],"bǐng bìng":["偋"],ruò:["偌","叒","嵶","弱","楉","焫","爇","箬","篛","蒻","鄀","鰙","鰯","鶸"],tí:["偍","厗","啼","嗁","崹","漽","瑅","睼","禵","稊","緹","缇","罤","蕛","褆","謕","趧","蹄","蹏","醍","鍗","題","题","騠","鮷","鯷","鳀","鵜","鷤","鹈","𫘨"],wēi:["偎","危","喴","威","媙","嶶","巍","微","愄","揋","揻","椳","楲","溦","烓","煨","燰","癓","縅","葨","葳","薇","蜲","蝛","覣","詴","逶","隇","隈","霺","鰃","鰄","鳂"],piān:["偏","囨","媥","楄","犏","篇","翩","鍂"],yàn:["偐","厌","厭","唁","喭","嚈","嚥","堰","妟","姲","嬊","嬿","宴","彥","彦","敥","晏","暥","曕","曣","滟","灎","灔","灧","灩","焔","焰","焱","熖","燄","牪","猒","砚","硯","艳","艶","艷","覎","觃","觾","諺","讌","讞","谚","谳","豓","豔","贋","贗","赝","軅","酀","酽","醼","釅","雁","餍","饜","騐","験","騴","驗","驠","验","鬳","鳫","鴈","鴳","鷃","鷰","齞"],"tǎng dàng":["偒"],è:["偔","匎","卾","厄","呝","咢","噩","垩","堊","堮","岋","崿","廅","悪","愕","戹","扼","搤","搹","擜","櫮","歞","歺","湂","琧","砈","砐","硆","腭","苊","萼","蕚","蚅","蝁","覨","諤","讍","谔","豟","軛","軶","轭","遌","遏","遻","鄂","鈪","鍔","鑩","锷","阨","阸","頞","顎","颚","餓","餩","饿","鰐","鰪","鱷","鳄","鶚","鹗","齃","齶","𫫇","𥔲"],xié:["偕","勰","协","協","嗋","垥","奊","恊","愶","拹","携","撷","擕","擷","攜","斜","旪","熁","燲","綊","緳","縀","缬","翓","胁","脅","脇","脋","膎","蝢","衺","襭","諧","讗","谐","鞋","鞵","龤","㙦"],chě:["偖","扯","撦"],shěng:["偗","渻","眚"],chā:["偛","嗏","扠","挿","插","揷","疀","臿","艖","銟","鍤","锸","餷"],huáng:["偟","凰","喤","堭","墴","媓","崲","徨","惶","楻","湟","煌","獚","瑝","璜","癀","皇","磺","穔","篁","簧","艎","葟","蝗","蟥","諻","趪","遑","鍠","鐄","锽","隍","韹","餭","騜","鰉","鱑","鳇","鷬","黃","黄","𨱑"],yǎo:["偠","咬","婹","宎","岆","杳","柼","榚","溔","狕","窅","窈","舀","苭","闄","騕","鷕","齩"],"chǒu qiào":["偢"],yóu:["偤","尤","庮","怣","沋","油","浟","游","犹","猶","猷","由","疣","秞","肬","莜","莸","蕕","蚰","蝣","訧","輏","輶","逰","遊","邮","郵","鈾","铀","駀","魷","鮋","鱿","鲉","𬨎"],xū:["偦","墟","媭","嬃","楈","欨","歔","燸","疞","盱","綇","縃","繻","胥","蕦","虗","虚","虛","蝑","裇","訏","許","諝","譃","谞","鑐","需","須","须","顼","驉","鬚","魆","魖","𬣙","𦈡"],zhā:["偧","哳","抯","挓","揸","摣","樝","渣","皶","觰","譇","齄","齇"],cī:["偨","疵","蠀","趀","骴","髊","齹"],bī:["偪","屄","楅","毴","豍","逼","鰏","鲾","鵖"],xún:["偱","噚","寻","尋","峋","巡","廵","循","恂","揗","攳","旬","杊","栒","桪","樳","洵","浔","潯","燅","燖","珣","璕","畃","紃","荀","蟳","詢","询","鄩","鱏","鱘","鲟","𬘓","𬩽","𬍤","𬊈"],"cāi sī":["偲"],duān:["偳","媏","端","褍","鍴"],ǒu:["偶","吘","嘔","耦","腢","蕅","藕","𬉼","𠙶"],tōu:["偷","偸","鍮"],"zán zá zǎ":["偺"],"lǚ lóu":["偻","僂"],fèn:["偾","僨","奋","奮","弅","忿","愤","憤","瀵","瞓","秎","粪","糞","膹","鱝","鲼"],"kuǐ guī":["傀"],sǒu:["傁","叜","叟","嗾","櫢","瞍","薮","藪"],"zhì sī tí":["傂"],sù:["傃","僳","嗉","塐","塑","夙","嫊","愫","憟","榡","樎","樕","殐","泝","涑","溯","溸","潚","潥","玊","珟","璛","簌","粛","粟","素","縤","肃","肅","膆","蔌","藗","觫","訴","謖","诉","谡","趚","蹜","速","遡","遬","鋉","餗","驌","骕","鱐","鷫","鹔","𫗧"],xiā:["傄","煆","瞎","虲","谺","颬","鰕"],"yuàn yuán":["傆","媛"],rǒng:["傇","冗","宂","氄","軵"],nù:["傉","怒"],yùn:["傊","孕","恽","惲","愠","慍","枟","腪","蕴","薀","藴","蘊","褞","貟","运","運","郓","鄆","酝","醖","醞","韗","韞","韵","韻","餫"],"gòu jiǎng":["傋"],mà:["傌","嘜","榪","睰","祃","禡","罵","閁","駡","骂","鬕"],bàng:["傍","塝","棒","玤","稖","艕","蒡","蜯","謗","谤","鎊","镑"],diān:["傎","厧","嵮","巅","巓","巔","掂","攧","敁","槇","滇","癫","癲","蹎","顚","顛","颠","齻"],táng:["傏","唐","啺","坣","堂","塘","搪","棠","榶","溏","漟","煻","瑭","磄","禟","篖","糃","糖","糛","膅","膛","蓎","螗","螳","赯","踼","鄌","醣","鎕","隚","餹","饄","鶶","䣘"],hào:["傐","哠","恏","昊","昦","晧","暠","暤","暭","曍","浩","淏","澔","灏","灝","皓","皜","皞","皡","皥","耗","聕","薃","號","鄗","顥","颢","鰝"],"xī xì":["傒"],shān:["傓","删","刪","剼","圸","山","挻","搧","柵","檆","潸","澘","煽","狦","珊","笘","縿","羴","羶","脠","舢","芟","衫","跚","軕","邖","閊","鯅"],"qiàn jiān":["傔"],"què jué":["傕","埆"],"cāng chen":["傖"],róng:["傛","媶","嫆","嬫","容","峵","嵘","嶸","戎","搈","曧","栄","榕","榮","榵","毧","溶","瀜","烿","熔","狨","瑢","穁","絨","绒","羢","肜","茙","茸","荣","蓉","蝾","融","螎","蠑","褣","鎔","镕","駥"],"tà tàn":["傝"],suō:["傞","唆","嗍","嗦","娑","摍","桫","梭","睃","簑","簔","羧","莏","蓑","趖","鮻"],dǎi:["傣","歹"],zài:["傤","儎","再","在","扗","洅","載","酨"],gǔ:["傦","古","啒","尳","愲","榖","榾","汩","淈","濲","瀔","牯","皷","皼","盬","瞽","穀","罟","羖","股","脵","臌","薣","蛊","蠱","詁","诂","轂","逧","鈷","钴","餶","馉","鼓","鼔","𦙶"],bīn:["傧","宾","彬","斌","椕","滨","濒","濱","濵","瀕","繽","缤","虨","豩","豳","賓","賔","邠","鑌","镔","霦","顮"],chǔ:["储","儲","杵","椘","楚","楮","檚","濋","璴","础","礎","禇","處","齭","齼","𬺓"],nuó:["傩","儺","挪","梛","橠"],"cān càn":["傪"],lěi:["傫","儡","厽","垒","塁","壘","壨","櫐","灅","癗","矋","磊","礨","耒","蕌","蕾","藟","蘽","蠝","誄","讄","诔","鑸","鸓"],cuī:["催","凗","墔","崔","嵟","慛","摧","榱","獕","磪","鏙"],yōng:["傭","嗈","墉","壅","嫞","庸","廱","慵","拥","擁","滽","灉","牅","痈","癕","癰","臃","邕","郺","鄘","鏞","镛","雍","雝","饔","鱅","鳙","鷛"],"zāo cáo":["傮"],sǒng:["傱","嵷","怂","悚","愯","慫","竦","耸","聳","駷","㧐"],ào:["傲","坳","垇","墺","奡","嫯","岙","岰","嶴","懊","擙","澳","鏊","驁","骜"],"qī còu":["傶"],chuǎng:["傸","磢","闖","闯"],shǎ:["傻","儍"],hàn:["傼","垾","悍","憾","扞","捍","撖","撼","旱","晘","暵","汉","涆","漢","瀚","焊","猂","皔","睅","翰","莟","菡","蛿","蜭","螒","譀","輚","釬","銲","鋎","雗","頷","顄","颔","駻","鶾"],zhāng:["傽","嫜","张","張","彰","慞","暲","樟","漳","獐","璋","章","粻","蔁","蟑","遧","鄣","鏱","餦","騿","鱆","麞"],"yān yàn":["傿","墕","嬮"],"piào biāo":["僄","骠"],liàn:["僆","堜","媡","恋","戀","楝","殓","殮","湅","潋","澰","瀲","炼","煉","瑓","練","纞","练","萰","錬","鍊","鏈","链","鰊","𬶠"],màn:["㵘","僈","墁","幔","慢","曼","漫","澷","熳","獌","縵","缦","蔄","蘰","鄤","鏝","镘","𬜬"],"tàn tǎn":["僋"],yíng:["僌","営","塋","嬴","攍","楹","櫿","溁","溋","滢","潆","濙","濚","濴","瀅","瀛","瀠","瀯","灐","灜","熒","營","瑩","盁","盈","禜","籝","籯","縈","茔","荧","莹","萤","营","萦","萾","蓥","藀","蛍","蝇","蝿","螢","蠅","謍","贏","赢","迎","鎣"],dòng:["働","冻","凍","动","動","姛","戙","挏","栋","棟","湩","硐","胨","胴","腖","迵","霘","駧"],zhuàn:["僎","啭","囀","堟","撰","灷","瑑","篆","腞","蒃","襈","譔","饌","馔"],xiàng:["像","勨","向","嚮","姠","嶑","曏","橡","珦","缿","蟓","衖","襐","象","鐌","項","项","鱌"],shàn:["僐","善","墠","墡","嬗","擅","敾","椫","樿","歚","汕","灗","疝","磰","繕","缮","膳","蟮","蟺","訕","謆","譱","讪","贍","赡","赸","鄯","鐥","饍","騸","骟","鱓","鱔","鳝","𫮃"],"tuí tuǐ":["僓"],zǔn:["僔","噂","撙","譐"],pú:["僕","匍","圤","墣","濮","獛","璞","瞨","穙","莆","菐","菩","葡","蒱","蒲","贌","酺","鏷","镤"],láo:["僗","劳","労","勞","哰","崂","嶗","憥","朥","浶","牢","痨","癆","窂","簩","醪","鐒","铹","顟","髝","𫭼"],chǎng:["僘","厰","廠","敞","昶","氅","鋹","𬬮"],guāng:["僙","光","咣","垙","姯","洸","灮","炗","炚","炛","烡","珖","胱","茪","輄","銧","黆","𨐈"],liáo:["僚","嘹","嫽","寥","寮","尞","屪","嵺","嶚","嶛","廫","憀","敹","暸","橑","獠","璙","疗","療","竂","簝","繚","缭","聊","膋","膫","藔","蟟","豂","賿","蹘","辽","遼","飉","髎","鷯","鹩"],dèng:["僜","凳","墱","嶝","櫈","瞪","磴","覴","邓","鄧","隥"],"chán zhàn zhuàn":["僝"],bō:["僠","嶓","拨","撥","播","波","溊","玻","癶","盋","砵","碆","礡","缽","菠","袰","蹳","鉢","钵","餑","饽","驋","鱍","𬭛"],huì:["僡","匯","卉","喙","嘒","嚖","圚","嬒","寭","屶","屷","彗","彙","彚","徻","恚","恵","惠","慧","憓","懳","晦","暳","槥","橞","檅","櫘","汇","泋","滙","潓","烩","燴","獩","璤","瞺","硊","秽","穢","篲","絵","繪","绘","翙","翽","荟","蔧","蕙","薈","薉","蟪","詯","誨","諱","譓","譿","讳","诲","賄","贿","鐬","闠","阓","靧","頮","顪","颒","餯","𬤝","𬭬"],chuǎn:["僢","喘","舛","荈","踳"],"tiě jiàn":["僣"],sēng:["僧","鬙"],xiàn:["僩","僴","哯","垷","塪","姭","娊","宪","岘","峴","憲","撊","晛","橌","橺","涀","瀗","献","獻","现","現","県","睍","粯","糮","絤","綫","線","线","缐","羡","羨","腺","臔","臽","苋","莧","誢","豏","鋧","錎","限","陥","陷","霰","餡","馅","麲","鼸","𬀪","𪾢"],"yù jú":["僪"],"è wū":["僫"],"tóng zhuàng":["僮"],lǐn:["僯","凛","凜","廩","廪","懍","懔","撛","檁","檩","澟","癛","癝"],gù:["僱","凅","固","堌","崓","崮","故","梏","棝","牿","痼","祻","錮","锢","雇","顧","顾","鯝","鲴"],jiāng:["僵","壃","姜","橿","殭","江","畕","疅","礓","繮","缰","翞","茳","葁","薑","螀","螿","豇","韁","鱂","鳉"],mǐn:["僶","冺","刡","勄","悯","惽","愍","慜","憫","抿","敃","敏","敯","泯","潣","皿","笢","笽","簢","蠠","閔","閩","闵","闽","鰵","鳘","黽"],jìn:["僸","凚","噤","嚍","墐","壗","妗","嬧","搢","晉","晋","枃","殣","浕","浸","溍","濅","濜","烬","煡","燼","琎","瑨","璶","盡","祲","縉","缙","荩","藎","覲","觐","賮","贐","赆","近","进","進","靳","齽"],"jià jie":["價"],qiào:["僺","峭","帩","撬","殻","窍","竅","誚","诮","躈","陗","鞩","韒","髚"],pì:["僻","媲","嫓","屁","澼","甓","疈","譬","闢","鷿","鸊","䴙"],sài:["僿","簺","賽","赛"],"chán tǎn shàn":["儃"],"dāng dàng":["儅","当","闣"],xuān:["儇","喧","塇","媗","宣","愃","愋","揎","昍","暄","煊","煖","瑄","睻","矎","禤","箮","翧","翾","萱","萲","蓒","蕿","藼","蘐","蝖","蠉","諠","諼","譞","谖","軒","轩","鍹","駽","鰚","𫓶","𫍽"],"dān dàn":["儋","擔","瘅"],càn:["儏","澯","灿","燦","璨","粲","薒","謲"],"bīn bìn":["儐"],"án àn":["儑"],tái:["儓","坮","嬯","抬","擡","檯","炱","炲","籉","臺","薹","跆","邰","颱","鮐","鲐"],lán:["儖","兰","囒","婪","岚","嵐","幱","拦","攔","斓","斕","栏","欄","欗","澜","瀾","灆","灡","燣","燷","璼","篮","籃","籣","繿","葻","蓝","藍","蘫","蘭","褴","襕","襤","襴","襽","譋","讕","谰","躝","鑭","镧","闌","阑","韊","𬒗"],"nǐ yì ài yí":["儗"],méng:["儚","幪","曚","朦","橗","檬","氋","溕","濛","甍","甿","盟","礞","艨","莔","萌","蕄","虻","蝱","鄳","鄸","霿","靀","顭","饛","鯍","鸏","鹲","𫑡","㠓"],níng:["儜","凝","咛","嚀","嬣","柠","橣","檸","狞","獰","聍","聹","薴","鑏","鬡","鸋"],qióng:["儝","卭","宆","惸","憌","桏","橩","焪","焭","煢","熍","琼","瓊","睘","穷","穹","窮","竆","笻","筇","舼","茕","藑","藭","蛩","蛬","赹","跫","邛","銎","䓖"],liè:["儠","冽","列","劣","劽","埒","埓","姴","峛","巤","挒","捩","栵","洌","浖","烈","烮","煭","犣","猎","猟","獵","聗","脟","茢","蛚","趔","躐","迾","颲","鬛","鬣","鮤","鱲","鴷","䴕","𫚭"],kuǎng:["儣","夼","懭"],bào:["儤","勽","報","忁","报","抱","曓","爆","犦","菢","虣","蚫","豹","鉋","鑤","铇","骲","髱","鮑","鲍"],biāo:["儦","墂","幖","彪","标","標","滮","瀌","熛","爂","猋","瘭","磦","膘","臕","謤","贆","鏢","鑣","镖","镳","颮","颷","飆","飇","飈","飊","飑","飙","飚","驫","骉","髟"],zǎn:["儧","儹","噆","攅","昝","趱","趲"],háo:["儫","嗥","嘷","噑","嚎","壕","椃","毜","毫","濠","獆","獔","竓","籇","蚝","蠔","譹","豪"],qìng:["儬","凊","庆","慶","櫦","濪","碃","磬","罄","靘"],chèn:["儭","嚫","榇","櫬","疢","衬","襯","讖","谶","趁","趂","齓","齔","龀"],téng:["儯","幐","滕","漛","疼","籐","籘","縢","腾","藤","虅","螣","誊","謄","邆","駦","騰","驣","鰧","䲢"],"lǒng lóng lòng":["儱"],"chán chàn":["儳"],"ráng xiāng":["儴","勷"],"huì xié":["儶"],luó:["儸","攞","椤","欏","猡","玀","箩","籮","罗","羅","脶","腡","萝","蘿","螺","覼","逻","邏","鏍","鑼","锣","镙","饠","騾","驘","骡","鸁"],léi:["儽","嫘","檑","欙","瓃","畾","縲","纍","纝","缧","罍","羸","蔂","蘲","虆","轠","鐳","鑘","镭","雷","靁","鱩","鼺"],"nàng nāng":["儾"],"wù wū":["兀"],yǔn:["允","喗","夽","抎","殒","殞","狁","磒","荺","賱","鈗","阭","陨","隕","霣","馻","齫","齳"],zān:["兂","橵","簪","簮","糌","鐕","鐟","鵤"],yuán:["元","円","原","厡","厵","园","圆","圎","園","圓","垣","塬","媴","嫄","援","榞","榬","橼","櫞","沅","湲","源","溒","爰","猨","猿","笎","緣","縁","缘","羱","茒","薗","蝝","蝯","螈","袁","褤","謜","轅","辕","邍","邧","酛","鈨","鎱","騵","魭","鶢","鶰","黿","鼋","𫘪"],xiōng:["兄","兇","凶","匂","匈","哅","忷","恟","汹","洶","胷","胸","芎","訩","詾","讻"],chōng:["充","嘃","忡","憃","憧","摏","沖","浺","珫","罿","翀","舂","艟","茺","衝","蹖","㳘"],zhào:["兆","垗","旐","曌","枛","櫂","照","燳","狣","瞾","笊","罀","罩","羄","肁","肇","肈","詔","诏","赵","趙","鮡","𬶐"],"duì ruì yuè":["兊","兌","兑"],kè:["克","刻","勀","勊","堁","娔","客","恪","愙","氪","溘","碦","緙","缂","艐","衉","課","课","錁","锞","騍","骒"],tù:["兎","兔","堍","迌","鵵"],dǎng:["党","攩","欓","譡","讜","谠","黨","𣗋"],dōu:["兜","兠","唗","橷","篼","蔸"],huǎng:["兤","奛","幌","怳","恍","晄","炾","熀","縨","詤","謊","谎"],rù:["入","嗕","媷","扖","杁","洳","溽","縟","缛","蓐","褥","鳰"],nèi:["內","氝","氞","錗"],"yú shù":["兪"],"liù lù":["六"],han:["兯","爳"],tiān:["兲","天","婖","添","酟","靔","靝","黇"],"xīng xìng":["兴"],diǎn:["典","嚸","奌","婰","敟","椣","点","碘","蒧","蕇","踮","點"],"zī cí":["兹"],jiān:["兼","冿","囏","坚","堅","奸","姦","姧","尖","幵","惤","戋","戔","搛","椾","樫","櫼","歼","殱","殲","湔","瀐","瀸","煎","熞","熸","牋","瑊","睷","礛","礷","笺","箋","緘","縑","缄","缣","肩","艰","艱","菅","菺","葌","蒹","蔪","蕑","蕳","虃","譼","豜","鑯","雃","鞯","韀","韉","餰","馢","鰔","鰜","鰹","鲣","鳒","鵑","鵳","鶼","鹣","麉"],shòu:["兽","受","售","壽","夀","寿","授","狩","獣","獸","痩","瘦","綬","绶","膄"],jì:["兾","冀","剂","剤","劑","勣","坖","垍","塈","妓","季","寂","寄","廭","彑","徛","忌","悸","惎","懻","技","旡","既","旣","暨","暩","曁","梞","檕","檵","洎","漃","漈","瀱","痵","癠","禝","稩","稷","穄","穊","穧","紀","継","績","繋","繼","继","绩","罽","臮","芰","茍","茤","葪","蓟","蔇","薊","蘎","蘮","蘻","裚","襀","覬","觊","計","記","誋","计","记","跡","跽","蹟","迹","际","際","霁","霽","驥","骥","髻","鬾","魝","魥","鯚","鯽","鰶","鰿","鱀","鱭","鲚","鲫","鵋","鷑","齌","𪟝","𬶨","𬶭"],jiōng:["冂","冋","坰","埛","扃","蘏","蘔","駉","駫","𬳶"],mào:["冃","冐","媢","帽","愗","懋","暓","柕","楙","毷","瑁","皃","眊","瞀","耄","茂","萺","蝐","袤","覒","貌","貿","贸","鄚","鄮"],rǎn:["冄","冉","姌","媣","染","珃","苒","蒅","䎃"],"nèi nà":["内"],gāng:["冈","冮","刚","剛","堈","堽","岡","掆","摃","棡","牨","犅","疘","綱","纲","缸","罁","罡","肛","釭","鎠","㭎"],cè:["冊","册","厕","厠","夨","廁","恻","惻","憡","敇","测","測","笧","策","筞","筴","箣","荝","萗","萴","蓛"],guǎ:["冎","剐","剮","叧","寡"],"mào mò":["冒"],gòu:["冓","啂","坸","垢","够","夠","媾","彀","搆","撀","构","構","煹","覯","觏","訽","詬","诟","購","购","遘","雊"],xǔ:["冔","喣","暊","栩","珝","盨","糈","詡","諿","诩","鄦","醑"],mì:["冖","冪","嘧","塓","宻","密","峚","幂","幎","幦","怽","榓","樒","櫁","汨","淧","滵","漞","濗","熐","羃","蔤","蜜","覓","覔","覛","觅","謐","谧","鼏"],"yóu yín":["冘"],xiě:["写","冩","藛"],jūn:["军","君","均","桾","汮","皲","皸","皹","碅","莙","蚐","袀","覠","軍","鈞","銁","銞","鍕","钧","頵","鮶","鲪","麏"],mí:["冞","擟","瀰","爢","猕","獼","祢","禰","縻","蒾","藌","蘪","蘼","袮","詸","謎","迷","醚","醾","醿","釄","镾","鸍","麊","麋","麛"],"guān guàn":["冠","覌","観","觀","观"],měng:["冡","勐","懵","掹","猛","獴","艋","蜢","蠓","錳","锰","鯭","鼆"],zhǒng:["冢","塚","尰","歱","煄","瘇","肿","腫","踵"],zuì:["冣","嶵","晬","最","栬","槜","檇","檌","祽","絊","罪","蕞","辠","酔","酻","醉","錊"],yuān:["冤","剈","囦","嬽","寃","棩","淵","渁","渆","渊","渕","灁","眢","肙","葾","蒬","蜎","蜵","駌","鳶","鴛","鵷","鸢","鸳","鹓","鼘","鼝"],míng:["冥","名","明","暝","朙","榠","洺","溟","猽","眀","眳","瞑","茗","螟","覭","詺","鄍","銘","铭","鳴","鸣"],kòu:["冦","叩","宼","寇","扣","敂","滱","窛","筘","簆","蔲","蔻","釦","鷇"],tài:["冭","太","夳","忲","态","態","汰","汱","泰","溙","肽","舦","酞","鈦","钛"],"féng píng":["冯","馮"],"chōng chòng":["冲"],kuàng:["况","圹","壙","岲","懬","旷","昿","曠","框","況","爌","眖","眶","矿","砿","礦","穬","絋","絖","纊","纩","貺","贶","軦","邝","鄺","鉱","鋛","鑛","黋"],lěng:["冷"],pàn:["冸","判","叛","沜","泮","溿","炍","牉","畔","盼","聁","袢","襻","詊","鋬","鑻","頖","鵥"],fā:["冹","彂","沷","発","發"],xiǎn:["冼","尟","尠","崄","嶮","幰","攇","显","櫶","毨","灦","烍","燹","狝","猃","獫","獮","玁","禒","筅","箲","藓","蘚","蚬","蜆","譣","赻","跣","鍌","险","険","險","韅","顕","顯","㬎"],qià:["冾","圶","帢","恰","殎","洽","硈","胢","髂"],"jìng chēng":["净","凈","淨"],sōu:["凁","嗖","廀","廋","捜","搜","摉","溲","獀","艘","蒐","螋","鄋","醙","鎪","锼","颼","飕","餿","馊","騪"],měi:["凂","媄","媺","嬍","嵄","挴","毎","每","浼","渼","燘","美","躾","鎂","镁","黣"],tú:["凃","図","图","圖","圗","塗","屠","峹","嵞","庩","廜","徒","悇","揬","涂","瘏","筡","腯","荼","蒤","跿","途","酴","鈯","鍎","馟","駼","鵌","鶟","鷋","鷵","𬳿"],zhǔn:["准","凖","埻","準","𬘯"],"liáng liàng":["凉","涼","量"],diāo:["凋","刁","刟","叼","奝","弴","彫","汈","琱","碉","簓","虭","蛁","貂","錭","雕","鮉","鯛","鲷","鵰","鼦"],còu:["凑","湊","腠","輳","辏"],ái:["凒","啀","嘊","捱","溰","癌","皑","皚"],duó:["凙","剫","夺","奪","痥","踱","鈬","鐸","铎"],dú:["凟","匵","嬻","椟","櫝","殰","涜","牍","牘","犊","犢","独","獨","瓄","皾","裻","読","讀","讟","豄","贕","錖","鑟","韇","韣","韥","騳","髑","黩","黷"],"jǐ jī":["几"],fán:["凡","凢","凣","匥","墦","杋","柉","棥","樊","瀿","烦","煩","燔","璠","矾","礬","笲","籵","緐","羳","舤","舧","薠","蘩","蠜","襎","蹯","釩","鐇","鐢","钒","鷭","𫔍","𬸪"],jū:["凥","匊","娵","婮","居","崌","抅","挶","掬","梮","椐","檋","毩","毱","泃","涺","狙","琚","疽","砠","罝","腒","艍","蜛","裾","諊","跔","踘","躹","陱","雎","鞠","鞫","駒","驹","鮈","鴡","鶋","𬶋"],"chù chǔ":["処","处"],zhǐ:["凪","劧","咫","址","坧","帋","恉","扺","指","旨","枳","止","汦","沚","洔","淽","疻","砋","祉","秖","紙","纸","芷","藢","衹","襧","訨","趾","軹","轵","酯","阯","黹"],píng:["凭","凴","呯","坪","塀","岼","帡","帲","幈","平","慿","憑","枰","洴","焩","玶","瓶","甁","竮","箳","簈","缾","荓","萍","蓱","蚲","蛢","評","评","軿","輧","郱","鮃","鲆"],kǎi:["凯","凱","剀","剴","垲","塏","恺","愷","慨","暟","蒈","輆","鍇","鎧","铠","锴","闓","闿","颽"],gān:["凲","坩","尲","尴","尶","尷","柑","泔","漧","玕","甘","疳","矸","竿","筸","粓","肝","苷","迀","酐","魐"],"kǎn qiǎn":["凵"],tū:["凸","堗","嶀","捸","涋","湥","痜","禿","秃","突","葖","鋵","鵚","鼵","㻬"],"āo wā":["凹"],chū:["出","初","岀","摴","榋","樗","貙","齣","䢺","䝙"],dàng:["凼","圵","垱","壋","档","檔","氹","璗","瓽","盪","瞊","砀","碭","礑","簜","荡","菪","蕩","蘯","趤","逿","雼","𬍡"],hán:["函","凾","含","圅","娢","寒","崡","晗","梒","浛","涵","澏","焓","琀","甝","筨","蜬","邗","邯","鋡","韓","韩"],záo:["凿","鑿"],dāo:["刀","刂","忉","氘","舠","螩","釖","魛","鱽"],chuāng:["刅","摐","牎","牕","疮","瘡","窓","窗","窻"],"fēn fèn":["分"],"qiè qiē":["切"],kān:["刊","勘","堪","戡","栞","龕","龛"],cǔn:["刌","忖"],chú:["刍","厨","幮","廚","橱","櫉","櫥","滁","犓","篨","耡","芻","蒢","蒭","蜍","蟵","豠","趎","蹰","躇","躕","鉏","鋤","锄","除","雏","雛","鶵"],"huà huá":["划"],lí:["刕","剓","剺","劙","厘","喱","嚟","囄","嫠","孷","廲","悡","梨","梸","棃","漓","灕","犁","犂","狸","琍","璃","瓈","盠","睝","离","穲","竰","筣","篱","籬","糎","縭","缡","罹","艃","荲","菞","蓠","蔾","藜","蘺","蜊","蟍","蟸","蠫","褵","謧","貍","醨","鋫","錅","鏫","鑗","離","驪","骊","鯏","鯬","鱺","鲡","鵹","鸝","鹂","黎","黧","㰀"],yuè:["刖","嬳","岄","岳","嶽","恱","悅","悦","戉","抈","捳","月","樾","瀹","爚","玥","礿","禴","篗","籆","籥","籰","粤","粵","蘥","蚎","蚏","説","越","跀","跃","躍","軏","鈅","鉞","鑰","钺","閱","閲","阅","鸑","鸙","黦","龠","𫐄","𬸚"],liú:["刘","劉","嚠","媹","嵧","旈","旒","榴","橊","流","浏","瀏","琉","瑠","瑬","璢","畄","留","畱","疁","瘤","癅","硫","蒥","蓅","蟉","裗","鎏","鏐","鐂","镠","飀","飅","飗","駠","駵","騮","驑","骝","鰡","鶹","鹠","麍"],zé:["则","則","啧","嘖","嫧","帻","幘","択","樍","歵","沢","泎","溭","皟","瞔","矠","礋","箦","簀","舴","蔶","蠌","襗","謮","賾","赜","迮","鸅","齚","齰"],"chuàng chuāng":["创","創"],qù:["刞","厺","去","閴","闃","阒","麮","鼁"],"bié biè":["別","别"],"páo bào":["刨"],"chǎn chàn":["刬","剗","幝"],guā:["刮","劀","桰","歄","煱","瓜","胍","踻","颪","颳","騧","鴰","鸹"],gēng:["刯","庚","椩","浭","焿","畊","絚","羮","羹","耕","菮","賡","赓","鶊","鹒"],dào:["到","噵","悼","椡","檤","燾","瓙","盗","盜","稲","稻","纛","翿","艔","菿","衜","衟","軇","道"],chuàng:["刱","剏","剙","怆","愴"],kū:["刳","哭","圐","堀","枯","桍","矻","窟","跍","郀","骷","鮬"],duò:["刴","剁","墯","尮","惰","憜","挅","桗","舵","跥","跺","陊","陏","飿","饳","鵽"],"shuā shuà":["刷"],"quàn xuàn":["券"],"chà shā":["刹","剎"],"cì cī":["刺"],guì:["刽","刿","劊","劌","撌","攰","昋","桂","椢","槶","樻","櫃","猤","禬","筀","蓕","襘","貴","贵","跪","鐀","鑎","鞼","鱖","鱥"],lóu:["剅","娄","婁","廔","楼","樓","溇","漊","熡","耧","耬","艛","蒌","蔞","蝼","螻","謱","軁","遱","鞻","髅","髏","𪣻"],cuò:["剉","剒","厝","夎","挫","措","棤","莝","莡","蓌","逪","銼","錯","锉","错"],"xiāo xuē":["削"],"kēi kè":["剋","尅"],"là lá":["剌"],tī:["剔","梯","踢","銻","锑","鷈","鷉","䏲","䴘"],pōu:["剖"],wān:["剜","塆","壪","帵","弯","彎","湾","潫","灣","睕","蜿","豌"],"bāo bō":["剝","剥"],duō:["剟","咄","哆","嚉","多","夛","掇","毲","畓","裰","㙍"],qíng:["剠","勍","夝","情","擎","晴","暒","棾","樈","檠","氰","甠","硘","葝","黥"],"yǎn shàn":["剡"],"dū zhuó":["剢"],yān:["剦","嫣","崦","嶖","恹","懕","懨","樮","淊","淹","漹","烟","焉","焑","煙","珚","篶","胭","臙","菸","鄢","醃","閹","阉","黫"],huō:["剨","劐","吙","攉","秴","耠","锪","騞","𬴃"],shèng:["剩","剰","勝","圣","墭","嵊","晠","榺","橳","琞","聖","蕂","貹","賸"],"duān zhì":["剬"],wū:["剭","呜","嗚","圬","屋","巫","弙","杇","歍","汙","汚","污","洿","烏","窏","箼","螐","誈","誣","诬","邬","鄔","鎢","钨","鰞","鴮"],gē:["割","哥","圪","彁","戈","戓","戨","歌","滒","犵","肐","袼","謌","鎶","鴚","鴿","鸽"],"dá zhá":["剳"],chuán:["剶","暷","椽","篅","舡","舩","船","輲","遄"],"tuán zhuān":["剸","漙","篿"],"lù jiū":["剹"],pēng:["剻","匉","嘭","怦","恲","抨","梈","烹","砰","軯","駍"],piāo:["剽","勡","慓","旚","犥","翲","螵","飃","飄","飘","魒"],kōu:["剾","彄","抠","摳","眍","瞘","芤","𫸩"],"jiǎo chāo":["剿","劋","勦","摷"],qiāo:["劁","勪","墝","幧","敲","橇","毃","燆","硗","磽","繑","趬","跷","踍","蹺","蹻","郻","鄡","鄥","鍫","鍬","鐰","锹","頝"],"huá huà":["劃"],"zhā zhá":["劄"],"pī pǐ":["劈","悂"],tāng:["劏","嘡","羰","薚","蝪","蹚","鞺","鼞"],chán:["劖","嚵","壥","婵","嬋","巉","廛","棎","毚","湹","潹","潺","澶","瀍","瀺","煘","獑","磛","緾","纏","纒","缠","艬","蝉","蟐","蟬","蟾","誗","讒","谗","躔","鄽","酁","鋋","鑱","镵","饞","馋"],zuān:["劗","躜","躦","鉆","鑚"],mó:["劘","嫫","嬤","嬷","尛","摹","擵","橅","糢","膜","藦","蘑","謨","謩","谟","饃","饝","馍","髍","魔","魹"],zhú:["劚","斸","曯","欘","灟","炢","烛","燭","爥","瘃","竹","笁","笜","舳","茿","蓫","蠋","蠾","躅","逐","逫","钃","鱁"],quàn:["劝","勧","勸","牶","韏"],"jìn jìng":["劤","劲","勁"],kēng:["劥","坑","牼","硁","硜","誙","銵","鍞","鏗","铿","阬"],"xié liè":["劦"],"zhù chú":["助"],nǔ:["努","弩","砮","胬"],shào:["劭","卲","哨","潲","紹","綤","绍","袑","邵"],miǎo:["劰","杪","淼","渺","眇","秒","篎","緲","缈","藐","邈"],kǒu:["劶","口"],wā:["劸","娲","媧","屲","挖","攨","洼","溛","漥","瓾","畖","穵","窊","窪","蛙","韈","鼃"],kuāng:["劻","匡","匩","哐","恇","洭","筐","筺","誆","诓","軭","邼"],hé:["劾","咊","啝","姀","峆","敆","曷","柇","楁","毼","河","涸","渮","澕","熆","皬","盇","盉","盍","盒","禾","篕","籺","粭","翮","菏","萂","覈","訸","詥","郃","釛","鉌","鑉","閡","闔","阂","阖","鞨","頜","餄","饸","魺","鹖","麧","齕","龁","龢","𬌗"],gào:["勂","吿","告","峼","祮","祰","禞","筶","誥","诰","郜","鋯","锆"],"bó bèi":["勃"],láng:["勆","嫏","廊","斏","桹","榔","樃","欴","狼","琅","瑯","硠","稂","艆","蓈","蜋","螂","躴","郒","郞","鋃","鎯","锒"],xūn:["勋","勛","勲","勳","嚑","坃","埙","塤","壎","壦","曛","燻","獯","矄","纁","臐","薫","薰","蘍","醺","𫄸"],"juàn juān":["勌","瓹"],"lè lēi":["勒"],kài:["勓","炌","烗","鎎"],"wěng yǎng":["勜"],qín:["勤","嗪","噙","嶜","庈","懃","懄","捦","擒","斳","檎","澿","珡","琴","琹","瘽","禽","秦","耹","芩","芹","菦","螓","蠄","鈙","鈫","雂","靲","鳹","鵭"],jiàng:["勥","匞","匠","嵹","弜","弶","摾","櫤","洚","滰","犟","糡","糨","絳","绛","謽","酱","醤","醬"],fān:["勫","嬏","帆","幡","忛","憣","旙","旛","繙","翻","藩","轓","颿","飜","鱕"],juān:["勬","姢","娟","捐","涓","蠲","裐","鎸","鐫","镌","鹃"],"tóng dòng":["勭","烔","燑","狪"],lǜ:["勴","垏","嵂","律","慮","氯","滤","濾","爈","箻","綠","繂","膟","葎","虑","鑢"],chè:["勶","坼","彻","徹","掣","撤","澈","烢","爡","瞮","硩","聅","迠","頙","㬚"],sháo:["勺","玿","韶"],"gōu gòu":["勾"],cōng:["匆","囪","囱","忩","怱","悤","暰","樬","漗","瑽","璁","瞛","篵","繱","聡","聦","聪","聰","苁","茐","葱","蓯","蔥","蟌","鍯","鏓","鏦","騘","驄","骢"],"táo yáo":["匋","陶"],páo:["匏","咆","垉","庖","爮","狍","袍","褜","軳","鞄","麅"],dá:["匒","妲","怛","炟","燵","畣","笪","羍","荙","薘","蟽","詚","达","迏","迖","迚","逹","達","鐽","靼","鞑","韃","龖","龘","𫟼"],"huà huā":["化"],"běi bèi":["北"],nǎo:["匘","垴","堖","嫐","恼","悩","惱","瑙","碯","脑","脳","腦"],"chí shi":["匙"],fāng:["匚","堏","方","淓","牥","芳","邡","鈁","錺","钫","鴋"],zā:["匝","咂","帀","沞","臜","臢","迊","鉔","魳"],qiè:["匧","厒","妾","怯","悏","惬","愜","挈","穕","窃","竊","笡","箧","篋","籡","踥","鍥","锲","鯜"],"zāng cáng":["匨"],fěi:["匪","奜","悱","棐","榧","篚","翡","蕜","誹","诽"],"kuì guì":["匮","匱"],suǎn:["匴"],pǐ:["匹","噽","嚭","圮","庀","痞","癖","脴","苉","銢","鴄"],"qū ōu":["区","區"],"kē qià":["匼"],"yǎn yàn":["匽","棪"],biǎn:["匾","惼","揙","碥","稨","窆","藊","褊","貶","贬","鴘"],nì:["匿","堄","嫟","嬺","惄","愵","昵","暱","氼","眤","睨","縌","胒","腻","膩","逆","𨺙"],niàn:["卄","唸","埝","廿","念","惗","艌"],sà:["卅","櫒","脎","萨","蕯","薩","鈒","隡","颯","飒","馺"],zú:["卆","哫","崪","族","箤","足","踤","镞"],shēng:["升","呏","声","斘","昇","曻","枡","殅","泩","湦","焺","牲","珄","生","甥","竔","笙","聲","鉎","鍟","阩","陞","陹","鵿","鼪"],wàn:["卍","卐","忨","杤","瞣","脕","腕","萬","蟃","贎","輐","錽","𬇕"],"huá huà huā":["华","華"],bēi:["卑","悲","揹","杯","桮","盃","碑","藣","鵯","鹎"],"zú cù":["卒"],"dān shàn chán":["单","單"],"nán nā":["南"],"shuài lǜ":["卛"],"bǔ bo pú":["卜"],"kuàng guàn":["卝"],biàn:["卞","变","変","峅","弁","徧","忭","抃","昪","汳","汴","玣","艑","苄","覍","諚","變","辡","辧","辨","辩","辫","辮","辯","遍","釆","𨚕"],bǔ:["卟","哺","捕","补","補","鸔","𬷕"],"zhàn zhān":["占","覱"],"kǎ qiǎ":["卡"],lú:["卢","嚧","垆","壚","庐","廬","曥","枦","栌","櫨","泸","瀘","炉","爐","獹","玈","瓐","盧","矑","籚","纑","罏","胪","臚","舮","舻","艫","芦","蘆","蠦","轤","轳","鈩","鑪","顱","颅","馿","髗","魲","鱸","鲈","鸕","鸬","黸","𬬻"],lǔ:["卤","塷","掳","擄","樐","橹","櫓","氌","滷","澛","瀂","硵","磠","穞","艣","艪","蓾","虏","虜","鏀","鐪","鑥","镥","魯","鲁","鹵"],guà:["卦","啩","挂","掛","罣","褂","詿","诖"],"áng yǎng":["卬"],yìn:["印","垽","堷","廕","慭","憖","憗","懚","洕","湚","猌","癊","胤","茚","酳","鮣","䲟"],què:["却","卻","塙","崅","悫","愨","慤","搉","榷","燩","琷","皵","确","確","礭","闋","阕","鵲","鹊","𬒈"],luǎn:["卵"],"juàn juǎn":["卷","巻"],"chǎng ān hàn":["厂"],"wěi yán":["厃"],tīng:["厅","厛","听","庁","廰","廳","汀","烃","烴","綎","耓","聴","聼","聽","鞓","𬘩"],"zhé zhái":["厇"],"hàn àn":["厈","屽"],yǎ:["厊","唖","庌","痖","瘂","蕥"],shè:["厍","厙","弽","慑","慴","懾","摂","欇","涉","涻","渉","滠","灄","社","舎","蔎","蠂","設","设","赦","騇","麝"],dǐ:["厎","呧","坘","弤","抵","拞","掋","牴","砥","菧","觝","詆","诋","軧","邸","阺","骶","鯳"],"zhǎ zhǎi":["厏"],páng:["厐","嫎","庞","徬","舽","螃","逄","鰟","鳑","龎","龐"],"zhì shī":["厔"],máng:["厖","吂","哤","娏","忙","恾","杗","杧","汒","浝","牻","痝","盲","硭","笀","芒","茫","蘉","邙","釯","鋩","铓","駹"],zuī:["厜","樶","纗","蟕"],"shà xià":["厦","廈"],áo:["厫","嗷","嗸","廒","敖","滶","獒","獓","璈","翱","翶","翺","聱","蔜","螯","謷","謸","遨","鏖","隞","鰲","鳌","鷔","鼇"],"lán qiān":["厱"],"sī mǒu":["厶"],"gōng hóng":["厷"],"lín miǎo":["厸"],"qiú róu":["厹"],dū:["厾","嘟","督","醏"],"xiàn xuán":["县","縣"],"cān shēn cēn sān":["参","參","叄","叅"],"ài yǐ":["叆"],"chā chà chǎ chá":["叉"],shuāng:["双","孀","孇","欆","礵","艭","雙","霜","騻","驦","骦","鷞","鸘","鹴"],shōu:["収","收"],guái:["叏"],bá:["叐","妭","抜","拔","炦","癹","胈","茇","菝","詙","跋","軷","魃","鼥"],"fā fà":["发"],"zhuó yǐ lì jué":["叕"],qǔ:["取","娶","竬","蝺","詓","齲","龋"],"jiǎ xiá":["叚","徦"],"wèi yù":["叞","尉","蔚"],dié:["叠","垤","堞","峌","幉","恎","惵","戜","曡","殜","氎","牃","牒","瓞","畳","疂","疉","疊","碟","絰","绖","耊","耋","胅","艓","苵","蜨","蝶","褋","詄","諜","谍","跮","蹀","迭","镻","鰈","鲽","鴩","𫶇"],ruì:["叡","枘","汭","瑞","睿","芮","蚋","蜹","銳","鋭","锐"],"jù gōu":["句"],lìng:["另","呤","炩","蘦"],"dāo dáo tāo":["叨"],"zhī zhǐ":["只"],jiào:["叫","呌","嘂","嘦","噍","嬓","斍","斠","滘","漖","獥","珓","皭","窖","藠","訆","譥","趭","較","轎","轿","较","酵","醮","釂"],"zhào shào":["召"],"kě kè":["可"],"tái tāi":["台","苔"],pǒ:["叵","尀","笸","箥","鉕","钷","駊"],"yè xié":["叶"],"hào háo":["号"],tàn:["叹","嘆","探","歎","湠","炭","碳","舕"],"hōng hóng":["叿"],miē:["吀","咩","哶","孭"],"xū yū yù":["吁"],chī:["吃","哧","喫","嗤","噄","妛","媸","彨","彲","摛","攡","殦","瓻","痴","癡","眵","瞝","笞","粚","胵","蚩","螭","訵","魑","鴟","鵄","鸱","黐","齝","𫄨"],"xuān sòng":["吅"],yāo:["吆","喓","夭","妖","幺","楆","殀","祅","腰","葽","訞","邀","鴁","鴢","㙘"],zǐ:["吇","姉","姊","子","杍","梓","榟","橴","滓","矷","秭","笫","籽","紫","耔","虸","訿","釨"],"hé gě":["合","鲄"],"cùn dòu":["吋"],"tóng tòng":["同"],"tǔ tù":["吐","唋"],"zhà zhā":["吒","奓"],"xià hè":["吓"],"ā yā":["吖"],"ma má mǎ":["吗"],lìn:["吝","恡","悋","橉","焛","甐","膦","蔺","藺","賃","赁","蹸","躏","躙","躪","轥","閵"],tūn:["吞","暾","朜","焞"],"bǐ pǐ":["吡"],qìn:["吢","吣","唚","抋","揿","搇","撳","沁","瀙","菣","藽"],"jiè gè":["吤"],"fǒu pǐ":["否"],"ba bā":["吧"],dūn:["吨","噸","墩","墪","惇","撉","撴","犜","獤","礅","蜳","蹾","驐"],fēn:["吩","帉","昐","朆","梤","棻","氛","竕","紛","纷","翂","芬","衯","訜","躮","酚","鈖","雰","餴","饙","馚"],"é huā":["吪"],"kēng háng":["吭","妔"],shǔn:["吮"],"zhī zī":["吱"],"yǐn shěn":["吲"],wú:["吳","吴","呉","墲","峿","梧","橆","毋","洖","浯","無","珸","璑","祦","芜","茣","莁","蕪","蜈","蟱","譕","郚","鋙","铻","鯃","鵐","鷡","鹀","鼯"],"chǎo chāo":["吵"],"nà nè":["吶"],"xuè chuò jué":["吷"],chuī:["吹","炊","龡"],"dōu rú":["吺"],hǒu:["吼","犼"],"hōng hǒu ōu":["吽"],"wú yù":["吾"],"ya yā":["呀"],"è e":["呃"],dāi:["呆","懛","獃"],"mèn qǐ":["呇"],hōng:["呍","嚝","揈","灴","烘","焢","硡","薨","訇","谾","軣","輷","轟","轰","鍧"],nà:["呐","捺","笝","納","纳","肭","蒳","衲","豽","貀","軜","郍","鈉","钠","靹","魶"],"tūn tiān":["呑"],"fǔ ḿ":["呒","嘸"],"dāi tǎi":["呔"],"ǒu ōu òu":["呕"],"bài bei":["呗"],"yuán yún yùn":["员","員"],guō:["呙","啯","嘓","埚","堝","墎","崞","彉","彍","懖","猓","瘑","聒","蝈","蟈","郭","鈛","鍋","锅"],"huá qì":["呚"],"qiàng qiāng":["呛","跄"],shī:["呞","失","尸","屍","师","師","施","浉","湤","湿","溮","溼","濕","狮","獅","瑡","絁","葹","蒒","蓍","虱","蝨","褷","襹","詩","诗","邿","釃","鉇","鍦","鯴","鰤","鲺","鳲","鳾","鶳","鸤","䴓","𫚕"],juǎn:["呟","埍","臇","菤","錈","锩"],pěn:["呠","翸"],"wěn mǐn":["呡"],"ne ní":["呢"],"ḿ m̀ móu":["呣"],rán:["呥","嘫","然","燃","繎","肰","蚦","蚺","衻","袇","袡","髥","髯"],"tiè chè":["呫"],"qì zhī":["呮"],"zǐ cī":["呰"],"guā gū guǎ":["呱"],"cī zī":["呲"],"hǒu xǔ gòu":["呴"],"hē ā á ǎ à a":["呵"],náo:["呶","夒","峱","嶩","巎","挠","撓","猱","硇","蛲","蟯","詉","譊","鐃","铙"],"xiā gā":["呷"],pēi:["呸","怌","肧","胚","衃","醅"],"háo xiāo":["呺"],mìng:["命","掵"],"dá dàn":["呾"],"zuǐ jǔ":["咀"],"xián gān":["咁"],pǒu:["咅","哣","犃"],"yǎng yāng":["咉"],"zǎ zé zhā":["咋"],"hé hè huó huò hú":["和"],hāi:["咍"],dā:["咑","哒","噠","墶","搭","撘","耷","褡","鎝","𨱏"],"kǎ kā":["咔"],gū:["咕","唂","唃","姑","嫴","孤","巬","巭","柧","橭","沽","泒","稒","笟","箍","箛","篐","罛","苽","菇","菰","蓇","觚","軱","軲","轱","辜","酤","鈲","鮕","鴣","鸪"],"kā gā":["咖"],zuo:["咗"],lóng:["咙","嚨","嶐","巃","巄","昽","曨","朧","栊","槞","櫳","湰","滝","漋","爖","珑","瓏","癃","眬","矓","砻","礱","礲","窿","竜","聋","聾","胧","茏","蘢","蠪","蠬","襱","豅","鏧","鑨","霳","靇","驡","鸗","龍","龒","龙"],"xiàn xián":["咞"],qì:["咠","唭","噐","器","夡","弃","憇","憩","暣","棄","欫","气","気","氣","汔","汽","泣","湆","湇","炁","甈","盵","矵","碛","碶","磜","磧","罊","芞","葺","藒","蟿","訖","讫","迄","鐑"],"xì dié":["咥"],"liē liě lié lie":["咧"],zī:["咨","嗞","姕","姿","孜","孳","孶","崰","嵫","栥","椔","淄","湽","滋","澬","玆","禌","秶","粢","紎","緇","緕","纃","缁","茊","茲","葘","諮","谘","貲","資","赀","资","赼","趑","趦","輜","輺","辎","鄑","鈭","錙","鍿","鎡","锱","镃","頾","頿","髭","鯔","鰦","鲻","鶅","鼒","齍","齜","龇"],mī:["咪"],"jī xī qià":["咭"],"gē luò kǎ lo":["咯"],"shù xún":["咰"],"zán zá zǎ zan":["咱"],"hāi ké":["咳"],huī:["咴","噅","噕","婎","媈","幑","徽","恢","拻","挥","揮","晖","暉","楎","洃","瀈","灰","灳","烣","睳","禈","翚","翬","蘳","袆","褘","詼","诙","豗","輝","辉","鰴","麾","㧑"],"huài shì":["咶"],táo:["咷","啕","桃","檮","洮","淘","祹","綯","绹","萄","蜪","裪","迯","逃","醄","鋾","鞀","鞉","饀","駣","騊","鼗","𫘦"],xián:["咸","啣","娴","娹","婱","嫌","嫺","嫻","弦","挦","撏","涎","湺","澖","甉","痫","癇","癎","絃","胘","舷","藖","蚿","蛝","衔","衘","誸","諴","賢","贒","贤","輱","醎","銜","鑦","閑","闲","鷳","鷴","鷼","鹇","鹹","麙","𫍯"],"è àn":["咹"],"xuān xuǎn":["咺","烜"],"wāi hé wǒ guǎ guō":["咼"],"yàn yè yān":["咽"],āi:["哀","哎","埃","溾","銰","鎄","锿"],pǐn:["品","榀"],shěn:["哂","婶","嬸","审","宷","審","弞","曋","渖","瀋","瞫","矤","矧","覾","訠","諗","讅","谂","谉","邥","頣","魫"],"hǒng hōng hòng":["哄"],"wā wa":["哇"],"hā hǎ hà":["哈"],zāi:["哉","栽","渽","溨","災","灾","烖","睵","賳"],"dì diè":["哋"],pài:["哌","沠","派","渒","湃","蒎","鎃"],"gén hěn":["哏"],"yǎ yā":["哑","雅"],"yuě huì":["哕","噦"],nián:["哖","年","秊","秥","鮎","鯰","鲇","鲶","鵇","黏"],"huá huā":["哗","嘩"],"jì jiē zhāi":["哜","嚌"],mōu:["哞"],"yō yo":["哟","喲"],lòng:["哢","梇","贚"],"ò ó é":["哦"],"lī lǐ li":["哩"],"nǎ na nǎi né něi":["哪"],hè:["哬","垎","壑","寉","惒","焃","煂","燺","爀","癋","碋","翯","褐","謞","賀","贺","赫","靍","靎","靏","鶴","鸖","鹤"],"bō pò bā":["哱"],zhé:["哲","啠","喆","嚞","埑","悊","摺","晢","晣","歽","矺","砓","磔","籷","粍","虴","蛰","蟄","袩","詟","謫","謺","讁","讋","谪","輒","輙","轍","辄","辙","鮿"],"liàng láng":["哴"],"liè lǜ":["哷"],hān:["哻","憨","蚶","谽","酣","頇","顸","馠","魽","鼾"],"hēng hng":["哼"],gěng:["哽","埂","峺","挭","梗","綆","绠","耿","莄","郠","骾","鯁","鲠","𬒔"],"chuò yuè":["哾"],"gě jiā":["哿"],"bei bài":["唄"],"hán hàn":["唅"],chún:["唇","浱","湻","滣","漘","犉","純","纯","脣","莼","蒓","蓴","醇","醕","錞","陙","鯙","鶉","鹑","𬭚"],"ài āi":["唉"],"jiá qiǎn":["唊"],"yán dàn xián":["唌"],chē:["唓","砗","硨","莗","蛼"],"wú ńg ń":["唔"],zào:["唕","唣","噪","慥","梍","灶","煰","燥","皁","皂","竃","竈","簉","艁","譟","趮","躁","造","𥖨"],dí:["唙","啇","嘀","嚁","嫡","廸","敌","敵","梑","涤","滌","狄","笛","籴","糴","苖","荻","蔋","蔐","藡","覿","觌","豴","迪","靮","頔","馰","髢","鸐","𬱖"],"gòng hǒng gǒng":["唝","嗊"],dóu:["唞"],"lào láo":["唠","嘮","憦"],huàn:["唤","喚","奂","奐","宦","嵈","幻","患","愌","换","換","擐","攌","梙","槵","浣","涣","渙","漶","澣","烉","焕","煥","瑍","痪","瘓","睆","肒","藧","豢","轘","逭","鯇","鯶","鰀","鲩"],léng:["唥","塄","楞","碐","薐"],"wō wěi":["唩"],fěng:["唪","覂","諷","讽"],"yín jìn":["唫"],"hǔ xià":["唬"],wéi:["唯","围","圍","壝","峗","峞","嵬","帏","帷","幃","惟","桅","沩","洈","涠","湋","溈","潍","潙","潿","濰","犩","矀","維","维","蓶","覹","违","違","鄬","醀","鍏","闈","闱","韋","韦","鮠","𣲗","𬶏"],shuā:["唰"],chàng:["唱","怅","悵","暢","焻","畅","畼","誯","韔","鬯"],"ér wā":["唲"],qiàng:["唴","炝","熗","羻"],yō:["唷"],yū:["唹","淤","瘀","盓","箊","紆","纡","込","迂","迃","陓"],lài:["唻","濑","瀨","瀬","癞","癩","睐","睞","籁","籟","藾","賚","賴","赉","赖","頼","顂","鵣"],tuò:["唾","嶞","柝","毤","毻","箨","籜","萚","蘀","跅"],"zhōu zhāo tiào":["啁"],kěn:["啃","垦","墾","恳","懇","肎","肯","肻","豤","錹"],"zhuó zhào":["啅","濯"],"hēng hèng":["啈","悙"],"lín lán":["啉"],"a ā á ǎ à":["啊"],qiāng:["啌","嗴","嶈","戕","摤","斨","枪","槍","溬","牄","猐","獇","羌","羗","腔","蜣","謒","鏘","锖","锵"],"tūn zhūn xiāng duǐ":["啍"],wèn:["問","妏","揾","搵","璺","问","顐"],"cuì qi":["啐"],"dié shà jié tì":["啑"],"yuē wā":["啘"],"zǐ cǐ":["啙"],"bǐ tú":["啚"],"chuò chuài":["啜"],"yǎ yā è":["啞"],fēi:["啡","婓","婔","扉","暃","渄","猆","緋","绯","裶","霏","非","靟","飛","飝","飞","餥","馡","騑","騛","鯡","鲱","𬴂"],pí:["啤","壀","枇","毗","毘","焷","琵","疲","皮","篺","罴","羆","脾","腗","膍","蚍","蚽","蜱","螷","蠯","豼","貔","郫","鈹","阰","陴","隦","魮","鮍","鲏","鵧","鼙"],shá:["啥"],"lā la":["啦"],"yīng qíng":["啨"],pā:["啪","妑","舥","葩","趴"],"zhě shì":["啫"],sè:["啬","嗇","懎","擌","栜","歮","涩","渋","澀","澁","濇","濏","瀒","瑟","璱","瘷","穑","穡","穯","繬","譅","轖","銫","鏼","铯","飋"],niè:["啮","嗫","噛","嚙","囁","囓","圼","孼","孽","嵲","嶭","巕","帇","敜","枿","槷","櫱","涅","湼","痆","篞","籋","糱","糵","聂","聶","臬","臲","蘖","蠥","讘","踂","踗","踙","蹑","躡","錜","鎳","鑈","鑷","钀","镊","镍","闑","陧","隉","顳","颞","齧","𫔶"],"luō luó luo":["啰","囉"],"tān chǎn tuō":["啴"],bo:["啵","蔔"],dìng:["啶","定","椗","矴","碇","碠","磸","聢","腚","萣","蝊","訂","订","錠","锭","顁","飣","饤"],lāng:["啷"],"án ān":["啽"],kā:["喀","擖"],"yóng yú":["喁"],"lā lá lǎ":["喇"],jiē:["喈","喼","嗟","堦","媘","接","掲","擑","湝","煯","疖","痎","癤","皆","秸","稭","脻","蝔","街","謯","阶","階","鞂","鶛"],hóu:["喉","帿","猴","瘊","睺","篌","糇","翭","葔","鄇","鍭","餱","骺","鯸","𬭤"],"dié zhá":["喋"],wāi:["喎","歪","竵"],"nuò rě":["喏"],"xù huò guó":["喐"],zán:["喒"],"wō ō":["喔"],hú:["喖","嘝","囫","壶","壷","壺","媩","弧","搰","斛","楜","槲","湖","瀫","焀","煳","狐","猢","瑚","瓳","箶","絗","縠","胡","葫","蔛","蝴","螜","衚","觳","醐","鍸","頶","餬","鬍","魱","鰗","鵠","鶘","鶦","鹕"],"huàn yuán xuǎn hé":["喛"],xǐ:["喜","囍","壐","屣","徙","憙","枲","橲","歖","漇","玺","璽","矖","禧","縰","葈","葸","蓰","蟢","謑","蹝","躧","鈢","鉨","鉩","鱚","𬭳","𬶮"],"hē hè yè":["喝"],kuì:["喟","嘳","媿","嬇","愦","愧","憒","篑","簣","籄","聩","聭","聵","膭","蕢","謉","餽","饋","馈"],"zhǒng chuáng":["喠"],"wéi wèi":["喡","為","爲"],"duó zhà":["喥"],"sāng sàng":["喪"],"qiáo jiāo":["喬"],"pèn bēn":["喯"],"cān sūn qī":["喰"],"zhā chā":["喳"],miāo:["喵"],"pēn pèn":["喷"],kuí:["喹","夔","奎","巙","戣","揆","晆","暌","楏","楑","櫆","犪","睽","葵","藈","蘷","虁","蝰","躨","逵","鄈","鍨","鍷","頯","馗","騤","骙","魁"],"lou lóu":["喽"],"zào qiāo":["喿"],"hè xiāo xiào hù":["嗃"],"á shà":["嗄"],xiù:["嗅","岫","峀","溴","珛","琇","璓","秀","綉","繍","繡","绣","螑","袖","褎","褏","銹","鏥","鏽","锈","齅"],"qiāng qiàng":["嗆","戗","戧","蹌","蹡"],"ài yì":["嗌","艾"],"má mǎ ma":["嗎"],"kè kē":["嗑"],"dā tà":["嗒","鎉"],sǎng:["嗓","搡","磉","褬","鎟","顙","颡"],chēn:["嗔","抻","琛","瞋","諃","謓","賝","郴","𬘭"],"wā gǔ":["嗗"],"pǎng bēng":["嗙"],"xián qiǎn qiān":["嗛"],lào:["嗠","嫪","橯","涝","澇","耢","耮","躼","軂","酪"],wēng:["嗡","翁","聬","螉","鎓","鶲","鹟","𬭩"],wà:["嗢","腽","膃","袜","襪","韤"],"hēi hāi":["嗨"],hē:["嗬","欱","蠚","訶","诃"],zi:["嗭"],sǎi:["嗮"],"ǹg ńg ňg":["嗯"],gě:["嗰","舸"],ná:["嗱","拏","拿","鎿","镎"],diǎ:["嗲"],"ài ǎi āi":["嗳"],tōng:["嗵","樋","炵","蓪"],"zuī suī":["嗺"],"zhē zhè zhù zhe":["嗻"],mò:["嗼","圽","塻","墨","妺","嫼","寞","帞","昩","末","枺","歿","殁","沫","漠","爅","獏","瘼","皌","眽","眿","瞐","瞙","砞","礳","秣","絈","纆","耱","茉","莈","蓦","蛨","蟔","貃","貊","貘","銆","鏌","镆","陌","靺","驀","魩","默","黙","𬙊"],sòu:["嗽","瘶"],tǎn:["嗿","坦","忐","憳","憻","暺","毯","璮","菼","袒","襢","醓","鉭","钽"],"jiào dǎo":["嘄"],"kǎi gě":["嘅"],"shān càn":["嘇"],cáo:["嘈","嶆","曹","曺","槽","漕","艚","蓸","螬","褿","鏪","𥕢"],piào:["嘌","徱","蔈","驃"],"lóu lou":["嘍"],gǎ:["尕","玍"],"gǔ jiǎ":["嘏"],"jiāo xiāo":["嘐"],"xū shī":["嘘","噓"],pó:["嘙","嚩","婆","櫇","皤","鄱"],"dē dēi":["嘚"],"ma má":["嘛"],"lē lei":["嘞"],"gā gá gǎ":["嘠"],sāi:["嘥","噻","毢","腮","顋","鰓"],"zuō chuài":["嘬"],"cháo zhāo":["嘲","朝","鼂"],zuǐ:["嘴","噿","嶊","璻"],"qiáo qiào":["嘺","翹","谯"],"chù xù shòu":["嘼"],"tān chǎn":["嘽"],"dàn tán":["嘾","弾","彈","惔","澹"],"hēi mò":["嘿"],ě:["噁","砨","頋","騀","鵈"],"fān bo":["噃"],chuáng:["噇","床","牀"],"cù zā hé":["噈"],"tūn kuò":["噋"],"cēng chēng":["噌"],dēng:["噔","嬁","灯","燈","璒","登","竳","簦","艠","豋"],pū:["噗","扑","撲","攴","攵","潽","炇","陠"],juē:["噘","屩","屫","撧"],lū:["噜","嚕","撸","擼","謢"],zhān:["噡","岾","惉","旃","旜","枬","栴","毡","氈","氊","沾","瞻","薝","蛅","詀","詹","譫","谵","趈","邅","閚","霑","飦","饘","驙","魙","鱣","鸇","鹯","𫗴"],ō:["噢"],"zhòu zhuó":["噣"],"jiào qiào chī":["噭"],yuàn:["噮","妴","怨","愿","掾","瑗","禐","苑","衏","裫","褑","院","願"],"ǎi ài āi":["噯"],"yōng yǒng":["噰","澭"],"jué xué":["噱"],"pēn pèn fèn":["噴"],gá:["噶","尜","釓","錷","钆"],"xīn hěn hèn":["噷"],dāng:["噹","澢","珰","璫","筜","簹","艡","蟷","裆","襠"],làn:["嚂","滥","濫","烂","燗","爁","爛","爤","瓓","糷","钄"],tà:["嚃","嚺","崉","挞","搨","撻","榻","橽","毾","涾","澾","濌","禢","粏","誻","譶","蹋","蹹","躂","躢","遝","錔","闒","闥","闼","阘","鞜","鞳"],"huō huò ǒ":["嚄"],hāo:["嚆","茠","蒿","薅"],"hè xià":["嚇"],"xiù pì":["嚊"],"zhōu chóu":["嚋","盩","诪"],mē:["嚒"],"chā cā":["嚓"],"bó pào bào":["嚗"],"me mèi mò":["嚜"],"xié hái":["嚡"],"áo xiāo":["嚣"],mō:["嚤","摸"],pín:["嚬","娦","嫔","嬪","玭","矉","薲","蠙","貧","贫","顰","颦","𬞟"],mè:["嚰","濹"],"rǎng rāng":["嚷"],lá:["嚹","旯"],"jiáo jué jiào":["嚼"],chuò:["嚽","娖","擉","歠","涰","磭","踀","輟","辍","辵","辶","酫","鑡","餟","齪","龊"],"huān huàn":["嚾"],"zá cà":["囃"],chài:["囆","虿","蠆","袃","訍"],"náng nāng":["囊"],"zá zàn cān":["囋"],sū:["囌","櫯","甦","稣","穌","窣","蘇","蘓","酥","鯂"],zèng:["囎","熷","甑","贈","赠","鋥","锃"],"zá niè yàn":["囐"],nāng:["囔"],"luó luō luo":["囖"],"wéi guó":["囗"],huí:["囘","回","囬","廻","廽","恛","洄","痐","茴","蚘","蛔","蛕","蜖","迴","逥","鮰"],nín:["囜","您","脌"],"jiǎn nān":["囝"],nān:["囡"],tuán:["团","団","團","慱","抟","摶","檲","糰","鏄","鷒","鷻"],"tún dùn":["囤","坉"],guó:["囯","囶","囻","国","圀","國","帼","幗","慖","摑","漍","聝","腘","膕","蔮","虢","馘","𬇹"],kùn:["困","涃","睏"],"wéi tōng":["囲"],qūn:["囷","夋","逡"],rì:["囸","日","衵","鈤","馹","驲"],tāi:["囼","孡","胎"],pǔ:["圃","圑","擈","普","暜","樸","檏","氆","浦","溥","烳","諩","譜","谱","蹼","鐠","镨"],"quān juàn juān":["圈","圏"],"chuí chuán":["圌"],tuǎn:["圕","畽","疃"],lüè:["圙","掠","略","畧","稤","鋝","鋢","锊","䂮"],"huán yuán":["圜"],luán:["圝","圞","奱","娈","孌","孪","孿","峦","巒","挛","攣","曫","栾","欒","滦","灤","癴","癵","羉","脔","臠","虊","銮","鑾","鵉","鸞","鸾"],tǔ:["土","圡","釷","钍"],"xū wéi":["圩"],"dì de":["地","嶳"],"qiān sú":["圱"],zhèn:["圳","塦","挋","振","朕","栚","甽","眹","紖","絼","纼","誫","賑","赈","鋴","鎭","鎮","镇","阵","陣","震","鴆","鸩"],"chǎng cháng":["场","場","塲"],"qí yín":["圻"],jiá:["圿","忦","恝","戞","扴","脥","荚","莢","蛱","蛺","裌","跲","郏","郟","鋏","铗","頬","頰","颊","鴶","鵊"],"zhǐ zhì":["坁"],bǎn:["坂","岅","昄","板","版","瓪","粄","舨","蝂","鈑","钣","阪","魬"],qǐn:["坅","寑","寝","寢","昑","梫","笉","螼","赾","鋟","锓"],"méi fén":["坆"],"rǒng kēng":["坈"],"fāng fáng":["坊"],"fèn bèn":["坋"],tān:["坍","怹","摊","擹","攤","滩","灘","瘫","癱","舑","貪","贪"],"huài pēi pī péi":["坏"],"dì làn":["坔"],tán:["坛","墰","墵","壇","壜","婒","憛","昙","曇","榃","檀","潭","燂","痰","磹","罈","罎","藫","談","譚","譠","谈","谭","貚","郯","醰","錟","顃"],bà:["坝","垻","壩","弝","欛","灞","爸","矲","覇","霸","鮁","鲅"],fén:["坟","墳","妢","岎","幩","枌","棼","汾","焚","燌","燓","羒","羵","蒶","蕡","蚠","蚡","豮","豶","轒","鐼","隫","馩","魵","黂","鼖","鼢","𣸣"],zhuì:["坠","墜","惴","甀","畷","礈","綴","縋","缀","缒","腏","膇","諈","贅","赘","醊","錣","鑆"],pō:["坡","岥","泼","溌","潑","釙","鏺","钋","頗","颇","䥽"],"pǎn bàn":["坢"],kūn:["坤","堃","堒","崐","崑","昆","晜","潉","焜","熴","猑","琨","瑻","菎","蜫","裈","裩","褌","醌","錕","锟","騉","髠","髡","髨","鯤","鲲","鵾","鶤","鹍"],diàn:["坫","垫","墊","壂","奠","婝","店","惦","扂","橂","殿","淀","澱","玷","琔","电","癜","簟","蜔","鈿","電","靛","驔"],"mù mǔ":["坶"],"kē kě":["坷","軻"],xuè:["坹","岤","桖","瀥","狘","瞲","謔","谑","趐"],"dǐ chí":["坻","柢"],lā:["垃","柆","菈","邋"],lǒng:["垄","垅","壟","壠","拢","攏","竉","陇","隴","𬕂"],mín:["垊","姄","岷","崏","捪","旻","旼","民","珉","琘","琝","瑉","痻","盿","砇","緍","緡","缗","罠","苠","鈱","錉","鍲","鴖"],"dòng tóng":["垌","峒","洞"],cí:["垐","嬨","慈","柌","濨","珁","瓷","甆","磁","礠","祠","糍","茨","詞","词","辝","辞","辤","辭","雌","飺","餈","鴜","鶿","鷀","鹚"],duī:["垖","堆","塠","痽","磓","鐓","鐜","鴭"],"duò duǒ":["垛"],"duǒ duò":["垜","挆"],chá:["垞","察","嵖","搽","槎","檫","猹","茬","茶","詧","靫","𥻗"],shǎng:["垧","晌","樉","賞","贘","赏","鋿","鏛","鑜"],shǒu:["垨","守","手","扌","艏","首"],da:["垯","繨","跶"],háng:["垳","斻","杭","筕","絎","绗","航","苀","蚢","裄","貥","迒","頏","颃","魧"],"ān ǎn":["垵"],xīng:["垶","惺","星","曐","煋","猩","瑆","皨","篂","腥","興","觪","觲","謃","騂","骍","鮏","鯹"],"yuàn huán":["垸"],bāng:["垹","帮","幇","幚","幫","捠","梆","浜","邦","邫","鞤","𠳐"],"póu fú":["垺"],cén:["埁","岑","涔"],"běng fēng":["埄"],"dì fáng":["埅"],"xiá jiā":["埉"],"mái mán":["埋"],làng:["埌","崀","浪","蒗","閬","㫰"],"shān yán":["埏"],"qín jīn":["埐"],"pǔ bù":["埔"],huā:["埖","婲","椛","硴","糀","花","蒊","蘤","誮","錵"],"suì sù":["埣"],"pí pì":["埤"],"qīng zhēng":["埥","鲭"],"wǎn wān":["埦"],lǔn:["埨","稐","𫭢"],"zhēng chéng":["埩"],kōng:["埪","崆","箜","躻","錓","鵼"],"cǎi cài":["埰","寀","采"],"chù tòu":["埱"],běng:["埲","琫","菶","鞛"],"kǎn xiàn":["埳"],"yì shì":["埶","醳"],péi:["培","毰","裴","裵","賠","赔","錇","锫","阫","陪"],"sào sǎo":["埽"],"jǐn qīn jìn":["堇"],"péng bèng":["堋"],"qiàn zàn jiàn":["堑"],àn:["堓","屵","岸","按","暗","案","胺","荌","豻","貋","錌","闇","隌","黯"],"duò huī":["堕","墮"],huán:["堚","寏","寰","峘","桓","洹","澴","獂","环","環","糫","繯","缳","羦","荁","萈","萑","豲","鍰","鐶","锾","镮","闤","阛","雈","鬟","鹮","𬘫","𤩽"],"bǎo bǔ pù":["堡"],"máo móu wǔ":["堥"],ruán:["堧","壖","撋"],"ài è yè":["堨"],gèng:["堩","暅"],méi:["堳","塺","媒","嵋","徾","攗","枚","栂","梅","楣","楳","槑","湄","湈","煤","猸","玫","珻","瑂","眉","睂","禖","脄","脢","腜","苺","莓","葿","郿","酶","鎇","镅","霉","鶥","鹛","黴"],dǔ:["堵","琽","睹","笃","篤","覩","賭","赌"],féng:["堸","綘","艂","逢"],hèng:["堼"],chūn:["堾","媋","旾","春","暙","杶","椿","槆","橁","櫄","瑃","箺","萅","蝽","輴","鰆","鶞","䲠"],jiǎng:["塂","奖","奨","奬","桨","槳","獎","耩","膙","蒋","蔣","講","讲","顜"],huāng:["塃","巟","慌","肓","荒","衁"],duàn:["塅","断","斷","椴","段","毈","煅","瑖","碫","簖","籪","緞","缎","腶","葮","躖","鍛","锻"],tǎ:["塔","墖","獭","獺","鮙","鰨","鳎"],wěng:["塕","奣","嵡","攚","暡","瞈","蓊"],"sāi sài sè":["塞"],zàng:["塟","弉","臓","臟","葬","蔵","銺"],tián:["塡","屇","恬","沺","湉","璳","甛","甜","田","畋","畑","碵","磌","胋","闐","阗","鴫","鷆","鷏"],zhèng:["塣","幁","政","証","諍","證","证","诤","郑","鄭","靕","鴊"],"tián zhèn":["填"],wēn:["塭","昷","榲","殟","温","溫","瑥","瘟","蕰","豱","輼","轀","辒","鎾","饂","鰛","鰮","鳁"],liù:["塯","廇","磟","翏","雡","霤","餾","鬸","鷚","鹨"],hǎi:["塰","海","烸","酼","醢"],lǎng:["塱","朖","朗","朤","烺","蓢","㮾"],bèng:["塴","揼","泵","甏","綳","蹦","迸","逬","鏰","镚"],chén:["塵","宸","尘","忱","敐","敶","晨","曟","栕","樄","沉","煁","瘎","臣","茞","莀","莐","蔯","薼","螴","訦","諶","軙","辰","迧","鈂","陈","陳","霃","鷐","麎"],"ōu qiū":["塸"],"qiàn jiàn":["塹"],"zhuān tuán":["塼"],shuǎng:["塽","慡","漺","爽","縔","鏯"],shú:["塾","婌","孰","璹","秫","贖","赎"],lǒu:["塿","嵝","嶁","甊","篓","簍"],chí:["墀","弛","持","池","漦","竾","筂","箎","篪","茌","荎","蚳","謘","貾","赿","踟","迟","迡","遅","遟","遲","鍉","馳","驰"],shù:["墅","庶","庻","怷","恕","戍","束","树","樹","沭","漱","潄","濖","竖","竪","絉","腧","荗","蒁","虪","術","裋","豎","述","鉥","錰","鏣","霔","鶐","𬬸"],"dì zhì":["墆","疐"],kàn:["墈","崁","瞰","矙","磡","衎","鬫"],chěn:["墋","夦","硶","碜","磣","贂","趻","踸","鍖"],"zhǐ zhuó":["墌"],qiǎng:["墏","繈","繦","羥","襁"],zēng:["増","增","憎","璔","矰","磳","罾","譄","鄫","鱛","䎖"],qiáng:["墙","墻","嫱","嬙","樯","檣","漒","牆","艢","蔃","蔷","蘠"],"kuài tuí":["墤"],"tuǎn dǒng":["墥"],"qiáo què":["墧"],"zūn dūn":["墫"],"qiāo áo":["墽"],"yì tú":["墿"],"xué bó jué":["壆"],lǎn:["壈","嬾","孄","孏","懒","懶","揽","擥","攬","榄","欖","浨","漤","灠","纜","缆","罱","覧","覽","览","醂","顲"],huài:["壊","壞","蘾"],rǎng:["壌","壤","攘","爙"],"làn xiàn":["壏"],dǎo:["壔","导","導","岛","島","嶋","嶌","嶹","捣","搗","擣","槝","祷","禂","禱","蹈","陦","隝","隯"],ruǐ:["壡","桵","橤","繠","蕊","蕋","蘂","蘃"],san:["壭"],zhuàng:["壮","壯","壵","撞","焋","状","狀"],"ké qiào":["壳","殼"],kǔn:["壸","壼","悃","捆","梱","硱","祵","稇","稛","綑","裍","閫","閸","阃"],mǎng:["壾","漭","茻","莽","莾","蠎"],cún:["壿","存"],"zhǐ zhōng":["夂"],"gǔ yíng":["夃"],"jiàng xiáng":["夅","降"],"páng féng fēng":["夆"],zhāi:["夈","捚","摘","斋","斎","榸","粂","齋"],"xuàn xiòng":["夐"],wài:["外","顡"],"wǎn yuàn wān yuān":["夗"],"mǎo wǎn":["夘"],mèng:["夢","夣","孟","梦","癦","霥"],"dà dài":["大"],"fū fú":["夫","姇","枎","粰"],guài:["夬","怪","恠"],yāng:["央","姎","抰","殃","泱","秧","胦","鉠","鍈","雵","鴦","鸯"],"hāng bèn":["夯"],gǎo:["夰","搞","杲","槀","槁","檺","稁","稾","稿","縞","缟","菒","藁","藳"],"tāo běn":["夲"],"tóu tou":["头"],"yǎn tāo":["夵"],"kuā kuà":["夸","誇"],"jiá jiā gā xiá":["夹"],huà:["夻","婳","嫿","嬅","崋","摦","杹","枠","桦","槬","樺","澅","画","畫","畵","繣","舙","話","諙","譮","话","黊"],"jiā jiá gā xiá":["夾"],ēn:["奀","恩","蒽"],"dī tì":["奃"],"yǎn yān":["奄","渰"],pào:["奅","疱","皰","砲","礟","礮","靤","麭"],nài:["奈","柰","渿","耐","萘","褦","錼","鼐"],"quān juàn":["奍","弮","棬"],zòu:["奏","揍"],"qì qiè xiè":["契"],kāi:["奒","开","揩","鐦","锎","開"],"bēn bèn":["奔","泍"],tào:["套"],"zàng zhuǎng":["奘"],běn:["奙","本","楍","畚","翉","苯"],"xùn zhuì":["奞"],shē:["奢","檨","猞","畭","畲","賒","賖","赊","輋","𪨶"],"hǎ pò tǎi":["奤"],"ào yù":["奥","奧","澚"],yūn:["奫","氲","氳","蒀","蒕","蝹","贇","赟","𫖳"],"duǒ chě":["奲"],"nǚ rǔ":["女"],nú:["奴","孥","笯","駑","驽"],"dīng dǐng tiǎn":["奵"],"tā jiě":["她"],nuán:["奻"],"hǎo hào":["好"],fàn:["奿","嬎","梵","汎","泛","滼","瀪","犯","畈","盕","笵","範","范","訉","販","贩","軬","輽","飯","飰","饭"],shuò:["妁","搠","朔","槊","烁","爍","矟","蒴","鎙","鑠","铄"],"fēi pèi":["妃"],wàng:["妄","忘","旺","望","朢"],zhuāng:["妆","妝","娤","庄","庒","桩","梉","樁","粧","糚","荘","莊","装","裝"],mā:["妈","媽"],"fū yōu":["妋"],"hài jiè":["妎"],dù:["妒","妬","杜","殬","渡","秺","芏","荰","螙","蠧","蠹","鍍","镀","靯","𬭊"],miào:["妙","庙","庿","廟","玅","竗"],"fǒu pēi pī":["妚"],"yuè jué":["妜"],niū:["妞"],"nà nàn":["妠"],tuǒ:["妥","嫷","庹","椭","楕","橢","鬌","鰖","鵎"],"wàn yuán":["妧"],fáng:["妨","房","肪","防","魴","鲂"],nī:["妮"],zhóu:["妯","碡"],zhāo:["妱","巶","招","昭","釗","鉊","鍣","钊","駋","𬬿"],"nǎi nǐ":["妳"],tǒu:["妵","敨","紏","蘣","黈"],"xián xuán xù":["妶"],"zhí yì":["妷","秇"],ē:["妸","妿","婀","屙"],mèi:["妹","媚","寐","抺","旀","昧","沬","煝","痗","眛","睸","祙","篃","蝞","袂","跊","鬽","魅"],"qī qì":["妻"],"xū xǔ":["姁","稰"],"shān shàn":["姍","姗","苫","釤","钐"],mán:["姏","慲","樠","蛮","蠻","謾","饅","馒","鬗","鬘","鰻","鳗"],jiě:["姐","媎","檞","毑","飷"],"wěi wēi":["委"],pīn:["姘","拼","礗","穦","馪","驞"],"huá huó":["姡"],"jiāo xiáo":["姣"],"gòu dù":["姤"],"lǎo mǔ":["姥"],"nián niàn":["姩"],zhěn:["姫","屒","弫","抮","昣","枕","畛","疹","眕","稹","縝","縥","缜","聄","萙","袗","裖","覙","診","诊","軫","轸","辴","駗","鬒"],héng:["姮","恆","恒","烆","珩","胻","蘅","衡","鑅","鴴","鵆","鸻"],"jūn xún":["姰"],"kuā hù":["姱"],"è yà":["姶"],"xiān shēn":["姺"],wá:["娃"],"ráo rǎo":["娆","嬈"],"shào shāo":["娋"],xiē:["娎","揳","楔","歇","蝎","蠍"],"wǔ méi mǔ":["娒"],"chuò lài":["娕"],niáng:["娘","嬢","孃"],"nà nuó":["娜","𦰡"],"pōu bǐ":["娝"],"něi suī":["娞"],tuì:["娧","煺","蛻","蜕","退","駾"],mǎn:["娨","屘","満","满","滿","螨","蟎","襔","鏋"],"wú wù yú":["娪"],"xī āi":["娭"],"zhuì shuì":["娷"],"dōng dòng":["娻"],"ǎi ái è":["娾"],"ē ě":["娿"],mián:["婂","嬵","宀","杣","棉","檰","櫋","眠","矈","矊","矏","綿","緜","绵","芇","蝒"],"pǒu péi bù":["婄"],biǎo:["婊","脿","表","裱","褾","諘","錶"],"fù fàn":["婏"],wǒ:["婐","婑","我"],"ní nǐ":["婗","棿"],"quán juàn":["婘","惓"],hūn:["婚","昏","昬","棔","涽","睧","睯","碈","荤","葷","蔒","轋","閽","阍"],"qiān jǐn":["婜"],"wān wà":["婠"],"lái lài":["婡","徕","徠"],"zhōu chōu":["婤"],"chuò nào":["婥"],"nüè àn":["婩"],"hùn kūn":["婫"],"dàng yáng":["婸"],nàn:["婻"],"ruò chuò":["婼"],jiǎ:["婽","岬","斚","斝","榎","槚","檟","玾","甲","胛","鉀","钾"],"tōu yú":["婾","媮"],"yù yú":["媀"],"wéi wěi":["媁"],"dì tí":["媂","珶","苐"],róu:["媃","揉","柔","渘","煣","瑈","瓇","禸","粈","糅","脜","腬","葇","蝚","蹂","輮","鍒","鞣","騥","鰇","鶔","𫐓"],"ruǎn nèn":["媆"],miáo:["媌","嫹","描","瞄","苗","鶓","鹋"],"yí pèi":["媐"],"mián miǎn":["媔"],"tí shì":["媞","惿"],"duò tuó":["媠","沲"],ǎo:["媪","媼","艹","芺","袄","襖","镺"],"chú zòu":["媰"],yìng:["媵","映","暎","硬","膡","鱦"],"qín shēn":["嫀"],jià:["嫁","幏","架","榢","稼","駕","驾"],sǎo:["嫂"],"zhēn zhěn":["嫃"],"jiē suǒ":["嫅"],"míng mǐng":["嫇"],niǎo:["嫋","嬝","嬲","茑","蔦","袅","裊","褭","鸟"],tāo:["嫍","幍","弢","慆","掏","搯","槄","涛","滔","濤","瑫","絛","縚","縧","绦","詜","謟","轁","鞱","韜","韬","飸","饕"],biáo:["嫑"],"piáo piāo":["嫖","薸"],xuán:["嫙","悬","懸","暶","檈","漩","玄","璇","璿","痃","蜁","𫠊"],"màn mān":["嫚"],kāng:["嫝","嵻","康","慷","槺","漮","砊","穅","糠","躿","鏮","鱇","𡐓","𩾌"],"hān nǎn":["嫨"],nèn:["嫩","嫰"],zhē:["嫬","遮"],"mā má":["嫲"],piè:["嫳"],zhǎn:["嫸","展","搌","斩","斬","琖","盏","盞","輾","醆","颭","飐"],"xiān yǎn jìn":["嬐"],liǎn:["嬚","敛","斂","琏","璉","羷","脸","臉","蔹","蘝","蘞","裣","襝","鄻"],"qióng huán xuān":["嬛"],dǒng:["嬞","懂","箽","董","蕫","諌"],cān:["嬠","湌","爘","飡","餐","驂","骖"],tiǎo:["嬥","宨","晀","朓","窱","脁"],bí:["嬶","荸","鼻"],liǔ:["嬼","柳","栁","桞","桺","橮","熮","珋","綹","绺","罶","羀","鋶","锍"],"qiān xiān":["孅","欦"],"xié huī":["孈"],"huān quán":["孉"],"lí lì":["孋","麗"],"zhú chuò":["孎"],kǒng:["孔","恐"],"mā zī":["孖"],"sūn xùn":["孙","孫"],"bèi bó":["孛","誖"],"yòu niū":["孧"],zhuǎn:["孨","竱","轉"],hái:["孩","骸"],nāo:["孬"],"chán càn":["孱"],bò:["孹","檗","蘗","譒"],nái:["孻","腉"],"níng nìng":["宁","寍","寗","寜","寧","甯"],zhái:["宅"],"tū jiā":["宊"],sòng:["宋","訟","誦","讼","诵","送","鎹","頌","颂","餸"],ròu:["宍","肉","譳"],zhūn:["宒","窀","衠","諄","谆","迍"],"mì fú":["宓"],"dàng tàn":["宕"],"wǎn yuān":["宛"],chǒng:["宠","寵"],qún:["宭","峮","帬","羣","群","裙","裠"],zǎi:["宰","崽"],"bǎo shí":["宲"],"jiā jia jie":["家"],"huāng huǎng":["宺"],kuān:["宽","寛","寬","臗","鑧","髋","髖"],"sù xiǔ xiù":["宿"],"jié zǎn":["寁"],"bìng bǐng":["寎"],"jìn qǐn":["寖"],"lóu jù":["寠"],"xiě xiè":["寫"],"qīn qìn":["寴"],cùn:["寸","籿"],duì:["对","対","對","怼","憝","懟","濧","瀩","碓","祋","綐","薱","譈","譵","轛","队","陮"],"lüè luó":["寽"],"shè yè yì":["射"],"jiāng jiàng qiāng":["将"],"jiāng jiàng":["將","浆","漿","畺"],zūn:["尊","嶟","樽","罇","遵","鐏","鱒","鳟","鶎","鷷","𨱔"],"shù zhù":["尌","澍"],xiǎo:["小","晓","暁","曉","皛","皢","筱","筿","篠","謏","𫍲"],"jié jí":["尐","诘","鞊"],"shǎo shào":["少"],ěr:["尒","尓","尔","栮","毦","洱","爾","珥","耳","薾","衈","趰","迩","邇","鉺","铒","餌","饵","駬"],"wāng yóu":["尢"],wāng:["尣","尩","尪","尫","汪"],liào:["尥","尦","廖","撂","料","炓","窷","鐐","镣","𪤗"],"méng máng lóng páng":["尨"],gà:["尬","魀"],"kuì kuǐ":["尯"],tuí:["尵","弚","穨","蘈","蹪","隤","頹","頺","頽","颓","魋","𬯎"],yǐn:["尹","嶾","引","朄","檃","檼","櫽","淾","濥","瘾","癮","粌","蘟","蚓","螾","讔","赺","趛","輑","鈏","靷"],"chǐ chě":["尺"],kāo:["尻","髛"],"jìn jǐn":["尽"],"wěi yǐ":["尾"],"niào suī":["尿"],céng:["层","層","嶒","驓"],diǎo:["屌"],"píng bǐng bīng":["屏"],lòu:["屚","漏","瘘","瘺","瘻","鏤","镂","陋"],"shǔ zhǔ":["属","屬"],"xiè tì":["屟"],"chè cǎo":["屮"],"tún zhūn":["屯"],"nì jǐ":["屰"],"hóng lóng":["屸"],"qǐ kǎi":["岂","豈"],áng:["岇","昂","昻"],"gǎng gāng":["岗","崗"],kě:["岢","敤","渇","渴","炣"],gǒu:["岣","狗","玽","笱","耇","耈","耉","苟","豿"],tiáo:["岧","岹","樤","祒","笤","芀","萔","蓚","蓨","蜩","迢","鋚","鎥","鞗","髫","鯈","鰷","鲦","齠","龆"],"qū jū":["岨"],lǐng:["岭","嶺","領","领"],pò:["岶","敀","洦","湐","烞","珀","破","砶","粕","蒪","魄"],"bā kè":["峇"],luò:["峈","摞","洛","洜","犖","珞","笿","纙","荦","詻","雒","駱","骆","鵅"],"fù niè":["峊"],ěn:["峎"],"zhì shì":["峙","崻"],qiǎ:["峠","跒","酠","鞐"],"qiáo jiào":["峤","癄"],"xié yé":["峫"],bū:["峬","庯","晡","誧","逋","鈽","錻","钸","餔","鵏"],chóng:["崇","崈","爞","虫","蝩","蟲","褈","隀"],"zú cuì":["崒","椊"],"líng léng":["崚"],"dòng dōng":["崠"],xiáo:["崤","洨","淆","訤","誵"],"pí bǐ":["崥","芘"],"zhǎn chán":["崭","嶃","嶄"],"wǎi wēi":["崴"],"yáng dàng":["崵"],"shì dié":["崼"],yào:["崾","曜","熎","燿","矅","穾","窔","筄","耀","艞","药","葯","薬","藥","袎","覞","詏","讑","靿","鷂","鹞","鼼"],"kān zhàn":["嵁"],"hán dǎng":["嵅"],"qiàn kàn":["嵌"],"wù máo":["嵍"],"kě jié":["嵑","嶱"],"wēi wěi":["嵔"],kē:["嵙","柯","棵","榼","樖","牁","牱","犐","珂","疴","瞌","磕","礚","科","稞","窠","萪","薖","蚵","蝌","趷","轲","醘","鈳","钶","頦","顆","颗","髁"],"dàng táng":["嵣"],"róng yíng":["嵤","爃"],"ái kǎi":["嵦"],"kāo qiāo":["嵪"],cuó:["嵯","嵳","痤","矬","蒫","蔖","虘","鹺","鹾"],"qiǎn qīn":["嵰"],"dì dié":["嵽"],cēn:["嵾"],dǐng:["嵿","艼","薡","鐤","頂","顶","鼎","鼑"],"áo ào":["嶅"],"pǐ pèi":["嶏"],"jiào qiáo":["嶠","潐"],"jué guì":["嶡","鳜"],"zhān shàn":["嶦","鳣"],"xiè jiè":["嶰"],"guī xī juàn":["嶲"],rū:["嶿"],"lì liè":["巁","棙","爄","綟"],"xī guī juàn":["巂"],"yíng hōng":["巆"],yǐng:["巊","廮","影","摬","梬","潁","瘿","癭","矨","穎","郢","鐛","頴","颍","颕","颖"],chǎo:["巐","炒","煼","眧","麨"],cuán:["巑","櫕","欑"],chuān:["巛","川","氚","瑏","穿"],"jīng xíng":["巠"],cháo:["巢","巣","晁","漅","潮","牊","窲","罺","謿","轈","鄛","鼌"],qiǎo:["巧","愀","髜"],gǒng:["巩","廾","拱","拲","栱","汞","珙","輁","鞏"],"chà chā chāi cī":["差"],"xiàng hàng":["巷"],shuài:["帅","帥","蟀"],pà:["帊","帕","怕","袙"],"tǎng nú":["帑"],"mò wà":["帓"],"tiē tiě tiè":["帖"],zhǒu:["帚","晭","疛","睭","箒","肘","菷","鯞"],"juǎn juàn":["帣"],shuì:["帨","涗","涚","睡","稅","税","裞"],"chóu dào":["帱","幬"],"jiǎn jiān sàn":["帴"],"shà qiè":["帹"],"qí jì":["帺","荠"],"shān qiāo shēn":["幓"],"zhuàng chuáng":["幢"],"chān chàn":["幨"],miè:["幭","懱","搣","滅","灭","烕","礣","篾","蔑","薎","蠛","衊","鑖","鱴","鴓"],"gān gàn":["干"],"bìng bīng":["并","幷"],"jī jǐ":["幾"],"guǎng ān":["广"],guǎng:["広","廣","犷","獷"],me:["庅"],"dùn tún":["庉"],"bài tīng":["庍"],"yìng yīng":["应"],"dǐ de":["底"],"dù duó":["度"],"máng méng páng":["庬"],"bìng píng":["庰"],chěng:["庱","悜","睈","逞","騁","骋"],"jī cuò":["庴"],qǐng:["庼","廎","檾","漀","苘","請","謦","请","頃","顷"],"guī wěi huì":["廆"],"jǐn qín":["廑"],kuò:["廓","扩","拡","擴","濶","筈","萿","葀","蛞","闊","阔","霩","鞟","鞹","韕","頢","鬠"],"qiáng sè":["廧","薔"],"yǐn yìn":["廴","隐","隠","隱","飮","飲","饮"],"pò pǎi":["廹","迫"],"nòng lòng":["弄"],"dì tì tuí":["弟"],"jué zhāng":["弡"],"mí mǐ":["弥","彌","靡"],chāo:["弨","怊","抄","欩","訬","超","鈔","钞"],yi:["弬"],shāo:["弰","旓","烧","焼","燒","筲","艄","萷","蕱","輎","髾","鮹"],"xuān yuān":["弲"],"qiáng qiǎng jiàng":["強","强"],"tán dàn":["弹","醈"],biè:["彆"],"qiáng jiàng qiǎng":["彊"],"jì xuě":["彐"],tuàn:["彖","褖"],yuē:["彟","曰","曱","矱"],"shān xiǎn":["彡"],wén:["彣","文","炆","珳","瘒","繧","聞","芠","蚉","蚊","螡","蟁","閺","閿","闅","闦","闻","阌","雯","馼","駇","魰","鳼","鴍","鼤","𫘜"],"péng bāng":["彭"],"piāo piào":["彯"],"zhuó bó":["彴"],"tuǒ yí":["彵"],"páng fǎng":["彷"],wǎng:["彺","往","徃","惘","枉","棢","網","网","罒","罓","罔","罖","菵","蛧","蝄","誷","輞","辋","魍"],cú:["徂","殂"],"dài dāi":["待"],huái:["徊","怀","懐","懷","槐","淮","耲","蘹","褢","褱","踝"],"wā wàng jiā":["徍"],"chěng zhèng":["徎"],"dé děi de":["得"],"cóng zòng":["從"],"shì tǐ":["徥"],"tí chí":["徲","鶗","鶙"],dé:["徳","德","恴","悳","惪","淂","鍀","锝"],"zhǐ zhēng":["徴","徵"],bié:["徶","癿","莂","蛂","襒","蹩"],"chōng zhǒng":["徸"],"jiǎo jiào":["徼","笅","筊"],"lòng lǒng":["徿"],"qú jù":["忂","渠","瞿","螶"],"dìng tìng":["忊"],gǎi:["忋","改"],rěn:["忍","栠","栣","秹","稔","綛","荏","荵","躵"],chàn:["忏","懴","懺","硟","羼","韂","顫"],tè:["忑","慝","特","蟘","鋱","铽"],"tè tēi tuī":["忒"],"gān hàn":["忓","攼"],"yì qì":["忔"],"tài shì":["忕"],"xī liě":["忚"],"yīng yìng":["応","應","譍"],"mǐn wěn mín":["忞","忟"],"sōng zhōng":["忪"],"yù shū":["忬","悆"],"qí shì":["忯","耆"],"tún zhūn dùn":["忳"],"qián qín":["忴","扲"],hún:["忶","浑","渾","餛","馄","魂","鼲"],niǔ:["忸","扭","炄","狃","紐","纽","莥","鈕","钮","靵"],"kuáng wǎng":["忹"],"kāng hàng":["忼"],"kài xì":["忾","愾"],òu:["怄","慪"],"bǎo bào":["怉"],"mín mén":["怋"],"zuò zhà":["怍"],zěn:["怎"],yàng:["怏","恙","样","様","樣","漾","羕","詇"],"kòu jù":["怐"],"náo niú":["怓"],"zhēng zhèng":["怔","掙","钲","铮"],"tiē zhān":["怗"],"hù gù":["怘"],"cū jù zū":["怚"],"sī sāi":["思"],"yóu chóu":["怞"],"tū dié":["怢"],"yōu yào":["怮"],xuàn:["怰","昡","楦","泫","渲","炫","琄","眩","碹","絢","縼","繏","绚","蔙","衒","袨","贙","鉉","鏇","铉","镟","颴"],"xù xuè":["怴"],"bì pī":["怶"],"xī shù":["怸"],"nèn nín":["恁"],"tiāo yáo":["恌"],"xī qī xù":["恓"],"xiào jiǎo":["恔"],"hū kuā":["恗"],nǜ:["恧","朒","衂","衄"],hèn:["恨"],"dòng tōng":["恫"],"quán zhuān":["恮"],"è wù ě wū":["恶","惡"],tòng:["恸","慟","憅","痛","衕"],"yuān juàn":["悁"],"qiāo qiǎo":["悄"],"jiè kè":["悈"],"hào jiào":["悎"],huǐ:["悔","檓","毀","毁","毇","燬","譭"],"mán mèn":["悗","鞔"],"yī yì":["悘","衣"],quān:["悛","箞","鐉","𨟠"],"kuī lǐ":["悝"],"yì niàn":["悥"],"mèn mēn":["悶"],guàn:["悹","悺","惯","慣","掼","摜","樌","欟","泴","涫","潅","灌","爟","瓘","盥","礶","祼","罆","罐","貫","贯","躀","遦","鏆","鑵","鱹","鸛","鹳"],"kōng kǒng":["悾"],"lǔn lùn":["惀"],guǒ:["惈","果","椁","槨","粿","綶","菓","蜾","裹","褁","輠","餜","馃"],"yuān wǎn":["惌","箢"],"lán lín":["惏"],"yù xù":["惐","淢"],"chuò chuì":["惙"],"hūn mèn":["惛"],"chǎng tǎng":["惝"],"suǒ ruǐ":["惢"],cǎn:["惨","慘","憯","黪","黲","䅟"],cán:["惭","慙","慚","残","殘","蚕","蝅","蠶","蠺"],"dàn dá":["惮","憚"],rě:["惹"],"yú tōu":["愉"],"kài qì":["愒"],"dàng táng shāng yáng":["愓"],"chén xìn dān":["愖"],"kè qià":["愘"],nuò:["愞","懦","懧","掿","搦","榒","稬","穤","糑","糥","糯","諾","诺","蹃","逽","鍩","锘"],gǎn:["感","擀","敢","桿","橄","澉","澸","皯","秆","稈","笴","芉","衦","赶","趕","鱤","鳡"],"còng sōng":["愡"],"sāi sī sǐ":["愢"],"gōng gòng hǒng":["愩","慐"],"shuò sù":["愬","洬"],"yáo yào":["愮"],huàng:["愰","曂","榥","滉","皝","皩","鎤","㿠"],zhěng:["愸","抍","拯","整","晸"],cǎo:["愺","艸","草","騲"],"xì xié":["慀"],"cǎo sāo":["慅"],"xù chù":["慉"],"qiè qiàn":["慊"],"cáo cóng":["慒"],"ào áo":["慠"],"lián liǎn":["慩","梿","槤","櫣"],"jìn qín jǐn":["慬"],"dì chì":["慸"],"zhí zhé":["慹"],"lóu lǚ":["慺","鷜"],còng:["憁","謥"],"zhī zhì":["憄","知","織","织"],chēng:["憆","摚","撐","撑","晿","柽","棦","橕","檉","泟","浾","琤","瞠","碀","緽","罉","蛏","蟶","赪","赬","鏿","鐣","阷","靗","頳","饓"],biē:["憋","虌","鱉","鳖","鼈","龞"],"chéng dèng zhèng":["憕"],"xǐ xī":["憘"],"duì dùn tūn":["憞"],"xiāo jiāo":["憢"],"xián xiàn":["憪"],"liáo liǎo":["憭","燎","爎","爒"],shéng:["憴","縄","繉","繩","绳","譝"],"náo nǎo náng":["憹"],"jǐng jìng":["憼"],"jǐ jiǎo":["憿"],"xuān huān":["懁"],"cǎo sāo sào":["懆"],mèn:["懑","懣","暪","焖","燜"],"mèng méng měng":["懜"],"ài yì nǐ":["懝"],"méng měng":["懞","瞢","矒"],"qí jī jì":["懠"],mǒ:["懡"],"lán xiàn":["懢"],"yōu yǒu":["懮"],"liú liǔ":["懰","藰"],ràng:["懹","譲","讓","让"],huān:["懽","欢","歓","歡","獾","讙","貛","酄","驩","鴅","鵍"],nǎn:["戁","揇","湳","煵","腩","蝻","赧"],"mí mó":["戂"],"gàng zhuàng":["戅","戆"],"zhuàng gàng":["戇"],"xū qu":["戌"],"xì hū":["戏","戯","戲"],"jiá gā":["戛"],zéi:["戝","蠈","賊","贼","鰂","鱡","鲗"],děng:["戥","等"],"hū xì":["戱"],chuō:["戳","踔","逴"],"biǎn piān":["扁"],"shǎng jiōng":["扄"],"shàn shān":["扇"],cái:["才","材","纔","裁","財","财"],"zhā zā zhá":["扎"],"lè lì cái":["扐"],"bā pá":["扒"],"dǎ dá":["打"],rēng:["扔"],"fǎn fú":["払"],"diǎo dí yuē lì":["扚"],"káng gāng":["扛"],"yū wū":["扜"],"yū wū kū":["扝"],"tuō chǐ yǐ":["扡"],"gǔ jié xì gē":["扢"],dèn:["扥","扽"],"sǎo sào":["扫","掃"],rǎo:["扰","擾","隢"],"xī chā qì":["扱"],"bān pān":["扳"],"bā ào":["扷"],"xī zhé":["扸"],"zhì sǔn kǎn":["扻"],zhǎo:["找","沼","瑵"],"kuáng wǎng zài":["抂"],"hú gǔ":["抇","鹄","鹘"],"bǎ bà":["把"],"dǎn shěn":["抌"],"nè nì ruì nà":["抐"],zhuā:["抓","檛","簻","膼","髽"],póu:["抔","裒"],"zhé shé zhē":["折"],"póu pōu fū":["抙","捊"],pāo:["抛","拋","脬","萢"],"ǎo ào niù":["抝"],"lūn lún":["抡","掄"],"qiǎng qiāng chēng":["抢"],"zhǐ zhǎi":["抧"],"bù pū":["抪","柨"],"yǎo tāo":["抭"],"hē hè qiā":["抲"],"nǐ ní":["抳"],"pī pēi":["抷"],"mǒ mò mā":["抹"],chōu:["抽","犨","犫","瘳","篘"],"jiā yá":["拁"],"fú bì":["拂","畐","鶝"],zhǎ:["拃","眨","砟","鮺","鲝"],"dān dàn dǎn":["担"],"chāi cā":["拆"],niān:["拈","蔫"],"lā lá lǎ là":["拉"],"bàn pàn":["拌"],pāi:["拍"],līn:["拎"],guǎi:["拐","枴","柺"],"tuò tà zhí":["拓"],"ào ǎo niù":["拗"],"jū gōu":["拘"],"pīn pàn fān":["拚"],"bài bái":["拜"],bài:["拝","敗","稗","粺","薭","贁","败","韛"],qiá:["拤"],"nǐng níng nìng":["拧"],"zé zhái":["择","擇"],hén:["拫","痕","鞎"],"kuò guā":["括"],"jié jiá":["拮"],nǐn:["拰"],shuān:["拴","栓","閂","闩"],"cún zùn":["拵"],"zā zǎn":["拶","桚"],kǎo:["拷","攷","栲","烤","考"],"yí chǐ hài":["拸"],"cè sè chuò":["拺"],"zhuài zhuāi yè":["拽"],"shí shè":["拾"],bāi:["挀","掰"],"kuò guāng":["挄"],nòng:["挊","挵","齈"],"jiào jiāo":["挍","敎","教"],"kuà kū":["挎"],"ná rú":["挐"],"tiāo tiǎo":["挑"],"dié shè":["挕"],liě:["挘","毟"],"yà yǎ":["挜","掗"],"wō zhuā":["挝"],"xié jiā":["挟","挾"],"dǎng dàng":["挡","擋"],"zhèng zhēng":["挣","正","症"],"āi ái":["挨"],"tuō shuì":["挩","捝"],"tǐ tì":["挮"],"suō shā":["挱"],"sā shā suō":["挲"],"kēng qiān":["挳","摼"],"bàng péng":["挷"],"ruó ruá":["挼"],"jiǎo kù":["捁"],"wǔ wú":["捂"],tǒng:["捅","桶","筒","筩","統","綂","统","㛚"],"huò chì":["捇"],"tú shū chá":["捈"],"lǚ luō":["捋"],"shāo shào":["捎","稍"],niē:["捏","揑"],"shù sǒng sōu":["捒"],"yé yú":["捓"],"jué zhuó":["捔"],"bù pú zhì":["捗"],zùn:["捘","銌"],lāo:["捞","撈","粩"],sǔn:["损","損","榫","笋","筍","箰","鎨","隼"],"wàn wǎn wān yù":["捥"],pěng:["捧","淎","皏"],shě:["捨"],"fǔ fù bǔ":["捬"],dáo:["捯"],"luò luǒ wǒ":["捰"],"juǎn quán":["捲"],"chēn tiǎn":["捵"],"niǎn niē":["捻"],"ruó wěi ré":["捼"],zuó:["捽","昨","秨","稓","筰","莋","鈼"],"wò xiá":["捾"],"qìng qiàn":["掅"],"póu pǒu":["掊"],qiā:["掐","葜"],"pái pǎi":["排"],"qiān wàn":["掔"],"yè yē":["掖"],"niè nǐ yì":["掜"],"huò xù":["掝"],"yàn shàn yǎn":["掞"],"zhěng dìng":["掟"],kòng:["控","鞚"],tuī:["推","蓷","藬"],"zōu zhōu chōu":["掫"],tiàn:["掭","舚"],kèn:["掯","裉","褃"],pá:["掱","杷","潖","爬","琶","筢"],"guó guāi":["掴"],"dǎn shàn":["掸","撣"],"chān xiān càn shǎn":["掺"],sāo:["掻","搔","溞","繅","缫","螦","騒","騷","鰠","鱢","鳋"],pèng:["掽","椪","槰","碰","踫"],"zhēng kēng":["揁"],"jiū yóu":["揂"],"jiān jiǎn":["揃","籛"],"pì chè":["揊"],"sāi zǒng cāi":["揌"],"tí dī dǐ":["提"],"zǒng sōng":["揔"],"huáng yóng":["揘"],"zǎn zuàn":["揝"],"xū jū":["揟"],"ké qiā":["揢"],"chuāi chuǎi chuài tuán zhuī":["揣"],"dì tì":["揥"],"lá là":["揦"],là:["揧","楋","溂","瓎","瘌","翋","臘","蝋","蝲","蠟","辢","辣","鑞","镴","鬎","鯻","𬶟"],"jiē qì":["揭"],"chòng dǒng":["揰"],"dié shé yè":["揲"],"jiàn qián jiǎn":["揵"],yé:["揶","爷","爺","瑘","鋣","鎁","铘"],chān:["搀","摻","攙","裧","襜","覘","觇","辿","鋓"],"gē gé":["搁","擱"],"lǒu lōu":["搂","摟"],"chōu zǒu":["搊"],chuāi:["搋"],sūn:["搎","槂","狲","猻","荪","蓀","蕵","薞","飧","飱"],"róng náng nǎng":["搑"],"péng bàng":["搒"],cuō:["搓","瑳","磋","蹉","遳","醝"],"kē è":["搕"],"nù nuò nòu":["搙"],"lā xié xiàn":["搚"],qiǔ:["搝","糗"],"xiǎn xiān":["搟"],"jié zhé":["搩"],"pán bān pó":["搫"],bān:["搬","攽","斑","斒","班","瘢","癍","肦","螁","螌","褩","辬","頒","颁","𨭉"],"zhì nái":["搱"],"wā wǎ wà":["搲"],huá:["搳","撶","滑","猾","蕐","螖","譁","鏵","铧","驊","骅","鷨"],"qiāng qiǎng chēng":["搶"],"tián shēn":["搷"],"ná nuò":["搻"],èn:["摁"],"shè niè":["摄","攝"],bìn:["摈","擯","殡","殯","膑","臏","髌","髕","髩","鬂","鬓","鬢"],"shā sà shǎi":["摋"],"chǎn sùn":["摌"],"jiū liú liáo jiǎo náo":["摎"],"féng pěng":["摓"],shuāi:["摔"],"dì tú zhí":["摕"],"qì jì chá":["摖"],"sōu sǒng":["摗"],"liǎn liàn":["摙"],"gài xì":["摡"],"hù chū":["摢"],tàng:["摥","烫","燙","鐋"],"nái zhì":["摨"],"mó mā":["摩"],"jiāng qiàng":["摪"],"áo qiáo":["摮"],"niè chè":["摰"],"mán màn":["摱"],"chàn cán":["摲"],"sè mí sù":["摵"],"biāo biào":["摽"],"juē jué":["撅"],piē:["撆","暼","氕","瞥"],"piě piē":["撇"],"zǎn zān zēn qián":["撍"],"sā sǎ":["撒"],hòng:["撔","訌","讧","闀","鬨"],"héng guàng":["撗"],niǎn:["撚","撵","攆","涊","焾","碾","簐","蹍","蹨","躎","輦","辇"],"chéng zhěng":["撜"],"huī wéi":["撝"],cāo:["撡","操","糙"],"xiāo sōu":["撨"],"liáo liāo":["撩"],"cuō zuǒ":["撮"],"wěi tuǒ":["撱"],cuān:["撺","攛","汆","蹿","躥","鑹","镩"],"qiào yāo jī":["撽"],"zhuā wō":["撾"],"lèi léi":["擂"],nǎng:["擃","攮","曩","灢"],"qíng jǐng":["擏"],kuǎi:["擓","蒯","㧟"],"pǐ bò":["擗"],"bò bāi":["擘"],"jù jǐ":["據"],mēng:["擝"],"sǒu sòu":["擞"],xǐng:["擤","箵","醒"],cā:["擦"],"níng nǐng nìng":["擰"],"zhì jié":["擳"],"là liè":["擸","爉"],"sòu sǒu":["擻"],"lì luò yuè":["擽"],"tī zhāi zhì":["擿"],pān:["攀","潘","眅","萠"],lèi:["攂","泪","涙","淚","禷","类","纇","蘱","酹","銇","錑","頛","頪","類","颣"],"cā sǎ":["攃"],"jùn pèi":["攈"],"lì luò":["攊","躒"],"là lài":["攋","櫴"],"lú luó":["攎"],"zǎn cuán":["攒"],"xiān jiān":["攕"],"mí mǐ mó":["攠"],"zǎn cuán zàn zuān":["攢"],zuàn:["攥"],"lì shài":["攦"],"lì luǒ":["攭"],"guǐ guì":["攱"],"jī qī yǐ":["攲"],fàng:["放"],"wù móu":["敄"],"chù shōu":["敊"],"gé guó è":["敋"],"duó duì":["敓","敚"],"duō què":["敠","敪"],"sàn sǎn":["散"],"dūn duì":["敦","镦"],"qī yǐ jī":["敧"],"xiào xué":["敩"],"shù shǔ shuò":["数","數"],"ái zhú":["敱","敳"],"xiòng xuàn":["敻"],"zhuó zhú":["斀"],"yì dù":["斁"],"lí tái":["斄"],"fěi fēi":["斐"],"yǔ zhōng":["斔"],"dòu dǒu":["斗"],"wò guǎn":["斡"],"tǒu tiǎo":["斢"],dòu:["斣","梪","浢","痘","窦","竇","脰","荳","豆","逗","郖","酘","閗","闘","餖","饾","鬥","鬦","鬪","鬬","鬭"],"yín zhì":["斦"],"chǎn jiè":["斺"],"wū yū yú":["於"],"yóu liú":["斿"],"páng bàng":["旁"],"máo mào":["旄"],"pī bì":["旇"],"xuán xuàn":["旋"],"wú mó":["无"],zǎo:["早","枣","栆","棗","澡","璪","薻","藻","蚤"],gā:["旮"],"gàn hàn":["旰"],"tái yīng":["旲"],"xū xù":["旴"],"tūn zhùn":["旽"],"wù wǔ":["旿"],"pò pèi":["昢"],zòng:["昮","猔","疭","瘲","粽","糉","糭","縦"],ǎi:["昹","毐","矮","蔼","藹","譪","躷","霭","靄"],"huàng huǎng":["晃"],xuǎn:["晅","癣","癬","选","選"],"xù kuā":["晇"],hǒng:["晎"],shài:["晒","曬"],"yūn yùn":["晕","煴"],"shèng chéng":["晟","椉","盛"],"jǐng yǐng":["景"],shǎn:["晱","熌","睒","覢","閃","闪","陕","陝"],"qǐ dù":["晵"],"ǎn àn yǎn":["晻"],"wǎng wàng":["暀"],zàn:["暂","暫","瓉","瓒","瓚","禶","襸","讃","讚","賛","贊","赞","蹔","鄼","錾","鏨","饡"],"yùn yūn":["暈"],"mín mǐn":["暋"],"dǔ shǔ":["暏"],shǔ:["暑","曙","潻","癙","糬","署","薥","薯","藷","蜀","蠴","襡","襩","鱪","鱰","黍","鼠","鼡"],"jiǎn lán":["暕"],nuǎn:["暖","煗","餪"],"bào pù":["暴"],"xī xǐ":["暿"],"pù bào":["曝","瀑"],"qū qǔ":["紶"],"qǔ qū":["曲"],"gèng gēng":["更"],"hū hù":["曶","雽"],"zēng céng":["曽","橧"],"céng zēng":["曾","竲"],"cǎn qián jiàn":["朁"],"qiè hé":["朅"],"bì pí":["朇","禆","笓","裨"],"yǒu yòu":["有"],"bān fén":["朌","鳻"],"fú fù":["服","洑"],"fěi kū":["朏","胐"],"qú xù chǔn":["朐"],"juān zuī":["朘"],"huāng máng wáng":["朚"],"qī jī":["期"],"tóng chuáng":["朣","橦"],zhá:["札","牐","箚","蚻","譗","鍘","铡","閘","闸"],"zhú shù shú":["朮"],"shù shú zhú":["术"],"zhū shú":["朱"],"pǔ pò pō piáo":["朴"],"dāo tiáo mù":["朷"],"guǐ qiú":["朹"],xiǔ:["朽","滫","潃","糔"],"chéng chēng":["朾"],zá:["杂","沯","砸","襍","雑","雜","雥","韴"],"yú wū":["杅"],"gān gǎn":["杆"],"chā chà":["杈"],"shān shā":["杉"],cūn:["村","皴","竴","膥","踆","邨"],"rèn ér":["杒","梕"],"sháo biāo":["杓"],"dì duò":["杕","枤"],"gū gài":["杚"],"yí zhì lí duò":["杝"],"gàng gāng":["杠"],"tiáo tiāo":["条","條"],"mà mǎ":["杩"],"sì zhǐ xǐ":["杫"],"yuán wán":["杬","蚖"],"bèi fèi":["杮"],"shū duì":["杸"],"niǔ chǒu":["杻"],"wò yuè":["枂","臒"],máo:["枆","毛","氂","渵","牦","矛","罞","茅","茆","蝥","蟊","軞","酕","鉾","錨","锚","髦","鶜"],"pī mì":["枈"],àng:["枊","盎","醠"],"fāng bìng":["枋"],"hù dǐ":["枑"],xín:["枔","襑","鐔","鬵"],"yāo yǎo":["枖"],"ě è":["枙"],"zhī qí":["枝"],"cōng zōng":["枞","樅"],"xiān zhēn":["枮"],"tái sì":["枱"],"gǒu jǔ gōu":["枸"],"bāo fú":["枹"],"yì xiè":["枻","栧"],"tuó duò":["柁","馱","駄","驮"],"yí duò lí":["柂"],"nǐ chì":["柅"],"pán bàn":["柈","跘"],"yǎng yàng yāng yīng":["柍"],"fù fū fǔ":["柎"],"bǎi bó bò":["柏"],mǒu:["某"],"sháo shào":["柖"],zhè:["柘","樜","浙","淛","蔗","蟅","這","鷓","鹧","䗪"],"yòu yóu":["柚","櫾"],"guì jǔ":["柜"],"zhà zuò":["柞"],"dié zhì":["柣","眰"],"zhā zǔ zū":["柤"],"chá zhā":["查","査"],"āo ào":["柪","軪"],"bā fú pèi bó biē":["柭"],"duò zuó wù":["柮"],"bì bié":["柲"],"zhù chù":["柷"],"bēi pēi":["柸"],"shì fèi":["柹"],"shān zhà shi cè":["栅"],"lì yuè":["栎","櫟"],"qì qiè":["栔","砌"],"qī xī":["栖","蹊"],"guā kuò":["栝"],"bīng bēn":["栟"],"xiào jiào":["校"],"jiàn zùn":["栫","袸"],"yǒu yù":["栯"],"hé hú":["核"],gēn:["根","跟"],"zhī yì":["栺"],"gé gē":["格"],"héng háng":["桁"],"guàng guāng":["桄"],"yí tí":["桋","荑"],sāng:["桑","桒","槡"],"jú jié":["桔"],"yú móu":["桙"],"ráo náo":["桡","橈"],"guì huì":["桧","檜"],"chén zhèn":["桭"],"tīng yíng":["桯"],"bó po":["桲"],"bèn fàn":["桳"],"fēng fèng":["桻","葑"],"sù yìn":["梀"],"tǐng tìng":["梃"],"xuān juān xié":["梋"],"tú chá":["梌"],"āo yòu":["梎"],kuǎn:["梡","欵","款","歀"],"shāo sào":["梢"],"qín chén cén":["梣"],"lí sì qǐ":["梩"],"chān yán":["梴"],"bīn bīng":["梹","槟","檳"],"táo chóu dào":["梼"],"cōng sōng":["棇"],"gùn hùn":["棍"],"dé zhé":["棏"],"pái bèi pèi":["棑"],"bàng pǒu bèi bēi":["棓"],"dì dài tì":["棣"],sēn:["森","椮","槮","襂"],"rěn shěn":["棯"],"léng lēng líng":["棱"],"fú sù":["棴"],"zōu sǒu":["棷"],zōu:["棸","箃","緅","諏","诹","邹","郰","鄒","鄹","陬","騶","驺","鯫","鲰","黀","齱","齺"],"zhào zhuō":["棹"],"chēn shēn":["棽"],"jiē qiè":["椄"],"yǐ yī":["椅"],"chóu zhòu diāo":["椆"],"qiāng kōng":["椌"],"zhuī chuí":["椎"],"bēi pí":["椑"],mēn:["椚"],"quān juàn quán":["椦"],"duǒ chuán":["椯"],"wěi huī":["椲"],"jiǎ jiā":["椵"],"hán jiān":["椷"],"shèn zhēn":["椹"],"yàn yà":["椻"],"zhā chá":["楂"],"guō kuǎ":["楇"],"jí zhì":["楖"],"kǔ hù":["楛"],"yóu yǒu":["楢"],"sǒng cōng":["楤"],"yuán xuàn":["楥"],"yǎng yàng yīng":["楧"],pián:["楩","胼","腁","賆","蹁","駢","騈","骈","骿","㛹"],"dié yè":["楪"],"dùn shǔn":["楯"],"còu zòu":["楱"],"dì dǐ shì":["楴"],"kǎi jiē":["楷"],"róu ròu":["楺"],"lè yuè":["楽"],"wēn yùn":["榅","鞰"],lǘ:["榈","櫚","氀","膢","藘","閭","闾","驢","驴"],shén:["榊","神","鉮","鰰","𬬹"],"bī pi":["榌"],"zhǎn niǎn zhèn":["榐"],"fú fù bó":["榑"],"jiàn jìn":["榗"],"bǎng bàng":["榜"],"shā xiè":["榝","樧"],nòu:["槈","耨","鎒","鐞"],"qiǎn lián xiàn":["槏"],gàng:["槓","焵","焹","筻","鿍"],gāo:["槔","槹","橰","櫜","睾","篙","糕","羔","臯","韟","餻","高","髙","鷎","鷱","鼛"],"diān zhěn zhēn":["槙"],"kǎn jiàn":["槛"],"xí dié":["槢"],"jī guī":["槣"],"róng yōng":["槦"],"tuán shuàn quán":["槫"],"qì sè":["槭"],"cuī zhǐ":["槯"],"yǒu chǎo":["槱"],"màn wàn":["槾"],"lí chī":["樆"],"léi lěi":["樏","櫑","礌"],"cháo jiǎo chāo":["樔"],"chēng táng":["樘"],"jiū liáo":["樛"],"mó mú":["模"],"niǎo mù":["樢"],"héng hèng":["横","橫"],xuě:["樰","膤","艝","轌","雪","鱈","鳕"],"fá fèi":["橃"],rùn:["橍","润","潤","膶","閏","閠","闰"],"zhǎn jiǎn":["橏"],shùn:["橓","瞚","瞬","舜","蕣","順","顺","鬊"],"tuí dūn":["橔"],"táng chēng":["橖"],"sù qiū":["橚"],"tán diàn":["橝"],"fén fèn fèi":["橨"],"rǎn yān":["橪"],"cū chu":["橻"],"shū qiāo":["橾"],"píng bò":["檘"],"zhái shì tú":["檡"],"biǎo biāo":["檦"],"qiān lián":["檶"],"nǐ mí":["檷"],"jiàn kǎn":["檻"],"nòu ruǎn rú":["檽"],"jī jì":["櫅","禨"],"huǎng guǒ gǔ":["櫎"],"lǜ chū":["櫖"],"miè mèi":["櫗"],ōu:["櫙","欧","歐","殴","毆","瓯","甌","膒","藲","謳","讴","鏂","鴎","鷗","鸥"],"zhù zhuó":["櫡"],"jué jì":["櫭"],"huái guī":["櫰"],"chán zhàn":["欃"],"wéi zuì":["欈"],cáng:["欌","鑶"],"yù yì":["欥"],"chù qù xì":["欪"],"kài ài":["欬"],"yì yīn":["欭"],"xì kài":["欯"],"shuò sòu":["欶"],"ǎi ēi éi ěi èi ê̄ ế ê̌ ề":["欸"],"qī yī":["欹"],"chuā xū":["欻"],"chǐ chuài":["欼"],"kǎn qiàn":["欿"],"kǎn kè":["歁"],"chuǎn chuán":["歂"],"yīn yān":["歅"],"jìn qūn":["歏"],pēn:["歕"],"xū chuā":["歘"],"xī shè":["歙"],"liǎn hān":["歛"],"zhì chí":["歭"],"sè shà":["歰"],sǐ:["死"],"wěn mò":["歾"],piǎo:["殍","皫","瞟","醥","顠"],"qíng jìng":["殑"],"fǒu bó":["殕"],"zhí shi":["殖"],"yè yān yàn":["殗"],"hūn mèi":["殙"],chòu:["殠","臰","遚"],"kuì huì":["殨","溃","潰"],cuàn:["殩","熶","爨","窜","竄","篡","簒"],"yīn yān yǐn":["殷"],"qìng kēng shēng":["殸"],"yáo xiáo xiào":["殽"],"gū gǔ":["毂","蛄"],"guàn wān":["毌"],"dú dài":["毒"],"xún xùn":["毥"],mú:["毪","氁"],"dòu nuò":["毭"],"sāi suī":["毸"],lu:["氇"],sào:["氉","瘙","矂","髞"],"shì zhī":["氏"],"dī dǐ":["氐"],"máng méng":["氓"],"yáng rì":["氜"],shuǐ:["水","氵","氺","閖"],"zhěng chéng zhèng":["氶"],tǔn:["氽"],"fán fàn":["氾"],"guǐ jiǔ":["氿"],"bīn pà pā":["汃"],"zhuó què":["汋"],"dà tài":["汏"],pìn:["汖","牝","聘"],"hàn hán":["汗","馯"],tu:["汢"],"tāng shāng":["汤","湯"],"zhī jì":["汥"],"gàn hán cén":["汵"],"wèn mén":["汶"],"fāng pāng":["汸"],"hǔ huǎng":["汻"],"niú yóu":["汼"],hàng:["沆"],"shěn chén":["沈"],"dùn zhuàn":["沌"],"nǜ niǔ":["沑"],"méi mò":["沒","没"],"tà dá":["沓"],"mì wù":["沕"],"hóng pāng":["沗"],"shā shà":["沙"],"zhuǐ zǐ":["沝"],"ōu òu":["沤","漚"],"jǔ jù":["沮"],"tuō duó":["沰"],"mǐ lì":["沵"],"yí chí":["沶"],"xiè yì":["泄"],"bó pō":["泊"],"mì bì":["泌","秘"],"chù shè":["泏"],"yōu yòu āo":["泑"],"pēng píng":["泙","硑"],"pào pāo":["泡"],"ní nì":["泥","秜"],"yuè sà":["泧"],"jué xuè":["泬","疦"],"lóng shuāng":["泷","瀧"],"luò pō":["泺","濼"],"zé shì":["泽","澤"],"sǎ xǐ":["洒"],"sè qì zì":["洓"],"xǐ xiǎn":["洗"],"kǎo kào":["洘"],"àn yàn è":["洝"],"lěi lèi":["洡"],"qiè jié":["洯"],"qiǎn jiān":["浅"],"jì jǐ":["济","済","濟","纪"],"hǔ xǔ":["浒","滸"],"jùn xùn":["浚","濬"],"yǐng chéng yíng":["浧"],"liàn lì":["浰"],"féng hóng":["浲","溄"],"jiǒng jiōng":["浻"],"suī něi":["浽"],"yǒng chōng":["涌"],"tūn yūn":["涒"],"wō guō":["涡","渦"],hēng:["涥","脝"],"zhǎng zhàng":["涨","漲"],"shòu tāo":["涭"],shuàn:["涮","腨"],"kōng náng":["涳"],"wò wǎn yuān":["涴"],"tuō tuò":["涶"],wō:["涹","猧","窝","窩","莴","萵","蜗","蝸","踒"],"qiè jí":["淁"],"guǒ guàn":["淉"],"lín lìn":["淋","獜","疄"],"tǎng chǎng":["淌"],"nào chuò zhuō":["淖"],"péng píng":["淜"],féi:["淝","肥","腓","蜰"],"pì pèi":["淠"],"niǎn shěn":["淰"],"biāo hǔ":["淲"],"chún zhūn":["淳"],"hùn hún":["混"],qiǎn:["淺","繾","缱","肷","膁","蜸","譴","谴","遣","鑓"],"wèn mín":["渂"],"rè ruò luò":["渃"],"dú dòu":["渎","瀆","读"],"jiàn jiān":["渐","溅","漸","濺"],"miǎn shéng":["渑","澠"],"nuǎn nuán":["渜"],"qiú wù":["渞"],"tíng tīng":["渟"],"dì tí dī":["渧"],"gǎng jiǎng":["港"],"hōng qìng":["渹"],tuān:["湍","煓"],"huì mǐn xū":["湏"],"xǔ xù":["湑"],pén:["湓","瓫","盆","葐"],"mǐn hūn":["湣"],"tuàn nuǎn":["湪"],"qiū jiǎo":["湫","湬"],"yān yīn":["湮"],"bàn pán":["湴"],"zhuāng hún":["湷"],"yàn guì":["溎"],"lián liǎn nián xián xiàn":["溓"],"dá tǎ":["溚","鿎"],"liū liù":["溜","澑","蹓"],lùn:["溣"],mǎ:["溤","犸","獁","玛","瑪","码","碼","遤","鎷","馬","马","鰢","鷌"],"zhēn qín":["溱"],"nì niào":["溺"],"chù xù":["滀","畜"],"wěng wēng":["滃"],"hào xuè":["滈"],"qì xì xiē":["滊"],"xíng yíng":["滎"],"zé hào":["滜"],"piāo piào piǎo":["漂"],"cóng sǒng":["漎"],"féng péng":["漨"],"luò tà":["漯"],"pēng bēn":["漰"],"chóng shuāng":["漴"],"huǒ kuò huò":["漷"],"liáo liú":["漻"],"cuǐ cuī":["漼"],"cóng zǒng":["潀"],"cóng zōng":["潈"],"pì piē":["潎"],"dàng xiàng":["潒"],"huáng guāng":["潢"],"liáo lào lǎo":["潦"],"cōng zòng":["潨"],"zhí zhì":["潪"],"tān shàn":["潬"],"tú zhā":["潳"],"sàn sǎ":["潵"],hēi:["潶","黑","黒","𬭶"],"chéng dèng":["澄","瀓"],"cūn cún":["澊"],"péng pēng":["澎"],"hòng gǒng":["澒","銾"],"wàn màn":["澫"],"kuài huì":["澮"],"guō wō":["濄"],"pēn fén":["濆"],"jí shà":["濈"],"huì huò":["濊"],"dǐng tìng":["濎"],"mǐ nǐ":["濔"],"bì pì":["濞"],"cuì zuǐ":["濢"],"hù huò":["濩"],"ǎi kài kè":["濭"],"wěi duì":["濻","瀢"],"zàn cuán":["濽","灒"],"yǎng yàng":["瀁"],"wǎng wāng":["瀇"],"mò miè":["瀎","眜"],suǐ:["瀡","膸","髓"],"huái wāi":["瀤"],"zùn jiàn":["瀳"],"yīng yǐng yìng":["瀴"],"ráng ràng":["瀼"],shuàng:["灀"],"zhuó jiào zé":["灂"],sǎ:["灑","訯","靸"],"luán luàn":["灓"],"dǎng tǎng":["灙"],"xún quán quàn":["灥"],"huǒ biāo":["灬"],"zhà yù":["灹"],"fén bèn":["炃"],"jiǒng guì":["炅"],"pàng fēng":["炐"],quē:["炔","缺","缼","蒛"],biān:["炞","煸","甂","砭","笾","箯","籩","編","编","蝙","邉","邊","鍽","鞭","鯾","鯿","鳊"],"zhāo zhào":["炤"],"zhuō chù":["炪"],"pào páo bāo":["炮"],"páo fǒu":["炰"],"shǎn qián shān":["炶"],"zhà zhá":["炸"],"jiǎo yào":["烄"],quǎn:["烇","犬","犭","畎","綣","绻","虇"],"yàng yáng":["烊"],"lào luò":["烙"],"huí huǐ":["烠"],rè:["热","熱"],"fú páo":["烰"],"xiè chè":["烲","焎"],"yàn shān":["烻"],"hūn xūn":["焄"],kào:["焅","犒","銬","铐","靠","鮳","鯌","鲓","㸆"],"juān yè":["焆"],"jùn qū":["焌"],"tāo dào":["焘"],"chǎo jù":["焣"],"wò ài":["焥"],"zǒng cōng":["焧"],"xī yì":["焬"],"xìn xīn":["焮"],"chāo zhuō":["焯"],"xiǒng yīng":["焸","焽"],kuǐ:["煃","跬","蹞","頍","𫠆"],"huī yùn xūn":["煇"],"jiǎo qiāo":["煍"],"qián shǎn shān":["煔"],"xī yí":["煕"],"shà shā":["煞"],"yè zhá":["煠"],"yáng yàng":["煬"],"ēn yūn":["煾"],"yūn yǔn":["熅"],"hè xiāo":["熇"],xióng:["熊","熋","雄"],"xūn xùn":["熏","爋"],gòng:["熕","貢","贡"],liū:["熘"],"cōng zǒng":["熜"],"lù āo":["熝"],"shú shóu":["熟"],"fēng péng":["熢"],"cuǐ suī":["熣"],tēng:["熥","膯","鼟"],"yùn yù":["熨"],"áo āo":["熬"],"hàn rǎn":["熯"],"ōu ǒu":["熰"],"huáng huǎng":["熿"],"chǎn dǎn chàn":["燀"],"jiāo zhuó qiáo jué":["燋"],"yàn yān":["燕"],"tài liè":["燤"],āo:["爊"],"yàn xún":["爓"],"jué jiào":["爝","覐","覚","覺","觉"],"lǎn làn":["爦"],"zhuǎ zhǎo":["爪"],"zhǎo zhuǎ":["爫"],"fù fǔ":["父"],diē:["爹","褺","跌"],zāng:["牂","羘","臧","賍","賘","贓","贜","赃","髒"],"piàn piān":["片"],"biān miàn":["牑"],bǎng:["牓","綁","绑"],"yǒu yōng":["牗"],"chēng chèng":["牚","竀"],niú:["牛","牜"],"jiū lè":["牞"],"mù móu":["牟"],māng:["牤"],"gē qiú":["牫"],"yòu chōu":["牰"],"tè zhí":["犆"],bēn:["犇","錛","锛"],"jiān qián":["犍","玪"],má:["犘","痲","蔴","蟇","麻"],"máo lí":["犛"],"bá quǎn":["犮"],"zhuó bào":["犳"],"àn hān":["犴"],"kàng gǎng":["犺"],"pèi fèi":["犻"],"fān huān":["犿"],kuáng:["狂","狅","誑","诳","軖","軠","鵟","𫛭"],"yí quán chí":["狋"],"xīng shēng":["狌"],"tuó yí":["狏"],kǔ:["狜","苦"],"huán huān":["狟"],"hé mò":["狢"],"tà shì":["狧"],"máng dòu":["狵"],"xī shǐ":["狶"],suān:["狻","痠","酸"],"bài pí":["猈"],"jiān yàn":["猏","豣"],"yī yǐ":["猗"],"yá wèi":["猚"],cāi:["猜"],"māo máo":["猫","貓"],"chuàn chuān":["猭"],"tuān tuàn":["猯","貒"],"yà jiá qiè":["猰"],"hè xiē gé hài":["猲"],"biān piàn":["猵","獱"],"bó pò":["猼"],"háo gāo":["獋"],"fén fèn":["獖"],"yào xiāo":["獟"],"shuò xī":["獡"],"gé liè xiē":["獦"],"nòu rú":["獳"],"náo nǎo yōu":["獶"],ráng:["獽","瓤","禳","穣","穰","蘘","躟","鬤"],"náo yōu":["獿"],"lǜ shuài":["率"],"wáng wàng":["王"],"yáng chàng":["玚"],"mín wén":["玟"],"bīn fēn":["玢"],"mén yǔn":["玧"],"qiāng cāng":["玱","瑲","篬"],"án gān":["玵"],"xuán xián":["玹"],"cī cǐ":["玼","跐"],"yí tāi":["珆"],"zǔ jù":["珇"],fà:["珐","琺","蕟","髪","髮"],"yín kèn":["珢"],"huī hún":["珲"],"xuán qióng":["琁"],"fú fū":["琈"],"bǐng pín":["琕"],"cuì sè":["琗"],"yù wéi":["琟"],"tiǎn tiàn":["琠"],"zhuó zuó":["琢"],"běng pěi":["琣"],guǎn:["琯","璭","痯","筦","管","舘","輨","錧","館","馆","鳤"],"hún huī":["琿"],"xié jiē":["瑎"],"chàng dàng yáng":["瑒"],"tiàn zhèn":["瑱"],"bīn pián":["瑸","璸"],"tú shū":["瑹"],cuǐ:["璀","皠","趡"],"zǎo suǒ":["璅"],"jué qióng":["璚"],"lú fū":["璷"],"jì zī":["璾"],suí:["瓍","綏","绥","遀","随","隨","髄"],"mí xǐ":["瓕"],"qióng wěi wèi":["瓗"],"huán yè yà":["瓛"],"bó páo":["瓟"],"zhí hú":["瓡"],piáo:["瓢","闝"],"wǎ wà":["瓦"],"xiáng hóng":["瓨"],wèng:["瓮","甕","罋","蕹","齆"],"shèn shén":["甚"],ruí:["甤","緌","蕤"],yòng:["用","砽","苚","蒏","醟","㶲"],shuǎi:["甩"],béng:["甭","甮"],"yóu zhá":["甴"],"diàn tián shèng":["甸"],"tǐng dīng":["町","甼"],"zāi zī":["甾"],"bì qí":["畁"],"dá fú":["畗"],"cè jì":["畟"],"zāi zī tián":["畠"],"zhì chóu shì":["畤"],"fān pān":["畨","番"],"shē yú":["畬"],"dāng dàng dǎng":["當"],"jiāng qiáng":["疆"],"pǐ yǎ shū":["疋"],"jié qiè":["疌"],"yí nǐ":["疑"],nè:["疒","眲","訥","讷"],"gē yì":["疙"],"nüè yào":["疟","瘧"],"lì lài":["疠","癘"],"yǎ xiā":["疨"],xuē:["疶","蒆","薛","辥","辪","靴","鞾"],"dǎn da":["疸"],"fá biǎn":["疺"],"fèi féi":["疿","痱"],"shān diàn":["痁"],"téng chóng":["痋"],"tōng tóng":["痌"],"wěi yòu yù":["痏"],"tān shǐ":["痑"],"pū pù":["痡","鋪"],"bēng péng":["痭"],"má lìn":["痳"],"tiǎn diàn":["痶"],"ān yè è":["痷"],"kē ē":["痾"],"zhì chì":["瘈"],"jiǎ xiá xiā":["瘕"],"lěi huì":["瘣"],"chài cuó":["瘥"],"diān chēn":["瘨"],"da dá":["瘩"],"biě biē":["瘪"],qué:["瘸"],"dàn dān":["癉"],"guì wēi":["癐"],"nòng nóng":["癑"],"biē biě":["癟"],"bō bǒ":["癷"],bái:["白"],"jí bī":["皀"],"de dì dí dī":["的"],"pā bà":["皅"],"gāo háo":["皋"],"gāo yáo":["皐"],"lì luò bō":["皪"],"zhā cǔ":["皻"],"zhāo zhǎn dǎn":["皽"],"jiān jiàn":["监","監","鋻","间","鞬"],"gài gě hé":["盖"],"máng wàng":["盳"],yuǎn:["盶","逺","遠"],"tián xián":["盷"],"xiāng xiàng":["相"],dǔn:["盹","趸","躉"],"xì pǎn":["盻"],"shěng xǐng":["省"],"yún hùn":["眃"],"miǎn miàn":["眄"],"kàn kān":["看"],"yìng yāng yǎng":["眏"],"yǎo āo ǎo":["眑"],"jū xū kōu":["眗"],"yí chì":["眙"],"dié tì":["眣"],"bǐng fǎng":["眪"],"pàng pán":["眫"],"mī mí":["眯","瞇"],"xuàn shùn xún":["眴"],tiào:["眺","粜","糶","覜","趒"],"zhe zhuó zháo zhāo":["着"],"qiáo shào xiāo":["睄"],"cuó zhuài":["睉"],gùn:["睔","謴"],"suì zuì":["睟"],"pì bì":["睥","稫","辟"],"yì zé gāo":["睪"],"xǐng xìng":["睲"],"guì wèi kuì":["瞆"],"kòu jì":["瞉"],"qióng huán":["瞏"],"mán mén":["瞒","瞞"],"diāo dōu":["瞗"],"lou lóu lǘ":["瞜"],"shùn rún":["瞤"],"liào liǎo":["瞭","钌"],"jiàn xián":["瞯"],"wǔ mí":["瞴"],"guì kuì":["瞶"],"nǐng chēng":["矃"],"huò yuè":["矆"],"mēng méng":["矇"],"kuàng guō":["矌"],"guàn quán":["矔"],"mǎn mán":["矕"],"jīn guān qín":["矜"],"jīn qín guān":["矝"],"yù xù jué":["矞"],"jiǎo jiáo":["矫","矯"],duǎn:["短"],"shí dàn":["石"],"gāng qiāng kòng":["矼"],"huā xū":["砉"],"pīn bīn fēn":["砏"],"yán yàn":["研","硏"],"luǒ kē":["砢"],"fú fèi":["砩","笰"],"zhǔ zhù":["砫"],"lá lì lā":["砬"],"kuāng guāng":["硄"],"gè luò":["硌"],"shuò shí":["硕","碩"],"wèi wéi ái":["硙"],"què kè kù":["硞"],"mǎng bàng":["硥"],"luò lòng":["硦"],"yǒng tóng":["硧"],nüè:["硸","虐"],"kēng kěng":["硻"],"yān yǎn":["硽"],"zhuì chuí duǒ":["硾"],"kōng kòng":["硿"],"zòng cóng":["碂"],"jiān zhàn":["碊"],"lù liù":["碌","陆"],"què xī":["碏"],"lún lǔn lùn":["碖"],"náo gāng":["碙"],"jié yà":["碣"],"wèi wěi":["碨"],"tí dī":["碮"],"chá chā":["碴"],"qiāo què":["碻"],"sù xiè":["碿"],"liú liù":["磂","遛","鎦","馏"],"sī tí":["磃"],"bàng páng":["磅"],"huá kě gū":["磆"],"wěi kuǐ":["磈"],"xiá qià yà":["磍"],"lián qiān":["磏"],"wèi ái gài":["磑"],"lá lā":["磖"],"áo qiāo":["磝"],"pēng pèng":["磞","閛"],"yīn yǐn":["磤"],"lěi léi":["磥"],"mó mò":["磨"],"qì zhú":["磩"],"láo luò":["磱"],"pán bō":["磻"],"jí shé":["磼"],"hé qiāo qiào":["礉"],"kè huò":["礊"],"què hú":["礐"],"è qì":["礘"],cǎ:["礤","礸"],"xián xín":["礥"],"léi lěi lèi":["礧"],"yán yǎn":["礹"],"qí zhǐ":["祇","蚔"],"bēng fāng":["祊"],"bì mì":["祕"],suàn:["祘","笇","筭","算","蒜"],"piào piāo":["票"],"jì zhài":["祭"],"shuì lèi":["祱"],"jìn jīn":["禁"],"chán shàn":["禅"],"yáng shāng":["禓"],"zhī zhǐ tí":["禔"],"shàn chán":["禪"],"yú yù ǒu":["禺"],"zǐ zì":["秄"],"chá ná":["秅"],"zhǒng zhòng chóng":["种"],"hào mào":["秏"],"kù kū":["秙"],zū:["租","葅"],chèng:["秤","穪"],"huó kuò":["秮","秳"],"chēng chèn chèng":["称","稱"],"shì zhì":["秲","銴"],"fù pū":["秿"],"xùn zè":["稄"],"tú shǔ":["稌"],"zhùn zhǔn":["稕"],"jī qí":["稘","綨","觭"],"léng líng":["稜"],"zuì zú sū":["稡"],"xì qiè":["稧","郄"],"zhǒng zhòng":["種"],"zōng zǒng":["稯"],"xián jiān liàn":["稴"],"zī jiū":["稵"],"jī qǐ":["稽"],ròng:["穃"],"shān cǎn cēn":["穇"],"mén méi":["穈"],"jǐ jì":["穖"],"xiāo rào":["穘"],"zhuō bó":["穛"],"tóng zhǒng zhòng":["穜"],zuō:["穝"],"biāo pāo":["穮","藨"],"zhuō jué":["穱"],"cuán zàn":["穳"],"kōng kòng kǒng":["空"],"yū yǔ":["穻"],zhǎi:["窄","鉙"],báo:["窇","雹"],"kū zhú":["窋"],"jiào liáo liù":["窌"],"wā guī":["窐"],"tiǎo yáo":["窕"],"xūn yìn":["窨"],"yà yē":["窫"],"tián diān yǎn":["窴"],"chāo kē":["窼"],"kuǎn cuàn":["窽","窾"],"chù qì":["竐"],"qǔ kǒu":["竘"],"jìng zhěn":["竧"],"kǎn kàn":["竷"],"zhú dǔ":["竺"],"lè jīn":["竻"],"zhuì ruì":["笍"],"háng hàng":["笐"],"cén jìn hán":["笒"],"dā xiá nà":["笚"],"zé zuó":["笮"],"lóng lǒng":["笼","篭","籠","躘","龓"],"zhù zhú":["筑","築"],"dá dā":["答","荅"],shāi:["筛","篩","簁","籭"],"yún jūn":["筠"],"láng làng":["筤","郎","阆"],"zhì zhǐ":["筫"],o:["筽"],"póu bù fú pú":["箁"],"pái bēi":["箄"],gè:["箇","虼","鉻","铬"],"tái chí":["箈"],"guǎi dài":["箉"],"zhào dào":["箌"],"jīng qìng":["箐"],"lín lǐn":["箖"],"jùn qūn":["箘"],"shī yí":["箷","釶"],"yuē yào chuò":["箹"],"xiāo shuò qiào":["箾"],"gōng gǎn lǒng":["篢"],"páng péng":["篣"],"zhuó huò":["篧"],"jiǎn jiān":["篯"],"dí zhú":["篴"],"zān cēn cǎn":["篸"],"zhuàn suǎn zuàn":["篹"],"piǎo biāo":["篻"],"guó guì":["簂"],"cè jí":["簎"],"mì miè":["簚"],"shāi sī":["簛"],"sǔn zhuàn":["簨"],"gàn gǎn":["簳"],"bò bǒ":["簸"],"bó bù":["簿"],shi:["籂"],"zhēn jiān":["籈"],"zhuàn zuǎn":["籑"],"fān pān biān":["籓"],"sǒu shǔ":["籔"],zuǎn:["籫","繤","纂","纉","纘","缵"],nǚ:["籹","釹","钕"],"shā chǎo":["粆"],"kāng jīng":["粇"],fěn:["粉","黺"],cū:["粗","觕","麁","麄","麤"],"nián zhān":["粘"],"cè sè":["粣"],"zhōu yù":["粥"],"shēn sǎn":["糁"],"biān biǎn":["糄","萹"],miàn:["糆","面","靣","麪","麫","麵","麺"],"hú hū hù":["糊"],"gǔ gòu":["糓"],"mí méi":["糜"],"sǎn shēn":["糝","糣"],zāo:["糟","蹧","遭","醩"],"mì sī":["糸"],"jiū jiǔ":["糺"],"xì jì":["系","繫"],"zhēng zhěng":["糽"],"chà chǎ":["紁","衩"],"yuē yāo":["約","约"],"hóng gōng":["紅","红"],"hé gē":["紇","纥"],"wén wèn":["紋","纹"],fóu:["紑"],"jì jié jiè":["紒"],"pī pí bǐ":["紕","纰"],"jīn jìn":["紟"],"zhā zā":["紥","紮"],hā:["紦"],"fū fù":["紨"],"chōu chóu":["紬"],"lèi léi lěi":["累"],"bō bì":["紴"],"tiǎn zhěn":["紾"],"jiōng jiǒng":["絅"],"jié jiē":["結","结","节"],"guà kuā":["絓"],"bǎi mò":["絔"],"gēng huán":["絙"],"jié xié":["絜"],"quán shuān":["絟"],"gǎi ǎi":["絠"],"luò lào":["絡","络"],"bīng bēng pēng":["絣"],"gěi jǐ":["給","给"],"tóng tōng dòng":["絧"],"tiào diào dào":["絩"],"lěi lèi léi":["絫"],"gāi hài":["絯"],"chī zhǐ":["絺"],"wèn miǎn mán wàn":["絻"],"huán huàn wàn":["綄"],"qīn xiān":["綅"],"tì tí":["綈"],"yán xiàn":["綖"],"zōng zèng zòng":["綜"],"chēn lín":["綝"],"zhǔn zhùn":["綧"],"qiàn qīng zhēng":["綪"],"qìng qǐ":["綮"],"lún guān":["綸","纶"],"chuò chāo":["綽","绰"],"tián tǎn chān":["緂"],"lǜ lù":["緑","绿"],"ruǎn ruàn":["緛"],"jí qī":["緝"],"zhòng chóng":["緟","重"],"miáo máo":["緢"],"xiè yè":["緤"],huǎn:["緩","缓","㬊"],"gēng gèng":["緪","縆"],"tōu xū shū":["緰"],"zōng zòng":["緵","繌"],"yùn gǔn":["緷"],"guā wō":["緺"],"yùn yūn wēn":["緼","縕"],"bāng bàng":["縍"],"gǔ hú":["縎","鶻"],"cī cuò suǒ":["縒"],"cuī shuāi":["縗"],"róng rǒng ròng":["縙"],"zài zēng":["縡"],cài:["縩","菜","蔡"],"féng fèng":["縫"],"suō sù":["縮","缩"],"yǎn yǐn":["縯","酓"],"zòng zǒng":["縱","纵"],"zhuàn juàn":["縳"],"mò mù":["縸","莫"],"piǎo piāo":["縹","缥"],"fán pó":["繁"],"bēng bèng":["繃"],"móu miù miào liǎo":["繆"],"yáo yóu zhòu":["繇"],"zēng zèng":["繒","缯"],"jú jué":["繘"],"chuō chuò":["繛"],"zūn zǔn":["繜"],rào:["繞","绕","遶"],"chǎn chán":["繟"],"huì huí":["繢","缋","藱"],"qiāo sāo zǎo":["繰"],"jiǎo zhuó":["繳","缴"],"dàn tán chán":["繵"],nǒng:["繷"],"pú fú":["纀"],"yào lì":["纅"],"rǎng xiāng":["纕"],"lí sǎ xǐ lǐ":["纚"],"xiān qiàn":["纤"],"jīng jìng":["经"],"tí tì":["绨"],"bēng běng bèng":["绷"],"zōng zèng":["综"],"jī qī":["缉"],"wēn yùn yūn":["缊"],"fèng féng":["缝"],"shuāi cuī suī":["缞"],"miù móu liáo miào mù":["缪"],"qiāo sāo":["缲"],fǒu:["缶","缹","缻","雬","鴀"],"bà ba pí":["罢","罷"],"guà guǎi":["罫"],"yáng xiáng":["羊","羏"],"měi gāo":["羙"],"yì xī":["羛"],"qiǎng qiān":["羟"],"qiāng kòng":["羫"],"qián xián yán":["羬"],nóu:["羺"],"hóng gòng":["羾"],"pī bì pō":["翍"],"qú yù":["翑"],ké:["翗"],"qiào qiáo":["翘"],"zhái dí":["翟"],"dào zhōu":["翢"],"hóu qú":["翵"],shuǎ:["耍"],"ruǎn nuò":["耎"],"ér nài":["耏"],"zhuān duān":["耑"],"pá bà":["耙"],"chí sì":["耛"],"qù chú":["耝"],"lún lǔn":["耣"],"jí jiè":["耤"],"tāng tǎng":["耥"],pǎng:["耪","覫"],"zhá zé":["耫"],"yē yé":["耶"],"yún yíng":["耺"],"wà tuǐ zhuó":["聉"],"ér nǜ":["聏"],"tiē zhé":["聑"],"dǐ zhì":["聜"],qié:["聺"],"nǐ jiàn":["聻"],"lèi lē":["肋"],cào:["肏","襙","鄵","鼜"],"bó dí":["肑"],"xiào xiāo":["肖"],"dù dǔ":["肚"],chāi:["肞","釵","钗"],"hán qín hàn":["肣"],"pàng pán pàn":["肨","胖"],"zhūn chún":["肫"],āng:["肮","骯"],"yù yō":["育"],"pí bǐ bì":["肶"],"fèi bì":["胇"],"bèi bēi":["背"],"fèi zǐ":["胏"],"píng pēng":["胓","苹"],"fū fú zhǒu":["胕"],"shèng shēng":["胜"],kuà:["胯","跨","骻"],"gǎi hǎi":["胲"],"gē gé gā":["胳"],"néng nài":["能"],"guī kuì":["胿"],"mài mò":["脉"],"zāng zàng":["脏"],"jiǎo jué":["脚","角"],cuǒ:["脞"],"de te":["脦"],"zuī juān":["脧"],něi:["脮","腇","餒","馁","鮾","鯘"],"pú fǔ":["脯"],niào:["脲"],shuí:["脽"],guò:["腂","過","鐹"],"là xī":["腊"],"yān ā":["腌"],"gāo gào":["膏"],"lù biāo":["膔"],chuái:["膗"],"zhuān chuán chún zhuǎn":["膞"],chuài:["膪","踹"],"fán pán":["膰"],"wǔ hū":["膴"],"shān dàn":["膻"],tún:["臀","臋","蛌","豘","豚","軘","霕","飩","饨","魨","鲀","黗"],"bì bei":["臂"],"là gé":["臈"],"sào sāo":["臊"],nào:["臑","閙","闹","鬧"],"ní luán":["臡"],"qiān xián":["臤"],"guàng jiǒng":["臦"],"guǎng jiǒng":["臩"],"chòu xiù":["臭"],"mián biān":["臱"],"dié zhí":["臷"],"zhī jìn":["臸"],"shè shě":["舍"],pù:["舖","舗"],"bān bō pán":["般"],kuā:["舿"],"gèn gěn":["艮"],"sè shǎi":["色"],"fú bó":["艴"],"jiāo qiú":["艽"],"chāi chā":["芆"],"sháo què":["芍"],"hù xià":["芐"],"zì zǐ":["芓"],"huì hū":["芔"],"tún chūn":["芚"],"jiè gài":["芥"],"xù zhù":["芧"],"yuán yán":["芫"],"xīn xìn":["芯"],"lún huā":["芲"],"wù hū":["芴"],"gōu gǒu":["芶"],"mào máo":["芼"],"fèi fú":["芾"],"chán yín":["苂"],qiē:["苆"],"sū sù":["苏"],"tiáo sháo":["苕"],"lì jī":["苙"],"kē hē":["苛"],"jù qǔ":["苣"],"ruò rě":["若"],"zhù níng":["苧"],"pā bó":["苩"],xiú:["苬"],"zhǎ zuó":["苲"],"jū chá":["苴"],nié:["苶"],"shēng ruí":["苼"],"qié jiā":["茄"],"zǐ cí":["茈"],"qiàn xī":["茜"],chǎi:["茝"],"fá pèi":["茷"],ráo:["荛","蕘","襓","饒","饶"],"yíng xíng":["荥"],"qián xún":["荨","蕁"],"yìn yīn":["荫"],"hé hè":["荷"],"shā suō":["莎"],"péng fēng":["莑"],"shēn xīn":["莘"],"wǎn guān guǎn":["莞"],"yóu sù":["莤"],"shāo xiāo":["莦","蛸"],"làng liáng":["莨"],"piǎo fú":["莩"],"wèn wǎn miǎn":["莬"],"shì shí":["莳","蒔"],"tù tú":["莵"],"xiān liǎn":["莶","薟"],"wǎn yù":["菀"],"zōu chù":["菆"],"lù lǜ":["菉"],"jūn jùn":["菌"],"niè rěn":["菍"],"zī zì zāi":["菑"],"tú tù":["菟"],"jiē shà":["菨"],"qiáo zhǎo":["菬"],"tái zhī chí":["菭"],"fēi fěi":["菲","蜚"],"qín qīn jīn":["菳"],"zū jù":["菹","蒩"],"lǐn má":["菻"],"tián tiàn":["菾"],tiē:["萜","貼","贴"],"luò là lào luō":["落"],"zhù zhuó zhe":["著"],"shèn rèn":["葚"],"gě gé":["葛"],"jùn suǒ":["葰"],"kuì kuài":["蒉"],"rú ná":["蒘"],"méng mēng měng":["蒙"],"yuán huán":["蒝"],"xú shú":["蒣"],"xí xì":["蒵"],"mì míng":["蓂"],"sōu sǒu":["蓃"],"gài gě hé hài":["蓋"],"yǎo zhuó":["蓔"],"diào tiáo dí":["蓧"],"xū qiū fū":["蓲"],"zí jú":["蓻"],"liǎo lù":["蓼"],xu:["蓿"],"hàn hǎn":["蔊"],"màn wàn mán":["蔓"],"pó bò":["蔢"],"fān fán bō":["蕃"],"hóng hòng":["蕻"],"yù ào":["薁","隩"],"xí xiào":["薂"],"báo bó bò":["薄"],"cí zī":["薋"],"wàn luàn":["薍"],"kǎo hāo":["薧"],"yuǎn wěi":["薳"],"zhòu chóu":["薵"],"wō mái":["薶"],"xiāo hào":["藃"],"yù xù xū":["藇"],"jiè jí":["藉"],"diào zhuó":["藋"],"cáng zàng":["藏"],lǎ:["藞"],"chú zhū":["藸"],"pín píng":["蘋"],"gān hán":["虷"],"hóng jiàng":["虹"],"huī huǐ":["虺"],"xiā há":["虾"],"mǎ mà mā":["蚂"],"fāng bàng":["蚄"],"bàng bèng":["蚌"],"jué quē":["蚗"],"qín qián":["蚙"],"gōng zhōng":["蚣"],"fǔ fù":["蚥"],"dài dé":["蚮"],"gǒu qú xù":["蚼"],"bǒ pí":["蚾"],"shé yí":["蛇"],tiě:["蛈","鉄","銕","鐡","鐵","铁","驖"],"gé luò":["蛒"],"máng bàng":["蛖"],"yì xǔ":["蛡"],"há gé":["蛤"],"qiè ní":["蛪"],"é yǐ":["蛾"],"zhē zhé":["蜇"],"là zhà":["蜡"],suò:["蜶","逤"],"yóu qiú":["蝤"],"xiā hā":["蝦"],"xī qī":["螇"],"bī pí":["螕"],"nài něng":["螚"],"hé xiá":["螛"],"guì huǐ":["螝"],"mǎ mā mà":["螞"],"shì zhē":["螫"],"zhì dié":["螲"],"jiàn chán":["螹"],"ma má mò":["蟆"],"mǎng měng":["蟒"],"biē bié":["蟞"],"bēn fèi":["蟦"],"láo liáo":["蟧"],"yín xún":["蟫"],"lí lǐ":["蠡"],"xuè xiě":["血"],"xíng háng hàng héng":["行"],"shuāi cuī":["衰"],"tuó tuō":["袉"],"lǐng líng":["袊"],"bào páo pào":["袌"],"jù jiē":["袓"],"hè kè":["袔"],"yí yì":["袘","貤"],"nà jué":["袦"],"bèi pī":["被"],"chǐ nuǒ":["袲"],"chǐ qǐ duǒ nuǒ":["袳"],"jiá qiā jié":["袷"],"bó mò":["袹"],"guī guà":["袿"],"liè liě":["裂"],"chéng chěng":["裎"],"jiē gé":["裓"],"dāo chóu":["裯"],"shang cháng":["裳"],"yuān gǔn":["裷"],"yǎn ān":["裺"],"tì xī":["裼"],"fù fú":["褔"],"chǔ zhǔ":["褚"],"tuì tùn":["褪"],lǎi:["襰"],"yào yāo":["要"],"qín tán":["覃"],"jiàn xiàn":["見","见"],piǎn:["覑","諞","谝","貵","𡎚"],"piē miè":["覕"],"yíng yǐng":["覮"],"qù qū":["覰","覷","觑"],"jiàn biǎn":["覵"],"luó luǎn":["覶"],"zī zuǐ":["觜"],"huà xiè":["觟"],"jiě jiè xiè":["解","觧"],"xué hù":["觷"],"lì lù":["觻"],tǎo:["討","讨"],zhùn:["訰"],"zī zǐ":["訾"],"yí dài":["詒","诒"],xiòng:["詗","诇"],"diào tiǎo":["誂"],"yí chǐ chì":["誃"],"lǎng làng":["誏"],"ēi éi ěi èi xī":["誒","诶"],shuà:["誜"],"yǔ yù":["語","语","雨"],"shuō shuì yuè":["說","说"],"shuí shéi":["誰","谁"],"qū juè":["誳"],"chī lài":["誺"],"nì ná":["誽"],"diào tiáo":["調"],"pǐ bēi":["諀"],"jì jī":["諅"],"zé zuò zhǎ cuò":["諎"],"chù jí":["諔"],"háo xià":["諕"],"lùn lún":["論","论"],"shì dì":["諟"],"huà guā":["諣"],"xǐ shāi āi":["諰"],"nán nàn":["諵","難"],miù:["謬","谬"],zèn:["譖","谮"],"shí zhì":["識","识"],"juàn xuān":["讂"],"yí tuī":["讉"],zhán:["讝"],"xǔ hǔ":["许"],"xiáng yáng":["详"],"tiáo diào zhōu":["调"],"chén shèn":["谌"],"mí mèi":["谜"],"màn mán":["谩"],"gǔ yù":["谷"],"huō huò huá":["豁"],"zhì zhài":["豸"],"huān huán":["貆"],"kěn kūn":["貇"],"mò hé":["貈"],"mò hé háo":["貉"],"jù lóu":["貗"],"zé zhài":["責","责"],"dài tè":["貸"],"bì bēn":["賁"],"jiǎ gǔ jià":["賈"],"xiōng mín":["賯"],càng:["賶"],"zhuàn zuàn":["賺","赚"],"wàn zhuàn":["贃"],"gàn gòng zhuàng":["贛"],"yuán yùn":["贠"],"bēn bì":["贲"],"jiǎ gǔ":["贾"],zǒu:["走","赱","鯐"],"dié tú":["趃"],"jū qiè":["趄"],"qū cù":["趋","趨"],"jí jié":["趌"],"guā huó":["趏"],"què qì jí":["趞"],"tàng tāng":["趟"],"chuō zhuó":["趠"],"qù cù":["趣"],"yuè tì":["趯"],"bō bào":["趵"],"kuà wù":["趶"],"guì jué":["趹"],"fāng fàng páng":["趽"],"páo bà":["跁"],"qí qǐ":["跂"],"jiàn chén":["跈"],"pǎo páo":["跑"],"diǎn diē tiē":["跕"],"jū jù qiè":["跙"],bǒ:["跛"],"luò lì":["跞"],"dài duò duō chí":["跢"],zhuǎi:["跩"],"bèng pián":["跰"],"tiào táo":["跳"],"shū chōu":["跾"],"liàng liáng":["踉"],"tà tā":["踏"],chǎ:["蹅","鑔","镲"],"dí zhí":["蹢"],"dēng dèng":["蹬","鐙","镫"],cèng:["蹭"],"dūn cún":["蹲"],"juě jué":["蹶"],liāo:["蹽"],"xiè sǎ":["躠"],tǐ:["躰","軆","骵"],"yà zhá gá":["轧","軋"],"xìn xiàn":["軐"],"fàn guǐ":["軓"],"zhuàn zhuǎn":["転"],"zhóu zhòu":["軸","轴"],bú:["轐","醭","鳪"],"zhuǎn zhuàn zhuǎi":["转"],"zǎi zài":["载"],"niǎn zhǎn":["辗"],"biān bian":["边"],"dào biān":["辺"],"yǐ yí":["迆","迤","迱"],"guò guo guō":["过"],"wàng kuāng":["迋"],"hái huán":["还"],"zhè zhèi":["这"],"yuǎn yuàn":["远"],"zhì lì":["迣"],"zhù wǎng":["迬"],"zhuī duī":["追"],"shì kuò":["适"],tòu:["透"],"tōng tòng":["通"],guàng:["逛"],"dǎi dài":["逮"],"suì suí":["遂"],"tí dì":["遆"],"yí wèi":["遗"],"shì dí zhé":["適"],cà:["遪"],"huán hái":["還"],"lí chí":["邌"],"kàng háng":["邟"],"nà nèi nā":["那"],"xié yá yé yú xú":["邪"],"gāi hái":["郂"],"huán xún":["郇"],"chī xī":["郗"],hǎo:["郝"],"lì zhí":["郦"],"xiáo ǎo":["郩"],"dōu dū":["都"],liǎo:["曢","鄝","镽"],"zàn cuán cuó":["酂","酇"],"dīng dǐng":["酊"],"cù zuò":["酢"],"fā pō":["酦"],"shāi shī":["酾"],niàng:["酿","醸"],"qiú chōu":["醔"],"pō fā":["醗","醱"],"chǎn chěn":["醦"],"yàn liǎn xiān":["醶"],"niàng niáng":["釀"],"lǐ li":["里"],"lí xǐ xī":["釐"],"liǎo liào":["釕"],"dīng dìng":["釘","钉"],"qiǎo jiǎo":["釥"],"yú huá":["釪"],"huá wū":["釫"],"rì rèn jiàn":["釰","釼"],"dì dài":["釱"],"pī zhāo":["釽"],"yá yé":["釾"],"bǎ pá":["鈀","钯"],"tā tuó":["鉈","铊"],běi:["鉳"],"bǐng píng":["鉼"],"hā kē":["鉿","铪"],chòng:["銃","铳"],"xiǎng jiōng":["銄"],"yù sì":["銉"],"xù huì":["銊"],"rén rěn":["銋"],"shàn shuò":["銏"],"chì lì":["銐"],"xiǎn xǐ":["銑","铣"],"hóu xiàng":["銗"],"diào tiáo yáo":["銚"],"xiān kuò tiǎn guā":["銛","銽","铦"],"zhé niè":["銸"],"zhōng yōng":["銿"],"tōu tù dòu":["鋀"],"méi méng":["鋂"],"wàn jiǎn":["鋄","鎫"],"tǐng dìng":["鋌","铤"],"juān jiān cuān":["鋑"],"sī tuó":["鋖"],"juān xuān juàn":["鋗"],"wú huá wū":["鋘"],"zhuó chuò":["鋜"],"xíng xìng jīng":["鋞"],"jū jú":["鋦","锔"],"zuì niè":["鋷"],"yuān yuǎn wǎn wān":["鋺"],"gāng gàng":["鋼","钢"],zhuī:["錐","锥","騅","骓","鵻"],ā:["錒","锕"],"cuō chā":["鎈"],"suǒ sè":["鎍"],"yáo zú":["鎐"],"yè tà gé":["鎑"],"qiāng chēng":["鎗"],"gé lì":["鎘","镉","鬲"],"bī pī bì":["鎞"],"gǎo hào":["鎬"],"zú chuò":["鏃"],"xiū xiù":["鏅"],"shòu sōu":["鏉"],"dí dī":["鏑","镝"],"qiāo sǎn càn":["鏒"],"lù áo":["鏕"],"tāng táng":["鏜"],"jiàn zàn":["鏩"],"huì suì ruì":["鏸"],"qiǎng qiāng":["鏹","镪"],"sǎn xiàn sà":["鏾"],"jiǎn jiàn":["鐧","锏"],"dāng chēng":["鐺","铛"],"zuān zuàn":["鑽"],"sà xì":["钑"],"yào yuè":["钥"],"tǒu dǒu":["钭"],"zuàn zuān":["钻"],"qiān yán":["铅"],"pí pī":["铍"],"yáo diào tiáo":["铫"],"tāng tàng":["铴"],"pù pū":["铺"],"tán xiān":["锬"],"liù liú":["镏"],"hào gǎo":["镐"],"táng tāng":["镗"],"tán chán xín":["镡"],"huò shǎn":["閄"],"hàn bì":["閈","闬"],"kāng kàng":["閌","闶"],"xián jiàn jiān jiǎn":["閒"],"xiā xiǎ":["閕"],"xiǎ kě":["閜"],"biàn guān":["閞"],"hé gé":["閤","颌"],"hòng xiàng":["閧"],"sē xī":["閪"],"tíng tǐng":["閮"],"è yān":["閼","阏"],"hòng juǎn xiàng":["闂"],"bǎn pàn":["闆"],"dū shé":["闍","阇"],"què quē":["闕"],"tāng táng chāng":["闛"],"kàn hǎn":["闞","阚"],"xì sè tà":["闟"],"mēn mèn":["闷"],"quē què":["阙"],"yán diàn":["阽"],"ā ē":["阿"],"bēi pō pí":["陂"],"yàn yǎn":["隁"],"yú yáo shù":["隃"],"lóng lōng":["隆"],"duì zhuì":["隊"],"suí duò":["隋"],"gāi qí ái":["隑"],"huī duò":["隓","隳"],"wěi kuí":["隗"],"lì dài":["隸"],"zhuī cuī wéi":["隹"],"hè hú":["隺","鶮"],"jùn juàn":["隽","雋"],"nán nàn nuó":["难"],"què qiāo qiǎo":["雀"],"guàn huán":["雚"],"guī xī":["雟"],"sè xí":["雭"],án:["雸"],"wù méng":["雺"],tèng:["霯"],"lù lòu":["露"],mái:["霾"],"jìng liàng":["靚"],"gé jí":["革"],bǎ:["靶"],"yāng yàng":["鞅"],"gé tà sǎ":["鞈"],"biān yìng":["鞕"],"qiào shāo":["鞘"],"juān xuān":["鞙"],"shàng zhǎng":["鞝"],"pí bǐng bì bēi":["鞞"],la:["鞡"],"xiè dié":["鞢"],ēng:["鞥"],"móu mù":["鞪"],"bì bǐng":["鞸"],"mèi wà":["韎"],rǒu:["韖"],"shè xiè":["韘"],"yùn wēn":["韫"],"dùn dú":["頓","顿"],duǐ:["頧"],luō:["頱"],"bīn pín":["頻"],yóng:["顒","颙","鰫"],mān:["顢","颟"],"jǐng gěng":["颈"],"jié xié jiá":["颉"],"kē ké":["颏"],"pín bīn":["频"],"chàn zhàn":["颤"],"fēng fěng":["風","风"],"biāo diū":["颩"],"bá fú":["颰"],"sāo sōu":["颾"],"liù liáo":["飂"],"shí sì yì":["食"],"yǎng juàn":["飬"],"zhù tǒu":["飳"],"yí sì":["飴"],"zuò zé zhā":["飵"],tiè:["飻","餮"],"xiǎng náng":["饟"],"táng xíng":["饧"],"gē le":["饹"],"chā zha":["馇"],"náng nǎng":["馕"],"yūn wò":["馧"],"zhī shì":["馶"],"xìn jìn":["馸"],"kuài jué":["駃"],zǎng:["駔","驵"],"tái dài":["駘"],"xún xuān":["駨"],"liáng láng":["駺"],piàn:["騗","騙","骗","魸"],"dài tái":["骀"],"sāo sǎo":["骚"],"gǔ gū":["骨"],"bèi mó":["骳"],"xiāo qiāo":["骹"],"bǎng pǎng":["髈"],"bó jué":["髉"],"bì pǒ":["髲"],"máo méng":["髳"],"kuò yuè":["髺"],"bā bà":["魞","鲃"],"jì cǐ":["鮆"],"bó bà":["鮊"],"zhǎ zhà":["鮓","鲊"],"chóu dài":["鮘"],"luò gé":["鮥"],"guī xié wā kuí":["鮭"],"xiān xiǎn":["鮮","鲜"],"pū bū":["鯆"],"yì sī":["鯣"],"bà bó":["鲌"],"guī xié":["鲑"],"sāi xǐ":["鳃"],"niǎo diǎo":["鳥"],"diāo zhāo":["鳭"],"gān hàn yàn":["鳱"],"fū guī":["鳺"],"jiān qiān zhān":["鳽"],"hé jiè":["鶡"],"piān biǎn":["鶣"],"chuàn zhì":["鶨"],"cāng qiāng":["鶬"],"sǔn xùn":["鶽"],"biāo páo":["麃"],"zhù cū":["麆"],"jūn qún":["麇","麕"],chi:["麶"],"mó me":["麼"],"mó me ma":["麽"],"mí mǒ":["麿"],"dàn shèn":["黮"],"zhěn yān":["黰"],"dǎn zhǎn":["黵"],"miǎn mǐn měng":["黾"],hōu:["齁"],nàng:["齉"],"qí jì zī zhāi":["齐"],"yín kěn yǎn":["龂"],"yín kěn":["龈"],"gōng wò":["龏"],"guī jūn qiū":["龜","龟"],"kuí wā":["䖯"],lōu:["䁖"],"ōu qū":["𫭟"],"lóu lǘ":["𦝼"],"gǎ gā gá":["嘎"],"wā guà":["坬"],"zhǐ dǐ":["茋"],"gǒng hóng":["硔"],"yáo xiào":["滧"]},wu=new _L;Object.keys(NC).forEach(e=>{const t=NC[e];for(let n of t)wu.set(n,e)});const FC={这个:"zhè ge",成为:"chéng wéi",认为:"rèn wéi",作为:"zuò wéi",部分:"bù fen",要求:"yāo qiú",应该:"yīng gāi",增长:"zēng zhǎng",提供:"tí gōng",觉得:"jué de",任务:"rèn wu",那个:"nà ge",称为:"chēng wéi",为主:"wéi zhǔ",了解:"liǎo jiě",处理:"chǔ lǐ",皇上:"huáng shang",只要:"zhǐ yào",大量:"dà liàng",力量:"lì liàng",几乎:"jī hū",干部:"gàn bù",目的:"mù dì",行为:"xíng wéi",只见:"zhǐ jiàn",认识:"rèn shi",市长:"shì zhǎng",师父:"shī fu",调查:"diào chá",重新:"chóng xīn",分为:"fēn wéi",知识:"zhī shi",导弹:"dǎo dàn",质量:"zhì liàng",行款:"háng kuǎn",行列:"háng liè",行话:"háng huà",行业:"háng yè",隔行:"gé háng",在行:"zài háng",行家:"háng jia",内行:"nèi háng",外行:"wài háng",同行:"tóng háng",本行:"běn háng",行伍:"háng wǔ",洋行:"yáng háng",银行:"yín háng",商行:"shāng háng",支行:"zhī háng",总行:"zǒng háng",行情:"háng qíng",懂行:"dǒng háng",行规:"háng guī",行当:"háng dang",行货:"háng huò",太行:"tài háng",入行:"rù háng",中行:"zhōng háng",农行:"nóng háng",工行:"gōng háng",建行:"jiàn háng",各行:"gè háng",行号:"háng hào",行高:"háng gāo",行首:"háng shǒu",行尾:"háng wěi",行末:"háng mò",行长:"háng zhǎng",行距:"háng jù",换行:"huàn háng",行会:"háng huì",行辈:"háng bèi",行道:"háng dào",道行:"dào heng",参与:"cān yù",充分:"chōng fèn",尽管:"jǐn guǎn",生长:"shēng zhǎng",数量:"shù liàng",应当:"yīng dāng",院长:"yuàn zhǎng",强调:"qiáng diào",只能:"zhǐ néng",音乐:"yīn yuè",以为:"yǐ wéi",处于:"chǔ yú",部长:"bù zhǎng",蒙古:"měng gǔ",只有:"zhǐ yǒu",适当:"shì dàng",只好:"zhǐ hǎo",成长:"chéng zhǎng",高兴:"gāo xìng",不了:"bù liǎo",产量:"chǎn liàng",胖子:"pàng zi",显得:"xiǎn de",只是:"zhǐ shì",似的:"shì de",率领:"shuài lǐng",改为:"gǎi wéi",不禁:"bù jīn",成分:"chéng fèn",答应:"dā ying",少年:"shào nián",兴趣:"xìng qù",太监:"tài jian",休息:"xiū xi",校长:"xiào zhǎng",更新:"gēng xīn",合同:"hé tong",喝道:"hè dào",重庆:"chóng qìng",重建:"chóng jiàn",使得:"shǐ de",审查:"shěn chá",累计:"lěi jì",给予:"jǐ yǔ",极为:"jí wéi",冠军:"guàn jūn",仿佛:"fǎng fú",头发:"tóu fa",投降:"tóu xiáng",家长:"jiā zhǎng",仔细:"zǐ xì",要是:"yào shi",将领:"jiàng lǐng",含量:"hán liàng",更为:"gèng wéi",积累:"jī lěi",地处:"dì chǔ",县长:"xiàn zhǎng",少女:"shào nǚ",路上:"lù shang",只怕:"zhǐ pà",能量:"néng liàng",储量:"chǔ liàng",供应:"gōng yìng",挑战:"tiǎo zhàn",西藏:"xī zàng",记得:"jì de",总量:"zǒng liàng",当真:"dàng zhēn",将士:"jiàng shì",差别:"chā bié",较为:"jiào wéi",长老:"zhǎng lǎo",大夫:"dài fu",差异:"chā yì",懂得:"dǒng de",尽量:"jǐn liàng",模样:"mú yàng",的确:"dí què",为首:"wéi shǒu",便宜:"pián yi",更名:"gēng míng",石头:"shí tou",州长:"zhōu zhǎng",为止:"wéi zhǐ",漂亮:"piào liang",炮弹:"pào dàn",藏族:"zàng zú",角色:"jué sè",当作:"dàng zuò",尽快:"jǐn kuài",人为:"rén wéi",重复:"chóng fù",胡同:"hú tòng",差距:"chā jù",弟兄:"dì xiong",大将:"dà jiàng",睡觉:"shuì jiào",一觉:"yí jiào",团长:"tuán zhǎng",队长:"duì zhǎng",区长:"qū zhǎng",难得:"nán dé",丫头:"yā tou",会长:"huì zhǎng",弟弟:"dì di",王爷:"wáng ye",重量:"zhòng liàng",誉为:"yù wéi",家伙:"jiā huo",华山:"huà shān",椅子:"yǐ zi",流量:"liú liàng",长大:"zhǎng dà",勉强:"miǎn qiǎng",会计:"kuài jì",过分:"guò fèn",济南:"jǐ nán",调动:"diào dòng",燕京:"yān jīng",少将:"shào jiàng",中毒:"zhòng dú",晓得:"xiǎo de",变更:"biàn gēng",打更:"dǎ gēng",认得:"rèn de",苹果:"píng guǒ",念头:"niàn tou",挣扎:"zhēng zhá",三藏:"sān zàng",剥削:"bō xuē",丞相:"chéng xiàng",少量:"shǎo liàng",寻思:"xún si",夺得:"duó dé",干线:"gàn xiàn",呼吁:"hū yù",处罚:"chǔ fá",长官:"zhǎng guān",柏林:"bó lín",亲戚:"qīn qi",身分:"shēn fèn",胳膊:"gē bo",着手:"zhuó shǒu",炸弹:"zhà dàn",咳嗽:"ké sou",叶子:"yè zi",外长:"wài zhǎng",供给:"gōng jǐ",师长:"shī zhǎng",变量:"biàn liàng",应有:"yīng yǒu",下载:"xià zài",乐器:"yuè qì",间接:"jiàn jiē",底下:"dǐ xià",打扮:"dǎ bàn",子弹:"zǐ dàn",弹药:"dàn yào",热量:"rè liàng",削弱:"xuē ruò",骨干:"gǔ gàn",容量:"róng liàng",模糊:"mó hu",转动:"zhuàn dòng",称呼:"chēng hu",科长:"kē zhǎng",处置:"chǔ zhì",着重:"zhuó zhòng",着急:"zháo jí",强迫:"qiǎng pò",庭长:"tíng zhǎng",首相:"shǒu xiàng",喇嘛:"lǎ ma",镇长:"zhèn zhǎng",只管:"zhǐ guǎn",重重:"chóng chóng",免得:"miǎn de",着实:"zhuó shí",度假:"dù jià",真相:"zhēn xiàng",相貌:"xiàng mào",处分:"chǔ fèn",委屈:"wěi qu",为期:"wéi qī",伯伯:"bó bo",伯子:"bǎi zi",圈子:"quān zi",见识:"jiàn shi",笼罩:"lǒng zhào",与会:"yù huì",都督:"dū du",都市:"dū shì",成都:"chéng dū",首都:"shǒu dū",帝都:"dì dū",王都:"wáng dū",东都:"dōng dū",都护:"dū hù",都城:"dū chéng",建都:"jiàn dū",迁都:"qiān dū",故都:"gù dū",定都:"dìng dū",中都:"zhōng dū",六安:"lù ān",宰相:"zǎi xiàng",较量:"jiào liàng",对称:"duì chèn",总长:"zǒng zhǎng",相公:"xiàng gong",空白:"kòng bái",打量:"dǎ liang",水分:"shuǐ fèn",舌头:"shé tou",没收:"mò shōu",行李:"xíng li",判处:"pàn chǔ",散文:"sǎn wén",处境:"chǔ jìng",孙子:"sūn zi",拳头:"quán tou",打发:"dǎ fā",组长:"zǔ zhǎng",骨头:"gǔ tou",宁可:"nìng kě",更换:"gēng huàn",薄弱:"bó ruò",还原:"huán yuán",重修:"chóng xiū",重来:"chóng lái",只顾:"zhǐ gù",爱好:"ài hào",馒头:"mán tou",军长:"jūn zhǎng",首长:"shǒu zhǎng",厂长:"chǎng zhǎng",司长:"sī zhǎng",长子:"zhǎng zǐ",强劲:"qiáng jìng",恰当:"qià dàng",头儿:"tóu er",站长:"zhàn zhǎng",折腾:"zhē teng",相处:"xiāng chǔ",统率:"tǒng shuài",中将:"zhōng jiàng",命中:"mìng zhòng",名将:"míng jiàng",木头:"mù tou",动弹:"dòng tan",地壳:"dì qiào",干活:"gàn huó",少爷:"shào ye",水量:"shuǐ liàng",补给:"bǔ jǐ",尾巴:"wěi ba",来得:"lái de",好奇:"hào qí",钥匙:"yào shi",当做:"dàng zuò",沉着:"chén zhuó",哑巴:"yǎ ba",车子:"chē zi",上将:"shàng jiàng",恶心:"ě xīn",担子:"dàn zi",应届:"yīng jiè",主角:"zhǔ jué",运转:"yùn zhuǎn",兄长:"xiōng zhǎng",格式:"gé shì",正月:"zhēng yuè",营长:"yíng zhǎng",当成:"dàng chéng",女婿:"nǚ xu",咽喉:"yān hóu",重阳:"chóng yáng",化为:"huà wéi",吐蕃:"tǔ bō",钻进:"zuān jìn",乐队:"yuè duì",亮相:"liàng xiàng",被子:"bèi zi",舍得:"shě de",杉木:"shā mù",击中:"jī zhòng",排长:"pái zhǎng",假期:"jià qī",分量:"fèn liàng",数次:"shù cì",提防:"dī fáng",吆喝:"yāo he",查处:"chá chǔ",量子:"liàng zǐ",里头:"lǐ tou",调研:"diào yán",伺候:"cì hou",重申:"chóng shēn",枕头:"zhěn tou",拚命:"pīn mìng",社长:"shè zhǎng",归还:"guī huán",批量:"pī liàng",畜牧:"xù mù",点着:"diǎn zháo",甚为:"shèn wéi",小将:"xiǎo jiàng",着眼:"zhuó yǎn",处死:"chǔ sǐ",厌恶:"yàn wù",鼓乐:"gǔ yuè",树干:"shù gàn",秘鲁:"bì lǔ",大方:"dà fāng",外头:"wài tou",班长:"bān zhǎng",星宿:"xīng xiù",宁愿:"nìng yuàn",钦差:"qīn chāi",为数:"wéi shù",勾当:"gòu dàng",削减:"xuē jiǎn",间谍:"jiàn dié",埋怨:"mán yuàn",结实:"jiē shi",计量:"jì liáng",淹没:"yān mò",村长:"cūn zhǎng",连长:"lián zhǎng",自给:"zì jǐ",武将:"wǔ jiàng",温差:"wēn chā",直奔:"zhí bèn",供求:"gōng qiú",剂量:"jì liàng",道长:"dào zhǎng",泄露:"xiè lòu",王八:"wáng ba",切割:"qiē gē",间隔:"jiàn gé",一晃:"yì huǎng",长假:"cháng jià",令狐:"líng hú",为害:"wéi hài",句子:"jù zi",偿还:"cháng huán",疙瘩:"gē da",燕山:"yān shān",堵塞:"dǔ sè",夺冠:"duó guàn",扎实:"zhā shi",电荷:"diàn hè",看守:"kān shǒu",复辟:"fù bì",郁闷:"yù mèn",尽早:"jǐn zǎo",切断:"qiē duàn",指头:"zhǐ tou",为生:"wéi shēng",畜生:"chù sheng",切除:"qiē chú",着力:"zhuó lì",着想:"zhuó xiǎng",级差:"jí chā",投奔:"tóu bèn",棍子:"gùn zi",含糊:"hán hu",少妇:"shào fù",兴致:"xìng zhì",纳闷:"nà mèn",干流:"gàn liú",卷起:"juǎn qǐ",扇子:"shàn zi",更改:"gēng gǎi",笼络:"lǒng luò",喇叭:"lǎ ba",载荷:"zài hè",妥当:"tuǒ dàng",为难:"wéi nán",着陆:"zhuó lù",燕子:"yàn zi",干吗:"gàn má",白发:"bái fà",总得:"zǒng děi",夹击:"jiā jī",曝光:"bào guāng",曲调:"qǔ diào",相机:"xiàng jī",叫化:"jiào huà",角逐:"jué zhú",啊哟:"ā yō",载重:"zài zhòng",长辈:"zhǎng bèi",出差:"chū chāi",垛口:"duǒ kǒu",撇开:"piē kāi",厅长:"tīng zhǎng",组分:"zǔ fèn",误差:"wù chā",家当:"jiā dàng",传记:"zhuàn jì",个子:"gè zi",铺设:"pū shè",干事:"gàn shì",杆菌:"gǎn jūn",定量:"dìng liàng",运载:"yùn zài",会儿:"huì er",酋长:"qiú zhǎng",重返:"chóng fǎn",差额:"chā é",露面:"lòu miàn",钻研:"zuān yán",大城:"dài chéng",上当:"shàng dàng",销量:"xiāo liàng",作坊:"zuō fang",照相:"zhào xiàng",哎呀:"āi yā",调集:"diào jí",看中:"kàn zhòng",议长:"yì zhǎng",风筝:"fēng zheng",辟邪:"bì xié",空隙:"kòng xì",更迭:"gēng dié",偏差:"piān chā",声调:"shēng diào",适量:"shì liàng",屯子:"tún zi",无量:"wú liàng",空地:"kòng dì",调度:"diào dù",散射:"sǎn shè",创伤:"chuāng shāng",海参:"hǎi shēn",满载:"mǎn zài",重叠:"chóng dié",落差:"luò chā",单调:"dān diào",老将:"lǎo jiàng",人参:"rén shēn",间断:"jiàn duàn",重现:"chóng xiàn",夹杂:"jiā zá",调用:"diào yòng",萝卜:"luó bo",附着:"fù zhuó",应声:"yìng shēng",主将:"zhǔ jiàng",罪过:"zuì guo",咀嚼:"jǔ jué",为政:"wéi zhèng",过量:"guò liàng",乐曲:"yuè qǔ",负荷:"fù hè",枪弹:"qiāng dàn",悄然:"qiǎo rán",处方:"chǔ fāng",悄声:"qiǎo shēng",曲子:"qǔ zi",情调:"qíng diào",挑衅:"tiǎo xìn",代为:"dài wéi",了结:"liǎo jié",打中:"dǎ zhòng",酒吧:"jiǔ bā",懒得:"lǎn de",增量:"zēng liàng",衣着:"yī zhuó",部将:"bù jiàng",要塞:"yào sài",茶几:"chá jī",杠杆:"gàng gǎn",出没:"chū mò",鲜有:"xiǎn yǒu",间隙:"jiàn xì",重担:"zhòng dàn",重演:"chóng yǎn",重试:"chóng shì",应酬:"yìng chou",只当:"zhǐ dāng",毋宁:"wú nìng",包扎:"bāo zā",前头:"qián tou",卷烟:"juǎn yān",非得:"fēi děi",弹道:"dàn dào",杆子:"gān zi",门将:"mén jiàng",后头:"hòu tou",喝彩:"hè cǎi",暖和:"nuǎn huo",累积:"lěi jī",调遣:"diào qiǎn",倔强:"jué jiàng",宝藏:"bǎo zàng",丧事:"sāng shì",约莫:"yuē mo",纤夫:"qiàn fū",更替:"gēng tì",装载:"zhuāng zài",背包:"bēi bāo",帖子:"tiě zi",松散:"sōng sǎn",呼喝:"hū hè",可恶:"kě wù",自转:"zì zhuàn",供电:"gōng diàn",反省:"fǎn xǐng",坦率:"tǎn shuài",苏打:"sū dá",本分:"běn fèn",落得:"luò de",鄙薄:"bǐ bó",相间:"xiāng jiàn",单薄:"dān bó",混蛋:"hún dàn",贞观:"zhēn guān",附和:"fù hè",能耐:"néng nài",吓唬:"xià hu",未了:"wèi liǎo",引着:"yǐn zháo",抽调:"chōu diào",沙子:"shā zi",席卷:"xí juǎn",标的:"biāo dì",别扭:"biè niu",思量:"sī liang",喝采:"hè cǎi",论语:"lún yǔ",盖子:"gài zi",分外:"fèn wài",弄堂:"lòng táng",乐舞:"yuè wǔ",雨量:"yǔ liàng",毛发:"máo fà",差遣:"chāi qiǎn",背负:"bēi fù",转速:"zhuàn sù",声乐:"shēng yuè",夹攻:"jiā gōng",供水:"gōng shuǐ",主干:"zhǔ gàn",惩处:"chéng chǔ",长相:"zhǎng xiàng",公差:"gōng chāi",榴弹:"liú dàn",省得:"shěng de",条子:"tiáo zi",重围:"chóng wéi",阻塞:"zǔ sè",劲风:"jìng fēng",纠葛:"jiū gé",颠簸:"diān bǒ",点中:"diǎn zhòng",重创:"zhòng chuāng",姥姥:"lǎo lao",迷糊:"mí hu",公家:"gōng jia",几率:"jī lǜ",苦闷:"kǔ mèn",度量:"dù liàng",差错:"chā cuò",暑假:"shǔ jià",参差:"cēn cī",搭载:"dā zài",助长:"zhù zhǎng",相称:"xiāng chèn",红晕:"hóng yùn",舍命:"shě mìng",喜好:"xǐ hào",列传:"liè zhuàn",劲敌:"jìng dí",蛤蟆:"há ma",请假:"qǐng jià",钉子:"dīng zi",沉没:"chén mò",高丽:"gāo lí",休假:"xiū jià",无为:"wú wéi",巴结:"bā jie",了得:"liǎo dé",变相:"biàn xiàng",核弹:"hé dàn",亲家:"qìng jia",承载:"chéng zài",喝问:"hè wèn",还击:"huán jī",交还:"jiāo huán",将令:"jiàng lìng",单于:"chán yú",空缺:"kòng quē",绿林:"lù lín",胆量:"dǎn liàng",执着:"zhí zhuó",低调:"dī diào",闭塞:"bì sè",轻薄:"qīng bó",得当:"dé dàng",占卜:"zhān bǔ",扫帚:"sào zhou",龟兹:"qiū cí",年长:"nián zhǎng",外传:"wài zhuàn",头子:"tóu zi",裁缝:"cái feng",礼乐:"lǐ yuè",血泊:"xuè pō",散乱:"sǎn luàn",动量:"dòng liàng",倒腾:"dǎo teng",取舍:"qǔ shě",咱家:"zán jiā",长发:"cháng fà",爪哇:"zhǎo wā",弹壳:"dàn ké",省悟:"xǐng wù",嚷嚷:"rāng rang",连累:"lián lèi",应得:"yīng dé",族长:"zú zhǎng",柜子:"guì zi",擂鼓:"léi gǔ",眩晕:"xuàn yùn",调配:"tiáo pèi",躯干:"qū gàn",差役:"chāi yì",坎坷:"kǎn kě",少儿:"shào ér",乐团:"yuè tuán",养分:"yǎng fèn",退还:"tuì huán",格调:"gé diào",语调:"yǔ diào",音调:"yīn diào",乐府:"yuè fǔ",古朴:"gǔ pǔ",打点:"dǎ diǎn",差使:"chāi shǐ",匀称:"yún chèn",瘦削:"shòu xuē",膏药:"gāo yao",吞没:"tūn mò",调任:"diào rèn",散居:"sǎn jū",上头:"shàng tóu",风靡:"fēng mǐ",放假:"fàng jià",估量:"gū liang",失当:"shī dàng",中弹:"zhòng dàn",妄为:"wàng wéi",长者:"zhǎng zhě",起哄:"qǐ hòng",末了:"mò liǎo",相声:"xiàng sheng",校正:"jiào zhèng",劝降:"quàn xiáng",矢量:"shǐ liàng",沉闷:"chén mèn",给与:"jǐ yǔ",解法:"jiě fǎ",塞外:"sài wài",将校:"jiàng xiào",嗜好:"shì hào",没落:"mò luò",朴刀:"pō dāo",片子:"piān zi",切削:"qiē xiāo",弹丸:"dàn wán",稀薄:"xī bó",亏得:"kuī dé",间歇:"jiàn xiē",翘首:"qiáo shǒu",色调:"sè diào",处决:"chǔ jué",表率:"biǎo shuài",尺子:"chǐ zi",招降:"zhāo xiáng",称职:"chèn zhí",斗篷:"dǒu peng",铺子:"pù zi",底子:"dǐ zi",负载:"fù zài",干警:"gàn jǐng",倒数:"dào shǔ",将官:"jiàng guān",锄头:"chú tou",归降:"guī xiáng",疟疾:"nüè ji",唠叨:"láo dao",限量:"xiàn liàng",屏息:"bǐng xī",重逢:"chóng féng",器乐:"qì yuè",氢弹:"qīng dàn",脖颈:"bó gěng",妃子:"fēi zi",处事:"chǔ shì",参量:"cān liàng",轻率:"qīng shuài",缥缈:"piāo miǎo",中奖:"zhòng jiǎng",才干:"cái gàn",施舍:"shī shě",卷子:"juàn zi",游说:"yóu shuì",巷子:"xiàng zi",膀胱:"páng guāng",切勿:"qiè wù",看管:"kān guǎn",风头:"fēng tou",精干:"jīng gàn",高差:"gāo chā",恐吓:"kǒng hè",扁担:"biǎn dàn",给养:"jǐ yǎng",格子:"gé zi",供需:"gōng xū",反差:"fǎn chā",飞弹:"fēi dàn",微薄:"wēi bó",发型:"fà xíng",即兴:"jí xìng",攒动:"cuán dòng",间或:"jiàn huò",浅薄:"qiǎn bó",乐章:"yuè zhāng",顺差:"shùn chā",调子:"diào zi",相位:"xiàng wèi",转子:"zhuàn zǐ",劲旅:"jìng lǚ",咔嚓:"kā chā",了事:"liǎo shì",转悠:"zhuàn you",当铺:"dàng pù",爪子:"zhuǎ zi",单子:"dān zi",好战:"hào zhàn",燕麦:"yàn mài",只许:"zhǐ xǔ",干练:"gàn liàn",女将:"nǚ jiàng",酒量:"jiǔ liàng",划船:"huá chuán",伎俩:"jì liǎng",挑拨:"tiǎo bō",少校:"shào xiào",着落:"zhuó luò",憎恶:"zēng wù",刻薄:"kè bó",要挟:"yāo xié",用处:"yòng chu",还手:"huán shǒu",模具:"mú jù",执著:"zhí zhuó",喝令:"hè lìng",保长:"bǎo zhǎng",吸着:"xī zhe",症结:"zhēng jié",公转:"gōng zhuàn",校勘:"jiào kān",重提:"chóng tí",扫兴:"sǎo xìng",铺盖:"pū gài",长史:"zhǎng shǐ",差价:"chā jià",压根:"yà gēn",怔住:"zhèng zhù",应允:"yīng yǔn",切入:"qiē rù",战将:"zhàn jiàng",年少:"nián shào",舍身:"shě shēn",执拗:"zhí niù",处世:"chǔ shì",中风:"zhòng fēng",等量:"děng liàng",放量:"fàng liàng",腔调:"qiāng diào",老少:"lǎo shào",没入:"mò rù",瓜葛:"guā gé",将帅:"jiàng shuài",车载:"chē zài",窝囊:"wō nang",长进:"zhǎng jìn",可汗:"kè hán",并州:"bīng zhōu",供销:"gōng xiāo",切片:"qiē piàn",差事:"chāi shì",知会:"zhī hui",鹰爪:"yīng zhǎo",处女:"chǔ nǚ",切磋:"qiē cuō",日头:"rì tou",押解:"yā jiè",滋长:"zī zhǎng",道观:"dào guàn",脚色:"jué sè",当量:"dāng liàng",婆家:"pó jia",缘分:"yuán fèn",空闲:"kòng xián",好色:"hào sè",怒喝:"nù hè",笼统:"lǒng tǒng",边塞:"biān sài",何曾:"hé céng",重合:"chóng hé",零散:"líng sǎn",轰隆:"hōng lōng",化子:"huà zi",内蒙:"nèi měng",数落:"shǔ luò",逆差:"nì chā",牟利:"móu lì",栅栏:"zhà lan",中标:"zhòng biāo",调档:"diào dàng",佝偻:"gōu lóu",场子:"chǎng zi",甲壳:"jiǎ qiào",重温:"chóng wēn",炮制:"páo zhì",返还:"fǎn huán",自传:"zì zhuàn",高调:"gāo diào",殷红:"yān hóng",固着:"gù zhuó",强求:"qiǎng qiú",本相:"běn xiàng",骄横:"jiāo hèng",草率:"cǎo shuài",气闷:"qì mèn",着色:"zhuó sè",宁肯:"nìng kěn",兴头:"xìng tou",拘泥:"jū nì",夹角:"jiā jiǎo",发髻:"fà jì",猛将:"měng jiàng",约摸:"yuē mo",拖累:"tuō lěi",呢绒:"ní róng",钻探:"zuān tàn",夹层:"jiā céng",落魄:"luò pò",巷道:"hàng dào",运量:"yùn liàng",解闷:"jiě mèn",空儿:"kòng er",估摸:"gū mo",好客:"hào kè",钻孔:"zuān kǒng",糊弄:"hù nòng",荥阳:"xíng yáng",烦闷:"fán mèn",仓卒:"cāng cù",分叉:"fēn chà",厂子:"chǎng zi",小调:"xiǎo diào",少阳:"shào yáng",受降:"shòu xiáng",染坊:"rǎn fáng",胳臂:"gē bei",将门:"jiàng mén",模板:"mú bǎn",配给:"pèi jǐ",为伍:"wéi wǔ",跟头:"gēn tou",划算:"huá suàn",累赘:"léi zhui",哄笑:"hōng xiào",晕眩:"yūn xuàn",干掉:"gàn diào",缝制:"féng zhì",难处:"nán chù",着意:"zhuó yì",蛮横:"mán hèng",奇数:"jī shù",短发:"duǎn fà",生还:"shēng huán",还清:"huán qīng",看护:"kān hù",直率:"zhí shuài",奏乐:"zòu yuè",载客:"zài kè",专横:"zhuān hèng",湮没:"yān mò",空格:"kòng gé",铺垫:"pū diàn",良将:"liáng jiàng",哗啦:"huā lā",散漫:"sǎn màn",脱发:"tuō fà",送还:"sòng huán",埋没:"mái mò",累及:"lěi jí",薄雾:"bó wù",调离:"diào lí",舌苔:"shé tāi",机长:"jī zhǎng",栓塞:"shuān sè",配角:"pèi jué",切口:"qiē kǒu",创口:"chuāng kǒu",哈欠:"hā qian",实弹:"shí dàn",铺平:"pū píng",哈达:"hǎ dá",懒散:"lǎn sǎn",实干:"shí gàn",填空:"tián kòng",刁钻:"diāo zuān",乐师:"yuè shī",量变:"liàng biàn",诱降:"yòu xiáng",搪塞:"táng sè",征调:"zhēng diào",夹道:"jiā dào",干咳:"gān ké",止咳:"zhǐ ké",乐工:"yuè gōng",划过:"huá guò",着火:"zháo huǒ",更正:"gēng zhèng",给付:"jǐ fù",空子:"kòng zi",哪吒:"né zhā",正着:"zhèng zháo",刷子:"shuā zi",丧葬:"sāng zàng",夹带:"jiā dài",安分:"ān fèn",中意:"zhòng yì",长孙:"zhǎng sūn",校订:"jiào dìng",卷曲:"juǎn qū",载运:"zài yùn",投弹:"tóu dàn",柞蚕:"zuò cán",份量:"fèn liàng",调换:"diào huàn",了然:"liǎo rán",咧嘴:"liě zuǐ",典当:"diǎn dàng",寒假:"hán jià",长兄:"zhǎng xiōng",给水:"jǐ shuǐ",须发:"xū fà",枝干:"zhī gàn",属相:"shǔ xiàng",哄抢:"hōng qiǎng",刻划:"kè huà",塞子:"sāi zi",单干:"dān gàn",还乡:"huán xiāng",兆头:"zhào tou",寺观:"sì guàn",督率:"dū shuài",啊哈:"ā ha",割舍:"gē shě",抹布:"mā bù",好恶:"hào wù",下处:"xià chǔ",消长:"xiāo zhǎng",离间:"lí jiàn",准头:"zhǔn tou",校对:"jiào duì",什物:"shí wù",番禺:"pān yú",佛爷:"fó ye",吗啡:"mǎ fēi",盐分:"yán fèn",虎将:"hǔ jiàng",薄荷:"bò he",独处:"dú chǔ",空位:"kòng wèi",铺路:"pū lù",乌拉:"wū lā",调回:"diào huí",来头:"lái tou",闲散:"xián sǎn",胶卷:"jiāo juǎn",冒失:"mào shi",干劲:"gàn jìn",弦乐:"xián yuè",相国:"xiàng guó",丹参:"dān shēn",助兴:"zhù xìng",铺开:"pū kāi",次长:"cì zhǎng",发卡:"fà qiǎ",拮据:"jié jū",刹车:"shā chē",生发:"shēng fà",重播:"chóng bō",缝合:"féng hé",音量:"yīn liàng",少尉:"shào wèi",冲压:"chòng yā",苍劲:"cāng jìng",厚薄:"hòu báo",威吓:"wēi hè",外相:"wài xiàng",呼号:"hū háo",着迷:"zháo mí",挑担:"tiāo dàn",纹路:"wén lù",还俗:"huán sú",强横:"qiáng hèng",着数:"zhāo shù",降顺:"xiáng shùn",挑明:"tiǎo míng",眯缝:"mī feng",分内:"fèn nèi",更衣:"gēng yī",软和:"ruǎn huo",尽兴:"jìn xìng",号子:"hào zi",爪牙:"zhǎo yá",败将:"bài jiàng",猜中:"cāi zhòng",结扎:"jié zā",没空:"méi kòng",夹缝:"jiā fèng",拾掇:"shí duo",掺和:"chān huo",簸箕:"bò ji",电量:"diàn liàng",荷载:"hè zǎi",调式:"diào shì",处身:"chǔ shēn",打手:"dǎ shǒu",弹弓:"dàn gōng",横蛮:"hèng mán",能干:"néng gàn",校点:"jiào diǎn",加载:"jiā zài",干校:"gàn xiào",哄传:"hōng chuán",校注:"jiào zhù",淤塞:"yū sè",马扎:"mǎ zhá",月氏:"yuè zhī",高干:"gāo gàn",经传:"jīng zhuàn",曾孙:"zēng sūn",好斗:"hào dòu",关卡:"guān qiǎ",逃奔:"táo bèn",磨蹭:"mó ceng",牟取:"móu qǔ",颤栗:"zhàn lì",蚂蚱:"mà zha",撮合:"cuō he",趔趄:"liè qie",摔打:"shuāi dǎ",台子:"tái zi",分得:"fēn de",粘着:"nián zhuó",采邑:"cài yì",散装:"sǎn zhuāng",婀娜:"ē nuó",兴味:"xìng wèi",行头:"xíng tou",气量:"qì liàng",调运:"diào yùn",处治:"chǔ zhì",乐音:"yuè yīn",充塞:"chōng sè",恫吓:"dòng hè",论调:"lùn diào",相中:"xiāng zhòng",民乐:"mín yuè",炮仗:"pào zhang",丧服:"sāng fú",骁将:"xiāo jiàng",量刑:"liàng xíng",缝补:"féng bǔ",财会:"cái kuài",大干:"dà gàn",历数:"lì shǔ",校场:"jiào chǎng",塞北:"sài běi",识相:"shí xiàng",辱没:"rǔ mò",鲜亮:"xiān liàng",语塞:"yǔ sè",露脸:"lòu liǎn",凉快:"liáng kuai",腰杆:"yāo gǎn",溜达:"liū da",嘎嘎:"gā gā",公干:"gōng gàn",桔梗:"jié gěng",挑逗:"tiǎo dòu",看门:"kān mén",乐歌:"yuè gē",拓片:"tà piàn",挑动:"tiǎo dòng",准将:"zhǔn jiàng",遒劲:"qiú jìng",磨坊:"mò fáng",逶迤:"wēi yí",搅和:"jiǎo huo",摩挲:"mó suō",作弄:"zuò nòng",苗头:"miáo tou",打颤:"dǎ zhàn",大藏:"dà zàng",畜牲:"chù shēng",勾搭:"gōu da",树荫:"shù yīn",树杈:"shù chà",铁杆:"tiě gǎn",将相:"jiàng xiàng",份子:"fèn zi",视差:"shì chā",绿荫:"lǜ yīn",枪杆:"qiāng gǎn",缝纫:"féng rèn",愁闷:"chóu mèn",点将:"diǎn jiàng",华佗:"huà tuó",劲射:"jìng shè",箱笼:"xiāng lǒng",终了:"zhōng liǎo",鬓发:"bìn fà",结巴:"jiē ba",苦干:"kǔ gàn",看家:"kān jiā",正旦:"zhēng dàn",中肯:"zhòng kěn",厦门:"xià mén",东莞:"dōng guǎn",食量:"shí liàng",宫调:"gōng diào",间作:"jiàn zuò",弹片:"dàn piàn",差池:"chā chí",漂白:"piǎo bái",杠子:"gàng zi",调处:"tiáo chǔ",好动:"hào dòng",转炉:"zhuàn lú",屏气:"bǐng qì",夹板:"jiā bǎn",哀乐:"āi yuè",干道:"gàn dào",苦处:"kǔ chù",劈柴:"pǐ chái",长势:"zhǎng shì",天华:"tiān huá",共处:"gòng chǔ",校验:"jiào yàn",出塞:"chū sài",磨盘:"mò pán",萎靡:"wěi mǐ",奔丧:"bēn sāng",唱和:"chàng hè",大调:"dà diào",非分:"fēi fèn",钻营:"zuān yíng",夹子:"jiā zi",超载:"chāo zài",更始:"gēng shǐ",铃铛:"líng dang",披散:"pī sàn",发还:"fā huán",转轮:"zhuàn lún",横财:"hèng cái",泡桐:"pāo tóng",抛撒:"pāo sǎ",天呀:"tiān yā",糊糊:"hū hu",躯壳:"qū qiào",通量:"tōng liàng",奉还:"fèng huán",午觉:"wǔ jiào",闷棍:"mèn gùn",浪头:"làng tou",砚台:"yàn tái",油坊:"yóu fáng",学长:"xué zhǎng",过载:"guò zài",笔调:"bǐ diào",衣被:"yī bèi",畜产:"xù chǎn",调阅:"diào yuè",蛮干:"mán gàn",曾祖:"zēng zǔ",提干:"tí gàn",变调:"biàn diào",覆没:"fù mò",模子:"mú zi",乐律:"yuè lǜ",称心:"chèn xīn",木杆:"mù gān",重印:"chóng yìn",自省:"zì xǐng",提调:"tí diào",看相:"kàn xiàng",芋头:"yù tou",下切:"xià qiē",塞上:"sài shàng",铺张:"pū zhāng",藤蔓:"téng wàn",薄幸:"bó xìng",解数:"xiè shù",褪去:"tuì qù",霰弹:"xiàn dàn",柚木:"yóu mù",痕量:"hén liàng",雅乐:"yǎ yuè",号哭:"háo kū",诈降:"zhà xiáng",猪圈:"zhū juàn",咋舌:"zé shé",铣床:"xǐ chuáng",防弹:"fáng dàn",健将:"jiàn jiàng",丽水:"lí shuǐ",削发:"xuē fà",空当:"kòng dāng",多相:"duō xiàng",鲜见:"xiǎn jiàn",划桨:"huá jiǎng",载波:"zài bō",跳蚤:"tiào zao",俏皮:"qiào pí",吧嗒:"bā dā",结发:"jié fà",了断:"liǎo duàn",同调:"tóng diào",石磨:"shí mò",时差:"shí chā",鼻塞:"bí sè",挑子:"tiāo zi",推磨:"tuī mò",武侯:"wǔ hóu",抹煞:"mǒ shā",调转:"diào zhuǎn",籍没:"jí mò",还债:"huán zhài",调演:"diào yǎn",分划:"fēn huá",奇偶:"jī ǒu",断喝:"duàn hè",闷雷:"mèn léi",狼藉:"láng jí",饭量:"fàn liàng",还礼:"huán lǐ",转调:"zhuǎn diào",星相:"xīng xiàng",手相:"shǒu xiàng",配乐:"pèi yuè",盖头:"gài tou",连杆:"lián gǎn",簿记:"bù jì",刀把:"dāo bà",量词:"liàng cí",名角:"míng jué",步调:"bù diào",校本:"jiào běn",账簿:"zhàng bù",隽永:"juàn yǒng",稍为:"shāo wéi",易传:"yì zhuàn",乐谱:"yuè pǔ",牵累:"qiān lěi",答理:"dā li",喝斥:"hè chì",吟哦:"yín é",干渠:"gàn qú",海量:"hǎi liàng",精当:"jīng dàng",着床:"zhuó chuáng",月相:"yuè xiàng",庶几:"shù jī",宫观:"gōng guàn",论处:"lùn chǔ",征辟:"zhēng bì",厚朴:"hòu pò",介壳:"jiè qiào",吭哧:"kēng chī",咯血:"kǎ xiě",铺陈:"pū chén",重生:"chóng shēng",乐理:"yuè lǐ",哀号:"āi háo",藏历:"zàng lì",刚劲:"gāng jìng",削平:"xuē píng",浓荫:"nóng yīn",城垛:"chéng duǒ",当差:"dāng chāi",正传:"zhèng zhuàn",并处:"bìng chǔ",创面:"chuāng miàn",旦角:"dàn jué",薄礼:"bó lǐ",晃荡:"huàng dang",臊子:"sào zi",家什:"jiā shí",闷头:"mēn tóu",美发:"měi fà",度数:"dù shu",着凉:"zháo liáng",闯将:"chuǎng jiàng",几案:"jī àn",姘头:"pīn tou",差数:"chā shù",散碎:"sǎn suì",壅塞:"yōng sè",寒颤:"hán zhàn",牵强:"qiān qiǎng",无间:"wú jiàn",轮转:"lún zhuàn",号叫:"háo jiào",铺排:"pū pái",降伏:"xiáng fú",轧钢:"zhá gāng",东阿:"dōng ē",病假:"bìng jià",累加:"lěi jiā",梗塞:"gěng sè",弹夹:"dàn jiā",钻心:"zuān xīn",晃眼:"huǎng yǎn",魔爪:"mó zhǎo",标量:"biāo liàng",憋闷:"biē mèn",猜度:"cāi duó",处士:"chǔ shì",官差:"guān chāi",讨还:"tǎo huán",长门:"cháng mén",馏分:"liú fēn",里弄:"lǐ lòng",色相:"sè xiàng",雅兴:"yǎ xìng",角力:"jué lì",弹坑:"dàn kēng",枝杈:"zhī chà",夹具:"jiā jù",处刑:"chǔ xíng",悍将:"hàn jiàng",好学:"hào xué",好好:"hǎo hǎo",银发:"yín fà",扫把:"sào bǎ",法相:"fǎ xiàng",贵干:"guì gàn",供气:"gōng qì",空余:"kòng yú",捆扎:"kǔn zā",瘠薄:"jí bó",浆糊:"jiàng hu",嘎吱:"gā zhī",调令:"diào lìng",法帖:"fǎ tiè",淋病:"lìn bìng",调派:"diào pài",转盘:"zhuàn pán",供稿:"gōng gǎo",差官:"chāi guān",忧闷:"yōu mèn",教长:"jiào zhǎng",重唱:"chóng chàng",酒兴:"jiǔ xìng",乐坛:"yuè tán",花呢:"huā ní",叱喝:"chì hè",膀臂:"bǎng bì",得空:"dé kòng",转圈:"zhuàn quān",横暴:"hèng bào",哄抬:"hōng tái",引吭:"yǐn háng",载货:"zài huò",中计:"zhòng jì",官长:"guān zhǎng",相面:"xiàng miàn",看头:"kàn tou",盼头:"pàn tou",意兴:"yì xìng",军乐:"jūn yuè",累次:"lěi cì",骨嘟:"gǔ dū",燕赵:"yān zhào",报丧:"bào sāng",弥撒:"mí sa",挨斗:"ái dòu",扁舟:"piān zhōu",丑角:"chǒu jué",吊丧:"diào sāng",强将:"qiáng jiàng",重奏:"chóng zòu",发辫:"fà biàn",着魔:"zháo mó",着法:"zhāo fǎ",盛放:"shèng fàng",填塞:"tián sè",凶横:"xiōng hèng",稽首:"qǐ shǒu",碑帖:"bēi tiè",冲量:"chōng liàng",发菜:"fà cài",假发:"jiǎ fà",翻卷:"fān juǎn",小量:"xiǎo liàng",胶着:"jiāo zhuó",里子:"lǐ zi",调调:"diào diao",散兵:"sǎn bīng",高挑:"gāo tiǎo",播撒:"bō sǎ",夹心:"jiā xīn",扇动:"shān dòng",叨扰:"tāo rǎo",霓裳:"ní cháng",捻子:"niǎn zi",弥缝:"mí féng",撒布:"sǎ bù",场院:"cháng yuàn",省亲:"xǐng qīn",提拉:"tí lā",惯量:"guàn liàng",强逼:"qiáng bī",强征:"qiáng zhēng",晕车:"yùn chē",数道:"shù dào",带累:"dài lèi",拓本:"tà běn",嫌恶:"xián wù",宿将:"sù jiàng",龟裂:"jūn liè",缠夹:"chán jiā",发式:"fà shì",隔扇:"gé shàn",天分:"tiān fèn",癖好:"pǐ hào",四通:"sì tōng",白术:"bái zhú",划伤:"huá shāng",角斗:"jué dòu",听差:"tīng chāi",岁差:"suì chā",丧礼:"sāng lǐ",脉脉:"mò mò",削瘦:"xuē shòu",撒播:"sǎ bō",莎草:"suō cǎo",犍为:"qián wéi",调头:"diào tóu",龙卷:"lóng juǎn",外调:"wài diào",字帖:"zì tiè",卷发:"juǎn fà",揣度:"chuǎi duó",洋相:"yáng xiàng",散光:"sǎn guāng",骨碌:"gū lu",薄命:"bó mìng",笼头:"lóng tóu",咽炎:"yān yán",碌碡:"liù zhou",片儿:"piàn er",纤手:"qiàn shǒu",散体:"sǎn tǐ",内省:"nèi xǐng",强留:"qiáng liú",解送:"jiè sòng",反间:"fǎn jiàn",少壮:"shào zhuàng",留空:"liú kōng",告假:"gào jià",咳血:"ké xuè",薄暮:"bó mù",铺轨:"pū guǐ",磨削:"mó xuē",治丧:"zhì sāng",叉子:"chā zi",哄动:"hōng dòng",蛾子:"é zi",出落:"chū luò",股长:"gǔ zhǎng",贵处:"guì chù",还魂:"huán hún",例假:"lì jià",刹住:"shā zhù",身量:"shēn liàng",同好:"tóng hào",模量:"mó liàng",更生:"gēng shēng",服丧:"fú sāng",率直:"shuài zhí",字模:"zì mú",散架:"sǎn jià",答腔:"dā qiāng",交恶:"jiāo wù",薄情:"bó qíng",眼泡:"yǎn pāo",袅娜:"niǎo nuó",草垛:"cǎo duò",冲劲:"chòng jìn",呢喃:"ní nán",切中:"qiè zhòng",挑灯:"tiǎo dēng",还愿:"huán yuàn",激将:"jī jiàng",更鼓:"gēng gǔ",没药:"mò yào",败兴:"bài xìng",切面:"qiē miàn",散户:"sǎn hù",累进:"lěi jìn",背带:"bēi dài",秤杆:"chèng gǎn",碾坊:"niǎn fáng",簿子:"bù zi",扳手:"bān shǒu",铅山:"yán shān",儒将:"rú jiàng",重光:"chóng guāng",剪发:"jiǎn fà",长上:"zhǎng shàng",小传:"xiǎo zhuàn",压轴:"yā zhòu",弱冠:"ruò guàn",花卷:"huā juǎn",横祸:"hèng huò",夹克:"jiā kè",光晕:"guāng yùn",披靡:"pī mǐ",对调:"duì diào",夹持:"jiā chí",空额:"kòng é",平调:"píng diào",铺床:"pū chuáng",丧钟:"sāng zhōng",作乐:"zuò lè",少府:"shào fǔ",数数:"shuò shuò",奔头:"bèn tou",进给:"jìn jǐ",率性:"shuài xìng",乐子:"lè zi",绑扎:"bǎng zā",挑唆:"tiǎo suō",漂洗:"piǎo xǐ",夹墙:"jiā qiáng",咳喘:"ké chuǎn",乜斜:"miē xie",错处:"cuò chù",闷酒:"mèn jiǔ",时调:"shí diào",重孙:"chóng sūn",经幢:"jīng chuáng",圩场:"xū chǎng",调门:"diào mén",花头:"huā tóu",划拉:"huá la",套色:"tào shǎi",粗率:"cū shuài",相率:"xiāng shuài",款识:"kuǎn zhì",吁请:"yù qǐng",荫蔽:"yīn bì",文蛤:"wén gé",嘀嗒:"dī dā",调取:"diào qǔ",交差:"jiāo chāi",落子:"luò zǐ",相册:"xiàng cè",絮叨:"xù dao",落发:"luò fà",异相:"yì xiàng",浸没:"jìn mò",角抵:"jué dǐ",卸载:"xiè zài",春卷:"chūn juǎn",扎挣:"zhá zheng",畜养:"xù yǎng",吡咯:"bǐ luò",垛子:"duò zi",恶少:"è shào",发际:"fà jì",红苕:"hóng sháo",糨糊:"jiàng hu",哭丧:"kū sāng",稍息:"shào xī",晕船:"yùn chuán",校样:"jiào yàng",外差:"wài chā",脚爪:"jiǎo zhǎo",铺展:"pū zhǎn",芫荽:"yán sui",夹紧:"jiā jǐn",尿泡:"suī pào",丧乱:"sāng luàn",凶相:"xiōng xiàng",华发:"huá fà",打场:"dǎ cháng",云量:"yún liàng",正切:"zhèng qiē",划拳:"huá quán",划艇:"huá tǐng",评传:"píng zhuàn",拉纤:"lā qiàn",句读:"jù dòu",散剂:"sǎn jì",骨殖:"gǔ shi",塞音:"sè yīn",铺叙:"pū xù",阏氏:"yān zhī",冷颤:"lěng zhàn",煞住:"shā zhù",少男:"shào nán",管乐:"guǎn yuè",号啕:"háo táo",纳降:"nà xiáng",拥塞:"yōng sè",万乘:"wàn shèng",杆儿:"gǎn ér",葛藤:"gé téng",簿籍:"bù jí",皮夹:"pí jiā",校准:"jiào zhǔn",允当:"yǔn dàng",器量:"qì liàng",选调:"xuǎn diào",扮相:"bàn xiàng",干才:"gàn cái",基干:"jī gàn",割切:"gē qiē",国乐:"guó yuè",卡壳:"qiǎ ké",辟谷:"bì gǔ",磨房:"mò fáng",咿呀:"yī yā",芥末:"jiè mo",薄技:"bó jì",产假:"chǎn jià",诗兴:"shī xìng",重出:"chóng chū",转椅:"zhuàn yǐ",酌量:"zhuó liang",簿册:"bù cè",藏青:"zàng qīng",的士:"dī shì",调人:"diào rén",解元:"jiè yuán",茎干:"jīng gàn",巨量:"jù liàng",榔头:"láng tou",率真:"shuài zhēn",喷香:"pèn xiāng",锁钥:"suǒ yuè",虾蟆:"há má",相图:"xiàng tú",兴会:"xìng huì",灶头:"zào tóu",重婚:"chóng hūn",钻洞:"zuān dòng",忖度:"cǔn duó",党参:"dǎng shēn",调温:"diào wēn",杆塔:"gān tǎ",葛布:"gé bù",拱券:"gǒng xuàn",夹生:"jiā shēng",露馅:"lòu xiàn",恰切:"qià qiè",散见:"sǎn jiàn",哨卡:"shào qiǎ",烫发:"tàng fà",体量:"tǐ liàng",挺括:"tǐng kuò",系带:"jì dài",相士:"xiàng shì",羊圈:"yáng juàn",转矩:"zhuàn jǔ",吧台:"bā tái",苍术:"cāng zhú",菲薄:"fěi bó",蛤蚧:"gé jiè",蛤蜊:"gé lí",瓜蔓:"guā wàn",怪相:"guài xiàng",临帖:"lín tiè",女红:"nǚ gōng",刨床:"bào chuáng",翘楚:"qiáo chǔ",数九:"shǔ jiǔ",谈兴:"tán xìng",雄劲:"xióng jìng",扎染:"zā rǎn",遮荫:"zhē yīn",周正:"zhōu zhèng",赚头:"zhuàn tou",扒手:"pá shǒu",搀和:"chān huo",诚朴:"chéng pǔ",肚量:"dù liàng",干结:"gān jié",工尺:"gōng chě",家累:"jiā lěi",曲水:"qū shuǐ",沙参:"shā shēn",挑花:"tiǎo huā",阿门:"ā mén",背篓:"bēi lǒu",瘪三:"biē sān",裁处:"cái chǔ",创痛:"chuāng tòng",福相:"fú xiàng",更动:"gēng dòng",豪兴:"háo xìng",还阳:"huán yáng",还嘴:"huán zuǐ",借调:"jiè diào",卷云:"juǎn yún",流弹:"liú dàn",想头:"xiǎng tou",削价:"xuē jià",校阅:"jiào yuè",雅量:"yǎ liàng",别传:"bié zhuàn",薄酒:"bó jiǔ",春假:"chūn jià",发妻:"fà qī",哗哗:"huā huā",宽绰:"kuān chuo",了悟:"liǎo wù",切花:"qiē huā",审度:"shěn duó",应许:"yīng xǔ",转台:"zhuàn tái",仔猪:"zǐ zhū",裁量:"cái liáng",藏戏:"zàng xì",乘兴:"chéng xìng",绸缪:"chóu móu",摧折:"cuī zhé",调经:"tiáo jīng",调职:"diào zhí",缝缀:"féng zhuì",骨朵:"gū duǒ",核儿:"hú er",恒量:"héng liàng",还价:"huán jià",浑朴:"hún pǔ",苦差:"kǔ chāi",面糊:"miàn hù",煞车:"shā chē",省视:"xǐng shì",什锦:"shí jǐn",信差:"xìn chāi",余切:"yú qiē",攒眉:"cuán méi",炸糕:"zhá gāo",钻杆:"zuàn gǎn",扒灰:"pá huī",拌和:"bàn huò",长调:"cháng diào",大溜:"dà liù",抖搂:"dǒu lōu",飞转:"fēi zhuàn",干仗:"gàn zhàng",好胜:"hào shèng",画片:"huà piàn",搅混:"jiǎo hún",螺杆:"luó gǎn",木模:"mù mú",怒号:"nù háo",频数:"pín shù",无宁:"wú níng",遗少:"yí shào",邮差:"yóu chāi",占卦:"zhān guà",占星:"zhān xīng",重审:"chóng shěn",自量:"zì liàng",调防:"diào fáng",发廊:"fà láng",反调:"fǎn diào",缝子:"fèng zi",更夫:"gēng fū",骨子:"gǔ zi",光杆:"guāng gǎn",夹棍:"jiā gùn",居丧:"jū sāng",巨贾:"jù gǔ",看押:"kān yā",空转:"kōng zhuàn",量力:"liàng lì",炮烙:"páo luò",赔还:"péi huán",扑扇:"pū shān",散记:"sǎn jì",散件:"sǎn jiàn",删削:"shān xuē",射干:"shè gàn",条几:"tiáo jī",偷空:"tōu kòng",削壁:"xuē bì",校核:"jiào hé",阴干:"yīn gān",择菜:"zhái cài",重九:"chóng jiǔ",主调:"zhǔ diào",自禁:"zì jīn",吧唧:"bā jī",便溺:"biàn niào",词调:"cí diào",叨咕:"dáo gu",落枕:"lào zhěn",铺砌:"pū qì",刷白:"shuà bái",委靡:"wěi mǐ",系泊:"xì bó",相马:"xiàng mǎ",熨帖:"yù tiē",转筋:"zhuàn jīn",棒喝:"bàng hè",傧相:"bīn xiàng",镐头:"gǎo tóu",间苗:"jiàn miáo",乐池:"yuè chí",卖相:"mài xiàng",屏弃:"bǐng qì",铅弹:"qiān dàn",切变:"qiē biàn",请调:"qǐng diào",群氓:"qún méng",散板:"sǎn bǎn",省察:"xǐng chá",事假:"shì jià",纤绳:"qiàn shéng",重影:"chóng yǐng",耕种:"gēng zhòng",种地:"zhòng dì",种菜:"zhòng cài",栽种:"zāi zhòng",接种:"jiē zhòng",垦种:"kěn zhòng",种殖:"zhòng zhí",种瓜:"zhòng guā",种豆:"zhòng dòu",种树:"zhòng shù",睡着:"shuì zháo",笼子:"lóng zi",重启:"chóng qǐ",重整:"chóng zhěng",重弹:"chóng tán",重足:"chóng zú",重山:"chóng shān",重游:"chóng yóu",重峦:"chóng luán",爷爷:"yé ye",奶奶:"nǎi nai",姥爷:"lǎo ye",爸爸:"bà ba",妈妈:"mā ma",婶婶:"shěn shen",舅舅:"jiù jiu",姑姑:"gū gu",叔叔:"shū shu",姨夫:"yí fu",舅母:"jiù mu",姑父:"gū fu",姐夫:"jiě fu",婆婆:"pó po",公公:"gōng gong",舅子:"jiù zi",姐姐:"jiě jie",哥哥:"gē ge",妹妹:"mèi mei",妹夫:"mèi fu",姨子:"yí zi",宝宝:"bǎo bao",娃娃:"wá wa",孩子:"hái zi",日子:"rì zi",样子:"yàng zi",狮子:"shī zi",身子:"shēn zi",架子:"jià zi",嫂子:"sǎo zi",鼻子:"bí zi",亭子:"tíng zi",折子:"zhé zi",面子:"miàn zi",脖子:"bó zi",辈子:"bèi zi",帽子:"mào zi",拍子:"pāi zi",柱子:"zhù zi",辫子:"biàn zi",鸽子:"gē zi",房子:"fáng zi",丸子:"wán zi",摊子:"tān zi",牌子:"pái zi",胡子:"hú zi",鬼子:"guǐ zi",矮子:"ǎi zi",鸭子:"yā zi",小子:"xiǎo zi",影子:"yǐng zi",屋子:"wū zi",对子:"duì zi",点子:"diǎn zi",本子:"běn zi",种子:"zhǒng zi",儿子:"ér zi",兔子:"tù zi",骗子:"piàn zi",院子:"yuàn zi",猴子:"hóu zi",嗓子:"sǎng zi",侄子:"zhí zi",柿子:"shì zi",钳子:"qián zi",虱子:"shī zi",瓶子:"píng zi",豹子:"bào zi",筷子:"kuài zi",篮子:"lán zi",绳子:"shéng zi",嘴巴:"zuǐ ba",耳朵:"ěr duo",茄子:"qié zi",蚌埠:"bèng bù",崆峒:"kōng tóng",琵琶:"pí pa",蘑菇:"mó gu",葫芦:"hú lu",狐狸:"hú li",桔子:"jú zi",盒子:"hé zi",桌子:"zhuō zi",竹子:"zhú zi",师傅:"shī fu",衣服:"yī fu",袜子:"wà zi",杯子:"bēi zi",刺猬:"cì wei",麦子:"mài zi",队伍:"duì wu",知了:"zhī liǎo",鱼儿:"yú er",馄饨:"hún tun",灯笼:"dēng long",庄稼:"zhuāng jia",聪明:"cōng ming",镜子:"jìng zi",银子:"yín zi",盘子:"pán zi",了却:"liǎo què",力气:"lì qi",席子:"xí zi",林子:"lín zi",朝霞:"zhāo xiá",朝夕:"zhāo xī",朝气:"zhāo qì",翅膀:"chì bǎng",省长:"shěng zhǎng",臧否:"zāng pǐ",否泰:"pǐ tài",变得:"biàn de",丈夫:"zhàng fu",豆腐:"dòu fu",笔杆:"bǐ gǎn",枞阳:"zōng yáng",行人:"xíng rén",打着:"dǎ zhe",第一:"dì yī",万一:"wàn yī",之一:"zhī yī",得之:"dé zhī",统一:"tǒng yī",唯一:"wéi yī",专一:"zhuān yī",单一:"dān yī",如一:"rú yī",其一:"qí yī",合一:"hé yī",逐一:"zhú yī",周一:"zhōu yī",初一:"chū yī",研一:"yán yī",归一:"guī yī",假一:"jiǎ yī",闻一:"wén yī",了了:"liǎo liǎo",公了:"gōng liǎo",私了:"sī liǎo",一月:"yī yuè",一号:"yī hào",一级:"yī jí",一等:"yī děng",一哥:"yī gē",月一:"yuè yī",一一:"yī yī",二一:"èr yī",三一:"sān yī",四一:"sì yī",五一:"wǔ yī",六一:"liù yī",七一:"qī yī",八一:"bā yī",九一:"jiǔ yī","一〇":"yī líng",一零:"yī líng",一二:"yī èr",一三:"yī sān",一四:"yī sì",一五:"yī wǔ",一六:"yī liù",一七:"yī qī",一八:"yī bā",一九:"yī jiǔ",一又:"yī yòu",一饼:"yī bǐng",一楼:"yī lóu",为例:"wéi lì",为准:"wéi zhǔn",沧海:"cāng hǎi",难为:"nán wéi",责难:"zé nàn",患难:"huàn nàn",磨难:"mó nàn",大难:"dà nàn",刁难:"diāo nàn",殉难:"xùn nàn",落难:"luò nàn",罹难:"lí nàn",灾难:"zāi nàn",难民:"nàn mín",苦难:"kǔ nàn",危难:"wēi nàn",发难:"fā nàn",逃难:"táo nàn",避难:"bì nàn",遇难:"yù nàn",阻难:"zǔ nàn",厄难:"è nàn",徇难:"xùn nàn",空难:"kōng nàn",喜欢:"xǐ huan",朝朝:"zhāo zhāo",不行:"bù xíng",轧轧:"yà yà",弯曲:"wān qū",扭曲:"niǔ qū",曲直:"qū zhí",委曲:"wěi qū",酒曲:"jiǔ qū",曲径:"qū jìng",曲解:"qū jiě",歪曲:"wāi qū",曲线:"qū xiàn",曲阜:"qū fù",九曲:"jiǔ qū",曲折:"qū zhé",曲肱:"qū gōng",曲意:"qū yì",仡佬:"gē lǎo"},Hne=Object.keys(FC).map(e=>({zh:e,pinyin:FC[e],probability:2e-8,length:2,priority:xr.Normal,dict:Symbol("dict2")})),BC={为什么:"wèi shén me",实际上:"shí jì shang",检察长:"jiǎn chá zhǎng",干什么:"gàn shén me",这会儿:"zhè huì er",尽可能:"jǐn kě néng",董事长:"dǒng shì zhǎng",了不起:"liǎo bù qǐ",参谋长:"cān móu zhǎng",朝鲜族:"cháo xiǎn zú",海内外:"hǎi nèi wài",禁不住:"jīn bú zhù",柏拉图:"bó lā tú",不在乎:"bú zài hu",洛杉矶:"luò shān jī",有点儿:"yǒu diǎn er",迫击炮:"pǎi jī pào",不得了:"bù dé liǎo",马尾松:"mǎ wěi sōng",运输量:"yùn shū liàng",发脾气:"fā pí qi",士大夫:"shì dà fū",鸭绿江:"yā lù jiāng",压根儿:"yà gēn er",对得起:"duì de qǐ",那会儿:"nà huì er",自个儿:"zì gě er",物理量:"wù lǐ liàng",怎么着:"zěn me zhāo",明晃晃:"míng huǎng huǎng",节假日:"jié jià rì",心里话:"xīn lǐ huà",发行量:"fā xíng liàng",兴冲冲:"xìng chōng chōng",分子量:"fēn zǐ liàng",国子监:"guó zǐ jiàn",老大难:"lǎo dà nán",党内外:"dǎng nèi wài",这么着:"zhè me zhāo",少奶奶:"shào nǎi nai",暗地里:"àn dì lǐ",更年期:"gēng nián qī",工作量:"gōng zuò liàng",背地里:"bèi dì lǐ",山里红:"shān li hóng",好好儿:"hǎo hāo er",交响乐:"jiāo xiǎng yuè",好意思:"hǎo yì si",吐谷浑:"tǔ yù hún",没意思:"méi yì si",理发师:"lǐ fà shī",塔什干:"tǎ shí gān",充其量:"chōng qí liàng",靠得住:"kào de zhù",车行道:"chē xíng dào",人行道:"rén xíng dào",中郎将:"zhōng láng jiàng",照明弹:"zhào míng dàn",烟幕弹:"yān mù dàn",没奈何:"mò nài hé",乱哄哄:"luàn hōng hōng",惠更斯:"huì gēng sī",载重量:"zài zhòng liàng",瞧得起:"qiáo de qǐ",纪传体:"jì zhuàn tǐ",阿房宫:"ē páng gōng",卷心菜:"juǎn xīn cài",戏班子:"xì bān zi",过得去:"guò de qù",花岗石:"huā gāng shí",外甥女:"wài sheng nǚ",团团转:"tuán tuán zhuàn",大堡礁:"dà bǎo jiāo",燃烧弹:"rán shāo dàn",劳什子:"láo shí zi",摇滚乐:"yáo gǔn yuè",夹竹桃:"jiā zhú táo",闹哄哄:"nào hōng hōng",三连冠:"sān lián guàn",重头戏:"zhòng tóu xì",二人转:"èr rén zhuàn",节骨眼:"jiē gǔ yǎn",知识面:"zhī shi miàn",护士长:"hù shi zhǎng",信号弹:"xìn hào dàn",干电池:"gān diàn chí",枪杆子:"qiāng gǎn zi",哭丧棒:"kū sāng bàng",鼻咽癌:"bí yān ái",瓦岗军:"wǎ gāng jūn",买得起:"mǎi de qǐ",癞蛤蟆:"lài há ma",脊梁骨:"jǐ liang gǔ",子母弹:"zǐ mǔ dàn",开小差:"kāi xiǎo chāi",女强人:"nǚ qiáng rén",英雄传:"yīng xióng zhuàn",爵士乐:"jué shì yuè",说笑话:"shuō xiào hua",碰头会:"pèng tóu huì",玻璃钢:"bō li gāng",曳光弹:"yè guāng dàn",少林拳:"shào lín quán",咏叹调:"yǒng tàn diào",少先队:"shào xiān duì",灵长目:"líng zhǎng mù",对着干:"duì zhe gàn",蒙蒙亮:"méng méng liàng",软骨头:"ruǎn gǔ tou",铺盖卷:"pū gài juǎn",和稀泥:"huò xī ní",背黑锅:"bēi hēi guō",红彤彤:"hóng tōng tōng",武侯祠:"wǔ hóu cí",打哆嗦:"dǎ duō suo",户口簿:"hù kǒu bù",马尾藻:"mǎ wěi zǎo",夜猫子:"yè māo zi",打手势:"dǎ shǒu shì",龙王爷:"lóng wáng yé",气头上:"qì tóu shang",糊涂虫:"hú tu chóng",笔杆子:"bǐ gǎn zi",占便宜:"zhàn pián yi",打主意:"dǎ zhǔ yì",多弹头:"duō dàn tóu",露一手:"lòu yì shǒu",堰塞湖:"yàn sè hú",保得住:"bǎo de zhù",趵突泉:"bào tū quán",奥得河:"ào de hé",司务长:"sī wù zhǎng",禁不起:"jīn bù qǐ",什刹海:"shí chà hǎi",莲花落:"lián huā lào",见世面:"jiàn shì miàn",豁出去:"huō chū qù",电位差:"diàn wèi chā",挨个儿:"āi gè er",那阵儿:"nà zhèn er",肺活量:"fèi huó liàng",大师傅:"dà shī fu",掷弹筒:"zhì dàn tǒng",打呼噜:"dǎ hū lu",广渠门:"ān qú mén",未见得:"wèi jiàn dé",大婶儿:"dà shěn er",谈得来:"tán de lái",脚丫子:"jiǎo yā zi",空包弹:"kōng bāo dàn",窝里斗:"wō li dòu",弹着点:"dàn zhuó diǎn",个头儿:"gè tóu er",看得起:"kàn de qǐ",糊涂账:"hú tu zhàng",大猩猩:"dà xīng xing",禁得起:"jīn de qǐ",法相宗:"fǎ xiàng zōng",可怜相:"kě lián xiàng",吃得下:"chī de xià",汉堡包:"hàn bǎo bāo",闹嚷嚷:"nào rāng rāng",数来宝:"shǔ lái bǎo",合得来:"hé de lái",干性油:"gān xìng yóu",闷葫芦:"mèn hú lu",呱呱叫:"guā guā jiào",西洋参:"xī yáng shēn",林荫道:"lín yīn dào",拉家常:"lā jiā cháng",卷铺盖:"juǎn pū gài",过得硬:"guò de yìng",飞将军:"fēi jiāng jūn",挑大梁:"tiǎo dà liáng",哈巴狗:"hǎ ba gǒu",过家家:"guò jiā jiā",催泪弹:"cuī lèi dàn",雨夹雪:"yǔ jiā xuě",敲竹杠:"qiāo zhú gàng",列车长:"liè chē zhǎng",华达呢:"huá dá ní",犯得着:"fàn de zháo",土疙瘩:"tǔ gē da",煞风景:"shā fēng jǐng",轻量级:"qīng liàng jí",羞答答:"xiū dā dā",石子儿:"shí zǐ er",达姆弹:"dá mǔ dàn",科教片:"kē jiào piān",侃大山:"kǎn dà shān",丁点儿:"dīng diǎn er",吃得消:"chī de xiāo",捋虎须:"luō hǔ xū",高丽参:"gāo lí shēn",众生相:"zhòng shēng xiàng",咽峡炎:"yān xiá yán",禁得住:"jīn de zhù",吃得开:"chī de kāi",柞丝绸:"zuò sī chóu",应声虫:"yìng shēng chóng",数得着:"shǔ de zháo",傻劲儿:"shǎ jìn er",铅玻璃:"qiān bō li",可的松:"kě dì sōng",划得来:"huá de lái",晕乎乎:"yūn hū hū",屎壳郎:"shǐ ke làng",尥蹶子:"liào juě zi",藏红花:"zàng hóng huā",闷罐车:"mèn guàn chē",卡脖子:"qiǎ bó zi",红澄澄:"hóng deng deng",赶得及:"gǎn de jí",当间儿:"dāng jiàn er",露马脚:"lòu mǎ jiǎo",鸡内金:"jī nèi jīn",犯得上:"fàn de shàng",钉齿耙:"dīng chǐ bà",饱和点:"bǎo hé diǎn",龙爪槐:"lóng zhǎo huái",喝倒彩:"hè dào cǎi",定冠词:"dìng guàn cí",担担面:"dàn dan miàn",吃得住:"chī de zhù",爪尖儿:"zhuǎ jiān er",支着儿:"zhī zhāo er",折跟头:"zhē gēn tou",阴着儿:"yīn zhāo er",烟卷儿:"yān juǎn er",宣传弹:"xuān chuán dàn",信皮儿:"xìn pí er",弦切角:"xián qiē jiǎo",缩砂密:"sù shā mì",说得来:"shuō de lái",水漂儿:"shuǐ piāo er",耍笔杆:"shuǎ bǐ gǎn",数得上:"shǔ de shàng",数不着:"shǔ bù zháo",数不清:"shǔ bù qīng",什件儿:"shí jiàn er",生死簿:"shēng sǐ bù",扇风机:"shān fēng jī",撒呓挣:"sā yì zheng",日记簿:"rì jì bù",热得快:"rè de kuài",亲家公:"qìng jia gōng",奇函数:"jī hán shù",拍纸簿:"pāi zhǐ bù",努劲儿:"nǔ jìn er",泥娃娃:"ní wá wa",内切圆:"nèi qiē yuán",哪会儿:"nǎ huì er",闷头儿:"mēn tóu er",没谱儿:"méi pǔ er",铆劲儿:"mǎo jìn er",溜肩膀:"liū jiān bǎng",了望台:"liào wàng tái",老来少:"lǎo lái shào",坤角儿:"kūn jué er",考勤簿:"kǎo qín bù",卷笔刀:"juǎn bǐ dāo",进给量:"jìn jǐ liàng",划不来:"huá bù lái",汗褂儿:"hàn guà er",鼓囊囊:"gǔ nāng nāng",够劲儿:"gòu jìn er",公切线:"gōng qiē xiàn",搁得住:"gé de zhù",赶浪头:"gǎn làng tóu",赶得上:"gǎn de shàng",干酵母:"gān jiào mǔ",嘎渣儿:"gā zhā er",嘎嘣脆:"gā bēng cuì",对得住:"duì de zhù",逗闷子:"dòu mèn zi",顶呱呱:"dǐng guā guā",滴溜儿:"dī liù er",大轴子:"dà zhòu zi",打板子:"dǎ bǎn zi",寸劲儿:"cùn jìn er",醋劲儿:"cù jìn er",揣手儿:"chuāi shǒu er",冲劲儿:"chòng jìn er",吃得来:"chī de lái",不更事:"bù gēng shì",奔头儿:"bèn tou er",百夫长:"bǎi fū zhǎng",娃娃亲:"wá wa qīn",死劲儿:"sǐ jìn er",骨朵儿:"gū duǒ er",功劳簿:"gōng láo bù",都江堰:"dū jiāng yàn",一担水:"yí dàn shuǐ",否极泰:"pǐ jí tài",泰来否:"tài lái pǐ",咳特灵:"ké tè líng",开户行:"kāi hù háng",郦食其:"lì yì jī",花事了:"huā shì liǎo",一更更:"yì gēng gēng",一重山:"yì chóng shān",风一更:"fēng yì gēng",雪一更:"xuě yì gēng",归一码:"guī yì mǎ",星期一:"xīng qī yī",礼拜一:"lǐ bài yī",一季度:"yī jì dù",一月一:"yī yuè yī",一字马:"yī zì mǎ",一是一:"yī shì yī",一次方:"yī cì fāng",一阳指:"yī yáng zhǐ",一字决:"yī zì jué",一年级:"yī nián jí",一不做:"yī bú zuò",屈戌儿:"qū qu ér",难为水:"nán wéi shuǐ",难为情:"nán wéi qíng",行一行:"xíng yì háng",别别的:"biè bié de",干哪行:"gàn nǎ háng",干一行:"gàn yì háng",曲别针:"qū bié zhēn"},Wne=Object.keys(BC).map(e=>({zh:e,pinyin:BC[e],probability:2e-8,length:3,priority:xr.Normal,dict:Symbol("dict3")})),$C={成吉思汗:"chéng jí sī hán",四通八达:"sì tōng bā dá",一模一样:"yì mú yí yàng",青藏高原:"qīng zàng gāo yuán",阿弥陀佛:"ē mí tuó fó",解放思想:"jiè fàng sī xiǎng",所作所为:"suǒ zuò suǒ wéi",迷迷糊糊:"mí mí hu hū",荷枪实弹:"hè qiāng shí dàn",兴高采烈:"xìng gāo cǎi liè",无能为力:"wú néng wéi lì",布鲁塞尔:"bù lǔ sài ěr",为所欲为:"wéi suǒ yù wéi",克什米尔:"kè shí mǐ ěr",没完没了:"méi wán méi liǎo",不为人知:"bù wéi rén zhī",结结巴巴:"jiē jiē bā bā",前仆后继:"qián pū hòu jì",铺天盖地:"pū tiān gài dì",直截了当:"zhí jié liǎo dàng",供不应求:"gōng bú yìng qiú",御史大夫:"yù shǐ dà fū",不为瓦全:"bù wéi wǎ quán",不可收拾:"bù kě shōu shi",胡作非为:"hú zuò fēi wéi",分毫不差:"fēn háo bú chà",模模糊糊:"mó mó hu hū",不足为奇:"bù zú wéi qí",悄无声息:"qiǎo wú shēng xī",了如指掌:"liǎo rú zhǐ zhǎng",深恶痛绝:"shēn wù tòng jué",高高兴兴:"gāo gāo xìng xìng",唉声叹气:"āi shēng tàn qì",汉藏语系:"hàn zàng yǔ xì",处心积虑:"chǔ xīn jī lǜ",泣不成声:"qì bù chéng shēng",半夜三更:"bàn yè sān gēng",失魂落魄:"shī hún luò pò",二十八宿:"èr shí bā xiù",转来转去:"zhuàn lái zhuàn qù",数以万计:"shǔ yǐ wàn jì",相依为命:"xiāng yī wéi mìng",恋恋不舍:"liàn liàn bù shě",屈指可数:"qū zhǐ kě shǔ",神出鬼没:"shén chū guǐ mò",结结实实:"jiē jiē shí shí",有的放矢:"yǒu dì fàng shǐ",叽哩咕噜:"jī lǐ gū lū",调兵遣将:"diào bīng qiǎn jiàng",载歌载舞:"zài gē zài wǔ",转危为安:"zhuǎn wēi wéi ān",踏踏实实:"tā tā shi shí",桑给巴尔:"sāng jǐ bā ěr",装模作样:"zhuāng mú zuò yàng",见义勇为:"jiàn yì yǒng wéi",相差无几:"xiāng chā wú jǐ",叹为观止:"tàn wéi guān zhǐ",闷闷不乐:"mèn mèn bú lè",喜怒哀乐:"xǐ nù āi lè",鲜为人知:"xiǎn wéi rén zhī",张牙舞爪:"zhāng yá wǔ zhǎo",为非作歹:"wéi fēi zuò dǎi",含糊其辞:"hán hú qí cí",疲于奔命:"pí yú bēn mìng",勉为其难:"miǎn wéi qí nán",依依不舍:"yī yī bù shě",顶头上司:"dǐng tóu shàng si",不着边际:"bù zhuó biān jì",大模大样:"dà mú dà yàng",寻欢作乐:"xún huān zuò lè",一走了之:"yì zǒu liǎo zhī",字里行间:"zì lǐ háng jiān",含含糊糊:"hán hán hu hū",恰如其分:"qià rú qí fèn",破涕为笑:"pò tì wéi xiào",深更半夜:"shēn gēng bàn yè",千差万别:"qiān chā wàn bié",数不胜数:"shǔ bú shèng shǔ",据为己有:"jù wéi jǐ yǒu",天旋地转:"tiān xuán dì zhuàn",养尊处优:"yǎng zūn chǔ yōu",玻璃纤维:"bō li xiān wéi",吵吵闹闹:"chāo chao nào nào",晕头转向:"yūn tóu zhuàn xiàng",土生土长:"tǔ shēng tǔ zhǎng",宁死不屈:"nìng sǐ bù qū",不省人事:"bù xǐng rén shì",尽力而为:"jìn lì ér wéi",精明强干:"jīng míng qiáng gàn",唠唠叨叨:"láo lao dāo dāo",叽叽喳喳:"jī ji zhā zhā",功不可没:"gōng bù kě mò",锲而不舍:"qiè ér bù shě",排忧解难:"pái yōu jiě nàn",稀里糊涂:"xī li hú tú",各有所长:"gè yǒu suǒ cháng",的的确确:"dí dí què què",哄堂大笑:"hōng táng dà xiào",听而不闻:"tīng ér bù wén",刀耕火种:"dāo gēng huǒ zhòng",内分泌腺:"nèi fèn mì xiàn",化险为夷:"huà xiǎn wéi yí",百发百中:"bǎi fā bǎi zhòng",重见天日:"chóng jiàn tiān rì",反败为胜:"fǎn bài wéi shèng",一了百了:"yì liǎo bǎi liǎo",大大咧咧:"dà da liē liē",心急火燎:"xīn jí huǒ liǎo",粗心大意:"cū xīn dà yi",鸡皮疙瘩:"jī pí gē da",夷为平地:"yí wéi píng dì",日积月累:"rì jī yuè lěi",设身处地:"shè shēn chǔ dì",投其所好:"tóu qí suǒ hào",间不容发:"jiān bù róng fà",人满为患:"rén mǎn wéi huàn",穷追不舍:"qióng zhuī bù shě",为时已晚:"wéi shí yǐ wǎn",如数家珍:"rú shǔ jiā zhēn",心里有数:"xīn lǐ yǒu shù",以牙还牙:"yǐ yá huán yá",神不守舍:"shén bù shǒu shě",孟什维克:"mèng shí wéi kè",各自为战:"gè zì wéi zhàn",怨声载道:"yuàn shēng zài dào",救苦救难:"jiù kǔ jiù nàn",好好先生:"hǎo hǎo xiān sheng",怪模怪样:"guài mú guài yàng",抛头露面:"pāo tóu lù miàn",游手好闲:"yóu shǒu hào xián",无所不为:"wú suǒ bù wéi",调虎离山:"diào hǔ lí shān",步步为营:"bù bù wéi yíng",好大喜功:"hào dà xǐ gōng",众矢之的:"zhòng shǐ zhī dì",长生不死:"cháng shēng bù sǐ",蔚为壮观:"wèi wéi zhuàng guān",不可胜数:"bù kě shèng shǔ",鬼使神差:"guǐ shǐ shén chāi",洁身自好:"jié shēn zì hào",敢作敢为:"gǎn zuò gǎn wéi",茅塞顿开:"máo sè dùn kāi",走马换将:"zǒu mǎ huàn jiàng",为时过早:"wéi shí guò zǎo",为人师表:"wéi rén shī biǎo",阴差阳错:"yīn chā yáng cuò",油腔滑调:"yóu qiāng huá diào",重蹈覆辙:"chóng dǎo fù zhé",骂骂咧咧:"mà ma liē liē",絮絮叨叨:"xù xù dāo dāo",如履薄冰:"rú lǚ bó bīng",损兵折将:"sǔn bīng zhé jiàng",拐弯抹角:"guǎi wān mò jiǎo",像模像样:"xiàng mú xiàng yàng",供过于求:"gōng guò yú qiú",开花结果:"kāi huā jiē guǒ",仔仔细细:"zǐ zǐ xì xì",川藏公路:"chuān zàng gōng lù",河北梆子:"hé běi bāng zi",长年累月:"cháng nián lěi yuè",正儿八经:"zhèng er bā jīng",不识抬举:"bù shí tái ju",重振旗鼓:"chóng zhèn qí gǔ",气息奄奄:"qì xī yān yān",紧追不舍:"jǐn zhuī bù shě",服服帖帖:"fú fu tiē tiē",强词夺理:"qiǎng cí duó lǐ",噼里啪啦:"pī li pā lā",人才济济:"rén cái jǐ jǐ",发人深省:"fā rén shēn xǐng",不足为凭:"bù zú wéi píng",为富不仁:"wéi fù bù rén",连篇累牍:"lián piān lěi dú",呼天抢地:"hū tiān qiāng dì",落落大方:"luò luò dà fāng",自吹自擂:"zì chuī zì léi",乐善好施:"lè shàn hào shī",以攻为守:"yǐ gōng wéi shǒu",磨磨蹭蹭:"mó mó cèng cèng",削铁如泥:"xuē tiě rú ní",助纣为虐:"zhù zhòu wéi nüè",以退为进:"yǐ tuì wéi jìn",嘁嘁喳喳:"qī qī chā chā",枪林弹雨:"qiāng lín dàn yǔ",令人发指:"lìng rén fà zhǐ",转败为胜:"zhuǎn bài wéi shèng",转弯抹角:"zhuǎn wān mò jiǎo",在劫难逃:"zài jié nán táo",正当防卫:"zhèng dàng fáng wèi",不足为怪:"bù zú wéi guài",难兄难弟:"nàn xiōng nàn dì",咿咿呀呀:"yī yī yā yā",弹尽粮绝:"dàn jìn liáng jué",阿谀奉承:"ē yú fèng chéng",稀里哗啦:"xī li huā lā",返老还童:"fǎn lǎo huán tóng",好高骛远:"hào gāo wù yuǎn",鹿死谁手:"lù sǐ shéi shǒu",差强人意:"chā qiáng rén yì",大吹大擂:"dà chuī dà léi",成家立业:"chéng jiā lì yè",自怨自艾:"zì yuàn zì yì",负债累累:"fù zhài lěi lěi",古为今用:"gǔ wéi jīn yòng",入土为安:"rù tǔ wéi ān",下不为例:"xià bù wéi lì",一哄而上:"yì hōng ér shàng",没头苍蝇:"méi tóu cāng ying",天差地远:"tiān chā dì yuǎn",风卷残云:"fēng juǎn cán yún",多灾多难:"duō zāi duō nàn",乳臭未干:"rǔ xiù wèi gān",行家里手:"háng jiā lǐ shǒu",狼狈为奸:"láng bèi wéi jiān",处变不惊:"chǔ biàn bù jīng",一唱一和:"yí chàng yí hè",一念之差:"yí niàn zhī chā",金蝉脱壳:"jīn chán tuō qiào",滴滴答答:"dī dī dā dā",硕果累累:"shuò guǒ léi léi",好整以暇:"hào zhěng yǐ xiá",红得发紫:"hóng de fā zǐ",传为美谈:"chuán wéi měi tán",富商大贾:"fù shāng dà gǔ",四海为家:"sì hǎi wéi jiā",了若指掌:"liǎo ruò zhǐ zhǎng",大有可为:"dà yǒu kě wéi",出头露面:"chū tóu lù miàn",鼓鼓囊囊:"gǔ gu nāng nāng",窗明几净:"chuāng míng jī jìng",泰然处之:"tài rán chǔ zhī",怒发冲冠:"nù fà chōng guān",有机玻璃:"yǒu jī bō li",骨头架子:"gǔ tou jià zi",义薄云天:"yì bó yún tiān",一丁点儿:"yī dīng diǎn er",时来运转:"shí lái yùn zhuǎn",陈词滥调:"chén cí làn diào",化整为零:"huà zhěng wéi líng",火烧火燎:"huǒ shāo huǒ liǎo",干脆利索:"gàn cuì lì suǒ",吊儿郎当:"diào er láng dāng",广种薄收:"guǎng zhòng bó shōu",种瓜得瓜:"zhòng guā dé guā",种豆得豆:"zhòng dòu dé dòu",难舍难分:"nán shě nán fēn",歃血为盟:"shà xuè wéi méng",奋发有为:"fèn fā yǒu wéi",阴错阳差:"yīn cuò yáng chā",东躲西藏:"dōng duǒ xī cáng",烟熏火燎:"yān xūn huǒ liǎo",钻牛角尖:"zuān niú jiǎo jiān",乔装打扮:"qiáo zhuāng dǎ bàn",改弦更张:"gǎi xián gēng zhāng",河南梆子:"hé nán bāng zi",好吃懒做:"hào chī lǎn zuò",何乐不为:"hé lè bù wéi",大出风头:"dà chū fēng tóu",攻城掠地:"gōng chéng lüè dì",漂漂亮亮:"piào piào liang liang",折衷主义:"zhé zhōng zhǔ yì",大马哈鱼:"dà mǎ hǎ yú",绿树成荫:"lǜ shù chéng yīn",率先垂范:"shuài xiān chuí fàn",家长里短:"jiā cháng lǐ duǎn",宽大为怀:"kuān dà wéi huái",左膀右臂:"zuǒ bǎng yòu bì",一笑了之:"yí xiào liǎo zhī",天下为公:"tiān xià wéi gōng",还我河山:"huán wǒ hé shān",何足为奇:"hé zú wéi qí",好自为之:"hǎo zì wéi zhī",风姿绰约:"fēng zī chuò yuē",大雨滂沱:"dà yǔ pāng tuó",传为佳话:"chuán wéi jiā huà",吃里扒外:"chī lǐ pá wài",重操旧业:"chóng cāo jiù yè",小家子气:"xiǎo jiā zi qì",少不更事:"shào bù gēng shì",难分难舍:"nán fēn nán shě",添砖加瓦:"tiān zhuān jiā wǎ",是非分明:"shì fēi fēn míng",舍我其谁:"shě wǒ qí shuí",偏听偏信:"piān tīng piān xìn",量入为出:"liàng rù wéi chū",降龙伏虎:"xiáng lóng fú hǔ",钢化玻璃:"gāng huà bō li",正中下怀:"zhèng zhòng xià huái",以身许国:"yǐ shēn xǔ guó",一语中的:"yì yǔ zhòng dì",丧魂落魄:"sàng hún luò pò",三座大山:"sān zuò dà shān",济济一堂:"jǐ jǐ yì táng",好事之徒:"hào shì zhī tú",干净利索:"gàn jìng lì suǒ",出将入相:"chū jiàng rù xiàng",袅袅娜娜:"niǎo niǎo nuó nuó",狐狸尾巴:"hú li wěi ba",好逸恶劳:"hào yì wù láo",大而无当:"dà ér wú dàng",打马虎眼:"dǎ mǎ hu yǎn",板上钉钉:"bǎn shàng dìng dīng",吆五喝六:"yāo wǔ hè liù",虾兵蟹将:"xiā bīng xiè jiàng",水调歌头:"shuǐ diào gē tóu",数典忘祖:"shǔ diǎn wàng zǔ",人事不省:"rén shì bù xǐng",曲高和寡:"qǔ gāo hè guǎ",屡教不改:"lǚ jiào bù gǎi",互为因果:"hù wéi yīn guǒ",互为表里:"hù wéi biǎo lǐ",厚此薄彼:"hòu cǐ bó bǐ",过关斩将:"guò guān zhǎn jiàng",疙疙瘩瘩:"gē ge dā dā",大腹便便:"dà fù pián pián",走为上策:"zǒu wéi shàng cè",冤家对头:"yuān jia duì tóu",有隙可乘:"yǒu xì kě chèng",一鳞半爪:"yì lín bàn zhǎo",片言只语:"piàn yán zhǐ yǔ",开花结实:"kāi huā jié shí",经年累月:"jīng nián lěi yuè",含糊其词:"hán hú qí cí",寡廉鲜耻:"guǎ lián xiǎn chǐ",成年累月:"chéng nián lěi yuè",不徇私情:"bú xùn sī qíng",不当人子:"bù dāng rén zǐ",膀大腰圆:"bǎng dà yāo yuán",指腹为婚:"zhǐ fù wéi hūn",这么点儿:"zhè me diǎn er",意兴索然:"yì xīng suǒ rán",绣花枕头:"xiù huā zhěn tou",无的放矢:"wú dì fàng shǐ",望闻问切:"wàng wén wèn qiè",舍己为人:"shě jǐ wèi rén",穷年累月:"qióng nián lěi yuè",排难解纷:"pái nàn jiě fēn",处之泰然:"chǔ zhī tài rán",指鹿为马:"zhǐ lù wéi mǎ",危如累卵:"wēi rú lěi luǎn",天兵天将:"tiān bīng tiān jiàng",舍近求远:"shě jìn qiú yuǎn",南腔北调:"nán qiāng běi diào",苦中作乐:"kǔ zhōng zuò lè",厚积薄发:"hòu jī bó fā",臭味相投:"xiù wèi xiāng tóu",长幼有序:"zhǎng yòu yǒu xù",逼良为娼:"bī liáng wéi chāng",悲悲切切:"bēi bēi qiè qiē",败军之将:"bài jūn zhī jiàng",欺行霸市:"qī háng bà shì",削足适履:"xuē zú shì lǚ",先睹为快:"xiān dǔ wéi kuài",啼饥号寒:"tí jī háo hán",疏不间亲:"shū bú jiàn qīn",神差鬼使:"shén chāi guǐ shǐ",敲敲打打:"qiāo qiāo dǎ dǎ",平铺直叙:"píng pū zhí xù",没头没尾:"méi tóu mò wěi",寥寥可数:"liáo liáo kě shǔ",哼哈二将:"hēng hā èr jiàng",鹤发童颜:"hè fà tóng yán",各奔前程:"gè bèn qián chéng",弹无虚发:"dàn wú xū fā",大人先生:"dà rén xiān sheng",与民更始:"yǔ mín gēng shǐ",树碑立传:"shù bēi lì zhuàn",是非得失:"shì fēi dé shī",实逼处此:"shí bī chǔ cǐ",塞翁失马:"sài wēng shī mǎ",日薄西山:"rì bó xī shān",切身体会:"qiè shēn tǐ huì",片言只字:"piàn yán zhǐ zì",跑马卖解:"pǎo mǎ mài xiè",宁折不弯:"nìng zhé bù wān",零零散散:"líng líng sǎn sǎn",量体裁衣:"liàng tǐ cái yī",连中三元:"lián zhòng sān yuán",礼崩乐坏:"lǐ bēng yuè huài",不为已甚:"bù wéi yǐ shèn",转悲为喜:"zhuǎn bēi wéi xǐ",以眼还眼:"yǐ yǎn huán yǎn",蔚为大观:"wèi wéi dà guān",未为不可:"wèi wéi bù kě",童颜鹤发:"tóng yán hè fà",朋比为奸:"péng bǐ wéi jiān",莫此为甚:"mò cǐ wéi shèn",夹枪带棒:"jiā qiāng dài bàng",富商巨贾:"fù shāng jù jiǎ",淡然处之:"dàn rán chǔ zhī",箪食壶浆:"dān shí hú jiāng",创巨痛深:"chuāng jù tòng shēn",草长莺飞:"cǎo zhǎng yīng fēi",坐视不救:"zuò shī bú jiù",以己度人:"yǐ jǐ duó rén",随行就市:"suí háng jiù shì",文以载道:"wén yǐ zài dào",文不对题:"wén bú duì tí",铁板钉钉:"tiě bǎn dìng dīng",身体发肤:"shēn tǐ fà fū",缺吃少穿:"quē chī shǎo chuān",目无尊长:"mù wú zūn zhǎng",吉人天相:"jí rén tiān xiàng",毁家纾难:"huǐ jiā shū nàn",钢筋铁骨:"gāng jīn tiě gǔ",丢卒保车:"diū zú bǎo jū",丢三落四:"diū sān là sì",闭目塞听:"bì mù sè tīng",削尖脑袋:"xuē jiān nǎo dài",为非作恶:"wéi fēi zuò è",人才难得:"rén cái nán dé",情非得已:"qíng fēi dé yǐ",切中要害:"qiè zhòng yào hài",火急火燎:"huǒ jí huǒ liǎo",画地为牢:"huà dì wéi láo",好酒贪杯:"hào jiǔ tān bēi",长歌当哭:"cháng gē dàng kū",载沉载浮:"zài chén zài fú",遇难呈祥:"yù nàn chéng xiáng",榆木疙瘩:"yú mù gē da",以邻为壑:"yǐ lín wéi hè",洋为中用:"yáng wéi zhōng yòng",言为心声:"yán wéi xīn shēng",言必有中:"yán bì yǒu zhòng",图穷匕见:"tú qióng bǐ xiàn",滂沱大雨:"páng tuó dà yǔ",目不暇给:"mù bù xiá jǐ",量才录用:"liàng cái lù yòng",教学相长:"jiào xué xiāng zhǎng",悔不当初:"huǐ bù dāng chū",呼幺喝六:"hū yāo hè liù",不足为训:"bù zú wéi xùn",不拘形迹:"bù jū xíng jī",傍若无人:"páng ruò wú rén",罪责难逃:"zuì zé nán táo",自我吹嘘:"zì wǒ chuī xū",转祸为福:"zhuǎn huò wéi fú",勇冠三军:"yǒng guàn sān jūn",易地而处:"yì dì ér chǔ",卸磨杀驴:"xiè mò shā lǘ",玩儿不转:"wán ér bú zhuàn",天道好还:"tiān dào hǎo huán",身单力薄:"shēn dān lì bó",撒豆成兵:"sǎ dòu chéng bīng",片纸只字:"piàn zhǐ zhī zì",宁缺毋滥:"nìng quē wú làn",没没无闻:"mò mò wú wén",量力而为:"liàng lì ér wéi",历历可数:"lì lì kě shǔ",口碑载道:"kǒu bēi zài dào",君子好逑:"jūn zǐ hǎo qiú",好为人师:"hào wéi rén shī",豪商巨贾:"háo shāng jù jiǎ",各有所好:"gè yǒu suǒ hào",度德量力:"duó dé liàng lì",指天为誓:"zhǐ tiān wéi shì",逸兴遄飞:"yì xìng chuán fēi",心宽体胖:"xīn kuān tǐ pán",为德不卒:"wéi dé bù zú",天下为家:"tiān xià wéi jiā",视为畏途:"shì wéi wèi tú",三灾八难:"sān zāi bā nàn",沐猴而冠:"mù hóu ér guàn",哩哩啦啦:"lī li lā lā",见缝就钻:"jiàn fèng jiù zuān",夹层玻璃:"jiā céng bō li",急公好义:"jí gōng hào yì",积年累月:"jī nián lěi yuè",划地为牢:"huá dì wéi láo",更名改姓:"gēng míng gǎi xìng",奉为圭臬:"fèng wéi guī niè",多难兴邦:"duō nàn xīng bāng",不破不立:"bú pò bú lì",坐地自划:"zuò dì zì huá",坐不重席:"zuò bù chóng xí",坐不窥堂:"zuò bù kuī táng",作嫁衣裳:"zuò jià yī shang",左枝右梧:"zuǒ zhī yòu wú",左宜右有:"zuǒ yí yòu yǒu",钻头觅缝:"zuān tóu mì fèng",钻天打洞:"zuān tiān dǎ dòng",钻皮出羽:"zuān pí chū yǔ",钻火得冰:"zuān huǒ dé bīng",钻洞觅缝:"zuàn dòng mì féng",钻冰求火:"zuān bīng qiú huǒ",子为父隐:"zǐ wéi fù yǐn",擢发难数:"zhuó fà nán shǔ",着人先鞭:"zhuó rén xiān biān",斫雕为朴:"zhuó diāo wéi pǔ",锥处囊中:"zhuī chǔ náng zhōng",椎心饮泣:"chuí xīn yǐn qì",椎心泣血:"chuí xīn qì xuè",椎牛飨士:"chuí niú xiǎng shì",椎牛歃血:"chuí niú shà xuè",椎牛发冢:"chuí niú fà zhǒng",椎埋屠狗:"chuí mái tú gǒu",椎埋狗窃:"chuí mái gǒu qiè",壮发冲冠:"zhuàng fā chōng guàn",庄严宝相:"zhuāng yán bǎo xiàng",转愁为喜:"zhuǎn chóu wéi xǐ",转嗔为喜:"zhuǎn chēn wéi xǐ",拽巷啰街:"zhuài xiàng luó jiē",拽耙扶犁:"zhuāi pá fú lí",拽布拖麻:"zhuài bù tuō má",箸长碗短:"zhù cháng wǎn duǎn",铸剑为犁:"zhù jiàn wéi lí",杼柚其空:"zhù yòu qí kōng",杼柚空虚:"zhù yòu kōng xū",助天为虐:"zhù tiān wéi nüè",属垣有耳:"zhǔ yuán yǒu ěr",属毛离里:"zhǔ máo lí lǐ",属辞比事:"zhǔ cí bǐ shì",逐物不还:"zhú wù bù huán",铢量寸度:"zhū liáng cùn duó",铢两悉称:"zhū liǎng xī chèn",侏儒观戏:"zhū rú guān xì",朱轓皁盖:"zhū fān zào gài",昼度夜思:"zhòu duó yè sī",诪张为幻:"zhōu zhāng wéi huàn",重明继焰:"chóng míng jì yàn",众啄同音:"zhòng zhuó tóng yīn",众毛攒裘:"zhòng máo cuán qiú",众好众恶:"zhòng hào zhòng wù",擿埴索涂:"zhāi zhí suǒ tú",稚齿婑媠:"zhì chǐ wǒ tuó",至当不易:"zhì dàng bú yì",指皂为白:"zhǐ zào wéi bái",指雁为羹:"zhǐ yàn wéi gēng",指树为姓:"zhǐ shù wéi xìng",指山说磨:"zhǐ shān shuō mò",止戈为武:"zhǐ gē wéi wǔ",枝干相持:"zhī gàn xiāng chí",枝大于本:"zh dà yú běn",支吾其词:"zhī wú qí cí",正身率下:"zhèng shēn shuài xià",正冠李下:"zhèng guàn lǐ xià",整冠纳履:"zhěng guān nà lǚ",整躬率物:"zhěng gōng shuài wù",整顿干坤:"zhěng dùn gàn kūn",针头削铁:"zhēn tóu xuē tiě",贞松劲柏:"zhēn sōng jìng bǎi",赭衣塞路:"zhě yī sè lù",折箭为誓:"shé jiàn wéi shì",折而族之:"zhé ér zú zhī",昭德塞违:"zhāo dé sè wéi",章句小儒:"zhāng jù xiǎo rú",湛恩汪濊:"zhàn ēn wāng huì",占风望气:"zhān fēng wàng qì",斩将搴旗:"zhǎn jiàng qiān qí",曾母投杼:"zēng mǔ tóu zhù",曾参杀人:"zēng shēn shā rén",造谣中伤:"zào yáo zhòng shāng",早占勿药:"zǎo zhān wù yào",凿龟数策:"záo guī shǔ cè",攒三聚五:"cuán sān jù wǔ",攒眉蹙额:"cuán mei cù é",攒零合整:"cuán líng hé zhěng",攒锋聚镝:"cuán fēng jù dí",载笑载言:"zài xiào zài yán",载酒问字:"zài jiǔ wèn zì",殒身不恤:"yǔn shēn bú xù",云舒霞卷:"yún shū xiá juǎn",月中折桂:"yuè zhōng shé guì",月落参横:"yuè luò shēn héng",鬻驽窃价:"yù nú qiè jià",鬻鸡为凤:"yù jī wéi fèng",遇难成祥:"yù nàn chéng xiáng",郁郁累累:"yù yù lěi lěi",玉卮无当:"yù zhī wú dàng",语笑喧阗:"yǔ xiào xuān tián",与世沉浮:"yǔ shì chén fú",与时消息:"yǔ shí xiāo xi",逾墙钻隙:"yú qiáng zuān xì",渔夺侵牟:"yú duó qīn móu",杅穿皮蠹:"yú chuān pí dù",余勇可贾:"yú yǒng kě gǔ",予智予雄:"yú zhì yú xióng",予取予求:"yú qǔ yú qiú",于家为国:"yú jiā wéi guó",有借无还:"yǒu jiè wú huán",有加无已:"yǒu jiā wú yǐ",有国难投:"yǒu guó nán tóu",游必有方:"yóu bì yǒu fāng",油干灯尽:"yóu gàn dēng jìn",尤云殢雨:"yóu yún tì yǔ",庸中皦皦:"yōng zhōng jiǎo jiǎo",郢书燕说:"yǐng shū yān shuō",营蝇斐锦:"yíng yíng fēi jǐn",鹰心雁爪:"yīng xīn yàn zhǎo",莺吟燕儛:"yīng yín yàn wǔ",应天顺时:"yīng tiān shùn shí",印累绶若:"yìn léi shòu ruò",隐占身体:"yǐn zhàn shēn tǐ",饮犊上流:"yìn dú shàng liú",引绳切墨:"yǐn shéng qiē mò",龈齿弹舌:"yín chǐ dàn shé",因缘为市:"yīn yuán wéi shì",因树为屋:"yīn shù wéi wū",溢美溢恶:"yì měi yì wù",抑塞磊落:"yì sè lěi luò",倚闾望切:"yǐ lǘ wàng qiē",以意为之:"yǐ yì wéi zhī",以言为讳:"yǐ yán wéi huì",以疏间亲:"yǐ shū jiàn qīn",以水济水:"yǐ shuǐ jǐ shuǐ",以书为御:"yǐ shū wéi yù",以守为攻:"yǐ shǒu wéi gōng",以升量石:"yǐ shēng liáng dàn",以慎为键:"yǐ shèn wéi jiàn",以筌为鱼:"yǐ quán wéi yú",以利累形:"yǐ lì lěi xíng",以毁为罚:"yǐ huǐ wéi fá",以黑为白:"yǐ hēi wéi bái",以规为瑱:"yǐ guī wéi tiàn",以古为鉴:"yǐ gǔ wéi jiàn",以宫笑角:"yǐ gōng xiào jué",以法为教:"yǐ fǎ wéi jiào",以大恶细:"yǐ dà wù xì",遗世忘累:"yí shì wàng lěi",遗寝载怀:"yí qǐn zài huái",移的就箭:"yí dì jiù jiàn",依头缕当:"yī tóu lǚ dàng",衣租食税:"yì zū shí shuì",衣轻乘肥:"yì qīng chéng féi",衣裳之会:"yī shang zhī huì",衣单食薄:"yī dān shí bó",一还一报:"yì huán yí bào",叶公好龙:"yè gōng hào lóng",野调无腔:"yě diào wú qiāng",瑶池女使:"yáo chí nǚ shǐ",幺麽小丑:"yāo mó xiǎo chǒu",养精畜锐:"yǎng jīng xù ruì",卬首信眉:"áng shǒu shēn méi",洋洋纚纚:"yáng yáng sǎ sǎ",羊羔美酒:"yáng gāo měi jiǔ",扬风扢雅:"yáng fēng jié yǎ",燕昭市骏:"yān zhāo shì jùn",燕昭好马:"yān zhāo hǎo mǎ",燕石妄珍:"yān shí wàng zhēn",燕骏千金:"yān jùn qiān jīn",燕金募秀:"yān jīn mù xiù",燕驾越毂:"yān jià yuè gǔ",燕歌赵舞:"yān gē zhào wǔ",燕岱之石:"yān dài zhī shí",燕处危巢:"yàn chǔ wēi cháo",掞藻飞声:"shàn zǎo fēi shēng",偃革为轩:"yǎn gé wéi xuān",妍蚩好恶:"yán chī hǎo è",压良为贱:"yā liáng wéi jiàn",搀行夺市:"chān háng duó shì",泣数行下:"qì shù háng xià",当行出色:"dāng háng chū sè",秀出班行:"xiù chū bān háng",儿女成行:"ér nǚ chéng háng",大行大市:"dà háng dà shì",寻行数墨:"xún háng shǔ mò",埙篪相和:"xūn chí xiāng hè",血债累累:"xuè zhài lěi lěi",炫玉贾石:"xuàn yù gǔ shí",炫石为玉:"xuàn shí wéi yù",悬石程书:"xuán dàn chéng shū",悬狟素飡:"xuán huán sù cān",悬龟系鱼:"xuán guī xì yú",揎拳捋袖:"xuān quán luō xiù",轩鹤冠猴:"xuān hè guàn hóu",畜妻养子:"xù qī yǎng zǐ",羞人答答:"xiū rén dā dā",修鳞养爪:"xiū lín yǎng zhǎo",熊据虎跱:"xióng jù hǔ zhì",兄死弟及:"xiōng sǐ dì jí",腥闻在上:"xīng wén zài shàng",兴文匽武:"xīng wén yǎn wǔ",兴观群怨:"xìng guān qún yuàn",兴高彩烈:"xìng gāo cǎi liè",心手相应:"xīn shǒu xiāng yìng",心口相应:"xīn kǒu xiāng yīng",挟势弄权:"xié shì nòng quán",胁肩累足:"xié jiān lěi zú",校短量长:"jiào duǎn liáng cháng",小眼薄皮:"xiǎo yǎn bó pí",硝云弹雨:"xiāo yún dàn yǔ",鸮鸣鼠暴:"xiāo míng shǔ bào",削株掘根:"xuē zhū jué gēn",削铁无声:"xuē tiě wú shēng",削职为民:"xuē zhí wéi mín",削木为吏:"xuē mù wéi lì",想望风褱:"xiǎng wàng fēng huái",香培玉琢:"xiang pei yu zhuó",相鼠有皮:"xiàng shǔ yǒu pí",相时而动:"xiàng shí ér dòng",相切相磋:"xiāng qiē xiāng cuō",相女配夫:"xiàng nǚ pèi fū",相门有相:"xiàng mén yǒu xiàng",挦章撦句:"xián zhāng chě jù",先我着鞭:"xiān wǒ zhuó biān",习焉不察:"xí yān bù chá",歙漆阿胶:"shè qī ē jiāo",晰毛辨发:"xī máo biàn fà",悉索薄赋:"xī suǒ bó fù",雾鳞云爪:"wù lín yún zhǎo",物稀为贵:"wù xī wéi guì",碔砆混玉:"wǔ fū hùn yù",武断专横:"wǔ duàn zhuān héng",五石六鹢:"wǔ shí liù yì",五色相宣:"wǔ sè xiāng xuān",五侯七贵:"wǔ hóu qī guì",五侯蜡烛:"wǔ hòu là zhú",五羖大夫:"wǔ gǔ dà fū",吾自有处:"wú zì yǒu chǔ",无下箸处:"wú xià zhù chǔ",无伤无臭:"wú shāng wú xiù",无能为役:"wú néng wéi yì",无寇暴死:"wú kòu bào sǐ",无孔不钻:"wú kǒng bú zuàn",无间可乘:"wú jiān kě chéng",无间冬夏:"wú jiān dōng xià",无恶不为:"wú è bù wéi",无动为大:"wú dòng wéi dà",诬良为盗:"wū liáng wéi dào",握拳透爪:"wò quán tòu zhǎo",文武差事:"wén wǔ chāi shì",委委佗佗:"wēi wēi tuó tuó",惟日为岁:"wéi rì wéi suì",帷薄不修:"wéi bó bù xiū",为善最乐:"wéi shàn zuì lè",为山止篑:"wéi shān zhǐ kuì",为仁不富:"wéi rén bú fù",为裘为箕:"wéi qiú wéi jī",为民父母:"wéi mín fù mǔ",为虺弗摧:"wéi huǐ fú cuī",为好成歉:"wéi hǎo chéng qiàn",为鬼为蜮:"wéi guǐ wéi yù",望风响应:"wàng fēng xiǎng yīng",望尘僄声:"wàng chén piào shēng",往渚还汀:"wǎng zhǔ huán tīng",王贡弹冠:"wáng gòng dàn guàn",亡国大夫:"wáng guó dà fū",万贯家私:"wàn guàn jiā sī",晚食当肉:"wǎn shí dàng ròu",晚节不保:"wǎn jié bù bǎo",玩岁愒时:"wán suì kài shí",蛙蟆胜负:"wā má shèng fù",吞言咽理:"tūn yán yàn lǐ",颓垣断堑:"tuí yuán duàn qiàn",推干就湿:"tuī gàn jiù shī",剸繁决剧:"tuán fán jué jù",团头聚面:"tuán tóu jù miàn",兔丝燕麦:"tù sī yàn mài",兔头麞脑:"tù tóu zhāng nǎo",兔葵燕麦:"tù kuí yàn mài",吐哺握发:"tǔ bǔ wò fà",投传而去:"tóu zhuàn ér qù",头没杯案:"tóu mò bēi àn",头昏脑闷:"tóu hūn nǎo mèn",头会箕敛:"tóu kuài jī liǎn",头出头没:"tóu chū tóu mò",痛自创艾:"tòng zì chuāng yì",同恶相助:"tóng wù xiāng zhù",同恶相恤:"tóng wù xiāng xù",痌瘝在抱:"tōng guān zài bào",通文调武:"tōng wén diào wǔ",停留长智:"tíng liú zhǎng zhì",铁树开华:"tiě shù kāi huā",条贯部分:"tiáo guàn bù fēn",挑牙料唇:"tiǎo yá liào chún",挑么挑六:"tiāo yāo tiāo liù",挑唇料嘴:"tiǎo chún liào zuǐ",恬不为意:"tián bù wéi yì",恬不为怪:"tián bù wéi guài",天下为笼:"tiān xià wéi lóng",天台路迷:"tiān tái lù mí",天年不遂:"tiān nián bú suì",探囊胠箧:"tàn náng qū qiè",谭言微中:"tán yán wēi zhòng",谈言微中:"tán yán wēi zhòng",狧穅及米:"shì kāng jí mǐ",随物应机:"suí wù yīng jī",搜岩采干:"sōu yán cǎi gàn",宋斤鲁削:"sòng jīn lǔ xuē",松筠之节:"sōng yún zhī jié",四亭八当:"sì tíng bā dàng",四马攒蹄:"sì mǎ cuán tí",四不拗六:"sì bú niù liù",思所逐之:"sī suǒ zhú zhī",丝恩发怨:"sī ēn fà yuàn",硕望宿德:"shuò wàng xiǔ dé",铄古切今:"shuò gǔ qiē jīn",顺风而呼:"shùn fēng ér hū",顺风吹火:"shùn fēng chuī huǒ",水中著盐:"shuǐ zhōng zhuó yán",双柑斗酒:"shuāng gān dǒu jiǔ",数米而炊:"shǔ mǐ ér chuī",数米量柴:"shǔ mǐ liáng chái",数理逻辑:"shù lǐ luó ji",数黑论黄:"shǔ hēi lùn huáng",数白论黄:"shǔ bái lùn huáng",束缊还妇:"shù yūn huán fù",束蒲为脯:"shù pú wéi pú",束椽为柱:"shù chuán wéi zhù",书缺有间:"shū quē yǒu jiàn",手足重茧:"shǒu zú chóng jiǎn",手足异处:"shǒu zú yì chǔ",手脚干净:"shǒu jiǎo gàn jìng",手不应心:"shǒu bù yīng xīn",螫手解腕:"shì shǒu jiě wàn",释知遗形:"shì zhī yí xíng",适时应务:"shì shí yīng wù",适情率意:"shì qíng shuài yì",适当其冲:"shì dāng qí chōng",视为知己:"shì wéi zhī jǐ",使羊将狼:"shǐ yáng jiàng láng",食为民天:"shí wéi mín tiān",拾掇无遗:"shí duō wú yí",实与有力:"shí yù yǒu lì",石英玻璃:"shí yīng bō li",石室金匮:"shí shì jīn guì",什袭珍藏:"shí xí zhēn cáng",什伍东西:"shí wǔ dōng xī",什围伍攻:"shí wéi wǔ gōng",十魔九难:"shí mó jiǔ nàn",诗书发冢:"shī shū fà zhǒng",虱处裈中:"shī chǔ kūn zhōng",师直为壮:"shī zhí wéi zhuàng",尸居龙见:"shī jū lóng xiàn",圣经贤传:"shèng jīng xián zhuàn",圣君贤相:"shèng jūn xián xiàng",生拖死拽:"shēng tuō sǐ zhuài",审己度人:"shěn jǐ duó rén",神武挂冠:"shén wǔ guà guàn",神龙失埶:"shén lóng shī shì",深文曲折:"shēn wén qǔ shé",深厉浅揭:"shēn lì qiǎn qì",深谷为陵:"shēn gǔ wéi líng",深恶痛疾:"shēn wù tòng jí",深仇宿怨:"shēn chóu xiǔ yuàn",舍己为公:"shě jǐ wèi gōng",舍短取长:"shě duǎn qǔ cháng",舍策追羊:"shě cè zhuī yáng",蛇蝎为心:"shé xiē wéi xīn",少成若性:"shào chéng ruò xìng",上当学乖:"shàng dàng xué guāi",赏不当功:"shǎng bù dāng gōng",善自为谋:"shàn zì wéi móu",善为说辞:"shàn wéi shuō cí",善善恶恶:"shàn shàn wù è",善财难舍:"shàn cái nán shě",苫眼铺眉:"shān yǎn pū méi",讪牙闲嗑:"shàn yá xián kē",山阴乘兴:"shān yīn chéng xīng",山殽野湋:"shān yáo yě wéi",山溜穿石:"shān liù chuān shí",山节藻棁:"shān jié zǎo zhuō",杀鸡为黍:"shā jī wéi shǔ",色厉胆薄:"sè lì dǎn bó",桑荫未移:"sāng yīn wèi yí",桑荫不徙:"sāng yīn bù xǐ",桑土绸缪:"sāng tǔ chóu miù",桑户棬枢:"sāng hù juàn shū",三战三北:"sān zhàn sān běi",三瓦两舍:"sān wǎ liǎng shě",三人为众:"sān rén wèi zhòng",三差两错:"sān chā liǎng cuò",塞井焚舍:"sāi jǐng fén shě",洒心更始:"sǎ xīn gèng shǐ",洒扫应对:"sǎ sǎo yìng duì",软红香土:"ruǎn hóng xiāng tǔ",入吾彀中:"rù wú gòu zhōng",入铁主簿:"rù tiě zhǔ bù",入理切情:"rù lǐ qiē qíng",汝成人耶:"rǔ chéng rén yé",如水投石:"rú shuǐ tóu shí",如切如磋:"rú qiē rú cuō",如登春台:"rú dēng chūn tái",肉薄骨并:"ròu bó gǔ bìng",柔情绰态:"róu qíng chuò tài",戎马劻勷:"róng mǎ kuāng ráng",日中为市:"rì zhōng wéi shì",日月参辰:"rì yuè shēn chén",日省月修:"rì xǐng yuè xiū",日削月割:"rì xuē yuè gē",日省月试:"rì xǐng yuè shì",任达不拘:"rèn dá bù jū",人言藉藉:"rén yán jí jí",人模狗样:"rén mú gǒu yàng",人莫予毒:"rén mò yú dú",热熬翻饼:"rè áo fān bǐng",圈牢养物:"juàn láo yǎng wù",取予有节:"qǔ yǔ yǒu jié",诎要桡腘:"qū yāo ráo guó",穷形尽相:"qióng xíng jìn xiàng",情凄意切:"qíng qī yì qiè",情见势屈:"qíng xiàn shì qū",情见乎辞:"qíng xiàn hū cí",清都绛阙:"qīng dōu jiàng què",倾肠倒肚:"qīng cháng dào dǔ",青紫被体:"qīng zǐ pī tǐ",青林黑塞:"qīng lín hēi sài",螓首蛾眉:"qín shǒu é méi",琴瑟之好:"qín sè zhī hào",且住为佳:"qiě zhù wéi jiā",切树倒根:"qiē shù dǎo gēn",切理餍心:"qiē lǐ yàn xīn",切近的当:"qiē jìn de dāng",翘足引领:"qiáo zú yǐn lǐng",巧发奇中:"qiǎo fā qí zhòng",强嘴拗舌:"jiàng zuǐ niù shé",强直自遂:"qiáng zhí zì suí",强死强活:"qiǎng sǐ qiǎng huó",强食自爱:"qiǎng shí zì ài",强食靡角:"qiǎng shí mí jiǎo",强弓劲弩:"qiáng gōng jìng nǔ",强聒不舍:"qiǎng guō bù shě",强凫变鹤:"qiáng fú biàn hè",强而后可:"qiǎng ér hòu kě",强得易贫:"qiǎng dé yì pín",遣兴陶情:"qiǎn xìng táo qíng",牵羊担酒:"qiān yáng dān jiǔ",千了百当:"qiān liǎo bǎi dàng",泣下如雨:"qì xià rú yǔ",起偃为竖:"qǐ yǎn wéi shù",岂弟君子:"kǎi tì jūn zǐ",綦溪利跂:"qí xī lì qí",棋输先著:"qí shū xiān zhuó",齐王舍牛:"qí wáng shě niú",欺天诳地:"qī tiān kuáng dì",普天率土:"pǔ tiān shuài tǔ",铺胸纳地:"pū xiōng nà dì",铺锦列绣:"pū jǐn liè xiù",破家为国:"pò jiā wèi guó",破觚为圜:"pò gū wéi yuán",萍飘蓬转:"píng piāo péng zhuàn",帡天极地:"píng tiān jí dì",屏声息气:"bǐng shēng xī qì",凭几据杖:"píng jī jù zhàng",贫嘴薄舌:"pín zuǐ bó shé",片语只辞:"piàn yǔ zhī cí",披发文身:"pī fà wén shēn",烹龙炮凤:"pēng lóng páo fèng",炰鳖脍鲤:"fǒu biē kuài lǐ",庞眉皓发:"páng méi hào fà",攀花折柳:"pān huā zhé liǔ",攀蟾折桂:"pān chán shé guì",女大难留:"nǚ dà nán liú",弄玉吹箫:"nòng yù chuī xiāo",弄管调弦:"nòng guǎn tiáo xián",弄粉调朱:"nòng fěn diào zhū",浓抹淡妆:"nóng mò dàn zhuāng",捻土为香:"niǎn tǔ wéi xiāng",年谊世好:"nián yì shì hǎo",年华垂暮:"nián huá chuí mù",儗不于伦:"nǐ bù yú lún",泥而不滓:"ní ér bù zǐ",能者为师:"néng zhě wéi shī",能不称官:"néng bú chèn guān",挠直为曲:"náo zhí wéi qū",难进易退:"nán jìn yì tuì",难得糊涂:"nán dé hú tú",南蛮鴂舌:"nán mán jué shé",南贩北贾:"nán fàn běi gǔ",牧猪奴戏:"mù zhū nú xì",目眢心忳:"mù yuān xīn tún",目挑心招:"mù tiǎo xīn zhāo",目量意营:"mù liàng yì yíng",木头木脑:"mù tóu mù nǎo",木干鸟栖:"mù gàn niǎo qī",侔色揣称:"móu sè chuǎi chèn",莫予毒也:"mò yú dú yě",抹粉施脂:"mò fěn shī zhī",磨砻镌切:"mó lóng juān qiē",磨棱刓角:"mó léng wán jiǎo",摸门不着:"mō mén bù zháo",摸不着边:"mō bù zhuó biān",命中注定:"mìng zhōng zhù dìng",鸣鹤之应:"míng hè zhī yìng",明效大验:"míng xiào dà yàn",名我固当:"míng wǒ gù dāng",邈处欿视:"miǎo chǔ kǎn shì",黾穴鸲巢:"měng xué qú cháo",绵里薄材:"mián lǐ bó cái",靡有孑遗:"mǐ yǒu jié yí",靡衣偷食:"mǐ yī tōu shí",迷恋骸骨:"mí liàn hái gǔ",扪参历井:"mén shēn lì jǐng",门单户薄:"mén dān hù bó",昧旦晨兴:"mèi dàn chén xīng",冒名接脚:"mào míng jiē jiǎo",毛遂堕井:"máo suí duò jǐng",毛发倒竖:"máo fā dǎo shù",卖文为生:"mài wén wéi shēng",卖李钻核:"mài lǐ zuān hé",买椟还珠:"mǎi dú huán zhū",埋三怨四:"mán sān yuàn sì",马入华山:"mǎ rù huá shān",落魄江湖:"luò pò jiāng hú",落落难合:"luò luò nán hé",落草为寇:"luò cǎo wéi kòu",罗织构陷:"luó zhī gòu xiàn",鸾凤和鸣:"luán fèng hè míng",率由旧章:"shuài yóu jiù zhāng",率土同庆:"shuài tǔ tóng qìng",率兽食人:"shuài shòu shí rén",率土归心:"shuài tǔ guī xīn",率马以骥:"shuài mǎ yǐ jì",率尔成章:"shuài ěr chéng zhāng",鲁斤燕削:"lǔ jīn yàn xuē",漏尽更阑:"lòu jìn gēng lán",笼鸟槛猿:"lóng niǎo jiàn yuán",笼鸟池鱼:"lóng niǎo chí yú",龙游曲沼:"lóng yóu qū zhǎo",龙血玄黄:"lóng xuè xuán huáng",龙雕凤咀:"lóng diāo fèng jǔ",六尺之讬:"liù chǐ zhī tuō",令原之戚:"líng yuán zhī qī",令人捧腹:"lìng rén pěng fù",陵劲淬砺:"líng jìng cuì lì",临敌易将:"lín dí yì jiàng",裂裳衣疮:"liè shang yī chuāng",裂冠毁冕:"liè guàn huǐ miǎn",了无惧色:"liǎo wú jù sè",了身达命:"liǎo shēn dá mìng",了然无闻:"liǎo rán wú wén",了不可见:"liǎo bù kě jiàn",了不长进:"liǎo bù zhǎng jìn",燎发摧枯:"liǎo fà cuī kū",审时度势:"shěn shí duó shì",量小力微:"liàng xiǎo lì wēi",相时度力:"xiāng shí duó lì",量枘制凿:"liàng ruì zhì záo",量如江海:"liàng rú jiāng hǎi",量金买赋:"liàng jīn mǎi fù",量己审分:"liàng jǐ shěn fēn",敛骨吹魂:"liǎn gǔ chuī hún",詈夷为跖:"lì yí wéi zhí",利令志惛:"lì lìng zhì hūn",李广不侯:"lǐ guǎng bú hòu",礼为情貌:"lǐ wéi qíng mào",礼让为国:"lǐ ràng wéi guó",犁生骍角:"lí shēng xīng jiǎo",离本徼末:"lí běn jiǎo mò",楞眉横眼:"léng méi hèng yǎn",擂天倒地:"léi tiān dǎo dì",累足成步:"lěi zú chéng bù",累瓦结绳:"lěi wǎ jié shéng",累土至山:"lěi tǔ zhì shān",累土聚沙:"lěi tǔ jù shā",累卵之危:"lěi luǎn zhī wēi",累累如珠:"lěi lěi rú zhū",累块积苏:"lěi kuài jī sū",乐山乐水:"lè shān lè shuǐ",潦原浸天:"lǎo yuán jìn tiān",老师宿儒:"lǎo shī xiǔ rú",牢什古子:"láo shí gǔ zi",琅嬛福地:"láng huán fú dì",揆情度理:"kuí qíng duó lǐ",旷日累时:"kuàng rì lěi shí",匡救弥缝:"kuāng jiù mí fèng",枯树生华:"kū shù shēng huā",口轻舌薄:"kǒu qīng shé bó",口角生风:"kǒu jiǎo shēng fēng",口角春风:"kǒu jiǎo chūn fēng",口角风情:"kǒu jiǎo fēng qíng",口干舌焦:"kǒu gān shé jiāo",口腹之累:"kǒu fù zhī lěi",空腹便便:"kōng fù pián pián",嗑牙料嘴:"kē yá liào zuǐ",刻木为鹄:"kè mù wéi hú",咳珠唾玉:"ké zhū tuò yù",咳唾成珠:"ké tuò chéng zhū",抗颜为师:"kàng yán wéi shī",开华结果:"kāi huā jié guǒ",峻阪盐车:"jùn bǎn yán chē",嚼铁咀金:"jiáo tiě jǔ jīn",嚼墨喷纸:"jué mò pēn zhǐ",倔头强脑:"juè tóu jiàng nǎo",倔头倔脑:"juè tóu juè nǎo",倦鸟知还:"juàn niǎo zhī huán",卷席而葬:"juǎn xí ér zàng",卷甲倍道:"juǎn jiǎ bèi dào",聚米为山:"jù mǐ wéi shān",举手相庆:"jǔ shǒu xiāng qìng",举世混浊:"jǔ shì hún zhuó",鞠为茂草:"jū wéi mào cǎo",拘神遣将:"jū shén qiǎn jiàng",居下讪上:"jū xià shàn shàng",久要不忘:"jiǔ yāo bú wàng",九转功成:"jiǔ zhuǎn gōng chéng",九蒸三熯:"jiǔ zhēng sān hàn",敬业乐群:"jìng yè lè qún",井底虾蟆:"jǐng dǐ xiā má",旌旗卷舒:"jīng qí juǎn shū",荆棘载途:"jīng jí zài tú",禁舍开塞:"jìn shě kāi sāi",祲威盛容:"jìn wēi shèng róng",进退消长:"jìn tuì xiāo cháng",进退应矩:"jìn tuì yīng jǔ",进退触籓:"jìn tuì chù fān",进退跋疐:"jìn tuì bá zhì",尽多尽少:"jǐn duō jǐn shǎo",锦囊还矢:"jǐn náng huán shǐ",矜己自饰:"jīn jǐ zì shì",矜功负气:"jīn gōng fù qì",津关险塞:"jīn guān xiǎn sài",金吾不禁:"jīn wú bú jìn",金翅擘海:"jīn chì bāi hǎi",解衣衣人:"jiě yī yī rén",解人难得:"jiě rén nán dé",解铃系铃:"jiě líng xì líng",解发佯狂:"jiě fà yáng kuáng",诘屈磝碻:"jié qū áo qiāo",教猱升木:"jiāo náo shēng mù",较瘦量肥:"jiào shòu liàng féi",角立杰出:"jiǎo lì jié chū",焦沙烂石:"jiāo shā làn shí",骄儿騃女:"jiāo ér sì nǚ",浇风薄俗:"jiāo fēng bó sú",降妖捉怪:"xiáng yāo zhuō guài",将取固予:"jiāng qǔ gù yǔ",将门有将:"jiàng mén yǒu jiàng",将夺固与:"jiāng duó gù yǔ",槛花笼鹤:"jiàn huā lóng hè",鉴影度形:"jiàn yǐng duó xíng",渐不可长:"jiàn bù kě zhǎng",见素抱朴:"xiàn sù bào pǔ",见弃于人:"jiàn qì yú rén",简丝数米:"jiǎn sī shǔ mǐ",俭不中礼:"jiǎn bú zhòng lǐ",间见层出:"jiàn xiàn céng chū",尖嘴薄舌:"jiān zuǐ bó shé",甲冠天下:"jiǎ guàn tiān xià",葭莩之亲:"jiā fú zhī qīn",家累千金:"jiā lèi qiān jīn",家给人足:"jiā jǐ rén zú",家道从容:"jiā dào cóng róng",夹袋人物:"jiā dài rén wù",霁风朗月:"jì fēng lǎng yuè",寄兴寓情:"jì xìng yù qíng",计深虑远:"jì shēn lǜ yuǎn",计功量罪:"jì gōng liàng zuì",掎裳连襼:"jǐ shang lián yì",虮虱相吊:"jǐ shī xiāng diào",疾不可为:"jí bù kě wéi",极深研几:"jí shēn yán jī",及宾有鱼:"jí bīn yǒu yú",激薄停浇:"jī bó tíng jiāo",积素累旧:"jī sù lěi jiù",积时累日:"jī shí lěi rì",积露为波:"jī lù wéi bō",积德累功:"jī dé lěi gōng",积谗糜骨:"jī chán méi gǔ",击排冒没:"jī pái mào mò",祸为福先:"huò wéi fú xiān",祸福相依:"huò fú xiāng yī",获隽公车:"huò jùn gōng chē",混应滥应:"hùn yīng làn yīng",毁舟为杕:"huǐ zhōu wéi duò",毁钟为铎:"huǐ zhōng wéi duó",毁冠裂裳:"huǐ guān liè cháng",晦盲否塞:"huì máng pǐ sè",回船转舵:"huí chuán zhuàn duò",潢池盗弄:"huáng chí dào nòng",黄冠草履:"huáng guàn cǎo lǚ",黄发儿齿:"huáng fà ér chǐ",黄发垂髫:"huáng fà chuí tiáo",还珠返璧:"huán zhū fǎn bì",还年驻色:"huán nián zhù sè",还年却老:"huán nián què lǎo",坏裳为裤:"huài shang wéi kù",画荻和丸:"huà dí huò wán",化枭为鸠:"huà xiāo wéi jiū",化腐为奇:"huà fǔ wéi qí",化鸱为凤:"huà chī wéi fèng",花不棱登:"huā bu lēng dēng",户限为穿:"hù xiàn wéi chuān",呼卢喝雉:"hū lú hè zhì",呼来喝去:"hū lái hè qù",呼不给吸:"hū bù jǐ xī",厚味腊毒:"hòu wèi xī dú",厚德载物:"hòu dé zài wù",鸿渐于干:"hóng jiàn yú gàn",洪炉燎发:"hóng lú liáo fà",红绳系足:"hóng shéng jì zú",红不棱登:"hóng bu lēng dēng",横抢硬夺:"hèng qiǎng yìng duó",横恩滥赏:"hèng ēn làn shǎng",恨海难填:"hèn hǎi nán tián",鹤发鸡皮:"hè fà jī pí",涸思干虑:"hé sī gān lǜ",河涸海干:"hé hé hǎi gān",和颜说色:"hé yán yuè sè",合从连衡:"hé zòng lián héng",浩浩汤汤:"hào hào shāng shāng",好勇斗狠:"hào yǒng dòu hěn",好问则裕:"hào wèn zé yù",好为事端:"hào wéi shì duān",好问决疑:"hào wèn jué yí",好生之德:"hào shēng zhī dé",好奇尚异:"hǎo qí shàng yì",好恶不同:"hǎo è bù tóng",好丹非素:"hào dān fēi sù",豪干暴取:"háo gàn bào qǔ",毫发不爽:"háo fà bù shuǎng",寒酸落魄:"hán suān luò pò",含英咀华:"hán yīng jǔ huá",含糊不明:"hán hú bù míng",过为已甚:"guò wéi yǐ shèn",桂折兰摧:"guì shé lán cuī",规旋矩折:"guī xuán jǔ shé",广文先生:"guǎng wén xiān sheng",广陵散绝:"guǎng líng sǎn jué",冠山戴粒:"guàn shān dài lì",冠屦倒施:"guàn jù dǎo shī",挂席为门:"guà xí wéi mén",寡见鲜闻:"guǎ jiàn xiǎn wén",瓜葛相连:"guā gé xiāng lián",鼓吻奋爪:"gǔ wěn fèn zhǎo",古调单弹:"gǔ diào dān tán",古调不弹:"gǔ diào bù tán",姑射神人:"gū yè shén rén",苟合取容:"gǒu hé qǔ róng",狗续侯冠:"gǒu xù hòu guàn",钩爪锯牙:"gōu zhǎo jù yá",共枝别干:"gòng zhī bié gàn",共为唇齿:"gòng wéi chún chǐ",拱手而降:"gǒng shǒu ér xiáng",拱肩缩背:"gǒng jiān suō bèi",功薄蝉翼:"gōng bó chán yì",弓调马服:"gōng diào mǎ fú",更姓改物:"gēng xìng gǎi wù",更仆难数:"gēng pú nán shǔ",更令明号:"gēng lìng míng hào",更待干罢:"gèng dài gàn bà",更唱迭和:"gēng chàng dié hé",更长梦短:"gēng cháng mèng duǎn",各色名样:"gè sè míng yàng",格格不纳:"gé gé bú nà",格格不吐:"gé gé bù tǔ",告朔饩羊:"gù shuò xì yáng",膏车秣马:"gào chē mò mǎ",高义薄云:"gāo yì bó yún",岗头泽底:"gāng tóu zé dǐ",敢为敢做:"gǎn wéi gǎn zuò",甘分随时:"gān fèn suí shí",甘处下流:"gān chǔ xià liú",干啼湿哭:"gàn tí shī kū",干名犯义:"gàn míng fàn yì",干将莫邪:"gān jiāng mò yé",干城之将:"gān chéng zhī jiàng",腹载五车:"fù zài wǔ chē",父债子还:"fù zhài zǐ huán",父为子隐:"fù wéi zǐ yǐn",辅世长民:"fǔ shì zhǎng mín",福为祸始:"fú wéi huò shǐ",符号逻辑:"fú hào luó jí",浮收勒折:"fú shōu lè shé",肤受之愬:"fū shòu zhī sù",否终则泰:"pǐ zhōng zé tài",佛头著粪:"fó tóu zhuó fèn",奉为楷模:"fèng wéi kǎi mó",凤靡鸾吪:"fèng mǐ luán é",封豨修蛇:"fēng xī xiū shé",风影敷衍:"fēng yǐng fū yǎn",丰屋蔀家:"fēng wū bù jiā",粪土不如:"fèn tǔ bù rú",分风劈流:"fēn fēng pǐ liú",沸沸汤汤:"fèi fèi shāng shāng",菲食薄衣:"fěi shí bó yī",飞将数奇:"fēi jiàng shù qí",放辟邪侈:"fàng pì xié chǐ",方领圆冠:"fāng lǐng yuán guàn",犯而不校:"fàn ér bú jiào",返本还源:"fǎn běn huán yuán",反劳为逸:"fǎn láo wéi yì",法轮常转:"fǎ lún cháng zhuàn",罚不当罪:"fá bù dāng zuì",发引千钧:"fà yǐn qiān jūn",发奸擿伏:"fā jiān tī fú",发短心长:"fà duǎn xīn cháng",二竖为虐:"èr shù wéi nüè",儿女心肠:"ér nǚ xīn cháng",儿女亲家:"ér nǚ qìng jiā",遏恶扬善:"è wù yáng shàn",饿殍枕藉:"è piǎo zhěn jí",饿殍载道:"è piǎo zài dào",恶醉强酒:"wù zuì qiǎng jiǔ",恶意中伤:"è yì zhòng shāng",恶湿居下:"wù shī jū xià",恶居下流:"wù jū xià liú",恶不去善:"wù bú qù shàn",扼吭夺食:"è háng duó shí",扼襟控咽:"è jīn kòng yān",峨峨汤汤:"é é shāng shāng",屙金溺银:"ē jīn niào yín",朵颐大嚼:"duǒ yí dà jiáo",夺人所好:"duó rén suǒ hào",多言数穷:"duō yán shuò qióng",多文为富:"duō wén wéi fù",多端寡要:"duō duān guǎ yào",多财善贾:"duō cái shàn gǔ",遁世无闷:"dùn shì wú mèn",遁迹黄冠:"dùn jì huáng guàn",堆案盈几:"duī àn yíng jī",断还归宗:"duàn huán guī zōng",短见薄识:"duǎn jiàn bó shí",蠹居棊处:"dù jū qí chǔ",度己以绳:"duó jǐ yǐ shéng",杜默为诗:"dù mò wéi shī",杜鹃啼血:"dù juān tí xuè",笃近举远:"dǔ jìn jǔ yuǎn",独有千秋:"dú yǒu qiān qiū",读书得间:"dú shū dé jiàn",斗转参横:"dǒu zhuǎn shēn héng",兜肚连肠:"dōu dǔ lián cháng",洞见症结:"dòng jiàn zhèng jié",恫疑虚喝:"dòng yí xū hè",动中窾要:"dòng zhōng kuǎn yào",东鸣西应:"dōng míng xī yīng",东鳞西爪:"dōng lín xī zhǎo",东量西折:"dōng liàng xī shé",东家西舍:"dōng jiā xī shè",东扯西拽:"dōng chě xī zhuāi",鼎铛有耳:"dǐng chēng yǒu ěr",鼎铛玉石:"dǐng chēng yù shí",钉头磷磷:"dīng tóu lín lín",跌宕不羁:"diē dàng bù jī",跌弹斑鸠:"diē dàn bān jiū",雕心雁爪:"diāo xīn yàn zhǎo",颠倒衣裳:"diān dǎo yī cháng",德薄能鲜:"dé bó néng xiǎn",得马折足:"dé mǎ shé zú",蹈其覆辙:"dǎo qí fù zhé",捣虚撇抗:"dǎo xū piē kàng",倒载干戈:"dào zài gān gē",倒裳索领:"dào cháng suǒ lǐng",倒果为因:"dào guǒ wéi yīn",叨在知己:"tāo zài zhī jǐ",叨陪末座:"tāo péi mò zuò",党豺为虐:"dǎng chái wéi nüè",当轴处中:"dāng zhóu chǔ zhōng",当着不着:"dāng zhuó bù zhuó",当务始终:"dāng wù shǐ zhōng",淡汝浓抹:"dàn rǔ nóng mǒ",弹丸脱手:"tán wán tuō shǒu",弹铗无鱼:"dàn jiá wú yú",箪食瓢饮:"dān sì piáo yǐn",大璞不完:"dà pú bù wán",大明法度:"dà míng fǎ dù",大车以载:"dà chē yǐ zài",打闷葫芦:"dǎ mèn hú lu",沓来踵至:"tà lái zhǒng zhì",厝火燎原:"cuò huǒ liǎo yuán",撮科打哄:"cuō kē dǎ hòng",寸积铢累:"cùn jī zhū lěi",啛啛喳喳:"cuì cuì chā chā",摧折豪强:"cuī zhé háo qiáng",摧刚为柔:"cuī gāng wéi róu",从俗就简:"cóng sú jiù jiǎn",此发彼应:"cǐ fā bǐ yīng",此唱彼和:"cǐ chàng bǐ hè",慈悲为本:"cí bēi wéi běn",纯属骗局:"chún shǔ piàn jú",春笋怒发:"chūn sǔn nù fā",垂头搨翼:"chuí tóu tà yì",传为笑谈:"chuán wéi xiào tán",传风扇火:"chuán fēng shān huǒ",穿红着绿:"chuān hóng zhuó lǜ",触处机来:"chù chǔ jī lái",处尊居显:"chǔ zūn jū xiǎn",处堂燕雀:"chǔ táng yàn què",处实效功:"chǔ shí xiào gōng",处高临深:"chǔ gāo lín shēn",出入无间:"chū rù wú jiān",出门应辙:"chū mén yīng zhé",出处语默:"chū chǔ yǔ mò",出处殊途:"chū chǔ shū tú",出处进退:"chū chǔ jìn tuì",愁山闷海:"chóu shān mèn hǎi",冲冠眦裂:"chōng guàn zì liè",齿牙为祸:"chǐ yá wéi huò",尺二冤家:"chǐ èr yuān jia",尺短寸长:"chǐ duǎn cùn cháng",尺寸之功:"chǐ cùn zhī gōng",城北徐公:"chéng běi xú gōng",成败兴废:"chéng bài xīng fèi",趁水和泥:"chèn shuǐ huò ní",称雨道晴:"chēng yǔ dào qíng",称体载衣:"chēng tǐ zài yī",称体裁衣:"chèn tǐ cái yī",称家有无:"chèn jiā yǒu wú",称德度功:"chēng dé duó gōng",沉吟章句:"chén yín zhāng jù",沉吟不决:"chén yín bù jué",沉疴宿疾:"chén kē sù jí",扯纤拉烟:"chě qiàn lā yān",扯顺风旗:"chě shùn fēng qí",车载船装:"chē zǎi chuán zhuāng",朝升暮合:"zhāo shēng mù gě",朝攀暮折:"zhāo pān mù shé",超今冠古:"chāo jīn guàn gǔ",倡而不和:"chàng ér bú hè",畅所欲为:"chàng suǒ yù wéi",苌弘碧血:"cháng hóng bì xiě",长幼尊卑:"zhǎng yòu zūn bēi",长绳系日:"cháng shéng jì rì",长年三老:"zhǎng nián sān lǎo",长春不老:"cháng chūn bù lǎo",长傲饰非:"zhǎng ào shì fēi",昌亭旅食:"chāng tíng lǚ shí",禅絮沾泥:"chán xù zhān ní",差三错四:"chā sān cuò sì",层台累榭:"céng tái lěi xiè",层见迭出:"céng xiàn dié chū",藏踪蹑迹:"cáng zōng niè jì",苍蝇见血:"cāng yíng jiàn xiě",餐松啖柏:"cān sōng dàn bó",骖风驷霞:"cān fēng sì xiá",参伍错综:"cēn wǔ cuò zōng",参辰卯酉:"shēn chén mǎo yǒu",材优干济:"cái yōu gān jǐ",材薄质衰:"cái bó zhì shuāi",才大难用:"cái dà nán yòng",才薄智浅:"cái bó zhì qiǎn",不足为意:"bù zú wéi yì",不足为据:"bù zú wéi jù",不足为法:"bù zú wéi fǎ",不足齿数:"bù zú chǐ shǔ",不着疼热:"bù zhuó téng rè",不知薡蕫:"bù zhī dǐng dǒng",不越雷池:"bú yuè léi chí",不相为谋:"bù xiāng wéi móu",不贪为宝:"bù tān wéi bǎo",不了而了:"bù liǎo ér liǎo",不可揆度:"bù kě kuí duó",不遑启处:"bù huáng qǐ chǔ",不当不正:"bù dāng bú zhèng",不差什么:"bú chà shén me",不差累黍:"bù chā lěi shǔ",擘两分星:"bò liǎng fēn xīng",簸土扬沙:"bǒ tǔ yáng shā",薄物细故:"bó wù xì gù",薄寒中人:"bó hán zhòng rén",博文约礼:"bó wén yuē lǐ",播糠眯目:"bō kāng mí mù",剥皮抽筋:"bō pí chōu jīn",剥肤椎髓:"bō fū chuí suǐ",波属云委:"bō zhǔ yún wěi",波骇云属:"bō hài yún zhǔ",兵微将寡:"bīng wēi jiàng guǎ",兵强将勇:"bīng qiáng jiàng yǒng",兵多将广:"bīng duō jiàng guǎng",兵不由将:"bīng bù yóu jiàng",冰解的破:"bīng jiě dì pò",彬彬济济:"bīn bīn jǐ jǐ",摽梅之年:"biào méi zhī nián",表里为奸:"biǎo lǐ wéi jiān",飙发电举:"biāo fā diàn jǔ",变贪厉薄:"biàn tān lì bó",敝盖不弃:"bì gài bú qì",秕言谬说:"bǐ yán miù shuō",比物属事:"bǐ wù zhǔ shì",被山带河:"pī shān dài hé",被甲枕戈:"pī jiǎ zhěn gē",被甲据鞍:"pī jiǎ jù ān",被褐怀玉:"pī hè huái yù",被发缨冠:"pī fà yīng guàn",背曲腰躬:"bèi qǔ yāo gōng",北窗高卧:"běi chuāng gāo wò",北辰星拱:"běi chén xīng gǒng",北鄙之音:"běi bǐ zhī yīn",卑宫菲食:"bēi gōng fěi shí",暴衣露冠:"pù yī lù guàn",暴腮龙门:"pù sāi lóng mén",暴露文学:"bào lù wén xué",暴虎冯河:"bào hǔ píng hé",抱蔓摘瓜:"bào wàn zhāi guā",抱法处势:"bào fǎ chǔ shì",褒贬与夺:"bāo biǎn yǔ duó",帮闲钻懒:"bāng xián zuān lǎn",拜将封侯:"bài jiàng fēng hóu",百兽率舞:"bǎi shòu shuài wǔ",百孔千创:"bǎi kǒng qiān chuāng",白衣卿相:"bái yī qīng xiàng",白首为郎:"bái shǒu wéi láng",白首相知:"bái shǒu xiāng zhī",把玩无厌:"bǎ wán wú yàn",拔锅卷席:"bá guō juǎn xí",拔本塞源:"bá běn sè yuán",傲不可长:"ào bù kě zhǎng",熬更守夜:"áo gēng shǒu yè",安时处顺:"ān shí chǔ shùn",安身为乐:"ān shēn wéi lè",安老怀少:"ān lǎo huái shào",安步当车:"ān bù dàng chē",爱人好士:"ài rén hào shì",矮人观场:"ǎi rén guān chǎng",捱风缉缝:"ái fēng jī fèng",挨山塞海:"āi shān sè hǎi",阿家阿翁:"ā jiā ā wēng",阿党相为:"ē dǎng xiāng wéi",追亡逐北:"zhuī wáng zhú běi",竹篮打水:"zhú lán dá shuǐ",知疼着热:"zhī téng zháo rè",语不惊人:"yǔ bù jīng rén",于今为烈:"yú jīn wéi liè",一日三省:"yí rì sān xǐng",穴居野处:"xué jū yě chǔ",五脊六兽:"wǔ jǐ liù shòu",无声无臭:"wú shēng wú xiù",谓予不信:"wèi yú bú xìn",舍身为国:"shě shēn wéi guó",杀妻求将:"shā qī qiú jiàng",强作解人:"qiǎng zuò jiě rén",气冲斗牛:"qì chōng dǒu niú",临深履薄:"lín shēn lǚ bó",钧天广乐:"jūn tiān guǎng yuè",艰难竭蹶:"jiān nán jié jué",夹七夹八:"jiā qī jiā bā",混混噩噩:"hún hún è è",厚古薄今:"hòu gǔ bó jīn",鬼怕恶人:"guǐ pà è rén",伽马射线:"gā mǎ shè xiàn",佛头着粪:"fó tóu zhuó fèn",奉为至宝:"fèng wéi zhì bǎo",登坛拜将:"dēng tán bài jiàng",晨昏定省:"chén hūn dìng xǐng",察察为明:"chá chá wéi míng",博闻强识:"bó wén qiáng zhì",避难就易:"bì nán jiù yì",了无生机:"liǎo wú shēng jī",有一说一:"yǒu yī shuō yī",独一无二:"dú yī wú èr",说一不二:"shuō yī bù èr",举一反三:"jǔ yī fǎn sān",数一数二:"shǔ yī shǔ èr",杀一儆百:"shā yī jǐng bǎi",丁一卯二:"dīng yī mǎo èr",丁一确二:"dīng yī què èr",不一而止:"bù yī ér zhǐ",无一幸免:"wú yī xìng miǎn",表里不一:"biǎo lǐ bù yī",良莠不一:"liáng yǒu bù yī",心口不一:"xīn kǒu bù yī",言行不一:"yán xíng bù yī",政令不一:"zhèng lìng bù yī",参差不一:"cēn cī bù yī",纷纷不一:"fēn fēn bù yī",毁誉不一:"huǐ yù bù yī",不一而三:"bù yī ér sān",百不一遇:"bǎi bù yī yù",言行抱一:"yán xíng bào yī",瑜百瑕一:"yú bǎi xiá yī",背城借一:"bèi chéng jiè yī",凭城借一:"píng chéng jiè yī",劝百讽一:"quàn bǎi fěng yī",群居和一:"qún jū hé yī",百不获一:"bǎi bù huò yī",百不失一:"bǎi bù shī yī",百无失一:"bǎi wú shī yī",万不失一:"wàn bù shī yī",万无失一:"wàn wú shī yī",合而为一:"hé ér wéi yī",合两为一:"hé liǎng wéi yī",合二为一:"hé èr wéi yī",天下为一:"tiān xià wéi yī",相与为一:"xiāng yǔ wéi yī",较若画一:"jiào ruò huà yī",较如画一:"jiào rú huà yī",斠若画一:"jiào ruò huà yī",言行若一:"yán xíng ruò yī",始终若一:"shǐ zhōng ruò yī",终始若一:"zhōng shǐ ruò yī",惟精惟一:"wéi jīng wéi yī",众多非一:"zhòng duō fēi yī",不能赞一:"bù néng zàn yī",问一答十:"wèn yī dá shí",一不扭众:"yī bù niǔ zhòng",一以贯之:"yī yǐ guàn zhī",一以当百:"yī yǐ dāng bǎi",百不当一:"bǎi bù dāng yī",十不当一:"shí bù dāng yī",以一警百:"yǐ yī jǐng bǎi",以一奉百:"yǐ yī fèng bǎi",以一持万:"yǐ yī chí wàn",以一知万:"yǐ yī zhī wàn",百里挑一:"bǎi lǐ tiāo yī",整齐划一:"zhěng qí huà yī",一来二去:"yī lái èr qù",一路公交:"yī lù gōng jiāo",一路汽车:"yī lù qì chē",一路巴士:"yī lù bā shì",朝朝朝落:"zhāo cháo zhāo luò",曲意逢迎:"qū yì féng yíng",一行不行:"yì háng bù xíng",行行不行:"háng háng bù xíng"},qne=Object.keys($C).map(e=>({zh:e,pinyin:$C[e],probability:2e-8,length:4,priority:xr.Normal,dict:Symbol("dict4")})),DC={巴尔干半岛:"bā ěr gàn bàn dǎo",巴尔喀什湖:"bā ěr kā shí hú",不幸而言中:"bú xìng ér yán zhòng",布尔什维克:"bù ěr shí wéi kè",何乐而不为:"hé lè ér bù wéi",苛政猛于虎:"kē zhèng měng yú hǔ",蒙得维的亚:"méng dé wéi dì yà",民以食为天:"mín yǐ shí wéi tiān",事后诸葛亮:"shì hòu zhū gě liàng",物以稀为贵:"wù yǐ xī wéi guì",先下手为强:"xiān xià shǒu wéi qiáng",行行出状元:"háng háng chū zhuàng yuan",亚得里亚海:"yà dé lǐ yà hǎi",眼不见为净:"yǎn bú jiàn wéi jìng",竹筒倒豆子:"zhú tǒng dào dòu zi"},Une=Object.keys(DC).map(e=>({zh:e,pinyin:DC[e],probability:2e-8,length:5,priority:xr.Normal,dict:Symbol("dict5")}));function zC(e,t){return e&&(e.decimal<t.decimal||e.decimal===t.decimal&&e.probability>t.probability)?e:t}function RC(e){e.probability<1e-300&&(e.probability*=1e300,e.decimal+=1)}function Kne(e){return e.priority===xr.Custom?-(e.length*e.length*100):e.priority===xr.Surname?-(e.length*e.length*10):0}function Vne(e,t){const n=[];let i=e.length-1,s=e[i];for(let o=t-1;o>=0;o--){const r=o+1>=t?{probability:1,decimal:0,patterns:[]}:n[o+1];for(;s&&s.index+s.length-1===o;){const a=s.index,u={probability:s.probability*r.probability,decimal:r.decimal+Kne(s),patterns:r.patterns,concatPattern:s};RC(u),n[a]=zC(n[a],u),s=e[--i]}const l={probability:1e-13*r.probability,decimal:0,patterns:r.patterns};RC(l),n[o]=zC(n[o],l),n[o].concatPattern&&(n[o].patterns=n[o].patterns.concat(n[o].concatPattern),n[o].concatPattern=void 0,delete n[o+1])}return n[0].patterns.reverse()}function OC(e,t){return e&&e.count<=t.count?e:t}function Zne(e){return e.priority===xr.Custom?-(e.length*e.length*1e5):e.priority===xr.Surname?-(e.length*e.length*100):1}function Gne(e,t){const n=[];let i=e.length-1,s=e[i];for(let o=t-1;o>=0;o--){const r=o+1>=t?{count:0,patterns:[]}:n[o+1];for(;s&&s.index+s.length-1===o;){const a=s.index,u={count:Zne(s)+r.count,patterns:r.patterns,concatPattern:s};n[a]=OC(n[a],u),s=e[--i]}const l={count:1+r.count,patterns:r.patterns};n[o]=OC(n[o],l),n[o].concatPattern&&(n[o].patterns=n[o].patterns.concat(n[o].concatPattern),n[o].concatPattern=void 0,delete n[o+1])}return n[0].patterns.reverse()}function Qne(e,t){return!(t.index+t.length<=e.index||t.priority>e.priority||t.priority===e.priority&&t.length>e.length)}function Yne(e){const t=[];for(let n=e.length-1;n>=0;){const{index:i}=e[n];let s=n-1;for(;s>=0&&Qne(e[n],e[s]);)s--;(s<0||e[s].index+e[s].length<=i)&&t.push(e[n]),n=s}return t.reverse()}var PC;(function(e){e[e.ReverseMaxMatch=1]="ReverseMaxMatch",e[e.MaxProbability=2]="MaxProbability",e[e.MinTokenization=3]="MinTokenization"})(PC||(PC={}));class jC{constructor(t,n="",i=""){this.children=new Map,this.fail=null,this.patterns=[],this.parent=t,this.prefix=n,this.key=i}}class Jne{constructor(){this.dictMap=new Map,this.queues=[],this.root=new jC(null)}build(t){this.buildTrie(t),this.buildFailPointer()}buildTrie(t){for(let n of t){const i=L3(n.zh);let s=this.root;for(let o=0;o<i.length;o++){let r=i[o];if(!s.children.has(r)){const l=new jC(s,i.slice(0,o).join(""),r);s.children.set(r,l),this.addNodeToQueues(l)}s=s.children.get(r)}this.insertPattern(s.patterns,n),n.node=s,this.addPatternToDictMap(n)}}buildFailPointer(){let t=[],n=0;for(this.queues.forEach(i=>{t=t.concat(i)}),this.queues=[];t.length>n;){let i=t[n++],s=i.parent&&i.parent.fail,o=i.key;for(;s&&!s.children.has(o);)s=s.fail;s?i.fail=s.children.get(o):i.fail=this.root}}addPatternToDictMap(t){this.dictMap.has(t.dict)||this.dictMap.set(t.dict,new Set),this.dictMap.get(t.dict).add(t)}addNodeToQueues(t){this.queues[nl(t.prefix)]||(this.queues[nl(t.prefix)]=[]),this.queues[nl(t.prefix)].push(t)}insertPattern(t,n){for(let i=t.length-1;i>=0;i--){const s=t[i];if(n.priority===s.priority&&n.probability>=s.probability)t[i+1]=s;else if(n.priority>s.priority)t[i+1]=s;else{t[i+1]=n;return}}t[0]=n}removeDict(t){this.dictMap.has(t)&&(this.dictMap.get(t).forEach(i=>{i.node.patterns=i.node.patterns.filter(s=>s!==i)}),this.dictMap.delete(t))}match(t,n){let i=this.root,s=[];const o=L3(t);for(let r=0;r<o.length;r++){let l=o[r];for(;i!==null&&!i.children.has(l);)i=i.fail;if(i===null)i=this.root;else{i=i.children.get(l);const a=i.patterns.find(c=>n==="off"?c.priority!==xr.Surname:n==="head"?c.length-1-r===0:!0);a&&s.push(Object.assign(Object.assign({},a),{index:r-a.length+1}));let u=i.fail;for(;u!==null;){const c=u.patterns.find(d=>n==="off"?d.priority!==xr.Surname:n==="head"?d.length-1-r===0:!0);c&&s.push(Object.assign(Object.assign({},c),{index:r-c.length+1})),u=u.fail}}}return s}search(t,n,i=2){const s=this.match(t,n);return i===1?Yne(s):i===3?Gne(s,nl(t)):Vne(s,nl(t))}}const Xne=[...Une,...qne,...Wne,...Hne,...Rne,...jne],ML=new Jne;ML.build(Xne);const eie=new _L,tie=()=>eie,nie=[];function iie(){return nie}const q1=e=>{const t=wu.get(e);return t?t.split(" ")[0]:e},sie=e=>{const t=[],n=iie();for(let i=0;i<e.length;i++){const s=e[i],o=s.charCodeAt(0);n[o]?t[i]=n[o]:t[i]=s}return t.join("")},oie=(e,t,n,i,s)=>{const o=s?sie(e):e,r=ML.search(o,n,i);let l=0;const a=L3(e);for(let u=0;u<a.length;){const c=r[l];if(c&&u===c.index){if(c.length===1&&c.priority<=xr.Normal){const p=a[u];c.zh=p;let g="";g=HC(p,a[u-1],a[u+1]),t[u]={origin:p,result:g,isZh:g!==p,originPinyin:g},u++,l++;continue}const d=c.pinyin.split(" ");let f=0;s&&(c.zh=a.slice(c.index,c.index+c.length).join(""));for(let p=0;p<c.length;p++)t[u+p]={origin:a[p+c.index],result:d[f]||"",isZh:!0,originPinyin:d[f]||""},f++;u+=c.length,l++}else{const d=a[u];let f="";f=HC(d,a[u-1],a[u+1]),t[u]={origin:d,result:f,isZh:f!==d,originPinyin:f},u++}}return{list:t,matches:r}},av=e=>e.replace(/(ā|á|ǎ|à)/g,"a").replace(/(ō|ó|ǒ|ò)/g,"o").replace(/(ē|é|ě|è)/g,"e").replace(/(ī|í|ǐ|ì)/g,"i").replace(/(ū|ú|ǔ|ù)/g,"u").replace(/(ǖ|ǘ|ǚ|ǜ)/g,"ü").replace(/(n̄|ń|ň|ǹ)/g,"n").replace(/(m̄|ḿ|m̌|m̀)/g,"m").replace(/(ê̄|ế|ê̌|ề)/g,"ê"),IL=(e,t="off")=>{const n=tie();let i=wu.get(e)?wu.get(e).split(" "):[];if(n.get(e))i=n.get(e).split(" ");else if(t!=="off"){const s=N3[e];s&&(i=[s].concat(i.filter(o=>o!==s)))}return i},rie=(e,t="off")=>{let n=IL(e,t);return n.length>0?n.map(i=>({origin:e,result:i,isZh:!0,originPinyin:i})):[{origin:e,result:e,isZh:!1,originPinyin:e}]},Sm=(e,t)=>{const n=e.split(" "),i=[],s=[];for(let o of n)for(let r of Nne)if(o.startsWith(r)){let l=o.slice(r.length);Fne.indexOf(r)!==-1&&Bne.indexOf(l)!==-1&&(l=$ne[l]),i.push(r),s.push(l);break}return t==="standard"&&i.forEach((o,r)=>{(o==="y"||o==="w")&&(i[r]="")}),{final:s.join(" "),initial:i.join(" ")}},_g=e=>{const{final:t}=Sm(e);let n="",i="",s="";return Dne.indexOf(av(t))!==-1?(n=t[0],i=t[1],s=t.slice(2)):(i=t[0]||"",s=t.slice(1)||""),{head:n,body:i,tail:s}},uv=e=>{const t=/(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/,n=/(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/,i=/(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/,s=/(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/,o=/(a|o|e|i|u|ü|ê)/,r=/(n|m)$/,l=[];return e.split(" ").forEach(u=>{t.test(u)?l.push("1"):n.test(u)?l.push("2"):i.test(u)?l.push("3"):s.test(u)?l.push("4"):o.test(u)||r.test(u)?l.push("0"):l.push("")}),l.join(" ")},lie=(e,t)=>{const n=av(e).split(" "),i=uv(t).split(" "),s=[];return n.forEach((o,r)=>{s.push(`${o}${i[r]}`)}),s.join(" ")},EL=(e,t)=>{const n=[];return e.split(" ").forEach(s=>{n.push(t?s[0]:s)}),n.join(" ")};function aie(e,t,n){if(Pne.indexOf(e)===-1)return q1(e);if(t===n&&t&&q1(t)!==t)return av(q1(e));if(n&&!One[e].includes(n)){const i=q1(n);if(i!==n){const s=uv(i),o=SL[e];for(let r in o)if(o[r].indexOf(Number(s))!==-1)return r}}}function uie(e,t){if(e==="了"&&(!t||!wu.get(t)))return"liǎo"}function cie(e,t){if(e==="々")return!t||!wu.get(t)?"tóng":wu.get(t).split(" ")[0]}function HC(e,t,n){return cie(e,t)||uie(e,t)||aie(e,t,n)||q1(e)}const die=e=>typeof e!="string"?(console.error("The first param of pinyin is error: "+e+' is not assignable to type "string".'),!1):!0;function ly(e,t){return t instanceof RegExp?t.test(e):!0}const fie=(e,t)=>{let n=t.nonZh;if(n==="removed")return e.filter(i=>i.isZh||!ly(i.origin,t.nonZhScope));if(n==="consecutive"){for(let i=e.length-2;i>=0;i--){const s=e[i],o=e[i+1];!s.isZh&&!o.isZh&&ly(s.origin,t.nonZhScope)&&ly(o.origin,t.nonZhScope)&&(s.origin+=o.origin,s.result+=o.result,o.delete=!0)}return e.filter(i=>!i.delete)}else return e},WC=(e,t)=>nl(e)===1&&t.multiple?rie(e,t.surname):!1,hie=(e,t)=>{switch(t.pattern){case"pinyin":break;case"num":e.forEach(n=>{n.result=n.isZh?uv(n.result):""});break;case"initial":e.forEach(n=>{n.result=n.isZh?Sm(n.result,t.initialPattern).initial:""});break;case"final":e.forEach(n=>{n.result=n.isZh?Sm(n.result,t.initialPattern).final:""});break;case"first":e.forEach(n=>{n.result=EL(n.result,n.isZh)});break;case"finalHead":e.forEach(n=>{n.result=n.isZh?_g(n.result).head:""});break;case"finalBody":e.forEach(n=>{n.result=n.isZh?_g(n.result).body:""});break;case"finalTail":e.forEach(n=>{n.result=n.isZh?_g(n.result).tail:""});break}},pie=(e,t)=>{switch(t.toneType){case"symbol":break;case"none":e.forEach(n=>{n.isZh&&(n.result=av(n.result))});break;case"num":{e.forEach(n=>{n.isZh&&(n.result=lie(n.result,n.originPinyin))});break}}},gie=(e,t)=>{t.v&&e.forEach(n=>{n.isZh&&(n.result=n.result.replace(/ü/g,typeof t.v=="string"?t.v:"v"))})},mie=(e,t,n)=>{if(t.multiple&&nl(n)===1){let i="";e=e.filter(s=>{const o=s.result!==i;return i=s.result,o})}return t.type==="array"?e.map(i=>i.result):t.type==="all"?e.map(i=>{const s=i.isZh?i.result:"",{initial:o,final:r}=Sm(s,t.initialPattern),{head:l,body:a,tail:u}=_g(s);let c=[];return s!==""&&(c=[s].concat(IL(i.origin,t.surname).filter(d=>d!==s))),{origin:i.origin,pinyin:s,initial:o,final:r,first:EL(i.result,i.isZh),finalHead:l,finalBody:a,finalTail:u,num:Number(uv(i.originPinyin)),isZh:i.isZh,polyphonic:c,inZhRange:!!wu.get(i.origin),result:i.result}}):e.map(i=>i.result).join(t.separator)},vie=(e,t)=>(t===!1&&e.forEach(n=>{n.origin==="一"?n.result=n.originPinyin="yī":n.origin==="不"&&(n.result=n.originPinyin="bù")}),e),yie={pattern:"pinyin",toneType:"symbol",type:"string",multiple:!1,mode:"normal",removeNonZh:!1,nonZh:"spaced",v:!1,separator:" ",toneSandhi:!0,segmentit:2};function Mm(e,t){if(t=Object.assign(Object.assign({},yie),t||{}),!die(e))return e;if(e==="")return t.type==="array"||t.type==="all"?[]:"";t.surname===void 0&&(t.mode==="surname"?t.surname="all":t.surname="off"),t.type==="all"&&(t.pattern="pinyin"),t.pattern==="num"&&(t.toneType="none"),t.removeNonZh&&(t.nonZh="removed");let i=Array(nl(e)),{list:s}=oie(e,i,t.surname,t.segmentit,t.traditional);return s=vie(s,t.toneSandhi),s=fie(s,t),WC(e,t)&&(s=WC(e,t)),hie(s,t),pie(s,t),gie(s,t),mie(s,t,e)}var F3;(function(e){e[e.AllSegment=1]="AllSegment",e[e.AllArray=2]="AllArray",e[e.AllString=3]="AllString",e[e.PinyinSegment=4]="PinyinSegment",e[e.PinyinArray=5]="PinyinArray",e[e.PinyinString=6]="PinyinString",e[e.ZhSegment=7]="ZhSegment",e[e.ZhArray=8]="ZhArray",e[e.ZhString=9]="ZhString"})(F3||(F3={}));F3.AllSegment;const TL=[{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"},{name:"/goal",desc:"commands.goal.desc"},{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 bie(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 Im="skill:";function kie(e){return e.startsWith(Im)?e.slice(Im.length):e}function LL(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${Im}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...TL,...t]}const qC=new Map;function NL(e){let t=qC.get(e);if(!t){const n=Mm(e,{toneType:"none",type:"array"}),i=Mm(e,{pattern:"first",toneType:"none",type:"array"});t=Aie(e,n,i),qC.set(e,t)}return t}const UC={full:[],first:[],offsets:[],literal:[]};function Aie(e,t,n){if(t.length!==n.length)return UC;const i=[],s=[];let o=0;for(let r=0;r<t.length;r++){i.push(o);const l=t[r];l.length>0&&e.slice(o,o+l.length).toLowerCase()===l.toLowerCase()?(s.push(!0),o+=l.length):(s.push(!1),o+=Array.from(e.slice(o))[0]?.length??0)}return i.push(o),o!==e.length?UC:{full:t,first:n,offsets:i,literal:s}}function B3(e,t,n,i){const s=e[t];let o=0,r=-1,l=-1,a=0,u=0;for(let f=0;f<s.length;f++){const p=o+(s[f]?.length??0);if(r<0&&n<p&&(r=f,a=o),i<=p){l=f,u=o;break}o=p}if(r<0||l<0)return;const c=e.literal[r]?e.offsets[r]+(n-a):e.offsets[r],d=e.literal[l]?e.offsets[l]+(i-u):e.offsets[l+1];return[c,d]}const KC=new Map;function Cie(e){let t=KC.get(e);return t||(t={full:Mm(e,{toneType:"none",type:"string",separator:""}),first:Mm(e,{pattern:"first",toneType:"none",type:"string",separator:""})},KC.set(e,t)),t}function FL(e,t){const n=e.toLowerCase().indexOf(t);return n<0?void 0:[n,n+t.length]}function wie(e,t){const n=e.toLowerCase();let i=0,s=-1,o=-1;for(let r=0;r<n.length&&i<t.length;r++)n[r]===t[i]&&(i===0&&(s=r),o=r,i++);return i===t.length?[s,o+1]:void 0}function xie(e,t){return FL(e,t)??wie(e,t)}function _ie(e,t){const n=FL(e,t);if(n)return n;if(!/^[\x21-\x7e]+$/.test(t))return;const i=NL(e),s=i.first.join("").indexOf(t);if(s>=0)return B3(i,"first",s,s+t.length);const o=i.full.join("").indexOf(t);if(!(o<0))return B3(i,"full",o,o+t.length)}function Sie(e,t,n){const i=e.trim().replace(/^\//,"").toLowerCase();if(i==="")return{};const s=xie(t,i),o=_ie(n,i);return{name:s?[s]:void 0,desc:o?[o]:void 0}}const Mie={keys:[{name:"name",weight:3},{name:"desc",weight:1},{name:"pinyinFull",weight:1},{name:"pinyinFirst",weight:1}],includeScore:!0,includeMatches:!0,ignoreLocation:!0,threshold:.4};function Iie(e,t){const n=e.toLowerCase(),i=t.toLowerCase();return n===i?0:n.startsWith(i)?1:2}function VC(e){const t=[...e].sort((i,s)=>i[0]-s[0]),n=[];for(const i of t){const s=n[n.length-1];s&&i[0]<=s[1]?s[1]=Math.max(s[1],i[1]):n.push([...i])}return n}function Eie(e,t){const n=[],i=[];for(const s of t??[])for(const[o,r]of s.indices)if(s.key==="name")n.push([o+1,r+2]);else if(s.key==="desc")i.push([o,r+1]);else if(s.key==="pinyinFirst"||s.key==="pinyinFull"){const l=B3(NL(e.desc),s.key==="pinyinFirst"?"first":"full",o,r+1);l&&i.push(l)}return{name:n.length>0?VC(n):void 0,desc:i.length>0?VC(i):void 0}}function Tie(e,t=TL,n=i=>i.desc){const i=e.trim().replace(/^\//,"");if(i==="")return t.map(o=>({item:o,ranges:{}}));const s=t.map((o,r)=>{const l=n(o),a=Cie(l);return{index:r,item:o,name:o.name.replace(/^\//,""),desc:l,pinyinFull:a.full,pinyinFirst:a.first}});return new Ine(s,Mie).search(i).map(({item:o,score:r,matches:l})=>({doc:o,score:r??1,rank:Iie(o.name,i),ranges:Eie(o,l)})).sort((o,r)=>o.rank!==r.rank?o.rank-r.rank:o.score!==r.score?o.score-r.score:o.doc.index-r.doc.index).map(({doc:o,ranges:r})=>({item:o.item,ranges:r}))}function Lie(e,t){if(t.length===0||e.length===0)return t;const n=Date.parse(t[0].createdAt);if(Number.isNaN(n))return t;const i=new Set(t.map(r=>r.id)),s=new Set(t.flatMap(r=>r.role==="user"&&r.promptId!==void 0?[r.promptId]:[])),o=e.filter(r=>{const l=Date.parse(r.createdAt);return!(Number.isNaN(l)||l>=n||i.has(r.id)||r.role==="user"&&(r.userMessageId!==void 0&&i.has(r.userMessageId)||r.promptId!==void 0&&s.has(r.promptId)))});return o.length>0?[...o,...t]:t}function Nie(e){const t=new Map,n=new Set;function i(o){const r=t.get(o);if(r!==void 0)return r;const l=(async()=>e(o))().finally(()=>{t.delete(o),n.delete(o)&&i(o)});return t.set(o,l),l}function s(o){if(t.has(o)){n.add(o);return}i(o)}return{run:i,request:s}}const cn={permission:"kimi-web.permission",activeWorkspace:"kimi-active-workspace",planArmed:"kimi-web.plan-armed",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",workspaceSort:"kimi-web.workspace-sort",workspaceRecencyFloor:"kimi-web.workspace-recency-floor",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",openInDefaultTarget:"kimi-web.open-in.default-target",openInLastTarget:"kimi-web.open-in.last-target",sidebarCollapsed:"kimi-web.sidebar-collapsed",sidebarWidth:"kimi-web.sidebar-width",sidebarViewMode:"kimi-web.sidebar-view-mode",shortcutOverrides:"kimi-web.shortcut-overrides",dockIconChoice:"kimi-web.dock-icon-choice",updateSkippedVersion:"kimi-web.update-skipped-version",planMode:"kimi-web.plan-mode",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 ZC(e){return`kimi-web.draft.${e&&e.length>0?e:"__new__"}`}function oo(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Ls(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function sr(e){try{globalThis.localStorage.removeItem(e)}catch{}}function sd(e){const t=oo(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function Ou(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function U5(){const e=oo(cn.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[i,s]of Object.entries(t))s===!0&&(n[i]=!0);return n}catch{return{}}}function K5(e){const n={...U5()};for(const[i,s]of Object.entries(e))s?n[i]=!0:delete n[i];Ls(cn.unread,JSON.stringify(n))}function Fie(){const e=sd(cn.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function ay(e){Ou(cn.collapsedWorkspaces,Array.from(e))}function Bie(){return sd(cn.pinnedCollapsed)===!0}function $3(e){Ou(cn.pinnedCollapsed,e)}function $ie(){return oo(cn.sidebarViewMode)==="flat"?"flat":"grouped"}function Die(e){Ls(cn.sidebarViewMode,e)}function zie(){const e=sd(cn.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function BL(e){Ou(cn.workspaceOrder,Array.from(e))}function Rie(){return oo(cn.workspaceSort)==="recent"?"recent":"manual"}function Oie(e){Ls(cn.workspaceSort,e)}function Pie(){const e=sd(cn.workspaceRecencyFloor);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="number"&&Number.isFinite(i)&&(t[n]=i);return t}function $L(e){Ou(cn.workspaceRecencyFloor,e)}function DL(){const e=sd(cn.pinnedSessions);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function cv(e){Ou(cn.pinnedSessions,Array.from(e))}function R0(){const e=sd(cn.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="string"&&(t[n]=i);return t}function GC(e){Ou(cn.workspaceNameOverrides,e)}function QC(e,t){const n=new Set(e.map(a=>a.id)),i=t.filter(a=>a.kind==="subagent"&&!n.has(a.id));if(i.length===0)return e;const s=new Map(e.map(a=>[a.id,a])),o=new Set,r=i.map(a=>{const u=a.backgroundTaskId!==void 0?s.get(a.backgroundTaskId):void 0;if(u===void 0)return a;o.add(u.id);const c=a.status==="running"&&u.status!=="running";return{...a,status:a.status==="running"?u.status:a.status,subagentPhase:c?u.status==="completed"?"completed":"failed":a.subagentPhase,completedAt:u.completedAt??a.completedAt,completedAtEstimated:u.completedAt!==void 0?void 0:a.completedAtEstimated,outputPreview:u.outputPreview??a.outputPreview,outputBytes:u.outputBytes??a.outputBytes,model:a.model??u.model,thinkingEffort:a.thinkingEffort??u.thinkingEffort}});return[...e.filter(a=>!o.has(a.id)),...r]}function jie(e,t){if(e.length===0)return t;const n=new Map(t.map(r=>[r.id,r])),i=new Set(e.map(r=>r.id)),s=e.map(r=>{const l=n.get(r.id);if(!l)return r;const a=r.completedAt===void 0&&l.completedAt===void 0&&l.status==="running"&&r.status!=="running";return{...r,outputLines:l.outputLines,text:l.text,completedAt:r.completedAt??l.completedAt??(a?new Date().toISOString():void 0),completedAtEstimated:r.completedAt!==void 0?void 0:l.completedAt!==void 0?l.completedAtEstimated:a?!0:void 0,model:r.model??l.model,thinkingEffort:r.thinkingEffort??l.thinkingEffort}}),o=t.filter(r=>!i.has(r.id));return o.length===0?s:[...s,...o]}function Hie(){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 Wie(e,t=Hie()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyF"||e.key.toLowerCase()==="f")&&!e.defaultPrevented}const qie=new Map([["ς","σ"],["ß","ss"],["ſ","s"],["ff","ff"],["fi","fi"],["fl","fl"],["ffi","ffi"],["ffl","ffl"],["ſt","st"],["st","st"],["ʼn","ʼn"],["µ","μ"],["K","k"],["Å","å"],["Ω","ω"]]);function Uie(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function Kie(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 i="";const s=[];let o=!1;for(let r=0;r<e.length;r++)n.test(e[r])?o||(i+=" ",s.push(r),o=!0):(i+=e[r],s.push(r),o=!1);return{text:i,map:s}}function YC(e){let t="";const n=[];let i=0;for(const s of e){const o=s.toLowerCase(),r=qie.get(o)??o;t+=r;for(let l=0;l<r.length;l++)n.push({start:i,length:s.length});i+=s.length}return{folded:t,map:n}}function*Vie(e,t){if(t.length===0||e.length===0)return;const n=e.map(c=>YC(c.text)),i="\0";let s="";const o=[];for(let c=0;c<e.length;c++)c>0&&e[c].gapBefore&&(s+=i),o[c]=s.length,s+=n[c].folded;const r=Gie(YC(t).folded);if(r===null)return;const l=new RegExp(r,"g");function a(c){let d=0,f=o.length-1,p=0;for(;d<=f;){const g=d+f>>1;o[g]<=c?(p=g,d=g+1):f=g-1}return p}let u;for(;;){const c=l.exec(s);if(c===null)return;const d=c.index,f=d+c[0].length-1,p=a(d),g=a(f),m=n[p].map[d-o[p]],y=n[g].map[f-o[g]],w={startSeg:p,startOffset:m.start,endSeg:g,endOffset:y.start+y.length};u!==void 0&&u.startSeg===w.startSeg&&u.startOffset===w.startOffset&&u.endSeg===w.endSeg&&u.endOffset===w.endOffset||(u=w,yield w)}}const Zie=/[.*+?^${}()|[\]\\]/g;function Gie(e){const t=[];let n=0;for(;n<e.length;){const i=/^\s+/.exec(e.slice(n));if(i!==null){t.push("\\s+"),n+=i[0].length;continue}const s=/^[^\s]+/.exec(e.slice(n));t.push(s[0].replaceAll(Zie,"\\$&")),n+=s[0].length}return t.length===0?null:t.join("")}const JC="script, style, noscript, template, [inert], .top-sentinel",Qie=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BR","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),Yie=new Set(["inline","inline-block","inline-flex","inline-grid","inline-table","contents","ruby"]);function Jie(e,t){const n=t.get(e);if(n!==void 0)return n;const i=Qie.has(e.tagName)||!Yie.has(getComputedStyle(e).display);return t.set(e,i),i}function Xie(e,t,n){let i=e.parentElement;for(;i!==null&&i!==t&&!Jie(i,n);)i=i.parentElement;return i??t}const ese=1e3;function tse(e,t){if(t.length===0)return{ranges:[],truncated:!1};const n=e.ownerDocument,i=n.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode(u){return u.nodeType===Node.ELEMENT_NODE?u.matches(JC)?NodeFilter.FILTER_REJECT:u.matches("br, hr, wbr")&&!u.closest(JC)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),s=new WeakMap,o=new WeakMap,r=[];let l=!1;for(let u=i.nextNode();u!==null;u=i.nextNode()){if(u.nodeType===Node.ELEMENT_NODE){l=!0;continue}const c=u.nodeValue??"";if(c.length===0)continue;const d=u.parentElement;if(d===null)continue;let f=o.get(d);f===void 0&&(f=Uie(getComputedStyle(d).whiteSpace),o.set(d,f));let{text:p,map:g}=Kie(c,f);if(p.length===0)continue;const m=Xie(u,e,s),y=r.at(-1),w=l||y===void 0||y.block!==m;!w&&y.text.endsWith(" ")&&p.startsWith(" ")&&(p=p.slice(1),g=g.slice(1),p.length===0)||(r.push({text:p,gapBefore:w,node:u,block:m,wsMap:g}),l=!1)}const a=[];for(const u of Vie(r,t)){const c=r[u.startSeg],d=r[u.endSeg],f=n.createRange();if(f.setStart(c.node,c.wsMap[u.startOffset]),f.setEnd(d.node,d.wsMap[u.endOffset-1]+1),f.getClientRects().length!==0){if(a.length>=ese)return{ranges:a,truncated:!0};a.push(f)}}return{ranges:a,truncated:!1}}const zL="kimi-transcript-search",D3="kimi-transcript-search-current";function RL(){return globalThis.CSS?.highlights??null}function uy(e,t){const n=RL(),i=globalThis.Highlight;if(!n||!i)return;if(e.length===0){z3();return}const s=new i;for(const r of e)s.add(r);n.set(zL,s);const o=e[t];if(o!==void 0){const r=new i;r.add(o),n.set(D3,r)}else n.delete(D3)}function z3(){const e=RL();e?.delete(zL),e?.delete(D3)}function nse(){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 ise(e,t=nse()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyA"||e.key.toLowerCase()==="a")&&!e.defaultPrevented}function sse(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement&&(e.isContentEditable||e.closest("input, textarea")!==null)}function ose(e,t){return typeof Element>"u"||!(e instanceof Element)?null:e.closest(t)}function XC(e){e.ownerDocument.getSelection()?.selectAllChildren(e)}const rse=`https://www.kimi.com/code?from=${Hf?"kimi_code_desktop":"kimi_code_web"}`;function kp(){window.open(rse,"_blank","noopener")}function lse(e,t,n){if(e.length===0)return null;const i=new Set(e),s=t.filter(r=>i.has(r)),o=e.filter(r=>!t.includes(r));return o.length===0&&s.length===t.length?null:t.length===0&&n!==void 0?o.toSorted((r,l)=>(n.get(l)??Number.NEGATIVE_INFINITY)-(n.get(r)??Number.NEGATIVE_INFINITY)):[...o,...s]}function ase(e,t){const n=new Map(t.map((i,s)=>[i,s]));return e.toSorted((i,s)=>(n.get(i.id)??-1)-(n.get(s.id)??-1))}function use(e,t,n,i="before"){const s=e.indexOf(t),o=e.indexOf(n);if(s===-1||o===-1||s===o)return e;const r=[...e];r.splice(s,1);const l=s<o?o-1:o,a=i==="before"?l:l+1;return r.splice(a,0,t),r}function cse(e,t){return e.toSorted((n,i)=>(t.get(i.id)??Number.NEGATIVE_INFINITY)-(t.get(n.id)??Number.NEGATIVE_INFINITY))}function dse(e,t){let n=!1;const i={...e};for(const[s,o]of t)o>(i[s]??Number.NEGATIVE_INFINITY)&&(i[s]=o,n=!0);return{next:i,changed:n}}function fse(e,t){const n=new Map;for(const i of e){if(i.parentSessionId||i.archived)continue;const s=new Date(i.updatedAt).getTime();if(Number.isNaN(s))continue;const o=t(i);s>(n.get(o)??Number.NEGATIVE_INFINITY)&&n.set(o,s)}return n}function hse(e,t){const n=new Map;for(const i of e){const s=t[i.id]??Number.NEGATIVE_INFINITY,o=i.lastOpenedAt?Date.parse(i.lastOpenedAt):Number.NaN,r=Number.isNaN(o)?Number.NEGATIVE_INFINITY:o;n.set(i.id,Math.max(s,r))}return n}function pse(e,t){const n=Object.keys(e);if(!n.some(s=>!t.has(s)))return{next:e,changed:!1};const i={};for(const s of n)t.has(s)&&(i[s]=e[s]);return{next:i,changed:!0}}const gse=5;function mse(e,t,n,i=gse){if(e.length<=i)return e;const s=e.slice(0,i);if(t&&!s.some(o=>o.id===t)){const o=e.find(r=>r.id===t);o&&(s[i-1]=o)}return s}const vse={class:"sd-body"},yse={class:"sd-search"},bse=["aria-label"],kse=["aria-selected","onClick","onMousemove"],Ase={class:"sd-meta"},Cse=["innerHTML"],wse={class:"sd-time"},xse=["innerHTML"],_se=["innerHTML"],Sse={key:1,class:"sd-empty"},Mse={class:"sd-foot","aria-hidden":"true"},Ise={class:"sd-hint"},Ese={class:"sd-hint"},Tse={class:"sd-hint"},Lse=200,Nse=nt({__name:"SearchSessionsDialog",props:{sessions:{},activeId:{}},emits:["select","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=G(!0),r=G(""),l=G(null),a=G(null),u=F(()=>{const S=r.value.trim().toLowerCase(),I=[];for(const _ of i.sessions){const E=_.title??"",N=_.lastPrompt??"",D=_.workspaceName??"",T=S.length>0&&E.toLowerCase().includes(S),$=S.length>0&&N.toLowerCase().includes(S),O=S.length>0&&D.toLowerCase().includes(S);if(!(S.length>0&&!T&&!$&&!O)&&(I.push({session:_,inTitle:T,inWorkspace:O,snippetText:N?bte(N,r.value):""}),I.length>=Lse))break}return I}),c=G(0);Ge(r,()=>{c.value=0});function d(S){const I=u.value.length;return I===0?0:Math.max(0,Math.min(I-1,S))}async function f(){await At(),a.value?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest"})}function p(S){c.value=d(c.value+S),f()}function g(S){s("select",S),s("close")}function m(){r.value="",l.value?.focus()}function y(){const S=u.value[c.value];S&&g(S.session.id)}function w(){return l.value?.el??null}const{handleCompositionStart:k,handleCompositionEnd:A,isComposingKeyEvent:v}=qr();function x(S){if(v(S)){S.key==="Escape"&&S.stopPropagation();return}S.key==="ArrowDown"?(S.preventDefault(),p(1)):S.key==="ArrowUp"?(S.preventDefault(),p(-1)):S.key==="Enter"&&(S.preventDefault(),y())}return gn(()=>{l.value?.focus()}),(S,I)=>(b(),de(h(La),{open:o.value,"onUpdate:open":I[1]||(I[1]=_=>o.value=_),title:h(n)("sidebar.searchPlaceholder"),size:"lg",height:"fixed",padded:!1,"initial-focus":w,onClose:I[2]||(I[2]=_=>s("close"))},{default:he(()=>[C("div",vse,[C("div",yse,[V(h(Xs),{ref_key:"inputRef",ref:l,modelValue:r.value,"onUpdate:modelValue":I[0]||(I[0]=_=>r.value=_),placeholder:h(n)("sidebar.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:x,onCompositionstart:h(k),onCompositionend:h(A)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),V(h(mn),{text:h(n)("sidebar.searchClear")},{default:he(()=>[C("button",{type:"button",class:$e(["search-clear",{"is-on":r.value.length>0}]),tabindex:"-1","aria-label":h(n)("sidebar.searchClear"),onClick:m},[V(h(Ce),{name:"close",size:"sm"})],10,bse)]),_:1},8,["text"])]),C("div",{ref_key:"listRef",ref:a,class:"sd-list",role:"listbox"},[u.value.length>0?(b(!0),M(Be,{key:0},yt(u.value,(_,E)=>(b(),M("button",{key:_.session.id,class:$e(["sd-row",{on:E===c.value,active:_.session.id===e.activeId}]),role:"option","aria-selected":E===c.value,onClick:N=>g(_.session.id),onMousemove:N=>c.value=E},[C("span",Ase,[V(h(Ce),{class:"sd-folder",name:"folder-closed",size:"sm"}),C("span",{class:"sd-ws",innerHTML:h(oy)(_.session.workspaceName??_.session.workspaceId??"",_.inWorkspace?r.value:"")},null,8,Cse),C("span",wse,B(_.session.time),1)]),C("span",{class:"sd-title",innerHTML:h(oy)(_.session.title,_.inTitle?r.value:"")},null,8,xse),_.snippetText?(b(),M("span",{key:0,class:"sd-snippet",innerHTML:h(oy)(_.snippetText,r.value)},null,8,_se)):te("",!0)],42,kse))),128)):(b(),M("div",Sse,[V(h(Qq),{title:r.value.trim()?h(n)("sidebar.searchNoResults"):h(n)("sidebar.searchEmpty")},{icon:he(()=>[V(h(Ce),{name:"search",size:"lg"})]),_:1},8,["title"])]))],512),C("div",Mse,[C("span",Ise,[V(h(Aa),{keys:["↑","↓"]}),qe(B(h(n)("sidebar.searchHintSelect")),1)]),I[3]||(I[3]=C("span",{class:"sd-dot"},"·",-1)),C("span",Ese,[V(h(Aa),{keys:["Enter"]}),qe(B(h(n)("sidebar.searchHintOpen")),1)]),I[4]||(I[4]=C("span",{class:"sd-dot"},"·",-1)),C("span",Tse,[V(h(Aa),{keys:["Esc"]}),qe(B(h(n)("sidebar.searchHintClose")),1)])])])]),_:1},8,["open","title"]))}}),Fse=vt(Nse,[["__scopeId","data-v-d69c7a8c"]]);var Bse=Object.create,V5=Object.defineProperty,$se=Object.getOwnPropertyDescriptor,OL=Object.getOwnPropertyNames,Dse=Object.getPrototypeOf,zse=Object.prototype.hasOwnProperty,PL=(e,t)=>function(){return t||(0,e[OL(e)[0]])((t={exports:{}}).exports,t),t.exports},Rse=e=>{let t={};for(var n in e)V5(t,n,{get:e[n],enumerable:!0});return t},Ose=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=OL(t),o=0,r=s.length,l;o<r;o++)l=s[o],!zse.call(e,l)&&l!==n&&V5(e,l,{get:(a=>t[a]).bind(null,l),enumerable:!(i=$se(t,l))||i.enumerable});return e},jL=(e,t,n)=>(n=e!=null?Bse(Dse(e)):{},Ose(V5(n,"default",{value:e,enumerable:!0}),e));function Pse(e,t,n,i){const s=Number(e[t].meta.id+1).toString();let o="";return typeof i.docId=="string"&&(o=`-${i.docId}-`),o+s}function jse(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function Hse(e,t,n,i,s){const o=s.rules.footnote_anchor_name(e,t,n,i,s),r=s.rules.footnote_caption(e,t,n,i,s);let l=o;return e[t].meta.subId>0&&(l+=`:${e[t].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${o}" id="fnref${l}">${r}</a></sup>`}function Wse(e,t,n){return(n.xhtmlOut?`<hr class="footnotes-sep" /> -`:`<hr class="footnotes-sep"> -`)+`<section class="footnotes"> -<ol class="footnotes-list"> -`}function qse(){return`</ol> -</section> -`}function Use(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),`<li id="fn${o}" class="footnote-item">`}function Kse(){return`</li> -`}function Vse(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),` <a href="#fnref${o}" class="footnote-backref">↩︎</a>`}function Zse(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=Hse,e.renderer.rules.footnote_block_open=Wse,e.renderer.rules.footnote_block_close=qse,e.renderer.rules.footnote_open=Use,e.renderer.rules.footnote_close=Kse,e.renderer.rules.footnote_anchor=Vse,e.renderer.rules.footnote_caption=jse,e.renderer.rules.footnote_anchor_name=Pse;function i(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 p;for(p=d+2;p<f;p++){if(l.src.charCodeAt(p)===32)return!1;if(l.src.charCodeAt(p)===93)break}if(p===d+2||p+1>=f||l.src.charCodeAt(++p)!==58)return!1;if(c)return!0;p++,l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.refs||(l.env.footnotes.refs={});const g=l.src.slice(d+2,p-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 y=l.bMarks[a],w=l.tShift[a],k=l.sCount[a],A=l.parentType,v=p,x=l.sCount[a]+p-(l.bMarks[a]+l.tShift[a]);let S=x;for(;p<f;){const _=l.src.charCodeAt(p);if(n(_))_===9?S+=4-S%4:S++;else break;p++}l.tShift[a]=p-v,l.sCount[a]=S-x,l.bMarks[a]=v,l.blkIndent+=4,l.parentType="footnote",l.sCount[a]<l.blkIndent&&(l.sCount[a]+=l.blkIndent),l.md.block.tokenize(l,a,u,!0),l.parentType=A,l.blkIndent-=4,l.tShift[a]=w,l.sCount[a]=k,l.bMarks[a]=y;const I=new l.Token("footnote_reference_close","",-1);return I.level=--l.level,l.tokens.push(I),!0}function s(l,a){const u=l.posMax,c=l.pos;if(c+2>=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 p=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:p},l.env.footnotes.list[p]={content:l.src.slice(d,f),tokens:g}}return l.pos=f+1,l.posMax=u,!0}function o(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;d++){if(l.src.charCodeAt(d)===32||l.src.charCodeAt(d)===10)return!1;if(l.src.charCodeAt(d)===93)break}if(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 p;l.env.footnotes.refs[`:${f}`]<0?(p=l.env.footnotes.list.length,l.env.footnotes.list[p]={label:f,count:0},l.env.footnotes.refs[`:${f}`]=p):p=l.env.footnotes.refs[`:${f}`];const g=l.env.footnotes.list[p].count;l.env.footnotes.list[p].count++;const m=l.push("footnote_ref","",0);m.meta={id:p,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 p=l.env.footnotes.list;l.tokens.push(new l.Token("footnote_block_open","",1));for(let g=0,m=p.length;g<m;g++){const y=new l.Token("footnote_open","",1);if(y.meta={id:g,label:p[g].label},l.tokens.push(y),p[g].tokens){a=[];const A=new l.Token("paragraph_open","p",1);A.block=!0,a.push(A);const v=new l.Token("inline","",0);v.children=p[g].tokens,v.content=p[g].content,a.push(v);const x=new l.Token("paragraph_close","p",-1);x.block=!0,a.push(x)}else p[g].label&&(a=f[`:${p[g].label}`]);a&&(l.tokens=l.tokens.concat(a));let w;l.tokens[l.tokens.length-1].type==="paragraph_close"?w=l.tokens.pop():w=null;const k=p[g].count>0?p[g].count:1;for(let A=0;A<k;A++){const v=new l.Token("footnote_anchor","",0);v.meta={id:g,subId:A,label:p[g].label},l.tokens.push(v)}w&&l.tokens.push(w),l.tokens.push(new l.Token("footnote_close","",-1))}l.tokens.push(new l.Token("footnote_block_close","",-1))}e.block.ruler.before("reference","footnote_def",i,{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",s),e.inline.ruler.after("footnote_inline","footnote_ref",o),e.core.ruler.after("inline","footnote_tail",r)}function Gse(e){function t(i,s){const o=i.pos,r=i.src.charCodeAt(o);if(s||r!==43)return!1;const l=i.scanDelims(i.pos,!0);let a=l.length;const u=String.fromCharCode(r);if(a<2)return!1;if(a%2){const c=i.push("text","",0);c.content=u,a--}for(let c=0;c<a;c+=2){const d=i.push("text","",0);d.content=u+u,!(!l.can_open&&!l.can_close)&&i.delimiters.push({marker:r,length:0,jump:c/2,token:i.tokens.length-1,end:-1,open:l.can_open,close:l.can_close})}return i.pos+=l.length,!0}function n(i,s){let o;const r=[],l=s.length;for(let a=0;a<l;a++){const u=s[a];if(u.marker!==43||u.end===-1)continue;const c=s[u.end];o=i.tokens[u.token],o.type="ins_open",o.tag="ins",o.nesting=1,o.markup="++",o.content="",o=i.tokens[c.token],o.type="ins_close",o.tag="ins",o.nesting=-1,o.markup="++",o.content="",i.tokens[c.token-1].type==="text"&&i.tokens[c.token-1].content==="+"&&r.push(c.token-1)}for(;r.length;){const a=r.pop();let u=a+1;for(;u<i.tokens.length&&i.tokens[u].type==="ins_close";)u++;u--,a!==u&&(o=i.tokens[u],i.tokens[u]=i.tokens[a],i.tokens[a]=o)}}e.inline.ruler.before("emphasis","ins",t),e.inline.ruler2.before("emphasis","ins",function(i){const s=i.tokens_meta,o=(i.tokens_meta||[]).length;n(i,i.delimiters);for(let r=0;r<o;r++)s[r]&&s[r].delimiters&&n(i,s[r].delimiters)})}function Qse(e){function t(i,s){const o=i.pos,r=i.src.charCodeAt(o);if(s||r!==61)return!1;const l=i.scanDelims(i.pos,!0);let a=l.length;const u=String.fromCharCode(r);if(a<2)return!1;if(a%2){const c=i.push("text","",0);c.content=u,a--}for(let c=0;c<a;c+=2){const d=i.push("text","",0);d.content=u+u,!(!l.can_open&&!l.can_close)&&i.delimiters.push({marker:r,length:0,jump:c/2,token:i.tokens.length-1,end:-1,open:l.can_open,close:l.can_close})}return i.pos+=l.length,!0}function n(i,s){const o=[],r=s.length;for(let l=0;l<r;l++){const a=s[l];if(a.marker!==61||a.end===-1)continue;const u=s[a.end],c=i.tokens[a.token];c.type="mark_open",c.tag="mark",c.nesting=1,c.markup="==",c.content="";const d=i.tokens[u.token];d.type="mark_close",d.tag="mark",d.nesting=-1,d.markup="==",d.content="",i.tokens[u.token-1].type==="text"&&i.tokens[u.token-1].content==="="&&o.push(u.token-1)}for(;o.length;){const l=o.pop();let a=l+1;for(;a<i.tokens.length&&i.tokens[a].type==="mark_close";)a++;if(a--,l!==a){const u=i.tokens[a];i.tokens[a]=i.tokens[l],i.tokens[l]=u}}}e.inline.ruler.before("emphasis","mark",t),e.inline.ruler2.before("emphasis","mark",function(i){let s;const o=i.tokens_meta,r=(i.tokens_meta||[]).length;for(n(i,i.delimiters),s=0;s<r;s++)o[s]&&o[s].delimiters&&n(i,o[s].delimiters)})}const Yse=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function Jse(e,t){const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==94||t||i+2>=n)return!1;e.pos=i+1;let s=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===94){s=!0;break}e.md.inline.skipToken(e)}if(!s||i+1===e.pos)return e.pos=i,!1;const o=e.src.slice(i+1,e.pos);if(o.match(/(^|[^\\])(\\\\)*\s/))return e.pos=i,!1;e.posMax=e.pos,e.pos=i+1;const r=e.push("sup_open","sup",1);r.markup="^";const l=e.push("text","",0);l.content=o.replace(Yse,"$1");const a=e.push("sup_close","sup",-1);return a.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function Xse(e){e.inline.ruler.after("emphasis","sup",Jse)}var eoe=PL({"../../node_modules/.pnpm/markdown-it-task-checkbox@1.0.6/node_modules/markdown-it-task-checkbox/index.js":((e,t)=>{t.exports=function(m,y){y=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},y),m.core.ruler.after("inline","github-task-lists",function(w){for(var k=w.tokens,A=0,v=2;v<k.length;v++)s(k,v)&&(o(k[v],A,y,w.Token),A+=1,n(k[v-2],"class",y.liClass),n(k[i(k,v-2)],"class",y.ulClass))})};function n(m,y,w){var k=m.attrIndex(y),A=[y,w];k<0?m.attrPush(A):m.attrs[k]=A}function i(m,y){for(var w=m[y].level-1,k=y-1;k>=0;k--)if(m[k].level===w)return k;return-1}function s(m,y){return d(m[y])&&f(m[y-1])&&p(m[y-2])&&g(m[y])}function o(m,y,w,k){var A=w.idPrefix+y;m.children[0].content=m.children[0].content.slice(3),m.children.unshift(l(A,k)),m.children.push(a(k)),m.children.unshift(r(m,A,w,k)),w.divWrap&&(m.children.unshift(u(w,k)),m.children.push(c(k)))}function r(m,y,w,k){var A=new k("checkbox_input","input",0);return A.attrs=[["type","checkbox"],["id",y]],/^\[[xX]\][ \u00A0]/.test(m.content)===!0&&A.attrs.push(["checked","true"]),w.disabled===!0&&A.attrs.push(["disabled","true"]),A}function l(m,y){var w=new y("label_open","label",1);return w.attrs=[["for",m]],w}function a(m){return new m("label_close","label",-1)}function u(m,y){var w=new y("checkbox_open","div",0);return w.attrs=[["class",m.divClass]],w}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 p(m){return m.type==="list_item_open"}function g(m){return/^\[[xX \u00A0]\][ \u00A0]/.test(m.content)}})});const toe=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]]);function noe(e){return e>=55296&&e<=57343||e>1114111?65533:toe.get(e)??e}function ioe(e){const t=atob(e),n=t.length&-2,i=new Uint16Array(n/2);for(let s=0,o=0;s<n;s+=2){const r=t.charCodeAt(s),l=t.charCodeAt(s+1);i[o++]=r|l<<8}return i}const soe=ioe("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");var Mo;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Mo||(Mo={}));var Hi;(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"})(Hi||(Hi={}));const ew=32;function R3(e){return e>=Hi.ZERO&&e<=Hi.NINE}function ooe(e){return e>=Hi.UPPER_A&&e<=Hi.UPPER_F||e>=Hi.LOWER_A&&e<=Hi.LOWER_F}function roe(e){return e>=Hi.UPPER_A&&e<=Hi.UPPER_Z||e>=Hi.LOWER_A&&e<=Hi.LOWER_Z||R3(e)}function loe(e){return e===Hi.EQUALS||roe(e)}var zs;(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"})(zs||(zs={}));var su;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(su||(su={}));var aoe=class{decodeTree;emitCodePoint;errors;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}state=zs.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=su.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=zs.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case zs.EntityStart:return e.charCodeAt(t)===Hi.NUM?(this.state=zs.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=zs.NamedEntity,this.stateNamedEntity(e,t));case zs.NumericStart:return this.stateNumericStart(e,t);case zs.NumericDecimal:return this.stateNumericDecimal(e,t);case zs.NumericHex:return this.stateNumericHex(e,t);case zs.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|ew)===Hi.LOWER_X?(this.state=zs.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=zs.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t<e.length;){const n=e.charCodeAt(t);if(R3(n)||ooe(n)){const i=n<=Hi.NINE?n-Hi.ZERO:(n|ew)-Hi.LOWER_A+10;this.result=this.result*16+i,this.consumed++,t++}else return this.emitNumericEntity(n,3)}return-1}stateNumericDecimal(e,t){for(;t<e.length;){const n=e.charCodeAt(t);if(R3(n))this.result=this.result*10+(n-Hi.ZERO),this.consumed++,t++;else return this.emitNumericEntity(n,2)}return-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Hi.SEMI)this.consumed+=1;else if(this.decodeMode===su.Strict)return 0;return this.emitCodePoint(noe(this.result),this.consumed),this.errors&&(e!==Hi.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let i=n[this.treeIndex],s=(i&Mo.VALUE_LENGTH)>>14;for(;t<e.length;){if(s===0&&(i&Mo.FLAG13)!==0){const r=(i&Mo.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const l=i&Mo.JUMP_TABLE;if(e.charCodeAt(t)!==l)return this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}for(;this.runConsumed<r;){if(t>=e.length)return-1;const l=this.runConsumed-1,a=n[this.treeIndex+1+(l>>1)],u=l%2===0?a&255:a>>8&255;if(e.charCodeAt(t)!==u)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(r>>1),i=n[this.treeIndex],s=(i&Mo.VALUE_LENGTH)>>14}if(t>=e.length)break;const o=e.charCodeAt(t);if(o===Hi.SEMI&&s!==0&&(i&Mo.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);if(this.treeIndex=coe(n,i,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===su.Attribute&&(s===0||loe(o))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],s=(i&Mo.VALUE_LENGTH)>>14,s!==0){if(o===Hi.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==su.Strict&&(i&Mo.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}t++,this.excess++}return-1}emitNotTerminatedNamedEntity(){const{result:e,decodeTree:t}=this,n=(t[e]&Mo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:i}=this;return this.emitCodePoint(t===1?i[e]&~(Mo.VALUE_LENGTH|Mo.FLAG13):i[e+1],n),t===3&&this.emitCodePoint(i[e+2],n),n}end(){switch(this.state){case zs.NamedEntity:return this.result!==0&&(this.decodeMode!==su.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case zs.NumericDecimal:return this.emitNumericEntity(0,2);case zs.NumericHex:return this.emitNumericEntity(0,3);case zs.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case zs.EntityStart:return 0}}};function uoe(e){let t="";const n=new aoe(e,i=>t+=String.fromCodePoint(i));return function(s,o){let r=0,l=0;for(;(l=s.indexOf("&",l))>=0;){t+=s.slice(r,l),n.startEntity(o);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 coe(e,t,n,i){const s=(t&Mo.BRANCH_LENGTH)>>7,o=t&Mo.JUMP_TABLE;if(s===0)return o!==0&&i===o?n:-1;if(o){const u=i-o;return u<0||u>=s?-1:e[n+u]-1}const r=s+1>>1;let l=0,a=s-1;for(;l<=a;){const u=l+a>>>1,c=e[n+(u>>1)]>>(u&1)*8&255;if(c<i)l=u+1;else if(c>i)a=u-1;else return e[n+r+u]}return-1}const doe=uoe(soe);function Z5(e,t=su.Legacy){return doe(e,t)}var foe=jL(eoe());const tw={};function hoe(e){let t=tw[e];if(t)return t;t=tw[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);t.push(i)}for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2)}return t}function dv(e,t){typeof t!="string"&&(t=dv.defaultChars);const n=hoe(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(i){let s="";for(let o=0,r=i.length;o<r;o+=3){const l=parseInt(i.slice(o+1,o+3),16);if(l<128){s+=n[l];continue}if((l&224)===192&&o+3<r){const a=parseInt(i.slice(o+4,o+6),16);if((a&192)===128){const u=l<<6&1984|a&63;u<128?s+="��":s+=String.fromCharCode(u),o+=3;continue}}if((l&240)===224&&o+6<r){const a=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16);if((a&192)===128&&(u&192)===128){const c=l<<12&61440|a<<6&4032|u&63;c<2048||c>=55296&&c<=57343?s+="���":s+=String.fromCharCode(c),o+=6;continue}}if((l&248)===240&&o+9<r){const a=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16),c=parseInt(i.slice(o+10,o+12),16);if((a&192)===128&&(u&192)===128&&(c&192)===128){let d=l<<18&1835008|a<<12&258048|u<<6&4032|c&63;d<65536||d>1114111?s+="����":(d-=65536,s+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}s+="�"}return s})}dv.defaultChars=";/?:@&=+$,#";dv.componentChars="";var O3=dv;const nw={};function poe(e){let t=nw[e];if(t)return t;t=nw[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function fv(e,t,n){typeof t!="string"&&(n=t,t=fv.defaultChars),typeof n>"u"&&(n=!0);const i=poe(t);let s="";for(let o=0,r=e.length;o<r;o++){const l=e.charCodeAt(o);if(n&&l===37&&o+2<r&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){s+=e.slice(o,o+3),o+=2;continue}if(l<128){s+=i[l];continue}if(l>=55296&&l<=57343){if(l>=55296&&l<=56319&&o+1<r){const a=e.charCodeAt(o+1);if(a>=56320&&a<=57343){s+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[o])}return s}fv.defaultChars=";/?:@&=+$,-_.!~*'()#";fv.componentChars="-_.!~*'()";var HL=fv;function G5(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 goe=/^([a-z0-9.+-]+:)/i,moe=/:[0-9]*$/,voe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,yoe=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` -`," "]),boe=["'"].concat(yoe),iw=["%","/","?",";","#"].concat(boe),sw=["/","?","#"],koe=255,ow=/^[+a-z0-9A-Z_-]{0,63}$/,Aoe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,rw={javascript:!0,"javascript:":!0},lw={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Coe(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,i,s,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const u=voe.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let r=goe.exec(o);if(r&&(r=r[0],n=r.toLowerCase(),this.protocol=r,o=o.substr(r.length)),(t||r||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=o.substr(0,2)==="//",s&&!(r&&rw[r])&&(o=o.substr(2),this.slashes=!0)),!rw[r]&&(s||r&&!lw[r])){let u=-1;for(let g=0;g<sw.length;g++)i=o.indexOf(sw[g]),i!==-1&&(u===-1||i<u)&&(u=i);let c,d;u===-1?d=o.lastIndexOf("@"):d=o.lastIndexOf("@",u),d!==-1&&(c=o.slice(0,d),o=o.slice(d+1),this.auth=c),u=-1;for(let g=0;g<iw.length;g++)i=o.indexOf(iw[g]),i!==-1&&(u===-1||i<u)&&(u=i);u===-1&&(u=o.length),o[u-1]===":"&&u--;const f=o.slice(0,u);o=o.slice(u),this.parseHost(f),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const g=this.hostname.split(/\./);for(let m=0,y=g.length;m<y;m++){const w=g[m];if(w&&!w.match(ow)){let k="";for(let A=0,v=w.length;A<v;A++)w.charCodeAt(A)>127?k+="x":k+=w[A];if(!k.match(ow)){const A=g.slice(0,m),v=g.slice(m+1),x=w.match(Aoe);x&&(A.push(x[1]),v.unshift(x[2])),v.length&&(o=v.join(".")+o),this.hostname=A.join(".");break}}}}this.hostname.length>koe&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=o.indexOf("#");l!==-1&&(this.hash=o.substr(l),o=o.slice(0,l));const a=o.indexOf("?");return a!==-1&&(this.search=o.substr(a),o=o.slice(0,a)),o&&(this.pathname=o),lw[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Em.prototype.parseHost=function(e){let t=moe.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 Q5=Coe,WL=Rse({decode:()=>O3,encode:()=>HL,format:()=>G5,parse:()=>Q5}),woe=Object.defineProperty,qL=e=>{let t={};for(var n in e)woe(t,n,{get:e[n],enumerable:!0});return t},Is=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,i=t.length;n<i;n++)if(t[n][0]===e)return n;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,t){const n=this.attrIndex(e),i=[e,t];n<0?this.attrPush(i):this.attrs[n]=i}attrGet(e){const t=this.attrIndex(e);let n=null;return t>=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}`}},xoe=qL({arrayReplaceAt:()=>Loe,assign:()=>Eoe,countLines:()=>Qi,escapeHtml:()=>Poe,escapeRE:()=>Hoe,fromCodePoint:()=>Qh,has:()=>Ioe,isMdAsciiPunct:()=>Nm,isPunctChar:()=>Lm,isPunctCode:()=>P3,isSpace:()=>Toe,isString:()=>Soe,isValidEntityCode:()=>pv,isWhiteSpace:()=>Gh,lib:()=>Woe,mdurl:()=>WL,normalizeReference:()=>hv,ucmicro:()=>Tm,unescapeAll:()=>Yh,unescapeMd:()=>$oe});const Tm={Any:/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Cc:/[\0-\x1F\x7F-\x9F]/,Cf:/[\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]/,P:/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,S:/[\$\+<->\^`\|~\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]/,Z:/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/};function _oe(e){return Object.prototype.toString.call(e)}function Soe(e){return _oe(e)==="[object String]"}const Moe=Object.prototype.hasOwnProperty;function Ioe(e,t){return Moe.call(e,t)}function Eoe(e,...t){return t.forEach(n=>{if(n){if(typeof n!="object")throw new TypeError(`${String(n)}must be object`);Object.keys(n).forEach(i=>{e[i]=n[i]})}}),e}function Toe(e){return e===9||e===32}function Gh(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 Tm.P.test(e)||Tm.S.test(e)}const aw=new Map;function P3(e){if(Nm(e))return!0;if(e>=0&&e<128)return!1;const t=aw.get(e);if(t!==void 0)return t;const n=Lm(String.fromCharCode(e));return aw.set(e,n),n}function Nm(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 hv(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function Loe(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function pv(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 Qh(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 UL=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,Noe=new RegExp(`${UL.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),Foe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Boe(e,t){if(t.charCodeAt(0)===35&&Foe.test(t)){const i=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return pv(i)?Qh(i):e}const n=Z5(e);return n!==e?n:e}function $oe(e){return e.includes("\\")?e.replace(UL,"$1"):e}function Yh(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(Noe,(t,n,i)=>n||Boe(t,i))}const Doe=/[&<>"]/,zoe=/[&<>"]/g,Roe={"&":"&","<":"<",">":">",'"':"""};function Ooe(e){return Roe[e]}function Poe(e){return Doe.test(e)?e.replace(zoe,Ooe):e}const joe=/[.?*+^$[\]\\(){}|-]/g;function Hoe(e){return e.replace(joe,"\\$&")}const Woe={mdurl:WL,ucmicro:Tm};function Qi(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` -`,n+1))!==-1;)t++;return t}const qoe=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,Uoe=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,Koe=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,Y5=["references","footnotes","abbreviations","abbr","abbrs"],J5=Symbol.for("markdown-it-ts.global-state"),X5=Object.prototype.hasOwnProperty;function uw(e){return e==="reference-definition"||e==="footnote-definition"||e==="abbreviation-definition"}function ol(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function hu(e){if(Array.isArray(e))return e.map(t=>hu(t));if(ol(e)){const t={};for(const n of Object.keys(e))t[n]=hu(e[n]);return t}return e}function Fm(e){return Array.isArray(e)?e.map((t,n)=>String(n)):ol(e)?Object.keys(e):[]}function j3(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;n<e.length;n++)if(!j3(e[n],t[n]))return!1;return!0}if(ol(e)||ol(t)){if(!ol(e)||!ol(t))return!1;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const s of n)if(!X5.call(t,s)||!j3(e[s],t[s]))return!1;return!0}return Object.is(e,t)}function KL(e,t){if(Array.isArray(e))return e[Number(t)];if(ol(e))return e[t]}function Voe(e,t){if(Array.isArray(e)&&Array.isArray(t)){e.length=t.length;for(let n=0;n<t.length;n++)e[n]=hu(t[n]);return e}if(ol(e)&&ol(t)){for(const n of Object.keys(e))X5.call(t,n)||delete e[n];for(const n of Object.keys(t))e[n]=hu(t[n]);return e}return hu(t)}function Zoe(e,t,n){const i=n.ownedKeys??[],s=e[t];if(ol(s)||Array.isArray(s)){const o=new Set(Fm(n.value));for(const r of i)n.existed&&o.has(r)?s[r]=hu(KL(n.value,r)):delete s[r];!n.existed&&Fm(s).length===0&&delete e[t];return}n.existed?e[t]=hu(n.value):delete e[t]}function eb(e){const t=e[J5];return uw(t)?{reason:t,snapshot:{}}:t&&typeof t=="object"&&uw(t.reason)&&t.snapshot&&typeof t.snapshot=="object"?t:null}function Goe(e,t){Object.defineProperty(e,J5,{value:t,enumerable:!1,configurable:!0,writable:!0})}function Vo(e){return!e||!e.includes("]:")&&!e.includes("*[")?null:qoe.test(e)?"footnote-definition":Uoe.test(e)?"abbreviation-definition":Koe.test(e)?"reference-definition":null}function Ap(e){return eb(e)?.reason??null}function df(e,t,n){if(Ap(e)&&Ea(e),!t)return n();tb(e,t);try{const i=n();return nb(e),i}catch(i){throw Ea(e),i}}function tb(e,t){try{Ea(e);const n={};for(const i of Y5)n[i]=X5.call(e,i)?{existed:!0,value:hu(e[i])}:{existed:!1};Goe(e,{reason:t,snapshot:n})}catch{}}function nb(e){const t=eb(e);if(t)for(const n of Y5){const i=t.snapshot[n];if(!i)continue;i.ownedKeys=[];const s=e[n];if(!ol(s)&&!Array.isArray(s))continue;const o=new Set(Fm(i.existed?i.value:void 0));i.ownedKeys=Fm(s).filter(r=>o.has(r)?!j3(s[r],KL(i.value,r)):!0)}}function Ea(e){const t=eb(e);if(t){for(const n of Y5){const i=t.snapshot[n];if(!i){delete e[n];continue}if(i.ownedKeys){Zoe(e,n,i);continue}i.existed?e[n]=Voe(e[n],i.value):delete e[n]}delete e[J5]}}function cy(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 H3=Symbol.for("markdown-it-ts.diagnostics");function Cp(e,t){if(e)try{const n=e[H3];if(n&&typeof n=="object")return n;if(!t)return;const i={};return e[H3]=i,i}catch{return}}function ua(e){return Cp(e,!1)}function Qoe(e){if(e)try{const t=e[H3];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function Io(e){Qoe(e)}function x1(e,t){const n=Cp(e,!0);n&&(n.stockFast=t)}function ds(e,t){const n=Cp(e,!0);n&&(n.strategy=t)}function dy(e,t){const n=Cp(e,!0);n&&(n.chunk=t)}function VL(e,t){const n=Cp(e,!0);n&&(n.unbounded=t)}const Yoe=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Joe=/[\0-\x1F\x7F-\x9F]/,Xoe=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\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[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\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\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,ere=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var tre=class{src_Any=Yoe.source;src_Cc=Joe.source;src_Z=ere.source;src_P=Xoe.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){const i=this.escapeRE(e),s=this.escapeRE(t),o=`(?:(?!${this.src_ZCc}|${i}|${s}).)`;let r=`${i}${o}{0,1000}${s}`;for(let l=2;l<=n;l++)r=`${i}(?:${o}|${r}){0,1000}${s}`;return r}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){const e="[0-9A-Fa-f]{1,4}",t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},fy={validate:(e,t,n)=>{const i=n.re.get_http_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)},nre={"http:":fy,"https:":fy,"ftp:":fy,"//":{validate:function(e,t,n){const i=n.re.get_relative_proto_validator();i.lastIndex=t;const s=i.exec(e);return s?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:s[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){const i=n.re.get_mailto_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)}},ire="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|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",sre="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function ore(){const e=sre.split("|");return ire.split("|").forEach(t=>{const n=t.indexOf(":"),i=t.slice(0,n);for(const s of t.slice(n+1))e.push(i+s)}),e}var rre={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:ore(),urlAuth:!1,maxLength:1e4},cw=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,i){const s=e.slice(n,i);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=i,this.raw=s,this.text=s,this.url=s}},ZL=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:t,...n}=e;this.__opts__={...rre,...n},this.__schemas__={...nre},this.re=t||new tre,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{const n={normalize:(i,s)=>s.normalize(i),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;for(n=this.re.get_schema_search(),n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const i=this.re.get_fuzzy_mail_host_search(),s=this.re.get_mail_name_validator();for(i.lastIndex=0;(t=i.exec(e))!==null;){const o=e.slice(Math.max(0,t.index-65),t.index);if(s.test(o))return!0}}return!1}testSchemaAt(e,t,n){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this):0}match(e){const t=[],n=this.re.get_schema_search();let i,s,o,r,l,a,u=!1,c=!1,d=!1,f=0;if(!e.length)return null;for(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(s=this.re.get_fuzzy_mail_host_search(),s.lastIndex=0,o=this.re.get_mail_name_validator());;){const p=Math.max(f-1,0);if(s&&o&&!d&&(!l||l.index<f))for(s.lastIndex<p&&(s.lastIndex=p);;){const k=s.exec(e);if(!k){d=!0,l=void 0;break}const A=o.exec(e.slice(Math.max(0,k.index-65),k.index));if(A){if(l={schema:"mailto:",index:k.index-A[1].length,lastIndex:k.index+k[0].length},l.index>=f)break;s.lastIndex<p&&(s.lastIndex=p)}}if(i&&!c&&(!r||r.index<f))for(i.lastIndex<p&&(i.lastIndex=p);;){const k=i.exec(e);if(!k){c=!0,r=void 0;break}if(r={schema:"",index:k.index+k[1].length,lastIndex:k.index+k[0].length},r.index>=f)break;i.lastIndex<p&&(i.lastIndex=p)}let g=l;(!g||r&&(r.index<g.index||r.index===g.index&&r.lastIndex>g.lastIndex))&&(g=r);let m;if(!u)for(;;){if(!a){n.lastIndex<p&&(n.lastIndex=p);const v=n.exec(e);if(!v){u=!0;break}a={schema:v[2],index:v.index+v[1].length,lastIndex:v.index+v[0].length}}if(a.index<f){a=void 0;continue}if(g&&a.index>g.index)break;const k=a;a=void 0;const A=this.testSchemaAt(e,k.schema,k.lastIndex);if(A){m={schema:k.schema,index:k.index,lastIndex:k.lastIndex+A};break}}let y=m;if((!y||l&&(l.index<y.index||l.index===y.index&&l.lastIndex>y.lastIndex))&&(y=l),(!y||r&&(r.index<y.index||r.index===y.index&&r.lastIndex>y.lastIndex))&&(y=r),!y)break;y===l?l=void 0:y===r&&(r=void 0);const w=new cw(e,y.schema,y.index,y.lastIndex);w.schema?this.__schemas__[w.schema].normalize(w,this):this.normalize(w),t.push(w),f=y.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;const t=this.re.get_schema_at_start().exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;const i=new cw(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[i.schema].normalize(i,this),i}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}},lre=PL({"../../node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.js":((e,t)=>{const d=/^xn--/,f=/[^\0-\x7F]/,p=/[\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,y=Math.floor,w=String.fromCharCode;function k(P){throw new RangeError(g[P])}function A(P,R){const j=[];let z=P.length;for(;z--;)j[z]=R(P[z]);return j}function v(P,R){const j=P.split("@");let z="";j.length>1&&(z=j[0]+"@",P=j[1]),P=P.replace(p,".");const K=A(P.split("."),R).join(".");return z+K}function x(P){const R=[];let j=0;const z=P.length;for(;j<z;){const K=P.charCodeAt(j++);if(K>=55296&&K<=56319&&j<z){const q=P.charCodeAt(j++);(q&64512)==56320?R.push(((K&1023)<<10)+(q&1023)+65536):(R.push(K),j--)}else R.push(K)}return R}const S=P=>String.fromCodePoint(...P),I=function(P){return P>=48&&P<58?26+(P-48):P>=65&&P<91?P-65:P>=97&&P<123?P-97:36},_=function(P,R){return P+22+75*(P<26)-((R!=0)<<5)},E=function(P,R,j){let z=0;for(P=j?y(P/700):P>>1,P+=y(P/R);P>m*26>>1;z+=36)P=y(P/m);return y(z+(m+1)*P/(P+38))},N=function(P){const R=[],j=P.length;let z=0,K=128,q=72,W=P.lastIndexOf("-");W<0&&(W=0);for(let Z=0;Z<W;++Z)P.charCodeAt(Z)>=128&&k("not-basic"),R.push(P.charCodeAt(Z));for(let Z=W>0?W+1:0;Z<j;){const ne=z;for(let ue=1,ie=36;;ie+=36){Z>=j&&k("invalid-input");const Se=I(P.charCodeAt(Z++));Se>=36&&k("invalid-input"),Se>y((2147483647-z)/ue)&&k("overflow"),z+=Se*ue;const fe=ie<=q?1:ie>=q+26?26:ie-q;if(Se<fe)break;const pe=36-fe;ue>y(2147483647/pe)&&k("overflow"),ue*=pe}const X=R.length+1;q=E(z-ne,X,ne==0),y(z/X)>2147483647-K&&k("overflow"),K+=y(z/X),z%=X,R.splice(z++,0,K)}return String.fromCodePoint(...R)},D=function(P){const R=[];P=x(P);const j=P.length;let z=128,K=0,q=72;for(const ne of P)ne<128&&R.push(w(ne));const W=R.length;let Z=W;for(W&&R.push("-");Z<j;){let ne=2147483647;for(const ue of P)ue>=z&&ue<ne&&(ne=ue);const X=Z+1;ne-z>y((2147483647-K)/X)&&k("overflow"),K+=(ne-z)*X,z=ne;for(const ue of P)if(ue<z&&++K>2147483647&&k("overflow"),ue===z){let ie=K;for(let Se=36;;Se+=36){const fe=Se<=q?1:Se>=q+26?26:Se-q;if(ie<fe)break;const pe=ie-fe,Ne=36-fe;R.push(w(_(fe+pe%Ne,0))),ie=y(pe/Ne)}R.push(w(_(ie,0))),q=E(K,X,Z===W),K=0,++Z}++K,++z}return R.join("")},O={version:"2.3.1",ucs2:{decode:x,encode:S},decode:N,encode:D,toASCII:function(P){return v(P,function(R){return f.test(R)?"xn--"+D(R):R})},toUnicode:function(P){return v(P,function(R){return d.test(R)?N(R.slice(4).toLowerCase()):R})}};t.exports=O})}),GL=jL(lre());function ib(e,t,n){let i,s=t;const o={ok:!1,pos:0,str:""};if(e.charCodeAt(s)===60){for(s++;s<n;){if(i=e.charCodeAt(s),i===10||i===60)return o;if(i===62)return o.pos=s+1,o.str=Yh(e.slice(t+1,s)),o.ok=!0,o;if(i===92&&s+1<n){s+=2;continue}s++}return o}let r=0;for(;s<n&&(i=e.charCodeAt(s),!(i===32||i<32||i===127));){if(i===92&&s+1<n){if(e.charCodeAt(s+1)===32)break;s+=2;continue}if(i===40&&(r++,r>32))return o;if(i===41){if(r===0)break;r--}s++}return t===s||r!==0||(o.str=Yh(e.slice(t,s)),o.pos=s,o.ok=!0),o}var QL=ib;const Sg=-2;function are(e,t,n,i){let s=1,o=t+1;for(;o<n;){const r=e.charCodeAt(o);if(r===93){if(s--,s===0)return o;if(i){const l=o+1<n?e.charCodeAt(o+1):0;if(l===40||l===91)return Sg}o++;continue}if(r===92){o+=2;continue}if(r===96||r===60||r===33&&o+1<n&&e.charCodeAt(o+1)===91)return Sg;if(r===91){s++,o++;continue}o++}return-1}function sb(e,t,n){let i=1,s=!1,o,r;const l=e.src,a=e.posMax,u=e.pos,c=e.linkLabelNoCloseFrom;if(c>=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=are(l,t,a,n);if(f!==Sg)return f;for(e.pos=t+1;e.pos<a;){if(o=l.charCodeAt(e.pos),o===93&&(i--,i===0)){s=!0;break}if(r=e.pos,e.md.inline.skipToken(e),o===91){if(r===e.pos-1)i++;else if(n)return e.pos=u,-1}}let p=-1;return s&&(p=e.pos),e.pos=u,p}var Bm=sb;function ob(e,t,n,i){let s,o=t;const r={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)r.str=i.str,r.marker=i.marker;else{if(o>=n)return r;let l=e.charCodeAt(o);if(l!==34&&l!==39&&l!==40)return r;t++,o++,l===40&&(l=41),r.marker=l}for(;o<n;){if(s=e.charCodeAt(o),s===r.marker)return r.pos=o+1,r.str+=Yh(e.slice(t,o)),r.ok=!0,r;if(s===40&&r.marker===41)return r;s===92&&o+1<n&&o++,o++}return r.can_continue=!0,r.str+=Yh(e.slice(t,o)),r}var YL=ob;function gv(e,t){if(!e.attrs)return-1;for(let n=0;n<e.attrs.length;n++)if(e.attrs[n][0]===t)return n;return-1}function rb(e,t){e.attrs||(e.attrs=[]),e.attrs.push(t)}function ure(e,t,n){const i=gv(e,t),s=[t,n];i<0?rb(e,s):e.attrs[i]=s}function cre(e,t){const n=gv(e,t);return n>=0?e.attrs[n][1]:null}function dre(e,t,n){const i=gv(e,t);i<0?rb(e,[t,n]):e.attrs[i][1]=`${e.attrs[i][1]} ${n}`}var fre=qL({attrGet:()=>cre,attrIndex:()=>gv,attrJoin:()=>dre,attrPush:()=>rb,attrSet:()=>ure,parseLinkDestination:()=>ib,parseLinkLabel:()=>sb,parseLinkTitle:()=>ob});function hre(e){return e.includes("\r")||e.includes("\0")}function JL(e){return typeof e=="string"?e:e.toString()}function pre(e){if(e.inlineMode){const t=new Is("inline","",0);t.content=JL(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 gre=/^([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])?)*)$/,mre=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function vre(e,t){let n=e.pos;const i=e.src;if(i.charCodeAt(n)!==60)return!1;const s=n,o=e.posMax;for(;;){if(++n>=o)return!1;const l=i.charCodeAt(n);if(l===60)return!1;if(l===62)break}const r=i.slice(s+1,n);if(mre.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(gre.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 XL=vre;function yre(e,t){const n=e.src;let i=e.pos;if(n.charCodeAt(i)!==96)return!1;const s=i;i++;const o=e.posMax;for(;i<o&&n.charCodeAt(i)===96;)i++;const r=n.slice(s,i),l=r.length;if(e.backticksScanned&&(e.backticks[l]||0)<=s)return t||(e.pending+=r),e.pos+=l,!0;let a=i,u;for(;(u=n.indexOf("`",a))!==-1;){for(a=u+1;a<o&&n.charCodeAt(a)===96;)a++;const c=a-u;if(c===l){if(!t){const d=e.push("code_inline","code",0);d.markup=r;let f=n.slice(i,u);f.includes(` -`)&&(f=f.replace(/\n/g," ")),f.length>2&&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 eN=yre;function dw(e){const t={},n=e.length;if(!n)return;let i=0,s=-2;const o=[];for(let r=0;r<n;r++){const l=e[r];if(o.push(0),(e[i].marker!==l.marker||s!==l.token-1)&&(i=r),s=l.token,l.length=l.length||0,!l.close)continue;Object.prototype.hasOwnProperty.call(t,l.marker)||(t[l.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[l.marker][(l.open?3:0)+l.length%3];let u=i-o[i]-1,c=u;for(;u>a;u-=o[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 p=u>0&&!e[u-1].open?o[u-1]+1:0;o[r]=r-u+p,o[u]=p,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 bre(e){const t=e.tokens_meta,n=e.tokens_meta.length;dw(e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&dw(t[i].delimiters)}var kre=bre;const tN="*",nN="_";function Are(e,t){if(t)return!1;const n=e.src.charCodeAt(e.pos);if(n!==95&&n!==42)return!1;const i=e.scanDelims(e.pos,n===42);if(!i||i.length===0)return!1;const s=n===42?tN:nN,o=i.length,r=i.can_open,l=i.can_close,a=e.tokens,u=e.delimiters;for(let c=0;c<o;c++){const d=e.push("text","",0);d.content=s,u.push({marker:n,length:o,token:a.length-1,end:-1,open:r,close:l})}return e.pos+=o,!0}function fw(e,t){const n=t.length,i=e.tokens;for(let s=n-1;s>=0;s--){const o=t[s],r=o.marker;if(r!==95&&r!==42||o.end===-1)continue;const l=t[o.end],a=o.token,u=l.token,c=s>0&&t[s-1].end===o.end+1&&t[s-1].marker===r&&t[s-1].token===a-1&&t[o.end+1].token===u+1,d=r===42?tN:nN,f=i[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 p=i[u];c?(p.type="strong_close",p.tag="strong",p.nesting=-1,p.markup=d+d,p.content=""):(p.type="em_close",p.tag="em",p.nesting=-1,p.markup=d,p.content=""),c&&(i[t[s-1].token].content="",i[t[o.end+1].token].content="",s--)}}function Cre(e){const t=e.tokens_meta,n=e.tokens_meta.length;fw(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&fw(e,t[i].delimiters)}const W3={tokenize:Are,postProcess:Cre};function iN(e){return Z5(e)}function lb(e){return e>=48&&e<=57}function wre(e){const t=e|32;return lb(e)||t>=97&&t<=102}function sN(e){const t=e|32;return t>=97&&t<=122}function xre(e){return sN(e)||lb(e)}function _re(e,t,n){let i=t+2;if(i>=n)return null;let s=!1,o=7,r=i;for((e.charCodeAt(i)|32)===120&&(s=!0,o=6,i++,r=i);i<n&&i-r<o;){const l=e.charCodeAt(i);if(!(s?wre(l):lb(l)))break;i++}return i===r||i>=n||e.charCodeAt(i)!==59?null:e.slice(t,i+1)}function Sre(e,t,n){let i=t+1;if(i>=n||!sN(e.charCodeAt(i)))return null;for(i++;i<n&&i-t-1<32&&xre(e.charCodeAt(i));)i++;if(i-t-1<2||i>=n||e.charCodeAt(i)!==59)return null;const s=e.slice(t,i+1);return iN(s)!==s?s:null}function Mre(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const s=_re(e.src,n,i);if(s){if(!t){const o=(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=pv(o)?Qh(o):Qh(65533),r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}else{const s=Sre(e.src,n,i);if(s){const o=iN(s);if(!t){const r=e.push("text_special","",0);r.content=o,r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}return!1}var oN=Mre;const rN=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),q3=new Array(128),lN=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);q3[e]=`\\${t}`,lN[e]=rN[e]?t:q3[e]}function hw(e,t,n){e.pending&&e.pushPending();const i=new Is("text_special","",0);i.level=e.level,i.content=t,i.markup=n,i.info="escape",e.pendingLevel=e.level,e.tokens.push(i),e.tokens_meta.push(null)}function Ire(e,t){let n=e.pos;const i=e.posMax,s=e.src;if(s.charCodeAt(n)!==92||(n++,n>=i))return!1;let o=s.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<i&&(o=s.charCodeAt(n),!(o!==9&&o!==32));)n++;return e.pos=n,!0}if(o<128)return t?(e.pos=n+1,!0):(hw(e,lN[o],q3[o]),e.pos=n+1,!0);if(t){if(o>=55296&&o<=56319&&n+1<i){const a=s.charCodeAt(n+1);a>=56320&&a<=57343&&n++}return e.pos=n+1,!0}let r=s.charAt(n);if(o>=55296&&o<=56319&&n+1<i){const a=s.charCodeAt(n+1);a>=56320&&a<=57343&&(r+=s.charAt(n+1),n++)}const l=`\\${r}`;return hw(e,o<256&&rN[o]?r:l,l),e.pos=n+1,!0}var aN=Ire;function Ere(e){let t,n,i=0;const s=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++){const r=s[t];r&&(r.nesting&&r.nesting<0&&i--,r.level=i,r.nesting&&r.nesting>0&&i++,r.type==="text"&&t+1<o&&s[t+1]?.type==="text"?s[t+1].content=r.content+s[t+1].content:(t!==n&&(s[n]=r),n++))}t!==n&&(s.length=n)}var Tre=Ere;const uN=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,cN="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Lre=new RegExp(`^(?:${uN}|${cN}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<\\?[\\s\\S]*?\\?>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),Nre=new RegExp(`^(?:${uN}|${cN})`);function dN(e){return e===32||e===9||e===10||e===12||e===13}function Fre(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||dN(t)}function Bre(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<e.length;t++){const n=e.charCodeAt(t);if(n===62)return!0;if(!dN(n))return!1}return!1}function $re(e){const t=e|32;return t>=97&&t<=122}function Dre(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos,s=e.src;if(s.charCodeAt(i)!==60||i+2>=n)return!1;const o=s.charCodeAt(i+1);if(o!==33&&o!==63&&o!==47&&!$re(o))return!1;const r=s.slice(i).match(Lre);if(!r)return!1;const l=r[0];if(!t){const a=e.pushSimple("html_inline","");a.content=l,Fre(l)&&e.linkLevel++,Bre(l)&&e.linkLevel--}return e.pos+=l.length,!0}var fN=Dre;function zre(e,t){let n,i,s,o,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 p=e.pos+2,g=Bm(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o<f&&e.src.charCodeAt(o)===40){for(o++;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);if(o>=f)return!1;if(l=QL(e.src,o,e.posMax),l.ok){for(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?o=l.pos:c="",u=o;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);if(l=YL(e.src,o,e.posMax),o<f&&u!==o&&l.ok)for(a=l.str,o=l.pos;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);else a=""}if(o>=f||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<f&&e.src.charCodeAt(o)===91?(u=o+1,o=Bm(e,o),o>=0?s=e.src.slice(u,o++):o=g+1):o=g+1,s||(s=e.src.slice(p,g)),r=e.env.references[hv(s)],!r)return e.pos=d,!1;c=r.href,a=r.title}if(!t){i=e.src.slice(p,g);const m=[];e.md.inline.parse(i,e.md,e.env,m);const y=e.push("image","img",0);y.attrs=[["src",c],["alt",""]],y.children=m,y.content=i,a&&y.attrs.push(["title",a])}return e.pos=o,e.posMax=f,!0}var hN=zre;function hy(e,t,n){for(;t<n;){const i=e.charCodeAt(t);if(i!==32&&i!==10)break;t++}return t}function Rre(e,t){if(e.src.charCodeAt(e.pos)!==91)return!1;const n=e.src,i=e.pos,s=e.posMax,o=e.pos+1,r=Bm(e,e.pos,!0);if(r<0)return!1;let l=r+1,a="",u="",c=!0;if(l<s&&n.charCodeAt(l)===40){l=hy(n,l+1,s);const d=QL(n,l,s);if(d.ok){const f=e.md.normalizeLink(d.str);e.md.validateLink(f)&&(a=f,l=d.pos,c=!1)}else l<s&&n.charCodeAt(l)===41&&(a="",c=!1);if(!c){if(l=hy(n,l,s),l<s&&n.charCodeAt(l)!==41){const f=YL(n,l,s);f.ok&&(u=f.str,l=hy(n,f.pos,s))}l<s&&n.charCodeAt(l)===41?l++:c=!0}}if(c){if(typeof e.env.references>"u")return!1;let d;if(l=r+1,l<s&&n.charCodeAt(l)===91){const p=l+1,g=Bm(e,l);g>=0?(d=n.slice(p,g),d||(d=n.slice(o,r)),l=g+1):d=n.slice(o,r)}else d=n.slice(o,r);const f=e.env.references[hv(d)];if(!f)return e.pos=i,!1;a=f.href,u=f.title}if(!t){e.pos=o,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 pN=Rre;function gN(e){const t=e|32;return t>=97&&t<=122}function Ore(e){return e>=48&&e<=57}function Pre(e){return gN(e)||Ore(e)||e===43||e===45||e===46}function jre(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&Pre(e.charCodeAt(t));)t--;return t++,t>=e.length||!gN(e.charCodeAt(t))?null:e.slice(t)}function Hre(e,t,n){let i=t;for(;i<n;){const s=e.charCodeAt(i);if(s<=32||s===127||s===60)break;i++}return e.slice(t,i)}function mN(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const s=jre(e.pending);if(!s)return!1;const o=Hre(e.src,n-s.length,i),r=e.md.linkify.matchAtStart(o);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 Wre(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,s=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),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;){const o=e.src.charCodeAt(n);if(o!==9&&o!==32)break;n++}return e.pos=n,!0}var vN=Wre;function qre(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;const s=e.scanDelims(e.pos,!0);if(!s)return!1;let o=s.length;const r=String.fromCharCode(i);if(o<2)return!1;let l;o%2&&(l=e.push("text","",0),l.content=r,o--);for(let a=0;a<o;a+=2)l=e.push("text","",0),l.content=r+r,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}function pw(e,t){let n;const i=[],s=t.length;for(let o=0;o<s;o++){const r=t[o];if(r.marker!==126||r.end===-1)continue;const l=t[r.end];n=e.tokens[r.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[l.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[l.token-1].type==="text"&&e.tokens[l.token-1].content==="~"&&i.push(l.token-1)}for(;i.length;){const o=i.pop();let r=o+1;for(;r<e.tokens.length&&e.tokens[r].type==="s_close";)r++;r--,o!==r&&(n=e.tokens[r],e.tokens[r]=e.tokens[o],e.tokens[o]=n)}}function Ure(e){const t=e.delimiters;pw(e,t);const n=e.tokens_meta;if(n)for(let i=0;i<n.length;i++)n[i]&&n[i].delimiters&&pw(e,n[i].delimiters)}const U3={tokenize:qre,postProcess:Ure};function gw(e){switch(e){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!0;default:return!1}}function Kre(e,t){const n=e.src,i=e.pos,s=e.posMax;if(i>=s||gw(n.charCodeAt(i)))return!1;let o=i+1;for(;o<s&&!gw(n.charCodeAt(o));)o++;return t||(e.pending+=o===i+1?n.charAt(i):n.slice(i,o)),e.pos=o,!0}var yN=Kre;function ab(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function Vre(e){if(e.length===0)return 0;const t=e.slice().sort((i,s)=>i-s),n=Math.floor(t.length/2);return t.length%2===0?(t[n-1]+t[n])/2:t[n]}function Zre(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 bN(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,i={enabled:!0,fixture:n.fixture,mode:n.mode,startedAt:ab(),records:Object.create(null)};return t.__mdtsRuleProfile=i,i}function ff(e,t,n,i,s,o){const r=bN(e);if(!r)return;const l=`${t}:${n}`,a=r.records[l]??(r.records[l]=Zre(t,n));a.calls++,a.inclusiveMs+=i,i>a.maxMs&&(a.maxMs=i),a.samples.push(i),o?(a.silentCalls++,s&&a.silentHits++):(a.normalCalls++,s&&a.normalHits++),s&&a.hits++,r.completedAt=ab()}function Gre(e){const t=bN(e);if(!t)return null;const n=Object.keys(t.records);for(let i=0;i<n.length;i++){const s=t.records[n[i]];s.medianMs=Vre(s.samples)}return t.completedAt=ab(),t}var mw=class{rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t,n){const i=this.rules.findIndex(s=>s.name===e);i>=0&&this.rules.splice(i,1),this.rules.push({name:e,fn:t,alt:n?.alt||[],enabled:!0}),this.invalidateCache()}at(e,t,n){const i=this.rules.findIndex(s=>s.name===e);if(t===void 0){if(i<0)return;const s=this.rules[i];return Object.freeze({name:s.name,fn:s.fn,alt:s.alt?Object.freeze(s.alt.slice()):void 0,enabled:s.enabled})}if(i<0)throw new Error(`Parser rule not found: ${e}`);this.rules[i].fn=t,n?.alt!==void 0&&(this.rules[i].alt=n.alt),this.invalidateCache()}before(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}after(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s+1,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.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 i of this.rules)if(i.enabled&&i.alt)for(const s of i.alt)e.add(s);const t=new Map,n=new Map;for(const i of e){const s=[],o=[];for(const r of this.rules)r.enabled&&(i!==""&&!r.alt?.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t.set(i,s),n.set(i,o)}this.cache=t,this.namedCache=n}},kN=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,i){this.src=e,this.md=t,this.env=n,this.tokens=i,this.tokens_meta=new Array(i.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 Is("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 Is(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 i=new Is(e,t,n);let s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.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(i),this.tokens_meta.push(s),i}scanDelims(e,t){const{src:n,posMax:i}=this,s=n.charCodeAt(e);let o=e;for(;o<i&&n.charCodeAt(o)===s;)o++;const r=o-e,l=e>0?n.charCodeAt(e-1):32,a=o<i?n.charCodeAt(o):32,u=Gh(l),c=Gh(a),d=P3(l),f=P3(a),p=!c&&(!f||u||d),g=!u&&(!d||c||f);return{can_open:p&&(t||!g||d),can_close:g&&(t||!p||f),length:r}}};kN.prototype.Token=Is;const Qre=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/;function vw(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return vN(e,t);case 33:return hN(e,t);case 38:return oN(e,t);case 42:case 95:return W3.tokenize(e,t);case 58:return e.md.options.linkify&&mN(e,t);case 60:return XL(e,t)||fN(e,t);case 91:return pN(e,t);case 92:return aN(e,t);case 96:return eN(e,t);case 126:return U3.tokenize(e,t);default:return yN(e,t)}}function AN(e){return!Qre.test(e)}var Yre=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new mw,this.ruler2=new mw,this.ruler.push("text",yN),this.ruler.push("linkify",mN),this.ruler.push("newline",vN),this.ruler.push("escape",aN),this.ruler.push("backticks",eN),this.ruler.push("strikethrough",U3.tokenize),this.ruler.push("emphasis",W3.tokenize),this.ruler.push("link",pN),this.ruler.push("image",hN),this.ruler.push("autolink",XL),this.ruler.push("html_inline",fN),this.ruler.push("entity",oN),this.ruler2.push("balance_pairs",kre),this.ruler2.push("strikethrough",U3.postProcess),this.ruler2.push("emphasis",W3.postProcess),this.ruler2.push("fragments_join",Tre),this.defaultRulerVersion=this.ruler.version,this.defaultRuler2Version=this.ruler2.version}skipToken(e){const t=e.pos,n=this.getRules(),i=n.length,s=e.cache,o=s[t],r=!!e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules"));if(o!==void 0){e.pos=o;return}let l=!1;if(e.level<e.maxNesting){if(r){const a=this.ruler.getNamedRules("");for(let u=0;u<i;u++){e.level++;const c=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();l=a[u].fn(e,!0);const d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(ff(e.env,"inline",a[u].name,d-c,!!l,!0),e.level--,l){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}}else if(this.isDefaultRuleset()){if(e.level++,l=vw(e,!0),e.level--,l&&t>=e.pos)throw new Error("inline rule didn't increment state.pos")}else for(let a=0;a<i;a++)if(e.level++,l=n[a](e,!0),e.level--,l){if(t>=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,i=e.posMax;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const o=this.isDefaultRuleset();for(;e.pos<i;){const r=e.pos;let l=!1;if(e.level<e.maxNesting){if(o)l=vw(e,!1);else for(let a=0;a<n&&(l=t[a](e,!1),!l);a++);if(l&&r>=e.pos)throw new Error("inline rule didn't increment state.pos")}if(l){if(e.pos>=i)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending();return}const s=this.ruler.getNamedRules("");for(;e.pos<i;){const o=e.pos;let r=!1;if(e.level<e.maxNesting)for(let l=0;l<n;l++){const a=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();r=s[l].fn(e,!1);const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(ff(e.env,"inline",s[l].name,u-a,!!r,!1),r){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(r){if(e.pos>=i)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,i){if(typeof e=="string"&&e.length>0&&this.isDefaultRuleset()&&AN(e)){const a=new Is("text","",0);a.content=e,i.push(a);return}const s=new kN(e,t,n,i);this.tokenize(s);const o=this.getRules2(),r=o.length;if(!(s.env&&(Object.prototype.hasOwnProperty.call(s.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(s.env,"__mdtsProfileRules")))){for(let a=0;a<r;a++)o[a](s,!1);return}const l=this.ruler2.getNamedRules("");for(let a=0;a<r;a++){const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();l[a].fn(s,!1);const c=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();ff(s.env,"inline2",l[a].name,c-u,!0,!1)}}parse(e,t,n,i){this.parseSource(e,t,n,i)}getRules(){return this.cachedRulesVersion!==this.ruler.version&&(this.cachedRules=this.ruler.getRules(""),this.cachedRulesVersion=this.ruler.version),this.cachedRules}getRules2(){return this.cachedRules2Version!==this.ruler2.version&&(this.cachedRules2=this.ruler2.getRules(""),this.cachedRules2Version=this.ruler2.version),this.cachedRules2}};function Jre(e){const t=e.tokens,n=!!e.md?.inline?.isDefaultRuleset?.();for(let i=0,s=t.length;i<s;i++){const o=t[i];if(o.type==="inline"&&e.md){if(o.children||(o.children=[]),n&&o.content.length>0&&AN(o.content)){const r=new Is("text","",0);r.content=o.content,o.children.push(r);continue}e.md.inline.parse(o.content,e.md,e.env,o.children)}}}const Xre=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,ele=/[0-9a-z]/i;function tle(e){return/^<a[>\s]/i.test(e)}function nle(e){return/^<\/a\s*>/i.test(e)}function ile(e,t){if(t.schema||t.index!==0||!t.raw)return t;for(let n=1;n<t.raw.length;n++){const i=t.raw[n-1],s=t.raw[n];if(!Xre.test(i)||!ele.test(s))continue;const o=t.raw.slice(n),r=e.match(o)?.[0];if(!(!r||r.index!==0||r.lastIndex!==o.length))return{...r,index:t.index+n,lastIndex:t.index+n+r.lastIndex}}return t}function sle(e){const t=e.tokens;if(e.md?.options?.linkify)for(let n=0;n<t.length;n++){const i=t[n];if(i.type!=="inline"||!e.md.linkify.test(i.content))continue;let s=i.children;s||(s=[],i.children=s);let o=0;for(let r=s.length-1;r>=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"&&(tle(l.content)&&o>0&&o--,nle(l.content)&&o++),o>0||l.type!=="text"||!e.md.linkify.test(l.content))continue;const a=l.content;let u=(e.md.linkify.match(a)||[]).map(p=>ile(e.md.linkify,p));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 p=0;p<u.length;p++){const g=u[p],m=e.md.normalizeLink(g.url);if(!e.md.validateLink(m))continue;let y=g.text;g.schema?g.schema==="mailto:"&&!/^mailto:/i.test(y)?y=e.md.normalizeLinkText(`mailto:${y}`).replace(/^mailto:/,""):y=e.md.normalizeLinkText(y):y=e.md.normalizeLinkText(`http://${y}`).replace(/^http:\/\//,"");const w=g.index;if(w>f){const x=new Is("text","",0);x.content=a.slice(f,w),x.level=d,c.push(x)}const k=new Is("link_open","a",1);k.attrs=[["href",m]],k.level=d++,k.markup="linkify",k.info="auto",c.push(k);const A=new Is("text","",0);A.content=y,A.level=d,c.push(A);const v=new Is("link_close","a",-1);v.level=--d,v.markup="linkify",v.info="auto",c.push(v),f=g.lastIndex}if(f!==0){if(f<a.length){const p=new Is("text","",0);p.content=a.slice(f),p.level=d,c.push(p)}s.splice(r,1,...c)}}}}const ole=/\r\n?|\n/g,rle=/\0/g;function lle(e){if(!e||typeof e.src!="string")return;const t=e.src,n=t.includes("\r"),i=t.includes("\0");if(!n&&!i)return;let s=t;n&&(s=s.replace(ole,` -`)),i&&(s=s.replace(rle,"�")),e.src=s}const CN=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,ale=/\((?:c|tm|r)\)/i,ule=/\((c|tm|r)\)/gi,cle={c:"©",r:"®",tm:"™"};function dle(e,t){return cle[t.toLowerCase()]}function fle(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(ule,dle)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function hle(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&CN.test(i.content)&&(i.content=i.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–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function ple(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 i=n.content||(Array.isArray(n.children)?n.children.map(s=>s.type==="text"?s.content:"").join(""):"");ale.test(i)&&fle(n.children||[]),CN.test(i)&&hle(n.children||[])}}var gle=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(i=>i.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(i=>i.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 i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}after(e,t,n){const i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i+1,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.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 mle=/['"]/,yw=/['"]/g,bw="’";function O0(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function vle(e,t){let n;const i=[],s=t.md&&t.md.options&&t.md.options.quotes||"“”‘’";for(let o=0;o<e.length;o++){const r=e[o],l=e[o].level;for(n=i.length-1;n>=0&&!(i[n].level<=l);n--);if(i.length=n+1,r.type!=="text")continue;let a=r.content,u=0,c=a.length;e:for(;u<c;){yw.lastIndex=u;const d=yw.exec(a);if(!d)break;let f=!0,p=!0;u=d.index+1;const g=d[0]==="'";let m=32;if(d.index-1>=0)m=a.charCodeAt(d.index-1);else for(n=o-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 y=32;if(u<c)y=a.charCodeAt(u);else for(n=o+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){y=e[n].content.charCodeAt(0);break}const w=Nm(m)||Lm(String.fromCharCode(m)),k=Nm(y)||Lm(String.fromCharCode(y)),A=Gh(m),v=Gh(y);if(v?f=!1:k&&(A||w||(f=!1)),A?p=!1:w&&(v||k||(p=!1)),y===34&&d[0]==='"'&&m>=48&&m<=57&&(p=f=!1),f&&p&&(f=w,p=k),!f&&!p){g&&(r.content=O0(r.content,d.index,bw));continue}if(p)for(n=i.length-1;n>=0;n--){let x=i[n];if(i[n].level<l)break;if(x.single===g&&i[n].level===l){x=i[n];let S,I;g?(S=s[2]||"‘",I=s[3]||"’"):(S=s[0]||"“",I=s[1]||"”"),r.content=O0(r.content,d.index,I),e[x.token].content=O0(e[x.token].content,x.pos,S),u+=I.length-1,x.token===o&&(u+=S.length-1),a=r.content,c=a.length,i.length=n;continue e}}f?i.push({token:o,pos:d.index,single:g,level:l}):p&&g&&(r.content=O0(r.content,d.index,bw))}}}function yle(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 i=typeof n.content=="string"?n.content:(n.children||[]).map(s=>s.content||"").join("");!mle.test(i)||!n.children||vle(n.children,e)}}function ble(e){const t=e.tokens||[],n=t.length;for(let i=0;i<n;i++){const s=t[i];if(s.type!=="inline"||!Array.isArray(s.children))continue;const o=s.children,r=o.length;for(let u=0;u<r;u++)o[u].type==="text_special"&&(o[u].type="text");let l=0,a=0;for(;a<r;a++)o[a].type==="text"&&a+1<r&&o[a+1].type==="text"?o[a+1].content=o[a].content+o[a+1].content:(a!==l&&(o[l]=o[a]),l++);a!==l&&(o.length=l)}}const kle=/^(?:vbscript|javascript|file|data):/,Ale=/^data:image\/(?:gif|png|jpeg|webp);/,wN=["http:","https:","mailto:"];function xN(e){const t=e.trim().toLowerCase();return kle.test(t)?Ale.test(t):!0}function _N(e){const t=Q5(e,!0);if(t.hostname&&(!t.protocol||wN.includes(t.protocol)))try{t.hostname=GL.default.toASCII(t.hostname)}catch{}return HL(G5(t))}function SN(e){const t=Q5(e,!0);if(t.hostname&&(!t.protocol||wN.includes(t.protocol)))try{t.hostname=GL.default.toUnicode(t.hostname)}catch{}return O3(G5(t),`${O3.defaultChars}%`)}function Cle(e){switch(e){case 9:case 32:return!0}return!1}function wle(e,t,n,i){const s=e.src,o=e.bMarks,r=e.eMarks,l=e.tShift,a=e.sCount,u=e.bsCount;let c=o[t]+l[t],d=r[t];const f=e.lineMax;if(a[t]-e.blkIndent>=4||s.charCodeAt(c)!==62)return!1;if(i)return!0;const p=[],g=[],m=[],y=[],w=e.md.block.ruler.getRulesForState(e,"blockquote"),k=e.parentType;e.parentType="blockquote";let A=!1,v;for(v=t;v<n;v++){const E=a[v]<e.blkIndent;if(c=o[v]+l[v],d=r[v],c>=d)break;if(s.charCodeAt(c++)===62&&!E){let D=a[v]+1,T,$;s.charCodeAt(c)===32?(c++,D++,$=!1,T=!0):s.charCodeAt(c)===9?(T=!0,(u[v]+D)%4===3?(c++,D++,$=!1):$=!0):T=!1;let O=D;for(p.push(o[v]),o[v]=c;c<d;){const P=s.charCodeAt(c);if(Cle(P))P===9?O+=4-(O+u[v]+($?1:0))%4:O++;else break;c++}A=c>=d,g.push(u[v]),u[v]=a[v]+1+(T?1:0),m.push(a[v]),a[v]=O-D,y.push(l[v]),l[v]=c-o[v];continue}if(A)break;let N=!1;for(let D=0,T=w.length;D<T;D++)if(w[D](e,v,n,!0)){N=!0;break}if(N){e.lineMax=v,e.blkIndent!==0&&(p.push(o[v]),g.push(u[v]),y.push(l[v]),m.push(a[v]),a[v]-=e.blkIndent);break}p.push(o[v]),g.push(u[v]),y.push(l[v]),m.push(a[v]),a[v]=-1}const x=e.blkIndent;e.blkIndent=0;const S=e.push("blockquote_open","blockquote",1);S.markup=">";const I=[t,0];S.map=I,e.md.block.tokenize(e,t,v);const _=e.push("blockquote_close","blockquote",-1);_.markup=">",e.lineMax=f,e.parentType=k,I[1]=e.line;for(let E=0;E<y.length;E++)o[E+t]=p[E],l[E+t]=y[E],a[E+t]=m[E],u[E+t]=g[E];return e.blkIndent=x,!0}function xle(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let i=t+1,s=i;for(;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,s=i;continue}break}e.line=s;const o=e.push("code_block","code",0);return o.content=`${e.getLines(t,s,4+e.blkIndent,!1)} -`,o.map=[t,e.line],!0}function _le(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>o)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,o);if(r===96&&c.includes(String.fromCharCode(r)))return!1;if(i)return!0;let d=t,f=!1;for(;d++,!(d>=n||(s=l=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],s<o&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(s)===r&&!(e.sCount[d]-e.blkIndent>=4)&&(s=e.skipChars(s,r),!(s-l<a)&&(s=e.skipSpaces(s),!(s<o)))){f=!0;break}a=e.sCount[t],e.line=d+(f?1:0);const p=e.push("fence","code",0);return p.info=c,p.content=e.getLines(t+1,d,a,!0),p.markup=u,p.map=[t,e.line],!0}const kw=["","h1","h2","h3","h4","h5","h6"],Aw=["","#","##","###","####","#####","######"];function Cw(e){switch(e){case 9:case 32:return!0}return!1}function Sle(e,t,n,i){const s=e.src,o=e.bMarks,r=e.tShift,l=e.eMarks;let a=o[t]+r[t],u=l[t];if(e.sCount[t]-e.blkIndent>=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&&a<u&&d<=6;)d++,c=s.charCodeAt(++a);if(d>6||a<u&&!Cw(c))return!1;if(i)return!0;u=e.skipSpacesBack(u,a);const f=e.skipCharsBack(u,35,a);f>a&&Cw(s.charCodeAt(f-1))&&(u=f),e.line=t+1;const p=e.push("heading_open",kw[d],1);p.markup=Aw[d],p.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",kw[d],-1);return m.markup=Aw[d],!0}function Mle(e){switch(e){case 9:case 32:return!0}return!1}function Ile(e,t,n,i){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(o++);if(r!==42&&r!==45&&r!==95)return!1;let l=1;for(;o<s;){const u=e.src.charCodeAt(o++);if(u!==r&&!Mle(u))return!1;u===r&&l++}if(l<3)return!1;if(i)return!0;e.line=t+1;const a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=new Array(l+1).join(String.fromCharCode(r)),!0}const Ed=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${Nre.source}\\s*$`),/^$/,!1]];function Ele(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=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,o),l=0;for(;l<Ed.length&&!Ed[l][0].test(r);l++);if(l===Ed.length)return!1;if(i)return Ed[l][2];let a=t+1;if(!Ed[l][1].test(r)){for(;a<n&&!(e.sCount[a]<e.blkIndent);a++)if(s=e.bMarks[a]+e.tShift[a],o=e.eMarks[a],r=e.src.slice(s,o),Ed[l][1].test(r)){r.length!==0&&a++;break}}e.line=a;const u=e.push("html_block","",0);return u.map=[t,a],u.content=e.getLines(t,a,e.blkIndent,!0),!0}function ww(e){switch(e){case 9:case 32:return!0}return!1}const ch={Pipe:1,ParagraphTerminator:2};function Tle(e){switch(e){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 124:case 126:return!0}return e>=48&&e<=57}var MN=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,i){this.src=e,this.md=t,this.env=n,this.tokens=i;const s=this.src;let o=0,r=0,l=0,a=!1,u=0;for(let c=0,d=s.length;c<d;c++){const f=s.charCodeAt(c);if(f===124&&(u|=ch.Pipe|ch.ParagraphTerminator),!a)if(ww(f)){o++,f===9?r+=4-r%4:r++;continue}else a=!0,Tle(f)&&(u|=ch.ParagraphTerminator);(f===10||c===d-1)&&(f!==10&&c++,this.bMarks.push(l),this.eMarks.push(c),this.tShift.push(o),this.sCount.push(r),this.bsCount.push(0),this.lineFlags.push(u),a=!1,o=0,r=0,u=0,l=c+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineFlags.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){if(n===0){const s=new Is(e,t,0);return s.block=!0,s.level=this.level,this.tokens.push(s),s}const i=new Is(e,t,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){const t=this.bMarks,n=this.tShift,i=this.eMarks;for(let s=this.lineMax;e<s&&!(t[e]+n[e]<i[e]);e++);return e}skipSpaces(e){const t=this.src;for(let n=t.length;e<n;e++){const i=t.charCodeAt(e);if(i!==9&&i!==32)break}return e}skipSpacesBack(e,t){if(e<=t)return e;const n=this.src;for(;e>t;){const i=n.charCodeAt(--e);if(i!==9&&i!==32)return e+1}return e}skipChars(e,t){const n=this.src;for(let i=n.length;e<i&&n.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,n){if(e<=n)return e;const i=this.src;for(;e>n;)if(t!==i.charCodeAt(--e))return e+1;return e}getLines(e,t,n,i){if(e>=t)return"";if(e+1===t){const c=e,d=this.bMarks[c];let f=d;const p=i?this.eMarks[c]+1:this.eMarks[c];let g=0;const m=this.src,y=this.bsCount,w=this.tShift;for(;f<p&&g<n;){const k=m.charCodeAt(f);if(k===9||k===32)k===9?g+=4-(g+y[c])%4:g++;else if(f-d<w[c])g++;else break;f++}return g>n?new Array(g-n+1).join(" ")+m.slice(f,p):m.slice(f,p)}const s=new Array(t-e),o=this.src,r=this.bMarks,l=this.eMarks,a=this.bsCount,u=this.tShift;for(let c=0,d=e;d<t;d++,c++){let f=0;const p=r[d];let g=p,m;for(d+1<t||i?m=l[d]+1:m=l[d];g<m&&f<n;){const y=o.charCodeAt(g);if(ww(y))y===9?f+=4-(f+a[d])%4:f++;else if(g-p<u[d])f++;else break;g++}f>n?s[c]=new Array(f-n+1).join(" ")+o.slice(g,m):s[c]=o.slice(g,m)}return s.join("")}};MN.prototype.Token=Is;function Lle(e,t,n){for(let i=t;i<n;i++)if(e.charCodeAt(i)===124)return!0;return!1}function IN(e){const t=e?.md?.block?.ruler;return t?t.version===t.__mdtsDefaultVersion:!1}function EN(e,t,n,i,s){if(e.lineFlags&&(e.lineFlags[t]&ch.ParagraphTerminator)===0||i>=s)return!1;const o=n.charCodeAt(i);switch(o){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 126:return!0}return o>=48&&o<=57?!0:Lle(n,i,s)}const xw=["","h1","h2"];function Nle(e,t,n){const i=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.src,o=e.bMarks,r=e.tShift,l=e.eMarks,a=e.sCount,u=e.blkIndent,c=IN(e);if(a[t]-u>=4)return!1;const d=e.parentType;e.parentType="paragraph";let f=0,p,g=t+1;for(;g<n;g++){const v=o[g]+r[g],x=l[g];if(v>=x)break;if(a[g]-u>3)continue;if(a[g]>=u&&(p=s.charCodeAt(v),p===45||p===61)){let I=v+1,_=I;for(;I<x&&s.charCodeAt(I)===p;)I++;for(_=I;I<x;){const E=s.charCodeAt(I);if(E!==9&&E!==32)break;I++}if(I>=x){f=p===61?1:2;break}if(_-v>1)continue}if(a[g]<0||c&&!EN(e,g,s,v,x))continue;let S=!1;for(let I=0,_=i.length;I<_;I++)if(i[I](e,g,n,!0)){S=!0;break}if(S)break}if(!f)return!1;let m;if(g===t+1){const v=o[t]+r[t];let x=l[t];for(;x>v;){const S=s.charCodeAt(x-1);if(S!==9&&S!==32)break;x--}m=s.slice(v,x)}else m=e.getLines(t,g,u,!1).trim();e.line=g+1;const y=p===61?"=":"-",w=e.push("heading_open",xw[f],1);w.markup=y,w.map=[t,e.line];const k=e.push("inline","",0);k.content=m,k.map=[t,e.line-1],k.children=[];const A=e.push("heading_close",xw[f],-1);return A.markup=y,e.parentType=d,!0}function TN(e){switch(e){case 9:case 32:return!0}return!1}function _w(e,t){const n=e.eMarks,i=e.bMarks,s=e.tShift,o=e.src,r=n[t];let l=i[t]+s[t];const a=o.charCodeAt(l++);return a!==42&&a!==45&&a!==43||l<r&&!TN(o.charCodeAt(l))?-1:l}function Sw(e,t){const n=e.bMarks,i=e.tShift,s=e.eMarks,o=e.src,r=n[t]+i[t],l=s[t];let a=r;if(a+1>=l)return-1;let u=o.charCodeAt(a++);if(u<48||u>57)return-1;for(;;){if(a>=l)return-1;if(u=o.charCodeAt(a++),u>=48&&u<=57){if(a-r>=10)return-1;continue}if(u===41||u===46)break;return-1}return a<l&&(u=o.charCodeAt(a),!TN(u))?-1:a}function Fle(e,t,n){const i=e.bMarks,s=e.tShift,o=e.src,r=i[t]+s[t];let l=0;for(let a=r;a<n-1;a++)l=l*10+o.charCodeAt(a)-48;return l}const Ble=["0","1","2","3","4","5","6","7","8","9"];function $le(e,t){const n=e.level+2,i=e.tokens;for(let s=t+2,o=i.length-2;s<o;s++){const r=i[s];if(r.level===n){if(r.type==="paragraph_open"){r.hidden=!0,i[s+2].hidden=!0,s+=2;continue}if(r.nesting===1){let l=1;for(;l>0&&++s<o;)l+=i[s].nesting}}}}function Dle(e,t,n,i){let s,o,r=0,l=t,a=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let u=!1;i&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(u=!0);let c,d,f;const p=e.src,g=e.bMarks,m=e.tShift,y=e.eMarks,w=e.sCount,k=e.bsCount,A=g[l]+m[l];if(A>=y[l])return!1;const v=p.charCodeAt(A);if(v>=48&&v<=57){if(f=Sw(e,l),f<0||(c=!0,r=A,d=Fle(e,l,f),u&&d!==1))return!1}else if(v===42||v===45||v===43){if(f=_w(e,l),f<0)return!1;c=!1}else return!1;if(u&&e.skipSpaces(f)>=y[l])return!1;if(i)return!0;const x=p.charCodeAt(f-1),S=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 I=[l,0];e.tokens[e.tokens.length-1].map=I,e.tokens[e.tokens.length-1].markup=S;let _=!1;const E=e.tokens.length-1,N=e.md.block.ruler.getRulesForState(e,"list"),D=e.parentType;for(e.parentType="list";l<n;){o=f,s=y[l];const T=w[l]+f-(g[l]+m[l]);let $=T;for(;o<s;){const X=p.charCodeAt(o);if(X===9)$+=4-($+k[l])%4;else if(X===32)$++;else break;o++}const O=o;let P;O>=s?P=1:P=$-T,P>4&&(P=1);const R=T+P,j=e.push("list_item_open","li",1);j.markup=S;const z=[l,0];j.map=z,c&&(j.info=f-r-1===1?Ble[p.charCodeAt(r)-48]:p.slice(r,f-1));const K=e.tight,q=e.tShift[l],W=e.sCount[l],Z=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=R,e.tight=!0,e.tShift[l]=O-g[l],e.sCount[l]=$,O>=s&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||_)&&(a=!1),_=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=Z,e.tShift[l]=q,e.sCount[l]=W,e.tight=K,e.push("list_item_close","li",-1).markup=S,l=e.line,z[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let ne=!1;for(let X=0,ue=N.length;X<ue;X++)if(N[X](e,l,n,!0)){ne=!0;break}if(ne)break;if(c){if(f=Sw(e,l),f<0)break;r=g[l]+m[l]}else if(f=_w(e,l),f<0)break;if(x!==p.charCodeAt(f-1))break}return c?e.push("ordered_list_close","ol",-1).markup=S:e.push("bullet_list_close","ul",-1).markup=S,I[1]=l,e.line=l,e.parentType=D,a&&$le(e,E),!0}function Mw(e){return e===9||e===32}function zle(e,t,n){const i=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.parentType,o=e.src,r=e.bMarks,l=e.tShift,a=e.eMarks,u=e.sCount,c=e.blkIndent,d=IN(e);let f=t+1;for(e.parentType="paragraph";f<n&&!e.isEmpty(f);f++){if(u[f]-c>3||u[f]<0)continue;if(s==="list"&&u[f]>=c){const A=r[f]+l[f],v=a[f];if(A<v){const x=o.charCodeAt(A);if(x===42||x===45||x===43){if(A+1>=v||Mw(o.charCodeAt(A+1)))break}else if(x>=48&&x<=57&&A+1<v){let S=A+1;for(;;){if(S>=v){S=-1;break}const I=o.charCodeAt(S++);if(I>=48&&I<=57){if(S-A>=10){S=-1;break}continue}if((I===41||I===46)&&(S>=v||Mw(o.charCodeAt(S))))break;S=-1;break}if(S>=0)break}}}const y=r[f]+l[f],w=a[f];if(d&&!EN(e,f,o,y,w))continue;let k=!1;for(let A=0,v=i.length;A<v;A++)if(i[A](e,f,n,!0)){k=!0;break}if(k)break}const p=e.getLines(t,f,c,!1).trim();e.line=f;const g=e.push("paragraph_open","p",1);g.map=[t,e.line];const m=e.push("inline","",0);return m.content=p,m.map=[t,e.line],m.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}function P0(e){switch(e){case 9:case 32:return!0}return!1}function Rle(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],r=t+1;const l=e.md.block.ruler.getRulesForState(e,"reference");if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==91)return!1;function a(A){const v=e.lineMax;if(A>=v||e.isEmpty(A))return null;let x=!1;if(e.sCount[A]-e.blkIndent>3&&(x=!0),e.sCount[A]<0&&(x=!0),!x){const _=e.parentType;e.parentType="reference";let E=!1;for(let N=0,D=l.length;N<D;N++)if(l[N](e,A,v,!0)){E=!0;break}if(e.parentType=_,E)return null}const S=e.bMarks[A]+e.tShift[A],I=e.eMarks[A];return e.src.slice(S,I+1)}let u=e.src.slice(s,o+1);o=u.length;let c=-1;for(s=1;s<o;s++){const A=u.charCodeAt(s);if(A===91)return!1;if(A===93){c=s;break}else if(A===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(A===92&&(s++,s<o&&u.charCodeAt(s)===10)){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(s=c+2;s<o;s++){const A=u.charCodeAt(s);if(A===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(!P0(A))break}const d=e.md.helpers.parseLinkDestination(u,s,o);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;s=d.pos;const p=s,g=r,m=s;for(;s<o;s++){const A=u.charCodeAt(s);if(A===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(!P0(A))break}let y=e.md.helpers.parseLinkTitle(u,s,o);for(;y.can_continue;){const A=a(r);if(A===null)break;u+=A,s=o,o=u.length,r++,y=e.md.helpers.parseLinkTitle(u,s,o,y)}let w;for(s<o&&m!==s&&y.ok?(w=y.str,s=y.pos):(w="",s=p,r=g);s<o&&P0(u.charCodeAt(s));)s++;if(s<o&&u.charCodeAt(s)!==10&&w)for(w="",s=p,r=g;s<o&&P0(u.charCodeAt(s));)s++;if(s<o&&u.charCodeAt(s)!==10)return!1;const k=hv(u.slice(1,c));return k?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[k]>"u"&&(e.env.references[k]={title:w,href:f}),e.line=r),!0):!1}function py(e){switch(e){case 9:case 32:return!0}return!1}const Ole=65536;function gy(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function Ple(e,t){if(e.lineFlags)return(e.lineFlags[t]&ch.Pipe)!==0;for(let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];n<i;n++)if(e.src.charCodeAt(n)===124)return!0;return!1}function Iw(e){const t=[],n=e.length;let i=0,s=e.charCodeAt(i),o=!1,r=0,l="";for(;i<n;)s===124&&(o?(l+=e.substring(r,i-1),r=i):(t.push(l+e.substring(r,i)),l="",r=i+1)),o=s===92,i++,s=e.charCodeAt(i);return t.push(l+e.substring(r)),t}function jle(e,t,n,i){if(t+2>n)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent||e.sCount[s]-e.blkIndent>=4)return!1;let o=e.bMarks[s]+e.tShift[s];if(o>=e.eMarks[s])return!1;const r=e.src.charCodeAt(o++);if(r!==124&&r!==45&&r!==58||o>=e.eMarks[s])return!1;const l=e.src.charCodeAt(o++);if(l!==124&&l!==45&&l!==58&&!py(l)||r===45&&py(l)||!Ple(e,t))return!1;for(;o<e.eMarks[s];){const v=e.src.charCodeAt(o);if(v!==124&&v!==45&&v!==58&&!py(v))return!1;o++}let a=gy(e,t+1),u=a.split("|");const c=[];for(let v=0;v<u.length;v++){const x=u[v].trim();if(!x){if(v===0||v===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(x))return!1;x.charCodeAt(x.length-1)===58?c.push(x.charCodeAt(0)===58?"center":"right"):x.charCodeAt(0)===58?c.push("left"):c.push("")}if(a=gy(e,t).trim(),e.sCount[t]-e.blkIndent>=4)return!1;u=Iw(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(i)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRulesForState(e,"blockquote"),g=e.push("table_open","table",1),m=[t,0];g.map=m;const y=e.push("thead_open","thead",1);y.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let v=0;v<u.length;v++){const x=e.push("th_open","th",1);c[v]&&(x.attrs=[["style",`text-align:${c[v]}`]]);const S=e.push("inline","",0);S.content=u[v].trim(),S.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let k,A=0;for(s=t+2;s<n&&!(e.sCount[s]<e.blkIndent);s++){let v=!1;for(let S=0,I=p.length;S<I;S++)if(p[S](e,s,n,!0)){v=!0;break}if(v||(a=gy(e,s).trim(),!a)||e.sCount[s]-e.blkIndent>=4||(u=Iw(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),A+=d-u.length,A>Ole))break;if(s===t+2){const S=e.push("tbody_open","tbody",1);S.map=k=[t+2,0]}const x=e.push("tr_open","tr",1);x.map=[s,s+1];for(let S=0;S<d;S++){const I=e.push("td_open","td",1);c[S]&&(I.attrs=[["style",`text-align:${c[S]}`]]);const _=e.push("inline","",0);_.content=u[S]?u[S].trim():"",_.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return k&&(e.push("tbody_close","tbody",-1),k[1]=s),e.push("table_close","table",-1),m[1]=s,e.parentType=f,e.line=s,!0}var Hle=class{_rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t,n){this._rules.push({name:e,enabled:!0,fn:t,alt:n?.alt||[]}),this.invalidateCache()}before(e,t,n,i){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s,0,{name:t,enabled:!0,fn:n,alt:i?.alt||[]}),this.invalidateCache()}after(e,t,n,i){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:i?.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:i,fn:s})=>(o,r,l,a)=>{const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),c=s(o,r,l,a),d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();return ff(o?.env,"block",i,d-u,c,!!a),c}):this.getRules(t)}at(e,t,n){const i=this._rules.findIndex(s=>s.name===e);if(i===-1)throw new Error(`Parser rule not found: ${e}`);this._rules[i].fn=t,n?.alt&&(this._rules[i].alt=n.alt),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled||(this._rules[r].enabled=!0,s=!0)}),s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled&&(this._rules[r].enabled=!1,s=!0)}),s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this._rules){const s=t.has(i.name);i.enabled!==s&&(i.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){const e=new Set([""]);for(const i of this._rules)if(i.enabled)for(const s of i.alt)e.add(s);const t=Object.create(null),n=Object.create(null);for(const i of e){const s=[],o=[];for(const r of this._rules)r.enabled&&(i!==""&&!r.alt.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t[i]=s,n[i]=o}this.cache=t,this.namedCache=n}};const j0=[["table",jle,["paragraph","reference"]],["code",xle],["fence",_le,["paragraph","reference","blockquote","list"]],["blockquote",wle,["paragraph","reference","blockquote","list"]],["hr",Ile,["paragraph","reference","blockquote","list"]],["list",Dle,["paragraph","reference","blockquote"]],["reference",Rle],["html_block",Ele,["paragraph","reference","blockquote"]],["heading",Sle,["paragraph","reference","blockquote"]],["lheading",Nle],["paragraph",zle]];var Wle=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new Hle;for(let e=0;e<j0.length;e++)this.ruler.push(j0[e][0],j0[e][1],{alt:(j0[e][2]||[]).slice()});this.ruler.__mdtsDefaultVersion=this.ruler.version}tokenize(e,t,n){const i=this.getRules(),s=i.length,o=e.md.options.maxNesting,r=e.bMarks,l=e.tShift,a=e.eMarks,u=e.sCount;let c=t,d=!1;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){for(;c<n;){for(;c<n&&r[c]+l[c]>=a[c];)c++;if(e.line=c,c>=n||u[c]<e.blkIndent)break;if(e.level>=o){e.line=n;break}const p=e.line;let g=!1;for(let m=0;m<s;m++)if(g=i[m](e,c,n,!1),g){if(p>=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<n&&r[c]+l[c]>=a[c]&&(d=!0,c++,e.line=c)}return}const f=this.ruler.getNamedRules("");for(;c<n;){for(;c<n&&r[c]+l[c]>=a[c];)c++;if(e.line=c,c>=n||u[c]<e.blkIndent)break;if(e.level>=o){e.line=n;break}const p=e.line;let g=!1;for(let m=0;m<s;m++){const y=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();g=f[m].fn(e,c,n,!1);const w=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(ff(e.env,"block",f[m].name,w-y,g,!1),g){if(p>=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<n&&r[c]+l[c]>=a[c]&&(d=!0,c++,e.line=c)}}parse(e,t,n,i){if(!e||e.length===0)return;const s=new MN(e,t,n,i);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}},LN=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}};LN.prototype.Token=Is;const Ew=[["normalize",lle],["block",pre],["inline",Jre],["linkify",sle],["replacements",ple],["smartquotes",yle],["text_join",ble]],qle={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},Ule={parseLinkLabel:sb,parseLinkDestination:ib,parseLinkTitle:ob};function Kle(){return{...qle}}function Vle(){return{...Ule}}var Zle=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new Wle,this.inline=new Yre,this.ruler=new gle;for(let e=0;e<Ew.length;e++){const[t,n]=Ew[e];this.ruler.push(t,n)}this.fallbackParser={block:this.block,inline:this.inline,core:this,options:Kle(),helpers:Vle(),normalizeLink:_N,normalizeLinkText:SN,validateLink:xN,linkify:null}}resolveParser(e){return e||(this.linkifyInstance||(this.linkifyInstance=new ZL({fuzzyLink:!0})),this.fallbackParser.block!==this.block&&(this.fallbackParser.block=this.block),this.fallbackParser.inline!==this.inline&&(this.fallbackParser.inline=this.inline),this.fallbackParser.core=this,this.fallbackParser.linkify=this.linkifyInstance,this.fallbackParser)}createState(e,t={},n){return new LN(e,this.resolveParser(n),t)}getCoreRules(){return this.cachedCoreRulesVersion!==this.ruler.version&&(this.cachedCoreRules=this.ruler.getRules(""),this.cachedCoreRulesVersion=this.ruler.version),this.cachedCoreRules}getCoreNamedRules(){return this.cachedCoreNamedRulesVersion!==this.ruler.version&&(this.cachedCoreNamedRules=this.ruler.getNamedRules(""),this.cachedCoreNamedRulesVersion=this.ruler.version),this.cachedCoreNamedRules}process(e){if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const n=this.getCoreRules();for(let i=0;i<n.length;i++)n[i](e);return}const t=this.getCoreNamedRules();for(let n=0;n<t.length;n++){const i=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();t[n].fn(e);const s=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();ff(e.env,"core",t[n].name,s-i,!0,!1)}Gre(e.env)}parseSource(e,t={},n){if(typeof e!="string"&&hre(e))return this.parse(JL(e),t,n);const i=this.createState(e,t,n);return this.process(i),this.lastState=i,i}parse(e,t={},n){if(typeof e!="string")throw new TypeError("Input data should be a String");return this.parseSource(e,t,n)}getTokens(){return this.lastState?this.lastState.tokens:[]}};const Gle=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/;function $m(e){return!Gle.test(e)}function U1(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function Mg(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9)return!1}return!0}function Tw(e,t,n){return t+2<n&&e.charCodeAt(t)===96&&e.charCodeAt(t+1)===96&&e.charCodeAt(t+2)===96}function my(e,t,n){return t+1<n&&e.charCodeAt(t)===45&&e.charCodeAt(t+1)===32}function Qle(e){if(e.length>3)return $m(e);for(let t=0;t<e.length;t++)switch(e.charCodeAt(t)){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!1}return!0}const Yle=["","h1","h2","h3","h4","h5","h6"],Jle=["","#","##","###","####","#####","######"],Lw=0,vy=1,yy=2;function zr(e,t,n,i){const s=new Is(e,t,n);return s.level=i,s.block=!0,s}function ub(e,t,n){const i=zr("inline","",0,n);i.map=[t,t+1],i.content=e;const s=new Is("text","",0);return s.content=e,i.children=[s],i}function Xle(e,t,n,i,s){let o=0,r=n;for(;r<i&&t.charCodeAt(r)===35&&o<6;)r++,o++;if(o===0||r>=i||t.charCodeAt(r)!==32)return!1;let l=r+1;for(;l<i&&t.charCodeAt(l)===32;)l++;let a=i;for(;a>l&&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(!$m(c))return!1;const d=Yle[o],f=Jle[o],p=zr("heading_open",d,1,0);p.map=[s,s+1],p.markup=f,e.push(p),e.push(ub(c,s,1));const g=zr("heading_close",d,-1,0);return g.markup=f,e.push(g),!0}function eae(e,t,n){const i=zr("paragraph_open","p",1,0);i.map=[n,n+1],e.push(i),e.push(ub(t,n,1)),e.push(zr("paragraph_close","p",-1,0))}function tae(e,t,n){const i=e.charCodeAt(n-1);return i===32||i===9?e.slice(t,n).trim():e.slice(t,n)}function by(e,t){for(;t<e.length&&e.charCodeAt(t)===10;)t++;return t}function nae(e,t){const n=zr("bullet_list_open","ul",1,0);return n.map=[t,t],n.markup="-",e.push(n),n}function iae(e,t,n){const i=zr("list_item_open","li",1,1);i.map=[n,n+1],i.markup="-",e.push(i);const s=zr("paragraph_open","p",1,2);s.map=[n,n+1],s.hidden=!0,e.push(s),e.push(ub(t,n,3));const o=zr("paragraph_close","p",-1,2);o.hidden=!0,e.push(o);const r=zr("list_item_close","li",-1,1);return r.markup="-",e.push(r),i}function sae(e){const t=zr("bullet_list_close","ul",-1,0);t.markup="-",e.push(t)}function oae(e,t,n,i){if(!Tw(e,t,n))return null;const s=e.slice(t+3,n);if(s.includes("`"))return null;const o=n<e.length?n+1:n;let r=o,l=o,a=i+1;for(;l<e.length;){const u=U1(e,l);if(Tw(e,l,u)&&Mg(e,l+3,u)){const c=zr("fence","code",0,0);return c.map=[i,a+1],c.markup="```",c.info=s,c.content=e.slice(o,r),{token:c,nextPos:u<e.length?u+1:u,nextLine:a+1}}l=u<e.length?u+1:u,r=l,a++}return null}function rae(e,t){if(e.length===0)return t&&(t.matched=!0),[];if(e.includes("\r")||e.includes("\0"))return null;const n=[];let i=e.length>=1e5?Lw:yy,s="",o=!1,r=!1,l=0,a=0;for(;l<e.length;){const u=U1(e,l);if(l===u){l=u<e.length?u+1:u,a++;continue}const c=e.charCodeAt(l);if(c===32||c===9){if(!Mg(e,l,u))return null;l=u<e.length?u+1:u,a++;continue}if(c===35){if(!Xle(n,e,l,u,a))return null;t&&(t.blocks++,t.headings++);const g=u<e.length?u+1:u;l=by(e,g),a+=1+l-g;continue}if(c===45){if(!my(e,l,u))return null;const g=a;let m=l,y=a,w=null,k=null;for(;m<e.length;){const x=U1(e,m);if(!my(e,m,x))break;const S=m+2,I=x===S+1?e[S]:e.slice(S,x);if(!Qle(I))return null;w===null&&(w=nae(n,g)),k=iae(n,I,y),m=x<e.length?x+1:x,y++}if(w===null||k===null)return null;let A=m,v=y;for(;A<e.length;){if(e.charCodeAt(A)===10){A++,v++;continue}const x=U1(e,A);if(!Mg(e,A,x)){if(my(e,A,x))return null;break}A=x<e.length?x+1:x,v++}w.map[1]=v,k.map[1]=v,sae(n),t&&(t.blocks++,t.lists++),l=A,a=v;continue}if(c===96){const g=oae(e,l,u,a);if(!g)return null;n.push(g.token),t&&(t.blocks++,t.fences++),l=by(e,g.nextPos),a=g.nextLine+l-g.nextPos;continue}const d=tae(e,l,u);let f;if(i===yy?(t&&t.paragraphCacheBypasses++,f=$m(d)):i===vy&&d===s?(t&&t.paragraphCacheHits++,f=o):(t&&t.paragraphCacheMisses++,f=$m(d),i===Lw?(r&&(i=d===s?vy:yy),s=d,o=f,r=!0):i===vy&&(s=d,o=f)),!f)return null;const p=u<e.length?u+1:u;if(p<e.length&&e.charCodeAt(p)!==10&&!Mg(e,p,U1(e,p)))return null;eae(n,d,a),t&&(t.blocks++,t.paragraphs++),l=by(e,p),a+=1+l-p}return t&&(t.matched=!0),n}const lae=/[&<>"]/,Nw=/[&<>"]/g,aae=/&/g,uae=/[<>"]/g,cae={"&":"&","<":"<",">":">",'"':"""};function ky(e){return cae[e]||e}function hi(e){if(e.length===0)return"";if(e.length<32)return lae.test(e)?e.replace(Nw,ky):e;const t=e.includes("&"),n=e.includes("<"),i=e.includes(">"),s=e.includes('"');return!t&&!n&&!i&&!s?e:t&&!n&&!i&&!s?e.replace(aae,"&"):t?e.replace(Nw,ky):e.replace(uae,ky)}const dae=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),fae=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function NN(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(dae,(t,n,i)=>{if(n)return n;if(fae.test(i)){const o=i[1].toLowerCase()==="x"?Number.parseInt(i.slice(2),16):Number.parseInt(i.slice(1),10);return pv(o)?Qh(o):"�"}const s=Z5(t);return s!==t?s:t})}const hae=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,pae=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,gae=/"/g;function Gd(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function Dm(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9)return!1}return!0}function H0(e,t){for(;t<e.length&&e.charCodeAt(t)===10;)t++;return t}function mae(e,t){return t>=e.length||e.charCodeAt(t)===10?!1:!Dm(e,t,Gd(e,t))}function Fw(e,t,n){return t+2<n&&e.charCodeAt(t)===96&&e.charCodeAt(t+1)===96&&e.charCodeAt(t+2)===96}function vae(e,t,n){const i=e.charCodeAt(n-1);return i===32||i===9?e.slice(t,n).trim():e.slice(t,n)}function cb(e){return pae.test(e)?hae.test(e)?null:e.replace(gae,"""):e}function yae(e,t,n){let i=0,s=t;for(;s<n&&e.charCodeAt(s)===35&&i<6;)s++,i++;if(i===0||s>=n||e.charCodeAt(s)!==32)return null;let o=s+1;for(;o<n&&e.charCodeAt(o)===32;)o++;let r=n;for(;r>o&&e.charCodeAt(r-1)===32;)r--;let l=r;for(;l>o&&e.charCodeAt(l-1)===35;)l--;if(l>o&&e.charCodeAt(l-1)===32)for(r=l-1;r>o&&e.charCodeAt(r-1)===32;)r--;const a=cb(e.slice(o,r));return a===null?null:`<h${i}>${a}</h${i}> -`}function Bw(e,t,n){return t+1<n&&e.charCodeAt(t)===45&&e.charCodeAt(t+1)===32}function bae(e,t){switch(e.charCodeAt(t)){case 34:return`<li>"</li> -`;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`<li>${e[t]}</li> -`}function kae(e,t,n){const i=t+2;if(n===i+1)return bae(e,i);const s=cb(e.slice(t+2,n));return s===null?null:`<li>${s}</li> -`}function Aae(e,t,n){for(;t<n;){const s=e.charCodeAt(t);if(s!==32&&s!==9)break;t++}for(;n>t;){const s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}let i=n;for(let s=t;s<n;s++){const o=e.charCodeAt(s);if(o===96)return null;if(o===32||o===9){i=s;break}}return e.slice(t,i)}function Cae(e,t,n,i,s){if(!Fw(e,t,n))return null;const o=Aae(e,t+3,n);if(o===null)return null;const r=n<e.length?n+1:n;let l=r,a=r;for(;a<e.length;){const u=Gd(e,a);if(Fw(e,a,u)&&Dm(e,a+3,u)){const c=e.slice(r,l);let d;return o===i.lang?(s&&s.fenceCacheHits++,d=i.open):(s&&s.fenceCacheMisses++,d=o?`<pre><code class="language-${hi(o)}">`:"<pre><code>",i.lang=o,i.open=d),{html:`${d}${hi(c)}</code></pre> -`,nextPos:u<e.length?u+1:u}}a=u<e.length?u+1:u,l=a}return null}function FN(e,t){if(e.length===0)return t&&(t.matched=!0),"";if(e.includes("\r")||e.includes("\0"))return null;let n=0,i="";const s=e.length>=25e4,o=[],r={lang:null,open:""};let l="",a="",u="",c="";for(;n<e.length;){const d=Gd(e,n);if(n===d){n=d<e.length?d+1:d;continue}const f=e.charCodeAt(n);if(f===32||f===9){if(!Dm(e,n,d))return null;n=d<e.length?d+1:d;continue}if(f===35){const y=yae(e,n,d);if(y===null)return null;t&&(t.blocks++,t.headings++),s?o.push(y):i+=y,n=H0(e,d<e.length?d+1:d);continue}if(f===45){let y=n;for(;y<e.length;){const v=Gd(e,y);if(!Bw(e,y,v))break;y=v<e.length?v+1:v}if(y===n)return null;const w=e.slice(n,y);let k;if(w===l)t&&t.listCacheHits++,k=a;else{t&&t.listCacheMisses++;let v=n;for(k=`<ul> -`;v<y;){const x=Gd(e,v),S=kae(e,v,x);if(S===null)return null;k+=S,v=x<e.length?x+1:x}k+=`</ul> -`,l=w,a=k}let A=H0(e,y);for(;A<e.length;){if(e.charCodeAt(A)===10){A++;continue}const v=Gd(e,A);if(!Dm(e,A,v)){if(Bw(e,A,v))return null;break}A=v<e.length?v+1:v}t&&(t.blocks++,t.lists++),s?o.push(k):i+=k,n=A;continue}if(f===96){const y=Cae(e,n,d,r,t);if(!y)return null;t&&(t.blocks++,t.fences++),s?o.push(y.html):i+=y.html,n=H0(e,y.nextPos);continue}const p=vae(e,n,d);let g;if(p===u)t&&t.paragraphCacheHits++,g=c;else{t&&t.paragraphCacheMisses++;const y=cb(p);if(y===null)return null;g=`<p>${y}</p> -`,u=p,c=g}const m=d<e.length?d+1:d;if(m<e.length&&e.charCodeAt(m)!==10&&mae(e,m))return null;t&&(t.blocks++,t.paragraphs++),s?o.push(g):i+=g,n=H0(e,m)}return t&&(t.matched=!0),s?o.join(""):i}function $w(e){return FN(e)}function Dw(e,t){return FN(e,t)}const wae={maxChunkChars:1e4,maxChunkLines:200,fenceAware:!0,maxChunks:void 0,fallbackOnGlobalState:!0};function zm(e,t,n={},i){Io(n);const s={...wae,...i||{}},o=Vo(t);if(s.fallbackOnGlobalState!==!1&&o)return dy(n,{count:1,fallback:!0,fallbackReason:o,globalStateDetected:o,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),df(n,o,()=>e.core.parse(t,n,e).tokens);let r=Ig(t,s);if(s.maxChunks&&r.length>s.maxChunks&&(r=Mae(r,s.maxChunks)),Eg(t,r))return dy(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),df(n,o,()=>e.core.parse(t,n,e).tokens);let l=0;const a=[];return dy(n,{count:r.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:o||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!o}),df(n,o,()=>{for(let u=0;u<r.length;u++){const c=r[u],d=t.slice(c.start,c.end),f=e.core.parse(d,n,e).tokens;l!==0&&f.length&&_ae(f,l),Sae(a,f),l+=c.lineCount}return a})}function Ig(e,t,n=!0){const i=[];let s=0,o=0,r=0,l=0,a=0,u=0,c=null;function d(f){f<=r||(i.push({start:r,end:f,lineCount:l}),r=f,s=0,o=0,l=0)}for(let f=0;f<e.length;){let p=e.indexOf(` -`,f),g=p;p===-1?(p=e.length,g=e.length):g=p+1;const m=Iae(e,f,p);if(t.fenceAware){let k=f;for(;k<p;){const v=e.charCodeAt(k);if(v===32||v===9)k++;else break}const A=e[k];if(A==="`"||A==="~"){let v=k;for(;v<p&&e[v]===A;)v++;const x=v-k;x>=3&&(c?c.marker===A&&x>=c.length&&(c=null):c={marker:A,length:x})}}const y=g-f;s+=y,o+=1,l+=1,m?(a=0,u=0):(a+=1,u+=y);const w=m;if((s>=t.maxChunkChars||o>=t.maxChunkLines)&&!c)if(w)d(g);else{const k=Math.max(10,Math.floor(t.maxChunkLines*.5)),A=Math.max(t.maxChunkChars,8e3);(a>=k||u>=A)&&d(g)}f=g}return n&&d(e.length),i}function Eg(e,t,n={rangesCoverWholeSource:!0}){const i=n.rangesCoverWholeSource?t.length-1:t.length;for(let s=0;s<i;s++)if(!xae(e,t[s].end))return!0;return!1}function xae(e,t){if(t<=0||t>e.length||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;for(let i=n+1;i<t-1;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}function _ae(e,t){if(t===0)return;const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function Sae(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function Mae(e,t){if(e.length<=t)return e;const n=[];let i=0;for(let s=0;s<t;s++){const o=t-s,r=e.length-i,l=Math.ceil(r/o),a=e.slice(i,i+l);let u=0;for(let c=0;c<a.length;c++)u+=a[c].lineCount;n.push({start:a[0].start,end:a[a.length-1].end,lineCount:u}),i+=l}return n}function Iae(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}const BN=4e6,$N=8e4,Eae=1e4,Tae=200,Lae=1e4,Nae=200;function DN(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function Fae(e,t){if(t===0)return;const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function Ua(e){return e.length===0?0:Qi(e)+(e.charCodeAt(e.length-1)===10?0:1)}function Bae(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}function $ae(e,t){if(!t||e.length===0)return!1;let n=null;for(let i=0;i<e.length;){let s=e.indexOf(` -`,i);s===-1&&(s=e.length);let o=i;for(;o<s;){const l=e.charCodeAt(o);if(l===32||l===9)o++;else break}const r=e[o];if(r==="`"||r==="~"){let l=o;for(;l<s&&e[l]===r;)l++;const a=l-o;a>=3&&(n?n.marker===r&&a>=n.length&&(n=null):n={marker:r,length:a})}i=s===e.length?e.length:s+1}return n!==null}function Dae(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 Bae(e,n+1,e.length-1)?!$ae(e,t):!1}function zae(e,t,n,i={}){const s=i.mode??"full",o=i.fenceAware??(s==="stream"?e.options.streamChunkFenceAware??!0:e.options.fullChunkFenceAware??!0);if(i.maxChunkChars!==void 0||i.maxChunkLines!==void 0||i.autoTune===!1){const r=i.maxChunkChars??(s==="stream"?e.options.streamChunkSizeChars??Lae:e.options.fullChunkSizeChars??Eae),l=i.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??Nae:e.options.fullChunkSizeLines??Tae);return{maxChunkChars:r,maxChunkLines:l,holdBelowChars:r,holdBelowLines:l,fenceAware:o}}return s==="stream"?t<=5e3?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=2e4?{maxChunkChars:16e3,maxChunkLines:200,holdBelowChars:16e3,holdBelowLines:200,fenceAware:o}:t<=5e4?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}:t<=1e5&&n<=2500?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:1e5,holdBelowLines:2500,fenceAware:o}:t<=2e5?{maxChunkChars:2e4,maxChunkLines:150,holdBelowChars:2e4,holdBelowLines:150,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}}var wp=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=Ua(this.pending);if(this.pending.length<t.holdBelowChars&&n<t.holdBelowLines)return this.updateEnvDiagnostics(e,t,n),null;const i=Ig(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!1);if(!i.length)return this.updateEnvDiagnostics(e,t,n),null;if(Eg(this.pending,i,{rangesCoverWholeSource:!1}))return this.updateEnvDiagnostics(e,t,n),null;const s=this.commitRanges(i,e);return this.pending=this.pending.slice(s),this.updateEnvDiagnostics(e,t,Ua(this.pending)),this.tokens}flushIfBoundary(e={}){if(!this.pending)return null;const t=this.resolveWindow();if(!Dae(this.pending,t.fenceAware))return this.updateEnvDiagnostics(e,t,Ua(this.pending)),null;const n=Ig(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!0);if(!n.length)return this.updateEnvDiagnostics(e,t,Ua(this.pending)),null;const i=Eg(this.pending,n,{rangesCoverWholeSource:!0})?[{start:0,end:this.pending.length,lineCount:Ua(this.pending)}]:n;return this.commitRanges(i,e),this.pending="",this.updateEnvDiagnostics(e,t,0),this.tokens}flushForce(e={}){if(!this.pending){this.prepareGlobalStateEnv(e,"");const i=this.resolveWindow();return this.updateEnvDiagnostics(e,i,0),this.tokens}const t=this.resolveWindow(),n=Ig(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!0);if(n.length){const i=Eg(this.pending,n,{rangesCoverWholeSource:!0})?[{start:0,end:this.pending.length,lineCount:Ua(this.pending)}]:n;this.commitRanges(i,e),this.pending=""}return this.updateEnvDiagnostics(e,t,0),this.tokens}reset(){this.pending="",this.tokens=[],this.committedChars=0,this.committedLines=0,this.fedChunks=0,this.parsedChunks=0,this.globalStateEnv=null,this.markedGlobalStateReason=null}peek(){return this.tokens}pendingText(){return this.pending}stats(){return{mode:this.options.mode??"full",fedChunks:this.fedChunks,parsedChunks:this.parsedChunks,committedChars:this.committedChars,committedLines:this.committedLines,pendingChars:this.pending.length,pendingLines:Ua(this.pending),retainedTokens:this.options.retainTokens!==!1}}resolveWindow(){const e=this.committedChars+this.pending.length,t=this.committedLines+Ua(this.pending);return zae(this.md,e,t,this.options)}prepareGlobalStateEnv(e,t){if(this.globalStateEnv!==e&&(Ap(e)&&Ea(e),this.globalStateEnv=e,this.markedGlobalStateReason=null),this.markedGlobalStateReason)return;const n=Vo(t);n&&(tb(e,n),this.markedGlobalStateReason=n)}commitRanges(e,t){if(!e.length)return 0;this.prepareGlobalStateEnv(t,this.pending);let n=0;try{for(let i=0;i<e.length;i++){const s=e[i],o=this.pending.slice(s.start,s.end),r=this.md.core.parse(o,t,this.md).tokens,l=this.committedChars,a=this.committedLines;a!==0&&r.length&&Fae(r,a),this.options.retainTokens!==!1&&DN(this.tokens,r),this.committedChars+=o.length,this.committedLines+=s.lineCount,this.parsedChunks+=1,this.options.onChunkTokens&&this.options.onChunkTokens(r,{chunkIndex:this.parsedChunks,chunkChars:o.length,chunkLines:s.lineCount,tokenCount:r.length,startOffset:l,endOffset:this.committedChars,startLine:a,endLine:this.committedLines}),n=s.end}return this.markedGlobalStateReason&&nb(t),n}catch(i){throw this.markedGlobalStateReason&&(Ea(t),this.globalStateEnv=null,this.markedGlobalStateReason=null),i}}updateEnvDiagnostics(e,t,n){VL(e,{mode:this.options.mode??"full",maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,committedChars:this.committedChars,committedLines:this.committedLines,pendingChars:this.pending.length,pendingLines:n,fedChunks:this.fedChunks,parsedChunks:this.parsedChunks,globalStateDetected:this.markedGlobalStateReason||void 0})}};function Rae(e,t,n={},i={}){Io(n);const s=new wp(e,{mode:"full",...i});for(const o of t)s.feed(o),s.flushAvailable(n);return s.flushForce(n)}async function Oae(e,t,n={},i={}){Io(n);const s=new wp(e,{mode:"full",...i});for await(const o of t)s.feed(o),s.flushAvailable(n);return s.flushForce(n)}function Pae(e,t,n,i={},s={}){Io(i);const o=new wp(e,{mode:"full",...s,retainTokens:!1,onChunkTokens:n});for(const r of t)o.feed(r),o.flushAvailable(i);return o.flushForce(i),o.stats()}async function jae(e,t,n,i={},s={}){Io(i);const o=new wp(e,{mode:"full",...s,retainTokens:!1,onChunkTokens:n});for await(const r of t)o.feed(r),o.flushAvailable(i);return o.flushForce(i),o.stats()}function zN(e,t,n){if(e.options.autoUnbounded===!1)return!1;const i=e.options.autoUnboundedThresholdChars??BN,s=e.options.autoUnboundedThresholdLines??$N;return t>=i||n>=s}function RN(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??BN))return"yes";const i=e.options.autoUnboundedThresholdLines??$N;return n!==void 0?n>=i?"yes":"no":t+1<i?"no":"need-lines"}function dh(e,t,n={},i={}){Io(n);const s=Vo(t);if(Ap(n)&&Ea(n),i.fallbackOnGlobalState!==!1&&s)return VL(n,{mode:"full",fallback:!0,fallbackReason:s,committedChars:t.length,committedLines:Qi(t),pendingChars:0,pendingLines:0,fedChunks:1,parsedChunks:1,globalStateDetected:s}),df(n,s,()=>e.core.parse(t,n,e).tokens);const o=[],r=new wp(e,{mode:"full",...i,retainTokens:!1,onChunkTokens(l){DN(o,l)}});if(s&&tb(n,s),r.feed(t),r.flushForce(n),s&&(nb(n),i.fallbackOnGlobalState===!1)){const l=ua(n)?.unbounded;l&&(l.globalStateDetected=s,l.globalStateFallbackDisabled=!0)}return o}const hf=(e,t,n)=>e<t?t:e>n?n:e;function ON(e){return e.experimental?{...e,...e.experimental}:e}const zw=[{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"}],Rw=[{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 PN(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function Hae(e,t=Math.max(0,e/40|0),n={}){const i=ON(n),s=i.fullChunkFenceAware??!0,o=i.fullChunkTargetChunks??8,r=i.fullChunkAdaptive!==!1;for(let l=0;l<zw.length;l++){const a=zw[l];if(e<=a.max){if(a.strategy!=="adaptive")return PN(s,a);break}}return e>5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:hf(Math.ceil(e/o),8e3,64e3),maxChunkLines:hf(Math.ceil(t/o),150,700),maxChunks:hf(Math.ceil(e/64e3),o,16),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.fullChunkSizeChars??1e4,maxChunkLines:i.fullChunkSizeLines??200,fenceAware:s,maxChunks:i.fullChunkMaxChunks}}function Ow(e,t=Math.max(0,e/40|0),n={}){const i=ON(n),s=i.streamChunkFenceAware??!0,o=i.streamChunkTargetChunks??8,r=i.streamChunkAdaptive!==!1;for(let l=0;l<Rw.length;l++){const a=Rw[l];if(e<=a.max){if(a.strategy!=="adaptive")return PN(s,a);break}}return e>5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:hf(Math.ceil(e/o),8e3,64e3),maxChunkLines:hf(Math.ceil(t/o),150,700),maxChunks:hf(Math.ceil(e/64e3),o,32),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.streamChunkSizeChars??1e4,maxChunkLines:i.streamChunkSizeLines??200,maxChunks:i.streamChunkMaxChunks,fenceAware:s}}var Wae={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"]}}},qae={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Uae={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 mv(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function Tg(e,t){if(mv(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const Pw=e=>mv(e)?e:Promise.resolve(e);function fh(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 hi(e)}}function xu(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${fh(t[0])}="${hi(t[1])}"`;for(let i=1;i<e.length;i++){const s=e[i];n+=` ${fh(s[0])}="${hi(s[1])}"`}return n}function jN(e){if(!e)return{langName:"",langAttrs:""};let t=0;for(;t<e.length;){const i=e.charCodeAt(t);if(i===32||i===9||i===10)break;t++}if(t>=e.length)return{langName:e,langAttrs:""};let n=t;for(;n<e.length;){const i=e.charCodeAt(n);if(i!==32&&i!==9&&i!==10)break;n++}return{langName:e.slice(0,t),langAttrs:n<e.length?e.slice(n):""}}function hh(e,t,n,i,s){if(t.indexOf("<pre")===0)return`${t} -`;if(n){if(!e.attrs||e.attrs.length===0)return`<pre><code class="${hi(`${s.langPrefix??"language-"}${i}`)}">${t}</code></pre> -`;const o=e.attrIndex("class"),r=e.attrs?e.attrs.slice():[],l=`${s.langPrefix??"language-"}${i}`;return o<0?r.push(["class",l]):(r[o]=r[o].slice(),r[o][1]+=` ${l}`),`<pre><code${xu(r)}>${t}</code></pre> -`}return`<pre><code${xu(e.attrs)}>${t}</code></pre> -`}function Jh(e){return!e.attrs||e.attrs.length===0?`<code>${hi(e.content)}</code>`:`<code${xu(e.attrs)}>${hi(e.content)}</code>`}function K3(e){const t=hi(e.content);return e.attrs?`<pre${xu(e.attrs)}><code>${t}</code></pre> -`:`<pre><code>${t}</code></pre> -`}function Kae(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}<p>`;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}<td>`;case"th_open":return`${t}<th>`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}<td style="${hi(n[0][1])}">`;if(e.type==="th_open")return`${t}<th style="${hi(n[0][1])}">`}return null}function jw(e){const t=e.attrs;return!t||t.length===0?"<a>":t.length===1?`<a ${fh(t[0][0])}="${hi(t[0][1])}">`:t.length===2?`<a ${fh(t[0][0])}="${hi(t[0][1])}" ${fh(t[1][0])}="${hi(t[1][1])}">`:`<a${xu(t)}>`}function Vae(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 Hw(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 Rm(e,t){if(e.hidden)return"";const n=e.attrs,i=e.nesting,s=e.tag;if(!n||n.length===0)return i===0?t?`<${s} />`:`<${s}>`:i===-1?`</${s}>`:`<${s}>`;let o=(i===-1?"</":"<")+s+xu(n);return i===0&&t&&(o+=" /"),`${o}>`}const Zae={langPrefix:"language-",xhtmlOut:!1,breaks:!1},W0=Object.prototype.hasOwnProperty,Kn={code_inline(e,t){return Jh(e[t])},code_block(e,t){return K3(e[t])},fence(e,t,n,i,s){const o=e[t],r=o.info?NN(o.info).trim():"",{langName:l,langAttrs:a}=jN(r),u=n.highlight,c=hi(o.content);if(!u)return hh(o,c,r,l,n);const d=u(o.content,l,a);return mv(d)?d.then(f=>hh(o,f||c,r,l,n)):hh(o,d||c,r,l,n)},image(e,t,n,i,s){const o=e[t],r=s.renderInlineAsText(o.children||[],n,i),l=o.attrIndex("alt");return l>=0&&o.attrs?o.attrs[l][1]=r:o.attrs?o.attrs.push(["alt",r]):o.attrs=[["alt",r]],Rm(o,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`<br /> -`:`<br> -`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`<br /> -`:`<br> -`:` -`},text(e,t){return hi(e[t].content)},text_special(e,t){return hi(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function Ww(e,t,n){const i=e.info?NN(e.info).trim():"",{langName:s,langAttrs:o}=jN(i),r=t.highlight,l=hi(e.content);if(!r)return hh(e,l,i,s,t);const a=r(e.content,s,o);if(mv(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return hh(e,a||l,i,s,t)}function Ay(e,t,n,i){switch(e.type){case"text":return t.text===Kn.text?e.content.length===0?"":hi(e.content):null;case"text_special":return t.text_special===Kn.text_special?e.content.length===0?"":hi(e.content):null;case"softbreak":return t.softbreak===Kn.softbreak?i:null;case"hardbreak":return t.hardbreak===Kn.hardbreak?n:null;case"html_inline":return t.html_inline===Kn.html_inline?e.content:null;case"code_inline":return t.code_inline===Kn.code_inline?Jh(e):null;default:return null}}function Gae(e,t,n,i,s){const o=e[0];switch(o.type){case"text":if(s.text===Kn.text)return o.content.length===0?"":hi(o.content);break;case"text_special":if(s.text_special===Kn.text_special)return o.content.length===0?"":hi(o.content);break;case"softbreak":if(s.softbreak===Kn.softbreak)return t.breaks?t.xhtmlOut?`<br /> -`:`<br> -`:` -`;break;case"hardbreak":if(s.hardbreak===Kn.hardbreak)return t.xhtmlOut?`<br /> -`:`<br> -`;break;case"html_inline":if(s.html_inline===Kn.html_inline)return o.content;break;case"code_inline":if(s.code_inline===Kn.code_inline)return Jh(o);break}const r=s[o.type];if(!r)return Rm(o,t.xhtmlOut===!0);const l=r(e,0,t,n,i);return typeof l=="string"?l:Tg(l,o.type)}var Qae=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...Kn}}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 i=this.mergeOptions(t),s=n??{},o=this.rules,r=i.xhtmlOut===!0;let l,a,u,c,d,f,p="",g="",m=!1,y="";for(let w=0;w<e.length;w++){const k=e[w],A=k.type,v=w>0&&e[w-1].hidden?` -`:"";if(A==="list_item_open"&&(!k.attrs||k.attrs.length===0)&&w+3<e.length){const I=e[w+1],_=e[w+2],E=e[w+3];if(I.type==="paragraph_open"&&I.hidden&&_.type==="inline"&&E.type==="paragraph_close"&&E.hidden){y+=`${v}<li>${this.renderInlineTokens(_.children||[],i,s)}`,w+=3;continue}}if(w+2<e.length){const I=e[w+1],_=e[w+2];if(I.type==="inline"&&_.nesting===-1&&_.tag===k.tag&&!_.hidden){const E=Kae(k,v);if(E!==null){y+=`${E+this.renderInlineTokens(I.children||[],i,s)}</${k.tag}> -`,w+=2;continue}}}if(A==="inline"){const I=k.children||[];if(I.length===1){m||(l=o.text,a=o.text_special,u=o.softbreak,c=o.hardbreak,d=o.html_inline,f=o.code_inline,p=i.xhtmlOut?`<br /> -`:`<br> -`,g=i.breaks?p:` -`,m=!0);const _=I[0];switch(_.type){case"text":if(l===Kn.text){y+=hi(_.content);continue}break;case"text_special":if(a===Kn.text_special){y+=hi(_.content);continue}break;case"softbreak":if(u===Kn.softbreak){y+=g;continue}break;case"hardbreak":if(c===Kn.hardbreak){y+=p;continue}break;case"html_inline":if(d===Kn.html_inline){y+=_.content;continue}break;case"code_inline":if(f===Kn.code_inline){y+=Jh(_);continue}break}}y+=this.renderInlineTokens(I,i,s);continue}const x=o[A];if(!x){const I=k.attrs;if(!k.hidden){if(!I||I.length===0)switch(A){case"hr":y+=r?`<hr /> -`:`<hr> -`;continue;case"heading_open":y+=`<${k.tag}>`;continue;case"heading_close":y+=`</${k.tag}> -`;continue;case"paragraph_open":y+=`${v}<p>`;continue;case"paragraph_close":y+=`</p> -`;continue;case"list_item_open":{const _=e[w+1];y+=v+(_&&(_.type==="inline"||_.hidden||_.nesting===-1&&_.tag==="li")?"<li>":`<li> -`);continue}case"list_item_close":y+=`</li> -`;continue;case"bullet_list_open":y+=`${v}<ul> -`;continue;case"bullet_list_close":y+=`</ul> -`;continue;case"blockquote_open":y+=v+(e[w+1]&&e[w+1].nesting===-1&&e[w+1].tag==="blockquote"?"<blockquote>":`<blockquote> -`);continue;case"blockquote_close":y+=`</blockquote> -`;continue;case"ordered_list_open":y+=`${v}<ol> -`;continue;case"ordered_list_close":y+=`</ol> -`;continue;case"table_open":y+=`${v}<table> -`;continue;case"table_close":y+=`</table> -`;continue;case"thead_open":y+=`${v}<thead> -`;continue;case"thead_close":y+=`</thead> -`;continue;case"tbody_open":y+=`${v}<tbody> -`;continue;case"tbody_close":y+=`</tbody> -`;continue;case"tr_open":y+=`${v}<tr> -`;continue;case"tr_close":y+=`</tr> -`;continue;case"td_open":y+=`${v}<td>`;continue;case"td_close":y+=`</td> -`;continue;case"th_open":y+=`${v}<th>`;continue;case"th_close":y+=`</th> -`;continue}else if(I.length===1){const _=I[0];if(A==="ordered_list_open"&&_[0]==="start"){y+=`${v}<ol start="${hi(_[1])}"> -`;continue}if(A==="td_open"&&_[0]==="style"){y+=`${v}<td style="${hi(_[1])}">`;continue}if(A==="th_open"&&_[0]==="style"){y+=`${v}<th style="${hi(_[1])}">`;continue}}}y+=this.renderToken(e,w,i);continue}if(A==="code_block"&&x===Kn.code_block){y+=K3(k);continue}if(A==="fence"&&x===Kn.fence){y+=Ww(k,i);continue}if(A==="html_block"&&x===Kn.html_block){y+=k.content;continue}const S=x(e,w,i,s,this);typeof S=="string"?y+=S:y+=Tg(S,k.type)}return y}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const i=this.mergeOptions(t),s=n??{},o=this.rules;let r="";for(let l=0;l<e.length;l++){const a=e[l];if(a.type==="inline"){r+=await this.renderInlineTokensAsync(a.children||[],i,s);continue}const u=o[a.type];u?r+=await Pw(u(e,l,i,s,this)):r+=this.renderToken(e,l,i)}return r}renderInline(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineTokens(e,i,s)}async renderInlineAsync(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineTokensAsync(e,i,s)}renderInlineAsText(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineAsTextInternal(e,i,s)}renderAttrs(e){return xu(e.attrs)}renderToken(e,t,n){const i=e[t];if(i.hidden)return"";const s=i.block,o=i.nesting,r=i.tag,l=i.attrs;let a=!1;if(s&&(a=!0,o===1&&t+1<e.length)){const f=e[t+1];(f.type==="inline"||f.hidden||f.nesting===-1&&f.tag===r)&&(a=!1)}const u=s&&o!==-1&&t>0&&e[t-1].hidden?` -`:"",c=a?`> -`:">";if(!l||l.length===0)return o===0?n.xhtmlOut?`${u}<${r} /${c}`:`${u}<${r}${c}`:o===-1?`${u}</${r}${c}`:`${u}<${r}${c}`;let d=u+(o===-1?"</":"<")+r+xu(l);return o===0&&n.xhtmlOut&&(d+=" /"),d+c}mergeOptions(e){const t=this.normalizedBase;if(!e||e.highlight===t.highlight&&e.langPrefix===t.langPrefix&&e.xhtmlOut===t.xhtmlOut&&e.breaks===t.breaks)return t;let n=null;const i=()=>(n||(n={...t}),n);if(W0.call(e,"highlight")&&e.highlight!==t.highlight&&(i().highlight=e.highlight),W0.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(i().langPrefix=s)}if(W0.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(i().xhtmlOut=s)}if(W0.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(i().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...Zae,...this.baseOptions})}renderSingleToken(e,t,n,i){const s=this.rules,o=t.type;if(o==="code_block"&&s.code_block===Kn.code_block)return K3(t);if(o==="html_block"&&s.html_block===Kn.html_block)return t.content;const r=this.mergeOptions(n),l=i??{};if(o==="inline")return this.renderInlineTokens(t.children||[],r,l);const a=s[o];if(!a)return t.block?this.renderToken(e,0,r):Rm(t,r.xhtmlOut===!0);if(o==="fence"&&a===Kn.fence)return Ww(t,r);const u=a(e,0,r,l,this);return typeof u=="string"?u:Tg(u,o)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const i=this.rules;if(e.length===1)return Gae(e,t,n,this,i);const s=t.xhtmlOut===!0,o=s?`<br /> -`:`<br> -`,r=t.breaks?o:` -`,l=i.text,a=i.text_special,u=i.softbreak,c=i.hardbreak,d=i.html_inline,f=i.code_inline,p=i.link_open,g=i.link_close,m=i.em_open,y=i.em_close,w=i.strong_open,k=i.strong_close;let A="";for(let v=0;v<e.length;v++){const x=e[v];if(x.type==="link_open"&&!p&&!g&&v+2<e.length){const _=e[v+1];if(e[v+2].type==="link_close"&&Vae(_)){const E=Ay(_,i,o,r);if(E!==null){const N=`${jw(x)+E}</a>`;if(u===Kn.softbreak&&v+3<e.length&&e[v+3].type==="softbreak"){A+=N+r,v+=3;continue}A+=N,v+=2;continue}}}if(x.type==="link_open"&&!p&&!g&&v+1<e.length&&e[v+1].type==="link_close"){A+=`${jw(x)}</a>`,v+=1;continue}if(x.type==="em_open"&&!m&&!y&&v+2<e.length){const _=e[v+1];if(e[v+2].type==="em_close"&&Hw(_)){const E=Ay(_,i,o,r);if(E!==null){A+=`<em>${E}</em>`,v+=2;continue}}}if(x.type==="strong_open"&&!w&&!k&&v+2<e.length){const _=e[v+1];if(e[v+2].type==="strong_close"&&Hw(_)){const E=Ay(_,i,o,r);if(E!==null){A+=`<strong>${E}</strong>`,v+=2;continue}}}switch(x.type){case"text":if(l===Kn.text){const _=x.content.length===0?"":hi(x.content);if(d===Kn.html_inline&&v+1<e.length&&e[v+1].type==="html_inline"){for(A+=_+e[++v].content;v+1<e.length&&e[v+1].type==="html_inline";)A+=e[++v].content;continue}A+=_;continue}break;case"text_special":if(a===Kn.text_special){x.content.length!==0&&(A+=hi(x.content));continue}break;case"softbreak":if(u===Kn.softbreak){A+=r;continue}break;case"hardbreak":if(c===Kn.hardbreak){A+=o;continue}break;case"html_inline":if(d===Kn.html_inline){for(A+=x.content;v+1<e.length&&e[v+1].type==="html_inline";)A+=e[++v].content;continue}break;case"code_inline":if(f===Kn.code_inline){A+=Jh(x);continue}break}const S=i[x.type];if(!S){A+=x.block?this.renderToken(e,v,t):Rm(x,s);continue}const I=S(e,v,t,n,this);typeof I=="string"?A+=I:A+=Tg(I,x.type)}return A}async renderInlineTokensAsync(e,t,n){if(!e||e.length===0)return"";const i=this.rules;let s="";for(let o=0;o<e.length;o++){const r=i[e[o].type];r?s+=await Pw(r(e,o,t,n,this)):s+=this.renderToken(e,o,t)}return s}renderInlineAsTextInternal(e,t,n){if(!e||e.length===0)return"";let i="";for(let s=0;s<e.length;s++){const o=e[s];switch(o.type){case"text":case"text_special":i+=o.content;break;case"image":i+=this.renderInlineAsTextInternal(o.children||[],t,n);break;case"html_inline":case"html_block":i+=o.content;break;case"softbreak":case"hardbreak":i+=` -`;break}}return i}},Yae=Qae;const Jae=[],Cy=4096;function Xae(e){const t=e.length;let n=0;for(;n<=t;){let i=e.indexOf(` -`,n);i===-1&&(i=t);const s=i<t;let o=n,r=0;for(;o<i;){const l=e.charCodeAt(o);if(l===32){if(r++,o++,r>=4)return!0;continue}if(l===9){if(r+=4-r%4,o++,r>=4)return!0;continue}break}if(o<i){const l=e.charCodeAt(o);switch(l){case 35:{let a=o;for(;a<i&&e.charCodeAt(a)===35;)a++;const u=a-o;if(u>0&&u<=6){if(a<i){const c=e.charCodeAt(a);if(c===32||c===9||c===13)return!0}else if(a===i&&s)return!0}break}case 62:{const a=o+1;if(a<i){const u=e.charCodeAt(a);if(u===32||u===9||u===13)return!0}else if(a===i&&s)return!0;break}case 45:case 42:case 43:{const a=o+1;if(a<i){const u=e.charCodeAt(a);if(u===32||u===9||u===13)return!0}else if(a===i&&s)return!0;break}case 96:case 126:{let a=o;for(;a<i&&e.charCodeAt(a)===l;)a++;if(a-o>=3)return!0;break}default:if(l>=48&&l<=57){let a=o+1;for(;a<i;){const u=e.charCodeAt(a);if(u<48||u>57)break;a++}if(a<i&&e.charCodeAt(a)===46){const u=a+1;if(u<i){const c=e.charCodeAt(u);if(c===32||c===9||c===13)return!0}else if(u===i&&s)return!0}}break}}if(i===t)break;n=i+1}return!1}function eue(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n][0]!==t[n][0]||e[n][1]!==t[n][1])return!1;return!0}function tue(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!HN(e[n],t[n]))return!1;return!0}function HN(e,t){if(!e||!t||e.type!==t.type)return!1;const n=e.map,i=t.map;return!!n!=!!i||n&&i&&(n[0]!==i[0]||n[1]!==i[1])||e.tag!==t.tag||e.nesting!==t.nesting||e.markup!==t.markup||e.info!==t.info||e.block!==t.block||e.hidden!==t.hidden||!eue(e.attrs,t.attrs)||!tue(e.children,t.children)?!1:(e.content||"")===(t.content||"")}function qw(){return{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}}var nue=class{core;cache=null;stats=qw();MIN_SIZE_FOR_OPTIMIZATION=1e3;DEFAULT_SKIP_CACHE_CHARS=1e6;DEFAULT_SKIP_CACHE_LINES=1e5;IMPLICIT_STREAM_CHUNK_MIN_CHARS=16e4;MIN_LIST_LINES_FOR_MERGE=80;MIN_LIST_CHARS_FOR_MERGE=800;MIN_TABLE_LINES_FOR_MERGE=48;MIN_TABLE_CHARS_FOR_MERGE=1200;MIN_UNBOUNDED_APPEND_TOTAL_CHARS=5e5;MIN_UNBOUNDED_APPEND_CHARS=64e3;MIN_UNBOUNDED_APPEND_LINES=700;constructor(e){this.core=e}reset(){this.cache=null,this.stats.resets+=1,this.stats.lastMode="reset"}resetStats(){const{resets:e}=this.stats;this.stats=qw(),this.stats.resets=e}parse(e,t,n){const i=t,s=this.cache;if(Io(i??s?.env),!s||i&&i!==s.env){const $=i??{},O=!!n.__explicitStreamChunkFallbackSetting,P=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,R=!!n.options?.streamChunkedFallback,j=!O&&P,z=R||j,K=n.options?.streamChunkAdaptive!==!1,q=n.options?.streamChunkTargetChunks??8,W=n.options?.streamChunkSizeChars,Z=n.options?.streamChunkSizeLines,ne=n.options?.streamChunkMaxChunks,X=!!n.__explicitStreamChunkConfig,ue=n.options?.autoTuneChunks!==!1,ie=n.options?.streamChunkFenceAware??!0,Se=n.options?.streamLargeCachePolicy??"retain",fe=n.options?.streamSkipCacheAboveChars??this.DEFAULT_SKIP_CACHE_CHARS,pe=n.options?.streamSkipCacheAboveLines??this.DEFAULT_SKIP_CACHE_LINES;let Ne,ee=!1;if(Se==="skip"&&(ee=e.length>=fe,!ee&&pe!==void 0&&(Ne=Qi(e),ee=Ne>=pe)),ee){const H=this.parseFullDocument(e,$,n,Ne,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ds($,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!ua($)?.unbounded}),H.tokens}else if(z){const H=(ce,ge,Me)=>ce<ge?ge:ce>Me?Me:ce;Ne===void 0&&(Ne=Qi(e));const Y=ue&&!X?Ow(e.length,Ne,n.options):null,ve=Y?.maxChunkChars??(K?H(Math.ceil(e.length/q),8e3,64e3):W??1e4),re=Y?.maxChunkLines??(K?H(Math.ceil(Ne/q),150,700):Z??200),se=Y?.maxChunks??(K?H(Math.ceil(e.length/64e3),q,32):ne),U=e.length>0&&e.charCodeAt(e.length-1)===10,J=j&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&Y?.strategy!=="plain";if((R||J)&&(e.length>=ve*2||Ne>=re*2)&&U){const ce=zm(n,e,$,{maxChunkChars:ve,maxChunkLines:re,fenceAware:Y?.fenceAware??ie,maxChunks:se});return this.cache={src:e,tokens:ce,env:$,lineCount:Ne,lastSegment:void 0,globalStateReason:Vo(e)},this.updateCacheLineCount(this.cache,Ne),this.recordChunkedParseResult($,R?"explicit-initial-large-doc":"default-initial-large-doc"),ce}}const ye=this.parseFullDocument(e,$,n,Ne);return Ne=ye.lineCount,this.cache={src:e,tokens:ye.tokens,env:$,lineCount:Ne,lastSegment:void 0,globalStateReason:Vo(e)},this.updateCacheLineCount(this.cache,Ne),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ds($,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!ua($)?.unbounded}),ye.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",ds(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const o=e.startsWith(s.src)?e.slice(s.src.length):null;let r=s.globalStateReason;r===void 0&&(r=Vo(s.src),s.globalStateReason=r);const l=r?null:o!==null?this.detectGlobalStateForAppend(s,o):Vo(e),a=r||l;if(a){const $=i??s.env;Ea($);const O=Vo(e),P=this.parseFullDocument(e,$,n),R=P.tokens,j=P.lineCount;return this.cache={src:e,tokens:R,env:$,lineCount:j,lastSegment:void 0,globalStateReason:O},this.updateCacheLineCount(this.cache,j),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ds($,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!ua($)?.unbounded}),R}const u=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length<u&&e.length<u*1.5&&!e.startsWith(s.src)){const $=i??s.env,O=this.parseFullDocument(e,$,n),P=O.tokens,R=O.lineCount;return this.cache={src:e,tokens:P,env:$,lineCount:R,lastSegment:void 0,globalStateReason:Vo(e)},this.updateCacheLineCount(this.cache,R),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ds($,{area:"stream",path:"stream-full",reason:"small-non-append",unbounded:!!ua($)?.unbounded}),P}const c=this.getAppendedSegment(s.src,e,o);if(c&&!this.shouldPreferTailReparseForAppend(s)){const $=s.lineCount??Qi(s.src);let O=3;c.length>5e3?O=8:c.length>1e3?O=6:c.length>200&&(O=4),O=Math.min(O,$);let P=null;const R=n.options?.streamContextParseStrategy??"chars",j=n.options?.streamContextParseMinChars??200,z=n.options?.streamContextParseMinLines??2;let K;const q=()=>(K===void 0&&(K=Qi(c)),K),W=this.canDirectlyParseAppend(s),Z=W&&this.shouldUseUnboundedAppend(e,s,c);let ne=!1;if(!W)switch(R){case"lines":ne=q()>=z;break;case"constructs":if(c.length>=j){ne=!0;break}if(Xae(c)){ne=!0;break}ne=q()>=z;break;case"chars":default:ne=c.length>=j}if(O>0&&ne){const ie=this.getTailLines(s.src,O)+c;try{const Se=this.core.parse(ie,s.env,n).tokens,fe=Se.findIndex(pe=>pe.map&&typeof pe.map[1]=="number"&&pe.map[1]>O);if(fe!==-1){const pe=Se.slice(fe),Ne=$-O;Ne!==0&&this.shiftTokenLines(pe,Ne),P={tokens:pe}}}catch{P=null}}else P=null;if(!P){const ie=$;if(Z)P={tokens:dh(n,c,s.env,{mode:"stream"})},ie>0&&this.shiftTokenLines(P.tokens,ie);else{const Se=this.core.parse(c,s.env,n);ie>0&&this.shiftTokenLines(Se.tokens,ie),P=Se}}let X=0;if(s.tokens.length>0&&P.tokens.length>0){const ie=s.tokens[s.tokens.length-1],Se=P.tokens[0];try{ie.type==="inline"&&Se.type==="inline"&&(Se.children&&Se.children.length>0&&(ie.children||(ie.children=[]),this.appendTokens(ie.children,Se.children)),ie.content=(ie.content||"")+(Se.content||""),X=1)}catch{X=0}}const ue=s.tokens.length;if(P.tokens.length>X){const ie=s.tokens,Se=P.tokens,fe=Math.min(ie.length,Se.length-X);let pe=0;for(let Ne=fe;Ne>0;Ne--){let ee=!0;for(let ye=0;ye<Ne;ye++){const H=ie[ie.length-Ne+ye],Y=Se[X+ye];if(!HN(H,Y)){ee=!1;break}}if(ee){pe=Ne;break}}pe>0&&(X+=pe),Se.length>X&&this.appendTokens(s.tokens,Se,X)}if(s.src=e,s.globalStateReason=null,s.lineCount=$+(K??q()),s.tokens.length>ue){const ie=this.getLastSegment(s.tokens,e,ue,s.tokens.length,e.length-c.length,$);ie?s.lastSegment=ie: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",ds(s.env,{area:"stream",path:Z?"stream-unbounded-append":"stream-append",reason:Z?"large-delta":"safe-append",unbounded:Z}),s.tokens}const d=i??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",ds(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const p=!!n.__explicitStreamChunkFallbackSetting,g=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,y=!p&&!c&&g,w=m||y,k=n.options?.streamChunkAdaptive!==!1,A=n.options?.streamChunkTargetChunks??8,v=n.options?.streamChunkSizeChars,x=n.options?.streamChunkSizeLines,S=n.options?.streamChunkMaxChunks,I=!!n.__explicitStreamChunkConfig,_=n.options?.autoTuneChunks!==!1,E=n.options?.streamChunkFenceAware??!0;let N=c&&s.lineCount!==void 0?s.lineCount+Qi(c):void 0;if(w){N===void 0&&(N=Qi(e));const $=(q,W,Z)=>q<W?W:q>Z?Z:q,O=_&&!I?Ow(e.length,N,n.options):null,P=O?.maxChunkChars??(k?$(Math.ceil(e.length/A),8e3,64e3):v??1e4),R=O?.maxChunkLines??(k?$(Math.ceil(N/A),150,700):x??200),j=O?.maxChunks??(k?$(Math.ceil(e.length/64e3),A,32):S),z=e.length>0&&e.charCodeAt(e.length-1)===10,K=y&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&O?.strategy!=="plain";if((m||K)&&(e.length>=P*2||N>=R*2)&&z){const q=zm(n,e,d,{maxChunkChars:P,maxChunkLines:R,fenceAware:O?.fenceAware??E,maxChunks:j});return this.cache={src:e,tokens:q,env:d,lineCount:N,lastSegment:void 0,globalStateReason:Vo(e)},this.updateCacheLineCount(this.cache,N),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),q}}const D=this.parseFullDocument(e,d,n,N),T=D.tokens;return N=D.lineCount,this.cache={src:e,tokens:T,env:d,lineCount:N,lastSegment:void 0,globalStateReason:Vo(e)},this.updateCacheLineCount(this.cache,N),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ds(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!ua(d)?.unbounded}),T}recordChunkedParseResult(e,t){const n=ua(e)?.chunk,i=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,i){this.stats.fullParses+=1,this.stats.lastMode="full",ds(e,{area:"stream",path:"stream-full",reason:`global-state:${i}`,unbounded:!!ua(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",ds(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,i,s=!0){const o=Vo(e);Ap(t)&&Ea(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?RN(n,e.length,i):"no";if(r==="yes"){const a=dh(n,e,t);return ds(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:i??(s?Qi(e):0)}}let l=i;if(r==="need-lines"&&(l=Qi(e),zN(n,e.length,l))){const a=dh(n,e,t);return ds(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?Qi(e):0),{tokens:df(t,o,()=>this.core.parse(e,t,n).tokens),lineCount:l}}shouldUseUnboundedAppend(e,t,n){return!n||e.length<this.MIN_UNBOUNDED_APPEND_TOTAL_CHARS&&n.length<this.MIN_UNBOUNDED_APPEND_CHARS?!1:n.length>=this.MIN_UNBOUNDED_APPEND_CHARS?!0:Qi(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` -`))return null;const i=n??t.slice(e.length);if(!i)return null;const s=i.length;if(i.charCodeAt(s-1)!==10)return null;let o=0,r=-1;for(let a=0;a<s&&!(i.charCodeAt(a)===10&&(r===-1&&(r=a),o++,o>=2));a++);if(o<2)return null;const l=(r===-1?i:i.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(i)?null:i}tryTailSegmentReparse(e,t,n,i){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const o=t.src.slice(0,s.srcOffset);if(!e.startsWith(o))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,i,s,a);if(u)return u}if(this.mayContainReferenceDefinition(r)||this.mayContainReferenceDefinition(l))return null;try{const u=this.core.parse(l,n,i),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+Qi(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 i=e.length-1;i>=0;i--)if(e.charCodeAt(i)===10&&(n--,n===0))return e.slice(i+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,i=e.slice(n),s=i.length;let o=null,r=0;for(;r<=s;){let l=i.indexOf(` -`,r);l===-1&&(l=s);let a=r;for(;a<l;){const u=i.charCodeAt(a);if(u===32||u===9)a++;else break}if(a<l){const u=i.charCodeAt(a);if(u===96||u===126){let c=a;for(;c<l&&i.charCodeAt(c)===u;)c++;const d=c-a;d>=3&&(o?o.marker===u&&d>=o.length&&(o=null):o={marker:u,length:d})}}if(l===s)break;r=l+1}return o!==null}peek(){return this.cache?.tokens??Jae}getStats(){return{...this.stats}}appendTokens(e,t,n=0,i=t.length){for(let s=n;s<i;s++)e.push(t[s])}updateCacheLineCount(e,t){e.lineCount=t??Qi(e.src),e.lastSegment=void 0,e.globalStateCarry=void 0}detectGlobalStateForAppend(e,t){if(e.globalStateReason)return e.globalStateReason;const n=(e.globalStateCarry??e.src.slice(-Cy))+t,i=Vo(n);return e.globalStateCarry=n.length>Cy?n.slice(n.length-Cy):n,i&&(e.globalStateReason=i),i}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,i=e.length,s,o){if(i<=n)return null;let r=Number.POSITIVE_INFINITY,l=-1,a=0;for(let u=i-1;u>=n;u--){const c=e[u];if(c.map&&(c.map[0]<r&&(r=c.map[0]),c.map[1]>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:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}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:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}}return null}getLineStartOffset(e,t,n,i){if(n!==void 0&&i!==void 0&&t>=i)return this.getLineStartOffsetFrom(e,n,t-i);if(t<=0)return 0;let s=t,o=-1;for(;s>0;){if(o=e.indexOf(` -`,o+1),o===-1)return e.length;s--}return o+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let i=n,s=t-1;for(;i>0;){if(s=e.indexOf(` -`,s+1),s===-1)return e.length;i--}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,i,s,o){if(!o||this.mayContainReferenceDefinition(o))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,i,s,o,r);case"table_open":return this.tryTableTailAppendMerge(e,t,n,i,s,o,r);default:return null}}tryListTailAppendMerge(e,t,n,i,s,o,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(l<this.MIN_LIST_LINES_FOR_MERGE&&a<this.MIN_LIST_CHARS_FOR_MERGE)return null;const u=r.type==="bullet_list_open"?"bullet_list_close":"ordered_list_close";let c;try{c=this.core.parse(o,n,i).tokens}catch{return null}if(!this.isSingleTopLevelContainer(c,r.type,u,r.markup))return null;const d=c.slice(1,-1);if(d.length===0)return null;const f=t.lineCount??Qi(t.src);f>0&&this.shiftTokenLines(d,f);const p=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,r.level),g=this.getListParagraphMode(c,0,c.length,0);(p==="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+Qi(o);t.lineCount=m;const y=this.getDocLineCount(e,m);return r.map&&(r.map[1]=y),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:y,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,i,s,o,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(o))return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l<this.MIN_TABLE_LINES_FOR_MERGE&&a<this.MIN_TABLE_CHARS_FOR_MERGE)return null;const u=this.getTableHeaderContext(t.src.slice(s.srcOffset));if(!u)return null;const c=`${u}${o}`;let d;try{d=this.core.parse(c,n,i).tokens}catch{return null}if(!this.isSingleTopLevelContainer(d,"table_open","table_close")||(d[0]?.map?.[1]??-1)!==this.getDocLineCount(c))return null;const f=this.getTableBodySection(d,0,d.length,0),p=this.getTableBodySection(t.tokens,s.tokenStart,t.tokens.length,r.level);if(!f||!p||f.tbodyOpenIndex<0||f.tbodyCloseIndex<0)return null;const g=p.tbodyOpenIndex>=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 y=p.tbodyCloseIndex>=0?p.tbodyCloseIndex:p.tableCloseIndex,w=t.lineCount??Qi(t.src);t.tokens.splice(y,0,...g),t.src=e,t.env=n,t.globalStateReason=null;const k=w+Qi(o);t.lineCount=k;const A=this.getDocLineCount(e,k);if(r.map&&(r.map[1]=A),p.tbodyOpenIndex>=0){const v=t.tokens[p.tbodyOpenIndex];v?.map&&(v.map[1]=A)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:A,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,i){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===i){s=l;break}}if(s<0)return null;let o=-1,r=-1;for(let l=t+1;l<s;l++){const a=e[l];if(a.type==="tbody_open"&&a.level===i+1){o=l;break}}if(o>=0){for(let l=s-1;l>o;l--){const a=e[l];if(a.type==="tbody_close"&&a.level===i+1){r=l;break}}if(r<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:o,tbodyCloseIndex:r}}isSingleTopLevelContainer(e,t,n,i){if(e.length<2)return!1;const s=e[0],o=e[e.length-1];if(s.type!==t||o.type!==n||s.level!==0||o.level!==0||i!==void 0&&s.markup!==i)return!1;let r=0;for(let l=0;l<e.length;l++){const a=e[l];if(a.level===0&&l>0&&l<e.length-1&&r===0)return!1;(a.nesting>0||a.nesting<0)&&(r+=a.nesting)}return r===0}getListParagraphMode(e,t,n,i){let s=!1,o=!1;const r=i+2;for(let l=t;l<n;l++){const a=e[l];if(!(a.type!=="paragraph_open"||a.level!==r)&&(a.hidden?s=!0:o=!0,s&&o))return"loose"}return o?"loose":s?"tight":"none"}setListParagraphVisibility(e,t,n,i,s){const o=i+2;for(let r=t;r<n;r++){const l=e[r];(l.type==="paragraph_open"||l.type==="paragraph_close")&&l.level===o&&(l.hidden=s)}}shouldPreferTailReparseForAppend(e){const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"bullet_list_open":case"ordered_list_open":case"blockquote_open":case"table_open":return!0;case"paragraph_open":case"code_block":case"html_block":return!this.endsWithBlankLine(e.src);default:return!1}}endsWithBlankLine(e){const t=e.length;if(t<2||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0;){const i=e.charCodeAt(n);if(i===32||i===9){n--;continue}return i===10}return!0}getDocLineCount(e,t=Qi(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 i=0;i<e.length;i++){const s=e[i];if(s.map&&(s.map[0]+=t,s.map[1]+=t),s.children){n??=[];for(let o=s.children.length-1;o>=0;o--)n.push(s.children[o]);for(;n.length>0;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let r=o.children.length-1;r>=0;r--)n.push(o.children[r])}}}}};const Uw={default:qae,zero:Uae,commonmark:Wae};function iue(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function sue(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 Kw(e){return e.experimental?{...e,...e.experimental}:e}function Fr(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 Vw(e,t,n){for(let i=0;i<n.length;i++){const s=n[i];if(Fr(t,s)||Fr(e,s))return!0}return!1}function Zw(e,t,n){return Fr(t,n)||Fr(e,n)}function Gw(e,t){const n=ua(e)?.chunk;if(n?.fallback){ds(e,{area:"parse",path:"plain",reason:`global-state:${n.fallbackReason||"unknown"}`});return}ds(e,{area:"parse",path:"full-chunk",chunked:!0,reason:t})}function Td(){return typeof performance<"u"?performance.now():Date.now()}function oue(e,t){let n={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100,stream:!1,streamOptimizationMinSize:1e3,streamChunkedFallback:!1,streamChunkSizeChars:1e4,streamChunkSizeLines:200,streamChunkFenceAware:!0,streamChunkAdaptive:!0,streamChunkTargetChunks:8,streamChunkMaxChunks:void 0,streamLargeCachePolicy:"retain",streamSkipCacheAboveChars:1e6,streamSkipCacheAboveLines:1e5,fullChunkedFallback:!1,fullChunkThresholdChars:2e4,fullChunkThresholdLines:400,fullChunkSizeChars:1e4,fullChunkSizeLines:200,fullChunkFenceAware:!0,fullChunkAdaptive:!0,fullChunkTargetChunks:8,fullChunkMaxChunks:void 0,autoTuneChunks:!0,autoUnbounded:!0,autoUnboundedThresholdChars:4e6,autoUnboundedThresholdLines:8e4},i="default",s;!t&&typeof e!="string"?(s=e,i="default"):typeof e=="string"&&(i=e,s=t);const o=Uw[i];if(!o)throw new Error(`Wrong \`markdown-it\` preset "${i}", check name`);if(o?.options&&(n={...n,...o.options}),s&&(n={...n,...s}),n=Kw(n),typeof n.quotes=="string"){const _=n.quotes;_.length>=4?n.quotes=[_[0],_[1],_[2],_[3]]:n.quotes=["“","”","‘","’"]}let r=Vw(o?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=Vw(o?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=Zw(o?.options,s,"fullChunkedFallback"),u=Zw(o?.options,s,"streamChunkedFallback"),c=!1,d=null,f=null;const p=new Zle;let g=null;const m=()=>(g||(g=new Yae(n)),g);let y=null;const w=()=>(y||(y=new nue(p)),y);let k=null;const A=()=>(k||(k=new ZL({fuzzyLink:!0})),k),v=_=>!c&&!!d&&!sue(_,d),x=(_,E)=>i==="default"&&!c&&g===null&&f!==null&&_.parse===f&&v(_)&&!_.stream.enabled&&E<(_.options.autoUnboundedThresholdChars??4e6)&&_.options.html===!1&&_.options.xhtmlOut===!1&&_.options.breaks===!1&&_.options.langPrefix==="language-"&&_.options.linkify===!1&&_.options.typographer===!1&&_.options.highlight===null,S=(_,E)=>i==="default"&&!c&&v(_)&&!_.stream.enabled&&!_.options.fullChunkedFallback&&E<(_.options.autoUnboundedThresholdChars??4e6)&&_.options.html===!1&&_.options.linkify===!1&&_.options.typographer===!1,I={core:p,block:p.block,inline:p.inline,get linkify(){const _=A();return Object.defineProperty(this,"linkify",{value:_,writable:!0,configurable:!0}),_},get renderer(){const _=m();return Object.defineProperty(this,"renderer",{value:_,writable:!0,configurable:!0}),_},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:u,__canUseImplicitLargeInputStrategy(){return v(this)},set(_){const E=Kw(_);return this.options={...this.options,...E},(Fr(_,"fullChunkSizeChars")||Fr(_,"fullChunkSizeLines")||Fr(_,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),(Fr(_,"streamChunkSizeChars")||Fr(_,"streamChunkSizeLines")||Fr(_,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),Fr(_,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),Fr(_,"streamChunkedFallback")&&(u=!0,this.__explicitStreamChunkFallbackSetting=!0),g&&g.set(E),typeof E.stream=="boolean"&&(this.stream.enabled=E.stream,y&&(y.reset(),y.resetStats())),this},configure(_){const E=typeof _=="string"?Uw[_]:_;if(!E)throw new Error("Wrong `markdown-it` preset, can't be empty");if(E.options&&this.set(E.options),E.components){const N=E.components;N.core?.rules&&this.core.ruler.enableOnly(N.core.rules),N.block?.rules&&this.block.ruler.enableOnly(N.block.rules),N.inline?.rules&&this.inline.ruler.enableOnly(N.inline.rules),N.inline2?.rules&&this.inline.ruler2.enableOnly(N.inline2.rules)}return this},enable(_,E){const N=Array.isArray(_)?_:[_],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const $ of D){if(!$)continue;const O=$.enable(N,!0);for(let P=0;P<O.length;P++)T.add(O[P])}if(!E){const $=N.filter(O=>!T.has(O));if($.length)throw new Error(`Rules manager: invalid rule name ${$.join(", ")}`)}return this},disable(_,E){const N=Array.isArray(_)?_:[_],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const $ of D){if(!$)continue;const O=$.disable(N,!0);for(let P=0;P<O.length;P++)T.add(O[P])}if(!E){const $=N.filter(O=>!T.has(O));if($.length)throw new Error(`Rules manager: invalid rule name ${$.join(", ")}`)}return this},use(_,...E){const N=typeof _=="function"?_:_&&typeof _.default=="function"?_.default:void 0;if(!N)throw new TypeError("MarkdownIt.use: plugin must be a function");const D=[this,...E],T=_;return c=!0,N.apply(T,D),this},render(_,E){let N;if(x(this,_.length)){E!==void 0&&(Io(E),N=cy("render"));const $=N?Td():0,O=N?Dw(_,N):$w(_);if(N&&(N.attemptMs=Td()-$,O===null&&(N.fallbackReason="unsupported-stock-subset"),x1(E,N)),O!==null)return E!==void 0&&ds(E,{area:"render",path:"stock-fast",reason:"stock-subset"}),O}const D=E??{},T=this.parse(_,D);return N&&x1(D,N),m().render(T,this.options,D)},async renderAsync(_,E){let N;if(x(this,_.length)){E!==void 0&&(Io(E),N=cy("render"));const $=N?Td():0,O=N?Dw(_,N):$w(_);if(N&&(N.attemptMs=Td()-$,O===null&&(N.fallbackReason="unsupported-stock-subset"),x1(E,N)),O!==null)return E!==void 0&&ds(E,{area:"render",path:"stock-fast",reason:"stock-subset"}),O}const D=E??{},T=this.parse(_,D);return N&&x1(D,N),m().renderAsync(T,this.options,D)},renderIterable(_,E={}){const N=this.parseIterable(_,E);return m().render(N,this.options,E)},async renderAsyncIterable(_,E={}){const N=await this.parseAsyncIterable(_,E);return m().renderAsync(N,this.options,E)},renderInline(_,E={}){const N=this.parseInline(_,E);return m().render(N,this.options,E)},validateLink:xN,normalizeLink:_N,normalizeLinkText:SN,utils:xoe,helpers:{...fre},parse(_,E){if(typeof _!="string")throw new TypeError("Input data should be a String");if(E!==void 0&&Io(E),S(this,_.length)){const $=E===void 0?void 0:cy("parse"),O=$?Td():0,P=rae(_,$);if($&&($.attemptMs=Td()-O,P===null&&($.fallbackReason="unsupported-stock-subset"),x1(E,$)),P!==null)return E!==void 0&&ds(E,{area:"parse",path:"stock-fast",reason:"stock-subset"}),P}const N=E??{};let D;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&v(this)){const $=RN(this,_.length);if($==="yes"){const O=dh(this,_,N);return ds(E,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),O}$==="need-lines"&&(D=Qi(_))}if(!this.stream.enabled){const $=_.length,O=this.options.autoTuneChunks!==!1,P=r,R=!a&&v(this),j=!!this.options.fullChunkedFallback,z=R&&$>=2e5;let K;(j||z||D!==void 0)&&(K=D??Qi(_));const q=(j||z)&&O&&!P?Hae($,K,this.options):null;if(j||z){const W=K??0;if(j?$>=(this.options.fullChunkThresholdChars??2e4)||W>=(this.options.fullChunkThresholdLines??400):z){if(q&&q.strategy!=="plain"){const Z=zm(this,_,N,{maxChunkChars:q.maxChunkChars,maxChunkLines:q.maxChunkLines,fenceAware:q.fenceAware,maxChunks:q.maxChunks});return E&&Gw(E,j?"explicit-full-chunk":"default-large-string"),Z}if(j){const Z=(ee,ye,H)=>ee<ye?ye:ee>H?H:ee,ne=this.options.fullChunkAdaptive!==!1,X=this.options.fullChunkTargetChunks??8,ue=Z(Math.ceil($/X),8e3,64e3),ie=Z(Math.ceil(W/X),150,700),Se=ne?ue:this.options.fullChunkSizeChars??1e4,fe=ne?ie:this.options.fullChunkSizeLines??200,pe=ne?Z(Math.ceil($/64e3),X,32):this.options.fullChunkMaxChunks,Ne=zm(this,_,N,{maxChunkChars:Se,maxChunkLines:fe,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:pe});return E&&Gw(E,"explicit-full-chunk"),Ne}}}if(D!==void 0&&v(this)&&zN(this,$,K??D)){const W=dh(this,_,N);return ds(E,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),W}}const T=Vo(_);return ds(E,{area:"parse",path:"plain",reason:"default-plain"}),df(N,T,()=>p.parse(_,N,this).tokens)},parseIterable(_,E={}){return Io(E),Rae(this,_,E)},parseAsyncIterable(_,E={}){return Io(E),Oae(this,_,E)},parseIterableToSink(_,E,N={}){return Io(N),Pae(this,_,E,N)},parseAsyncIterableToSink(_,E,N={}){return Io(N),jae(this,_,E,N)},parseInline(_,E={}){if(typeof _!="string")throw new TypeError("Input data should be a String");Io(E),Ap(E)&&Ea(E);const N=p.createState(_,E,this);return N.inlineMode=!0,p.process(N),N.tokens}};if(I.stream={enabled:!!n.stream,parse(_,E){return I.stream.enabled?w().parse(_,E,I):I.parse(_,E??{})},reset(){w().reset()},peek(){return y?y.peek():[]},stats(){return y?y.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){y&&y.resetStats()}},o?.components){const _=o.components;_.core?.rules&&I.core.ruler.enableOnly(_.core.rules),_.block?.rules&&I.block.ruler.enableOnly(_.block.rules),_.inline?.rules&&I.inline.ruler.enableOnly(_.inline.rules),_.inline2?.rules&&I.inline.ruler2.enableOnly(_.inline2.rules)}return d=iue(I),f=I.parse,I}var rue=oue;const WN=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],lue=["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"],qN=["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"],aue=["svg","g","path"],uue=["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"],cue=["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"],due=["action","data","href","src","srcset","poster","xlink:href","formaction"],fue=["script"],hue=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],_u=new Set(WN),UN=new Set(qN),Xh=new Set([...WN,...lue,...qN,...aue]),KN=new Set([...Xh,...uue]),pue=new Set(cue),gue=new Set(due),xp=new Set(fue),VN=new Set(hue);function ZN(e){let t="";for(const n of e){const i=n.charCodeAt(0);i<=31||i>=127&&i<=159||/\s/u.test(n)||(t+=n)}return t}const mue={amp:"&",bsol:"\\",colon:":",newline:` -`,sol:"/",tab:" "};function GN(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,i,s)=>{const o=n??i;if(o){const r=Number.parseInt(o,n?10:16);try{return Number.isFinite(r)?String.fromCodePoint(r):""}catch{return""}}return mue[String(s??"").toLowerCase()]??t})}const q0=new Set(["http","https","mailto","tel"]),vue=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),lc=new Set(["http","https"]);function QN(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const yue=/^https?:\/\//i;function bue(e){if(!yue.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 kue(e,t,n){if(!ph(t,n)||!e.startsWith("file:///"))return!1;const i=e.charAt(8);return i!=="/"&&i!=="\\"}function ph(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function Aue(e,t){return t==="href"||t==="xlink:href"?ph(e,t)?q0:lc:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?lc:(ph(e,t),q0)}function Dc(e,t={}){if(bue(e))return!1;const n=ZN(GN(e)).toLowerCase(),i=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 i==="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 o=QN(n);return o?o==="file"?!kue(n,i,s):ph(i,s)?vue.has(o):!Aue(i,s).has(o):!1}function Cue(e){const t=GN(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=QN(ZN(t).toLowerCase());return n==="http"||n==="https"}function wue(e,t={}){const n=String(e??"").trim();return n?Dc(n,t)?"":n:""}function Qw(e){return wue(e,{tagName:"img",attrName:"src"})}function xue(e,t,n){function i(f){return f.trim().split(" ",2)[0]===t}function s(f,p,g,m,y){return f[p].nesting===1&&f[p].attrJoin("class",t),y.renderToken(f,p,g,m,y)}n=n||{};const o=3,r=n.marker||":",l=r.charCodeAt(0),a=r.length,u=n.validate||i,c=n.render||s;function d(f,p,g,m){let y,w=!1,k=f.bMarks[p]+f.tShift[p],A=f.eMarks[p];if(l!==f.src.charCodeAt(k))return!1;for(y=k+1;y<=A&&r[(y-k)%a]===f.src[y];y++);const v=Math.floor((y-k)/a);if(v<o)return!1;y-=(y-k)%a;const x=f.src.slice(k,y),S=f.src.slice(y,A);if(!u(S,x))return!1;if(m)return!0;let I=p;for(;I++,!(I>=g||(k=f.bMarks[I]+f.tShift[I],A=f.eMarks[I],k<A&&f.sCount[I]<f.blkIndent));)if(l===f.src.charCodeAt(k)&&!(f.sCount[I]-f.blkIndent>=4)){for(y=k+1;y<=A&&r[(y-k)%a]===f.src[y];y++);if(!(Math.floor((y-k)/a)<v)&&(y-=(y-k)%a,y=f.skipSpaces(y),!(y<A))){w=!0;break}}const _=f.parentType,E=f.lineMax;f.parentType="container",f.lineMax=I;const N=f.push("container_"+t+"_open","div",1);N.markup=x,N.block=!0,N.info=S,N.map=[p,I],f.md.block.tokenize(f,p+1,I);const D=f.push("container_"+t+"_close","div",-1);return D.markup=f.src.slice(k,y),D.block=!0,f.parentType=_,f.lineMax=E,f.line=I+(w?1:0),!0}e.block.ruler.before("fence","container_"+t,d,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules["container_"+t+"_open"]=c,e.renderer.rules["container_"+t+"_close"]=c}function _ue(e){const t=String(e??"").trim();if(!t.startsWith("{")||!t.endsWith("}"))return null;const n=t.slice(1,-1).trim();if(!n)return{};if(n.includes("{")||n.includes("[")||n.includes("]"))return null;const i=[];let s="",o=!1,r=!1;for(let a=0;a<n.length;a++){const u=n[a];if(u==="\\"){s+=u,a+1<n.length&&(s+=n[a+1],a++);continue}if(!r&&u==="'"){o=!o,s+=u;continue}if(!o&&u==='"'){r=!r,s+=u;continue}if(!o&&!r&&u===","){i.push(s.trim()),s="";continue}s+=u}s.trim()&&i.push(s.trim());const l={};for(const a of i){if(!a)continue;let u=!1,c=!1,d=-1;for(let y=0;y<a.length;y++){const w=a[y];if(w==="\\"){y++;continue}if(!c&&w==="'"){u=!u;continue}if(!u&&w==='"'){c=!c;continue}if(!u&&!c&&w===":"){d=y;break}}if(d===-1)return null;const f=a.slice(0,d).trim(),p=a.slice(d+1).trim();if(!f)return null;let g=f;if(g.startsWith('"')&&g.endsWith('"')||g.startsWith("'")&&g.endsWith("'"))try{g=JSON.parse(g.replace(/^'/,'"').replace(/'$/,'"'))}catch{return null}if(!/^[_$A-Z][\w$-]*$/i.test(g))return null;let m;if(!p)m="";else if(p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'"))try{m=JSON.parse(p.replace(/^'/,'"').replace(/'$/,'"'))}catch{m=p}else/^-?\d+(?:\.\d+)?$/.test(p)?m=Number(p):p==="true"||p==="false"?m=p==="true":p==="null"?m=null:m=p;l[g]=m}return l}function YN(e,t,n){for(const i of e){const s=i,o=s.map;if(Array.isArray(o)&&o.length>=2){const r=Number(o[0]),l=Number(o[1]);Number.isFinite(r)&&Number.isFinite(l)&&(s.map=[r+t,Math.min(l+t,n)])}Array.isArray(s.children)&&YN(s.children,t,n)}}function Sue(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(xue,t,{render(n,i){return n[i].nesting===1?`<div class="vmr-container vmr-container-${t}">`:`</div> -`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,i,s)=>{const o=t,r=o.bMarks[n]+o.tShift[n],l=o.eMarks[n],a=o.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,p;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 S=0,I=-1;for(let _=0;_<m.length;_++)if(m[_]==="{"?S++:m[_]==="}"&&S--,S===0){I=_+1;break}I>0&&(p=m.slice(0,I))}p||(f=d||void 0)}if(s)return!0;const y=!!o.env.__markstreamFinal;let w=n+1,k=!1;for(;w<=i;){const S=o.bMarks[w]+o.tShift[w],I=o.eMarks[w];if(o.src.slice(S,I).trim()===":::"){k=!0;break}w++}k||(w=i);const A=o.push("vmr_container_open","div",1);if(A.attrSet("class",`vmr-container vmr-container-${c}`),A.map=[n,k?w:i],A.meta={...A.meta??{},unclosed:!k&&!y},f&&A.attrSet("data-args",f),p)try{const S=JSON.parse(p);for(const[I,_]of Object.entries(S)){const E=_!=null&&typeof _=="object";A.attrSet(`data-${I}`,E?JSON.stringify(_):String(_))}}catch{const S=_ue(p);if(S)for(const[I,_]of Object.entries(S)){const E=_!=null&&typeof _=="object";A.attrSet(`data-${I}`,E?JSON.stringify(_):String(_))}else A.attrSet("data-attrs",p)}const v=[];for(let S=n+1;S<w;S++){const I=o.bMarks[S]+o.tShift[S],_=o.eMarks[S];v.push(o.src.slice(I,_))}if(v.some(S=>S.trim().length>0)){let S=v.join(` -`);S.endsWith(` -`)||(S+=` -`),S.endsWith(` - -`)||(S+=` -`);const I=o.tokens[o.tokens.length-1];I&&(I.raw=S);const _=[];o.md.block.parse(S,o.md,o.env,_),YN(_,n+1,n+1+v.length),o.tokens.push(..._)}const x=o.push("vmr_container_close","div",-1);return k||(x.hidden=!0,x.map=[i,i]),o.line=k?w+1:w,!0},{alt:["paragraph","reference","blockquote","list"]})}function fl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xi(e){let t=!1,n=!1;for(let i=0;i<e.length;i++){const s=e[i];if(s==="\\"){i++;continue}if(!n&&s==="'"){t=!t;continue}if(!t&&s==='"'){n=!n;continue}if(!t&&!n&&s===">")return i}return-1}function vv(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let i;for(;(i=n.exec(e))!==null;){const s=i[1];if(!s)continue;const o=i[2]||i[3]||i[4]||"";t.push([s,o])}return t}const Mue=/^[a-z][a-z0-9_-]*$/;function Yw(e){return Mue.test(String(e??"").trim().toLowerCase())}function Wr(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return Yw(t)?t.toLowerCase():"";let n=1;for(;n<t.length&&/\s/.test(t[n]);)n++;if(t[n]==="/")for(n++;n<t.length&&/\s/.test(t[n]);)n++;const i=n;for(;n<t.length&&/[\w-]/.test(t[n]);)n++;const s=t.slice(i,n).toLowerCase(),o=t[n]??"";return o&&!/[\s/>]/.test(o)?"":Yw(s)?s:""}function od(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const i of e){const s=Wr(i);!s||t.has(s)||(t.add(s),n.push(s))}return n}function Iue(...e){const t=new Set,n=[];for(const i of e)for(const s of od(i))t.has(s)||(t.add(s),n.push(s));return n}function Eue(e){const t=od(e);return{key:t.join(","),tags:t}}function JN(e){return Wr(e)}function Tue(e,t){const n=String(e??""),i=Wr(t);if(!i)return!1;const s=fl(i),o=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return o?o[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function XN(e,t){const n=Wr(t);return!!n&&!Xh.has(n)&&!Tue(e,n)}function Lue(e,t){const n=String(e??""),i=Wr(t);if(!i)return n;const s=fl(i),o=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(o,"").replace(r,"")}const eF=_u,Nue=Xh,tF=new Set(UN);tF.delete("details");const Fue=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,Bue=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,V3=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,$ue=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function Om(e){return(e.match(V3)?.[1]??"").toLowerCase()}function db(e){return/^\s*<\s*\//.test(e)}function fb(e,t){return eF.has(t)||/\/\s*>\s*$/.test(e)}function Due(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i];if(!s||s.type!=="html_inline")continue;const o=String(s.content??""),r=Om(o);if(r===t){if(db(o)){if(n===0)return i;n--;continue}fb(o,r)||n++}}return-1}function zue(e,t){let n=0;for(const i of e){if(!i||i.type!=="html_inline")continue;const s=String(i.content??""),o=Om(s);if(o===t){if(db(s)){n>0&&n--;continue}fb(s,o)||n++}}return n}function Jw(e,t,n=0){const i=new RegExp(String.raw`<\s*(\/?)\s*${fl(t)}(?=[\s>/])[^>]*>`,"gi");i.lastIndex=Math.max(0,n);let s=0,o;for(;(o=i.exec(e))!==null;){const r=o[0]??"",l=!!o[1],a=!l&&/\/\s*>$/.test(r);if(l){if(s===0)return{start:o.index,end:o.index+r.length};s--;continue}a||s++}return null}function Rue(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${fl(t)}(?=[\s>/])[^>]*>`,"gi");let i=0,s;for(;(s=n.exec(e))!==null;){const o=s[0]??"",r=!!s[1],l=!r&&/\/\s*>$/.test(o);if(r){i>0&&i--;continue}l||i++}return i}function Pm(e){const t=e;return String(t.raw??t.content??t.markup??"")}function Oue(e){const t=e;return t.meta||(t.meta={}),t.meta}function wy(e,t,n){const i=Oue(e);i.markstreamCustomHtmlRaw=t,i.markstreamCustomHtmlInner=n}function Pue(e,t){if(!t.size)return;const n=Array.from(t,p=>new RegExp(String.raw`<\s*${fl(p)}(?=[\s>/])`,"i")),i=[];let s=!1;const o=p=>p?n.some(g=>g.test(p)):!1,r=p=>{if(!(!p||!i.length))for(const g of i)g.raw+=p,g.inner+=p},l=()=>{!i.length||!s||(r(` -`),s=!1)},a=p=>{r(p)},u=p=>{for(let m=0;m<i.length;m++)i[m].raw+=p,m<i.length-1&&(i[m].inner+=p);const g=i.pop();wy(g.token,g.raw,g.inner)},c=p=>{const g=i[i.length-1]?.tag;if(!g)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${fl(g)}\s*>`,"i");return p.match(m)?.[0]??null},d=p=>!!c(p),f=(p,g,m)=>{const y=m??(p.type==="html_inline"?Om(g):"");if(!(y&&t.has(y))){r(g);return}const w=db(g),k=!w&&fb(g,y);if(w){if(!i.length||i[i.length-1].tag!==y){r(g);return}u(g);return}if(r(g),k){wy(p,g,"");return}i.push({tag:y,token:p,raw:g,inner:""})};for(const p of e){if(p.type==="inline"&&Array.isArray(p.children)){const g=String(p.content??"");if(d(g)?s=!1:l(),!i.length&&!o(g)){s=!1;continue}let m=0,y=!0;for(const w of p.children){const k=Pm(w),A=w.type==="html_inline"?Om(k):"",v=A&&t.has(A);let x=k;if(y&&g&&k&&(i.length||v)){const S=g.indexOf(k,m);if(S!==-1)a(g.slice(m,S)),x=g.slice(S,S+k.length),m=S+k.length;else{if(i.length&&!v)continue;y=!1}}f(w,x,A)}y&&g&&m<g.length&&i.length&&a(g.slice(m)),s=i.length>0;continue}if(i.length&&typeof p.content=="string"){const g=Pm(p),m=p.type==="html_block"?c(g):null;if(m){u(`${s?` -`:""}${m}`),s=i.length>0;continue}if(!p.content)continue;l(),r(p.content),s=!0}}for(const p of i)wy(p.token,p.raw,p.inner)}function jue(e){return/^\s*<\s*[!?]/.test(e)}function Hue(e){const t=new Set(Nue);if(e&&Array.isArray(e))for(const n of e){const i=String(n??"").trim();if(!i)continue;const s=i.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function Xw(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function Wue(e,t){let n=null;for(const o of e.matchAll(Fue)){const r=o.index??-1;if(r<0)continue;const l=(o[1]??"").toLowerCase();Xw(l,t)&&Xi(e.slice(r))===-1&&(!n||r<n.index)&&(n={index:r,tag:l,closing:!1})}for(const o of e.matchAll(Bue)){const r=o.index??-1;if(r<0)continue;const l=(o[1]??"").toLowerCase();Xw(l,t)&&Xi(e.slice(r))===-1&&(!n||r<n.index)&&(n={index:r,tag:l,closing:!0})}const i=/<\/\s*$/.exec(e);if(i&&typeof i.index=="number"){const o=i.index;!e.slice(o).includes(">")&&(!n||o<n.index)&&(n={index:o,tag:"",closing:!0})}const s=/<\s*$/.exec(e);if(s&&typeof s.index=="number"){const o=s.index,r=e.slice(o);!r.startsWith("</")&&!r.includes(">")&&(!n||o<n.index)&&(n={index:o,tag:"",closing:!1})}return n}function que(e,t){const n=e;return Object.assign(Object.create(Object.getPrototypeOf(n)),n,{type:"text",content:t,raw:t})}function Uue(e,t){if(!e.length)return{children:e};const n=[];let i=null,s=null;function o(a,u){a&&(u?n.push(que(u,a)):n.push({type:"text",content:a,raw:a}))}function r(a,u){let c=0;for(;c<a.length;){const d=a.indexOf("<",c);if(d===-1){o(a.slice(c),u);break}o(a.slice(c,d),u);const f=a.slice(d),p=f.match(V3);if(!p){o("<",u),c=d+1;continue}const g=Xi(f);if(g===-1){o("<",u),c=d+1;continue}const m=f.slice(0,g+1),y=(p[1]??"").toLowerCase();t.has(y)?n.push({type:"html_inline",tag:"",content:m,raw:m}):o(m,u),c=d+m.length}}function l(a,u){if(!a)return;const c=Wue(a,t);if(!c){r(a,u);return}const d=a.slice(0,c.index);d&&r(d,u),i={tag:c.tag,buffer:a.slice(c.index),closing:c.closing},s=i.buffer}for(const a of e){if(i){i.buffer+=Pm(a),s=i.buffer;const u=Xi(i.buffer);if(u===-1)continue;const c=i.buffer.slice(0,u+1),d=i.buffer.slice(u+1);n.push({type:"html_inline",tag:"",content:c,raw:c}),i=null,s=null,d&&l(d);continue}if(a.type==="html_inline"){const u=Pm(a),c=(u.match(V3)?.[1]??"").toLowerCase();if(c&&t.has(c)&&Xi(u)===-1){i={tag:c,buffer:u,closing:/^<\s*\//.test(u)},s=i.buffer;continue}}if(a.type==="text"){const u=String(a.content??"");if(!u.includes("<")){n.push(a);continue}l(u,a);continue}n.push(a)}return{children:n,pendingBuffer:s??void 0}}const Kue=["a","span","strong","em","b","i","u"];function Vue(e,t={}){const n=new Set;if(t.customHtmlTags?.length)for(const f of t.customHtmlTags){const p=Wr(f);p&&n.add(p)}const i=f=>{const p=f,g=new Set(n),m=Array.isArray(p.env?.__markstreamCustomHtmlTags)?p.env.__markstreamCustomHtmlTags:[];for(const A of m){const v=Wr(String(A??""));v&&g.add(v)}const y=Hue(Array.from(g)),w=new Set(Kue);for(const A of g)w.add(A);return{autoCloseInlineTagSet:w,commonHtmlTags:y,customTagSet:g,shouldMergeHtmlBlockTag:A=>g.has(A)||!y.has(A)||tF.has(A)}},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 p=f.children[0];return p?.type!=="html_block"?"":String(f.content??p.content??"")},o=(f,p)=>{f.type="html_block",f.content=p,f.raw=p,f.children=[]},r=f=>f.replace(/^(?:\r?\n)+/,""),l=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),u=(f,p)=>{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 y={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return p==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},y,{type:"paragraph_close",tag:"p",nesting:-1}]:p==="text"?[{type:"text",content:m,raw:m}]:[y]},c=(f,p,g)=>f[p-1]?.type==="paragraph_open"&&f[p+1]?.type==="paragraph_close"?"inline":g,d=(f,p)=>{const g=r(p);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 p=f.tokens??[],{commonHtmlTags:g,customTagSet:m}=i(f);for(const y of p){const w=y;if(w.type!=="inline"||!Array.isArray(w.children))continue;const k=String(w.content??""),A=w.children.length?w.children:k.includes("<")?[{type:"text",content:k,raw:k}]:null;if(A)try{const v=Uue(A,g);if(w.children=v.children,v.pendingBuffer){const x=k.lastIndexOf(v.pendingBuffer);if(x!==-1){const S=k.slice(0,x);w.content=S,typeof w.raw=="string"&&(w.raw=S)}}}catch(v){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",v)}}Pue(p,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const p=f.tokens??[],{autoCloseInlineTagSet:g,customTagSet:m,shouldMergeHtmlBlockTag:y}=i(f),w=[];for(let k=0;k<p.length;k++){const A=p[k];if(w.length>0){const[x,S]=w[w.length-1];if(k!==S){if(A.type==="paragraph_open"||A.type==="paragraph_close"){p.splice(k,1),k--;continue}const I=String(A.content??A.raw??"");if(I){const _=p[S],E=`${String(_.content||"")} -${I}`,N=Xi(E),D=N===-1?null:Jw(E,x,N+1);if(D){const T=E.slice(0,D.end),$=E.slice(D.end);_.content=T,_.loading=!1,p.splice(k,1),w.pop();const O=d(_,$)?[]:u($,c(p,k,"paragraph"));O.length&&p.splice(k,0,...O),k--;continue}_.content=E,_.loading!==!1&&(_.loading=!0)}p.splice(k,1),k--;continue}}const v=s(A);if(v){if(jue(v))continue;const x=(v.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),S=/^\s*<\s*\//.test(v);if(!x||!y(x))continue;if(o(A,v),!S)x&&!new RegExp(`^\\s*<\\s*${x}\\b[^>]*\\/\\s*>`,"i").test(v)&&Rue(v,x)>0&&w.push([x,k]);else if(w.length>0&&x&&w[w.length-1][0]===x){const[,I]=w[w.length-1],_=p[I];_.content=`${String(_.content||"")} -${v}`,_.loading=!1,w.pop(),p.splice(k,1),k--}continue}else if(w.length>0){if(A.type==="paragraph_open"||A.type==="paragraph_close"){p.splice(k,1),k--;continue}const x=A.content||"",S=new RegExp(`<\\s*\\/\\s*${w[w.length-1][0]}\\s*>`,"i").test(x);if(x){const[,I]=w[w.length-1],_=p[I];_.content=`${_.content||""} -${x}`,_.loading!==!1&&(_.loading=!S)}S&&w.pop(),p.splice(k,1),k--}else continue}if(m.size>0){const k=new Map,A=new Map,v=I=>{let _=k.get(I);return _||(_=new RegExp(`<\\s*${I}\\b`,"i"),k.set(I,_)),_},x=I=>{let _=A.get(I);return _||(_=new RegExp(`<\\s*\\/\\s*${I}\\s*>`,"i"),A.set(I,_)),_},S=[];for(let I=0;I<p.length;I++){const _=p[I],E=String(_.content??"");if(S.length>0){const D=S[S.length-1],T=p[D.index],$=_.type==="html_block"?x(D.tag).exec(E):null;if($){const R=$.index+$[0].length,j=E.slice(0,R),z=E.slice(R);T.content=`${String(T.content??"")} -${j}`,Array.isArray(T.children)&&T.children.push({type:"html_inline",content:`</${D.tag}>`,raw:`</${D.tag}>`}),S.pop();const K=d(T,z)?[]:u(z,c(p,I,"paragraph"));K.length?p.splice(I,1,...K):(p.splice(I,1),I--);continue}if(_.type!=="inline")continue;const O=Array.isArray(_.children)?_.children:[],P=Due(O,D.tag);if(P!==-1){const R=O.slice(0,P+1),j=O.slice(P+1),z=R.map(K=>String(K?.content??K?.raw??"")).join("");if(T.content=`${String(T.content??"")} -${z}`,Array.isArray(T.children)&&T.children.push(...R),j.length){const K=j.map(q=>String(q.content??q.raw??"")).join("");if(K.trim()){const q=K.replace(/^\s+/,"");if(d(T,K))p.splice(I,1),I--;else if(q.startsWith("<"))p.splice(I,1,{type:"html_block",content:q});else{const W=u(K,c(p,I,"paragraph"));p.splice(I,1,...W)}}else p.splice(I,1),I--}else p.splice(I,1),I--;S.pop();continue}T.content=`${String(T.content??"")} -${E}`,Array.isArray(T.children)&&T.children.push(...O),p.splice(I,1),I--;continue}if(_.type!=="inline")continue;const N=Array.isArray(_.children)?_.children:[];for(const D of m)if((N.length?zue(N,D):v(D).test(E)&&!x(D).test(E)?1:0)>0){S.push({tag:D,index:I});break}}}{let k=0;for(let A=0;A<p.length;A++){const v=p[A];if(v.type==="paragraph_open"){k++;continue}v.type==="paragraph_close"&&(k>0?k--:(p.splice(A,1),A--))}}for(let k=0;k<p.length;k++){const A=p[k];if(A.type==="html_block"){const _=(A.content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(_.startsWith("!")||_.startsWith("?")){A.loading=!1;continue}if(m.has(_)){const P=String(A.content??""),R=Xi(P),j=R===-1?null:Jw(P,_,R+1);A.loading=j?!1:A.loading!==void 0?A.loading:!0;const z=j?.start??-1,K=j?j.end-j.start:0;if(z!==-1){const q=P.slice(0,z+K);let W="";R!==-1&&R<z&&(W=P.slice(R+1,z)),A.children=[{type:_,content:W,raw:q,attrs:[],tag:_,loading:!1}],A.content=q,A.raw=q;const Z=u(P.slice(z+K)||"","text");Z.length&&p.splice(k+1,0,...Z)}else A.children=[{type:_,content:"",raw:P,attrs:[],tag:_,loading:!0}];continue}if(["br","hr","img","input","link","meta","div","p","ul","li"].includes(_))continue;A.type="inline";const E=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let N;for(;(N=E.exec(A.content||""))!==null;)N[1],N[2]||N[3]||N[4];const D=String(A.content??""),T=new RegExp(`<\\/\\s*${_}\\s*>`,"i").exec(D),$=T?T.index:-1,O=T?T[0].length:0;if($!==-1){const P=D.slice(0,$+O),R=(D.slice($+O)||"").replace(/^\s+/,"");A.children=[{type:"html_block",content:P,tag:_,loading:!1}],A.content=P,A.raw=P,R&&p.splice(k+1,0,R.startsWith("<")?{type:"html_block",content:R}:{type:"text",content:R,raw:R})}else A.children=[{type:"html_block",content:A.content,tag:_,loading:!0}];continue}if(!A||A.type!=="inline")continue;if(A.children.length===2&&A.children[0].type==="html_inline"){const _=(A.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),E=A.children[1],N=String(E?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(E?.type==="html_inline"&&N===_)continue;g.has(_)?(A.children[0].loading=!0,A.children[0].tag=_,A.children.push({type:"html_inline",tag:_,loading:!0,content:`</${_}>`})):A.children=[{type:"html_block",loading:!0,tag:_,content:String(A.children[0]?.content??"")+String(A.children[1]?.content??"")}];continue}else if(A.children.length===3&&A.children[0].type==="html_inline"&&A.children[2].type==="html_inline"){const _=(A.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(g.has(_))continue;A.children=[{type:"html_block",loading:!1,tag:_,content:A.children.map(E=>E.content).join("")}];continue}if(!A.content?.startsWith("<")||A.children?.length!==1)continue;const v=String(A.content),x=A,S=x.children[0];if(S?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(v)&&(x.children.length=0);continue}const I=String(S.content??v).match($ue)?.[1]?.toLowerCase()??"";if(I){if(/\/\s*>\s*$/.test(v)||eF.has(I)){x.children=[{type:"html_inline",content:v}];continue}x.children.length=0}}})}function Zue(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 Gue(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const i=n.tokens??[];for(let s=0;s<i.length;s++){const o=i[s];if(o.type!=="code_block")continue;const r=String(o.content??"").trim();if(!r)continue;const l=r.split(/\r?\n/).filter(a=>a.trim().length>0);if(l.length===1&&!Zue(l[0]??"")){const a=l[0]??"",u=o.level??0;i.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 nF=/\.([a-z0-9]{1,15})$/i,Que=/[_()[\]{}<>]/u,Yue=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,Jue=/[?#@]/u,Xue=/[\\/]/u,ece=/^[\p{L}\p{N}./\\-]+$/u,tce=/^[A-Za-z0-9-]{1,63}$/u,nce=/^xn--[a-z0-9-]{2,59}$/i,ice=/^(?:[A-Z]{1,6}|\d{1,8})$/u,sce=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,oce=/文件名\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,rce=/文件名\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,lce=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,ace=2e3,uce=512,cce={},dce=new Set(["ai","md","py","rs","sh","zip"]),iF=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),fce=new Set([...iF,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),hce=new Set(["com","dev","io","page","site"]),pce=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),gce=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"]),Sc=new Map;function ex(e,t){if(!e||e.length>uce)return t;for(Sc.set(e,t);Sc.size>ace;){const n=Sc.keys().next().value;if(!n)break;Sc.delete(n)}return t}function ep(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function xy(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return ep(n)?n:void 0}function tx(e,t){if(!ep(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 nx(e){const t=_p(e);return ep(t)?t:void 0}function mce(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function ix(e,t){if(!ep(t))return;const n=String(e??"").trim().split(/\s+/u).map(mce).filter(Boolean);if(n.length===0)return;const i={};return t?.filename&&n.every(s=>jm(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(i.filename=!0),t?.explicitFilename&&i.filename&&(i.explicitFilename=!0),t?.marketTicker&&n.every(s=>jm(s,{marketTicker:!0}))&&(i.marketTicker=!0),ep(i)?i:void 0}function Pu(e,t=!1){let n;return{options(i){return t||i==null?tx(e,n):tx(e,xy(nx(i),ix(i,n)))},remember(i){const s=nx(i);n=t?xy(n,s):xy(s,ix(i,n))},reset(){n=void 0}}}function sx(e){return tce.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function vce(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return sx(n)||nce.test(n)?t.every(sx):!1}function sF(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function yce(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function bce(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function oF(e,t,n){const i=yce(t);return sF(e)&&bce(i)&&String(n??"").toLowerCase().includes(i.toLowerCase())}function kce(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 _p(e){const t=String(e??""),n=Sc.get(t);return n?(Sc.delete(t),Sc.set(t,n),n):kce(t)?ex(t,{explicitFilename:oce.test(t),filename:rce.test(t),marketTicker:lce.test(t)}):ex(t,cce)}function Ace(e){return vce(e.split(/[\\/]/)[0]??"")}function Cce(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function wce(e){if(Que.test(e)||!ece.test(e))return!0;if(Xue.test(e))return!Ace(e);const t=e.replace(nF,"");return sF(t)?!0:t.split(".").filter(Boolean).some(Cce)}function xce(e,t,n){if(!(n?fce:iF).has(t))return!1;const i=e.slice(0,-(t.length+1));return i===""?e.startsWith("."):(n?sce:ice).test(i)}function jm(e,t={}){if(!e||Yue.test(e)||Jue.test(e))return!1;const n=e.match(nF);if(!n)return!1;const i=String(n[1]??"").toLowerCase();return xce(e,i,t.marketTicker===!0)?!0:gce.has(i)?!dce.has(i)||t.filename?!0:wce(e):!!(t.explicitFilename&&hce.has(i)||t.filename&&pce.has(i))}const rF=new WeakMap,lF=new WeakSet;function Z3(e,t){return rF.set(e,t),e}function _ce(e){return rF.get(e)}function Sce(e){lF.add(e)}function Mce(e){return e===void 0||lF.has(e)}const ox=["!"];function rx(e){return e==="linkify"||e==="autolink"?e:"recovery"}function qo(e){return{type:"text",content:e,raw:e}}function ac(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 uc(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 Ka(e,t,n,i="recovery"){let s="";if(t.includes('"')){const o=t.split('"');t=o[0].trim(),s=o[1].trim()}return Z3({type:"link",loading:n,href:t,title:s,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`},i)}function Ice(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(qo(t))}}function lx(e,t){let n=-1;for(const i of t){const s=e.indexOf(i);s!==-1&&(n===-1||s<n)&&(n=s)}return n}function Ece(e){const t=e.attrs?.find(n=>n?.[0]==="href")?.[1];return typeof t=="string"?t:""}function Tce(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(i=>i?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function ax(e,t,n){let i="";for(let s=t+1;s<n;s++){const o=e[s];if(o?.type!=="text"||typeof o.content!="string")return null;i+=o.content}return i||null}function ux(e){let t=0;for(let n=0;n<e.length;n++){const i=e[n];if(i==="(")t++;else if(i===")"){if(t===0)return n;t--}}return-1}function Lce(e){e.core.ruler.after("inline","fix_link_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=Nce(s.children,typeof s.content=="string"?s.content:void 0)}catch(o){console.error("[applyFixLinkTokens] failed to fix inline children",o)}}})}function Nce(e,t){if(e.length<3)return e;const n=e.some(r=>r.type==="code_inline"),i=new Map;let s=0;for(let r=0;r<e.length;r++){const l=e[r];if(l.type==="link_open"){let a=-1;for(let u=r+1;u<e.length;u++)if(e[u]?.type==="link_close"){a=u;break}if(a!==-1&&l.markup==="linkify"){i.set(l,s);const u=ax(e,r,a),c=s>0&&u?ux(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 o=_p(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;u<e.length;u++)if(e[u]?.type==="link_close"){a=u;break}if(a!==-1){const u=ax(e,r,a),c=Ece(l);if(!n&&l.markup==="linkify"&&u&&!oF(u,c,t)&&jm(u,o)){e.splice(r,a-r+1,qo(u));continue}let d=lx(u??"",ox);if(l.markup==="linkify"&&u?.includes(")")&&(i.get(l)??0)>0){const g=ux(u);g!==-1&&(d===-1||g<d)&&(d=g)}const f=lx(c,ox);let p=d;for(let g=r+1;g<a;g++){const m=e[g];if(m?.type!=="text"||typeof m.content!="string")continue;if(p>=m.content.length){p-=m.content.length;continue}if(p<0)break;const y=m.content[p],w=m.content.slice(0,p);let k=m.content.slice(p);for(let x=g+1;x<a;x++){const S=e[x];S?.type==="text"&&typeof S.content=="string"&&(k+=S.content)}m.content=w,m.raw=w;const A=a-(g+1);A>0&&(e.splice(g+1,A),a=g+1);let v=c;if(y==="!"&&f!==-1)v=c.slice(0,f);else if(k){const x=encodeURI(k);if(x&&c.endsWith(x))v=c.slice(0,c.length-x.length);else{const S=y?encodeURI(y):"",I=S?c.indexOf(S):-1;I!==-1&&(v=c.slice(0,I))}}v!==c&&Tce(l,v),k&&e.splice(a+1,0,qo(k));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;u<e.length;u++)if(e[u]?.type==="em_close"){e[u].type="strong_close",e[u].tag="strong",e[u].markup="**";break}}else if(l?.type==="text"&&l.content?.endsWith("(")&&e[r+1]?.type==="link_open"){const a=l.content.match(/\[([^\]]+)\]/);if(a){let u=l.content.slice(0,a.index);const c=u.match(/(\*+)$/),d=rx(e[r+1]?.markup),f=[];if(c){u=u.slice(0,c.index),u&&f.push(qo(u));const p=a[1],g=c[1].length;ac(f,g);let m=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(m+=e[r+4]?.content||"",e[r+4].content=""),f.push(Ka(p,m,!e[r+4]?.content?.startsWith(")"),d)),uc(f,g),e[r+4]?.type==="text"){const y=e[r+4].content?.replace(/^\)\**/,"");y&&f.push(qo(y)),e.splice(r,5,...f)}else e.splice(r,4,...f)}else{u&&f.push(qo(u));let p=a[1];const g=p.match(/^\*+/);if(g){const y=g[0].length;p=p.replace(/^\*+/,"").replace(/\*+$/,"");let w=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(w+=e[r+4]?.content||"",e[r+4].content=""),ac(f,y),f.push(Ka(p,w,!e[r+4]?.content?.startsWith(")"),d)),uc(f,y),e[r+4]?.type==="text"){const k=e[r+4].content?.replace(/^\)/,"");k&&f.push(qo(k)),e.splice(r,5,...f)}else e.splice(r,4,...f);r===0?r=f.length-1:r-=f.length+1;continue}let m=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(m+=e[r+4]?.content||"",e[r+4].content=""),f.push(Ka(p,m,!e[r+4]?.content?.startsWith(")"),d)),e[r+4]?.type==="text"){const y=e[r+4].content?.replace(/^\)/,"");y&&f.push(qo(y)),e.splice(r,5,...f)}else e.splice(r,4,...f)}r-=f.length+1;continue}}else if(l.type==="link_open"&&l.markup==="linkify"&&e[r-1]?.type==="text"&&e[r-1].content?.endsWith("(")){if(e[r-2]?.type==="link_close"){const a=[],u=e[r-3].content||"";let c=l.attrs?.find(d=>d[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(Ka(u,c,f,"linkify"));const p=e[r+3].content?.replace(/^\)\**/,"");p&&a.push(qo(p)),e.splice(r-4,8,...a)}else a.push(Z3({type:"link",loading:!0,href:c,title:"",text:u,children:[{type:"text",content:c,raw:c}],raw:`[${u}](${c})`},"linkify")),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(w=>w[0]==="href")?.[1]||"",d=u.find(w=>w[0]==="title")?.[1]||"";let f=3,p=2;const g=(e[r-3]?.content||"").match(/^(\*+)$/),m=[];if(g){p+=1;const w=g[1].length;ac(m,w)}if(l.markup!=="linkify"&&e[r+1].type==="text"&&e[r+1]?.content?.startsWith("](")){f+=1;for(let w=r+1;w<e.length;w++){const k=g?g[1].length:e[r-3].markup.length,A=e[w];if(k===1&&A.type==="em_close")break;if(k===2&&A.type==="strong_close")break;if(k===3&&(A.type==="em_close"||A.type==="strong_close"))break;f+=1}}const y=Z3({type:"link",loading:!1,href:c,title:d,text:a,children:[{type:"text",content:a,raw:a}],raw:`[${a}](${c})`},l.markup?rx(l.markup):"explicit");if(m.push(y),g){const w=g[1].length;uc(m,w)}e.splice(r-p,f,...m),r-=m.length+1;continue}else if(l.content?.startsWith("](")&&e[r-1].markup?.includes("*")&&e[r-4]?.type==="text"&&e[r-4].content?.endsWith("[")){const a=e[r-1].markup.length,u=[],c=e[r-4].content.slice(0,e[r-4].content.length-a);c&&u.push(qo(c)),ac(u,a);const d=e[r-2].content||"";let f=l.content.slice(2),p=!0;if(e[r+1]?.type==="text"){const g=(e[r+1]?.content??"").indexOf(")");p=g===-1,g===-1&&(f+=e[r+1]?.content?.slice(0,g)||"",e[r+1].content="")}if(u.push(Ka(d,f,p)),uc(u,a),e[r+1]?.type==="text"){const g=e[r+1].content?.replace(/^\)\**/,"");g&&u.push(qo(g)),e.splice(r-4,8,...u)}else e[r+1]?.type==="link_open"?e.splice(r-4,10,...u):e.splice(r-4,7,...u);r-=u.length+1;continue}else if(l.content?.startsWith("](")&&e[r-1].type==="strong_close"&&e[r-4]?.type==="text"&&e[r-4]?.content?.includes("**[")){const a=[],u=e[r-4].content.split("**[")[0];u&&a.push(qo(u)),ac(a,2);const c=e[r-2].content||"";let d=l.content.slice(2),f=!0;if(e[r+1]?.type==="text"){const p=(e[r+1]?.content??"").indexOf(")");f=p===-1,p===-1&&(d+=e[r+1]?.content?.slice(0,p)||"",e[r+1].content="")}if(a.push(Ka(c,d,f)),uc(a,2),e[r+1]?.type==="text"){const p=e[r+1].content?.replace(/^\)\**/,"");p&&a.push(qo(p)),e.splice(r-4,8,...a)}else e[r+1]?.type==="link_open"?e.splice(r-4,10,...a):e.splice(r-4,7,...a);r-=a.length+1;continue}else if(l.type==="strong_close"&&e[r+1]?.type==="text"&&e[r+1].content?.includes("](")&&e[r-1].type==="text"&&/\[.*$/.test(e[r-1].content||"")){const a=[],[u,c]=e[r-1].content?.split("[")||["",""];u&&a.push(qo(u)),ac(a,2);let[d,f]=e[r+1].content.split("](");d=c+d;let p=4;if(e[r+2]?.type==="link_open"){const m=e[r+2].attrs?.find(y=>y[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,p+=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(Ka(d,f,g)),uc(a,2),e.splice(r-2,p,...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=[];ac(d,2),d.push(Ka(u,c,!1)),uc(d,2),e.splice(r,9,...d),r-=d.length-1;continue}}}}if(n)return e;for(let r=0;r<e.length-1;r++){const l=e[r],a=e[r+1];if(l?.type!=="link"||a?.type!=="text"||typeof a.content!="string"||!a.content.startsWith("!"))continue;const u=String(l.href??"");if(String(l.text??"")!==u||!u.endsWith("=")&&!u.endsWith("#"))continue;Ice(l,"!");const c=a.content.slice(1);c?(a.content=c,a.raw=c):e.splice(r+1,1)}return e}function Fce(e){e.core.ruler.after("inline","fix_list_item_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=Bce(s.children)}catch(o){console.error("[applyFixListItem] failed to fix inline children",o)}}})}function Bce(e){const t=e[e.length-1],n=String(t?.content??"");return t?.type==="text"&&/^\s*\d+\.\s*$/.test(n)&&e[e.length-2]?.tag==="br"&&e.splice(e.length-1,1),e}function $ce(e){e.core.ruler.after("inline","fix_strong_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=Dce(s.children)}catch(o){console.error("[applyFixStrongTokens] failed to fix inline children",o)}}})}function Dce(e){let t=0;const n=new Set,i=new Set;let s=0;for(let c=0;c<e.length;c++){const d=e[c],f=d.type;if(f==="strong_open"){t++;const p=String(d.markup??"");let g=c-1;for(;g>=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y<e.length&&e[y].type==="text"&&e[y].content==="";)y++;const w=e[y];p==="__"&&(m?.content?.endsWith("_")||w?.content?.startsWith("_")||w?.markup?.includes("_"))&&(d.type="text",d.tag="",d.content=p,d.raw=p,d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null,n.add(t))}else if(f==="strong_close")n.has(t)&&d.markup==="__"&&(d.type="text",d.content=d.markup,d.raw=String(d.markup??""),d.tag="",d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null),t--,t<0&&(t=0);else if(f==="em_open"){s++;const p=String(d.markup??"");let g=c-1;for(;g>=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y<e.length&&e[y].type==="text"&&e[y].content==="";)y++;const w=e[y];p==="_"&&(m?.content?.endsWith("_")||w?.content?.startsWith("_")||w?.markup?.includes("_"))&&(d.type="text",d.tag="",d.content=p,d.raw=p,d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null,i.add(s))}else f==="em_close"&&(i.has(s)&&d.markup==="_"&&(d.type="text",d.content=d.markup,d.raw=String(d.markup??""),d.tag="",d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null),s--,s<0&&(s=0))}if(e.length<5)return e;const o=e.length-4,r=e[o];let l=[...e];const a=e[o+1],u=String(r.content??"");if(r.type==="link_open"&&e[o-1]?.type==="em_open"&&e[o-2]?.type==="text"&&e[o-2].content?.endsWith("*")){const c=String(e[o-2].content??"").slice(0,-1),d=[{type:"strong_open",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""},e[o],e[o+1],e[o+2],{type:"strong_close",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""}];c&&d.unshift({type:"text",content:c,raw:c}),l.splice(o-2,6,...d)}else if(r.type==="text"&&u.endsWith("*")&&a.type==="em_open"){const c=e[o+2],d=c?.type==="text"?4:3,f=[{type:"strong_open",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""},{type:"text",content:c?.type==="text"?String(c.content??""):"",raw:c?.type==="text"?String(c.content??""):""},{type:"strong_close",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""}],p=u.slice(0,-1);p&&f.unshift({type:"text",content:p,raw:p}),l.splice(o,d,...f)}return l=zce(l),l}function zce(e){if(e.length<7)return e;const t=[];for(let n=0;n<e.length;n++){const i=e[n],s=e[n+1],o=e[n+2],r=e[n+3],l=e[n+4],a=e[n+5],u=e[n+6];if(i?.type==="strong_open"&&s?.type==="text"&&o?.type==="strong_close"&&r?.type==="strong_open"&&l?.type==="math_inline"&&a?.type==="strong_close"&&u?.type==="text"){const c=String(u.content??""),d=c.indexOf("**");if(d!==-1){const f=c.slice(0,d),p=c.slice(d+2);t.push(i),t.push(s),t.push(l),f&&t.push({...u,type:"text",content:f,raw:f}),t.push(a),p&&t.push({...u,type:"text",content:p,raw:p}),n+=6;continue}}if(i?.type==="strong_open"&&s?.type==="text"&&o?.type==="strong_close"&&r?.type==="strong_open"&&l?.type==="math_inline"&&a?.type==="strong_close"){const c=Rce(e,n+6);if(c){t.push(i),t.push(s),t.push(l);for(let d=n+6;d<c.index;d++)t.push(e[d]);c.beforeClose&&t.push({...e[c.index],type:"text",content:c.beforeClose,raw:c.beforeClose}),t.push(a),c.afterClose&&t.push({...e[c.index],type:"text",content:c.afterClose,raw:c.afterClose}),n=c.index;continue}}t.push(i)}return t}function Rce(e,t){for(let n=t;n<e.length;n++){const i=e[n];if(i?.type==="strong_open")return null;if(i?.type!=="text")continue;const s=String(i.content??""),o=s.indexOf("**");if(o!==-1)return{index:n,beforeClose:s.slice(0,o),afterClose:s.slice(o+2)}}return null}function Oce(e){e.core.ruler.after("block","fix_table_tokens",t=>{const n=t;try{const i=Uce(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(i)&&(n.tokens=i)}catch(i){console.error("[applyFixTableTokens] failed to fix table tokens",i)}})}function cx(){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 dx(){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 fx(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 aF(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(i=>i.trim().length>0)?n:null}function _y(e){return aF(e)!==null}function uF(e){return/^:?-+:?$/.test(e.trim())}function Pce(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(uF)}function jce(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function Hce(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(uF)&&jce(n)}function Wce(e){return e==="|"||e==="|:"}function qce(e){const t=aF(e);return t!==null&&t.every(n=>!n.includes(":"))}function Uce(e,t=!1,n=""){const i=[...e];if(e.length<3)return i;const s=e.length-2,o=e[s];if(o.type==="inline"){const r=String(o.content??""),l=r.split(` -`)[0]??"",[a="",u="",...c]=r.split(` -`),d=!t&&!r.includes(` -`)&&/\r?\n$/.test(n)&&_y(r);if(!t&&(r.includes(` -`)&&c.length===0&&_y(a)&&Hce(u)||d)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>fx(g)),p=[...cx(),...f,...dx()];i.splice(s-1,3,...p)}else if(r.includes(` -`)&&c.length===0&&_y(a)&&Pce(u)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>fx(g)),p=[...cx(),...f,...dx()];i.splice(s-1,3,...p)}else r.includes(` -`)&&c.length===0&&qce(a)&&Wce(u)&&(o.content=r.slice(0,-2),o.children.splice(2,1))}return i}function Kce(e,t,n,i){const s=e.length;if(n==="$$"&&i==="$$"){let u=t;for(;u<s-1;){if(e[u]==="$"&&e[u+1]==="$"){let c=u-1,d=0;for(;c>=0&&e[c]==="\\";)d++,c--;if(d%2===0)return u}u++}return-1}const o=n[n.length-1],r=i;let l=0,a=t;for(;a<s;){if(e.slice(a,a+r.length)===r){let c=a-1,d=0;for(;c>=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===o?l++:u===r[r.length-1]&&l>0&&l--,a++}return-1}var Vce=Kce;const Zce=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],Hm=Zce.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),Gce=/\\[a-z]+/i,cF="(?:\\\\|\\u0008)",Qce=new RegExp(String.raw`${cF}(?:${Hm})\s*\{[^}]+\}`,"i"),Yce=new RegExp(String.raw`(?:${cF})?(?:${Hm})\s*\{`,"i"),Jce=/\\(?:text|frac|left|right|times)/,Xce=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,ede=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,tde=/[A-Z]+\s*\([^)]+\)/i,nde=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,ide=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,sde=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,ode={"\b":"\\b","\v":"\\v","\f":"\\f"};function rde(e){let t="";for(const n of e)t+=ode[n]??n;return t}function ou(e){if(!e)return!1;const t=rde(e),n=t.trim();if(sde.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const i=Gce.test(t),s=Qce.test(t),o=Yce.test(t),r=Jce.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=Xce.test(t)&&!ede.test(t),u=tde.test(t),c=nde.test(n),d=ide.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),p=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return i||s||o||r||l||a||u||c||d||f||p}const dF="__markstreamMathPluginApplied",G3=80,fF=2e4,hx=fF+4096;function hb(e){return!!e[dF]}function lde(e){e[dF]=!0}const hF=["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"],ade=["cdot","mathbf{","partial","mu_{"],pF=hF.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),gF="[ \r\b\f\v]",ude=new RegExp(`([^\\\\])(${ade.map(e=>e).join("|")})+`,"g"),cde=/span\{([^}]+)\}/,dde=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,fde=/(^|[^\\])\\\r?\n/g,hde=/(^|[^\\])\\$/g,pde=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,gde=new RegExp(`(${gF})|(${pF})\\b`,"g"),px=new Map,gx=new Map;function mde(e){if(!e)return gde;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),i=px.get(n);if(i)return i;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,o=new RegExp(`(${gF})|(${s})\\b`,"g");return px.set(n,o),o}function vde(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const i=e?"__default__":n.join(""),s=gx.get(i);if(s)return s;const o=e?[Hm,pF].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),Hm].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${o})\\s*\\{`,"g");return gx.set(i,r),r}const mx={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function vx(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function yde(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&pde.test(n))return t;const i=n?t.slice(n.length):t;return`${n}${"\\!".repeat(i.length)}`})}function yx(e){const t=/(^|[^\\])(__|\*\*)/g;let n,i=null;for(;(n=t.exec(e))!==null;)i={marker:n[2],index:n.index+(n[1]?.length??0)};return i}function Va(e,t){const n=t?.commands??hF,i=t?.escapeExclamation??!0,s=t?.commands==null,o=mde(s?void 0:n);let r=e.replace(o,(u,c,d,f,p)=>{if(c!==void 0&&mx[c]!==void 0)return`\\${mx[c]}`;if(d&&n.includes(d)){const g=p&&typeof f=="number"?p[f-1]:void 0;return g==="\\"||g&&/\w/.test(g)?u:`\\${d}`}return u});i&&(r=yde(r));let l=r;const a=vde(s,s?void 0:n);return l=l.replace(a,(u,c,d)=>`${c}\\${d}{`),l=l.replace(cde,"span\\{$1\\}").replace(dde,"\\operatorname{span}\\{$1\\}"),l=l.replace(fde,`$1\\\\ -`),l=l.replace(hde,"$1\\\\"),l=l.replace(ude,"$1\\$2"),l}function bx(e){const t=e.trim();return!(!ou(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 mF(e){const t=[];let n=0;for(;n<e.length;){if(e[n]!=="`"){n++;continue}const i=n;let s=1;for(;i+s<e.length&&e[i+s]==="`";)s++;let o=i+s,r=-1;for(;o<e.length;){if(e[o]!=="`"){o++;continue}let l=1;for(;o+l<e.length&&e[o+l]==="`";)l++;if(l===s){r=o;break}o+=l}if(r!==-1){t.push([i,r+s]),n=r+s;continue}n=i+s}return t}function Wm(e,t){for(const n of e)if(t>=n[0]&&t<n[1])return n;return null}function bde(e,t=!1){const n=[];let i=0;for(;i<e.length-1;){if(e[i]==="!"&&e[i+1]==="["){const s=i;let o=i+2,r=1;for(;o<e.length&&r>0;){if(e[o]==="\\"&&o+1<e.length){o+=2;continue}e[o]==="["?r++:e[o]==="]"&&r--,o++}if(r===0&&o<e.length&&e[o]==="("){let l=o+1,a=1;for(;l<e.length&&a>0;){if(e[l]==="\\"&&l+1<e.length){l+=2;continue}e[l]==="("?a++:e[l]===")"&&a--,l++}if(a===0){n.push([s,l]),i=l;continue}if(t){n.push([s,e.length]),i=e.length;continue}}}i++}return n}function Sp(e,t){let n=t-1,i=0;for(;n>=0&&e[n]==="\\";)i++,n--;return i%2===1}function Q3(e,t){let n=t;for(;n<e.length;){const i=e.indexOf("$",n);if(i===-1)return-1;if(Sp(e,i)){n=i+1;continue}return i}return-1}function Sy(e,t){let n=t;for(;n<e.length;){const i=Q3(e,n);if(i===-1)return-1;if(i>0&&e[i-1]==="$"||i+1<e.length&&e[i+1]==="$"){n=i+1;continue}return i}return-1}function Od(e,t,n=0){let i=Math.max(0,n);for(;i<e.length;){const s=e.indexOf(t,i);if(s===-1)return-1;if(!Sp(e,s))return s;i=s+Math.max(1,t.length)}return-1}function kx(e,t,n=0,i=e.length,s=[]){let o=0,r=Math.max(0,n);const l=Math.min(e.length,Math.max(0,i));for(;r<l;){const a=e.indexOf(t,r);if(a===-1||a>=l)break;const u=Wm(s,a);if(u){r=Math.max(a+Math.max(1,t.length),u[1]);continue}Sp(e,a)||o++,r=a+Math.max(1,t.length)}return o}function pb(e,t,n){const i=np(String(e??""));if(!i.endsWith(t))return-1;const s=i.length-t.length;if(s<=0||!np(i.slice(0,s)).trim()||Sp(i,s))return-1;const o=mF(i);if(Wm(o,s))return-1;const r=kx(i,t,0,s,o);if(t==="$$"){if(r%2===1)return-1}else if(r>kx(i,n,0,s,o))return-1;return s}function tp(e){return e===" "||e===" "}function np(e){let t=e.length;for(;t>0&&tp(e[t-1]);)t--;return e.slice(0,t)}function Ax(e){let t=0;for(let n=0;n<e.length;n++)e[n]===` -`&&t++;return t}function Cx(e){if(!e)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}function kde(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let i=0;i<e.length;i++){const s=e[i];if(s===t){n++;continue}if(!tp(s))return!1}return n>=3}function Ade(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let i=0;for(;t[n]==="-";)i++,n++;return i<3?!1:(t[n]===":"&&n++,n===t.length)}function Cde(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(Ade)}function wde(e){let t=0;if(!Cx(e[t]))return!1;for(;Cx(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:tp(e[t+1])}function vF(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&&tp(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&tp(t[1])||wde(t)||kde(t)||Cde(t))}function wx(e,t){return e?t?`${e} -${t}`:e:t}function Y3(e){const t=String(e??"").trim();return t?ou(t):!1}function xx(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)|0;return t.toString(36)}function yF(e){if(e.length<=hx)return{source:e,lineOffset:0};let t=e.length-hx;const n=e.indexOf(` -`,t);return n===-1?{source:"",lineOffset:Ax(e)}:(t=n+1,{source:e.slice(t),lineOffset:Ax(e.slice(0,t))})}function bF(e){const t=String(e??"");if(!t||!t.includes("$$")&&!t.includes("\\["))return!1;const{source:n}=yF(t);if(!n)return!1;const i=n.split(/\r?\n/),s=Math.max(0,i.length-G3-2),o=[["$$","$$"],["\\[","\\]"]];for(let r=s;r<i.length;r++){const l=np(i[r]);if(l&&!vF(l)){for(const[a,u]of o)if(pb(l,a,u)!==-1)return!0}}return!1}function xde(e){const t=String(e??"");if(!t||!t.includes("$$")&&!t.includes("\\["))return null;const{source:n,lineOffset:i}=yF(t);if(!n)return null;const s=n.split(/\r?\n/),o=Math.max(0,s.length-G3-2),r=[["$$","$$"],["\\[","\\]"]];for(let l=o;l<s.length-1;l++){const a=np(s[l]);for(const[u,c]of r){const d=pb(a,u,c);if(d===-1)continue;let f="",p=!1;for(let g=l+1;g<s.length;g++){if(g-l>G3){p=!0;break}const m=s[g],y=Od(m,c);if(y!==-1){const w=wx(f,m.slice(0,y));if(!Y3(w)){p=!0;break}const k=m.slice(y+c.length),A=k.trim()?`suffix:${xx(k)}`:"nosuffix";return["closed",u,i+l,d,i+g,y,xx(w),A].join(":")}if(vF(m)){p=!0;break}if(f=wx(f,m),f.length>fF){p=!0;break}}if(!p&&Y3(f))return["pending",u,i+l,d].join(":")}}return null}function My(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function _de(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const i=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(i)?!1:i===""||/^[)\s,.!?;:]/.test(i)}function Iy(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function Sde(e,t){lde(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)},i=(r,l)=>{const a=r,u=!!t?.strictDelimiters,c=!a?.env?.__markstreamFinal,d=(k,A)=>{let v=A;for(;v<k.length&&(k[v]===" "||k[v]===" ");)v++;if(v===A||!(k[v]===` -`||k[v]==="\r"&&k[v+1]===` -`))return A;const x=k.slice(A,v),S=a.push("text","",0);return S.content=x,v};if(/^\*[^*]+/.test(a.src))return!1;if(a.src[a.pos]==="$"){let k=a.pos+1;for(;a.src[k]==="$";)k++;const A=k-a.pos,v=a.src[k];if(A>=3&&(!v||/\s/.test(v))){const x=a.push("text","",0);return x.content=a.src.slice(a.pos,k),a.pos=k,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],p=String(a.pending??""),g=Math.max(0,a.pos-p.length);let m=g,y=g;const w=g;for(const[k,A]of f){const v=a.src,x=mF(v),S=bde(v,c);let I=!1;k==="$$"&&m!==w&&(m=w);let _=-1,E=-1,N=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 P=a.push("text_special","",0);P.content=T==="\\)"?")":"(",P.markup=T,a.pos=a.pos+T.length,m=a.pos;return}if(!T)return;if(k==="$$"&&T.includes("$")){let P=0;for(;P<T.length;){const R=Q3(T,P);if(R===-1){const ie=T.slice(P);if(ie){const Se=a.push("text","",0);Se.content=ie,a.pos=a.pos+ie.length,m=a.pos}break}if(R>0&&T[R-1]==="$"||R+1<T.length&&T[R+1]==="$"){const ie=T.slice(P,R+1);if(ie){const Se=a.push("text","",0);Se.content=ie,a.pos=a.pos+ie.length,m=a.pos}P=R+1;continue}const j=T.slice(P,R);if(j){const ie=a.push("text","",0);ie.content=j,a.pos=a.pos+j.length,m=a.pos}const z=Sy(T,R+1);if(z===-1){const ie=T.slice(R),Se=a.push("text","",0);Se.content=ie,a.pos=a.pos+ie.length,m=a.pos;break}const K=T.slice(R+1,z),q=K.includes("`"),W=!K||!K.trim(),Z=T[z+1],ne=My(K,Z),X=Iy(K);if(!q&&!W&&!ne&&!X){const ie=a.push("math_inline","math",0);ie.content=Va(K,t),ie.markup="$",ie.raw=`$${K}$`,ie.loading=!1,a.pos=a.pos+(z-R+1),m=a.pos,P=z+1;continue}const ue=a.push("text","",0);ue.content="$",a.pos=a.pos+1,m=a.pos,P=R+1}return}const $=T.indexOf("![");if($!==-1){if($>0){const j=T.slice(0,$),z=a.push("text","",0);z.content=j,a.pos=a.pos+j.length,m=a.pos}const P=T.slice($).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(P){const[,j,z]=P,K=z.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),q=K?K[1]:z,W=K&&K[2]?K[2]:null,Z=a.push("image","img",0);Z.attrs=[["src",q],["alt",j]],W&&Z.attrs.push(["title",W]),Z.content=j,Z.children=[{type:"text",content:j,tag:""}],a.pos=a.pos+P[0].length,m=a.pos;const ne=T.slice($+P[0].length);ne&&D(ne);return}const R=a.push("text","",0);R.content=T,a.pos=a.pos+T.length,m=a.pos;return}const O=a.push("text","",0);O.content=T,a.pos=a.pos+T.length,m=a.pos};for(;!(m>=v.length);){const T=v.indexOf(k,m);if(T===-1)break;if(Sp(v,T)){m=T+Math.max(1,k.length);continue}const $=Wm(x,T);if($){m=$[1];continue}const O=Wm(S,T);if(O){m=O[1];continue}if(T===_&&m===E){if(N++,N>2){m=T+Math.max(1,k.length);continue}}else N=0,_=T,E=m;if(k==="("&&T>0){let ne=T-1;for(;ne>=0&&v[ne]===" ";)ne--;if(ne>=0&&v[ne]==="]"){m=T+k.length;continue}}if(k==="$"&&T>0&&v[T-1]==="$"){m=T+1;continue}if(k==="$"&&T<v.length-1&&v[T+1]==="$"){m=T+2;continue}const P=k==="$"?Sy(v,T+k.length):Vce(v,T+k.length,k,A);if(P===-1){const ne=v.slice(T+k.length);if(ne.includes(k)){m=v.indexOf(k,T+k.length);continue}if(P===-1){const X=k==="$"&&_de(ne);if(c&&!u&&!X&&ou(ne)&&!ne.includes("`")){if(m=T+k.length,I=!0,!l){a.pending="";const ue=y?v.slice(y,m):v.slice(0,m),ie=vx(ue)%2===1;if(y)D(v.slice(y,m));else{let Se=v.slice(0,m);Se.endsWith(k)&&(Se=Se.slice(0,Se.length-k.length)),D(Se)}if(ie){const Se=yx(ue)?.marker??"**",fe=a.push("strong_open","",0);fe.markup=Se;const pe=a.push("math_inline","math",0);pe.content=Va(ne,t),pe.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",pe.raw=`${k}${ne}${A}`,pe.loading=!0,fe.content=ne,a.push("strong_close","",0)}else{const Se=a.push("math_inline","math",0);Se.content=Va(ne,t),Se.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",Se.raw=`${k}${ne}${A}`,Se.loading=!0}a.pos=v.length}m=v.length,y=m}break}}const R=v.slice(T+k.length,P),j=R.includes("`"),z=!R||!R.trim(),K=k==="$",q=v[P+A.length],W=K&&My(R,q),Z=K&&Iy(R);if(u?j||z||W||Z:j||z||W||Z||!K&&!ou(R)){m=P+A.length;const ne=v.slice(a.pos,m);a.pending||(D(ne),y=m);continue}if(I=!0,!l){const ne=v.slice(a.pos-(a.pending??"").length,T);let X=v.slice(0,m)?v.slice(y,T):ne;const ue=vx(X)%2===1;T!==a.pos&&ue&&(X=a.pending+v.slice(a.pos,T));const ie=ue?yx(X):null,Se=ie?.marker??"**";if(a.pending!==X)if(a.pending="",ue)if(ie){const fe=X.slice(ie.index+Se.length);D(X.slice(0,ie.index));const pe=a.push("strong_open","",0);pe.markup=Se;const Ne=a.push("text","",0);Ne.content=fe,a.push("strong_close","",0)}else D(X);else D(X);if(ue){const fe=a.push("strong_open","",0);fe.markup=Se;const pe=a.push("math_inline","math",0);pe.content=Va(R,t),pe.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",pe.raw=`${k}${R}${A}`,pe.loading=!1;const Ne=v.slice(P+A.length).startsWith(Se);return Ne&&a.push("strong_close","",0),a.pos=d(v,P+A.length),m=a.pos,y=m,Ne||a.push("strong_close","",0),!0}else{const fe=a.push("math_inline","math",0);fe.content=Va(R,t),fe.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",fe.raw=`${k}${R}${A}`,fe.loading=!1}}return m=d(v,P+A.length),y=m,a.pos=m,!0}if(I){if(l)a.pos=m;else{if(k==="$$"&&m<v.length&&v.slice(m).includes("$")){let T=m;for(;!(T>=v.length);){const $=Q3(v,T);if($===-1)break;if($+1<v.length&&v[$+1]==="$"){T=$+2;continue}if($>0&&v[$-1]==="$"){T=$+1;continue}const O=Sy(v,$+1);if(O===-1)break;const P=v.slice($+1,O),R=P.includes("`"),j=!P||!P.trim(),z=v[O+1],K=My(P,z),q=Iy(P);if(!R&&!j&&!K&&!q){const W=v.slice(m,$);W&&D(W);const Z=a.push("math_inline","math",0);Z.content=Va(P,t),Z.markup="$",Z.raw=`$${P}$`,Z.loading=!1,m=O+1,T=O+1}else D("$"),T=$+1}T<v.length&&D(v.slice(T))}else m<v.length&&D(v.slice(m));a.pos=v.length}return!0}}return!1},s=(r,l,a,u)=>{const c=r,d=!c?.env?.__markstreamFinal,f=t?.strictDelimiters,p=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],g=c.bMarks[l]+c.tShift[l];let m=c.src.slice(g,c.eMarks[l]).trim(),y=!1,w="",k="",A=!1,v="",x=!1;for(const[W,Z]of p)if(m.startsWith(W))if(W.includes("[")){const ne=W==="\\["?m.slice(W.length):"";if(W==="\\["&&Od(ne,Z)===-1&&!/^\s*!\[/.test(ne)&&!ne.includes("`")&&ou(ne)){y=!0,w=W,k=Z;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(l+1<a){y=!0,w=W,k=Z;break}continue}}else if(m.replace("\\","")==="["){if(l+1<a){y=!0,w=W,k=Z;break}continue}else{const X=c.tokens[c.tokens.length-1];if(X&&X.type==="list_item_open"&&X.mark==="-"&&m.slice(W.length,m.indexOf("]")).trim()==="x")continue;if(m.replace("\\","").startsWith("[")&&!m.includes("](")){const ue=m.indexOf("]");if(m.slice(ue).trim()!=="]")continue;const ie=m.slice(W.length,ue);if(W==="["?bx(ie):ou(ie)){y=!0,w=W,k=Z;break}continue}}}else{y=!0,w=W,k=Z;break}else if((W==="$$"||W==="\\[")&&m.endsWith(W)&&l+1<a){const ne=pb(m,W,Z);if(ne===-1)continue;v=np(m.slice(0,ne)),x=!0;const X=c.bMarks[l+1]+c.tShift[l+1];m=c.src.slice(X,c.eMarks[l+1]).trim(),A=!0,y=!0,w=W,k=Z;break}if(!y)return!1;if(u&&!x)return!0;const S=m.indexOf(w),I=S+w.length,_=!f&&w==="["?m.indexOf("\\]",I):-1,E=_>=0?"\\]":k,N=_>=0?_:Od(m,k,I);if(!A&&N>w.length){const W=m.slice(S+w.length,N),Z=c.push("math_block","math",0);Z.content=Va(W),Z.markup=w==="$$"?"$$":w==="["?"[]":"\\[\\]",Z.map=[l,l+1],Z.raw=`${w}${W}${E}`,Z.block=!0,Z.loading=!1,c.line=l+1;const ne=m.slice(N+E.length);return ne.trim()&&n(c,ne,l),!0}let D=l,T="",$=!1,O="",P=l;const R=A?m:m===w?"":m.slice(w.length),j=!f&&w==="\\["?"]":"",z=Od(R,k);if(z!==-1){const W=z;T=R.slice(0,W),O=R.slice(W+k.length),P=A?l+1:l,$=!0,D=P}else for(R&&!A&&(T=R),D=l+1;D<a;D++){const W=c.bMarks[D]+c.tShift[D],Z=c.eMarks[D],ne=c.src.slice(W,Z),X=ne.trim();if(!f&&w==="["&&X==="\\]"){k="\\]",$=!0;break}if(j&&ne.trim()===j){k=j,$=!0;break}if(X===k){$=!0;break}else if(!f&&w==="["&&ne.includes("\\]")){$=!0;const ue=ne.indexOf("\\]");k="\\]";const ie=ne.slice(0,ue);ie&&(T+=(T?` -`:"")+ie),O=ne.slice(ue+k.length),P=D;break}else if(Od(ne,k)!==-1){$=!0;const ue=Od(ne,k),ie=ne.slice(0,ue);ie&&(T+=(T?` -`:"")+ie),O=ne.slice(ue+k.length),P=D;break}T+=(T?` -`:"")+ne}if((!d||f)&&!$)return!1;const K=/^\s*!\[/.test(T);if(!(x?!K&&Y3(T):w==="$$"?!K:w==="["?bx(T):ou(T)))return!1;if(u)return!0;v&&n(c,v,l);const q=c.push("math_block","math",0);return q.content=Va(T),q.markup=w==="$$"?"$$":w==="["?"[]":"\\[\\]",q.raw=`${w}${T}${T.startsWith(` -`)?` -`:""}${k}`,q.map=[l,D+1],q.block=!0,q.loading=!$,c.line=D+1,O.trim()&&n(c,O,P),!0},o=(r,l,a,u)=>{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",i),e.block.ruler.before("lheading","explicit_math_block",o,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function Mde(e){const t=e.renderer.rules.image||function(n,i,s,o,r){const l=n,a=r;return a.renderToken?a.renderToken(l,i,s):""};e.renderer.rules.image=(n,i,s,o,r)=>{const l=n;return l[i].attrSet?.("loading","lazy"),t(l,i,s,o,r)},e.renderer.rules.fence=e.renderer.rules.fence||((n,i)=>{const s=n[i],o=String(s.info??"").trim();return`<pre class="${o?`language-${e.utils.escapeHtml(o.split(/\s+/g)[0])}`:""}"><code>${e.utils.escapeHtml(String(s.content??""))}</code></pre>`})}const Ide=/^<a[>\s]/i,Ede=/^<\/a\s*>/i;function Tde(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.test(String(e.content??""));let i=0;for(let s=n.length-1;s>=0;s--){const o=n[s];if(o?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==o.level&&n[s]?.type!=="link_open";)s--;continue}if(o?.type==="html_inline"){const r=String(o.content??"");Ide.test(r)&&i>0&&i--,Ede.test(r)&&i++}if(!(i>0)&&o?.type==="text"&&t.test(String(o.content??"")))return!0}return!1}function Lde(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(i=>i.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",i=>{if(!i.md?.options?.linkify)return;const s=Array.isArray(i.tokens)?i.tokens:[],o=i.md.linkify;if(!o)return;const r=s.filter(l=>Tde(l,o));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(i)),i,{tokens:r}))})}function Nde(e){const t=e.inline.ruler,n=t.getNamedRules?.(),i=n?.find(l=>l.name==="link")?.fn,s=n?.find(l=>l.name==="image")?.fn;if(typeof i!="function"||typeof s!="function")return;const o=e.validateLink,r=e;r.__markstreamOriginalValidateLink=o,t.at("link",(...l)=>{const a=l[0].md,u=a?.validateLink===o?a.options?.validateLink:a?.validateLink;if(!a||typeof u!="function")return i(...l);const c=a.validateLink;a.validateLink=u;try{return i(...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=o;try{return s(...l)}finally{a.validateLink=u}})}function Fde(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},i=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),o=new rue({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:i,...n}});if(!s){const r=l=>!Dc(l,{tagName:"a",attrName:"href"});Sce(r),o.set({validateLink:r})}return Nde(o),Lde(o),(e.enableMath??!0)&&Sde(o,{...e.mathOptions??{}}),(e.enableContainers??!0)&&Sue(o),e.enableFixIndentedCodeBlock!==!1&&Gue(o),Lce(o),$ce(o),Fce(o),Oce(o),Mde(o),Vue(o,{customHtmlTags:e.customHtmlTags}),o}function zc(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=>zc(n))),t}function Bde(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function $de(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,i=n===""||n==="true";return{type:"checkbox_input",checked:i,raw:i?"[x]":"[ ]"}}function Dde(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function U0(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="em_close";){const l=e[o];s+=String(e[o].content??l.text??""),r.push(e[o]),o++}return i.push(...Wi(r,void 0,void 0,n)),{node:{type:"emphasis",children:i,raw:`*${s}*`},nextIndex:o<e.length?o+1:e.length}}function zde(e,t){return new RegExp(`\r? -[ \\t]*${e}{${t},}[ \\t]*$`)}const kF=["diff ","index ","--- ","+++ ","@@ "],Rde=/\r?\n/;function Ode(e){const t=String(e??"");return t?kF.some(n=>n.startsWith(t)||t.startsWith(n)):!1}function _x(e,t,n,i){n.length>0&&e.push(...n),i.length>0&&t.push(...i),n.length=0,i.length=0}function Sx(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function Pde(e,t){const n=[],i=[],s=[],o=[],r=e.split(Rde),l=/\r?\n$/.test(e),a=r.some(p=>p.startsWith("diff ")||p.startsWith("--- ")||p.startsWith("+++ ")||p.startsWith("@@ ")),u=p=>{const g=p;if(!kF.some(m=>g.startsWith(m)))if(g.startsWith("-")){const m=g.slice(1);s.push(Sx(m,a))}else if(g.startsWith("+")){const m=g.slice(1);o.push(Sx(m,a))}else{_x(n,i,s,o);const m=a&&g.startsWith(" ")?g.slice(1):g;n.push(m),i.push(m)}},c=l?Math.max(0,r.length-1):r.length;for(let p=0;p<c;p++){const g=r[p]??"";!t&&!l&&p===c-1&&Ode(g)||u(g)}(t||s.length>0||o.length>0)&&_x(n,i,s,o);const d=n.join(` -`),f=i.join(` -`);return{original:t&&l&&d?`${d} -`:d,updated:t&&l&&f?`${f} -`:f}}function gb(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},i=typeof n.closed=="boolean"?n.closed:void 0,s=i===!0||i!==!1&&t,o=String(e.info??""),r=o.startsWith("diff"),l=r?(()=>{const u=o,c=u.indexOf(" ");return c===-1?"":String(u.slice(c+1)??"")})():o;let a=String(e.content??"");if(!s&&e.markup){const u=e.markup[0],c=e.markup.length,d=zde(u,c);d.test(a)&&(a=a.replace(d,""))}if(r){const{original:u,updated:c}=Pde(a,s===!0);return{type:"code_block",language:l,code:String(c??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t,originalCode:u,updatedCode:c}}return{type:"code_block",language:l,code:String(a??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t}}function jde(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function Hde(){return{type:"hardbreak",raw:`\\ -`}}function Wde(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="mark_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Wi(r,void 0,void 0,n)),{node:{type:"highlight",children:i,raw:`==${s}==`},nextIndex:o<e.length?o+1:e.length}}let Ey=null;const Ty=new WeakMap;function Mx(){return Ey||(Ey={customTagSet:null,allowedTagSet:Av()}),Ey}function AF(e){const t=e.match(/^<\s*(?:\/\s*)?([\w-]+)/);return t?t[1].toLowerCase():""}function CF(e){return/^<\s*\//.test(e)}function wF(e,t){return/\/\s*>\s*$/.test(t)||_u.has(e)}function qde(e){if(!e||e.length===0)return Mx();const t=Ty.get(e);if(t)return t;const n=e.map(Wr).filter(Boolean);if(!n.length){const s=Mx();return Ty.set(e,s),s}const i={customTagSet:new Set(n),allowedTagSet:Av({customHtmlTags:e})};return Ty.set(e,i),i}function xF(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function Ude(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,i=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof i=="string"?{raw:n,inner:i}:null}function qm(e,t){const n=t.toLowerCase();for(let i=e.length-1;i>=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function Kde(e,t,n){const i=e.slice();return qm(i,"href")||i.push(["href",t]),n!=null&&!qm(i,"title")&&i.push(["title",n]),i}function J3(e){return e.map(xF).join("")}function Lg(e){const t=[],n=i=>{const s=String(i??"");if(!s)return;const o=t[t.length-1];if(o?.type==="text"){o.content=`${o.content}${s}`,o.raw=`${o.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const i of e)if(i){if(i.type==="reference"||i.type==="footnote_reference"){n(String(i.raw??""));continue}if("children"in i&&Array.isArray(i.children)){t.push({...i,children:Lg(i.children)});continue}t.push(i)}return t}function Vde(e,t,n){let i=0;for(let s=t;s<e.length;s++){const o=e[s];if(o.type!=="html_inline")continue;const r=String(o.content??""),l=AF(r),a=CF(r),u=wF(l,r);if(!a&&!u&&l===n){i++;continue}if(a&&l===n){if(i===0)return s;i--}}return-1}function Ly(e,t,n){const i=[e[t]];let s=[],o=t+1,r=!1;const l=n?Vde(e,t+1,n):-1;return l!==-1?(s=e.slice(t+1,l),i.push(...s,e[l]),o=l+1,r=!0):(s=e.slice(t+1),s.length&&i.push(...s),o=e.length),{closed:r,html:J3(i),innerTokens:s,nextIndex:o}}function Zde(e,t,n,i,s,o,r){const l=String(e.content??""),a=AF(l),{customTagSet:u,allowedTagSet:c}=qde(r?.customHtmlTags);if(!a)return[{type:"inline_code",code:l,raw:l},n+1];if(!c.has(a)&&!Ly(t,n,a).closed){const x=xF(e);return[{type:"text",content:x,raw:x},n+1]}if(a==="br")return[{type:"hardbreak",raw:l},n+1];const d=CF(l),f=wF(a,l);if(d)return[{type:"html_inline",tag:a,content:l,children:[],raw:l,loading:!1},n+1];if(a==="a"){const x=Ly(t,n,a),S=vv(l),I=x.innerTokens,_=String(qm(S,"href")??""),E=qm(S,"title"),N=E==null?null:String(E),D=Kde(S,_,N),T=Lg(I.length?i(I,s,o,r):[]),$=I.length?J3(I):_||"";return!T.length&&$&&T.push({type:"text",content:$,raw:$}),[{type:"link",href:_,title:N,text:$,attrs:D,children:T,loading:!x.closed,raw:x.html||l},x.nextIndex]}if(f)return[{type:u?.has(a)?a:"html_inline",tag:a,content:l,children:[],raw:l,loading:!1},n+1];const p=Ly(t,n,a);if(a==="p"||a==="div")return[{type:"paragraph",children:Lg(p.innerTokens.length?i(p.innerTokens,s,o,r):[]),raw:p.html},p.nextIndex];const g=Lg(p.innerTokens.length?i(p.innerTokens,s,o,r):[]);let m=p.html||l,y=!p.closed,w=!1;if(!p.closed){const x=`</${a}>`;m.toLowerCase().includes(x.toLowerCase())||(m+=x),w=!0,y=!0}const k=[],A=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let v;for(;(v=A.exec(l))!==null;){const x=v[1],S=v[2]||v[3]||v[4]||"";k.push([x,S])}if(u?.has(a)){const x=Ude(e);return[{type:a,tag:a,attrs:k,content:x?x.inner:p.innerTokens.length?J3(p.innerTokens):"",children:p.innerTokens.length?i(p.innerTokens,s,o,r):[],raw:x?.raw??m,loading:e.loading||y,autoClosed:w},p.nextIndex]}return[{type:"html_inline",tag:a,attrs:k,content:m,children:g,raw:m,loading:y,autoClosed:w},p.nextIndex]}function _F(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=>_F(t)).join(""):String(e.content??"")}function Gde(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>_F(t)).join("")}function Ix(e,t=!1){let n=e.attrs??[],i=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,i=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),o=n.find(d=>d[0]==="alt")?.[1],r=Gde(i??e);let l="";r?l=r:o!=null&&String(o).length>0?l=String(o):i?.content!=null&&String(i.content).length>0?l=String(i.content):Array.isArray(i?.children)&&i.children[0]?.content?l=String(i.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 Qde(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function Yde(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="ins_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Wi(r,void 0,void 0,n)),{node:{type:"insert",children:i,raw:`++${String(s)}++`},nextIndex:o<e.length?o+1:e.length}}function Jde(e){const t=[];if(!Array.isArray(e))return t;for(const n of e){const i=n?.[0];i&&t.push([String(i),String(n?.[1]??"")])}return t}function Um(e,t){const n=t.toLowerCase();for(let i=e.length-1;i>=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function Xde(e,t,n){const i=e.slice();return Um(i,"href")||i.push(["href",t]),n!=null&&!Um(i,"title")&&i.push(["title",n]),i}function K0(e,t,n){const i=e[t],s=Jde(i.attrs),o=String(Um(s,"href")??""),r=Um(s,"title"),l=r==null?null:String(r),a=Xde(s,o,l);let u=t+1;const c=[];let d=!0;for(;u<e.length&&e[u].type!=="link_close";)c.push(e[u]),u++;e[u]?.type==="link_close"&&(d=!1);let f=c;const p=c[c.length-1];if(n?.__insideStrong&&p?.type==="text"&&String(p.content??"").endsWith("**")&&!c.some(y=>y.type==="strong_open")){const y=String(p.content??""),w=String(p.raw??y),k=zc(p);k.content=y.slice(0,-2),k.raw=w.replace(/\*\*$/,""),f=c.slice(),f[f.length-1]=k}const g=Wi(f,void 0,void 0,n),m=g.map(y=>{const w=y;return"content"in y?String(w.content??""):String(w.raw??"")}).join("");return{node:{type:"link",href:o,title:l,text:m,children:g,raw:`[${m}](${o}${l?` "${l}"`:""})`,loading:d,attrs:a},nextIndex:u<e.length?u+1:e.length}}function Ex(e){const t=e.content??"",n=e.raw==="$$"?`$${t}$`:e.raw||"";return{type:"math_inline",content:t,loading:!!e.loading,raw:n,markup:e.markup}}function efe(e){return{type:"reference",id:String(e.content??""),raw:String(e.markup??`[${e.content??""}]`)}}function Tx(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="s_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Wi(r,void 0,void 0,n)),{node:{type:"strikethrough",children:i,raw:`~~${s}~~`},nextIndex:o<e.length?o+1:e.length}}const tfe=/\\([\\()[\]`$|*_\-!])/g;function nfe(e,t){if(!e)return;const n=String(e);if(n&&(n===t||n.replace(tfe,"$1")===t))return n}function _1(e,t,n,i){const s=[];let o="",r=t+1;const l=[];let a=1;for(;r<e.length;){if(e[r].type==="strong_close"){if(a===1)break;a--}e[r].type==="strong_open"&&a++,o+=String(e[r].content??""),l.push(e[r]),r++}const u={...i,__insideStrong:!0};return s.push(...Wi(l,nfe(n,o),void 0,u)),{node:{type:"strong",children:s,raw:`**${String(o)}**`},nextIndex:r<e.length?r+1:e.length}}function ife(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="sub_close";)s+=String(e[o].content??""),r.push(e[o]),o++;i.push(...Wi(r,void 0,void 0,n));const l=String(e[t].content??""),a=s||l;return{node:{type:"subscript",children:i.length>0?i:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:o<e.length?o+1:e.length}}function sfe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="sup_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Wi(r,void 0,void 0,n)),{node:{type:"superscript",children:i.length>0?i:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:o<e.length?o+1:e.length}}function ofe(e){const t=String(e.content??"");return{type:"text",content:t,raw:t}}const rfe=/[^~]*~{2,}[^~]+/,lfe=/\*\*/,afe=/[[_*^~]/,ufe=/\\([\\()[\]`$|*_\-!])/g,mb=new Set(["\\","(",")","[","]","`","$","|","*","_","-","!"]),cfe=/\s/u,dfe=/[!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]/,ffe=/\p{P}/u,hfe=/^[\x22\x27《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,pfe=/^[\x22\x27》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,gfe=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,mfe=/:\/\//,X3=1,SF=2,vfe=4,yfe=8,MF=16,Ja=32,Ng=64,K1=128,IF=256,bfe=512,V1=1024,kfe=1982;function V0(e){let t=0;for(let n=0;n<e.length;n++)switch(e.charCodeAt(n)){case 33:t|=K1;break;case 36:t|=IF;break;case 40:t|=V1;break;case 42:t|=SF;break;case 91:t|=Ja;break;case 92:t|=X3;break;case 93:t|=Ng;break;case 95:t|=vfe;break;case 96:t|=MF;break;case 124:t|=bfe;break;case 126:t|=yfe;break}return t}function Afe(e){let t=0,n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="*"){n+=2;continue}e[n]==="*"&&t++,n++}return t}function EF(e,t=0){if(!e)return-1;let n=0;for(let i=0;i<e.length;i++){const s=e[i],o=e[i+1];if(s==="\\"&&o&&mb.has(o)){if(o==="*"&&n>=t){n++,i++;continue}n++,i++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function Su(e){return!!e&&cfe.test(e)}function Mu(e){return!!e&&(dfe.test(e)||ffe.test(e))}function TF(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&hfe.test(e)}function LF(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&pfe.test(e)}function Cfe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!i||Su(i)?!1:!(Mu(i)&&!TF(i,n)&&n&&!Su(n)&&!Mu(n))}function wfe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!n||Su(n)?!1:!(Mu(n)&&!LF(n,i)&&i&&!Su(i)&&!Mu(i))}function xfe(e,t,n=0){let i=n,s=!1;for(;i<t.length;){const o=e?EF(e,i):t.indexOf("*",i);if(o===-1)break;if(wfe(t,o))return{index:o,sawInvalidClose:s};s=!0,i=o+1}return{index:-1,sawInvalidClose:s}}function _fe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+2];return!i||Su(i)?!1:!(Mu(i)&&!TF(i,n)&&n&&!Su(n)&&!Mu(n))}function Sfe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+2];return!n||Su(n)?!1:!(Mu(n)&&!LF(n,i)&&i&&!Su(i)&&!Mu(i))}function Mfe(e,t=0){let n=t,i=!1;for(;n<e.length;){const s=e.indexOf("**",n);if(s===-1)break;if(Sfe(e,s))return{index:s,sawInvalidClose:i};i=!0,n=s+2}return{index:-1,sawInvalidClose:i}}function Ife(e){let t="",n=0;for(;n<e.length;){if(e[n]!=="\\"){t+=e[n],n++;continue}let i=0;for(;n+i<e.length&&e[n+i]==="\\";)i++;const s=e[n+i];if(t+="\\".repeat(Math.floor(i/2)),i%2===1){if(s&&mb.has(s)){t+=s,n+=i+1;continue}t+="\\"}n+=i}return t}function Efe(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i],o=e[i+1];if(s==="\\"&&o&&mb.has(o)){if(n===t)return i+1;n++,i++;continue}if(n===t)return i;n++}return-1}function Tfe(e,t,n){const i=Efe(e,t);if(i===-1||e[i]!==n)return!1;let s=0;for(let o=i-1;o>=0&&e[o]==="\\";o--)s++;return s%2===1}const Lfe=/[\p{L}\p{N}]/u,Nfe=/^[\p{L}\p{N}]+$/u;function e8(e){return e?Lfe.test(e):!1}function NF(e){return e?Nfe.test(e):!1}function gh(e,t){let n=t;for(;n<e.length&&e[n]==="*";)n++;const i=t>0?e[t-1]:void 0,s=n<e.length?e[n]:void 0;return{len:n-t,prev:i,next:s,intraword:e8(i)&&e8(s)}}function Ffe(e){const t=[];for(let n=0;n<e.length;){if(e[n]!=="*"){n++;continue}const i=gh(e,n),s=n+i.len;i.len>=2&&i.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n<t.length-1;n++){const i=t[n],s=t[n+1];if(!NF(e.slice(i.end,s.start)))return s.end}return-1}function Bfe(e){return!!e&&e.trim()===e&&/^[\p{L}\p{N}\s]+$/u.test(e)}function $fe(e,t){let n=t;for(;n<e.length;){const i=e.indexOf("***",n);if(i===-1)return-1;const s=gh(e,i);if(s.len>=3)return i;n=i+s.len}return-1}function Dfe(e){return e?gfe.test(e)||mfe.test(e):!1}function zfe(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function Wi(e,t,n,i){if(!e||e.length===0)return[];const s=i?.__linkifyDemotionContext,o=_p(t),r={filename:s?.filename||o.filename,explicitFilename:s?.explicitFilename||o.explicitFilename,marketTicker:s?.marketTicker||o.marketTicker};(r.filename||r.explicitFilename||r.marketTicker)&&(i={...i,__linkifyDemotionContext:r});const l=i,a=[];let u=null,c=0;const d=i?.requireClosingStrong,f=e;function p(){return e===f&&(e=e.slice()),e}function g(){u=null}function m(ee,ye){const H=e.length===1?t:String(ye.content??""),Y=[],ve=Ffe(ee);if(ve!==-1){x(ee.slice(0,ve),ee.slice(0,ve));const se=ee.slice(ve);return se&&(D({type:"text",content:se,raw:se}),c--),c++,!0}if(rfe.test(ee)){const se=ee.indexOf("~~");se!==-1&&Y.push({type:"strikethrough",index:se})}if(lfe.test(ee)){const se=ee.indexOf("**");se!==-1&&Y.push({type:"strong",index:se})}if(/[^*]*\*[^*]+/.test(ee)){const se=H?EF(H,0):ee.indexOf("*");if(H&&se===-1)return!1;se!==-1&&Y.push({type:"emphasis",index:se})}Y.sort((se,U)=>se.index!==U.index?se.index-U.index:se.type===U.type?0:se.type==="strong"?-1:U.type==="strong"?1:0);const re=Y[0];if(!re)return!1;if(re.type==="strikethrough"){const se=re.index,U=se>-1?ee.slice(0,se):"";if(U&&x(U,U),se===-1)return c++,!0;const J=ee.indexOf("~~",se+2),ce=J===-1?ee.slice(se+2):ee.slice(se+2,J),ge=J===-1?"":ee.slice(J+2),{node:Me}=Tx([{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,i);return g(),v(Me),ge&&(D({type:"text",content:ge,raw:ge}),c--),c++,!0}if(re.type==="strong"){const se=re.index,U=se>-1?ee.slice(0,se):"";if(U&&x(U,U),se===-1)return c++,!0;if(t&&se===0){let ke=!1,Le=0;for(;Le<ee.length&&ee[Le]==="*";)Le++;if(t.startsWith("\\*")&&(ke=!0),ke){let it=0,Fe=0;for(;Fe<t.length&&it<Le;)if(t[Fe]==="\\"&&Fe+1<t.length&&t[Fe+1]==="*")it+=1,Fe+=2;else{if(t[Fe]==="*")break;Fe++}if(it>=2)return x(ee,ee),c++,!0}}if(t&&(ee.match(/\*/g)||[]).length>Afe(t))return x(ee.slice(U.length),ee.slice(U.length)),c++,!0;const J=gh(ee,se);if(J.len>=3){const ke=$fe(ee,se+J.len);if(ke!==-1){const Le=ee.slice(se+J.len,ke);if(Bfe(Le)){const{node:it}=_1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Le,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,i);g(),v(it);const Fe=ee.slice(ke+3);return Fe&&(D({type:"text",content:Fe,raw:Fe}),c--),c++,!0}}}if(!_fe(ee,se)){const ke=ee.slice(se,se+J.len);x(ke,ke);const Le=ee.slice(se+J.len);return Le&&(D({type:"text",content:Le,raw:Le}),c--),c++,!0}const ce=Mfe(ee,se+2);let ge="",Me="";if(ce.index!==-1){ge=ee.slice(se+2,ce.index),Me=ee.slice(ce.index+2);const ke=ce.index,Le=gh(ee,ke);if(J.intraword&&Le.intraword&&!NF(ge)||!ge&&J.len>=4&&J.intraword)return x(ee.slice(U.length),ee.slice(U.length)),c++,!0}else{if(d||ce.sawInvalidClose||J.intraword)return x(ee.slice(U.length),ee.slice(U.length)),c++,!0;ge=ee.slice(se+2),Me=""}if(!ge&&/^\*+$/.test(Me))return x(ee,ee),c++,!0;const{node:Pe}=_1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:ge,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,i);return g(),v(Pe),Me&&(D({type:"text",content:Me,raw:Me}),c--),c++,!0}if(re.type==="emphasis"){let se=re.index;se===-1&&(se=0);const U=ee.slice(0,se);if(U&&x(U,U),!Cfe(ee,se)){x(ee[se],ee[se]);const ke=ee.slice(se+1);return ke&&(D({type:"text",content:ke,raw:ke}),c--),c++,!0}const J=gh(ee,se),ce=xfe(H,ee,se+1),ge=ce.index,Me=e[c+1];if(i?.final&&Me?.type==="em_open"&&ge!==-1&&ee.slice(se+1,ge).trim()!==ee.slice(se+1,ge)||ge===-1&&(ce.sawInvalidClose||i?.final||J.intraword||!e8(ee[se+1])))return x(ee.slice(se),ee.slice(se)),c++,!0;const{node:Pe}=U0([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:ge>-1?ee.slice(se+1,ge):ee.slice(se+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,i);if(g(),v(Pe),ge!==-1&&ge<ee.length-1){const ke=ee.slice(ge+1);ke&&(D({type:"text",content:ke,raw:ke}),c--)}return c++,!0}return!1}function y(ee,ye){if(!ee.includes("`"))return!1;const Y=(Me=>{for(let Pe=0;Pe<Me.length;Pe++){if(Me[Pe]!=="`")continue;let ke=0;for(let Le=Pe-1;Le>=0&&Me[Le]==="\\";Le--)ke++;if(ke%2===0)return Pe}return-1})(ee);if(Y===-1)return!1;let ve=1;for(let Me=Y+1;Me<ee.length&&ee[Me]==="`";Me++)ve++;const re="`".repeat(ve),se=Y+ve,U=ee.indexOf(re,se);if(U===-1){if(ve===1){const Pe=ee.slice(0,Y),ke=ee.slice(Y+1);return Pe&&(m(Pe,ye)?c--:x(Pe,Pe)),k({type:"inline_code",code:ke,raw:String(ke)}),c++,!0}let Me=ee;for(let Pe=c+1;Pe<e.length;Pe++)Me+=String((e[Pe].content??"")+(e[Pe].markup??""));return c=e.length-1,x(Me,Me),c++,!0}g();const J=ee.slice(0,Y),ce=ee.slice(Y+ve,U),ge=ee.slice(U+ve);return J&&(m(J,ye)?c--:x(J,J)),k({type:"inline_code",code:ce,raw:String(ce??"")}),ge&&(D({type:"text",content:ge,raw:ge}),c--),c++,!0}function w(ee){const ye=l?.__markdownIt;if(!ye||e.length<=1||!e.some(re=>re?.type==="math_inline")||!afe.test(ee))return null;const H=ye.parseInline(ee,{__markstreamFinal:!!i?.final});if(!Array.isArray(H)||H.length===0)return null;const Y=(H.find(re=>re?.type==="inline")?.children??[]).filter(re=>!(re?.type==="text"&&String(re.content??"")===""));if(!Y.length||!Y.some(re=>re?.type!=="text")||Y.length===1&&Y[0]?.type==="text"&&String(Y[0].content??"")===ee)return null;const ve=Wi(Y,ee,n,i);return ve.length?ve:null}function k(ee){g(),a.push(ee)}function A(ee){g();const ye=zc(ee);a.push(ye)}function v(ee){k(ee)}function x(ee,ye){u?(u.content+=ee,u.raw+=ye??ee):(u={type:"text",content:String(ee??""),raw:String(ye??ee??"")},a.push(u))}function S(ee,ye){if(!ee)return;const H=Wi([{...ye,type:"text",content:ee,raw:ee}],ee,n,i);if(H.length===1&&H[0]?.type==="text"){const Y=H[0];x(String(Y.content??""),String(Y.raw??Y.content??""));return}for(const Y of H)v(Y)}function I(ee,ye){return String(ee.markup??"").startsWith(ye)}function _(ee){if(!u||ee.loading!==!0||ee.markup!=="\\(\\)")return;const ye=e[c-1];!ye||ye.type!=="text"||!I(ye,"\\(")||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 E(ee){return ee.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 N(ee,ye,H=V0(ee)){let Y=ee;const ve=String(ye.content??"");return(H&X3)!==0&&Y.endsWith("\\")&&!I(ye,"\\\\")&&!ve.endsWith("\\\\")&&(Y=Y.slice(0,-1)),(H&V1)!==0&&Y.endsWith("(")&&!I(ye,"\\(")&&!ve.endsWith("\\(")&&(Y=Y.slice(0,-1)),(H&SF)!==0&&/\*+$/.test(Y)&&!I(ye,"\\*")&&!ve.endsWith("\\*")&&(Y=Y.replace(/\*+$/,"")),Y}for(;c<e.length;){const ee=e[c];D(ee)}function D(ee){switch(ee.type){case"text":$(ee);break;case"softbreak":u?(u.content+=` -`,u.raw+=` -`):(u={type:"text",content:` -`,raw:` -`},a.push(u)),c++;break;case"code_inline":v(Qde(ee)),c++;break;case"html_inline":{const[ye,H]=Zde(ee,e,c,Wi,t,n,i);v(ye),c=H;break}case"link_open":O(ee);break;case"image":X(ee)||(g(),v(Ix(ee)),c++);break;case"strong_open":{g();const{node:ye,nextIndex:H}=_1(e,c,ee.content,i);v(ye),c=H;break}case"em_open":{g();const{node:ye,nextIndex:H}=U0(e,c,i);v(ye),c=H;break}case"s_open":{g();const{node:ye,nextIndex:H}=Tx(e,c,i);v(ye),c=H;break}case"mark_open":{g();const{node:ye,nextIndex:H}=Wde(e,c,i);v(ye),c=H;break}case"ins_open":{g();const{node:ye,nextIndex:H}=Yde(e,c,i);v(ye),c=H;break}case"sub_open":{g();const{node:ye,nextIndex:H}=ife(e,c,i);v(ye),c=H;break}case"sup_open":{g();const{node:ye,nextIndex:H}=sfe(e,c,i);v(ye),c=H;break}case"sub":g(),v({type:"subscript",children:[{type:"text",content:String(ee.content??""),raw:String(ee.content??"")}],raw:`~${String(ee.content??"")}~`}),c++;break;case"sup":g(),v({type:"superscript",children:[{type:"text",content:String(ee.content??""),raw:String(ee.content??"")}],raw:`^${String(ee.content??"")}^`}),c++;break;case"emoji":{g();const ye=e[c-1];ye?.type==="text"&&/\|:-+/.test(String(ye.content??""))?x("",""):v(Dde(ee)),c++;break}case"checkbox":g(),v(Bde(ee)),c++;break;case"checkbox_input":g(),v($de(ee)),c++;break;case"footnote_ref":g(),v(jde(ee)),c++;break;case"footnote_anchor":{g();const ye=ee.meta??{};k({type:"footnote_anchor",id:String(ye.label??ee.content??""),raw:String(ee.content??"")}),c++;break}case"hardbreak":g(),v(Hde()),c++;break;case"fence":g(),v(gb(e[c])),c++;break;case"math_inline":_(ee),g(),!ee.content&&ee.markup==="$"&&e[c+1]?.type==="text"&&e[c+2]?.type==="math_inline"?(v(Ex({...ee,content:e[c+1].content})),c+=2):v(Ex(ee)),c++;break;case"reference":R(ee);break;case"text_special":x(String(ee.content??""),String(ee.content??"")),c++;break;default:{const ye=ee;if(ee.type==="link"&&ye.href!=null&&i?.validateLink&&!i.validateLink(String(ye.href))){g();const H=String(ye.text??"");x(H,H),c++}else ue(ee)||z(ee)||q(ee)||j(ee)||A(ee),c++;break}}}function T(ee,ye,H,Y,ve=V0(ee)){const re=ofe({...ye,content:ee});if(u){u.content+=i?.final?re.content:N(re.content,ye,ve),u.raw+=re.raw;return}const se=H?.tag==="br"&&e[c-2]?.content==="[";Y||(re.content=i?.final?re.content:N(re.content,ye,ve)),u=re,u.center=se,a.push(u)}function $(ee){const ye=String(ee.content??""),H=V0(ye),Y=(H&X3)!==0,ve=e.length===1&&Y&&typeof t=="string"?String(t):"";let re=ve?Ife(ve):Y?ye.replace(ufe,"$1"):ye;const se=re===ye?H:V0(re);if(ee.content==="<"||re==="1"&&e[c-1]?.tag==="br"){c++;return}const U=(se&IF)!==0?re.indexOf("$"):-1;U!==-1&&U===re.lastIndexOf("$")&&re.endsWith("$")&&(re=re.slice(0,-1)),re.endsWith("undefined")&&!t?.endsWith("undefined")&&(re=re.slice(0,-9));let J=a.length,ce="";for(let ke=a.length-1;ke>=0;ke--){const Le=a[ke];if(Le.type!=="text")break;J=ke,ce=String(Le.content??"")+ce}J<a.length&&(re.startsWith(ce)?(u=null,a.length=J):u=a[a.length-1]);const ge=e[c+1];if((re==="`"||re==="|"||re==="$")&&!I(ee,`\\${re}`)||/^\*+$/.test(re)&&!I(ee,"\\*")){c++;return}if(!ge&&i?.final!==!0&&(se&V1)!==0&&/[^\]]\s*\(\s*$/.test(re)&&(re=re.replace(/\(\s*$/,"")),!re){c++;return}if((se&(Ja|K1))===(Ja|K1)&&ne(re)||(se&(Ng|V1))===(Ng|V1)&&ie(re))return;if((se&kfe)===0){T(re,ee,e[c-1],ge,se),c++;return}if((se&Ja)!==0&&Ne(re))return;const Me=e[c-1];if((se&Ja)!==0&&re==="["&&!ge?.markup?.includes("*")&&!I(ee,"\\[")||(se&Ng)!==0&&re==="]"&&!Me?.markup?.includes("*")&&!I(ee,"\\]")){c++;return}if((se&MF)!==0&&y(ye,ee)||(se&(K1|Ja))===(K1|Ja)&&pe(re)||(se&Ja)!==0&&(e[c+1]?.type!=="link_open"||E(re))&&fe(re,ee))return;const Pe=w(ye);if(Pe){g();for(const ke of Pe)v(ke);c++;return}m(re,ee)||(T(re,ee,Me,ge,se),c++)}function O(ee){if(P(ee))return;if(Se()){const{node:J,nextIndex:ce}=K0(e,c,i),ge=String(J.text||J.href||"");x(ge,ge),c=ce;return}g();const ye=c,{node:H,nextIndex:Y}=K0(e,c,i);c=Y;const ve=H.text||H.href||"";if(ee.markup==="linkify"&&!oF(ve,H.href,t)&&jm(ve,l?.__linkifyDemotionContext)){x(ve,ve);return}const re=H.children.length===1&&H.children[0]?.type==="text";if(H.loading&&t&&H.text===H.href&&re){const J=zfe(t,H.href);J&&(H.text=J,H.children=[{type:"text",content:J,raw:J}],H.raw=`[${J}](${H.href}${H.title?` "${H.title}"`:""})`)}if(i?.validateLink&&!i.validateLink(H.href)){x(H.text,H.text);return}const se=ee.attrs?.find(([J])=>J==="href")?.[1],U=String(se??"");if(t&&U){const J=t.indexOf("](");if(J!==-1){const ce=t.indexOf(")",J+2);ce===-1?H.loading=!0:H.loading&&t.slice(J+2,ce).includes(U)&&(H.loading=!1)}}/^file:\/\/\/[a-z]:\//i.test(H.href)&&q(H,ye-1)||j(H)||k(H)}function P(ee){if(ee.markup!=="linkify")return!1;const{node:ye,nextIndex:H}=K0(e,c,i);return K(ye,H)?(c=H,!0):!1}function R(ee){g(),v(efe(ee)),c++}function j(ee){if(ee.type!=="link")return!1;const ye=a[a.length-1];if(!ye||ye.type!=="text")return!1;const H=String(ye.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!H)return!1;const Y=ee,ve=String(Y.href??""),re=String(Y.text??""),se=String(H[2]??""),U=ve.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!ve||!(re===ve||re===U||Dfe(re)))return!1;const J=String(H[1]??"");return J?(ye.content=J,ye.raw=J):a.pop(),k({...ee,text:se,children:[{type:"text",content:se,raw:se}],raw:`[${se}](${ve}${Y.title?` "${Y.title}"`:""})`}),!0}function z(ee){if(ee.type!=="link")return!1;const ye=ee,H=String(ye.href??"");return H?K({href:H,title:ye.title==null||ye.title===""?null:String(ye.title),loading:!!ye.loading},c+1):!1}function K(ee,ye){const H=a[a.length-1];if(H?.type!=="image"||H.src||!H.loading||!String(H.raw??"").endsWith("]("))return!1;const Y=e[ye],ve=String(Y?.content??"");if(Y?.type!=="text"||!ve.startsWith(")"))return!1;a.pop(),u=null;const re=String(H.alt??"");k({type:"image",src:ee.href,alt:re,title:ee.title,raw:`![${re}](${ee.href}${ee.title?` "${ee.title}"`:""})`,loading:!!ee.loading});const se=ve.slice(1),U=zc(Y);return U.content=se,U.raw=se,p()[ye]=U,!0}function q(ee,ye=c-1){if(ee.type!=="link")return!1;const H=a[a.length-1],Y=e[ye];if(!H||H.type!=="text"||Y?.type!=="text")return!1;const ve=String(H.content??""),re=String(Y.content??"");if(!ve.endsWith("!")||!re.endsWith("!")||I(Y,"\\!"))return!1;const se=ve.slice(0,-1);se?(H.content=se,H.raw=se,u=H):(a.pop(),u=null);const U=ee,J=String(U.text??U.children?.map(Me=>String(Me?.content??Me?.raw??"")).join("")??""),ce=String(U.href??""),ge=U.title==null||U.title===""?null:String(U.title);return k({type:"image",src:ce,alt:J,title:ge,raw:`![${J}](${ce}${ge?` "${ge}"`:""})`,loading:!!U.loading}),!0}function W(ee,ye="",H=null){const Y=String(ee.alt??ee.raw??"");return{type:"link",href:ye,title:H,text:Y,children:[ee],raw:`[${Y}](${ye}${H?` "${H}"`:""})`,loading:!0}}function Z(ee){const ye=ee.startsWith("![")?ee:`![${ee}`,H=ye.slice(2),Y=H.indexOf("](");return{type:"image",src:"",alt:Y===-1?H.replace(/\]$/,""):H.slice(0,Y),title:null,raw:ye,loading:!0}}function ne(ee){const ye=ee.indexOf("[![");if(ye===-1||typeof t=="string"&&e.length===1&&Tfe(t,ye,"["))return!1;const H=ee.slice(0,ye);return H&&x(H,H),k(W(Z(ee.slice(ye+1)))),c++,!0}function X(ee){if(i?.final)return!1;const ye=e[c-1];if(ye?.type!=="text"||!String(ye.content??"").endsWith("[")||I(ye,"\\["))return!1;const H=a[a.length-1];if(H?.type==="text"&&H.content.endsWith("[")){const Y=H.content.slice(0,-1);Y?(H.content=Y,H.raw=Y,u=H):(a.pop(),u=null)}return k(W(Ix(ee))),c++,!0}function ue(ee){if(ee.type!=="link")return!1;const ye=ee,H=String(ye.raw??""),Y=String(ye.text??"");if(!H.startsWith("[![")&&!Y.startsWith("!["))return!1;const ve=ye.title==null||ye.title===""?null:String(ye.title);return k(W({type:"image",src:String(ye.href??""),alt:Y.replace(/^!\[/,"").replace(/\]$/,""),title:ve,raw:H.startsWith("[![")?H.slice(1):H,loading:!0})),!0}function ie(ee){if(!ee.startsWith("]("))return!1;const ye=e[c-2];if(ye?.type==="text"&&String(ye.content??"").endsWith("[")&&I(ye,"\\["))return!1;const H=a[a.length-1];if(H?.type!=="image"&&H?.type!=="link")return!1;const Y=H,ve=H?.type==="link"&&Array.isArray(Y.children)&&Y.children.length===1&&Y.children[0]?.type==="image"?a.pop():null,re=ve?ve.children[0]:a.pop();if(!re||re.type!=="image")return!1;const se=e[c+1];let U=String(ve?.href??""),J=ve?.title==null?null:String(ve.title),ce=!0;if(se?.type==="link_open"){const{node:Me,nextIndex:Pe}=K0(e,c+1,i);U=Me.href,J=Me.title,ce=!0,c=Pe}else{if(U=ee.slice(2),U.includes('"')){const Me=U.split('"');U=String(Me[0]??"").trim(),J=Me[1]==null?null:String(Me[1]).trim()}c++}const ge=W(re,U,J);return ge.loading=ce,k(ge),!0}function Se(){const ee=e[c-3];return e[c-2]?.type==="image"&&e[c-1]?.type==="text"&&String(e[c-1].content??"")==="]("&&ee?.type==="text"&&String(ee.content??"").endsWith("[")&&I(ee,"\\[")}function fe(ee,ye){const H=ee.indexOf("[");if(H===-1)return!1;let Y=ee.slice(0,H);const ve=ee.indexOf("](",H);if(ve!==-1){const re=e[c+2];let se=ee.slice(H+1,ve);if(se.includes("[")){const ke=se.indexOf("[");Y+=ee.slice(0,H+ke+1);const Le=H+ke+1;se=ee.slice(Le+1,ve)}const U=e[c+1];if(ee.endsWith("](")&&U?.type==="link_open"&&re){const ke=e[c+4];let Le=4,it=!0;if(ke?.type==="text"){const De=String(ke.content??"");if(De.startsWith(")")){it=!1;const Ke=De.slice(1);if(Ke){const gt=zc(ke);gt.content=Ke,gt.raw=Ke,p()[c+4]=gt}else Le++}else De==="."&&Le++}S(Y,ye);const Fe=String(re.content??"");return i?.validateLink&&!i.validateLink(Fe)?x(se,se):k({type:"link",href:Fe,title:null,text:se,children:[{type:"text",content:se,raw:se}],loading:it}),c+=Le,!0}const J=ee.indexOf(")",ve),ce=J!==-1?ee.slice(ve+2,J):"",ge=J===-1;let Me=Y.match(/\*+$/);if(Me&&(Y=Y.replace(/\*+$/,"")),S(Y,ye),Me||(Me=se.match(/^\*+/)),!d&&Me){const ke=Me[0].length;se=se.replace(/^\*+/,"").replace(/\*+$/,"");const Le=[];if(ke===1?Le.push({type:"em_open",tag:"em",nesting:1}):ke===2?Le.push({type:"strong_open",tag:"strong",nesting:1}):ke===3&&(Le.push({type:"strong_open",tag:"strong",nesting:1}),Le.push({type:"em_open",tag:"em",nesting:1})),Le.push({type:"link",href:ce,title:null,text:se,children:[{type:"text",content:se,raw:se}],loading:ge}),ke===1){Le.push({type:"em_close",tag:"em",nesting:-1});const{node:it}=U0(Le,0,i);v(it)}else if(ke===2){Le.push({type:"strong_close",tag:"strong",nesting:-1});const{node:it}=_1(Le,0,void 0,i);v(it)}else if(ke===3){Le.push({type:"em_close",tag:"em",nesting:-1}),Le.push({type:"strong_close",tag:"strong",nesting:-1});const{node:it}=_1(Le,0,void 0,i);v(it)}else{const{node:it}=U0(Le,0,i);v(it)}}else i?.validateLink&&!i.validateLink(ce)?x(se,se):k({type:"link",href:ce,title:null,text:se,children:[{type:"text",content:se,raw:se}],loading:ge});const Pe=J!==-1?ee.slice(J+1):"";return Pe&&(D({type:"text",content:Pe,raw:Pe}),c--),c++,!0}return!1}function pe(ee){const ye=ee.indexOf("![");if(ye===-1)return!1;const H=ee.slice(0,ye);return H&&!u?u={type:"text",content:H,raw:H}:H&&u&&(u.content+=H),u&&(a.push(u),u=null),k(Z(ee.slice(ye))),c++,!0}function Ne(ee){if(!(ee?.startsWith("[")&&n?.type==="list_item_open"))return!1;const ye=ee.slice(1).match(/[^\s\]]/);if(ye===null)return c++,!0;if(ye&&/x/i.test(ye[0])){const H=ye[0]==="x"||ye[0]==="X";return k({type:"checkbox_input",checked:H,raw:H?"[x]":"[ ]"}),c++,!0}return!1}return a}function vb(e,t,n){const i=n?.__sourceLineMapper;if(!i)return{startLine:e,endLine:t};const s=i(e),o=t>e?i(t-1).endLine:i(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,o)}}function Lx(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let i=0;for(let s=0;s<n;s++)e[s]===` -`&&i++;return i}function Rfe(e,t,n){const i=Math.max(0,Math.min(e.length,Math.trunc(t))),s=Math.max(i,Math.min(e.length,Math.trunc(n))),o=Lx(e,i);let r=Lx(e,s);return s>i&&e[s-1]!==` -`&&r++,{startLine:o,endLine:r}}function ip(e,t,n,i){const s=Rfe(e,t,n);return vb(s.startLine,s.endLine,i)}function Ofe(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const i=Number(n[0]),s=Number(n[1]);return!Number.isFinite(i)||!Number.isFinite(s)?null:vb(i,s,t)}function Zn(e,t,n){if(!n?.includeSourceMap)return e;const i=Ofe(t,n);if(!i)return e;if(e.sourceMap=i,e.type==="code_block"){const s=e;s.startLine=i.startLine,s.endLine=i.endLine}return e}function Pfe(e,t,n,i){if(!i?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const o=Number(s[0]),r=Number(s[1]),l=Number(n);return!Number.isFinite(o)||!Number.isFinite(r)||!Number.isFinite(l)||(e.sourceMap=vb(o,Math.max(r,l),i)),e}function jfe(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??""),r=o.replace(/[ \t\r\n]+$/g,"");if(r===o)break;if(r){s.content=r;break}i.pop();continue}break}}function Hfe(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 i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(o)){i.pop();continue}const r=o.replace(/[ \t\r\n\d.)]+$/g,"");r!==o&&(r?s.content=r:i.pop())}break}}function Wfe(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function qf(e,t,n){const i=e[t],s=[],o=Pu(n,!0);let r=t+1;for(;r<e.length&&e[r].type!=="bullet_list_close"&&e[r].type!=="ordered_list_close";)if(e[r].type==="list_item_open"){const a=[];let u=r+1;for(;u<e.length&&e[u].type!=="list_item_close";)if(e[u].type==="paragraph_open"){const d=e[u+1],f=Wfe(d)?zc(d):d,p=e[u-1];f!==d&&(Hfe(f),jfe(f));const g=String(f.content??""),m={type:"paragraph",children:Wi(f.children||[],g,p,o.options()),raw:g};n?.includeSourceMap&&Zn(m,e[u],n),a.push(m),o.remember(g),u+=3}else if(e[u].type==="blockquote_open"){const[d,f]=Uf(e,u,o.options());a.push(d),o.remember(d.raw),u=f}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[d,f]=qf(e,u,o.options());a.push(d),o.remember(d.raw),u=f}else{const d=bb(e,u,o.options(),yb);d?(a.push(d[0]),o.remember(d[0].raw),u=d[1]):u+=1}const c={type:"list_item",children:a,raw:a.map(d=>d.raw).join("")};n?.includeSourceMap&&Zn(c,e[r],n),s.push(c),r=u+1}else r+=1;const l={type:"list",ordered:i.type==="ordered_list_open",start:(()=>{if(i.attrs&&i.attrs.length){const a=i.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&&Zn(l,i,n),[l,r+1]}function qfe(e,t,n,i){const s=String(n[1]??"note"),o=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=Pu(i,!0);let a=t+1;for(;a<e.length&&e[a].type!=="container_close";)if(e[a].type==="paragraph_open"){const u=e[a+1];if(u){const c={type:"paragraph",children:Wi(u.children||[],String(u.content??""),void 0,l.options()),raw:String(u.content??"")};i?.includeSourceMap&&Zn(c,e[a],i),r.push(c),l.remember(c.raw)}a+=3}else if(e[a].type==="bullet_list_open"||e[a].type==="ordered_list_open"){const[u,c]=qf(e,a,l.options());i?.includeSourceMap&&Zn(u,e[a],i),r.push(u),l.remember(u.raw),a=c}else if(e[a].type==="blockquote_open"){const[u,c]=Uf(e,a,l.options());i?.includeSourceMap&&Zn(u,e[a],i),r.push(u),l.remember(u.raw),a=c}else{const u=yv(e,a,l.options());u?(r.push(u[0]),l.remember(u[0].raw),a=u[1]):a++}return[{type:"admonition",kind:s,title:o,children:r,raw:`:::${s} ${o} -${r.map(u=>u.raw).join(` -`)} -:::`},a+1]}const Ufe=new Set(["warning","info","note","tip","danger","caution"]);function Kfe(e){let t=0;for(;t<e.length&&t<3&&e[t]===":";)t++;if(t===0||e[t]===":")return null;const n=e.slice(t).trimStart();if(!n)return null;const i=n.search(/\s/),s=(i===-1?n:n.slice(0,i)).toLowerCase();return Ufe.has(s)?{kind:s,title:i===-1?"":n.slice(i).trim()}:null}function Vfe(e,t,n){const i=e[t];let s="note",o="";const r=i.type.match(/^container_(\w+)_open$/);if(r){s=r[1];const d=String(i.info??"").trim();if(d&&!d.startsWith(":::")&&d.toLowerCase().startsWith(s)){const f=d.slice(s.length).trim();f&&(o=f)}}else{const d=Kfe(String(i.info??"").trim());d&&(s=d.kind,o=d.title)}o||(o=s.charAt(0).toUpperCase()+s.slice(1));const l=[],a=Pu(n,!0);let u=t+1;const c=new RegExp(`^container_${s}_close$`);for(;u<e.length&&e[u].type!=="container_close"&&!c.test(e[u].type);)if(e[u].type==="paragraph_open"){const d=e[u+1];if(d){const f=d.children||[];let p=-1;for(let m=f.length-1;m>=0;m--){const y=f[m];if(y.type==="text"&&/:+/.test(y.content)){p=m;break}}const g={type:"paragraph",children:Wi((p!==-1?f.slice(0,p):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&Zn(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]=qf(e,u,a.options());n?.includeSourceMap&&Zn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else if(e[u].type==="blockquote_open"){const[d,f]=Uf(e,u,a.options());n?.includeSourceMap&&Zn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else{const d=yv(e,u,a.options());d?(l.push(d[0]),a.remember(d[0].raw),u=d[1]):u++}return[{type:"admonition",kind:s,title:o,children:l,raw:`:::${s} ${o} -${l.map(d=>d.raw).join(` -`)} -:::`},u+1]}const Zfe=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function Gfe(e,t,n){const i=e[t];if(i.type!=="container_open")return null;const s=Zfe.exec(String(i.info??""));return s?qfe(e,t,s,n):null}const yb={parseContainer:(e,t,n)=>Vfe(e,t,n),matchAdmonition:Gfe};function Uf(e,t,n){const i=[],s=Pu(n,!0);let o=t+1;for(;o<e.length&&e[o].type!=="blockquote_close";){const l=e[o];switch(l.type){case"paragraph_open":{const a=e[o+1],u={type:"paragraph",children:Wi(a.children||[],String(a.content??""),void 0,s.options()),raw:String(a.content??"")};n?.includeSourceMap&&Zn(u,l,n),i.push(u),s.remember(u.raw),o+=3;break}case"bullet_list_open":case"ordered_list_open":{const[a,u]=qf(e,o,s.options());i.push(a),s.remember(a.raw),o=u;break}case"blockquote_open":{const[a,u]=Uf(e,o,s.options());i.push(a),s.remember(a.raw),o=u;break}default:{const a=bb(e,o,s.options(),yb);a?(i.push(a[0]),s.remember(a[0].raw),o=a[1]):o++;break}}}const r={type:"blockquote",children:i,raw:i.map(l=>l.raw).join(` -`)};return n?.includeSourceMap&&Zn(r,e[t],n),[r,o+1]}function Qfe(e){if(e.info?.startsWith("diff"))return gb(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let i=t;n?.[1]&&(i=t.replace(/<antArtifact[^>]*>/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:i,raw:i,loading:!s}}function Yfe(e,t,n){const i=[];let s=t+1,o=[],r=[];const l=Pu(n,!0);for(;s<e.length&&e[s].type!=="dl_close";)if(e[s].type==="dt_open"){const a=e[s+1];o=Wi(a.children||[],void 0,void 0,l.options()),l.remember(o.map(u=>u.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(r=[];a<e.length&&e[a].type!=="dd_close";)if(e[a].type==="paragraph_open"){const u=e[a+1];r.push({type:"paragraph",children:Wi(u.children||[],String(u.content??""),void 0,l.options()),raw:String(u.content??"")}),l.remember(String(u.content??"")),a+=3}else a++;o.length>0&&(i.push({type:"definition_item",term:o,definition:r,raw:`${o.map(u=>u.raw).join("")}: ${r.map(u=>u.raw).join(` -`)}`}),o=[]),s=a+1}else s++;return[{type:"definition_list",items:i,raw:i.map(a=>a.raw).join(` -`)},s+1]}function Jfe(e,t,n){const i=e[t].meta??{},s=String(i?.label??"0"),o=[],r=Pu(n,!0);let l=t+1;for(;l<e.length&&e[l].type!=="footnote_close";)if(e[l].type==="paragraph_open"){const a=e[l+1],u=a.children?[...a.children]:[];e[l+2].type==="footnote_anchor"&&u.push(e[l+2]);const c={type:"paragraph",children:Wi(u,String(a.content??""),void 0,r.options()),raw:String(a.content??"")};o.push(c),r.remember(c.raw),l+=3}else l++;return[{type:"footnote",id:s,children:o,raw:`[^${s}]: ${o.map(a=>a.raw).join(` -`)}`},l+1]}function Xfe(e,t,n){const i=e[t],s=i.attrs,o=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(i.tag?.substring(1)??"1"),l=Number.parseInt(r,10),a=e[t+1],u=String(a.content??"");return{type:"heading",level:l,text:u,...o?{attrs:o}:{},children:Wi(a.children||[],u,void 0,n),raw:u}}function e1e(e,t,n){const i=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${i}(?=\s|>|/)`,"i"),o=new RegExp(String.raw`^<\s*\/\s*${i}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l<e.length;){const a=e.indexOf("<",l);if(a===-1)return-1;const u=e.slice(a);if(o.test(u)){const c=Xi(u);if(c===-1)return-1;if(r===0)return a+c+1;r--,l=a+c+1;continue}if(s.test(u)){const c=Xi(u);if(c===-1)return-1;const d=u.slice(0,c+1);/\/\s*>$/.test(d)||r++,l=a+c+1;continue}l=a+1}return-1}function FF(e){const t=String(e.content??"");if(/^\s*<!--/.test(t)||/^\s*<!/.test(t)||/^\s*<\?/.test(t))return{type:"html_block",content:t,raw:t,tag:"",loading:!1};const n=(t.match(/^\s*<([A-Z][\w:-]*)/i)?.[1]||"").toLowerCase();if(!n)return{type:"html_block",content:t,raw:t,tag:"",loading:!1};const i=Xi(t),s=i===-1?t:t.slice(0,i+1),o=i!==-1&&/\/\s*>$/.test(s),r=_u.has(n),l=vv(s),a=(i===-1?-1:e1e(t,n,i+1))!==-1,u=!(r||o||a);return{type:"html_block",content:u?`${t.replace(/<[^>]*$/,"")} -</${n}>`:t,raw:t,tag:n,attrs:l.length?l:void 0,loading:u}}function t1e(e){const t=String(e.content??""),n=e.raw==="$$"?`$$${t}$$`:String(e.raw??"");return{type:"math_block",content:t,loading:!!e.loading,raw:n,markup:e.markup}}function n1e(e){if(!e)return"left";for(const t of e){if(!t)continue;const[n,i]=t;if(!i)continue;const s=String(i).trim().toLowerCase();if(n==="style"){const o=/text-align\s*:\s*(left|right|center)/i.exec(s);if(o)return o[1].toLowerCase()}}return"left"}function BF(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function $F(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return BF(n)?n:void 0}function i1e(e,t,n){const i=$F(_p(t),n);if(!BF(i))return e;const s=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:s?.filename||i?.filename,explicitFilename:s?.explicitFilename||i?.explicitFilename,marketTicker:s?.marketTicker||i?.marketTicker}}}function s1e(e,t,n){let i=t+1,s=null;const o=[];let r=!1;for(;i<e.length&&e[i].type!=="table_close";)if(e[i].type==="thead_open")r=!0,i++;else if(e[i].type==="thead_close")r=!1,i++;else if(e[i].type==="tbody_open"||e[i].type==="tbody_close")i++;else if(e[i].type==="tr_open"){const a=[];let u=i+1,c;for(;u<e.length&&e[u].type!=="tr_close";)if(e[u].type==="th_open"||e[u].type==="td_open"){const f=e[u].type==="th_open",p=e[u+1],g=String(p.content??""),m=n1e(e[u].attrs),y=a.length,w=!f&&!r,k=w?s?.cells[y]?.raw:void 0;a.push({type:"table_cell",header:f||r,children:Wi(p.children||[],g,void 0,i1e(n,k,w?c:void 0)),raw:g,align:m}),w&&(c=$F(c,_p(g))),u+=3}else u++;const d={type:"table_row",cells:a,raw:a.map(f=>f.raw).join("|")};r?s=d:o.push(d),i=u+1}else i++;s||(s={type:"table_row",cells:[],raw:""});const l=e[t].loading===!0;return[{type:"table",header:s,rows:o,loading:l&&!n?.final&&o.length===0,raw:[s,...o].map(a=>a.raw).join(` -`)},i+1]}function o1e(){return{type:"thematic_break",raw:"---"}}let Ny=null;const Fy=new WeakMap;function Nx(){return Ny||(Ny={allowedTagSet:Av(),customTagSet:null}),Ny}function r1e(e){if(!e||e.length===0)return Nx();const t=Fy.get(e);if(t)return t;const n=e.map(Wr).filter(Boolean);if(!n.length){const s=Nx();return Fy.set(e,s),s}const i={allowedTagSet:Av({customHtmlTags:e}),customTagSet:new Set(n)};return Fy.set(e,i),i}function l1e(e,t,n){const i=e[t],s=i.attrs;let o="";const r={};if(s){for(const[p,g]of s)if(p==="class"){const m=g.match(/(?:\s|^)vmr-container-(\S+)/);m&&(o=m[1])}else if(p.startsWith("data-")){const m=p.slice(5);try{r[m]=JSON.parse(g)}catch{r[m]=g}}}const l=[],a=Pu(n,!0);let u=t+1;for(;u<e.length&&e[u].type!=="vmr_container_close";)if(e[u].type==="paragraph_open"){const p=e[u+1];if(p){const g={type:"paragraph",children:Wi(p.children||[],void 0,void 0,a.options()),raw:String(p.content??"")};n?.includeSourceMap&&Zn(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[p,g]=qf(e,u,a.options());n?.includeSourceMap&&Zn(p,e[u],n),l.push(p),a.remember(p.raw),u=g}else if(e[u].type==="blockquote_open"){const[p,g]=Uf(e,u,a.options());n?.includeSourceMap&&Zn(p,e[u],n),l.push(p),a.remember(p.raw),u=g}else{const p=yv(e,u,a.options());p?(l.push(p[0]),a.remember(p[0].raw),u=p[1]):u++}const c=u<e.length&&e[u].type==="vmr_container_close",d=c&&i.meta?.unclosed!==!0||!!n?.final;let f=`::: ${o}`;return Object.keys(r).length>0&&(f+=` ${JSON.stringify(r)}`),f+=` -`,l.length>0&&(f+=i.raw??l.map(p=>p.raw).join(` -`),f+=` -`),f+=":::",[{type:"vmr_container",name:o,loading:!d,attrs:Object.keys(r).length>0?r:void 0,children:l,raw:f},c?u+1:u]}function By(e,t,n,i){if(n?.type.endsWith("_close")){let s=Array.isArray(n.map)?Number(n.map[1]):NaN;return Number.isFinite(s)||(s=Array.isArray(t.map)?Number(t.map[1])+1:NaN),Pfe(e,t,s,i)}return Zn(e,t,i)}function a1e(e){return e.replace(/^\r?\n/,"").replace(/\r?\n$/,"")}function u1e(e,t){if(!e||!t)return e;const n=new RegExp(String.raw`[\t ]*<\s*\/\s*${t}[^>]*$`,"i");return e.replace(n,"")}function c1e(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${fl(i)}(?=\s|>|/)`,"i"),o=new RegExp(String.raw`^<\s*\/\s*${fl(i)}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l<e.length;){const a=e.indexOf("<",l);if(a===-1)break;const u=e.slice(a);if(o.test(u)){const c=Xi(u);if(c===-1)return null;if(r===0)return{start:a,end:a+c+1};r--,l=a+c+1;continue}if(s.test(u)){const c=Xi(u);if(c===-1)return null;const d=u.slice(0,c+1);/\/\s*>$/.test(d)||r++,l=a+c+1;continue}l=a+1}return null}function d1e(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=new RegExp(String.raw`<\s*${i}(?=\s|>|/)`,"gi");s.lastIndex=Math.max(0,n||0);const o=s.exec(e);if(!o||o.index==null)return null;const r=o.index,l=e.slice(r),a=Xi(l);if(a===-1)return null;const u=r+a;if(/\/\s*>\s*$/.test(l.slice(0,a+1))){const g=u+1;return{raw:e.slice(r,g),start:r,end:g}}let c=1,d=u+1;const f=g=>{const m=e.slice(g);return new RegExp(String.raw`^<\s*${i}(?=\s|>|/)`,"i").test(m)},p=g=>{const m=e.slice(g);return new RegExp(String.raw`^<\s*\/\s*${i}(?=\s|>)`,"i").test(m)};for(;d<e.length;){const g=e.indexOf("<",d);if(g===-1)return{raw:e.slice(r),start:r,end:e.length};if(p(g)){const m=e.indexOf(">",g);if(m===-1)return null;if(c--,c===0){const y=m+1;return{raw:e.slice(r,y),start:r,end:y}}d=m+1;continue}if(f(g)){const m=Xi(e.slice(g));if(m===-1)return null;c++,d=g+m+1;continue}d=g+1}return{raw:e.slice(r),start:r,end:e.length}}function t8(e){return Number.isFinite(e)&&e>0?e:0}function f1e(e,t){const n=t8(t);if(!e||n<=0)return 0;let i=0;for(let s=0;s<e.length;s++)if(e[s]===` -`&&(i++,i===n))return s+1;return e.length}function yv(e,t,n){const i=e[t],s=n?.includeSourceMap===!0;switch(i.type){case"heading_open":{const o=Xfe(e,t,n);return s&&Zn(o,i,n),[o,t+3]}case"code_block":{const o=Qfe(i);return s&&Zn(o,i,n),[o,t+1]}case"fence":{const o=gb(i);return s&&Zn(o,i,n),[o,t+1]}case"math_block":{const o=t1e(i);return s&&Zn(o,i,n),[o,t+1]}case"html_block":{const o=FF(i),r=o.tag?r1e(n?.customHtmlTags):null;if(o.tag&&o.loading&&r&&!r.allowedTagSet.has(o.tag)){const l=String(i.content??"").replace(/\n+$/,""),a={type:"paragraph",children:l?[{type:"text",content:l,raw:l}]:[],raw:l};return s&&Zn(a,i,n),[a,t+1]}if(o.tag&&r?.customTagSet?.has(o.tag)){const l=o.tag,a=String(n?.__sourceMarkdown??""),u=Number(n?.__customHtmlBlockCursor??0),c=Array.isArray(i.map)?f1e(a,Number(i.map?.[0]??0)):0,d=d1e(a,l,Math.max(t8(u),t8(c)));d&&n&&(n.__customHtmlBlockCursor=d.end);const f=String(d?.raw??o.raw??""),p=Xi(f),g=p!==-1?f.slice(0,p+1):f,m=p!==-1&&/\/\s*>\s*$/.test(g),y=p===-1?null:c1e(f,l,p+1),w=y?.start??-1;let k="";p!==-1&&(w!==-1&&p<w?k=f.slice(p+1,w):k=f.slice(p+1)),w===-1&&(k=u1e(k,l));const A=[],v=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let x;for(;(x=v.exec(g))!==null;){const _=x[1];if(!_||_.toLowerCase()===l)continue;const E=x[2]||x[3]||x[4]||"";A.push([_,E])}const S=!n?.final&&!m&&y==null,I={type:l,tag:l,content:a1e(k),raw:String(d?.raw??o.raw??f),loading:S,attrs:A.length?A:void 0};return s&&(d?I.sourceMap=ip(a,d.start,d.end,n):Zn(I,i,n)),[I,t+1]}return s&&Zn(o,i,n),[o,t+1]}case"table_open":{const[o,r]=s1e(e,t,n);return s&&Zn(o,i,n),[o,r]}case"dl_open":{const[o,r]=Yfe(e,t,n);return s&&Zn(o,i,n),[o,r]}case"footnote_open":{const[o,r]=Jfe(e,t,n);return s&&Zn(o,i,n),[o,r]}case"hr":{const o=o1e();return s&&Zn(o,i,n),[o,t+1]}}return null}function bb(e,t,n,i){const s=yv(e,t,n);if(s)return s;const o=e[t],r=n?.includeSourceMap===!0;switch(o.type){case"container_warning_open":case"container_info_open":case"container_note_open":case"container_tip_open":case"container_danger_open":case"container_caution_open":case"container_error_open":if(i?.parseContainer){const l=i.parseContainer(e,t,n);return r&&By(l[0],o,e[l[1]-1],n),l}break;case"container_open":if(i?.matchAdmonition){const l=i.matchAdmonition(e,t,n);if(l)return r&&By(l[0],o,e[l[1]-1],n),l}break;case"vmr_container_open":{const l=l1e(e,t,n);return r&&By(l[0],o,e[l[1]-1],n),l}}return null}function h1e(){return{type:"hardbreak",raw:`\\ -`}}function p1e(e,t,n){const i=e[t+1],s=String(i.content??"");return{type:"paragraph",children:Wi(i.children||[],s,void 0,n),raw:s}}const Fx=new WeakMap,DF=new WeakMap,Bx=new WeakMap,$x=new WeakMap;function Sl(e,t,n){const i=t?.map,s=n?.__sourceMarkdown;if(!Array.isArray(i)||i.length<2||typeof s!="string"||!n)return;const o=Number(i[0]),r=Number(i[1]);if(!Number.isFinite(o)||!Number.isFinite(r))return;let l=Bx.get(n);if(!l){l=[0];for(let a=0;a<s.length;a++)s[a]===` -`&&l.push(a+1);Bx.set(n,l)}DF.set(e,{start:l[Math.max(0,Math.trunc(o))]??s.length,end:l[Math.max(0,Math.trunc(r))]??s.length})}const bv=new WeakMap,Dx=new WeakMap,g1e=["$","\\["],m1e=/(^|\r?\n)[\t ]*:::[\t ]*(?:warning|info|note|tip|danger|caution|error)(?=[\t ]|\r?\n|$)[^\r\n]*(?:\r?\n[\t ]*)*$/,v1e=1024,y1e=16,n8=new WeakMap,mh=new WeakMap,Z1=new WeakMap,b1e=new Set(["code_inline","em_close","em_open","emoji","hardbreak","html_block","html_inline","image","ins_close","ins_open","link","link_close","link_open","mark_close","mark_open","math_inline","s_close","s_open","softbreak","strong_close","strong_open","sub","sup","text"]),k1e=new Map([["paragraph_open","paragraph_close"],["heading_open","heading_close"],["bullet_list_open","bullet_list_close"],["ordered_list_open","ordered_list_close"],["blockquote_open","blockquote_close"],["table_open","table_close"]]),A1e=new Set(["code_block","fence","hr","inline","math_block"]);function Xr(){return typeof performance<"u"?performance.now():Date.now()}function pu(e,t,n){e&&(e[t]=(e[t]??0)+n)}function zF(e){return e.__timing}function RF(e,t,n){return t&&pu(t,"parseMarkdownToStructureTotalMs",Xr()-n),e}function OF(e,t){const n=t.postTransformNodes;if(typeof n!="function")return e;const i=n(e);return Array.isArray(i)?i:e}function zx(e,t,n,i){return RF(OF(e,t),n,i)}function Pd(e,t,n){if(!n)return Qx(e,t);pu(n,"processTokensInputTokens",e.length);const i=Xr(),s=Qx(e,t);return pu(n,"processTokensMs",Xr()-i),s}function PF(e,t){return e.every(n=>{if(!b1e.has(n.type)||(n.type==="link"||n.type==="link_open"||n.type==="link_close")&&!Mce(t))return!1;if(n.type==="link"){const s=_ce(n);if(s!=="explicit"&&s!=="linkify"&&s!=="autolink")return!1}if(n.type==="link_open"||n.type==="link_close"){const s=n.markup??"";if(s!==""&&s!=="linkify"&&s!=="autolink")return!1}const i=n.children;return!Array.isArray(i)||PF(i,t)})}function C1e(e){const t=k1e.get(e);if(t)return t;const n=/^container_(.+)_open$/.exec(e);return n?`container_${n[1]}_close`:void 0}function w1e(e,t){const n=[];let i=!1,s=0;for(;s<e.length;){const o=e[s];if(!o||o.level!==0)return null;const r=C1e(o.type);let l=s+1;if(r){if(o.nesting!==1)return null;for(;l<e.length;){const a=e[l];if(a.level===0){if(a.type!==r||a.nesting!==-1)return null;l++;break}l++}if(e[l-1]?.type!==r)return null;if(o.type==="paragraph_open"||o.type==="heading_open"){if(l!==s+3||e[s+1]?.type!=="inline")return null}else i=!0}else if(A1e.has(o.type)){if(o.nesting!==0)return null;i=!0}else return null;for(let a=s;a<l;a++){const u=e[a];if(u.type!=="inline")continue;const c=u.children;if(!Array.isArray(c)||!PF(c,t))return null}n.push(s),s=l}return{mixed:i,starts:n}}function x1e(e){return/\r?\n[\t ]*\r?\n[\t ]*$/.test(e)}function _1e(e){return e.__reuseStableTopLevelNodes===!0&&e.final!==!0&&!e.preTransformTokens&&!e.postTransformTokens&&!e.postTransformNodes&&!e.customHtmlTags?.length&&e.includeSourceMap!==!0}function Rx(e,t,n,i,s,o){const r=i.starts;if(r.length===0||s.length!==r.length){mh.delete(e);return}const l=r.map((a,u)=>{const c=r[u+1]??n.length;return{firstToken:n[a],lastToken:n[c-1],tokenCount:c-a}});mh.set(e,{groupBoundaries:l,source:t,nodes:s,stableGroupCount:i.mixed?Math.max(0,r.length-1):x1e(t)?r.length:Math.max(0,r.length-1),requireClosingStrong:o.requireClosingStrong,validateLink:o.validateLink})}function S1e(e,t,n,i){const s=n.length-1;for(let o=0;o<i;o++){const r=n[o],l=n[o+1]??t.length,a=e.groupBoundaries[o];if(!a||a.tokenCount!==l-r)return!1;if(!(a.firstToken===t[r]&&a.lastToken===t[l-1])&&(o>=s||!jx(a.firstToken,t[r])||!jx(a.lastToken,t[l-1])))return!1}return!0}function M1e(e,t,n,i,s){const o=e,r=i.__disableStructuredReuse===!0;if(!(kb(e,i)&&_1e(i)))return r||mh.delete(o),Pd(n,i,s);if(r)return Pd(n,i,s);const l=w1e(n,i.validateLink);if(!l)return mh.delete(o),Pd(n,i,s);const a=l.starts,u=mh.get(o),c=Z1.get(o),d=u&&l.mixed?Math.min(u.stableGroupCount,Math.max(0,u.groupBoundaries.length-1)):u?.stableGroupCount??0;if(u&&d>0&&u.requireClosingStrong===i.requireClosingStrong&&u.validateLink===i.validateLink&&t.startsWith(u.source)&&a.length>=d&&(c==="append"||c==="tail")&&S1e(u,n,a,d)){const p=a[d]??n.length,g=Pd(n.slice(p),{...i,__linkifyDemotionSeed:u.nodes.slice(0,d).map(y=>String(y.raw??""))},s),m=a.length-d;if(g.length===m){const y=u.nodes.slice(0,d).concat(g);return pu(s,"processTokensReusedTopLevelNodes",d),Rx(e,t,n,l,y,i),y}}const f=Pd(n,i,s);return Rx(e,t,n,l,f,i),f}function I1e(e){const t=e?.customHtmlTags;if(!Array.isArray(t)||t.length===0)return null;const n=od(t);return n.length?new Set(n):null}function E1e(e,t){const n=e;let i=Fx.get(n);i||(i=new Map,Fx.set(n,i));const s=t.__markstreamFinal===!0?"final":"streaming";let o=i.get(s);o||(o={},i.set(s,o));for(const r of Object.keys(o))Object.prototype.hasOwnProperty.call(t,r)||delete o[r];return Object.assign(o,t),o}function T1e(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Z0(e,t,n){for(const i of Reflect.ownKeys(e)){const s=Object.getOwnPropertyDescriptor(e,i);if(!s||!("value"in s))continue;const o=Object.getOwnPropertyDescriptor(t,i);o&&(!("value"in o)||o.writable===!1)||(t[i]=Cc(s.value,n))}}function Cc(e,t=new WeakMap){if(!e||typeof e!="object")return e;const n=e,i=t.get(n);if(i)return i;if(Array.isArray(e)){const r=[];t.set(n,r);for(const l of e)r.push(Cc(l,t));return r}if(e instanceof Map){const r=new Map;t.set(n,r);for(const[l,a]of e)r.set(Cc(l,t),Cc(a,t));return r}if(e instanceof Set){const r=new Set;t.set(n,r);for(const l of e)r.add(Cc(l,t));return r}if(e instanceof Date){const r=new Date(e.getTime());return t.set(n,r),r}if(e instanceof RegExp){const r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,t.set(n,r),r}if(typeof URL<"u"&&e instanceof URL){const r=new URL(e.href);return t.set(n,r),Z0(n,r,t),r}if(typeof URLSearchParams<"u"&&e instanceof URLSearchParams){const r=new URLSearchParams(e.toString());return t.set(n,r),Z0(n,r,t),r}if(e instanceof Error){let r;const l=e.constructor;try{r=new l(e.message)}catch{r=new Error(e.message)}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),t.set(n,r),Z0(n,r,t),r}if(typeof Promise<"u"&&e instanceof Promise||typeof Node<"u"&&e instanceof Node)return t.set(n,e),e;if(!T1e(e)){const r=Object.create(Object.getPrototypeOf(e));return t.set(n,r),Z0(n,r,t),r}const s={};t.set(n,s);const o=e;for(const r of Object.keys(o))s[r]=Cc(o[r],t);return s}function jF(e,t=!0){if(!t)return zc(e);const n=Object.create(Object.getPrototypeOf(e)),i=new WeakMap;for(const s of Reflect.ownKeys(e)){const o=Object.getOwnPropertyDescriptor(e,s);if(!o)continue;if(!("value"in o)){Object.defineProperty(n,s,o);continue}const r=o.value;let l=r;s==="attrs"&&Array.isArray(r)?l=r.map(a=>[...a]):s==="map"&&Array.isArray(r)?l=[...r]:s==="children"&&Array.isArray(r)?l=r.map(a=>jF(a,t)):t&&r&&typeof r=="object"&&(l=Cc(r,i)),Object.defineProperty(n,s,{...o,value:l})}return n}function Ox(e,t=!0){return e.map(n=>jF(n,t))}function kb(e,t){const n=t,i=e.stream,s=t.streamParse??"auto";return n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&(s===!0||s==="auto"&&t.final!==!0)&&i?.enabled===!0&&typeof i.parse=="function"}function L1e(e,t){const n=t,i=t.streamParse??"auto",s=e.stream;return t.final===!0&&i==="auto"&&n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&s?.enabled===!0&&typeof s.reset=="function"}function N1e(e){bv.delete(e)}function F1e(){return{fenceChar:"",fenceInBlockquote:!1,fenceInList:!1,fenceLen:0,fenceListIndent:0,inDollarMath:!1,inFence:!1,inMath:!1,listContentIndent:null,dollarMathOpenOffset:null,mathOpenOffset:null}}function vh(e){return{...e}}function B1e(e,t,n,i=kv(t).state){bv.set(e,{explicitBracketMath:i,source:t,key:n,pendingCandidate:n===null&&bF(t)})}function $1e(e){return e.endsWith("$")||e.endsWith("\\")}function D1e(e){const t=Math.max(e.lastIndexOf(` -`)+1,0),n=e.slice(t).replace(/[\t ]+$/,"");return g1e.some(i=>n.endsWith(i))}function z1e(e,t){return t?!!(t.includes("$$")||t.includes("\\[")||e.endsWith("$")&&t[0]==="$"||e.endsWith("\\")&&t[0]==="["||D1e(e)&&/[\r\n]/.test(t)):!1}function $l(e,t){let n=t-1,i=0;for(;n>=0&&e[n]==="\\";)i++,n--;return i%2===1}function i8(e){return e===" "||e===" "}function HF(e,t){return t===" "?e+1:e+4-e%4}function Ab(e){let t=0,n=0;for(;t<e.length&&i8(e[t]);)n=HF(n,e[t]),t++;return{index:t,column:n}}function Kf(e){const t=Ab(e);return t.column>3?null:t}function $y(e){const t=Kf(e);if(!t)return null;const n=t.index,i=e[n];if(i!=="`"&&i!=="~")return null;let s=n;for(;s<e.length&&e[s]===i;)s++;const o=s-n;if(o<3)return null;const r=e.slice(s);return i==="`"&&r.includes("`")?null:{markerChar:i,markerLen:o,rest:r}}function Cb(e){const t=Kf(e);if(!t)return null;const n=e.slice(t.index),i=/^(?:[-+*]|\d{1,9}[.)])(?=[\t ]|$)/.exec(n)?.[0];if(!i)return null;let s=t.index+i.length,o=t.column+i.length;if(!i8(e[s]))return null;for(;s<e.length&&i8(e[s]);)o=HF(o,e[s]),s++;return{content:e.slice(s),contentIndent:o}}function wb(e){let t=e,n=!1;for(;;){const i=Kf(t);if(!i)return n?t:null;let s=i.index;if(t[s]!==">")return n?t:null;n=!0,s++,(t[s]===" "||t[s]===" ")&&s++,t=t.slice(s)}}function xb(e){const t=$y(e);if(t)return{...t,inBlockquote:!1,inList:!1,listIndent:0};const n=wb(e),i=n==null?null:$y(n);if(i)return{...i,inBlockquote:!0,inList:!1,listIndent:0};const s=Cb(e);if(!s)return null;const o=$y(s.content);return o==null?null:{...o,inBlockquote:!1,inList:!0,listIndent:s.contentIndent}}function WF(e,t){let n=!1,i="",s=0,o=!1,r=!1,l=0,a=null,u=0;for(;u<t;){const c=e.indexOf(` -`,u),d=c===-1||c>=t?t:c,f=e.slice(u,d),p=f.endsWith("\r")?f.slice(0,-1):f,g=Ab(p),m=Cb(p);n&&o&&p.trim()&&wb(p)==null&&(n=!1,i="",s=0,o=!1,r=!1,l=0),n&&r&&p.trim()&&g.column<l&&!m&&(n=!1,i="",s=0,o=!1,r=!1,l=0),m?a=m.contentIndent:p.trim()&&a!=null&&g.column<a&&!n&&(a=null);const y=xb(p);if(y&&(n?y.markerChar===i&&y.markerLen>=s&&/^\s*$/.test(y.rest)&&(n=!1,i="",s=0,o=!1,r=!1,l=0):(n=!0,i=y.markerChar,s=y.markerLen,o=y.inBlockquote,r=y.inList||a!=null&&!y.inBlockquote&&g.column>=a,l=y.listIndent||a||0)),c===-1||c>=t)break;u=c+1}return n}function R1e(e,t){const n=d=>d===" "||d===" ",i=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"||d===":"},s=d=>{if(d[0]!=="<")return null;let f=1;for(;f<d.length&&n(d[f]);)f++;const p=d[f]==="/";if(p)for(f++;f<d.length&&n(d[f]);)f++;const g=f;for(;f<d.length&&i(d[f]);)f++;if(f===g)return null;const m=d.slice(g,f).toLowerCase();if(!UN.has(m))return null;const y=d[f];if(y&&y!==" "&&y!==" "&&y!==">"&&y!=="/")return null;const w=Xi(d);if(w===-1)return null;let k=w-1;for(;k>=0&&n(d[k]);)k--;return{closing:p,tag:m,selfClosing:!p&&d[k]==="/",after:d.slice(w+1)}},o=(d,f)=>{const p=d.toLowerCase();let g=0;for(;g<p.length;){const m=p.indexOf("</",g);if(m===-1)return!1;for(g=m+2;g<p.length&&n(p[g]);)g++;if(p.startsWith(f,g)){const y=p[g+f.length];if(!y||y===" "||y===" "||y===">")return!0}}return!1},r=[];let l=!1,a=!1,u=!1,c=0;for(;c<t;){const d=e.indexOf(` -`,c),f=d===-1||d>=t?t:d,p=e.slice(c,f),g=p.endsWith("\r")?p.slice(0,-1):p,m=Kf(g);if(m){const y=g.slice(m.index);if(l)l=!y.includes("-->");else if(a)a=!y.includes(">");else if(u)u=!y.includes("?>");else if(y.startsWith("<!--"))l=!y.includes("-->");else if(y.startsWith("<?"))u=!y.includes("?>");else if(y.startsWith("<!"))a=!y.includes(">");else{const w=s(y);if(w)if(w.closing){for(let k=r.length-1;k>=0;k--)if(r[k]===w.tag){r.length=k;break}}else w.selfClosing||o(w.after,w.tag)||r.push(w.tag)}}if(d===-1||d>=t)break;c=d+1}return l||a||u||r.length>0}function O1e(e,t,n){if(!n?.length)return!1;const i=new Set(od(n));if(!i.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===":"},o=c=>c===" "||c===" ",r=c=>{if(c[0]!=="<")return null;let d=1;for(;d<c.length&&o(c[d]);)d++;const f=c[d]==="/";if(f)for(d++;d<c.length&&o(c[d]);)d++;const p=d;for(;d<c.length&&s(c[d]);)d++;if(d===p)return null;const g=c.slice(p,d).toLowerCase();if(!i.has(g))return null;const m=c[d];if(m&&m!==" "&&m!==" "&&m!==">"&&m!=="/")return null;const y=c.indexOf(">",d);if(y===-1)return null;let w=y-1;for(;w>=0&&o(c[w]);)w--;return{closing:f,tag:g,selfClosing:!f&&c[w]==="/",after:c.slice(y+1)}},l=(c,d)=>{const f=c.toLowerCase();let p=0;for(;p<f.length;){const g=f.indexOf("</",p);if(g===-1)return!1;for(p=g+2;p<f.length&&o(f[p]);)p++;if(f.startsWith(d,p)){const m=f[p+d.length];if(!m||m===" "||m===" "||m===">")return!0}}return!1},a=[];let u=0;for(;u<t;){const c=e.indexOf(` -`,u),d=c===-1||c>=t?t:c,f=e.slice(u,d),p=f.endsWith("\r")?f.slice(0,-1):f,g=Kf(p);if(g){const m=r(p.slice(g.index));if(m)if(m.closing){for(let y=a.length-1;y>=0;y--)if(a[y]===m.tag){a.length=y;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 P1e(e,t){const n=m1e.exec(e);if(!n)return null;const i=n[1]??"",s=n.index+i.length,o=e.indexOf(` -`,s),r=e.slice(s,o===-1?e.length:o);return!Kf(r.endsWith("\r")?r.slice(0,-1):r)||WF(e,s)||R1e(e,s)||O1e(e,s,t)?null:`${e.slice(0,n.index)}${i}`}function _b(e,t,n){let i=t;for(;i<e.length&&e[i]===n;)i++;return i-t}function qF(e,t,n){let i=t;for(;i<e.length;){const s=e.indexOf("`",i);if(s===-1)return-1;const o=_b(e,s,"`");if(o===n)return s;i=s+o}return-1}function Dy(e){e.inFence=!1,e.fenceChar="",e.fenceLen=0,e.fenceInBlockquote=!1,e.fenceInList=!1,e.fenceListIndent=0}function Px(e,t,n,i,s){let o=0,r=!1;for(;o<e.length;){const l=o;if(t.inMath){if(e.startsWith("\\]",o)&&!$l(e,l)){i!=null&&s&&n+o+2>i&&(r=!0),t.inMath=!1,t.mathOpenOffset=null,o+=2;continue}o++;continue}if(t.inDollarMath){if(e.startsWith("$$",o)&&!$l(e,l)){i!=null&&s&&n+o+2>i&&(r=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,o+=2;continue}o++;continue}if(e[o]==="`"&&!$l(e,l)){const a=_b(e,o,"`"),u=qF(e,o+a,a);if(u===-1)break;o=u+a;continue}if(e.startsWith("\\[",o)&&!$l(e,l)){t.inMath=!0,t.mathOpenOffset=n+o,o+=2;continue}if(e.startsWith("$$",o)&&!$l(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+o,o+=2;continue}o++}return r}function j1e(e,t){if(!hb(t))return e;const n=t,i=Dx.get(n),s=i?.source===e?i.state:i&&e.startsWith(i.source)?UF(i.state,e.slice(i.source.length),i.source.length-i.state.lineBuffer.length).state:kv(e).state;Dx.set(n,{source:e,state:s});const{context:o}=s,r=o.inMath?o.mathOpenOffset:o.inDollarMath?o.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 ou(l)&&!c?e:e.slice(0,r)}function H1e(e,t,n,i,s){const o=Ab(e),r=Cb(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&wb(e)==null&&Dy(t),t.inFence&&t.fenceInList&&e.trim()&&o.column<t.fenceListIndent&&!r&&Dy(t),r?t.listContentIndent=r.contentIndent:e.trim()&&t.listContentIndent!=null&&o.column<t.listContentIndent&&!t.inFence&&(t.listContentIndent=null),!t.inMath&&!t.inDollarMath){const l=xb(e);if(l)t.inFence?l.markerChar===t.fenceChar&&l.markerLen>=t.fenceLen&&/^\s*$/.test(l.rest)&&Dy(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&&o.column>=t.listContentIndent,t.fenceListIndent=l.listIndent||t.listContentIndent||0);else if(!t.inFence)return Px(e,t,n,i,s)}else return Px(e,t,n,i,s);return!1}function kv(e,t=F1e(),n=null,i=!1,s=0){const o=vh(t);let r=vh(t),l="",a=!1,u=0;for(;u<e.length;){const c=e.indexOf(` -`,u),d=c!==-1,f=d&&c>u&&e[c-1]==="\r"?c-1:d?c:e.length,p=e.slice(u,f);H1e(p,o,s+u,n,i)&&(a=!0),d?(r=vh(o),l=""):l=p,u=d?c+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:o,lineBuffer:l}}}function UF(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:vh(e.committedContext),context:vh(e.context),lineBuffer:e.lineBuffer+t}}:kv(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function W1e(e,t){if(!hb(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const i=e,s=bv.get(i);if(s?.source===t)return;const o=s?t.startsWith(s.source):!1,r=o&&s?t.slice(s.source.length):"",l=o&&s?UF(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):kv(t),a=l.state,u=o&&s?l.closedOpenMath:!1;if(s&&o&&s.key===null&&s.pendingCandidate===!1&&!u&&!z1e(s.source,r)&&!$1e(t)){s.source=t,s.explicitBracketMath=a;return}const c=xde(t);(s&&(s&&!o||s.key!==c||u)||!s&&c)&&n.reset(),B1e(e,t,c,a)}function q1e(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function KF(e,t){const n=e?.map,i=t?.map;return n===i?!0:!Array.isArray(n)||!Array.isArray(i)?!1:n.length===i.length&&n.every((s,o)=>s===i[o])}function U1e(e,t){const n=e?.attrs,i=t?.attrs;if(n===i)return!0;if(!Array.isArray(n)||!Array.isArray(i)||n.length!==i.length)return!1;for(let s=0;s<n.length;s++){const o=n[s],r=i[s];if(o[0]!==r[0]||o[1]!==r[1])return!1}return!0}function jx(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.level===t.level&&e.markup===t.markup&&e.content===t.content&&e.info===t.info&&KF(e,t)&&U1e(e,t)}function zy(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&&KF(e,t)}function Hx(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function K1e(e){for(let t=0;t+5<e.length;t++)if(Hx(e,t)&&Hx(e,t+3)&&zy(e[t],e[t+3])&&zy(e[t+1],e[t+4])&&zy(e[t+2],e[t+5]))return!0;return!1}function V1e(e,t,n){return hb(e)&&bF(t)&&K1e(n)}function Z1e(e){const t=bv.get(e);return typeof t?.key=="string"&&t.key.startsWith("pending:")}function Wx(e,t,n,i){const s=e;if(i.customHtmlTags?.length&&(n.__markstreamCustomHtmlTags=i.customHtmlTags),!kb(e,i)||(W1e(e,t),Z1e(e)))return Z1.set(s,"sync"),e.parse(t,n);const o=e.stream.parse(t,E1e(e,n));if(V1e(e,t,o))return e.stream?.reset?.(),Z1.set(s,"sync"),e.parse(t,n);const r=e.stream?.stats?.();if(Z1.set(s,r?.lastMode??"stream"),!q1e(i))return o;const l=zF(i);if(!l)return Ox(o,!0);const a=Xr(),u=Ox(o,!0);return pu(l,"tokenCloneMs",Xr()-a),u}function Av(e){const t=e?.customHtmlTags;if(!Array.isArray(t)||t.length===0)return Xh;const n=new Set(Xh);for(const i of od(t))i&&n.add(i);return n}function G1e(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:e.type==="hardbreak"?"<br>":""}function qx(e){return{type:"paragraph",children:e,raw:e.map(G1e).join("")}}function Ux(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function Kx(e,t){if(e.type!=="paragraph")return null;const n=e.children,i=Array.isArray(n)?n:[];if(i.length===0)return null;const s=I1e(t);if(!s?.size)return null;let o=-1;for(let c=0;c<i.length;c++){const d=i[c];if(!s.has(String(d?.type??"").toLowerCase()))continue;const f=i.slice(0,c);if(String(d.content??"").trim()&&f.some(p=>p?.type==="hardbreak")){o=c;break}}if(o===-1)return null;const r=i.slice(0,o),l=i[o];if(!l)return null;const a=[];r.length&&a.push(qx(r)),a.push(l);const u=i.slice(o+1);return u.length&&a.push(qx(u)),a}function Q1e(e){const t=e.trim();if(!t)return null;const n=/^(?:<!doctype\s+html[^>]*>\s*)?<html(?:\s[^>]*)?>/i.test(t),i=/<\/html>\s*$/i.test(t);return!n||!i?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function yh(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function Y1e(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*${fl(t)}\s*>\s*$`,"i").test(n)}const Ry=new Set(["iframe","script","style","textarea","title"]);function Mp(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=f=>{if(e.startsWith("<!--",f)){const A=e.indexOf("-->",f+4);return{closing:!1,end:A===-1?e.length:A+3,selfClosing:!1,tag:""}}if(e.startsWith("<![CDATA[",f)){const A=e.indexOf("]]>",f+9);return{closing:!1,end:A===-1?e.length:A+3,selfClosing:!1,tag:""}}const p=Xi(e.slice(f));if(p===-1)return null;const g=f+p+1,m=e.slice(f,g);if(/^<\s*[!?]/.test(m))return{closing:!1,end:g,selfClosing:!1,tag:""};let y=m.slice(1).trimStart();const w=y.startsWith("/");w&&(y=y.slice(1).trimStart());const k=y.match(/^([A-Z][\w:-]*)/i);return k?.[1]?{closing:w,end:g,selfClosing:/\/\s*>$/.test(m),tag:k[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},o=(f,p)=>{const g=new RegExp(String.raw`<\s*\/\s*${fl(f)}(?=\s|>)`,"gi");g.lastIndex=p;const m=g.exec(e);if(!m||m.index==null)return null;const y=s(m.index);return y?{start:m.index,end:y.end}:null};let r=-1,l=-1,a=Math.max(0,n);for(;a<e.length;){const f=e.indexOf("<",a);if(f===-1)return null;const p=s(f);if(!p)return null;if(!p.closing&&p.tag===i){r=f,l=p.end-1;break}if(!p.closing&&Ry.has(p.tag)){a=o(p.tag,p.end)?.end??e.length;continue}a=p.end}if(r===-1||l===-1)return null;const u=e.slice(r,l+1);if(_u.has(i)||/\/\s*>$/.test(u))return{raw:u,start:r,end:l+1,closed:!0};if(Ry.has(i)){const f=o(i,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<e.length;){const f=e.indexOf("<",d);if(f===-1)return{raw:e.slice(r),start:r,end:e.length,closed:!1};const p=s(f);if(!p)return null;if(p.closing&&p.tag===i){c--;const g=p.end;if(c===0)return{raw:e.slice(r,g),start:r,end:g,closeStart:f,closed:!0};d=g;continue}if(!p.closing&&p.tag===i){!p.selfClosing&&!_u.has(p.tag)&&c++,d=p.end;continue}if(!p.closing&&Ry.has(p.tag)){d=o(p.tag,p.end)?.end??e.length;continue}d=p.end}return{raw:e.slice(r),start:r,end:e.length,closed:!1}}function J1e(e,t){if(!t)return 0;let n=0,i=0;for(;n<e.length&&i<t.length;){if(e[n]===t[i]){n++,i++;continue}if(e[n]==="\r"||e[n]===` -`){n++;continue}return-1}return i===t.length?n:-1}function X1e(e,t,n){return n?e:`${e.replace(/<[^>]*$/,"")} -</${t}>`}function Vx(e){return e.replace(/\r\n/g,` -`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function ehe(e,t,n){return n?e.includes(n,t)?!0:Vx(e.slice(Math.max(0,t))).includes(Vx(n)):!1}function the(e,t){let n=Math.max(0,t);for(;n<e.length&&(e[n]===" "||e[n]===" ");)n++;return e[n]==="\r"?(n++,e[n]===` -`&&n++,n):e[n]===` -`?n+1:t}function Zx(e){if(e.type!=="html_block"||String(e.tag??"").toLowerCase()!=="details")return!1;const t=String(e.raw??e.content??"");return/^\s*<details\b/i.test(t)}function nhe(e){if(e.type!=="html_block")return!1;const t=String(e.raw??e.content??"");return/^\s*<\/details\b/i.test(t)}function VF(e,t){const n=new RegExp(String.raw`<\s*\/\s*${fl(t)}(?=\s|>)`,"gi");let i=-1,s;for(;(s=n.exec(e))!==null;)i=s.index;return i}function ZF(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const ihe=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),she=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function ohe(e){return/\n\s*\n/.test(e)||she.test(e)}function rhe(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(i=>ihe.has(String(i?.type??"").toLowerCase()))||t.some(i=>{if(i?.type!=="html_block")return!1;const s=i;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!ohe(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function lhe(e){const t=[];let n=0;for(;n<e.length;){for(;/\s/.test(e[n]??"");)n++;if(n>=e.length)break;const i=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!i?.[1])return null;const s=Mp(e,i[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function ahe(e,t,n,i){const s=n.customHtmlTags?.join("\0")??"",o=t,r=$x.get(o),l=r&&r.final===i&&r.customHtmlTags===s&&r.requireClosingStrong===n.requireClosingStrong&&r.validateLink===n.validateLink,a=e.map((u,c)=>l&&r.blocks[c]===u?r.children[c]:pf(u,t,n));return $x.set(o,{blocks:e,children:a,customHtmlTags:s,final:i,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function uhe(e,t,n,i){return e.map(s=>{if(s?.type!=="html_block")return s;const o=s,r=String(o.tag??"").toLowerCase();if(!r||r==="details"||VN.has(r)||Array.isArray(o.children))return s;const l=String(s.raw??o.content??"");if(!l)return s;const a=Xi(l);if(a===-1)return s;const u=Mp(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 p=ZF(n,i),g=d?null:lhe(f),m=g?ahe(g,t,p,i):pf(f,t,p);return rhe(f,m)?{...s,children:m}:s})}function che(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function pf(e,t,n){return e.trim()?QF(e,t,{...n,__disableStreamParse:!0,__disableStructuredReuse:!0}):[]}function dhe(e,t,n){const i=pf(e,t,n),s=i[0];return i.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:i}function fhe(e,t,n){const i=FF({content:e}),s=Xi(e),o=VF(e,"summary");if(s!==-1&&o!==-1&&o>=s+1){const r=dhe(e.slice(s+1,o),t,n);r.length>0&&(i.children=r)}return i.raw=e,i}function hhe(e,t,n){const i=Xi(e);if(i===-1)return[];const s=e.slice(i+1);if(!s.trim())return[];const o=Mp(s,"summary",0);if(!o)return pf(s,t,n);const r=s.slice(0,o.start),l=s.slice(o.end);return[...pf(r,t,n),fhe(o.raw,t,n),...pf(l,t,n)]}function GF(e,t,n,i,s,o=0){const r=[];let l=o;for(let a=0;a<e.length;a++){const u=e[a],c=yh(u);let d=-1;if(c&&(d=t.indexOf(c,l),d!==-1&&(l=d+c.length)),!Zx(u)){r.push(u);continue}const f=String(u.raw??yh(u)??""),p=d!==-1?d:t.indexOf(f,Math.max(0,l-f.length));if(p===-1){r.push(u);continue}let g=1,m=-1;for(let q=a+1;q<e.length;q++){const W=e[q];if(Zx(W)){g++;continue}if(nhe(W)&&(g--,g===0)){m=q;break}}const y=Mp(t,"details",p),w=m===-1&&y?.closed===!0,k=w?(()=>{const q=VF(f,"details");return q!==-1?f.slice(0,q):f})():f,[A]=GF(w?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,i,s,p+f.length),v=hhe(k,n,ZF(i,s)),x=m===-1?"</details>":String(e[m].raw??yh(e[m])??"</details>"),S=w||m!==-1&&y?.closed===!0,I=x.replace(/[\t\r\n ]+$/,""),_=S?(()=>{const q=(y?.raw??"").lastIndexOf(I);return q===-1?t.length:p+q})():t.length,E=Xi(f),N=w&&E!==-1?p+E+1:p+f.length,D=t.slice(N,_===-1?t.length:_),T=n.parse(D,{__markstreamFinal:s}),$=n.renderer.render(T,n.options,{__markstreamFinal:s}),O=_+I.length,P=S?Math.max(_+x.length,the(t,O)):t.length,R=S?t.slice(_,P):x,j=S?t.slice(p,P):t.slice(p),z=w&&E!==-1?f.slice(0,E+1):f,K={...u,tag:"details",attrs:vv(f.slice(0,E+1)),raw:j,content:`${z}${$}${R}`,children:[...v,...A],loading:!s&&!S};if(i.includeSourceMap&&(K.sourceMap=ip(t,p,S?P:t.length,i)),r.push(K),l=S?P:t.length,m===-1&&!w)break;m!==-1&&(a=m)}return[r,l]}function phe(e,t,n,i){if(!n)return e;const s=e.slice();let o=0;for(let r=0;r<s.length;r++){const l=s[r],a=yh(l),u=a?n.indexOf(a,o):-1;if(l?.type!=="html_block"){u!==-1&&(o=u+a.length);continue}const c=String(l.tag??"").toLowerCase();if(!c)continue;if(c==="details"){u!==-1&&(o=u+a.length);continue}const d=Mp(n,c,u!==-1?u:o);if(!d)continue;o=d.end;const f=String(l.content??a),p=String(l.raw??f),g=u+p.length;if(u!==-1&&d.end<g&&n.slice(u,g)===p){o=g,i?.includeSourceMap&&(l.sourceMap=ip(n,u,g,i));continue}const m=X1e(d.raw,c,d.closed),y=!t&&!d.closed,w=f!==m||p!==d.raw||!!l.loading!==y,k=Xi(d.raw),A=k===-1?"":d.raw.slice(0,k+1),v=A?vv(A):[];if(l.content=m,l.raw=d.raw,l.loading=y,l.attrs=v.length?v:void 0,i?.includeSourceMap&&(l.sourceMap=ip(n,d.start,d.end,i)),!w)continue;let x=J1e(d.raw,p);x===-1&&(x=0);const S=r+1;for(;S<s.length;){if(d.closed&&Y1e(s[S],c)){s.splice(S,1);continue}const I=yh(s[S]);if(!I)break;const _=d.raw.indexOf(I,x);if(_===-1){if(ehe(n,d.end,I))break;const E=DF.get(s[S]);if(!E)break;if(E.start>=d.start&&E.end<=d.end){s.splice(S,1);continue}break}x=_+I.length,s.splice(S,1)}}return s}function ghe(e){const t=l=>l===" "||l===" "||l===` -`||l==="\r",n=l=>{if(!l||l[0]!=="<"||l.includes(">"))return!1;let a=1;if(a<l.length&&t(l[a])||l.startsWith("<!--")||l.startsWith("<?")||l.startsWith("<!")||l[a]==="/"&&(a++,a<l.length&&t(l[a])))return!1;const u=m=>{const y=m.charCodeAt(0);return y>=65&&y<=90||y>=97&&y<=122},c=m=>{const y=m.charCodeAt(0);return y>=48&&y<=57},d=m=>m==="!"||u(m),f=m=>u(m)||c(m)||m===":"||m==="-",p=m=>u(m)||c(m)||m==="_"||m==="."||m===":"||m==="-",g=p;if(a>=l.length||!d(l[a]))return!1;for(a++;a<l.length&&f(l[a]);)a++;for(;a<l.length;){for(;a<l.length&&t(l[a]);)a++;if(a>=l.length)return!0;if(l[a]==="/"){for(a++;a<l.length&&t(l[a]);)a++;return a>=l.length}if(!p(l[a]))return!1;for(a++;a<l.length&&g(l[a]);)a++;for(;a<l.length&&t(l[a]);)a++;if(a<l.length&&l[a]==="="){for(a++;a<l.length&&t(l[a]);)a++;if(a>=l.length)return!0;const m=l[a];if(m==='"'||m==="'"){for(a++;a<l.length&&l[a]!==m;)a++;if(a>=l.length)return!0;a++}else{for(;a<l.length;){const y=l[a];if(t(y)||y==="<"||y===">"||y==='"'||y==="'"||y==="`")break;a++}if(a>=l.length)return!0}}}return!0},i=(l,a)=>WF(l,a),s=String(e??""),o=s.lastIndexOf("<");if(o===-1||i(s,o))return s;if(o>0){const l=s[o-1],a=l===" "||l===" "||l===` -`||l==="\r",u=s[o-2];if(!a&&!((l==="n"||l==="r")&&u==="\\"))return s}const r=s.slice(o);return r.includes(">")||r.length>1&&(r[1]===" "||r[1]===" "||r[1]===` -`||r[1]==="\r")||!n(r)?s:s.slice(0,o)}function Gx(e,t){if(e===t)return;const n=e.split(/\r?\n/),i=t.split(/\r?\n/),s=[];let o=0;for(let r=0;r<i.length;r++){const l=i[r]??"";if(n[o]===l){s[r]={startLine:o,endLine:o+1},o++;continue}const a=n[o]??"";if(l!==""&&a!==l&&a.startsWith(l)){let p=l,g=-1;for(let m=r+1;m<i.length;m++){if(p+=i[m]??"",p===a){g=m;break}if(!a.startsWith(p))break}if(g!==-1){for(let m=r;m<=g;m++)s[m]={startLine:o,endLine:o+1};o++,r=g;continue}s[r]={startLine:o,endLine:o+1};continue}let u=n[o]??"",c=-1;for(let p=o+1;p<n.length;p++){if(u+=`\\n${n[p]??""}`,u===l){c=p+1;break}if(!l.startsWith(u))break}if(c!==-1){s[r]={startLine:o,endLine:c},o=c;continue}let d=-1;if(l!==""){const p=Math.min(n.length,o+80);for(let g=o;g<p;g++)if(n[g]===l){d=g;break}}if(d!==-1){s[r]={startLine:d,endLine:d+1},o=d+1;continue}const f=Math.min(Math.max(0,n.length-1),Math.max(0,o-1));s[r]={startLine:f,endLine:f+1}}return r=>{const l=Number.isFinite(r)?Math.max(0,Math.trunc(r)):0;if(l<s.length)return s[l]??{startLine:0,endLine:0};const a=s[s.length-1]??{startLine:Math.max(0,n.length-1),endLine:n.length},u=Math.min(n.length,a.endLine+l-s.length);return{startLine:u,endLine:Math.min(n.length,u+1)}}}function mhe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(g=>String(g??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const i=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===":"},o=g=>{if(!g)return!1;if(g[0]===" ")return!0;let m=0;for(let y=0;y<g.length;y++){const w=g[y];if(w===" "){if(m++,m>=4)return!0;continue}if(w===" ")return!0;break}return!1},r=g=>{let m=!1,y=!1;for(let w=0;w<g.length;w++){const k=g[w];if(k==="\\"){w++;continue}if(!y&&k==="'"){m=!m;continue}if(!m&&k==='"'){y=!y;continue}if(!m&&!y&&k===">")return w}return-1},l=g=>{let m=0;for(;m<g.length&&i(g[m]);)m++;const y=g[m];if(y!=="`"&&y!=="~")return null;let w=m;for(;w<g.length&&g[w]===y;)w++;const k=w-m;return k<3?null:{markerChar:y,markerLen:k,rest:g.slice(w)}},a=(g,m)=>{if(o(g))return-1;const y=g.replace(/^[ \t]+/,"");if(!y||y.startsWith(">")||y.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(y))return-1;let w=!1,k=0;for(;k<g.length;){const A=g[k];if(A!=="<"){i(A)||(w=!0),k++;continue}const v=r(g.slice(k));if(v===-1){w=!0,k++;continue}const x=g.slice(k,k+v+1);let S=1;for(;S<x.length&&i(x[S]);)S++;if(S>=x.length){w=!0,k++;continue}const I=x[S];if(I==="!"||I==="?"){w=!0,k+=v+1;continue}if(I==="/"){w=!0,k+=v+1;continue}const _=S;for(;S<x.length&&s(x[S]);)S++;if(S===_){w=!0,k++;continue}const E=x.slice(_,S).toLowerCase(),N=x[S];if(N&&N!==" "&&N!==" "&&N!==">"&&N!=="/"){w=!0,k++;continue}const D=new RegExp(String.raw`<\s*\/\s*${E}\s*>`,"i"),T=/\/\s*>$/.test(x),$=D.test(g.slice(k+v+1)),O=D.test(e.slice(m+k+v+1)),P=/[\r\n]/.test(e.slice(m+k+v+1));if(w&&n.has(E)&&!T&&!$&&(O||P))return k;w=!0,k+=v+1}return-1};let u=!1,c="",d=0,f="",p=0;for(;p<e.length;){const g=e.indexOf(` -`,p),m=g!==-1,y=m&&g>p&&e[g-1]==="\r",w=m?y?g-1:g:e.length,k=e.slice(p,w),A=m?y?`\r -`:` -`:"",v=l(k);let x=k;if(!u&&!v){const S=a(k,p);if(S!==-1){const I=A||` -`;x=`${k.slice(0,S).replace(/[ \t]+$/,"")}${I}${I}${k.slice(S).replace(/^[ \t]+/,"")}`}}f+=x,f+=A,v&&(u?v.markerChar===c&&v.markerLen>=d&&/^\s*$/.test(v.rest)&&(u=!1,c="",d=0):(u=!0,c=v.markerChar,d=v.markerLen)),p=m?g+1:e.length}return f}function vhe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const i=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==="-"},o=d=>{let f=0;for(;f<d.length&&i(d[f]);)f++;return d.slice(f)},r=d=>{let f=!1,p=!1;for(let g=0;g<d.length;g++){const m=d[g];if(m==="\\"){g++;continue}if(!p&&m==="'"){f=!f;continue}if(!f&&m==='"'){p=!p;continue}if(!f&&!p&&m===">")return g}return-1},l=(d,f,p)=>{const g=p.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let y=m+1;for(;y<d.length&&i(d[y]);)y++;if(y>=d.length||d[y]!=="/"){m=d.indexOf("<",m+1);continue}for(y++;y<d.length&&i(d[y]);)y++;if(y+g.length>d.length){m=d.indexOf("<",m+1);continue}let w=!0;for(let A=0;A<g.length;A++){const v=d[y+A];if((v>="A"&&v<="Z"?String.fromCharCode(v.charCodeAt(0)+32):v)!==g[A]){w=!1;break}}if(!w){m=d.indexOf("<",m+1);continue}let k=y+g.length;if(k<d.length&&s(d[k])){m=d.indexOf("<",m+1);continue}for(;k<d.length&&i(d[k]);)k++;if(k<d.length&&d[k]===">")return!0;m=d.indexOf("<",m+1)}return!1},a=d=>{let f=0;for(;f<d.length&&i(d[f]);)f++;if(f>=d.length||d[f]!=="<")return d;for(f++;f<d.length&&i(d[f]);)f++;if(f>=d.length||d[f]==="/")return d;const p=f;for(;f<d.length&&s(d[f]);)f++;if(f===p)return d;const g=d.slice(p,f).toLowerCase();if(!n.has(g))return d;const m=r(d.slice(f));if(m===-1)return d;const y=f+m;if(l(d,y+1,g))return d;const w=o(d.slice(y+1));return w?`${d.slice(0,y+1)} -${w}`:d};let u="",c=0;for(;c<e.length;){const d=e.indexOf(` -`,c);if(d===-1){u+=a(e.slice(c));break}const f=d>c&&e[d-1]==="\r",p=f?d-1:d,g=e.slice(c,p);u+=a(g),u+=f?`\r -`:` -`,c=d+1}return u}function yhe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const i=f=>f===" "||f===" ",s=f=>{let p=0,g=!1,m=0;for(;p<f.length;){for(;p<f.length&&i(f[p]);)p++;if(p>=f.length||f[p]!==">")break;for(g=!0,p++;p<f.length&&i(f[p]);)p++;m=p}return g?{prefix:f.slice(0,m),content:f.slice(m)}:null},o=f=>{let p=0;for(;p<f.length&&i(f[p]);)p++;const g=f[p];if(g!=="`"&&g!=="~")return null;let m=p;for(;m<f.length&&f[m]===g;)m++;const y=m-p;return y<3?null:{markerChar:g,markerLen:y,rest:f.slice(m)}},r=Array.from(n).map(f=>new 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(;d<e.length;){const f=e.indexOf(` -`,d),p=f!==-1,g=p&&f>d&&e[f-1]==="\r",m=p?g?f-1:f:e.length,y=e.slice(d,m),w=p?g?`\r -`:` -`:"",k=s(y),A=k?.prefix??"",v=k?.content??y,x=o(v);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 S=v;if(!l&&S.includes("</"))for(const I of r)S=S.replace(I,(_,E,N,D)=>{if(D.replace(/^[\t ]+/,"").startsWith("|"))return _;const T=D.slice(0,N).replace(/^[\t ]+/,"");if(T.length>0){const $=E.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",O=T.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!$||!O||$!==O)return _}return`${E} - -`});if(A){const I=A+S.split(` -`).join(` -${A}`);c+=I}else c+=S;c+=w,d=p?f+1:e.length}return c}function bhe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(T=>String(T??"").toLowerCase()));if(!n.size)return e;const i=T=>T===" "||T===" ",s=T=>{if(!T)return!1;if(T[0]===" ")return!0;let $=0;for(let O=0;O<T.length;O++){const P=T[O];if(P===" "){if($++,$>=4)return!0;continue}if(P===" ")return!0;break}return!1},o=T=>{const $=T.charCodeAt(0);return $>=65&&$<=90||$>=97&&$<=122||$>=48&&$<=57||T==="_"||T==="-"||T===":"},r=T=>{let $=0;for(;$<T.length&&i(T[$]);)$++;return T.slice($)},l=T=>{let $=0,O=!1,P=0;for(;$<T.length;){for(;$<T.length&&i(T[$]);)$++;if($>=T.length||T[$]!==">")break;for(O=!0,$++;$<T.length&&i(T[$]);)$++;P=$}if(!O)return null;const R=T.slice(0,P);return{prefix:R,key:R.replace(/[ \t]+$/,""),content:T.slice(P)}},a=T=>r(T).startsWith("<"),u=T=>{for(let $=0;$<T.length;$++){const O=T[$];if(O!==" "&&O!==" ")return!1}return!0},c=T=>{if(s(T))return"";const $=r(T);if(!$.startsWith("<"))return"";let O=1;for(;O<$.length&&i($[O]);)O++;if(O>=$.length||$[O]==="/"||$[O]==="!"||$[O]==="?")return"";const P=O;for(;O<$.length&&o($[O]);)O++;if(O===P)return"";const R=$.slice(P,O).toLowerCase();if(!n.has(R))return"";const j=$[O];return j&&j!==" "&&j!==" "&&j!==">"&&j!=="/"?"":R},d=T=>{if(s(T))return null;const $=r(T);if(!$.startsWith("<"))return null;let O=1;for(;O<$.length&&i($[O]);)O++;if(O>=$.length)return null;const P=$[O]==="/";if(P)for(O++;O<$.length&&i($[O]);)O++;const R=$[O];if(!R||R==="!"||R==="?")return null;const j=O;for(;O<$.length&&o($[O]);)O++;if(O===j)return null;const z=$.slice(j,O).toLowerCase();if(!n.has(z))return null;const K=$[O];if(K&&K!==" "&&K!==" "&&K!==">"&&K!=="/")return null;if(P)return{type:"close",name:z};if(/\/\s*>\s*$/.test($))return{type:"open",name:z,complete:!0};const q=$.indexOf(">",O);if(q!==-1){const W=$.slice(q+1);if(new RegExp(`<\\s*\\/\\s*${z}\\s*>`,"i").test(W))return{type:"open",name:z,complete:!0}}return{type:"open",name:z,complete:!1}},f=T=>{if(s(T))return null;const $=r(T).replace(/[ \t]+$/,"");if(!$.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test($))return null;const O=$.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(O?.[1])return O[1].toLowerCase();const P=$.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!P?.[1]||!P[2])return null;const R=P[1].toLowerCase();return R===P[2].toLowerCase()?R:null};let p=!1,g="",m=0;const y=T=>{let $=0;for(;$<T.length&&i(T[$]);)$++;const O=T[$];if(O!=="`"&&O!=="~")return null;let P=$;for(;P<T.length&&T[P]===O;)P++;const R=P-$;return R<3?null:{markerChar:O,markerLen:R,rest:T.slice(P)}},w=T=>y(T),k=T=>{const $=r(T);return $?s(T)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test($):!1},A=(T,$,O)=>{let P=T,R=0;for(;P<e.length;){const j=e.indexOf(` -`,P),z=j!==-1,K=z&&j>P&&e[j-1]==="\r",q=z?K?j-1:j:e.length,W=e.slice(P,q),Z=l(W),ne=Z?.key??"";if(R>0&&$&&ne!==$)break;const X=Z?.content??W,ue=d(X);if(ue?.name===O){if(ue.type==="open")ue.complete||R++;else if(R>0&&(R--,R===0))return!1}else if(R>0&&(u(X)||k(X)))return!0;if(z)P=j+1;else break}return!1};let v="",x=0,S=!0,I=!1,_=!1,E=` -`;const N=[];let D="";for(;x<e.length;){const T=e.indexOf(` -`,x),$=T!==-1,O=$&&T>x&&e[T-1]==="\r",P=$?O?T-1:T:e.length,R=e.slice(x,P),j=$?O?`\r -`:` -`:"",z=l(R),K=z?.key??"",q=z?.content??R,W=w(q);W&&(p?W.markerChar===g&&W.markerLen>=m&&/^\s*$/.test(W.rest)&&(p=!1,g="",m=0):(p=!0,g=W.markerChar,m=W.markerLen));const Z=N.length>0;if(!p&&!Z){const X=c(q),ue=!!X&&!S&&I&&_&&A(x,K,X);X&&!S&&(!I||ue)&&(K&&D&&K===D?v+=`${K}${E}`:K||(v+=E))}if(v+=R,v+=j,j&&(E=j),!p){const X=d(q);if(X){if(X.type==="open")X.complete||N.push(X.name);else for(let ue=N.length-1;ue>=0;ue--)if(N[ue]===X.name){N.length=ue;break}}}const ne=u(q);S=ne,I=!ne&&a(q),_=!ne&&!!f(q),D=K,x=$?T+1:e.length}return v}function khe(e){let t=!1,n="",i=0,s=!1,o=!1,r=!1,l=0;const a=(c,d)=>{const f=xb(c);if(f){t?f.markerChar===n&&f.markerLen>=i&&/^\s*$/.test(f.rest)&&(t=!1,n="",i=0):(t=!0,n=f.markerChar,i=f.markerLen);return}if(t)return;let p=0;for(;p<c.length;){if(s){c.startsWith("$$",p)&&!$l(c,p)?(s=!1,p+=2):p++;continue}if(o){c.startsWith("\\]",p)&&!$l(c,p)?(o=!1,p+=2):p++;continue}const g=c[p];if(g==="`"){const m=_b(c,p,"`"),y=qF(c,p+m,m);if(y===-1)break;p=y+m;continue}if(g==="\\"){const m=c[p+1];m==="["&&!$l(c,p)?(o=!0,p+=2):(m==="]"&&$l(c,p),p+=2);continue}if(g==="$"){if(c[p+1]==="$"&&!$l(c,p)){s=!0,r=!1,p+=2;continue}if(r){r=!1,p++;continue}const m=c[p+1];(m===void 0||m!==" "&&m!==" "&&!/\d/.test(m))&&(r=!0),p++;continue}p++}};return{scanTo:c=>{for(;l<c;){const d=e.indexOf(` -`,l),f=d===-1||d>=c?c:d,p=f>l&&e[f-1]==="\r"?f-1:f;if(a(e.slice(l,p)),d===-1||d>=c){l=c;break}r=!1,l=d+1}},inMath:()=>s||o||r}}function Oy(e,t,n,i){let s=e.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2");const o=khe(s);if(s=s.replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,(r,l,a,u)=>{o.scanTo(u+1);const c=o.inMath();return o.scanTo(u+r.length),c?`${l}\\n${a}`:r}),t||(s.endsWith("- *")&&(s=s.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*-\s*$/,r=>r.startsWith(` -`)?` -`:""):/(?:^|\n)\s*--\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*--\s*$/,r=>r.startsWith(` -`)?` -`:""):/(?:^|\n)\s*>\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*>\s*$/,r=>r.startsWith(` -`)?` -`:""):/\n\s*[*+]\s*$/.test(s)?s=s.replace(/\n\s*[*+]\s*$/,` -`):/(?:^|\n)\s*\d+\s*$/.test(s)?/^\d+$/.test(s.trim())||(s=s.replace(/(?:^|\n)\s*\d+\s*$/,r=>r.startsWith(` -`)?` -`:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(s)?s=s.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(r,l,a)=>`${l}${a.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*\d+[.)]\s*$/,r=>r.startsWith(` -`)?` -`:""):/\n[[(]\n*$/.test(s)&&(s=s.replace(/(\n\[|\n\()+\n*$/g,` -`)),s=P1e(s,i.customHtmlTags)??s),i.customHtmlTags?.length&&s.includes("<")){const r=od(i.customHtmlTags);if(r.length&&(s=mhe(s,r),s=vhe(s,r),s=bhe(s,r),s=yhe(s,r),s.includes("</")))for(const l of r){const a=new RegExp(String.raw`(^[\t ]*<\s*\/\s*${l}\s*>[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");s=s.replace(a,"$1$2$2")}}return t||(s=ghe(s)),s}function Ahe(e,t,n,i){const s=e,o=`${n?"final":"stream"}:${(i.customHtmlTags??[]).join(",")}`,r=n8.get(s);let l;if(!n&&!i.customHtmlTags?.length&&r&&r.mode===o&&t.length>=r.source.length&&t.startsWith(r.source)){const a=Math.max(0,r.source.length-v1e-y1e),u=Oy(t.slice(a),n,e,i),c=r.source.length-a;l=u.length>=c&&u.slice(0,c)===r.safeMarkdown.slice(-c)?r.safeMarkdown.slice(0,r.safeMarkdown.length-c)+u:Oy(t,n,e,i)}else l=Oy(t,n,e,i);return n||(l=j1e(l,e)),n8.set(s,{source:t,safeMarkdown:l,mode:o}),l}function QF(e,t,n={}){const i=zF(n),s=i?Xr():0,o=!!n.final,r=(e??"").toString();L1e(t,n)&&(t.stream.reset(),N1e(t),n8.delete(t));const l=Ahe(t,r,o,n);i&&pu(i,"safeMarkdownMs",Xr()-s);const a=Q1e(l);if(a){if(n.includeSourceMap){const x={...n,__sourceLineMapper:Gx(r,l)};a[0].sourceMap=ip(l,0,l.length,x)}const A=n.preTransformTokens,v=n.postTransformTokens;if(kb(t,n)||typeof A=="function"||typeof v=="function"){const x=Wx(t,l,{__markstreamFinal:o},n),S=typeof A=="function"&&A(x)||x;typeof v=="function"&&v(S)}return zx(a,n,i,s)}const u=i?Xr():0,c=Wx(t,l,{__markstreamFinal:o},n);if(i&&pu(i,"tokenizeMs",Xr()-u),!c||!Array.isArray(c))return zx([],n,i,s);const d=n.preTransformTokens,f=n.postTransformTokens;let p=c;d&&typeof d=="function"&&(p=d(p)||p);const g=t,m=typeof g.validateLink=="function"&&g.__markstreamOriginalValidateLink&&g.validateLink!==g.__markstreamOriginalValidateLink?g.validateLink:void 0,y=n.validateLink??m??g.options?.validateLink??(typeof g.validateLink=="function"?g.validateLink:void 0),w={...n,validateLink:y,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?Gx(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let k=M1e(t,l,p,w,i);if(f&&typeof f=="function"){const A=f(p);if(Array.isArray(A)){const v=A[0],x=v?.type;v&&typeof x=="string"?k=Pd(A,{...w,__customHtmlBlockCursor:0},i):k=A}}if(che(k)){const A=i?Xr():0;k=phe(k,o,l,w),k=GF(k,l,t,w,o)[0],k=uhe(k,t,w,o),i&&pu(i,"htmlBlockPassesMs",Xr()-A)}if(o){const A=new WeakSet,v=x=>{if(!x||typeof x!="object"||A.has(x))return;if(A.add(x),Array.isArray(x)){for(const I of x)v(I);return}const S=x;S.type==="html_block"&&S.loading===!0&&(S.loading=!1);for(const I of Object.values(S))v(I)};v(k)}return k=OF(k,n),n.debug&&console.log("Parsed Markdown Tree Structure:",k),RF(k,i,s)}function Qx(e,t){if(!e||!Array.isArray(e))return[];const n=[],i=Pu(t),s=t?.__linkifyDemotionSeed;if(Array.isArray(s)&&s.length)for(const l of s)i.remember(String(l??""));const o=t?.includeSourceMap===!0;let r=0;for(;r<e.length;){const l=bb(e,r,i.options(),yb);if(l){Sl(l[0],e[r],t),n.push(l[0]),i.remember(l[0].raw),r=l[1];continue}const a=e[r];switch(a.type){case"paragraph_open":{const u=String(e[r+1]?.content??""),c=p1e(e,r,i.options(u));o&&Zn(c,a,t);const d=Kx(c,t);if(d){o&&Ux(d,c);for(const f of d)Sl(f,a,t);n.push(...d)}else Sl(c,a,t),n.push(c);i.remember(c.raw),r+=3;break}case"bullet_list_open":case"ordered_list_open":{const[u,c]=qf(e,r,i.options());o&&Zn(u,a,t),Sl(u,a,t),n.push(u),i.remember(u.raw),r=c;break}case"blockquote_open":{const[u,c]=Uf(e,r,i.options());o&&Zn(u,a,t),Sl(u,a,t),n.push(u),i.remember(u.raw),r=c;break}case"footnote_anchor":{const u=a.meta??{},c={type:"footnote_anchor",id:String(u.label??a.content??""),raw:String(a.content??"")};o&&Zn(c,a,t),Sl(c,a,t),n.push(c),i.remember(String(a.content??"")),r++;break}case"hardbreak":n.push(h1e()),i.reset(),r++;break;case"text":{const u=String(a.content??""),c={type:"paragraph",raw:u,children:u?[{type:"text",content:u,raw:u}]:[]};o&&Zn(c,a,t),Sl(c,a,t),n.push(c),i.remember(u),r++;break}case"inline":{const u=String(a.content??""),c=Wi(a.children||[],u,void 0,i.options(u));if(c.length!==0)if(c.every(d=>d.type==="html_block")){if(o)for(const d of c)Zn(d,a,t);for(const d of c)Sl(d,a,t);n.push(...c)}else{const d={type:"paragraph",raw:u,children:c};o&&Zn(d,a,t);const f=Kx(d,t);if(f){o&&Ux(f,d);for(const p of f)Sl(p,a,t);n.push(...f)}else Sl(d,a,t),n.push(d)}i.remember(u)}r+=1;break;default:r+=1;break}}return n}const Che=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g,bh=/\d/u,whe=/[,.!?;:,。;、!?:]/u,xhe=/\d\p{Script=Han}{1,3}$/u;function _he(e){return e.pos>0&&e.pos+1<e.posMax&&bh.test(e.src[e.pos-1])&&bh.test(e.src[e.pos+1])}function She(e,t,n,i,s,o={}){const r=e.charCodeAt(0);return(l,a)=>{const u=l,c=u.posMax,d=u.pos;if(u.src.charCodeAt(d)!==r||a||o.refuseDigitRange&&_he(u))return!1;u.pos=d+1;let f=!1;for(;u.pos<c;){if(u.src.charCodeAt(u.pos)===r){f=!0;break}u.md.inline.skipToken(u)}if(!f||d+1===u.pos)return u.pos=d,!1;const p=u.src.slice(d+1,u.pos);if(!p||p.match(/(^|[^\\])(\\\\)*\s/))return u.pos=d,!1;const g=u.src[u.pos+1],m=bh.test(p[0]),y=g!==void 0&&bh.test(g);if(m&&y&&(xhe.test(u.src.slice(0,d))||whe.test(p)||bh.test(p[p.length-1])))return u.pos=d,!1;const w=u.push(n,s,1);w.markup=t;const k=u.push("text","",0);k.content=p.replace(Che,"$1");const A=u.push(i,s,-1);return A.markup=t,u.pos=u.pos+1,!0}}function Mhe(e){const t=She("~","~","sub_open","sub_close","sub",{refuseDigitRange:!0});e.inline.ruler.after("emphasis","sub",t)}const Ihe=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,Ehe=new Set([...xp,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),The=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 Yx(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Lhe(e){return typeof e=="string"?e:e==null?"":String(e)}function YF(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function ru(e){return Lhe(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function JF(e){return ru(e).replace(/`/g,"`")}function Cv(e){return String(e??"").trim().toLowerCase()}function Sb(e,t="safe"){const n=Cv(e);return n?t==="escape"?!0:t==="trusted"?xp.has(n):!The.has(n):!1}function XF(e,t="safe"){const n=Cv(e);return n?t==="escape"?!0:t==="trusted"?xp.has(n):Ehe.has(n):!1}function Jx(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,i])=>i===""?` ${n}`:` ${n}="${JF(i)}"`).join("")}function eB(e){const t=e.startsWith("/"),n=t?e.slice(1):e,i=n.match(Ihe);return i?{attrsStr:t?"":n.slice(i[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:i[1]}:null}function Nhe(e,t){const n=e.split(",").map(i=>i.trim()).filter(Boolean);return n.length===0?!1:n.some(i=>{const s=i.split(/\s+/,1)[0]??"";return!s||Dc(s,{tagName:t,attrName:"srcset"})})}function tB(e,t,n,i){return pue.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?Nhe(t,i):!!(gue.has(e)&&t&&Dc(t,{tagName:i,attrName:e}))}function wc(e,t){const n=t.toLowerCase();return Object.keys(e).find(i=>i.toLowerCase()===n)}function nB(e,t,n,i=!1){if(t!=="safe"||Cv(n)!=="a")return e;const s=wc(e,"href");if(i&&(!s||!e[s])){const a=wc(e,"target"),u=wc(e,"rel");return a&&delete e[a],u&&delete e[u],e}const o=wc(e,"target");if((o?String(e[o]).trim():"").toLowerCase()!=="_blank")return e;const r=wc(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 Xx(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!YF(r)||tB(l,o,t,n)||(i[r]=o)}return nB(i,t,n,!!wc(e,"href"))}function iB(e,t){const n=e.toLowerCase();return KN.has(n)?!1:Yx(t,n)||Yx(t,e)}function Mb(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!YF(r)||tB(l,o,t,n)||(i[r]=o)}return nB(i,t,n,!!wc(e,"href"))}function kh(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,i]of e)n&&(t[String(n)]=i==null?"":String(i));return t}function Fg(e,t="safe",n){const i=Mb(kh(e),t,n),s=Object.entries(i).map(([o,r])=>[o,r]);return s.length>0?s:void 0}function Fhe(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 i=Number(e);if(e!==""&&!Number.isNaN(i))return i}return e}function Bhe(e){const t={};for(const[n,i]of Object.entries(e))t[n]=Fhe(i,n);return t}function Py(e){return e.trim().length>0}function sB(e){const t=[];let n=0;for(;n<e.length;){if(e.startsWith("<!--",n)){const r=e.indexOf("-->",n);if(r!==-1){n=r+3;continue}break}const i=e.indexOf("<",n);if(i===-1){if(n<e.length){const r=e.slice(n);Py(r)&&t.push({type:"text",content:r})}break}if(i>n){const r=e.slice(n,i);Py(r)&&t.push({type:"text",content:r})}if(e.startsWith("![CDATA[",i+1)){const r=e.indexOf("]]>",i);if(r!==-1){t.push({type:"text",content:e.slice(i,r+3)}),n=r+3;continue}break}if(e.startsWith("!",i+1)){const r=e.indexOf(">",i);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=eB(e.slice(i+1,s));if(!o){const r=e.slice(i,s+1);Py(r)&&t.push({type:"text",content:r}),n=s+1;continue}if(o.isClosing)t.push({type:"tag_close",tagName:o.tagName});else{const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||_u.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r})}n=s+1}return t}function $he(e){const t=[];let n=0;for(;n<e.length;){if(e.startsWith("<!--",n)){const l=e.indexOf("-->",n);if(l!==-1){n=l+3;continue}break}const i=e.indexOf("<",n);if(i===-1){n<e.length&&t.push({type:"text",content:e.slice(n)});break}if(i>n&&t.push({type:"text",content:e.slice(n,i)}),e.startsWith("![CDATA[",i+1)){const l=e.indexOf("]]>",i);if(l!==-1){t.push({type:"text",content:e.slice(i,l+3)}),n=l+3;continue}break}if(e.startsWith("!",i+1)){const l=e.indexOf(">",i);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=eB(e.slice(i+1,s));if(!o){t.push({type:"text",content:e.slice(i,s+1)}),n=s+1;continue}if(o.isClosing){t.push({type:"tag_close",tagName:o.tagName}),n=s+1;continue}const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||_u.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r}),n=s+1}return t}function Dhe(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${ru(t)}>`;const n=Object.entries(e.attrs??{}).map(([i,s])=>s===""?` ${ru(i)}`:` ${ru(i)}="${JF(s)}"`).join("");return e.type==="self_closing"?`<${ru(t)}${n} />`:`<${ru(t)}${n}>`}function zhe(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of sB(e))if((n.type==="tag_open"||n.type==="self_closing")&&iB(n.tagName??"",t))return!0;return!1}function gf(e,t="safe"){if(!e)return"";if(t==="escape")return ru(e);const n=$he(e),i=[],s=[],o=[];for(const r of n){if(r.type==="text"){o.length===0&&s.push(ru(r.content??""));continue}const l=Cv(r.tagName);if(!l)continue;if(XF(l,t)){r.type==="tag_open"?o.push(l):r.type==="tag_close"&&o[o.length-1]===l&&o.pop();continue}if(o.length>0)continue;if(t==="safe"&&Sb(l,t)){s.push(Dhe(r));continue}if(r.type==="self_closing"){s.push(`<${l}${Jx(Xx(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${Jx(Xx(r.attrs??{},t,l))}>`),_u.has(l)||i.push(l);continue}const a=i.lastIndexOf(l);if(a===-1)continue;for(;i.length>a+1;){const c=i.pop();c&&s.push(`</${c}>`)}const u=i.pop();u&&s.push(`</${u}>`)}for(;i.length>0;){const r=i.pop();r&&s.push(`</${r}>`)}return s.join("")}const Rhe=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],e_="http://www.w3.org/2000/svg",Ohe=new Set(["script","style","iframe","object","embed","link","meta"]),Phe=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"]),jhe=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),Hhe=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),Whe=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function qhe(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function Uhe(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function Khe(e){const t=e.nodeName.toLowerCase();return t==="use"?qhe(e):t==="image"?Uhe(e):t==="text"||t==="tspan"?!!e.textContent?.trim():Whe.has(t)}function Vhe(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 Zhe(e,t,n){const i=e.toLowerCase(),s=t.toLowerCase(),o=String(n??"").trim();return o?(i==="use"||i==="marker"||i==="clippath"||i==="mask")&&(s==="href"||s==="xlink:href")?o.startsWith("#")?o:"":i==="a"&&(s==="href"||s==="xlink:href")?Dc(o,{tagName:"a",attrName:"href"})?"":o:i==="image"&&(s==="href"||s==="xlink:href"||s==="src")?Dc(o,{tagName:"img",attrName:"src"})?"":o:s==="href"||s==="xlink:href"?o.startsWith("#")?o:"":Dc(o,{tagName:i,attrName:s})?"":o:""}function Ghe(e,t){let n=t+4;for(;n<e.length&&/\s/.test(e[n]??"");)n++;const i=e[n];if(i==='"'||i==="'"){const o=n+1,r=e.indexOf(i,o);if(r===-1)return{next:e.length,url:""};for(n=r+1;n<e.length&&/\s/.test(e[n]??"");)n++;return{next:n<e.length&&e[n]===")"?n+1:n,url:e.slice(o,r)}}const s=n;for(;n<e.length&&e[n]!==")";)n++;return{next:n<e.length?n+1:n,url:e.slice(s,n)}}function oB(e){return e.replace(/\\([0-9a-f]{1,6}\s?|.)/gi,(t,n)=>{const i=n.trim();if(/^[0-9a-f]+$/i.test(i)){const s=Number.parseInt(i,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function rB(e){const t=oB(e),n=t.toLowerCase();let i=0;for(;i<n.length;){const s=n.indexOf("url(",i);if(s===-1)return!1;const o=Ghe(t,s);if(i=Math.max(o.next,s+4),!o.url.trim().startsWith("#"))return!0}return!1}function t_(e){const t=oB(e);return Rhe.some(n=>n.test(t))||rB(t)}function Qhe(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 G0(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function lB(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,i=n.tagName.toLowerCase();if(!Ohe.has(i)){if(i==="br"){t.push(` -`);return}for(const s of Array.from(n.childNodes))lB(s,t)}}function Yhe(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];lB(t,n);const i=n.join("").split(/\r?\n/).map(c=>c.trim()).filter(Boolean);if(!i.length){t.remove();continue}const s=G0(t.getAttribute("width")),o=G0(t.getAttribute("height")),r=G0(t.getAttribute("x")),l=G0(t.getAttribute("y")),a=e.ownerDocument.createElementNS(e_,"text");a.setAttribute("x",String(r+s/2)),a.setAttribute("y",String(l+o/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")),i.length===1)a.textContent=i[0];else{const c=-.6*(i.length-1);for(const[d,f]of i.entries()){const p=e.ownerDocument.createElementNS(e_,"tspan");p.setAttribute("x",String(r+s/2)),p.setAttribute("dy",d===0?`${c}em`:"1.2em"),p.textContent=f,a.appendChild(p)}}t.parentNode?.replaceChild(a,t)}}function Jhe(e){Yhe(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const i=n.tagName.toLowerCase();if(!Phe.has(i)){n.remove();continue}if(i==="style"&&t_(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const o of s){const r=o.name.toLowerCase();if(/^on/i.test(r)){n.removeAttribute(o.name);continue}if(r==="style"&&o.value&&t_(o.value)){n.removeAttribute(o.name);continue}if(r==="srcdoc"){n.removeAttribute(o.name);continue}if(jhe.has(r)&&o.value){const l=Zhe(i,r,o.value);if(!l){n.removeAttribute(o.name);continue}l!==o.value&&n.setAttribute(o.name,l);continue}if(Hhe.has(r)&&o.value&&rB(o.value)){n.removeAttribute(o.name);continue}if(o.value){const l=Vhe(o.value);l!==o.value&&n.setAttribute(o.name,l)}}Qhe(n)}}function iYe(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 Jhe(n),Xhe(n)?null:n}catch{return null}}function Xhe(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const o=Number.parseFloat(s[2]||""),r=Number.parseFloat(s[3]||"");if(!Number.isFinite(o)||!Number.isFinite(r)||o<=0||r<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let i=!1;for(const s of n){Khe(s)&&(i=!0);for(const o of Array.from(s.attributes))if(/\bNaN\b/i.test(o.value)||o.name==="style"&&/max-width:\s*0(?:px)?/i.test(o.value))return!0}return!i}const Q0=[];function jy(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function epe(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function tpe(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function n_(e=`editor-${Date.now()}`,t={}){const n=Fde(t),i=n;i.__markstreamRegisteredPluginCount=Q0.length,i.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||Q0.length);const s={"common.copy":"Copy"};let o;if(typeof t.i18n=="function")o=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const p=t.i18n;o=g=>p[g]??s[g]??g}else o=p=>s[p]??p;if(Array.isArray(t.plugin))for(const p of t.plugin){const g=p;if(Array.isArray(g)){const[m,...y]=g;typeof m=="function"&&n.use(m,...y)}else typeof g=="function"&&n.use(g)}if(Array.isArray(t.apply))for(const p of t.apply)try{p(n)}catch(g){console.error("[getMarkdown] apply function threw an error",g)}if(Q0.length)for(const p of Q0)if(Array.isArray(p)){const[g,...m]=p;typeof g=="function"&&n.use(g,...m)}else typeof p=="function"&&n.use(p);n.use(Mhe),n.use(Xse),n.use(Qse);const r=foe,l=r.default??r;n.use(l),n.use(Gse),n.use(Zse),n.core.ruler.after("block","mark_fence_closed",p=>{const g=p,m=g.src,y=!!g.env?.__markstreamFinal,w=m.split(/\r?\n/);for(const k of g.tokens){if(k.type!=="fence"||!k.map||!k.markup)continue;const A=k.map[0],v=k.map[1],x=k.markup,S=x[0],I=x.length,_=w[Math.max(0,v-1)]??"";let E=0;for(;E<_.length&&(_[E]===" "||_[E]===" ");)E++;let N=0;for(;E+N<_.length&&_[E+N]===S;)N++;let D=E+N;for(;D<_.length&&(_[D]===" "||_[D]===" ");)D++;const T=y?!0:v>A+1&&N>=I&&D===_.length,$=k;$.meta=$.meta??{},$.meta.unclosed=!T,$.meta.closed=!!T}}),n.renderer.rules.fence=(p,g)=>{const m=p[g],y=String(m.info??"").trim(),w=String(m.content??""),k=btoa(unescape(encodeURIComponent(w))),A=epe(y),v=jy(A),x=tpe(`editor-${e}-${g}-${A}`),S=jy(o("common.copy"));return`<div class="code-block" data-code="${k}" data-lang="${v}" id="${x}"> - <div class="code-header"> - <span class="code-lang">${jy(A.toUpperCase())}</span> - <button class="copy-button" data-code="${k}">${S}</button> - </div> - <div class="code-editor"></div> - </div>`};const a=/^\[(\d+)\]/,u=/^\[([^\]\n]+)\]/,c=p=>{if(!p.startsWith("["))return!1;const g=u.exec(p);if(!g)return p!=="["&&!/^\[\d+$/.test(p);const m=String(g[1]??"");return p.slice(g[0].length).startsWith("(")?!1:!/^\d+$/.test(m)},d=(p,g)=>{const m=p;if(m.src[m.pos]!=="[")return!1;const y=a.exec(m.src.slice(m.pos));if(!y)return!1;const w=m.src.slice(Math.max(0,m.pos-120),m.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(w))return!1;const k=m.src.slice(m.pos+y[0].length);if(k.startsWith("](")||k.startsWith("(")||c(k))return!1;if(!g){const A=y[1],v=m.push("reference","span",0);v.content=A,v.markup=y[0],v.raw=y[0]}return m.pos+=y[0].length,!0};n.inline.ruler.before("escape","reference",d),n.renderer.rules.reference=(p,g)=>{const y=String(p[g].content??"");return`<span class="reference-link" data-reference-id="${y}" role="button" tabindex="0" title="Click to view reference">${y}</span>`};const f=n.use.bind(n);return n.use=((...p)=>(i.__markstreamHasCustomParserExtensions=!0,f(...p))),n}function npe({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 aB({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:i,streamRenderVersionChanged:s=!1}){const o=`${n.settledContent}${n.streamedDelta}`;return i?n.streamedDelta&&o===e?s?{settledContent:o,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:npe({nextContent:e,previousContent:t??o,typewriterEnabled:i}):{settledContent:e,streamedDelta:"",appended:!1}}const ipe={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 spe(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function uB(e){const t=spe(e);return ipe[t]??t}function ope(e){if(!Array.isArray(e))return;const t=e.filter(i=>typeof i=="string").map(i=>uB(i)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function rpe(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const i of e){if(typeof i!="string")continue;const s=i.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function lpe(e){return rpe(e)?.join("\0")??""}function ape(e,t){return`${lpe(e)}\0\0${ope(t)?.join("\0")??""}`}function Ld(e,t,n=1){const i=Number(e);return Number.isFinite(i)?Math.max(n,i):t}function i_(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var upe=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,p=this.pendingChars<=0;if(this.source+=d,p){const g=s_();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=s_();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.startedAt<this.normalizedStartDelayMs){this.rafId=requestAnimationFrame(this.tick);return}const f=1e3/Math.max(1,this.maxCommitFps),p=Math.min(100,Math.max(0,d-this.lastTick));if(p<f){this.rafId=requestAnimationFrame(this.tick);return}this.lastTick=d;const g=this.pendingChars,m=g>this.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,y=hpe(g/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(y-this.currentCps)*.2,this.charBudget+=this.currentCps*(p/1e3),this.charBudget<1){this.ensureLoop();return}const w=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),k=fpe(this.source.slice(this.visible.length),w,this.segmenter);k.text&&(this.visible+=k.text,this.charBudget=Math.max(0,this.charBudget-k.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:i=1e3,targetLatencyMs:s=900,catchUpLatencyMs:o=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(i,1e3,1)),this.normalizedTargetLatencyMs=Ld(s,900,1),this.normalizedCatchUpLatencyMs=Ld(o,350,1),this.normalizedCatchUpThreshold=i_(r,600),this.normalizedStartDelayMs=i_(a,80),this.maxCommitFps=Math.trunc(Ld(l,30,1)),this.maxCharsPerCommit=Math.trunc(Ld(u,80,1)),this.flushOnFinish=c,this.segmenter=dpe(),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 cpe(e={},t){const n=new upe(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 dpe(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function fpe(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const o=Array.from(e).slice(0,t);return{text:o.join(""),graphemeCount:o.length}}let i="",s=0;for(const o of n.segment(e)){if(s>=t)break;i+=o.segment,s++}return{text:i,graphemeCount:s}}function s_(){return typeof performance<"u"?performance.now():Date.now()}function hpe(e,t,n){return Math.min(n,Math.max(t,e))}var ppe=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const s8=Symbol.for("markstream-vue:node-lifecycle");function sYe(){}const Ib=new Map;let cB="material";const Qd=new Map,o_=new Map;let o8=null;function gpe(e){Ib.set(e.id,e)}function mpe(e){const t=Ib.get(cB);if(!t)return;const n=t.core[e];if(n)return n;const i=Qd.get(t.id);if(i){const s=i[e];if(s)return s}t.loadExtended&&!Qd.has(t.id)&&ype(t)}function vpe(){var e,t;return(t=(e=Ib.get(cB))==null?void 0:e.fallback)!=null?t:""}function ype(e){return ppe(this,null,function*(){var t,n,i;if(Qd.has(e.id))return(t=Qd.get(e.id))!=null?t:null;let s=o_.get(e.id);return s||(s=((i=(n=e.loadExtended)==null?void 0:n.call(e))!=null?i:Promise.resolve(null)).then(o=>(Qd.set(e.id,o),o8?.(),o)).catch(()=>(Qd.set(e.id,null),null)),o_.set(e.id,s)),s})}const r_='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>',l_='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>',bpe={id:"material",core:{"":l_,plain:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>',text:l_,javascript:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ffca28" d="M2 2v12h12V2zm6 6h1v4a1.003 1.003 0 0 1-1 1H7a1.003 1.003 0 0 1-1-1v-1h1v1h1zm3 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>',typescript:'<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 16 16"><path fill="#0288d1" d="M2 2v12h12V2zm4 6h3v1H8v4H7V9H6zm5 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>',jsx:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00bcd4" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#00bcd4" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#00bcd4" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#00bcd4" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>',tsx:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#0288d1" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#0288d1" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#0288d1" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>',html:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e65100" d="m4 4 2 22 10 2 10-2 2-22Zm19.72 7H11.28l.29 3h11.86l-.802 9.335L15.99 25l-6.635-1.646L8.93 19h3.02l.19 2 3.86.77 3.84-.77.29-4H8.84L8 8h16Z"/></svg>',css:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7e57c2" d="M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/></svg>',scss:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ec407a" d="M27.837 5.673a4.33 4.33 0 0 0-2.293-2.701c-2.362-1.261-6.11-1.298-9.548-.092a26.3 26.3 0 0 0-8.76 4.966c-2.752 2.542-3.438 4.925-3.189 6.194.523 2.668 3.274 4.539 5.485 6.042.418.284.822.559 1.175.816-1.429.76-4.261 2.444-5.088 4.248a3.88 3.88 0 0 0-.118 3.332A2.37 2.37 0 0 0 6.869 29.8a5.6 5.6 0 0 0 1.49.2 6.35 6.35 0 0 0 5.19-2.856 6.74 6.74 0 0 0 .864-5.382 7.3 7.3 0 0 1 2.044-.03 3.92 3.92 0 0 1 2.816 1.311 1.82 1.82 0 0 1 .423 1.262 1.55 1.55 0 0 1-.772 1.05c-.234.14-.586.355-.504.803.036.194.198.633.894.512a2.93 2.93 0 0 0 2.145-2.651 4 4 0 0 0-1.197-2.904 5.94 5.94 0 0 0-4.396-1.626 10.6 10.6 0 0 0-2.672.304 20 20 0 0 0-2.203-1.846c-1.712-1.3-3.33-2.529-3.235-4.26.125-2.263 2.468-4.532 6.964-6.744 4.016-1.976 7.254-2.037 8.944-1.438a2 2 0 0 1 1.204.883 2.77 2.77 0 0 1-.36 2.47 9.71 9.71 0 0 1-7.425 4.304 3.86 3.86 0 0 1-3.238-.757c-.278-.302-.593-.645-1.074-.383q-.565.31-.225 1.189a3.9 3.9 0 0 0 2.407 1.92 11.7 11.7 0 0 0 7.128-.671c3.527-1.35 6.681-5.202 5.756-8.787M11.895 24.475a4 4 0 0 1-.192.468 4.5 4.5 0 0 1-.753 1.081 2.83 2.83 0 0 1-2.533 1.107c-.056-.032-.078-.146-.085-.193a3.28 3.28 0 0 1 1.076-2.284 11.3 11.3 0 0 1 2.644-1.933 3.85 3.85 0 0 1-.157 1.754"/></svg>',json:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="#f9a825" d="M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80z"/></svg>',python:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M9.86 2A2.86 2.86 0 0 0 7 4.86v1.68h4.29c.39 0 .71.57.71.96H4.86A2.86 2.86 0 0 0 2 10.36v3.781a2.86 2.86 0 0 0 2.86 2.86h1.18v-2.68a2.85 2.85 0 0 1 2.85-2.86h5.25c1.58 0 2.86-1.271 2.86-2.851V4.86A2.86 2.86 0 0 0 14.14 2zm-.72 1.61c.4 0 .72.12.72.71s-.32.891-.72.891c-.39 0-.71-.3-.71-.89s.32-.711.71-.711"/><path fill="#fdd835" d="M17.959 7v2.68a2.85 2.85 0 0 1-2.85 2.859H9.86A2.85 2.85 0 0 0 7 15.389v3.75a2.86 2.86 0 0 0 2.86 2.86h4.28A2.86 2.86 0 0 0 17 19.14v-1.68h-4.291c-.39 0-.709-.57-.709-.96h7.14A2.86 2.86 0 0 0 22 13.64V9.86A2.86 2.86 0 0 0 19.14 7zM8.32 11.513l-.004.004.038-.004zm6.54 7.276c.39 0 .71.3.71.89a.71.71 0 0 1-.71.71c-.4 0-.72-.12-.72-.71s.32-.89.72-.89"/></svg>',ruby:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#f44336" d="M18.041 3.177c2.24.382 2.879 1.919 2.843 3.527V6.67l-1.013 13.266-13.132.897h.008c-1.093-.044-3.518-.151-3.634-3.545l1.217-2.222 2.462 5.74 2.097-6.77-.045.009.018-.018 6.85 2.186L13.945 9.3l6.53-.409-5.144-4.212 2.71-1.51v.009M3.113 17.252v.017zM6.916 6.874c2.63-2.622 6.033-4.168 7.34-2.844 1.297 1.306-.072 4.523-2.702 7.135-2.666 2.613-6.015 4.248-7.322 2.933-1.306-1.324.036-4.612 2.675-7.224z"/></svg>',go:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00acc1" d="M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5"/><path fill="#00acc1" d="M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z"/></svg>',java:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M4 26h24v2H4zM28 4H7a1 1 0 0 0-1 1v13a4 4 0 0 0 4 4h10a4 4 0 0 0 4-4v-4h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 8h-4V6h4Z"/></svg>',kotlin:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><defs><linearGradient id="a" x1="1.725" x2="22.185" y1="22.67" y2="1.982" gradientTransform="translate(1.306 1.129)scale(.89324)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7c4dff"/><stop offset=".5" stop-color="#d500f9"/><stop offset="1" stop-color="#ef5350"/></linearGradient></defs><path fill="url(#a)" d="M2.975 2.976v18.048h18.05v-.03l-4.478-4.511-4.48-4.515 4.48-4.515 4.443-4.477z"/></svg>',c:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>',cpp:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>',cs:r_,csharp:r_,php:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1e88e5" d="M12 18.08c-6.63 0-12-2.72-12-6.08s5.37-6.08 12-6.08S24 8.64 24 12s-5.37 6.08-12 6.08m-5.19-7.95c.54 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.58 1.09q-.42.33-1.29.33h-.87l.53-2.76zm-3.5 5.55h1.44l.34-1.75h1.23c.54 0 .98-.06 1.33-.17.35-.12.67-.31.96-.58.24-.22.43-.46.58-.73.15-.26.26-.56.31-.88.16-.78.05-1.39-.33-1.82-.39-.44-.99-.65-1.82-.65H4.59zm7.25-8.33-1.28 6.58h1.42l.74-3.77h1.14c.36 0 .6.06.71.18s.13.34.07.66l-.57 2.93h1.45l.59-3.07c.13-.62.03-1.07-.27-1.36-.3-.27-.85-.4-1.65-.4h-1.27L12 7.35zM18 10.13c.55 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.57 1.09-.29.22-.72.33-1.3.33h-.85l.5-2.76zm-3.5 5.55h1.44l.34-1.75h1.22c.55 0 1-.06 1.35-.17.35-.12.65-.31.95-.58.24-.22.44-.46.58-.73.15-.26.26-.56.32-.88.15-.78.04-1.39-.34-1.82-.36-.44-.99-.65-1.82-.65h-2.75z"/></svg>',shell:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>',powershell:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#03a9f4" d="M29.07 6H7.677A1.535 1.535 0 0 0 6.24 7.113l-4.2 17.774A.852.852 0 0 0 2.93 26h21.393a1.535 1.535 0 0 0 1.436-1.113L29.96 7.112A.852.852 0 0 0 29.07 6M8.626 23.797a1.4 1.4 0 0 1-1.814-.31l-.007-.009a1.075 1.075 0 0 1 .315-1.599l9.6-6.061-6.102-5.852-.01-.01a1.068 1.068 0 0 1 .084-1.625l.037-.03a1.38 1.38 0 0 1 1.8.07l7.233 6.957a1.1 1.1 0 0 1 .236.739 1.08 1.08 0 0 1-.412.79c-.074.04-.146.119-10.951 6.935ZM24 22.94A1.135 1.135 0 0 1 22.803 24h-5.634a1.061 1.061 0 1 1 .001-2.112h5.633A1.134 1.134 0 0 1 24 22.938Z"/></svg>',sql:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M16 24c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-8c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-12C10.477 4 6 4.895 6 6v4c0 1.1 4.475 2 10 2s10-.9 10-2V6c0-1.105-4.477-2-10-2"/></svg>',yaml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff5252" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m12 16v-2H9v2zm-4-4v-2H6v2z"/></svg>',markdown:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>',xml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>',rust:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="m30 12-4-2V6h-4l-2-4-4 2-4-2-2 4H6v4l-4 2 2 4-2 4 4 2v4h4l2 4 4-2 4 2 2-4h4v-4l4-2-2-4ZM6 16a9.9 9.9 0 0 1 .842-4H10v8H6.842A9.9 9.9 0 0 1 6 16m10 10a9.98 9.98 0 0 1-7.978-4H16v-2h-2v-2h4c.819.819.297 2.308 1.179 3.37a1.89 1.89 0 0 0 1.46.63h3.34A9.98 9.98 0 0 1 16 26m-2-12v-2h4a1 1 0 0 1 0 2Zm11.158 6H24a2.006 2.006 0 0 1-2-2 2 2 0 0 0-2-2 3 3 0 0 0 3-3q0-.08-.004-.161A3.115 3.115 0 0 0 19.83 10H8.022a9.986 9.986 0 0 1 17.136 10"/></svg>',vue:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#41b883" d="M1.791 3.851 12 21.471 22.209 3.936V3.85H18.24l-6.18 10.616L5.906 3.851z"/><path fill="#35495e" d="m5.907 3.851 6.152 10.617L18.24 3.851h-3.723L12.084 8.03 9.66 3.85z"/></svg>',mermaid:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>'},fallback:'<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>',loadExtended:()=>Ji(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},kpe=gl(0);o8=()=>{kpe.value++},gpe(bpe);const Ape={"":"",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 wv(e){var t;const n=(function(i){if(!i)return"";const s=i.trim();if(!s)return"";const[o]=s.split(/\s+/),[r]=o.split(":");return r.toLowerCase()})(e);return(t=Ape[n])!=null?t:n}function oYe(e){const t=wv(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 rYe(e){return mpe(wv(e))||vpe()}const a_={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 xv=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});let To=null,Mc=!1,Ic=null,_v=Tb;function Ip(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function Eb(){try{const e=globalThis;return Ip(e?.katex)}catch{return null}}function Tb(){return xv(null,null,function*(){const e=Eb();if(e)return e;const t=yield Ji(()=>import("./katex-DnlPpQZa.js"),[]);try{yield Ji(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([0,1]))}catch{}return Ip(t)})}function dB(e){const t=Promise.resolve(e).then(n=>{var i;return Ic===t&&n?(To=(i=Ip(n))!=null?i:n,To):null}).catch(()=>null).finally(()=>{Ic===t&&(Ic=null)});return Ic=t,Mc=!0,t}function Cpe(e){_v=e,To=null,Mc=!1,Ic=null}function wpe(e){Cpe(Tb)}function fB(){return typeof _v=="function"}function lYe(){var e;const t=_v;if(!t||t===Tb)return null;if(To)return To;const n=Eb();if(n)return To=n,To;if(Mc)return null;try{const i=t();return i?typeof i?.then=="function"?(dB(i),null):(To=(e=Ip(i))!=null?e:i,To):null}catch{return null}}function hB(){return xv(this,null,function*(){var e;const t=Eb();if(t)return To=t,To;if(To)return To;if(Ic)return Ic;if(Mc)return null;const n=_v;if(!n)return Mc=!0,null;try{const i=n();if(typeof i?.then=="function")return dB(i);if(i)return To=(e=Ip(i))!=null?e:i,Mc=!0,To}catch{}return Mc=!0,null})}function pB(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let uu=null,nu=null;const Js=new Map,ya=new Map;let sp=5;const Rc=new Set;function Ah(){if(Js.size<sp&&Rc.size){let e=sp-Js.size;for(const t of Array.from(Rc)){if(e<=0)break;Rc.delete(t),e--;try{t()}catch{}}}}function gB(){for(const e of Array.from(Rc)){Rc.delete(e);try{e()}catch{}}}function xpe(e){uu=e,nu=null,uu.onmessage=t=>{const{id:n,html:i,error:s}=t.data,o=Js.get(n);if(o)if(Js.delete(n),clearTimeout(o.timeoutId),o.cleanup(),Ah(),s)o.aborted||o.reject(new Error(s));else{const{content:r,displayMode:l}=t.data;if(r){const a=`${l?"d":"i"}:${r}`;if(ya.set(a,i),ya.size>200){const u=ya.keys().next().value;ya.delete(u)}}o.aborted||o.resolve(i)}},uu.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,i]of Js.entries())clearTimeout(i.timeoutId),i.cleanup(),i.aborted||i.reject(new Error(`Worker error: ${t.message}`));Js.clear(),gB()}}function _pe(){var e;for(const t of Js.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Js.clear(),gB(),uu&&((e=uu.terminate)==null||e.call(uu)),uu=null,nu=null}function Spe(e,t=!0,n=2e3,i){return xv(this,null,function*(){performance.now();const s=pB(e);if(!fB()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(nu)return Promise.reject(nu);const o=`${t?"d":"i"}:${s}`,r=ya.get(o);if(r)return Ah(),Promise.resolve(r);const l=uu||(nu=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),nu.name="WorkerInitError",nu.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(nu);if(Js.size>=sp){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Js.size,a.max=sp,Promise.reject(a)}return new Promise((a,u)=>{if(i?.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=Js.get(c);if(!m)return;Js.delete(c),m.cleanup();const y=new Error("Worker render timed out");y.name="WorkerTimeout",y.code="WORKER_TIMEOUT",m.aborted||m.reject(y),Ah()},n);d=()=>{const m=Js.get(c);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const y=new Error("Aborted");y.name="AbortError",u(y)},i&&i.addEventListener("abort",d,{once:!0});const p=a,g=u;Js.set(c,{resolve:m=>{p(m)},reject:m=>{g(m)},timeoutId:f,aborted:!1,cleanup:()=>{i&&d&&i.removeEventListener("abort",d),d=null}});try{l.postMessage({id:c,content:s,displayMode:t})}catch(m){const y=Js.get(c);Js.delete(c),clearTimeout(f),y?.cleanup(),y?.reject(m),Ah()}})})}function aYe(e,t=!0,n){const i=`${t?"d":"i"}:${pB(e)}`;if(ya.set(i,n),ya.size>200){const s=ya.keys().next().value;ya.delete(s)}}const Mpe="WORKER_BUSY";function Ipe(e=2e3,t){return Js.size<sp?Promise.resolve():new Promise((n,i)=>{let s,o=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),Rc.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{o||(o=!0,a(),n())},Rc.add(l),s=globalThis.setTimeout(()=>{if(o)return;o=!0,a();const u=new Error("Wait for worker slot timed out");u.name="WorkerBusyTimeout",u.code="WORKER_BUSY_TIMEOUT",i(u)},e),queueMicrotask(()=>Ah()),t&&(r=()=>{if(o)return;o=!0,a();const u=new Error("Aborted");u.name="AbortError",i(u)},t.aborted?r():t.addEventListener("abort",r,{once:!0}))})}const S1={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function uYe(e){return xv(this,arguments,function*(t,n=!0,i={}){var s,o,r,l;if(!fB()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=i.timeout)!=null?s:S1.timeout,u=(o=i.waitTimeout)!=null?o:S1.waitTimeout,c=(r=i.backoffMs)!=null?r:S1.backoffMs,d=(l=i.maxRetries)!=null?l:S1.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):S1.maxRetries,p=i.signal;let g=0;for(;;){if(p?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield Spe(t,n,a,p)}catch(m){if(m?.code!==Mpe||g>=f)throw m;if(g++,yield Ipe(u,p).catch(()=>{}),p?.aborted){const y=new Error("Aborted");throw y.name="AbortError",y}c>0&&(yield new Promise(y=>globalThis.setTimeout(y,c*g)))}}})}function Yd(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function Epe(e){var t;for(const n of e.split(/\r?\n/)){const i=n.trim();if(!i||i.startsWith("%%"))continue;const s=i.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function Km(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),i=Epe(e);return i==="gantt"?220+28*n:i==="sequencediagram"?180+26*n:i==="classdiagram"||i==="statediagram"||i==="erdiagram"?180+24*n:i==="flowchart"||i==="graph"?170+28*n:200+22*n}function Vm(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 mB(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function Zm(e,t=360,n=500){return mB(e,t,n)}function Gm(e,t=360,n=500){return mB(e,t,n)}var Tpe=Object.defineProperty,Lpe=Object.defineProperties,Npe=Object.getOwnPropertyDescriptors,u_=Object.getOwnPropertySymbols,Fpe=Object.prototype.hasOwnProperty,Bpe=Object.prototype.propertyIsEnumerable,c_=(e,t,n)=>t in e?Tpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vB=(e,t)=>{for(var n in t||(t={}))Fpe.call(t,n)&&c_(e,n,t[n]);if(u_)for(var n of u_(t))Bpe.call(t,n)&&c_(e,n,t[n]);return e},d_=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const Qm=()=>Ji(()=>import("./mermaid.core-DHQD1STq.js").then(e=>e.bp),__vite__mapDeps([2,3]));let la=null,Jd=Qm,G1=null,r8=!1,l8=!1,Q1=0;function $pe(e){Jd=e,Q1++,la=null,G1=null,r8=!1,l8=!1}function Dpe(e){$pe(Qm)}function f_(){return typeof Jd=="function"}function h_(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=vB({},t),i={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:o=>typeof t.initialize=="function"?t.initialize(o):s.initialize?s.initialize(o):void 0},Lpe(n,Npe(i))}var n,i;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function p_(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const i=vB({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,i):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(i):void 0}}catch{}}function cYe(){return d_(this,null,function*(){if(la)return la;const e=(function(){try{const i=globalThis;return h_(i?.mermaid)}catch{return null}})();if(e)return la=e,p_(la),la;const t=Jd,n=Q1;return t?t===Qm&&r8?null:G1||(G1=d_(null,null,function*(){let i;try{i=yield t()}catch(s){if(t===Qm)return n===Q1&&t===Jd&&(r8=!0,(function(o){l8||(l8=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',o))})(s)),null;throw s}finally{n===Q1&&t===Jd&&(G1=null)}return n!==Q1||t!==Jd?null:i?(la=h_(i),p_(la),la):null}),G1):null})}let Zo=null,iu=null;const el=new Map,vc=new Map;function Bg(e){for(const t of el.values())t.reject(e);el.clear(),vc.clear()}let g_=5,m_=!1;const zpe="WORKER_BUSY",v_="MERMAID_DISABLED";function Rpe(e){if(Zo&&Zo!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",Bg(n)}Zo=e,iu=null;const t=e;Zo.onmessage=n=>{if(Zo!==t)return;const{id:i,ok:s,result:o,error:r}=n.data,l=el.get(i);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(o))},Zo.onerror=n=>{var i,s;if(Zo===t)if(el.size!==0){try{m_?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}Bg(new Error(`Worker error: ${n.message}`))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},Zo.onmessageerror=n=>{var i,s;if(Zo===t)if(el.size!==0){try{m_?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}Bg(new Error("Worker messageerror"))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function Ope(){var e;if(Zo)try{Bg(new Error("Worker cleared")),(e=Zo.terminate)==null||e.call(Zo)}catch{}Zo=null,iu=null}function yB(e,t,n,i){if(!f_()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=v_,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let o=vc.get(s);return o||(o=(function(r,l,a=1400){if(!f_()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=v_,Promise.reject(c)}if(iu)return Promise.reject(iu);const u=Zo||(iu=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),iu.name="WorkerInitError",iu.code="WORKER_INIT_ERROR",null);if(!u)return Promise.reject(iu);if(el.size>=g_){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=zpe,c.inFlight=el.size,c.max=g_,Promise.reject(c)}return new Promise((c,d)=>{const f=Math.random().toString(36).slice(2);let p,g=!1;const m=()=>{g||(g=!0,p!=null&&globalThis.clearTimeout(p),el.delete(f))},y={resolve:w=>{m(),c(w)},reject:w=>{m(),d(w)}};el.set(f,y);try{u.postMessage({id:f,action:r,payload:l})}catch(w){return el.delete(f),void d(w)}p=globalThis.setTimeout(()=>{const w=new Error("Worker call timed out");w.name="WorkerTimeout",w.code="WORKER_TIMEOUT";const k=el.get(f);k&&k.reject(w)},a)})})(e,t,n),vc.set(s,o),o.then(()=>{vc.get(s)===o&&vc.delete(s)},()=>{vc.get(s)===o&&vc.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)})})})(o,i)}function dYe(e,t,n=1400,i){return yB("canParse",{code:e,theme:t},n,i)}function fYe(e,t,n=1400,i){return yB("findPrefix",{code:e,theme:t},n,i)}var Ppe=Object.defineProperty,jpe=Object.defineProperties,Hpe=Object.getOwnPropertyDescriptors,y_=Object.getOwnPropertySymbols,Wpe=Object.prototype.hasOwnProperty,qpe=Object.prototype.propertyIsEnumerable,b_=(e,t,n)=>t in e?Ppe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kt=(e,t)=>{for(var n in t||(t={}))Wpe.call(t,n)&&b_(e,n,t[n]);if(y_)for(var n of y_(t))qpe.call(t,n)&&b_(e,n,t[n]);return e},fn=(e,t)=>jpe(e,Hpe(t)),Si=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const Upe="__global__",Hy="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",a8=(()=>{const e=globalThis;if(e[Hy])return e[Hy];const t={scopedCustomComponents:{},revision:gl(0)};return e[Hy]=t,t})(),k_=a8.revision,Kpe=Symbol("markstreamCustomComponents"),Vpe=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 Ep(e){return Vpe.has(String(e).trim().toLowerCase())}function Zpe(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function Wy(e={}){const t={};for(const[n,i]of Object.entries(e))if(i!=null){t[n]=i;for(const s of new Set([Wr(n),Wr(Zpe(n))]))!s||Ep(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=i)}return t}function bs(e){const t=un(Kpe,null);return F(()=>{var n;return k_.value,(function(i,s={}){return k_.value,kt(kt(kt({},Wy(a8.scopedCustomComponents[Upe]||{})),Wy(s)),Wy((function(o){return o&&a8.scopedCustomComponents[o]||{}})(i)))})(e?.(),(n=t?.value)!=null?n:{})})}const Gpe=["aria-label"],Qpe={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"},Ype={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"},ri=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},vr=ri(nt({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(b(),M("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(b(),M("svg",Ype,[...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(),M("svg",Qpe,[...n[0]||(n[0]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,Gpe))}),[["__scopeId","data-v-be21ab83"]]);vr.install=e=>{e.component(vr.__name,vr)};const Jpe={class:"emoji-node"},Xo=ri(nt({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(b(),M("span",Jpe,B(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);Xo.install=e=>{e.component(Xo.__name,Xo)};const Xpe=["id"],e0e=["title"],yr=ri(nt({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const i=document.querySelector(t);i?i.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(i,s)=>(b(),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"},"["+B(e.node.id)+"]",9,e0e)],8,Xpe))}}),[["__scopeId","data-v-c1463a29"]]);yr.install=e=>{e.component(yr.__name,yr)};const bB=(()=>{try{return!1}catch{}return!1})();function qy(e){bB&&console.warn(e)}function A_(e,t="safe",n){return Mb(e,t,n)}function kB(e){return Bhe(e)}function Uy(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function Lb(e,t="safe"){const n=String(e.tag||e.type||"").trim(),i=Fg((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),Uy(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),Uy(r.value)]):Object.entries(s).map(([r,l])=>[r,Uy(l)]):null,t,n);var s;if(!i)return;const o=kB(kh(i));return Object.keys(o).length>0?o:void 0}function C_(e,t,n=!1){const i=Object.entries(t??{}),s=i.length>0?i.map(([o,r])=>r===""?` ${o}`:` ${o}="${r}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function M1(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function Ky(e,t,n,i,s,o,r=!1){const l=(function(d,f){return iB(d,f)})(e,i);if(xp.has(e.toLowerCase())||!l&&XF(e,o))return null;if(!l&&Sb(e,o))return r?[C_(e,t,!0)]:[C_(e,t),...n,`</${e}>`];const a=Mb(t,o,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=i[e]||i[e.toLowerCase()],f=kB(a);return dn(d,fn(kt({},f),{key:c}),n.length>0?n:void 0)}return dn(e,fn(kt({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function AB(e,t){return zhe(e,t)}function Ym(e,t,n="safe"){if(!e)return[];try{return(function(o,r,l="safe"){let a=0;const u=[],c=[];for(const d of o)if(d.type==="text")(u.length>0?u[u.length-1].children:c).push(d.content);else if(d.type==="self_closing"){const f=Ky(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);M1(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 p=-1;for(let g=u.length-1;g>=0;g--)if(u[g].tagName.toLowerCase()===f){p=g;break}if(p!==-1)for(;u.length>p;){const g=u.pop(),m=Ky(g.tagName,g.attrs||{},g.children,r,g.autoKey,l);u.length>0?M1(u[u.length-1].children,m):M1(c,m),g.tagName.toLowerCase()!==f&&u.length>p&&qy(`Auto-closing unclosed tag: <${g.tagName}>`)}else qy(`Ignoring closing tag with no matching opening tag: </${d.tagName}>`)}for(;u.length>0;){const d=u.pop(),f=Ky(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?M1(u[u.length-1].children,f):M1(c,f),qy(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(sB(e),t,n)}catch(s){return i=s,bB&&console.error("Failed to parse HTML to VNodes:",i),null}var i}const t0e=["innerHTML"],br=ri(nt({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=un("markstreamHtmlPolicy",void 0),i=F(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=bs(()=>t.customId),o=nt({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(i.value==="escape")return{mode:"html",content:gf(l,i.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=Ym(l,s.value,i.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!AB(l,s.value))return{mode:"html",content:gf(l,i.value)};const a=Ym(l,s.value,i.value);return a===null?{mode:"html",content:gf(l,i.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(b(),M("span",{key:0,class:$e(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[V(h(o),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(b(),M("span",{key:1,class:$e(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},B(r.value.content),3)):(b(),M("span",{key:2,class:$e(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,t0e))}}),[["__scopeId","data-v-d17f12b0"]]);br.install=e=>{e.component(br.__name,br)};const n0e={class:"inline-code"},i0e={key:0},ko=ri(nt({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=Rf(),i=un("markstreamFade",void 0),s=un("markstreamTextStreamState",void 0),o=un("markstreamStreamVersion",void 0),r=F(()=>{const k=n.fade;return k===""||k===!0||k==="true"||k!==!1&&k!=="false"&&void 0}),l=F(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=F(()=>{var k;return String((k=t.node.code)!=null?k:"")}),u=F(()=>!l.value),c=F(()=>{var k;const A=(k=n["index-key"])!=null?k:n.indexKey;return A==null||A===""?"":String(A)}),d=G(t.node.code),f=G(""),p=G(0);let g;function m(){g?.(),g=void 0}function y(){m(),f.value&&(d.value=d.value+f.value,f.value="")}Ge([()=>t.node.code,c,l],([k])=>{const A=String(k??""),v=c.value,x=aB({nextContent:A,persistedContent:v?s?.get(v):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value});d.value=x.settledContent,f.value=x.streamedDelta,x.appended?(p.value+=1,(function(){if(!f.value||g||!o)return;const S=o.value;g=Ge(()=>o.value,I=>{I!==S&&y()},{flush:"sync"})})()):f.value||m(),v&&s?.set(v,A)},{immediate:!0}),Df(m);const w=F(()=>p.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(k,A)=>(b(),M("code",n0e,[u.value?(b(),M(Be,{key:0},[qe(B(a.value),1)],64)):(b(),M(Be,{key:1},[d.value?(b(),M("span",i0e,B(d.value),1)):te("",!0),f.value?(b(),M("span",{key:1,class:$e(["inline-code-stream-delta",[w.value]]),onAnimationend:y},B(f.value),35)):te("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);ko.install=e=>{e.component(ko.__name,ko)};const u8=G(!1),w_=G(""),x_=G("top"),Ch=G(null),wh=G(null),c8=G(null),d8=G(null),__=G(null);let $g=null,Dg=null,f8=0;function CB(){$g&&(clearTimeout($g),$g=null),Dg&&(clearTimeout(Dg),Dg=null)}let Y0=!1,J0=null,S_=!1;function s0e(e,t,n="top",i=!1,s,o){if(!e)return;const r=++f8;CB();const l=()=>Si(null,null,function*(){var a,u;if(yield(function(){return Si(this,null,function*(){if(!Y0&&!S_&&typeof document<"u"){J0!=null||(J0=Si(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([Ji(()=>import("./vue.runtime.esm-bundler-B6hrKKNQ.js"),[]),Ji(()=>import("./Tooltip-BCqOrYcp.js"),[])]),p=document.createElement("div");p.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(p),c({setup:()=>()=>{var g;return d(f,{visible:u8.value,"anchor-el":Ch.value,content:w_.value,placement:x_.value,id:wh.value,originX:c8.value,originY:d8.value,isDark:(g=__.value)!=null?g:void 0})}}).mount(p),Y0=!0}));try{yield J0}catch(c){Y0=!1,J0=null,S_=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),Y0&&r===f8){wh.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,Ch.value=e,w_.value=t,x_.value=n,c8.value=(a=s?.x)!=null?a:null,d8.value=(u=s?.y)!=null?u:null,__.value=typeof o=="boolean"?o:null,u8.value=!0;try{e.setAttribute("aria-describedby",wh.value)}catch{}}});i?l():$g=setTimeout(l,80)}function o0e(e=!1){f8+=1,CB();const t=()=>{if(Ch.value&&wh.value)try{Ch.value.removeAttribute("aria-describedby")}catch{}u8.value=!1,Ch.value=null,wh.value=null,c8.value=null,d8.value=null};e?t():Dg=setTimeout(t,120)}const r0e={"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..."},l0e=Symbol("markstreamI18nFallback");function wB(e,t){var n;return(n=t?.[e])!=null?n:r0e[e]}const h8=(e,t)=>{var n;return(n=wB(e,t))!=null?n:(function(i){return(i.split(".").pop()||i).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function M_(e,t){return{t(n){const i=wB(n,t);if(e.te&&i!=null&&!e.te(n))return h8(n,t);const s=e.t(n);return s===n&&i!=null?h8(n,t):s}}}function a0e(){const e=(function(){var n,i,s;try{const o=ys(),r=l0e,l=o?.provides,a=(n=o?.appContext)==null?void 0:n.provides;return(s=(i=l?.[r])!=null?i:a?.[r])!=null?s:null}catch{}return null})(),t=(function(){var n,i;try{const s=ys(),o=s?.proxy,r=o?.$t;if(typeof r=="function"){const u=o?.$te;return{t:r.bind(o),te:typeof u=="function"?u.bind(o):void 0}}const l=(i=(n=s?.appContext)==null?void 0:n.config)==null?void 0:i.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 M_(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const i=n();if(i&&typeof i.t=="function")return M_({t:i.t.bind(i),te:typeof i.te=="function"?i.te.bind(i):void 0},e)}catch{}}catch{}return{t:n=>h8(n,e)}}const xB=Symbol("ViewportPriority"),_B=Symbol("ViewportPriorityOptions"),SB=Symbol("OffscreenHeavyNodeDeferral"),u0e=F(()=>!1),Vc="400px";function Nb(){return un(_B,void 0)}function Fb(){return un(SB,u0e)}function c0e(e,t){var n,i;const s=typeof window<"u"&&typeof document<"u",o=typeof t=="boolean"?G(t):t,r=s?(n=window.requestIdleCallback)!=null?n:I=>window.setTimeout(()=>I({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(i=window.cancelIdleCallback)!=null?i:I=>window.clearTimeout(I):null,a=new WeakMap;let u=1;const c=new Map,d=new Map,f=new Set;let p=null,g=null;function m(I){if(!I)return"viewport";let _=a.get(I);return _||(_=u++,a.set(I,_)),String(_)}function y(){if(p!=null){try{l?.(p)}catch{}p=null}}function w(I){if(I){const _=c.get(I);if(_&&!_.targets.size){try{_.io.disconnect()}catch{}c.delete(I)}}d.size||f.size||y()}function k(I){const _=d.get(I);if(!_)return;const E=c.get(_.bucketKey);if(!_.visible.value){_.visible.value=!0;try{_.resolve()}catch{}}try{E?.io.unobserve(I)}catch{}E?.targets.delete(I),d.delete(I),f.delete(I),w(_.bucketKey)}function A(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&p==null&&f.size&&(p=r(()=>{p=null;const I=f.values().next().value;I&&(f.delete(I),k(I),f.size&&A())},{timeout:1200}))}function v(I,_){if(!s||typeof IntersectionObserver>"u")return null;const E=(function(P,R){var j,z,K;return{root:(j=e?.(P??null))!=null?j:null,rootMargin:(z=R?.rootMargin)!=null?z:Vc,threshold:(K=R?.threshold)!=null?K:0}})(I,_),N=[m((D=E).root),D.rootMargin,D.threshold].join("\0");var D;const T=c.get(N);if(T)return{key:N,bucket:T};let $;try{$=new IntersectionObserver(P=>{for(const R of P)(R.isIntersecting||R.intersectionRatio>0)&&k(R.target)},{root:E.root,rootMargin:E.rootMargin,threshold:E.threshold})}catch{return null}const O={io:$,targets:new Map};return c.set(N,O),{key:N,bucket:O}}function x(){if(s&&o.value)for(const[I,_]of Array.from(d.entries())){const E=v(I,_.opts);if(!E){k(I);continue}if(E.key===_.bucketKey)continue;const N=_.bucketKey,D=c.get(N);try{D?.io.unobserve(I)}catch{}D?.targets.delete(I),_.bucketKey=E.key,E.bucket.targets.set(I,_),E.bucket.io.observe(I),w(N)}}Ge(o,I=>{if(!I){for(const _ of Array.from(d.keys()))k(_);y()}},{flush:"sync"});const S=(I,_)=>{const E=G(!1);let N,D=!1;const T=new Promise(R=>{N=()=>{D||(D=!0,R())}}),$=()=>{const R=d.get(I);if(!R)return f.delete(I),void w();const j=c.get(R.bucketKey);try{j?.io.unobserve(I)}catch{}j?.targets.delete(I),d.delete(I),f.delete(I),w(R.bucketKey)};if(!s||!o.value)return E.value=!0,N(),{isVisible:E,whenVisible:T,destroy:$};const O=v(I,_);if(!O)return E.value=!0,N(),{isVisible:E,whenVisible:T,destroy:$};const P={resolve:N,visible:E,bucketKey:O.key,opts:_};return d.set(I,P),O.bucket.targets.set(I,P),O.bucket.io.observe(I),s&&g==null&&(g=window.requestAnimationFrame(()=>{g=null,x()})),_?.allowIdle!==!1&&(f.add(I),A()),{isVisible:E,whenVisible:T,destroy:$}};return S.refresh=x,Pn(xB,S),S}function Bb(){var e,t;const n=un(xB,void 0);if(n)return n;const i=new WeakMap,s=new Map,o=new Set;let r=null;const l=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:p=>window.setTimeout(()=>p({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:p=>window.clearTimeout(p):null,u=()=>{if(r!=null){try{a?.(r)}catch{}r=null}},c=p=>{if(!p)return;const g=s.get(p);if(g&&!g.targets.size){try{g.io.disconnect()}catch{}s.delete(p)}},d=p=>{const g=i.get(p);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(p)}catch{}i.delete(p),m?.targets.delete(p),o.delete(p),c(g.bucketKey),o.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&o.size&&(r=l(()=>{r=null;const p=o.values().next().value;p&&(o.delete(p),d(p),o.size&&f())},{timeout:1200}))};return(p,g)=>{const m=G(!1);let y,w=!1;const k=new Promise(x=>{y=()=>{w||(w=!0,x())}}),A=()=>{const x=i.get(p);if(!x)return o.delete(p),void(o.size||u());const S=s.get(x.bucketKey);try{S?.io.unobserve(p)}catch{}i.delete(p),S?.targets.delete(p),o.delete(p),c(x.bucketKey),o.size||u()},v=(x=>{var S,I;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const _=($=>{var O,P;return[(O=$?.rootMargin)!=null?O:Vc,(P=$?.threshold)!=null?P:0].join("\0")})(x),E=s.get(_);if(E)return{key:_,bucket:E};const N=(S=x?.rootMargin)!=null?S:Vc;let D;try{D=new IntersectionObserver($=>{for(const O of $)(O.isIntersecting||O.intersectionRatio>0)&&d(O.target)},{root:null,rootMargin:N,threshold:(I=x?.threshold)!=null?I:0})}catch{return null}const T={io:D,targets:new Set};return s.set(_,T),{key:_,bucket:T}})(g);return v?(i.set(p,{resolve:y,visible:m,bucketKey:v.key}),v.bucket.targets.add(p),v.bucket.io.observe(p),g?.allowIdle!==!1&&(o.add(p),f()),{isVisible:m,whenVisible:k,destroy:A}):(m.value=!0,y(),{isVisible:m,whenVisible:k,destroy:A})}}function d0e(e,t){var n,i;const s=(i=(n=e.indexKey)!=null?n:t["index-key"])!=null?i:t.indexKey;return s==null||s===""?"":String(s)}const f0e=["data-markstream-viewport-pending"],h0e=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],p0e={key:1,class:"image-placeholder"},g0e={key:1,class:"image-node__raw-text"},m0e={key:2,class:"image-shimmer-overlay"},v0e={key:1,class:"image-node__raw-text"},y0e={key:3,class:"image-error"},gu=ri(nt({__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,i,s;const o=e,r=t,l=G(!1),a=G(!1),u=G(""),c=G("primary"),d=G(null),f=Rf(),p=un(s8,null),g=Bb(),m=Nb(),y=Fb(),w=F(()=>Qw(o.node.src)),k=F(()=>Qw(o.fallbackSrc)),A=(s=(i=(n=ys())==null?void 0:n.vnode.el)==null?void 0:i.querySelector)==null?void 0:s.call(i,"img"),v=typeof window<"u"&&A?.getAttribute("src")===(w.value||k.value),x=G(typeof window>"u"||v||!y.value),S=gl(null);let I="",_=null;const E=F(()=>u.value),N=F(()=>!o.lazy),D=F(()=>typeof window<"u"&&y.value&&!v),T=F(()=>!D.value||x.value),$=F(()=>T.value?E.value:""),O=F(()=>{var fe,pe;return(pe=(fe=m?.value.heavyBlockMargin)!=null?fe:m?.value.rootMargin)!=null?pe:Vc}),P=F(()=>!o.node.loading&&c.value!=="failed"&&u.value.length>0),R=F(()=>c.value==="failed"),j=F(()=>(!N.value||D.value&&!x.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),z=F(()=>d0e(o,f));function K(fe=z.value){fe&&d.value&&p?.reportHeight(fe,d.value.offsetHeight)}function q(fe=z.value){fe&&At(()=>{K(fe)})}function W(){_&&(clearTimeout(_),_=null)}function Z(){const fe=z.value;fe&&I!==fe&&(I&&p?.markSettled(I),W(),I=fe,p?.markPending(fe),typeof window<"u"&&(_=window.setTimeout(()=>{I===fe&&(q(fe),ne())},8e3)))}function ne(){return Si(this,null,function*(){const fe=I;fe&&(W(),I="",yield At(),K(fe),p?.markSettled(fe))})}function X(){if(c.value==="primary"&&k.value&&k.value!==u.value)return c.value="fallback",u.value=k.value,l.value=!1,a.value=!1,void q();c.value="failed",a.value=!0,r("error",u.value),q()}function ue(){l.value=!0,a.value=!1,r("load",E.value),q()}function ie(fe){fe.preventDefault(),l.value&&!a.value&&r("click",[fe,E.value])}const{t:Se}=a0e();return Ge([w,k,()=>o.node.loading],()=>(l.value=!1,a.value=!1,o.node.loading||w.value?(u.value=w.value,void(c.value="primary")):k.value?(u.value=k.value,void(c.value="fallback")):(u.value="",c.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Ge([d,D],([fe,pe],Ne,ee)=>{var ye;if((ye=S.value)==null||ye.destroy(),S.value=null,!pe||x.value)return void(x.value=!0);if(!fe)return void(x.value=!1);let H=!0;const Y=g(fe,{rootMargin:O.value,allowIdle:!1});S.value=Y,x.value=Y.isVisible.value,Y.whenVisible.then(()=>{H&&S.value===Y&&(x.value=!0)}),ee(()=>{H=!1,Y.destroy(),S.value===Y&&(S.value=null)})},{immediate:!0}),Ge([P,l,a,E,()=>o.lazy,T],([fe,pe,Ne,ee,ye,H])=>fe&&ee&&!Ne&&H?pe?(ne(),void q()):ye?(Z(),void q()):void(pe||Ne||Z()):(ne(),void q()),{flush:"post",immediate:!0}),Gn(()=>{var fe;(fe=S.value)==null||fe.destroy(),S.value=null,(function(){const pe=I;pe&&(W(),I="",p?.markSettled(pe))})()}),(fe,pe)=>{var Ne,ee,ye,H,Y;return b(),M("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":D.value&&!x.value?"true":void 0},[P.value?(b(),M("img",{key:0,src:$.value||void 0,alt:String((ee=(Ne=o.node.alt)!=null?Ne:o.node.title)!=null?ee:""),title:String((H=(ye=o.node.title)!=null?ye:o.node.alt)!=null?H:""),class:$e(["image-node__img",{"is-loading":!N.value&&!l.value,"is-loaded":N.value||l.value,"has-natural-size":l.value,"cursor-pointer":l.value}]),loading:o.lazy?"lazy":void 0,fetchpriority:N.value?"high":void 0,decoding:N.value?"sync":"async",tabindex:l.value?0:-1,"aria-label":(Y=o.node.alt)!=null?Y:h(Se)("image.preview"),onError:X,onLoad:ue,onClick:ie},null,42,h0e)):te("",!0),e.node.loading&&!a.value?(b(),M("span",p0e,[o.usePlaceholder?En(fe.$slots,"placeholder",{key:0,node:o.node,displaySrc:E.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[pe[0]||(pe[0]=C("span",{class:"image-shimmer"},null,-1))],!0):(b(),M("span",g0e,B(e.node.raw),1))])):te("",!0),j.value&&!e.node.loading?(b(),M("span",m0e,[o.usePlaceholder?En(fe.$slots,"placeholder",{key:0,node:o.node,displaySrc:E.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[pe[1]||(pe[1]=C("span",{class:"image-shimmer"},null,-1))],!0):(b(),M("span",v0e,B(e.node.raw),1))])):te("",!0),R.value?(b(),M("span",y0e,[En(fe.$slots,"error",{node:o.node,displaySrc:E.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[pe[2]||(pe[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,B(h(Se)("image.loadError")),1)],!0)])):te("",!0)],8,f0e)}}}),[["__scopeId","data-v-046e82ac"]]);gu.install=e=>{e.component(gu.__name,gu)};const b0e={key:2},Kl=nt({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=bs(()=>t.customId),i=un("markstreamHtmlPolicy",void 0),s=un("markstreamNestedRendererProps",void 0),o=F(()=>{var g;return(g=i?.value)!=null?g:"safe"}),r=F(()=>{var g,m;const y=(g=s?.value)!=null?g:{};return fn(kt({},y),{customId:(m=t.customId)!=null?m:y.customId,htmlPolicy:o.value})}),l=sl({loader:()=>Promise.resolve().then(()=>Ub),suspensible:!1}),a=F(()=>t.components[String(t.node.type)]),u=F(()=>!!(a.value&&n.value[t.node.type]&&!Ep(String(t.node.type)))),c=F(()=>u.value?Lb(t.node,o.value):void 0),d=F(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=F(()=>{var g;return String((g=t.node.content)!=null?g:"")}),p=F(()=>{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(),de(Ss(a.value),Jn({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:he(()=>[d.value?(b(),de(h(l),Jn({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(),de(h(l),Jn({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(),de(Ss(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(),M("span",b0e,B(p.value),1)):te("",!0)}}),I_=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function k0e(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return fn(kt(kt({},I_),n),{enabled:(t=n.enabled)==null||t})}return kt({},I_)}function $b(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,i=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=i}function MB(e){var t,n;const i=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(i.length<3)return"";const s=i[0];if(s!=="`"&&s!=="~"||i[1]!==s||i[2]!==s)return"";let o=3;for(;i[o]===s;)o+=1;return i.slice(o).trim()}function E_(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function A0e(e){var t;return e.diff===!0||E_(e.language)||E_(MB(String((t=e.raw)!=null?t:"")))}function C0e(e,t,n){const i=(function(s){const o=MB(s);if(!o)return"";const r=o.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:i||t,caption:i?n?`Diff / ${t}`:t:""}}const w0e=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],x0e={key:0,translate:"no",class:"markstream-pre__diff-code"},_0e={class:"markstream-pre__diff-pane-content"},S0e={class:"markstream-pre__diff-number","aria-hidden":"true"},M0e={class:"markstream-pre__diff-content"},I0e={class:"markstream-pre__diff-content-inner"},E0e={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},T0e=["textContent"],L0e=["textContent"],Go=nt({__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(ie,Se){const fe=String(ie??"");return Se?fe:fe.replace(/\r\n$|\n$|\r$/,"")}const i=F(()=>{var ie,Se,fe;const pe=String((Se=(ie=t.node)==null?void 0:ie.language)!=null?Se:"");return String((fe=String(pe).split(/\s+/g)[0])!=null?fe:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=F(()=>`language-${i.value}`),o=F(()=>{var ie;return t.loading===!0||((ie=t.node)==null?void 0:ie.loading)===!0}),r=F(()=>{var ie;return n((ie=t.node)==null?void 0:ie.code,o.value)});let l="",a=1;const u=F(()=>(function(ie){let Se=0,fe=1;ie.startsWith(l)&&(Se=l.length,fe=a,Se>0&&ie[Se-1]==="\r"&&ie[Se]===` -`&&Se++);for(let pe=Se;pe<ie.length;pe++)ie[pe]===` -`?fe++:ie[pe]==="\r"&&(fe++,ie[pe+1]===` -`&&pe++);return l=ie,a=fe,fe})(r.value)),c=F(()=>r.value.split(/\r\n|\n|\r/));let d=0,f="";const p=F(()=>{const ie=u.value;ie<d&&(d=0,f="");for(let Se=d+1;Se<=ie;Se++)f+=`${f?` -`:""}${Se}`;return d=ie,f}),g=F(()=>{var ie;return t.showLineNumbers===!0&&((ie=t.node)==null?void 0:ie.diff)===!0}),m=F(()=>g.value&&t.diffInline===!0),y=F(()=>{const ie=Number(t.reservedHeightPx);if(!Number.isFinite(ie)||ie<=0)return;const Se=`${Math.ceil(ie)}px`;return o.value?{maxHeight:Se,overflow:"auto"}:{height:Se,minHeight:Se,maxHeight:Se,overflow:"auto"}}),w=["diff ","index ","--- ","+++ ","@@ "];function k(ie){return String(ie??"").trim().length===0}function A(ie,Se="context",fe={}){const pe=k(ie);return{code:ie,kind:pe&&Se!=="hunk"&&Se!=="spacer"&&!fe.preserveBlankKind?"context":Se,empty:pe}}function v(ie){const Se=n(ie,o.value);return Se?Se.split(/\r\n|\n|\r/):[]}function x(ie,Se){return!k(ie[Se])||Se<ie.length-1}function S(ie){return ie.startsWith("-")&&!ie.startsWith("---")}function I(ie){return ie.startsWith("+")&&!ie.startsWith("+++")}function _(ie){return ie.some(Se=>w.some(fe=>Se.startsWith(fe)))}function E(ie,Se){return Se||!ie.startsWith(" ")||ie.startsWith(" ")?ie:` ${ie}`}function N(ie,Se){const fe=ie.length,pe=Se.length,Ne=[];let ee=0;for(;ee<fe&&ee<pe&&ie[ee]===Se[ee];)Ne.push({originalIndex:ee,modifiedIndex:ee}),ee++;const ye=[];let H=fe-1,Y=pe-1;for(;H>=ee&&Y>=ee&&ie[H]===Se[Y];)ye.unshift({originalIndex:H,modifiedIndex:Y}),H--,Y--;const ve=H-ee+1,re=Y-ee+1;if(ve<=0||re<=0||o.value||(ve+1)*(re+1)>15e5)return Ne.concat(ye);const se=re+1,U=new Uint32Array((ve+1)*(re+1));for(let Me=ve-1;Me>=0;Me--)for(let Pe=re-1;Pe>=0;Pe--){const ke=Me*se+Pe;if(ie[ee+Me]===Se[ee+Pe])U[ke]=U[(Me+1)*se+Pe+1]+1;else{const Le=U[(Me+1)*se+Pe],it=U[Me*se+Pe+1];U[ke]=Le>=it?Le:it}}const J=[];let ce=0,ge=0;for(;ce<ve&&ge<re;)ie[ee+ce]===Se[ee+ge]?(J.push({originalIndex:ee+ce,modifiedIndex:ee+ge}),ce++,ge++):U[(ce+1)*se+ge]>=U[ce*se+ge+1]?ce++:ge++;return Ne.concat(J,ye)}function D(ie){var Se;const fe=(function(){var Y,ve;const re=t.diffHideUnchangedRegions;if(re==null||re===!1)return null;const se=re===!0?{}:re;return se.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((Y=se.contextLineCount)!=null?Y:2)),minimumLineCount:Math.max(1,Math.floor((ve=se.minimumLineCount)!=null?ve:4))}})();if(!fe||ie.length<1||ie.length>2||ie.length===2&&ie[0].lines.length!==ie[1].lines.length)return ie;const pe=ie[0].lines,Ne=(Se=ie[1])==null?void 0:Se.lines,ee=Y=>pe[Y].kind==="context"&&(Ne===void 0||Ne[Y].kind==="context"&&pe[Y].code===Ne[Y].code),ye=[];let H=0;for(;H<pe.length;){const Y=H;for(;H<pe.length&&ee(H);)H++;const ve=H;if(ve-Y>=fe.minimumLineCount){const re=Y+(Y===0?0:fe.contextLineCount),se=ve-(ve===pe.length?0:fe.contextLineCount);se-re>=fe.minimumLineCount&&ye.push({start:re,end:se})}H===Y&&H++}return ye.length?ie.map((Y,ve)=>{const re=[];let se=0;for(const U of ye)re.push(...Y.lines.slice(se,U.start)),re.push({code:ve===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${Y.key}-collapsed-${U.start}-${U.end}`,number:""}),se=U.end;return re.push(...Y.lines.slice(se)),fn(kt({},Y),{lines:re})}):ie}const T=F(()=>{var ie,Se,fe,pe;if(!g.value)return[];const Ne=(function(ve){const re=ve.some(U=>S(U)),se=ve.some(U=>I(U));return re&&se||(function(){var U,J,ce,ge;if(i.value==="diff")return!0;const Me=(ge=(ce=String((J=(U=t.node)==null?void 0:U.raw)!=null?J:"").split(/\r?\n/,1)[0])==null?void 0:ce.trim())!=null?ge:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(Me)})()&&(re||se)})(c.value),ee=(function(){var ve,re;return((ve=t.node)==null?void 0:ve.originalCode)!=null||((re=t.node)==null?void 0:re.updatedCode)!=null})();if(m.value){const ve=ee?(function(re,se){const U=v(re),J=v(se),ce=N(U,J);if(ce.length>0){const it=[];let Fe=0,De=0;for(const Ke of ce){for(;Fe<Ke.originalIndex;)it.push(fn(kt({},A(U[Fe],"removed",{preserveBlankKind:x(U,Fe)})),{key:`inline-removed-source-${Fe}`,number:Fe+1})),Fe++;for(;De<Ke.modifiedIndex;)it.push(fn(kt({},A(J[De],"added",{preserveBlankKind:x(J,De)})),{key:`inline-added-source-${De}`,number:De+1})),De++;it.push(fn(kt({},A(J[Ke.modifiedIndex])),{key:`inline-context-source-${Ke.originalIndex}-${Ke.modifiedIndex}`,number:Ke.modifiedIndex+1})),Fe=Ke.originalIndex+1,De=Ke.modifiedIndex+1}for(;Fe<U.length;)it.push(fn(kt({},A(U[Fe],"removed",{preserveBlankKind:x(U,Fe)})),{key:`inline-removed-source-${Fe}`,number:Fe+1})),Fe++;for(;De<J.length;)it.push(fn(kt({},A(J[De],"added",{preserveBlankKind:x(J,De)})),{key:`inline-added-source-${De}`,number:De+1})),De++;return it}const ge=[];let Me=0,Pe=U.length-1,ke=J.length-1;for(;Me<=Pe&&Me<=ke&&U[Me]===J[Me];)ge.push(fn(kt({},A(J[Me])),{key:`inline-prefix-${Me}`,number:Me+1})),Me++;const Le=[];for(;Pe>=Me&&ke>=Me&&U[Pe]===J[ke];)Le.unshift(fn(kt({},A(J[ke])),{key:`inline-suffix-${ke}`,number:ke+1})),Pe--,ke--;for(let it=Me;it<=Pe;it++)ge.push(fn(kt({},A(U[it],"removed",{preserveBlankKind:x(U,it)})),{key:`inline-removed-source-${it}`,number:it+1}));for(let it=Me;it<=ke;it++)ge.push(fn(kt({},A(J[it],"added",{preserveBlankKind:x(J,it)})),{key:`inline-added-source-${it}`,number:it+1}));return ge.concat(Le)})((ie=t.node)==null?void 0:ie.originalCode,(Se=t.node)==null?void 0:Se.updatedCode):(function(re){const se=[];let U=1,J=1;const ce=_(re);for(const[ge,Me]of re.entries())if(Me.startsWith("@@")){const Pe=Me.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);Pe&&(U=Number(Pe[1]),J=Number(Pe[2])),se.push(fn(kt({},A(Me,"hunk")),{key:`inline-hunk-${ge}`,number:""}))}else if(S(Me))se.push(fn(kt({},A(E(Me.slice(1),ce),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${ge}`,number:U++}));else if(I(Me))se.push(fn(kt({},A(E(Me.slice(1),ce),"added",{preserveBlankKind:!0})),{key:`inline-added-${ge}`,number:J++}));else{const Pe=ce&&Me.startsWith(" ")?Me.slice(1):Me;se.push(fn(kt({},A(Pe)),{key:`inline-context-${ge}`,number:J})),U++,J++}return se})(c.value);return D([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:ve}])}if(!Ne&&ee)return(function(ve,re){const se=v(ve),U=v(re),J=N(se,U),ce=[],ge=[];let Me=0,Pe=0,ke=0;const Le=(it,Fe)=>{const De=Math.max(it-Me,Fe-Pe);for(let Ke=0;Ke<De;Ke++){const gt=Me+Ke,lt=Pe+Ke;ce.push(gt<it?fn(kt({},A(se[gt],"removed",{preserveBlankKind:x(se,gt)})),{key:`original-changed-${ke}-${gt}`,number:gt+1}):fn(kt({},A("","spacer")),{key:`original-spacer-${ke}-${Ke}`,number:""})),ge.push(lt<Fe?fn(kt({},A(U[lt],"added",{preserveBlankKind:x(U,lt)})),{key:`modified-changed-${ke}-${lt}`,number:lt+1}):fn(kt({},A("","spacer")),{key:`modified-spacer-${ke}-${Ke}`,number:""}))}Me=it,Pe=Fe,ke++};for(const it of J)Le(it.originalIndex,it.modifiedIndex),ce.push(fn(kt({},A(se[it.originalIndex])),{key:`original-context-${it.originalIndex}-${it.modifiedIndex}`,number:it.originalIndex+1})),ge.push(fn(kt({},A(U[it.modifiedIndex])),{key:`modified-context-${it.originalIndex}-${it.modifiedIndex}`,number:it.modifiedIndex+1})),Me=it.originalIndex+1,Pe=it.modifiedIndex+1;return Le(se.length,U.length),D([{key:"original",className:"markstream-pre__diff-pane--original",lines:ce},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:ge}])})((fe=t.node)==null?void 0:fe.originalCode,(pe=t.node)==null?void 0:pe.updatedCode);const ye=[],H=[],Y=_(c.value);for(const ve of c.value)if(ve.startsWith("@@"))ye.push(A(ve,"hunk")),H.push(A(ve,"hunk"));else if(ve.startsWith("-")&&!ve.startsWith("---"))ye.push(A(E(ve.slice(1),Y),"removed",{preserveBlankKind:!0}));else if(ve.startsWith("+")&&!ve.startsWith("+++"))H.push(A(E(ve.slice(1),Y),"added",{preserveBlankKind:!0}));else{const re=Y&&ve.startsWith(" ")?ve.slice(1):ve;ye.push(A(re)),H.push(A(re))}return D([{key:"original",className:"markstream-pre__diff-pane--original",lines:ye.map((ve,re)=>fn(kt({},ve),{key:`original-${re}`,number:re+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:H.map((ve,re)=>fn(kt({},ve),{key:`modified-${re}`,number:re+1}))}])}),$=F(()=>{var ie,Se;if(t.showLineNumbers!==!0)return;let fe=g.value?1:u.value;if(g.value){fe=Math.max(fe,v((ie=t.node)==null?void 0:ie.originalCode).length,v((Se=t.node)==null?void 0:Se.updatedCode).length);for(const Ne of T.value)for(const ee of Ne.lines)typeof ee.number=="number"&&(fe=Math.max(fe,ee.number))}const pe=`${Math.max(2,String(fe).length)}ch`;return{"--markstream-pre-line-number-width":pe,"--markstream-pre-diff-line-number-width":pe,"--markstream-code-padding-left":"calc(var(--markstream-pre-line-number-padding-left, 2ch) + var(--markstream-pre-line-number-width, 2ch) + var(--markstream-pre-line-number-padding-right, 1ch) + var(--markstream-pre-line-number-separator-width, 2px) + var(--markstream-pre-line-number-gap-to-code, 1ch))"}}),O=F(()=>T.value.some(ie=>ie.lines.some(Se=>Se.kind==="collapsed"))),P=F(()=>{const ie=i.value;return ie?`Code block: ${ie}`:"Code block"}),R=G(null),j=G([]);let z=null,K=!1,q=null;function W(ie){const Se=Number.parseFloat(String(ie??""));return Number.isFinite(Se)&&Se>0?Se:0}function Z(ie,Se){var fe;if(!ie)return Se;if(ie.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const pe=ie.querySelector(".markstream-pre__diff-content"),Ne=pe?.getBoundingClientRect(),ee=(fe=Ne?.height)!=null?fe:0;return Math.max(Se,Math.ceil(ee))}function ne(){K||typeof window>"u"||(z!=null&&window.cancelAnimationFrame(z),z=window.requestAnimationFrame(()=>{z=null,K||(function(){var ie,Se;z=null;const fe=R.value;if(!fe||!g.value||m.value||!fe.classList.contains("is-wrap"))return void(j.value.length&&(j.value=[]));const pe=(function(re){const se=window.getComputedStyle(re),U=W(se.getPropertyValue("--markstream-pre-diff-line-height"));if(U>0)return U;const J=W(se.lineHeight);return J>0?J:18})(fe),Ne=Array.from(fe.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),ee=Array.from(fe.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),ye=Math.max(Ne.length,ee.length),H=[];for(let re=0;re<ye;re++){const se=Z((ie=Ne[re])!=null?ie:null,pe),U=Z((Se=ee[re])!=null?Se:null,pe),J=Math.max(pe,se,U);H.push({rowHeight:J,originalHeight:se,modifiedHeight:U})}var Y,ve;Y=j.value,ve=H,Y.length===ve.length&&Y.every((re,se)=>{const U=ve[se];return U&&Math.abs(re.rowHeight-U.rowHeight)<=.5&&Math.abs(re.originalHeight-U.originalHeight)<=.5&&Math.abs(re.modifiedHeight-U.modifiedHeight)<=.5})||(j.value=H)})()}))}function X(ie){q?.disconnect(),q=null,ie&&g.value&&!m.value&&typeof ResizeObserver<"u"&&(q=new ResizeObserver(()=>{ne()}),q.observe(ie))}function ue(ie,Se){const fe=j.value[ie];if(!fe)return;const pe=Se==="original"?fe.originalHeight:fe.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(fe.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(pe)}px`}}return Ge(R,ie=>{X(ie),At(()=>ne())},{flush:"post"}),Ge([g,m,T],()=>{X(R.value),At(()=>ne())},{flush:"post",immediate:!0}),Gn(()=>{K=!0,z!=null&&(window.cancelAnimationFrame(z),z=null),q?.disconnect(),q=null}),(ie,Se)=>(b(),M("pre",{ref_key:"preRef",ref:R,style:Vt([y.value,$.value]),class:$e([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":g.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":O.value}]),"aria-busy":o.value,"aria-label":P.value,"data-language":i.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[g.value?(b(),M("code",x0e,[(b(!0),M(Be,null,yt(T.value,fe=>(b(),M("span",{key:fe.key,class:$e(["markstream-pre__diff-pane",fe.className])},[C("span",_0e,[(b(!0),M(Be,null,yt(fe.lines,(pe,Ne)=>(b(),M("span",{key:pe.key,class:$e(["markstream-pre__diff-line",[`markstream-pre__diff-line--${pe.kind}`,{"markstream-pre__diff-line--empty":pe.empty}]]),style:Vt(ue(Ne,fe.key))},[Se[0]||(Se[0]=C("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),C("span",S0e,B(pe.number),1),C("span",M0e,[C("span",I0e,B(pe.code),1)])],6))),128))])],2))),128))])):(b(),M(Be,{key:1},[t.showLineNumbers?(b(),M("span",E0e,[C("span",{class:"markstream-pre__line-numbers-text",textContent:B(p.value)},null,8,T0e)])):te("",!0),C("code",{translate:"no",class:"markstream-pre__code",textContent:B(r.value)},null,8,L0e)],64))],14,w0e))}});Go.install=e=>{e.component(Go.__name,Go)};const es=ri(nt({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=Rf(),i=un("markstreamFade",void 0),s=un("markstreamTextStreamState",void 0),o=un("markstreamStreamVersion",void 0),r=F(()=>{const x=n.fade;return x===""||x===!0||x==="true"||x!==!1&&x!=="false"&&void 0}),l=F(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=F(()=>{var x;const S=(x=n["index-key"])!=null?x:n.indexKey;return S==null||S===""?"":String(S)}),u=G(t.node.content),c=G(""),d=G(0),f=G(t.node.content);let p;const g=G(null),m=G(null);let y="",w=null;function k(){p?.(),p=void 0}function A(){k(),c.value&&(u.value=u.value+c.value,c.value="")}Ge([u,g,m],function(){var x,S;const I=g.value;if(!I)return;const _=String((x=u.value)!=null?x:""),E=m.value;return w||(w=I.firstChild,y=(S=w?.data)!=null?S:""),_.startsWith(y)?!w&&_?(I.textContent=_,w=I.firstChild,void(y=_)):void(_.length>y.length&&E&&(E.appendChild(document.createTextNode(_.slice(y.length))),y=_)):(I.textContent=_,w=I.firstChild,E&&(E.textContent=""),void(y=_))},{immediate:!0}),Ge([()=>t.node.content,a,l],([x])=>{const S=String(x??""),I=a.value,_=aB({nextContent:S,persistedContent:I?s?.get(I):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=_.settledContent,c.value=_.streamedDelta,_.appended?(d.value+=1,(function(){if(!c.value||p||!o)return;const E=o.value;p=Ge(()=>o.value,N=>{N!==E&&A()},{flush:"sync"})})()):c.value||k(),I&&s?.set(I,S)},{immediate:!0}),Df(k);const v=F(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(x,S)=>(b(),M("span",{class:$e([[e.node.center?"text-node-center":""],"text-node"])},[Nn(C("span",{ref_key:"settledTextEl",ref:g},B(f.value),513),[[is,u.value!==""]]),Nn(C("span",{ref_key:"settledAppendsEl",ref:m},null,512),[[is,u.value!==""]]),c.value?(b(),M("span",{key:0,class:$e(["text-node-stream-delta",[v.value]]),onAnimationend:A},B(c.value),35)):te("",!0)],2))}}),[["__scopeId","data-v-fd79037c"]]);function Y1(e,t,n){return nt({name:e,inheritAttrs:!1,setup(i,{attrs:s,slots:o}){var r,l;const a=Bb(),u=Nb(),c=Fb(),d=typeof window<"u"&&((l=(r=ys())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=G(typeof window>"u"||d||!c.value),p=gl(null);let g=null;function m(y){const w=y&&"$el"in y?y.$el:y;p.value=w instanceof HTMLElement?w:null}return typeof window<"u"&&Ge([p,c],([y,w],k,A)=>{if(g?.destroy(),g=null,!w||f.value)return void(f.value=!0);if(!y)return;let v=!0;const x=a(y,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});g=x,f.value=x.isVisible.value,x.whenVisible.then(()=>{v&&g===x&&(f.value=!0)}),A(()=>{v=!1,x.destroy(),g===x&&(g=null)})},{immediate:!0}),Gn(()=>{g?.destroy(),g=null}),()=>dn(f.value?t:n,fn(kt({},s),{ref:m}),o)}})}es.install=e=>{e.component(es.__name,es)};const Jm=nt({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 i,s,o,r,l,a,u;const c=wv(String((s=(i=n.node)==null?void 0:i.language)!=null?s:"")),d=a_[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):a_[""]),f=A0e(n.node),p=C0e(String((r=(o=n.node)==null?void 0:o.raw)!=null?r:""),d,f),g=n.monacoOptions,m=f&&((l=n.estimatedDiffInline)!=null?l:$b(g??{},typeof window>"u"?0:window.innerWidth)),y=g?.diffAppearance,w=y==="dark"||y!=="light"&&n.isDark===!0,k=typeof g?.fontSize=="number"&&Number.isFinite(g.fontSize)&&g.fontSize>0?g.fontSize:12,A=typeof g?.lineHeight=="number"&&Number.isFinite(g.lineHeight)&&g.lineHeight>0?g.lineHeight:k===12?18:Math.max(12,Math.round(1.5*k)),v=typeof g?.tabSize=="number"&&Number.isFinite(g.tabSize)&&g.tabSize>0?g.tabSize:4,x=f?0:8,S=typeof((a=g?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(g.padding.top)&&g.padding.top>=0?g.padding.top:x,I=typeof((u=g?.padding)==null?void 0:u.bottom)=="number"&&Number.isFinite(g.padding.bottom)&&g.padding.bottom>=0?g.padding.bottom:x,_=typeof g?.fontFamily=="string"?g.fontFamily.trim():"",E=kt(kt({fontSize:`${k}px`,lineHeight:`${A}px`,tabSize:v,paddingTop:`${S}px`,paddingBottom:`${I}px`,"--markstream-pre-line-number-top":`${S}px`},f?{"--markstream-pre-diff-line-height":`${A}px`}:{}),_?{"--markstream-code-font-family":_}:{}),N=()=>dn("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"},[dn("svg",{class:"action-icon",width:"14",height:"14"})]),D=n.isShowPreview!==!1&&(c==="html"||c==="svg"),T=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||D&&n.showPreviewButton!==!1,$=P=>{if(P!=null)return typeof P=="number"?`${P}px`:String(P)},O=kt(kt(kt({"--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(--markstream-code-fallback-bg, var(--code-bg, #fff))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return dn("div",fn(kt({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":w,"is-diff":f,"is-plain-text":c===""||c==="plaintext"||c==="text"},t.class],style:[O,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:dn("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)]"},[dn("div",{class:"code-header-main",style:{minWidth:0,flex:"1 1 auto",display:"flex",alignItems:"center",gap:"var(--ms-gap-header-main, 0.625rem)",overflow:"hidden"}},[dn("span",{class:"icon-slot h-4 w-4 flex-shrink-0","aria-hidden":"true",style:{display:"inline-flex",width:"1rem",height:"1rem",flex:"0 0 auto"}}),dn("div",{class:"code-header-copy",style:{minWidth:0,display:"grid",gap:"2px"}},[dn("div",{class:"code-header-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--ms-text-label, 0.75rem)",fontWeight:"500",color:"var(--code-action-fg)"}},p.title),p.caption?dn("div",{class:"code-header-caption",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.75rem",color:"var(--code-line-number)"}},p.caption):null])]),dn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?dn("div",{class:"code-diff-stats","aria-hidden":"true"},[dn("span",{class:"code-diff-stat removed"},"-0"),dn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:N(),n.showCollapseButton===!1?null:N(),T?dn("div",{class:"relative"},[N()]):null])]),dn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[dn(Go,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?k0e(g?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:E,"data-markstream-code-loading":"1"})]),dn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[dn("div",{class:"loading-skeleton"},[dn("div",{class:"skeleton-line"}),dn("div",{class:"skeleton-line"}),dn("div",{class:"skeleton-line short"})])]),dn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),Vy=Y1("ViewportDeferredCodeBlockNode",sl({loader:()=>Si(null,null,function*(){try{return(yield Ji(()=>import("./CodeBlockNode-DAv0N-7R.js"),__vite__mapDeps([4,5]))).default}catch(e){return console.warn('[markstream-vue] Failed to load the enhanced CodeBlockNode chunk; falling back to preformatted code rendering. Enhanced code blocks require the optional "stream-diffs" peer (or "stream-monaco" as a fallback).',e),Go}}),loadingComponent:Jm,delay:0,suspensible:!1}),Jm),ml=sl(()=>Si(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,i,s,o;return dn(es,fn(kt({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield hB(),(yield Ji(()=>import("./index7-1my_tbsi.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,i,s,o;return dn(es,fn(kt({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))}})),IB=sl(()=>Si(null,null,function*(){try{return yield hB(),(yield Ji(()=>import("./index6-ByC5gnox.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,i,s;return dn(es,fn(kt({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(i=e.node.content)!=null?i:""}$$`}}))}})),Fo=ri(nt({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(b(),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]=i=>t.$emit("click",i,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=i=>t.$emit("mouseEnter",i,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=i=>t.$emit("mouseLeave",i,e.node.id,e.messageId,e.threadId))},B(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);Fo.install=e=>{e.component(Fo.__name,Fo)};const N0e={class:"superscript-node"},er=ri(nt({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=bs(()=>t.customId),i=F(()=>kt({text:es,inline_code:ko,link:Do,html_inline:br,strong:Bo,emphasis:zo,footnote_reference:yr,strikethrough:$o,highlight:kr,insert:nr,subscript:tr,emoji:Xo,math_inline:ml,reference:Fo},n.value));return(s,o)=>(b(),M("sup",N0e,[(b(!0),M(Be,null,yt(e.node.children,(r,l)=>(b(),de(h(Kl),{key:`${e.indexKey||"superscript"}-${l}`,components:i.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"]]);er.install=e=>{e.component(er.__name,er)};const F0e={class:"subscript-node"},tr=ri(nt({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=bs(()=>t.customId),i=F(()=>kt({text:es,inline_code:ko,link:Do,html_inline:br,strong:Bo,emphasis:zo,footnote_reference:yr,strikethrough:$o,highlight:kr,insert:nr,superscript:er,emoji:Xo,math_inline:ml,reference:Fo},n.value));return(s,o)=>(b(),M("sub",F0e,[(b(!0),M(Be,null,yt(e.node.children,(r,l)=>(b(),de(h(Kl),{key:`${e.indexKey||"subscript"}-${l}`,components:i.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"]]);tr.install=e=>{e.component(tr.__name,tr)};const B0e={class:"strong-node"},Bo=ri(nt({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=bs(()=>t.customId),i=F(()=>kt({text:es,inline_code:ko,link:Do,html_inline:br,emphasis:zo,strikethrough:$o,highlight:kr,insert:nr,subscript:tr,superscript:er,emoji:Xo,footnote_reference:yr,math_inline:ml,reference:Fo},n.value));return(s,o)=>(b(),M("strong",B0e,[(b(!0),M(Be,null,yt(e.node.children,(r,l)=>(b(),de(h(Kl),{key:`${e.indexKey||"strong"}-${l}`,components:i.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"]]);Bo.install=e=>{e.component(Bo.__name,Bo)};const $0e={class:"strikethrough-node"},$o=ri(nt({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=bs(()=>t.customId),i=F(()=>kt({text:es,inline_code:ko,link:Do,html_inline:br,strong:Bo,emphasis:zo,highlight:kr,insert:nr,subscript:tr,superscript:er,emoji:Xo,footnote_reference:yr,math_inline:ml,reference:Fo},n.value));return(s,o)=>(b(),M("del",$0e,[(b(!0),M(Be,null,yt(e.node.children,(r,l)=>(b(),de(h(Kl),{key:`${e.indexKey||"strikethrough"}-${l}`,components:i.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"]]);$o.install=e=>{e.component($o.__name,$o)};const D0e=["href","title","aria-label","aria-hidden","target","rel"],z0e=["aria-hidden"],R0e={class:"link-text-wrapper relative inline-flex"},O0e={class:"leading-[normal] link-text"},Do=ri(nt({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=un("markstreamShowTooltips",void 0),i=F(()=>{const w=n?.value;return typeof w=="boolean"?w:t.showTooltip}),s=F(()=>{var w,k,A,v,x;const S=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",I=(w=t.animationOpacity)!=null?w:.35,_=Math.max(.12,Math.min(.5*I,I)),E={"--underline-height":`${(k=t.underlineHeight)!=null?k:2}px`,"--underline-bottom":S,"--underline-opacity":String(I),"--underline-rest-opacity":String(_),"--underline-duration":`${(A=t.animationDuration)!=null?A:1.6}s`,"--underline-timing":(v=t.animationTiming)!=null?v:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(x=t.animationIteration)!=null?x:"infinite"};return t.color&&(E["--link-color"]=t.color),E}),o=bs(()=>t.customId),r=F(()=>kt({text:es,strong:Bo,strikethrough:$o,emphasis:zo,image:gu,html_inline:br,inline_code:ko},o.value)),l=Rf(),a=F(()=>{var w,k;const A=(w=t.node)==null?void 0:w.attrs;if(!A||typeof A!="object")return{};const v={};if(Array.isArray(A))for(const x of A)Array.isArray(x)&&x[0]&&(v[String(x[0])]=String((k=x[1])!=null?k:""));else for(const[x,S]of Object.entries(A))x&&S!=null&&S!==!1&&(v[x]=S===!0?"":String(S));return A_(v,"safe","a")}),u=F(()=>kt(kt({},l),a.value)),c=F(()=>{var w,k;return A_({href:String((k=(w=t.node)==null?void 0:w.href)!=null?k:"")},"safe","a").href}),d=F(()=>{if(!c.value)return;const w=u.value.target;return(typeof w=="string"?w.trim():String(w??"").trim())||(Cue(c.value)?"_blank":void 0)}),f=F(()=>{var w;return String((w=d.value)!=null?w:"").trim().toLowerCase()==="_blank"}),p=F(()=>{if(!c.value)return;const w=u.value.rel,k=new Set((typeof w=="string"?w:String(w??"")).split(/\s+/).filter(Boolean)),A=new Set(Array.from(k).filter(v=>v.toLowerCase()!=="opener"));return f.value&&(A.add("noopener"),A.add("noreferrer")),A.size>0?Array.from(A).join(" "):void 0}),g=F(()=>{const w=kt({},u.value);return delete w.title,delete w.href,delete w.target,delete w.rel,w});function m(){i.value&&o0e()}const y=F(()=>{var w,k;const A=(w=t.node)==null?void 0:w.title;return typeof A=="string"&&A.trim().length>0?A:String((k=c.value)!=null?k:"")});return(w,k)=>{var A,v;return e.node.loading?(b(),M("span",Jn({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},h(l),{style:s.value}),[C("span",R0e,[C("span",O0e,[V(h(es),{class:"leading-[normal] link-text",node:{type:"text",content:String((A=e.node.text)!=null?A:""),raw:String((v=e.node.text)!=null?v:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),k[1]||(k[1]=C("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,z0e)):(b(),M("a",Jn({key:0,class:"link-node",href:c.value,title:i.value?"":y.value,"aria-label":`Link: ${y.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:p.value},g.value,{style:s.value,onMouseenter:k[0]||(k[0]=x=>(function(S){var I,_,E,N;if(!i.value)return;const D=S,T=D?.clientX!=null&&D?.clientY!=null?{x:D.clientX,y:D.clientY}:void 0,$=((I=t.node)==null?void 0:I.title)||((_=c.value)!=null&&_.includes("xn--")&&((N=(E=t.node)==null?void 0:E.text)!=null&&N.includes("://"))?t.node.text:c.value)||"";s0e(S.currentTarget,$,"top",!1,T)})(x)),onMouseleave:m}),[(b(!0),M(Be,null,yt(e.node.children,(x,S)=>(b(),de(h(Kl),{key:`${e.indexKey||"emphasis"}-${S}`,components:r.value,node:x,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${S}`},null,8,["components","node","custom-id","index-key"]))),128))],16,D0e))}}}),[["__scopeId","data-v-367e6ca4"]]);Do.install=e=>{e.component(Do.__name,Do)};const P0e={class:"insert-node"},nr=ri(nt({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=bs(()=>t.customId),i=F(()=>kt({text:es,inline_code:ko,link:Do,html_inline:br,strong:Bo,emphasis:zo,strikethrough:$o,highlight:kr,subscript:tr,superscript:er,emoji:Xo,footnote_reference:yr,math_inline:ml,reference:Fo},n.value));return(s,o)=>(b(),M("ins",P0e,[(b(!0),M(Be,null,yt(e.node.children,(r,l)=>(b(),de(h(Kl),{key:`${e.indexKey||"insert"}-${l}`,components:i.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"]]);nr.install=e=>{e.component(nr.__name,nr)};const j0e={class:"highlight-node"},kr=ri(nt({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=bs(()=>t.customId),i=F(()=>kt({text:es,inline_code:ko,link:Do,html_inline:br,strong:Bo,emphasis:zo,strikethrough:$o,insert:nr,subscript:tr,superscript:er,emoji:Xo,footnote_reference:yr,math_inline:ml,reference:Fo},n.value));return(s,o)=>(b(),M("mark",j0e,[(b(!0),M(Be,null,yt(e.node.children,(r,l)=>(b(),de(h(Kl),{key:`${e.indexKey||"highlight"}-${l}`,components:i.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"]]);kr.install=e=>{e.component(kr.__name,kr)};const H0e={class:"emphasis-node"},zo=ri(nt({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=bs(()=>t.customId),i=F(()=>kt({text:es,inline_code:ko,link:Do,html_inline:br,strong:Bo,strikethrough:$o,highlight:kr,insert:nr,subscript:tr,superscript:er,emoji:Xo,footnote_reference:yr,math_inline:ml,reference:Fo},n.value));return(s,o)=>(b(),M("em",H0e,[(b(!0),M(Be,null,yt(e.node.children,(r,l)=>(b(),de(h(Kl),{key:`${e.indexKey||"emphasis"}-${l}`,components:i.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"]]);zo.install=e=>{e.component(zo.__name,zo)};const W0e={class:"hard-break"},mu=ri(nt({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(b(),M("br",W0e))}),[["__scopeId","data-v-50c58f70"]]);mu.install=e=>{e.component(mu.__name,mu)};const op=nt({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=wt({checkbox:vr,checkbox_input:vr,emoji:Xo,emphasis:zo,hardbreak:mu,highlight:kr,inline_code:ko,insert:nr,link:Do,reference:Fo,strikethrough:$o,strong:Bo,subscript:tr,superscript:er,text:es}),i=bs(()=>t.customId),s=F(()=>{const o=i.value;return Object.keys(o).length>0?kt(kt({},n),o):n});return(o,r)=>(b(!0),M(Be,null,yt(e.nodes,(l,a)=>(b(),de(h(Kl),{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 p8(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(p8)}function Xm(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(p8))return e;if(!t||e.length!==1)return null;const i=e[0];if(i?.type!=="paragraph"||!Array.isArray(i.children))return null;const s=i.children;return(n||s.length>0)&&s.every(p8)?s:null}function Zc(e){var t,n;if(!e?.length)return null;let i="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;i+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return i}const q0e=["cite"],U0e={key:0,dir:"auto",class:"paragraph-node"},K0e=["custom-id"],zg=ri(nt({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=bs(()=>t.customId),i=F(()=>!!n.value.paragraph),s=F(()=>!!n.value.text),o=F(()=>Xm(t.node.children,!i.value)),r=F(()=>t.fade!==!1||s.value?null:Zc(o.value));return Pn("markstreamShowTooltips",F(()=>t.showTooltips)),Pn("markstreamFade",F(()=>t.fade)),(l,a)=>(b(),M("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[o.value?(b(),M("p",U0e,[r.value!==null?(b(),M("span",{key:0,class:"text-node","custom-id":t.customId},B(r.value),9,K0e)):(b(),de(h(op),{key:1,nodes:o.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(b(),de(h(ir),{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,q0e))}}),[["__scopeId","data-v-abfecebc"]]);zg.install=e=>{e.component(zg.__name,zg)};const V0e={class:"definition-list"},Z0e={class:"definition-term"},G0e={class:"definition-desc"},Rg=ri(nt({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(b(),M("dl",V0e,[(b(!0),M(Be,null,yt(t.node.items,(s,o)=>(b(),M(Be,{key:o},[C("dt",Z0e,[V(h(ir),{"index-key":`definition-term-${t.indexKey}-${o}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),C("dd",G0e,[V(h(ir),{"index-key":`definition-desc-${t.indexKey}-${o}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[1]||(i[1]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);Rg.install=e=>{e.component(Rg.__name,Rg)};const Q0e=["href","title"],xh=ri(nt({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(i){var s;if(i.preventDefault(),typeof document>"u")return;const o=`fnref-${String((s=t.node.id)!=null?s:"")}`,r=document.getElementById(o);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}return(i,s)=>(b(),M("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,Q0e))}}),[["__scopeId","data-v-e1eb37b6"]]);xh.install=e=>{e.component(xh.__name,xh)};const Y0e=["id"],J0e={class:"flex-1"},Og=nt({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(b(),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",J0e,[V(h(ir),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,Y0e))}});Og.install=e=>{e.component(Og.__name,Og)};const X0e=["custom-id"],g8=ri(nt({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=bs(()=>t.customId),i=un("markstreamFade",void 0),s=F(()=>i?.value!==!1||n.value.text?null:Zc(t.node.children)),o=F(()=>kt({text:es,inline_code:ko,link:Do,image:gu,strong:Bo,emphasis:zo,strikethrough:$o,highlight:kr,insert:nr,subscript:tr,superscript:er,emoji:Xo,checkbox:vr,checkbox_input:vr,footnote_reference:yr,hardbreak:mu,math_inline:ml,reference:Fo},n.value));return(r,l)=>(b(),de(Ss(`h${e.node.level}`),Jn({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:he(()=>[s.value!==null?(b(),M("span",{key:0,class:"text-node","custom-id":t.customId},B(s.value),9,X0e)):(b(!0),M(Be,{key:1},yt(e.node.children,(a,u)=>(b(),de(h(Kl),{key:u,components:o.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"]]),Sv=g8;Sv.install=e=>{e.component(g8.__name,g8)};const ege={key:0,dir:"auto",class:"paragraph-node"},tge=["custom-id"],nge={dir:"auto",class:"paragraph-node"},ige=["custom-id"],mf=ri(nt({__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 p;return(p=t.node)!=null?p:t.item}),i=bs(()=>t.customId),s=F(()=>!!i.value.paragraph),o=F(()=>!!i.value.text),r=F(()=>{var p;return Xm((p=n.value)==null?void 0:p.children,!s.value)}),l=F(()=>{var p;if(s.value)return null;const g=(p=n.value)==null?void 0:p.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 y=g.slice(1);if(!y.every(k=>k?.type==="list"))return null;const w=Xm([m]);return w?{paragraphChildren:w,nestedLists:y}:null});function a(){return t.fade===!1&&!o.value}const u=F(()=>a()?Zc(r.value):null),c=F(()=>{var p;return a()?Zc((p=l.value)==null?void 0:p.paragraphChildren):null}),d=Object.freeze({}),f=F(()=>{const{value:p}=t;return typeof p=="number"&&Number.isFinite(p)?{value:p}:d});return Pn("markstreamShowTooltips",F(()=>t.showTooltips)),Pn("markstreamFade",F(()=>t.fade)),(p,g)=>{var m,y;return b(),M("li",Jn({class:"list-item",dir:"auto"},f.value),[r.value?(b(),M("p",ege,[u.value!==null?(b(),M("span",{key:0,class:"text-node","custom-id":t.customId},B(u.value),9,tge)):(b(),de(h(op),{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(),M(Be,{key:1},[C("p",nge,[c.value!==null?(b(),M("span",{key:0,class:"text-node","custom-id":t.customId},B(c.value),9,ige)):(b(),de(h(op),{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),M(Be,null,yt(l.value.nestedLists,(w,k)=>(b(),de(h(ir),{key:k,nodes:[w],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${k}`,"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]=A=>p.$emit("copy",A))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(b(),de(h(ir),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(y=(m=n.value)==null?void 0:m.children)!=null?y:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:g[1]||(g[1]=w=>p.$emit("copy",w))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);mf.install=e=>{e.component(mf.__name,mf)};const vf=ri(nt({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=bs(()=>e.customId),n=F(()=>t.value.list_item||mf);return(i,s)=>(b(),de(Ss(e.node.ordered?"ol":"ul"),{class:$e(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:he(()=>[(b(!0),M(Be,null,yt(e.node.items,(o,r)=>{var l;return b(),de(Ss(n.value),Jn({key:`${e.indexKey||"list"}-${r}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:o,"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=>i.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);vf.install=e=>{e.component(vf.__name,vf)};const sge={key:2,class:"html-block-node__raw"},oge=["innerHTML"],rge={key:1,class:"html-block-node__placeholder"},_h=ri(nt({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=un("markstreamHtmlPolicy",void 0),i=un("markstreamNestedRendererProps",void 0),s=F(()=>{var T,$;return($=(T=t.htmlPolicy)!=null?T:n?.value)!=null?$:"safe"}),o=F(()=>{var T,$;const O=(T=i?.value)!=null?T:{};return fn(kt({},O),{customId:($=t.customId)!=null?$:O.customId,htmlPolicy:s.value})}),r=sl({loader:()=>Promise.resolve().then(()=>Ub),suspensible:!1}),l=F(()=>{const T=Fg(t.node.attrs,s.value);if(!T)return;const $=kh(T);return Object.keys($).length>0?$:void 0}),a=F(()=>{const T=String(t.node.tag||"").trim(),$=Fg(t.node.attrs,s.value,T);if(!$)return;const O=kh($);return Object.keys(O).length>0?O:void 0}),u=bs(()=>t.customId),c=nt({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=G(null),f=G(typeof window>"u"),p=G(t.node.content),g=F(()=>Array.isArray(t.node.children)?t.node.children:[]),m=F(()=>String(t.node.tag||"div")),y=F(()=>{var T;if(m.value.trim().toLowerCase()!=="details"||(T=t.node.attrs)!=null&&T.some(([O])=>String(O).toLowerCase()==="open"))return null;const $=g.value[0];return $?.type==="html_block"&&String($.tag||"").toLowerCase()==="summary"?$:null}),w=F(()=>{var T;return Zc((T=y.value)==null?void 0:T.children)}),k=F(()=>{const T=y.value;if(!T)return;const $=Fg(T.attrs,s.value,"summary");if(!$)return;const O=kh($);return Object.keys(O).length>0?O:void 0}),A=F(()=>w.value==null?g.value:g.value.slice(1)),v=F(()=>{const T=m.value.trim().toLowerCase();return VN.has(T)||Sb(T,s.value)}),x=F(()=>g.value.length>0&&!!t.node.tag&&!v.value),S=F(()=>{var T,$,O;if(x.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(T=p.value)!=null?T:""};const P=($=p.value)!=null?$:t.node.content;if(!P)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:gf(P,s.value)};if(t.node.loading){const j=Ym(P,u.value,s.value);return j===null?{mode:"text",content:(O=t.node.raw)!=null?O:P}:{mode:"dynamic",nodes:j}}if(!AB(P,u.value))return{mode:"html",content:gf(P,s.value)};const R=Ym(P,u.value,s.value);return R===null?{mode:"html",content:gf(P,s.value)}:{mode:"dynamic",nodes:R}}),I=Bb(),_=Nb(),E=Fb(),N=gl(null),D=!!t.node.loading;return typeof window<"u"?(Ge([()=>d.value,()=>_?.value.heavyBlockMargin,()=>_?.value.rootMargin],([T],$,O)=>{var P,R,j,z;if((R=(P=N.value)==null?void 0:P.destroy)==null||R.call(P),N.value=null,!D)return f.value=!0,void(p.value=t.node.content);if(!T)return void(f.value=!1);let K=!0;const q=(z=(j=_?.value.heavyBlockMargin)!=null?j:_?.value.rootMargin)!=null?z:Vc,W=I(T,{rootMargin:q,allowIdle:!E.value});N.value=W,f.value=f.value||W.isVisible.value,W.whenVisible.then(()=>{K&&N.value===W&&(f.value=!0)}),O(()=>{K=!1,W.destroy(),N.value===W&&(N.value=null)})},{immediate:!0}),Ge(()=>t.node.content,T=>{D&&!f.value||(p.value=T)})):f.value=!0,Gn(()=>{var T,$;($=(T=N.value)==null?void 0:T.destroy)==null||$.call(T),N.value=null}),(T,$)=>(b(),de(Ss(x.value?m.value:"div"),Jn({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":h(E)&&!f.value?"true":void 0},x.value?a.value:void 0),{default:he(()=>[f.value?(b(),M(Be,{key:0},[S.value.mode==="structured"?(b(),M(Be,{key:0},[w.value!==null?(b(),M(Be,{key:0},[C("summary",Gz($I(k.value)),B(w.value),17),A.value.length?(b(),de(h(r),Jn({key:0},o.value,{nodes:A.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):te("",!0)],64)):(b(),de(h(r),Jn({key:1},o.value,{nodes:g.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):S.value.mode==="dynamic"?(b(),de(h(c),{key:1,nodes:S.value.nodes},null,8,["nodes"])):S.value.mode==="text"?(b(),M("pre",sge,B(S.value.content),1)):(b(),M("div",Jn({key:3},l.value,{innerHTML:S.value.content}),null,16,oge))],64)):(b(),M("div",rge,[En(T.$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"]]);_h.install=e=>{e.component(_h.__name,_h)};const lge={dir:"auto",class:"paragraph-node"},age=["custom-id"],Oc=ri(nt({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=bs(()=>t.customId),i=un("markstreamHtmlPolicy",void 0),s=un("markstreamFade",void 0),o=un("markstreamParseOptions",void 0),r=un("markstreamCustomMarkdownIt",void 0),l=un("markstreamNestedRendererProps",void 0),a=F(()=>{var _;return(_=i?.value)!=null?_:"safe"}),u=F(()=>{var _;return(_=t.parseOptions)!=null?_:o?.value}),c=F(()=>{var _;return(_=t.customMarkdownIt)!=null?_:r?.value}),d=F(()=>{var _,E;return(E=t.customHtmlTags)!=null?E:(_=l?.value)==null?void 0:_.customHtmlTags}),f=F(()=>{var _,E;const N=(_=l?.value)!=null?_:{};return fn(kt({},N),{customId:(E=t.customId)!=null?E:N.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),p=sl({loader:()=>Promise.resolve().then(()=>Ub),suspensible:!1});function g(_){var E;return _.type==="text"&&String((E=_.content)!=null?E:"").trim()===""}const m=F(()=>t.node.children.filter(_=>!g(_))),y=F(()=>m.value.length>0&&m.value.every(_=>_.type==="image"||(function(E){var N;const D=(function(T){return T.type==="link"&&Array.isArray(T.children)?T.children.filter($=>!g($)):[]})(E);return D.length===1&&((N=D[0])==null?void 0:N.type)==="image"})(_))),w=F(()=>new Set(od(d.value))),k=F(()=>{if(!y.value||m.value.length<=1)return t.node.children;const _=[];for(let E=0;E<t.node.children.length;E++){const N=t.node.children[E];if(!g(N)){_.push(N);continue}const D=_.length>0,T=t.node.children.slice(E+1).some($=>!g($));D&&T&&_.push(fn(kt({},N),{content:" ",raw:" "}))}return _}),A=F(()=>s?.value===!1&&!n.value.text),v=F(()=>A.value?Zc(k.value):null);function x(_,E){return{node:_,"index-key":`${t.indexKey}-${E}`,"custom-id":t.customId,"custom-html-tags":d.value}}const S=F(()=>kt({inline_code:ko,image:gu,link:Do,hardbreak:mu,emphasis:zo,strong:Bo,strikethrough:$o,highlight:kr,insert:nr,subscript:tr,superscript:er,html_inline:br,html_block:_h,emoji:Xo,checkbox:vr,math_inline:ml,checkbox_input:vr,reference:Fo,footnote_anchor:xh,footnote_reference:yr,text:es},n.value)),I=F(()=>k.value.map((_,E)=>{var N;const D=(function(T){var $,O,P,R;if(T.type==="html_block"||T.type==="html_inline"){const j=String(($=T.tag)!=null?$:"").trim().toLowerCase()||JN(T.content);if(j&&!w.value.has(j)&&XN((O=T.content)!=null?O:T.raw,j)){const z=String((R=(P=T.content)!=null?P:T.raw)!=null?R:"");return{child:{type:"text",content:z,raw:z},component:es,isCustomComponent:!1}}}return{child:T,component:S.value[T.type],isCustomComponent:!!(n.value[T.type]&&!Ep(String(T.type)))}})(_);return fn(kt({},D),{index:E,key:`${t.indexKey||"paragraph"}-${E}`,customAttrs:D.isCustomComponent?Lb(D.child,a.value):void 0,hasSlotChildren:Array.isArray(D.child.children)&&D.child.children.length>0,slotContent:String((N=D.child.content)!=null?N:""),originalChild:_})}));return(_,E)=>(b(),M("p",lge,[v.value!==null?(b(),M("span",{key:0,class:"text-node","custom-id":t.customId},B(v.value),9,age)):(b(!0),M(Be,{key:1},yt(I.value,N=>{return b(),M(Be,{key:N.key},[y.value&&g(N.originalChild)?(b(),M(Be,{key:0},[qe(B((D=N.originalChild,String((T=D.content)!=null?T:""))),1)],64)):N.isCustomComponent?(b(),de(Ss(N.component),Jn({key:1,ref_for:!0},N.customAttrs,{node:N.child,loading:N.child.loading,"index-key":N.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:he(()=>[N.hasSlotChildren?(b(),de(h(p),Jn({key:0,ref_for:!0},f.value,{nodes:N.child.children,"index-key":N.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):N.slotContent?(b(),de(h(p),Jn({key:1,ref_for:!0},f.value,{content:N.slotContent,final:!N.child.loading,"index-key":`${N.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(),de(Ss(N.component),Jn({key:2,ref_for:!0},x(N.child,N.index)),null,16))],64);var D,T}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);Oc.install=e=>{e.component(Oc.__name,Oc)};const uge={class:"table-node-wrapper"},cge=["aria-busy"],dge={key:0},fge=["custom-id"],hge=["aria-label","onPointerdown"],pge=["custom-id"],gge={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},Sh=ri(nt({__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 w;return(w=t.node.loading)!=null&&w}),i=F(()=>{var w;return(w=t.node.rows)!=null?w:[]}),s=G(null),o=G([]);let r=null;const l=F(()=>t.node.header.cells.length),a=F(()=>o.value.some(w=>Number.isFinite(w)&&w>0)),u=F(()=>a.value?o.value.map(w=>w>0?{width:`${w}px`}:void 0):[]);Pn("markstreamShowTooltips",F(()=>t.showTooltips)),Pn("markstreamFade",F(()=>t.fade));const c=bs(()=>t.customId),d=F(()=>!!c.value.text),f=F(()=>!!c.value.paragraph),p=new WeakMap;function g(w){const k=t.fade===!1&&!d.value,A=!f.value,v=p.get(w);if(v?.children===w.children&&v.textFastPath===k&&v.paragraphFastPath===A)return v.info;const x=Xm(w.children,A,!0),S={simpleChildren:x,plainText:x&&k?Zc(x):null};return p.set(w,{children:w.children,textFastPath:k,paragraphFastPath:A,info:S}),S}function m(w){if(!r)return;w.preventDefault();const k=r.startWidth+r.nextStartWidth,A=Math.min(48,Math.floor(k/2)),v=Math.max(A,Math.min(k-A,Math.round(r.startWidth+w.clientX-r.startX))),x=[...r.widths];x[r.index]=v,x[r.index+1]=k-v,o.value=x}function y(){r&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),r=null)}return Ge(l,()=>{y(),o.value=[]}),Gn(y),(w,k)=>(b(),M("div",uge,[C("table",{ref_key:"tableRef",ref:s,class:$e(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(b(),M("colgroup",dge,[(b(!0),M(Be,null,yt(e.node.header.cells,(A,v)=>(b(),M("col",{key:v,style:Vt(u.value[v])},null,4))),128))])):te("",!0),C("thead",null,[C("tr",null,[(b(!0),M(Be,null,yt(e.node.header.cells,(A,v)=>(b(),M("th",{key:v,dir:"auto",class:$e([A.align==="right"?"text-right":A.align==="center"?"text-center":"text-left"])},[g(A).plainText!==null?(b(),M("span",{key:0,class:"text-node","custom-id":t.customId},B(g(A).plainText),9,fge)):g(A).simpleChildren?(b(),de(h(op),{key:1,nodes:g(A).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${v}`},null,8,["nodes","custom-id","index-key"])):(b(),de(h(ir),{key:2,nodes:A.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:k[0]||(k[0]=x=>w.$emit("copy",x))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),v<e.node.header.cells.length-1?(b(),M("button",{key:3,type:"button",class:"table-node__resize-handle","aria-label":`Resize columns ${v+1} and ${v+2}`,onPointerdown:x=>(function(S,I){if(I.button!==0)return;const _=(function(){var D;const T=(D=s.value)==null?void 0:D.querySelectorAll("thead th");return Array.from(T??[],$=>Math.round($.getBoundingClientRect().width))})(),E=_[S],N=_[S+1];E&&N&&(I.preventDefault(),r={index:S,startX:I.clientX,startWidth:E,nextStartWidth:N,widths:_},o.value=_,window.addEventListener("pointermove",m),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y))})(v,x)},null,40,hge)):te("",!0)],2))),128))])]),C("tbody",null,[(b(!0),M(Be,null,yt(i.value,(A,v)=>(b(),M("tr",{key:v},[(b(!0),M(Be,null,yt(A.cells,(x,S)=>(b(),M("td",{key:S,class:$e([x.align==="right"?"text-right":x.align==="center"?"text-center":"text-left"]),dir:"auto"},[g(x).plainText!==null?(b(),M("span",{key:0,class:"text-node","custom-id":t.customId},B(g(x).plainText),9,pge)):g(x).simpleChildren?(b(),de(h(op),{key:1,nodes:g(x).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${v}-${S}`},null,8,["nodes","custom-id","index-key"])):(b(),de(h(ir),{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:k[1]||(k[1]=I=>w.$emit("copy",I))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,cge),V(gs,{name:"table-node-fade"},{default:he(()=>[n.value?(b(),M("div",gge,[En(w.$slots,"loading",{isLoading:n.value},()=>[k[2]||(k[2]=C("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),k[3]||(k[3]=C("span",{class:"sr-only"},"Loading",-1))],!0)])):te("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);Sh.install=e=>{e.component(Sh.__name,Sh)};const mge={class:"hr-node"},Pg=ri({},[["render",function(e,t){return b(),M("hr",mge)}],["__scopeId","data-v-39b2349c"]]);Pg.install=e=>{e.component(Pg.__name,Pg)};const vge={class:"unknown-node"},m8=nt({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(b(),M("div",vge,B(e.node.raw),1))}),jg=ri(nt({__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}`),i=bs(()=>t.customId),s=F(()=>kt({text:es,paragraph:Oc,heading:Sv,inline_code:ko,link:Do,image:gu,strong:Bo,emphasis:zo,strikethrough:$o,insert:nr,subscript:tr,superscript:er,checkbox:vr,checkbox_input:vr,hardbreak:mu,math_inline:ml,reference:Fo,list:vf,math_block:IB,table:Sh},i.value));return(o,r)=>(b(),M("div",Jn({class:n.value},e.node.attrs),[(b(!0),M(Be,null,yt(e.node.children,(l,a)=>{return b(),de(Ss((u=l.type,s.value[u]||m8)),{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"]]);jg.install=e=>{e.component(jg.__name,jg)};const yge=["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"],T_=[[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 bge(e){if(e<=255)return yge[e];let t=0,n=T_.length-1;for(;t<=n;){const i=t+n>>1,s=T_[i];if(e<s[0])n=i-1;else{if(!(e>s[1]))return s[2];t=i+1}}return"L"}const kge=/[ \t\n\r\f]+/g,Age=/[\t\n\r\f]| {2,}|^ | $/;let Zy=null;const Cge=new RegExp("\\p{Script=Arabic}","u"),Iu=new RegExp("\\p{M}","u"),Db=new RegExp("\\p{Nd}","u");function L_(e){return Cge.test(e)}function N_(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 Rl(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){const i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){if(N_(i-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(N_(n))return!0}}return!1}const wge=new Set([" "," ","⁠","\uFEFF"]),xge=new Set(["-","‐","–","—"]);function EB(e,t){return!((function(n){const i=Mh(n);return i!==null&&wge.has(i)})(e)||t&&((function(n){const i=Mh(n);return i!==null&&(zb.has(i)||Gc.has(i))})(e)||(function(n){const i=Mh(n);return i!==null&&xge.has(i)})(e)))}const zb=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Mv=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),Rb=new Set(["'","’"]),Gc=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),_ge=new Set([":",".","،","؛"]),Sge=new Set(["၏"]),Mge=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Ige(e){if(Ob(e))return!0;let t=!1;for(const n of e)if(Gc.has(n)||t2(n))t=!0;else if(!t||!Iu.test(n))return!1;return t}function Ege(e){for(const t of e)if(!zb.has(t)&&!Gc.has(t))return!1;return e.length>0}function Tge(e){if(Ob(e))return!0;for(const t of e)if(!(Mv.has(t)||Rb.has(t)||Iu.test(t)||t2(t)))return!1;return e.length>0}function Ob(e){let t=!1;for(const n of e)if(n!=="\\"&&!Iu.test(n)){if(!(Mv.has(n)||Gc.has(n)||Rb.has(n)))return!1;t=!0}return t}function e2(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const i=e.charCodeAt(n);if(i<56320||i>57343)return n;const s=n-1;if(s<0)return n;const o=e.charCodeAt(s);return o>=55296&&o<=56319?s:n}function Mh(e){if(e.length===0)return null;const t=e2(e,e.length);return e.slice(t)}const Lge=[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 t2(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,i){for(let s=0;s<i.length;s+=2)if(n>=i[s]&&n<=i[s+1])return!0;return!1})(t,Lge)}function Nge(e){const t=(function(n){for(const i of n)if(!Iu.test(i))return i;return null})(e);return t!==null&&Db.test(t)}function Fge(e){const t=Array.from(e);let n=t.length;for(;n>0;){const i=t[n-1];if(Iu.test(i))n--;else{if(!Mv.has(i)&&!Rb.has(i))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function Bge(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function F_(e,t,n,i){const s=t[i],o=e[i];if(s==null)return o;const r=n[i];if(o.length===r)return o;const l=s.repeat(r);return e[i]=l,l}function B_(e,t){return e&&t!==null&&_ge.has(t)}function $ge(e){const t=Mh(e);return t!==null&&Sge.has(t)}function Dge(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 v8(e){let t=e.length;for(;t>0;){const n=e2(e,t),i=e.slice(n,t);if(Mge.has(i))return!0;if(!Gc.has(i))return!1;t=n}return!1}function zge(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 Rge=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Yr(e){return e.length===1?e[0]:e.join("")}function Oge(e,t){const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),Yr(n)}function Pge(e,t,n,i){if(!Rge.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let o=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=zge(c,i),f=d==="text"&&t;o===null||d!==o||f!==a?(o!==null&&s.push({text:Yr(r),isWordLike:a,kind:o,start:l}),o=d,r=[c],l=n+u,a=f,u+=c.length):(r.push(c),u+=c.length)}return o!==null&&s.push({text:Yr(r),isWordLike:a,kind:o,start:l}),s}function Gy(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const jge=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Hge(e,t){const n=e.texts[t];return!!n.startsWith("www.")||jge.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function Wge(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}const qge=new Set([":","-","/","×",",",".","+","–","—"]),Uge=/[\p{P}\p{S}\p{Co}]/u,Kge=new RegExp("\\p{Emoji_Presentation}","u"),Vge=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function TB(e){const t=e.charCodeAt(0);return t<128?(function(n){return n>=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!Vge.has(e)&&!Kge.test(e)&&Uge.test(e)}function $_(e){let t=!1;for(const n of e)if(!Iu.test(n)){if(!TB(n))return!1;t=!0}return t}function Zge(e,t,n,i){const s=!t&&$_(e),o=!i&&$_(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=e2(c,d),p=c.slice(f,d);if(!Iu.test(p))return p;d=f}return null})(a);return u!==null&&t2(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=e2(a,u),d=a.slice(c,u);if(!Iu.test(d))return TB(d)||t2(d);u=c}return!1})(e);return!!(s||o||l)&&!Rl(e)&&!Rl(n)&&(t||s||r)&&(i||o)}function D_(e){for(const t of e)if(Db.test(t))return!0;return!1}function Hg(e){if(e.length===0)return!1;for(const t of e)if(!Db.test(t)&&!qge.has(t))return!1;return!0}function Gge(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let i=0;for(let s=0;s<e.len;s++)e.kinds[s]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:s,consumedEndSegmentIndex:s+1}),i=s+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function Qge(e,t,n="normal",i="normal"){const s=(function(a){const u=a??"normal";return u==="pre-wrap"?{mode:u,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:u,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}})(n),o=s.mode==="pre-wrap"?(function(a){return/[\r\f]/.test(a)?a.replace(/\r\n/g,` -`).replace(/[\r\f]/g,` -`):a})(e):(function(a){if(!Age.test(a))return a;let u=a.replace(kge," ");return u.charCodeAt(0)===32&&(u=u.slice(1)),u.length>0&&u.charCodeAt(u.length-1)===32&&(u=u.slice(0,-1)),u})(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=(function(a,u,c){var d,f,p;const g=(Zy===null&&(Zy=new Intl.Segmenter(void 0,{granularity:"word"})),Zy);let m=0;const y=[],w=[],k=[],A=[],v=[],x=[],S=[],I=[],_=[],E=[],N=[],D=[];for(const R of g.segment(a))for(const j of Pge(R.segment,(d=R.isWordLike)!=null&&d,R.index,c)){let z=function(){x[ie]!==null&&(w[ie]=[F_(y,x,S,ie)],x[ie]=null),w[ie].push(j.text),k[ie]=k[ie]||j.isWordLike,I[ie]=I[ie]||W,_[ie]=_[ie]||Z,E[ie]=X,N[ie]=ue,D[ie]=B_(_[ie],ne)};const K=j.kind==="text",q=Bge(j.text,j.isWordLike,j.kind),W=Rl(j.text),Z=L_(j.text),ne=Mh(j.text),X=v8(j.text),ue=$ge(j.text),ie=m-1;u.carryCJKAfterClosingQuote&&K&&m>0&&A[ie]==="text"&&W&&I[ie]&&E[ie]||K&&m>0&&A[ie]==="text"&&Ege(j.text)&&I[ie]||K&&m>0&&A[ie]==="text"&&N[ie]?z():K&&m>0&&A[ie]==="text"&&j.isWordLike&&Z&&D[ie]?(z(),k[ie]=!0):q!==null&&m>0&&A[ie]==="text"&&x[ie]===q?S[ie]=((f=S[ie])!=null?f:1)+1:K&&!j.isWordLike&&m>0&&A[ie]==="text"&&!I[ie]&&(Ige(j.text)||j.text==="-"&&k[ie])?z():(y[m]=j.text,w[m]=[j.text],k[m]=j.isWordLike,A[m]=j.kind,v[m]=j.start,x[m]=q,S[m]=q===null?0:1,I[m]=W,_[m]=Z,E[m]=X,N[m]=ue,D[m]=B_(Z,ne),m++)}for(let R=0;R<m;R++)x[R]===null?y[R]=Yr(w[R]):y[R]=F_(y,x,S,R);for(let R=1;R<m;R++)A[R]!=="text"||k[R]||!Ob(y[R])||A[R-1]!=="text"||I[R-1]||(y[R-1]+=y[R],k[R-1]=k[R-1]||k[R],y[R]="");const T=Array.from({length:m},()=>null);let $=-1;for(let R=m-1;R>=0;R--){const j=y[R];if(j.length!==0){if(A[R]==="text"&&!k[R]&&$>=0&&A[$]==="text"&&(Tge(j)||j==="-"&&Nge(y[$]))){const z=(p=T[$])!=null?p:[];z.push(j),T[$]=z,v[$]=v[R],y[R]="";continue}$=R}}for(let R=0;R<m;R++){const j=T[R];j!=null&&(y[R]=Oge(j,y[R]))}let O=0;for(let R=0;R<m;R++){const j=y[R];j.length!==0&&(O!==R&&(y[O]=j,k[O]=k[R],A[O]=A[R],v[O]=v[R]),O++)}y.length=O,k.length=O,A.length=O,v.length=O;const P=(function(R){const j=R.texts.slice(),z=R.isWordLike.slice(),K=R.kinds.slice(),q=R.starts.slice();for(let W=0;W<j.length-1;W++){if(K[W]!=="text"||K[W+1]!=="text"||!Rl(j[W])||!Rl(j[W+1]))continue;const Z=Fge(j[W]);Z!==null&&(j[W]=Z.head,j[W+1]=Z.tail+j[W+1],q[W+1]=q[W]+Z.head.length)}return{len:j.length,texts:j,isWordLike:z,kinds:K,starts:q}})((function(R){const j=[],z=[],K=[],q=[];let W=0;for(;W<R.len;){const Z=R.texts[W],ne=R.kinds[W],X=R.isWordLike[W];if(ne==="text"){const ue=[Z];let ie=W+1,Se=X;for(;ie<R.len&&R.kinds[ie]==="text"&&Zge(R.texts[ie-1],R.isWordLike[ie-1],R.texts[ie],R.isWordLike[ie]);){const fe=R.texts[ie];ue.push(fe),Se=Se||R.isWordLike[ie],ie++}if(ie>W+1){j.push(Yr(ue)),z.push(Se),K.push("text"),q.push(R.starts[W]),W=ie;continue}}j.push(Z),z.push(X),K.push(ne),q.push(R.starts[W]),W++}return{len:j.length,texts:j,isWordLike:z,kinds:K,starts:q}})((function(R){const j=[],z=[],K=[],q=[];for(let W=0;W<R.len;W++){const Z=R.texts[W];if(R.kinds[W]==="text"&&Z.includes("-")){const ne=Z.split("-");let X=ne.length>1;for(let ue=0;ue<ne.length;ue++){const ie=ne[ue];if(!X)break;ie.length!==0&&D_(ie)&&Hg(ie)||(X=!1)}if(X){let ue=0;for(let ie=0;ie<ne.length;ie++){const Se=ne[ie],fe=ie<ne.length-1?`${Se}-`:Se;j.push(fe),z.push(!0),K.push("text"),q.push(R.starts[W]+ue),ue+=fe.length}continue}}j.push(Z),z.push(R.isWordLike[W]),K.push(R.kinds[W]),q.push(R.starts[W])}return{len:j.length,texts:j,isWordLike:z,kinds:K,starts:q}})((function(R){const j=[],z=[],K=[],q=[];for(let W=0;W<R.len;W++){const Z=R.texts[W],ne=R.kinds[W];if(ne==="text"&&Hg(Z)&&D_(Z)){const X=[Z];let ue=W+1;for(;ue<R.len&&R.kinds[ue]==="text"&&Hg(R.texts[ue]);)X.push(R.texts[ue]),ue++;j.push(Yr(X)),z.push(!0),K.push("text"),q.push(R.starts[W]),W=ue-1;continue}j.push(Z),z.push(R.isWordLike[W]),K.push(ne),q.push(R.starts[W])}return{len:j.length,texts:j,isWordLike:z,kinds:K,starts:q}})((function(R){const j=[],z=[],K=[],q=[];for(let W=0;W<R.len;W++){const Z=R.texts[W];if(j.push(Z),z.push(R.isWordLike[W]),K.push(R.kinds[W]),q.push(R.starts[W]),!Wge(Z))continue;const ne=W+1;if(ne>=R.len||Gy(R.kinds[ne]))continue;const X=[],ue=R.starts[ne];let ie=ne;for(;ie<R.len&&!Gy(R.kinds[ie]);)X.push(R.texts[ie]),ie++;X.length>0&&(j.push(Yr(X)),z.push(!0),K.push("text"),q.push(ue),W=ie-1)}return{len:j.length,texts:j,isWordLike:z,kinds:K,starts:q}})((function(R){const j=R.texts.slice(),z=R.isWordLike.slice(),K=R.kinds.slice(),q=R.starts.slice();for(let Z=0;Z<R.len;Z++){if(K[Z]!=="text"||!Hge(R,Z))continue;const ne=[j[Z]];let X=Z+1;for(;X<R.len&&!Gy(K[X]);){ne.push(j[X]),z[Z]=!0;const ue=j[X].includes("?");if(K[X]="text",j[X]="",X++,ue)break}j[Z]=Yr(ne)}let W=0;for(let Z=0;Z<j.length;Z++){const ne=j[Z];ne.length!==0&&(W!==Z&&(j[W]=ne,z[W]=z[Z],K[W]=K[Z],q[W]=q[Z]),W++)}return j.length=W,z.length=W,K.length=W,q.length=W,{len:W,texts:j,isWordLike:z,kinds:K,starts:q}})((function(R){const j=[],z=[],K=[],q=[];let W=0;for(;W<R.len;){const Z=[R.texts[W]];let ne=R.isWordLike[W],X=R.kinds[W],ue=R.starts[W];if(X==="glue"){const ie=[Z[0]],Se=ue;for(W++;W<R.len&&R.kinds[W]==="glue";)ie.push(R.texts[W]),W++;const fe=Yr(ie);if(!(W<R.len&&R.kinds[W]==="text")){j.push(fe),z.push(!1),K.push("glue"),q.push(Se);continue}Z[0]=fe,Z.push(R.texts[W]),ne=R.isWordLike[W],X="text",ue=Se,W++}else W++;if(X==="text")for(;W<R.len&&R.kinds[W]==="glue";){const ie=[];for(;W<R.len&&R.kinds[W]==="glue";)ie.push(R.texts[W]),W++;const Se=Yr(ie);W<R.len&&R.kinds[W]==="text"?(Z.push(Se,R.texts[W]),ne=ne||R.isWordLike[W],W++):Z.push(Se)}j.push(Yr(Z)),z.push(ne),K.push(X),q.push(ue)}return{len:j.length,texts:j,isWordLike:z,kinds:K,starts:q}})({len:O,texts:y,isWordLike:k,kinds:A,starts:v})))))));for(let R=0;R<P.len-1;R++){const j=Dge(P.texts[R]);j!==null&&(P.kinds[R]!=="space"&&P.kinds[R]!=="preserved-space"||P.kinds[R+1]!=="text"||!L_(P.texts[R+1])||(P.texts[R]=j.space,P.isWordLike[R]=!1,P.kinds[R]=P.kinds[R]==="preserved-space"?"preserved-space":"space",P.texts[R+1]=j.marks+P.texts[R+1],P.starts[R+1]=P.starts[R]+j.space.length))}return P})(o,t,s),l=i==="keep-all"?(function(a,u,c){if(u.len<=1)return u;const d=[],f=[],p=[],g=[];let m=-1,y=!1;function w(A){d.push(u.texts[A]),f.push(u.isWordLike[A]),p.push("text"),g.push(u.starts[A])}function k(A){if(!(m<0)){if(y)m+1===A?w(m):(function(v,x){let S=!1;for(let E=v;E<x;E++)S=S||u.isWordLike[E];const I=u.starts[v],_=x<u.len?u.starts[x]:a.length;d.push(a.slice(I,_)),f.push(S),p.push("text"),g.push(I)})(m,A);else for(let v=m;v<A;v++)w(v);m=-1,y=!1}}for(let A=0;A<u.len;A++){const v=u.texts[A],x=u.kinds[A];x!=="text"?(k(A),d.push(v),f.push(u.isWordLike[A]),p.push(x),g.push(u.starts[A])):(m>=0&&!EB(u.texts[A-1],c)&&k(A),m<0&&(m=A),y=y||Rl(v))}return k(u.len),{len:d.length,texts:d,isWordLike:f,kinds:p,starts:g}})(o,r,t.breakKeepAllAfterPunctuation):r;return kt({normalized:o,chunks:Gge(l,s)},l)}let Nd=null;const z_=new Map;let Fd=null;const Yge=new RegExp("\\p{Emoji_Presentation}","u"),Jge=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let Qy=null;const R_=new Map;function y8(){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 Za(e,t){let n=t.get(e);return n===void 0&&(n={width:y8().measureText(e).width,containsCJK:Rl(e)},t.set(e,n)),n}function n2(){if(Fd!==null)return Fd;if(typeof navigator>"u")return Fd={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Fd;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 Fd={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Fd}function LB(){return Qy===null&&(Qy=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Qy}function Xge(e){return Yge.test(e)||e.includes("️")}function cc(e,t,n){return n===0?t.width:t.width-(function(i,s){return s.emojiCount===void 0&&(s.emojiCount=(function(o){let r=0;const l=LB();for(const a of l.segment(o))Xge(a.segment)&&r++;return r})(i)),s.emojiCount})(e,t)*n}function eme(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function O_(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function P_(e,t,n=e.widths.length){for(;t<n&&eme(e.kinds[t]);)t++;return t}function tme(e,t){if(t<=0)return 0;const n=e%t;return Math.abs(n)<=1e-6?t:t-n}function nme(e,t,n){return e.letterSpacing!==0&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function Pb(e,t){return t===0?0:e+t}function ime(e,t,n,i,s){return Pb(i,t==="tab"?s+(function(o,r){return o.letterSpacing!==0&&o.spacingGraphemeCounts[r]>0?o.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function j_(e,t,n,i){return Pb(i,t==="tab"?0:e.lineEndFitAdvances[n])}function H_(e,t,n,i,s){return Pb(i,t==="tab"?s:e.lineEndPaintAdvances[n])}function sme(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function ome(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function X0(e,t,n){let i=t;for(;i<e.length&&e[i]<n;)i++;return i}function rme(e,t){return(function(n,i){if(n.simpleLineWalkFastPath)return(function(T,$){const{widths:O,kinds:P,breakableFitAdvances:R,breakablePreferredBreaks:j}=T;if(O.length===0)return 0;const z=$+n2().lineFitEpsilon;let K=0,q=0,W=!1,Z=0,ne=0,X=-1,ue=0;function ie(ye=Z,H=ne,Y=q){K++,q=0,W=!1,X=-1,ue=0}function Se(ye,H){W=!0,Z=ye+1,ne=0,q=H}function fe(ye,H,Y){W=!0,Z=ye,ne=H+1,q=Y}function pe(ye,H){W?(q+=H,Z=ye+1,ne=0):Se(ye,H)}function Ne(ye,H){var Y;const ve=R[ye],re=(Y=j[ye])!=null?Y:null;let se=re===null?-1:X0(re,0,H+1),U=-1,J=0,ce=H;for(;ce<ve.length;){const ge=ve[ce];if(W)if(q+ge>z){if(re!==null&&U>H){ie(ye,U,J),ce=U,se=X0(re,se,ce+1),U=-1,J=0;continue}ie(),fe(ye,ce,ge)}else q+=ge,Z=ye,ne=ce+1;else fe(ye,ce,ge);const Me=ce+1;re!==null&&re[se]===Me&&(U=Me,J=q,se++),ce++}W&&Z===ye&&ne===ve.length&&(Z=ye+1,ne=0)}let ee=0;for(;ee<O.length&&(W||(ee=P_(T,ee),!(ee>=O.length)));){const ye=O[ee],H=O_(P[ee]);if(W)if(q+ye>z){if(H){pe(ee,ye),ie(ee+1,0,q-ye),ee++;continue}if(X>=0){if(Z>X||Z===X&&ne>0){ie();continue}ie(X,0,ue);continue}if(ye>z&&R[ee]!==null){ie(),Ne(ee,0),ee++;continue}ie()}else pe(ee,ye),H&&(X=ee+1,ue=q-ye),ee++;else ye>z&&R[ee]!==null?Ne(ee,0):Se(ee,ye),H&&(X=ee+1,ue=q-ye),ee++}return W&&ie(),K})(n,i);const{widths:s,kinds:o,breakableFitAdvances:r,breakablePreferredBreaks:l,discretionaryHyphenWidth:a,chunks:u}=n;if(s.length===0||u.length===0)return 0;const c=n2(),d=i+c.lineFitEpsilon;let f=0,p=0,g=!1,m=0,y=0,w=-1,k=0,A=null;function v(){w=-1,k=0,A=null}function x(T=m,$=y,O){f++,p=0,g=!1,v()}function S(T,$){g=!0,m=T+1,y=0,p=$}function I(T,$,O){g=!0,m=T,y=$+1,p=O}function _(T,$){g?(p+=$,m=T+1,y=0):S(T,$)}function E(T,$,O,P,R,j){if(!$)return;const z=j_(n,T,O,R);H_(n,T,O,R,P),w=O+1,k=p-j+z,A=T}function N(T,$){var O;const P=r[T],R=(O=l[T])!=null?O:null;let j=R===null?-1:X0(R,0,$+1),z=-1,K=$;for(;K<P.length;){const q=P[K];if(g){const Z=sme(n,!0,q),ne=p+Z;if(ome(n,ne)>d){if(R!==null&&z>$){x(T,z),K=z,j=X0(R,j,K+1),z=-1;continue}x(),I(T,K,q)}else p=ne,m=T,y=K+1}else I(T,K,q);const W=K+1;R!==null&&R[j]===W&&(z=W,j++),K++}g&&m===T&&y===P.length&&(m=T+1,y=0)}function D(T){f++,v()}for(let T=0;T<u.length;T++){const $=u[T];if($.startSegmentIndex===$.endSegmentIndex){D();continue}g=!1,p=0,$.startSegmentIndex,m=$.startSegmentIndex,y=0,v();let O=$.startSegmentIndex;for(;O<$.endSegmentIndex&&(g||(O=P_(n,O,$.endSegmentIndex),!(O>=$.endSegmentIndex)));){const P=o[O],R=O_(P),j=nme(n,g,O),z=P==="tab"?tme(p+j,n.tabStopAdvance):s[O],K=j+z,q=ime(n,P,O,j,z);if(P!=="soft-hyphen")if(g){if(p+q>d){const W=p+j_(n,P,O,j);if(H_(n,P,O,j,z),A==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&k<=d){x(w,0);continue}if(R&&W<=d){_(O,K),x(O+1,0),O++;continue}if(w>=0&&k<=d){if(m>w||m===w&&y>0){x();continue}const Z=w;x(Z,0),O=Z;continue}if(q>d&&r[O]!==null){x(),N(O,0),O++;continue}x();continue}_(O,K),E(P,R,O,z,j,K),O++}else q>d&&r[O]!==null?N(O,0):S(O,z),E(P,R,O,z,j,K),O++;else g&&(m=O+1,y=0,w=O+1,k=p+a,A=P),O++}g&&($.consumedEndSegmentIndex,x($.consumedEndSegmentIndex,0))}return f})(e,t)}let Yy=null;function jb(){return Yy===null&&(Yy=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Yy}function lme(e,t){const n=[];let i=[],s=0,o=!1,r=!1,l=!1;function a(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:s}),i=[],o=!1,r=!1,l=!1)}function u(d,f,p){i=[d],s=f,o=p,r=v8(d),l=Mv.has(d)}function c(d,f){i.push(d),o=o||f;const p=v8(d);r=d.length===1&&Gc.has(d)&&r||p,l=!1}for(const d of jb().segment(e)){const f=d.segment,p=Rl(f);i.length!==0?l||zb.has(f)||Gc.has(f)||t.carryCJKAfterClosingQuote&&p&&r?c(f,p):o||p?(a(),u(f,d.index,p)):c(f,p):u(f,d.index,p)}return a(),n}function ame(e,t,n){if(t.length<=1)return t;const i=[];let s=-1,o=!1;function r(l){if(!(s<0)){if(o)s+1===l?i.push(t[s]):(function(a,u){const c=t[a].start,d=u<t.length?t[u].start:e.length;i.push({text:e.slice(c,d),start:c})})(s,l);else for(let a=s;a<l;a++)i.push(t[a]);s=-1,o=!1}}for(let l=0;l<t.length;l++){const a=t[l];s>=0&&!EB(t[l-1].text,n)&&r(l),s<0&&(s=l),o=o||Rl(a.text)}return r(t.length),i}function W_(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const i=jb();for(const s of i.segment(e))n++;return n}function ume(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function cme(e,t,n,i,s){const o=n2(),{cache:r,emojiCorrection:l}=(function(D,T){y8().font=D;const $=(function(R){let j=z_.get(R);return j||(j=new Map,z_.set(R,j)),j})(D),O=(function(R){const j=R.match(/(\d+(?:\.\d+)?)\s*px/);return j?parseFloat(j[1]):16})(D),P=T?(function(R,j){let z=R_.get(R);if(z!==void 0)return z;const K=y8();K.font=R;const q=K.measureText("😀").width;if(z=0,q>j+.5&&typeof document<"u"&&document.body!==null){const W=document.createElement("span");W.style.font=R,W.style.display="inline-block",W.style.visibility="hidden",W.style.position="absolute",W.textContent="😀",document.body.appendChild(W);const Z=W.getBoundingClientRect().width;document.body.removeChild(W),q-Z>.5&&(z=q-Z)}return R_.set(R,z),z})(D,O):0;return{cache:$,fontSize:O,emojiCorrection:P}})(t,(a=e.normalized,Jge.test(a)));var a;const u=cc("-",Za("-",r),l)+(s===0?0:2*s),c=8*cc(" ",Za(" ",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=[],p=[],g=[],m=[];let y=e.chunks.length<=1&&!d;const w=null,k=[],A=[],v=[],x=null,S=Array.from({length:e.len});function I(D,T,$,O,P,R,j,z,K){P!=="text"&&P!=="space"&&P!=="zero-width-break"&&(y=!1),f.push(T),p.push($),g.push(O),m.push(P),k.push(j),A.push(z),d&&v.push(K)}function _(D,T,$,O,P){const R=Za(D,r),j=d?W_(D,T):0,z=(function(Z,ne,X){return ne>1?Z+(ne-1)*X:Z})(cc(D,R,l),j,s),K=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:z,q=K===0?0:K+(j>0?s:0),W=T==="space"||T==="zero-width-break"?0:z;if(P&&O&&D.length>1){let Z="sum-graphemes";s!==0?Z="segment-prefixes":Hg(D)?Z="pair-context":o.preferPrefixWidthsForBreakableRuns&&(Z="segment-prefixes");const ne=(function(ue,ie,Se,fe,pe){if(ie.breakableFitAdvances!==void 0&&ie.breakableFitMode===pe)return ie.breakableFitAdvances;ie.breakableFitMode=pe;const Ne=LB(),ee=[];for(const ve of Ne.segment(ue))ee.push(ve.segment);if(ee.length<=1)return ie.breakableFitAdvances=null,ie.breakableFitAdvances;if(pe==="sum-graphemes"){const ve=[];for(const re of ee){const se=Za(re,Se);ve.push(cc(re,se,fe))}return ie.breakableFitAdvances=ve,ie.breakableFitAdvances}if(pe==="pair-context"||ee.length>96){const ve=[];let re=null,se=0;for(const U of ee){const J=cc(U,Za(U,Se),fe);if(re===null)ve.push(J);else{const ce=re+U,ge=Za(ce,Se);ve.push(cc(ce,ge,fe)-se)}re=U,se=J}return ie.breakableFitAdvances=ve,ie.breakableFitAdvances}const ye=[];let H="",Y=0;for(const ve of ee){H+=ve;const re=cc(H,Za(H,Se),fe);ye.push(re-Y),Y=re}return ie.breakableFitAdvances=ye,ie.breakableFitAdvances})(D,R,r,l,Z),X=ne===null||i==="keep-all"?null:(function(ue){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(ue))return null;const ie=[];let Se=0;for(const fe of jb().segment(ue))Se++,ume(fe.segment)&&ie.push(Se);return ie.length===0?null:ie})(D);return void I(D,z,q,W,T,$,ne,X,j)}I(D,z,q,W,T,$,null,null,j)}for(let D=0;D<e.len;D++){S[D]=f.length;const T=e.texts[D],$=e.isWordLike[D],O=e.kinds[D],P=e.starts[D];if(O==="soft-hyphen"){I(T,0,u,u,O,P,null,null,0);continue}if(O==="hard-break"){I(T,0,0,0,O,P,null,null,0);continue}if(O==="tab"){I(T,0,0,0,O,P,null,null,d?W_(T,O):0);continue}const R=Za(T,r);if(O==="text"&&R.containsCJK){const j=lme(T,o),z=i==="keep-all"?ame(T,j,o.breakKeepAllAfterPunctuation):j;for(let K=0;K<z.length;K++){const q=z[K];_(q.text,"text",P+q.start,$,i==="keep-all"||!Rl(q.text))}continue}_(T,O,P,$,!0)}const E=(function(D,T,$){const O=[];for(let P=0;P<D.length;P++){const R=D[P],j=R.startSegmentIndex<T.length?T[R.startSegmentIndex]:$,z=R.endSegmentIndex<T.length?T[R.endSegmentIndex]:$,K=R.consumedEndSegmentIndex<T.length?T[R.consumedEndSegmentIndex]:$;O.push({startSegmentIndex:j,endSegmentIndex:z,consumedEndSegmentIndex:K})}return O})(e.chunks,S,f.length),N=w===null?null:(function(D,T){const $=(function(P){const R=P.length;if(R===0)return null;const j=new Array(R);let z=!1;for(let X=0;X<R;){const ue=P.charCodeAt(X);let ie=ue,Se=1;if(ue>=55296&&ue<=56319&&X+1<R){const pe=P.charCodeAt(X+1);pe>=56320&&pe<=57343&&(ie=pe-56320+(ue-55296<<10)+65536,Se=2)}const fe=bge(ie);fe!=="R"&&fe!=="AL"&&fe!=="AN"||(z=!0);for(let pe=0;pe<Se;pe++)j[X+pe]=fe;X+=Se}if(!z)return null;let K=0;for(let X=0;X<R;X++){const ue=j[X];if(ue==="L"){K=0;break}if(ue==="R"||ue==="AL"){K=1;break}}const q=new Int8Array(R);for(let X=0;X<R;X++)q[X]=K;const W=1&K?"R":"L",Z=W;let ne=Z;for(let X=0;X<R;X++)j[X]==="NSM"?j[X]=ne:ne=j[X];ne=Z;for(let X=0;X<R;X++){const ue=j[X];ue==="EN"?j[X]=ne==="AL"?"AN":"EN":ue!=="R"&&ue!=="L"&&ue!=="AL"||(ne=ue)}for(let X=0;X<R;X++)j[X]==="AL"&&(j[X]="R");for(let X=1;X<R-1;X++)j[X]==="ES"&&j[X-1]==="EN"&&j[X+1]==="EN"&&(j[X]="EN"),j[X]!=="CS"||j[X-1]!=="EN"&&j[X-1]!=="AN"||j[X+1]!==j[X-1]||(j[X]=j[X-1]);for(let X=0;X<R;X++){if(j[X]!=="EN")continue;let ue;for(ue=X-1;ue>=0&&j[ue]==="ET";ue--)j[ue]="EN";for(ue=X+1;ue<R&&j[ue]==="ET";ue++)j[ue]="EN"}for(let X=0;X<R;X++){const ue=j[X];ue!=="WS"&&ue!=="ES"&&ue!=="ET"&&ue!=="CS"||(j[X]="ON")}ne=Z;for(let X=0;X<R;X++){const ue=j[X];ue==="EN"?j[X]=ne==="L"?"L":"EN":ue!=="R"&&ue!=="L"||(ne=ue)}for(let X=0;X<R;X++){if(j[X]!=="ON")continue;let ue=X+1;for(;ue<R&&j[ue]==="ON";)ue++;const ie=(X>0?j[X-1]:Z)!=="L"?"R":"L";if(ie===((ue<R?j[ue]:Z)!=="L"?"R":"L"))for(let Se=X;Se<ue;Se++)j[Se]=ie;X=ue-1}for(let X=0;X<R;X++)j[X]==="ON"&&(j[X]=W);for(let X=0;X<R;X++){const ue=j[X];1&q[X]?ue!=="L"&&ue!=="AN"&&ue!=="EN"||q[X]++:ue==="R"?q[X]++:ue!=="AN"&&ue!=="EN"||(q[X]+=2)}return q})(D);if($===null)return null;const O=new Int8Array(T.length);for(let P=0;P<T.length;P++)O[P]=$[T[P]];return O})(e.normalized,w);return x!==null?{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:u,tabStopAdvance:c,chunks:E,segments:x}:{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:u,tabStopAdvance:c,chunks:E}}const Jy="__MARKSTREAM_VUE_HEIGHT_ESTIMATION_EXPERIMENT__",dme=["diff ","index ","--- ","+++ ","@@ "],xs=(()=>{const e=globalThis;if(e[Jy])return e[Jy];const t={configs:{},controllers:{},revision:gl(0),preparedCache:new Map,blockEstimateCache:new Map};return e[Jy]=t,t})();let I1=null;const Xy=xs.revision;function q_(e){var t;return e&&(t=xs.configs[e])!=null?t:null}function U_(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function fme(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function e4(e){var t,n,i;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const o of e){if(!fme(o))return null;o.type==="text"?s+=String((t=o.content)!=null?t:""):o.type==="emoji"?s+=String((i=(n=o.name)!=null?n:o.raw)!=null?i:""):o.type==="hardbreak"&&(s+=` -`)}return s.length>0?s:null}function t4(e,t,n){var i,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var o;if(I1!=null)return I1;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return I1=!!((o=r.getContext)!=null&&o.call(r,"2d")),I1}catch{return I1=!1,!1}})())return null;try{const o=Math.round(100*t)/100,r=[(i=n.whiteSpace)!=null?i:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,o,e].join("\0"),l=xs.blockEstimateCache.get(r);if(l)return xs.blockEstimateCache.delete(r),xs.blockEstimateCache.set(r,l),{kind:"simple-text",height:l.height,contentHeight:l.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",u=(function(p,g,m){const y=`${m}\0${g}\0${p}`,w=xs.preparedCache.get(y);if(w)return xs.preparedCache.delete(y),xs.preparedCache.set(y,w),w.prepared;const k=(function(A,v,x){return(function(S,I,_,E){var N,D;const T=(N=E?.wordBreak)!=null?N:"normal",$=(D=E?.letterSpacing)!=null?D:0;return cme(Qge(S,n2(),E?.whiteSpace,T),I,!1,T,$)})(A,v,0,x)})(p,g,{whiteSpace:m});for(xs.preparedCache.set(y,{prepared:k});xs.preparedCache.size>240;){const A=xs.preparedCache.keys().next().value;if(!A)break;xs.preparedCache.delete(A)}return k})(e,n.font,a),c=(function(p,g,m){const y=rme(p,g);return{lineCount:y,height:y*m}})(u,Math.max(24,o-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,c.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(xs.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});xs.blockEstimateCache.size>4e3;){const p=xs.blockEstimateCache.keys().next().value;if(!p)break;xs.blockEstimateCache.delete(p)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function NB(e,t,n){var i,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const o=e4(e.children);return o&&n.paragraph?t4(o,t,n.paragraph):null}if(e.type==="heading"){const o=Number(e.level||0),r=e4(e.children),l=n.headings[o];return r&&l?t4(r,t,l):null}if(e.type==="list_item"){const o=Array.isArray(e.children)?e.children:[];if(o.length!==1||((i=o[0])==null?void 0:i.type)!=="paragraph"||!n.listItem)return null;const r=e4((s=o[0])==null?void 0:s.children);return r?t4(r,t,n.listItem):null}if(e.type==="list"){const o=Array.isArray(e.items)?e.items:[];if(!o.length)return null;let r=Math.max(0,n.listWrapperOverhead);for(const l of o){const a=NB(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 dc(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function n4(e,t,n=0){return e.diff?$b(t??{},n)?(function(i){const s=dc(i.raw);if(s){const o=s.split(/\r?\n/);return i.originalCode!=null||i.updatedCode!=null?Math.max(1,o.filter(r=>!dme.some(l=>r.startsWith(l))).length):Math.max(1,o.length)}return E1(dc(i.originalCode))+E1(dc(i.updatedCode))})(e):(function(i){const s=i.originalCode,o=i.updatedCode;if(s!=null||o!=null)return Math.max(E1(dc(s)),E1(dc(o)));const r=dc(i.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):E1(dc(e.code,e.loading===!0))}function hme(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 i=window.getComputedStyle(t),s=e.offsetHeight,o=U_(i.lineHeight,1.5*U_(i.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:hme(i),lineHeight:o,wrapperOverhead:Math.max(0,s-o),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const pme=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function K_(e,t={}){var n;const i={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return i;const o=Object.getOwnPropertyDescriptors(e);for(const[r,l]of Object.entries(o))pme.has(r)||s.has(r)||l.enumerable&&"value"in l&&(i[r]=l.value);return i}function V_(e,t,n,i){var s;const o=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),r=(function(f,p){return Number.isFinite(f)?Math.min(Math.max(0,f),p):0})(n,o);if(!i.isReverseFlexScrollRoot(e))return void(e.scrollTop=r);const l=Math.max(0,o-r),a=[-l,l];let u=a[0],c=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const p=i.getNormalizedScrollTop(e,t,!1),g=Math.abs(p-r);g<c&&(c=g,u=f)}e.scrollTop=u;const d=(s=i.epsilonPx)!=null?s:2;Math.abs(i.getNormalizedScrollTop(e,t,!1)-r)>d&&(e.scrollTop=u)}function Z_(e,t){let n=0,i=null,s=null;const o=()=>{const r=s;s=null,i=null,r&&(n=Date.now(),e(...r))};return function(...r){const l=Date.now(),a=t-(l-n);s=r,a<=0?(i&&(clearTimeout(i),i=null),n=l,s=null,e(...r)):i||(i=setTimeout(o,a))}}function G_(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const FB=Symbol("MarkstreamMathBlockMinHeightCache");function hYe(){return un(FB,null)}const gme=new Set(["text","inline_code","emoji","footnote_reference"]),mme=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 fc(e,t,n,i=22){const s=String(e??"");if(!s)return n;const o=Math.max(18,Math.floor(Math.max(320,t)/8)),r=s.split(/\r?\n/).length,l=Math.ceil(s.length/o),a=Math.max(1,r,l);return Math.max(n,Math.ceil(a*i+12))}function BB(e){var t;if(!e||typeof e!="object")return!1;const n=e,i=String((t=n.type)!=null?t:"");if(gme.has(i))return!0;if(!mme.has(i))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(BB)}function b8(e){var t,n,i,s,o,r,l,a;if(!e||typeof e!="object")return"";const u=e,c=String((t=u.type)!=null?t:"");if(c==="text")return String((i=(n=u.content)!=null?n:u.raw)!=null?i:"");if(c==="inline_code")return String((r=(o=(s=u.code)!=null?s:u.content)!=null?o: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 p=u[f];if(Array.isArray(p)){const g=p.map(b8).filter(Boolean).join(" ");g&&d.push(g)}}return d.join(" ").replace(/\s+/g," ").trim()}function $B(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const i=t[n];return Array.isArray(i)&&i.some($B)})}function vme(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),i=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),o=Math.max(1,i,s);return 30+26*Math.max(0,o-1)}function yme(e,t){var n,i,s,o,r,l,a,u,c,d,f,p,g,m;if(!e||typeof e!="object")return 32;const y=e,w=String((n=y.type)!=null?n:""),k=Number.isFinite(t)&&t>0?t:640;switch(w){case"heading":return(function(A){var v;const x=Number((v=A.level)!=null?v:A.depth);return x>=4?20:x===3?30:x===2?32:44})(y);case"paragraph":return(function(A,v){const x=String(A??"");if(!x)return 28;const S=Math.max(18,Math.floor(Math.max(320,v)/8)),I=x.split(/\r?\n/).length,_=Math.ceil(x.length/S);return Math.max(1,I,_)<=1?28:fc(x,v,34)})(String((s=(i=y.raw)!=null?i:y.content)!=null?s:""),k);case"list":return(function(A,v){var x;const S=Array.isArray(A.items)?A.items:[];if(!S.length)return 48;const I=Math.max(48,30*S.length+12);let _=12;for(const D of S)_+=vme(b8(D)||String((x=D.raw)!=null?x:""),v);const E=Math.max(0,_-I);if(S.length>20){const D=Math.round(2.4*S.length);return Math.round(I+Math.max(D,Math.min(E,3*S.length)))}if(E<=0)return I;const N=S.length>8?8*S.length:E;return Math.round(I+Math.min(E,N))})(y,k);case"list_item":return fc(String((r=(o=y.raw)!=null?o:y.content)!=null?r:""),k,34);case"blockquote":return fc(String((a=(l=y.raw)!=null?l:y.content)!=null?a:""),k,56);case"table":return(function(A,v){const x=[...A.header?[A.header]:[],...Array.isArray(A.rows)?A.rows:[]];if(!x.length){const S=Array.isArray(A.children)?A.children.length:3;return Math.max(120,38*S+48)}return Math.max(120,Math.round(4+x.reduce((S,I)=>S+(function(_,E){const N=Math.max(1,_.length),D=Math.max(80,(E-32)/N),T=Math.max(10,Math.floor(D/8)),$=Math.max(1,..._.map(O=>{var P;const R=b8(O)||String((P=O?.raw)!=null?P:"");return Math.ceil(R.length/T)||1}));return 54+34*Math.max(0,$-1)+(N<=3&&_.some($B)?14:0)})((function(_){var E;return Array.isArray(_?.cells)&&(E=_.cells)!=null?E:[]})(I),v),0)))})(y,k);case"code_block":{const A=String((u=y.language)!=null?u:"").trim().toLowerCase(),v=String((d=(c=y.code)!=null?c:y.raw)!=null?d:"");return A==="mermaid"?Zm(Km(v)):A==="infographic"?Gm(Vm(v)):fc(v,k,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(A,v){var x,S,I;const _=A.match(/^\s*<details\b([^>]*)>/i);return _&&!/(?:^|\s)open(?:\s|=|$)/i.test((x=_[1])!=null?x:"")?fc(((I=(S=A.match(/<summary\b[^>]*>([\s\S]*?)<\/summary>/i))==null?void 0:S[1])==null?void 0:I.replace(/<[^>]*>/g,"").trim())||"Details",v,28,28):fc(A,v,96)})(String((p=(f=y.raw)!=null?f:y.content)!=null?p:""),k);case"thematic_break":return 24;default:return fc(String((m=(g=y.raw)!=null?g:y.content)!=null?m:""),k,40)}}function Q_(e,t,n){return Math.min(Math.max(e,t),n)}const bme=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],kme=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","safeMarkdownMs","tokenizeMs","htmlBlockPassesMs","parseMarkdownToStructureTotalMs"],Ame=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),DB=["raw","content","code","originalCode","updatedCode"],Y_=new WeakMap,J_=new WeakMap;let Cme=1;function Qr(){return typeof performance<"u"?performance.now():Date.now()}function X_(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function pr(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=Y_.get(t);return n||(n=Cme++,Y_.set(t,n)),String(n)}function eS(e,t,n,i={}){var s,o;const r=i.includeFinal!==!1,l={md:pr(t),customMarkdownIt:pr(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(o=e.streamParse)!=null?o:"auto",validateLink:pr(e.validateLink),preTransformTokens:pr(e.preTransformTokens),postTransformTokens:pr(e.postTransformTokens),postTransformNodes:pr(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function tS(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 nS(e){const t=zB(e);return t.length>=2&&t.every(n=>{const i=n.trim();return i.length>=1&&i.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function zB(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function RB(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Hb(e){const t=String(e??"");return`${t.length}:${RB(t)}`}function k8(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?Hb(r):`${r.length}:${RB(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${pr(e)}`;if(typeof e!="object")return typeof e;const i=e,s=t.get(i);if(s)return`cycle:${s}`;if(n>=6)return`object:${pr(i)}`;const o=pr(i);if(t.set(i,o),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>k8(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}:${k8(r[u],t,n+1)}`).join(";")}`}return typeof e}function i2(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function OB(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(i=>i2(i)?Eu(i,t,n+1):OB(i,t,n+1)).join(",")}`:i2(e)?Eu(e,t,n):k8(e,t,n)}function wme(e,t,n){return Object.keys(e).sort().filter(i=>i!=="children"&&!DB.includes(i)).map(i=>{const s=e[i];return typeof s=="string"?`${i}=s:${Hb(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${i}=${String(s)}`:typeof s=="function"?`${i}=fn:${pr(s)}`:Ame.has(i)&&(Array.isArray(s)||typeof s=="object")?`${i}=${OB(s,t,n+1)}`:s&&typeof s=="object"?`${i}=object:${pr(s)}`:""}).filter(Boolean).join(";")}function xme(e){return DB.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${Hb(n)}`:""}).filter(Boolean).join(";")}function Eu(e,t=new WeakMap,n=0){const i=J_.get(e);if(i)return i;const s=e,o=t.get(s);if(o)return`node-cycle:${o}`;if(n>=6)return`node:${e.type}:${pr(s)}`;const r=pr(s);t.set(s,r);const l=(function(a,u,c){const d=a,f=Array.isArray(d.children)?d.children:[],p=f.length?f.slice(0,200).map(g=>Eu(g,u,c+1)).join("|"):"";return[a.type,xme(d),wme(d,u,c),f.length,p].join(":")})(e,t,n);return J_.set(s,l),l}function PB(e,t){return Eu(e)===Eu(t)}function Wb(e,t,n){const i=Qr(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=Qr()-i,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function iS(e,t,n){return Wb(t,n,()=>Eu(e))}function jB(e,t,n){return iS(e,n,"stabilizeSignatureMs")===iS(t,n,"stabilizeSignatureMs")}function eg(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function sS(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function oS(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function _me(e,t){return e.length===t.length&&e===t}function qb(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const i=e,s=t,o=Object.keys(i).filter(c=>c!=="type"&&c!=="children").sort(),r=Object.keys(s).filter(c=>c!=="type"&&c!=="children").sort();if(o.length!==r.length)return!1;for(let c=0;c<o.length;c++){const d=o[c];if(d!==r[c])return!1;const f=i[d],p=s[d];if(typeof f!=typeof p)return!1;if(typeof f!="string"){if(typeof f!="number"&&typeof f!="boolean"&&f!=null)return null;if(!Object.is(f,p))return!1}else if(typeof p!="string"||!_me(f,p))return!1}const l=Object.prototype.hasOwnProperty.call(i,"children");if(l!==Object.prototype.hasOwnProperty.call(s,"children"))return!1;if(!l)return!0;const a=i.children,u=s.children;if(!Array.isArray(a)||!Array.isArray(u))return null;if(a.length!==u.length)return!1;for(let c=0;c<a.length;c++){const d=a[c],f=u[c];if(!i2(d)||!i2(f))return null;const p=qb(d,f,n+1);if(p==null)return null;if(!p)return!1}return!0}function Sme(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.type!==t.type)return!1;const n=qb(e,t);return n??PB(e,t)}function Mme(e,t,n){if(!e||!t)return!1;if(e===t)return!0;if(e.type!==t.type)return!1;let i=null;return Wb(n,"stabilizeSignatureMs",()=>{i=qb(e,t)}),i??jB(e,t,n)}function Ime(e,t){const n={};for(const i of bme){const s=e[i],o=t?.[i];typeof s=="number"&&(n[i]=s-(typeof o=="number"?o:0))}return n}function Eme(e,t){var n;const i=n_(t.instanceMsgId),s=new Map,o=(n=t.smoothStreamingEnabled)!=null?n:F(()=>!1),r=G(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let O="",P=0,R=!1,j=!1,z=!1,K=!1;function q(){O="",P=0,R=!1,j=!1,z=!1,K=!1}function W(Z){let ne=!1;for(let X=0;X<Z.length;X++){const ue=Z.charCodeAt(X);if(ue===10||ue===13){const Se=ue===10&&K;K=ue===13,R=!1,Se||(z||(j=!1,P=0),z=!1);continue}K=!1;const ie=ue===9||ue===32;if(ie||(z=!0,j&&(ne=!0)),P)if(P!==1)ie||(ue!==58?P=ue===91?1:0:(ne=!0,j=!0));else{if(R){R=!1;continue}if(ue===92){R=!0;continue}ue===93&&(P=2)}else ue===91&&(P=1)}return ne}return(Z,ne)=>{if(!Z||!ne.startsWith(Z)||ne.length<=Z.length)return q(),[!0,0];let X=0;O!==Z&&(q(),W(Z),X=Z.length);const ue=ne.slice(Z.length),ie=W(ue);return O=ne,[ie,X+ue.length]}})();let p,g=0,m=0,y=Qr(),w=-1,k=0;function A(O){w=Number.isInteger(O)?O:0,k+=1}function v(){p&&(clearTimeout(p),p=void 0)}function x(){v();const O=t.renderContent.value;r.value!==O&&(r.value=O),y=Qr()}Ge([t.renderContent,t.effectiveFinal,o],([O,P,R])=>{r.value!==O&&(!R||P||(function(j,z){if(!j&&z||z.length<=80||z.length<j.length||!z.startsWith(j))return!0;const K=z.slice(j.length);return!!K&&(!!nS(tS(z))||!(!K.includes(` - -`)&&!/(?:^|\n)(?:#{1,6}\s|[-+*]\s+|\d+[.)]\s+|>\s*|`{3,}|~{3,})/.test(K))||K.endsWith(` -`)&&!(function(q){const W=tS(q);if(nS(W))return!1;const Z=zB(W);return Z.length>=2&&Z.some(ne=>ne.trim())})(z))})(r.value,O)?x():(function(){if(m+=1,p)return;const j=Math.max(0,(function(z){const K=z.parseCoalesceMs;return typeof K=="number"&&Number.isFinite(K)&&K>=0?K:80})(e)-(Qr()-y));j<=0?x():p=setTimeout(x,j)})())},{flush:"sync",immediate:!0}),Df(v);const S=F(()=>{var O,P,R,j;return Iue(e.customHtmlTags,(O=e.parseOptions)==null?void 0:O.customHtmlTags,(j=(R=(P=t.customComponentsMap)==null?void 0:P.value)!=null?R:{},Object.entries(j).map(([z,K])=>{const q=Wr(z);return K==null||!q||Ep(q)||KN.has(q)||xp.has(q)?"":q}).filter(Boolean)))}),I=F(()=>{const{key:O,tags:P}=Eue(S.value);if(!O)return i;const R=s.get(O);if(R)return R;const j=n_(t.instanceMsgId,{customHtmlTags:P});return s.set(O,j),j}),_=F(()=>{const O=I.value;if(!e.customMarkdownIt)return O;const P=e.customMarkdownIt(O);return O.__markstreamHasCustomParserExtensions=!0,P.__markstreamHasCustomParserExtensions=!0,P}),E=F(()=>{var O,P;const R=(O=e.parseOptions)!=null?O:{},j=t.effectiveFinal.value,z=S.value,K=j!=null,q=z.length>0;return K||q||R.streamParse==null?kt(kt(fn(kt({},R),{streamParse:(P=R.streamParse)==null||P}),K?{final:j}:{}),q?{customHtmlTags:z}:{}):R}),N=F(()=>{var O;return new Set(((O=E.value.customHtmlTags)!=null?O:[]).map(P=>String(P).trim().toLowerCase()).filter(Boolean))}),D=F(()=>eS(E.value,_.value,e.customMarkdownIt,{includeFinal:!0})),T=F(()=>eS(E.value,_.value,e.customMarkdownIt,{includeFinal:!1}));Ge([D,T],([O,P],[R,j])=>{R&&(O===R&&P===j||(x(),P!==j&&(l=[],c="")))},{flush:"sync"});const $=F(()=>{var O,P,R,j,z,K,q,W,Z,ne,X;if((O=e.nodes)!=null&&O.length)return l=[],c="",A(0),wt(e.nodes.slice());const ue=r.value;if(!ue)return l=[],c="",A(-1),[];const ie=t.debugPerformanceEnabled.value,Se=ie?Qr():0,fe=_.value,pe=D.value,Ne=T.value;a&&pe!==a&&(function(Fe){var De,Ke;(Ke=(De=Fe.stream)==null?void 0:De.reset)==null||Ke.call(De)})(fe),u&&Ne!==u&&(l=[],c="");const ee=Object.keys((R=(P=t.customComponentsMap)==null?void 0:P.value)!=null?R:{}).length>0||typeof E.value.postTransformNodes=="function";ee!==d&&(l=[],c="");const ye=!ee&&l.length>0&&ue.startsWith(c)&&Ne===u,H=ie?X_(fe):null,Y=ie?{}:void 0,ve=oS(fe),re=!ve&&!ee,se=kt(kt(fn(kt({},E.value),{__reuseStableTopLevelNodes:re}),ve?{__disableStreamParse:!0}:{}),Y?{__timing:Y}:{}),U=QF(ue,fe,se),J=ie?Qr():0,ce=ie?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let ge,Me=ie?eg(U.length):void 0,Pe=0,ke=0,Le=0;if(ye){const Fe=ie?Qr():0,[De,Ke]=(function(lt){var ft,Lt;const[bn,Gt]=lt.scanGlobalReferenceAppend(lt.previousContent,lt.content),Qt=lt.parseOptions;return[lt.previousDirtyStartIndex>0&&Qt.final!==!0&&!lt.customMarkdownIt&&!oS(lt.md)&&!bn&&typeof Qt.preTransformTokens!="function"&&typeof Qt.postTransformTokens!="function"&&typeof Qt.postTransformNodes!="function"&&((Lt=(ft=Qt.customHtmlTags)==null?void 0:ft.length)!=null?Lt:0)===0?lt.previousDirtyStartIndex:0,Gt]})({content:ue,previousContent:c,previousDirtyStartIndex:w,parseOptions:E.value,customMarkdownIt:e.customMarkdownIt,md:fe,scanGlobalReferenceAppend:f});Le=Ke;const gt=De<=0;if(ce){const lt=(function(ft,Lt,bn,Gt={}){var Qt;if(!Lt.length)return{nodes:ft,metrics:eg(ft.length)};const kn=(Qt=Gt.scanStartIndex)!=null?Qt:0,_n=Gt.reuseDirtyTail!==!1,je=(function(Ft,Ct,Fn,In=0){const ks=Math.min(Ft.length,Ct.length);for(let Zt=Math.min(ks,Math.max(0,In));Zt<ks;Zt++)if(!Mme(Ct[Zt],Ft[Zt],Fn))return Zt;return Ft.length===Ct.length?-1:ks})(ft,Lt,bn,kn);if(je<0)return{nodes:Lt,metrics:{reusedNodeCount:ft.length,dirtyStartIndex:je,stablePrefixNodeCount:ft.length,dirtyTailNodeCount:0}};const st=ft.slice();let Ue=je;for(let Ft=0;Ft<je;Ft++)st[Ft]=Lt[Ft];if(_n)for(let Ft=je;Ft<ft.length;Ft++){const Ct=Lt[Ft],Fn=ft[Ft];Ct&&jB(Ct,Fn,bn)&&(st[Ft]=Ct,Ue+=1)}return{nodes:st,metrics:{reusedNodeCount:Ue,dirtyStartIndex:je,stablePrefixNodeCount:je,dirtyTailNodeCount:sS(je,ft,Lt)}}})(U,l,ce,{reuseDirtyTail:gt,scanStartIndex:De});ge=lt.nodes,Me=lt.metrics}else{const lt=(function(ft,Lt,bn={}){var Gt;if(!Lt.length)return{nodes:ft,metrics:eg(ft.length)};const Qt=(Gt=bn.scanStartIndex)!=null?Gt:0,kn=bn.reuseDirtyTail!==!1,_n=(function(Ue,Ft,Ct=0){const Fn=Math.min(Ue.length,Ft.length);for(let In=Math.min(Fn,Math.max(0,Ct));In<Fn;In++)if(!Sme(Ft[In],Ue[In]))return In;return Ue.length===Ft.length?-1:Fn})(ft,Lt,Qt);if(_n<0)return{nodes:Lt,metrics:{reusedNodeCount:ft.length,dirtyStartIndex:_n,stablePrefixNodeCount:ft.length,dirtyTailNodeCount:0}};const je=ft.slice();let st=_n;for(let Ue=0;Ue<_n;Ue++)je[Ue]=Lt[Ue];if(kn)for(let Ue=_n;Ue<ft.length;Ue++){const Ft=Lt[Ue],Ct=ft[Ue];Ft&&PB(Ft,Ct)&&(je[Ue]=Ft,st+=1)}return{nodes:je,metrics:{reusedNodeCount:st,dirtyStartIndex:_n,stablePrefixNodeCount:_n,dirtyTailNodeCount:sS(_n,ft,Lt)}}})(U,l,{reuseDirtyTail:gt,scanStartIndex:De});ge=lt.nodes,Me=lt.metrics}Pe=ie?Qr()-Fe:0,ke=gt?Me?.dirtyStartIndex==null||Me.dirtyStartIndex<0?ge.length:Me.dirtyStartIndex:ge.length}else ge=U,Me=eg(ge.length);t.effectiveFinal.value!==!0&&(ce?(function(Fe,De,Ke=0){for(let gt=Math.max(0,Ke);gt<Fe.length;gt++)Wb(De,"primeSignatureMs",()=>Eu(Fe[gt]))})(ge,ce,ke):(function(Fe,De=0){for(let Ke=Math.max(0,De);Ke<Fe.length;Ke++)Eu(Fe[Ke])})(ge,ke));const it=ie?Qr()-J:0;if(g+=1,c=ue,a=pe,u=Ne,d=ee,l=ge,A((j=Me?.dirtyStartIndex)!=null?j:0),ie){const Fe=X_(fe),De=typeof Fe?.total=="number"&&Fe.total>((z=H?.total)!=null?z:0);t.logPerf(De?"parse(stream)":"parse(sync)",kt(kt(kt({rendererId:t.instanceMsgId,ms:Math.round(Qr()-Se),nodes:ge.length,contentLength:ue.length,parseCommitCount:g,parseCoalescedCount:m,nodeReuseMs:it,referenceDefinitionScanChars:Le,signatureMs:(K=ce?.signatureMs)!=null?K:0,stabilizeSignatureMs:(q=ce?.stabilizeSignatureMs)!=null?q:0,primeSignatureMs:(W=ce?.primeSignatureMs)!=null?W:0,signatureCallCount:(Z=ce?.signatureCallCount)!=null?Z:0,stabilizeSignatureCallCount:(ne=ce?.stabilizeSignatureCallCount)!=null?ne:0,primeSignatureCallCount:(X=ce?.primeSignatureCallCount)!=null?X:0,stabilizeMs:Pe},Me??{}),Y?Object.fromEntries(kme.map(Ke=>{var gt;return[Ke,(gt=Y[Ke])!=null?gt:0]})):{}),Fe?{streamMode:Fe.lastMode,streamDelta:Ime(Fe,H),streamStats:Fe}:{}))}return wt(ge)});return{effectiveCustomHtmlTags:S,effectiveCustomHtmlTagsSet:N,mdBase:I,mdInstance:_,mergedParseOptions:E,getParsedNodesDirtyStartIndex:()=>w,getParsedNodesRevision:()=>k,parsedNodes:$}}function Tme(e){const{isClient:t}=e,n=G(new Set),i=new Map,s=new Map,o=new Map;function r(u){if(!t)return;const c=o.get(u);c!=null&&(window.clearTimeout(c),o.delete(u))}function l(){if(t)for(const u of o.values())window.clearTimeout(u);o.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:i,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:o,clearVisibilityFallback:r,clearAllVisibilityFallbacks:l,markNodeVisible:function(u,c=!0){var d;c&&r(u),(function(f,p){if((m=(g=e.shouldTrackVisibleNodeIndices)==null?void 0:g.call(e))!=null&&!m)return;var g,m;const y=n.value,w=y.has(f);if(p){if(w)return;const A=new Set(y);return A.add(f),void(n.value=A)}if(!w)return;const k=new Set(y);k.delete(f),n.value=k})(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,p]of s.entries())f<u||(p(),s.delete(f));for(const[f,p]of i.entries())f<u||(p.destroy(),i.delete(f),r(f),(c=e.onNodeVisibilityCleaned)==null||c.call(e,f));for(const f of Array.from(o.keys()))f<u||r(f);if(!n.value.size)return;const d=new Set;for(const f of n.value)f<u&&d.add(f);n.value=d},destroyNodeVisibilityState:function(){a();for(const u of s.values())u();s.clear();for(const u of i.values())u.destroy();i.clear(),l()}}}function Lme(e={}){const t=G(""),n=G(""),i=G(!1),s=cpe(e),o=()=>{const c=s.getSnapshot();t.value=c.source,n.value=c.visible,i.value=c.done},r=s.subscribe(o);o();const l=F(()=>Math.max(0,t.value.length-n.value.length)),a=F(()=>l.value===0),u=F(()=>i.value&&a.value);return O2()&&Df(()=>{r(),s.destroy()}),{source:t,visible:n,done:i,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 Nme={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},rS=/auto|scroll|overlay/i;function Fme(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return rS.test(t)||rS.test(n)}function Bme(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 $me={class:"m-0 p-0"},Dme=["data-probe"],zme=ri(nt(fn(kt({},{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(i){var s,o;return(o=(s=t.headingNodes)==null?void 0:s[i])!=null?o:null}return(i,s)=>(b(),M("div",{class:"height-estimation-probes",style:Vt({width:`${e.width}px`}),"aria-hidden":"true"},[C("div",{ref:o=>e.setParagraphWrapper(o),class:$e(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[V(h(Oc),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),C("div",{ref:o=>e.setListItemWrapper(o),class:$e(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[C("ul",$me,[V(h(mf),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),C("div",{ref:o=>e.setListWrapper(o),class:$e(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[V(h(vf),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(b(),M(Be,null,yt(6,o=>C("div",{key:`probe-heading-${o}`,ref_for:!0,ref:r=>e.setHeadingWrapper(o,r),class:$e(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${o}`},[V(h(Sv),{node:n(o),"index-key":`probe-heading-${o}`},null,8,["node","index-key"])],10,Dme)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),lS=nt({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,i;return Gm((i=Yd(e.estimatedPreviewHeightPx))!=null?i:Vm(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return dn("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?dn("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)"}},[dn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[dn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),dn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),dn("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},()=>dn("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,dn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[dn("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:"")),dn("div",{class:"absolute inset-0"},[dn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),aS=nt({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,i;return Zm((i=Yd(e.estimatedPreviewHeightPx))!=null?i:Km(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return dn("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?dn("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)"}},[dn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[dn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),dn("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},()=>dn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[dn("span",{class:"action-icon block"})])))]):null,dn("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)"}},[dn("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:"")),dn("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"}})])])}}}),Rme={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 Ds(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 Ome=["data-custom-id"],Pme=["data-node-index","data-node-type"],uS="typewriter-simple-cursor-target",HB=ri(nt(fn(kt({},{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 i=e,s=n;function o(L){if(!(typeof Event<"u"&&L instanceof Event))return typeof L=="string"&&s("copy-code",L),void s("copy",L)}const r=ys(),l=un("markstreamNestedRendererProps",void 0);function a(L){const Q=r?.vnode.props;return!!Q&&(Object.prototype.hasOwnProperty.call(Q,L)||Object.prototype.hasOwnProperty.call(Q,String(L).replace(/[A-Z]/g,le=>`-${le.toLowerCase()}`)))}function u(L){var Q,le;const ae=i[L];return a(L)?ae:(le=(Q=l?.value)==null?void 0:Q[L])!=null?le:ae}const c=F(()=>{return(L=u("mode"))==="chat"||L==="minimal"||L==="docs"?L:"docs";var L}),d=F(()=>G_(u("typewriter"))),f=F(()=>d.value!=="off"),p=F(()=>u("domMode")==="minimal"?"minimal":"full"),g=F(()=>{return(L={mode:c.value,codeRenderer:u("codeRenderer"),renderCodeBlocksAsPre:u("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":L.codeRenderer==="pre"||L.codeRenderer==="shiki"||L.codeRenderer==="monaco"?L.codeRenderer:L.renderCodeBlocksAsPre===!1||L.mode==="docs"?"monaco":"pre";var L}),m=F(()=>Rme[c.value]),y=F(()=>{var L;return(L=u("showTooltips"))!=null?L:m.value.showTooltips}),w=F(()=>{var L;return(L=u("fade"))!=null?L:m.value.fade}),k=F(()=>{var L;return(L=u("batchRendering"))!=null?L:m.value.batchRendering}),A=F(()=>{var L;return(L=u("initialRenderBatchSize"))!=null?L:m.value.initialRenderBatchSize}),v=F(()=>{var L;return(L=u("renderBatchSize"))!=null?L:m.value.renderBatchSize}),x=F(()=>{var L;return(L=u("renderBatchDelay"))!=null?L:m.value.renderBatchDelay}),S=F(()=>{var L;return(L=u("renderBatchBudgetMs"))!=null?L:m.value.renderBatchBudgetMs}),I=F(()=>{var L;return(L=u("renderBatchIdleTimeoutMs"))!=null?L:m.value.renderBatchIdleTimeoutMs}),_=F(()=>{var L;return(L=u("deferNodesUntilVisible"))!=null?L:m.value.deferNodesUntilVisible}),E=F(()=>{var L;return(L=u("maxLiveNodes"))!=null?L:m.value.maxLiveNodes}),N=F(()=>{var L;return(L=u("liveNodeBuffer"))!=null?L:m.value.liveNodeBuffer}),D=F(()=>{var L;return(L=u("nodeVirtual"))!=null?L:m.value.nodeVirtual}),T={get content(){return i.content},get nodes(){return i.nodes},get final(){return i.final},get parseOptions(){return u("parseOptions")},get customMarkdownIt(){return u("customMarkdownIt")},get debugPerformance(){return i.debugPerformance},get customHtmlTags(){return u("customHtmlTags")},get mode(){return u("mode")},get domMode(){return p.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 y.value},get themes(){return u("themes")},get langs(){return u("langs")},get isDark(){return u("isDark")},get customId(){return u("customId")},get indexKey(){return i.indexKey},get typewriter(){return u("typewriter")},get smoothStreaming(){return i.smoothStreaming},get smoothStreamingOptions(){return u("smoothStreamingOptions")},get parseCoalesceMs(){return u("parseCoalesceMs")},get fade(){return w.value},get batchRendering(){return k.value},get initialRenderBatchSize(){return A.value},get renderBatchSize(){return v.value},get renderBatchDelay(){return x.value},get renderBatchBudgetMs(){return S.value},get renderBatchIdleTimeoutMs(){return I.value},get deferNodesUntilVisible(){return _.value},get maxLiveNodes(){return E.value},get liveNodeBuffer(){return N.value},get nodeVirtual(){return D.value},get virtualScroll(){return i.virtualScroll},get renderAsFragment(){return i.renderAsFragment}};function $(L){s("height-change",L)}function O(L){s("virtual-state-change",L)}function P(L){s("anchor-change",L)}const R=G(),j=G(null),z=G(null),K=G(null),q=Es({1:null,2:null,3:null,4:null,5:null,6:null}),W=G(!1),Z=new Map,ne=G(0),X=G(0),ue=G({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function ie(L,Q){return typeof L!="string"?Q:L.trim()||Q}function Se(L){const Q=Number(L);return Number.isFinite(Q)&&Q>0?Math.max(1,Math.trunc(Q)):640}const fe=F(()=>{var L;const Q=(L=T.viewportPriorityOptions)!=null?L:{},le=ie(Q.rootMargin,Vc);return{rootMargin:le,heavyBlockMargin:ie(Q.heavyBlockMargin,le),maxTargets:Se(Q.maxTargets)}}),pe=F(()=>{var L;return(L=fe.value.rootMargin)!=null?L:Vc}),Ne=F(()=>{var L;return(L=fe.value.maxTargets)!=null?L:640});function ee(){var L,Q;if(((L=i.virtualScroll)==null?void 0:L.enabled)!==!0)return null;const le=(Q=i.virtualScroll)==null?void 0:Q.scrollRoot;return ye(typeof le=="function"?le():le)}function ye(L){return L?typeof HTMLElement<"u"&&L instanceof HTMLElement?L:typeof L=="object"&&"value"in L?ye(L.value):typeof L=="object"&&"$el"in L?ye(L.$el):null:null}Pn(_B,fe);const{isClient:H,renderAsFragment:Y,debugPerformanceEnabled:ve,resolvedShowTooltips:re,resolvedHtmlPolicy:se,inheritedSmoothStreaming:U,ownsTypewriterCursor:J}=(function(L){const Q=typeof window<"u",le=Rf(),ae=un("markstreamHtmlPolicy",void 0),be=un("markstreamTypewriterCursor",void 0),Te=un("markstreamSmoothStreaming",void 0),ze=F(()=>L.renderAsFragment===!0),He=F(()=>!!(L.debugPerformance&&Q&&typeof console<"u")),rt=F(()=>{var ot;if(typeof L.showTooltips=="boolean")return L.showTooltips;const Re=(ot=le.showTooltips)!=null?ot:le["show-tooltips"];return Re===""||Re===!0||Re==="true"||Re!==!1&&Re!=="false"&&void 0}),We=F(()=>{var ot,Re;return(Re=(ot=L.htmlPolicy)!=null?ot:ae?.value)!=null?Re:"safe"}),Xe=F(()=>be?.value!==!0);return{isClient:Q,renderAsFragment:ze,debugPerformanceEnabled:He,resolvedShowTooltips:rt,resolvedHtmlPolicy:We,inheritedSmoothStreaming:Te,inheritedTypewriterCursor:be,ownsTypewriterCursor:Xe}})(T),{resolveViewportRoot:ce,resolveScrollContainer:ge,isReverseFlexScrollRoot:Me,getNormalizedScrollTop:Pe,getOffsetTopWithinRoot:ke}=(function(L,Q){function le(){var He,rt;return(rt=(He=Q.scrollRoot)==null?void 0:He.call(Q))!=null?rt:null}function ae(He){if(typeof window>"u")return null;const rt=le();if(rt)return rt;const We=He??L.value;if(!We)return null;const Xe=We.ownerDocument||document,ot=Xe.scrollingElement||Xe.documentElement;let Re=We;for(;Re&&Re!==Xe.body&&Re!==ot;){if(Fme(window.getComputedStyle(Re))&&Bme(Re))return Re;Re=Re.parentElement}return null}function be(He){if(!Q.isClient)return!1;try{const rt=window.getComputedStyle(He);return!!(rt.display||"").toLowerCase().includes("flex")&&(rt.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function Te(He,rt,We){var Xe,ot;if(We)return ze(rt);const Re=He.scrollTop;if(!be(He))return Re;const et=Re<0?-Re:Re;return Math.max(0,((Xe=He.scrollHeight)!=null?Xe:0)-((ot=He.clientHeight)!=null?ot:0))-et}function ze(He){var rt,We,Xe,ot,Re;const et=Number((rt=He.scrollingElement)==null?void 0:rt.scrollTop),ut=Number((Xe=(We=He.documentElement)==null?void 0:We.scrollTop)!=null?Xe:0),at=Number((Re=(ot=He.body)==null?void 0:ot.scrollTop)!=null?Re:0);return Math.max(0,Number.isFinite(et)?et:0,Number.isFinite(ut)?ut:0,Number.isFinite(at)?at:0)}return{resolveViewportRoot:ae,resolveScrollContainer:function(He){var rt,We,Xe,ot;const Re=le();if(Re)return Re;const et=ae((rt=He??L.value)!=null?rt:null);if(et)return et;const ut=(ot=(Xe=He?.ownerDocument)!=null?Xe:(We=L.value)==null?void 0:We.ownerDocument)!=null?ot:typeof document<"u"?document:null;return ut?.scrollingElement||ut?.documentElement||null},isReverseFlexScrollRoot:be,getNormalizedScrollTop:Te,getOffsetTopWithinRoot:function(He,rt){const We=rt.ownerDocument||He.ownerDocument||document;if((function(et,ut){return et===ut.documentElement||et===ut.body||et===ut.scrollingElement})(rt,We))return He.getBoundingClientRect().top+ze(We);const Xe=rt.getBoundingClientRect(),ot=He.getBoundingClientRect(),Re=Te(rt,We,!1);return ot.top-Xe.top+Re}}})(R,{isClient:H,scrollRoot:ee});Pn("markstreamShowTooltips",re),Pn("markstreamHtmlPolicy",se),Pn("markstreamTypewriter",f),Pn("markstreamFade",F(()=>T.fade!==!1)),Pn("markstreamTypewriterCursor",F(()=>!0)),Pn("markstreamTextStreamState",Z),Pn("markstreamStreamVersion",ne),Pn("markstreamParseOptions",F(()=>T.parseOptions)),Pn("markstreamCustomMarkdownIt",F(()=>T.customMarkdownIt));const{smoothStreamingEnabled:Le,renderContent:it,requestedFinal:Fe,effectiveFinal:De}=(function(L,Q){const le=Lme(kt(kt({},Nme),L.smoothStreamingOptions)),ae=F(()=>{var Re,et,ut;return L.smoothStreaming!==!1&&!((Re=L.nodes)!=null&&Re.length)&&(L.smoothStreaming===!0||!((et=Q.inheritedSmoothStreaming)!=null&&et.value))&&(L.smoothStreaming===!0||G_(L.typewriter)!=="off"||((ut=L.maxLiveNodes)!=null?ut:0)<=0)}),be=G(!Q.isClient||L.smoothStreaming===!0);gn(()=>{be.value=!0});const Te=F(()=>be.value&&ae.value),ze=F(()=>{var Re;return Te.value?le.visible.value:(Re=L.content)!=null?Re:""}),He=F(()=>{var Re,et;const ut=(Re=L.parseOptions)!=null?Re:{};return(et=L.final)!=null?et:ut.final}),rt=F(()=>{const Re=He.value;return Te.value&&Re!=null?!!Re&&le.caughtUp.value:Re});let We=0,Xe=!1;function ot(){We=0,Xe=!1}return Ge([()=>L.content,()=>L.nodes,Te,He],([Re,et,ut,at])=>{if(et?.length)return ot(),void le.reset("");const Mt=Re??"";if(!ut)return ot(),le.reset(Mt),void(at&&le.finish({flush:!0}));const mt=le.source.value;if(Mt){if(Mt!==mt)if(Mt.startsWith(mt)){const zt=Mt.slice(mt.length),Ut=le.pendingChars.value;zt.length<=8?(We++,Xe||We>=2&&Ut<=8?(Xe=!0,le.reset(Mt)):le.enqueue(zt)):(ot(),le.enqueue(zt))}else ot(),le.reset(Mt)}else ot(),le.reset("");at&&le.finish()},{immediate:!0}),{smoothStream:le,smoothStreamingEligible:ae,smoothStreamingEnabled:Te,renderContent:ze,requestedFinal:He,effectiveFinal:rt}})(T,{isClient:H,inheritedSmoothStreaming:U}),Ke=Fe.value===!0;Pn("markstreamSmoothStreaming",Le);const gt=G(!1),lt=G(!1),ft=G(!1);let Lt="",bn=!1,Gt=null;function Qt(){H&&Gt!=null&&(window.clearTimeout(Gt),Gt=null)}function kn(){gt.value=!1,Qt()}function _n(L,Q){if(!ve.value)return;const le=(function(){if(!ve.value)return null;const ae=Ct(je),be=Ct(st),Te=Math.max(Ft,be);if(ae<=0&&Te<=0)return null;const ze={total:ae,maxPerFrame:Te,byLabel:(He=je,Object.fromEntries(Array.from(He.entries()).sort((rt,We)=>We[1]-rt[1]||rt[0].localeCompare(We[0]))))};var He;return je.clear(),st.clear(),Ft=0,ze})();console.info(`[markstream-vue][perf] ${L}`,le?fn(kt({},Q),{layoutReads:le}):Q)}Ge([()=>T.indexKey,()=>T.customId],()=>{var L,Q;kn(),lt.value=!1,ft.value=!((L=i.nodes)!=null&&L.length)&&Fe.value!==!0&&!!i.content,Lt=(Q=it.value)!=null?Q:"",bn=Lt.length>0},{flush:"sync"}),Ge([()=>i.content,()=>i.nodes,Fe],([L,Q,le])=>{!Q?.length&&le!==!0&&L&&(ft.value=!0)},{flush:"sync",immediate:!0}),Ge([it,()=>i.nodes,Fe],([L,Q,le])=>{const ae=L??"";return Q?.length||le===!0?(kn(),lt.value=!1,Lt=ae,void(bn=!0)):(ae.length>0&&(ft.value=!0),bn?(Lt&&ae.length>Lt.length&&ae.startsWith(Lt)?(gt.value=!0,lt.value=!0,H&&(Qt(),Gt=window.setTimeout(()=>{var be;Gt=null,De.value===!0||(be=i.nodes)!=null&&be.length||(yd(),gt.value=!1,ea())},1200))):(ae.length<Lt.length||!ae.startsWith(Lt))&&(kn(),lt.value=!1),void(Lt=ae)):(Lt=ae,void(bn=!0)))},{flush:"sync",immediate:!0});const je=new Map,st=new Map;let Ue=!1,Ft=0;function Ct(L){let Q=0;for(const le of L.values())Q+=le;return Q}function Fn(){Ft=Math.max(Ft,Ct(st)),st.clear(),Ue=!1}function In(L){L.maxPerFrame=Math.max(Number(L.maxPerFrame||0),Number(L.currentFrameTotal||0)),L.currentFrameTotal=0,L.frameScheduled=!1}function ks(L){var Q,le;ve.value&&(je.set(L,((Q=je.get(L))!=null?Q:0)+1),st.set(L,((le=st.get(L))!=null?le:0)+1),(function(ae){const be=(function(){if(!H||typeof window>"u")return null;const Te=window;if(Te.__markstreamLayoutReadPerformance)return Te.__markstreamLayoutReadPerformance;const ze={total:0,maxPerFrame:0,byLabel:{}};return Te.__markstreamLayoutReadPerformance=ze,ze})();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(()=>In(be),0):queueMicrotask(()=>In(be)):window.requestAnimationFrame(()=>In(be))))})(L),Ue||(Ue=!0,H&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(Fn):typeof queueMicrotask!="function"?setTimeout(Fn,0):queueMicrotask(Fn)))}function Zt(L,Q){return ks(L),Q()}const li=T.customId?`renderer-${T.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Rn=(function(L){const Q=new Map;return{scope:L,cache:Q,clear:()=>Q.clear()}})(li),Sn=li;Pn(FB,Rn);const Qn=bs(()=>T.customId),{effectiveCustomHtmlTagsSet:os,mergedParseOptions:As,parsedNodes:Tt,getParsedNodesDirtyStartIndex:Ci,getParsedNodesRevision:rs}=Eme(T,{instanceMsgId:li,renderContent:it,effectiveFinal:De,smoothStreamingEnabled:Le,debugPerformanceEnabled:ve,customComponentsMap:Qn,logPerf:_n});Ge(Tt,()=>{gt.value||Rn.clear(),ne.value+=1},{immediate:!0});const Bn=F(()=>({customId:T.customId,customHtmlTags:As.value.customHtmlTags,parseOptions:T.parseOptions,customMarkdownIt:T.customMarkdownIt,htmlPolicy:se.value,viewportPriority:T.viewportPriority,viewportPriorityOptions:fe.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:re.value,themes:T.themes,langs:T.langs,isDark:T.isDark,typewriter:f.value,smoothStreamingOptions:T.smoothStreamingOptions,parseCoalesceMs:T.parseCoalesceMs,fade:T.fade}));Pn("markstreamNestedRendererProps",Bn);const Co=F(()=>Tt.value),Mi=F(()=>Tt.value.length),Ei=G(null),ro=G(null),zi=G(null),Hs=G(null),wo=i.indexKey!=null&&String(i.indexKey).startsWith("list-item-"),Cs=!wo&&T.customId?q_(T.customId):null,Ti=F(()=>Cs?(Xy.value,q_(T.customId)):null),ii=F(()=>{var L;return!!(!Y.value&&T.customId&&!wo&&((L=Ti.value)!=null&&L.enabled))}),On=F(()=>!!(H&&ii.value)),$n=F(()=>{var L;return!!(!Y.value&&((L=i.virtualScroll)!=null&&L.enabled))}),Tn=F(()=>$n.value),tt=G(!1);gn(()=>{tt.value=!0});const Je=F(()=>!!(H&&$n.value));Pn("markstreamHostScrollManaged",Je);const Rt=F(()=>!!(tt.value&&Je.value)),Ot=F(()=>On.value||Je.value),ai=F(()=>On.value||Rt.value),Ns=F(()=>{var L;return Ot.value&&((L=Ti.value)==null?void 0:L.textEstimation)!==!1});function Ln(){const L=X.value||Zt("getMeasuredContainerWidth.clientWidth",()=>{var Q;return((Q=R.value)==null?void 0:Q.clientWidth)||0});return Number.isFinite(L)&&L>0?L:0}const ls=F(()=>{const L=Ln();return L>0?Math.max(1,Math.round(L)):640}),ts=F(()=>{var L,Q;return!(De.value!==!0||$n.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(L=i.nodes)!=null&&L.length||ft.value||!(((Q=T.maxLiveNodes)!=null?Q:0)<=0))}),Vi=F(()=>{var L;return ts.value?50:Math.max(1,(L=T.maxLiveNodes)!=null?L:320)}),gi=F(()=>{var L;return ts.value?16:Math.max(0,(L=T.liveNodeBuffer)!=null?L:60)}),an=F(()=>{var L;return!Y.value&&T.nodeVirtual!==!1&&!(((L=T.maxLiveNodes)!=null?L:0)<=0&&!ts.value)&&(T.nodeVirtual===!0?Tt.value.length>0:Tt.value.length>Vi.value)}),Zi=F(()=>an.value||On.value||Je.value),Ri=F(()=>T.viewportPriority!==!1),Vl=F(()=>!!Ri.value&&!W.value);var Ro;Ro=F(()=>Ri.value),Pn(SB,Ro);const Sr=F(()=>{var L;return!(Y.value||T.deferNodesUntilVisible===!1||((L=T.maxLiveNodes)!=null?L:0)<=0||an.value||Tt.value.length>900||T.viewportPriority===!1)}),Ws=c0e(L=>{var Q;return ce((Q=L??R.value)!=null?Q:null)},Ri),{requestFrame:Li,cancelFrame:Oi,hasIdleCallback:Zl,isTestEnv:Fs}=(function(L){const Q=L.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,le=L.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ae=L.isClient&&typeof window.requestIdleCallback=="function",be=(function(){var Te;if(typeof globalThis>"u"||!("process"in globalThis))return;const ze=(Te=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:Te.value;return ze?.env})();return{requestFrame:Q,cancelFrame:le,hasIdleCallback:ae,isTestEnv:be?.NODE_ENV==="test"}})({isClient:H}),rr=F(()=>De.value===!0&&!$n.value),{resolvedBatchSize:qs,resolvedInitialBatch:Pi,batchingEnabled:ws,incrementalRenderingActive:lo,renderedCount:mi,previousRenderContext:xo,adaptiveBatchSize:ao,previousBatchConfig:Us}=(function(L,Q){var le;const ae=F(()=>{var ot;const Re=Math.trunc((ot=L.renderBatchSize)!=null?ot:80);return Number.isFinite(Re)?Math.max(0,Re):0}),be=F(()=>{var ot;const Re=Math.trunc((ot=L.initialRenderBatchSize)!=null?ot:ae.value);return Number.isFinite(Re)?Math.max(0,Re):ae.value}),Te=F(()=>!Q.renderAsFragment.value&&L.batchRendering!==!1&&ae.value>0&&Q.isClient&&!Q.isTestEnv),ze=G(0),He=G({key:L.indexKey,total:0}),rt=G(Math.max(1,ae.value||1)),We=F(()=>{var ot,Re,et;return Te.value&&!((ot=Q.continuousStreaming)!=null&&ot.value)&&!((Re=Q.forceFullRenderFinalContent)!=null&&Re.value)&&((et=L.maxLiveNodes)!=null?et:0)<=0}),Xe=G({batchSize:ae.value,initial:be.value,delay:(le=L.renderBatchDelay)!=null?le:16,enabled:We.value});return{resolvedBatchSize:ae,resolvedInitialBatch:be,batchingEnabled:Te,incrementalRenderingActive:We,renderedCount:ze,previousRenderContext:He,adaptiveBatchSize:rt,previousBatchConfig:Xe}})(T,{isClient:H,isTestEnv:Fs,renderAsFragment:Y,forceFullRenderFinalContent:rr,continuousStreaming:F(()=>lt.value&&De.value!==!0)}),as=F(()=>{var L;return!Y.value&&T.batchRendering!==!1&&qs.value>0&&!Fs&&((L=T.maxLiveNodes)!=null?L:0)<=0&&!rr.value}),Oo=F(()=>as.value),lr=F(()=>Ot.value||Oo.value),ht=F(()=>{var L;return lr.value&&((L=Ti.value)==null?void 0:L.codeBlockEstimation)!==!1}),Ie=new Map,Ve=new Map,on=new WeakMap;let wi=null;const Po=new WeakMap,vi=new Map,bl=[];let jo=[],Mr=[],ar=-1;const ur=gl(bl),uo=new Set,Gl=G(0);let oe=0;const Ae=G(0),_e=F(()=>(Ae.value,Array.from(Ie.entries()).sort((L,Q)=>L[0]-Q[0]))),Oe=G(null),Qe=G(null);let Ye,xt=null,bt=0,nn=null;function Pt(){Ye.markFallbackHeightPrefixDirty()}function wn(L){return Ye.getFallbackNodeHeight(L)}function Yn(L,Q){return Ye.estimateHeightRange(L,Q)}function $t(L){return Ye.estimateIndexForOffset(L)}const{activeRestoreAnchor:Wt,getRelativeScrollTopWithinContainer:Wn,setRelativeScrollTopWithinContainer:Ee,resolveAnchorOffset:ct,clearRestoreReconcile:dt,scheduleRestoreReconcile:qt,captureRestoreAnchor:yi,restoreAnchor:Bs,getAnchorDrift:Ql}=(function(L){const{isClient:Q,containerRef:le,parsedNodeCount:ae,requestFrame:be,cancelFrame:Te,resolveScrollContainer:ze,getNormalizedScrollTop:He,getOffsetTopWithinRoot:rt,isReverseFlexScrollRoot:We,estimateIndexForOffset:Xe,estimateHeightRange:ot,getFallbackNodeHeight:Re,clamp:et}=L,ut=G(null);let at=null,Mt=[];function mt(){const tn=ze(),An=le.value;if(!tn||!An)return null;const Mn=tn.ownerDocument||An.ownerDocument||document;if(tn===Mn.documentElement||tn===Mn.body||tn===Mn.scrollingElement){const fi=An.getBoundingClientRect();return Math.max(0,-fi.top)}return Math.max(0,He(tn,Mn,!1)-rt(An,tn))}function zt(tn){var An;const Mn=ze(),fi=le.value;if(!Mn||!fi)return;const Gs=Math.max(0,tn),$s=Mn.ownerDocument||fi.ownerDocument||document,Vr=$s.defaultView||(typeof window<"u"?window:null);if(Mn===$s.documentElement||Mn===$s.body||Mn===$s.scrollingElement){const wl=He(Mn,$s,!0)+fi.getBoundingClientRect().top;return void((An=Vr?.scrollTo)==null||An.call(Vr,0,Math.max(0,wl+Gs)))}V_(Mn,$s,rt(fi,Mn)+Gs,{isReverseFlexScrollRoot:wl=>{var m1;return(m1=We?.(wl))!=null&&m1},getNormalizedScrollTop:He})}function Ut(tn){const An=ae.value,Mn=et(tn.nodeIndex,0,Math.max(0,An-1));return ot(0,Mn)+Math.max(0,tn.offsetWithinNodePx)}function en(){if(at!=null&&(Te?.(at),at=null),Q)for(const tn of Mt)window.clearTimeout(tn);Mt=[]}function Yt(tn){const An=Ut(tn),Mn=mt();Mn!=null&&Math.abs(Mn-An)<=.5||zt(An)}return{activeRestoreAnchor:ut,getRelativeScrollTopWithinContainer:mt,setRelativeScrollTopWithinContainer:zt,resolveAnchorOffset:Ut,clearRestoreReconcile:en,applyRestoreAnchor:Yt,scheduleRestoreReconcile:function(){ut.value&&Q&&at==null&&(at=be?be(()=>{at=null,ut.value&&Yt(ut.value)}):null,at==null&&ut.value&&Yt(ut.value))},captureRestoreAnchor:function(){const tn=mt(),An=ae.value;if(tn==null||An<=0)return null;const Mn=et(Xe(tn+1),0,An-1),fi=ot(0,Mn),Gs=Re(Mn);return{nodeIndex:Mn,offsetWithinNodePx:et(tn-fi,0,Math.max(0,Gs-1))}},restoreAnchor:function(tn){const An=ae.value;if(ut.value={nodeIndex:et(tn.nodeIndex,0,Math.max(0,An-1)),offsetWithinNodePx:Math.max(0,tn.offsetWithinNodePx)},en(),Yt(ut.value),Q)for(const Mn of[0,120,280,480])Mt.push(window.setTimeout(()=>{ut.value&&Yt(ut.value)},Mn))},getAnchorDrift:function(tn){const An=mt();return An==null?null:An-Ut(tn)}}})({isClient:H,containerRef:R,parsedNodeCount:Mi,requestFrame:Li,cancelFrame:Oi,resolveScrollContainer:()=>Oe.value||ge(),getNormalizedScrollTop:Pe,getOffsetTopWithinRoot:ke,isReverseFlexScrollRoot:Me,estimateIndexForOffset:$t,estimateHeightRange:Yn,getFallbackNodeHeight:wn,clamp:Zs}),{nodeHeights:Gi,heightStats:ns,heightTreeSize:Uu,heightSumTree:rd,heightKnownTree:Pp,averageNodeHeight:Zf,resetHeightMeasurements:jp,pruneHeightMeasurements:Hp,rebuildHeightTrees:ld,recordNodeHeight:Rv,removeNodeHeights:Ov,exportHeightCache:me,importHeightCache:we,fenwickRangeSum:Ze}=(function(L={}){const Q=Es({}),le=Es({total:0,count:0}),ae=G(0),be=G([]),Te=G([]);function ze(){for(const Re of Object.keys(Q))delete Q[Number(Re)];le.total=0,le.count=0,ae.value=0,be.value=[],Te.value=[]}function He(Re,et,ut){for(let at=et+1;at<Re.length;at+=at&-at)Re[at]+=ut}function rt(Re,et){let ut=0;for(let at=et+1;at>0;at-=at&-at)ut+=Re[at];return ut}function We(Re){ae.value=Re;const et=new Array(Re+1).fill(0),ut=new Array(Re+1).fill(0);for(const[at,Mt]of Object.entries(Q)){const mt=Number(at),zt=Number(Mt);!Number.isFinite(mt)||mt<0||mt>=Re||!Number.isFinite(zt)||zt<=0||(He(et,mt,zt),He(ut,mt,1))}be.value=et,Te.value=ut}function Xe(Re){if(!Number.isInteger(Re)||Re<0)return!1;const et=Q[Re];if(!Number.isFinite(et)||et<=0)return!1;if(delete Q[Re],le.total=Math.max(0,le.total-et),le.count=Math.max(0,le.count-1),ae.value>Re){const ut=be.value,at=Te.value;ut.length&&at.length&&(He(ut,Re,-et),He(at,Re,-1))}return!0}const ot=F(()=>le.count>0?Math.max(12,le.total/le.count):32);return{nodeHeights:Q,heightStats:le,heightTreeSize:ae,heightSumTree:be,heightKnownTree:Te,averageNodeHeight:ot,resetHeightMeasurements:ze,pruneHeightMeasurements:function(Re){if(Re<=0)return void ze();let et=0,ut=0;for(const[at,Mt]of Object.entries(Q)){const mt=Number(at),zt=Number(Mt);!Number.isFinite(mt)||mt<0||mt>=Re||!Number.isFinite(zt)||zt<=0?delete Q[mt]:(et+=zt,ut++)}le.total=et,le.count=ut},rebuildHeightTrees:We,recordNodeHeight:function(Re,et,ut={}){(function(at,Mt,mt={}){var zt;if(!Number.isFinite(Mt)||Mt<=0)return!1;const Ut=Q[at];if(Ut&&(mt.allowShrink===!1&&Mt<Ut||Math.abs(Mt-Ut)<=1))return!1;if(Q[at]=Mt,Ut?le.total+=Mt-Ut:(le.total+=Mt,le.count++),ae.value>at){const en=be.value,Yt=Te.value;if(en.length&&Yt.length)if(Ut){const tn=Mt-Ut;tn!==0&&He(en,at,tn)}else He(en,at,Mt),He(Yt,at,1)}mt.notify!==!1&&((zt=L.onHeightRecorded)==null||zt.call(L))})(Re,et,fn(kt({},ut),{notify:!0}))},removeNodeHeight:function(Re,et={}){var ut;const at=Xe(Re);return at&&et.notify!==!1&&((ut=L.onHeightRecorded)==null||ut.call(L)),at},removeNodeHeights:function(Re,et={}){var ut;let at=0;for(const Mt of Re)Xe(Number(Mt))&&at++;return at>0&&et.notify!==!1&&((ut=L.onHeightRecorded)==null||ut.call(L)),at},exportHeightCache:function(){return Object.entries(Q).map(([Re,et])=>({index:Number(Re),height:Number(et)})).filter(Re=>Number.isFinite(Re.index)&&Re.index>=0&&Number.isFinite(Re.height)&&Re.height>0).sort((Re,et)=>Re.index-et.index)},importHeightCache:function(Re,et={}){var ut;if(!Array.isArray(Re))return;const at=ae.value;let Mt=!1;if(et.mode!=="merge"){const mt=Object.keys(Q);if(mt.length>0){for(const zt of mt)delete Q[Number(zt)];Mt=!0}}for(const mt of Re){const zt=Number(mt.index),Ut=Number(mt.height);if(!Number.isInteger(zt)||zt<0||at>0&&zt>=at||!Number.isFinite(Ut)||Ut<=0)continue;const en=Q[zt];en&&Math.abs(en-Ut)<=1||(Q[zt]=Ut,Mt=!0)}Mt&&((function(){let mt=0,zt=0;const Ut=ae.value;for(const[en,Yt]of Object.entries(Q)){const tn=Number(en),An=Number(Yt);!Number.isFinite(tn)||tn<0||Ut>0&&tn>=Ut||!Number.isFinite(An)||An<=0?delete Q[tn]:(mt+=An,zt++)}le.total=mt,le.count=zt})(),at>0&&We(at),(ut=L.onHeightRecorded)==null||ut.call(L))},fenwickRangeSum:function(Re,et,ut){if(ut<=et)return 0;const at=rt(Re,ut-1);return et<=0?at:at-rt(Re,et-1)}}})({onHeightRecorded:()=>{Pt(),Je.value&&c1(),Wt.value&&qt(),Qe.value&&gd(),xi("node-resize")}});function Nt(L){Number.isInteger(L)&&L>=0&&uo.add(L)}function sn(L){for(const Q of L)Nt(Number(Q))}function hn(L){oe++;let Q=!0;try{const le=L();return Q=le!==!1,le}finally{oe--,oe===0&&Q&&Gl.value++}}function qn(){jo=[],Mr=[],ar=-1,uo.clear(),ur.value=bl}function bi(){qn(),hn(()=>jp()),vi.clear()}function Ks(L){!Number.isInteger(L)||L<0||L>=Tt.value.length||vi.set(L,Xf(L))}function Ku(L,Q,le={}){const ae=Gi[L];Nt(L),Rv(L,Q,le);const be=Gi[L];return Object.is(ae,be)?(uo.delete(L),!1):(be&&be>0?Ks(L):ae&&vi.delete(L),!0)}function Gf(L,Q){const le=Zt("getNodeLayoutHeight.slot.offsetHeight",()=>{var ae,be;return(be=(ae=Ie.get(L))==null?void 0:ae.offsetHeight)!=null?be:0});return le>0?le:Zt("getNodeLayoutHeight.content.offsetHeight",()=>Q.offsetHeight)}function Ik(L,Q={}){Q.mode!=="merge"?qn():sn(L.map(le=>le.index)),hn(()=>we(L,Q)),h9()}const kl=F(()=>Sr.value&&Vl.value),VD=F(()=>{var L;return!Y.value&&T.batchRendering!==!1&&qs.value>0&&((L=T.maxLiveNodes)!=null?L:0)<=0}),ZD=F(()=>!Y.value&&Ke&&De.value===!0&&!an.value&&!$n.value&&!ii.value&&!kl.value&&!VD.value),Ek=F(()=>!!Ws&&kl.value),Tk=F(()=>an.value||Je.value),{focusIndex:Yl,liveRange:Vs,updateLiveRange:Qf}=(function(L,Q){const{parsedNodeCount:le,virtualizationEnabled:ae,maxLiveNodesResolved:be,liveNodeBufferResolved:Te,clamp:ze}=Q,He=Te??F(()=>{var Xe;return Math.max(0,(Xe=L.liveNodeBuffer)!=null?Xe:60)}),rt=G(0),We=Es({start:0,end:0});return{liveNodeBufferResolved:He,focusIndex:rt,liveRange:We,updateLiveRange:function(){const Xe=le.value;if(!ae.value||Xe===0)return We.start=0,void(We.end=Xe);const ot=Math.min(be.value,Xe),Re=He.value,et=ze(rt.value-Re,0,Math.max(0,Xe-ot));We.start=et,We.end=Math.min(Xe,et+ot)}}})(T,{parsedNodeCount:Mi,virtualizationEnabled:an,maxLiveNodesResolved:Vi,liveNodeBufferResolved:gi,clamp:Zs}),Al=new Map,Vu=new Map,Ba=new Map,Wp=[],Jl=new Map,$a=new Set,Lk=G(0);let Pv=!1;const Nk=F(()=>(Lk.value,$a.size)),cr=new Map,Cl=new Map,Fk=G(0),jv=F(()=>{Fk.value;let L=0;for(const Q of cr.values())L+=Math.max(0,Q);return L});let dr=null;const qp=F(()=>{if(!an.value)return Tt.value.length;const L=gi.value,Q=Math.max(Vs.end+L,Pi.value),le=Math.min(Tt.value.length,Q);return Math.max(mi.value,le)});function Up(){Pv||(Pv=!0,queueMicrotask(()=>{Pv=!1,Lk.value+=1}))}function Bk(L,Q,le="node-resize"){if(!H||typeof window>"u")return null;const ae=window.setTimeout(()=>{$a.delete(ae)&&Up();try{Q()}finally{xi(le)}},Math.max(0,L));return $a.add(ae),Up(),ae}function Kp(L){H&&L!=null&&($a.delete(L)&&Up(),window.clearTimeout(L))}function $k(){if(H&&typeof window<"u")for(const L of $a)window.clearTimeout(L);$a.size&&($a.clear(),Up()),Wp.length=0,Ba.clear()}function GD(L){j.value=L}function QD(L){z.value=L}function YD(L){K.value=L}const{cancelScheduledFocusSync:Hv,scheduleFocusSync:Kr}=(function(L){const{isClient:Q,containerRef:le,virtualizationEnabled:ae,requestFrame:be,cancelFrame:Te,syncFocusToScroll:ze}=L;let He=null;function rt(){var Xe,ot,Re;return(Re=(ot=(Xe=le.value)==null?void 0:Xe.ownerDocument)==null?void 0:ot.defaultView)!=null?Re:typeof window<"u"?window:null}function We(){if(!He)return;const Xe=rt();He.viaTimeout?Xe?Xe.clearTimeout(He.id):clearTimeout(He.id):Te?.(He.id),He=null}return{cancelScheduledFocusSync:We,scheduleFocusSync:function(Xe={}){if(!ae.value)return;if(!Q)return void ze(!0);if(Xe.immediate)return We(),void ze(!0);if(He)return;const ot=()=>{He=null,ze()};if(be)return void(He={id:be(ot),viaTimeout:!1});const Re=rt();He={id:Re?Re.setTimeout(ot,16):setTimeout(ot,16),viaTimeout:!0}}}})({isClient:H,containerRef:R,virtualizationEnabled:an,requestFrame:Li,cancelFrame:Oi,syncFocusToScroll:function(L=!1){var Q;if(!an.value)return;const le=Oe.value||ge();if(!le)return;const ae=le.ownerDocument||((Q=R.value)==null?void 0:Q.ownerDocument)||document,be=ae?.defaultView||(typeof window<"u"?window:null),Te=le===ae?.documentElement||le===ae?.body,ze=Tt.value.length;if(ze<=0)return;if(!Te&&ze>0&&Me(le)){const at=Zt("syncFocusToScroll.clientHeight",()=>le.clientHeight||0),Mt=Zt("syncFocusToScroll.scrollTop",()=>le.scrollTop),mt=Mt<0?-Mt:Mt;return void Gp(Zs((He=Math.max(0,mt)+.5*Math.max(0,at),Ye.estimateIndexForOffsetFromEnd(He)),0,Math.max(0,ze-1)),L)}var He;const rt=(function(at,Mt,mt,zt){const Ut=R.value;if(!Ut)return null;const en=zt?0:Zt("syncFocusToScroll.model.root.getBoundingClientRect",()=>at.getBoundingClientRect().top),Yt=Zt("syncFocusToScroll.model.container.getBoundingClientRect",()=>Ut.getBoundingClientRect().top),tn=Math.max(0,en-Yt),An=zt?Zt("syncFocusToScroll.model.viewport.clientHeight",()=>{var Mn,fi,Gs,$s;return($s=(Gs=(fi=mt?.innerHeight)!=null?fi:(Mn=Mt.documentElement)==null?void 0:Mn.clientHeight)!=null?Gs:at.clientHeight)!=null?$s:0}):Zt("syncFocusToScroll.model.root.clientHeight",()=>at.clientHeight);return Zs($t(tn+.5*Math.max(0,An)),0,Math.max(0,Tt.value.length-1))})(le,ae,be,Te);if(rt!=null)return void Gp(rt,L);const We=Te?null:Zt("syncFocusToScroll.root.getBoundingClientRect",()=>le.getBoundingClientRect()),Xe=Te?0:We.top,ot=Te?Zt("syncFocusToScroll.viewport.clientHeight",()=>{var at,Mt;return(Mt=(at=be?.innerHeight)!=null?at:le.clientHeight)!=null?Mt:0}):We.bottom,Re=_e.value;let et=null,ut=null;for(const[at,Mt]of Re){if(!Mt)continue;const mt=Zt("syncFocusToScroll.slot.getBoundingClientRect",()=>Mt.getBoundingClientRect());mt.bottom<=Xe||mt.top>=ot||(et==null&&(et=at),ut=at)}if(et==null||ut==null){const at=R.value;if(!at)return;const Mt=Te?{top:0}:Zt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>le.getBoundingClientRect()),mt=Zt("syncFocusToScroll.fallback.scrollTop",()=>Pe(le,ae,Te)),zt=Te?(()=>{const en=Zt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>at.getBoundingClientRect()),Yt=(Te?0:Mt.top)-en.top;return Math.max(0,Yt)})():(()=>{const en=ke(at,le);return Math.max(0,mt-en)})(),Ut=Te?Zt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var en,Yt,tn,An;return(An=(tn=(Yt=be?.innerHeight)!=null?Yt:(en=ae?.documentElement)==null?void 0:en.clientHeight)!=null?tn:le.clientHeight)!=null?An:0}):Zt("syncFocusToScroll.fallback.root.clientHeight",()=>le.clientHeight);return void Gp(Zs($t(zt+.5*Math.max(0,Ut)),0,Math.max(0,Tt.value.length-1)),!0)}Gp(Math.round((et+ut)/2),L)}}),{visibleNodeIndices:Wv,nodeVisibilityHandles:ad,nodeVisibilityWatchStops:Vp,nodeVisibilityFallbackTimers:Dk,clearVisibilityFallback:Zp,markNodeVisible:Da,cleanupNodeVisibility:JD,destroyNodeVisibilityState:qv}=Tme({isClient:H,shouldTrackVisibleNodeIndices:()=>kl.value,shouldCleanupNodeVisibility:()=>an.value,onNodeMarkedVisible:L=>{an.value?Kr():Yl.value=Zs(L,0,Math.max(0,Tt.value.length-1))},onNodeVisibilityCleaned:L=>{Ie.delete(L)&&c6()}}),{cleanupScrollListener:zk,setupScrollListener:XD}=(function(L){const{isClient:Q,virtualizationEnabled:le,listenerEnabled:ae,scrollRootElement:be,resolveScrollContainer:Te,scheduleFocusSync:ze,onScroll:He}=L;let rt=null,We=null;function Xe(){rt&&(rt(),rt=null),We=null,be.value=null}function ot(Re){const et=L.getScrollTop?L.getScrollTop(Re):Re.scrollTop;return Math.max(0,Number.isFinite(et)?Math.abs(et):0)}return{cleanupScrollListener:Xe,setupScrollListener:function(){if(!Q)return;if(!((Re=ae?.value)!=null?Re:le.value))return void Xe();var Re;const et=Te();if(!et)return void Xe();if(be.value===et&&rt)return;Xe(),We=ot(et);const ut=()=>{if(He?.(),le.value){const at=(function(Mt){const mt=ot(Mt),zt=We;We=mt;const Ut=Math.max(480,.75*(Mt.clientHeight||0));return zt==null?mt>Ut?{immediate:!0}:void 0:Math.abs(mt-zt)>Ut?{immediate:!0}:void 0})(et);at?ze(at):ze()}};et.addEventListener("scroll",ut,{passive:!0}),be.value=et,rt=()=>{et.removeEventListener("scroll",ut)}}}})({isClient:H,virtualizationEnabled:an,listenerEnabled:Tk,scrollRootElement:Oe,resolveScrollContainer:ge,scheduleFocusSync:Kr,onScroll:function(){const L=Qe.value;if(!L)return;const Q=Jf();if(!Q||(function(ae){if(s1()>=bt)return nn=null,!1;const be=nn;if(be==null)return!0;const Te=Math.abs(ae.scrollTop-be)<=2;return Te||(nn=null),Te})(Q))return;const le=Jk(Q);le!=null?(le<-32||Math.abs(Math.max(0,le)-Math.max(0,L.distanceFromBottomPx))>32)&&pd("restore"):pd("restore")},getScrollTop:L=>{var Q;const le=L.ownerDocument||((Q=R.value)==null?void 0:Q.ownerDocument)||document,ae=L===le.documentElement||L===le.body||L===le.scrollingElement;return Zt("scrollListener.getScrollTop",()=>Pe(L,le,ae))}});function Gp(L,Q=!1){const le=Zs(L,0,Math.max(0,Tt.value.length-1));!Q&&Math.abs(le-Yl.value)<=1||(Yl.value=le,Qf())}function Zs(L,Q,le){return Math.min(Math.max(L,Q),le)}function Uv(L=Tt.value.length){const Q=Ci();return!Number.isInteger(Q)||Q<0?L:Zs(Q,0,L)}function Kv(L){return L?.firstElementChild}function Rk(L,Q){var le;return L?(le=L.matches)!=null&&le.call(L,Q)?L:L.querySelector(Q):null}function ez(L,Q){L<1||L>6||(q[L]=Q)}function Ok(){if(!Ot.value)return void(X.value=0);const L=Zt("updateExperimentContainerWidth.clientWidth",()=>{var Q,le;return(le=(Q=R.value)==null?void 0:Q.clientWidth)!=null?le:0});X.value=L>0?L:0}let Yf=null;function Vv(){Yf?.disconnect(),Yf=null}const Pk=Y1("ViewportDeferredMarkdownCodeBlockNode",sl({loader:()=>Si(null,null,function*(){return(yield Ji(()=>import("./index5-Bc_8yuJc.js"),__vite__mapDeps([6,4,5]))).default}),loadingComponent:Jm,delay:0,suspensible:!1}),Jm);function jk(L){return L===Pk}const Hk=F(()=>g.value==="pre"?Go:g.value==="shiki"?Pk:Vy);function Wk(){var L;return((L=T.codeBlockProps)==null?void 0:L.showHeader)!==!1}function qk(L,Q,le){const ae=Gi[Q],be=typeof ae=="number"&&ae>0;if(Ns.value&&!be&&!(function(Te){return!!Qn.value.paragraph&&(Te.type==="paragraph"||Te.type==="list_item"||Te.type==="list")})(L)){const Te=NB(L,le,ue.value);if(Te)return Te}if(ht.value&&L.type==="code_block"){const Te=(function(ze){if(ze.type!=="code_block")return null;const He=C6(ze,o0(ze));return jk(He)?"markdown":He===Go?"pre":He===Hk.value||He===Vy?"monaco":null})(L);if(Te==="monaco"||Te==="markdown"||Te==="pre")return(function(ze,He){var rt,We,Xe;if(!ze||ze.type!=="code_block")return null;const ot=He.rendererKind,Re=ot!=="pre"&&He.showHeader!==!1,et=!!ze.diff;let ut=0,at=500;if(ot==="monaco"){const mt=(rt=He.monacoOptions)!=null?rt:{},zt=n4(ze,mt,He.width),Ut=(function(Yt){const tn=typeof Yt?.fontSize=="number"&&Yt.fontSize>0?Yt.fontSize:12;return typeof Yt?.lineHeight=="number"&&Yt.lineHeight>0?Yt.lineHeight:Math.round(1.5*tn)})(mt),en=(function(Yt,tn){var An,Mn;const fi=typeof((An=Yt?.padding)==null?void 0:An.top)=="number"?Yt.padding.top:tn?0:8,Gs=typeof((Mn=Yt?.padding)==null?void 0:Mn.bottom)=="number"?Yt.padding.bottom:tn?0:8;return Math.max(0,fi)+Math.max(0,Gs)})(mt,et);at=typeof mt.MAX_HEIGHT=="number"&&mt.MAX_HEIGHT>0?mt.MAX_HEIGHT:500,ut=Math.round(zt*Ut+en)}else if(ot==="markdown"){const mt=n4(ze);ut=Math.round(21*mt+32)}else{const mt=n4(ze);ut=Math.round(28*mt),at=Number.POSITIVE_INFINITY}const Mt=Math.max(1,Math.min(ut,at));return kt({kind:"code-block",height:Math.round(Mt+(Re?40:0)),contentHeight:Mt,rendererKind:ot},et&&ot==="monaco"?{diffInline:$b((We=He.monacoOptions)!=null?We:{},(Xe=He.width)!=null?Xe:0)}:{})})(L,{rendererKind:Te,monacoOptions:T.codeBlockMonacoOptions,showHeader:Wk(),width:le})}return null}M4(()=>{if(Gl.value,oe>0)return;const L=Tt.value,Q=rs();if(!L.length||!lr.value)return jo=[],Mr=[],ar=-1,uo.clear(),void(ur.value=bl);const le=X.value||Zt("estimatedNodeHeights.clientWidth",()=>{var We;return((We=R.value)==null?void 0:We.clientWidth)||0});if(!Number.isFinite(le)||le<=0)return jo=[],Mr=[],ar=-1,uo.clear(),void(ur.value=bl);const ae=(function(We){return[Math.round(We),Ns.value,ht.value,ue.value,T.codeBlockMonacoOptions,Wk(),g.value,Qn.value,Xy.value]})(le),be=jo.length<=L.length&&(ze=ae,(Te=Mr).length===ze.length&&Te.every((We,Xe)=>Object.is(We,ze[Xe])));var Te,ze;const He=be&&ar===Q?L.length:be?Uv(L.length):0,rt=be?Array.from(uo):[];jo.length=L.length;for(let We=He;We<L.length;We++)jo[We]=qk(L[We],We,le);for(const We of rt)We>=0&&We<L.length&&We<He&&(jo[We]=qk(L[We],We,le));uo.clear(),Mr=ae,ar=Q,ur.value=jo,kR(ur)},{flush:"sync"});const ud=F(()=>ur.value);Ye=(function(L){let Q=!0,le=[0],ae="";function be(Xe){var ot;const Re=L.nodeHeights[Xe];if(Number.isFinite(Re)&&Re>0)return Re;const et=L.parsedNodes.value[Xe],ut=et?.type,at=!!((ot=L.hasCustomParagraphComponent)!=null&&ot.call(L)),Mt=L.estimatedNodeHeights.value[Xe],mt=Mt?.height;if(!(function(Ut,en,Yt){return!!(Yt&&en?.kind==="simple-text"&&(Ut==="paragraph"||Ut==="list_item"||Ut==="list"))})(ut,Mt,at)&&Number.isFinite(mt)&&mt>0)return mt;const zt=yme(et,L.getContainerWidth()||640);return ut==="heading"||ut==="paragraph"&&zt<=28&&(function(Ut,en){if(en)return!1;const Yt=Ut.children;return!Array.isArray(Yt)||!Yt.length||Yt.every(BB)})(et,at)?zt:Math.max(L.averageNodeHeight.value,zt)}function Te(){var Xe;const ot=L.parsedNodes.value.length,Re=L.getPrefixCacheKeyParts().join(":");if(!Q&&ae===Re)return le;const et=new Array(ot+1);et[0]=0;for(let ut=0;ut<ot;ut++)et[ut+1]=et[ut]+(L.heightEstimationActive.value?be(ut):(Xe=L.nodeHeights[ut])!=null?Xe:L.averageNodeHeight.value);return le=et,ae=Re,Q=!1,et}function ze(Xe){var ot,Re;const et=L.parsedNodes.value.length;if(et<=0||Xe<=0)return 0;const ut=Te();if(Xe>=((ot=ut[et])!=null?ot:0))return et-1;let at=0,Mt=et-1,mt=et-1;for(;at<=Mt;){const zt=at+Mt>>1;((Re=ut[zt+1])!=null?Re:0)>=Xe?(mt=zt,Mt=zt-1):at=zt+1}return mt}function He(Xe,ot){var Re,et;if(Xe>=ot)return 0;if(L.heightEstimationActive.value)return(function(Mt,mt){var zt,Ut;const en=L.parsedNodes.value.length,Yt=Q_(Math.trunc(Mt),0,en),tn=Q_(Math.trunc(mt),Yt,en);if(Yt>=tn)return 0;const An=Te();return((zt=An[tn])!=null?zt:0)-((Ut=An[Yt])!=null?Ut:0)})(Xe,ot);if(L.heightTreeSize.value!==L.parsedNodes.value.length){let Mt=0;for(let mt=Xe;mt<ot;mt++)Mt+=(Re=L.nodeHeights[mt])!=null?Re:L.averageNodeHeight.value;return Mt}const ut=L.heightSumTree.value,at=L.heightKnownTree.value;if(!ut.length||!at.length){let Mt=0;for(let mt=Xe;mt<ot;mt++)Mt+=(et=L.nodeHeights[mt])!=null?et:L.averageNodeHeight.value;return Mt}return L.fenwickRangeSum(ut,Xe,ot)+(ot-Xe-L.fenwickRangeSum(at,Xe,ot))*L.averageNodeHeight.value}function rt(Xe){var ot;if(Xe<=0)return 0;const Re=L.parsedNodes.value;if(L.heightEstimationActive.value)return ze(Xe);if(L.heightTreeSize.value===Re.length&&L.heightSumTree.value.length&&L.heightKnownTree.value.length){const ut=L.averageNodeHeight.value,at=L.heightSumTree.value,Mt=L.heightKnownTree.value,mt=Yt=>Yt<=0?0:L.fenwickRangeSum(at,0,Yt)+(Yt-L.fenwickRangeSum(Mt,0,Yt))*ut;let zt=0,Ut=Re.length-1,en=Re.length-1;for(;zt<=Ut;){const Yt=zt+Ut>>1;mt(Yt+1)>=Xe?(en=Yt,Ut=Yt-1):zt=Yt+1}return en}let et=Xe;for(let ut=0;ut<Re.length;ut++){const at=(ot=L.nodeHeights[ut])!=null?ot:L.averageNodeHeight.value;if(et<=at)return ut;et-=at}return Math.max(0,Re.length-1)}function We(){if(!L.heightEstimationActive.value)return 0;let Xe=0;const ot=L.estimatedNodeHeights.value;for(let Re=0;Re<ot.length;Re++){if(!ot[Re])continue;const et=L.nodeHeights[Re];Number.isFinite(et)&&et>0||Xe++}return Xe}return{markFallbackHeightPrefixDirty:function(){Q=!0},getFallbackNodeHeight:be,estimateHeightRange:He,estimateIndexForOffset:rt,estimateIndexForOffsetFromEnd:function(Xe){var ot,Re;const et=L.parsedNodes.value;if(!et.length)return 0;if(Xe<=0)return Math.max(0,et.length-1);if(L.heightEstimationActive.value){const at=(ot=Te()[et.length])!=null?ot:0;return ze(Math.max(0,at-Xe))}if(L.heightTreeSize.value===et.length){const at=He(0,et.length);return rt(Math.max(0,at-Xe))}let ut=Xe;for(let at=et.length-1;at>=0;at--){const Mt=(Re=L.nodeHeights[at])!=null?Re:L.averageNodeHeight.value;if(ut<=Mt)return at;ut-=Mt}return 0},getEstimatedNodeHeightCount:We,buildVirtualHeightSummary:function(Xe){var ot;const Re=L.parsedNodes.value.length;return{totalNodes:Re,measuredCount:L.heightStats.count,estimatedCount:We(),averageNodeHeight:L.averageNodeHeight.value,topSpacerHeight:Xe.topSpacerHeight,bottomSpacerHeight:Xe.bottomSpacerHeight,estimatedTotalHeight:He(0,Re),width:(ot=Xe.width)!=null?ot:L.getContainerWidth()}}}})({parsedNodes:Tt,nodeHeights:Gi,heightStats:ns,heightTreeSize:Uu,heightSumTree:rd,heightKnownTree:Pp,averageNodeHeight:Zf,heightEstimationActive:Ot,estimatedNodeHeights:ud,getContainerWidth:Ln,hasCustomParagraphComponent:()=>!!Qn.value.paragraph,getPrefixCacheKeyParts:()=>{var L;const Q=T1(X.value||Zt("getFallbackHeightPrefix.clientWidth",()=>{var ae;return((ae=R.value)==null?void 0:ae.clientWidth)||0})),le=((L=i.virtualScroll)==null?void 0:L.measurementKey)==null?"":String(i.virtualScroll.measurementKey);return[Tt.value.length,ns.count,Math.round(ns.total),Math.round(100*Zf.value),le,Q,Ot.value?1:0,Xy.value,ne.value,Qn.value.paragraph?1:0]},fenwickRangeSum:Ze}),Ge(()=>Tt.value.length,L=>{var Q;Pt(),L<=0?bi():(L<Uu.value&&(Q=L,qn(),hn(()=>Hp(Q))),L!==Uu.value&&ld(L))},{immediate:!0});const tz=F(()=>{if(!an.value)return Tt.value.map((ae,be)=>({node:ae,index:be}));const L=Tt.value.length,Q=Zs(Vs.start,0,L),le=Zs(Vs.end,Q,L);return Tt.value.slice(Q,le).map((ae,be)=>({node:ae,index:Q+be}))}),Zv=F(()=>an.value?Yn(0,Math.min(Vs.start,Tt.value.length)):0),Gv=F(()=>{if(!an.value)return 0;const L=Tt.value.length;return Yn(Math.min(Vs.end,L),L)});function Uk(){return Ye.buildVirtualHeightSummary({topSpacerHeight:Zv.value,bottomSpacerHeight:Gv.value,width:Zu()})}function nz(){const L=Tt.value,Q=Uk();return fn(kt({},Q),{probe:{paragraphReady:!!ue.value.paragraph,listItemReady:!!ue.value.listItem,listWrapperOverhead:ue.value.listWrapperOverhead,headingReadyLevels:Object.entries(ue.value.headings).filter(([,le])=>!!le).map(([le])=>Number(le))},nodes:L.map((le,ae)=>{var be,Te,ze,He,rt,We,Xe,ot,Re;return{index:ae,type:le.type,estimateKind:(Te=(be=ud.value[ae])==null?void 0:be.kind)!=null?Te:null,rendererKind:(He=(ze=ud.value[ae])==null?void 0:ze.rendererKind)!=null?He:null,estimatedHeight:(We=(rt=ud.value[ae])==null?void 0:rt.height)!=null?We:null,estimatedContentHeight:(ot=(Xe=ud.value[ae])==null?void 0:Xe.contentHeight)!=null?ot:null,measuredHeight:(Re=Gi[ae])!=null?Re:null}})})}function Qv(){return i.indexKey!=null?String(i.indexKey):$n.value?`virtual-${Ni()}`:"markdown-renderer"}function Kk(L){const Q=String(L),le=`${Qv()}-`;if(!Q.startsWith(le))return null;const ae=Q.slice(le.length).match(/^(\d+)(?:$|-)/);if(!ae)return null;const be=Number(ae[1]);return!Number.isInteger(be)||be<0||be>=Tt.value.length?null:be}function Ni(){var L,Q,le;const ae=(L=i.virtualScroll)==null?void 0:L.sessionKey;return String(ae!=null&&ae!==""?ae:(le=(Q=i.indexKey)!=null?Q:T.customId)!=null?le:li)}function us(){var L;const Q=(L=i.virtualScroll)==null?void 0:L.threadKey;return Q==null||Q===""?void 0:String(Q)}const iz=F(()=>{var L,Q,le;return(le=us())!=null?le:String((Q=(L=i.indexKey)!=null?L:T.customId)!=null?Q:li)});function Yv(L){var Q;return(L??"")===((Q=us())!=null?Q:"")}function Xl(){var L,Q,le;return Q=(L=i.virtualScroll)==null?void 0:L.measurementKey,le=(function(){const ae=g.value;return(function(be){var Te,ze;const He=be.renderer,rt=He==="monaco"?be.codeBlockMonacoOptions:void 0,We=be.codeBlockProps,Xe=He==="shiki";return[be.isDark?"dark":"light",He==="monaco"?"code-rich":He==="pre"?"code-pre":"code-shiki",be.codeBlockStream===!1?"code-static":"code-stream",Ds(be.codeBlockMinWidth),Ds(be.codeBlockMaxWidth),...Xe?[ape((Te=We?.themes)!=null?Te:be.themes,(ze=We?.langs)!=null?ze:be.langs)]:[],Ds(rt?.fontSize),Ds(rt?.lineHeight),Ds(rt?.fontFamily),Ds(rt?.tabSize),Ds(rt?.MAX_HEIGHT),Ds(rt?.wordWrap),Ds(rt?.wrappingIndent),Ds(rt?.padding),Ds(We?.showHeader),Ds(We?.showCopyButton),Ds(We?.showExpandButton),Ds(We?.showPreviewButton),Ds(We?.showCollapseButton),Ds(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})})(),[Q==null?"":String(Q),le].join("\0")}function Zu(){return Ln()}const Qp=F(()=>T1(Zu())),fr=F(()=>[Xl(),Qp.value].join("\0")),sz=F(()=>{var L;return $n.value?["virtual",(L=us())!=null?L:"",Ni(),fr.value].join("\0"):i.indexKey});function cd(){Fk.value+=1}function Jv(L){return!(!L||!Number.isInteger(L.index)||L.index<0||L.index>=Tt.value.length||L.sessionKey!==Ni()||L.threadKey!==us()||L.layoutEpochKey!==fr.value)}function Vk(L){const Q=String(L),le=Cl.get(Q);return le?Jv(le)?le.index:null:Kk(Q)}function Zk(L="async-node"){(cr.size||Cl.size)&&(cr.clear(),Cl.clear(),cd(),xi(L))}const dd=un(s8,null),Xv={reportHeight(L,Q){if(!Je.value)return;const le=Vk(L);if(le==null)return;const ae=Al.get(le);if(!ae)return;const be=Number(Q),Te=Gf(le,ae);(function(ze,He,rt={}){hn(()=>Ku(ze,He,rt))})(le,Number.isFinite(be)&&be>0?Math.max(be,Te||0):Te)},markPending(L){if(!Je.value)return;const Q=Kk(L);Q!=null&&(function(le,ae){var be;const Te=Cl.get(le);if(Te&&Jv(Te))return cr.set(le,Math.max(0,(be=cr.get(le))!=null?be:0)+1),cd(),void xi("async-node");cr.set(le,1),Cl.set(le,(function(ze){return{index:ze,sessionKey:Ni(),threadKey:us(),layoutEpochKey:fr.value}})(ae)),cd(),xi("async-node")})(String(L),Q)},markSettled(L){if(!Je.value)return;const Q=String(L),le=Vk(L);(le!=null||(function(ae){return cr.has(String(ae))})(Q))&&(function(ae){var be;const Te=(be=cr.get(ae))!=null?be:0;return!(Te<=0||(Te<=1?(cr.delete(ae),Cl.delete(ae)):cr.set(ae,Te-1),cd(),Te===1&&xi("async-node"),0))})(Q)&&le!=null&&ea()}};function oz(){let L=0;for(const Q of Al.values())L+=Zt("getVisibleDomHeight.offsetHeight",()=>{var le;return(le=Q?.offsetHeight)!=null?le:0});return Math.ceil(Math.max(0,L))}Pn(s8,{reportHeight(L,Q){Xv.reportHeight(L,Q),dd?.reportHeight(L,Q)},markPending(L){Xv.markPending(L),dd?.markPending(L)},markSettled(L){Xv.markSettled(L),dd?.markSettled(L)}});let e9,t9=null,fd=null;function Yp(L){return L!==!1&&L!=null&&L!==""}function Gk(){return an.value?(function(){if(!an.value)return!0;const L=Tt.value.length,Q=Zs(Vs.start,0,L),le=Zs(Vs.end,Q,L);if(Q>=le)return!0;for(let ae=Q;ae<le;ae++)if(!Ie.has(ae)||t0(ae)&&!Al.has(ae))return!1;return!0})():mi.value>=qp.value}function n9(){return De.value===!0&&!gt.value&&jv.value===0&&$a.size===0&&Jl.size===0&&dr==null&&Gk()}function Qk(){var L,Q;if(((L=i.virtualScroll)==null?void 0:L.settleMode)!=="manual"||t9===Ni()&&e9===us())return!0;const le=(Q=i.virtualScroll)==null?void 0:Q.settledToken;return!!Yp(le)&&fd===d1(le)}function i9(){return n9()&&Qk()}function rz(L,Q){return Q.totalNodes<=0?L==="final"?"final":"estimate":Q.measuredCount>=Q.totalNodes?L==="final"?"final":"measured":Q.measuredCount>0||Q.estimatedCount>0?"mixed":"estimate"}function Gu(L="manual",Q){const le=Uk(),ae=(function(be){return be||(De.value!==!0?Tt.value.length>0?"streaming":"estimating":!Gk()||Jl.size>0||dr!=null?"measuring":i9()?"settled":"settling")})(Q);return{sessionKey:Ni(),threadKey:us(),phase:ae,nodeCount:le.totalNodes,liveRange:{start:Vs.start,end:Vs.end},renderedCount:mi.value,measuredCount:le.measuredCount,estimatedCount:le.estimatedCount,averageNodeHeight:le.averageNodeHeight,topSpacerHeight:le.topSpacerHeight,bottomSpacerHeight:le.bottomSpacerHeight,visibleDomHeight:oz(),totalHeight:Yk(),width:le.width,final:De.value===!0,stable:i9(),confidence:rz(ae,le),reason:L}}function Jf(){const L=Oe.value||ge(),Q=R.value;if(!L||!Q)return null;const le=L.ownerDocument||Q.ownerDocument||document,ae=L===le.documentElement||L===le.body||L===le.scrollingElement,be=Zt("getScrollBox.scrollTop",()=>Pe(L,le,ae)),Te=Zt("getScrollBox.scrollHeight",()=>{var He,rt,We,Xe,ot;return ae?Math.max((rt=(He=le.documentElement)==null?void 0:He.scrollHeight)!=null?rt:0,(Xe=(We=le.body)==null?void 0:We.scrollHeight)!=null?Xe:0,(ot=L.scrollHeight)!=null?ot:0):L.scrollHeight}),ze=Zt("getScrollBox.clientHeight",()=>{var He;return ae?((He=le.documentElement)==null?void 0:He.clientHeight)||L.clientHeight||0:L.clientHeight});return{root:L,doc:le,isViewportRoot:ae,scrollTop:be,scrollHeight:Te,clientHeight:ze}}function Yk(){const L=Tt.value.length,Q=Math.max(0,Yn(0,L)),le=Zt("getRendererLogicalHeight.offsetHeight",()=>{var be,Te;return(Te=(be=R.value)==null?void 0:be.offsetHeight)!=null?Te:0}),ae=Math.max(0,le>0?le:Zt("getRendererLogicalHeight.scrollHeight",()=>{var be,Te;return(Te=(be=R.value)==null?void 0:be.scrollHeight)!=null?Te:0}));return L<=0?Math.ceil(le):an.value?Q>0?Math.max(1,Math.ceil(Q),(function(){let be=Zv.value+Gv.value;for(const Te of Ie.values())Te&&(be+=Math.max(0,Zt("getVirtualizedDomLogicalHeight.offsetHeight",()=>Te.offsetHeight||0)));return Math.ceil(Math.max(0,be))})(),(function(be,Te){return be<=0||Te<=0?0:Te<=be+Math.max(512,.05*be)?Math.ceil(Te):0})(Q,ae)):Math.max(1,Math.ceil(ae)):Je.value?Q>0||ns.count>0||Ye.getEstimatedNodeHeightCount()>0?(lo.value&&mi.value,Math.max(1,Math.ceil(ae),Math.ceil(Q))):Math.ceil(ae):Math.max(1,Math.ceil(ae),Math.ceil(Q))}function Jk(L){const Q=R.value;if(!Q)return null;const le=Zt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>Q.getBoundingClientRect());return(function(be){return be.isViewportRoot?be.clientHeight:Zt("getViewportBottomInRoot.getBoundingClientRect",()=>be.root.getBoundingClientRect().bottom)})(L)-le.bottom}function lz(L={}){const Q=L.requireViewport!==!1,le=(function(Te=64){const ze=Jf(),He=R.value;if(!ze||!He)return!1;const rt=(function(Xe){if(Xe.isViewportRoot)return{top:0,bottom:Xe.clientHeight};const ot=Zt("getVirtualViewportRect.getBoundingClientRect",()=>Xe.root.getBoundingClientRect());return{top:ot.top,bottom:ot.bottom}})(ze),We=Zt("isRendererNearVirtualViewport.getBoundingClientRect",()=>He.getBoundingClientRect());return We.bottom>=rt.top-Te&&We.top<=rt.bottom+Te})();if(Q&&!le)return null;const ae=(function(){const Te=Jf(),ze=R.value;if(!Te||!ze||Math.max(0,Te.scrollHeight-Te.scrollTop-Te.clientHeight)>64)return null;const He=Jk(Te);return He==null?null:He>=-8&&He<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,He)}:null})();if(ae)return{anchor:ae,captured:!0};const be=yi();if(be)return{anchor:{type:"node",nodeIndex:be.nodeIndex,offsetWithinNodePx:be.offsetWithinNodePx},captured:le};if(L.allowFallback===!0){const Te=(function(){const ze=Tt.value.length;return ze<=0?null:{type:"node",nodeIndex:Zs(Yl.value,0,Math.max(0,ze-1)),offsetWithinNodePx:0}})();return Te?{anchor:Te,captured:!1}:null}return null}function s9(L){let Q=2166136261;for(let le=0;le<L.length;le++)Q^=L.charCodeAt(le),Q=Math.imul(Q,16777619);return(Q>>>0).toString(36)}function az(L,Q){let le=L;for(let ae=0;ae<Q.length;ae++)le^=Q.charCodeAt(ae),le=Math.imul(le,16777619);return le^=31,le=Math.imul(le,16777619),le}const uz=new Set(["children","items","header","rows","cells","attrs","data","term","definition"]);function Jp(L,Q=new WeakSet,le=0){if(L==null||typeof L=="number"||typeof L=="boolean")return String(L);if(typeof L=="string")return`s:${(function(ae){const be=ae.length>8192?`${ae.slice(0,8192)}...${ae.length}`:ae;return`${ae.length}:${s9(be)}`})(L)}`;if(typeof L=="function")return"fn";if(typeof L!="object")return typeof L;if(Q.has(L))return"cycle";if(le>=6)return"max-depth";Q.add(L);try{if(Array.isArray(L)){if(L.length<=160){const We=[];for(let Xe=0;Xe<L.length;Xe++)We.push(Jp(L[Xe],Q,le+1));return`a:${L.length}:${We.join(",")}`}const Te=[],ze=[],He=Math.max(0,L.length-32);let rt=2166136261;for(let We=0;We<L.length;We++){const Xe=Jp(L[We],Q,le+1);rt=az(rt,Xe),We<32&&Te.push(Xe),We>=He&&ze.push(Xe)}return[`a:${L.length}`,`h=${Te.join(",")}`,`t=${ze.join(",")}`,`all=${(rt>>>0).toString(36)}`].join(":")}const ae=L,be=Object.keys(ae).filter(Te=>{const ze=ae[Te];return Te!=="parent"&&Te!=="el"&&Te!=="component"&&(ze==null||typeof ze=="string"||typeof ze=="number"||typeof ze=="boolean"||uz.has(Te))}).sort();return`o:${be.length}:${be.map(Te=>`${Te}=${Jp(ae[Te],Q,le+1)}`).join(";")}`}finally{Q.delete(L)}}let o9=-1,r9="",Qu=[2166136261];function Xf(L){const Q=Tt.value[L];return Q?s9(Jp(Q)):""}function cz(L,Q){let le=L;for(let ae=0;ae<Q.length;ae++)le^=Q.charCodeAt(ae),le=Math.imul(le,16777619);return le>>>0}function l9(){var L,Q;const le=ne.value;if(o9===le)return r9;const ae=Tt.value.length;let be=Uv(ae);(o9!==le-1||be>ae||Qu.length<be+1)&&(be=0),be===0?Qu=[2166136261]:Qu.length=be+1;for(let Te=be;Te<ae;Te++){const ze=Xf(Te);Qu[Te+1]=cz((L=Qu[Te])!=null?L:2166136261,ze)}return Qu.length=ae+1,r9=(((Q=Qu[ae])!=null?Q:2166136261)>>>0).toString(36),o9=le,r9}function hd(L,Q={}){var le;const ae=Q.includeHeightCache===!0,be=(le=Q.includeContentHash)!=null?le:ae,Te=ae?(function(He){const rt=(function(){var at,Mt;const mt=Number((Mt=(at=i.virtualScroll)==null?void 0:at.heightCacheLimit)!=null?Mt:5e3);return!Number.isFinite(mt)||mt<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(mt))})();if(!Number.isFinite(rt)||He.length<=rt)return He;const We=new Map,Xe=at=>{!at||We.size>=rt||We.set(at.index,at)},ot=Tt.value.length,Re=Zs(Vs.start-2*gi.value,0,ot),et=Zs(Vs.end+2*gi.value,Re,ot);for(const at of He)at.index>=Re&&at.index<et&&Xe(at);const ut=Math.max(1,Math.ceil(He.length/rt));for(let at=0;at<He.length&&We.size<rt;at+=ut)Xe(He[at]);for(let at=He.length-1;at>=0&&We.size<rt;at-=ut)Xe(He[at]);return Array.from(We.values()).sort((at,Mt)=>at.index-Mt.index).slice(0,rt)})(me().map(He=>{var rt;const We=Tt.value[He.index];return We?fn(kt({},He),{nodeType:String((rt=We.type)!=null?rt:""),signature:Xf(He.index)}):null}).filter(He=>!!He)):[],ze=lz({allowFallback:Q.allowAnchorFallback===!0,requireViewport:Q.requireViewport});return ze||Te.length||Q.includeEmptyState===!0?fn(kt({sessionKey:L.sessionKey,threadKey:L.threadKey},ze?{anchor:ze.anchor,anchorCaptured:ze.captured}:{anchorCaptured:!1}),{metrics:L,width:L.width,contentHash:be?l9():void 0,measurementKey:Xl()||void 0,heightCache:Te.length?Te:void 0}):null}function a9(L){var Q,le;const ae=Jf();if(!ae)return;const be=(function(He){const rt=R.value;if(!rt)return null;const We=ke(rt,He.root),Xe=Tt.value.length,ot=Zt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>rt.offsetHeight||0),Re=Math.max(0,ot>0?ot:Xe>0?Zt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>rt.scrollHeight||0):0),et=Yk();return We+Math.max(Re,et)})(ae);if(be==null)return;const Te=Math.max(0,L.distanceFromBottomPx),ze=Math.max(0,be-ae.clientHeight-Te);(function(He){bt=s1()+120,nn=He})(ze),ae.isViewportRoot?(le=(Q=ae.doc.defaultView)==null?void 0:Q.scrollTo)==null||le.call(Q,0,ze):V_(ae.root,ae.doc,ze,{isReverseFlexScrollRoot:Me,getNormalizedScrollTop:Pe})}const u9=[];function Xk(){if(H)for(xt!=null&&(Oi?.(xt),xt=null);u9.length;){const L=u9.pop();L!=null&&window.clearTimeout(L)}}function pd(L){const Q=!!Qe.value;Qe.value=null,bt=0,nn=null,Xk(),Q&&L&&xi(L)}function gd(){if(!Qe.value||!H||xt!=null)return;const L=()=>{xt=null;const Q=Qe.value;Q&&a9(Q)};xt=Li?Li(L):null,xt==null&&L()}function e6(L,Q={}){const le=Tt.value.length;return le<=0?[]:L.filter(ae=>!(!Number.isInteger(ae.index)||ae.index<0||ae.index>=le)&&!(!Number.isFinite(ae.height)||ae.height<=0)&&!(Q.requireSignature&&!ae.signature)&&!(Q.requireCompatibilityMetadata&&!ae.nodeType&&!ae.signature)&&(function(be){var Te;const ze=Tt.value[be.index];return!(!ze||be.nodeType&&be.nodeType!==String((Te=ze.type)!=null?Te:"")||be.signature&&be.signature!==Xf(be.index))})(ae))}function t6(L){const Q=T1(Zu()),le=T1(L);return Q!==-1&&le!==-1&&Q===le}function c9(L){var Q;const le=Number(L?.width);if(Number.isFinite(le)&&le>0)return le;const ae=Number((Q=L?.metrics)==null?void 0:Q.width);return Number.isFinite(ae)&&ae>0?ae:null}function n6(L){var Q;return L.sessionKey===Ni()&&!!Yv(L.threadKey)&&((Q=L.measurementKey)!=null?Q:"")===Xl()&&!!t6(c9(L))&&!!(function(le){const ae=le.heightCache;return!!ae?.length&&(i6(le)?ae.some(be=>!!(be.nodeType||be.signature)):ae.some(be=>!!be.signature))})(L)}function i6(L){return!!(L.contentHash&&L.contentHash===l9())}function dz(L){return!i6(L)}let Yu=null,Ju=null,Xp=null,e1=null,t1=null;function d9(L){var Q;const le=L.map(be=>{var Te,ze;return[be.index,Math.round(10*be.height),(Te=be.nodeType)!=null?Te:"",(ze=be.signature)!=null?ze:""].join("")}).join(""),ae=T1(Zu());return[(Q=us())!=null?Q:"",Ni(),Xl(),Tt.value.length,ae,L.length,s9(le)].join(":")}function s6(L=(Q=>(Q=i.virtualScroll)==null?void 0:Q.heightCache)()){if(!Je.value||!L?.length||Tt.value.length<=0||!t6((Q=i.virtualScroll)==null?void 0:Q.heightCacheWidth))return!1;var Q;const le=e6(L,{requireSignature:!0});if(!le.length)return!1;const ae=d9(le);return ae===Yu?(Ju="standalone",!0):(Ik(le,{mode:"merge"}),Pt(),Yu=ae,Ju="standalone",r1(),xi("restore"),!0)}function f9(L,Q={}){var le,ae,be;if(!Je.value||!L||L.sessionKey!==Ni()||!Yv(L.threadKey)||Tt.value.length<=0)return!1;const Te=!!((le=L.heightCache)!=null&&le.length)&&!e0(),ze=!L.anchor||L.anchorCaptured===!1&&Q.allowUncapturedAnchor!==!0?null:L.anchor,He=Q.restoreAnchor===!0&&!!ze&&!e0()&&Number(c9(L))>0;let rt=!1;if((ae=L.heightCache)!=null&&ae.length&&n6(L)){const Xe=e6(L.heightCache,{requireCompatibilityMetadata:!L.contentHash,requireSignature:dz(L)});Xe.length&&(Ik(Xe,{mode:"merge"}),Pt(),Yu=d9(Xe),Ju="restore",r1(),rt=!0)}if(Te||He)return!1;if(!Q.restoreAnchor||!ze)return rt&&xi("restore"),!0;const We=(function(Xe,ot){var Re;const et=Xe.anchor,ut=et?et.type==="bottom"?`bottom:${Math.round(et.distanceFromBottomPx)}`:`node:${et.nodeIndex}:${Math.round(et.offsetWithinNodePx)}`:"none";return[(Re=us())!=null?Re:"",Ni(),Xl(),Qp.value,ot,ut].join(":")})(L,(be=Q.restoreToken)!=null?be:"imperative");return Xp===We?(rt&&xi("restore"),!0):(Xp=We,(function(Xe){const ot=()=>{if(Xe.type==="node")return pd(),void Bs({nodeIndex:Xe.nodeIndex,offsetWithinNodePx:Xe.offsetWithinNodePx});if(dt(),Wt.value=null,Qe.value=Xe,Xk(),a9(Xe),H)for(const Re of[0,120,280,480])u9.push(window.setTimeout(()=>{const et=Qe.value;et&&a9(et)},Re))};(function(Re){if(!an.value)return!1;const et=Tt.value.length;return!(et<=0||(Yl.value=Re.type==="node"?Zs(Re.nodeIndex,0,et-1):et-1,Qf(),0))})(Xe)?At(ot):ot()})(ze),xi("restore"),!0)}function e0(){const L=Zu();return Number.isFinite(L)&&L>0}function o6(L){var Q;return L.sessionKey===Ni()&&!!Yv(L.threadKey)&&(Tt.value.length<=0||!(!((Q=L.heightCache)!=null&&Q.length)||e0())||!(!(L.anchor&&Number(c9(L))>0)||e0()))}function h9(){vi.clear();for(const L of Object.keys(Gi)){const Q=Number(L);Number.isInteger(Q)&&Q>=0&&Q<Tt.value.length&&Ks(Q)}}function n1(){dr!=null&&(Oi?.(dr),dr=null),C9()}function r6(){return!H||Fs?Promise.resolve():new Promise(L=>{let Q=!1,le=null;const ae=()=>{Q||(Q=!0,le!=null&&window.clearTimeout(le),L())};if(Li)return Li(ae),void(le=window.setTimeout(ae,50));le=window.setTimeout(ae,0)})}function p9(L,Q=us(),le=fr.value){return Ni()===L&&us()===Q&&fr.value===le}function g9(){return Si(this,arguments,function*(L={}){var Q,le,ae,be,Te;const ze=Ni(),He=us(),rt=fr.value,We=(Q=L.frames)!=null?Q:2,Xe=(le=L.timeoutMs)!=null?le:120,ot=(ae=L.reason)!=null?ae:"manual",Re=L.expectedSettledTokenKey,et=L.flushPendingTimers===!0,ut=Gu(ot),at=()=>fn(kt({},ut),{phase:ut.final?"settling":ut.phase,stable:!1,confidence:ut.confidence==="final"?"mixed":ut.confidence,reason:ot}),Mt=()=>p9(ze,He,rt)&&(Re==null||o1()===Re);for(let en=0;en<We;en++){if(yield At(),!Mt()||(yield r6(),!Mt()))return at();ea(),n1()}if(yield(function(en){return!H||en<=0?Promise.resolve():new Promise(Yt=>window.setTimeout(Yt,en))})(Xe),!Mt()||(et&&$k(),ea(),n1(),!Mt()))return at();const mt=n9();mt&&(t9=ze,e9=He,((be=i.virtualScroll)==null?void 0:be.settleMode)==="manual"&&Re!=null&&Yp((Te=i.virtualScroll)==null?void 0:Te.settledToken)&&o1()===Re&&(fd=d1(i.virtualScroll.settledToken)));const zt=Mt()&&mt&&Qk(),Ut=Gu(ot,zt?"final":void 0);return k9(Ut,!0),Ut})}let m9="content",Xu=null,ec=null,v9=0,i1=null,md=null,y9=null,b9=null;function s1(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function l6(L){var Q,le;const ae=i1;if(!ae)return!0;const be=(le=(Q=i.virtualScroll)==null?void 0:Q.heightDiffThresholdPx)!=null?le:1;return Math.abs(L.totalHeight-ae.totalHeight)>be||L.sessionKey!==ae.sessionKey||L.phase!==ae.phase||L.stable!==ae.stable||L.final!==ae.final||L.threadKey!==ae.threadKey||L.nodeCount!==ae.nodeCount||L.measuredCount!==ae.measuredCount||L.width!==ae.width}function o1(L=(Q=>(Q=i.virtualScroll)==null?void 0:Q.settledToken)()){return Ds(L)}function a6(L,Q){var le,ae;return[L,Q.sessionKey,(le=Q.threadKey)!=null?le:"",Xl(),l9(),Ds((ae=i.virtualScroll)==null?void 0:ae.settledToken),Math.round(Q.totalHeight),Math.round(Q.width)].join("\0")}function r1(){y9=null,b9=null,md=null}function fz(L){const Q=L.heightCache;return Q?.length?d9(Q):""}function l1(L){var Q,le,ae;const be=L.metrics,Te=L.anchor?(ze=L.anchor).type==="bottom"?`bottom:${Math.round(ze.distanceFromBottomPx)}`:`node:${ze.nodeIndex}:${Math.round(ze.offsetWithinNodePx)}`:"none";var ze;return[L.sessionKey,(Q=L.threadKey)!=null?Q:"",(le=L.measurementKey)!=null?le:Xl(),(ae=L.contentHash)!=null?ae:"",fz(L),Te,L.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 k9(L,Q=!1){if(!Je.value||(function(ze=!1){return!ze&&$n.value&&!Rt.value})(Q))return;const le=Q||l6(L),ae=(function(ze,He=!1){return He||ze.stable||ze.phase==="final"?{state:hd(ze,{includeHeightCache:!0})}:{state:hd(ze)}})(L,Q),be=ae.state,Te=!!(be&&(le||(function(ze,He=!1){return!!He||l1(ze)!==md})(be,Q)));if(le&&($(L),i1=L,v9=s1()),be&&Te&&(O(be),be.anchor&&P(be.anchor),md=l1(be)),L.stable){const ze=a6("settled",L);if(ze!==y9){y9=ze;const He=hd(L,{includeHeightCache:!0});He&&(O(He),md=l1(He)),(function(rt){s("render-settled",rt)})(L)}}if(L.phase==="final"){const ze=a6("final",L);if(ze!==b9){b9=ze;const He=hd(L,{includeHeightCache:!0});He&&(O(He),md=l1(He)),(function(rt){s("render-final",rt)})(L)}}}function A9(){Xu!=null&&(Oi?.(Xu),Xu=null),ec!=null&&H&&(window.clearTimeout(ec),ec=null)}function u6(){Xu=null,ec=null,(function(L){if(Jl.size>0||dr!=null)return!0;switch(L){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(m9)&&(ea(),n1()),k9(Gu(m9))}function xi(L){var Q,le;if(!Je.value||(m9=L,Xu!=null||ec!=null))return;const ae=Math.max(0,(le=(Q=i.virtualScroll)==null?void 0:Q.emitIntervalMs)!=null?le:32),be=Math.max(0,ae-(s1()-v9)),Te=()=>{ec=null,Xu=Li?Li(u6):null,Xu==null&&u6()};H&&be>0?ec=window.setTimeout(Te,be):Te()}function c6(){Ae.value+=1}function t0(L){if(lo.value&&L>=mi.value){const Q=Tt.value[L],le=Fe.value===!0&&De.value!==!0&&L>=Tt.value.length-2,ae=Q?.type==="code_block"||Q?.type==="image"||Q?.type==="mermaid"||Q?.type==="infographic";if(!le||ae)return!1}return!kl.value||L<Pi.value||Wv.value.has(L)}function vd(L){const Q=Vp.get(L);Q&&(Q(),Vp.delete(L));const le=ad.get(L);le&&(le.destroy(),ad.delete(L)),Zp(L)}function n0(L,Q){let le=!1;if(Q){const Te=Ie.get(L);Ie.set(L,Q),Te!==Q&&(le=!0)}else Ie.delete(L)&&(le=!0);if(le&&c6(),Q||Zp(L),!Ek.value||!Ws)return vd(L),void(Q&&kl.value&&Da(L,!0));if(!an.value&&kl.value&&!W.value&&ad.size>=Ne.value&&(W.value||(W.value=!0,qv()),!Ek.value||!Ws))return vd(L),void(Q&&Da(L,!0));if(L<Pi.value&&!an.value||Wv.value.has(L))return vd(L),void Da(L,!0);if(!Q)return void vd(L);vd(L);const ae=Ws(Q,{rootMargin:pe.value});if(!ae)return;ad.set(L,ae),Da(L,ae.isVisible.value),kl.value&&(function(Te){if(!H||!kl.value)return;Zp(Te);const ze=Te%17*23,He=window.setTimeout(()=>{if(Dk.delete(Te),!kl.value||Wv.value.has(Te))return;const rt=Ie.get(Te);if(!rt)return;const We=ge(rt),Xe=rt.ownerDocument||document,ot=Xe.defaultView||window,Re=!We||We===Xe.documentElement||We===Xe.body,et=!Re&&We?Zt("nodeVisibilityFallback.root.getBoundingClientRect",()=>We.getBoundingClientRect()):null,ut=Re?0:et.top,at=Re?Zt("nodeVisibilityFallback.clientHeight",()=>{var mt,zt;return(zt=(mt=ot.innerHeight)!=null?mt:We?.clientHeight)!=null?zt:0}):et.bottom,Mt=Zt("nodeVisibilityFallback.node.getBoundingClientRect",()=>rt.getBoundingClientRect());Mt.bottom>=ut-500&&Mt.top<=at+500&&Da(Te,!0)},1800+ze);Dk.set(Te,He)})(L);let be=null;be=Ge(()=>ae.isVisible.value,Te=>{if(Te){Zp(L),Da(L,!0),be?.(),Vp.delete(L),ad.get(L)===ae&&ad.delete(L);try{ae.destroy()}catch{}}},{immediate:!0}),Vp.set(L,be),an.value&&Kr()}function C9(){dr=null,hn(()=>{let L=!1;for(const[Q,le]of Jl)Jl.delete(Q),Al.get(Q)===le.el&&Vu.get(Q)===le.version&&(L=Ku(Q,le.height,{allowShrink:le.allowShrink})||L);return L})}function yd(){dr!=null&&(Oi?.(dr),dr=null),Jl.clear()}function i0(L,Q){(function(le,ae,be){var Te;if(!Number.isFinite(be)||be<=0||Al.get(le)!==ae)return;const ze=Vu.get(le);if(ze==null)return;const He=Tt.value[le],rt=gt.value&&De.value!==!0&&!((Te=i.nodes)!=null&&Te.length)&&le>=Tt.value.length-2,We=!(He?.loading===!0||rt),Xe=Jl.get(le),ot=Xe?Xe.allowShrink&&We:We,Re=Xe&&!ot?Math.max(Xe.height,be):be;Jl.set(le,{height:Re,allowShrink:ot,version:ze,el:ae}),dr==null&&(dr=Li?Li(C9):null,dr==null&&C9())})(L,Q,Gf(L,Q))}function ea(){for(const[L,Q]of Al)Q&&i0(L,Q)}function d6(){wi?.disconnect(),wi=null,Ve.clear()}function w9(){for(;Wp.length;)Kp(Wp.pop())}Ge(Rt,L=>{L&&xi("content")},{flush:"post"}),t({getVirtualMetrics:Gu,captureVirtualState:function(L={}){var Q;return hd(Gu("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:L.allowFallbackAnchor===!0,requireViewport:L.requireViewport===!0,includeEmptyState:(Q=L.includeEmptyState)==null||Q})},restoreVirtualState:function(L,Q={}){const le=Q.restoreAnchor===!0,ae=Q.restoreToken==null?"imperative":String(Q.restoreToken);e1=L,t1={restoreAnchor:le,restoreToken:ae,allowUncapturedAnchor:Q.allowUncapturedAnchor===!0},!f9(L,{restoreAnchor:le,restoreToken:ae,allowUncapturedAnchor:Q.allowUncapturedAnchor===!0})&&o6(L)||(e1=null,t1=null)},forceMeasure:function(L="manual"){return Si(this,null,function*(){yield At(),yield r6(),ea(),n1(),yield At();const Q=Gu(L);return k9(Q,!0),Q})},settle:g9,scrollToNode:function(L,Q="start"){pd(),dt();const le=Tt.value.length;if(le<=0)return;const ae=Zs(L,0,le-1),be=()=>{var Te;const ze=ct({nodeIndex:ae,offsetWithinNodePx:0}),He=wn(ae),rt=Jf(),We=(Te=rt?.clientHeight)!=null?Te:0,Xe=Wn();let ot=ze;if(Q==="center")ot=ze-We/2+He/2;else if(Q==="end")ot=ze-We+He;else if(Q==="nearest"&&Xe!=null){if(ze>=Xe&&ze+He<=Xe+We)return;ot=ze<Xe?ze:ze-We+He}Ee(Math.max(0,ot)),Kr({immediate:!0}),an.value&&(Yl.value=ae,Qf())};if(an.value)return Yl.value=ae,Qf(),void At(be);be()}}),Ge(()=>Zi.value,L=>{if(!L){d6();for(const Q of Ba.values())for(const le of Q)Kp(le);Ba.clear(),Vu.clear(),w9(),yd()}},{immediate:!0}),Ge(De,L=>{L&&(function(){if(H&&De.value&&Al.size){w9();for(const Q of[80,240,640]){const le=Bk(Q,()=>{for(const[ae,be]of Al)be&&i0(ae,be)},"final");le!=null&&Wp.push(le)}}})(),xi(L?"final":"content")});const hz=Z_(()=>xi("content"),16),pz=Z_(()=>xi("batch"),16);Ge([()=>Tt.value.length,()=>mi.value],()=>{Qe.value&&gd(),hz()},{flush:"post",immediate:!0}),Ge([()=>Vs.start,()=>Vs.end],()=>{pz()},{flush:"post"});const{cleanupBatchScheduler:gz}=(function(L){const{props:Q,isClient:le,isTestEnv:ae,parsedNodesIdentity:be,parsedNodeCount:Te,desiredRenderedCount:ze,datasetKey:He,batchingEnabled:rt,incrementalRenderingActive:We,resolvedBatchSize:Xe,resolvedInitialBatch:ot,renderedCount:Re,adaptiveBatchSize:et,previousRenderContext:ut,previousBatchConfig:at,requestFrame:Mt,cancelFrame:mt,hasIdleCallback:zt,cleanupNodeVisibility:Ut,onDatasetKeyChanged:en,onDatasetChanged:Yt}=L;let tn=null,An="raf",Mn=null,fi=0,Gs=!1,$s=!1;const Vr=new Set,wl=new Set;function m1(){if(le){tn!=null&&(An==="raf"&&mt?mt(tn):An==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(tn):An==="timeout"&&window.clearTimeout(tn),tn=null),fi+=1;for(const co of Vr)mt&&mt(co);for(const co of wl)window.clearTimeout(co);Vr.clear(),wl.clear(),Mn=null,Gs=!1,$s=!1}}function f0(){return typeof performance<"u"?performance.now():Date.now()}function E6(co){(function(ta){var Ra;if(!We.value)return;const na=Math.max(2,(Ra=Q.renderBatchBudgetMs)!=null?Ra:6),ia=Math.max(1,Xe.value||1),Zr=Math.max(1,Math.floor(ia/4));ta>1.5*na?et.value=Math.max(Zr,Math.floor(.8*et.value)):ta<.6*na&&et.value<ia&&(et.value=Math.min(ia,Math.ceil(1.2*et.value)))})(co),Gs=!1;const Wo=$s||Re.value<ze.value;$s=!1,Wo&&N6()}function T6(co,Wo={}){var ta,Ra;if(!We.value)return;const na=ze.value;if(Re.value>=na)return;const ia=Math.max(1,co),Zr=()=>{const Ad=f0();tn=null;const v1=Mn??ia;Mn=null;const Cd=f0();Re.value=Math.min(na,Re.value+v1),Ut(Re.value),(function(T9,h0){if(!le)return void E6(h0);Gs=!0;const F6=++fi;At().then(()=>{var B6;if(F6!==fi)return;const Dz=f0(),zz=Math.max(h0,Dz-T9),$6=()=>{F6===fi&&E6(zz)};if(Mt){let nc=null,wd=null,z6=!1;const R6=()=>{z6||(z6=!0,nc!==null&&(Vr.delete(nc),nc=null),wd!==null&&(wl.delete(wd),window.clearTimeout(wd),wd=null),$6())};return nc=Mt(()=>{R6()}),Vr.add(nc),wd=window.setTimeout(()=>{nc!==null&&mt&&mt(nc),R6()},Math.max(32,(B6=Q.renderBatchIdleTimeoutMs)!=null?B6:120)),void wl.add(wd)}const D6=window.setTimeout(()=>{wl.delete(D6),$6()},0);wl.add(D6)})})(Ad,f0()-Cd)};if(!le||Wo.immediate)return void Zr();const Oa=Math.max(0,(ta=Q.renderBatchDelay)!=null?ta:16);if(Mn=Mn!=null?Math.max(Mn,ia):ia,tn==null){if(!ae&&zt&&window.requestIdleCallback){const Ad=Math.max(0,(Ra=Q.renderBatchIdleTimeoutMs)!=null?Ra:120);return An="idle",void(tn=window.requestIdleCallback(()=>Zr(),{timeout:Ad}))}if(Mt&&!ae)return An="raf",void(tn=Mt(()=>{Oa===0?Zr():(An="timeout",tn=window.setTimeout(()=>Zr(),Oa))}));An="timeout",tn=window.setTimeout(()=>Zr(),Oa)}}function L6(co,Wo={}){Gs?$s=!0:co==null?N6():T6(co,Wo)}function N6(){We.value&&T6(rt.value?Math.max(1,Math.round(et.value)):Math.max(1,Xe.value))}return Ge([be,Te,He,We,Xe,ot,()=>Q.renderBatchDelay],()=>{var co;const Wo=Te.value,ta=ut.value,Ra=He.value,na=!Object.is(Ra,ta.key),ia=Wo!==ta.total,Zr=na||ia;ut.value={key:Ra,total:Wo};const Oa=at.value,Ad=(co=Q.renderBatchDelay)!=null?co:16,v1=Oa.batchSize!==Xe.value||Oa.initial!==ot.value||Oa.delay!==Ad||Oa.enabled!==We.value;at.value={batchSize:Xe.value,initial:ot.value,delay:Ad,enabled:We.value},na&&en(Wo),(Zr||v1||!We.value)&&m1(),(Zr||v1)&&(et.value=Math.max(1,Xe.value||1)),Zr&&Yt();const Cd=ze.value;if(!Wo)return Re.value=0,void Ut(0);if(!We.value)return Re.value=Cd,void Ut(Re.value);const T9=na||ta.total===0;Re.value=T9||v1?Math.min(Cd,ot.value):Math.min(Re.value,Cd);const h0=Math.max(1,ot.value||Xe.value||Wo);Re.value<Cd?L6(h0,{immediate:!le}):Ut(Re.value)},{immediate:!0}),Ge(ze,(co,Wo)=>{We.value&&(typeof Wo=="number"&&co<=Wo||co>Re.value&&L6())}),{cleanupBatchScheduler:m1}})({props:T,isClient:H,isTestEnv:Fs,parsedNodesIdentity:Co,parsedNodeCount:Mi,desiredRenderedCount:qp,datasetKey:sz,batchingEnabled:ws,incrementalRenderingActive:lo,resolvedBatchSize:qs,resolvedInitialBatch:Pi,renderedCount:mi,adaptiveBatchSize:ao,previousRenderContext:xo,previousBatchConfig:Us,requestFrame:Li,cancelFrame:Oi,hasIdleCallback:Zl,cleanupNodeVisibility:JD,onDatasetKeyChanged:L=>{yd(),bi(),Pt(),r1(),L>0&&ld(L)},onDatasetChanged:()=>{an.value&&Kr({immediate:!0})}});Ge([Tk,an,()=>R.value,()=>ee()],([L,Q])=>{if(!L)return zk(),void Hv();XD(),Q?Kr({immediate:!0}):Hv()},{flush:"post",immediate:!0}),Ge([()=>Tt.value.length,()=>an.value],L=>Si(null,[L],function*([Q,le]){le&&Q&&H&&(yield At(),Kr({immediate:!0}))}),{flush:"post"}),Ge(Ot,L=>{L&&(function(){var Q;if(Ei.value&&ro.value&&zi.value&&((Q=Hs.value)!=null&&Q[1]))return;const le=wt({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ae=wt({type:"list_item",children:[le],raw:"- Probe paragraph text"}),be=wt({type:"list",ordered:!1,items:[ae],raw:"- Probe paragraph text"});Ei.value=le,ro.value=ae,zi.value=be;const Te={1:null,2:null,3:null,4:null,5:null,6:null};for(let ze=1;ze<=6;ze++)Te[ze]=wt({type:"heading",level:ze,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(ze)} Probe heading`});Hs.value=Te})()},{immediate:!0}),Ge([()=>R.value,Ot],()=>{if(!Ot.value)return Vv(),void(X.value=0);Ok(),Vv(),Ot.value&&R.value&&typeof ResizeObserver<"u"&&(Yf=new ResizeObserver(()=>{Ok(),Wt.value&&qt(),Qe.value&&gd(),xi("resize")}),Yf.observe(R.value))},{immediate:!0}),Ge([Ot,ls,fr],()=>Si(null,null,function*(){if(!Ot.value)return ue.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Pt();yield At(),(function(){if(!Ot.value||typeof window>"u")return ue.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Pt();const L={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},Q=Rk(Kv(j.value),".paragraph-node");L.paragraph=i4(j.value,Q,"pre-wrap");const le=Kv(z.value),ae=le?.querySelector(".paragraph-node");L.listItem=i4(z.value,ae,"pre-wrap");const be=Zt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var ze,He;return(He=(ze=K.value)==null?void 0:ze.offsetHeight)!=null?He:0}),Te=Zt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var ze,He;return(He=(ze=z.value)==null?void 0:ze.offsetHeight)!=null?He:0});L.listWrapperOverhead=Math.max(0,be-Te);for(let ze=1;ze<=6;ze++){const He=Rk(Kv(q[ze]),`h${ze}`);L.headings[ze]=i4(q[ze],He,"pre-wrap")}ue.value=L,Pt()})()}),{flush:"post",immediate:!0}),Ge(()=>Tt.value.length,()=>{an.value&&Kr({immediate:!0})}),Ge([Ot,X],()=>{Pt(),an.value&&Kr({immediate:!0}),Wt.value&&qt(),Qe.value&&gd(),xi("resize")},{immediate:!1}),Ge(()=>kl.value,L=>{if(L)for(const[Q,le]of Ie)n0(Q,le);else if(qv(),an.value)Kr({immediate:!0});else for(const[Q,le]of Ie)le&&Da(Q,!0)},{immediate:!1}),Ge([pe,Ne,()=>ee()],()=>{var L;(L=Ws.refresh)==null||L.call(Ws);for(const[Q,le]of Ie)n0(Q,le)},{immediate:!1}),Ge([()=>T.viewportPriority,()=>Tt.value.length,Ne],([L,Q,le])=>{if(L!==!1){if(W.value&&(Q<=200||Q<=le)){W.value=!1;for(const[ae,be]of Ie)n0(ae,be)}}else W.value=!1}),Ge(()=>mi.value,()=>{an.value&&Kr({immediate:!0})}),Ge([Yl,Vi,gi,()=>Tt.value.length,an],()=>{Qf()},{immediate:!0});let a1=null,u1=!1,bd=null;function c1(){a1=null,t9=null,e9=void 0,fd=null,r1()}function x9(){yd(),bi(),Pt(),vi.clear();const L=Tt.value.length;L>0&&ld(L),h9()}function _9(){A9(),$k(),i1=null,Yu=null,Ju=null,Xp=null,e1=null,t1=null,u1=!1,c1(),Zk("restore"),dt(),pd()}function d1(L){var Q;return[(Q=us())!=null?Q:"",Ni(),Xl(),Qp.value,o1(L),Tt.value.length,Math.round(Yn(0,Tt.value.length)),Math.round(Zu()),ns.count,Math.round(ns.total)].join(":")}function f6(){return Si(this,null,function*(){var L,Q,le,ae;const be=(L=i.virtualScroll)==null?void 0:L.settledToken,Te=o1(be),ze=Ni(),He=us(),rt=fr.value;if(Je.value&&((Q=i.virtualScroll)==null?void 0:Q.settleMode)==="manual"&&Yp(be))if(n9()){if(d1(be)!==fd&&!u1){u1=!0;try{const We=yield g9({reason:"manual",expectedSettledTokenKey:Te}),Xe=o1()===Te;p9(ze,He,rt)&&We.sessionKey===ze&&We.threadKey===He&&Xe&&We.stable&&We.phase==="final"&&(fd=d1((le=i.virtualScroll)==null?void 0:le.settledToken))}finally{u1=!1,yield At();const We=(ae=i.virtualScroll)==null?void 0:ae.settledToken,Xe=Yp(We)?d1(We):"";p9(ze,He,rt)&&Xe&&fd!==Xe&&f6()}}}else xi("manual")})}Ge(Je,(L,Q)=>{if(L!==Q){if(!L)return _9(),void A9();_9(),x9(),bd=fr.value,xi("content")}},{flush:"post"}),Ge([Je,fr],([L,Q])=>{L?bd!=null?bd!==Q&&(bd=Q,(function(le="resize"){yd(),bi(),Pt(),vi.clear();const ae=Tt.value.length;ae>0&&ld(ae),h9(),Yu=null,Ju=null,Xp=null,i1=null,u1=!1,c1(),s6(),At(()=>{ea(),Wt.value&&qt(),Qe.value&&gd(),xi(le)})})("resize")):bd=Q:bd=null},{flush:"post",immediate:!0}),Ge([Je,()=>Ni(),()=>us()],([L])=>{L&&(_9(),x9(),Zk("content"),xi("content"))}),Ge([Je,()=>Ni(),()=>us(),fr,()=>Tt.value.length],([L])=>{L&&(function(Q="async-node"){let le=!1;for(const[ae,be]of Array.from(Cl.entries()))Jv(be)||(Cl.delete(ae),cr.delete(ae),le=!0);le&&(cd(),xi(Q))})("async-node")},{flush:"post"}),Ge([Je,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.sessionKey},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey},()=>i.indexKey,()=>ne.value],([L])=>{L&&(r1(),(function(Q="content"){if(!Je.value)return;const le=[],ae=Tt.value.length,be=Uv(ae);for(const Te of Array.from(vi.keys())){if(Te>=ae){le.push(Te);continue}if(Te<be)continue;const ze=Xf(Te),He=vi.get(Te);He!=null&&He!==ze&&le.push(Te),vi.set(Te,ze)}for(const Te of Array.from(vi.keys()))Te>=ae&&vi.delete(Te);le.length&&((function(Te,ze={}){const He=Array.from(Te,Number);sn(He);let rt=0;if(hn(()=>(rt=Ov(He,ze),rt>0)),rt>0)(function(We){for(const Xe of We)vi.delete(Xe)})(He);else for(const We of He)uo.delete(We)})(le,{notify:!1}),Pt(),c1(),Wt.value&&qt(),Qe.value&&gd(),xi(Q))})("content"))},{flush:"post",immediate:!0}),Ge([Je,()=>Tt.value.length,()=>Ni(),()=>us()],([L,Q,le,ae],[be,Te,ze,He])=>{L&&be&&le===ze&&ae===He&&Q!==Te&&c1()},{flush:"post"}),Ge([Je,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.heightCache},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.heightCacheWidth},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey},()=>Tt.value.length,()=>Ni(),X],()=>{s6()},{flush:"post",immediate:!0}),Ge([Je,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreAnchor},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey},()=>Tt.value.length,()=>Ni(),X],L=>Si(null,[L],function*([Q,le]){if(!Q||!le)return;yield At();const ae=(function(){var be;const Te=(be=i.virtualScroll)==null?void 0:be.restoreAnchor;return Te==null||Te===!1?null:Te===!0?"true":String(Te)})();f9(le,{restoreAnchor:ae!=null,restoreToken:ae??void 0})}),{flush:"post",immediate:!0}),Ge([Je,X,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey}],([L])=>{var Q;if(!L)return;const le=(Q=i.virtualScroll)==null?void 0:Q.restoreState;le&&Yu&&Ju==="restore"&&(n6(le)||(x9(),Yu=null,Ju=null,xi("resize")))},{flush:"post"}),Ge([Je,()=>Tt.value.length,()=>Ni(),X],L=>Si(null,[L],function*([Q]){var le;const ae=e1,be=t1;Q&&ae&&(yield At(),!f9(ae,{restoreAnchor:be?.restoreAnchor===!0,restoreToken:(le=be?.restoreToken)!=null?le:"imperative",allowUncapturedAnchor:be?.allowUncapturedAnchor===!0})&&o6(ae)||(e1=null,t1=null))}),{flush:"post",immediate:!0}),Ge([Je,De,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.settleMode},()=>Ni(),()=>us(),fr,jv,Nk,()=>mi.value,qp,()=>ns.count,()=>ns.total],([L,Q,le])=>{if(!L||Q!==!0||le==="manual"||!i9())return;const ae=(function(){var be;const Te=Tt.value.length;return[(be=us())!=null?be:"",Ni(),Xl(),Qp.value,Te,Math.round(Yn(0,Te)),Math.round(Zu()),ns.count,Math.round(ns.total)].join(":")})();a1!==ae&&(a1=ae,g9({reason:"final"}).then(be=>{be.stable||a1!==ae||(a1=null)}))},{flush:"post",immediate:!0}),Ge([Je,De,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.settleMode},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.settledToken},()=>Ni(),()=>us(),fr,jv,Nk,()=>mi.value,qp,()=>Tt.value.length,()=>ns.count,()=>ns.total],()=>{f6()},{flush:"post",immediate:!0}),Ge([()=>Tt.value.length,an,Vi,gi,()=>Vs.start,()=>Vs.end],([L,Q,le,ae,be,Te])=>{ve.value&&_n("virtualization",{nodes:L,virtualization:Q,maxLiveNodes:le,buffer:ae,focusIndex:Yl.value,scroll:Q?(()=>{const ze=Oe.value||ge();return ze?{reverse:Me(ze),scrollTop:Math.round(ze.scrollTop),scrollTopAbs:Math.round(Math.abs(ze.scrollTop)),scrollHeight:Math.round(ze.scrollHeight),clientHeight:Math.round(ze.clientHeight)}:null})():null,liveRange:{start:be,end:Te},rendered:mi.value})}),Ge([()=>T.customId],([L],Q,le)=>{if(!L||wo)return;const ae=(function(be,Te){return be?(xs.controllers[be]=Te,()=>{xs.controllers[be]===Te&&delete xs.controllers[be]}):()=>{}})(L,{captureRestoreAnchor:yi,restoreAnchor:Bs,getAnchorDrift:Ql,getReport:nz});le(()=>{ae()})},{immediate:!0}),Gn(()=>{(function(){if(Je.value)try{ea(),n1();const L=Gu("manual");l6(L)&&($(L),i1=L,v9=s1());const Q=hd(L,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});Q&&(O(Q),Q.anchor&&P(Q.anchor),md=l1(Q))}catch{}})(),gz(),qv(),Qt(),d6();for(const L of Ba.values())for(const Q of L)Kp(Q);Ba.clear(),Vu.clear(),vi.clear(),w9(),yd(),Vv(),dt(),pd(),A9(),zk(),Hv()});const mz=Y1("ViewportDeferredMermaidBlockNode",sl({loader:()=>Si(null,null,function*(){try{return(yield Ji(()=>import("./index11-DDroxORK.js"),__vite__mapDeps([7,5]))).default}catch(L){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".',L),Go}}),loadingComponent:aS,delay:0}),aS),vz=Y1("ViewportDeferredInfographicBlockNode",sl({loader:()=>Si(null,null,function*(){try{return(yield Ji(()=>import("./index10-1H9a2FKj.js"),[])).default}catch(L){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.',L),Go}}),loadingComponent:lS,delay:0}),lS),yz=Y1("ViewportDeferredD2BlockNode",sl(()=>Si(null,null,function*(){try{return(yield Ji(()=>import("./index8-DPCQMDEU.js"),[])).default}catch(L){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".',L),Go}})),Go),h6={text:es,paragraph:Oc,heading:Sv,code_block:Vy,list:vf,list_item:mf,blockquote:zg,table:Sh,definition_list:Rg,footnote:Og,footnote_reference:yr,footnote_anchor:xh,admonition:Wg,vmr_container:jg,hardbreak:mu,link:Do,image:gu,thematic_break:Pg,math_inline:ml,math_block:IB,strong:Bo,emphasis:zo,strikethrough:$o,highlight:kr,insert:nr,subscript:tr,superscript:er,emoji:Xo,checkbox:vr,checkbox_input:vr,inline_code:ko,html_inline:br,reference:Fo,html_block:_h},bz=F(()=>Qv()),p6=F(()=>K_(T.codeBlockProps)),kz=F(()=>K_(T.codeBlockProps,{omit:["langs"]})),g6=F(()=>kt(kt({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 re.value=="boolean"?{showTooltips:re.value}:{}),kz.value)),m6=F(()=>kt(fn(kt({},g6.value),{langs:T.langs}),p6.value));function v6(L){return typeof L=="boolean"?L:void 0}const Az=F(()=>{const L=T.codeBlockProps||{},Q={},le=v6(L.showLineNumbers);le!==void 0&&(Q.showLineNumbers=le);const ae=v6(L.diffInline);ae!==void 0&&(Q.diffInline=ae);const be=(function(Te){const ze=Number(Te);return Number.isFinite(ze)&&ze>0?ze:void 0})(L.reservedHeightPx);return be!==void 0&&(Q.reservedHeightPx=be),Q}),Cz=F(()=>kt(kt({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,themes:T.themes,langs:T.langs,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof re.value=="boolean"?{showTooltips:re.value}:{}),p6.value)),wz=F(()=>kt({},T.mermaidProps||{})),y6=F(()=>kt({},T.d2Props||{})),xz=F(()=>kt({},T.infographicProps||{})),f1=F(()=>({typewriter:f.value,fade:T.fade,customHtmlTags:As.value.customHtmlTags})),_z=F(()=>kt(kt({},f1.value),typeof re.value=="boolean"?{showTooltip:re.value}:{})),Sz=F(()=>kt(kt({},f1.value),typeof re.value=="boolean"?{showTooltips:re.value}:{})),Mz=F(()=>kt(kt({},f1.value),typeof re.value=="boolean"?{showTooltips:re.value}:{})),Iz=F(()=>kt(kt({},f1.value),typeof re.value=="boolean"?{showTooltips:re.value}:{}));function Ez(L){return Array.isArray(L.children)&&L.children.length>0}const s0=F(()=>tz.value.map(L=>{var Q,le,ae,be,Te,ze,He,rt;let We=(function(mt){var zt,Ut,en,Yt,tn,An,Mn;if(mt.type!=="code_block")return mt;const fi=mt,Gs=[String((zt=fi.language)!=null?zt:""),String((Ut=fi.loading)!=null?Ut:""),String((en=fi.diff)!=null?en:""),String((Yt=fi.code)!=null?Yt:""),String((tn=fi.originalCode)!=null?tn:""),String((An=fi.updatedCode)!=null?An:""),String((Mn=fi.raw)!=null?Mn:"")].join("\0"),$s=Po.get(fi);if($s&&$s.signature===Gs)return $s.node;const Vr=kt({},fi);return Po.set(fi,{signature:Gs,node:Vr}),Vr})(L.node);const Xe=o0(We);let ot=C6(We,Xe);if((We.type==="html_block"||We.type==="html_inline")&&ot===h6[We.type]){const mt=We,zt=String((Q=mt.tag)!=null?Q:"").trim().toLowerCase()||JN(mt.content);if(zt){const Ut=Qn.value[zt];if(os.value.has(zt)&&Ut)ot=Ut,We=fn(kt({},mt),{type:zt,tag:zt,content:Lue(mt.content,zt)});else if(XN((le=mt.content)!=null?le:mt.raw,zt)){const en=String((be=(ae=mt.content)!=null?ae:mt.raw)!=null?be:"");We.type==="html_inline"?(ot=es,We={type:"text",content:en,raw:en}):(ot=Oc,We={type:"paragraph",children:[{type:"text",content:en,raw:en}],raw:en})}}}const Re=We.type==="code_block"&&g.value==="pre"&&ot===Go&&!S9(Qn.value,Xe);let et=kt({},(function(mt,zt,Ut){const en=zt??o0(mt);if(mt.type==="code_block"){const Yt=en?S9(Qn.value,en):void 0;if(Ut&&g.value==="pre"&&!Yt&&Ut===Go)return Az.value;if(Ut&&en&&Ut===Yt)return en==="mermaid"?k6(mt):en==="infographic"?A6(mt):en==="d2"||en==="d2lang"?y6.value:m6.value;if(Ut&&Ut===Qn.value.code_block)return m6.value;if(jk(Ut))return Cz.value}return en==="mermaid"?k6(mt):en==="infographic"?A6(mt):en==="d2"||en==="d2lang"?y6.value:mt.type==="link"?_z.value:mt.type==="list"?Sz.value:mt.type==="blockquote"?Mz.value:mt.type==="table"?Iz.value:mt.type==="code_block"?g6.value:f1.value})(We,Xe,ot));const ut=Ot.value?ud.value[L.index]:null;We.type==="code_block"&&ut?.kind==="code-block"&&(et=fn(kt({},et),Re?{reservedHeightPx:(Te=ut.height)!=null?Te:ut.contentHeight}:{estimatedHeightPx:ut.height,estimatedContentHeightPx:ut.contentHeight,estimatedDiffInline:ut.diffInline})),Re||We.type!=="code_block"||Xe!=="mermaid"||Yd(et.estimatedPreviewHeightPx)!=null||(et=fn(kt({},et),{estimatedPreviewHeightPx:Zm(Km(String((ze=We.code)!=null?ze:"")))})),Re||We.type!=="code_block"||Xe!=="infographic"||Yd(et.estimatedPreviewHeightPx)!=null||(et=fn(kt({},et),{estimatedPreviewHeightPx:Gm(Vm(String((He=We.code)!=null?He:"")))})),We.type==="math_block"&&(et=fn(kt({},et),{cacheScope:Sn}));const at=(function(mt,zt){const Ut=String(mt.type);return!Ep(Ut)&&Qn.value[Ut]===zt})(We,ot),Mt=at?Lb(We,se.value):void 0;return fn(kt({},L),{node:We,component:ot,bindings:et,customBindings:kt(kt({},Mt??{}),et),rendersCustomNode:at,hasSlotChildren:Ez(We),slotContent:String((rt=We.content)!=null?rt:""),isCodeBlock:We.type==="code_block",indexKey:`${bz.value}-${L.index}`,vnodeKey:`${iz.value}\0${L.index}\0${We.type}`})}));function o0(L){var Q;return L?.type==="code_block"?String((Q=L.language)!=null?Q:"").trim().toLowerCase():""}function S9(L,Q){const le=Q.trim().toLowerCase();if(le)for(const ae of[le,wv(le),uB(le)]){const be=ae&&L[ae];if(be)return be}}function b6(L,Q,le,ae){var be,Te;const ze=kt({},L.value);return Yd(ze.estimatedPreviewHeightPx)==null&&(ze.estimatedPreviewHeightPx=ae(le(String((be=Q?.code)!=null?be:"")),void 0,ze.maxHeight==="none"?null:(Te=Yd(ze.maxHeight))!=null?Te:void 0)),ze}function k6(L){return b6(wz,L,Km,Zm)}function A6(L){return b6(xz,L,Vm,Gm)}function C6(L,Q){if(!L)return m8;const le=Qn.value,ae=le[String(L.type)];if(L.type==="code_block"){const be=Q??o0(L),Te=be?S9(le,be):void 0;return Te||(g.value==="pre"?le.code_block||Go:be==="mermaid"?le.mermaid||mz:be==="infographic"?le.infographic||vz:be==="d2"||be==="d2lang"?le.d2||yz:ae||le.code_block||Hk.value)}return ae||h6[String(L.type)]||m8}function M9(L){s("click",L)}function Tz(L){var Q;(Q=L.target)!=null&&Q.closest("[data-node-index]")&&s("mouseover",L)}function Lz(L){var Q;(Q=L.target)!=null&&Q.closest("[data-node-index]")&&s("mouseout",L)}function w6(L){s("mouseover",L)}function x6(L){s("mouseout",L)}const tc=G(null),Ho=G(!1),h1=G(null),Nz=F(()=>!(T.domMode!=="minimal"||Y.value||T.fade!==!1||f.value||Ho.value||as.value||an.value||Tn.value||ii.value||Sr.value||Object.keys(Qn.value).length!==0));let p1,kd=null,I9=0,r0=0,l0=0;const _6=["code_block","admonition","table","math_block","html_block","image","thematic_break"],Fz=new Set(_6),S6=[".typewriter-cursor",".height-estimation-probes",..._6.map(L=>`[data-node-type="${L}"]`),"script","style"].join(",");function M6(L){if(!L||typeof L!="object")return!1;const Q=L.type;return typeof Q=="string"&&Fz.has(Q)}function a0(L){var Q,le;if(!L||typeof L!="object")return 0;const ae=L,be=(le=(Q=ae.raw)!=null?Q:ae.content)!=null?le:ae.code;if(typeof be=="string")return be.length;const Te=ae.children;if(Array.isArray(Te))return Te.reduce((He,rt)=>He+a0(rt),0);const ze=ae.items;return Array.isArray(ze)?ze.reduce((He,rt)=>He+a0(rt),0):0}function u0(){p1&&(clearTimeout(p1),p1=void 0)}function E9(){I9+=1,kd!=null&&(Oi?.(kd),kd=null)}function g1(){E9(),za(),tc.value&&(tc.value.style.visibility="hidden")}function Bz(L){var Q;if(L.nodeType!==Node.TEXT_NODE||!((Q=L.textContent)!=null?Q:"").trim())return!1;const le=L.parentElement;return!!le&&!le.closest(S6)}function $z(L){let Q=L.lastChild;for(;Q;){if(Bz(Q))return Q;if(Q.nodeType===Node.ELEMENT_NODE){const le=Q;if(!le.matches(S6)&&le.lastChild){Q=le.lastChild;continue}}for(;Q&&Q!==L&&!Q.previousSibling;)Q=Q.parentNode;if(!Q||Q===L)break;Q=Q.previousSibling}return null}function I6(){const L=s0.value;for(let Q=L.length-1;Q>=0;Q--){const le=L[Q];if(!le||M6(le.node)||!t0(le.index))continue;const ae=Ie.get(le.index);if(!ae)continue;const be=$z(ae);if(be)return be}return null}function za(){h1.value&&(h1.value.classList.remove(uS),h1.value=null)}function c0(){if(d.value!=="simple"||!H||!Ho.value||!R.value)return void za();const L=I6(),Q=L?(function(le){var ae;const be=(ae=le.parentElement)==null?void 0:ae.closest(".text-node");return be instanceof HTMLElement?be:le.parentElement})(L):null;Q!==h1.value&&(za(),Q&&(Q.classList.add(uS),h1.value=Q))}function d0(){if(d.value!=="precise"||!H||!Ho.value||kd!=null)return;const L=I9,Q=()=>{kd=null,L===I9&&(function(){var le,ae;if(d.value!=="precise"||!(H&&Ho.value&&R.value&&tc.value))return;const be=R.value,Te=tc.value;Te.style.visibility="hidden";const ze=I6();if(!ze)return;let He=0,rt=0,We=20,Xe=!1;if(ze?.textContent){const ot=ze.textContent.length,Re=document.createRange();Re.setStart(ze,Math.max(0,ot-1)),Re.setEnd(ze,ot);const et=typeof Re.getClientRects=="function"?Re.getClientRects():void 0,ut=(ae=et?.[et.length-1])!=null?ae:(le=ze.parentElement)==null?void 0:le.getBoundingClientRect();if(ut){const at=Zt("typewriterCursor.root.getBoundingClientRect",()=>be.getBoundingClientRect());He=ut.right-at.left+be.scrollLeft,rt=ut.top-at.top+be.scrollTop,We=ut.height||We,Xe=!0}Re.detach()}Xe&&(Te.style.transform=`translate(${Math.max(0,He)}px, ${Math.max(0,rt)}px)`,Te.style.height=`${We}px`,Te.style.visibility="visible")})()};Li?kd=Li(Q):Q()}return Ge([it,()=>i.content,()=>i.nodes,()=>T.typewriter,De],()=>Si(null,null,function*(){var L,Q;if(!H||Y.value||!J.value)return;if(De.value)return Ho.value=!1,u0(),void g1();if((L=i.nodes)!=null&&L.length)return Ho.value=!1,u0(),g1(),r0=((Q=i.content)!=null?Q:"").length,void(l0=it.value.length);const le=(function(){var He,rt;return(He=i.nodes)!=null&&He.length?i.nodes.reduce((We,Xe)=>We+a0(Xe),0):((rt=i.content)!=null?rt:"").length})(),ae=(function(){var He;return(He=i.nodes)!=null&&He.length?i.nodes.reduce((rt,We)=>rt+a0(We),0):it.value.length})(),be=!M6(Tt.value[Tt.value.length-1]),Te=le>r0,ze=ae>l0;if(!f.value||!be||!Te&&!ze)return f.value&&be||(Ho.value=!1,g1()),r0=le,void(l0=ae);r0=le,l0=ae,Ho.value=!0,d.value==="precise"&&tc.value&&(tc.value.style.visibility="hidden"),u0(),yield At(),d.value==="simple"?c0():(za(),d0()),p1=setTimeout(()=>{p1=void 0,Ho.value=!1},3e3)}),{flush:"post",immediate:!0}),Ge(Ho,L=>Si(null,null,function*(){L?(yield At(),d.value!=="simple"?(za(),d.value==="precise"&&d0()):c0()):g1()}),{flush:"post"}),Ge(d,()=>Si(null,null,function*(){if(H&&!Y.value&&J.value&&Ho.value){if(yield At(),d.value==="simple")return E9(),void c0();za(),d.value!=="precise"?g1():d0()}}),{flush:"post"}),Ge([()=>mi.value,()=>Vs.start,()=>Vs.end],()=>Si(null,null,function*(){H&&!Y.value&&J.value&&Ho.value&&(yield At(),d.value!=="simple"?(za(),d.value==="precise"&&d0()):c0())}),{flush:"post"}),Gn(()=>{u0(),E9(),za(),Rn.clear()}),(L,Q)=>{const le=fO("NodeRenderer",!0);return h(Y)?(b(!0),M(Be,{key:0},yt(s0.value,ae=>(b(),M(Be,{key:ae.vnodeKey},[ae.rendersCustomNode?(b(),de(Ss(ae.component),Jn({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:M9,onMouseover:w6,onMouseout:x6,onCopy:Q[0]||(Q[0]=be=>o(be)),onHandleArtifactClick:Q[1]||(Q[1]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ae.hasSlotChildren?(b(),de(le,Jn({key:0,ref_for:!0},Bn.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(),de(le,Jn({key:1,ref_for:!0},Bn.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(),de(Ss(ae.component),Jn({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:M9,onMouseover:w6,onMouseout:x6,onCopy:Q[2]||(Q[2]=be=>o(be)),onHandleArtifactClick:Q[3]||(Q[3]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(b(),M("div",{key:1,ref_key:"containerRef",ref:R,class:$e(["markstream-vue markdown-renderer",[{dark:T.isDark},{virtualized:an.value},{"virtual-scroll-coordinated":Rt.value},{"stable-layout":ZD.value},{"typewriter-simple-cursor":Ho.value&&d.value==="simple"}]]),"data-custom-id":T.customId,onClick:M9,onMouseover:Tz,onMouseout:Lz},[ai.value||an.value?(b(),M(Be,{key:0},[ai.value?(b(),de(zme,{key:0,width:ls.value,"flow-root":an.value||Rt.value,"paragraph-node":Ei.value,"list-item-node":ro.value,"list-node":zi.value,"heading-nodes":Hs.value,"set-paragraph-wrapper":GD,"set-list-item-wrapper":QD,"set-list-wrapper":YD,"set-heading-wrapper":ez},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):te("",!0),an.value?(b(),M("div",{key:1,class:"node-spacer",style:Vt({height:`${Zv.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],64)):te("",!0),Nz.value?(b(!0),M(Be,{key:1},yt(s0.value,ae=>(b(),M(Be,{key:ae.vnodeKey},[t0(ae.index)?(b(),de(Ss(ae.component),Jn({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:Q[4]||(Q[4]=be=>s("mouseover",be)),onMouseout:Q[5]||(Q[5]=be=>s("mouseout",be)),onCopy:Q[6]||(Q[6]=be=>o(be)),onHandleArtifactClick:Q[7]||(Q[7]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):te("",!0)],64))),128)):(b(!0),M(Be,{key:2},yt(s0.value,ae=>(b(),M("div",{key:ae.vnodeKey,ref_for:!0,ref:be=>n0(ae.index,be),class:"node-slot","data-node-index":ae.index,"data-node-type":ae.node.type},[t0(ae.index)?(b(),M("div",{key:0,ref_for:!0,ref:be=>(function(Te,ze){var He;ze||(function(ot){const Re=`${Qv()}-${ot}`;let et=!1;for(const ut of Array.from(cr.keys())){const at=Cl.get(ut);(at?.index===ot||ut===Re||ut.startsWith(`${Re}-`))&&(cr.delete(ut),Cl.delete(ut),et=!0)}et&&(cd(),xi("async-node"))})(Te),Jl.delete(Te),(function(ot){var Re;const et=((Re=Vu.get(ot))!=null?Re:0)+1;Vu.set(ot,et)})(Te);const rt=Ba.get(Te);if(rt){for(const ot of rt)Kp(ot);Ba.delete(Te)}if((function(ot){const Re=Ve.get(ot);Re&&(wi?.unobserve(Re),on.delete(Re),Ve.delete(ot))})(Te),!ze||!Zi.value)return Al.delete(Te),void Vu.delete(Te);Al.set(Te,ze);const We=()=>{i0(Te,ze)};queueMicrotask(We);const Xe=(wi||typeof ResizeObserver>"u"||(wi=new ResizeObserver(ot=>{if(ot.length)for(const Re of ot){const et=on.get(Re.target),ut=Ve.get(et??-1);et!=null&&ut&&i0(et,ut)}else ea()})),wi);if(Xe&&(Ve.set(Te,ze),on.set(ze,Te),Xe.observe(ze)),typeof window<"u"){const ot=((He=Tt.value[Te])==null?void 0:He.type)==="code_block"?[16,80,240,800]:De.value?[80]:[];if(ot.length){const Re=ot.map(et=>Bk(et,We,"node-resize")).filter(et=>et!=null);Re.length&&Ba.set(Te,Re)}}})(ae.index,be),class:"node-content"},[ae.isCodeBlock?ae.rendersCustomNode?(b(),de(Ss(ae.component),Jn({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:Q[12]||(Q[12]=be=>o(be)),onHandleArtifactClick:Q[13]||(Q[13]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ae.hasSlotChildren?(b(),de(le,Jn({key:0,ref_for:!0},Bn.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(),de(le,Jn({key:1,ref_for:!0},Bn.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(),de(Ss(ae.component),Jn({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:Q[14]||(Q[14]=be=>o(be)),onHandleArtifactClick:Q[15]||(Q[15]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(b(),de(gs,{key:0,name:"fade",css:T.fade!==!1,appear:T.fade!==!1},{default:he(()=>[ae.rendersCustomNode?(b(),de(Ss(ae.component),Jn({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:Q[8]||(Q[8]=be=>o(be)),onHandleArtifactClick:Q[9]||(Q[9]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ae.hasSlotChildren?(b(),de(le,Jn({key:0,ref_for:!0},Bn.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(),de(le,Jn({key:1,ref_for:!0},Bn.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(),de(Ss(ae.component),Jn({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:Q[10]||(Q[10]=be=>o(be)),onHandleArtifactClick:Q[11]||(Q[11]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(b(),M("div",{key:1,class:"node-placeholder",style:Vt({height:`${wn(ae.index)}px`})},null,4))],8,Pme))),128)),Ho.value&&d.value==="precise"?(b(),M("span",{key:3,ref_key:"typewriterCursorRef",ref:tc,class:"typewriter-cursor","aria-hidden":"true"},null,512)):te("",!0),an.value?(b(),M("div",{key:4,class:"node-spacer",style:Vt({height:`${Gv.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],42,Ome))}}})),[["__scopeId","data-v-a9489508"]]),ir=HB;ir.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",ir.__name,ir.name].filter(n=>!!n));for(const n of t)e.component(n,HB)};const Ub=Object.freeze(Object.defineProperty({__proto__:null,default:ir},Symbol.toStringTag,{value:"Module"})),jme={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"},Hme={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"},Wme={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"},qme={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"},Ume={class:"admonition-title"},Kme=["aria-expanded","aria-controls"],Vme=["id"],Wg=ri(nt({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const i=e,s=t,o=F(()=>{if(i.node.title&&i.node.title.trim().length)return i.node.title;const u=i.node.kind||"note";return u.charAt(0).toUpperCase()+u.slice(1)}),r=G(!!i.node.collapsible&&!((n=i.node.open)==null||n));function l(){i.node.collapsible&&(r.value=!r.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(u,c)=>(b(),M("div",{class:$e(["admonition",[`admonition-${i.node.kind}`]])},[C("div",{id:a,class:"admonition-legend"},[i.node.kind==="note"||i.node.kind==="info"?(b(),M("svg",jme,[...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)])])):i.node.kind==="tip"?(b(),M("svg",Hme,[...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)])])):i.node.kind==="warning"||i.node.kind==="caution"?(b(),M("svg",Wme,[...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)])])):i.node.kind==="danger"||i.node.kind==="error"?(b(),M("svg",qme,[...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",Ume,B(o.value),1),i.node.collapsible?(b(),M("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(b(),M("svg",{style:Vt({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,Kme)):te("",!0)]),Nn(C("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[V(h(ir),{"index-key":`admonition-${e.indexKey}`,nodes:i.node.children,"custom-id":i.customId,typewriter:i.typewriter,fade:i.fade,onCopy:c[0]||(c[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,Vme),[[is,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);Wg.install=e=>{e.component(Wg.__name,Wg)};const A8=()=>Ji(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let tg=null,ng=A8,ig=null,cS=!1,dS=!1;function pYe(){return Si(this,null,function*(){if(tg)return tg;const e=ng;return e?e===A8&&cS?null:ig||(ig=Si(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===A8)return e===ng&&(cS=!0,(function(i){dS||(dS=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',i))})(n)),null;throw n}finally{e===ng&&(ig=null)}return e!==ng?null:t?(tg=(function(n){var i;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=(i=n.default)!=null?i:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),tg):null}),ig):null})}let sg=null,WB=null,og=null;function gYe(){return typeof WB=="function"}function mYe(){return Si(this,null,function*(){if(sg)return sg;const e=WB;return e?og||(og=Si(null,null,function*(){const t=yield e(),n=(function(i){var s,o,r;if(!i)return null;const l=(s=i.default)!=null?s:i,a=typeof l=="function"&&typeof((o=l.prototype)==null?void 0:o.render)=="function"?l:(r=i.Infographic)!=null?r:l?.Infographic;return typeof a=="function"?a:null})(t);return n?(sg=n,sg):null}).finally(()=>{og=null}),og):null})}const vYe=Symbol("markstreamLanguageIconResolver"),qB=["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"],Zme=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),C8=[...qB].sort((e,t)=>t.length-e.length).join("|"),s4=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${C8}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${C8})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?,。;!?)])`].join(""),"gi"),UB=/[),.;!?,。;!?)]+$/;function Gme(e){const t=e.toLowerCase();return qB.some(n=>t.endsWith(`.${n}`))}function Qme(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${C8}))["']`,"gi");let i;for(;(i=n.exec(e))!==null;){const s=i[1];if(!s)continue;const o=s.split("/").pop();o&&t.set(o,s)}return t}function Yme(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const i=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!i)return null;let s=(i[1]??"").replace(UB,"");if(!s)return null;const o=s.split("/").pop()??s,r=s.includes("/"),l=Zme.has(o),a=Gme(o);if(r&&!l&&!a)return null;if(!r&&!l){const d=t.aliases?.get(o);if(!d)return null;s=d}const u=i[2]??i[3],c=u?Number(u):void 0;return{path:s,line:c!==void 0&&Number.isFinite(c)&&c>0?c:void 0}}function Jme(e,t={}){const n=[];s4.lastIndex=0;let i;for(;(i=s4.exec(e))!==null;){const s=i[0]??"",o=i[1]??"",r=s.indexOf(o);if(r<0)continue;const l=i[2]??i[3];let a=o+(l?s.slice(r+o.length):"");const u=a.replace(UB,""),c=a.length-u.length;a=u;const d=Yme(a,t);if(!d)continue;const f=i.index+r,p=f+a.length;n.push({...d,start:f,end:p,text:a}),c>0&&(s4.lastIndex-=c)}return n}function rg(e,t){let n=0,i=t-1;for(;i>=0&&e[i]==="\\";)n++,i--;return n%2===1}const Xme=/\s/,e2e=/\p{Nd}/u;function Qc(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function t2e(e,t){if(t<=0)return;const n=e.charCodeAt(t-1),i=n>=56320&&n<=57343&&t>1?t-2:t-1,s=e.codePointAt(i);return s===void 0?void 0:String.fromCodePoint(s)}function fS(e){return e!==void 0&&Xme.test(e)}function Ff(e){return e!==void 0&&e2e.test(e)}function n2e(e,t){const n=e[t+1];return Ff(Qc(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−"||n==="+"||n==="-")&&Ff(Qc(e,t+2))}function s2(e){return e!==void 0&&e>="A"&&e<="Z"}const KB=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 i2e(e,t){if(!s2(e[t-1]))return!1;let n=t-1;for(;n>0&&s2(e[n-1]);)n--;return KB.test(e.slice(n,t))||Ff(Qc(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(Qc(e,t+1)??"")}function s2e(e,t){if(!s2(e[t-1]))return!1;let n=t-1;for(;n>0&&s2(e[n-1]);)n--;return KB.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}const o2e=/^[-–—,,、;;::~~(([【//]$/;function r2e(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!Ff(Qc(e,t+2)))return!1;const i=e[t-1];return i!==void 0&&o2e.test(i)}function l2e(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 i=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${i}(?:\p{L}+)?(?:(?:${t})+${i}(?:\p{L}+)?)*$`,"u").test(n)}const Ml=-1,hS=1,pS=2,gS=3;function a2e(e){const t=e.length,n=new Uint8Array(t),i=new Int32Array(t+1).fill(Ml),s=new Int32Array(t+1),o=new Int32Array(t+1),r=[],l=[];{const z=[];for(let Z=0;Z<t;Z++)if(e[Z]==="`"){if(rg(e,Z))continue;let ne=Z+1;for(;ne<t&&e[ne]==="`";)ne++;z.push([Z,ne]),Z=ne-1}const K=new Map;for(let Z=0;Z<z.length;Z++){const ne=z[Z][1]-z[Z][0],X=K.get(ne);X?X.push(Z):K.set(ne,[Z])}const q=new Map;let W=0;for(;W<z.length;){const[Z,ne]=z[W],X=ne-Z,ue=K.get(X);let ie=q.get(X)??0;for(;ie<ue.length&&ue[ie]<=W;)ie++;q.set(X,ie),ie<ue.length?(l.push([Z,z[ue[ie]][1]]),W=ue[ie]+1):W++}}let a=0;const u=z=>{for(;a<l.length&&z>=(l[a]?.[1]??0);)a++;const K=l[a];return K!==void 0&&z>=K[0]},c=new Set(' \n\r)。,、;:!?"<>`「」『』【】〔〕()*—–“”‘’'),d=[];for(const z of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))d.push(z.index);for(const z of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))d.push(z.index);for(const z of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(z.index===0||!/[\w~/.-]/.test(e[z.index-1]))&&d.push(z.index);d.sort((z,K)=>z-K);let f=-1;for(const z of d){if(z<f)continue;let K=z,q=0,W=0,Z=0;for(;K<t;){const ne=e[K];if(ne==="(")q++;else if(ne===")"){if(q===0)break;q--}else if(ne==="[")W++;else if(ne==="]"){if(W===0)break;W--}else if(ne==="{")Z++;else if(ne==="}"){if(Z===0)break;Z--}else{if(c.has(ne))break;if((ne===","||ne===";"||ne==="!"||ne==="?")&&!/[A-Za-z0-9$]/.test(e[K+1]??""))break;if(ne===":"&&W===0&&K>z+7&&!/[\w/?#@~.+&=%-]/.test(e[K+1]??""))break}K++}r.push([z,K]),f=K}const p=[];for(let z=0;z<t;z++){if(e[z]!=="<"||e[z+1]===void 0||!/[a-zA-Z/]/.test(e[z+1]))continue;let K=z+1;const q=e[K]==="/";q&&K++;const W=/^[a-zA-Z][a-zA-Z0-9-]*/.exec(e.slice(K));if(!W)continue;K+=W[0].length;const Z=e[K];if(Z===void 0||!/[\s/>]/.test(Z))continue;let ne=K,X=Ml,ue=Ml;for(;ne<t;){const ie=e[ne];if(ie===">"){ue=ne;break}if(!q&&ie==="/"&&e[ne+1]===">"){ue=ne+1;break}if(!/\s/.test(ie)){X=ne;break}for(;ne<t&&/\s/.test(e[ne]);)ne++;const Se=e[ne];if(Se===void 0)break;if(Se===">"){ue=ne;break}if(q){X=ne;break}if(Se==="/"&&e[ne+1]===">"){ue=ne+1;break}const fe=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(ne));if(!fe){X=ne;break}ne+=fe[0].length;let pe=ne;for(;pe<t&&/\s/.test(e[pe]);)pe++;if(e[pe]==="="){for(pe++;pe<t&&/\s/.test(e[pe]);)pe++;const Ne=e[pe];if(Ne==='"'||Ne==="'"){const ee=e.indexOf(Ne,pe+1);if(ee===-1){X=pe;break}ne=ee+1}else{const ee=/^[^\s"'=<>`]+/.exec(e.slice(pe));if(!ee){X=pe;break}ne=pe+ee[0].length}}}if(ue!==Ml)p.push([z,ue+1]),z=ue;else if(X!==Ml){const ie=e.indexOf("<",z+1);z=(ie!==-1&&ie<X?ie:X)-1}else break}let g=!0,m=!0,y=!0,w=!0;for(let z=0;z<t;z++){if(e[z]!=="<")continue;const K=e[z+1];let q=!1;if(K==="?"&&m){const X=e.indexOf("?>",z+2);X===-1?m=!1:(p.push([z,X+2]),z=X+1,q=!0)}else if(K==="!"){if(e[z+2]==="-"&&e[z+3]==="-"){if(g){const X=e.indexOf("-->",z+4);X===-1?g=!1:(p.push([z,X+3]),z=X+2,q=!0)}}else if(e.startsWith("[CDATA[",z+2)){if(y){const X=e.indexOf("]]>",z+9);X===-1?y=!1:(p.push([z,X+3]),z=X+2,q=!0)}}else if(w&&/[A-Z]/.test(e[z+2]??"")){const X=e.indexOf(">",z+3);X===-1?w=!1:(p.push([z,X+1]),z=X,q=!0)}}if(q)continue;if(K!==void 0&&/[a-zA-Z]/.test(K)){const X=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(z+1));if(X){let ue=z+1+X[0].length;for(;ue<t&&e[ue]!==">"&&e[ue]!=="<"&&!/\s/.test(e[ue]);)ue++;if(e[ue]===">"){p.push([z,ue+1]),z=ue;continue}}}if(K===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(K))continue;let W=z+1;for(;W<t&&/[\w.!#$%&'*+/=?^`{|}~-]/.test(e[W]);)W++;if(e[W]!=="@")continue;W++;const Z=/^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?/;let ne=Z.exec(e.slice(W));if(ne){for(W+=ne[0].length;e[W]==="."&&(ne=Z.exec(e.slice(W+1)),!!ne);)W+=1+ne[0].length;e[W]===">"&&(p.push([z,W+1]),z=W)}}p.sort((z,K)=>z[0]-K[0]);const k=[];for(const[z,K]of p){const q=k[k.length-1];q&&z<=q[1]?q[1]=Math.max(q[1],K):k.push([z,K])}r.push(...k);let A=0;const v=z=>{for(;A<k.length&&z>=(k[A]?.[1]??0);)A++;const K=k[A];return K!==void 0&&z>=K[0]},x=[];let S=null,I=0,_=!1;for(let z=0;z<t;z++)if(e[z]==="\\")z++;else if(_)e[z]===">"&&(_=!1);else if(!(u(z)||v(z))){if(S!==null)e[z]===S&&(S=null);else if(x.length>0&&(e[z]==='"'||e[z]==="'")&&z>0&&/\s/.test(e[z-1]))S=e[z];else if(e[z]==="[")I++;else if(e[z]==="]")I>0&&e[z+1]==="("&&(x.push(z),_=e[z+2]==="<",z++),I=Math.max(0,I-1);else if(e[z]==="("&&x.length>0)x.push(-1);else if(e[z]===")"&&x.length>0){const K=x.pop();if(K!==void 0&&K>=0){const q=e.slice(K+2,z);(/\s/.exec(q)===null||q.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(q)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(q))&&r.push([K,z+1])}}}r.sort((z,K)=>z[0]-K[0]);const E=[];for(const[z,K]of r){const q=E[E.length-1];q&&z<=q[1]?q[1]=Math.max(q[1],K):E.push([z,K])}const N=z=>{let K=0,q=E.length-1;for(;K<=q;){const W=K+q>>1,Z=E[W];if(Z===void 0)return!1;if(z<Z[0])q=W-1;else if(z>=Z[1])K=W+1;else return!0}return!1},D=new Uint8Array(t);{let z=-1,K=!1,q=!1,W=0;for(let Z=0;Z<=t;Z++){const ne=Z<t&&e[Z]==="`";if(Z===t||ne){if(ne&&z!==-1&&q&&!K&&W===0)for(let ue=z+1;ue<Z;ue++)D[ue]=1;z=Z,K=!1,q=!1,W=0;continue}if(z===-1)continue;const X=e[Z];X==="$"?rg(e,Z)||(e[Z+1]==="{"?(q=!0,W++,Z++):W===0&&(K=!0)):W>0&&(X==="{"?W++:X==="}"&&W--)}}for(let z=0;z<t;z++)o[z+1]=(o[z]??0)+(e[z]==="`"&&!rg(e,z)?1:0),e[z]==="$"&&(rg(e,z)||N(z)||D[z]===1?n[z]=hS:fS(e[z-1])||Ff(Qc(e,z+1))||r2e(e,z)?n[z]=pS:n[z]=gS),s[z+1]=(s[z]??0)+(n[z]===pS?1:0);let T=Ml;for(let z=t-1;z>=0;z--)n[z]===gS&&(T=z),i[z]=T;const $=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,O=/[^\p{L}\p{Nd}\s]$/u,P=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,R=/(?:^|\s)[a-z]{2,}/,j=(z,K)=>{const q=Qc(e,z+1);if(q===void 0||!$.test(q))return!1;const W=i[z+1]??Ml;if(W!==Ml){const Z=e.slice(z+1,W);return!(Z.length===((Z.codePointAt(0)??0)>65535?2:1))&&P.test(Z)||/[,;:!?]$/.test(Z)||/^[a-z]{2,}$/.test(Z)?!1:(s[W]??0)-(s[z+1]??0)===0&&(o[W]??0)-(o[z+1]??0)===0}return O.test(K)||P.test(K)||R.test(K)};return(z,K=-1)=>{if(e[z]!=="$"||n[z]===hS||e[z+1]==="$"||e[z-1]==="$"&&K!==z||i2e(e,z)||z+1>=t||fS(e[z+1]))return null;const q=i[z+1]??Ml;if(q===Ml||(s[q]??0)-(s[z+1]??0)>0||(o[q]??0)-(o[z+1]??0)>0)return null;const W=e.slice(z+1,q);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(W)||e[q+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(W)||Ff(t2e(e,z))&&l2e(W)||n2e(e,z)&&(j(q,W)||s2e(e,q)||/\s/.test(W)&&/\p{Nd}$/u.test(W)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(W)||e[q+1]==="$"&&!/\p{L}/u.test(W)&&/[^\p{L}\p{Nd}\s]$/u.test(W))?null:{content:W,end:q+1}}}const mS=new WeakMap;function u2e(e,t){if(e.src[e.pos]!=="$")return!1;let n=mS.get(e);(!n||n.src!==e.src)&&(n={src:e.src,match:a2e(e.src),lastEnd:-1},mS.set(e,n));const i=n.match(e.pos,n.lastEnd);if(!i||i.end>e.posMax)return!1;if(n.lastEnd=i.end,t)return e.pos=i.end,!0;const s=e.push("math_inline","math",0);return s.content=i.content,s.markup="$",s.raw=e.src.slice(e.pos,i.end),s.loading=!1,e.pos=i.end,!0}function c2e(e){return e.inline.ruler.disable("math"),e.inline.ruler.before("escape","math",u2e),e}const d2e=12e4,f2e=6e4,h2e=32,p2e=3e4,vS=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function g2e(e){let t=0,n=0,i=0;vS.lastIndex=0;let s;for(;(s=vS.exec(e))!==null;){const r=s[3]??"";t+=1,n+=r.length,i=Math.max(i,r.length)}return{codeRenderer:e.length>=d2e||n>=f2e||t>=h2e||i>=p2e?"pre":"shiki",codeFenceCount:t,codeChars:n}}async function VB(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 v2e(e)}function m2e(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||VB(e)}function v2e(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 ZB="md-table-wide",GB="md-table-toggle",QB="md-table-fade",yS="md-table-toggle--show",y2e="md-table-at-end",b2e="kimi-table-layout",YB='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>',k2e='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" y1="10" x2="21" y2="3"/><line x1="3" y1="21" x2="10" y2="14"/></svg>';function Tp(e){return e.querySelector(`button.${GB}`)}function JB(e){return e.querySelector(`.${QB}`)}const A2e=26;function C2e(e){const t=Tp(e);if(!t)return;const n=e.querySelector("thead tr")??e.querySelector("tr");if(!n)return;const i=n.getBoundingClientRect(),s=e.getBoundingClientRect().top,o=Math.max(2,Math.round(i.top-s+(i.height-A2e)/2));t.style.top=`${o}px`,t.style.right=`${o}px`}function w2e(e){return e.closest(".a-msg .msg")!==null}function x2e(e){const t=e.querySelector("table");return t!==null&&t.scrollWidth>e.clientWidth+1}function XB(e){const t=`translateX(${e.scrollLeft}px)`,n=JB(e);n&&(n.style.transform=t);const i=Tp(e);i&&(i.style.transform=t);const s=e.scrollLeft+e.clientWidth>=e.scrollWidth-2;e.classList.toggle(y2e,s)}function _2e(e,t){const n=Tp(e);if(n)return n;if(!w2e(e))return null;const i=document.createElement("div");i.className=QB,i.setAttribute("aria-hidden","true");const s=document.createElement("button");return s.type="button",s.className=GB,s.innerHTML=YB,s.setAttribute("aria-label",t.widen),s.title=t.widen,s.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),S2e(e,t)}),e.appendChild(i),e.appendChild(s),e.addEventListener("scroll",()=>XB(e),{passive:!0}),Kb(e),s}function S2e(e,t){const n=e.classList.toggle(ZB),i=Tp(e);if(i){i.innerHTML=n?k2e:YB;const s=n?t.restore:t.widen;i.setAttribute("aria-label",s),i.title=s}Kb(e),e.dispatchEvent(new CustomEvent(b2e,{bubbles:!0}))}function Kb(e){const t=Tp(e);if(!t)return;const n=x2e(e),i=e.classList.contains(ZB);t.classList.toggle(yS,n||i);const s=JB(e);s&&s.classList.toggle(yS,n),C2e(e),XB(e)}function M2e(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function I2e(e){return new Worker("/assets/mermaidParser.worker-BFSlSHEW.js",{type:"module",name:e?.name})}const E2e={key:1,class:"diff-wrap"},T2e={class:"diff-bar"},L2e=["aria-label","onClick"],N2e={class:"diff-pre"},F2e={key:0,class:"diff-sign"},B2e={class:"diff-text"},$2e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bS="github-light",kS="github-dark",D2e=nt({__name:"Markdown",props:{text:{},openFile:{},streaming:{type:Boolean,default:!1}},setup(e){wpe(),Dpe(),_pe(),Ope(),xpe(new M2e),Rpe(new I2e);const{t}=Pf(),n=un("resolveImage"),i=G(null),s=e,o=F(()=>!s.streaming),r=F(()=>Qme(s.text??"")),l=F(()=>s.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:g2e(s.text??"")),a=ov(),u=F(()=>!s.streaming),c=Es(new Map),d=new Set,f=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,p=/(<img\b[^>]*?\bsrc=")([^"]+)(")/gi;function g(j){return!/^(https?:|data:|blob:)/i.test(j)}function m(j){if(!n)return;const z=[];for(const K of[f,p]){K.lastIndex=0;let q;for(;(q=K.exec(j))!==null;)z.push(q[2]??"")}for(const K of z)!K||!g(K)||c.has(K)||d.has(K)||(d.add(K),n(K).then(q=>{c.set(K,q!==K?q:"")}).catch(()=>{c.set(K,"")}).finally(()=>{d.delete(K)}))}function y(j){if(!n)return j;const z=K=>{if(!g(K))return null;const q=c.get(K);return q===void 0?$2e:q===""?null:q};return j.replace(f,(K,q,W,Z)=>{const ne=z(W);return ne===null?K:`${q}${ne}${Z}`}).replace(p,(K,q,W,Z)=>{const ne=z(W);return ne===null?K:`${q}${ne}${Z}`})}Ge(()=>s.text,j=>m(j??""),{immediate:!0});function w(){if(!i.value||!s.openFile||s.streaming)return;const j=document.createTreeWalker(i.value,NodeFilter.SHOW_TEXT),z=[];let K=j.nextNode();for(;K;){const q=K,W=q.parentElement;W&&!W.closest("a, pre, .md-file-link, svg")&&q.data.trim().length>0&&z.push(q),K=j.nextNode()}for(const q of z){const W=Jme(q.data,{aliases:r.value});if(W.length===0||!q.parentNode)continue;const Z=document.createDocumentFragment();let ne=0;for(const X of W){X.start>ne&&Z.append(document.createTextNode(q.data.slice(ne,X.start)));const ue=document.createElement("button");ue.type="button",ue.className="md-file-link",ue.textContent=X.text,ue.title=X.line?`${X.path}:${X.line}`:X.path,ue.addEventListener("click",ie=>{ie.preventDefault(),ie.stopPropagation(),s.openFile?.({path:X.path,line:X.line})}),Z.append(ue),ne=X.end}ne<q.data.length&&Z.append(document.createTextNode(q.data.slice(ne))),q.parentNode.replaceChild(Z,q)}}function k(j){return!(!j||/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(j))}function A(j){let z=j.length;for(const K of["#","?"]){const q=j.indexOf(K);q!==-1&&q<z&&(z=q)}return j.slice(0,z)}function v(){if(!i.value||!s.openFile||s.streaming)return;const j=i.value.querySelectorAll("a[href]");for(const z of j){if(z.dataset.mdLinkHandled==="true"||z.closest("svg"))continue;const K=z.getAttribute("href")??"";k(K)&&(z.dataset.mdLinkHandled="true",z.addEventListener("click",q=>{q.preventDefault(),q.stopPropagation(),s.openFile?.({path:A(K)})}))}}function x(){return{widen:t("conversation.widenTable"),restore:t("conversation.restoreTableWidth")}}function S(){if(!i.value||s.streaming)return;const j=x();for(const z of i.value.querySelectorAll(".table-node-wrapper"))_2e(z,j)}function I(){if(!(!i.value||s.streaming))for(const j of i.value.querySelectorAll(".table-node-wrapper"))Kb(j)}function _(){At().then(()=>{w(),v(),S()})}Ge(()=>s.text,_),Ge(()=>s.streaming,_);let E=null,N=null;gn(()=>{_(),i.value&&(E=new MutationObserver(_),E.observe(i.value,{childList:!0,subtree:!0}),N=new ResizeObserver(I),N.observe(i.value))}),Cn(()=>{E?.disconnect(),N?.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,$=F(()=>{const j=y(s.text??""),z=[];let K=0;T.lastIndex=0;let q;for(;(q=T.exec(j))!==null;){const Z=q[1]??"",ne=j.slice(K,q.index)+(Z||"");ne.trim()&&z.push({kind:"md",text:ne}),z.push({kind:"diff",code:q[2]??""}),K=T.lastIndex}const W=j.slice(K);return(W.trim()||z.length===0)&&z.push({kind:"md",text:W}),z});function O(j){return j.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 P=G(null);function R(j,z){VB(j).then(K=>{K&&(P.value=z,setTimeout(()=>{P.value=null},1400))})}return(j,z)=>(b(),M("div",{ref_key:"mdRef",ref:i,class:"md"},[(b(!0),M(Be,null,yt($.value,(K,q)=>(b(),M(Be,{key:q},[K.kind==="md"?(b(),de(h(ir),{key:0,content:K.text,"custom-markdown-it":h(c2e),mode:"chat","code-renderer":l.value.codeRenderer,"is-dark":h(a),"code-block-light-theme":bS,"code-block-dark-theme":kS,themes:[bS,kS],"code-block-props":D,final:o.value,"smooth-streaming":e.streaming,"batch-rendering":u.value,"defer-nodes-until-visible":!1,onCopy:h(m2e)},null,8,["content","custom-markdown-it","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(b(),M("div",E2e,[C("div",T2e,[z[0]||(z[0]=C("span",{class:"diff-lang"},"diff",-1)),V(h(mn),{text:h(t)("filePreview.copyCode")},{default:he(()=>[C("button",{class:"diff-copy","aria-label":h(t)("filePreview.copyCode"),onClick:W=>R(K.code,q)},[V(h(Ce),{name:P.value===q?"check":"copy",size:"sm"},null,8,["name"])],8,L2e)]),_:2},1032,["text"])]),C("pre",N2e,[C("code",null,[(b(!0),M(Be,null,yt(O(K.code),(W,Z)=>(b(),M("span",{key:Z,class:$e(["diff-line",`diff-${W.type}`])},[W.type!=="hunk"?(b(),M("span",F2e,B(W.sign),1)):te("",!0),C("span",B2e,B(W.text),1)],2))),128))])])]))],64))),128))],512))}}),ql=vt(D2e,[["__scopeId","data-v-2a3e373d"]]),z2e=640,R2e=`(max-width: ${z2e}px)`;function O2e(){const e=G(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(R2e);e.value=t.matches;const n=i=>{e.value=i.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),Cn(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),Cn(()=>t.removeListener(n))),e}const e$=G(typeof window>"u"?0:window.innerWidth);let lg=0,o2=!1;function w8(){e$.value=window.innerWidth}function P2e(){o2||typeof window>"u"||(window.addEventListener("resize",w8),o2=!0,w8())}function j2e(){!o2||typeof window>"u"||(window.removeEventListener("resize",w8),o2=!1)}function t$(e,t,n){return Math.max(t,e-n)}function x8(e,t,n){return Math.min(n,Math.max(t,e))}function n$(){return gn(()=>{lg+=1,P2e()}),Gn(()=>{lg=Math.max(0,lg-1),lg===0&&j2e()}),{viewportWidth:e$}}const H2e=24;function W2e(e){const t=G(null),n=G(!0);let i=null,s=null,o=null,r=0,l=0,a=!1,u=0;function c(){const y=t.value;y&&(y.scrollTop=Math.max(y.scrollTop,r))}function d(){const w=t.value?.firstElementChild??null;w!==o&&(o&&i?.unobserve(o),o=w,w&&i?.observe(w))}function f(){const y=t.value;!y||a||(n.value=r-y.scrollTop-l<H2e)}function p(y){y!==u||!a||(a=!1,f())}function g(){n.value=!1,a=!0;const y=++u;if(typeof requestAnimationFrame!="function"){queueMicrotask(()=>p(y));return}requestAnimationFrame(()=>{requestAnimationFrame(()=>p(y))})}function m(){const y=t.value;y&&(i?.disconnect(),s?.disconnect(),o=null,a=!1,u++,r=0,l=0,typeof ResizeObserver=="function"?(i=new ResizeObserver(()=>{const w=t.value;if(!w)return;const{scrollHeight:k,clientHeight:A}=w,v=k>r+1,x=A<l-1;if(r=k,l=A,a){p(u);return}n.value&&(v||x)&&c()}),i.observe(y),d()):(r=y.scrollHeight,l=y.clientHeight,c()),typeof MutationObserver=="function"&&(s=new MutationObserver(d),s.observe(y,{childList:!0})))}return Ge(e,()=>{n.value=!0,At(m)}),Ge(t,()=>void At(m)),gn(()=>void At(m)),Cn(()=>{u++,i?.disconnect(),s?.disconnect()}),{scroller:t,following:n,onScroll:f,pinScroll:g}}function q2e(e){try{const t=oo(e);if(t===null)return null;const n=Number(t);return Number.isFinite(n)?n:null}catch{return null}}function AS(e,t){try{Ls(e,String(t))}catch{}}function U2e(e){const{storageKey:t,defaultWidth:n,min:i,max:s,reverse:o=!1,axis:r="x",applyLive:l}=e;function a(D){return Number.isFinite(D)?Math.min(gg(s),Math.max(i,Math.round(D))):n}const u=G(a(q2e(t)??n)),c=G(!1);function d(D){const T=D<=i,$=D>=gg(s),O=r==="x"?"col-resize":"row-resize";if(T&&$)return O;const[P,R]=r==="x"?["e-resize","w-resize"]:["s-resize","n-resize"];return $?o?P:R:T?o?R:P:O}const f=G(null),p=F(()=>d(f.value??u.value));function g(D){typeof document>"u"||(document.body.style.cursor=d(D))}function m(D){const T=a(D);u.value=T,AS(t,T)}Ge(()=>gg(s),D=>{!c.value&&u.value>D&&m(D)});let y=0,w=0,k=null,A=-1,v=0,x=0,S=0;function I(){if(x=0,!c.value)return;const D=v-y;S=a(w+(o?-D:D)),f.value=S,g(S),l?l(S):u.value=S}function _(D){if(c.value&&(v=r==="x"?D.clientX:D.clientY,x===0)){if(typeof requestAnimationFrame!="function"){I();return}x=requestAnimationFrame(I)}}function E(){if(c.value){if(x!==0&&(cancelAnimationFrame(x),I()),c.value=!1,l?m(S):AS(t,u.value),f.value=null,typeof document<"u"&&(document.body.style.userSelect="",document.body.style.cursor=""),k){try{k.releasePointerCapture(A)}catch{}k.removeEventListener("pointermove",_),k.removeEventListener("pointerup",E),k.removeEventListener("pointercancel",E)}k=null,A=-1}}function N(D){D.preventDefault(),c.value=!0,y=r==="x"?D.clientX:D.clientY,w=a(u.value),S=w,k=D.currentTarget,A=D.pointerId,typeof document<"u"&&(document.body.style.userSelect="none"),g(w);try{k.setPointerCapture(A)}catch{}k.addEventListener("pointermove",_),k.addEventListener("pointerup",E),k.addEventListener("pointercancel",E)}return Gn(E),{width:u,dragging:c,cursor:p,clamp:a,setWidth:m,onPointerDown:N}}const il=G(null),yf=G(!1),K2e=F(()=>il.value!==null);function Vb(e){const t=il.value;!t||yf.value||(il.value=null,t.resolve(e))}async function V2e(){const e=il.value;if(!(!e||yf.value)){if(!e.action){Vb(!0);return}yf.value=!0;try{await e.action(),il.value===e&&(il.value=null),e.resolve(!0)}catch(t){il.value===e&&(il.value=null),e.reject(t)}finally{yf.value=!1}}}function Z2e(e){return yf.value?Promise.resolve(!1):(il.value&&Vb(!1),new Promise((t,n)=>{il.value={...e,resolve:t,reject:n}}))}function ju(){return{current:il,busy:yf,isConfirmOpen:K2e,confirm:Z2e,settle:Vb,runAction:V2e}}function G2e(e){const{sessionId:t}=e;function n(a){return oo(ZC(a))??""}function i(a,u){const c=ZC(a);u?Ls(c,u):sr(c)}const s=G(n(t())),o=G(null);Ge(s,a=>{i(t(),a)}),Ge(t,(a,u)=>{a!==u&&(i(u,s.value),s.value=n(a))});function r(a){s.value=a,At(()=>{const u=o.value;if(!u)return;u.focus();const c=a.length;u.setSelectionRange(c,c)})}function l(){i(t(),"")}return{text:s,editorRef:o,loadForEdit:r,clearDraft:l}}function Q2e(e){return e?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable===!0:!1}function Y2e(e){const{sessionId:t,mobile:n,starting:i,dockedComposer:s,emptyComposer:o}=e,r=G(!1);Ge(t,()=>{n()||(r.value=!0)}),Ge([r,s,o,i],()=>{if(!r.value)return;const l=s.value??o.value;if(!l)return;const a=typeof document<"u"?document.activeElement:null;if(Q2e(a)){r.value=!1;return}l.focus(),(typeof document>"u"||document.activeElement!==a)&&(r.value=!1)},{flush:"post"})}const r2=100;function J2e(e){const t=sd(cn.inputHistory);if(Array.isArray(t)){const n=t.filter(o=>typeof o=="string"&&o.length>0);if(!e||n.length===0)return{};const i=n.length>r2?n.slice(-r2):n,s={[e]:i};return Ou(cn.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function X2e(e){const{text:t,editorRef:n,sessionId:i}=e,s=G(J2e(i())),o=F(()=>s.value[i()??""]??[]);let r=-1,l="";function a(y){const w=i();if(r=-1,!w)return;const k=y.trim();if(!k)return;const A=s.value[w]??[];if(A.at(-1)===k)return;const v=[...A,k],x=v.length>r2?v.slice(-r2):v;s.value={...s.value,[w]:x},Ou(cn.inputHistory,s.value)}function u(){const y=n.value;return y?(y.selectionStart??0)===0:!1}function c(y){t.value=y,At(()=>{const w=n.value;if(!w)return;const k=y.length;w.setSelectionRange(k,k)})}function d(){const y=o.value;if(y.length!==0){if(r===-1)l=t.value,r=y.length-1;else if(r>0)r-=1;else return;c(y[r])}}function f(){if(r===-1)return;const y=o.value;r<y.length-1?(r+=1,c(y[r])):(r=-1,c(l))}function p(){r=-1}function g(){return r!==-1}function m(){return o.value.length>0}return Ge(i,()=>{r=-1}),{push:a,caretAtTextStart:u,recallOlder:d,recallNewer:f,resetBrowsing:p,isBrowsing:g,hasHistory:m}}function eve(e){const{text:t,editorRef:n,skills:i,emitCommand:s,historyPush:o,clearDraft:r,resolveDesc:l}=e,a=G(!1),u=G([]),c=G([]),d=G(0);function f(){const g=t.value;if(/^\/\S*$/.test(g)){const m=Tie(g,LL(i()),l);u.value=m.map(y=>y.item),c.value=m.map(y=>y.ranges),d.value=0,a.value=!0}else a.value=!1}function p(g){if(a.value=!1,g.acceptsInput){t.value=`${g.name} `,At(()=>{const m=n.value;if(!m)return;const y=t.value.length;m.setSelectionRange(y,y),m.focus()});return}t.value="",r?.(),o(g.name),s(g.name)}return{open:a,items:u,ranges:c,active:d,update:f,select:p}}function tve(e){const{text:t,editorRef:n,searchFiles:i}=e,s=G(!1),o=G([]),r=G(0),l=G(!1);let a=null;function u(){const p=t.value,g=n.value?.selectionStart??p.length;let m=g-1;for(;m>=0&&!/\s/.test(p[m]);)m--;m++;const y=p.slice(m,g);return y.startsWith("@")?{token:y.slice(1),start:m,end:g}:null}function c(){const p=u(),g=i();if(a!==null&&clearTimeout(a),!p||!g||p.token.length===0){s.value=!1,l.value=!1;return}const m=p.token;a=setTimeout(async()=>{l.value=!0,s.value=!0,r.value=0;const y=()=>{const w=u();return w!==null&&w.token===m&&s.value};try{const w=await g(m);y()&&(o.value=w)}catch{y()&&(o.value=[])}finally{y()&&(l.value=!1)}},200)}function d(){a!==null&&(clearTimeout(a),a=null),s.value=!1,l.value=!1}function f(p){const g=u();if(!g)return;const m=t.value;t.value=m.slice(0,g.start)+p.path+m.slice(g.end),s.value=!1,At(()=>{const y=n.value;if(!y)return;const w=g.start+p.path.length;y.setSelectionRange(w,w),y.focus()})}return{open:s,items:o,active:r,loading:l,update:c,close:d,select:f}}const nve="kimi-web.file-preview-width",jd=320;function ive({client:e,sideWidth:t,detailTarget:n,closeFilePreview:i}){const{viewportWidth:s}=n$(),o=F(()=>Math.max(0,s.value-t.value)),r=F(()=>t$(o.value,jd,jd));function l(re){return x8(Math.round(re),jd,r.value)}function a(){return l(o.value/2)}const u=F(()=>a()),c=G(u.value),d=F(()=>x8(c.value,jd,r.value)),f=G(null),p=F(()=>{const re=f.value;if(!re)return null;const se=e.turns.value.find(U=>U.id===re.turnId);return se?.role==="compaction"&&se.text?se.text:null}),g=F(()=>p.value!==null);function m(re){if(f.value?.turnId===re.turnId){f.value=null,n.value==="compaction"&&(n.value=null);return}n.value="compaction",f.value=re}function y(){f.value=null,n.value==="compaction"&&(n.value=null)}const w=G(null),k=F(()=>{const re=w.value;if(!re)return{entry:void 0,version:0};const se=e.auxiliaryTranscripts.getEntry(re.sessionId,re.subagentId);return{entry:se,version:se?.version.value??0}});function A(re){const se=e.turns.value.flatMap(U=>U.tools??[]).find(U=>U.agentId===re);if(!se)return{};try{const U=JSON.parse(se.arg);return{name:typeof U.description=="string"?U.description:void 0,subagentType:typeof U.subagent_type=="string"?U.subagent_type:void 0,status:se.status,outputLines:se.output}}catch{return{}}}const v=F(()=>{const re=w.value;if(!re)return null;const se=e.activeAppTasks.value.find(Ke=>Ke.agentId===re.subagentId||Ke.id===re.subagentId||Ke.backgroundTaskId===re.subagentId);if(se)return vX(se,e.findBashCommandForTask(se));const U=k.value.entry?.channel,J=U?.agents.find(Ke=>Ke.agentId===re.subagentId),ce=U?.refreshError??!1,ge=U===void 0||U.loading,Me=U?.snapshot.meta.activity==="turn",Pe=A(re.subagentId),ke=U?.snapshot.items.findLast(Ke=>Ke.kind==="turn"),Le=ke?.kind==="turn"&&ke.state==="cancelled",it=ke?.kind==="turn"&&ke.state==="failed"||Pe.status==="error",Fe=Me?"working":Le?"cancelled":it?"failed":ge?"queued":ce&&Pe.status===void 0?"failed":"completed",De=Me?"running":Le?"cancelled":it?"failed":ge?"running":ce&&Pe.status===void 0?"failed":"completed";return{id:re.subagentId,name:J?.label??Pe.name??re.subagentId,subagentType:Pe.subagentType??(J?.type==="sub"?"subagent":J?.type),phase:Fe,status:De,outputLines:Pe.outputLines}}),x=F(()=>{const re=k.value.entry;if(!re)return[];const se=w.value,U=re.channel.agents.find(J=>J.agentId===se?.subagentId);return TX(re.channel.snapshot,e.getFileUrl,U)}),S=F(()=>k.value.entry?.channel.loading??!1),I=F(()=>k.value.entry?.channel.refreshError??!1),_=F(()=>k.value.entry?.channel.loadingOlder??!1),E=F(()=>k.value.entry?.channel.loadOlderError??!1),N=F(()=>k.value.entry?.channel.snapshot.hasMoreOlder??!1),D=F(()=>k.value.entry?.channel.snapshot.meta.activity==="turn"),T=F(()=>v.value!==null);function $(re){const se=e.activeAppTasks.value.find(U=>U.agentId===re||U.id===re||U.backgroundTaskId===re);return!se||se.kind==="subagent"&&se.agentId===re}function O(re){return e.activeAppTasks.value.find(U=>U.agentId===re||U.id===re||U.backgroundTaskId===re)?.agentId??re}function P(re){const se=e.activeSessionId.value;if(!re||!se)return;const U=O(re);if(n.value==="agent"&&w.value?.sessionId===se&&w.value.subagentId===U){R();return}const J=w.value;J&&J.subagentId!==U&&e.auxiliaryTranscripts.deactivate(J.sessionId,J.subagentId),w.value={sessionId:se,subagentId:U},n.value="agent",$(U)&&e.auxiliaryTranscripts.activate(se,U)}Ge(()=>e.activeAppTasks.value,re=>{const se=w.value;if(!se)return;const U=re.find(J=>J.backgroundTaskId===se.subagentId&&J.agentId!==void 0);!U||U.agentId===se.subagentId||(w.value={sessionId:se.sessionId,subagentId:U.agentId},n.value==="agent"&&e.auxiliaryTranscripts.activate(se.sessionId,U.agentId))});function R(){const re=w.value;re&&e.auxiliaryTranscripts.deactivate(re.sessionId,re.subagentId),w.value=null,n.value==="agent"&&(n.value=null)}Ge(n,(re,se)=>{if(se!=="agent"||re==="agent")return;const U=w.value;U&&e.auxiliaryTranscripts.deactivate(U.sessionId,U.subagentId)});function j(){const re=k.value.entry;re&&re.channel.loadOlder().catch(()=>{})}const z=G("list"),K=G(null);function q(){if(n.value==="diff"){W();return}n.value="diff",z.value="list",K.value=null,e.loadGitStatus(e.activeSessionId.value)}function W(){n.value==="diff"&&(n.value=null),z.value="list",K.value=null,e.clearFileDiff()}async function Z(re){z.value="detail",K.value=re,await e.loadFileDiff(re)}const ne=gl(null);function X(re){if(ne.value===re&&n.value==="turn-diff"){ue();return}ne.value=re,n.value="turn-diff"}function ue(){ne.value=null,n.value==="turn-diff"&&(n.value=null)}async function ie(re){if(!e.activeSessionId.value&&e.activeWorkspaceId.value){const se=await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,re);return n.value="btw",se}return await e.openSideChat(re),n.value="btw",null}function Se(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function fe(){n.value==="btw"&&(n.value=null)}const pe=F(()=>e.sideChatVisible.value),Ne=F(()=>n.value!==null&&(n.value!=="compaction"||g.value)&&(n.value!=="agent"||T.value)&&(n.value!=="btw"||pe.value)),ee=G(!1),ye=G({});function H(){switch(n.value){case"compaction":return f.value?{kind:"compaction",...f.value}:null;case"agent":return w.value?{kind:"agent",...w.value}:null;case"btw":return{kind:"btw"};default:return null}}function Y(re){if(re)switch(re.kind){case"compaction":f.value={turnId:re.turnId},n.value="compaction";break;case"agent":if(e.activeSessionId.value){const se=O(re.subagentId);w.value={sessionId:e.activeSessionId.value,subagentId:se},n.value="agent",$(se)&&e.auxiliaryTranscripts.activate(e.activeSessionId.value,se)}break;case"btw":e.sideChatVisible.value&&(n.value="btw");break}}function ve(){return n.value==="compaction"&&g.value?(y(),!0):n.value==="agent"&&T.value?(R(),!0):n.value==="file"?(i(),!0):n.value==="diff"?(W(),!0):n.value==="turn-diff"?(ue(),!0):n.value==="btw"?(Se(),!0):!1}return Ge(e.activeSessionId,(re,se)=>{if(se){const U=H();U?ye.value[se]=U:delete ye.value[se]}i(),y(),R(),W(),ue(),fe(),re&&Y(ye.value[re])}),{PREVIEW_WIDTH_KEY:nve,PREVIEW_MIN:jd,previewDefaultWidth:u,previewMax:r,previewWidth:c,previewPanelWidth:d,compactionPanelText:p,compactionPanelVisible:g,openCompactionPanel:m,closeCompactionPanel:y,agentPanelMember:v,agentPanelTurns:x,agentPanelLoading:S,agentPanelLoadError:I,agentPanelLoadingMore:_,agentPanelLoadMoreError:E,agentPanelHasMore:N,agentPanelRunning:D,agentPanelVisible:T,openAgentPanel:P,closeAgentPanel:R,loadOlderAgentMessages:j,detailDiffMode:z,detailDiffPath:K,openDiffDetail:q,closeDiffDetail:W,selectDiffFile:Z,turnDiffChange:ne,openTurnDiff:X,closeTurnDiff:ue,btwVisible:pe,openSideChatTab:ie,closeSideChat:Se,hideSideChatPanel:fe,sidePanelVisible:Ne,panelDragging:ee,closeOpenSidePanel:ve}}const sve=cn.sidebarWidth,CS=cn.sidebarCollapsed,wS=270,o4=220,ove=480,rve=320;function lve(e={}){const{viewportWidth:t}=n$(),n=G(wS),i=G(!1),s=G(!1),o=F(()=>{const c=rve+(gg(e.previewOpen)?jd:0);return Math.min(ove,t$(t.value,o4,c))}),r=F(()=>x8(n.value,o4,o.value));function l(){try{i.value=oo(CS)==="true"}catch{i.value=!1}}function a(){try{Ls(CS,String(i.value))}catch{}}function u(){i.value=!i.value,a()}return{SIDEBAR_WIDTH_KEY:sve,SIDEBAR_DEFAULT:wS,SIDEBAR_MIN:o4,sidebarMax:o,sessionColWidth:n,sidebarCollapsed:i,sidebarDragging:s,sideWidth:r,loadSidebarCollapsed:l,toggleSidebarCollapse:u}}const ave=40409;function xS(e){return Os(e)&&e.code===ave}function _S(e){return e.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(e)||e.startsWith("\\\\")}function SS(e){if(e.startsWith("\\\\"))return e;const t=/^[a-zA-Z]:/.test(e)?e.slice(0,2):"",n=[];for(const i of e.slice(t.length).split(/[\\/]+/))if(!(!i||i===".")){if(i===".."){n.pop();continue}n.push(i)}return t?`${t}/${n.join("/")}`:`/${n.join("/")}`}function uve({client:e,detailTarget:t,t:n}){const i=G(null),s=G(null),o=G(!1),r=G(null),l=G(null);let a=0;const u=F(()=>{const v=l.value;return v?e.getFileDownloadUrl(v):null}),c=F(()=>i.value!==null&&l.value!==null);function d(v){return v.length>1?v.replace(/\/+$/,""):v}function f(v){const x=lv(v,e.status.value.cwd);return x===null||x.split(/[\\/]+/).includes("..")?null:p(x)||null}function p(v){const x=[];for(const S of v.split(/[\\/]+/))if(!(!S||S===".")){if(S===".."){x.pop();continue}x.push(S)}return x.join("/")}function g(v){const x=v.trim();if(!x)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(x))return{error:n("filePreview.errors.unsupportedPath")};if(x.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const S=d(e.status.value.cwd);if(x.startsWith("/")){if(!S||x!==S&&!x.startsWith(`${S}/`))return{error:n("filePreview.errors.outsideWorkspace")};const _=x===S?"":x.slice(S.length+1);if(_.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const E=p(_);return E?{path:E}:{error:n("filePreview.errors.isDirectory")}}if(x.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const I=p(x);return I?{path:I}:{error:n("filePreview.errors.emptyPath")}}async function m(v){const x=i.value;if(t.value==="file"&&x&&x.path===v.path&&x.line===v.line&&(x.content??"")===(v.content??"")){w();return}const S=++a;if(t.value="file",s.value=null,r.value=null,o.value=!0,i.value=v,l.value=null,typeof v.content=="string"){o.value=!1,s.value={path:v.path,content:v.content,encoding:"utf-8",mime:"text/markdown",isBinary:!1,size:v.content.length};return}if(!_S(v.path)&&v.path.split(/[\\/]+/).includes("..")){const _=d(e.status.value.cwd);_&&(v={...v,path:SS(`${_}/${v.path}`)})}if(_S(v.path)){v={...v,path:SS(v.path)};const _=f(v.path);if(_!==null)v={...v,path:_};else{try{const E=await e.readHostFileContent(v.path);if(S!==a)return;l.value=null,s.value={path:v.path,content:E.content,encoding:E.encoding,mime:E.mime,isBinary:E.isBinary,size:E.size}}catch(E){if(S!==a)return;r.value=xS(E)?n("filePreview.errors.notFound"):OU(E)?n("filePreview.errors.tooLarge"):E instanceof Error?E.message:n("filePreview.errors.loadFailed")}finally{S===a&&(o.value=!1)}return}}const I=g(v.path);if("error"in I){o.value=!1,r.value=I.error;return}l.value=I.path;try{const _=await e.readFileContent(I.path);if(S!==a)return;_?s.value={..._,path:_.path||I.path}:r.value=n("filePreview.errors.loadFailed")}catch(_){if(S!==a)return;r.value=xS(_)?n("filePreview.errors.notFound"):_ instanceof Error?_.message:n("filePreview.errors.loadFailed")}finally{S===a&&(o.value=!1)}}function y(){a+=1,i.value=null,l.value=null,s.value=null,r.value=null,o.value=!1}function w(){y(),t.value==="file"&&(t.value=null)}Ge(t,(v,x)=>{x==="file"&&v!=="file"&&y()});function k(){const v=s.value?.path??i.value?.path;v&&e.openWorkspaceFile(v,i.value?.line)}function A(){const v=s.value?.path??i.value?.path;v&&e.revealWorkspaceFile(v)}return{previewTarget:i,previewFile:s,previewLoading:o,previewError:r,previewDownloadUrl:u,previewExternalActions:c,openFilePreview:m,closeFilePreview:w,openPreviewInEditor:k,revealPreviewFile:A}}function cve({running:e,title:t="Kimi Code"}){if(Hf){M4(()=>{typeof document<"u"&&(document.title=t)});return}const n=["◐","◓","◑","◒"],i=G(0);let s=null;function o(){s===null&&(i.value=0,s=setInterval(()=>{i.value=(i.value+1)%n.length},250))}function r(){s!==null&&(clearInterval(s),s=null),i.value=0}Ge(e,a=>{a?o():r()},{immediate:!0});const l=F(()=>`${e.value?`${n[i.value]} `:""}${t}`);M4(()=>{typeof document<"u"&&(document.title=l.value)}),Cn(()=>{r()})}function dve(e){if(e.startsWith("kimi-complete-"))return"turn_complete";if(e.startsWith("kimi-question-"))return"question";if(e.startsWith("kimi-approval-"))return"approval"}function fve(e,t,n){return e==="idle"&&!t&&!n}function i$(e,t){const n=oo(e);return n===null?t:n==="1"}const l2=G(i$(cn.notifyEnabled,!0)),Zb=G(i$(cn.notifySound,!0)),Gb=G(typeof Notification<"u"?Notification.permission:"denied"),hve="/favicon.ico";async function pve(e){if(!e){l2.value=!1,Ls(cn.notifyEnabled,"0");return}if(typeof Notification>"u")return;let t=Notification.permission;if(t==="default")try{t=await Notification.requestPermission()}catch{}Gb.value=t,t==="granted"&&(l2.value=!0,Ls(cn.notifyEnabled,"1"))}function gve(e){Zb.value=e,Ls(cn.notifySound,e?"1":"0")}function Qb(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function mve(e,t){return{title:e("settings.notifyTitle"),body:Qb(t,e("settings.notifyFallback"))}}function vve(e,t,n){return{title:e("settings.notifyQuestionTitle"),body:Qb(n,t,e("settings.notifyQuestionFallback"))}}function yve(e,t,n){return{title:e("settings.notifyApprovalTitle"),body:Qb(n,t,e("settings.notifyApprovalFallback"))}}function r4(e,t,n){if(!l2.value||typeof Notification>"u")return;const i=Notification.permission;if(i!=="denied"){if(i==="default"){Notification.requestPermission().then(s=>{Gb.value=s,s==="granted"&&MS(e,t,n)});return}MS(e,t,n)}}function MS(e,t,n){if(!e.isUserWatching)try{const i=new Notification(t.title,{body:t.body,tag:n,icon:hve,silent:!Zb.value}),s=dve(n);s!==void 0&&void 0,i.onclick=()=>{try{window.kimiDesktop?.showWindow?.(),window.focus()}catch{}s!==void 0&&void 0,e.onClick(),i.close()}}catch{}}function bve(e){function t(s,o){r4(o,mve(e.t,o.sessionTitle),`kimi-complete-${s}-${o.promptId??Date.now()}`)}function n(s){r4(s,vve(e.t,s.sessionTitle,s.questionPreview),`kimi-question-${s.questionId}`)}function i(s){r4(s,yve(e.t,s.sessionTitle,s.toolName),`kimi-approval-${s.approvalId}`)}return{notifyEnabled:l2,notifySound:Zb,notifyPermission:Gb,setNotifyEnabled:pve,setNotifySound:gve,maybeNotifyCompletion:t,maybeNotifyQuestion:n,maybeNotifyApproval:i}}function kve(e){const{api:t,uploadImage:n,sessionId:i,insertFolderPaths:s}=e,o=G({}),r=F(()=>o.value[i()??""]??[]),l=G(null),a=G(null),u=G(!1);let c=0;function d(){return`att_${++c}`}function f(W,Z){o.value={...o.value,[W]:Z}}function p(W){if(W.previewUrl!==void 0)try{URL.revokeObjectURL(W.previewUrl)}catch{}}function g(W){return W.startsWith("image/")?"image":W.startsWith("video/")?"video":"file"}function m(W){return W<1024*1024?"<1mb":W<10*1024*1024?"1-10mb":W<50*1024*1024?"10-50mb":"50mb+"}async function y(W,Z){const ne=n();if(!ne)return;const X=i()??"";if(W.length!==0)for(const ue of W){const ie=g(ue.type);m(ue.size),Math.min(W.length,100);const Se=d(),fe=ie==="file"?void 0:URL.createObjectURL(ue),pe={localId:Se,name:ue.name,kind:ie,previewUrl:fe,mediaType:ue.type||"application/octet-stream",size:ue.size,uploading:!0};f(X,[...o.value[X]??[],pe]),ne(ue,ue.name).then(Ne=>{const ee=o.value[X]??[];f(X,ee.map(ye=>ye.localId===Se?{...ye,uploading:!1,fileId:Ne?.fileId,mediaType:Ne?.mediaType??ye.mediaType,error:Ne===null}:ye))}).catch(()=>{const Ne=o.value[X]??[];f(X,Ne.map(ee=>ee.localId===Se?{...ee,uploading:!1,error:!0}:ee))})}}function w(W){const Z=i()??"",ne=o.value[Z]??[],X=ne.find(ue=>ue.localId===W);l.value?.localId===W&&(l.value=null),X&&p(X),f(Z,ne.filter(ue=>ue.localId!==W))}function k(W){l.value=W}function A(){l.value=null}function v(){a.value?.click()}function x(W){const Z=W.target,ne=Array.from(Z.files??[]);y(ne),Z.value=""}function S(W){if(!n())return;const Z=W.clipboardData;if(!Z)return;const ne=[],X=new Set,ue=(ie,Se)=>{const fe=`${ie.size}:${ie.type}:${Se}`;if(X.has(fe))return;X.add(fe);const pe=ie.type.split("/")[1]??"png",Ne=Se.includes(".")?Se:`paste-${Date.now()}.${pe}`;ne.push(ie instanceof File?ie:new File([ie],Ne,{type:ie.type}))};for(const ie of Array.from(Z.items))if(ie.kind==="file"){const Se=ie.getAsFile();Se&&ue(Se,Se.name||`paste-${Date.now()}.${ie.type.split("/")[1]??"png"}`)}for(const ie of Array.from(Z.files))ue(ie,ie.name);ne.length!==0&&(W.preventDefault(),y(ne))}let I=0;function _(W){!n()||!Array.from(W.dataTransfer?.items??[]).some(ne=>ne.kind==="file")||(W.preventDefault(),W.stopPropagation(),u.value=!0)}function E(){u.value=!1}function N(W){I=0,u.value=!1;const{files:Z,folderPaths:ne}=m3(W);ne.length>0&&(s?.(ne),W.preventDefault(),W.stopPropagation()),n()&&(W.preventDefault(),W.stopPropagation(),y(Z))}function D(W){return Array.from(W.dataTransfer?.items??[]).some(Z=>Z.kind==="file")}function T(W){!n()||!D(W)||(W.preventDefault(),I+=1,u.value=!0)}function $(W){!n()||!D(W)||W.preventDefault()}function O(W){!n()||!D(W)||(I=Math.max(0,I-1),I===0&&(u.value=!1))}function P(W){I=0,u.value=!1;const{files:Z,folderPaths:ne}=m3(W);ne.length>0&&(s?.(ne),W.preventDefault()),n()&&(W.preventDefault(),y(Z))}function R(){const W=i()??"";for(const Z of o.value[W]??[])p(Z);f(W,[])}function j(){l.value=null,R()}function z(W,Z,ne){const X=o.value[W]??[];X.some(ue=>ue.localId===Z)&&f(W,X.map(ue=>ue.localId===Z?{...ue,...ne}:ue))}function K(W){return fetch(W).then(Z=>{if(!Z.ok)throw new Error(`fetch failed: ${Z.status}`);return Z.blob()})}function q(W,Z,ne){const X=Z??i()??"";if(ne?.append!==!0){for(const ue of o.value[X]??[])p(ue);f(X,[])}for(const ue of W){const ie=d(),Se=/^data:/i.test(ue.url),fe=/^blob:/i.test(ue.url),pe=ue.name??ue.kind;if(ue.fileId){const Ne={localId:ie,name:pe,kind:ue.kind,previewUrl:ue.kind==="file"?void 0:ue.url,uploading:!1,fileId:ue.fileId};f(X,[...o.value[X]??[],Ne]),ue.kind==="image"&&!Se&&!fe&&t.getFileBlob(ue.fileId).then(ee=>{const ye=URL.createObjectURL(ee);if(!(o.value[X]??[]).some(Y=>Y.localId===ie)){URL.revokeObjectURL(ye);return}z(X,ie,{previewUrl:ye})}).catch(()=>{})}else{if(!ue.url)continue;const Ne=n();if(!Ne)continue;const ee={localId:ie,name:pe,kind:ue.kind,previewUrl:ue.url,uploading:!0};f(X,[...o.value[X]??[],ee]),K(ue.url).then(ye=>{const H=pe.includes(".")?pe:`${pe}.${ye.type.split("/")[1]??"bin"}`;return Ne(ye,H)}).then(ye=>{if(ye===null){const H=o.value[X]??[];f(X,H.filter(Y=>Y.localId!==ie));return}z(X,ie,{uploading:!1,fileId:ye.fileId})}).catch(()=>{const ye=o.value[X]??[];f(X,ye.filter(H=>H.localId!==ie))})}}}return Ge(i,()=>{l.value=null}),gn(()=>{document.addEventListener("paste",S),document.addEventListener("dragenter",T),document.addEventListener("dragover",$),document.addEventListener("dragleave",O),document.addEventListener("drop",P)}),Cn(()=>{document.removeEventListener("paste",S),document.removeEventListener("dragenter",T),document.removeEventListener("dragover",$),document.removeEventListener("dragleave",O),document.removeEventListener("drop",P);for(const W of Object.values(o.value))for(const Z of W)p(Z);l.value=null}),{attachments:r,previewAttachment:l,fileInputRef:a,isDragOver:u,removeAttachment:w,openAttachmentPreview:k,closeAttachmentPreview:A,openFilePicker:v,handleFileInputChange:x,handleDragOver:_,handleDragLeave:E,handleDrop:N,clearAfterSubmit:R,clearAttachments:j,loadAttachments:q}}const Ave=3;function s$(e){const t=G("starting"),n=G(!1),i=G(null),s=G(0);let o=null,r=null,l=null,a=0,u=!1,c=!1;function d(){o&&(clearTimeout(o),o=null),r&&(clearInterval(r),r=null),l&&(clearTimeout(l),l=null)}function f(w){d(),t.value="success",l=setTimeout(()=>{l=null,e.onSuccess?.()},w)}function p(){r&&clearInterval(r),r=setInterval(()=>{s.value>0?s.value--:(r&&clearInterval(r),r=null)},1e3)}function g(w){o&&clearTimeout(o),o=setTimeout(async()=>{const k=await e.onPollOAuthLogin();if(!c&&!u){if(k===null){if(a+=1,a>=Ave){d(),n.value=!0,t.value="error";return}g(w);return}a=0,k.status==="authenticated"?f(1200):k.status==="expired"||k.status==="cancelled"?(d(),t.value="expired",k.status,void 0):g(w)}},w*1e3)}async function m(){d(),i.value=null,n.value=!1,a=0,u=!1,t.value="starting";const w=await e.onStartOAuthLogin();if(c){w!==null&&w.status!=="authenticated"&&e.onCancelOAuthLogin();return}if(!w){t.value="error";return}if(w.status==="authenticated"){f(800);return}i.value={flowId:w.flowId,verificationUri:w.verificationUri,verificationUriComplete:w.verificationUriComplete,userCode:w.userCode,expiresIn:w.expiresIn,interval:w.interval},s.value=w.expiresIn,t.value="device-code",p(),g(w.interval)}function y(){t.value!=="success"&&(d(),t.value==="device-code"&&!u&&(u=!0,e.onCancelOAuthLogin()))}return O2()&&Df(()=>{c=!0,y()}),{step:t,pollError:n,flow:i,secondsLeft:s,startFlow:m,cancelFlow:y}}const Cve={state:"idle"};function wve(e){const t=G(Cve),n=G(oo(cn.updateSkippedVersion)),i=G(!1);if(typeof e?.getUpdateAutoDownload=="function"&&e.getUpdateAutoDownload().then(o=>{i.value=o}).catch(()=>{}),e!==void 0){let o=!1;e.onUpdateStatus(r=>{o=!0,t.value=r}),e.getUpdateStatus().then(r=>{o||(t.value=r)}).catch(()=>{})}const s=F(()=>{const o=t.value;return!(o.state==="idle"||o.state==="available"&&o.version!==void 0&&o.version===n.value)});return{status:t,visible:s,canCheck:typeof e?.checkForUpdates=="function",autoDownload:i,canToggleAutoDownload:typeof e?.getUpdateAutoDownload=="function"&&typeof e?.setUpdateAutoDownload=="function",setAutoDownload:(o,r)=>{i.value=o,typeof e?.setUpdateAutoDownload=="function"&&e.setUpdateAutoDownload(o).then(()=>{}).catch(()=>{})},skipVersion:()=>{const o=t.value.version;t.value.state==="available"&&o!==void 0&&(n.value=o,Ls(cn.updateSkippedVersion,o))},check:async()=>{if(typeof e?.checkForUpdates!="function")return Promise.resolve({outcome:"unsupported"});const o=await e.checkForUpdates().catch(()=>({outcome:"error",message:"bridge call failed"}));return o.outcome==="available"&&o.version!==void 0&&o.version===n.value&&(n.value=null,sr(cn.updateSkippedVersion)),o},download:()=>{e?.downloadUpdate().catch(()=>{})},install:()=>{e?.installUpdate().catch(()=>{})}}}let l4=null;function o$(){return l4===null&&(l4=wve(window.kimiDesktop)),l4}class xve{transcript;sessionId;agentId;fetchPage;pageSize;onChange;onGap;refreshPromise=null;buffered=[];agents_=[];seq_;loadingOlder_=!1;loadOlderError_=!1;refreshError_=!1;constructor(t){this.sessionId=t.sessionId,this.agentId=t.agentId,this.transcript=new EK(t.agentId),this.fetchPage=t.fetchPage,this.pageSize=t.pageSize??20,this.onChange=t.onChange,this.onGap=t.onGap}get snapshot(){return this.transcript.snapshot()}get seq(){return this.seq_}get agents(){return this.agents_}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlder_}get loadOlderError(){return this.loadOlderError_}get refreshError(){return this.refreshError_}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshError_=!1;const t=this.fetchPage({pageSize:this.pageSize}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshError_=!0,n}).finally(()=>{this.refreshPromise=null;const n=this.buffered;this.buffered=[];for(const i of n)this.applyOps(i.ops,i.seq);this.onChange?.()});return this.refreshPromise=t,this.onChange?.(),t}receiveReset(t,n){this.transcript.receive([{op:"reset",agentId:this.agentId,snapshot:t}]),n!==void 0&&(this.seq_=n),this.refreshError_=!1,this.onChange?.()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlder_)return this.buffered.push({ops:t,...n!==void 0?{seq:n}:{}}),!1;if(n!==void 0&&this.seq_!==void 0){if(n<=this.seq_)return!0;if(n!==this.seq_+1)return this.onGap?.(),!1}const i=this.transcript.apply(t);return n!==void 0&&(this.seq_=n),i.gap!==void 0&&this.onGap?.(),i.accepted.length>0&&this.onChange?.(),i.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlder_)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlder_=!0,this.loadOlderError_=!1,this.onChange?.();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:this.pageSize});this.applyPage(n,!1)}catch(n){throw this.loadOlderError_=!0,n}finally{this.loadingOlder_=!1;const n=this.buffered;this.buffered=[];for(const i of n)this.applyOps(i.ops,i.seq);this.onChange?.()}}}applyPage(t,n){this.agents_=t.agents;const i=this.snapshot,s=n?t:{...t,items:_ve(t.items,i.items),hasMoreOlder:t.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}}function _ve(e,t){const n=new Set,i=[];for(const s of[...e,...t]){const o=s.kind==="turn"?s.turnId:s.kind==="marker"?s.markerId:s.refId;n.has(o)||(n.add(o),i.push(s))}return i}function Sve(e){const t=UM(new Map),n=new Map,i=new Map,s=new Set;let o=null,r=null;function l(){o!==null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(o),o=null),r!==null&&(clearTimeout(r),r=null);for(const A of s)A.version.value+=1;s.clear()}function a(A){s.add(A),!(o!==null||r!==null)&&(typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(l)),r=setTimeout(l,50))}function u(A,v){return`${A}\0${v}`}function c(A,v,x){const S=e.getEventConnection();S!==null&&(S.subscribeTranscript(A,v,x),i.set(A,v))}function d(A,v){const x=u(A,v),S=t.get(x);if(S!==void 0)return S;const I={channel:new xve({sessionId:A,agentId:v,fetchPage:_=>e.api.getSessionTranscript(A,{..._,agentId:v}),onChange:()=>{a(I)},onGap:()=>{f(I)}}),version:G(0),baselineLoaded:!1,resumePromise:null};return t.set(x,I),I}async function f(A){if(A.resumePromise!==null)return A.resumePromise;const v=p(A).finally(()=>{A.resumePromise===v&&(A.resumePromise=null)});return A.resumePromise=v,v}async function p(A){try{await A.channel.refresh(),A.baselineLoaded=!0,n.get(A.channel.sessionId)===A.channel.agentId&&c(A.channel.sessionId,A.channel.agentId,A.channel.seq)}catch{n.get(A.channel.sessionId)===A.channel.agentId&&c(A.channel.sessionId,A.channel.agentId)}}function g(A,v){e.connectEventsIfNeeded(),n.set(A,v);const x=d(A,v);return x.baselineLoaded?c(A,v,x.channel.seq):f(x),x}function m(A,v){if(n.get(A)!==v)return;n.delete(A);const x=i.get(A);x!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(A,[x]),i.delete(A))}function y(A,v,x,S){if(n.get(A)!==v)return;const I=d(A,v);I.channel.receiveReset(x,S),I.baselineLoaded=!0}function w(A,v,x,S){return n.get(A)!==v?!0:d(A,v).channel.applyOps(x,S)}function k(A){n.delete(A),i.delete(A)&&e.getEventConnection()?.unsubscribeTranscript(A);for(const[v,x]of t)x.channel.sessionId===A&&(t.delete(v),s.delete(x))}return{getEntry:(A,v)=>t.get(u(A,v)),activate:g,deactivate:m,receiveReset:y,applyOps:w,forgetSession:k}}const Mve=["data-state"],Ive=["aria-label"],Eve={class:"upd-pill-text"},Tve={key:0,class:"upd-meta"},Lve={key:1,class:"upd-notes"},Nve={class:"upd-notes-title"},Fve={key:2,class:"upd-progress"},Bve={key:3,class:"upd-message"},$ve={class:"upd-foot"},Dve={class:"upd-foot-actions"},zve=nt({__name:"UpdateIndicator",setup(e){const{t,locale:n}=Bt(),{status:i,visible:s,skipVersion:o,download:r,install:l,autoDownload:a,setAutoDownload:u,canToggleAutoDownload:c}=o$(),d=G(!1),f="0.36.0".trim()?"0.36.0":"",p=F(()=>{switch(i.value.state){case"available":return t("sidebar.update");case"downloading":return`${i.value.percent??0}%`;case"downloaded":return t("sidebar.updateDone");case"error":return t("sidebar.updateFailed");default:return""}}),g=F(()=>{switch(i.value.state){case"available":return t("sidebar.updateAvailable",{version:i.value.version??""});case"downloading":return t("sidebar.updateDownloading",{percent:i.value.percent??0});case"downloaded":return t("sidebar.updateReady",{version:i.value.version??""});case"error":return t("sidebar.updateFailed");default:return""}}),m=F(()=>{const I=i.value.releaseDate;if(I===void 0||I==="")return"";const _=new Date(I),E=Number.isNaN(_.getTime())?I:_.toLocaleDateString();return t("sidebar.updateReleaseDate",{date:E})}),y=F(()=>{const I=[];return m.value!==""&&I.push(m.value),f!==""&&I.push(t("sidebar.updateCurrentVersion",{version:f})),I.join(" · ")}),w=F(()=>i.value.percent??0),k=F(()=>{const I=i.value.releaseNotes;return I===void 0?"":((n.value.toLowerCase().startsWith("zh")?I.zh:I.en)??I.zh??I.en??"").trim()}),A=F(()=>{switch(i.value.state){case"error":return"alert-triangle";default:return"download"}});function v(){r()}function x(){o(),d.value=!1}function S(){l(),d.value=!1}return(I,_)=>h(s)?(b(),M("span",{key:0,class:"upd","data-state":h(i).state},[C("button",{class:"upd-pill",type:"button","aria-label":p.value,onClick:_[0]||(_[0]=E=>d.value=!0)},[V(h(Ce),{class:"upd-pill-icon",name:A.value,size:"sm"},null,8,["name"]),C("span",Eve,B(p.value),1)],8,Ive),V(h(La),{open:d.value,title:g.value,size:"lg","onUpdate:open":_[4]||(_[4]=E=>d.value=E)},{foot:he(()=>[C("div",$ve,[C("div",Dve,[h(i).state==="available"?(b(),M(Be,{key:0},[V(h(Ht),{variant:"ghost",onClick:x},{default:he(()=>[qe(B(h(t)("sidebar.updateSkip")),1)]),_:1}),V(h(Ht),{onClick:v},{default:he(()=>[qe(B(h(t)("sidebar.updateDownloadNow")),1)]),_:1})],64)):h(i).state==="downloading"?(b(),de(h(Ht),{key:1,variant:"secondary",onClick:_[1]||(_[1]=E=>d.value=!1)},{default:he(()=>[qe(B(h(t)("sidebar.updateBackground")),1)]),_:1})):h(i).state==="downloaded"?(b(),M(Be,{key:2},[V(h(Ht),{variant:"ghost",onClick:_[2]||(_[2]=E=>d.value=!1)},{default:he(()=>[qe(B(h(t)("sidebar.updateRestartLater")),1)]),_:1}),V(h(Ht),{onClick:S},{default:he(()=>[qe(B(h(t)("sidebar.updateRestartNow")),1)]),_:1})],64)):h(i).state==="error"?(b(),de(h(Ht),{key:3,variant:"danger-soft",onClick:v},{default:he(()=>[qe(B(h(t)("sidebar.updateRetry")),1)]),_:1})):te("",!0)]),h(c)?(b(),de(h(Lq),{key:0,class:"upd-auto","model-value":h(a),"onUpdate:modelValue":_[3]||(_[3]=E=>h(u)(E,"update_prompt"))},{default:he(()=>[qe(B(h(t)("sidebar.updateAutoDownload")),1)]),_:1},8,["model-value"])):te("",!0)])]),default:he(()=>[(h(i).state==="available"||h(i).state==="downloaded")&&y.value?(b(),M("p",Tve,B(y.value),1)):te("",!0),k.value?(b(),M("section",Lve,[C("h4",Nve,B(h(t)("sidebar.updateWhatsNew")),1),V(h(ql),{text:k.value},null,8,["text"])])):te("",!0),h(i).state==="downloading"?(b(),M("div",Fve,[C("div",{class:"upd-progress-fill",style:Vt({width:`${w.value}%`})},null,4)])):te("",!0),h(i).state==="error"&&h(i).message?(b(),M("p",Bve,B(h(i).message),1)):te("",!0)]),_:1},8,["open","title"])],8,Mve)):te("",!0)}}),Rve=vt(zve,[["__scopeId","data-v-2b5c23f7"]]),a2=[{code:"en",label:"English"},{code:"zh",label:"简体中文"}],jn=JW({locale:LE()});function Yb(e){jn.global.locale.value=e,Ls(cn.locale,e)}const Ove={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Pve(e,t){return b(),M("svg",Ove,[...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 jve=wt({name:"kimi-add",render:Pve}),Hve={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Wve(e,t){return b(),M("svg",Hve,[...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 qve=wt({name:"kimi-add-conversation",render:Wve}),Uve={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Kve(e,t){return b(),M("svg",Uve,[...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 Vve=wt({name:"kimi-archive",render:Kve}),Zve={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Gve(e,t){return b(),M("svg",Zve,[...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 Qve=wt({name:"kimi-arrow-down",render:Gve}),Yve={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Jve(e,t){return b(),M("svg",Yve,[...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 Xve=wt({name:"kimi-arrow-left",render:Jve}),e9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function t9e(e,t){return b(),M("svg",e9e,[...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 n9e=wt({name:"kimi-arrow-right",render:t9e}),i9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function s9e(e,t){return b(),M("svg",i9e,[...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 o9e=wt({name:"kimi-arrow-up",render:s9e}),r9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function l9e(e,t){return b(),M("svg",r9e,[...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 a9e=wt({name:"kimi-check",render:l9e}),u9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function c9e(e,t){return b(),M("svg",u9e,[...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 d9e=wt({name:"kimi-chevron-down",render:c9e}),f9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function h9e(e,t){return b(),M("svg",f9e,[...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 p9e=wt({name:"kimi-chevron-right",render:h9e}),g9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function m9e(e,t){return b(),M("svg",g9e,[...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 v9e=wt({name:"kimi-chevron-up",render:m9e}),y9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function b9e(e,t){return b(),M("svg",y9e,[...t[0]||(t[0]=[C("circle",{cx:"12",cy:"12",r:"10.875",stroke:"currentColor","stroke-width":"2.25"},null,-1),C("path",{d:"M7.125 12.6L10.65 16.125L17.025 8.85",stroke:"currentColor","stroke-width":"2.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const k9e=wt({name:"kimi-circle-check",render:b9e}),A9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function C9e(e,t){return b(),M("svg",A9e,[...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 w9e=wt({name:"kimi-clock",render:C9e}),x9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _9e(e,t){return b(),M("svg",x9e,[...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 S9e=wt({name:"kimi-close",render:_9e}),M9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function I9e(e,t){return b(),M("svg",M9e,[...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 E9e=wt({name:"kimi-collapse",render:I9e}),T9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function L9e(e,t){return b(),M("svg",T9e,[...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 N9e=wt({name:"kimi-comment",render:L9e}),F9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function B9e(e,t){return b(),M("svg",F9e,[...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 $9e=wt({name:"kimi-copy",render:B9e}),D9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function z9e(e,t){return b(),M("svg",D9e,[...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 R9e=wt({name:"kimi-dark-mode",render:z9e}),O9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P9e(e,t){return b(),M("svg",O9e,[...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 j9e=wt({name:"kimi-download",render:P9e}),H9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function W9e(e,t){return b(),M("svg",H9e,[...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 q9e=wt({name:"kimi-edit",render:W9e}),U9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function K9e(e,t){return b(),M("svg",U9e,[...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 V9e=wt({name:"kimi-expand",render:K9e}),Z9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function G9e(e,t){return b(),M("svg",Z9e,[...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 IS=wt({name:"kimi-file",render:G9e}),Q9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Y9e(e,t){return b(),M("svg",Q9e,[...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 J9e=wt({name:"kimi-file-text",render:Y9e}),X9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function eye(e,t){return b(),M("svg",X9e,[...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 tye=wt({name:"kimi-folder",render:eye}),nye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function iye(e,t){return b(),M("svg",nye,[...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 sye=wt({name:"kimi-folder-open",render:iye}),oye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rye(e,t){return b(),M("svg",oye,[...t[0]||(t[0]=[C("path",{d:"M9.5 3Q10.8 8.2 16 9.5Q10.8 10.8 9.5 16Q8.2 10.8 3 9.5Q8.2 8.2 9.5 3Z",fill:"currentColor"},null,-1),C("path",{d:"M17.25 13.5Q18 16.5 21 17.25Q18 18 17.25 21Q16.5 18 13.5 17.25Q16.5 16.5 17.25 13.5Z",fill:"currentColor"},null,-1)])])}const lye=wt({name:"kimi-gen-title",render:rye}),aye={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function uye(e,t){return b(),M("svg",aye,[...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 cye=wt({name:"kimi-folder-plus",render:uye}),dye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fye(e,t){return b(),M("svg",dye,[...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 hye=wt({name:"kimi-follow-system",render:fye}),pye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function gye(e,t){return b(),M("svg",pye,[...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 mye=wt({name:"kimi-full-access",render:gye}),vye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yye(e,t){return b(),M("svg",vye,[...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 bye=wt({name:"kimi-globe",render:yye}),kye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Aye(e,t){return b(),M("svg",kye,[...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 Cye=wt({name:"kimi-grip",render:Aye}),wye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xye(e,t){return b(),M("svg",wye,[...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 _ye=wt({name:"kimi-hand",render:xye}),Sye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Mye(e,t){return b(),M("svg",Sye,[...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 Iye=wt({name:"kimi-histogram",render:Mye}),Eye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tye(e,t){return b(),M("svg",Eye,[...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 Lye=wt({name:"kimi-image",render:Tye}),Nye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fye(e,t){return b(),M("svg",Nye,[...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 Bye=wt({name:"kimi-image-failed",render:Fye}),$ye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dye(e,t){return b(),M("svg",$ye,[...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 zye=wt({name:"kimi-info",render:Dye}),Rye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Oye(e,t){return b(),M("svg",Rye,[...t[0]||(t[0]=[Tu('<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.09998C6.53222 2.09998 2.09998 6.53222 2.09998 12C2.09998 17.4677 6.53222 21.9 12 21.9C17.4677 21.9 21.9 17.4677 21.9 12C21.9 6.53222 17.4677 2.09998 12 2.09998ZM3.89998 12C3.89998 7.52633 7.52633 3.89998 12 3.89998C16.4736 3.89998 20.1 7.52633 20.1 12C20.1 16.4736 16.4736 20.1 12 20.1C7.52633 20.1 3.89998 16.4736 3.89998 12Z" fill="currentColor"></path><path d="M9.4286 9.47153C9.4286 8.97448 9.83154 8.57153 10.3286 8.57153H11.1C11.5971 8.57153 12 8.97448 12 9.47153C12 9.96859 11.5971 10.3715 11.1 10.3715H10.3286C9.83154 10.3715 9.4286 9.96859 9.4286 9.47153Z" fill="currentColor"></path><path d="M5.14289 9.47155C5.14289 8.97449 5.54583 8.57155 6.04289 8.57155H7.67146C8.16851 8.57155 8.57146 8.97449 8.57146 9.47155C8.57146 9.9686 8.16851 10.3715 7.67146 10.3715H6.04289C5.54583 10.3715 5.14289 9.9686 5.14289 9.47155Z" fill="currentColor"></path><path d="M8.57146 16.3287C8.57146 15.8316 8.9744 15.4287 9.47145 15.4287H14.5286C15.0257 15.4287 15.4286 15.8316 15.4286 16.3287C15.4286 16.8257 15.0257 17.2287 14.5286 17.2287H9.47145C8.9744 17.2287 8.57146 16.8257 8.57146 16.3287Z" fill="currentColor"></path><path d="M6.04288 12.0001C5.54583 12.0001 5.14288 12.403 5.14288 12.9001C5.14288 13.3972 5.54583 13.8001 6.04288 13.8001H6.81431C7.31137 13.8001 7.71431 13.3972 7.71431 12.9001C7.71431 12.403 7.31137 12.0001 6.81431 12.0001H6.04288Z" fill="currentColor"></path><path d="M9.47145 12.0001C8.9744 12.0001 8.57146 12.403 8.57146 12.9001C8.57146 13.3972 8.9744 13.8001 9.47146 13.8001H10.2429C10.7399 13.8001 11.1429 13.3972 11.1429 12.9001C11.1429 12.403 10.7399 12.0001 10.2429 12.0001H9.47145Z" fill="currentColor"></path><path d="M12.8572 9.47153C12.8572 8.97448 13.2601 8.57153 13.7572 8.57153H14.5286C15.0257 8.57153 15.4286 8.97448 15.4286 9.47153C15.4286 9.96859 15.0257 10.3715 14.5286 10.3715H13.7572C13.2601 10.3715 12.8572 9.96859 12.8572 9.47153Z" fill="currentColor"></path><path d="M12.9 12.0001C12.403 12.0001 12 12.403 12 12.9001C12 13.3972 12.403 13.8001 12.9 13.8001H13.6715C14.1685 13.8001 14.5715 13.3972 14.5715 12.9001C14.5715 12.403 14.1685 12.0001 13.6715 12.0001H12.9Z" fill="currentColor"></path><path d="M16.2857 9.47153C16.2857 8.97448 16.6887 8.57153 17.1857 8.57153H17.9572C18.4542 8.57153 18.8572 8.97448 18.8572 9.47153C18.8572 9.96859 18.4542 10.3715 17.9572 10.3715H17.1857C16.6887 10.3715 16.2857 9.96859 16.2857 9.47153Z" fill="currentColor"></path><path d="M16.3286 12.0001C15.8315 12.0001 15.4286 12.403 15.4286 12.9001C15.4286 13.3972 15.8315 13.8001 16.3286 13.8001H17.9572C18.4542 13.8001 18.8572 13.3972 18.8572 12.9001C18.8572 12.403 18.4542 12.0001 17.9572 12.0001H16.3286Z" fill="currentColor"></path>',10)])])}const Pye=wt({name:"kimi-keyboard",render:Oye}),jye={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Hye(e,t){return b(),M("svg",jye,[...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 Wye=wt({name:"kimi-left-panel",render:Hye}),qye={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Uye(e,t){return b(),M("svg",qye,[...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 Kye=wt({name:"kimi-left-panel-expand",render:Uye}),Vye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zye(e,t){return b(),M("svg",Vye,[...t[0]||(t[0]=[Tu('<g><path d="M12.9 1.7999C12.9 1.30285 12.4971 0.899902 12 0.899902C11.5029 0.899902 11.1 1.30285 11.1 1.7999V2.7999C11.1 3.29696 11.5029 3.6999 12 3.6999C12.4971 3.6999 12.9 3.29696 12.9 2.7999V1.7999Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.1 11.9999C6.1 8.7414 8.74152 6.09988 12 6.09988C15.2585 6.09988 17.9 8.7414 17.9 11.9999C17.9 15.2584 15.2585 17.8999 12 17.8999C8.74152 17.8999 6.1 15.2584 6.1 11.9999ZM12 7.89988C9.73563 7.89988 7.9 9.73551 7.9 11.9999C7.9 14.2642 9.73563 16.0999 12 16.0999C14.2644 16.0999 16.1 14.2642 16.1 11.9999C16.1 9.73551 14.2644 7.89988 12 7.89988Z" fill="currentColor"></path><path d="M0.899994 11.9999C0.899994 11.5028 1.30294 11.0999 1.79999 11.0999H2.79999C3.29705 11.0999 3.69999 11.5028 3.69999 11.9999C3.69999 12.4969 3.29705 12.8999 2.79999 12.8999H1.79999C1.30294 12.8999 0.899994 12.4969 0.899994 11.9999Z" fill="currentColor"></path><path d="M12 20.2991C12.4971 20.2991 12.9 20.702 12.9 21.1991V22.1991C12.9 22.6961 12.4971 23.0991 12 23.0991C11.5029 23.0991 11.1 22.6961 11.1 22.1991V21.1991C11.1 20.702 11.5029 20.2991 12 20.2991Z" fill="currentColor"></path><path d="M21.2016 11.0999C20.7045 11.0999 20.3016 11.5028 20.3016 11.9999C20.3016 12.4969 20.7045 12.8999 21.2016 12.8999H22.2016C22.6986 12.8999 23.1016 12.4969 23.1016 11.9999C23.1016 11.5028 22.6986 11.0999 22.2016 11.0999H21.2016Z" fill="currentColor"></path><path d="M20.1995 3.79903C20.551 4.1505 20.551 4.72035 20.1995 5.07182L19.4924 5.77893C19.141 6.1304 18.5711 6.1304 18.2196 5.77893C17.8682 5.42746 17.8682 4.85761 18.2196 4.50614L18.9268 3.79903C19.2782 3.44756 19.8481 3.44756 20.1995 3.79903Z" fill="currentColor"></path><path d="M19.4942 18.2215C19.1427 17.87 18.5729 17.87 18.2214 18.2215C17.87 18.573 17.87 19.1428 18.2214 19.4943L18.9285 20.2014C19.28 20.5529 19.8498 20.5529 20.2013 20.2014C20.5528 19.8499 20.5528 19.2801 20.2013 18.9286L19.4942 18.2215Z" fill="currentColor"></path><path d="M5.78079 18.2213C6.13227 18.5727 6.13227 19.1426 5.78079 19.4941L5.07369 20.2012C4.72222 20.5526 4.15237 20.5526 3.8009 20.2012C3.44942 19.8497 3.44942 19.2798 3.8009 18.9284L4.508 18.2213C4.85947 17.8698 5.42932 17.8698 5.78079 18.2213Z" fill="currentColor"></path><path d="M5.07077 3.79912C4.7193 3.44764 4.14945 3.44764 3.79798 3.79912C3.4465 4.15059 3.4465 4.72044 3.79798 5.07191L4.50508 5.77901C4.85655 6.13049 5.4264 6.13049 5.77787 5.77902C6.12935 5.42754 6.12935 4.85769 5.77787 4.50622L5.07077 3.79912Z" fill="currentColor"></path></g>',1)])])}const Gye=wt({name:"kimi-light-mode",render:Zye}),Qye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Yye(e,t){return b(),M("svg",Qye,[...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 Jye=wt({name:"kimi-link",render:Yye}),Xye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e4e(e,t){return b(),M("svg",Xye,[...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 t4e=wt({name:"kimi-list",render:e4e}),n4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function i4e(e,t){return b(),M("svg",n4e,[...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 s4e=wt({name:"kimi-mail",render:i4e}),o4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function r4e(e,t){return b(),M("svg",o4e,[...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 l4e=wt({name:"kimi-minus",render:r4e}),a4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function u4e(e,t){return b(),M("svg",a4e,[...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 c4e=wt({name:"kimi-microscope",render:u4e}),d4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function f4e(e,t){return b(),M("svg",d4e,[...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 h4e=wt({name:"kimi-more",render:f4e}),p4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g4e(e,t){return b(),M("svg",p4e,[...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 m4e=wt({name:"kimi-music",render:g4e}),v4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y4e(e,t){return b(),M("svg",v4e,[...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 b4e=wt({name:"kimi-pause",render:y4e}),k4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A4e(e,t){return b(),M("svg",k4e,[...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 C4e=wt({name:"kimi-pencil",render:A4e}),w4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function x4e(e,t){return b(),M("svg",w4e,[...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 _4e=wt({name:"kimi-play",render:x4e}),S4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function M4e(e,t){return b(),M("svg",S4e,[...t[0]||(t[0]=[C("path",{d:"M18.36 6.64a9 9 0 1 1-12.73 0",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{d:"M12 2v10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const I4e=wt({name:"kimi-power",render:M4e}),E4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T4e(e,t){return b(),M("svg",E4e,[...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 L4e=wt({name:"kimi-question",render:T4e}),N4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F4e(e,t){return b(),M("svg",N4e,[...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 B4e=wt({name:"kimi-robot",render:F4e}),$4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D4e(e,t){return b(),M("svg",$4e,[...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 z4e=wt({name:"kimi-search",render:D4e}),R4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O4e(e,t){return b(),M("svg",R4e,[...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 P4e=wt({name:"kimi-send",render:O4e}),j4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H4e(e,t){return b(),M("svg",j4e,[...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 W4e=wt({name:"kimi-setting",render:H4e}),q4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U4e(e,t){return b(),M("svg",q4e,[...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 K4e=wt({name:"kimi-shield-question",render:U4e}),V4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Z4e(e,t){return b(),M("svg",V4e,[...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 G4e=wt({name:"kimi-sign-in",render:Z4e}),Q4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Y4e(e,t){return b(),M("svg",Q4e,[...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 J4e=wt({name:"kimi-sign-out",render:Y4e}),X4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e3e(e,t){return b(),M("svg",X4e,[...t[0]||(t[0]=[Tu('<path d="M4 6H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M18.0 6H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="16" cy="6" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle><path d="M4 12H6.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M10.5 12H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="8.5" cy="12" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle><path d="M4 18H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M18.0 18H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="16" cy="18" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle>',9)])])}const t3e=wt({name:"kimi-sliders",render:e3e}),n3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function i3e(e,t){return b(),M("svg",n3e,[...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 s3e=wt({name:"kimi-stop",render:i3e}),o3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function r3e(e,t){return b(),M("svg",o3e,[...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 l3e=wt({name:"kimi-target",render:r3e}),a3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function u3e(e,t){return b(),M("svg",a3e,[...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 c3e=wt({name:"kimi-task",render:u3e}),d3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function f3e(e,t){return b(),M("svg",d3e,[...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 h3e=wt({name:"kimi-terminal",render:f3e}),p3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g3e(e,t){return b(),M("svg",p3e,[...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 m3e=wt({name:"kimi-thinking",render:g3e}),v3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y3e(e,t){return b(),M("svg",v3e,[...t[0]||(t[0]=[Tu('<path d="M9.28994 4.92561C9.6436 4.57634 9.64716 4.0065 9.29789 3.65284C8.94862 3.29918 8.37878 3.29563 8.02512 3.6449L5.91339 5.73041L5.16642 4.95888C4.82067 4.60177 4.2509 4.59256 3.89379 4.9383C3.53668 5.28404 3.52747 5.85382 3.87321 6.21093L5.25245 7.63551C5.41956 7.80811 5.64874 7.90674 5.88897 7.90943C6.1292 7.91213 6.36053 7.81866 6.53146 7.64985L9.28994 4.92561Z" fill="currentColor"></path><path d="M12 5.10022C11.503 5.10022 11.1 5.50316 11.1 6.00022C11.1 6.49728 11.503 6.90022 12 6.90022L19.9965 6.90022C20.4935 6.90022 20.8965 6.49728 20.8965 6.00022C20.8965 5.50316 20.4935 5.10022 19.9965 5.10022L12 5.10022Z" fill="currentColor"></path><path d="M12 11.1002C11.503 11.1002 11.1 11.5032 11.1 12.0002C11.1 12.4973 11.503 12.9002 12 12.9002H19.9965C20.4935 12.9002 20.8965 12.4973 20.8965 12.0002C20.8965 11.5032 20.4935 11.1002 19.9965 11.1002L12 11.1002Z" fill="currentColor"></path><path d="M11.1 18.0002C11.1 17.5032 11.503 17.1002 12 17.1002L19.9965 17.1002C20.4935 17.1002 20.8965 17.5032 20.8965 18.0002C20.8965 18.4973 20.4935 18.9002 19.9965 18.9002H12C11.503 18.9002 11.1 18.4973 11.1 18.0002Z" fill="currentColor"></path><path d="M9.29789 9.77064C9.64716 10.1243 9.6436 10.6941 9.28994 11.0434L6.53146 13.7676C6.36053 13.9365 6.1292 14.0299 5.88897 14.0272C5.64874 14.0245 5.41956 13.9259 5.25245 13.7533L3.87321 12.3287C3.52747 11.9716 3.53668 11.4018 3.89379 11.0561C4.2509 10.7104 4.82067 10.7196 5.16642 11.0767L5.91339 11.8482L8.02512 9.76269C8.37878 9.41342 8.94862 9.41698 9.29789 9.77064Z" fill="currentColor"></path><path d="M9.29789 15.7436C9.64716 16.0973 9.6436 16.6671 9.28994 17.0164L6.53146 19.7406C6.36053 19.9094 6.1292 20.0029 5.88897 20.0002C5.64874 19.9975 5.41956 19.8989 5.25245 19.7263L3.87321 18.3017C3.52747 17.9446 3.53668 17.3748 3.89379 17.0291C4.2509 16.6833 4.82067 16.6926 5.16642 17.0497L5.91339 17.8212L8.02512 15.7357C8.37878 15.3864 8.94862 15.39 9.29789 15.7436Z" fill="currentColor"></path>',6)])])}const b3e=wt({name:"kimi-todo",render:y3e}),k3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A3e(e,t){return b(),M("svg",k3e,[...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 C3e=wt({name:"kimi-translate",render:A3e}),w3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function x3e(e,t){return b(),M("svg",w3e,[...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 _3e=wt({name:"kimi-trash",render:x3e}),S3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function M3e(e,t){return b(),M("svg",S3e,[...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 I3e=wt({name:"kimi-undo",render:M3e}),E3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T3e(e,t){return b(),M("svg",E3e,[...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 L3e=wt({name:"kimi-user",render:T3e}),N3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F3e(e,t){return b(),M("svg",N3e,[...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 B3e=wt({name:"kimi-warning",render:F3e}),$3e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function D3e(e,t){return b(),M("svg",$3e,[...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 z3e=wt({name:"tabler-layout-sidebar-right-collapse",render:D3e}),R3e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function O3e(e,t){return b(),M("svg",R3e,[...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 P3e=wt({name:"tabler-paperclip",render:O3e}),j3e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function H3e(e,t){return b(),M("svg",j3e,[...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 W3e=wt({name:"ri-braces-line",render:H3e}),q3e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function U3e(e,t){return b(),M("svg",q3e,[...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 K3e=wt({name:"ri-calendar-close-line",render:U3e}),V3e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Z3e(e,t){return b(),M("svg",V3e,[...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 G3e=wt({name:"ri-calendar-schedule-line",render:Z3e}),Q3e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Y3e(e,t){return b(),M("svg",Q3e,[...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 J3e=wt({name:"ri-calendar-todo-line",render:Y3e}),X3e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function e8e(e,t){return b(),M("svg",X3e,[...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 t8e=wt({name:"ri-code-line",render:e8e}),n8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function i8e(e,t){return b(),M("svg",n8e,[...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 s8e=wt({name:"ri-emotion-line",render:i8e}),o8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function r8e(e,t){return b(),M("svg",o8e,[...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 l8e=wt({name:"ri-external-link-line",render:r8e}),a8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function u8e(e,t){return b(),M("svg",a8e,[...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 c8e=wt({name:"ri-eye-line",render:u8e}),d8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function f8e(e,t){return b(),M("svg",d8e,[...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 h8e=wt({name:"ri-eye-off-line",render:f8e}),p8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function g8e(e,t){return b(),M("svg",p8e,[...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 m8e=wt({name:"ri-file-add-line",render:g8e}),v8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function y8e(e,t){return b(),M("svg",v8e,[...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 b8e=wt({name:"ri-flashlight-line",render:y8e}),k8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function A8e(e,t){return b(),M("svg",k8e,[...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 C8e=wt({name:"ri-folder-fill",render:A8e}),w8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function x8e(e,t){return b(),M("svg",w8e,[...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 _8e=wt({name:"ri-git-fork-line",render:x8e}),S8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function M8e(e,t){return b(),M("svg",S8e,[...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 I8e=wt({name:"ri-git-pull-request-line",render:M8e}),E8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function T8e(e,t){return b(),M("svg",E8e,[...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 L8e=wt({name:"ri-list-settings-line",render:T8e}),N8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function F8e(e,t){return b(),M("svg",N8e,[...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 B8e=wt({name:"ri-node-tree",render:F8e}),$8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function D8e(e,t){return b(),M("svg",$8e,[...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 z8e=wt({name:"ri-pushpin-line",render:D8e}),R8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function O8e(e,t){return b(),M("svg",R8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"},null,-1)])])}const P8e=wt({name:"ri-sort-desc",render:O8e}),j8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function H8e(e,t){return b(),M("svg",j8e,[...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 W8e=wt({name:"ri-star-fill",render:H8e}),q8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function U8e(e,t){return b(),M("svg",q8e,[...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 K8e=wt({name:"ri-star-line",render:U8e}),V8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Z8e(e,t){return b(),M("svg",V8e,[...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 G8e=wt({name:"ri-tools-line",render:Z8e}),Q8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Y8e(e,t){return b(),M("svg",Q8e,[...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 J8e=wt({name:"ri-unpin-line",render:Y8e}),X8e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,e5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> - <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"/> - <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"/> -</svg> -`,t5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -</svg> -`,n5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,i5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,s5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,o5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,r5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,l5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,a5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,u5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,c5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<circle cx="12" cy="12" r="10.875" stroke="currentColor" stroke-width="2.25"/> -<path d="M7.125 12.6L10.65 16.125L17.025 8.85" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"/> -</svg> -`,d5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -</svg> -`,f5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,h5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -</svg> -`,p5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,g5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -</svg> -`,m5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,v5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,y5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,b5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,ES=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g> -<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"/> -</g> -</svg> -`,k5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -<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"/> -</svg> -`,A5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,C5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g> -<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"/> -</g> -</svg> -`,w5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M9.5 3Q10.8 8.2 16 9.5Q10.8 10.8 9.5 16Q8.2 10.8 3 9.5Q8.2 8.2 9.5 3Z" fill="currentColor"/> -<path d="M17.25 13.5Q18 16.5 21 17.25Q18 18 17.25 21Q16.5 18 13.5 17.25Q16.5 16.5 17.25 13.5Z" fill="currentColor"/> -</svg> -`,x5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> - <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"/> - <g id="af-p1"> - <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"/> - </g> -</svg> -`,_5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,S5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,M5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,I5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,E5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,T5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,L5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -</svg> -`,N5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -</svg> -`,F5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,B5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.09998C6.53222 2.09998 2.09998 6.53222 2.09998 12C2.09998 17.4677 6.53222 21.9 12 21.9C17.4677 21.9 21.9 17.4677 21.9 12C21.9 6.53222 17.4677 2.09998 12 2.09998ZM3.89998 12C3.89998 7.52633 7.52633 3.89998 12 3.89998C16.4736 3.89998 20.1 7.52633 20.1 12C20.1 16.4736 16.4736 20.1 12 20.1C7.52633 20.1 3.89998 16.4736 3.89998 12Z" fill="currentColor"/> -<path d="M9.4286 9.47153C9.4286 8.97448 9.83154 8.57153 10.3286 8.57153H11.1C11.5971 8.57153 12 8.97448 12 9.47153C12 9.96859 11.5971 10.3715 11.1 10.3715H10.3286C9.83154 10.3715 9.4286 9.96859 9.4286 9.47153Z" fill="currentColor"/> -<path d="M5.14289 9.47155C5.14289 8.97449 5.54583 8.57155 6.04289 8.57155H7.67146C8.16851 8.57155 8.57146 8.97449 8.57146 9.47155C8.57146 9.9686 8.16851 10.3715 7.67146 10.3715H6.04289C5.54583 10.3715 5.14289 9.9686 5.14289 9.47155Z" fill="currentColor"/> -<path d="M8.57146 16.3287C8.57146 15.8316 8.9744 15.4287 9.47145 15.4287H14.5286C15.0257 15.4287 15.4286 15.8316 15.4286 16.3287C15.4286 16.8257 15.0257 17.2287 14.5286 17.2287H9.47145C8.9744 17.2287 8.57146 16.8257 8.57146 16.3287Z" fill="currentColor"/> -<path d="M6.04288 12.0001C5.54583 12.0001 5.14288 12.403 5.14288 12.9001C5.14288 13.3972 5.54583 13.8001 6.04288 13.8001H6.81431C7.31137 13.8001 7.71431 13.3972 7.71431 12.9001C7.71431 12.403 7.31137 12.0001 6.81431 12.0001H6.04288Z" fill="currentColor"/> -<path d="M9.47145 12.0001C8.9744 12.0001 8.57146 12.403 8.57146 12.9001C8.57146 13.3972 8.9744 13.8001 9.47146 13.8001H10.2429C10.7399 13.8001 11.1429 13.3972 11.1429 12.9001C11.1429 12.403 10.7399 12.0001 10.2429 12.0001H9.47145Z" fill="currentColor"/> -<path d="M12.8572 9.47153C12.8572 8.97448 13.2601 8.57153 13.7572 8.57153H14.5286C15.0257 8.57153 15.4286 8.97448 15.4286 9.47153C15.4286 9.96859 15.0257 10.3715 14.5286 10.3715H13.7572C13.2601 10.3715 12.8572 9.96859 12.8572 9.47153Z" fill="currentColor"/> -<path d="M12.9 12.0001C12.403 12.0001 12 12.403 12 12.9001C12 13.3972 12.403 13.8001 12.9 13.8001H13.6715C14.1685 13.8001 14.5715 13.3972 14.5715 12.9001C14.5715 12.403 14.1685 12.0001 13.6715 12.0001H12.9Z" fill="currentColor"/> -<path d="M16.2857 9.47153C16.2857 8.97448 16.6887 8.57153 17.1857 8.57153H17.9572C18.4542 8.57153 18.8572 8.97448 18.8572 9.47153C18.8572 9.96859 18.4542 10.3715 17.9572 10.3715H17.1857C16.6887 10.3715 16.2857 9.96859 16.2857 9.47153Z" fill="currentColor"/> -<path d="M16.3286 12.0001C15.8315 12.0001 15.4286 12.403 15.4286 12.9001C15.4286 13.3972 15.8315 13.8001 16.3286 13.8001H17.9572C18.4542 13.8001 18.8572 13.3972 18.8572 12.9001C18.8572 12.403 18.4542 12.0001 17.9572 12.0001H16.3286Z" fill="currentColor"/> -</svg> -`,$5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> - <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"/> - <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)"/> - <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"/> -</svg> -`,D5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> - <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"/> - <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)"/> - <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"/> -</svg> -`,z5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g> -<path d="M12.9 1.7999C12.9 1.30285 12.4971 0.899902 12 0.899902C11.5029 0.899902 11.1 1.30285 11.1 1.7999V2.7999C11.1 3.29696 11.5029 3.6999 12 3.6999C12.4971 3.6999 12.9 3.29696 12.9 2.7999V1.7999Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M6.1 11.9999C6.1 8.7414 8.74152 6.09988 12 6.09988C15.2585 6.09988 17.9 8.7414 17.9 11.9999C17.9 15.2584 15.2585 17.8999 12 17.8999C8.74152 17.8999 6.1 15.2584 6.1 11.9999ZM12 7.89988C9.73563 7.89988 7.9 9.73551 7.9 11.9999C7.9 14.2642 9.73563 16.0999 12 16.0999C14.2644 16.0999 16.1 14.2642 16.1 11.9999C16.1 9.73551 14.2644 7.89988 12 7.89988Z" fill="currentColor"/> -<path d="M0.899994 11.9999C0.899994 11.5028 1.30294 11.0999 1.79999 11.0999H2.79999C3.29705 11.0999 3.69999 11.5028 3.69999 11.9999C3.69999 12.4969 3.29705 12.8999 2.79999 12.8999H1.79999C1.30294 12.8999 0.899994 12.4969 0.899994 11.9999Z" fill="currentColor"/> -<path d="M12 20.2991C12.4971 20.2991 12.9 20.702 12.9 21.1991V22.1991C12.9 22.6961 12.4971 23.0991 12 23.0991C11.5029 23.0991 11.1 22.6961 11.1 22.1991V21.1991C11.1 20.702 11.5029 20.2991 12 20.2991Z" fill="currentColor"/> -<path d="M21.2016 11.0999C20.7045 11.0999 20.3016 11.5028 20.3016 11.9999C20.3016 12.4969 20.7045 12.8999 21.2016 12.8999H22.2016C22.6986 12.8999 23.1016 12.4969 23.1016 11.9999C23.1016 11.5028 22.6986 11.0999 22.2016 11.0999H21.2016Z" fill="currentColor"/> -<path d="M20.1995 3.79903C20.551 4.1505 20.551 4.72035 20.1995 5.07182L19.4924 5.77893C19.141 6.1304 18.5711 6.1304 18.2196 5.77893C17.8682 5.42746 17.8682 4.85761 18.2196 4.50614L18.9268 3.79903C19.2782 3.44756 19.8481 3.44756 20.1995 3.79903Z" fill="currentColor"/> -<path d="M19.4942 18.2215C19.1427 17.87 18.5729 17.87 18.2214 18.2215C17.87 18.573 17.87 19.1428 18.2214 19.4943L18.9285 20.2014C19.28 20.5529 19.8498 20.5529 20.2013 20.2014C20.5528 19.8499 20.5528 19.2801 20.2013 18.9286L19.4942 18.2215Z" fill="currentColor"/> -<path d="M5.78079 18.2213C6.13227 18.5727 6.13227 19.1426 5.78079 19.4941L5.07369 20.2012C4.72222 20.5526 4.15237 20.5526 3.8009 20.2012C3.44942 19.8497 3.44942 19.2798 3.8009 18.9284L4.508 18.2213C4.85947 17.8698 5.42932 17.8698 5.78079 18.2213Z" fill="currentColor"/> -<path d="M5.07077 3.79912C4.7193 3.44764 4.14945 3.44764 3.79798 3.79912C3.4465 4.15059 3.4465 4.72044 3.79798 5.07191L4.50508 5.77901C4.85655 6.13049 5.4264 6.13049 5.77787 5.77902C6.12935 5.42754 6.12935 4.85769 5.77787 4.50622L5.07077 3.79912Z" fill="currentColor"/> -</g> -</svg> -`,R5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,O5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,P5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g> -<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"/> -</g> -</svg> -`,j5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,H5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,W5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -<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"/> -</svg> -`,q5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -<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"/> -</svg> -`,U5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -</svg> -`,K5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,V5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,Z5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M18.36 6.64a9 9 0 1 1-12.73 0" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> -<path d="M12 2v10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> -</svg> -`,G5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -<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"/> -</svg> -`,Q5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,Y5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,J5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,X5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -</svg> -`,ebe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -<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"/> -</svg> -`,tbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,nbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,ibe='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M18.0 6H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="16" cy="6" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M4 12H6.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M10.5 12H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="8.5" cy="12" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M4 18H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M18.0 18H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="16" cy="18" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/></svg>',sbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,obe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,rbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -<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"/> -</svg> -`,lbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -<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"/> -</svg> -`,abe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,ube=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M9.28994 4.92561C9.6436 4.57634 9.64716 4.0065 9.29789 3.65284C8.94862 3.29918 8.37878 3.29563 8.02512 3.6449L5.91339 5.73041L5.16642 4.95888C4.82067 4.60177 4.2509 4.59256 3.89379 4.9383C3.53668 5.28404 3.52747 5.85382 3.87321 6.21093L5.25245 7.63551C5.41956 7.80811 5.64874 7.90674 5.88897 7.90943C6.1292 7.91213 6.36053 7.81866 6.53146 7.64985L9.28994 4.92561Z" fill="currentColor"/> -<path d="M12 5.10022C11.503 5.10022 11.1 5.50316 11.1 6.00022C11.1 6.49728 11.503 6.90022 12 6.90022L19.9965 6.90022C20.4935 6.90022 20.8965 6.49728 20.8965 6.00022C20.8965 5.50316 20.4935 5.10022 19.9965 5.10022L12 5.10022Z" fill="currentColor"/> -<path d="M12 11.1002C11.503 11.1002 11.1 11.5032 11.1 12.0002C11.1 12.4973 11.503 12.9002 12 12.9002H19.9965C20.4935 12.9002 20.8965 12.4973 20.8965 12.0002C20.8965 11.5032 20.4935 11.1002 19.9965 11.1002L12 11.1002Z" fill="currentColor"/> -<path d="M11.1 18.0002C11.1 17.5032 11.503 17.1002 12 17.1002L19.9965 17.1002C20.4935 17.1002 20.8965 17.5032 20.8965 18.0002C20.8965 18.4973 20.4935 18.9002 19.9965 18.9002H12C11.503 18.9002 11.1 18.4973 11.1 18.0002Z" fill="currentColor"/> -<path d="M9.29789 9.77064C9.64716 10.1243 9.6436 10.6941 9.28994 11.0434L6.53146 13.7676C6.36053 13.9365 6.1292 14.0299 5.88897 14.0272C5.64874 14.0245 5.41956 13.9259 5.25245 13.7533L3.87321 12.3287C3.52747 11.9716 3.53668 11.4018 3.89379 11.0561C4.2509 10.7104 4.82067 10.7196 5.16642 11.0767L5.91339 11.8482L8.02512 9.76269C8.37878 9.41342 8.94862 9.41698 9.29789 9.77064Z" fill="currentColor"/> -<path d="M9.29789 15.7436C9.64716 16.0973 9.6436 16.6671 9.28994 17.0164L6.53146 19.7406C6.36053 19.9094 6.1292 20.0029 5.88897 20.0002C5.64874 19.9975 5.41956 19.8989 5.25245 19.7263L3.87321 18.3017C3.52747 17.9446 3.53668 17.3748 3.89379 17.0291C4.2509 16.6833 4.82067 16.6926 5.16642 17.0497L5.91339 17.8212L8.02512 15.7357C8.37878 15.3864 8.94862 15.39 9.29789 15.7436Z" fill="currentColor"/> -</svg> -`,cbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -<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"/> -</svg> -`,dbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -<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"/> -<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"/> -</svg> -`,fbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,hbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -</svg> -`,pbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<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"/> -<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"/> -<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"/> -</svg> -`,gbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><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"/><path d="m9 10l2 2l-2 2"/></g></svg>',mbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',vbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',ybe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',bbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',kbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Abe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Cbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',wbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',xbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',_be='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Sbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Mbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"/></svg>',Ibe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Ebe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Tbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Lbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Nbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Fbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Bbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"/></svg>',$be='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Dbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',zbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Rbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Obe={sm:14,md:16,lg:20};function St(e,t){return{component:e,svg:t}}const r$={plus:St(jve,X8e),"chat-new":St(qve,e5e),"calendar-close":St(K3e,ybe),"calendar-schedule":St(G3e,bbe),"calendar-todo":St(J3e,kbe),close:St(S9e,f5e),check:St(a9e,r5e),"circle-check":St(k9e,c5e),archive:St(Vve,t5e),search:St(z4e,Y5e),copy:St($9e,g5e),link:St(Jye,R5e),"external-link":St(l8e,wbe),download:St(j9e,v5e),undo:St(I3e,fbe),send:St(P4e,J5e),image:St(Lye,L5e),settings:St(W4e,X5e),sliders:St(t3e,ibe),"light-mode":St(Gye,z5e),"dark-mode":St(R9e,m5e),"follow-system":St(hye,_5e),"log-in":St(G4e,tbe),"log-out":St(J4e,nbe),hand:St(_ye,E5e),"full-access":St(mye,S5e),"shield-question":St(K4e,ebe),"chevron-down":St(d9e,l5e),"chevron-right":St(p9e,a5e),"chevron-up":St(v9e,u5e),"arrow-up":St(o9e,o5e),"arrow-down":St(Qve,n5e),"arrow-right":St(n9e,s5e),"arrow-left":St(Xve,i5e),minus:St(l4e,j5e),microscope:St(c4e,H5e),"panel-collapse":St(Wye,$5e),"panel-collapse-right":St(z3e,gbe),"panel-expand":St(Kye,D5e),expand:St(V9e,b5e),collapse:St(E9e,h5e),list:St(t4e,O5e),"list-settings":St(L8e,Lbe),"tree-view":St(B8e,Nbe),sort:St(P8e,Bbe),grip:St(Cye,I5e),folder:St(sye,C5e),"folder-closed":St(tye,A5e),"folder-plus":St(cye,x5e),"folder-solid":St(C8e,Ibe),file:St(IS,ES),"file-text":St(J9e,k5e),"file-edit":St(q9e,y5e),"file-plus":St(m8e,Sbe),"file-off":St(IS,ES),attachment:St(P3e,mbe),"image-off":St(Bye,N5e),eye:St(c8e,xbe),"eye-off":St(h8e,_be),code:St(t8e,Abe),terminal:St(h3e,lbe),pencil:St(C4e,K5e),tool:St(G8e,zbe),glob:St(W3e,vbe),globe:St(bye,M5e),translate:St(C3e,cbe),"check-list":St(b3e,ube),bolt:St(b8e,Mbe),keyboard:St(Pye,B5e),trash:St(_3e,dbe),"git-fork":St(_8e,Ebe),"git-pull-request":St(I8e,Tbe),message:St(N9e,p5e),mail:St(s4e,P5e),user:St(L3e,hbe),info:St(zye,F5e),"help-circle":St(L4e,G5e),"alert-triangle":St(B3e,pbe),clock:St(w9e,d5e),robot:St(B4e,Q5e),sparkles:St(c3e,rbe),"gen-title":St(lye,w5e),histogram:St(Iye,T5e),music:St(m4e,q5e),emoji:St(s8e,Cbe),target:St(l3e,obe),pause:St(b4e,U5e),play:St(_4e,V5e),power:St(I4e,Z5e),pin:St(z8e,Fbe),stop:St(s3e,sbe),star:St(W8e,$be),"star-outline":St(K8e,Dbe),unpin:St(J8e,Rbe),"dots-horizontal":St(h4e,W5e),thinking:St(m3e,abe)};function Pbe(e){return r$[e]}function jbe(e,t){return e.replace(/<svg\b[^>]*>/,n=>n.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^<svg\b/,`<svg class="kw-icon" width="${t}" height="${t}" aria-hidden="true"`)}function Hd(e,t="md"){const n=r$[e];return n?jbe(n.svg,Obe[t]):""}const yYe=[["Actions",["plus","attachment","chat-new","close","check","search","copy","link","external-link","download","undo","send","image","settings","sliders","log-in","log-out","eye","eye-off"]],["Navigation & layout",["chevron-down","chevron-right","chevron-up","arrow-up","arrow-down","arrow-right","arrow-left","minus","panel-collapse","panel-collapse-right","panel-expand","expand","collapse","list","list-settings","tree-view","sort","grip"]],["Files & tools",["folder","folder-closed","folder-plus","folder-solid","file","file-text","file-edit","file-plus","file-off","image-off","code","terminal","pencil","tool","glob","globe","check-list","bolt","git-fork","git-pull-request","archive","pin","unpin","target","calendar-schedule","calendar-todo","calendar-close","keyboard","trash","microscope"]],["Communication",["message","mail","user","robot","emoji","translate"]],["Status & media",["info","help-circle","alert-triangle","hand","full-access","shield-question","clock","histogram","music","sparkles","gen-title","pause","play","stop","star","star-outline","dots-horizontal","thinking","light-mode","dark-mode","follow-system"]]],Jb=(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t);function Vf(e){return $T(Jb,e)}function TS(e,t,n=!1){return N5(Jb,e,t,n)}function Hbe(e){return pJ(Jb,e)}const Wbe={read:"file-text",bash:"terminal",edit:"pencil",multi_edit:"pencil",write:"file-plus",grep:"search",search:"search",glob:"glob",ls:"folder",web_fetch:"globe",todo:"check-list",task:"sparkles",agentswarm:"sparkles",askuserquestion:"help-circle",exitplanmode:"file-text",creategoal:"target",getgoal:"target",setgoalbudget:"target",updategoal:"target",croncreate:"calendar-schedule",cronlist:"calendar-todo",crondelete:"calendar-close"};function l$(e){const t=so(e);let n=Wbe[t];return!n&&(e??"").trim().toLowerCase().includes("skill")&&(n="bolt"),n||(n="tool"),n}function a$(e){return Hd(l$(e),"sm")}function ba(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 u$(e){return!(e.tool.status==="ok"&&e.tool.media)}function qbe(e){const t=ba(e),n=[];let i=[],s=null;const o=()=>{const[l]=i;i.length===1&&l?n.push(l):i.length>1&&n.push({kind:"activity-run",items:i}),i=[]},r=()=>{s&&n.push({kind:"notification",items:s.items,sourceIndex:s.sourceIndex}),s=null};return t.forEach((l,a)=>{if(l.kind==="notification"){o(),s?s.items.push(l.notification):s={items:[l.notification],sourceIndex:a};return}if(r(),l.kind==="thinking"){i.push({kind:"thinking",thinking:l.thinking,startedAt:l.startedAt,durationMs:l.durationMs,sourceIndex:a});return}if(l.kind==="tool"&&u$(l)){i.push({kind:"tool",tool:l.tool,sourceIndex:a});return}o(),l.kind==="text"?n.push({kind:"text",text:l.text,sourceIndex:a}):l.kind==="tool"&&n.push({kind:"tool",tool:l.tool,sourceIndex:a})}),o(),r(),n}const LS=new WeakMap;function c$(e){const t=LS.get(e);if(t!==void 0)return t;const n=Ube(e);return LS.set(e,n),n}function Ube(e){const t=qbe(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;r<t.length;r++){const l=t[r];if(l?.kind==="tool"&&!u$(l)){n=r;break}if(l?.kind==="notification"){n=r;break}}if(n===-1)return{folded:t,visible:[]}}const i=t.slice(0,n),s=t.slice(n),o=i.filter(r=>r.kind==="notification");return o.length>0?{folded:i.filter(r=>r.kind!=="notification"),visible:[...o,...s]}:{folded:i,visible:s}}function Kbe(e){let t;for(const n of e){if(n.kind!=="thinking"||n.startedAt===void 0)continue;const i=Date.parse(n.startedAt);Number.isNaN(i)||(t===void 0||i<t)&&(t=i)}return t}function NS(e){if(e===void 0)return;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function Vbe(e){if(e.state.phase==="settled")return e.durationMs!==void 0?Math.max(0,e.durationMs):e.startMs===void 0||e.endedMs===void 0?void 0:Math.max(0,e.endedMs-e.startMs);if(e.startMs!==void 0)return Math.max(0,e.state.nowMs-e.startMs)}function Zbe(e){return c$(e).visible.flatMap(t=>t.kind==="text"&&t.text?[t.text]:[]).join(` - -`)}function Gbe(e){const t=[];for(const n of ba(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 i=n.tool.output.join(` -`);t.push(`\`\`\` -[${n.tool.name}] -${i} -\`\`\``)}else if(n.kind==="notification"){const i=n.notification,s=[i.title,i.type,...i.body.split(` -`)].filter(o=>o!=="");s.length>0&&t.push(`> **Notification** -> ${s.join(` -> `)}`)}return t.join(` - -`)}function d$(e){return e.tool.id||`tool-${e.sourceIndex}`}function f$(e,t){return e.kind==="activity-run"?`activity-run-${e.items[0]?.sourceIndex??t}`:e.kind==="tool"?d$({tool:e.tool,sourceIndex:e.sourceIndex}):`${e.kind}-${e.sourceIndex}`}function Qbe(e){const t=new Map;for(const n of ba(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const i=n.tool,s=so(i.name);if(s!=="edit"&&s!=="multi_edit"&&s!=="write")continue;let o,r=0,l=0,a=!1,u=!1,c=null;if(s==="write")o=oC(i),a=!0,u=!0;else if(c=UT(i),o=oC(i),c){const p=PT(c);r=p.added,l=p.removed}else u=!0;if(!o)continue;const d=Ybe(o),f=t.get(d);if(f)if(f.added+=r,f.removed+=l,f.hasWrite||=a,f.statsIncomplete||=u,f.diff!==null&&c!==null){let p=0,g=0;for(const y of f.diff)y.oldNo!==void 0&&y.oldNo>p&&(p=y.oldNo),y.newNo!==void 0&&y.newNo>g&&(g=y.newNo);const m=c.map(y=>({...y,oldNo:y.oldNo!==void 0?y.oldNo+p:void 0,newNo:y.newNo!==void 0?y.newNo+g:void 0}));f.diff=[...f.diff,{type:"hunk",text:"···"},...m]}else f.diff=null;else t.set(d,{path:o,added:r,removed:l,hasWrite:a,statsIncomplete:u,diff:c})}return[...t.values()]}function Ybe(e){const t=e.replace(/\\/g,"/");let n="",i=t,s=!1;const o=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);o?(n=`//${o[1].toLowerCase()}/`,i=t.slice(o[0].length-(o[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,i=t.slice(3),s=!0):t.startsWith("/")&&(n="/",i=t.slice(1));const r=n!=="",l=[];for(const c of i.split("/"))if(!(!c||c===".")){if(c===".."){l.length>0&&l[l.length-1]!==".."?l.pop():r||l.push(c);continue}l.push(c)}const a=l.join("/"),u=n+a;return s?u.toLowerCase():u}const Jbe=2e3,L1=new Map;function Xbe(e){const t=[];for(const n of ba(e)){if(n.kind!=="tool")continue;const i=n.tool,s=so(i.name);s!=="edit"&&s!=="multi_edit"&&s!=="write"||t.push(`${i.id}:${i.status}:${i.arg.length}`)}return t.join("|")}function eke(e){const t=Xbe(e),n=L1.get(e.id);if(n&&n.key===t)return n.changes;const i=Qbe(e);if(L1.set(e.id,{key:t,changes:i}),L1.size>Jbe){const s=L1.keys().next().value;s!==void 0&&L1.delete(s)}return i}const tke=["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"],h$=500,u2=256*1024,FS=200,a4=16384,u4=500,c4=50,d4=50,nke=6,ike=/api[_-]?key|authorization|token|secret|password|cookie|credential|email|phone|nickname|avatar/i,ske=/^[A-Za-z0-9+/=_-]{200,}$/;let f4=null;function vl(){if(f4!==null)return f4;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=oo(cn.debug)==="1"),f4=e,e}const vu=[],Xd=[];let J1=0;const xc=[];let X1=0,oke=1;const c2=new TextEncoder,rke=new Set(tke),Xb=G(0),eh=gl(!1);function lke(){return vu}function ake(){vu.length=0,Xd.length=0,J1=0,xc.length=0,X1=0,Xb.value++}function Na(e){if(!eh.value){try{const t={id:oke++,ts:Date.now(),source:e.source,kind:String(bf(e.kind)),label:String(bf(e.label)),sessionId:e.sessionId===void 0?void 0:String(bf(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:Hu(e.detail)},n=JSON.stringify(t),i=c2.encode(n).byteLength;if(i>u2)return;for(vu.push(t),Xd.push(n),J1+=i+(Xd.length>1?1:0);vu.length>h$||J1>u2;){const s=Xd.shift();vu.shift(),s!==void 0&&(J1-=c2.encode(s).byteLength,Xd.length>0&&(J1-=1))}}catch{return}Xb.value++}}function hc(e){if(typeof e=="string")return e.length<=FS?e:e.slice(0,FS)}function Lr(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function uke(e,t){if(rke.has(e))try{const n={ts:Date.now(),event:e,sessionId:hc(t?.sessionId),status:hc(t?.status),operation:hc(t?.operation),seq:Lr(t?.seq),durationMs:Lr(t?.durationMs),messageCount:Lr(t?.messageCount),contentCount:Lr(t?.contentCount),mediaCount:Lr(t?.mediaCount),sessionCount:Lr(t?.sessionCount),workspaceCount:Lr(t?.workspaceCount),promptId:hc(t?.promptId),zipBytes:Lr(t?.zipBytes),errorName:hc(t?.errorName),errorCode:Lr(t?.errorCode),requestId:hc(t?.requestId),phase:hc(t?.phase),httpStatus:Lr(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:Lr(t?.line),col:Lr(t?.col)},i=JSON.stringify(n),s=c2.encode(i).byteLength;if(s>u2)return;for(xc.push(i),X1+=s+(xc.length>1?1:0);xc.length>h$||X1>u2;){const o=xc.shift();o!==void 0&&(X1-=c2.encode(o).byteLength,xc.length>0&&(X1-=1))}}catch{return}}function bf(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const o=e;return ske.test(o)?`[base64-like, ${o.length} chars omitted]`:o.length>u4?`${o.slice(0,u4)}… [+${o.length-u4} chars]`:o}if(n!=="object")return String(e);if(t>=nke)return"[max depth]";if(Array.isArray(e)){const o=e.slice(0,c4).map(r=>bf(r,t+1));return e.length>c4&&o.push(`[+${e.length-c4} more items]`),o}const i={},s=Object.entries(e);for(const[o,r]of s.slice(0,d4))i[o]=ike.test(o)?"[redacted]":bf(r,t+1);return s.length>d4&&(i._truncatedKeys=s.length-d4),i}function Hu(e){if(e===void 0)return;const t=bf(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>a4)return{_truncated:`detail JSON was ${n.length} chars; first ${a4} kept`,preview:n.slice(0,a4)}}catch{return"[unserializable detail]"}return t}function cke(e){vl()&&Na({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:Hu(e.body)}})}function dke(e){if(!vl())return;const t=e.code!==0;Na({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:Hu(e.data)}})}function fke(e){vl()&&Na({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 hke(e,t){vl()&&Na({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:Hu(t)})}function pke(e){if(!vl())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",i=t.payload,s=typeof i?.session_id=="string"?i.session_id:void 0;Na({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:Hu(e)})}function gke(e){if(!vl())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",i=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,o=typeof t.offset=="number"?t.offset:void 0,r=[i,s!==void 0?`seq=${s}`:void 0,o!==void 0?`offset=${o}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);Na({source:"ws",kind:"ws:in",eventType:n,sessionId:i,seq:s,offset:o,label:`← ${n}${r.length>0?` (${r.join(" ")})`:""}`,detail:Hu(t.payload)})}const mke={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function vke(e,t,n){vl()&&Na({source:"client",kind:`client:${e}`,label:`${mke[e]} ${t}`,detail:Hu(n)})}function yke(e,t){vl()&&Na({source:"client",kind:"client:event",label:`· ${e}`,detail:Hu(t)})}function Lo(e,t){uke(e,t),Na({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,ag=null;function bke(){if(h4)return()=>ag?.();h4=!0;const e=[];try{if(typeof window<"u"){const n=s=>{Lo("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno}),ga(`[kimi-web] window error: ${s.message}`,s.error instanceof Error?s.error.stack:void 0)},i=s=>{const o=s.reason;Lo("window:unhandled-rejection",{status:"failed",errorName:o instanceof Error?o.name:typeof o}),ga(`[kimi-web] unhandled rejection: ${Ake(o)}`,o instanceof Error?o.stack:void 0)};window.addEventListener("error",n),window.addEventListener("unhandledrejection",i),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",i)})}}catch{}if(vl())for(const n of["error","warn","log","info","debug"]){const i=console[n];if(typeof i!="function")continue;const s=(...o)=>{try{vke(n,o.map(kke).join(" "),o.length>1?o:o[0])}catch{}i.apply(console,o)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=i)})}const t=()=>{if(ag===t){for(const n of e.toReversed())n();ag=null,h4=!1}};return ag=t,t}function kke(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 Ake(e){if(e instanceof Error)return e.message;try{return String(e)}catch{return"[unstringifiable reason]"}}function p$(e=vu){if(typeof document>"u")return;const t=new Blob([Cke(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let i;try{i=document.createElement("a"),i.href=n,i.download=`kimi-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(i),i.click()}finally{i?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function Cke(e=vu){return e===vu?Xd.join(` -`):e.map(t=>JSON.stringify(t)).join(` -`)}function wke(){return xc.join(` -`)}const BS=cn.clientId,xke="kimi-code-web",_ke="web";function Ske(){return{serverHttpUrl:Ike(),clientId:Tke(),clientName:xke,clientVersion:Lke(),clientUiMode:_ke}}function Mke(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function Ike(){const e=g$();return _8(e||void 0)}const $S="kimi-desktop-server-origin";function g$(){if(typeof window>"u")return;const e=new URLSearchParams(window.location.search).get("kimi_origin");try{return e?(window.sessionStorage.setItem($S,e),e):window.sessionStorage.getItem($S)??void 0}catch{return e??void 0}}function _8(e){const t=e&&e.trim()?e:Mke(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function DS(e){return e.replace(/^https?:\/\//,"").replace(/\/$/,"")}function Eke(){if(typeof window<"u"){const t=g$();if(t)return DS(_8(t))}const e=typeof window<"u"&&window.location?.origin?window.location.origin:"";return DS(e)}function Tke(){const e=oo(BS);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Ls(BS,t),t}function Lke(){return"0.36.0".trim()?"0.36.0":"0.0.0-dev"}const Nke={restRequest:e=>cke(e),restResponse:e=>dke(e),restFailure:e=>fke(e),wsEvent:e=>{switch(e.kind){case"lifecycle":hke(e.event,e.detail);break;case"in":gke(e.frame);break;case"out":pke(e.frame);break}},traceKeyEvent:(e,t)=>Lo(e,t)},Fke={getToken:Ste,markAuthRequired:Tte},Bke=(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t);function $ke(){const e=Ske();return IJ({origin:e.serverHttpUrl,identity:{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode},tracer:Nke,credentialStore:Fke,t:Bke})}const Dke=$ke();function jt(){return Dke}function S8(e){const t=[];for(const n of e??[])n.kind==="video"?t.push({type:"video",source:{kind:"file",fileId:n.fileId}}):n.kind==="file"?t.push({type:"file",fileId:n.fileId,name:n.name??"",mediaType:n.mediaType||"application/octet-stream",size:n.size??0}):t.push({type:"image",source:{kind:"file",fileId:n.fileId}});return t}const zke=1e3,Rke=4096,zS=32*1024;function Oke(e,t,n){let i=null,s;const o=new Set;async function r(p){try{const m=await n.api.listTasks(p),y=e.tasksBySession[p]??[],w=new Map(y.map(v=>[v.id,v])),k=new Map(y.filter(v=>v.backgroundTaskId!==void 0).map(v=>[v.backgroundTaskId,v])),A=m.map(v=>{const x=w.get(v.id)??k.get(v.id),S=v.completedAt===void 0&&x?.completedAt===void 0&&x?.status==="running"&&v.status!=="running";return{...v,completedAt:v.completedAt??x?.completedAt??(S?new Date().toISOString():void 0),completedAtEstimated:v.completedAt!==void 0?void 0:x?.completedAt!==void 0?x.completedAtEstimated:S?!0:void 0}});e.tasksBySession={...e.tasksBySession,[p]:QC(A,y)},await l(p,m)}catch{}}async function l(p,g){if(e.activeSessionId!==p)return;const m=g??e.tasksBySession[p]??[],y=n.api,w=new Map;if(await Promise.all(m.map(async A=>{if((A.status==="completed"||A.status==="failed"||A.status==="cancelled")&&!o.has(A.id)&&!((A.outputLines?.length??0)>0))try{const x=await y.getTask(p,A.id,{withOutput:!0,outputBytes:zS});x.outputPreview!==void 0&&w.set(A.id,{preview:x.outputPreview,bytes:x.outputBytes}),o.add(A.id)}catch{}})),w.size===0)return;const k=e.tasksBySession[p]??[];e.tasksBySession={...e.tasksBySession,[p]:k.map(A=>{const v=w.get(A.id)??(A.backgroundTaskId!==void 0?w.get(A.backgroundTaskId):void 0);return v?{...A,outputPreview:v.preview,outputBytes:v.bytes}:A})}}async function a(p){if(e.activeSessionId!==p)return;const g=n.api;let m;try{m=await g.listTasks(p)}catch{return}const y=new Map;await Promise.all(m.map(async x=>{const S=x.status==="running",I=x.status==="completed"||x.status==="failed"||x.status==="cancelled";if(!(!S&&!I)&&!(I&&(o.has(x.id)||(x.outputLines?.length??0)>0)))try{const _=await g.getTask(p,x.id,{withOutput:!0,outputBytes:S?Rke:zS});_.outputPreview!==void 0&&y.set(x.id,{preview:_.outputPreview,bytes:_.outputBytes}),I&&o.add(x.id)}catch{}}));const w=e.tasksBySession[p]??[],k=new Map(w.map(x=>[x.id,x])),A=new Map(w.filter(x=>x.backgroundTaskId!==void 0).map(x=>[x.backgroundTaskId,x])),v=m.map(x=>{const S=k.get(x.id)??A.get(x.id),I=y.get(x.id),_=x.completedAt===void 0&&S?.completedAt===void 0&&S?.status==="running"&&x.status!=="running";return{...x,outputLines:S?.outputLines,text:S?.text,completedAt:x.completedAt??S?.completedAt??(_?new Date().toISOString():void 0),completedAtEstimated:x.completedAt!==void 0?void 0:S?.completedAt!==void 0?S.completedAtEstimated:_?!0:void 0,outputPreview:I?.preview??S?.outputPreview,outputBytes:I?.bytes??S?.outputBytes}});e.tasksBySession={...e.tasksBySession,[p]:QC(v,w)}}function u(p){i!==null&&s===p||(c(),s=p,a(p),i=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||(e.activeSessionId===p?a(p):c())},zke))}function c(){i!==null&&(clearInterval(i),i=null),s=void 0,o.clear()}const d=G(0);let f=null;return Ge(()=>t.value.some(p=>p.status==="running"),p=>{p&&f===null?f=setInterval(()=>{d.value=(d.value+1)%Number.MAX_SAFE_INTEGER},1e3):!p&&f!==null&&(clearInterval(f),f=null)},{immediate:!0}),Ge(()=>{const p=e.activeSessionId;if(!p)return{sid:void 0,hasRunning:!1};const g=e.tasksBySession[p]??[];return{sid:p,hasRunning:g.some(m=>m.status==="running")}},({sid:p,hasRunning:g},m,y)=>{let w;g&&p!==void 0?u(p):p!==void 0?w=setTimeout(()=>{(e.tasksBySession[p]??[]).some(A=>A.status==="running")||c()},1500):c(),y(()=>{w!==void 0&&clearTimeout(w)})},{deep:!0,immediate:!0}),{taskClock:F(()=>d.value),loadTasksForSession:r}}function Pke(e,t){const{api:n,pushOperationFailure:i,nextOptimisticMsgId:s,connectEventsIfNeeded:o,getEventConn:r,resolveThinkingForPrompt:l,refreshSessionStatus:a}=t,u=G({}),c=F(()=>{const j=e.activeSessionId;if(!j)return null;const z=u.value[j];return z?{parentId:j,agentId:z.agentId}:null}),d=F(()=>c.value?.parentId??null),f=F(()=>c.value!==null),p=F(()=>{const j=c.value;return j?!!e.sideChatSendingByAgent[j.agentId]:!1}),g=F(()=>{const j=c.value;return j?e.sideChatSendingByAgent[j.agentId]?!0:(e.tasksBySession[j.parentId]??[]).some(z=>z.id===j.agentId&&z.status==="running"):!1}),m=j=>n.getFileUrl(j),y=[],w=KT(),k=F(()=>{const j=c.value;return j?w({messages:e.sideChatMessagesByAgent[j.agentId]??[],approvals:y,getFileUrl:m,sessionActive:g.value}):[]});function A(j,z){e.sideChatMessagesByAgent[j]=z(e.sideChatMessagesByAgent[j]??[])}function v(j,z){A(j,K=>[...K,z])}function x(j,z){A(j,K=>{const q=K.find(W=>W.id===z);return q?.promptId!==void 0||q?.userMessageId!==void 0?K:K.filter(W=>W.id!==z)})}function S(j,z){const K=e.sideChatUserMessageIdsBySession[j]??[];K.includes(z)||(e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[j]:[...K,z]})}function I(j,z,K,q){A(j,W=>{const Z=W.findIndex(ie=>ie.id===z);if(Z===-1)return W;const ne=W.findIndex((ie,Se)=>Se!==Z&&ie.role==="user"&&(ie.id===q||ie.userMessageId===q||ie.promptId===K)),X=W[Z],ue=ne===-1?X:W[ne];return W.flatMap((ie,Se)=>Se===ne?[]:Se!==Z?[ie]:[{...ue,id:X.id,promptId:K,userMessageId:q,metadata:{...ue.metadata,...X.metadata}}])})}function _(j,z){S(z.sessionId,z.userMessageId??z.id),A(j,K=>{const q=K.findIndex(ne=>ne.role==="user"&&(ne.userMessageId===(z.userMessageId??z.id)||ne.promptId!==void 0&&ne.promptId===z.promptId));if(q===-1)return[...K,z];const W=K[q],Z=[...K];return Z[q]={...z,id:W.id,promptId:z.promptId??W.promptId,userMessageId:z.userMessageId??z.id,metadata:{...z.metadata,...W.metadata}},Z})}function E(j,z,K){K&&A(j,q=>{const W=q.at(-1);if(W?.role==="assistant"){const Z=W.content[0],ne=Z?.type==="text"?Z.text:"";return[...q.slice(0,-1),{...W,content:[{type:"text",text:`${ne}${K}`}]}]}return[...q,{id:s(),sessionId:z,role:"assistant",content:[{type:"text",text:K}],createdAt:new Date().toISOString()}]})}function N(j,z,K){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[j]:!1},!K)return;const W=(e.sideChatMessagesByAgent[j]??[]).at(-1);(W?.role==="assistant"&&W.content[0]?.type==="text"?W.content[0].text:"").trim().length>0||E(j,z,K)}async function D(j){const z=e.activeSessionId;return z?T(z,j):!1}async function T(j,z){if(!u.value[j]){let K;try{({agentId:K}=await n.startBtw(j))}catch(q){return i("openSideChat",q,{sessionId:j}),!1}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[K]:e.sideChatMessagesByAgent[K]??[]},u.value={...u.value,[j]:{agentId:K}},o(),r()?.markSideChannelAgent(j,K)}return z&&z.trim()?$(j,z.trim()):!0}async function $(j,z){const K=u.value[j],q=z.trim();if(!K||!q)return!1;const W=j,Z=K.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[Z]:!0};const ne=s(),X={id:ne,sessionId:W,role:"user",content:[{type:"text",text:q}],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};v(Z,X);let ue,ie=!1;try{const Se=e.sessions.find(ee=>ee.id===W),fe=(Se?.model&&Se.model.length>0?Se.model:e.defaultModel)??void 0,pe=await l(W,fe)??e.thinking;ue=e.pendingThinkingBySession[W],ie=!0;const Ne=await n.submitPrompt(W,{content:[{type:"text",text:q}],agentId:Z,model:fe,thinking:pe,permissionMode:e.permission,planMode:e.planModeBySession[W]??!1,swarmMode:e.swarmModeBySession[W]??!1});return pe!==void 0&&Ca(e,W,ue),I(Z,ne,Ne.promptId,Ne.userMessageId),S(W,Ne.userMessageId),!0}catch(Se){return Ca(e,W,ue)&&a(W),i("sendSideChatPrompt",Se,{sessionId:W}),x(Z,ne),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[Z]:!1},!(!ie||Se instanceof au)}}function O(){const j=e.activeSessionId;if(!j)return;const{[j]:z,...K}=u.value;u.value=K}async function P(j){const z=c.value;return z?$(z.parentId,j):!1}function R(j){if(!u.value[j])return;const{[j]:z,...K}=u.value;u.value=K}return{sideChatTargetBySession:u,sideChatSessionId:d,sideChatVisible:f,sideChatSending:p,sideChatRunning:g,sideChatTurns:k,appendSideChatAssistantText:E,finishSideChatAgent:N,reconcileSideChatUserMessage:_,openSideChat:D,openSideChatOn:T,closeSideChat:O,sendSideChatPrompt:P,clearSideChatForSession:R}}const m$=cn.starredModels,RS=new Error("profile persist failed");function jke(){try{const e=oo(m$);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function Hke(e){try{Ls(m$,JSON.stringify(e))}catch{}}function Wke(e,t){const{api:n,pushOperationFailure:i,refreshSessionStatus:s,persistSessionProfile:o,savePlanModeToStorage:r,activity:l,updateSession:a,updateSessionMessages:u,loadConfig:c,checkAuth:d,beginLocalTurn:f,settleLocalTurn:p}=t,g=G([]),m=G(jke()),y=G({}),w=G({}),k=G([]),A=G(null);function v(H){if(!(H==null||H.length===0))return g.value.find(Y=>Y.id===H)??g.value.find(Y=>Y.model===H)}function x(){const H=e.activeSessionId?e.sessions.find(ve=>ve.id===e.activeSessionId):void 0,Y=H===void 0?A.value??e.defaultModel:H.model||e.defaultModel;return v(Y)?.id??Y??void 0}function S(H){if(H===void 0)return;const Y=v(H);return Y===void 0?void 0:Vh(Y)}function I(H,Y){const ve=H==null?void 0:e.thinkingBySession[H];return ve!==void 0&&Wee(Y,ve)?ve:Vh(Y)}function _(H,Y){if(Y===void 0)return;const ve=v(Y);return ve===void 0?void 0:I(H,ve)}async function E(H,Y){return H!=null&&e.thinkingBySession[H]===void 0&&await s(H),_(H,Y)}function N(H){e.thinking=H;const Y=e.activeSessionId;return H!==void 0&&Y!==null&&Y!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Y]:H},g3(e,Y)),H}Ge([()=>e.activeSessionId,()=>x(),()=>{const H=e.activeSessionId;return H==null?void 0:e.thinkingBySession[H]}],()=>{const H=v(x());H!==void 0&&(e.thinking=I(e.activeSessionId,H))});function D(H){n.setConfig({thinking:qee(H,v(x())?.supportEfforts)}).catch(Y=>i("setConfig",Y))}async function T(H){try{const Y=await n.listSkills(H);y.value={...y.value,[H]:Y}}catch{}}async function $(H){try{const Y=await n.listSkillsForWorkspace(H);w.value={...w.value,[H]:Y}}catch{}}async function O(){try{g.value=await n.listModels();const H=v(x());H!==void 0&&(e.thinking=I(e.activeSessionId,H))}catch(H){i("loadModels",H)}}async function P(){try{k.value=await n.listProviders()}catch(H){i("loadProviders",H)}}async function R(H){const Y=e.activeSessionId,ve=v(H),re=e.thinking,se=Y?e.sessions.find(ge=>ge.id===Y)?.model:void 0,U=x()!==(ve?.id??H),J=Uee(ve,re,U);if(!Y)return A.value=H,e.thinking=J,J!==re&&J!==void 0&&D(J),!0;a(Y,ge=>({...ge,model:H}));let ce;J!==re&&(e.thinking=J,J!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Y]:J},ce=g3(e,Y)));try{await n.updateSession(Y,{model:H,thinking:J!==re?J:void 0})}catch(ge){return a(Y,Me=>({...Me,model:se??Me.model})),J!==re&&(e.thinking=re,re!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Y]:re}),Ca(e,Y,ce)&&s(Y)),i("setModel",ge,{sessionId:Y}),!1}return J!==re&&J!==void 0&&D(J),Ca(e,Y,ce),await s(Y),!0}function j(H){const Y=new Set(m.value);Y.has(H)?Y.delete(H):Y.add(H),m.value=Array.from(Y),Hke(m.value)}async function z(H,Y,ve,re,se){const U=re??e.activeSessionId;if(!U)return!1;const J=l.value==="idle"&&!e.inFlightBySession[U],ce=`msg_skill_opt_${Date.now().toString(36)}`,ge=J?f(U):void 0;let Me=!1;if(J){e.inFlightBySession={...e.inFlightBySession,[U]:!0};const Pe={id:ce,sessionId:U,role:"user",content:[{type:"text",text:`/${H}${Y?` ${Y}`:""}`},...S8(ve)],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:H,skillArgs:Y}}};u(U,ke=>[...ke,Pe])}try{if(se?.skipThinkingPersist!==!0){const Pe=e.sessions.find(Fe=>Fe.id===U)?.model,ke=(Pe&&Pe.length>0?Pe:e.defaultModel)??void 0,Le=e.planArmedBySession[U]??!1;if(!await o({thinking:await E(U,ke)??e.thinking,swarmMode:e.swarmModeBySession?.[U]??!1,permissionMode:e.permission,...Le?{planMode:!0}:{}},U))throw RS;Le&&(e.planArmedBySession={...e.planArmedBySession,[U]:!1},r(),e.planModeBySession={...e.planModeBySession,[U]:!0})}return Me=!0,await n.activateSkill(U,H,Y,S8(ve)),!0}catch(Pe){return J&&(e.inFlightBySession={...e.inFlightBySession,[U]:!1},u(U,ke=>ke.filter(Le=>Le.id!==ce))),Pe!==RS&&i("activateSkill",Pe,{sessionId:U}),!(!Me||Pe instanceof au)}finally{ge!==void 0&&p(U,ge)}}async function K(H){return n.getProvider(H)}async function q(H){try{return await n.addProvider(H),await Promise.all([P(),O(),c()]),await d(),null}catch(Y){return ga("[kimi-code] operation failed: addProvider",Y),Y instanceof Error?Y.message:String(Y)}}async function W(H,Y){try{return await n.updateProvider(H,Y),await Promise.all([P(),O(),c()]),null}catch(ve){return ga("[kimi-code] operation failed: updateProvider",ve),ve instanceof Error?ve.message:String(ve)}}async function Z(H){try{const Y=await n.deleteProvider(H);return await Promise.all([P(),O(),c()]),await d(),Y}catch(Y){return i("deleteProvider",Y),null}}async function ne(H){try{const Y=await n.refreshProvider(H);for(const ve of Y.failed)i("refreshProvider",new Error(ve.reason),{message:ve.provider});await Promise.all([P(),O(),c()])}catch(Y){i("refreshProvider",Y)}}async function X(){try{const H=await n.refreshAllProviders();for(const Y of H.failed)i("refreshAllProviders",new Error(Y.reason),{message:Y.provider});await Promise.all([P(),O(),c()])}catch(H){i("refreshAllProviders",H)}}async function ue(){try{return{kind:"ok",items:await n.listCatalogProviders()}}catch(H){return H instanceof au&&H.code===void 0?{kind:"unsupported"}:(ga("[kimi-code] operation failed: loadCatalogProviders",H),{kind:"error"})}}async function ie(H){try{return await n.importCatalogProvider(H),await Promise.all([P(),O(),c()]),await d(),null}catch(Y){return ga("[kimi-code] operation failed: importCatalogProvider",Y),Y instanceof Error?Y.message:String(Y)}}async function Se(H){try{const Y=await n.importCustomRegistry(H);return await Promise.all([P(),O(),c()]),await d(),Y}catch(Y){return ga("[kimi-code] operation failed: importCustomRegistry",Y),Y instanceof Error?Y.message:String(Y)}}async function fe(){try{return await n.startOAuthLogin()}catch{return null}}async function pe(){try{return await n.pollOAuthLogin()}catch(H){return Bl("[kimi-code] pollOAuthLogin failed",H),null}}async function Ne(){try{await n.cancelOAuthLogin()}catch{}}async function ee(){try{return await n.getUsage()}catch(H){return{kind:"error",message:H instanceof Error?H.message:String(H)}}}function ye(H){const Y=N(H);o({thinking:Y}),Y!==void 0&&D(Y)}return{models:g,starredModelIds:m,providers:k,draftModel:A,skillsBySession:y,skillsByWorkspace:w,loadSkillsForSession:T,loadSkillsForWorkspace:$,loadModels:O,loadProviders:P,setModel:R,thinkingLevelForModelId:S,thinkingLevelForSessionId:_,resolveThinkingForPrompt:E,toggleStarModel:j,activateSkill:z,addProvider:q,updateProvider:W,deleteProvider:Z,getProvider:K,loadCatalogProviders:ue,importCatalogProvider:ie,importCustomRegistry:Se,refreshProvider:ne,refreshAllProviders:X,startOAuthLogin:fe,pollOAuthLogin:pe,cancelOAuthLogin:Ne,getUsage:ee,setThinking:ye}}const qke=50,qg=5,ek=5,d2=50,Uke=40401,Kke=40402,Vke=40410,Zke=40409,Gke=40902,Qke=2e3,Yke=10;function p4(e){return Os(e)&&e.code===Gke}const Jke=40904;function Xke(e){return Os(e)&&e.code===Jke}function e6e(e){return!e||e.state!=="open"&&e.state!=="closed"&&e.state!=="merged"?null:{number:e.number,state:e.state,url:e.url}}function t6e(e,t){return e==null||t==null?e==null&&t==null:e.number===t.number&&e.state===t.state&&e.url===t.url}const pc=Es({}),ug=Es({}),g4=Es({}),Il=Es(new Set),Iv=new Map,Yc=new Map,f2=new Map;let n6e=0;const yc=new Map,i6e=3,s6e=3,Ug=new Map;function o6e(e){const t=Ug.get(e);if(!(t!==void 0&&(t.done||t.attempts>=s6e))){Ug.set(e,{attempts:(t?.attempts??0)+1,done:!1});try{jt().generateSessionTitle(e,{source:"first_turn"}).then(n=>{n!==null&&Ug.set(e,{attempts:0,done:!0})}).catch(()=>{})}catch{}}}let OS=0;function r6e(){return OS+=1,`${Date.now().toString(36)}-${OS}`}function l6e(e){return{generation:Iv.get(e)??0,pending:(Yc.get(e)?.size??0)>0}}function M8(e){const t=++n6e;Iv.set(e,t);const n=Yc.get(e)??new Set;return n.add(t),Yc.set(e,n),t}function I8(e,t){const n=Yc.get(e);if(n===void 0||(n.delete(t),n.size>0))return;Yc.delete(e);const i=f2.get(e);f2.delete(e),i?.()}function a6e(e){Iv.delete(e),Yc.delete(e),f2.delete(e),yc.delete(e)}function u6e(e,t){return!t.pending&&t.generation===(Iv.get(e)??0)}function c6e(e,t){if((Yc.get(e)?.size??0)===0){t();return}f2.set(e,t)}function d6e(e,t){const{t:n}=jn.global,{confirm:i}=ju(),{taskPoller:s,sideChat:o,modelProvider:r,pushOperationFailure:l,notify:a,activity:u,sessionsKnownEmpty:c,setSessions:d,updateSession:f,upsertSessionSorted:p,appendSession:g,forgetSession:m,unpinSessions:y,setActiveSessionId:w,updateSessionMessages:k,nextOptimisticMsgId:A,getEventConn:v,syncSessionFromSnapshot:x,reopenSession:S,hasLoadedMessages:I,refreshSessionStatus:_,refreshSessionGoal:E,refillSessionGoalOnReload:N,refreshSessionPlans:D,settlePlanReviewLocally:T,persistSessionProfile:$,mergedWorkspaces:O,workspacesView:P,status:R,workspaceIdForSession:j,savePermissionToStorage:z,savePlanModeToStorage:K,saveSwarmModeToStorage:q,saveGoalModeToStorage:W,draftModes:Z,saveUnread:ne,saveActiveWorkspaceToStorage:X,saveHiddenWorkspacesToStorage:ue,goalErrorMessage:ie,initialized:Se,connectIssue:fe,selectedDiffPath:pe,fileDiffLines:Ne,fileDiffLoading:ee,fileDiffTexts:ye,fileDiffEmptyFile:H}=t;let Y=0,ve=!1;function re(oe,Ae,_e,Oe){k(oe,Qe=>{const Ye=Qe.findIndex(Pt=>Pt.id===Ae);if(Ye===-1)return Qe;const xt=Qe.findIndex((Pt,wn)=>wn!==Ye&&Pt.role==="user"&&(Pt.id===Oe||Pt.userMessageId===Oe||Pt.promptId===_e)),bt=Qe[Ye],nn=xt===-1?bt:Qe[xt];return Qe.flatMap((Pt,wn)=>wn===xt?[]:wn!==Ye?[Pt]:[{...nn,id:bt.id,promptId:_e,userMessageId:Oe,metadata:{...nn.metadata,...bt.metadata}}])})}async function se(oe){if(e.messagesLoadingMoreBySession[oe])return;const Ae=e.messagesBySession[oe];if(!Ae||Ae.length===0)return;const _e=Ae[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[oe]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[oe]:!1};try{const Oe=await jt().listMessages(oe,{beforeId:_e,pageSize:qke}),Qe=[...Oe.items].reverse();k(oe,Ye=>[...Qe,...Ye]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[oe]:Oe.hasMore}}catch(Oe){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[oe]:!0},l("loadOlderMessages",Oe,{sessionId:oe})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[oe]:!1}}}function U(oe,Ae){s.loadTasksForSession(oe),ge(oe),Ae?.skipStatus!==!0&&_(oe),E(oe),D(oe),Object.prototype.hasOwnProperty.call(r.skillsBySession.value,oe)||r.loadSkillsForSession(oe)}async function J(oe){const Ae=e.activeSessionId;if(Ae){pe.value=oe,Ne.value=[],ye.value=null,H.value=!1,ee.value=!0;try{const Oe=await jt().getFileDiff(Ae,oe);if(pe.value!==oe||e.activeSessionId!==Ae)return;const Qe=QX(Oe.diff);if(Ne.value=Qe,Qe.length===0){const xt=await wi(oe).catch(()=>null);if(pe.value!==oe||e.activeSessionId!==Ae)return;H.value=xt!==null&&xt.size===0;return}ee.value=!1;const Ye=await RX(Qe,{truncated:Oe.truncated,readNewText:async()=>{const xt=await wi(oe).catch(()=>null);return!xt||xt.isBinary||xt.encoding!=="utf-8"?null:xt.content}});if(pe.value!==oe||e.activeSessionId!==Ae)return;ye.value=Ye}catch(_e){pe.value===oe&&(Ne.value=[]),Bl("[loadFileDiff] diff unavailable for",oe,_e)}finally{pe.value===oe&&(ee.value=!1)}}}function ce(){pe.value=null,Ne.value=[],ye.value=null,H.value=!1,ee.value=!1}async function ge(oe){try{const _e=await jt().getGitStatus(oe);e.gitStatusBySession={...e.gitStatusBySession,[oe]:_e};const Oe=e6e(_e.pullRequest);f(oe,Qe=>t6e(Qe.pullRequest,Oe)?Qe:{...Qe,pullRequest:Oe})}catch{}}let Me=0;async function Pe(oe){try{const Ae=await jt().getUserInfo();if(oe!==Me||e.managedProviderStatus!=="authenticated")return;e.managedUserInfo=Ae.kind==="ok"?Ae.userInfo:null,Ae.kind==="ok"?e.managedMembership=Ae.userInfo.userLevel===Yke?"free":"member":e.managedMembership=Ae.status===402?"free":null}catch{if(oe!==Me)return;e.managedProviderStatus==="authenticated"&&(e.managedUserInfo=null,e.managedMembership=null)}}async function ke(){e.managedProviderStatus==="authenticated"&&await Pe(++Me)}async function Le(){const oe=++Me;try{const _e=await jt().getAuth();return e.authReady=_e.ready,e.defaultModel=_e.defaultModel,e.managedProviderStatus=_e.managedProvider?.status??null,e.managedProviderStatus==="authenticated"?Pe(oe):(e.managedUserInfo=null,e.managedMembership=null),fe.value=null,"proceed"}catch(Ae){return Os(Ae)&&(Ae.code===401||Ae.code===zE)?(fe.value=null,"server-auth-required"):(fe.value=(Ae instanceof Error?Ae.message:String(Ae)).slice(0,140),"retry")}}async function it(){let oe=!0;for(;;){const Ae=await Le();if(Ae!=="retry")return Ae;oe&&(fe.value=null,oe=!1),await new Promise(_e=>{setTimeout(_e,Qke)})}}async function Fe(){try{const oe=jt();e.config=await oe.getConfig()}catch{}}async function De(oe){try{const _e=await jt().setConfig(oe);return e.config=_e,e.defaultModel=_e.defaultModel??null,!0}catch(Ae){return l("setConfig",Ae),!1}}const Ke=100,gt=720*60*1e3;async function lt(oe){const Ae=jt(),_e=[];let Oe,Qe;for(;oe?.shouldContinue?.()!==!1;){let Ye;try{Ye=await Ae.listSessions({pageSize:Ke,beforeId:Oe,excludeEmpty:!0})}catch(xt){if(_e.length===0)throw xt;Qe=xt;break}if(_e.push(...Ye.items),!Ye.hasMore||Ye.items.length===0)break;Oe=Ye.items[Ye.items.length-1].id}return{sessions:_e,error:Qe}}function ft(oe){const Ae=new Map(e.sessions.map(_e=>[_e.id,_e]));d(oe.map(_e=>{const Oe=Ae.get(_e.id);if(Oe===void 0)return _e;const Qe=vm(_e.usage)&&!vm(Oe.usage),Ye=_e.pullRequest??Oe.pullRequest;return!Qe&&Ye===_e.pullRequest?_e:{..._e,usage:Qe?Oe.usage:_e.usage,pullRequest:Ye}}))}function Lt(oe){const Ae=[...oe],_e=new Set(Ae.map(Oe=>Oe.id));for(const Oe of e.sessions)_e.has(Oe.id)||(Ae.push(Oe),_e.add(Oe.id));return Ae.sort((Oe,Qe)=>new Date(Qe.updatedAt).getTime()-new Date(Oe.updatedAt).getTime()),Ae}async function bn(oe){const Ae=jt(),_e=[],Oe=Date.now(),Qe=Pt=>Oe-new Date(Pt.updatedAt).getTime();let Ye,xt=!1,bt=!0,nn;for(;;){let Pt;try{Pt=await Ae.listSessions({workspaceId:oe,pageSize:qg,beforeId:Ye,excludeEmpty:!0})}catch($t){if(bt)throw $t;nn=$t,xt=!0;break}if(xt=Pt.hasMore,Pt.items.length===0)break;const wn=Pt.items[Pt.items.length-1],Yn=Qe(wn)>=gt;if(!bt&&Yn){const $t=Pt.items.findIndex(Wn=>Qe(Wn)>=gt),Wt=$t>=0?$t+1:Pt.items.length;_e.push(...Pt.items.slice(0,Wt)),xt=Pt.hasMore||Wt<Pt.items.length;break}if(_e.push(...Pt.items),bt=!1,!Pt.hasMore||Yn)break;Ye=wn.id}return{workspaceId:oe,page:{items:_e,hasMore:xt},error:nn}}async function Gt(){const oe=e.workspaces;if(oe.length===0){const $t=await lt(),Wt=$t.error===void 0?$t.sessions:Lt($t.sessions);return e.sessionsHasMoreByWorkspace={},e.sessionsCursorByWorkspace={},e.sessionsInitialCountByWorkspace={},e.sessionsFullyLoaded=$t.error===void 0,$t.error!==void 0&&l("load",$t.error),Wt}const Ae=await Promise.allSettled(oe.map($t=>bn($t.id))),_e=[],Oe=new Set,Qe=new Map,Ye=new Set;let xt;for(let $t=0;$t<Ae.length;$t++){const Wt=Ae[$t];if(Wt.status==="fulfilled"){Qe.set(Wt.value.workspaceId,Wt.value.page),Wt.value.error!==void 0&&(Ye.size===0&&(xt=Wt.value.error),Ye.add(Wt.value.workspaceId));for(const Wn of Wt.value.page.items)Oe.has(Wn.id)||(_e.push(Wn),Oe.add(Wn.id));continue}Ye.size===0&&(xt=Wt.reason),Ye.add(oe[$t].id)}if(Qe.size===0){l("load",xt);return}const bt=new Set(oe.filter($t=>Ye.has($t.id)).map($t=>$t.root)),nn=new Set(oe.map($t=>$t.id));for(const $t of e.sessions)!($t.workspaceId!==void 0&&nn.has($t.workspaceId)?Ye.has($t.workspaceId):bt.has($t.cwd)||Ye.has(j($t)))||Oe.has($t.id)||(_e.push($t),Oe.add($t.id));const Pt={},wn={},Yn={};for(const{id:$t}of oe){const Wt=Qe.get($t);if(Wt===void 0){const Wn=e.sessionsHasMoreByWorkspace[$t],Ee=e.sessionsCursorByWorkspace[$t],ct=e.sessionsInitialCountByWorkspace[$t];Wn!==void 0&&(Pt[$t]=Wn),Ee!==void 0&&(wn[$t]=Ee),ct!==void 0&&(Yn[$t]=ct);continue}Pt[$t]=Wt.hasMore,wn[$t]=Wt.items.length>0?Wt.items[Wt.items.length-1].id:void 0,Yn[$t]=Math.max(Wt.items.length,qg)}return e.sessionsHasMoreByWorkspace=Pt,e.sessionsCursorByWorkspace=wn,e.sessionsInitialCountByWorkspace=Yn,e.sessionsFullyLoaded=!1,_e.sort(($t,Wt)=>new Date(Wt.updatedAt).getTime()-new Date($t.updatedAt).getTime()),Ye.size>0&&l("load",xt),_e}async function Qt(oe){if(!e.sessionsLoadingMoreByWorkspace[oe]&&e.sessionsHasMoreByWorkspace[oe]!==!1&&e.sessionsCursorByWorkspace[oe]!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[oe]:!0};try{let Ae=e.sessionsCursorByWorkspace[oe],_e;for(let Ye=0;Ye<3&&Ae!==void 0&&(_e=await jt().listSessions({workspaceId:oe,pageSize:ek,beforeId:Ae,excludeEmpty:!0}),e.sessionsCursorByWorkspace[oe]!==Ae);Ye+=1)_e=void 0,Ae=e.sessionsCursorByWorkspace[oe];if(_e===void 0)return;const Oe=new Set(e.sessions.map(Ye=>Ye.id)),Qe=_e.items.filter(Ye=>!Oe.has(Ye.id));Qe.length>0&&d([...e.sessions,...Qe]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[oe]:_e.items.length>0?_e.items[_e.items.length-1].id:Ae},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[oe]:_e.hasMore}}catch(Ae){l("loadMoreSessions",Ae)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[oe]:!1}}}}function kn(oe){return e.sessions.filter(Ae=>!Ae.parentSessionId&&j(Ae)===oe)}const _n=5;function je(oe,Ae){const _e=new Set(e.sessions.map(Ye=>Ye.id)),Oe=oe.items.filter(Ye=>!_e.has(Ye.id)&&(Ye.meta.last_prompt??"").length>0).map(VU);Oe.length>0&&d([...e.sessions,...Oe]);for(const Ye of oe.items)if(_e.has(Ye.id)&&Ye.git!==void 0){const xt=Ye.git.pull_request;f(Ye.id,bt=>bt.pullRequest===xt?bt:{...bt,pullRequest:xt})}if(oe.items.length>0){const Ye=Math.min(...oe.items.map(xt=>xt.meta.updated_at));e.flatSessionsFrontier=Ae?.resetFrontier===!0||e.flatSessionsFrontier===null?Ye:Math.min(e.flatSessionsFrontier,Ye)}e.flatSessionsNextPageToken=oe.nextPageToken,e.flatSessionsHasMore=oe.hasMore;const Qe=new Set(P.value.map(Ye=>Ye.id));return oe.items.filter(Ye=>(Ye.meta.last_prompt??"").length>0&&Qe.has(j({workspaceId:Ye.workspace.id,cwd:Ye.workspace.cwd??""}))).length}async function st(){const oe=await jt().listSessionsV2({pageSize:d2,include:"git"});je(oe,{resetFrontier:!0}),e.flatSessionsSeeded=!0}async function Ue(){if(!(e.flatSessionsSeeded||e.flatSessionsLoading)){e.flatSessionsLoading=!0;try{await st()}catch(oe){l("ensureFlatSessions",oe)}finally{e.flatSessionsLoading=!1}}}async function Ft(){if(!(e.flatSessionsLoading||e.flatSessionsLoadingMore)&&e.flatSessionsHasMore){e.flatSessionsLoadingMore=!0;try{if(!e.flatSessionsSeeded){await st();return}if(e.flatSessionsNextPageToken===null)return;for(let oe=0;oe<_n;oe+=1){const Ae=e.flatSessionsNextPageToken;if(Ae===null||!e.flatSessionsHasMore)break;let _e;try{_e=await jt().listSessionsV2({pageSize:d2,pageToken:Ae,include:"git"})}catch(Oe){if(!HU(Oe))throw Oe;e.flatSessionsNextPageToken=null,await st();break}if(je(_e)>0)break}}catch(oe){l("loadMoreFlatSessions",oe)}finally{e.flatSessionsLoadingMore=!1}}}async function Ct(oe,Ae,_e,Oe){if(e.sessionsCursorByWorkspace[oe]===Ae){const Ye=new Date(_e).getTime();let xt;for(const bt of e.sessions){if(j(bt)!==oe)continue;const nn=new Date(bt.updatedAt).getTime();nn<=Ye||(xt===void 0||nn<new Date(xt.updatedAt).getTime())&&(xt=bt)}e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[oe]:xt?.id}}let Qe=3;for(;Qe>0&&kn(oe).length<Oe&&(e.sessionsHasMoreByWorkspace[oe]??!1);){const Ye=e.sessionsCursorByWorkspace[oe],xt=kn(oe).length;if(Ye===void 0)try{const bt=await jt().listSessions({workspaceId:oe,pageSize:qg,excludeEmpty:!0}),nn=new Set(e.sessions.map(wn=>wn.id)),Pt=bt.items.filter(wn=>!nn.has(wn.id));Pt.length>0&&d([...e.sessions,...Pt].sort((wn,Yn)=>new Date(Yn.updatedAt).getTime()-new Date(wn.updatedAt).getTime())),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[oe]:bt.items.length>0?bt.items[bt.items.length-1].id:void 0},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[oe]:bt.hasMore}}catch(bt){l("loadMoreSessions",bt);break}else await Qt(oe);if(Qe-=1,kn(oe).length===xt&&e.sessionsCursorByWorkspace[oe]===Ye)break}}async function Fn(){if(e.sessionsFullyLoaded)return;const oe=await lt().catch(Oe=>(Bl("[kimi-web] loadAllSessions failed; search covers only loaded sessions",Oe),null));if(oe===null)return;const Ae=oe.error===void 0?oe.sessions:Lt(oe.sessions);if(ft(Ae),e.sessionsFullyLoaded=oe.error===void 0,oe.error!==void 0)return;const _e={};for(const Oe of e.workspaces)_e[Oe.id]=!1;e.sessionsHasMoreByWorkspace=_e}async function In(){const oe=await jt().getMeta().catch(()=>null);oe!==null&&(e.serverVersion=oe.serverVersion,e.availableOpenInApps=oe.openInApps,e.dangerousBypassAuth=oe.dangerousBypassAuth,e.experimentalFlags=oe.experimentalFlags,e.backend=oe.backend)}async function ks(){const oe=Date.now();let Ae="accepted";Lo("app:load:start"),e.loading=!0;const _e=!Se.value;let Oe=!0;try{if(_e&&await it()==="server-auth-required"){Oe=!1,Ae="auth-required";return}const Qe=jt();await Promise.all([Qe.getHealth().catch(()=>null),In(),r.loadModels()]),_e||await Le(),await Fe(),await Zt();const Ye=await Gt(),xt=Ye??e.sessions;if(Ye!==void 0&&ft(Ye),!_e&&Ye!==void 0&&e.flatSessionsSeeded){e.flatSessionsSeeded=!1,e.flatSessionsNextPageToken=null,e.flatSessionsHasMore=!0,e.flatSessionsFrontier=null;try{await st()}catch($t){l("ensureFlatSessions",$t)}}const bt=DL().filter($t=>!e.sessions.some(Wt=>Wt.id===$t));if(bt.length>0){const $t=await Promise.all(bt.map(Wn=>wo(Wn))),Wt=bt.filter((Wn,Ee)=>$t[Ee]==="stale");Wt.length>0&&y(Wt)}for(const $t of e.sessions)($t.mainTurnActive??$t.busy)&&e.goalBySession[$t.id]===void 0&&N($t.id);const nn=xt[0],Pt=e.activeWorkspaceId;!(Pt!==null&&O.value.some($t=>$t.id===Pt))&&nn&&Rn(j(nn)),ii();const Yn=typeof window<"u"?kC(window.location):void 0;!e.activeSessionId&&Yn!==void 0&&(e.sessions.some(Wt=>Wt.id===Yn)||await Hs(Yn))&&await On(Yn,{urlMode:"replace"}),!e.activeSessionId&&xt.length>0&&await On(xt[0].id,{urlMode:"replace"})}catch(Qe){Ae="failed",l("load",Qe)}finally{e.loading=!1,Oe&&(Se.value=!0),Lo("app:load:complete",{status:Ae,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-oe})}}async function Zt(){try{const oe=jt(),[Ae,_e]=await Promise.all([oe.listWorkspaces().catch(()=>[]),oe.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=li(Ae),e.fsHome=_e.home||null,e.recentRoots=_e.recentRoots}catch{}}function li(oe){const Ae=R0();return Object.keys(Ae).length===0?oe:oe.map(_e=>{const Oe=Ae[_e.root];return Oe!==void 0?{..._e,name:Oe}:_e})}function Rn(oe){e.activeWorkspaceId=oe,X(oe)}function Sn(oe){Rn(oe);const Ae=e.sessions.filter(_e=>j(_e)===oe);if(Ae.length>0){const _e=Ae[0];_e&&_e.id!==e.activeSessionId&&On(_e.id)}else w(void 0),zi(void 0,"push")}function Qn(oe){const Ae=R0()[oe.root],_e=Ae!==void 0?{...oe,name:Ae}:oe,Oe=Jr(_e.root);e.hiddenWorkspaceRoots.some(xt=>Jr(xt)===Oe)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(xt=>Jr(xt)!==Oe),ue(e.hiddenWorkspaceRoots));const Qe=e.workspaces.findIndex(xt=>xt.id===_e.id||xt.root===_e.root);if(Qe===-1){e.workspaces=[_e,...e.workspaces];return}const Ye=[...e.workspaces];Ye[Qe]=_e,e.workspaces=Ye}function os(oe){if(oe.type==="workspaceCreated"||oe.type==="workspaceUpdated"){Qn(oe.workspace);return}const Ae=e.workspaces.find(Oe=>Oe.id===oe.workspaceId)?.root??oe.root;if(Ae&&!e.hiddenWorkspaceRoots.includes(Ae)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Ae],ue(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(Oe=>Oe.id!==oe.workspaceId&&Oe.root!==Ae),e.activeWorkspaceId===oe.workspaceId||e.activeWorkspaceId===Ae){const Oe=P.value[0]?.id??null;if(e.activeWorkspaceId=Oe,Oe)X(Oe);else try{sr(cn.activeWorkspace)}catch{}w(void 0),e.sessionLoading=!1,ce(),zi(void 0,"replace")}}function As(){w(void 0),zi(void 0,"push")}function Tt(oe){Rn(oe),As(),ce()}async function Ci(oe){const Ae=O.value.find(wn=>wn.id===oe);if(!Ae)return null;const _e=e.thinking,Oe=jt();let Qe,Ye=Ae.root;try{const wn=await Oe.addWorkspace({root:Ae.root});Qe=wn.id,Ye=wn.root,Qn(wn)}catch{}const xt=r.draftModel.value??void 0,bt=await Oe.createSession({workspaceId:Qe,cwd:Ye,model:xt});r.draftModel.value=null;const nn=xt!==void 0&&(!bt.model||bt.model.length===0)?{...bt,model:xt}:bt;p(nn);const Pt=bt.id;return _e!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Pt]:_e},g3(e,Pt)),Rn(bt.workspaceId??Qe??oe),await On(bt.id,{skipStatusRefresh:!0}),Z.planMode&&(e.planArmedBySession={...e.planArmedBySession,[Pt]:!0},K()),Z.swarmMode&&(e.swarmModeBySession={...e.swarmModeBySession,[Pt]:!0},q()),Z.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[Pt]:!0},W()),Z.planMode=!1,Z.swarmMode=!1,Z.goalMode=!1,Pt}async function rs(oe,Ae,_e){if(Il.has(oe))return null;Il.add(oe);let Oe=null;try{const Qe=await Ci(oe);return Qe?(Oe=Qe,await $n(Qe,Ae,_e),Qe):null}catch(Qe){return l("startSessionAndSendPrompt",Qe),Oe}finally{Il.delete(oe)}}async function Bn(oe,Ae,_e,Oe){if(Il.has(oe))return null;Il.add(oe);let Qe=null;try{const Ye=await Ci(oe);if(!Ye)return null;Qe=Ye;const xt=e.planArmedBySession[Ye]??!1,bt=e.swarmModeBySession[Ye]??!1,nn=e.sessions.find($t=>$t.id===Ye),Pt=(nn?.model&&nn.model.length>0?nn.model:e.defaultModel)??void 0,wn=await r.resolveThinkingForPrompt(Ye,Pt)??e.thinking;return await $({model:Pt,planMode:xt,swarmMode:bt,permissionMode:e.permission,thinking:wn},Ye)&&(xt&&(e.planArmedBySession={...e.planArmedBySession,[Ye]:!1},K(),e.planModeBySession={...e.planModeBySession,[Ye]:!0}),await r.activateSkill(Ae,_e,Oe,Ye,{skipThinkingPersist:!0})),Ye}catch(Ye){return l("startSessionAndActivateSkill",Ye),Qe}finally{Il.delete(oe)}}async function Co(oe,Ae){if(Il.has(oe))return null;Il.add(oe);let _e=null;try{const Oe=await Ci(oe);return Oe?(_e=Oe,await o.openSideChatOn(Oe,Ae),Oe):null}catch(Oe){return l("startSessionAndOpenSideChat",Oe),_e}finally{Il.delete(oe)}}async function Mi(oe){const Ae=oe.trim();if(!Ae)return!1;const _e=jt();try{const Oe=await _e.addWorkspace({root:Ae});return Qn(Oe),Tt(Oe.id),!0}catch(Oe){return Bl("[kimi-web] addWorkspaceByPath failed for",Ae,Oe),!1}}async function Ei(oe){try{return await jt().browseFs(oe)}catch{return{path:"",parent:null,entries:[]}}}async function ro(){try{return await jt().getFsHome()}catch{return{home:"",recentRoots:[]}}}function zi(oe,Ae){if(Ae==="none"||typeof window>"u"||!window.history)return;const _e=Ote(oe);if(window.location.pathname!==_e)try{Ae==="push"?window.history.pushState(null,"",_e):window.history.replaceState(null,"",_e)}catch{}}async function Hs(oe){try{const Ae=await jt().getSession(oe);return e.sessions.some(_e=>_e.id===Ae.id)||g(Ae),!0}catch{return!1}}async function wo(oe){try{const Ae=await jt().getSession(oe);return Ae.archived?"stale":(e.sessions.some(_e=>_e.id===Ae.id)||g(Ae),"ok")}catch(Ae){return Os(Ae)&&Ae.code===Uke?"stale":"retry"}}function Cs(){const oe=kC(window.location);if(oe===void 0){w(void 0);return}if(oe!==e.activeSessionId){if(e.sessions.some(Ae=>Ae.id===oe)){On(oe,{urlMode:"none"});return}(async()=>{if(await Hs(oe)){await On(oe,{urlMode:"none"});return}const Ae=e.sessions[0];Ae?await On(Ae.id,{urlMode:"replace"}):(w(void 0),zi(void 0,"replace"))})()}}let Ti=!1;function ii(){Ti||typeof window>"u"||(Ti=!0,window.addEventListener("popstate",Cs))}async function On(oe,Ae){if(!e.sessions.some(Qe=>Qe.id===oe)){const Qe=++Y;if(!await Hs(oe)||Qe!==Y)return}const _e=I(oe),Oe=!_e&&c.has(oe);c.delete(oe);try{zi(oe,Ae?.urlMode??"push"),e.sessionLoading=!_e&&!Oe,w(oe),e.unreadBySession[oe]&&(e.unreadBySession={...e.unreadBySession,[oe]:!1},ne({[oe]:!1})),ce();const Qe=e.sessions.find(Ye=>Ye.id===oe);if(Qe){const Ye=j(Qe);e.activeWorkspaceId!==Ye&&Rn(Ye)}if(_e){if(await S(oe)==="not-found")return}else if(await x(oe,{skipStatusRefresh:Ae?.skipStatusRefresh===!0})==="not-found")return;U(oe,{skipStatus:Ae?.skipStatusRefresh===!0})}catch(Qe){l("selectSession",Qe,{sessionId:oe})}finally{e.activeSessionId===oe&&(e.sessionLoading=!1)}}async function $n(oe,Ae,_e){const Oe=M8(oe);e.inFlightBySession={...e.inFlightBySession,[oe]:!0};const Qe=A();let Ye=e.pendingThinkingBySession[oe];try{const xt=jt(),bt=[];if(Ae&&bt.push({type:"text",text:Ae}),bt.push(...S8(_e)),bt.length===0)return e.inFlightBySession={...e.inFlightBySession,[oe]:!1},"rejected";const nn={id:Qe,sessionId:oe,role:"user",content:bt,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};k(oe,dt=>[...dt,nn]);const Pt=e.sessions.find(dt=>dt.id===oe),wn=(Pt?.model&&Pt.model.length>0?Pt.model:e.defaultModel)??void 0,Yn=e.planArmedBySession[oe]??!1,$t=Yn||(e.planModeBySession[oe]??!1),Wt=e.swarmModeBySession[oe]??!1,Wn=e.goalModeBySession[oe]??!1;Yn&&(e.planArmedBySession={...e.planArmedBySession,[oe]:!1},K(),(e.planModeBySession[oe]??!1)||(await xt.updateSession(oe,{planMode:!0}),e.planModeBySession={...e.planModeBySession,[oe]:!0})),Wn&&Ae&&(await xt.updateSession(oe,{goalObjective:Ae.trim(),planMode:!1}),e.planModeBySession={...e.planModeBySession,[oe]:!1});const Ee=await r.resolveThinkingForPrompt(oe,wn)??e.thinking;Ye=e.pendingThinkingBySession[oe];const ct=await xt.submitPrompt(oe,{content:bt,model:wn,thinking:Ee,permissionMode:e.permission,planMode:$t&&!(Wn&&Ae),swarmMode:Wt});return Ee!==void 0&&Ca(e,oe,Ye),Wn&&Ae&&(e.goalModeBySession={...e.goalModeBySession,[oe]:!1},W()),e.promptIdBySession={...e.promptIdBySession,[oe]:ct.promptId},re(oe,Qe,ct.promptId,ct.userMessageId),v()?.bindNextPromptId(oe,ct.promptId),"ok"}catch(xt){return e.inFlightBySession={...e.inFlightBySession,[oe]:!1},k(oe,bt=>bt.some(nn=>nn.id===Qe)?bt.filter(nn=>nn.id!==Qe||nn.promptId!==void 0||nn.userMessageId!==void 0):bt),Ca(e,oe,Ye)&&_(oe),l("sendPrompt",xt,{sessionId:oe}),Os(xt)?"rejected":"uncertain"}finally{I8(oe,Oe)}}async function Tn(oe,Ae){const _e=e.activeSessionId;if(_e){if(u.value!=="idle"||e.inFlightBySession[_e]){Rt(oe,Ae);return}if((e.queuedBySession[_e]?.length??0)>0){Rt(oe,Ae),Ot(_e);return}await $n(_e,oe,Ae)}}async function tt(oe,Ae){const _e=e.activeSessionId;if(!_e)return;const Oe=e.queuedBySession[_e]??[],Qe=[],Ye=[];for(const Wt of Oe){const Wn=Wt.text.trim();Wn&&Qe.push(Wn),Wt.attachments?.length&&Ye.push(...Wt.attachments)}const xt=oe.trim();if(xt&&Qe.push(xt),Ae?.length&&Ye.push(...Ae),Qe.length===0&&Ye.length===0)return;Oe.length>0&&(e.queuedBySession={...e.queuedBySession,[_e]:[]});const bt=Qe.join(` - -`),nn=()=>{if(Oe.length===0)return;const Wt=e.queuedBySession[_e]??[];e.queuedBySession={...e.queuedBySession,[_e]:[...Oe,...Wt]}};if(u.value==="idle"&&!e.inFlightBySession[_e]){await $n(_e,bt,Ye)==="rejected"&&nn();return}const Pt=[];bt&&Pt.push({type:"text",text:bt});for(const Wt of Ye)Wt.kind==="video"?Pt.push({type:"video",source:{kind:"file",fileId:Wt.fileId}}):Wt.kind==="file"?Pt.push({type:"file",fileId:Wt.fileId,name:Wt.name??"",mediaType:Wt.mediaType||"application/octet-stream",size:Wt.size??0}):Pt.push({type:"image",source:{kind:"file",fileId:Wt.fileId}});const wn=A(),Yn={id:wn,sessionId:_e,role:"user",content:Pt,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};k(_e,Wt=>[...Wt,Yn]);const $t=M8(_e);try{const Wt=jt(),Wn=e.sessions.find(yi=>yi.id===_e),Ee=(Wn?.model&&Wn.model.length>0?Wn.model:e.defaultModel)??void 0,ct=await r.resolveThinkingForPrompt(_e,Ee)??e.thinking,dt=e.pendingThinkingBySession[_e],qt=await Wt.submitPrompt(_e,{content:Pt,model:Ee,thinking:ct,permissionMode:e.permission,planMode:e.planModeBySession[_e]??!1,swarmMode:e.swarmModeBySession[_e]??!1});if(ct!==void 0&&Ca(e,_e,dt),re(_e,wn,qt.promptId,qt.userMessageId),qt.status!=="queued"){e.promptIdBySession={...e.promptIdBySession,[_e]:qt.promptId},v()?.bindNextPromptId(_e,qt.promptId);return}try{await Wt.steerPrompts(_e,[qt.promptId])}catch{}}catch(Wt){k(_e,Wn=>Wn.filter(Ee=>Ee.id!==wn||Ee.promptId!==void 0||Ee.userMessageId!==void 0)),Os(Wt)&&nn(),l("steer",Wt,{sessionId:_e})}finally{I8(_e,$t)}}async function Je(oe,Ae){try{const Oe=await jt().uploadFile({file:oe,name:Ae});return{fileId:Oe.id,name:Oe.name,mediaType:Oe.mediaType}}catch(_e){return l("uploadImage",_e),null}}function Rt(oe,Ae){const _e=e.activeSessionId;if(!_e)return;const Oe=e.queuedBySession[_e]??[],Qe={text:oe,attachments:Ae,id:r6e()};e.queuedBySession={...e.queuedBySession,[_e]:[...Oe,Qe]}}function Ot(oe){const[Ae,..._e]=e.queuedBySession[oe]??[];Ae!==void 0&&(e.queuedBySession={...e.queuedBySession,[oe]:_e},$n(oe,Ae.text,Ae.attachments).then(Oe=>{if(Oe==="ok"){yc.delete(oe);return}if(Oe==="uncertain"){yc.delete(oe);return}if(!e.sessions.some(nn=>nn.id===oe)){yc.delete(oe);return}const Qe=Ae.id??Ae.text,Ye=yc.get(oe),xt=Ye!==void 0&&Ye.key===Qe?Ye.count+1:1;if(xt>=i6e){yc.delete(oe),(e.queuedBySession[oe]?.length??0)>0&&Ot(oe);return}yc.set(oe,{key:Qe,count:xt});const bt=e.queuedBySession[oe]??[];e.queuedBySession={...e.queuedBySession,[oe]:[Ae,...bt]}}))}function ai(oe,Ae){const _e=e.inFlightBySession[oe]===!0;if(e.inFlightBySession={...e.inFlightBySession,[oe]:!1},e.promptIdBySession[oe]!==void 0){const Qe={...e.promptIdBySession};delete Qe[oe],e.promptIdBySession=Qe}return(_e||Ae?.turnWasActive===!0||(e.turnActiveBySession[oe]??!1))&&Ot(oe),_e}function Ns(oe,Ae){Ae.inFlightTurn!==null&&Ae.busy||ai(oe)}async function Ln(){const oe=e.activeSessionId;if(!oe)return!1;const Ae=e.sessions.find(bt=>bt.id===oe);let _e=e.promptIdBySession[oe];if(_e===void 0){const bt=Ae?.currentPromptId;bt!==void 0&&bt.length>0&&!bt.startsWith("pr_")&&(_e=bt)}const Oe=jt();let Qe=!1;const Ye=()=>{e.inFlightBySession={...e.inFlightBySession,[oe]:!1},e.turnActiveBySession={...e.turnActiveBySession,[oe]:!1}};if(_e!==void 0)try{if((await Oe.abortPrompt(oe,_e)).aborted)return!0;Qe=!0;const nn={...e.promptIdBySession};delete nn[oe],e.promptIdBySession=nn,Ye()}catch(bt){if(Os(bt)&&bt.code===Kke){Qe=!0;const nn={...e.promptIdBySession};delete nn[oe],e.promptIdBySession=nn,Ye()}else return l("abortCurrentPrompt",bt,{sessionId:oe}),!1}if(Qe||!((e.inFlightBySession[oe]??!1)||(e.turnActiveBySession[oe]??!1)||(Ae?.mainTurnActive??!1)))return!1;try{return(await Oe.abortSession(oe)).aborted===!0}catch(bt){return l("abortCurrentPrompt",bt,{sessionId:oe}),!1}}function ls(oe,Ae){const _e=e.approvalsBySession[oe]??[];e.approvalsBySession={...e.approvalsBySession,[oe]:_e.filter(Oe=>Oe.approvalId!==Ae)}}function ts(oe,Ae){const _e=e.questionsBySession[oe]??[];e.questionsBySession={...e.questionsBySession,[oe]:_e.filter(Oe=>Oe.questionId!==Ae)}}async function Vi(oe,Ae){const _e=e.activeSessionId;if(!_e||ug[oe])return;ug[oe]=!0;const Oe=e.approvalsBySession[_e]?.find(Qe=>Qe.approvalId===oe&&Qe.toolName==="ExitPlanMode")?.toolCallId;try{const Qe=jt(),Ye={decision:Ae.decision,scope:Ae.scope,feedback:Ae.feedback,selectedLabel:Ae.selectedLabel};await Qe.respondApproval(_e,oe,Ye),ls(_e,oe),Oe!==void 0&&(T(_e,Oe,{state:Ae.decision,selectedOption:Ae.selectedLabel,feedback:Ae.feedback}),D(_e,Oe))}catch(Qe){p4(Qe)?(ls(_e,oe),Oe!==void 0&&D(_e,Oe)):l("respondApproval",Qe,{sessionId:_e})}finally{delete ug[oe]}}async function gi(oe,Ae){const _e=e.activeSessionId;if(_e&&!pc[oe]){pc[oe]="answer";try{await jt().respondQuestion(_e,oe,Ae),ts(_e,oe)}catch(Oe){p4(Oe)?ts(_e,oe):l("respondQuestion",Oe,{sessionId:_e})}finally{delete pc[oe]}}}async function an(oe){const Ae=e.activeSessionId;if(Ae&&!pc[oe]){pc[oe]="dismiss";try{await jt().dismissQuestion(Ae,oe),ts(Ae,oe)}catch(_e){p4(_e)?ts(Ae,oe):l("dismissQuestion",_e,{sessionId:Ae})}finally{delete pc[oe]}}}async function Zi(oe){const Ae=e.activeSessionId;if(Ae&&!g4[oe]){g4[oe]=!0;try{const _e=jt(),Oe=(e.tasksBySession[Ae]??[]).find(Ye=>Ye.id===oe)?.backgroundTaskId;await _e.cancelTask(Ae,Oe??oe);const Qe=e.tasksBySession[Ae]??[];e.tasksBySession={...e.tasksBySession,[Ae]:Qe.map(Ye=>Ye.id===oe?{...Ye,status:"cancelled",completedAt:Ye.completedAt??new Date().toISOString(),completedAtEstimated:Ye.completedAt===void 0?!0:Ye.completedAtEstimated}:Ye)}}catch(_e){Xke(_e)||l("cancelTask",_e,{sessionId:Ae})}finally{delete g4[oe]}}}function Ri(oe){const Ae=e.activeSessionId;Ae?(e.planArmedBySession={...e.planArmedBySession,[Ae]:oe},K(),!oe&&(e.planModeBySession[Ae]??!1)&&(e.planModeBySession={...e.planModeBySession,[Ae]:!1},$({planMode:!1},Ae))):Z.planMode=oe}function Vl(){const oe=e.activeSessionId,Ae=oe?(e.planArmedBySession[oe]??!1)||(e.planModeBySession[oe]??!1):Z.planMode;Ri(!Ae)}function Ro(oe){const Ae=e.activeSessionId;Ae?(e.swarmModeBySession={...e.swarmModeBySession,[Ae]:oe},q(),$({swarmMode:oe})):Z.swarmMode=oe}async function Sr(){const oe=e.activeSessionId,_e=!(oe?e.swarmModeBySession[oe]??!1:Z.swarmMode);_e&&e.permission==="manual"&&!await i({title:n("workspace.swarmEnableTitle"),message:n("workspace.swarmEnableConfirm"),variant:"primary"})||Ro(_e)}function Ws(oe){const Ae=e.activeSessionId;Ae?(e.goalModeBySession={...e.goalModeBySession,[Ae]:oe},W()):Z.goalMode=oe}function Li(){const oe=e.activeSessionId,Ae=oe?e.goalModeBySession[oe]??!1:Z.goalMode;Ws(!Ae)}async function Oi(oe){const Ae=oe.trim();if(!Ae||e.permission==="manual"&&!await i({title:n("workspace.goalStartTitle"),message:n("workspace.goalStartConfirm",{objective:Ae}),variant:"primary"}))return null;let _e=e.activeSessionId,Oe=null;if(!_e){const Qe=e.activeWorkspaceId,Ye=Qe&&P.value.some(xt=>xt.id===Qe)?Qe:P.value[0]?.id??null;if(!Ye)return null;try{_e=await Ci(Ye)??void 0,Oe=_e??null}catch(xt){return l("createGoal",xt),null}if(!_e)return null}try{await jt().updateSession(_e,{goalObjective:Ae,planMode:!1}),e.planModeBySession={...e.planModeBySession,[_e]:!1}}catch(Qe){return l("createGoal",Qe,{sessionId:_e,message:ie(Qe)}),Oe}return e.goalModeBySession[_e]&&(e.goalModeBySession={...e.goalModeBySession,[_e]:!1},W()),e.activeSessionId===_e?await Tn(Ae):await $n(_e,Ae),Oe}function Zl(oe){const Ae=e.activeSessionId;Ae&&Promise.resolve(jt().updateSession(Ae,{goalControl:oe})).catch(_e=>{l("controlGoal",_e,{sessionId:Ae,message:ie(_e)})})}function Fs(oe){e.permission=oe,z(oe),$({permissionMode:oe})}function rr(oe){const Ae=[...e.warnings];Ae.splice(oe,1),e.warnings=Ae}async function qs(oe,Ae){try{await jt().updateSession(oe,{title:Ae}),f(oe,Oe=>({...Oe,title:Ae}))}catch(_e){l("renameSession",_e,{sessionId:oe})}}async function Pi(oe){const Ae=await jt().generateSessionTitle(oe,{force:!0,source:"digest"});return Ae===null&&a({severity:"info",title:n("sidebar.genTitleUnavailable")}),Ae}async function ws(oe,Ae){const _e=e.workspaces.find(Qe=>Qe.id===oe)?.root,Oe=()=>{e.workspaces=e.workspaces.map(Qe=>Qe.id===oe?{...Qe,name:Ae}:Qe)};try{if(await jt().updateWorkspace(oe,{name:Ae}),_e!==void 0){const Qe=R0();_e in Qe&&(delete Qe[_e],GC(Qe))}Oe()}catch(Qe){if(_e!==void 0&&Os(Qe)&&Qe.code===Vke){GC({...R0(),[_e]:Ae}),Oe();return}l("renameWorkspace",Qe)}}async function lo(oe){const Ae=e.workspaces.find(Ye=>Ye.id===oe)?.root??O.value.find(Ye=>Ye.id===oe)?.root??oe,_e=e.activeSessionId?e.sessions.find(Ye=>Ye.id===e.activeSessionId):void 0,Oe=e.activeWorkspaceId===oe||e.activeWorkspaceId===Ae,Qe=!!(_e&&(_e.cwd===Ae||_e.workspaceId===oe||j(_e)===oe));Ae&&!e.hiddenWorkspaceRoots.includes(Ae)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Ae],ue(e.hiddenWorkspaceRoots));try{await jt().deleteWorkspace(oe)}catch(Ye){Bl("[kimi-web] deleteWorkspace registry cleanup failed for",oe,Ye)}if(e.workspaces=e.workspaces.filter(Ye=>Ye.id!==oe&&Ye.root!==Ae),Oe||Qe){const Ye=P.value[0]?.id??null;if(e.activeWorkspaceId=Ye,Ye)X(Ye);else try{sr(cn.activeWorkspace)}catch{}}(Oe||Qe)&&(w(void 0),e.sessionLoading=!1,ce(),zi(void 0,"replace"))}async function mi(oe){try{const Ae=jt(),_e=e.sessions.find(bt=>bt.id===oe),Oe=_e!==void 0?j(_e):void 0,Qe=Oe!==void 0?kn(Oe).length:0;await Ae.archiveSession(oe),m(oe),Ug.delete(oe),_e!==void 0&&Oe!==void 0&&Ct(Oe,oe,_e.updatedAt,Qe),o.clearSideChatForSession(oe);const{[oe]:Ye,...xt}=e.sideChatUserMessageIdsBySession;if(e.sideChatUserMessageIdsBySession=xt,e.activeSessionId===oe){const bt=e.sessions[0];bt?await On(bt.id,{urlMode:"replace"}):(w(void 0),zi(void 0,"replace"))}}catch(Ae){l("archiveSession",Ae,{sessionId:oe})}}async function xo(oe){if(ve)return!1;const Ae=oe??e.activeSessionId;if(!Ae){const Oe=n("commands.export.noSession");return Lo("export:failed",{status:"no-session"}),l("exportSession",new Error(Oe),{message:Oe}),!1}ve=!0;const _e=Date.now();Lo("export:start",{sessionId:Ae});try{const Oe=wke(),{blob:Qe,fileName:Ye}=await jt().exportSession(Ae,Oe,{desktop:Hf});if(typeof document>"u")throw new Error("Document is unavailable");const xt=URL.createObjectURL(Qe);let bt;try{bt=document.createElement("a"),bt.href=xt,bt.download=Ye,document.body.append(bt),bt.click()}finally{bt?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(xt)}catch{}},0)}return Lo("export:accepted",{sessionId:Ae,status:"accepted",zipBytes:Qe.size,durationMs:Date.now()-_e}),!0}catch(Oe){const Qe=typeof Oe=="object"&&Oe!==null?Oe:void 0;return Lo("export:failed",{sessionId:Ae,status:"failed",durationMs:Date.now()-_e,errorName:typeof Qe?.name=="string"?Qe.name:typeof Oe,errorCode:typeof Qe?.code=="number"?Qe.code:void 0,requestId:typeof Qe?.requestId=="string"?Qe.requestId:void 0,phase:typeof Qe?.phase=="string"?Qe.phase:void 0,httpStatus:typeof Qe?.status=="number"?Qe.status:void 0}),l("exportSession",Oe,{sessionId:Ae,...Os(Oe)&&Oe.code===PU?{message:n("commands.export.tooLarge",{sessionId:Ae})}:{}}),!1}finally{ve=!1}}async function ao(oe){try{const Ae=await jt().restoreSession(oe);return p(Ae),!0}catch(Ae){return l("restoreSession",Ae,{sessionId:oe}),!1}}function Us(oe){return jt().listSessions({archivedOnly:!0,beforeId:oe?.beforeId,pageSize:oe?.pageSize??50})}async function as(){try{await jt().logout(),await Le(),await ks()}catch(oe){l("logout",oe)}}function Oo(oe){const Ae=e.activeSessionId;Ae&&jt().compactSession(Ae,oe).catch(_e=>{l("compact",_e,{sessionId:Ae})})}async function lr(oe){const Ae=oe??e.activeSessionId;if(Ae)try{const _e=await jt().forkSession(Ae);p(_e),await On(_e.id)}catch(_e){l("fork",_e,{sessionId:Ae})}}async function ht(oe=1){const Ae=e.activeSessionId;if(!Ae)return null;const _e=e.messagesBySession[Ae]??[];let Oe=-1;for(let bt=_e.length-1;bt>=0;bt--){const nn=_e[bt];if(nn.role==="user"&&!(nn.metadata?.origin&&nn.metadata.origin.kind!=="user")){Oe=bt;break}}const Qe=Oe>=0?_e[Oe].content.filter(bt=>bt.type==="text").map(bt=>bt.text).join(` -`):null,Ye=oe===1&&Oe>=0&&_e.slice(Oe+1).every(bt=>bt.role!=="user"),xt=Ye?e.sessions.find(bt=>bt.id===Ae):void 0;if(Ye&&(e.messagesBySession={...e.messagesBySession,[Ae]:_e.slice(0,Oe)},xt!==void 0)){const bt={...xt};delete bt.lastTurnReason,p(bt)}try{return await jt().undoSession(Ae,oe),await x(Ae),{text:Qe}}catch(bt){return Ye&&(e.messagesBySession={...e.messagesBySession,[Ae]:_e},xt!==void 0&&p(xt),await x(Ae).catch(()=>{})),l("undo",bt,{sessionId:Ae}),null}}function Ie(oe){const Ae=e.activeSessionId;if(!Ae)return;const _e=e.queuedBySession[Ae]??[];if(oe<0||oe>=_e.length)return;const Oe=[..._e];Oe.splice(oe,1),e.queuedBySession={...e.queuedBySession,[Ae]:Oe}}function Ve(oe,Ae){const _e=e.activeSessionId;if(!_e)return;const Oe=e.queuedBySession[_e]??[];if(oe===Ae||oe<0||oe>=Oe.length||Ae<0||Ae>=Oe.length)return;const Qe=[...Oe],[Ye]=Qe.splice(oe,1);Ye!==void 0&&(Qe.splice(Ae,0,Ye),e.queuedBySession={...e.queuedBySession,[_e]:Qe})}async function on(oe){const Ae=e.activeSessionId;if(!Ae)return[];try{return(await jt().listDirectory(Ae,{path:oe,includeGitStatus:!0})).items}catch{return[]}}async function wi(oe){const Ae=e.activeSessionId;if(!Ae)return null;try{const Oe=await jt().readFile(Ae,{path:oe});return{path:Oe.path,content:Oe.content,encoding:Oe.encoding,mime:Oe.mime,languageId:Oe.languageId,isBinary:Oe.isBinary,size:Oe.size,lineCount:Oe.lineCount}}catch(_e){if(Bl("[kimi-web] readFileContent failed for",oe,_e),Os(_e)&&_e.code===Zke)throw _e;return null}}async function Po(oe){return jt().readHostFileContent(oe)}const vi=10485760;function bl(oe){const Ae=e.activeSessionId;return Ae?jt().getFileDownloadUrl(Ae,oe):null}async function jo(oe,Ae){const _e=e.activeSessionId;if(!_e)return!1;try{return await jt().openFile(_e,{path:oe,line:Ae}),!0}catch(Oe){return l("openFile",Oe,{sessionId:_e}),!1}}async function Mr(oe){const Ae=e.activeSessionId;if(!Ae)return;const _e=R.value.cwd||".";try{await jt().openInApp(Ae,oe,_e)}catch(Oe){l("openInApp",Oe,{sessionId:Ae})}}async function ar(oe){const Ae=e.activeSessionId;if(!Ae)return!1;try{return await jt().revealFile(Ae,{path:oe}),!0}catch(_e){return l("revealFile",_e,{sessionId:Ae}),!1}}function ur(oe){return oe.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(oe)||oe.startsWith("\\\\")}async function uo(oe){if(/^(https?:|data:|blob:)/i.test(oe))return oe;const Ae=e.activeSessionId;if(!Ae)return oe;let _e=oe;if(ur(_e)){const Oe=e.sessions.find(Ye=>Ye.id===Ae)?.cwd,Qe=Oe?lv(_e,Oe):null;if(Qe)_e=Qe;else try{const Ye=await Po(_e);return!Ye.isBinary||Ye.encoding!=="base64"?oe:`data:${Ye.mime};base64,${Ye.content}`}catch{return oe}}try{const Qe=await jt().readFile(Ae,{path:_e,length:vi});return!Qe.isBinary||Qe.encoding!=="base64"||Qe.truncated?oe:`data:${Qe.mime};base64,${Qe.content}`}catch{return oe}}async function Gl(oe){const Ae=e.sessions.find(Oe=>Oe.id===e.activeSessionId),_e=Ae===void 0?e.activeWorkspaceId:j(Ae);if(!_e)return[];try{return(await jt().searchFiles(_e,{query:oe,limit:20})).items.map(Ye=>({path:Ye.path,name:Ye.name}))}catch{return[]}}return{loadFileDiff:J,clearFileDiff:ce,loadGitStatus:ge,checkAuth:Le,probeManagedMembership:ke,loadConfig:Fe,updateConfig:De,listAllSessionsGlobal:lt,load:ks,refreshServerMeta:In,loadWorkspaces:Zt,loadMoreSessions:Qt,loadAllSessions:Fn,ensureFlatSessions:Ue,loadMoreFlatSessions:Ft,selectWorkspace:Rn,openWorkspace:Sn,upsertWorkspacePreserveOrder:Qn,applyWorkspaceEvent:os,clearActiveSession:As,openWorkspaceDraft:Tt,startSessionAndSendPrompt:rs,startSessionAndActivateSkill:Bn,startSessionAndOpenSideChat:Co,addWorkspaceByPath:Mi,browseFs:Ei,getFsHome:ro,writeSessionUrl:zi,fetchSessionIntoList:Hs,onSessionRoutePopState:Cs,bindSessionRoute:ii,selectSession:On,submitPromptInternal:$n,finishPromptLocal:ai,maybeGenerateSessionTitle:o6e,localTurnStartState:l6e,isLocalTurnSnapshotCurrent:u6e,afterLocalTurnStartsSettle:c6e,handleSessionSnapshot:Ns,sendPrompt:Tn,steerPrompt:tt,uploadImage:Je,enqueue:Rt,unqueue:Ie,reorderQueue:Ve,abortCurrentPrompt:Ln,respondApproval:Vi,respondQuestion:gi,dismissQuestion:an,pendingQuestionActions:pc,pendingApprovalActions:ug,cancelTask:Zi,setPlanMode:Ri,togglePlanMode:Vl,setSwarmMode:Ro,toggleSwarmMode:Sr,setGoalMode:Ws,toggleGoalMode:Li,createGoal:Oi,controlGoal:Zl,setPermission:Fs,dismissWarning:rr,renameSession:qs,regenerateSessionTitle:Pi,renameWorkspace:ws,deleteWorkspace:lo,archiveSession:mi,exportSession:xo,restoreSession:ao,loadArchivedSessions:Us,logout:as,compact:Oo,forkSession:lr,undo:ht,listDir:on,readFileContent:wi,readHostFileContent:Po,getFileDownloadUrl:bl,openWorkspaceFile:jo,openInApp:Mr,revealWorkspaceFile:ar,resolveImageUrl:uo,searchFiles:Gl,loadOlderMessages:se,refreshSessionSidecars:U,isStartingFirstPrompt:()=>Il.size>0}}const cg=QT(),lu=bve({t:(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t)}),v$=cn.permission,y$=cn.activeWorkspace,b$=cn.planArmed,k$=cn.swarmMode,A$=cn.goalMode,PS=40401,h2=cn.onboarded;sr(cn.codeFont);sr(cn.accent);sr(cn.theme);sr(cn.thinking);sr(cn.notifyOnComplete);sr(cn.notifyOnQuestion);sr(cn.notifyOnApproval);sr(cn.soundOnComplete);function f6e(){try{const e=oo(v$);if(e==="auto"||e==="yolo"||e==="manual")return e}catch{}return"manual"}function h6e(e){try{Ls(v$,e)}catch{}}function dg(e){const t=oo(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const i={};for(const[s,o]of Object.entries(n))o===!0&&(i[s]=!0);return i}catch{return{}}}function tk(e,t){try{const n={};for(const[i,s]of Object.entries(t))s&&(n[i]=!0);Ls(e,JSON.stringify(n))}catch{}}function nk(){tk(b$,xe.planArmedBySession)}function C$(){tk(k$,xe.swarmModeBySession)}function w$(){tk(A$,xe.goalModeBySession)}function p6e(){try{return oo(y$)}catch{return null}}const x$=cn.hiddenWorkspaces;function g6e(){try{const e=oo(x$);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function m6e(e){try{Ls(x$,JSON.stringify(e))}catch{}}function v6e(e){try{Ls(y$,e)}catch{}}function y6e(e,t){if(t&&e.startsWith(t)){const i=e.slice(t.length);return i?`~${i}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const xe=Es({...LJ(),connected:!1,serverVersion:"",dangerousBypassAuth:!1,backend:"v1",experimentalFlags:{},workspaceName:"kimi-web",connection:"disconnected",permission:f6e(),thinking:void 0,thinkingBySession:{},pendingThinkingBySession:{},planModeBySession:dg(cn.planMode),planArmedBySession:dg(b$),swarmModeBySession:dg(k$),goalModeBySession:dg(A$),loading:!1,sessionLoading:!1,queuedBySession:{},gitStatusBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:U5(),authReady:!1,defaultModel:null,managedProviderStatus:null,managedUserInfo:null,managedMembership:null,workspaces:[],activeWorkspaceId:p6e(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:g6e(),availableOpenInApps:[],config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1,flatSessionsNextPageToken:null,flatSessionsHasMore:!0,flatSessionsLoading:!1,flatSessionsLoadingMore:!1,flatSessionsSeeded:!1,flatSessionsFrontier:null}),wa=Es({}),ik=Es({}),Ih=new Map,th=new Map;function b6e(e,t){return`${e}\0${t??"*"}`}function _$(e,t,n){ik[t]=n;const i=wa[e]?.[t];i&&(wa[e]={...wa[e],[t]:{...i,review:n}})}async function rp(e,t){if(t!==void 0){rp(e);return}const n=b6e(e,t),i=(Ih.get(n)??0)+1;Ih.set(n,i),t!==void 0&&th.set(e,(th.get(e)??0)+1);const s=th.get(e)??0;try{const o=await jt().getSessionPlans(e,{agentId:"main",toolCallId:t});if(Ih.get(n)!==i||t===void 0&&(th.get(e)??0)!==s||!xe.sessions.some(l=>l.id===e))return;const r=Object.fromEntries(o.map(l=>[l.toolCallId,l]));for(const[l,a]of Object.entries(r)){const u=ik[l];u&&(!a.review||a.review.state==="pending")&&(r[l]={...a,review:u})}wa[e]=t===void 0?r:{...wa[e],...r}}catch(o){Bl("[refreshSessionPlans] plan history unavailable for",e,o)}}function k6e(e){const t=`${e}\0`;for(const n of Ih.keys())n.startsWith(t)&&Ih.delete(n);th.delete(e),delete wa[e]}function A6e(e){delete wa[e]}const Lp=Es({planMode:!1,swarmMode:!1,goalMode:!1});function sk(e){xe.sessions=e}function Ev(e,t){xe.sessions=xe.sessions.map(n=>n.id===e?t(n):n)}function C6e(e){xe.sessions=Rte(xe.sessions,e)}function w6e(e){xe.sessions=[...xe.sessions,e]}function x6e(e){xe.sessions=xe.sessions.filter(t=>t.id!==e)}function S$(){const e=xe.activeSessionId;e&&xe.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(xe.unreadBySession[e]=!1,K5({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===cn.unread&&(xe.unreadBySession=U5(),S$())});function E8(){if(Ar===null||!Ar.health().stale)return;Lo("ws:stale-reconnect",{sessionId:xe.activeSessionId,status:"stale"}),yke("ws: stale socket on focus, reconnecting",{activeSessionId:xe.activeSessionId}),Ar.reconnect();const e=xe.activeSessionId;e&&y2.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(S$(),E8())});typeof window<"u"&&(window.addEventListener("focus",E8),window.addEventListener("online",E8));function ok(e){xe.activeSessionId=e}function _6e(e){Uo(xe.messagesBySession,e)}function S6e(e,t){xe.messagesBySession[e]=t}function M$(e,t){xe.messagesBySession[e]=t(xe.messagesBySession[e]??[])}function M6e(e){delete xe.messagesBySession[e]}function I$(e){Ar?.unsubscribe(e),g2.forgetSession(e),L8.delete(e),Y6e(e),kf.discard(({meta:t})=>t.sessionId===e),x6e(e),M6e(e),k6e(e),delete xe.approvalsBySession[e],delete xe.questionsBySession[e],delete xe.tasksBySession[e],delete xe.goalBySession[e],delete xe.gitStatusBySession[e],delete xe.lastSeqBySession[e],delete xe.compactionBySession[e],delete xe.messagesLoadingMoreBySession[e],delete xe.messagesHasMoreBySession[e],delete xe.messagesLoadMoreErrorBySession[e],delete T8[e],v2.delete(e),Kg.delete(e),W$.delete(e),a6e(e),delete xe.queuedBySession[e],delete xe.promptIdBySession[e],delete xe.inFlightBySession[e],delete xe.turnActiveBySession[e],delete xe.turnEndedPromptIdBySession[e],delete xe.turnErrorBySession[e],delete xe.turnRetryBySession[e],delete xe.planModeBySession[e],delete xe.planArmedBySession[e],delete xe.swarmModeBySession[e],delete xe.goalModeBySession[e],delete xe.thinkingBySession[e],delete xe.pendingThinkingBySession[e],nk(),C$(),w$(),io.value.includes(e)&&(io.value=uL(io.value,e),cv(io.value))}const E$=G(null),T$=G([]),L$=G(!1),N$=G(null),F$=G(!1),B$=G(!1),$$=G(null);async function Jc(e){let t;try{t=await jt().getSessionStatus(e)}catch{return}Ev(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),xe.swarmModeBySession[e]=t.swarmMode,xe.planModeBySession[e]=t.planMode,sr(cn.planMode),t.thinkingEffort.length>0&&rL(xe,e,t.thinkingEffort)}const p2=new Set;function I6e(e){p2.add(e),D$(e).finally(()=>{p2.delete(e)})}async function D$(e){const t=xe.goalVersionBySession[e]??0;let n;try{n=await jt().getSessionGoal(e)}catch{return}(xe.goalVersionBySession[e]??0)===t&&(n===null||n.status==="complete"?delete xe.goalBySession[e]:xe.goalBySession[e]=n)}function z$(e,t){const n=t??xe.activeSessionId;if(!n)return Promise.resolve(!1);const i=e.thinking!==void 0?xe.pendingThinkingBySession[n]:void 0;return Promise.resolve(jt().updateSession(n,e)).then(()=>(Ca(xe,n,i),Jc(n))).then(()=>!0).catch(s=>(Ca(xe,n,i)&&Jc(n),Fp("persistSessionProfile",s,{sessionId:n}),!1))}function R$(e){try{return oo(e)??""}catch{return""}}function E6e(){return typeof window>"u"?!1:new URLSearchParams(window.location.search).get("kimi_onboarded")==="1"}const O$=E6e();if(O$&&R$(h2)!=="1")try{Ls(h2,"1")}catch{}const P$=G(O$||R$(h2)==="1");function T6e(e){P$.value=e;try{Ls(h2,e?"1":"0")}catch{}e&&window.kimiDesktop?.setOnboarded?.()}let Ar=null;const g2=Sve({api:jt(),connectEventsIfNeeded:rk,getEventConnection:()=>Ar});let jS=0;function j$(){return jS+=1,`msg_opt_${Date.now().toString(36)}_${jS}`}function HS(e,t,n){const i={sessions:xe.sessions,activeSessionId:xe.activeSessionId,messagesBySession:xe.messagesBySession,approvalsBySession:xe.approvalsBySession,planReviewByToolCallId:xe.planReviewByToolCallId,questionsBySession:xe.questionsBySession,tasksBySession:xe.tasksBySession,goalBySession:xe.goalBySession,goalVersionBySession:xe.goalVersionBySession,lastSeqBySession:xe.lastSeqBySession,turnActiveBySession:xe.turnActiveBySession,turnEndedPromptIdBySession:xe.turnEndedPromptIdBySession,turnErrorBySession:xe.turnErrorBySession,turnRetryBySession:xe.turnRetryBySession,compactionBySession:xe.compactionBySession,config:xe.config,warnings:xe.warnings},s=PJ(i,e,{sessionId:t,seq:n},{t:(o,r)=>r===void 0?jn.global.t(o):jn.global.t(o,r)});s.sessions!==i.sessions&&sk(s.sessions),s.activeSessionId!==i.activeSessionId&&ok(s.activeSessionId),_6e(s.messagesBySession),Uo(xe.approvalsBySession,s.approvalsBySession),Uo(xe.planReviewByToolCallId,s.planReviewByToolCallId),Uo(xe.questionsBySession,s.questionsBySession),Uo(xe.tasksBySession,s.tasksBySession),Uo(xe.goalBySession,s.goalBySession),Uo(xe.goalVersionBySession,s.goalVersionBySession),Uo(xe.lastSeqBySession,s.lastSeqBySession),Uo(xe.turnActiveBySession,s.turnActiveBySession),Uo(xe.turnEndedPromptIdBySession,s.turnEndedPromptIdBySession),Uo(xe.turnErrorBySession,s.turnErrorBySession),Uo(xe.turnRetryBySession,s.turnRetryBySession),Uo(xe.compactionBySession,s.compactionBySession),s.config!==i.config&&(xe.config=s.config??null),jJ(s.warnings,i.warnings)||(xe.warnings=s.warnings),e.type==="goalUpdated"&&p2.delete(t),e.type==="configChanged"&&(xe.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(Un.loadModels(),Un.loadProviders()),e.type==="sessionUsageUpdated"&&(e.swarmMode!==void 0&&(xe.swarmModeBySession[e.sessionId]=e.swarmMode),e.planMode!==void 0&&(xe.planModeBySession[e.sessionId]=e.planMode),e.thinking!==void 0&&rL(xe,e.sessionId,e.thinking)),e.type==="sessionDeleted"&&ck(e.sessionId)}function L6e(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="user")return;if(n.role==="assistant")for(let i=n.content.length-1;i>=0;i--){const s=n.content[i];if(s.type==="toolUse"&&s.toolName==="ExitPlanMode")return s.toolCallId}}}function N6e(e,t){const n=xe.lastSeqBySession[t.sessionId]??0,i=xe.turnActiveBySession[t.sessionId]??!1,s=e.type==="approvalResolved"||e.type==="approvalExpired"?xe.approvalsBySession[t.sessionId]?.find(r=>r.approvalId===e.approvalId&&r.toolName==="ExitPlanMode")?.toolCallId:void 0,o=po.sideChatTargetBySession.value[t.sessionId];if(e.type==="messageCreated"&&e.message.role==="user"&&e.agentId!==void 0&&Object.prototype.hasOwnProperty.call(xe.sideChatMessagesByAgent,e.agentId)){HS({type:"unknown",raw:{_noop:!0}},t.sessionId,t.seq),po.reconcileSideChatUserMessage(e.agentId,e.message);return}if(HS(e,t.sessionId,t.seq),o){const{agentId:r}=o,l=t.sessionId;e.type==="agentDelta"&&e.agentId===r?e.delta.text&&po.appendSideChatAssistantText(r,l,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===r?po.finishSideChatAgent(r,l):e.type==="taskProgress"&&e.taskId===r?po.appendSideChatAssistantText(r,l,e.outputChunk):e.type==="taskCompleted"&&e.taskId===r&&po.finishSideChatAgent(r,l,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const r=e.message.sessionId;xe.promptIdBySession[r]!==e.message.promptId&&(xe.promptIdBySession[r]=e.message.promptId)}if(e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const r=e.reason;kAe(e.sessionId,r==="cancelled"||r==="failed"||r==="blocked"?"aborted":"idle",i);const l=L6e(xe.messagesBySession[e.sessionId]??[]);l!==void 0&&rp(e.sessionId,l)}if(e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&i||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&bAe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&xe.promptIdBySession[e.sessionId]===e.promptId&&Et.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&AAe(e.sessionId,e.question),e.type==="approvalRequested"&&CAe(e.sessionId,e.approval),s!==void 0){const r=e.type==="approvalResolved"?{state:e.decision,selectedOption:e.selectedLabel,feedback:e.feedback}:{state:"cancelled"};_$(t.sessionId,s,r),rp(t.sessionId,s)}}const kf=qX(({appEvent:e,meta:t})=>N6e(e,t),({appEvent:e})=>PX(e),{coalesce:KX}),F6e=3e4;let WS=0,ho=null;const Eh=new Map;let m2=0,Af=null;function B6e(){Af!==null&&(clearTimeout(Af),Af=null)}function qS(e){if(!xe.connected||Af!==null)return;const t=Math.min(F6e,1e3*2**m2);m2+=1,Bl("[kimi-web] session work reconciliation incomplete; retrying",e),Af=setTimeout(()=>{Af=null,xe.connected&&H$()},t)}function $6e(e,t){const n=new Map(e.map(u=>[u.id,u]));let i=!1,s=!1;const o={...xe.turnActiveBySession},r=[],l=new Map,a=xe.sessions.map(u=>{const c=n.get(u.id);if(c===void 0)return u;const d=t.workEventSeqBySession.get(u.id)??0,f=t.turnEventSeqBySession.get(u.id)??0,p=t.pendingEventBySession.get(u.id),g=d>c.lastSeq,m=f>c.lastSeq,y=p!==void 0&&p.seq>c.lastSeq,w=g||m&&u.mainTurnActive===!0?u.busy||u.mainTurnActive===!0:c.busy,k=g||m?u.mainTurnActive:c.mainTurnActive??(w?u.mainTurnActive:!1),A=y?p.source==="work"?u.pendingInteraction:(xe.approvalsBySession[u.id]?.length??0)>0?"approval":(xe.questionsBySession[u.id]?.length??0)>0?"question":"none":c.pendingInteraction??(w?u.pendingInteraction:"none");(y&&p.source==="work"||!y&&(c.pendingInteraction!==void 0||c.busy===!1))&&A!==void 0&&l.set(u.id,A);const v=g?u.lastTurnReason:c.lastTurnReason;Eh.set(u.id,Math.max(Eh.get(u.id)??0,c.lastSeq));const x=t.turnStartBySession.get(u.id);return(k===!1||k===void 0&&!w)&&t.witnessedTurnBySession.has(u.id)&&x!==void 0&&Et.isLocalTurnSnapshotCurrent(u.id,x)&&r.push(u.id),k===!0&&!o[u.id]?(o[u.id]=!0,s=!0):(k===!1||!w)&&o[u.id]&&(delete o[u.id],s=!0),u.busy===w&&u.mainTurnActive===k&&u.pendingInteraction===A&&u.lastTurnReason===v?u:(i=!0,{...u,busy:w,mainTurnActive:k,pendingInteraction:A,lastTurnReason:v})});i&&sk(a),s&&Uo(xe.turnActiveBySession,o);for(const[u,c]of l)c==="none"?(delete xe.approvalsBySession[u],delete xe.questionsBySession[u]):c==="question"&&delete xe.approvalsBySession[u];for(const u of r)Et.finishPromptLocal(u,{turnWasActive:!0})}async function H$(){const e={workEventSeqBySession:new Map,turnEventSeqBySession:new Map,pendingEventBySession:new Map,turnStartBySession:new Map(xe.sessions.map(t=>[t.id,Et.localTurnStartState(t.id)])),witnessedTurnBySession:new Set(xe.sessions.filter(t=>xe.inFlightBySession[t.id]||xe.turnActiveBySession[t.id]).map(t=>t.id))};ho=e;try{const t=await Et.listAllSessionsGlobal({shouldContinue:()=>ho===e&&xe.connected});if(ho!==e||!xe.connected)return;kf.flush(),$6e(t.sessions,e),ho=null,t.error!==void 0?qS(t.error):m2=0}catch(t){if(ho!==e||!xe.connected)return;ho=null,qS(t)}}function rk(){if(Ar!==null||typeof WebSocket>"u")return;Lo("ws:connection",{status:"connecting"}),xe.connection="connecting",Ar=jt().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){Et.applyWorkspaceEvent(t);return}const i=t.type==="sessionWorkChanged",s=t.type==="turnActiveChanged",o=t.type==="approvalRequested"||t.type==="approvalResolved"||t.type==="approvalExpired"||t.type==="questionRequested"||t.type==="questionAnswered"||t.type==="questionDismissed";if((i||s||o)&&n.seq>0){const r=Eh.get(n.sessionId)??0;if(n.seq<=r)return;Eh.set(n.sessionId,n.seq)}if(ho!==null&&(i||s||o))if(i){const r=ho.workEventSeqBySession.get(n.sessionId)??0;if(n.seq>r&&ho.workEventSeqBySession.set(n.sessionId,n.seq),t.pendingInteraction!==void 0||!t.busy){const l=ho.pendingEventBySession.get(n.sessionId);(l===void 0||n.seq>l.seq)&&ho.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"work"})}}else if(s){const r=ho.turnEventSeqBySession.get(n.sessionId)??0;n.seq>r&&ho.turnEventSeqBySession.set(n.sessionId,n.seq)}else{const r=ho.pendingEventBySession.get(n.sessionId);(r===void 0||n.seq>r.seq)&&ho.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"interaction"})}for(const r of UX({appEvent:t,meta:n}))kf(r)},onResync(t,n,i){Lo("ws:resync",{sessionId:t,status:"required",seq:n}),kf.flush(),v2.add(t),y2.request(t)},onError(t,n,i){Lo("ws:error",{status:"failed",errorCode:t,fatal:i}),Np({severity:"error",title:jn.global.t("warnings.wsTitle"),message:n,details:[ji("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){Lo("ws:connection",{status:t?"connected":"disconnected"}),xe.connected=t,xe.connection=t?"connected":"disconnected",t||(ho=null,Eh.clear(),B6e(),m2=0),t&&(WS+=1,W6e(),Et.refreshServerMeta())},onReplayComplete(){kf.flush(),WS>1&&H$()},onTranscriptReset(t,n,i,s){g2.receiveReset(t,n,i,s)},onTranscriptOps(t,n,i,s){return g2.applyOps(t,n,i,s)}})}const T8={},v2=new Set,Kg=new Set,W$=new Set;function D6e(e){return Os(e)&&e.code===PS?!0:typeof e=="object"&&e!==null&&e.code===PS}function ji(e,t){if(!(t==null||t===""))return{label:jn.global.t(`warnings.details.${e}`),value:q$(t)}}function q$(e){if(e instanceof Error)return typeof e.stack=="string"&&e.stack?e.stack:e.message?`${e.name}: ${e.message}`:e.name;if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function z6e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function R6e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function O6e(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function P6e(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function US(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function j6e(e,t,n){const i=J2(t),s=Os(t),o=i||s?t.timestamp:void 0,r=i||s?t.durationMs:void 0,l=[ji("operation",e),ji("sessionId",n??xe.activeSessionId),ji("connection",xe.connection),ji("timestamp",P6e(o??Date.now()))];return i?l.push(ji("duration",US(r)),ji("request",`${t.method} ${t.path}`),ji("endpoint",t.url),ji("requestId",t.requestId),ji("phase",t.phase),ji("timeout",`${t.timeoutMs}ms`),ji("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),ji("contentType",t.contentType),ji("responsePreview",t.bodyPreview),ji("cause",t.cause)):s?l.push(ji("duration",US(r)),ji("code",t.code),ji("requestId",t.requestId),ji("message",t.message),ji("details",t.details)):l.push(ji("errorName",z6e(t)),ji("message",R6e(t)??q$(t)),ji("stack",O6e(t))),l.filter(a=>a!==void 0)}function H6e(e,t,n={}){const i=J2(t),s=Os(t),o=RU(t),r=n.title??(i?o?jn.global.t("warnings.daemonTimeoutTitle"):jn.global.t("warnings.daemonNetworkTitle"):s?jn.global.t("warnings.daemonApiTitle"):jn.global.t("warnings.operationFailedTitle")),l=n.message??(i?o?jn.global.t("warnings.daemonTimeoutMessage"):jn.global.t("warnings.daemonNetworkMessage"):s?t.message:jn.global.t("warnings.operationFailedMessage"));return{severity:"error",title:r,message:l,details:j6e(e,t,n.sessionId)}}function Np(e){xe.warnings=[...xe.warnings,e]}function W6e(){const e=jn.global.t("warnings.wsTitle"),t=xe.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==xe.warnings.length&&(xe.warnings=t)}function Fp(e,t,n){ga(`[kimi-web] operation failed: ${e}`,t);const i=Os(t),s=J2(t);Lo("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:i?t.code:void 0,requestId:i||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),Np(H6e(e,t,n))}const q6e={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function U6e(e){if(!Os(e)||e.code===void 0)return;const t=q6e[e.code];return t?jn.global.t(t):void 0}async function K6e(e){if(I$(e),xe.activeSessionId!==e)return;const t=xe.sessions[0];t?await Et.selectSession(t.id,{urlMode:"replace"}):(ok(void 0),xe.sessionLoading=!1,Et.writeSessionUrl(void 0,"replace"))}const KS=new Set;async function V6e(e){if(!KS.has(e)){KS.add(e);try{const t=await jt().getSessionWarnings(e),n=jn.global.t("warnings.noteLabel");for(const i of t)Np(`${n}: ${i.message}`)}catch{}}}async function lk(e,t){const n=Et.localTurnStartState(e);try{const s=await jt().getSessionSnapshot(e);if(!xe.sessions.some(d=>d.id===e))return"ok";kf.flush();const o=xe.lastSeqBySession[e]??0,r=T8[e],l=v2.has(e)||b2.has(e);if(!l&&r!==void 0&&r===s.epoch&&o>s.asOfSeq)return Kg.delete(e)||(Kg.add(e),y2.request(e)),"ok";if(!Et.isLocalTurnSnapshotCurrent(e,n))return Et.afterLocalTurnStartsSettle(e,()=>{y2.request(e)}),"ok";const a=xe.turnRetryBySession[e];a!==void 0&&a.turnId!==s.inFlightTurn?.turnId&&delete xe.turnRetryBySession[e],(l||s.session.lastTurnReason!=="failed")&&delete xe.turnErrorBySession[e];const u=vm(s.session.usage),c=s.session.mainTurnActive??(s.inFlightTurn!==null&&s.session.busy);Ev(e,d=>KU(d,s.session,c)),S6e(e,Lie(xe.messagesBySession[e]??[],s.messages)),xe.tasksBySession[e]=jie(s.subagents,xe.tasksBySession[e]??[]),xe.messagesHasMoreBySession[e]=s.hasMoreMessages,xe.approvalsBySession[e]=s.pendingApprovals;for(const d of s.pendingApprovals){const f=d.display;f?.kind==="plan_review"&&typeof f.plan=="string"&&f.plan.length>0&&(xe.planReviewByToolCallId[d.toolCallId]={plan:f.plan,path:typeof f.path=="string"?f.path:void 0})}return xe.questionsBySession[e]=s.pendingQuestions,xe.lastSeqBySession[e]=s.asOfSeq,T8[e]=s.epoch,v2.delete(e),Kg.delete(e),Et.handleSessionSnapshot(e,{inFlightTurn:s.inFlightTurn,busy:s.session.busy}),c?xe.turnActiveBySession[e]=!0:delete xe.turnActiveBySession[e],rk(),Ar&&(Ar.seedSnapshot(e,s),Ar.subscribe(e,{seq:s.asOfSeq,epoch:s.epoch}),Q6e(e)),b2.delete(e),u&&t?.skipStatusRefresh!==!0&&Jc(e),V6e(e),"ok"}catch(i){return D6e(i)?(await K6e(e),"not-found"):(Fp("getSessionSnapshot",i,{title:jn.global.t("warnings.sessionSnapshotTitle"),message:jn.global.t("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const y2=Nie(lk);function Z6e(e){return Object.prototype.hasOwnProperty.call(xe.messagesBySession,e)}const G6e=4,ca=[],b2=new Set;function Q6e(e){const t=ca.indexOf(e);for(t!==-1&&ca.splice(t,1),ca.unshift(e);ca.length>G6e;){let n=-1;for(let s=ca.length-1;s>=0;s--)if(ca[s]!==xe.activeSessionId){n=s;break}if(n===-1)break;const[i]=ca.splice(n,1);if(i===void 0)break;Ar?.unsubscribe(i),b2.add(i)}}function Y6e(e){const t=ca.indexOf(e);t!==-1&&ca.splice(t,1),b2.delete(e)}async function J6e(e){return lk(e)}function Bf(e,t){return(xe.inFlightBySession[e]??!1)||(xe.turnActiveBySession[e]??!1)||(t??xe.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function Bp(e){try{const t=new Date(e),i=Date.now()-t.getTime(),s=i/36e5;if(i<6e4)return jn.global.t("sessions.justNow");if(s<1)return`${Math.round(i/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const o=i/864e5;return o<7?`${Math.round(o)}d`:o<30?`${Math.round(o/7)}w`:o<365?`${Math.round(o/30)}mo`:`${Math.round(o/365)}y`}catch{return e}}const X6e=3e4,Xc=G(0);let m4=null;function e7e(){m4===null&&(m4=setInterval(()=>{Xc.value=(Xc.value+1)%Number.MAX_SAFE_INTEGER},X6e),m4.unref?.())}function t7e(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const i=typeof t.path=="string"?t.path:"";if(Array.isArray(t.diff))return{kind:"diff",path:i,diff:t.diff};const s=typeof t.old_text=="string"?t.old_text:typeof t.before=="string"?t.before:void 0,o=typeof t.new_text=="string"?t.new_text:typeof t.after=="string"?t.after:void 0;if(s!==void 0&&o!==void 0){const r=Nf(s,o)??Am(s,o);return{kind:"diff",path:i,diff:r}}return{kind:"diff",path:i,diff:[]}}if(n==="file_io"){const i=typeof t.path=="string"?t.path:"",s=typeof t.operation=="string"?t.operation:"";if(s==="write"&&typeof t.content=="string")return{kind:"file",path:i,content:t.content};if(s==="edit"&&typeof t.before=="string"&&typeof t.after=="string"){const r=Nf(t.before,t.after)??Am(t.before,t.after);return{kind:"diff",path:i,diff:r}}const o=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:s||n,path:i,detail:o}}if(n==="shell"||n==="command"){const i=typeof t.command=="string"?t.command:e.action,s=typeof t.cwd=="string"?t.cwd:void 0,o=typeof t.danger=="string"?t.danger:RT(i);return{kind:"shell",command:i,cwd:s,danger:o}}if(n==="file_content"||n==="file"){const i=typeof t.path=="string"?t.path:"",s=typeof t.content=="string"?t.content:"",o=typeof t.language=="string"?t.language:void 0;return{kind:"file",path:i,content:s,language:o}}if(n==="file_op"||n==="fileop"){const i=typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,s=typeof t.path=="string"?t.path:"",o=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:i,path:s,detail:o}}if(n==="url_fetch"||n==="url"){const i=typeof t.url=="string"?t.url:e.action;return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:i}}if(n==="search"){const i=typeof t.query=="string"?t.query:e.action,s=typeof t.scope=="string"?t.scope:void 0;return{kind:"search",query:i,scope:s}}if(n==="invocation"||n==="agent_call"||n==="skill_call"){const i=typeof t.kind=="string"?t.kind:n,s=typeof t.name=="string"?t.name:e.toolName,o=typeof t.description=="string"?t.description:void 0;return{kind:"invocation",kind2:i,name:s,description:o}}if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(o=>{const r=o??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const i=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:i,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function n7e(e){return{questionId:e.questionId,sessionId:e.sessionId,toolCallId:e.toolCallId,questions:e.questions.map(t=>({id:t.id,question:t.question,header:t.header,body:t.body,options:t.options.map(n=>({id:n.id,label:n.label,description:n.description,recommended:n.recommended})),multiSelect:t.multiSelect,allowOther:t.allowOther,otherLabel:t.otherLabel}))}}const i7e=F(()=>{const e=xe.activeSessionId,t=e?xe.messagesBySession[e]??[]:[],n=new Map;for(const s of t)if(s.role==="assistant")for(const o of s.content){if(o.type!=="toolUse"||o.toolName!=="Bash"&&o.toolName!=="bash")continue;const r=o.input,l=r&&typeof r.command=="string"?r.command:void 0;l&&n.set(o.toolCallId,l)}const i=new Map;if(n.size===0)return i;for(const s of t)if(s.role==="tool")for(const o of s.content){if(o.type!=="toolResult")continue;const r=F5(o.output);if(!r)continue;let l;for(const u of r){const c=/task_id:\s*(\S+)/.exec(u);if(c?.[1]){l=c[1];break}}if(!l)continue;const a=n.get(o.toolCallId);a&&i.set(l,a)}return i});function U$(e){return i7e.value.get(e.id)}const s7e=F(()=>{const e=xe.activeSessionId,t=e?xe.messagesBySession[e]??[]:[],n=new Map;for(const i of t)if(i.role==="assistant")for(const s of i.content){if(s.type!=="toolUse")continue;const o=s.input,r=o&&typeof o.prompt=="string"?o.prompt:void 0;r&&!n.has(s.toolCallId)&&n.set(s.toolCallId,r);const l=o?.items;if(!r&&Array.isArray(l)&&!n.has(s.toolCallId)){const a=l.filter(u=>typeof u=="string");a.length>0&&n.set(s.toolCallId,a)}}return n});function o7e(e){if(!e.parentToolCallId)return;const t=s7e.value.get(e.parentToolCallId);return Array.isArray(t)?e.swarmIndex!==void 0?t[e.swarmIndex]:void 0:t}function r7e(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",i;if(e.status==="running"&&e.startedAt){i=Date.now()-new Date(e.startedAt).getTime();const l=Math.round(i/1e3),a=Math.floor(l/60),u=l%60;n=jn.global.t("tasks.timingRunning",{time:`${a}:${String(u).padStart(2,"0")}`})}else e.completedAt&&e.startedAt&&!e.completedAtEstimated?(i=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime(),n=jn.global.t("tasks.timingDone",{time:Ma(i,{h:jn.global.t("status.timeUnitHour"),m:jn.global.t("status.timeUnitMinute"),s:jn.global.t("status.timeUnitSecond")})})):n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,o=e.command??U$(e),r=e.kind==="bash"&&o?`$ ${o}`:e.kind==="subagent"?o7e(e)??e.subagentType:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:i,meta:r,output:s,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,swarmIndex:e.swarmIndex,completedAt:e.completedAt,createdAt:e.createdAt,model:e.model,thinkingEffort:e.thinkingEffort}}const l7e=F(()=>{const e=xe.sessions.find(n=>n.id===xe.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:xe.workspaceName,branch:t}}),a7e=F(()=>(Xc.value,xe.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:Bp(e.updatedAt),busy:Bf(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason,workspaceId:hl(e),cwd:e.cwd})))),u7e=F(()=>xe.activeSessionId??""),c7e=F(()=>{const e=xe.activeSessionId;if(e)return Un.skillsBySession.value[e]??[];const t=Lv.value;return t?Un.skillsByWorkspace.value[t]??[]:[]}),ak=F(()=>{const e=xe.activeSessionId;return e?xe.inFlightBySession[e]??!1:!1}),d7e=F(()=>Et.isStartingFirstPrompt()),po=Pke(xe,{api:jt(),pushOperationFailure:Fp,nextOptimisticMsgId:j$,connectEventsIfNeeded:rk,getEventConn:()=>Ar,resolveThinkingForPrompt:(e,t)=>Un.resolveThinkingForPrompt(e,t),refreshSessionStatus:Jc}),$p=F(()=>{const e=xe.activeSessionId;if(!e)return[];const t=po.sideChatTargetBySession.value[e]?.agentId;return(xe.tasksBySession[e]??[]).filter(n=>n.id!==t)}),K$=Oke(xe,$p,{api:jt()}),Dp=F(()=>{const e=xe.activeSessionId;return e?(xe.turnActiveBySession[e]??!1)||(xe.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),f7e=F(()=>{const e=xe.activeSessionId;if(e)return xe.turnErrorBySession[e]}),h7e=F(()=>{const e=xe.activeSessionId;if(e&&Dp.value)return xe.turnRetryBySession[e]}),V$=e=>jt().getFileUrl(e),p7e=[],g7e=KT(),Z$=F(()=>{const e=xe.activeSessionId;if(!e)return[];const t=new Set(xe.sideChatUserMessageIdsBySession[e]??[]);return g7e({messages:(xe.messagesBySession[e]??[]).filter(n=>!t.has(n.id)),approvals:xe.approvalsBySession[e]??p7e,getFileUrl:V$,sessionActive:Dp.value,planReviewByToolCallId:xe.planReviewByToolCallId,plansByToolCallId:wa[e]})}),m7e=F(()=>ak.value||Dp.value),L8=new Map,v7e=F(()=>{K$.taskClock.value;const e=$p.value.map(r7e),t=xe.activeSessionId;if(t){let n=L8.get(t);n||(n=new Map,L8.set(t,n));const i=e.filter(r=>r.kind==="subagent"&&r.runInBackground);for(const r of i){const l=r.agentId??r.id;if(r.agentId!==void 0&&r.backgroundTaskId!==void 0&&!n.has(l)){const a=n.get(r.backgroundTaskId);a!==void 0&&(n.delete(r.backgroundTaskId),n.set(l,a))}}const s=i.filter(r=>!n.has(r.agentId??r.id)).sort((r,l)=>(r.createdAt??"").localeCompare(l.createdAt??""));let o=n.size===0?0:Math.max(...n.values())+1;for(const r of s)n.set(r.agentId??r.id,o++);for(const r of i)r.swarmIndex=n.get(r.agentId??r.id)}return e}),G$=F(()=>see($p.value)),y7e=F(()=>ree($p.value)),Wd=F(()=>{const e=xe.activeSessionId;return e?xe.goalBySession[e]??null:null}),b7e=F(()=>{const e=xe.activeSessionId;return e?ZX(xe.messagesBySession[e]??[]):[]}),k7e=F(()=>{const e=xe.activeSessionId;return e?xe.compactionBySession[e]??null:null}),A7e=F(()=>xe.connection),C7e=F(()=>xe.loading),w7e=F(()=>xe.sessionLoading),x7e=F(()=>{const e=xe.activeSessionId;return e?xe.messagesLoadingMoreBySession[e]??!1:!1}),_7e=F(()=>{const e=xe.activeSessionId;return e?xe.messagesHasMoreBySession[e]??!1:!1}),S7e=F(()=>{const e=xe.activeSessionId;return e?xe.messagesLoadMoreErrorBySession[e]??!1:!1}),M7e=F(()=>xe.serverVersion),I7e=F(()=>xe.experimentalFlags),E7e=F(()=>xe.backend),T7e=F(()=>xe.dangerousBypassAuth);function L7e(){xe.dangerousBypassAuth=!1}const N7e=F(()=>xe.permission),F7e=F(()=>xe.thinking),Q$=F(()=>{const e=xe.activeSessionId;return e?xe.planModeBySession[e]??!1:Lp.planMode}),B7e=F(()=>{const e=xe.activeSessionId;return e?xe.planArmedBySession[e]??!1:Lp.planMode}),$7e=F(()=>{const e=xe.activeSessionId;return e?xe.swarmModeBySession[e]??!1:Lp.swarmMode}),D7e=F(()=>{const e=xe.activeSessionId;return e?xe.goalModeBySession[e]??!1:Lp.goalMode}),z7e=F(()=>{const e=xe.activeSessionId,t=(e?wa[e]:void 0)??{},n={},i=new Set;for(const o of Z$.value)for(const r of o.tools??[]){if(r.name!=="ExitPlanMode")continue;i.add(r.id);const l=t[r.id];if(l){n[r.id]=l;continue}const a=xe.planReviewByToolCallId[r.id],u=R7e(r.arg),c=a?.plan??u?.plan,d=r.planPath??a?.path;!c&&!d||(n[r.id]={agentId:"main",toolCallId:r.id,turnId:o.id,source:"interaction",plan:c??"",path:d,options:u?.options,review:ik[r.id]})}return{...Object.fromEntries(Object.entries(t).filter(([o])=>!i.has(o))),...n}});function R7e(e){try{const t=JSON.parse(e);return{plan:typeof t.plan=="string"?t.plan:void 0,options:Array.isArray(t.options)?t.options:void 0}}catch{return}}const O7e=F(()=>{const e=oee(G$.value);return{plan:Q$.value,goal:Wd.value&&Wd.value.status!=="complete"?{status:Wd.value.status,turnsUsed:Wd.value.turnsUsed,elapsedMs:Wd.value.wallClockMs}:null,swarm:e.total>0?e:null}}),P7e=F(()=>{const e=xe.activeSessionId;if(!e)return[];const t=jt();return(xe.queuedBySession[e]??[]).map(n=>({id:n.id??n.text,text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(i=>({fileId:i.fileId,kind:i.kind,url:t.getFileUrl(i.fileId),name:i.name}))}))}),j7e=F(()=>xe.warnings),H7e=F(()=>{const e=xe.activeSessionId;return e?(xe.questionsBySession[e]??[]).map(n7e):[]}),W7e=F(()=>{const e=xe.activeSessionId;return e?(xe.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:t7e(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),uk=F(()=>{const e=xe.activeSessionId;return e?(xe.approvalsBySession[e]??[]).length>0?"awaiting-approval":(xe.questionsBySession[e]??[]).length>0?"awaiting-question":ak.value||Dp.value?"running":"idle":"idle"}),Un=Wke(xe,{api:jt(),pushOperationFailure:Fp,refreshSessionStatus:Jc,persistSessionProfile:z$,savePlanModeToStorage:nk,activity:uk,updateSession:Ev,updateSessionMessages:M$,loadConfig:()=>Et.loadConfig(),checkAuth:()=>Et.checkAuth(),beginLocalTurn:M8,settleLocalTurn:I8}),N8=F(()=>{const e=xe.activeSessionId;if(!e)return null;const t=xe.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),q7e=F(()=>{const e=xe.activeSessionId;return e?xe.gitStatusBySession[e]?.pullRequest??null:null}),U7e=F(()=>{const e=xe.activeSessionId;if(!e)return[];const t=xe.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,i])=>({path:n,status:i})).sort((n,i)=>n.path.localeCompare(i.path)):[]}),K7e=F(()=>{const e=xe.activeSessionId;if(!e)return null;const t=xe.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),Y$=F(()=>{const e=xe.sessions.find(r=>r.id===xe.activeSessionId),t=N8.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?Un.draftModel.value:null,i=(e?.model&&e.model.length>0?e.model:n??xe.defaultModel)??"—",s=Un.models.value.find(r=>r.id===i)??Un.models.value.find(r=>r.model===i);return{model:s?.displayName||s?.model||(i.includes("/")?i.split("/").pop():i),modelId:s?.id??i,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:xe.permission,branch:t,cwd:e?.cwd??"",isGitRepo:N8.value!==null}}),V7e=F(()=>T$.value),Z7e=F(()=>xe.sessions.find(t=>t.id===xe.activeSessionId)?.usage.totalCostUsd??0),G7e=F(()=>xe.authReady),Q7e=F(()=>xe.defaultModel),Y7e=F(()=>xe.managedProviderStatus),J7e=F(()=>xe.managedUserInfo),X7e=F(()=>xe.managedMembership),eAe=F(()=>xe.config),tAe=F(()=>{const e=xe.activeSessionId;if(!e)return{};const t=xe.gitStatusBySession[e];return t?{...t.entries}:{}}),nAe=F(()=>{const e=new Map;for(const t of xe.workspaces){const n=Jr(t.root);e.has(n)||e.set(n,t.id)}return e});function hl(e){return nAe.value.get(Jr(e.cwd))??e.workspaceId??e.cwd}const Tv=F(()=>Ree({workspaces:xe.workspaces,sessions:xe.sessions,hiddenWorkspaceRoots:xe.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:xe.sessionsHasMoreByWorkspace})),k2=G(zie()),A2=G(Rie());function iAe(e){A2.value!==e&&(A2.value=e,Oie(e))}const lp=G(Pie());Ge(()=>xe.sessions,e=>{const t=fse(e,hl),{next:n,changed:i}=dse(lp.value,t);i&&(lp.value=n,$L(n))});const J$=F(()=>hse(Tv.value,lp.value));Ge(()=>[Tv.value.map(e=>e.id).join("\0"),xe.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],i=lse(n,k2.value,J$.value);i!==null&&(k2.value=i,BL(i));const{next:s,changed:o}=pse(lp.value,new Set(n));o&&(lp.value=s,$L(s))});const io=G(DL());function X$(e){const t=ste(io.value,e);t!==io.value&&(io.value=t,cv(t))}function ck(e){const t=uL(io.value,e);t!==io.value&&(io.value=t,cv(t))}function sAe(e){const t=new Set(e),n=io.value.filter(i=>!t.has(i));n.length!==io.value.length&&(io.value=n,cv(n))}function oAe(e){io.value.includes(e)?ck(e):X$(e)}const pl=F(()=>{const e=Tv.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:y6e(t.root,xe.fsHome),sessionCount:t.sessionCount}));return A2.value==="recent"?cse(e,J$.value):ase(e,k2.value)}),Lv=F(()=>{const e=xe.activeWorkspaceId,t=pl.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});Ge(Lv,e=>{e&&(Object.prototype.hasOwnProperty.call(Un.skillsByWorkspace.value,e)||Un.loadSkillsForWorkspace(e))},{immediate:!0});const rAe=F(()=>{const e=Lv.value;return e?pl.value.find(t=>t.id===e)??null:null}),lAe=F(()=>{Xc.value;const e=new Set(pl.value.map(n=>n.id)),t=new Map(pl.value.map(n=>[n.id,n.name]));return xe.sessions.filter(n=>!n.parentSessionId&&e.has(hl(n))).map(n=>{const i=hl(n);return{id:n.id,title:n.title,time:Bp(n.updatedAt),busy:Bf(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:i,workspaceName:t.get(i)}})}),F8=G(d2),Nv=F(()=>{Xc.value;const e=new Set(pl.value.map(r=>r.id)),t=new Map(pl.value.map(r=>[r.id,r.name])),n=new Set(io.value),i=(r,l)=>new Date(l.updatedAt).getTime()-new Date(r.updatedAt).getTime(),s=xe.flatSessionsFrontier,o=[];for(const r of xe.sessions)r.parentSessionId||r.archived||n.has(r.id)||!e.has(hl(r))||!(P5({busy:Bf(r.id,r.mainTurnActive),unread:fk.value[r.id]??!1,questionCount:ap.value[r.id]?.questions??0,approvalCount:ap.value[r.id]?.approvals??0,pendingInteraction:r.pendingInteraction,lastTurnReason:r.lastTurnReason})!=="idle")&&s!==null&&new Date(r.updatedAt).getTime()<s||o.push(r);return o.sort(i),o.map(r=>{const l=hl(r);return{id:r.id,title:r.title,time:Bp(r.updatedAt),busy:Bf(r.id,r.mainTurnActive),pendingInteraction:r.pendingInteraction,lastTurnReason:r.lastTurnReason,lastPrompt:r.lastPrompt,updatedAt:r.updatedAt,workspaceId:l,workspaceName:t.get(l),cwdLabel:r.cwd?Wf(r.cwd):"-",pullRequest:r.pullRequest}})});function aAe(e){return P5({busy:e.busy,unread:fk.value[e.id]??!1,questionCount:ap.value[e.id]?.questions??0,approvalCount:ap.value[e.id]?.approvals??0,pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})!=="idle"}const dk=F(()=>{const e=Nv.value;let t=F8.value;for(let n=e.length-1;n>=t;n--)if(aAe(e[n])){t=n+1;break}return t}),uAe=F(()=>Nv.value.slice(0,dk.value)),cAe=F(()=>xe.flatSessionsHasMore||dk.value<Nv.value.length);function dAe(){F8.value=dk.value+d2,F8.value>Nv.value.length&&xe.flatSessionsHasMore&&Et.loadMoreFlatSessions()}function eD(e){Xc.value;const t=new Set(io.value),n=new Map,i=new Map;for(const s of xe.sessions.toSorted((o,r)=>new Date(r.updatedAt).getTime()-new Date(o.updatedAt).getTime())){if(s.parentSessionId)continue;const o=hl(s);if(e&&t.has(s.id)){i.set(o,(i.get(o)??0)+1);continue}const r={id:s.id,title:s.title,time:Bp(s.updatedAt),busy:Bf(s.id,s.mainTurnActive),pendingInteraction:s.pendingInteraction,lastTurnReason:s.lastTurnReason,updatedAt:s.updatedAt},l=n.get(o)??[];l.push(r),n.set(o,l)}return pl.value.map(s=>({workspace:s,sessions:n.get(s.id)??[],pinnedCount:i.get(s.id)??0,hasMore:xe.sessionsHasMoreByWorkspace[s.id]??!1,loadingMore:xe.sessionsLoadingMoreByWorkspace[s.id]??!1,initialCount:xe.sessionsInitialCountByWorkspace[s.id]??qg}))}const fAe=F(()=>eD(!0)),hAe=F(()=>eD(!1)),pAe=F(()=>{Xc.value;const e=new Set(pl.value.map(s=>s.id)),t=new Map(pl.value.map(s=>[s.id,s.name])),n=xe.sessions.filter(s=>!s.parentSessionId&&!s.archived&&e.has(hl(s)));return ote(n,io.value).pinned.toSorted((s,o)=>new Date(o.updatedAt).getTime()-new Date(s.updatedAt).getTime()).map(s=>{const o=hl(s);return{id:s.id,title:s.title,time:Bp(s.updatedAt),busy:Bf(s.id,s.mainTurnActive),pendingInteraction:s.pendingInteraction,lastTurnReason:s.lastTurnReason,updatedAt:s.updatedAt,workspaceId:o,workspaceName:t.get(o),pinned:!0,cwdLabel:s.cwd?Wf(s.cwd):"-",pullRequest:s.pullRequest}})});function gAe(e){k2.value=e,BL(e)}const tD=F(()=>{const e={};for(const[t,n]of Object.entries(xe.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(xe.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),ap=F(()=>{const e={};for(const[t,n]of Object.entries(xe.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(xe.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),fk=F(()=>{const e={};for(const[t,n]of Object.entries(xe.unreadBySession))n&&(e[t]=!0);return e}),mAe=F(()=>{const e={},t=tD.value;for(const n of xe.sessions){const i=t[n.id]??0;if(i<=0)continue;const s=hl(n);e[s]=(e[s]??0)+i}return e}),vAe=F(()=>xe.recentRoots),yAe=F(()=>xe.availableOpenInApps),Et=d6e(xe,{taskPoller:K$,sideChat:po,modelProvider:Un,pushOperationFailure:Fp,notify:Np,activity:uk,sessionsKnownEmpty:W$,setSessions:sk,updateSession:Ev,upsertSessionSorted:C6e,appendSession:w6e,forgetSession:I$,unpinSessions:sAe,setActiveSessionId:ok,updateSessionMessages:M$,nextOptimisticMsgId:j$,getEventConn:()=>Ar,syncSessionFromSnapshot:lk,reopenSession:J6e,hasLoadedMessages:Z6e,refreshSessionStatus:Jc,refreshSessionGoal:D$,refillSessionGoalOnReload:I6e,refreshSessionPlans:rp,settlePlanReviewLocally:_$,persistSessionProfile:z$,mergedWorkspaces:Tv,workspacesView:pl,status:Y$,workspaceIdForSession:hl,savePermissionToStorage:h6e,savePlanModeToStorage:nk,saveSwarmModeToStorage:C$,saveGoalModeToStorage:w$,draftModes:Lp,saveUnread:K5,saveActiveWorkspaceToStorage:v6e,saveHiddenWorkspacesToStorage:m6e,goalErrorMessage:U6e,initialized:B$,connectIssue:$$,selectedDiffPath:E$,fileDiffLines:T$,fileDiffLoading:L$,fileDiffTexts:N$,fileDiffEmptyFile:F$});function hk(e){return e===xe.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function bAe(e){xe.turnActiveBySession[e]&&delete xe.turnActiveBySession[e],xe.inFlightBySession[e]&&(xe.inFlightBySession[e]=!1)}function kAe(e,t,n){const i=xe.promptIdBySession[e],s=xe.goalBySession[e]?.status==="active"||p2.has(e);Et.finishPromptLocal(e,{turnWasActive:n}),(xe.experimentalFlags?.auto_session_title??xe.config?.experimental?.auto_session_title)===!0&&Et.maybeGenerateSessionTitle(e),Et.loadGitStatus(e),e===xe.activeSessionId?Jc(e):t==="idle"&&!s&&(xe.unreadBySession[e]=!0,K5({[e]:!0}));const o=(xe.approvalsBySession[e]??[]).length>0,r=(xe.questionsBySession[e]??[]).length>0;!s&&fve(t,o,r)&&lu.maybeNotifyCompletion(e,{isUserWatching:hk(e),sessionTitle:xe.sessions.find(l=>l.id===e)?.title??"",promptId:i,onClick:()=>{Et.selectSession(e)}})}function AAe(e,t){const n=t.questions[0],i=n?.header?.trim()??"",s=n?.question?.trim()??"",o=i&&s?`${i}: ${s}`:s||i;lu.maybeNotifyQuestion({isUserWatching:hk(e),sessionTitle:xe.sessions.find(r=>r.id===e)?.title??"",questionPreview:o,questionId:t.questionId,onClick:()=>{Et.selectSession(e)}})}function CAe(e,t){lu.maybeNotifyApproval({isUserWatching:hk(e),sessionTitle:xe.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{Et.selectSession(e)}})}function Fa(){return e7e(),{workspace:l7e,sessions:a7e,activeSessionId:u7e,workspacesView:pl,workspaceSortMode:A2,visibleWorkspace:rAe,activeWorkspaceId:Lv,sessionsForView:lAe,workspaceGroups:fAe,mobileWorkspaceGroups:hAe,pinnedSessions:pAe,flatSessions:uAe,flatSessionsHasMore:cAe,flatSessionsLoadingMore:F(()=>xe.flatSessionsLoadingMore),attentionBySession:tD,pendingBySession:ap,attentionByWorkspace:mAe,unreadBySession:fk,recentRoots:vAe,turns:Z$,tasks:v7e,activeAppTasks:$p,findBashCommandForTask:U$,auxiliaryTranscripts:g2,getFileUrl:V$,todos:b7e,goal:Wd,sessionPlans:z7e,refreshSessionPlans:rp,invalidateSessionPlans:A6e,swarms:G$,swarmMembersByToolCallId:y7e,activationBadges:O7e,compaction:k7e,status:Y$,sessionCost:Z7e,fileDiff:V7e,selectedDiffPath:E$,fileDiffLoading:L$,fileDiffTexts:N$,fileDiffEmptyFile:F$,changes:U7e,gitInfo:N8,gitDiffStats:K7e,activePullRequest:q7e,changesByPath:tAe,pendingApprovals:W7e,availableOpenInApps:yAe,connection:A7e,loading:C7e,sessionLoading:w7e,loadingMoreMessages:x7e,hasMoreMessages:_7e,loadMoreMessagesError:S7e,serverVersion:M7e,backend:E7e,dangerousBypassAuth:T7e,experimentalFlags:I7e,clearDangerousBypassAuth:L7e,initialized:B$,connectIssue:$$,permission:N7e,thinking:F7e,planMode:Q$,planArmed:B7e,swarmMode:$7e,goalMode:D7e,queued:P7e,warnings:j7e,questions:H7e,activity:uk,turnActive:Dp,activeTurnError:f7e,activeTurnRetry:h7e,inFlight:ak,working:m7e,isStartingFirstPrompt:d7e,models:Un.models,starredModelIds:Un.starredModelIds,providers:Un.providers,fontScale:cg.fontScale,setFontScale:cg.setFontScale,colorScheme:cg.colorScheme,setColorScheme:cg.setColorScheme,notifyEnabled:lu.notifyEnabled,notifySound:lu.notifySound,notifyPermission:lu.notifyPermission,setNotifyEnabled:lu.setNotifyEnabled,setNotifySound:lu.setNotifySound,onboarded:P$,setOnboarded:T6e,load:Et.load,selectSession:Et.selectSession,clearActiveSession:Et.clearActiveSession,loadOlderMessages:Et.loadOlderMessages,loadWorkspaces:Et.loadWorkspaces,loadMoreSessions:Et.loadMoreSessions,loadAllSessions:Et.loadAllSessions,ensureFlatSessions:Et.ensureFlatSessions,loadMoreFlatSessions:dAe,selectWorkspace:Et.selectWorkspace,openWorkspace:Et.openWorkspace,openWorkspaceDraft:Et.openWorkspaceDraft,startSessionAndSendPrompt:Et.startSessionAndSendPrompt,startSessionAndActivateSkill:Et.startSessionAndActivateSkill,startSessionAndOpenSideChat:Et.startSessionAndOpenSideChat,addWorkspaceByPath:Et.addWorkspaceByPath,browseFs:Et.browseFs,getFsHome:Et.getFsHome,sendPrompt:Et.sendPrompt,steerPrompt:Et.steerPrompt,sideChatVisible:po.sideChatVisible,sideChatSessionId:po.sideChatSessionId,sideChatTurns:po.sideChatTurns,sideChatRunning:po.sideChatRunning,sideChatSending:po.sideChatSending,openSideChat:po.openSideChat,closeSideChat:po.closeSideChat,sendSideChatPrompt:po.sendSideChatPrompt,uploadImage:Et.uploadImage,abortCurrentPrompt:Et.abortCurrentPrompt,respondApproval:Et.respondApproval,respondQuestion:Et.respondQuestion,dismissQuestion:Et.dismissQuestion,pendingQuestionActions:Et.pendingQuestionActions,pendingApprovalActions:Et.pendingApprovalActions,cancelTask:Et.cancelTask,setPermission:Et.setPermission,setThinking:Un.setThinking,setPlanMode:Et.setPlanMode,togglePlanMode:Et.togglePlanMode,setSwarmMode:Et.setSwarmMode,toggleSwarmMode:Et.toggleSwarmMode,setGoalMode:Et.setGoalMode,toggleGoalMode:Et.toggleGoalMode,createGoal:Et.createGoal,controlGoal:Et.controlGoal,enqueue:Et.enqueue,dismissWarning:Et.dismissWarning,renameSession:Et.renameSession,regenerateSessionTitle:Et.regenerateSessionTitle,renameWorkspace:Et.renameWorkspace,deleteWorkspace:Et.deleteWorkspace,reorderWorkspaces:gAe,setWorkspaceSortMode:iAe,pinSession:X$,unpinSession:ck,togglePinSession:oAe,archiveSession:Et.archiveSession,exportSession:Et.exportSession,restoreSession:Et.restoreSession,loadArchivedSessions:Et.loadArchivedSessions,compact:Et.compact,forkSession:Et.forkSession,undo:Et.undo,unqueue:Et.unqueue,reorderQueue:Et.reorderQueue,searchFiles:Et.searchFiles,loadGitStatus:Et.loadGitStatus,loadFileDiff:Et.loadFileDiff,clearFileDiff:Et.clearFileDiff,listDir:Et.listDir,readFileContent:Et.readFileContent,readHostFileContent:Et.readHostFileContent,getFileDownloadUrl:Et.getFileDownloadUrl,openWorkspaceFile:Et.openWorkspaceFile,openInApp:Et.openInApp,revealWorkspaceFile:Et.revealWorkspaceFile,resolveImageUrl:Et.resolveImageUrl,loadModels:Un.loadModels,loadProviders:Un.loadProviders,skills:c7e,activateSkill:Un.activateSkill,setModel:Un.setModel,toggleStarModel:Un.toggleStarModel,addProvider:Un.addProvider,updateProvider:Un.updateProvider,getProvider:Un.getProvider,deleteProvider:Un.deleteProvider,refreshProvider:Un.refreshProvider,refreshAllProviders:Un.refreshAllProviders,loadCatalogProviders:Un.loadCatalogProviders,importCatalogProvider:Un.importCatalogProvider,importCustomRegistry:Un.importCustomRegistry,authReady:G7e,defaultModel:Q7e,managedProviderStatus:Y7e,managedUserInfo:J7e,managedMembership:X7e,notify:Np,config:eAe,loadConfig:Et.loadConfig,updateConfig:Et.updateConfig,checkAuth:Et.checkAuth,probeManagedMembership:Et.probeManagedMembership,startOAuthLogin:Un.startOAuthLogin,pollOAuthLogin:Un.pollOAuthLogin,cancelOAuthLogin:Un.cancelOAuthLogin,getUsage:Un.getUsage,logout:Et.logout}}const wAe=["aria-expanded"],xAe={class:"user-menu-avatar","aria-hidden":"true"},_Ae=["src"],SAe={class:"user-menu-name"},MAe={class:"user-menu-name"},IAe={class:"user-menu-item-label"},EAe={class:"user-menu-item-label"},TAe={class:"user-menu-item-label user-menu-login-label"},LAe={class:"user-menu-item-label"},NAe={class:"user-menu-row-value"},FAe={class:"user-menu-item-label"},BAe={class:"user-menu-row-value"},$Ae={class:"user-menu-item-label"},DAe={key:0,class:"user-menu-usage"},zAe={key:0,class:"user-menu-usage-state"},RAe={key:1,class:"user-menu-usage-state"},OAe={class:"user-menu-usage-error"},PAe={key:2,class:"user-menu-usage-state user-menu-usage-empty"},jAe={class:"user-menu-usage-main"},HAe={class:"user-menu-usage-label"},WAe={key:0,class:"user-menu-usage-hint"},qAe={class:"user-menu-item-label"},UAe={class:"user-menu-item-label"},KAe=nt({__name:"UserMenu",emits:["login","openSettings"],setup(e,{emit:t}){const n=t,{t:i,locale:s}=Bt(),o=Fa(),{confirm:r}=ju(),l=F(()=>o.managedProviderStatus.value==="authenticated"),a=o.managedUserInfo,u=o.managedMembership,c=F(()=>a.value?.nickname||i("sidebar.defaultUserName")),d=F(()=>u.value==="free"||ate(a.value?.userLevel)),f=F(()=>u.value!=="free"),p=G(!1);Ge(()=>a.value?.avatar,()=>{p.value=!1});const g=F(()=>!!a.value?.avatar&&!p.value),m=o.colorScheme,y=F(()=>i(`theme.${m.value}`)),w=F(()=>m.value==="light"?"light-mode":m.value==="dark"?"dark-mode":"follow-system"),k=[{value:"light",labelKey:"theme.light",icon:"light-mode"},{value:"dark",labelKey:"theme.dark",icon:"dark-mode"},{value:"system",labelKey:"theme.system",icon:"follow-system"}];function A(J){o.setColorScheme(J)}const v=F(()=>a2.find(J=>J.code===s.value)?.label??s.value);function x(J){s.value!==J&&Yb(J)}const S=G(!1),I=G({}),_=G(null),E=G(null);let N=null;function D(J){const ce=J.target;ce.closest(".user-menu")||ce.closest(".user-menu-trigger")||ce.closest(".user-submenu")||R()}function T(J){J.key==="Escape"&&(J.stopPropagation(),R())}async function $(){if(S.value){R();return}S.value=!0,document.addEventListener("mousedown",D),document.addEventListener("keydown",T,!0),window.addEventListener("resize",R),l.value&&ee(),await At(),O();const J=E.value;J&&(N=new ResizeObserver(P),N.observe(J))}function O(){const J=E.value,ce=_.value?.el;if(!J||!ce)return;const ge=J.getBoundingClientRect(),Me=4,Pe=8,ke=ce.offsetHeight,Le={left:`${Math.round(ge.left)}px`,width:`${Math.round(ge.width)}px`};ge.top-ke-Me<Pe?I.value={...Le,top:`${Math.round(Math.min(ge.bottom+Me,window.innerHeight-ke-Pe))}px`,bottom:"auto",transformOrigin:"top left","--menu-pop-shift":"-2px"}:I.value={...Le,top:"auto",bottom:`${Math.round(window.innerHeight-ge.top+Me)}px`,transformOrigin:"bottom left","--menu-pop-shift":"2px"}}function P(){const J=E.value;if(!J)return;j.value=null;const ce=J.getBoundingClientRect();I.value={...I.value,left:`${Math.round(ce.left)}px`,width:`${Math.round(ce.width)}px`}}function R(){S.value=!1,j.value=null,ie(),N?.disconnect(),N=null,document.removeEventListener("mousedown",D),document.removeEventListener("keydown",T,!0),window.removeEventListener("resize",R)}Gn(R);const j=G(null),z=G({}),K=G(null),q={usage:null,theme:null,language:null};let W=null;function Z(J){return ce=>{q[J]=ce instanceof HTMLElement?ce:ce?.$el??null}}function ne(J){ie(),j.value!==J&&(j.value=J,At(Se))}function X(J,ce){J.key!=="Enter"&&J.key!==" "&&J.key!=="ArrowRight"||(J.preventDefault(),ne(ce))}function ue(){ie(),W=setTimeout(()=>{j.value=null,W=null},250)}function ie(){W!==null&&(clearTimeout(W),W=null)}function Se(){const J=j.value,ce=_.value?.el,ge=K.value?.el,Me=J!==null?q[J]:null;if(!ce||!ge||!Me)return;const Pe=4,ke=8,Le=ce.getBoundingClientRect(),it=Me.getBoundingClientRect(),Fe=ge.offsetHeight,De=Math.min(ge.offsetWidth,Le.width);let Ke=Le.right+Pe,gt=!1;Ke+De>window.innerWidth-ke&&(Ke=Math.max(ke,Le.left-De-Pe),gt=!0);const lt=Math.max(ke,Math.min(it.top,window.innerHeight-Fe-ke));z.value={top:`${Math.round(lt)}px`,left:`${Math.round(Ke)}px`,maxWidth:`${Math.round(Le.width)}px`,transformOrigin:gt?"top right":"top left","--menu-pop-shift":"-2px"}}const fe=G(!1),pe=G(null);let Ne=0;async function ee(){const J=++Ne;fe.value=!0;try{const ce=await o.getUsage();J===Ne&&(pe.value=ce)}finally{J===Ne&&(fe.value=!1)}}const ye=F(()=>{if(pe.value?.kind!=="ok")return[];const{summary:J,limits:ce}=pe.value,ge=rte(ce,5,"hour");return[J,ge].filter(Me=>Me!=null)}),H=F(()=>pe.value?.kind==="error"?pe.value.message:i("settings.planUsage.loadFailed"));function Y(J){return J.resetAt===void 0?"":dL(J.resetAt,i)}function ve(){R(),kp()}function re(){R(),n("login")}function se(){R(),n("openSettings")}async function U(){R(),await r({title:i("sidebar.logoutConfirmTitle"),message:i("sidebar.logoutConfirmMessage"),variant:"danger",action:()=>o.logout()})}return(J,ce)=>(b(),M(Be,null,[C("button",{ref_key:"triggerRef",ref:E,class:"user-menu-trigger",type:"button","aria-haspopup":"menu","aria-expanded":S.value,onClick:It($,["stop"])},[l.value?(b(),M(Be,{key:0},[C("span",xAe,[g.value?(b(),M("img",{key:0,src:h(a)?.avatar,alt:"",onError:ce[0]||(ce[0]=ge=>p.value=!0)},null,40,_Ae)):(b(),de(h(Ce),{key:1,name:"user",size:"sm"}))]),C("span",SAe,B(c.value),1)],64)):(b(),M(Be,{key:1},[V(h(Ce),{name:"user"}),C("span",MAe,B(h(i)("sidebar.notSignedIn")),1)],64))],8,wAe),(b(),de(jr,{to:"body"},[V(gs,{name:"menu-pop"},{default:he(()=>[S.value?(b(),de(h(al),{key:0,ref_key:"menuRef",ref:_,class:"user-menu",style:Vt(I.value),onClick:ce[14]||(ce[14]=It(()=>{},["stop"]))},{default:he(()=>[l.value?(b(),M(Be,{key:0},[f.value?(b(),de(h(yn),{key:0,ref:Z("usage"),"aria-haspopup":"true","aria-expanded":j.value==="usage",onMouseenter:ce[1]||(ce[1]=ge=>ne("usage")),onMouseleave:ue,onFocus:ce[2]||(ce[2]=ge=>ne("usage")),onBlur:ue,onClick:ce[3]||(ce[3]=ge=>ne("usage")),onKeydown:ce[4]||(ce[4]=ge=>X(ge,"usage"))},{default:he(()=>[V(h(Ce),{name:"histogram",size:"sm"}),C("span",IAe,B(h(i)("settings.planUsage.title")),1),V(h(Ce),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"])):te("",!0),d.value?(b(),de(h(yn),{key:1,onClick:ve,onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"music",size:"sm"}),C("span",EAe,B(h(i)("sidebar.upgradeMembership")),1),V(h(Ce),{name:"external-link",size:"sm"})]),_:1})):te("",!0),V(h(yn),{separator:""})],64)):(b(),M(Be,{key:1},[V(h(yn),{class:"user-menu-login",onClick:re,onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"log-in",size:"sm"}),C("span",TAe,B(h(i)("sidebar.signIn")),1)]),_:1}),V(h(yn),{separator:""})],64)),V(h(yn),{ref:Z("theme"),"aria-haspopup":"true","aria-expanded":j.value==="theme",onMouseenter:ce[5]||(ce[5]=ge=>ne("theme")),onMouseleave:ue,onFocus:ce[6]||(ce[6]=ge=>ne("theme")),onBlur:ue,onClick:ce[7]||(ce[7]=ge=>ne("theme")),onKeydown:ce[8]||(ce[8]=ge=>X(ge,"theme"))},{default:he(()=>[V(h(Ce),{name:w.value,size:"sm"},null,8,["name"]),C("span",LAe,B(h(i)("theme.colorSchemeLabel")),1),C("span",NAe,B(y.value),1),V(h(Ce),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),V(h(yn),{ref:Z("language"),"aria-haspopup":"true","aria-expanded":j.value==="language",onMouseenter:ce[9]||(ce[9]=ge=>ne("language")),onMouseleave:ue,onFocus:ce[10]||(ce[10]=ge=>ne("language")),onBlur:ue,onClick:ce[11]||(ce[11]=ge=>ne("language")),onKeydown:ce[12]||(ce[12]=ge=>X(ge,"language"))},{default:he(()=>[V(h(Ce),{name:"translate",size:"sm"}),C("span",FAe,B(h(i)("sidebar.language")),1),C("span",BAe,B(v.value),1),V(h(Ce),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),V(h(yn),{onClick:se,onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"settings",size:"sm"}),C("span",$Ae,B(h(i)("settings.title")),1)]),_:1}),l.value?(b(),M(Be,{key:2},[V(h(yn),{separator:""}),V(h(yn),{onClick:ce[13]||(ce[13]=ge=>void U()),onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"log-out",size:"sm"}),qe(" "+B(h(i)("sidebar.signOut")),1)]),_:1})],64)):te("",!0)]),_:1},8,["style"])):te("",!0)]),_:1})])),(b(),de(jr,{to:"body"},[V(gs,{name:"menu-pop"},{default:he(()=>[j.value!==null?(b(),de(h(al),{key:0,ref_key:"submenuRef",ref:K,class:"user-submenu",style:Vt(z.value),role:j.value==="usage"?"dialog":"menu",onClick:ce[16]||(ce[16]=It(()=>{},["stop"])),onMouseenter:ie,onMouseleave:ue,onFocusin:ie,onFocusout:ue},{default:he(()=>[j.value==="usage"?(b(),M("div",DAe,[fe.value?(b(),M("div",zAe,[V(h(Ii),{size:"sm"})])):pe.value?.kind!=="ok"?(b(),M("div",RAe,[C("span",OAe,B(H.value),1),V(h(Ht),{variant:"ghost",size:"sm",onClick:ce[15]||(ce[15]=ge=>void ee())},{default:he(()=>[qe(B(h(i)("settings.planUsage.retry")),1)]),_:1})])):ye.value.length===0?(b(),M("span",PAe,B(h(i)("settings.planUsage.empty")),1)):(b(!0),M(Be,{key:3},yt(ye.value,(ge,Me)=>(b(),M("div",{key:Me,class:"user-menu-usage-row"},[C("span",jAe,[C("span",HAe,B(h(cL)(ge,h(i))),1),Y(ge)?(b(),M("span",WAe,B(Y(ge)),1)):te("",!0)]),C("span",{class:$e(["user-menu-usage-value",`sev-${h(v3)(ge.used,ge.limit)}`])},B(h(i)("settings.planUsage.usedPct",{pct:h(Cg)(ge.used,ge.limit)})),3)]))),128))])):j.value==="theme"?(b(),M(Be,{key:1},yt(k,ge=>V(h(yn),{key:ge.value,onClick:Me=>A(ge.value)},{default:he(()=>[V(h(Ce),{name:ge.icon,size:"sm"},null,8,["name"]),C("span",qAe,B(h(i)(ge.labelKey)),1),h(m)===ge.value?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):te("",!0)]),_:2},1032,["onClick"])),64)):(b(!0),M(Be,{key:2},yt(h(a2),ge=>(b(),de(h(yn),{key:ge.code,onClick:Me=>x(ge.code)},{default:he(()=>[C("span",UAe,B(ge.label),1),h(s)===ge.code?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):te("",!0)]),_:2},1032,["onClick"]))),128))]),_:1},8,["style","role"])):te("",!0)]),_:1})]))],64))}}),VAe=vt(KAe,[["__scopeId","data-v-ee9821b4"]]),ZAe={class:"ep-search"},GAe=["placeholder"],QAe={class:"ep-scroll"},YAe={key:0,class:"ep-grid"},JAe=["onClick"],XAe={key:1,class:"ep-empty"},eCe={class:"ep-label"},tCe={class:"ep-grid"},nCe=["onClick"],iCe={class:"ep-label"},sCe={class:"ep-grid"},oCe=["onClick"],VS="kimi-web.recent-emojis",rCe=nt({__name:"SessionEmojiPicker",props:{current:{default:null},removable:{type:Boolean,default:!0}},emits:["pick"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),{handleCompositionStart:s,handleCompositionEnd:o,isComposingKeyEvent:r}=qr(),l=e,a=n,u=["⏳","⚠️","🐛","✨","🔥","🚀","🎯","🧪","📝","🔍","🛠️","💡","📦","🎨","🔒","📈","🧹","🚧","✅","❓","🌙","☕","🐳","🗂️","📊","🤖","🧩","⚙️","🌱","📌","💥","🕐"],c={faces:"sidebar.emojiGroupFaces",nature:"sidebar.emojiGroupNature",food:"sidebar.emojiGroupFood",activity:"sidebar.emojiGroupActivity",objects:"sidebar.emojiGroupObjects",symbols:"sidebar.emojiGroupSymbols"},d=Nee.map(S=>({id:S,labelKey:c[S],emojis:iL.filter(I=>I.group===S).map(I=>I.emoji)})),f=G(p());function p(){try{const S=JSON.parse(localStorage.getItem(VS)??"[]");return Array.isArray(S)?S.filter(I=>typeof I=="string"):[]}catch{return[]}}function g(S,I){f.value=Dee(f.value,S);try{localStorage.setItem(VS,JSON.stringify(f.value))}catch{}a("pick",S,I)}const m=G(""),y=F(()=>m.value.trim().length>0),w=F(()=>Bee(m.value)),k=G(null);gn(()=>k.value?.focus());function A(S){if(r(S))return;const I=w.value[0];y.value&&I&&g(I)}function v(){let S=l.current??void 0;for(;S===void 0||S===l.current;)S=u[Math.floor(Math.random()*u.length)];g(S,"random")}const x=G(null);return t({el:F(()=>x.value?.el),isComposingKeyEvent:r}),(S,I)=>(b(),de(h(al),{ref_key:"menuRef",ref:x,class:"emoji-picker",role:"dialog","aria-label":h(i)("sidebar.sessionEmojiTitle"),onKeydown:I[4]||(I[4]=It(()=>{},["stop"]))},{default:he(()=>[C("div",ZAe,[V(h(Ce),{name:"search",size:"sm"}),Nn(C("input",{ref_key:"inputRef",ref:k,"onUpdate:modelValue":I[0]||(I[0]=_=>m.value=_),class:"ep-input",type:"text",placeholder:h(i)("sidebar.searchEmoji"),autocomplete:"off",spellcheck:"false",onKeydown:Hr(A,["enter"]),onCompositionstart:I[1]||(I[1]=(..._)=>h(s)&&h(s)(..._)),onCompositionend:I[2]||(I[2]=(..._)=>h(o)&&h(o)(..._))},null,40,GAe),[[Ao,m.value]])]),C("div",QAe,[y.value?(b(),M(Be,{key:0},[w.value.length?(b(),M("div",YAe,[(b(!0),M(Be,null,yt(w.value,_=>(b(),M("button",{key:_,class:$e(["ep-e",{sel:_===e.current}]),type:"button",onClick:E=>g(_)},B(_),11,JAe))),128))])):(b(),M("div",XAe,B(h(i)("sidebar.noEmojiResults")),1))],64)):(b(),M(Be,{key:1},[f.value.length?(b(),M(Be,{key:0},[C("div",eCe,B(h(i)("sidebar.recentEmojis")),1),C("div",tCe,[(b(!0),M(Be,null,yt(f.value,_=>(b(),M("button",{key:_,class:$e(["ep-e",{sel:_===e.current}]),type:"button",onClick:E=>g(_)},B(_),11,nCe))),128))])],64)):te("",!0),(b(!0),M(Be,null,yt(h(d),_=>(b(),M(Be,{key:_.id},[C("div",iCe,B(h(i)(_.labelKey)),1),C("div",sCe,[(b(!0),M(Be,null,yt(_.emojis,E=>(b(),M("button",{key:E,class:$e(["ep-e",{sel:E===e.current}]),type:"button",onClick:N=>g(E)},B(E),11,oCe))),128))])],64))),128))],64))]),V(h(yn),{separator:""}),V(h(yn),{role:"button",disabled:!(e.current&&e.removable),onClick:I[3]||(I[3]=_=>a("pick",null))},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"}),qe(" "+B(h(i)("sidebar.removeEmoji")),1)]),_:1},8,["disabled"]),V(h(yn),{role:"button",onClick:v},{default:he(()=>[V(h(Ce),{name:"sparkles",size:"sm"}),qe(" "+B(h(i)("sidebar.randomEmoji")),1)]),_:1})]),_:1},8,["aria-label"]))}}),lCe=vt(rCe,[["__scopeId","data-v-b0dbbae4"]]),aCe={class:"row"},uCe={key:0,class:"lead","aria-hidden":"true"},cCe={key:1,class:"unread-dot"},dCe={class:"left"},fCe=["readonly","onKeydown"],hCe={key:0,class:"gen-dots","aria-hidden":"true"},pCe=["aria-label"],gCe={key:1,class:"act"},mCe={key:0,class:"ts"},vCe={key:1,class:"st"},yCe={key:1,class:"unread-dot"},bCe={key:2,class:"ha"},kCe={key:0,class:"sub"},ACe={class:"sub-text"},CCe=["aria-label"],wCe={class:"menu-time"},xCe=nt({__name:"SessionRow",props:{session:{},active:{type:Boolean},approvalCount:{default:0},questionCount:{default:0},unread:{type:Boolean,default:!1}},emits:["select","rename","generateTitle","renameStateChange","archive","fork","export","pin"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),s=e,o=n;function r(lt){const ft=new Date(lt);if(Number.isNaN(ft.getTime()))return lt;const Lt=bn=>String(bn).padStart(2,"0");return`${ft.getFullYear()}-${Lt(ft.getMonth()+1)}-${Lt(ft.getDate())} ${Lt(ft.getHours())}:${Lt(ft.getMinutes())}`}const l=F(()=>s.session.updatedAt?r(s.session.updatedAt):s.session.time),a=F(()=>s.session.cwdLabel!==void 0),u=F(()=>ne.value?"idle":P5({busy:s.session.busy,unread:s.unread,questionCount:s.questionCount,approvalCount:s.approvalCount,pendingInteraction:s.session.pendingInteraction,lastTurnReason:s.session.lastTurnReason})),c=F(()=>u.value==="awaiting-question"),d=F(()=>u.value==="awaiting-approval"),f=F(()=>u.value==="aborted"),p=F(()=>u.value==="running"),g=F(()=>u.value==="unread"),m=F(()=>u.value!=="idle"),y=G(!1),w=G(null),k=G({});function A(lt){const ft=lt.target;w.value?.el?.contains(ft)||x()}async function v(){O(),y.value=!0,setTimeout(()=>document.addEventListener("mousedown",A),0),window.addEventListener("resize",x),await At()}function x(){y.value=!1,document.removeEventListener("mousedown",A),window.removeEventListener("resize",x)}Cn(()=>{document.removeEventListener("mousedown",A),document.removeEventListener("mousedown",P),window.removeEventListener("keydown",R,!0),window.removeEventListener("resize",x),window.removeEventListener("resize",O)});const S=F(()=>vL(s.session.title)),I=F(()=>{const lt=S.value.emoji;return lt?s.session.title.slice(lt.length):s.session.title}),_=G(!1),E=G(null),N=G({});let D=null;function T(lt,ft,Lt){const bn=E.value?.el,Gt=4,Qt=8,kn=bn?.offsetHeight??0,_n=bn?.offsetWidth??0;let je=lt.bottom+Gt,st=!1;je+kn>window.innerHeight-Qt&&(je=Math.max(Qt,lt.top-kn-Gt),st=!0);const Ue=Lt??(ft==="left"?lt.left:lt.right-_n),Ft=Math.max(Qt,Math.min(Ue,window.innerWidth-_n-Qt)),Ct=Lt===void 0?ft:`${Math.round(Math.min(Math.max(Lt-Ft,0),_n))}px`;N.value={top:`${Math.round(je)}px`,left:`${Math.round(Ft)}px`,transformOrigin:`${Ct} ${st?"bottom":"top"}`,"--menu-pop-shift":st?"2px":"-2px"}}async function $(lt,ft,Lt="left",bn){const Gt=ft??lt?.getBoundingClientRect();if(Gt){if(_.value){O();return}x(),D=lt??null,_.value=!0,setTimeout(()=>document.addEventListener("mousedown",P),0),window.addEventListener("keydown",R,!0),window.addEventListener("resize",O),await At(),T(Gt,Lt,bn)}}function O(){_.value=!1,D=null,document.removeEventListener("mousedown",P),window.removeEventListener("keydown",R,!0),window.removeEventListener("resize",O)}function P(lt){const ft=lt.target;E.value?.el?.contains(ft)||D?.contains(ft)||O()}function R(lt){lt.key==="Escape"&&(E.value?.isComposingKeyEvent(lt)||(lt.preventDefault(),lt.stopPropagation(),O()))}function j(lt){return lt.clientX||lt.clientY?new DOMRect(lt.clientX,lt.clientY,0,0):void 0}function z(lt){lt.stopPropagation();const ft=lt;$(ft.currentTarget,j(ft),"left",ft.clientX||void 0)}function K(lt){const ft=w.value?.el,Lt=lt,bn=j(Lt)??ft?.getBoundingClientRect();x(),$(ft,bn,"left",Lt.clientX||void 0)}function q(lt){if(O(),lt===S.value.emoji)return;const ft=zte(s.session.title,lt);ft&&ft!==s.session.title&&o("rename",s.session.id,ft)}const W=Fa(),Z=F(()=>(W.experimentalFlags.value.auto_session_title??W.config.value?.experimental?.auto_session_title)===!0),ne=G(!1),X=G(""),ue=G(null),ie=G(null),Se=G(!1);let fe="",pe=null;const{handleCompositionStart:Ne,handleCompositionEnd:ee,isComposingKeyEvent:ye}=qr();async function H(){x(),O(),ne.value=!0,X.value=s.session.title,await At();try{ue.value?.focus(),ue.value?.select()}catch{}}function Y(){if(!ne.value)return;const lt=X.value.trim();lt&<!==pe&<!==s.session.title&&o("rename",s.session.id,lt),ne.value=!1}function ve(){Se.value||Y()}function re(lt){ye(lt)||Se.value||Y()}function se(lt){ye(lt)||U()}function U(){Se.value=!1,ne.value=!1}function J(lt){const ft=ie.value;if(!(ft===null||!(lt.target instanceof Node)||ft.contains(lt.target))){if(Se.value){Se.value=!1,ne.value=!1;return}Y()}}Ge(ne,lt=>{lt?document.addEventListener("pointerdown",J,!0):document.removeEventListener("pointerdown",J,!0)}),Cn(()=>document.removeEventListener("pointerdown",J,!0));function ce(){Se.value||(Se.value=!0,fe=X.value,pe=null,X.value="",o("generateTitle",s.session.id,lt=>{Se.value=!1,ne.value&&(X.value=lt??fe,pe=lt,At(()=>{try{ue.value?.focus(),ue.value?.select()}catch{}}))}))}Ge(ne,lt=>o("renameStateChange",lt));async function ge(lt){ne.value||(lt.preventDefault(),lt.stopPropagation(),y.value&&x(),await v(),Me(lt))}function Me(lt){const ft=w.value?.el,Lt=8,bn=ft?.offsetHeight??0,Gt=ft?.offsetWidth??0;let Qt=lt.clientY,kn=!1;Qt+bn>window.innerHeight-Lt&&(Qt=Math.max(Lt,lt.clientY-bn),kn=!0);let _n=lt.clientX,je=!1;_n+Gt>window.innerWidth-Lt&&(_n=Math.max(Lt,lt.clientX-Gt),je=!0),k.value={top:`${Math.round(Qt)}px`,left:`${Math.round(_n)}px`,transformOrigin:`${kn?"bottom":"top"} ${je?"right":"left"}`,"--menu-pop-shift":kn?"2px":"-2px"}}const Pe=G(!1),ke=G(!1);async function Le(){const lt=await no(s.session.id);Pe.value=lt,ke.value=!lt,setTimeout(()=>{Pe.value=!1,ke.value=!1,x()},1500)}function it(){x(),o("fork",s.session.id)}function Fe(){x(),o("export",s.session.id)}function De(){x(),o("pin",s.session.id)}function Ke(){x(),o("archive",s.session.id)}t({closeMenu:x});function gt(){const lt=s.session.pullRequest?.url;lt&&window.open(lt,"_blank","noopener")}return(lt,ft)=>(b(),M("div",{class:$e(["se",{on:e.active,flat:a.value}]),onClick:ft[8]||(ft[8]=Lt=>o("select",e.session.id)),onContextmenu:ge},[C("div",aCe,[a.value?te("",!0):(b(),M("span",uCe,[p.value?(b(),de(h(Ii),{key:0,size:"sm"})):g.value?(b(),M("span",cCe)):te("",!0)])),C("div",dCe,[ne.value?(b(),M("div",{key:0,ref_key:"renameWrapRef",ref:ie,class:$e(["rename-wrap",{generating:Se.value}]),onClick:ft[4]||(ft[4]=It(()=>{},["stop"]))},[Nn(C("input",{ref_key:"renameInputRef",ref:ue,"onUpdate:modelValue":ft[0]||(ft[0]=Lt=>X.value=Lt),class:"rename-input",readonly:Se.value,onKeydown:[Hr(It(re,["stop"]),["enter"]),Hr(It(se,["stop"]),["esc"])],onCompositionstart:ft[1]||(ft[1]=(...Lt)=>h(Ne)&&h(Ne)(...Lt)),onCompositionend:ft[2]||(ft[2]=(...Lt)=>h(ee)&&h(ee)(...Lt)),onBlur:ve},null,40,fCe),[[Ao,X.value]]),Se.value?(b(),M("span",hCe,[...ft[9]||(ft[9]=[C("i",null,null,-1),C("i",null,null,-1),C("i",null,null,-1)])])):te("",!0),Z.value?(b(),de(h(mn),{key:1,text:h(i)("sidebar.genTitle")},{default:he(()=>[V(h(rn),{class:"gen-title-btn",size:"sm",label:h(i)("sidebar.genTitle"),disabled:Se.value,onMousedown:ft[3]||(ft[3]=It(()=>{},["prevent","stop"])),onClick:It(ce,["stop"])},{default:he(()=>[V(h(Ce),{name:"gen-title"})]),_:1},8,["label","disabled"])]),_:1},8,["text"])):te("",!0)],2)):(b(),M("span",{key:1,class:"t",onDblclick:It(H,["stop"])},[S.value.emoji?(b(),M("button",{key:0,type:"button",class:"emoji","aria-label":h(i)("sidebar.setEmoji"),onClick:It(z,["stop"]),onDblclick:ft[5]||(ft[5]=It(()=>{},["stop"]))},B(S.value.emoji),41,pCe)):te("",!0),qe(B(I.value),1)],32))]),ne.value?te("",!0):(b(),M("span",gCe,[V(h(mn),{text:h(i)("workspace.awaitingAnswerTitle")},{default:he(()=>[c.value?(b(),de(h(Pl),{key:0,variant:"info",size:"sm"},{default:he(()=>[qe(B(h(i)("workspace.awaitingAnswer")),1)]),_:1})):te("",!0)]),_:1},8,["text"]),V(h(mn),{text:h(i)("workspace.awaitingPermissionTitle")},{default:he(()=>[d.value?(b(),de(h(Pl),{key:0,variant:"warning",size:"sm"},{default:he(()=>[qe(B(h(i)("workspace.awaitingPermission")),1)]),_:1})):te("",!0)]),_:1},8,["text"]),V(h(mn),{text:h(i)("workspace.abortedTitle")},{default:he(()=>[f.value?(b(),de(h(Pl),{key:0,variant:"danger",size:"sm"},{default:he(()=>[qe(B(h(i)("workspace.aborted")),1)]),_:1})):te("",!0)]),_:1},8,["text"]),!a.value||!m.value?(b(),M("span",mCe,B(e.session.time),1)):p.value||g.value?(b(),M("span",vCe,[p.value?(b(),de(h(Ii),{key:0,size:"sm"})):(b(),M("span",yCe))])):te("",!0),ne.value?te("",!0):(b(),M("span",bCe,[V(h(mn),{text:e.session.pinned?h(i)("sidebar.unpin"):h(i)("sidebar.pin")},{default:he(()=>[V(h(rn),{class:"pin-btn",size:"sm",label:e.session.pinned?h(i)("sidebar.unpin"):h(i)("sidebar.pin"),onClick:It(De,["stop"])},{default:he(()=>[V(h(Ce),{name:e.session.pinned?"unpin":"pin"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"]),V(h(mn),{text:h(i)("sidebar.archive")},{default:he(()=>[V(h(rn),{class:"archive-btn",size:"sm",label:h(i)("sidebar.archive"),onClick:It(Ke,["stop"])},{default:he(()=>[V(h(Ce),{name:"archive"})]),_:1},8,["label"])]),_:1},8,["text"])]))]))]),e.session.cwdLabel!==void 0?(b(),M("div",kCe,[V(h(Ce),{class:"sub-icon",name:"folder-closed",size:"sm"}),C("span",ACe,B(e.session.cwdLabel),1),e.session.pullRequest?(b(),M("button",{key:0,type:"button",class:$e(["pr",`pr--${e.session.pullRequest.state}`]),"aria-label":`PR #${e.session.pullRequest.number}`,onClick:It(gt,["stop"])},[V(h(Ce),{name:"git-pull-request",size:"sm"}),C("span",null,"#"+B(e.session.pullRequest.number),1)],10,CCe)):te("",!0)])):te("",!0),(b(),de(jr,{to:"body"},[V(gs,{name:"menu-pop"},{default:he(()=>[y.value?(b(),de(h(al),{key:0,ref_key:"menuRef",ref:w,class:"menu",style:Vt(k.value),onClick:ft[6]||(ft[6]=It(()=>{},["stop"]))},{default:he(()=>[V(h(yn),{danger:ke.value,onClick:Le},{default:he(()=>[V(h(Ce),{name:"copy",size:"sm"}),qe(" "+B(ke.value?h(i)("sidebar.copyFailed"):Pe.value?h(i)("sidebar.copied"):h(i)("sidebar.copySessionId")),1)]),_:1},8,["danger"]),V(h(yn),{separator:""}),V(h(yn),{onClick:H},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),qe(" "+B(h(i)("sidebar.rename")),1)]),_:1}),V(h(yn),{onClick:K},{default:he(()=>[V(h(Ce),{name:"emoji",size:"sm"}),qe(" "+B(h(i)("sidebar.setEmoji")),1)]),_:1}),V(h(yn),{onClick:it},{default:he(()=>[V(h(Ce),{name:"git-fork",size:"sm"}),qe(" "+B(h(i)("sidebar.fork")),1)]),_:1}),V(h(yn),{onClick:Fe},{default:he(()=>[V(h(Ce),{name:"download",size:"sm"}),qe(" "+B(h(i)("sidebar.export")),1)]),_:1}),V(h(yn),{onClick:De},{default:he(()=>[V(h(Ce),{name:e.session.pinned?"unpin":"pin",size:"sm"},null,8,["name"]),qe(" "+B(e.session.pinned?h(i)("sidebar.unpin"):h(i)("sidebar.pin")),1)]),_:1}),V(h(yn),{onClick:Ke},{default:he(()=>[V(h(Ce),{name:"archive",size:"sm"}),qe(" "+B(h(i)("sidebar.archive")),1)]),_:1}),V(h(yn),{separator:""}),C("div",wCe,B(l.value),1)]),_:1},8,["style"])):te("",!0)]),_:1})])),(b(),de(jr,{to:"body"},[V(gs,{name:"menu-pop"},{default:he(()=>[_.value?(b(),de(lCe,{key:0,ref_key:"pickerRef",ref:E,class:"picker",style:Vt(N.value),current:S.value.emoji,removable:S.value.rest.length>0,onClick:ft[7]||(ft[7]=It(()=>{},["stop"])),onPick:q},null,8,["style","current","removable"])):te("",!0)]),_:1})]))],34))}}),pk=vt(xCe,[["__scopeId","data-v-8cccabc6"]]),_Ce=["draggable"],SCe={class:"gh-top"},MCe={class:"gh-name"},ICe=["inert"],ECe={key:0,class:"show-more-row"},TCe=["disabled"],LCe={class:"show-more-label"},NCe={key:1,class:"show-more-sep","aria-hidden":"true"},FCe={class:"show-more-label"},BCe={key:1,class:"group-empty"},$Ce=nt({__name:"WorkspaceGroup",props:{group:{},activeWorkspaceId:{},activeId:{},renamingId:{},renameValue:{},renameInputRef:{},pendingBySession:{},unreadBySession:{},wsMenuOpenId:{},dragging:{type:Boolean},sortable:{type:Boolean},isCollapsed:{type:Function},visibleLimit:{type:Function},pinnedDragSession:{}},emits:["groupClick","groupContextmenu","toggleWsMenu","createInWorkspace","selectSession","renameSession","generateSessionTitle","archiveSession","forkSession","exportSession","pinSession","dropPinnedSession","expand","collapse","confirmRename","cancelRename","updateRenameValue","wsDragstart","wsDragend"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=F({get:()=>i.renameValue,set:N=>s("updateRenameValue",N)}),r=G(!1),l=F(()=>i.pinnedDragSession!=null),a=F(()=>i.pinnedDragSession?.workspaceId===i.group.workspace.id);function u(N){if(i.pinnedDragSession!=null){if(!a.value){N.dataTransfer&&(N.dataTransfer.dropEffect="none");return}N.preventDefault(),N.dataTransfer&&(N.dataTransfer.dropEffect="move"),r.value=!0}}function c(N){i.pinnedDragSession==null||!a.value||(N.preventDefault(),r.value=!1,s("dropPinnedSession",i.pinnedDragSession.id))}function d(N){N.currentTarget.contains(N.relatedTarget)||(r.value=!1)}const f=F(()=>i.visibleLimit(i.group.workspace.id)??i.group.initialCount),p=F(()=>{const N=i.group.sessions.slice(0,f.value);if(i.activeId&&!N.some(D=>D.id===i.activeId)){const D=i.group.sessions.find(T=>T.id===i.activeId);if(D)return[...N,D]}return N}),g=F(()=>i.group.sessions.length>f.value||i.group.hasMore||i.group.loadingMore),m=F(()=>f.value>i.group.initialCount);function y(N){i.renameInputRef.value=N instanceof HTMLInputElement?N:null}const{handleCompositionStart:w,handleCompositionEnd:k,isComposingKeyEvent:A}=qr();function v(N){A(N)||s("confirmRename")}function x(N){A(N)||s("cancelRename")}const S=G(null);function I(N){i.renamingId!==i.group.workspace.id&&s("groupContextmenu",i.group.workspace,N)}function _(N){i.sortable!==!1&&N.dataTransfer&&(N.dataTransfer.effectAllowed="move",N.dataTransfer.setData("text/plain",i.group.workspace.id),s("wsDragstart",i.group.workspace.id))}function E(N,D){D.dataTransfer&&(D.dataTransfer.effectAllowed="move",D.dataTransfer.setData(wm,N),D.dataTransfer.setData("text/plain",N))}return(N,D)=>(b(),M("div",{class:$e(["group",{dragging:e.dragging,"pinned-drag-active":l.value&&a.value,"pinned-drop-hover":r.value,"pinned-drop-blocked":l.value&&!a.value}]),onDragover:u,onDrop:c,onDragleave:d},[C("div",{class:$e(["gh",{on:e.group.workspace.id===e.activeWorkspaceId&&e.activeId==="",collapsed:e.isCollapsed(e.group.workspace.id)}]),draggable:e.sortable!==!1&&e.renamingId!==e.group.workspace.id,onClick:D[7]||(D[7]=It(T=>s("groupClick",e.group.workspace.id,T),["stop"])),onContextmenu:I,onDragstart:_,onDragend:D[8]||(D[8]=T=>s("wsDragend"))},[C("div",SCe,[e.isCollapsed(e.group.workspace.id)?(b(),de(h(Ce),{key:0,class:"gh-folder",name:"folder-closed"})):(b(),de(h(Ce),{key:1,class:"gh-folder",name:"folder"})),e.renamingId!==e.group.workspace.id?(b(),de(h(mn),{key:2,text:e.group.workspace.root},{default:he(()=>[C("span",MCe,B(e.group.workspace.name),1)]),_:1},8,["text"])):Nn((b(),M("input",{key:3,ref:y,"onUpdate:modelValue":D[0]||(D[0]=T=>o.value=T),class:"gh-rename",type:"text",onKeydown:[Hr(v,["enter"]),Hr(x,["esc"])],onCompositionstart:D[1]||(D[1]=(...T)=>h(w)&&h(w)(...T)),onCompositionend:D[2]||(D[2]=(...T)=>h(k)&&h(k)(...T)),onBlur:D[3]||(D[3]=T=>s("cancelRename")),onClick:D[4]||(D[4]=It(()=>{},["stop"]))},null,544)),[[Ao,o.value]]),e.renamingId!==e.group.workspace.id?(b(),M("div",{key:4,class:$e(["gh-actions",{open:e.wsMenuOpenId===e.group.workspace.id}])},[V(h(rn),{class:$e(["gh-more",{open:e.wsMenuOpenId===e.group.workspace.id}]),size:"sm",label:h(n)("sidebar.options"),tooltip:h(n)("sidebar.options"),"aria-haspopup":"menu","aria-expanded":e.wsMenuOpenId===e.group.workspace.id,onClick:D[5]||(D[5]=It(T=>s("toggleWsMenu",e.group.workspace,T),["stop"]))},{default:he(()=>[V(h(Ce),{name:"dots-horizontal"})]),_:1},8,["class","label","tooltip","aria-expanded"]),V(h(rn),{class:"gh-add",size:"sm",label:h(n)("workspace.newInGroup"),tooltip:h(n)("workspace.newInGroup"),onClick:D[6]||(D[6]=It(T=>s("createInWorkspace",e.group.workspace.id),["stop"]))},{default:he(()=>[V(h(Ce),{name:"chat-new"})]),_:1},8,["label","tooltip"])],2)):te("",!0)])],42,_Ce),C("div",{class:$e(["group-sessions",{collapsed:e.isCollapsed(e.group.workspace.id)}]),inert:e.isCollapsed(e.group.workspace.id)},[(b(!0),M(Be,null,yt(p.value,T=>(b(),de(pk,{key:T.id,session:T,active:T.id===e.activeId,"approval-count":e.pendingBySession[T.id]?.approvals??0,"question-count":e.pendingBySession[T.id]?.questions??0,unread:e.unreadBySession[T.id]??!1,draggable:S.value!==T.id,onDragstart:$=>E(T.id,$),onRenameStateChange:$=>S.value=$?T.id:null,onSelect:D[9]||(D[9]=$=>s("selectSession",$)),onRename:D[10]||(D[10]=($,O)=>s("renameSession",$,O)),onGenerateTitle:D[11]||(D[11]=($,O)=>s("generateSessionTitle",$,O)),onArchive:D[12]||(D[12]=$=>s("archiveSession",$)),onFork:D[13]||(D[13]=$=>s("forkSession",$)),onExport:D[14]||(D[14]=$=>s("exportSession",$)),onPin:D[15]||(D[15]=$=>s("pinSession",$))},null,8,["session","active","approval-count","question-count","unread","draggable","onDragstart","onRenameStateChange"]))),128)),g.value||m.value?(b(),M("div",ECe,[g.value?(b(),M("button",{key:0,class:"show-more",disabled:e.group.loadingMore,onClick:D[16]||(D[16]=It(T=>s("expand",e.group.workspace.id),["stop"]))},[V(h(Ce),{name:"chevron-down",size:"sm"}),C("span",LCe,B(e.group.loadingMore?h(n)("sidebar.loadingMore"):h(n)("sidebar.showMore")),1)],8,TCe)):te("",!0),g.value&&m.value?(b(),M("span",NCe,"·")):te("",!0),m.value?(b(),M("button",{key:2,class:"show-more",onClick:D[17]||(D[17]=It(T=>s("collapse",e.group.workspace.id),["stop"]))},[V(h(Ce),{name:"chevron-up",size:"sm"}),C("span",FCe,B(h(n)("sidebar.showLess")),1)])):te("",!0)])):te("",!0),e.group.sessions.length===0?(b(),M("div",BCe,B(e.group.pinnedCount>0?h(n)("sidebar.allPinned",{count:e.group.pinnedCount}):h(n)("sidebar.noSessions")),1)):te("",!0)],10,ICe)],34))}}),DCe=vt($Ce,[["__scopeId","data-v-d0f8b852"]]),zCe={class:"pinned-label"},RCe={class:"pinned-title"},OCe={key:0,class:"pinned-rows"},PCe=["draggable","onDragstart"],jCe=nt({__name:"PinnedSessionList",props:{sessions:{},activeId:{},pendingBySession:{},unreadBySession:{}},emits:["selectSession","renameSession","generateSessionTitle","archiveSession","forkSession","exportSession","pinSession","dropPin","sessionDragStart","sessionDragEnd"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),s=e,o=n,r=G(Bie());function l(){r.value=!r.value,$3(r.value)}function a(){r.value&&(r.value=!1,$3(!1))}t({expand:a});const u=G(null),c=G(null);function d(k,A){if(!A.dataTransfer)return;A.dataTransfer.effectAllowed="move",A.dataTransfer.setData("text/plain",k),u.value=k;const v=s.sessions.find(x=>x.id===k)?.workspaceId;v!==void 0&&o("sessionDragStart",k,v)}function f(){u.value=null,o("sessionDragEnd")}Ge(()=>s.sessions,k=>{u.value!==null&&!k.some(A=>A.id===u.value)&&(u.value=null)});const p=G(!1);function g(k){return k.dataTransfer?.types.includes(wm)??!1}function m(k){g(k)&&(k.preventDefault(),k.dataTransfer&&(k.dataTransfer.dropEffect="move"),p.value=!0)}function y(k){p.value=!1;const A=k.dataTransfer?.getData(wm);A&&o("dropPin",A)}function w(k){k.currentTarget.contains(k.relatedTarget)||(p.value=!1)}return(k,A)=>(b(),M("div",{class:$e(["pinned",{"drop-active":p.value}]),onDragover:m,onDrop:y,onDragleave:w},[C("div",zCe,[C("span",RCe,B(h(i)("sidebar.pinned")),1),V(h(rn),{class:$e(["pinned-toggle",{"pinned-toggle--on":r.value}]),size:"sm",label:r.value?h(i)("sidebar.expandPinned"):h(i)("sidebar.collapsePinned"),tooltip:r.value?h(i)("sidebar.expandPinned"):h(i)("sidebar.collapsePinned"),onClick:It(l,["stop"])},{default:he(()=>[r.value?(b(),de(h(Ce),{key:0,name:"chevron-right"})):(b(),de(h(Ce),{key:1,name:"chevron-down"}))]),_:1},8,["class","label","tooltip"])]),r.value?te("",!0):(b(),M("div",OCe,[(b(!0),M(Be,null,yt(e.sessions,v=>(b(),M("div",{key:v.id,class:$e(["pin-row",{dragging:u.value===v.id}]),draggable:c.value!==v.id,onDragstart:x=>d(v.id,x),onDragend:f},[V(pk,{session:v,active:v.id===e.activeId,"approval-count":e.pendingBySession[v.id]?.approvals??0,"question-count":e.pendingBySession[v.id]?.questions??0,unread:e.unreadBySession[v.id]??!1,onRenameStateChange:x=>c.value=x?v.id:null,onSelect:A[0]||(A[0]=x=>o("selectSession",x)),onRename:A[1]||(A[1]=(x,S)=>o("renameSession",x,S)),onGenerateTitle:A[2]||(A[2]=(x,S)=>o("generateSessionTitle",x,S)),onArchive:A[3]||(A[3]=x=>o("archiveSession",x)),onFork:A[4]||(A[4]=x=>o("forkSession",x)),onExport:A[5]||(A[5]=x=>o("exportSession",x)),onPin:A[6]||(A[6]=x=>o("pinSession",x))},null,8,["session","active","approval-count","question-count","unread","onRenameStateChange"])],42,PCe))),128))]))],34))}}),HCe=vt(jCe,[["__scopeId","data-v-9032f3f8"]]),WCe={class:"ch"},qCe={class:"ch-brand"},UCe={class:"ch-tail"},KCe={class:"search-input"},VCe={class:"side-section-label"},ZCe={class:"side-section-title"},GCe={class:"side-section-actions"},QCe={key:0,class:"empty"},YCe=["onDragover","onDrop"],JCe={key:0,class:"empty"},XCe={key:1,class:"show-more-row"},ewe=["disabled"],twe={class:"show-more-label"},nwe={class:"folder-drop-card"},iwe={class:"view-menu-label"},swe={class:"view-menu-check"},owe={class:"view-menu-check"},rwe={class:"view-menu-label"},lwe={class:"view-menu-check"},awe={class:"view-menu-check"},uwe=!1,cwe=1e3,dwe=nt({__name:"Sidebar",props:{activeWorkspace:{default:null},activeWorkspaceId:{default:null},sessions:{},groups:{},workspaceSortMode:{default:"manual"},pinnedSessions:{default:()=>[]},flatSessions:{default:()=>[]},flatHasMore:{type:Boolean,default:!1},flatLoadingMore:{type:Boolean,default:!1},initialized:{type:Boolean,default:!1},activeId:{},attentionBySession:{default:()=>({})},pendingBySession:{default:()=>({})},unreadBySession:{default:()=>({})},colWidth:{default:220},collapsed:{type:Boolean,default:!1},dragging:{type:Boolean,default:!1}},emits:["select","create","createInWorkspace","selectWorkspace","addWorkspace","addWorkspacePaths","rename","generateTitle","archive","fork","export","pin","dropPin","unpin","renameWorkspace","deleteWorkspace","reorderWorkspaces","setWorkspaceSortMode","loadMoreSessions","loadAllSessions","ensureFlatSessions","loadMoreFlatSessions","openSettings","login","collapse"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=G(!1),r=c()?["⌘","K"]:["Ctrl","K"],l=c()?["⌃","⇧","O"]:["Ctrl","Shift","O"];function a(){s("loadAllSessions"),o.value=!0}function u(tt){(tt.metaKey||tt.ctrlKey)&&(tt.key.toLowerCase()==="k"?(tt.preventDefault(),a()):!tt.metaKey&&tt.ctrlKey&&tt.shiftKey&&tt.key.toLowerCase()==="o"&&(tt.preventDefault(),s("create")))}gn(()=>window.addEventListener("keydown",u)),Gn(()=>window.removeEventListener("keydown",u));function c(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const tt=navigator.userAgentData;return tt?.platform==="macOS"||tt?.platform==="iOS"}const d=G(null),f=G(!1),p=G(!1),g=G(!1);let m=null;function y(tt=d.value){tt&&(f.value=tt.scrollTop>0,p.value=tt.scrollTop+tt.clientHeight<tt.scrollHeight-1)}function w(tt){y(tt.target),g.value=!0,m&&clearTimeout(m),m=setTimeout(()=>{g.value=!1,m=null},900)}let k=null;gn(()=>{At(()=>{y(),typeof ResizeObserver=="function"&&d.value&&(k=new ResizeObserver(()=>y()),k.observe(d.value))})}),gp(()=>y()),Gn(()=>{k?.disconnect(),m&&clearTimeout(m)});const A=G(new Set(Fie()));function v(tt){return A.value.has(tt)}function x(tt){const Je=new Set(A.value);Je.has(tt)?Je.delete(tt):Je.add(tt),A.value=Je,ay(Je)}function S(){const tt=new Set(i.groups.map(Je=>Je.workspace.id));A.value=tt,ay(tt)}function I(){const tt=new Set;A.value=tt,ay(tt)}const _=F(()=>i.groups.length>0&&i.groups.every(tt=>A.value.has(tt.workspace.id))),E=G(new Map);function N(tt){return E.value.get(tt)}function D(tt){const Je=i.groups.find(ai=>ai.workspace.id===tt);if(!Je)return;const Rt=(E.value.get(tt)??Je.initialCount)+ek,Ot=new Map(E.value);Ot.set(tt,Rt),E.value=Ot,Je.sessions.length<Rt&&Je.hasMore&&s("loadMoreSessions",tt)}function T(tt){if(!E.value.has(tt))return;const Je=new Map(E.value);Je.delete(tt),E.value=Je}const $=G(null),O=G(null);function P(tt){$.value=tt}function R(){$.value=null,O.value=null}function j(tt){const Je=tt.currentTarget.getBoundingClientRect();return tt.clientY<Je.top+Je.height/2?"before":"after"}function z(tt,Je){$.value===null||$.value===Je||(tt.preventDefault(),tt.dataTransfer&&(tt.dataTransfer.dropEffect="move"),O.value={id:Je,position:j(tt)})}function K(tt){const Je=$.value,Rt=O.value?.id===tt?O.value.position:"before";if(O.value=null,$.value=null,!Je||Je===tt)return;const Ot=use(i.groups.map(ai=>ai.workspace.id),Je,tt,Rt);s("reorderWorkspaces",Ot)}const q=G(null);function W(tt,Je){q.value={id:tt,workspaceId:Je}}function Z(){q.value=null}function ne(tt){q.value=null,s("unpin",tt)}const X=G($ie());function ue(tt){X.value!==tt&&(X.value=tt,Die(tt),tt==="flat"&&s("ensureFlatSessions"))}Ge(()=>i.initialized,tt=>{tt&&X.value==="flat"&&s("ensureFlatSessions")},{immediate:!0});const ie=G(!1),Se=G({}),fe=G(null);function pe(tt){const Je=tt.target;Je.closest(".view-menu")||Je.closest(".side-section-view")||ee()}async function Ne(tt){if(ie.value){ee();return}const Je=tt.currentTarget;ie.value=!0,document.addEventListener("mousedown",pe),window.addEventListener("resize",ee),await At();const Rt=fe.value?.el,Ot=Je.getBoundingClientRect(),ai=4,Ns=8,Ln=Rt?.offsetHeight??0,ls=Rt?.offsetWidth??0;let ts=Ot.bottom+ai,Vi=!1;ts+Ln>window.innerHeight-Ns&&(ts=Math.max(Ns,Ot.top-Ln-ai),Vi=!0);let gi=Ot.right-ls;gi<Ns&&(gi=Ns),Se.value={top:`${Math.round(ts)}px`,left:`${Math.round(gi)}px`,transformOrigin:Vi?"bottom right":"top right","--menu-pop-shift":Vi?"2px":"-2px"}}function ee(){ie.value=!1,document.removeEventListener("mousedown",pe),window.removeEventListener("resize",ee)}function ye(tt){ue(tt),ee()}function H(tt){s("setWorkspaceSortMode",tt),ee()}const Y=G(null);function ve(tt,Je){Je.dataTransfer&&(Je.dataTransfer.effectAllowed="move",Je.dataTransfer.setData(wm,tt),Je.dataTransfer.setData("text/plain",tt))}const re=G(!1);function se(tt){X.value!=="flat"||q.value===null||(tt.preventDefault(),tt.dataTransfer&&(tt.dataTransfer.dropEffect="move"),re.value=!0)}function U(tt){X.value!=="flat"||q.value===null||(tt.preventDefault(),re.value=!1,ne(q.value.id))}function J(tt){tt.currentTarget.contains(tt.relatedTarget)||(re.value=!1)}function ce(tt,Je){Je.target.closest(".gh-more, .gh-add")||x(tt)}function ge(tt){s("select",tt)}const Me=G(null);function Pe(tt){Me.value?Me.value.expand():$3(!1),s("pin",tt)}function ke(tt){Me.value?.expand(),s("dropPin",tt)}const Le=G(0),it=G(!1);function Fe(){Le.value=0,it.value=!1}function De(tt){!$0()||!iy(tt)||(tt.preventDefault(),tt.stopPropagation(),Le.value+=1,it.value=!0)}function Ke(tt){!$0()||!iy(tt)||(tt.preventDefault(),tt.stopPropagation(),tt.dataTransfer&&(tt.dataTransfer.dropEffect="copy"))}function gt(tt){!$0()||!iy(tt)||(Le.value=Math.max(0,Le.value-1),Le.value===0&&(it.value=!1))}function lt(tt){if(Fe(),!$0())return;const Je=Vee(tt);Je.length!==0&&(tt.preventDefault(),tt.stopPropagation(),s("addWorkspacePaths",Je))}const ft=G(null),Lt=G(""),bn=G(""),Gt=G(null);function Qt(){return Gt}function kn(tt,Je){ft.value=tt,bn.value=Je,Lt.value=Je,At().then(()=>Gt.value?.focus())}function _n(){const tt=ft.value,Je=Lt.value.trim();tt&&Je&&Je!==bn.value&&s("renameWorkspace",tt,Je),ft.value=null}function je(){ft.value=null}function st(tt){Lt.value=tt}const Ue=G(!1),Ft=G(null),Ct=G({}),Fn=G(null);function In(tt){Fn.value?.el&&!Fn.value.el.contains(tt.target)&&Zt()}function ks(tt,Je){Je.preventDefault(),Je.stopPropagation(),Ft.value=tt,Ct.value={top:`${Je.clientY}px`,left:`${Je.clientX}px`,transformOrigin:"top left","--menu-pop-shift":"-2px"},Ue.value=!0,document.addEventListener("mousedown",In,!0)}function Zt(){Ue.value=!1,document.removeEventListener("mousedown",In,!0),Ft.value=null}function li(){Ft.value&&no(Ft.value.root),Zt()}function Rn(){Ft.value&&kn(Ft.value.id,Ft.value.name),Zt()}function Sn(){const tt=Ft.value;tt&&(Zt(),s("deleteWorkspace",tt.id))}const Qn=G(null),os=G(null),As=G({}),Tt=G(null);function Ci(tt){const Je=tt.target;Je.closest(".gh-more")||Je.closest(".ws-menu")||Bn()}async function rs(tt,Je){if(Qn.value===tt.id){Bn();return}const Rt=Je.currentTarget;os.value=tt,Qn.value=tt.id,document.addEventListener("mousedown",Ci),window.addEventListener("resize",Bn),await At();const Ot=Tt.value?.el,ai=Rt.getBoundingClientRect(),Ns=4,Ln=8,ls=Ot?.offsetHeight??0,ts=Ot?.offsetWidth??0;let Vi=ai.bottom+Ns,gi=!1;Vi+ls>window.innerHeight-Ln&&(Vi=Math.max(Ln,ai.top-ls-Ns),gi=!0);let an=ai.right-ts;an<Ln&&(an=Ln),As.value={top:`${Math.round(Vi)}px`,left:`${Math.round(an)}px`,transformOrigin:gi?"bottom right":"top right","--menu-pop-shift":gi?"2px":"-2px"}}function Bn(){Qn.value=null,os.value=null,document.removeEventListener("mousedown",Ci),window.removeEventListener("resize",Bn)}function Co(tt){no(tt.root),Bn()}function Mi(tt){kn(tt.id,tt.name),Bn()}function Ei(tt){Bn(),s("deleteWorkspace",tt.id)}Gn(()=>{document.removeEventListener("mousedown",In,!0),document.removeEventListener("mousedown",Ci),document.removeEventListener("mousedown",pe),window.removeEventListener("resize",Bn),window.removeEventListener("resize",ee)});const ro=G(null);let zi;function Hs(){const tt=ro.value;tt&&(tt.classList.remove("blink-now"),tt.getBoundingClientRect(),tt.classList.add("blink-now"),clearTimeout(zi),zi=setTimeout(()=>tt.classList.remove("blink-now"),300))}const wo=sl(()=>Ji(()=>import("./DesignSystemView-OnWAAu0u.js"),__vite__mapDeps([8,9]))),Cs=G(!1);let Ti,ii=!1;function On(tt){ii=!1,clearTimeout(Ti),tt.currentTarget.setPointerCapture?.(tt.pointerId),Ti=setTimeout(()=>{ii=!0,Cs.value=!0},cwe)}function $n(tt){clearTimeout(Ti);const Je=tt.currentTarget;Je.hasPointerCapture?.(tt.pointerId)&&Je.releasePointerCapture(tt.pointerId)}function Tn(){if(ii){ii=!1;return}Hs()}return Gn(()=>{clearTimeout(Ti)}),(tt,Je)=>(b(),M("aside",{class:$e(["side",{"macos-desktop":h($c),collapsed:e.collapsed,"no-anim":e.dragging}]),style:Vt({width:e.collapsed?"0px":e.colWidth+"px"})},[C("div",{class:"col",style:Vt({width:e.colWidth+"px"}),onDragenter:De,onDragover:Ke,onDragleave:gt,onDrop:lt},[C("div",WCe,[C("div",qCe,[h($c)?te("",!0):(b(),M(Be,{key:0},[(b(),M("svg",{ref_key:"logoRef",ref:ro,class:"ch-logo",viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Kimi Code",onClick:Tn,onPointerdown:On,onPointerup:$n,onPointercancel:$n},[...Je[35]||(Je[35]=[Tu('<defs data-v-3b960952><mask id="kimiEyes" maskUnits="userSpaceOnUse" data-v-3b960952><rect x="0" y="0" width="32" height="22" fill="#fff" data-v-3b960952></rect><g class="ch-eyes" fill="#000" data-v-3b960952><rect class="ch-eye" x="11.8" y="7" width="2.8" height="8" rx="1.4" data-v-3b960952></rect><rect class="ch-eye" x="17.4" y="7" width="2.8" height="8" rx="1.4" data-v-3b960952></rect></g></mask></defs><rect x="1" y="1" width="30" height="20" rx="6" fill="var(--logo)" mask="url(#kimiEyes)" data-v-3b960952></rect>',2)])],544)),Je[36]||(Je[36]=C("span",{class:"ch-name"},"Kimi Code",-1))],64))]),C("div",UCe,[h($c)?te("",!0):(b(),de(h(rn),{key:0,class:"ch-collapse",size:"sm",label:h(n)("sidebar.collapseSidebar"),tooltip:h(n)("sidebar.collapseSidebar"),onClick:Je[0]||(Je[0]=It(Rt=>s("collapse"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"panel-collapse"})]),_:1},8,["label","tooltip"])),V(Rve)])]),C("div",{class:$e(["sidebar-actions",{"sidebar-actions--has-workspace-action":uwe}])},[C("button",{class:"btn-new-chat",type:"button",onClick:Je[1]||(Je[1]=It(Rt=>s("create"),["stop"]))},[V(h(Ce),{name:"chat-new"}),C("span",null,B(h(n)("sidebar.newChat")),1),V(h(Aa),{keys:h(l)},null,8,["keys"])]),te("",!0),C("button",{class:"search",type:"button",onClick:a},[V(h(Ce),{class:"search-icon",name:"search"}),C("span",KCe,B(h(n)("sidebar.search")),1),V(h(Aa),{keys:h(r)},null,8,["keys"])])],2),X.value==="flat"||e.groups.length>0?(b(),M("div",{key:0,class:$e(["sessions-head",{"sessions-head--scrolled":f.value}])},[e.pinnedSessions.length>0?(b(),de(HCe,{key:0,ref_key:"pinnedListRef",ref:Me,sessions:e.pinnedSessions,"active-id":e.activeId,"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,onSelectSession:ge,onRenameSession:Je[3]||(Je[3]=(Rt,Ot)=>s("rename",Rt,Ot)),onGenerateSessionTitle:Je[4]||(Je[4]=(Rt,Ot)=>s("generateTitle",Rt,Ot)),onArchiveSession:Je[5]||(Je[5]=Rt=>s("archive",Rt)),onForkSession:Je[6]||(Je[6]=Rt=>s("fork",Rt)),onExportSession:Je[7]||(Je[7]=Rt=>s("export",Rt)),onPinSession:Pe,onDropPin:ke,onSessionDragStart:W,onSessionDragEnd:Z},null,8,["sessions","active-id","pending-by-session","unread-by-session"])):te("",!0),C("div",VCe,[C("span",ZCe,B(h(n)("sidebar.sessionsHeader")),1),C("div",GCe,[X.value==="grouped"?(b(),de(h(rn),{key:0,class:"side-section-toggle",size:"sm",label:_.value?h(n)("sidebar.expandAll"):h(n)("sidebar.collapseAll"),tooltip:_.value?h(n)("sidebar.expandAll"):h(n)("sidebar.collapseAll"),onClick:Je[8]||(Je[8]=It(Rt=>_.value?I():S(),["stop"]))},{default:he(()=>[_.value?(b(),de(h(Ce),{key:0,name:"expand"})):(b(),de(h(Ce),{key:1,name:"collapse"}))]),_:1},8,["label","tooltip"])):te("",!0),V(h(mn),{text:h(n)("sidebar.viewSwitcher")},{default:he(()=>[V(h(rn),{class:"side-section-toggle side-section-view",size:"sm",label:h(n)("sidebar.viewSwitcher"),onClick:It(Ne,["stop"])},{default:he(()=>[V(h(Ce),{name:"list-settings"})]),_:1},8,["label"])]),_:1},8,["text"])])])],2)):te("",!0),C("div",{ref_key:"sessionsEl",ref:d,class:$e(["sessions",{scrolling:g.value,"pinned-drag-active":X.value==="flat"&&q.value!==null,"flat-pinned-drop-hover":re.value}]),onScroll:w,onDragover:se,onDrop:U,onDragleave:J},[X.value==="grouped"?(b(),M(Be,{key:0},[e.groups.length===0?(b(),M("div",QCe,B(h(n)("workspace.noWorkspace")),1)):(b(!0),M(Be,{key:1},yt(e.groups,Rt=>(b(),M("div",{key:Rt.workspace.id,class:$e(["ws-drop-target",{"drop-before":O.value?.id===Rt.workspace.id&&O.value.position==="before","drop-after":O.value?.id===Rt.workspace.id&&O.value.position==="after"}]),onDragover:Ot=>z(Ot,Rt.workspace.id),onDrop:Ot=>K(Rt.workspace.id)},[V(DCe,{group:Rt,"active-workspace-id":e.activeWorkspaceId,"active-id":e.activeId,"renaming-id":ft.value,"rename-value":Lt.value,"rename-input-ref":Qt(),"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,"ws-menu-open-id":Qn.value,dragging:$.value===Rt.workspace.id,sortable:e.workspaceSortMode==="manual","is-collapsed":v,"visible-limit":N,"pinned-drag-session":q.value,onGroupClick:ce,onGroupContextmenu:ks,onToggleWsMenu:rs,onCreateInWorkspace:Je[9]||(Je[9]=Ot=>s("createInWorkspace",Ot)),onSelectSession:ge,onRenameSession:Je[10]||(Je[10]=(Ot,ai)=>s("rename",Ot,ai)),onGenerateSessionTitle:Je[11]||(Je[11]=(Ot,ai)=>s("generateTitle",Ot,ai)),onArchiveSession:Je[12]||(Je[12]=Ot=>s("archive",Ot)),onForkSession:Je[13]||(Je[13]=Ot=>s("fork",Ot)),onExportSession:Je[14]||(Je[14]=Ot=>s("export",Ot)),onPinSession:Pe,onDropPinnedSession:ne,onExpand:D,onCollapse:T,onConfirmRename:_n,onCancelRename:je,onUpdateRenameValue:st,onWsDragstart:P,onWsDragend:R},null,8,["group","active-workspace-id","active-id","renaming-id","rename-value","rename-input-ref","pending-by-session","unread-by-session","ws-menu-open-id","dragging","sortable","pinned-drag-session"])],42,YCe))),128))],64)):(b(),M(Be,{key:1},[(b(!0),M(Be,null,yt(e.flatSessions,Rt=>(b(),de(pk,{key:Rt.id,session:Rt,active:Rt.id===e.activeId,"approval-count":e.pendingBySession[Rt.id]?.approvals??0,"question-count":e.pendingBySession[Rt.id]?.questions??0,unread:e.unreadBySession[Rt.id]??!1,draggable:Y.value!==Rt.id,onDragstart:Ot=>ve(Rt.id,Ot),onRenameStateChange:Ot=>Y.value=Ot?Rt.id:null,onSelect:ge,onRename:Je[15]||(Je[15]=(Ot,ai)=>s("rename",Ot,ai)),onGenerateTitle:Je[16]||(Je[16]=(Ot,ai)=>s("generateTitle",Ot,ai)),onArchive:Je[17]||(Je[17]=Ot=>s("archive",Ot)),onFork:Je[18]||(Je[18]=Ot=>s("fork",Ot)),onExport:Je[19]||(Je[19]=Ot=>s("export",Ot)),onPin:Pe},null,8,["session","active","approval-count","question-count","unread","draggable","onDragstart","onRenameStateChange"]))),128)),e.flatSessions.length===0&&!e.flatHasMore&&e.pinnedSessions.length===0?(b(),M("div",JCe,B(h(n)("sidebar.noSessions")),1)):te("",!0),e.flatHasMore?(b(),M("div",XCe,[C("button",{class:"show-more",disabled:e.flatLoadingMore,onClick:Je[20]||(Je[20]=It(Rt=>s("loadMoreFlatSessions"),["stop"]))},[C("span",twe,B(e.flatLoadingMore?h(n)("sidebar.loadingMore"):h(n)("sidebar.loadMore")),1),V(h(Ce),{name:"chevron-down",size:"sm"})],8,ewe)])):te("",!0)],64))],34),C("div",{class:$e(["side-footer",{"side-footer--shadowed":p.value}])},[V(VAe,{onLogin:Je[21]||(Je[21]=Rt=>s("login")),onOpenSettings:Je[22]||(Je[22]=Rt=>s("openSettings"))})],2),C("div",{class:$e(["folder-drop-overlay",{show:it.value}]),"aria-hidden":"true"},[C("div",nwe,[V(h(Ce),{name:"folder",size:"lg"}),C("span",null,B(h(n)("sidebar.dropToAddWorkspace")),1)])],2)],36),V(gs,{name:"menu-pop"},{default:he(()=>[Ue.value?(b(),de(h(al),{key:0,ref_key:"ghMenuRef",ref:Fn,class:"gh-menu",style:Vt(Ct.value),onClick:Je[23]||(Je[23]=It(()=>{},["stop"]))},{default:he(()=>[V(h(yn),{onClick:li},{default:he(()=>[V(h(Ce),{name:"copy",size:"sm"}),qe(" "+B(h(n)("sidebar.copyPath")),1)]),_:1}),V(h(yn),{class:"workspace-rename-item",onClick:Rn},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),qe(" "+B(h(n)("sidebar.rename")),1)]),_:1}),V(h(yn),{danger:"",onClick:Sn},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"}),qe(" "+B(h(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):te("",!0)]),_:1}),V(gs,{name:"menu-pop"},{default:he(()=>[Qn.value!==null&&os.value?(b(),de(h(al),{key:0,ref_key:"wsMenuRef",ref:Tt,class:"ws-menu",style:Vt(As.value),onClick:Je[27]||(Je[27]=It(()=>{},["stop"]))},{default:he(()=>[V(h(yn),{onClick:Je[24]||(Je[24]=Rt=>Co(os.value))},{default:he(()=>[V(h(Ce),{name:"copy",size:"sm"}),qe(" "+B(h(n)("sidebar.copyPath")),1)]),_:1}),V(h(yn),{class:"workspace-rename-item",onClick:Je[25]||(Je[25]=Rt=>Mi(os.value))},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),qe(" "+B(h(n)("sidebar.rename")),1)]),_:1}),V(h(yn),{danger:"",onClick:Je[26]||(Je[26]=Rt=>Ei(os.value))},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"}),qe(" "+B(h(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):te("",!0)]),_:1}),V(gs,{name:"menu-pop"},{default:he(()=>[ie.value?(b(),de(h(al),{key:0,ref_key:"viewMenuRef",ref:fe,class:"view-menu",style:Vt(Se.value),onClick:Je[32]||(Je[32]=It(()=>{},["stop"]))},{default:he(()=>[C("div",iwe,B(h(n)("sidebar.viewGroup")),1),V(h(yn),{onClick:Je[28]||(Je[28]=Rt=>ye("flat"))},{default:he(()=>[V(h(Ce),{name:"list",size:"sm"}),qe(" "+B(h(n)("sidebar.viewFlat"))+" ",1),C("span",swe,[X.value==="flat"?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1}),V(h(yn),{onClick:Je[29]||(Je[29]=Rt=>ye("grouped"))},{default:he(()=>[V(h(Ce),{name:"tree-view",size:"sm"}),qe(" "+B(h(n)("sidebar.viewGrouped"))+" ",1),C("span",owe,[X.value==="grouped"?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1}),X.value==="grouped"?(b(),M(Be,{key:0},[C("div",rwe,B(h(n)("sidebar.sortGroup")),1),V(h(yn),{onClick:Je[30]||(Je[30]=Rt=>H("manual"))},{default:he(()=>[V(h(Ce),{name:"grip",size:"sm"}),qe(" "+B(h(n)("sidebar.sortManual"))+" ",1),C("span",lwe,[e.workspaceSortMode==="manual"?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1}),V(h(yn),{onClick:Je[31]||(Je[31]=Rt=>H("recent"))},{default:he(()=>[V(h(Ce),{name:"clock",size:"sm"}),qe(" "+B(h(n)("sidebar.sortRecent"))+" ",1),C("span",awe,[e.workspaceSortMode==="recent"?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1})],64)):te("",!0)]),_:1},8,["style"])):te("",!0)]),_:1}),o.value?(b(),de(Fse,{key:0,sessions:e.sessions,"active-id":e.activeId,onSelect:ge,onClose:Je[33]||(Je[33]=Rt=>o.value=!1)},null,8,["sessions","active-id"])):te("",!0),(b(),de(jr,{to:"body"},[Cs.value?(b(),de(h(wo),{key:0,onClose:Je[34]||(Je[34]=Rt=>Cs.value=!1)})):te("",!0)]))],6))}}),fwe=vt(dwe,[["__scopeId","data-v-3b960952"]]),hwe=["aria-label"],pwe=nt({__name:"ResizeHandle",props:{storageKey:{},defaultWidth:{},min:{},max:{},reverse:{type:Boolean},ariaLabel:{},applyLive:{}},emits:["update:width","update:dragging"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),{width:o,dragging:r,cursor:l,onPointerDown:a}=U2e({storageKey:n.storageKey,defaultWidth:n.defaultWidth,min:n.min,max:()=>n.max,reverse:n.reverse,applyLive:n.applyLive});return i("update:width",o.value),Ge(o,u=>i("update:width",u)),Ge(r,u=>i("update:dragging",u)),(u,c)=>(b(),M("div",{class:$e(["rh",{dragging:h(r)}]),style:Vt({cursor:h(l)}),role:"separator","aria-orientation":"vertical","aria-label":e.ariaLabel??h(s)("layout.resizeHandleAria"),onPointerdown:c[0]||(c[0]=(...d)=>h(a)&&h(a)(...d))},[...c[1]||(c[1]=[C("span",{class:"rh-bar","aria-hidden":"true"},null,-1)])],46,hwe))}}),ZS=vt(pwe,[["__scopeId","data-v-1c6dfdc5"]]),gwe={class:"op"},mwe={key:0,class:"op-empty"},vwe=nt({__name:"OutputPanel",props:{lines:{default:void 0},emptyText:{default:""}},setup(e){const t=e,n=F(()=>t.lines??[]);return(i,s)=>(b(),M("div",gwe,[n.value.length===0&&e.emptyText?(b(),M("div",mwe,B(e.emptyText),1)):te("",!0),(b(!0),M(Be,null,yt(n.value,(o,r)=>(b(),M("div",{key:r},B(o),1))),128))]))}}),_r=vt(vwe,[["__scopeId","data-v-ab413c67"]]),ywe=["disabled","aria-label","aria-expanded"],bwe={class:"lead","aria-hidden":"true"},kwe={class:"main"},Awe={class:"task"},Cwe={key:0,class:"type"},wwe={class:"tail"},xwe=["aria-label"],_we=["aria-expanded"],Swe=nt({__name:"AgentTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openAgent"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(v){if(!v)return{};try{const x=JSON.parse(v);return{description:typeof x.description=="string"?x.description:void 0,subagentType:typeof x.subagent_type=="string"?x.subagent_type:void 0}}catch{return{}}}const r=F(()=>o(i.tool.arg)),l=F(()=>i.tool.status),a=F(()=>r.value.description||r.value.subagentType||Vf(i.tool.name)),u=F(()=>r.value.description?r.value.subagentType:""),c=un("resolveAgentTaskId"),d=un("resolveAgentModel"),f=F(()=>i.tool.agentId??c?.(i.tool.id)),p=F(()=>f.value!==void 0),g=F(()=>d?.(i.tool.id,f.value)),m=F(()=>[u.value,g.value?.display,g.value?.effort].filter(v=>v).join(" · ")),y=F(()=>!!i.tool.output&&i.tool.output.length>0),w=F(()=>p.value||y.value),k=G(!1);function A(){if(f.value!==void 0){s("openAgent",f.value);return}y.value&&(k.value=!k.value)}return(v,x)=>(b(),M("div",{class:$e(["agent-card",{err:l.value==="error"}])},[C("button",{class:"head",type:"button",disabled:!w.value,"aria-label":p.value?h(n)("tasks.openDetail"):void 0,"aria-expanded":p.value?void 0:k.value,onClick:A},[C("span",bwe,[V(h(Ce),{name:"robot",size:"sm"})]),C("span",kwe,[C("span",Awe,B(a.value),1),m.value?(b(),M("span",Cwe,B(m.value),1)):te("",!0)]),C("span",wwe,[C("span",{class:$e(["st",l.value]),role:"status","aria-label":l.value},[l.value==="ok"?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):l.value==="error"?(b(),de(h(Ce),{key:1,name:"close",size:"sm"})):(b(),de(h(dl),{key:2,status:"running"}))],10,xwe),p.value?(b(),de(h(Ce),{key:0,class:"go",name:"arrow-right",size:"sm","aria-hidden":"true"})):y.value?(b(),de(h(Ce),{key:1,class:$e(["go car",{open:k.value}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"])):te("",!0)])],8,ywe),p.value&&y.value?(b(),M("button",{key:0,class:"saved-result",type:"button","aria-expanded":k.value,onClick:x[0]||(x[0]=S=>k.value=!k.value)},[V(h(Ce),{class:$e(["saved-result__chevron",{open:k.value}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"]),C("span",null,B(h(n)("tools.output.saved")),1)],8,_we)):te("",!0),y.value&&k.value?(b(),M("div",{key:1,class:$e(["result",{"result--legacy":!p.value}])},[V(_r,{lines:e.tool.output},null,8,["lines"])],2)):te("",!0)],2))}}),Mwe=vt(Swe,[["__scopeId","data-v-5bbb3a70"]]);function Iwe(e){if(!e)return[];try{const n=JSON.parse(e).questions;if(!Array.isArray(n))return[];const i=[];for(const s of n){if(!s||typeof s!="object")continue;const o=s,r=Array.isArray(o.options)?o.options.map(l=>{const a=l&&typeof l=="object"?l:{};return{label:typeof a.label=="string"?a.label:"",description:typeof a.description=="string"?a.description:""}}):[];i.push({question:typeof o.question=="string"?o.question:"",header:typeof o.header=="string"?o.header:"",options:r,multiSelect:o.multi_select===!0})}return i}catch{return[]}}const fg={recognized:!1,answers:{},note:""};function Ewe(e){const t=e?.[0];if(!t)return fg;let n;try{n=JSON.parse(t)}catch{return fg}if(!n||typeof n!="object"||Array.isArray(n))return fg;const i=n.answers;if(!i||typeof i!="object"||Array.isArray(i))return fg;const s={};for(const[o,r]of Object.entries(i))typeof r=="string"?s[o]=r:r===!0&&(s[o]=!0);return{recognized:!0,answers:s,note:typeof n.note=="string"?n.note:""}}function Twe(e,t,n){return e[t]??e[`q_${n}`]}const Lwe=/^opt_\d+_(\d+)$/;function Nwe(e,t=[]){if(e===void 0)return{selected:new Set,otherText:"",indeterminate:!1};if(e===!0)return{selected:new Set,otherText:"",indeterminate:!0};const n=new Map;t.forEach((r,l)=>{r.label.length>0&&!n.has(r.label)&&n.set(r.label,l)});const i=n.get(e);if(i!==void 0)return{selected:new Set([i]),otherText:"",indeterminate:!1};const s=new Set,o=[];for(const r of e.split(",")){const l=r.trim(),a=n.get(l);if(a!==void 0){s.add(a);continue}const u=Lwe.exec(l);u?s.add(Number(u[1])):l.length>0&&o.push(l)}return{selected:s,otherText:o.join(", "),indeterminate:!1}}const Fwe={class:"tl-ic","aria-hidden":"true"},Bwe={class:"tl-main"},$we=["aria-expanded","aria-label"],Dwe={class:"tl-tail"},zwe=["aria-label"],Rwe=["inert"],Owe={class:"tl-body-inner"},Pwe=nt({__name:"ToolDisclosure",props:{status:{},open:{type:Boolean,default:!1},expandable:{type:Boolean,default:!1}},emits:["toggle"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=un("pinScroll",()=>{}),r=G(null);function l(){if(!n.expandable)return;i("toggle");const u=r.value;u&&At(()=>o(u))}const a=F(()=>n.open?s("tools.disclosure.collapse"):s("tools.disclosure.expand"));return(u,c)=>(b(),M("div",{class:$e(["tool-line",{open:e.open,expandable:e.expandable,err:e.status==="error"}])},[C("div",{ref_key:"headEl",ref:r,class:$e(["tl-head",{clickable:e.expandable}]),onClick:l},[C("span",Fwe,[En(u.$slots,"leading")]),C("span",Bwe,[En(u.$slots,"default"),V(h(mn),{text:a.value},{default:he(()=>[e.expandable?(b(),M("button",{key:0,class:"tl-car",type:"button","aria-expanded":e.open,"aria-label":a.value,onClick:It(l,["stop"])},[V(h(Ce),{class:"tl-car-ic",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,$we)):te("",!0)]),_:1},8,["text"])]),C("span",Dwe,[En(u.$slots,"trailing"),C("span",{class:$e(["tl-status",e.status]),role:"status","aria-label":e.status},[e.status==="ok"?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):e.status==="error"?(b(),de(h(Ce),{key:1,name:"close",size:"sm"})):e.status==="suspended"?(b(),de(h(dl),{key:2,status:"suspended"})):(b(),de(h(dl),{key:3,status:"running"}))],10,zwe)])],2),e.expandable?(b(),M("div",{key:0,class:$e(["tl-body",{open:e.open}]),inert:!e.open},[C("div",Owe,[En(u.$slots,"body")])],10,Rwe)):te("",!0)],2))}}),yl=vt(Pwe,[["__scopeId","data-v-58658159"]]),jwe={key:0,class:"rc-flat"},Hwe={class:"rc-head"},Wwe={class:"rc-st"},qwe={class:"rc-qtext"},Uwe={class:"rc-lb"},Kwe={key:0,class:"rc-opt"},Vwe={class:"rc-lb"},Zwe={class:"rc-ds"},Gwe={key:1,class:"rc-opt"},Qwe={class:"rc-lb"},Ywe={key:2,class:"rc-qskip"},Jwe={class:"tl-name"},Xwe={key:0,class:"tl-dim"},exe={key:0,class:"tl-chip"},txe=80,nxe=nt({__name:"AskUserTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile"],setup(e){const t=e,{t:n}=Bt();function i(I,_=txe){const E=I.trim();return E.length>_?E.slice(0,_-1)+"…":E}const s=F(()=>Iwe(t.tool.arg)),o=F(()=>Ewe(t.tool.output)),r=F(()=>o.value.recognized),l=F(()=>r.value&&Object.keys(o.value.answers).length===0&&o.value.note.length>0),a=F(()=>s.value.map((I,_)=>Nwe(Twe(o.value.answers,I.question,_),I.options))),u=F(()=>Object.keys(o.value.answers).length);function c(I,_){return a.value[I]?.selected.has(_)??!1}function d(I){return a.value[I]?.otherText??""}function f(I){return a.value[I]?.indeterminate??!1}const p=F(()=>t.tool.status),g=F(()=>s.value.map((I,_)=>({q:I,selected:I.options.map((E,N)=>({o:E,oi:N})).filter(({oi:E})=>c(_,E))}))),m=F(()=>s.value.length===1?n("tools.ask.question",{count:1}):n("tools.ask.questions",{count:s.value.length})),y=F(()=>{const I=s.value[0]?.question??"",_=n("tools.ask.unanswered");return I?`${I} —— ${_}`:_}),w=F(()=>{if(!r.value)return i(t.tool.output?.[0]??"");if(l.value)return n("tools.ask.dismissed");const I=s.value[0]?.question??"",_=i(I);return s.value.length<=1?_:`${_} ${n("tools.ask.more",{count:s.value.length-1})}`}),k=F(()=>r.value?l.value?n("tools.ask.dismissed"):u.value===0?"":u.value===1?n("tools.ask.answer",{count:1}):n("tools.ask.answers",{count:u.value}):""),A=F(()=>!!t.tool.output&&t.tool.output.length>0),v=F(()=>r.value&&(s.value.length>0||l.value)||A.value),x=G(t.tool.defaultExpanded===!0&&v.value),S=F(()=>Vf(t.tool.name));return Ge(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&v.value&&(x.value=!0)}),(I,_)=>r.value&&p.value==="ok"?(b(),M("div",{key:0,class:$e(["ask-receipt",{flat:l.value||u.value===0}])},[l.value||u.value===0?(b(),M("span",jwe,B(y.value),1)):(b(),M(Be,{key:1},[C("div",Hwe,[C("span",null,B(h(n)("tools.ask.collected"))+" · "+B(m.value),1),C("span",Wwe,[V(h(Ce),{name:"check",size:"sm"})])]),(b(!0),M(Be,null,yt(g.value,(E,N)=>(b(),M("div",{key:N,class:"rc-q"},[C("div",qwe,[C("span",null,B(E.q.question),1)]),(b(!0),M(Be,null,yt(E.selected,D=>(b(),M("div",{key:D.oi,class:"rc-opt"},[C("span",{class:$e(["rc-g on",E.q.multiSelect?"chk":"rad"])},null,2),C("span",Uwe,B(D.o.label),1)]))),128)),d(N)?(b(),M("div",Kwe,[C("span",{class:$e(["rc-g on",E.q.multiSelect?"chk":"rad"])},null,2),C("span",Vwe,B(d(N)),1),C("span",Zwe,B(h(n)("tools.ask.freeInput")),1)])):te("",!0),f(N)?(b(),M("div",Gwe,[_[1]||(_[1]=C("span",{class:"rc-g rad on"},null,-1)),C("span",Qwe,B(h(n)("tools.ask.answered")),1)])):te("",!0),E.selected.length===0&&!d(N)&&!f(N)?(b(),M("div",Ywe,B(h(n)("tools.ask.unanswered")),1)):te("",!0)]))),128))],64))],2)):(b(),de(yl,{key:1,status:p.value,open:x.value,expandable:v.value,onToggle:_[0]||(_[0]=E=>x.value=!x.value)},{leading:he(()=>[V(h(Ce),{name:"help-circle",size:"sm"})]),trailing:he(()=>[k.value?(b(),M("span",exe,B(k.value),1)):te("",!0)]),body:he(()=>[V(_r,{lines:e.tool.output},null,8,["lines"])]),default:he(()=>[C("span",Jwe,B(S.value),1),w.value?(b(),M("span",Xwe,B(w.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),ixe=vt(nxe,[["__scopeId","data-v-f29eda04"]]);function Wu(e){const t=(e??"").trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function ti(e){return typeof e=="string"&&e.length>0?e:void 0}function Xa(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function nD(e){if(e)return ti(e.path)??ti(e.file_path)??ti(e.filePath)??ti(e.filename)}function iD(e){return/^(.*)[\\/][^\\/]+[\\/]?$/.exec(e)?.[1]??""}function sxe(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean)[0];return n?`${t.host}/${n}`:t.host}catch{return e.replace(/^https?:\/\//,"")}}const oxe={class:"tl-name"},rxe={class:"tl-mono"},lxe={key:0,class:"tl-chip"},axe={class:"cmd-echo"},uxe=nt({__name:"BashTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>{const u=Wu(t.tool.arg);return(ti(u?.command)??ti(u?.cmd)??ti(u?.script)??t.tool.arg.replace(/^·\s*/,"")).trim()}),o=F(()=>t.tool.status==="running"),r=F(()=>!!t.tool.output&&t.tool.output.length>0),l=F(()=>r.value||o.value||s.value.length>0),a=G(t.tool.defaultExpanded===!0&&l.value);return Ge(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&l.value&&(a.value=!0)}),(u,c)=>(b(),de(yl,{status:i.value,open:a.value,expandable:l.value,onToggle:c[0]||(c[0]=d=>a.value=!a.value)},{leading:he(()=>[V(h(Ce),{name:"terminal",size:"sm"})]),trailing:he(()=>[e.tool.timing?(b(),M("span",lxe,B(e.tool.timing),1)):te("",!0)]),body:he(()=>[C("div",axe,B(s.value),1),V(_r,{lines:e.tool.output,"empty-text":o.value?h(n)("tools.output.waiting"):h(n)("tools.output.empty")},null,8,["lines","empty-text"])]),default:he(()=>[C("span",oxe,B(h(n)("tools.label.bash")),1),C("span",rxe,B(s.value),1)]),_:1},8,["status","open","expandable"]))}}),cxe=vt(uxe,[["__scopeId","data-v-8869dd42"]]),dxe={class:"hl-body"},fxe={key:0,class:"hl-gutter"},hxe={key:1,class:"hl-gutter new"},pxe={class:"hl-sign"},gxe={class:"hl-text"},mxe=["data-line"],vxe={key:0,class:"hl-gutter"},yxe={class:"hl-text"},bxe=200,kxe=nt({__name:"HighlightedCode",props:{code:{default:void 0},lines:{default:void 0},path:{default:void 0},lineNumbers:{type:[Boolean,Array],default:!1},framed:{type:Boolean,default:!0},fullTexts:{default:null},lineClass:{type:Function,default:void 0}},setup(e){const t=e,n=ov(),i=F(()=>Iee(t.path)),s=F(()=>t.lines!==void 0),o=F(()=>t.lineNumbers===!0&&s.value),r=F(()=>(t.lines??[]).some($=>$.oldNo!==void 0)),l=F(()=>(t.lines??[]).some($=>$.newNo!==void 0)),a=F(()=>Array.isArray(t.lineNumbers)?t.lineNumbers:null),u=F(()=>Array.isArray(t.code)?t.code:Wl(t.code??"")),c=F(()=>{const $=t.lines;return $?t.fullTexts?t.fullTexts:{before:$.filter(O=>O.oldNo!==void 0).map(O=>O.text).join(` -`),after:$.filter(O=>O.newNo!==void 0).map(O=>O.text).join(` -`)}:null}),d=G(null),f=G(null),p=G(null);function g(){d.value=null,f.value=null,p.value=null}let m=null,y=0,w=0;async function k(){const $=++w;y=Date.now();const O=i.value;if(!O){$===w&&g();return}try{const{codeToTokens:P}=await Ji(async()=>{const{codeToTokens:z}=await import("./index-CbkQVtd0.js").then(K=>K.i);return{codeToTokens:z}},[]),R=n.value?"github-dark":"github-light",j=c.value;if(j){const[z,K]=await Promise.all([j.before?P(j.before,{lang:O,theme:R}):Promise.resolve(null),j.after?P(j.after,{lang:O,theme:R}):Promise.resolve(null)]);if($!==w)return;f.value=z?.tokens??null,p.value=K?.tokens??null}else{const z=u.value.length>0?await P(u.value.join(` -`),{lang:O,theme:R}):null;if($!==w)return;d.value=z?.tokens??null}}catch{$===w&&g()}}function A(){if(m!==null)return;const $=Math.max(0,bxe-(Date.now()-y));m=setTimeout(()=>{m=null,k()},$)}const v=F(()=>u.value.join(` -`)),x=F(()=>c.value?.before??null),S=F(()=>c.value?.after??null);Ge([v,x,S],A),Ge([i,n,()=>t.fullTexts],()=>{w++,g(),A()}),gn(k),Cn(()=>{w++,m!==null&&clearTimeout(m),m=null});const I=F(()=>{let $=0;if(Array.isArray(t.lineNumbers))for(const O of t.lineNumbers)O>$&&($=O);else for(const O of t.lines??[])O.oldNo!==void 0&&O.oldNo>$&&($=O.oldNo),O.newNo!==void 0&&O.newNo>$&&($=O.newNo);return Math.max(4,String($).length)});function _($){if($.type==="del"){if($.oldNo===void 0)return null;const P=t.fullTexts?$.oldNo-1:E.value.get($.oldNo);return P===void 0?null:f.value?.[P]??null}if($.newNo===void 0)return null;const O=t.fullTexts?$.newNo-1:N.value.get($.newNo);return O===void 0?null:p.value?.[O]??null}const E=F(()=>{const $=new Map;let O=0;for(const P of t.lines??[])P.oldNo!==void 0&&$.set(P.oldNo,O++);return $}),N=F(()=>{const $=new Map;let O=0;for(const P of t.lines??[])P.newNo!==void 0&&$.set(P.newNo,O++);return $});function D($){const O={};$.color&&(O.color=$.color);const P=$.fontStyle??0;return P&1&&(O.fontStyle="italic"),P&2&&(O.fontWeight="var(--weight-semibold)"),P&4&&(O.textDecoration="underline"),O}function T($){return $.type==="add"?"+":$.type==="del"?"-":" "}return($,O)=>(b(),M("div",{class:$e(["hl-code",{gutter:o.value,"plain-pad":!s.value&&!a.value,framed:e.framed}]),style:Vt({"--gutter-ch":`${I.value}ch`})},[C("div",dxe,[s.value?(b(!0),M(Be,{key:0},yt(e.lines??[],(P,R)=>(b(),M("div",{key:R,class:$e(["hl-row",`row-${P.type}`])},[o.value?(b(),M(Be,{key:0},[r.value?(b(),M("span",fxe,B(P.oldNo??""),1)):te("",!0),l.value?(b(),M("span",hxe,B(P.newNo??""),1)):te("",!0)],64)):te("",!0),C("span",pxe,B(T(P)),1),C("span",gxe,[_(P)?(b(!0),M(Be,{key:0},yt(_(P)??[],(j,z)=>(b(),M("span",{key:z,style:Vt(D(j))},B(j.content),5))),128)):(b(),M(Be,{key:1},[qe(B(P.text),1)],64))])],2))),128)):(b(!0),M(Be,{key:1},yt(u.value,(P,R)=>(b(),M("div",{key:R,class:$e(["hl-row",e.lineClass?.(a.value?.[R]??-1)]),"data-line":a.value?.[R]},[a.value?(b(),M("span",vxe,B(a.value[R]??""),1)):te("",!0),C("span",yxe,[d.value?.[R]?(b(!0),M(Be,{key:0},yt(d.value[R]??[],(j,z)=>(b(),M("span",{key:z,style:Vt(D(j))},B(j.content),5))),128)):(b(),M(Be,{key:1},[qe(B(P),1)],64))])],10,mxe))),128))])],6))}}),rl=vt(kxe,[["__scopeId","data-v-6735e4da"]]),Axe={class:"tl-name"},Cxe={key:1,class:"tl-dim"},wxe={key:2,class:"tl-faint"},xxe={key:0,class:"tl-add"},_xe={key:1,class:"tl-del"},Sxe={class:"diffbar","aria-hidden":"true"},Mxe={key:1,class:"tl-chip"},Ixe=nt({__name:"EditTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>so(n.tool.name)==="write"),l=F(()=>nD(Wu(n.tool.arg))??""),a=F(()=>l.value?Wf(l.value):""),u=F(()=>l.value?iD(l.value):""),c=F(()=>UT(n.tool)),d=F(()=>aee(n.tool)),f=F(()=>{const x=c.value;return!x||n.tool.status==="error"?{added:0,removed:0}:PT(x)}),p=F(()=>f.value.added>0||f.value.removed>0),g=F(()=>!!n.tool.output&&n.tool.output.length>0),m=F(()=>c.value!==null&&n.tool.status!=="error"),y=F(()=>d.value!==null&&n.tool.status!=="error"),w=F(()=>m.value||y.value||g.value),k=G(!1),A=G(k.value);Ge(k,x=>{x&&(A.value=!0)});function v(){l.value&&i("openFile",{path:l.value})}return(x,S)=>(b(),de(yl,{status:o.value,open:k.value,expandable:w.value,onToggle:S[0]||(S[0]=I=>k.value=!k.value)},{leading:he(()=>[V(h(Ce),{name:r.value?"file-plus":"pencil",size:"sm"},null,8,["name"])]),trailing:he(()=>[p.value?(b(),M(Be,{key:0},[f.value.added>0?(b(),M("span",xxe,"+"+B(f.value.added),1)):te("",!0),f.value.removed>0?(b(),M("span",_xe,"−"+B(f.value.removed),1)):te("",!0),C("span",Sxe,[C("span",{class:"seg-add",style:Vt({flexGrow:f.value.added})},null,4),C("span",{class:"seg-del",style:Vt({flexGrow:f.value.removed})},null,4)])],64)):r.value&&o.value==="ok"?(b(),M("span",Mxe,B(h(s)("tools.chip.created")),1)):te("",!0)]),body:he(()=>[m.value&&A.value?(b(),de(rl,{key:0,lines:c.value??[],path:l.value},null,8,["lines","path"])):y.value&&A.value?(b(),de(rl,{key:1,code:d.value?.content??"",path:d.value?.path},null,8,["code","path"])):(b(),de(_r,{key:2,lines:e.tool.output,"empty-text":h(s)("tools.output.waiting")},null,8,["lines","empty-text"]))]),default:he(()=>[C("span",Axe,B(r.value?h(s)("tools.label.write"):h(s)("tools.label.edit")),1),a.value?(b(),M("button",{key:0,class:"tl-file",type:"button",onClick:It(v,["stop"])},B(a.value),1)):(b(),M("span",Cxe,B(l.value||e.tool.arg),1)),u.value?(b(),M("span",wxe,B(u.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),Exe=vt(Ixe,[["__scopeId","data-v-bbf61950"]]),Txe=["innerHTML"],Lxe={class:"tl-name"},Nxe={key:0,class:"tl-dim"},Fxe={key:0,class:"tl-chip"},Bxe={key:1,class:"tl-chip"},$xe={key:0,class:"arg-full"},Dxe=nt({__name:"GenericTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile"],setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>Vf(t.tool.name)),o=F(()=>a$(t.tool.name)),r=F(()=>TS(t.tool.name,t.tool.arg)),l=F(()=>TS(t.tool.name,t.tool.arg,!0)),a=F(()=>Hbe({name:t.tool.name,arg:t.tool.arg,output:t.tool.output,timing:t.tool.timing,status:t.tool.status})),u=F(()=>!!t.tool.output&&t.tool.output.length>0),c=F(()=>u.value||!!l.value&&l.value!==r.value),d=G(t.tool.defaultExpanded===!0&&c.value);return Ge(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status,t.tool.name],()=>{t.tool.defaultExpanded===!0&&c.value&&(d.value=!0)}),(f,p)=>(b(),de(yl,{status:i.value,open:d.value,expandable:c.value,onToggle:p[0]||(p[0]=g=>d.value=!d.value)},{leading:he(()=>[C("span",{class:"gl",innerHTML:o.value},null,8,Txe)]),trailing:he(()=>[a.value?(b(),M("span",Fxe,B(a.value),1)):e.tool.timing?(b(),M("span",Bxe,B(e.tool.timing),1)):te("",!0)]),body:he(()=>[l.value&&l.value!==r.value?(b(),M("div",$xe,B(l.value),1)):te("",!0),V(_r,{lines:e.tool.output,"empty-text":i.value==="running"?h(n)("tools.output.waiting"):h(n)("tools.output.empty")},null,8,["lines","empty-text"])]),default:he(()=>[C("span",Lxe,B(s.value),1),r.value?(b(),M("span",Nxe,B(r.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),zxe=vt(Dxe,[["__scopeId","data-v-b12a8498"]]),Rxe={class:"tl-name"},Oxe={key:0,class:"tl-mono"},Pxe={key:1,class:"tl-mono"},jxe={key:2,class:"tl-dim"},Hxe={key:3,class:"tl-faint"},Wxe={key:0,class:"tl-chip"},qxe={key:0,class:"file-list"},Uxe=["onClick"],Kxe=nt({__name:"GlobTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>so(n.tool.name)==="glob"),l=F(()=>Wu(n.tool.arg)),a=F(()=>{const m=l.value;return ti(m?.pattern)??ti(m?.glob)??ti(m?.query)??""}),u=F(()=>{const m=l.value;return ti(m?.path)??ti(m?.dir)??ti(m?.directory)??ti(m?.cwd)??""}),c=F(()=>(n.tool.output??[]).filter(m=>m.trim().length>0)),d=F(()=>c.value.length>0),f=F(()=>d.value),p=G(n.tool.defaultExpanded===!0&&f.value);Ge(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&f.value&&(p.value=!0)});function g(m){const y=m.trim();y&&i("openFile",{path:y})}return(m,y)=>(b(),de(yl,{status:o.value,open:p.value,expandable:f.value,onToggle:y[0]||(y[0]=w=>p.value=!p.value)},{leading:he(()=>[V(h(Ce),{name:r.value?"tree-view":"list",size:"sm"},null,8,["name"])]),trailing:he(()=>[r.value&&c.value.length>0?(b(),M("span",Wxe,B(h(s)("tools.chip.files",{count:c.value.length})),1)):te("",!0)]),body:he(()=>[r.value?(b(),M("div",qxe,[(b(!0),M(Be,null,yt(c.value,(w,k)=>(b(),M("button",{key:k,class:"file-row",type:"button",onClick:A=>g(w)},B(w),9,Uxe))),128))])):(b(),de(_r,{key:1,lines:e.tool.output},null,8,["lines"]))]),default:he(()=>[C("span",Rxe,B(h(s)(r.value?"tools.label.glob":"tools.label.ls")),1),r.value&&a.value?(b(),M("span",Oxe,B(a.value),1)):!r.value&&u.value?(b(),M("span",Pxe,B(u.value),1)):(b(),M("span",jxe,B(e.tool.arg),1)),r.value&&u.value?(b(),M("span",Hxe,B(u.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),Vxe=vt(Kxe,[["__scopeId","data-v-3936099e"]]),Zxe={class:"tl-name"},Gxe={key:0,class:"tl-dim"},Qxe={key:1,class:"tl-pill pill-active"},Yxe={key:0,class:"goal-block"},Jxe={class:"goal-text"},Xxe={key:0,class:"goal-criterion"},e_e=nt({__name:"GoalTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>so(t.tool.name)),o=F(()=>Wu(t.tool.arg)),r=F(()=>ti(o.value?.objective)??""),l=F(()=>ti(o.value?.completionCriterion)??ti(o.value?.completion_criterion)??""),a={active:"status.goalStatusActive",blocked:"status.goalStatusBlocked",complete:"status.goalStatusComplete"},u=F(()=>ti(o.value?.status)??""),c=F(()=>{const k=a[u.value];return k?n(k):u.value}),d=F(()=>{switch(u.value){case"complete":return"pill-done";case"blocked":return"pill-blocked";default:return"pill-active"}}),f=F(()=>{const k=Xa(o.value?.value),A=ti(o.value?.unit);return k===void 0||!A?"":["turns","tokens","milliseconds","seconds","minutes","hours"].includes(A)?n(`tools.goal.${A}`,{value:k}):n("tools.goal.budget",{value:k,unit:A})}),p=F(()=>{switch(s.value){case"creategoal":return r.value;case"updategoal":return c.value;case"setgoalbudget":return f.value;default:return""}}),g=F(()=>!!t.tool.output&&t.tool.output.length>0),m=F(()=>!!l.value||s.value==="creategoal"&&g.value),y=F(()=>m.value||g.value),w=G(t.tool.defaultExpanded===!0&&y.value);return Ge(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&y.value&&(w.value=!0)}),(k,A)=>(b(),de(yl,{status:i.value,open:w.value,expandable:y.value,onToggle:A[0]||(A[0]=v=>w.value=!w.value)},{leading:he(()=>[V(h(Ce),{name:"target",size:"sm"})]),trailing:he(()=>[s.value==="updategoal"&&c.value?(b(),M("span",{key:0,class:$e(["tl-pill",d.value])},B(c.value),3)):s.value==="creategoal"?(b(),M("span",Qxe,B(h(n)("status.goalStatusActive")),1)):te("",!0)]),body:he(()=>[r.value?(b(),M("div",Yxe,[C("div",Jxe,B(r.value),1),l.value?(b(),M("div",Xxe,B(l.value),1)):te("",!0)])):te("",!0),g.value?(b(),de(_r,{key:1,lines:e.tool.output},null,8,["lines"])):te("",!0)]),default:he(()=>[C("span",Zxe,B(h(Vf)(e.tool.name)),1),p.value?(b(),M("span",Gxe,B(p.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),t_e=vt(e_e,[["__scopeId","data-v-862274de"]]),n_e={class:"tl-name"},i_e={key:0,class:"tl-mono"},s_e={key:1,class:"tl-dim"},o_e={key:2,class:"tl-faint"},r_e={key:0,class:"tl-chip"},l_e={key:0,class:"match-list"},a_e=["onClick"],u_e={key:0,class:"mref"},c_e={class:"mtext"},d_e=nt({__name:"GrepTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>so(n.tool.name)==="grep"),l=F(()=>Wu(n.tool.arg)),a=F(()=>{const y=l.value;return ti(y?.pattern)??ti(y?.query)??ti(y?.regex)??""}),u=F(()=>{const y=l.value;return ti(y?.path)??ti(y?.glob)??ti(y?.include)??""}),c=F(()=>(n.tool.output??[]).filter(y=>y.trim().length>0).map(y=>{const w=/^(.+?):(\d+)[:-](.*)$/.exec(y);return w?{path:w[1],line:Number(w[2]),text:(w[3]??"").trim()}:{text:y}})),d=F(()=>c.value.length),f=F(()=>d.value>0),p=F(()=>f.value),g=G(n.tool.defaultExpanded===!0&&p.value);Ge(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&p.value&&(g.value=!0)});function m(y){y.path&&i("openFile",{path:y.path,line:y.line})}return(y,w)=>(b(),de(yl,{status:o.value,open:g.value,expandable:p.value,onToggle:w[0]||(w[0]=k=>g.value=!g.value)},{leading:he(()=>[V(h(Ce),{name:"search",size:"sm"})]),trailing:he(()=>[d.value>0?(b(),M("span",r_e,B(h(s)("tools.chip.results",{count:d.value})),1)):te("",!0)]),body:he(()=>[r.value?(b(),M("div",l_e,[(b(!0),M(Be,null,yt(c.value,(k,A)=>(b(),M("button",{key:A,class:$e(["match-row",{link:k.path}]),type:"button",onClick:v=>m(k)},[k.path?(b(),M("span",u_e,B(k.path)+":"+B(k.line),1)):te("",!0),C("span",c_e,B(k.text),1)],10,a_e))),128))])):(b(),de(_r,{key:1,lines:e.tool.output},null,8,["lines"]))]),default:he(()=>[C("span",n_e,B(h(s)(r.value?"tools.label.grep":"tools.label.search")),1),a.value?(b(),M("span",i_e,B(a.value),1)):(b(),M("span",s_e,B(e.tool.arg),1)),u.value?(b(),M("span",o_e,B(u.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),f_e=vt(d_e,[["__scopeId","data-v-899c1a48"]]),h_e=["src","controls","muted"],p_e=["src","alt"],g_e=nt({__name:"AuthMedia",props:{url:{},kind:{},alt:{},fileId:{},mediaClass:{default:"u-img"},controls:{type:Boolean,default:!0},muted:{type:Boolean,default:!1}},setup(e){const t=e,n=G(t.fileId?"":t.url),i=G(null),s=G(!t.fileId);let o=null,r=0,l=!1,a=null;function u(){o!==null&&(URL.revokeObjectURL(o),o=null)}async function c(){const d=++r;if(u(),!t.fileId){n.value=t.url;return}if(s.value)try{const f=await jt().getFileBlob(t.fileId),p=URL.createObjectURL(f);if(l||d!==r){URL.revokeObjectURL(p);return}o=p,n.value=o}catch{if(l||d!==r)return;n.value=t.url}}return Ge(()=>[t.fileId,t.url,s.value],c,{immediate:!0}),gn(()=>{typeof IntersectionObserver=="function"&&i.value?(a=new IntersectionObserver(d=>{d[0]?.isIntersecting&&(s.value=!0,a?.disconnect(),a=null)},{rootMargin:"200px"}),a.observe(i.value)):s.value=!0}),Gn(()=>{l=!0,a?.disconnect(),a=null,u()}),(d,f)=>e.kind==="video"?(b(),M("video",{key:0,ref_key:"mediaEl",ref:i,class:$e(e.mediaClass),src:n.value||void 0,controls:e.controls,muted:e.muted,playsinline:"",preload:"metadata"},null,10,h_e)):(b(),M("img",{key:1,ref_key:"mediaEl",ref:i,class:$e([e.mediaClass,{"is-resolving":!n.value}]),src:n.value||void 0,alt:e.alt||"",loading:"lazy"},null,10,p_e))}}),zp=vt(g_e,[["__scopeId","data-v-0826404b"]]),m_e={class:"media-title"},v_e=["src","alt"],y_e=["aria-label"],b_e={key:0,class:"media-video-tile","aria-hidden":"true"},k_e={class:"media-play-badge","aria-hidden":"true"},A_e=["src"],C_e=nt({__name:"MediaTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia"],setup(e,{emit:t}){const n=e,i=t,s=F(()=>n.tool.status==="ok"?n.tool.media:void 0);function o(d){return d.split(/[\\/]+/).pop()||d}function r(d){return d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/1024/1024).toFixed(1)} MB`}const l=F(()=>{const d=s.value;if(!d)return"";const f=[d.path?o(d.path):n.tool.name];return d.mimeType&&f.push(d.mimeType),d.bytes!==void 0&&f.push(r(d.bytes)),d.dimensions&&f.push(d.dimensions),f.join(" · ")}),a=F(()=>s.value?.url.startsWith("blob:")??!1),u=F(()=>{const d=s.value;return d?.kind==="video"&&d.fileId!==void 0&&!a.value});function c(d){const f=s.value;if(f?.kind!=="image"&&f?.kind!=="video")return;const p=f.kind==="image"?d.currentTarget.querySelector("img"):null;i("openMedia",{media:f,originImg:p})}return(d,f)=>s.value?(b(),M("div",{key:0,class:$e(["media-tool",{mob:e.mobile}])},[V(h(mn),{text:s.value.path||l.value},{default:he(()=>[C("div",m_e,B(l.value),1)]),_:1},8,["text"]),s.value.kind==="image"?(b(),de(h(mn),{key:0,text:s.value.path||l.value},{default:he(()=>[C("button",{type:"button",class:"media-image-button",onClick:c},[C("img",{class:"media-image",src:s.value.url,alt:s.value.path?o(s.value.path):l.value,loading:"lazy"},null,8,v_e)])]),_:1},8,["text"])):s.value.kind==="video"?(b(),de(h(mn),{key:1,text:s.value.path||l.value},{default:he(()=>[C("button",{type:"button",class:"media-image-button media-video-button","aria-label":s.value.path?o(s.value.path):l.value,onClick:c},[u.value?(b(),M("span",b_e)):(b(),de(zp,{key:1,url:s.value.url,kind:"video","file-id":a.value?void 0:s.value.fileId,"media-class":"media-video",controls:!1,muted:""},null,8,["url","file-id"])),C("span",k_e,[V(h(Ce),{name:"play",size:"sm"})])],8,y_e)]),_:1},8,["text"])):(b(),M("audio",{key:2,class:"media-audio",src:s.value.url,controls:""},null,8,A_e))],2)):te("",!0)}}),w_e=vt(C_e,[["__scopeId","data-v-3bc3ee1a"]]),x_e=["innerHTML"],__e={class:"tl-name"},S_e={key:0,class:"tl-faint"},M_e={key:0,class:"tl-chip"},I_e=["title"],E_e={key:1,class:"plan-content"},T_e={key:2,class:"plan-review"},L_e={key:0},N_e={class:"review-label"},F_e={key:1},B_e={class:"review-label"},$_e={class:"review-feedback"},D_e=nt({__name:"PlanTool",props:{tool:{},mobile:{type:Boolean}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=G(n.tool.defaultExpanded===!0),r=F(()=>n.tool.plan),l=F(()=>r.value?.path??n.tool.planPath),a=F(()=>r.value!==void 0||l.value!==void 0||(n.tool.output?.length??0)>0),u=F(()=>{const d=r.value?.review?.state;return d?s(`tools.plan.review.${d}`):void 0});function c(){l.value&&i("openFile",{path:l.value,content:r.value?.plan})}return(d,f)=>(b(),de(yl,{status:e.tool.status,open:o.value,expandable:a.value,onToggle:f[0]||(f[0]=p=>o.value=!o.value)},{leading:he(()=>[C("span",{class:"plan-glyph",innerHTML:h(a$)(e.tool.name)},null,8,x_e)]),trailing:he(()=>[e.tool.timing?(b(),M("span",M_e,B(e.tool.timing),1)):te("",!0)]),body:he(()=>[l.value?(b(),M("button",{key:0,type:"button",class:"plan-path",title:l.value,onClick:c},B(l.value),9,I_e)):te("",!0),r.value?(b(),M("div",E_e,[V(h(ql),{text:r.value.plan,"open-file":p=>i("openFile",p)},null,8,["text","open-file"])])):te("",!0),r.value?.review?.selectedOption||r.value?.review?.feedback?(b(),M("div",T_e,[r.value.review.selectedOption?(b(),M("div",L_e,[C("span",N_e,B(h(s)("tools.plan.selectedOption")),1),C("span",null,B(r.value.review.selectedOption),1)])):te("",!0),r.value.review.feedback?(b(),M("div",F_e,[C("span",B_e,B(h(s)("tools.plan.feedback")),1),C("span",$_e,B(r.value.review.feedback),1)])):te("",!0)])):te("",!0),r.value?te("",!0):(b(),de(_r,{key:3,lines:e.tool.output,"empty-text":h(s)("tools.output.empty")},null,8,["lines","empty-text"]))]),default:he(()=>[C("span",__e,B(h(Vf)(e.tool.name)),1),u.value?(b(),M("span",S_e,B(u.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),z_e=vt(D_e,[["__scopeId","data-v-8dff80a1"]]),R_e={class:"tl-name"},O_e={key:1,class:"tl-faint"},P_e={key:2,class:"tl-faint"},j_e={key:3,class:"tl-dim"},H_e={key:0,class:"tl-chip"},W_e=nt({__name:"ReadTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>Wu(n.tool.arg)),l=F(()=>nD(r.value)??""),a=F(()=>l.value?Wf(l.value):""),u=F(()=>l.value?iD(l.value):""),c=F(()=>{const S=r.value;if(S)return Xa(S.offset)??Xa(S.line_start)??Xa(S.start_line)}),d=F(()=>{const S=r.value;if(!S)return;const I=Xa(S.limit)??Xa(S.length);return Xa(S.line_end)??Xa(S.end_line)??(c.value!==void 0&&I!==void 0?c.value+I:void 0)}),f=F(()=>c.value!==void 0&&d.value!==void 0?`:${c.value}-${d.value}`:c.value!==void 0?`:${c.value}`:""),p=F(()=>n.tool.status==="ok"?gte(n.tool.output??[]):null),g=F(()=>p.value?.contents??[]),m=F(()=>p.value?.lineNumbers),y=F(()=>p.value?.contents.length??n.tool.output?.length??0),w=F(()=>!!n.tool.output&&n.tool.output.length>0),k=F(()=>p.value!==null||w.value),A=G(n.tool.defaultExpanded===!0&&k.value),v=G(A.value);Ge(A,S=>{S&&(v.value=!0)}),Ge(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&k.value&&(A.value=!0)});function x(){l.value&&i("openFile",{path:l.value,line:c.value})}return(S,I)=>(b(),de(yl,{status:o.value,open:A.value,expandable:k.value,onToggle:I[0]||(I[0]=_=>A.value=!A.value)},{leading:he(()=>[V(h(Ce),{name:"file-text",size:"sm"})]),trailing:he(()=>[y.value>0?(b(),M("span",H_e,B(h(s)("tools.chip.lines",{count:y.value})),1)):te("",!0)]),body:he(()=>[l.value?(b(),M("button",{key:0,class:"path-link",type:"button",onClick:x},B(l.value),1)):te("",!0),p.value&&v.value?(b(),de(rl,{key:1,code:g.value,path:l.value,"line-numbers":m.value},null,8,["code","path","line-numbers"])):(b(),de(_r,{key:2,lines:e.tool.output,"empty-text":h(s)("tools.output.waiting")},null,8,["lines","empty-text"]))]),default:he(()=>[C("span",R_e,B(h(s)("tools.label.read")),1),a.value?(b(),M("button",{key:0,class:"tl-file",type:"button",onClick:It(x,["stop"])},B(a.value),1)):te("",!0),u.value?(b(),M("span",O_e,B(u.value),1)):te("",!0),f.value?(b(),M("span",P_e,B(f.value),1)):te("",!0),a.value?te("",!0):(b(),M("span",j_e,B(l.value||e.tool.arg),1))]),_:1},8,["status","open","expandable"]))}}),q_e=vt(W_e,[["__scopeId","data-v-0edbdd82"]]),U_e=["aria-expanded"],K_e={class:"title"},V_e={key:0,class:"meta"},Z_e={key:1,class:"sum-txt"},G_e={class:"rt"},Q_e={class:"status"},Y_e={key:0,class:"chip"},J_e={key:1,class:"tm"},X_e={class:"body"},eSe={class:"overview"},tSe={class:"overview-line"},nSe={class:"big"},iSe={key:0,class:"lbl"},sSe={key:1,class:"lbl"},oSe={key:2,class:"lbl"},rSe={key:3,class:"lbl"},lSe={key:0,class:"seg","aria-hidden":"true"},aSe={key:1,class:"legend"},uSe=["disabled","aria-label","aria-expanded","onClick"],cSe={class:"mname"},dSe={class:"mact"},fSe={class:"mphase"},hSe=["aria-expanded","onClick"],pSe={key:1,class:"fallback-output"},gSe={key:2,class:"waiting"},mSe=nt({__name:"SwarmTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(z){if(!z)return{};try{const K=JSON.parse(z),q=Array.isArray(K.items)?K.items:void 0;return{description:typeof K.description=="string"?K.description:void 0,itemCount:q?.length}}catch{return{}}}const r=un("resolveSwarmMembers"),l=F(()=>o(i.tool.arg)),a=F(()=>Vf(i.tool.name)),u=F(()=>l.value.description??""),c=F(()=>r?.(i.tool.id)??[]),d=F(()=>nte(i.tool.output)),f=un("modelDisplay"),p=un("subagentEffort"),g=F(()=>{let z;for(const K of c.value){const q=f?.(K.model),W=p?.(K.thinkingEffort),Z=[q,W].filter(X=>X!==void 0);if(Z.length===0)continue;const ne=Z.join(" · ");if(z===void 0)z=ne;else if(z!==ne)return}return z}),m=F(()=>i.tool.status),y=F(()=>m.value==="running"?"running":m.value==="error"||(d.value?.failed??0)>0?"error":"ok"),w=F(()=>tee(c.value,d.value)),k=F(()=>{const z={completed:0,working:0,suspended:0,queued:0,failed:0,cancelled:0};for(const K of w.value)z[K.phase]++;return z}),A=F(()=>w.value.length||l.value.itemCount||0),v=F(()=>k.value.completed+k.value.failed+k.value.cancelled),x=F(()=>{const z=d.value;if(!z)return"";const K=z.aborted??0;return K>0?n("tools.swarm.doneSubWithCancelled",{completed:z.completed,failed:z.failed,cancelled:K}):n("tools.swarm.doneSub",{completed:z.completed,failed:z.failed})}),S=F(()=>k.value.working+k.value.suspended+k.value.queued),I=[{phase:"completed",cls:"s-ok"},{phase:"working",cls:"s-run"},{phase:"suspended",cls:"s-warn"},{phase:"failed",cls:"s-fail"},{phase:"cancelled",cls:"s-queue"},{phase:"queued",cls:"s-queue"}],_=F(()=>I.map(({phase:z,cls:K})=>({phase:z,count:k.value[z],cls:K})).filter(z=>z.count>0)),E=G(m.value==="running"||S.value>0);function N(){E.value=!E.value}const D=F(()=>w.value.length>0||d.value||m.value==="running"?"":(i.tool.output??[]).join(` -`).trim()),T=G(new Set);function $(z){return T.value.has(z)}function O(z){const K=new Set(T.value);K.has(z)?K.delete(z):K.add(z),T.value=K}function P(z){if(z.agentId){s("openAgent",z.agentId);return}z.body&&O(z.id)}function R(z){return z.agentId!==void 0&&z.body.length>0&&(z.phase==="completed"||z.phase==="failed"||z.phase==="cancelled")}function j(z){return n(`tools.swarm.phase${z[0].toUpperCase()}${z.slice(1)}`)}return(z,K)=>(b(),M("div",{class:$e(["swarm-card",{open:E.value,err:y.value==="error"}])},[C("button",{class:"head",type:"button","aria-expanded":E.value,onClick:N},[V(h(Ce),{class:"ic",name:"sparkles",size:"sm"}),C("span",K_e,B(a.value),1),u.value?(b(),M("span",V_e,"·")):te("",!0),u.value?(b(),M("span",Z_e,B(u.value),1)):te("",!0),C("span",G_e,[C("span",Q_e,[y.value==="ok"?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):y.value==="error"?(b(),de(h(Ce),{key:1,name:"close",size:"sm"})):(b(),de(h(dl),{key:2,status:"running"}))]),v.value>0||A.value>0?(b(),M("span",Y_e,B(v.value)+" / "+B(A.value),1)):te("",!0),e.tool.timing?(b(),M("span",J_e,B(e.tool.timing),1)):te("",!0)]),V(h(Ce),{class:"car",name:"chevron-right",size:"sm"})],8,U_e),Nn(C("div",X_e,[C("div",eSe,[C("div",tSe,[C("span",nSe,B(h(n)("tools.swarm.progress",{done:v.value,total:A.value})),1),g.value?(b(),M("span",iSe,B(g.value),1)):te("",!0),y.value==="running"&&A.value>0?(b(),M("span",sSe,B(h(n)("tools.swarm.runningSub",{count:S.value})),1)):d.value?(b(),M("span",oSe,B(x.value),1)):(b(),M("span",rSe,B(h(n)("tools.swarm.waiting")),1))]),A.value>0&&_.value.length>0?(b(),M("div",lSe,[(b(!0),M(Be,null,yt(_.value,q=>(b(),M("span",{key:q.phase,class:$e(q.cls),style:Vt({flex:q.count})},null,6))),128))])):te("",!0),_.value.length>1?(b(),M("div",aSe,[(b(!0),M(Be,null,yt(_.value,q=>(b(),M("span",{key:q.phase},[C("i",{class:$e(["lg-dot",q.cls])},null,2),qe(B(j(q.phase))+" "+B(q.count),1)]))),128))])):te("",!0)]),w.value.length>0?(b(!0),M(Be,{key:0},yt(w.value,q=>(b(),M("div",{key:q.id,class:$e(["member",[`phase-${q.phase}`,{open:!q.agentId&&$(q.id)}]])},[C("button",{class:"member-head",type:"button",disabled:!q.agentId&&!q.body,"aria-label":q.agentId?h(n)("tasks.openDetail"):void 0,"aria-expanded":!q.agentId&&q.body?$(q.id):void 0,onClick:W=>P(q)},[V(h(dl),{class:"row-dot",status:q.phase},null,8,["status"]),V(h(mn),{text:q.name},{default:he(()=>[C("span",cSe,B(q.name),1)]),_:2},1032,["text"]),q.activity?(b(),de(h(mn),{key:0,text:q.activity},{default:he(()=>[C("span",dSe,B(q.activity),1)]),_:2},1032,["text"])):te("",!0),C("span",fSe,B(j(q.phase)),1),q.agentId?(b(),de(h(Ce),{key:1,class:"mcar",name:"arrow-right",size:"sm"})):q.body?(b(),de(h(Ce),{key:2,class:"mcar",name:"chevron-right",size:"sm"})):te("",!0)],8,uSe),R(q)?(b(),M("button",{key:0,class:"member-saved",type:"button","aria-expanded":$(q.id),onClick:W=>O(q.id)},[V(h(Ce),{class:$e(["member-saved-car",{open:$(q.id)}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"]),C("span",null,B(h(n)("tools.output.saved")),1)],8,hSe)):te("",!0),q.body&&(!q.agentId||R(q))?Nn((b(),M("div",{key:1,class:"member-body"},B(q.body),513)),[[is,$(q.id)]]):te("",!0)],2))),128)):D.value?(b(),M("div",pSe,B(D.value),1)):(b(),M("div",gSe,B(h(n)("tools.swarm.waiting")),1))],512),[[is,E.value]])],2))}}),vSe=vt(mSe,[["__scopeId","data-v-f7b643ea"]]),ySe=nt({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e;return(n,i)=>(b(),M("span",{class:$e(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},[t.status==="run"?(b(),de(h(dl),{key:0,status:"running"})):t.status==="pending"?(b(),de(h(dl),{key:1,status:"idle"})):t.status==="done"?(b(),de(h(Ce),{key:2,name:"check",size:"sm"})):(b(),de(h(Ce),{key:3,name:"close",size:"sm"}))],2))}}),bSe=vt(ySe,[["__scopeId","data-v-f1aedfd0"]]),kSe={class:"tl-name"},ASe={key:0,class:"tl-dim"},CSe={key:0,class:"tl-chip"},wSe={key:1,class:"todo-bar","aria-hidden":"true"},xSe={key:0,class:"todo-list"},_Se={class:"todo-title"},SSe=nt({__name:"TodoTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt();function i(g){const m=Wu(g),y=m&&Array.isArray(m.todos)?m.todos:m&&Array.isArray(m.items)?m.items:void 0;if(!y)return[];const w=[];for(const k of y){if(!k||typeof k!="object")continue;const A=k,v=ti(A.title)??ti(A.content)??ti(A.activeForm)??ti(A.text);if(!v)continue;const x=ti(A.status)??"pending";w.push({title:v,status:x==="in_progress"?"in_progress":x==="done"||x==="completed"?"done":"pending"})}return w}const s=F(()=>t.tool.status),o=F(()=>i(t.tool.arg)),r=F(()=>o.value.filter(g=>g.status==="done").length),l=F(()=>o.value.length),a=F(()=>o.value.find(g=>g.status==="in_progress")),u=F(()=>l.value>0?r.value/l.value:0),c=F(()=>!!t.tool.output&&t.tool.output.length>0),d=F(()=>l.value>0||c.value),f=G(t.tool.defaultExpanded===!0&&d.value);Ge(()=>[t.tool.defaultExpanded,t.tool.status],()=>{t.tool.defaultExpanded===!0&&d.value&&(f.value=!0)});function p(g){return g.status==="in_progress"?"run":g.status}return(g,m)=>(b(),de(yl,{status:s.value,open:f.value,expandable:d.value,onToggle:m[0]||(m[0]=y=>f.value=!f.value)},{leading:he(()=>[V(h(Ce),{name:"check-list",size:"sm"})]),trailing:he(()=>[l.value>0?(b(),M("span",CSe,B(r.value)+"/"+B(l.value),1)):te("",!0),l.value>0?(b(),M("span",wSe,[C("span",{class:"todo-fill",style:Vt({width:`${u.value*100}%`})},null,4)])):te("",!0)]),body:he(()=>[l.value>0?(b(),M("div",xSe,[(b(!0),M(Be,null,yt(o.value,(y,w)=>(b(),M("div",{key:w,class:$e(["todo-row",`s-${y.status}`])},[V(bSe,{status:p(y)},null,8,["status"]),C("span",_Se,B(y.title),1)],2))),128))])):c.value?(b(),de(_r,{key:1,lines:e.tool.output},null,8,["lines"])):te("",!0)]),default:he(()=>[C("span",kSe,B(h(n)("tools.label.todo")),1),a.value?(b(),M("span",ASe,B(a.value.title),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),MSe=vt(SSe,[["__scopeId","data-v-1b7f51f3"]]),ISe={class:"tl-name"},ESe={key:0},TSe={key:1,class:"tl-dim"},LSe={key:0,class:"fetch-url"},NSe=nt({__name:"WebFetchTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>{const u=Wu(t.tool.arg);return ti(u?.url)??ti(u?.uri)??""}),o=F(()=>s.value?sxe(s.value):""),r=F(()=>!!t.tool.output&&t.tool.output.length>0),l=F(()=>r.value),a=G(t.tool.defaultExpanded===!0&&l.value);return Ge(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&l.value&&(a.value=!0)}),(u,c)=>(b(),de(yl,{status:i.value,open:a.value,expandable:l.value,onToggle:c[0]||(c[0]=d=>a.value=!a.value)},{leading:he(()=>[V(h(Ce),{name:"globe",size:"sm"})]),body:he(()=>[s.value?(b(),M("div",LSe,B(s.value),1)):te("",!0),V(_r,{lines:e.tool.output,"empty-text":h(n)("tools.output.waiting")},null,8,["lines","empty-text"])]),default:he(()=>[C("span",ISe,B(h(n)("tools.label.web_fetch")),1),o.value?(b(),M("span",ESe,B(o.value),1)):(b(),M("span",TSe,B(e.tool.arg),1))]),_:1},8,["status","open","expandable"]))}}),FSe=vt(NSe,[["__scopeId","data-v-8c248fcc"]]);function BSe(e){if(e.media&&e.status==="ok")return w_e;switch(so(e.name)){case"bash":return cxe;case"read":return q_e;case"edit":case"write":case"multi_edit":return Exe;case"grep":case"search":return f_e;case"glob":case"ls":return Vxe;case"web_fetch":return FSe;case"todo":return MSe;case"task":return Mwe;case"agentswarm":return vSe;case"askuserquestion":return ixe;case"exitplanmode":return z_e;case"creategoal":case"getgoal":case"setgoalbudget":case"updategoal":return t_e;default:return zxe}}const gk=nt({__name:"ToolCall",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const n=e,i=t,s=F(()=>BSe(n.tool));return(o,r)=>(b(),de(Ss(s.value),{tool:e.tool,mobile:e.mobile,onOpenMedia:r[0]||(r[0]=l=>i("openMedia",l)),onOpenFile:r[1]||(r[1]=l=>i("openFile",l)),onOpenAgent:r[2]||(r[2]=l=>i("openAgent",l))},null,40,["tool","mobile"]))}}),$Se=["aria-expanded"],DSe={class:"think-title"},zSe={key:0,class:"think-time"},RSe=["inert"],OSe={class:"think-text"},PSe=nt({__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=G(!1),{t:i}=Bt();Ge(()=>t.streaming,(d,f)=>{f&&!d&&(n.value=!1)});const s=G(Date.now());Ge(()=>[t.streaming,t.startedAt],([d,f],p,g)=>{if(!d||!f)return;s.value=Date.now();const m=setInterval(()=>{s.value=Date.now()},1e3);g(()=>clearInterval(m))},{immediate:!0});const o=F(()=>{if(t.streaming&&t.startedAt){const d=Date.parse(t.startedAt);return Number.isFinite(d)?Ma(s.value-d):""}if(t.durationMs!==void 0){const d=Ma(t.durationMs);return d?`· ${d}`:""}return""}),r=un("pinScroll",()=>{}),l=G(null),a=G(null),u=G(!1);function c(){if(!n.value){const f=(a.value?.scrollHeight??0)>(typeof window<"u"?window.innerHeight:0);u.value=t.streaming&&f}if(n.value=!n.value,t.streaming)return;const d=l.value;d&&At(()=>r(d))}return(d,f)=>(b(),M("div",{class:$e(["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:c},[V(h(Ce),{class:"think-bulb",name:"thinking",size:"sm"}),C("span",DSe,B(e.streaming?h(i)("thinking.streaming"):h(i)("thinking.panelTitle")),1),o.value?(b(),M("span",zSe,B(o.value),1)):te("",!0),V(h(Ce),{class:"think-car",name:"chevron-right",size:"sm"})],8,$Se),C("div",{class:$e(["think-body",{open:n.value,instant:u.value}]),inert:!n.value},[C("div",{ref_key:"bodyInnerEl",ref:a,class:"think-body-inner"},[C("pre",OSe,B(e.text),1)],512)],10,RSe)],2))}}),mk=vt(PSe,[["__scopeId","data-v-7d463c2a"]]),sD=(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t);function jSe(e,t={}){return Cee(sD,e,t)}function HSe(e,t){return xee(sD,e,t)}const WSe=["aria-expanded"],qSe=["aria-label"],USe=["title"],KSe={key:0,class:"ar-sep"},VSe=["inert"],ZSe={class:"ar-body-inner"},GSe=nt({__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,i=t,s=F(()=>n.items.at(-1)),o=F(()=>{const _=s.value;if(n.streaming&&_?.kind==="thinking")return _;for(let E=n.items.length-1;E>=0;E--){const N=n.items[E];if(N?.kind==="tool"&&N.tool.status==="running")return N}return null}),r=F(()=>{if(n.streaming)return"running";for(const _ of n.items)if(_.kind==="tool"&&_.tool.status==="running")return"running";for(const _ of n.items)if(_.kind==="tool"&&_.tool.status==="error")return"error";return"done"}),l=G(r.value==="running"),a=un("pinScroll",()=>{}),u=G(null),c=G(null),d=G(void 0),f=G(Date.now()),p=F(()=>{let _=null;for(const E of n.items)if(E.kind==="thinking"&&E.startedAt!==void 0){const N=Date.parse(E.startedAt);Number.isFinite(N)&&(_===null||N<_)&&(_=N)}return _});Ge(r,(_,E,N)=>{if(_==="running"){E!==void 0&&E!=="running"&&(l.value=!0),c.value===null&&(c.value=p.value??Date.now()),d.value=void 0,f.value=Date.now();const D=setInterval(()=>{f.value=Date.now()},1e3);N(()=>clearInterval(D));return}E==="running"&&(l.value=!1,c.value!==null&&(d.value=Date.now()-c.value),c.value=null)},{immediate:!0});function g(){if(l.value=!l.value,n.streaming)return;const _=u.value;_&&At(()=>a(_))}const m=F(()=>{if(r.value==="done")return"check";if(r.value==="error")return"close";const _=o.value??s.value;return _?_.kind==="thinking"?"thinking":l$(_.tool.name):"tool"}),y=F(()=>HSe(n.items,o.value)),w=F(()=>jSe(n.items,{durationMs:d.value})),k=F(()=>r.value!=="running"||c.value===null?"":Ma(f.value-c.value)),A=F(()=>{if(r.value!=="running")return w.value.clauses;const _=[];return y.value.current&&_.push(y.value.current),_.push(...y.value.done),k.value&&_.push({fragments:[{text:k.value,tone:"faint"}]}),_}),v=F(()=>r.value!=="running"?w.value.plain:[y.value.plain,k.value].filter(Boolean).join(" · "));function x(_){if(_==="danger")return"ar-danger";if(_==="faint")return"ar-faint"}function S(_){return _.kind==="tool"?d$(_):`thinking-${_.sourceIndex}`}function I(_){return n.streaming&&_.kind==="thinking"&&_.durationMs===void 0&&_.sourceIndex===s.value?.sourceIndex}return(_,E)=>(b(),M("div",{class:$e(["activity-run",{open:l.value}])},[C("button",{ref_key:"headEl",ref:u,class:"ar-head",type:"button","aria-expanded":l.value,onClick:g},[C("span",{class:$e(["ar-glyph",{run:r.value==="running",err:r.value==="error",ok:r.value==="done"}]),role:"status","aria-label":r.value},[V(h(Ce),{name:m.value,size:"sm","aria-hidden":"true"},null,8,["name"])],10,qSe),C("span",{class:"ar-sum",title:v.value},[(b(!0),M(Be,null,yt(A.value,(N,D)=>(b(),M(Be,{key:D},[D>0?(b(),M("span",KSe," · ")):te("",!0),(b(!0),M(Be,null,yt(N.fragments,(T,$)=>(b(),M("span",{key:$,class:$e(x(T.tone))},B(T.text),3))),128))],64))),128))],8,USe),V(h(Ce),{class:"ar-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,WSe),C("div",{class:$e(["ar-body",{open:l.value}]),inert:!l.value},[C("div",ZSe,[(b(!0),M(Be,null,yt(e.items,N=>(b(),M(Be,{key:S(N)},[N.kind==="thinking"?(b(),de(mk,{key:0,text:N.thinking,mobile:e.mobile,streaming:I(N),"started-at":N.startedAt,"duration-ms":N.durationMs},null,8,["text","mobile","streaming","started-at","duration-ms"])):(b(),de(gk,{key:1,tool:N.tool,mobile:e.mobile,onOpenMedia:E[0]||(E[0]=D=>i("openMedia",D)),onOpenFile:E[1]||(E[1]=D=>i("openFile",D)),onOpenAgent:E[2]||(E[2]=D=>i("openAgent",D))},null,8,["tool","mobile"]))],64))),128))])],10,VSe)],2))}}),oD=vt(GSe,[["__scopeId","data-v-91eb361a"]]),QSe={class:"msg-time"},YSe=nt({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>sL(t.time,n("conversation.yesterday")));return(s,o)=>(b(),M("span",QSe,B(i.value),1))}}),C2=vt(YSe,[["__scopeId","data-v-9153170e"]]),JSe=["aria-expanded"],XSe={class:"ntf-chip"},eMe={class:"ntf-main"},tMe={class:"ntf-title"},nMe={class:"ntf-sub"},iMe={class:"ntf-side"},sMe={class:"ng-dots"},oMe={class:"ng-list"},rMe=["aria-expanded","onClick"],lMe={class:"ntf-chip"},aMe={class:"ntf-main"},uMe={class:"ntf-title"},cMe={class:"ntf-sub"},dMe={class:"ntf-side"},fMe={class:"st"},hMe={class:"ntf-body"},pMe={class:"ntf-body-in"},gMe={class:"nd-fields"},mMe={class:"k"},vMe={class:"v"},yMe={class:"k"},bMe={class:"v"},kMe={class:"k"},AMe={class:"v"},CMe={key:0,class:"nd-body"},wMe={key:1,class:"nd-out"},xMe=["title"],_Me=["onClick"],SMe={class:"nd-raw"},MMe=["aria-expanded"],IMe={class:"ntf-chip"},EMe={class:"ntf-main"},TMe={class:"ntf-title"},LMe={class:"ntf-sub"},NMe={class:"ntf-side"},FMe={class:"st"},BMe={class:"ntf-body"},$Me={class:"ntf-body-in"},DMe={class:"nd-fields"},zMe={class:"k"},RMe={class:"v"},OMe={class:"k"},PMe={class:"v"},jMe={class:"k"},HMe={class:"v"},WMe={key:0,class:"nd-body"},qMe={key:1,class:"nd-out"},UMe=["title"],KMe={class:"nd-raw"},VMe=nt({__name:"NotificationCard",props:{items:{}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.items.length>1),s=G(!1),o=G(new Set);function r(A,v){return A.id!==""?`${A.id}#${v}`:`ntf-${v}`}function l(A){const v=new Set(o.value);v.has(A)?v.delete(A):v.add(A),o.value=v}const a={completed:"check",failed:"alert-triangle",timed_out:"clock",killed:"stop",lost:"alert-triangle",info:"info"};function u(A){const v=Ag(A);return v==="info"&&A.sourceKind==="subagent"?"robot":a[v]}function c(A){return A.sourceKind==="subagent"?n("conversation.notification.kindSubagent"):n("conversation.notification.kindTask")}function d(A){return n(`conversation.notification.title.${Ag(A)}`,{kind:c(A)})}function f(A){return n(`conversation.notification.status.${Ag(A)}`)}function p(A){return YJ(A)}function g(A){return A==="ok"?"done":A==="err"?"error":A==="warn"?"warn":""}const m=F(()=>t.items.map(A=>A.title).filter(A=>A!=="").join(" · ")),y=G(null);let w=null;async function k(A,v){await no(A)&&(y.value=v,w!==null&&clearTimeout(w),w=setTimeout(()=>{w=null,y.value=null},1200))}return(A,v)=>i.value?(b(),M("div",{key:0,class:$e(["ntf-group-card",{open:s.value}])},[C("button",{class:"ntf-head",type:"button","aria-expanded":s.value,onClick:v[0]||(v[0]=x=>s.value=!s.value)},[C("span",XSe,[V(h(Ce),{name:"terminal",size:"sm"})]),C("span",eMe,[C("span",tMe,B(h(n)("conversation.notification.groupTitle",{n:e.items.length})),1),C("span",nMe,B(m.value),1)]),C("span",iMe,[C("span",sMe,[(b(!0),M(Be,null,yt(e.items,(x,S)=>(b(),M("span",{key:r(x,S),class:$e(["dot",g(p(x))])},null,2))),128))]),V(h(Ce),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,JSe),Nn(C("div",oMe,[(b(!0),M(Be,null,yt(e.items,(x,S)=>(b(),M("div",{key:r(x,S),class:$e(["ng-item",[p(x),{open:o.value.has(r(x,S))}]])},[C("button",{class:"ntf-head",type:"button","aria-expanded":o.value.has(r(x,S)),onClick:I=>l(r(x,S))},[C("span",lMe,[V(h(Ce),{name:u(x),size:"sm"},null,8,["name"])]),C("span",aMe,[C("span",uMe,B(d(x)),1),C("span",cMe,B(x.title),1)]),C("span",dMe,[C("span",fMe,B(f(x)),1),x.createdAt?(b(),de(C2,{key:0,time:x.createdAt},null,8,["time"])):te("",!0),V(h(Ce),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,rMe),Nn(C("div",hMe,[C("div",pMe,[C("div",gMe,[C("span",mMe,B(h(n)("conversation.notification.fields.type")),1),C("span",vMe,B(x.type),1),C("span",yMe,B(h(n)("conversation.notification.fields.source")),1),C("span",bMe,B(x.sourceKind)+" · "+B(x.sourceId),1),C("span",kMe,B(h(n)("conversation.notification.fields.severity")),1),C("span",AMe,B(x.severity||"—"),1)]),x.body?(b(),M("div",CMe,B(x.body),1)):te("",!0),x.outputFile?(b(),M("div",wMe,[V(h(Ce),{class:"nd-out-ic",name:"file-text",size:"sm"}),C("span",{class:"path",title:x.outputFile.path},B(x.outputFile.path),9,xMe),C("button",{class:"nd-act",type:"button",onClick:It(I=>k(x.outputFile.path,r(x,S)),["stop"])},B(y.value===r(x,S)?h(n)("conversation.notification.copied"):h(n)("conversation.notification.copyPath")),9,_Me)])):te("",!0),C("details",SMe,[C("summary",null,[V(h(Ce),{class:"nd-raw-car",name:"chevron-right",size:"sm"}),C("span",null,B(h(n)("conversation.notification.rawPayload")),1)]),C("pre",null,B(x.raw),1)])])],512),[[is,o.value.has(r(x,S))]])],2))),128))],512),[[is,s.value]])],2)):e.items[0]?(b(),M("div",{key:1,class:$e(["ntf",[p(e.items[0]),{open:o.value.has(r(e.items[0],0))}]])},[C("button",{class:"ntf-head",type:"button","aria-expanded":o.value.has(r(e.items[0],0)),onClick:v[1]||(v[1]=x=>l(r(e.items[0],0)))},[C("span",IMe,[V(h(Ce),{name:u(e.items[0]),size:"sm"},null,8,["name"])]),C("span",EMe,[C("span",TMe,B(d(e.items[0])),1),C("span",LMe,B(e.items[0].title),1)]),C("span",NMe,[C("span",FMe,B(f(e.items[0])),1),e.items[0].createdAt?(b(),de(C2,{key:0,time:e.items[0].createdAt},null,8,["time"])):te("",!0),V(h(Ce),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,MMe),Nn(C("div",BMe,[C("div",$Me,[C("div",DMe,[C("span",zMe,B(h(n)("conversation.notification.fields.type")),1),C("span",RMe,B(e.items[0].type),1),C("span",OMe,B(h(n)("conversation.notification.fields.source")),1),C("span",PMe,B(e.items[0].sourceKind)+" · "+B(e.items[0].sourceId),1),C("span",jMe,B(h(n)("conversation.notification.fields.severity")),1),C("span",HMe,B(e.items[0].severity||"—"),1)]),e.items[0].body?(b(),M("div",WMe,B(e.items[0].body),1)):te("",!0),e.items[0].outputFile?(b(),M("div",qMe,[V(h(Ce),{class:"nd-out-ic",name:"file-text",size:"sm"}),C("span",{class:"path",title:e.items[0].outputFile.path},B(e.items[0].outputFile.path),9,UMe),C("button",{class:"nd-act",type:"button",onClick:v[2]||(v[2]=It(x=>k(e.items[0].outputFile.path,r(e.items[0],0)),["stop"]))},B(y.value===r(e.items[0],0)?h(n)("conversation.notification.copied"):h(n)("conversation.notification.copyPath")),1)])):te("",!0),C("details",KMe,[C("summary",null,[V(h(Ce),{class:"nd-raw-car",name:"chevron-right",size:"sm"}),C("span",null,B(h(n)("conversation.notification.rawPayload")),1)]),C("pre",null,B(e.items[0].raw),1)])])],512),[[is,o.value.has(r(e.items[0],0))]])],2)):te("",!0)}}),rD=vt(VMe,[["__scopeId","data-v-69e0a1db"]]),ZMe=["aria-expanded"],GMe=["title"],QMe=["inert"],YMe={class:"tf-body-inner"},JMe={key:1,class:"msg"},XMe=nt({__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,i=t,{t:s}=Bt(),o=F(()=>n.streamingTailIndex!==null),r=F(()=>n.live?n.parked?"parked":"live":"settled"),l=G(!1),a=F(()=>o.value||l.value),u=G(a.value),c=G(a.value);let d=null;Ge(a,I=>{if(I){if(d!==null&&(clearTimeout(d),d=null),u.value){c.value=!0;return}u.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.value=!0})});return}c.value=!1,d=setTimeout(()=>{d=null,u.value=!1},200)});const f=un("pinScroll",()=>{}),p=G(null),g=G(Date.now());let m=null;function y(){m!==null&&(clearInterval(m),m=null)}Cn(()=>{y(),d!==null&&clearTimeout(d)}),Ge(r,(I,_)=>{I!=="settled"?(g.value=Date.now(),m===null&&(m=setInterval(()=>{g.value=Date.now()},1e3))):y(),_==="live"&&I!=="live"&&(l.value=!1)},{immediate:!0});const w=F(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),k=F(()=>Vbe({startMs:w.value,endedMs:n.endedMs,durationMs:n.durationMs,state:r.value==="settled"?{phase:"settled"}:{phase:"live",nowMs:g.value}}));function A(){l.value=!l.value,At(()=>{const I=p.value;I&&f(I)})}const v=F(()=>{const I=k.value===void 0?"":Ma(k.value);return I?s("conversation.fold.worked",{duration:I}):s("conversation.fold.workedUnknown")});function x(I){return n.streamingTailIndex===null||I.kind==="thinking"&&I.durationMs!==void 0?!1:I.sourceIndex===n.streamingTailIndex}function S(I){if(n.streamingTailIndex===null)return!1;const _=I.items.at(-1);return _?.kind==="thinking"&&_.durationMs!==void 0?!1:_!==void 0&&_.sourceIndex===n.streamingTailIndex}return(I,_)=>e.items.length>0?(b(),M("div",{key:0,class:$e(["turn-fold",{open:a.value,streaming:o.value}])},[o.value?te("",!0):(b(),M("button",{key:0,ref_key:"headEl",ref:p,class:"tf-head",type:"button","aria-expanded":l.value,onClick:A},[C("span",{class:"tf-sum",title:v.value},B(v.value),9,GMe),V(h(Ce),{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,ZMe)),u.value?(b(),M("div",{key:1,class:$e(["tf-body",{open:c.value}]),inert:!a.value},[C("div",YMe,[(b(!0),M(Be,null,yt(e.items,(E,N)=>(b(),M(Be,{key:h(f$)(E,N)},[E.kind==="thinking"?(b(),de(mk,{key:0,text:E.thinking,mobile:e.mobile,streaming:x(E),"started-at":E.startedAt,"duration-ms":E.durationMs},null,8,["text","mobile","streaming","started-at","duration-ms"])):E.kind==="text"&&E.text?(b(),M("div",JMe,[V(h(ql),{text:E.text,streaming:x(E),"open-file":D=>i("openFile",D)},null,8,["text","streaming","open-file"])])):E.kind==="activity-run"?(b(),de(oD,{key:2,items:E.items,mobile:e.mobile,streaming:S(E),onOpenMedia:_[0]||(_[0]=D=>i("openMedia",D)),onOpenFile:_[1]||(_[1]=D=>i("openFile",D)),onOpenAgent:_[2]||(_[2]=D=>i("openAgent",D))},null,8,["items","mobile","streaming"])):E.kind==="tool"?(b(),de(gk,{key:3,tool:E.tool,mobile:e.mobile,onOpenMedia:_[3]||(_[3]=D=>i("openMedia",D)),onOpenFile:_[4]||(_[4]=D=>i("openFile",D)),onOpenAgent:_[5]||(_[5]=D=>i("openAgent",D))},null,8,["tool","mobile"])):E.kind==="notification"?(b(),de(rD,{key:4,items:E.items},null,8,["items"])):te("",!0)],64))),128))])],10,QMe)):te("",!0)],2)):te("",!0)}}),eIe=vt(XMe,[["__scopeId","data-v-66797f5d"]]),tIe={class:"turn-files"},nIe={class:"tf-ic","aria-hidden":"true"},iIe={class:"tf-title"},sIe={key:0,class:"tf-stats"},oIe={key:0,class:"tf-add"},rIe={key:1,class:"tf-del"},lIe={class:"diffbar","aria-hidden":"true"},aIe={class:"tf-list"},uIe={key:0,class:"tf-dir"},cIe={class:"tf-base"},dIe={key:0,class:"tf-stats"},fIe={key:0,class:"tf-add"},hIe={key:1,class:"tf-del"},v4=3,pIe=nt({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.interactive!==!1),r=F(()=>{const v=n.changes.length;return s(v===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:v})}),l=F(()=>n.changes.some(v=>v.statsIncomplete)),a=F(()=>{let v=0,x=0;for(const S of n.changes)v+=S.added,x+=S.removed;return{added:v,removed:x}}),u=F(()=>!l.value&&(a.value.added>0||a.value.removed>0)),c=G(!1),d=F(()=>c.value?n.changes:n.changes.slice(0,v4)),f=F(()=>Math.max(0,n.changes.length-v4)),p=F(()=>n.changes.length>v4),g=F(()=>c.value?s("conversation.turnFiles.showLess"):f.value===1?s("conversation.turnFiles.moreOne"):s("conversation.turnFiles.more",{number:f.value}));function m(v){const x=n.cwd?lv(v,n.cwd):null;return x!==null?x||Wf(v):v}function y(v){const x=m(v),S=Math.max(x.lastIndexOf("/"),x.lastIndexOf("\\"));return S>0?x.slice(0,S+1):""}function w(v){const x=m(v),S=Math.max(x.lastIndexOf("/"),x.lastIndexOf("\\"));return S>=0?x.slice(S+1):x}function k(v){return v.statsIncomplete||v.added===0&&v.removed===0?null:{added:v.added,removed:v.removed}}function A(v){v.hasWrite?i("openFile",{path:v.path}):i("openDiff",v)}return(v,x)=>(b(),M("div",tIe,[V(h(Sq),null,dI({head:he(()=>[C("span",nIe,[V(h(Ce),{name:"pencil",size:"sm"})]),C("span",iIe,B(r.value),1),u.value?(b(),M("span",sIe,[a.value.added>0?(b(),M("span",oIe,"+"+B(a.value.added),1)):te("",!0),a.value.removed>0?(b(),M("span",rIe,"−"+B(a.value.removed),1)):te("",!0),C("span",lIe,[C("span",{class:"seg-add",style:Vt({flexGrow:a.value.added})},null,4),C("span",{class:"seg-del",style:Vt({flexGrow:a.value.removed})},null,4)])])):te("",!0)]),default:he(()=>[C("ul",aIe,[(b(!0),M(Be,null,yt(d.value,S=>(b(),M("li",{key:S.path,class:"tf-row"},[(b(),de(Ss(o.value?"button":"span"),{class:"tf-file",type:o.value?"button":void 0,onClick:I=>o.value&&A(S)},{default:he(()=>[y(S.path)?(b(),M("span",uIe,B(y(S.path)),1)):te("",!0),C("span",cIe,B(w(S.path)),1)]),_:2},1032,["type","onClick"])),k(S)?(b(),M("span",dIe,[k(S).added>0?(b(),M("span",fIe,"+"+B(k(S).added),1)):te("",!0),k(S).removed>0?(b(),M("span",hIe,"−"+B(k(S).removed),1)):te("",!0)])):te("",!0)]))),128))])]),_:2},[p.value?{name:"foot",fn:he(()=>[V(h(Ht),{variant:"ghost",size:"sm",class:"tf-more","aria-expanded":c.value,onClick:x[0]||(x[0]=S=>c.value=!c.value)},{default:he(()=>[qe(B(g.value)+" ",1),V(h(Ce),{class:$e(["tf-more-car",{open:c.value}]),name:"chevron-down",size:"sm","aria-hidden":"true"},null,8,["class"])]),_:1},8,["aria-expanded"])]),key:"0"}:void 0]),1024)]))}}),gIe=vt(pIe,[["__scopeId","data-v-f37da416"]]),mIe={class:"activity-notice",role:"status"},vIe={"aria-hidden":"true"},yIe={class:"an-label"},bIe=nt({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(b(),M("div",mIe,[C("span",vIe,[V(h(Ii),{size:"sm"})]),C("span",yIe,B(e.label),1)]))}}),kIe=vt(bIe,[["__scopeId","data-v-cc29061f"]]),AIe=["data-turn-id"],CIe=["title"],wIe={class:"cn-head-text"},xIe={key:0,class:"cn-bubble"},_Ie={class:"cn-prompt"},SIe={key:1,class:"cn-meta"},MIe=nt({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.cron),s=F(()=>i.value?.missedCount!==void 0),o=F(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),r=F(()=>{const f=i.value;return!f?.cron||f.recurring===!1?"":f.cron}),l=F(()=>s.value?"error":"ok"),a=F(()=>{const f=i.value;if(!f)return"";const p=[];return f.recurring===!1&&p.push(n("conversation.cron.oneShot")),typeof f.coalescedCount=="number"&&f.coalescedCount>1&&p.push(n("conversation.cron.coalesced",{n:f.coalescedCount})),f.missedCount!==void 0&&p.push(n("conversation.cron.missedCount",{n:f.missedCount})),f.stale===!0&&p.push(n("conversation.cron.finalDelivery")),p.join(" · ")}),u=F(()=>{const f=[o.value];return r.value&&f.push(r.value),a.value&&f.push(a.value),f.join(" · ")}),c=F(()=>{const f=i.value?.jobId;return f?n("conversation.cron.job",{id:f}):void 0}),d=F(()=>t.text??"");return(f,p)=>(b(),M("div",{class:$e(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[C("div",{class:$e(["cn-head",l.value]),title:c.value},[V(h(Ce),{name:"clock",size:"sm",class:"cn-head-ico","aria-hidden":"true"}),C("span",wIe,B(u.value),1)],10,CIe),d.value?(b(),M("div",xIe,[C("span",_Ie,B(d.value),1)])):te("",!0),e.createdAt?(b(),M("div",SIe,[V(C2,{time:e.createdAt},null,8,["time"])])):te("",!0)],10,AIe))}}),IIe=vt(MIe,[["__scopeId","data-v-9f79345d"]]);let vk=!1,Ec=null,GS=!1;function EIe(){Ec!==null&&(clearTimeout(Ec),Ec=null),vk=!0}function TIe(){Ec!==null&&clearTimeout(Ec),Ec=setTimeout(()=>{Ec=null,vk=!1},0)}function LIe(){GS||typeof document>"u"||(GS=!0,document.addEventListener("compositionstart",EIe,!0),document.addEventListener("compositionend",TIe,!0))}function NIe(e){return vk||e.isComposing||e.keyCode===229}const FIe=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,BIe=/^(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,$Ie=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,QS="text/plain;charset=utf-8";function DIe(e,t){const n=(t??"").toLowerCase();if(FIe.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:QS;const i=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return i===void 0?null:BIe.test(i)?QS:$Ie.test(i)?`image/${i==="jpg"?"jpeg":i==="ico"?"x-icon":i}`:i==="pdf"?"application/pdf":null}async function lD(e,t,n,i){const s=DIe(n,i);if(s===null)return"unsupported";const o=window.open("","_blank");o!==null&&(o.opener=null);const r=await e.getFileBlob(t).catch(()=>null);if(r===null)return o?.close(),"failed";const l=URL.createObjectURL(new Blob([r],{type:s}));if(o!==null)o.location.href=l;else{const a=document.createElement("a");a.href=l,a.download=n??t,a.click()}return setTimeout(()=>{URL.revokeObjectURL(l)},6e4),"previewed"}/*! - * PhotoSwipe 5.4.4 - https://photoswipe.com - * (c) 2024 Dmytro Semenov - */function gr(e,t,n){const i=document.createElement(t);return e&&(i.className=e),n&&n.appendChild(i),i}function fs(e,t){return e.x=t.x,e.y=t.y,t.id!==void 0&&(e.id=t.id),e}function aD(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function B8(e,t){const n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.sqrt(n*n+i*i)}function Th(e,t){return e.x===t.x&&e.y===t.y}function Rp(e,t,n){return Math.min(Math.max(e,t),n)}function up(e,t,n){let i=`translate3d(${e}px,${t||0}px,0)`;return n!==void 0&&(i+=` scale3d(${n},${n},1)`),i}function Tc(e,t,n,i){e.style.transform=up(t,n,i)}const zIe="cubic-bezier(.4,0,.22,1)";function uD(e,t,n,i){e.style.transition=t?`${t} ${n}ms ${i||zIe}`:"none"}function $8(e,t,n){e.style.width=typeof t=="number"?`${t}px`:t,e.style.height=typeof n=="number"?`${n}px`:n}function RIe(e){uD(e)}function OIe(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 Nr={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function PIe(e){return"button"in e&&e.button===1||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}function jIe(e,t,n=document){let i=[];if(e instanceof Element)i=[e];else if(e instanceof NodeList||Array.isArray(e))i=Array.from(e);else{const s=typeof e=="string"?e:t;s&&(i=Array.from(n.querySelectorAll(s)))}return i}function YS(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let cD=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{cD=!0}}))}catch{}class HIe{constructor(){this._pool=[]}add(t,n,i,s){this._toggleListener(t,n,i,s)}remove(t,n,i,s){this._toggleListener(t,n,i,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,n,i,s,o,r){if(!t)return;const l=o?"removeEventListener":"addEventListener";n.split(" ").forEach(u=>{if(u){r||(o?this._pool=this._pool.filter(d=>d.type!==u||d.listener!==i||d.target!==t):this._pool.push({target:t,type:u,listener:i,passive:s}));const c=cD?{passive:s||!1}:!1;t[l](u,i,c)}})}}function dD(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function nh(e,t,n,i,s){let o=0;if(t.paddingFn)o=t.paddingFn(n,i,s)[e];else if(t.padding)o=t.padding[e];else{const r="padding"+e[0].toUpperCase()+e.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function fD(e,t,n,i){return{x:t.x-nh("left",e,t,n,i)-nh("right",e,t,n,i),y:t.y-nh("top",e,t,n,i)-nh("bottom",e,t,n,i)}}class WIe{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,i=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,o=nh(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-i)/2)+o,this.max[t]=i>r?Math.round(r-i)+o:this.center[t],this.min[t]=i>r?o: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 Rp(n,this.max[t],this.min[t])}}const JS=4e3;class hD{constructor(t,n,i,s){this.pswp=s,this.options=t,this.itemData=n,this.index=i,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,i){const s={x:t,y:n};this.elementSize=s,this.panAreaSize=i;const o=i.x/s.x,r=i.y/s.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o: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",i=this.options[n];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>JS&&(t=JS/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}class qIe{constructor(t,n,i){this.data=t,this.index=n,this.pswp=i,this.isActive=n===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new hD(i.options,t,n,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:n}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=gr("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 WIe(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 i=Math.round(this.width*n)||this.pswp.viewportSize.x,s=Math.round(this.height*n)||this.pswp.viewportSize.y;!this.sizeChanged(i,s)&&!t||this.content.setDisplayedSize(i,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,i,s){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:n,transitionDuration:i}),o.animations.stopAllPan();const r=this.currZoomLevel;s||(t=Rp(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),aD(this.pan);const l=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:l,duration:i,easing:o.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,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];n||(n=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const o=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-n[t])*o+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),fs(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,n,i){i/=this.currentResolution||this.zoomLevels.initial,Tc(this.container,t,n,i)}calculateSize(){const{pswp:t}=this;fs(this.panAreaSize,fD(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 up(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const UIe=.35,KIe=.6,XS=.4,eM=.5;function VIe(e,t){return e*t/(1-t)}class ZIe{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&fs(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:n,dragAxis:i}=this.gestures,{currSlide:s}=this.pswp;if(i==="y"&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const o=s.pan.y+(t.y-n.y);if(!this.pswp.dispatch("verticalDrag",{panY:o}).defaultPrevented){this._setPanWithFriction("y",o,KIe);const r=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(r),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(aD(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:n,currSlide:i}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),n.isShifted()){const r=(n.x-n.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-eM&&r<0||t.x<.1&&r<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>eM&&r>0||t.x>-.1&&r>.5)&&(s=-1,t.x=Math.max(t.x,0)),n.moveIndexBy(s,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:n}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:s,bounds:o}=i,r=s[t],l=this.pswp.bgOpacity<1&&t==="y",u=r+VIe(n[t],.995);if(l){const g=this._getVerticalDragRatio(r),m=this._getVerticalDragRatio(u);if(g<0&&m<-XS||g>0&&m>XS){this.pswp.close();return}}const c=o.correctPan(t,u);if(r===c)return;const d=c===u?1:.82,f=this.pswp.bgOpacity,p=c-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:c,velocity:n[t],dampingRatio:d,onUpdate:g=>{if(l&&this.pswp.bgOpacity<1){const m=1-(c-g)/p;this.pswp.applyBgOpacity(Rp(f+(1-f)*m,0,1))}s[t]=Math.floor(g),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:n,dragAxis:i,prevP1:s,isMultitouch:o}=this.gestures,{currSlide:r,mainScroll:l}=this.pswp,a=n[t]-s[t],u=l.x+a;if(!a||!r)return!1;if(t==="x"&&!r.isPannable()&&!o)return l.moveTo(u,!0),!0;const{bounds:c}=r,d=r.pan[t]+a;if(this.pswp.options.allowPanToNext&&i==="x"&&t==="x"&&!o){const f=l.getCurrSlideX(),p=l.x-f,g=a>0,m=!g;if(d>c.min[t]&&g){if(c.min[t]<=this.startPan[t])return l.moveTo(u,!0),!0;this._setPanWithFriction(t,d)}else if(d<c.max[t]&&m){if(this.startPan[t]<=c.max[t])return l.moveTo(u,!0),!0;this._setPanWithFriction(t,d)}else if(p!==0){if(p>0)return l.moveTo(Math.max(u,f),!0),!0;if(p<0)return l.moveTo(Math.min(u,f),!0),!0}else this._setPanWithFriction(t,d)}else t==="y"?!l.isShifted()&&c.min.y!==c.max.y&&this._setPanWithFriction(t,d):this._setPanWithFriction(t,d);return!1}_getVerticalDragRatio(t){var n,i;return(t-((n=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&n!==void 0?n:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,n,i){const{currSlide:s}=this.pswp;if(!s)return;const{pan:o,bounds:r}=s;if(r.correctPan(t,n)!==n||i){const a=Math.round(n-o[t]);o[t]+=a*(i||UIe)}else o[t]=n}}const GIe=.05,QIe=.15;function tM(e,t,n){return e.x=(t.x+n.x)/2,e.y=(t.y+n.y)/2,e}class YIe{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,fs(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:n,p2:i,startP2:s,pswp:o}=this.gestures,{currSlide:r}=o;if(!r)return;const l=r.zoomLevels.min,a=r.zoomLevels.max;if(!r.isZoomable()||o.mainScroll.isShifted())return;tM(this._startZoomPoint,n,s),tM(this._zoomPoint,t,i);let u=1/B8(n,s)*B8(t,i)*this._startZoomLevel;if(u>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),u<l)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=r.zoomLevels.initial){const c=1-(l-u)/(l/1.2);o.dispatch("pinchClose",{bgOpacity:c}).defaultPrevented||o.applyBgOpacity(c)}else u=l-(l-u)*QIe;else u>a&&(u=a+(u-a)*GIe);r.pan.x=this._calculatePanForZoomLevel("x",u),r.pan.y=this._calculatePanForZoomLevel("y",u),r.setZoomLevel(u),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:n}=t;(!n||n.currZoomLevel<n.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,n){const i=n/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:n}=this.gestures,{currSlide:i}=n;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(t=!0);const s=i.currZoomLevel;let o,r=!0;s<i.zoomLevels.initial?o=i.zoomLevels.initial:s>i.zoomLevels.max?o=i.zoomLevels.max:(r=!1,o=s);const l=n.bgOpacity,a=n.bgOpacity<1,u=fs({x:0,y:0},i.pan);let c=fs({x:0,y:0},u);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,fs(this._startPan,u)),r&&(c={x:this._calculatePanForZoomLevel("x",o),y:this._calculatePanForZoomLevel("y",o)}),i.setZoomLevel(o),c={x:i.bounds.correctPan("x",c.x),y:i.bounds.correctPan("y",c.y)},i.setZoomLevel(s);const d=!Th(c,u);if(!d&&!r&&!a){i._setResolution(o),i.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&&(i.pan.x=u.x+(c.x-u.x)*f,i.pan.y=u.y+(c.y-u.y)*f),r){const p=s+(o-s)*f;i.setZoomLevel(p)}i.applyCurrentZoomPan()}a&&n.bgOpacity<1&&n.applyBgOpacity(Rp(l+(1-l)*f,0,1))},onComplete:()=>{i._setResolution(o),i.applyCurrentZoomPan()}})}}function nM(e){return!!e.target.closest(".pswp__container")}class JIe{constructor(t){this.gestures=t}click(t,n){const i=n.target.classList,s=i.contains("pswp__img"),o=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,n):o&&this._doClickOrTapAction("bgClick",t,n)}tap(t,n){nM(n)&&this._doClickOrTapAction("tap",t,n)}doubleTap(t,n){nM(n)&&this._doClickOrTapAction("doubleTap",t,n)}_doClickOrTapAction(t,n,i){var s;const{pswp:o}=this.gestures,{currSlide:r}=o,l=t+"Action",a=o.options[l];if(!o.dispatch(l,{point:n,originalEvent:i}).defaultPrevented){if(typeof a=="function"){a.call(o,n,i);return}switch(a){case"close":case"next":o[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):o.options.clickToCloseNonZoomable&&o.close();break;case"toggle-controls":(s=this.gestures.pswp.element)===null||s===void 0||s.classList.toggle("pswp--ui-visible");break}}}}const XIe=10,eEe=300,tEe=25;class nEe{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 ZIe(this),this.zoomLevels=new YIe(this),this.tapHandler=new JIe(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,i,s){const{pswp:o}=this,{events:r}=o,l=s?t+s:"";r.add(o.scrollWrap,t+n,this.onPointerDown.bind(this)),r.add(window,t+"move",this.onPointerMove.bind(this)),r.add(window,t+i,this.onPointerUp.bind(this)),l&&r.add(o.scrollWrap,l,this.onPointerUp.bind(this))}onPointerDown(t){const n=t.type==="mousedown"||t.pointerType==="mouse";if(n&&t.button>0)return;const{pswp:i}=this;if(!i.opener.isOpen){t.preventDefault();return}i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(n&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,fs(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,fs(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?Th(this.p1,this.prevP1)||this.drag.change():(!Th(this.p1,this.prevP1)||!Th(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const n=Date.now(),i=n-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=n,fs(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 i=this.pswp.options.doubleTapAction?eEe:0;this._tapTimer?(this._clearTapTimer(),B8(this._lastStartP1,this.startP1)<tEe&&this.tapHandler.doubleTap(this.startP1,t)):(fs(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,n){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&n>5?i/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 i=t,s=this._ongoingPointers.findIndex(o=>o.id===i.pointerId);n==="up"&&s>-1?this._ongoingPointers.splice(s,1):n==="down"&&s===-1?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&fs(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&fs(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),n==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){fs(this.prevP1,this.p1),fs(this.prevP2,this.p2)}_updateStartPoints(){fs(this.startP1,this.p1),fs(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])>=XIe&&(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 iEe=.35;class sEe{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,i=Math.round(n.viewportSize.x+n.viewportSize.x*n.options.spacing),s=i!==this.slideWidth;s&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((o,r)=>{s&&Tc(o.el,(r+this._containerShiftIndex)*this.slideWidth),t&&o.slide&&o.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=gr("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,i){const{pswp:s}=this;let o=s.potentialIndex+t;const r=s.getNumItems();if(s.canLoop()){o=s.getLoopedIndex(o);const a=(t+r)%r;a<=r/2?t=a:t=a-r}else o<0?o=0:o>=r&&(o=r-1),t=o-s.potentialIndex;s.potentialIndex=o,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:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:u=>{this.moveTo(u)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let a=s.potentialIndex-s.currIndex;if(s.canLoop()){const u=(a+r)%r;u<=r/2?a=u:a=u-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,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,n.currIndex=n.potentialIndex;let s=Math.abs(i),o;s>=3&&(this._containerShiftIndex+=i+(i>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;r<s;r++)i>0?(o=this.itemHolders.shift(),o&&(this.itemHolders[2]=o,this._containerShiftIndex++,Tc(o.el,(this._containerShiftIndex+2)*this.slideWidth),n.setContent(o,n.currIndex-s+r+2))):(o=this.itemHolders.pop(),o&&(this.itemHolders.unshift(o),this._containerShiftIndex--,Tc(o.el,this._containerShiftIndex*this.slideWidth),n.setContent(o,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(i),n.currSlide&&n.currSlide.applyCurrentZoomPan(),n.dispatch("change")}moveTo(t,n){if(!this.pswp.canLoop()&&n){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const s=Math.round(t-this.x);(i<0&&s>0||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+s*iEe)}this.x=t,this.pswp.container&&Tc(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:n??!1})}}const oEe={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},gc=(e,t)=>t?e:oEe[e];class rEe{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||PIe(t))return;let i,s,o=!1;const r="key"in t;switch(r?t.key:t.keyCode){case gc("Escape",r):n.options.escKey&&(i="close");break;case gc("z",r):i="toggleZoom";break;case gc("ArrowLeft",r):s="x";break;case gc("ArrowUp",r):s="y";break;case gc("ArrowRight",r):s="x",o=!0;break;case gc("ArrowDown",r):o=!0,s="y";break;case gc("Tab",r):this._focusRoot();break}if(s){t.preventDefault();const{currSlide:l}=n;n.options.arrowKeys&&s==="x"&&n.getNumItems()>1?i=o?"next":"prev":l&&l.currZoomLevel>l.zoomLevels.fit&&(l.pan[s]+=o?-80:80,l.panTo(l.pan.x,l.pan.y))}i&&(t.preventDefault(),n[i]())}_onFocusIn(t){const{template:n}=this.pswp;n&&document!==t.target&&n!==t.target&&!n.contains(t.target)&&n.focus()}}const lEe="cubic-bezier(.4,0,.22,1)";class aEe{constructor(t){var n;this.props=t;const{target:i,onComplete:s,transform:o,onFinish:r=()=>{},duration:l=333,easing:a=lEe}=t;this.onFinish=r;const u=o?"transform":"opacity",c=(n=t[u])!==null&&n!==void 0?n:"";this._target=i,this._onComplete=s,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{uD(i,u,l,a),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},l+500),i.style[u]=c},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),RIe(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const uEe=12,cEe=.75;class dEe{constructor(t,n,i){this.velocity=t*1e3,this._dampingRatio=n||cEe,this._naturalFrequency=i||uEe,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,n){let i=0,s;n/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*n);if(this._dampingRatio===1)s=this.velocity+this._naturalFrequency*t,i=(t+s*n)*o,this.velocity=i*-this._naturalFrequency+s*o;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);i=o*(t*r+s*l),this.velocity=i*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*l+this._dampedFrequency*s*r)}return i}}class fEe{constructor(t){this.props=t,this._raf=0;const{start:n,end:i,velocity:s,onUpdate:o,onComplete:r,onFinish:l=()=>{},dampingRatio:a,naturalFrequency:u}=t;this.onFinish=l;const c=new dEe(s,a,u);let d=Date.now(),f=n-i;const p=()=>{this._raf&&(f=c.easeFrame(f,Date.now()-d),Math.abs(f)<1&&Math.abs(c.velocity)<50?(o(i),r&&r(),this.onFinish()):(d=Date.now(),o(f+i),this._raf=requestAnimationFrame(p)))};this._raf=requestAnimationFrame(p)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class hEe{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,n){const i=n?new fEe(t):new aEe(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}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 pEe{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:i,deltaY:s}=t;if(n&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(n.isZoomable()){let o=-s;t.deltaMode===1?o*=.05:o*=t.deltaMode?1:.002,o=2**o;const r=n.currZoomLevel*o;n.zoomTo(r,{x:t.clientX,y:t.clientY})}}else n.isPannable()&&(t.deltaMode===1&&(i*=18,s*=18),n.panTo(n.pan.x-i,n.pan.y-s))}}function gEe(e){if(typeof e=="string")return e;if(!e||!e.isCustomSVG)return"";const t=e;let n='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return n=n.split("%d").join(t.size||32),t.outlineID&&(n+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),n+=t.inner,n+="</svg>",n}class mEe{constructor(t,n){var i;const s=n.name||n.className;let o=n.html;if(t.options[s]===!1)return;typeof t.options[s+"SVG"]=="string"&&(o=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=gr(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 p=f||d;p&&a.setAttribute("aria-label",p)}a.innerHTML=gEe(o),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 u=n.appendTo||"bar";let c=t.element;u==="bar"?(t.topBar||(t.topBar=gr("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),c=t.topBar):(a.classList.add("pswp__hide-on-close"),u==="wrapper"&&(c=t.scrollWrap)),(i=c)===null||i===void 0||i.appendChild(t.applyFilters("uiElement",a,n))}}function pD(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.currIndex<t.getNumItems()-1):e.disabled=!(t.currIndex>0))})}const vEe={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:pD},yEe={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(e,t)=>{pD(e,t,!0)}},bEe={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},kEe={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},AEe={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(e,t)=>{let n,i=null;const s=(l,a)=>{e.classList.toggle("pswp__preloader--"+l,a)},o=l=>{n!==l&&(n=l,s("active",l))},r=()=>{var l;if(!((l=t.currSlide)!==null&&l!==void 0&&l.content.isLoading())){o(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var a;o(!!(!((a=t.currSlide)===null||a===void 0)&&a.content.isLoading())),i=null},t.options.preloaderDelay))};t.on("change",r),t.on("loadComplete",l=>{t.currSlide===l.slide&&r()}),t.ui&&(t.ui.updatePreloaderVisibility=r)}},CEe={name:"counter",order:5,onInit:(e,t)=>{t.on("change",()=>{e.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function iM(e,t){e.classList.toggle("pswp--zoomed-in",t)}class wEe{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=[bEe,vEe,yEe,kEe,AEe,CEe],t.dispatch("uiRegister"),this.uiElementsData.sort((n,i)=>(n.order||0)-(i.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 mEe(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:n,options:i}=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 o=n.zoomLevels.initial-n.zoomLevels.secondary;if(Math.abs(o)<.01||!n.isZoomable()){iM(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;iM(t,r<=s),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--click-to-zoom")}}function xEe(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function _Ee(e,t,n){const i=e.getBoundingClientRect(),s=i.width/t,o=i.height/n,r=s>o?s:o,l=(i.width-t*r)/2,a=(i.height-n*r)/2,u={x:i.left+l,y:i.top+a,w:t*r};return u.innerRect={w:i.width,h:i.height,x:l,y:a},u}function SEe(e,t,n){const i=n.dispatch("thumbBounds",{index:e,itemData:t,instance:n});if(i.thumbBounds)return i.thumbBounds;const{element:s}=t;let o,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?o=_Ee(r,t.width||t.w||0,t.height||t.h||0):o=xEe(r)),n.applyFilters("thumbBounds",o,t,e)}class MEe{constructor(t,n){this.type=t,this.defaultPrevented=!1,n&&Object.assign(this,n)}preventDefault(){this.defaultPrevented=!0}}class IEe{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,n,i=100){var s,o,r;this._filters[t]||(this._filters[t]=[]),(s=this._filters[t])===null||s===void 0||s.push({fn:n,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((l,a)=>l.priority-a.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,n,i)}removeFilter(t,n){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==n)),this.pswp&&this.pswp.removeFilter(t,n)}applyFilters(t,...n){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(s=>{n[0]=s.fn.apply(this,n)}),n[0]}on(t,n){var i,s;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(n),(s=this.pswp)===null||s===void 0||s.on(t,n)}off(t,n){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(s=>n!==s)),(i=this.pswp)===null||i===void 0||i.off(t,n)}dispatch(t,n){var i;if(this.pswp)return this.pswp.dispatch(t,n);const s=new MEe(t,n);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,s)}),s}}class EEe{constructor(t,n){if(this.element=gr("pswp__img pswp__img--placeholder",t?"img":"div",n),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,n){this.element&&(this.element.tagName==="IMG"?($8(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=up(0,0,t/250)):$8(this.element,t,n))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class TEe{constructor(t,n,i){this.instance=n,this.data=t,this.index=i,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=Nr.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 i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new EEe(i,this.slide.container)}this.element&&!n||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=gr("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=gr("pswp__content","div"),this.element.innerHTML=this.data.html||""),n&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var n,i;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=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=Nr.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=Nr.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===Nr.LOADED||this.state===Nr.ERROR)&&this.removePlaceholder())}onError(){this.state=Nr.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===Nr.LOADING,this)}isError(){return this.state===Nr.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&&($8(this.element,t,n),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=n,i?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!==Nr.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 i=gr("pswp__error-msg","div");i.innerText=(t=(n=this.instance.options)===null||n===void 0?void 0:n.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=gr("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),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===Nr.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||YS())?(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&&!YS()?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===Nr.LOADED||this.state===Nr.ERROR)&&this.removePlaceholder()))}}const LEe=5;function gD(e,t,n){const i=t.createContentFromData(e,n);let s;const{options:o}=t;if(o){s=new hD(o,e,-1);let r;t.pswp?r=t.pswp.viewportSize:r=dD(o,t);const l=fD(o,r,e,n);s.update(i.width,i.height,l)}return i.lazyLoad(),s&&i.setDisplayedSize(Math.ceil(i.width*s.initial),Math.ceil(i.height*s.initial)),i}function NEe(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return gD(n,t,e)}class FEe{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,LEe),this._cachedItems=[]}updateLazy(t){const{pswp:n}=this;if(n.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=n.options,s=t===void 0?!0:t>=0;let o;for(o=0;o<=i[1];o++)this.loadSlideByIndex(n.currIndex+(s?o:-o));for(o=1;o<=i[0];o++)this.loadSlideByIndex(n.currIndex+(s?-o:o))}loadSlideByIndex(t){const n=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(n);i||(i=NEe(n,this.pswp),i&&this.addToCache(i))}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(i=>!i.isAttached&&!i.hasSlide);n!==-1&&this._cachedItems.splice(n,1)[0].destroy()}}removeByIndex(t){const n=this._cachedItems.findIndex(i=>i.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 BEe extends IEe{getNumItems(){var t;let n=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?n=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(n=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:n});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,n){return new TEe(t,this,n)}getItemData(t){var n;const i=(n=this.options)===null||n===void 0?void 0:n.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),s=i.items[t]);let o=s;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var n,i;return(n=this.options)!==null&&n!==void 0&&n.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?jIe(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const n={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){n.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(n.srcset=i.dataset.pswpSrcset),n.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,n.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,n.w=n.width,n.h=n.height,i.dataset.pswpType&&(n.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var s;n.msrc=o.currentSrc||o.src,n.alt=(s=o.getAttribute("alt"))!==null&&s!==void 0?s:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(n.thumbCropped=!0)}return this.applyFilters("domItemData",n,t,i)}lazyLoadData(t,n){return gD(t,this,n)}}const N1=.003;class $Ee{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:i}=t;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(i.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=i.showHideOpacity)!==null&&s!==void 0?s:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>N1,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(N1)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var o;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(o=this.pswp.currSlide)===null||o===void 0?void 0:o.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(N1)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(N1)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(N1)))):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,i=!0;OIe(this._placeholder).finally(()=>{n=!0,i||t(!0)}),setTimeout(()=>{i=!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:i}=this._thumbBounds,{currSlide:s,viewportSize:o}=n;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const r=-o.x+(this._thumbBounds.x-i.x)+i.w,l=-o.y+(this._thumbBounds.y-i.y)+i.h,a=o.x-i.w,u=o.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",up(r,l)),this._animateTo(this._cropContainer2,"transform",up(a,u))):(Tc(this._cropContainer1,r,l),Tc(this._cropContainer2,a,u))}s&&(fs(s.pan,i||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,n,i){if(!this._duration){t.style[n]=i;return}const{animations:s}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};o[n]=i,s.startTransition(o)}}const DEe={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 zEe extends BEe{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 HIe,this.animations=new hEe,this.mainScroll=new sEe(this),this.gestures=new nEe(this),this.opener=new $Ee(this),this.keyboard=new rEe(this),this.contentLoader=new FEe(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 pEe(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)),Rp(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 i;(i=n.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((n,i)=>{var s,o;let r=((s=(o=this.currSlide)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:0)-1+i;if(this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(n,t,!0),i===1)){var l;this.currSlide=n.slide,(l=n.slide)===null||l===void 0||l.setIsActive(!0)}}),this.dispatch("change")}setContent(t,n,i){if(this.canLoop()&&(n=this.getLoopedIndex(n)),t.slide){if(t.slide.index===n&&!i)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 qIe(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=dD(this.options,this);!t&&Th(n,this._prevViewportSize)||(fs(this._prevViewportSize,n),this.dispatch("beforeResize"),fs(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=gr("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=gr("pswp__bg","div",this.element),this.scrollWrap=gr("pswp__scroll-wrap","section",this.element),this.container=gr("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 wEe(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return SEe(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),{...DEe,...t}}}function REe(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 OEe(e,t,n){if(n?.currentSrc&&n.naturalWidth>0)return{src:n.currentSrc,w:n.naturalWidth,h:n.naturalHeight,objectUrl:null};let i=t.url,s=null;if(t.fileId)try{const r=await e.getFileBlob(t.fileId);s=URL.createObjectURL(r),i=s}catch{}const o=await REe(i);return o?{src:i,...o,objectUrl:s}:(s&&URL.revokeObjectURL(s),null)}function PEe(e){const t=(s,o)=>{const r=parseFloat(e(s));return Number.isFinite(r)&&r>0?r:o},n=t("--space-6",24),i=t("--space-8",32)+n;return{top:i,bottom:i,left:n,right:n}}function jEe(e){let t=!1,n=!1,i=null;return(async()=>{const s=await OEe(e.api,e.media,e.thumbImg);if(t){s?.objectUrl&&URL.revokeObjectURL(s.objectUrl);return}if(!s){e.onClose();return}const o=e.thumbImg?.currentSrc===s.src?e.thumbImg:null;i=new zEe({dataSource:[{src:s.src,w:s.w,h:s.h,thumbCropped:!0,...o?{msrc:o.currentSrc,element:o}:{}}],index:0,showHideAnimationType:o?"zoom":"fade",arrowPrev:!1,arrowNext:!1,counter:!1,close:!1,zoom:!1,wheelToZoom:!0,escKey:!0,trapFocus:!1,bgOpacity:1,padding:PEe(l=>getComputedStyle(document.documentElement).getPropertyValue(l))}),i.addFilter("thumbEl",l=>l?.isConnected?l:null);const r=e.media.path;i.on("uiRegister",()=>{const l=i?.ui;!l||!r||l.registerElement({name:"caption",className:"media-preview-caption",isButton:!1,appendTo:"root",onInit:a=>{a.textContent=r}})}),i.on("openingAnimationStart",()=>{vo.value+=1,e.onOpen?.()}),i.on("destroy",()=>{n=!0,vo.value=Math.max(0,vo.value-1),s.objectUrl&&URL.revokeObjectURL(s.objectUrl),e.onClose()}),i.init()})(),()=>{t=!0,i&&!n&&i.close()}}function Qs(e){this.content=e}Qs.prototype={constructor:Qs,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,s=i.find(e),o=i.content.slice();return s==-1?o.push(n||e,t):(o[s+1]=t,n&&(o[s]=n)),new Qs(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Qs(n)},addToStart:function(e,t){return new Qs([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Qs(n)},addBefore:function(e,t,n){var i=this.remove(t),s=i.content.slice(),o=i.find(e);return s.splice(o==-1?s.length:o,0,t,n),new Qs(s)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Qs.from(e),e.size?new Qs(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Qs.from(e),e.size?new Qs(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Qs.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Qs.from=function(e){if(e instanceof Qs)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Qs(t)};function mD(e,t,n){for(let i=0;;i++){if(i==e.childCount||i==t.childCount)return e.childCount==t.childCount?null:n;let s=e.child(i),o=t.child(i);if(s==o){n+=s.nodeSize;continue}if(!s.sameMarkup(o))return n;if(s.isText&&s.text!=o.text){let r=s.text,l=o.text,a=0;for(;r[a]==l[a];a++)n++;return a&&a<r.length&&a<l.length&&bD(r.charCodeAt(a-1))&&yD(r.charCodeAt(a))&&n--,n}if(s.content.size||o.content.size){let r=mD(s.content,o.content,n+1);if(r!=null)return r}n+=s.nodeSize}}function vD(e,t,n,i){for(let s=e.childCount,o=t.childCount;;){if(s==0||o==0)return s==o?null:{a:n,b:i};let r=e.child(--s),l=t.child(--o),a=r.nodeSize;if(r==l){n-=a,i-=a;continue}if(!r.sameMarkup(l))return{a:n,b:i};if(r.isText&&r.text!=l.text){let u=r.text,c=l.text,d=u.length,f=c.length;for(;d>0&&f>0&&u[d-1]==c[f-1];)d--,f--,n--,i--;return d&&f&&d<u.length&&bD(u.charCodeAt(d-1))&&yD(u.charCodeAt(d))&&(n++,i++),{a:n,b:i}}if(r.content.size||l.content.size){let u=vD(r.content,l.content,n-1,i-1);if(u)return u}n-=a,i-=a}}function yD(e){return e>=56320&&e<57344}function bD(e){return e>=55296&&e<56320}class ci{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let i=0;i<t.length;i++)this.size+=t[i].nodeSize}nodesBetween(t,n,i,s=0,o){for(let r=0,l=0;l<n;r++){let a=this.content[r],u=l+a.nodeSize;if(u>t&&i(a,s+l,o||null,r)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),i,s+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,i,s){let o="",r=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&i&&(r?r=!1:o+=i),o+=u},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,i=t.firstChild,s=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(i)&&(s[s.length-1]=n.withText(n.text+i.text),o=1);o<t.content.length;o++)s.push(t.content[o]);return new ci(s,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let i=[],s=0;if(n>t)for(let o=0,r=0;r<n;o++){let l=this.content[o],a=r+l.nodeSize;a>t&&((r<t||a>n)&&(l.isText?l=l.cut(Math.max(0,t-r),Math.min(l.text.length,n-r)):l=l.cut(Math.max(0,t-r-1),Math.min(l.content.size,n-r-1))),i.push(l),s+=l.nodeSize),r=a}return new ci(i,s)}cutByIndex(t,n){return t==n?ci.empty:t==0&&n==this.content.length?this:new ci(this.content.slice(t,n))}replaceChild(t,n){let i=this.content[t];if(i==n)return this;let s=this.content.slice(),o=this.size+n.nodeSize-i.nodeSize;return s[t]=n,new ci(s,o)}addToStart(t){return new ci([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ci(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,i=0;n<this.content.length;n++){let s=this.content[n];t(s,i,n),i+=s.nodeSize}}findDiffStart(t,n=0){return mD(this,t,n)}findDiffEnd(t,n=this.size,i=t.size){return vD(this,t,n,i)}findIndex(t){if(t==0)return hg(0,t);if(t==this.size)return hg(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let s=this.child(n),o=i+s.nodeSize;if(o>=t)return o==t?hg(n+1,o):hg(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return ci.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return ci.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ci.empty;let n,i=0;for(let s=0;s<t.length;s++){let o=t[s];i+=o.nodeSize,s&&o.isText&&t[s-1].sameMarkup(o)?(n||(n=t.slice(0,s)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new ci(n||t,i)}static from(t){if(!t)return ci.empty;if(t instanceof ci)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new ci([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ci.empty=new ci([],0);const y4={index:0,offset:0};function hg(e,t){return y4.index=e,y4.offset=t,y4}function w2(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!w2(e[i],t[i]))return!1}else{for(let i in e)if(!(i in t)||!w2(e[i],t[i]))return!1;for(let i in t)if(!(i in e))return!1}return!0}class js{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,i=!1;for(let s=0;s<t.length;s++){let o=t[s];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,s));else{if(o.type.excludes(this.type))return t;!i&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,s)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&w2(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=t.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=i.create(n.attrs);return i.checkAttrs(s.attrs),s}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].eq(n[i]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return js.none;if(t instanceof js)return[t];let n=t.slice();return n.sort((i,s)=>i.type.rank-s.type.rank),n}}js.none=[];class x2 extends Error{}class Dl{constructor(t,n,i){this.content=t,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let i=AD(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return i&&new Dl(i,this.openStart,this.openEnd)}removeBetween(t,n){return new Dl(kD(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return Dl.empty;let i=n.openStart||0,s=n.openEnd||0;if(typeof i!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Dl(ci.fromJSON(t,n.content),i,s)}static maxOpen(t,n=!0){let i=0,s=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)s++;return new Dl(t,i,s)}}Dl.empty=new Dl(ci.empty,0,0);function kD(e,t,n){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i),{index:r,offset:l}=e.findIndex(n);if(s==t||o.isText){if(l!=n&&!e.child(r).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(i!=r)throw new RangeError("Removing non-flat range");return e.replaceChild(i,o.copy(kD(o.content,t-s-1,n-s-1)))}function AD(e,t,n,i,s,o){let{index:r,offset:l}=e.findIndex(t),a=e.maybeChild(r);if(l==t||a.isText)return o&&i<=0&&s<=0&&!o.canReplace(r,r,n)?null:e.cut(0,t).append(n).append(e.cut(t));let u=AD(a.content,t-l-1,n,r==0?i-1:0,r==e.childCount-1?s-1:0,a);return u&&e.replaceChild(r,a.copy(u))}function HEe(e,t,n){if(n.openStart>e.depth)throw new x2("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new x2("Inconsistent open depths");return CD(e,t,n,0)}function CD(e,t,n,i){let s=e.index(i),o=e.node(i);if(s==t.index(i)&&i<e.depth-n.openStart){let r=CD(e,t,n,i+1);return o.copy(o.content.replaceChild(s,r))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==i&&t.depth==i){let r=e.parent,l=r.content;return jc(r,l.cut(0,e.parentOffset).append(n.content).append(l.cut(t.parentOffset)))}else{let{start:r,end:l}=WEe(n,e);return jc(o,xD(e,r,l,t,i))}else return jc(o,_2(e,t,i))}function wD(e,t){if(!t.type.compatibleContent(e.type))throw new x2("Cannot join "+t.type.name+" onto "+e.type.name)}function D8(e,t,n){let i=e.node(n);return wD(i,t.node(n)),i}function Pc(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Lh(e,t,n,i){let s=(t||e).node(n),o=0,r=t?t.index(n):s.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(Pc(e.nodeAfter,i),o++));for(let l=o;l<r;l++)Pc(s.child(l),i);t&&t.depth==n&&t.textOffset&&Pc(t.nodeBefore,i)}function jc(e,t){if(!e.type.validContent(t))throw new x2("Invalid content for node "+e.type.name);return e.copy(t)}function xD(e,t,n,i,s){let o=e.depth>s&&D8(e,t,s+1),r=i.depth>s&&D8(n,i,s+1),l=[];return Lh(null,e,s,l),o&&r&&t.index(s)==n.index(s)?(wD(o,r),Pc(jc(o,xD(e,t,n,i,s+1)),l)):(o&&Pc(jc(o,_2(e,t,s+1)),l),Lh(t,n,s,l),r&&Pc(jc(r,_2(n,i,s+1)),l)),Lh(i,null,s,l),new ci(l)}function _2(e,t,n){let i=[];if(Lh(null,e,n,i),e.depth>n){let s=D8(e,t,n+1);Pc(jc(s,_2(e,t,n+1)),i)}return Lh(t,null,n,i),new ci(i)}function WEe(e,t){let n=t.depth-e.openStart,s=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)s=t.node(o).copy(ci.from(s));return{start:s.resolveNoCache(e.openStart+n),end:s.resolveNoCache(s.content.size-e.openEnd-n)}}class cp{constructor(t,n,i){this.pos=t,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],s=t.child(n);return i?t.child(n).cut(i):s}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let i=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)s+=i.child(o).nodeSize;return s}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return js.none;if(this.textOffset)return t.child(n).marks;let i=t.maybeChild(n-1),s=t.maybeChild(n);if(!i){let l=i;i=s,s=l}let o=i.marks;for(var r=0;r<o.length;r++)o[r].type.spec.inclusive===!1&&(!s||!o[r].isInSet(s.marks))&&(o=o[r--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,s=t.parent.maybeChild(t.index());for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);i>=0;i--)if(t.pos<=this.end(i)&&(!n||n(this.node(i))))return new KEe(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let i=[],s=0,o=n;for(let r=t;;){let{index:l,offset:a}=r.content.findIndex(o),u=o-a;if(i.push(r,l,s+a),!u||(r=r.child(l),r.isText))break;o=u-1,s+=a+1}return new cp(n,i,o)}static resolveCached(t,n){let i=sM.get(t);if(i)for(let o=0;o<i.elts.length;o++){let r=i.elts[o];if(r.pos==n)return r}else sM.set(t,i=new qEe);let s=i.elts[i.i]=cp.resolve(t,n);return i.i=(i.i+1)%UEe,s}}class qEe{constructor(){this.elts=[],this.i=0}}const UEe=12,sM=new WeakMap;class KEe{constructor(t,n,i){this.$from=t,this.$to=n,this.depth=i}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const VEe=Object.create(null);let Cf=class z8{constructor(t,n,i,s=js.none){this.type=t,this.attrs=n,this.marks=s,this.content=i||ci.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,i,s=0){this.content.nodesBetween(t,n,i,s,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,i,s){return this.content.textBetween(t,n,i,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,i){return this.type==t&&w2(this.attrs,n||t.defaultAttrs||VEe)&&js.sameSet(this.marks,i||js.none)}copy(t=null){return t==this.content?this:new z8(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new z8(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,i=!1){if(t==n)return Dl.empty;let s=this.resolve(t),o=this.resolve(n),r=i?0:s.sharedDepth(n),l=s.start(r),u=s.node(r).content.cut(s.pos-l,o.pos-l);return new Dl(u,s.depth-r,o.depth-r)}replace(t,n,i){return HEe(this.resolve(t),this.resolve(n),i)}nodeAt(t){for(let n=this;;){let{index:i,offset:s}=n.content.findIndex(t);if(n=n.maybeChild(i),!n)return null;if(s==t||n.isText)return n;t-=s+1}}childAfter(t){let{index:n,offset:i}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(t);if(i<t)return{node:this.content.child(n),index:n,offset:i};let s=this.content.child(n-1);return{node:s,index:n-1,offset:i-s.nodeSize}}resolve(t){return cp.resolveCached(this,t)}resolveNoCache(t){return cp.resolve(this,t)}rangeHasMark(t,n,i){let s=!1;return n>t&&this.nodesBetween(t,n,o=>(i.isInSet(o.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),_D(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,i=ci.empty,s=0,o=i.childCount){let r=this.contentMatchAt(t).matchFragment(i,s,o),l=r&&r.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=s;a<o;a++)if(!this.type.allowsMarks(i.child(a).marks))return!1;return!0}canReplaceWith(t,n,i,s){if(s&&!this.type.allowsMarks(s))return!1;let o=this.contentMatchAt(t).matchType(i),r=o&&o.matchFragment(this.content,n);return r?r.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=js.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),t=i.addToSet(t)}if(!js.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,i)}let s=ci.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,s,i);return o.type.checkAttrs(o.attrs),o}};Cf.prototype.text=void 0;class S2 extends Cf{constructor(t,n,i,s){if(super(t,n,null,s),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):_D(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new S2(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new S2(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function _D(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class ed{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new ZEe(t,n);if(i.next==null)return ed.empty;let s=SD(i);i.next&&i.err("Unexpected trailing text");let o=tTe(eTe(s));return nTe(o,i),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,i=t.childCount){let s=this;for(let o=n;s&&o<i;o++)s=s.matchType(t.child(o).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let i=0;i<t.next.length;i++)if(this.next[n].type==t.next[i].type)return!0;return!1}fillBefore(t,n=!1,i=0){let s=[this];function o(r,l){let a=r.matchFragment(t,i);if(a&&(!n||a.validEnd))return ci.from(l.map(u=>u.createAndFill()));for(let u=0;u<r.next.length;u++){let{type:c,next:d}=r.next[u];if(!(c.isText||c.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=o(d,l.concat(c));if(f)return f}}return null}return o(this,[])}findWrapping(t){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==t)return this.wrapCache[i+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let s=i.shift(),o=s.match;if(o.matchType(t)){let r=[];for(let l=s;l.type;l=l.via)r.push(l.type);return r.reverse()}for(let r=0;r<o.next.length;r++){let{type:l,next:a}=o.next[r];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!s.type||a.validEnd)&&(i.push({match:l.contentMatch,type:l,via:s}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(i){t.push(i);for(let s=0;s<i.next.length;s++)t.indexOf(i.next[s].next)==-1&&n(i.next[s].next)}return n(this),t.map((i,s)=>{let o=s+(i.validEnd?"*":" ")+" ";for(let r=0;r<i.next.length;r++)o+=(r?", ":"")+i.next[r].type.name+"->"+t.indexOf(i.next[r].next);return o}).join(` -`)}}ed.empty=new ed(!0);class ZEe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function SD(e){let t=[];do t.push(GEe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function GEe(e){let t=[];do t.push(QEe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function QEe(e){let t=XEe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=YEe(e,t);else break;return t}function oM(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function YEe(e,t){let n=oM(e),i=n;return e.eat(",")&&(e.next!="}"?i=oM(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:t}}function JEe(e,t){let n=e.nodeTypes,i=n[t];if(i)return[i];let s=[];for(let o in n){let r=n[o];r.isInGroup(t)&&s.push(r)}return s.length==0&&e.err("No node type or group '"+t+"' found"),s}function XEe(e){if(e.eat("(")){let t=SD(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=JEe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function eTe(e){let t=[[]];return s(o(e,0),n()),t;function n(){return t.push([])-1}function i(r,l,a){let u={term:a,to:l};return t[r].push(u),u}function s(r,l){r.forEach(a=>a.to=l)}function o(r,l){if(r.type=="choice")return r.exprs.reduce((a,u)=>a.concat(o(u,l)),[]);if(r.type=="seq")for(let a=0;;a++){let u=o(r.exprs[a],l);if(a==r.exprs.length-1)return u;s(u,l=n())}else if(r.type=="star"){let a=n();return i(l,a),s(o(r.expr,a),a),[i(a)]}else if(r.type=="plus"){let a=n();return s(o(r.expr,l),a),s(o(r.expr,a),a),[i(a)]}else{if(r.type=="opt")return[i(l)].concat(o(r.expr,l));if(r.type=="range"){let a=l;for(let u=0;u<r.min;u++){let c=n();s(o(r.expr,a),c),a=c}if(r.max==-1)s(o(r.expr,a),a);else for(let u=r.min;u<r.max;u++){let c=n();i(a,c),s(o(r.expr,a),c),a=c}return[i(a)]}else{if(r.type=="name")return[i(l,void 0,r.value)];throw new Error("Unknown expr type")}}}}function MD(e,t){return t-e}function rM(e,t){let n=[];return i(t),n.sort(MD);function i(s){let o=e[s];if(o.length==1&&!o[0].term)return i(o[0].to);n.push(s);for(let r=0;r<o.length;r++){let{term:l,to:a}=o[r];!l&&n.indexOf(a)==-1&&i(a)}}}function tTe(e){let t=Object.create(null);return n(rM(e,0));function n(i){let s=[];i.forEach(r=>{e[r].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c<s.length;c++)s[c][0]==l&&(u=s[c][1]);rM(e,a).forEach(c=>{u||s.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=t[i.join(",")]=new ed(i.indexOf(e.length-1)>-1);for(let r=0;r<s.length;r++){let l=s[r][1].sort(MD);o.next.push({type:s[r][0],next:t[l.join(",")]||n(l)})}return o}}function nTe(e,t){for(let n=0,i=[e];n<i.length;n++){let s=i[n],o=!s.validEnd,r=[];for(let l=0;l<s.next.length;l++){let{type:a,next:u}=s.next[l];r.push(a.name),o&&!(a.isText||a.hasRequiredAttrs())&&(o=!1),i.indexOf(u)==-1&&i.push(u)}o&&t.err("Only non-generatable nodes ("+r.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ID(e){let t=Object.create(null);for(let n in e){let i=e[n];if(!i.hasDefault)return null;t[n]=i.default}return t}function ED(e,t){let n=Object.create(null);for(let i in e){let s=t&&t[i];if(s===void 0){let o=e[i];if(o.hasDefault)s=o.default;else throw new RangeError("No value supplied for attribute "+i)}n[i]=s}return n}function TD(e,t,n,i){for(let s in t)if(!(s in e))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${i}`);for(let s in e)e[s].validate&&e[s].validate(t[s])}function LD(e,t){let n=Object.create(null);if(t)for(let i in t)n[i]=new sTe(e,i,t[i]);return n}class M2{constructor(t,n,i){this.name=t,this.schema=n,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=LD(t,i.attrs),this.defaultAttrs=ID(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ed.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:ED(this.attrs,t)}create(t=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Cf(this,this.computeAttrs(t),ci.from(n),js.setFrom(i))}createChecked(t=null,n,i){return n=ci.from(n),this.checkContent(n),new Cf(this,this.computeAttrs(t),n,js.setFrom(i))}createAndFill(t=null,n,i){if(t=this.computeAttrs(t),n=ci.from(n),n.size){let r=this.contentMatch.fillBefore(n);if(!r)return null;n=r.append(n)}let s=this.contentMatch.matchFragment(n),o=s&&s.fillBefore(ci.empty,!0);return o?new Cf(this,t,n.append(o),js.setFrom(i)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let i=0;i<t.childCount;i++)if(!this.allowsMarks(t.child(i).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){TD(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let i=0;i<t.length;i++)this.allowsMarkType(t[i].type)?n&&n.push(t[i]):n||(n=t.slice(0,i));return n?n.length?n:js.none:t}static compile(t,n){let i=Object.create(null);t.forEach((o,r)=>i[o]=new M2(o,n,r));let s=n.spec.topNode||"doc";if(!i[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}}function iTe(e,t,n){let i=n.split("|");return s=>{let o=s===null?"null":typeof s;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${t} on type ${e}, got ${o}`)}}class sTe{constructor(t,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?iTe(t,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class yk{constructor(t,n,i,s){this.name=t,this.rank=n,this.schema=i,this.spec=s,this.attrs=LD(t,s.attrs),this.excluded=null;let o=ID(this.attrs);this.instance=o?new js(this,o):null}create(t=null){return!t&&this.instance?this.instance:new js(this,ED(this.attrs,t))}static compile(t,n){let i=Object.create(null),s=0;return t.forEach((o,r)=>i[o]=new yk(o,s++,n,r)),i}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){TD(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class oTe{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in t)n[s]=t[s];n.nodes=Qs.from(t.nodes),n.marks=Qs.from(t.marks||{}),this.nodes=M2.compile(this.spec.nodes,this),this.marks=yk.compile(this.spec.marks,this);let i=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let o=this.nodes[s],r=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=i[r]||(i[r]=ed.parse(r,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?lM(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let s in this.marks){let o=this.marks[s],r=o.spec.excludes;o.excluded=r==null?[o]:r==""?[]:lM(this,r.split(" "))}this.nodeFromJSON=s=>Cf.fromJSON(this,s),this.markFromJSON=s=>js.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,i,s){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof M2){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,i,s)}text(t,n){let i=this.nodes.text;return new S2(i,i.defaultAttrs,t,js.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function lM(e,t){let n=[];for(let i=0;i<t.length;i++){let s=t[i],o=e.marks[s],r=o;if(o)n.push(o);else for(let l in e.marks){let a=e.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&n.push(r=a)}if(!r)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return n}new oTe({nodes:{doc:{content:"block+"},paragraph:{group:"block",content:"inline*",toDOM:()=>["p",0],parseDOM:[{tag:"p"}]},text:{group:"inline"}}});const rTe=["aria-label"],lTe=["aria-label"],aTe={class:"media-lightbox-card"},uTe={class:"media-lightbox-frame"},cTe={key:0,class:"media-lightbox-name"},dTe=["aria-label"],fTe='button:not([disabled]), video[controls], [tabindex]:not([tabindex="-1"])',hTe=nt({__name:"MediaLightbox",props:{media:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=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=G(null),u=G(null),c=G(!1);let d=null,f=null;function p(g){if(g.key==="Escape"){g.preventDefault(),i("close");return}if(g.key!=="Tab"||!a.value)return;const m=a.value.querySelectorAll(fTe),y=m[0],w=m[m.length-1];!y||!w||(a.value.contains(document.activeElement)?g.shiftKey&&document.activeElement===y?(g.preventDefault(),w.focus()):!g.shiftKey&&document.activeElement===w&&(g.preventDefault(),y.focus()):(g.preventDefault(),(g.shiftKey?w:y).focus()))}return gn(()=>{if(o.value){f=jEe({api:jt(),media:n.media,thumbImg:n.originImg??null,onOpen:()=>{c.value=!0},onClose:()=>i("close")});return}vo.value+=1,d=document.activeElement instanceof HTMLElement?document.activeElement:null,window.addEventListener("keydown",p),u.value?.focus()}),Gn(()=>{if(f){f(),f=null;return}vo.value=Math.max(0,vo.value-1),window.removeEventListener("keydown",p),d?.focus()}),(g,m)=>(b(),de(jr,{to:"body"},[o.value?c.value?(b(),de(h(mn),{key:1,text:h(s)("model.close")},{default:he(()=>[C("button",{type:"button",class:"media-lightbox-close","aria-label":h(s)("model.close"),onClick:m[2]||(m[2]=y=>i("close"))},[V(h(Ce),{name:"close",size:"sm"})],8,dTe)]),_:1},8,["text"])):te("",!0):(b(),M("div",{key:0,ref_key:"overlayRef",ref:a,class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":l.value,onMousedown:m[1]||(m[1]=It(y=>i("close"),["self"]))},[V(h(mn),{text:h(s)("model.close")},{default:he(()=>[C("button",{ref_key:"closeRef",ref:u,type:"button",class:"media-lightbox-close","aria-label":h(s)("model.close"),onClick:m[0]||(m[0]=y=>i("close"))},[V(h(Ce),{name:"close",size:"sm"})],8,lTe)]),_:1},8,["text"]),C("div",aTe,[C("div",uTe,[V(zp,{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?(b(),M("div",cTe,B(r.value),1)):te("",!0)])],40,rTe))]))}}),bk=vt(hTe,[["__scopeId","data-v-6c0c564d"]]),pTe=["title","aria-label"],gTe={key:1,class:"media-thumb-media media-thumb-tile","aria-hidden":"true"},mTe={key:2,class:"media-thumb-badge","aria-hidden":"true"},vTe={key:3,class:"media-thumb-badge is-error","aria-hidden":"true"},yTe={key:4,class:"media-thumb-badge","aria-hidden":"true"},bTe=["aria-label"],kTe=nt({__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,i=t;function s(u){i("activate",u.currentTarget.querySelector("img"))}const{t:o}=Bt(),r=F(()=>n.name?n.name:n.kind==="video"?o("composer.attachmentVideo"):o("composer.attachmentImage")),l=F(()=>n.url?.startsWith("blob:")??!1),a=F(()=>!n.url||n.kind==="video"&&n.fileId!==void 0&&!l.value);return(u,c)=>(b(),M("span",{class:$e(["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?(b(),M("span",gTe)):(b(),de(zp,{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?(b(),M("span",mTe,[V(h(Ii),{size:"sm",label:h(o)("composer.uploading")},null,8,["label"])])):e.error?(b(),M("span",vTe,[V(h(Ce),{name:"info",size:"sm"})])):e.kind==="video"?(b(),M("span",yTe,[V(h(Ce),{name:"play",size:"sm"})])):te("",!0)],8,pTe),e.removable?(b(),de(h(mn),{key:0,text:e.removeLabel??h(o)("composer.remove")},{default:he(()=>[C("button",{type:"button",class:"media-thumb-rm","aria-label":e.removeLabel??h(o)("composer.remove"),onClick:c[0]||(c[0]=d=>i("remove"))},[V(h(Ce),{name:"close",size:"sm"})],8,bTe)]),_:1},8,["text"])):te("",!0)],2))}}),ND=vt(kTe,[["__scopeId","data-v-a7ab7e98"]]),ATe=["title","data-kind"],CTe=["aria-label"],wTe={class:"att-tile"},xTe={class:"att-name"},_Te={key:1,class:"att-err"},STe=["aria-label"],MTe=nt({__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,i=t,{t:s}=Bt(),o=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 c=o.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(c)?"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(c){return c<1024?`${c} B`:c<1024*1024?`${Math.round(c/1024)} KB`:`${(c/(1024*1024)).toFixed(1)} MB`}const u=F(()=>{const c=[l.value];return n.size!==void 0&&c.push(a(n.size)),c.join(" · ")});return(c,d)=>(b(),M("span",{class:$e(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:u.value,"data-kind":e.kind},[C("button",{type:"button",class:"att-activate","aria-label":u.value,onClick:d[0]||(d[0]=f=>i("activate"))},[C("span",wTe,[e.kind==="image"&&e.url?(b(),de(zp,{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"?(b(),de(h(Ce),{key:1,name:"play",size:"sm"})):e.kind==="image"?(b(),de(h(Ce),{key:2,name:"image",size:"sm"})):(b(),de(h(Ce),{key:3,name:r.value,size:"sm"},null,8,["name"]))]),C("span",xTe,B(l.value),1),e.uploading?(b(),de(h(Ii),{key:0,size:"sm",label:h(s)("composer.uploading")},null,8,["label"])):e.error?(b(),M("span",_Te,[V(h(Ce),{name:"info",size:"sm"})])):te("",!0)],8,CTe),e.removable?(b(),de(h(mn),{key:0,text:e.removeLabel??h(s)("composer.remove")},{default:he(()=>[C("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??h(s)("composer.remove"),onClick:d[1]||(d[1]=f=>i("remove"))},[V(h(Ce),{name:"close",size:"sm"})],8,STe)]),_:1},8,["text"])):te("",!0)],10,ATe))}}),FD=vt(MTe,[["__scopeId","data-v-f3a3043a"]]),ITe="/assets/kimi_avatar_default-srYjF2HV.riv",ETe={key:0,class:"mascot-fallback",viewBox:"5 0 240.776 240.776","aria-hidden":"true"},TTe="light/dark",LTe="click_avator",NTe="hoverspace",FTe=nt({__name:"KimiMascot",setup(e){const t=G(!1),n=G(null),i=ov();let s=null,o=null;function r(){s!==null&&mC(s,TTe,i.value?1:0)}gn(async()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches)try{const[{Rive:u,RuntimeLoader:c},d,f]=await Promise.all([Ji(()=>import("./rive-CeXCFBdn.js").then(w=>w.r),__vite__mapDeps([10,3])),Ji(()=>import("./rive-BxcgqsjB.js"),[]).then(w=>w.default),Ji(()=>import("./rive_fallback-ByshBW-N.js"),[]).then(w=>w.default)]),p=n.value;if(!p)return;c.setWasmUrl(d),c.setWasmFallbackUrl(f);const g=new u({canvas:p,src:ITe,autoplay:!0,onLoad(){const w=g.stateMachineNames[0];w!==void 0&&g.play(w),requestAnimationFrame(()=>{n.value&&(r(),g.resizeDrawingSurfaceToCanvas(),t.value=!0)})}});s=g;const m=Ge(i,r),y=()=>g.resizeDrawingSurfaceToCanvas();window.addEventListener("resize",y),o=()=>{m(),window.removeEventListener("resize",y),g.cleanup(),s=null}}catch{}}),Gn(()=>{o?.(),o=null});function l(u){s!==null&&mC(s,NTe,u)}function a(){s!==null&&mte(s,LTe)}return(u,c)=>(b(),M("div",{class:"mascot-host",role:"img","aria-label":"Kimi mascot",onPointerenter:c[0]||(c[0]=d=>l(!0)),onPointerleave:c[1]||(c[1]=d=>l(!1)),onClick:a},[t.value?te("",!0):(b(),M("svg",ETe,[...c[2]||(c[2]=[Tu('<defs data-v-75a5cb70><radialGradient id="mascot-body-gradient" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(125.388 105.735) scale(121.866)" data-v-75a5cb70><stop stop-color="#117DFB" data-v-75a5cb70></stop><stop stop-color="#449BFF" offset="0.759254" data-v-75a5cb70></stop><stop stop-color="#77B6FF" offset="1" data-v-75a5cb70></stop></radialGradient></defs><g data-v-75a5cb70><path d="M125.388 0C191.877 0 245.776 53.8995 245.776 120.388C245.776 186.877 191.877 240.776 125.388 240.776C58.8996 240.776 5 186.877 5 120.388C5 53.8995 58.8996 0 125.388 0Z" fill="#2389FF" data-v-75a5cb70></path><path d="M125.388 0C191.877 0 245.776 53.8995 245.776 120.388C245.776 186.877 191.877 240.776 125.388 240.776C58.8996 240.776 5 186.877 5 120.388C5 53.8995 58.8996 0 125.388 0Z" fill="url(#mascot-body-gradient)" data-v-75a5cb70></path></g><g transform="translate(-33.4 0)" data-v-75a5cb70><g transform="rotate(7.8 127.94 83.94)" data-v-75a5cb70><path d="M111.089 73.2179C109.935 64.8166 115.756 57.078 124.091 55.9333C132.426 54.7886 140.117 60.6713 141.271 69.0726L144.785 94.6564C145.939 103.058 140.118 110.796 131.783 111.941C123.449 113.086 115.757 107.203 114.603 98.8018L111.089 73.2179Z" fill="#FFFFFF" data-v-75a5cb70></path></g><g transform="translate(0 8.5) rotate(7.8 189.67 75.44)" data-v-75a5cb70><path d="M174.422 65.1492C173.326 57.1679 178.518 49.8626 186.019 48.8324C193.52 47.8021 200.489 53.4371 201.586 61.4184L204.924 85.723C206.02 93.7042 200.828 101.01 193.327 102.04C185.825 103.07 178.856 97.435 177.76 89.4538L174.422 65.1492Z" fill="#FFFFFF" data-v-75a5cb70></path></g></g>',3)])])),C("canvas",{ref_key:"canvasRef",ref:n,class:$e(["mascot-canvas",{ready:t.value}])},null,2)],32))}}),BTe=vt(FTe,[["__scopeId","data-v-75a5cb70"]]),$Te={class:"working-indicator",role:"status"},DTe={class:"wi-mascot","aria-hidden":"true"},zTe={class:"wi-label"},RTe=nt({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(b(),M("div",$Te,[C("span",DTe,[V(BTe)]),C("span",zTe,B(e.label),1)]))}}),BD=vt(RTe,[["__scopeId","data-v-8abb44ef"]]),OTe={class:"chat"},PTe={key:0,class:"chat-loading"},jTe={class:"chat-loading-text"},HTe={key:1,class:"chat-empty"},WTe={key:1,class:"top-sentinel-text"},qTe={key:0,class:"u-turn"},UTe=["data-turn-id"],KTe={key:0,class:"u-media"},VTe={key:1,class:"u-atts"},ZTe={key:2,class:"skill-act"},GTe={class:"skill-act-head"},QTe={key:3,class:"skill-act"},YTe={class:"skill-act-head"},JTe=["aria-expanded","onClick"],XTe={key:0,class:"u-meta"},eLe=["aria-label","onClick"],tLe={class:"u-edit-hint"},nLe=["aria-label","onClick"],iLe=["aria-label","onClick"],sLe=["data-turn-id"],oLe=["onClick"],rLe={class:"cd-view"},lLe={key:1,class:"cd-label"},aLe=["data-turn-id"],uLe={key:0,class:"goal-prov"},cLe={key:1,class:"msg"},dLe={key:3,class:"a-msg-ft"},fLe={key:0,class:"a-time"},hLe=["aria-label","onClick"],pLe={key:4,class:"compact-divider",role:"separator"},gLe={class:"cd-label",role:"status"},mLe={key:3,class:"turn-failed",role:"alert"},vLe={class:"tf-chip","aria-hidden":"true"},yLe={class:"tf-main"},bLe={class:"tf-title"},kLe=["title"],ALe=["title"],CLe={key:5,class:"sending-placeholder"},wLe={key:6,class:"q-stack"},xLe={class:"q-head"},_Le={class:"q-title"},SLe={class:"q-hint"},MLe=["onDragover","onDrop"],ILe={class:"u-bub q-bub"},ELe=["title","onDragstart"],TLe=["title","onClick"],LLe={key:0,class:"u-text q-text"},NLe={key:1,class:"q-text q-text-placeholder"},FLe=["aria-expanded","onClick"],BLe={key:0,class:"q-imgs"},$Le={key:0,class:"q-file"},DLe={key:1,class:"q-tag q-tag-next"},zLe={key:2,class:"q-tag q-tag-idx"},RLe=["aria-label","onClick"],OLe={key:0,class:"open-unsupported",role:"status"},PLe=2500,jLe=10,HLe=nt({__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},turnFailed:{type:Boolean,default:!1},turnError:{default:null},turnRetry:{default:null}},emits:["openFile","openMedia","openTurnDiff","copyConversationCopied","openCompaction","openAgent","editMessage","armedUndo","loadOlderMessages","unqueue","editQueued","reorderQueue","resumeTurn"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),{confirm:s}=ju();Cn(()=>{pe!==null&&(clearTimeout(pe),pe=null),Z!==null&&(clearTimeout(Z),Z=null),z!==null&&(clearTimeout(z),z=null),gt!==null&&(clearTimeout(gt),gt=null)});const o=e,r=G(null);let l=null;function a(){!r.value||typeof IntersectionObserver>"u"||(l?.disconnect(),l=new IntersectionObserver(je=>{je[0]?.isIntersecting&&o.hasMoreMessages&&!o.loadingMore&&!o.loadingMoreError&&!o.sessionLoading&&!o.isFollowing&&m("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),l.observe(r.value))}gn(a),Cn(()=>{l?.disconnect(),l=null}),Ge(()=>[o.hasMoreMessages,o.loadingMore,o.loadingMoreError],()=>{At().then(a)});const u=F(()=>{if(!o.turnActive||o.turns.length===0)return null;const je=o.turns.at(-1);return je.role==="assistant"?je.id:null}),c=F(()=>{const je=new Map;for(const st of o.turns){if(st.role!=="assistant"||st.id===u.value)continue;const Ue=eke(st);Ue.length>0&&je.set(st.id,Ue)}return je}),d=F(()=>o.working),f=F(()=>{const je=o.turnRetry;if(je!=null)return i("conversation.workingRetry",{n:je.nextAttempt,max:je.maxAttempts});const st=o.turns.at(-1),Ue=st?.role==="assistant"&&(st.text.trim().length>0||(st.thinking?.trim().length??0)>0||(st.tools?.length??0)>0);return i(Ue?"conversation.working":"conversation.requesting")}),p=F(()=>o.turnError?.code==="loop.max_steps_exceeded"?i("conversation.turnFailedMaxSteps"):i("conversation.turnFailed")),g=F(()=>{const je=o.turnError;if(!je)return"";const st=[];return je.code!==void 0&&je.code.length>0&&st.push(je.code),je.statusCode!==void 0&&st.push(`HTTP ${je.statusCode}`),je.requestId!==void 0&&je.requestId.length>0&&st.push(je.requestId),st.join(" · ")}),m=n,y=je=>m("openFile",je),w=je=>m("openMedia",je),k=je=>m("openAgent",je),A=je=>m("openTurnDiff",je),v=G(null),x=G(null);function S(je){return(je.attachments?.length??0)>0}function I(je){m("editQueued",je)}function _(je,st){if(v.value=je,!st.dataTransfer)return;st.dataTransfer.effectAllowed="move",st.dataTransfer.setData("text/plain",String(je));const Ue=st.currentTarget?.closest(".q-turn");Ue&&st.dataTransfer.setDragImage(Ue,24,24)}function E(je,st){if(v.value===null)return;st.preventDefault(),st.dataTransfer&&(st.dataTransfer.dropEffect="move");const Ue=st.currentTarget.getBoundingClientRect(),Ft=st.clientY<Ue.top+Ue.height/2?"before":"after";x.value={index:je,position:Ft}}function N(je,st){st.preventDefault();const Ue=v.value,Ft=x.value?.position??"before";if(v.value=null,x.value=null,Ue===null)return;let Ct=Ft==="before"?je:je+1;Ue<Ct&&(Ct-=1),Ue!==Ct&&m("reorderQueue",{from:Ue,to:Ct})}function D(){v.value=null,x.value=null}const T=F(()=>{for(let je=o.turns.length-1;je>=0;je--){const st=o.turns[je];if(st.goalContinuation)return null;if(st.role==="user")return st.id}return null});function $(je){return!o.readOnly&&je.role==="user"&&je.id===T.value&&!o.working&&!je.skillActivation&&!je.pluginCommand}function O(je){const st=je.compaction,Ue=st?.trigger==="auto"?i("conversation.compactedAuto"):i("conversation.compactedPlain");return typeof st?.tokensBefore=="number"&&typeof st?.tokensAfter=="number"?Ue+i("conversation.compactedTokens",{before:Ia(st.tokensBefore),after:Ia(st.tokensAfter)}):Ue}const P=G(null);function R(je){const st=je.createdAt===void 0?NaN:Date.parse(je.createdAt),Ue=je.endedAt??(Number.isFinite(st)&&je.durationMs!==void 0?new Date(st+je.durationMs).toISOString():je.createdAt);return Ue===void 0?"":sL(Ue,i("conversation.yesterday"))}const j=G(null);let z=null;async function K(je){await s({title:i("conversation.undo"),message:i("conversation.undoConfirm"),variant:"primary"})&&q(je)}function q(je){j.value===null&&(j.value=je.id,m("editMessage",{text:je.text,attachments:je.attachments}),z=setTimeout(()=>{z=null,j.value=null},PLe))}Ge(()=>o.turns,je=>{j.value!==null&&(je.some(st=>st.id===j.value)||(j.value=null,z!==null&&(clearTimeout(z),z=null)))},{flush:"post"});const W=G(!1);let Z=null;function ne(){if(o.turns.length===0)return;const je=[];for(const Ue of o.turns){if(Ue.role==="compaction"||Ue.role==="cron")continue;const Ft=Ue.role==="user"?"User":"Assistant",Ct=Gbe(Ue);Ct.trim()&&je.push(`**${Ft}** - -${Ct}`)}const st=je.join(` - ---- - -`);no(st).then(Ue=>{Ue&&(W.value=!0,m("copyConversationCopied"),Z!==null&&clearTimeout(Z),Z=setTimeout(()=>{Z=null,W.value=!1},2e3))}).catch(()=>{})}function X(je){const st=[];for(let Ue=je;Ue>=0;Ue--){const Ft=o.turns[Ue];if(!Ft||Ft.role!=="assistant")break;st.unshift(Ft)}return st}function ue(je){return X(je).map(st=>Zbe(st)).filter(Boolean).join(` - -`)}function ie(){for(let je=o.turns.length-1;je>=0;je-=1)if(o.turns[je]?.role==="assistant")return ue(je);return""}function Se(){const je=ie();je.trim()&&no(je).then(st=>{st&&(W.value=!0,m("copyConversationCopied"),Z!==null&&clearTimeout(Z),Z=setTimeout(()=>{Z=null,W.value=!1},2e3))}).catch(()=>{})}t({copyConversation:ne,copyFinalSummary:Se});function fe(je){const st=o.turns[je];if(!st||st.role!=="assistant")return!1;const Ue=o.turns[je+1];return!Ue||Ue.role!=="assistant"}let pe=null;function Ne(je){const st=o.turns[je];if(!st)return;const Ue=ue(je);Ue.trim()&&no(Ue).then(Ft=>{Ft&&(P.value=st.id,pe!==null&&clearTimeout(pe),pe=setTimeout(()=>{pe=null,P.value=null},1400))}).catch(()=>{})}function ee(je){const st=je.text;st.trim()&&no(st).then(Ue=>{Ue&&(P.value=je.id,pe!==null&&clearTimeout(pe),pe=setTimeout(()=>{pe=null,P.value=null},1400))}).catch(()=>{})}const ye=Es(new Set),H=Es(new Set),Y=new Map,ve=new WeakMap,re=un("pinScroll",()=>{}),se=new ResizeObserver(je=>{for(const st of je){const Ue=st.target,Ft=ve.get(Ue);Ft!==void 0&&U(Ft,Ue)}});Cn(()=>se.disconnect());function U(je,st){const Ue=parseFloat(getComputedStyle(st).lineHeight);if(!Number.isFinite(Ue)||Ue<=0)return;const Ct=(st.textContent??"").match(/\n+$/)?.[0].length??0;st.scrollHeight-Math.max(0,Ct-1)*Ue>Ue*jLe+1?ye.add(je):ye.delete(je)}function J(je,st){if(!(st instanceof HTMLElement)||Y.get(je)===st)return;const Ue=Y.get(je);Ue!==void 0&&se.unobserve(Ue),Y.set(je,st),ve.set(st,je),se.observe(st),U(je,st)}function ce(je){return`queue:${je.id}`}Ge([()=>o.turns,()=>o.queued],()=>{const je=new Set(o.turns.map(st=>st.id));for(const st of o.queued)je.add(ce(st));for(const[st,Ue]of Y)je.has(st)||(se.unobserve(Ue),Y.delete(st),ye.delete(st),H.delete(st))});function ge(je){return je.skillActivation?je.skillActivation.args||null:je.pluginCommand?je.pluginCommand.args||null:je.text||null}function Me(je){return je.skillActivation!==void 0||je.pluginCommand!==void 0}function Pe(je){return ye.has(je)&&!H.has(je)}function ke(je,st){const Ue=H.has(je);Ue&&st.currentTarget instanceof HTMLElement&&re(st.currentTarget),Ue?H.delete(je):H.add(je)}function Le(je){return je.kind==="image"||je.kind==="video"}function it(je){return(je.attachments??[]).filter(Le)}function Fe(je){return(je.attachments??[]).filter(st=>!Le(st))}function De(je){return{kind:je.kind==="video"?"video":"image",url:je.url,path:je.name,fileId:je.fileId}}const Ke=G(null);let gt=null;const lt=G(null),ft=G(null);function Lt(je,st){if(je.kind==="image"||je.kind==="video"){ft.value=st??null,lt.value=De(je);return}je.fileId!==void 0&&lD(jt(),je.fileId,je.name,je.mediaType).then(Ue=>{Ue==="unsupported"&&(Ke.value=je.name??je.fileId??"",gt!==null&&clearTimeout(gt),gt=setTimeout(()=>{gt=null,Ke.value=null},2400))})}function bn(je,st){return je.id!==u.value||st.kind==="thinking"&&st.durationMs!==void 0?!1:st.sourceIndex===ba(je).length-1}function Gt(je,st){if(je.id!==u.value)return!1;const Ue=st.items.at(-1);return Ue?.kind==="thinking"&&Ue.durationMs!==void 0?!1:Ue!==void 0&&Ue.sourceIndex===ba(je).length-1}const Qt={folded:[],visible:[]};function kn(je){return je.role!=="assistant"?Qt:c$(je)}function _n(je){if(je.id!==u.value)return null;const st=ba(je),Ue=st.at(-1);if(Ue?.kind==="thinking"&&Ue.durationMs!==void 0)return null;if(Ue?.kind==="tool"&&Ue.tool.status==="running"){const Ft=Ue.tool.id;if(o.approvals?.some(Ct=>Ct.toolCallId===Ft)||o.questions?.some(Ct=>Ct.toolCallId===Ft))return null}return st.length-1}return(je,st)=>(b(),M(Be,null,[C("div",OTe,[e.sessionLoading?(b(),M("div",PTe,[V(h(Ii),{size:"sm"}),C("span",jTe,B(h(i)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(b(),M("div",HTe)):te("",!0),e.hasMoreMessages||e.loadingMore?(b(),M("div",{key:2,ref_key:"topSentinelRef",ref:r,class:$e(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(b(),M("span",WTe,[V(h(Ii),{size:"sm"}),qe(" "+B(h(i)("conversation.loadingOlder")),1)])):(b(),M("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:st[0]||(st[0]=Ue=>m("loadOlderMessages"))},B(h(i)("conversation.loadOlder")),1))],2)):te("",!0),(b(!0),M(Be,null,yt(e.turns,(Ue,Ft)=>(b(),M(Be,{key:Ue.id},[Ue.role==="user"?(b(),M("div",qTe,[C("div",{class:$e(["u-bub turn-anchor",{undoing:j.value===Ue.id}]),"data-turn-id":Ue.id},[it(Ue).length>0?(b(),M("div",KTe,[(b(!0),M(Be,null,yt(it(Ue),(Ct,Fn)=>(b(),de(ND,{key:Fn,kind:Ct.kind,name:Ct.name,url:Ct.url,"file-id":Ct.fileId,onActivate:In=>Lt(Ct,In)},null,8,["kind","name","url","file-id","onActivate"]))),128))])):te("",!0),Fe(Ue).length>0?(b(),M("div",VTe,[(b(!0),M(Be,null,yt(Fe(Ue),(Ct,Fn)=>(b(),de(FD,{key:Fn,kind:Ct.kind,name:Ct.name,url:Ct.url,"file-id":Ct.fileId,"media-type":Ct.mediaType,size:Ct.size,onActivate:In=>Lt(Ct)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):te("",!0),Ue.skillActivation?(b(),M("div",ZTe,[C("div",GTe,[st[3]||(st[3]=C("span",{class:"skill-act-arrow"},"▶",-1)),C("span",null,B(h(i)("conversation.activatedSkill",{name:Ue.skillActivation.name})),1)])])):Ue.pluginCommand?(b(),M("div",QTe,[C("div",YTe,[st[4]||(st[4]=C("span",{class:"skill-act-arrow"},"▶",-1)),C("span",null,"/"+B(Ue.pluginCommand.pluginId)+":"+B(Ue.pluginCommand.commandName),1)])])):te("",!0),ge(Ue)!==null?(b(),M("div",{key:4,class:$e(["u-text-wrap",{"is-clamped":Pe(Ue.id),"u-text-wrap-args":Me(Ue)}])},[C("div",{class:$e(Me(Ue)?"skill-act-args":"u-text"),ref_for:!0,ref:Ct=>J(Ue.id,Ct)},B(ge(Ue)),3),ye.has(Ue.id)?(b(),M("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!Pe(Ue.id),onClick:Ct=>ke(Ue.id,Ct)},[C("span",null,B(Pe(Ue.id)?h(i)("conversation.userMessage.expand"):h(i)("conversation.userMessage.collapse")),1),V(h(Ce),{class:"u-text-toggle-car",name:"chevron-down",size:"sm","aria-hidden":"true"})],8,JTe)):te("",!0)],2)):te("",!0)],10,UTe),Ue.createdAt||$(Ue)||!e.readOnly&&e.undoHintTurnId===Ue.id?(b(),M("div",XTe,[$(Ue)||!e.readOnly&&e.undoHintTurnId===Ue.id?(b(),M("div",{key:0,class:$e(["u-edit-wrap",{undoing:j.value===Ue.id}])},[e.undoHintTurnId===Ue.id?(b(),de(h(mn),{key:0,text:h(i)("conversation.undoTooltip")},{default:he(()=>[C("button",{type:"button",class:"u-edit u-edit-armed","aria-label":h(i)("conversation.undoTooltip"),onClick:Ct=>m("armedUndo",Ue.id)},[V(h(Ce),{name:"undo",size:"sm"}),C("span",tLe,[qe(B(h(i)("conversation.escUndoHintPre")),1),V(h(Aa),{keys:["Esc"]}),qe(B(h(i)("conversation.escUndoHintPost")),1)])],8,eLe)]),_:2},1032,["text"])):(b(),de(h(mn),{key:1,text:h(i)("conversation.undoTooltip")},{default:he(()=>[C("button",{type:"button",class:"u-edit","aria-label":h(i)("conversation.undoTooltip"),onClick:Ct=>K(Ue)},[V(h(Ce),{name:"undo",size:"sm"})],8,nLe)]),_:2},1032,["text"]))],2)):te("",!0),V(h(mn),{text:h(i)("filePreview.copy")},{default:he(()=>[Ue.text.trim().length>0?(b(),M("button",{key:0,type:"button",class:"u-copy","aria-label":h(i)("filePreview.copy"),onClick:It(Ct=>ee(Ue),["stop"])},[P.value!==Ue.id?(b(),de(h(Ce),{key:0,name:"copy",size:"sm"})):(b(),de(h(Ce),{key:1,name:"check",size:"sm"}))],8,iLe)):te("",!0)]),_:2},1032,["text"]),Ue.createdAt?(b(),de(C2,{key:1,time:Ue.createdAt},null,8,["time"])):te("",!0)])):te("",!0)])):Ue.role==="compaction"?(b(),M("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":Ue.id,role:"separator"},[st[5]||(st[5]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1)),Ue.text?(b(),M("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:Ct=>m("openCompaction",{turnId:Ue.id})},[C("span",null,B(O(Ue)),1),C("span",rLe,B(h(i)("conversation.viewSummary")),1)],8,oLe)):(b(),M("span",lLe,B(O(Ue)),1)),st[6]||(st[6]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,sLe)):Ue.role==="cron"?(b(),de(IIe,{key:2,text:Ue.text,cron:Ue.cron,"turn-id":Ue.id,"created-at":Ue.createdAt},null,8,["text","cron","turn-id","created-at"])):(b(),M("div",{key:3,class:"a-msg turn-anchor","data-turn-id":Ue.id},[Ue.goalContinuation?(b(),M("div",uLe,[V(h(Ce),{name:"target",size:"sm","aria-hidden":"true"}),C("span",null,B(h(i)("conversation.goal.continuation")),1)])):te("",!0),kn(Ue).folded.length>0?(b(),de(eIe,{key:1,items:kn(Ue).folded,mobile:"","streaming-tail-index":_n(Ue),live:Ue.id===u.value,parked:Ue.id===u.value&&_n(Ue)===null,"seed-ms":h(Kbe)(h(ba)(Ue)),"created-ms":h(NS)(Ue.createdAt),"ended-ms":h(NS)(Ue.endedAt),"duration-ms":Ue.durationMs,onOpenMedia:w,onOpenFile:y,onOpenAgent:k},null,8,["items","streaming-tail-index","live","parked","seed-ms","created-ms","ended-ms","duration-ms"])):te("",!0),(b(!0),M(Be,null,yt(kn(Ue).visible,(Ct,Fn)=>(b(),M(Be,{key:h(f$)(Ct,Fn)},[Ct.kind==="thinking"?(b(),de(mk,{key:0,text:Ct.thinking,mobile:"",streaming:bn(Ue,Ct),"started-at":Ct.startedAt,"duration-ms":Ct.durationMs},null,8,["text","streaming","started-at","duration-ms"])):Ct.kind==="text"&&Ct.text?(b(),M("div",cLe,[V(h(ql),{text:Ct.text,streaming:bn(Ue,Ct),"open-file":y},null,8,["text","streaming"])])):Ct.kind==="activity-run"?(b(),de(oD,{key:2,items:Ct.items,mobile:"",streaming:Gt(Ue,Ct),onOpenMedia:w,onOpenFile:y,onOpenAgent:k},null,8,["items","streaming"])):Ct.kind==="tool"?(b(),de(gk,{key:3,tool:Ct.tool,mobile:"",onOpenMedia:w,onOpenFile:y,onOpenAgent:k},null,8,["tool"])):Ct.kind==="notification"?(b(),de(rD,{key:4,items:Ct.items},null,8,["items"])):te("",!0)],64))),128)),c.value.get(Ue.id)?(b(),de(gIe,{key:2,changes:c.value.get(Ue.id),cwd:o.cwd,interactive:e.turnFilesInteractive,onOpenDiff:A,onOpenFile:y},null,8,["changes","cwd","interactive"])):te("",!0),Ue.id!==u.value&&fe(Ft)&&(ue(Ft).trim().length>0||R(Ue))?(b(),M("div",dLe,[R(Ue)?(b(),M("span",fLe,B(R(Ue)),1)):te("",!0),V(h(mn),{text:h(i)("filePreview.copy")},{default:he(()=>[ue(Ft).trim().length>0?(b(),M("button",{key:0,class:"a-cpbtn","aria-label":h(i)("filePreview.copy"),onClick:Ct=>Ne(Ft)},[P.value!==Ue.id?(b(),de(h(Ce),{key:0,name:"copy",size:"sm"})):(b(),de(h(Ce),{key:1,name:"check",size:"sm"}))],8,hLe)):te("",!0)]),_:2},1032,["text"])])):te("",!0)],8,aLe)),Ue.role==="assistant"&&Ue.id===e.interruptedTurnId?(b(),M("div",pLe,[st[7]||(st[7]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1)),C("span",gLe,B(h(i)("conversation.turnInterrupted")),1),st[8]||(st[8]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1))])):te("",!0)],64))),128)),e.turnFailed?(b(),M("div",mLe,[C("span",vLe,[V(h(Ce),{name:"alert-triangle",size:"sm"})]),C("div",yLe,[C("span",bLe,B(p.value),1),e.turnError?.message?(b(),M("span",{key:0,class:"tf-sub",title:e.turnError.message},B(e.turnError.message),9,kLe)):te("",!0),g.value?(b(),M("span",{key:1,class:"tf-meta",title:g.value},B(g.value),9,ALe)):te("",!0)]),e.readOnly?te("",!0):(b(),de(h(Ht),{key:0,variant:"secondary",size:"sm",onClick:st[1]||(st[1]=Ue=>m("resumeTurn"))},{default:he(()=>[qe(B(h(i)("conversation.turnFailedResume")),1)]),_:1}))])):te("",!0),e.compaction?(b(),de(kIe,{key:4,label:h(i)("conversation.compacting")},null,8,["label"])):te("",!0),d.value?(b(),M("div",CLe,[V(BD,{label:f.value},null,8,["label"])])):te("",!0),e.queued.length>0?(b(),M("div",wLe,[C("div",xLe,[C("span",_Le,[V(h(Ce),{name:"mail",size:"sm"}),qe(" "+B(h(i)("composer.queueLabel"))+" · ",1),C("b",null,B(e.queued.length),1)]),C("span",SLe,B(h(i)("composer.queueAutoDrain")),1)]),(b(!0),M(Be,null,yt(e.queued,(Ue,Ft)=>(b(),M("div",{key:Ue.id,class:$e(["u-turn q-turn",{"q-dragging":v.value===Ft,"drop-before":x.value?.index===Ft&&x.value.position==="before","drop-after":x.value?.index===Ft&&x.value.position==="after"}]),onDragover:Ct=>E(Ft,Ct),onDrop:Ct=>N(Ft,Ct)},[C("div",ILe,[C("span",{class:"q-grip",title:h(i)("composer.queueDragTitle"),draggable:"true",onDragstart:Ct=>_(Ft,Ct),onDragend:D},[V(h(Ce),{name:"grip",size:"sm"})],40,ELe),C("div",{class:$e(["q-clamp u-text-wrap",{"is-clamped":Pe(ce(Ue))}])},[C("button",{type:"button",class:"q-body",title:h(i)("composer.editQueued"),ref_for:!0,ref:Ct=>J(ce(Ue),Ct),onClick:Ct=>I(Ft)},[Ue.text?(b(),M("span",LLe,B(Ue.text),1)):(b(),M("span",NLe,[V(h(Ce),{name:"file",size:"sm"}),qe(" "+B(h(i)("composer.queuedAttachments",{n:Ue.attachments?.length??0})),1)]))],8,TLe),ye.has(ce(Ue))?(b(),M("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!Pe(ce(Ue)),onClick:Ct=>ke(ce(Ue),Ct)},[C("span",null,B(Pe(ce(Ue))?h(i)("conversation.userMessage.expand"):h(i)("conversation.userMessage.collapse")),1),V(h(Ce),{class:"u-text-toggle-car",name:"chevron-down",size:"sm","aria-hidden":"true"})],8,FLe)):te("",!0)],2),S(Ue)?(b(),M("div",BLe,[(b(!0),M(Be,null,yt(Ue.attachments,(Ct,Fn)=>(b(),M(Be,{key:Fn},[Ct.kind==="file"?(b(),M("span",$Le,[V(h(Ce),{name:"file",size:"sm"}),qe(" "+B(Ct.name??Ct.fileId),1)])):(b(),de(zp,{key:1,url:Ct.url,kind:Ct.kind,"file-id":Ct.fileId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id"]))],64))),128))])):te("",!0),Ft===0?(b(),M("span",DLe,B(h(i)("composer.queueNext")),1)):(b(),M("span",zLe,"#"+B(Ft+1),1)),V(h(mn),{text:h(i)("composer.remove")},{default:he(()=>[C("button",{type:"button",class:"q-rm","aria-label":h(i)("composer.remove"),onClick:It(Ct=>m("unqueue",Ft),["stop"])},[V(h(Ce),{name:"close",size:"sm"})],8,RLe)]),_:2},1032,["text"])])],42,MLe))),128))])):te("",!0)]),Ke.value!==null?(b(),M("div",OLe,B(h(i)("composer.attachmentOpenUnsupported",{name:Ke.value})),1)):te("",!0),lt.value?(b(),de(bk,{key:1,media:lt.value,"origin-img":ft.value,onClose:st[2]||(st[2]=Ue=>{lt.value=null,ft.value=null})},null,8,["media","origin-img"])):te("",!0)],64))}}),kk=vt(HLe,[["__scopeId","data-v-2304fd80"]]),WLe={class:"ch-id"},qLe=["title"],ULe={key:1,class:"ch-ws"},KLe={key:2,class:"ch-sep"},VLe=["onKeydown"],ZLe={class:"ch-ses"},GLe={key:0,class:"ch-pill ch-sync-pill"},QLe={key:0,class:"ch-ahead"},YLe={key:1,class:"ch-behind"},JLe={key:1,class:"ch-pill ch-diff-pill"},XLe={key:0,class:"ch-add"},eNe={key:1,class:"ch-del"},tNe=nt({__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}=Bt(),i=e,s=t,o=F(()=>i.ahead??0),r=F(()=>i.behind??0),l=F(()=>i.gitDiffStats?.totalAdditions??0),a=F(()=>i.gitDiffStats?.totalDeletions??0),u=F(()=>l.value>0||a.value>0),c={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function d(X){return X.trim().toLowerCase().replaceAll("_","-")}function f(X){const ue=d(X);return c[ue]?`pr-${ue}`:"pr-unknown"}function p(X){return n(c[d(X)]??"header.prStatusUnknown")}const g=G(!1),m=G(null),y=G(null),w=G({});function k(X){const ue=X.target;y.value?.el?.contains(ue)||m.value?.el?.contains(ue)||x()}function A(){x()}async function v(X){if(X.stopPropagation(),g.value){x();return}g.value=!0,document.addEventListener("mousedown",k),window.addEventListener("resize",A),await At();const ue=m.value?.el,ie=y.value?.el;if(!ue||!ie)return;const Se=ue.getBoundingClientRect(),fe=4,pe=8,Ne=ie.offsetWidth,ee=ie.offsetHeight;let ye=Se.bottom+fe,H=!1;ye+ee>window.innerHeight-pe&&(ye=Math.max(pe,Se.top-ee-fe),H=!0);let Y=Se.left,ve=!1;Y+Ne>window.innerWidth-pe&&(Y=Math.max(pe,Se.right-Ne),ve=!0),w.value={top:`${Math.round(ye)}px`,left:`${Math.round(Y)}px`,transformOrigin:`${H?"bottom":"top"} ${ve?"right":"left"}`,"--menu-pop-shift":H?"2px":"-2px"}}function x(){g.value=!1,document.removeEventListener("mousedown",k),window.removeEventListener("resize",A)}Cn(()=>{document.removeEventListener("mousedown",k),window.removeEventListener("resize",A)});function S(){s("copyAll"),x()}function I(){s("copyFinalSummary"),x()}const _=G(!1);function E(){i.sessionId&&no(i.sessionId).then(X=>{X&&(_.value=!0,setTimeout(()=>{_.value=!1},1200))})}const N=G(!1),D=G(""),T=G(null),{handleCompositionStart:$,handleCompositionEnd:O,isComposingKeyEvent:P}=qr();async function R(){if(x(),!!i.sessionId){N.value=!0,D.value=i.sessionTitle??"",await At();try{T.value?.focus(),T.value?.select()}catch{}}}function j(){const X=D.value.trim();X&&i.sessionId&&X!==(i.sessionTitle??"").trim()&&s("renameSession",i.sessionId,X),N.value=!1}function z(X){P(X)||j()}function K(){N.value=!1}function q(){i.sessionId&&(x(),s("forkSession",i.sessionId))}function W(){i.sessionId&&(x(),s("exportSession",i.sessionId))}function Z(){i.sessionId&&(x(),s("archiveSession",i.sessionId))}const ne=!1;return(X,ue)=>(b(),M("header",{class:$e(["chat-header",{"macos-desktop":h($c)}])},[C("div",WLe,[h(ne)?(b(),M("span",{key:0,class:"ch-dev",title:h(n)("header.devBadge")},"DEV",8,qLe)):te("",!0),e.workspaceName?(b(),M("span",ULe,B(e.workspaceName),1)):te("",!0),e.workspaceName&&e.sessionTitle?(b(),M("span",KLe,"/")):te("",!0),N.value?Nn((b(),M("input",{key:3,ref_key:"renameInputRef",ref:T,"onUpdate:modelValue":ue[0]||(ue[0]=ie=>D.value=ie),class:"ch-rename",type:"text",onKeydown:[Hr(It(z,["stop"]),["enter"]),Hr(It(K,["stop"]),["esc"])],onCompositionstart:ue[1]||(ue[1]=(...ie)=>h($)&&h($)(...ie)),onCompositionend:ue[2]||(ue[2]=(...ie)=>h(O)&&h(O)(...ie)),onBlur:j,onClick:ue[3]||(ue[3]=It(()=>{},["stop"]))},null,40,VLe)),[[Ao,D.value]]):e.sessionTitle?(b(),de(h(mn),{key:4,text:e.sessionTitle},{default:he(()=>[C("span",ZLe,B(e.sessionTitle),1)]),_:1},8,["text"])):te("",!0)]),V(h(rn),{ref_key:"kebabRef",ref:m,class:$e(["ch-act-more",{open:g.value}]),label:h(n)("header.options"),tooltip:h(n)("header.options"),"aria-expanded":g.value,"aria-haspopup":"menu",onClick:ue[4]||(ue[4]=It(ie=>v(ie),["stop"]))},{default:he(()=>[V(h(Ce),{name:"dots-horizontal",size:"sm"})]),_:1},8,["class","label","tooltip","aria-expanded"]),V(gs,{name:"menu-pop"},{default:he(()=>[g.value?(b(),de(h(al),{key:0,ref_key:"menuRef",ref:y,class:"ch-menu",style:Vt(w.value),onClick:ue[5]||(ue[5]=It(()=>{},["stop"]))},{default:he(()=>[V(h(yn),{onClick:S},{default:he(()=>[V(h(Ce),{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),qe(" "+B(e.copied?h(n)("header.copied"):h(n)("header.copyAll")),1)]),_:1}),V(h(yn),{onClick:I},{default:he(()=>[V(h(Ce),{name:"file-text",size:"sm"}),qe(" "+B(h(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(b(),M(Be,{key:0},[V(h(yn),{separator:""}),V(h(yn),{onClick:E},{default:he(()=>[V(h(Ce),{name:_.value?"check":"copy",size:"sm"},null,8,["name"]),qe(" "+B(_.value?h(n)("header.copied"):h(n)("header.copySessionId")),1)]),_:1}),V(h(yn),{onClick:R},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),qe(" "+B(h(n)("header.renameSession")),1)]),_:1}),V(h(yn),{onClick:q},{default:he(()=>[V(h(Ce),{name:"git-fork",size:"sm"}),qe(" "+B(h(n)("header.forkSession")),1)]),_:1}),V(h(yn),{onClick:W},{default:he(()=>[V(h(Ce),{name:"download",size:"sm"}),qe(" "+B(h(n)("header.exportSession")),1)]),_:1}),V(h(yn),{onClick:Z},{default:he(()=>[V(h(Ce),{name:"archive",size:"sm"}),qe(" "+B(h(n)("header.archiveSession")),1)]),_:1})],64)):te("",!0)]),_:1},8,["style"])):te("",!0)]),_:1}),ue[8]||(ue[8]=C("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(b(),M("button",{key:0,type:"button",class:"ch-git",onClick:ue[6]||(ue[6]=ie=>s("openChanges"))},[V(h(Ce),{class:"ch-branch-icon",name:"git-fork",size:"sm"}),C("span",{class:$e(["ch-branch",{"ch-detached":!e.branch}])},B(e.branch||h(n)("header.detached")),3),o.value>0||r.value>0?(b(),M("span",GLe,[o.value>0?(b(),M("span",QLe,"↑"+B(o.value),1)):te("",!0),r.value>0?(b(),M("span",YLe,"↓"+B(r.value),1)):te("",!0)])):te("",!0),u.value?(b(),M("span",JLe,[l.value>0?(b(),M("span",XLe,"+"+B(l.value),1)):te("",!0),a.value>0?(b(),M("span",eNe,"-"+B(a.value),1)):te("",!0)])):te("",!0)])):te("",!0),e.pr?(b(),M("button",{key:1,type:"button",class:$e(["ch-pill ch-pr",f(e.pr.state)]),onClick:ue[7]||(ue[7]=ie=>e.pr&&s("openPr",e.pr.url))},[V(h(Ce),{name:"git-pull-request",size:"sm"}),C("span",null,"PR #"+B(e.pr.number)+" · "+B(p(e.pr.state)),1)],2)):te("",!0)],2))}}),nNe=vt(tNe,[["__scopeId","data-v-cac58d83"]]),iNe=["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"],aM=[[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 sNe(e){if(e<=255)return iNe[e];let t=0,n=aM.length-1;for(;t<=n;){const i=t+n>>1,s=aM[i];if(e<s[0]){n=i-1;continue}if(e>s[1]){t=i+1;continue}return s[2]}return"L"}function oNe(e){const t=e.length;if(t===0)return null;const n=new Array(t);let i=!1;for(let u=0;u<t;){const c=e.charCodeAt(u);let d=c,f=1;if(c>=55296&&c<=56319&&u+1<t){const g=e.charCodeAt(u+1);g>=56320&&g<=57343&&(d=(c-55296<<10)+(g-56320)+65536,f=2)}const p=sNe(d);(p==="R"||p==="AL"||p==="AN")&&(i=!0);for(let g=0;g<f;g++)n[u+g]=p;u+=f}if(!i)return null;let s=0;for(let u=0;u<t;u++){const c=n[u];if(c==="L"){s=0;break}if(c==="R"||c==="AL"){s=1;break}}const o=new Int8Array(t);for(let u=0;u<t;u++)o[u]=s;const r=s&1?"R":"L",l=r;let a=l;for(let u=0;u<t;u++)n[u]==="NSM"?n[u]=a:a=n[u];a=l;for(let u=0;u<t;u++){const c=n[u];c==="EN"?n[u]=a==="AL"?"AN":"EN":(c==="R"||c==="L"||c==="AL")&&(a=c)}for(let u=0;u<t;u++)n[u]==="AL"&&(n[u]="R");for(let u=1;u<t-1;u++)n[u]==="ES"&&n[u-1]==="EN"&&n[u+1]==="EN"&&(n[u]="EN"),n[u]==="CS"&&(n[u-1]==="EN"||n[u-1]==="AN")&&n[u+1]===n[u-1]&&(n[u]=n[u-1]);for(let u=0;u<t;u++){if(n[u]!=="EN")continue;let c;for(c=u-1;c>=0&&n[c]==="ET";c--)n[c]="EN";for(c=u+1;c<t&&n[c]==="ET";c++)n[c]="EN"}for(let u=0;u<t;u++){const c=n[u];(c==="WS"||c==="ES"||c==="ET"||c==="CS")&&(n[u]="ON")}a=l;for(let u=0;u<t;u++){const c=n[u];c==="EN"?n[u]=a==="L"?"L":"EN":(c==="R"||c==="L")&&(a=c)}for(let u=0;u<t;u++){if(n[u]!=="ON")continue;let c=u+1;for(;c<t&&n[c]==="ON";)c++;const d=u>0?n[u-1]:l,f=c<t?n[c]:l,p=d!=="L"?"R":"L";if(p===(f!=="L"?"R":"L"))for(let m=u;m<c;m++)n[m]=p;u=c-1}for(let u=0;u<t;u++)n[u]==="ON"&&(n[u]=r);for(let u=0;u<t;u++){const c=n[u];(o[u]&1)===0?c==="R"?o[u]++:(c==="AN"||c==="EN")&&(o[u]+=2):(c==="L"||c==="AN"||c==="EN")&&o[u]++}return o}function rNe(e,t){const n=oNe(e);if(n===null)return null;const i=new Int8Array(t.length);for(let s=0;s<t.length;s++)i[s]=n[t[s]];return i}const lNe=/[ \t\n\r\f]+/g,aNe=/[\t\n\r\f]| {2,}|^ | $/;function uNe(e){const t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function cNe(e){if(!aNe.test(e))return e;let t=e.replace(lNe," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function dNe(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` -`).replace(/[\r\f]/g,` -`):e}let b4=null,fNe;function hNe(){return b4===null&&(b4=new Intl.Segmenter(fNe,{granularity:"word"})),b4}const pNe=/\p{Script=Arabic}/u,qu=/\p{M}/u,Ak=/\p{Nd}/u;function uM(e){return pNe.test(e)}function cM(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 Ul(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){const i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){const s=(n-55296<<10)+(i-56320)+65536;if(cM(s))return!0;t++;continue}}if(cM(n))return!0}}return!1}function gNe(e){const t=Op(e);return t!==null&&(Ck.has(t)||td.has(t))}const mNe=new Set([" "," ","⁠","\uFEFF"]),vNe=new Set(["-","‐","–","—"]);function yNe(e){const t=Op(e);return t!==null&&mNe.has(t)}function bNe(e){const t=Op(e);return t!==null&&vNe.has(t)}function $D(e,t){return yNe(e)?!1:t?!(gNe(e)||bNe(e)):!0}const Ck=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Fv=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),wk=new Set(["'","’"]),td=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),kNe=new Set([":",".","،","؛"]),ANe=new Set(["၏"]),CNe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function wNe(e){if(xk(e))return!0;let t=!1;for(const n of e){if(td.has(n)||$v(n)){t=!0;continue}if(!(t&&qu.test(n)))return!1}return t}function xNe(e){for(const t of e)if(!Ck.has(t)&&!td.has(t))return!1;return e.length>0}function _Ne(e){if(xk(e))return!0;for(const t of e)if(!Fv.has(t)&&!wk.has(t)&&!qu.test(t)&&!$v(t))return!1;return e.length>0}function xk(e){let t=!1;for(const n of e)if(!(n==="\\"||qu.test(n))){if(Fv.has(n)||td.has(n)||wk.has(n)){t=!0;continue}return!1}return t}function Bv(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const i=e.charCodeAt(n);if(i<56320||i>57343)return n;const s=n-1;if(s<0)return n;const o=e.charCodeAt(s);return o>=55296&&o<=56319?s:n}function Op(e){if(e.length===0)return null;const t=Bv(e,e.length);return e.slice(t)}function SNe(e){for(const t of e)if(!qu.test(t))return t;return null}function MNe(e){for(let t=e.length;t>0;){const n=Bv(e,t),i=e.slice(n,t);if(!qu.test(i))return i;t=n}return null}const INe=[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 ENe(e,t){for(let n=0;n<t.length;n+=2)if(e>=t[n]&&e<=t[n+1])return!0;return!1}function $v(e){const t=e.codePointAt(0);return t!==void 0&&ENe(t,INe)}function TNe(e){const t=MNe(e);return t!==null&&$v(t)}function LNe(e){const t=SNe(e);return t!==null&&Ak.test(t)}function NNe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const i=t[n-1];if(qu.test(i)){n--;continue}if(Fv.has(i)||wk.has(i)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function FNe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function dM(e,t,n,i){const s=t[i],o=e[i];if(s==null)return o;const r=n[i];if(o.length===r)return o;const l=s.repeat(r);return e[i]=l,l}function fM(e,t){return e&&t!==null&&kNe.has(t)}function BNe(e){const t=Op(e);return t!==null&&ANe.has(t)}function $Ne(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 R8(e){let t=e.length;for(;t>0;){const n=Bv(e,t),i=e.slice(n,t);if(CNe.has(i))return!0;if(!td.has(i))return!1;t=n}return!1}function DNe(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 zNe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function ul(e){return e.length===1?e[0]:e.join("")}function RNe(e,t){const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),ul(n)}function ONe(e,t,n,i){if(!zNe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let o=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=DNe(c,i),f=d==="text"&&t;if(o!==null&&d===o&&f===a){r.push(c),u+=c.length;continue}o!==null&&s.push({text:ul(r),isWordLike:a,kind:o,start:l}),o=d,r=[c],l=n+u,a=f,u+=c.length}return o!==null&&s.push({text:ul(r),isWordLike:a,kind:o,start:l}),s}function O8(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const PNe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function jNe(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:PNe.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function HNe(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function WNe(e){const t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),s=e.starts.slice();for(let r=0;r<e.len;r++){if(i[r]!=="text"||!jNe(e,r))continue;const l=[t[r]];let a=r+1;for(;a<e.len&&!O8(i[a]);){l.push(t[a]),n[r]=!0;const u=t[a].includes("?");if(i[a]="text",t[a]="",a++,u)break}t[r]=ul(l)}let o=0;for(let r=0;r<t.length;r++){const l=t[r];l.length!==0&&(o!==r&&(t[o]=l,n[o]=n[r],i[o]=i[r],s[o]=s[r]),o++)}return t.length=o,n.length=o,i.length=o,s.length=o,{len:o,texts:t,isWordLike:n,kinds:i,starts:s}}function qNe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o];if(t.push(r),n.push(e.isWordLike[o]),i.push(e.kinds[o]),s.push(e.starts[o]),!HNe(r))continue;const l=o+1;if(l>=e.len||O8(e.kinds[l]))continue;const a=[],u=e.starts[l];let c=l;for(;c<e.len&&!O8(e.kinds[c]);)a.push(e.texts[c]),c++;a.length>0&&(t.push(ul(a)),n.push(!0),i.push("text"),s.push(u),o=c-1)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}const UNe=new Set([":","-","/","×",",",".","+","–","—"]),KNe=/[\p{P}\p{S}\p{Co}]/u,VNe=/\p{Emoji_Presentation}/u,ZNe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function GNe(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function DD(e){const t=e.charCodeAt(0);return t<128?GNe(t):!ZNe.has(e)&&!VNe.test(e)&&KNe.test(e)}function hM(e){let t=!1;for(const n of e)if(!qu.test(n)){if(!DD(n))return!1;t=!0}return t}function QNe(e){for(let t=e.length;t>0;){const n=Bv(e,t),i=e.slice(n,t);if(qu.test(i)){t=n;continue}return DD(i)||$v(i)}return!1}function YNe(e,t,n,i){const s=!t&&hM(e),o=!i&&hM(n),r=TNe(e),l=(t||r)&&QNe(e);return!s&&!o&&!l||Ul(e)||Ul(n)?!1:(t||s||r)&&(i||o)}function zD(e){for(const t of e)if(Ak.test(t))return!0;return!1}function I2(e){if(e.length===0)return!1;for(const t of e)if(!(Ak.test(t)||UNe.has(t)))return!1;return!0}function JNe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o],l=e.kinds[o];if(l==="text"&&I2(r)&&zD(r)){const a=[r];let u=o+1;for(;u<e.len&&e.kinds[u]==="text"&&I2(e.texts[u]);)a.push(e.texts[u]),u++;t.push(ul(a)),n.push(!0),i.push("text"),s.push(e.starts[o]),o=u-1;continue}t.push(r),n.push(e.isWordLike[o]),i.push(l),s.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function XNe(e){const t=[],n=[],i=[],s=[];let o=0;for(;o<e.len;){const r=e.texts[o],l=e.kinds[o],a=e.isWordLike[o];if(l==="text"){const u=[r];let c=o+1,d=a;for(;c<e.len&&e.kinds[c]==="text"&&YNe(e.texts[c-1],e.isWordLike[c-1],e.texts[c],e.isWordLike[c]);){const f=e.texts[c];u.push(f),d=d||e.isWordLike[c],c++}if(c>o+1){t.push(ul(u)),n.push(d),i.push("text"),s.push(e.starts[o]),o=c;continue}}t.push(r),n.push(a),i.push(l),s.push(e.starts[o]),o++}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function eFe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o];if(e.kinds[o]==="text"&&r.includes("-")){const l=r.split("-");let a=l.length>1;for(let u=0;u<l.length;u++){const c=l[u];if(!a)break;(c.length===0||!zD(c)||!I2(c))&&(a=!1)}if(a){let u=0;for(let c=0;c<l.length;c++){const d=l[c],f=c<l.length-1?`${d}-`:d;t.push(f),n.push(!0),i.push("text"),s.push(e.starts[o]+u),u+=f.length}continue}}t.push(r),n.push(e.isWordLike[o]),i.push(e.kinds[o]),s.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function tFe(e){const t=[],n=[],i=[],s=[];let o=0;for(;o<e.len;){const r=[e.texts[o]];let l=e.isWordLike[o],a=e.kinds[o],u=e.starts[o];if(a==="glue"){const c=[r[0]],d=u;for(o++;o<e.len&&e.kinds[o]==="glue";)c.push(e.texts[o]),o++;const f=ul(c);if(o<e.len&&e.kinds[o]==="text")r[0]=f,r.push(e.texts[o]),l=e.isWordLike[o],a="text",u=d,o++;else{t.push(f),n.push(!1),i.push("glue"),s.push(d);continue}}else o++;if(a==="text")for(;o<e.len&&e.kinds[o]==="glue";){const c=[];for(;o<e.len&&e.kinds[o]==="glue";)c.push(e.texts[o]),o++;const d=ul(c);if(o<e.len&&e.kinds[o]==="text"){r.push(d,e.texts[o]),l=l||e.isWordLike[o],o++;continue}r.push(d)}t.push(ul(r)),n.push(l),i.push(a),s.push(u)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function nFe(e){const t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),s=e.starts.slice();for(let o=0;o<t.length-1;o++){if(i[o]!=="text"||i[o+1]!=="text"||!Ul(t[o])||!Ul(t[o+1]))continue;const r=NNe(t[o]);r!==null&&(t[o]=r.head,t[o+1]=r.tail+t[o+1],s[o+1]=s[o]+r.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function iFe(e,t,n){const i=hNe();let s=0;const o=[],r=[],l=[],a=[],u=[],c=[],d=[],f=[],p=[],g=[],m=[],y=[];for(const S of i.segment(e))for(const I of ONe(S.segment,S.isWordLike??!1,S.index,n)){let R=function(){c[P]!==null&&(r[P]=[dM(o,c,d,P)],c[P]=null),r[P].push(I.text),l[P]=l[P]||I.isWordLike,f[P]=f[P]||N,p[P]=p[P]||D,g[P]=$,m[P]=O,y[P]=fM(p[P],T)};const _=I.kind==="text",E=FNe(I.text,I.isWordLike,I.kind),N=Ul(I.text),D=uM(I.text),T=Op(I.text),$=R8(I.text),O=BNe(I.text),P=s-1;t.carryCJKAfterClosingQuote&&_&&s>0&&a[P]==="text"&&N&&f[P]&&g[P]||_&&s>0&&a[P]==="text"&&xNe(I.text)&&f[P]||_&&s>0&&a[P]==="text"&&m[P]?R():_&&s>0&&a[P]==="text"&&I.isWordLike&&D&&y[P]?(R(),l[P]=!0):E!==null&&s>0&&a[P]==="text"&&c[P]===E?d[P]=(d[P]??1)+1:_&&!I.isWordLike&&s>0&&a[P]==="text"&&!f[P]&&(wNe(I.text)||I.text==="-"&&l[P])?R():(o[s]=I.text,r[s]=[I.text],l[s]=I.isWordLike,a[s]=I.kind,u[s]=I.start,c[s]=E,d[s]=E===null?0:1,f[s]=N,p[s]=D,g[s]=$,m[s]=O,y[s]=fM(D,T),s++)}for(let S=0;S<s;S++){if(c[S]!==null){o[S]=dM(o,c,d,S);continue}o[S]=ul(r[S])}for(let S=1;S<s;S++)a[S]==="text"&&!l[S]&&xk(o[S])&&a[S-1]==="text"&&!f[S-1]&&(o[S-1]+=o[S],l[S-1]=l[S-1]||l[S],o[S]="");const w=Array.from({length:s},()=>null);let k=-1;for(let S=s-1;S>=0;S--){const I=o[S];if(I.length!==0){if(a[S]==="text"&&!l[S]&&k>=0&&a[k]==="text"&&(_Ne(I)||I==="-"&&LNe(o[k]))){const _=w[k]??[];_.push(I),w[k]=_,u[k]=u[S],o[S]="";continue}k=S}}for(let S=0;S<s;S++){const I=w[S];I!=null&&(o[S]=RNe(I,o[S]))}let A=0;for(let S=0;S<s;S++){const I=o[S];I.length!==0&&(A!==S&&(o[A]=I,l[A]=l[S],a[A]=a[S],u[A]=u[S]),A++)}o.length=A,l.length=A,a.length=A,u.length=A;const v=tFe({len:A,texts:o,isWordLike:l,kinds:a,starts:u}),x=nFe(XNe(eFe(JNe(qNe(WNe(v))))));for(let S=0;S<x.len-1;S++){const I=$Ne(x.texts[S]);I!==null&&(x.kinds[S]!=="space"&&x.kinds[S]!=="preserved-space"||x.kinds[S+1]!=="text"||!uM(x.texts[S+1])||(x.texts[S]=I.space,x.isWordLike[S]=!1,x.kinds[S]=x.kinds[S]==="preserved-space"?"preserved-space":"space",x.texts[S+1]=I.marks+x.texts[S+1],x.starts[S+1]=x.starts[S]+I.space.length))}return x}function sFe(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let i=0;for(let s=0;s<e.len;s++)e.kinds[s]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:s,consumedEndSegmentIndex:s+1}),i=s+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function oFe(e,t,n){if(t.len<=1)return t;const i=[],s=[],o=[],r=[];let l=-1,a=!1;function u(f){i.push(t.texts[f]),s.push(t.isWordLike[f]),o.push("text"),r.push(t.starts[f])}function c(f,p){let g=!1;for(let w=f;w<p;w++)g=g||t.isWordLike[w];const m=t.starts[f],y=p<t.len?t.starts[p]:e.length;i.push(e.slice(m,y)),s.push(g),o.push("text"),r.push(m)}function d(f){if(!(l<0)){if(a)l+1===f?u(l):c(l,f);else for(let p=l;p<f;p++)u(p);l=-1,a=!1}}for(let f=0;f<t.len;f++){const p=t.texts[f],g=t.kinds[f];if(g==="text"){l>=0&&!$D(t.texts[f-1],n)&&d(f),l<0&&(l=f),a=a||Ul(p);continue}d(f),i.push(p),s.push(t.isWordLike[f]),o.push(g),r.push(t.starts[f])}return d(t.len),{len:i.length,texts:i,isWordLike:s,kinds:o,starts:r}}function rFe(e,t,n="normal",i="normal"){const s=uNe(n),o=s.mode==="pre-wrap"?dNe(e):cNe(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=iFe(o,t,s),l=i==="keep-all"?oFe(o,r,t.breakKeepAllAfterPunctuation):r;return{normalized:o,chunks:sFe(l,s),...l}}let Bd=null;const pM=new Map;let $d=null;const lFe=96,aFe=/\p{Emoji_Presentation}/u,uFe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let k4=null;const gM=new Map;function _k(){if(Bd!==null)return Bd;if(typeof OffscreenCanvas<"u")return Bd=new OffscreenCanvas(1,1).getContext("2d"),Bd;if(typeof document<"u")return Bd=document.createElement("canvas").getContext("2d"),Bd;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function cFe(e){let t=pM.get(e);return t||(t=new Map,pM.set(e,t)),t}function cu(e,t){let n=t.get(e);return n===void 0&&(n={width:_k().measureText(e).width,containsCJK:Ul(e)},t.set(e,n)),n}function Dv(){if($d!==null)return $d;if(typeof navigator>"u")return $d={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},$d;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/"),i=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return $d={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:i,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},$d}function dFe(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function RD(){return k4===null&&(k4=new Intl.Segmenter(void 0,{granularity:"grapheme"})),k4}function fFe(e){return aFe.test(e)||e.includes("️")}function hFe(e){return uFe.test(e)}function pFe(e,t){let n=gM.get(e);if(n!==void 0)return n;const i=_k();i.font=e;const s=i.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const o=document.createElement("span");o.style.font=e,o.style.display="inline-block",o.style.visibility="hidden",o.style.position="absolute",o.textContent="😀",document.body.appendChild(o);const r=o.getBoundingClientRect().width;document.body.removeChild(o),s-r>.5&&(n=s-r)}return gM.set(e,n),n}function gFe(e){let t=0;const n=RD();for(const i of n.segment(e))fFe(i.segment)&&t++;return t}function mFe(e,t){return t.emojiCount===void 0&&(t.emojiCount=gFe(e)),t.emojiCount}function Lc(e,t,n){return n===0?t.width:t.width-mFe(e,t)*n}function vFe(e,t,n,i,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const o=RD(),r=[];for(const c of o.segment(e))r.push(c.segment);if(r.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const c=[];for(const d of r){const f=cu(d,n);c.push(Lc(d,f,i))}return t.breakableFitAdvances=c,t.breakableFitAdvances}if(s==="pair-context"||r.length>lFe){const c=[];let d=null,f=0;for(const p of r){const g=cu(p,n),m=Lc(p,g,i);if(d===null)c.push(m);else{const y=d+p,w=cu(y,n);c.push(Lc(y,w,i)-f)}d=p,f=m}return t.breakableFitAdvances=c,t.breakableFitAdvances}const l=[];let a="",u=0;for(const c of r){a+=c;const d=cu(a,n),f=Lc(a,d,i);l.push(f-u),u=f}return t.breakableFitAdvances=l,t.breakableFitAdvances}function yFe(e,t){const n=_k();n.font=e;const i=cFe(e),s=dFe(e),o=t?pFe(e,s):0;return{cache:i,fontSize:s,emojiCorrection:o}}function bFe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function OD(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function PD(e,t,n=e.widths.length){for(;t<n;){const i=e.kinds[t];if(!bFe(i))break;t++}return t}function kFe(e,t){if(t<=0)return 0;const n=e%t;return Math.abs(n)<=1e-6?t:t-n}function AFe(e,t,n){return e.letterSpacing!==0&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function Sk(e,t){return t===0?0:e+t}function CFe(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function wFe(e,t,n,i,s){const o=t==="tab"?s+CFe(e,n):e.lineEndFitAdvances[n];return Sk(i,o)}function mM(e,t,n,i){const s=t==="tab"?0:e.lineEndFitAdvances[n];return Sk(i,s)}function vM(e,t,n,i,s){const o=t==="tab"?s:e.lineEndPaintAdvances[n];return Sk(i,o)}function xFe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function _Fe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function E2(e,t,n){let i=t;for(;i<e.length&&e[i]<n;)i++;return i}function SFe(e,t,n,i,s){if(e.letterSpacing===0)return 0;if(s>0)return e.spacingGraphemeCounts[i]>0?e.letterSpacing:0;for(let o=i-1;o>=t;o--){const r=e.kinds[o];if(!(r==="space"||r==="zero-width-break"||r==="hard-break")){if(r==="soft-hyphen"){if(o===i-1)return 0;continue}return o===t&&n>0||e.spacingGraphemeCounts[o]>0?e.letterSpacing:0}}return 0}function MFe(e,t,n,i,s,o){return t+SFe(e,n,i,s,o)}function IFe(e,t,n){const{widths:i,kinds:s,breakableFitAdvances:o,breakablePreferredBreaks:r}=e;if(i.length===0)return 0;const a=Dv().lineFitEpsilon,u=t+a;let c=0,d=0,f=!1,p=0,g=0,m=0,y=0,w=-1,k=0;function A(){w=-1,k=0}function v(N=m,D=y,T=d){c++,n?.(T,p,g,N,D),d=0,f=!1,A()}function x(N,D){f=!0,p=N,g=0,m=N+1,y=0,d=D}function S(N,D,T){f=!0,p=N,g=D,m=N,y=D+1,d=T}function I(N,D){if(!f){x(N,D);return}d+=D,m=N+1,y=0}function _(N,D){const T=o[N],$=r[N]??null;let O=$===null?-1:E2($,0,D+1),P=-1,R=0,j=D;for(;j<T.length;){const z=T[j];if(!f)S(N,j,z);else if(d+z>u){if($!==null&&P>D){v(N,P,R),j=P,O=E2($,O,j+1),P=-1,R=0;continue}v(),S(N,j,z)}else d+=z,m=N,y=j+1;const K=j+1;$!==null&&$[O]===K&&(P=K,R=d,O++),j++}f&&m===N&&y===T.length&&(m=N+1,y=0)}let E=0;for(;E<i.length&&!(!f&&(E=PD(e,E),E>=i.length));){const N=i[E],D=s[E],T=OD(D);if(!f){N>u&&o[E]!==null?_(E,0):x(E,N),T&&(w=E+1,k=d-N),E++;continue}if(d+N>u){if(T){I(E,N),v(E+1,0,d-N),E++;continue}if(w>=0){if(m>w||m===w&&y>0){v();continue}v(w,0,k);continue}if(N>u&&o[E]!==null){v(),_(E,0),E++;continue}v();continue}I(E,N),T&&(w=E+1,k=d-N),E++}return f&&v(),c}function EFe(e,t,n){if(e.simpleLineWalkFastPath)return IFe(e,t,n);const{widths:i,kinds:s,breakableFitAdvances:o,breakablePreferredBreaks:r,discretionaryHyphenWidth:l,chunks:a}=e;if(i.length===0||a.length===0)return 0;const u=Dv(),c=u.lineFitEpsilon,d=t+c;let f=0,p=0,g=!1,m=0,y=0,w=0,k=0,A=-1,v=0,x=0,S=null;function I(){A=-1,v=0,x=0,S=null}function _(){return S==="soft-hyphen"&&A===w&&k===0?x:p}function E(R=w,j=k,z){f++,n!==void 0&&n(MFe(e,z??_(),m,y,R,j),m,y,R,j),p=0,g=!1,I()}function N(R,j){g=!0,m=R,y=0,w=R+1,k=0,p=j}function D(R,j,z){g=!0,m=R,y=j,w=R,k=j+1,p=z}function T(R,j){if(!g){N(R,j);return}p+=j,w=R+1,k=0}function $(R,j,z,K,q,W){if(!j)return;const Z=mM(e,R,z,q),ne=vM(e,R,z,q,K);A=z+1,v=p-W+Z,x=p-W+ne,S=R}function O(R,j){const z=o[R],K=r[R]??null;let q=K===null?-1:E2(K,0,j+1),W=-1,Z=0,ne=j;for(;ne<z.length;){const X=z[ne];if(!g)D(R,ne,X);else{const ie=xFe(e,!0,X),Se=p+ie;if(_Fe(e,Se)>d){if(K!==null&&W>j){E(R,W,Z),ne=W,q=E2(K,q,ne+1),W=-1,Z=0;continue}E(),D(R,ne,X)}else p=Se,w=R,k=ne+1}const ue=ne+1;K!==null&&K[q]===ue&&(W=ue,Z=p,q++),ne++}g&&w===R&&k===z.length&&(w=R+1,k=0)}function P(R){f++,n?.(0,R.startSegmentIndex,0,R.consumedEndSegmentIndex,0),I()}for(let R=0;R<a.length;R++){const j=a[R];if(j.startSegmentIndex===j.endSegmentIndex){P(j);continue}g=!1,p=0,m=j.startSegmentIndex,y=0,w=j.startSegmentIndex,k=0,I();let z=j.startSegmentIndex;for(;z<j.endSegmentIndex&&!(!g&&(z=PD(e,z,j.endSegmentIndex),z>=j.endSegmentIndex));){const K=s[z],q=OD(K),W=AFe(e,g,z),Z=K==="tab"?kFe(p+W,e.tabStopAdvance):i[z],ne=W+Z,X=wFe(e,K,z,W,Z);if(K==="soft-hyphen"){g&&(w=z+1,k=0,A=z+1,v=p+l,x=p+l,S=K),z++;continue}if(!g){X>d&&o[z]!==null?O(z,0):N(z,Z),$(K,q,z,Z,W,ne),z++;continue}if(p+X>d){const ie=p+mM(e,K,z,W),Se=p+vM(e,K,z,W,Z);if(S==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&v<=d){E(A,0,x);continue}if(q&&ie<=d){T(z,ne),E(z+1,0,Se),z++;continue}if(A>=0&&v<=d){if(w>A||w===A&&k>0){E();continue}const fe=A;E(fe,0,x),z=fe;continue}if(X>d&&o[z]!==null){E(),O(z,0),z++;continue}E();continue}T(z,ne),$(K,q,z,Z,W,ne),z++}if(g){const K=A===j.consumedEndSegmentIndex?x:p;E(j.consumedEndSegmentIndex,0,K)}}return f}let A4=null;function Mk(){return A4===null&&(A4=new Intl.Segmenter(void 0,{granularity:"grapheme"})),A4}function TFe(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function LFe(e,t){const n=[];let i=[],s=0,o=!1,r=!1,l=!1;function a(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:s}),i=[],o=!1,r=!1,l=!1)}function u(d,f,p){i=[d],s=f,o=p,r=R8(d),l=Fv.has(d)}function c(d,f){i.push(d),o=o||f;const p=R8(d);d.length===1&&td.has(d)?r=r||p:r=p,l=!1}for(const d of Mk().segment(e)){const f=d.segment,p=Ul(f);if(i.length===0){u(f,d.index,p);continue}if(l||Ck.has(f)||td.has(f)||t.carryCJKAfterClosingQuote&&p&&r){c(f,p);continue}if(!o&&!p){c(f,p);continue}a(),u(f,d.index,p)}return a(),n}function NFe(e,t,n){if(t.length<=1)return t;const i=[];let s=-1,o=!1;function r(a,u){const c=t[a].start,d=u<t.length?t[u].start:e.length;i.push({text:e.slice(c,d),start:c})}function l(a){if(!(s<0)){if(o)s+1===a?i.push(t[s]):r(s,a);else for(let u=s;u<a;u++)i.push(t[u]);s=-1,o=!1}}for(let a=0;a<t.length;a++){const u=t[a];s>=0&&!$D(t[a-1].text,n)&&l(a),s<0&&(s=a),o=o||Ul(u.text)}return l(t.length),i}function yM(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const i=Mk();for(const s of i.segment(e))n++;return n}function FFe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function BFe(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const i of Mk().segment(e))n++,FFe(i.segment)&&t.push(n);return t.length===0?null:t}function $Fe(e,t,n){return t>1?e+(t-1)*n:e}function DFe(e,t,n,i,s){const o=Dv(),{cache:r,emojiCorrection:l}=yFe(t,hFe(e.normalized)),a=Lc("-",cu("-",r),l)+(s===0?0:s*2),c=Lc(" ",cu(" ",r),l)*8,d=s!==0;if(e.len===0)return TFe();const f=[],p=[],g=[],m=[];let y=e.chunks.length<=1&&!d;const w=n?[]:null,k=[],A=[],v=[],x=n?[]:null,S=Array.from({length:e.len});function I(D,T,$,O,P,R,j,z,K){P!=="text"&&P!=="space"&&P!=="zero-width-break"&&(y=!1),f.push(T),p.push($),g.push(O),m.push(P),w?.push(R),k.push(j),A.push(z),d&&v.push(K),x!==null&&x.push(D)}function _(D,T,$,O,P){const R=cu(D,r),j=d?yM(D,T):0,z=$Fe(Lc(D,R,l),j,s),K=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:z,q=K===0?0:K+(j>0?s:0),W=T==="space"||T==="zero-width-break"?0:z;if(P&&O&&D.length>1){let Z="sum-graphemes";s!==0?Z="segment-prefixes":I2(D)?Z="pair-context":o.preferPrefixWidthsForBreakableRuns&&(Z="segment-prefixes");const ne=vFe(D,R,r,l,Z),X=ne===null||i==="keep-all"?null:BFe(D);I(D,z,q,W,T,$,ne,X,j);return}I(D,z,q,W,T,$,null,null,j)}for(let D=0;D<e.len;D++){S[D]=f.length;const T=e.texts[D],$=e.isWordLike[D],O=e.kinds[D],P=e.starts[D];if(O==="soft-hyphen"){I(T,0,a,a,O,P,null,null,0);continue}if(O==="hard-break"){I(T,0,0,0,O,P,null,null,0);continue}if(O==="tab"){I(T,0,0,0,O,P,null,null,d?yM(T,O):0);continue}const R=cu(T,r);if(O==="text"&&R.containsCJK){const j=LFe(T,o),z=i==="keep-all"?NFe(T,j,o.breakKeepAllAfterPunctuation):j;for(let K=0;K<z.length;K++){const q=z[K];_(q.text,"text",P+q.start,$,i==="keep-all"||!Ul(q.text))}continue}_(T,O,P,$,!0)}const E=zFe(e.chunks,S,f.length),N=w===null?null:rNe(e.normalized,w);return x!==null?{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:a,tabStopAdvance:c,chunks:E,segments:x}:{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:a,tabStopAdvance:c,chunks:E}}function zFe(e,t,n){const i=[];for(let s=0;s<e.length;s++){const o=e[s],r=o.startSegmentIndex<t.length?t[o.startSegmentIndex]:n,l=o.endSegmentIndex<t.length?t[o.endSegmentIndex]:n,a=o.consumedEndSegmentIndex<t.length?t[o.consumedEndSegmentIndex]:n;i.push({startSegmentIndex:r,endSegmentIndex:l,consumedEndSegmentIndex:a})}return i}function RFe(e,t,n,i){const s=i?.wordBreak??"normal",o=i?.letterSpacing??0,r=rFe(e,Dv(),i?.whiteSpace,s);return DFe(r,t,n,s,o)}function OFe(e,t,n){return RFe(e,t,!0,n)}function PFe(e){let t=0;return EFe(e,Number.POSITIVE_INFINITY,n=>{n>t&&(t=n)}),t}const jFe={class:"slash-menu","data-menu-frame":""},HFe={key:0,class:"slash-empty",role:"status"},WFe=["id","aria-selected","onMouseenter","onMousedown"],qFe={class:"slash-name"},UFe={key:0,class:"slash-match"},KFe={class:"slash-desc"},VFe={key:0,class:"slash-desc-match"},ZFe=nt({__name:"SlashMenu",props:{items:{},activeIndex:{},query:{default:""},ranges:{}},emits:["select","hover"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(A,v){if(!v||v.length===0)return[{text:A,hit:!1}];const x=[];let S=0;for(const[I,_]of[...v].sort((E,N)=>E[0]-N[0]))I>S&&x.push({text:A.slice(S,I),hit:!1}),x.push({text:A.slice(I,_),hit:!0}),S=_;return S<A.length&&x.push({text:A.slice(S),hit:!1}),x}function r(A){return A.isSkill?A.desc:n(A.desc)}const l=F(()=>i.items.map((A,v)=>{const x=r(A),S=i.ranges?.[v]??Sie(i.query,A.name,x);return{item:A,namePieces:o(A.name,S.name),desc:x,descPieces:o(x,S.desc)}})),a=G(null),u=G(!1),c=G(!1);let d=null;const f=G(null);function p(){const A=a.value;if(!A)return;u.value=A.scrollTop>0,c.value=A.scrollTop+A.clientHeight<A.scrollHeight-1;const{scrollTop:v,scrollHeight:x,clientHeight:S}=A;if(x<=S+1){f.value=null;return}const I=getComputedStyle(A),_=parseFloat(I.getPropertyValue("--menu-scrollbar-track-inset"))||0,E=parseFloat(I.getPropertyValue("--menu-scrollbar-thumb-min"))||24,N=S-_*2,D=Math.max(E,S/x*N),T=x-S,$=A.offsetTop+_+v/T*(N-D);f.value={top:$,height:D}}function g(){p()}let m=null;function y(A){const v=a.value,x=f.value;if(!v||!x)return;A.preventDefault(),m?.();const S=A.pointerId;A.target.setPointerCapture?.(A.pointerId);const I=getComputedStyle(v),_=parseFloat(I.getPropertyValue("--menu-scrollbar-track-inset"))||0,E=v.clientHeight-_*2-x.height,N=v.scrollHeight-v.clientHeight,D=A.clientY,T=v.scrollTop,$=R=>{R.pointerId!==S||E<=0||(v.scrollTop=T+(R.clientY-D)/E*N)},O=R=>{R.pointerId===S&&P()},P=()=>{window.removeEventListener("pointerup",O),window.removeEventListener("pointermove",$),window.removeEventListener("pointercancel",O),m===P&&(m=null)};m=P,window.addEventListener("pointermove",$),window.addEventListener("pointerup",O),window.addEventListener("pointercancel",O)}const w=F(()=>{const A=u.value,v=c.value,x="var(--menu-scroll-fade)";if(A&&v)return`linear-gradient(to bottom, transparent 0, black ${x}, black calc(100% - ${x}), transparent 100%)`;if(A)return`linear-gradient(to bottom, transparent, black ${x})`;if(v)return`linear-gradient(to top, transparent, black ${x})`});gn(()=>{p(),typeof ResizeObserver=="function"&&a.value&&(d=new ResizeObserver(p),d.observe(a.value))}),Cn(()=>{d?.disconnect(),d=null,m?.()});function k(){const A=a.value;if(!A)return;const v=A.querySelectorAll('[role="option"]')[i.activeIndex];if(!v)return;const x=A.getBoundingClientRect(),S=v.getBoundingClientRect(),I=S.top-x.top+A.scrollTop,_=I+S.height;I<A.scrollTop?A.scrollTop=I:_>A.scrollTop+A.clientHeight&&(A.scrollTop=_-A.clientHeight)}return Ge(()=>i.activeIndex,()=>{At(k)}),Ge(()=>i.items,()=>{At(()=>{p(),k()})}),(A,v)=>(b(),M("div",jFe,[e.items.length===0?(b(),M("div",HFe,B(h(n)("composer.noCommands")),1)):te("",!0),Nn(C("div",{id:"composer-slash-menu",ref_key:"scrollEl",ref:a,class:"slash-scroll",role:"listbox",style:Vt({maskImage:w.value}),onScroll:g},[(b(!0),M(Be,null,yt(l.value,(x,S)=>(b(),M("div",{key:`${x.item.name}-${S}`,id:`composer-slash-option-${S}`,class:$e(["slash-item",{active:S===i.activeIndex}]),role:"option","aria-selected":S===i.activeIndex,onMouseenter:I=>s("hover",S),onMousedown:It(I=>s("select",x.item),["prevent"])},[C("span",qFe,[(b(!0),M(Be,null,yt(x.namePieces,(I,_)=>(b(),M(Be,{key:_},[I.hit?(b(),M("span",UFe,B(I.text),1)):(b(),M(Be,{key:1},[qe(B(I.text),1)],64))],64))),128))]),C("span",KFe,[(b(!0),M(Be,null,yt(x.descPieces,(I,_)=>(b(),M(Be,{key:_},[I.hit?(b(),M("span",VFe,B(I.text),1)):(b(),M(Be,{key:1},[qe(B(I.text),1)],64))],64))),128))])],42,WFe))),128))],36),[[is,e.items.length>0]]),f.value&&e.items.length>0?(b(),M("div",{key:1,class:"scroll-thumb",onPointerdown:y,style:Vt({top:`${f.value.top}px`,height:`${f.value.height}px`})},null,36)):te("",!0)]))}}),GFe=vt(ZFe,[["__scopeId","data-v-98398dd7"]]),QFe={class:"mention-menu","data-menu-frame":""},YFe={key:0,class:"mention-state dim",role:"status"},JFe={key:1,class:"mention-state dim",role:"status"},XFe=["id","aria-selected","onMouseenter","onMousedown"],eBe=["innerHTML"],tBe={class:"mention-name"},nBe={class:"mention-path"},iBe=nt({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean}},emits:["select","hover"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=G(null),r=G(!1),l=G(!1);let a=null;const u=G(null);function c(){const E=o.value;if(!E)return;r.value=E.scrollTop>0,l.value=E.scrollTop+E.clientHeight<E.scrollHeight-1;const{scrollTop:N,scrollHeight:D,clientHeight:T}=E;if(D<=T+1){u.value=null;return}const $=getComputedStyle(E),O=parseFloat($.getPropertyValue("--menu-scrollbar-track-inset"))||0,P=parseFloat($.getPropertyValue("--menu-scrollbar-thumb-min"))||24,R=T-O*2,j=Math.max(P,T/D*R),z=D-T,K=E.offsetTop+O+N/z*(R-j);u.value={top:K,height:j}}function d(){c()}let f=null;function p(E){const N=o.value,D=u.value;if(!N||!D)return;E.preventDefault(),f?.();const T=E.pointerId;E.target.setPointerCapture?.(E.pointerId);const $=getComputedStyle(N),O=parseFloat($.getPropertyValue("--menu-scrollbar-track-inset"))||0,P=N.clientHeight-O*2-D.height,R=N.scrollHeight-N.clientHeight,j=E.clientY,z=N.scrollTop,K=Z=>{Z.pointerId!==T||P<=0||(N.scrollTop=z+(Z.clientY-j)/P*R)},q=Z=>{Z.pointerId===T&&W()},W=()=>{window.removeEventListener("pointerup",q),window.removeEventListener("pointermove",K),window.removeEventListener("pointercancel",q),f===W&&(f=null)};f=W,window.addEventListener("pointermove",K),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",q)}const g=F(()=>{const E=r.value,N=l.value,D="var(--menu-scroll-fade)";if(E&&N)return`linear-gradient(to bottom, transparent 0, black ${D}, black calc(100% - ${D}), transparent 100%)`;if(E)return`linear-gradient(to bottom, transparent, black ${D})`;if(N)return`linear-gradient(to top, transparent, black ${D})`});gn(()=>{c(),typeof ResizeObserver=="function"&&o.value&&(a=new ResizeObserver(c),a.observe(o.value))}),Cn(()=>{a?.disconnect(),a=null,f?.()});function m(){const E=o.value;if(!E)return;const N=E.querySelectorAll('[role="option"]')[n.activeIndex];if(!N)return;const D=E.getBoundingClientRect(),T=N.getBoundingClientRect(),$=T.top-D.top+E.scrollTop,O=$+T.height;$<E.scrollTop?E.scrollTop=$:O>E.scrollTop+E.clientHeight&&(E.scrollTop=O-E.clientHeight)}Ge(()=>n.activeIndex,()=>{At(m)}),Ge(()=>n.items,()=>{At(()=>{c(),m()})});const y=Hd("folder","sm"),w=Hd("code","sm"),k=Hd("file-text","sm"),A=Hd("image","sm"),v=Hd("file","sm"),x=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"]),S=new Set(["md","markdown","mdx","txt","rst","adoc","pdf","doc","docx"]),I=new Set(["png","jpg","jpeg","gif","svg","webp","bmp","ico","avif"]);function _(E){const N=E.path;if(N.endsWith("/"))return y;const D=E.name||N.split("/").pop()||N,T=D.lastIndexOf("."),$=T>0?D.slice(T+1).toLowerCase():"";return $?x.has($)?w:S.has($)?k:I.has($)?A:v:v}return(E,N)=>(b(),M("div",QFe,[n.loading?(b(),M("div",YFe,B(h(s)("mention.searching")),1)):n.items.length===0?(b(),M("div",JFe,B(h(s)("mention.noMatch")),1)):te("",!0),Nn(C("div",{id:"composer-mention-menu",ref_key:"scrollEl",ref:o,class:"mention-scroll",role:"listbox",style:Vt({maskImage:g.value}),onScroll:d},[(b(!0),M(Be,null,yt(n.items,(D,T)=>(b(),M("div",{key:D.path,id:`composer-mention-option-${T}`,class:$e(["mention-item",{active:T===n.activeIndex}]),role:"option","aria-selected":T===n.activeIndex,onMouseenter:$=>i("hover",T),onMousedown:It($=>i("select",D),["prevent"])},[C("span",{class:"mention-icon",innerHTML:_(D),"aria-hidden":"true"},null,8,eBe),C("span",tBe,B(D.name),1),C("span",nBe,B(D.path),1)],42,XFe))),128))],36),[[is,!n.loading&&n.items.length>0]]),u.value&&!n.loading&&n.items.length>0?(b(),M("div",{key:2,class:"scroll-thumb",onPointerdown:p,style:Vt({top:`${u.value.top}px`,height:`${u.value.height}px`})},null,36)):te("",!0)]))}}),sBe=vt(iBe,[["__scopeId","data-v-53eca905"]]),oBe={class:"composer-card"},rBe={key:0,class:"att-strip"},lBe={key:1,class:"att-row"},aBe={key:0,class:"att-more"},uBe={class:"cin-wrap"},cBe=["onClick"],dBe={class:"am-icon"},fBe={class:"am-name"},hBe={key:0,class:"am-desc"},pBe={class:"input-row"},gBe=["placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant"],mBe=["aria-label"],vBe={class:"toolbar-left"},yBe=["aria-label","onKeydown"],bBe={class:"perm-pill-label"},kBe=["onClick"],ABe={class:"pd-info"},CBe={class:"pd-desc"},wBe={class:"pd-check"},xBe={key:1,class:"swarm-chip"},_Be={class:"swarm-label"},SBe={class:"toolbar-right"},MBe=["aria-label"],IBe=["aria-expanded"],EBe={class:"mp-name"},TBe={key:0,class:"think-suffix"},LBe={class:"mp-name"},NBe={class:"mp-name"},FBe=["aria-label"],BBe=["aria-label","disabled"],$Be={class:"md-list"},DBe={key:0,class:"md-section"},zBe=["onClick"],RBe={class:"md-check"},OBe={class:"md-name"},PBe={class:"md-provider"},jBe={key:1,class:"md-divider"},HBe={key:2,class:"md-section"},WBe=["onClick"],qBe={class:"md-check"},UBe={class:"md-name"},KBe={key:0,class:"md-divider"},VBe={class:"md-thinking"},ZBe={class:"md-name"},GBe={key:0,class:"md-note"},QBe={key:2,class:"md-note"},YBe={class:"md-cache-note"},JBe={class:"md-check md-more-icon"},XBe={class:"md-name"},e$e={key:1,class:"composer-footer"},t$e={class:"drop-card"},bM=36,n$e=nt({__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},planArmed:{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","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","login"],setup(e,{expose:t,emit:n}){const i=e,s=F(()=>i.starting?r("composer.starting"):i.running?r("composer.placeholderRunning"):i.goalMode?r("status.goalPlaceholder"):i.planArmed||i.planMode?r("status.planPlaceholder"):r("composer.placeholder")),o=n,{t:r,locale:l}=Bt(),{text:a,editorRef:u,loadForEdit:c,clearDraft:d}=G2e({sessionId:()=>i.sessionId}),f=u;function p(){const Ee=f.value;Ee&&(Ee.style.height="auto",Ee.style.height=`${Ee.scrollHeight}px`)}Ge(a,()=>void At(p));const g=G(!1);function m(){g.value=!g.value,At(()=>{p(),A(),f.value?.focus()})}function y(){g.value&&(g.value=!1,At(p))}function w(Ee){if(typeof getComputedStyle>"u")return bM;const ct=Number.parseFloat(getComputedStyle(Ee).minHeight);return Number.isFinite(ct)&&ct>0?ct:bM}const k=G(!1);function A(){const Ee=f.value;k.value=!!Ee&&Ee.scrollHeight>w(Ee)}Ge(a,()=>{At(A)});const v=X2e({text:a,editorRef:f,sessionId:()=>i.sessionId});function x(){Fs.value||(i.goalMode&&o("toggleGoal"),o("togglePlan"))}function S(){if(Pi.value){o("focusGoal");return}i.goalMode||(Fs.value&&o("togglePlan"),o("toggleGoal"))}const{open:I,items:_,ranges:E,active:N,update:D,select:T}=eve({text:a,editorRef:f,skills:()=>i.skills,emitCommand:Ee=>{if(Ee==="/plan"){x();return}if(Ee==="/goal"){S();return}if(Ee==="/swarm"){rr.value||o("toggleSwarm");return}o("command",{cmd:Ee,attachments:[]})},historyPush:Ee=>v.push(Ee),clearDraft:d,resolveDesc:Ee=>Ee.isSkill?Ee.desc:r(Ee.desc)}),$=F(()=>a.value.startsWith("/")&&!a.value.includes(" ")?a.value.slice(1):""),O=F(()=>{if(I.value)return"composer-slash-menu";if(R.value)return"composer-mention-menu"}),P=F(()=>{if(I.value&&_.value.length>0)return`composer-slash-option-${N.value}`;if(R.value&&!K.value&&j.value.length>0)return`composer-mention-option-${z.value}`}),{open:R,items:j,active:z,loading:K,update:q,close:W,select:Z}=tve({text:a,editorRef:f,searchFiles:()=>i.searchFiles});Ge(()=>i.sessionId,()=>{g.value=!1,I.value=!1,W()});function ne(){I.value=!1,W()}function X(){v.resetBrowsing(),D(),q(),(I.value||R.value||Sn.value)&&$n()}function ue(Ee){const ct=Ee.map(Gi=>/\s/.test(Gi)?`"${Gi}"`:Gi).join(" "),dt=f.value,qt=a.value,yi=dt&&document.activeElement===dt?dt.selectionStart:qt.length,Bs=yi>0&&!/\s/.test(qt[yi-1])?" ":"",Ql=yi<qt.length&&!/\s/.test(qt[yi])?" ":"";v.resetBrowsing(),a.value=qt.slice(0,yi)+Bs+ct+Ql+qt.slice(yi),At(()=>{const Gi=f.value;if(!Gi)return;const ns=yi+Bs.length+ct.length;Gi.setSelectionRange(ns,ns),Gi.focus(),p()})}const{attachments:ie,previewAttachment:Se,fileInputRef:fe,isDragOver:pe,removeAttachment:Ne,openAttachmentPreview:ee,closeAttachmentPreview:ye,openFilePicker:H,handleFileInputChange:Y,handleDragOver:ve,handleDragLeave:re,handleDrop:se,clearAfterSubmit:U,clearAttachments:J,loadAttachments:ce}=kve({api:jt(),uploadImage:()=>i.uploadImage,sessionId:()=>i.sessionId,insertFolderPaths:ue}),ge=Ee=>Ee.kind==="image"||Ee.kind==="video",Me=F(()=>ie.value.filter(ge)),Pe=F(()=>ie.value.filter(Ee=>!ge(Ee))),ke=G(null),Le=G(null),it=G(!1);function Fe(){const Ee=ke.value,ct=Le.value;it.value=Ee!==null&&ct!==null&&ct.scrollHeight>Ee.clientHeight+1}let De=null;Ge(ke,Ee=>{if(De?.disconnect(),De=null,Ee){const ct=new ResizeObserver(Fe);ct.observe(Ee),De=ct}Fe()},{immediate:!0}),Ge(ie,()=>void At(Fe),{deep:!0}),Cn(()=>De?.disconnect());const Ke=G(null);Ge(()=>[Me.value.length,Pe.value.length],([Ee,ct],[dt,qt])=>{Ee<=dt&&ct<=qt||At(()=>{const yi=ke.value;yi&&(Ee>dt&&Ke.value?yi.scrollTop=Ke.value.offsetHeight-yi.clientHeight:yi.scrollTop=yi.scrollHeight)})}),gn(()=>{a.value&&At(()=>{p(),A()})}),Cn(()=>{Ue()});function gt(){f.value?.focus({preventScroll:!0})}function lt(Ee){ce(Ee)}function ft(Ee){return{fileId:Ee.fileId,kind:Ee.kind,name:Ee.name,mediaType:Ee.mediaType,size:Ee.size}}const Lt=G(null);function bn(Ee,ct){if(Ee.kind==="file"){Ee.fileId!==void 0&&lD(jt(),Ee.fileId,Ee.name,Ee.mediaType);return}Lt.value=ct??null,ee(Ee)}const Gt=F(()=>{const Ee=Se.value;return!Ee||!Ee.previewUrl?null:{kind:Ee.kind==="video"?"video":"image",url:Ee.previewUrl,path:Ee.name,fileId:Ee.previewUrl.startsWith("blob:")?void 0:Ee.fileId}}),Qt=F(()=>!ie.value.some(Ee=>Ee.uploading)&&(a.value.trim()!==""||ie.value.some(Ee=>!Ee.error&&Ee.fileId)));function kn(){const Ee=a.value.trim();if(ie.value.some(qt=>qt.uploading))return;const ct=ie.value.filter(qt=>!qt.uploading&&!qt.error&&qt.fileId);if(!Ee&&ct.length===0)return;if(v.push(Ee),Ee==="/plan"){a.value="",d(),I.value=!1,y(),x();return}if(Ee==="/goal"){a.value="",d(),I.value=!1,y(),S();return}if(Ee==="/swarm"){a.value="",d(),I.value=!1,y(),rr.value||o("toggleSwarm");return}if(Ee){const qt=bie(Ee),yi=qt?LL(i.skills).find(Bs=>Bs.name===qt.cmd||Bs.name===`/${Im}${qt.cmd.slice(1)}`):void 0;if(qt&&yi){const Bs=qt.arg?`${qt.cmd} ${qt.arg}`:qt.cmd,Ql=yi.isSkill===!0;a.value="",d(),I.value=!1,y(),Ql?(Se.value=null,Lt.value=null,U(),W(),o("command",{cmd:Bs,attachments:ct.map(Gi=>ft(Gi))})):o("command",{cmd:Bs,attachments:[]});return}}const dt={text:Ee,attachments:ct.map(qt=>ft(qt))};Se.value=null,Lt.value=null,U(),a.value="",d(),I.value=!1,W(),y(),o("submit",dt)}function _n(){if(!i.running||ie.value.some(qt=>qt.uploading))return;const Ee=a.value.trim(),ct=ie.value.filter(qt=>!qt.uploading&&!qt.error&&qt.fileId);if(!Ee&&ct.length===0&&i.queued.length===0)return;const dt={text:Ee,attachments:ct.map(qt=>ft(qt))};U(),v.push(Ee),a.value="",d(),I.value=!1,W(),y(),o("steer",dt)}let je=!1,st=null;function Ue(){st!==null&&(clearTimeout(st),st=null)}function Ft(){Ue(),je=!0}function Ct(){Ue(),st=setTimeout(()=>{st=null,je=!1},0)}function Fn(Ee){return je||Ee.isComposing||Ee.keyCode===229}function In(Ee){if(Fn(Ee))return;if(ws.value&&Ee.key==="Backspace"&&!Ee.shiftKey&&!Ee.altKey&&!Ee.metaKey&&!Ee.ctrlKey){const dt=f.value;if(dt&&dt.selectionStart===0&&dt.selectionEnd===0){Ee.preventDefault(),lo();return}}if(Ee.key==="Escape"){if(Sn.value){Ee.preventDefault(),$n();return}if(li.value){Ee.preventDefault(),Cs();return}if(Rn.value){Ee.preventDefault(),ii();return}}if(I.value){if(Ee.key==="Escape"){Ee.preventDefault(),I.value=!1;return}if(Ee.key==="Tab"&&_.value.length===0){I.value=!1;return}}if(I.value&&_.value.length>0){if(Ee.key==="ArrowDown"){Ee.preventDefault(),N.value=(N.value+1)%_.value.length;return}if(Ee.key==="ArrowUp"){Ee.preventDefault(),N.value=(N.value-1+_.value.length)%_.value.length;return}if(Ee.key==="Enter"||Ee.key==="Tab"){Ee.preventDefault();const dt=_.value[N.value];dt&&T(dt);return}}if(R.value&&!K.value){if(Ee.key==="Escape"){Ee.preventDefault(),W();return}if(j.value.length>0){if(Ee.key==="ArrowDown"){Ee.preventDefault(),z.value=(z.value+1)%j.value.length;return}if(Ee.key==="ArrowUp"){Ee.preventDefault(),z.value=(z.value-1+j.value.length)%j.value.length;return}if(Ee.key==="Enter"||Ee.key==="Tab"){Ee.preventDefault();const dt=j.value[z.value];dt&&Z(dt);return}}}if(Ee.key==="s"&&(Ee.ctrlKey||Ee.metaKey)&&!Ee.shiftKey&&!Ee.altKey){i.running&&(Ee.preventDefault(),_n());return}const ct=I.value&&_.value.length>0;if(!g.value&&!ct&&!R.value&&!Ee.shiftKey&&!Ee.altKey&&!Ee.metaKey&&!Ee.ctrlKey){const dt=v.isBrowsing();if(Ee.key==="ArrowUp"&&v.hasHistory()&&(dt||v.caretAtTextStart())){Ee.preventDefault(),v.recallOlder(),I.value=!1;return}if(Ee.key==="ArrowDown"&&dt){Ee.preventDefault(),v.recallNewer(),I.value=!1;return}}if(Ee.key==="Enter"&&!Ee.shiftKey){if(g.value&&!(Ee.metaKey||Ee.ctrlKey))return;Ee.preventDefault(),kn()}}const ks=F(()=>r("composer.send")),Zt=F(()=>!!i.uploadImage),li=G(!1),Rn=G(!1),Sn=G(!1),Qn=G(null),os=G(null),As=G(null),Tt=G(null),Ci=G(null),rs=G(null);let Bn=null;function Co(){const Ee=Ci.value;if(!Ee)return;const{scrollTop:ct,scrollHeight:dt,clientHeight:qt}=Ee;if(dt<=qt+1){rs.value=null;return}const yi=getComputedStyle(Ee),Bs=parseFloat(yi.getPropertyValue("--menu-scrollbar-track-inset"))||0,Ql=parseFloat(yi.getPropertyValue("--menu-scrollbar-thumb-min"))||24,Gi=qt-Bs*2,ns=Math.max(Ql,qt/dt*Gi),Uu=dt-qt,rd=Ee.offsetTop+Bs+ct/Uu*(Gi-ns);rs.value={top:rd,height:ns}}function Mi(){Co()}Ge(Sn,async Ee=>{Bn?.disconnect(),Bn=null,rs.value=null,Ee&&(await At(),Co(),typeof ResizeObserver=="function"&&Ci.value&&(Bn=new ResizeObserver(Co),Bn.observe(Ci.value)))}),Cn(()=>{Bn?.disconnect(),Bn=null});const Ei=G(""),ro=F(()=>{const Ee={};return Ei.value&&(Ee.right=Ei.value),Ee}),zi=F(()=>li.value||Rn.value||Sn.value||I.value||R.value);t({loadForEdit:c,loadAttachmentsForEdit:lt,focus:gt,anyPopupOpen:zi,isEmpty:()=>a.value.trim().length===0&&ie.value.length===0});function wo(){li.value=!li.value,li.value?(Po(),Rn.value=!1,Sn.value=!1,document.addEventListener("click",Ln,!0)):document.removeEventListener("click",Ln,!0)}function Cs(){li.value=!1,!Rn.value&&!Sn.value&&document.removeEventListener("click",Ln,!0)}function Ti(){Rn.value=!Rn.value,Rn.value?(wi(),li.value=!1,Sn.value=!1,document.addEventListener("click",Ln,!0)):document.removeEventListener("click",Ln,!0)}function ii(){Rn.value=!1,!li.value&&!Sn.value&&document.removeEventListener("click",Ln,!0)}function On(){Sn.value=!Sn.value,Sn.value?(li.value=!1,Rn.value=!1,I.value=!1,R.value=!1,document.addEventListener("click",Ln,!0),At(()=>{os.value?.querySelector(".am-row")?.focus()})):document.removeEventListener("click",Ln,!0)}function $n(){Sn.value=!1,!li.value&&!Rn.value&&document.removeEventListener("click",Ln,!0)}const Tn=F(()=>{const Ee=[];return Zt.value&&Ee.push({id:"files",icon:"attachment",nameKey:"composer.addFiles",action:Rt}),Ee.push({id:"goal",icon:"target",nameKey:"status.goalLabel",descKey:"composer.addGoalDesc",action:Ot}),Ee.push({id:"plan",icon:"file-edit",nameKey:"status.planLabel",descKey:"composer.addPlanDesc",action:ai}),Ee.push({id:"swarm",icon:"sparkles",nameKey:"status.swarmLabel",descKey:"composer.addSwarmDesc",action:Ns}),Ee});function tt(Ee){Ee.action(),f.value?.focus()}function Je(Ee){if(Ee.key==="Escape"){Ee.preventDefault(),$n(),f.value?.focus();return}if(Ee.key==="Tab"){$n();return}if(Ee.key!=="ArrowDown"&&Ee.key!=="ArrowUp")return;Ee.preventDefault();const ct=Array.from(os.value?.querySelectorAll(".am-row")??[]);if(ct.length===0)return;const dt=ct.indexOf(document.activeElement),qt=Ee.key==="ArrowDown"?(dt+1)%ct.length:(dt-1+ct.length)%ct.length;ct[qt]?.focus()}function Rt(){$n(),H()}function Ot(){$n(),i.goalMode||S()}function ai(){$n(),Fs.value||x()}function Ns(){$n(),rr.value||o("toggleSwarm")}function Ln(Ee){const ct=Ee.target,dt=Qn.value?.contains(ct)??!1,qt=os.value?.contains(ct)??!1;!dt&&!qt&&(Cs(),ii(),$n())}Cn(()=>{document.removeEventListener("click",Ln,!0)});const ls=F(()=>{const Ee=i.status?.ctxMax??0;return Ee<=0?0:Math.min(100,Math.max(0,Math.ceil((i.status?.ctxUsed??0)/Ee*100)))}),ts=F(()=>{const Ee=Ia(i.status?.ctxUsed??0),ct=Ia(i.status?.ctxMax??0);return r("status.ctxTooltip",{used:Ee,max:ct,pct:ls.value})}),Vi=F(()=>ls.value>=80),gi=F(()=>i.models?.find(Ee=>Ee.id===i.status?.modelId)),an=F(()=>rv(gi.value)),Zi=F(()=>bp(gi.value)),Ri=F(()=>Cm(gi.value,i.thinking)),Vl=F(()=>Zi.value.includes(Ri.value)?Ri.value:""),Ro=F(()=>Hee(Ri.value)),Sr=F(()=>an.value==="unsupported"||Zi.value.length<=1),Ws=F(()=>{if(!Ro.value)return"";const Ee=(gi.value?.supportEfforts?.length??0)>0,ct=Ri.value;return Ee&&ct!=="on"?r("composer.thinkingSuffixEffort",{level:ct}):r("composer.thinkingSuffix")});function Li(Ee){Sr.value||o("setThinking",R5(gi.value,Ee))}function Oi(Ee){return Ee==="on"?r("status.thinkingOn"):Ee==="off"?r("status.thinkingOff"):p3(Ee)}const Zl=F(()=>Zi.value.map(Ee=>({value:Ee,label:Oi(Ee)}))),Fs=F(()=>i.planArmed===!0||i.planMode===!0),rr=F(()=>i.swarmMode===!0),qs=F(()=>i.goal?.status??i.activationBadges?.goal?.status??null),Pi=F(()=>qs.value!==null&&qs.value!=="complete"),ws=F(()=>i.goalMode?"goal":i.planArmed?"plan":null);function lo(){ws.value==="goal"?o("toggleGoal"):ws.value==="plan"&&o("togglePlan")}const mi=G(null),xo=G(""),ao=F(()=>xo.value?{textIndent:xo.value}:void 0);let Us=null;function as(){const Ee=mi.value;xo.value=Ee?`calc(${Ee.offsetWidth}px + var(--space-1-5) - var(--space-05))`:""}Ge(ws,async Ee=>{if(Us?.disconnect(),Us=null,!Ee){xo.value="";return}await At(),as(),typeof ResizeObserver=="function"&&mi.value&&(Us=new ResizeObserver(as),Us.observe(mi.value))},{immediate:!0}),Cn(()=>{Us?.disconnect(),Us=null});const Oo=[{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"}],lr=G(null),ht=G(""),Ie=G("");function Ve(Ee){const ct={};return Ee&&(ct["--composer-menu-desc-width"]=Ee),ct}const on=F(()=>({...Ve(ht.value),...Ie.value?{left:Ie.value}:{}}));function wi(){const Ee=As.value,ct=Qn.value;if(!Ee||!ct){Ie.value="";return}Ie.value=`${Math.round(Ee.getBoundingClientRect().left-ct.getBoundingClientRect().left)}px`}function Po(){const Ee=Tt.value,ct=Qn.value;if(!Ee||!ct){Ei.value="";return}Ei.value=`${Math.round(ct.getBoundingClientRect().right-Ee.getBoundingClientRect().right)}px`}let vi=null;function bl(Ee){const ct=Number.parseFloat(Ee);return Number.isFinite(ct)?ct:0}function jo(Ee){return`${Ee.fontStyle||"normal"} ${Ee.fontWeight||"400"} ${Ee.fontSize} ${Ee.fontFamily}`}function Mr(Ee){return Ee.letterSpacing==="normal"?0:bl(Ee.letterSpacing)}function ar(Ee,ct){if(!Ee)return 0;const dt=OFe(Ee,jo(ct),{letterSpacing:Mr(ct)});return PFe(dt)}function ur(){const Ee=lr.value?.querySelector(".pd-desc");if(!Ee)return;const ct=getComputedStyle(Ee),dt=Math.max(0,...Oo.map(qt=>ar(r(qt.descKey),ct)));ht.value=dt>0?`${Math.ceil(dt)}px`:""}function uo(){typeof window>"u"||(vi!==null&&window.cancelAnimationFrame(vi),At(()=>{vi=window.requestAnimationFrame(()=>{vi=null,ur()})}))}Ge(l,()=>{uo(),I.value&&D()},{immediate:!0}),gn(()=>{uo(),document.fonts?.ready.then(uo)}),Cn(()=>{vi!==null&&(window.cancelAnimationFrame(vi),vi=null)});function Gl(Ee){o("setPermission",Ee),ii()}const oe=F(()=>Oo.find(Ee=>Ee.mode===i.status?.permission)),Ae=F(()=>oe.value?r(oe.value.labelKey):""),_e=F(()=>oe.value?.icon??"hand"),Oe=F(()=>gi.value?.provider??""),Qe=F(()=>!Oe.value||!i.models?.length?[]:i.models.filter(Ee=>Ee.provider===Oe.value)),Ye=F(()=>(i.models?.length??0)>0),xt=F(()=>i.authReady===!1&&!Ye.value),bt=F(()=>xt.value&&!(i.managedSignedIn??!1)),nn=F(()=>xt.value&&(i.managedSignedIn??!1)&&i.managedMembership==="free"),Pt=F(()=>new Set(i.starredIds??[]));function wn(Ee){return Pt.value.has(Ee)}const Yn=F(()=>i.models?.length?i.models.filter(Ee=>wn(Ee.id)&&Ee.provider!==Oe.value):[]),$t=G(null);Ge(li,async Ee=>{if(!Ee)return;await At(),($t.value?.querySelector(".md-row.is-current")??$t.value?.querySelector(".md-row"))?.focus()});function Wt(Ee){if(Ee.key!=="ArrowDown"&&Ee.key!=="ArrowUp")return;const ct=Array.from($t.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(!ct.length)return;Ee.preventDefault();const dt=ct.indexOf(document.activeElement),qt=Ee.key==="ArrowDown"?(dt+1)%ct.length:(dt-1+ct.length)%ct.length;ct[qt]?.focus()}function Wn(Ee){o("selectModel",Ee),Cs()}return(Ee,ct)=>(b(),M("div",{class:$e(["composer",{"drag-over":h(pe),expanded:g.value}]),onDragover:ct[19]||(ct[19]=(...dt)=>h(ve)&&h(ve)(...dt)),onDragleave:ct[20]||(ct[20]=(...dt)=>h(re)&&h(re)(...dt)),onDrop:ct[21]||(ct[21]=(...dt)=>h(se)&&h(se)(...dt))},[Gt.value?(b(),de(bk,{key:0,media:Gt.value,"origin-img":Lt.value,onClose:ct[0]||(ct[0]=dt=>{Lt.value=null,h(ye)()})},null,8,["media","origin-img"])):te("",!0),C("div",oBe,[h(ie).length>0?(b(),M("div",rBe,[C("div",{ref_key:"attScrollRef",ref:ke,class:$e(["att-scroll",{"is-overflowing":it.value}])},[C("div",{ref_key:"attScrollContentRef",ref:Le,class:"att-scroll-content"},[Me.value.length>0?(b(),M("div",{key:0,ref_key:"attMediaRowRef",ref:Ke,class:"att-row att-row-media"},[(b(!0),M(Be,null,yt(Me.value,dt=>(b(),de(ND,{key:dt.localId,kind:dt.kind,name:dt.name,url:dt.previewUrl,"file-id":dt.fileId,uploading:dt.uploading,error:dt.error,removable:"","remove-label":h(r)("composer.removeNamed",{name:dt.name}),onActivate:qt=>bn(dt,qt),onRemove:qt=>h(Ne)(dt.localId)},null,8,["kind","name","url","file-id","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):te("",!0),Pe.value.length>0?(b(),M("div",lBe,[(b(!0),M(Be,null,yt(Pe.value,dt=>(b(),de(FD,{key:dt.localId,kind:"file",name:dt.name,"media-type":dt.mediaType,size:dt.size,uploading:dt.uploading,error:dt.error,removable:"","remove-label":h(r)("composer.removeNamed",{name:dt.name}),onActivate:qt=>bn(dt),onRemove:qt=>h(Ne)(dt.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):te("",!0)],512)],2),it.value?(b(),M("span",aBe,B(h(r)("composer.attachmentCount",{n:h(ie).length})),1)):te("",!0),h(ie).length>=2?(b(),de(h(mn),{key:1,text:h(r)("composer.clearAll")},{default:he(()=>[V(h(rn),{class:"att-clear",size:"sm",label:h(r)("composer.clearAll"),onClick:h(J)},{default:he(()=>[V(h(Ce),{name:"trash"})]),_:1},8,["label","onClick"])]),_:1},8,["text"])):te("",!0)])):te("",!0),C("div",uBe,[h(I)?(b(),de(GFe,{key:0,items:h(_),ranges:h(E),"active-index":h(N),query:$.value,onSelect:h(T),onHover:ct[1]||(ct[1]=dt=>N.value=dt)},null,8,["items","ranges","active-index","query","onSelect"])):te("",!0),h(R)?(b(),de(sBe,{key:1,items:h(j),"active-index":h(z),loading:h(K),onSelect:h(Z),onHover:ct[2]||(ct[2]=dt=>z.value=dt)},null,8,["items","active-index","loading","onSelect"])):te("",!0),V(gs,{name:"composer-menu-pop"},{default:he(()=>[Sn.value?(b(),M("div",{key:0,ref_key:"addMenuRef",ref:os,class:"add-menu",onClick:ct[4]||(ct[4]=It(()=>{},["stop"])),onKeydown:Je},[C("div",{ref_key:"addScrollRef",ref:Ci,class:"am-scroll",role:"menu",onScroll:Mi},[(b(!0),M(Be,null,yt(Tn.value,dt=>(b(),M("button",{key:dt.id,type:"button",class:"am-row",role:"menuitem",onMousedown:ct[3]||(ct[3]=It(()=>{},["prevent"])),onClick:qt=>tt(dt)},[C("span",dBe,[V(h(Ce),{name:dt.icon,size:"sm"},null,8,["name"])]),C("span",fBe,B(h(r)(dt.nameKey)),1),dt.descKey?(b(),M("span",hBe,B(h(r)(dt.descKey)),1)):te("",!0)],40,cBe))),128))],544),rs.value?(b(),M("div",{key:0,class:"scroll-thumb",style:Vt({top:`${rs.value.top}px`,height:`${rs.value.height}px`})},null,4)):te("",!0)],544)):te("",!0)]),_:1}),C("div",pBe,[ws.value?(b(),M("span",{key:0,ref_key:"wmPillRef",ref:mi,class:"wm-pill"},[V(h(Ce),{name:ws.value==="goal"?"target":"file-edit",size:"sm"},null,8,["name"]),C("span",null,B(ws.value==="goal"?h(r)("status.goalLabel"):h(r)("status.planLabel")),1),V(h(rn),{class:"wm-x",size:"sm",label:h(r)("status.workModeDismiss"),tooltip:h(r)("status.workModeDismiss"),onMousedown:ct[5]||(ct[5]=It(()=>{},["prevent"])),onClick:lo},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],512)):te("",!0),Nn(C("textarea",{ref_key:"textareaRef",ref:f,"onUpdate:modelValue":ct[6]||(ct[6]=dt=>ss(a)?a.value=dt:null),class:"ph",style:Vt(ao.value),placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!O.value,"aria-controls":O.value,"aria-activedescendant":P.value,onKeydown:In,onCompositionstart:Ft,onCompositionend:Ct,onInput:X,onBlur:ne},null,44,gBe),[[Ao,h(a)]]),V(h(mn),{text:g.value?h(r)("composer.collapseTitle"):h(r)("composer.expandTitle")},{default:he(()=>[g.value||k.value?(b(),M("button",{key:0,class:"expand-btn",type:"button","aria-label":g.value?h(r)("composer.collapseTitle"):h(r)("composer.expandTitle"),onClick:m},[g.value?(b(),de(h(Ce),{key:0,name:"collapse",size:"sm"})):(b(),de(h(Ce),{key:1,name:"expand",size:"sm"}))],8,mBe)):te("",!0)]),_:1},8,["text"])])]),Zt.value?(b(),M("input",{key:1,ref_key:"fileInputRef",ref:fe,type:"file",multiple:"",class:"file-input-hidden",onChange:ct[7]||(ct[7]=(...dt)=>h(Y)&&h(Y)(...dt))},null,544)):te("",!0),C("div",{ref_key:"toolbarRef",ref:Qn,class:"toolbar"},[C("div",{ref_key:"menuMeasureRef",ref:lr,class:"menu-measure","aria-hidden":"true"},[...ct[22]||(ct[22]=[C("span",{class:"pd-desc"},null,-1)])],512),C("div",vBe,[V(h(rn),{class:"composer-attach",size:"md",label:h(r)("composer.addMenu"),tooltip:h(r)("composer.addMenu"),"aria-haspopup":"menu","aria-expanded":Sn.value,onMousedown:ct[8]||(ct[8]=It(()=>{},["prevent"])),onClick:It(On,["stop"])},{default:he(()=>[V(h(Ce),{name:"plus"})]),_:1},8,["label","tooltip","aria-expanded"]),e.status?(b(),M("span",{key:0,ref_key:"permPillRef",ref:As,class:$e(["perm-pill",["perm-"+e.status.permission,{open:Rn.value}]]),role:"button",tabindex:"0","aria-label":Ae.value,onClick:It(Ti,["stop"]),onKeydown:[Hr(Ti,["enter"]),Hr(It(Ti,["prevent"]),["space"])]},[V(h(Ce),{class:"perm-pill-icon",name:_e.value,size:"md"},null,8,["name"]),C("span",bBe,B(Ae.value),1)],42,yBe)):te("",!0),V(gs,{name:"composer-menu-pop"},{default:he(()=>[Rn.value&&e.status?(b(),M("div",{key:0,class:"perm-dropdown",style:Vt(on.value),role:"menu",onClick:ct[9]||(ct[9]=It(()=>{},["stop"]))},[(b(),M(Be,null,yt(Oo,dt=>C("button",{key:dt.mode,class:$e(["pd-row",{"is-current":dt.mode===e.status.permission}]),role:"menuitem",onClick:qt=>Gl(dt.mode)},[C("span",{class:"pd-icon",style:Vt({color:dt.color})},[V(h(Ce),{name:dt.icon,size:"md"},null,8,["name"])],4),C("span",ABe,[C("span",{class:"pd-name",style:Vt({color:dt.color})},B(h(r)(dt.labelKey)),5),C("span",CBe,B(h(r)(dt.descKey)),1)]),C("span",wBe,[dt.mode===e.status.permission?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):te("",!0)])],10,kBe)),64))],4)):te("",!0)]),_:1}),rr.value?(b(),M("span",xBe,[V(h(Ce),{class:"swarm-ic",name:"sparkles",size:"md"}),C("span",_Be,B(h(r)("status.swarmLabel")),1),V(h(rn),{class:"swarm-x",size:"sm",label:h(r)("status.swarmDismiss"),tooltip:h(r)("status.swarmDismiss"),onMousedown:ct[10]||(ct[10]=It(()=>{},["prevent"])),onClick:ct[11]||(ct[11]=It(dt=>o("toggleSwarm"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])])):te("",!0)]),C("div",SBe,[Vi.value?(b(),M("button",{key:0,class:"compact-chip",onClick:ct[12]||(ct[12]=It(dt=>o("compact"),["stop"]))},"/compact")):te("",!0),V(h(mn),{text:ts.value},{default:he(()=>[e.status&&!e.hideContext?(b(),M("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":ts.value},[V(h($q),{pct:ls.value},null,8,["pct"])],8,MBe)):te("",!0)]),_:1},8,["text"]),e.status&&!bt.value&&!nn.value?(b(),M("button",{key:1,ref_key:"modelPillRef",ref:Tt,type:"button",class:$e(["model-pill",{open:li.value}]),"aria-haspopup":"menu","aria-expanded":li.value,onClick:It(wo,["stop"])},[C("span",EBe,B(e.status.model),1),Ws.value?(b(),M("span",TBe,B(Ws.value),1)):te("",!0),V(h(Ce),{class:"cv",name:"chevron-down",size:"sm"})],10,IBe)):e.status&&nn.value?(b(),M("button",{key:2,type:"button",class:"model-pill login-pill",onClick:ct[13]||(ct[13]=It(dt=>h(kp)(),["stop"]))},[V(h(Ce),{name:"music",size:"sm"}),C("span",LBe,B(h(r)("sidebar.upgrade")),1)])):e.status&&bt.value?(b(),M("button",{key:3,type:"button",class:"model-pill login-pill",onClick:ct[14]||(ct[14]=It(dt=>o("login"),["stop"]))},[V(h(Ce),{name:"log-in",size:"sm"}),C("span",NBe,B(h(r)("login.action")),1)])):te("",!0),e.working?(b(),de(h(mn),{key:4,text:h(r)("composer.interruptTitle")},{default:he(()=>[C("button",{class:"stop","aria-label":h(r)("composer.interrupt"),onClick:ct[15]||(ct[15]=dt=>o("interrupt"))},[V(h(Ce),{name:"stop",size:"sm"})],8,FBe)]),_:1},8,["text"])):te("",!0),V(h(mn),{text:ks.value},{default:he(()=>[C("button",{class:$e(["send",{"is-starting":e.starting}]),"aria-label":ks.value,disabled:e.starting||!Qt.value,onClick:ct[16]||(ct[16]=dt=>kn())},[e.starting?(b(),de(h(Ii),{key:0,size:"sm"})):(b(),de(h(Ce),{key:1,name:"send",size:"sm"}))],10,BBe)]),_:1},8,["text"])]),V(gs,{name:"composer-menu-pop"},{default:he(()=>[li.value&&e.status?(b(),M("div",{key:0,ref_key:"modelDropdownRef",ref:$t,class:"model-dropdown",style:Vt(ro.value),role:"menu",onClick:ct[18]||(ct[18]=It(()=>{},["stop"])),onKeydown:Wt},[C("div",$Be,[Yn.value.length>0?(b(),M("div",DBe,B(h(r)("status.starredModels")),1)):te("",!0),(b(!0),M(Be,null,yt(Yn.value,dt=>(b(),M("button",{key:dt.id,class:$e(["md-row",{"is-current":dt.id===e.status.modelId}]),role:"menuitem",onClick:qt=>Wn(dt.id)},[C("span",RBe,[dt.id===e.status.modelId?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):te("",!0)]),C("span",OBe,B(dt.displayName??dt.model),1),C("span",PBe,B(dt.provider),1),V(h(Ce),{class:"md-star",name:"star",size:"sm"})],10,zBe))),128)),Yn.value.length>0?(b(),M("div",jBe)):te("",!0),Qe.value.length>0?(b(),M("div",HBe,B(Oe.value),1)):te("",!0),(b(!0),M(Be,null,yt(Qe.value,dt=>(b(),M("button",{key:dt.id,class:$e(["md-row",{"is-current":dt.id===e.status.modelId}]),role:"menuitem",onClick:qt=>Wn(dt.id)},[C("span",qBe,[dt.id===e.status.modelId?(b(),de(h(Ce),{key:0,name:"check",size:"sm"})):te("",!0)]),C("span",UBe,B(dt.displayName??dt.model),1),wn(dt.id)?(b(),de(h(Ce),{key:0,class:"md-star",name:"star",size:"sm"})):te("",!0)],10,WBe))),128))]),Qe.value.length>0?(b(),M("div",KBe)):te("",!0),C("div",VBe,[C("span",ZBe,B(h(r)("status.thinkingLabel")),1),an.value==="unsupported"?(b(),M("span",GBe,B(h(r)("status.modeNotSupported")),1)):Zi.value.length>1?(b(),de(h(bo),{key:1,"model-value":Vl.value,options:Zl.value,size:"xs","onUpdate:modelValue":Li},null,8,["model-value","options"])):(b(),M("span",QBe,B(Oi(Zi.value[0]??Ri.value)),1))]),ct[23]||(ct[23]=C("div",{class:"md-divider"},null,-1)),C("div",YBe,B(h(r)("status.cacheNote")),1),ct[24]||(ct[24]=C("div",{class:"md-divider"},null,-1)),C("button",{class:"md-row md-row-more",role:"menuitem",onClick:ct[17]||(ct[17]=dt=>{Cs(),o("pickModel")})},[C("span",JBe,[V(h(Ce),{name:"list",size:"sm"})]),C("span",XBe,B(h(r)("status.moreModels")),1),V(h(Ce),{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],36)):te("",!0)]),_:1})],512)]),Ee.$slots.footer?(b(),M("div",e$e,[En(Ee.$slots,"footer",{},void 0,!0)])):te("",!0),C("div",{class:$e(["drop-overlay",{show:h(pe)}]),"aria-hidden":"true"},[C("div",t$e,[V(h(Ce),{name:"file-plus",size:"lg"}),C("span",null,B(h(r)("composer.dropToAttach")),1)])],2)],34))}}),jD=vt(n$e,[["__scopeId","data-v-a4ef2d7c"]]),i$e={class:"goal-panel"},s$e={key:0,class:"goal-criterion"},o$e={class:"goal-criterion-label"},r$e=nt({__name:"GoalPanel",props:{goal:{},openFile:{type:Function}},setup(e){const{t}=Bt();return(n,i)=>(b(),M("div",i$e,[V(h(ql),{text:e.goal.objective,"open-file":e.openFile},null,8,["text","open-file"]),e.goal.completionCriterion?(b(),M("div",s$e,[C("span",o$e,[V(h(Ce),{name:"check-list",size:"sm"}),qe(" "+B(h(t)("status.goalDoneWhen")),1)]),V(h(ql),{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,["text","open-file"])])):te("",!0)]))}}),l$e=vt(r$e,[["__scopeId","data-v-cdb3e8b0"]]),a$e={class:"plan-panel"},u$e={key:0,class:"plan-review-row"},c$e={class:"plan-review-label"},d$e={key:1,class:"plan-review-row"},f$e={class:"plan-review-label"},h$e={class:"plan-review-feedback"},p$e={key:3,class:"plan-path-only"},g$e={class:"plan-path-hint"},m$e={key:1,class:"plan-empty"},v$e=nt({__name:"PlanPanel",props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.plan&&!t.plan.plan&&t.plan.path?t.plan.path:void 0);function s(){i.value&&t.openFile?.({path:i.value})}return(o,r)=>(b(),M("div",a$e,[e.plan?(b(),M(Be,{key:0},[e.plan.review?.selectedOption?(b(),M("div",u$e,[C("span",c$e,B(h(n)("tools.plan.selectedOption")),1),C("span",null,B(e.plan.review.selectedOption),1)])):te("",!0),e.plan.review?.feedback?(b(),M("div",d$e,[C("span",f$e,B(h(n)("tools.plan.feedback")),1),C("span",h$e,B(e.plan.review.feedback),1)])):te("",!0),e.plan.plan?(b(),de(h(ql),{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,["text","open-file"])):te("",!0),i.value?(b(),M("div",p$e,[C("span",g$e,B(h(n)("tools.plan.pathOnlyHint")),1),V(h(Ht),{variant:"ghost",size:"sm",class:"plan-path",onClick:s},{default:he(()=>[qe(B(i.value),1)]),_:1})])):te("",!0)],64)):(b(),M("div",m$e,[V(h(Ce),{name:"file-edit",size:"lg",class:"plan-empty-ico"}),C("span",null,B(e.planModeOn?h(n)("status.planEmptyArmed"):h(n)("status.planEmptyIdle")),1)]))]))}}),y$e=vt(v$e,[["__scopeId","data-v-dea23306"]]),b$e={key:0,class:"qh-chip"},k$e={class:"qtitle"},A$e={class:"qbody"},C$e={class:"qopts"},w$e=["onClick"],x$e={class:"qopt-key"},_$e={class:"qopt-text"},S$e={class:"qopt-label"},M$e={key:0,class:"qopt-desc"},I$e={class:"qopt-label"},E$e=["placeholder"],T$e={class:"qfoot"},L$e={class:"qbtns"},N$e={class:"qhint"},F$e=nt({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:i}=Bt(),s=t,o=G(0),r=G(!1);function l(){r.value&&(r.value=!1)}const a=F(()=>n.question.questions[o.value]),u=F(()=>n.question.questions.length);function c(){o.value>0&&o.value--}function d(){o.value<u.value-1&&o.value++}function f(q){const W=g.value[q];return W?W.kind==="multi"?W.optionIds.length>0:W.kind==="multiWithOther"?W.optionIds.length>0||W.otherText.trim().length>0:W.kind==="other"?W.text.trim().length>0:!0:!1}function p(){return f(a.value.id)}const g=G({});function m(q){return q.recommended===!0?!0:/\b(?:recommended|recommend)\b|推荐/.test(`${q.label} ${q.description??""}`.toLowerCase())}function y(){const q={...g.value};let W=!1;for(const Z of n.question.questions){if(q[Z.id])continue;const ne=Z.options.filter(m);ne.length!==0&&(q[Z.id]=Z.multiSelect?{kind:"multi",optionIds:ne.map(X=>X.id)}:{kind:"single",optionId:ne[0].id},W=!0)}W&&(g.value=q)}Ge(()=>n.question.questionId,()=>{o.value=0,r.value=!1,g.value={},A.value={}}),Ge(()=>n.question,()=>{o.value>=n.question.questions.length&&(o.value=0),y()},{immediate:!0,deep:!0});function w(q,W){const Z=g.value[q];if(Z&&Z.kind==="single"&&Z.optionId===W){const ne={...g.value};delete ne[q],g.value=ne}else g.value={...g.value,[q]:{kind:"single",optionId:W}}}function k(q,W){const Z=g.value[q],ne=Z&&(Z.kind==="multi"||Z.kind==="multiWithOther")?Z.kind==="multi"?[...Z.optionIds]:[...Z.optionIds]:[],X=ne.indexOf(W);X>=0?ne.splice(X,1):ne.push(W);const ue=g.value[q],ie=ue&&ue.kind==="multiWithOther"?ue.otherText:"";ie?g.value={...g.value,[q]:{kind:"multiWithOther",optionIds:ne,otherText:ie}}:g.value={...g.value,[q]:{kind:"multi",optionIds:ne}}}const A=G({}),v=G(null);function x(q){const W=n.question.questions.find(ne=>ne.id===q),Z=A.value[q]??"";if(W.multiSelect){const ne=g.value[q],X=ne&&(ne.kind==="multi"||ne.kind==="multiWithOther")?ne.kind==="multi"?[...ne.optionIds]:[...ne.optionIds]:[];g.value={...g.value,[q]:{kind:"multiWithOther",optionIds:X,otherText:Z}}}else g.value={...g.value,[q]:{kind:"other",text:Z}}}function S(q){x(q),At(()=>v.value?.focus())}function I(q,W){const Z=g.value[q];return Z?Z.kind==="single"?Z.optionId===W:Z.kind==="multi"||Z.kind==="multiWithOther"?Z.optionIds.includes(W):!1:!1}function _(q){const W=g.value[q];return!!(W&&(W.kind==="other"||W.kind==="multiWithOther"))}function E(){return n.question.questions.every(q=>f(q.id))}const N=F(()=>n.busyKind==="answer"),D=F(()=>n.busyKind==="dismiss"),T=F(()=>!!n.busyKind);function $(){if(T.value||!E())return;const q={answers:g.value,method:"click"};s("answer",n.question.questionId,q)}function O(){T.value||s("dismiss",n.question.questionId)}const P=G(0);Ge([o,()=>n.question.questionId],()=>{P.value=0});const{handleCompositionStart:R,handleCompositionEnd:j,isComposingKeyEvent:z}=qr();function K(q){const W=(document.activeElement?.tagName??"").toLowerCase(),Z=W==="input"||W==="textarea";if(q.metaKey||q.ctrlKey||q.altKey||T.value||z(q)||vo.value>0)return;if(q.key==="Enter"){if(q.preventDefault(),r.value)return;o.value<u.value-1&&p()?d():E()&&$();return}if(Z)return;if(q.key==="Escape"){if(vo.value>0||q.defaultPrevented)return;q.preventDefault(),O();return}if(r.value)return;if(q.key==="ArrowDown"||q.key==="ArrowUp"){const X=a.value,ue=X.options.length+(X.allowOther?1:0);if(ue===0)return;q.preventDefault();const ie=q.key==="ArrowDown"?1:-1,Se=Math.min(ue-1,Math.max(0,P.value+ie));if(Se===P.value)return;P.value=Se;const fe=X.options[P.value];fe?X.multiSelect||w(X.id,fe.id):X.allowOther&&!X.multiSelect&&x(X.id);return}if(q.key===" "&&a.value.multiSelect){q.preventDefault();const X=a.value,ue=X.options[P.value];ue?k(X.id,ue.id):X.allowOther&&x(X.id);return}const ne=parseInt(q.key,10);if(!isNaN(ne)&&ne>=1&&ne<=9){q.preventDefault();const X=a.value,ue=ne-1,ie=X.options[ue];ie&&(P.value=ue,X.multiSelect?k(X.id,ie.id):w(X.id,ie.id))}}return gn(()=>document.addEventListener("keydown",K)),Cn(()=>document.removeEventListener("keydown",K)),(q,W)=>(b(),M("div",{class:$e(["qcard",{minimized:r.value}])},[C("div",{class:$e(["qh",{clickable:r.value}]),onClick:l},[u.value>1?(b(),M("span",b$e,B(o.value+1),1)):te("",!0),C("span",k$e,B(a.value.question),1),V(h(rn),{class:"qmin",size:"sm",label:r.value?h(i)("question.expand"):h(i)("question.minimize"),tooltip:r.value?h(i)("question.expand"):h(i)("question.minimize"),onClick:W[0]||(W[0]=It(Z=>r.value=!r.value,["stop"]))},{default:he(()=>[r.value?(b(),de(h(Ce),{key:0,name:"chevron-up",size:"md"})):(b(),de(h(Ce),{key:1,name:"minus",size:"md"}))]),_:1},8,["label","tooltip"]),V(h(rn),{class:"qclose",size:"sm",label:h(i)("question.dismiss"),tooltip:h(i)("question.dismiss"),disabled:T.value,onClick:It(O,["stop"])},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip","disabled"])],2),r.value?te("",!0):(b(),M(Be,{key:0},[C("div",A$e,[a.value.body?(b(),de(h(ql),{key:0,text:a.value.body,class:"qmdbody"},null,8,["text"])):te("",!0),C("div",C$e,[(b(!0),M(Be,null,yt(a.value.options,(Z,ne)=>(b(),M("label",{key:Z.id,class:$e(["qopt",{selected:I(a.value.id,Z.id),highlighted:a.value.multiSelect&&ne===P.value}]),onClick:It(X=>{P.value=ne,a.value.multiSelect?k(a.value.id,Z.id):w(a.value.id,Z.id)},["prevent"])},[C("span",x$e,B(ne+1),1),C("span",{class:$e(["qopt-glyph",a.value.multiSelect?"chk":"rad"])},null,2),C("span",_$e,[C("span",S$e,B(Z.label),1),Z.description?(b(),M("span",M$e,B(Z.description),1)):te("",!0)])],10,w$e))),128)),a.value.allowOther?(b(),M("label",{key:0,class:$e(["qopt",{selected:_(a.value.id),highlighted:a.value.multiSelect&&P.value===a.value.options.length}]),onClick:W[6]||(W[6]=It(Z=>{P.value=a.value.options.length,S(a.value.id)},["prevent"]))},[W[7]||(W[7]=C("span",{class:"qopt-key"},null,-1)),C("span",{class:$e(["qopt-glyph",a.value.multiSelect?"chk":"rad"])},null,2),C("span",I$e,B(a.value.otherLabel??h(i)("question.otherDefault")),1),Nn(C("input",{ref_key:"otherInputEl",ref:v,"onUpdate:modelValue":W[1]||(W[1]=Z=>A.value[a.value.id]=Z),class:"other-input",type:"text",placeholder:a.value.otherLabel??h(i)("question.otherDefault"),onInput:W[2]||(W[2]=Z=>x(a.value.id)),onFocus:W[3]||(W[3]=Z=>x(a.value.id)),onCompositionstart:W[4]||(W[4]=(...Z)=>h(R)&&h(R)(...Z)),onCompositionend:W[5]||(W[5]=(...Z)=>h(j)&&h(j)(...Z))},null,40,E$e),[[Ao,A.value[a.value.id]]])],2)):te("",!0)])]),C("div",T$e,[C("div",L$e,[o.value<u.value-1?(b(),de(h(Ht),{key:0,class:"qmain",size:"md",variant:"primary",disabled:!p(),onClick:d},{default:he(()=>[qe(B(h(i)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(b(),de(h(Ht),{key:1,class:"qmain",size:"md",variant:"primary",disabled:!E(),loading:N.value,onClick:$},{default:he(()=>[qe(B(h(i)("question.submit")),1)]),_:1},8,["disabled","loading"])),u.value>1?(b(),de(h(Ht),{key:2,size:"md",variant:"ghost",disabled:o.value===0||T.value,onClick:c},{default:he(()=>[qe(B(h(i)("question.back")),1)]),_:1},8,["disabled"])):te("",!0),V(h(Ht),{size:"md",variant:"ghost",loading:D.value,disabled:T.value,onClick:O},{default:he(()=>[qe(B(h(i)("question.dismiss")),1)]),_:1},8,["loading","disabled"])]),C("span",N$e,B(h(i)("question.hint")),1)])],64))],2))}}),B$e=vt(F$e,[["__scopeId","data-v-ca95f2cd"]]),$$e={class:"akind"},D$e={key:1,class:"apeek"},z$e={class:"ab"},R$e=["title"],O$e={class:"code-path"},P$e={key:2,class:"body-shell"},j$e={class:"shell-cmd"},H$e={key:0,class:"shell-cwd"},W$e={key:1,class:"shell-danger"},q$e={class:"code-path"},U$e={key:4,class:"body-chip"},K$e={class:"chip-label"},V$e={class:"chip-value"},Z$e={key:0,class:"chip-detail"},G$e={key:5,class:"body-chip"},Q$e={key:0,class:"chip-label"},Y$e={class:"chip-value"},J$e={key:6,class:"body-chip"},X$e={class:"chip-label"},eDe={class:"chip-value"},tDe={key:0,class:"chip-detail"},nDe={key:7,class:"body-chip"},iDe={class:"chip-label"},sDe={class:"chip-value"},oDe={key:0,class:"chip-detail"},rDe={key:8,class:"body-todo"},lDe={class:"todo-glyph"},aDe={key:0,class:"plan-opts"},uDe=["disabled","onClick"],cDe={class:"popt-key"},dDe={class:"popt-text"},fDe={class:"popt-label"},hDe={key:0,class:"popt-desc"},pDe={key:10,class:"body-generic"},gDe={class:"gen-text"},mDe={key:11,class:"feedback-wrap"},vDe=["placeholder"],yDe={class:"feedback-hint"},bDe={class:"af"},kDe={class:"abtns"},ADe={key:0,class:"knum"},CDe={key:0,class:"knum"},wDe=nt({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean},openFile:{type:Function}},emits:["decide"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>{const Z=n.block;return Z.kind!=="plan_review"?null:{plan:Z.plan,path:Z.path,options:Z.options??[]}}),r=G(!1),l=G(null),a=G(!1);function u(){a.value=(l.value?.scrollTop??0)>0}function c(Z){a.value=Z.target.scrollTop>0}const d=G(!1),f=F(()=>{const Z=n.block.kind;return Z==="plan_review"||Z==="diff"||Z==="file"});function p(){r.value&&(r.value=!1)}const g=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function m(){return g.includes(n.block.kind)?n.block.kind:"generic"}function y(){return s(`approval.title.${m()}`)}const w=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""}}),k=G(!1),A=G(""),v=G(null);function x(){n.busy||(k.value=!0,A.value="",setTimeout(()=>v.value?.focus(),0))}function S(){if(n.busy)return;const Z=A.value.trim();o.value?$("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:Z||void 0}):$("feedback",{decision:"rejected",feedback:Z||void 0}),k.value=!1,A.value=""}function I(){n.busy||(k.value=!1,A.value="")}const{handleCompositionStart:_,handleCompositionEnd:E,isComposingKeyEvent:N}=qr();function D(Z){N(Z)||(Z.key==="Enter"&&!Z.shiftKey?(Z.preventDefault(),S()):Z.key==="Escape"&&(Z.preventDefault(),I()))}const T=G(null);Ge(()=>n.busy,Z=>{Z||(T.value=null)});function $(Z,ne){n.busy||(T.value=Z,i("decide",ne))}function O(){$("approve",{decision:"approved"})}function P(){$("approveSession",{decision:"approved",scope:"session"})}function R(){$("reject",{decision:"rejected"})}function j(){$("approvePlan",{decision:"approved"})}function z(Z){$(`option:${Z}`,{decision:"approved",selectedLabel:Z})}function K(){n.busy||x()}function q(){$("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function W(Z){const ne=(document.activeElement?.tagName??"").toLowerCase();if(ne==="input"||ne==="textarea"||Z.metaKey||Z.ctrlKey||Z.altKey||vo.value>0||Z.defaultPrevented)return;if(k.value){Z.key==="Escape"&&(Z.preventDefault(),I());return}if(n.busy||r.value)return;const X=o.value;if(X){if(X.options.length===0){Z.key==="1"?(Z.preventDefault(),j()):Z.key==="2"?(Z.preventDefault(),K()):Z.key==="3"&&(Z.preventDefault(),q());return}Z.key==="1"&&X.options[0]?(Z.preventDefault(),z(X.options[0].label)):Z.key==="2"&&X.options[1]?(Z.preventDefault(),z(X.options[1].label)):Z.key==="3"&&X.options[2]&&(Z.preventDefault(),z(X.options[2].label));return}Z.key==="1"?(Z.preventDefault(),O()):Z.key==="2"?(Z.preventDefault(),P()):Z.key==="3"?(Z.preventDefault(),R()):Z.key==="4"&&(Z.preventDefault(),x())}return gn(()=>document.addEventListener("keydown",W)),Cn(()=>document.removeEventListener("keydown",W)),gp(u),(Z,ne)=>(b(),M("div",{class:$e(["appr",{minimized:r.value}])},[C("div",{class:$e(["ah",{clickable:r.value}]),onClick:p},[C("span",$$e,B(y()),1),e.agentName&&!r.value?(b(),de(h(Pl),{key:0,variant:"neutral",size:"sm"},{default:he(()=>[qe(B(h(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):te("",!0),r.value&&w.value?(b(),M("span",D$e,B(w.value),1)):te("",!0),f.value&&!r.value?(b(),de(h(rn),{key:2,class:"aexpand",size:"sm",label:d.value?h(s)("approval.collapsePlan"):h(s)("approval.expandPlan"),tooltip:d.value?h(s)("approval.collapsePlan"):h(s)("approval.expandPlan"),onClick:ne[0]||(ne[0]=X=>d.value=!d.value)},{default:he(()=>[V(h(Ce),{name:d.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label","tooltip"])):te("",!0),V(h(rn),{class:"amin",size:"sm",label:r.value?h(s)("question.expand"):h(s)("question.minimize"),tooltip:r.value?h(s)("question.expand"):h(s)("question.minimize"),onClick:ne[1]||(ne[1]=It(X=>r.value=!r.value,["stop"]))},{default:he(()=>[r.value?(b(),de(h(Ce),{key:0,name:"chevron-up",size:"md"})):(b(),de(h(Ce),{key:1,name:"minus",size:"md"}))]),_:1},8,["label","tooltip"])],2),r.value?te("",!0):(b(),M(Be,{key:0},[C("div",z$e,[e.block.kind==="plan_review"&&e.block.path?(b(),M("button",{key:0,type:"button",class:"plan-path",title:e.block.path,onClick:ne[2]||(ne[2]=X=>n.openFile?.({path:e.block.path,content:e.block.plan}))},B(e.block.path),9,R$e)):te("",!0),e.block.kind==="diff"?(b(),M("div",{key:1,class:$e(["body-code",{expanded:d.value}])},[C("div",O$e,B(e.block.path),1),e.block.diff.length>0?(b(),de(rl,{key:0,lines:e.block.diff,path:e.block.path},null,8,["lines","path"])):te("",!0)],2)):e.block.kind==="shell"?(b(),M("div",P$e,[C("div",j$e,[ne[6]||(ne[6]=C("span",{class:"shell-dollar"},"$",-1)),qe(" "+B(e.block.command),1)]),e.block.cwd?(b(),M("div",H$e,"cwd: "+B(e.block.cwd),1)):te("",!0),e.block.danger?(b(),M("div",W$e,[V(h(Ce),{name:"alert-triangle",size:"sm",class:"shell-danger-ic"}),C("span",null,B(h(s)("approval.danger",{detail:e.block.danger})),1)])):te("",!0)])):e.block.kind==="file"?(b(),M("div",{key:3,class:$e(["body-code",{expanded:d.value}])},[C("div",q$e,B(e.block.path),1),V(rl,{code:e.block.content,path:e.block.path},null,8,["code","path"])],2)):e.block.kind==="fileop"?(b(),M("div",U$e,[C("span",K$e,B(e.block.op),1),C("span",V$e,B(e.block.path),1),e.block.detail?(b(),M("span",Z$e,B(e.block.detail),1)):te("",!0)])):e.block.kind==="url"?(b(),M("div",G$e,[e.block.method?(b(),M("span",Q$e,B(e.block.method),1)):te("",!0),C("span",Y$e,B(e.block.url),1)])):e.block.kind==="search"?(b(),M("div",J$e,[C("span",X$e,B(h(s)("approval.searchQueryLabel")),1),C("span",eDe,B(e.block.query),1),e.block.scope?(b(),M("span",tDe,B(h(s)("approval.searchScope",{scope:e.block.scope})),1)):te("",!0)])):e.block.kind==="invocation"?(b(),M("div",nDe,[C("span",iDe,B(e.block.kind2),1),C("span",sDe,B(e.block.name),1),e.block.description?(b(),M("span",oDe,B(e.block.description),1)):te("",!0)])):e.block.kind==="todo"?(b(),M("div",rDe,[(b(!0),M(Be,null,yt(e.block.items,(X,ue)=>(b(),M("div",{key:ue,class:"todo-item"},[C("span",lDe,B(X.status==="done"||X.status==="completed"?"✓":"○"),1),C("span",{class:$e(["todo-title",{"todo-done":X.status==="done"||X.status==="completed"}])},B(X.title),3)]))),128))])):e.block.kind==="plan_review"?(b(),M("div",{key:9,class:$e(["body-plan-wrap",{scrolled:a.value}])},[C("div",{ref_key:"planBodyEl",ref:l,class:$e(["body-plan",{expanded:d.value}]),onScroll:c},[V(h(ql),{text:e.block.plan,"open-file":n.openFile},null,8,["text","open-file"])],34),o.value&&o.value.options.length>0?(b(),M("div",aDe,[(b(!0),M(Be,null,yt(o.value.options,(X,ue)=>(b(),M("button",{key:ue,type:"button",class:"popt",disabled:e.busy,onClick:ie=>z(X.label)},[C("span",cDe,B(ue+1),1),C("span",dDe,[C("span",fDe,B(X.label),1),X.description?(b(),M("span",hDe,B(X.description),1)):te("",!0)]),T.value===`option:${X.label}`?(b(),de(h(Ii),{key:0,size:"sm",class:"popt-spin"})):te("",!0)],8,uDe))),128))])):te("",!0)],2)):(b(),M("div",pDe,[C("span",gDe,B(e.block.summary),1)])),k.value?(b(),M("div",mDe,[Nn(C("textarea",{ref_key:"feedbackRef",ref:v,"onUpdate:modelValue":ne[3]||(ne[3]=X=>A.value=X),class:"feedback-ta",placeholder:h(s)("approval.feedbackPlaceholder"),rows:"2",onKeydown:D,onCompositionstart:ne[4]||(ne[4]=(...X)=>h(_)&&h(_)(...X)),onCompositionend:ne[5]||(ne[5]=(...X)=>h(E)&&h(E)(...X))},null,40,vDe),[[Ao,A.value]]),C("div",yDe,B(h(s)("approval.feedbackHint")),1)])):te("",!0)]),C("div",bDe,[C("div",kDe,[k.value?(b(),M(Be,{key:0},[V(h(Ht),{size:"md",variant:"danger-soft",loading:T.value==="feedback",disabled:e.busy,onClick:S},{default:he(()=>[qe(B(h(s)("approval.feedbackSubmit")),1)]),_:1},8,["loading","disabled"]),V(h(Ht),{size:"md",variant:"ghost",disabled:e.busy,onClick:I},{default:he(()=>[qe(B(h(s)("approval.feedbackCancel")),1)]),_:1},8,["disabled"])],64)):o.value?(b(),M(Be,{key:1},[o.value.options.length===0?(b(),de(h(Ht),{key:0,class:"amain",size:"md",variant:"primary",loading:T.value==="approvePlan",disabled:e.busy,onClick:j},{default:he(()=>[ne[7]||(ne[7]=C("span",{class:"knum"},"1",-1)),qe(B(h(s)("approval.approvePlan")),1)]),_:1},8,["loading","disabled"])):te("",!0),V(h(Ht),{size:"md",variant:"ghost",disabled:e.busy,onClick:K},{default:he(()=>[o.value.options.length===0?(b(),M("span",ADe,"2")):te("",!0),qe(B(h(s)("approval.revise")),1)]),_:1},8,["disabled"]),V(h(Ht),{size:"md",variant:"ghost",loading:T.value==="rejectAndExit",disabled:e.busy,onClick:q},{default:he(()=>[o.value.options.length===0?(b(),M("span",CDe,"3")):te("",!0),qe(B(h(s)("approval.rejectAndExit")),1)]),_:1},8,["loading","disabled"])],64)):(b(),M(Be,{key:2},[V(h(Ht),{class:"amain",size:"md",variant:"primary",loading:T.value==="approve",disabled:e.busy,onClick:O},{default:he(()=>[ne[8]||(ne[8]=C("span",{class:"knum"},"1",-1)),qe(B(h(s)("approval.approve")),1)]),_:1},8,["loading","disabled"]),V(h(Ht),{size:"md",variant:"ghost",loading:T.value==="approveSession",disabled:e.busy,onClick:P},{default:he(()=>[ne[9]||(ne[9]=C("span",{class:"knum"},"2",-1)),qe(B(h(s)("approval.approveSession")),1)]),_:1},8,["loading","disabled"]),V(h(Ht),{size:"md",variant:"ghost",loading:T.value==="reject",disabled:e.busy,onClick:R},{default:he(()=>[ne[10]||(ne[10]=C("span",{class:"knum"},"3",-1)),qe(B(h(s)("approval.reject")),1)]),_:1},8,["loading","disabled"]),V(h(Ht),{size:"md",variant:"ghost",disabled:e.busy,onClick:x},{default:he(()=>[ne[11]||(ne[11]=C("span",{class:"knum"},"4",-1)),qe(B(h(s)("approval.feedback")),1)]),_:1},8,["disabled"])],64))])])],64))],2))}}),xDe=vt(wDe,[["__scopeId","data-v-cd852243"]]),_De={class:"taskspane"},SDe={class:"tp-list"},MDe={key:0,class:"tp-empty"},IDe={class:"tp-main"},EDe=["aria-label","onClick"],TDe=["aria-label"],LDe={class:"tp-name"},NDe={key:1,class:"tp-meta"},FDe={key:2,class:"tp-model"},BDe={key:3,class:"tp-model"},$De={key:4,class:"tp-time"},DDe=nt({__name:"TasksPane",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=e,i={active:"tasks.emptyRecent",running:"tasks.emptyRunning",done:"tasks.emptyDone",all:"tasks.emptyTasks"},s=F(()=>i[n.filter??"all"]),o=t,{t:r}=Bt();function l(y){return!!(y.output&&y.output.length>0||y.meta)}function a(y){u(y)&&o("open",y.agentId??y.id)}function u(y){return y.kind==="subagent"||l(y)}function c(y){return typeof y.durationMs!="number"?"":Ma(y.durationMs,{h:r("status.timeUnitHour"),m:r("status.timeUnitMinute"),s:r("status.timeUnitSecond")})}function d(y){return y.state==="done"?r("tasks.stateDone"):y.state==="fail"?r("tasks.stateFail"):y.state==="cancelled"?r("tasks.stateCancelled"):r("tasks.running")}const f=un("modelDisplay"),p=un("subagentEffort");function g(y){if(y.kind==="subagent")return f?.(y.model)}function m(y){if(y.kind==="subagent")return p?.(y.thinkingEffort)}return(y,w)=>(b(),M("div",_De,[C("div",SDe,[e.tasks.length===0?(b(),M("div",MDe,B(h(r)(s.value)),1)):(b(!0),M(Be,{key:1},yt(e.tasks,k=>(b(),M("div",{key:k.id,class:$e(["tp-row",{fail:k.state==="fail",expandable:u(k)}])},[C("div",IDe,[u(k)?(b(),M("button",{key:0,type:"button",class:"tp-open","aria-label":k.name,onClick:A=>a(k)},null,8,EDe)):te("",!0),C("span",{class:"tp-glyph",role:"img","aria-label":d(k)},[k.state==="run"?(b(),de(h(dl),{key:0,status:"running"})):k.state==="done"?(b(),de(h(Ce),{key:1,class:"tp-done",name:"circle-check",size:"sm"})):k.state==="cancelled"?(b(),de(h(Ce),{key:2,class:"tp-cancelled",name:"close",size:"sm"})):(b(),de(h(Ce),{key:3,class:"tp-fail",name:"close",size:"sm"}))],8,TDe),C("span",LDe,B(k.name),1),k.meta?(b(),M("span",NDe,B(k.meta),1)):te("",!0),g(k)?(b(),M("span",FDe,B(g(k)),1)):te("",!0),m(k)?(b(),M("span",BDe,B(m(k)),1)):te("",!0),c(k)?(b(),M("span",$De,B(c(k)),1)):te("",!0),k.state==="run"?(b(),de(h(rn),{key:5,class:"tp-stop",size:"sm",label:h(r)("tasks.stop"),tooltip:h(r)("tasks.stop"),onClick:It(A=>o("cancel",k.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip","onClick"])):te("",!0),u(k)?(b(),de(h(Ce),{key:6,class:"tp-chevron",name:"chevron-right",size:"sm"})):te("",!0)])],2))),128))])]))}}),zDe=vt(DDe,[["__scopeId","data-v-d5a5712a"]]),RDe={key:0,class:"sg-empty"},ODe={key:1,class:"sg-grid"},PDe=["aria-label","onClick"],jDe={class:"sg-top"},HDe={class:"sg-num"},WDe={class:"sg-name"},qDe={key:1,class:"sg-desc"},UDe={class:"sg-foot"},KDe={key:0,class:"sg-model"},VDe={class:"sg-status"},ZDe={class:"sg-state"},GDe={key:0,class:"sg-time"},QDe=nt({__name:"SubagentGrid",props:{tasks:{},filter:{}},emits:["open","cancel"],setup(e,{emit:t}){const n=e,i={active:"tasks.emptyRecent",running:"tasks.emptyRunning",done:"tasks.emptyDone",all:"tasks.emptyTasks"},s=F(()=>i[n.filter??"all"]),o=t,{t:r}=Bt(),l=un("modelDisplay"),a=un("subagentEffort");function u(g){const m=[l?.(g.model),a?.(g.thinkingEffort)].filter(y=>y!==void 0);return m.length>0?m.join(" · "):void 0}function c(g){return r(g==="done"?"tasks.stateDone":g==="fail"?"tasks.stateFail":g==="cancelled"?"tasks.stateCancelled":"tasks.running")}function d(g){return typeof g.durationMs!="number"?"":Ma(g.durationMs,{h:r("status.timeUnitHour"),m:r("status.timeUnitMinute"),s:r("status.timeUnitSecond")})}function f(g,m){return String((g.swarmIndex??m)+1).padStart(2,"0")}function p(g){return!!g.agentId||!!(g.output&&g.output.length>0)}return(g,m)=>e.tasks.length===0?(b(),M("div",RDe,B(h(r)(s.value)),1)):(b(),M("div",ODe,[(b(!0),M(Be,null,yt(e.tasks,(y,w)=>(b(),M("div",{key:y.id,class:$e(["sg-card",[`s-${y.state}`,{openable:p(y)}]])},[p(y)?(b(),M("button",{key:0,type:"button",class:"sg-open","aria-label":y.name,onClick:k=>o("open",y.agentId??y.id)},null,8,PDe)):te("",!0),C("div",jDe,[C("span",HDe,B(f(y,w)),1),C("span",WDe,B(y.name),1)]),y.meta?(b(),M("div",qDe,B(y.meta),1)):te("",!0),C("div",UDe,[u(y)?(b(),M("div",KDe,[V(h(Ce),{name:"robot",size:"sm"}),C("span",null,B(u(y)),1)])):te("",!0),C("div",VDe,[C("span",ZDe,[y.state==="run"?(b(),de(h(dl),{key:0,status:"running"})):y.state==="done"?(b(),de(h(Ce),{key:1,class:"sg-ic-done",name:"circle-check",size:"sm"})):(b(),de(h(Ce),{key:2,name:"close",size:"sm"})),qe(" "+B(c(y.state)),1)]),d(y)?(b(),M("span",GDe,[V(h(Ce),{name:"clock",size:"sm"}),qe(B(d(y)),1)])):te("",!0)])]),y.state==="run"?(b(),de(h(rn),{key:2,class:"sg-cancel",size:"sm",label:h(r)("tasks.stop"),tooltip:h(r)("tasks.stop"),onClick:It(k=>o("cancel",y.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip","onClick"])):te("",!0)],2))),128))]))}}),YDe=vt(QDe,[["__scopeId","data-v-f7e4b600"]]),JDe={class:"todo-card"},XDe={key:0,class:"tc-empty"},eze={class:"tc-name"},tze=nt({__name:"TodoCard",props:{todos:{}},setup(e){const t=e,{t:n}=Bt();return(i,s)=>(b(),M("div",JDe,[t.todos.length===0?(b(),M("div",XDe,[V(h(Ce),{name:"check-list",size:"lg",class:"tc-empty-ico"}),C("span",null,B(h(n)("tasks.emptyTodo")),1)])):te("",!0),(b(!0),M(Be,null,yt(t.todos,(o,r)=>(b(),M("div",{key:r,class:$e(["tc-row",`s-${o.status}`])},[C("span",{class:$e(["tc-glyph",`g-${o.status}`]),"aria-hidden":"true"},[o.status==="in_progress"?(b(),de(h(Ii),{key:0,size:"xs",class:"tc-spin"})):o.status==="done"?(b(),de(h(Ce),{key:1,name:"circle-check",size:"md"})):te("",!0)],2),C("span",eze,B(o.title),1)],2))),128))]))}}),nze=vt(tze,[["__scopeId","data-v-f090f678"]]),F1=nt({__name:"WorkPill",props:{icon:{},active:{type:Boolean},label:{}},emits:["click"],setup(e,{emit:t}){const n=t;return(i,s)=>(b(),de(h($E),{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:s[0]||(s[0]=o=>n("click",o))},{default:he(()=>[V(h(Ce),{name:e.icon,size:"md"},null,8,["name"]),C("span",null,[En(i.$slots,"default")]),En(i.$slots,"meta")]),_:3},8,["active","aria-pressed","aria-label"]))}}),ize={class:"wp-head-tab"},sze={key:0,class:"wp-head-meta"},oze={key:0,class:"wp-head-actions"},rze=nt({__name:"WorkPanelHead",props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(b(),M(Be,null,[C("span",ize,[V(h(Ce),{name:e.icon,size:"md"},null,8,["name"]),C("span",null,B(e.title),1),e.meta?(b(),M("span",sze,B(e.meta),1)):te("",!0)]),t.$slots.actions?(b(),M("span",oze,[En(t.$slots,"actions",{},void 0,!0)])):te("",!0)],64))}}),B1=vt(rze,[["__scopeId","data-v-82048a74"]]),lze={class:"fc-label"},aze=nt({__name:"FilterControl",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,s=F(()=>n.options.find(N=>N.value===n.modelValue)),o=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches?"lg":"md",r=G(null),l=G(!1);let a=0,u=null;async function c(){const N=r.value?.closest(".dock-work-head");if(!N)return;const D=N.querySelector(".wp-head-tab"),T=getComputedStyle(N),$=(parseFloat(T.columnGap)||0)*2,O=N.clientWidth-parseFloat(T.paddingLeft)-parseFloat(T.paddingRight)-$,P=D?.scrollWidth??0;if(!l.value){const j=r.value?.querySelector(".ui-seg");j!==null&&j.offsetWidth>0&&(a=j.offsetWidth)}const R=P+a>O;if(l.value=R,!R){await At();const j=r.value?.querySelector(".ui-seg");j!==null&&j.offsetWidth>0&&(a=j.offsetWidth),l.value=P+a>O}}gn(()=>{const N=r.value?.closest(".dock-work-head");!N||typeof ResizeObserver!="function"||(u=new ResizeObserver(c),u.observe(N),c())}),Ge(l,N=>{!N&&d.value&&w()}),Ge(vo,N=>{N>0&&d.value&&w()}),Ge(()=>n.options,async()=>{a=0,await At(),c()},{flush:"post"});const d=G(!1),f=G(null);function p(){return f.value?.$el??null}const g=G(null),m=G({left:"0px",top:"0px"});async function y(){if(d.value){w();return}d.value=!0,await At(),k(),A(),window.addEventListener("mousedown",S,!0),window.addEventListener("keydown",I,!0),window.addEventListener("resize",k),window.addEventListener("scroll",k,!0)}function w(N){d.value=!1,window.removeEventListener("mousedown",S,!0),window.removeEventListener("keydown",I,!0),window.removeEventListener("resize",k),window.removeEventListener("scroll",k,!0),N?.refocus&&p()?.focus()}function k(){const N=p();if(!N)return;const D=N.getBoundingClientRect(),T=g.value?.offsetHeight??0,$=getComputedStyle(document.documentElement),O=Number.parseFloat($.getPropertyValue("--space-2"))||0,P=Number.parseFloat($.getPropertyValue("--space-1"))||0,R=g.value?.offsetWidth??0,j=Math.min(D.left,Math.max(O,window.innerWidth-R-O));D.bottom+P+T<=window.innerHeight-O?m.value={left:`${j}px`,top:`${D.bottom+P}px`}:m.value={left:`${j}px`,bottom:`${window.innerHeight-D.top+P}px`}}function A(){const N=g.value;if(!N)return;(N.querySelector(".ui-menu-item.is-active")??N.querySelector(".ui-menu-item"))?.focus()}function v(){d.value||y()}function x(N){const D=N.relatedTarget;D&&(g.value?.contains(D)||p()?.contains(D))||w()}function S(N){const D=N.target;if(D){if(g.value?.contains(D)){N.stopImmediatePropagation();return}p()?.contains(D)||w()}}function I(N){N.key==="Escape"&&(N.preventDefault(),N.stopImmediatePropagation(),w({refocus:!0}))}function _(N){if(N.key!=="ArrowDown"&&N.key!=="ArrowUp")return;N.preventDefault();const D=Array.from(g.value?.querySelectorAll(".ui-menu-item")??[]);if(D.length===0)return;const T=D.indexOf(document.activeElement),$=N.key==="ArrowDown"?(T+1)%D.length:(T-1+D.length)%D.length;D[$]?.focus()}function E(N){i("update:modelValue",N),w({refocus:!0})}return Gn(()=>{u?.disconnect(),d.value&&w()}),(N,D)=>(b(),M("span",{ref_key:"root",ref:r,class:"filter-control"},[l.value?(b(),M(Be,{key:0},[V(h($E),{ref_key:"triggerRef",ref:f,class:"fc-trigger","aria-haspopup":"menu","aria-expanded":d.value,onClick:y,onKeydown:[Hr(It(v,["prevent"]),["down"]),Hr(It(v,["prevent"]),["up"])],onFocusout:x},{default:he(()=>[s.value?.icon?(b(),de(h(Ce),{key:0,name:s.value.icon,size:"sm"},null,8,["name"])):te("",!0),C("span",null,B(s.value?.label),1),V(h(Ce),{class:"fc-chevron",name:"chevron-down",size:"sm"})]),_:1},8,["aria-expanded","onKeydown"]),(b(),de(jr,{to:"body"},[d.value?(b(),M("div",{key:0,ref_key:"menuBoxRef",ref:g,class:"fc-menu",style:Vt(m.value),onKeydown:_,onFocusout:x},[V(h(al),null,{default:he(()=>[(b(!0),M(Be,null,yt(e.options,T=>(b(),de(h(yn),{key:T.value,role:"menuitemradio",active:T.value===e.modelValue,"aria-checked":T.value===e.modelValue,size:h(o),onClick:$=>E(T.value)},{default:he(()=>[T.icon?(b(),de(h(Ce),{key:0,name:T.icon,size:"sm","data-icon":T.icon},null,8,["name","data-icon"])):te("",!0),C("span",lze,B(T.label),1),T.value===e.modelValue?(b(),de(h(Ce),{key:1,class:"fc-check",name:"check",size:"sm"})):te("",!0)]),_:2},1032,["active","aria-checked","size","onClick"]))),128))]),_:1})],36)):te("",!0)]))],64)):(b(),de(h(bo),{key:1,"model-value":e.modelValue,options:e.options,size:"md","onUpdate:modelValue":D[0]||(D[0]=T=>i("update:modelValue",T))},null,8,["model-value","options"]))],512))}}),kM=vt(aze,[["__scopeId","data-v-153e0d9c"]]),uze={class:"dock-work-head"},cze={key:0,class:"dock-workbar"},dze={key:0,class:"dw-running"},fze={key:0,class:"dw-running"},hze={class:"dw-count"},pze=nt({__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},planArmed:{type:Boolean},swarmMode:{type:Boolean},goalMode:{type:Boolean},activationBadges:{},models:{},authReady:{type:Boolean},managedSignedIn:{type:Boolean},managedMembership:{},starredIds:{},skills:{},goal:{},dockPanel:{},overlayOpen:{type:Boolean},sessionPlans:{},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","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","login","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const i=e,s=n,{t:o}=Bt(),{confirm:r,isConfirmOpen:l}=ju(),a=F(()=>{switch(i.goal?.status){case"active":return o("status.goalStatusActive");case"paused":return o("status.goalStatusPaused");case"blocked":return o("status.goalStatusBlocked");case"complete":return o("status.goalStatusComplete");default:return""}}),u=F(()=>i.goal?Ma(i.goal.wallClockMs,{h:o("status.timeUnitHour"),m:o("status.timeUnitMinute"),s:o("status.timeUnitSecond")}):"");async function c(){await r({title:o("status.goalCancel"),message:o("status.goalCancelConfirm"),confirmLabel:o("status.goalCancelConfirmYes"),cancelLabel:o("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const d=[{id:"active",labelKey:"tasks.filterRecent",icon:"clock"},{id:"running",labelKey:"tasks.filterRunning",icon:"play"},{id:"done",labelKey:"tasks.filterDone",icon:"circle-check"},{id:"all",labelKey:"tasks.filterAll",icon:"list"}];function f(re,se){return(se.completedAt??se.createdAt??"").localeCompare(re.completedAt??re.createdAt??"")||(se.createdAt??"").localeCompare(re.createdAt??"")}function p(re,se){if(se==="all")return re;if(se==="running")return re.filter(J=>J.state==="run");if(se==="done")return re.filter(J=>J.state!=="run");const U=[];for(const J of re){if(J.state==="run")continue;let ce=U.length;for(;ce>0&&f(U[ce-1],J)>0;)ce--;U.splice(ce,0,J),U.length>5&&(U.length=5)}return[...re.filter(J=>J.state==="run"),...U]}const g=G("active"),m=G("active"),y=F(()=>p(i.bashTasks,g.value)),w=F(()=>p(i.subagentTasks,m.value)),k=F(()=>d.map(re=>({value:re.id,label:o(re.labelKey),icon:re.icon}))),A=F({get:()=>g.value,set:re=>{g.value=re}}),v=F({get:()=>m.value,set:re=>{m.value=re}}),x=F(()=>(i.todos?.length??0)>0&&i.todoDoneCount===(i.todos?.length??0)),S=F(()=>i.bashTasks.some(re=>re.kind==="tool")),I=F(()=>S.value?"tasks.dockTasks":"tasks.dockBash"),_=F(()=>`${o("status.goalLabel")} ${a.value}`.trim()),E=F(()=>i.bashRunning>0?`${o(I.value)} ${i.bashRunning} ${o("tasks.running")}`:o(I.value)),N=F(()=>i.subagentRunning>0?`${o("tasks.dockSubagent")} ${i.subagentRunning} ${o("tasks.running")}`:o("tasks.dockSubagent")),D=F(()=>`${o("tasks.todoProgressTitle")} ${i.todoDoneCount}/${i.todos?.length??0}`),T=F(()=>Object.values(i.sessionPlans??{}).at(-1)),$=F(()=>{const re=T.value?.review?.state;return re?o(`tools.plan.review.${re}`):""});function O(){const re=T.value;re?.path&&i.openFile?.(re.plan?{path:re.path,content:re.plan}:{path:re.path})}const P=G(null),R=F(()=>P.value?.anyPopupOpen===!0),j=F(()=>R.value||i.dockPanel!=null),z=G(null),K=G(null),q=G(!1),W=G("50%");function Z(re,se){const U=se.currentTarget;if(U&&K.value){const J=U.getBoundingClientRect(),ce=K.value.getBoundingClientRect();W.value=`${J.left+J.width/2-ce.left}px`}s("toggle-dock-panel",re)}function ne(re){return P.value?(P.value.loadForEdit(re),!0):!1}function X(re){P.value?.loadAttachmentsForEdit(re)}function ue(){P.value?.focus()}const ie=()=>P.value?.isEmpty?.()??!1;function Se(re){if(!i.dockPanel)return;const se=re.target;se&&(z.value?.contains(se)||se instanceof Element&&se.closest(".ui-pill")||s("close-dock-panel"))}function fe(re){re.key!=="Escape"||re.repeat||NIe(re)||re.defaultPrevented||R.value||l.value||i.overlayOpen||(re.preventDefault(),re.stopImmediatePropagation(),s("close-dock-panel"))}const pe=G(null),Ne=G(!1);function ee(){const re=pe.value;Ne.value=re?re.scrollTop>0:!1}function ye(re){Ne.value=re.target.scrollTop>0}let H=null;Ge(()=>i.dockPanel,async re=>{typeof document<"u"&&(document.removeEventListener("mousedown",Se,!0),document.removeEventListener("keydown",fe,!0),re&&(document.addEventListener("mousedown",Se,!0),document.addEventListener("keydown",fe,!0))),H?.disconnect(),H=null,re?(await At(),ee(),typeof ResizeObserver=="function"&&pe.value&&(H=new ResizeObserver(ee),H.observe(pe.value))):Ne.value=!1},{immediate:!0});let Y=null;function ve(){const re=K.value?.offsetHeight??0;document.documentElement.style.setProperty("--dock-h",`${re}px`);const se=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--p-bp-sm"));q.value=(K.value?.offsetWidth??0)<(Number.isFinite(se)?se:640)}return gn(()=>{LIe(),!(typeof ResizeObserver!="function"||!K.value)&&(Y=new ResizeObserver(ve),Y.observe(K.value),ve())}),Cn(()=>{typeof document<"u"&&(document.removeEventListener("mousedown",Se,!0),document.removeEventListener("keydown",fe,!0)),Y?.disconnect(),Y=null,H?.disconnect(),H=null}),t({loadForEdit:ne,loadAttachmentsForEdit:X,focus:ue,anyPopupOpen:R,isEmpty:ie}),(re,se)=>(b(),M("div",{ref_key:"dockRef",ref:K,class:$e(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":j.value,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":q.value}]]),onClick:se[36]||(se[36]=It(()=>{},["stop"]))},[V(gs,{name:"dock-panel"},{default:he(()=>[e.dockPanel?(b(),M("div",{ref_key:"workPanelRef",ref:z,key:e.dockPanel,class:$e(["dock-work-panel",[`panel-${e.dockPanel}`,{"body-scrolled-up":Ne.value}]]),style:Vt({transformOrigin:`${W.value} 100%`}),onClick:se[11]||(se[11]=It(()=>{},["stop"]))},[C("div",uze,[e.dockPanel==="bash"?(b(),de(B1,{key:0,icon:"terminal",title:h(o)(I.value),meta:`${e.bashRunning} ${h(o)("tasks.running")}`},{actions:he(()=>[V(kM,{modelValue:A.value,"onUpdate:modelValue":se[0]||(se[0]=U=>A.value=U),options:k.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="subagent"?(b(),de(B1,{key:1,icon:"sparkles",title:h(o)("tasks.dockSubagent"),meta:`${e.subagentRunning} ${h(o)("tasks.running")}`},{actions:he(()=>[V(kM,{modelValue:v.value,"onUpdate:modelValue":se[1]||(se[1]=U=>v.value=U),options:k.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="todos"?(b(),de(B1,{key:2,icon:x.value?"check-list":"list",title:h(o)("tasks.todoProgressTitle"),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,["icon","title","meta"])):e.dockPanel==="goal"?(b(),de(B1,{key:3,icon:"target",title:h(o)("status.goalLabel"),meta:u.value},{actions:he(()=>[e.goal?(b(),M(Be,{key:0},[e.goal.status==="active"?(b(),de(h(rn),{key:0,size:"sm",label:h(o)("status.goalPause"),tooltip:h(o)("status.goalPause"),onClick:se[2]||(se[2]=It(U=>s("controlGoal","pause"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"pause",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),e.goal.status==="paused"||e.goal.status==="blocked"?(b(),de(h(rn),{key:1,size:"sm",label:h(o)("status.goalResume"),tooltip:h(o)("status.goalResume"),onClick:se[3]||(se[3]=It(U=>s("controlGoal","resume"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"play",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),V(h(rn),{size:"sm",label:h(o)("status.goalCancel"),tooltip:h(o)("status.goalCancel"),onClick:It(c,["stop"])},{default:he(()=>[V(h(Ce),{name:"power",size:"md"})]),_:1},8,["label","tooltip"]),V(h(rn),{size:"sm",label:h(o)("tasks.closePanel"),tooltip:h(o)("tasks.closePanel"),onClick:se[4]||(se[4]=It(U=>s("close-dock-panel"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])],64)):te("",!0)]),_:1},8,["title","meta"])):e.dockPanel==="plan"?(b(),de(B1,{key:4,icon:"file-edit",title:h(o)("status.planLabel"),meta:$.value},{actions:he(()=>[T.value?.path?(b(),de(h(rn),{key:0,size:"sm",label:h(o)("tasks.openPanel"),tooltip:h(o)("tasks.openPanel"),onClick:It(O,["stop"])},{default:he(()=>[V(h(Ce),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),e.planArmed||e.planMode?(b(),de(h(rn),{key:1,size:"sm",label:h(o)("status.workModeDismiss"),tooltip:h(o)("status.workModeDismiss"),onClick:se[5]||(se[5]=It(U=>s("togglePlan"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"power",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),V(h(rn),{size:"sm",label:h(o)("tasks.closePanel"),tooltip:h(o)("tasks.closePanel"),onClick:se[6]||(se[6]=It(U=>s("close-dock-panel"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])]),_:1},8,["title","meta"])):te("",!0)]),C("div",{ref_key:"workBodyRef",ref:pe,class:"dock-work-body",onScroll:ye},[e.dockPanel==="bash"?(b(),de(zDe,{key:0,tasks:y.value,filter:g.value,onCancel:se[7]||(se[7]=U=>s("cancelTask",U)),onOpen:se[8]||(se[8]=U=>s("openAgent",U))},null,8,["tasks","filter"])):e.dockPanel==="subagent"?(b(),de(YDe,{key:1,tasks:w.value,filter:m.value,onCancel:se[9]||(se[9]=U=>s("cancelTask",U)),onOpen:se[10]||(se[10]=U=>s("openAgent",U))},null,8,["tasks","filter"])):e.dockPanel==="todos"?(b(),de(nze,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(b(),de(l$e,{key:3,goal:e.goal,"open-file":e.openFile},null,8,["goal","open-file"])):e.dockPanel==="plan"?(b(),de(y$e,{key:4,plan:T.value,"plan-mode-on":e.planMode,"open-file":e.openFile},null,8,["plan","plan-mode-on","open-file"])):te("",!0)],544)],6)):te("",!0)]),_:1}),e.hasDockWork||e.planMode||T.value?(b(),M("div",cze,[e.goal?(b(),de(F1,{key:0,icon:"target",label:_.value,active:e.dockPanel==="goal",onClick:se[12]||(se[12]=U=>Z("goal",U))},{meta:he(()=>[C("span",{class:$e(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},B(a.value),3)]),default:he(()=>[qe(B(h(o)("status.goalLabel"))+" ",1)]),_:1},8,["label","active"])):te("",!0),e.planMode||T.value?(b(),de(F1,{key:1,icon:"file-edit",label:h(o)("status.planLabel"),active:e.dockPanel==="plan",onClick:se[13]||(se[13]=U=>Z("plan",U))},{default:he(()=>[qe(B(h(o)("status.planLabel")),1)]),_:1},8,["label","active"])):te("",!0),e.bashTasks.length>0?(b(),de(F1,{key:2,icon:"terminal",label:E.value,active:e.dockPanel==="bash",onClick:se[14]||(se[14]=U=>Z("bash",U))},{meta:he(()=>[e.bashRunning>0?(b(),M("span",dze,[V(h(dl),{status:"running"}),qe(B(e.bashRunning),1)])):te("",!0)]),default:he(()=>[qe(B(h(o)(I.value))+" ",1)]),_:1},8,["label","active"])):te("",!0),e.subagentTasks.length>0?(b(),de(F1,{key:3,icon:"sparkles",label:N.value,active:e.dockPanel==="subagent",onClick:se[15]||(se[15]=U=>Z("subagent",U))},{meta:he(()=>[e.subagentRunning>0?(b(),M("span",fze,[V(h(dl),{status:"running"}),qe(B(e.subagentRunning),1)])):te("",!0)]),default:he(()=>[qe(B(h(o)("tasks.dockSubagent"))+" ",1)]),_:1},8,["label","active"])):te("",!0),(e.todos?.length??0)>0?(b(),de(F1,{key:4,icon:x.value?"check-list":"list",label:D.value,active:e.dockPanel==="todos",onClick:se[16]||(se[16]=U=>Z("todos",U))},{meta:he(()=>[C("span",hze,B(e.todoDoneCount)+"/"+B(e.todos?.length??0),1)]),default:he(()=>[qe(B(h(o)("tasks.todoProgressTitle"))+" ",1)]),_:1},8,["icon","label","active"])):te("",!0)])):te("",!0),e.pendingQuestion?(b(),de(B$e,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:se[17]||(se[17]=(U,J)=>s("answer",U,J)),onDismiss:se[18]||(se[18]=U=>s("dismiss",U))},null,8,["question","busy-kind"])):e.pendingApproval?(b(),de(xDe,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,"open-file":e.openFile,onDecide:se[19]||(se[19]=U=>s("approval",e.pendingApproval.approvalId,U))},null,8,["block","agent-name","busy","open-file"])):(b(),de(jD,{key:3,ref_key:"composerRef",ref:P,"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,"plan-armed":e.planArmed,"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:se[20]||(se[20]=U=>s("submit",U)),onSteer:se[21]||(se[21]=U=>s("steer",U)),onCommand:se[22]||(se[22]=U=>s("command",U)),onInterrupt:se[23]||(se[23]=U=>s("interrupt")),onSetPermission:se[24]||(se[24]=U=>s("setPermission",U)),onSetThinking:se[25]||(se[25]=U=>s("setThinking",U)),onTogglePlan:se[26]||(se[26]=U=>s("togglePlan")),onToggleSwarm:se[27]||(se[27]=U=>s("toggleSwarm")),onToggleGoal:se[28]||(se[28]=U=>s("toggleGoal")),onCreateGoal:se[29]||(se[29]=U=>s("createGoal",U)),onControlGoal:se[30]||(se[30]=U=>s("controlGoal",U)),onFocusGoal:se[31]||(se[31]=U=>s("focusGoal")),onCompact:se[32]||(se[32]=U=>s("compact")),onPickModel:se[33]||(se[33]=U=>s("pickModel")),onSelectModel:se[34]||(se[34]=U=>s("selectModel",U)),onLogin:se[35]||(se[35]=U=>s("login"))},null,8,["session-id","running","working","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","goal","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","starting"]))],2))}}),gze=vt(pze,[["__scopeId","data-v-e91fb967"]]),mze=["aria-label","aria-hidden"],vze={class:"toc-scroll"},yze=["onClick"],bze={class:"toc-label"},kze=240,Aze=nt({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=G(null),r=G(!0);let l=null;function a(){const c=o.value,d=c?.offsetParent;if(!c||!d)return;const f=c.getBoundingClientRect().left,p=d.getBoundingClientRect().right;r.value=p-f>=kze}const u=F(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1);return Ge(u,c=>{l?.disconnect(),l=null,c&&At(()=>{const d=o.value,f=d?.offsetParent;!d||!f||(typeof ResizeObserver<"u"&&(l=new ResizeObserver(a),l.observe(f)),a())})},{immediate:!0}),Gn(()=>{l?.disconnect(),l=null}),(c,d)=>u.value?(b(),M("nav",{key:0,ref_key:"navRef",ref:o,class:$e(["conversation-toc",{"toc-clipped":!r.value||e.occluded}]),"aria-label":h(s)("conversation.toc"),"aria-hidden":r.value&&!e.occluded?void 0:!0},[C("div",vze,[(b(!0),M(Be,null,yt(e.items,f=>(b(),M("button",{key:f.id,type:"button",class:$e(["toc-row",{active:e.activeTurnId===f.id}]),onClick:p=>i("select",f.id)},[d[0]||(d[0]=C("span",{class:"toc-bar"},null,-1)),C("span",bze,B(f.title),1)],10,yze))),128))])],10,mze)):te("",!0)}}),Cze=vt(Aze,[["__scopeId","data-v-b8ba267a"]]),wze={class:"tsearch-main"},xze=["placeholder"],_ze={key:0,class:"tsearch-spin"},Sze=["inert"],Mze={class:"tsearch-foot"},Ize={class:"tsearch-count",role:"status"},Eze={class:"tsearch-rings","aria-hidden":"true"},Tze=800,Lze=400,Nze=1500,Fze=nt({__name:"TranscriptSearch",props:{pane:{},reveal:{},mobile:{type:Boolean,default:!1}},emits:["close"],setup(e,{expose:t,emit:n}){const i=e,s=n,{t:o}=Bt(),{handleCompositionStart:r,handleCompositionEnd:l,isComposingKeyEvent:a}=qr(),u=G(""),c=G(!1),d=G([]),f=G(0),p=G(null),g=F(()=>d.value.length),m=F(()=>u.value.trim()!==""&&!c.value),y=G(!1),w=F(()=>{if(g.value===0)return o("conversation.search.noResults");const Z={current:f.value+1,total:g.value};return y.value?o("conversation.search.resultsCapped",Z):o("conversation.search.results",Z)});let k=null,A=null,v=null,x=null,S=null,I=0;const _=G([]);function E(){const Z=i.pane,ne=d.value[f.value];if(!Z||ne===void 0){_.value=[];return}const X=Z.getBoundingClientRect(),ue=[];for(const ie of ne.getClientRects())ue.push({top:`${ie.top-X.top+Z.scrollTop}px`,left:`${ie.left-X.left}px`,width:`${ie.width}px`,height:`${ie.height}px`});_.value=ue}function N(Z,ne){return Z.type==="attributes"&&Z.target===ne?!0:D(Z)}function D(Z){const ne=X=>X instanceof Element&&(X.classList.contains("tsearch-rings")||X.closest(".tsearch-rings")!==null);if(ne(Z.target))return!0;if(Z.type==="childList"){const X=[...Z.addedNodes,...Z.removedNodes];if(X.length>0&&X.every(ne))return!0}return!1}function T(){_.value.length!==0&&(S!==null&&clearTimeout(S),S=setTimeout(()=>{S=null,E()},120))}function $(){return i.pane?.querySelector(".chat")??null}function O(){if(k!==null&&(clearTimeout(k),k=null),u.value.trim()===""){c.value=!1,P();return}c.value=!0,k=setTimeout(P,Tze)}function P(Z="first"){k!==null&&(clearTimeout(k),k=null),c.value=!1;const ne=$();if(u.value.trim()===""||ne===null){d.value=[],y.value=!1,f.value=0,z3(),E();return}const X=d.value[f.value],ue=X?.startContainer??null,ie=X?.startOffset??0,Se=tse(ne,u.value.trim()),fe=Se.ranges;if(y.value=Se.truncated,d.value=fe,fe.length===0){f.value=0,uy([],0),E();return}if(Z!==!1){const Ne=R(fe);f.value=Z==="backward"?(Ne-1+fe.length)%fe.length:Ne,j();return}const pe=ue!==null?fe.findIndex(Ne=>Ne.startContainer===ue&&Ne.startOffset===ie):-1;f.value=pe>=0?pe:R(fe),uy(fe,f.value),E()}function R(Z){const ne=i.pane?.getBoundingClientRect().top??0,X=Z.findIndex(ue=>{const ie=ue.getClientRects(),Se=ie[ie.length-1];return Se!==void 0&&Se.bottom>=ne});return X===-1?0:X}function j(){const Z=d.value[f.value];uy(d.value,f.value),Z!==void 0&&i.reveal(Z),E()}function z(Z){g.value!==0&&(f.value=(f.value+Z+g.value)%g.value,j())}function K(Z){if(Z.key==="Enter"&&!a(Z)){if(Z.preventDefault(),k!==null){P(Z.shiftKey?"backward":"first");return}z(Z.shiftKey?-1:1)}}function q(Z){Z.key==="Escape"&&(a(Z)||(Z.preventDefault(),Z.stopPropagation(),s("close")))}function W(){const Z=p.value;Z&&(Z.focus(),Z.select())}return t({focusInput:W}),gn(()=>{At(()=>p.value?.focus()),i.pane&&typeof MutationObserver=="function"&&(v=new MutationObserver(ne=>{if(u.value.trim()!==""&&!ne.every(X=>N(X,i.pane))&&k===null){if(Date.now()-I>=Nze){I=Date.now(),A!==null&&(clearTimeout(A),A=null),P(!1);return}A!==null&&clearTimeout(A),A=setTimeout(()=>{A=null,k===null&&(I=Date.now(),P(!1))},Lze)}}),v.observe(i.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),i.pane?.addEventListener("scroll",T,{passive:!0});const Z=[i.pane,i.pane?.querySelector(".content-wrap")??null];if(typeof ResizeObserver=="function"){x=new ResizeObserver(()=>E());for(const ne of Z)ne&&x.observe(ne)}}),Cn(()=>{k!==null&&clearTimeout(k),A!==null&&clearTimeout(A),S!==null&&clearTimeout(S),v?.disconnect(),v=null,x?.disconnect(),x=null,i.pane?.removeEventListener("scroll",T),z3()}),(Z,ne)=>(b(),M("div",{class:$e(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:q},[C("div",wze,[V(h(Ce),{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),Nn(C("input",{ref_key:"inputRef",ref:p,"onUpdate:modelValue":ne[0]||(ne[0]=X=>u.value=X),type:"text",class:"tsearch-input",placeholder:h(o)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:O,onKeydown:K,onCompositionstart:ne[1]||(ne[1]=(...X)=>h(r)&&h(r)(...X)),onCompositionend:ne[2]||(ne[2]=(...X)=>h(l)&&h(l)(...X))},null,40,xze),[[Ao,u.value]]),c.value?(b(),M("span",_ze,[V(h(Ii),{size:"sm",label:h(o)("conversation.search.searching")},null,8,["label"])])):te("",!0),ne[6]||(ne[6]=C("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),V(h(rn),{class:"tsearch-close",size:"sm",label:h(o)("conversation.search.close"),tooltip:h(o)("conversation.search.close"),onClick:ne[3]||(ne[3]=X=>s("close"))},{default:he(()=>[V(h(Ce),{name:"close"})]),_:1},8,["label","tooltip"])]),C("div",{class:$e(["tsearch-foot-wrap",{open:m.value}]),inert:!m.value},[C("div",Mze,[V(h(rn),{size:"sm",label:h(o)("conversation.search.previous"),tooltip:h(o)("conversation.search.previous"),disabled:g.value===0,onClick:ne[4]||(ne[4]=X=>z(-1))},{default:he(()=>[V(h(Ce),{name:"arrow-up"})]),_:1},8,["label","tooltip","disabled"]),V(h(rn),{size:"sm",label:h(o)("conversation.search.next"),tooltip:h(o)("conversation.search.next"),disabled:g.value===0,onClick:ne[5]||(ne[5]=X=>z(1))},{default:he(()=>[V(h(Ce),{name:"arrow-down"})]),_:1},8,["label","tooltip","disabled"]),C("span",Ize,B(w.value),1)])],10,Sze),e.pane?(b(),de(jr,{key:0,to:e.pane},[C("div",Eze,[(b(!0),M(Be,null,yt(_.value,(X,ue)=>(b(),M("div",{key:ue,class:"tsearch-ring",style:Vt(X)},null,4))),128))])],8,["to"])):te("",!0)],34))}}),Bze=vt(Fze,[["__scopeId","data-v-26f3fed5"]]),$ze="/assets/k3_doodle1-27EZ2HSw.riv",Dze={class:"doodle-host"},zze={key:0,class:"doodle-fallback"},Rze=nt({__name:"KimiDoodle",setup(e){const t=G(!1),n=G(null),i=ov();let s=null;return gn(async()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches)try{let o=function(){const g=d.stateMachineNames[0];if(!g)return;const m=(d.stateMachineInputs(g)??[]).find(y=>y.name==="light/dark");m&&(m.value=i.value?1:0)};const[{Rive:r,RuntimeLoader:l},a,u]=await Promise.all([Ji(()=>import("./rive-CeXCFBdn.js").then(g=>g.r),__vite__mapDeps([10,3])),Ji(()=>import("./rive-BxcgqsjB.js"),[]).then(g=>g.default),Ji(()=>import("./rive_fallback-ByshBW-N.js"),[]).then(g=>g.default)]),c=n.value;if(!c)return;l.setWasmUrl(a),l.setWasmFallbackUrl(u);const d=new r({canvas:c,src:$ze,autoplay:!0,onLoad(){const g=d.stateMachineNames[0];g&&d.play(g),requestAnimationFrame(()=>{n.value&&(o(),d.resizeDrawingSurfaceToCanvas(),t.value=!0)})}}),f=Ge(i,o),p=()=>d.resizeDrawingSurfaceToCanvas();window.addEventListener("resize",p),s=()=>{f(),window.removeEventListener("resize",p),d.cleanup()}}catch{}}),Gn(()=>{s?.(),s=null}),(o,r)=>(b(),M("div",Dze,[t.value?te("",!0):(b(),M("div",zze,[En(o.$slots,"fallback",{},void 0,!0)])),C("canvas",{ref_key:"canvasRef",ref:n,class:$e(["doodle-canvas",{ready:t.value}]),role:"img","aria-label":"Kimi"},null,2)]))}}),Oze=vt(Rze,[["__scopeId","data-v-b7d865dd"]]),Pze={class:"empty-hint"},jze={class:"empty-hint-title"},Hze={key:1,class:"empty-hint-title is-starting"},Wze={key:2,class:"empty-hint-text"},qze={key:0,class:"upgrade-banner"},Uze={class:"upgrade-banner-text"},Kze={class:"ws-bar"},Vze={key:0,class:"ws-anchor"},Zze=["aria-expanded"],Gze={class:"ws-chip-name"},Qze={class:"ws-caption"},Yze=["onClick"],Jze={class:"ws-info"},Xze={class:"ws-name"},eRe={class:"ws-path"},tRe=["aria-label"],nRe={key:0,class:"undo-toast",role:"status","aria-live":"polite"},iRe={class:"undo-toast-text"},sRe=48,$1=80,AM=1e3,oRe=420,rRe=3e3,lRe=5e3,aRe=1e4,uRe=2500,cRe=nt({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},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:{},turnError:{},turnRetry:{},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:i}=Bt(),s=e,o=n,r=G(!1),l=G(!1),a=G(null),u=F(()=>s.workspaces?.find(we=>we.id===s.activeWorkspaceId)?.name??s.workspaceName??""),c=F(()=>(s.workspaces?.length??0)>0),d=F(()=>s.authReady===!1&&(s.models?.length??0)===0&&s.managedSignedIn===!0&&s.managedMembership==="free"),f=F(()=>mse(s.workspaces??[],s.activeWorkspaceId));function p(me){if(r.value){r.value=!1;return}const we=me.currentTarget?.closest(".ws-anchor"),Ze=we?.closest(".panes");if(we instanceof HTMLElement&&Ze instanceof HTMLElement){const Nt=we.getBoundingClientRect(),sn=Ze.getBoundingClientRect(),hn=sn.bottom-Nt.bottom-4,qn=Nt.top-sn.top-4;l.value=qn>hn;const bi=Math.max(0,Math.floor(l.value?qn:hn));a.value=`min(calc(var(--space-8) * 10), ${bi}px)`}else l.value=!1,a.value=null;r.value=!0}function g(me){r.value=!1,me!==s.activeWorkspaceId&&o("selectWorkspace",me)}sr(cn.contentAlign);const m=G(null),y=G(null),w=G(null),k=G(!1);let A=null;function v(me,we){const Ze=w.value??y.value;return!Ze||Ze.loadForEdit(me)===!1?!1:(Ze.loadAttachmentsForEdit(we??[]),!0)}function x(){k.value=!0,A!==null&&clearTimeout(A),A=setTimeout(()=>{A=null,k.value=!1},2e3)}const S=F(()=>s.tasks.filter(me=>me.kind==="bash"||me.kind==="tool"&&!me.id.startsWith("question-"))),I=F(()=>s.tasks.filter(me=>me.kind==="subagent"&&me.runInBackground)),_=F(()=>S.value.filter(me=>me.state==="run").length),E=F(()=>I.value.filter(me=>me.state==="run").length);function N(me){const we=s.tasks,Ze=we.find(sn=>sn.id===me)??we.find(sn=>sn.parentToolCallId===me);if(Ze?.agentId)return Ze.agentId;const Nt=we.filter(sn=>sn.kind==="subagent"&&!sn.parentToolCallId&&sn.agentId);if(Nt.length===1)return Nt[0].agentId}Pn("resolveAgentTaskId",N);const D=un("modelDisplay"),T=un("subagentEffort");function $(me,we){const Ze=we??N(me);if(Ze===void 0)return;const Nt=s.tasks.find(qn=>qn.agentId===Ze||qn.id===Ze),sn=D?.(Nt?.model),hn=T?.(Nt?.thinkingEffort);if(!(sn===void 0&&hn===void 0))return{display:sn,effort:hn}}Pn("resolveAgentModel",$),Pn("pinScroll",ai);const O=F(()=>(s.todos??[]).filter(me=>me.status==="done").length),P=F(()=>s.goal!=null||S.value.length>0||I.value.length>0||(s.todos?.length??0)>0),R=G(null),j=F(()=>s.gitInfo?s.changes?.length??0:0);function z(me){R.value=R.value===me?null:me}function K(){R.value=null}function q(){s.goal&&(R.value="goal")}Ge(()=>[s.goal,S.value.length,I.value.length,s.todos?.length,s.planMode,s.sessionPlans],()=>{const me=R.value;if(me===null)return;me==="goal"&&s.goal!=null||me==="bash"&&S.value.length>0||me==="subagent"&&I.value.length>0||me==="todos"&&(s.todos?.length??0)>0||me==="plan"&&(s.planMode===!0||Object.keys(s.sessionPlans??{}).length>0)||K()});function W(me){if(me.role==="compaction")return i("conversation.compactedPlain");if(me.role==="user"){if(me.skillActivation)return`/${me.skillActivation.name}`;if(me.pluginCommand)return`/${me.pluginCommand.pluginId}:${me.pluginCommand.commandName}`;const Ze=me.text.trim().replaceAll(/\s+/g," ");return Ze.length>0?Ze:"user"}const we=(me.text||me.thinking||"").trim().replaceAll(/\s+/g," ");return we.length>0?we:(me.tools?.length??0)>0?`${me.tools.length} tools`:"kimi"}const Z=F(()=>s.turns.filter(me=>me.role==="user").map((me,we)=>({id:me.id,role:me.role,no:we+1,title:W(me)}))),ne=G(null);function X(){const me=J.value;if(!me)return;const we=Z.value;if(we.length===0)return;if(je()<=$1){ne.value=we[we.length-1].id;return}if(ie||ue===null){const hn=me.scrollTop,qn=me.getBoundingClientRect().top,bi=[];for(const Ks of me.querySelectorAll(".turn-anchor[data-turn-id]")){const Ku=Ks.dataset.turnId;Ku&&bi.push({id:Ku,top:Ks.getBoundingClientRect().top-qn+hn})}ue=bi,ie=!1}const Ze=new Set(we.map(hn=>hn.id)),Nt=me.scrollTop+me.clientHeight/2;let sn=null;for(const hn of ue)Ze.has(hn.id)&&hn.top<=Nt&&(sn=hn.id);ne.value=sn??we[0].id}let ue=null,ie=!0;function Se(){ie=!0}let fe=0;function pe(){fe||(fe=ii(()=>{fe=0,X()}))}const Ne=G(!1);let ee=0;function ye(){ee||(ee=ii(()=>{ee=0,Y()}))}function H(){ye(),Se()}function Y(){const me=J.value,we=!s.mobile&&me?me.closest(".con")?.querySelector(".conversation-toc"):null,Ze=we?.querySelector(".toc-bar");let Nt=!1;if(me&&we&&Ze){const sn=Ze.getBoundingClientRect(),hn=we.getBoundingClientRect(),qn=sn.left+sn.width/2;Nt=Array.from(me.querySelectorAll(".table-node-wrapper")).some(bi=>{const Ks=bi.getBoundingClientRect();return Ks.left<=qn&&qn<=Ks.right&&Ks.top<hn.bottom&&Ks.bottom>hn.top})}Ne.value!==Nt&&(Ne.value=Nt)}const ve=F(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),re=F(()=>{const me=ve.value;if(me)return s.pendingQuestionActions?.[me.questionId]}),se=F(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),U=F(()=>{const me=se.value;return me?!!s.pendingApprovalActions?.[me.approvalId]:!1}),J=G(null),ce=G(null),ge=G(0),Me=G(0),Pe=G(!1),ke=G(null);let Le=null;function it(){if(s.turns.length!==0){if(Pe.value){ke.value?.focusInput();return}Le=document.activeElement,Pe.value=!0}}function Fe(){Pe.value=!1,At(()=>{Le instanceof HTMLElement&&Le.isConnected&&Le.focus(),Le=null})}Ge(()=>s.turns.length===0&&!s.sessionLoading,me=>{me&&Pe.value&&Fe()});const De=F(()=>({"--panes-scrollbar-width":`${ge.value}px`})),Ke=F(()=>({"--chat-dock-height":`${Me.value+sRe}px`}));function gt(me){return me instanceof HTMLElement?me:me&&"$el"in me&&me.$el instanceof HTMLElement?me.$el:null}let lt=0;function ft(){lt||(lt=ii(()=>{lt=0;const me=J.value,we=me?Math.max(0,me.offsetWidth-me.clientWidth):0;we!==ge.value&&(ge.value=we);const Ze=ce.value?.offsetHeight??0;Ze!==Me.value&&(Me.value=Ze)}))}function Lt(me){const we=gt(me);we!==J.value&&(J.value=we,we&&ur())}function bn(me){const we=gt(me);we!==ce.value&&(ce.value=we??null,me&&"loadForEdit"in me&&typeof me.loadForEdit=="function"&&"focus"in me&&typeof me.focus=="function"?w.value={loadForEdit:me.loadForEdit.bind(me),loadAttachmentsForEdit:"loadAttachmentsForEdit"in me&&typeof me.loadAttachmentsForEdit=="function"?me.loadAttachmentsForEdit.bind(me):()=>{},focus:me.focus.bind(me),get anyPopupOpen(){return"anyPopupOpen"in me&&me.anyPopupOpen===!0},isEmpty:"isEmpty"in me&&typeof me.isEmpty=="function"?me.isEmpty.bind(me):void 0}:w.value=null,ar())}const Gt=G(!0),Qt=G(!1),kn=G(!1);let _n=null;function je(){const me=J.value;return me?mi-me.scrollTop-xo:0}let st=0,Ue=0,Ft=0,Ct=0,Fn=0,In=0,ks=0;function Zt(){return Date.now()<Ue}function li(){ye(),kn.value=!0,_n&&clearTimeout(_n),_n=setTimeout(()=>{kn.value=!1,_n=null},900);const me=J.value;if(!me)return;const we=me.scrollTop;if(Ot()){st=we;return}if(performance.now()-Ft<100){st=we;return}const Ze=je();if(Zt()){Gt.value=!0,Qt.value=!1,st=we;return}we<st-1&&Ze>1?me.scrollHeight-we-me.clientHeight>1&&(Gt.value=!1,Qt.value=!0):Ze<=$1&&we>st+1&&Date.now()>=Ct&&(Gt.value=!0,Qt.value=!1),st=we,pe()}function Rn(me=!1){const we=J.value;Gt.value=!0,Qt.value=!1,Ei(),we&&(!me&&performance.now()<Fn||(me?Qn():we.scrollTop=Math.max(we.scrollTop,mi),st=we.scrollTop))}let Sn=0;function Qn(me=320){const we=J.value;if(!we)return;if(Sn&&(On(Sn),Sn=0),typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){we.scrollTop=we.scrollHeight,st=we.scrollTop;return}const Ze=we.scrollTop,Nt=performance.now();Ft=Nt,Fn=Nt+me+oRe;const sn=()=>{Sn=0;const hn=Math.min(1,(performance.now()-Nt)/me),qn=1-Math.pow(1-hn,3);we.scrollTop=Ze+(we.scrollHeight-Ze)*qn,st=we.scrollTop,hn<1?Sn=ii(sn):Fn=0};Sn=ii(sn)}function os(me,we){return(we.closest("[inert]")?.closest(".tool-group, .activity-run, .turn-fold")??we).getBoundingClientRect().top-me.getBoundingClientRect().top+me.scrollTop}function As(me,we){const Ze=Array.from(me.querySelectorAll(".turn-anchor[data-turn-id], [data-scroll-anchor-id]")).map(hn=>({node:hn,top:os(me,hn)})),Nt=Ze.findIndex(hn=>hn.top>=we),sn=Nt<0?Math.max(0,Ze.length-1):Nt;return Ze.slice(sn,sn+2).flatMap(hn=>{const qn=hn.node.dataset.scrollAnchorId,bi=qn??hn.node.dataset.turnId;return bi?[{kind:qn?"tool":"turn",id:bi,top:hn.top}]:[]})}const Tt=new Map;function Ci(me,we){for(const Ze of we.anchors){const Nt=Ze.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",sn=me.querySelector(`[${Nt}="${Co(Ze.id)}"]`);if(sn)return os(me,sn)-Ze.top}return me.scrollHeight-we.oldHeight}function rs(me,we,Ze=me.scrollTop){return me.scrollTop=Ze+Ci(me,we),st=me.scrollTop,me.scrollTop}async function Bn(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||as.value||!s.hasMoreMessages)return;const me=s.sessionId,we=J.value,Ze=we?.scrollTop??0,Nt={anchors:we?As(we,Ze):[],oldHeight:we?.scrollHeight??0};Oo(me,!0),ht();try{if(await At(),await s.loadOlderMessages(me),await At(),s.sessionId!==me){Tt.set(me,Nt);return}const sn=J.value;if(!sn)return;rs(sn,Nt),Tt.delete(me)}finally{Oo(me,!1)}}function Co(me){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(me):me.replaceAll(/["\\]/g,"\\$&")}let Mi=null;function Ei(){Mi!==null&&(clearTimeout(Mi),Mi=null)}function ro(me){Ie(),Gt.value=!1,Qt.value=je()>$1,me.scrollIntoView({behavior:"smooth",block:"center"}),Ei(),Mi=setTimeout(()=>{Mi=null;const we=J.value;if(!we||!me.isConnected)return;const Ze=me.getBoundingClientRect().top+me.offsetHeight/2-(we.getBoundingClientRect().top+we.clientHeight/2);Math.abs(Ze)>48&&(we.scrollTop+=Ze)},480)}function zi(me){const we=J.value;if(!we)return;const Ze=we.querySelector(`.turn-anchor[data-turn-id="${Co(me)}"]`);Ze&&ro(Ze)}function Hs(me,we){const Ze=me.startContainer.parentElement;if(Ze!==null)for(let Nt=Ze;Nt!==null&&Nt!==we;Nt=Nt.parentElement){const sn=getComputedStyle(Nt),hn=/(auto|scroll)/.test(sn.overflowY)&&Nt.scrollHeight>Nt.clientHeight,qn=/(auto|scroll)/.test(sn.overflowX)&&Nt.scrollWidth>Nt.clientWidth;if(!hn&&!qn)continue;const bi=me.getClientRects()[0];if(!bi)return;const Ks=Nt.getBoundingClientRect();hn&&(Nt.scrollTop+=bi.top+bi.height/2-(Ks.top+Nt.clientHeight/2)),qn&&(Nt.scrollLeft+=bi.left+bi.width/2-(Ks.left+Nt.clientWidth/2))}}function wo(me){const we=J.value;if(!we)return;const Ze=me.startContainer.parentElement;Ie(),Gt.value=!1,Qt.value=je()>$1,Ct=Date.now()+700;const Nt=Ze?.closest(".u-text-wrap.is-clamped");if(Nt){Nt.querySelector(".u-text-toggle")?.click(),At(()=>Cs(me,we));return}Cs(me,we)}function Cs(me,we){const Ze=me.startContainer.parentElement;Hs(me,we);const Nt=me.getClientRects()[0];if(!Nt){Ze instanceof HTMLElement&&ro(Ze);return}const sn=we.getBoundingClientRect(),hn=Nt.top+Nt.height/2-(sn.top+we.clientHeight/2),qn=typeof window>"u"||!window.matchMedia("(prefers-reduced-motion: reduce)").matches;we.scrollTo({top:we.scrollTop+hn,behavior:qn?"smooth":"auto"}),Ei(),Mi=setTimeout(()=>{Mi=null;const bi=J.value,Ks=me.getClientRects()[0];if(!bi||!Ks)return;const Ku=bi.getBoundingClientRect(),Gf=Ks.top+Ks.height/2-(Ku.top+bi.clientHeight/2);Math.abs(Gf)>48&&(bi.scrollTop+=Gf)},480)}function Ti(){const me=J.value;if(!me)return"none";const we=me.firstElementChild,Ze=we instanceof HTMLElement?we.offsetHeight:0,Nt=ce.value?.offsetHeight??0;return`${me.scrollHeight}:${me.clientHeight}:${Ze}:${Nt}`}function ii(me){return typeof requestAnimationFrame=="function"?requestAnimationFrame(me):setTimeout(me,16)}function On(me){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(me):clearTimeout(me)}let $n=0,Tn=0,tt=null,Je=0;const Rt=G(!1);function Ot(){return performance.now()<$n}function ai(me,we=200){const Ze=J.value;if(!Ze||as.value||(Ie(),Gt.value=!1,tt=me,Je=me.getBoundingClientRect().top,$n=performance.now()+we,Rt.value=!0,Tn))return;const Nt=()=>{if(Tn=0,!tt)return;if(Gt.value){tt=null,Rt.value=!1;return}if(performance.now()>=$n){tt=null,Rt.value=!1,Ns();return}const sn=tt.getBoundingClientRect().top-Je;sn&&(Ze.scrollTop+=sn),Tn=ii(Nt)};Tn=ii(Nt)}function Ns(){je()<=$1?(Gt.value=!0,Qt.value=!1):(Gt.value=!1,Qt.value=!0)}function Ln(me=36,we){if(!Gt.value&&!Zt()){we?.();return}const Ze=++ks;let Nt="",sn=0,hn=0;In&&(On(In),In=0);const qn=()=>{if(In=0,Ze!==ks)return;if(!Gt.value&&!Zt()){we?.();return}Rn(!1);const bi=Ti();sn=bi===Nt?sn+1:0,Nt=bi,hn++,sn<3&&hn<me?In=ii(qn):we?.()};In=ii(qn)}function ls(me,we){return me!==void 0&&me.length>0&&we.length>=me.length&&me.firstId!==we.firstId&&me.lastId===we.lastId&&me.lastTextLen===we.lastTextLen&&me.lastThinkingLen===we.lastThinkingLen&&me.lastToolsLen===we.lastToolsLen&&me.approvalIds===we.approvalIds}const ts=F(()=>{const me=(s.approvals??[]).map(hn=>hn.approvalId).join(","),we=s.turns,Ze=we.at(-1),Nt=Ze?.thinking?.length??0,sn=Ze?.tools?.reduce((hn,qn)=>hn+qn.name.length+(qn.arg?.length??0)+(qn.output?.join("").length??0),0)??0;return{length:we.length,firstId:we[0]?.id??"",lastId:Ze?.id??"",lastTextLen:Ze?.text.length??0,lastThinkingLen:Nt,lastToolsLen:sn,approvalIds:me}});let Vi=s.fileReloadKey;Ge(ts,async(me,we)=>{const Ze=s.fileReloadKey,Nt=Ze!==Vi;if(Vi=Ze,as.value&&ls(we,me)){pe();return}if(Nt){pe();return}await At(),Gt.value||Zt()?Rn(me.length<we.length):Qt.value=!0,pe()}),Ge(ce,()=>{ar()}),Ge(()=>s.mobile,async()=>{await At(),ft()});const gi=new Map,an=G(!1);let Zi=0,Ri=null;function Vl(){an.value=!0,Zi&&(On(Zi),Zi=0),Ri&&clearTimeout(Ri),Ri=setTimeout(()=>{an.value=!1,Ri=null},1200)}function Ro(){if(!an.value)return;let me=2;const we=()=>{if(Zi=0,me--,me>0){Zi=ii(we);return}an.value=!1,Ri&&(clearTimeout(Ri),Ri=null)};Zi&&On(Zi),Zi=ii(we)}Ge(()=>s.fileReloadKey,async(me,we)=>{const Ze=J.value;we&&Ze&&gi.set(String(we),{top:Ze.scrollTop,following:Gt.value}),Ie(),Vl(),await At();const Nt=J.value,sn=me?gi.get(String(me)):void 0;if(sn&&Nt){const hn=Tt.get(String(me)),qn=hn?rs(Nt,hn,sn.top):sn.top;hn&&Tt.delete(String(me)),Gt.value=sn.following,Nt.scrollTop=qn,st=Nt.scrollTop,Qt.value=!sn.following&&je()>1,sn.following?Ln(36,Ro):Ro()}else Gt.value=!0,st=0,Rn(!1),Ln(36,Ro);Se(),X()}),Ge(()=>s.sessionLoading,async(me,we)=>{me||!we||(Gt.value=!0,await At(),Ln(36,Ro),pe())}),Ge(()=>s.turnActive,async(me,we)=>{me||!we||!Gt.value&&!Zt()||(await At(),Ln(48),pe())});function Sr(){Gt.value=!0,Qt.value=!1,Ue=Date.now()+AM,At(()=>{Rn(!0),Ln(16)})}function Ws(me){Sr(),o("submit",me)}function Li(me){Gt.value=!0,Qt.value=!1,Ue=Date.now()+AM,o("editMessage",me)}function Oi(me){const we=s.queued?.[me],Ze=we?.text??"";v(Ze,we?.attachments)&&o("editQueued",me)}function Zl(me){o("reorderQueue",me)}function Fs(me,we){Sr(),o("answer",me,we)}function rr(me,we){!me||!we||o("approval",me,we)}let qs=null,Pi=null,ws=null,lo=null,mi=0,xo=0,ao=0;const Us=G(new Set),as=F(()=>!!s.sessionId&&Us.value.has(s.sessionId));function Oo(me,we){const Ze=new Set(Us.value);we?Ze.add(me):Ze.delete(me),Us.value=Ze}function lr(){as.value||ao||(ao=ii(()=>{ao=0,!as.value&&(Ot()||(Gt.value||Zt())&&Rn(!1))}))}function ht(){ks++,In&&(On(In),In=0),ao&&(On(ao),ao=0)}function Ie(){const me=J.value;if(Ue=0,Ct=0,ht(),$n=0,tt=null,Rt.value=!1,Sn&&(On(Sn),Sn=0),Ei(),me){const we=me.scrollTop;typeof me.scrollTo=="function"?me.scrollTo({top:we,behavior:"auto"}):me.scrollTop=we}Fn=0,Ft=Number.NEGATIVE_INFINITY,me&&(st=me.scrollTop)}function Ve(){const me=J.value;!me||me.scrollHeight-me.clientHeight<=1&&!s.hasMoreMessages||(Gt.value=!1,Ie(),me.scrollHeight-me.clientHeight>1&&(Qt.value=!0))}function on(me){const we=J.value;if(!we)return!1;for(const Ze of me.composedPath()){if(Ze===we)return!1;if(Ze instanceof HTMLElement&&Ze.scrollHeight>Ze.clientHeight+1&&Ze.scrollTop>1)return!0}return!1}function wi(me){me.defaultPrevented||me.ctrlKey||me.shiftKey||(Ei(),!(me.deltaY>=0||on(me))&&Ve())}function Po(me){const we=J.value;if(!we||me.defaultPrevented||me.button!==0||me.pointerType==="touch")return;const Ze=we.getBoundingClientRect(),Nt=we.offsetWidth-we.clientWidth,sn=Nt>0?Nt:12;me.target===we&&me.clientX>=Ze.right-sn&&Ve()}let vi=null;function bl(me){vi=me.touches.length===1?me.touches[0].clientY:null}function jo(me){const we=me.touches.length===1?me.touches[0].clientY:null;Ei(),we!==null&&vi!==null&&we>vi+2&&!on(me)&&Ve(),vi=we}function Mr(){if(!Pi)return;const me=J.value?.firstElementChild??null;me!==ws&&(ws&&Pi.unobserve(ws),ws=me,me&&Pi.observe(me))}function ar(){if(!Pi)return;const me=ce.value;me!==lo&&(lo&&Pi.unobserve(lo),lo=me,me&&Pi.observe(me))}function ur(){const me=J.value;ft(),qs&&(qs.disconnect(),me&&qs.observe(me,{childList:!0,subtree:!0,characterData:!0})),Pi&&(Pi.disconnect(),ws=null,lo=null,me&&Pi.observe(me),Mr(),ar()),mi=me?.scrollHeight??0,xo=me?.clientHeight??0,ye(),Se()}function uo(){Mr(),lr(),ye(),Se()}function Gl(){typeof document>"u"||document.visibilityState==="visible"&&Gt.value&&Ln()}const oe=G(!1);let Ae=null;function _e(){oe.value=!0,Ae!==null&&clearTimeout(Ae),Ae=setTimeout(()=>{oe.value=!1},rRe)}const Oe=G(null);let Qe=null;const Ye=G(null);let xt=null,bt=!1;function nn(){Oe.value=null,Ye.value=null,bt=!1,Qe!==null&&(clearTimeout(Qe),Qe=null),xt!==null&&(clearTimeout(xt),xt=null)}function Pt(){for(let me=s.turns.length-1;me>=0;me--){const we=s.turns[me];if(we.goalContinuation)return null;if(we.role==="user")return we}return null}function wn(me){return ba(me).some(we=>we.kind==="thinking"&&we.thinking.trim().length>0||we.kind==="text"&&we.text.trim().length>0||we.kind==="tool")}function Yn(){if(Oe.value!==null||Ye.value!==null||!s.working||(s.queued?.length??0)>0)return;const me=Pt();if(me===null||me.skillActivation!==void 0||me.pluginCommand!==void 0)return;s.turns.slice(s.turns.indexOf(me)+1).every(Ze=>Ze.role==="assistant"&&!wn(Ze))?(Ye.value=me.id,bt=!1,xt=setTimeout(()=>{Ye.value=null},aRe)):Oe.value=me.id}let $t=!1,Wt=null;function Wn(me){if($t)return;nn();const we=s.turns.find(Nt=>Nt.id===me);we===void 0||we.role!=="user"||Pt()?.id!==we.id||(w.value??y.value)?.isEmpty?.()===!1||($t=!0,Wt=setTimeout(()=>{$t=!1,Wt=null},uRe),Li({text:we.text,attachments:we.attachments}))}function Ee(){Ye.value===null||s.working||!bt||Wn(Ye.value)}Ge(()=>s.working,(me,we)=>{if(!(we!==!0||me)){if(Ye.value!==null){Ee();return}Oe.value!==null&&Qe===null&&(Qe=setTimeout(()=>{Oe.value=null,Qe=null},lRe))}}),Ge(()=>Pt()?.id??null,(me,we)=>{me!==we&&nn()}),Ge(()=>s.sessionId,nn),Ge(()=>s.queued?.length,me=>{(me??0)>0&&nn()});const ct=F(()=>{if(s.lastTurnReason!=="cancelled"||s.working||s.turnActive)return null;const me=s.turns[s.turns.length-1];return me?.role==="assistant"&&wn(me)?me.id:null}),dt=F(()=>s.lastTurnReason==="failed"&&!s.working&&!s.turnActive&&s.turns.length>0);function qt(){Sr(),o("submit",{text:i("conversation.turnFailedResumeText"),attachments:[]})}const yi=F(()=>s.working?null:Oe.value);function Bs(){o("interrupt")}function Ql(){return(w.value?.anyPopupOpen??y.value?.anyPopupOpen)===!0}const{handleCompositionStart:Gi,handleCompositionEnd:ns,isComposingKeyEvent:Uu}=qr();let rd=null;function Pp(me){rd=me.target}function Zf(me){const we=me instanceof Element&&me!==document.body?me:rd,Ze=ose(we,".global-preview");if(Ze){XC(Ze);return}const Nt=J.value?.querySelector(".chat");Nt&&XC(Nt)}function jp(me){if(!(me.target instanceof Element&&me.target.closest(".terminal-host")!==null)){if(me.key==="Escape"&&!s.overlayOpen&&!Ql()&&!me.defaultPrevented&&!me.repeat&&!Uu(me)){yi.value!==null?(me.preventDefault(),Wn(yi.value)):s.working&&(me.preventDefault(),Yn(),Bs());return}if(Wie(me)&&!s.overlayOpen&&s.turns.length>0){me.preventDefault(),it();return}ise(me)&&!s.overlayOpen&&!sse(me.target)&&(me.preventDefault(),Zf(me.target))}}function Hp(){Gt.value&&lr()}gn(()=>{At(()=>{typeof MutationObserver=="function"&&(qs=new MutationObserver(uo)),typeof ResizeObserver=="function"&&(Pi=new ResizeObserver(()=>{ye(),Se(),ft();const me=J.value;if(!me)return;const{scrollHeight:we,clientHeight:Ze}=me,Nt=we>mi+1,sn=Ze<xo-1;mi=we,xo=Ze,!Ot()&&(Nt||sn)&&lr()})),ur(),Ln(48),X(),J.value?.addEventListener("kimi-table-layout",H),typeof document<"u"&&(document.addEventListener("visibilitychange",Gl),document.addEventListener("keydown",jp),document.addEventListener("pointerdown",Pp,!0),document.addEventListener("compositionstart",Gi),document.addEventListener("compositionend",ns)),window.visualViewport?.addEventListener("resize",Hp)})}),Cn(()=>{J.value?.removeEventListener("kimi-table-layout",H),qs&&qs.disconnect(),Pi&&Pi.disconnect(),ao&&On(ao),In&&On(In),Tn&&On(Tn),Sn&&On(Sn),ee&&On(ee),fe&&On(fe),Mi!==null&&clearTimeout(Mi),_n&&clearTimeout(_n),Ae!==null&&clearTimeout(Ae),Qe!==null&&clearTimeout(Qe),xt!==null&&clearTimeout(xt),Wt!==null&&clearTimeout(Wt),A!==null&&(clearTimeout(A),A=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",Gl),document.removeEventListener("keydown",jp),document.removeEventListener("pointerdown",Pp,!0),document.removeEventListener("compositionstart",Gi),document.removeEventListener("compositionend",ns)),window.visualViewport?.removeEventListener("resize",Hp)});function ld(){(w.value??y.value)?.focus()}Y2e({sessionId:()=>s.sessionId,mobile:()=>s.mobile===!0,starting:()=>s.starting===!0,dockedComposer:w,emptyComposer:y});function Rv(){_e()}function Ov(me){if(Ye.value!==null){if(!me){bt||nn();return}bt=!0,Ee()}}return t({loadComposerForEdit:v,focusComposer:ld,notifyUndone:Rv,onAbortOutcome:Ov,selectAllRegion:Zf,focusGoal:q}),(me,we)=>(b(),M("section",{class:$e(["con",{mobile:e.mobile}])},[!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(b(),de(nNe,{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":j.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:k.value,onOpenChanges:we[0]||(we[0]=Ze=>o("openChanges")),onCopyAll:we[1]||(we[1]=Ze=>m.value?.copyConversation()),onCopyFinalSummary:we[2]||(we[2]=Ze=>m.value?.copyFinalSummary()),onOpenPr:we[3]||(we[3]=Ze=>e.pr&&o("openPr",e.pr.url)),onRenameSession:we[4]||(we[4]=(Ze,Nt)=>o("renameSession",Ze,Nt)),onForkSession:we[5]||(we[5]=Ze=>o("forkSession",Ze)),onArchiveSession:we[6]||(we[6]=Ze=>o("archiveSession",Ze)),onExportSession:we[7]||(we[7]=Ze=>o("exportSession",Ze))},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):(b(),M("div",{key:1,class:$e(["empty-drag",{"macos-desktop":h($c)}])},null,2)),V(Cze,{items:Z.value,"active-turn-id":ne.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:Ne.value,onSelect:zi},null,8,["items","active-turn-id","mobile","session-loading","occluded"]),C("div",{class:"chat-layout",style:Vt(Ke.value)},[C("div",{ref:Lt,class:$e(["panes chat-scroll",{"is-following":Gt.value,"history-prepending":as.value,"is-pinned":Rt.value,scrolling:kn.value,"session-settling":an.value}]),onScrollPassive:li,onWheelPassive:wi,onPointerdownPassive:Po,onTouchstartPassive:bl,onTouchmovePassive:jo},[C("div",{class:$e(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(b(),M(Be,{key:0},[we[55]||(we[55]=C("div",{class:"empty-spacer"},null,-1)),C("div",Pze,[e.starting?(b(),M("span",Hze,[V(h(Ii),{size:"sm"}),C("span",null,B(h(i)("conversation.starting")),1)])):(b(),de(Oze,{key:0,class:"empty-doodle"},{fallback:he(()=>[C("span",jze,B(h(i)("composer.emptyConversationTitle")),1)]),_:1})),e.starting?te("",!0):(b(),M("span",Wze,B(h(i)("composer.emptyConversation")),1))]),d.value?(b(),M("div",qze,[V(h(Ce),{class:"upgrade-banner-icon",name:"music",size:"sm"}),C("span",Uze,B(h(i)("composer.upgradeBanner")),1),C("button",{type:"button",class:"upgrade-banner-cta",onClick:we[8]||(we[8]=Ze=>h(kp)())},B(h(i)("sidebar.upgrade")),1)])):te("",!0),V(jD,{ref_key:"emptyComposerRef",ref:y,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,"plan-armed":e.planArmed,"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:Ws,onSteer:we[11]||(we[11]=Ze=>o("steer",Ze)),onCommand:we[12]||(we[12]=Ze=>o("command",Ze)),onInterrupt:Bs,onUnqueue:we[13]||(we[13]=Ze=>o("unqueue",Ze)),onEditQueued:we[14]||(we[14]=Ze=>o("editQueued",Ze)),onSetPermission:we[15]||(we[15]=Ze=>o("setPermission",Ze)),onSetThinking:we[16]||(we[16]=Ze=>o("setThinking",Ze)),onTogglePlan:we[17]||(we[17]=Ze=>o("togglePlan")),onToggleSwarm:we[18]||(we[18]=Ze=>o("toggleSwarm")),onToggleGoal:we[19]||(we[19]=Ze=>o("toggleGoal")),onOpenBtw:we[20]||(we[20]=Ze=>o("command",{cmd:"/btw",attachments:[]})),onCreateGoal:we[21]||(we[21]=Ze=>o("createGoal",Ze)),onControlGoal:we[22]||(we[22]=Ze=>o("controlGoal",Ze)),onFocusGoal:q,onCompact:we[23]||(we[23]=Ze=>o("compact")),onPickModel:we[24]||(we[24]=Ze=>o("pickModel")),onSelectModel:we[25]||(we[25]=Ze=>o("selectModel",Ze)),onLogin:we[26]||(we[26]=Ze=>o("login"))},dI({_:2},[e.starting?void 0:{name:"footer",fn:he(()=>[C("div",Kze,[c.value?(b(),M("div",Vze,[V(h(mn),{text:h(i)("conversation.switchWorkspace")},{default:he(()=>[C("button",{type:"button",class:$e(["ws-chip",{open:r.value}]),"aria-expanded":r.value,onClick:It(p,["stop"])},[V(h(Ce),{name:"folder"}),C("span",Gze,B(u.value),1),V(h(Ce),{class:"ws-chip-chev",name:"chevron-down",size:"sm"})],10,Zze)]),_:1},8,["text"]),r.value?(b(),M("div",{key:0,class:$e(["ws-panel",{up:l.value}]),style:Vt(a.value?{maxHeight:a.value}:void 0),role:"menu"},[C("div",Qze,B(h(i)("workspace.recentLabel")),1),(b(!0),M(Be,null,yt(f.value,Ze=>(b(),M("button",{key:Ze.id,type:"button",class:$e(["ws-row",{on:Ze.id===e.activeWorkspaceId}]),role:"menuitem",onClick:It(Nt=>g(Ze.id),["stop"])},[V(h(Ce),{name:"folder"}),C("span",Jze,[C("span",Xze,B(Ze.name),1),C("span",eRe,B(Ze.shortPath),1)]),Ze.id===e.activeWorkspaceId?(b(),de(h(Ce),{key:0,class:"ws-check",name:"check",size:"sm"})):te("",!0)],10,Yze))),128)),we[54]||(we[54]=C("div",{class:"ws-divider"},null,-1)),C("button",{type:"button",class:"ws-action",role:"menuitem",onClick:we[9]||(we[9]=It(Ze=>{r.value=!1,o("addWorkspace")},["stop"]))},[V(h(Ce),{name:"folder-plus"}),C("span",null,B(h(i)("conversation.pickFolder")),1)])],6)):te("",!0)])):(b(),M("button",{key:1,type:"button",class:"ws-chip ws-ghost",onClick:we[10]||(we[10]=Ze=>o("addWorkspace"))},[V(h(Ce),{name:"folder-plus"}),C("span",null,B(h(i)("conversation.pickFolder")),1)]))])]),key:"0"}]),1032,["session-id","running","working","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","goal","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","starting"]),r.value?(b(),M("div",{key:1,class:"ws-backdrop",onClick:we[27]||(we[27]=Ze=>r.value=!1)})):te("",!0),we[56]||(we[56]=C("div",{class:"empty-spacer"},null,-1))],64)):(b(),de(kk,{ref_key:"chatPaneRef",ref:m,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":Gt.value,queued:e.queued,"undo-hint-turn-id":yi.value,"interrupted-turn-id":ct.value,"turn-failed":dt.value,"turn-error":e.turnError??null,"turn-retry":e.turnRetry??null,onResumeTurn:qt,onOpenFile:we[28]||(we[28]=Ze=>o("openFile",Ze)),onOpenMedia:we[29]||(we[29]=Ze=>o("openMedia",Ze)),onOpenTurnDiff:we[30]||(we[30]=Ze=>o("openTurnDiff",Ze)),onCopyConversationCopied:x,onOpenCompaction:we[31]||(we[31]=Ze=>o("openCompaction",Ze)),onOpenAgent:we[32]||(we[32]=Ze=>o("openAgent",Ze)),onEditMessage:Li,onArmedUndo:Wn,onLoadOlderMessages:Bn,onUnqueue:we[33]||(we[33]=Ze=>o("unqueue",Ze)),onEditQueued:Oi,onReorderQueue:Zl},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","turn-failed","turn-error","turn-retry"]))],2)],34),e.turns.length===0&&!e.sessionLoading?te("",!0):(b(),de(gze,{key:0,ref:bn,style:Vt(De.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,"plan-armed":e.planArmed,"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,"session-plans":e.sessionPlans,"dock-panel":R.value,"overlay-open":e.overlayOpen,"bash-tasks":S.value,"subagent-tasks":I.value,"bash-running":_.value,"subagent-running":E.value,"todo-done-count":O.value,"has-dock-work":P.value,todos:e.todos,"pending-question":ve.value,"question-busy-kind":re.value,"pending-approval":se.value,"approval-busy":U.value,mobile:e.mobile,onToggleDockPanel:we[34]||(we[34]=Ze=>z(Ze)),onCloseDockPanel:we[35]||(we[35]=Ze=>K()),onOpenAgent:we[36]||(we[36]=Ze=>o("openAgent",Ze)),"open-file":Ze=>o("openFile",Ze),onAnswer:Fs,onDismiss:we[37]||(we[37]=Ze=>o("dismiss",Ze)),onApproval:rr,onCancelTask:we[38]||(we[38]=Ze=>o("cancelTask",Ze)),onControlGoal:we[39]||(we[39]=Ze=>o("controlGoal",Ze)),onSubmit:Ws,onSteer:we[40]||(we[40]=Ze=>o("steer",Ze)),onCommand:we[41]||(we[41]=Ze=>o("command",Ze)),onInterrupt:Bs,onSetPermission:we[42]||(we[42]=Ze=>o("setPermission",Ze)),onSetThinking:we[43]||(we[43]=Ze=>o("setThinking",Ze)),onTogglePlan:we[44]||(we[44]=Ze=>o("togglePlan")),onToggleSwarm:we[45]||(we[45]=Ze=>o("toggleSwarm")),onToggleGoal:we[46]||(we[46]=Ze=>o("toggleGoal")),onOpenBtw:we[47]||(we[47]=Ze=>o("command",{cmd:"/btw",attachments:[]})),onCreateGoal:we[48]||(we[48]=Ze=>o("createGoal",Ze)),onFocusGoal:q,onCompact:we[49]||(we[49]=Ze=>o("compact")),onPickModel:we[50]||(we[50]=Ze=>o("pickModel")),onSelectModel:we[51]||(we[51]=Ze=>o("selectModel",Ze)),onLogin:we[52]||(we[52]=Ze=>o("login"))},null,8,["style","session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","goal","session-plans","dock-panel","overlay-open","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),Pe.value?(b(),de(Bze,{key:2,ref_key:"transcriptSearchRef",ref:ke,pane:J.value,mobile:e.mobile,reveal:wo,onClose:Fe},null,8,["pane","mobile"])):te("",!0),V(gs,{name:"pill"},{default:he(()=>[Qt.value?(b(),M("button",{key:0,class:"newmsg-pill",style:Vt({bottom:`${Me.value+12}px`}),"aria-label":h(i)("conversation.jumpToLatestAria"),onClick:we[53]||(we[53]=Ze=>Rn(!0))},[V(h(Ce),{class:"pill-chevron",name:"arrow-down",size:"sm"}),qe(" "+B(h(i)("conversation.newMessages")),1)],12,tRe)):te("",!0)]),_:1}),V(gs,{name:"undo-toast"},{default:he(()=>[oe.value?(b(),M("div",nRe,[C("span",iRe,B(h(i)("conversation.undone")),1)])):te("",!0)]),_:1})],2))}}),dRe=vt(cRe,[["__scopeId","data-v-8c7ebe8d"]]),fRe={key:0,class:"fp-empty fp-error"},hRe={key:1,class:"fp-empty"},pRe={key:2,class:"fp-loading"},gRe={class:"fp-path"},mRe={class:"fp-meta"},vRe={key:0,class:"fp-lines"},yRe={class:"fp-size"},bRe={key:3,class:"fp-search"},kRe=["placeholder"],ARe={key:0,class:"fp-search-count"},CRe=["href","aria-label"],wRe={key:1,class:"fp-code"},xRe={key:1,class:"fp-body fp-code"},_Re={key:2,class:"fp-body"},SRe=["srcdoc","title"],MRe={key:1,class:"fp-code"},IRe={key:3,class:"fp-body fp-pdf-wrap"},ERe=["src","title"],TRe={key:1,class:"fp-binary-card"},LRe={class:"fp-binary-label"},NRe={key:4,class:"fp-body fp-table-wrap"},FRe={class:"fp-table"},BRe=["data-line"],$Re={key:5,class:"fp-body fp-image-wrap"},DRe=["src","alt"],zRe={key:1,class:"fp-binary-card"},RRe={class:"fp-binary-icon"},ORe={class:"fp-binary-label"},PRe={key:6,class:"fp-body fp-code"},jRe={key:7,class:"fp-body fp-binary-wrap"},HRe={class:"fp-binary-card"},WRe={class:"fp-binary-icon"},qRe={class:"fp-binary-label"},URe=nt({__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}=Bt();function i(fe,pe){const Ne=pe.startsWith("/"),ee=pe.split("/").filter(Boolean);for(const ye of fe.split("/"))ye===""||ye==="."||(ye===".."?ee.pop():ee.push(ye));return(Ne?"/":"")+ee.join("/")}const s=un("resolveImage",async fe=>fe),o=F(()=>{const fe=u.file?.path??"",pe=fe.lastIndexOf("/");return pe>0?fe.slice(0,pe):""});function r(fe){if(/^(https?:|data:|blob:)/i.test(fe)||fe.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(fe)||fe.startsWith("\\\\"))return fe;const pe=o.value;return pe?i(fe,pe):fe}async function l(fe){const pe=r(fe);return s?s(pe):pe}Pn("resolveImage",l);function a(fe){let pe=fe.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(pe)||pe.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(pe)||pe.startsWith("\\\\"))return fe;for(const ee of["#","?"]){const ye=pe.indexOf(ee);ye!==-1&&(pe=pe.slice(0,ye))}const Ne=o.value;return{...fe,path:i(pe,Ne)}}const u=e,c=t;function d(fe){u.openFile?.(a(fe))}const f=G(null),p=F(()=>{const fe=u.file;if(!fe)return"binary";const pe=fe.mime??"",Ne=fe.languageId??"",ee=fe.path.toLowerCase();return pe==="text/markdown"||Ne==="markdown"||Ne==="md"||ee.endsWith(".mdx")?"markdown":pe==="application/json"||Ne==="json"?"json":pe==="text/html"||Ne==="html"||ee.endsWith(".html")||ee.endsWith(".htm")?"html":pe==="application/pdf"||ee.endsWith(".pdf")?"pdf":pe==="text/csv"||Ne==="csv"||ee.endsWith(".csv")?"csv":pe.startsWith("image/")?"image":fe.isBinary?"binary":pe.startsWith("text/")||Ne!==""?"text":"binary"});function g(fe){const pe=atob(fe),Ne=Uint8Array.from(pe,ee=>ee.charCodeAt(0));return new TextDecoder().decode(Ne)}const m=F(()=>{const fe=u.file;if(!fe)return"";if(fe.encoding==="base64")try{return g(fe.content)}catch{return fe.content}return fe.content}),y=F(()=>{if(p.value!=="json"||!u.file)return"";try{return JSON.stringify(JSON.parse(m.value),null,2)}catch{return m.value}}),w=F(()=>u.file?(p.value==="json"?y.value:m.value).split(` -`):[]),k=F(()=>u.file?p.value==="json"?y.value:m.value:""),A=F(()=>w.value.map((fe,pe)=>pe+1)),v=F(()=>u.file&&k.value.length<=a3?u.file.path:void 0),x=G(""),S=G(0),I=F(()=>{const fe=x.value.trim().toLowerCase();if(!fe)return[];const pe=[];return w.value.forEach((Ne,ee)=>{Ne.toLowerCase().includes(fe)&&pe.push(ee+1)}),pe});Ge(x,()=>{S.value=0});function _(fe,pe=!1){fe&&At(()=>{const Ne=f.value?.querySelector(".fp-body"),ee=Ne?.querySelector(`[data-line="${fe}"]`);if(!Ne||!ee)return;pe&&(Ne.scrollTop=0);const ye=Ne.getBoundingClientRect(),H=ee.getBoundingClientRect(),Y=H.top-ye.top+Ne.scrollTop;Ne.scrollTop=Y-Ne.clientHeight/2+H.height/2})}Ge(()=>[u.file?.path,u.line],()=>_(u.line,!0),{immediate:!0});function E(fe){const pe=I.value;pe.length!==0&&(S.value=(S.value+fe+pe.length)%pe.length,_(pe[S.value]))}function N(fe){const pe=I.value;return{target:u.line===fe,hit:pe.includes(fe),active:pe[S.value]===fe}}function D(fe){return fe<1024?`${fe} B`:fe<1024*1024?`${(fe/1024).toFixed(1)} KB`:`${(fe/(1024*1024)).toFixed(1)} MB`}const T=G(!1),$=G(!1);function O(){u.file&&no(k.value).then(fe=>{fe&&(T.value=!0,setTimeout(()=>{T.value=!1},1400))})}function P(){u.file&&no(u.file.path).then(fe=>{fe&&($.value=!0,setTimeout(()=>{$.value=!1},1400))})}const R=G("preview"),j=G("preview"),z=G("fit");function K(fe){R.value=fe}function q(fe){j.value=fe}function W(fe){z.value=fe}Ge(p,fe=>{R.value=fe==="html"?"preview":"source",j.value="preview",z.value="fit"});const Z=F(()=>{const fe=u.file;return!fe||p.value!=="image"?null:fe.encoding==="base64"?`data:${fe.mime};base64,${fe.content}`:fe.mime==="image/svg+xml"?`data:${fe.mime};charset=utf-8,${encodeURIComponent(fe.content)}`:null}),ne=F(()=>{const fe=u.file;return!fe||p.value!=="pdf"?null:u.downloadUrl?u.downloadUrl:fe.encoding==="base64"?`data:${fe.mime};base64,${fe.content}`:null}),X=F(()=>u.file?["<!doctype html>",'<meta charset="utf-8">',`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: blob:; style-src 'unsafe-inline'; font-src data:;">`,m.value].join(""):"");function ue(fe){const pe=[];let Ne="",ee=!1;for(let ye=0;ye<fe.length;ye++){const H=fe[ye];H==='"'&&fe[ye+1]==='"'?(Ne+='"',ye++):H==='"'?ee=!ee:H===","&&!ee?(pe.push(Ne),Ne=""):Ne+=H}return pe.push(Ne),pe}const ie=F(()=>w.value.slice(0,200).map(ue));function Se(fe,pe=55){return!fe||fe.length<=pe?fe:"…"+fe.slice(fe.length-pe+1)}return(fe,pe)=>(b(),M("div",{ref_key:"rootRef",ref:f,class:"file-preview"},[e.error&&!e.loading?(b(),M("div",fRe,[C("span",null,B(e.error),1),e.closable?(b(),de(h(Ht),{key:0,variant:"secondary",size:"sm",onClick:pe[0]||(pe[0]=Ne=>c("close"))},{default:he(()=>[qe(B(h(n)("filePreview.close")),1)]),_:1})):te("",!0)])):!e.file&&!e.loading?(b(),M("div",hRe,B(h(n)("filePreview.empty")),1)):e.loading?(b(),M("div",pRe,[pe[7]||(pe[7]=C("span",{class:"spinner"},null,-1)),C("span",null,B(h(n)("filePreview.loading")),1)])):e.file?(b(),M(Be,{key:3},[V(h(qc),{wrap:"",title:h(n)("common.preview"),closable:e.closable,"close-label":h(n)("filePreview.close"),onClose:pe[6]||(pe[6]=Ne=>c("close"))},{default:he(()=>[V(h(mn),{text:e.file.path},{default:he(()=>[C("span",gRe,B(Se(e.file.path)),1)]),_:1},8,["text"]),C("span",mRe,[e.file.lineCount?(b(),M("span",vRe,B(h(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):te("",!0),C("span",yRe,B(D(e.file.size)),1)]),p.value==="html"?(b(),de(h(bo),{key:0,"model-value":R.value,size:"sm",options:[{value:"preview",label:h(n)("filePreview.preview")},{value:"source",label:h(n)("filePreview.source")}],"onUpdate:modelValue":K},null,8,["model-value","options"])):te("",!0),p.value==="markdown"?(b(),de(h(bo),{key:1,"model-value":j.value,size:"sm",options:[{value:"preview",label:h(n)("filePreview.preview")},{value:"source",label:h(n)("filePreview.source")}],"onUpdate:modelValue":q},null,8,["model-value","options"])):te("",!0),p.value==="image"?(b(),de(h(bo),{key:2,"model-value":z.value,size:"sm",options:[{value:"fit",label:h(n)("filePreview.fit")},{value:"actual",label:h(n)("filePreview.actual")}],"onUpdate:modelValue":W},null,8,["model-value","options"])):te("",!0),p.value==="text"||p.value==="json"||p.value==="html"||p.value==="csv"?(b(),M("div",bRe,[Nn(C("input",{"onUpdate:modelValue":pe[1]||(pe[1]=Ne=>x.value=Ne),class:"fp-search-input",type:"search",placeholder:h(n)("filePreview.search")},null,8,kRe),[[Ao,x.value]]),x.value.trim()?(b(),M("span",ARe,B(I.value.length),1)):te("",!0),V(h(rn),{size:"sm",disabled:I.value.length===0,label:h(n)("filePreview.prevMatch"),tooltip:h(n)("filePreview.prevMatch"),onClick:pe[2]||(pe[2]=Ne=>E(-1))},{default:he(()=>[V(h(Ce),{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label","tooltip"]),V(h(rn),{size:"sm",disabled:I.value.length===0,label:h(n)("filePreview.nextMatch"),tooltip:h(n)("filePreview.nextMatch"),onClick:pe[3]||(pe[3]=Ne=>E(1))},{default:he(()=>[V(h(Ce),{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label","tooltip"])])):te("",!0),V(h(rn),{size:"sm",class:$e({copied:$.value}),label:$.value?h(n)("filePreview.copied"):h(n)("filePreview.copyPath"),tooltip:$.value?h(n)("filePreview.copied"):h(n)("filePreview.copyPath"),onClick:P},{default:he(()=>[$.value?(b(),de(h(Ce),{key:1,class:"fp-check",name:"check",size:"md"})):(b(),de(h(Ce),{key:0,name:"link",size:"md"}))]),_:1},8,["class","label","tooltip"]),e.externalActions?(b(),de(h(rn),{key:4,size:"sm",label:h(n)("filePreview.openInEditor"),tooltip:h(n)("filePreview.openInEditor"),onClick:pe[4]||(pe[4]=Ne=>c("openExternal"))},{default:he(()=>[V(h(Ce),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),e.externalActions?(b(),de(h(rn),{key:5,size:"sm",label:h(n)("filePreview.reveal"),tooltip:h(n)("filePreview.reveal"),onClick:pe[5]||(pe[5]=Ne=>c("reveal"))},{default:he(()=>[V(h(Ce),{name:"folder",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),e.downloadUrl?(b(),de(h(mn),{key:6,text:h(n)("filePreview.download")},{default:he(()=>[C("a",{class:"fp-download",href:e.downloadUrl,target:"_blank",rel:"noreferrer",download:"","aria-label":h(n)("filePreview.download")},[V(h(Ce),{name:"download",size:"md"})],8,CRe)]),_:1},8,["text"])):te("",!0),!e.file.isBinary&&p.value!=="image"?(b(),de(h(rn),{key:7,size:"sm",class:$e({copied:T.value}),label:T.value?h(n)("filePreview.copied"):h(n)("filePreview.copy"),tooltip:T.value?h(n)("filePreview.copied"):h(n)("filePreview.copy"),onClick:O},{default:he(()=>[T.value?(b(),de(h(Ce),{key:1,class:"fp-check",name:"check",size:"md"})):(b(),de(h(Ce),{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label","tooltip"])):te("",!0)]),_:1},8,["title","closable","close-label"]),p.value==="markdown"?(b(),M("div",{key:0,class:$e(["fp-body",{"fp-markdown":j.value==="preview"}])},[j.value==="preview"?(b(),de(h(ql),{key:0,text:m.value,"open-file":u.openFile?d:void 0},null,8,["text","open-file"])):(b(),M("div",wRe,[V(rl,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])]))],2)):p.value==="json"?(b(),M("div",xRe,[V(rl,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])])):p.value==="html"?(b(),M("div",_Re,[R.value==="preview"?(b(),M("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:X.value,title:e.file.path},null,8,SRe)):(b(),M("div",MRe,[V(rl,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])]))])):p.value==="pdf"?(b(),M("div",IRe,[ne.value?(b(),M("iframe",{key:0,class:"fp-pdf-frame",src:ne.value,title:e.file.path},null,8,ERe)):(b(),M("div",TRe,[C("span",LRe,B(h(n)("filePreview.pdfNoPreview")),1)]))])):p.value==="csv"?(b(),M("div",NRe,[C("table",FRe,[C("tbody",null,[(b(!0),M(Be,null,yt(ie.value,(Ne,ee)=>(b(),M("tr",{key:ee,class:$e(N(ee+1)),"data-line":ee+1},[C("th",null,B(ee+1),1),(b(!0),M(Be,null,yt(Ne,(ye,H)=>(b(),M("td",{key:H},B(ye),1))),128))],10,BRe))),128))])])])):p.value==="image"?(b(),M("div",$Re,[Z.value?(b(),M("img",{key:0,src:Z.value,alt:e.file.path,class:$e(["fp-image",{actual:z.value==="actual"}])},null,10,DRe)):(b(),M("div",zRe,[C("span",RRe,[V(h(Ce),{name:"image-off",size:"lg"})]),C("span",ORe,B(h(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:D(e.file.size)})),1)]))])):p.value==="text"?(b(),M("div",PRe,[V(rl,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])])):(b(),M("div",jRe,[C("div",HRe,[C("span",WRe,[V(h(Ce),{name:"file-off",size:"lg"})]),C("span",qRe,B(h(n)("filePreview.binaryNoPreview",{mime:e.file.mime||h(n)("filePreview.unknownType"),size:D(e.file.size)})),1)])]))],64)):te("",!0)],512))}}),KRe=vt(URe,[["__scopeId","data-v-4c55a361"]]),VRe={class:"tp"},ZRe=nt({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=G(null);return Ge(()=>n.text,()=>{const r=o.value;!r||!(r.scrollHeight-r.scrollTop-r.clientHeight<24)||At(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})},{immediate:!0}),(r,l)=>(b(),M("div",VRe,[V(h(qc),{title:h(s)("common.preview"),subtitle:e.subtitle??h(s)("thinking.panelTitle"),"close-label":h(s)("thinking.close"),onClose:l[0]||(l[0]=a=>i("close"))},null,8,["title","subtitle","close-label"]),C("pre",{ref_key:"bodyEl",ref:o,class:"tp-body"},B(e.text),513)]))}}),GRe=vt(ZRe,[["__scopeId","data-v-afb1f46f"]]),QRe={class:"agent-panel"},YRe={key:0,class:"agent-fallback"},JRe={key:0,class:"agent-error"},XRe=nt({__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,i=t,{t:s}=Bt(),o=G(null),r=F(()=>{const _=n.member.prompt?.trim(),E=_?`$ ${_}`:null;return A.value.filter(N=>N!==_&&N!==E).join(` -`)});let l=null,a=0;function u(_){const E=_==="command"?n.member.prompt:r.value;if(!E)return;const N=a;no(E).then(D=>{!D||N!==a||(l!==null&&clearTimeout(l),o.value=_,l=setTimeout(()=>{l=null,o.value=null},1400))})}const c=F(()=>n.member.id),{scroller:d,following:f,onScroll:p,pinScroll:g}=W2e(c);Ge(c,()=>{a++,l!==null&&clearTimeout(l),l=null,o.value=null});const m=G(!1);let y=null,w=null;function k(){y!==null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(y),w!==null&&clearTimeout(w),y=null,w=null}Ge(c,()=>{m.value=!1,k();const _=()=>{k(),m.value=!0};typeof requestAnimationFrame=="function"?y=requestAnimationFrame(()=>{y=requestAnimationFrame(_)}):w=setTimeout(_,32)},{immediate:!0}),Gn(k);const A=F(()=>{const _=new Set,E=[],N=n.member.prompt?.trim(),D=N?`$ ${N}`:null;for(const T of[n.member.prompt,n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` -`),n.member.summary]){const $=T?.trim();!$||_.has($)||D!==null&&$===D||(_.add($),E.push($))}return E});Pn("pinScroll",()=>{d.value&&g()});function v(_){switch(_){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");case"cancelled":return s("tools.swarm.phaseCancelled")}}const x=un("modelDisplay"),S=un("subagentEffort"),I=F(()=>{const _=[n.member.subagentType,x?.(n.member.model),S?.(n.member.thinkingEffort)].filter(E=>!!E);return _.length>0?_.join(" · "):void 0});return(_,E)=>(b(),M("div",QRe,[V(h(qc),{title:e.member.name,subtitle:I.value,"close-label":h(s)("thinking.close"),onClose:E[2]||(E[2]=N=>i("close"))},{default:he(()=>[V(h(Pl),{variant:"neutral",size:"sm"},{default:he(()=>[qe(B(v(e.member.phase)),1)]),_:1}),e.member.prompt?(b(),de(h(mn),{key:0,text:h(s)("tasks.copyCommand")},{default:he(()=>[V(h(rn),{size:"sm",label:h(s)("tasks.copyCommand"),onClick:E[0]||(E[0]=N=>u("command"))},{default:he(()=>[V(h(Ce),{name:o.value==="command"?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"])):te("",!0),r.value?(b(),de(h(mn),{key:1,text:h(s)("tasks.copyOutput")},{default:he(()=>[V(h(rn),{size:"sm",label:h(s)("tasks.copyOutput"),onClick:E[1]||(E[1]=N=>u("output"))},{default:he(()=>[V(h(Ce),{name:o.value==="output"?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"])):te("",!0)]),_:1},8,["title","subtitle","close-label"]),C("div",{ref_key:"scroller",ref:d,class:"agent-transcript",onScrollPassive:E[8]||(E[8]=(...N)=>h(p)&&h(p)(...N))},[m.value?(b(),M(Be,{key:0},[e.turns.length===0&&!e.loading&&(e.loadError||A.value.length>0)?(b(),M("div",YRe,[e.loadError?(b(),M("div",JRe,B(h(s)("tasks.transcriptLoadError")),1)):te("",!0),A.value.length>0?(b(),de(_r,{key:1,lines:A.value},null,8,["lines"])):te("",!0)])):(b(),de(kk,{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":h(f),"read-only":"",onLoadOlderMessages:E[3]||(E[3]=N=>i("loadOlderMessages")),onOpenAgent:E[4]||(E[4]=N=>i("openAgent",N)),onOpenFile:E[5]||(E[5]=N=>i("openFile",N)),onOpenMedia:E[6]||(E[6]=N=>i("openMedia",N)),onOpenTurnDiff:E[7]||(E[7]=N=>i("openTurnDiff",N))},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))],64)):te("",!0)],544)]))}}),eOe=vt(XRe,[["__scopeId","data-v-84a2873f"]]),tOe={class:"sc"},nOe={key:0,class:"sc-empty"},iOe={key:2,class:"sc-loading"},sOe={class:"sc-composer"},oOe=["placeholder"],rOe=["disabled"],lOe=nt({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{},onSend:{type:Function}},emits:["close","openMedia"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.turns.find(S=>S.role==="user")?.text?.trim()??""),r=F(()=>n.title?.trim()||s("sideChat.title")),l=F(()=>n.subtitle?.trim()?n.subtitle.trim():o.value||s("sideChat.subtitle")),a=G(""),u=G(null),c=G(null),d=G(!1);async function f(){const x=a.value,S=x.trim();if(!(!S||d.value)){d.value=!0;try{if(!await n.onSend(S)||a.value!==x)return;a.value="",At(()=>{u.value&&(u.value.style.height="auto"),p()})}finally{d.value=!1}}}function p(){const x=c.value;x&&(x.scrollTop=x.scrollHeight)}Pn("pinScroll",x=>{const S=c.value;if(!S)return;const I=x.getBoundingClientRect().top;requestAnimationFrame(()=>{S.scrollTop+=x.getBoundingClientRect().top-I})});const g=F(()=>{const x=n.turns;if(x.length===0)return"0";const S=x.at(-1),I=S.thinking?.length??0,_=S.tools?.reduce((E,N)=>E+N.name.length+(N.arg?.length??0)+(N.output?.join("").length??0),0)??0;return`${x.length}:${S.text.length}:${I}:${_}`});Ge(g,async()=>{!n.running&&!n.sending||(await At(),p())});const m=F(()=>n.sending?n.turns.at(-1)?.role==="user":!1),{handleCompositionStart:y,handleCompositionEnd:w,isComposingKeyEvent:k}=qr();function A(x){x.key==="Enter"&&!x.shiftKey&&!k(x)&&(x.preventDefault(),f())}function v(){const x=u.value;x&&(x.style.height="auto",x.style.height=`${Math.min(x.scrollHeight,160)}px`)}return(x,S)=>(b(),M("div",tOe,[V(h(qc),{title:r.value,subtitle:l.value,"close-label":h(s)("thinking.close"),onClose:S[0]||(S[0]=I=>i("close"))},null,8,["title","subtitle","close-label"]),C("div",{ref_key:"bodyRef",ref:c,class:"sc-body"},[e.turns.length===0?(b(),M("div",nOe,B(h(s)("sideChat.empty")),1)):(b(),de(kk,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running,"turn-files-interactive":!1,onOpenMedia:S[1]||(S[1]=I=>i("openMedia",I))},null,8,["turns","turn-active","working"])),m.value?(b(),M("div",iOe,[V(BD,{label:h(s)("conversation.requesting")},null,8,["label"])])):te("",!0)],512),C("div",sOe,[Nn(C("textarea",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":S[2]||(S[2]=I=>a.value=I),class:"sc-input",rows:"1",placeholder:h(s)("sideChat.placeholder"),onInput:v,onKeydown:A,onCompositionstart:S[3]||(S[3]=(...I)=>h(y)&&h(y)(...I)),onCompositionend:S[4]||(S[4]=(...I)=>h(w)&&h(w)(...I))},null,40,oOe),[[Ao,a.value]]),V(h(mn),{text:h(s)("sideChat.send")},{default:he(()=>[C("button",{type:"button",class:"sc-send",disabled:!a.value.trim(),onClick:f},[V(h(Ce),{name:"arrow-right",size:"sm"})],8,rOe)]),_:1},8,["text"])])]))}}),aOe=vt(lOe,[["__scopeId","data-v-bb28a4e0"]]),uOe={class:"changes-pane"},cOe={class:"dv-path"},dOe={class:"diff-head"},fOe={class:"back-label"},hOe={key:"loading",class:"empty-state diff-loading"},pOe={key:"lines",class:"dv-lines-wrap"},gOe={key:"empty",class:"empty-state"},mOe={class:"dv-change-count"},vOe={class:"ch-head"},yOe={class:"br-heading"},bOe={class:"br-label"},kOe={class:"br-name"},AOe={key:0,class:"sync-info"},COe={key:0,class:"ahead"},wOe={key:0,class:"behind"},xOe={key:1,class:"empty-head"},_Oe={class:"ch-list-content"},SOe=["onClick"],MOe={class:"fpath"},IOe=["onClick"],EOe={class:"tree-name"},TOe=["onClick"],LOe={class:"tree-name"},NOe={key:2,class:"empty-state"},FOe={class:"empty-state-icon","aria-hidden":"true"},BOe={key:3,class:"empty-state"},$Oe=nt({__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}=Bt();function i($){return n($===1?"diff.fileCountOne":"diff.fileCountOther",{number:$})}const s=e,o=t;function r($){const O=$.toLowerCase();return O==="modified"?"modified":O==="added"?"added":O==="deleted"?"deleted":O==="renamed"?"renamed":O==="untracked"?"untracked":O==="conflicted"?"conflicted":O==="ignored"?"ignored":O==="clean"?"clean":"unknown"}const l={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function a($){return l[r($)]??"?"}function u($,O=60){return $.length<=O?$:"…"+$.slice($.length-O+1)}const c=F(()=>s.gitInfo!==null),d=F(()=>s.changes.length>0),f=F(()=>(s.selectedDiffPath??null)!==null),p=F(()=>s.mode==="detail"||s.mode==="full"&&f.value),g=F(()=>s.fileDiff??[]),m=F(()=>s.fileDiffLoading===!0);function y($){o("open",$)}function w(){o("back")}function k(){o("close")}const A=G("list");function v($){A.value=$}function x($){const O={children:[]},P=[...$].sort((R,j)=>R.path.localeCompare(j.path));for(const R of P){const j=R.path.endsWith("/"),z=R.path.split("/").filter(Boolean);if(z.length===0)continue;let K=O;for(let q=0;q<z.length;q++){const W=z[q],Z=q===z.length-1&&!j,ne=z.slice(0,q+1).join("/");let X=K.children.find(ue=>ue.name===W&&ue.kind===(Z?"file":"folder"));X||(X={name:W,path:ne,kind:Z?"file":"folder",status:Z?R.status:void 0,children:[]},K.children.push(X)),K=X}}return O.children}const S=F(()=>x(s.changes)),I=G(new Set);function _($){return!I.value.has($)}const E=F(()=>{const $=[];function O(P,R){for(const j of P)$.push({node:j,depth:R}),j.kind==="folder"&&_(j.path)&&O(j.children,R+1)}return O(S.value,0),$});function N($){const O=new Set(I.value);O.has($.path)?O.delete($.path):O.add($.path),I.value=O}function D($){return`calc(var(--tree-base-indent) + ${$} * var(--tree-indent-step))`}function T($){return{paddingLeft:D($),"--tree-depth":String($)}}return($,O)=>(b(),M("div",uOe,[p.value?(b(),M(Be,{key:0},[V(h(qc),{title:h(n)("diff.title"),closable:e.closable,"close-label":h(n)("diff.close"),onClose:k},{default:he(()=>[V(h(mn),{text:e.selectedDiffPath??""},{default:he(()=>[C("span",cOe,B(u(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),C("div",dOe,[e.hideBack?te("",!0):(b(),de(h(Ht),{key:0,variant:"ghost",size:"sm",onClick:w},{default:he(()=>[V(h(Ce),{name:"arrow-left",size:"sm"}),C("span",fOe,B(h(n)("diff.back")),1)]),_:1}))]),V(gs,{name:"diff-content",mode:"out-in"},{default:he(()=>[m.value?(b(),M("div",hOe,[V(h(Ii),{size:"md"}),C("span",null,B(h(n)("diff.loading")),1)])):g.value.length>0?(b(),M("div",pOe,[V(rl,{lines:g.value,path:e.selectedDiffPath??void 0,"line-numbers":"",framed:!1,"full-texts":e.fullTexts??null},null,8,["lines","path","full-texts"])])):(b(),M("div",gOe,B(e.emptyFile?h(n)("diff.emptyFile"):h(n)("diff.noDiff")),1))]),_:1})],64)):(b(),M(Be,{key:1},[V(h(qc),{title:h(n)("diff.title"),closable:e.closable,"close-label":h(n)("diff.close"),onClose:k},{default:he(()=>[C("span",mOe,B(i(e.changes.length)),1),V(h(bo),{"model-value":A.value,size:"sm",options:[{value:"list",label:h(n)("diff.list"),icon:"list"},{value:"tree",label:h(n)("diff.tree"),icon:"tree-view"}],"onUpdate:modelValue":v},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),C("div",vOe,[c.value?(b(),M(Be,{key:0},[C("span",yOe,[V(h(Ce),{class:"br-icon",name:"git-fork",size:"sm"}),C("span",bOe,B(h(n)("diff.branch")),1)]),C("span",kOe,B(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(b(),M("span",AOe,[V(h(mn),{text:h(n)("diff.aheadTitle")},{default:he(()=>[e.gitInfo.ahead>0?(b(),M("span",COe,"↑"+B(e.gitInfo.ahead),1)):te("",!0)]),_:1},8,["text"]),V(h(mn),{text:h(n)("diff.behindTitle")},{default:he(()=>[e.gitInfo.behind>0?(b(),M("span",wOe,"↓"+B(e.gitInfo.behind),1)):te("",!0)]),_:1},8,["text"])])):te("",!0)],64)):(b(),M("span",xOe,B(h(n)("diff.empty")),1))]),d.value&&A.value==="list"?(b(),de(h(iA),{key:0,class:"ch-list"},{default:he(()=>[C("div",_Oe,[(b(!0),M(Be,null,yt(e.changes,P=>(b(),de(h(mn),{key:P.path,text:P.path},{default:he(()=>[C("button",{type:"button",class:"ch-row",onClick:R=>y(P.path)},[C("span",{class:$e(["badge",r(P.status)])},B(a(P.status)),3),C("span",MOe,B(u(P.path)),1)],8,SOe)]),_:2},1032,["text"]))),128))])]),_:1})):d.value&&A.value==="tree"?(b(),de(h(iA),{key:1,class:"ch-list ch-tree"},{default:he(()=>[V(GI,{name:"tree-collapse",tag:"ul",class:"tree-list ch-list-content"},{default:he(()=>[(b(!0),M(Be,null,yt(E.value,({node:P,depth:R})=>(b(),M("li",{key:P.path,class:"tree-node"},[P.kind==="folder"?(b(),M("button",{key:0,type:"button",class:"tree-row tree-folder",style:Vt(T(R)),onClick:j=>N(P)},[V(h(Ce),{class:"tree-icon",name:"folder-solid",size:"sm"}),C("span",EOe,B(P.name),1)],12,IOe)):(b(),de(h(mn),{key:1,text:P.path},{default:he(()=>[C("button",{type:"button",class:"tree-row tree-file",style:Vt(T(R)),onClick:j=>y(P.path)},[C("span",{class:$e(["badge",r(P.status)])},B(a(P.status)),3),C("span",LOe,B(P.name),1)],12,TOe)]),_:2},1032,["text"]))]))),128))]),_:1})]),_:1})):c.value?(b(),M("div",NOe,[C("span",FOe,[V(h(Ce),{name:"check",size:"lg"})]),qe(" "+B(h(n)("diff.clean")),1)])):(b(),M("div",BOe,B(h(n)("diff.empty")),1))],64))]))}}),DOe=vt($Oe,[["__scopeId","data-v-7d5ab9c7"]]),zOe={class:"td"},ROe={class:"td-path"},OOe={class:"td-body"},POe={key:1,class:"td-empty"},jOe=nt({__name:"TurnDiffPanel",props:{change:{},cwd:{},closable:{type:Boolean}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>{const a=n.cwd?lv(n.change.path,n.cwd):null;return r(a??n.change.path)});function r(a,u=48){return!a||a.length<=u?a:"…"+a.slice(a.length-u+1)}const l=F(()=>n.change.diff!==null&&n.change.diff.length>0);return(a,u)=>(b(),M("div",zOe,[V(h(qc),{title:h(s)("conversation.turnFiles.diffTitle"),closable:e.closable,"close-label":h(s)("filePreview.close"),onClose:u[1]||(u[1]=c=>i("close"))},{default:he(()=>[V(h(mn),{text:e.change.path},{default:he(()=>[C("span",ROe,B(o.value),1)]),_:1},8,["text"]),V(h(rn),{size:"sm",label:h(s)("conversation.turnFiles.openFile"),tooltip:h(s)("conversation.turnFiles.openFile"),onClick:u[0]||(u[0]=c=>i("openFile",e.change.path))},{default:he(()=>[V(h(Ce),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])]),_:1},8,["title","closable","close-label"]),C("div",OOe,[l.value?(b(),de(rl,{key:0,lines:e.change.diff,path:e.change.path,framed:!1},null,8,["lines","path"])):(b(),M("div",POe,[C("p",null,B(h(s)("conversation.turnFiles.diffUnavailable")),1),V(h(Ht),{variant:"ghost",size:"sm",onClick:u[2]||(u[2]=c=>i("openFile",e.change.path))},{default:he(()=>[qe(B(h(s)("conversation.turnFiles.openFile")),1)]),_:1})]))])]))}}),HOe=vt(jOe,[["__scopeId","data-v-fdd0bc05"]]);function HD(e,t){let n=null;gn(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,At(()=>{const i=t?.value??e.value;try{i?.focus()}catch{}})}),Gn(()=>{const i=n;if(n=null,!(!i||typeof document>"u"||!document.contains(i)))try{i.focus()}catch{}})}const WOe={class:"search-wrap"},qOe=["aria-label"],UOe=["aria-label"],KOe=["aria-pressed","onClick"],VOe={key:1,class:"state-row"},ZOe={key:2,class:"state-row unavail"},GOe=["aria-label"],QOe=["aria-selected","onClick","onMouseenter"],YOe={class:"model-main"},JOe={class:"model-name"},XOe={class:"model-meta"},ePe={class:"model-side"},tPe={key:0,class:"empty"},nPe={class:"footer-hint","aria-hidden":"true"},iPe=nt({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=F(()=>new Set(i.starredIds??[]));function r(D){return o.value.has(D)}const l=G(""),a=G(null),u=G(null),c=G(null),d=G("all"),f={image_in:"model.capabilityImageInput",video_in:"model.capabilityVideoInput",tool_use:"model.capabilityToolUse",thinking:"model.capabilityThinking",always_thinking:"model.capabilityAlwaysThinking"};function p(D){const T=f[D];return T?n(T):D.replaceAll("_"," ")}function g(D){const T=[D.provider,n("model.contextSuffix",{size:Ia(D.maxContextSize)})];for(const $ of D.capabilities??[])T.push(p($));return T.join(" · ")}HD(u,a);const m=F(()=>{const D=new Set,T=[{id:"all",label:n("model.allTab")}];for(const $ of i.models)D.has($.provider)||(D.add($.provider),T.push({id:$.provider,label:$.provider}));return T}),y=F(()=>{const D=l.value.toLowerCase().trim(),T=i.models.filter($=>{if(d.value!=="all"&&$.provider!==d.value)return!1;const O=($.displayName??$.model).toLowerCase().includes(D),P=$.provider.toLowerCase().includes(D),R=$.id.toLowerCase().includes(D);return!D||O||P||R});return d.value!=="all"?T:T.sort(($,O)=>{const P=r($.id)?1:0;return(r(O.id)?1:0)-P})}),w=F(()=>y.value),k=G(0);Ge([l,d],()=>{k.value=0}),Ge(m,D=>{D.some(T=>T.id===d.value)||(d.value="all")}),Ge(w,D=>{k.value=Math.min(k.value,Math.max(D.length-1,0))}),Ge(k,async()=>{await At(),c.value?.querySelector(".model-row.is-selected")?.scrollIntoView({block:"nearest"})});const{handleCompositionStart:A,handleCompositionEnd:v,isComposingKeyEvent:x}=qr();function S(D){if(!x(D)){if(D.key==="Escape"){s("close");return}if(D.key==="ArrowDown")D.preventDefault(),k.value=Math.min(k.value+1,w.value.length-1);else if(D.key==="ArrowUp")D.preventDefault(),k.value=Math.max(k.value-1,0);else if(D.key==="Enter"){const T=w.value[k.value];T&&s("select",T.id)}}}gn(()=>{document.addEventListener("keydown",S)}),Cn(()=>{document.removeEventListener("keydown",S)});function I(D){s("select",D)}function _(){l.value="",a.value?.focus()}function E(D){return w.value.indexOf(D)}function N(D){d.value=D}return(D,T)=>(b(),de(h(La),{open:!0,"close-on-esc":!1,title:h(n)("model.title"),size:"lg",height:"fixed",padded:!1,onClose:T[1]||(T[1]=$=>s("close"))},{default:he(()=>[C("div",{ref_key:"dialogRef",ref:u,class:"mp"},[C("div",WOe,[V(h(Xs),{ref_key:"searchRef",ref:a,modelValue:l.value,"onUpdate:modelValue":T[0]||(T[0]=$=>l.value=$),placeholder:h(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:"",onCompositionstart:h(A),onCompositionend:h(v)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),V(h(mn),{text:h(n)("model.clearSearch")},{default:he(()=>[C("button",{type:"button",class:$e(["search-clear",{"is-on":l.value.length>0}]),tabindex:"-1","aria-label":h(n)("model.clearSearch"),onClick:_},[V(h(Ce),{name:"close",size:"sm"})],10,qOe)]),_:1},8,["text"])]),m.value.length>1?(b(),M("div",{key:0,class:"chip-strip","aria-label":h(n)("model.providerTabs")},[(b(!0),M(Be,null,yt(m.value,$=>(b(),M("button",{key:$.id,type:"button",class:$e(["chip",{"is-active":$.id===d.value}]),"aria-pressed":$.id===d.value,onClick:O=>N($.id)},B($.label),11,KOe))),128))],8,UOe)):te("",!0),e.loading?(b(),M("div",VOe,[V(h(Ii),{size:"sm"}),C("span",null,B(h(n)("model.loading")),1)])):e.unavailable?(b(),M("div",ZOe,[V(h(Ce),{name:"alert-triangle",size:"lg"}),C("span",null,B(h(n)("model.unavailable")),1)])):(b(),M("div",{key:3,ref_key:"listRef",ref:c,class:"model-list",role:"listbox","aria-label":h(n)("model.title")},[(b(!0),M(Be,null,yt(w.value,$=>(b(),M("div",{key:$.id,class:$e(["model-row",{"is-current":$.id===e.current,"is-selected":E($)===k.value}]),role:"option","aria-selected":$.id===e.current,onClick:O=>I($.id),onMouseenter:O=>k.value=E($)},[C("span",YOe,[C("span",JOe,B($.displayName??$.model),1),C("span",XOe,B(g($)),1)]),C("span",ePe,[$.id===e.current?(b(),de(h(Ce),{key:0,class:"model-check",name:"check",size:"sm"})):te("",!0),V(h(rn),{class:$e(["model-star",{"is-starred":r($.id)}]),size:"sm",label:r($.id)?h(n)("model.unstarTitle"):h(n)("model.starTitle"),tooltip:r($.id)?h(n)("model.unstarTitle"):h(n)("model.starTitle"),onClick:It(O=>s("toggle-star",$.id),["stop"])},{default:he(()=>[r($.id)?(b(),de(h(Ce),{key:0,name:"star",size:"md"})):(b(),de(h(Ce),{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["class","label","tooltip","onClick"])])],42,QOe))),128)),w.value.length===0?(b(),M("div",tPe,B(i.models.length===0?h(n)("model.emptyNoModels"):h(n)("model.emptyNoMatch")),1)):te("",!0)],8,GOe)),C("div",nPe,[V(h(Aa),{keys:["↑","↓"]}),C("span",null,B(h(n)("model.hintNavigate")),1),T[2]||(T[2]=C("span",{class:"hint-dot"},"·",-1)),V(h(Aa),{keys:["Enter"]}),C("span",null,B(h(n)("model.hintSelect")),1),T[3]||(T[3]=C("span",{class:"hint-dot"},"·",-1)),V(h(Aa),{keys:["Esc"]}),C("span",null,B(h(n)("model.hintClose")),1)])],512)]),_:1},8,["title"]))}}),sPe=vt(iPe,[["__scopeId","data-v-3ba22330"]]),oPe={key:0,class:"center-body"},rPe={class:"center-text"},lPe={key:1,class:"nb"},aPe={class:"nb-lead"},uPe=["href"],cPe={class:"nb-code-row"},dPe=["title"],fPe={class:"nb-status"},hPe={class:"nb-status-text"},pPe={class:"nb-countdown"},gPe={key:2,class:"center-body"},mPe={class:"center-text success-text"},vPe={class:"center-hint"},yPe={class:"center-body"},bPe={class:"center-text err-text"},kPe={class:"center-hint"},APe={class:"actions"},CPe={class:"center-body"},wPe={class:"center-text warn-text"},xPe={class:"center-hint"},_Pe={class:"actions"},SPe=nt({__name:"LoginDialog",props:{onStartOAuthLogin:{type:Function},onPollOAuthLogin:{type:Function},onCancelOAuthLogin:{type:Function}},emits:["success","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=G(!0),s=t,o=e,{step:r,pollError:l,flow:a,secondsLeft:u,startFlow:c,cancelFlow:d}=s$({onStartOAuthLogin:o.onStartOAuthLogin,onPollOAuthLogin:o.onPollOAuthLogin,onCancelOAuthLogin:o.onCancelOAuthLogin,onSuccess:()=>{s("success"),s("close")}}),f=G(!1);gn(async()=>{await c()});async function p(){!a.value||!await no(a.value.verificationUriComplete)||(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}async function g(){d(),s("close")}function m(y){const w=Math.floor(y/60),k=y%60;return`${w}:${String(k).padStart(2,"0")}`}return(y,w)=>(b(),de(h(La),{open:i.value,"onUpdate:open":w[0]||(w[0]=k=>i.value=k),title:h(n)("login.title"),"close-on-overlay":!1,onClose:g},{default:he(()=>[h(r)==="starting"?(b(),M("div",oPe,[V(h(Ii),{size:"md"}),C("span",rPe,B(h(n)("login.starting")),1)])):h(r)==="device-code"&&h(a)?(b(),M("div",lPe,[C("div",aPe,B(h(n)("login.lead")),1),C("a",{class:"nb-primary",href:h(a).verificationUriComplete,target:"_blank",rel:"noopener noreferrer"},[qe(B(h(n)("login.authorizeInBrowser"))+" ",1),V(h(Ce),{name:"external-link",size:"sm"})],8,uPe),C("div",cPe,[C("span",{class:"nb-link",title:h(a).verificationUriComplete},B(h(a).verificationUriComplete),9,dPe),V(h(Ht),{class:$e(["nb-copy",{"is-copied":f.value}]),variant:"secondary",size:"sm",onClick:p},{default:he(()=>[f.value?(b(),M(Be,{key:0},[V(h(Ce),{name:"check",size:"sm"}),qe(" "+B(h(n)("login.copied")),1)],64)):(b(),M(Be,{key:1},[V(h(Ce),{name:"copy",size:"sm"}),qe(" "+B(h(n)("login.copyLink")),1)],64))]),_:1},8,["class"])]),C("div",fPe,[V(h(Ii),{size:"sm",label:h(n)("login.waitingAuth")},null,8,["label"]),C("span",hPe,B(h(n)("login.waitingAutoClose")),1),C("span",pPe,B(m(h(u))),1)])])):h(r)==="success"?(b(),M("div",gPe,[V(h(uf),{kind:"success"}),C("span",mPe,B(h(n)("login.success")),1),C("span",vPe,B(h(n)("login.successHint")),1)])):h(r)==="expired"?(b(),M(Be,{key:3},[C("div",yPe,[V(h(uf),{kind:"expired"}),C("span",bPe,B(h(n)("login.expiredTitle")),1),C("span",kPe,B(h(n)("login.expiredHint")),1)]),C("div",APe,[V(h(Ht),{variant:"primary",onClick:h(c)},{default:he(()=>[qe(B(h(n)("login.retry")),1)]),_:1},8,["onClick"]),V(h(Ht),{variant:"secondary",onClick:g},{default:he(()=>[qe(B(h(n)("login.closeBtn")),1)]),_:1})])],64)):h(r)==="error"?(b(),M(Be,{key:4},[C("div",CPe,[V(h(uf),{kind:"error"}),C("span",wPe,B(h(l)?h(n)("login.pollErrorTitle"):h(n)("login.errorTitle")),1),C("span",xPe,B(h(l)?h(n)("login.pollErrorHint"):h(n)("login.errorHint")),1)]),C("div",_Pe,[V(h(Ht),{variant:"primary",onClick:h(c)},{default:he(()=>[qe(B(h(n)("login.retry")),1)]),_:1},8,["onClick"]),V(h(Ht),{variant:"secondary",onClick:g},{default:he(()=>[qe(B(h(n)("login.closeBtn")),1)]),_:1})])],64)):te("",!0)]),_:1},8,["open","title"]))}}),MPe=vt(SPe,[["__scopeId","data-v-0b06fca3"]]),WD=nt({__name:"LanguageSwitcher",props:{size:{default:"md"}},setup(e){const{locale:t}=Bt(),n=a2.map(s=>({value:s.code,label:s.label}));function i(s){t.value!==s&&Yb(s)}return(s,o)=>(b(),de(h(bo),{"model-value":h(t),options:h(n),size:e.size,"onUpdate:modelValue":i},null,8,["model-value","options","size"]))}}),IPe={class:"msg"},EPe={class:"pf-field"},TPe={class:"pf-field-label"},LPe={class:"pf-field"},NPe={class:"pf-field-label"},FPe={class:"pf-field"},BPe={class:"pf-field-label"},$Pe={class:"pf-key-wrap"},DPe={class:"pf-field"},zPe={class:"pf-field-label"},RPe={class:"pf-field"},OPe={class:"pf-field-label"},PPe={class:"pf-models"},jPe={key:0,class:"pf-models-empty"},HPe={class:"pf-model-grid pf-model-head"},WPe={key:1},qPe={key:0},UPe={class:"pf-foot"},KPe={key:0,class:"pf-managed-note"},VPe={class:"pf-confirm-msg"},ZPe=nt({__name:"ProviderForm",props:{mode:{},provider:{},guard:{type:Boolean}},emits:["dirtyChange","guardStay","guardDiscard","added","saved","deleting","deleted","cancel"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Fa(),r=Es({id:"",type:"openai",apiKey:"",baseUrl:"",models:[D0()]}),l=G(""),a=G(!1),u=G(!1),c=G(!1),d=F(()=>n.mode==="add"),f=F(()=>n.provider!==void 0&&pL(n.provider)),p=F(()=>{const $=n.provider;return $===void 0?0:y3($,o.config.value?.models).length}),g=F(()=>f.value&&p.value===0),m=F(()=>cte.map($=>({value:$,label:s(`providers.types.${$}`)}))),y=F(()=>f.value?s("providers.apiKeyManaged"):!d.value&&n.provider?.hasApiKey===!0?s("providers.apiKeySet"):"sk-…");function w(){l.value="",u.value=!1;const $=n.provider;if(d.value||$===void 0){r.id="",r.type="openai",r.apiKey="",r.baseUrl="",r.models=[D0()];return}r.id=$.id,r.type=$.type,r.apiKey="",r.baseUrl=$.baseUrl??"";const O=y3($,o.config.value?.models);r.models=O.length>0?O:[D0()]}gn(()=>{w(),v()});const k=G(!1),A=G(!1);async function v(){const $=n.provider;if(!(d.value||$===void 0||f.value||$.hasApiKey!==!0))try{const O=await o.getProvider($.id);if(A.value)return;O.apiKey!==void 0&&O.apiKey!==""&&(r.apiKey=O.apiKey,k.value=!0)}catch{}}function x(){i("dirtyChange",!0)}const S=G(!1),I=G();function _($){l.value=$,At(()=>I.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}async function E(){if(a.value)return;const $=dte(r,{requireApiKey:d.value,requireBaseUrl:d.value});if($!==null){_(s(`providers.error.${$}`));return}l.value="",a.value=!0;try{if(d.value){const O=await o.addProvider(fte(r));if(O!==null){_(O);return}i("dirtyChange",!1),o.notify({severity:"success",title:s("providers.added")}),i("added",r.id.trim())}else{const O=n.provider;if(O===void 0)return;const P=o.config.value?.providers?.[O.id]?.defaultModel,R=await o.updateProvider(O.id,hte(r,O,{includeBlankApiKey:k.value,existingDefaultModel:P}));if(R!==null){_(R);return}await o.checkAuth(),o.notify({severity:"success",title:s("providers.saved")}),i("dirtyChange",!1),i("saved",r.id.trim())}}finally{a.value=!1}}async function N(){const $=n.provider;if(!($===void 0||c.value)){c.value=!0,i("deleting"),await new Promise(O=>setTimeout(O,300));try{if(await o.deleteProvider($.id)===null){u.value=!1;return}i("dirtyChange",!1),i("deleted",$.id)}finally{c.value=!1}}}function D(){r.models.push(D0()),x()}function T($){r.models.length<=1||(r.models.splice($,1),x())}return($,O)=>(b(),M("div",{class:"pf-form",onInput:x},[e.guard?(b(),de(h(kc),{key:0,variant:"warning",class:"pf-guard"},{default:he(()=>[C("span",IPe,B(h(s)("providers.unsavedGuard")),1),V(h(Ht),{variant:"secondary",size:"sm",onClick:O[0]||(O[0]=P=>i("guardStay"))},{default:he(()=>[qe(B(h(s)("providers.guardStay")),1)]),_:1}),V(h(Ht),{variant:"danger",size:"sm",onClick:O[1]||(O[1]=P=>i("guardDiscard"))},{default:he(()=>[qe(B(h(s)("providers.guardDiscard")),1)]),_:1})]),_:1})):te("",!0),l.value?(b(),M("div",{key:1,ref_key:"errorBox",ref:I},[V(h(kc),{variant:"danger"},{default:he(()=>[qe(B(l.value),1)]),_:1})],512)):te("",!0),C("div",EPe,[C("label",TPe,[qe(B(h(s)("providers.fieldId")),1),O[11]||(O[11]=C("span",{class:"req"}," *",-1))]),V(h(Xs),{modelValue:r.id,"onUpdate:modelValue":O[2]||(O[2]=P=>r.id=P),placeholder:"my-openai",disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","disabled"])]),C("div",LPe,[C("label",NPe,[qe(B(h(s)("providers.fieldType")),1),O[12]||(O[12]=C("span",{class:"req"}," *",-1))]),V(h(X4),{"model-value":r.type,options:m.value,disabled:f.value,"onUpdate:modelValue":O[3]||(O[3]=P=>{r.type=P,x()})},null,8,["model-value","options","disabled"])]),C("div",FPe,[C("label",BPe,[qe(B(h(s)("providers.fieldApiKey")),1),O[13]||(O[13]=C("span",{class:"req"}," *",-1))]),C("div",$Pe,[V(h(Xs),{modelValue:r.apiKey,"onUpdate:modelValue":O[4]||(O[4]=P=>r.apiKey=P),type:S.value?"text":"password",placeholder:y.value,disabled:f.value,autocomplete:"off",spellcheck:"false",onInput:O[5]||(O[5]=P=>A.value=!0)},null,8,["modelValue","type","placeholder","disabled"]),f.value?te("",!0):(b(),de(h(rn),{key:0,class:"pf-key-eye",size:"sm",label:h(s)(S.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:h(s)(S.value?"providers.hideApiKey":"providers.showApiKey"),onClick:O[6]||(O[6]=P=>S.value=!S.value)},{default:he(()=>[V(h(Ce),{name:S.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"]))])]),C("div",DPe,[C("label",zPe,[qe(B(h(s)("providers.fieldBaseUrl")),1),O[14]||(O[14]=C("span",{class:"req"}," *",-1))]),V(h(Xs),{modelValue:r.baseUrl,"onUpdate:modelValue":O[7]||(O[7]=P=>r.baseUrl=P),placeholder:h(s)("providers.baseUrlPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder","disabled"])]),C("div",RPe,[C("label",OPe,[qe(B(h(s)("providers.fieldModels")),1),O[15]||(O[15]=C("span",{class:"req"}," *",-1))]),C("div",PPe,[g.value?(b(),M("div",jPe,B(h(s)("providers.noModels")),1)):(b(),M(Be,{key:1},[C("div",HPe,[C("span",null,[qe(B(h(s)("providers.colModelId")),1),O[16]||(O[16]=C("span",{class:"req"}," *",-1))]),C("span",null,[qe(B(h(s)("providers.colContext")),1),O[17]||(O[17]=C("span",{class:"req"}," *",-1))]),C("span",null,B(h(s)("providers.colDisplayName")),1),O[18]||(O[18]=C("span",null,null,-1))]),(b(!0),M(Be,null,yt(r.models,(P,R)=>(b(),M("div",{key:R,class:"pf-model-grid"},[V(h(Xs),{modelValue:P.model,"onUpdate:modelValue":j=>P.model=j,placeholder:h(s)("providers.modelIdPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),V(h(Xs),{modelValue:P.maxContextSize,"onUpdate:modelValue":j=>P.maxContextSize=j,inputmode:"numeric",placeholder:h(s)("providers.modelContextPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),V(h(Xs),{modelValue:P.displayName,"onUpdate:modelValue":j=>P.displayName=j,placeholder:h(s)("providers.modelNamePlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),f.value?(b(),M("span",WPe)):(b(),de(h(rn),{key:0,size:"sm",label:h(s)("providers.removeModel"),tooltip:h(s)("providers.removeModel"),disabled:r.models.length<=1,onClick:j=>T(R)},{default:he(()=>[V(h(Ce),{name:"trash",size:"sm"})]),_:1},8,["label","tooltip","disabled","onClick"]))]))),128)),f.value?te("",!0):(b(),M("div",qPe,[V(h(Ht),{variant:"ghost",size:"sm",onClick:D},{default:he(()=>[V(h(Ce),{name:"plus",size:"sm"}),qe(" "+B(h(s)("providers.addModel")),1)]),_:1})]))],64))])]),C("div",UPe,[f.value?(b(),M("span",KPe,B(h(s)("providers.managedHint")),1)):d.value?(b(),M(Be,{key:1},[V(h(Ht),{variant:"secondary",size:"sm",onClick:O[8]||(O[8]=P=>i("cancel"))},{default:he(()=>[qe(B(h(s)("common.cancel")),1)]),_:1}),V(h(Ht),{variant:"primary",size:"sm",disabled:a.value,onClick:E},{default:he(()=>[qe(B(h(s)("providers.addProvider")),1)]),_:1},8,["disabled"])],64)):u.value&&n.provider!==void 0?(b(),M(Be,{key:2},[C("span",VPe,B(h(s)("providers.deleteConfirm",{id:n.provider.id,count:p.value})),1),O[19]||(O[19]=C("span",{class:"spacer"},null,-1)),V(h(Ht),{variant:"secondary",size:"sm",disabled:c.value,onClick:O[9]||(O[9]=P=>u.value=!1)},{default:he(()=>[qe(B(h(s)("common.cancel")),1)]),_:1},8,["disabled"]),V(h(Ht),{variant:"danger",size:"sm",disabled:c.value,onClick:N},{default:he(()=>[qe(B(h(s)("providers.deleteConfirmYes")),1)]),_:1},8,["disabled"])],64)):(b(),M(Be,{key:3},[V(h(Ht),{variant:"danger-soft",size:"sm",onClick:O[10]||(O[10]=P=>u.value=!0)},{default:he(()=>[qe(B(h(s)("providers.deleteProvider")),1)]),_:1}),O[20]||(O[20]=C("span",{class:"spacer"},null,-1)),V(h(Ht),{variant:"primary",size:"sm",disabled:a.value,onClick:E},{default:he(()=>[qe(B(h(s)("providers.save")),1)]),_:1},8,["disabled"])],64))])],32))}}),qD=vt(ZPe,[["__scopeId","data-v-ac0597e3"]]),GPe={class:"af"},QPe={class:"msg"},YPe={key:2,class:"af-catalog"},JPe={key:0,class:"af-center"},XPe={key:1,class:"af-error"},eje={class:"af-list"},tje=["disabled","onClick"],nje={class:"af-entry-name"},ije={key:1,class:"af-entry-reason"},sje={key:2,class:"af-entry-count"},oje={key:0,class:"af-empty"},rje={class:"af-field"},lje={class:"af-label"},aje={class:"af-field"},uje={class:"af-label"},cje={class:"af-key-wrap"},dje={key:0,class:"af-field"},fje={class:"af-label"},hje={class:"af-note"},pje={class:"af-foot"},gje={class:"af-hint"},mje={class:"af-field"},vje={class:"af-label"},yje={class:"af-field"},bje={class:"af-label"},kje={class:"af-key-wrap"},Aje={class:"af-foot"},Cje={class:"af-manual"},wje=nt({__name:"AddProviderFlow",props:{guard:{type:Boolean}},emits:["dirtyChange","guardStay","guardDiscard","added","cancel"],setup(e,{emit:t}){const n=t,{t:i,te:s}=Bt(),o=Fa(),r=G("catalog"),l=F(()=>[{value:"catalog",label:i("providers.catalog.sourceCatalog")},{value:"registry",label:i("providers.catalog.sourceRegistry")},{value:"manual",label:i("providers.catalog.sourceManual")}]),a=G("loading"),u=G([]);async function c(){a.value="loading";const z=await o.loadCatalogProviders();z.kind==="ok"?(u.value=z.items,a.value="ready"):z.kind==="unsupported"?(a.value="unsupported",r.value==="catalog"&&(r.value="manual")):a.value="error"}gn(c);const d=G(""),f=F(()=>{const z=d.value.trim().toLowerCase();return z===""?u.value:u.value.filter(K=>K.name.toLowerCase().includes(z)||K.id.toLowerCase().includes(z))});function p(z){const K=z.rejectReason;return K!==null&&s(`providers.catalog.rejectReason.${K}`)?i(`providers.catalog.rejectReason.${K}`):i("providers.catalog.rejected")}const g=G(null),m=G({id:"",apiKey:"",baseUrl:""}),y=G(!1),w=G(!1),k=G("");function A(z){g.value=z,m.value={id:z.id,apiKey:"",baseUrl:""},k.value="",y.value=!1}function v(){g.value=null,k.value="",n("dirtyChange",!1)}function x(){n("dirtyChange",!0)}const S=F(()=>{if(g.value===null)return!1;const K=m.value.id.trim();return K!==""&&o.providers.value.some(q=>q.id===K)}),I=G();function _(z){k.value=z,At(()=>I.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}function E(){const z=m.value,K=z.id.trim();return K===""?i("providers.error.idRequired"):fL.test(K)?z.apiKey.trim()===""?i("providers.error.apiKeyRequired"):g.value?.needsBaseUrl===!0&&z.baseUrl.trim()===""?i("providers.error.baseUrlRequired"):null:i("providers.error.idInvalid")}async function N(){const z=g.value;if(z===null||w.value)return;const K=E();if(K!==null){_(K);return}k.value="",w.value=!0;try{const q=m.value,W=q.id.trim(),Z=q.baseUrl.trim(),ne=await o.importCatalogProvider({catalogId:z.id,apiKey:q.apiKey.trim(),...Z===""?{}:{baseUrl:Z},...W===z.id?{}:{id:W}});if(ne!==null){_(ne);return}o.notify({severity:"success",title:i("providers.added")}),n("dirtyChange",!1),n("added",W)}finally{w.value=!1}}const D=G({url:"",apiKey:""}),T=G(!1),$=G(!1),O=G(""),P=G();function R(z){O.value=z,At(()=>P.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}async function j(){if($.value)return;const z=D.value.url.trim();if(z===""){R(i("providers.error.registryUrlRequired"));return}O.value="",$.value=!0;try{const K=D.value.apiKey.trim(),q=await o.importCustomRegistry({url:z,...K===""?{}:{apiKey:K}});if(typeof q=="string"){R(q);return}o.notify({severity:"success",title:i("providers.catalog.registryImported",{count:q.providers.length})}),n("dirtyChange",!1);const W=q.providers[0];W!==void 0?n("added",W.id):n("cancel")}finally{$.value=!1}}return(z,K)=>(b(),M("div",GPe,[e.guard?(b(),de(h(kc),{key:0,variant:"warning",class:"af-guard"},{default:he(()=>[C("span",QPe,B(h(i)("providers.unsavedGuard")),1),V(h(Ht),{variant:"secondary",size:"sm",onClick:K[0]||(K[0]=q=>n("guardStay"))},{default:he(()=>[qe(B(h(i)("providers.guardStay")),1)]),_:1}),V(h(Ht),{variant:"danger",size:"sm",onClick:K[1]||(K[1]=q=>n("guardDiscard"))},{default:he(()=>[qe(B(h(i)("providers.guardDiscard")),1)]),_:1})]),_:1})):te("",!0),a.value!=="unsupported"?(b(),de(h(bo),{key:1,modelValue:r.value,"onUpdate:modelValue":K[2]||(K[2]=q=>r.value=q),size:"sm",options:l.value},null,8,["modelValue","options"])):te("",!0),a.value!=="unsupported"?Nn((b(),M("div",YPe,[a.value==="loading"?(b(),M("div",JPe,[V(h(Ii),{size:"sm"}),C("span",null,B(h(i)("providers.catalog.loading")),1)])):a.value==="error"?(b(),M("div",XPe,[V(h(kc),{variant:"danger"},{default:he(()=>[qe(B(h(i)("providers.catalog.loadError")),1)]),_:1}),C("div",null,[V(h(Ht),{variant:"secondary",size:"sm",onClick:c},{default:he(()=>[qe(B(h(i)("providers.catalog.retry")),1)]),_:1})])])):g.value===null?(b(),M(Be,{key:2},[V(h(Xs),{modelValue:d.value,"onUpdate:modelValue":K[3]||(K[3]=q=>d.value=q),placeholder:h(i)("providers.catalog.searchPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"]),C("div",eje,[(b(!0),M(Be,null,yt(f.value,q=>(b(),M("button",{key:q.id,type:"button",class:"af-entry",disabled:q.rejected,onClick:W=>A(q)},[C("span",nje,B(q.name),1),q.wireType!==null?(b(),de(h(Pl),{key:0,variant:"neutral",size:"sm"},{default:he(()=>[qe(B(q.wireType),1)]),_:2},1024)):te("",!0),K[16]||(K[16]=C("span",{class:"grow"},null,-1)),q.rejected?(b(),M("span",ije,B(p(q)),1)):(b(),M("span",sje,B(h(i)("providers.modelCount",{count:q.models.length})),1))],8,tje))),128)),f.value.length===0?(b(),M("div",oje,B(h(i)("providers.catalog.empty")),1)):te("",!0)])],64)):(b(),M("div",{key:3,class:"af-import",onInput:x},[C("button",{type:"button",class:"af-back",onClick:v},[V(h(Ce),{name:"arrow-left",size:"sm"}),qe(" "+B(h(i)("providers.catalog.backToList")),1)]),C("div",rje,[C("label",lje,[qe(B(h(i)("providers.fieldId")),1),K[17]||(K[17]=C("span",{class:"req"}," *",-1))]),V(h(Xs),{modelValue:m.value.id,"onUpdate:modelValue":K[4]||(K[4]=q=>m.value.id=q),autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),C("div",aje,[C("label",uje,[qe(B(h(i)("providers.fieldApiKey")),1),K[18]||(K[18]=C("span",{class:"req"}," *",-1))]),C("div",cje,[V(h(Xs),{modelValue:m.value.apiKey,"onUpdate:modelValue":K[5]||(K[5]=q=>m.value.apiKey=q),type:y.value?"text":"password",placeholder:"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type"]),V(h(rn),{class:"af-key-eye",size:"sm",label:h(i)(y.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:h(i)(y.value?"providers.hideApiKey":"providers.showApiKey"),onClick:K[6]||(K[6]=q=>y.value=!y.value)},{default:he(()=>[V(h(Ce),{name:y.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])])]),g.value.needsBaseUrl?(b(),M("div",dje,[C("label",fje,[qe(B(h(i)("providers.fieldBaseUrl")),1),K[19]||(K[19]=C("span",{class:"req"}," *",-1))]),V(h(Xs),{modelValue:m.value.baseUrl,"onUpdate:modelValue":K[7]||(K[7]=q=>m.value.baseUrl=q),placeholder:h(i)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])])):te("",!0),S.value?(b(),de(h(kc),{key:1,variant:"warning"},{default:he(()=>[qe(B(h(i)("providers.catalog.overwriteWarning")),1)]),_:1})):te("",!0),C("div",hje,B(h(i)("providers.catalog.willImport",{count:g.value.models.length})),1),k.value?(b(),M("div",{key:2,ref_key:"importErrorBox",ref:I},[V(h(kc),{variant:"danger"},{default:he(()=>[qe(B(k.value),1)]),_:1})],512)):te("",!0),C("div",pje,[V(h(Ht),{variant:"secondary",size:"sm",onClick:K[8]||(K[8]=q=>n("cancel"))},{default:he(()=>[qe(B(h(i)("common.cancel")),1)]),_:1}),V(h(Ht),{variant:"primary",size:"sm",disabled:w.value,onClick:N},{default:he(()=>[qe(B(h(i)("providers.catalog.importAction")),1)]),_:1},8,["disabled"])])],32))],512)),[[is,r.value==="catalog"]]):te("",!0),Nn(C("div",{class:"af-registry",onInput:x},[C("div",gje,B(h(i)("providers.catalog.registryHint")),1),C("div",mje,[C("label",vje,[qe(B(h(i)("providers.catalog.registryUrlLabel")),1),K[20]||(K[20]=C("span",{class:"req"}," *",-1))]),V(h(Xs),{modelValue:D.value.url,"onUpdate:modelValue":K[9]||(K[9]=q=>D.value.url=q),placeholder:"https://example.com/api.json",autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),C("div",yje,[C("label",bje,B(h(i)("providers.fieldApiKey")),1),C("div",kje,[V(h(Xs),{modelValue:D.value.apiKey,"onUpdate:modelValue":K[10]||(K[10]=q=>D.value.apiKey=q),type:T.value?"text":"password",placeholder:h(i)("providers.modelNamePlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","placeholder"]),V(h(rn),{class:"af-key-eye",size:"sm",label:h(i)(T.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:h(i)(T.value?"providers.hideApiKey":"providers.showApiKey"),onClick:K[11]||(K[11]=q=>T.value=!T.value)},{default:he(()=>[V(h(Ce),{name:T.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])])]),O.value?(b(),M("div",{key:0,ref_key:"registryErrorBox",ref:P},[V(h(kc),{variant:"danger"},{default:he(()=>[qe(B(O.value),1)]),_:1})],512)):te("",!0),C("div",Aje,[V(h(Ht),{variant:"secondary",size:"sm",onClick:K[12]||(K[12]=q=>n("cancel"))},{default:he(()=>[qe(B(h(i)("common.cancel")),1)]),_:1}),V(h(Ht),{variant:"primary",size:"sm",disabled:$.value,onClick:j},{default:he(()=>[qe(B(h(i)("providers.catalog.importAction")),1)]),_:1},8,["disabled"])])],544),[[is,r.value==="registry"]]),Nn(C("div",Cje,[V(qD,{mode:"add",guard:!1,onDirtyChange:K[13]||(K[13]=q=>n("dirtyChange",q)),onAdded:K[14]||(K[14]=q=>n("added",q)),onCancel:K[15]||(K[15]=q=>n("cancel"))})],512),[[is,r.value==="manual"]])]))}}),xje=vt(wje,[["__scopeId","data-v-9e5ec0a8"]]),_je={class:"pp"},Sje={class:"pp-head"},Mje={class:"pp-title"},Ije={key:0,class:"pp-loading"},Eje={key:1,class:"pp-group"},Tje={class:"pp-add-label"},Lje={class:"pp-chev"},Nje={class:"pp-acc"},Fje={class:"pp-acc-in"},Bje={key:1,class:"pp-empty"},$je=["onClick"],Dje={class:"grow"},zje={class:"pp-id"},Rje={class:"pp-count"},Oje={class:"pp-chev"},Pje={class:"pp-acc"},jje={class:"pp-acc-in"},mc="$add",Hje=nt({__name:"ProvidersPanel",setup(e){const{t}=Bt(),n=Fa(),i=G(!0),s=G(null),o=G(null);let r=0;const l=G(!1),a=G(!1),u=G(null),c=G("");let d=0;const f=F(()=>[...n.providers.value].sort((S,I)=>S.id.localeCompare(I.id)));function p(S){return y3(S,n.config.value?.models).length}Ge(s,(S,I)=>{I!==null&&I!==S&&(o.value=I,window.clearTimeout(r),r=window.setTimeout(()=>{o.value=null},300)),l.value=!1}),Ge(l,S=>{S||(a.value=!1,u.value=null)}),Cn(()=>{window.clearTimeout(r),window.clearTimeout(d)});const g=G(!1);Ge(s,S=>{S===mc?(g.value=!1,At(()=>requestAnimationFrame(()=>{g.value=!0}))):g.value=!1}),gn(async()=>{i.value=!0;try{await Promise.all([n.loadProviders(),n.loadModels(),n.loadConfig()])}finally{i.value=!1}});function m(S){const I=s.value===S?null:S;if(l.value){u.value=I,a.value=!0;return}s.value=I}function y(){a.value=!1,u.value=null}function w(){a.value=!1,s.value=u.value,u.value=null}function k(S){c.value=S,window.clearTimeout(d),d=window.setTimeout(()=>{c.value=""},1200)}function A(S){s.value=S}function v(S){s.value=S,k(S)}function x(){s.value=null}return(S,I)=>(b(),M("section",_je,[C("div",Sje,[C("h3",Mje,B(h(t)("settings.tabs.providers")),1),V(h(Ht),{variant:"secondary",size:"sm",onClick:I[0]||(I[0]=_=>m(mc))},{default:he(()=>[V(h(Ce),{name:"plus",size:"sm"}),qe(" "+B(h(t)("providers.addProvider")),1)]),_:1})]),i.value?(b(),M("div",Ije,[V(h(Ii),{size:"sm"}),C("span",null,B(h(t)("providers.loading")),1)])):(b(),M("div",Eje,[s.value===mc||o.value===mc?(b(),M("div",{key:0,class:$e(["pp-item pp-add-item",{open:s.value===mc&&g.value}])},[C("button",{type:"button",class:"pp-row pp-add-row",onClick:I[1]||(I[1]=_=>m(mc))},[C("span",Tje,B(h(t)("providers.addProvider")),1),I[6]||(I[6]=C("span",{class:"grow"},null,-1)),C("span",Lje,[V(h(Ce),{name:"chevron-right",size:"sm"})])]),C("div",Nje,[C("div",Fje,[V(xje,{guard:a.value&&s.value===mc,onDirtyChange:I[2]||(I[2]=_=>l.value=_),onGuardStay:y,onGuardDiscard:w,onAdded:v,onCancel:I[3]||(I[3]=_=>s.value=null)},null,8,["guard"])])])],2)):te("",!0),f.value.length===0?(b(),M("div",Bje,B(h(t)("providers.empty")),1)):te("",!0),(b(!0),M(Be,null,yt(f.value,_=>(b(),M("div",{key:_.id,class:$e(["pp-item",{open:s.value===_.id,flash:c.value===_.id}])},[C("button",{type:"button",class:"pp-row",onClick:E=>m(_.id)},[C("div",Dje,[C("span",zje,B(_.id),1),V(h(Pl),{variant:"neutral",size:"sm"},{default:he(()=>[qe(B(_.type),1)]),_:2},1024),h(pL)(_)?(b(),de(h(Pl),{key:0,variant:"info",size:"sm"},{default:he(()=>[qe(B(h(t)("providers.managedBadge")),1)]),_:1})):te("",!0)]),C("span",Rje,B(h(t)("providers.modelCount",{count:p(_)})),1),C("span",Oje,[V(h(Ce),{name:"chevron-right",size:"sm"})])],8,$je),C("div",Pje,[C("div",jje,[s.value===_.id||o.value===_.id?(b(),de(qD,{key:0,mode:"edit",provider:_,guard:a.value&&s.value===_.id,onDirtyChange:I[4]||(I[4]=E=>l.value=E),onGuardStay:y,onGuardDiscard:w,onSaved:A,onDeleting:I[5]||(I[5]=E=>s.value=null),onDeleted:x},null,8,["provider","guard"])):te("",!0)])])],2))),128))]))]))}}),Wje=vt(Hje,[["__scopeId","data-v-9aa0e3a8"]]),qje={class:"sec"},Uje={class:"sec-title"},Kje={class:"pu-group"},Vje={class:"pu-row"},Zje={class:"pu-main"},Gje={class:"pu-label"},Qje={class:"pu-hint"},Yje=nt({__name:"PlanUpgradeCard",setup(e){const{t}=Bt();return(n,i)=>(b(),M("section",qje,[C("h3",Uje,B(h(t)("settings.planUsage.title")),1),C("div",Kje,[C("div",Vje,[C("span",Zje,[C("span",Gje,B(h(t)("settings.planUsage.freeTitle")),1),C("span",Qje,B(h(t)("settings.planUsage.freeHint")),1)]),V(h(Ht),{variant:"primary",size:"sm",onClick:i[0]||(i[0]=s=>h(kp)())},{default:he(()=>[qe(B(h(t)("sidebar.upgrade")),1)]),_:1})])])]))}}),UD=vt(Yje,[["__scopeId","data-v-5711dff8"]]),Jje={class:"sec"},Xje={class:"sec-title"},eHe={class:"pu-group"},tHe={key:0,class:"pu-row pu-state"},nHe={key:1,class:"pu-row pu-state"},iHe={class:"pu-error-text"},sHe={key:2,class:"pu-row pu-state pu-empty"},oHe={class:"pu-main"},rHe={class:"pu-label"},lHe={key:0,class:"pu-hint"},aHe={class:"pu-value"},uHe=["aria-valuenow","aria-valuemax"],cHe={key:0,class:"sec"},dHe={class:"sec-title"},fHe={class:"pu-group"},hHe={class:"pu-row"},pHe={class:"pu-main"},gHe={class:"pu-label"},mHe={class:"pu-value"},vHe={key:0,class:"pu-value-sub"},yHe={key:0,class:"pu-meter"},bHe={class:"pu-row"},kHe={class:"pu-main"},AHe={class:"pu-label"},CHe={class:"pu-value"},wHe={class:"pu-row"},xHe={class:"pu-main"},_He={class:"pu-label"},SHe={class:"pu-value"},MHe={class:"pu-value-sub"},IHe=nt({__name:"PlanUsageCard",props:{onFetchUsage:{type:Function}},setup(e){const t=e,{t:n}=Bt(),i=G(!0),s=G(null);async function o(){i.value=!0;try{s.value=await t.onFetchUsage()}finally{i.value=!1}}gn(o);const r=F(()=>s.value?.kind==="ok"?s.value:null),l=F(()=>r.value?.extraUsage??null),a=F(()=>{const m=r.value;return m===null?[]:m.summary===null?m.limits:[m.summary,...m.limits]}),u=F(()=>a.value.length>0),c=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 p(m,y){const w=ute(m,y);return`${w.symbol}${w.number}`}function g(m){return m.resetAt===void 0?"":dL(m.resetAt,n)}return(m,y)=>d.value?(b(),de(UD,{key:0})):(b(),M(Be,{key:1},[C("section",Jje,[C("h3",Xje,B(h(n)("settings.planUsage.title")),1),C("div",eHe,[i.value?(b(),M("div",tHe,[V(h(Ii),{size:"sm"})])):r.value===null?(b(),M("div",nHe,[C("span",iHe,B(c.value),1),V(h(Ht),{variant:"ghost",size:"sm",onClick:o},{default:he(()=>[qe(B(h(n)("settings.planUsage.retry")),1)]),_:1})])):u.value?(b(!0),M(Be,{key:3},yt(a.value,(w,k)=>(b(),M("div",{key:k,class:"pu-row"},[C("span",oHe,[C("span",rHe,B(h(cL)(w,h(n))),1),g(w)?(b(),M("span",lHe,B(g(w)),1)):te("",!0)]),C("span",aHe,B(h(n)("settings.planUsage.usedPct",{pct:h(Cg)(w.used,w.limit)})),1),C("span",{class:"pu-meter",role:"progressbar","aria-valuenow":w.used,"aria-valuemax":w.limit},[C("i",{class:$e(`sev-${h(v3)(w.used,w.limit)}`),style:Vt({width:`${h(Cg)(w.used,w.limit)}%`})},null,6)],8,uHe)]))),128)):(b(),M("div",sHe,B(h(n)("settings.planUsage.empty")),1))])]),l.value!==null?(b(),M("section",cHe,[C("h3",dHe,B(h(n)("settings.planUsage.boosterTitle")),1),C("div",fHe,[C("div",hHe,[C("span",pHe,[C("span",gHe,B(h(n)("settings.planUsage.monthlyUsed")),1)]),C("span",mHe,[qe(B(p(l.value.monthlyUsedCents,l.value.currency)),1),f.value?(b(),M("span",vHe," / "+B(p(l.value.monthlyChargeLimitCents,l.value.currency)),1)):te("",!0)]),f.value?(b(),M("span",yHe,[C("i",{class:$e(`sev-${h(v3)(l.value.monthlyUsedCents,l.value.monthlyChargeLimitCents)}`),style:Vt({width:`${h(Cg)(l.value.monthlyUsedCents,l.value.monthlyChargeLimitCents)}%`})},null,6)])):te("",!0)]),C("div",bHe,[C("span",kHe,[C("span",AHe,B(h(n)("settings.planUsage.monthlyLimit")),1)]),C("span",CHe,[f.value?(b(),M(Be,{key:0},[qe(B(p(l.value.monthlyChargeLimitCents,l.value.currency)),1)],64)):(b(),M(Be,{key:1},[qe(B(h(n)("settings.planUsage.unlimited")),1)],64))])]),C("div",wHe,[C("span",xHe,[C("span",_He,B(h(n)("settings.planUsage.boosterBalance")),1)]),C("span",SHe,[qe(B(p(l.value.balanceCents,l.value.currency)),1),C("span",MHe," / "+B(p(l.value.totalCents,l.value.currency)),1)])])])])):te("",!0)],64))}}),EHe=vt(IHe,[["__scopeId","data-v-f39cdded"]]),THe=["aria-expanded","aria-label"],LHe={class:"sm-picker__value-text"},NHe=["aria-label"],FHe=["aria-label"],BHe={class:"sm-picker__group"},$He=["aria-selected","onMouseenter","onClick"],DHe={class:"sm-picker__option-label"},zHe=["aria-label"],RHe={class:"sm-picker__group"},OHe=["aria-selected","onMouseenter","onClick"],PHe={class:"sm-picker__option-label"},jHe=188,HHe=250,C4=8,WHe=nt({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{}},emits:["select"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=G(null),r=G(null),l=G(null),a=G(null),u=new Map,c=G(!1),d=G(!1),f=G({}),p=`sm-picker-${Math.random().toString(36).slice(2,9)}`,g=G(""),m=G(null),y=G("right"),w=G(0),k=G("models"),A=G(0),v=G(0);let x=null;const S=F(()=>n.groups.flatMap(ee=>ee.options)),I=F(()=>n.modelValue?S.value.find(ee=>ee.id===n.modelValue)?.label??n.modelValue:""),_=F(()=>n.modelValue?n.effort?`${I.value} · ${n.effort}`:I.value:s("settings.noSecondaryModel")),E=F(()=>{const ee=m.value;if(ee===null)return[];const ye=bp(n.modelInfoById[ee]),H=n.effort===""?[null,...ye]:[...ye];return n.modelValue===ee&&n.effort!==""&&!ye.includes(n.effort)&&H.push(n.effort),H});function N(ee){return n.modelValue!==m.value?!1:ee===null?n.effort==="":n.effort===ee}function D(){const ee=E.value.findIndex(ye=>N(ye));return ee>=0?ee:0}function T(ee,ye){ee instanceof HTMLElement?u.set(ye,ee):u.delete(ye)}function $(){x!==null&&(clearTimeout(x),x=null)}function O(){$(),x=setTimeout(()=>{m.value=null,k.value==="efforts"&&(k.value="models")},HHe)}function P(ee){ee!==g.value&&(g.value=ee,A.value=Math.max(0,S.value.findIndex(ye=>ye.id===ee)))}function R(){const ee=r.value,ye=l.value;if(!ee||!ye)return;const H=ee.getBoundingClientRect(),Y=ye.offsetHeight,ve=window.innerHeight-H.bottom;d.value=ve<Y+C4&&H.top>Y;const re=Math.max(C4,window.innerWidth-H.right);f.value=d.value?{right:`${re}px`,bottom:`${window.innerHeight-H.top+4}px`,top:"auto"}:{right:`${re}px`,top:`${H.bottom+4}px`,bottom:"auto"}}function j(){const ee=l.value,ye=m.value===null?void 0:u.get(m.value);if(!ee||!ye)return;const H=ee.getBoundingClientRect(),Y=ye.getBoundingClientRect(),ve=a.value?.offsetHeight??0,re=Math.max(0,window.innerHeight-C4-ve-H.top);w.value=Math.max(0,Math.min(Y.top-H.top-4,ee.offsetHeight-40,re));const se=window.innerWidth-H.right,U=H.left;y.value=se>=jHe||se>=U?"right":"left"}function z(ee,{moveFocus:ye=!1}={}){P(ee),$(),m.value=ee,ye&&(k.value="efforts",v.value=D()),At(j)}function K(){m.value=null,k.value="models"}function q(){c.value||(c.value=!0,g.value=n.modelValue||(S.value[0]?.id??""),A.value=Math.max(0,S.value.findIndex(ee=>ee.id===g.value)),m.value=null,k.value="models",At(R))}function W({restoreFocus:ee=!1}={}){c.value&&($(),c.value=!1,m.value=null,ee&&At(()=>r.value?.focus()))}function Z(){c.value?W():q()}function ne(ee){if(m.value===null)return;const ye={model:m.value,effort:ee??void 0};(ye.model!==n.modelValue||(ye.effort??"")!==n.effort)&&i("select",ye),W({restoreFocus:!0})}function X(){At(()=>{l.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function ue(ee){const ye=S.value;if(ye.length===0)return;const H=(A.value+ee+ye.length)%ye.length,Y=ye[H].id;P(Y),m.value!==null&&z(Y),X()}function ie(ee){const ye=E.value;ye.length!==0&&(v.value=(v.value+ee+ye.length)%ye.length,X())}function Se(ee){if(!c.value){(ee.key==="Enter"||ee.key===" "||ee.key==="ArrowDown")&&(ee.preventDefault(),q());return}if(ee.key==="ArrowDown")ee.preventDefault(),k.value==="models"?ue(1):ie(1);else if(ee.key==="ArrowUp")ee.preventDefault(),k.value==="models"?ue(-1):ie(-1);else if(ee.key==="ArrowRight")ee.preventDefault(),z(g.value,{moveFocus:!0});else if(ee.key==="ArrowLeft")ee.preventDefault(),m.value!==null&&K();else if(ee.key==="Enter"||ee.key===" ")ee.preventDefault(),k.value==="models"?z(g.value,{moveFocus:!0}):ne(E.value[v.value]??null);else if(ee.key==="Home"||ee.key==="End"){ee.preventDefault();const ye=ee.key==="Home";if(k.value==="models"){const H=S.value;if(H.length===0)return;const Y=(ye?H[0]:H.at(-1)).id;P(Y),m.value!==null&&z(Y)}else v.value=ye?0:E.value.length-1;X()}else ee.key==="Escape"&&(ee.preventDefault(),W({restoreFocus:!0}))}function fe(ee){const ye=ee.target;o.value?.contains(ye)||l.value?.contains(ye)||W()}function pe(ee){if(c.value){if(l.value?.contains(ee.target)){j();return}R(),j()}}function Ne(){W()}return gn(()=>{document.addEventListener("pointerdown",fe),document.addEventListener("scroll",pe,!0),window.addEventListener("resize",Ne)}),Cn(()=>{document.removeEventListener("pointerdown",fe),document.removeEventListener("scroll",pe,!0),window.removeEventListener("resize",Ne),$()}),(ee,ye)=>(b(),M("div",{ref_key:"rootRef",ref:o,class:$e(["sm-picker",{"is-open":c.value}])},[C("button",{ref_key:"triggerRef",ref:r,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":p,"aria-expanded":c.value,"aria-haspopup":"dialog","aria-label":h(s)("settings.secondaryModel"),onClick:Z,onKeydown:Se},[C("span",{class:$e(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[C("span",LHe,B(_.value),1)],2),V(h(Ce),{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,THe),(b(),de(jr,{to:"body"},[c.value?(b(),M("div",{key:0,id:p,ref_key:"menuRef",ref:l,class:$e(["sm-picker__menu",{"sm-picker__menu--up":d.value}]),style:Vt(f.value),role:"dialog","aria-label":h(s)("settings.secondaryModel")},[C("div",{class:"sm-picker__models",role:"listbox","aria-label":h(s)("settings.secondaryModel")},[(b(!0),M(Be,null,yt(e.groups,H=>(b(),M(Be,{key:H.provider},[C("div",BHe,B(H.provider),1),(b(!0),M(Be,null,yt(H.options,Y=>(b(),M("button",{key:Y.id,ref_for:!0,ref:ve=>T(ve,Y.id),class:$e(["sm-picker__option",{"is-selected":Y.id===e.modelValue,"is-active":Y.id===g.value,"is-kb-active":k.value==="models"&&Y.id===g.value}]),type:"button",role:"option","aria-selected":Y.id===e.modelValue,onMouseenter:ve=>z(Y.id),onMouseleave:O,onClick:ve=>z(Y.id,{moveFocus:!0})},[V(h(Ce),{class:"sm-picker__check",name:"check",size:"sm"}),C("span",DHe,B(Y.label),1),V(h(Ce),{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,$He))),128))],64))),128))],8,FHe),m.value!==null?(b(),M("div",{key:0,ref_key:"flyoutRef",ref:a,class:$e(["sm-picker__flyout",`sm-picker__flyout--${y.value}`]),style:Vt({top:`${w.value}px`}),role:"listbox","aria-label":h(s)("settings.secondaryModelEffort"),onMouseenter:$,onMouseleave:O},[C("div",RHe,B(h(s)("settings.secondaryModelEffort")),1),(b(!0),M(Be,null,yt(E.value,(H,Y)=>(b(),M("button",{key:H??"__default__",class:$e(["sm-picker__option",{"is-selected":N(H),"is-active":k.value==="efforts"&&Y===v.value,"is-kb-active":k.value==="efforts"&&Y===v.value,"is-muted":H===null}]),type:"button",role:"option","aria-selected":N(H),onMouseenter:ve=>{k.value="efforts",v.value=Y},onClick:ve=>ne(H)},[V(h(Ce),{class:"sm-picker__check",name:"check",size:"sm"}),C("span",PHe,B(H??h(s)("settings.secondaryModelEffortAuto")),1)],42,OHe))),128))],46,zHe)):te("",!0)],14,NHe)):te("",!0)]))],2))}}),qHe=vt(WHe,[["__scopeId","data-v-eb75e643"]]),UHe=["aria-label"],KHe={class:"settings-tabs-header"},VHe={class:"settings-dialog-title"},ZHe={class:"settings-tab-list"},GHe=["aria-selected","onClick"],QHe={class:"settings-region"},YHe={class:"settings-region-header"},JHe={class:"panel"},XHe={class:"sec"},eWe={class:"sec-title"},tWe={class:"settings-group"},nWe={class:"row"},iWe={class:"rlabel"},sWe={class:"hint"},oWe={class:"row language-row"},rWe={class:"rlabel"},lWe={class:"hint"},aWe={class:"row font-size-row"},uWe={class:"rlabel"},cWe={class:"hint"},dWe={class:"sec notification-settings"},fWe={class:"sec-title"},hWe={class:"settings-group"},pWe={class:"row"},gWe={class:"rlabel"},mWe={class:"hint"},vWe={key:0,class:"hint"},yWe={class:"row"},bWe={class:"rlabel"},kWe={class:"hint"},AWe={class:"panel"},CWe={class:"sec"},wWe={class:"sec-title"},xWe={class:"settings-group"},_We={class:"account-row"},SWe={class:"account-avatar","aria-hidden":"true"},MWe=["src"],IWe={class:"account-meta"},EWe={class:"account-name-row"},TWe={class:"account-name"},LWe={class:"account-sub"},NWe={key:0,class:"panel"},FWe={class:"panel"},BWe={class:"sec"},$We={class:"sec-head"},DWe={class:"sec-title"},zWe={class:"settings-group"},RWe={class:"row"},OWe={class:"rlabel"},PWe={class:"hint"},jWe={key:0,class:"select-wrap"},HWe={key:1,class:"rvalue mono"},WWe={class:"row"},qWe={class:"rlabel"},UWe={class:"hint"},KWe={class:"row"},VWe={class:"rlabel"},ZWe={class:"hint"},GWe={class:"row"},QWe={class:"rlabel"},YWe={class:"hint"},JWe={key:1,class:"empty-config"},XWe={key:0,class:"sec"},eqe={class:"sec-head"},tqe={class:"sec-title"},nqe={class:"settings-group"},iqe={class:"row"},sqe={class:"rlabel"},oqe={class:"hint"},rqe={key:0,class:"select-wrap"},lqe={key:1,class:"rvalue mono"},aqe={class:"panel"},uqe={class:"sec"},cqe={class:"sec-title"},dqe={class:"settings-group"},fqe={class:"row"},hqe={class:"rlabel"},pqe={class:"hint"},gqe={class:"rvalue"},mqe={class:"row"},vqe={class:"rlabel"},yqe={class:"hint"},bqe={class:"rvalue"},kqe={class:"row"},Aqe={class:"rlabel"},Cqe={class:"hint"},wqe={class:"rvalue"},xqe={key:0,class:"row"},_qe={class:"rlabel"},Sqe={key:0,class:"hint"},Mqe={key:1,class:"hint"},Iqe={key:1,class:"row"},Eqe={class:"rlabel"},Tqe={class:"hint"},Lqe={key:0,class:"sec"},Nqe={class:"sec-title"},Fqe={class:"settings-group"},Bqe={class:"row"},$qe={class:"rlabel"},Dqe={class:"hint"},zqe={class:"hint"},Rqe={class:"sec"},Oqe={class:"sec-title"},Pqe={class:"settings-group"},jqe={class:"row"},Hqe={class:"rlabel"},Wqe={class:"hint"},qqe={key:0,class:"hint"},Uqe={class:"panel"},Kqe={class:"panel-head"},Vqe={class:"panel-title"},Zqe={class:"panel-desc"},Gqe={class:"archive-toolbar"},Qqe={class:"archive-search"},Yqe=["placeholder"],Jqe={key:0,class:"archive-empty"},Xqe={key:0,class:"archive-list"},eUe={class:"archive-workspace"},tUe={class:"path"},nUe={class:"count"},iUe={class:"setting-card"},sUe={class:"archive-meta"},oUe={class:"archive-name"},rUe={class:"archive-time"},lUe={key:1,class:"archive-empty"},aUe=100,uUe=nt({__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}=Bt(),i=e,s=t,o=F(()=>i.managedProviderStatus==="authenticated"),r=F(()=>o.value?i.managedUserInfo?.nickname||n("sidebar.defaultUserName"):n("sidebar.notSignedIn")),l=F(()=>i.managedUserInfo?.userLevelName?.trim()??""),a=G(!1);Ge(()=>i.managedUserInfo?.avatar,()=>{a.value=!1});const u=F(()=>!!i.managedUserInfo?.avatar&&!a.value),c=F(()=>o.value?n("settings.signedIn"):n("settings.signedOutHint")),d=G(i.initialTab??"general"),f=G(!1);let p=null;function g(){f.value=!0,p&&clearTimeout(p),p=setTimeout(()=>{f.value=!1,p=null},900)}const m=[{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"}],y=Eke(),w=["manual","yolo","auto"],k={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},A=G(null);HD(A);const{isConfirmOpen:v}=ju();function x(Fe){Fe.key==="Escape"&&!Fe.defaultPrevented&&!v.value&&s("close")}gn(()=>document.addEventListener("keydown",x)),Cn(()=>{document.removeEventListener("keydown",x),p&&clearTimeout(p)});function S(){p$()}const I=(()=>{const Fe="0.36.0".trim()?"0.36.0":"";let De="";if("2026-08-14T12:08:10.998Z".trim()){const gt=new Date("2026-08-14T12:08:10.998Z");if(!Number.isNaN(gt.getTime())){const lt=ft=>String(ft).padStart(2,"0");De=`${gt.getFullYear()}-${lt(gt.getMonth()+1)}-${lt(gt.getDate())} ${lt(gt.getHours())}:${lt(gt.getMinutes())}`}}const Ke=De===""?Fe:`${Fe} · ${De}`;return Ke===""?"-":Ke})(),_=o$(),E=G(!1),N=G(null);async function D(){if(!E.value){E.value=!0,N.value=null;try{N.value=await _.check()}finally{E.value=!1}}}const T=F(()=>{const Fe=N.value;if(Fe===null)return"";switch(Fe.outcome){case"available":return _.status.value.state==="downloaded"?n("settings.updateCheckDownloaded",{version:Fe.version??""}):_.autoDownload.value?n("settings.updateCheckAvailableAuto",{version:Fe.version??""}):n("settings.updateCheckAvailable",{version:Fe.version??""});case"latest":return n("settings.updateCheckLatest");case"unsupported":return n("settings.updateCheckUnsupported");case"error":return n("settings.updateCheckFailed")}}),$=F(()=>{const Fe=new Map;for(const De of i.models??[])Fe.set(De.id,{id:De.id,label:De.displayName??De.model??De.id,provider:De.provider});for(const[De,Ke]of Object.entries(i.config?.models??{})){if(Fe.has(De))continue;const gt=j(Ke);Fe.set(De,{id:De,label:z(De,Ke,gt),provider:gt??De})}return Array.from(Fe.values())}),O=F(()=>{const Fe=new Map;for(const De of $.value){const Ke=Fe.get(De.provider)??[];Ke.push(De),Fe.set(De.provider,Ke)}for(const De of Fe.values())De.sort((Ke,gt)=>Ke.label.localeCompare(gt.label));return Array.from(Fe.entries()).toSorted(([De],[Ke])=>De.localeCompare(Ke)).map(([De,Ke])=>({provider:De,options:Ke}))}),P=F(()=>{const Fe=O.value.flatMap(De=>De.options.map(Ke=>({value:Ke.id,label:Ke.label,group:De.provider})));return i.config?.defaultModel||Fe.unshift({value:"",label:n("settings.noDefaultModel"),group:"",disabled:!0}),Fe}),R=F(()=>{const Fe=i.config?.defaultPermissionMode;return Fe==="auto"||Fe==="yolo"||Fe==="manual"?Fe:"manual"});function j(Fe){if(!Fe||typeof Fe!="object")return;const De=Fe;return typeof De.provider=="string"?De.provider:void 0}function z(Fe,De,Ke){if(!De||typeof De!="object")return Fe;const gt=De,lt=typeof gt.model=="string"?gt.model:void 0,ft=Ke??j(De);return lt&&ft?`${Fe} (${ft}/${lt})`:lt?`${Fe} (${lt})`:Fe}function K(Fe){return Fe===!0}function q(Fe){!Fe||Fe===i.config?.defaultModel||s("updateConfig",{defaultModel:Fe})}function W(Fe){Fe!==R.value&&s("updateConfig",{defaultPermissionMode:Fe})}const Z=F(()=>(i.experimentalFlags?.["secondary-model"]??i.config?.experimental?.["secondary-model"])===!0),ne=F(()=>i.config?.secondaryModel?.model??""),X=F(()=>i.config?.secondaryModel?.defaultEffort??""),ue=F(()=>Object.fromEntries((i.models??[]).map(Fe=>[Fe.id,Fe])));function ie(Fe){Fe.model===ne.value&&(Fe.effort??"")===X.value||s("updateConfig",{secondaryModel:Fe.effort?{model:Fe.model,defaultEffort:Fe.effort}:{model:Fe.model}})}function Se(Fe){const De=i.config?.[Fe];s("updateConfig",{[Fe]:!K(De)})}function fe(){const Fe=i.config?.thinking;return!Fe||typeof Fe!="object"?!0:Fe.enabled!==!1}function pe(){s("updateConfig",{thinking:{enabled:!fe()}})}function Ne(){const Fe=i.config?.telemetry!==!1;s("updateConfig",{telemetry:!Fe})}function ee(Fe){d.value=Fe}const ye=Fa(),H=F(()=>o.value&&ye.managedMembership.value==="free"),Y=G([]),ve=G(!1),re=G(!1),se=G(""),U=G("all"),J=G("archived-desc");async function ce(){if(!(ve.value||re.value)){ve.value=!0;try{const Fe=[];let De;for(;;){const Ke=await ye.loadArchivedSessions({beforeId:De,pageSize:aUe});if(Fe.push(...Ke.items),!Ke.hasMore||Ke.items.length===0)break;const gt=Ke.items.at(-1)?.id;if(gt===void 0)break;De=gt}Y.value=Fe,re.value=!0}catch(Fe){Bl("loadAllArchived failed",Fe)}finally{ve.value=!1}}}Ge(d,Fe=>{Fe==="archived"&&!re.value&&ce()},{immediate:!0});const ge=F(()=>{const Fe=new Set;for(const De of Y.value)Fe.add(De.cwd);return Array.from(Fe).sort((De,Ke)=>De.localeCompare(Ke))}),Me=F(()=>[{value:"all",label:n("settings.archivedAllWorkspaces")},...ge.value.map(Fe=>({value:Fe,label:Fe}))]),Pe=F(()=>{const Fe=se.value.trim().toLowerCase();let De=Y.value.filter(Ke=>Ke.archived===!0);return U.value!=="all"&&(De=De.filter(Ke=>Ke.cwd===U.value)),Fe&&(De=De.filter(Ke=>Ke.title.toLowerCase().includes(Fe))),De=De.slice(),J.value==="archived-desc"?De.sort((Ke,gt)=>(gt.archivedAt??gt.updatedAt).localeCompare(Ke.archivedAt??Ke.updatedAt)):J.value==="created-desc"?De.sort((Ke,gt)=>gt.createdAt.localeCompare(Ke.createdAt)):De.sort((Ke,gt)=>Ke.title.localeCompare(gt.title,"zh")),De}),ke=F(()=>{const Fe=new Map;for(const De of Pe.value){const Ke=Fe.get(De.cwd)??[];Ke.push(De),Fe.set(De.cwd,Ke)}return Array.from(Fe.entries()).map(([De,Ke])=>({cwd:De,items:Ke}))});async function Le(Fe){await ye.restoreSession(Fe)&&(Y.value=Y.value.filter(Ke=>Ke.id!==Fe))}function it(Fe){const De=new Date(Fe);if(Number.isNaN(De.getTime()))return Fe;const Ke=gt=>String(gt).padStart(2,"0");return`${De.getFullYear()}-${Ke(De.getMonth()+1)}-${Ke(De.getDate())} ${Ke(De.getHours())}:${Ke(De.getMinutes())}`}return(Fe,De)=>(b(),de(h(La),{open:!0,"close-on-esc":!1,"aria-label":h(n)("settings.title"),size:"xl",height:"fixed",padded:!1,level:"grouped",onClose:De[16]||(De[16]=Ke=>s("close"))},{default:he(()=>[C("div",{ref_key:"dialogRef",ref:A,class:"sd"},[C("nav",{class:"settings-tabs",role:"tablist","aria-label":h(n)("settings.title")},[C("header",KHe,[C("h2",VHe,B(h(n)("settings.title")),1)]),C("div",ZHe,[(b(),M(Be,null,yt(m,Ke=>C("button",{key:Ke.id,type:"button",class:$e(["tab",{on:d.value===Ke.id}]),role:"tab","aria-selected":d.value===Ke.id,onClick:gt=>ee(Ke.id)},[V(h(Ce),{name:Ke.icon,size:"md"},null,8,["name"]),C("span",null,B(h(n)(Ke.labelKey)),1)],10,GHe)),64))])],8,UHe),C("section",QHe,[C("header",YHe,[V(h(rn),{size:"sm",label:h(n)("settings.close"),tooltip:h(n)("settings.close"),onClick:De[0]||(De[0]=Ke=>s("close"))},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])]),C("div",{class:$e(["body",{scrolling:f.value}]),onScroll:g},[Nn(C("section",JHe,[C("section",XHe,[C("h3",eWe,B(h(n)("settings.appearance")),1),C("div",tWe,[C("div",nWe,[C("span",iWe,[qe(B(h(n)("theme.colorSchemeLabel"))+" ",1),C("span",sWe,B(h(n)("settings.colorSchemeHint")),1)]),V(h(bo),{"model-value":e.colorScheme,options:[{value:"light",label:h(n)("theme.light"),icon:"light-mode"},{value:"dark",label:h(n)("theme.dark"),icon:"dark-mode"},{value:"system",label:h(n)("theme.system")}],"onUpdate:modelValue":De[1]||(De[1]=Ke=>s("setColorScheme",Ke))},null,8,["model-value","options"])]),C("div",oWe,[C("span",rWe,[qe(B(h(n)("sidebar.language"))+" ",1),C("span",lWe,B(h(n)("settings.languageHint")),1)]),V(WD)]),C("div",aWe,[C("span",uWe,[qe(B(h(n)("settings.uiFontSize"))+" ",1),C("span",cWe,B(h(n)("settings.uiFontSizeHint")),1)]),V(h(bo),{"model-value":e.fontScale,options:[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],"aria-label":h(n)("settings.uiFontSize"),"onUpdate:modelValue":De[2]||(De[2]=Ke=>s("setFontScale",Ke))},null,8,["model-value","aria-label"])])])]),C("section",dWe,[C("h3",fWe,B(h(n)("settings.notifications")),1),C("div",hWe,[C("div",pWe,[C("span",gWe,[qe(B(h(n)("settings.notifyEnabled"))+" ",1),C("span",mWe,B(h(n)("settings.notifyEnabledHint")),1),e.notifyPermission==="denied"?(b(),M("span",vWe,B(h(n)("settings.notifyDenied")),1)):te("",!0)]),V(h(Sd),{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:h(n)("settings.notifyEnabled"),"onUpdate:modelValue":De[3]||(De[3]=Ke=>s("setNotify",Ke))},null,8,["model-value","disabled","label"])]),C("div",yWe,[C("span",bWe,[qe(B(h(n)("settings.notifySound"))+" ",1),C("span",kWe,B(h(n)("settings.notifySoundHint")),1)]),V(h(Sd),{"model-value":e.notifySound,label:h(n)("settings.notifySound"),"onUpdate:modelValue":De[4]||(De[4]=Ke=>s("setNotifySound",Ke))},null,8,["model-value","label"])])])])],512),[[is,d.value==="general"]]),Nn(C("section",AWe,[C("section",CWe,[C("h3",wWe,B(h(n)("settings.account")),1),C("div",xWe,[C("div",_We,[C("span",SWe,[u.value?(b(),M("img",{key:0,src:i.managedUserInfo?.avatar,alt:"",onError:De[5]||(De[5]=Ke=>a.value=!0)},null,40,MWe)):(b(),de(h(Ce),{key:1,name:"user",size:"md"}))]),C("span",IWe,[C("span",EWe,[C("span",TWe,B(r.value),1),l.value?(b(),de(h(Pl),{key:0,class:"account-level",variant:"neutral",size:"sm"},{default:he(()=>[qe(B(l.value),1)]),_:1})):te("",!0)]),C("span",LWe,B(c.value),1)]),o.value?(b(),de(h(Ht),{key:0,variant:"danger-soft",size:"sm",onClick:De[6]||(De[6]=Ke=>s("logout"))},{default:he(()=>[qe(B(h(n)("sidebar.signOut")),1)]),_:1})):(b(),de(h(Ht),{key:1,variant:"primary",size:"sm",onClick:De[7]||(De[7]=Ke=>s("login"))},{default:he(()=>[qe(B(h(n)("sidebar.signIn")),1)]),_:1}))])])]),H.value?(b(),de(UD,{key:0})):o.value?(b(),de(EHe,{key:1,"on-fetch-usage":i.onFetchUsage},null,8,["on-fetch-usage"])):te("",!0)],512),[[is,d.value==="account"]]),d.value==="providers"?(b(),M("section",NWe,[V(Wje)])):te("",!0),Nn(C("section",FWe,[C("section",BWe,[C("div",$We,[C("h3",DWe,B(h(n)("settings.agentDefaults")),1)]),C("div",zWe,[e.config?(b(),M(Be,{key:0},[C("div",RWe,[C("span",OWe,[qe(B(h(n)("settings.defaultModel"))+" ",1),C("span",PWe,B(h(n)("settings.defaultModelHint")),1)]),O.value.length>0?(b(),M("div",jWe,[V(h(X4),{"model-value":e.config.defaultModel??"",options:P.value,"aria-label":h(n)("settings.defaultModel"),"onUpdate:modelValue":q},null,8,["model-value","options","aria-label"])])):(b(),M("span",HWe,B(e.config.defaultModel??h(n)("settings.noDefaultModel")),1))]),C("div",WWe,[C("span",qWe,[qe(B(h(n)("settings.defaultPermission"))+" ",1),C("span",UWe,B(h(n)("settings.defaultPermissionHint")),1)]),V(h(bo),{"model-value":R.value,options:w.map(Ke=>({value:Ke,label:h(n)(k[Ke])})),"onUpdate:modelValue":De[8]||(De[8]=Ke=>W(Ke))},null,8,["model-value","options"])]),C("div",KWe,[C("span",VWe,[qe(B(h(n)("settings.defaultThinking"))+" ",1),C("span",ZWe,B(h(n)("settings.defaultThinkingHint")),1)]),V(h(Sd),{"model-value":fe(),label:h(n)("settings.defaultThinking"),"onUpdate:modelValue":De[9]||(De[9]=Ke=>pe())},null,8,["model-value","label"])]),C("div",GWe,[C("span",QWe,[qe(B(h(n)("settings.defaultPlanMode"))+" ",1),C("span",YWe,B(h(n)("settings.defaultPlanModeHint")),1)]),V(h(Sd),{"model-value":K(e.config.defaultPlanMode),label:h(n)("settings.defaultPlanMode"),"onUpdate:modelValue":De[10]||(De[10]=Ke=>Se("defaultPlanMode"))},null,8,["model-value","label"])])],64)):(b(),M("div",JWe,B(h(n)("settings.configUnavailable")),1))])]),e.config&&Z.value?(b(),M("section",XWe,[C("div",eqe,[C("h3",tqe,B(h(n)("settings.secondaryModelSection")),1)]),C("div",nqe,[C("div",iqe,[C("span",sqe,[qe(B(h(n)("settings.secondaryModel"))+" ",1),C("span",oqe,B(h(n)("settings.secondaryModelHint")),1)]),O.value.length>0?(b(),M("div",rqe,[V(qHe,{"model-value":ne.value,effort:X.value,groups:O.value,"model-info-by-id":ue.value,onSelect:ie},null,8,["model-value","effort","groups","model-info-by-id"])])):(b(),M("span",lqe,B(ne.value||h(n)("settings.noSecondaryModel")),1))])])])):te("",!0)],512),[[is,d.value==="agent"]]),Nn(C("section",aqe,[C("section",uqe,[C("h3",cqe,B(h(n)("settings.versionAndUpdates")),1),C("div",dqe,[C("div",fqe,[C("span",hqe,[qe(B(h(n)("settings.appVersion"))+" ",1),C("span",pqe,B(h(n)("settings.appVersionHint")),1)]),C("span",gqe,B(h(I)),1)]),C("div",mqe,[C("span",vqe,[qe(B(h(n)("settings.serverVersion"))+" ",1),C("span",yqe,B(h(n)("settings.serverVersionHint")),1)]),C("span",bqe,B(e.serverVersion||"-"),1)]),C("div",kqe,[C("span",Aqe,[qe(B(h(n)("settings.serverAddress"))+" ",1),C("span",Cqe,B(h(n)("settings.serverAddressHint")),1)]),C("span",wqe,B(h(y)),1)]),h(_).canCheck?(b(),M("div",xqe,[C("span",_qe,[qe(B(h(n)("settings.checkUpdate"))+" ",1),T.value?(b(),M("span",Sqe,B(T.value),1)):(b(),M("span",Mqe,B(h(n)("settings.checkUpdateHint")),1))]),V(h(Ht),{variant:"secondary",size:"sm",disabled:E.value,onClick:D},{default:he(()=>[qe(B(E.value?h(n)("settings.updateChecking"):h(n)("settings.checkUpdateBtn")),1)]),_:1},8,["disabled"])])):te("",!0),h(_).canToggleAutoDownload?(b(),M("div",Iqe,[C("span",Eqe,[qe(B(h(n)("settings.autoDownloadUpdate"))+" ",1),C("span",Tqe,B(h(n)("settings.autoDownloadUpdateHint")),1)]),V(h(Sd),{"model-value":h(_).autoDownload.value,label:h(n)("settings.autoDownloadUpdate"),"onUpdate:modelValue":De[11]||(De[11]=Ke=>h(_).setAutoDownload(Ke,"settings"))},null,8,["model-value","label"])])):te("",!0)])]),e.config?(b(),M("section",Lqe,[C("h3",Nqe,B(h(n)("settings.privacy")),1),C("div",Fqe,[C("div",Bqe,[C("span",$qe,[qe(B(h(n)("settings.telemetry"))+" ",1),C("span",Dqe,B(h(n)("settings.telemetryHint")),1),C("span",zqe,B(h(n)("settings.telemetryRestartHint")),1)]),V(h(Sd),{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:h(n)("settings.telemetry"),"onUpdate:modelValue":De[12]||(De[12]=Ke=>Ne())},null,8,["model-value","disabled","label"])])])])):te("",!0),C("section",Rqe,[C("h3",Oqe,B(h(n)("settings.diagnostics")),1),C("div",Pqe,[C("div",jqe,[C("span",Hqe,[qe(B(h(n)("settings.exportLog"))+" ",1),C("span",Wqe,B(h(n)("settings.exportLogHint")),1),h(vl)()?te("",!0):(b(),M("span",qqe,B(h(n)("settings.logHint")),1))]),V(h(Ht),{variant:"secondary",size:"sm",onClick:S},{default:he(()=>[qe(B(h(n)("settings.exportLogBtn")),1)]),_:1})])])])],512),[[is,d.value==="advanced"]]),Nn(C("section",Uqe,[C("div",Kqe,[C("h4",Vqe,B(h(n)("settings.archivedTitle")),1),C("p",Zqe,B(h(n)("settings.archivedDesc")),1)]),C("div",Gqe,[C("label",Qqe,[De[17]||(De[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)),Nn(C("input",{"onUpdate:modelValue":De[13]||(De[13]=Ke=>se.value=Ke),placeholder:h(n)("settings.archivedSearch")},null,8,Yqe),[[Ao,se.value]])]),V(h(X4),{"model-value":U.value,options:Me.value,size:"sm","aria-label":h(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":De[14]||(De[14]=Ke=>U.value=Ke)},null,8,["model-value","options","aria-label"]),V(h(bo),{size:"sm","model-value":J.value,options:[{value:"archived-desc",label:h(n)("settings.archivedSortArchived"),icon:"clock"},{value:"created-desc",label:h(n)("settings.archivedSortCreated"),icon:"calendar-schedule"},{value:"name-asc",label:h(n)("settings.archivedSortName"),icon:"sort"}],"onUpdate:modelValue":De[15]||(De[15]=Ke=>J.value=Ke)},null,8,["model-value","options"])]),ve.value?(b(),M("div",Jqe,B(h(n)("settings.archivedLoadingAll")),1)):(b(),M(Be,{key:1},[ke.value.length>0?(b(),M("div",Xqe,[(b(!0),M(Be,null,yt(ke.value,Ke=>(b(),M("section",{key:Ke.cwd,class:"archive-card"},[C("div",eUe,[V(h(Ce),{name:"folder-closed",size:"md"}),C("span",tUe,B(Ke.cwd),1),C("span",nUe,B(h(n)("settings.archivedSessionsCount",{count:Ke.items.length})),1)]),C("div",iUe,[(b(!0),M(Be,null,yt(Ke.items,gt=>(b(),M("div",{key:gt.id,class:"archive-row"},[C("div",sUe,[C("div",oUe,B(gt.title),1),C("div",rUe,B(h(n)("settings.archivedAt",{time:it(gt.archivedAt??gt.updatedAt)})),1)]),V(h(Ht),{variant:"secondary",size:"sm",onClick:lt=>Le(gt.id)},{default:he(()=>[V(h(Ce),{name:"undo",size:"sm"}),C("span",null,B(h(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(b(),M("div",lUe,B(Y.value.length===0?h(n)("settings.archivedEmpty"):h(n)("settings.archivedNoMatch")),1))],64))],512),[[is,d.value==="archived"]])],34)])],512)]),_:1},8,["aria-label"]))}}),cUe=vt(uUe,[["__scopeId","data-v-ca0381a0"]]),dUe={class:"aw"},fUe={class:"crumbbar"},hUe={class:"crumbs"},pUe={key:0,class:"crumb-sep"},gUe=["onClick"],mUe={key:0,class:"filterbar"},vUe=["placeholder"],yUe={class:"folder-list"},bUe={key:0,class:"fl-loading"},kUe=["onClick"],AUe={class:"folder-name search-rel"},CUe={key:0,class:"fl-empty"},wUe={key:1,class:"fl-loading"},xUe=["onClick"],_Ue={class:"folder-name"},SUe={key:0,class:"fl-empty"},MUe={class:"paste-row"},IUe={class:"paste-input-wrap"},EUe={key:1,class:"add-error",role:"alert"},TUe={class:"actions"},LUe={class:"footer-hint"},NUe=600,FUe=6,CM=150,BUe=nt({__name:"AddWorkspaceDialog",props:{browseFs:{type:Function},getFsHome:{type:Function},defaultPath:{},error:{}},emits:["add","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=G(!0),r=G(!1),l=G(!1),a=G(""),u=G(null),c=G([]),d=G(""),f=G(!1),p=G([]),g=F(()=>d.value.trim().length>0);let m=0,y=null;function w(z,K){const q=z.toLowerCase(),W=K.toLowerCase();let Z=0;for(let ne=0;ne<W.length&&Z<q.length;ne++)W[ne]===q[Z]&&Z++;return Z===q.length}async function k(z){const K=a.value,q=z.trim();if(!K||q===""){p.value=[],f.value=!1;return}const W=++m;f.value=!0;const Z=[],ne=[{path:K,depth:0}];let X=0;for(;ne.length>0&&X<NUe&&Z.length<CM;){if(W!==m)return;const ue=ne.shift();X++;let ie;try{ie=await i.browseFs(ue.path)}catch{continue}if(W!==m)return;for(const Se of ie.entries){if(!Se.isDir)continue;const fe=Se.path.startsWith(K)?Se.path.slice(K.length).replace(/^\/+/,""):Se.path;if(w(q,fe||Se.name)&&(Z.push({path:Se.path,name:Se.name,rel:fe||Se.name}),Z.length>=CM))break;ue.depth+1<FUe&&ne.push({path:Se.path,depth:ue.depth+1})}W===m&&(p.value=[...Z])}W===m&&(f.value=!1)}Ge(d,z=>{if(y&&clearTimeout(y),z.trim()===""){m++,p.value=[],f.value=!1;return}y=setTimeout(()=>void k(z),220)});const A=G(!1),v=G(""),x=F(()=>v.value.trim()),S=F(()=>{const z=a.value;if(!z)return[];const K=z.split("/").filter(Boolean),q=[{label:"/",path:"/"}];let W="";for(const Z of K)W+=`/${Z}`,q.push({label:Z,path:W});return q}),I=F(()=>a.value.length>0);async function _(z){r.value=!0;try{const K=await i.browseFs(z);if(!K.path){l.value=!0;return}a.value=K.path,u.value=K.parent,c.value=K.entries,d.value="",l.value=!1}catch{l.value=!0}finally{r.value=!1}}function E(z){z.isDir&&_(z.path)}function N(){u.value&&_(u.value)}function D(){I.value&&s("add",a.value)}function T(){x.value.length!==0&&s("add",x.value)}const{handleCompositionStart:$,handleCompositionEnd:O,isComposingKeyEvent:P}=qr();function R(z){P(z)||T()}function j(z){z.key==="Escape"&&P(z)&&z.stopPropagation()}return gn(async()=>{r.value=!0;try{if(i.defaultPath&&(await _(i.defaultPath),!l.value))return;const z=await i.getFsHome();z.home?await _(z.home):l.value=!0}catch{l.value=!0}finally{r.value=!1}}),Cn(()=>{y&&clearTimeout(y)}),(z,K)=>(b(),de(h(La),{open:o.value,"onUpdate:open":K[5]||(K[5]=q=>o.value=q),title:h(n)("workspace.addTitle"),size:"lg",height:"fixed",padded:!1,onClose:K[6]||(K[6]=q=>s("close"))},{default:he(()=>[C("div",dUe,[l.value?te("",!0):(b(),M(Be,{key:0},[C("div",fUe,[V(h(rn),{size:"sm",disabled:!u.value,label:h(n)("workspace.up"),tooltip:h(n)("workspace.up"),onClick:N},{default:he(()=>[V(h(Ce),{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label","tooltip"]),C("div",hUe,[(b(!0),M(Be,null,yt(S.value,(q,W)=>(b(),M(Be,{key:q.path},[W>1?(b(),M("span",pUe,"/")):te("",!0),C("button",{class:$e(["crumb",{last:W===S.value.length-1}]),onClick:Z=>_(q.path)},B(q.label),11,gUe)],64))),128))])]),r.value?te("",!0):(b(),M("div",mUe,[V(h(Ce),{class:"filter-icon",name:"search",size:"md"}),Nn(C("input",{"onUpdate:modelValue":K[0]||(K[0]=q=>d.value=q),class:"filter-input",type:"text",placeholder:h(n)("workspace.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:K[1]||(K[1]=It(()=>{},["stop"]))},null,40,vUe),[[Ao,d.value]]),f.value?(b(),de(h(Ii),{key:0,size:"sm"})):te("",!0)])),C("div",yUe,[r.value?(b(),M("div",bUe,B(h(n)("workspace.browsing")),1)):g.value?(b(),M(Be,{key:1},[(b(!0),M(Be,null,yt(p.value,q=>(b(),M("button",{key:q.path,class:"folder-row",onClick:W=>_(q.path)},[V(h(Ce),{class:"dir-icon",name:"folder-closed",size:"sm"}),C("span",AUe,B(q.rel),1)],8,kUe))),128)),!f.value&&p.value.length===0?(b(),M("div",CUe,B(h(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&p.value.length===0?(b(),M("div",wUe,B(h(n)("workspace.searching")),1)):te("",!0)],64)):(b(),M(Be,{key:2},[(b(!0),M(Be,null,yt(c.value,q=>(b(),M("button",{key:q.path,class:"folder-row",onClick:W=>E(q)},[V(h(Ce),{class:"dir-icon",name:"folder-closed",size:"sm"}),C("span",_Ue,B(q.name),1)],8,xUe))),128)),c.value.length===0?(b(),M("div",SUe,B(h(n)("workspace.noSubfolders")),1)):te("",!0)],64))])],64)),C("div",{class:$e(["paste-section",{"paste-only":l.value}])},[!l.value&&!A.value?(b(),de(h(Ht),{key:0,variant:"ghost",size:"sm",onClick:K[2]||(K[2]=q=>A.value=!0)},{default:he(()=>[qe(B(h(n)("workspace.pasteToggle")),1)]),_:1})):(b(),de(h(tU),{key:1,label:h(n)("workspace.pathLabel")},{default:he(()=>[C("div",MUe,[C("div",IUe,[V(h(Xs),{modelValue:v.value,"onUpdate:modelValue":K[3]||(K[3]=q=>v.value=q),placeholder:h(n)("workspace.pathPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:[Hr(It(R,["stop"]),["enter"]),j],onCompositionstart:h($),onCompositionend:h(O)},null,8,["modelValue","placeholder","onKeydown","onCompositionstart","onCompositionend"])]),V(h(rn),{disabled:x.value.length===0,label:h(n)("workspace.add"),tooltip:h(n)("workspace.add"),onClick:T},{default:he(()=>[V(h(Ce),{name:"plus",size:"md"})]),_:1},8,["disabled","label","tooltip"])])]),_:1},8,["label"]))],2),e.error?(b(),M("div",EUe,B(e.error),1)):te("",!0),C("div",TUe,[V(h(mn),{text:a.value},{default:he(()=>[l.value?te("",!0):(b(),de(h(Ht),{key:0,variant:"primary",disabled:!I.value,onClick:D},{default:he(()=>[qe(B(h(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),V(h(Ht),{variant:"secondary",onClick:K[4]||(K[4]=q=>s("close"))},{default:he(()=>[qe(B(h(n)("workspace.cancel")),1)]),_:1})]),C("div",LUe,B(h(n)("workspace.browseHint")),1)])]),_:1},8,["open","title"]))}}),$Ue=vt(BUe,[["__scopeId","data-v-fea98be5"]]),DUe={key:0,class:"confirm-dialog__message"},zUe=nt({__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,i=t,{t:s}=Bt();function o(){n.loading||(i("update:open",!1),i("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(),i("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",r),Gn(()=>{typeof window<"u"&&window.removeEventListener("keydown",r)}),(l,a)=>(b(),de(h(La),{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]=u=>i("update:open",u)),onClose:o},{foot:he(()=>[V(h(Ht),{variant:"secondary",disabled:e.loading,onClick:o},{default:he(()=>[qe(B(e.cancelLabel??h(s)("common.cancel")),1)]),_:1},8,["disabled"]),V(h(Ht),{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=u=>i("confirm"))},{default:he(()=>[qe(B(e.confirmLabel??h(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:he(()=>[e.message?(b(),M("p",DUe,B(e.message),1)):te("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),RUe=vt(zUe,[["__scopeId","data-v-aa5422da"]]),OUe=nt({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:i,runAction:s}=ju();function o(){s()}return(r,l)=>h(t)!==null?(b(),de(RUe,{key:0,open:!0,title:h(t).title,message:h(t).message,"confirm-label":h(t).confirmLabel,"cancel-label":h(t).cancelLabel,variant:h(t).variant,loading:h(n),onConfirm:o,onCancel:l[0]||(l[0]=a=>h(i)(!1))},null,8,["title","message","confirm-label","cancel-label","variant","loading"])):te("",!0)}}),PUe={class:"rows"},jUe={class:"row"},HUe={class:"row"},WUe={class:"row"},qUe={class:"row"},UUe={class:"row"},KUe={class:"row"},VUe={class:"ctx-text"},ZUe={key:0,class:"bar"},GUe={class:"row"},QUe=nt({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},swarmMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=G(!0),r=F(()=>i.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(i.status.ctxUsed/i.status.ctxMax*100)))),l=F(()=>i.status.ctxMax>0?n("status.statusContextValue",{used:Ia(i.status.ctxUsed),max:Ia(i.status.ctxMax),pct:r.value}):n("status.statusNone"));function a(g){return n(g==="yolo"?"status.permissionYolo":g==="auto"?"status.permissionAuto":"status.permissionManual")}const u=F(()=>{const g=i.status.permission;return g==="auto"?"var(--color-danger)":g==="yolo"?"var(--color-warning)":"var(--color-text)"}),c=F(()=>i.planMode?n("status.planOn"):n("status.planOff")),d=F(()=>i.swarmMode?n("status.swarmOn"):n("status.swarmOff")),f=F(()=>typeof i.costUsd=="number"&&i.costUsd>0),p=F(()=>f.value?`$${i.costUsd.toFixed(4)}`:n("status.statusNone"));return(g,m)=>(b(),de(h(La),{open:o.value,"onUpdate:open":m[0]||(m[0]=y=>o.value=y),title:h(n)("status.statusPanelTitle"),onClose:m[1]||(m[1]=y=>s("close"))},{default:he(()=>[C("dl",PUe,[C("div",jUe,[C("dt",null,B(h(n)("status.statusModel")),1),C("dd",null,B(e.status.model),1)]),C("div",HUe,[C("dt",null,B(h(n)("status.statusThinking")),1),C("dd",null,B(e.thinking),1)]),C("div",WUe,[C("dt",null,B(h(n)("status.statusPermission")),1),C("dd",{style:Vt({color:u.value})},B(a(e.status.permission)),5)]),C("div",qUe,[C("dt",null,B(h(n)("status.statusPlanMode")),1),C("dd",{class:$e({"plan-on":e.planMode})},B(c.value),3)]),C("div",UUe,[C("dt",null,B(h(n)("status.statusSwarmMode")),1),C("dd",{class:$e({"swarm-on":e.swarmMode})},B(d.value),3)]),C("div",KUe,[C("dt",null,B(h(n)("status.statusContext")),1),C("dd",null,[C("span",VUe,B(l.value),1),e.status.ctxMax>0?(b(),M("span",ZUe,[C("i",{style:Vt({width:r.value+"%"})},null,4)])):te("",!0)])]),C("div",GUe,[C("dt",null,B(h(n)("status.statusCost")),1),C("dd",null,B(p.value),1)])])]),_:1},8,["open","title"]))}}),YUe=vt(QUe,[["__scopeId","data-v-340d1b31"]]),JUe={key:0,class:"actions"},XUe=["onClick"],eKe=["onClick"],tKe={key:1,class:"details"},nKe=nt({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt();function o(E){return typeof E=="object"&&E!==null}function r(E){return o(E)?E.title:E}function l(E){return o(E)?E.message??"":""}function a(E){return o(E)?E.details:void 0}function u(E){return o(E)?E.severity==="error":E.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|失败|failed/i.test(E)}function c(E){return o(E)?E.severity==="error"?"danger":E.severity==="success"?"success":E.severity==="info"?"info":"warning":u(E)?"danger":"warning"}function d(E){return o(E)?`notice:${E.severity}:${E.title}:${E.message??""}:${JSON.stringify(E.details??[])}`:`text:${E}`}function f(E){if(!o(E))return E;const N=[E.title];E.message&&N.push(E.message);const D=E.details??[];if(D.length>0){N.push("",`${s("warnings.diagnostics")}:`);for(const T of D)N.push(`${T.label}: ${T.value}`)}return N.join(` -`)}let p=1;const g=G([]),m=new Map,y=new Map;function w(E){const N=u(E)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?N+5e3:N}function k(E,N){const D=m.get(E)??{handle:null,deadline:0,remaining:0};D.handle=setTimeout(()=>_(E),N),D.deadline=Date.now()+N,m.set(E,D)}function A(E){const N=m.get(E);N&&N.handle!==null&&clearTimeout(N.handle),m.delete(E)}function v(E){const N=m.get(E);!N||N.handle===null||(clearTimeout(N.handle),N.handle=null,N.remaining=Math.max(0,N.deadline-Date.now()))}function x(E){if(g.value.find(T=>T.id===E)?.detailsOpen)return;const D=m.get(E);!D||D.handle!==null||k(E,D.remaining)}function S(E){E.detailsOpen=!E.detailsOpen,E.detailsOpen?v(E.id):x(E.id)}async function I(E){if(!await no(f(E.warning)))return;E.copied=!0;const D=y.get(E.id);D&&clearTimeout(D),y.set(E.id,setTimeout(()=>{E.copied=!1,y.delete(E.id)},1400))}function _(E){A(E);const N=y.get(E);N&&clearTimeout(N),y.delete(E);const D=g.value.findIndex(T=>T.id===E);D!==-1&&(g.value=g.value.filter(T=>T.id!==E),i("dismiss",D))}return Ge(()=>n.warnings,E=>{const N=[...g.value];g.value=E.map(D=>{const T=d(D),$=N.findIndex(R=>R.key===T),O=$===-1?void 0:N.splice($,1)[0];if(O)return O.warning=D,O;const P={id:p++,key:T,warning:D,detailsOpen:!1,copied:!1};return k(P.id,w(D)),P});for(const D of N){A(D.id);const T=y.get(D.id);T&&clearTimeout(T),y.delete(D.id)}},{immediate:!0,flush:"post"}),Cn(()=>{m.forEach(E=>{E.handle!==null&&clearTimeout(E.handle)}),m.clear(),y.forEach(E=>clearTimeout(E)),y.clear()}),(E,N)=>(b(),de(GI,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:he(()=>[(b(!0),M(Be,null,yt(g.value,D=>(b(),de(h($U),{key:D.id,variant:c(D.warning),title:r(D.warning),message:l(D.warning),"dismiss-label":h(s)("warnings.dismiss"),onDismiss:T=>_(D.id),onPointerenter:T=>v(D.id),onPointerleave:T=>x(D.id)},{default:he(()=>[a(D.warning)?.length?(b(),M("div",JUe,[C("button",{class:"link",type:"button",onClick:T=>S(D)},B(D.detailsOpen?h(s)("warnings.hideDetails"):h(s)("warnings.showDetails")),9,XUe),C("button",{class:"link",type:"button",onClick:T=>I(D)},B(D.copied?h(s)("warnings.copied"):h(s)("warnings.copyDetails")),9,eKe)])):te("",!0),D.detailsOpen&&a(D.warning)?.length?(b(),M("dl",tKe,[(b(!0),M(Be,null,yt(a(D.warning),T=>(b(),M("div",{key:`${T.label}:${T.value}`,class:"detail-row"},[C("dt",null,B(T.label),1),C("dd",null,B(T.value),1)]))),128))])):te("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),iKe=vt(nKe,[["__scopeId","data-v-ac44e9ef"]]),sKe={class:"topbar"},oKe={class:"wsq"},rKe=["aria-label"],lKe={class:"tb-path"},aKe={class:"ws"},uKe={class:"se"},cKe={class:"tb-sub"},dKe=nt({__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}=Bt(),i=e,s=t,o=F(()=>{const a=i.workspace,c=(a?.name||a?.root||"").trim().charAt(0);return c?c.toUpperCase():"K"}),r=F(()=>i.workspace?.name??n("workspace.noWorkspace")),l=F(()=>i.running?n("mobile.running"):n("mobile.idle"));return(a,u)=>(b(),M("div",sKe,[C("span",oKe,B(o.value),1),C("button",{type:"button",class:"tb-mid","aria-label":h(n)("mobile.openSwitcher"),onClick:u[0]||(u[0]=c=>s("openSwitcher"))},[C("span",lKe,[C("span",aKe,B(r.value),1),e.sessionTitle?(b(),M(Be,{key:0},[u[2]||(u[2]=C("span",{class:"sl"},"/",-1)),C("span",uKe,B(e.sessionTitle),1)],64)):te("",!0),u[3]||(u[3]=C("span",{class:"cv"},"⌄",-1))]),C("span",cKe,[C("span",{class:$e(["rd",{on:e.running}])},null,2),C("span",null,B(l.value),1),e.branch?(b(),M(Be,{key:0},[qe(" · "+B(e.branch),1)],64)):te("",!0),e.sessionCount>0?(b(),M(Be,{key:1},[qe(" · "+B(h(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):te("",!0)])],8,rKe),V(h(rn),{size:"lg",label:h(n)("mobile.openSettings"),onClick:u[1]||(u[1]=c=>s("openSettings"))},{default:he(()=>[V(h(Ce),{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),fKe=vt(dKe,[["__scopeId","data-v-7f357087"]]),hKe={key:0,class:"sheet-root"},pKe=["aria-label"],gKe=["aria-label"],mKe={key:0,class:"sheet-head"},vKe={class:"sheet-title"},yKe={class:"sheet-body"},bKe=nt({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(){s("update:modelValue",!1),s("close")}function r(l){l.key==="Escape"&&i.closeOnEsc&&o()}return Ge(()=>i.modelValue,l=>{typeof document>"u"||(l?document.addEventListener("keydown",r):document.removeEventListener("keydown",r))},{immediate:!0}),Cn(()=>{typeof document<"u"&&document.removeEventListener("keydown",r)}),(l,a)=>(b(),de(gs,{name:"sheet"},{default:he(()=>[e.modelValue?(b(),M("div",hKe,[C("div",{class:"sheet-scrim",onClick:o}),C("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||h(n)("mobile.sheetLabel")},[C("button",{type:"button",class:"sheet-grab","aria-label":h(n)("mobile.closeSheet"),onClick:o},null,8,gKe),e.title?(b(),M("div",mKe,[C("span",vKe,B(e.title),1)])):te("",!0),C("div",yKe,[En(l.$slots,"default",{},void 0,!0)])],8,pKe)])):te("",!0)]),_:3}))}}),KD=vt(bKe,[["__scopeId","data-v-c3d5dadc"]]),kKe={class:"mlist"},AKe={key:0,class:"mempty"},CKe=["onClick"],wKe={class:"mgh-main"},xKe={class:"mgh-name"},_Ke={class:"mgh-path"},SKe={key:2,class:"att"},MKe={key:0,class:"mempty small"},IKe=["onClick"],EKe={class:"m"},TKe={class:"s"},LKe={key:0,class:"att"},NKe={key:1,class:"mshow-more-row"},FKe=["disabled","onClick"],BKe={key:1,class:"mshow-more-sep","aria-hidden":"true"},$Ke=["onClick"],DKe=nt({__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}=Bt(),i=e,s=t;function o(){s("update:modelValue",!1)}function r($){s("select",$),o()}function l($){s("createInWorkspace",$),o()}function a(){s("create"),o()}function u(){s("addWorkspace"),o()}const c=G(new Set);function d($){return c.value.has($)}function f($){const O=new Set(c.value);O.has($)?O.delete($):O.add($),c.value=O,x.value=null,E.value=null}const p=G(new Map);function g($){return p.value.get($.workspace.id)??$.initialCount}function m($){const O=$.sessions.slice(0,g($));if(i.activeId&&!O.some(P=>P.id===i.activeId)){const P=$.sessions.find(R=>R.id===i.activeId);if(P)return[...O,P]}return O}function y($){return $.sessions.length>g($)||$.hasMore||$.loadingMore}function w($){return g($)>$.initialCount}function k($){const O=i.groups.find(j=>j.workspace.id===$);if(!O)return;const P=g(O)+ek,R=new Map(p.value);R.set($,P),p.value=R,O.sessions.length<P&&O.hasMore&&s("loadMore",$)}function A($){if(!p.value.has($))return;const O=new Map(p.value);O.delete($),p.value=O}function v($){return i.attentionByWorkspace[$]??0}const x=G(null);function S($){x.value=x.value===$?null:$,E.value=null}function I($){x.value=null;const P=(typeof window<"u"?window.prompt(n("sidebar.rename"),$.title):null)?.trim();P&&s("rename",$.id,P)}function _($){x.value=null,s("archive",$)}const E=G(null);function N($){E.value=E.value===$?null:$,x.value=null}function D($){no($.root),E.value=null}function T($){E.value=null,s("deleteWorkspace",$.id)}return($,O)=>(b(),de(KD,{"model-value":e.modelValue,"onUpdate:modelValue":O[2]||(O[2]=P=>s("update:modelValue",P))},{default:he(()=>[C("button",{type:"button",class:"newrow",onClick:a},[V(h(Ce),{name:"message",size:"sm"}),qe(" "+B(h(n)("sidebar.newChat")),1)]),C("button",{type:"button",class:"newrow secondary",onClick:u},[V(h(Ce),{name:"folder",size:"sm"}),qe(" "+B(h(n)("sidebar.newWorkspace")),1)]),C("div",kKe,[e.groups.length===0?(b(),M("div",AKe,B(h(n)("workspace.noWorkspace")),1)):te("",!0),(b(!0),M(Be,null,yt(e.groups,P=>(b(),M("div",{key:P.workspace.id,class:"mgroup"},[C("div",{class:$e(["mgh",{on:P.workspace.id===e.activeWorkspaceId}]),onClick:R=>f(P.workspace.id)},[d(P.workspace.id)?(b(),de(h(Ce),{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(b(),de(h(Ce),{key:1,class:"mgh-folder",name:"folder",size:"sm"})),C("div",wKe,[C("span",xKe,B(P.workspace.name),1),V(h(mn),{text:P.workspace.root},{default:he(()=>[C("span",_Ke,B(P.workspace.shortPath),1)]),_:2},1032,["text"])]),d(P.workspace.id)&&v(P.workspace.id)>0?(b(),M("span",SKe,B(v(P.workspace.id)),1)):te("",!0),V(h(rn),{size:"lg",class:"mgh-more",label:h(n)("sidebar.options"),onClick:It(R=>N(P.workspace.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),V(h(rn),{size:"lg",class:"mgh-add",label:h(n)("workspace.newInGroup"),onClick:It(R=>l(P.workspace.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),E.value===P.workspace.id?(b(),de(h(al),{key:3,class:"kmenu wsmenu",onClick:O[0]||(O[0]=It(()=>{},["stop"]))},{default:he(()=>[V(h(yn),{size:"lg",onClick:R=>D(P.workspace)},{default:he(()=>[qe(B(h(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),V(h(yn),{size:"lg",danger:"",onClick:R=>T(P.workspace)},{default:he(()=>[qe(B(h(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):te("",!0)],10,CKe),Nn(C("div",null,[P.sessions.length===0?(b(),M("div",MKe,B(h(n)("sidebar.noSessions")),1)):te("",!0),(b(!0),M(Be,null,yt(m(P),R=>(b(),M("div",{key:R.id,class:$e(["srow",{cur:R.id===e.activeId}]),onClick:j=>r(R.id)},[C("div",EKe,[C("div",{class:$e(["t",{run:R.busy,aborted:!R.busy&&(e.attentionBySession[R.id]??0)===0&&R.lastTurnReason==="failed"}])},B(R.title),3),C("div",TKe,B(R.time),1)]),(e.attentionBySession[R.id]??0)>0?(b(),M("span",LKe,B(e.attentionBySession[R.id]),1)):te("",!0),V(h(rn),{size:"lg",class:"kb",label:h(n)("sidebar.options"),onClick:It(j=>S(R.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),x.value===R.id?(b(),de(h(al),{key:1,class:"kmenu",onClick:O[1]||(O[1]=It(()=>{},["stop"]))},{default:he(()=>[V(h(yn),{size:"lg",onClick:j=>I(R)},{default:he(()=>[qe(B(h(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),V(h(yn),{size:"lg",onClick:j=>_(R.id)},{default:he(()=>[qe(B(h(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):te("",!0)],10,IKe))),128)),y(P)||w(P)?(b(),M("div",NKe,[y(P)?(b(),M("button",{key:0,type:"button",class:"mshow-more",disabled:P.loadingMore,onClick:It(R=>k(P.workspace.id),["stop"])},[V(h(Ce),{name:"chevron-down",size:"sm"}),qe(" "+B(P.loadingMore?h(n)("sidebar.loadingMore"):h(n)("sidebar.showMore")),1)],8,FKe)):te("",!0),y(P)&&w(P)?(b(),M("span",BKe,"·")):te("",!0),w(P)?(b(),M("button",{key:2,type:"button",class:"mshow-more",onClick:It(R=>A(P.workspace.id),["stop"])},[V(h(Ce),{name:"chevron-up",size:"sm"}),qe(" "+B(h(n)("sidebar.showLess")),1)],8,$Ke)):te("",!0)])):te("",!0)],512),[[is,!d(P.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),zKe=vt(DKe,[["__scopeId","data-v-67278201"]]),RKe={class:"group-title"},OKe={class:"srow-main"},PKe={class:"srow-label"},jKe={class:"srow-sub"},HKe={class:"srow read-only"},WKe={class:"srow-main"},qKe={class:"srow-label"},UKe={key:0,class:"srow-sub"},KKe={class:"cache-note"},VKe=["aria-checked"],ZKe={class:"srow-main"},GKe={class:"srow-label"},QKe={class:"srow-sub"},YKe=["aria-checked"],JKe={class:"srow-main"},XKe={class:"srow-label"},eVe={class:"srow-sub"},tVe={class:"srow-main"},nVe={class:"srow-label"},iVe={class:"srow-sub"},sVe=["aria-checked"],oVe={class:"srow-main"},rVe={class:"srow-label"},lVe={class:"srow-sub"},aVe={class:"srow-main"},uVe={class:"srow-label"},cVe={class:"srow read-only"},dVe={class:"srow-main"},fVe={class:"srow-label"},hVe={class:"srow-sub"},pVe=["aria-label"],gVe={class:"group-title"},mVe={class:"srow-main"},vVe={class:"srow-label"},yVe={class:"srow-sub"},bVe={class:"srow read-only pref"},kVe={class:"srow-main"},AVe={class:"srow-label"},CVe={class:"srow read-only pref"},wVe={class:"srow-main"},xVe={class:"srow-label"},_Ve={class:"srow read-only pref"},SVe={class:"srow-main"},MVe={class:"srow-label"},IVe={key:2,class:"srow read-only acct-profile"},EVe={class:"acct-avatar","aria-hidden":"true"},TVe=["src"],LVe={class:"srow-main"},NVe={class:"acct-name-row"},FVe={class:"srow-label"},BVe={class:"srow-sub"},$Ve={class:"srow-main"},DVe={class:"srow-label"},zVe={class:"srow-main"},RVe={class:"srow-label"},OVe={key:5,class:"srow read-only"},PVe={class:"srow-main"},jVe={class:"srow-label"},HVe={class:"srow-val dim"},WVe={class:"arch-subhead"},qVe={class:"arch-count"},UVe={class:"arch-tools"},KVe={key:0,class:"arch-empty"},VVe={class:"arch-meta"},ZVe={class:"arch-name"},GVe={class:"arch-time"},QVe={key:2,class:"arch-empty"},YVe=100,JVe=nt({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},initialView:{},status:{},thinking:{},planMode:{type:Boolean},goalMode:{type:Boolean},goalActive:{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","toggleGoal","focusGoal","toggleSwarm","setPermission","setColorScheme","setFontScale","login","logout"],setup(e,{emit:t}){const{t:n}=Bt(),{isConfirmOpen:i}=ju(),s=e,o=t;function r(fe){o("setColorScheme",fe)}const l=["manual","yolo","auto"],a=F(()=>s.models?.find(fe=>fe.id===s.status?.modelId)),u=F(()=>rv(a.value)),c=F(()=>bp(a.value)),d=F(()=>Cm(a.value,s.thinking)),f=F(()=>c.value.includes(d.value)?d.value:""),p=F(()=>c.value.map(fe=>({value:fe,label:p3(fe)}))),g=F(()=>s.planMode===!0),m=F(()=>s.goalMode===!0);function y(){if(s.goalActive){o("focusGoal");return}!m.value&&g.value&&o("togglePlan"),o("toggleGoal")}function w(){!g.value&&m.value&&o("toggleGoal"),o("togglePlan")}const k=F(()=>s.swarmMode===!0),A=G(!1);Ge(()=>s.managedUserInfo?.avatar,()=>{A.value=!1});const v=F(()=>!!s.managedUserInfo?.avatar&&!A.value),x=F(()=>s.managedUserInfo?.userLevelName?.trim()??""),S=F(()=>{const fe=s.status.permission;return fe==="auto"?"var(--color-danger)":fe==="yolo"?"var(--color-warning)":"var(--color-text-muted)"}),I=F(()=>{const fe=s.status.permission,pe=n(fe==="yolo"?"mobile.permYoloSub":fe==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${fe} · ${pe}`}),_=F(()=>s.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(s.status.ctxUsed/s.status.ctxMax*100))):0),E=F(()=>s.status.ctxMax>0?`${Ia(s.status.ctxUsed)}/${Ia(s.status.ctxMax)}`:n("status.statusNone"));function N(fe){o("setThinking",R5(a.value,fe))}function D(){const fe=l.indexOf(s.status.permission),pe=l[(fe+1)%l.length];o("setPermission",pe)}function T(){o("pickModel"),o("update:modelValue",!1)}function $(){o("login"),o("update:modelValue",!1)}function O(){o("logout"),o("update:modelValue",!1)}const P=Fa(),R=G("main"),j=G([]),z=G(!1),K=G(!1),q=G(""),W=G("archived-desc");async function Z(){if(!z.value){z.value=!0,K.value=!1;try{const fe=[];let pe;for(;;){const Ne=await P.loadArchivedSessions({beforeId:pe,pageSize:YVe});if(fe.push(...Ne.items),!Ne.hasMore||Ne.items.length===0)break;const ee=Ne.items.at(-1)?.id;if(ee===void 0)break;pe=ee}j.value=fe,K.value=!0}catch(fe){Bl("loadAllArchived failed",fe)}finally{z.value=!1}}}function ne(){R.value="archived",q.value="",Z()}Ge(()=>s.modelValue,fe=>{fe&&s.initialView==="archived"&&ne()});function X(){R.value="main"}const ue=F(()=>{const fe=q.value.trim().toLowerCase();let pe=j.value.filter(Ne=>Ne.archived===!0);return fe&&(pe=pe.filter(Ne=>Ne.title.toLowerCase().includes(fe))),pe=pe.slice(),W.value==="archived-desc"?pe.sort((Ne,ee)=>(ee.archivedAt??ee.updatedAt).localeCompare(Ne.archivedAt??Ne.updatedAt)):W.value==="created-desc"?pe.sort((Ne,ee)=>ee.createdAt.localeCompare(Ne.createdAt)):pe.sort((Ne,ee)=>Ne.title.localeCompare(ee.title,"zh")),pe});async function ie(fe){await P.restoreSession(fe)&&(j.value=j.value.filter(Ne=>Ne.id!==fe))}function Se(fe){const pe=new Date(fe);if(Number.isNaN(pe.getTime()))return fe;const Ne=ee=>String(ee).padStart(2,"0");return`${pe.getFullYear()}-${Ne(pe.getMonth()+1)}-${Ne(pe.getDate())} ${Ne(pe.getHours())}:${Ne(pe.getMinutes())}`}return Ge(()=>s.modelValue,fe=>{fe||(R.value="main")}),(fe,pe)=>(b(),de(KD,{"model-value":e.modelValue,title:h(n)("mobile.settingsTitle"),"close-on-esc":!h(i),"onUpdate:modelValue":pe[5]||(pe[5]=Ne=>o("update:modelValue",Ne))},{default:he(()=>[R.value==="main"?(b(),M(Be,{key:0},[C("div",RKe,B(h(n)("mobile.groupSession")),1),C("button",{type:"button",class:"srow",onClick:T},[C("span",OKe,[C("span",PKe,B(h(n)("status.statusModel")),1),C("span",jKe,B(e.status.model),1)]),pe[6]||(pe[6]=C("span",{class:"chev"},"›",-1))]),C("div",HKe,[C("span",WKe,[C("span",qKe,B(h(n)("status.statusThinking")),1),u.value==="unsupported"?(b(),M("span",UKe,B(h(n)("status.modeNotSupported")),1)):te("",!0)]),c.value.length>1?(b(),de(h(bo),{key:0,"model-value":f.value,options:p.value,size:"sm","onUpdate:modelValue":N},null,8,["model-value","options"])):(b(),M("span",{key:1,class:$e(["srow-val",{dim:d.value==="off"}])},B(d.value==="off"?h(n)("status.planOff"):h(p3)(d.value)),3))]),C("div",KKe,B(h(n)("status.cacheNote")),1),C("button",{type:"button",class:"srow",role:"switch","aria-checked":g.value,onClick:w},[C("span",ZKe,[C("span",GKe,B(h(n)("status.statusPlanMode")),1),C("span",QKe,B(h(n)("mobile.planModeSub")),1)]),C("span",{class:$e(["toggle",{on:g.value}]),"aria-hidden":"true"},null,2)],8,VKe),e.goalActive?(b(),M("button",{key:1,type:"button",class:"srow",onClick:y},[C("span",tVe,[C("span",nVe,B(h(n)("status.goalLabel")),1),C("span",iVe,B(h(n)("mobile.goalModeSub")),1)]),V(h(Ce),{class:"srow-chevron",name:"chevron-right",size:"sm","aria-hidden":"true"})])):(b(),M("button",{key:0,type:"button",class:"srow",role:"switch","aria-checked":m.value,onClick:y},[C("span",JKe,[C("span",XKe,B(h(n)("status.goalLabel")),1),C("span",eVe,B(h(n)("mobile.goalModeSub")),1)]),C("span",{class:$e(["toggle",{on:m.value}]),"aria-hidden":"true"},null,2)],8,YKe)),C("button",{type:"button",class:"srow",role:"switch","aria-checked":k.value,onClick:pe[0]||(pe[0]=Ne=>o("toggleSwarm"))},[C("span",oVe,[C("span",rVe,B(h(n)("status.statusSwarmMode")),1),C("span",lVe,B(h(n)("mobile.swarmModeSub")),1)]),C("span",{class:$e(["toggle",{on:k.value}]),"aria-hidden":"true"},null,2)],8,sVe),C("button",{type:"button",class:"srow",onClick:D},[C("span",aVe,[C("span",uVe,B(h(n)("status.statusPermission")),1),C("span",{class:"srow-sub",style:Vt({color:S.value})},B(I.value),5)]),pe[7]||(pe[7]=C("span",{class:"chev"},"›",-1))]),C("div",cVe,[C("span",dVe,[C("span",fVe,B(h(n)("status.statusContext")),1),C("span",hVe,B(E.value),1)]),C("span",{class:"ctx-meter","aria-label":E.value},[C("i",{style:Vt({width:_.value+"%"})},null,4)],8,pVe)]),C("div",gVe,B(h(n)("mobile.groupApp")),1),C("button",{type:"button",class:"srow",onClick:ne},[C("span",mVe,[C("span",vVe,B(h(n)("mobile.archivedSessions")),1),C("span",yVe,B(h(n)("mobile.archivedSessionsSub")),1)]),pe[8]||(pe[8]=C("span",{class:"chev"},"›",-1))]),C("div",bVe,[C("span",kVe,[C("span",AVe,B(h(n)("theme.colorSchemeLabel")),1)]),V(h(bo),{"model-value":e.colorScheme??"system",options:[{value:"light",label:h(n)("theme.light"),icon:"light-mode"},{value:"dark",label:h(n)("theme.dark"),icon:"dark-mode"},{value:"system",label:h(n)("theme.system")}],"onUpdate:modelValue":r},null,8,["model-value","options"])]),C("div",CVe,[C("span",wVe,[C("span",xVe,B(h(n)("sidebar.language")),1)]),V(WD)]),C("div",_Ve,[C("span",SVe,[C("span",MVe,B(h(n)("settings.uiFontSize")),1)]),V(h(bo),{"model-value":e.fontScale,options:[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],"aria-label":h(n)("settings.uiFontSize"),"onUpdate:modelValue":pe[1]||(pe[1]=Ne=>o("setFontScale",Ne))},null,8,["model-value","aria-label"])]),e.managedProviderStatus==="authenticated"?(b(),M("div",IVe,[C("span",EVe,[v.value?(b(),M("img",{key:0,src:e.managedUserInfo?.avatar,alt:"",onError:pe[2]||(pe[2]=Ne=>A.value=!0)},null,40,TVe)):(b(),de(h(Ce),{key:1,name:"user",size:"md"}))]),C("span",LVe,[C("span",NVe,[C("span",FVe,B(e.managedUserInfo?.nickname||h(n)("sidebar.defaultUserName")),1),x.value?(b(),de(h(Pl),{key:0,class:"acct-level",variant:"neutral",size:"sm"},{default:he(()=>[qe(B(x.value),1)]),_:1})):te("",!0)]),C("span",BVe,B(h(n)("settings.signedIn")),1)])])):te("",!0),e.managedProviderStatus==="authenticated"?(b(),M("button",{key:3,type:"button",class:"srow acct out",onClick:O},[C("span",$Ve,[C("span",DVe,B(h(n)("sidebar.signOut")),1)])])):(b(),M("button",{key:4,type:"button",class:"srow acct in",onClick:$},[C("span",zVe,[C("span",RVe,B(h(n)("sidebar.signIn")),1)])])),e.serverVersion?(b(),M("div",OVe,[C("span",PVe,[C("span",jVe,B(h(n)("settings.serverVersion")),1)]),C("span",HVe,B(e.serverVersion),1)])):te("",!0)],64)):(b(),M(Be,{key:1},[C("div",WVe,[C("button",{type:"button",class:"arch-back",onClick:X},[pe[9]||(pe[9]=C("span",{class:"chev back"},"‹",-1)),qe(" "+B(h(n)("mobile.archivedBack")),1)]),C("span",qVe,B(h(n)("mobile.sessionCount",{n:ue.value.length})),1)]),C("div",UVe,[V(h(Xs),{class:"arch-search-input","model-value":q.value,size:"sm",placeholder:h(n)("settings.archivedSearch"),"onUpdate:modelValue":pe[3]||(pe[3]=Ne=>q.value=Ne)},null,8,["model-value","placeholder"]),V(h(bo),{size:"sm","model-value":W.value,options:[{value:"archived-desc",label:h(n)("settings.archivedSortArchived")},{value:"created-desc",label:h(n)("settings.archivedSortCreated")},{value:"name-asc",label:h(n)("settings.archivedSortName")}],"onUpdate:modelValue":pe[4]||(pe[4]=Ne=>W.value=Ne)},null,8,["model-value","options"])]),z.value?(b(),M("div",KVe,B(h(n)("settings.archivedLoadingAll")),1)):ue.value.length>0?(b(!0),M(Be,{key:1},yt(ue.value,Ne=>(b(),M("div",{key:Ne.id,class:"arch-row"},[C("div",VVe,[C("div",ZVe,B(Ne.title),1),C("div",GVe,B(h(n)("settings.archivedAt",{time:Se(Ne.archivedAt??Ne.updatedAt)})),1)]),V(h(Ht),{variant:"secondary",size:"sm",onClick:ee=>ie(Ne.id)},{default:he(()=>[qe(B(h(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(b(),M("div",QVe,B(j.value.length===0?h(n)("settings.archivedEmpty"):h(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title","close-on-esc"]))}}),XVe=vt(JVe,[["__scopeId","data-v-81e94fd3"]]),eZe=["mask"],tZe=nt({__name:"BrandLogo",props:{size:{default:64}},setup(e){const t=`bl-eyes-${qR()}`,n=G(null);let i;function s(){const o=n.value;o&&(o.classList.remove("blink-now"),o.getBoundingClientRect(),o.classList.add("blink-now"),clearTimeout(i),i=setTimeout(()=>o.classList.remove("blink-now"),300))}return Gn(()=>clearTimeout(i)),(o,r)=>(b(),M("svg",{ref_key:"logoRef",ref:n,class:"brand-logo",style:Vt({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,eZe)],4))}}),P8=vt(tZe,[["__scopeId","data-v-f04205a8"]]),nZe={key:0,class:"ls-done-card"},iZe={class:"ls-done-badge"},sZe={class:"ls-card-text"},oZe={class:"ls-card-title"},rZe={class:"ls-card-hint"},lZe={key:1,class:"ls-cards"},aZe={class:"ls-card-text"},uZe={class:"ls-card-title"},cZe={class:"ls-reco"},dZe={class:"ls-card-hint"},fZe={class:"ls-card-logo ls-card-icon"},hZe={class:"ls-card-text"},pZe={class:"ls-card-title"},gZe={class:"ls-card-hint"},mZe={key:2,class:"ls-flow"},vZe={key:0,class:"ls-center"},yZe={class:"ls-center-text"},bZe={key:1,class:"ls-device"},kZe={class:"ls-lead"},AZe=["href"],CZe={class:"ls-code-row"},wZe=["title"],xZe={class:"ls-status"},_Ze={class:"ls-status-text"},SZe={class:"ls-countdown"},MZe={key:2,class:"ls-center"},IZe={class:"ls-center-text ls-success-text"},EZe={class:"ls-center-hint"},TZe={class:"ls-center"},LZe={class:"ls-center-text ls-err-text"},NZe={class:"ls-center-hint"},FZe={class:"ls-actions"},BZe={class:"ls-center"},$Ze={class:"ls-center-text ls-warn-text"},DZe={class:"ls-center-hint"},zZe={class:"ls-actions"},RZe=nt({__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}=Bt(),i=e,s=t,o=G("choice"),{step:r,pollError:l,flow:a,secondsLeft:u,startFlow:c,cancelFlow:d}=s$({onStartOAuthLogin:i.onStartOAuthLogin,onPollOAuthLogin:i.onPollOAuthLogin,onCancelOAuthLogin:i.onCancelOAuthLogin,onSuccess:()=>s("success")}),f=G(!1);function p(){o.value="flow",c()}function g(){d(),o.value="choice"}async function m(){!a.value||!await no(a.value.verificationUriComplete)||(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}function y(w){const k=Math.floor(w/60),A=w%60;return`${k}:${String(A).padStart(2,"0")}`}return(w,k)=>e.authReady?(b(),M("div",nZe,[C("span",iZe,[V(h(Ce),{name:"check",size:"sm"})]),C("div",sZe,[C("div",oZe,B(h(n)("onboarding.login.loggedInTitle")),1),C("div",rZe,B(h(n)("onboarding.login.loggedInHint")),1)])])):o.value==="choice"?(b(),M("div",lZe,[C("button",{class:"ls-card",type:"button",onClick:p},[V(P8,{size:40,class:"ls-card-logo"}),C("div",aZe,[C("div",uZe,[qe(B(h(n)("onboarding.login.kimiTitle"))+" ",1),C("span",cZe,B(h(n)("onboarding.login.recommended")),1)]),C("div",dZe,B(h(n)("onboarding.login.kimiHint")),1)]),V(h(Ce),{name:"chevron-right",size:"lg",class:"ls-card-chevron"})]),C("button",{class:"ls-card",type:"button",onClick:k[0]||(k[0]=A=>s("addProvider"))},[C("span",fZe,[V(h(Ce),{name:"bolt",size:"lg"})]),C("div",hZe,[C("div",pZe,B(h(n)("onboarding.login.customProviderTitle")),1),C("div",gZe,B(h(n)("onboarding.login.customProviderHint")),1)]),V(h(Ce),{name:"chevron-right",size:"lg",class:"ls-card-chevron"})])])):(b(),M("div",mZe,[h(r)==="starting"?(b(),M("div",vZe,[V(h(Ii),{size:"md"}),C("span",yZe,B(h(n)("login.starting")),1)])):h(r)==="device-code"&&h(a)?(b(),M("div",bZe,[C("div",kZe,B(h(n)("login.lead")),1),C("a",{class:"ls-primary",href:h(a).verificationUriComplete,target:"_blank",rel:"noopener noreferrer"},[qe(B(h(n)("login.authorizeInBrowser"))+" ",1),V(h(Ce),{name:"external-link",size:"sm"})],8,AZe),C("div",CZe,[C("span",{class:"ls-link",title:h(a).verificationUriComplete},B(h(a).verificationUriComplete),9,wZe),V(h(Ht),{class:$e(["ls-copy",{"is-copied":f.value}]),variant:"secondary",size:"sm",onClick:m},{default:he(()=>[f.value?(b(),M(Be,{key:0},[V(h(Ce),{name:"check",size:"sm"}),qe(" "+B(h(n)("login.copied")),1)],64)):(b(),M(Be,{key:1},[V(h(Ce),{name:"copy",size:"sm"}),qe(" "+B(h(n)("login.copyLink")),1)],64))]),_:1},8,["class"])]),C("div",xZe,[V(h(Ii),{size:"sm",label:h(n)("login.waitingAuth")},null,8,["label"]),C("span",_Ze,B(h(n)("login.waitingAutoClose")),1),C("span",SZe,B(y(h(u))),1)])])):h(r)==="success"?(b(),M("div",MZe,[V(h(uf),{kind:"success"}),C("span",IZe,B(h(n)("login.success")),1),C("span",EZe,B(h(n)("login.successHint")),1)])):h(r)==="expired"?(b(),M(Be,{key:3},[C("div",TZe,[V(h(uf),{kind:"expired"}),C("span",LZe,B(h(n)("login.expiredTitle")),1),C("span",NZe,B(h(n)("login.expiredHint")),1)]),C("div",FZe,[V(h(Ht),{variant:"secondary",onClick:g},{default:he(()=>[qe(B(h(n)("onboarding.back")),1)]),_:1}),V(h(Ht),{variant:"primary",onClick:h(c)},{default:he(()=>[qe(B(h(n)("login.retry")),1)]),_:1},8,["onClick"])])],64)):h(r)==="error"?(b(),M(Be,{key:4},[C("div",BZe,[V(h(uf),{kind:"error"}),C("span",$Ze,B(h(l)?h(n)("login.pollErrorTitle"):h(n)("login.errorTitle")),1),C("span",DZe,B(h(l)?h(n)("login.pollErrorHint"):h(n)("login.errorHint")),1)]),C("div",zZe,[V(h(Ht),{variant:"secondary",onClick:g},{default:he(()=>[qe(B(h(n)("onboarding.back")),1)]),_:1}),V(h(Ht),{variant:"primary",onClick:h(c)},{default:he(()=>[qe(B(h(n)("login.retry")),1)]),_:1},8,["onClick"])])],64)):te("",!0)]))}}),OZe=vt(RZe,[["__scopeId","data-v-1ff21828"]]),PZe=["aria-label"],jZe={class:"wiz-body"},HZe={key:0,class:"wiz-step"},WZe={class:"wiz-title"},qZe={class:"wiz-sub"},UZe={class:"pref-group"},KZe={class:"pref-label"},VZe={class:"lang-cards"},ZZe=["onClick"],GZe={class:"opt-label"},QZe={class:"pref-group"},YZe={class:"pref-label"},JZe={class:"theme-cards"},XZe=["onClick"],eGe={class:"opt-label"},tGe={key:1,class:"wiz-step"},nGe={class:"wiz-title"},iGe={class:"wiz-sub"},sGe={class:"wiz-step-fill"},oGe={class:"wiz-foot"},rGe={class:"wiz-foot-ghost"},lGe=nt({__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:i}=Bt(),s=e,o=t;function r(){o("addProvider")}const l=["preferences","login"],a=G(0),u=F(()=>l[a.value]??"preferences");function c(){a.value<l.length-1&&a.value++}function d(){a.value>0&&a.value--}function f(w){i.value!==w&&Yb(w)}const{colorScheme:p,setColorScheme:g}=QT(),m=[{value:"system",labelKey:"theme.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function y(){o("loginSuccess")}return(w,k)=>(b(),M("div",{class:"wizard",role:"dialog","aria-modal":"true","aria-label":h(n)("onboarding.welcome.title")},[C("div",jZe,[u.value==="preferences"?(b(),M("section",HZe,[V(P8,{size:72}),C("h1",WZe,B(h(n)("onboarding.welcome.title")),1),C("p",qZe,B(h(n)("onboarding.welcome.subtitle")),1),C("div",UZe,[C("div",KZe,B(h(n)("onboarding.welcome.languageLabel")),1),C("div",VZe,[(b(!0),M(Be,null,yt(h(a2),A=>(b(),M("button",{key:A.code,class:$e(["opt-card lang-card",{selected:h(i)===A.code}]),type:"button",onClick:v=>f(A.code)},[C("span",{class:$e(["opt-radio",{on:h(i)===A.code}])},null,2),C("span",GZe,B(A.label),1)],10,ZZe))),128))])]),C("div",QZe,[C("div",YZe,B(h(n)("onboarding.welcome.themeLabel")),1),C("div",JZe,[(b(),M(Be,null,yt(m,A=>C("button",{key:A.value,class:$e(["opt-card theme-card",{selected:h(p)===A.value}]),type:"button",onClick:v=>h(g)(A.value)},[C("span",{class:$e(["tp",`tp-${A.value}`]),"aria-hidden":"true"},[A.value==="system"?(b(),M(Be,{key:0},[k[2]||(k[2]=Tu('<span class="tp-half tp-half-light" data-v-6546a2d8><span class="tp-side" data-v-6546a2d8></span><span class="tp-lines" data-v-6546a2d8><span data-v-6546a2d8></span><span data-v-6546a2d8></span><span data-v-6546a2d8></span></span></span><span class="tp-half tp-half-dark" data-v-6546a2d8><span class="tp-side" data-v-6546a2d8></span><span class="tp-lines" data-v-6546a2d8><span data-v-6546a2d8></span><span data-v-6546a2d8></span><span data-v-6546a2d8></span></span></span>',2))],64)):(b(),M(Be,{key:1},[k[3]||(k[3]=C("span",{class:"tp-side"},null,-1)),k[4]||(k[4]=C("span",{class:"tp-lines"},[C("span"),C("span"),C("span")],-1))],64))],2),C("span",eGe,B(h(n)(A.labelKey)),1)],10,XZe)),64))])])])):(b(),M("section",tGe,[V(P8,{size:72}),C("h1",nGe,B(h(n)("onboarding.login.title")),1),C("p",iGe,B(h(n)("onboarding.login.subtitle")),1),C("div",sGe,[V(OZe,{"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:y,onAddProvider:r},null,8,["auth-ready","on-start-o-auth-login","on-poll-o-auth-login","on-cancel-o-auth-login"])])])),C("div",oGe,[u.value==="preferences"?(b(),de(h(Ht),{key:0,variant:"primary",size:"lg",class:"wiz-primary",onClick:c},{default:he(()=>[qe(B(h(n)("onboarding.continue")),1)]),_:1})):u.value==="login"&&s.authReady?(b(),de(h(Ht),{key:1,variant:"primary",size:"lg",class:"wiz-primary",onClick:k[0]||(k[0]=A=>o("complete"))},{default:he(()=>[qe(B(h(n)("onboarding.login.finish")),1)]),_:1})):te("",!0),C("div",rGe,[a.value>0?(b(),de(h(Ht),{key:0,variant:"ghost",onClick:d},{default:he(()=>[qe(B(h(n)("onboarding.back")),1)]),_:1})):te("",!0),u.value==="login"&&s.authReady?te("",!0):(b(),de(h(Ht),{key:1,variant:"ghost",onClick:k[1]||(k[1]=A=>o("complete"))},{default:he(()=>[qe(B(u.value==="login"?h(n)("onboarding.login.skip"):h(n)("onboarding.skip")),1)]),_:1}))])])])],8,PZe))}}),aGe=vt(lGe,[["__scopeId","data-v-6546a2d8"]]),uGe=["aria-label"],cGe={class:"gload-box"},dGe={class:"gload-text"},fGe=nt({__name:"GlobalLoading",setup(e){const{t}=Bt();return(n,i)=>(b(),M("div",{class:"gload",role:"status","aria-label":h(t)("app.connecting")},[C("div",cGe,[i[0]||(i[0]=Tu('<svg class="gload-logo" viewBox="0 0 96 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-v-ab85ede1><path fill="currentColor" d="M35.767 31.329c0 .37.3.671.67.671h4.305c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.672-.671h-4.304c-.37 0-.671.3-.671.671z" data-v-ab85ede1></path><path fill="currentColor" d="M90.353 31.329c0 .37.3.671.67.671h4.305c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.672-.671h-4.304a.67.67 0 0 0-.671.671z" data-v-ab85ede1></path><path fill="currentColor" d="M73.256 0a.67.67 0 0 0-.652.512l-6.366 26.1c-.106.428-.607.428-.71 0L59.159.512A.67.67 0 0 0 58.511 0H47.725c-.37 0-.668.3-.668.671V31.33c0 .37.3.671.67.671h4.781c.37 0 .671-.292.671-.662V5.554c0-.515.604-.622.726-.127l6.358 26.06a.67.67 0 0 0 .653.513h9.931c.31 0 .58-.212.653-.512L77.855 5.43c.122-.495.726-.388.726.127v25.772c0 .37.3.671.671.671h4.78c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.671-.671z" data-v-ab85ede1></path><path fill="currentColor" d="M15.279 14.837 28.264 1.133A.671.671 0 0 0 27.777 0h-6.043a.67.67 0 0 0-.477.199L6.374 15.223c-.231.234-.573.025-.573-.35V.672c0-.37-.3-.671-.671-.671H.67a.67.67 0 0 0-.67.67V31.33c0 .37.3.671.671.671H5.13c.37 0 .671-.3.671-.671v-6.114a.5.5 0 0 1 .13-.35l4.594-4.69a.293.293 0 0 1 .386-.045l12.286 9.305c1.796 1.245 4.083 2.06 6.178 2.401a.645.645 0 0 0 .743-.648v-5.537a.7.7 0 0 0-.562-.677c-1.215-.262-2.565-.758-3.59-1.468L15.332 15.58c-.22-.152-.248-.544-.052-.744" data-v-ab85ede1></path></svg>',1)),V(h(Ii),{size:"md",label:h(t)("app.connecting")},null,8,["label"]),C("div",dGe,B(h(t)("app.connecting")),1)])],8,uGe))}}),hGe=vt(fGe,[["__scopeId","data-v-ab85ede1"]]),pGe={class:"kap-root"},gGe={class:"kap-head"},mGe={class:"kap-count"},vGe={class:"kap-head-actions"},yGe={class:"kap-filters"},bGe=["value"],kGe={class:"kap-check"},AGe={class:"kap-check"},CGe={class:"kap-view-toggle",role:"group"},wGe={key:0,class:"kap-empty"},xGe=["onClick"],_Ge={class:"kap-ts"},SGe={class:"kap-label"},MGe={key:0,class:"kap-detail"},IGe={class:"kap-detail-actions"},EGe=["onClick"],TGe={key:1,class:"kap-agg"},LGe={class:"mono"},NGe={class:"mono"},FGe={class:"num"},BGe={class:"num"},$Ge={key:0},DGe={class:"mono"},zGe={class:"num"},RGe={class:"num"},OGe={key:0},PGe=nt({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,i=G("all"),s=G(""),o=G(""),r=G(!1),l=G("timeline"),a=F(()=>(Xb.value,[...lke()])),u=F(()=>{const E=new Set;for(const N of a.value)N.sessionId&&E.add(N.sessionId);return[...E].sort()});function c(E){return E.kind==="rest:error"||E.code!==void 0&&E.code!==0||E.eventType==="error"||E.eventType==="parse-error"}const d=F(()=>{const E=s.value.trim().toLowerCase();return a.value.filter(N=>!(i.value!=="all"&&N.source!==i.value||o.value&&N.sessionId!==o.value||r.value&&!c(N)||E&&!`${N.label} ${N.kind} ${N.eventType??""} ${N.sessionId??""} ${N.requestId??""}`.toLowerCase().includes(E)))}),f=F(()=>{const E=new Map;for(const N of d.value){if(N.kind!=="ws:in"&&N.kind!=="ws:out")continue;const D=N.kind==="ws:in"?"←":"→",T=`${D} ${N.eventType??"?"} @ ${N.sessionId??"-"}`,$=E.get(T)??{key:T,sessionId:N.sessionId??"-",eventType:N.eventType??"?",dir:D,count:0};$.count++,N.seq!==void 0&&($.lastSeq=N.seq),E.set(T,$)}return[...E.values()].sort((N,D)=>D.count-N.count)}),p=F(()=>{const E=new Map;for(const N of d.value){if(N.source!=="rest"||N.kind==="rest:request")continue;const D=`${N.method??"?"} ${N.path??"?"}`,T=E.get(D)??{count:0,errors:0,totalMs:0,timed:0};T.count++,c(N)&&T.errors++,N.durationMs!==void 0&&(T.totalMs+=N.durationMs,T.timed++),E.set(D,T)}return[...E.entries()].map(([N,D])=>({key:N,count:D.count,errors:D.errors,avgMs:D.timed>0?Math.round(D.totalMs/D.timed):0})).sort((N,D)=>D.count-N.count)}),g=G(null),m=G(!0),y=G(null),w=G(null);Ge(()=>d.value.length,async()=>{if(!m.value||l.value!=="timeline")return;await At();const E=y.value;E&&(E.scrollTop=E.scrollHeight)});function k(E){g.value=g.value===E?null:E}function A(E){const N=new Date(E),D=(T,$=2)=>String(T).padStart($,"0");return`${D(N.getHours())}:${D(N.getMinutes())}:${D(N.getSeconds())}.${D(N.getMilliseconds(),3)}`}function v(E){return JSON.stringify(E,null,2)}async function x(E){await no(v(E))&&(w.value=E.id,setTimeout(()=>{w.value===E.id&&(w.value=null)},1500))}function S(){p$(d.value)}function I(E){return c(E)||E.source==="client"?"b-err":E.source==="rest"?"b-rest":E.kind==="ws:lifecycle"?"b-life":E.kind==="ws:out"?"b-out":"b-in"}function _(E){return E.source==="rest"?"REST":E.source==="client"?"APP":"WS"}return(E,N)=>(b(),M("section",pGe,[C("header",gGe,[N[11]||(N[11]=C("strong",null,"KAP debug",-1)),C("span",mGe,B(d.value.length)+"/"+B(a.value.length),1),C("div",vGe,[C("button",{type:"button",class:$e({on:h(eh)}),onClick:N[0]||(N[0]=D=>eh.value=!h(eh))},B(h(eh)?"resume":"pause"),3),C("button",{type:"button",onClick:N[1]||(N[1]=D=>h(ake)())},"clear"),C("button",{type:"button",onClick:N[2]||(N[2]=D=>S())},"export jsonl"),V(h(mn),{text:"Close window"},{default:he(()=>[C("button",{type:"button",onClick:N[3]||(N[3]=D=>n("close"))},"✕")]),_:1})])]),C("div",yGe,[Nn(C("select",{"onUpdate:modelValue":N[4]||(N[4]=D=>i.value=D),"aria-label":"Source filter"},[...N[12]||(N[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,i.value]]),Nn(C("select",{"onUpdate:modelValue":N[5]||(N[5]=D=>o.value=D),"aria-label":"Session filter"},[N[13]||(N[13]=C("option",{value:""},"all sessions",-1)),(b(!0),M(Be,null,yt(u.value,D=>(b(),M("option",{key:D,value:D},B(D),9,bGe))),128))],512),[[H4,o.value]]),Nn(C("input",{"onUpdate:modelValue":N[6]||(N[6]=D=>s.value=D),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[Ao,s.value]]),C("label",kGe,[Nn(C("input",{"onUpdate:modelValue":N[7]||(N[7]=D=>r.value=D),type:"checkbox"},null,512),[[fm,r.value]]),N[14]||(N[14]=qe(" errors",-1))]),C("label",AGe,[Nn(C("input",{"onUpdate:modelValue":N[8]||(N[8]=D=>m.value=D),type:"checkbox"},null,512),[[fm,m.value]]),N[15]||(N[15]=qe(" follow",-1))]),C("div",CGe,[C("button",{type:"button",class:$e({on:l.value==="timeline"}),onClick:N[9]||(N[9]=D=>l.value="timeline")},"timeline",2),C("button",{type:"button",class:$e({on:l.value==="aggregate"}),onClick:N[10]||(N[10]=D=>l.value="aggregate")},"aggregate",2)])]),l.value==="timeline"?(b(),M("div",{key:0,ref_key:"listRef",ref:y,class:"kap-list"},[d.value.length===0?(b(),M("div",wGe," No trace entries yet. REST calls and WS frames will appear here. ")):te("",!0),(b(!0),M(Be,null,yt(d.value,D=>(b(),M("div",{key:D.id,class:"kap-row-wrap"},[C("button",{type:"button",class:$e(["kap-row",{expanded:g.value===D.id}]),onClick:T=>k(D.id)},[C("span",_Ge,B(A(D.ts)),1),C("span",{class:$e(["kap-badge",I(D)])},B(_(D)),3),C("span",SGe,B(D.label),1)],10,xGe),g.value===D.id?(b(),M("div",MGe,[C("div",IGe,[C("button",{type:"button",onClick:T=>x(D)},B(w.value===D.id?"copied ✓":"copy json"),9,EGe)]),C("pre",null,B(v(D)),1)])):te("",!0)]))),128))],512)):(b(),M("div",TGe,[N[20]||(N[20]=C("h4",null,"WS frames by session / type",-1)),C("table",null,[N[17]||(N[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,[(b(!0),M(Be,null,yt(f.value,D=>(b(),M("tr",{key:D.key},[C("td",null,B(D.dir),1),C("td",LGe,B(D.eventType),1),C("td",NGe,B(D.sessionId),1),C("td",FGe,B(D.count),1),C("td",BGe,B(D.lastSeq??"—"),1)]))),128)),f.value.length===0?(b(),M("tr",$Ge,[...N[16]||(N[16]=[C("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):te("",!0)])]),N[21]||(N[21]=C("h4",null,"REST by endpoint",-1)),C("table",null,[N[19]||(N[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,[(b(!0),M(Be,null,yt(p.value,D=>(b(),M("tr",{key:D.key},[C("td",DGe,B(D.key),1),C("td",zGe,B(D.count),1),C("td",{class:$e(["num",{err:D.errors>0}])},B(D.errors),3),C("td",RGe,B(D.avgMs),1)]))),128)),p.value.length===0?(b(),M("tr",OGe,[...N[18]||(N[18]=[C("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):te("",!0)])])]))]))}}),jGe=vt(PGe,[["__scopeId","data-v-2b13888e"]]),HGe=nt({__name:"DebugPanel",setup(e){const t=G(!1);let n=null,i=null,s=null;const o=["data-color-scheme"];function r(c){const d=document.documentElement,f=c.documentElement;for(const p of o){const g=d.getAttribute(p);g!==null?f.setAttribute(p,g):f.removeAttribute(p)}}function l(c){const d=c.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const g of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(g.cloneNode(!0));r(d),d.body.style.margin="0";const p=d.createElement("div");return p.style.height="100vh",d.body.appendChild(p),p}function a(){s?.disconnect(),s=null;try{i?.unmount()}catch{}i=null,n=null,t.value=!1}function u(){if(n&&!n.closed){n.focus();return}const c=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!c)return;n=c;const d=l(c),f=hm(jGe,{onClose:()=>c.close()});f.mount(d),i=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&r(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...o]}),c.addEventListener("pagehide",a),c.addEventListener("beforeunload",a)}return gn(()=>{u()}),Gn(()=>{n&&!n.closed&&n.close(),a()}),(c,d)=>(b(),de(h(mn),{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:he(()=>[C("button",{class:"kap-fab",type:"button",onClick:u}," KAP ")]),_:1},8,["text"]))}}),WGe=vt(HGe,[["__scopeId","data-v-21de79fc"]]),qGe=nt({__name:"ServerAuthDialog",setup(e){const t=G(""),n=G(null),i=G(!1);gn(()=>{At(()=>n.value?.focus())});function s(){const r=t.value;!r||i.value||(i.value=!0,mL(r),window.location.reload())}function o(r){r.key==="Enter"&&(r.preventDefault(),s())}return(r,l)=>(b(),de(h(La),{open:!0,title:"Server token required","hide-close":!0,"close-on-overlay":!1,"close-on-esc":!1},{foot:he(()=>[V(h(Ht),{variant:"primary",disabled:!t.value||i.value,loading:i.value,onClick:s},{default:he(()=>[qe(B(i.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])]),default:he(()=>[l[1]||(l[1]=C("p",{class:"server-auth-hint"},[qe(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),C("code",null,"KIMI_CODE_PASSWORD"),qe("). ")],-1)),V(h(Xs),{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:i.value,onKeydown:o},null,8,["modelValue","disabled"])]),_:1}))}}),UGe=vt(qGe,[["__scopeId","data-v-331563ff"]]),KGe=["aria-label"],VGe=nt({__name:"InternalBuildBanner",setup(e){const{t}=Bt(),n=Hf;return(i,s)=>h(n)?(b(),M("span",{key:0,class:"internal-build-tag",role:"note","aria-label":h(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,B(h(t)("app.internalBuildBanner")),1)],8,KGe)):te("",!0)}}),ZGe=vt(VGe,[["__scopeId","data-v-14c3d0e0"]]),GGe={class:"app-shell"},QGe=["inert"],YGe=["aria-label","aria-hidden"],JGe=nt({__name:"App",setup(e){_te();const t=G(!1);let n=null;const i=Fa(),s=F(()=>!i.dangerousBypassAuth.value&&t.value);Pn("resolveImage",i.resolveImageUrl),Pn("resolveSwarmMembers",ht=>i.swarmMembersByToolCallId.value.get(ht)??[]),Pn("modelDisplay",ht=>Oee(ht,i.models.value));const{t:o}=Bt();Pn("subagentEffort",ht=>Pee(ht));const{confirm:r}=ju(),l=vl(),a=O2e(),u=G(!1),c=G(!1),d=F(()=>{const ht=i.activeSessionId.value;return i.sessions.value.find(Ie=>Ie.id===ht)?.title??""}),f=F(()=>{const ht=i.activeSessionId.value;return i.sessions.value.find(Ie=>Ie.id===ht)?.lastTurnReason??null}),p=F(()=>i.visibleWorkspace.value?.sessionCount??0),g=F(()=>i.activity.value!=="idle");cve({running:g,title:"Kimi Code Web"});function m(ht){const Ie=i.models.value.find(Po=>Po.id===i.status.value.modelId),Ve=bp(Ie),on=Ve.indexOf(Cm(Ie,ht)),wi=Ve[(on+1)%Ve.length]??Ve[0]??"off";return R5(Ie,wi)}const y=F(()=>{const ht=i.models.value.find(Ie=>Ie.id===i.status.value.modelId);return Cm(ht,i.thinking.value)}),w=G(!i.onboarded.value);function k(){i.setOnboarded(!0),w.value=!1}function A(){k(),Ln.value="providers",Bn.value=!0}let v=0;function x(){const ht=window.visualViewport,Ie=document.documentElement.style;Ie.setProperty("--app-height",`${ht?.height??window.innerHeight}px`),Ie.setProperty("--app-top",`${ht?.offsetTop??0}px`)}function S(){v||(v=requestAnimationFrame(()=>{v=0,x()}))}gn(()=>{n=Ete(()=>{t.value=!0,i.clearDangerousBypassAuth()}),i.load(),ee(),x(),window.visualViewport?.addEventListener("resize",S),window.visualViewport?.addEventListener("scroll",S),window.addEventListener("resize",S),document.addEventListener("keydown",I,!0)}),Cn(()=>{document.removeEventListener("keydown",I,!0),window.visualViewport?.removeEventListener("resize",S),window.visualViewport?.removeEventListener("scroll",S),window.removeEventListener("resize",S),v&&(cancelAnimationFrame(v),v=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function I(ht){ht.key==="Escape"&&(ro.value||ht.defaultPrevented||Zt()&&(ht.stopImmediatePropagation(),ht.preventDefault()))}const _=G(null),{previewTarget:E,previewFile:N,previewLoading:D,previewError:T,previewDownloadUrl:$,previewExternalActions:O,openFilePreview:P,closeFilePreview:R,openPreviewInEditor:j,revealPreviewFile:z}=uve({client:i,detailTarget:_,t:(ht,Ie)=>Ie===void 0?o(ht):o(ht,Ie)}),K=F(()=>_.value!==null),q=G(null),W=G(null);function Z(ht){W.value=ht.originImg??null,q.value=ht.media}const{SIDEBAR_WIDTH_KEY:ne,SIDEBAR_DEFAULT:X,SIDEBAR_MIN:ue,sidebarMax:ie,sessionColWidth:Se,sidebarCollapsed:fe,sidebarDragging:pe,sideWidth:Ne,loadSidebarCollapsed:ee,toggleSidebarCollapse:ye}=lve({previewOpen:K}),{PREVIEW_WIDTH_KEY:H,PREVIEW_MIN:Y,previewDefaultWidth:ve,previewMax:re,previewWidth:se,previewPanelWidth:U,compactionPanelText:J,compactionPanelVisible:ce,openCompactionPanel:ge,closeCompactionPanel:Me,agentPanelMember:Pe,agentPanelTurns:ke,agentPanelLoading:Le,agentPanelLoadError:it,agentPanelLoadingMore:Fe,agentPanelLoadMoreError:De,agentPanelHasMore:Ke,agentPanelRunning:gt,openAgentPanel:lt,closeAgentPanel:ft,loadOlderAgentMessages:Lt,detailDiffMode:bn,detailDiffPath:Gt,openDiffDetail:Qt,closeDiffDetail:kn,selectDiffFile:_n,turnDiffChange:je,openTurnDiff:st,closeTurnDiff:Ue,btwVisible:Ft,openSideChatTab:Ct,closeSideChat:Fn,sidePanelVisible:In,panelDragging:ks,closeOpenSidePanel:Zt}=ive({client:i,sideWidth:Ne,detailTarget:_,closeFilePreview:R}),li=G(null);function Rn(ht){li.value?.style.setProperty("--preview-w",`${ht}px`)}Ge([li,U],([ht,Ie])=>ht?.style.setProperty("--preview-w",`${Ie}px`),{immediate:!0});const Sn=G(null),Qn=F(()=>{const ht=i.goal.value?.status;return ht==="active"||ht==="paused"||ht==="blocked"});function os(){c.value=!1,Sn.value?.focusGoal()}const As=G(!1),Tt=G(!1),Ci=G(!1),rs=G(!1),Bn=G(!1);let Co;gn(()=>{Co=window.kimiDesktop?.onMenuAction?.(ht=>{ht==="open-settings"?Bn.value=!0:ht==="new-chat"&&as()})}),Cn(()=>{Co?.()});const Mi=G(null),Ei=G(null),ro=F(()=>vo.value>0||As.value||Tt.value||Ci.value||rs.value||Bn.value||w.value||u.value||c.value),zi=G(!1),Hs=G(!1),wo=G(!1);async function Cs(){zi.value=!0,Hs.value=!1,As.value=!0;try{await i.refreshAllProviders()}catch{Hs.value=!0}finally{zi.value=!1}}function Ti(){Tt.value=!0}async function ii(){await r({title:o("sidebar.logoutConfirmTitle"),message:o("sidebar.logoutConfirmMessage"),variant:"danger",action:()=>i.logout()})}async function On(ht){As.value=!1,await $n(ht)}async function $n(ht){await i.setModel(ht)&&ht!==i.defaultModel.value&&i.updateConfig({defaultModel:ht})}const Tn=G(null);let tt=0;async function Je(ht){await i.archiveSession(ht),!i.sessionsForView.value.some(Ie=>Ie.id===ht)&&(Tn.value={kind:"archive",id:ht,key:++tt})}let Rt=!1;async function Ot(ht){if(Rt)return;Rt=!0;const Ie=++tt,Ve=setTimeout(()=>{(Tn.value===null||Tn.value.key<=Ie)&&(Tn.value={kind:"export",state:"running",key:Ie})},400);try{await i.exportSession(ht)&&!Hf?(Tn.value===null||Tn.value.key<=Ie)&&(Tn.value={kind:"export",state:"done",key:++tt}):Tn.value?.kind==="export"&&Tn.value.key===Ie&&(Tn.value=null)}finally{clearTimeout(Ve),Rt=!1}}async function ai(){const ht=Tn.value;!ht||ht.kind!=="archive"||await i.restoreSession(ht.id)&&Tn.value?.key===ht.key&&(Tn.value=null)}function Ns(ht){ht!==void 0&&Tn.value?.key===ht&&(Tn.value=null)}const Ln=G(void 0),ls=G(void 0);Ge(c,ht=>{ht||(ls.value=void 0)});function ts(){Tn.value=null,a.value?(ls.value="archived",c.value=!0):(Ln.value="archived",Bn.value=!0)}async function Vi(ht){const Ie=i.workspacesView.value.find(Ve=>Ve.id===ht)?.name??ht;await r({title:o("sidebar.removeWorkspace"),message:o("workspace.removeWorkspaceConfirm",{name:Ie}),variant:"danger",action:()=>i.deleteWorkspace(ht)})}async function gi(ht){wo.value=!0;try{await i.updateConfig(ht)&&await i.checkAuth()}finally{wo.value=!1}}async function an(){return i.startOAuthLogin()}async function Zi(){return i.pollOAuthLogin()}async function Ri(){return i.cancelOAuthLogin()}async function Vl(){Tt.value=!1,await i.checkAuth(),await i.load()}async function Ro(){k(),await i.checkAuth(),await i.load()}async function Sr(ht){const Ie=i.activeSessionId.value;await i.undo(1)!==null&&(Ie&&(i.invalidateSessionPlans(Ie),i.refreshSessionPlans(Ie)),await At(),Sn.value?.loadComposerForEdit(ht.text,ht.attachments),Sn.value?.notifyUndone())}async function Ws(){const ht=await i.abortCurrentPrompt();Sn.value?.onAbortOutcome(ht)}function Li(ht){const Ie=jt();return ht.map(Ve=>({kind:Ve.kind,url:Ie.getFileUrl(Ve.fileId),fileId:Ve.fileId,name:Ve.name}))}async function Oi(ht,Ie){if(i.authReady.value)return!0;const Ve=i.managedProviderStatus.value==="authenticated";Ve&&i.managedMembership.value===null&&await i.probeManagedMembership();const on=Ve&&i.managedMembership.value==="free",wi=await r(on?{title:o("login.upgradeRequiredTitle"),message:o("login.upgradeRequiredMessage"),confirmLabel:o("sidebar.upgrade"),variant:"primary"}:{title:o("login.requiredTitle"),message:o("login.requiredMessage"),confirmLabel:o("login.goToLogin"),variant:"primary"});return Sn.value?.loadComposerForEdit(ht,Li(Ie)),wi&&(on?kp():Ti()),!1}async function Zl(ht,Ie=[]){if(i.activeSessionId.value||i.activeWorkspaceId.value)return!0;const Ve=await r({title:o("workspace.requiredTitle"),message:o("workspace.requiredMessage"),confirmLabel:o("conversation.pickFolder"),variant:"primary"});return Sn.value?.loadComposerForEdit(ht,Li(Ie)),Ve&&(Ci.value=!0),!1}async function Fs(ht,Ie=[]){return await Oi(ht,Ie)?Zl(ht,Ie):!1}async function rr(ht){const{cmd:Ie,attachments:Ve}=ht;if(Ie==="/compact"||Ie.startsWith("/compact ")){if(!await Fs(Ie))return;i.compact(Ie.slice(8).trim()||void 0);return}if(Ie==="/swarm"||Ie.startsWith("/swarm ")){const on=Ie.slice(6).trim();if(on==="on")i.setSwarmMode(!0);else if(on==="off")i.setSwarmMode(!1);else if(on){if(!await Fs(Ie))return;i.setSwarmMode(!0),i.sendPrompt(on)}else i.toggleSwarmMode();return}if(Ie==="/goal"||Ie.startsWith("/goal ")){const on=Ie.slice(5).trim();if(on==="pause"||on==="resume"||on==="cancel")i.controlGoal(on);else if(on){if(!await Fs(Ie))return;i.createGoal(on)}else i.toggleGoalMode();return}if(Ie==="/btw"||Ie.startsWith("/btw ")){const on=Ie.slice(4).trim();if(!on&&i.sideChatVisible.value)Fn();else{if(on&&!await Fs(Ie))return;Ct(on||void 0)}return}switch(Ie){case"/new":case"/clear":as();break;case"/fork":i.forkSession();break;case"/export":Ot();break;case"/undo":{const on=i.activeSessionId.value;i.undo().then(wi=>{wi&&on&&(i.invalidateSessionPlans(on),i.refreshSessionPlans(on))});break}case"/auto":i.setPermission("auto");break;case"/yolo":i.setPermission("yolo");break;case"/thinking":i.setThinking(m(i.thinking.value));break;case"/status":rs.value=!0;break;case"/login":Ti();break;default:{const on=Ie.indexOf(" "),wi=kie((on===-1?Ie:Ie.slice(0,on)).slice(1)),Po=on===-1?void 0:Ie.slice(on+1).trim()||void 0;if(!wi)break;if(!await Fs(Ie,Ve))return;!i.activeSessionId.value&&i.activeWorkspaceId.value?i.startSessionAndActivateSkill(i.activeWorkspaceId.value,wi,Po,Ve):i.activateSkill(wi,Po,Ve);break}}}function qs(ht){i.unqueue(ht)}function Pi(ht){i.unqueue(ht)}function ws(ht){i.reorderQueue(ht.from,ht.to)}async function lo(ht){if(!await Oi(ht.text,ht.attachments))return;const Ie=i.activeWorkspaceId.value;if(!i.activeSessionId.value&&Ie){await i.startSessionAndSendPrompt(Ie,ht.text,ht.attachments);return}if(!i.activeSessionId.value&&!Ie){Mi.value=ht,await r({title:o("workspace.requiredTitle"),message:o("workspace.requiredMessage"),confirmLabel:o("conversation.pickFolder"),variant:"primary"})?Ci.value=!0:mi();return}i.sendPrompt(ht.text,ht.attachments)}function mi(){const ht=Mi.value;Mi.value=null,ht&&Sn.value?.loadComposerForEdit(ht.text,Li(ht.attachments))}async function xo(ht){if(Ei.value=null,!await i.addWorkspaceByPath(ht)){Ei.value=o("workspace.addFailed");return}Ci.value=!1;const Ve=Mi.value;Mi.value=null;const on=i.activeWorkspaceId.value;Ve&&on&&await i.startSessionAndSendPrompt(on,Ve.text,Ve.attachments)}function ao(){mi(),Ei.value=null,Ci.value=!1}function Us(){At(()=>{Sn.value?.focusComposer()})}function as(){const ht=i.activeWorkspaceId.value;ht?i.openWorkspaceDraft(ht):i.clearActiveSession(),Us()}function Oo(ht){i.openWorkspaceDraft(ht),Us()}function lr(ht){ht&&window.open(ht,"_blank","noopener")}return(ht,Ie)=>(b(),M("div",GGe,[s.value?(b(),de(UGe,{key:0})):te("",!0),C("div",{class:$e(["app",{mobile:h(a),"sidebar-collapsed":h(fe)&&!h(a),"macos-desktop":h($c)}]),inert:w.value},[h(a)?(b(),de(fKe,{key:1,workspace:h(i).visibleWorkspace.value,"session-title":d.value,running:g.value,branch:h(i).status.value.branch,"session-count":p.value,onOpenSwitcher:Ie[23]||(Ie[23]=Ve=>u.value=!0),onOpenSettings:Ie[24]||(Ie[24]=Ve=>c.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(b(),M(Be,{key:0},[V(fwe,{collapsed:h(fe),dragging:h(pe),"col-width":h(Ne),"active-workspace":h(i).visibleWorkspace.value,"active-workspace-id":h(i).activeWorkspaceId.value,sessions:h(i).sessionsForView.value,groups:h(i).workspaceGroups.value,"workspace-sort-mode":h(i).workspaceSortMode.value,"pinned-sessions":h(i).pinnedSessions.value,"flat-sessions":h(i).flatSessions.value,"flat-has-more":h(i).flatSessionsHasMore.value,"flat-loading-more":h(i).flatSessionsLoadingMore.value,initialized:h(i).initialized.value,"active-id":h(i).activeSessionId.value,"attention-by-session":h(i).attentionBySession.value,"pending-by-session":h(i).pendingBySession.value,"unread-by-session":h(i).unreadBySession.value,onSelect:Ie[0]||(Ie[0]=Ve=>h(i).selectSession(Ve)),onCreate:as,onCreateInWorkspace:Ie[1]||(Ie[1]=Ve=>Oo(Ve)),onSelectWorkspace:Ie[2]||(Ie[2]=Ve=>h(i).openWorkspace(Ve)),onAddWorkspace:Ie[3]||(Ie[3]=Ve=>Ci.value=!0),onRename:Ie[4]||(Ie[4]=(Ve,on)=>h(i).renameSession(Ve,on)),onGenerateTitle:Ie[5]||(Ie[5]=(Ve,on)=>void h(i).regenerateSessionTitle(Ve).then(on)),onArchive:Ie[6]||(Ie[6]=Ve=>Je(Ve)),onFork:Ie[7]||(Ie[7]=Ve=>h(i).forkSession(Ve)),onExport:Ie[8]||(Ie[8]=Ve=>void Ot(Ve)),onPin:Ie[9]||(Ie[9]=Ve=>h(i).togglePinSession(Ve)),onUnpin:Ie[10]||(Ie[10]=Ve=>h(i).unpinSession(Ve)),onDropPin:Ie[11]||(Ie[11]=Ve=>h(i).pinSession(Ve)),onRenameWorkspace:Ie[12]||(Ie[12]=(Ve,on)=>h(i).renameWorkspace(Ve,on)),onDeleteWorkspace:Ie[13]||(Ie[13]=Ve=>Vi(Ve)),onReorderWorkspaces:Ie[14]||(Ie[14]=Ve=>h(i).reorderWorkspaces(Ve)),onSetWorkspaceSortMode:Ie[15]||(Ie[15]=Ve=>h(i).setWorkspaceSortMode(Ve)),onLoadMoreSessions:Ie[16]||(Ie[16]=Ve=>void h(i).loadMoreSessions(Ve)),onLoadAllSessions:Ie[17]||(Ie[17]=Ve=>void h(i).loadAllSessions()),onEnsureFlatSessions:Ie[18]||(Ie[18]=Ve=>void h(i).ensureFlatSessions()),onLoadMoreFlatSessions:Ie[19]||(Ie[19]=Ve=>void h(i).loadMoreFlatSessions()),onOpenSettings:Ie[20]||(Ie[20]=Ve=>Bn.value=!0),onLogin:Ti,onCollapse:h(ye)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","groups","workspace-sort-mode","pinned-sessions","flat-sessions","flat-has-more","flat-loading-more","initialized","active-id","attention-by-session","pending-by-session","unread-by-session","onCollapse"]),Nn(V(ZS,{class:"side-handle","storage-key":h(ne),"default-width":h(X),min:h(ue),max:h(ie),"onUpdate:width":Ie[21]||(Ie[21]=Ve=>Se.value=Ve),"onUpdate:dragging":Ie[22]||(Ie[22]=Ve=>pe.value=Ve)},null,8,["storage-key","default-width","min","max"]),[[is,!h(fe)]])],64)),V(dRe,{ref_key:"conversationPaneRef",ref:Sn,mobile:h(a),turns:h(i).turns.value,"session-id":h(i).activeSessionId.value,approvals:h(i).pendingApprovals.value,changes:h(i).changes.value,"git-info":h(i).gitInfo.value,tasks:h(i).tasks.value,todos:h(i).todos.value,goal:h(i).goal.value,"session-plans":h(i).sessionPlans.value,"activation-badges":h(i).activationBadges.value,status:h(i).status.value,thinking:h(i).thinking.value,"plan-mode":h(i).planMode.value,"plan-armed":h(i).planArmed.value,"swarm-mode":h(i).swarmMode.value,"goal-mode":h(i).goalMode.value,models:h(i).models.value,"auth-ready":h(i).authReady.value,"managed-signed-in":h(i).managedProviderStatus.value==="authenticated","managed-membership":h(i).managedMembership.value,"starred-ids":h(i).starredModelIds.value,skills:h(i).skills.value,questions:h(i).questions.value,"pending-question-actions":h(i).pendingQuestionActions,"pending-approval-actions":h(i).pendingApprovalActions,running:g.value,"overlay-open":ro.value,"turn-active":h(i).turnActive.value,queued:h(i).queued.value,"search-files":h(i).searchFiles,"upload-image":h(i).uploadImage,working:h(i).working.value,"last-turn-reason":f.value,"turn-error":h(i).activeTurnError.value??null,"turn-retry":h(i).activeTurnRetry.value??null,starting:h(i).isStartingFirstPrompt.value,"file-reload-key":h(i).activeSessionId.value,"session-loading":h(i).sessionLoading.value,compaction:h(i).compaction.value,"has-more-messages":h(i).hasMoreMessages.value,"loading-more":h(i).loadingMoreMessages.value,"loading-more-error":h(i).loadMoreMessagesError.value,"load-older-messages":h(i).loadOlderMessages,"workspace-name":h(i).visibleWorkspace.value?.name,"workspace-root":h(i).visibleWorkspace.value?.root??h(i).status.value.cwd,"git-diff-stats":h(i).gitDiffStats.value,workspaces:h(i).workspacesView.value,"active-workspace-id":h(i).activeWorkspaceId.value,"session-title":d.value,pr:h(i).activePullRequest.value,onOpenChanges:Ie[25]||(Ie[25]=Ve=>h(Qt)()),onSelectWorkspace:Ie[26]||(Ie[26]=Ve=>Oo(Ve)),onAddWorkspace:Ie[27]||(Ie[27]=Ve=>Ci.value=!0),onOpenPr:lr,onSubmit:Ie[28]||(Ie[28]=Ve=>lo(Ve)),onLogin:Ie[29]||(Ie[29]=Ve=>Ti()),onSteer:Ie[30]||(Ie[30]=Ve=>h(i).steerPrompt(Ve.text,Ve.attachments)),onApproval:Ie[31]||(Ie[31]=(Ve,on)=>h(i).respondApproval(Ve,on)),onCancelTask:Ie[32]||(Ie[32]=Ve=>h(i).cancelTask(Ve)),onAnswer:Ie[33]||(Ie[33]=(Ve,on)=>h(i).respondQuestion(Ve,on)),onDismiss:Ie[34]||(Ie[34]=Ve=>h(i).dismissQuestion(Ve)),onCommand:rr,onInterrupt:Ws,onUnqueue:qs,onEditQueued:Pi,onReorderQueue:ws,onSetPermission:Ie[35]||(Ie[35]=Ve=>h(i).setPermission(Ve)),onSetThinking:Ie[36]||(Ie[36]=Ve=>h(i).setThinking(Ve)),onTogglePlan:Ie[37]||(Ie[37]=Ve=>h(i).togglePlanMode()),onToggleSwarm:Ie[38]||(Ie[38]=Ve=>h(i).toggleSwarmMode()),onToggleGoal:Ie[39]||(Ie[39]=Ve=>h(i).toggleGoalMode()),onCreateGoal:Ie[40]||(Ie[40]=Ve=>h(i).createGoal(Ve)),onControlGoal:Ie[41]||(Ie[41]=Ve=>h(i).controlGoal(Ve)),onRefreshGitStatus:Ie[42]||(Ie[42]=Ve=>h(i).activeSessionId.value&&h(i).loadGitStatus(h(i).activeSessionId.value)),onRenameSession:Ie[43]||(Ie[43]=(Ve,on)=>h(i).renameSession(Ve,on)),onForkSession:Ie[44]||(Ie[44]=Ve=>h(i).forkSession(Ve)),onArchiveSession:Ie[45]||(Ie[45]=Ve=>Je(Ve)),onExportSession:Ie[46]||(Ie[46]=Ve=>void Ot(Ve)),onCompact:Ie[47]||(Ie[47]=Ve=>h(i).compact()),onPickModel:Ie[48]||(Ie[48]=Ve=>Cs()),onSelectModel:Ie[49]||(Ie[49]=Ve=>$n(Ve)),onOpenFile:Ie[50]||(Ie[50]=Ve=>h(P)(Ve)),onOpenMedia:Z,onOpenTurnDiff:Ie[51]||(Ie[51]=Ve=>h(st)(Ve)),onOpenCompaction:Ie[52]||(Ie[52]=Ve=>h(ge)(Ve)),onOpenAgent:Ie[53]||(Ie[53]=Ve=>h(lt)(Ve)),onEditMessage:Sr},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","session-plans","activation-badges","status","thinking","plan-mode","plan-armed","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","turn-error","turn-retry","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"]),!h(a)&&(h($c)||h(fe))?(b(),de(h(rn),{key:2,class:"sidebar-toggle-btn",size:"sm",label:h(fe)?h(o)("sidebar.expandSidebar"):h(o)("sidebar.collapseSidebar"),tooltip:h(fe)?h(o)("sidebar.expandSidebar"):h(o)("sidebar.collapseSidebar"),onClick:h(ye)},{default:he(()=>[V(h(Ce),{name:h(fe)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","tooltip","onClick"])):te("",!0),!h(a)&&h(fe)?(b(),de(h(rn),{key:3,class:"new-chat-btn",size:"sm",label:h(o)("sidebar.newChat"),tooltip:h(o)("sidebar.newChat"),onClick:as},{default:he(()=>[V(h(Ce),{name:"chat-new"})]),_:1},8,["label","tooltip"])):te("",!0),h(In)&&!h(a)?(b(),de(ZS,{key:4,class:"preview-handle","storage-key":h(H),"default-width":h(ve),min:h(Y),max:h(re),reverse:"","aria-label":h(o)("layout.resizePreviewAria"),"apply-live":Rn,"onUpdate:width":Ie[54]||(Ie[54]=Ve=>se.value=Ve),"onUpdate:dragging":Ie[55]||(Ie[55]=Ve=>ks.value=Ve)},null,8,["storage-key","default-width","min","max","aria-label"])):te("",!0),!h(a)||h(In)?(b(),M("aside",{key:5,ref_key:"previewPanelEl",ref:li,class:$e(["global-preview",{open:h(In),mobile:h(a)}]),role:"complementary","aria-label":h(o)("layout.detailPanelAria"),"aria-hidden":!h(In)},[_.value==="compaction"&&h(ce)?(b(),de(GRe,{key:0,text:h(J)??"",subtitle:h(o)("conversation.summaryTitle"),onClose:h(Me)},null,8,["text","subtitle","onClose"])):_.value==="agent"&&h(Pe)?(b(),de(eOe,{key:1,member:h(Pe),turns:h(ke),running:h(gt),loading:h(Le),"load-error":h(it),"has-more":h(Ke),"loading-more":h(Fe),"load-more-error":h(De),onClose:h(ft),onLoadOlderMessages:h(Lt),onOpenAgent:h(lt),onOpenFile:h(P),onOpenMedia:Z,onOpenTurnDiff:Ie[56]||(Ie[56]=Ve=>h(st)(Ve))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onClose","onLoadOlderMessages","onOpenAgent","onOpenFile"])):_.value==="btw"&&h(Ft)?(b(),de(aOe,{key:2,turns:h(i).sideChatTurns.value,running:h(i).sideChatRunning.value,sending:h(i).sideChatSending.value,"on-send":h(i).sendSideChatPrompt,onClose:h(Fn),onOpenMedia:Z},null,8,["turns","running","sending","on-send","onClose"])):_.value==="diff"?(b(),de(DOe,{key:3,mode:h(bn),changes:h(i).changes.value,"git-info":h(i).gitInfo.value,"file-diff":h(i).fileDiff.value,"full-texts":h(i).fileDiffTexts.value,"empty-file":h(i).fileDiffEmptyFile.value,"selected-diff-path":h(i).selectedDiffPath.value,"file-diff-loading":h(i).fileDiffLoading.value,closable:"",onOpen:h(_n),onBack:Ie[57]||(Ie[57]=Ve=>{bn.value="list",Gt.value=null,h(i).clearFileDiff()}),onClose:h(kn)},null,8,["mode","changes","git-info","file-diff","full-texts","empty-file","selected-diff-path","file-diff-loading","onOpen","onClose"])):_.value==="file"?(b(),de(KRe,{key:4,file:h(N),loading:h(D),error:h(T),line:h(E)?.line,"download-url":h($),closable:"","external-actions":h(O),"open-file":h(P),onClose:h(R),onOpenExternal:h(j),onReveal:h(z)},null,8,["file","loading","error","line","download-url","external-actions","open-file","onClose","onOpenExternal","onReveal"])):_.value==="turn-diff"&&h(je)?(b(),de(HOe,{key:5,change:h(je),cwd:h(i).status.value.cwd,closable:"",onClose:h(Ue),onOpenFile:Ie[58]||(Ie[58]=Ve=>h(P)({path:Ve}))},null,8,["change","cwd","onClose"])):te("",!0)],10,YGe)):te("",!0),V(ZGe,{class:"internal-build-fab"}),As.value?(b(),de(sPe,{key:6,models:h(i).models.value,current:h(i).status.value.modelId,"starred-ids":h(i).starredModelIds.value,loading:zi.value,unavailable:Hs.value,onSelect:Ie[59]||(Ie[59]=Ve=>On(Ve)),onToggleStar:Ie[60]||(Ie[60]=Ve=>h(i).toggleStarModel(Ve)),onClose:Ie[61]||(Ie[61]=Ve=>As.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):te("",!0),Bn.value?(b(),de(cUe,{key:7,"color-scheme":h(i).colorScheme.value,"font-scale":h(i).fontScale.value,"managed-provider-status":h(i).managedProviderStatus.value,"managed-user-info":h(i).managedUserInfo.value,"on-fetch-usage":h(i).getUsage,notify:h(i).notifyEnabled.value,"notify-permission":h(i).notifyPermission.value,"notify-sound":h(i).notifySound.value,config:h(i).config.value,models:h(i).models.value,"config-saving":wo.value,"server-version":h(i).serverVersion.value,backend:h(i).backend.value,"experimental-flags":h(i).experimentalFlags.value,"initial-tab":Ln.value,onSetColorScheme:Ie[62]||(Ie[62]=Ve=>h(i).setColorScheme(Ve)),onSetFontScale:Ie[63]||(Ie[63]=Ve=>h(i).setFontScale(Ve)),onSetNotify:Ie[64]||(Ie[64]=Ve=>h(i).setNotifyEnabled(Ve)),onSetNotifySound:Ie[65]||(Ie[65]=Ve=>h(i).setNotifySound(Ve)),onUpdateConfig:Ie[66]||(Ie[66]=Ve=>gi(Ve)),onLogin:Ie[67]||(Ie[67]=()=>{Bn.value=!1,Ti()}),onLogout:ii,onClose:Ie[68]||(Ie[68]=Ve=>{Bn.value=!1,Ln.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),rs.value?(b(),de(YUe,{key:8,status:h(i).status.value,thinking:y.value,"plan-mode":h(i).planMode.value,"swarm-mode":h(i).swarmMode.value,"cost-usd":h(i).sessionCost.value,onClose:Ie[69]||(Ie[69]=Ve=>rs.value=!1)},null,8,["status","thinking","plan-mode","swarm-mode","cost-usd"])):te("",!0),Ci.value?(b(),de($Ue,{key:9,"browse-fs":h(i).browseFs,"get-fs-home":h(i).getFsHome,"default-path":h(i).visibleWorkspace.value?.root??h(i).status.value.cwd,error:Ei.value,onAdd:Ie[70]||(Ie[70]=Ve=>xo(Ve)),onClose:ao},null,8,["browse-fs","get-fs-home","default-path","error"])):te("",!0),V(gs,{name:"gload-fade"},{default:he(()=>[h(i).initialized.value?te("",!0):(b(),de(hGe,{key:0,issue:h(i).connectIssue.value},null,8,["issue"]))]),_:1}),V(iKe,{warnings:h(i).warnings.value,onDismiss:h(i).dismissWarning},null,8,["warnings","onDismiss"]),(b(),de(jr,{to:"body"},[V(gs,{name:"action-toast"},{default:he(()=>[Tn.value?(b(),de(h(aq),{key:Tn.value.key,duration:Tn.value.kind==="export"?Tn.value.state==="running"?6e4:4e3:8e3,"dismiss-token":Tn.value.key,onDismiss:Ns},{default:he(()=>[Tn.value.kind==="archive"?(b(),M(Be,{key:0},[C("button",{type:"button",onClick:ai},B(h(o)("sidebar.archiveToastUndo")),1),qe(" "+B(h(o)("sidebar.archiveToastMid"))+" ",1),C("button",{type:"button",onClick:ts},B(h(o)("sidebar.archiveToastSettings")),1),qe(" "+B(h(o)("sidebar.archiveToastTail")),1)],64)):(b(),M(Be,{key:1},[qe(B(Tn.value.state==="running"?h(o)("commands.export.started"):h(o)("commands.export.done")),1)],64))]),_:1},8,["duration","dismiss-token"])):te("",!0)]),_:1})])),h(l)?(b(),de(WGe,{key:10})):te("",!0),V(OUe),h(a)?(b(),de(zKe,{key:11,modelValue:u.value,"onUpdate:modelValue":Ie[71]||(Ie[71]=Ve=>u.value=Ve),groups:h(i).mobileWorkspaceGroups.value,"active-workspace-id":h(i).activeWorkspaceId.value,"active-id":h(i).activeSessionId.value,"attention-by-session":h(i).attentionBySession.value,"attention-by-workspace":h(i).attentionByWorkspace.value,onSelect:Ie[72]||(Ie[72]=Ve=>h(i).selectSession(Ve)),onCreate:as,onCreateInWorkspace:Ie[73]||(Ie[73]=Ve=>Oo(Ve)),onAddWorkspace:Ie[74]||(Ie[74]=Ve=>Ci.value=!0),onRename:Ie[75]||(Ie[75]=(Ve,on)=>h(i).renameSession(Ve,on)),onArchive:Ie[76]||(Ie[76]=Ve=>Je(Ve)),onDeleteWorkspace:Ie[77]||(Ie[77]=Ve=>Vi(Ve)),onLoadMore:Ie[78]||(Ie[78]=Ve=>void h(i).loadMoreSessions(Ve))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):te("",!0),h(a)?(b(),de(XVe,{key:12,modelValue:c.value,"onUpdate:modelValue":Ie[79]||(Ie[79]=Ve=>c.value=Ve),"initial-view":ls.value,status:h(i).status.value,thinking:h(i).thinking.value,models:h(i).models.value,"plan-mode":h(i).planArmed.value||h(i).planMode.value,"goal-mode":h(i).goalMode.value,"goal-active":Qn.value,"swarm-mode":h(i).swarmMode.value,"color-scheme":h(i).colorScheme.value,"font-scale":h(i).fontScale.value,"managed-provider-status":h(i).managedProviderStatus.value,"managed-user-info":h(i).managedUserInfo.value,"server-version":h(i).serverVersion.value,onPickModel:Ie[80]||(Ie[80]=Ve=>Cs()),onSetThinking:Ie[81]||(Ie[81]=Ve=>h(i).setThinking(Ve)),onTogglePlan:Ie[82]||(Ie[82]=Ve=>h(i).togglePlanMode()),onToggleGoal:Ie[83]||(Ie[83]=Ve=>h(i).toggleGoalMode()),onFocusGoal:os,onToggleSwarm:Ie[84]||(Ie[84]=Ve=>h(i).toggleSwarmMode()),onSetPermission:Ie[85]||(Ie[85]=Ve=>h(i).setPermission(Ve)),onSetColorScheme:Ie[86]||(Ie[86]=Ve=>h(i).setColorScheme(Ve)),onSetFontScale:Ie[87]||(Ie[87]=Ve=>h(i).setFontScale(Ve)),onLogin:Ie[88]||(Ie[88]=()=>{c.value=!1,Ti()}),onLogout:ii},null,8,["modelValue","initial-view","status","thinking","models","plan-mode","goal-mode","goal-active","swarm-mode","color-scheme","font-scale","managed-provider-status","managed-user-info","server-version"])):te("",!0)],10,QGe),h(i).initialized.value&&w.value?(b(),de(aGe,{key:1,"auth-ready":h(i).managedProviderStatus.value==="authenticated","on-start-o-auth-login":an,"on-poll-o-auth-login":Zi,"on-cancel-o-auth-login":Ri,onComplete:k,onLoginSuccess:Ro,onAddProvider:A},null,8,["auth-ready"])):te("",!0),Tt.value?(b(),de(MPe,{key:2,"on-start-o-auth-login":an,"on-poll-o-auth-login":Zi,"on-cancel-o-auth-login":Ri,onSuccess:Vl,onClose:Ie[89]||(Ie[89]=Ve=>Tt.value=!1)})):te("",!0),q.value?(b(),de(bk,{key:3,media:q.value,"origin-img":W.value,onClose:Ie[90]||(Ie[90]=Ve=>{q.value=null,W.value=null})},null,8,["media","origin-img"])):te("",!0)]))}}),XGe=vt(JGe,[["__scopeId","data-v-26193eae"]]);bke();const zv=hm(XGe).use(jn),eQe={t:(e,t)=>jn.global.t(e,t)};zv.provide(NE,eQe);zv.provide(BE,e=>Pbe(e)?.component);zv.provide(bee,Fa());zv.mount("#app");if(Hf){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{eR as $,dI as A,WR as B,hs as C,QQe as D,EM as E,Be as F,Tu as G,qe as H,V as I,wR as J,AQe as K,sl as L,nt as M,kP as N,_Qe as O,SQe as P,EQe as Q,Zg as R,lf as S,jr as T,MQe as U,s5 as V,xQe as W,JQe as X,IQe as Y,UQe as Z,tQe as _,sI as a,Ss as a$,ys as a0,O2 as a1,aQe as a2,V8 as a3,$I as a4,dn as a5,zf as a6,pQe as a7,tYe as a8,vQe as a9,uI as aA,sO as aB,cO as aC,gn as aD,uO as aE,aO as aF,Df as aG,lO as aH,Cn as aI,gp as aJ,IR as aK,b as aL,vP as aM,fQe as aN,Pn as aO,VM as aP,dQe as aQ,Jg as aR,Es as aS,S4 as aT,G as aU,OQe as aV,$P as aW,yt as aX,En as aY,fO as aZ,CQe as a_,kQe as aa,bQe as ab,yQe as ac,jQe as ad,nYe as ae,un as af,ZO as ag,q2 as ah,du as ai,_a as aj,ss as ak,PQe as al,mr as am,bu as an,wt as ao,NQe as ap,FQe as aq,Jn as ar,At as as,XO as at,$e as au,Gz as av,Vt as aw,iO as ax,rO as ay,Gn as az,cQe as b,a0e as b$,ZQe as b0,Dh as b1,om as b2,KQe as b3,yu as b4,UM as b5,iQe as b6,gl as b7,$R as b8,VQe as b9,Ao as bA,is as bB,GO as bC,WQe as bD,Ge as bE,M4 as bF,gQe as bG,zR as bH,$Qe as bI,he as bJ,TQe as bK,Nn as bL,Hr as bM,HQe as bN,It as bO,hQe as bP,ri as bQ,Ji as bR,lYe as bS,aYe as bT,pB as bU,uYe as bV,Mpe as bW,hB as bX,s8 as bY,hYe as bZ,d0e as b_,nQe as ba,B as bb,pg as bc,wQe as bd,Vn as be,oQe as bf,sQe as bg,gg as bh,RQe as bi,kR as bj,h as bk,Rf as bl,eYe as bm,YQe as bn,CP as bo,qR as bp,DQe as bq,DR as br,XQe as bs,LQe as bt,mQe as bu,iI as bv,fm as bw,TP as bx,YI as by,H4 as bz,qQe as c,Bb as c0,Nb as c1,Fb as c2,gYe as c3,Gm as c4,Yd as c5,Vm as c6,s0e as c7,o0e as c8,mYe as c9,gIe as cA,dl as cB,Ii as cC,vt as cD,pYe as ca,sYe as cb,vYe as cc,wv as cd,Go as ce,A0e as cf,k0e as cg,kpe as ch,rYe as ci,mpe as cj,vpe as ck,oYe as cl,$b as cm,C0e as cn,I_ as co,a_ as cp,Epe as cq,Zm as cr,Km as cs,cYe as ct,fYe as cu,iYe as cv,dYe as cw,Ce as cx,yYe as cy,BD as cz,zQe as d,fu as e,rQe as f,gs as g,GI as h,lQe as i,uQe as j,Pr as k,fp as l,Ts as m,$2 as n,Sa as o,GQe as p,F as q,hm as r,de as s,te as t,M as u,C as v,BO as w,BQe as x,FO as y,DP as z}; diff --git a/apps/kimi-code/dist-web/assets/index-Bpfqls0z.js b/apps/kimi-code/dist-web/assets/index-Cj2NmNUG.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index-Bpfqls0z.js rename to apps/kimi-code/dist-web/assets/index-Cj2NmNUG.js index 71ae55208..45de3cbc3 100644 --- a/apps/kimi-code/dist-web/assets/index-Bpfqls0z.js +++ b/apps/kimi-code/dist-web/assets/index-Cj2NmNUG.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D7acQhzk.js","assets/index-CbkQVtd0.js","assets/index-CgXirkUy.js","assets/index-BkulrdXm.css"])))=>i.map(i=>d[i]); -import{bR as Q}from"./index-CgXirkUy.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-D7acQhzk.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t<e.length;t++)e.charCodeAt(t)===10&&i++;return i}function de(e){return new K(e)}var G=class{options;state="idle";generation=0;original="";modified="";container;shell;surface;finalizedSurface;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e,i=this.original,t=this.modified){if(this.state==="disposed")throw new Error("Cannot mount a disposed diff stream. Create a new controller instead.");++this.generation,this.original=i,this.modified=t,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.setState("mounting"),this.container=e;const{shell:n,surface:r}=$(e,this.options.maxHeight);this.shell=n,this.surface=r,this.renderPre(),this.setState("streaming")}update(e,i){if(this.state==="disposed")throw new Error("Cannot update a disposed diff stream");return this.original=e,this.modified=i,this.finalizedSurface?this.finalizedSurface.updateDiff(this.asFile(e),this.asFile(i)):(this.renderPre(),this.emitRender(),Promise.resolve())}finalize(e){if(this.state==="finalized")return Promise.resolve(this.finalizedSurface);if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-wuJEF9t-.js","assets/index-DcbRorFd.js","assets/index-_5lXYMaO.js","assets/index-C_ObXpF5.css"])))=>i.map(i=>d[i]); +import{bR as Q}from"./index-_5lXYMaO.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-wuJEF9t-.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t<e.length;t++)e.charCodeAt(t)===10&&i++;return i}function de(e){return new K(e)}var G=class{options;state="idle";generation=0;original="";modified="";container;shell;surface;finalizedSurface;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e,i=this.original,t=this.modified){if(this.state==="disposed")throw new Error("Cannot mount a disposed diff stream. Create a new controller instead.");++this.generation,this.original=i,this.modified=t,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.setState("mounting"),this.container=e;const{shell:n,surface:r}=$(e,this.options.maxHeight);this.shell=n,this.surface=r,this.renderPre(),this.setState("streaming")}update(e,i){if(this.state==="disposed")throw new Error("Cannot update a disposed diff stream");return this.original=e,this.modified=i,this.finalizedSurface?this.finalizedSurface.updateDiff(this.asFile(e),this.asFile(i)):(this.renderPre(),this.emitRender(),Promise.resolve())}finalize(e){if(this.state==="finalized")return Promise.resolve(this.finalizedSurface);if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` `),n=i.split(` `);let r=0;for(;r<t.length&&r<n.length&&t[r]===n[r];)r++;let o=0;for(;o<t.length-r&&o<n.length-r&&t[t.length-o-1]===n[n.length-o-1];)o++;return[...t.slice(0,r).map(a=>` ${a}`),...t.slice(r,t.length-o).map(a=>`- ${a}`),...n.slice(r,n.length-o).map(a=>`+ ${a}`),...t.slice(t.length-o).map(a=>` ${a}`)].join(` `)}function he(e){return new G(e)}function ue(e={}){let i,t,n,r,o,a="text",d="",p="",h,c=0,g="system",S=U(e),T=q(e);const L={disableLineNumbers:e.lineNumbers===!1,overflow:e.wordWrap==="on"?"wrap":"scroll",enableLineSelection:e.enableLineSelection},M=()=>({...L,theme:S,themeType:g});async function H(s,l,u){k();const w=c;if(N(s,e),h=s,a=R(u),_(l))return V(s,l,a);if(e.stream===!1)return O(s,l,a);const f=new K({...M(),...F(e),fileName:`code.${a}`,language:a,maxHeight:e.MAX_HEIGHT,autoScroll:e.autoScrollOnUpdate===!1?"never":"near-bottom",autoScrollThresholdPx:e.autoScrollThresholdPx,workerManager:e.workerManager});if(i=f,f.append(l),await f.mount(s),w!==c||i!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>f.getText(),s,()=>f.getFinalizedSurface(),m=>f.onDidRender(m)),r}async function I(s,l,u,w){k();const f=c;N(s,e),h=s,a=R(w),d=l,p=u;let m,v;if(e.stream===!1){if(m=x({kind:"diff",oldFile:y(l),newFile:y(u),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),...F(e)}}),n=m,await m.mount(s),f!==c||n!==m||h!==s)throw m.dispose(),new Error("Editor creation was cancelled");e.onController?.(m)}else{if(v=new G({...M(),...F(e),fileName:`code.${a}`,language:a,diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),maxHeight:e.MAX_HEIGHT,wrap:e.wordWrap==="on",workerManager:e.workerManager}),t=v,await v.mount(s,l,u),f!==c||t!==v||h!==s)throw v.dispose(),new Error("Editor creation was cancelled");e.onController?.(v)}return o=oe(()=>d,()=>p,s,()=>m??v?.getFinalizedSurface()),o}async function X(s,l=a){const u=R(l);if(_(s)){n?.getInput().kind==="merge-conflict"?(a=u,await n.updateMergeConflict(y(s),e.lineAnnotations)):h&&await V(h,s,u);return}if(e.stream===!1){n?.getInput().kind==="file"?(a=u,await n.updateFile(y(s),e.lineAnnotations)):h&&await O(h,s,u);return}if(!i){h&&await H(h,s,u);return}if(i.getState()==="finalized"){s!==i.getText()&&await i.reset(s);return}if(u!==a){a=u,await i.setLanguage(u),s!==i.getText()&&await i.reset(s);return}const w=i.getText();s.startsWith(w)?i.append(s.slice(w.length)):await i.reset(s)}async function P(s,l,u=a){if(d=s,p=l,a=R(u),t){await t.update(s,l);return}if(!n){h&&await I(h,s,l,u);return}await n.updateDiff(y(s),y(l))}function k(){c++,i?.dispose(),t?.dispose(),t||n?.dispose(),i=void 0,t=void 0,n=void 0,r=void 0,o=void 0,h=void 0}async function O(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"file",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}async function V(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"merge-conflict",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}function _(s){return e.mergeConflict===!1?!1:/^<<<<<<< .+$/m.test(s)&&/^=======$/m.test(s)&&/^>>>>>>> .+$/m.test(s)}async function J(s){if(s){if(typeof s=="string"){const l=e.themes;if(l?.[0]===s){await W(),g="dark",i?.setThemeType("dark"),t?.setThemeType("dark"),n?.setThemeType("dark");return}if(l?.[1]===s){await W(),g="light",i?.setThemeType("light"),t?.setThemeType("light"),n?.setThemeType("light");return}}T=void 0,S=s,await j(s)}}async function W(){const s=q(e);!s||s===T||(T=s,S=U(e),await j(S))}async function j(s){await i?.setTheme(s),await t?.setTheme(s),await n?.setTheme(s)}function y(s){return E(`code.${a||"txt"}`,s,a)}return{runtimeKind:"stream-diffs",createEditor:H,createDiffEditor:I,updateCode:X,appendCode(s){i?.append(s)},async finalizeCode(){if(!i||i.getState()==="finalized")return i?.getFinalizedSurface();const s=F(e);return delete s.lineAnnotations,await i.finalize({view:"file",...s,theme:S,themeType:g,annotations:e.lineAnnotations,workerManager:e.workerManager}),i.getFinalizedSurface()},async finalizeDiff(){return t&&(n=await t.finalize(e.lineAnnotations)),n},updateDiff:P,updateOriginal(s,l=a){return P(s,p,l)},updateModified(s,l=a){return P(d,s,l)},appendOriginal(s,l=a){return P(d+s,p,l)},appendModified(s,l=a){return P(d,p+s,l)},cleanupEditor:k,safeClean:k,setTheme:J,async setLanguage(s){if(a=R(s),await i?.setLanguage(a),await t?.setLanguage(a),n&&!t){const l=n.getInput();l.kind==="file"||l.kind==="merge-conflict"?await n.update({...l,file:{...l.file,lang:a}}):l.kind==="diff"&&"oldFile"in l&&await n.update({...l,oldFile:{...l.oldFile,lang:a},newFile:{...l.newFile,lang:a}})}},getCurrentTheme:()=>S,getEditor:()=>le,getEditorView:()=>r??null,getDiffEditorView:()=>o??null,getDiffModels:()=>({original:D(()=>d),modified:D(()=>n?.getResolvedFile()?.contents??t?.getModified()??p)}),getCode:()=>{const s=n?.getInput();return s?.kind==="diff"||s?.kind==="patch"?{original:d,modified:n?.getResolvedFile()?.contents??p}:s?.kind==="file"||s?.kind==="merge-conflict"?s.file.contents:t?{original:t.getOriginal(),modified:t.getModified()}:i?.getText()??null},refreshDiffPresentation:()=>n?.update(n.getInput()),whenVisualReady:async()=>{const s=h,l=c,u=n??i?.getFinalizedSurface()??t?.getFinalizedSurface();return!u||!await u.whenVisualReady()?!1:ne(s,()=>l===c&&s===h&&u===(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()),()=>se(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()))}}}async function ne(e,i,t){if(!e||typeof window>"u")return!1;let n="",r,o=0;for(let a=0;a<120;a+=1){if(!i())return!1;const d=e.querySelector(".stream-diffs-shell"),p=d?.querySelector("diffs-container")?.shadowRoot?.querySelector("pre"),h=d?.getBoundingClientRect(),c=p?.textContent??"";if(h&&h.width>0&&h.height>0&&p&&t()){const g=`${Math.round(h.width)}:${Math.round(h.height)}:${p.scrollWidth}:${p.scrollHeight}:${c.length}`;if(o=p===r&&g===n?o+1:1,r=p,n=g,o>=2)return!0}else n="",r=void 0,o=0;await ae()}return!1}function se(e){if(!e)return!0;const i=e.getNativeInstance(),t=i?.fileRenderer??i?.hunksRenderer;if(!t)return!0;const n=t.renderCache;if(!n?.result)return!1;if(n.highlighted===!0)return!0;const r=e.getInput();if(R(r.kind==="file"||r.kind==="merge-conflict"?r.file.lang:"oldFile"in r?r.oldFile.lang??r.newFile.lang:e.getDiff()?.lang)==="text")return!0;const o=Number(t.getTokenizeMaxLength?.()??1e5);if(r.kind==="file"||r.kind==="merge-conflict")return re(r.file.contents)>o;const a=e.getDiff();return!!a&&Math.max(a.additionLines.length,a.deletionLines.length)>o}function R(e){return!e||/^(?:text|txt|plain|plaintext)$/i.test(e)?"text":e}function re(e){if(!e)return 0;let i=1;for(let t=0;t<e.length;t+=1)e.charCodeAt(t)===10&&(i+=1);return i}function ae(){return new Promise(e=>{let i=!1;const t=()=>{i||(i=!0,window.clearTimeout(r),window.cancelAnimationFrame(n),e())},n=window.requestAnimationFrame(t),r=window.setTimeout(t,50)})}function U(e){return e.themes?.length&&typeof e.themes[0]=="string"&&typeof e.themes[1]=="string"?{dark:e.themes[0],light:e.themes[1]}:e.theme??void 0}function q(e){if(!(typeof e.themes?.[0]!="string"||typeof e.themes?.[1]!="string"))return`${e.themes[0]} diff --git a/apps/kimi-code/dist-web/assets/index-CbkQVtd0.js b/apps/kimi-code/dist-web/assets/index-DcbRorFd.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index-CbkQVtd0.js rename to apps/kimi-code/dist-web/assets/index-DcbRorFd.js index 4cf5a072b..4190eba86 100644 --- a/apps/kimi-code/dist-web/assets/index-CbkQVtd0.js +++ b/apps/kimi-code/dist-web/assets/index-DcbRorFd.js @@ -1,5 +1,5 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-UfJy6YNI.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-Dm6A9KJ5.js","assets/ruby-DyJCeAvU.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-DbPARsA_.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-D7OTSIA_.js","assets/r-Dspwwk_N.js","assets/just-CUsbIsdP.js","assets/perl-B9cMNwum.js","assets/latex-CaSxy8MP.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-Csjmro_R.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/csharp-DSvCPggb.js","assets/rst-CpCqk9r5.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-D351s5mN.js","assets/twig-CW1WmMYd.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]); -import{bR as c}from"./index-CgXirkUy.js";var Ft=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,to=Object.getOwnPropertyNames,no=Object.prototype.hasOwnProperty,an=(e,t)=>{let n={};for(var r in e)Ft(n,r,{get:e[r],enumerable:!0});return Ft(n,Symbol.toStringTag,{value:"Module"}),n},ro=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=to(t),o=0,s=i.length,a;o<s;o++)a=i[o],!no.call(e,a)&&a!==n&&Ft(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=eo(t,a))||r.enumerable});return e},Sr=(e,t,n)=>(ro(e,t,"default"),n);const Ne=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>c(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>c(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>c(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>c(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>c(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>c(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>c(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],at=Object.fromEntries(Ne.map(e=>[e.id,e.import])),lt=Object.fromEntries(Ne.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ut={...at,...lt},ct=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],dt=Object.fromEntries(ct.map(e=>[e.id,e.import]));var ln=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function io(){return 2147483648}function oo(){return typeof performance<"u"?performance.now():Date.now()}const so=(e,t)=>e+(t-e%t)%t;async function ao(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=io();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const y=Math.min(E,so(Math.max(h,g),65536));if(s(y))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let y="";for(;m<g;){let w=h[m++];if(!(w&128)){y+=String.fromCharCode(w);continue}const A=h[m++]&63;if((w&224)===192){y+=String.fromCharCode((w&31)<<6|A);continue}const k=h[m++]&63;if((w&240)===224?w=(w&15)<<12|A<<6|k:w=(w&7)<<18|A<<12|k<<6|h[m++]&63,w<65536)y+=String.fromCharCode(w);else{const I=w-65536;y+=String.fromCharCode(55296|I>>10,56320|I&1023)}}return y}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:oo,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var lo=Object.defineProperty,uo=(e,t,n)=>t in e?lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>uo(e,typeof t!="symbol"?t+"":t,n);let D=null;function co(e){throw new ln(e.UTF8ToString(e.getLastOnigError()))}class pt{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=pt._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u<n;u++){const p=t.charCodeAt(u);let d=p,f=!1;if(p>=55296&&p<=56319&&u+1<n){const h=t.charCodeAt(u+1);h>=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const o=t.charCodeAt(r);let s=o,a=!1;if(o>=55296&&o<=56319&&r+1<i){const l=t.charCodeAt(r+1);l>=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const ht=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new ln("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new pt(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(ht,"LAST_ID",0);P(ht,"_sharedPtr",0);P(ht,"_sharedPtrInUse",!1);let Lr=ht;class po{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new ln("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a<l;a++){const u=new pt(t[a]);n[a]=u.createString(D),r[a]=u.utf8Length}const i=D.omalloc(4*t.length);D.HEAPU32.set(n,i/4);const o=D.omalloc(4*t.length);D.HEAPU32.set(r,o/4);const s=D.createOnigScanner(i,o,t.length);for(let a=0,l=t.length;a<l;a++)D.ofree(n[a]);D.ofree(o),D.ofree(i),s===0&&co(D),this._onigBinding=D,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new Lr(t);const o=this._findNextMatchSync(t,n,!1,i);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(s===0)return null;const a=o.HEAPU32;let l=s/4;const u=a[l++],p=a[l++],d=[];for(let f=0;f<p;f++){const h=t.convertUtf8OffsetToUtf16(a[l++]),m=t.convertUtf8OffsetToUtf16(a[l++]);d[f]={start:h,end:m,length:m-h}}return{index:u,captureIndices:d}}}function ho(e){return typeof e.instantiator=="function"}function fo(e){return typeof e.default=="function"}function mo(e){return typeof e.data<"u"}function go(e){return typeof Response<"u"&&e instanceof Response}function _o(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let Fe;function ft(e){if(Fe)return Fe;async function t(){D=await ao(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),ho(r)?r=await r.instantiator(n):fo(r)?r=await r.default(n):(mo(r)&&(r=r.data),go(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await yo(r)(n):r=await Eo(r)(n):_o(r)?r=await Lt(r)(n):r instanceof WebAssembly.Module?r=await Lt(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Lt(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Fe=t(),Fe}function Lt(e){return t=>WebAssembly.instantiate(e,t)}function yo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Eo(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let Rr;function bo(e){Rr=e}function wo(){return Rr}async function un(e){return e&&await ft(e),{createScanner(t){return new po(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Lr(t)}}}const vo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:un,getDefaultWasmLoader:wo,loadWasm:ft,setDefaultWasmLoader:bo},Symbol.toStringTag,{value:"Module"}));var Ir=an({});Sr(Ir,vo);var L=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Co(e){return cn(e)}function cn(e){return Array.isArray(e)?Ao(e):e instanceof RegExp?e:typeof e=="object"?ko(e):e}function Ao(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=cn(e[n]);return t}function ko(e){let t={};for(let n in e)t[n]=cn(e[n]);return t}function Tr(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Pr(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Pr(e.substring(0,e.length-1)):e.substr(~t+1)}var Rt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,je=class{static hasCaptures(e){return e===null?!1:(Rt.lastIndex=0,Rt.test(e))}static replaceCaptures(e,t,n){return e.replace(Rt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function Or(e,t){return e<t?-1:e>t?1:0}function xr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let o=Or(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function $n(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Dr(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Nr=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Ye=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ro(e),t)}static createFromParsedTheme(e,t){return To(e,t)}_cachedMatchRoot=new Nr(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>So(e.parent,i.parentScopes));return r?new Vr(r.fontStyle,r.foreground,r.background):null}},It=class Ke{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Ke(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Ke(n,t[r]);return n}push(t){return new Ke(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function So(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Lo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Lo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Vr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ro(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i<o;i++){let s=t[i];if(!s.settings)continue;let a;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(s.scope)?a=s.scope:a=[""];let l=-1;if(typeof s.settings.fontStyle=="string"){l=0;let d=s.settings.fontStyle.split(" ");for(let f=0,h=d.length;f<h;f++)switch(d[f]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof s.settings.foreground=="string"&&$n(s.settings.foreground)&&(u=s.settings.foreground);let p=null;typeof s.settings.background=="string"&&$n(s.settings.background)&&(p=s.settings.background);for(let d=0,f=a.length;d<f;d++){let m=a[d].trim().split(" "),E=m[m.length-1],b=null;m.length>1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new Io(E,b,i,l,u,p)}}return n}var Io=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function To(e,t){e.sort((l,u)=>{let p=Or(l.scope,u.scope);return p!==0||(p=xr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Po(t),s=new Vr(n,o.getId(r),o.getId(i)),a=new xo(new jt(0,null,-1,0,0),[]);for(let l=0,u=e.length;l<u;l++){let p=e[l];a.insert(0,p.scope,p.parentScopes,p.fontStyle,o.getId(p.foreground),o.getId(p.background))}return new Ye(o,s,a)}var Po=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Oo=Object.freeze([]),jt=class $r{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,i,o){this.scopeDepth=t,this.parentScopes=n||Oo,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new $r(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},xo=class Ht{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Ht._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Ht(this._mainRule.clone(),jt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s<a;s++){let l=this._rulesWithParentScopes[s];if(xr(l.parentScopes,n)===0){l.acceptOverwrite(t,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new jt(t,n,r,i,o))}},le=class U{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=U.getLanguageId(t),r=U.getTokenType(t),i=U.getFontStyle(t),o=U.getForeground(t),s=U.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ze(e,t){const n=[],r=Do(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(Mn(i)){const l=[];do l.push(i),i=r.next();while(Mn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function Mn(e){return!!e&&!!e.match(/[\w\.:]+/)}function Do(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Mr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Vo=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},$o=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Vo;for(const n of e)Mo(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Mo(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Qe({baseGrammar:o,selfGrammar:i},r):Wt(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function Wt(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];et([r],t,n)}}function Qe(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&et(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&et(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function et(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Tr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&et(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Gr(o);switch(s.kind){case 0:Qe({...t,selfGrammar:t.baseGrammar},n);break;case 1:Qe(t,n);break;case 2:Wt(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?Wt(s.ruleName,l,n):Qe(l,n)}else s.kind===4?n.add(new No(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Go=class{kind=0},Bo=class{kind=1},Uo=class{constructor(e){this.ruleName=e}kind=2},Fo=class{constructor(e){this.scopeName=e}kind=3},jo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Gr(e){if(e==="$base")return new Go;if(e==="$self")return new Bo;const t=e.indexOf("#");if(t===-1)return new Fo(e);if(t===0)return new Uo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new jo(n,r)}}var Ho=/\\(\d+)/,Gn=/\\(\d+)/g,Wo=-1,Br=-2;var Ve=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=je.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=je.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Pr(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:je.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:je.replaceCaptures(this._contentName,e,t)}},zo=class extends Ve{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},qo=class extends Ve{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Bn=class extends Ve{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},zt=class extends Ve{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},tt=class extends Ve{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Br),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Ur=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new zo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new qo(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Tr({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Bn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new tt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new zt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;o<s;o++){const a=t[o];let l=-1;if(a.include){const u=Gr(a.include);switch(u.kind){case 0:case 1:l=V.getCompiledRuleId(r[a.include],n,r);break;case 2:let p=r[u.ruleName];p&&(l=V.getCompiledRuleId(p,n,r));break;case 3:case 4:const d=u.scopeName,f=u.kind===4?u.ruleName:null,h=n.getExternalGrammar(d,r);if(h)if(f){let m=h.repository[f];m&&(l=V.getCompiledRuleId(m,n,h.repository))}else l=V.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else l=V.getCompiledRuleId(a,n,r);if(l!==-1){const u=n.getRule(l);let p=!1;if((u instanceof Bn||u instanceof zt||u instanceof tt)&&u.hasMissingPatterns&&u.patterns.length===0&&(p=!0),p)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Le=class Fr{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],s=!1;for(let a=0;a<r;a++)if(t.charAt(a)==="\\"&&a+1<r){const u=t.charAt(a+1);u==="z"?(o.push(t.substring(i,a)),o.push("$(?!\\n)(?<!\\n)"),i=a+2):(u==="A"||u==="G")&&(s=!0),a++}this.hasAnchor=s,i===0?this.source=t:(o.push(t.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Ho.test(this.source):this.hasBackReferences=!1}clone(){return new Fr(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return Gn.lastIndex=0,this.source.replace(Gn,(i,o)=>Dr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;o<s;o++)a=this.source.charAt(o),t[o]=a,n[o]=a,r[o]=a,i[o]=a,a==="\\"&&o+1<s&&(l=this.source.charAt(o+1),l==="A"?(t[o+1]="￿",n[o+1]="￿",r[o+1]="A",i[o+1]="A"):l==="G"?(t[o+1]="￿",n[o+1]="G",r[o+1]="￿",i[o+1]="G"):(t[o+1]=l,n[o+1]=l,r[o+1]=l,i[o+1]=l),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Un(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new Un(e,r,this._items.map(i=>i.ruleId))}},Un=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(` +import{bR as c}from"./index-_5lXYMaO.js";var Ft=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,to=Object.getOwnPropertyNames,no=Object.prototype.hasOwnProperty,an=(e,t)=>{let n={};for(var r in e)Ft(n,r,{get:e[r],enumerable:!0});return Ft(n,Symbol.toStringTag,{value:"Module"}),n},ro=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=to(t),o=0,s=i.length,a;o<s;o++)a=i[o],!no.call(e,a)&&a!==n&&Ft(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=eo(t,a))||r.enumerable});return e},Sr=(e,t,n)=>(ro(e,t,"default"),n);const Ne=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>c(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>c(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>c(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>c(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>c(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>c(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>c(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],at=Object.fromEntries(Ne.map(e=>[e.id,e.import])),lt=Object.fromEntries(Ne.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ut={...at,...lt},ct=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],dt=Object.fromEntries(ct.map(e=>[e.id,e.import]));var ln=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function io(){return 2147483648}function oo(){return typeof performance<"u"?performance.now():Date.now()}const so=(e,t)=>e+(t-e%t)%t;async function ao(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=io();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const y=Math.min(E,so(Math.max(h,g),65536));if(s(y))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let y="";for(;m<g;){let w=h[m++];if(!(w&128)){y+=String.fromCharCode(w);continue}const A=h[m++]&63;if((w&224)===192){y+=String.fromCharCode((w&31)<<6|A);continue}const k=h[m++]&63;if((w&240)===224?w=(w&15)<<12|A<<6|k:w=(w&7)<<18|A<<12|k<<6|h[m++]&63,w<65536)y+=String.fromCharCode(w);else{const I=w-65536;y+=String.fromCharCode(55296|I>>10,56320|I&1023)}}return y}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:oo,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var lo=Object.defineProperty,uo=(e,t,n)=>t in e?lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>uo(e,typeof t!="symbol"?t+"":t,n);let D=null;function co(e){throw new ln(e.UTF8ToString(e.getLastOnigError()))}class pt{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=pt._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u<n;u++){const p=t.charCodeAt(u);let d=p,f=!1;if(p>=55296&&p<=56319&&u+1<n){const h=t.charCodeAt(u+1);h>=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const o=t.charCodeAt(r);let s=o,a=!1;if(o>=55296&&o<=56319&&r+1<i){const l=t.charCodeAt(r+1);l>=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const ht=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new ln("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new pt(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(ht,"LAST_ID",0);P(ht,"_sharedPtr",0);P(ht,"_sharedPtrInUse",!1);let Lr=ht;class po{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new ln("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a<l;a++){const u=new pt(t[a]);n[a]=u.createString(D),r[a]=u.utf8Length}const i=D.omalloc(4*t.length);D.HEAPU32.set(n,i/4);const o=D.omalloc(4*t.length);D.HEAPU32.set(r,o/4);const s=D.createOnigScanner(i,o,t.length);for(let a=0,l=t.length;a<l;a++)D.ofree(n[a]);D.ofree(o),D.ofree(i),s===0&&co(D),this._onigBinding=D,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new Lr(t);const o=this._findNextMatchSync(t,n,!1,i);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(s===0)return null;const a=o.HEAPU32;let l=s/4;const u=a[l++],p=a[l++],d=[];for(let f=0;f<p;f++){const h=t.convertUtf8OffsetToUtf16(a[l++]),m=t.convertUtf8OffsetToUtf16(a[l++]);d[f]={start:h,end:m,length:m-h}}return{index:u,captureIndices:d}}}function ho(e){return typeof e.instantiator=="function"}function fo(e){return typeof e.default=="function"}function mo(e){return typeof e.data<"u"}function go(e){return typeof Response<"u"&&e instanceof Response}function _o(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let Fe;function ft(e){if(Fe)return Fe;async function t(){D=await ao(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),ho(r)?r=await r.instantiator(n):fo(r)?r=await r.default(n):(mo(r)&&(r=r.data),go(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await yo(r)(n):r=await Eo(r)(n):_o(r)?r=await Lt(r)(n):r instanceof WebAssembly.Module?r=await Lt(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Lt(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Fe=t(),Fe}function Lt(e){return t=>WebAssembly.instantiate(e,t)}function yo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Eo(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let Rr;function bo(e){Rr=e}function wo(){return Rr}async function un(e){return e&&await ft(e),{createScanner(t){return new po(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Lr(t)}}}const vo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:un,getDefaultWasmLoader:wo,loadWasm:ft,setDefaultWasmLoader:bo},Symbol.toStringTag,{value:"Module"}));var Ir=an({});Sr(Ir,vo);var L=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Co(e){return cn(e)}function cn(e){return Array.isArray(e)?Ao(e):e instanceof RegExp?e:typeof e=="object"?ko(e):e}function Ao(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=cn(e[n]);return t}function ko(e){let t={};for(let n in e)t[n]=cn(e[n]);return t}function Tr(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Pr(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Pr(e.substring(0,e.length-1)):e.substr(~t+1)}var Rt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,je=class{static hasCaptures(e){return e===null?!1:(Rt.lastIndex=0,Rt.test(e))}static replaceCaptures(e,t,n){return e.replace(Rt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function Or(e,t){return e<t?-1:e>t?1:0}function xr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let o=Or(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function $n(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Dr(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Nr=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Ye=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ro(e),t)}static createFromParsedTheme(e,t){return To(e,t)}_cachedMatchRoot=new Nr(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>So(e.parent,i.parentScopes));return r?new Vr(r.fontStyle,r.foreground,r.background):null}},It=class Ke{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Ke(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Ke(n,t[r]);return n}push(t){return new Ke(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function So(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Lo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Lo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Vr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ro(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i<o;i++){let s=t[i];if(!s.settings)continue;let a;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(s.scope)?a=s.scope:a=[""];let l=-1;if(typeof s.settings.fontStyle=="string"){l=0;let d=s.settings.fontStyle.split(" ");for(let f=0,h=d.length;f<h;f++)switch(d[f]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof s.settings.foreground=="string"&&$n(s.settings.foreground)&&(u=s.settings.foreground);let p=null;typeof s.settings.background=="string"&&$n(s.settings.background)&&(p=s.settings.background);for(let d=0,f=a.length;d<f;d++){let m=a[d].trim().split(" "),E=m[m.length-1],b=null;m.length>1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new Io(E,b,i,l,u,p)}}return n}var Io=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function To(e,t){e.sort((l,u)=>{let p=Or(l.scope,u.scope);return p!==0||(p=xr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Po(t),s=new Vr(n,o.getId(r),o.getId(i)),a=new xo(new jt(0,null,-1,0,0),[]);for(let l=0,u=e.length;l<u;l++){let p=e[l];a.insert(0,p.scope,p.parentScopes,p.fontStyle,o.getId(p.foreground),o.getId(p.background))}return new Ye(o,s,a)}var Po=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Oo=Object.freeze([]),jt=class $r{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,i,o){this.scopeDepth=t,this.parentScopes=n||Oo,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new $r(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},xo=class Ht{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Ht._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Ht(this._mainRule.clone(),jt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s<a;s++){let l=this._rulesWithParentScopes[s];if(xr(l.parentScopes,n)===0){l.acceptOverwrite(t,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new jt(t,n,r,i,o))}},le=class U{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=U.getLanguageId(t),r=U.getTokenType(t),i=U.getFontStyle(t),o=U.getForeground(t),s=U.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ze(e,t){const n=[],r=Do(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(Mn(i)){const l=[];do l.push(i),i=r.next();while(Mn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function Mn(e){return!!e&&!!e.match(/[\w\.:]+/)}function Do(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Mr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Vo=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},$o=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Vo;for(const n of e)Mo(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Mo(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Qe({baseGrammar:o,selfGrammar:i},r):Wt(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function Wt(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];et([r],t,n)}}function Qe(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&et(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&et(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function et(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Tr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&et(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Gr(o);switch(s.kind){case 0:Qe({...t,selfGrammar:t.baseGrammar},n);break;case 1:Qe(t,n);break;case 2:Wt(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?Wt(s.ruleName,l,n):Qe(l,n)}else s.kind===4?n.add(new No(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Go=class{kind=0},Bo=class{kind=1},Uo=class{constructor(e){this.ruleName=e}kind=2},Fo=class{constructor(e){this.scopeName=e}kind=3},jo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Gr(e){if(e==="$base")return new Go;if(e==="$self")return new Bo;const t=e.indexOf("#");if(t===-1)return new Fo(e);if(t===0)return new Uo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new jo(n,r)}}var Ho=/\\(\d+)/,Gn=/\\(\d+)/g,Wo=-1,Br=-2;var Ve=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=je.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=je.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Pr(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:je.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:je.replaceCaptures(this._contentName,e,t)}},zo=class extends Ve{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},qo=class extends Ve{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Bn=class extends Ve{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},zt=class extends Ve{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},tt=class extends Ve{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Br),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Ur=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new zo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new qo(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Tr({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Bn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new tt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new zt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;o<s;o++){const a=t[o];let l=-1;if(a.include){const u=Gr(a.include);switch(u.kind){case 0:case 1:l=V.getCompiledRuleId(r[a.include],n,r);break;case 2:let p=r[u.ruleName];p&&(l=V.getCompiledRuleId(p,n,r));break;case 3:case 4:const d=u.scopeName,f=u.kind===4?u.ruleName:null,h=n.getExternalGrammar(d,r);if(h)if(f){let m=h.repository[f];m&&(l=V.getCompiledRuleId(m,n,h.repository))}else l=V.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else l=V.getCompiledRuleId(a,n,r);if(l!==-1){const u=n.getRule(l);let p=!1;if((u instanceof Bn||u instanceof zt||u instanceof tt)&&u.hasMissingPatterns&&u.patterns.length===0&&(p=!0),p)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Le=class Fr{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],s=!1;for(let a=0;a<r;a++)if(t.charAt(a)==="\\"&&a+1<r){const u=t.charAt(a+1);u==="z"?(o.push(t.substring(i,a)),o.push("$(?!\\n)(?<!\\n)"),i=a+2):(u==="A"||u==="G")&&(s=!0),a++}this.hasAnchor=s,i===0?this.source=t:(o.push(t.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Ho.test(this.source):this.hasBackReferences=!1}clone(){return new Fr(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return Gn.lastIndex=0,this.source.replace(Gn,(i,o)=>Dr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;o<s;o++)a=this.source.charAt(o),t[o]=a,n[o]=a,r[o]=a,i[o]=a,a==="\\"&&o+1<s&&(l=this.source.charAt(o+1),l==="A"?(t[o+1]="￿",n[o+1]="￿",r[o+1]="A",i[o+1]="A"):l==="G"?(t[o+1]="￿",n[o+1]="G",r[o+1]="￿",i[o+1]="G"):(t[o+1]=l,n[o+1]=l,r[o+1]=l,i[o+1]=l),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Un(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new Un(e,r,this._items.map(i=>i.ruleId))}},Un=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(` `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Tt=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Xo=class qt{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Tt(t,8),this._embeddedLanguagesMatcher=new Ko(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?qt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Tt(0,0);_getBasicScopeAttributes=new Nr(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Tt(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(qt.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ko=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Dr(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Fn=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function jr(e,t,n,r,i,o,s,a){const l=t.content.length;let u=!1,p=-1;if(s){const h=Qo(e,t,n,r,i,o);i=h.stack,r=h.linePos,n=h.isFirstLine,p=h.anchorPosition}const d=Date.now();for(;!u;){if(a!==0&&Date.now()-d>a)return new Fn(i,!0);f()}return new Fn(i,!1);function f(){const h=Jo(e,t,n,r,i,p);if(!h){o.produce(i,l),u=!0;return}const m=h.captureIndices,E=h.matchedRuleId,b=m&&m.length>0?m[0].end>r:!1;if(E===Wo){const g=i.getRule(e);o.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ce(e,t,n,i,o,g.endCaptures,m),o.produce(i,m[0].end);const y=i;if(i=i.parent,p=y.getAnchorPos(),!b&&y.getEnterPos()===r){i=y,o.produce(i,l),u=!0;return}}else{const g=e.getRule(E);o.produce(i,m[0].start);const y=i,w=g.getName(t.content,m),A=i.contentNameScopesList.pushAttributed(w,e);if(i=i.push(E,r,p,m[0].end===l,null,A,A),g instanceof zt){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.endHasBackReferences&&(i=i.withEndRule(k.getEndWithResolvedBackReferences(t.content,m))),!b&&y.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(g instanceof tt){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.whileHasBackReferences&&(i=i.withEndRule(k.getWhileWithResolvedBackReferences(t.content,m))),!b&&y.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(Ce(e,t,n,i,o,g.captures,m),o.produce(i,m[0].end),i=i.pop(),!b){i=i.safePop(),o.produce(i,l),u=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function Qo(e,t,n,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const u=l.getRule(e);u instanceof tt&&a.push({rule:u,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:u,findOptions:p}=es(l.rule,e,l.stack.endRule,n,r===s),d=u.findNextMatchSync(t,r,p);if(d){if(d.ruleId!==Br){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(l.stack,d.captureIndices[0].start),Ce(e,t,n,l.stack,o,l.rule.whileCaptures,d.captureIndices),o.produce(l.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function Jo(e,t,n,r,i,o){const s=Yo(e,t,n,r,i,o),a=e.getInjections();if(a.length===0)return s;const l=Zo(a,e,t,n,r,i,o);if(!l)return s;if(!s)return l;const u=s.captureIndices[0].start,p=l.captureIndices[0].start;return p<u||l.priorityMatch&&p===u?l:s}function Yo(e,t,n,r,i,o){const s=i.getRule(e),{ruleScanner:a,findOptions:l}=Hr(s,e,i.endRule,n,r===o),u=a.findNextMatchSync(t,r,l);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function Zo(e,t,n,r,i,o,s){let a=Number.MAX_VALUE,l=null,u,p=0;const d=o.contentNameScopesList.getScopeNames();for(let f=0,h=e.length;f<h;f++){const m=e[f];if(!m.matcher(d))continue;const E=t.getRule(m.ruleId),{ruleScanner:b,findOptions:g}=Hr(E,t,null,r,i===s),y=b.findNextMatchSync(n,i,g);if(!y)continue;const w=y.captureIndices[0].start;if(!(w>=a)&&(a=w,l=y.captureIndices,u=y.ruleId,p=m.priority,a===i))break}return l?{priorityMatch:p===-1,captureIndices:l,matchedRuleId:u}:null}function Hr(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function es(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Ce(e,t,n,r,i,o,s){if(o.length===0)return;const a=t.content,l=Math.min(o.length,s.length),u=[],p=s[0].end;for(let d=0;d<l;d++){const f=o[d];if(f===null)continue;const h=s[d];if(h.length===0)continue;if(h.start>p)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,h.start):i.produce(r,h.start),f.retokenizeCapturedWithRuleId){const E=f.getName(a,s),b=r.contentNameScopesList.pushAttributed(E,e),g=f.getContentName(a,s),y=b.pushAttributed(g,e),w=r.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,b,y),A=e.createOnigString(a.substring(0,h.end));jr(e,A,n&&h.start===0,h.start,w,i,!1,0),Mr(A);continue}const m=f.getName(a,s);if(m!==null){const b=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);u.push(new ts(b,h.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var ts=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ns(e,t,n,r,i,o,s,a){return new is(e,t,n,r,i,o,s,a)}function jn(e,t,n,r,i){const o=Ze(t,nt),s=Ur.getCompiledRuleId(n,r,i.repository);for(const a of o)e.push({debugSelector:t,matcher:a.matcher,ruleId:s,grammar:i,priority:a.priority})}function nt(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(rs(t[i],r))return n=i+1,!0;return!1})}function rs(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var is=class{constructor(e,t,n,r,i,o,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new Xo(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Hn(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const u=Ze(l,nt);for(const p of u)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)jn(t,s,i[s],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const a=this.getExternalGrammar(s);if(a){const l=a.injectionSelector;l&&jn(t,l,a,this,a)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Hn(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Ur.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Xt.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),d=le.set(0,u.languageId,u.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),f=this.getRule(this._rootId).getName(null,null);let h;f?h=Ae.createRootAndLookUpScopeName(f,d,this):h=Ae.createRoot("unknown",d),t=new Xt(null,this._rootId,-1,-1,!1,null,h,h)}else i=!1,t.reset();e=e+` `;const o=this.createOnigString(e),s=o.content.length,a=new ss(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=jr(this,o,i,0,t,a,!0,r);return Mr(o),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Hn(e,t){return e=Co(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ae=class K{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const o of n)i=It.push(i,o.scopeNames),r=new K(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new K(null,new It(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new It(null,t),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(n,i,s);return new K(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return K.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),le.set(t,n.languageId,n.tokenType,null,i,o,s)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return K._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=K._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(t.tokenAttributes,i,s);return new K(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Xt=class ie{constructor(t,n,r,i,o,s,a,l){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new ie(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:ie._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ae.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){ie._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,s,a){return new ie(this,t,n,r,i,o,s,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new ie(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Ae.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new ie(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ae.fromExtension(r,n.contentNameScopesList))}},os=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ze(n,nt).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ze(n,nt).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},ss=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(o)&&(r=le.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=le.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},as=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,ns(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},ls=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new as(Ye.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Ye.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new os(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const s=new $o(this._syncRegistry,t);for(;s.Q.length>0;)s.Q.map(a=>this._loadSingleGrammar(a.scopeName)),s.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},Kt=Xt.NULL;function Ie(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function ee(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Wr(e){return Array.isArray(e)?e:[e]}async function dn(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function $e(e){return!e||["plaintext","txt","text","plain"].includes(e)}function pn(e){return e==="ansi"||$e(e)}function Me(e){return e==="none"}function hn(e){return Me(e)}const us=/(\r?\n)/g;function Ge(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(us);let r=0;const i=[];for(let o=0;o<n.length;o+=2){const s=t?n[o]+(n[o+1]||""):n[o];i.push([s,r]),r+=n[o].length,r+=n[o+1]?.length||0}return i}const Wn={light:"#333333",dark:"#bbbbbb"},zn={light:"#fffffe",dark:"#1e1e1e"},qn="__shiki_resolved";function mt(e){if(e?.[qn])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const a=t.settings?t.settings.find(l=>!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?Wn.light:Wn.dark),n||(n=t.type==="light"?zn.light:zn.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function s(a){if(o.has(a))return o.get(a);i+=1;const l=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?s(a):(o.set(a,l),l)}t.settings=t.settings.map(a=>{const l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),u=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!u)return a;const p={...a,settings:{...a.settings}};if(l){const d=s(a.settings.foreground);t.colorReplacements[d]=a.settings.foreground,p.settings.foreground=d}if(u){const d=s(a.settings.background);t.colorReplacements[d]=a.settings.background,p.settings.background=d}return p});for(const a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const l=s(t.colors[a]);t.colorReplacements[l]=t.colors[a],t.colors[a]=l}return Object.defineProperty(t,qn,{enumerable:!1,writable:!1,value:!0}),t}async function zr(e){return[...new Set((await Promise.all(e.filter(t=>!pn(t)).map(async t=>await dn(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function qr(e){return(await Promise.all(e.map(async t=>hn(t)?null:mt(await dn(t))))).filter(t=>!!t)}function Xr(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new L(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var cs=class extends ls{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=mt(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Ye.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Xr(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,i])=>!i);if(n.length){const r=t.filter(([i,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(s=>n.map(([a])=>a).includes(s)):!1).filter(i=>!n.includes(i));throw new L(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of t)this._resolver.addLanguage(i);for(const[r,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},ds=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let ve=0;function gt(e){ve+=1,e.warnings!==!1&&ve>=10&&ve%10===0&&console.warn(`[Shiki] ${ve} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new L("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(mt),i=new cs(new ds(e.engine,n),r,n,e.langAlias);let o;function s(y){return Xr(y,e.langAlias)}function a(y){b();const w=i.getGrammar(typeof y=="string"?y:y.name);if(!w)throw new L(`Language \`${y}\` not found, you may need to load it first`);return w}function l(y){if(y==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const w=i.getTheme(y);if(!w)throw new L(`Theme \`${y}\` not found, you may need to load it first`);return w}function u(y){b();const w=l(y);return o!==y&&(i.setTheme(w),o=y),{theme:w,colorMap:i.getColorMap()}}function p(){return b(),i.getLoadedThemes()}function d(){return b(),i.getLoadedLanguages()}function f(...y){b(),i.loadLanguages(y.flat(1))}async function h(...y){return f(await zr(y))}function m(...y){b();for(const w of y.flat(1))i.loadTheme(w)}async function E(...y){return b(),m(await qr(y))}function b(){if(t)throw new L("Shiki instance has been disposed")}function g(){t||(t=!0,i.dispose(),ve-=1)}return{setTheme:u,getTheme:l,getLanguage:a,getLoadedThemes:p,getLoadedLanguages:d,resolveLangAlias:s,loadLanguage:h,loadLanguageSync:f,loadTheme:E,loadThemeSync:m,dispose:g,[Symbol.dispose]:g}}const ps=gt;async function fn(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([qr(e.themes||[]),zr(e.langs||[]),e.engine]);return gt({...e,themes:t,langs:n,engine:r})}const hs=fn,Kr=new WeakMap;function _t(e,t){Kr.set(e,t)}function Te(e){return Kr.get(e)}var yt=class Qr{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Qr(Object.fromEntries(Wr(n).map(r=>[r,Kt])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return fs(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function fs(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const o=i?.nameScopesList?.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function ms(e,t){if(!(e instanceof yt))throw new L("Invalid grammar state");return e.getInternalStack(t)}const gs=/,/,_s=/ /;function Jr(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if($e(e.resolveLangAlias(n.lang||"text"))||Me(r))return Ge(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:o}=e.setTheme(r),s=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==s.name)throw new L(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new L(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Zr(t,s,i,o,n)}function Yr(...e){if(e.length===2)return Te(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if($e(i)||Me(o))throw new L("Plain language does not have grammar state");if(i==="ansi")throw new L("ANSI language does not have grammar state");const{theme:s,colorMap:a}=t.setTheme(o),l=t.getLanguage(i);return new yt(mn(n,l,s,a,r).stateStack,l.name,s.name)}function Zr(e,t,n,r,i){const o=mn(e,t,n,r,i),s=new yt(o.stateStack,t.name,n.name);return _t(o.tokens,s),o.tokens}function mn(e,t,n,r,i){const o=Ie(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=i,u=Ge(e);let p=i.grammarState?ms(i.grammarState,n.name)??Kt:i.grammarContextCode!=null?mn(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Kt,d=[];const f=[];for(let h=0,m=u.length;h<m;h++){const[E,b]=u[h];if(E===""){d=[],f.push([]);continue}if(s>0&&E.length>=s){d=[],f.push([{content:E,offset:b,color:"",fontStyle:0}]);continue}let g,y,w;l&&l!=="tokenType"&&(g=t.tokenizeLine(E,p,a),y=g.tokens,w=0);const A=t.tokenizeLine2(E,p,a),k=A.tokens.length/2;for(let I=0;I<k;I++){const M=A.tokens[2*I],z=I+1<k?A.tokens[2*I+2]:E.length;if(M===z)continue;const pe=A.tokens[2*I+1],At=ee(r[le.getForeground(pe)],o),kt=le.getFontStyle(pe),q={content:E.substring(M,z),offset:b+M,color:At,fontStyle:kt};if(l==="tokenType")q.type=le.getTokenType(pe);else if(l){const Nn=[];if(l!=="scopeName")for(const Q of n.settings){let he;switch(typeof Q.scope){case"string":he=Q.scope.split(gs).map(St=>St.trim());break;case"object":he=Q.scope;break;default:continue}Nn.push({settings:Q,selectors:he.map(St=>St.split(_s))})}q.explanation=[];let Vn=0;for(;M+Vn<z;){const Q=y[w],he=E.substring(Q.startIndex,Q.endIndex);Vn+=he.length,q.explanation.push({content:he,scopes:l==="scopeName"?ys(Q.scopes):Es(Nn,Q.scopes)}),w+=1}}d.push(q)}f.push(d),d=[],p=A.ruleStack}return{tokens:f,stateStack:p}}function ys(e){return e.map(t=>({scopeName:t}))}function Es(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:ws(e,o,t.slice(0,r))}}return n}function Xn(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function bs(e,t,n){if(!Xn(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Xn(e[r],n[i])&&(r-=1),i-=1;return r===-1}function ws(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const s of i)if(bs(s,t,n)){r.push(o);break}return r}function gn(e,t,n,r=Jr){const i=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),o=i.map(u=>{const p=r(e,t,{...n,theme:u.theme});return{tokens:p,state:Te(p),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),s=vs(...o.map(u=>u.tokens)),a=s[0].map((u,p)=>u.map((d,f)=>{const h={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=d.explanation),s.forEach((m,E)=>{const{content:b,explanation:g,offset:y,...w}=m[p][f];h.variants[i[E].color]=w}),h})),l=o[0].state?new yt(Object.fromEntries(o.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),o[0].state.lang):void 0;return l&&_t(a,l),a}function vs(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(l=>l[r]),o=t.map(()=>[]);t.forEach((l,u)=>l.push(o[u]));const s=i.map(()=>0),a=i.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(u=>u.content.length));for(let u=0;u<n;u++){const p=a[u];p.content.length===l?(o[u].push(p),s[u]+=1,a[u]=i[u][s[u]]):(o[u].push({...p,content:p.content.slice(0,l)}),a[u]={...p,content:p.content.slice(l),offset:p.offset+l})}}}return t}const Cs=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Be{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Be.prototype.normal={};Be.prototype.property={};Be.prototype.space=void 0;function ei(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Be(n,r,t)}function Qt(e){return e.toLowerCase()}class G{constructor(t,n){this.attribute=n,this.property=t}}G.prototype.attribute="";G.prototype.booleanish=!1;G.prototype.boolean=!1;G.prototype.commaOrSpaceSeparated=!1;G.prototype.commaSeparated=!1;G.prototype.defined=!1;G.prototype.mustUseProperty=!1;G.prototype.number=!1;G.prototype.overloadedBoolean=!1;G.prototype.property="";G.prototype.spaceSeparated=!1;G.prototype.space=void 0;let As=0;const v=de(),T=de(),Jt=de(),_=de(),S=de(),ue=de(),B=de();function de(){return 2**++As}const Yt=Object.freeze(Object.defineProperty({__proto__:null,boolean:v,booleanish:T,commaOrSpaceSeparated:B,commaSeparated:ue,number:_,overloadedBoolean:Jt,spaceSeparated:S},Symbol.toStringTag,{value:"Module"})),Pt=Object.keys(Yt);class _n extends G{constructor(t,n,r,i){let o=-1;if(super(t,n),Kn(this,"space",i),typeof r=="number")for(;++o<Pt.length;){const s=Pt[o];Kn(this,Pt[o],(r&Yt[s])===Yt[s])}}}_n.prototype.defined=!0;function Kn(e,t,n){n&&(e[t]=n)}function Ee(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new _n(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Qt(r)]=r,n[Qt(o.attribute)]=r}return new Be(t,n,e.space)}const ti=Ee({properties:{ariaActiveDescendant:null,ariaAtomic:T,ariaAutoComplete:null,ariaBusy:T,ariaChecked:T,ariaColCount:_,ariaColIndex:_,ariaColSpan:_,ariaControls:S,ariaCurrent:null,ariaDescribedBy:S,ariaDetails:null,ariaDisabled:T,ariaDropEffect:S,ariaErrorMessage:null,ariaExpanded:T,ariaFlowTo:S,ariaGrabbed:T,ariaHasPopup:null,ariaHidden:T,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:S,ariaLevel:_,ariaLive:null,ariaModal:T,ariaMultiLine:T,ariaMultiSelectable:T,ariaOrientation:null,ariaOwns:S,ariaPlaceholder:null,ariaPosInSet:_,ariaPressed:T,ariaReadOnly:T,ariaRelevant:null,ariaRequired:T,ariaRoleDescription:S,ariaRowCount:_,ariaRowIndex:_,ariaRowSpan:_,ariaSelected:T,ariaSetSize:_,ariaSort:null,ariaValueMax:_,ariaValueMin:_,ariaValueNow:_,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ni(e,t){return t in e?e[t]:t}function ri(e,t){return ni(e,t.toLowerCase())}const ks=Ee({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ue,acceptCharset:S,accessKey:S,action:null,allow:null,allowFullScreen:v,allowPaymentRequest:v,allowUserMedia:v,alpha:v,alt:null,as:null,async:v,autoCapitalize:null,autoComplete:S,autoFocus:v,autoPlay:v,blocking:S,capture:null,charSet:null,checked:v,cite:null,className:S,closedBy:null,colorSpace:null,cols:_,colSpan:_,command:null,commandFor:null,content:null,contentEditable:T,controls:v,controlsList:S,coords:_|ue,crossOrigin:null,data:null,dateTime:null,decoding:null,default:v,defer:v,dir:null,dirName:null,disabled:v,download:Jt,draggable:T,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:v,formTarget:null,headers:S,height:_,hidden:Jt,high:_,href:null,hrefLang:null,htmlFor:S,httpEquiv:S,id:null,imageSizes:null,imageSrcSet:null,inert:v,inputMode:null,integrity:null,is:null,isMap:v,itemId:null,itemProp:S,itemRef:S,itemScope:v,itemType:S,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:v,low:_,manifest:null,max:null,maxLength:_,media:null,method:null,min:null,minLength:_,multiple:v,muted:v,name:null,nonce:null,noModule:v,noValidate:v,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:v,optimum:_,pattern:null,ping:S,placeholder:null,playsInline:v,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:v,referrerPolicy:null,rel:S,required:v,reversed:v,rows:_,rowSpan:_,sandbox:S,scope:null,scoped:v,seamless:v,selected:v,shadowRootClonable:v,shadowRootCustomElementRegistry:v,shadowRootDelegatesFocus:v,shadowRootMode:null,shadowRootSerializable:v,shape:null,size:_,sizes:null,slot:null,span:_,spellCheck:T,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_,step:null,style:null,tabIndex:_,target:null,title:null,translate:null,type:null,typeMustMatch:v,useMap:null,value:T,width:_,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:S,axis:null,background:null,bgColor:null,border:_,borderColor:null,bottomMargin:_,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:v,declare:v,event:null,face:null,frame:null,frameBorder:null,hSpace:_,leftMargin:_,link:null,longDesc:null,lowSrc:null,marginHeight:_,marginWidth:_,noResize:v,noHref:v,noShade:v,noWrap:v,object:null,profile:null,prompt:null,rev:null,rightMargin:_,rules:null,scheme:null,scrolling:T,standby:null,summary:null,text:null,topMargin:_,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:v,disablePictureInPicture:v,disableRemotePlayback:v,exportParts:ue,part:S,prefix:null,property:null,results:_,security:null,unselectable:null},space:"html",transform:ri}),Ss=Ee({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:B,accentHeight:_,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_,amplitude:_,arabicForm:null,ascent:_,attributeName:null,attributeType:null,azimuth:_,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_,by:null,calcMode:null,capHeight:_,className:S,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:_,diffuseConstant:_,direction:null,display:null,dur:null,divisor:_,dominantBaseline:null,download:v,dx:null,dy:null,edgeMode:null,editable:null,elevation:_,enableBackground:null,end:null,event:null,exponent:_,externalResourcesRequired:null,fill:null,fillOpacity:_,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ue,g2:ue,glyphName:ue,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_,horizOriginX:_,horizOriginY:_,id:null,ideographic:_,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_,k:_,k1:_,k2:_,k3:_,k4:_,kernelMatrix:B,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:_,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:_,overlineThickness:_,paintOrder:null,panose1:null,path:null,pathLength:_,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:S,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_,pointsAtY:_,pointsAtZ:_,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:B,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:B,rev:B,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:B,requiredFeatures:B,requiredFonts:B,requiredFormats:B,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:_,specularExponent:_,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_,strikethroughThickness:_,string:null,stroke:null,strokeDashArray:B,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_,strokeOpacity:_,strokeWidth:null,style:null,surfaceScale:_,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:B,tabIndex:_,tableValues:null,target:null,targetX:_,targetY:_,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:B,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_,underlineThickness:_,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_,values:null,vAlphabetic:_,vMathematical:_,vectorEffect:null,vHanging:_,vIdeographic:_,version:null,vertAdvY:_,vertOriginX:_,vertOriginY:_,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ni}),ii=Ee({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),oi=Ee({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ri}),si=Ee({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ls=/[A-Z]/g,Qn=/-[a-z]/g,Rs=/^data[-\w.:]+$/i;function Is(e,t){const n=Qt(t);let r=t,i=G;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Rs.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Qn,Ps);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Qn.test(o)){let s=o.replace(Ls,Ts);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=_n}return new i(r,t)}function Ts(e){return"-"+e.toLowerCase()}function Ps(e){return e.charAt(1).toUpperCase()}const Os=ei([ti,ks,ii,oi,si],"html"),ai=ei([ti,Ss,ii,oi,si],"svg"),Jn={}.hasOwnProperty;function xs(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&Jn.call(i,e)){const l=String(i[e]);s=Jn.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ds=/["&'<>`]/g,Ns=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Vs=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,$s=/[|\\{}()[\]^$+*?.]/g,Yn=new WeakMap;function Ms(e,t){if(e=e.replace(t.subset?Gs(t.subset):Ds,r),t.subset||t.escapeOnly)return e;return e.replace(Ns,n).replace(Vs,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function Gs(e){let t=Yn.get(e);return t||(t=Bs(e),Yn.set(e,t)),t}function Bs(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace($s,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Us=/[\dA-Fa-f]/;function Fs(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Us.test(String.fromCharCode(t))?r:r+";"}const js=/\d/;function Hs(e,t,n){const r="&#"+String(e);return n&&t&&!js.test(String.fromCharCode(t))?r:r+";"}const Ws=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ot={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},zs=["cent","copy","divide","gt","lt","not","para","times"],li={}.hasOwnProperty,Zt={};let He;for(He in Ot)li.call(Ot,He)&&(Zt[Ot[He]]=He);const qs=/[^\dA-Za-z]/;function Xs(e,t,n,r){const i=String.fromCharCode(e);if(li.call(Zt,i)){const o=Zt[i],s="&"+o;return n&&Ws.includes(o)&&!zs.includes(o)&&(!r||t&&t!==61&&qs.test(String.fromCharCode(t)))?s:s+";"}return""}function Ks(e,t,n){let r=Fs(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Xs(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Hs(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function ye(e,t){return Ms(e,Object.assign({format:Ks},t))}const Qs=/^>|^->|<!--|-->|--!>|<!-$/g,Js=[">"],Ys=["<",">"];function Zs(e,t,n,r){return r.settings.bogusComments?"<?"+ye(e.value,Object.assign({},r.settings.characterReferences,{subset:Js}))+">":"<!--"+e.value.replace(Qs,i)+"-->";function i(o){return ye(o,Object.assign({},r.settings.characterReferences,{subset:Ys}))}}function ea(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Zn(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ta(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function na(e){return e.join(" ").trim()}const ra=/[ \t\n\f\r]/g;function yn(e){return typeof e=="object"?e.type==="text"?er(e.value):!1:er(e)}function er(e){return e.replace(ra,"")===""}const x=ci(1),ui=ci(-1),ia=[];function ci(e){return t;function t(n,r,i){const o=n?n.children:ia;let s=(r||0)+e,a=o[s];if(!i)for(;a&&yn(a);)s+=e,a=o[s];return a}}const oa={}.hasOwnProperty;function di(e){return t;function t(n,r,i){return oa.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const En=di({body:aa,caption:xt,colgroup:xt,dd:da,dt:ca,head:xt,html:sa,li:ua,optgroup:pa,option:ha,p:la,rp:tr,rt:tr,tbody:ma,td:nr,tfoot:ga,th:nr,thead:fa,tr:_a});function xt(e,t,n){const r=x(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&yn(r.value.charAt(0)))}function sa(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function aa(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function la(e,t,n){const r=x(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ua(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="li"}function ca(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function da(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function tr(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function pa(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function ha(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function fa(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function ma(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function ga(e,t,n){return!x(n,t)}function _a(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function nr(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const ya=di({body:wa,colgroup:va,head:ba,html:Ea,tbody:Ca});function Ea(e){const t=x(e,-1);return!t||t.type!=="comment"}function ba(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function wa(e){const t=x(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&yn(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function va(e,t,n){const r=ui(n,t),i=x(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&En(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Ca(e,t,n){const r=ui(n,t),i=x(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&En(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const We={name:[[` \f\r &/=>`.split(""),` diff --git a/apps/kimi-code/dist-web/assets/index-_5lXYMaO.js b/apps/kimi-code/dist-web/assets/index-_5lXYMaO.js new file mode 100644 index 000000000..7522e4605 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/index-_5lXYMaO.js @@ -0,0 +1,652 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/mermaid.core-DpBz6UHc.js","assets/_commonjsHelpers-CqkleIqs.js","assets/CodeBlockNode-CZYIqTV_.js","assets/safeRaf-DGuzXxDK.js","assets/index5-BHVixm2V.js","assets/index11-Cx5Yh-Ch.js","assets/DesignSystemView-C2ybIYYn.js","assets/DesignSystemView-DT_ORWRp.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"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();/** +* @vue/shared v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function L2(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const $n={},tf=[],Pr=()=>{},xM=()=>!1,hp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),N2=e=>e.startsWith("onUpdate:"),gi=Object.assign,H8=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},HR=Object.prototype.hasOwnProperty,ii=(e,t)=>HR.call(e,t),Xt=Array.isArray,nf=e=>Df(e)==="[object Map]",id=e=>Df(e)==="[object Set]",P6=e=>Df(e)==="[object Date]",WR=e=>Df(e)==="[object RegExp]",hn=e=>typeof e=="function",wi=e=>typeof e=="string",_r=e=>typeof e=="symbol",si=e=>e!==null&&typeof e=="object",W8=e=>(si(e)||hn(e))&&hn(e.then)&&hn(e.catch),_M=Object.prototype.toString,Df=e=>_M.call(e),qR=e=>Df(e).slice(8,-1),F2=e=>Df(e)==="[object Object]",B2=e=>wi(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Fc=L2(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$2=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},UR=/-\w/g,Ls=$2(e=>e.replace(UR,t=>t.slice(1).toUpperCase())),KR=/\B([A-Z])/g,er=$2(e=>e.replace(KR,"-$1").toLowerCase()),D2=$2(e=>e.charAt(0).toUpperCase()+e.slice(1)),mg=$2(e=>e?`on${D2(e)}`:""),js=(e,t)=>!Object.is(e,t),sf=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},SM=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},R2=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Zg=e=>{const t=wi(e)?Number(e):NaN;return isNaN(t)?e:t};let j6;const z2=()=>j6||(j6=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),VR="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",ZR=L2(VR);function Vt(e){if(Xt(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],s=wi(i)?JR(i):Vt(i);if(s)for(const o in s)t[o]=s[o]}return t}else if(wi(e)||si(e))return e}const GR=/;(?![^(]*\))/g,QR=/:([^]+)/,YR=/\/\*[^]*?\*\//g;function JR(e){const t={};return e.replace(YR,"").split(GR).forEach(n=>{if(n){const i=n.split(QR);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function De(e){let t="";if(wi(e))t=e;else if(Xt(e))for(let n=0;n<e.length;n++){const i=De(e[n]);i&&(t+=i+" ")}else if(si(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function XR(e){if(!e)return null;let{class:t,style:n}=e;return t&&!wi(t)&&(e.class=De(t)),n&&(e.style=Vt(n)),e}const ez="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",tz=L2(ez);function MM(e){return!!e||e===""}function nz(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=xa(e[i],t[i]);return n}function xa(e,t){if(e===t)return!0;let n=P6(e),i=P6(t);if(n||i)return n&&i?e.getTime()===t.getTime():!1;if(n=_r(e),i=_r(t),n||i)return e===t;if(n=Xt(e),i=Xt(t),n||i)return n&&i?nz(e,t):!1;if(n=si(e),i=si(t),n||i){if(!n||!i)return!1;const s=Object.keys(e).length,o=Object.keys(t).length;if(s!==o)return!1;for(const r in e){const l=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(l&&!a||!l&&a||!xa(e[r],t[r]))return!1}}return String(e)===String(t)}function O2(e,t){return e.findIndex(n=>xa(n,t))}const IM=e=>!!(e&&e.__v_isRef===!0),B=e=>wi(e)?e:e==null?"":Xt(e)||si(e)&&(e.toString===_M||!hn(e.toString))?IM(e)?B(e.value):JSON.stringify(e,EM,2):String(e),EM=(e,t)=>IM(t)?EM(e,t.value):nf(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,s],o)=>(n[N9(i,o)+" =>"]=s,n),{})}:id(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>N9(n))}:_r(t)?N9(t):si(t)&&!Xt(t)&&!F2(t)?String(t):t,N9=(e,t="")=>{var n;return _r(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function iz(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 Ss;class TM{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&&Ss&&(Ss.active?(this.parent=Ss,this.index=(Ss.scopes||(Ss.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;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Ss;try{return Ss=this,t()}finally{Ss=n}}}on(){++this._on===1&&(this.prevScope=Ss,Ss=this)}off(){if(this._on>0&&--this._on===0){if(Ss===this)Ss=this.prevScope;else{let t=Ss;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,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function sz(e){return new TM(e)}function P2(){return Ss}function Rf(e,t=!1){Ss&&Ss.cleanups.push(e)}let Ei;const F9=new WeakSet;class Gg{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ss&&(Ss.active?Ss.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,F9.has(this)&&(F9.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||NM(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,H6(this),FM(this);const t=Ei,n=ul;Ei=this,ul=!0;try{return this.fn()}finally{BM(this),Ei=t,ul=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)K8(t);this.deps=this.depsTail=void 0,H6(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?F9.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){x4(this)&&this.run()}get dirty(){return x4(this)}}let LM=0,o1,r1;function NM(e,t=!1){if(e.flags|=8,t){e.next=r1,r1=e;return}e.next=o1,o1=e}function q8(){LM++}function U8(){if(--LM>0)return;if(r1){let t=r1;for(r1=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;o1;){let t=o1;for(o1=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function FM(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function BM(e){let t,n=e.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),K8(i),oz(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}e.deps=t,e.depsTail=n}function x4(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&($M(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function $M(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===B1)||(e.globalVersion=B1,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!x4(e))))return;e.flags|=2;const t=e.dep,n=Ei,i=ul;Ei=e,ul=!0;try{FM(e);const s=e.fn(e._value);(t.version===0||js(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Ei=n,ul=i,BM(e),e.flags&=-3}}function K8(e,t=!1){const{dep:n,prevSub:i,nextSub:s}=e;if(i&&(i.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)K8(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function oz(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function bQe(e,t){e.effect instanceof Gg&&(e=e.effect.fn);const n=new Gg(e);t&&gi(n,t);try{n.run()}catch(s){throw n.stop(),s}const i=n.run.bind(n);return i.effect=n,i}function kQe(e){e.effect.stop()}let ul=!0;const DM=[];function Wl(){DM.push(ul),ul=!1}function ql(){const e=DM.pop();ul=e===void 0?!0:e}function H6(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ei;Ei=void 0;try{t()}finally{Ei=n}}}let B1=0;class rz{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 j2{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(!Ei||!ul||Ei===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ei)n=this.activeLink=new rz(Ei,this),Ei.deps?(n.prevDep=Ei.depsTail,Ei.depsTail.nextDep=n,Ei.depsTail=n):Ei.deps=Ei.depsTail=n,RM(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Ei.depsTail,n.nextDep=void 0,Ei.depsTail.nextDep=n,Ei.depsTail=n,Ei.deps===n&&(Ei.deps=i)}return n}trigger(t){this.version++,B1++,this.notify(t)}notify(t){q8();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{U8()}}}function RM(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)RM(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Qg=new WeakMap,Bc=Symbol(""),_4=Symbol(""),$1=Symbol("");function bo(e,t,n){if(ul&&Ei){let i=Qg.get(e);i||Qg.set(e,i=new Map);let s=i.get(n);s||(i.set(n,s=new j2),s.map=i,s.key=n),s.track()}}function fa(e,t,n,i,s,o){const r=Qg.get(e);if(!r){B1++;return}const l=a=>{a&&a.trigger()};if(q8(),t==="clear")r.forEach(l);else{const a=Xt(e),u=a&&B2(n);if(a&&n==="length"){const c=Number(i);r.forEach((d,f)=>{(f==="length"||f===$1||!_r(f)&&f>=c)&&l(d)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),u&&l(r.get($1)),t){case"add":a?u&&l(r.get("length")):(l(r.get(Bc)),nf(e)&&l(r.get(_4)));break;case"delete":a||(l(r.get(Bc)),nf(e)&&l(r.get(_4)));break;case"set":nf(e)&&l(r.get(Bc));break}}U8()}function lz(e,t){const n=Qg.get(e);return n&&n.get(t)}function _d(e){const t=Vn(e);return t===e?t:(bo(t,"iterate",$1),br(e)?t:t.map(fl))}function H2(e){return bo(e=Vn(e),"iterate",$1),e}function $l(e,t){return _a(e)?xf(du(e)?fl(t):t):fl(t)}const az={__proto__:null,[Symbol.iterator](){return B9(this,Symbol.iterator,e=>$l(this,e))},concat(...e){return _d(this).concat(...e.map(t=>Xt(t)?_d(t):t))},entries(){return B9(this,"entries",e=>(e[1]=$l(this,e[1]),e))},every(e,t){return sa(this,"every",e,t,void 0,arguments)},filter(e,t){return sa(this,"filter",e,t,n=>n.map(i=>$l(this,i)),arguments)},find(e,t){return sa(this,"find",e,t,n=>$l(this,n),arguments)},findIndex(e,t){return sa(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return sa(this,"findLast",e,t,n=>$l(this,n),arguments)},findLastIndex(e,t){return sa(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return sa(this,"forEach",e,t,void 0,arguments)},includes(...e){return $9(this,"includes",e)},indexOf(...e){return $9(this,"indexOf",e)},join(e){return _d(this).join(e)},lastIndexOf(...e){return $9(this,"lastIndexOf",e)},map(e,t){return sa(this,"map",e,t,void 0,arguments)},pop(){return bh(this,"pop")},push(...e){return bh(this,"push",e)},reduce(e,...t){return W6(this,"reduce",e,t)},reduceRight(e,...t){return W6(this,"reduceRight",e,t)},shift(){return bh(this,"shift")},some(e,t){return sa(this,"some",e,t,void 0,arguments)},splice(...e){return bh(this,"splice",e)},toReversed(){return _d(this).toReversed()},toSorted(e){return _d(this).toSorted(e)},toSpliced(...e){return _d(this).toSpliced(...e)},unshift(...e){return bh(this,"unshift",e)},values(){return B9(this,"values",e=>$l(this,e))}};function B9(e,t,n){const i=H2(e),s=i[t]();return i!==e&&!br(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const uz=Array.prototype;function sa(e,t,n,i,s,o){const r=H2(e),l=r!==e&&!br(e),a=r[t];if(a!==uz[t]){const d=a.apply(e,o);return l?fl(d):d}let u=n;r!==e&&(l?u=function(d,f){return n.call(this,$l(e,d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=a.call(r,u,i);return l&&s?s(c):c}function W6(e,t,n,i){const s=H2(e),o=s!==e&&!br(e);let r=n,l=!1;s!==e&&(o?(l=i.length===0,r=function(u,c,d){return l&&(l=!1,u=$l(e,u)),n.call(this,u,$l(e,c),d,e)}):n.length>3&&(r=function(u,c,d){return n.call(this,u,c,d,e)}));const a=s[t](r,...i);return l?$l(e,a):a}function $9(e,t,n){const i=Vn(e);bo(i,"iterate",$1);const s=i[t](...n);return(s===-1||s===!1)&&U2(n[0])?(n[0]=Vn(n[0]),i[t](...n)):s}function bh(e,t,n=[]){Wl(),q8();const i=Vn(e)[t].apply(e,n);return U8(),ql(),i}const cz=L2("__proto__,__v_isRef,__isVue"),zM=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(_r));function dz(e){_r(e)||(e=String(e));const t=Vn(this);return bo(t,"has",e),t.hasOwnProperty(e)}class OM{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return i===(s?o?UM:qM:o?WM:HM).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const r=Xt(t);if(!s){let a;if(r&&(a=az[n]))return a;if(n==="hasOwnProperty")return dz}const l=Reflect.get(t,n,ls(t)?t:i);if((_r(n)?zM.has(n):cz(n))||(s||bo(t,"get",n),o))return l;if(ls(l)){const a=r&&B2(n)?l:l.value;return s&&si(a)?M4(a):a}return si(l)?s?M4(l):Ts(l):l}}class PM extends OM{constructor(t=!1){super(!1,t)}set(t,n,i,s){let o=t[n];const r=Xt(t)&&B2(n);if(!this._isShallow){const u=_a(o);if(!br(i)&&!_a(i)&&(o=Vn(o),i=Vn(i)),!r&&ls(o)&&!ls(i))return u||(o.value=i),!0}const l=r?Number(n)<t.length:ii(t,n),a=Reflect.set(t,n,i,ls(t)?t:s);return t===Vn(s)&&a&&(l?js(i,o)&&fa(t,"set",n,i):fa(t,"add",n,i)),a}deleteProperty(t,n){const i=ii(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&i&&fa(t,"delete",n,void 0),s}has(t,n){const i=Reflect.has(t,n);return(!_r(n)||!zM.has(n))&&bo(t,"has",n),i}ownKeys(t){return bo(t,"iterate",Xt(t)?"length":Bc),Reflect.ownKeys(t)}}class jM extends OM{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const fz=new PM,hz=new jM,pz=new PM(!0),gz=new jM(!0),S4=e=>e,m0=e=>Reflect.getPrototypeOf(e);function mz(e,t,n){return function(...i){const s=this.__v_raw,o=Vn(s),r=nf(o),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,u=s[e](...i),c=n?S4:t?xf:fl;return!t&&bo(o,"iterate",a?_4:Bc),gi(Object.create(u),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}}})}}function v0(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function vz(e,t){const n={get(s){const o=this.__v_raw,r=Vn(o),l=Vn(s);e||(js(s,l)&&bo(r,"get",s),bo(r,"get",l));const{has:a}=m0(r),u=t?S4:e?xf:fl;if(a.call(r,s))return u(o.get(s));if(a.call(r,l))return u(o.get(l));o!==r&&o.get(s)},get size(){const s=this.__v_raw;return!e&&bo(Vn(s),"iterate",Bc),s.size},has(s){const o=this.__v_raw,r=Vn(o),l=Vn(s);return e||(js(s,l)&&bo(r,"has",s),bo(r,"has",l)),s===l?o.has(s):o.has(s)||o.has(l)},forEach(s,o){const r=this,l=r.__v_raw,a=Vn(l),u=t?S4:e?xf:fl;return!e&&bo(a,"iterate",Bc),l.forEach((c,d)=>s.call(o,u(c),u(d),r))}};return gi(n,e?{add:v0("add"),set:v0("set"),delete:v0("delete"),clear:v0("clear")}:{add(s){const o=Vn(this),r=m0(o),l=Vn(s),a=!t&&!br(s)&&!_a(s)?l:s;return r.has.call(o,a)||js(s,a)&&r.has.call(o,s)||js(l,a)&&r.has.call(o,l)||(o.add(a),fa(o,"add",a,a)),this},set(s,o){!t&&!br(o)&&!_a(o)&&(o=Vn(o));const r=Vn(this),{has:l,get:a}=m0(r);let u=l.call(r,s);u||(s=Vn(s),u=l.call(r,s));const c=a.call(r,s);return r.set(s,o),u?js(o,c)&&fa(r,"set",s,o):fa(r,"add",s,o),this},delete(s){const o=Vn(this),{has:r,get:l}=m0(o);let a=r.call(o,s);a||(s=Vn(s),a=r.call(o,s)),l&&l.call(o,s);const u=o.delete(s);return a&&fa(o,"delete",s,void 0),u},clear(){const s=Vn(this),o=s.size!==0,r=s.clear();return o&&fa(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=mz(s,e,t)}),n}function W2(e,t){const n=vz(e,t);return(i,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?i:Reflect.get(ii(n,s)&&s in i?n:i,s,o)}const yz={get:W2(!1,!1)},bz={get:W2(!1,!0)},kz={get:W2(!0,!1)},Az={get:W2(!0,!0)},HM=new WeakMap,WM=new WeakMap,qM=new WeakMap,UM=new WeakMap;function Cz(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ts(e){return _a(e)?e:q2(e,!1,fz,yz,HM)}function KM(e){return q2(e,!1,pz,bz,WM)}function M4(e){return q2(e,!0,hz,kz,qM)}function AQe(e){return q2(e,!0,gz,Az,UM)}function q2(e,t,n,i,s){if(!si(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=s.get(e);if(o)return o;const r=Cz(qR(e));if(r===0)return e;const l=new Proxy(e,r===2?i:n);return s.set(e,l),l}function du(e){return _a(e)?du(e.__v_raw):!!(e&&e.__v_isReactive)}function _a(e){return!!(e&&e.__v_isReadonly)}function br(e){return!!(e&&e.__v_isShallow)}function U2(e){return e?!!e.__v_raw:!1}function Vn(e){const t=e&&e.__v_raw;return t?Vn(t):e}function wt(e){return!ii(e,"__v_skip")&&Object.isExtensible(e)&&SM(e,"__v_skip",!0),e}const fl=e=>si(e)?Ts(e):e,xf=e=>si(e)?M4(e):e;function ls(e){return e?e.__v_isRef===!0:!1}function Z(e){return VM(e,!1)}function vl(e){return VM(e,!0)}function VM(e,t){return ls(e)?e:new wz(e,t)}class wz{constructor(t,n){this.dep=new j2,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Vn(t),this._value=n?t:fl(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||br(t)||_a(t);t=i?t:Vn(t),js(t,n)&&(this._rawValue=t,this._value=i?t:fl(t),this.dep.trigger())}}function xz(e){e.dep&&e.dep.trigger()}function h(e){return ls(e)?e.value:e}function fu(e){return hn(e)?e():h(e)}const _z={get:(e,t,n)=>t==="__v_raw"?e:h(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const s=e[t];return ls(s)&&!ls(n)?(s.value=n,!0):Reflect.set(e,t,n,i)}};function ZM(e){return du(e)?e:new Proxy(e,_z)}class Sz{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new j2,{get:i,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Mz(e){return new Sz(e)}function CQe(e){const t=Xt(e)?new Array(e.length):{};for(const n in e)t[n]=GM(e,n);return t}class Iz{constructor(t,n,i){this._object=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._key=_r(n)?n:String(n),this._raw=Vn(t);let s=!0,o=t;if(!Xt(t)||_r(this._key)||!B2(this._key))do s=!U2(o)||br(o);while(s&&(o=o.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=h(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ls(this._raw[this._key])){const n=this._object[this._key];if(ls(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return lz(this._raw,this._key)}}class Ez{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 wQe(e,t,n){return ls(e)?e:hn(e)?new Ez(e):si(e)&&arguments.length>1?GM(e,t,n):Z(e)}function GM(e,t,n){return new Iz(e,t,n)}class Tz{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new j2(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=B1-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Ei!==this)return NM(this,!0),!0}get value(){const t=this.dep.track();return $M(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Lz(e,t,n=!1){let i,s;return hn(e)?i=e:(i=e.get,s=e.set),new Tz(i,s,n)}const xQe={GET:"get",HAS:"has",ITERATE:"iterate"},_Qe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},y0={},Yg=new WeakMap;let eu;function SQe(){return eu}function Nz(e,t=!1,n=eu){if(n){let i=Yg.get(n);i||Yg.set(n,i=[]),i.push(e)}}function Fz(e,t,n=$n){const{immediate:i,deep:s,once:o,scheduler:r,augmentJob:l,call:a}=n,u=v=>s?v:br(v)||s===!1||s===0?ha(v,1):ha(v);let c,d,f,p,g=!1,m=!1;if(ls(e)?(d=()=>e.value,g=br(e)):du(e)?(d=()=>u(e),g=!0):Xt(e)?(m=!0,g=e.some(v=>du(v)||br(v)),d=()=>e.map(v=>{if(ls(v))return v.value;if(du(v))return u(v);if(hn(v))return a?a(v,2):v()})):hn(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Wl();try{f()}finally{ql()}}const v=eu;eu=c;try{return a?a(e,3,[p]):e(p)}finally{eu=v}}:d=Pr,t&&s){const v=d,x=s===!0?1/0:s;d=()=>ha(v(),x)}const y=P2(),w=()=>{c.stop(),y&&y.active&&H8(y.effects,c)};if(o&&t){const v=t;t=(...x)=>{const E=v(...x);return w(),E}}let k=m?new Array(e.length).fill(y0):y0;const A=v=>{if(!(!(c.flags&1)||!c.dirty&&!v))if(t){const x=c.run();if(v||s||g||(m?x.some((E,S)=>js(E,k[S])):js(x,k))){f&&f();const E=eu;eu=c;try{const S=[x,k===y0?void 0:m&&k[0]===y0?[]:k,p];k=x,a?a(t,3,S):t(...S)}finally{eu=E}}}else c.run()};return l&&l(A),c=new Gg(d),c.scheduler=r?()=>r(A,!1):A,p=v=>Nz(v,!1,c),f=c.onStop=()=>{const v=Yg.get(c);if(v){if(a)a(v,4);else for(const x of v)x();Yg.delete(c)}},t?i?A(!0):k=c.run():r?r(A.bind(null,!0),!0):c.run(),w.pause=c.pause.bind(c),w.resume=c.resume.bind(c),w.stop=w,w}function ha(e,t=1/0,n){if(t<=0||!si(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ls(e))ha(e.value,t,n);else if(Xt(e))for(let i=0;i<e.length;i++)ha(e[i],t,n);else if(id(e)||nf(e))e.forEach(i=>{ha(i,t,n)});else if(F2(e)){for(const i in e)ha(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&ha(e[i],t,n)}return e}/** +* @vue/runtime-core v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const QM=[];function Bz(e){QM.push(e)}function $z(){QM.pop()}function MQe(e,t){}const IQe={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"},Dz={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 pp(e,t,n,i){try{return i?e(...i):e()}catch(s){zf(s,t,n)}}function Hr(e,t,n,i){if(hn(e)){const s=pp(e,t,n,i);return s&&W8(s)&&s.catch(o=>{zf(o,t,n)}),s}if(Xt(e)){const s=[];for(let o=0;o<e.length;o++)s.push(Hr(e[o],t,n,i));return s}}function zf(e,t,n,i=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||$n;if(t){let l=t.parent;const a=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,a,u)===!1)return}l=l.parent}if(o){Wl(),pp(o,null,10,[e,a,u]),ql();return}}Rz(e,n,s,i,r)}function Rz(e,t,n,i=!0,s=!1){if(s)throw e;console.error(e)}const No=[];let Nl=-1;const of=[];let tu=null,Rd=0;const YM=Promise.resolve();let Jg=null;function kt(e){const t=Jg||YM;return e?t.then(this?e.bind(this):e):t}function zz(e){let t=Nl+1,n=No.length;for(;t<n;){const i=t+n>>>1,s=No[i],o=D1(s);o<e||o===e&&s.flags&2?t=i+1:n=i}return t}function V8(e){if(!(e.flags&1)){const t=D1(e),n=No[No.length-1];!n||!(e.flags&2)&&t>=D1(n)?No.push(e):No.splice(zz(t),0,e),e.flags|=1,JM()}}function JM(){Jg||(Jg=YM.then(XM))}function Xg(e){Xt(e)?of.push(...e):tu&&e.id===-1?tu.splice(Rd+1,0,e):e.flags&1||(of.push(e),e.flags|=1),JM()}function q6(e,t,n=Nl+1){for(;n<No.length;n++){const i=No[n];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;No.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function em(e){if(of.length){const t=[...new Set(of)].sort((n,i)=>D1(n)-D1(i));if(of.length=0,tu){tu.push(...t);return}for(tu=t,Rd=0;Rd<tu.length;Rd++){const n=tu[Rd];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}tu=null,Rd=0}}const D1=e=>e.id==null?e.flags&2?-1:1/0:e.id;function XM(e){try{for(Nl=0;Nl<No.length;Nl++){const t=No[Nl];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),pp(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Nl<No.length;Nl++){const t=No[Nl];t&&(t.flags&=-2)}Nl=-1,No.length=0,em(),Jg=null,(No.length||of.length)&&XM()}}let zd,b0=[];function eI(e,t){var n,i;zd=e,zd?(zd.enabled=!0,b0.forEach(({event:s,args:o})=>zd.emit(s,...o)),b0=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{eI(o,t)}),setTimeout(()=>{zd||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,b0=[])},3e3)):b0=[]}let oo=null,K2=null;function R1(e){const t=oo;return oo=e,K2=e&&e.type.__scopeId||null,t}function EQe(e){K2=e}function TQe(){K2=null}const LQe=e=>he;function he(e,t=oo,n){if(!t||e._n)return e;const i=(...s)=>{i._d&&rm(-1);const o=R1(t);let r;try{r=e(...s)}finally{R1(o),i._d&&rm(1)}return r};return i._n=!0,i._c=!0,i._d=!0,i}function Bn(e,t){if(oo===null)return e;const n=yp(oo),i=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,r,l,a=$n]=t[s];o&&(hn(o)&&(o={mounted:o,updated:o}),o.deep&&ha(r),i.push({dir:o,instance:n,value:r,oldValue:void 0,arg:l,modifiers:a}))}return e}function Bl(e,t,n,i){const s=e.dirs,o=t&&t.dirs;for(let r=0;r<s.length;r++){const l=s[r];o&&(l.oldValue=o[r].value);let a=l.dir[i];a&&(Wl(),Hr(a,n,8,[e.el,l,e,t]),ql())}}function Pn(e,t){if(so){let n=so.provides;const i=so.parent&&so.parent.provides;i===n&&(n=so.provides=Object.create(i)),n[e]=t}}function an(e,t,n=!1){const i=As();if(i||$c){let s=$c?$c._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&hn(t)?t.call(i&&i.proxy):t}}function NQe(){return!!(As()||$c)}const Oz=Symbol.for("v-scx"),Pz=()=>an(Oz);function I4(e,t){return gp(e,null,t)}function FQe(e,t){return gp(e,null,{flush:"post"})}function jz(e,t){return gp(e,null,{flush:"sync"})}function Qe(e,t,n){return gp(e,t,n)}function gp(e,t,n=$n){const{immediate:i,deep:s,flush:o,once:r}=n,l=gi({},n),a=t&&i||!t&&o!=="post";let u;if(qc){if(o==="sync"){const p=Pz();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Pr,p.resume=Pr,p.pause=Pr,p}}const c=so;l.call=(p,g,m)=>Hr(p,c,g,m);let d=!1;o==="post"?l.scheduler=p=>{hs(p,c&&c.suspense)}:o!=="sync"&&(d=!0,l.scheduler=(p,g)=>{g?p():V8(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=Fz(e,t,l);return qc&&(u?u.push(f):a&&f()),f}function Hz(e,t,n){const i=this.proxy,s=wi(e)?e.includes(".")?tI(i,e):()=>i[e]:e.bind(i,i);let o;hn(t)?o=t:(o=t.handler,n=t);const r=Pf(this),l=gp(s,o.bind(i),n);return r(),l}function tI(e,t){const n=t.split(".");return()=>{let i=e;for(let s=0;s<n.length&&i;s++)i=i[n[s]];return i}}const Ga=new WeakMap,nI=Symbol("_vte"),iI=e=>e.__isTeleport,kc=e=>e&&(e.disabled||e.disabled===""),Wz=e=>e&&(e.defer||e.defer===""),U6=e=>typeof SVGElement<"u"&&e instanceof SVGElement,K6=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,E4=(e,t)=>{const n=e&&e.to;return wi(n)?t?t(n):null:n},qz={name:"Teleport",__isTeleport:!0,process(e,t,n,i,s,o,r,l,a,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:g,createText:m,createComment:y,parentNode:w}}=u,k=kc(t.props);let{dynamicChildren:A}=t;const v=(S,M,_)=>{S.shapeFlag&16&&c(S.children,M,_,s,o,r,l,a)},x=(S=t)=>{const M=kc(S.props),_=S.target=E4(S.props,g),N=T4(_,S,m,p);_&&(r!=="svg"&&U6(_)?r="svg":r!=="mathml"&&K6(_)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(_),M||(v(S,_,N),zh(S,!1)))},E=S=>{const M=()=>{if(Ga.get(S)===M){if(Ga.delete(S),kc(S.props)){const _=w(S.el)||n;v(S,_,S.anchor),zh(S,!0)}x(S)}};Ga.set(S,M),hs(M,o)};if(e==null){const S=t.el=m(""),M=t.anchor=m("");if(p(S,n,i),p(M,n,i),Wz(t.props)||o&&o.pendingBranch){E(t);return}k&&(v(t,n,M),zh(t,!0)),x()}else{t.el=e.el;const S=t.anchor=e.anchor,M=Ga.get(e);if(M){M.flags|=8,Ga.delete(e),E(t);return}t.targetStart=e.targetStart;const _=t.target=e.target,N=t.targetAnchor=e.targetAnchor,D=kc(e.props),T=D?n:_,$=D?S:N;if(r==="svg"||U6(_)?r="svg":(r==="mathml"||K6(_))&&(r="mathml"),A?(f(e.dynamicChildren,A,T,s,o,r,l),i5(e,t,!0)):a||d(e,t,T,$,s,o,r,l,!1),k)D?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):k0(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const P=E4(t.props,g);P&&(t.target=P,k0(t,P,null,u,0))}else D&&k0(t,_,N,u,1);zh(t,k)}},remove(e,t,n,{um:i,o:{remove:s}},o){const{shapeFlag:r,children:l,anchor:a,targetStart:u,targetAnchor:c,target:d,props:f}=e,p=kc(f),g=o||!p,m=Ga.get(e);if(m&&(m.flags|=8,Ga.delete(e)),d&&(s(u),s(c)),o&&s(a),!m&&(p||d)&&r&16)for(let y=0;y<l.length;y++){const w=l[y];i(w,t,n,g,!!w.dynamicChildren)}},move:k0,hydrate:Uz};function k0(e,t,n,{o:{insert:i},m:s},o=2){o===0&&i(e.targetAnchor,t,n);const{el:r,anchor:l,shapeFlag:a,children:u,props:c}=e,d=o===2;if(d&&i(r,t,n),!Ga.has(e)&&(!d||kc(c))&&a&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&i(l,t,n)}function Uz(e,t,n,i,s,o,{o:{nextSibling:r,parentNode:l,querySelector:a,insert:u,createText:c}},d){function f(y,w){let k=w;for(;k;){if(k&&k.nodeType===8){if(k.data==="teleport start anchor")t.targetStart=k;else if(k.data==="teleport anchor"){t.targetAnchor=k,y._lpa=t.targetAnchor&&r(t.targetAnchor);break}}k=r(k)}}function p(y,w){w.anchor=d(r(y),w,l(y),n,i,s,o)}const g=t.target=E4(t.props,a),m=kc(t.props);if(g){const y=g._lpa||g.firstChild;t.shapeFlag&16&&(m?(p(e,t),f(g,y),t.targetAnchor||T4(g,t,c,u,l(e)===g?e:null)):(t.anchor=r(e),f(g,y),t.targetAnchor||T4(g,t,c,u),d(y&&r(y),t,g,n,i,s,o))),zh(t,m)}else m&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=r(e));return t.anchor&&r(t.anchor)}const Wr=qz;function zh(e,t){const n=e.ctx;if(n&&n.ut){let i,s;for(t?(i=e.el,s=e.anchor):(i=e.targetStart,s=e.targetAnchor);i&&i!==s;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function T4(e,t,n,i,s=null){const o=t.targetStart=n(""),r=t.targetAnchor=n("");return o[nI]=r,e&&(i(o,e,s),i(r,e,s)),r}const Dr=Symbol("_leaveCb"),kh=Symbol("_enterCb");function sI(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return pn(()=>{e.isMounted=!0}),Gn(()=>{e.isUnmounting=!0}),e}const Tr=[Function,Array],oI={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Tr,onEnter:Tr,onAfterEnter:Tr,onEnterCancelled:Tr,onBeforeLeave:Tr,onLeave:Tr,onAfterLeave:Tr,onLeaveCancelled:Tr,onBeforeAppear:Tr,onAppear:Tr,onAfterAppear:Tr,onAppearCancelled:Tr},rI=e=>{const t=e.subTree;return t.component?rI(t.component):t},Kz={name:"BaseTransition",props:oI,setup(e,{slots:t}){const n=As(),i=sI();return()=>{const s=t.default&&Z8(t.default(),!0),o=s&&s.length?lI(s):n.subTree?ne():void 0;if(!o)return;const r=Vn(e),{mode:l}=r;if(i.isLeaving)return D9(o);const a=V6(o);if(!a)return D9(o);let u=z1(a,r,i,n,d=>u=d);a.type!==ms&&bu(a,u);let c=n.subTree&&V6(n.subTree);if(c&&c.type!==ms&&!il(c,a)&&rI(n).type!==ms){let d=z1(c,r,i,n);if(bu(c,d),l==="out-in"&&a.type!==ms)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},D9(o);l==="in-out"&&a.type!==ms?d.delayLeave=(f,p,g)=>{const m=aI(i,c);m[String(c.key)]=c,f[Dr]=()=>{p(),f[Dr]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{g(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return o}}};function lI(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ms){t=n;break}}return t}const Vz=Kz;function aI(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function z1(e,t,n,i,s){const{appear:o,mode:r,persisted:l=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:g,onLeaveCancelled:m,onBeforeAppear:y,onAppear:w,onAfterAppear:k,onAppearCancelled:A}=t,v=String(e.key),x=aI(n,e),E=(_,N)=>{_&&Hr(_,i,9,N)},S=(_,N)=>{const D=N[1];E(_,N),Xt(_)?_.every(T=>T.length<=1)&&D():_.length<=1&&D()},M={mode:r,persisted:l,beforeEnter(_){let N=a;if(!n.isMounted)if(o)N=y||a;else return;_[Dr]&&_[Dr](!0);const D=x[v];D&&il(e,D)&&D.el[Dr]&&D.el[Dr](),E(N,[_])},enter(_){if(x[v]===e)return;let N=u,D=c,T=d;if(!n.isMounted)if(o)N=w||u,D=k||c,T=A||d;else return;let $=!1;_[kh]=O=>{$||($=!0,O?E(T,[_]):E(D,[_]),M.delayedLeave&&M.delayedLeave(),_[kh]=void 0)};const P=_[kh].bind(null,!1);N?S(N,[_,P]):P()},leave(_,N){const D=String(e.key);if(_[kh]&&_[kh](!0),n.isUnmounting)return N();E(f,[_]);let T=!1;_[Dr]=P=>{T||(T=!0,N(),P?E(m,[_]):E(g,[_]),_[Dr]=void 0,x[D]===e&&delete x[D])};const $=_[Dr].bind(null,!1);x[D]=e,p?S(p,[_,$]):$()},clone(_){const N=z1(_,t,n,i,s);return s&&s(N),N}};return M}function D9(e){if(mp(e))return e=Sa(e),e.children=null,e}function V6(e){if(!mp(e))return iI(e.type)&&e.children?lI(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&&hn(n.default))return n.default()}}function bu(e,t){e.shapeFlag&6&&e.component?(e.transition=t,bu(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 Z8(e,t=!1,n){let i=[],s=0;for(let o=0;o<e.length;o++){let r=e[o];const l=n==null?r.key:String(n)+String(r.key!=null?r.key:o);r.type===Be?(r.patchFlag&128&&s++,i=i.concat(Z8(r.children,t,l))):(t||r.type!==ms)&&i.push(l!=null?Sa(r,{key:l}):r)}if(s>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}function tt(e,t){return hn(e)?gi({name:e.name},t,{setup:e}):e}function Zz(){const e=As();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function G8(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function BQe(e){const t=As(),n=vl(null);if(t){const s=t.refs===$n?t.refs={}:t.refs;Object.defineProperty(s,e,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}function Z6(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const tm=new WeakMap;function rf(e,t,n,i,s=!1){if(Xt(e)){e.forEach((m,y)=>rf(m,t&&(Xt(t)?t[y]:t),n,i,s));return}if(ka(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&rf(e,t,n,i.component.subTree);return}const o=i.shapeFlag&4?yp(i.component):i.el,r=s?null:o,{i:l,r:a}=e,u=t&&t.r,c=l.refs===$n?l.refs={}:l.refs,d=l.setupState,f=Vn(d),p=d===$n?xM:m=>Z6(c,m)?!1:ii(f,m),g=(m,y)=>!(y&&Z6(c,y));if(u!=null&&u!==a){if(G6(t),wi(u))c[u]=null,p(u)&&(d[u]=null);else if(ls(u)){const m=t;g(u,m.k)&&(u.value=null),m.k&&(c[m.k]=null)}}if(hn(a)){Wl();try{pp(a,l,12,[r,c])}finally{ql()}}else{const m=wi(a),y=ls(a);if(m||y){const w=()=>{if(e.f){const k=m?p(a)?d[a]:c[a]:g()||!e.k?a.value:c[e.k];if(s)Xt(k)&&H8(k,o);else if(Xt(k))k.includes(o)||k.push(o);else if(m)c[a]=[o],p(a)&&(d[a]=c[a]);else{const A=[o];g(a,e.k)&&(a.value=A),e.k&&(c[e.k]=A)}}else m?(c[a]=r,p(a)&&(d[a]=r)):y&&(g(a,e.k)&&(a.value=r),e.k&&(c[e.k]=r))};if(r){const k=()=>{w(),tm.delete(e)};k.id=-1,tm.set(e,k),hs(k,n)}else G6(e),w()}}}function G6(e){const t=tm.get(e);t&&(t.flags|=8,tm.delete(e))}let Q6=!1;const Sd=()=>{Q6||(console.error("Hydration completed but contains mismatches."),Q6=!0)},Gz=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Qz=e=>e.namespaceURI.includes("MathML"),A0=e=>{if(e.nodeType===1){if(Gz(e))return"svg";if(Qz(e))return"mathml"}},Ud=e=>e.nodeType===8;function Yz(e){const{mt:t,p:n,o:{patchProp:i,createText:s,nextSibling:o,parentNode:r,remove:l,insert:a,createComment:u}}=e,c=(A,v)=>{if(!v.hasChildNodes()){n(null,A,v),em(),v._vnode=A;return}d(v.firstChild,A,null,null,null),em(),v._vnode=A},d=(A,v,x,E,S,M=!1)=>{M=M||!!v.dynamicChildren;const _=Ud(A)&&A.data==="[",N=()=>m(A,v,x,E,S,_),{type:D,ref:T,shapeFlag:$,patchFlag:P}=v;let O=A.nodeType;v.el=A,P===-2&&(M=!1,v.dynamicChildren=null);let R=null;switch(D){case hu:O!==3?v.children===""?(a(v.el=s(""),r(A),A),R=A):R=N():(A.data!==v.children&&(Sd(),A.data=v.children),R=o(A));break;case ms:k(A)?(R=o(A),w(v.el=A.content.firstChild,A,x)):O!==8||_?R=N():R=o(A);break;case af:if(_&&(A=o(A),O=A.nodeType),O===1||O===3){R=A;const W=!v.children.length;for(let z=0;z<v.staticCount;z++)W&&(v.children+=R.nodeType===1?R.outerHTML:R.data),z===v.staticCount-1&&(v.anchor=R),R=o(R);return _?o(R):R}else N();break;case Be:_?R=g(A,v,x,E,S,M):R=N();break;default:if($&1)(O!==1||v.type.toLowerCase()!==A.tagName.toLowerCase())&&!k(A)?R=N():R=f(A,v,x,E,S,M);else if($&6){v.slotScopeIds=S;const W=r(A);if(_?R=y(A):Ud(A)&&A.data==="teleport start"?R=y(A,A.data,"teleport end"):R=o(A),t(v,W,null,x,E,A0(W),M),ka(v)&&!v.type.__asyncResolved){let z;_?(z=V(Be),z.anchor=R?R.previousSibling:W.lastChild):z=A.nodeType===3?Ue(""):V("div"),z.el=A,v.component.subTree=z}}else $&64?O!==8?R=N():R=v.type.hydrate(A,v,x,E,S,M,e,p):$&128&&(R=v.type.hydrate(A,v,x,E,A0(r(A)),S,M,e,d))}return T!=null&&rf(T,null,E,v),R},f=(A,v,x,E,S,M)=>{M=M||!!v.dynamicChildren;const{type:_,dynamicProps:N,props:D,patchFlag:T,shapeFlag:$,dirs:P,transition:O}=v,R=_==="input"||_==="option",W=!!N;if(R||W||T!==-1){P&&Bl(v,null,x,"created");let z=!1;if(k(A)){z=II(null,O)&&x&&x.vnode.props&&x.vnode.props.appear;const K=A.content.firstChild;if(z){const H=K.getAttribute("class");H&&(K.$cls=H),O.beforeEnter(K)}w(K,A,x),v.el=A=K}if($&16&&!(D&&(D.innerHTML||D.textContent))){let K=p(A.firstChild,v,A,x,E,S,M);for(K&&!vg(A,1)&&Sd();K;){const H=K;K=K.nextSibling,l(H)}}else if($&8){let K=v.children;K[0]===` +`&&(A.tagName==="PRE"||A.tagName==="TEXTAREA")&&(K=K.slice(1));const{textContent:H}=A;H!==K&&H!==K.replace(/\r\n|\r/g,` +`)&&(vg(A,0)||Sd(),A.textContent=v.children)}if(D){if(R||W||!M||T&48){const K=A.tagName.includes("-");for(const H in D)(R&&(H.endsWith("value")||H==="indeterminate")||hp(H)&&!Fc(H)||H[0]==="."||K&&!Fc(H)||N&&N.includes(H))&&i(A,H,null,D[H],void 0,x)}else if(D.onClick)i(A,"onClick",null,D.onClick,void 0,x);else if(T&4&&du(D.style))for(const K in D.style)D.style[K]}let G;(G=D&&D.onVnodeBeforeMount)&&Go(G,x,v),P&&Bl(v,null,x,"beforeMount"),((G=D&&D.onVnodeMounted)||P||z)&&NI(()=>{G&&Go(G,x,v),z&&O.enter(A),P&&Bl(v,null,x,"mounted")},E)}return A.nextSibling},p=(A,v,x,E,S,M,_)=>{_=_||!!v.dynamicChildren;const N=v.children,D=N.length;let T=!1;for(let $=0;$<D;$++){const P=_?N[$]:N[$]=Xo(N[$]),O=P.type===hu;A?(O&&!_&&$+1<D&&Xo(N[$+1]).type===hu&&(a(s(A.data.slice(P.children.length)),x,o(A)),A.data=P.children),A=d(A,P,E,S,M,_)):O&&!P.children?a(P.el=s(""),x):(T||(T=!0,vg(x,1)||Sd()),n(null,P,x,null,E,S,A0(x),M))}return A},g=(A,v,x,E,S,M)=>{const{slotScopeIds:_}=v;_&&(S=S?S.concat(_):_);const N=r(A),D=p(o(A),v,N,x,E,S,M);return D&&Ud(D)&&D.data==="]"?o(v.anchor=D):(Sd(),a(v.anchor=u("]"),N,D),D)},m=(A,v,x,E,S,M)=>{if(Xz(A,v)||Sd(),v.el=null,M){const D=y(A);for(;;){const T=o(A);if(T&&T!==D)l(T);else break}}const _=o(A),N=r(A);return l(A),n(null,v,N,_,x,E,A0(N),S),x&&(x.vnode.el=v.el,G2(x,v.el)),_},y=(A,v="[",x="]")=>{let E=0;for(;A;)if(A=o(A),A&&Ud(A)&&(A.data===v&&E++,A.data===x)){if(E===0)return o(A);E--}return A},w=(A,v,x)=>{const E=v.parentNode;E&&E.replaceChild(A,v);let S=x;for(;S;)S.vnode.el===v&&(S.vnode.el=S.subTree.el=A),S=S.parent},k=A=>A.nodeType===1&&A.tagName==="TEMPLATE";return[c,d]}const nm="data-allow-mismatch",Jz={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function vg(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(nm);)e=e.parentElement;return Q8(e&&e.getAttribute(nm),t)}function Q8(e,t){if(e==null)return!1;if(e==="")return!0;{const n=e.split(",");return t===0&&n.includes("children")?!0:n.includes(Jz[t])}}function Xz(e,t){return vg(e.parentElement,1)||eO(e)||tO(t)}function eO(e){return e.nodeType===1&&Q8(e.getAttribute(nm),1)}function tO({props:e}){const t=e&&e[nm];return typeof t=="string"&&Q8(t,1)}const nO=z2().requestIdleCallback||(e=>setTimeout(e,1)),iO=z2().cancelIdleCallback||(e=>clearTimeout(e)),$Qe=(e=1e4)=>t=>{const n=nO(t,{timeout:e});return()=>iO(n)};function sO(e){const{top:t,left:n,bottom:i,right:s}=e.getBoundingClientRect(),{innerHeight:o,innerWidth:r}=window;return(t>0&&t<o||i>0&&i<o)&&(n>0&&n<r||s>0&&s<r)}const DQe=e=>(t,n)=>{const i=new IntersectionObserver(s=>{for(const o of s)if(o.isIntersecting){i.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(sO(s))return t(),i.disconnect(),!1;i.observe(s)}}),()=>i.disconnect()},RQe=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},zQe=(e=[])=>(t,n)=>{wi(e)&&(e=[e]);let i=!1;const s=r=>{i||(i=!0,o(),t(),r.target.dispatchEvent(new r.constructor(r.type,r)))},o=()=>{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})}),o};function oO(e,t){if(Ud(e)&&e.data==="["){let n=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(Ud(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else t(e)}const ka=e=>!!e.type.__asyncLoader;function rl(e){hn(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:i,delay:s=200,hydrate:o,timeout:r,suspensible:l=!0,onError:a}=e;let u=null,c,d=0;const f=()=>(d++,u=null,p()),p=()=>{let g;return u||(g=u=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((y,w)=>{a(m,()=>y(f()),()=>w(m),d+1)});throw m}).then(m=>g!==u&&u?u:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),c=m,m)))};return tt({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(g,m,y){let w=!1;(m.bu||(m.bu=[])).push(()=>w=!0);const k=()=>{w||y()},A=o?()=>{const v=o(k,x=>oO(g,x));v&&(m.bum||(m.bum=[])).push(v)}:k;c?A():p().then(()=>!m.isUnmounted&&A())},get __asyncResolved(){return c},setup(){const g=so;if(G8(g),c)return()=>C0(c,g);const m=x=>{u=null,zf(x,g,13,!i)};if(l&&g.suspense||qc)return p().then(x=>()=>C0(x,g)).catch(x=>(m(x),()=>i?V(i,{error:x}):null));const y=Z(!1),w=Z(),k=Z(!!s);let A,v;return An(()=>{A!=null&&clearTimeout(A),v!=null&&clearTimeout(v)}),s&&(v=setTimeout(()=>{g.isUnmounted||(k.value=!1)},s)),r!=null&&(A=setTimeout(()=>{if(!g.isUnmounted&&!y.value&&!w.value){const x=new Error(`Async component timed out after ${r}ms.`);m(x),w.value=x}},r)),p().then(()=>{g.isUnmounted||(y.value=!0,g.parent&&mp(g.parent.vnode)&&g.parent.update())}).catch(x=>{if(g.isUnmounted){u=null;return}m(x),w.value=x}),()=>{if(y.value&&c)return C0(c,g);if(w.value&&i)return V(i,{error:w.value});if(n&&!k.value)return C0(n,g)}}})}function C0(e,t){const{ref:n,props:i,children:s,ce:o}=t.vnode,r=V(e,i,s);return r.ref=n,r.ce=o,delete t.vnode.ce,r}const mp=e=>e.type.__isKeepAlive,rO={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=As(),i=n.ctx;if(!i.renderer)return()=>{const k=t.default&&t.default();return k&&k.length===1?k[0]:k};const s=new Map,o=new Set;let r=null;const l=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:d}}}=i,f=d("div");i.activate=(k,A,v,x,E)=>{const S=k.component;u(k,A,v,0,l),a(S.vnode,k,A,v,S,l,x,k.slotScopeIds,E),hs(()=>{S.isDeactivated=!1,S.a&&sf(S.a);const M=k.props&&k.props.onVnodeMounted;M&&Go(M,S.parent,k)},l)},i.deactivate=k=>{const A=k.component;sm(A.m),sm(A.a),u(k,f,null,1,l),hs(()=>{A.da&&sf(A.da);const v=k.props&&k.props.onVnodeUnmounted;v&&Go(v,A.parent,k),A.isDeactivated=!0},l)};function p(k){R9(k),c(k,n,l,!0)}function g(k){s.forEach((A,v)=>{const x=O4(ka(A)?A.type.__asyncResolved||{}:A.type);x&&!k(x)&&m(v)})}function m(k){const A=s.get(k);A&&(!r||!il(A,r))?p(A):r&&R9(r),s.delete(k),o.delete(k)}Qe(()=>[e.include,e.exclude],([k,A])=>{k&&g(v=>Oh(k,v)),A&&g(v=>!Oh(A,v))},{flush:"post",deep:!0});let y=null;const w=()=>{y!=null&&(om(n.subTree.type)?hs(()=>{s.set(y,w0(n.subTree))},n.subTree.suspense):s.set(y,w0(n.subTree)))};return pn(w),vp(w),Gn(()=>{s.forEach(k=>{const{subTree:A,suspense:v}=n,x=w0(A);if(k.type===x.type&&k.key===x.key){R9(x);const E=x.component.da;E&&hs(E,v);return}p(k)})}),()=>{if(y=null,!t.default)return r=null;const k=t.default(),A=k[0];if(k.length>1)return r=null,k;if(!ku(A)||!(A.shapeFlag&4)&&!(A.shapeFlag&128))return r=null,A;let v=w0(A);if(v.type===ms)return r=null,v;const x=v.type,E=O4(ka(v)?v.type.__asyncResolved||{}:x),{include:S,exclude:M,max:_}=e;if(S&&(!E||!Oh(S,E))||M&&E&&Oh(M,E))return v.shapeFlag&=-257,r=v,A;const N=v.key==null?x:v.key,D=s.get(N);return v.el&&(v=Sa(v),A.shapeFlag&128&&(A.ssContent=v)),y=N,D?(v.el=D.el,v.component=D.component,v.transition&&bu(v,v.transition),v.shapeFlag|=512,o.delete(N),o.add(N)):(o.add(N),_&&o.size>parseInt(_,10)&&m(o.values().next().value)),v.shapeFlag|=256,r=v,om(A.type)?A:v}}},OQe=rO;function Oh(e,t){return Xt(e)?e.some(n=>Oh(n,t)):wi(e)?e.split(",").includes(t):WR(e)?(e.lastIndex=0,e.test(t)):!1}function lO(e,t){uI(e,"a",t)}function aO(e,t){uI(e,"da",t)}function uI(e,t,n=so){const i=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(V2(t,i,n),n){let s=n.parent;for(;s&&s.parent;)mp(s.parent.vnode)&&uO(i,t,n,s),s=s.parent}}function uO(e,t,n,i){const s=V2(t,e,i,!0);An(()=>{H8(i[t],s)},n)}function R9(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function w0(e){return e.shapeFlag&128?e.ssContent:e}function V2(e,t,n=so,i=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{Wl();const l=Pf(n),a=Hr(t,n,e,r);return l(),ql(),a});return i?s.unshift(o):s.push(o),o}}const Ta=e=>(t,n=so)=>{(!qc||e==="sp")&&V2(e,(...i)=>t(...i),n)},cO=Ta("bm"),pn=Ta("m"),cI=Ta("bu"),vp=Ta("u"),Gn=Ta("bum"),An=Ta("um"),dO=Ta("sp"),fO=Ta("rtg"),hO=Ta("rtc");function pO(e,t=so){V2("ec",e,t)}const Y8="components",gO="directives";function mO(e,t){return J8(Y8,e,!0,t)||e}const dI=Symbol.for("v-ndc");function Ms(e){return wi(e)?J8(Y8,e,!1)||e:e||dI}function PQe(e){return J8(gO,e)}function J8(e,t,n=!0,i=!1){const s=oo||so;if(s){const o=s.type;if(e===Y8){const l=O4(o,!1);if(l&&(l===t||l===Ls(t)||l===D2(Ls(t))))return o}const r=Y6(s[e]||o[e],t)||Y6(s.appContext[e],t);return!r&&i?o:r}}function Y6(e,t){return e&&(e[t]||e[Ls(t)]||e[D2(Ls(t))])}function yt(e,t,n,i){let s;const o=n&&n[i],r=Xt(e);if(r||wi(e)){const l=r&&du(e);let a=!1,u=!1;l&&(a=!br(e),u=_a(e),e=H2(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(a?u?xf(fl(e[c])):fl(e[c]):e[c],c,void 0,o&&o[c])}else if(typeof e=="number"){s=new Array(e);for(let l=0;l<e;l++)s[l]=t(l+1,l,void 0,o&&o[l])}else if(si(e))if(e[Symbol.iterator])s=Array.from(e,(l,a)=>t(l,a,void 0,o&&o[a]));else{const l=Object.keys(e);s=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];s[a]=t(e[c],c,a,o&&o[a])}}else s=[];return n&&(n[i]=s),s}function fI(e,t){for(let n=0;n<t.length;n++){const i=t[n];if(Xt(i))for(let s=0;s<i.length;s++)e[i[s].name]=i[s].fn;else i&&(e[i.name]=i.key?(...s)=>{const o=i.fn(...s);return o&&(o.key=i.key),o}:i.fn)}return e}function En(e,t,n={},i,s){if(oo.ce||oo.parent&&ka(oo.parent)&&oo.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),b(),fe(Be,null,[V("slot",n,i&&i())],u?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),b();const r=o&&X8(o(n)),l=n.key||r&&r.key,a=fe(Be,{key:(l&&!_r(l)?l:`_${t}`)+(!r&&i?"_fb":"")},r||(i?i():[]),r&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function X8(e){return e.some(t=>ku(t)?!(t.type===ms||t.type===Be&&!X8(t.children)):!0)?e:null}function jQe(e,t){const n={};for(const i in e)n[t&&/[A-Z]/.test(i)?`on:${i}`:mg(i)]=e[i];return n}const L4=e=>e?zI(e)?yp(e):L4(e.parent):null,l1=gi(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=>L4(e.parent),$root:e=>L4(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e5(e),$forceUpdate:e=>e.f||(e.f=()=>{V8(e.update)}),$nextTick:e=>e.n||(e.n=kt.bind(e.proxy)),$watch:e=>Hz.bind(e)}),z9=(e,t)=>e!==$n&&!e.__isScriptSetup&&ii(e,t),N4={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:o,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const f=r[t];if(f!==void 0)switch(f){case 1:return i[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(z9(i,t))return r[t]=1,i[t];if(s!==$n&&ii(s,t))return r[t]=2,s[t];if(ii(o,t))return r[t]=3,o[t];if(n!==$n&&ii(n,t))return r[t]=4,n[t];F4&&(r[t]=0)}}const u=l1[t];let c,d;if(u)return t==="$attrs"&&bo(e.attrs,"get",""),u(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==$n&&ii(n,t))return r[t]=4,n[t];if(d=a.config.globalProperties,ii(d,t))return d[t]},set({_:e},t,n){const{data:i,setupState:s,ctx:o}=e;return z9(s,t)?(s[t]=n,!0):i!==$n&&ii(i,t)?(i[t]=n,!0):ii(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:s,props:o,type:r}},l){let a;return!!(n[l]||e!==$n&&l[0]!=="$"&&ii(e,l)||z9(t,l)||ii(o,l)||ii(i,l)||ii(l1,l)||ii(s.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ii(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},vO=gi({},N4,{get(e,t){if(t!==Symbol.unscopables)return N4.get(e,t,e)},has(e,t){return t[0]!=="_"&&!ZR(t)}});function HQe(){return null}function WQe(){return null}function qQe(e){}function UQe(e){}function KQe(){return null}function VQe(){}function ZQe(e,t){return null}function GQe(){return hI().slots}function Of(){return hI().attrs}function hI(e){const t=As();return t.setupContext||(t.setupContext=jI(t))}function O1(e){return Xt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function QQe(e,t){const n=O1(e);for(const i in t){if(i.startsWith("__skip"))continue;let s=n[i];s?Xt(s)||hn(s)?s=n[i]={type:s,default:t[i]}:s.default=t[i]:s===null&&(s=n[i]={default:t[i]}),s&&t[`__skip_${i}`]&&(s.skipFactory=!0)}return n}function YQe(e,t){return!e||!t?e||t:Xt(e)&&Xt(t)?e.concat(t):gi({},O1(e),O1(t))}function JQe(e,t){const n={};for(const i in e)t.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>e[i]});return n}function XQe(e){const t=As(),n=qc;let i=e();j1(),n&&uf(!1);const s=()=>{Pf(t),n&&uf(!0)},o=()=>{As()!==t&&t.scope.off(),j1(),n&&uf(!1)};return W8(i)&&(i=i.catch(r=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(o)),r})),[i,()=>{s(),Promise.resolve().then(o)}]}let F4=!0;function yO(e){const t=e5(e),n=e.proxy,i=e.ctx;F4=!1,t.beforeCreate&&J6(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:r,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:g,activated:m,deactivated:y,beforeDestroy:w,beforeUnmount:k,destroyed:A,unmounted:v,render:x,renderTracked:E,renderTriggered:S,errorCaptured:M,serverPrefetch:_,expose:N,inheritAttrs:D,components:T,directives:$,filters:P}=t;if(u&&bO(u,i,null),r)for(const W in r){const z=r[W];hn(z)&&(i[W]=z.bind(n))}if(s){const W=s.call(n,n);si(W)&&(e.data=Ts(W))}if(F4=!0,o)for(const W in o){const z=o[W],G=hn(z)?z.bind(n,n):hn(z.get)?z.get.bind(n,n):Pr,K=!hn(z)&&hn(z.set)?z.set.bind(n):Pr,H=F({get:G,set:K});Object.defineProperty(i,W,{enumerable:!0,configurable:!0,get:()=>H.value,set:q=>H.value=q})}if(l)for(const W in l)pI(l[W],i,n,W);if(a){const W=hn(a)?a.call(n):a;Reflect.ownKeys(W).forEach(z=>{Pn(z,W[z])})}c&&J6(c,e,"c");function R(W,z){Xt(z)?z.forEach(G=>W(G.bind(n))):z&&W(z.bind(n))}if(R(cO,d),R(pn,f),R(cI,p),R(vp,g),R(lO,m),R(aO,y),R(pO,M),R(hO,E),R(fO,S),R(Gn,k),R(An,v),R(dO,_),Xt(N))if(N.length){const W=e.exposed||(e.exposed={});N.forEach(z=>{Object.defineProperty(W,z,{get:()=>n[z],set:G=>n[z]=G,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===Pr&&(e.render=x),D!=null&&(e.inheritAttrs=D),T&&(e.components=T),$&&(e.directives=$),_&&G8(e)}function bO(e,t,n=Pr){Xt(e)&&(e=B4(e));for(const i in e){const s=e[i];let o;si(s)?"default"in s?o=an(s.from||i,s.default,!0):o=an(s.from||i):o=an(s),ls(o)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[i]=o}}function J6(e,t,n){Hr(Xt(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function pI(e,t,n,i){let s=i.includes(".")?tI(n,i):()=>n[i];if(wi(e)){const o=t[e];hn(o)&&Qe(s,o)}else if(hn(e))Qe(s,e.bind(n));else if(si(e))if(Xt(e))e.forEach(o=>pI(o,t,n,i));else{const o=hn(e.handler)?e.handler.bind(n):t[e.handler];hn(o)&&Qe(s,o,e)}}function e5(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,l=o.get(t);let a;return l?a=l:!s.length&&!n&&!i?a=t:(a={},s.length&&s.forEach(u=>im(a,u,r,!0)),im(a,t,r)),si(t)&&o.set(t,a),a}function im(e,t,n,i=!1){const{mixins:s,extends:o}=t;o&&im(e,o,n,!0),s&&s.forEach(r=>im(e,r,n,!0));for(const r in t)if(!(i&&r==="expose")){const l=kO[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const kO={data:X6,props:e7,emits:e7,methods:Ph,computed:Ph,beforeCreate:Io,created:Io,beforeMount:Io,mounted:Io,beforeUpdate:Io,updated:Io,beforeDestroy:Io,beforeUnmount:Io,destroyed:Io,unmounted:Io,activated:Io,deactivated:Io,errorCaptured:Io,serverPrefetch:Io,components:Ph,directives:Ph,watch:CO,provide:X6,inject:AO};function X6(e,t){return t?e?function(){return gi(hn(e)?e.call(this,this):e,hn(t)?t.call(this,this):t)}:t:e}function AO(e,t){return Ph(B4(e),B4(t))}function B4(e){if(Xt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Io(e,t){return e?[...new Set([].concat(e,t))]:t}function Ph(e,t){return e?gi(Object.create(null),e,t):t}function e7(e,t){return e?Xt(e)&&Xt(t)?[...new Set([...e,...t])]:gi(Object.create(null),O1(e),O1(t??{})):t}function CO(e,t){if(!e)return t;if(!t)return e;const n=gi(Object.create(null),e);for(const i in t)n[i]=Io(e[i],t[i]);return n}function gI(){return{app:null,config:{isNativeTag:xM,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let wO=0;function xO(e,t){return function(i,s=null){hn(i)||(i=gi({},i)),s!=null&&!si(s)&&(s=null);const o=gI(),r=new WeakSet,l=[];let a=!1;const u=o.app={_uid:wO++,_component:i,_props:s,_container:null,_context:o,_instance:null,version:XO,get config(){return o.config},set config(c){},use(c,...d){return r.has(c)||(c&&hn(c.install)?(r.add(c),c.install(u,...d)):hn(c)&&(r.add(c),c(u,...d))),u},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),u},component(c,d){return d?(o.components[c]=d,u):o.components[c]},directive(c,d){return d?(o.directives[c]=d,u):o.directives[c]},mount(c,d,f){if(!a){const p=u._ceVNode||V(i,s);return p.appContext=o,f===!0?f="svg":f===!1&&(f=void 0),d&&t?t(p,c):e(p,c,f),a=!0,u._container=c,c.__vue_app__=u,yp(p.component)}},onUnmount(c){l.push(c)},unmount(){a&&(Hr(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return o.provides[c]=d,u},runWithContext(c){const d=$c;$c=u;try{return c()}finally{$c=d}}};return u}}let $c=null;function eYe(e,t,n=$n){const i=As(),s=Ls(t),o=er(t),r=mI(e,s),l=Mz((a,u)=>{let c,d=$n,f;return jz(()=>{const p=e[s];js(c,p)&&(c=p,u())}),{get(){return a(),n.get?n.get(c):c},set(p){const g=n.set?n.set(p):p;if(!js(g,c)&&!(d!==$n&&js(p,d)))return;const m=i.vnode.props,y=!!(m&&(t in m||s in m||o in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${o}`in m));y||(c=p,u()),i.emit(`update:${t}`,g),js(p,d)&&(js(p,g)&&!js(g,f)||y&&d!==$n&&!js(g,c))&&u(),d=p,f=g}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?r||$n:l,done:!1}:{done:!0}}}},l}const mI=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ls(t)}Modifiers`]||e[`${er(t)}Modifiers`];function _O(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||$n;let s=n;const o=t.startsWith("update:"),r=o&&mI(i,t.slice(7));r&&(r.trim&&(s=n.map(c=>wi(c)?c.trim():c)),r.number&&(s=n.map(R2)));let l,a=i[l=mg(t)]||i[l=mg(Ls(t))];!a&&o&&(a=i[l=mg(er(t))]),a&&Hr(a,e,6,s);const u=i[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Hr(u,e,6,s)}}const SO=new WeakMap;function vI(e,t,n=!1){const i=n?SO:t.emitsCache,s=i.get(e);if(s!==void 0)return s;const o=e.emits;let r={},l=!1;if(!hn(e)){const a=u=>{const c=vI(u,t,!0);c&&(l=!0,gi(r,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(si(e)&&i.set(e,null),null):(Xt(o)?o.forEach(a=>r[a]=null):gi(r,o),si(e)&&i.set(e,r),r)}function Z2(e,t){return!e||!hp(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ii(e,t[0].toLowerCase()+t.slice(1))||ii(e,er(t))||ii(e,t))}function yg(e){const{type:t,vnode:n,proxy:i,withProxy:s,propsOptions:[o],slots:r,attrs:l,emit:a,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:g,inheritAttrs:m}=e,y=R1(e);let w,k;try{if(n.shapeFlag&4){const v=s||i,x=v;w=Xo(u.call(x,v,c,d,p,f,g)),k=l}else{const v=t;w=Xo(v.length>1?v(d,{attrs:l,slots:r,emit:a}):v(d,null)),k=t.props?l:IO(l)}}catch(v){a1.length=0,zf(v,e,1),w=V(ms)}let A=w;if(k&&m!==!1){const v=Object.keys(k),{shapeFlag:x}=A;v.length&&x&7&&(o&&v.some(N2)&&(k=EO(k,o)),A=Sa(A,k,!1,!0))}return n.dirs&&(A=Sa(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&bu(A,n.transition),w=A,R1(y),w}function MO(e,t=!0){let n;for(let i=0;i<e.length;i++){const s=e[i];if(ku(s)){if(s.type!==ms||s.children==="v-if"){if(n)return;n=s}}else return}return n}const IO=e=>{let t;for(const n in e)(n==="class"||n==="style"||hp(n))&&((t||(t={}))[n]=e[n]);return t},EO=(e,t)=>{const n={};for(const i in e)(!N2(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function TO(e,t,n){const{props:i,children:s,component:o}=e,{props:r,children:l,patchFlag:a}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return i?t7(i,r,u):!!r;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(yI(r,i,f)&&!Z2(u,f))return!0}}}else return(s||l)&&(!l||!l.$stable)?!0:i===r?!1:i?r?t7(i,r,u):!0:!!r;return!1}function t7(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let s=0;s<i.length;s++){const o=i[s];if(yI(t,e,o)&&!Z2(n,o))return!0}return!1}function yI(e,t,n){const i=e[n],s=t[n];return n==="style"&&si(i)&&si(s)?!xa(i,s):i!==s}function G2({vnode:e,parent:t,suspense:n},i){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.suspense.vnode.el=s.el=i,e=s),s===e)(e=t.vnode).el=i,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=i)}const bI={},kI=()=>Object.create(bI),AI=e=>Object.getPrototypeOf(e)===bI;function LO(e,t,n,i=!1){const s={},o=kI();e.propsDefaults=Object.create(null),CI(e,t,s,o);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);n?e.props=i?s:KM(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function NO(e,t,n,i){const{props:s,attrs:o,vnode:{patchFlag:r}}=e,l=Vn(s),[a]=e.propsOptions;let u=!1;if((i||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Z2(e.emitsOptions,f))continue;const p=t[f];if(a)if(ii(o,f))p!==o[f]&&(o[f]=p,u=!0);else{const g=Ls(f);s[g]=$4(a,l,g,p,e,!1)}else p!==o[f]&&(o[f]=p,u=!0)}}}else{CI(e,t,s,o)&&(u=!0);let c;for(const d in l)(!t||!ii(t,d)&&((c=er(d))===d||!ii(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=$4(a,l,d,void 0,e,!0)):delete s[d]);if(o!==l)for(const d in o)(!t||!ii(t,d))&&(delete o[d],u=!0)}u&&fa(e.attrs,"set","")}function CI(e,t,n,i){const[s,o]=e.propsOptions;let r=!1,l;if(t)for(let a in t){if(Fc(a))continue;const u=t[a];let c;s&&ii(s,c=Ls(a))?!o||!o.includes(c)?n[c]=u:(l||(l={}))[c]=u:Z2(e.emitsOptions,a)||(!(a in i)||u!==i[a])&&(i[a]=u,r=!0)}if(o){const a=Vn(n),u=l||$n;for(let c=0;c<o.length;c++){const d=o[c];n[d]=$4(s,a,d,u[d],e,!ii(u,d))}}return r}function $4(e,t,n,i,s,o){const r=e[n];if(r!=null){const l=ii(r,"default");if(l&&i===void 0){const a=r.default;if(r.type!==Function&&!r.skipFactory&&hn(a)){const{propsDefaults:u}=s;if(n in u)i=u[n];else{const c=Pf(s);i=u[n]=a.call(null,t),c()}}else i=a;s.ce&&s.ce._setProp(n,i)}r[0]&&(o&&!l?i=!1:r[1]&&(i===""||i===er(n))&&(i=!0))}return i}const FO=new WeakMap;function wI(e,t,n=!1){const i=n?FO:t.propsCache,s=i.get(e);if(s)return s;const o=e.props,r={},l=[];let a=!1;if(!hn(e)){const c=d=>{a=!0;const[f,p]=wI(d,t,!0);gi(r,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!a)return si(e)&&i.set(e,tf),tf;if(Xt(o))for(let c=0;c<o.length;c++){const d=Ls(o[c]);n7(d)&&(r[d]=$n)}else if(o)for(const c in o){const d=Ls(c);if(n7(d)){const f=o[c],p=r[d]=Xt(f)||hn(f)?{type:f}:gi({},f),g=p.type;let m=!1,y=!0;if(Xt(g))for(let w=0;w<g.length;++w){const k=g[w],A=hn(k)&&k.name;if(A==="Boolean"){m=!0;break}else A==="String"&&(y=!1)}else m=hn(g)&&g.name==="Boolean";p[0]=m,p[1]=y,(m||ii(p,"default"))&&l.push(d)}}const u=[r,l];return si(e)&&i.set(e,u),u}function n7(e){return e[0]!=="$"&&!Fc(e)}const t5=e=>e==="_"||e==="_ctx"||e==="$stable",n5=e=>Xt(e)?e.map(Xo):[Xo(e)],BO=(e,t,n)=>{if(t._n)return t;const i=he((...s)=>n5(t(...s)),n);return i._c=!1,i},xI=(e,t,n)=>{const i=e._ctx;for(const s in e){if(t5(s))continue;const o=e[s];if(hn(o))t[s]=BO(s,o,i);else if(o!=null){const r=n5(o);t[s]=()=>r}}},_I=(e,t)=>{const n=n5(t);e.slots.default=()=>n},SI=(e,t,n)=>{for(const i in t)(n||!t5(i))&&(e[i]=t[i])},$O=(e,t,n)=>{const i=e.slots=kI();if(e.vnode.shapeFlag&32){const s=t._;s?(SI(i,t,n),n&&SM(i,"_",s,!0)):xI(t,i)}else t&&_I(e,t)},DO=(e,t,n)=>{const{vnode:i,slots:s}=e;let o=!0,r=$n;if(i.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:SI(s,t,n):(o=!t.$stable,xI(t,s)),r=t}else t&&(_I(e,t),r={default:1});if(o)for(const l in s)!t5(l)&&r[l]==null&&delete s[l]},hs=NI;function RO(e){return MI(e)}function zO(e){return MI(e,Yz)}function MI(e,t){const n=z2();n.__VUE__=!0;const{insert:i,remove:s,patchProp:o,createElement:r,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=Pr,insertStaticContent:g}=e,m=(j,Y,ve,re=null,se=null,U=null,J=void 0,de=null,me=!!Y.dynamicChildren)=>{if(j===Y)return;j&&!il(j,Y)&&(re=xe(j),q(j,se,U,!0),j=null),Y.patchFlag===-2&&(me=!1,Y.dynamicChildren=null);const{type:Ie,ref:je,shapeFlag:ke}=Y;switch(Ie){case hu:y(j,Y,ve,re);break;case ms:w(j,Y,ve,re);break;case af:j==null&&k(Y,ve,re,J);break;case Be:T(j,Y,ve,re,se,U,J,de,me);break;default:ke&1?x(j,Y,ve,re,se,U,J,de,me):ke&6?$(j,Y,ve,re,se,U,J,de,me):(ke&64||ke&128)&&Ie.process(j,Y,ve,re,se,U,J,de,me,Ne)}je!=null&&se?rf(je,j&&j.ref,U,Y||j,!Y):je==null&&j&&j.ref!=null&&rf(j.ref,null,U,j,!0)},y=(j,Y,ve,re)=>{if(j==null)i(Y.el=l(Y.children),ve,re);else{const se=Y.el=j.el;Y.children!==j.children&&u(se,Y.children)}},w=(j,Y,ve,re)=>{j==null?i(Y.el=a(Y.children||""),ve,re):Y.el=j.el},k=(j,Y,ve,re)=>{[j.el,j.anchor]=g(j.children,Y,ve,re,j.el,j.anchor)},A=({el:j,anchor:Y},ve,re)=>{let se;for(;j&&j!==Y;)se=f(j),i(j,ve,re),j=se;i(Y,ve,re)},v=({el:j,anchor:Y})=>{let ve;for(;j&&j!==Y;)ve=f(j),s(j),j=ve;s(Y)},x=(j,Y,ve,re,se,U,J,de,me)=>{if(Y.type==="svg"?J="svg":Y.type==="math"&&(J="mathml"),j==null)E(Y,ve,re,se,U,J,de,me);else{const Ie=j.el&&j.el._isVueCE?j.el:null;try{Ie&&Ie._beginPatch(),_(j,Y,se,U,J,de,me)}finally{Ie&&Ie._endPatch()}}},E=(j,Y,ve,re,se,U,J,de)=>{let me,Ie;const{props:je,shapeFlag:ke,transition:Le,dirs:it}=j;if(me=j.el=r(j.type,U,je&&je.is,je),ke&8?c(me,j.children):ke&16&&M(j.children,me,null,re,se,O9(j,U),J,de),it&&Bl(j,null,re,"created"),S(me,j,j.scopeId,J,re),je){for(const Re in je)Re!=="value"&&!Fc(Re)&&o(me,Re,null,je[Re],U,re);"value"in je&&o(me,"value",null,je.value,U),(Ie=je.onVnodeBeforeMount)&&Go(Ie,re,j)}it&&Bl(j,null,re,"beforeMount");const Fe=II(se,Le);Fe&&Le.beforeEnter(me),i(me,Y,ve),((Ie=je&&je.onVnodeMounted)||Fe||it)&&hs(()=>{try{Ie&&Go(Ie,re,j),Fe&&Le.enter(me),it&&Bl(j,null,re,"mounted")}finally{}},se)},S=(j,Y,ve,re,se)=>{if(ve&&p(j,ve),re)for(let U=0;U<re.length;U++)p(j,re[U]);if(se){let U=se.subTree;if(Y===U||om(U.type)&&(U.ssContent===Y||U.ssFallback===Y)){const J=se.vnode;S(j,J,J.scopeId,J.slotScopeIds,se.parent)}}},M=(j,Y,ve,re,se,U,J,de,me=0)=>{for(let Ie=me;Ie<j.length;Ie++){const je=j[Ie]=de?da(j[Ie]):Xo(j[Ie]);m(null,je,Y,ve,re,se,U,J,de)}},_=(j,Y,ve,re,se,U,J)=>{const de=Y.el=j.el;let{patchFlag:me,dynamicChildren:Ie,dirs:je}=Y;me|=j.patchFlag&16;const ke=j.props||$n,Le=Y.props||$n;let it;if(ve&&sc(ve,!1),(it=Le.onVnodeBeforeUpdate)&&Go(it,ve,Y,j),je&&Bl(Y,j,ve,"beforeUpdate"),ve&&sc(ve,!0),Ie&&(!j.dynamicChildren||j.dynamicChildren.length!==Ie.length)&&(me=0,J=!1,Ie=null),(ke.innerHTML&&Le.innerHTML==null||ke.textContent&&Le.textContent==null)&&c(de,""),Ie?N(j.dynamicChildren,Ie,de,ve,re,O9(Y,se),U):J||z(j,Y,de,null,ve,re,O9(Y,se),U,!1),me>0){if(me&16)D(de,ke,Le,ve,se);else if(me&2&&ke.class!==Le.class&&o(de,"class",null,Le.class,se),me&4&&o(de,"style",ke.style,Le.style,se),me&8){const Fe=Y.dynamicProps;for(let Re=0;Re<Fe.length;Re++){const Ke=Fe[Re],ht=ke[Ke],ot=Le[Ke];(ot!==ht||Ke==="value")&&o(de,Ke,ht,ot,se,ve)}}me&1&&j.children!==Y.children&&c(de,Y.children)}else!J&&Ie==null&&D(de,ke,Le,ve,se);((it=Le.onVnodeUpdated)||je)&&hs(()=>{it&&Go(it,ve,Y,j),je&&Bl(Y,j,ve,"updated")},re)},N=(j,Y,ve,re,se,U,J)=>{for(let de=0;de<Y.length;de++){const me=j[de],Ie=Y[de],je=me.el&&(me.type===Be||!il(me,Ie)||me.shapeFlag&198)?d(me.el):ve;m(me,Ie,je,null,re,se,U,J,!0)}},D=(j,Y,ve,re,se)=>{if(Y!==ve){if(Y!==$n)for(const U in Y)!Fc(U)&&!(U in ve)&&o(j,U,Y[U],null,se,re);for(const U in ve){if(Fc(U))continue;const J=ve[U],de=Y[U];J!==de&&U!=="value"&&o(j,U,de,J,se,re)}"value"in ve&&o(j,"value",Y.value,ve.value,se)}},T=(j,Y,ve,re,se,U,J,de,me)=>{const Ie=Y.el=j?j.el:l(""),je=Y.anchor=j?j.anchor:l("");let{patchFlag:ke,dynamicChildren:Le,slotScopeIds:it}=Y;it&&(de=de?de.concat(it):it),j==null?(i(Ie,ve,re),i(je,ve,re),M(Y.children||[],ve,je,se,U,J,de,me)):ke>0&&ke&64&&Le&&j.dynamicChildren&&j.dynamicChildren.length===Le.length?(N(j.dynamicChildren,Le,ve,se,U,J,de),(Y.key!=null||se&&Y===se.subTree)&&i5(j,Y,!0)):z(j,Y,ve,je,se,U,J,de,me)},$=(j,Y,ve,re,se,U,J,de,me)=>{Y.slotScopeIds=de,j==null?Y.shapeFlag&512?se.ctx.activate(Y,ve,re,J,me):P(Y,ve,re,se,U,J,me):O(j,Y,me)},P=(j,Y,ve,re,se,U,J)=>{const de=j.component=RI(j,re,se);if(mp(j)&&(de.ctx.renderer=Ne),OI(de,!1,J),de.asyncDep){if(se&&se.registerDep(de,R,J),!j.el){const me=de.subTree=V(ms);w(null,me,Y,ve),j.placeholder=me.el}}else R(de,j,Y,ve,se,U,J)},O=(j,Y,ve)=>{const re=Y.component=j.component;if(TO(j,Y,ve))if(re.asyncDep&&!re.asyncResolved){W(re,Y,ve);return}else re.next=Y,re.update();else Y.el=j.el,re.vnode=Y},R=(j,Y,ve,re,se,U,J)=>{const de=()=>{if(j.isMounted){let{next:ke,bu:Le,u:it,parent:Fe,vnode:Re}=j;{const Tt=EI(j);if(Tt){ke&&(ke.el=Re.el,W(j,ke,J)),Tt.asyncDep.then(()=>{hs(()=>{j.isUnmounted||Ie()},se)});return}}let Ke=ke,ht;sc(j,!1),ke?(ke.el=Re.el,W(j,ke,J)):ke=Re,Le&&sf(Le),(ht=ke.props&&ke.props.onVnodeBeforeUpdate)&&Go(ht,Fe,ke,Re),sc(j,!0);const ot=yg(j),gt=j.subTree;j.subTree=ot,m(gt,ot,d(gt.el),xe(gt),j,se,U),ke.el=ot.el,Ke===null&&G2(j,ot.el),it&&hs(it,se),(ht=ke.props&&ke.props.onVnodeUpdated)&&hs(()=>Go(ht,Fe,ke,Re),se)}else{let ke;const{el:Le,props:it}=Y,{bm:Fe,m:Re,parent:Ke,root:ht,type:ot}=j,gt=ka(Y);if(sc(j,!1),Fe&&sf(Fe),!gt&&(ke=it&&it.onVnodeBeforeMount)&&Go(ke,Ke,Y),sc(j,!0),Le&&ye){const Tt=()=>{j.subTree=yg(j),ye(Le,j.subTree,j,se,null)};gt&&ot.__asyncHydrate?ot.__asyncHydrate(Le,j,Tt):Tt()}else{ht.ce&&ht.ce._hasShadowRoot()&&ht.ce._injectChildStyle(ot,j.parent?j.parent.type:void 0);const Tt=j.subTree=yg(j);m(null,Tt,ve,re,j,se,U),Y.el=Tt.el}if(Re&&hs(Re,se),!gt&&(ke=it&&it.onVnodeMounted)){const Tt=Y;hs(()=>Go(ke,Ke,Tt),se)}(Y.shapeFlag&256||Ke&&ka(Ke.vnode)&&Ke.vnode.shapeFlag&256)&&j.a&&hs(j.a,se),j.isMounted=!0,Y=ve=re=null}};j.scope.on();const me=j.effect=new Gg(de);j.scope.off();const Ie=j.update=me.run.bind(me),je=j.job=me.runIfDirty.bind(me);je.i=j,je.id=j.uid,me.scheduler=()=>V8(je),sc(j,!0),Ie()},W=(j,Y,ve)=>{Y.component=j;const re=j.vnode.props;j.vnode=Y,j.next=null,NO(j,Y.props,re,ve),DO(j,Y.children,ve),Wl(),q6(j),ql()},z=(j,Y,ve,re,se,U,J,de,me=!1)=>{const Ie=j&&j.children,je=j?j.shapeFlag:0,ke=Y.children,{patchFlag:Le,shapeFlag:it}=Y;if(Le>0){if(Le&128){K(Ie,ke,ve,re,se,U,J,de,me);return}else if(Le&256){G(Ie,ke,ve,re,se,U,J,de,me);return}}it&8?(je&16&&ie(Ie,se,U),ke!==Ie&&c(ve,ke)):je&16?it&16?K(Ie,ke,ve,re,se,U,J,de,me):ie(Ie,se,U,!0):(je&8&&c(ve,""),it&16&&M(ke,ve,re,se,U,J,de,me))},G=(j,Y,ve,re,se,U,J,de,me)=>{j=j||tf,Y=Y||tf;const Ie=j.length,je=Y.length,ke=Math.min(Ie,je);let Le;for(Le=0;Le<ke;Le++){const it=Y[Le]=me?da(Y[Le]):Xo(Y[Le]);m(j[Le],it,ve,null,se,U,J,de,me)}Ie>je?ie(j,se,U,!0,!1,ke):M(Y,ve,re,se,U,J,de,me,ke)},K=(j,Y,ve,re,se,U,J,de,me)=>{let Ie=0;const je=Y.length;let ke=j.length-1,Le=je-1;for(;Ie<=ke&&Ie<=Le;){const it=j[Ie],Fe=Y[Ie]=me?da(Y[Ie]):Xo(Y[Ie]);if(il(it,Fe))m(it,Fe,ve,null,se,U,J,de,me);else break;Ie++}for(;Ie<=ke&&Ie<=Le;){const it=j[ke],Fe=Y[Le]=me?da(Y[Le]):Xo(Y[Le]);if(il(it,Fe))m(it,Fe,ve,null,se,U,J,de,me);else break;ke--,Le--}if(Ie>ke){if(Ie<=Le){const it=Le+1,Fe=it<je?Y[it].el:re;for(;Ie<=Le;)m(null,Y[Ie]=me?da(Y[Ie]):Xo(Y[Ie]),ve,Fe,se,U,J,de,me),Ie++}}else if(Ie>Le)for(;Ie<=ke;)q(j[Ie],se,U,!0),Ie++;else{const it=Ie,Fe=Ie,Re=new Map;for(Ie=Fe;Ie<=Le;Ie++){const Kt=Y[Ie]=me?da(Y[Ie]):Xo(Y[Ie]);Kt.key!=null&&Re.set(Kt.key,Ie)}let Ke,ht=0;const ot=Le-Fe+1;let gt=!1,Tt=0;const yn=new Array(ot);for(Ie=0;Ie<ot;Ie++)yn[Ie]=0;for(Ie=it;Ie<=ke;Ie++){const Kt=j[Ie];if(ht>=ot){q(Kt,se,U,!0);continue}let mn;if(Kt.key!=null)mn=Re.get(Kt.key);else for(Ke=Fe;Ke<=Le;Ke++)if(yn[Ke-Fe]===0&&il(Kt,Y[Ke])){mn=Ke;break}mn===void 0?q(Kt,se,U,!0):(yn[mn-Fe]=Ie+1,mn>=Tt?Tt=mn:gt=!0,m(Kt,Y[mn],ve,null,se,U,J,de,me),ht++)}const Gt=gt?OO(yn):tf;for(Ke=Gt.length-1,Ie=ot-1;Ie>=0;Ie--){const Kt=Fe+Ie,mn=Y[Kt],_n=Y[Kt+1],He=Kt+1<je?_n.el||TI(_n):re;yn[Ie]===0?m(null,mn,ve,He,se,U,J,de,me):gt&&(Ke<0||Ie!==Gt[Ke]?H(mn,ve,He,2):Ke--)}}},H=(j,Y,ve,re,se=null)=>{const{el:U,type:J,transition:de,children:me,shapeFlag:Ie}=j;if(Ie&6){H(j.component.subTree,Y,ve,re);return}if(Ie&128){j.suspense.move(Y,ve,re);return}if(Ie&64){J.move(j,Y,ve,Ne);return}if(J===Be){i(U,Y,ve);for(let ke=0;ke<me.length;ke++)H(me[ke],Y,ve,re);i(j.anchor,Y,ve);return}if(J===af){A(j,Y,ve);return}if(re!==2&&Ie&1&&de)if(re===0)de.persisted&&!U[Dr]?i(U,Y,ve):(de.beforeEnter(U),i(U,Y,ve),hs(()=>de.enter(U),se));else{const{leave:ke,delayLeave:Le,afterLeave:it}=de,Fe=()=>{j.ctx.isUnmounted?s(U):i(U,Y,ve)},Re=()=>{const Ke=U._isLeaving||!!U[Dr];U._isLeaving&&U[Dr](!0),de.persisted&&!Ke?Fe():ke(U,()=>{Fe(),it&&it()})};Le?Le(U,Fe,Re):Re()}else i(U,Y,ve)},q=(j,Y,ve,re=!1,se=!1)=>{const{type:U,props:J,ref:de,children:me,dynamicChildren:Ie,shapeFlag:je,patchFlag:ke,dirs:Le,cacheIndex:it,memo:Fe}=j;if(ke===-2&&(se=!1),de!=null&&(Wl(),rf(de,null,ve,j,!0),ql()),it!=null&&(Y.renderCache[it]=void 0),je&256){Y.ctx.deactivate(j);return}const Re=je&1&&Le,Ke=!ka(j);let ht;if(Ke&&(ht=J&&J.onVnodeBeforeUnmount)&&Go(ht,Y,j),je&6)ue(j.component,ve,re);else{if(je&128){j.suspense.unmount(ve,re);return}Re&&Bl(j,null,Y,"beforeUnmount"),je&64?j.type.remove(j,Y,ve,Ne,re):Ie&&!Ie.hasOnce&&(U!==Be||ke>0&&ke&64)?ie(Ie,Y,ve,!1,!0):(U===Be&&ke&384||!se&&je&16)&&ie(me,Y,ve),re&&X(j)}const ot=Fe!=null&&it==null;(Ke&&(ht=J&&J.onVnodeUnmounted)||Re||ot)&&hs(()=>{ht&&Go(ht,Y,j),Re&&Bl(j,null,Y,"unmounted"),ot&&(j.el=null)},ve)},X=j=>{const{type:Y,el:ve,anchor:re,transition:se}=j;if(Y===Be){ee(ve,re);return}if(Y===af){v(j);return}const U=()=>{s(ve),se&&!se.persisted&&se.afterLeave&&se.afterLeave()};if(j.shapeFlag&1&&se&&!se.persisted){const{leave:J,delayLeave:de}=se,me=()=>J(ve,U);de?de(j.el,U,me):me()}else U()},ee=(j,Y)=>{let ve;for(;j!==Y;)ve=f(j),s(j),j=ve;s(Y)},ue=(j,Y,ve)=>{const{bum:re,scope:se,job:U,subTree:J,um:de,m:me,a:Ie}=j;sm(me),sm(Ie),re&&sf(re),se.stop(),U&&(U.flags|=8,q(J,j,Y,ve)),de&&hs(de,Y),hs(()=>{j.isUnmounted=!0},Y)},ie=(j,Y,ve,re=!1,se=!1,U=0)=>{for(let J=U;J<j.length;J++)q(j[J],Y,ve,re,se)},xe=j=>{if(j.shapeFlag&6)return xe(j.component.subTree);if(j.shapeFlag&128)return j.suspense.next();const Y=f(j.anchor||j.el),ve=Y&&Y[nI];return ve?f(ve):Y};let ce=!1;const pe=(j,Y,ve)=>{let re;j==null?Y._vnode&&(q(Y._vnode,null,null,!0),re=Y._vnode.component):m(Y._vnode||null,j,Y,null,null,null,ve),Y._vnode=j,ce||(ce=!0,q6(re),em(),ce=!1)},Ne={p:m,um:q,m:H,r:X,mt:P,mc:M,pc:z,pbc:N,n:xe,o:e};let te,ye;return t&&([te,ye]=t(Ne)),{render:pe,hydrate:te,createApp:xO(pe,te)}}function O9({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 II(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function i5(e,t,n=!1){const i=e.children,s=t.children;if(Xt(i)&&Xt(s))for(let o=0;o<i.length;o++){const r=i[o];let l=s[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=s[o]=da(s[o]),l.el=r.el),!n&&l.patchFlag!==-2&&i5(r,l)),l.type===hu&&(l.patchFlag===-1&&(l=s[o]=da(l)),l.el=r.el),l.type===ms&&!l.el&&(l.el=r.el)}}function OO(e){const t=e.slice(),n=[0];let i,s,o,r,l;const a=e.length;for(i=0;i<a;i++){const u=e[i];if(u!==0){if(s=n[n.length-1],e[s]<u){t[i]=s,n.push(i);continue}for(o=0,r=n.length-1;o<r;)l=o+r>>1,e[n[l]]<u?o=l+1:r=l;u<e[n[o]]&&(o>0&&(t[i]=n[o-1]),n[o]=i)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=t[r];return n}function EI(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:EI(t)}function sm(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function TI(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?TI(t.subTree):null}const om=e=>e.__isSuspense;let D4=0;const PO={name:"Suspense",__isSuspense:!0,process(e,t,n,i,s,o,r,l,a,u){if(e==null)jO(t,n,i,s,o,r,l,a,u);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}HO(e,t,n,i,s,r,l,a,u)}},hydrate:WO,normalize:qO},tYe=PO;function P1(e,t){const n=e.props&&e.props[t];hn(n)&&n()}function jO(e,t,n,i,s,o,r,l,a){const{p:u,o:{createElement:c}}=a,d=c("div"),f=e.suspense=LI(e,s,i,t,d,n,o,r,l,a);u(null,f.pendingBranch=e.ssContent,d,null,i,f,o,r),f.deps>0?(P1(e,"onPending"),P1(e,"onFallback"),u(null,e.ssFallback,t,n,i,null,o,r),lf(f,e.ssFallback)):f.resolve(!1,!0)}function HO(e,t,n,i,s,o,r,l,{p:a,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:g,pendingBranch:m,isInFallback:y,isHydrating:w}=d;if(m)d.pendingBranch=f,il(m,f)?(a(m,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0?d.resolve():y&&(w||(a(g,p,n,i,s,null,o,r,l),lf(d,p)))):(d.pendingId=D4++,w?(d.isHydrating=!1,d.activeBranch=m):u(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),y?(a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0?d.resolve():(a(g,p,n,i,s,null,o,r,l),lf(d,p))):g&&il(g,f)?(a(g,f,n,i,s,d,o,r,l),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0&&d.resolve()));else if(g&&il(g,f))a(g,f,n,i,s,d,o,r,l),lf(d,f);else if(P1(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=D4++,a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0)d.resolve();else{const{timeout:k,pendingId:A}=d;k>0?setTimeout(()=>{d.pendingId===A&&d.fallback(p)},k):k===0&&d.fallback(p)}}function LI(e,t,n,i,s,o,r,l,a,u,c=!1){const{p:d,m:f,um:p,n:g,o:{parentNode:m,remove:y}}=u;let w;const k=UO(e);k&&t&&t.pendingBranch&&(w=t.pendingId,t.deps++);const A=e.props?Zg(e.props.timeout):void 0,v=o,x={vnode:e,parent:t,parentComponent:n,namespace:r,container:i,hiddenContainer:s,deps:0,pendingId:D4++,timeout:typeof A=="number"?A:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(E=!1,S=!1){const{vnode:M,activeBranch:_,pendingBranch:N,pendingId:D,effects:T,parentComponent:$,container:P,isInFallback:O}=x;let R=!1;if(x.isHydrating)x.isHydrating=!1;else if(!E){R=_&&N.transition&&N.transition.mode==="out-in";let G=!1;R&&(_.transition.afterLeave=()=>{D===x.pendingId&&(f(N,P,o===v&&!G?g(_):o,0),Xg(T),O&&M.ssFallback&&(M.ssFallback.el=null))}),_&&!x.isFallbackMountPending&&(m(_.el)===P&&(o=g(_),G=!0),p(_,$,x,!0),!R&&O&&M.ssFallback&&hs(()=>M.ssFallback.el=null,x)),R||f(N,P,o,0)}x.isFallbackMountPending=!1,lf(x,N),x.pendingBranch=null,x.isInFallback=!1;let W=x.parent,z=!1;for(;W;){if(W.pendingBranch){W.effects.push(...T),z=!0;break}W=W.parent}!z&&!R&&Xg(T),x.effects=[],k&&t&&t.pendingBranch&&w===t.pendingId&&(t.deps--,t.deps===0&&!S&&t.resolve()),P1(M,"onResolve")},fallback(E){if(!x.pendingBranch)return;const{vnode:S,activeBranch:M,parentComponent:_,container:N,namespace:D}=x;P1(S,"onFallback");const T=g(M),$=()=>{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,E,N,T,_,null,D,l,a),lf(x,E))},P=E.transition&&E.transition.mode==="out-in";P&&(x.isFallbackMountPending=!0,M.transition.afterLeave=$),x.isInFallback=!0,p(M,_,null,!0),P||$()},move(E,S,M){x.activeBranch&&f(x.activeBranch,E,S,M),x.container=E},next(){return x.activeBranch&&g(x.activeBranch)},registerDep(E,S,M){const _=!!x.pendingBranch;_&&x.deps++;const N=E.vnode.el;E.asyncDep.catch(D=>{zf(D,E,0)}).then(D=>{if(E.isUnmounted||x.isUnmounted||x.pendingId!==E.suspenseId)return;j1(),E.asyncResolved=!0;const{vnode:T}=E;R4(E,D,!1),N&&(T.el=N);const $=!N&&E.subTree.el;S(E,T,m(N||E.subTree.el),N?null:g(E.subTree),x,r,M),$&&(T.placeholder=null,y($)),G2(E,T.el),_&&--x.deps===0&&x.resolve()})},unmount(E,S){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,E,S),x.pendingBranch&&p(x.pendingBranch,n,E,S)}};return x}function WO(e,t,n,i,s,o,r,l,a){const u=t.suspense=LI(t,i,n,e.parentNode,document.createElement("div"),null,s,o,r,l,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,o,r);return u.deps===0&&u.resolve(!1,!0),c}function qO(e){const{shapeFlag:t,children:n}=e,i=t&32;e.ssContent=i7(i?n.default:n),e.ssFallback=i?i7(n.fallback):V(ms)}function i7(e){let t;if(hn(e)){const n=Wc&&e._c;n&&(e._d=!1,b()),e=e(),n&&(e._d=!0,t=Co,FI())}return Xt(e)&&(e=MO(e)),e=Xo(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function NI(e,t){t&&t.pendingBranch?Xt(e)?t.effects.push(...e):t.effects.push(e):Xg(e)}function lf(e,t){e.activeBranch=t;const{vnode:n,parentComponent:i}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,i&&i.subTree===n&&(i.vnode.el=s,G2(i,s))}function UO(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Be=Symbol.for("v-fgt"),hu=Symbol.for("v-txt"),ms=Symbol.for("v-cmt"),af=Symbol.for("v-stc"),a1=[];let Co=null;function b(e=!1){a1.push(Co=e?null:[])}function FI(){a1.pop(),Co=a1[a1.length-1]||null}let Wc=1;function rm(e,t=!1){Wc+=e,e<0&&Co&&t&&(Co.hasOnce=!0)}function BI(e){return e.dynamicChildren=Wc>0?Co||tf:null,FI(),Wc>0&&Co&&Co.push(e),e}function I(e,t,n,i,s,o){return BI(C(e,t,n,i,s,o,!0))}function fe(e,t,n,i,s){return BI(V(e,t,n,i,s,!0))}function ku(e){return e?e.__v_isVNode===!0:!1}function il(e,t){return e.type===t.type&&e.key===t.key}function nYe(e){}const $I=({key:e})=>e??null,bg=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?wi(e)||ls(e)||hn(e)?{i:oo,r:e,k:t,f:!!n}:e:null);function C(e,t=null,n=null,i=0,s=null,o=e===Be?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$I(t),ref:t&&bg(t),scopeId:K2,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:o,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:oo};return l?(lm(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=wi(n)?8:16),Wc>0&&!r&&Co&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&Co.push(a),a}const V=KO;function KO(e,t=null,n=null,i=0,s=null,o=!1){if((!e||e===dI)&&(e=ms),ku(e)){const l=Sa(e,t,!0);return n&&lm(l,n),Wc>0&&!o&&Co&&(l.shapeFlag&6?Co[Co.indexOf(e)]=l:Co.push(l)),l.patchFlag=-2,l}if(YO(e)&&(e=e.__vccOpts),t){t=DI(t);let{class:l,style:a}=t;l&&!wi(l)&&(t.class=De(l)),si(a)&&(U2(a)&&!Xt(a)&&(a=gi({},a)),t.style=Vt(a))}const r=wi(e)?1:om(e)?128:iI(e)?64:si(e)?4:hn(e)?2:0;return C(e,t,n,i,s,r,o,!0)}function DI(e){return e?U2(e)||AI(e)?gi({},e):e:null}function Sa(e,t,n=!1,i=!1){const{props:s,ref:o,patchFlag:r,children:l,transition:a}=e,u=t?Yn(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&$I(u),ref:t&&t.ref?n&&o?Xt(o)?o.concat(bg(t)):[o,bg(t)]:bg(t):o,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!==Be?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&&Sa(e.ssContent),ssFallback:e.ssFallback&&Sa(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&i&&bu(c,a.clone(c)),c}function Ue(e=" ",t=0){return V(hu,null,e,t)}function Lu(e,t){const n=V(af,null,e);return n.staticCount=t,n}function ne(e="",t=!1){return t?(b(),fe(ms,null,e)):V(ms,null,e)}function Xo(e){return e==null||typeof e=="boolean"?V(ms):Xt(e)?V(Be,null,e.slice()):ku(e)?da(e):V(hu,null,String(e))}function da(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Sa(e)}function lm(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(Xt(t))n=16;else if(typeof t=="object")if(i&65){const s=t.default;s&&(s._c&&(s._d=!1),lm(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!AI(t)?t._ctx=oo:s===3&&oo&&(oo.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(hn(t)){if(i&65){lm(e,{default:t});return}t={default:t,_ctx:oo},n=32}else t=String(t),i&64?(n=16,t=[Ue(t)]):n=8;e.children=t,e.shapeFlag|=n}function Yn(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const s in i)if(s==="class")t.class!==i.class&&(t.class=De([t.class,i.class]));else if(s==="style")t.style=Vt([t.style,i.style]);else if(hp(s)){const o=t[s],r=i[s];r&&o!==r&&!(Xt(o)&&o.includes(r))?t[s]=o?[].concat(o,r):r:r==null&&o==null&&!N2(s)&&(t[s]=r)}else s!==""&&(t[s]=i[s])}return t}function Go(e,t,n,i=null){Hr(e,t,7,[n,i])}const VO=gI();let ZO=0;function RI(e,t,n){const i=e.type,s=(t?t.appContext:e.appContext)||VO,o={uid:ZO++,vnode:e,type:i,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new TM(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wI(i,s),emitsOptions:vI(i,s),emit:null,emitted:null,propsDefaults:$n,inheritAttrs:i.inheritAttrs,ctx:$n,data:$n,props:$n,attrs:$n,slots:$n,refs:$n,setupState:$n,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=_O.bind(null,o),e.ce&&e.ce(o),o}let so=null;const As=()=>so||oo;let am,uf;{const e=z2(),t=(n,i)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(i),o=>{s.length>1?s.forEach(r=>r(o)):s[0](o)}};am=t("__VUE_INSTANCE_SETTERS__",n=>so=n),uf=t("__VUE_SSR_SETTERS__",n=>qc=n)}const Pf=e=>{const t=so;return am(e),e.scope.on(),()=>{e.scope.off(),am(t)}},j1=()=>{so&&so.scope.off(),am(null)};function zI(e){return e.vnode.shapeFlag&4}let qc=!1;function OI(e,t=!1,n=!1){t&&uf(t);const{props:i,children:s}=e.vnode,o=zI(e);LO(e,i,o,t),$O(e,s,n||t);const r=o?GO(e,t):void 0;return t&&uf(!1),r}function GO(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,N4);const{setup:i}=n;if(i){Wl();const s=e.setupContext=i.length>1?jI(e):null,o=Pf(e),r=pp(i,e,0,[e.props,s]),l=W8(r);if(ql(),o(),(l||e.sp)&&!ka(e)&&G8(e),l){if(r.then(j1,j1),t)return r.then(a=>{R4(e,a,t)}).catch(a=>{zf(a,e,0)});e.asyncDep=r}else R4(e,r,t)}else PI(e,t)}function R4(e,t,n){hn(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:si(t)&&(e.setupState=ZM(t)),PI(e,n)}let um,z4;function iYe(e){um=e,z4=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,vO))}}const sYe=()=>!um;function PI(e,t,n){const i=e.type;if(!e.render){if(!t&&um&&!i.render){const s=i.template||e5(e).template;if(s){const{isCustomElement:o,compilerOptions:r}=e.appContext.config,{delimiters:l,compilerOptions:a}=i,u=gi(gi({isCustomElement:o,delimiters:l},r),a);i.render=um(s,u)}}e.render=i.render||Pr,z4&&z4(e)}{const s=Pf(e);Wl();try{yO(e)}finally{ql(),s()}}}const QO={get(e,t){return bo(e,"get",""),e[t]}};function jI(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,QO),slots:e.slots,emit:e.emit,expose:t}}function yp(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ZM(wt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in l1)return l1[n](e)},has(t,n){return n in t||n in l1}})):e.proxy}function O4(e,t=!0){return hn(e)?e.displayName||e.name:e.name||t&&e.__name}function YO(e){return hn(e)&&"__vccOpts"in e}const F=(e,t)=>Lz(e,t,qc);function cn(e,t,n){try{rm(-1);const i=arguments.length;return i===2?si(t)&&!Xt(t)?ku(t)?V(e,null,[t]):V(e,t):V(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&ku(n)&&(n=[n]),V(e,t,n))}finally{rm(1)}}function oYe(){}function rYe(e,t,n,i){const s=n[i];if(s&&JO(s,e))return s;const o=t();return o.memo=e.slice(),o.cacheIndex=i,n[i]=o}function JO(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let i=0;i<n.length;i++)if(js(n[i],t[i]))return!1;return Wc>0&&Co&&Co.push(e),!0}const XO="3.5.39",lYe=Pr,aYe=Dz,uYe=zd,cYe=eI,eP={createComponentInstance:RI,setupComponent:OI,renderComponentRoot:yg,setCurrentRenderingInstance:R1,isVNode:ku,normalizeVNode:Xo,getComponentPublicInstance:yp,ensureValidVNode:X8,pushWarningContext:Bz,popWarningContext:$z},dYe=eP,fYe=null,hYe=null,pYe=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 HI=P4?e=>P4.createHTML(e):e=>e,tP="http://www.w3.org/2000/svg",nP="http://www.w3.org/1998/Math/MathML",aa=typeof document<"u"?document:null,o7=aa&&aa.createElement("template"),iP={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const s=t==="svg"?aa.createElementNS(tP,e):t==="mathml"?aa.createElementNS(nP,e):n?aa.createElement(e,{is:n}):aa.createElement(e);return e==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:e=>aa.createTextNode(e),createComment:e=>aa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>aa.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,s,o){const r=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{o7.innerHTML=HI(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const l=o7.content;if(i==="svg"||i==="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]}},Pa="transition",Ah="animation",_f=Symbol("_vtc"),WI={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},qI=gi({},oI,WI),sP=e=>(e.displayName="Transition",e.props=qI,e),ys=sP((e,{slots:t})=>cn(Vz,UI(e),t)),oc=(e,t=[])=>{Xt(e)?e.forEach(n=>n(...t)):e&&e(...t)},r7=e=>e?Xt(e)?e.some(t=>t.length>1):e.length>1:!1;function UI(e){const t={};for(const T in e)T in WI||(t[T]=e[T]);if(e.css===!1)return t;const{name:n="v",type:i,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=o,appearActiveClass:u=r,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,g=oP(s),m=g&&g[0],y=g&&g[1],{onBeforeEnter:w,onEnter:k,onEnterCancelled:A,onLeave:v,onLeaveCancelled:x,onBeforeAppear:E=w,onAppear:S=k,onAppearCancelled:M=A}=t,_=(T,$,P,O)=>{T._enterCancelled=O,Qa(T,$?c:l),Qa(T,$?u:r),P&&P()},N=(T,$)=>{T._isLeaving=!1,Qa(T,d),Qa(T,p),Qa(T,f),$&&$()},D=T=>($,P)=>{const O=T?S:k,R=()=>_($,T,P);oc(O,[$,R]),l7(()=>{Qa($,T?a:o),Ll($,T?c:l),r7(O)||a7($,i,m,R)})};return gi(t,{onBeforeEnter(T){oc(w,[T]),Ll(T,o),Ll(T,r)},onBeforeAppear(T){oc(E,[T]),Ll(T,a),Ll(T,u)},onEnter:D(!1),onAppear:D(!0),onLeave(T,$){T._isLeaving=!0;const P=()=>N(T,$);Ll(T,d),T._enterCancelled?(Ll(T,f),j4(T)):(j4(T),Ll(T,f)),l7(()=>{T._isLeaving&&(Qa(T,d),Ll(T,p),r7(v)||a7(T,i,y,P))}),oc(v,[T,P])},onEnterCancelled(T){_(T,!1,void 0,!0),oc(A,[T])},onAppearCancelled(T){_(T,!0,void 0,!0),oc(M,[T])},onLeaveCancelled(T){N(T),oc(x,[T])}})}function oP(e){if(e==null)return null;if(si(e))return[P9(e.enter),P9(e.leave)];{const t=P9(e);return[t,t]}}function P9(e){return Zg(e)}function Ll(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[_f]||(e[_f]=new Set)).add(t)}function Qa(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[_f];n&&(n.delete(t),n.size||(e[_f]=void 0))}function l7(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let rP=0;function a7(e,t,n,i){const s=e._endId=++rP,o=()=>{s===e._endId&&i()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:l,propCount:a}=KI(e,t);if(!r)return i();const u=r+"end";let c=0;const d=()=>{e.removeEventListener(u,f),o()},f=p=>{p.target===e&&++c>=a&&d()};setTimeout(()=>{c<a&&d()},l+1),e.addEventListener(u,f)}function KI(e,t){const n=window.getComputedStyle(e),i=g=>(n[g]||"").split(", "),s=i(`${Pa}Delay`),o=i(`${Pa}Duration`),r=u7(s,o),l=i(`${Ah}Delay`),a=i(`${Ah}Duration`),u=u7(l,a);let c=null,d=0,f=0;t===Pa?r>0&&(c=Pa,d=r,f=o.length):t===Ah?u>0&&(c=Ah,d=u,f=a.length):(d=Math.max(r,u),c=d>0?r>u?Pa:Ah:null,f=c?c===Pa?o.length:a.length:0);const p=c===Pa&&/\b(?:transform|all)(?:,|$)/.test(i(`${Pa}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function u7(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>c7(n)+c7(e[i])))}function c7(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function j4(e){return(e?e.ownerDocument:document).body.offsetHeight}function lP(e,t,n){const i=e[_f];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const cm=Symbol("_vod"),s5=Symbol("_vsh"),rs={name:"show",beforeMount(e,{value:t},{transition:n}){e[cm]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ch(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),Ch(e,!0),i.enter(e)):i.leave(e,()=>{Ch(e,!1)}):Ch(e,t))},beforeUnmount(e,{value:t}){Ch(e,t)}};function Ch(e,t){e.style.display=t?e[cm]:"none",e[s5]=!t}function aP(){rs.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const VI=Symbol("");function gYe(e){const t=As();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>dm(o,s))},i=()=>{const s=e(t.proxy);t.ce?dm(t.ce,s):H4(t.subTree,s),n(s)};cI(()=>{Xg(i)}),pn(()=>{Qe(i,Pr,{flush:"post"});const s=new MutationObserver(i);s.observe(t.subTree.el.parentNode,{childList:!0}),An(()=>s.disconnect())})}function H4(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{H4(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)dm(e.el,t);else if(e.type===Be)e.children.forEach(n=>H4(n,t));else if(e.type===af){let{el:n,anchor:i}=e;for(;n&&(dm(n,t),n!==i);)n=n.nextSibling}}function dm(e,t){if(e.nodeType===1){const n=e.style;let i="";for(const s in t){const o=iz(t[s]);n.setProperty(`--${s}`,o),i+=`--${s}: ${o};`}n[VI]=i}}const uP=/(?:^|;)\s*display\s*:/;function cP(e,t,n){const i=e.style,s=wi(n);let o=!1;if(n&&!s){if(t)if(wi(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&jh(i,l,"")}else for(const r in t)n[r]==null&&jh(i,r,"");for(const r in n){r==="display"&&(o=!0);const l=n[r];l!=null?fP(e,r,!wi(t)&&t?t[r]:void 0,l)||jh(i,r,l):jh(i,r,"")}}else if(s){if(t!==n){const r=i[VI];r&&(n+=";"+r),i.cssText=n,o=uP.test(n)}}else t&&e.removeAttribute("style");cm in e&&(e[cm]=o?i.display:"",e[s5]&&(i.display="none"))}const d7=/\s*!important$/;function jh(e,t,n){if(Xt(n))n.forEach(i=>jh(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=dP(e,t);d7.test(n)?e.setProperty(er(i),n.replace(d7,""),"important"):e[i]=n}}const f7=["Webkit","Moz","ms"],j9={};function dP(e,t){const n=j9[t];if(n)return n;let i=Ls(t);if(i!=="filter"&&i in e)return j9[t]=i;i=D2(i);for(let s=0;s<f7.length;s++){const o=f7[s]+i;if(o in e)return j9[t]=o}return t}function fP(e,t,n,i){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&wi(i)&&n===i}const h7="http://www.w3.org/1999/xlink";function p7(e,t,n,i,s,o=tz(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(h7,t.slice(6,t.length)):e.setAttributeNS(h7,t,n):n==null||o&&!MM(n)?e.removeAttribute(t):e.setAttribute(t,o?"":_r(n)?String(n):n)}function g7(e,t,n,i,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?HI(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const l=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=MM(n):n==null&&l==="string"?(n="",r=!0):l==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(s||t)}function pa(e,t,n,i){e.addEventListener(t,n,i)}function hP(e,t,n,i){e.removeEventListener(t,n,i)}const m7=Symbol("_vei");function pP(e,t,n,i,s=null){const o=e[m7]||(e[m7]={}),r=o[t];if(i&&r)r.value=i;else{const[l,a]=vP(t);if(i){const u=o[t]=kP(i,s);pa(e,l,u,a)}else r&&(hP(e,l,r,a),o[t]=void 0)}}const gP=/(Once|Passive|Capture)$/,mP=/^on:?(?:Once|Passive|Capture)$/;function vP(e){let t,n;for(;(n=e.match(gP))&&!mP.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):er(e.slice(2)),t]}let H9=0;const yP=Promise.resolve(),bP=()=>H9||(yP.then(()=>H9=0),H9=Date.now());function kP(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;const s=n.value;if(Xt(s)){const o=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{o.call(i),i._stopped=!0};const r=s.slice(),l=[i];for(let a=0;a<r.length&&!i._stopped;a++){const u=r[a];u&&Hr(u,t,5,l)}}else Hr(s,t,5,[i])};return n.value=e,n.attached=bP(),n}const v7=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,AP=(e,t,n,i,s,o)=>{const r=s==="svg";t==="class"?lP(e,i,r):t==="style"?cP(e,n,i):hp(t)?N2(t)||pP(e,t,n,i,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):CP(e,t,i,r))?(g7(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&p7(e,t,i,r,o,t!=="value")):e._isVueCE&&(wP(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!wi(i)))?g7(e,Ls(t),i,o,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),p7(e,t,i,r))};function CP(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&v7(t)&&hn(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 v7(t)&&wi(n)?!1:t in e}function wP(e,t){const n=e._def.props;if(!n)return!1;const i=Ls(t);return Array.isArray(n)?n.some(s=>Ls(s)===i):Object.keys(n).some(s=>Ls(s)===i)}const y7={};function xP(e,t,n){let i=tt(e,t);F2(i)&&(i=gi({},i,t));class s extends o5{constructor(r){super(i,r,n)}}return s.def=i,s}const mYe=((e,t)=>xP(e,t,PP)),_P=typeof HTMLElement<"u"?HTMLElement:class{};class o5 extends _P{constructor(t,n={},i=pm){super(),this._def=t,this._props=n,this._createApp=i,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&&i!==pm?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(gi({},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 o5){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,kt(()=>{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 i=0;i<this.attributes.length;i++)this._setAttr(this.attributes[i].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(i,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:r}=i;let l;if(o&&!Xt(o))for(const a in o){const u=o[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=Zg(this._props[a])),(l||(l=Object.create(null)))[Ls(a)]=!0)}this._numberProps=l,this._resolveProps(i),this.shadowRoot&&this._applyStyles(r),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>{i.configureApp=this._def.configureApp,t(this._def=i,!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 i in n)ii(this,i)||Object.defineProperty(this,i,{get:()=>h(n[i])})}_resolveProps(t){const{props:n}=t,i=Xt(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&i.includes(s)&&this._setProp(s,this[s]);for(const s of i.map(Ls))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(o){this._setProp(s,o,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let i=n?this.getAttribute(t):y7;const s=Ls(t);n&&this._numberProps&&this._numberProps[s]&&(i=Zg(i)),this._setProp(s,i,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,i=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===y7?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),i)){const o=this._ob;o&&(this._processMutations(o.takeRecords()),o.disconnect()),n===!0?this.setAttribute(er(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(er(t),n+""):n||this.removeAttribute(er(t)),o&&o.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),OP(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=V(this._def,gi(t,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const s=(o,r)=>{this.dispatchEvent(new CustomEvent(o,F2(r[0])?gi({detail:r},r[0]):{detail:r}))};i.emit=(o,...r)=>{s(o,r),er(o)!==o&&s(er(o),r)},this._setParent()}),n}_applyStyles(t,n,i){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,o=this.shadowRoot,r=i?this._getStyleAnchor(i)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(o);let l=null;for(let a=t.length-1;a>=0;a--){const u=document.createElement("style");s&&u.setAttribute("nonce",s),u.textContent=t[a],o.insertBefore(u,l||r),l=u,a===0&&(i||this._styleAnchors.set(this._def,u),n&&this._styleAnchors.set(n,u))}}_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<t.childNodes.length;n++){const i=t.childNodes[n];if(!(i instanceof HTMLStyleElement))return i}return null}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(t[i]||(t[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let i=0;i<t.length;i++){const s=t[i],o=s.getAttribute("name")||"default",r=this._slots[o],l=s.parentNode;if(r)for(const a of r){if(n&&a.nodeType===1){const u=n+"-s",c=document.createTreeWalker(a,1);a.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}l.insertBefore(a,s)}else for(;s.firstChild;)l.insertBefore(s.firstChild,s);l.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const n=new Set;for(const i of t){const s=i.querySelectorAll("slot");for(let o=0;o<s.length;o++)n.add(s[o])}return Array.from(n)}_injectChildStyle(t,n){this._applyStyles(t.styles,t,n)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(t){}}function SP(e){const t=As(),n=t&&t.ce;return n||null}function vYe(){const e=SP();return e&&e.shadowRoot}function yYe(e="$style"){{const t=As();if(!t)return $n;const n=t.type.__cssModules;if(!n)return $n;const i=n[e];return i||$n}}const ZI=new WeakMap,GI=new WeakMap,fm=Symbol("_moveCb"),b7=Symbol("_enterCb"),MP=e=>(delete e.props.mode,e),IP=MP({name:"TransitionGroup",props:gi({},qI,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=As(),i=sI();let s,o;return vp(()=>{if(!s.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!NP(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(EP),s.forEach(TP);const l=s.filter(LP);j4(n.vnode.el),l.forEach(a=>{const u=a.el,c=u.style;Ll(u,r),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[fm]=f=>{f&&f.target!==u||(!f||f.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[fm]=null,Qa(u,r))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const r=Vn(e),l=UI(r);let a=r.tag||Be;if(s=[],o)for(let u=0;u<o.length;u++){const c=o[u];c.el&&c.el instanceof Element&&!c.el[s5]&&(s.push(c),bu(c,z1(c,l,i,n)),ZI.set(c,YI(c.el)))}o=t.default?Z8(t.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&bu(c,z1(c,l,i,n))}return V(a,null,o)}}}),QI=IP;function EP(e){const t=e.el;t[fm]&&t[fm](),t[b7]&&t[b7]()}function TP(e){GI.set(e,YI(e.el))}function LP(e){const t=ZI.get(e),n=GI.get(e),i=t.left-n.left,s=t.top-n.top;if(i||s){const o=e.el,r=o.style,l=o.getBoundingClientRect();let a=1,u=1;return o.offsetWidth&&(a=l.width/o.offsetWidth),o.offsetHeight&&(u=l.height/o.offsetHeight),(!Number.isFinite(a)||a===0)&&(a=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(a-1)<.01&&(a=1),Math.abs(u-1)<.01&&(u=1),r.transform=r.webkitTransform=`translate(${i/a}px,${s/u}px)`,r.transitionDuration="0s",e}}function YI(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function NP(e,t,n){const i=e.cloneNode(),s=e[_f];s&&s.forEach(l=>{l.split(/\s+/).forEach(a=>a&&i.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&i.classList.add(l)),i.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(i);const{hasTransform:r}=KI(i);return o.removeChild(i),r}const Au=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Xt(t)?n=>sf(t,n):t};function FP(e){e.target.composing=!0}function k7(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const jr=Symbol("_assign");function A7(e,t,n){return t&&(e=e.trim()),n&&(e=R2(e)),e}const _o={created(e,{modifiers:{lazy:t,trim:n,number:i}},s){e[jr]=Au(s);const o=i||s.props&&s.props.type==="number";pa(e,t?"change":"input",r=>{r.target.composing||e[jr](A7(e.value,n,o))}),(n||o)&&pa(e,"change",()=>{e.value=A7(e.value,n,o)}),t||(pa(e,"compositionstart",FP),pa(e,"compositionend",k7),pa(e,"change",k7))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:s,number:o}},r){if(e[jr]=Au(r),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?R2(e.value):e.value,a=t??"";if(l===a)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(i&&t===n||s&&e.value.trim()===a)||(e.value=a)}},hm={deep:!0,created(e,t,n){e[jr]=Au(n),pa(e,"change",()=>{const i=e._modelValue,s=Sf(e),o=e.checked,r=e[jr];if(Xt(i)){const l=O2(i,s),a=l!==-1;if(o&&!a)r(i.concat(s));else if(!o&&a){const u=[...i];u.splice(l,1),r(u)}}else if(id(i)){const l=new Set(i);o?l.add(s):l.delete(s),r(l)}else r(XI(e,o))})},mounted:C7,beforeUpdate(e,t,n){e[jr]=Au(n),C7(e,t,n)}};function C7(e,{value:t,oldValue:n},i){e._modelValue=t;let s;if(Xt(t))s=O2(t,i.props.value)>-1;else if(id(t))s=t.has(i.props.value);else{if(t===n)return;s=xa(t,XI(e,!0))}e.checked!==s&&(e.checked=s)}const JI={created(e,{value:t},n){e.checked=xa(t,n.props.value),e[jr]=Au(n),pa(e,"change",()=>{e[jr](Sf(e))})},beforeUpdate(e,{value:t,oldValue:n},i){e[jr]=Au(i),t!==n&&(e.checked=xa(t,i.props.value))}},W4={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const s=id(t);pa(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?R2(Sf(r)):Sf(r));e[jr](e.multiple?s?new Set(o):o:o[0]),e._assigning=!0,kt(()=>{e._assigning=!1})}),e[jr]=Au(i)},mounted(e,{value:t}){w7(e,t)},beforeUpdate(e,t,n){e[jr]=Au(n)},updated(e,{value:t}){e._assigning||w7(e,t)}};function w7(e,t){const n=e.multiple,i=Xt(t);if(!(n&&!i&&!id(t))){for(let s=0,o=e.options.length;s<o;s++){const r=e.options[s],l=Sf(r);if(n)if(i){const a=typeof l;a==="string"||a==="number"?r.selected=t.some(u=>String(u)===String(l)):r.selected=O2(t,l)>-1}else r.selected=t.has(l);else if(xa(Sf(r),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Sf(e){return"_value"in e?e._value:e.value}function XI(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const BP={created(e,t,n){x0(e,t,n,null,"created")},mounted(e,t,n){x0(e,t,n,null,"mounted")},beforeUpdate(e,t,n,i){x0(e,t,n,i,"beforeUpdate")},updated(e,t,n,i){x0(e,t,n,i,"updated")}};function eE(e,t){switch(e){case"SELECT":return W4;case"TEXTAREA":return _o;default:switch(t){case"checkbox":return hm;case"radio":return JI;default:return _o}}}function x0(e,t,n,i,s){const r=eE(e.tagName,n.props&&n.props.type)[s];r&&r(e,t,n,i)}function $P(){_o.getSSRProps=({value:e})=>({value:e}),JI.getSSRProps=({value:e},t)=>{if(t.props&&xa(t.props.value,e))return{checked:!0}},hm.getSSRProps=({value:e},t)=>{if(Xt(e)){if(t.props&&O2(e,t.props.value)>-1)return{checked:!0}}else if(id(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},BP.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=eE(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const DP=["ctrl","shift","alt","meta"],RP={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)=>DP.some(n=>e[`${n}Key`]&&!t.includes(n))},It=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=((s,...o)=>{for(let r=0;r<t.length;r++){const l=RP[t[r]];if(l&&l(s,t))return}return e(s,...o)}))},zP={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},qr=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=(s=>{if(!("key"in s))return;const o=er(s.key);if(t.some(r=>r===o||zP[r]===o))return e(s)}))},tE=gi({patchProp:AP},iP);let u1,x7=!1;function nE(){return u1||(u1=RO(tE))}function iE(){return u1=x7?u1:zO(tE),x7=!0,u1}const OP=((...e)=>{nE().render(...e)}),bYe=((...e)=>{iE().hydrate(...e)}),pm=((...e)=>{const t=nE().createApp(...e),{mount:n}=t;return t.mount=i=>{const s=oE(i);if(!s)return;const o=t._component;!hn(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,sE(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t}),PP=((...e)=>{const t=iE().createApp(...e),{mount:n}=t;return t.mount=i=>{const s=oE(i);if(s)return n(s,!0,sE(s))},t});function sE(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function oE(e){return wi(e)?document.querySelector(e):e}let _7=!1;const kYe=()=>{_7||(_7=!0,$P(),aP())};/*! + * shared v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function jP(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const gm=typeof window<"u",Nu=(e,t=!1)=>t?Symbol.for(e):Symbol(e),HP=(e,t,n)=>WP({l:e,k:t,s:n}),WP=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),vs=e=>typeof e=="number"&&isFinite(e),rE=e=>l5(e)==="[object Date]",Mf=e=>l5(e)==="[object RegExp]",Q2=e=>Hn(e)&&Object.keys(e).length===0,bs=Object.assign,qP=Object.create,Ci=(e=null)=>qP(e);let S7;const Sc=()=>S7||(S7=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ci());function M7(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function UP(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}const KP=/^\s*javascript\s*(?::|�*58;?|�*3a;?|:?)/i,VP=/^(?:href|src|action|formaction)$/i;function r5(e){return KP.test(e)}function ZP(e){const t=/url\s*\(/gi;let n="",i=0,s;for(;(s=t.exec(e))!==null;){const o=s.index,r=t.lastIndex-1;let l=r+1,a=1,u=null;for(;l<e.length;l++){const f=e[l];if(u){f===u&&(u=null);continue}if(f==='"'||f==="'")u=f;else if(f==="(")a++;else if(f===")"&&(a--,a===0))break}if(a!==0)break;const c=e.slice(r+1,l).trim(),d=c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'")?c.slice(1,-1).trim():c;n+=e.slice(i,o),n+=r5(d)?"url(about:blank)":e.slice(o,l+1),i=l+1}return n+e.slice(i)}function I7(e,t){if(VP.test(e)&&r5(t))return"about:blank";const n=e.toLowerCase()==="style"?ZP(t):t;return UP(n)}function GP(e){return e=e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(n,i,s)=>`${i}="${I7(i,s)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(n,i,s)=>`${i}='${I7(i,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,i,s)=>r5(s)?`${i}about:blank`:n),e}const QP=Object.prototype.hasOwnProperty;function zr(e,t){return QP.call(e,t)}const ts=Array.isArray,Oi=e=>typeof e=="function",Ut=e=>typeof e=="string",Xn=e=>typeof e=="boolean",ti=e=>e!==null&&typeof e=="object",YP=e=>ti(e)&&Oi(e.then)&&Oi(e.catch),lE=Object.prototype.toString,l5=e=>lE.call(e),Hn=e=>l5(e)==="[object Object]",JP=e=>e==null?"":ts(e)||Hn(e)&&e.toString===lE?JSON.stringify(e,null,2):String(e);function a5(e,t=""){return e.reduce((n,i,s)=>s===0?n+i:n+t+i,"")}const _0=e=>!ti(e)||ts(e);function kg(e,t){if(_0(e)||_0(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:i,des:s}=n.pop();Object.keys(i).forEach(o=>{o!=="__proto__"&&(ti(i[o])&&!ti(s[o])&&(s[o]=Array.isArray(i[o])?[]:Ci()),_0(s[o])||_0(i[o])?s[o]=i[o]:n.push({src:i[o],des:s[o]}))})}}/*! + * message-compiler v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function XP(e,t,n){return{line:e,column:t,offset:n}}function q4(e,t,n){return{start:e,end:t}}const li={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},ej=17;function Y2(e,t,n={}){const{domain:i,messages:s,args:o}=n,r=e,l=new SyntaxError(String(r));return l.code=e,t&&(l.location=t),l.domain=i,l}function tj(e){throw e}const Sl=" ",nj="\r",mo=` +`,ij="\u2028",sj="\u2029";function oj(e){const t=e;let n=0,i=1,s=1,o=0;const r=S=>t[S]===nj&&t[S+1]===mo,l=S=>t[S]===mo,a=S=>t[S]===sj,u=S=>t[S]===ij,c=S=>r(S)||l(S)||a(S)||u(S),d=()=>n,f=()=>i,p=()=>s,g=()=>o,m=S=>r(S)||a(S)||u(S)?mo:t[S],y=()=>m(n),w=()=>m(n+o);function k(){return o=0,c(n)&&(i++,s=0),r(n)&&n++,n++,s++,t[n]}function A(){return r(n+o)&&o++,o++,t[n+o]}function v(){n=0,i=1,s=1,o=0}function x(S=0){o=S}function E(){const S=n+o;for(;S!==n;)k();o=0}return{index:d,line:f,column:p,peekOffset:g,charAt:m,currentChar:y,currentPeek:w,next:k,peek:A,reset:v,resetPeek:x,skipToPeek:E}}const oa=void 0,rj=".",E7="'",lj="tokenizer";function aj(e,t={}){const n=t.location!==!1,i=oj(e),s=()=>i.index(),o=()=>XP(i.line(),i.column(),i.index()),r=o(),l=s(),a={currentType:13,offset:l,startLoc:r,endLoc:r,lastType:13,lastOffset:l,lastStartLoc:r,lastEndLoc:r,braceNest:0,inLinked:!1,text:""},u=()=>a,{onError:c}=t;function d(U,J,de,...me){const Ie=u();if(J.column+=de,J.offset+=de,c){const je=n?q4(Ie.startLoc,J):null,ke=Y2(U,je,{domain:lj,args:me});c(ke)}}function f(U,J,de){U.endLoc=o(),U.currentType=J;const me={type:J};return n&&(me.loc=q4(U.startLoc,U.endLoc)),de!=null&&(me.value=de),me}const p=U=>f(U,13);function g(U,J){return U.currentChar()===J?(U.next(),J):(d(li.EXPECTED_TOKEN,o(),0,J),"")}function m(U){let J="";for(;U.currentPeek()===Sl||U.currentPeek()===mo;)J+=U.currentPeek(),U.peek();return J}function y(U){const J=m(U);return U.skipToPeek(),J}function w(U){if(U===oa)return!1;const J=U.charCodeAt(0);return J>=97&&J<=122||J>=65&&J<=90||J===95}function k(U){if(U===oa)return!1;const J=U.charCodeAt(0);return J>=48&&J<=57}function A(U,J){const{currentType:de}=J;if(de!==2)return!1;m(U);const me=w(U.currentPeek());return U.resetPeek(),me}function v(U,J){const{currentType:de}=J;if(de!==2)return!1;m(U);const me=U.currentPeek()==="-"?U.peek():U.currentPeek(),Ie=k(me);return U.resetPeek(),Ie}function x(U,J){const{currentType:de}=J;if(de!==2)return!1;m(U);const me=U.currentPeek()===E7;return U.resetPeek(),me}function E(U,J){const{currentType:de}=J;if(de!==7)return!1;m(U);const me=U.currentPeek()===".";return U.resetPeek(),me}function S(U,J){const{currentType:de}=J;if(de!==8)return!1;m(U);const me=w(U.currentPeek());return U.resetPeek(),me}function M(U,J){const{currentType:de}=J;if(!(de===7||de===11))return!1;m(U);const me=U.currentPeek()===":";return U.resetPeek(),me}function _(U,J){const{currentType:de}=J;if(de!==9)return!1;const me=()=>{const je=U.currentPeek();return je==="{"?w(U.peek()):je==="@"||je==="|"||je===":"||je==="."||je===Sl||!je?!1:je===mo?(U.peek(),me()):D(U,!1)},Ie=me();return U.resetPeek(),Ie}function N(U){m(U);const J=U.currentPeek()==="|";return U.resetPeek(),J}function D(U,J=!0){const de=(Ie=!1,je="")=>{const ke=U.currentPeek();return ke==="{"||ke==="@"||!ke?Ie:ke==="|"?!(je===Sl||je===mo):ke===Sl?(U.peek(),de(!0,Sl)):ke===mo?(U.peek(),de(!0,mo)):!0},me=de();return J&&U.resetPeek(),me}function T(U,J){const de=U.currentChar();return de===oa?oa:J(de)?(U.next(),de):null}function $(U){const J=U.charCodeAt(0);return J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===95||J===36}function P(U){return T(U,$)}function O(U){const J=U.charCodeAt(0);return J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===95||J===36||J===45}function R(U){return T(U,O)}function W(U){const J=U.charCodeAt(0);return J>=48&&J<=57}function z(U){return T(U,W)}function G(U){const J=U.charCodeAt(0);return J>=48&&J<=57||J>=65&&J<=70||J>=97&&J<=102}function K(U){return T(U,G)}function H(U){let J="",de="";for(;J=z(U);)de+=J;return de}function q(U){let J="";for(;;){const de=U.currentChar();if(de==="\\"){const me=U.peek();me==="{"||me==="}"||me==="@"||me==="|"||me==="\\"?(J+=de+me,U.next(),U.next()):(U.resetPeek(),J+=de,U.next())}else{if(de==="{"||de==="}"||de==="@"||de==="|"||!de)break;if(de===Sl||de===mo)if(D(U))J+=de,U.next();else{if(N(U))break;J+=de,U.next()}else J+=de,U.next()}}return J}function X(U){y(U);let J="",de="";for(;J=R(U);)de+=J;const me=U.currentChar();if(me&&me!=="}"&&me!==oa&&me!==Sl&&me!==mo&&me!==" "){const Ie=Ne(U);return d(li.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,de+Ie),de+Ie}return U.currentChar()===oa&&d(li.UNTERMINATED_CLOSING_BRACE,o(),0),de}function ee(U){y(U);let J="";return U.currentChar()==="-"?(U.next(),J+=`-${H(U)}`):J+=H(U),U.currentChar()===oa&&d(li.UNTERMINATED_CLOSING_BRACE,o(),0),J}function ue(U){return U!==E7&&U!==mo}function ie(U){y(U),g(U,"'");let J="",de="";for(;J=T(U,ue);)J==="\\"?de+=xe(U):de+=J;const me=U.currentChar();return me===mo||me===oa?(d(li.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),me===mo&&(U.next(),g(U,"'")),de):(g(U,"'"),de)}function xe(U){const J=U.currentChar();switch(J){case"\\":case"'":return U.next(),`\\${J}`;case"u":return ce(U,J,4);case"U":return ce(U,J,6);default:return d(li.UNKNOWN_ESCAPE_SEQUENCE,o(),0,J),""}}function ce(U,J,de){g(U,J);let me="";for(let Ie=0;Ie<de;Ie++){const je=K(U);if(!je){d(li.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${J}${me}${U.currentChar()}`);break}me+=je}return`\\${J}${me}`}function pe(U){return U!=="{"&&U!=="}"&&U!==Sl&&U!==mo}function Ne(U){y(U);let J="",de="";for(;J=T(U,pe);)de+=J;return de}function te(U){let J="",de="";for(;J=P(U);)de+=J;return de}function ye(U){const J=de=>{const me=U.currentChar();return me==="{"||me==="@"||me==="|"||me==="("||me===")"||!me||me===Sl?de:(de+=me,U.next(),J(de))};return J("")}function j(U){y(U);const J=g(U,"|");return y(U),J}function Y(U,J){let de=null;switch(U.currentChar()){case"{":return J.braceNest>=1&&d(li.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),U.next(),de=f(J,2,"{"),y(U),J.braceNest++,de;case"}":return J.braceNest>0&&J.currentType===2&&d(li.EMPTY_PLACEHOLDER,o(),0),U.next(),de=f(J,3,"}"),J.braceNest--,J.braceNest>0&&y(U),J.inLinked&&J.braceNest===0&&(J.inLinked=!1),de;case"@":return J.braceNest>0&&d(li.UNTERMINATED_CLOSING_BRACE,o(),0),de=ve(U,J)||p(J),J.braceNest=0,de;default:{let Ie=!0,je=!0,ke=!0;if(N(U))return J.braceNest>0&&d(li.UNTERMINATED_CLOSING_BRACE,o(),0),de=f(J,1,j(U)),J.braceNest=0,J.inLinked=!1,de;if(J.braceNest>0&&(J.currentType===4||J.currentType===5||J.currentType===6))return d(li.UNTERMINATED_CLOSING_BRACE,o(),0),J.braceNest=0,re(U,J);if(Ie=A(U,J))return de=f(J,4,X(U)),y(U),de;if(je=v(U,J))return de=f(J,5,ee(U)),y(U),de;if(ke=x(U,J))return de=f(J,6,ie(U)),y(U),de;if(!Ie&&!je&&!ke)return de=f(J,12,Ne(U)),d(li.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,de.value),y(U),de;break}}return de}function ve(U,J){const{currentType:de}=J;let me=null;const Ie=U.currentChar();switch((de===7||de===8||de===11||de===9)&&(Ie===mo||Ie===Sl)&&d(li.INVALID_LINKED_FORMAT,o(),0),Ie){case"@":return U.next(),me=f(J,7,"@"),J.inLinked=!0,me;case".":return y(U),U.next(),f(J,8,".");case":":return y(U),U.next(),f(J,9,":");default:return N(U)?(me=f(J,1,j(U)),J.braceNest=0,J.inLinked=!1,me):E(U,J)||M(U,J)?(y(U),ve(U,J)):S(U,J)?(y(U),f(J,11,te(U))):_(U,J)?(y(U),Ie==="{"?Y(U,J)||me:f(J,10,ye(U))):(de===7&&d(li.INVALID_LINKED_FORMAT,o(),0),J.braceNest=0,J.inLinked=!1,re(U,J))}}function re(U,J){let de={type:13};if(J.braceNest>0)return Y(U,J)||p(J);if(J.inLinked)return ve(U,J)||p(J);switch(U.currentChar()){case"{":return Y(U,J)||p(J);case"}":return d(li.UNBALANCED_CLOSING_BRACE,o(),0),U.next(),f(J,3,"}");case"@":return ve(U,J)||p(J);default:{if(N(U))return de=f(J,1,j(U)),J.braceNest=0,J.inLinked=!1,de;if(D(U))return f(J,0,q(U));break}}return de}function se(){const{currentType:U,offset:J,startLoc:de,endLoc:me}=a;return a.lastType=U,a.lastOffset=J,a.lastStartLoc=de,a.lastEndLoc=me,a.offset=s(),a.startLoc=o(),i.currentChar()===oa?f(a,13):re(i,a)}return{nextToken:se,currentOffset:s,currentPosition:o,context:u}}const uj="parser",cj=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,dj=/\\([\\@{}|])/g;function fj(e,t){return t}function hj(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(t||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function pj(e={}){const t=e.location!==!1,{onError:n}=e;function i(w,k,A,v,...x){const E=w.currentPosition();if(E.offset+=v,E.column+=v,n){const S=t?q4(A,E):null,M=Y2(k,S,{domain:uj,args:x});n(M)}}function s(w,k,A){const v={type:w};return t&&(v.start=k,v.end=k,v.loc={start:A,end:A}),v}function o(w,k,A,v){t&&(w.end=k,w.loc&&(w.loc.end=A))}function r(w,k){const A=w.context(),v=s(3,A.offset,A.startLoc);return v.value=k.replace(dj,fj),o(v,w.currentOffset(),w.currentPosition()),v}function l(w,k){const A=w.context(),{lastOffset:v,lastStartLoc:x}=A,E=s(5,v,x);return E.index=parseInt(k,10),w.nextToken(),o(E,w.currentOffset(),w.currentPosition()),E}function a(w,k){const A=w.context(),{lastOffset:v,lastStartLoc:x}=A,E=s(4,v,x);return E.key=k,w.nextToken(),o(E,w.currentOffset(),w.currentPosition()),E}function u(w,k){const A=w.context(),{lastOffset:v,lastStartLoc:x}=A,E=s(9,v,x);return E.value=k.replace(cj,hj),w.nextToken(),o(E,w.currentOffset(),w.currentPosition()),E}function c(w){const k=w.nextToken(),A=w.context(),{lastOffset:v,lastStartLoc:x}=A,E=s(8,v,x);return k.type!==11?(i(w,li.UNEXPECTED_EMPTY_LINKED_MODIFIER,A.lastStartLoc,0),E.value="",o(E,v,x),{nextConsumeToken:k,node:E}):(k.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,Ml(k)),E.value=k.value||"",o(E,w.currentOffset(),w.currentPosition()),{node:E})}function d(w,k){const A=w.context(),v=s(7,A.offset,A.startLoc);return v.value=k,o(v,w.currentOffset(),w.currentPosition()),v}function f(w){const k=w.context(),A=s(6,k.offset,k.startLoc);let v=w.nextToken();if(v.type===8){const x=c(w);A.modifier=x.node,v=x.nextConsumeToken||w.nextToken()}switch(v.type!==9&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(v)),v=w.nextToken(),v.type===2&&(v=w.nextToken()),v.type){case 10:v.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(v)),A.key=d(w,v.value||"");break;case 4:v.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(v)),A.key=a(w,v.value||"");break;case 5:v.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(v)),A.key=l(w,v.value||"");break;case 6:v.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(v)),A.key=u(w,v.value||"");break;default:{i(w,li.UNEXPECTED_EMPTY_LINKED_KEY,k.lastStartLoc,0);const x=w.context(),E=s(7,x.offset,x.startLoc);return E.value="",o(E,x.offset,x.startLoc),A.key=E,o(A,x.offset,x.startLoc),{nextConsumeToken:v,node:A}}}return o(A,w.currentOffset(),w.currentPosition()),{node:A}}function p(w){const k=w.context(),A=k.currentType===1?w.currentOffset():k.offset,v=k.currentType===1?k.endLoc:k.startLoc,x=s(2,A,v);x.items=[];let E=null;do{const _=E||w.nextToken();switch(E=null,_.type){case 0:_.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(_)),x.items.push(r(w,_.value||""));break;case 5:_.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(_)),x.items.push(l(w,_.value||""));break;case 4:_.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(_)),x.items.push(a(w,_.value||""));break;case 6:_.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(_)),x.items.push(u(w,_.value||""));break;case 7:{const N=f(w);x.items.push(N.node),E=N.nextConsumeToken||null;break}}}while(k.currentType!==13&&k.currentType!==1);const S=k.currentType===1?k.lastOffset:w.currentOffset(),M=k.currentType===1?k.lastEndLoc:w.currentPosition();return o(x,S,M),x}function g(w,k,A,v){const x=w.context();let E=v.items.length===0;const S=s(1,k,A);S.cases=[],S.cases.push(v);do{const M=p(w);E||(E=M.items.length===0),S.cases.push(M)}while(x.currentType!==13);return E&&i(w,li.MUST_HAVE_MESSAGES_IN_PLURAL,A,0),o(S,w.currentOffset(),w.currentPosition()),S}function m(w){const k=w.context(),{offset:A,startLoc:v}=k,x=p(w);return k.currentType===13?x:g(w,A,v,x)}function y(w){const k=aj(w,bs({},e)),A=k.context(),v=s(0,A.offset,A.startLoc);return t&&v.loc&&(v.loc.source=w),v.body=m(k),e.onCacheKey&&(v.cacheKey=e.onCacheKey(w)),A.currentType!==13&&i(k,li.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,w[A.offset]||""),o(v,k.currentOffset(),k.currentPosition()),v}return{parse:y}}function Ml(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 gj(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:o=>(n.helpers.add(o),o)}}function T7(e,t){for(let n=0;n<e.length;n++)u5(e[n],t)}function u5(e,t){switch(e.type){case 1:T7(e.cases,t),t.helper("plural");break;case 2:T7(e.items,t);break;case 6:{u5(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function mj(e,t={}){const n=gj(e);n.helper("normalize"),e.body&&u5(e.body,n);const i=n.context();e.helpers=Array.from(i.helpers)}function vj(e){const t=e.body;return t.type===2?L7(t):t.cases.forEach(n=>L7(n)),e}function L7(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;n<e.items.length;n++){const i=e.items[n];if(!(i.type===3||i.type===9)||i.value==null)break;t.push(i.value)}if(t.length===e.items.length){e.static=a5(t);for(let n=0;n<e.items.length;n++){const i=e.items[n];(i.type===3||i.type===9)&&delete i.value}}}}function Od(e){switch(e.t=e.type,e.type){case 0:{const t=e;Od(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let i=0;i<n.length;i++)Od(n[i]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let i=0;i<n.length;i++)Od(n[i]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;Od(t.key),t.k=t.key,delete t.key,t.modifier&&(Od(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function yj(e,t){const{filename:n,breakLineCode:i,needIndent:s}=t,o=t.location!==!1,r={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:s,indentLevel:0};o&&e.loc&&(r.source=e.loc.source);const l=()=>r;function a(m,y){r.code+=m}function u(m,y=!0){const w=y?i:"";a(s?w+" ".repeat(m):w)}function c(m=!0){const y=++r.indentLevel;m&&u(y)}function d(m=!0){const y=--r.indentLevel;m&&u(y)}function f(){u(r.indentLevel)}return{context:l,push:a,indent:c,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>r.needIndent}}function bj(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),If(e,t.key),t.modifier?(e.push(", "),If(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function kj(e,t){const{helper:n,needIndent:i}=e;e.push(`${n("normalize")}([`),e.indent(i());const s=t.items.length;for(let o=0;o<s&&(If(e,t.items[o]),o!==s-1);o++)e.push(", ");e.deindent(i()),e.push("])")}function Aj(e,t){const{helper:n,needIndent:i}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(i());const s=t.cases.length;for(let o=0;o<s&&(If(e,t.cases[o]),o!==s-1);o++)e.push(", ");e.deindent(i()),e.push("])")}}function Cj(e,t){t.body?If(e,t.body):e.push("null")}function If(e,t){const{helper:n}=e;switch(t.type){case 0:Cj(e,t);break;case 1:Aj(e,t);break;case 2:kj(e,t);break;case 6:bj(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const wj=(e,t={})=>{const n=Ut(t.mode)?t.mode:"normal",i=Ut(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` +`,o=t.needIndent?t.needIndent:n!=="arrow",r=e.helpers||[],l=yj(e,{filename:i,breakLineCode:s,needIndent:o});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(o),r.length>0&&(l.push(`const { ${a5(r.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),If(l,e),l.deindent(o),l.push("}"),delete e.helpers;const{code:a,map:u}=l.context();return{ast:e,code:a,map:u?u.toJSON():void 0}};function xj(e,t={}){const n=bs({},t),i=!!n.jit,s=!!n.minify,o=n.optimize==null?!0:n.optimize,l=pj(n).parse(e);return i?(o&&vj(l),s&&Od(l),{ast:l,code:""}):(mj(l,n),wj(l,n))}/*! + * core-base v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function _j(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Sc().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Sc().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function jl(e){return ti(e)&&c5(e)===0&&(zr(e,"b")||zr(e,"body"))}const aE=["b","body"];function Sj(e){return Fu(e,aE)}const uE=["c","cases"];function Mj(e){return Fu(e,uE,[])}const cE=["s","static"];function Ij(e){return Fu(e,cE)}const dE=["i","items"];function Ej(e){return Fu(e,dE,[])}const fE=["t","type"];function c5(e){return Fu(e,fE)}const hE=["v","value"];function S0(e,t){const n=Fu(e,hE);if(n!=null)return n;throw H1(t)}const pE=["m","modifier"];function Tj(e){return Fu(e,pE)}const gE=["k","key"];function Lj(e){const t=Fu(e,gE);if(t)return t;throw H1(6)}function Fu(e,t,n){for(let i=0;i<t.length;i++){const s=t[i];if(zr(e,s)&&e[s]!=null)return e[s]}return n}const mE=[...aE,...uE,...cE,...dE,...gE,...pE,...hE,...fE];function H1(e){return new Error(`unhandled node type: ${e}`)}function W9(e){return n=>Nj(n,e)}function Nj(e,t){const n=Sj(t);if(n==null)throw H1(0);if(c5(n)===1){const o=Mj(n);return e.plural(o.reduce((r,l)=>[...r,N7(e,l)],[]))}else return N7(e,n)}function N7(e,t){const n=Ij(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const i=Ej(t).reduce((s,o)=>[...s,U4(e,o)],[]);return e.normalize(i)}}function U4(e,t){const n=c5(t);switch(n){case 3:return S0(t,n);case 9:return S0(t,n);case 4:{const i=t;if(zr(i,"k")&&i.k)return e.interpolate(e.named(i.k));if(zr(i,"key")&&i.key)return e.interpolate(e.named(i.key));throw H1(n)}case 5:{const i=t;if(zr(i,"i")&&vs(i.i))return e.interpolate(e.list(i.i));if(zr(i,"index")&&vs(i.index))return e.interpolate(e.list(i.index));throw H1(n)}case 6:{const i=t,s=Tj(i),o=Lj(i);return e.linked(U4(e,o),s?U4(e,s):void 0,e.type)}case 7:return S0(t,n);case 8:return S0(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Fj=e=>e;let M0=Ci();function Bj(e,t={}){let n=!1;const i=t.onError||tj;return t.onError=s=>{n=!0,i(s)},{...xj(e,t),detectError:n}}function $j(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Ut(e)){Xn(t.warnHtmlMessage)&&t.warnHtmlMessage;const i=(t.onCacheKey||Fj)(e),s=M0[i];if(s)return s;const{ast:o,detectError:r}=Bj(e,{...t,location:!1,jit:!0}),l=W9(o);return r?l:M0[i]=l}else{const n=e.cacheKey;if(n){const i=M0[n];return i||(M0[n]=W9(e))}else return W9(e)}}let W1=null;function Dj(e){W1=e}function Rj(e,t,n){W1&&W1.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const zj=Oj("function:translate");function Oj(e){return t=>W1&&W1.emit(e,t)}const ma={INVALID_ARGUMENT:ej,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},Pj=24;function va(e){return Y2(e,null,void 0)}function d5(e,t){return t.locale!=null?F7(t.locale):F7(e.locale)}let q9;function F7(e){if(Ut(e))return e;if(Oi(e)){if(e.resolvedOnce&&q9!=null)return q9;if(e.constructor.name==="Function"){const t=e();if(YP(t))throw va(ma.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return q9=t}else throw va(ma.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw va(ma.NOT_SUPPORT_LOCALE_TYPE)}function jj(e,t,n){return[...new Set([n,...ts(t)?t:ti(t)?Object.keys(t):Ut(t)?[t]:[n]])]}function K4(e,t,n){const i=Ut(n)?n:q1,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let o=s.__localeChainCache.get(i);if(!o){o=[];let r=[n];for(;ts(r);)r=B7(o,r,t);const l=ts(t)||!Hn(t)?t:t.default?t.default:null;r=Ut(l)?[l]:l,ts(r)&&B7(o,r,!1),s.__localeChainCache.set(i,o)}return o}function B7(e,t,n){let i=!0;for(let s=0;s<t.length&&Xn(i);s++){const o=t[s];Ut(o)&&(i=Hj(e,t[s],n))}return i}function Hj(e,t,n){let i;const s=t.split("-");do{const o=s.join("-");i=Wj(e,o,n),s.splice(-1,1)}while(s.length&&i===!0);return i}function Wj(e,t,n){let i=!1;if(!e.includes(t)&&(i=!0,t)){i=t[t.length-1]!=="!";const s=t.replace(/!/g,"");e.push(s),(ts(n)||Hn(n))&&n[s]&&(i=n[s])}return i}const Bu=[];Bu[0]={w:[0],i:[3,0],"[":[4],o:[7]};Bu[1]={w:[1],".":[2],"[":[4],o:[7]};Bu[2]={w:[2],i:[3,0],0:[3,0]};Bu[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};Bu[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};Bu[5]={"'":[4,0],o:8,l:[5,0]};Bu[6]={'"':[4,0],o:8,l:[6,0]};const qj=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Uj(e){return qj.test(e)}function Kj(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function Vj(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Zj(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:Uj(t)?Kj(t):"*"+t}function Gj(e){const t=[];let n=-1,i=0,s=0,o,r,l,a,u,c,d;const f=[];f[0]=()=>{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--,i=4,f[0]();else{if(s=0,r===void 0||(r=Zj(r),r===!1))return!1;f[1]()}};function p(){const g=e[n+1];if(i===5&&g==="'"||i===6&&g==='"')return n++,l="\\"+g,f[0](),!0}for(;i!==null;)if(n++,o=e[n],!(o==="\\"&&p())){if(a=Vj(o),d=Bu[i],u=d[a]||d.l||8,u===8||(i=u[0],u[1]!==void 0&&(c=f[u[1]],c&&(l=o,c()===!1))))return;if(i===7)return t}}const $7=new Map;function Qj(e,t){return ti(e)?e[t]:null}function Yj(e,t){if(!ti(e))return null;let n=$7.get(t);if(n||(n=Gj(t),n&&$7.set(t,n)),!n)return null;const i=n.length;let s=e,o=0;for(;o<i;){const r=n[o];if(mE.includes(r)&&jl(s)||!ti(s)||!zr(s,r))return null;const l=s[r];if(l===void 0||Oi(s))return null;s=l,o++}return s}const Jj="11.4.6",J2=-1,q1="en-US",mm="",D7=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Xj(){return{upper:(e,t)=>t==="text"&&Ut(e)?e.toUpperCase():t==="vnode"&&ti(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Ut(e)?e.toLowerCase():t==="vnode"&&ti(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Ut(e)?D7(e):t==="vnode"&&ti(e)&&"__v_isVNode"in e?D7(e.children):e}}let vE;function eH(e){vE=e}let yE;function tH(e){yE=e}let bE;function nH(e){bE=e}let kE=null;const iH=e=>{kE=e},sH=()=>kE;let AE=null;const R7=e=>{AE=e},oH=()=>AE;let z7=0;function rH(e={}){const t=Oi(e.onWarn)?e.onWarn:jP,n=Ut(e.version)?e.version:Jj,i=Ut(e.locale)||Oi(e.locale)?e.locale:q1,s=Oi(i)?q1:i,o=ts(e.fallbackLocale)||Hn(e.fallbackLocale)||Ut(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,r=Hn(e.messages)?e.messages:U9(s),l=Hn(e.datetimeFormats)?e.datetimeFormats:U9(s),a=Hn(e.numberFormats)?e.numberFormats:U9(s),u=bs(Ci(),e.modifiers,Xj()),c=e.pluralRules||Ci(),d=Oi(e.missing)?e.missing:null,f=Xn(e.missingWarn)||Mf(e.missingWarn)?e.missingWarn:!0,p=Xn(e.fallbackWarn)||Mf(e.fallbackWarn)?e.fallbackWarn:!0,g=!!e.fallbackFormat,m=!!e.unresolving,y=Oi(e.postTranslation)?e.postTranslation:null,w=Hn(e.processor)?e.processor:null,k=Xn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,A=!!e.escapeParameter,v=Oi(e.messageCompiler)?e.messageCompiler:vE,x=Oi(e.messageResolver)?e.messageResolver:yE||Qj,E=Oi(e.localeFallbacker)?e.localeFallbacker:bE||jj,S=ti(e.fallbackContext)?e.fallbackContext:void 0,M=e,_=ti(M.__datetimeFormatters)?M.__datetimeFormatters:new Map,N=ti(M.__numberFormatters)?M.__numberFormatters:new Map,D=ti(M.__meta)?M.__meta:{};z7++;const T={version:n,cid:z7,locale:i,fallbackLocale:o,messages:r,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:g,unresolving:m,postTranslation:y,processor:w,warnHtmlMessage:k,escapeParameter:A,messageCompiler:v,messageResolver:x,localeFallbacker:E,fallbackContext:S,onWarn:t,__meta:D};return T.datetimeFormats=l,T.numberFormats=a,T.__datetimeFormatters=_,T.__numberFormatters=N,__INTLIFY_PROD_DEVTOOLS__&&Rj(T,n,D),T}const U9=e=>({[e]:Ci()});function f5(e,t,n,i,s){const{missing:o,onWarn:r}=e;if(o!==null){const l=o(e,n,t,s);return Ut(l)?l:t}else return t}function wh(e,t,n){const i=e;i.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function lH(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function aH(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let i=n+1;i<t.length;i++)if(lH(e,t[i]))return!0;return!1}function O7(e,...t){const{datetimeFormats:n,unresolving:i,fallbackLocale:s,onWarn:o,localeFallbacker:r}=e,{__datetimeFormatters:l}=e;if(!Ut(t[0])&&!rE(t[0])&&!vs(t[0]))return mm;const[a,u,c,d]=V4(...t),f=Xn(c.missingWarn)?c.missingWarn:e.missingWarn;Xn(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,g=d5(e,c),m=r(e,s,g);if(!Ut(a)||a===""){const E=new Intl.DateTimeFormat(g.replace(/!/g,""),d);return p?E.formatToParts(u):E.format(u)}let y={},w,k=null;const A="datetime format";for(let E=0;E<m.length&&(w=m[E],y=n[w]||{},k=y[a],!Hn(k));E++)f5(e,a,w,f,A);if(!Hn(k)||!Ut(w))return i?J2:a;let v=`${w}__${a}`;Q2(d)||(v=`${v}__${JSON.stringify(d)}`);let x=l.get(v);return x||(x=new Intl.DateTimeFormat(w,bs({},k,d)),l.set(v,x)),p?x.formatToParts(u):x.format(u)}const CE=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function V4(...e){const[t,n,i,s]=e,o=Ci();let r=Ci(),l;if(Ut(t)){const a=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!a)throw va(ma.INVALID_ISO_DATE_ARGUMENT);const u=a[3]?a[3].trim().startsWith("T")?`${a[1].trim()}${a[3].trim()}`:`${a[1].trim()}T${a[3].trim()}`:a[1].trim();l=new Date(u);try{l.toISOString()}catch{throw va(ma.INVALID_ISO_DATE_ARGUMENT)}}else if(rE(t)){if(isNaN(t.getTime()))throw va(ma.INVALID_DATE_ARGUMENT);l=t}else if(vs(t))l=t;else throw va(ma.INVALID_ARGUMENT);return Ut(n)?o.key=n:Hn(n)&&Object.keys(n).forEach(a=>{CE.includes(a)?r[a]=n[a]:o[a]=n[a]}),Ut(i)?o.locale=i:Hn(i)&&(r=i),Hn(s)&&(r=s),[o.key||"",l,o,r]}function P7(e,t,n){const i=e;for(const s in n){const o=`${t}__${s}`;i.__datetimeFormatters.has(o)&&i.__datetimeFormatters.delete(o)}}function j7(e,...t){const{numberFormats:n,unresolving:i,fallbackLocale:s,onWarn:o,localeFallbacker:r}=e,{__numberFormatters:l}=e;if(!vs(t[0]))return mm;const[a,u,c,d]=Z4(...t),f=Xn(c.missingWarn)?c.missingWarn:e.missingWarn;Xn(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,g=d5(e,c),m=r(e,s,g);if(!Ut(a)||a===""){const E=new Intl.NumberFormat(g.replace(/!/g,""),d);return p?E.formatToParts(u):E.format(u)}let y={},w,k=null;const A="number format";for(let E=0;E<m.length&&(w=m[E],y=n[w]||{},k=y[a],!Hn(k));E++)f5(e,a,w,f,A);if(!Hn(k)||!Ut(w))return i?J2:a;let v=`${w}__${a}`;Q2(d)||(v=`${v}__${JSON.stringify(d)}`);let x=l.get(v);return x||(x=new Intl.NumberFormat(w,bs({},k,d)),l.set(v,x)),p?x.formatToParts(u):x.format(u)}const wE=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Z4(...e){const[t,n,i,s]=e,o=Ci();let r=Ci();if(!vs(t))throw va(ma.INVALID_ARGUMENT);const l=t;return Ut(n)?o.key=n:Hn(n)&&Object.keys(n).forEach(a=>{wE.includes(a)?r[a]=n[a]:o[a]=n[a]}),Ut(i)?o.locale=i:Hn(i)&&(r=i),Hn(s)&&(r=s),[o.key||"",l,o,r]}function H7(e,t,n){const i=e;for(const s in n){const o=`${t}__${s}`;i.__numberFormatters.has(o)&&i.__numberFormatters.delete(o)}}const uH=e=>e,cH=e=>"",dH="text",fH=e=>e.length===0?"":a5(e),hH=JP;function K9(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function pH(e){const t=vs(e.pluralIndex)?e.pluralIndex:-1;return vs(e.named?.count)?e.named.count:vs(e.named?.n)?e.named.n:t}function gH(e={}){const t=e.locale,n=pH(e),i=Ut(t)&&Oi(e.pluralRules?.[t])?e.pluralRules[t]:K9,s=i===K9?void 0:K9,o=w=>w[i(n,w.length,s)],r=e.list||[],l=w=>r[w],a=e.named||Ci();vs(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const u=w=>a[w];function c(w,k){const A=Oi(e.messages)?e.messages(w,!!k):ti(e.messages)?e.messages[w]:!1;return A||(e.parent?e.parent.message(w):cH)}const d=w=>e.modifiers?e.modifiers[w]:uH,f=Oi(e.processor?.normalize)?e.processor.normalize:fH,p=Oi(e.processor?.interpolate)?e.processor.interpolate:hH,g=Ut(e.processor?.type)?e.processor.type:dH,y={list:l,named:u,plural:o,linked:(w,...k)=>{const[A,v]=k;let x="text",E="";k.length===1?ti(A)?(E=A.modifier||E,x=A.type||x):Ut(A)&&(E=A||E):k.length===2&&(Ut(A)&&(E=A||E),Ut(v)&&(x=v||x));const S=c(w,!0)(y),M=S===""||S===void 0?w:S,_=x==="vnode"&&ts(M)&&E?M[0]:M;return E?d(E)(_,x):_},message:c,type:g,interpolate:p,normalize:f,values:bs(Ci(),r,a)};return y}const W7=()=>"",Rr=e=>Oi(e);function q7(e,...t){const{fallbackFormat:n,postTranslation:i,unresolving:s,messageCompiler:o,fallbackLocale:r,messages:l}=e,[a,u]=G4(...t),c=Xn(u.missingWarn)?u.missingWarn:e.missingWarn,d=Xn(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,f=Xn(u.escapeParameter)?u.escapeParameter:e.escapeParameter,p=!!u.resolvedMessage,g=Ut(u.default)||Xn(u.default)?Xn(u.default)?o?a:()=>a:u.default:n?o?a:()=>a:null,m=n||g!=null&&(Ut(g)||Oi(g)),y=d5(e,u);f&&mH(u);let[w,k,A]=p?[a,y,l[y]||Ci()]:xE(e,a,y,r,d,c),v=w,x=a;if(!p&&!(Ut(v)||jl(v)||Rr(v))&&m&&(v=g,x=v),!p&&(!(Ut(v)||jl(v)||Rr(v))||!Ut(k)))return s?J2:a;let E=!1;const S=()=>{E=!0},M=Rr(v)?v:_E(e,a,k,v,x,S);if(E)return v;const _=bH(e,k,A,u),N=gH(_),D=vH(e,M,N);let T=i?i(D,a):D;if(f&&Ut(T)&&(T=GP(T)),__INTLIFY_PROD_DEVTOOLS__){const $={timestamp:Date.now(),key:Ut(a)?a:Rr(v)?v.key:"",locale:k||(Rr(v)?v.locale:""),format:Ut(v)?v:Rr(v)?v.source:"",message:T};$.meta=bs({},e.__meta,sH()||{}),zj($)}return T}function mH(e){ts(e.list)?e.list=e.list.map(t=>Ut(t)?M7(t):t):ti(e.named)&&Object.keys(e.named).forEach(t=>{Ut(e.named[t])&&(e.named[t]=M7(e.named[t]))})}function xE(e,t,n,i,s,o){const{messages:r,onWarn:l,messageResolver:a,localeFallbacker:u}=e,c=u(e,i,n);let d=Ci(),f,p=null;const g="translate";for(let m=0;m<c.length&&(f=c[m],d=r[f]||Ci(),(p=a(d,t))===null&&(p=d[t]),!(Ut(p)||jl(p)||Rr(p)));m++)if(!aH(f,c)){const y=f5(e,t,f,o,g);y!==t&&(p=y)}return[p,f,d]}function _E(e,t,n,i,s,o){const{messageCompiler:r,warnHtmlMessage:l}=e;if(Rr(i)){const u=i;return u.locale=u.locale||n,u.key=u.key||t,u}if(r==null){const u=(()=>i);return u.locale=n,u.key=t,u}const a=r(i,yH(e,n,s,i,l,o));return a.locale=n,a.key=t,a.source=i,a}function vH(e,t,n){return t(n)}function G4(...e){const[t,n,i]=e,s=Ci();if(!Ut(t)&&!vs(t)&&!Rr(t)&&!jl(t))throw va(ma.INVALID_ARGUMENT);const o=vs(t)?String(t):(Rr(t),t);return vs(n)?s.plural=n:Ut(n)?s.default=n:Hn(n)&&!Q2(n)?s.named=n:ts(n)&&(s.list=n),vs(i)?s.plural=i:Ut(i)?s.default=i:Hn(i)&&bs(s,i),[o,s]}function yH(e,t,n,i,s,o){return{locale:t,key:n,warnHtmlMessage:s,onError:r=>{throw o&&o(r),r},onCacheKey:r=>HP(t,n,r)}}function bH(e,t,n,i){const{modifiers:s,pluralRules:o,messageResolver:r,fallbackLocale:l,fallbackWarn:a,missingWarn:u,fallbackContext:c}=e,f={locale:t,modifiers:s,pluralRules:o,messages:(p,g)=>{let m=r(n,p);if(m==null&&(c||g)){const[y,,w]=xE(c||e,p,t,l,a,u);m=y??r(w,p)}if(Ut(m)||jl(m)){let y=!1;const k=_E(e,p,t,m,p,()=>{y=!0});return y?W7:k}else return Rr(m)?m:W7}};return e.processor&&(f.processor=e.processor),i.list&&(f.list=i.list),i.named&&(f.named=i.named),vs(i.plural)&&(f.pluralIndex=i.plural),f}_j();/*! + * vue-i18n v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */const kH="11.4.6";function AH(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Sc().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Sc().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Sc().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Sc().__INTLIFY_PROD_DEVTOOLS__=!1)}const $o={UNEXPECTED_RETURN_TYPE:Pj,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 tr(e,...t){return Y2(e,null,void 0)}const Q4=Nu("__translateVNode"),Y4=Nu("__datetimeParts"),J4=Nu("__numberParts"),SE=Nu("__setPluralRules"),ME=Nu("__injectWithOption"),Kd=Nu("__dispose");function U1(e){if(!ti(e)||jl(e))return e;for(const t in e)if(zr(e,t))if(!t.includes("."))ti(e[t])&&U1(e[t]);else{const n=t.split("."),i=n.length-1;let s=e,o=!1;for(let r=0;r<i;r++){if(n[r]==="__proto__")throw new Error(`unsafe key: ${n[r]}`);if(n[r]in s||(s[n[r]]=Ci()),!ti(s[n[r]])){o=!0;break}s=s[n[r]]}if(o||(jl(s)?mE.includes(n[i])||delete e[t]:(s[n[i]]=e[t],delete e[t])),!jl(s)){const r=s[n[i]];ti(r)&&U1(r)}}return e}function h5(e,t){const{messages:n,__i18n:i,messageResolver:s,flatJson:o}=t,r=Hn(n)?n:ts(i)?Ci():{[e]:Ci()};if(ts(i)&&i.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:a,resource:u}=l;a?(r[a]=r[a]||Ci(),kg(u,r[a])):kg(u,r)}else Ut(l)&&kg(JSON.parse(l),r)}),s==null&&o)for(const l in r)zr(r,l)&&U1(r[l]);return r}function IE(e){return e.type}function EE(e,t,n){let i=ti(t.messages)?t.messages:Ci();"__i18nGlobal"in n&&(i=h5(e.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const s=Object.keys(i);s.length&&s.forEach(o=>{e.mergeLocaleMessage(o,i[o])});{if(ti(t.datetimeFormats)){const o=Object.keys(t.datetimeFormats);o.length&&o.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(ti(t.numberFormats)){const o=Object.keys(t.numberFormats);o.length&&o.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function U7(e){return V(hu,null,e,0)}function K1(){return As()}const K7="__INTLIFY_META__",V7=()=>[],CH=()=>!1;let Z7=0;function G7(e){return((t,n,i,s)=>e(n,i,K1()||void 0,s))}const wH=()=>{const e=K1();let t=null;return e&&(t=IE(e)[K7])?{[K7]:t}:null};function vm(e={}){const{__root:t,__injectWithOption:n}=e,i=t===void 0,s=e.flatJson,o=gm?Z:vl;let r=Xn(e.inheritLocale)?e.inheritLocale:!0;const l=o(t&&r?t.locale.value:Ut(e.locale)?e.locale:q1),a=o(t&&r?t.fallbackLocale.value:Ut(e.fallbackLocale)||ts(e.fallbackLocale)||Hn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),u=o(h5(l.value,e)),c=o(Hn(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=o(Hn(e.numberFormats)?e.numberFormats:{[l.value]:{}});let f=t?t.missingWarn:Xn(e.missingWarn)||Mf(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:Xn(e.fallbackWarn)||Mf(e.fallbackWarn)?e.fallbackWarn:!0,g=t?t.fallbackRoot:Xn(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,y=Oi(e.missing)?e.missing:null,w=Oi(e.missing)?G7(e.missing):null,k=Oi(e.postTranslation)?e.postTranslation:null,A=t?t.warnHtmlMessage:Xn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,v=!!e.escapeParameter;const x=t?t.modifiers:Hn(e.modifiers)?e.modifiers:{};let E=e.pluralRules||t&&t.pluralRules,S;S=(()=>{i&&R7(null);const ke={version:kH,locale:l.value,fallbackLocale:a.value,messages:u.value,modifiers:x,pluralRules:E,missing:w===null?void 0:w,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:!0,postTranslation:k===null?void 0:k,warnHtmlMessage:A,escapeParameter:v,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ke.datetimeFormats=c.value,ke.numberFormats=d.value,ke.__datetimeFormatters=Hn(S)?S.__datetimeFormatters:void 0,ke.__numberFormatters=Hn(S)?S.__numberFormatters:void 0;const Le=rH(ke);return i&&R7(Le),Le})(),wh(S,l.value,a.value);function _(){return[l.value,a.value,u.value,c.value,d.value]}const N=F({get:()=>l.value,set:ke=>{S.locale=ke,l.value=ke}}),D=F({get:()=>a.value,set:ke=>{S.fallbackLocale=ke,a.value=ke,wh(S,l.value,ke)}}),T=F(()=>u.value),$=F(()=>c.value),P=F(()=>d.value);function O(){return Oi(k)?k:null}function R(ke){k=ke,S.postTranslation=ke}function W(){return y}function z(ke){ke!==null&&(w=G7(ke)),y=ke,S.missing=w}const G=(ke,Le,it,Fe,Re,Ke)=>{_();let ht;try{__INTLIFY_PROD_DEVTOOLS__,i||(S.fallbackContext=t?oH():void 0),ht=ke(S)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(S.fallbackContext=void 0)}if(it!=="translate exists"&&vs(ht)&&ht===J2||it==="translate exists"&&!ht){const[ot,gt]=Le();return t&&g?Fe(t):Re(ot)}else{if(Ke(ht))return ht;throw tr($o.UNEXPECTED_RETURN_TYPE)}};function K(...ke){return G(Le=>Reflect.apply(q7,null,[Le,...ke]),()=>G4(...ke),"translate",Le=>Reflect.apply(Le.t,Le,[...ke]),Le=>Le,Le=>Ut(Le))}function H(...ke){const[Le,it,Fe]=ke;if(Fe&&!ti(Fe))throw tr($o.INVALID_ARGUMENT);return K(Le,it,bs({resolvedMessage:!0},Fe||{}))}function q(...ke){return G(Le=>Reflect.apply(O7,null,[Le,...ke]),()=>V4(...ke),"datetime format",Le=>Reflect.apply(Le.d,Le,[...ke]),()=>mm,Le=>Ut(Le)||ts(Le))}function X(...ke){return G(Le=>Reflect.apply(j7,null,[Le,...ke]),()=>Z4(...ke),"number format",Le=>Reflect.apply(Le.n,Le,[...ke]),()=>mm,Le=>Ut(Le)||ts(Le))}function ee(ke){return ke.map(Le=>Ut(Le)||vs(Le)||Xn(Le)?U7(String(Le)):Le)}const ie={normalize:ee,interpolate:ke=>ke,type:"vnode"};function xe(...ke){return G(Le=>{let it;const Fe=Le;try{Fe.processor=ie,it=Reflect.apply(q7,null,[Fe,...ke])}finally{Fe.processor=null}return it},()=>G4(...ke),"translate",Le=>Le[Q4](...ke),Le=>[U7(Le)],Le=>ts(Le))}function ce(...ke){return G(Le=>Reflect.apply(j7,null,[Le,...ke]),()=>Z4(...ke),"number format",Le=>Le[J4](...ke),V7,Le=>Ut(Le)||ts(Le))}function pe(...ke){return G(Le=>Reflect.apply(O7,null,[Le,...ke]),()=>V4(...ke),"datetime format",Le=>Le[Y4](...ke),V7,Le=>Ut(Le)||ts(Le))}function Ne(ke){E=ke,S.pluralRules=E}function te(ke,Le){return G(()=>{if(!ke)return!1;const it=Ut(Le)?Le:l.value,Fe=Ut(Le)?[it]:K4(S,a.value,it);for(let Re=0;Re<Fe.length;Re++){const Ke=Y(Fe[Re]);let ht=S.messageResolver(Ke,ke);if(ht===null&&(ht=Ke[ke]),jl(ht)||Rr(ht)||Ut(ht))return!0}return!1},()=>[ke],"translate exists",it=>Reflect.apply(it.te,it,[ke,Le]),CH,it=>Xn(it))}function ye(ke){let Le=null;const it=K4(S,a.value,l.value);for(let Fe=0;Fe<it.length;Fe++){const Re=u.value[it[Fe]]||{},Ke=S.messageResolver(Re,ke);if(Ke!=null){Le=Ke;break}}return Le}function j(ke){const Le=ye(ke);return Le??(t?t.tm(ke)||{}:{})}function Y(ke){return u.value[ke]||{}}function ve(ke,Le){if(s){const it={[ke]:Le};for(const Fe in it)zr(it,Fe)&&U1(it[Fe]);Le=it[ke]}u.value[ke]=Le,S.messages=u.value}function re(ke,Le){u.value[ke]=u.value[ke]||{};const it={[ke]:Le};if(s)for(const Fe in it)zr(it,Fe)&&U1(it[Fe]);Le=it[ke],kg(Le,u.value[ke]),S.messages=u.value}function se(ke){return c.value[ke]||{}}function U(ke,Le){c.value[ke]=Le,S.datetimeFormats=c.value,P7(S,ke,Le)}function J(ke,Le){c.value[ke]=bs(c.value[ke]||{},Le),S.datetimeFormats=c.value,P7(S,ke,Le)}function de(ke){return d.value[ke]||{}}function me(ke,Le){d.value[ke]=Le,S.numberFormats=d.value,H7(S,ke,Le)}function Ie(ke,Le){d.value[ke]=bs(d.value[ke]||{},Le),S.numberFormats=d.value,H7(S,ke,Le)}Z7++,t&&gm&&(Qe(t.locale,ke=>{r&&(l.value=ke,S.locale=ke,wh(S,l.value,a.value))}),Qe(t.fallbackLocale,ke=>{r&&(a.value=ke,S.fallbackLocale=ke,wh(S,l.value,a.value))}));const je={id:Z7,locale:N,fallbackLocale:D,get inheritLocale(){return r},set inheritLocale(ke){r=ke,ke&&t&&(l.value=t.locale.value,a.value=t.fallbackLocale.value,wh(S,l.value,a.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:T,get modifiers(){return x},get pluralRules(){return E||{}},get isGlobal(){return i},get missingWarn(){return f},set missingWarn(ke){f=ke,S.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(ke){p=ke,S.fallbackWarn=p},get fallbackRoot(){return g},set fallbackRoot(ke){g=ke},get fallbackFormat(){return m},set fallbackFormat(ke){m=ke,S.fallbackFormat=m},get warnHtmlMessage(){return A},set warnHtmlMessage(ke){A=ke,S.warnHtmlMessage=ke},get escapeParameter(){return v},set escapeParameter(ke){v=ke,S.escapeParameter=ke},t:K,getLocaleMessage:Y,setLocaleMessage:ve,mergeLocaleMessage:re,getPostTranslationHandler:O,setPostTranslationHandler:R,getMissingHandler:W,setMissingHandler:z,[SE]:Ne};return je.datetimeFormats=$,je.numberFormats=P,je.rt=H,je.te=te,je.tm=j,je.d=q,je.n=X,je.getDateTimeFormat=se,je.setDateTimeFormat=U,je.mergeDateTimeFormat=J,je.getNumberFormat=de,je.setNumberFormat=me,je.mergeNumberFormat=Ie,je[ME]=n,je[Q4]=xe,je[Y4]=pe,je[J4]=ce,je}function xH(e){const t=Ut(e.locale)?e.locale:q1,n=Ut(e.fallbackLocale)||ts(e.fallbackLocale)||Hn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,i=Oi(e.missing)?e.missing:void 0,s=Xn(e.silentTranslationWarn)||Mf(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,o=Xn(e.silentFallbackWarn)||Mf(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=Xn(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,a=Hn(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Oi(e.postTranslation)?e.postTranslation:void 0,d=Ut(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=Xn(e.sync)?e.sync:!0;let g=e.messages;if(Hn(e.sharedMessages)){const x=e.sharedMessages;g=Object.keys(x).reduce((S,M)=>{const _=S[M]||(S[M]={});return bs(_,x[M]),S},g||{})}const{__i18n:m,__root:y,__injectWithOption:w}=e,k=e.datetimeFormats,A=e.numberFormats,v=e.flatJson;return{locale:t,fallbackLocale:n,messages:g,flatJson:v,datetimeFormats:k,numberFormats:A,missing:i,missingWarn:s,fallbackWarn:o,fallbackRoot:r,fallbackFormat:l,modifiers:a,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:m,__root:y,__injectWithOption:w}}function X4(e={}){const t=vm(xH(e)),{__extender:n}=e,i={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 Xn(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=Xn(s)?!s:s},get silentFallbackWarn(){return Xn(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=Xn(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,o){return t.te(s,o)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,o){t.setLocaleMessage(s,o)},mergeLocaleMessage(s,o){t.mergeLocaleMessage(s,o)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,o){t.setDateTimeFormat(s,o)},mergeDateTimeFormat(s,o){t.mergeDateTimeFormat(s,o)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,o){t.setNumberFormat(s,o)},mergeNumberFormat(s,o){t.mergeNumberFormat(s,o)}};return i.__extender=n,i}function _H(e,t,n){return{beforeCreate(){const i=K1();if(!i)throw tr($o.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const o=s.i18n;if(s.__i18n&&(o.__i18n=s.__i18n),o.__root=t,this===this.$root)this.$i18n=Q7(e,o);else{o.__injectWithOption=!0,o.__extender=n.__vueI18nExtend,this.$i18n=X4(o);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=Q7(e,s);else{this.$i18n=X4({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&EE(t,s,s),this.$t=(...o)=>this.$i18n.t(...o),this.$rt=(...o)=>this.$i18n.rt(...o),this.$te=(o,r)=>this.$i18n.te(o,r),this.$d=(...o)=>this.$i18n.d(...o),this.$n=(...o)=>this.$i18n.n(...o),this.$tm=o=>this.$i18n.tm(o),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=K1();if(!i)throw tr($o.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(i),delete this.$i18n)}}}function Q7(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[SE](t.pluralizationRules||e.pluralizationRules);const n=h5(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(i=>e.mergeLocaleMessage(i,n[i])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(i=>e.mergeDateTimeFormat(i,t.datetimeFormats[i])),t.numberFormats&&Object.keys(t.numberFormats).forEach(i=>e.mergeNumberFormat(i,t.numberFormats[i])),e}const p5={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function SH({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((i,s)=>[...i,...s.type===Be?s.children:[s]],[]):t.reduce((n,i)=>{const s=e[i];return s&&(n[i]=s()),n},Ci())}function TE(){return Be}const MH=tt({name:"i18n-t",props:bs({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>vs(e)||!isNaN(e)}},p5),setup(e,t){const{slots:n,attrs:i}=t,s=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return()=>{const o=()=>{const a=Object.keys(n).filter(d=>d[0]!=="_"),u=Ci();e.locale&&(u.locale=e.locale),e.plural!==void 0&&(u.plural=Ut(e.plural)?+e.plural:e.plural);const c=SH(t,a);return s[Q4](e.keypath,c,u)},r=bs(Ci(),i),l=Ut(e.tag)||ti(e.tag)?e.tag:TE();return ti(l)?cn(l,r,{default:o}):cn(l,r,o())}}}),Y7=MH;function IH(e){return ts(e)&&!Ut(e[0])}function LE(e,t,n,i){const{slots:s,attrs:o}=t;return()=>{const r=()=>{const u={part:!0};let c=Ci();e.locale&&(u.locale=e.locale),Ut(e.format)?u.key=e.format:ti(e.format)&&(Ut(e.format.key)&&(u.key=e.format.key),c=Object.keys(e.format).reduce((p,g)=>n.includes(g)?bs(Ci(),p,{[g]:e.format[g]}):p,Ci()));const d=i(e.value,u,c);let f=[u.key];return ts(d)?f=d.map((p,g)=>{const m=s[p.type],y=m?m({[p.type]:p.value,index:g,parts:d}):[p.value];return IH(y)&&(y[0].key=`${p.type}-${g}`),y}):Ut(d)&&(f=[d]),f},l=bs(Ci(),o),a=Ut(e.tag)||ti(e.tag)?e.tag:TE();return ti(a)?cn(a,l,{default:r}):cn(a,l,r())}}const EH=tt({name:"i18n-n",props:bs({value:{type:Number,required:!0},format:{type:[String,Object]}},p5),setup(e,t){const n=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return LE(e,t,wE,(...i)=>n[J4](...i))}}),J7=EH;function TH(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const i=n.__getInstance(t);return i!=null?i.__composer:e.global.__composer}}function LH(e){const t=r=>{const{instance:l,value:a}=r;if(!l||!l.$)throw tr($o.UNEXPECTED_ERROR);const u=TH(e,l.$),c=X7(a);return[Reflect.apply(u.t,u,[...eA(c)]),u]};return{created:(r,l)=>{const[a,u]=t(l);gm&&(r.__i18nWatcher=Qe(u.locale,()=>{l.instance&&l.instance.$forceUpdate()})),r.__composer=u,r.textContent=a},unmounted:r=>{gm&&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,u=X7(l);r.textContent=Reflect.apply(a.t,a,[...eA(u)])}},getSSRProps:r=>{const[l]=t(r);return{textContent:l}}}}function X7(e){if(Ut(e))return{path:e};if(Hn(e)){if(!("path"in e))throw tr($o.REQUIRED_VALUE,"path");return e}else throw tr($o.INVALID_VALUE)}function eA(e){const{path:t,locale:n,args:i,choice:s,plural:o}=e,r={},l=i||{};return Ut(n)&&(r.locale=n),vs(s)&&(r.plural=s),vs(o)&&(r.plural=o),[t,l,r]}function NH(e,t,...n){const i=Hn(n[0])?n[0]:{};(Xn(i.globalInstall)?i.globalInstall:!0)&&([Y7.name,"I18nT"].forEach(o=>e.component(o,Y7)),[J7.name,"I18nN"].forEach(o=>e.component(o,J7)),[iA.name,"I18nD"].forEach(o=>e.component(o,iA))),e.directive("t",LH(t))}const FH=Nu("global-vue-i18n");function BH(e={}){const t=__VUE_I18N_LEGACY_API__&&Xn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Xn(e.globalInjection)?e.globalInjection:!0,i=new Map,[s,o]=$H(e,t),r=Nu("");function l(d){return i.get(d)||null}function a(d,f){i.set(d,f)}function u(d){i.delete(d)}const c={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__,c),Hn(f[0])){const m=f[0];c.__composerExtend=m.__composerExtend,c.__vueI18nExtend=m.__vueI18nExtend}let p=null;!t&&n&&(p=HH(d,c.global)),__VUE_I18N_FULL_INSTALL__&&NH(d,c,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(_H(o,o.__composer,c));const g=d.unmount;d.unmount=()=>{p&&p(),c.dispose(),g()}},get global(){return o},dispose(){s.stop()},__instances:i,__getInstance:l,__setInstance:a,__deleteInstance:u};return c}function Bt(e={}){const t=K1();if(t==null)throw tr($o.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw tr($o.NOT_INSTALLED);const n=DH(t),i=zH(n),s=IE(t),o=RH(e,s);if(o==="global")return EE(i,e,s),i;if(o==="parent"){let a=tA(n,t,e.__useComponent);return a==null&&(a=i),a}if(o==="isolated"){if(n.mode!=="composition")throw tr($o.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=n,u=bs({},e),c=tA(n,t);u.__root=c||i;const d=vm(u);return a.__composerExtend&&(d[Kd]=a.__composerExtend(d)),P2()&&Rf(()=>{const p=d[Kd];p&&(p(),delete d[Kd])}),d}const r=n;let l=r.__getInstance(t);if(l==null){const a=bs({},e);"__i18n"in s&&(a.__i18n=s.__i18n),i&&(a.__root=i),l=vm(a),r.__composerExtend&&(l[Kd]=r.__composerExtend(l)),PH(r,t,l),r.__setInstance(t,l)}return l}function $H(e,t){const n=sz(),i=__VUE_I18N_LEGACY_API__&&t?n.run(()=>X4(e)):n.run(()=>vm(e));if(i==null)throw tr($o.UNEXPECTED_ERROR);return[n,i]}function DH(e){const t=an(e.isCE?FH:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw tr(e.isCE?$o.NOT_INSTALLED_WITH_PROVIDE:$o.UNEXPECTED_ERROR);return t}function RH(e,t){return Q2(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function zH(e){return e.mode==="composition"?e.global:e.global.__composer}function tA(e,t,n=!1){let i=null;const s=t.root;let o=OH(t,n);for(;o!=null;){const r=e;if(e.mode==="composition")i=r.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const l=r.__getInstance(o);l!=null&&(i=l.__composer,n&&i&&!i[ME]&&(i=null))}if(i!=null||s===o)break;o=o.parent}return i}function OH(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function PH(e,t,n){pn(()=>{},t),An(()=>{const i=n;e.__deleteInstance(t);const s=i[Kd];s&&(s(),delete i[Kd])},t)}const jH=["locale","fallbackLocale","availableLocales"],nA=["t","rt","d","n","tm","te"];function HH(e,t){const n=Object.create(null);return jH.forEach(s=>{const o=Object.getOwnPropertyDescriptor(t,s);if(!o)throw tr($o.UNEXPECTED_ERROR);const r=ls(o.value)?{get(){return o.value.value},set(l){o.value.value=l}}:{get(){return o.get&&o.get()}};Object.defineProperty(n,s,r)}),e.config.globalProperties.$i18n=n,nA.forEach(s=>{const o=Object.getOwnPropertyDescriptor(t,s);if(!o||!o.value)throw tr($o.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,o)}),()=>{delete e.config.globalProperties.$i18n,nA.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const WH=tt({name:"i18n-d",props:bs({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},p5),setup(e,t){const n=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return LE(e,t,CE,(...i)=>n[Y4](...i))}}),iA=WH;AH();eH($j);tH(Yj);nH(K4);if(__INTLIFY_PROD_DEVTOOLS__){const e=Sc();e.__INTLIFY__=!0,Dj(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const qH={preview:"Preview",confirm:"Confirm",cancel:"Cancel",close:"Close",dismiss:"Dismiss",loading:"Loading",copy:"Copy"},UH={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"},KH={workspaceMeta:"workspace · {branch}",sessionsHeader:"sessions",workspaces:"Workspaces",viewSwitcher:"View options",viewGroup:"View",viewFlat:"Flat list",viewGrouped:"Group by workspace",sortGroup:"Sort order",sortManual:"Manual",sortRecent:"Recent activity",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",genTitle:"Gen Title",genTitleUnavailable:"Title generation unavailable — needs a managed Kimi Code login and at least one message",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",upgradeMembership:"Upgrade membership",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",loadMore:"Load more",showLess:"Show less",loadingMore:"Loading…",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",searchPlaceholder:"Search sessions and workspaces",search:"Search",searchHint:"↑↓ navigate · ↵ open · Esc close",searchHintSelect:"navigate",searchHintOpen:"open",searchHintClose:"close",searchClear:"Clear search",searchNoResults:"No matching sessions or workspaces",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"},VH={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:"Failed",abortedTitle:"This session's latest turn ended on an error"},ZH={jumpToLatestAria:"Jump to latest message",toc:"Conversation outline",newMessages:"Latest messages",loading:"Loading…",starting:"Starting conversation…",requesting:"Requesting…",working:"Working…",workingRetry:"Model request failed — retrying ({n}/{max})…",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:"Undo edit",undoConfirm:"Undo last message?",escUndoHintPre:"Press",escUndoHintPost:"again to undo",undone:"Undone — the message is back in the composer",turnInterrupted:"Manually stopped",turnFailed:"Model request failed — this turn was interrupted",turnFailedMaxSteps:"Step limit reached — this turn was interrupted",turnFailedResume:"Continue",turnFailedResumeText:"Continue",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"}},GH={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",planOn:"on",planOff:"off",planTooltip:"Toggle plan mode (research before editing)",workModeDismiss:"Exit mode",goalLabel:"Goal",timeUnitHour:"h",timeUnitMinute:"m",timeUnitSecond:"s",planEmptyArmed:"Plan mode is on — the plan the agent writes will show up here.",planEmptyIdle:"No plan yet — turn plan mode on and the agent’s plan will show up here.",swarmLabel:"Swarm",swarmDismiss:"Turn off Swarm",modeOff:"Off",goalPlaceholder:"What should the agent achieve?",planPlaceholder:"What should the agent plan for?",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"},QH={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",addMenu:"Add",addFiles:"Files",addGoalDesc:"Set a goal to keep pursuing",addPlanDesc:"Turn plan mode on",addSwarmDesc:"Turn swarm mode on",noCommands:"No commands",previewAttachment:"Preview {name}",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}"},YH={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.",rcSubtitle:"Remote Control session",rcChecking:"Checking sign-in status…",rcLead:"This Remote Control session requires authorization. Sign in with your Kimi account to continue.",rcAuthorize:"Open authorization page",rcUserCodeLabel:"Authorization code",rcSuccessHint:"Redirecting…",rcExpiredTitle:"Authorization expired or declined",rcStartErrorTitle:"Could not start sign-in",rcConnectionErrorHint:"Check your connection and try again.",rcSuccessNoRedirect:"You can close this page now."},JH={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"},XH={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"},eW={justNow:"just now"},tW={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"},nW={back:"‹ Previous question",nextQuestion:"Next question ›",otherDefault:"Other…",submit:"Submit",dismiss:"Dismiss",minimize:"Minimize",expand:"Expand",hint:"↑↓ to choose · Enter to confirm"},iW={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",todoProgressTitle:"Progress",stateDone:"Done",stateFail:"Failed",stateCancelled:"Cancelled",filterRecent:"Recent",filterRunning:"Running",filterDone:"Done",filterAll:"All",running:"running",closePanel:"Close panel",openPanel:"Open in the side panel",timingRunning:"Running · {time}",timingDone:"Done · {time}",emptyTasks:"No background tasks running",emptyRecent:"No recent tasks",emptyRunning:"No running tasks",emptyDone:"No completed tasks",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.",copyCommand:"Copy command",copyOutput:"Copy output"},sW={panelTitle:"Thinking",streaming:"Thinking…",close:"Close"},oW={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"},rW={},lW={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"}},aW={searching:"Searching…",noMatch:"No matches"},uW={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",daemonTimeoutMessage:"The Kimi server did not respond within the wait limit. The operation may still complete in the background — refresh later to check, or try again.",daemonTimeoutTitle:"Kimi server response timed out",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."}},cW={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 <task> runs a task in swarm"},goal:{desc:"Create/control a goal: /goal <objective>, /goal pause{'|'}resume{'|'}cancel"},btw:{desc:"Side chat: /btw <question> 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.",started:"Exporting session…",done:"Session exported.",tooLarge:"Session data exceeds the export size limit. Export it from a terminal instead: kimi export {sessionId} -o session.zip"},status:{desc:"View session status"},undo:{desc:"Undo the last message"}},dW={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",doneSubWithCancelled:"{completed} completed · {failed} failed · {cancelled} cancelled",phaseQueued:"Queued",phaseWorking:"Working",phaseSuspended:"Suspended",phaseCompleted:"Completed",phaseFailed:"Failed",phaseCancelled:"Cancelled",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",pathOnlyHint:"No inline content — open it in the side panel:",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"}},fW={resizeHandleAria:"Resize sidebar width",resizePreviewAria:"Resize preview panel width",detailPanelAria:"Detail panel"},hW={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",goalModeSub:"Goal mode",swarmModeSub:"Swarm mode",archivedSessions:"Archived sessions",archivedSessionsSub:"Browse and restore archived sessions",archivedBack:"Back"},pW={colorSchemeLabel:"Appearance",light:"Moon bright",dark:"Moon dark",system:"System"},gW={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"}},mW={title:"Settings",internalTest:"Internal Test",close:"Close (Esc)",tabs:{general:"General",agent:"Agent",account:"Account",providers:"Providers",advanced:"Advanced",archived:"Archived",shortcuts:"Hotkeys",plugins:"Plugins"},plugins:{retry:"Retry",builtIn:"Built-in",official:"Official",thirdParty:"Third-party",installed:"Installed",install:"Install",update:"Update",remove:"Remove",enabled:"Enabled",homepage:"Homepage",empty:"No plugins found",hasErrors:"Error",customInstall:"Install custom plugin",customInstallPlaceholder:"https://… or /path/to/plugin",customInstallHint:"Accepts an https zip URL, a GitHub repo URL, or a local directory path.",extensionHintTitle:"One step left: install the browser extension",extensionGuide:"Manual install",dismissHint:"Dismiss",catalogUnavailable:"The marketplace catalog is currently unreachable; installed plugins remain manageable below.",source:{"local-path":"Local","zip-url":"ZIP",github:"GitHub"},counts:{skill:"1 skill | {n} skills",mcp:"1 MCP server | {n} MCP servers",mcpEnabled:"{n} on",hook:"1 hook | {n} hooks",command:"1 command | {n} commands"}},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…"},vW={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"},yW={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"},bW={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"},kW={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}]"},AW={common:qH,app:UH,sidebar:KH,workspace:VH,conversation:ZH,status:GH,composer:QH,login:YH,providers:JH,model:XH,sessions:eW,approval:tW,question:nW,tasks:iW,thinking:sW,diff:oW,fileTree:rW,filePreview:lW,mention:aW,warnings:uW,commands:cW,tools:dW,layout:fW,mobile:hW,theme:pW,onboarding:gW,settings:mW,header:vW,sideChat:yW,shortcuts:bW,terminal:kW},CW={preview:"预览",confirm:"确认",cancel:"取消",close:"关闭",dismiss:"关闭",loading:"加载中",copy:"复制"},wW={authBannerMessage:"未登录 · 需要登录 Kimi Code 才能开始对话",authBannerLogin:"登录",connecting:"连接中…",internalBuildBanner:"仅供内部测试",menuFile:"文件",menuEdit:"编辑",menuView:"视图",menuHelp:"帮助",applicationMenu:"应用菜单"},xW={workspaceMeta:"workspace · {branch}",sessionsHeader:"会话",workspaces:"工作区",viewSwitcher:"视图选项",viewGroup:"视图",viewFlat:"平铺列表",viewGrouped:"按工作区分组",sortGroup:"排序",sortManual:"手动排序",sortRecent:"按最近活动",collapseAll:"折叠全部工作区",expandAll:"展开全部工作区",newSession:"新建会话",newChat:"新建会话",newWorkspace:"新建工作区",dropToAddWorkspace:"松开鼠标添加工作区",emptyState:"还没有会话 · 点击 新建会话 开始",options:"选项",rename:"重命名",genTitle:"生成标题",genTitleUnavailable:"无法生成标题:需要登录 Kimi Code 托管账号,且会话中已有消息",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:"升级",upgradeMembership:"会员升级",logoutConfirmTitle:"退出登录",logoutConfirmMessage:"确定要退出当前账号吗?",language:"语言",backendTitle:"后端 {backend} · {endpoint} — 点击切换",noSessions:"暂无对话",allPinned:"有 {count} 条对话被置顶",showMore:"展开更多",loadMore:"加载更多",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:"以后自动下载并安装更新"},_W={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:"此会话的上一轮对话因错误中断"},SW={jumpToLatestAria:"跳到最新消息",toc:"对话目录",newMessages:"最新消息",loading:"加载中…",starting:"正在创建对话…",requesting:"请求中…",working:"工作中…",workingRetry:"模型请求失败,正在重试(第 {n}/{max} 次)…",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:"已手动终止",turnFailed:"模型请求失败,本轮对话已中断",turnFailedMaxSteps:"达到本轮步数上限,对话已中断",turnFailedResume:"继续",turnFailedResumeText:"继续",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:"关闭搜索"}},MW={connectionConnected:"已连接",connectionConnecting:"连接中…",connectionDisconnected:"未连接",ctxTooltip:"使用 {used} / {max} tokens ({pct}%)",modelLabel:"模型",permissionManual:"逐条确认",permissionAuto:"完全自主",permissionYolo:"自动通过",permissionManualDesc:"每个工具操作都需要你手动确认",permissionAutoDesc:"完全自主运行,智能体自己做决定,不再询问",permissionYoloDesc:"自动批准工具操作,但遇到关键问题仍会询问",planLabel:"计划",planOn:"开",planOff:"关",planTooltip:"切换计划模式(先调研再修改)",workModeDismiss:"退出模式",goalLabel:"目标",timeUnitHour:"小时",timeUnitMinute:"分",timeUnitSecond:"秒",planEmptyArmed:"计划模式已开启,智能体写出计划后会显示在这里",planEmptyIdle:"还没有计划——开启计划模式后,智能体写出的计划会显示在这里",swarmLabel:"Swarm",swarmDismiss:"关闭 Swarm",modeOff:"未启用",goalPlaceholder:"让智能体完成什么目标?",planPlaceholder:"让智能体先规划什么?",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:"进行中"},IW={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:"添加附件",addMenu:"添加",addFiles:"文件",addGoalDesc:"设定目标并持续推进",addPlanDesc:"启用计划模式",addSwarmDesc:"启用 swarm 模式",noCommands:"无匹配命令",previewAttachment:"预览 {name}",interrupt:"中断",interruptTitle:"中断当前操作",expandTitle:"展开输入框进行多行编辑",collapseTitle:"收起输入框",emptyConversationTitle:"Kimi Code",emptyConversation:"还没有消息 —— 在下方输入开始对话",upgradeBanner:"升级你的 Kimi 账户来使用 Kimi Code",quickStartPlaceholder:"输入消息开始新对话…",thinkingSuffix:" · 思考",thinkingSuffixEffort:" · {level}"},EW={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 模型开始对话。",rcSubtitle:"远程控制会话",rcChecking:"正在检查登录状态…",rcLead:"此远程控制会话需要授权。使用 Kimi 账号登录后即可继续。",rcAuthorize:"打开授权页",rcUserCodeLabel:"授权码",rcSuccessHint:"正在跳转…",rcExpiredTitle:"授权已过期或被取消",rcStartErrorTitle:"无法开始登录",rcConnectionErrorHint:"请检查网络连接后重试。",rcSuccessNoRedirect:"现在可以关闭本页了。"},TW={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:"关闭"},LW={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:"关闭"},NW={justNow:"刚刚"},FW={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:"还原"},BW={back:"‹ 上一题",nextQuestion:"下一题 ›",otherDefault:"其他…",submit:"提交",dismiss:"放弃",minimize:"最小化",expand:"展开",hint:"↑↓ 选择 · Enter 确认"},$W={tag:"任务",summary:"{run} 运行中 · {done} 完成",copy:"复制",calling:"调用 {label}",fieldTask:"任务",fieldOutput:"输出",fieldProgress:"进度",fieldResult:"结果",moreLines:"…(还有 {count} 行)",copied:"已复制",stop:"stop",defaultDescription:"后台任务",dockTasks:"后台任务",dockBash:"后台 Bash",dockSubagent:"子 Agent",dockTodos:"待办",todoProgressTitle:"当前进度",stateDone:"完成",stateFail:"失败",stateCancelled:"已取消",filterRecent:"最近",filterRunning:"进行中",filterDone:"已完成",filterAll:"全部",running:"运行中",closePanel:"关闭面板",openPanel:"在侧边栏打开",timingRunning:"运行中 · {time}",timingDone:"完成 · {time}",emptyTasks:"暂无后台任务",emptyRecent:"暂无最近任务",emptyRunning:"暂无运行中的任务",emptyDone:"暂无已完成的任务",emptyBash:"暂无后台 Bash 任务",emptySubagent:"暂无子 Agent 任务",emptyTodo:"暂无待办事项",openTab:"查看全部后台任务",openDetail:"查看",collapse:"折叠",expand:"展开",transcriptLoadError:"无法加载这个子 Agent 的对话。",copyCommand:"复制命令",copyOutput:"复制输出"},DW={panelTitle:"思考过程",streaming:"思考中…",close:"关闭"},RW={title:"改动",branch:"分支",aheadTitle:"领先远程",behindTitle:"落后远程",fileCountOne:"{number} 个文件",fileCountOther:"{number} 个文件",empty:"无 git 改动",clean:"工作区干净,无改动",back:"返回",loading:"正在加载 diff…",noDiff:"该文件没有行级改动",emptyFile:"空文件",list:"列表",tree:"树形",close:"关闭"},zW={},OW={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:"无法读取这个文件"}},PW={searching:"搜索中…",noMatch:"无匹配"},jW={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 服务器",daemonTimeoutMessage:"Kimi 服务器在等待时限内没有响应。操作可能仍在后台执行,请稍后刷新确认结果,或重试。",daemonTimeoutTitle:"Kimi 服务器响应超时",diagnostics:"诊断信息",hideDetails:"收起详情",operationFailedMessage:"刚才的操作没有完成,请稍后重试。",operationFailedTitle:"操作失败",sessionSnapshotMessage:"Web 没能加载当前会话内容。请确认 Kimi 服务器仍在运行,或刷新页面重试。",sessionSnapshotTitle:"无法加载当前会话内容",showDetails:"查看详情",copyDetails:"复制诊断信息",copied:"已复制",wsTitle:"实时连接出错",goal:{alreadyExists:"当前会话已有一个进行中的目标,请先取消它再创建新目标。",notFound:"没有找到可操作的目标,可能它已经结束或被取消。",statusInvalid:"当前目标状态不支持这个操作。",notResumable:"这个目标无法恢复(可能已取消或已完成)。",objectiveTooLong:"目标描述太长了,请精简后重试。"}},HW={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:"请先打开一个会话再导出。",started:"正在导出会话…",done:"会话导出完成。",tooLarge:"会话数据超过导出大小限制,可在终端用 CLI 导出:kimi export {sessionId} -o session.zip"},status:{desc:"查看会话状态"},undo:{desc:"撤销上一条消息"}},WW={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}",doneSubWithCancelled:"完成 {completed} · 失败 {failed} · 已取消 {cancelled}",phaseQueued:"排队",phaseWorking:"运行中",phaseSuspended:"暂停",phaseCompleted:"完成",phaseFailed:"失败",phaseCancelled:"已取消",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:"已选择",pathOnlyHint:"该计划未保存内联内容,可在侧边栏打开:",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:"未作答"}},qW={resizeHandleAria:"调整侧栏宽度",resizePreviewAria:"调整预览面板宽度",detailPanelAria:"详情面板"},UW={openSwitcher:"切换会话 / 工作区",openSettings:"会话设置",settingsTitle:"会话设置",groupSession:"当前会话",groupApp:"应用偏好",sheetLabel:"面板",closeSheet:"关闭",tapToCycle:"点击切换",running:"运行中",idle:"空闲",sessionCount:"{n} 个会话",newSession:"新建会话",permManualSub:"每个工具都确认",permAutoSub:"完全自主,不再提问",permYoloSub:"自动批准工具,仍可能提问",planModeSub:"计划模式",goalModeSub:"目标模式",swarmModeSub:"Swarm 模式",archivedSessions:"已归档会话",archivedSessionsSub:"查看并恢复已归档会话",archivedBack:"返回"},KW={colorSchemeLabel:"外观",light:"月之亮面",dark:"月之暗面",system:"跟随系统"},VW={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:"跳过,稍后再说"}},ZW={title:"设置",internalTest:"内部测试",close:"关闭 (Esc)",tabs:{general:"通用",agent:"Agent",account:"账户",providers:"供应商",advanced:"高级",archived:"已归档",shortcuts:"快捷键",plugins:"插件"},plugins:{retry:"重试",builtIn:"内置",official:"官方",thirdParty:"第三方",installed:"已安装",install:"安装",update:"更新",remove:"移除",enabled:"启用",homepage:"主页",empty:"没有找到插件",hasErrors:"错误",customInstall:"安装自定义插件",customInstallPlaceholder:"https://… 或 /本地/目录",customInstallHint:"支持 https zip 链接、GitHub 仓库地址或本地目录路径。",extensionHintTitle:"还差一步:安装浏览器扩展",extensionGuide:"手动安装",dismissHint:"知道了",catalogUnavailable:"插件市场目录暂时不可达;已安装的插件仍可正常管理。",source:{"local-path":"本地","zip-url":"ZIP",github:"GitHub"},counts:{skill:"{n} 个技能",mcp:"{n} 个 MCP 服务",mcpEnabled:"启用 {n} 个",hook:"{n} 个钩子",command:"{n} 个命令"}},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:"正在加载全部归档会话…"},GW={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:"开发环境运行中"},QW={title:"侧边聊天",subtitle:"从当前会话 fork",empty:"在侧边随手问一句 —— 它共享当前会话的上下文。",placeholder:"问问侧边聊天…",send:"发送"},YW={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:"自定义"},JW={panelAria:"终端",toolbarAria:"终端标签页",resizeAria:"调整终端面板高度",toggle:"切换终端",newTab:"新建终端",closeTab:"关闭终端",restartTab:"重启终端",collapse:"收起终端面板",empty:"还没有终端,点击新建一个",processExited:"[进程已退出]",processExitedWithCode:"[进程已退出,退出码 {code}]"},XW={common:CW,app:wW,sidebar:xW,workspace:_W,conversation:SW,status:MW,composer:IW,login:EW,providers:TW,model:LW,sessions:NW,approval:FW,question:BW,tasks:$W,thinking:DW,diff:RW,fileTree:zW,filePreview:OW,mention:PW,warnings:jW,commands:HW,tools:WW,layout:qW,mobile:UW,theme:KW,onboarding:VW,settings:ZW,header:GW,sideChat:QW,shortcuts:YW,terminal:JW},eq={en:AW,zh:XW},tq="kimi-locale";function NE(){let e=null;try{e=globalThis.localStorage?.getItem(tq)??null}catch{e=null}return e==="en"||e==="zh"?e:globalThis.navigator?.language?.toLowerCase().startsWith("zh")?"zh":"en"}function nq(e){const t=e.locale??NE();return BH({legacy:!1,locale:t,fallbackLocale:"en",messages:eq})}const FE=Symbol("KimiI18n"),iq={t:e=>e};function jf(){const e=an(FE,null);if(e)return e;try{const t=Bt();return{t:(n,i)=>t.t(n,i),locale:t.locale.value}}catch{return iq}}const ja=6,Ha=8,sq=150,oq=tt({__name:"TooltipBubble",props:{target:{default:null},delegate:{default:null},text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=e,n=Z(),i=Z(!1),s=Z(!1),o=Z({maxWidth:`${t.maxWidth}px`});let r,l=null,a;function u(){if(t.target)return t.target;const S=t.delegate;return S?S.firstElementChild??S:null}function c(S){const M=n.value;if(!M)return;const _=S.getBoundingClientRect(),N=M.offsetWidth,D=M.offsetHeight,T=window.innerWidth,$=window.innerHeight;let P=t.placement;P==="top"&&_.top-ja-D<Ha?P="bottom":P==="bottom"&&_.bottom+ja+D>$-Ha?P="top":P==="left"&&_.left-ja-N<Ha?P="right":P==="right"&&_.right+ja+N>T-Ha&&(P="left");let O=0,R=0;P==="top"?(O=_.top-ja-D,R=_.left+_.width/2-N/2):P==="bottom"?(O=_.bottom+ja,R=_.left+_.width/2-N/2):P==="left"?(O=_.top+_.height/2-D/2,R=_.left-ja-N):(O=_.top+_.height/2-D/2,R=_.right+ja),R=Math.min(Math.max(R,Ha),T-Ha-N),O=Math.min(Math.max(O,Ha),$-Ha-D),o.value={maxWidth:`${t.maxWidth}px`,top:`${Math.round(O)}px`,left:`${Math.round(R)}px`}}function d(){if(!t.text)return;const S=u();S&&(window.clearTimeout(r),r=window.setTimeout(()=>{i.value=!0,s.value=!1,kt(()=>{c(S),s.value=!0})},sq))}function f(){window.clearTimeout(r),i.value=!1,s.value=!1}function p(){d()}function g(){f()}function m(S){return S instanceof Element?S.closest(".ui-tip"):null}function y(S){const M=t.delegate;if(!M)return;if(m(S.target)!==M){f();return}const _=S.relatedTarget;_ instanceof Element&&M.contains(_)&&m(_)===M||d()}function w(S){const M=t.delegate;if(!M)return;const _=S.relatedTarget;_ instanceof Element&&M.contains(_)||f()}function k(S){m(S.target)===t.delegate&&d()}function A(){f()}function v(){l&&(t.delegate?(l.removeEventListener("mouseover",y),l.removeEventListener("mouseout",w),l.removeEventListener("focusin",k),l.removeEventListener("focusout",A)):(l.removeEventListener("mouseenter",p),l.removeEventListener("mouseleave",g),l.removeEventListener("focusin",p),l.removeEventListener("focusout",g)),l=null)}function x(){v(),a?.disconnect(),a=void 0;const S=t.target??t.delegate;S&&(l=S,t.delegate?(S.addEventListener("mouseover",y),S.addEventListener("mouseout",w),S.addEventListener("focusin",k),S.addEventListener("focusout",A),a=new MutationObserver(()=>{i.value&&f()}),a.observe(S,{childList:!0})):(S.addEventListener("mouseenter",p),S.addEventListener("mouseleave",g),S.addEventListener("focusin",p),S.addEventListener("focusout",g)))}Qe(()=>[t.target,t.delegate],()=>{f(),x()});function E(){i.value&&f()}return pn(()=>{x(),window.addEventListener("scroll",E,!0),window.addEventListener("resize",E)}),Gn(()=>{window.clearTimeout(r),a?.disconnect(),v(),window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E)}),(S,M)=>i.value?(b(),fe(Wr,{key:0,to:"body"},[C("div",{ref_key:"bubble",ref:n,class:De(["ui-tip__bubble",{positioned:s.value}]),style:Vt([o.value,{"--tip-lines":e.maxLines}]),role:"tooltip"},B(e.text),7)])):ne("",!0)}}),vt=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},BE=vt(oq,[["__scopeId","data-v-93bacf6d"]]),rq=["type","disabled","aria-label"],lq=tt({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},label:{},tooltip:{},type:{default:"button"}},setup(e,{expose:t}){const n=Z();return t({el:n}),(i,s)=>(b(),I("button",{ref_key:"el",ref:n,class:De(["ui-icon-button",`ui-icon-button--${e.size}`]),type:e.type,disabled:e.disabled,"aria-label":e.label},[En(i.$slots,"default",{},void 0,!0),e.tooltip?(b(),fe(BE,{key:0,target:n.value??null,text:e.tooltip},null,8,["target","text"])):ne("",!0)],10,rq))}}),rn=vt(lq,[["__scopeId","data-v-2cbeca98"]]),$E=Symbol("IconResolver"),aq={sm:14,md:16,lg:20},Ce=tt({__name:"Icon",props:{name:{},size:{default:"md"},label:{}},setup(e){const t=e,n=an($E,()=>{}),i=F(()=>n(t.name)),s=F(()=>aq[t.size]);return(o,r)=>i.value?(b(),fe(Ms(i.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"])):ne("",!0)}}),uq={class:"ui-action-toast-host"},cq={class:"ui-action-toast__body"},dq=tt({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,i=t,{t:s}=jf();let o=null,r=0,l=0;function a(d){o=setTimeout(()=>i("dismiss",n.dismissToken),d),r=Date.now()+d}function u(){o!==null&&(clearTimeout(o),o=null,l=Math.max(0,r-Date.now()))}function c(){o===null&&a(l)}return a(n.duration),An(()=>{o!==null&&clearTimeout(o)}),(d,f)=>(b(),I("div",uq,[C("div",{class:"ui-action-toast",role:"status",onPointerenter:u,onPointerleave:c},[C("span",cq,[En(d.$slots,"default")]),V(rn,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??h(s)("common.dismiss"),tooltip:e.dismissLabel??h(s)("common.dismiss"),onClick:f[0]||(f[0]=p=>i("dismiss",e.dismissToken))},{default:he(()=>[V(Ce,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],32)]))}}),fq=vt(dq,[["__scopeId","data-v-e6936dfd"]]),hq={key:0,width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",stroke:"var(--color-success)","stroke-width":"2","aria-hidden":"true"},pq={key:1,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-danger)","stroke-width":"1.5","aria-hidden":"true"},gq={key:2,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-warning)","stroke-width":"1.5","aria-hidden":"true"},cf=tt({__name:"AuthStateIcon",props:{kind:{}},setup(e){return(t,n)=>e.kind==="success"?(b(),I("svg",hq,[...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"?(b(),I("svg",pq,[...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)])])):(b(),I("svg",gq,[...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)])]))}}),mq={key:0,class:"ui-badge__dot","aria-hidden":"true"},vq=tt({__name:"Badge",props:{variant:{default:"neutral"},size:{default:"md"},dot:{type:Boolean}},setup(e){return(t,n)=>(b(),I("span",{class:De(["ui-badge",[`ui-badge--${e.variant}`,`ui-badge--${e.size}`]])},[e.dot?(b(),I("span",mq)):ne("",!0),En(t.$slots,"default",{},void 0,!0)],2))}}),Hl=vt(vq,[["__scopeId","data-v-d879fe18"]]),yq={class:"ui-banner__icon","aria-hidden":"true"},bq={class:"ui-banner__text"},kq=tt({__name:"Banner",props:{variant:{default:"info"}},setup(e){return(t,n)=>(b(),I("div",{class:De(["ui-banner",`ui-banner--${e.variant}`]),role:"status"},[C("span",yq,[En(t.$slots,"icon",{},()=>[e.variant==="info"?(b(),fe(Ce,{key:0,name:"info",size:"md"})):(b(),fe(Ce,{key:1,name:"alert-triangle",size:"md"}))],!0)]),C("span",bq,[En(t.$slots,"default",{},void 0,!0)])],2))}}),Ac=vt(kq,[["__scopeId","data-v-6d739c6d"]]),Aq=["aria-label"],Cq=tt({__name:"Spinner",props:{size:{default:"md"},label:{}},setup(e){const{t}=jf(),n=Z(null);let i,s;function o(){const r=n.value;if(r){if(s?.matches){i?.cancel(),i=void 0;return}i||(i=r.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:850,iterations:1/0}),i.startTime=0)}}return pn(()=>{const r=n.value;!r||typeof r.animate!="function"||(s=window.matchMedia("(prefers-reduced-motion: reduce)"),s.addEventListener("change",o),o())}),Gn(()=>{s?.removeEventListener("change",o),s=void 0,i?.cancel(),i=void 0}),(r,l)=>(b(),I("span",{ref_key:"boxRef",ref:n,class:De(["ui-spinner",`ui-spinner--${e.size}`]),role:"status","aria-label":e.label??h(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,Aq))}}),Bi=vt(Cq,[["__scopeId","data-v-476ed1b4"]]),wq=["type","disabled"],xq={class:"ui-button__content"},_q=tt({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},loading:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(b(),I("button",{class:De(["ui-button",[`ui-button--${e.variant}`,`ui-button--${e.size}`,{"is-loading":e.loading}]]),type:e.type,disabled:e.disabled||e.loading},[e.loading?(b(),fe(Bi,{key:0,size:"sm",class:"ui-button__spinner"})):ne("",!0),C("span",xq,[En(t.$slots,"default",{},void 0,!0)])],10,wq))}}),jt=vt(_q,[["__scopeId","data-v-01b5ec22"]]),Sq={key:0,class:"ui-card__head"},Mq={class:"ui-card__body"},Iq={key:1,class:"ui-card__foot"},Eq=tt({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(b(),I("div",{class:De(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(b(),I("div",Sq,[En(t.$slots,"head",{},void 0,!0)])):ne("",!0),C("div",Mq,[En(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(b(),I("div",Iq,[En(t.$slots,"foot",{},void 0,!0)])):ne("",!0)],2))}}),Tq=vt(Eq,[["__scopeId","data-v-fbd05138"]]),Lq=["checked","disabled"],Nq={class:"ui-check__box","aria-hidden":"true"},Fq={key:0,class:"ui-check__label"},Bq=tt({__name:"Checkbox",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(i,s)=>(b(),I("label",{class:De(["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]=o=>n("update:modelValue",o.target.checked))},null,40,Lq),C("span",Nq,[e.modelValue?(b(),fe(Ce,{key:0,name:"check",size:"md"})):ne("",!0)]),i.$slots.default?(b(),I("span",Fq,[En(i.$slots,"default",{},void 0,!0)])):ne("",!0)],2))}}),$q=vt(Bq,[["__scopeId","data-v-d4bf4026"]]),Dq={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},Rq=["stroke-dasharray","stroke-dashoffset"],V9=7,zq=tt({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*V9;return(i,s)=>(b(),I("svg",Dq,[C("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:V9,fill:"none","stroke-width":"2.5"}),C("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:V9,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,Rq)]))}}),Oq=vt(zq,[["__scopeId","data-v-de787cf2"]]),Ao=Z(0),Pq=["aria-label"],jq={key:0,class:"ui-dialog__head"},Hq={class:"ui-dialog__titles"},Wq={key:0,class:"ui-dialog__title"},qq={key:1,class:"ui-dialog__desc"},Uq={class:"ui-dialog__body"},Kq={key:1,class:"ui-dialog__foot"},Vq='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',Zq=tt({__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,i=t,{t:s}=jf(),o=Z(null);let r=null;function l(){i("update:open",!1),i("close")}function a(){return o.value?Array.from(o.value.querySelectorAll(Vq)):[]}function u(){const{initialFocus:f}=n;return f?typeof f=="function"?f()??null:typeof f=="string"?o.value?.querySelector(f)??null:o.value?.contains(f)?f:null:null}function c(f){if(!n.open)return;if(f.key==="Escape"&&n.closeOnEsc){f.preventDefault(),l();return}if(f.key!=="Tab")return;const p=a(),g=p[0],m=p[p.length-1];if(!g||!m){f.preventDefault(),o.value?.focus();return}const y=document.activeElement;f.shiftKey&&y===g?(f.preventDefault(),m.focus()):!f.shiftKey&&y===m&&(f.preventDefault(),g.focus())}function d(f){n.closeOnOverlay&&f.target===f.currentTarget&&l()}return Qe(()=>n.open,async f=>{if(f){Ao.value+=1,r=document.activeElement,await kt();const p=u(),g=a();(p??g[0]??o.value)?.focus()}else Ao.value=Math.max(0,Ao.value-1),r instanceof HTMLElement&&(r.focus(),r=null)},{immediate:!0}),typeof window<"u"&&window.addEventListener("keydown",c),Gn(()=>{typeof window<"u"&&window.removeEventListener("keydown",c),n.open&&(Ao.value=Math.max(0,Ao.value-1),r instanceof HTMLElement&&r.focus())}),(f,p)=>(b(),fe(Wr,{to:"body"},[e.open?(b(),I("div",{key:0,class:"ui-dialog__overlay",onMousedown:d},[C("div",{ref_key:"panel",ref:o,class:De(["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?(b(),I("div",jq,[En(f.$slots,"head",{},()=>[C("div",Hq,[e.title?(b(),I("div",Wq,B(e.title),1)):ne("",!0),e.description?(b(),I("div",qq,B(e.description),1)):ne("",!0)])],!0),e.hideClose?ne("",!0):(b(),fe(rn,{key:0,class:"ui-dialog__close",size:"sm",label:h(s)("common.close"),tooltip:h(s)("common.close"),onClick:l},{default:he(()=>[V(Ce,{name:"close",size:"md"})]),_:1},8,["label","tooltip"]))])):ne("",!0),C("div",Uq,[En(f.$slots,"default",{},void 0,!0)]),f.$slots.foot?(b(),I("div",Kq,[En(f.$slots,"foot",{},void 0,!0)])):ne("",!0)],10,Pq)],32)):ne("",!0)]))}}),La=vt(Zq,[["__scopeId","data-v-ebbc1a68"]]),Gq={class:"ui-empty"},Qq={key:0,class:"ui-empty__icon","aria-hidden":"true"},Yq={key:1,class:"ui-empty__title"},Jq={key:2,class:"ui-empty__hint"},Xq=tt({__name:"EmptyState",props:{title:{},hint:{}},setup(e){return(t,n)=>(b(),I("div",Gq,[t.$slots.icon?(b(),I("span",Qq,[En(t.$slots,"icon",{},void 0,!0)])):ne("",!0),e.title?(b(),I("div",Yq,B(e.title),1)):ne("",!0),e.hint?(b(),I("div",Jq,B(e.hint),1)):ne("",!0),En(t.$slots,"default",{},void 0,!0)]))}}),eU=vt(Xq,[["__scopeId","data-v-6da80932"]]),tU={key:0,class:"ui-field__label"},nU={key:1,class:"ui-field__error"},iU={key:2,class:"ui-field__hint"},sU=tt({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(b(),I("div",{class:De(["ui-field",{"has-error":!!e.error}])},[e.label?(b(),I("label",tU,B(e.label),1)):ne("",!0),En(t.$slots,"default",{},void 0,!0),e.error?(b(),I("span",nU,B(e.error),1)):e.hint?(b(),I("span",iU,B(e.hint),1)):ne("",!0)],2))}}),oU=vt(sU,[["__scopeId","data-v-a8de5f7f"]]),rU=["type","value","placeholder","disabled","readonly"],lU=tt({__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 i=n,s=Z();function o(a){i("update:modelValue",a.target.value)}function r(){s.value?.focus()}function l(){s.value?.select()}return t({focus:r,select:l,el:s}),(a,u)=>(b(),I("input",{ref_key:"el",ref:s,class:De(["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:o,onFocus:u[0]||(u[0]=c=>a.$emit("focus",c)),onBlur:u[1]||(u[1]=c=>a.$emit("blur",c))},null,42,rU))}}),io=vt(lU,[["__scopeId","data-v-f1cdf732"]]),aU={class:"ui-kbd"},uU=tt({__name:"Kbd",props:{keys:{}},setup(e){return(t,n)=>(b(),I("span",aU,[(b(!0),I(Be,null,yt(e.keys,i=>(b(),I("kbd",{key:i,class:"ui-kbd__key"},B(i),1))),128))]))}}),Aa=vt(uU,[["__scopeId","data-v-04b30ce2"]]),cU=["role"],dU=tt({__name:"Menu",props:{role:{default:"menu"}},setup(e,{expose:t}){const n=Z();return t({el:n}),(i,s)=>(b(),I("div",{ref_key:"el",ref:n,class:"ui-menu",role:e.role},[En(i.$slots,"default",{},void 0,!0)],8,cU))}}),cl=vt(dU,[["__scopeId","data-v-9be2c64a"]]),fU={key:0,class:"ui-menu-sep",role:"separator"},hU=["role","disabled"],pU=tt({__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?(b(),I("div",fU)):(b(),I("button",{key:1,class:De(["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]=i=>t.$emit("click",i))},[En(t.$slots,"default",{},void 0,!0)],10,hU))}}),bn=vt(pU,[["__scopeId","data-v-3427559a"]]),gU=tt({__name:"Tooltip",props:{text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=Z();return(n,i)=>(b(),I(Be,null,[C("span",{ref_key:"trigger",ref:t,class:"ui-tip"},[En(n.$slots,"default",{},void 0,!0)],512),V(BE,{delegate:t.value??null,text:e.text,placement:e.placement,"max-width":e.maxWidth,"max-lines":e.maxLines},null,8,["delegate","text","placement","max-width","max-lines"])],64))}}),gn=vt(gU,[["__scopeId","data-v-414bd903"]]),mU={class:"ui-panel-header__title"},vU={key:0,class:"ui-panel-header__sub"},yU=tt({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{},closeIcon:{default:"close"},wrap:{type:Boolean}},emits:["close"],setup(e){const{t}=jf();return(n,i)=>(b(),I("div",{class:De(["ui-panel-header",{wrap:e.wrap}])},[C("span",mU,B(e.title),1),V(gn,{text:e.subtitle},{default:he(()=>[e.subtitle?(b(),I("span",vU,B(e.subtitle),1)):ne("",!0)]),_:1},8,["text"]),En(n.$slots,"default",{},void 0,!0),e.closable?(b(),fe(rn,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel??h(t)("common.close"),tooltip:e.closeLabel??h(t)("common.close"),onClick:i[0]||(i[0]=s=>n.$emit("close"))},{default:he(()=>[V(Ce,{name:e.closeIcon,size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])):ne("",!0)],2))}}),Uc=vt(yU,[["__scopeId","data-v-eb14b05d"]]),bU=["disabled","aria-pressed"],kU=tt({__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?(b(),I("button",{key:0,class:De(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=i=>t.$emit("click",i))},[En(t.$slots,"default",{},void 0,!0)],10,bU)):(b(),I("span",{key:1,class:De(["ui-pill",{"is-active":e.active}])},[En(t.$slots,"default",{},void 0,!0)],2))}}),DE=vt(kU,[["__scopeId","data-v-fe6a2873"]]),AU=tt({__name:"ScrollArea",props:{orientation:{default:"vertical"},hideDelay:{default:600}},setup(e,{expose:t}){const n=e,i=Z(null),s=Z(null),o=Z(!1),r=Z({overflow:!1,size:0,offset:0}),l=Z({overflow:!1,size:0,offset:0}),a=Z(null);let u=null,c=null,d=null;const f=F(()=>({overflowX:n.orientation==="vertical"?"hidden":"auto",overflowY:n.orientation==="horizontal"?"hidden":"auto"})),p=F(()=>({height:`${r.value.size}px`,transform:`translateY(${r.value.offset}px)`})),g=F(()=>({width:`${l.value.size}px`,transform:`translateX(${l.value.offset}px)`}));function m(_,N,D){if(!(N>_+1)||_<=0)return{overflow:!1,size:0,offset:0};const $=Math.max(0,_-4),P=Math.min($,Math.max(24,$*_/N)),O=Math.max(0,$-P),R=Math.max(1,N-_);return{overflow:!0,size:P,offset:O*D/R}}function y(){const _=s.value;if(!_)return;const N=m(_.clientHeight,_.scrollHeight,_.scrollTop),D=m(_.clientWidth,_.scrollWidth,_.scrollLeft);(N.overflow!==r.value.overflow||N.size!==r.value.size||N.offset!==r.value.offset)&&(r.value=N),(D.overflow!==l.value.overflow||D.size!==l.value.size||D.offset!==l.value.offset)&&(l.value=D)}function w(){u!==null&&clearTimeout(u),u=null}function k(){w(),o.value=!0}function A(){w(),!(a.value||i.value?.matches(":hover, :focus-within"))&&(u=setTimeout(()=>{o.value=!1,u=null},n.hideDelay))}function v(){y(),k(),A()}function x(_,N){const D=s.value;D&&(N.preventDefault(),k(),a.value={axis:_,pointerId:N.pointerId,startPointer:_==="vertical"?N.clientY:N.clientX,startScroll:_==="vertical"?D.scrollTop:D.scrollLeft},N.currentTarget.setPointerCapture(N.pointerId))}function E(_){const N=a.value,D=s.value;if(!N||N.pointerId!==_.pointerId||!D)return;const T=N.axis==="vertical"?_.clientY:_.clientX,$=N.axis==="vertical"?D.clientHeight:D.clientWidth,P=N.axis==="vertical"?D.scrollHeight:D.scrollWidth,O=N.axis==="vertical"?r.value.size:l.value.size,R=Math.max(1,$-4-O),W=(T-N.startPointer)*(P-$)/R;N.axis==="vertical"?D.scrollTop=N.startScroll+W:D.scrollLeft=N.startScroll+W}function S(_){!a.value||a.value.pointerId!==_.pointerId||(a.value=null,A())}function M(){const _=s.value;if(!(!_||!c))for(const N of _.children)c.observe(N)}return pn(async()=>{await kt();const _=s.value;_&&(c=new ResizeObserver(y),c.observe(_),M(),d=new MutationObserver(()=>{M(),y()}),d.observe(_,{childList:!0,subtree:!0,characterData:!0}),y())}),Gn(()=>{w(),c?.disconnect(),d?.disconnect()}),t({viewport:s,updateMetrics:y}),(_,N)=>(b(),I("div",{ref_key:"root",ref:i,class:"ui-scroll-area",onPointerenter:k,onPointerleave:A,onFocusin:k,onFocusout:A},[C("div",{ref_key:"viewport",ref:s,class:"ui-scroll-area__viewport",style:Vt(f.value),tabindex:"0",onScroll:v},[En(_.$slots,"default",{},void 0,!0)],36),r.value.overflow&&n.orientation!=="horizontal"?(b(),I("div",{key:0,class:De(["ui-scroll-area__bar ui-scroll-area__bar--vertical",{"is-visible":o.value}]),"aria-hidden":"true"},[C("span",{class:"ui-scroll-area__thumb",style:Vt(p.value),onPointerdown:N[0]||(N[0]=D=>x("vertical",D)),onPointermove:E,onPointerup:S,onPointercancel:S},null,36)],2)):ne("",!0),l.value.overflow&&n.orientation!=="vertical"?(b(),I("div",{key:1,class:De(["ui-scroll-area__bar ui-scroll-area__bar--horizontal",{"is-visible":o.value}]),"aria-hidden":"true"},[C("span",{class:"ui-scroll-area__thumb",style:Vt(g.value),onPointerdown:N[1]||(N[1]=D=>x("horizontal",D)),onPointermove:E,onPointerup:S,onPointercancel:S},null,36)],2)):ne("",!0)],544))}}),sA=vt(AU,[["__scopeId","data-v-9c504ebc"]]),CU=["data-icon","aria-selected","onClick"],wU=tt({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,s=Z(null),o=Z([]),r=Z(!1),l=Z({});let a=null;function u(d,f){d instanceof HTMLElement&&(o.value[f]=d)}async function c(){await kt();const d=n.options.findIndex(p=>p.value===n.modelValue),f=o.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 Qe(()=>[n.modelValue,n.options.length],c,{immediate:!0}),pn(()=>{a=new ResizeObserver(()=>c()),s.value&&a.observe(s.value);for(const d of o.value)a.observe(d);c()}),Gn(()=>a?.disconnect()),(d,f)=>(b(),I("div",{ref_key:"root",ref:s,class:De(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[C("span",{class:De(["ui-seg__indicator",{"is-ready":r.value}]),style:Vt(l.value),"aria-hidden":"true"},null,6),(b(!0),I(Be,null,yt(e.options,(p,g)=>(b(),I("button",{key:p.value,ref_for:!0,ref:m=>u(m,g),class:De(["ui-seg__item",{"is-on":p.value===e.modelValue}]),"data-icon":p.icon,type:"button",role:"tab","aria-selected":p.value===e.modelValue,onClick:m=>i("update:modelValue",p.value)},[p.icon?(b(),fe(Ce,{key:0,class:"ui-seg__icon",name:p.icon,size:"sm"},null,8,["name"])):ne("",!0),p.swatch?(b(),I("span",{key:1,class:"ui-seg__swatch",style:Vt({backgroundColor:p.swatch})},null,4)):ne("",!0),Ue(" "+B(p.label),1)],10,CU))),128))],2))}}),wo=vt(wU,[["__scopeId","data-v-b09ef1d1"]]),xU=["aria-expanded","disabled"],_U=["src"],SU={class:"ui-select__value-text"},MU={key:0,class:"ui-select__group"},IU=["aria-selected","disabled","onMouseenter","onClick"],EU=["src"],TU=tt({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,i=t,s=Of(),o=Z(null),r=Z(null),l=Z(null),a=Z([]),u=Z(!1),c=Z(-1),d=`ui-select-${Math.random().toString(36).slice(2,9)}`,f=F(()=>n.options.findIndex(M=>String(M.value)===String(n.modelValue??""))),p=F(()=>n.options[f.value]),g=F(()=>p.value?.label??n.placeholder);function m(M,_){a.value[_]=M instanceof HTMLElement?M:null}function y(){const M=l.value,_=a.value[c.value];!M||!_||(M.scrollTop=_.offsetTop-(M.clientHeight-_.offsetHeight)/2)}function w(){n.disabled||u.value||(u.value=!0,c.value=f.value>=0?f.value:n.options.findIndex(M=>!M.disabled),kt(y))}function k({restoreFocus:M=!1}={}){u.value&&(u.value=!1,M&&kt(()=>r.value?.focus()))}function A(){u.value?k():w()}function v(M){M.disabled||(String(M.value)!==String(n.modelValue??"")&&i("update:modelValue",M.value),k({restoreFocus:!0}))}function x(M){if(u.value||w(),n.options.length===0)return;let _=c.value;for(let N=0;N<n.options.length;N+=1)if(_=(_+M+n.options.length)%n.options.length,!n.options[_]?.disabled){c.value=_,kt(y);return}}function E(M){if(M.key==="ArrowDown")M.preventDefault(),x(1);else if(M.key==="ArrowUp")M.preventDefault(),x(-1);else if(M.key==="Enter"||M.key===" ")if(M.preventDefault(),!u.value)w();else{const _=n.options[c.value];_&&v(_)}else if(M.key==="Escape")M.preventDefault(),k();else if(M.key==="Home"||M.key==="End"){M.preventDefault();const _=n.options.map((N,D)=>N.disabled?-1:D).filter(N=>N>=0);c.value=M.key==="Home"?_[0]??-1:_.at(-1)??-1,kt(y)}}function S(M){o.value?.contains(M.target)||k()}return pn(()=>document.addEventListener("pointerdown",S)),An(()=>document.removeEventListener("pointerdown",S)),(M,_)=>(b(),I("div",{ref_key:"rootRef",ref:o,class:De(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error,"is-open":u.value,"is-disabled":e.disabled}]])},[C("button",Yn({ref_key:"triggerRef",ref:r},h(s),{class:"ui-select__trigger",type:"button",role:"combobox","aria-controls":d,"aria-expanded":u.value,"aria-haspopup":"listbox",disabled:e.disabled,onClick:A,onKeydown:E}),[C("span",{class:De(["ui-select__value",{"is-placeholder":!p.value}])},[p.value?.icon?(b(),I("img",{key:0,class:"ui-select__icon",src:p.value.icon,alt:""},null,8,_U)):ne("",!0),C("span",SU,B(g.value),1)],2),V(Ce,{class:"ui-select__chevron",name:"chevron-down",size:"sm"})],16,xU),u.value?(b(),I("div",{key:0,id:d,ref_key:"listRef",ref:l,class:"ui-select__menu",role:"listbox"},[(b(!0),I(Be,null,yt(e.options,(N,D)=>(b(),I(Be,{key:`${N.group??""}:${N.value}`},[N.group&&N.group!==e.options[D-1]?.group?(b(),I("div",MU,B(N.group),1)):ne("",!0),C("button",{ref_for:!0,ref:T=>m(T,D),class:De(["ui-select__option",{"is-selected":D===f.value,"is-active":D===c.value}]),type:"button",role:"option","aria-selected":D===f.value,disabled:N.disabled,onMouseenter:T=>c.value=D,onClick:T=>v(N)},[V(Ce,{class:"ui-select__check",name:"check",size:"sm"}),N.icon?(b(),I("img",{key:0,class:"ui-select__icon ui-select__icon--option",src:N.icon,alt:""},null,8,EU)):ne("",!0),C("span",null,B(N.label),1)],42,IU)],64))),128))],512)):ne("",!0)],2))}}),e3=vt(TU,[["__scopeId","data-v-63f5dcbc"]]),LU=tt({__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"fail":case"danger":return"error";case"running":case"run":case"working":case"in_progress":case"active":return"running";case"suspended":return"suspended";default:return"idle"}}const i=F(()=>n(t.status));return(s,o)=>(b(),I("span",{class:De(["kw-dot",`kw-dot--${i.value}`]),"aria-hidden":"true"},null,2))}}),hl=vt(LU,[["__scopeId","data-v-390a778a"]]),NU=["aria-checked","aria-label","disabled"],FU=tt({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(i,s)=>(b(),I("button",{class:De(["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]=o=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[C("span",{class:"ui-switch__thumb"},null,-1)])],10,NU))}}),Md=vt(FU,[["__scopeId","data-v-2fc56545"]]),BU={class:"ui-toast__icon","aria-hidden":"true"},$U={class:"ui-toast__body"},DU={class:"ui-toast__title"},RU={key:0,class:"ui-toast__msg"},zU=tt({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{}},emits:["dismiss"],setup(e){const{t}=jf();return(n,i)=>(b(),I("div",{class:De(["ui-toast",`ui-toast--${e.variant}`])},[C("span",BU,[En(n.$slots,"icon",{},()=>[e.variant==="success"?(b(),fe(Ce,{key:0,name:"check"})):e.variant==="danger"?(b(),fe(Ce,{key:1,name:"close"})):e.variant==="warning"?(b(),fe(Ce,{key:2,name:"alert-triangle"})):(b(),fe(Ce,{key:3,name:"info"}))],!0)]),C("div",$U,[C("div",DU,B(e.title),1),e.message?(b(),I("div",RU,B(e.message),1)):ne("",!0),En(n.$slots,"default",{},void 0,!0)]),V(rn,{class:"ui-toast__close",size:"sm",label:e.dismissLabel??h(t)("common.dismiss"),tooltip:e.dismissLabel??h(t)("common.dismiss"),onClick:i[0]||(i[0]=s=>n.$emit("dismiss"))},{default:he(()=>[V(Ce,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],2))}}),OU=vt(zU,[["__scopeId","data-v-62bc76d1"]]),PU=100;function Kr(){let e=!1,t=0;function n(){e=!0,t=0}function i(){e=!1,t=Date.now()}function s(){e=!1,t=0}function o(r){return e||r.isComposing||r.keyCode===229||Date.now()-t<PU}return typeof window<"u"&&(window.addEventListener("focusin",s,!0),window.addEventListener("focusout",s,!0)),An(()=>{typeof window<"u"&&(window.removeEventListener("focusin",s,!0),window.removeEventListener("focusout",s,!0))}),{handleCompositionStart:n,handleCompositionEnd:i,resetComposition:s,isComposingKeyEvent:o}}function Vd(e,t,n="/api/v1"){return`${e}${n}${t.startsWith("/")?t:`/${t}`}`}function jU(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 g5={};class au 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 ra 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 m5 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 Ps(e){return e instanceof au||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function X2(e){return e instanceof ra||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}function HU(e){return X2(e)&&typeof e.cause=="object"&&e.cause!==null&&e.cause.name==="TimeoutError"}function WU(e){return e instanceof m5||typeof e=="object"&&e!==null&&e.name==="FileTooLargeError"&&typeof e.limit=="number"}const qU=41301,UU=40922;function KU(e){return Ps(e)&&e.code===UU}const Hh=3e4,I0=5*6e4,oA=5*6e4,RE="0123456789ABCDEFGHJKMNPQRSTVWXYZ",rA=500,zE=40101;function lA(e,t){for(const[n,i]of Object.entries(t))if(i!==void 0)if(Array.isArray(i))for(const s of i)s!==void 0&&e.append(n,String(s));else e.set(n,String(i))}function E0(e=Hh){try{return AbortSignal.timeout(e)}catch{return}}function VU(e,t){let n="",i=e;for(let s=0;s<t;s++)n=RE[i%32]+n,i=Math.floor(i/32);return n}function ZU(e){const t=new Uint8Array(e);if(globalThis.crypto?.getRandomValues)globalThis.crypto.getRandomValues(t);else for(let n=0;n<t.length;n++)t[n]=Math.floor(Math.random()*256);return Array.from(t,n=>RE[n%32]).join("")}function T0(){return`${VU(Date.now(),10)}${ZU(16)}`}function GU(e){try{const t=[];return e.forEach((n,i)=>{typeof n=="string"?t.push({field:i,value:n}):t.push({field:i,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function Z9(e){try{const t=await e.text();return t?t.length>rA?`${t.slice(0,rA)}...`:t:void 0}catch{return}}class aA{constructor(t){this.opts=t,this.tracer=t.tracer??g5}tracer;async get(t,n){return this.request("GET",t,void 0,n)}async getBlob(t,n,i){let s=Vd(this.opts.origin,t,this.opts.restBasePath);if(n){const c=new URLSearchParams;lA(c,n);const d=c.toString();d&&(s=`${s}?${d}`)}const o=T0(),r={"X-Request-Id":o};this.addClientHeaders(r);const l=Date.now();this.tracer.restRequest?.({method:"GET",path:t,url:s,requestId:o});let a;try{a=await fetch(s,{method:"GET",headers:r,signal:E0()})}catch(c){throw this.tracer.restFailure?.({method:"GET",path:t,requestId:o,phase:"fetch",durationMs:Date.now()-l,error:c}),new ra({message:`Network error calling GET ${t}`,cause:c,method:"GET",path:t,url:s,requestId:o,phase:"fetch",timeoutMs:Hh,timestamp:Date.now(),durationMs:Date.now()-l})}if(a.ok){this.tracer.restResponse?.({method:"GET",path:t,requestId:o,status:a.status,durationMs:Date.now()-l,code:0,msg:""});const c=Number(a.headers.get("content-length")??0);if(i?.maxBytes!==void 0&&c>i.maxBytes)throw a.body?.cancel(),new m5({size:c,limit:i.maxBytes});return a.blob()}let u;try{u=await a.clone().json()}catch{}throw this.checkAuthRequired(a,u?.code??0),this.tracer.restResponse?.({method:"GET",path:t,requestId:o,status:a.status,durationMs:Date.now()-l,code:u?.code??a.status,msg:u?.msg??a.statusText,envelopeRequestId:u?.request_id}),new au({code:u?.code??a.status,msg:u?.msg??a.statusText,requestId:u?.request_id??o,details:u?.details,timestamp:Date.now(),durationMs:Date.now()-l})}async post(t,n,i){return this.request("POST",t,n,void 0,i?.allowCodes,i?.timeoutMs)}async postZip(t,n,i){const s="POST",o=Vd(this.opts.origin,t,this.opts.restBasePath),r=T0(),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:o,requestId:r,body:i});let u;try{u=await fetch(o,{method:s,headers:l,body:JSON.stringify(n),signal:E0(I0)})}catch(p){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"fetch",durationMs:Date.now()-a,error:p}),new ra({message:`Network error calling ${s} ${t}`,cause:p,method:s,path:t,url:o,requestId:r,phase:"fetch",timeoutMs:I0,timestamp:Date.now(),durationMs:Date.now()-a})}const c=u.headers.get("content-type")??void 0,d=c?.split(";",1)[0]?.trim().toLowerCase();if(!u.ok||d!=="application/zip"){let p;try{p=await u.clone().json()}catch{}if(this.checkAuthRequired(u,p?.code??0),!u.ok||p!==void 0&&p.code!==0){const y=p?.code??u.status,w=p?.msg??u.statusText;throw this.tracer.restResponse?.({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:y,msg:w,envelopeRequestId:p?.request_id}),new au({code:y,msg:w,requestId:p?.request_id??r,details:p?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const g=u.clone(),m=new TypeError(`Expected application/zip, received ${c??"no content type"}`);throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:m}),new ra({message:`Invalid ZIP response from ${s} ${t}`,cause:m,method:s,path:t,url:o,requestId:r,phase:"parse",timeoutMs:I0,status:u.status,statusText:u.statusText,contentType:c,bodyPreview:await Z9(g),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await u.blob()}catch(p){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:p}),new ra({message:`Failed to read ZIP response from ${s} ${t}`,cause:p,method:s,path:t,url:o,requestId:r,phase:"parse",timeoutMs:I0,status:u.status,statusText:u.statusText,contentType:c,timestamp:Date.now(),durationMs:Date.now()-a})}return this.tracer.restResponse?.({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:u.headers.get("content-disposition")??void 0}}async postForm(t,n){const i=Vd(this.opts.origin,t,this.opts.restBasePath),s=T0(),o={"X-Request-Id":s};this.addClientHeaders(o);const r=Date.now();this.tracer.restRequest?.({method:"POST",path:t,url:i,requestId:s,body:GU(n)});let l;try{l=await fetch(i,{method:"POST",headers:o,body:n,signal:E0()})}catch(c){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-r,error:c}),new ra({message:`Network error calling POST ${t}`,cause:c,method:"POST",path:t,url:i,requestId:s,phase:"fetch",timeoutMs:Hh,timestamp:Date.now(),durationMs:Date.now()-r})}let a;const u=l.clone();try{a=await l.json()}catch(c){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-r,status:l.status,error:c}),new ra({message:`Failed to parse JSON response from POST ${t}`,cause:c,method:"POST",path:t,url:i,requestId:s,phase:"parse",timeoutMs:Hh,status:l.status,statusText:l.statusText,contentType:l.headers.get("content-type")??void 0,bodyPreview:await Z9(u),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){const c=a.code??l.status;throw new au({code:c,msg:a.msg??l.statusText,requestId:a.request_id??s,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,i,s,o=[],r=Hh){let l=Vd(this.opts.origin,n,this.opts.restBasePath);if(s){const g=new URLSearchParams;lA(g,s);const m=g.toString();m&&(l=`${l}?${m}`)}const a=T0(),u={"X-Request-Id":a};this.addClientHeaders(u),i!==void 0&&(u["Content-Type"]="application/json; charset=utf-8");const c=Date.now();this.tracer.restRequest?.({method:t,path:n,url:l,requestId:a,body:i});let d;try{d=await fetch(l,{method:t,headers:u,body:i!==void 0?JSON.stringify(i):void 0,signal:E0(r)})}catch(g){throw this.tracer.restFailure?.({method:t,path:n,requestId:a,phase:"fetch",durationMs:Date.now()-c,error:g}),new ra({message:`Network error calling ${t} ${n}`,cause:g,method:t,path:n,url:l,requestId:a,phase:"fetch",timeoutMs:r,timestamp:Date.now(),durationMs:Date.now()-c})}let f;const p=d.clone();try{const g=await d.text();f=d.status===204&&g===""?{code:0,msg:"",data:null,request_id:a}:JSON.parse(g)}catch(g){throw this.tracer.restFailure?.({method:t,path:n,requestId:a,phase:"parse",durationMs:Date.now()-c,status:d.status,error:g}),new ra({message:`Failed to parse JSON response from ${t} ${n}`,cause:g,method:t,path:n,url:l,requestId:a,phase:"parse",timeoutMs:r,status:d.status,statusText:d.statusText,contentType:d.headers.get("content-type")??void 0,bodyPreview:await Z9(p),timestamp:Date.now(),durationMs:Date.now()-c})}if(this.tracer.restResponse?.({method:t,path:n,requestId:a,status:d.status,durationMs:Date.now()-c,code:f.code,msg:f.msg,envelopeRequestId:f.request_id,data:f.data}),this.checkAuthRequired(d,f.code),f.code!==0&&!o.includes(f.code))throw new au({code:typeof f.code=="number"?f.code:d.status,msg:typeof f.msg=="string"&&f.msg.length>0?f.msg:`HTTP ${d.status}${d.statusText?` ${d.statusText}`:""}`,requestId:f.request_id??a,details:f.details,timestamp:Date.now(),durationMs:Date.now()-c});return f.data}addClientHeaders(t){const n=this.opts.credentialStore?.getToken();n!==void 0&&(t.Authorization=`Bearer ${n}`);const i=this.opts.identity;i!==void 0&&(t["X-Kimi-Client-Id"]=i.clientId,t["X-Kimi-Client-Name"]=i.clientName,t["X-Kimi-Client-Version"]=i.clientVersion,t["X-Kimi-Client-Ui-Mode"]=i.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===zE)&&this.opts.credentialStore?.markAuthRequired?.()}}function OE(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 ym(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function QU(e,t,n){return{...t,model:t.model.length>0?t.model:e.model,usage:ym(t.usage)?e.usage:t.usage,updatedAt:!n&&t.updatedAt>e.updatedAt?t.updatedAt:e.updatedAt,pullRequest:t.pullRequest??e.pullRequest}}function Yr(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,archivedAt:e.archived_at,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:OE(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 YU(e){const t=e.activity.status;return{id:e.id,title:e.meta.title??e.meta.last_prompt??e.id.slice(0,12),createdAt:new Date(e.meta.created_at).toISOString(),updatedAt:new Date(e.meta.updated_at).toISOString(),busy:t==="running",pendingInteraction:t==="approval"?"approval":t==="question"?"question":void 0,lastTurnReason:t==="failed"?"failed":void 0,archived:e.meta.archived,archivedAt:e.meta.archived_at==null?void 0:new Date(e.meta.archived_at).toISOString(),lastPrompt:e.meta.last_prompt??void 0,cwd:e.workspace.cwd??"",model:"",pullRequest:e.git===void 0?void 0:e.git.pull_request,usage:{inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalCostUsd:0,contextTokens:0,contextLimit:0,turnCount:0},messageCount:0,lastSeq:0,workspaceId:e.workspace.id.length>0?e.workspace.id:void 0}}function c1(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function uA(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 v5(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:uA(e.source)};case"video":return{type:"video",source:uA(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 t3(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(v5),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function PE(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 JU(e){return{content:e.content.map(PE),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 XU(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function jE(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 eK(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function tK(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map(eK),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function HE(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(tK),createdAt:e.created_at}}function nK(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 iK(e){const t={};for(const[n,i]of Object.entries(e.answers))t[n]=nK(i);return{answers:t,method:e.method,note:e.note}}function Ag(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,model:e.model,thinkingEffort:e.thinking_effort,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 cA(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 Wa(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Id(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Lr(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function WE(e){if(!e||typeof e!="object")return null;const t=e,n=Wa(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const i=t.budget,s=i&&typeof i=="object"?i:{};return{goalId:Wa(t,"goalId")??Wa(t,"goal_id")??"goal",objective:Wa(t,"objective")??"",completionCriterion:Wa(t,"completionCriterion")??Wa(t,"completion_criterion"),status:n,turnsUsed:Id(t,"turnsUsed")??Id(t,"turns_used")??0,tokensUsed:Id(t,"tokensUsed")??Id(t,"tokens_used")??0,wallClockMs:Id(t,"wallClockMs")??Id(t,"wall_clock_ms")??0,terminalReason:Wa(t,"terminalReason")??Wa(t,"terminal_reason"),budget:{tokenBudget:Lr(s,"tokenBudget")??Lr(s,"token_budget"),remainingTokens:Lr(s,"remainingTokens")??Lr(s,"remaining_tokens"),turnBudget:Lr(s,"turnBudget")??Lr(s,"turn_budget"),remainingTurns:Lr(s,"remainingTurns")??Lr(s,"remaining_turns"),wallClockBudgetMs:Lr(s,"wallClockBudgetMs")??Lr(s,"wall_clock_budget_ms"),remainingWallClockMs:Lr(s,"remainingWallClockMs")??Lr(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function sK(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:Yr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:Yr(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:c1(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:c1(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:OE(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=WE(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:t3(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(v5),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:jE(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,feedback:t.payload.feedback,selectedLabel:t.payload.selected_label};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:HE(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:Ag(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.plugin.changed":return{type:"pluginsChanged"};case"event.capability.changed":return{type:"capabilityChanged",capabilityId:t.payload.capability_id,install:t.payload.install};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:n3(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 oK(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 Ed(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 dA(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 n3(e){const t={};for(const[n,i]of Object.entries(e.providers))t[n]={type:i.type,baseUrl:i.base_url,defaultModel:i.default_model,hasApiKey:i.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 rK(e){return e.session_id}function lK(e){return e.seq}function aK(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}const uK={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function cK(e,t){switch(t.op){case"reset":return dK(e,t);case"turn.upsert":return hK(e,t.turn);case"step.upsert":return gK(e,t.turnId,t.step);case"frame.upsert":return vK(e,t);case"append":return bK(e,t);case"marker.upsert":return hA(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return hA(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return CK(e,t.task);case"interaction.upsert":return wK(e,t.interaction);case"attachment.upsert":return _K(e,t.attachment);case"todo.upsert":return MK(e,t.todo);case"prompt.upsert":return EK(e,t.prompt);case"meta.merge":return NK(e,t.meta);case"items.remove":return AK(e,t.ids)}}function dK(e,t){const n=new Set;for(const i of t.snapshot.interactions)i.state==="pending"&&n.add(i.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(i=>[i.taskId,i])),interactions:new Map(t.snapshot.interactions.map(i=>[i.interactionId,i])),attachments:new Map(t.snapshot.attachments.map(i=>[i.attachmentId,i])),todos:new Map(t.snapshot.todos.map(i=>[i.todoId,i])),prompts:new Map(t.snapshot.prompts.map(i=>[i.promptId,i])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function fA(e,t){return{...e,kind:"turn",steps:[...t]}}function qE(e){return{kind:"turn",turnId:e,ordinal:aK(e),state:"running",origin:{kind:"other"},steps:[]}}function fK(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function Ef(e,t){const n=e.items.find(i=>i.kind==="turn"&&i.turnId===t);return n?.kind==="turn"?n:void 0}function y5(e,t){const n=[...e];let i=n.length;for(let s=0;s<n.length;s+=1){const o=n[s];if(o?.kind==="turn"&&o.ordinal>t.ordinal){i=s;break}}return n.splice(i,0,t),n}function ev(e,t,n){return e.map(i=>i.kind==="turn"&&i.turnId===t?n(i):i)}function hK(e,t){const n=Ef(e,t.turnId);return n?pK(n,t)?{state:e,changed:!1}:{state:{...e,items:ev(e.items,t.turnId,i=>fA(t,i.steps))},changed:!0}:{state:{...e,items:y5(e.items,fA(t,[]))},changed:!0}}function pK(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 gK(e,t,n){const i=Ef(e,t)??qE(t),s=i.steps.findIndex(u=>u.stepId===n.stepId);let o,r=!0;if(s>=0){const u=i.steps[s];u&&mK(u,n)?(r=!1,o=i.steps):o=i.steps.map(c=>c.stepId===n.stepId?{...n,kind:"step",frames:c.frames}:c)}else o=[...i.steps,{...n,kind:"step",frames:[]}].toSorted((u,c)=>u.ordinal-c.ordinal);if(!r)return{state:e,changed:!1};const l={...i,steps:[...o]},a=Ef(e,t)?ev(e.items,t,()=>l):y5(e.items,l);return{state:{...e,items:a},changed:!0}}function mK(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 vK(e,t){const n=Ef(e,t.turnId)??qE(t.turnId),i=n.steps.find(c=>c.stepId===t.stepId)??fK(t.stepId,t.turnId),s=i.frames.findIndex(c=>c.frameId===t.frame.frameId);let o;if(s>=0){const c=i.frames[s];if(c!==void 0&&yK(c,t.frame))return{state:e,changed:!1};o=i.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else o=[...i.frames,t.frame];const r={...i,frames:[...o]},l=n.steps.some(c=>c.stepId===t.stepId)?n.steps.map(c=>c.stepId===t.stepId?r:c):[...n.steps,r].toSorted((c,d)=>c.ordinal-d.ordinal),a={...n,steps:l},u=Ef(e,t.turnId)?ev(e.items,t.turnId,()=>a):y5(e.items,a);return{state:{...e,items:u},changed:!0}}function yK(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 bK(e,t){if(t.target.type==="task")return kK(e,t);const{turnId:n,stepId:i,frameId:s}=t.target,o=Ef(e,n),r=o?.steps.find(f=>f.stepId===i),l=r?.frames.find(f=>f.frameId===s);if(!o||!r||!l||l.kind!=="text"&&l.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=UE(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 u={...l,text:a.text},c={...r,frames:r.frames.map(f=>f.frameId===s?u:f)},d={...o,steps:o.steps.map(f=>f.stepId===i?c:f)};return{state:{...e,items:ev(e.items,n,()=>d)},changed:!0}}function kK(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,i=e.tasks.get(n),s=i?.outputTail??"",o=UE(s,t.offset,t.text);if(o.gap)return{state:e,changed:!1,gap:o.gap};if(!o.changed)return{state:e,changed:!1};const r=i?{...i,outputTail:o.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:o.text},l=new Map(e.tasks);return l.set(n,r),{state:{...e,tasks:l},changed:!0}}function UE(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 i=e.length-t;return e.slice(t)!==n.slice(0,i)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(i>0?n.slice(i):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function hA(e,t,n,i){if(e.items.some(o=>i3(o)===n)){let o=!1;const r=e.items.map(l=>i3(l)!==n||l===t?l:(o=!0,t));return o?{state:{...e,items:r},changed:!0}:{state:e,changed:!1}}if(i!==void 0){const o=[...e.items];let r=o.length;for(let l=0;l<o.length;l+=1){const a=o[l];if(a?.kind==="turn"&&a.ordinal>=i){r=l;break}}return o.splice(r,0,t),{state:{...e,items:o},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function i3(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function AK(e,t){const n=new Set(t),i=e.items.filter(l=>l.kind==="turn"&&n.has(l.turnId)),s=e.items.filter(l=>!n.has(i3(l)));if(s.length===e.items.length)return{state:e,changed:!1};let o=e.pendingInteractions,r=e.interactions;if(i.length>0){const l=new Set,a=new Set(o),u=new Set;for(const c of i)for(const d of c.steps)for(const f of d.frames)f.kind==="tool"&&l.add(f.toolCallId);for(const c of r.values())c.toolCallId!==void 0&&l.has(c.toolCallId)&&(u.add(c.interactionId),a.delete(c.interactionId));if(u.size>0){const c=new Map(r);for(const d of u)c.delete(d);r=c}o=a}return{state:{...e,items:s,interactions:r,pendingInteractions:o},changed:!0}}function CK(e,t){const n=e.tasks.get(t.taskId);if(n&&LK(n,t))return{state:e,changed:!1};const i=new Map(e.tasks);return i.set(t.taskId,t),{state:{...e,tasks:i},changed:!0}}function wK(e,t){const n=e.interactions.get(t.interactionId);if(n&&xK(n,t))return{state:e,changed:!1};const i=new Map(e.interactions);i.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const o=new Set(s);o.add(t.interactionId),s=o}}else if(s.has(t.interactionId)){const o=new Set(s);o.delete(t.interactionId),s=o}return{state:{...e,interactions:i,pendingInteractions:s},changed:!0}}function xK(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function _K(e,t){const n=e.attachments.get(t.attachmentId);if(n&&SK(n,t))return{state:e,changed:!1};const i=new Map(e.attachments);return i.set(t.attachmentId,t),{state:{...e,attachments:i},changed:!0}}function SK(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function MK(e,t){const n=e.todos.get(t.todoId);if(n&&IK(n,t))return{state:e,changed:!1};const i=new Map(e.todos);return i.set(t.todoId,t),{state:{...e,todos:i},changed:!0}}function IK(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function EK(e,t){const n=e.prompts.get(t.promptId);if(n&&TK(n,t))return{state:e,changed:!1};const i=new Map(e.prompts);return i.set(t.promptId,t),{state:{...e,prompts:i},changed:!0}}function TK(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 LK(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 NK(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,i=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:i};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 FK{constructor(t){this.agentId=t}#e=uK;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let i,s=this.#e;for(const o of t){const r=cK(s,o);if(r.gap){i={target:o.target,...r.gap};continue}r.changed&&(s=r.state,n.push(o))}if(this.#e=s,n.length>0){const o={agentId:this.agentId,ops:n};for(const r of this.#t)r(o)}return{accepted:n,gap:i}}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(i=>i.kind==="turn"&&i.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,i=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((o,r)=>r.kind==="turn"?o+1:o,0);if(s>t.tailTurns){const o=s-t.tailTurns,r=[];let l=0;for(const a of n)if(a.kind==="turn"){if(l+=1,l<=o)continue;r.push(a)}else l>o&&r.push(a);n=r,i=!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:i}}}function pt(e,t,n){function i(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 u=r.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){const f=c[d];f in l||(l[f]=u[f].bind(l))}}const s=n?.Parent??Object;class o extends s{}Object.defineProperty(o,"name",{value:e});function r(l){var a;const u=n?.Parent?new o:this;i(u,l),(a=u._zod).deferred??(a.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(r,"init",{value:i}),Object.defineProperty(r,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(r,"name",{value:e}),r}class df extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class KE extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const VE={};function Cu(e){return VE}function ZE(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,s])=>t.indexOf(+i)===-1).map(([i,s])=>s)}function s3(e,t){return typeof t=="bigint"?t.toString():t}function tv(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function b5(e){return e==null}function k5(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function BK(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let s=(i.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(i)){const a=i.match(/\d?e-(\d?)/);a?.[1]&&(s=Number.parseInt(a[1]))}const o=n>s?n:s,r=Number.parseInt(e.toFixed(o).replace(".","")),l=Number.parseInt(t.toFixed(o).replace(".",""));return r%l/10**o}const pA=Symbol("evaluating");function ui(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==pA)return i===void 0&&(i=pA,i=n()),i},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function sd(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function $u(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function gA(e){return JSON.stringify(e)}function $K(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const GE="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function V1(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const DK=tv(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Tf(e){if(V1(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(V1(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function QE(e){return Tf(e)?{...e}:Array.isArray(e)?[...e]:e}const RK=new Set(["string","number","symbol"]);function Lf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Du(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function ln(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 zK(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const OK={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 PK(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=$u(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 sd(this,"shape",r),r},checks:[]});return Du(e,o)}function jK(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=$u(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 sd(this,"shape",r),r},checks:[]});return Du(e,o)}function HK(e,t){if(!Tf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const r in t)if(Object.getOwnPropertyDescriptor(o,r)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=$u(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return sd(this,"shape",o),o}});return Du(e,s)}function WK(e,t){if(!Tf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=$u(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return sd(this,"shape",i),i}});return Du(e,n)}function qK(e,t){const n=$u(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return sd(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Du(e,n)}function UK(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=$u(t._zod.def,{get shape(){const l=t._zod.def.shape,a={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(a[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)a[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return sd(this,"shape",a),a},checks:[]});return Du(t,r)}function KK(e,t,n){const i=$u(t._zod.def,{get shape(){const s=t._zod.def.shape,o={...s};if(n)for(const r in n){if(!(r in o))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(o[r]=new e({type:"nonoptional",innerType:s[r]}))}else for(const r in s)o[r]=new e({type:"nonoptional",innerType:s[r]});return sd(this,"shape",o),o}});return Du(t,i)}function Zd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Gd(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function L0(e){return typeof e=="string"?e:e?.message}function wu(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const s=L0(e.inst?._zod.def?.error?.(e))??L0(t?.error?.(e))??L0(n.customError?.(e))??L0(n.localeError?.(e))??"Invalid input";i.message=s}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function A5(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Z1(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const YE=(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,s3,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},JE=pt("$ZodError",YE),XE=pt("$ZodError",YE,{Parent:Error});function VK(e,t=n=>n.message){const n={},i=[];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))):i.push(t(s));return{formErrors:i,fieldErrors:n}}function ZK(e,t=n=>n.message){const n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(r=>i({issues:r}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let r=n,l=0;for(;l<o.path.length;){const a=o.path[l];l===o.path.length-1?(r[a]=r[a]||{_errors:[]},r[a]._errors.push(t(o))):r[a]=r[a]||{_errors:[]},r=r[a],l++}}};return i(e),n}const C5=e=>(t,n,i,s)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise)throw new df;if(r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>wu(a,o,Cu())));throw GE(l,s?.callee),l}return r.value},w5=e=>async(t,n,i,s)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise&&(r=await r),r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>wu(a,o,Cu())));throw GE(l,s?.callee),l}return r.value},nv=e=>(t,n,i)=>{const s=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new df;return o.issues.length?{success:!1,error:new(e??JE)(o.issues.map(r=>wu(r,s,Cu())))}:{success:!0,data:o.value}},GK=nv(XE),iv=e=>async(t,n,i)=>{const s=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},s);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(r=>wu(r,s,Cu())))}:{success:!0,data:o.value}},QK=iv(XE),YK=e=>(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return C5(e)(t,n,s)},JK=e=>(t,n,i)=>C5(e)(t,n,i),XK=e=>async(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return w5(e)(t,n,s)},eV=e=>async(t,n,i)=>w5(e)(t,n,i),tV=e=>(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return nv(e)(t,n,s)},nV=e=>(t,n,i)=>nv(e)(t,n,i),iV=e=>async(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return iv(e)(t,n,s)},sV=e=>async(t,n,i)=>iv(e)(t,n,i),oV=/^[cC][^\s-]{8,}$/,rV=/^[0-9a-z]+$/,lV=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,aV=/^[0-9a-vA-V]{20}$/,uV=/^[A-Za-z0-9]{27}$/,cV=/^[a-zA-Z0-9_-]{21}$/,dV=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,fV=/^([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})$/,mA=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)$/,hV=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,pV="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function gV(){return new RegExp(pV,"u")}const mV=/^(?:(?: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])$/,vV=/^(([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}|:))$/,yV=/^((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])$/,bV=/^(([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])$/,kV=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,eT=/^[A-Za-z0-9_-]*$/,AV=/^\+[1-9]\d{6,14}$/,tT="(?:(?:\\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])))",CV=new RegExp(`^${tT}$`);function nT(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 wV(e){return new RegExp(`^${nT(e)}$`)}function xV(e){const t=nT({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${tT}T(?:${i})$`)}const _V=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},SV=/^-?\d+$/,iT=/^-?\d+(?:\.\d+)?$/,MV=/^(?:true|false)$/i,IV=/^[^A-Z]*$/,EV=/^[^a-z]*$/,ar=pt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),sT={number:"number",bigint:"bigint",object:"date"},oT=pt("$ZodCheckLessThan",(e,t)=>{ar.init(e,t);const n=sT[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,o=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rT=pt("$ZodCheckGreaterThan",(e,t)=>{ar.init(e,t);const n=sT[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,o=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),TV=pt("$ZodCheckMultipleOf",(e,t)=>{ar.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.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):BK(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})}}),LV=pt("$ZodCheckNumberFormat",(e,t)=>{ar.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[s,o]=OK[t.format];e._zod.onattach.push(r=>{const l=r._zod.bag;l.format=t.format,l.minimum=s,l.maximum=o,n&&(l.pattern=SV)}),e._zod.check=r=>{const l=r.value;if(n){if(!Number.isInteger(l)){r.issues.push({expected:i,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:i,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:i,inclusive:!0,continue:!t.abort});return}}l<s&&r.issues.push({origin:"number",input:l,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),l>o&&r.issues.push({origin:"number",input:l,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),NV=pt("$ZodCheckMaxLength",(e,t)=>{var n;ar.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!b5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const s=i.value;if(s.length<=t.maximum)return;const r=A5(s);i.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),FV=pt("$ZodCheckMinLength",(e,t)=>{var n;ar.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!b5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const s=i.value;if(s.length>=t.minimum)return;const r=A5(s);i.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),BV=pt("$ZodCheckLengthEquals",(e,t)=>{var n;ar.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!b5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=i=>{const s=i.value,o=s.length;if(o===t.length)return;const r=A5(s),l=o>t.length;i.issues.push({origin:r,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),sv=pt("$ZodCheckStringFormat",(e,t)=>{var n,i;ar.init(e,t),e._zod.onattach.push(s=>{const o=s._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.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})}):(i=e._zod).check??(i.check=()=>{})}),$V=pt("$ZodCheckRegex",(e,t)=>{sv.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})}}),DV=pt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=IV),sv.init(e,t)}),RV=pt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=EV),sv.init(e,t)}),zV=pt("$ZodCheckIncludes",(e,t)=>{ar.init(e,t);const n=Lf(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(s=>{const o=s._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),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})}}),OV=pt("$ZodCheckStartsWith",(e,t)=>{ar.init(e,t);const n=new RegExp(`^${Lf(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),PV=pt("$ZodCheckEndsWith",(e,t)=>{ar.init(e,t);const n=new RegExp(`.*${Lf(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),jV=pt("$ZodCheckOverwrite",(e,t)=>{ar.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class HV{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 i=t.split(` +`).filter(r=>r),s=Math.min(...i.map(r=>r.length-r.trimStart().length)),o=i.map(r=>r.slice(s)).map(r=>" ".repeat(this.indent*2)+r);for(const r of o)this.content.push(r)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,s.join(` +`))}}const WV={major:4,minor:3,patch:6},Vi=pt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=WV;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const s of i)for(const o of s._zod.onattach)o(e);if(i.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 u=Zd(r),c;for(const d of l){if(d._zod.def.when){if(!d._zod.def.when(r))continue}else if(u)continue;const f=r.issues.length,p=d._zod.check(r);if(p instanceof Promise&&a?.async===!1)throw new df;if(c||p instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await p,r.issues.length!==f&&(u||(u=Zd(r,f)))});else{if(r.issues.length===f)continue;u||(u=Zd(r,f))}}return c?c.then(()=>r):r},o=(r,l,a)=>{if(Zd(r))return r.aborted=!0,r;const u=s(l,i,a);if(u instanceof Promise){if(a.async===!1)throw new df;return u.then(c=>e._zod.parse(c,a))}return e._zod.parse(u,a)};e._zod.run=(r,l)=>{if(l.skipChecks)return e._zod.parse(r,l);if(l.direction==="backward"){const u=e._zod.parse({value:r.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(c=>o(c,r,l)):o(u,r,l)}const a=e._zod.parse(r,l);if(a instanceof Promise){if(l.async===!1)throw new df;return a.then(u=>s(u,i,l))}return s(a,i,l)}}ui(e,"~standard",()=>({validate:s=>{try{const o=GK(e,s);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return QK(e,s).then(r=>r.success?{value:r.data}:{issues:r.error?.issues})}},vendor:"zod",version:1}))}),x5=pt("$ZodString",(e,t)=>{Vi.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??_V(e._zod.bag),e._zod.parse=(n,i)=>{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}}),ji=pt("$ZodStringFormat",(e,t)=>{sv.init(e,t),x5.init(e,t)}),qV=pt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=fV),ji.init(e,t)}),UV=pt("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=mA(i))}else t.pattern??(t.pattern=mA());ji.init(e,t)}),KV=pt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=hV),ji.init(e,t)}),VV=pt("$ZodURL",(e,t)=>{ji.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),s=new URL(i);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=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),ZV=pt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=gV()),ji.init(e,t)}),GV=pt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=cV),ji.init(e,t)}),QV=pt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=oV),ji.init(e,t)}),YV=pt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=rV),ji.init(e,t)}),JV=pt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=lV),ji.init(e,t)}),XV=pt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=aV),ji.init(e,t)}),eZ=pt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=uV),ji.init(e,t)}),tZ=pt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=xV(t)),ji.init(e,t)}),nZ=pt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=CV),ji.init(e,t)}),iZ=pt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=wV(t)),ji.init(e,t)}),sZ=pt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=dV),ji.init(e,t)}),oZ=pt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=mV),ji.init(e,t),e._zod.bag.format="ipv4"}),rZ=pt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=vV),ji.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})}}}),lZ=pt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=yV),ji.init(e,t)}),aZ=pt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=bV),ji.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[s,o]=i;if(!o)throw new Error;const r=Number(o);if(`${r}`!==o)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 lT(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const uZ=pt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=kV),ji.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{lT(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function cZ(e){if(!eT.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return lT(n)}const dZ=pt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=eT),ji.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{cZ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),fZ=pt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=AV),ji.init(e,t)});function hZ(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const s=JSON.parse(atob(i));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const pZ=pt("$ZodJWT",(e,t)=>{ji.init(e,t),e._zod.check=n=>{hZ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),aT=pt("$ZodNumber",(e,t)=>{Vi.init(e,t),e._zod.pattern=e._zod.bag.pattern??iT,e._zod.parse=(n,i)=>{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 o=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,...o?{received:o}:{}}),n}}),gZ=pt("$ZodNumberFormat",(e,t)=>{LV.init(e,t),aT.init(e,t)}),mZ=pt("$ZodBoolean",(e,t)=>{Vi.init(e,t),e._zod.pattern=MV,e._zod.parse=(n,i)=>{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}}),vZ=pt("$ZodUnknown",(e,t)=>{Vi.init(e,t),e._zod.parse=n=>n}),yZ=pt("$ZodNever",(e,t)=>{Vi.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function vA(e,t,n){e.issues.length&&t.issues.push(...Gd(n,e.issues)),t.value[n]=e.value}const bZ=pt("$ZodArray",(e,t)=>{Vi.init(e,t),e._zod.parse=(n,i)=>{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 o=[];for(let r=0;r<s.length;r++){const l=s[r],a=t.element._zod.run({value:l,issues:[]},i);a instanceof Promise?o.push(a.then(u=>vA(u,n,r))):vA(a,n,r)}return o.length?Promise.all(o).then(()=>n):n}});function bm(e,t,n,i,s){if(e.issues.length){if(s&&!(n in i))return;t.issues.push(...Gd(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function uT(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=zK(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function cT(e,t,n,i,s,o){const r=[],l=s.keySet,a=s.catchall._zod,u=a.def.type,c=a.optout==="optional";for(const d in t){if(l.has(d))continue;if(u==="never"){r.push(d);continue}const f=a.run({value:t[d],issues:[]},i);f instanceof Promise?e.push(f.then(p=>bm(p,n,d,t,c))):bm(f,n,d,t,c)}return r.length&&n.issues.push({code:"unrecognized_keys",keys:r,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const kZ=pt("$ZodObject",(e,t)=>{if(Vi.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 i=tv(()=>uT(t));ui(e._zod,"propValues",()=>{const l=t.shape,a={};for(const u in l){const c=l[u]._zod;if(c.values){a[u]??(a[u]=new Set);for(const d of c.values)a[u].add(d)}}return a});const s=V1,o=t.catchall;let r;e._zod.parse=(l,a)=>{r??(r=i.value);const u=l.value;if(!s(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const c=[],d=r.shape;for(const f of r.keys){const p=d[f],g=p._zod.optout==="optional",m=p._zod.run({value:u[f],issues:[]},a);m instanceof Promise?c.push(m.then(y=>bm(y,l,f,u,g))):bm(m,l,f,u,g)}return o?cT(c,u,l,a,i.value,e):c.length?Promise.all(c).then(()=>l):l}}),AZ=pt("$ZodObjectJIT",(e,t)=>{kZ.init(e,t);const n=e._zod.parse,i=tv(()=>uT(t)),s=f=>{const p=new HV(["shape","payload","ctx"]),g=i.value,m=A=>{const v=gA(A);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};p.write("const input = payload.value;");const y=Object.create(null);let w=0;for(const A of g.keys)y[A]=`key_${w++}`;p.write("const newResult = {};");for(const A of g.keys){const v=y[A],x=gA(A),S=f[A]?._zod?.optout==="optional";p.write(`const ${v} = ${m(A)};`),S?p.write(` + if (${v}.issues.length) { + if (${x} in input) { + payload.issues = payload.issues.concat(${v}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${x}, ...iss.path] : [${x}] + }))); + } + } + + if (${v}.value === undefined) { + if (${x} in input) { + newResult[${x}] = undefined; + } + } else { + newResult[${x}] = ${v}.value; + } + + `):p.write(` + if (${v}.issues.length) { + payload.issues = payload.issues.concat(${v}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${x}, ...iss.path] : [${x}] + }))); + } + + if (${v}.value === undefined) { + if (${x} in input) { + newResult[${x}] = undefined; + } + } else { + newResult[${x}] = ${v}.value; + } + + `)}p.write("payload.value = newResult;"),p.write("return payload;");const k=p.compile();return(A,v)=>k(f,A,v)};let o;const r=V1,l=!VE.jitless,u=l&&DK.value,c=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=i.value);const g=f.value;return r(g)?l&&u&&p?.async===!1&&p.jitless!==!0?(o||(o=s(t.shape)),f=o(f,p),c?cT([],g,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function yA(e,t,n,i){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const s=e.filter(o=>!Zd(o));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(o=>o.issues.map(r=>wu(r,i,Cu())))}),t)}const dT=pt("$ZodUnion",(e,t)=>{Vi.init(e,t),ui(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),ui(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),ui(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),ui(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${s.map(o=>k5(o.source)).join("|")})$`)}});const n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(s,o)=>{if(n)return i(s,o);let r=!1;const l=[];for(const a of t.options){const u=a._zod.run({value:s.value,issues:[]},o);if(u instanceof Promise)l.push(u),r=!0;else{if(u.issues.length===0)return u;l.push(u)}}return r?Promise.all(l).then(a=>yA(a,s,e,o)):yA(l,s,e,o)}}),CZ=pt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,dT.init(e,t);const n=e._zod.parse;ui(e._zod,"propValues",()=>{const s={};for(const o of t.options){const r=o._zod.propValues;if(!r||Object.keys(r).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[l,a]of Object.entries(r)){s[l]||(s[l]=new Set);for(const u of a)s[l].add(u)}}return s});const i=tv(()=>{const s=t.options,o=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(o.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);o.set(a,r)}}return o});e._zod.parse=(s,o)=>{const r=s.value;if(!V1(r))return s.issues.push({code:"invalid_type",expected:"object",input:r,inst:e}),s;const l=i.value.get(r?.[t.discriminator]);return l?l._zod.run(s,o):t.unionFallback?n(s,o):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:r,path:[t.discriminator],inst:e}),s)}}),wZ=pt("$ZodIntersection",(e,t)=>{Vi.init(e,t),e._zod.parse=(n,i)=>{const s=n.value,o=t.left._zod.run({value:s,issues:[]},i),r=t.right._zod.run({value:s,issues:[]},i);return o instanceof Promise||r instanceof Promise?Promise.all([o,r]).then(([a,u])=>bA(n,a,u)):bA(n,o,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(Tf(e)&&Tf(t)){const n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),s={...e,...t};for(const o of i){const r=o3(e[o],t[o]);if(!r.valid)return{valid:!1,mergeErrorPath:[o,...r.mergeErrorPath]};s[o]=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 i=0;i<e.length;i++){const s=e[i],o=t[i],r=o3(s,o);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function bA(e,t,n){const i=new Map;let s;for(const l of t.issues)if(l.code==="unrecognized_keys"){s??(s=l);for(const a of l.keys)i.has(a)||i.set(a,{}),i.get(a).l=!0}else e.issues.push(l);for(const l of n.issues)if(l.code==="unrecognized_keys")for(const a of l.keys)i.has(a)||i.set(a,{}),i.get(a).r=!0;else e.issues.push(l);const o=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(o.length&&s&&e.issues.push({...s,keys:o}),Zd(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 xZ=pt("$ZodRecord",(e,t)=>{Vi.init(e,t),e._zod.parse=(n,i)=>{const s=n.value;if(!Tf(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const o=[],r=t.keyType._zod.values;if(r){n.value={};const l=new Set;for(const u of r)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){l.add(typeof u=="number"?u.toString():u);const c=t.valueType._zod.run({value:s[u],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&n.issues.push(...Gd(u,d.issues)),n.value[u]=d.value})):(c.issues.length&&n.issues.push(...Gd(u,c.issues)),n.value[u]=c.value)}let a;for(const u in s)l.has(u)||(a=a??[],a.push(u));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:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&iT.test(l)&&a.issues.length){const d=t.keyType._zod.run({value:Number(l),issues:[]},i);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=>wu(d,i,Cu())),input:l,path:[l],inst:e});continue}const c=t.valueType._zod.run({value:s[l],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&n.issues.push(...Gd(l,d.issues)),n.value[a.value]=d.value})):(c.issues.length&&n.issues.push(...Gd(l,c.issues)),n.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),_Z=pt("$ZodEnum",(e,t)=>{Vi.init(e,t);const n=ZE(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(s=>RK.has(typeof s)).map(s=>typeof s=="string"?Lf(s):s.toString()).join("|")})$`),e._zod.parse=(s,o)=>{const r=s.value;return i.has(r)||s.issues.push({code:"invalid_value",values:n,input:r,inst:e}),s}}),SZ=pt("$ZodLiteral",(e,t)=>{if(Vi.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(i=>typeof i=="string"?Lf(i):i?Lf(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,s)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),MZ=pt("$ZodTransform",(e,t)=>{Vi.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new KE(e.constructor.name);const s=t.transform(n.value,n);if(i.async)return(s instanceof Promise?s:Promise.resolve(s)).then(r=>(n.value=r,n));if(s instanceof Promise)throw new df;return n.value=s,n}});function kA(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const fT=pt("$ZodOptional",(e,t)=>{Vi.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ui(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ui(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${k5(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>kA(o,n.value)):kA(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),IZ=pt("$ZodExactOptional",(e,t)=>{fT.init(e,t),ui(e._zod,"values",()=>t.innerType._zod.values),ui(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),EZ=pt("$ZodNullable",(e,t)=>{Vi.init(e,t),ui(e._zod,"optin",()=>t.innerType._zod.optin),ui(e._zod,"optout",()=>t.innerType._zod.optout),ui(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${k5(n.source)}|null)$`):void 0}),ui(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),TZ=pt("$ZodDefault",(e,t)=>{Vi.init(e,t),e._zod.optin="optional",ui(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>AA(o,t)):AA(s,t)}});function AA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const LZ=pt("$ZodPrefault",(e,t)=>{Vi.init(e,t),e._zod.optin="optional",ui(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),NZ=pt("$ZodNonOptional",(e,t)=>{Vi.init(e,t),ui(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>CA(o,e)):CA(s,e)}});function CA(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 FZ=pt("$ZodCatch",(e,t)=>{Vi.init(e,t),ui(e._zod,"optin",()=>t.innerType._zod.optin),ui(e._zod,"optout",()=>t.innerType._zod.optout),ui(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(r=>wu(r,i,Cu()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(o=>wu(o,i,Cu()))},input:n.value}),n.issues=[]),n)}}),BZ=pt("$ZodPipe",(e,t)=>{Vi.init(e,t),ui(e._zod,"values",()=>t.in._zod.values),ui(e._zod,"optin",()=>t.in._zod.optin),ui(e._zod,"optout",()=>t.out._zod.optout),ui(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(n,i);return o instanceof Promise?o.then(r=>N0(r,t.in,i)):N0(o,t.in,i)}const s=t.in._zod.run(n,i);return s instanceof Promise?s.then(o=>N0(o,t.out,i)):N0(s,t.out,i)}});function N0(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const $Z=pt("$ZodReadonly",(e,t)=>{Vi.init(e,t),ui(e._zod,"propValues",()=>t.innerType._zod.propValues),ui(e._zod,"values",()=>t.innerType._zod.values),ui(e._zod,"optin",()=>t.innerType?._zod?.optin),ui(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(wA):wA(s)}});function wA(e){return e.value=Object.freeze(e.value),e}const DZ=pt("$ZodCustom",(e,t)=>{ar.init(e,t),Vi.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,s=t.fn(i);if(s instanceof Promise)return s.then(o=>xA(o,n,i,e));xA(s,n,i,e)}});function xA(e,t,n,i){if(!e){const s={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),t.issues.push(Z1(s))}}var _A;class RZ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.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 i={...this.get(n)??{}};delete i.id;const s={...i,...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 zZ(){return new RZ}(_A=globalThis).__zod_globalRegistry??(_A.__zod_globalRegistry=zZ());const Wh=globalThis.__zod_globalRegistry;function OZ(e,t){return new e({type:"string",...ln(t)})}function PZ(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ln(t)})}function SA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ln(t)})}function jZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ln(t)})}function HZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ln(t)})}function WZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ln(t)})}function qZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ln(t)})}function UZ(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ln(t)})}function KZ(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ln(t)})}function VZ(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ln(t)})}function ZZ(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ln(t)})}function GZ(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ln(t)})}function QZ(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ln(t)})}function YZ(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ln(t)})}function JZ(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ln(t)})}function XZ(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ln(t)})}function eG(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ln(t)})}function tG(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ln(t)})}function nG(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ln(t)})}function iG(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ln(t)})}function sG(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ln(t)})}function oG(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ln(t)})}function rG(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ln(t)})}function lG(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ln(t)})}function aG(e,t){return new e({type:"string",format:"date",check:"string_format",...ln(t)})}function uG(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ln(t)})}function cG(e,t){return new e({type:"string",format:"duration",check:"string_format",...ln(t)})}function dG(e,t){return new e({type:"number",checks:[],...ln(t)})}function fG(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ln(t)})}function hG(e,t){return new e({type:"boolean",...ln(t)})}function pG(e){return new e({type:"unknown"})}function gG(e,t){return new e({type:"never",...ln(t)})}function MA(e,t){return new oT({check:"less_than",...ln(t),value:e,inclusive:!1})}function G9(e,t){return new oT({check:"less_than",...ln(t),value:e,inclusive:!0})}function IA(e,t){return new rT({check:"greater_than",...ln(t),value:e,inclusive:!1})}function Q9(e,t){return new rT({check:"greater_than",...ln(t),value:e,inclusive:!0})}function EA(e,t){return new TV({check:"multiple_of",...ln(t),value:e})}function hT(e,t){return new NV({check:"max_length",...ln(t),maximum:e})}function km(e,t){return new FV({check:"min_length",...ln(t),minimum:e})}function pT(e,t){return new BV({check:"length_equals",...ln(t),length:e})}function mG(e,t){return new $V({check:"string_format",format:"regex",...ln(t),pattern:e})}function vG(e){return new DV({check:"string_format",format:"lowercase",...ln(e)})}function yG(e){return new RV({check:"string_format",format:"uppercase",...ln(e)})}function bG(e,t){return new zV({check:"string_format",format:"includes",...ln(t),includes:e})}function kG(e,t){return new OV({check:"string_format",format:"starts_with",...ln(t),prefix:e})}function AG(e,t){return new PV({check:"string_format",format:"ends_with",...ln(t),suffix:e})}function Hf(e){return new jV({check:"overwrite",tx:e})}function CG(e){return Hf(t=>t.normalize(e))}function wG(){return Hf(e=>e.trim())}function xG(){return Hf(e=>e.toLowerCase())}function _G(){return Hf(e=>e.toUpperCase())}function SG(){return Hf(e=>$K(e))}function MG(e,t,n){return new e({type:"array",element:t,...ln(n)})}function IG(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ln(n)})}function EG(e){const t=TG(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Z1(i,n.value,t._zod.def));else{const s=i;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(Z1(s))}},e(n.value,n)));return t}function TG(e,t){const n=new ar({check:"custom",...ln(t)});return n._zod.check=e,n}function gT(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??Wh,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 ks(e,t,n={path:[],schemaPath:[]}){var i;const s=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.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 c={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,r.schema,c);else{const f=r.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,f,c)}const d=e._zod.parent;d&&(r.ref||(r.ref=d),ks(d,t,c),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(r.schema,a),t.io==="input"&&Eo(e)&&(delete r.schema.examples,delete r.schema.default),t.io==="input"&&r.schema._prefault&&((i=r.schema).default??(i.default=r.schema._prefault)),delete r.schema._prefault,t.seen.get(e).schema}function mT(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const r of e.seen.entries()){const l=e.metadataRegistry.get(r[0])?.id;if(l){const a=i.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.`);i.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??(g=>g);if(d)return{ref:f(d)};const p=r[1].defId??r[1].schema.id??`schema${e.counter++}`;return r[1].defId=p,{defId:p,ref:`${f("__shared")}#/${l}/${p}`}}if(r[1]===n)return{ref:"#"};const u=`#/${l}/`,c=r[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:u+c}},o=r=>{if(r[1].schema.$ref)return;const l=r[1],{ref:a,defId:u}=s(r);l.def={...l.schema},u&&(l.defId=u);const c=l.schema;for(const d in c)delete c[d];c.$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("/")}/<root> + +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]){o(r);continue}if(e.external){const u=e.external.registry.get(r[0])?.id;if(t!==r[0]&&u){o(r);continue}}if(e.metadataRegistry.get(r[0])?.id){o(r);continue}if(l.cycle){o(r);continue}if(l.count>1&&e.reused==="ref"){o(r);continue}}}function vT(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=r=>{const l=e.seen.get(r);if(l.ref===null)return;const a=l.def??l.schema,u={...a},c=l.ref;if(l.ref=null,c){i(c);const f=e.seen.get(c),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(p)):Object.assign(a,p),Object.assign(a,u),r._zod.parent===c)for(const m in a)m==="$ref"||m==="allOf"||m in u||delete a[m];if(p.$ref&&f.def)for(const m in a)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(a[m])===JSON.stringify(f.def[m])&&delete a[m]}const d=r._zod.parent;if(d&&d!==c){i(d);const f=e.seen.get(d);if(f?.schema.$ref&&(a.$ref=f.schema.$ref,f.def))for(const p in a)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(a[p])===JSON.stringify(f.def[p])&&delete a[p]}e.override({zodSchema:r,jsonSchema:a,path:l.path??[]})};for(const r of[...e.seen.entries()].reverse())i(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 o=e.external?.defs??{};for(const r of e.seen.entries()){const l=r[1];l.def&&l.defId&&(o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?s.$defs=o:s.definitions=o);try{const r=JSON.parse(JSON.stringify(s));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:Am(t,"input",e.processors),output:Am(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch{throw new Error("Error converting schema to JSON.")}}function Eo(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Eo(i.element,n);if(i.type==="set")return Eo(i.valueType,n);if(i.type==="lazy")return Eo(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Eo(i.innerType,n);if(i.type==="intersection")return Eo(i.left,n)||Eo(i.right,n);if(i.type==="record"||i.type==="map")return Eo(i.keyType,n)||Eo(i.valueType,n);if(i.type==="pipe")return Eo(i.in,n)||Eo(i.out,n);if(i.type==="object"){for(const s in i.shape)if(Eo(i.shape[s],n))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(Eo(s,n))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(Eo(s,n))return!0;return!!(i.rest&&Eo(i.rest,n))}return!1}const LG=(e,t={})=>n=>{const i=gT({...n,processors:t});return ks(e,i),mT(i,e),vT(i,e)},Am=(e,t,n={})=>i=>{const{libraryOptions:s,target:o}=i??{},r=gT({...s??{},target:o,io:t,processors:n});return ks(e,r),mT(r,e),vT(r,e)},NG={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},FG=(e,t,n,i)=>{const s=n;s.type="string";const{minimum:o,maximum:r,format:l,patterns:a,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(s.minLength=o),typeof r=="number"&&(s.maxLength=r),l&&(s.format=NG[l]??l,s.format===""&&delete s.format,l==="time"&&delete s.format),u&&(s.contentEncoding=u),a&&a.size>0){const c=[...a];c.length===1?s.pattern=c[0].source:c.length>1&&(s.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},BG=(e,t,n,i)=>{const s=n,{minimum:o,maximum:r,format:l,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof l=="string"&&l.includes("int")?s.type="integer":s.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=c,s.exclusiveMinimum=!0):s.exclusiveMinimum=c),typeof o=="number"&&(s.minimum=o,typeof c=="number"&&t.target!=="draft-04"&&(c>=o?delete s.minimum:delete s.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u),typeof r=="number"&&(s.maximum=r,typeof u=="number"&&t.target!=="draft-04"&&(u<=r?delete s.maximum:delete s.exclusiveMaximum)),typeof a=="number"&&(s.multipleOf=a)},$G=(e,t,n,i)=>{n.type="boolean"},DG=(e,t,n,i)=>{n.not={}},RG=(e,t,n,i)=>{},zG=(e,t,n,i)=>{const s=e._zod.def,o=ZE(s.entries);o.every(r=>typeof r=="number")&&(n.type="number"),o.every(r=>typeof r=="string")&&(n.type="string"),n.enum=o},OG=(e,t,n,i)=>{const s=e._zod.def,o=[];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");o.push(Number(r))}else o.push(r);if(o.length!==0)if(o.length===1){const r=o[0];n.type=r===null?"null":typeof r,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[r]:n.const=r}else o.every(r=>typeof r=="number")&&(n.type="number"),o.every(r=>typeof r=="string")&&(n.type="string"),o.every(r=>typeof r=="boolean")&&(n.type="boolean"),o.every(r=>r===null)&&(n.type="null"),n.enum=o},PG=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},jG=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},HG=(e,t,n,i)=>{const s=n,o=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=ks(o.element,t,{...i,path:[...i.path,"items"]})},WG=(e,t,n,i)=>{const s=n,o=e._zod.def;s.type="object",s.properties={};const r=o.shape;for(const u in r)s.properties[u]=ks(r[u],t,{...i,path:[...i.path,"properties",u]});const l=new Set(Object.keys(r)),a=new Set([...l].filter(u=>{const c=o.shape[u]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));a.size>0&&(s.required=Array.from(a)),o.catchall?._zod.def.type==="never"?s.additionalProperties=!1:o.catchall?o.catchall&&(s.additionalProperties=ks(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},qG=(e,t,n,i)=>{const s=e._zod.def,o=s.inclusive===!1,r=s.options.map((l,a)=>ks(l,t,{...i,path:[...i.path,o?"oneOf":"anyOf",a]}));o?n.oneOf=r:n.anyOf=r},UG=(e,t,n,i)=>{const s=e._zod.def,o=ks(s.left,t,{...i,path:[...i.path,"allOf",0]}),r=ks(s.right,t,{...i,path:[...i.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,a=[...l(o)?o.allOf:[o],...l(r)?r.allOf:[r]];n.allOf=a},KG=(e,t,n,i)=>{const s=n,o=e._zod.def;s.type="object";const r=o.keyType,a=r._zod.bag?.patterns;if(o.mode==="loose"&&a&&a.size>0){const c=ks(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=ks(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),s.additionalProperties=ks(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const u=r._zod.values;if(u){const c=[...u].filter(d=>typeof d=="string"||typeof d=="number");c.length>0&&(s.required=c)}},VG=(e,t,n,i)=>{const s=e._zod.def,o=ks(s.innerType,t,i),r=t.seen.get(e);t.target==="openapi-3.0"?(r.ref=s.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},ZG=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType},GG=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},QG=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},YG=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.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},JG=(e,t,n,i)=>{const s=e._zod.def,o=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;ks(o,t,i);const r=t.seen.get(e);r.ref=o},XG=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,n.readOnly=!0},yT=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType},eQ=pt("ZodISODateTime",(e,t)=>{tZ.init(e,t),Gi.init(e,t)});function tQ(e){return lG(eQ,e)}const nQ=pt("ZodISODate",(e,t)=>{nZ.init(e,t),Gi.init(e,t)});function iQ(e){return aG(nQ,e)}const sQ=pt("ZodISOTime",(e,t)=>{iZ.init(e,t),Gi.init(e,t)});function oQ(e){return uG(sQ,e)}const rQ=pt("ZodISODuration",(e,t)=>{sZ.init(e,t),Gi.init(e,t)});function lQ(e){return cG(rQ,e)}const aQ=(e,t)=>{JE.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ZK(e,n)},flatten:{value:n=>VK(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,s3,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,s3,2)}},isEmpty:{get(){return e.issues.length===0}}})},Vr=pt("ZodError",aQ,{Parent:Error}),uQ=C5(Vr),cQ=w5(Vr),dQ=nv(Vr),fQ=iv(Vr),hQ=YK(Vr),pQ=JK(Vr),gQ=XK(Vr),mQ=eV(Vr),vQ=tV(Vr),yQ=nV(Vr),bQ=iV(Vr),kQ=sV(Vr),Zi=pt("ZodType",(e,t)=>(Vi.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Am(e,"input"),output:Am(e,"output")}}),e.toJSONSchema=LG(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone($u(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>Du(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>uQ(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>dQ(e,n,i),e.parseAsync=async(n,i)=>cQ(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>fQ(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>hQ(e,n,i),e.decode=(n,i)=>pQ(e,n,i),e.encodeAsync=async(n,i)=>gQ(e,n,i),e.decodeAsync=async(n,i)=>mQ(e,n,i),e.safeEncode=(n,i)=>vQ(e,n,i),e.safeDecode=(n,i)=>yQ(e,n,i),e.safeEncodeAsync=async(n,i)=>bQ(e,n,i),e.safeDecodeAsync=async(n,i)=>kQ(e,n,i),e.refine=(n,i)=>e.check(pY(n,i)),e.superRefine=n=>e.check(gY(n)),e.overwrite=n=>e.check(Hf(n)),e.optional=()=>NA(e),e.exactOptional=()=>tY(e),e.nullable=()=>FA(e),e.nullish=()=>NA(FA(e)),e.nonoptional=n=>lY(e,n),e.array=()=>Jn(e),e.or=n=>KQ([e,n]),e.and=n=>GQ(e,n),e.transform=n=>BA(e,XQ(n)),e.default=n=>sY(e,n),e.prefault=n=>rY(e,n),e.catch=n=>uY(e,n),e.pipe=n=>BA(e,n),e.readonly=()=>fY(e),e.describe=n=>{const i=e.clone();return Wh.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return Wh.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Wh.get(e);const i=e.clone();return Wh.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),bT=pt("_ZodString",(e,t)=>{x5.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(i,s,o)=>FG(e,i,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(mG(...i)),e.includes=(...i)=>e.check(bG(...i)),e.startsWith=(...i)=>e.check(kG(...i)),e.endsWith=(...i)=>e.check(AG(...i)),e.min=(...i)=>e.check(km(...i)),e.max=(...i)=>e.check(hT(...i)),e.length=(...i)=>e.check(pT(...i)),e.nonempty=(...i)=>e.check(km(1,...i)),e.lowercase=i=>e.check(vG(i)),e.uppercase=i=>e.check(yG(i)),e.trim=()=>e.check(wG()),e.normalize=(...i)=>e.check(CG(...i)),e.toLowerCase=()=>e.check(xG()),e.toUpperCase=()=>e.check(_G()),e.slugify=()=>e.check(SG())}),AQ=pt("ZodString",(e,t)=>{x5.init(e,t),bT.init(e,t),e.email=n=>e.check(PZ(CQ,n)),e.url=n=>e.check(UZ(wQ,n)),e.jwt=n=>e.check(rG(zQ,n)),e.emoji=n=>e.check(KZ(xQ,n)),e.guid=n=>e.check(SA(TA,n)),e.uuid=n=>e.check(jZ(F0,n)),e.uuidv4=n=>e.check(HZ(F0,n)),e.uuidv6=n=>e.check(WZ(F0,n)),e.uuidv7=n=>e.check(qZ(F0,n)),e.nanoid=n=>e.check(VZ(_Q,n)),e.guid=n=>e.check(SA(TA,n)),e.cuid=n=>e.check(ZZ(SQ,n)),e.cuid2=n=>e.check(GZ(MQ,n)),e.ulid=n=>e.check(QZ(IQ,n)),e.base64=n=>e.check(iG($Q,n)),e.base64url=n=>e.check(sG(DQ,n)),e.xid=n=>e.check(YZ(EQ,n)),e.ksuid=n=>e.check(JZ(TQ,n)),e.ipv4=n=>e.check(XZ(LQ,n)),e.ipv6=n=>e.check(eG(NQ,n)),e.cidrv4=n=>e.check(tG(FQ,n)),e.cidrv6=n=>e.check(nG(BQ,n)),e.e164=n=>e.check(oG(RQ,n)),e.datetime=n=>e.check(tQ(n)),e.date=n=>e.check(iQ(n)),e.time=n=>e.check(oQ(n)),e.duration=n=>e.check(lQ(n))});function _t(e){return OZ(AQ,e)}const Gi=pt("ZodStringFormat",(e,t)=>{ji.init(e,t),bT.init(e,t)}),CQ=pt("ZodEmail",(e,t)=>{KV.init(e,t),Gi.init(e,t)}),TA=pt("ZodGUID",(e,t)=>{qV.init(e,t),Gi.init(e,t)}),F0=pt("ZodUUID",(e,t)=>{UV.init(e,t),Gi.init(e,t)}),wQ=pt("ZodURL",(e,t)=>{VV.init(e,t),Gi.init(e,t)}),xQ=pt("ZodEmoji",(e,t)=>{ZV.init(e,t),Gi.init(e,t)}),_Q=pt("ZodNanoID",(e,t)=>{GV.init(e,t),Gi.init(e,t)}),SQ=pt("ZodCUID",(e,t)=>{QV.init(e,t),Gi.init(e,t)}),MQ=pt("ZodCUID2",(e,t)=>{YV.init(e,t),Gi.init(e,t)}),IQ=pt("ZodULID",(e,t)=>{JV.init(e,t),Gi.init(e,t)}),EQ=pt("ZodXID",(e,t)=>{XV.init(e,t),Gi.init(e,t)}),TQ=pt("ZodKSUID",(e,t)=>{eZ.init(e,t),Gi.init(e,t)}),LQ=pt("ZodIPv4",(e,t)=>{oZ.init(e,t),Gi.init(e,t)}),NQ=pt("ZodIPv6",(e,t)=>{rZ.init(e,t),Gi.init(e,t)}),FQ=pt("ZodCIDRv4",(e,t)=>{lZ.init(e,t),Gi.init(e,t)}),BQ=pt("ZodCIDRv6",(e,t)=>{aZ.init(e,t),Gi.init(e,t)}),$Q=pt("ZodBase64",(e,t)=>{uZ.init(e,t),Gi.init(e,t)}),DQ=pt("ZodBase64URL",(e,t)=>{dZ.init(e,t),Gi.init(e,t)}),RQ=pt("ZodE164",(e,t)=>{fZ.init(e,t),Gi.init(e,t)}),zQ=pt("ZodJWT",(e,t)=>{pZ.init(e,t),Gi.init(e,t)}),kT=pt("ZodNumber",(e,t)=>{aT.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(i,s,o)=>BG(e,i,s),e.gt=(i,s)=>e.check(IA(i,s)),e.gte=(i,s)=>e.check(Q9(i,s)),e.min=(i,s)=>e.check(Q9(i,s)),e.lt=(i,s)=>e.check(MA(i,s)),e.lte=(i,s)=>e.check(G9(i,s)),e.max=(i,s)=>e.check(G9(i,s)),e.int=i=>e.check(LA(i)),e.safe=i=>e.check(LA(i)),e.positive=i=>e.check(IA(0,i)),e.nonnegative=i=>e.check(Q9(0,i)),e.negative=i=>e.check(MA(0,i)),e.nonpositive=i=>e.check(G9(0,i)),e.multipleOf=(i,s)=>e.check(EA(i,s)),e.step=(i,s)=>e.check(EA(i,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 Jt(e){return dG(kT,e)}const OQ=pt("ZodNumberFormat",(e,t)=>{gZ.init(e,t),kT.init(e,t)});function LA(e){return fG(OQ,e)}const PQ=pt("ZodBoolean",(e,t)=>{mZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>$G(e,n,i)});function bp(e){return hG(PQ,e)}const jQ=pt("ZodUnknown",(e,t)=>{vZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>RG()});function Is(){return pG(jQ)}const HQ=pt("ZodNever",(e,t)=>{yZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>DG(e,n,i)});function WQ(e){return gG(HQ,e)}const qQ=pt("ZodArray",(e,t)=>{bZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>HG(e,n,i,s),e.element=t.element,e.min=(n,i)=>e.check(km(n,i)),e.nonempty=n=>e.check(km(1,n)),e.max=(n,i)=>e.check(hT(n,i)),e.length=(n,i)=>e.check(pT(n,i)),e.unwrap=()=>e.element});function Jn(e,t){return MG(qQ,e,t)}const UQ=pt("ZodObject",(e,t)=>{AZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>WG(e,n,i,s),ui(e,"shape",()=>t.shape),e.keyof=()=>Pi(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Is()}),e.loose=()=>e.clone({...e._zod.def,catchall:Is()}),e.strict=()=>e.clone({...e._zod.def,catchall:WQ()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>HK(e,n),e.safeExtend=n=>WK(e,n),e.merge=n=>qK(e,n),e.pick=n=>PK(e,n),e.omit=n=>jK(e,n),e.partial=(...n)=>UK(CT,e,n[0]),e.required=(...n)=>KK(wT,e,n[0])});function Dt(e,t){const n={type:"object",shape:e??{},...ln(t)};return new UQ(n)}const AT=pt("ZodUnion",(e,t)=>{dT.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>qG(e,n,i,s),e.options=t.options});function KQ(e,t){return new AT({type:"union",options:e,...ln(t)})}const VQ=pt("ZodDiscriminatedUnion",(e,t)=>{AT.init(e,t),CZ.init(e,t)});function Ru(e,t,n){return new VQ({type:"union",options:t,discriminator:e,...ln(n)})}const ZQ=pt("ZodIntersection",(e,t)=>{wZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>UG(e,n,i,s)});function GQ(e,t){return new ZQ({type:"intersection",left:e,right:t})}const QQ=pt("ZodRecord",(e,t)=>{xZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>KG(e,n,i,s),e.keyType=t.keyType,e.valueType=t.valueType});function _5(e,t,n){return new QQ({type:"record",keyType:e,valueType:t,...ln(n)})}const r3=pt("ZodEnum",(e,t)=>{_Z.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(i,s,o)=>zG(e,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,s)=>{const o={};for(const r of i)if(n.has(r))o[r]=t.entries[r];else throw new Error(`Key ${r} not found in enum`);return new r3({...t,checks:[],...ln(s),entries:o})},e.exclude=(i,s)=>{const o={...t.entries};for(const r of i)if(n.has(r))delete o[r];else throw new Error(`Key ${r} not found in enum`);return new r3({...t,checks:[],...ln(s),entries:o})}});function Pi(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new r3({type:"enum",entries:n,...ln(t)})}const YQ=pt("ZodLiteral",(e,t)=>{SZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>OG(e,n,i),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 xn(e,t){return new YQ({type:"literal",values:Array.isArray(e)?e:[e],...ln(t)})}const JQ=pt("ZodTransform",(e,t)=>{MZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>jG(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new KE(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(Z1(o,n.value,t));else{const r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(Z1(r))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(o=>(n.value=o,n)):(n.value=s,n)}});function XQ(e){return new JQ({type:"transform",transform:e})}const CT=pt("ZodOptional",(e,t)=>{fT.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>yT(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function NA(e){return new CT({type:"optional",innerType:e})}const eY=pt("ZodExactOptional",(e,t)=>{IZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>yT(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function tY(e){return new eY({type:"optional",innerType:e})}const nY=pt("ZodNullable",(e,t)=>{EZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>VG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function FA(e){return new nY({type:"nullable",innerType:e})}const iY=pt("ZodDefault",(e,t)=>{TZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>GG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sY(e,t){return new iY({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():QE(t)}})}const oY=pt("ZodPrefault",(e,t)=>{LZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>QG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function rY(e,t){return new oY({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():QE(t)}})}const wT=pt("ZodNonOptional",(e,t)=>{NZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>ZG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function lY(e,t){return new wT({type:"nonoptional",innerType:e,...ln(t)})}const aY=pt("ZodCatch",(e,t)=>{FZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>YG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function uY(e,t){return new aY({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const cY=pt("ZodPipe",(e,t)=>{BZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>JG(e,n,i,s),e.in=t.in,e.out=t.out});function BA(e,t){return new cY({type:"pipe",in:e,out:t})}const dY=pt("ZodReadonly",(e,t)=>{$Z.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>XG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function fY(e){return new dY({type:"readonly",innerType:e})}const hY=pt("ZodCustom",(e,t)=>{DZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>PG(e,n)});function pY(e,t={}){return IG(hY,e,t)}function gY(e){return EG(e)}const Kc=_t().min(1),S5=_t().min(1),kp=_t().min(1),Vc=_t().min(1),Sr=_t().min(1),mY=/^[A-Za-z0-9._-]{1,128}$/;function vY(e){return mY.test(e)&&e!=="."&&e!==".."}const xT=Ru("kind",[Dt({kind:xn("user"),payload:Is().optional()}),Dt({kind:xn("cron"),taskId:Vc.optional(),payload:Is().optional()}),Dt({kind:xn("task"),taskId:Vc,payload:Is().optional()}),Dt({kind:xn("hook"),payload:Is().optional()}),Dt({kind:xn("compaction"),payload:Is().optional()}),Dt({kind:xn("side"),payload:Is().optional()}),Dt({kind:xn("other"),payload:Is().optional()})]),yY=Dt({inputTokens:Jt().optional(),outputTokens:Jt().optional(),cachedTokens:Jt().optional(),cost:Jt().optional()}),d1=Dt({inputOther:Jt(),output:Jt(),inputCacheRead:Jt(),inputCacheCreation:Jt()}),bY=Dt({llmFirstTokenLatencyMs:Jt().optional(),llmStreamDurationMs:Jt().optional(),llmRequestBuildMs:Jt().optional(),llmServerFirstTokenMs:Jt().optional(),llmServerDecodeMs:Jt().optional(),llmClientConsumeMs:Jt().optional()}),kY=Dt({failedAttempt:Jt(),nextAttempt:Jt(),maxAttempts:Jt(),delayMs:Jt(),errorName:_t(),errorMessage:_t(),statusCode:Jt().optional()}),_T=Pi(["queued","running","completed","failed","cancelled"]),AY=Pi(["running","completed","interrupted","failed"]),CY=Dt({kind:xn("text"),frameId:kp,role:Pi(["assistant","user"]),text:_t(),attachmentIds:Jn(_t()).optional(),taskId:Vc.optional()}),wY=Dt({kind:xn("thinking"),frameId:kp,text:_t()}),xY=Dt({agentId:Sr,role:Pi(["child","member"]).optional()}),_Y=Dt({kind:Pi(["stdout","stderr","progress","status","custom"]),text:_t().optional(),percent:Jt().optional(),customKind:_t().optional(),customData:Is().optional()}),SY=Dt({kind:xn("tool"),frameId:kp,toolCallId:_t(),name:_t(),view:_t().optional(),state:Pi(["running","done","error"]),input:Is().optional(),output:Is().optional(),display:Is().optional(),error:_t().optional(),inputText:_t().optional(),progress:_Y.optional(),taskId:Vc.optional(),approvalId:_t().optional(),todoId:_t().optional(),agentRefs:Jn(xY).optional()}),M5=Dt({interactionId:_t(),interactionKind:Pi(["approval","question"]),toolCallId:_t().optional(),state:Pi(["pending","approved","rejected","cancelled","answered","dismissed"]),request:Is().optional(),response:Is().optional()}),MY=Dt({kind:xn("notice"),frameId:kp,level:Pi(["error","warning","info"]),source:_t().optional(),message:_t(),detail:Is().optional()}),ST=Ru("kind",[CY,wY,SY,MY]),MT=Dt({kind:xn("step"),stepId:S5,turnId:Kc,ordinal:Jt().int(),state:AY,frames:Jn(ST),startedAt:_t().optional(),endedAt:_t().optional(),usage:d1.optional(),finishReason:_t().optional(),timing:bY.optional(),retry:kY.optional(),endReason:_t().optional(),endMessage:_t().optional()}),IT=Dt({kind:xn("turn"),turnId:Kc,ordinal:Jt().int(),state:_T,origin:xT,prompt:_t().optional(),attachmentIds:Jn(_t()).optional(),steps:Jn(MT),startedAt:_t().optional(),endedAt:_t().optional(),usage:yY.optional(),durationMs:Jt().optional(),error:_t().optional()}),ET=Dt({kind:xn("marker"),markerId:_t(),marker:_t(),payload:Is().optional(),at:_t().optional()}),TT=Dt({kind:xn("taskref"),refId:_t(),taskId:Vc,at:_t().optional()}),LT=Ru("kind",[IT,ET,TT]),I5=Dt({taskId:Vc,kind:Pi(["shell","subagent","tool","other"]),state:Pi(["running","completed","failed","timed_out","killed","lost"]),detached:bp(),description:_t().optional(),agentId:Sr.optional(),outputTail:_t(),startedAt:_t().optional(),endedAt:_t().optional(),resultSummary:_t().optional(),error:_t().optional(),stateReason:_t().optional(),usage:d1.optional()}),IY=Dt({objective:_t(),status:Pi(["active","paused","blocked","complete"]),completionCriterion:_t().optional(),budgetUsed:Jt().optional(),budgetLimit:Jt().optional()}),EY=Dt({plan:Dt({reviewPath:_t().optional(),version:Jt().optional()}).optional(),swarm:Dt({trigger:_t().optional()}).optional()}),TY=Dt({plan:Dt({reviewPath:_t().optional(),version:Jt().optional()}).nullable().optional(),swarm:Dt({trigger:_t().optional()}).nullable().optional()}),LY=Ru("kind",[Dt({kind:xn("idle")}),Dt({kind:xn("running"),turnId:Jt(),step:Jt(),stepId:_t(),since:Jt()}),Dt({kind:xn("streaming"),turnId:Jt(),step:Jt(),stepId:_t(),stream:Pi(["assistant","thinking","tool_call"]),toolCallId:_t().optional(),toolName:_t().optional(),since:Jt()}),Dt({kind:xn("tool_call"),turnId:Jt(),step:Jt(),toolCallId:_t(),name:_t(),since:Jt()}),Dt({kind:xn("retrying"),turnId:Jt(),step:Jt(),stepId:_t(),failedAttempt:Jt(),nextAttempt:Jt(),maxAttempts:Jt(),delayMs:Jt(),errorName:_t().optional(),statusCode:Jt().optional(),since:Jt()}),Dt({kind:xn("awaiting_approval"),turnId:Jt(),step:Jt().optional(),approval:Is().optional(),since:Jt()}),Dt({kind:xn("interrupted"),turnId:Jt(),step:Jt().optional(),reason:Pi(["aborted","max_steps","error"]),message:_t().optional(),at:Jt()}),Dt({kind:xn("ended"),turnId:Jt(),reason:Pi(["completed","cancelled","failed","blocked"]),durationMs:Jt().optional(),at:Jt()})]),NY=Dt({byModel:_5(_t(),d1).optional(),currentTurn:d1.optional(),total:d1.optional()}),FY=Dt({model:_t().optional(),thinkingEffort:_t().optional(),usage:NY.optional(),contextTokens:Jt().optional(),maxContextTokens:Jt().optional(),contextUsage:Jt().optional(),permission:Pi(["manual","yolo","auto"]).optional(),phase:LY.optional()}),E5=Dt({goal:IY.optional(),modes:EY.optional(),activity:Pi(["idle","turn","disposing","unknown"]).optional(),agent:FY.optional()}),BY=E5.extend({modes:TY.optional()}),ov=Dt({attachmentId:_t(),mediaType:_t(),name:_t().optional(),size:Jt().optional(),source:Ru("kind",[Dt({kind:xn("url"),url:_t()}),Dt({kind:xn("file"),fileId:_t()})]).optional(),placeholder:_t().optional()}),$Y=Dt({title:_t(),status:Pi(["pending","in_progress","done"])}),T5=Dt({todoId:_t(),items:Jn($Y),updatedAt:_t().optional()}),L5=Dt({promptId:_t(),status:Pi(["running","queued","blocked","completed","failed","aborted"]),userMessageId:_t().optional(),content:Is().optional(),createdAt:_t(),finishedAt:_t().optional(),steeredAt:_t().optional()}),NT=Dt({items:Jn(LT),tasks:Jn(I5),interactions:Jn(M5).default([]),attachments:Jn(ov).default([]),todos:Jn(T5).default([]),prompts:Jn(L5).default([]),meta:E5,hasMoreOlder:bp().optional()}),DY=IT.omit({steps:!0}),RY=MT.omit({frames:!0}),zY=Ru("type",[Dt({type:xn("frame"),turnId:Kc,stepId:S5,frameId:kp}),Dt({type:xn("task"),taskId:Vc})]),N5=Ru("op",[Dt({op:xn("reset"),agentId:Sr,snapshot:NT}),Dt({op:xn("turn.upsert"),turn:DY}),Dt({op:xn("step.upsert"),turnId:Kc,step:RY}),Dt({op:xn("frame.upsert"),turnId:Kc,stepId:S5,frame:ST}),Dt({op:xn("append"),target:zY,offset:Jt().int().nonnegative(),text:_t()}),Dt({op:xn("marker.upsert"),item:ET,beforeTurn:Jt().int().optional()}),Dt({op:xn("taskref.upsert"),item:TT,beforeTurn:Jt().int().optional()}),Dt({op:xn("task.upsert"),task:I5}),Dt({op:xn("interaction.upsert"),interaction:M5}),Dt({op:xn("attachment.upsert"),attachment:ov}),Dt({op:xn("todo.upsert"),todo:T5}),Dt({op:xn("prompt.upsert"),prompt:L5}),Dt({op:xn("meta.merge"),meta:BY}),Dt({op:xn("items.remove"),ids:Jn(_t())})]);Dt({agentId:Sr,ops:Jn(N5)});const OY=Pi(["off","turn","block","delta"]),Nf=Jt().int().nonnegative(),PY=_5(_t(),OY);Dt({session_id:_t().min(1),transcript:PY,transcript_since:_5(_t(),Nf).optional()});Dt({agent_id:Sr,before_turn:_t().min(1).optional(),after_turn:_t().min(1).optional(),page_size:Jt().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"]}),vY(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const jY=Dt({agentId:Sr,type:Pi(["main","sub","independent"]).optional(),parentAgentId:Sr.optional(),label:_t().optional(),createdAt:_t().optional(),disposedAt:_t().optional()}),HY=Dt({agent_id:Sr,items:Jn(LT),has_more:bp(),tasks:Jn(I5),interactions:Jn(M5).default([]),attachments:Jn(ov).default([]),todos:Jn(T5).default([]),prompts:Jn(L5).default([]),meta:E5,agents:Jn(jY),pending_interactions:Jn(_t()),seq:Nf.optional()});Dt({agent_id:Sr,batches:Jn(Dt({seq:Nf,ops:Jn(N5)})),latest_seq:Nf,complete:bp()});const WY=Dt({turn_id:Kc,ordinal:Jt().int(),state:_T,origin:xT,prompt:_t(),attachment_ids:Jn(_t()).optional(),started_at:_t().optional()});Dt({agents:Jn(Dt({agent_id:Sr,messages:Jn(WY),attachments:Jn(ov).default([])}))});const qY=Dt({state:Pi(["pending","approved","rejected","cancelled"]),selected_option:_t().optional(),feedback:_t().optional()}),UY=Dt({tool_call_id:_t(),turn_id:Kc,source:Pi(["interaction","display","output"]),plan:_t(),path:_t().optional(),options:Jn(Dt({label:_t(),description:_t().optional()})).optional(),review:qY.optional()});Dt({agent_id:Sr,plans:Jn(UY)});const KY=Dt({agent_id:Sr,snapshot:NT,has_more_older:bp(),seq:Nf.optional()}),VY=Dt({agent_id:Sr,ops:Jn(N5),seq:Nf.optional()}),FT=KY.extend({type:xn("transcript.reset")}),BT=VY.extend({type:xn("transcript.ops")});Ru("type",[FT,BT]);const $A=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"]),ZY=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"]),GY=new Set(["server_hello","ack","ping","resync_required","error","pong"]),QY=new Set(["assistant.delta","thinking.delta"]);function YY(e,t){if(GY.has(e))return{route:"ignore"};const n=e.startsWith("event."),i=n?e.slice(6):e;return QY.has(i)?JY(t)?{route:"agent",agentType:i}:{route:"protocol"}:n?ZY.has(i)?{route:"protocol"}:$A.has(i)?{route:"agent",agentType:i}:{route:"protocol"}:$A.has(i)?{route:"agent",agentType:i}:{route:"agent",agentType:i}}function JY(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 XY="kimi-code.bearer.",eJ=3e4;class tJ{constructor(t){this.opts=t,this.tracer=t.tracer??g5}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?[`${XY}${t}`]:void 0,i=new WebSocket(this.opts.wsUrl,n);this.ws=i,i.onopen=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"open"})},i.onmessage=s=>{this.lastActivityAt=Date.now();try{const o=JSON.parse(String(s.data));this.tracer.wsEvent?.({kind:"in",frame:o}),this.handleFrame(o)}catch(o){this.tracer.wsEvent?.({kind:"lifecycle",event:"parse-error",detail:{error:String(o)}}),this.opts.handlers.onError(0,`Failed to parse WS frame: ${String(o)}`,!1)}},i.onerror=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"error"}),this.opts.handlers.onError(0,"WebSocket error",!1)},i.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 i=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);i!==-1&&this.pendingSubscriptions.splice(i,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(i=>i.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,i){this.transcriptSubscriptions.set(t,{agentId:n,...i!==void 0?{sinceSeq:i}:{}}),this.connected&&this.sendTranscriptSubscribe(t,n,i)}unsubscribeTranscript(t,n){const i=this.transcriptSubscriptions.get(t);(n===void 0||i===void 0||n.includes(i.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 i=this.sideChannelAgents.get(t);if(i===void 0&&(i=new Set,this.sideChannelAgents.set(t,i)),i.has(n))return;i.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,i){const s=B0(t,n),o=this.terminalAttachments.get(s),r=i??o?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:r}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,r)}terminalInput(t,n,i){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:i}})}terminalResize(t,n,i,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:i,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(B0(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(B0(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,eJ),i=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:i}}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,i=t.type;if(i==="transcript.reset"){const s=FT.safeParse({type:i,...n.payload}),o=n.session_id;if(!s.success||typeof o!="string"){this.opts.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const r=s.data;this.opts.handlers.onTranscriptReset?.(o,r.agent_id,{...r.snapshot,hasMoreOlder:r.has_more_older},r.seq);const l=this.transcriptSubscriptions.get(o);l?.agentId===r.agent_id&&r.seq!==void 0&&(l.sinceSeq=r.seq);return}if(i==="transcript.ops"){const s=BT.safeParse({type:i,...n.payload}),o=n.session_id;if(!s.success||typeof o!="string"){this.opts.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const r=s.data,l=this.opts.handlers.onTranscriptOps?.(o,r.agent_id,r.ops,r.seq),a=this.transcriptSubscriptions.get(o);l!==!1&&a?.agentId===r.agent_id&&r.seq!==void 0&&(a.sinceSeq=r.seq);return}switch(i){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,o=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:o}),this.opts.handlers.onResync(s,n.payload.current_seq,o);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,o=n.terminal_id,r=n.seq,l=B0(s,o),a=this.terminalAttachments.get(l);a&&this.terminalAttachments.set(l,{...a,lastSeq:Math.max(a.lastSeq,r)});const u=typeof n.payload?.data=="string"?n.payload.data:"";this.opts.handlers.onTerminalOutput?.(s,o,u,r);break}case"terminal_exit":{const s=n.session_id,o=n.terminal_id,r=n.payload?.exit_code,l=typeof r=="number"?r:null;this.opts.handlers.onTerminalExit?.(s,o,l);break}default:{this.trackCursor(n);const s=n.type,o=YY(s,n.payload);if(o.route==="protocol"){this.opts.handlers.onWireEvent(n);break}if(o.route==="agent"){if(this.opts.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const r=n,l=n;this.opts.handlers.onRawAgentEvent({type:o.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,o]of this.subscriptions.entries())n[s]=o;const i=this.nextId();this.clientHelloId=i,this.send({type:"client_hello",id:i,payload:{client_id:this.opts.clientId,subscriptions:t,cursors:n,...this.opts.mainAgentOnly?{agent_filter:this.rawAgentFilter(t)}:{}}});for(const[s,o]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(s,o.agentId,o.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,i){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...i!==void 0?{transcript_since:{[n]:i}}:{}}})}sendTerminalAttach(t,n,i){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:i>0?i:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,i=t.seq;if(typeof n!="string"||typeof i!="number")return;const s=this.subscriptions.get(n);if(!s||i<=s.seq&&s.epoch!==void 0)return;const o=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(i,s.seq),epoch:o})}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 B0(e,t){return`${e}\0${t}`}async function nJ(e,t,n){const i=await e.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=HY.parse(i),o={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,...o,agents:s.agents,pendingInteractions:s.pending_interactions,...s.seq!==void 0?{seq:s.seq}:{}}}const Y9=10485760,iJ=40001;function sJ(e,t){if(e===void 0)return t;let n;const i=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(i!==void 0)try{n=decodeURIComponent(i.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 DA(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 J9(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 RA(e){return e==="auto_compact"||e==="manual_compact"}class oJ{constructor(t){this.opts=t,this.tracer=t.tracer??g5,this.http=new aA({origin:t.origin,identity:t.identity,tracer:this.tracer,credentialStore:t.credentialStore}),this.httpV2=new aA({origin:t.origin,identity:t.identity,tracer:this.tracer,credentialStore:t.credentialStore,restBasePath:"/api/v2"})}http;httpV2;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",webTitle:t.web_title??""}}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},i=await this.http.get("/sessions",n);return{items:i.items.map(Yr),hasMore:i.has_more}}async listSessionsV2(t){const n={sort:t?.sort,page_size:t?.pageSize,page_token:t?.pageToken,"meta.updated_after":t?.updatedAfter,"meta.archived":t?.archived===void 0?void 0:String(t.archived),include:t?.include,"workspace.id":t?.workspaceIds,"activity.status":t?.statuses},i=await this.httpV2.get("/sessions",n);return{items:i.items,hasMore:i.has_more,nextPageToken:i.next_page_token}}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 i=await this.http.post("/sessions",n);return Yr(i)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return Yr(n)}async updateSession(t,n){const i={};n.title!==void 0&&(i.title=n.title),n.cwd!==void 0&&(i.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&&(i.agent_config=s);const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,i);return Yr(o)}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 WE(n)}async getSessionPlans(t,n){const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript/plan`,{agent_id:n.agentId,tool_call_id:n.toolCallId});return i.plans.map(s=>({agentId:i.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(o=>({label:o.label,...o.description!==void 0?{description:o.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 Yr(n)}async listMessages(t,n){const i={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,i);return{items:s.items.map(t3),hasMore:s.has_more}}async getSessionSnapshot(t){const n=Date.now();this.tracer.traceKeyEvent?.("session:snapshot:start",{sessionId:t});try{const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:i.as_of_seq,epoch:i.epoch,session:Yr(i.session),messages:i.messages.items.map(t3),hasMoreMessages:i.messages.has_more,inFlightTurn:i.in_flight_turn===null?null:{turnId:i.in_flight_turn.turn_id,assistantText:i.in_flight_turn.assistant_text,thinkingText:i.in_flight_turn.thinking_text,runningTools:i.in_flight_turn.running_tools.map(o=>({toolCallId:o.tool_call_id,name:o.name,args:o.args,description:o.description,lastProgress:o.last_progress})),promptId:i.in_flight_turn.current_prompt_id},pendingApprovals:i.pending_approvals.map(jE),pendingQuestions:i.pending_questions.map(HE),subagents:(i.subagents??[]).map(o=>Ag(o,o.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(i){throw this.tracer.traceKeyEvent?.("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...DA(i)}),i}}async getSessionTranscript(t,n){return nJ(this.http,t,n)}async exportSession(t,n,i){const s=n===void 0?0:new TextEncoder().encode(n).byteLength,o=n===void 0||n.length===0?0:n.split(` +`).length,r=`/sessions/${encodeURIComponent(t)}/export`,l={web_log_bytes:s,web_log_entries:o},a=i?.desktop===!0;let u;try{u=await this.http.postZip(r,{web_log:n,...a?{desktop:!0}:{}},l)}catch(d){if(a&&Ps(d)&&d.code===iJ)u=await this.http.postZip(r,{web_log:n},l);else throw d}const c=`${t}.zip`;return{blob:u.blob,fileName:sJ(u.contentDisposition,c)}}async submitPrompt(t,n){const i=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`,JU(n));return this.tracer.traceKeyEvent?.("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-i}),{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()-i,...DA(s)}),s}}async steerPrompts(t,n){const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:i.steered,promptIds:i.prompt_ids}}async abortPrompt(t,n){const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:i.aborted,atSeq:i.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 generateSessionTitle(t,n){try{const i={};n?.force===!0&&(i.force=!0),n?.source!==void 0&&(i.source=n.source);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/title/generate`,i);return typeof s?.title=="string"&&s.title.length>0?s.title:null}catch{return null}}async forkSession(t,n){const i={};n?.title!==void 0&&(i.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,i,{timeoutMs:oA});return Yr(s)}async createChildSession(t,n){const i={};n?.title!==void 0&&(i.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,i,{timeoutMs:oA});return Yr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(Yr)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,i){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,XU(i));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,i){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,iK(i));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 i={status:n};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,i)).items.map(o=>Ag(o))}async getTask(t,n,i){const s={with_output:i?.withOutput,output_bytes:i?.outputBytes},o=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s);return Ag(o)}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(J9)}async createTerminal(t,n={}){const i={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,i);return J9(s)}async getTerminal(t,n){const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return J9(i)}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(i=>({name:i.name,description:i.description,source:i.source}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(i=>({name:i.name,description:i.description,source:i.source}))}async activateSkill(t,n,i,s){const o={};i!==void 0&&i.length>0&&(o.args=i),s!==void 0&&s.length>0&&(o.attachments=s.map(PE));const r=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o);return{activated:r.activated,skillName:r.skill_name}}async listCapabilities(){return(await this.http.get("/capabilities")).capabilities??[]}async getCapability(t){return this.http.get(`/capabilities/${encodeURIComponent(t)}`)}async installCapability(t){return this.http.post(`/capabilities/${encodeURIComponent(t)}:install`,{})}async listPlugins(){return(await this.http.get("/plugins")).plugins??[]}async listPluginMarketplace(){return(await this.http.get("/plugins/marketplace")).entries??[]}async installPlugin(t){return this.http.post("/plugins",{source:t})}async setPluginEnabled(t,n){return this.http.post(`/plugins/${encodeURIComponent(t)}:${n?"enable":"disable"}`,{})}async removePlugin(t){return this.http.post(`/plugins/${encodeURIComponent(t)}:remove`,{})}async listDirectory(t,n){const i={};n.path!==void 0&&(i.path=n.path),n.depth!==void 0&&(i.depth=n.depth),n.includeGitStatus!==void 0&&(i.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,i),o=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([r,l])=>[r,l.map(cA)])):void 0;return{items:s.items.map(cA),childrenByPath:o,truncated:s.truncated}}async readFile(t,n){const i={path:n.path};n.offset!==void 0&&(i.offset=n.offset),n.length!==void 0&&(i.length=n.length);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,i);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 i={workspace:t,query:n.query};n.limit!==void 0&&(i.limit=n.limit);const s=await this.http.post("/workspace/fs:search",i);return{items:s.items.map(o=>({path:o.path,name:o.name,kind:o.kind,score:o.score,matchPositions:o.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const i={pattern:n.pattern};n.regex!==void 0&&(i.regex=n.regex),n.caseSensitive!==void 0&&(i.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,i);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const i={};n!==void 0&&(i.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,i);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 i=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:i.path,diff:i.diff,truncated:i.truncated??!1}}getFileDownloadUrl(t,n){const i=n.split("/").map(s=>encodeURIComponent(s)).join("/");return Vd(this.opts.origin,`/sessions/${encodeURIComponent(t)}/fs/${i}:download`)}async openFile(t,n){const i={path:n.path};return n.line!==void 0&&(i.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,i)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async openInApp(t,n,i,s){const o={app_id:n,path:i};s!==void 0&&(o.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,o)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(c1)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const i=await this.http.post("/workspaces",n);return c1(i)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const i=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return c1(i)}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(i=>({name:i.name,path:i.path,isDir:i.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(oK)}async listProviders(){return(await this.http.get("/providers")).items.map(Ed)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),i=Ed(n);return n.api_key!==void 0?{...i,apiKey:n.api_key}:i}async addProvider(t){const n={id:t.id??"",type:t.type,models:(t.models??[]).map(s=>{const o={model:s.model,max_context_size:s.maxContextSize};return s.displayName!==void 0&&(o.display_name=s.displayName),s.capabilities!==void 0&&(o.capabilities=s.capabilities),s.maxOutputSize!==void 0&&(o.max_output_size=s.maxOutputSize),s.supportEfforts!==void 0&&(o.support_efforts=s.supportEfforts),s.adaptiveThinking!==void 0&&(o.adaptive_thinking=s.adaptiveThinking),o})};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 i=await this.http.post("/providers",n);return Ed(i)}async updateProvider(t,n){const i={type:n.type,models:(n.models??[]).map(o=>{const r={model:o.model,max_context_size:o.maxContextSize};return o.displayName!==void 0&&(r.display_name=o.displayName),o.capabilities!==void 0&&(r.capabilities=o.capabilities),o.maxOutputSize!==void 0&&(r.max_output_size=o.maxOutputSize),o.supportEfforts!==void 0&&(r.support_efforts=o.supportEfforts),o.adaptiveThinking!==void 0&&(r.adaptive_thinking=o.adaptiveThinking),r})};n.newId!==void 0&&(i.new_id=n.newId),n.apiKey!==void 0&&(i.api_key=n.apiKey),n.baseUrl!==void 0&&(i.base_url=n.baseUrl),n.defaultModel!==void 0&&(i.default_model=n.defaultModel);const s=await this.http.put(`/providers/${encodeURIComponent(t)}`,i);return{provider:Ed(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(dA)}async getCatalogProvider(t){const n=await this.http.get(`/catalog/providers/${encodeURIComponent(t)}`);return dA(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 i=await this.http.post("/providers:import_catalog",n);return{provider:Ed(i.provider),modelsImported:i.models_imported}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const i=await this.http.post("/providers:import_registry",n);return{providers:i.providers.map(Ed),modelsImported:i.models_imported}}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return X9(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return X9(t)}async refreshOAuthProviderModels(){const t=await this.http.post("/providers:refresh_oauth");return X9(t)}async getConfig(){const t=await this.http.get("/config");return n3(t)}async setConfig(t){const n={},i={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[o,r]of Object.entries(t)){const l=i[o];l!==void 0&&(n[l]=r)}const s=await this.http.post("/config",n);return n3(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=i=>({name:i.name,window:i.window,used:i.used,limit:i.limit,resetAt:i.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 i=await this.http.postForm("/files",n);return{id:i.id,name:i.name,mediaType:i.media_type,size:i.size}}getFileUrl(t){return Vd(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:Y9});if(n.size>Y9)throw new m5({size:n.size,limit:Y9});const i=n.type,s=!rJ(i),o=i||(s?"application/octet-stream":"text/plain");if(s){const l=await lJ(n);return{path:t,content:l,encoding:"base64",mime:o,isBinary:!0,size:n.size}}const r=await n.text();return{path:t,content:r,encoding:"utf-8",mime:o,isBinary:!1,size:n.size}}connectEvents(t){const n=jU(this.opts.origin,this.opts.identity.clientId),i=this.opts.projectorFactory(),s=new tJ({wsUrl:n,clientId:this.opts.identity.clientId,tracer:this.tracer,credentialStore:this.opts.credentialStore,mainAgentOnly:this.opts.mainAgentOnly,handlers:{onWireEvent:o=>{const r=rK(o),l=lK(o),a=sK(o);a.type==="historyCompacted"&&!RA(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:r,seq:l})},onRawAgentEvent:o=>{const{type:r,seq:l,session_id:a,payload:u,offset:c}=o,d=i.project(r,u,a,{offset:c});for(const f of d){const p=u?.turnId,g=f.type==="assistantDelta"&&typeof p=="number"&&typeof c=="number"&&(r==="assistant.delta"||r==="thinking.delta")?{turnId:p,offset:c,kind:r==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!RA(f.reason)&&t.onResync(a,l),t.onEvent(f,{sessionId:a,seq:l,stream:g})}},onResync:(o,r,l)=>{i.reset(o),t.onResync(o,r,l)},onConnectionState:o=>{t.onConnectionChange(o)},onReplayComplete:()=>{t.onReplayComplete?.()},onError:(o,r,l)=>{t.onError(o,r,l)},onTerminalOutput:(o,r,l,a)=>{t.onTerminalOutput?.(o,r,l,a)},onTerminalExit:(o,r,l)=>{t.onTerminalExit?.(o,r,l)},onTranscriptReset:(o,r,l,a)=>{t.onTranscriptReset?.(o,r,l,a)},onTranscriptOps:(o,r,l,a)=>t.onTranscriptOps?.(o,r,l,a)??!0}});return s.connect(),{subscribe(o,r){s.subscribe(o,r??{seq:0})},unsubscribe(o){s.unsubscribe(o)},subscribeTranscript(o,r,l){s.subscribeTranscript(o,r,l)},unsubscribeTranscript(o,r){s.unsubscribeTranscript(o,r)},seedSnapshot(o,r){if(r.inFlightTurn===null){i.reset(o);return}const l=i.seedInFlight(o,r.inFlightTurn);for(const a of l)t.onEvent(a,{sessionId:o,seq:r.asOfSeq})},bindNextPromptId(o,r){i.bindNextPromptId(o,r)},abort(o,r){s.abort(o,r)},terminalAttach(o,r,l){s.terminalAttach(o,r,l)},terminalInput(o,r,l){s.terminalInput(o,r,l)},terminalResize(o,r,l,a){s.terminalResize(o,r,l,a)},terminalDetach(o,r){s.terminalDetach(o,r)},terminalClose(o,r){s.terminalClose(o,r)},markSideChannelAgent(o,r){s.markSideChannelAgent(o,r),i.markSideChannelAgent(r)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function X9(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 rJ(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 lJ(e){return new Promise((t,n)=>{const i=new FileReader;i.onload=()=>{const s=String(i.result);t(s.slice(s.indexOf(",")+1))},i.onerror=()=>n(i.error),i.readAsDataURL(e)})}function aJ(){return window.kimiDesktop}function $T(e,t,n){const i=n.length===0?void 0:n.length===1?n[0]:n;try{aJ()?.log?.(e,t,i)}catch{}}function Dl(e,...t){console.warn(e,...t),$T("warn",e,t)}function ga(e,...t){console.error(e,...t),$T("error",e,t)}const uJ={multiedit:"multi_edit",multiedits:"multi_edit",shell:"bash",run:"bash",exec:"bash",ripgrep:"grep",rg:"grep",find:"glob",fetch:"web_fetch",webfetch:"web_fetch",url_fetch:"web_fetch",urlfetch:"web_fetch",list:"ls",listdir:"ls",list_dir:"ls",todowrite:"todo",todo_write:"todo",todoread:"todo",todolist:"todo",todo_list:"todo",agent:"task",subagent:"task",websearch:"search",web_search:"search",create_goal:"creategoal",get_goal:"getgoal",set_goal_budget:"setgoalbudget",update_goal:"updategoal"};function ao(e){const t=(e??"").trim().toLowerCase().replace(/[\s-]+/g,"_");return uJ[t]??t}const cJ={read:"tools.label.read",bash:"tools.label.bash",edit:"tools.label.edit",multi_edit:"tools.label.edit",write:"tools.label.write",grep:"tools.label.grep",glob:"tools.label.glob",ls:"tools.label.ls",web_fetch:"tools.label.web_fetch",search:"tools.label.search",todo:"tools.label.todo",task:"tools.label.task",agentswarm:"tools.label.swarm",askuserquestion:"tools.label.ask_user",exitplanmode:"tools.label.plan",creategoal:"tools.label.goal_create",getgoal:"tools.label.goal_get",setgoalbudget:"tools.label.goal_budget",updategoal:"tools.label.goal_update"};function DT(e,t){const n=cJ[ao(t)];return n?e(n):t}const RT=80;function dJ(e,t=RT){const n=e.trim();return n.length>t?n.slice(0,t-1)+"…":n}function fJ(e,t){const n=e.trim();return!!(n===""||n==="{}"||n==="[]"||n==="null"||t&&Object.keys(t).length===0)}function hJ(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function Rn(e){return typeof e=="string"&&e.length>0?e:void 0}function Ya(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function pJ(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean)[0];return n?`${t.host}/${n}`:t.host}catch{return e.replace(/^https?:\/\//,"")}}function ey(e){return Rn(e.path)??Rn(e.file_path)??Rn(e.filePath)??Rn(e.filename)}const gJ={active:"status.goalStatusActive",blocked:"status.goalStatusBlocked",complete:"status.goalStatusComplete"};function mJ(e,t){const n=Rn(t);if(!n)return;const i=gJ[n];return i?e(i):n}function vJ(e,t){const n=Ya(t.value),i=Rn(t.unit);if(!(n===void 0||!i))switch(i){case"turns":return e("tools.goal.turns",{value:n});case"tokens":return e("tools.goal.tokens",{value:n});case"milliseconds":return e("tools.goal.milliseconds",{value:n});case"seconds":return e("tools.goal.seconds",{value:n});case"minutes":return e("tools.goal.minutes",{value:n});case"hours":return e("tools.goal.hours",{value:n});default:return e("tools.goal.budget",{value:n,unit:i})}}function F5(e,t,n,i=!1){const s=(o,r=RT)=>i?o.trim():dJ(o,r);try{const o=hJ(n);if(!i&&fJ(n,o))return"";const r=()=>s(n.replace(/^·\s*/,""));if(!o)return r();switch(ao(t)){case"read":{const l=ey(o);if(!l)return r();const a=Ya(o.offset)??Ya(o.line_start)??Ya(o.start_line),u=Ya(o.limit)??Ya(o.length),c=Ya(o.line_end)??Ya(o.end_line)??(a!==void 0&&u!==void 0?a+u:void 0);return s(a!==void 0&&c!==void 0?`${l}:${a}-${c}`:a!==void 0?`${l}:${a}`:l)}case"write":{const l=ey(o);return l?s(`${l} ${e("tools.chip.created")}`):r()}case"edit":case"multi_edit":{const l=ey(o);return l?s(l):r()}case"bash":{const l=Rn(o.command)??Rn(o.cmd)??Rn(o.script);return l?l.trim():r()}case"grep":case"search":{const l=Rn(o.pattern)??Rn(o.query)??Rn(o.regex),a=Rn(o.path)??Rn(o.glob)??Rn(o.include);return l&&a?s(e("tools.summary.inScope",{value:l,scope:a})):l?s(l):r()}case"glob":{const l=Rn(o.pattern)??Rn(o.glob)??Rn(o.query),a=Rn(o.path)??Rn(o.cwd);return l&&a?s(e("tools.summary.inScope",{value:l,scope:a})):l?s(l):Rn(o.path)?s(Rn(o.path)):r()}case"ls":{const l=Rn(o.path)??Rn(o.dir)??Rn(o.directory)??Rn(o.cwd);return l?s(l):r()}case"web_fetch":{const l=Rn(o.url)??Rn(o.uri);return l?s(pJ(l)):r()}case"todo":case"task":{const l=Rn(o.description)??Rn(o.title)??Rn(o.prompt)??Rn(o.name)??Rn(o.subagent_type);if(l)return s(l);const a=Array.isArray(o.todos)?o.todos:Array.isArray(o.items)?o.items:void 0;return a?s(e("tools.chip.todos",{count:a.length})):r()}case"creategoal":{if(i)return r();const l=Rn(o.objective),a=Rn(o.completionCriterion);return l&&a?s(e("tools.goal.objectiveWithCriterion",{objective:l,criterion:a})):l?s(l):r()}case"getgoal":return i?r():"";case"setgoalbudget":{if(i)return r();const l=vJ(e,o);return l?s(l):r()}case"updategoal":{if(i)return r();const l=mJ(e,o.status);return l?s(e("tools.goal.status",{status:l})):r()}default:return r()}}catch{return n}}function yJ(e,t){try{switch(ao(t.name)){case"bash":return t.timing?t.timing:"";case"read":{if(t.output&&t.output.length>0){const n=t.output.length;return e("tools.chip.lines",{count:n})}return""}case"edit":case"multi_edit":case"write":{if(t.output){for(const i of t.output){const s=i.match(/\+(\d+).*[-−](\d+)/);if(s)return`+${s[1]} −${s[2]}`}const n=t.output.find(i=>/\d+/.test(i));if(n){const i=n.match(/\+(\d+)/),s=n.match(/[-−](\d+)/);if(i||s)return`${i?`+${i[1]}`:""} ${s?`−${s[1]}`:""}`.trim()}if(t.status!=="error")return e("tools.chip.edited")}return""}case"grep":case"search":return t.output&&t.output.length>0?e("tools.chip.results",{count:t.output.length}):"";default:return""}}catch{return""}}const bJ="main",kJ=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.use","tool.call.started","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.completed","prompt.aborted","error"]);function Fl(e="msg_"){const t=Date.now().toString(36).padStart(10,"0"),n=Math.random().toString(36).slice(2,12).padEnd(10,"0");return`${e}${t}${n}`}function AJ(e){if(!e||typeof e!="object")return{input:0,output:0,cacheRead:0,cacheCreate:0};const t=e;return{input:t.inputOther??t.input_tokens??0,output:t.output??t.output_tokens??0,cacheRead:t.inputCacheRead??t.cache_read_input_tokens??0,cacheCreate:t.inputCacheCreation??t.cache_creation_input_tokens??0}}function zA(){return{turnPromptId:new Map,currentPromptId:void 0,currentAssistantMsgId:void 0,turnTextLen:0,turnThinkLen:0,toolStartTimes:new Map,totalInput:0,totalOutput:0,totalCacheRead:0,totalCacheCreate:0,contextTokens:0,contextLimit:0,turnCount:0,model:"",messages:[],subagentMeta:new Map,retryReuseMsgId:void 0,retryActive:!1}}function zi(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Os(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Nr(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function CJ(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,i=n&&typeof n=="object"?n:{},s=zi(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const o=zi(t,"goalId")??zi(t,"goal_id")??"goal",r=zi(t,"objective")??"";return{goalId:o,objective:r,completionCriterion:zi(t,"completionCriterion")??zi(t,"completion_criterion"),status:s,turnsUsed:Os(t,"turnsUsed")??Os(t,"turns_used")??0,tokensUsed:Os(t,"tokensUsed")??Os(t,"tokens_used")??0,wallClockMs:Os(t,"wallClockMs")??Os(t,"wall_clock_ms")??0,terminalReason:zi(t,"terminalReason")??zi(t,"terminal_reason"),budget:{tokenBudget:Nr(i,"tokenBudget")??Nr(i,"token_budget"),remainingTokens:Nr(i,"remainingTokens")??Nr(i,"remaining_tokens"),turnBudget:Nr(i,"turnBudget")??Nr(i,"turn_budget"),remainingTurns:Nr(i,"remainingTurns")??Nr(i,"remaining_turns"),wallClockBudgetMs:Nr(i,"wallClockBudgetMs")??Nr(i,"wall_clock_budget_ms"),remainingWallClockMs:Nr(i,"remainingWallClockMs")??Nr(i,"remaining_wall_clock_ms"),overBudget:i.overBudget===!0||i.over_budget===!0}}}function Cc(e,t,n,i,s){if(typeof i!="string"||i.length===0)return null;const r={...t.subagentMeta.get(i)??{id:i,agentId:i,sessionId:n,kind:"subagent",description:e("tasks.dockSubagent"),status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},...s,id:i,sessionId:n,kind:"subagent"};return t.subagentMeta.set(i,r),r}function wJ(e,t,n){if(t==="turn.step.started")return null;if(t==="tool.use"||t==="tool.call.started"){const i=zi(n,"name")??zi(n,"toolName")??"tool",s=DT(e,xJ(i)),o=_J(e,i,n.args??n.input);return o?`Calling ${s}: ${o}`:`Calling ${s}`}if(t==="tool.progress"){const i=n.update;if(i&&typeof i=="object"){const o=zi(i,"text");if(o)return ty(o);const r=zi(i,"message");if(r)return ty(r)}const s=zi(n,"message");if(s)return ty(s)}return null}function xJ(e){return e.replace(/_\d+$/,"")}const OA=2e3;function ty(e){return e.length>OA?`${e.slice(0,OA)}…`:e}function _J(e,t,n){if(n==null)return"";const i=typeof n=="string"?n:JSON.stringify(n);return F5(e,t,i)}function SJ(e,t,n,i,s,o,r){if(r.has(i)&&s==="turn.step.started")return[];if(s==="assistant.delta"){const d=zi(o,"delta");if(!d)return[];const f=t.subagentMeta.get(i),p=Cc(e,t,n,i,{status:"running",subagentPhase:"working",startedAt:f?.startedAt??new Date().toISOString()}),g=[];return p&&g.push({type:"taskCreated",sessionId:n,task:p}),g.push({type:"taskProgress",sessionId:n,taskId:i,outputChunk:d,stream:"stdout",kind:"text"}),g}const l=wJ(e,s,o);if(l===null||l.length===0)return[];const a=t.subagentMeta.get(i),u=Cc(e,t,n,i,{status:"running",subagentPhase:"working",startedAt:a?.startedAt??new Date().toISOString()}),c=[];return u&&c.push({type:"taskCreated",sessionId:n,task:u}),c.push({type:"taskProgress",sessionId:n,taskId:i,outputChunk:l,stream:"stdout"}),c}function rc(e){return{...e,content:e.content.map(t=>({...t}))}}function PA(e,t,n){const i={id:Fl("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(i),i}function MJ(e,t,n,i,s,o){const r={id:i,sessionId:t,role:"user",content:s,createdAt:o,promptId:n};return e.messages.push(r),r}function jA(e){return Array.isArray(e)?e.map(t=>v5(t)):[]}function HA(e,t,n,i){const s=e.messages.find(r=>r.id===t);if(!s)return-1;const o=s.content.at(-1);return o&&o.type===n?(n==="text"?o.text+=i:o.thinking+=i,s.content.length-1):(s.content.push(n==="text"?{type:"text",text:i}:{type:"thinking",thinking:i}),s.content.length-1)}function IJ(e,t,n,i,s,o){const r=e.messages.find(l=>l.id===t);r&&r.content.push({type:"toolUse",toolCallId:n,toolName:i,input:s,outputLines:o})}function EJ(e){const t=e.update,n=t&&typeof t=="object"?t:null,s=(n?.stream??n?.kind??e.stream)==="stderr"?"stderr":"stdout",o=typeof n?.text=="string"&&n.text||typeof n?.message=="string"&&n.message||typeof e.chunk=="string"&&e.chunk||typeof e.output=="string"&&e.output||typeof e.message=="string"&&e.message||"";return o.length>0?{outputChunk:o,stream:s}:null}function WA(e,t){e.messages.find(n=>n.id===t)}function TJ(e,t,n,i,s,o){const r={id:Fl("msg_"),sessionId:t,role:"tool",content:[{type:"toolResult",toolCallId:n,output:i,isError:s}],createdAt:new Date().toISOString(),promptId:o};return e.messages.push(r),r}function xh(e,t){return e.messages.find(n=>n.id===t)}function qA(e){return{inputTokens:e.totalInput,outputTokens:e.totalOutput,cacheReadTokens:e.totalCacheRead,cacheCreationTokens:e.totalCacheCreate,totalCostUsd:0,contextTokens:e.contextTokens,contextLimit:e.contextLimit,turnCount:e.turnCount}}function LJ(e){const{t}=e,n=new Map,i=new Set;function s(f){let p=n.get(f);return p||(p=zA(),n.set(f,p)),p}function o(f){n.set(f,zA())}function r(f){i.add(f)}function l(f,p){const g=s(f);g.currentPromptId=p}function a(f,p){o(f);const g=s(f),m=p.promptId??Fl("pr_");g.currentPromptId=m,g.turnPromptId.set(p.turnId,m);const y=PA(g,f,m);p.thinkingText.length>0&&y.content.push({type:"thinking",thinking:p.thinkingText}),p.assistantText.length>0&&y.content.push({type:"text",text:p.assistantText});for(const w of p.runningTools){const k=typeof w.lastProgress?.text=="string"&&w.lastProgress.text.length>0?[w.lastProgress.text]:void 0;y.content.push({type:"toolUse",toolCallId:w.toolCallId,toolName:w.name,input:w.args??{},outputLines:k}),g.toolStartTimes.set(w.toolCallId,Date.now())}return g.currentAssistantMsgId=y.id,g.turnTextLen=p.assistantText.length,g.turnThinkLen=p.thinkingText.length,[{type:"messageCreated",message:rc(y)}]}function u(f,p,g,m){try{return d(f,p,g,m)}catch(y){return ga("[agentProjector] Error projecting event:",f,y instanceof Error?y.message:y),[]}}function c(f,p){return p===void 0?"append":p<f?"skip":p>f?"gap":"append"}function d(f,p,g,m){const y=s(g),w=p,k=[],A=w?.agentId;if(typeof A=="string"&&A!==bJ){const v=i.has(A);if(f==="prompt.submitted"){if(!v)return[];const x=w?.promptId,E=w?.userMessageId;if(!x||!E)return[];const S=jA(w?.content);return S.length===0?[]:[{type:"messageCreated",agentId:A,message:{id:E,sessionId:g,role:"user",content:S,createdAt:typeof w?.createdAt=="string"?w.createdAt:new Date().toISOString(),promptId:x}}]}if(v&&(f==="thinking.delta"||f==="assistant.delta")){const x=w?.delta??"";return x?[{type:"agentDelta",sessionId:g,agentId:A,delta:{[f==="thinking.delta"?"thinking":"text"]:x}}]:[]}if(v&&f==="turn.ended")return[{type:"agentTurnEnded",sessionId:g,agentId:A,reason:w?.reason}];if(kJ.has(f))return SJ(t,y,g,A,f,w??{},i)}switch(f){case"session.meta.updated":{const v=w?.patch?.title??w?.title,x=w?.patch?.lastPrompt,E={};typeof v=="string"&&v.length>0&&(E.title=v),typeof x=="string"&&(E.lastPrompt=x),(E.title!==void 0||E.lastPrompt!==void 0)&&k.push({type:"sessionMetaUpdated",sessionId:g,...E});break}case"prompt.submitted":{const v=w?.promptId,x=w?.userMessageId;if(!v||!x)break;const E=jA(w?.content);if(E.length===0)break;y.currentPromptId=v;const S=MJ(y,g,v,x,E,typeof w?.createdAt=="string"?w.createdAt:new Date().toISOString());k.push({type:"messageCreated",message:rc(S),...typeof A=="string"?{agentId:A}:{}});break}case"turn.started":{const v=w?.turnId,x=y.currentPromptId??Fl("pr_");y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x),y.turnTextLen=0,y.turnThinkLen=0;const E=w?.origin;if(E&&typeof E=="object"&&E.kind==="system_trigger"&&E.name==="goal_continuation"){const S={id:v!==void 0?`goal_cont_${v}`:Fl("goal_"),sessionId:g,role:"user",content:[{type:"text",text:zi(w??{},"prompt")??""}],createdAt:new Date().toISOString(),metadata:{origin:E}};y.messages.push(S),k.push({type:"turnActiveChanged",sessionId:g,active:!0}),k.push({type:"messageCreated",message:rc(S)});break}k.push({type:"turnActiveChanged",sessionId:g,active:!0});break}case"turn.step.started":{const v=w?.turnId;y.retryActive&&(y.retryActive=!1,k.push({type:"turnRetry",sessionId:g,retry:void 0}));let x=y.turnPromptId.get(v)??y.currentPromptId;if(x||(x=Fl("pr_"),y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x)),y.turnTextLen=0,y.turnThinkLen=0,y.retryReuseMsgId!==void 0){const S=y.retryReuseMsgId;if(y.retryReuseMsgId=void 0,xh(y,S)!==void 0){y.currentAssistantMsgId=S;break}}const E=PA(y,g,x);y.currentAssistantMsgId=E.id,k.push({type:"messageCreated",message:rc(E)});break}case"thinking.delta":{const v=y.currentAssistantMsgId;if(!v)break;const x=w?.delta??"";if(!x)break;m?.offset===0&&y.turnThinkLen>0&&(y.turnThinkLen=0);const E=c(y.turnThinkLen,m?.offset);if(E==="skip")break;if(E==="gap"){k.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"delta_gap"});break}const S=HA(y,v,"thinking",x);if(S<0)break;y.turnThinkLen+=x.length,k.push({type:"assistantDelta",sessionId:g,messageId:v,contentIndex:S,delta:{thinking:x}});break}case"assistant.delta":{const v=y.currentAssistantMsgId;if(!v)break;const x=w?.delta??"";if(!x)break;m?.offset===0&&y.turnTextLen>0&&(y.turnTextLen=0);const E=c(y.turnTextLen,m?.offset);if(E==="skip")break;if(E==="gap"){k.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"delta_gap"});break}const S=HA(y,v,"text",x);if(S<0)break;y.turnTextLen+=x.length,k.push({type:"assistantDelta",sessionId:g,messageId:v,contentIndex:S,delta:{text:x}});break}case"tool.use":case"tool.call.started":{const v=y.currentAssistantMsgId,x=w?.turnId,E=y.turnPromptId.get(x)??y.currentPromptId;if(!v||!E)break;const S=w?.toolCallId,M=w?.name??w?.toolName??"",_=w?.args??w?.input??{};IJ(y,v,S,M,_);const N=xh(y,v);N&&N.content.length-1,y.toolStartTimes.set(S,Date.now()),N&&k.push({type:"messageUpdated",sessionId:g,messageId:v,content:N.content.map(D=>({...D})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const v=w?.toolCallId,x=EJ(w??{});v&&x&&k.push({type:"toolOutput",sessionId:g,toolCallId:v,outputChunk:x.outputChunk,stream:x.stream});break}case"tool.result":{const v=w?.turnId;let x=y.turnPromptId.get(v)??y.currentPromptId;x||(x=Fl("pr_"),y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x));const E=w?.toolCallId,S=w?.output,M=w?.isError??!1;y.toolStartTimes.get(E)??Date.now(),y.toolStartTimes.delete(E);const _=TJ(y,g,E,S,M,x);k.push({type:"messageCreated",message:rc(_)}),y.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const v=y.currentAssistantMsgId,x=AJ(w?.usage);if(y.totalInput+=x.input,y.totalOutput+=x.output,y.totalCacheRead+=x.cacheRead,y.totalCacheCreate+=x.cacheCreate,v){WA(y,v);const E=xh(y,v);E&&k.push({type:"messageUpdated",sessionId:g,messageId:v,content:E.content.map(S=>({...S})),status:"completed"})}break}case"agent.status.updated":{w?.model&&(y.model=w.model),w?.contextTokens!==void 0&&(y.contextTokens=w.contextTokens),w?.maxContextTokens!==void 0&&(y.contextLimit=w.maxContextTokens);const v=w?.phase;v!=null&&v.kind==="retrying"?(y.retryActive=!0,k.push({type:"turnRetry",sessionId:g,retry:{failedAttempt:Os(v,"failedAttempt")??0,nextAttempt:Os(v,"nextAttempt")??0,maxAttempts:Os(v,"maxAttempts")??0,delayMs:Os(v,"delayMs")??0,errorName:zi(v,"errorName"),statusCode:Os(v,"statusCode"),turnId:Os(v,"turnId")}})):y.retryActive&&v!==void 0&&v!==null&&typeof v.kind=="string"&&(y.retryActive=!1,k.push({type:"turnRetry",sessionId:g,retry:void 0})),k.push({type:"sessionUsageUpdated",sessionId:g,usage:qA(y),model:y.model||void 0,swarmMode:w?.swarmMode===!0?!0:w?.swarmMode===!1?!1:void 0,planMode:w?.planMode===!0?!0:w?.planMode===!1?!1:void 0,thinking:typeof w?.thinkingEffort=="string"&&w.thinkingEffort.length>0?w.thinkingEffort:void 0});break}case"turn.ended":{const v=y.currentAssistantMsgId,x=w?.reason??"completed",E=Os(w??{},"durationMs"),S=w?.turnId,M=(S!==void 0?y.turnPromptId.get(S):void 0)??y.currentPromptId;if(k.push({type:"turnActiveChanged",sessionId:g,active:!1,reason:w?.reason,promptId:M}),v){WA(y,v);const N=xh(y,v);N&&k.push({type:"messageUpdated",sessionId:g,messageId:v,content:N.content.map(D=>({...D})),status:x==="failed"||x==="blocked"?"error":"completed",durationMs:E})}y.turnCount++;const _=qA(y);k.push({type:"sessionUsageUpdated",sessionId:g,usage:_}),y.currentAssistantMsgId=void 0,y.currentPromptId=void 0,y.turnTextLen=0,y.turnThinkLen=0,y.retryReuseMsgId=void 0;break}case"prompt.completed":{const v=w?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptCompleted",sessionId:g,promptId:v,reason:w?.reason??"completed"});break}case"prompt.aborted":{const v=w?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptAborted",sessionId:g,promptId:v});break}case"turn.step.retrying":{y.retryActive=!0,k.push({type:"turnRetry",sessionId:g,retry:{failedAttempt:Os(w??{},"failedAttempt")??0,nextAttempt:Os(w??{},"nextAttempt")??0,maxAttempts:Os(w??{},"maxAttempts")??0,delayMs:Os(w??{},"delayMs")??0,errorName:zi(w??{},"errorName"),statusCode:Os(w??{},"statusCode"),turnId:typeof w?.turnId=="number"?w.turnId:void 0}});const v=y.currentAssistantMsgId;if(v!==void 0){const x=xh(y,v);x!==void 0&&(x.content=x.content.filter(E=>E.type!=="text"&&E.type!=="thinking"&&E.type!=="toolUse"),k.push({type:"messageUpdated",sessionId:g,messageId:v,content:x.content.map(E=>({...E})),status:"pending"}),y.retryReuseMsgId=v)}y.turnTextLen=0,y.turnThinkLen=0,y.toolStartTimes.clear();break}case"turn.step.interrupted":{y.currentAssistantMsgId=void 0,y.retryReuseMsgId=void 0;break}case"subagent.spawned":{const v=typeof w?.subagentId=="string"&&w.subagentId.length>0?w.subagentId:Fl("task_"),x={id:v,agentId:v,sessionId:g,kind:"subagent",description:typeof w?.description=="string"?w.description:w?.subagentName??t("tasks.dockSubagent"),status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued",subagentType:typeof w?.subagentName=="string"?w.subagentName:void 0,model:typeof w?.model=="string"&&w.model.length>0?w.model:void 0,thinkingEffort:typeof w?.thinkingEffort=="string"&&w.thinkingEffort.length>0?w.thinkingEffort:void 0,parentToolCallId:typeof w?.parentToolCallId=="string"?w.parentToolCallId:void 0,swarmIndex:typeof w?.swarmIndex=="number"?w.swarmIndex:void 0,runInBackground:w?.runInBackground===!0};y.subagentMeta.set(x.id,x),k.push({type:"taskCreated",sessionId:g,task:x});break}case"subagent.started":{const v=Cc(t,y,g,w?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString()});v&&k.push({type:"taskCreated",sessionId:g,task:v});break}case"subagent.suspended":{const v=Cc(t,y,g,w?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof w?.reason=="string"?w.reason:void 0});v&&k.push({type:"taskCreated",sessionId:g,task:v});break}case"subagent.completed":{const v=typeof w?.resultSummary=="string"?w.resultSummary:void 0,x=Cc(t,y,g,w?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:v});x&&k.push({type:"taskCreated",sessionId:g,task:x}),k.push({type:"taskCompleted",sessionId:g,taskId:w?.subagentId??"",status:"completed",outputPreview:v});break}case"subagent.failed":{const v=typeof w?.error=="string"?w.error:void 0,x=Cc(t,y,g,w?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:v});x&&k.push({type:"taskCreated",sessionId:g,task:x}),k.push({type:"taskCompleted",sessionId:g,taskId:w?.subagentId??"",status:"failed",outputPreview:v});break}case"error":{k.push({type:"unknown",raw:{_agentError:!0,code:w?.code,message:w?.message,name:w?.name,details:w?.details,retryable:w?.retryable}});break}case"task.notified":{const v=zi(w??{},"notificationType"),x=zi(w??{},"sourceKind"),E=zi(w??{},"sourceId");if(!v||!x||!E)break;const S=v.startsWith("task.")?v.slice(5):v,M=`task:${E}:${S}`,_=O=>O.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">"),N=zi(w??{},"title")??"",D=zi(w??{},"severity")??"",T=zi(w??{},"body")??"",$=`<notification id="${M}" category="task" type="${_(v)}" source_kind="${_(x)}" source_id="${_(E)}"> +`+(N!==""?`Title: ${_(N)} +`:"")+(D!==""?`Severity: ${_(D)} +`:"")+(T!==""?`${_(T)} +`:"")+"</notification>",P={id:`task_ntf_${M}`,sessionId:g,role:"user",content:[{type:"text",text:$}],createdAt:new Date().toISOString(),metadata:{origin:{kind:"task",taskId:E,status:S,notificationId:M}}};y.messages.push(P),k.push({type:"messageCreated",message:rc(P)});break}case"warning":{k.push({type:"unknown",raw:{_agentWarning:!0,message:w?.message}});break}case"task.started":case"background.task.started":{const v=w?.info??{},x=typeof v.startedAt=="number"?new Date(v.startedAt).toISOString():void 0,E=typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):Fl("task_"),S=typeof v.description=="string"?v.description:typeof v.command=="string"?v.command:t("tasks.defaultDescription");if(v.kind==="agent"){const _=typeof v.agentId=="string"&&v.agentId.length>0?v.agentId:void 0;if(_!==void 0){const N=Cc(t,y,g,_,{description:S,backgroundTaskId:E,runInBackground:!0});N&&k.push({type:"taskCreated",sessionId:g,task:N})}else k.push({type:"taskCreated",sessionId:g,task:{id:E,sessionId:g,kind:"subagent",description:S,status:"running",createdAt:x??new Date().toISOString(),startedAt:x,subagentPhase:"queued",runInBackground:!0}});break}const M=typeof v.command=="string"?v.command:void 0;k.push({type:"taskCreated",sessionId:g,task:{id:E,sessionId:g,kind:"bash",description:S,command:M,status:"running",createdAt:x??new Date().toISOString(),startedAt:x,outputPreview:M!==void 0?`$ ${M}`:void 0}});break}case"task.terminated":case"background.task.terminated":{const v=w?.info??{},x=v.status==="failed"||typeof v.exitCode=="number"&&v.exitCode!==0;k.push({type:"taskCompleted",sessionId:g,taskId:typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):"",status:x?"failed":"completed"});break}case"compaction.completed":{const v=w?.result??{};k.push({type:"compactionCompleted",sessionId:g,tokensBefore:typeof v.tokensBefore=="number"?v.tokensBefore:void 0,tokensAfter:typeof v.tokensAfter=="number"?v.tokensAfter:void 0,summary:typeof v.summary=="string"?v.summary:void 0}),k.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{k.push({type:"compactionStarted",sessionId:g,trigger:w?.trigger==="manual"?"manual":"auto",instruction:typeof w?.instruction=="string"?w.instruction:void 0});break}case"compaction.cancelled":{k.push({type:"compactionCancelled",sessionId:g});break}case"goal.updated":{const v=CJ(w?.snapshot??null);k.push({type:"goalUpdated",sessionId:g,goal:v?.status==="complete"?null:v});break}case"cron.fired":{const v=w?.origin,x=zi(w??{},"prompt");if(v&&typeof v=="object"&&v.kind==="cron_job"&&x){const E={id:Fl("cron_"),sessionId:g,role:"user",content:[{type:"text",text:x}],createdAt:new Date().toISOString(),metadata:{origin:v}};y.messages.push(E),k.push({type:"messageCreated",message:rc(E)})}break}}return k}return{project:u,bindNextPromptId:l,seedInFlight:a,reset:o,markSideChannelAgent:r}}function NJ(e){return new oJ({origin:e.origin,identity:e.identity,tracer:e.tracer,credentialStore:e.credentialStore,projectorFactory:()=>LJ({t:e.t}),mainAgentOnly:e.mainAgentOnly})}const zT="kimiWeb.compaction",FJ={t:e=>e},BJ="kimiWeb.optimisticUserMessage",UA="Sub Agent";function qh(e,t,n=e.length){for(let i=0;i<n;i++){const s=e[i];s.type==="thinking"&&s.startedAt!==void 0&&s.durationMs===void 0&&(e[i]={...s,durationMs:Math.max(0,t-Date.parse(s.startedAt))})}}function KA(e,t,n){const i=e.messagesBySession[t];if(i)for(let s=i.length-1;s>=0;s--){const o=i[s];if(o.role!=="assistant")continue;if(!o.content.some(u=>u.type==="thinking"&&u.startedAt!==void 0&&u.durationMs===void 0))return;const l=[...o.content];qh(l,n);const a=[...i];a[s]={...o,content:l},e.messagesBySession[t]=a;return}}function VA(e){const t=Date.parse(e);return Number.isNaN(t)?Date.now():t}function $J(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},turnEndedPromptIdBySession:{},turnErrorBySession:{},turnRetryBySession:{},compactionBySession:{},warnings:[]}}function DJ(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},turnErrorBySession:{...e.turnErrorBySession},turnRetryBySession:{...e.turnRetryBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function RJ(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const i=e.lastSeqBySession[t]??0;n>i&&(e.lastSeqBySession[t]=n)}}function lc(e,t){const n=new Date().toISOString();e.sessions=e.sessions.map(i=>i.id===t&&n>i.updatedAt?{...i,updatedAt:n}:i)}function qa(e,t){return t.seq>(e.lastSeqBySession[t.sessionId]??0)}function ZA(e){return e.role==="user"&&e.metadata?.[BJ]===!0}function zJ(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function OJ(e){return e.metadata?.origin?.kind==="system_trigger"}function PJ(e,t){const n=t.userMessageId??t.id;for(let s=e.length-1;s>=0;s--){const o=e[s];if(ZA(o)&&o.userMessageId===n)return s}const i=t.promptId;if(i!==void 0)for(let s=e.length-1;s>=0;s--){const o=e[s];if(ZA(o)&&o.promptId===i)return s}return-1}function jJ(e,t,n){let i=!1;const s=e.map(o=>{let r=!1;const l=o.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(r=!0,{...a,outputLines:[...a.outputLines??[],n]}));return r?(i=!0,{...o,content:l}):o});return i?s:e}const HJ={"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 WJ(e,t){const n=[],i=(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})};i(t("warnings.details.code"),e.code);const s=e.details??{};i(t("warnings.details.status"),s.statusCode),i(t("warnings.details.requestId"),s.requestId),i(t("warnings.details.errorName"),e.name);for(const[r,l]of Object.entries(s))r==="statusCode"||r==="requestId"||i(r,l);const o=(e.code!==void 0?HJ[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${o}`),message:e.message,details:n.length>0?n:void 0}}function qJ(e,t,n,i=FJ){const s=DJ(e);switch(RJ(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(o=>o.id===t.session.id?{...t.session,pullRequest:o.pullRequest}:o);break}case"sessionDeleted":{const o=t.sessionId;s.sessions=s.sessions.filter(r=>r.id!==o),delete s.messagesBySession[o],delete s.tasksBySession[o],delete s.goalBySession[o],delete s.approvalsBySession[o],delete s.questionsBySession[o],delete s.lastSeqBySession[o],delete s.turnActiveBySession[o],delete s.turnEndedPromptIdBySession[o],delete s.turnErrorBySession[o],delete s.turnRetryBySession[o],s.activeSessionId===o&&(s.activeSessionId=void 0);break}case"sessionWorkChanged":{if(!qa(e,n))break;let o;s.sessions=s.sessions.map(r=>r.id!==t.sessionId?r:(o=t.pendingInteraction??(t.busy?r.pendingInteraction:"none"),{...r,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?r.mainTurnActive:!1),pendingInteraction:o,lastTurnReason:t.lastTurnReason})),o==="none"?(delete s.approvalsBySession[t.sessionId],delete s.questionsBySession[t.sessionId]):o==="question"&&delete s.approvalsBySession[t.sessionId],t.mainTurnActive===!0?s.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&(e.turnActiveBySession[t.sessionId]&&lc(s,t.sessionId),delete s.turnActiveBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId]);break}case"sessionMetaUpdated":{s.sessions=s.sessions.map(o=>o.id===t.sessionId?{...o,title:t.title??o.title,lastPrompt:t.lastPrompt??o.lastPrompt}:o);break}case"sessionUsageUpdated":{s.sessions=s.sessions.map(o=>{if(o.id!==t.sessionId)return o;const r=t.model&&t.model.length>0?t.model:o.model;return{...o,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 o=t.sessionId,r=s.compactionBySession[o],{[o]:l,...a}=s.compactionBySession;if(s.compactionBySession=a,Object.prototype.hasOwnProperty.call(s.messagesBySession,o)){const u=s.messagesBySession[o]??[],c=`compaction_${o}_${n.seq}`;if(!u.some(d=>d.id===c)){const d={trigger:r?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};s.messagesBySession[o]=[...u,{id:c,sessionId:o,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[zT]:d}}]}}break}case"compactionCancelled":{const{[t.sessionId]:o,...r}=s.compactionBySession;s.compactionBySession=r;break}case"messageCreated":{const o=t.message.sessionId,r=s.messagesBySession[o]??[];if(!r.some(a=>a.id===t.message.id)){if(t.message.role==="user"&&!zJ(t.message)&&!OJ(t.message)){const a=PJ(r,t.message);if(a!==-1){const u=[...r],c=u[a];u[a]={...t.message,id:c.id,promptId:t.message.promptId??c.promptId,userMessageId:t.message.userMessageId??t.message.id,metadata:{...t.message.metadata,...c.metadata}},s.messagesBySession[o]=u;break}}s.messagesBySession[o]=[...r,t.message]}break}case"messageUpdated":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=r.map(l=>{if(l.id!==t.messageId)return l;const a=t.content.map((c,d)=>{const f=l.content[d];return c.type==="thinking"&&f?.type==="thinking"?{...c,startedAt:f.startedAt,durationMs:f.durationMs}:c}),u=Date.now();return qh(a,u,a.length-1),(t.status!=="pending"||t.durationMs!==void 0)&&qh(a,u),{...l,content:a,durationMs:t.durationMs??l.durationMs,endedAt:t.durationMs!==void 0?l.endedAt??new Date(u).toISOString():l.endedAt}});break}case"assistantDelta":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=r.map(l=>{if(l.id!==t.messageId)return l;const a=[...l.content],u=t.contentIndex,c=a.length<=u;for(;a.length<=u;)a.push({type:"text",text:""});const d=a[u];let f;return t.delta.text!==void 0?d.type==="text"&&!c?f={type:"text",text:d.text+t.delta.text}:(f={type:"text",text:t.delta.text},qh(a,Date.now(),u)):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()},qh(a,Date.now(),u)):f=d,a[u]=f,{...l,content:a}});break}case"toolOutput":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=jJ(r,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const o=t.sessionId,r=s.approvalsBySession[o]??[];r.some(u=>u.approvalId===t.approval.approvalId)||(s.approvalsBySession[o]=[...r,t.approval],qa(e,n)&&(KA(s,o,VA(t.approval.createdAt)),lc(s,o)));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 o=t.sessionId,r=t.approvalId,l=s.approvalsBySession[o]??[];s.approvalsBySession[o]=l.filter(a=>a.approvalId!==r);break}case"questionRequested":{const o=t.sessionId,r=s.questionsBySession[o]??[];r.some(a=>a.questionId===t.question.questionId)||(s.questionsBySession[o]=[...r,t.question],qa(e,n)&&(KA(s,o,VA(t.question.createdAt)),lc(s,o)));break}case"questionAnswered":case"questionDismissed":{const o=t.sessionId,r=t.questionId,l=s.questionsBySession[o]??[];s.questionsBySession[o]=l.filter(a=>a.questionId!==r);break}case"taskCreated":{const o=t.sessionId,r=s.tasksBySession[o]??[],l=r.findIndex(a=>a.id===t.task.id);if(l===-1)s.tasksBySession[o]=[...r,t.task];else{const a=[...r],u=r[l];a[l]={...t.task,outputLines:u.outputLines,text:u.text,description:t.task.description===UA&&u.description!==UA?u.description:t.task.description,swarmIndex:t.task.swarmIndex??u.swarmIndex,parentToolCallId:t.task.parentToolCallId??u.parentToolCallId,subagentType:t.task.subagentType??u.subagentType,model:t.task.model??u.model,thinkingEffort:t.task.thinkingEffort??u.thinkingEffort,runInBackground:t.task.runInBackground??u.runInBackground,backgroundTaskId:t.task.backgroundTaskId??u.backgroundTaskId,agentId:t.task.agentId??u.agentId},s.tasksBySession[o]=a}break}case"taskProgress":{const o=t.sessionId,r=s.tasksBySession[o]??[];s.tasksBySession[o]=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 u=[...a,t.outputChunk];return{...l,outputLines:l.kind==="subagent"?u:u.slice(-40)}});break}case"taskCompleted":{const o=t.sessionId,r=s.tasksBySession[o]??[];s.tasksBySession[o]=r.map(l=>l.id!==t.taskId?l:{...l,status:t.status,completedAt:l.completedAt??new Date().toISOString(),completedAtEstimated:l.completedAt===void 0?!0:l.completedAtEstimated,outputPreview:t.outputPreview,outputBytes:t.outputBytes});break}case"goalUpdated":{const o=t.sessionId;s.goalVersionBySession[o]=(s.goalVersionBySession[o]??0)+1,t.goal===null||t.goal.status==="complete"?delete s.goalBySession[o]:s.goalBySession[o]=t.goal;break}case"configChanged":{s.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":{t.reason==="blocked"&&qa(e,n)&&lc(s,t.sessionId);break}case"promptAborted":{if(t.promptId===e.turnEndedPromptIdBySession[t.sessionId])break;qa(e,n)&&lc(s,t.sessionId);break}case"turnActiveChanged":{if(!qa(e,n))break;s.sessions=s.sessions.map(o=>o.id===t.sessionId?{...o,mainTurnActive:t.active}:o),t.active?(s.turnActiveBySession[t.sessionId]=!0,delete s.turnEndedPromptIdBySession[t.sessionId],delete s.turnErrorBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId],lc(s,t.sessionId)):(delete s.turnActiveBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId],t.promptId!==void 0&&(s.turnEndedPromptIdBySession[t.sessionId]=t.promptId),lc(s,t.sessionId));break}case"turnRetry":{if(!qa(e,n))break;t.retry===void 0?delete s.turnRetryBySession[t.sessionId]:s.turnRetryBySession[t.sessionId]=t.retry;break}case"unknown":{const o=t.raw;if(!(o&&o._noop===!0))if(o&&o._agentError){if(qa(e,n)){if(n.sessionId!==void 0){const r=o.details??{};s.turnErrorBySession[n.sessionId]={code:o.code,message:o.message,name:o.name,retryable:o.retryable,statusCode:typeof r.statusCode=="number"?r.statusCode:void 0,requestId:typeof r.requestId=="string"?r.requestId:void 0}}(n.sessionId===void 0||n.sessionId!==e.activeSessionId)&&(s.warnings=[...s.warnings,WJ(o,i.t)])}}else if(o&&o._agentWarning){const r=o.message??o.code??i.t("warnings.agentWarningFallback");s.warnings=[...s.warnings,`${i.t("warnings.noteLabel")}: ${r}`]}else{const r=o?.type??"(unknown)";s.warnings=[...s.warnings,i.t("warnings.unhandledEvent",{type:r})]}break}}return s}function UJ(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Zo(e,t){for(const n of Object.keys(t))Object.is(e[n],t[n])||(e[n]=t[n]);for(const n of Object.keys(e))n in t||delete e[n]}const KJ=[{pattern:/\brm\s+(?:-[a-zA-Z]*[rf][a-zA-Z]*|--recursive|--force)\b/,detail:"rm -rf"},{pattern:/\bsudo\b/,detail:"sudo"},{pattern:/\bmkfs(?:\.[a-z0-9]+)?\b/,detail:"mkfs"},{pattern:/\bdd\b[^|;&]*\bof=/,detail:"dd of=…"},{pattern:/>\s*\/dev\/(?:sd|nvme|disk|hd)/,detail:"> /dev/…"},{pattern:/:\(\)\s*\{/,detail:"fork bomb"},{pattern:/\bgit\s+push\b[^|;&]*(?:--force(?:-with-lease)?\b|\s-f\b)/,detail:"git push --force"},{pattern:/\bchmod\s+(?:-[a-zA-Z]+\s+)*777\b/,detail:"chmod 777"},{pattern:/\b(?:curl|wget)\b[^|;&]*\|\s*(?:sudo\s+)?(?:ba|z)?sh\b/,detail:"curl | sh"},{pattern:/\b(?:shutdown|reboot|poweroff|halt)\b/,detail:"shutdown / reboot"}];function OT(e){const t=e.replace(/"[^"]*"|'[^']*'/g," ");for(const{pattern:n,detail:i}of KJ)if(n.test(t))return i}const PT="kimiWeb.taskNotification",VJ=/<notification\b([^>]*)>([\s\S]*?)<\/notification>/g,ZJ=/([\w-]+)="([^"]*)"/g,GJ=/<output-file\b([^>]*)>[\s\S]*?<\/output-file>/,QJ=/^Title: (.*)$/m,YJ=/^Severity: (.*)$/m;function l3(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function GA(e){const t={};for(const n of e.matchAll(ZJ))n[1]!==void 0&&n[2]!==void 0&&(t[n[1]]=l3(n[2]));return t}function JJ(e,t,n){const i=GA(e),s=QJ.exec(t)?.[1]?.trim()??"",o=YJ.exec(t)?.[1]?.trim()??"";let r=t.split(` +`).filter(c=>!c.startsWith("Title: ")&&!c.startsWith("Severity: ")).join(` +`);const l=r.search(/^<\w/m);l!==-1&&(r=r.slice(0,l)),r=r.trim();const a=GJ.exec(t),u=a?(()=>{const c=GA(a[1]??""),d=Number(c.bytes);return c.path!==void 0&&c.path!==""?{path:c.path,bytes:Number.isFinite(d)?d:void 0}:void 0})():void 0;return{id:i.id??"",category:i.category??"",type:i.type??"",sourceKind:i.source_kind??"",sourceId:i.source_id??"",agentId:i.agent_id,title:l3(s),severity:o,body:l3(r),outputFile:u,raw:n}}function XJ(e){if(!e.includes("<notification"))return[];const t=[];for(const n of e.matchAll(VJ))n[1]===void 0||n[2]===void 0||t.push(JJ(n[1],n[2],n[0]));return t}function eX(e){const t=e?.[PT];if(typeof t!="object"||t===null)return;const n=t;for(const i of["id","category","type","sourceKind","sourceId","title","severity","body","raw"])if(typeof n[i]!="string")return;return t}function Cg(e){for(const t of["completed","failed","timed_out","killed","lost"])if(e.type.endsWith(`.${t}`))return t;return"info"}function tX(e){const t=Cg(e);return t==="completed"?"ok":t==="failed"||t==="timed_out"||t==="lost"?"err":t==="killed"?"warn":e.severity==="error"?"err":e.severity==="warning"?"warn":"info"}const nX=1e6,QA=5e3;function Ul(e){return e===""?[]:e.endsWith(` +`)?e.slice(0,-1).split(` +`):e.split(` +`)}function Ff(e,t){const n=Ul(e),i=Ul(t),s=n.length,o=i.length;if(s===0&&o===0)return[];if(s>QA||o>QA||(s+1)*(o+1)>nX)return null;const r=Array.from({length:s+1},()=>Array.from({length:o+1},()=>0));for(let p=1;p<=s;p++)for(let g=1;g<=o;g++)r[p][g]=n[p-1]===i[g-1]?r[p-1][g-1]+1:Math.max(r[p-1][g],r[p][g-1]);const l=[];let a=s,u=o;for(;a>0||u>0;)a>0&&u>0&&n[a-1]===i[u-1]?(l.push({type:"context",text:n[a-1]}),a--,u--):u>0&&(a===0||r[a][u-1]>=r[a-1][u])?(l.push({type:"add",text:i[u-1]}),u--):(l.push({type:"del",text:n[a-1]}),a--);l.reverse();const c=[];let d=1,f=1;for(const p of l)p.type==="context"?(c.push({type:"context",text:p.text,oldNo:d,newNo:f}),d++,f++):p.type==="add"?(c.push({type:"add",text:p.text,newNo:f}),f++):(c.push({type:"del",text:p.text,oldNo:d}),d++);return c}const YA=500;function Cm(e,t){const n=[],i=Ul(e),s=Ul(t),o=Math.min(i.length,YA),r=Math.min(s.length,YA);for(let l=1;l<=o;l++)n.push({type:"del",text:i[l-1],oldNo:l});i.length>o&&n.push({type:"context",text:`… ${i.length-o} more lines …`});for(let l=1;l<=r;l++)n.push({type:"add",text:s[l-1],newNo:l});return s.length>r&&n.push({type:"context",text:`… ${s.length-r} more lines …`}),n}function jT(e){let t=0,n=0;for(const i of e)i.type==="add"?t++:i.type==="del"&&n++;return{added:t,removed:n}}const iX=/^read[_-]?media(?:file)?$/i,sX=/^data:([^;]+);base64,(.*)$/s,oX=/^<(image|video|audio)\s+path="([^"]+)">$/,rX=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,lX=/Mime type:\s*([^.\s]+)/i,aX=/Size:\s*(\d+)\s*bytes/i,uX=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,cX="<system>Image compressed to fit model limits:",dX=/<system>Image compressed to fit model limits:[\s\S]*?<\/system>/g;function fX(e){return e.includes(cX)?e.replace(dX,""):e}function hX(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function JA(e){const t=rX.exec(e.trim());return t?{kind:t[1],path:hX(t[2])}:null}const HT=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,pX=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function a3(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),i=n>0?t.slice(0,n):t;return HT.test(i)?i:void 0}const gX=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function XA(e){const t=gX.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",i=pX.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:i!==void 0&&HT.test(i)?i:void 0}}function mX(e){if(e.length===0)return 0;const t=e.endsWith("==")?2:e.endsWith("=")?1:0;return Math.floor(e.length*3/4)-t}function vX(e){if(Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function yX(e){const t=e.type,n=t==="image_url"?"image":t==="video_url"?"video":t==="audio_url"?"audio":null;if(n===null)return null;const s=e[n==="image"?"imageUrl":n==="video"?"videoUrl":"audioUrl"];if(typeof s!="object"||s===null)return null;const o=s.url;return typeof o=="string"?{kind:n,url:o}:null}function bX(e,t){if(!iX.test(e))return;const n=vX(t);if(n===null)return;let i,s,o,r,l,a=null;for(const c of n){if(typeof c!="object"||c===null)continue;const d=c;if(d.type==="text"&&typeof d.text=="string"){const p=d.text,g=oX.exec(p);g&&(s=g[1],i=g[2]);const m=lX.exec(p);m?.[1]&&(o=m[1]);const y=aX.exec(p);y?.[1]&&(r=Number(y[1]));const w=uX.exec(p);w?.[1]&&w[2]&&(l=`${w[1]}x${w[2]}`);continue}const f=yX(d);f&&(a=f)}if(a===null)return;const u=sX.exec(a.url);return u?.[1]&&(o=u[1]),u?.[2]&&(r=mX(u[2])),{kind:a.kind??s??"image",url:a.url,path:i,fileId:a.url.startsWith("ms://")&&i!==void 0?a3(i):void 0,mimeType:o,bytes:Number.isFinite(r)?r:void 0,dimensions:l}}function B5(e){if(e!=null){if(typeof e=="string")return e.split(` +`);if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="string")t.push(...n.split(` +`));else if(n&&typeof n=="object"){const i=n;i.type==="text"&&typeof i.text=="string"?t.push(...i.text.split(` +`)):i.type==="think"&&typeof i.think=="string"?t.push(...i.think.split(` +`)):i.type==="image_url"||i.type==="image"?t.push("[image]"):typeof i.type=="string"?t.push(`[${i.type}]`):t.push(JSON.stringify(n))}return t.length>0?t:void 0}return[JSON.stringify(e)]}}function kX(e,t){if(ao(e)==="task")for(const n of t??[]){const i=/^agent_id:\s*(\S+)\s*$/.exec(n);if(i?.[1])return i[1]}}function AX(e,t){return{id:e.agentId??e.id,toolCallId:e.parentToolCallId,name:e.description,subagentType:e.subagentType,prompt:e.command??t,model:e.model,thinkingEffort:e.thinkingEffort,phase:e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase??"working",status:e.status,summary:e.outputPreview,outputLines:e.outputLines,text:e.text,suspendedReason:e.suspendedReason,swarmIndex:e.swarmIndex}}function CX(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const i=typeof t.path=="string"?t.path:"";if(Array.isArray(t.diff))return{kind:"diff",path:i,diff:t.diff};const s=typeof t.old_text=="string"?t.old_text:typeof t.before=="string"?t.before:void 0,o=typeof t.new_text=="string"?t.new_text:typeof t.after=="string"?t.after:void 0;if(s!==void 0&&o!==void 0){const r=Ff(s,o)??Cm(s,o);return{kind:"diff",path:i,diff:r}}return{kind:"diff",path:i,diff:[]}}if(n==="file_io"){const i=typeof t.path=="string"?t.path:"",s=typeof t.operation=="string"?t.operation:"";if(s==="write"&&typeof t.content=="string")return{kind:"file",path:i,content:t.content};if(s==="edit"&&typeof t.before=="string"&&typeof t.after=="string"){const r=Ff(t.before,t.after)??Cm(t.before,t.after);return{kind:"diff",path:i,diff:r}}const o=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:s||n,path:i,detail:o}}if(n==="shell"||n==="command"){const i=typeof t.command=="string"?t.command:e.action;return{kind:"shell",command:i,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:OT(i)}}if(n==="file_content"||n==="file")return{kind:"file",path:typeof t.path=="string"?t.path:"",content:typeof t.content=="string"?t.content:"",language:typeof t.language=="string"?t.language:void 0};if(n==="file_op"||n==="fileop")return{kind:"fileop",op:typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,path:typeof t.path=="string"?t.path:"",detail:typeof t.detail=="string"?t.detail:void 0};if(n==="url_fetch"||n==="url")return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:typeof t.url=="string"?t.url:e.action};if(n==="search")return{kind:"search",query:typeof t.query=="string"?t.query:e.action,scope:typeof t.scope=="string"?t.scope:void 0};if(n==="invocation"||n==="agent_call"||n==="skill_call")return{kind:"invocation",kind2:typeof t.kind=="string"?t.kind:n,name:typeof t.name=="string"?t.name:e.toolName,description:typeof t.description=="string"?t.description:void 0};if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(o=>{const r=o??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const i=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:i,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function wX(e){const t=`<prompt> +`,n=` +</prompt>`,i=e.indexOf(t),s=e.lastIndexOf(n);return i>=0&&s>=i+t.length?e.slice(i+t.length,s):xX(e)}function xX(e){const t=e.split(` +`);return t.length>=2&&t[0]?.startsWith("<cron-fire ")&&t.at(-1)==="</cron-fire>"?t.slice(1,-1).join(` +`):e}function _X(e){const t=e.metadata?.origin;if(t?.kind==="cron_job"||t?.kind==="cron_missed")return t.kind}function SX(e){const t=e.content.filter(n=>n.type==="text").map(n=>n.text).join(` +`);return wX(t)}function MX(e,t){const n=e.metadata?.origin??{},i=SX(e);return t==="cron_missed"?{text:i,cron:{missedCount:typeof n.count=="number"?n.count:void 0}}:{text:i,cron:{jobId:typeof n.jobId=="string"?n.jobId:void 0,cron:typeof n.cron=="string"?n.cron:void 0,recurring:typeof n.recurring=="boolean"?n.recurring:void 0,coalescedCount:typeof n.coalescedCount=="number"?n.coalescedCount:void 0,stale:typeof n.stale=="boolean"?n.stale:void 0}}}function IX(e,t,n){const{text:i,cron:s}=MX(e,n);return{id:e.id,role:"cron",no:t,text:i,createdAt:e.createdAt,cron:s}}function EX(e){const t=e.metadata?.origin,n=t?.kind;return n===void 0||n==="user"?!0:n==="skill_activation"||n==="plugin_command"?t?.trigger==="user-slash":!1}function TX(e){return e.metadata?.origin?.kind==="compaction_summary"}function LX(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function NX(e){if(!e||e.length===0)return;const t="Plan saved to: ";for(const n of e)if(n.startsWith(t))return n.slice(t.length).trim()}function FX(e){const t=[];for(const n of e){const i=t.at(-1);n.type==="text"&&i?.type==="text"?i.text+=n.text:n.type==="thinking"&&i?.type==="thinking"?i.thinking+=n.thinking:n.type==="thinking"?t.push({type:"thinking",thinking:n.thinking}):t.push({...n})}return JSON.stringify(t)}function WT(e,t,n,i=!0,s={},o={},r){const l=[];let a=r?.startNo??1;const u=r?.collect,c=new Map;for(const m of t)c.set(m.toolCallId,m);let d=null;function f(m=!1){if(!d)return;const y=d;if(d=null,!m&&y.blocks.length===0&&y.textParts.length===0&&y.thinkingParts.length===0&&y.tools.length===0)return;if(!m||!i)for(let k=0;k<y.tools.length;k++){const A=y.tools[k];if(A.status!=="running")continue;const v={...A,status:"ok"};y.tools[k]=v;const x=y.blocks.find(E=>E.kind==="tool"&&E.tool.id===v.id);x&&x.kind==="tool"&&(x.tool=v)}const w={id:y.id,role:"assistant",no:a++,text:y.textParts.join(` +`),thinking:y.thinkingParts.length>0?y.thinkingParts.join(` +`):void 0,tools:y.tools.length>0?y.tools:void 0,blocks:y.blocks.length>0?y.blocks:void 0,approval:y.approval,approvalId:y.approvalId,durationMs:y.durationMs,createdAt:y.createdAt,endedAt:y.endedAt,goalContinuation:y.goalContinuation};l.push(w),u?.(w,y.sources)}function p(m,y){let w=null;for(const k of y)if(k.type==="text"){if(k.text){w==="text"?m.textParts[m.textParts.length-1]+=k.text:m.textParts.push(k.text);const A=m.blocks.at(-1);A&&A.kind==="text"?A.text+=(w==="text"?"":` +`)+k.text:m.blocks.push({kind:"text",text:k.text}),w="text"}}else if(k.type==="thinking"){if(k.thinking){w==="thinking"?m.thinkingParts[m.thinkingParts.length-1]+=k.thinking:m.thinkingParts.push(k.thinking);const A=m.blocks.at(-1);if(A&&A.kind==="thinking"){A.thinking+=(w==="thinking"?"":` +`)+k.thinking;const v=[A.startedAt,k.startedAt].filter(S=>S!==void 0).sort()[0],x=A.startedAt!==void 0&&A.durationMs===void 0||k.startedAt!==void 0&&k.durationMs===void 0,E=[A,k].flatMap(S=>S.startedAt!==void 0&&S.durationMs!==void 0?[Date.parse(S.startedAt)+S.durationMs]:[]);A.startedAt=v,A.durationMs=!x&&v!==void 0&&E.length>0?Math.max(...E)-Date.parse(v):void 0}else m.blocks.push({kind:"thinking",thinking:k.thinking,startedAt:k.startedAt,durationMs:k.durationMs});w="thinking"}}else if(k.type==="toolUse"){w=null;const A=c.get(k.toolCallId),v=k.toolName==="ExitPlanMode"?o[k.toolCallId]:void 0,x={id:k.toolCallId,name:k.toolName,arg:typeof k.input=="string"?k.input:JSON.stringify(k.input),agentId:ao(k.toolName)==="task"?k.agentRefs?.find(E=>E.role!=="member")?.agentId??k.agentRefs?.[0]?.agentId:void 0,status:"running",output:k.outputLines,plan:v,planPath:k.toolName==="ExitPlanMode"?v?.path??s[k.toolCallId]?.path:void 0};m.tools.push(x),m.blocks.push({kind:"tool",tool:x}),A&&(m.approval=CX(A),m.approvalId=A.approvalId)}else if(k.type==="toolResult"){w=null;const A=m.tools.findIndex(v=>v.id===k.toolCallId);if(A!==-1){const v=m.tools[A],x=B5(k.output),E={...v,status:k.isError?"error":"ok",output:x,media:k.isError?void 0:bX(v.name,k.output),agentId:v.agentId??kX(v.name,x)};E.name==="ExitPlanMode"&&!E.planPath&&(E.planPath=NX(E.output)),m.tools[A]=E;const S=m.blocks.find(M=>M.kind==="tool"&&M.tool.id===k.toolCallId);S&&S.kind==="tool"&&(S.tool=E)}}else w=null}function g(m){if(m.type==="image"||m.type==="video"){const y=m.type,w=m.source;if(w.kind==="url")return{url:w.url,kind:y};if(w.kind==="base64")return{url:`data:${w.mediaType};base64,${w.data}`,kind:y};if(w.kind==="file"&&n)return{url:n(w.fileId),kind:y,fileId:w.fileId}}if(m.type==="file"&&n){if(m.mediaType.startsWith("image/"))return{url:n(m.fileId),kind:"image",fileId:m.fileId};if(m.mediaType.startsWith("video/"))return{url:n(m.fileId),kind:"video",fileId:m.fileId}}}for(const m of e){if(m.role==="system")continue;if(TX(m)){f();const v=m.metadata?.[zT],x={id:m.id,role:"compaction",no:a,text:m.content.filter(E=>E.type==="text").map(E=>E.text).join(` +`),compaction:{trigger:v?.trigger,tokensBefore:v?.tokensBefore,tokensAfter:v?.tokensAfter}};l.push(x),u?.(x,[m]);continue}if(m.role==="user"){const v=_X(m),x=m.metadata?.origin?.kind,E=x==="skill_activation"&&m.metadata?.origin?.trigger!=="user-slash";if(v===void 0&&(x==="injection"||E))continue;if(v===void 0&&(x==="task"||x==="background_task"||x==="task_notification")){const $=m.content.filter(R=>R.type==="text").map(R=>R.text).join(` +`),P=eX(m.metadata),O=P!==void 0?[P]:XJ($);if(O.length>0){d??={id:m.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[m],createdAt:m.createdAt};for(const R of O)d.blocks.push({kind:"notification",notification:{...R,createdAt:m.createdAt}})}continue}if(f(),v!==void 0){const $=IX(m,a++,v);l.push($),u?.($,[m]);continue}if(x==="system_trigger"&&m.metadata?.origin?.name==="goal_continuation"){d={id:m.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[m],createdAt:m.createdAt,goalContinuation:!0};continue}if(!EX(m))continue;const S=m.metadata?.origin,M=S?.kind==="skill_activation"&&S?.trigger==="user-slash",_=S?.kind==="plugin_command"&&S?.trigger==="user-slash",N=[],D=[];for(const $ of m.content){if($.type==="text")if(M){const O=JA($.text);if(O&&(O.kind==="video"||O.kind==="image")&&n){const W=a3(O.path);if(W){D.push({url:n(W),kind:O.kind,fileId:W});continue}}const R=XA($.text);R&&D.push({kind:"file",url:R.fileId&&n?n(R.fileId):"",fileId:R.fileId,name:R.name,mediaType:R.mediaType,size:R.size})}else if(_)N.push(S.commandArgs??"");else{const O=JA($.text);if(O&&(O.kind==="video"||O.kind==="image")&&n){const z=a3(O.path);if(z){D.push({url:n(z),kind:O.kind,fileId:z});continue}}const R=XA($.text);if(R){D.push({kind:"file",url:R.fileId&&n?n(R.fileId):"",fileId:R.fileId,name:R.name,mediaType:R.mediaType,size:R.size});continue}const W=fX($.text);if(W!==$.text&&W.trim().length===0)continue;N.push(W)}const P=g($);if(P){D.push({url:P.url,kind:P.kind,name:$.type==="file"?$.name:void 0,fileId:P.fileId});continue}$.type==="file"&&n&&D.push({kind:"file",url:n($.fileId),fileId:$.fileId,name:$.name,mediaType:$.mediaType||void 0,size:$.size})}const T={id:m.id,role:"user",no:a++,text:M?S?.skillArgs??"":N.join(` +`),attachments:D.length>0?D:void 0,skillActivation:M?{name:S.skillName,args:S.skillArgs}:void 0,pluginCommand:_?{pluginId:S.pluginId,commandName:S.commandName,args:S.commandArgs}:void 0,createdAt:m.createdAt};l.push(T),u?.(T,[m]);continue}if(m.role==="tool"){d&&(d.sources.push(m),p(d,m.content),d.endedAt=m.createdAt);continue}const y=m.promptId;LX(d,y)?d!==null&&d.promptId===void 0&&y!==void 0&&(d.promptId=y):(f(),d={id:m.id,promptId:y,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[],durationMs:m.durationMs,createdAt:m.createdAt});const k=d;if(k===null)continue;const A=FX(m.content);k.promptId!==void 0&&k.seenSigs.has(A)||(k.seenSigs.add(A),k.sources.push(m),m.durationMs!==void 0&&(k.durationMs=m.durationMs),p(k,m.content),m.endedAt!==void 0?k.endedAt=m.endedAt:m.id!==k.id&&(k.endedAt=m.createdAt))}return f(!0),l}function BX(e,t,n){const i=e.items.filter(u=>u.kind==="turn"),s=i[0]?.turnId,o=i.length===1?s:void 0,r=new Map(e.tasks.map(u=>[u.taskId,u])),l=e.items.flatMap(u=>u.kind==="turn"?$X(u,e.attachments,r,u.turnId===s?n?.createdAt:void 0,u.turnId===o?n?.disposedAt:void 0):[]),a=e.meta.activity==="turn";return WT(l,[],t,a).map(RX)}function $X(e,t,n,i,s){const o=[],r=new Map(t.map(d=>[d.attachmentId,d])),l=zX([e.startedAt,...e.steps.map(d=>d.startedAt),i])??"",a=eC(e.endedAt)??eC(s),u=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 p=OX(r.get(f));p!==void 0&&d.push(p)}o.push({id:`${e.turnId}:input`,sessionId:"",role:"user",content:d,createdAt:l,promptId:u,metadata:e.origin.kind==="task"&&e.prompt.includes("<notification")?{origin:e.origin.payload??e.origin}:void 0})}for(const d of e.steps)for(const f of d.frames)if(f.kind==="text"){if(f.text.length===0)continue;if(f.role==="user"){if(f.taskId===void 0)continue;const p=DX(f.taskId,f.text,n.get(f.taskId));o.push({id:f.frameId,sessionId:"",role:"user",content:[{type:"text",text:f.text}],createdAt:d.startedAt??l,promptId:u,metadata:{origin:{kind:"task",taskId:f.taskId},[PT]:p}});continue}o.push({id:f.frameId,sessionId:"",role:"assistant",content:[{type:"text",text:f.text}],createdAt:d.startedAt??l,promptId:u})}else if(f.kind==="thinking"){if(f.text.length===0)continue;o.push({id:f.frameId,sessionId:"",role:"assistant",content:[{type:"thinking",thinking:f.text,startedAt:d.startedAt,durationMs:tC(d.startedAt,d.endedAt)}],createdAt:d.startedAt??l,promptId:u})}else f.kind==="tool"&&(o.push({id:`${f.frameId}:call`,sessionId:"",role:"assistant",content:[{type:"toolUse",toolCallId:f.toolCallId,toolName:f.name,input:f.input??f.display??{},outputLines:f.state==="running"?B5(f.output):void 0,agentRefs:f.agentRefs}],createdAt:d.startedAt??l,promptId:u}),f.state!=="running"&&o.push({id:`${f.frameId}:result`,sessionId:"",role:"tool",content:[{type:"toolResult",toolCallId:f.toolCallId,output:f.output??f.error??"",isError:f.state==="error"}],createdAt:d.endedAt??d.startedAt??l,promptId:u}));const c=e.durationMs??tC(l||void 0,a);if(c!==void 0){const d=o.findLastIndex(f=>f.role==="assistant");d>=0&&(o[d]={...o[d],durationMs:c})}return o}function DX(e,t,n){const[i="",...s]=t.split(` +`),o=n?.state??"info";return{id:`task:${e}:${o}`,category:"task",type:`task.${o}`,sourceKind:n?.kind==="subagent"?"subagent":"background_task",sourceId:e,agentId:n?.agentId,title:i.trim(),severity:o==="completed"?"info":"warning",body:s.join(` +`).trim(),raw:t}}function RX(e){if(e.createdAt!==""&&e.endedAt!=="")return e;const t={...e};return t.createdAt===""&&delete t.createdAt,t.endedAt===""&&delete t.endedAt,t}function zX(e){let t;for(const n of e){if(n===void 0)continue;const i=Date.parse(n);Number.isFinite(i)&&(t===void 0||i<t.time)&&(t={value:n,time:i})}return t?.value}function eC(e){return e!==void 0&&Number.isFinite(Date.parse(e))?e:void 0}function OX(e){if(e?.source!==void 0){if(e.mediaType.startsWith("image/"))return{type:"image",source:e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId}};if(e.mediaType.startsWith("video/"))return{type:"video",source:e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId}};if(e.source.kind==="file")return{type:"file",fileId:e.source.fileId,name:e.name??e.attachmentId,mediaType:e.mediaType,size:e.size??0}}}function tC(e,t){if(e===void 0||t===void 0)return;const n=Date.parse(t)-Date.parse(e);return Number.isFinite(n)&&n>=0?n:void 0}const nC=6e3,u3=256*1024,PX=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;function iC(e,t){return t===0?e:e-1}function jX(e,t){const n=Ul(t),i=[];let s=0;for(const o of e){if(o.type==="hunk"){const r=PX.exec(o.text);if(!r)return null;const l=iC(Number(r[1]),r[2]===void 0?1:Number(r[2])),a=iC(Number(r[3]),r[4]===void 0?1:Number(r[4]));if(a<s||a>n.length)return null;for(;s<a;)i.push(n[s++]);if(i.length!==l)return null;continue}if(o.oldNo===void 0&&o.newNo===void 0)return null;if(o.type==="del"){i.push(o.text);continue}if(s>=n.length||n[s]!==o.text)return null;s++,o.type==="context"&&i.push(o.text)}for(;s<n.length;)i.push(n[s++]);return i.join(` +`)}async function HX(e,t){if(t.truncated||e.length===0)return null;const n=await t.readNewText()??"";if(n.length>u3||Ul(n).length>nC)return null;const i=jX(e,n);return i===null||i.length>u3||Ul(i).length>nC?null:{before:i,after:n}}const WX=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function qX(e){return WX.has(e.type)}const UX=50,KX=100,c3=32*1024,VX={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,UX)},cancelTask(e){clearTimeout(e)}};function ZX(e,t,n={}){const i=n.scheduler??VX,s=Math.max(1,Math.floor(n.maxItemsPerSlice??KX)),o=[];let r=0,l=null,a=null,u=0,c=!1;const d=()=>o.length-r,f=()=>{u+=1,l!==null&&(i.cancelFrame(l),l=null),a!==null&&(i.cancelTask(a),a=null)},p=()=>{r===o.length?(o.length=0,r=0):r>=1024&&(o.splice(0,r),r=0)};let g;const m=()=>{if(c||l!==null||a!==null||d()===0)return;const w=++u,k=()=>{w===u&&g()};l=i.requestFrame(k),a=i.requestTask(k)};g=()=>{f();let w=0;for(;!c&&w<s&&r<o.length;){const k=o[r++];e(k),w+=1}p(),m()};const y=(w=>{if(!c){if(t(w)){const k=o.length>r?o.at(-1):void 0,A=k===void 0?void 0:n.coalesce?.(k,w);A===void 0?o.push(w):o[o.length-1]=A,m();return}if(d()===0){e(w);return}o.push(w),g()}});return y.flush=()=>{if(!c){for(f();!c&&r<o.length;)e(o[r++]);p()}},y.discard=w=>{if(c||d()===0)return;let k=r;for(let A=r;A<o.length;A+=1){const v=o[A];w(v)||(o[k++]=v)}o.length=k,p(),d()===0?f():m()},y.dispose=()=>{c||(c=!0,f(),o.length=0,r=0)},y}function d3(e){if(e.type==="assistantDelta"){if(e.delta.text!==void 0&&e.delta.thinking===void 0)return{kind:"text",value:e.delta.text};if(e.delta.thinking!==void 0&&e.delta.text===void 0)return{kind:"thinking",value:e.delta.thinking}}}function GX(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,i=d3(t);if(n===void 0||i===void 0||n.kind!==i.kind||i.value.length<=c3)return[e];const s=[];let o=0;for(;o<i.value.length;){let r=Math.min(o+c3,i.value.length);r<i.value.length&&r>o&&/[\uD800-\uDBFF]/u.test(i.value[r-1])&&/[\uDC00-\uDFFF]/u.test(i.value[r])&&(r-=1);const l=i.value.slice(o,r);s.push({appEvent:{...t,delta:i.kind==="text"?{text:l}:{thinking:l}},meta:{...e.meta,stream:{...n,offset:n.offset+o}}}),o=r}return s}function QX(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,i=t.meta.stream,s=d3(e.appEvent),o=d3(t.appEvent);if(n===void 0||i===void 0||s===void 0||o===void 0||e.meta.sessionId!==t.meta.sessionId||e.appEvent.sessionId!==t.appEvent.sessionId||e.appEvent.messageId!==t.appEvent.messageId||e.appEvent.contentIndex!==t.appEvent.contentIndex||n.turnId!==i.turnId||n.kind!==i.kind||s.kind!==o.kind||n.kind!==s.kind||i.kind!==o.kind||i.offset!==n.offset+s.value.length||s.value.length+o.value.length>c3)return;const r=s.value+o.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:r}:{thinking:r}},meta:{...t.meta,stream:{...n}}}}function YX(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function JX(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant")for(let i=n.content.length-1;i>=0;i--){const s=n.content[i];if(s.type!=="toolUse"||ao(s.toolName)!=="todo")continue;let o=s.input;if(typeof o=="string")try{o=JSON.parse(o)}catch{continue}const r=o?.todos;if(Array.isArray(r))return r.flatMap(l=>{const a=l??{},u=typeof a.title=="string"?a.title:typeof a.content=="string"?a.content:"";return u?[{title:u,status:YX(a.status)}]:[]})}}return[]}function XX(e){return e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("old mode")||e.startsWith("new mode")||e.startsWith("similarity index")||e.startsWith("dissimilarity index")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("copy from")||e.startsWith("copy to")||e.startsWith("Binary files")}function eee(e){const t=[];if(!e)return t;let n=0,i=0,s=!1;for(const o of e.split(` +`)){if(o.startsWith("diff --git")){s=!1;continue}if(!s&&XX(o))continue;if(o.startsWith("@@")){const a=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(o);a&&(n=Number.parseInt(a[1],10),i=Number.parseInt(a[2],10)),s=!0,t.push({type:"hunk",text:o});continue}if(!s||o.startsWith("\\"))continue;const r=o.charAt(0),l=o.slice(1);r==="+"?(t.push({type:"add",text:l,newNo:i}),i+=1):r==="-"?(t.push({type:"del",text:l,oldNo:n}),n+=1):r===" "&&(t.push({type:"context",text:l,oldNo:n,newNo:i}),n+=1,i+=1)}return t}function sC(e){return e?e.split(` +`).map(t=>t.trimEnd()).filter(Boolean).at(-1)??"":""}function tee(e){return e.suspendedReason||sC(e.text)||sC(e.outputLines?.join(` +`))||e.summary||""}function nee(e){return e.suspendedReason?e.suspendedReason:e.text?e.text:e.outputLines&&e.outputLines.length>0?e.outputLines.join(` +`):e.summary??""}function iee(e){return e==="completed"?"completed":e==="failed"?"failed":e==="aborted"?"cancelled":"working"}function oC(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:iee(e.outcome),body:e.body}}function see(e,t){return!!(t.agentId&&e.agentId===t.agentId||t.item&&e.name.includes(t.item))}function oee(e,t){const n=e.map(s=>({id:s.id,agentId:s.agentId,name:s.name,activity:tee(s),phase:s.phase,body:nee(s)}));if(!t)return n;const i=t.subagents.filter(s=>(s.outcome==="aborted"||s.state==="not_started")&&!e.some(o=>see(o,s))).map((s,o)=>oC(s,o));return n.length>0?[...n,...i]:t.subagents.map((s,o)=>oC(s,o))}const ree=["queued","working","suspended","completed","failed","cancelled"];function qT(e){return e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase?e.subagentPhase:"working"}function lee(){return{queued:0,working:0,suspended:0,completed:0,failed:0,cancelled:0}}function aee(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.swarmIndex===void 0)continue;const i=n.parentToolCallId??"swarm",s=t.get(i)??[];s.push({id:n.id,agentId:n.agentId,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,phase:qT(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,swarmIndex:n.swarmIndex}),t.set(i,s)}return[...t.entries()].map(([n,i])=>{const s=i.toSorted((r,l)=>r.swarmIndex-l.swarmIndex||r.id.localeCompare(l.id)),o=lee();for(const r of s)o[r.phase]++;return{id:n,members:s,counts:o}}).filter(n=>n.members.length>1).toSorted((n,i)=>{const s=n.members.at(0)?.swarmIndex??0,o=i.members.at(0)?.swarmIndex??0;return s!==o?s-o:n.id.localeCompare(i.id)})}function uee(e){let t=0,n=0;for(const i of e){n+=i.members.length;for(const s of ree)(s==="completed"||s==="failed"||s==="cancelled")&&(t+=i.counts[s])}return{done:t,total:n}}function cee(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||!n.parentToolCallId)continue;const i=t.get(n.parentToolCallId)??[];i.push({id:n.id,agentId:n.agentId,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,phase:qT(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,swarmIndex:n.swarmIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,i)}for(const[n,i]of t)t.set(n,i.toSorted((s,o)=>s.swarmIndex-o.swarmIndex||s.id.localeCompare(o.id)));return t}function $5(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function UT(e){for(const t of["path","file_path","filePath","filename"]){const n=e[t];if(typeof n=="string"&&n.length>0)return n}}const Uh=100*1024;function KT(e){const t=ao(e.name);if(t!=="edit"&&t!=="multi_edit")return null;const n=$5(e.arg);if(!n)return null;if(t==="edit"){if(n.replace_all===!0)return null;const l=typeof n.old_string=="string"?n.old_string:void 0,a=typeof n.new_string=="string"?n.new_string:void 0;return l===void 0||a===void 0||l.length>Uh||a.length>Uh?null:Ff(l,a)}const i=Array.isArray(n.edits)?n.edits:void 0;if(!i||i.length===0)return null;const s=[];let o=0,r=0;for(const l of i){if(!l||typeof l!="object")return null;const a=l;if(a.replace_all===!0)return null;const u=typeof a.old_string=="string"?a.old_string:void 0,c=typeof a.new_string=="string"?a.new_string:void 0;if(u===void 0||c===void 0||u.length>Uh||c.length>Uh)return null;const d=Ff(u,c);if(d===null)return null;s.length>0&&s.push({type:"hunk",text:"···"});for(const f of d)s.push({...f,oldNo:f.oldNo!==void 0?f.oldNo+o:void 0,newNo:f.newNo!==void 0?f.newNo+r:void 0});o+=Ul(u).length,r+=Ul(c).length}return s}const dee=5e3;function fee(e){if(ao(e.name)!=="write")return null;const t=$5(e.arg);return!t||typeof t.content!="string"||t.content.length>Uh||t.content.split(` +`).length>dee?null:{content:t.content,path:UT(t)}}function rC(e){const t=$5(e.arg);return t?UT(t):void 0}function VT(){let e=[],t=null,n=null,i=null,s,o=!0;const r=new WeakMap,l=a=>{const{messages:u,approvals:c}=a,d=a.sessionActive??!0,f=a.planReviewByToolCallId??{},p=a.plansByToolCallId??{},g=(S,M)=>r.set(S,M);let m=n!==null;if(m){const S=n,M=Object.keys(f);m=M.length===Object.keys(S).length&&M.every(_=>f[_]===S[_])}let y=i!==null;if(y){const S=i,M=Object.keys(p);y=M.length===Object.keys(S).length&&M.every(_=>p[_]===S[_])}const w=e.length>0&&c===t&&m&&y&&a.getFileUrl===s;let k=0,A=0,v=1;if(w){let S=-1;for(let M=e.length-1;M>=0;M--)if(e[M].role==="assistant"){S=M;break}for(let M=0;M<e.length;M++){const _=e[M],N=r.get(_);if(!N||N.length===0||M===S&&d!==o)break;let D=A+N.length<=u.length;for(let T=0;D&&T<N.length;T++)u[A+T]!==N[T]&&(D=!1);if(!D||M===S&&A+N.length!==u.length)break;k++,A+=N.length,_.role!=="compaction"&&v++}}const x=WT(u.slice(A),c,a.getFileUrl,d,f,p,{startNo:v,collect:g}),E=k>0?[...e.slice(0,k),...x]:x;return e=E,t=c,n={...f},i={...p},s=a.getFileUrl,o=d,E};return l.reset=()=>{e=[],t=null,n=null,i=null,s=void 0,o=!0},l}const ZT=["light","dark","system"],hee=["small","medium","large","xlarge"],ny="medium",GT="kimi-web.color-scheme",f3="kimi-web.font-scale",lC="kimi-web.ui-font-size";function h3(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function D5(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function pee(e){try{globalThis.localStorage.removeItem(e)}catch{}}function gee(){const e=h3(GT);return e&&ZT.includes(e)?e:"system"}const $0={light:"#ffffff",dark:"#121212"};function mee(e){if(typeof document>"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"?$0.dark:e==="light"?$0.light:null;t.forEach(i=>{const o=(i.getAttribute("media")??"").includes("dark")?$0.dark:$0.light;i.setAttribute("content",n??o)})}function QT(e){return hee.includes(e)}function vee(e){return e<=13?"small":e<=15?"medium":e<=17?"large":"xlarge"}function yee(){const e=h3(f3);if(e==="xxlarge")return"xlarge";if(e!==null)return QT(e)?e:ny;const t=h3(lC);if(t===null)return ny;const n=Number(t),i=Number.isFinite(n)?vee(n):ny;return D5(f3,i),pee(lC),i}function bee(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=e)}const R5=Z(gee()),z5=Z(yee());let aC=!1;function kee(){aC||(aC=!0,Qe(R5,mee,{immediate:!0}),Qe(z5,bee,{immediate:!0}))}function Aee(e){ZT.includes(e)&&(R5.value=e,D5(GT,e))}function Cee(e){QT(e)&&(z5.value=e,D5(f3,e))}function YT(){return kee(),{colorScheme:R5,fontScale:z5,setColorScheme:Aee,setFontScale:Cee}}const D0=Z(!1);let uC=!1;function iy(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function rv(){return!uC&&typeof window<"u"&&typeof document<"u"&&(uC=!0,D0.value=iy(),new MutationObserver(()=>{D0.value=iy()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{D0.value=iy()})),D0}const wee=Symbol("KimiWebClientFacade"),xee="modulepreload",_ee=function(e){return"/"+e},cC={},ns=function(t,n,i){let s=Promise.resolve();if(n&&n.length>0){let r=function(u){return Promise.all(u.map(c=>Promise.resolve(c).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(u=>{if(u=_ee(u),u in cC)return;cC[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":xee,c||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(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"&&o(l.reason);return t().catch(o)})};function Ma(e,t){const n=t??{h:"h",m:"m",s:"s"},i=Math.max(0,Math.floor(e/1e3));if(i<60)return i===0?"":`${i}${n.s}`;const s=Math.floor(i/60);if(s<60){const l=i%60;return l===0?`${s}${n.m}`:`${s}${n.m}${l}${n.s}`}const o=Math.floor(s/60),r=s%60;return r===0?`${o}${n.h}`:`${o}${n.h}${r}${n.m}`}const JT=new Set(["read","bash","grep","search","glob","ls","web_fetch","edit","write"]);function XT(e){const t=ao(e);return t==="multi_edit"?"edit":t}function eL(e){const t=[],n=new Map;for(const i of e){if(i.kind==="thinking")continue;const s=XT(i.tool.name);let o=n.get(s);o||(o={count:0,errors:0},n.set(s,o),t.push(s)),o.count++,i.tool.status==="error"&&o.errors++}return{order:t,byKind:n}}function tL(e,t,n){return JT.has(t)?e(`tools.group.typed.${t}.done`,{count:n}):e("tools.group.countOther",{count:n})}function nL(e,t){return{text:e("tools.activity.failedClause",{count:t}),tone:"danger"}}function iL(e){return e.map(t=>t.fragments.map(n=>n.text).join("")).join(" · ")}function See(e,t,n={}){const{order:i,byKind:s}=eL(t),o=[];let r=!1;for(const l of i){const a=s.get(l);if(!a)continue;const u=[{text:tL(e,l,a.count),tone:"normal"}];a.errors>0&&(r=!0,u.push(nL(e,a.errors))),o.push({fragments:u})}if(n.durationMs!==void 0){const l=Ma(n.durationMs);l&&o.push({fragments:[{text:l,tone:"faint"}]})}return{clauses:o,plain:iL(o),hasError:r}}function Mee(e,t){if(t.kind==="thinking")return{fragments:[{text:e("thinking.streaming"),tone:"normal"}]};const n=XT(t.tool.name);let i=F5(e,t.tool.name,t.tool.arg);if(n==="write"&&i){const o=e("tools.chip.created");i.endsWith(o)&&(i=i.slice(0,i.length-o.length).trimEnd())}return{fragments:[{text:i&&JT.has(n)?e(`tools.activity.doing.${n}`,{subject:i}):e("tools.activity.busy"),tone:"normal"}]}}function Iee(e,t,n){const i=t.filter(c=>c!==n&&!(c.kind==="tool"&&c.tool.status==="running")),{order:s,byKind:o}=eL(i),r=e("tools.activity.liveDonePrefix"),l=[];for(const c of s){const d=o.get(c);if(!d)continue;const f=[{text:`${r}${tL(e,c,d.count)}`,tone:"faint"}];d.errors>0&&f.push(nL(e,d.errors)),l.push({fragments:f})}const a=n===null?null:Mee(e,n),u=a?[a,...l]:l;return{current:a,done:l,plain:iL(u)}}async function ro(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 Eee(e)}function Eee(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 Tee={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},Lee={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function Nee(e){const t=e?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!t)return;const n=Lee[t];if(n)return n;const i=t.lastIndexOf(".");if(!(i<=0))return Tee[t.slice(i+1)]}const Fee="kimi_desktop",Bee="platform",dC="kimi-desktop",fC="kimi-desktop-platform";function $ee(){let e=!1,t=null;try{const n=new URLSearchParams(window.location.search);n.has(Fee)?(sessionStorage.setItem(dC,"1"),e=!0):e=e||sessionStorage.getItem(dC)==="1";const i=n.get(Bee);i?(sessionStorage.setItem(fC,i),t=i):t=sessionStorage.getItem(fC)}catch{}return{isDesktop:e,platform:t}}const p3=$ee(),Wf=p3.isDesktop,Dc=p3.isDesktop&&p3.platform==="darwin",Dee=["faces","nature","food","activity","objects","symbols"],Ree=[["😀","faces","grinning smile happy 笑 开心"],["😄","faces","smile happy joy 笑 开心 高兴"],["😁","faces","grin beaming 咧嘴笑 开心"],["😂","faces","joy laugh tears 笑哭 爆笑"],["🤣","faces","rofl laugh rolling 笑翻 爆笑"],["😊","faces","blush shy happy 微笑 害羞"],["😉","faces","wink 眨眼"],["😍","faces","heart eyes love 爱心眼 喜欢 爱"],["🥰","faces","smiling hearts love 爱心 喜欢"],["😘","faces","kiss 飞吻 亲亲"],["😋","faces","yum tongue 好吃 馋"],["🤪","faces","zany crazy 鬼脸 疯"],["🤔","faces","thinking hmm consider 思考 想"],["🤨","faces","skeptical eyebrow 怀疑 挑眉"],["😐","faces","neutral meh 面无表情 无语"],["😑","faces","expressionless 面无表情 无语"],["🙄","faces","eye roll 翻白眼 无语"],["😶","faces","no mouth silent 无言 沉默"],["🫡","faces","salute 敬礼 收到"],["🤫","faces","shush quiet 嘘 安静"],["🤭","faces","oops giggle 捂嘴 偷笑"],["😴","faces","sleeping sleepy 睡觉 困"],["😪","faces","sleepy tired 困 疲惫"],["😷","faces","mask sick 口罩 生病"],["🤒","faces","sick fever 生病 发烧"],["🤕","faces","hurt bandage 受伤"],["🤢","faces","nauseated 恶心"],["🤯","faces","mind blown explode 震惊 爆炸"],["🥳","faces","party celebrate 庆祝 派对"],["🤩","faces","star struck 星星眼 激动"],["😎","faces","cool sunglasses 酷 墨镜"],["🥸","faces","disguise 伪装 假扮"],["🤓","faces","nerd geek 书呆子 学霸"],["😢","faces","cry sad 哭 难过"],["😭","faces","sob cry loudly 大哭 痛哭"],["😤","faces","triumph huff 哼 生气"],["😡","faces","angry rage mad 生气 愤怒"],["🤬","faces","swearing cursing 骂人 爆粗"],["😱","faces","scream fear 尖叫 害怕"],["😨","faces","fearful 害怕 恐惧"],["🥵","faces","hot heat 热 出汗"],["🥶","faces","cold freezing 冷 冻"],["🥴","faces","woozy drunk 晕 醉"],["😇","faces","angel innocent 天使 无辜"],["🙃","faces","upside down silly 倒脸 哭笑不得"],["💀","faces","skull dead 骷髅 笑死"],["👻","faces","ghost 鬼 幽灵"],["👍","faces","thumbs up like good 赞 好"],["👎","faces","thumbs down dislike 踩 差"],["👏","faces","clap applause 鼓掌 厉害"],["🙌","faces","raise hands celebrate 举手 庆祝"],["🙏","faces","pray thanks please 拜托 感谢 祈祷"],["💪","faces","muscle strong flex 加油 强壮 肌肉"],["👀","faces","eyes look watch 看 围观 眼睛"],["🤝","faces","handshake deal 握手 合作"],["✌️","faces","victory peace 胜利 耶"],["👋","faces","wave hello bye 挥手 你好 再见"],["🤞","faces","crossed fingers luck 祈祷 好运"],["👌","faces","ok okay 好的 可以"],["🫶","faces","heart hands love 比心 爱心"],["✍️","faces","writing hand 写字 记录"],["🧠","faces","brain smart 大脑 聪明"],["🦾","faces","mechanical arm 机械臂 力量"],["👤","faces","person user profile 个人 用户"],["👥","faces","people team group 团队 多人"],["🐶","nature","dog puppy 狗 小狗"],["🐱","nature","cat kitten 猫 小猫"],["🐭","nature","mouse rat 老鼠"],["🐹","nature","hamster 仓鼠"],["🐰","nature","rabbit bunny 兔子"],["🦊","nature","fox 狐狸"],["🐻","nature","bear 熊"],["🐼","nature","panda 熊猫"],["🐨","nature","koala 考拉"],["🐯","nature","tiger 老虎"],["🦁","nature","lion 狮子"],["🐮","nature","cow 牛"],["🐷","nature","pig 猪"],["🐸","nature","frog 青蛙"],["🐵","nature","monkey 猴子"],["🐔","nature","chicken 鸡"],["🐧","nature","penguin 企鹅"],["🐦","nature","bird 鸟"],["🐣","nature","chick hatching 小鸡 孵化"],["🦆","nature","duck 鸭子"],["🦉","nature","owl 猫头鹰"],["🐝","nature","bee 蜜蜂"],["🐛","nature","bug caterpillar 虫子 毛虫"],["🦋","nature","butterfly 蝴蝶"],["🐌","nature","snail slow 蜗牛 慢"],["🐢","nature","turtle slow 乌龟 慢"],["🐍","nature","snake 蛇"],["🐙","nature","octopus 章鱼"],["🦑","nature","squid 鱿鱼"],["🦐","nature","shrimp 虾"],["🦀","nature","crab 螃蟹"],["🐠","nature","tropical fish 鱼 热带鱼"],["🐳","nature","whale 鲸鱼"],["🦈","nature","shark 鲨鱼"],["🐊","nature","crocodile 鳄鱼"],["🦄","nature","unicorn 独角兽"],["🐴","nature","horse 马"],["🐑","nature","sheep 羊 绵羊"],["🐐","nature","goat 山羊"],["🦜","nature","parrot 鹦鹉"],["🌸","nature","blossom flower sakura 樱花 花"],["🌹","nature","rose flower 玫瑰 花"],["🌻","nature","sunflower 向日葵"],["🌷","nature","tulip 郁金香"],["🌱","nature","seedling sprout 发芽 幼苗"],["🌲","nature","tree evergreen 树 松树"],["🌳","nature","deciduous tree 树 大树"],["🌵","nature","cactus 仙人掌"],["🍀","nature","clover luck 四叶草 幸运"],["🍁","nature","maple leaf autumn 枫叶 秋天"],["🍄","nature","mushroom 蘑菇"],["🌈","nature","rainbow 彩虹"],["☀️","nature","sun sunny 太阳 晴"],["🌙","nature","moon crescent 月亮"],["⭐","nature","star 星星"],["🌟","nature","glowing star 星星 闪亮"],["☁️","nature","cloud 云"],["⛅","nature","partly cloudy 多云"],["🌧️","nature","rain rainy 下雨"],["❄️","nature","snowflake snow 雪 雪花"],["⛄","nature","snowman 雪人"],["⚡","nature","lightning bolt 闪电"],["🔥","nature","fire hot 火 燃"],["🌊","nature","wave ocean sea 海浪"],["🏔️","nature","mountain snow 雪山 山"],["☕","food","coffee 咖啡"],["🍵","food","tea 茶"],["🧋","food","bubble tea boba 奶茶"],["🥛","food","milk 牛奶"],["🍺","food","beer 啤酒"],["🍷","food","wine 红酒"],["🥂","food","champagne cheers 香槟 干杯"],["🥤","food","cup straw soda 饮料 可乐"],["🧃","food","juice box 果汁"],["🍎","food","apple 苹果"],["🍊","food","orange tangerine 橙子 橘子"],["🍋","food","lemon 柠檬"],["🍉","food","watermelon 西瓜"],["🍓","food","strawberry 草莓"],["🍑","food","peach 桃子"],["🥭","food","mango 芒果"],["🍍","food","pineapple 菠萝"],["🥝","food","kiwi 猕猴桃"],["🍇","food","grapes 葡萄"],["🍒","food","cherries 樱桃"],["🥑","food","avocado 牛油果"],["🥦","food","broccoli 西兰花"],["🌽","food","corn 玉米"],["🌶️","food","hot pepper spicy 辣椒 辣"],["🍔","food","burger hamburger 汉堡"],["🍟","food","fries 薯条"],["🍕","food","pizza 披萨"],["🌭","food","hot dog 热狗"],["🥪","food","sandwich 三明治"],["🌮","food","taco 墨西哥卷"],["🍜","food","ramen noodles 拉面 面条"],["🍝","food","spaghetti pasta 意面"],["🍣","food","sushi 寿司"],["🍱","food","bento 便当"],["🥟","food","dumpling 饺子"],["🍚","food","rice 米饭"],["🍞","food","bread 面包"],["🥐","food","croissant 可颂 牛角包"],["🧀","food","cheese 奶酪 芝士"],["🍳","food","cooking egg 煎蛋 做饭"],["🍦","food","ice cream 冰淇淋"],["🍰","food","cake 蛋糕"],["🎂","food","birthday cake 生日蛋糕"],["🍫","food","chocolate 巧克力"],["🍩","food","donut doughnut 甜甜圈"],["🍪","food","cookie 饼干"],["🍭","food","lollipop 棒棒糖"],["⚽","activity","soccer football 足球"],["🏀","activity","basketball 篮球"],["🏈","activity","american football 橄榄球"],["⚾","activity","baseball 棒球"],["🎾","activity","tennis 网球"],["🏐","activity","volleyball 排球"],["🏓","activity","ping pong 乒乓球"],["🏸","activity","badminton 羽毛球"],["🥊","activity","boxing 拳击"],["⛳","activity","golf 高尔夫"],["🎣","activity","fishing 钓鱼"],["🏊","activity","swim 游泳"],["🏄","activity","surf 冲浪"],["🚴","activity","cycling 骑行"],["🏋️","activity","weightlifting gym 举重 健身"],["🧘","activity","yoga meditation 瑜伽 冥想"],["🎮","activity","video game controller 游戏 游戏机"],["🎲","activity","dice 骰子"],["🎯","activity","target bullseye 目标 靶心"],["🎳","activity","bowling 保龄球"],["🎰","activity","slot machine 老虎机"],["♟️","activity","chess 国际象棋 棋"],["🎸","activity","guitar 吉他"],["🎹","activity","piano keyboard 钢琴"],["🥁","activity","drum 鼓"],["🎤","activity","microphone sing 麦克风 唱歌"],["🎧","activity","headphones 耳机"],["🎬","activity","clapper movie 电影 拍摄"],["🎨","activity","art palette paint 画画 艺术"],["🎭","activity","theater masks 戏剧 面具"],["🎪","activity","circus 马戏团"],["🎡","activity","ferris wheel 摩天轮"],["✈️","activity","airplane travel flight 飞机 旅行"],["🚗","activity","car drive 汽车 车"],["🚕","activity","taxi 出租车"],["🚌","activity","bus 公交车"],["🚑","activity","ambulance 救护车"],["🚒","activity","fire engine 消防车"],["🚀","activity","rocket launch ship 火箭 发射"],["🛸","activity","ufo flying saucer 飞碟"],["🚲","activity","bicycle bike 自行车"],["🛴","activity","scooter 滑板车"],["🚄","activity","bullet train 高铁 动车"],["🚢","activity","ship 船 轮船"],["⛵","activity","sailboat 帆船"],["🏠","activity","house home 房子 家"],["🏢","activity","office building 公司 办公楼"],["🏥","activity","hospital 医院"],["🏫","activity","school 学校"],["🏖️","activity","beach vacation 海滩 度假"],["⛺","activity","camping tent 露营 帐篷"],["🌋","activity","volcano 火山"],["🗺️","activity","map world 地图"],["🧭","activity","compass 指南针"],["💻","objects","laptop computer 电脑 笔记本"],["🖥️","objects","desktop computer 台式机 电脑"],["⌨️","objects","keyboard 键盘"],["🖱️","objects","computer mouse 鼠标"],["📱","objects","phone mobile 手机"],["🔋","objects","battery 电池"],["🔌","objects","plug electric 插头"],["💾","objects","floppy save 软盘 保存"],["📀","objects","cd disc 光盘"],["🎥","objects","movie camera 摄像机"],["📷","objects","camera 相机"],["🔭","objects","telescope 望远镜"],["📡","objects","satellite antenna 卫星 天线"],["🌐","objects","globe web internet 网络 全球 互联网"],["🕯️","objects","candle 蜡烛"],["💡","objects","bulb idea light 灯泡 点子"],["🔦","objects","flashlight 手电筒"],["📁","objects","folder 文件夹"],["📂","objects","open folder 文件夹 打开"],["🗂️","objects","card index archive 归档 索引"],["📅","objects","calendar date 日历 日期"],["📌","objects","pin pushpin 图钉 置顶"],["📍","objects","round pin location 定位 位置"],["📎","objects","paperclip attachment 回形针 附件"],["✂️","objects","scissors cut 剪刀 剪切"],["📏","objects","ruler 尺子"],["📝","objects","memo note write 备忘 记录"],["✏️","objects","pencil edit write 铅笔 编辑"],["📄","objects","document page 文档 文件"],["📃","objects","page curl 文档 文件"],["📑","objects","bookmark tabs 标签页 文档"],["📚","objects","books 书 书籍"],["📖","objects","open book 打开的书 阅读"],["🔖","objects","bookmark 书签"],["🏷️","objects","label tag 标签"],["📊","objects","bar chart stats 图表 统计"],["📈","objects","chart up growth 上涨 增长"],["📉","objects","chart down 下跌 下降"],["🔍","objects","search magnifier 搜索 查找"],["🔎","objects","search magnifier right 搜索 查找"],["🔒","objects","lock locked 锁 锁定"],["🔓","objects","unlock open 解锁"],["🔑","objects","key 钥匙 密钥"],["🔧","objects","wrench tool 扳手 工具"],["🔨","objects","hammer 锤子"],["🛠️","objects","tools hammer wrench 工具 修理"],["🧰","objects","toolbox 工具箱 工具"],["🪛","objects","screwdriver 螺丝刀 工具"],["🔩","objects","nut and bolt screw 螺母 螺栓"],["🏗️","objects","building construction crane 施工 建造"],["⚙️","objects","gear settings 齿轮 设置"],["🧲","objects","magnet 磁铁"],["⚗️","objects","alembic 蒸馏器 实验"],["🧪","objects","test tube experiment 实验 试管"],["🔬","objects","microscope science 显微镜 科学"],["🤖","objects","robot bot 机器人"],["👾","objects","alien monster game 外星人 游戏"],["💣","objects","bomb 炸弹"],["🧨","objects","firecracker 爆竹"],["🗑️","objects","trash delete 垃圾桶 删除"],["🧹","objects","broom clean 扫帚 清理"],["🧻","objects","toilet paper 纸巾"],["🧽","objects","sponge 海绵"],["📦","objects","package box 包裹 箱子"],["✉️","objects","envelope mail 邮件 信封"],["📮","objects","mailbox postbox 邮箱"],["📧","objects","email mail 邮件"],["📥","objects","inbox tray receive 收件箱 接收"],["📤","objects","outbox tray send 发件箱 发送"],["📞","objects","telephone receiver call phone 电话 通话"],["💬","objects","speech balloon chat message bubble 聊天 对话 气泡 消息"],["💭","objects","thought balloon thinking 思考 想法 气泡"],["📣","objects","megaphone announcement 喇叭 公告"],["📢","objects","loudspeaker broadcast 广播 喇叭 通知"],["🚨","objects","police light alert emergency 警报 告警 紧急"],["🗳️","objects","ballot box vote 投票箱 投票"],["🔗","objects","link chain 链接 连接"],["🧩","objects","puzzle piece plugin 拼图 插件"],["🪄","objects","magic wand 魔法 魔杖"],["🛡️","objects","shield security 盾牌 安全"],["⚔️","objects","crossed swords 交叉剑 战斗"],["💳","objects","credit card 信用卡"],["💰","objects","money bag 钱袋 钱"],["🧾","objects","receipt 收据 小票"],["📿","objects","prayer beads 念珠"],["💍","objects","ring 戒指"],["👑","objects","crown 皇冠"],["🎩","objects","top hat 礼帽"],["🎒","objects","backpack 背包 书包"],["👓","objects","glasses 眼镜"],["🌂","objects","umbrella 雨伞"],["🕰️","objects","mantel clock 座钟"],["⌚","objects","watch 手表"],["⏱️","objects","stopwatch 秒表"],["🧯","objects","fire extinguisher 灭火器"],["🩹","objects","bandage patch fix 创可贴 补丁 修复"],["🎓","objects","graduation cap study learn 毕业 学习"],["🎫","objects","ticket 票 门票 工单"],["✅","symbols","check done complete 完成 对勾"],["✔️","symbols","checkmark correct 对勾 正确"],["❌","symbols","cross x wrong 错误 叉"],["❓","symbols","question help 问题 问号"],["❔","symbols","white question 问题 问号"],["❗","symbols","exclamation important 感叹号 重要"],["❕","symbols","white exclamation 感叹号"],["⚠️","symbols","warning caution 警告 注意"],["🚧","symbols","construction wip 施工 进行中"],["🚫","symbols","prohibited no 禁止"],["💥","symbols","boom explosion 爆炸"],["✨","symbols","sparkles shiny 闪亮 星星"],["🎉","symbols","tada party celebrate 庆祝 撒花"],["🎊","symbols","confetti party 庆祝 彩带"],["🏆","symbols","trophy champion 奖杯 冠军"],["🥇","symbols","gold medal first 金牌 第一"],["🥈","symbols","silver medal second 银牌 第二"],["🥉","symbols","bronze medal third 铜牌 第三"],["🎖️","symbols","military medal 勋章"],["🚩","symbols","red flag mark 红旗 标记"],["🏁","symbols","checkered flag finish 终点 完成"],["⏳","symbols","hourglass time waiting 沙漏 时间"],["⌛","symbols","hourglass done 沙漏 时间"],["🕐","symbols","clock one time 时钟 一点"],["⏰","symbols","alarm clock 闹钟"],["🔔","symbols","bell notification 铃铛 通知"],["🔕","symbols","bell slash mute 静音 免打扰"],["🕹️","symbols","joystick game 摇杆 游戏"],["🔴","symbols","red circle record 红圆 录制"],["🟢","symbols","green circle online 绿圆 在线"],["🟡","symbols","yellow circle 黄圆"],["🟠","symbols","orange circle 橙圆"],["🔵","symbols","blue circle 蓝圆"],["🟣","symbols","purple circle 紫圆"],["⚫","symbols","black circle 黑圆"],["⚪","symbols","white circle 白圆"],["🟥","symbols","red square 红方"],["🟩","symbols","green square 绿方"],["🟦","symbols","blue square 蓝方"],["🔺","symbols","red triangle up 三角 上"],["🔻","symbols","triangle down 三角 下"],["🔸","symbols","diamond orange 菱形"],["🔹","symbols","diamond blue 菱形"],["💠","symbols","diamond dot 菱形 花"],["🔶","symbols","diamond orange big 菱形"],["🔷","symbols","diamond blue big 菱形"],["▶️","symbols","play 播放"],["⏸️","symbols","pause 暂停"],["⏹️","symbols","stop 停止"],["⏺️","symbols","record 录制"],["⏩","symbols","fast forward 快进"],["⏪","symbols","rewind 快退"],["🔀","symbols","shuffle 随机 打乱"],["🔁","symbols","repeat 重复 循环"],["🔂","symbols","repeat one 单曲循环"],["🔄","symbols","refresh sync 刷新 同步"],["🔃","symbols","reload 重载"],["➕","symbols","plus add 加 新增"],["➖","symbols","minus 减"],["➗","symbols","divide 除"],["✖️","symbols","multiply 乘"],["💲","symbols","dollar money 美元 钱"],["™️","symbols","trademark 商标"],["©️","symbols","copyright 版权"],["®️","symbols","registered 注册商标"],["↔️","symbols","left right arrow 左右箭头"],["⬆️","symbols","up arrow 上箭头"],["⬇️","symbols","down arrow 下箭头"],["➡️","symbols","right arrow 右箭头"],["⬅️","symbols","left arrow 左箭头"],["🔙","symbols","back 返回"],["🔜","symbols","soon 很快"],["🔝","symbols","top 置顶 顶部"],["💤","symbols","zzz sleep 睡觉"],["🆕","symbols","new 新 新品"],["🆒","symbols","cool 酷"],["🆓","symbols","free 免费"],["🆗","symbols","ok 可以"],["🆙","symbols","up 提升"],["🆚","symbols","vs versus 对比"],["♾️","symbols","infinity 无限"],["💯","symbols","hundred perfect 满分 一百"],["💢","symbols","anger 生气"],["♨️","symbols","hot springs 温泉"],["🚸","symbols","children crossing 注意儿童"],["🔞","symbols","no one under eighteen 十八禁"],["📵","symbols","no mobile phones 禁止手机"],["❤️","symbols","red heart love 红心 爱"],["🧡","symbols","orange heart 橙心"],["💛","symbols","yellow heart 黄心"],["💚","symbols","green heart 绿心"],["💙","symbols","blue heart 蓝心"],["💜","symbols","purple heart 紫心"],["🖤","symbols","black heart 黑心"],["🤍","symbols","white heart 白心"],["🤎","symbols","brown heart 棕心"],["💔","symbols","broken heart 心碎"],["💕","symbols","two hearts 双心 爱心"],["💖","symbols","sparkling heart 闪亮的心"],["💗","symbols","growing heart 心动"]],sL=Ree.map(([e,t,n])=>({emoji:e,group:t,keywords:n}));function zee(e,t=24){const n=e.trim().toLowerCase();if(!n)return[];const i=[];for(const s of sL)if((s.keywords.includes(n)||s.emoji===n)&&(i.push(s.emoji),i.length>=t))break;return i}const Oee=8;function Pee(e,t,n=Oee){return[t,...e.filter(i=>i!==t)].slice(0,n)}function oL(e,t){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const i=new Date,s=c=>String(c).padStart(2,"0"),o=`${s(n.getHours())}:${s(n.getMinutes())}`,r=n.getFullYear()===i.getFullYear(),l=n.getMonth()===i.getMonth(),a=n.getDate()===i.getDate();if(r&&l&&a)return o;const u=new Date(i);return u.setDate(i.getDate()-1),n.getFullYear()===u.getFullYear()&&n.getMonth()===u.getMonth()&&n.getDate()===u.getDate()?`${t} ${o}`:r?`${s(n.getMonth()+1)}-${s(n.getDate())} ${o}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${o}`}catch{return e}}function Ia(e){if(e>=1024*1024)return`${hC(e/(1024*1024))}M`;if(e>=1024){const t=e/1024;return`${t>=100?Math.round(t):hC(t)}k`}return String(e)}function hC(e){const t=e.toFixed(1);return t.endsWith(".0")?t.slice(0,-2):t}function qf(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const jee=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function el(e){const t=e.replaceAll("\\","/"),n=jee.test(t),i=t.replace(/\/+$/,"");return n?i.toLowerCase():i}function Hee(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:i,sessionsHasMoreByWorkspace:s}=e,o=new Set(i.map(el)),r=new Map;for(const f of t){const p=el(f.root);o.has(p)||r.has(p)||r.set(p,{...f})}for(const f of n){const p=f.cwd;if(!p)continue;const g=el(p);o.has(g)||r.has(g)||r.set(g,{id:f.workspaceId??p,root:p,name:qf(p),sessionCount:0})}const l=new Map;for(const f of t){const p=el(f.root);l.has(p)||l.set(p,f.id)}const a=new Map;for(const f of n){const p=l.get(el(f.cwd))??f.workspaceId??f.cwd;a.set(p,(a.get(p)??0)+1)}const u=[];for(const f of t){const p=el(f.root);!o.has(p)&&!u.includes(p)&&u.push(p)}const c=[...r.keys()].filter(f=>!u.includes(f));c.sort((f,p)=>r.get(f).root.localeCompare(r.get(p).root));const d=[];for(const f of[...u,...c]){const p=r.get(f),g=a.get(p.id)??a.get(p.root)??0,m=s[p.id]===!1?g:Math.max(p.sessionCount,g);d.push({...p,sessionCount:m})}return d}function Wee(e,t){if(e===void 0||e.length===0)return;const n=t?.find(i=>i.id===e)??t?.find(i=>i.model===e);return n?.displayName||n?.model||(e.includes("/")?e.split("/").pop():e)}function qee(e){if(!(e===void 0||e.length===0||e==="off"||e==="on"))return e}function lv(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function rL(e){return e?.supportEfforts??[]}function Uee(e){return e[Math.floor(e.length/2)]}function G1(e){if(lv(e)==="unsupported")return"off";const t=rL(e);return t.length>0?e?.defaultEffort??Uee(t):"on"}function Ap(e){const t=rL(e),n=lv(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function g3(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function Kee(e){return e!=="off"}function Vee(e,t){return Ap(e).includes(t)}function O5(e,t){return t==="off"?"off":t==="on"?G1(e):t}function wm(e,t){return t??G1(e)}function Zee(e,t){if(e==="off")return{enabled:!1};if(e==="on")return{enabled:!0};const n=t?.at(-1);return n!==void 0&&e===n?{enabled:!0}:{enabled:!0,effort:e}}function Gee(e,t,n){return!n||e===void 0?t:G1(e)}let Qee=0;function m3(e,t){const n=++Qee;return e.pendingThinkingBySession[t]=n,n}function Ca(e,t,n){return n===void 0||e.pendingThinkingBySession[t]!==n?!1:(delete e.pendingThinkingBySession[t],!0)}function lL(e,t,n){e.pendingThinkingBySession[t]===void 0&&(e.thinkingBySession[t]=n)}function aL(){return window.kimiDesktop}function R0(){return typeof aL()?.getPathForFile=="function"}function uL(e){const t=aL()?.getPathForFile;if(typeof t!="function")return null;try{return t(e)}catch{return null}}function sy(e){return Array.from(e.dataTransfer?.items??[]).some(t=>t.kind==="file"&&t.type==="")}function v3(e,t=uL){const n=Array.from(e.dataTransfer?.items??[]);if(n.length===0)return{files:Array.from(e.dataTransfer?.files??[]),folderPaths:[]};const i=[],s=[],o=new Set;for(const r of n){if(r.kind!=="file")continue;const l=r.getAsFile();if(l)if(r.webkitGetAsEntry()?.isDirectory===!0){const a=t(l);if(!a||o.has(a))continue;o.add(a),s.push(a)}else i.push(l)}return{files:i,folderPaths:s}}function Yee(e,t=uL){return v3(e,t).folderPaths}const Jee=/<summary>([\s\S]*?)<\/summary>/,Xee=/<resume_hint>([\s\S]*?)<\/resume_hint>/,oy=/<subagent\b([^>]*)>|<\/subagent>/g,ete="</subagent>",pC=/(completed|failed|aborted):\s*(\d+)/g,gC=/([a-z_]+)="([^"]*)"/g;function tte(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function nte(e){const t={};gC.lastIndex=0;let n;for(;(n=gC.exec(e))!==null;)t[n[1]]=tte(n[2]);return t}function ite(e){const t={completed:0,failed:0,aborted:0};pC.lastIndex=0;let n;for(;(n=pC.exec(e))!==null;){const i=n[1];t[i]=Number(n[2])}return t}function ste(e,t){const n=nte(e);return{outcome:n.outcome??"completed",item:n.item,agentId:n.agent_id,mode:n.mode,state:n.state,body:t.trim()}}function ote(e){const t=[],n=[];oy.lastIndex=0;let i;for(;(i=oy.exec(e))!==null;)if(i[0]===ete){if(n.length===0)continue;const s=n.pop();s&&n.length===0&&t.push(ste(s.attrs,e.slice(s.bodyStart,i.index)))}else n.length===0?n.push({attrs:i[1]??"",bodyStart:oy.lastIndex}):n.push(null);return t}function rte(e){if(e==null)return null;const t=Array.isArray(e)?e.join(` +`):e;if(!t.includes("<agent_swarm_result>"))return null;const n=Jee.exec(t)?.[1]?.trim()??"",{completed:i,failed:s,aborted:o}=ite(n),r=Xee.exec(t)?.[1]?.trim(),l=ote(t),a=i+s+o;return{summary:n,completed:i,failed:s,aborted:o,total:a>0?a:l.length,subagents:l,resumeHint:r}}const lte=/^[A-Za-z]:[\\/]/;function mC(e){return lte.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function av(e,t){if(!t)return null;const n=c=>c.replace(/\\/g,"/"),i=n(e);let s=n(t);s.length>1&&(s=s.replace(/\/+$/,""));const o=mC(s)||mC(i),r=o?s.toLowerCase():s,l=o?i.toLowerCase():i,a=r.endsWith("/")?r:`${r}/`;if(l!==r&&!l.startsWith(a))return null;const u=l===r?"":i.slice(a.length);return u.split("/").includes("..")?null:u||null}const xm="application/x-kimi-session-row";function ate(e,t){return e.includes(t)?e:[...e,t]}function cL(e,t){return e.includes(t)?e.filter(n=>n!==t):e}function ute(e,t){const n=new Set(t),i=new Map,s=[];for(const r of e)n.has(r.id)?i.set(r.id,r):s.push(r);const o=[];for(const r of t){const l=i.get(r);l!==void 0&&o.push(l)}return{pinned:o,unpinned:s}}function cte(e,t,n){return e.find(i=>i.window?.duration===t&&i.window?.unit===n)}const dte=30;function fte(e){return e!==void 0&&e<dte}function dL(e,t){if(e.window!==void 0){const{duration:n,unit:i}=e.window;return i==="week"?t("settings.planUsage.weekLimit",{n}):i==="day"?t("settings.planUsage.dayLimit",{n}):i==="hour"?t("settings.planUsage.hourLimit",{n}):t("settings.planUsage.minuteLimit",{n})}return e.name??t("settings.planUsage.genericLimit")}function fL(e,t){const n=Date.parse(e);if(Number.isNaN(n))return"";const i=Math.floor((n-Date.now())/1e3);if(i<=0)return t("settings.planUsage.resetDone");const s=Math.floor(i/86400),o=Math.floor(i%86400/3600),r=Math.floor(i%3600/60),l=[];return s>0?(l.push(t("settings.planUsage.durationDay",{n:s})),l.push(t("settings.planUsage.durationHour",{n:o})),l.push(t("settings.planUsage.durationMinute",{n:r}))):o>0?(l.push(t("settings.planUsage.durationHour",{n:o})),l.push(t("settings.planUsage.durationMinute",{n:r}))):r>0?l.push(t("settings.planUsage.durationMinute",{n:r})):l.push(t("settings.planUsage.durationSecond",{n:i})),t("settings.planUsage.resetsIn",{duration:l.join(" ")})}function y3(e,t){if(t<=0)return"ok";const n=e/t;return n>=.85?"danger":n>=.5?"warn":"ok"}function wg(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))}function hte(e,t){const n=(e/100).toFixed(2);switch(t.toUpperCase()){case"CNY":return{symbol:"¥",number:n};case"USD":return{symbol:"$",number:n};default:return{symbol:"",number:`${n} ${t}`}}}const pte=["kimi","openai","openai_responses","anthropic","google-genai","vertexai"];function z0(){return{model:"",maxContextSize:"",displayName:"",capabilities:["tool_use","thinking"],supportEfforts:[],adaptiveThinking:!0}}function b3(e,t){const n=[];for(const i of Object.values(t??{})){if(i===null||typeof i!="object")continue;const s=i;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(o=>typeof o=="string"):[],supportEfforts:Array.isArray(s.supportEfforts)?s.supportEfforts.filter(o=>typeof o=="string"):[],...typeof s.adaptiveThinking=="boolean"?{adaptiveThinking:s.adaptiveThinking}:{}})}return n}const hL=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function gte(e,t={}){const n=e.id.trim();if(n==="")return"idRequired";if(!hL.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 i of e.models){if(i.model.trim()==="")return"modelRequired";const s=i.maxContextSize.trim();if(s==="")return"contextSizeRequired";if(!/^\d+$/.test(s)||Number(s)<1)return"contextSizeInvalid"}return null}function pL(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 mte(e){const t=e.apiKey.trim(),n=e.baseUrl.trim();return{id:e.id.trim(),type:e.type,models:pL(e.models),...t===""?{}:{apiKey:t},...n===""?{}:{baseUrl:n}}}function vte(e,t,n){const i=pL(e.models),s=e.id.trim(),o=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:i,...o===""&&n?.includeBlankApiKey!==!0?{}:{apiKey:o},...r===""?{}:{baseUrl:r},...a!==""&&i.some(u=>u.model===a)?{defaultModel:a}:{}}}function gL(e){return e.id==="managed:kimi-code"&&e.type==="kimi"}const yte=/^(\d+)\t(.*)$/;function bte(e){const t=e.at(-1)===""?e.slice(0,-1):e;if(t.length===0)return null;const n=[],i=[];for(const s of t){const o=yte.exec(s);if(!o)return null;i.push(Number(o[1])),n.push(o[2]??"")}return{contents:n,lineNumbers:i}}function mL(e,t){for(const n of e.stateMachineNames){const i=(e.stateMachineInputs(n)??[]).find(s=>s.name===t);if(i!==void 0)return i}return null}function kte(e,t){const n=mL(e,t);return n!==null&&typeof n.fire=="function"?(n.fire(),!0):!1}function vC(e,t,n){const i=mL(e,t);return i!==null&&typeof i.value==typeof n?(i.value=n,!0):!1}const ry={isPageHidden:()=>typeof document<"u"&&document.hidden,onVisibilityChange:e=>typeof document>"u"?()=>{}:(document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)),observeIntersection:(e,t)=>{if(typeof IntersectionObserver!="function")return()=>{};const n=new IntersectionObserver(i=>{const s=i[0];s!==void 0&&t(s.isIntersecting)});return n.observe(e),()=>n.disconnect()}};function vL(e,t,n={}){const i=n.isPageHidden??ry.isPageHidden,s=n.onVisibilityChange??ry.onVisibilityChange,o=n.observeIntersection??ry.observeIntersection;let r=!i(),l=!0,a=!1;function u(){const f=!r||!l;f!==a&&(a=f,a?e.pause():e.play())}const c=s(()=>{r=!i(),u()}),d=o(t,f=>{l=f,u()});return u(),()=>{c(),d()}}const Ate={"&":"&","<":"<",">":">",'"':""","'":"'"};function yC(e){return e.replace(/[&<>"']/g,t=>Ate[t]??t)}function Cte(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wte(e,t,n=40){const i=e.replace(/\s+/g," ").trim();if(i.length===0)return"";const s=t.trim();if(s.length===0)return bC(i,n*2);const o=i.toLowerCase().indexOf(s.toLowerCase());if(o<0)return bC(i,n*2);const r=Math.max(0,o-n),l=Math.min(i.length,o+s.length+n),a=r>0,u=l<i.length;return`${a?"…":""}${i.slice(r,l)}${u?"…":""}`}function bC(e,t){return e.length<=t?e:`${e.slice(0,t)}…`}function _h(e,t){const n=yC(e),i=t.trim();if(i.length===0)return n;const s=new RegExp(Cte(yC(i)),"gi");return n.replace(s,o=>`<mark>${o}</mark>`)}const to="kimi-web.server-credential",xte="token",_te=10080*60*1e3;let Ol;const k3=new Set;function Ste(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(xte);if(!n)return;const i=new URL(window.location.href);return i.hash="",window.history.replaceState(window.history.state,"",`${i.pathname}${i.search}`),n}function A3(e){return{version:1,credential:e,expiresAt:Date.now()+_te}}function Mte(e){return JSON.stringify(e)}function P5(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 C3(e){globalThis.localStorage?.setItem(to,Mte(e))}function Ite(){try{const e=globalThis.localStorage?.getItem(to);if(e){const n=P5(e);if(n===void 0){const i=A3(e);let s=!1;try{C3(i),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(to)===e&&globalThis.localStorage?.removeItem(to),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(to)}catch{}return s?i:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(to),globalThis.localStorage?.getItem(to)===e&&globalThis.localStorage?.removeItem(to);return}const t=globalThis.sessionStorage?.getItem(to);if(t){const n=A3(t);let i=!1;try{C3(n),i=!0}catch{}try{globalThis.sessionStorage?.removeItem(to),i=!0}catch{}return i?n:void 0}return}catch{return}}function Ete(){const e=Ste();return e?(yL(e),!0):(Ol=Ite(),Ol!==void 0)}function Tte(){if(Ol!==void 0){if(Ol.expiresAt<=Date.now()){Lte(Ol);return}return Ol.credential}}function Lte(e){Ol=void 0;try{globalThis.sessionStorage?.removeItem(to);const t=globalThis.localStorage?.getItem(to),n=t==null?void 0:P5(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(to)}catch{}}function yL(e){const t=A3(e);Ol=t;try{C3(t)}catch{}try{globalThis.sessionStorage?.removeItem(to)}catch{}}function Nte(){const e=Ol;Ol=void 0;try{const t=globalThis.localStorage?.getItem(to),i=(t==null?void 0:P5(t))?.credential??t;e!==void 0&&i===e.credential&&globalThis.localStorage?.removeItem(to),globalThis.sessionStorage?.removeItem(to)}catch{}}function Fte(e){return k3.add(e),()=>{k3.delete(e)}}function Bte(){Nte();for(const e of k3)try{e()}catch{}}function j5(e){return e.approvalCount>0?"awaiting-approval":e.questionCount>0?"awaiting-question":e.pendingInteraction==="approval"?"awaiting-approval":e.pendingInteraction==="question"?"awaiting-question":e.busy?"running":e.lastTurnReason==="failed"?"aborted":e.unread?"unread":"idle"}let kC;function $te(e){if(typeof Intl.Segmenter=="function")return kC??=new Intl.Segmenter("und",{granularity:"grapheme"}),kC.segment(e)}const Dte=/\p{Emoji_Presentation}/u,Rte=/\p{Regional_Indicator}/u,zte=/\p{Extended_Pictographic}/u,Ote="️";function Pte(e){return Dte.test(e)||Rte.test(e)?!0:zte.test(e)&&e.includes(Ote)}function bL(e){const t=$te(e)?.[Symbol.iterator]().next().value;if(t===void 0||!Pte(t.segment))return{emoji:null,rest:e};const n=e.slice(t.index+t.segment.length).replace(/^\s+/,"");return{emoji:t.segment,rest:n}}function jte(e,t){const{rest:n}=bL(e),i=t?.trim()??"";return i?n?`${i} ${n}`:i:n}function Hte(e,t){const n=e.findIndex(o=>o.id===t.id);if(n!==-1&&e[n].updatedAt===t.updatedAt)return e.map(o=>o.id===t.id?t:o);const i=e.filter(o=>o.id!==t.id),s=i.findIndex(o=>o.updatedAt<t.updatedAt);return s===-1?[...i,t]:[...i.slice(0,s),t,...i.slice(s)]}const w3="/sessions/";function AC(e){const{pathname:t}=e;if(!t.startsWith(w3))return;const n=t.slice(w3.length);if(!(!n||n.includes("/")))try{const i=decodeURIComponent(n);return i.length>0?i:void 0}catch{return}}function Wte(e){return e===void 0||e.length===0?"/":`${w3}${encodeURIComponent(e)}`}function zu(e){return Array.isArray?Array.isArray(e):AL(e)==="[object Array]"}function qte(e){if(typeof e=="string")return e;if(typeof e=="bigint")return e.toString();const t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function x3(e){return e==null?"":qte(e)}function ko(e){return typeof e=="string"}function xg(e){return typeof e=="number"}function Ute(e){return e===!0||e===!1||Kte(e)&&AL(e)=="[object Boolean]"}function kL(e){return typeof e=="object"}function Kte(e){return kL(e)&&e!==null}function mr(e){return e!=null}function O0(e){return!e.trim().length}function AL(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Vte="Incorrect 'index' type",_3="Invalid doc index: must be a non-negative integer within the bounds of the docs array",Zte=e=>`Invalid value for key ${e}`,Gte=e=>`Pattern length exceeds max of ${e}.`,Qte=e=>`Missing ${e} property in key`,Yte=e=>`Property 'weight' in key '${e}' must be a positive integer`,Jte="Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.",CC=Object.prototype.hasOwnProperty;var Xte=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{const i=CL(n);this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function CL(e){let t=null,n=null,i=null,s=1,o=null;if(ko(e)||zu(e))i=e,t=wC(e),n=_g(e);else{if(!CC.call(e,"name"))throw new Error(Qte("name"));const r=e.name;if(i=r,CC.call(e,"weight")&&e.weight!==void 0&&(s=e.weight,s<=0))throw new Error(Yte(_g(r)));t=wC(r),n=_g(r),o=e.getFn??null}return{path:t,id:n,weight:s,src:i,getFn:o}}function wC(e){return zu(e)?e:e.split(".")}function _g(e){return zu(e)?e.join("."):e}function ene(e,t){const n=[];let i=!1;const s=(o,r,l,a)=>{if(mr(o))if(!r[l])n.push(a!==void 0?{v:o,i:a}:o);else{const u=o[r[l]];if(!mr(u))return;if(l===r.length-1&&(ko(u)||xg(u)||Ute(u)||typeof u=="bigint"))n.push(a!==void 0?{v:x3(u),i:a}:x3(u));else if(zu(u)){i=!0;for(let c=0,d=u.length;c<d;c+=1)s(u[c],r,l+1,c)}else r.length&&s(u,r,l+1,a)}};return s(e,ko(t)?t.split("."):t,0),i?n:n[0]}const tne={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},nne={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},ine={location:0,threshold:.6,distance:100},sne={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:ene,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},vn=Object.freeze({...nne,...tne,...ine,...sne});function one(e){return e>=9&&e<=13||e===32||e===160}function rne(e=1,t=3){const n=new Map,i=Math.pow(10,t);return{get(s){let o=0,r=!1;for(let a=0;a<s.length;a++)one(s.charCodeAt(a))?r=!1:r||(o++,r=!0);if(o===0&&(o=1),n.has(o))return n.get(o);const l=Math.round(i/Math.pow(o,.5*e))/i;return n.set(o,l),l},clear(){n.clear()}}}var H5=class{constructor({getFn:e=vn.getFn,fieldNormWeight:t=vn.fieldNormWeight}={}){this.norm=rne(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,n)=>{this._keysMap[t.id]=n})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(ko(this.docs[0]))for(let n=0;n<e;n++){const i=this._createStringRecord(this.docs[n],n);i&&(this.records[t++]=i)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(_3);if(ko(e)){const i=this._createStringRecord(e,t);return i&&this.records.push(i),i}const n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(_3);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const i of e)Number.isInteger(i)&&i>=0&&t.add(i);if(t.size===0)return;this.records=this.records.filter(i=>!t.has(i.i));const n=Array.from(t).sort((i,s)=>i-s);for(const i of this.records){let s=0,o=n.length;for(;s<o;){const r=s+o>>>1;n[r]<i.i?s=r+1:o=r}i.i-=s}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!mr(e)||O0(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const n={i:t,$:{}};for(let i=0,s=this.keys.length;i<s;i++){const o=this.keys[i],r=o.getFn?o.getFn(e):this.getFn(e,o.path);if(mr(r)){if(zu(r)){const l=[];for(let a=0,u=r.length;a<u;a+=1){const c=r[a];if(mr(c)){if(ko(c)){if(!O0(c)){const d={v:c,i:a,n:this.norm.get(c)};l.push(d)}}else if(mr(c.v)){const d=ko(c.v)?c.v:x3(c.v);if(!O0(d)){const f={v:d,i:c.i,n:this.norm.get(d)};l.push(f)}}}}n.$[i]=l}else if(ko(r)&&!O0(r)){const l={v:r,n:this.norm.get(r)};n.$[i]=l}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function wL(e,t,{getFn:n=vn.getFn,fieldNormWeight:i=vn.fieldNormWeight}={}){const s=new H5({getFn:n,fieldNormWeight:i});return s.setKeys(e.map(CL)),s.setSources(t),s.create(),s}function lne(e,{getFn:t=vn.getFn,fieldNormWeight:n=vn.fieldNormWeight}={}){const{keys:i,records:s}=e,o=new H5({getFn:t,fieldNormWeight:n});return o.setKeys(i),o.setIndexRecords(s),o}function ane(e=[],t=vn.minMatchCharLength){const n=[];let i=-1,s=-1,o=0;for(let r=e.length;o<r;o+=1){const l=e[o];l&&i===-1?i=o:!l&&i!==-1&&(s=o-1,s-i+1>=t&&n.push([i,s]),i=-1)}return e[o-1]&&o-i>=t&&n.push([i,o-1]),n}function une(e,t,n,{location:i=vn.location,distance:s=vn.distance,threshold:o=vn.threshold,findAllMatches:r=vn.findAllMatches,minMatchCharLength:l=vn.minMatchCharLength,includeMatches:a=vn.includeMatches,ignoreLocation:u=vn.ignoreLocation}={}){if(t.length>32)throw new Error(Gte(32));const c=t.length,d=e.length,f=Math.max(0,Math.min(i,d));let p=o,g=f;const m=(_,N)=>{const D=_/c;if(u)return D;const T=Math.abs(f-N);return s?D+T/s:T?1:D},y=l>1||a,w=y?Array(d):[];let k;for(;(k=e.indexOf(t,g))>-1;){const _=m(0,k);if(p=Math.min(_,p),g=k+c,y){let N=0;for(;N<c;)w[k+N]=1,N+=1}}g=-1;let A=[],v=1,x=0,E=c+d;const S=1<<c-1;for(let _=0;_<c;_+=1){let N=0,D=E;for(;N<D;)m(_,f+D)<=p?N=D:E=D,D=Math.floor((E-N)/2+N);E=D;let T=Math.max(1,f-D+1);const $=r?d:Math.min(f+D,d)+c,P=Array($+2);P[$+1]=(1<<_)-1;for(let O=$;O>=T;O-=1){const R=O-1,W=n[e[R]];if(P[O]=(P[O+1]<<1|1)&W,_&&(P[O]|=(A[O+1]|A[O])<<1|1|A[O+1]),P[O]&S&&(v=m(_,R),v<=p)){if(p=v,g=R,x=_,g<=f)break;T=Math.max(1,2*f-g)}}if(m(_+1,f)>p)break;A=P}if(y&&g>=0){const _=Math.min(d-1,g+c-1+x);for(let N=g;N<=_;N+=1)n[e[N]]&&(w[N]=1)}const M={isMatch:g>=0,score:Math.max(.001,v)};if(y){const _=ane(w,l);_.length?a&&(M.indices=_):M.isMatch=!1}return M}function cne(e){const t={};for(let n=0,i=e.length;n<i;n+=1){const s=e.charAt(n);t[s]=(t[s]||0)|1<<i-n-1}return t}function W5(e){if(e.length<=1)return e;e.sort((n,i)=>n[0]-i[0]||n[1]-i[1]);const t=[e[0]];for(let n=1,i=e.length;n<i;n+=1){const s=t[t.length-1],o=e[n];o[0]<=s[1]+1?s[1]=Math.max(s[1],o[1]):t.push(o)}return t}const xL={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},dne=new RegExp("["+Object.keys(xL).join("")+"]","g"),Q1=typeof String.prototype.normalize=="function"?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(dne,t=>xL[t]):e=>e;var q5=class{constructor(e,{location:t=vn.location,threshold:n=vn.threshold,distance:i=vn.distance,includeMatches:s=vn.includeMatches,findAllMatches:o=vn.findAllMatches,minMatchCharLength:r=vn.minMatchCharLength,isCaseSensitive:l=vn.isCaseSensitive,ignoreDiacritics:a=vn.ignoreDiacritics,ignoreLocation:u=vn.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:i,includeMatches:s,findAllMatches:o,minMatchCharLength:r,isCaseSensitive:l,ignoreDiacritics:a,ignoreLocation:u},e=l?e:e.toLowerCase(),e=a?Q1(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const c=(f,p)=>{this.chunks.push({pattern:f,alphabet:cne(f),startIndex:p})},d=this.pattern.length;if(d>32){let f=0;const p=d%32,g=d-p;for(;f<g;)c(this.pattern.substr(f,32),f),f+=32;if(p){const m=d-32;c(this.pattern.substr(m),m)}}else c(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i}=this.options;if(e=t?e:e.toLowerCase(),e=n?Q1(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};const g={isMatch:!0,score:0};return i&&(g.indices=[[0,e.length-1]]),g}const{location:s,distance:o,threshold:r,findAllMatches:l,minMatchCharLength:a,ignoreLocation:u}=this.options,c=[];let d=0,f=!1;this.chunks.forEach(({pattern:g,alphabet:m,startIndex:y})=>{const{isMatch:w,score:k,indices:A}=une(e,g,m,{location:s+y,distance:o,threshold:r,findAllMatches:l,minMatchCharLength:a,includeMatches:i,ignoreLocation:u});w&&(f=!0),d+=k,w&&A&&c.push(...A)});const p={isMatch:f,score:f?d/this.chunks.length:1};return f&&i&&(p.indices=W5(c)),p}};const fne=new Set(["fuzzy","include"]);function hne(e){return e.startsWith("inverse")}const S3=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const n=t===e;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n=0,i;const s=[],o=e.length;for(;(i=t.indexOf(e,n))>-1;)n=i+o,s.push([i,n-1]);const r=!!s.length;return{isMatch:r,score:r?0:1,indices:s}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const n=t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const n=!t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const n=!t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const n=t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const n=t.indexOf(e)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const n=new q5(e,{location:t.location??vn.location,threshold:t.threshold??vn.threshold,distance:t.distance??vn.distance,includeMatches:t.includeMatches??vn.includeMatches,findAllMatches:t.findAllMatches??vn.findAllMatches,minMatchCharLength:t.minMatchCharLength??vn.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??vn.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??vn.ignoreDiacritics,ignoreLocation:t.ignoreLocation??vn.ignoreLocation});return{type:"fuzzy",search(i){return n.searchIn(i)}}}}],xC=S3.length,pne="\0",gne="|";function mne(e){const t=[],n=e.length;let i=0;for(;i<n;){for(;i<n&&e[i]===" ";)i++;if(i>=n)break;let s=i;for(;s<n&&e[s]!==" "&&e[s]!=='"';)s++;if(s<n&&e[s]==='"'){for(s++;s<n;){if(e[s]==='"'){const o=s+1;if(o>=n||e[o]===" "){s++;break}if(e[o]==="$"&&(o+1>=n||e[o+1]===" ")){s+=2;break}}s++}t.push(e.substring(i,s)),i=s}else{for(;s<n&&e[s]!==" ";)s++;t.push(e.substring(i,s)),i=s}}return t}function _C(e,t){const n=e.match(t);return n?n[1]:null}function vne(e,t={}){return e.replace(/\\\|/g,pne).split(gne).map(n=>{const i=mne(n.replace(/\u0000/g,"|").trim()).filter(o=>o&&!!o.trim()),s=[];for(let o=0,r=i.length;o<r;o+=1){const l=i[o];let a=!1,u=-1;for(;!a&&++u<xC;){const c=S3[u],d=_C(l,c.multiRegex);d&&(s.push(c.create(d,t)),a=!0)}if(!a)for(u=-1;++u<xC;){const c=S3[u],d=_C(l,c.singleRegex);if(d){s.push(c.create(d,t));break}}}return s})}var yne=class{constructor(e,{isCaseSensitive:t=vn.isCaseSensitive,ignoreDiacritics:n=vn.ignoreDiacritics,includeMatches:i=vn.includeMatches,minMatchCharLength:s=vn.minMatchCharLength,ignoreLocation:o=vn.ignoreLocation,findAllMatches:r=vn.findAllMatches,location:l=vn.location,threshold:a=vn.threshold,distance:u=vn.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i,minMatchCharLength:s,findAllMatches:r,ignoreLocation:o,location:l,threshold:a,distance:u},e=t?e:e.toLowerCase(),e=n?Q1(e):e,this.pattern=e,this.query=vne(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:i,ignoreDiacritics:s}=this.options;e=i?e:e.toLowerCase(),e=s?Q1(e):e;let o=0;const r=[];let l=0,a=!1;for(let u=0,c=t.length;u<c;u+=1){const d=t[u];r.length=0,o=0,a=!1;for(let f=0,p=d.length;f<p;f+=1){const g=d[f],{isMatch:m,indices:y,score:w}=g.search(e);if(m)o+=1,l+=w,hne(g.type)&&(a=!0),n&&(fne.has(g.type)?r.push(...y):r.push(y));else{l=0,o=0,r.length=0,a=!1;break}}if(o){const f={isMatch:!0,score:l/o};return a&&(f.hasInverse=!0),n&&(f.indices=W5(r)),f}}return{isMatch:!1,score:1}}};const M3=[];function U5(...e){M3.push(...e)}function _m(e,t){for(let n=0,i=M3.length;n<i;n+=1){const s=M3[n];if(s.condition(e,t))return new s(e,t)}return new q5(e,t)}const Sm={AND:"$and",OR:"$or"},I3={PATH:"$path",PATTERN:"$val"},E3=e=>!!(e[Sm.AND]||e[Sm.OR]),bne=e=>!!e[I3.PATH],kne=e=>!zu(e)&&kL(e)&&!E3(e),SC=e=>({[Sm.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function _L(e,t,{auto:n=!0}={}){const i=s=>{if(ko(s)){const a={keyId:null,pattern:s};return n&&(a.searcher=_m(s,t)),a}const o=Object.keys(s),r=bne(s);if(!r&&o.length>1&&!E3(s))return i(SC(s));if(kne(s)){const a=r?s[I3.PATH]:o[0],u=r?s[I3.PATTERN]:s[a];if(!ko(u))throw new Error(Zte(a));const c={keyId:_g(a),pattern:u};return n&&(c.searcher=_m(u,t)),c}const l={children:[],operator:o[0]};return o.forEach(a=>{const u=s[a];zu(u)&&u.forEach(c=>{l.children.push(i(c))})}),l};return E3(e)||(e=SC(e)),i(e)}function T3(e,{ignoreFieldNorm:t=vn.ignoreFieldNorm}){let n=1;return e.forEach(({key:i,norm:s,score:o})=>{const r=i?i.weight:null;n*=Math.pow(o===0&&r?Number.EPSILON:o,(r||1)*(t?1:s))}),n}function Ane(e,{ignoreFieldNorm:t=vn.ignoreFieldNorm}){e.forEach(n=>{n.score=T3(n.matches,{ignoreFieldNorm:t})})}var Cne=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){const t=this.heap;for(;e>0;){const n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;const i=t[e];t[e]=t[n],t[n]=i,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let i=e;do{e=i;const s=2*e+1,o=2*e+2;if(s<n&&this.comparator(t[s],t[i])>0&&(i=s),o<n&&this.comparator(t[o],t[i])>0&&(i=o),i!==e){const r=t[e];t[e]=t[i],t[i]=r}}while(i!==e)}};function wne(e){const t=[];return e.matches.forEach(n=>{if(!mr(n.indices)||!n.indices.length)return;const i={indices:n.indices,value:n.value};n.key&&(i.key=n.key.id),n.idx>-1&&(i.refIndex=n.idx),t.push(i)}),t}function xne(e,t,{includeMatches:n=vn.includeMatches,includeScore:i=vn.includeScore}={}){return e.map(s=>{const{idx:o}=s,r={item:t[o],refIndex:o};return n&&(r.matches=wne(s)),i&&(r.score=s.score),r})}const _ne=/[\p{L}\p{M}\p{N}_]+/gu,MC=new WeakSet;function Sne(e){MC.has(e)||(MC.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function Mne(e){if(typeof e=="function"){let t=!1;return n=>{const i=e(n);if(!t&&(t=!0,!Array.isArray(i)||i.some(s=>typeof s!="string")))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(i)?"array containing non-strings":typeof i}.`);return i}}return e instanceof RegExp?(e.global||Sne(e),t=>t.match(e)||[]):t=>t.match(_ne)||[]}function L3({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){const i=Mne(n);return{tokenize(s){return e||(s=s.toLowerCase()),t&&(s=Q1(s)),i(s)}}}var Ine=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=L3({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const n=this.analyzer.tokenize(e),{df:i,fieldCount:s}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const o of n){this.termSearchers.push(new q5(o,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const r=i.get(o)||0,l=Math.log(1+(s-r+.5)/(r+.5));this.idfWeights.push(l)}this.combineAll=t.tokenMatch==="all",this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,i=0,s=0,o=0;const r=this.combineAll&&!this.useMask?new Set:null;for(let u=0;u<this.termSearchers.length;u++){const c=this.termSearchers[u].searchIn(e),d=this.idfWeights[u];i+=d,c.isMatch&&(s++,n+=d*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?o|=1<<u:r.add(u)))}if(s===0)return{isMatch:!1,score:1};const l=i>0?1-n/i:0,a={isMatch:!0,score:Math.max(.001,l)};return this.options.includeMatches&&t.length&&(a.indices=W5(t)),this.combineAll&&(this.useMask?a.matchedMask=o:a.matchedTerms=r,a.termCount=this.numTerms),a}};function ly(e,t,n,i){const s=i.tokenize(t);if(!s.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);const o=new Set(s);let r=e.docTermFieldHits.get(n);r||(r=new Map,e.docTermFieldHits.set(n,r));for(const l of o)r.set(l,(r.get(l)||0)+1),e.df.set(l,(e.df.get(l)||0)+1)}function SL(e,t,n,i){const{i:s,v:o,$:r}=t;if(o!==void 0){ly(e,o,s,i);return}if(r)for(let l=0;l<n;l++){const a=r[l];if(a)if(Array.isArray(a))for(const u of a)ly(e,u.v,s,i);else ly(e,a.v,s,i)}}function Ene(e,t,n){const i={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const s of e)SL(i,s,t,n);return i}function Tne(e,t,n,i){SL(e,t,n,i)}function Lne(e,t){const n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);const i=e.docTermFieldHits.get(t);if(i){for(const[s,o]of i){const r=(e.df.get(s)||0)-o;r<=0?e.df.delete(s):e.df.set(s,r)}e.docTermFieldHits.delete(t)}}function IC(e,t){if(t.length===0)return;const n=Array.from(new Set(t)).sort((l,a)=>l-a);for(const l of n)Lne(e,l);const i=l=>{let a=0,u=n.length;for(;a<u;){const c=a+u>>>1;n[c]<l?a=c+1:u=c}return l-a},s=n[0],o=new Map;for(const[l,a]of e.docFieldCount)o.set(l>s?i(l):l,a);e.docFieldCount=o;const r=new Map;for(const[l,a]of e.docTermFieldHits)r.set(l>s?i(l):l,a);e.docTermFieldHits=r}var Ou=class{constructor(e,t,n){this.options={...vn,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Xte(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=_m(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof H5))throw new Error(Vte);if(this._myIndex=t||wL(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=L3({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=Ene(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(e){if(!mr(e))return;this._docs.push(e);const t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){const n=L3({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});Tne(this._invertedIndex,t,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(e=()=>!1){const t=[],n=[];for(let i=0,s=this._docs.length;i<s;i+=1)e(this._docs[i],i)&&(t.push(this._docs[i]),n.push(i));if(n.length){this._invertedIndex&&IC(this._invertedIndex,n);const i=new Set(n);this._docs=this._docs.filter((s,o)=>!i.has(o)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw new Error(_3);this._invertedIndex&&IC(this._invertedIndex,[e]);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){const{limit:n=-1}=t||{},{includeMatches:i,includeScore:s,shouldSort:o,sortFn:r,ignoreFieldNorm:l}=this.options;if(ko(e)&&!e.trim()){let f=this._docs.map((p,g)=>({item:p,refIndex:g}));return xg(n)&&n>-1&&(f=f.slice(0,n)),f}const a=o&&xg(n)&&n>0&&ko(e),u=r,c=(f,p)=>u(f,p)||f.idx-p.idx;let d;if(a){const f=new Cne(n,c);ko(this._docs[0])?this._searchStringList(e,{heap:f,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:f,ignoreFieldNorm:l}),d=f.extractSorted()}else d=ko(e)?ko(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),Ane(d,{ignoreFieldNorm:l}),o&&d.sort(ko(e)?c:u),xg(n)&&n>-1&&(d=d.slice(0,n));return xne(d,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:o}=this._myIndex,r=t?null:[];return o.forEach(({v:l,i:a,n:u})=>{if(!mr(l))return;const c=i.searchIn(l);if(c.isMatch){const d={score:c.score,value:l,norm:u,indices:c.indices};s&&(d.matchedMask=c.matchedMask,d.matchedTerms=c.matchedTerms,d.termCount=c.termCount);const f=[d];if(!s||this._coversAllTokens(f)){const p={item:l,idx:a,matches:f};t?(p.score=T3(p.matches,{ignoreFieldNorm:n}),t.insert(p)):r.push(p)}}}),r}_searchLogical(e){const t=_L(e,this.options),n=this._normalizedKeys(),i=(l,a,u)=>{if(!("children"in l)){const{keyId:p,searcher:g}=l;let m;return p===null?(m=[],n.forEach((y,w)=>{m.push(...this._findMatches({key:y,value:a[w],searcher:g}))})):m=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(a,p),searcher:g}),m&&m.length?[{idx:u,item:a,matches:m}]:[]}const{children:c,operator:d}=l,f=[];for(let p=0,g=c.length;p<g;p+=1){const m=c[p],y=i(m,a,u);if(y.length)f.push(...y);else if(d===Sm.AND)return[]}return f},s=this._myIndex.records,o=new Map,r=[];return s.forEach(({$:l,i:a})=>{if(mr(l)){const u=i(t,l,a);u.length&&(o.has(a)||(o.set(a,{idx:a,item:l,matches:[]}),r.push(o.get(a))),u.forEach(({matches:c})=>{o.get(a).matches.push(...c)}))}}),r}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:o}=this._myIndex,r=this._normalizedKeys(),l=t?null:[];return o.forEach(({$:a,i:u})=>{if(!mr(a))return;const c=[];let d=!1,f=!1;if(r.forEach((p,g)=>{const m=this._findMatches({key:p,value:a[g],searcher:i});m.length?(c.push(...m),m[0].hasInverse&&(f=!0)):d=!0}),!(f&&d)&&c.length&&(!s||this._coversAllTokens(c))){const p={idx:u,item:a,matches:c};t?(p.score=T3(p.matches,{ignoreFieldNorm:n}),t.insert(p)):l.push(p)}}),l}_findMatches({key:e,value:t,searcher:n}){if(!mr(t))return[];const i=[];if(zu(t))t.forEach(({v:s,i:o,n:r})=>{if(!mr(s))return;const l=n.searchIn(s);if(l.isMatch){const a={score:l.score,key:e,value:s,idx:o,norm:r,indices:l.indices,hasInverse:l.hasInverse};l.termCount!==void 0&&(a.matchedMask=l.matchedMask,a.matchedTerms=l.matchedTerms,a.termCount=l.termCount),i.push(a)}});else{const{v:s,n:o}=t,r=n.searchIn(s);if(r.isMatch){const l={score:r.score,key:e,value:s,norm:o,indices:r.indices,hasInverse:r.hasInverse};r.termCount!==void 0&&(l.matchedMask=r.matchedMask,l.matchedTerms=r.matchedTerms,l.termCount=r.termCount),i.push(l)}}return i}_coversAllTokens(e){const t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let i=0;for(let s=0;s<e.length;s++)i|=e[s].matchedMask||0;return i===2**t-1}const n=new Set;for(let i=0;i<e.length;i++){const s=e[i].matchedTerms;if(s)for(const o of s)n.add(o)}return n.size===t}};Ou.version="7.5.0";Ou.createIndex=wL;Ou.parseIndex=lne;Ou.config=vn;Ou.match=function(e,t,n){if(n&&n.useTokenSearch)throw new Error(Jte);return _m(e,{...vn,...n}).searchIn(t)};Ou.parseQuery=_L;U5(yne);U5(Ine);Ou.use=function(...e){e.forEach(t=>U5(t))};var Nne=Ou;const Fne=/^[\uD800-\uDBFF]$/,Bne=/^[\uDC00-\uDFFF]$/,$ne=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var EC;(function(e){e[e.Unknown=1e-13]="Unknown",e[e.Rule=1e-12]="Rule",e[e.DICT=2e-8]="DICT",e[e.Surname=1]="Surname",e[e.Custom=1]="Custom"})(EC||(EC={}));const Mr={Normal:1,Surname:10,Custom:100};function sl(e){var t;return e.length-(((t=e.match($ne))===null||t===void 0?void 0:t.length)||0)}function N3(e){const t=[];let n=0;for(;n<e.length;){const i=e[n];Fne.test(i)&&Bne.test(e[n+1])?(t.push(e.substring(n,n+2)),n+=2):(t.push(i),n+=1)}return t}class ML{constructor(){this.NumberDICT=[],this.StringDICT=new Map}get(t){if(t.length>1)return this.StringDICT.get(t);{const n=t.charCodeAt(0);return this.NumberDICT[n]}}set(t,n){if(t.length>1)this.StringDICT.set(t,n);else{const i=t.charCodeAt(0);this.NumberDICT[i]=n}}clear(){this.NumberDICT=[],this.StringDICT.clear()}}const Dne=["zh","ch","sh","z","c","s","b","p","m","f","d","t","n","l","g","k","h","j","q","x","r","y","w",""],Rne=["j","q","x"],zne=["uān","uán","uǎn","uàn","uan","uē","ué","uě","uè","ue","ūn","ún","ǔn","ùn","un","ū","ú","ǔ","ù","u"],One={uān:"üān",uán:"üán",uǎn:"üǎn",uàn:"üàn",uan:"üan",uē:"üē",ué:"üé",uě:"üě",uè:"üè",ue:"üe",ūn:"ǖn",ún:"ǘn",ǔn:"ǚn",ùn:"ǜn",un:"ün",ū:"ǖ",ú:"ǘ",ǔ:"ǚ",ù:"ǜ",u:"ü"},Pne=["ia","ian","iang","iao","ie","iu","iong","ua","uai","uan","uang","ue","ui","uo","üan","üe","van","ve"],TC={一:"yì",二:"èr",三:"sān",四:"sì",五:"wǔ",六:"liù",七:"qī",八:"bā",九:"jiǔ",十:"shí",百:"bǎi",千:"qiān",万:"wàn",亿:"yì",单:"dān",两:"liǎng",双:"shuāng",多:"duō",几:"jǐ",十一:"shí yī",零一:"líng yī",第一:"dì yī",一十:"yī shí",一十一:"yī shí yī"},LC={重:"chóng",行:"háng",斗:"dǒu",更:"gēng"};function jne(){const e={零一:"líng yī","〇一":"líng yī",十一:"shí yī",一十:"yī shí",第一:"dì yī",一十一:"yī shí yī"};for(let t in TC)for(let n in LC){const i=`${t}${n}`,s=`${TC[t]} ${LC[n]}`;e[i]=s}return e}const NC=jne(),Hne=Object.keys(NC).map(e=>({zh:e,pinyin:NC[e],probability:1e-12,length:sl(e),priority:Mr.Normal,dict:Symbol("rule")})),IL={不:{bú:[4]},一:{yí:[4],yì:[1,2,3]}},Wne={不:["的","而","之","后","也","还","地"],一:["的","而","之","后","也","还","是"]},qne=Object.keys(IL),F3={南宫:"nán gōng",第五:"dì wǔ",万俟:"mò qí",司马:"sī mǎ",上官:"shàng guān",欧阳:"ōu yáng",夏侯:"xià hóu",诸葛:"zhū gě",闻人:"wén rén",东方:"dōng fāng",赫连:"hè lián",皇甫:"huáng fǔ",尉迟:"yù chí",公羊:"gōng yáng",澹台:"tán tái",公冶:"gōng yě",宗政:"zōng zhèng",濮阳:"pú yáng",淳于:"chún yú",太叔:"tài shū",申屠:"shēn tú",公孙:"gōng sūn",仲孙:"zhòng sūn",轩辕:"xuān yuán",令狐:"líng hú",钟离:"zhōng lí",宇文:"yǔ wén",长孙:"zhǎng sūn",慕容:"mù róng",鲜于:"xiān yú",闾丘:"lǘ qiū",司徒:"sī tú",司空:"sī kōng",亓官:"qí guān",司寇:"sī kòu",仉督:"zhǎng dū",子车:"zǐ jū",颛孙:"zhuān sūn",端木:"duān mù",巫马:"wū mǎ",公西:"gōng xī",漆雕:"qī diāo",乐正:"yuè zhèng",壤驷:"rǎng sì",公良:"gōng liáng",拓跋:"tuò bá",夹谷:"jiá gǔ",宰父:"zǎi fǔ",榖梁:"gǔ liáng",段干:"duàn gān",百里:"bǎi lǐ",东郭:"dōng guō",南门:"nán mén",呼延:"hū yán",羊舌:"yáng shé",梁丘:"liáng qiū",左丘:"zuǒ qiū",东门:"dōng mén",西门:"xī mén",句龙:"gōu lóng",毌丘:"guàn qiū",赵:"zhào",钱:"qián",孙:"sūn",李:"lǐ",周:"zhōu",吴:"wú",郑:"zhèng",王:"wáng",冯:"féng",陈:"chén",褚:"chǔ",卫:"wèi",蒋:"jiǎng",沈:"shěn",韩:"hán",杨:"yáng",朱:"zhū",秦:"qín",尤:"yóu",许:"xǔ",何:"hé",吕:"lǚ",施:"shī",张:"zhāng",孔:"kǒng",曹:"cáo",严:"yán",华:"huà",金:"jīn",魏:"wèi",陶:"táo",姜:"jiāng",戚:"qī",谢:"xiè",邹:"zōu",喻:"yù",柏:"bǎi",水:"shuǐ",窦:"dòu",章:"zhāng",云:"yún",苏:"sū",潘:"pān",葛:"gě",奚:"xī",范:"fàn",彭:"péng",郎:"láng",鲁:"lǔ",韦:"wéi",昌:"chāng",马:"mǎ",苗:"miáo",凤:"fèng",花:"huā",方:"fāng",俞:"yú",任:"rén",袁:"yuán",柳:"liǔ",酆:"fēng",鲍:"bào",史:"shǐ",唐:"táng",费:"fèi",廉:"lián",岑:"cén",薛:"xuē",雷:"léi",贺:"hè",倪:"ní",汤:"tāng",滕:"téng",殷:"yīn",罗:"luó",毕:"bì",郝:"hǎo",邬:"wū",安:"ān",常:"cháng",乐:"yuè",于:"yú",时:"shí",傅:"fù",皮:"pí",卞:"biàn",齐:"qí",康:"kāng",伍:"wǔ",余:"yú",元:"yuán",卜:"bǔ",顾:"gù",孟:"mèng",平:"píng",黄:"huáng",和:"hé",穆:"mù",萧:"xiāo",尹:"yǐn",姚:"yáo",邵:"shào",湛:"zhàn",汪:"wāng",祁:"qí",毛:"máo",禹:"yǔ",狄:"dí",米:"mǐ",贝:"bèi",明:"míng",臧:"zāng",计:"jì",伏:"fú",成:"chéng",戴:"dài",谈:"tán",宋:"sòng",茅:"máo",庞:"páng",熊:"xióng",纪:"jǐ",舒:"shū",屈:"qū",项:"xiàng",祝:"zhù",董:"dǒng",梁:"liáng",杜:"dù",阮:"ruǎn",蓝:"lán",闵:"mǐn",席:"xí",季:"jì",麻:"má",强:"qiáng",贾:"jiǎ",路:"lù",娄:"lóu",危:"wēi",江:"jiāng",童:"tóng",颜:"yán",郭:"guō",梅:"méi",盛:"shèng",林:"lín",刁:"diāo",钟:"zhōng",徐:"xú",邱:"qiū",骆:"luò",高:"gāo",夏:"xià",蔡:"cài",田:"tián",樊:"fán",胡:"hú",凌:"líng",霍:"huò",虞:"yú",万:"wàn",支:"zhī",柯:"kē",昝:"zǎn",管:"guǎn",卢:"lú",莫:"mò",经:"jīng",房:"fáng",裘:"qiú",缪:"miào",干:"gān",解:"xiè",应:"yīng",宗:"zōng",丁:"dīng",宣:"xuān",贲:"bēn",邓:"dèng",郁:"yù",单:"shàn",杭:"háng",洪:"hóng",包:"bāo",诸:"zhū",左:"zuǒ",石:"shí",崔:"cuī",吉:"jí",钮:"niǔ",龚:"gōng",程:"chéng",嵇:"jī",邢:"xíng",滑:"huá",裴:"péi",陆:"lù",荣:"róng",翁:"wēng",荀:"xún",羊:"yáng",於:"yū",惠:"huì",甄:"zhēn",曲:"qū",家:"jiā",封:"fēng",芮:"ruì",羿:"yì",储:"chǔ",靳:"jìn",汲:"jí",邴:"bǐng",糜:"mí",松:"sōng",井:"jǐng",段:"duàn",富:"fù",巫:"wū",乌:"wū",焦:"jiāo",巴:"bā",弓:"gōng",牧:"mù",隗:"wěi",山:"shān",谷:"gǔ",车:"chē",侯:"hóu",宓:"mì",蓬:"péng",全:"quán",郗:"xī",班:"bān",仰:"yǎng",秋:"qiū",仲:"zhòng",伊:"yī",宫:"gōng",宁:"nìng",仇:"qiú",栾:"luán",暴:"bào",甘:"gān",钭:"tǒu",厉:"lì",戎:"róng",祖:"zǔ",武:"wǔ",符:"fú",刘:"liú",景:"jǐng",詹:"zhān",束:"shù",龙:"lóng",叶:"yè",幸:"xìng",司:"sī",韶:"sháo",郜:"gào",黎:"lí",蓟:"jì",薄:"bó",印:"yìn",宿:"sù",白:"bái",怀:"huái",蒲:"pú",邰:"tái",从:"cóng",鄂:"è",索:"suǒ",咸:"xián",籍:"jí",赖:"lài",卓:"zhuó",蔺:"lìn",屠:"tú",蒙:"méng",池:"chí",乔:"qiáo",阴:"yīn",鬱:"yù",胥:"xū",能:"nài",苍:"cāng",双:"shuāng",闻:"wén",莘:"shēn",党:"dǎng",翟:"zhái",谭:"tán",贡:"gòng",劳:"láo",逄:"páng",姬:"jī",申:"shēn",扶:"fú",堵:"dǔ",冉:"rǎn",宰:"zǎi",郦:"lì",雍:"yōng",郤:"xì",璩:"qú",桑:"sāng",桂:"guì",濮:"pú",牛:"niú",寿:"shòu",通:"tōng",边:"biān",扈:"hù",燕:"yān",冀:"jì",郏:"jiá",浦:"pǔ",尚:"shàng",农:"nóng",温:"wēn",别:"bié",庄:"zhuāng",晏:"yàn",柴:"chái",瞿:"qú",阎:"yán",充:"chōng",慕:"mù",连:"lián",茹:"rú",习:"xí",宦:"huàn",艾:"ài",鱼:"yú",容:"róng",向:"xiàng",古:"gǔ",易:"yì",慎:"shèn",戈:"gē",廖:"liào",庾:"yǔ",终:"zhōng",暨:"jì",居:"jū",衡:"héng",步:"bù",都:"dū",耿:"gěng",满:"mǎn",弘:"hóng",匡:"kuāng",国:"guó",文:"wén",寇:"kòu",广:"guǎng",禄:"lù",阙:"quē",东:"dōng",欧:"ōu",殳:"shū",沃:"wò",利:"lì",蔚:"wèi",越:"yuè",夔:"kuí",隆:"lóng",师:"shī",巩:"gǒng",厍:"shè",聂:"niè",晁:"cháo",勾:"gōu",敖:"áo",融:"róng",冷:"lěng",訾:"zī",辛:"xīn",阚:"kàn",那:"nā",简:"jiǎn",饶:"ráo",空:"kōng",曾:"zēng",母:"mǔ",沙:"shā",乜:"niè",养:"yǎng",鞠:"jū",须:"xū",丰:"fēng",巢:"cháo",关:"guān",蒯:"kuǎi",相:"xiàng",查:"zhā",后:"hòu",荆:"jīng",红:"hóng",游:"yóu",竺:"zhú",权:"quán",逯:"lù",盖:"gě",益:"yì",桓:"huán",公:"gōng",牟:"móu",哈:"hǎ",言:"yán",福:"fú",肖:"xiāo",区:"ōu",覃:"qín",朴:"piáo",繁:"pó",员:"yùn",句:"gōu",要:"yāo",过:"guō",钻:"zuān",谌:"chén",折:"shé",召:"shào",郄:"qiè",撒:"sǎ",甯:"nìng",六:"lù",啜:"chuài",行:"xíng"},Une=Object.keys(F3).map(e=>({zh:e,pinyin:F3[e],probability:1+sl(e),length:sl(e),priority:Mr.Surname,dict:Symbol("surname")})),FC={"bǎng páng pāng":["膀"],líng:["〇","伶","凌","刢","囹","坽","夌","姈","婈","孁","岺","彾","掕","昤","朎","柃","棂","櫺","欞","泠","淩","澪","灵","燯","爧","狑","玲","琌","瓴","皊","砱","祾","秢","竛","笭","紷","綾","绫","羐","羚","翎","聆","舲","苓","菱","蓤","蔆","蕶","蛉","衑","裬","詅","跉","軨","輘","酃","醽","鈴","錂","铃","閝","陵","零","霊","霗","霛","霝","靈","駖","魿","鯪","鲮","鴒","鸰","鹷","麢","齡","齢","龄","龗","㥄"],yī:["一","乊","伊","依","医","吚","咿","噫","壱","壹","夁","嫛","嬄","弌","揖","撎","檹","毉","洢","渏","漪","瑿","畩","祎","禕","稦","繄","蛜","衤","譩","辷","郼","醫","銥","铱","鷖","鹥","黟","黳"],"dīng zhēng":["丁"],"kǎo qiǎo yú":["丂"],qī:["七","倛","僛","凄","嘁","墄","娸","悽","慼","慽","戚","捿","柒","桤","桼","棲","榿","欺","沏","淒","漆","紪","緀","萋","褄","諆","迉","郪","鏚","霋","魌","鶈"],shàng:["丄","尙","尚","恦","緔","绱"],xià:["丅","下","乤","圷","夏","夓","懗","梺","疜","睱","罅","鎼","鏬"],hǎn:["丆","喊","浫","罕","豃","㘎"],"wàn mò":["万"],zhàng:["丈","仗","墇","嶂","帐","帳","幛","扙","杖","涱","痮","瘬","瘴","瞕","粀","胀","脹","賬","账","障"],sān:["三","厁","叁","弎","毵","毶","毿","犙","鬖"],"shàng shǎng shang":["上"],"qí jī":["丌","其","奇"],"bù fǒu":["不"],"yǔ yù yú":["与"],miǎn:["丏","偭","免","冕","勉","勔","喕","娩","愐","汅","沔","湎","睌","緬","缅","腼","葂","靦","鮸","𩾃"],gài:["丐","乢","匃","匄","戤","概","槩","槪","溉","漑","瓂","葢","鈣","钙","𬮿"],chǒu:["丑","丒","侴","吜","杽","瞅","矁","醜","魗"],zhuān:["专","叀","嫥","専","專","瑼","甎","砖","磗","磚","蟤","諯","鄟","顓","颛","鱄","䏝"],"qiě jū":["且"],pī:["丕","伓","伾","噼","坯","岯","憵","批","披","炋","狉","狓","砒","磇","礔","礕","秛","秠","耚","豾","邳","鈚","鉟","銔","錃","錍","霹","駓","髬","魾","𬳵"],shì:["世","丗","亊","事","仕","侍","冟","势","勢","卋","呩","嗜","噬","士","奭","嬕","室","市","式","弑","弒","恀","恃","戺","拭","揓","是","昰","枾","柿","栻","澨","烒","煶","眂","眎","眡","睗","示","礻","筮","簭","舐","舓","襫","視","视","觢","試","誓","諡","謚","试","谥","貰","贳","軾","轼","逝","遾","釈","释","釋","鈰","鉃","鉽","铈","飾","餙","餝","饰","鰘","䏡","𬤊"],qiū:["丘","丠","坵","媝","恘","恷","楸","秋","秌","穐","篍","緧","萩","蘒","蚯","蝵","蟗","蠤","趥","邱","鞦","鞧","鰌","鰍","鳅","鶖","鹙","龝"],bǐng:["丙","屛","怲","抦","昞","昺","柄","棅","炳","禀","秉","稟","苪","蛃","邴","鈵","陃","鞆","餅","餠","饼"],yè:["业","亱","僷","墷","夜","嶪","嶫","抴","捙","擛","擪","擫","晔","曄","曅","曗","曳","曵","枼","枽","業","洂","液","澲","烨","燁","爗","璍","皣","瞱","瞸","礏","腋","葉","謁","谒","邺","鄴","鍱","鐷","靥","靨","頁","页","餣","饁","馌","驜","鵺","鸈"],cóng:["丛","从","叢","婃","孮","従","徔","徖","悰","樷","欉","淙","灇","爜","琮","藂","誴","賨","賩","錝"],dōng:["东","倲","冬","咚","埬","岽","崬","徚","昸","東","氡","氭","涷","笗","苳","菄","蝀","鮗","鯟","鶇","鶫","鸫","鼕","𬟽"],sī:["丝","俬","凘","厮","司","咝","嘶","噝","媤","廝","恖","撕","斯","楒","泀","澌","燍","禗","禠","私","糹","絲","緦","纟","缌","罳","蕬","虒","蛳","蜤","螄","蟖","蟴","鉰","銯","鍶","鐁","锶","颸","飔","騦","鷥","鸶","鼶","㟃"],chéng:["丞","呈","城","埕","堘","塍","塖","宬","峸","惩","懲","成","承","挰","掁","揨","枨","棖","橙","檙","洆","溗","澂","珵","珹","畻","程","窚","筬","絾","脭","荿","誠","诚","郕","酲","鋮","铖","騬","鯎"],diū:["丟","丢","銩","铥"],liǎng:["両","两","兩","唡","啢","掚","緉","脼","蜽","裲","魉","魎","𬜯"],yǒu:["丣","卣","友","梄","湵","牖","禉","羑","聈","苃","莠","蜏","酉","銪","铕","黝"],yán:["严","厳","啱","喦","嚴","塩","壛","壧","妍","姸","娫","娮","岩","嵒","嵓","巌","巖","巗","延","揅","昖","楌","檐","櫩","欕","沿","炎","炏","狿","琂","盐","碞","筵","簷","莚","蔅","虤","蜒","言","訁","訮","詽","讠","郔","閆","閻","闫","阎","顏","顔","颜","鹽","麣","𫄧"],bìng:["並","併","倂","傡","垪","摒","栤","病","窉","竝","誁","靐","鮩"],"sàng sāng":["丧"],gǔn:["丨","惃","滚","滾","磙","緄","绲","蓘","蔉","衮","袞","輥","辊","鮌","鯀","鲧"],jiū:["丩","勼","啾","揪","揫","朻","究","糾","纠","萛","赳","阄","鬏","鬮","鳩","鸠"],"gè gě":["个","個","各"],yā:["丫","圧","孲","庘","押","枒","桠","椏","錏","鐚","鴉","鴨","鵶","鸦","鸭"],pán:["丬","媻","幋","槃","洀","瀊","爿","盘","盤","磐","縏","蒰","蟠","蹒","蹣","鎜","鞶"],"zhōng zhòng":["中"],jǐ:["丮","妀","己","戟","挤","掎","撠","擠","橶","泲","犱","脊","虮","蟣","魢","鱾","麂"],jiè:["丯","介","借","唶","堺","屆","届","岕","庎","徣","戒","楐","犗","玠","琾","界","畍","疥","砎","蚧","蛶","衸","褯","誡","诫","鎅","骱","魪"],fēng:["丰","仹","偑","僼","凨","凬","凮","妦","寷","封","峯","峰","崶","枫","楓","檒","沣","沨","渢","灃","烽","犎","猦","琒","疯","瘋","盽","砜","碸","篈","蘴","蜂","蠭","豐","鄷","酆","鋒","鎽","鏠","锋","霻","靊","飌","麷"],"guàn kuàng":["丱"],chuàn:["串","汌","玔","賗","釧","钏"],chǎn:["丳","产","冁","剷","囅","嵼","旵","浐","滻","灛","產","産","簅","蒇","蕆","諂","譂","讇","谄","鏟","铲","閳","闡","阐","骣","𬊤"],lín:["临","冧","壣","崊","嶙","斴","晽","暽","林","潾","瀶","燐","琳","璘","瞵","碄","磷","粦","粼","繗","翷","臨","轔","辚","遴","邻","鄰","鏻","阾","隣","霖","驎","鱗","鳞","麐","麟","𬴊","𬭸"],zhuó:["丵","劅","卓","啄","圴","妰","娺","撯","擆","擢","斫","斮","斱","斲","斵","晫","椓","浊","浞","濁","灼","烵","琸","硺","禚","窡","籗","籱","罬","茁","蠗","蠿","諁","諑","謶","诼","酌","鐲","镯","鵫","鷟","䓬","𬸦"],zhǔ:["丶","主","劯","嘱","囑","宔","帾","拄","渚","濐","煑","煮","燝","瞩","矚","罜","詝","陼","鸀","麈","𬣞"],bā:["丷","仈","八","叭","哵","夿","岜","巴","捌","朳","玐","疤","笆","粑","羓","芭","蚆","豝","釟"],wán:["丸","刓","完","岏","抏","捖","汍","烷","玩","琓","笂","紈","纨","翫","芄","貦","頑","顽"],dān:["丹","勯","匰","単","妉","媅","殚","殫","甔","眈","砃","箪","簞","耼","耽","聃","聸","褝","襌","躭","郸","鄲","酖","頕"],"wèi wéi":["为"],"jǐng dǎn":["丼"],"lì lí":["丽"],jǔ:["举","弆","挙","擧","椇","榉","榘","櫸","欅","矩","筥","聥","舉","莒","蒟","襷","踽","齟","龃"],piě:["丿","苤","鐅","𬭯"],fú:["乀","伏","俘","凫","刜","匐","咈","哹","垘","孚","岪","巿","帗","幅","幞","弗","彿","怫","扶","柫","栿","桴","氟","泭","浮","涪","澓","炥","玸","甶","畉","癁","祓","福","稪","符","箙","紱","紼","絥","綍","绂","绋","罘","罦","翇","艀","芙","芣","苻","茀","茯","菔","葍","虙","蚨","蜉","蝠","袚","袱","襆","襥","諨","豧","踾","輻","辐","郛","鉘","鉜","韍","韨","颫","髴","鮄","鮲","鳧","鳬","鴔","鵩","黻"],"yí jí":["乁"],yì:["乂","义","亄","亦","亿","伇","伿","佾","俋","億","兿","刈","劓","劮","勚","勩","匇","呓","呭","呹","唈","囈","圛","坄","垼","埸","奕","嫕","嬑","寱","屹","峄","嶧","帟","帠","幆","廙","异","弈","弋","役","忆","怈","怿","悒","意","憶","懌","懿","抑","挹","敡","易","晹","曀","曎","杙","枍","棭","榏","槸","檍","歝","殔","殪","殹","毅","浂","浥","浳","湙","溢","潩","澺","瀷","炈","焲","熠","熤","熼","燚","燡","燱","獈","玴","異","疫","痬","瘗","瘞","瘱","癔","益","瞖","穓","竩","篒","縊","繶","繹","绎","缢","義","羿","翊","翌","翳","翼","耴","肄","肊","膉","臆","艗","艺","芅","苅","萟","蓺","薏","藙","藝","蘙","虉","蜴","螠","衪","袣","裔","裛","褹","襼","訲","訳","詍","詣","誼","譯","議","讛","议","译","诣","谊","豙","豛","豷","貖","贀","跇","轶","逸","邑","鄓","醷","釴","鈠","鎰","鐿","镒","镱","阣","隿","霬","饐","駅","驛","驿","骮","鮨","鶂","鶃","鶍","鷁","鷊","鷧","鷾","鸃","鹝","鹢","黓","齸","𬬩","㑊","𫄷","𬟁"],nǎi:["乃","倷","奶","嬭","廼","氖","疓","艿","迺","釢"],wǔ:["乄","五","仵","伍","侮","倵","儛","午","啎","妩","娬","嫵","庑","廡","忤","怃","憮","摀","武","潕","熓","牾","玝","珷","瑦","甒","碔","舞","躌","迕","逜","陚","鵡","鹉","𣲘"],jiǔ:["久","乆","九","乣","奺","杦","汣","灸","玖","紤","舏","酒","镹","韭","韮"],"tuō zhé":["乇","杔","馲"],"me mó ma yāo":["么"],zhī:["之","倁","卮","巵","搘","支","栀","梔","椥","榰","汁","泜","疷","祗","祬","秓","稙","綕","肢","胑","胝","脂","芝","蘵","蜘","衼","隻","鳷","鴲","鼅","𦭜"],"wū wù":["乌"],zhà:["乍","咤","宱","搾","榨","溠","痄","蚱","詐","诈","醡","霅","䃎"],hū:["乎","乯","匢","匫","呼","唿","嘑","垀","寣","幠","忽","惚","昒","歑","泘","淴","滹","烀","苸","虍","虖","謼","軤","轷","雐"],fá:["乏","伐","傠","坺","垡","墢","姂","栰","浌","瞂","笩","筏","罚","罰","罸","藅","閥","阀"],"lè yuè yào lào":["乐","樂"],yín:["乑","吟","噖","嚚","圁","垠","夤","婬","寅","峾","崟","崯","檭","殥","泿","淫","滛","烎","犾","狺","璌","硍","碒","荶","蔩","訔","訚","訡","誾","鄞","鈝","銀","银","霪","鷣","齦"],pīng:["乒","俜","娉","涄","甹","砯","聠","艵","頩"],pāng:["乓","滂","胮","膖","雱","霶"],qiáo:["乔","侨","僑","嫶","憔","桥","槗","樵","橋","櫵","犞","瞧","硚","礄","荍","荞","蕎","藮","譙","趫","鐈","鞒","鞽","顦"],hǔ:["乕","琥","萀","虎","虝","錿","鯱"],guāi:["乖"],"chéng shèng":["乗","乘","娍"],yǐ:["乙","乛","以","倚","偯","嬟","崺","已","庡","扆","攺","敼","旑","旖","檥","矣","礒","笖","舣","艤","苡","苢","蚁","螘","蟻","裿","踦","輢","轙","逘","酏","釔","鈘","鉯","钇","顗","鳦","齮","𫖮","𬺈"],"háo yǐ":["乚"],"niè miē":["乜"],qǐ:["乞","企","启","唘","啓","啔","啟","婍","屺","杞","棨","玘","盀","綺","绮","芑","諬","起","邔","闙"],yě:["也","冶","嘢","埜","壄","漜","野"],xí:["习","喺","媳","嶍","席","椺","檄","漝","習","蓆","袭","襲","覡","觋","謵","趘","郋","鎴","隰","霫","飁","騱","騽","驨","鰼","鳛","𠅤","𫘬"],xiāng:["乡","厢","廂","忀","楿","欀","湘","瓖","稥","箱","緗","缃","膷","芗","萫","葙","薌","襄","郷","鄉","鄊","鄕","鑲","镶","香","驤","骧","鱜","麘","𬙋"],shū:["书","倏","倐","儵","叔","姝","尗","抒","掓","摅","攄","書","枢","梳","樞","殊","殳","毹","毺","淑","瀭","焂","疎","疏","紓","綀","纾","舒","菽","蔬","踈","軗","輸","输","鄃","陎","鮛","鵨"],dǒu:["乧","抖","枓","蚪","鈄","阧","陡"],shǐ:["乨","使","兘","史","始","宩","屎","榁","矢","笶","豕","鉂","駛","驶"],jī:["乩","僟","击","刉","刏","剞","叽","唧","喞","嗘","嘰","圾","基","墼","姬","屐","嵆","嵇","撃","擊","朞","机","枅","樭","機","毄","激","犄","玑","璣","畸","畿","癪","矶","磯","积","積","笄","筓","箕","簊","緁","羁","羇","羈","耭","肌","芨","虀","覉","覊","譏","譤","讥","賫","賷","赍","跻","踑","躋","躸","銈","錤","鐖","鑇","鑙","隮","雞","鞿","韲","飢","饑","饥","魕","鳮","鶏","鶺","鷄","鸄","鸡","齎","齏","齑","𬯀","𫓯","𫓹","𫌀"],náng:["乪","嚢","欜","蠰","饢"],jiā:["乫","佳","傢","加","嘉","抸","枷","梜","毠","泇","浃","浹","犌","猳","珈","痂","笳","糘","耞","腵","葭","袈","豭","貑","跏","迦","鉫","鎵","镓","鴐","麚","𬂩"],jù:["乬","倨","倶","具","剧","劇","勮","埧","埾","壉","姖","屦","屨","岠","巨","巪","怇","惧","愳","懅","懼","拒","拠","昛","歫","洰","澽","炬","烥","犋","秬","窭","窶","簴","粔","耟","聚","虡","蚷","詎","讵","豦","距","踞","躆","遽","邭","醵","鉅","鐻","钜","颶","飓","駏","鮔"],shí:["乭","十","埘","塒","姼","实","実","寔","實","峕","嵵","时","旹","時","榯","湜","溡","炻","祏","竍","蚀","蝕","辻","遈","鉐","飠","饣","鮖","鰣","鲥","鼫","鼭"],mǎo:["乮","冇","卯","峁","戼","昴","泖","笷","蓩","鉚","铆"],mǎi:["买","嘪","荬","蕒","買","鷶"],luàn:["乱","亂","釠"],rǔ:["乳","擩","汝","肗","辱","鄏"],xué:["乴","学","學","峃","嶨","斈","泶","澩","燢","穴","茓","袕","踅","鷽","鸴"],yǎn:["䶮","乵","俨","偃","儼","兖","兗","厣","厴","噞","孍","嵃","巘","巚","弇","愝","戭","扊","抁","掩","揜","曮","椼","檿","沇","渷","演","琰","甗","眼","罨","萒","蝘","衍","褗","躽","遃","郾","隒","顩","魇","魘","鰋","鶠","黡","黤","黬","黭","黶","鼴","鼹","齴","龑","𬸘","𬙂","𪩘"],fǔ:["乶","俌","俛","俯","府","弣","抚","拊","撫","斧","椨","滏","焤","甫","盙","簠","腐","腑","蜅","輔","辅","郙","釜","釡","阝","頫","鬴","黼","㕮","𫖯"],shā:["乷","唦","杀","桬","殺","毮","猀","痧","砂","硰","紗","繺","纱","蔱","裟","鎩","铩","閷","髿","魦","鯊","鯋","鲨"],nǎ:["乸","雫"],qián:["乹","亁","仱","偂","前","墘","媊","岒","拑","掮","榩","橬","歬","潛","潜","濳","灊","箝","葥","虔","軡","鈐","鉗","銭","錢","鎆","钤","钱","钳","靬","騚","騝","鰬","黔","黚"],suǒ:["乺","唢","嗩","所","暛","溑","溹","琐","琑","瑣","索","褨","鎖","鎻","鏁","锁"],yú:["乻","于","亐","伃","余","堣","堬","妤","娛","娯","娱","嬩","崳","嵎","嵛","愚","扵","揄","旟","楡","楰","榆","欤","歈","歟","歶","渔","渝","湡","漁","澞","牏","狳","玗","玙","瑜","璵","盂","睮","窬","竽","籅","羭","腴","臾","舁","舆","艅","茰","萮","萸","蕍","蘛","虞","虶","蝓","螸","衧","褕","覦","觎","諛","謣","谀","踰","輿","轝","逾","邘","酑","鍝","隅","雓","雩","餘","馀","騟","骬","髃","魚","魣","鮽","鯲","鰅","鱼","鷠","鸆","齵"],zhù:["乼","伫","佇","住","坾","墸","壴","嵀","拀","杼","柱","樦","殶","注","炷","疰","眝","祝","祩","竚","筯","箸","篫","簗","紵","紸","纻","羜","翥","苎","莇","蛀","註","貯","贮","跓","軴","鉒","鋳","鑄","铸","馵","駐","驻"],zhě:["乽","者","褶","襵","赭","踷","鍺","锗"],"qián gān":["乾"],"zhì luàn":["乿"],guī:["亀","圭","妫","媯","嫢","嬀","帰","归","摫","椝","槻","槼","櫷","歸","珪","瑰","璝","瓌","皈","瞡","硅","茥","蘬","規","规","邽","郌","閨","闺","騩","鬶","鬹"],"lǐn lìn":["亃"],jué:["亅","决","刔","劂","匷","厥","噊","孒","孓","崛","崫","嶥","彏","憠","憰","戄","抉","挗","掘","攫","桷","橛","橜","欮","氒","決","灍","焳","熦","爑","爴","爵","獗","玃","玦","玨","珏","瑴","瘚","矍","矡","砄","絕","絶","绝","臄","芵","蕝","蕨","虳","蟨","蟩","觖","觮","觼","訣","譎","诀","谲","貜","赽","趉","蹷","躩","鈌","鐍","鐝","钁","镢","鴂","鴃","鷢","𫘝","㵐","𫔎"],"le liǎo":["了"],"gè mā":["亇"],"yǔ yú":["予","懙"],zhēng:["争","佂","凧","姃","媜","峥","崝","崢","征","徰","炡","烝","爭","狰","猙","癥","眐","睁","睜","筝","箏","篜","聇","脀","蒸","踭","鉦","錚","鏳","鬇"],èr:["二","刵","咡","弍","弐","樲","誀","貮","貳","贰","髶"],chù:["亍","傗","儊","怵","憷","搐","斶","歜","珿","琡","矗","竌","絀","绌","臅","触","觸","豖","鄐","閦","黜"],kuī:["亏","刲","岿","巋","盔","窥","窺","聧","虧","闚","顝"],yún:["云","伝","勻","匀","囩","妘","愪","抣","昀","橒","沄","涢","溳","澐","熉","畇","秐","筼","篔","紜","縜","纭","耘","芸","蒷","蕓","郧","鄖","鋆","雲"],hù:["互","冱","嗀","嚛","婟","嫭","嫮","岵","帍","弖","怙","戶","户","戸","戽","扈","护","昈","槴","沍","沪","滬","熩","瓠","祜","笏","簄","粐","綔","蔰","護","豰","鄠","鍙","頀","鱯","鳠","鳸","鸌","鹱"],qí:["亓","剘","埼","岐","岓","崎","嵜","愭","掑","斉","斊","旂","旗","棊","棋","檱","櫀","歧","淇","濝","猉","玂","琦","琪","璂","畦","疧","碁","碕","祁","祈","祺","禥","竒","簯","簱","籏","粸","綥","綦","肵","脐","臍","艩","芪","萁","萕","蕲","藄","蘄","蚑","蚚","蛴","蜝","蜞","螧","蠐","褀","軝","鄿","釮","錡","锜","陭","頎","颀","騎","騏","騹","骐","骑","鬐","鬿","鯕","鰭","鲯","鳍","鵸","鶀","麒","麡","𨙸","𬨂","䓫"],jǐng:["井","儆","刭","剄","坓","宑","幜","憬","暻","殌","汫","汬","澋","璄","璟","璥","穽","肼","蟼","警","阱","頚","頸"],sì:["亖","佀","価","儩","兕","嗣","四","姒","娰","孠","寺","巳","柶","榹","汜","泗","泤","洍","洠","涘","瀃","牭","祀","禩","竢","笥","耜","肂","肆","蕼","覗","貄","釲","鈶","鈻","飤","飼","饲","駟","騃","驷"],suì:["亗","嬘","岁","嵗","旞","檖","歲","歳","澻","煫","燧","璲","砕","碎","祟","禭","穂","穗","穟","繀","繐","繸","襚","誶","譢","谇","賥","邃","鐆","鐩","隧","韢","𫟦","𬭼"],gèn:["亘","亙","揯","搄","茛"],yà:["亚","亜","俹","冴","劜","圔","圠","埡","娅","婭","揠","氩","氬","犽","砑","稏","聐","襾","覀","訝","讶","迓","齾"],"xiē suò":["些"],"qí zhāi":["亝","齊"],"yā yà":["亞","压","垭","壓","铔"],"jí qì":["亟","焏"],tóu:["亠","投","頭","骰"],"wáng wú":["亡"],"kàng háng gāng":["亢"],dà:["亣","眔"],jiāo:["交","僬","娇","嬌","峧","嶕","嶣","憍","椒","浇","澆","焦","礁","穚","簥","胶","膠","膲","茭","茮","蕉","虠","蛟","蟭","跤","轇","郊","鐎","驕","骄","鮫","鲛","鵁","鷦","鷮","鹪","䴔"],hài:["亥","嗐","害","氦","餀","饚","駭","駴","骇"],"hēng pēng":["亨"],mǔ:["亩","姆","峔","拇","母","牡","牳","畂","畆","畒","畝","畞","畮","砪","胟","踇","鉧","𬭁","𧿹"],ye:["亪"],xiǎng:["享","亯","响","想","晑","蚃","蠁","響","飨","餉","饗","饷","鮝","鯗","鱶","鲞"],jīng:["京","亰","兢","坕","坙","婛","惊","旌","旍","晶","橸","泾","涇","猄","睛","秔","稉","粳","精","経","經","綡","聙","腈","茎","荆","荊","菁","葏","驚","鯨","鲸","鶁","鶄","麖","麠","鼱","䴖"],tíng:["亭","停","婷","嵉","庭","廷","楟","榳","筳","聤","莛","葶","蜓","蝏","諪","邒","霆","鼮","䗴"],liàng:["亮","喨","悢","晾","湸","諒","谅","輌","輛","辆","鍄"],"qīn qìng":["亲","親"],bó:["亳","仢","侼","僰","博","帛","愽","懪","挬","搏","欂","浡","淿","渤","煿","牔","狛","瓝","礴","秡","箔","簙","糪","胉","脖","膊","舶","艊","萡","葧","袯","襏","襮","謈","踣","郣","鈸","鉑","鋍","鎛","鑮","钹","铂","镈","餺","馎","馛","馞","駁","駮","驳","髆","鵓","鹁"],yòu:["亴","佑","佦","侑","又","右","哊","唀","囿","姷","宥","峟","幼","狖","祐","蚴","誘","诱","貁","迶","酭","釉","鼬"],xiè:["亵","伳","偞","偰","僁","卨","卸","噧","塮","夑","媟","屑","屧","廨","徢","懈","暬","械","榍","榭","泻","洩","渫","澥","瀉","瀣","灺","炧","炨","燮","爕","獬","祄","禼","糏","紲","絏","絬","繲","纈","绁","缷","薢","薤","蟹","蠏","褉","褻","謝","谢","躞","邂","靾","韰","齂","齘","齛","齥","𬹼","𤫉"],"dǎn dàn":["亶","馾"],lián:["亷","劆","匲","匳","嗹","噒","奁","奩","嫾","帘","廉","怜","憐","涟","漣","濂","濓","瀮","熑","燫","簾","籢","籨","縺","翴","联","聨","聫","聮","聯","臁","莲","蓮","薕","螊","蠊","裢","褳","覝","謰","蹥","连","連","鎌","鐮","镰","鬑","鰱","鲢"],duǒ:["亸","哚","嚲","埵","崜","朵","朶","綞","缍","趓","躱","躲","軃"],"wěi mén":["亹","斖"],rén:["人","亻","仁","壬","忈","忎","朲","秂","芢","魜","鵀"],jí:["亼","亽","伋","佶","偮","卙","即","卽","及","叝","吉","堲","塉","姞","嫉","岌","嵴","嶯","彶","忣","急","愱","戢","揤","极","棘","楫","極","槉","檝","殛","汲","湒","潗","疾","瘠","皍","笈","箿","籍","級","级","膌","艥","蒺","蕀","蕺","蝍","螏","襋","觙","谻","踖","蹐","躤","輯","轚","辑","郆","銡","鍓","鏶","集","雧","霵","鹡","㴔"],wáng:["亾","仼","兦","莣","蚟"],"shén shí":["什"],lè:["仂","叻","忇","氻","泐","玏","砳","簕","艻","阞","韷","餎","鰳","鱳","鳓"],dīng:["仃","叮","帄","玎","疔","盯","耵","虰","靪"],zè:["仄","崱","庂","捑","昃","昗","汄"],"jǐn jìn":["仅","僅","嫤"],"pú pū":["仆"],"chóu qiú":["仇"],zhǎng:["仉","幥","掌","礃"],jīn:["今","堻","巾","惍","斤","津","珒","琻","璡","砛","筋","荕","衿","襟","觔","金","釒","釿","钅","鹶","黅","𬬱"],bīng:["仌","仒","兵","冫","冰","掤","氷","鋲"],réng:["仍","礽","芿","辸","陾"],fó:["仏","坲","梻"],"jīn sǎn":["仐"],lún:["仑","伦","侖","倫","囵","圇","婨","崘","崙","棆","沦","淪","磮","腀","菕","蜦","踚","輪","轮","錀","陯","鯩","𬬭"],cāng:["仓","仺","倉","凔","嵢","沧","滄","濸","獊","舱","艙","苍","蒼","螥","鸧"],"zǎi zǐ zī":["仔"],tā:["他","塌","它","榙","溻","牠","祂","褟","趿","遢","闧"],fù:["付","偩","傅","冨","副","咐","坿","复","妇","婦","媍","嬔","富","復","椱","祔","禣","竎","緮","縛","缚","腹","萯","蕧","蚹","蛗","蝜","蝮","袝","複","覄","覆","訃","詂","讣","負","賦","賻","负","赋","赙","赴","輹","鍑","鍢","阜","附","馥","駙","驸","鮒","鰒","鲋","鳆","㳇"],xiān:["仙","仚","佡","僊","僲","先","嘕","奾","屳","廯","忺","憸","掀","暹","杴","氙","珗","祆","秈","籼","繊","纎","纖","苮","褼","襳","跹","蹮","躚","酰","鍁","锨","韯","韱","馦","鱻","鶱","𬸣"],"tuō chà duó":["仛"],hóng:["仜","吰","垬","妅","娂","宏","宖","弘","彋","汯","泓","洪","浤","渱","潂","玒","玜","竑","竤","篊","粠","紘","紭","綋","纮","翃","翝","耾","苰","荭","葒","葓","谹","谼","鈜","鉷","鋐","閎","闳","霐","霟","鞃","魟","鴻","鸿","黉","黌","𫟹","𬭎"],tóng:["仝","佟","哃","峂","峝","庝","彤","晍","曈","桐","氃","浵","潼","犝","獞","眮","瞳","砼","秱","童","粡","膧","茼","蚒","詷","赨","酮","鉖","鉵","銅","铜","餇","鮦","鲖","𫍣","𦒍"],rèn:["仞","仭","刃","刄","妊","姙","屻","岃","扨","牣","祍","紉","紝","絍","纫","纴","肕","腍","衽","袵","訒","認","认","讱","軔","轫","鈓","靭","靱","韌","韧","飪","餁","饪"],qiān:["仟","佥","僉","千","圲","奷","孯","岍","悭","愆","慳","扦","拪","搴","撁","攐","攑","攓","杄","櫏","汘","汧","牵","牽","竏","签","簽","籖","籤","粁","芊","茾","蚈","褰","諐","謙","谦","谸","迁","遷","釺","鈆","鉛","鏲","钎","阡","韆","顅","騫","骞","鬜","鬝","鵮","鹐"],"gǎn hàn":["仠"],"yì gē":["仡"],dài:["代","侢","叇","垈","埭","岱","帒","带","帯","帶","廗","怠","戴","曃","柋","殆","瀻","玳","瑇","甙","簤","紿","緿","绐","艜","蝳","袋","襶","貣","贷","蹛","軑","軚","軩","轪","迨","霴","靆","鴏","黛","黱"],"lìng líng lǐng":["令"],chào:["仦","耖","觘"],"cháng zhǎng":["仧","兏","長","长"],sā:["仨"],cháng:["仩","偿","償","嘗","嚐","嫦","尝","常","徜","瑺","瓺","甞","肠","腸","膓","苌","萇","镸","鱨","鲿"],yí:["仪","侇","儀","冝","匜","咦","圯","夷","姨","宐","宜","宧","寲","峓","嶬","嶷","巸","彛","彜","彝","彞","怡","恞","扅","暆","栘","椬","椸","沂","洟","熪","瓵","痍","移","簃","籎","羠","胰","萓","蛦","螔","觺","謻","貽","贻","跠","迻","遺","鏔","頉","頤","頥","顊","颐","饴","鮧","鴺"],mù:["仫","凩","募","墓","幕","幙","慔","慕","暮","暯","木","楘","毣","沐","炑","牧","狇","目","睦","穆","艒","苜","莯","蚞","鉬","钼","雮","霂"],"men mén":["们"],fǎn:["仮","反","橎","返"],"chào miǎo":["仯"],"yǎng áng":["仰"],zhòng:["仲","众","堹","妕","媑","狆","眾","祌","筗","茽","蚛","衆","衶","諥"],"pǐ pí":["仳"],wò:["仴","偓","卧","媉","幄","握","楃","沃","渥","濣","瓁","瞃","硪","肟","腛","臥","齷","龌"],jiàn:["件","俴","健","僭","剑","剣","剱","劍","劎","劒","劔","墹","寋","建","徤","擶","旔","楗","毽","洊","涧","澗","牮","珔","瞷","磵","礀","箭","糋","繝","腱","臶","舰","艦","荐","薦","覸","諓","諫","譛","谏","賎","賤","贱","趝","践","踐","踺","轞","鉴","鍳","鍵","鐱","鑑","鑒","鑬","鑳","键","間","餞","饯","𬣡"],"jià jiè jie":["价"],"yǎo fó":["仸"],"rèn rén":["任"],"fèn bīn":["份"],dī:["仾","低","啲","埞","堤","岻","彽","樀","滴","磾","秪","羝","袛","趆","隄","鞮","䃅"],fǎng:["仿","倣","旊","昉","昘","瓬","眆","紡","纺","舫","訪","访","髣","鶭"],zhōng:["伀","刣","妐","幒","彸","忠","柊","汷","泈","炂","盅","籦","終","终","舯","蔠","蜙","螤","螽","衳","衷","蹱","鈡","鍾","鐘","钟","锺","鴤","鼨"],pèi:["伂","佩","姵","帔","斾","旆","沛","浿","珮","蓜","轡","辔","配","霈","馷"],diào:["伄","吊","弔","掉","瘹","盄","窎","窵","竨","訋","釣","鈟","銱","鋽","鑃","钓","铞","雿","魡"],dùn:["伅","潡","炖","燉","盾","砘","碷","踲","逇","遁","遯","鈍","钝"],wěn:["伆","刎","吻","呅","抆","桽","稳","穏","穩","紊","肳","脗"],xǐn:["伈"],kàng:["伉","匟","囥","抗","炕","鈧","钪"],ài:["伌","僾","塧","壒","嫒","嬡","愛","懓","暧","曖","爱","瑷","璦","皧","瞹","砹","硋","碍","礙","薆","譺","賹","鑀","隘","靉","餲","馤","鱫","鴱"],"jì qí":["伎","薺"],"xiū xǔ":["休"],"jìn yín":["伒"],dǎn:["伔","刐","撢","玬","瓭","紞","胆","膽","衴","賧","赕","黕","𬘘"],fū:["伕","呋","娐","孵","尃","怤","懯","敷","旉","玞","砆","稃","筟","糐","綒","肤","膚","荂","荴","衭","趺","跗","邞","鄜","酜","鈇","麩","麬","麱","麸","𫓧"],tǎng:["伖","傥","儻","埫","戃","曭","爣","矘","躺","鎲","钂","镋"],yōu:["优","優","呦","嚘","峳","幽","忧","悠","憂","攸","櫌","滺","瀀","纋","羪","耰","逌","鄾","麀"],huǒ:["伙","夥","火","煷","邩","鈥","钬"],"huì kuài":["会","會","浍","璯"],yǔ:["伛","俁","俣","偊","傴","匬","噳","圄","圉","宇","寙","屿","嶼","庾","挧","敔","斞","楀","瑀","瘐","祤","禹","穥","窳","羽","與","萭","貐","鄅","頨","麌","齬","龉","㺄"],cuì:["伜","啛","忰","悴","毳","淬","焠","疩","瘁","竁","粋","粹","紣","綷","翆","翠","脃","脆","脺","膬","膵","臎","萃","襊","顇"],sǎn:["伞","傘","糤","繖","饊","馓"],wěi:["伟","伪","偉","偽","僞","儰","娓","寪","屗","崣","嶉","徫","愇","捤","暐","梶","洧","浘","渨","炜","煒","猥","玮","瑋","痿","緯","纬","腲","艉","芛","苇","荱","萎","葦","蒍","蔿","蜼","諉","诿","踓","鍡","韑","韙","韡","韪","頠","颹","骩","骪","骫","鮪","鲔","𫇭","𬀩","𬱟"],"chuán zhuàn":["传","傳"],"chē jū":["伡","俥","车"],"jū chē":["車"],yá:["伢","厑","厓","堐","岈","崕","崖","涯","漄","牙","玡","琊","睚","笌","芽","蚜","衙","齖"],qiàn:["伣","俔","倩","儙","刋","壍","嬱","悓","棈","椠","槧","欠","歉","皘","篏","篟","縴","芡","蒨","蔳","輤","𬘬"],shāng:["伤","傷","商","墒","慯","殇","殤","滳","漡","熵","蔏","螪","觞","觴","謪","鬺"],chāng:["伥","倀","娼","昌","椙","淐","猖","琩","菖","裮","錩","锠","閶","阊","鯧","鲳","鼚"],"chen cāng":["伧"],xùn:["伨","侚","卂","噀","巺","巽","徇","愻","殉","殾","汛","潠","狥","蕈","訊","訓","訙","训","讯","迅","迿","逊","遜","鑂","顨","馴","驯"],xìn:["伩","囟","孞","脪","舋","衅","訫","釁","阠","顖"],chǐ:["伬","侈","卶","叺","呎","垑","恥","歯","耻","肔","胣","蚇","裭","褫","豉","鉹","齒","齿"],"xián xuán":["伭"],"nú nǔ":["伮"],"bó bǎi":["伯"],"gū gù":["估"],nǐ:["伱","你","儞","孴","拟","擬","旎","晲","狔","苨","薿","隬"],"nì ní":["伲"],bàn:["伴","办","半","姅","怑","扮","瓣","秚","絆","绊","辦","鉡","靽"],xù:["伵","侐","勖","勗","卹","叙","垿","壻","婿","序","恤","敍","敘","旭","昫","朂","槒","欰","殈","汿","沀","洫","溆","漵","潊","烅","烼","煦","獝","珬","盢","瞁","稸","絮","続","緒","緖","續","绪","续","聓","聟","蓄","藚","訹","賉","酗","頊","鱮","㳚"],zhòu:["伷","僽","冑","呪","咒","咮","宙","昼","晝","甃","皱","皺","籀","籒","籕","粙","紂","縐","纣","绉","胄","荮","葤","詋","酎","駎","驟","骤","㤘","㑇"],shēn:["伸","侁","兟","呻","堔","妽","娠","屾","峷","扟","敒","曑","柛","氠","深","燊","珅","甡","甧","申","眒","砷","穼","籶","籸","糂","紳","绅","罙","罧","葠","蓡","蔘","薓","裑","訷","詵","诜","身","駪","鯓","鯵","鰺","鲹","鵢","𬳽"],qū:["伹","佉","匤","呿","坥","屈","岖","岴","嶇","憈","抾","敺","浀","煀","祛","筁","粬","胠","蛆","蛐","袪","覻","詘","诎","趍","躯","軀","阹","駆","駈","驅","驱","髷","魼","鰸","鱋","鶌","麯","麴","麹","黢","㭕","𪨰","䓛"],"sì cì":["伺"],bēng:["伻","嘣","奟","崩","嵭","閍"],"sì shì":["似"],"jiā qié gā":["伽"],"yǐ chì":["佁"],"diàn tián":["佃","钿"],"hān gàn":["佄"],mài:["佅","劢","勱","卖","唛","売","脈","衇","賣","迈","邁","霡","霢","麥","麦","鿏"],dàn:["但","僤","啖","啗","啿","噉","嚪","帎","憺","旦","柦","氮","沊","泹","淡","狚","疍","癚","禫","窞","腅","萏","蓞","蛋","蜑","觛","訑","誕","诞","贉","霮","餤","饏","駳","髧","鴠","𫢸"],bù:["佈","勏","吥","咘","埗","埠","布","廍","怖","悑","步","歨","歩","瓿","篰","荹","蔀","踄","部","郶","鈈","钚","餢"],bǐ:["佊","俾","匕","夶","妣","彼","朼","柀","比","毞","沘","疕","秕","笔","筆","粃","聛","舭","貏","鄙"],"zhāo shào":["佋"],cǐ:["佌","此","泚","皉","𫚖"],wèi:["位","卫","味","喂","墛","媦","慰","懀","未","渭","煟","熭","犚","猬","畏","緭","罻","胃","苿","菋","藯","蘶","蝟","螱","衛","衞","褽","謂","讆","讏","谓","躗","躛","軎","轊","鏏","霨","餧","餵","饖","魏","鮇","鳚"],zuǒ:["佐","左","繓"],yǎng:["佒","傟","养","坱","岟","慃","懩","攁","氧","氱","炴","痒","癢","礢","紻","蝆","軮","養","駚"],"tǐ tī":["体","體"],zhàn:["佔","偡","嶘","战","戦","戰","栈","桟","棧","湛","站","綻","绽","菚","蘸","虥","虦","譧","轏","驏"],"hé hē hè":["何"],bì:["佖","咇","哔","嗶","坒","堛","壁","奰","妼","婢","嬖","币","幣","幤","庇","庳","廦","弊","弻","弼","彃","必","怭","愊","愎","敝","斃","梐","毕","毖","毙","湢","滗","滭","潷","煏","熚","狴","獘","獙","珌","璧","畀","畢","疪","痹","痺","皕","睤","碧","筚","箅","箆","篦","篳","粊","綼","縪","繴","罼","腷","苾","荜","萆","萞","蓖","蓽","蔽","薜","蜌","袐","襅","襞","襣","觱","詖","诐","貱","贔","赑","跸","蹕","躃","躄","避","邲","鄨","鄪","鉍","鏎","鐴","铋","閇","閉","閟","闭","陛","韠","飶","饆","馝","駜","驆","髀","魓","鮅","鷝","鷩","鼊"],tuó:["佗","坨","堶","岮","槖","橐","沱","砣","砤","碢","紽","詑","跎","酡","阤","陀","陁","駝","駞","騨","驒","驝","驼","鮀","鴕","鸵","鼉","鼍","鼧","𬶍"],shé:["佘","舌","虵","蛥"],"yì dié":["佚","昳","泆","軼"],"fó fú bì bó":["佛"],"zuò zuō":["作"],gōu:["佝","沟","溝","痀","篝","簼","緱","缑","袧","褠","鈎","鉤","钩","鞲","韝"],nìng:["佞","侫","倿","寕","泞","澝","濘"],qú:["佢","劬","戵","斪","欋","欔","氍","淭","灈","爠","璖","璩","癯","磲","籧","絇","胊","臞","菃","葋","蕖","蘧","蟝","蠷","蠼","衐","衢","躣","軥","鑺","鴝","鸜","鸲","鼩"],"yōng yòng":["佣"],wǎ:["佤","咓","砙","邷"],kǎ:["佧","垰","胩","裃","鉲"],bāo:["佨","勹","包","孢","煲","笣","胞","苞","蕔","裦","褒","襃","闁","齙","龅"],"huái huí":["佪"],"gé hè":["佫"],lǎo:["佬","咾","恅","栳","狫","珯","硓","老","耂","荖","蛯","轑","銠","铑","鮱"],xiáng:["佭","庠","栙","祥","絴","翔","詳","跭"],gé:["佮","匌","呄","嗝","塥","愅","挌","搿","槅","櫊","滆","膈","臵","茖","觡","諽","輵","轕","閣","阁","隔","鞷","韐","韚","騔","骼","鮯"],yáng:["佯","劷","垟","崸","徉","扬","揚","敭","旸","昜","暘","杨","楊","洋","炀","珜","疡","瘍","眻","蛘","諹","輰","鍚","钖","阦","阳","陽","霷","颺","飏","鰑","鴹","鸉"],bǎi:["佰","捭","摆","擺","栢","百","竡","粨","襬"],fǎ:["佱","峜","法","灋","砝","鍅"],mǐng:["佲","凕","姳","慏","酩"],"èr nài":["佴"],hěn:["佷","很","狠","詪","𬣳"],huó:["佸","活"],guǐ:["佹","匦","匭","厬","垝","姽","宄","庋","庪","恑","晷","湀","癸","祪","簋","蛫","蟡","觤","詭","诡","軌","轨","陒","鬼"],quán:["佺","全","啳","埢","姾","峑","巏","拳","搼","权","楾","権","權","泉","洤","湶","牷","犈","瑔","痊","硂","筌","縓","荃","葲","蜷","蠸","觠","詮","诠","跧","踡","輇","辁","醛","銓","铨","闎","顴","颧","駩","騡","鬈","鰁","鳈","齤"],tiāo:["佻","庣","旫","祧","聎"],jiǎo:["佼","儌","孂","挢","搅","撟","撹","攪","敫","敽","敿","晈","暞","曒","灚","燞","狡","璬","皎","皦","絞","纐","绞","腳","臫","蟜","譑","賋","踋","鉸","铰","餃","饺","鱎","龣"],cì:["佽","刾","庛","朿","栨","次","絘","茦","莿","蛓","螆","賜","赐"],xíng:["侀","刑","哘","型","娙","形","洐","硎","蛵","邢","郉","鈃","鉶","銒","钘","铏","陉","陘","餳","𫰛"],tuō:["侂","咃","咜","圫","托","拕","拖","汑","脫","脱","莌","袥","託","讬","飥","饦","魠","鮵"],kǎn:["侃","偘","冚","坎","惂","砍","莰","輡","轗","顑"],zhí:["侄","値","值","埴","執","姪","嬂","戠","执","摭","植","樴","淔","漐","直","禃","絷","縶","聀","职","職","膱","蟙","跖","踯","蹠","躑","軄","釞","馽"],gāi:["侅","垓","姟","峐","晐","畡","祴","荄","該","该","豥","賅","賌","赅","陔"],lái:["來","俫","倈","崃","崍","庲","来","梾","棶","涞","淶","猍","琜","筙","箂","莱","萊","逨","郲","錸","铼","騋","鯠","鶆","麳"],kuǎ:["侉","咵","垮","銙"],gōng:["侊","公","功","匑","匔","塨","宫","宮","工","幊","弓","恭","攻","杛","碽","糼","糿","肱","觥","觵","躬","躳","髸","龔","龚","䢼"],lì:["例","俐","俪","傈","儮","儷","凓","利","力","励","勵","历","厉","厤","厯","厲","叓","吏","呖","唎","唳","嚦","囇","坜","塛","壢","娳","婯","屴","岦","悧","悷","慄","戾","搮","暦","曆","曞","朸","枥","栃","栗","栛","檪","櫔","櫪","欐","歴","歷","沥","沴","涖","溧","濿","瀝","爏","犡","猁","珕","瑮","瓅","瓑","瓥","疬","痢","癧","盭","睙","砅","砺","砾","磿","礪","礫","礰","禲","秝","立","笠","篥","粒","粝","糲","脷","苈","茘","荔","莅","莉","蒚","蒞","藶","蚸","蛎","蛠","蜧","蝷","蠇","蠣","詈","讈","赲","轢","轣","轹","酈","鉝","隶","隷","雳","靂","靋","鬁","鳨","鴗","鷅","麜","𫵷","𬍛"],yīn:["侌","凐","喑","噾","囙","因","垔","堙","姻","婣","愔","慇","栶","氤","洇","溵","濦","瘖","禋","秵","筃","絪","緸","茵","蒑","蔭","裀","諲","銦","铟","闉","阥","阴","陰","陻","隂","霒","霠","鞇","音","韾","駰","骃","齗","𬘡","𬤇","𬮱"],mǐ:["侎","孊","弭","敉","洣","渳","灖","米","粎","羋","脒","芈","葞","蔝","銤"],zhū:["侏","株","槠","橥","櫧","櫫","洙","潴","瀦","猪","珠","硃","秼","絑","茱","蕏","蛛","蝫","蠩","袾","誅","諸","诛","诸","豬","跦","邾","銖","铢","駯","鮢","鯺","鴸","鼄"],ān:["侒","偣","媕","安","峖","庵","桉","氨","盦","盫","腤","菴","萻","葊","蓭","誝","諳","谙","鞌","鞍","韽","馣","鮟","鵪","鶕","鹌","𩽾"],lù:["侓","僇","勎","勠","圥","坴","塶","娽","峍","廘","彔","录","戮","摝","椂","樚","淕","淥","渌","漉","潞","琭","璐","甪","盝","睩","硉","祿","禄","稑","穋","箓","簏","簬","簵","簶","籙","粶","蔍","蕗","虂","螰","賂","赂","趢","路","踛","蹗","輅","轆","辂","辘","逯","醁","錄","録","錴","鏴","陸","騄","騼","鯥","鴼","鵦","鵱","鷺","鹭","鹿","麓","𫘧"],móu:["侔","劺","恈","眸","蛑","謀","谋","踎","鍪","鴾","麰"],ér:["侕","儿","児","兒","峏","栭","洏","粫","而","胹","荋","袻","輀","轜","陑","隭","髵","鮞","鲕","鴯","鸸"],"dòng tǒng tóng":["侗"],chà:["侘","奼","姹","岔","汊","詫","诧"],chì:["侙","傺","勅","勑","叱","啻","彳","恜","慗","憏","懘","抶","敕","斥","杘","湁","灻","炽","烾","熾","痓","痸","瘛","翄","翅","翤","翨","腟","赤","趩","遫","鉓","雴","飭","饬","鶒","鷘"],"gòng gōng":["供","共"],zhōu:["侜","周","喌","州","徟","洲","淍","炿","烐","珘","矪","舟","謅","譸","诌","賙","赒","輈","輖","辀","週","郮","銂","霌","駲","騆","鵃","鸼"],rú:["侞","儒","嚅","如","嬬","孺","帤","曘","桇","渪","濡","筎","茹","蕠","薷","蝡","蠕","袽","襦","邚","醹","銣","铷","顬","颥","鱬","鴑","鴽"],"jiàn cún":["侟"],xiá:["侠","俠","匣","峡","峽","敮","暇","柙","炠","烚","狎","狭","狹","珨","瑕","硖","硤","碬","祫","筪","縖","翈","舝","舺","蕸","赮","轄","辖","遐","鍜","鎋","陜","陿","霞","騢","魻","鶷","黠"],lǚ:["侣","侶","儢","吕","呂","屡","屢","履","挔","捛","旅","梠","焒","祣","稆","穭","絽","縷","缕","膂","膐","褛","褸","郘","鋁","铝"],ta:["侤"],"jiǎo yáo":["侥","僥","徺"],zhēn:["侦","偵","寊","帧","帪","幀","搸","斟","桢","楨","榛","樼","殝","浈","湞","潧","澵","獉","珍","珎","瑧","甄","眞","真","砧","碪","祯","禎","禛","箴","胗","臻","葴","蒖","蓁","薽","貞","贞","轃","遉","酙","針","鉁","錱","鍼","针","鱵"],"cè zè zhāi":["侧","側"],kuài:["侩","儈","凷","哙","噲","圦","块","塊","巜","廥","快","旝","欳","狯","獪","筷","糩","脍","膾","郐","鄶","鱠","鲙"],chái:["侪","儕","喍","柴","犲","祡","豺"],nóng:["侬","儂","农","哝","噥","檂","欁","浓","濃","燶","禯","秾","穠","脓","膿","蕽","襛","譨","農","辳","醲","鬞","𬪩"],jǐn:["侭","儘","卺","厪","巹","槿","漌","瑾","紧","緊","菫","蓳","謹","谨","錦","锦","饉","馑"],"hóu hòu":["侯","矦"],jiǒng:["侰","僒","冏","囧","泂","澃","炯","烱","煚","煛","熲","燛","窘","綗","褧","迥","逈","顈","颎","䌹"],"chěng tǐng":["侱"],"zhèn zhēn":["侲","揕"],zuò:["侳","做","唑","坐","岝","岞","座","祚","糳","胙","葃","葄","蓙","袏","阼"],qīn:["侵","兓","媇","嵚","嶔","欽","衾","誛","钦","顉","駸","骎","鮼"],jú:["侷","啹","婅","局","巈","椈","橘","泦","淗","湨","焗","犑","狊","粷","菊","蘜","趜","跼","蹫","輂","郹","閰","駶","驧","鵙","鵴","鶪","鼰","鼳","䴗"],"shù dōu":["侸"],tǐng:["侹","圢","娗","挺","涏","烶","珽","脡","艇","誔","頲","颋"],shèn:["侺","愼","慎","昚","涁","渗","滲","瘆","瘮","眘","祳","肾","胂","脤","腎","蜃","蜄","鋠"],"tuì tuó":["侻"],nán:["侽","喃","娚","抩","暔","枏","柟","楠","男","畘","莮","萳","遖"],xiāo:["侾","哓","嘵","嚻","囂","婋","宯","宵","庨","彇","揱","枭","枵","梟","櫹","歊","毊","消","潇","瀟","灱","灲","烋","焇","猇","獢","痚","痟","硝","硣","窙","箫","簘","簫","綃","绡","翛","膮","萧","蕭","虈","虓","蟂","蟏","蟰","蠨","踃","逍","銷","销","霄","颵","驍","骁","髇","髐","魈","鴞","鴵","鷍","鸮"],"biàn pián":["便","緶","缏"],tuǐ:["俀","腿","蹆","骽"],xì:["係","匸","卌","呬","墍","屃","屓","屭","忥","怬","恄","椞","潝","潟","澙","熂","犔","磶","禊","細","綌","縘","细","绤","舃","舄","蕮","虩","衋","覤","赩","趇","郤","釳","阋","隙","隟","霼","餼","饩","鬩","黖"],cù:["促","媨","憱","猝","瘄","瘯","簇","縬","脨","蔟","誎","趗","踧","踿","蹙","蹴","蹵","醋","顣","鼀"],é:["俄","囮","娥","峉","峨","峩","涐","珴","皒","睋","磀","莪","訛","誐","譌","讹","迗","鈋","鋨","锇","頟","額","额","魤","鵝","鵞","鹅"],qiú:["俅","叴","唒","囚","崷","巯","巰","扏","梂","殏","毬","求","汓","泅","浗","湭","煪","犰","玌","球","璆","皳","盚","紌","絿","肍","芁","莍","虬","虯","蛷","裘","觓","觩","訄","訅","賕","赇","逎","逑","遒","酋","釚","釻","銶","頄","鮂","鯄","鰽","鼽","𨱇"],xú:["俆","徐","禑"],"guàng kuāng":["俇"],kù:["俈","喾","嚳","库","庫","廤","瘔","絝","绔","袴","裤","褲","酷"],wù:["俉","务","務","勿","卼","坞","塢","奦","婺","寤","屼","岉","嵨","忢","悞","悟","悮","戊","扤","晤","杌","溩","焐","熃","物","痦","矹","窹","粅","蘁","誤","误","鋈","阢","隖","雾","霚","霧","靰","騖","骛","鶩","鹜","鼿","齀"],jùn:["俊","儁","呁","埈","寯","峻","懏","捃","攟","晙","棞","燇","珺","畯","竣","箟","蜠","賐","郡","陖","餕","馂","駿","骏","鵔","鵕","鵘","䐃"],liáng:["俍","墚","梁","椋","樑","粮","粱","糧","良","輬","辌","𫟅"],zǔ:["俎","唨","爼","祖","組","组","詛","诅","鎺","阻","靻"],"qiào xiào":["俏"],yǒng:["俑","勇","勈","咏","埇","塎","嵱","彮","怺","恿","悀","惥","愑","愹","慂","柡","栐","永","泳","湧","甬","蛹","詠","踊","踴","鯒","鲬"],hùn:["俒","倱","圂","尡","慁","掍","溷","焝","睴","觨","諢","诨"],jìng:["俓","傹","境","妌","婙","婧","弪","弳","径","徑","敬","曔","桱","梷","浄","瀞","獍","痉","痙","竞","竟","竫","競","竸","胫","脛","莖","誩","踁","迳","逕","鏡","镜","靖","静","靜","鵛"],sàn:["俕","閐"],pěi:["俖"],sú:["俗"],xī:["俙","僖","兮","凞","卥","厀","吸","唏","唽","嘻","噏","嚱","夕","奚","嬆","嬉","屖","嵠","巇","希","徆","徯","息","悉","悕","惁","惜","昔","晞","晰","晳","曦","析","桸","榽","樨","橀","欷","氥","汐","浠","淅","渓","溪","烯","焁","焈","焟","熄","熈","熙","熹","熺","熻","燨","爔","牺","犀","犠","犧","琋","瘜","皙","睎","瞦","矽","硒","磎","礂","稀","穸","窸","粞","糦","緆","繥","羲","翕","翖","肸","肹","膝","舾","莃","菥","蒠","蜥","螅","蟋","蠵","西","觹","觽","觿","譆","谿","豀","豨","豯","貕","赥","邜","鄎","酅","醯","釸","錫","鏭","鐊","鑴","锡","隵","餏","饎","饻","鯑","鵗","鸂","鼷"],lǐ:["俚","娌","峢","峲","李","欚","浬","澧","理","礼","禮","粴","裏","裡","豊","逦","邐","醴","鋰","锂","鯉","鱧","鱱","鲤","鳢"],bǎo:["保","堢","媬","宝","寚","寳","寶","珤","緥","葆","藵","褓","賲","靌","飹","飽","饱","駂","鳵","鴇","鸨"],"yú shù yù":["俞"],"sì qí":["俟"],"xìn shēn":["信"],xiū:["俢","修","咻","庥","樇","烌","羞","脙","脩","臹","貅","銝","鎀","飍","饈","馐","髤","髹","鮴","鱃","鵂","鸺","䗛"],dì:["俤","偙","僀","埊","墑","墬","娣","帝","怟","旳","梊","焍","玓","甋","眱","睇","碲","祶","禘","第","締","缔","腣","菂","蒂","蔕","蝃","蝭","螮","諦","谛","踶","递","逓","遞","遰","鉪","𤧛","䗖"],chóu:["俦","儔","嬦","惆","愁","懤","栦","燽","畴","疇","皗","稠","筹","籌","絒","綢","绸","菗","詶","讎","讐","踌","躊","酧","酬","醻","雔","雠","雦"],zhì:["俧","偫","儨","制","劕","垁","娡","寘","帙","帜","幟","庢","庤","廌","彘","徏","徝","志","忮","懥","懫","挃","挚","掷","摯","擲","旘","晊","智","栉","桎","梽","櫍","櫛","治","洷","滍","滞","滯","潌","瀄","炙","熫","狾","猘","璏","瓆","痔","痣","礩","祑","秩","秷","稚","稺","穉","窒","紩","緻","置","翐","膣","至","致","芖","蛭","袟","袠","製","覟","觗","觯","觶","誌","豑","豒","貭","質","贄","质","贽","跱","踬","躓","輊","轾","郅","銍","鋕","鑕","铚","锧","陟","隲","雉","駤","騭","騺","驇","骘","鯯","鴙","鷙","鸷","𬃊"],"liǎ liǎng":["俩"],jiǎn:["俭","倹","儉","减","剪","堿","弿","彅","戩","戬","拣","挸","捡","揀","撿","枧","柬","梘","检","検","檢","減","湕","瀽","瑐","睑","瞼","硷","碱","礆","笕","筧","简","簡","絸","繭","翦","茧","藆","蠒","裥","襇","襉","襺","詃","謇","謭","譾","谫","趼","蹇","鐗","鬋","鰎","鹸","鹻","鹼"],huò:["俰","咟","嚯","嚿","奯","彠","惑","或","擭","旤","曤","檴","沎","湱","瀖","獲","癨","眓","矐","祸","禍","穫","窢","耯","臛","艧","获","蒦","藿","蠖","謋","貨","货","鍃","鑊","镬","雘","霍","靃","韄","㸌"],"jù jū":["俱","据","鋸","锯"],xiào:["俲","傚","効","咲","哮","啸","嘋","嘨","嘯","孝","效","斅","斆","歗","涍","熽","笑","詨","誟"],pái:["俳","徘","牌","犤","猅","簰","簲","輫"],biào:["俵","鰾","鳔"],"chù tì":["俶"],fèi:["俷","剕","厞","吠","屝","废","廃","廢","昲","曊","櫠","沸","濷","狒","癈","肺","萉","費","费","鐨","镄","陫","靅","鼣"],fèng:["俸","凤","奉","湗","焨","煈","賵","赗","鳯","鳳","鴌"],ǎn:["俺","唵","埯","揞","罯","銨","铵"],bèi:["俻","倍","偝","偹","備","僃","备","悖","惫","愂","憊","昁","梖","焙","牬","犕","狈","狽","珼","琲","碚","禙","糒","苝","蓓","蛽","褙","貝","贝","軰","輩","辈","邶","郥","鄁","鋇","鐾","钡","鞁","鞴","𬇙"],yù:["俼","儥","喅","喩","喻","域","堉","妪","嫗","寓","峪","嶎","庽","彧","御","愈","慾","戫","昱","棛","棜","棫","櫲","欎","欝","欲","毓","浴","淯","滪","潏","澦","灪","焴","煜","燏","燠","爩","狱","獄","玉","琙","瘉","癒","砡","硢","硲","礇","礖","礜","禦","秗","稢","稶","篽","籞","籲","粖","緎","罭","聿","肀","艈","芋","芌","茟","蒮","蓣","蓹","蕷","蘌","蜟","蜮","袬","裕","誉","諭","譽","谕","豫","軉","輍","逳","遇","遹","郁","醧","鈺","鋊","錥","鐭","钰","閾","阈","雤","霱","預","预","飫","饇","饫","馭","驈","驭","鬰","鬱","鬻","魊","鱊","鳿","鴥","鴧","鴪","鵒","鷸","鸒","鹆","鹬"],xīn:["俽","噺","妡","嬜","廞","心","忄","忻","惞","新","昕","杺","欣","歆","炘","盺","薪","訢","辛","邤","鈊","鋅","鑫","锌","馨","馫","䜣","𫷷"],"hǔ chí":["俿"],jiù:["倃","僦","匓","匛","匶","厩","咎","就","廄","廏","廐","慦","捄","救","旧","柩","柾","桕","欍","殧","疚","臼","舅","舊","鯦","鷲","鹫","麔","齨","㠇"],yáo:["倄","傜","嗂","垚","堯","姚","媱","尧","尭","峣","嶢","嶤","徭","揺","搖","摇","摿","暚","榣","烑","爻","猺","珧","瑤","瑶","磘","窑","窯","窰","肴","蘨","謠","謡","谣","軺","轺","遙","遥","邎","顤","颻","飖","餆","餚","鰩","鱙","鳐"],"cuì zú":["倅"],"liǎng liǎ":["倆"],wǎn:["倇","唍","婉","惋","挽","晚","晥","晩","晼","梚","椀","琬","畹","皖","盌","碗","綩","綰","绾","脘","萖","踠","輓","鋔"],zǒng:["倊","偬","傯","嵸","总","惣","捴","搃","摠","燪","総","緫","縂","總","蓗"],guān:["倌","关","官","棺","瘝","癏","窤","蒄","関","闗","關","鰥","鱞","鳏"],tiǎn:["倎","唺","忝","悿","晪","殄","淟","睓","腆","舔","覥","觍","賟","錪","餂"],mén:["們","扪","捫","璊","菛","虋","鍆","钔","門","閅","门","𫞩"],"dǎo dào":["倒"],"tán tàn":["倓","埮"],"juè jué":["倔"],chuí:["倕","垂","埀","捶","搥","桘","棰","槌","箠","腄","菙","錘","鎚","锤","陲","顀"],xìng:["倖","姓","婞","嬹","幸","性","悻","杏","涬","緈","臖","荇","莕","葕"],péng:["倗","傰","塜","塳","弸","憉","捀","朋","棚","椖","樥","硼","稝","竼","篷","纄","膨","芃","蓬","蘕","蟚","蟛","袶","輣","錋","鑝","韸","韼","騯","髼","鬅","鬔","鵬","鹏"],"tǎng cháng":["倘"],hòu:["候","厚","后","垕","堠","後","洉","茩","豞","逅","郈","鮜","鱟","鲎","鲘"],tì:["倜","剃","嚏","嚔","屉","屜","悌","悐","惕","惖","戻","掦","替","朑","歒","殢","涕","瓋","笹","籊","薙","褅","逖","逷","髰","鬀","鬄"],gàn:["倝","凎","幹","榦","檊","淦","灨","盰","紺","绀","詌","贑","赣","骭","㽏"],"liàng jìng":["倞","靓"],suī:["倠","哸","夊","滖","濉","眭","睢","芕","荽","荾","虽","雖","鞖"],"chàng chāng":["倡"],jié:["倢","偼","傑","刦","刧","刼","劫","劼","卩","卪","婕","媫","孑","岊","崨","嵥","嶻","巀","幯","截","捷","掶","擮","昅","杢","杰","桀","桝","楬","楶","榤","洁","滐","潔","狤","睫","礍","竭","節","羯","莭","蓵","蛣","蜐","蠘","蠞","蠽","衱","袺","訐","詰","誱","讦","踕","迼","鉣","鍻","镼","頡","鮚","鲒","㛃"],"kǒng kōng":["倥"],juàn:["倦","劵","奆","慻","桊","淃","狷","獧","眷","睊","睠","絭","絹","绢","罥","羂","腃","蔨","鄄","餋"],zōng:["倧","堫","宗","嵏","嵕","惾","朡","棕","椶","熧","猣","磫","緃","翪","腙","葼","蝬","豵","踨","踪","蹤","鍐","鑁","騌","騣","骔","鬃","鬉","鬷","鯮","鯼"],ní:["倪","坭","埿","尼","屔","怩","淣","猊","籾","聣","蚭","蜺","觬","貎","跜","輗","郳","鈮","铌","霓","馜","鯢","鲵","麑","齯","𫐐","𫠜"],zhuō:["倬","拙","捉","桌","梲","棁","棳","槕","涿","窧","鐯","䦃"],"wō wēi":["倭"],luǒ:["倮","剆","曪","瘰","癳","臝","蓏","蠃","裸","躶"],sōng:["倯","凇","娀","崧","嵩","庺","憽","松","枀","枩","柗","梥","檧","淞","濍","硹","菘","鬆"],lèng:["倰","堎","愣","睖","踜"],zì:["倳","剚","字","恣","渍","漬","牸","眥","眦","胔","胾","自","茡","荢"],bèn:["倴","坌","捹","撪","渀","笨","逩"],cǎi:["倸","啋","婇","彩","採","棌","毝","睬","綵","跴","踩"],zhài:["债","債","寨","瘵","砦"],yē:["倻","吔","噎","擨","暍","椰","歋","潱","蠮"],shà:["倽","唼","喢","歃","箑","翜","翣","萐","閯","霎"],qīng:["倾","傾","卿","圊","寈","氢","氫","淸","清","蜻","軽","輕","轻","郬","錆","鑋","靑","青","鯖"],yīng:["偀","嘤","噟","嚶","婴","媖","嫈","嬰","孆","孾","愥","撄","攖","朠","桜","樱","櫻","渶","煐","珱","瑛","璎","瓔","甇","甖","碤","礯","緓","纓","绬","缨","罂","罃","罌","膺","英","莺","蘡","蝧","蠳","褮","譻","賏","軈","鑍","锳","霙","韺","鴬","鶑","鶧","鶯","鷪","鷹","鸎","鸚","鹦","鹰","䓨"],"chēng chèn":["偁","爯"],ruǎn:["偄","朊","瑌","瓀","碝","礝","腝","軟","輭","软","阮"],"zhòng tóng":["偅"],chǔn:["偆","惷","睶","萶","蠢","賰"],"jiǎ jià":["假"],"jì jié":["偈"],"bǐng bìng":["偋"],ruò:["偌","叒","嵶","弱","楉","焫","爇","箬","篛","蒻","鄀","鰙","鰯","鶸"],tí:["偍","厗","啼","嗁","崹","漽","瑅","睼","禵","稊","緹","缇","罤","蕛","褆","謕","趧","蹄","蹏","醍","鍗","題","题","騠","鮷","鯷","鳀","鵜","鷤","鹈","𫘨"],wēi:["偎","危","喴","威","媙","嶶","巍","微","愄","揋","揻","椳","楲","溦","烓","煨","燰","癓","縅","葨","葳","薇","蜲","蝛","覣","詴","逶","隇","隈","霺","鰃","鰄","鳂"],piān:["偏","囨","媥","楄","犏","篇","翩","鍂"],yàn:["偐","厌","厭","唁","喭","嚈","嚥","堰","妟","姲","嬊","嬿","宴","彥","彦","敥","晏","暥","曕","曣","滟","灎","灔","灧","灩","焔","焰","焱","熖","燄","牪","猒","砚","硯","艳","艶","艷","覎","觃","觾","諺","讌","讞","谚","谳","豓","豔","贋","贗","赝","軅","酀","酽","醼","釅","雁","餍","饜","騐","験","騴","驗","驠","验","鬳","鳫","鴈","鴳","鷃","鷰","齞"],"tǎng dàng":["偒"],è:["偔","匎","卾","厄","呝","咢","噩","垩","堊","堮","岋","崿","廅","悪","愕","戹","扼","搤","搹","擜","櫮","歞","歺","湂","琧","砈","砐","硆","腭","苊","萼","蕚","蚅","蝁","覨","諤","讍","谔","豟","軛","軶","轭","遌","遏","遻","鄂","鈪","鍔","鑩","锷","阨","阸","頞","顎","颚","餓","餩","饿","鰐","鰪","鱷","鳄","鶚","鹗","齃","齶","𫫇","𥔲"],xié:["偕","勰","协","協","嗋","垥","奊","恊","愶","拹","携","撷","擕","擷","攜","斜","旪","熁","燲","綊","緳","縀","缬","翓","胁","脅","脇","脋","膎","蝢","衺","襭","諧","讗","谐","鞋","鞵","龤","㙦"],chě:["偖","扯","撦"],shěng:["偗","渻","眚"],chā:["偛","嗏","扠","挿","插","揷","疀","臿","艖","銟","鍤","锸","餷"],huáng:["偟","凰","喤","堭","墴","媓","崲","徨","惶","楻","湟","煌","獚","瑝","璜","癀","皇","磺","穔","篁","簧","艎","葟","蝗","蟥","諻","趪","遑","鍠","鐄","锽","隍","韹","餭","騜","鰉","鱑","鳇","鷬","黃","黄","𨱑"],yǎo:["偠","咬","婹","宎","岆","杳","柼","榚","溔","狕","窅","窈","舀","苭","闄","騕","鷕","齩"],"chǒu qiào":["偢"],yóu:["偤","尤","庮","怣","沋","油","浟","游","犹","猶","猷","由","疣","秞","肬","莜","莸","蕕","蚰","蝣","訧","輏","輶","逰","遊","邮","郵","鈾","铀","駀","魷","鮋","鱿","鲉","𬨎"],xū:["偦","墟","媭","嬃","楈","欨","歔","燸","疞","盱","綇","縃","繻","胥","蕦","虗","虚","虛","蝑","裇","訏","許","諝","譃","谞","鑐","需","須","须","顼","驉","鬚","魆","魖","𬣙","𦈡"],zhā:["偧","哳","抯","挓","揸","摣","樝","渣","皶","觰","譇","齄","齇"],cī:["偨","疵","蠀","趀","骴","髊","齹"],bī:["偪","屄","楅","毴","豍","逼","鰏","鲾","鵖"],xún:["偱","噚","寻","尋","峋","巡","廵","循","恂","揗","攳","旬","杊","栒","桪","樳","洵","浔","潯","燅","燖","珣","璕","畃","紃","荀","蟳","詢","询","鄩","鱏","鱘","鲟","𬘓","𬩽","𬍤","𬊈"],"cāi sī":["偲"],duān:["偳","媏","端","褍","鍴"],ǒu:["偶","吘","嘔","耦","腢","蕅","藕","𬉼","𠙶"],tōu:["偷","偸","鍮"],"zán zá zǎ":["偺"],"lǚ lóu":["偻","僂"],fèn:["偾","僨","奋","奮","弅","忿","愤","憤","瀵","瞓","秎","粪","糞","膹","鱝","鲼"],"kuǐ guī":["傀"],sǒu:["傁","叜","叟","嗾","櫢","瞍","薮","藪"],"zhì sī tí":["傂"],sù:["傃","僳","嗉","塐","塑","夙","嫊","愫","憟","榡","樎","樕","殐","泝","涑","溯","溸","潚","潥","玊","珟","璛","簌","粛","粟","素","縤","肃","肅","膆","蔌","藗","觫","訴","謖","诉","谡","趚","蹜","速","遡","遬","鋉","餗","驌","骕","鱐","鷫","鹔","𫗧"],xiā:["傄","煆","瞎","虲","谺","颬","鰕"],"yuàn yuán":["傆","媛"],rǒng:["傇","冗","宂","氄","軵"],nù:["傉","怒"],yùn:["傊","孕","恽","惲","愠","慍","枟","腪","蕴","薀","藴","蘊","褞","貟","运","運","郓","鄆","酝","醖","醞","韗","韞","韵","韻","餫"],"gòu jiǎng":["傋"],mà:["傌","嘜","榪","睰","祃","禡","罵","閁","駡","骂","鬕"],bàng:["傍","塝","棒","玤","稖","艕","蒡","蜯","謗","谤","鎊","镑"],diān:["傎","厧","嵮","巅","巓","巔","掂","攧","敁","槇","滇","癫","癲","蹎","顚","顛","颠","齻"],táng:["傏","唐","啺","坣","堂","塘","搪","棠","榶","溏","漟","煻","瑭","磄","禟","篖","糃","糖","糛","膅","膛","蓎","螗","螳","赯","踼","鄌","醣","鎕","隚","餹","饄","鶶","䣘"],hào:["傐","哠","恏","昊","昦","晧","暠","暤","暭","曍","浩","淏","澔","灏","灝","皓","皜","皞","皡","皥","耗","聕","薃","號","鄗","顥","颢","鰝"],"xī xì":["傒"],shān:["傓","删","刪","剼","圸","山","挻","搧","柵","檆","潸","澘","煽","狦","珊","笘","縿","羴","羶","脠","舢","芟","衫","跚","軕","邖","閊","鯅"],"qiàn jiān":["傔"],"què jué":["傕","埆"],"cāng chen":["傖"],róng:["傛","媶","嫆","嬫","容","峵","嵘","嶸","戎","搈","曧","栄","榕","榮","榵","毧","溶","瀜","烿","熔","狨","瑢","穁","絨","绒","羢","肜","茙","茸","荣","蓉","蝾","融","螎","蠑","褣","鎔","镕","駥"],"tà tàn":["傝"],suō:["傞","唆","嗍","嗦","娑","摍","桫","梭","睃","簑","簔","羧","莏","蓑","趖","鮻"],dǎi:["傣","歹"],zài:["傤","儎","再","在","扗","洅","載","酨"],gǔ:["傦","古","啒","尳","愲","榖","榾","汩","淈","濲","瀔","牯","皷","皼","盬","瞽","穀","罟","羖","股","脵","臌","薣","蛊","蠱","詁","诂","轂","逧","鈷","钴","餶","馉","鼓","鼔","𦙶"],bīn:["傧","宾","彬","斌","椕","滨","濒","濱","濵","瀕","繽","缤","虨","豩","豳","賓","賔","邠","鑌","镔","霦","顮"],chǔ:["储","儲","杵","椘","楚","楮","檚","濋","璴","础","礎","禇","處","齭","齼","𬺓"],nuó:["傩","儺","挪","梛","橠"],"cān càn":["傪"],lěi:["傫","儡","厽","垒","塁","壘","壨","櫐","灅","癗","矋","磊","礨","耒","蕌","蕾","藟","蘽","蠝","誄","讄","诔","鑸","鸓"],cuī:["催","凗","墔","崔","嵟","慛","摧","榱","獕","磪","鏙"],yōng:["傭","嗈","墉","壅","嫞","庸","廱","慵","拥","擁","滽","灉","牅","痈","癕","癰","臃","邕","郺","鄘","鏞","镛","雍","雝","饔","鱅","鳙","鷛"],"zāo cáo":["傮"],sǒng:["傱","嵷","怂","悚","愯","慫","竦","耸","聳","駷","㧐"],ào:["傲","坳","垇","墺","奡","嫯","岙","岰","嶴","懊","擙","澳","鏊","驁","骜"],"qī còu":["傶"],chuǎng:["傸","磢","闖","闯"],shǎ:["傻","儍"],hàn:["傼","垾","悍","憾","扞","捍","撖","撼","旱","晘","暵","汉","涆","漢","瀚","焊","猂","皔","睅","翰","莟","菡","蛿","蜭","螒","譀","輚","釬","銲","鋎","雗","頷","顄","颔","駻","鶾"],zhāng:["傽","嫜","张","張","彰","慞","暲","樟","漳","獐","璋","章","粻","蔁","蟑","遧","鄣","鏱","餦","騿","鱆","麞"],"yān yàn":["傿","墕","嬮"],"piào biāo":["僄","骠"],liàn:["僆","堜","媡","恋","戀","楝","殓","殮","湅","潋","澰","瀲","炼","煉","瑓","練","纞","练","萰","錬","鍊","鏈","链","鰊","𬶠"],màn:["㵘","僈","墁","幔","慢","曼","漫","澷","熳","獌","縵","缦","蔄","蘰","鄤","鏝","镘","𬜬"],"tàn tǎn":["僋"],yíng:["僌","営","塋","嬴","攍","楹","櫿","溁","溋","滢","潆","濙","濚","濴","瀅","瀛","瀠","瀯","灐","灜","熒","營","瑩","盁","盈","禜","籝","籯","縈","茔","荧","莹","萤","营","萦","萾","蓥","藀","蛍","蝇","蝿","螢","蠅","謍","贏","赢","迎","鎣"],dòng:["働","冻","凍","动","動","姛","戙","挏","栋","棟","湩","硐","胨","胴","腖","迵","霘","駧"],zhuàn:["僎","啭","囀","堟","撰","灷","瑑","篆","腞","蒃","襈","譔","饌","馔"],xiàng:["像","勨","向","嚮","姠","嶑","曏","橡","珦","缿","蟓","衖","襐","象","鐌","項","项","鱌"],shàn:["僐","善","墠","墡","嬗","擅","敾","椫","樿","歚","汕","灗","疝","磰","繕","缮","膳","蟮","蟺","訕","謆","譱","讪","贍","赡","赸","鄯","鐥","饍","騸","骟","鱓","鱔","鳝","𫮃"],"tuí tuǐ":["僓"],zǔn:["僔","噂","撙","譐"],pú:["僕","匍","圤","墣","濮","獛","璞","瞨","穙","莆","菐","菩","葡","蒱","蒲","贌","酺","鏷","镤"],láo:["僗","劳","労","勞","哰","崂","嶗","憥","朥","浶","牢","痨","癆","窂","簩","醪","鐒","铹","顟","髝","𫭼"],chǎng:["僘","厰","廠","敞","昶","氅","鋹","𬬮"],guāng:["僙","光","咣","垙","姯","洸","灮","炗","炚","炛","烡","珖","胱","茪","輄","銧","黆","𨐈"],liáo:["僚","嘹","嫽","寥","寮","尞","屪","嵺","嶚","嶛","廫","憀","敹","暸","橑","獠","璙","疗","療","竂","簝","繚","缭","聊","膋","膫","藔","蟟","豂","賿","蹘","辽","遼","飉","髎","鷯","鹩"],dèng:["僜","凳","墱","嶝","櫈","瞪","磴","覴","邓","鄧","隥"],"chán zhàn zhuàn":["僝"],bō:["僠","嶓","拨","撥","播","波","溊","玻","癶","盋","砵","碆","礡","缽","菠","袰","蹳","鉢","钵","餑","饽","驋","鱍","𬭛"],huì:["僡","匯","卉","喙","嘒","嚖","圚","嬒","寭","屶","屷","彗","彙","彚","徻","恚","恵","惠","慧","憓","懳","晦","暳","槥","橞","檅","櫘","汇","泋","滙","潓","烩","燴","獩","璤","瞺","硊","秽","穢","篲","絵","繪","绘","翙","翽","荟","蔧","蕙","薈","薉","蟪","詯","誨","諱","譓","譿","讳","诲","賄","贿","鐬","闠","阓","靧","頮","顪","颒","餯","𬤝","𬭬"],chuǎn:["僢","喘","舛","荈","踳"],"tiě jiàn":["僣"],sēng:["僧","鬙"],xiàn:["僩","僴","哯","垷","塪","姭","娊","宪","岘","峴","憲","撊","晛","橌","橺","涀","瀗","献","獻","现","現","県","睍","粯","糮","絤","綫","線","线","缐","羡","羨","腺","臔","臽","苋","莧","誢","豏","鋧","錎","限","陥","陷","霰","餡","馅","麲","鼸","𬀪","𪾢"],"yù jú":["僪"],"è wū":["僫"],"tóng zhuàng":["僮"],lǐn:["僯","凛","凜","廩","廪","懍","懔","撛","檁","檩","澟","癛","癝"],gù:["僱","凅","固","堌","崓","崮","故","梏","棝","牿","痼","祻","錮","锢","雇","顧","顾","鯝","鲴"],jiāng:["僵","壃","姜","橿","殭","江","畕","疅","礓","繮","缰","翞","茳","葁","薑","螀","螿","豇","韁","鱂","鳉"],mǐn:["僶","冺","刡","勄","悯","惽","愍","慜","憫","抿","敃","敏","敯","泯","潣","皿","笢","笽","簢","蠠","閔","閩","闵","闽","鰵","鳘","黽"],jìn:["僸","凚","噤","嚍","墐","壗","妗","嬧","搢","晉","晋","枃","殣","浕","浸","溍","濅","濜","烬","煡","燼","琎","瑨","璶","盡","祲","縉","缙","荩","藎","覲","觐","賮","贐","赆","近","进","進","靳","齽"],"jià jie":["價"],qiào:["僺","峭","帩","撬","殻","窍","竅","誚","诮","躈","陗","鞩","韒","髚"],pì:["僻","媲","嫓","屁","澼","甓","疈","譬","闢","鷿","鸊","䴙"],sài:["僿","簺","賽","赛"],"chán tǎn shàn":["儃"],"dāng dàng":["儅","当","闣"],xuān:["儇","喧","塇","媗","宣","愃","愋","揎","昍","暄","煊","煖","瑄","睻","矎","禤","箮","翧","翾","萱","萲","蓒","蕿","藼","蘐","蝖","蠉","諠","諼","譞","谖","軒","轩","鍹","駽","鰚","𫓶","𫍽"],"dān dàn":["儋","擔","瘅"],càn:["儏","澯","灿","燦","璨","粲","薒","謲"],"bīn bìn":["儐"],"án àn":["儑"],tái:["儓","坮","嬯","抬","擡","檯","炱","炲","籉","臺","薹","跆","邰","颱","鮐","鲐"],lán:["儖","兰","囒","婪","岚","嵐","幱","拦","攔","斓","斕","栏","欄","欗","澜","瀾","灆","灡","燣","燷","璼","篮","籃","籣","繿","葻","蓝","藍","蘫","蘭","褴","襕","襤","襴","襽","譋","讕","谰","躝","鑭","镧","闌","阑","韊","𬒗"],"nǐ yì ài yí":["儗"],méng:["儚","幪","曚","朦","橗","檬","氋","溕","濛","甍","甿","盟","礞","艨","莔","萌","蕄","虻","蝱","鄳","鄸","霿","靀","顭","饛","鯍","鸏","鹲","𫑡","㠓"],níng:["儜","凝","咛","嚀","嬣","柠","橣","檸","狞","獰","聍","聹","薴","鑏","鬡","鸋"],qióng:["儝","卭","宆","惸","憌","桏","橩","焪","焭","煢","熍","琼","瓊","睘","穷","穹","窮","竆","笻","筇","舼","茕","藑","藭","蛩","蛬","赹","跫","邛","銎","䓖"],liè:["儠","冽","列","劣","劽","埒","埓","姴","峛","巤","挒","捩","栵","洌","浖","烈","烮","煭","犣","猎","猟","獵","聗","脟","茢","蛚","趔","躐","迾","颲","鬛","鬣","鮤","鱲","鴷","䴕","𫚭"],kuǎng:["儣","夼","懭"],bào:["儤","勽","報","忁","报","抱","曓","爆","犦","菢","虣","蚫","豹","鉋","鑤","铇","骲","髱","鮑","鲍"],biāo:["儦","墂","幖","彪","标","標","滮","瀌","熛","爂","猋","瘭","磦","膘","臕","謤","贆","鏢","鑣","镖","镳","颮","颷","飆","飇","飈","飊","飑","飙","飚","驫","骉","髟"],zǎn:["儧","儹","噆","攅","昝","趱","趲"],háo:["儫","嗥","嘷","噑","嚎","壕","椃","毜","毫","濠","獆","獔","竓","籇","蚝","蠔","譹","豪"],qìng:["儬","凊","庆","慶","櫦","濪","碃","磬","罄","靘"],chèn:["儭","嚫","榇","櫬","疢","衬","襯","讖","谶","趁","趂","齓","齔","龀"],téng:["儯","幐","滕","漛","疼","籐","籘","縢","腾","藤","虅","螣","誊","謄","邆","駦","騰","驣","鰧","䲢"],"lǒng lóng lòng":["儱"],"chán chàn":["儳"],"ráng xiāng":["儴","勷"],"huì xié":["儶"],luó:["儸","攞","椤","欏","猡","玀","箩","籮","罗","羅","脶","腡","萝","蘿","螺","覼","逻","邏","鏍","鑼","锣","镙","饠","騾","驘","骡","鸁"],léi:["儽","嫘","檑","欙","瓃","畾","縲","纍","纝","缧","罍","羸","蔂","蘲","虆","轠","鐳","鑘","镭","雷","靁","鱩","鼺"],"nàng nāng":["儾"],"wù wū":["兀"],yǔn:["允","喗","夽","抎","殒","殞","狁","磒","荺","賱","鈗","阭","陨","隕","霣","馻","齫","齳"],zān:["兂","橵","簪","簮","糌","鐕","鐟","鵤"],yuán:["元","円","原","厡","厵","园","圆","圎","園","圓","垣","塬","媴","嫄","援","榞","榬","橼","櫞","沅","湲","源","溒","爰","猨","猿","笎","緣","縁","缘","羱","茒","薗","蝝","蝯","螈","袁","褤","謜","轅","辕","邍","邧","酛","鈨","鎱","騵","魭","鶢","鶰","黿","鼋","𫘪"],xiōng:["兄","兇","凶","匂","匈","哅","忷","恟","汹","洶","胷","胸","芎","訩","詾","讻"],chōng:["充","嘃","忡","憃","憧","摏","沖","浺","珫","罿","翀","舂","艟","茺","衝","蹖","㳘"],zhào:["兆","垗","旐","曌","枛","櫂","照","燳","狣","瞾","笊","罀","罩","羄","肁","肇","肈","詔","诏","赵","趙","鮡","𬶐"],"duì ruì yuè":["兊","兌","兑"],kè:["克","刻","勀","勊","堁","娔","客","恪","愙","氪","溘","碦","緙","缂","艐","衉","課","课","錁","锞","騍","骒"],tù:["兎","兔","堍","迌","鵵"],dǎng:["党","攩","欓","譡","讜","谠","黨","𣗋"],dōu:["兜","兠","唗","橷","篼","蔸"],huǎng:["兤","奛","幌","怳","恍","晄","炾","熀","縨","詤","謊","谎"],rù:["入","嗕","媷","扖","杁","洳","溽","縟","缛","蓐","褥","鳰"],nèi:["內","氝","氞","錗"],"yú shù":["兪"],"liù lù":["六"],han:["兯","爳"],tiān:["兲","天","婖","添","酟","靔","靝","黇"],"xīng xìng":["兴"],diǎn:["典","嚸","奌","婰","敟","椣","点","碘","蒧","蕇","踮","點"],"zī cí":["兹"],jiān:["兼","冿","囏","坚","堅","奸","姦","姧","尖","幵","惤","戋","戔","搛","椾","樫","櫼","歼","殱","殲","湔","瀐","瀸","煎","熞","熸","牋","瑊","睷","礛","礷","笺","箋","緘","縑","缄","缣","肩","艰","艱","菅","菺","葌","蒹","蔪","蕑","蕳","虃","譼","豜","鑯","雃","鞯","韀","韉","餰","馢","鰔","鰜","鰹","鲣","鳒","鵑","鵳","鶼","鹣","麉"],shòu:["兽","受","售","壽","夀","寿","授","狩","獣","獸","痩","瘦","綬","绶","膄"],jì:["兾","冀","剂","剤","劑","勣","坖","垍","塈","妓","季","寂","寄","廭","彑","徛","忌","悸","惎","懻","技","旡","既","旣","暨","暩","曁","梞","檕","檵","洎","漃","漈","瀱","痵","癠","禝","稩","稷","穄","穊","穧","紀","継","績","繋","繼","继","绩","罽","臮","芰","茍","茤","葪","蓟","蔇","薊","蘎","蘮","蘻","裚","襀","覬","觊","計","記","誋","计","记","跡","跽","蹟","迹","际","際","霁","霽","驥","骥","髻","鬾","魝","魥","鯚","鯽","鰶","鰿","鱀","鱭","鲚","鲫","鵋","鷑","齌","𪟝","𬶨","𬶭"],jiōng:["冂","冋","坰","埛","扃","蘏","蘔","駉","駫","𬳶"],mào:["冃","冐","媢","帽","愗","懋","暓","柕","楙","毷","瑁","皃","眊","瞀","耄","茂","萺","蝐","袤","覒","貌","貿","贸","鄚","鄮"],rǎn:["冄","冉","姌","媣","染","珃","苒","蒅","䎃"],"nèi nà":["内"],gāng:["冈","冮","刚","剛","堈","堽","岡","掆","摃","棡","牨","犅","疘","綱","纲","缸","罁","罡","肛","釭","鎠","㭎"],cè:["冊","册","厕","厠","夨","廁","恻","惻","憡","敇","测","測","笧","策","筞","筴","箣","荝","萗","萴","蓛"],guǎ:["冎","剐","剮","叧","寡"],"mào mò":["冒"],gòu:["冓","啂","坸","垢","够","夠","媾","彀","搆","撀","构","構","煹","覯","觏","訽","詬","诟","購","购","遘","雊"],xǔ:["冔","喣","暊","栩","珝","盨","糈","詡","諿","诩","鄦","醑"],mì:["冖","冪","嘧","塓","宻","密","峚","幂","幎","幦","怽","榓","樒","櫁","汨","淧","滵","漞","濗","熐","羃","蔤","蜜","覓","覔","覛","觅","謐","谧","鼏"],"yóu yín":["冘"],xiě:["写","冩","藛"],jūn:["军","君","均","桾","汮","皲","皸","皹","碅","莙","蚐","袀","覠","軍","鈞","銁","銞","鍕","钧","頵","鮶","鲪","麏"],mí:["冞","擟","瀰","爢","猕","獼","祢","禰","縻","蒾","藌","蘪","蘼","袮","詸","謎","迷","醚","醾","醿","釄","镾","鸍","麊","麋","麛"],"guān guàn":["冠","覌","観","觀","观"],měng:["冡","勐","懵","掹","猛","獴","艋","蜢","蠓","錳","锰","鯭","鼆"],zhǒng:["冢","塚","尰","歱","煄","瘇","肿","腫","踵"],zuì:["冣","嶵","晬","最","栬","槜","檇","檌","祽","絊","罪","蕞","辠","酔","酻","醉","錊"],yuān:["冤","剈","囦","嬽","寃","棩","淵","渁","渆","渊","渕","灁","眢","肙","葾","蒬","蜎","蜵","駌","鳶","鴛","鵷","鸢","鸳","鹓","鼘","鼝"],míng:["冥","名","明","暝","朙","榠","洺","溟","猽","眀","眳","瞑","茗","螟","覭","詺","鄍","銘","铭","鳴","鸣"],kòu:["冦","叩","宼","寇","扣","敂","滱","窛","筘","簆","蔲","蔻","釦","鷇"],tài:["冭","太","夳","忲","态","態","汰","汱","泰","溙","肽","舦","酞","鈦","钛"],"féng píng":["冯","馮"],"chōng chòng":["冲"],kuàng:["况","圹","壙","岲","懬","旷","昿","曠","框","況","爌","眖","眶","矿","砿","礦","穬","絋","絖","纊","纩","貺","贶","軦","邝","鄺","鉱","鋛","鑛","黋"],lěng:["冷"],pàn:["冸","判","叛","沜","泮","溿","炍","牉","畔","盼","聁","袢","襻","詊","鋬","鑻","頖","鵥"],fā:["冹","彂","沷","発","發"],xiǎn:["冼","尟","尠","崄","嶮","幰","攇","显","櫶","毨","灦","烍","燹","狝","猃","獫","獮","玁","禒","筅","箲","藓","蘚","蚬","蜆","譣","赻","跣","鍌","险","険","險","韅","顕","顯","㬎"],qià:["冾","圶","帢","恰","殎","洽","硈","胢","髂"],"jìng chēng":["净","凈","淨"],sōu:["凁","嗖","廀","廋","捜","搜","摉","溲","獀","艘","蒐","螋","鄋","醙","鎪","锼","颼","飕","餿","馊","騪"],měi:["凂","媄","媺","嬍","嵄","挴","毎","每","浼","渼","燘","美","躾","鎂","镁","黣"],tú:["凃","図","图","圖","圗","塗","屠","峹","嵞","庩","廜","徒","悇","揬","涂","瘏","筡","腯","荼","蒤","跿","途","酴","鈯","鍎","馟","駼","鵌","鶟","鷋","鷵","𬳿"],zhǔn:["准","凖","埻","準","𬘯"],"liáng liàng":["凉","涼","量"],diāo:["凋","刁","刟","叼","奝","弴","彫","汈","琱","碉","簓","虭","蛁","貂","錭","雕","鮉","鯛","鲷","鵰","鼦"],còu:["凑","湊","腠","輳","辏"],ái:["凒","啀","嘊","捱","溰","癌","皑","皚"],duó:["凙","剫","夺","奪","痥","踱","鈬","鐸","铎"],dú:["凟","匵","嬻","椟","櫝","殰","涜","牍","牘","犊","犢","独","獨","瓄","皾","裻","読","讀","讟","豄","贕","錖","鑟","韇","韣","韥","騳","髑","黩","黷"],"jǐ jī":["几"],fán:["凡","凢","凣","匥","墦","杋","柉","棥","樊","瀿","烦","煩","燔","璠","矾","礬","笲","籵","緐","羳","舤","舧","薠","蘩","蠜","襎","蹯","釩","鐇","鐢","钒","鷭","𫔍","𬸪"],jū:["凥","匊","娵","婮","居","崌","抅","挶","掬","梮","椐","檋","毩","毱","泃","涺","狙","琚","疽","砠","罝","腒","艍","蜛","裾","諊","跔","踘","躹","陱","雎","鞠","鞫","駒","驹","鮈","鴡","鶋","𬶋"],"chù chǔ":["処","处"],zhǐ:["凪","劧","咫","址","坧","帋","恉","扺","指","旨","枳","止","汦","沚","洔","淽","疻","砋","祉","秖","紙","纸","芷","藢","衹","襧","訨","趾","軹","轵","酯","阯","黹"],píng:["凭","凴","呯","坪","塀","岼","帡","帲","幈","平","慿","憑","枰","洴","焩","玶","瓶","甁","竮","箳","簈","缾","荓","萍","蓱","蚲","蛢","評","评","軿","輧","郱","鮃","鲆"],kǎi:["凯","凱","剀","剴","垲","塏","恺","愷","慨","暟","蒈","輆","鍇","鎧","铠","锴","闓","闿","颽"],gān:["凲","坩","尲","尴","尶","尷","柑","泔","漧","玕","甘","疳","矸","竿","筸","粓","肝","苷","迀","酐","魐"],"kǎn qiǎn":["凵"],tū:["凸","堗","嶀","捸","涋","湥","痜","禿","秃","突","葖","鋵","鵚","鼵","㻬"],"āo wā":["凹"],chū:["出","初","岀","摴","榋","樗","貙","齣","䢺","䝙"],dàng:["凼","圵","垱","壋","档","檔","氹","璗","瓽","盪","瞊","砀","碭","礑","簜","荡","菪","蕩","蘯","趤","逿","雼","𬍡"],hán:["函","凾","含","圅","娢","寒","崡","晗","梒","浛","涵","澏","焓","琀","甝","筨","蜬","邗","邯","鋡","韓","韩"],záo:["凿","鑿"],dāo:["刀","刂","忉","氘","舠","螩","釖","魛","鱽"],chuāng:["刅","摐","牎","牕","疮","瘡","窓","窗","窻"],"fēn fèn":["分"],"qiè qiē":["切"],kān:["刊","勘","堪","戡","栞","龕","龛"],cǔn:["刌","忖"],chú:["刍","厨","幮","廚","橱","櫉","櫥","滁","犓","篨","耡","芻","蒢","蒭","蜍","蟵","豠","趎","蹰","躇","躕","鉏","鋤","锄","除","雏","雛","鶵"],"huà huá":["划"],lí:["刕","剓","剺","劙","厘","喱","嚟","囄","嫠","孷","廲","悡","梨","梸","棃","漓","灕","犁","犂","狸","琍","璃","瓈","盠","睝","离","穲","竰","筣","篱","籬","糎","縭","缡","罹","艃","荲","菞","蓠","蔾","藜","蘺","蜊","蟍","蟸","蠫","褵","謧","貍","醨","鋫","錅","鏫","鑗","離","驪","骊","鯏","鯬","鱺","鲡","鵹","鸝","鹂","黎","黧","㰀"],yuè:["刖","嬳","岄","岳","嶽","恱","悅","悦","戉","抈","捳","月","樾","瀹","爚","玥","礿","禴","篗","籆","籥","籰","粤","粵","蘥","蚎","蚏","説","越","跀","跃","躍","軏","鈅","鉞","鑰","钺","閱","閲","阅","鸑","鸙","黦","龠","𫐄","𬸚"],liú:["刘","劉","嚠","媹","嵧","旈","旒","榴","橊","流","浏","瀏","琉","瑠","瑬","璢","畄","留","畱","疁","瘤","癅","硫","蒥","蓅","蟉","裗","鎏","鏐","鐂","镠","飀","飅","飗","駠","駵","騮","驑","骝","鰡","鶹","鹠","麍"],zé:["则","則","啧","嘖","嫧","帻","幘","択","樍","歵","沢","泎","溭","皟","瞔","矠","礋","箦","簀","舴","蔶","蠌","襗","謮","賾","赜","迮","鸅","齚","齰"],"chuàng chuāng":["创","創"],qù:["刞","厺","去","閴","闃","阒","麮","鼁"],"bié biè":["別","别"],"páo bào":["刨"],"chǎn chàn":["刬","剗","幝"],guā:["刮","劀","桰","歄","煱","瓜","胍","踻","颪","颳","騧","鴰","鸹"],gēng:["刯","庚","椩","浭","焿","畊","絚","羮","羹","耕","菮","賡","赓","鶊","鹒"],dào:["到","噵","悼","椡","檤","燾","瓙","盗","盜","稲","稻","纛","翿","艔","菿","衜","衟","軇","道"],chuàng:["刱","剏","剙","怆","愴"],kū:["刳","哭","圐","堀","枯","桍","矻","窟","跍","郀","骷","鮬"],duò:["刴","剁","墯","尮","惰","憜","挅","桗","舵","跥","跺","陊","陏","飿","饳","鵽"],"shuā shuà":["刷"],"quàn xuàn":["券"],"chà shā":["刹","剎"],"cì cī":["刺"],guì:["刽","刿","劊","劌","撌","攰","昋","桂","椢","槶","樻","櫃","猤","禬","筀","蓕","襘","貴","贵","跪","鐀","鑎","鞼","鱖","鱥"],lóu:["剅","娄","婁","廔","楼","樓","溇","漊","熡","耧","耬","艛","蒌","蔞","蝼","螻","謱","軁","遱","鞻","髅","髏","𪣻"],cuò:["剉","剒","厝","夎","挫","措","棤","莝","莡","蓌","逪","銼","錯","锉","错"],"xiāo xuē":["削"],"kēi kè":["剋","尅"],"là lá":["剌"],tī:["剔","梯","踢","銻","锑","鷈","鷉","䏲","䴘"],pōu:["剖"],wān:["剜","塆","壪","帵","弯","彎","湾","潫","灣","睕","蜿","豌"],"bāo bō":["剝","剥"],duō:["剟","咄","哆","嚉","多","夛","掇","毲","畓","裰","㙍"],qíng:["剠","勍","夝","情","擎","晴","暒","棾","樈","檠","氰","甠","硘","葝","黥"],"yǎn shàn":["剡"],"dū zhuó":["剢"],yān:["剦","嫣","崦","嶖","恹","懕","懨","樮","淊","淹","漹","烟","焉","焑","煙","珚","篶","胭","臙","菸","鄢","醃","閹","阉","黫"],huō:["剨","劐","吙","攉","秴","耠","锪","騞","𬴃"],shèng:["剩","剰","勝","圣","墭","嵊","晠","榺","橳","琞","聖","蕂","貹","賸"],"duān zhì":["剬"],wū:["剭","呜","嗚","圬","屋","巫","弙","杇","歍","汙","汚","污","洿","烏","窏","箼","螐","誈","誣","诬","邬","鄔","鎢","钨","鰞","鴮"],gē:["割","哥","圪","彁","戈","戓","戨","歌","滒","犵","肐","袼","謌","鎶","鴚","鴿","鸽"],"dá zhá":["剳"],chuán:["剶","暷","椽","篅","舡","舩","船","輲","遄"],"tuán zhuān":["剸","漙","篿"],"lù jiū":["剹"],pēng:["剻","匉","嘭","怦","恲","抨","梈","烹","砰","軯","駍"],piāo:["剽","勡","慓","旚","犥","翲","螵","飃","飄","飘","魒"],kōu:["剾","彄","抠","摳","眍","瞘","芤","𫸩"],"jiǎo chāo":["剿","劋","勦","摷"],qiāo:["劁","勪","墝","幧","敲","橇","毃","燆","硗","磽","繑","趬","跷","踍","蹺","蹻","郻","鄡","鄥","鍫","鍬","鐰","锹","頝"],"huá huà":["劃"],"zhā zhá":["劄"],"pī pǐ":["劈","悂"],tāng:["劏","嘡","羰","薚","蝪","蹚","鞺","鼞"],chán:["劖","嚵","壥","婵","嬋","巉","廛","棎","毚","湹","潹","潺","澶","瀍","瀺","煘","獑","磛","緾","纏","纒","缠","艬","蝉","蟐","蟬","蟾","誗","讒","谗","躔","鄽","酁","鋋","鑱","镵","饞","馋"],zuān:["劗","躜","躦","鉆","鑚"],mó:["劘","嫫","嬤","嬷","尛","摹","擵","橅","糢","膜","藦","蘑","謨","謩","谟","饃","饝","馍","髍","魔","魹"],zhú:["劚","斸","曯","欘","灟","炢","烛","燭","爥","瘃","竹","笁","笜","舳","茿","蓫","蠋","蠾","躅","逐","逫","钃","鱁"],quàn:["劝","勧","勸","牶","韏"],"jìn jìng":["劤","劲","勁"],kēng:["劥","坑","牼","硁","硜","誙","銵","鍞","鏗","铿","阬"],"xié liè":["劦"],"zhù chú":["助"],nǔ:["努","弩","砮","胬"],shào:["劭","卲","哨","潲","紹","綤","绍","袑","邵"],miǎo:["劰","杪","淼","渺","眇","秒","篎","緲","缈","藐","邈"],kǒu:["劶","口"],wā:["劸","娲","媧","屲","挖","攨","洼","溛","漥","瓾","畖","穵","窊","窪","蛙","韈","鼃"],kuāng:["劻","匡","匩","哐","恇","洭","筐","筺","誆","诓","軭","邼"],hé:["劾","咊","啝","姀","峆","敆","曷","柇","楁","毼","河","涸","渮","澕","熆","皬","盇","盉","盍","盒","禾","篕","籺","粭","翮","菏","萂","覈","訸","詥","郃","釛","鉌","鑉","閡","闔","阂","阖","鞨","頜","餄","饸","魺","鹖","麧","齕","龁","龢","𬌗"],gào:["勂","吿","告","峼","祮","祰","禞","筶","誥","诰","郜","鋯","锆"],"bó bèi":["勃"],láng:["勆","嫏","廊","斏","桹","榔","樃","欴","狼","琅","瑯","硠","稂","艆","蓈","蜋","螂","躴","郒","郞","鋃","鎯","锒"],xūn:["勋","勛","勲","勳","嚑","坃","埙","塤","壎","壦","曛","燻","獯","矄","纁","臐","薫","薰","蘍","醺","𫄸"],"juàn juān":["勌","瓹"],"lè lēi":["勒"],kài:["勓","炌","烗","鎎"],"wěng yǎng":["勜"],qín:["勤","嗪","噙","嶜","庈","懃","懄","捦","擒","斳","檎","澿","珡","琴","琹","瘽","禽","秦","耹","芩","芹","菦","螓","蠄","鈙","鈫","雂","靲","鳹","鵭"],jiàng:["勥","匞","匠","嵹","弜","弶","摾","櫤","洚","滰","犟","糡","糨","絳","绛","謽","酱","醤","醬"],fān:["勫","嬏","帆","幡","忛","憣","旙","旛","繙","翻","藩","轓","颿","飜","鱕"],juān:["勬","姢","娟","捐","涓","蠲","裐","鎸","鐫","镌","鹃"],"tóng dòng":["勭","烔","燑","狪"],lǜ:["勴","垏","嵂","律","慮","氯","滤","濾","爈","箻","綠","繂","膟","葎","虑","鑢"],chè:["勶","坼","彻","徹","掣","撤","澈","烢","爡","瞮","硩","聅","迠","頙","㬚"],sháo:["勺","玿","韶"],"gōu gòu":["勾"],cōng:["匆","囪","囱","忩","怱","悤","暰","樬","漗","瑽","璁","瞛","篵","繱","聡","聦","聪","聰","苁","茐","葱","蓯","蔥","蟌","鍯","鏓","鏦","騘","驄","骢"],"táo yáo":["匋","陶"],páo:["匏","咆","垉","庖","爮","狍","袍","褜","軳","鞄","麅"],dá:["匒","妲","怛","炟","燵","畣","笪","羍","荙","薘","蟽","詚","达","迏","迖","迚","逹","達","鐽","靼","鞑","韃","龖","龘","𫟼"],"huà huā":["化"],"běi bèi":["北"],nǎo:["匘","垴","堖","嫐","恼","悩","惱","瑙","碯","脑","脳","腦"],"chí shi":["匙"],fāng:["匚","堏","方","淓","牥","芳","邡","鈁","錺","钫","鴋"],zā:["匝","咂","帀","沞","臜","臢","迊","鉔","魳"],qiè:["匧","厒","妾","怯","悏","惬","愜","挈","穕","窃","竊","笡","箧","篋","籡","踥","鍥","锲","鯜"],"zāng cáng":["匨"],fěi:["匪","奜","悱","棐","榧","篚","翡","蕜","誹","诽"],"kuì guì":["匮","匱"],suǎn:["匴"],pǐ:["匹","噽","嚭","圮","庀","痞","癖","脴","苉","銢","鴄"],"qū ōu":["区","區"],"kē qià":["匼"],"yǎn yàn":["匽","棪"],biǎn:["匾","惼","揙","碥","稨","窆","藊","褊","貶","贬","鴘"],nì:["匿","堄","嫟","嬺","惄","愵","昵","暱","氼","眤","睨","縌","胒","腻","膩","逆","𨺙"],niàn:["卄","唸","埝","廿","念","惗","艌"],sà:["卅","櫒","脎","萨","蕯","薩","鈒","隡","颯","飒","馺"],zú:["卆","哫","崪","族","箤","足","踤","镞"],shēng:["升","呏","声","斘","昇","曻","枡","殅","泩","湦","焺","牲","珄","生","甥","竔","笙","聲","鉎","鍟","阩","陞","陹","鵿","鼪"],wàn:["卍","卐","忨","杤","瞣","脕","腕","萬","蟃","贎","輐","錽","𬇕"],"huá huà huā":["华","華"],bēi:["卑","悲","揹","杯","桮","盃","碑","藣","鵯","鹎"],"zú cù":["卒"],"dān shàn chán":["单","單"],"nán nā":["南"],"shuài lǜ":["卛"],"bǔ bo pú":["卜"],"kuàng guàn":["卝"],biàn:["卞","变","変","峅","弁","徧","忭","抃","昪","汳","汴","玣","艑","苄","覍","諚","變","辡","辧","辨","辩","辫","辮","辯","遍","釆","𨚕"],bǔ:["卟","哺","捕","补","補","鸔","𬷕"],"zhàn zhān":["占","覱"],"kǎ qiǎ":["卡"],lú:["卢","嚧","垆","壚","庐","廬","曥","枦","栌","櫨","泸","瀘","炉","爐","獹","玈","瓐","盧","矑","籚","纑","罏","胪","臚","舮","舻","艫","芦","蘆","蠦","轤","轳","鈩","鑪","顱","颅","馿","髗","魲","鱸","鲈","鸕","鸬","黸","𬬻"],lǔ:["卤","塷","掳","擄","樐","橹","櫓","氌","滷","澛","瀂","硵","磠","穞","艣","艪","蓾","虏","虜","鏀","鐪","鑥","镥","魯","鲁","鹵"],guà:["卦","啩","挂","掛","罣","褂","詿","诖"],"áng yǎng":["卬"],yìn:["印","垽","堷","廕","慭","憖","憗","懚","洕","湚","猌","癊","胤","茚","酳","鮣","䲟"],què:["却","卻","塙","崅","悫","愨","慤","搉","榷","燩","琷","皵","确","確","礭","闋","阕","鵲","鹊","𬒈"],luǎn:["卵"],"juàn juǎn":["卷","巻"],"chǎng ān hàn":["厂"],"wěi yán":["厃"],tīng:["厅","厛","听","庁","廰","廳","汀","烃","烴","綎","耓","聴","聼","聽","鞓","𬘩"],"zhé zhái":["厇"],"hàn àn":["厈","屽"],yǎ:["厊","唖","庌","痖","瘂","蕥"],shè:["厍","厙","弽","慑","慴","懾","摂","欇","涉","涻","渉","滠","灄","社","舎","蔎","蠂","設","设","赦","騇","麝"],dǐ:["厎","呧","坘","弤","抵","拞","掋","牴","砥","菧","觝","詆","诋","軧","邸","阺","骶","鯳"],"zhǎ zhǎi":["厏"],páng:["厐","嫎","庞","徬","舽","螃","逄","鰟","鳑","龎","龐"],"zhì shī":["厔"],máng:["厖","吂","哤","娏","忙","恾","杗","杧","汒","浝","牻","痝","盲","硭","笀","芒","茫","蘉","邙","釯","鋩","铓","駹"],zuī:["厜","樶","纗","蟕"],"shà xià":["厦","廈"],áo:["厫","嗷","嗸","廒","敖","滶","獒","獓","璈","翱","翶","翺","聱","蔜","螯","謷","謸","遨","鏖","隞","鰲","鳌","鷔","鼇"],"lán qiān":["厱"],"sī mǒu":["厶"],"gōng hóng":["厷"],"lín miǎo":["厸"],"qiú róu":["厹"],dū:["厾","嘟","督","醏"],"xiàn xuán":["县","縣"],"cān shēn cēn sān":["参","參","叄","叅"],"ài yǐ":["叆"],"chā chà chǎ chá":["叉"],shuāng:["双","孀","孇","欆","礵","艭","雙","霜","騻","驦","骦","鷞","鸘","鹴"],shōu:["収","收"],guái:["叏"],bá:["叐","妭","抜","拔","炦","癹","胈","茇","菝","詙","跋","軷","魃","鼥"],"fā fà":["发"],"zhuó yǐ lì jué":["叕"],qǔ:["取","娶","竬","蝺","詓","齲","龋"],"jiǎ xiá":["叚","徦"],"wèi yù":["叞","尉","蔚"],dié:["叠","垤","堞","峌","幉","恎","惵","戜","曡","殜","氎","牃","牒","瓞","畳","疂","疉","疊","碟","絰","绖","耊","耋","胅","艓","苵","蜨","蝶","褋","詄","諜","谍","跮","蹀","迭","镻","鰈","鲽","鴩","𫶇"],ruì:["叡","枘","汭","瑞","睿","芮","蚋","蜹","銳","鋭","锐"],"jù gōu":["句"],lìng:["另","呤","炩","蘦"],"dāo dáo tāo":["叨"],"zhī zhǐ":["只"],jiào:["叫","呌","嘂","嘦","噍","嬓","斍","斠","滘","漖","獥","珓","皭","窖","藠","訆","譥","趭","較","轎","轿","较","酵","醮","釂"],"zhào shào":["召"],"kě kè":["可"],"tái tāi":["台","苔"],pǒ:["叵","尀","笸","箥","鉕","钷","駊"],"yè xié":["叶"],"hào háo":["号"],tàn:["叹","嘆","探","歎","湠","炭","碳","舕"],"hōng hóng":["叿"],miē:["吀","咩","哶","孭"],"xū yū yù":["吁"],chī:["吃","哧","喫","嗤","噄","妛","媸","彨","彲","摛","攡","殦","瓻","痴","癡","眵","瞝","笞","粚","胵","蚩","螭","訵","魑","鴟","鵄","鸱","黐","齝","𫄨"],"xuān sòng":["吅"],yāo:["吆","喓","夭","妖","幺","楆","殀","祅","腰","葽","訞","邀","鴁","鴢","㙘"],zǐ:["吇","姉","姊","子","杍","梓","榟","橴","滓","矷","秭","笫","籽","紫","耔","虸","訿","釨"],"hé gě":["合","鲄"],"cùn dòu":["吋"],"tóng tòng":["同"],"tǔ tù":["吐","唋"],"zhà zhā":["吒","奓"],"xià hè":["吓"],"ā yā":["吖"],"ma má mǎ":["吗"],lìn:["吝","恡","悋","橉","焛","甐","膦","蔺","藺","賃","赁","蹸","躏","躙","躪","轥","閵"],tūn:["吞","暾","朜","焞"],"bǐ pǐ":["吡"],qìn:["吢","吣","唚","抋","揿","搇","撳","沁","瀙","菣","藽"],"jiè gè":["吤"],"fǒu pǐ":["否"],"ba bā":["吧"],dūn:["吨","噸","墩","墪","惇","撉","撴","犜","獤","礅","蜳","蹾","驐"],fēn:["吩","帉","昐","朆","梤","棻","氛","竕","紛","纷","翂","芬","衯","訜","躮","酚","鈖","雰","餴","饙","馚"],"é huā":["吪"],"kēng háng":["吭","妔"],shǔn:["吮"],"zhī zī":["吱"],"yǐn shěn":["吲"],wú:["吳","吴","呉","墲","峿","梧","橆","毋","洖","浯","無","珸","璑","祦","芜","茣","莁","蕪","蜈","蟱","譕","郚","鋙","铻","鯃","鵐","鷡","鹀","鼯"],"chǎo chāo":["吵"],"nà nè":["吶"],"xuè chuò jué":["吷"],chuī:["吹","炊","龡"],"dōu rú":["吺"],hǒu:["吼","犼"],"hōng hǒu ōu":["吽"],"wú yù":["吾"],"ya yā":["呀"],"è e":["呃"],dāi:["呆","懛","獃"],"mèn qǐ":["呇"],hōng:["呍","嚝","揈","灴","烘","焢","硡","薨","訇","谾","軣","輷","轟","轰","鍧"],nà:["呐","捺","笝","納","纳","肭","蒳","衲","豽","貀","軜","郍","鈉","钠","靹","魶"],"tūn tiān":["呑"],"fǔ ḿ":["呒","嘸"],"dāi tǎi":["呔"],"ǒu ōu òu":["呕"],"bài bei":["呗"],"yuán yún yùn":["员","員"],guō:["呙","啯","嘓","埚","堝","墎","崞","彉","彍","懖","猓","瘑","聒","蝈","蟈","郭","鈛","鍋","锅"],"huá qì":["呚"],"qiàng qiāng":["呛","跄"],shī:["呞","失","尸","屍","师","師","施","浉","湤","湿","溮","溼","濕","狮","獅","瑡","絁","葹","蒒","蓍","虱","蝨","褷","襹","詩","诗","邿","釃","鉇","鍦","鯴","鰤","鲺","鳲","鳾","鶳","鸤","䴓","𫚕"],juǎn:["呟","埍","臇","菤","錈","锩"],pěn:["呠","翸"],"wěn mǐn":["呡"],"ne ní":["呢"],"ḿ m̀ móu":["呣"],rán:["呥","嘫","然","燃","繎","肰","蚦","蚺","衻","袇","袡","髥","髯"],"tiè chè":["呫"],"qì zhī":["呮"],"zǐ cī":["呰"],"guā gū guǎ":["呱"],"cī zī":["呲"],"hǒu xǔ gòu":["呴"],"hē ā á ǎ à a":["呵"],náo:["呶","夒","峱","嶩","巎","挠","撓","猱","硇","蛲","蟯","詉","譊","鐃","铙"],"xiā gā":["呷"],pēi:["呸","怌","肧","胚","衃","醅"],"háo xiāo":["呺"],mìng:["命","掵"],"dá dàn":["呾"],"zuǐ jǔ":["咀"],"xián gān":["咁"],pǒu:["咅","哣","犃"],"yǎng yāng":["咉"],"zǎ zé zhā":["咋"],"hé hè huó huò hú":["和"],hāi:["咍"],dā:["咑","哒","噠","墶","搭","撘","耷","褡","鎝","𨱏"],"kǎ kā":["咔"],gū:["咕","唂","唃","姑","嫴","孤","巬","巭","柧","橭","沽","泒","稒","笟","箍","箛","篐","罛","苽","菇","菰","蓇","觚","軱","軲","轱","辜","酤","鈲","鮕","鴣","鸪"],"kā gā":["咖"],zuo:["咗"],lóng:["咙","嚨","嶐","巃","巄","昽","曨","朧","栊","槞","櫳","湰","滝","漋","爖","珑","瓏","癃","眬","矓","砻","礱","礲","窿","竜","聋","聾","胧","茏","蘢","蠪","蠬","襱","豅","鏧","鑨","霳","靇","驡","鸗","龍","龒","龙"],"xiàn xián":["咞"],qì:["咠","唭","噐","器","夡","弃","憇","憩","暣","棄","欫","气","気","氣","汔","汽","泣","湆","湇","炁","甈","盵","矵","碛","碶","磜","磧","罊","芞","葺","藒","蟿","訖","讫","迄","鐑"],"xì dié":["咥"],"liē liě lié lie":["咧"],zī:["咨","嗞","姕","姿","孜","孳","孶","崰","嵫","栥","椔","淄","湽","滋","澬","玆","禌","秶","粢","紎","緇","緕","纃","缁","茊","茲","葘","諮","谘","貲","資","赀","资","赼","趑","趦","輜","輺","辎","鄑","鈭","錙","鍿","鎡","锱","镃","頾","頿","髭","鯔","鰦","鲻","鶅","鼒","齍","齜","龇"],mī:["咪"],"jī xī qià":["咭"],"gē luò kǎ lo":["咯"],"shù xún":["咰"],"zán zá zǎ zan":["咱"],"hāi ké":["咳"],huī:["咴","噅","噕","婎","媈","幑","徽","恢","拻","挥","揮","晖","暉","楎","洃","瀈","灰","灳","烣","睳","禈","翚","翬","蘳","袆","褘","詼","诙","豗","輝","辉","鰴","麾","㧑"],"huài shì":["咶"],táo:["咷","啕","桃","檮","洮","淘","祹","綯","绹","萄","蜪","裪","迯","逃","醄","鋾","鞀","鞉","饀","駣","騊","鼗","𫘦"],xián:["咸","啣","娴","娹","婱","嫌","嫺","嫻","弦","挦","撏","涎","湺","澖","甉","痫","癇","癎","絃","胘","舷","藖","蚿","蛝","衔","衘","誸","諴","賢","贒","贤","輱","醎","銜","鑦","閑","闲","鷳","鷴","鷼","鹇","鹹","麙","𫍯"],"è àn":["咹"],"xuān xuǎn":["咺","烜"],"wāi hé wǒ guǎ guō":["咼"],"yàn yè yān":["咽"],āi:["哀","哎","埃","溾","銰","鎄","锿"],pǐn:["品","榀"],shěn:["哂","婶","嬸","审","宷","審","弞","曋","渖","瀋","瞫","矤","矧","覾","訠","諗","讅","谂","谉","邥","頣","魫"],"hǒng hōng hòng":["哄"],"wā wa":["哇"],"hā hǎ hà":["哈"],zāi:["哉","栽","渽","溨","災","灾","烖","睵","賳"],"dì diè":["哋"],pài:["哌","沠","派","渒","湃","蒎","鎃"],"gén hěn":["哏"],"yǎ yā":["哑","雅"],"yuě huì":["哕","噦"],nián:["哖","年","秊","秥","鮎","鯰","鲇","鲶","鵇","黏"],"huá huā":["哗","嘩"],"jì jiē zhāi":["哜","嚌"],mōu:["哞"],"yō yo":["哟","喲"],lòng:["哢","梇","贚"],"ò ó é":["哦"],"lī lǐ li":["哩"],"nǎ na nǎi né něi":["哪"],hè:["哬","垎","壑","寉","惒","焃","煂","燺","爀","癋","碋","翯","褐","謞","賀","贺","赫","靍","靎","靏","鶴","鸖","鹤"],"bō pò bā":["哱"],zhé:["哲","啠","喆","嚞","埑","悊","摺","晢","晣","歽","矺","砓","磔","籷","粍","虴","蛰","蟄","袩","詟","謫","謺","讁","讋","谪","輒","輙","轍","辄","辙","鮿"],"liàng láng":["哴"],"liè lǜ":["哷"],hān:["哻","憨","蚶","谽","酣","頇","顸","馠","魽","鼾"],"hēng hng":["哼"],gěng:["哽","埂","峺","挭","梗","綆","绠","耿","莄","郠","骾","鯁","鲠","𬒔"],"chuò yuè":["哾"],"gě jiā":["哿"],"bei bài":["唄"],"hán hàn":["唅"],chún:["唇","浱","湻","滣","漘","犉","純","纯","脣","莼","蒓","蓴","醇","醕","錞","陙","鯙","鶉","鹑","𬭚"],"ài āi":["唉"],"jiá qiǎn":["唊"],"yán dàn xián":["唌"],chē:["唓","砗","硨","莗","蛼"],"wú ńg ń":["唔"],zào:["唕","唣","噪","慥","梍","灶","煰","燥","皁","皂","竃","竈","簉","艁","譟","趮","躁","造","𥖨"],dí:["唙","啇","嘀","嚁","嫡","廸","敌","敵","梑","涤","滌","狄","笛","籴","糴","苖","荻","蔋","蔐","藡","覿","觌","豴","迪","靮","頔","馰","髢","鸐","𬱖"],"gòng hǒng gǒng":["唝","嗊"],dóu:["唞"],"lào láo":["唠","嘮","憦"],huàn:["唤","喚","奂","奐","宦","嵈","幻","患","愌","换","換","擐","攌","梙","槵","浣","涣","渙","漶","澣","烉","焕","煥","瑍","痪","瘓","睆","肒","藧","豢","轘","逭","鯇","鯶","鰀","鲩"],léng:["唥","塄","楞","碐","薐"],"wō wěi":["唩"],fěng:["唪","覂","諷","讽"],"yín jìn":["唫"],"hǔ xià":["唬"],wéi:["唯","围","圍","壝","峗","峞","嵬","帏","帷","幃","惟","桅","沩","洈","涠","湋","溈","潍","潙","潿","濰","犩","矀","維","维","蓶","覹","违","違","鄬","醀","鍏","闈","闱","韋","韦","鮠","𣲗","𬶏"],shuā:["唰"],chàng:["唱","怅","悵","暢","焻","畅","畼","誯","韔","鬯"],"ér wā":["唲"],qiàng:["唴","炝","熗","羻"],yō:["唷"],yū:["唹","淤","瘀","盓","箊","紆","纡","込","迂","迃","陓"],lài:["唻","濑","瀨","瀬","癞","癩","睐","睞","籁","籟","藾","賚","賴","赉","赖","頼","顂","鵣"],tuò:["唾","嶞","柝","毤","毻","箨","籜","萚","蘀","跅"],"zhōu zhāo tiào":["啁"],kěn:["啃","垦","墾","恳","懇","肎","肯","肻","豤","錹"],"zhuó zhào":["啅","濯"],"hēng hèng":["啈","悙"],"lín lán":["啉"],"a ā á ǎ à":["啊"],qiāng:["啌","嗴","嶈","戕","摤","斨","枪","槍","溬","牄","猐","獇","羌","羗","腔","蜣","謒","鏘","锖","锵"],"tūn zhūn xiāng duǐ":["啍"],wèn:["問","妏","揾","搵","璺","问","顐"],"cuì qi":["啐"],"dié shà jié tì":["啑"],"yuē wā":["啘"],"zǐ cǐ":["啙"],"bǐ tú":["啚"],"chuò chuài":["啜"],"yǎ yā è":["啞"],fēi:["啡","婓","婔","扉","暃","渄","猆","緋","绯","裶","霏","非","靟","飛","飝","飞","餥","馡","騑","騛","鯡","鲱","𬴂"],pí:["啤","壀","枇","毗","毘","焷","琵","疲","皮","篺","罴","羆","脾","腗","膍","蚍","蚽","蜱","螷","蠯","豼","貔","郫","鈹","阰","陴","隦","魮","鮍","鲏","鵧","鼙"],shá:["啥"],"lā la":["啦"],"yīng qíng":["啨"],pā:["啪","妑","舥","葩","趴"],"zhě shì":["啫"],sè:["啬","嗇","懎","擌","栜","歮","涩","渋","澀","澁","濇","濏","瀒","瑟","璱","瘷","穑","穡","穯","繬","譅","轖","銫","鏼","铯","飋"],niè:["啮","嗫","噛","嚙","囁","囓","圼","孼","孽","嵲","嶭","巕","帇","敜","枿","槷","櫱","涅","湼","痆","篞","籋","糱","糵","聂","聶","臬","臲","蘖","蠥","讘","踂","踗","踙","蹑","躡","錜","鎳","鑈","鑷","钀","镊","镍","闑","陧","隉","顳","颞","齧","𫔶"],"luō luó luo":["啰","囉"],"tān chǎn tuō":["啴"],bo:["啵","蔔"],dìng:["啶","定","椗","矴","碇","碠","磸","聢","腚","萣","蝊","訂","订","錠","锭","顁","飣","饤"],lāng:["啷"],"án ān":["啽"],kā:["喀","擖"],"yóng yú":["喁"],"lā lá lǎ":["喇"],jiē:["喈","喼","嗟","堦","媘","接","掲","擑","湝","煯","疖","痎","癤","皆","秸","稭","脻","蝔","街","謯","阶","階","鞂","鶛"],hóu:["喉","帿","猴","瘊","睺","篌","糇","翭","葔","鄇","鍭","餱","骺","鯸","𬭤"],"dié zhá":["喋"],wāi:["喎","歪","竵"],"nuò rě":["喏"],"xù huò guó":["喐"],zán:["喒"],"wō ō":["喔"],hú:["喖","嘝","囫","壶","壷","壺","媩","弧","搰","斛","楜","槲","湖","瀫","焀","煳","狐","猢","瑚","瓳","箶","絗","縠","胡","葫","蔛","蝴","螜","衚","觳","醐","鍸","頶","餬","鬍","魱","鰗","鵠","鶘","鶦","鹕"],"huàn yuán xuǎn hé":["喛"],xǐ:["喜","囍","壐","屣","徙","憙","枲","橲","歖","漇","玺","璽","矖","禧","縰","葈","葸","蓰","蟢","謑","蹝","躧","鈢","鉨","鉩","鱚","𬭳","𬶮"],"hē hè yè":["喝"],kuì:["喟","嘳","媿","嬇","愦","愧","憒","篑","簣","籄","聩","聭","聵","膭","蕢","謉","餽","饋","馈"],"zhǒng chuáng":["喠"],"wéi wèi":["喡","為","爲"],"duó zhà":["喥"],"sāng sàng":["喪"],"qiáo jiāo":["喬"],"pèn bēn":["喯"],"cān sūn qī":["喰"],"zhā chā":["喳"],miāo:["喵"],"pēn pèn":["喷"],kuí:["喹","夔","奎","巙","戣","揆","晆","暌","楏","楑","櫆","犪","睽","葵","藈","蘷","虁","蝰","躨","逵","鄈","鍨","鍷","頯","馗","騤","骙","魁"],"lou lóu":["喽"],"zào qiāo":["喿"],"hè xiāo xiào hù":["嗃"],"á shà":["嗄"],xiù:["嗅","岫","峀","溴","珛","琇","璓","秀","綉","繍","繡","绣","螑","袖","褎","褏","銹","鏥","鏽","锈","齅"],"qiāng qiàng":["嗆","戗","戧","蹌","蹡"],"ài yì":["嗌","艾"],"má mǎ ma":["嗎"],"kè kē":["嗑"],"dā tà":["嗒","鎉"],sǎng:["嗓","搡","磉","褬","鎟","顙","颡"],chēn:["嗔","抻","琛","瞋","諃","謓","賝","郴","𬘭"],"wā gǔ":["嗗"],"pǎng bēng":["嗙"],"xián qiǎn qiān":["嗛"],lào:["嗠","嫪","橯","涝","澇","耢","耮","躼","軂","酪"],wēng:["嗡","翁","聬","螉","鎓","鶲","鹟","𬭩"],wà:["嗢","腽","膃","袜","襪","韤"],"hēi hāi":["嗨"],hē:["嗬","欱","蠚","訶","诃"],zi:["嗭"],sǎi:["嗮"],"ǹg ńg ňg":["嗯"],gě:["嗰","舸"],ná:["嗱","拏","拿","鎿","镎"],diǎ:["嗲"],"ài ǎi āi":["嗳"],tōng:["嗵","樋","炵","蓪"],"zuī suī":["嗺"],"zhē zhè zhù zhe":["嗻"],mò:["嗼","圽","塻","墨","妺","嫼","寞","帞","昩","末","枺","歿","殁","沫","漠","爅","獏","瘼","皌","眽","眿","瞐","瞙","砞","礳","秣","絈","纆","耱","茉","莈","蓦","蛨","蟔","貃","貊","貘","銆","鏌","镆","陌","靺","驀","魩","默","黙","𬙊"],sòu:["嗽","瘶"],tǎn:["嗿","坦","忐","憳","憻","暺","毯","璮","菼","袒","襢","醓","鉭","钽"],"jiào dǎo":["嘄"],"kǎi gě":["嘅"],"shān càn":["嘇"],cáo:["嘈","嶆","曹","曺","槽","漕","艚","蓸","螬","褿","鏪","𥕢"],piào:["嘌","徱","蔈","驃"],"lóu lou":["嘍"],gǎ:["尕","玍"],"gǔ jiǎ":["嘏"],"jiāo xiāo":["嘐"],"xū shī":["嘘","噓"],pó:["嘙","嚩","婆","櫇","皤","鄱"],"dē dēi":["嘚"],"ma má":["嘛"],"lē lei":["嘞"],"gā gá gǎ":["嘠"],sāi:["嘥","噻","毢","腮","顋","鰓"],"zuō chuài":["嘬"],"cháo zhāo":["嘲","朝","鼂"],zuǐ:["嘴","噿","嶊","璻"],"qiáo qiào":["嘺","翹","谯"],"chù xù shòu":["嘼"],"tān chǎn":["嘽"],"dàn tán":["嘾","弾","彈","惔","澹"],"hēi mò":["嘿"],ě:["噁","砨","頋","騀","鵈"],"fān bo":["噃"],chuáng:["噇","床","牀"],"cù zā hé":["噈"],"tūn kuò":["噋"],"cēng chēng":["噌"],dēng:["噔","嬁","灯","燈","璒","登","竳","簦","艠","豋"],pū:["噗","扑","撲","攴","攵","潽","炇","陠"],juē:["噘","屩","屫","撧"],lū:["噜","嚕","撸","擼","謢"],zhān:["噡","岾","惉","旃","旜","枬","栴","毡","氈","氊","沾","瞻","薝","蛅","詀","詹","譫","谵","趈","邅","閚","霑","飦","饘","驙","魙","鱣","鸇","鹯","𫗴"],ō:["噢"],"zhòu zhuó":["噣"],"jiào qiào chī":["噭"],yuàn:["噮","妴","怨","愿","掾","瑗","禐","苑","衏","裫","褑","院","願"],"ǎi ài āi":["噯"],"yōng yǒng":["噰","澭"],"jué xué":["噱"],"pēn pèn fèn":["噴"],gá:["噶","尜","釓","錷","钆"],"xīn hěn hèn":["噷"],dāng:["噹","澢","珰","璫","筜","簹","艡","蟷","裆","襠"],làn:["嚂","滥","濫","烂","燗","爁","爛","爤","瓓","糷","钄"],tà:["嚃","嚺","崉","挞","搨","撻","榻","橽","毾","涾","澾","濌","禢","粏","誻","譶","蹋","蹹","躂","躢","遝","錔","闒","闥","闼","阘","鞜","鞳"],"huō huò ǒ":["嚄"],hāo:["嚆","茠","蒿","薅"],"hè xià":["嚇"],"xiù pì":["嚊"],"zhōu chóu":["嚋","盩","诪"],mē:["嚒"],"chā cā":["嚓"],"bó pào bào":["嚗"],"me mèi mò":["嚜"],"xié hái":["嚡"],"áo xiāo":["嚣"],mō:["嚤","摸"],pín:["嚬","娦","嫔","嬪","玭","矉","薲","蠙","貧","贫","顰","颦","𬞟"],mè:["嚰","濹"],"rǎng rāng":["嚷"],lá:["嚹","旯"],"jiáo jué jiào":["嚼"],chuò:["嚽","娖","擉","歠","涰","磭","踀","輟","辍","辵","辶","酫","鑡","餟","齪","龊"],"huān huàn":["嚾"],"zá cà":["囃"],chài:["囆","虿","蠆","袃","訍"],"náng nāng":["囊"],"zá zàn cān":["囋"],sū:["囌","櫯","甦","稣","穌","窣","蘇","蘓","酥","鯂"],zèng:["囎","熷","甑","贈","赠","鋥","锃"],"zá niè yàn":["囐"],nāng:["囔"],"luó luō luo":["囖"],"wéi guó":["囗"],huí:["囘","回","囬","廻","廽","恛","洄","痐","茴","蚘","蛔","蛕","蜖","迴","逥","鮰"],nín:["囜","您","脌"],"jiǎn nān":["囝"],nān:["囡"],tuán:["团","団","團","慱","抟","摶","檲","糰","鏄","鷒","鷻"],"tún dùn":["囤","坉"],guó:["囯","囶","囻","国","圀","國","帼","幗","慖","摑","漍","聝","腘","膕","蔮","虢","馘","𬇹"],kùn:["困","涃","睏"],"wéi tōng":["囲"],qūn:["囷","夋","逡"],rì:["囸","日","衵","鈤","馹","驲"],tāi:["囼","孡","胎"],pǔ:["圃","圑","擈","普","暜","樸","檏","氆","浦","溥","烳","諩","譜","谱","蹼","鐠","镨"],"quān juàn juān":["圈","圏"],"chuí chuán":["圌"],tuǎn:["圕","畽","疃"],lüè:["圙","掠","略","畧","稤","鋝","鋢","锊","䂮"],"huán yuán":["圜"],luán:["圝","圞","奱","娈","孌","孪","孿","峦","巒","挛","攣","曫","栾","欒","滦","灤","癴","癵","羉","脔","臠","虊","銮","鑾","鵉","鸞","鸾"],tǔ:["土","圡","釷","钍"],"xū wéi":["圩"],"dì de":["地","嶳"],"qiān sú":["圱"],zhèn:["圳","塦","挋","振","朕","栚","甽","眹","紖","絼","纼","誫","賑","赈","鋴","鎭","鎮","镇","阵","陣","震","鴆","鸩"],"chǎng cháng":["场","場","塲"],"qí yín":["圻"],jiá:["圿","忦","恝","戞","扴","脥","荚","莢","蛱","蛺","裌","跲","郏","郟","鋏","铗","頬","頰","颊","鴶","鵊"],"zhǐ zhì":["坁"],bǎn:["坂","岅","昄","板","版","瓪","粄","舨","蝂","鈑","钣","阪","魬"],qǐn:["坅","寑","寝","寢","昑","梫","笉","螼","赾","鋟","锓"],"méi fén":["坆"],"rǒng kēng":["坈"],"fāng fáng":["坊"],"fèn bèn":["坋"],tān:["坍","怹","摊","擹","攤","滩","灘","瘫","癱","舑","貪","贪"],"huài pēi pī péi":["坏"],"dì làn":["坔"],tán:["坛","墰","墵","壇","壜","婒","憛","昙","曇","榃","檀","潭","燂","痰","磹","罈","罎","藫","談","譚","譠","谈","谭","貚","郯","醰","錟","顃"],bà:["坝","垻","壩","弝","欛","灞","爸","矲","覇","霸","鮁","鲅"],fén:["坟","墳","妢","岎","幩","枌","棼","汾","焚","燌","燓","羒","羵","蒶","蕡","蚠","蚡","豮","豶","轒","鐼","隫","馩","魵","黂","鼖","鼢","𣸣"],zhuì:["坠","墜","惴","甀","畷","礈","綴","縋","缀","缒","腏","膇","諈","贅","赘","醊","錣","鑆"],pō:["坡","岥","泼","溌","潑","釙","鏺","钋","頗","颇","䥽"],"pǎn bàn":["坢"],kūn:["坤","堃","堒","崐","崑","昆","晜","潉","焜","熴","猑","琨","瑻","菎","蜫","裈","裩","褌","醌","錕","锟","騉","髠","髡","髨","鯤","鲲","鵾","鶤","鹍"],diàn:["坫","垫","墊","壂","奠","婝","店","惦","扂","橂","殿","淀","澱","玷","琔","电","癜","簟","蜔","鈿","電","靛","驔"],"mù mǔ":["坶"],"kē kě":["坷","軻"],xuè:["坹","岤","桖","瀥","狘","瞲","謔","谑","趐"],"dǐ chí":["坻","柢"],lā:["垃","柆","菈","邋"],lǒng:["垄","垅","壟","壠","拢","攏","竉","陇","隴","𬕂"],mín:["垊","姄","岷","崏","捪","旻","旼","民","珉","琘","琝","瑉","痻","盿","砇","緍","緡","缗","罠","苠","鈱","錉","鍲","鴖"],"dòng tóng":["垌","峒","洞"],cí:["垐","嬨","慈","柌","濨","珁","瓷","甆","磁","礠","祠","糍","茨","詞","词","辝","辞","辤","辭","雌","飺","餈","鴜","鶿","鷀","鹚"],duī:["垖","堆","塠","痽","磓","鐓","鐜","鴭"],"duò duǒ":["垛"],"duǒ duò":["垜","挆"],chá:["垞","察","嵖","搽","槎","檫","猹","茬","茶","詧","靫","𥻗"],shǎng:["垧","晌","樉","賞","贘","赏","鋿","鏛","鑜"],shǒu:["垨","守","手","扌","艏","首"],da:["垯","繨","跶"],háng:["垳","斻","杭","筕","絎","绗","航","苀","蚢","裄","貥","迒","頏","颃","魧"],"ān ǎn":["垵"],xīng:["垶","惺","星","曐","煋","猩","瑆","皨","篂","腥","興","觪","觲","謃","騂","骍","鮏","鯹"],"yuàn huán":["垸"],bāng:["垹","帮","幇","幚","幫","捠","梆","浜","邦","邫","鞤","𠳐"],"póu fú":["垺"],cén:["埁","岑","涔"],"běng fēng":["埄"],"dì fáng":["埅"],"xiá jiā":["埉"],"mái mán":["埋"],làng:["埌","崀","浪","蒗","閬","㫰"],"shān yán":["埏"],"qín jīn":["埐"],"pǔ bù":["埔"],huā:["埖","婲","椛","硴","糀","花","蒊","蘤","誮","錵"],"suì sù":["埣"],"pí pì":["埤"],"qīng zhēng":["埥","鲭"],"wǎn wān":["埦"],lǔn:["埨","稐","𫭢"],"zhēng chéng":["埩"],kōng:["埪","崆","箜","躻","錓","鵼"],"cǎi cài":["埰","寀","采"],"chù tòu":["埱"],běng:["埲","琫","菶","鞛"],"kǎn xiàn":["埳"],"yì shì":["埶","醳"],péi:["培","毰","裴","裵","賠","赔","錇","锫","阫","陪"],"sào sǎo":["埽"],"jǐn qīn jìn":["堇"],"péng bèng":["堋"],"qiàn zàn jiàn":["堑"],àn:["堓","屵","岸","按","暗","案","胺","荌","豻","貋","錌","闇","隌","黯"],"duò huī":["堕","墮"],huán:["堚","寏","寰","峘","桓","洹","澴","獂","环","環","糫","繯","缳","羦","荁","萈","萑","豲","鍰","鐶","锾","镮","闤","阛","雈","鬟","鹮","𬘫","𤩽"],"bǎo bǔ pù":["堡"],"máo móu wǔ":["堥"],ruán:["堧","壖","撋"],"ài è yè":["堨"],gèng:["堩","暅"],méi:["堳","塺","媒","嵋","徾","攗","枚","栂","梅","楣","楳","槑","湄","湈","煤","猸","玫","珻","瑂","眉","睂","禖","脄","脢","腜","苺","莓","葿","郿","酶","鎇","镅","霉","鶥","鹛","黴"],dǔ:["堵","琽","睹","笃","篤","覩","賭","赌"],féng:["堸","綘","艂","逢"],hèng:["堼"],chūn:["堾","媋","旾","春","暙","杶","椿","槆","橁","櫄","瑃","箺","萅","蝽","輴","鰆","鶞","䲠"],jiǎng:["塂","奖","奨","奬","桨","槳","獎","耩","膙","蒋","蔣","講","讲","顜"],huāng:["塃","巟","慌","肓","荒","衁"],duàn:["塅","断","斷","椴","段","毈","煅","瑖","碫","簖","籪","緞","缎","腶","葮","躖","鍛","锻"],tǎ:["塔","墖","獭","獺","鮙","鰨","鳎"],wěng:["塕","奣","嵡","攚","暡","瞈","蓊"],"sāi sài sè":["塞"],zàng:["塟","弉","臓","臟","葬","蔵","銺"],tián:["塡","屇","恬","沺","湉","璳","甛","甜","田","畋","畑","碵","磌","胋","闐","阗","鴫","鷆","鷏"],zhèng:["塣","幁","政","証","諍","證","证","诤","郑","鄭","靕","鴊"],"tián zhèn":["填"],wēn:["塭","昷","榲","殟","温","溫","瑥","瘟","蕰","豱","輼","轀","辒","鎾","饂","鰛","鰮","鳁"],liù:["塯","廇","磟","翏","雡","霤","餾","鬸","鷚","鹨"],hǎi:["塰","海","烸","酼","醢"],lǎng:["塱","朖","朗","朤","烺","蓢","㮾"],bèng:["塴","揼","泵","甏","綳","蹦","迸","逬","鏰","镚"],chén:["塵","宸","尘","忱","敐","敶","晨","曟","栕","樄","沉","煁","瘎","臣","茞","莀","莐","蔯","薼","螴","訦","諶","軙","辰","迧","鈂","陈","陳","霃","鷐","麎"],"ōu qiū":["塸"],"qiàn jiàn":["塹"],"zhuān tuán":["塼"],shuǎng:["塽","慡","漺","爽","縔","鏯"],shú:["塾","婌","孰","璹","秫","贖","赎"],lǒu:["塿","嵝","嶁","甊","篓","簍"],chí:["墀","弛","持","池","漦","竾","筂","箎","篪","茌","荎","蚳","謘","貾","赿","踟","迟","迡","遅","遟","遲","鍉","馳","驰"],shù:["墅","庶","庻","怷","恕","戍","束","树","樹","沭","漱","潄","濖","竖","竪","絉","腧","荗","蒁","虪","術","裋","豎","述","鉥","錰","鏣","霔","鶐","𬬸"],"dì zhì":["墆","疐"],kàn:["墈","崁","瞰","矙","磡","衎","鬫"],chěn:["墋","夦","硶","碜","磣","贂","趻","踸","鍖"],"zhǐ zhuó":["墌"],qiǎng:["墏","繈","繦","羥","襁"],zēng:["増","增","憎","璔","矰","磳","罾","譄","鄫","鱛","䎖"],qiáng:["墙","墻","嫱","嬙","樯","檣","漒","牆","艢","蔃","蔷","蘠"],"kuài tuí":["墤"],"tuǎn dǒng":["墥"],"qiáo què":["墧"],"zūn dūn":["墫"],"qiāo áo":["墽"],"yì tú":["墿"],"xué bó jué":["壆"],lǎn:["壈","嬾","孄","孏","懒","懶","揽","擥","攬","榄","欖","浨","漤","灠","纜","缆","罱","覧","覽","览","醂","顲"],huài:["壊","壞","蘾"],rǎng:["壌","壤","攘","爙"],"làn xiàn":["壏"],dǎo:["壔","导","導","岛","島","嶋","嶌","嶹","捣","搗","擣","槝","祷","禂","禱","蹈","陦","隝","隯"],ruǐ:["壡","桵","橤","繠","蕊","蕋","蘂","蘃"],san:["壭"],zhuàng:["壮","壯","壵","撞","焋","状","狀"],"ké qiào":["壳","殼"],kǔn:["壸","壼","悃","捆","梱","硱","祵","稇","稛","綑","裍","閫","閸","阃"],mǎng:["壾","漭","茻","莽","莾","蠎"],cún:["壿","存"],"zhǐ zhōng":["夂"],"gǔ yíng":["夃"],"jiàng xiáng":["夅","降"],"páng féng fēng":["夆"],zhāi:["夈","捚","摘","斋","斎","榸","粂","齋"],"xuàn xiòng":["夐"],wài:["外","顡"],"wǎn yuàn wān yuān":["夗"],"mǎo wǎn":["夘"],mèng:["夢","夣","孟","梦","癦","霥"],"dà dài":["大"],"fū fú":["夫","姇","枎","粰"],guài:["夬","怪","恠"],yāng:["央","姎","抰","殃","泱","秧","胦","鉠","鍈","雵","鴦","鸯"],"hāng bèn":["夯"],gǎo:["夰","搞","杲","槀","槁","檺","稁","稾","稿","縞","缟","菒","藁","藳"],"tāo běn":["夲"],"tóu tou":["头"],"yǎn tāo":["夵"],"kuā kuà":["夸","誇"],"jiá jiā gā xiá":["夹"],huà:["夻","婳","嫿","嬅","崋","摦","杹","枠","桦","槬","樺","澅","画","畫","畵","繣","舙","話","諙","譮","话","黊"],"jiā jiá gā xiá":["夾"],ēn:["奀","恩","蒽"],"dī tì":["奃"],"yǎn yān":["奄","渰"],pào:["奅","疱","皰","砲","礟","礮","靤","麭"],nài:["奈","柰","渿","耐","萘","褦","錼","鼐"],"quān juàn":["奍","弮","棬"],zòu:["奏","揍"],"qì qiè xiè":["契"],kāi:["奒","开","揩","鐦","锎","開"],"bēn bèn":["奔","泍"],tào:["套"],"zàng zhuǎng":["奘"],běn:["奙","本","楍","畚","翉","苯"],"xùn zhuì":["奞"],shē:["奢","檨","猞","畭","畲","賒","賖","赊","輋","𪨶"],"hǎ pò tǎi":["奤"],"ào yù":["奥","奧","澚"],yūn:["奫","氲","氳","蒀","蒕","蝹","贇","赟","𫖳"],"duǒ chě":["奲"],"nǚ rǔ":["女"],nú:["奴","孥","笯","駑","驽"],"dīng dǐng tiǎn":["奵"],"tā jiě":["她"],nuán:["奻"],"hǎo hào":["好"],fàn:["奿","嬎","梵","汎","泛","滼","瀪","犯","畈","盕","笵","範","范","訉","販","贩","軬","輽","飯","飰","饭"],shuò:["妁","搠","朔","槊","烁","爍","矟","蒴","鎙","鑠","铄"],"fēi pèi":["妃"],wàng:["妄","忘","旺","望","朢"],zhuāng:["妆","妝","娤","庄","庒","桩","梉","樁","粧","糚","荘","莊","装","裝"],mā:["妈","媽"],"fū yōu":["妋"],"hài jiè":["妎"],dù:["妒","妬","杜","殬","渡","秺","芏","荰","螙","蠧","蠹","鍍","镀","靯","𬭊"],miào:["妙","庙","庿","廟","玅","竗"],"fǒu pēi pī":["妚"],"yuè jué":["妜"],niū:["妞"],"nà nàn":["妠"],tuǒ:["妥","嫷","庹","椭","楕","橢","鬌","鰖","鵎"],"wàn yuán":["妧"],fáng:["妨","房","肪","防","魴","鲂"],nī:["妮"],zhóu:["妯","碡"],zhāo:["妱","巶","招","昭","釗","鉊","鍣","钊","駋","𬬿"],"nǎi nǐ":["妳"],tǒu:["妵","敨","紏","蘣","黈"],"xián xuán xù":["妶"],"zhí yì":["妷","秇"],ē:["妸","妿","婀","屙"],mèi:["妹","媚","寐","抺","旀","昧","沬","煝","痗","眛","睸","祙","篃","蝞","袂","跊","鬽","魅"],"qī qì":["妻"],"xū xǔ":["姁","稰"],"shān shàn":["姍","姗","苫","釤","钐"],mán:["姏","慲","樠","蛮","蠻","謾","饅","馒","鬗","鬘","鰻","鳗"],jiě:["姐","媎","檞","毑","飷"],"wěi wēi":["委"],pīn:["姘","拼","礗","穦","馪","驞"],"huá huó":["姡"],"jiāo xiáo":["姣"],"gòu dù":["姤"],"lǎo mǔ":["姥"],"nián niàn":["姩"],zhěn:["姫","屒","弫","抮","昣","枕","畛","疹","眕","稹","縝","縥","缜","聄","萙","袗","裖","覙","診","诊","軫","轸","辴","駗","鬒"],héng:["姮","恆","恒","烆","珩","胻","蘅","衡","鑅","鴴","鵆","鸻"],"jūn xún":["姰"],"kuā hù":["姱"],"è yà":["姶"],"xiān shēn":["姺"],wá:["娃"],"ráo rǎo":["娆","嬈"],"shào shāo":["娋"],xiē:["娎","揳","楔","歇","蝎","蠍"],"wǔ méi mǔ":["娒"],"chuò lài":["娕"],niáng:["娘","嬢","孃"],"nà nuó":["娜","𦰡"],"pōu bǐ":["娝"],"něi suī":["娞"],tuì:["娧","煺","蛻","蜕","退","駾"],mǎn:["娨","屘","満","满","滿","螨","蟎","襔","鏋"],"wú wù yú":["娪"],"xī āi":["娭"],"zhuì shuì":["娷"],"dōng dòng":["娻"],"ǎi ái è":["娾"],"ē ě":["娿"],mián:["婂","嬵","宀","杣","棉","檰","櫋","眠","矈","矊","矏","綿","緜","绵","芇","蝒"],"pǒu péi bù":["婄"],biǎo:["婊","脿","表","裱","褾","諘","錶"],"fù fàn":["婏"],wǒ:["婐","婑","我"],"ní nǐ":["婗","棿"],"quán juàn":["婘","惓"],hūn:["婚","昏","昬","棔","涽","睧","睯","碈","荤","葷","蔒","轋","閽","阍"],"qiān jǐn":["婜"],"wān wà":["婠"],"lái lài":["婡","徕","徠"],"zhōu chōu":["婤"],"chuò nào":["婥"],"nüè àn":["婩"],"hùn kūn":["婫"],"dàng yáng":["婸"],nàn:["婻"],"ruò chuò":["婼"],jiǎ:["婽","岬","斚","斝","榎","槚","檟","玾","甲","胛","鉀","钾"],"tōu yú":["婾","媮"],"yù yú":["媀"],"wéi wěi":["媁"],"dì tí":["媂","珶","苐"],róu:["媃","揉","柔","渘","煣","瑈","瓇","禸","粈","糅","脜","腬","葇","蝚","蹂","輮","鍒","鞣","騥","鰇","鶔","𫐓"],"ruǎn nèn":["媆"],miáo:["媌","嫹","描","瞄","苗","鶓","鹋"],"yí pèi":["媐"],"mián miǎn":["媔"],"tí shì":["媞","惿"],"duò tuó":["媠","沲"],ǎo:["媪","媼","艹","芺","袄","襖","镺"],"chú zòu":["媰"],yìng:["媵","映","暎","硬","膡","鱦"],"qín shēn":["嫀"],jià:["嫁","幏","架","榢","稼","駕","驾"],sǎo:["嫂"],"zhēn zhěn":["嫃"],"jiē suǒ":["嫅"],"míng mǐng":["嫇"],niǎo:["嫋","嬝","嬲","茑","蔦","袅","裊","褭","鸟"],tāo:["嫍","幍","弢","慆","掏","搯","槄","涛","滔","濤","瑫","絛","縚","縧","绦","詜","謟","轁","鞱","韜","韬","飸","饕"],biáo:["嫑"],"piáo piāo":["嫖","薸"],xuán:["嫙","悬","懸","暶","檈","漩","玄","璇","璿","痃","蜁","𫠊"],"màn mān":["嫚"],kāng:["嫝","嵻","康","慷","槺","漮","砊","穅","糠","躿","鏮","鱇","𡐓","𩾌"],"hān nǎn":["嫨"],nèn:["嫩","嫰"],zhē:["嫬","遮"],"mā má":["嫲"],piè:["嫳"],zhǎn:["嫸","展","搌","斩","斬","琖","盏","盞","輾","醆","颭","飐"],"xiān yǎn jìn":["嬐"],liǎn:["嬚","敛","斂","琏","璉","羷","脸","臉","蔹","蘝","蘞","裣","襝","鄻"],"qióng huán xuān":["嬛"],dǒng:["嬞","懂","箽","董","蕫","諌"],cān:["嬠","湌","爘","飡","餐","驂","骖"],tiǎo:["嬥","宨","晀","朓","窱","脁"],bí:["嬶","荸","鼻"],liǔ:["嬼","柳","栁","桞","桺","橮","熮","珋","綹","绺","罶","羀","鋶","锍"],"qiān xiān":["孅","欦"],"xié huī":["孈"],"huān quán":["孉"],"lí lì":["孋","麗"],"zhú chuò":["孎"],kǒng:["孔","恐"],"mā zī":["孖"],"sūn xùn":["孙","孫"],"bèi bó":["孛","誖"],"yòu niū":["孧"],zhuǎn:["孨","竱","轉"],hái:["孩","骸"],nāo:["孬"],"chán càn":["孱"],bò:["孹","檗","蘗","譒"],nái:["孻","腉"],"níng nìng":["宁","寍","寗","寜","寧","甯"],zhái:["宅"],"tū jiā":["宊"],sòng:["宋","訟","誦","讼","诵","送","鎹","頌","颂","餸"],ròu:["宍","肉","譳"],zhūn:["宒","窀","衠","諄","谆","迍"],"mì fú":["宓"],"dàng tàn":["宕"],"wǎn yuān":["宛"],chǒng:["宠","寵"],qún:["宭","峮","帬","羣","群","裙","裠"],zǎi:["宰","崽"],"bǎo shí":["宲"],"jiā jia jie":["家"],"huāng huǎng":["宺"],kuān:["宽","寛","寬","臗","鑧","髋","髖"],"sù xiǔ xiù":["宿"],"jié zǎn":["寁"],"bìng bǐng":["寎"],"jìn qǐn":["寖"],"lóu jù":["寠"],"xiě xiè":["寫"],"qīn qìn":["寴"],cùn:["寸","籿"],duì:["对","対","對","怼","憝","懟","濧","瀩","碓","祋","綐","薱","譈","譵","轛","队","陮"],"lüè luó":["寽"],"shè yè yì":["射"],"jiāng jiàng qiāng":["将"],"jiāng jiàng":["將","浆","漿","畺"],zūn:["尊","嶟","樽","罇","遵","鐏","鱒","鳟","鶎","鷷","𨱔"],"shù zhù":["尌","澍"],xiǎo:["小","晓","暁","曉","皛","皢","筱","筿","篠","謏","𫍲"],"jié jí":["尐","诘","鞊"],"shǎo shào":["少"],ěr:["尒","尓","尔","栮","毦","洱","爾","珥","耳","薾","衈","趰","迩","邇","鉺","铒","餌","饵","駬"],"wāng yóu":["尢"],wāng:["尣","尩","尪","尫","汪"],liào:["尥","尦","廖","撂","料","炓","窷","鐐","镣","𪤗"],"méng máng lóng páng":["尨"],gà:["尬","魀"],"kuì kuǐ":["尯"],tuí:["尵","弚","穨","蘈","蹪","隤","頹","頺","頽","颓","魋","𬯎"],yǐn:["尹","嶾","引","朄","檃","檼","櫽","淾","濥","瘾","癮","粌","蘟","蚓","螾","讔","赺","趛","輑","鈏","靷"],"chǐ chě":["尺"],kāo:["尻","髛"],"jìn jǐn":["尽"],"wěi yǐ":["尾"],"niào suī":["尿"],céng:["层","層","嶒","驓"],diǎo:["屌"],"píng bǐng bīng":["屏"],lòu:["屚","漏","瘘","瘺","瘻","鏤","镂","陋"],"shǔ zhǔ":["属","屬"],"xiè tì":["屟"],"chè cǎo":["屮"],"tún zhūn":["屯"],"nì jǐ":["屰"],"hóng lóng":["屸"],"qǐ kǎi":["岂","豈"],áng:["岇","昂","昻"],"gǎng gāng":["岗","崗"],kě:["岢","敤","渇","渴","炣"],gǒu:["岣","狗","玽","笱","耇","耈","耉","苟","豿"],tiáo:["岧","岹","樤","祒","笤","芀","萔","蓚","蓨","蜩","迢","鋚","鎥","鞗","髫","鯈","鰷","鲦","齠","龆"],"qū jū":["岨"],lǐng:["岭","嶺","領","领"],pò:["岶","敀","洦","湐","烞","珀","破","砶","粕","蒪","魄"],"bā kè":["峇"],luò:["峈","摞","洛","洜","犖","珞","笿","纙","荦","詻","雒","駱","骆","鵅"],"fù niè":["峊"],ěn:["峎"],"zhì shì":["峙","崻"],qiǎ:["峠","跒","酠","鞐"],"qiáo jiào":["峤","癄"],"xié yé":["峫"],bū:["峬","庯","晡","誧","逋","鈽","錻","钸","餔","鵏"],chóng:["崇","崈","爞","虫","蝩","蟲","褈","隀"],"zú cuì":["崒","椊"],"líng léng":["崚"],"dòng dōng":["崠"],xiáo:["崤","洨","淆","訤","誵"],"pí bǐ":["崥","芘"],"zhǎn chán":["崭","嶃","嶄"],"wǎi wēi":["崴"],"yáng dàng":["崵"],"shì dié":["崼"],yào:["崾","曜","熎","燿","矅","穾","窔","筄","耀","艞","药","葯","薬","藥","袎","覞","詏","讑","靿","鷂","鹞","鼼"],"kān zhàn":["嵁"],"hán dǎng":["嵅"],"qiàn kàn":["嵌"],"wù máo":["嵍"],"kě jié":["嵑","嶱"],"wēi wěi":["嵔"],kē:["嵙","柯","棵","榼","樖","牁","牱","犐","珂","疴","瞌","磕","礚","科","稞","窠","萪","薖","蚵","蝌","趷","轲","醘","鈳","钶","頦","顆","颗","髁"],"dàng táng":["嵣"],"róng yíng":["嵤","爃"],"ái kǎi":["嵦"],"kāo qiāo":["嵪"],cuó:["嵯","嵳","痤","矬","蒫","蔖","虘","鹺","鹾"],"qiǎn qīn":["嵰"],"dì dié":["嵽"],cēn:["嵾"],dǐng:["嵿","艼","薡","鐤","頂","顶","鼎","鼑"],"áo ào":["嶅"],"pǐ pèi":["嶏"],"jiào qiáo":["嶠","潐"],"jué guì":["嶡","鳜"],"zhān shàn":["嶦","鳣"],"xiè jiè":["嶰"],"guī xī juàn":["嶲"],rū:["嶿"],"lì liè":["巁","棙","爄","綟"],"xī guī juàn":["巂"],"yíng hōng":["巆"],yǐng:["巊","廮","影","摬","梬","潁","瘿","癭","矨","穎","郢","鐛","頴","颍","颕","颖"],chǎo:["巐","炒","煼","眧","麨"],cuán:["巑","櫕","欑"],chuān:["巛","川","氚","瑏","穿"],"jīng xíng":["巠"],cháo:["巢","巣","晁","漅","潮","牊","窲","罺","謿","轈","鄛","鼌"],qiǎo:["巧","愀","髜"],gǒng:["巩","廾","拱","拲","栱","汞","珙","輁","鞏"],"chà chā chāi cī":["差"],"xiàng hàng":["巷"],shuài:["帅","帥","蟀"],pà:["帊","帕","怕","袙"],"tǎng nú":["帑"],"mò wà":["帓"],"tiē tiě tiè":["帖"],zhǒu:["帚","晭","疛","睭","箒","肘","菷","鯞"],"juǎn juàn":["帣"],shuì:["帨","涗","涚","睡","稅","税","裞"],"chóu dào":["帱","幬"],"jiǎn jiān sàn":["帴"],"shà qiè":["帹"],"qí jì":["帺","荠"],"shān qiāo shēn":["幓"],"zhuàng chuáng":["幢"],"chān chàn":["幨"],miè:["幭","懱","搣","滅","灭","烕","礣","篾","蔑","薎","蠛","衊","鑖","鱴","鴓"],"gān gàn":["干"],"bìng bīng":["并","幷"],"jī jǐ":["幾"],"guǎng ān":["广"],guǎng:["広","廣","犷","獷"],me:["庅"],"dùn tún":["庉"],"bài tīng":["庍"],"yìng yīng":["应"],"dǐ de":["底"],"dù duó":["度"],"máng méng páng":["庬"],"bìng píng":["庰"],chěng:["庱","悜","睈","逞","騁","骋"],"jī cuò":["庴"],qǐng:["庼","廎","檾","漀","苘","請","謦","请","頃","顷"],"guī wěi huì":["廆"],"jǐn qín":["廑"],kuò:["廓","扩","拡","擴","濶","筈","萿","葀","蛞","闊","阔","霩","鞟","鞹","韕","頢","鬠"],"qiáng sè":["廧","薔"],"yǐn yìn":["廴","隐","隠","隱","飮","飲","饮"],"pò pǎi":["廹","迫"],"nòng lòng":["弄"],"dì tì tuí":["弟"],"jué zhāng":["弡"],"mí mǐ":["弥","彌","靡"],chāo:["弨","怊","抄","欩","訬","超","鈔","钞"],yi:["弬"],shāo:["弰","旓","烧","焼","燒","筲","艄","萷","蕱","輎","髾","鮹"],"xuān yuān":["弲"],"qiáng qiǎng jiàng":["強","强"],"tán dàn":["弹","醈"],biè:["彆"],"qiáng jiàng qiǎng":["彊"],"jì xuě":["彐"],tuàn:["彖","褖"],yuē:["彟","曰","曱","矱"],"shān xiǎn":["彡"],wén:["彣","文","炆","珳","瘒","繧","聞","芠","蚉","蚊","螡","蟁","閺","閿","闅","闦","闻","阌","雯","馼","駇","魰","鳼","鴍","鼤","𫘜"],"péng bāng":["彭"],"piāo piào":["彯"],"zhuó bó":["彴"],"tuǒ yí":["彵"],"páng fǎng":["彷"],wǎng:["彺","往","徃","惘","枉","棢","網","网","罒","罓","罔","罖","菵","蛧","蝄","誷","輞","辋","魍"],cú:["徂","殂"],"dài dāi":["待"],huái:["徊","怀","懐","懷","槐","淮","耲","蘹","褢","褱","踝"],"wā wàng jiā":["徍"],"chěng zhèng":["徎"],"dé děi de":["得"],"cóng zòng":["從"],"shì tǐ":["徥"],"tí chí":["徲","鶗","鶙"],dé:["徳","德","恴","悳","惪","淂","鍀","锝"],"zhǐ zhēng":["徴","徵"],bié:["徶","癿","莂","蛂","襒","蹩"],"chōng zhǒng":["徸"],"jiǎo jiào":["徼","笅","筊"],"lòng lǒng":["徿"],"qú jù":["忂","渠","瞿","螶"],"dìng tìng":["忊"],gǎi:["忋","改"],rěn:["忍","栠","栣","秹","稔","綛","荏","荵","躵"],chàn:["忏","懴","懺","硟","羼","韂","顫"],tè:["忑","慝","特","蟘","鋱","铽"],"tè tēi tuī":["忒"],"gān hàn":["忓","攼"],"yì qì":["忔"],"tài shì":["忕"],"xī liě":["忚"],"yīng yìng":["応","應","譍"],"mǐn wěn mín":["忞","忟"],"sōng zhōng":["忪"],"yù shū":["忬","悆"],"qí shì":["忯","耆"],"tún zhūn dùn":["忳"],"qián qín":["忴","扲"],hún:["忶","浑","渾","餛","馄","魂","鼲"],niǔ:["忸","扭","炄","狃","紐","纽","莥","鈕","钮","靵"],"kuáng wǎng":["忹"],"kāng hàng":["忼"],"kài xì":["忾","愾"],òu:["怄","慪"],"bǎo bào":["怉"],"mín mén":["怋"],"zuò zhà":["怍"],zěn:["怎"],yàng:["怏","恙","样","様","樣","漾","羕","詇"],"kòu jù":["怐"],"náo niú":["怓"],"zhēng zhèng":["怔","掙","钲","铮"],"tiē zhān":["怗"],"hù gù":["怘"],"cū jù zū":["怚"],"sī sāi":["思"],"yóu chóu":["怞"],"tū dié":["怢"],"yōu yào":["怮"],xuàn:["怰","昡","楦","泫","渲","炫","琄","眩","碹","絢","縼","繏","绚","蔙","衒","袨","贙","鉉","鏇","铉","镟","颴"],"xù xuè":["怴"],"bì pī":["怶"],"xī shù":["怸"],"nèn nín":["恁"],"tiāo yáo":["恌"],"xī qī xù":["恓"],"xiào jiǎo":["恔"],"hū kuā":["恗"],nǜ:["恧","朒","衂","衄"],hèn:["恨"],"dòng tōng":["恫"],"quán zhuān":["恮"],"è wù ě wū":["恶","惡"],tòng:["恸","慟","憅","痛","衕"],"yuān juàn":["悁"],"qiāo qiǎo":["悄"],"jiè kè":["悈"],"hào jiào":["悎"],huǐ:["悔","檓","毀","毁","毇","燬","譭"],"mán mèn":["悗","鞔"],"yī yì":["悘","衣"],quān:["悛","箞","鐉","𨟠"],"kuī lǐ":["悝"],"yì niàn":["悥"],"mèn mēn":["悶"],guàn:["悹","悺","惯","慣","掼","摜","樌","欟","泴","涫","潅","灌","爟","瓘","盥","礶","祼","罆","罐","貫","贯","躀","遦","鏆","鑵","鱹","鸛","鹳"],"kōng kǒng":["悾"],"lǔn lùn":["惀"],guǒ:["惈","果","椁","槨","粿","綶","菓","蜾","裹","褁","輠","餜","馃"],"yuān wǎn":["惌","箢"],"lán lín":["惏"],"yù xù":["惐","淢"],"chuò chuì":["惙"],"hūn mèn":["惛"],"chǎng tǎng":["惝"],"suǒ ruǐ":["惢"],cǎn:["惨","慘","憯","黪","黲","䅟"],cán:["惭","慙","慚","残","殘","蚕","蝅","蠶","蠺"],"dàn dá":["惮","憚"],rě:["惹"],"yú tōu":["愉"],"kài qì":["愒"],"dàng táng shāng yáng":["愓"],"chén xìn dān":["愖"],"kè qià":["愘"],nuò:["愞","懦","懧","掿","搦","榒","稬","穤","糑","糥","糯","諾","诺","蹃","逽","鍩","锘"],gǎn:["感","擀","敢","桿","橄","澉","澸","皯","秆","稈","笴","芉","衦","赶","趕","鱤","鳡"],"còng sōng":["愡"],"sāi sī sǐ":["愢"],"gōng gòng hǒng":["愩","慐"],"shuò sù":["愬","洬"],"yáo yào":["愮"],huàng:["愰","曂","榥","滉","皝","皩","鎤","㿠"],zhěng:["愸","抍","拯","整","晸"],cǎo:["愺","艸","草","騲"],"xì xié":["慀"],"cǎo sāo":["慅"],"xù chù":["慉"],"qiè qiàn":["慊"],"cáo cóng":["慒"],"ào áo":["慠"],"lián liǎn":["慩","梿","槤","櫣"],"jìn qín jǐn":["慬"],"dì chì":["慸"],"zhí zhé":["慹"],"lóu lǚ":["慺","鷜"],còng:["憁","謥"],"zhī zhì":["憄","知","織","织"],chēng:["憆","摚","撐","撑","晿","柽","棦","橕","檉","泟","浾","琤","瞠","碀","緽","罉","蛏","蟶","赪","赬","鏿","鐣","阷","靗","頳","饓"],biē:["憋","虌","鱉","鳖","鼈","龞"],"chéng dèng zhèng":["憕"],"xǐ xī":["憘"],"duì dùn tūn":["憞"],"xiāo jiāo":["憢"],"xián xiàn":["憪"],"liáo liǎo":["憭","燎","爎","爒"],shéng:["憴","縄","繉","繩","绳","譝"],"náo nǎo náng":["憹"],"jǐng jìng":["憼"],"jǐ jiǎo":["憿"],"xuān huān":["懁"],"cǎo sāo sào":["懆"],mèn:["懑","懣","暪","焖","燜"],"mèng méng měng":["懜"],"ài yì nǐ":["懝"],"méng měng":["懞","瞢","矒"],"qí jī jì":["懠"],mǒ:["懡"],"lán xiàn":["懢"],"yōu yǒu":["懮"],"liú liǔ":["懰","藰"],ràng:["懹","譲","讓","让"],huān:["懽","欢","歓","歡","獾","讙","貛","酄","驩","鴅","鵍"],nǎn:["戁","揇","湳","煵","腩","蝻","赧"],"mí mó":["戂"],"gàng zhuàng":["戅","戆"],"zhuàng gàng":["戇"],"xū qu":["戌"],"xì hū":["戏","戯","戲"],"jiá gā":["戛"],zéi:["戝","蠈","賊","贼","鰂","鱡","鲗"],děng:["戥","等"],"hū xì":["戱"],chuō:["戳","踔","逴"],"biǎn piān":["扁"],"shǎng jiōng":["扄"],"shàn shān":["扇"],cái:["才","材","纔","裁","財","财"],"zhā zā zhá":["扎"],"lè lì cái":["扐"],"bā pá":["扒"],"dǎ dá":["打"],rēng:["扔"],"fǎn fú":["払"],"diǎo dí yuē lì":["扚"],"káng gāng":["扛"],"yū wū":["扜"],"yū wū kū":["扝"],"tuō chǐ yǐ":["扡"],"gǔ jié xì gē":["扢"],dèn:["扥","扽"],"sǎo sào":["扫","掃"],rǎo:["扰","擾","隢"],"xī chā qì":["扱"],"bān pān":["扳"],"bā ào":["扷"],"xī zhé":["扸"],"zhì sǔn kǎn":["扻"],zhǎo:["找","沼","瑵"],"kuáng wǎng zài":["抂"],"hú gǔ":["抇","鹄","鹘"],"bǎ bà":["把"],"dǎn shěn":["抌"],"nè nì ruì nà":["抐"],zhuā:["抓","檛","簻","膼","髽"],póu:["抔","裒"],"zhé shé zhē":["折"],"póu pōu fū":["抙","捊"],pāo:["抛","拋","脬","萢"],"ǎo ào niù":["抝"],"lūn lún":["抡","掄"],"qiǎng qiāng chēng":["抢"],"zhǐ zhǎi":["抧"],"bù pū":["抪","柨"],"yǎo tāo":["抭"],"hē hè qiā":["抲"],"nǐ ní":["抳"],"pī pēi":["抷"],"mǒ mò mā":["抹"],chōu:["抽","犨","犫","瘳","篘"],"jiā yá":["拁"],"fú bì":["拂","畐","鶝"],zhǎ:["拃","眨","砟","鮺","鲝"],"dān dàn dǎn":["担"],"chāi cā":["拆"],niān:["拈","蔫"],"lā lá lǎ là":["拉"],"bàn pàn":["拌"],pāi:["拍"],līn:["拎"],guǎi:["拐","枴","柺"],"tuò tà zhí":["拓"],"ào ǎo niù":["拗"],"jū gōu":["拘"],"pīn pàn fān":["拚"],"bài bái":["拜"],bài:["拝","敗","稗","粺","薭","贁","败","韛"],qiá:["拤"],"nǐng níng nìng":["拧"],"zé zhái":["择","擇"],hén:["拫","痕","鞎"],"kuò guā":["括"],"jié jiá":["拮"],nǐn:["拰"],shuān:["拴","栓","閂","闩"],"cún zùn":["拵"],"zā zǎn":["拶","桚"],kǎo:["拷","攷","栲","烤","考"],"yí chǐ hài":["拸"],"cè sè chuò":["拺"],"zhuài zhuāi yè":["拽"],"shí shè":["拾"],bāi:["挀","掰"],"kuò guāng":["挄"],nòng:["挊","挵","齈"],"jiào jiāo":["挍","敎","教"],"kuà kū":["挎"],"ná rú":["挐"],"tiāo tiǎo":["挑"],"dié shè":["挕"],liě:["挘","毟"],"yà yǎ":["挜","掗"],"wō zhuā":["挝"],"xié jiā":["挟","挾"],"dǎng dàng":["挡","擋"],"zhèng zhēng":["挣","正","症"],"āi ái":["挨"],"tuō shuì":["挩","捝"],"tǐ tì":["挮"],"suō shā":["挱"],"sā shā suō":["挲"],"kēng qiān":["挳","摼"],"bàng péng":["挷"],"ruó ruá":["挼"],"jiǎo kù":["捁"],"wǔ wú":["捂"],tǒng:["捅","桶","筒","筩","統","綂","统","㛚"],"huò chì":["捇"],"tú shū chá":["捈"],"lǚ luō":["捋"],"shāo shào":["捎","稍"],niē:["捏","揑"],"shù sǒng sōu":["捒"],"yé yú":["捓"],"jué zhuó":["捔"],"bù pú zhì":["捗"],zùn:["捘","銌"],lāo:["捞","撈","粩"],sǔn:["损","損","榫","笋","筍","箰","鎨","隼"],"wàn wǎn wān yù":["捥"],pěng:["捧","淎","皏"],shě:["捨"],"fǔ fù bǔ":["捬"],dáo:["捯"],"luò luǒ wǒ":["捰"],"juǎn quán":["捲"],"chēn tiǎn":["捵"],"niǎn niē":["捻"],"ruó wěi ré":["捼"],zuó:["捽","昨","秨","稓","筰","莋","鈼"],"wò xiá":["捾"],"qìng qiàn":["掅"],"póu pǒu":["掊"],qiā:["掐","葜"],"pái pǎi":["排"],"qiān wàn":["掔"],"yè yē":["掖"],"niè nǐ yì":["掜"],"huò xù":["掝"],"yàn shàn yǎn":["掞"],"zhěng dìng":["掟"],kòng:["控","鞚"],tuī:["推","蓷","藬"],"zōu zhōu chōu":["掫"],tiàn:["掭","舚"],kèn:["掯","裉","褃"],pá:["掱","杷","潖","爬","琶","筢"],"guó guāi":["掴"],"dǎn shàn":["掸","撣"],"chān xiān càn shǎn":["掺"],sāo:["掻","搔","溞","繅","缫","螦","騒","騷","鰠","鱢","鳋"],pèng:["掽","椪","槰","碰","踫"],"zhēng kēng":["揁"],"jiū yóu":["揂"],"jiān jiǎn":["揃","籛"],"pì chè":["揊"],"sāi zǒng cāi":["揌"],"tí dī dǐ":["提"],"zǒng sōng":["揔"],"huáng yóng":["揘"],"zǎn zuàn":["揝"],"xū jū":["揟"],"ké qiā":["揢"],"chuāi chuǎi chuài tuán zhuī":["揣"],"dì tì":["揥"],"lá là":["揦"],là:["揧","楋","溂","瓎","瘌","翋","臘","蝋","蝲","蠟","辢","辣","鑞","镴","鬎","鯻","𬶟"],"jiē qì":["揭"],"chòng dǒng":["揰"],"dié shé yè":["揲"],"jiàn qián jiǎn":["揵"],yé:["揶","爷","爺","瑘","鋣","鎁","铘"],chān:["搀","摻","攙","裧","襜","覘","觇","辿","鋓"],"gē gé":["搁","擱"],"lǒu lōu":["搂","摟"],"chōu zǒu":["搊"],chuāi:["搋"],sūn:["搎","槂","狲","猻","荪","蓀","蕵","薞","飧","飱"],"róng náng nǎng":["搑"],"péng bàng":["搒"],cuō:["搓","瑳","磋","蹉","遳","醝"],"kē è":["搕"],"nù nuò nòu":["搙"],"lā xié xiàn":["搚"],qiǔ:["搝","糗"],"xiǎn xiān":["搟"],"jié zhé":["搩"],"pán bān pó":["搫"],bān:["搬","攽","斑","斒","班","瘢","癍","肦","螁","螌","褩","辬","頒","颁","𨭉"],"zhì nái":["搱"],"wā wǎ wà":["搲"],huá:["搳","撶","滑","猾","蕐","螖","譁","鏵","铧","驊","骅","鷨"],"qiāng qiǎng chēng":["搶"],"tián shēn":["搷"],"ná nuò":["搻"],èn:["摁"],"shè niè":["摄","攝"],bìn:["摈","擯","殡","殯","膑","臏","髌","髕","髩","鬂","鬓","鬢"],"shā sà shǎi":["摋"],"chǎn sùn":["摌"],"jiū liú liáo jiǎo náo":["摎"],"féng pěng":["摓"],shuāi:["摔"],"dì tú zhí":["摕"],"qì jì chá":["摖"],"sōu sǒng":["摗"],"liǎn liàn":["摙"],"gài xì":["摡"],"hù chū":["摢"],tàng:["摥","烫","燙","鐋"],"nái zhì":["摨"],"mó mā":["摩"],"jiāng qiàng":["摪"],"áo qiáo":["摮"],"niè chè":["摰"],"mán màn":["摱"],"chàn cán":["摲"],"sè mí sù":["摵"],"biāo biào":["摽"],"juē jué":["撅"],piē:["撆","暼","氕","瞥"],"piě piē":["撇"],"zǎn zān zēn qián":["撍"],"sā sǎ":["撒"],hòng:["撔","訌","讧","闀","鬨"],"héng guàng":["撗"],niǎn:["撚","撵","攆","涊","焾","碾","簐","蹍","蹨","躎","輦","辇"],"chéng zhěng":["撜"],"huī wéi":["撝"],cāo:["撡","操","糙"],"xiāo sōu":["撨"],"liáo liāo":["撩"],"cuō zuǒ":["撮"],"wěi tuǒ":["撱"],cuān:["撺","攛","汆","蹿","躥","鑹","镩"],"qiào yāo jī":["撽"],"zhuā wō":["撾"],"lèi léi":["擂"],nǎng:["擃","攮","曩","灢"],"qíng jǐng":["擏"],kuǎi:["擓","蒯","㧟"],"pǐ bò":["擗"],"bò bāi":["擘"],"jù jǐ":["據"],mēng:["擝"],"sǒu sòu":["擞"],xǐng:["擤","箵","醒"],cā:["擦"],"níng nǐng nìng":["擰"],"zhì jié":["擳"],"là liè":["擸","爉"],"sòu sǒu":["擻"],"lì luò yuè":["擽"],"tī zhāi zhì":["擿"],pān:["攀","潘","眅","萠"],lèi:["攂","泪","涙","淚","禷","类","纇","蘱","酹","銇","錑","頛","頪","類","颣"],"cā sǎ":["攃"],"jùn pèi":["攈"],"lì luò":["攊","躒"],"là lài":["攋","櫴"],"lú luó":["攎"],"zǎn cuán":["攒"],"xiān jiān":["攕"],"mí mǐ mó":["攠"],"zǎn cuán zàn zuān":["攢"],zuàn:["攥"],"lì shài":["攦"],"lì luǒ":["攭"],"guǐ guì":["攱"],"jī qī yǐ":["攲"],fàng:["放"],"wù móu":["敄"],"chù shōu":["敊"],"gé guó è":["敋"],"duó duì":["敓","敚"],"duō què":["敠","敪"],"sàn sǎn":["散"],"dūn duì":["敦","镦"],"qī yǐ jī":["敧"],"xiào xué":["敩"],"shù shǔ shuò":["数","數"],"ái zhú":["敱","敳"],"xiòng xuàn":["敻"],"zhuó zhú":["斀"],"yì dù":["斁"],"lí tái":["斄"],"fěi fēi":["斐"],"yǔ zhōng":["斔"],"dòu dǒu":["斗"],"wò guǎn":["斡"],"tǒu tiǎo":["斢"],dòu:["斣","梪","浢","痘","窦","竇","脰","荳","豆","逗","郖","酘","閗","闘","餖","饾","鬥","鬦","鬪","鬬","鬭"],"yín zhì":["斦"],"chǎn jiè":["斺"],"wū yū yú":["於"],"yóu liú":["斿"],"páng bàng":["旁"],"máo mào":["旄"],"pī bì":["旇"],"xuán xuàn":["旋"],"wú mó":["无"],zǎo:["早","枣","栆","棗","澡","璪","薻","藻","蚤"],gā:["旮"],"gàn hàn":["旰"],"tái yīng":["旲"],"xū xù":["旴"],"tūn zhùn":["旽"],"wù wǔ":["旿"],"pò pèi":["昢"],zòng:["昮","猔","疭","瘲","粽","糉","糭","縦"],ǎi:["昹","毐","矮","蔼","藹","譪","躷","霭","靄"],"huàng huǎng":["晃"],xuǎn:["晅","癣","癬","选","選"],"xù kuā":["晇"],hǒng:["晎"],shài:["晒","曬"],"yūn yùn":["晕","煴"],"shèng chéng":["晟","椉","盛"],"jǐng yǐng":["景"],shǎn:["晱","熌","睒","覢","閃","闪","陕","陝"],"qǐ dù":["晵"],"ǎn àn yǎn":["晻"],"wǎng wàng":["暀"],zàn:["暂","暫","瓉","瓒","瓚","禶","襸","讃","讚","賛","贊","赞","蹔","鄼","錾","鏨","饡"],"yùn yūn":["暈"],"mín mǐn":["暋"],"dǔ shǔ":["暏"],shǔ:["暑","曙","潻","癙","糬","署","薥","薯","藷","蜀","蠴","襡","襩","鱪","鱰","黍","鼠","鼡"],"jiǎn lán":["暕"],nuǎn:["暖","煗","餪"],"bào pù":["暴"],"xī xǐ":["暿"],"pù bào":["曝","瀑"],"qū qǔ":["紶"],"qǔ qū":["曲"],"gèng gēng":["更"],"hū hù":["曶","雽"],"zēng céng":["曽","橧"],"céng zēng":["曾","竲"],"cǎn qián jiàn":["朁"],"qiè hé":["朅"],"bì pí":["朇","禆","笓","裨"],"yǒu yòu":["有"],"bān fén":["朌","鳻"],"fú fù":["服","洑"],"fěi kū":["朏","胐"],"qú xù chǔn":["朐"],"juān zuī":["朘"],"huāng máng wáng":["朚"],"qī jī":["期"],"tóng chuáng":["朣","橦"],zhá:["札","牐","箚","蚻","譗","鍘","铡","閘","闸"],"zhú shù shú":["朮"],"shù shú zhú":["术"],"zhū shú":["朱"],"pǔ pò pō piáo":["朴"],"dāo tiáo mù":["朷"],"guǐ qiú":["朹"],xiǔ:["朽","滫","潃","糔"],"chéng chēng":["朾"],zá:["杂","沯","砸","襍","雑","雜","雥","韴"],"yú wū":["杅"],"gān gǎn":["杆"],"chā chà":["杈"],"shān shā":["杉"],cūn:["村","皴","竴","膥","踆","邨"],"rèn ér":["杒","梕"],"sháo biāo":["杓"],"dì duò":["杕","枤"],"gū gài":["杚"],"yí zhì lí duò":["杝"],"gàng gāng":["杠"],"tiáo tiāo":["条","條"],"mà mǎ":["杩"],"sì zhǐ xǐ":["杫"],"yuán wán":["杬","蚖"],"bèi fèi":["杮"],"shū duì":["杸"],"niǔ chǒu":["杻"],"wò yuè":["枂","臒"],máo:["枆","毛","氂","渵","牦","矛","罞","茅","茆","蝥","蟊","軞","酕","鉾","錨","锚","髦","鶜"],"pī mì":["枈"],àng:["枊","盎","醠"],"fāng bìng":["枋"],"hù dǐ":["枑"],xín:["枔","襑","鐔","鬵"],"yāo yǎo":["枖"],"ě è":["枙"],"zhī qí":["枝"],"cōng zōng":["枞","樅"],"xiān zhēn":["枮"],"tái sì":["枱"],"gǒu jǔ gōu":["枸"],"bāo fú":["枹"],"yì xiè":["枻","栧"],"tuó duò":["柁","馱","駄","驮"],"yí duò lí":["柂"],"nǐ chì":["柅"],"pán bàn":["柈","跘"],"yǎng yàng yāng yīng":["柍"],"fù fū fǔ":["柎"],"bǎi bó bò":["柏"],mǒu:["某"],"sháo shào":["柖"],zhè:["柘","樜","浙","淛","蔗","蟅","這","鷓","鹧","䗪"],"yòu yóu":["柚","櫾"],"guì jǔ":["柜"],"zhà zuò":["柞"],"dié zhì":["柣","眰"],"zhā zǔ zū":["柤"],"chá zhā":["查","査"],"āo ào":["柪","軪"],"bā fú pèi bó biē":["柭"],"duò zuó wù":["柮"],"bì bié":["柲"],"zhù chù":["柷"],"bēi pēi":["柸"],"shì fèi":["柹"],"shān zhà shi cè":["栅"],"lì yuè":["栎","櫟"],"qì qiè":["栔","砌"],"qī xī":["栖","蹊"],"guā kuò":["栝"],"bīng bēn":["栟"],"xiào jiào":["校"],"jiàn zùn":["栫","袸"],"yǒu yù":["栯"],"hé hú":["核"],gēn:["根","跟"],"zhī yì":["栺"],"gé gē":["格"],"héng háng":["桁"],"guàng guāng":["桄"],"yí tí":["桋","荑"],sāng:["桑","桒","槡"],"jú jié":["桔"],"yú móu":["桙"],"ráo náo":["桡","橈"],"guì huì":["桧","檜"],"chén zhèn":["桭"],"tīng yíng":["桯"],"bó po":["桲"],"bèn fàn":["桳"],"fēng fèng":["桻","葑"],"sù yìn":["梀"],"tǐng tìng":["梃"],"xuān juān xié":["梋"],"tú chá":["梌"],"āo yòu":["梎"],kuǎn:["梡","欵","款","歀"],"shāo sào":["梢"],"qín chén cén":["梣"],"lí sì qǐ":["梩"],"chān yán":["梴"],"bīn bīng":["梹","槟","檳"],"táo chóu dào":["梼"],"cōng sōng":["棇"],"gùn hùn":["棍"],"dé zhé":["棏"],"pái bèi pèi":["棑"],"bàng pǒu bèi bēi":["棓"],"dì dài tì":["棣"],sēn:["森","椮","槮","襂"],"rěn shěn":["棯"],"léng lēng líng":["棱"],"fú sù":["棴"],"zōu sǒu":["棷"],zōu:["棸","箃","緅","諏","诹","邹","郰","鄒","鄹","陬","騶","驺","鯫","鲰","黀","齱","齺"],"zhào zhuō":["棹"],"chēn shēn":["棽"],"jiē qiè":["椄"],"yǐ yī":["椅"],"chóu zhòu diāo":["椆"],"qiāng kōng":["椌"],"zhuī chuí":["椎"],"bēi pí":["椑"],mēn:["椚"],"quān juàn quán":["椦"],"duǒ chuán":["椯"],"wěi huī":["椲"],"jiǎ jiā":["椵"],"hán jiān":["椷"],"shèn zhēn":["椹"],"yàn yà":["椻"],"zhā chá":["楂"],"guō kuǎ":["楇"],"jí zhì":["楖"],"kǔ hù":["楛"],"yóu yǒu":["楢"],"sǒng cōng":["楤"],"yuán xuàn":["楥"],"yǎng yàng yīng":["楧"],pián:["楩","胼","腁","賆","蹁","駢","騈","骈","骿","㛹"],"dié yè":["楪"],"dùn shǔn":["楯"],"còu zòu":["楱"],"dì dǐ shì":["楴"],"kǎi jiē":["楷"],"róu ròu":["楺"],"lè yuè":["楽"],"wēn yùn":["榅","鞰"],lǘ:["榈","櫚","氀","膢","藘","閭","闾","驢","驴"],shén:["榊","神","鉮","鰰","𬬹"],"bī pi":["榌"],"zhǎn niǎn zhèn":["榐"],"fú fù bó":["榑"],"jiàn jìn":["榗"],"bǎng bàng":["榜"],"shā xiè":["榝","樧"],nòu:["槈","耨","鎒","鐞"],"qiǎn lián xiàn":["槏"],gàng:["槓","焵","焹","筻","鿍"],gāo:["槔","槹","橰","櫜","睾","篙","糕","羔","臯","韟","餻","高","髙","鷎","鷱","鼛"],"diān zhěn zhēn":["槙"],"kǎn jiàn":["槛"],"xí dié":["槢"],"jī guī":["槣"],"róng yōng":["槦"],"tuán shuàn quán":["槫"],"qì sè":["槭"],"cuī zhǐ":["槯"],"yǒu chǎo":["槱"],"màn wàn":["槾"],"lí chī":["樆"],"léi lěi":["樏","櫑","礌"],"cháo jiǎo chāo":["樔"],"chēng táng":["樘"],"jiū liáo":["樛"],"mó mú":["模"],"niǎo mù":["樢"],"héng hèng":["横","橫"],xuě:["樰","膤","艝","轌","雪","鱈","鳕"],"fá fèi":["橃"],rùn:["橍","润","潤","膶","閏","閠","闰"],"zhǎn jiǎn":["橏"],shùn:["橓","瞚","瞬","舜","蕣","順","顺","鬊"],"tuí dūn":["橔"],"táng chēng":["橖"],"sù qiū":["橚"],"tán diàn":["橝"],"fén fèn fèi":["橨"],"rǎn yān":["橪"],"cū chu":["橻"],"shū qiāo":["橾"],"píng bò":["檘"],"zhái shì tú":["檡"],"biǎo biāo":["檦"],"qiān lián":["檶"],"nǐ mí":["檷"],"jiàn kǎn":["檻"],"nòu ruǎn rú":["檽"],"jī jì":["櫅","禨"],"huǎng guǒ gǔ":["櫎"],"lǜ chū":["櫖"],"miè mèi":["櫗"],ōu:["櫙","欧","歐","殴","毆","瓯","甌","膒","藲","謳","讴","鏂","鴎","鷗","鸥"],"zhù zhuó":["櫡"],"jué jì":["櫭"],"huái guī":["櫰"],"chán zhàn":["欃"],"wéi zuì":["欈"],cáng:["欌","鑶"],"yù yì":["欥"],"chù qù xì":["欪"],"kài ài":["欬"],"yì yīn":["欭"],"xì kài":["欯"],"shuò sòu":["欶"],"ǎi ēi éi ěi èi ê̄ ế ê̌ ề":["欸"],"qī yī":["欹"],"chuā xū":["欻"],"chǐ chuài":["欼"],"kǎn qiàn":["欿"],"kǎn kè":["歁"],"chuǎn chuán":["歂"],"yīn yān":["歅"],"jìn qūn":["歏"],pēn:["歕"],"xū chuā":["歘"],"xī shè":["歙"],"liǎn hān":["歛"],"zhì chí":["歭"],"sè shà":["歰"],sǐ:["死"],"wěn mò":["歾"],piǎo:["殍","皫","瞟","醥","顠"],"qíng jìng":["殑"],"fǒu bó":["殕"],"zhí shi":["殖"],"yè yān yàn":["殗"],"hūn mèi":["殙"],chòu:["殠","臰","遚"],"kuì huì":["殨","溃","潰"],cuàn:["殩","熶","爨","窜","竄","篡","簒"],"yīn yān yǐn":["殷"],"qìng kēng shēng":["殸"],"yáo xiáo xiào":["殽"],"gū gǔ":["毂","蛄"],"guàn wān":["毌"],"dú dài":["毒"],"xún xùn":["毥"],mú:["毪","氁"],"dòu nuò":["毭"],"sāi suī":["毸"],lu:["氇"],sào:["氉","瘙","矂","髞"],"shì zhī":["氏"],"dī dǐ":["氐"],"máng méng":["氓"],"yáng rì":["氜"],shuǐ:["水","氵","氺","閖"],"zhěng chéng zhèng":["氶"],tǔn:["氽"],"fán fàn":["氾"],"guǐ jiǔ":["氿"],"bīn pà pā":["汃"],"zhuó què":["汋"],"dà tài":["汏"],pìn:["汖","牝","聘"],"hàn hán":["汗","馯"],tu:["汢"],"tāng shāng":["汤","湯"],"zhī jì":["汥"],"gàn hán cén":["汵"],"wèn mén":["汶"],"fāng pāng":["汸"],"hǔ huǎng":["汻"],"niú yóu":["汼"],hàng:["沆"],"shěn chén":["沈"],"dùn zhuàn":["沌"],"nǜ niǔ":["沑"],"méi mò":["沒","没"],"tà dá":["沓"],"mì wù":["沕"],"hóng pāng":["沗"],"shā shà":["沙"],"zhuǐ zǐ":["沝"],"ōu òu":["沤","漚"],"jǔ jù":["沮"],"tuō duó":["沰"],"mǐ lì":["沵"],"yí chí":["沶"],"xiè yì":["泄"],"bó pō":["泊"],"mì bì":["泌","秘"],"chù shè":["泏"],"yōu yòu āo":["泑"],"pēng píng":["泙","硑"],"pào pāo":["泡"],"ní nì":["泥","秜"],"yuè sà":["泧"],"jué xuè":["泬","疦"],"lóng shuāng":["泷","瀧"],"luò pō":["泺","濼"],"zé shì":["泽","澤"],"sǎ xǐ":["洒"],"sè qì zì":["洓"],"xǐ xiǎn":["洗"],"kǎo kào":["洘"],"àn yàn è":["洝"],"lěi lèi":["洡"],"qiè jié":["洯"],"qiǎn jiān":["浅"],"jì jǐ":["济","済","濟","纪"],"hǔ xǔ":["浒","滸"],"jùn xùn":["浚","濬"],"yǐng chéng yíng":["浧"],"liàn lì":["浰"],"féng hóng":["浲","溄"],"jiǒng jiōng":["浻"],"suī něi":["浽"],"yǒng chōng":["涌"],"tūn yūn":["涒"],"wō guō":["涡","渦"],hēng:["涥","脝"],"zhǎng zhàng":["涨","漲"],"shòu tāo":["涭"],shuàn:["涮","腨"],"kōng náng":["涳"],"wò wǎn yuān":["涴"],"tuō tuò":["涶"],wō:["涹","猧","窝","窩","莴","萵","蜗","蝸","踒"],"qiè jí":["淁"],"guǒ guàn":["淉"],"lín lìn":["淋","獜","疄"],"tǎng chǎng":["淌"],"nào chuò zhuō":["淖"],"péng píng":["淜"],féi:["淝","肥","腓","蜰"],"pì pèi":["淠"],"niǎn shěn":["淰"],"biāo hǔ":["淲"],"chún zhūn":["淳"],"hùn hún":["混"],qiǎn:["淺","繾","缱","肷","膁","蜸","譴","谴","遣","鑓"],"wèn mín":["渂"],"rè ruò luò":["渃"],"dú dòu":["渎","瀆","读"],"jiàn jiān":["渐","溅","漸","濺"],"miǎn shéng":["渑","澠"],"nuǎn nuán":["渜"],"qiú wù":["渞"],"tíng tīng":["渟"],"dì tí dī":["渧"],"gǎng jiǎng":["港"],"hōng qìng":["渹"],tuān:["湍","煓"],"huì mǐn xū":["湏"],"xǔ xù":["湑"],pén:["湓","瓫","盆","葐"],"mǐn hūn":["湣"],"tuàn nuǎn":["湪"],"qiū jiǎo":["湫","湬"],"yān yīn":["湮"],"bàn pán":["湴"],"zhuāng hún":["湷"],"yàn guì":["溎"],"lián liǎn nián xián xiàn":["溓"],"dá tǎ":["溚","鿎"],"liū liù":["溜","澑","蹓"],lùn:["溣"],mǎ:["溤","犸","獁","玛","瑪","码","碼","遤","鎷","馬","马","鰢","鷌"],"zhēn qín":["溱"],"nì niào":["溺"],"chù xù":["滀","畜"],"wěng wēng":["滃"],"hào xuè":["滈"],"qì xì xiē":["滊"],"xíng yíng":["滎"],"zé hào":["滜"],"piāo piào piǎo":["漂"],"cóng sǒng":["漎"],"féng péng":["漨"],"luò tà":["漯"],"pēng bēn":["漰"],"chóng shuāng":["漴"],"huǒ kuò huò":["漷"],"liáo liú":["漻"],"cuǐ cuī":["漼"],"cóng zǒng":["潀"],"cóng zōng":["潈"],"pì piē":["潎"],"dàng xiàng":["潒"],"huáng guāng":["潢"],"liáo lào lǎo":["潦"],"cōng zòng":["潨"],"zhí zhì":["潪"],"tān shàn":["潬"],"tú zhā":["潳"],"sàn sǎ":["潵"],hēi:["潶","黑","黒","𬭶"],"chéng dèng":["澄","瀓"],"cūn cún":["澊"],"péng pēng":["澎"],"hòng gǒng":["澒","銾"],"wàn màn":["澫"],"kuài huì":["澮"],"guō wō":["濄"],"pēn fén":["濆"],"jí shà":["濈"],"huì huò":["濊"],"dǐng tìng":["濎"],"mǐ nǐ":["濔"],"bì pì":["濞"],"cuì zuǐ":["濢"],"hù huò":["濩"],"ǎi kài kè":["濭"],"wěi duì":["濻","瀢"],"zàn cuán":["濽","灒"],"yǎng yàng":["瀁"],"wǎng wāng":["瀇"],"mò miè":["瀎","眜"],suǐ:["瀡","膸","髓"],"huái wāi":["瀤"],"zùn jiàn":["瀳"],"yīng yǐng yìng":["瀴"],"ráng ràng":["瀼"],shuàng:["灀"],"zhuó jiào zé":["灂"],sǎ:["灑","訯","靸"],"luán luàn":["灓"],"dǎng tǎng":["灙"],"xún quán quàn":["灥"],"huǒ biāo":["灬"],"zhà yù":["灹"],"fén bèn":["炃"],"jiǒng guì":["炅"],"pàng fēng":["炐"],quē:["炔","缺","缼","蒛"],biān:["炞","煸","甂","砭","笾","箯","籩","編","编","蝙","邉","邊","鍽","鞭","鯾","鯿","鳊"],"zhāo zhào":["炤"],"zhuō chù":["炪"],"pào páo bāo":["炮"],"páo fǒu":["炰"],"shǎn qián shān":["炶"],"zhà zhá":["炸"],"jiǎo yào":["烄"],quǎn:["烇","犬","犭","畎","綣","绻","虇"],"yàng yáng":["烊"],"lào luò":["烙"],"huí huǐ":["烠"],rè:["热","熱"],"fú páo":["烰"],"xiè chè":["烲","焎"],"yàn shān":["烻"],"hūn xūn":["焄"],kào:["焅","犒","銬","铐","靠","鮳","鯌","鲓","㸆"],"juān yè":["焆"],"jùn qū":["焌"],"tāo dào":["焘"],"chǎo jù":["焣"],"wò ài":["焥"],"zǒng cōng":["焧"],"xī yì":["焬"],"xìn xīn":["焮"],"chāo zhuō":["焯"],"xiǒng yīng":["焸","焽"],kuǐ:["煃","跬","蹞","頍","𫠆"],"huī yùn xūn":["煇"],"jiǎo qiāo":["煍"],"qián shǎn shān":["煔"],"xī yí":["煕"],"shà shā":["煞"],"yè zhá":["煠"],"yáng yàng":["煬"],"ēn yūn":["煾"],"yūn yǔn":["熅"],"hè xiāo":["熇"],xióng:["熊","熋","雄"],"xūn xùn":["熏","爋"],gòng:["熕","貢","贡"],liū:["熘"],"cōng zǒng":["熜"],"lù āo":["熝"],"shú shóu":["熟"],"fēng péng":["熢"],"cuǐ suī":["熣"],tēng:["熥","膯","鼟"],"yùn yù":["熨"],"áo āo":["熬"],"hàn rǎn":["熯"],"ōu ǒu":["熰"],"huáng huǎng":["熿"],"chǎn dǎn chàn":["燀"],"jiāo zhuó qiáo jué":["燋"],"yàn yān":["燕"],"tài liè":["燤"],āo:["爊"],"yàn xún":["爓"],"jué jiào":["爝","覐","覚","覺","觉"],"lǎn làn":["爦"],"zhuǎ zhǎo":["爪"],"zhǎo zhuǎ":["爫"],"fù fǔ":["父"],diē:["爹","褺","跌"],zāng:["牂","羘","臧","賍","賘","贓","贜","赃","髒"],"piàn piān":["片"],"biān miàn":["牑"],bǎng:["牓","綁","绑"],"yǒu yōng":["牗"],"chēng chèng":["牚","竀"],niú:["牛","牜"],"jiū lè":["牞"],"mù móu":["牟"],māng:["牤"],"gē qiú":["牫"],"yòu chōu":["牰"],"tè zhí":["犆"],bēn:["犇","錛","锛"],"jiān qián":["犍","玪"],má:["犘","痲","蔴","蟇","麻"],"máo lí":["犛"],"bá quǎn":["犮"],"zhuó bào":["犳"],"àn hān":["犴"],"kàng gǎng":["犺"],"pèi fèi":["犻"],"fān huān":["犿"],kuáng:["狂","狅","誑","诳","軖","軠","鵟","𫛭"],"yí quán chí":["狋"],"xīng shēng":["狌"],"tuó yí":["狏"],kǔ:["狜","苦"],"huán huān":["狟"],"hé mò":["狢"],"tà shì":["狧"],"máng dòu":["狵"],"xī shǐ":["狶"],suān:["狻","痠","酸"],"bài pí":["猈"],"jiān yàn":["猏","豣"],"yī yǐ":["猗"],"yá wèi":["猚"],cāi:["猜"],"māo máo":["猫","貓"],"chuàn chuān":["猭"],"tuān tuàn":["猯","貒"],"yà jiá qiè":["猰"],"hè xiē gé hài":["猲"],"biān piàn":["猵","獱"],"bó pò":["猼"],"háo gāo":["獋"],"fén fèn":["獖"],"yào xiāo":["獟"],"shuò xī":["獡"],"gé liè xiē":["獦"],"nòu rú":["獳"],"náo nǎo yōu":["獶"],ráng:["獽","瓤","禳","穣","穰","蘘","躟","鬤"],"náo yōu":["獿"],"lǜ shuài":["率"],"wáng wàng":["王"],"yáng chàng":["玚"],"mín wén":["玟"],"bīn fēn":["玢"],"mén yǔn":["玧"],"qiāng cāng":["玱","瑲","篬"],"án gān":["玵"],"xuán xián":["玹"],"cī cǐ":["玼","跐"],"yí tāi":["珆"],"zǔ jù":["珇"],fà:["珐","琺","蕟","髪","髮"],"yín kèn":["珢"],"huī hún":["珲"],"xuán qióng":["琁"],"fú fū":["琈"],"bǐng pín":["琕"],"cuì sè":["琗"],"yù wéi":["琟"],"tiǎn tiàn":["琠"],"zhuó zuó":["琢"],"běng pěi":["琣"],guǎn:["琯","璭","痯","筦","管","舘","輨","錧","館","馆","鳤"],"hún huī":["琿"],"xié jiē":["瑎"],"chàng dàng yáng":["瑒"],"tiàn zhèn":["瑱"],"bīn pián":["瑸","璸"],"tú shū":["瑹"],cuǐ:["璀","皠","趡"],"zǎo suǒ":["璅"],"jué qióng":["璚"],"lú fū":["璷"],"jì zī":["璾"],suí:["瓍","綏","绥","遀","随","隨","髄"],"mí xǐ":["瓕"],"qióng wěi wèi":["瓗"],"huán yè yà":["瓛"],"bó páo":["瓟"],"zhí hú":["瓡"],piáo:["瓢","闝"],"wǎ wà":["瓦"],"xiáng hóng":["瓨"],wèng:["瓮","甕","罋","蕹","齆"],"shèn shén":["甚"],ruí:["甤","緌","蕤"],yòng:["用","砽","苚","蒏","醟","㶲"],shuǎi:["甩"],béng:["甭","甮"],"yóu zhá":["甴"],"diàn tián shèng":["甸"],"tǐng dīng":["町","甼"],"zāi zī":["甾"],"bì qí":["畁"],"dá fú":["畗"],"cè jì":["畟"],"zāi zī tián":["畠"],"zhì chóu shì":["畤"],"fān pān":["畨","番"],"shē yú":["畬"],"dāng dàng dǎng":["當"],"jiāng qiáng":["疆"],"pǐ yǎ shū":["疋"],"jié qiè":["疌"],"yí nǐ":["疑"],nè:["疒","眲","訥","讷"],"gē yì":["疙"],"nüè yào":["疟","瘧"],"lì lài":["疠","癘"],"yǎ xiā":["疨"],xuē:["疶","蒆","薛","辥","辪","靴","鞾"],"dǎn da":["疸"],"fá biǎn":["疺"],"fèi féi":["疿","痱"],"shān diàn":["痁"],"téng chóng":["痋"],"tōng tóng":["痌"],"wěi yòu yù":["痏"],"tān shǐ":["痑"],"pū pù":["痡","鋪"],"bēng péng":["痭"],"má lìn":["痳"],"tiǎn diàn":["痶"],"ān yè è":["痷"],"kē ē":["痾"],"zhì chì":["瘈"],"jiǎ xiá xiā":["瘕"],"lěi huì":["瘣"],"chài cuó":["瘥"],"diān chēn":["瘨"],"da dá":["瘩"],"biě biē":["瘪"],qué:["瘸"],"dàn dān":["癉"],"guì wēi":["癐"],"nòng nóng":["癑"],"biē biě":["癟"],"bō bǒ":["癷"],bái:["白"],"jí bī":["皀"],"de dì dí dī":["的"],"pā bà":["皅"],"gāo háo":["皋"],"gāo yáo":["皐"],"lì luò bō":["皪"],"zhā cǔ":["皻"],"zhāo zhǎn dǎn":["皽"],"jiān jiàn":["监","監","鋻","间","鞬"],"gài gě hé":["盖"],"máng wàng":["盳"],yuǎn:["盶","逺","遠"],"tián xián":["盷"],"xiāng xiàng":["相"],dǔn:["盹","趸","躉"],"xì pǎn":["盻"],"shěng xǐng":["省"],"yún hùn":["眃"],"miǎn miàn":["眄"],"kàn kān":["看"],"yìng yāng yǎng":["眏"],"yǎo āo ǎo":["眑"],"jū xū kōu":["眗"],"yí chì":["眙"],"dié tì":["眣"],"bǐng fǎng":["眪"],"pàng pán":["眫"],"mī mí":["眯","瞇"],"xuàn shùn xún":["眴"],tiào:["眺","粜","糶","覜","趒"],"zhe zhuó zháo zhāo":["着"],"qiáo shào xiāo":["睄"],"cuó zhuài":["睉"],gùn:["睔","謴"],"suì zuì":["睟"],"pì bì":["睥","稫","辟"],"yì zé gāo":["睪"],"xǐng xìng":["睲"],"guì wèi kuì":["瞆"],"kòu jì":["瞉"],"qióng huán":["瞏"],"mán mén":["瞒","瞞"],"diāo dōu":["瞗"],"lou lóu lǘ":["瞜"],"shùn rún":["瞤"],"liào liǎo":["瞭","钌"],"jiàn xián":["瞯"],"wǔ mí":["瞴"],"guì kuì":["瞶"],"nǐng chēng":["矃"],"huò yuè":["矆"],"mēng méng":["矇"],"kuàng guō":["矌"],"guàn quán":["矔"],"mǎn mán":["矕"],"jīn guān qín":["矜"],"jīn qín guān":["矝"],"yù xù jué":["矞"],"jiǎo jiáo":["矫","矯"],duǎn:["短"],"shí dàn":["石"],"gāng qiāng kòng":["矼"],"huā xū":["砉"],"pīn bīn fēn":["砏"],"yán yàn":["研","硏"],"luǒ kē":["砢"],"fú fèi":["砩","笰"],"zhǔ zhù":["砫"],"lá lì lā":["砬"],"kuāng guāng":["硄"],"gè luò":["硌"],"shuò shí":["硕","碩"],"wèi wéi ái":["硙"],"què kè kù":["硞"],"mǎng bàng":["硥"],"luò lòng":["硦"],"yǒng tóng":["硧"],nüè:["硸","虐"],"kēng kěng":["硻"],"yān yǎn":["硽"],"zhuì chuí duǒ":["硾"],"kōng kòng":["硿"],"zòng cóng":["碂"],"jiān zhàn":["碊"],"lù liù":["碌","陆"],"què xī":["碏"],"lún lǔn lùn":["碖"],"náo gāng":["碙"],"jié yà":["碣"],"wèi wěi":["碨"],"tí dī":["碮"],"chá chā":["碴"],"qiāo què":["碻"],"sù xiè":["碿"],"liú liù":["磂","遛","鎦","馏"],"sī tí":["磃"],"bàng páng":["磅"],"huá kě gū":["磆"],"wěi kuǐ":["磈"],"xiá qià yà":["磍"],"lián qiān":["磏"],"wèi ái gài":["磑"],"lá lā":["磖"],"áo qiāo":["磝"],"pēng pèng":["磞","閛"],"yīn yǐn":["磤"],"lěi léi":["磥"],"mó mò":["磨"],"qì zhú":["磩"],"láo luò":["磱"],"pán bō":["磻"],"jí shé":["磼"],"hé qiāo qiào":["礉"],"kè huò":["礊"],"què hú":["礐"],"è qì":["礘"],cǎ:["礤","礸"],"xián xín":["礥"],"léi lěi lèi":["礧"],"yán yǎn":["礹"],"qí zhǐ":["祇","蚔"],"bēng fāng":["祊"],"bì mì":["祕"],suàn:["祘","笇","筭","算","蒜"],"piào piāo":["票"],"jì zhài":["祭"],"shuì lèi":["祱"],"jìn jīn":["禁"],"chán shàn":["禅"],"yáng shāng":["禓"],"zhī zhǐ tí":["禔"],"shàn chán":["禪"],"yú yù ǒu":["禺"],"zǐ zì":["秄"],"chá ná":["秅"],"zhǒng zhòng chóng":["种"],"hào mào":["秏"],"kù kū":["秙"],zū:["租","葅"],chèng:["秤","穪"],"huó kuò":["秮","秳"],"chēng chèn chèng":["称","稱"],"shì zhì":["秲","銴"],"fù pū":["秿"],"xùn zè":["稄"],"tú shǔ":["稌"],"zhùn zhǔn":["稕"],"jī qí":["稘","綨","觭"],"léng líng":["稜"],"zuì zú sū":["稡"],"xì qiè":["稧","郄"],"zhǒng zhòng":["種"],"zōng zǒng":["稯"],"xián jiān liàn":["稴"],"zī jiū":["稵"],"jī qǐ":["稽"],ròng:["穃"],"shān cǎn cēn":["穇"],"mén méi":["穈"],"jǐ jì":["穖"],"xiāo rào":["穘"],"zhuō bó":["穛"],"tóng zhǒng zhòng":["穜"],zuō:["穝"],"biāo pāo":["穮","藨"],"zhuō jué":["穱"],"cuán zàn":["穳"],"kōng kòng kǒng":["空"],"yū yǔ":["穻"],zhǎi:["窄","鉙"],báo:["窇","雹"],"kū zhú":["窋"],"jiào liáo liù":["窌"],"wā guī":["窐"],"tiǎo yáo":["窕"],"xūn yìn":["窨"],"yà yē":["窫"],"tián diān yǎn":["窴"],"chāo kē":["窼"],"kuǎn cuàn":["窽","窾"],"chù qì":["竐"],"qǔ kǒu":["竘"],"jìng zhěn":["竧"],"kǎn kàn":["竷"],"zhú dǔ":["竺"],"lè jīn":["竻"],"zhuì ruì":["笍"],"háng hàng":["笐"],"cén jìn hán":["笒"],"dā xiá nà":["笚"],"zé zuó":["笮"],"lóng lǒng":["笼","篭","籠","躘","龓"],"zhù zhú":["筑","築"],"dá dā":["答","荅"],shāi:["筛","篩","簁","籭"],"yún jūn":["筠"],"láng làng":["筤","郎","阆"],"zhì zhǐ":["筫"],o:["筽"],"póu bù fú pú":["箁"],"pái bēi":["箄"],gè:["箇","虼","鉻","铬"],"tái chí":["箈"],"guǎi dài":["箉"],"zhào dào":["箌"],"jīng qìng":["箐"],"lín lǐn":["箖"],"jùn qūn":["箘"],"shī yí":["箷","釶"],"yuē yào chuò":["箹"],"xiāo shuò qiào":["箾"],"gōng gǎn lǒng":["篢"],"páng péng":["篣"],"zhuó huò":["篧"],"jiǎn jiān":["篯"],"dí zhú":["篴"],"zān cēn cǎn":["篸"],"zhuàn suǎn zuàn":["篹"],"piǎo biāo":["篻"],"guó guì":["簂"],"cè jí":["簎"],"mì miè":["簚"],"shāi sī":["簛"],"sǔn zhuàn":["簨"],"gàn gǎn":["簳"],"bò bǒ":["簸"],"bó bù":["簿"],shi:["籂"],"zhēn jiān":["籈"],"zhuàn zuǎn":["籑"],"fān pān biān":["籓"],"sǒu shǔ":["籔"],zuǎn:["籫","繤","纂","纉","纘","缵"],nǚ:["籹","釹","钕"],"shā chǎo":["粆"],"kāng jīng":["粇"],fěn:["粉","黺"],cū:["粗","觕","麁","麄","麤"],"nián zhān":["粘"],"cè sè":["粣"],"zhōu yù":["粥"],"shēn sǎn":["糁"],"biān biǎn":["糄","萹"],miàn:["糆","面","靣","麪","麫","麵","麺"],"hú hū hù":["糊"],"gǔ gòu":["糓"],"mí méi":["糜"],"sǎn shēn":["糝","糣"],zāo:["糟","蹧","遭","醩"],"mì sī":["糸"],"jiū jiǔ":["糺"],"xì jì":["系","繫"],"zhēng zhěng":["糽"],"chà chǎ":["紁","衩"],"yuē yāo":["約","约"],"hóng gōng":["紅","红"],"hé gē":["紇","纥"],"wén wèn":["紋","纹"],fóu:["紑"],"jì jié jiè":["紒"],"pī pí bǐ":["紕","纰"],"jīn jìn":["紟"],"zhā zā":["紥","紮"],hā:["紦"],"fū fù":["紨"],"chōu chóu":["紬"],"lèi léi lěi":["累"],"bō bì":["紴"],"tiǎn zhěn":["紾"],"jiōng jiǒng":["絅"],"jié jiē":["結","结","节"],"guà kuā":["絓"],"bǎi mò":["絔"],"gēng huán":["絙"],"jié xié":["絜"],"quán shuān":["絟"],"gǎi ǎi":["絠"],"luò lào":["絡","络"],"bīng bēng pēng":["絣"],"gěi jǐ":["給","给"],"tóng tōng dòng":["絧"],"tiào diào dào":["絩"],"lěi lèi léi":["絫"],"gāi hài":["絯"],"chī zhǐ":["絺"],"wèn miǎn mán wàn":["絻"],"huán huàn wàn":["綄"],"qīn xiān":["綅"],"tì tí":["綈"],"yán xiàn":["綖"],"zōng zèng zòng":["綜"],"chēn lín":["綝"],"zhǔn zhùn":["綧"],"qiàn qīng zhēng":["綪"],"qìng qǐ":["綮"],"lún guān":["綸","纶"],"chuò chāo":["綽","绰"],"tián tǎn chān":["緂"],"lǜ lù":["緑","绿"],"ruǎn ruàn":["緛"],"jí qī":["緝"],"zhòng chóng":["緟","重"],"miáo máo":["緢"],"xiè yè":["緤"],huǎn:["緩","缓","㬊"],"gēng gèng":["緪","縆"],"tōu xū shū":["緰"],"zōng zòng":["緵","繌"],"yùn gǔn":["緷"],"guā wō":["緺"],"yùn yūn wēn":["緼","縕"],"bāng bàng":["縍"],"gǔ hú":["縎","鶻"],"cī cuò suǒ":["縒"],"cuī shuāi":["縗"],"róng rǒng ròng":["縙"],"zài zēng":["縡"],cài:["縩","菜","蔡"],"féng fèng":["縫"],"suō sù":["縮","缩"],"yǎn yǐn":["縯","酓"],"zòng zǒng":["縱","纵"],"zhuàn juàn":["縳"],"mò mù":["縸","莫"],"piǎo piāo":["縹","缥"],"fán pó":["繁"],"bēng bèng":["繃"],"móu miù miào liǎo":["繆"],"yáo yóu zhòu":["繇"],"zēng zèng":["繒","缯"],"jú jué":["繘"],"chuō chuò":["繛"],"zūn zǔn":["繜"],rào:["繞","绕","遶"],"chǎn chán":["繟"],"huì huí":["繢","缋","藱"],"qiāo sāo zǎo":["繰"],"jiǎo zhuó":["繳","缴"],"dàn tán chán":["繵"],nǒng:["繷"],"pú fú":["纀"],"yào lì":["纅"],"rǎng xiāng":["纕"],"lí sǎ xǐ lǐ":["纚"],"xiān qiàn":["纤"],"jīng jìng":["经"],"tí tì":["绨"],"bēng běng bèng":["绷"],"zōng zèng":["综"],"jī qī":["缉"],"wēn yùn yūn":["缊"],"fèng féng":["缝"],"shuāi cuī suī":["缞"],"miù móu liáo miào mù":["缪"],"qiāo sāo":["缲"],fǒu:["缶","缹","缻","雬","鴀"],"bà ba pí":["罢","罷"],"guà guǎi":["罫"],"yáng xiáng":["羊","羏"],"měi gāo":["羙"],"yì xī":["羛"],"qiǎng qiān":["羟"],"qiāng kòng":["羫"],"qián xián yán":["羬"],nóu:["羺"],"hóng gòng":["羾"],"pī bì pō":["翍"],"qú yù":["翑"],ké:["翗"],"qiào qiáo":["翘"],"zhái dí":["翟"],"dào zhōu":["翢"],"hóu qú":["翵"],shuǎ:["耍"],"ruǎn nuò":["耎"],"ér nài":["耏"],"zhuān duān":["耑"],"pá bà":["耙"],"chí sì":["耛"],"qù chú":["耝"],"lún lǔn":["耣"],"jí jiè":["耤"],"tāng tǎng":["耥"],pǎng:["耪","覫"],"zhá zé":["耫"],"yē yé":["耶"],"yún yíng":["耺"],"wà tuǐ zhuó":["聉"],"ér nǜ":["聏"],"tiē zhé":["聑"],"dǐ zhì":["聜"],qié:["聺"],"nǐ jiàn":["聻"],"lèi lē":["肋"],cào:["肏","襙","鄵","鼜"],"bó dí":["肑"],"xiào xiāo":["肖"],"dù dǔ":["肚"],chāi:["肞","釵","钗"],"hán qín hàn":["肣"],"pàng pán pàn":["肨","胖"],"zhūn chún":["肫"],āng:["肮","骯"],"yù yō":["育"],"pí bǐ bì":["肶"],"fèi bì":["胇"],"bèi bēi":["背"],"fèi zǐ":["胏"],"píng pēng":["胓","苹"],"fū fú zhǒu":["胕"],"shèng shēng":["胜"],kuà:["胯","跨","骻"],"gǎi hǎi":["胲"],"gē gé gā":["胳"],"néng nài":["能"],"guī kuì":["胿"],"mài mò":["脉"],"zāng zàng":["脏"],"jiǎo jué":["脚","角"],cuǒ:["脞"],"de te":["脦"],"zuī juān":["脧"],něi:["脮","腇","餒","馁","鮾","鯘"],"pú fǔ":["脯"],niào:["脲"],shuí:["脽"],guò:["腂","過","鐹"],"là xī":["腊"],"yān ā":["腌"],"gāo gào":["膏"],"lù biāo":["膔"],chuái:["膗"],"zhuān chuán chún zhuǎn":["膞"],chuài:["膪","踹"],"fán pán":["膰"],"wǔ hū":["膴"],"shān dàn":["膻"],tún:["臀","臋","蛌","豘","豚","軘","霕","飩","饨","魨","鲀","黗"],"bì bei":["臂"],"là gé":["臈"],"sào sāo":["臊"],nào:["臑","閙","闹","鬧"],"ní luán":["臡"],"qiān xián":["臤"],"guàng jiǒng":["臦"],"guǎng jiǒng":["臩"],"chòu xiù":["臭"],"mián biān":["臱"],"dié zhí":["臷"],"zhī jìn":["臸"],"shè shě":["舍"],pù:["舖","舗"],"bān bō pán":["般"],kuā:["舿"],"gèn gěn":["艮"],"sè shǎi":["色"],"fú bó":["艴"],"jiāo qiú":["艽"],"chāi chā":["芆"],"sháo què":["芍"],"hù xià":["芐"],"zì zǐ":["芓"],"huì hū":["芔"],"tún chūn":["芚"],"jiè gài":["芥"],"xù zhù":["芧"],"yuán yán":["芫"],"xīn xìn":["芯"],"lún huā":["芲"],"wù hū":["芴"],"gōu gǒu":["芶"],"mào máo":["芼"],"fèi fú":["芾"],"chán yín":["苂"],qiē:["苆"],"sū sù":["苏"],"tiáo sháo":["苕"],"lì jī":["苙"],"kē hē":["苛"],"jù qǔ":["苣"],"ruò rě":["若"],"zhù níng":["苧"],"pā bó":["苩"],xiú:["苬"],"zhǎ zuó":["苲"],"jū chá":["苴"],nié:["苶"],"shēng ruí":["苼"],"qié jiā":["茄"],"zǐ cí":["茈"],"qiàn xī":["茜"],chǎi:["茝"],"fá pèi":["茷"],ráo:["荛","蕘","襓","饒","饶"],"yíng xíng":["荥"],"qián xún":["荨","蕁"],"yìn yīn":["荫"],"hé hè":["荷"],"shā suō":["莎"],"péng fēng":["莑"],"shēn xīn":["莘"],"wǎn guān guǎn":["莞"],"yóu sù":["莤"],"shāo xiāo":["莦","蛸"],"làng liáng":["莨"],"piǎo fú":["莩"],"wèn wǎn miǎn":["莬"],"shì shí":["莳","蒔"],"tù tú":["莵"],"xiān liǎn":["莶","薟"],"wǎn yù":["菀"],"zōu chù":["菆"],"lù lǜ":["菉"],"jūn jùn":["菌"],"niè rěn":["菍"],"zī zì zāi":["菑"],"tú tù":["菟"],"jiē shà":["菨"],"qiáo zhǎo":["菬"],"tái zhī chí":["菭"],"fēi fěi":["菲","蜚"],"qín qīn jīn":["菳"],"zū jù":["菹","蒩"],"lǐn má":["菻"],"tián tiàn":["菾"],tiē:["萜","貼","贴"],"luò là lào luō":["落"],"zhù zhuó zhe":["著"],"shèn rèn":["葚"],"gě gé":["葛"],"jùn suǒ":["葰"],"kuì kuài":["蒉"],"rú ná":["蒘"],"méng mēng měng":["蒙"],"yuán huán":["蒝"],"xú shú":["蒣"],"xí xì":["蒵"],"mì míng":["蓂"],"sōu sǒu":["蓃"],"gài gě hé hài":["蓋"],"yǎo zhuó":["蓔"],"diào tiáo dí":["蓧"],"xū qiū fū":["蓲"],"zí jú":["蓻"],"liǎo lù":["蓼"],xu:["蓿"],"hàn hǎn":["蔊"],"màn wàn mán":["蔓"],"pó bò":["蔢"],"fān fán bō":["蕃"],"hóng hòng":["蕻"],"yù ào":["薁","隩"],"xí xiào":["薂"],"báo bó bò":["薄"],"cí zī":["薋"],"wàn luàn":["薍"],"kǎo hāo":["薧"],"yuǎn wěi":["薳"],"zhòu chóu":["薵"],"wō mái":["薶"],"xiāo hào":["藃"],"yù xù xū":["藇"],"jiè jí":["藉"],"diào zhuó":["藋"],"cáng zàng":["藏"],lǎ:["藞"],"chú zhū":["藸"],"pín píng":["蘋"],"gān hán":["虷"],"hóng jiàng":["虹"],"huī huǐ":["虺"],"xiā há":["虾"],"mǎ mà mā":["蚂"],"fāng bàng":["蚄"],"bàng bèng":["蚌"],"jué quē":["蚗"],"qín qián":["蚙"],"gōng zhōng":["蚣"],"fǔ fù":["蚥"],"dài dé":["蚮"],"gǒu qú xù":["蚼"],"bǒ pí":["蚾"],"shé yí":["蛇"],tiě:["蛈","鉄","銕","鐡","鐵","铁","驖"],"gé luò":["蛒"],"máng bàng":["蛖"],"yì xǔ":["蛡"],"há gé":["蛤"],"qiè ní":["蛪"],"é yǐ":["蛾"],"zhē zhé":["蜇"],"là zhà":["蜡"],suò:["蜶","逤"],"yóu qiú":["蝤"],"xiā hā":["蝦"],"xī qī":["螇"],"bī pí":["螕"],"nài něng":["螚"],"hé xiá":["螛"],"guì huǐ":["螝"],"mǎ mā mà":["螞"],"shì zhē":["螫"],"zhì dié":["螲"],"jiàn chán":["螹"],"ma má mò":["蟆"],"mǎng měng":["蟒"],"biē bié":["蟞"],"bēn fèi":["蟦"],"láo liáo":["蟧"],"yín xún":["蟫"],"lí lǐ":["蠡"],"xuè xiě":["血"],"xíng háng hàng héng":["行"],"shuāi cuī":["衰"],"tuó tuō":["袉"],"lǐng líng":["袊"],"bào páo pào":["袌"],"jù jiē":["袓"],"hè kè":["袔"],"yí yì":["袘","貤"],"nà jué":["袦"],"bèi pī":["被"],"chǐ nuǒ":["袲"],"chǐ qǐ duǒ nuǒ":["袳"],"jiá qiā jié":["袷"],"bó mò":["袹"],"guī guà":["袿"],"liè liě":["裂"],"chéng chěng":["裎"],"jiē gé":["裓"],"dāo chóu":["裯"],"shang cháng":["裳"],"yuān gǔn":["裷"],"yǎn ān":["裺"],"tì xī":["裼"],"fù fú":["褔"],"chǔ zhǔ":["褚"],"tuì tùn":["褪"],lǎi:["襰"],"yào yāo":["要"],"qín tán":["覃"],"jiàn xiàn":["見","见"],piǎn:["覑","諞","谝","貵","𡎚"],"piē miè":["覕"],"yíng yǐng":["覮"],"qù qū":["覰","覷","觑"],"jiàn biǎn":["覵"],"luó luǎn":["覶"],"zī zuǐ":["觜"],"huà xiè":["觟"],"jiě jiè xiè":["解","觧"],"xué hù":["觷"],"lì lù":["觻"],tǎo:["討","讨"],zhùn:["訰"],"zī zǐ":["訾"],"yí dài":["詒","诒"],xiòng:["詗","诇"],"diào tiǎo":["誂"],"yí chǐ chì":["誃"],"lǎng làng":["誏"],"ēi éi ěi èi xī":["誒","诶"],shuà:["誜"],"yǔ yù":["語","语","雨"],"shuō shuì yuè":["說","说"],"shuí shéi":["誰","谁"],"qū juè":["誳"],"chī lài":["誺"],"nì ná":["誽"],"diào tiáo":["調"],"pǐ bēi":["諀"],"jì jī":["諅"],"zé zuò zhǎ cuò":["諎"],"chù jí":["諔"],"háo xià":["諕"],"lùn lún":["論","论"],"shì dì":["諟"],"huà guā":["諣"],"xǐ shāi āi":["諰"],"nán nàn":["諵","難"],miù:["謬","谬"],zèn:["譖","谮"],"shí zhì":["識","识"],"juàn xuān":["讂"],"yí tuī":["讉"],zhán:["讝"],"xǔ hǔ":["许"],"xiáng yáng":["详"],"tiáo diào zhōu":["调"],"chén shèn":["谌"],"mí mèi":["谜"],"màn mán":["谩"],"gǔ yù":["谷"],"huō huò huá":["豁"],"zhì zhài":["豸"],"huān huán":["貆"],"kěn kūn":["貇"],"mò hé":["貈"],"mò hé háo":["貉"],"jù lóu":["貗"],"zé zhài":["責","责"],"dài tè":["貸"],"bì bēn":["賁"],"jiǎ gǔ jià":["賈"],"xiōng mín":["賯"],càng:["賶"],"zhuàn zuàn":["賺","赚"],"wàn zhuàn":["贃"],"gàn gòng zhuàng":["贛"],"yuán yùn":["贠"],"bēn bì":["贲"],"jiǎ gǔ":["贾"],zǒu:["走","赱","鯐"],"dié tú":["趃"],"jū qiè":["趄"],"qū cù":["趋","趨"],"jí jié":["趌"],"guā huó":["趏"],"què qì jí":["趞"],"tàng tāng":["趟"],"chuō zhuó":["趠"],"qù cù":["趣"],"yuè tì":["趯"],"bō bào":["趵"],"kuà wù":["趶"],"guì jué":["趹"],"fāng fàng páng":["趽"],"páo bà":["跁"],"qí qǐ":["跂"],"jiàn chén":["跈"],"pǎo páo":["跑"],"diǎn diē tiē":["跕"],"jū jù qiè":["跙"],bǒ:["跛"],"luò lì":["跞"],"dài duò duō chí":["跢"],zhuǎi:["跩"],"bèng pián":["跰"],"tiào táo":["跳"],"shū chōu":["跾"],"liàng liáng":["踉"],"tà tā":["踏"],chǎ:["蹅","鑔","镲"],"dí zhí":["蹢"],"dēng dèng":["蹬","鐙","镫"],cèng:["蹭"],"dūn cún":["蹲"],"juě jué":["蹶"],liāo:["蹽"],"xiè sǎ":["躠"],tǐ:["躰","軆","骵"],"yà zhá gá":["轧","軋"],"xìn xiàn":["軐"],"fàn guǐ":["軓"],"zhuàn zhuǎn":["転"],"zhóu zhòu":["軸","轴"],bú:["轐","醭","鳪"],"zhuǎn zhuàn zhuǎi":["转"],"zǎi zài":["载"],"niǎn zhǎn":["辗"],"biān bian":["边"],"dào biān":["辺"],"yǐ yí":["迆","迤","迱"],"guò guo guō":["过"],"wàng kuāng":["迋"],"hái huán":["还"],"zhè zhèi":["这"],"yuǎn yuàn":["远"],"zhì lì":["迣"],"zhù wǎng":["迬"],"zhuī duī":["追"],"shì kuò":["适"],tòu:["透"],"tōng tòng":["通"],guàng:["逛"],"dǎi dài":["逮"],"suì suí":["遂"],"tí dì":["遆"],"yí wèi":["遗"],"shì dí zhé":["適"],cà:["遪"],"huán hái":["還"],"lí chí":["邌"],"kàng háng":["邟"],"nà nèi nā":["那"],"xié yá yé yú xú":["邪"],"gāi hái":["郂"],"huán xún":["郇"],"chī xī":["郗"],hǎo:["郝"],"lì zhí":["郦"],"xiáo ǎo":["郩"],"dōu dū":["都"],liǎo:["曢","鄝","镽"],"zàn cuán cuó":["酂","酇"],"dīng dǐng":["酊"],"cù zuò":["酢"],"fā pō":["酦"],"shāi shī":["酾"],niàng:["酿","醸"],"qiú chōu":["醔"],"pō fā":["醗","醱"],"chǎn chěn":["醦"],"yàn liǎn xiān":["醶"],"niàng niáng":["釀"],"lǐ li":["里"],"lí xǐ xī":["釐"],"liǎo liào":["釕"],"dīng dìng":["釘","钉"],"qiǎo jiǎo":["釥"],"yú huá":["釪"],"huá wū":["釫"],"rì rèn jiàn":["釰","釼"],"dì dài":["釱"],"pī zhāo":["釽"],"yá yé":["釾"],"bǎ pá":["鈀","钯"],"tā tuó":["鉈","铊"],běi:["鉳"],"bǐng píng":["鉼"],"hā kē":["鉿","铪"],chòng:["銃","铳"],"xiǎng jiōng":["銄"],"yù sì":["銉"],"xù huì":["銊"],"rén rěn":["銋"],"shàn shuò":["銏"],"chì lì":["銐"],"xiǎn xǐ":["銑","铣"],"hóu xiàng":["銗"],"diào tiáo yáo":["銚"],"xiān kuò tiǎn guā":["銛","銽","铦"],"zhé niè":["銸"],"zhōng yōng":["銿"],"tōu tù dòu":["鋀"],"méi méng":["鋂"],"wàn jiǎn":["鋄","鎫"],"tǐng dìng":["鋌","铤"],"juān jiān cuān":["鋑"],"sī tuó":["鋖"],"juān xuān juàn":["鋗"],"wú huá wū":["鋘"],"zhuó chuò":["鋜"],"xíng xìng jīng":["鋞"],"jū jú":["鋦","锔"],"zuì niè":["鋷"],"yuān yuǎn wǎn wān":["鋺"],"gāng gàng":["鋼","钢"],zhuī:["錐","锥","騅","骓","鵻"],ā:["錒","锕"],"cuō chā":["鎈"],"suǒ sè":["鎍"],"yáo zú":["鎐"],"yè tà gé":["鎑"],"qiāng chēng":["鎗"],"gé lì":["鎘","镉","鬲"],"bī pī bì":["鎞"],"gǎo hào":["鎬"],"zú chuò":["鏃"],"xiū xiù":["鏅"],"shòu sōu":["鏉"],"dí dī":["鏑","镝"],"qiāo sǎn càn":["鏒"],"lù áo":["鏕"],"tāng táng":["鏜"],"jiàn zàn":["鏩"],"huì suì ruì":["鏸"],"qiǎng qiāng":["鏹","镪"],"sǎn xiàn sà":["鏾"],"jiǎn jiàn":["鐧","锏"],"dāng chēng":["鐺","铛"],"zuān zuàn":["鑽"],"sà xì":["钑"],"yào yuè":["钥"],"tǒu dǒu":["钭"],"zuàn zuān":["钻"],"qiān yán":["铅"],"pí pī":["铍"],"yáo diào tiáo":["铫"],"tāng tàng":["铴"],"pù pū":["铺"],"tán xiān":["锬"],"liù liú":["镏"],"hào gǎo":["镐"],"táng tāng":["镗"],"tán chán xín":["镡"],"huò shǎn":["閄"],"hàn bì":["閈","闬"],"kāng kàng":["閌","闶"],"xián jiàn jiān jiǎn":["閒"],"xiā xiǎ":["閕"],"xiǎ kě":["閜"],"biàn guān":["閞"],"hé gé":["閤","颌"],"hòng xiàng":["閧"],"sē xī":["閪"],"tíng tǐng":["閮"],"è yān":["閼","阏"],"hòng juǎn xiàng":["闂"],"bǎn pàn":["闆"],"dū shé":["闍","阇"],"què quē":["闕"],"tāng táng chāng":["闛"],"kàn hǎn":["闞","阚"],"xì sè tà":["闟"],"mēn mèn":["闷"],"quē què":["阙"],"yán diàn":["阽"],"ā ē":["阿"],"bēi pō pí":["陂"],"yàn yǎn":["隁"],"yú yáo shù":["隃"],"lóng lōng":["隆"],"duì zhuì":["隊"],"suí duò":["隋"],"gāi qí ái":["隑"],"huī duò":["隓","隳"],"wěi kuí":["隗"],"lì dài":["隸"],"zhuī cuī wéi":["隹"],"hè hú":["隺","鶮"],"jùn juàn":["隽","雋"],"nán nàn nuó":["难"],"què qiāo qiǎo":["雀"],"guàn huán":["雚"],"guī xī":["雟"],"sè xí":["雭"],án:["雸"],"wù méng":["雺"],tèng:["霯"],"lù lòu":["露"],mái:["霾"],"jìng liàng":["靚"],"gé jí":["革"],bǎ:["靶"],"yāng yàng":["鞅"],"gé tà sǎ":["鞈"],"biān yìng":["鞕"],"qiào shāo":["鞘"],"juān xuān":["鞙"],"shàng zhǎng":["鞝"],"pí bǐng bì bēi":["鞞"],la:["鞡"],"xiè dié":["鞢"],ēng:["鞥"],"móu mù":["鞪"],"bì bǐng":["鞸"],"mèi wà":["韎"],rǒu:["韖"],"shè xiè":["韘"],"yùn wēn":["韫"],"dùn dú":["頓","顿"],duǐ:["頧"],luō:["頱"],"bīn pín":["頻"],yóng:["顒","颙","鰫"],mān:["顢","颟"],"jǐng gěng":["颈"],"jié xié jiá":["颉"],"kē ké":["颏"],"pín bīn":["频"],"chàn zhàn":["颤"],"fēng fěng":["風","风"],"biāo diū":["颩"],"bá fú":["颰"],"sāo sōu":["颾"],"liù liáo":["飂"],"shí sì yì":["食"],"yǎng juàn":["飬"],"zhù tǒu":["飳"],"yí sì":["飴"],"zuò zé zhā":["飵"],tiè:["飻","餮"],"xiǎng náng":["饟"],"táng xíng":["饧"],"gē le":["饹"],"chā zha":["馇"],"náng nǎng":["馕"],"yūn wò":["馧"],"zhī shì":["馶"],"xìn jìn":["馸"],"kuài jué":["駃"],zǎng:["駔","驵"],"tái dài":["駘"],"xún xuān":["駨"],"liáng láng":["駺"],piàn:["騗","騙","骗","魸"],"dài tái":["骀"],"sāo sǎo":["骚"],"gǔ gū":["骨"],"bèi mó":["骳"],"xiāo qiāo":["骹"],"bǎng pǎng":["髈"],"bó jué":["髉"],"bì pǒ":["髲"],"máo méng":["髳"],"kuò yuè":["髺"],"bā bà":["魞","鲃"],"jì cǐ":["鮆"],"bó bà":["鮊"],"zhǎ zhà":["鮓","鲊"],"chóu dài":["鮘"],"luò gé":["鮥"],"guī xié wā kuí":["鮭"],"xiān xiǎn":["鮮","鲜"],"pū bū":["鯆"],"yì sī":["鯣"],"bà bó":["鲌"],"guī xié":["鲑"],"sāi xǐ":["鳃"],"niǎo diǎo":["鳥"],"diāo zhāo":["鳭"],"gān hàn yàn":["鳱"],"fū guī":["鳺"],"jiān qiān zhān":["鳽"],"hé jiè":["鶡"],"piān biǎn":["鶣"],"chuàn zhì":["鶨"],"cāng qiāng":["鶬"],"sǔn xùn":["鶽"],"biāo páo":["麃"],"zhù cū":["麆"],"jūn qún":["麇","麕"],chi:["麶"],"mó me":["麼"],"mó me ma":["麽"],"mí mǒ":["麿"],"dàn shèn":["黮"],"zhěn yān":["黰"],"dǎn zhǎn":["黵"],"miǎn mǐn měng":["黾"],hōu:["齁"],nàng:["齉"],"qí jì zī zhāi":["齐"],"yín kěn yǎn":["龂"],"yín kěn":["龈"],"gōng wò":["龏"],"guī jūn qiū":["龜","龟"],"kuí wā":["䖯"],lōu:["䁖"],"ōu qū":["𫭟"],"lóu lǘ":["𦝼"],"gǎ gā gá":["嘎"],"wā guà":["坬"],"zhǐ dǐ":["茋"],"gǒng hóng":["硔"],"yáo xiào":["滧"]},xu=new ML;Object.keys(FC).forEach(e=>{const t=FC[e];for(let n of t)xu.set(n,e)});const BC={这个:"zhè ge",成为:"chéng wéi",认为:"rèn wéi",作为:"zuò wéi",部分:"bù fen",要求:"yāo qiú",应该:"yīng gāi",增长:"zēng zhǎng",提供:"tí gōng",觉得:"jué de",任务:"rèn wu",那个:"nà ge",称为:"chēng wéi",为主:"wéi zhǔ",了解:"liǎo jiě",处理:"chǔ lǐ",皇上:"huáng shang",只要:"zhǐ yào",大量:"dà liàng",力量:"lì liàng",几乎:"jī hū",干部:"gàn bù",目的:"mù dì",行为:"xíng wéi",只见:"zhǐ jiàn",认识:"rèn shi",市长:"shì zhǎng",师父:"shī fu",调查:"diào chá",重新:"chóng xīn",分为:"fēn wéi",知识:"zhī shi",导弹:"dǎo dàn",质量:"zhì liàng",行款:"háng kuǎn",行列:"háng liè",行话:"háng huà",行业:"háng yè",隔行:"gé háng",在行:"zài háng",行家:"háng jia",内行:"nèi háng",外行:"wài háng",同行:"tóng háng",本行:"běn háng",行伍:"háng wǔ",洋行:"yáng háng",银行:"yín háng",商行:"shāng háng",支行:"zhī háng",总行:"zǒng háng",行情:"háng qíng",懂行:"dǒng háng",行规:"háng guī",行当:"háng dang",行货:"háng huò",太行:"tài háng",入行:"rù háng",中行:"zhōng háng",农行:"nóng háng",工行:"gōng háng",建行:"jiàn háng",各行:"gè háng",行号:"háng hào",行高:"háng gāo",行首:"háng shǒu",行尾:"háng wěi",行末:"háng mò",行长:"háng zhǎng",行距:"háng jù",换行:"huàn háng",行会:"háng huì",行辈:"háng bèi",行道:"háng dào",道行:"dào heng",参与:"cān yù",充分:"chōng fèn",尽管:"jǐn guǎn",生长:"shēng zhǎng",数量:"shù liàng",应当:"yīng dāng",院长:"yuàn zhǎng",强调:"qiáng diào",只能:"zhǐ néng",音乐:"yīn yuè",以为:"yǐ wéi",处于:"chǔ yú",部长:"bù zhǎng",蒙古:"měng gǔ",只有:"zhǐ yǒu",适当:"shì dàng",只好:"zhǐ hǎo",成长:"chéng zhǎng",高兴:"gāo xìng",不了:"bù liǎo",产量:"chǎn liàng",胖子:"pàng zi",显得:"xiǎn de",只是:"zhǐ shì",似的:"shì de",率领:"shuài lǐng",改为:"gǎi wéi",不禁:"bù jīn",成分:"chéng fèn",答应:"dā ying",少年:"shào nián",兴趣:"xìng qù",太监:"tài jian",休息:"xiū xi",校长:"xiào zhǎng",更新:"gēng xīn",合同:"hé tong",喝道:"hè dào",重庆:"chóng qìng",重建:"chóng jiàn",使得:"shǐ de",审查:"shěn chá",累计:"lěi jì",给予:"jǐ yǔ",极为:"jí wéi",冠军:"guàn jūn",仿佛:"fǎng fú",头发:"tóu fa",投降:"tóu xiáng",家长:"jiā zhǎng",仔细:"zǐ xì",要是:"yào shi",将领:"jiàng lǐng",含量:"hán liàng",更为:"gèng wéi",积累:"jī lěi",地处:"dì chǔ",县长:"xiàn zhǎng",少女:"shào nǚ",路上:"lù shang",只怕:"zhǐ pà",能量:"néng liàng",储量:"chǔ liàng",供应:"gōng yìng",挑战:"tiǎo zhàn",西藏:"xī zàng",记得:"jì de",总量:"zǒng liàng",当真:"dàng zhēn",将士:"jiàng shì",差别:"chā bié",较为:"jiào wéi",长老:"zhǎng lǎo",大夫:"dài fu",差异:"chā yì",懂得:"dǒng de",尽量:"jǐn liàng",模样:"mú yàng",的确:"dí què",为首:"wéi shǒu",便宜:"pián yi",更名:"gēng míng",石头:"shí tou",州长:"zhōu zhǎng",为止:"wéi zhǐ",漂亮:"piào liang",炮弹:"pào dàn",藏族:"zàng zú",角色:"jué sè",当作:"dàng zuò",尽快:"jǐn kuài",人为:"rén wéi",重复:"chóng fù",胡同:"hú tòng",差距:"chā jù",弟兄:"dì xiong",大将:"dà jiàng",睡觉:"shuì jiào",一觉:"yí jiào",团长:"tuán zhǎng",队长:"duì zhǎng",区长:"qū zhǎng",难得:"nán dé",丫头:"yā tou",会长:"huì zhǎng",弟弟:"dì di",王爷:"wáng ye",重量:"zhòng liàng",誉为:"yù wéi",家伙:"jiā huo",华山:"huà shān",椅子:"yǐ zi",流量:"liú liàng",长大:"zhǎng dà",勉强:"miǎn qiǎng",会计:"kuài jì",过分:"guò fèn",济南:"jǐ nán",调动:"diào dòng",燕京:"yān jīng",少将:"shào jiàng",中毒:"zhòng dú",晓得:"xiǎo de",变更:"biàn gēng",打更:"dǎ gēng",认得:"rèn de",苹果:"píng guǒ",念头:"niàn tou",挣扎:"zhēng zhá",三藏:"sān zàng",剥削:"bō xuē",丞相:"chéng xiàng",少量:"shǎo liàng",寻思:"xún si",夺得:"duó dé",干线:"gàn xiàn",呼吁:"hū yù",处罚:"chǔ fá",长官:"zhǎng guān",柏林:"bó lín",亲戚:"qīn qi",身分:"shēn fèn",胳膊:"gē bo",着手:"zhuó shǒu",炸弹:"zhà dàn",咳嗽:"ké sou",叶子:"yè zi",外长:"wài zhǎng",供给:"gōng jǐ",师长:"shī zhǎng",变量:"biàn liàng",应有:"yīng yǒu",下载:"xià zài",乐器:"yuè qì",间接:"jiàn jiē",底下:"dǐ xià",打扮:"dǎ bàn",子弹:"zǐ dàn",弹药:"dàn yào",热量:"rè liàng",削弱:"xuē ruò",骨干:"gǔ gàn",容量:"róng liàng",模糊:"mó hu",转动:"zhuàn dòng",称呼:"chēng hu",科长:"kē zhǎng",处置:"chǔ zhì",着重:"zhuó zhòng",着急:"zháo jí",强迫:"qiǎng pò",庭长:"tíng zhǎng",首相:"shǒu xiàng",喇嘛:"lǎ ma",镇长:"zhèn zhǎng",只管:"zhǐ guǎn",重重:"chóng chóng",免得:"miǎn de",着实:"zhuó shí",度假:"dù jià",真相:"zhēn xiàng",相貌:"xiàng mào",处分:"chǔ fèn",委屈:"wěi qu",为期:"wéi qī",伯伯:"bó bo",伯子:"bǎi zi",圈子:"quān zi",见识:"jiàn shi",笼罩:"lǒng zhào",与会:"yù huì",都督:"dū du",都市:"dū shì",成都:"chéng dū",首都:"shǒu dū",帝都:"dì dū",王都:"wáng dū",东都:"dōng dū",都护:"dū hù",都城:"dū chéng",建都:"jiàn dū",迁都:"qiān dū",故都:"gù dū",定都:"dìng dū",中都:"zhōng dū",六安:"lù ān",宰相:"zǎi xiàng",较量:"jiào liàng",对称:"duì chèn",总长:"zǒng zhǎng",相公:"xiàng gong",空白:"kòng bái",打量:"dǎ liang",水分:"shuǐ fèn",舌头:"shé tou",没收:"mò shōu",行李:"xíng li",判处:"pàn chǔ",散文:"sǎn wén",处境:"chǔ jìng",孙子:"sūn zi",拳头:"quán tou",打发:"dǎ fā",组长:"zǔ zhǎng",骨头:"gǔ tou",宁可:"nìng kě",更换:"gēng huàn",薄弱:"bó ruò",还原:"huán yuán",重修:"chóng xiū",重来:"chóng lái",只顾:"zhǐ gù",爱好:"ài hào",馒头:"mán tou",军长:"jūn zhǎng",首长:"shǒu zhǎng",厂长:"chǎng zhǎng",司长:"sī zhǎng",长子:"zhǎng zǐ",强劲:"qiáng jìng",恰当:"qià dàng",头儿:"tóu er",站长:"zhàn zhǎng",折腾:"zhē teng",相处:"xiāng chǔ",统率:"tǒng shuài",中将:"zhōng jiàng",命中:"mìng zhòng",名将:"míng jiàng",木头:"mù tou",动弹:"dòng tan",地壳:"dì qiào",干活:"gàn huó",少爷:"shào ye",水量:"shuǐ liàng",补给:"bǔ jǐ",尾巴:"wěi ba",来得:"lái de",好奇:"hào qí",钥匙:"yào shi",当做:"dàng zuò",沉着:"chén zhuó",哑巴:"yǎ ba",车子:"chē zi",上将:"shàng jiàng",恶心:"ě xīn",担子:"dàn zi",应届:"yīng jiè",主角:"zhǔ jué",运转:"yùn zhuǎn",兄长:"xiōng zhǎng",格式:"gé shì",正月:"zhēng yuè",营长:"yíng zhǎng",当成:"dàng chéng",女婿:"nǚ xu",咽喉:"yān hóu",重阳:"chóng yáng",化为:"huà wéi",吐蕃:"tǔ bō",钻进:"zuān jìn",乐队:"yuè duì",亮相:"liàng xiàng",被子:"bèi zi",舍得:"shě de",杉木:"shā mù",击中:"jī zhòng",排长:"pái zhǎng",假期:"jià qī",分量:"fèn liàng",数次:"shù cì",提防:"dī fáng",吆喝:"yāo he",查处:"chá chǔ",量子:"liàng zǐ",里头:"lǐ tou",调研:"diào yán",伺候:"cì hou",重申:"chóng shēn",枕头:"zhěn tou",拚命:"pīn mìng",社长:"shè zhǎng",归还:"guī huán",批量:"pī liàng",畜牧:"xù mù",点着:"diǎn zháo",甚为:"shèn wéi",小将:"xiǎo jiàng",着眼:"zhuó yǎn",处死:"chǔ sǐ",厌恶:"yàn wù",鼓乐:"gǔ yuè",树干:"shù gàn",秘鲁:"bì lǔ",大方:"dà fāng",外头:"wài tou",班长:"bān zhǎng",星宿:"xīng xiù",宁愿:"nìng yuàn",钦差:"qīn chāi",为数:"wéi shù",勾当:"gòu dàng",削减:"xuē jiǎn",间谍:"jiàn dié",埋怨:"mán yuàn",结实:"jiē shi",计量:"jì liáng",淹没:"yān mò",村长:"cūn zhǎng",连长:"lián zhǎng",自给:"zì jǐ",武将:"wǔ jiàng",温差:"wēn chā",直奔:"zhí bèn",供求:"gōng qiú",剂量:"jì liàng",道长:"dào zhǎng",泄露:"xiè lòu",王八:"wáng ba",切割:"qiē gē",间隔:"jiàn gé",一晃:"yì huǎng",长假:"cháng jià",令狐:"líng hú",为害:"wéi hài",句子:"jù zi",偿还:"cháng huán",疙瘩:"gē da",燕山:"yān shān",堵塞:"dǔ sè",夺冠:"duó guàn",扎实:"zhā shi",电荷:"diàn hè",看守:"kān shǒu",复辟:"fù bì",郁闷:"yù mèn",尽早:"jǐn zǎo",切断:"qiē duàn",指头:"zhǐ tou",为生:"wéi shēng",畜生:"chù sheng",切除:"qiē chú",着力:"zhuó lì",着想:"zhuó xiǎng",级差:"jí chā",投奔:"tóu bèn",棍子:"gùn zi",含糊:"hán hu",少妇:"shào fù",兴致:"xìng zhì",纳闷:"nà mèn",干流:"gàn liú",卷起:"juǎn qǐ",扇子:"shàn zi",更改:"gēng gǎi",笼络:"lǒng luò",喇叭:"lǎ ba",载荷:"zài hè",妥当:"tuǒ dàng",为难:"wéi nán",着陆:"zhuó lù",燕子:"yàn zi",干吗:"gàn má",白发:"bái fà",总得:"zǒng děi",夹击:"jiā jī",曝光:"bào guāng",曲调:"qǔ diào",相机:"xiàng jī",叫化:"jiào huà",角逐:"jué zhú",啊哟:"ā yō",载重:"zài zhòng",长辈:"zhǎng bèi",出差:"chū chāi",垛口:"duǒ kǒu",撇开:"piē kāi",厅长:"tīng zhǎng",组分:"zǔ fèn",误差:"wù chā",家当:"jiā dàng",传记:"zhuàn jì",个子:"gè zi",铺设:"pū shè",干事:"gàn shì",杆菌:"gǎn jūn",定量:"dìng liàng",运载:"yùn zài",会儿:"huì er",酋长:"qiú zhǎng",重返:"chóng fǎn",差额:"chā é",露面:"lòu miàn",钻研:"zuān yán",大城:"dài chéng",上当:"shàng dàng",销量:"xiāo liàng",作坊:"zuō fang",照相:"zhào xiàng",哎呀:"āi yā",调集:"diào jí",看中:"kàn zhòng",议长:"yì zhǎng",风筝:"fēng zheng",辟邪:"bì xié",空隙:"kòng xì",更迭:"gēng dié",偏差:"piān chā",声调:"shēng diào",适量:"shì liàng",屯子:"tún zi",无量:"wú liàng",空地:"kòng dì",调度:"diào dù",散射:"sǎn shè",创伤:"chuāng shāng",海参:"hǎi shēn",满载:"mǎn zài",重叠:"chóng dié",落差:"luò chā",单调:"dān diào",老将:"lǎo jiàng",人参:"rén shēn",间断:"jiàn duàn",重现:"chóng xiàn",夹杂:"jiā zá",调用:"diào yòng",萝卜:"luó bo",附着:"fù zhuó",应声:"yìng shēng",主将:"zhǔ jiàng",罪过:"zuì guo",咀嚼:"jǔ jué",为政:"wéi zhèng",过量:"guò liàng",乐曲:"yuè qǔ",负荷:"fù hè",枪弹:"qiāng dàn",悄然:"qiǎo rán",处方:"chǔ fāng",悄声:"qiǎo shēng",曲子:"qǔ zi",情调:"qíng diào",挑衅:"tiǎo xìn",代为:"dài wéi",了结:"liǎo jié",打中:"dǎ zhòng",酒吧:"jiǔ bā",懒得:"lǎn de",增量:"zēng liàng",衣着:"yī zhuó",部将:"bù jiàng",要塞:"yào sài",茶几:"chá jī",杠杆:"gàng gǎn",出没:"chū mò",鲜有:"xiǎn yǒu",间隙:"jiàn xì",重担:"zhòng dàn",重演:"chóng yǎn",重试:"chóng shì",应酬:"yìng chou",只当:"zhǐ dāng",毋宁:"wú nìng",包扎:"bāo zā",前头:"qián tou",卷烟:"juǎn yān",非得:"fēi děi",弹道:"dàn dào",杆子:"gān zi",门将:"mén jiàng",后头:"hòu tou",喝彩:"hè cǎi",暖和:"nuǎn huo",累积:"lěi jī",调遣:"diào qiǎn",倔强:"jué jiàng",宝藏:"bǎo zàng",丧事:"sāng shì",约莫:"yuē mo",纤夫:"qiàn fū",更替:"gēng tì",装载:"zhuāng zài",背包:"bēi bāo",帖子:"tiě zi",松散:"sōng sǎn",呼喝:"hū hè",可恶:"kě wù",自转:"zì zhuàn",供电:"gōng diàn",反省:"fǎn xǐng",坦率:"tǎn shuài",苏打:"sū dá",本分:"běn fèn",落得:"luò de",鄙薄:"bǐ bó",相间:"xiāng jiàn",单薄:"dān bó",混蛋:"hún dàn",贞观:"zhēn guān",附和:"fù hè",能耐:"néng nài",吓唬:"xià hu",未了:"wèi liǎo",引着:"yǐn zháo",抽调:"chōu diào",沙子:"shā zi",席卷:"xí juǎn",标的:"biāo dì",别扭:"biè niu",思量:"sī liang",喝采:"hè cǎi",论语:"lún yǔ",盖子:"gài zi",分外:"fèn wài",弄堂:"lòng táng",乐舞:"yuè wǔ",雨量:"yǔ liàng",毛发:"máo fà",差遣:"chāi qiǎn",背负:"bēi fù",转速:"zhuàn sù",声乐:"shēng yuè",夹攻:"jiā gōng",供水:"gōng shuǐ",主干:"zhǔ gàn",惩处:"chéng chǔ",长相:"zhǎng xiàng",公差:"gōng chāi",榴弹:"liú dàn",省得:"shěng de",条子:"tiáo zi",重围:"chóng wéi",阻塞:"zǔ sè",劲风:"jìng fēng",纠葛:"jiū gé",颠簸:"diān bǒ",点中:"diǎn zhòng",重创:"zhòng chuāng",姥姥:"lǎo lao",迷糊:"mí hu",公家:"gōng jia",几率:"jī lǜ",苦闷:"kǔ mèn",度量:"dù liàng",差错:"chā cuò",暑假:"shǔ jià",参差:"cēn cī",搭载:"dā zài",助长:"zhù zhǎng",相称:"xiāng chèn",红晕:"hóng yùn",舍命:"shě mìng",喜好:"xǐ hào",列传:"liè zhuàn",劲敌:"jìng dí",蛤蟆:"há ma",请假:"qǐng jià",钉子:"dīng zi",沉没:"chén mò",高丽:"gāo lí",休假:"xiū jià",无为:"wú wéi",巴结:"bā jie",了得:"liǎo dé",变相:"biàn xiàng",核弹:"hé dàn",亲家:"qìng jia",承载:"chéng zài",喝问:"hè wèn",还击:"huán jī",交还:"jiāo huán",将令:"jiàng lìng",单于:"chán yú",空缺:"kòng quē",绿林:"lù lín",胆量:"dǎn liàng",执着:"zhí zhuó",低调:"dī diào",闭塞:"bì sè",轻薄:"qīng bó",得当:"dé dàng",占卜:"zhān bǔ",扫帚:"sào zhou",龟兹:"qiū cí",年长:"nián zhǎng",外传:"wài zhuàn",头子:"tóu zi",裁缝:"cái feng",礼乐:"lǐ yuè",血泊:"xuè pō",散乱:"sǎn luàn",动量:"dòng liàng",倒腾:"dǎo teng",取舍:"qǔ shě",咱家:"zán jiā",长发:"cháng fà",爪哇:"zhǎo wā",弹壳:"dàn ké",省悟:"xǐng wù",嚷嚷:"rāng rang",连累:"lián lèi",应得:"yīng dé",族长:"zú zhǎng",柜子:"guì zi",擂鼓:"léi gǔ",眩晕:"xuàn yùn",调配:"tiáo pèi",躯干:"qū gàn",差役:"chāi yì",坎坷:"kǎn kě",少儿:"shào ér",乐团:"yuè tuán",养分:"yǎng fèn",退还:"tuì huán",格调:"gé diào",语调:"yǔ diào",音调:"yīn diào",乐府:"yuè fǔ",古朴:"gǔ pǔ",打点:"dǎ diǎn",差使:"chāi shǐ",匀称:"yún chèn",瘦削:"shòu xuē",膏药:"gāo yao",吞没:"tūn mò",调任:"diào rèn",散居:"sǎn jū",上头:"shàng tóu",风靡:"fēng mǐ",放假:"fàng jià",估量:"gū liang",失当:"shī dàng",中弹:"zhòng dàn",妄为:"wàng wéi",长者:"zhǎng zhě",起哄:"qǐ hòng",末了:"mò liǎo",相声:"xiàng sheng",校正:"jiào zhèng",劝降:"quàn xiáng",矢量:"shǐ liàng",沉闷:"chén mèn",给与:"jǐ yǔ",解法:"jiě fǎ",塞外:"sài wài",将校:"jiàng xiào",嗜好:"shì hào",没落:"mò luò",朴刀:"pō dāo",片子:"piān zi",切削:"qiē xiāo",弹丸:"dàn wán",稀薄:"xī bó",亏得:"kuī dé",间歇:"jiàn xiē",翘首:"qiáo shǒu",色调:"sè diào",处决:"chǔ jué",表率:"biǎo shuài",尺子:"chǐ zi",招降:"zhāo xiáng",称职:"chèn zhí",斗篷:"dǒu peng",铺子:"pù zi",底子:"dǐ zi",负载:"fù zài",干警:"gàn jǐng",倒数:"dào shǔ",将官:"jiàng guān",锄头:"chú tou",归降:"guī xiáng",疟疾:"nüè ji",唠叨:"láo dao",限量:"xiàn liàng",屏息:"bǐng xī",重逢:"chóng féng",器乐:"qì yuè",氢弹:"qīng dàn",脖颈:"bó gěng",妃子:"fēi zi",处事:"chǔ shì",参量:"cān liàng",轻率:"qīng shuài",缥缈:"piāo miǎo",中奖:"zhòng jiǎng",才干:"cái gàn",施舍:"shī shě",卷子:"juàn zi",游说:"yóu shuì",巷子:"xiàng zi",膀胱:"páng guāng",切勿:"qiè wù",看管:"kān guǎn",风头:"fēng tou",精干:"jīng gàn",高差:"gāo chā",恐吓:"kǒng hè",扁担:"biǎn dàn",给养:"jǐ yǎng",格子:"gé zi",供需:"gōng xū",反差:"fǎn chā",飞弹:"fēi dàn",微薄:"wēi bó",发型:"fà xíng",即兴:"jí xìng",攒动:"cuán dòng",间或:"jiàn huò",浅薄:"qiǎn bó",乐章:"yuè zhāng",顺差:"shùn chā",调子:"diào zi",相位:"xiàng wèi",转子:"zhuàn zǐ",劲旅:"jìng lǚ",咔嚓:"kā chā",了事:"liǎo shì",转悠:"zhuàn you",当铺:"dàng pù",爪子:"zhuǎ zi",单子:"dān zi",好战:"hào zhàn",燕麦:"yàn mài",只许:"zhǐ xǔ",干练:"gàn liàn",女将:"nǚ jiàng",酒量:"jiǔ liàng",划船:"huá chuán",伎俩:"jì liǎng",挑拨:"tiǎo bō",少校:"shào xiào",着落:"zhuó luò",憎恶:"zēng wù",刻薄:"kè bó",要挟:"yāo xié",用处:"yòng chu",还手:"huán shǒu",模具:"mú jù",执著:"zhí zhuó",喝令:"hè lìng",保长:"bǎo zhǎng",吸着:"xī zhe",症结:"zhēng jié",公转:"gōng zhuàn",校勘:"jiào kān",重提:"chóng tí",扫兴:"sǎo xìng",铺盖:"pū gài",长史:"zhǎng shǐ",差价:"chā jià",压根:"yà gēn",怔住:"zhèng zhù",应允:"yīng yǔn",切入:"qiē rù",战将:"zhàn jiàng",年少:"nián shào",舍身:"shě shēn",执拗:"zhí niù",处世:"chǔ shì",中风:"zhòng fēng",等量:"děng liàng",放量:"fàng liàng",腔调:"qiāng diào",老少:"lǎo shào",没入:"mò rù",瓜葛:"guā gé",将帅:"jiàng shuài",车载:"chē zài",窝囊:"wō nang",长进:"zhǎng jìn",可汗:"kè hán",并州:"bīng zhōu",供销:"gōng xiāo",切片:"qiē piàn",差事:"chāi shì",知会:"zhī hui",鹰爪:"yīng zhǎo",处女:"chǔ nǚ",切磋:"qiē cuō",日头:"rì tou",押解:"yā jiè",滋长:"zī zhǎng",道观:"dào guàn",脚色:"jué sè",当量:"dāng liàng",婆家:"pó jia",缘分:"yuán fèn",空闲:"kòng xián",好色:"hào sè",怒喝:"nù hè",笼统:"lǒng tǒng",边塞:"biān sài",何曾:"hé céng",重合:"chóng hé",零散:"líng sǎn",轰隆:"hōng lōng",化子:"huà zi",内蒙:"nèi měng",数落:"shǔ luò",逆差:"nì chā",牟利:"móu lì",栅栏:"zhà lan",中标:"zhòng biāo",调档:"diào dàng",佝偻:"gōu lóu",场子:"chǎng zi",甲壳:"jiǎ qiào",重温:"chóng wēn",炮制:"páo zhì",返还:"fǎn huán",自传:"zì zhuàn",高调:"gāo diào",殷红:"yān hóng",固着:"gù zhuó",强求:"qiǎng qiú",本相:"běn xiàng",骄横:"jiāo hèng",草率:"cǎo shuài",气闷:"qì mèn",着色:"zhuó sè",宁肯:"nìng kěn",兴头:"xìng tou",拘泥:"jū nì",夹角:"jiā jiǎo",发髻:"fà jì",猛将:"měng jiàng",约摸:"yuē mo",拖累:"tuō lěi",呢绒:"ní róng",钻探:"zuān tàn",夹层:"jiā céng",落魄:"luò pò",巷道:"hàng dào",运量:"yùn liàng",解闷:"jiě mèn",空儿:"kòng er",估摸:"gū mo",好客:"hào kè",钻孔:"zuān kǒng",糊弄:"hù nòng",荥阳:"xíng yáng",烦闷:"fán mèn",仓卒:"cāng cù",分叉:"fēn chà",厂子:"chǎng zi",小调:"xiǎo diào",少阳:"shào yáng",受降:"shòu xiáng",染坊:"rǎn fáng",胳臂:"gē bei",将门:"jiàng mén",模板:"mú bǎn",配给:"pèi jǐ",为伍:"wéi wǔ",跟头:"gēn tou",划算:"huá suàn",累赘:"léi zhui",哄笑:"hōng xiào",晕眩:"yūn xuàn",干掉:"gàn diào",缝制:"féng zhì",难处:"nán chù",着意:"zhuó yì",蛮横:"mán hèng",奇数:"jī shù",短发:"duǎn fà",生还:"shēng huán",还清:"huán qīng",看护:"kān hù",直率:"zhí shuài",奏乐:"zòu yuè",载客:"zài kè",专横:"zhuān hèng",湮没:"yān mò",空格:"kòng gé",铺垫:"pū diàn",良将:"liáng jiàng",哗啦:"huā lā",散漫:"sǎn màn",脱发:"tuō fà",送还:"sòng huán",埋没:"mái mò",累及:"lěi jí",薄雾:"bó wù",调离:"diào lí",舌苔:"shé tāi",机长:"jī zhǎng",栓塞:"shuān sè",配角:"pèi jué",切口:"qiē kǒu",创口:"chuāng kǒu",哈欠:"hā qian",实弹:"shí dàn",铺平:"pū píng",哈达:"hǎ dá",懒散:"lǎn sǎn",实干:"shí gàn",填空:"tián kòng",刁钻:"diāo zuān",乐师:"yuè shī",量变:"liàng biàn",诱降:"yòu xiáng",搪塞:"táng sè",征调:"zhēng diào",夹道:"jiā dào",干咳:"gān ké",止咳:"zhǐ ké",乐工:"yuè gōng",划过:"huá guò",着火:"zháo huǒ",更正:"gēng zhèng",给付:"jǐ fù",空子:"kòng zi",哪吒:"né zhā",正着:"zhèng zháo",刷子:"shuā zi",丧葬:"sāng zàng",夹带:"jiā dài",安分:"ān fèn",中意:"zhòng yì",长孙:"zhǎng sūn",校订:"jiào dìng",卷曲:"juǎn qū",载运:"zài yùn",投弹:"tóu dàn",柞蚕:"zuò cán",份量:"fèn liàng",调换:"diào huàn",了然:"liǎo rán",咧嘴:"liě zuǐ",典当:"diǎn dàng",寒假:"hán jià",长兄:"zhǎng xiōng",给水:"jǐ shuǐ",须发:"xū fà",枝干:"zhī gàn",属相:"shǔ xiàng",哄抢:"hōng qiǎng",刻划:"kè huà",塞子:"sāi zi",单干:"dān gàn",还乡:"huán xiāng",兆头:"zhào tou",寺观:"sì guàn",督率:"dū shuài",啊哈:"ā ha",割舍:"gē shě",抹布:"mā bù",好恶:"hào wù",下处:"xià chǔ",消长:"xiāo zhǎng",离间:"lí jiàn",准头:"zhǔn tou",校对:"jiào duì",什物:"shí wù",番禺:"pān yú",佛爷:"fó ye",吗啡:"mǎ fēi",盐分:"yán fèn",虎将:"hǔ jiàng",薄荷:"bò he",独处:"dú chǔ",空位:"kòng wèi",铺路:"pū lù",乌拉:"wū lā",调回:"diào huí",来头:"lái tou",闲散:"xián sǎn",胶卷:"jiāo juǎn",冒失:"mào shi",干劲:"gàn jìn",弦乐:"xián yuè",相国:"xiàng guó",丹参:"dān shēn",助兴:"zhù xìng",铺开:"pū kāi",次长:"cì zhǎng",发卡:"fà qiǎ",拮据:"jié jū",刹车:"shā chē",生发:"shēng fà",重播:"chóng bō",缝合:"féng hé",音量:"yīn liàng",少尉:"shào wèi",冲压:"chòng yā",苍劲:"cāng jìng",厚薄:"hòu báo",威吓:"wēi hè",外相:"wài xiàng",呼号:"hū háo",着迷:"zháo mí",挑担:"tiāo dàn",纹路:"wén lù",还俗:"huán sú",强横:"qiáng hèng",着数:"zhāo shù",降顺:"xiáng shùn",挑明:"tiǎo míng",眯缝:"mī feng",分内:"fèn nèi",更衣:"gēng yī",软和:"ruǎn huo",尽兴:"jìn xìng",号子:"hào zi",爪牙:"zhǎo yá",败将:"bài jiàng",猜中:"cāi zhòng",结扎:"jié zā",没空:"méi kòng",夹缝:"jiā fèng",拾掇:"shí duo",掺和:"chān huo",簸箕:"bò ji",电量:"diàn liàng",荷载:"hè zǎi",调式:"diào shì",处身:"chǔ shēn",打手:"dǎ shǒu",弹弓:"dàn gōng",横蛮:"hèng mán",能干:"néng gàn",校点:"jiào diǎn",加载:"jiā zài",干校:"gàn xiào",哄传:"hōng chuán",校注:"jiào zhù",淤塞:"yū sè",马扎:"mǎ zhá",月氏:"yuè zhī",高干:"gāo gàn",经传:"jīng zhuàn",曾孙:"zēng sūn",好斗:"hào dòu",关卡:"guān qiǎ",逃奔:"táo bèn",磨蹭:"mó ceng",牟取:"móu qǔ",颤栗:"zhàn lì",蚂蚱:"mà zha",撮合:"cuō he",趔趄:"liè qie",摔打:"shuāi dǎ",台子:"tái zi",分得:"fēn de",粘着:"nián zhuó",采邑:"cài yì",散装:"sǎn zhuāng",婀娜:"ē nuó",兴味:"xìng wèi",行头:"xíng tou",气量:"qì liàng",调运:"diào yùn",处治:"chǔ zhì",乐音:"yuè yīn",充塞:"chōng sè",恫吓:"dòng hè",论调:"lùn diào",相中:"xiāng zhòng",民乐:"mín yuè",炮仗:"pào zhang",丧服:"sāng fú",骁将:"xiāo jiàng",量刑:"liàng xíng",缝补:"féng bǔ",财会:"cái kuài",大干:"dà gàn",历数:"lì shǔ",校场:"jiào chǎng",塞北:"sài běi",识相:"shí xiàng",辱没:"rǔ mò",鲜亮:"xiān liàng",语塞:"yǔ sè",露脸:"lòu liǎn",凉快:"liáng kuai",腰杆:"yāo gǎn",溜达:"liū da",嘎嘎:"gā gā",公干:"gōng gàn",桔梗:"jié gěng",挑逗:"tiǎo dòu",看门:"kān mén",乐歌:"yuè gē",拓片:"tà piàn",挑动:"tiǎo dòng",准将:"zhǔn jiàng",遒劲:"qiú jìng",磨坊:"mò fáng",逶迤:"wēi yí",搅和:"jiǎo huo",摩挲:"mó suō",作弄:"zuò nòng",苗头:"miáo tou",打颤:"dǎ zhàn",大藏:"dà zàng",畜牲:"chù shēng",勾搭:"gōu da",树荫:"shù yīn",树杈:"shù chà",铁杆:"tiě gǎn",将相:"jiàng xiàng",份子:"fèn zi",视差:"shì chā",绿荫:"lǜ yīn",枪杆:"qiāng gǎn",缝纫:"féng rèn",愁闷:"chóu mèn",点将:"diǎn jiàng",华佗:"huà tuó",劲射:"jìng shè",箱笼:"xiāng lǒng",终了:"zhōng liǎo",鬓发:"bìn fà",结巴:"jiē ba",苦干:"kǔ gàn",看家:"kān jiā",正旦:"zhēng dàn",中肯:"zhòng kěn",厦门:"xià mén",东莞:"dōng guǎn",食量:"shí liàng",宫调:"gōng diào",间作:"jiàn zuò",弹片:"dàn piàn",差池:"chā chí",漂白:"piǎo bái",杠子:"gàng zi",调处:"tiáo chǔ",好动:"hào dòng",转炉:"zhuàn lú",屏气:"bǐng qì",夹板:"jiā bǎn",哀乐:"āi yuè",干道:"gàn dào",苦处:"kǔ chù",劈柴:"pǐ chái",长势:"zhǎng shì",天华:"tiān huá",共处:"gòng chǔ",校验:"jiào yàn",出塞:"chū sài",磨盘:"mò pán",萎靡:"wěi mǐ",奔丧:"bēn sāng",唱和:"chàng hè",大调:"dà diào",非分:"fēi fèn",钻营:"zuān yíng",夹子:"jiā zi",超载:"chāo zài",更始:"gēng shǐ",铃铛:"líng dang",披散:"pī sàn",发还:"fā huán",转轮:"zhuàn lún",横财:"hèng cái",泡桐:"pāo tóng",抛撒:"pāo sǎ",天呀:"tiān yā",糊糊:"hū hu",躯壳:"qū qiào",通量:"tōng liàng",奉还:"fèng huán",午觉:"wǔ jiào",闷棍:"mèn gùn",浪头:"làng tou",砚台:"yàn tái",油坊:"yóu fáng",学长:"xué zhǎng",过载:"guò zài",笔调:"bǐ diào",衣被:"yī bèi",畜产:"xù chǎn",调阅:"diào yuè",蛮干:"mán gàn",曾祖:"zēng zǔ",提干:"tí gàn",变调:"biàn diào",覆没:"fù mò",模子:"mú zi",乐律:"yuè lǜ",称心:"chèn xīn",木杆:"mù gān",重印:"chóng yìn",自省:"zì xǐng",提调:"tí diào",看相:"kàn xiàng",芋头:"yù tou",下切:"xià qiē",塞上:"sài shàng",铺张:"pū zhāng",藤蔓:"téng wàn",薄幸:"bó xìng",解数:"xiè shù",褪去:"tuì qù",霰弹:"xiàn dàn",柚木:"yóu mù",痕量:"hén liàng",雅乐:"yǎ yuè",号哭:"háo kū",诈降:"zhà xiáng",猪圈:"zhū juàn",咋舌:"zé shé",铣床:"xǐ chuáng",防弹:"fáng dàn",健将:"jiàn jiàng",丽水:"lí shuǐ",削发:"xuē fà",空当:"kòng dāng",多相:"duō xiàng",鲜见:"xiǎn jiàn",划桨:"huá jiǎng",载波:"zài bō",跳蚤:"tiào zao",俏皮:"qiào pí",吧嗒:"bā dā",结发:"jié fà",了断:"liǎo duàn",同调:"tóng diào",石磨:"shí mò",时差:"shí chā",鼻塞:"bí sè",挑子:"tiāo zi",推磨:"tuī mò",武侯:"wǔ hóu",抹煞:"mǒ shā",调转:"diào zhuǎn",籍没:"jí mò",还债:"huán zhài",调演:"diào yǎn",分划:"fēn huá",奇偶:"jī ǒu",断喝:"duàn hè",闷雷:"mèn léi",狼藉:"láng jí",饭量:"fàn liàng",还礼:"huán lǐ",转调:"zhuǎn diào",星相:"xīng xiàng",手相:"shǒu xiàng",配乐:"pèi yuè",盖头:"gài tou",连杆:"lián gǎn",簿记:"bù jì",刀把:"dāo bà",量词:"liàng cí",名角:"míng jué",步调:"bù diào",校本:"jiào běn",账簿:"zhàng bù",隽永:"juàn yǒng",稍为:"shāo wéi",易传:"yì zhuàn",乐谱:"yuè pǔ",牵累:"qiān lěi",答理:"dā li",喝斥:"hè chì",吟哦:"yín é",干渠:"gàn qú",海量:"hǎi liàng",精当:"jīng dàng",着床:"zhuó chuáng",月相:"yuè xiàng",庶几:"shù jī",宫观:"gōng guàn",论处:"lùn chǔ",征辟:"zhēng bì",厚朴:"hòu pò",介壳:"jiè qiào",吭哧:"kēng chī",咯血:"kǎ xiě",铺陈:"pū chén",重生:"chóng shēng",乐理:"yuè lǐ",哀号:"āi háo",藏历:"zàng lì",刚劲:"gāng jìng",削平:"xuē píng",浓荫:"nóng yīn",城垛:"chéng duǒ",当差:"dāng chāi",正传:"zhèng zhuàn",并处:"bìng chǔ",创面:"chuāng miàn",旦角:"dàn jué",薄礼:"bó lǐ",晃荡:"huàng dang",臊子:"sào zi",家什:"jiā shí",闷头:"mēn tóu",美发:"měi fà",度数:"dù shu",着凉:"zháo liáng",闯将:"chuǎng jiàng",几案:"jī àn",姘头:"pīn tou",差数:"chā shù",散碎:"sǎn suì",壅塞:"yōng sè",寒颤:"hán zhàn",牵强:"qiān qiǎng",无间:"wú jiàn",轮转:"lún zhuàn",号叫:"háo jiào",铺排:"pū pái",降伏:"xiáng fú",轧钢:"zhá gāng",东阿:"dōng ē",病假:"bìng jià",累加:"lěi jiā",梗塞:"gěng sè",弹夹:"dàn jiā",钻心:"zuān xīn",晃眼:"huǎng yǎn",魔爪:"mó zhǎo",标量:"biāo liàng",憋闷:"biē mèn",猜度:"cāi duó",处士:"chǔ shì",官差:"guān chāi",讨还:"tǎo huán",长门:"cháng mén",馏分:"liú fēn",里弄:"lǐ lòng",色相:"sè xiàng",雅兴:"yǎ xìng",角力:"jué lì",弹坑:"dàn kēng",枝杈:"zhī chà",夹具:"jiā jù",处刑:"chǔ xíng",悍将:"hàn jiàng",好学:"hào xué",好好:"hǎo hǎo",银发:"yín fà",扫把:"sào bǎ",法相:"fǎ xiàng",贵干:"guì gàn",供气:"gōng qì",空余:"kòng yú",捆扎:"kǔn zā",瘠薄:"jí bó",浆糊:"jiàng hu",嘎吱:"gā zhī",调令:"diào lìng",法帖:"fǎ tiè",淋病:"lìn bìng",调派:"diào pài",转盘:"zhuàn pán",供稿:"gōng gǎo",差官:"chāi guān",忧闷:"yōu mèn",教长:"jiào zhǎng",重唱:"chóng chàng",酒兴:"jiǔ xìng",乐坛:"yuè tán",花呢:"huā ní",叱喝:"chì hè",膀臂:"bǎng bì",得空:"dé kòng",转圈:"zhuàn quān",横暴:"hèng bào",哄抬:"hōng tái",引吭:"yǐn háng",载货:"zài huò",中计:"zhòng jì",官长:"guān zhǎng",相面:"xiàng miàn",看头:"kàn tou",盼头:"pàn tou",意兴:"yì xìng",军乐:"jūn yuè",累次:"lěi cì",骨嘟:"gǔ dū",燕赵:"yān zhào",报丧:"bào sāng",弥撒:"mí sa",挨斗:"ái dòu",扁舟:"piān zhōu",丑角:"chǒu jué",吊丧:"diào sāng",强将:"qiáng jiàng",重奏:"chóng zòu",发辫:"fà biàn",着魔:"zháo mó",着法:"zhāo fǎ",盛放:"shèng fàng",填塞:"tián sè",凶横:"xiōng hèng",稽首:"qǐ shǒu",碑帖:"bēi tiè",冲量:"chōng liàng",发菜:"fà cài",假发:"jiǎ fà",翻卷:"fān juǎn",小量:"xiǎo liàng",胶着:"jiāo zhuó",里子:"lǐ zi",调调:"diào diao",散兵:"sǎn bīng",高挑:"gāo tiǎo",播撒:"bō sǎ",夹心:"jiā xīn",扇动:"shān dòng",叨扰:"tāo rǎo",霓裳:"ní cháng",捻子:"niǎn zi",弥缝:"mí féng",撒布:"sǎ bù",场院:"cháng yuàn",省亲:"xǐng qīn",提拉:"tí lā",惯量:"guàn liàng",强逼:"qiáng bī",强征:"qiáng zhēng",晕车:"yùn chē",数道:"shù dào",带累:"dài lèi",拓本:"tà běn",嫌恶:"xián wù",宿将:"sù jiàng",龟裂:"jūn liè",缠夹:"chán jiā",发式:"fà shì",隔扇:"gé shàn",天分:"tiān fèn",癖好:"pǐ hào",四通:"sì tōng",白术:"bái zhú",划伤:"huá shāng",角斗:"jué dòu",听差:"tīng chāi",岁差:"suì chā",丧礼:"sāng lǐ",脉脉:"mò mò",削瘦:"xuē shòu",撒播:"sǎ bō",莎草:"suō cǎo",犍为:"qián wéi",调头:"diào tóu",龙卷:"lóng juǎn",外调:"wài diào",字帖:"zì tiè",卷发:"juǎn fà",揣度:"chuǎi duó",洋相:"yáng xiàng",散光:"sǎn guāng",骨碌:"gū lu",薄命:"bó mìng",笼头:"lóng tóu",咽炎:"yān yán",碌碡:"liù zhou",片儿:"piàn er",纤手:"qiàn shǒu",散体:"sǎn tǐ",内省:"nèi xǐng",强留:"qiáng liú",解送:"jiè sòng",反间:"fǎn jiàn",少壮:"shào zhuàng",留空:"liú kōng",告假:"gào jià",咳血:"ké xuè",薄暮:"bó mù",铺轨:"pū guǐ",磨削:"mó xuē",治丧:"zhì sāng",叉子:"chā zi",哄动:"hōng dòng",蛾子:"é zi",出落:"chū luò",股长:"gǔ zhǎng",贵处:"guì chù",还魂:"huán hún",例假:"lì jià",刹住:"shā zhù",身量:"shēn liàng",同好:"tóng hào",模量:"mó liàng",更生:"gēng shēng",服丧:"fú sāng",率直:"shuài zhí",字模:"zì mú",散架:"sǎn jià",答腔:"dā qiāng",交恶:"jiāo wù",薄情:"bó qíng",眼泡:"yǎn pāo",袅娜:"niǎo nuó",草垛:"cǎo duò",冲劲:"chòng jìn",呢喃:"ní nán",切中:"qiè zhòng",挑灯:"tiǎo dēng",还愿:"huán yuàn",激将:"jī jiàng",更鼓:"gēng gǔ",没药:"mò yào",败兴:"bài xìng",切面:"qiē miàn",散户:"sǎn hù",累进:"lěi jìn",背带:"bēi dài",秤杆:"chèng gǎn",碾坊:"niǎn fáng",簿子:"bù zi",扳手:"bān shǒu",铅山:"yán shān",儒将:"rú jiàng",重光:"chóng guāng",剪发:"jiǎn fà",长上:"zhǎng shàng",小传:"xiǎo zhuàn",压轴:"yā zhòu",弱冠:"ruò guàn",花卷:"huā juǎn",横祸:"hèng huò",夹克:"jiā kè",光晕:"guāng yùn",披靡:"pī mǐ",对调:"duì diào",夹持:"jiā chí",空额:"kòng é",平调:"píng diào",铺床:"pū chuáng",丧钟:"sāng zhōng",作乐:"zuò lè",少府:"shào fǔ",数数:"shuò shuò",奔头:"bèn tou",进给:"jìn jǐ",率性:"shuài xìng",乐子:"lè zi",绑扎:"bǎng zā",挑唆:"tiǎo suō",漂洗:"piǎo xǐ",夹墙:"jiā qiáng",咳喘:"ké chuǎn",乜斜:"miē xie",错处:"cuò chù",闷酒:"mèn jiǔ",时调:"shí diào",重孙:"chóng sūn",经幢:"jīng chuáng",圩场:"xū chǎng",调门:"diào mén",花头:"huā tóu",划拉:"huá la",套色:"tào shǎi",粗率:"cū shuài",相率:"xiāng shuài",款识:"kuǎn zhì",吁请:"yù qǐng",荫蔽:"yīn bì",文蛤:"wén gé",嘀嗒:"dī dā",调取:"diào qǔ",交差:"jiāo chāi",落子:"luò zǐ",相册:"xiàng cè",絮叨:"xù dao",落发:"luò fà",异相:"yì xiàng",浸没:"jìn mò",角抵:"jué dǐ",卸载:"xiè zài",春卷:"chūn juǎn",扎挣:"zhá zheng",畜养:"xù yǎng",吡咯:"bǐ luò",垛子:"duò zi",恶少:"è shào",发际:"fà jì",红苕:"hóng sháo",糨糊:"jiàng hu",哭丧:"kū sāng",稍息:"shào xī",晕船:"yùn chuán",校样:"jiào yàng",外差:"wài chā",脚爪:"jiǎo zhǎo",铺展:"pū zhǎn",芫荽:"yán sui",夹紧:"jiā jǐn",尿泡:"suī pào",丧乱:"sāng luàn",凶相:"xiōng xiàng",华发:"huá fà",打场:"dǎ cháng",云量:"yún liàng",正切:"zhèng qiē",划拳:"huá quán",划艇:"huá tǐng",评传:"píng zhuàn",拉纤:"lā qiàn",句读:"jù dòu",散剂:"sǎn jì",骨殖:"gǔ shi",塞音:"sè yīn",铺叙:"pū xù",阏氏:"yān zhī",冷颤:"lěng zhàn",煞住:"shā zhù",少男:"shào nán",管乐:"guǎn yuè",号啕:"háo táo",纳降:"nà xiáng",拥塞:"yōng sè",万乘:"wàn shèng",杆儿:"gǎn ér",葛藤:"gé téng",簿籍:"bù jí",皮夹:"pí jiā",校准:"jiào zhǔn",允当:"yǔn dàng",器量:"qì liàng",选调:"xuǎn diào",扮相:"bàn xiàng",干才:"gàn cái",基干:"jī gàn",割切:"gē qiē",国乐:"guó yuè",卡壳:"qiǎ ké",辟谷:"bì gǔ",磨房:"mò fáng",咿呀:"yī yā",芥末:"jiè mo",薄技:"bó jì",产假:"chǎn jià",诗兴:"shī xìng",重出:"chóng chū",转椅:"zhuàn yǐ",酌量:"zhuó liang",簿册:"bù cè",藏青:"zàng qīng",的士:"dī shì",调人:"diào rén",解元:"jiè yuán",茎干:"jīng gàn",巨量:"jù liàng",榔头:"láng tou",率真:"shuài zhēn",喷香:"pèn xiāng",锁钥:"suǒ yuè",虾蟆:"há má",相图:"xiàng tú",兴会:"xìng huì",灶头:"zào tóu",重婚:"chóng hūn",钻洞:"zuān dòng",忖度:"cǔn duó",党参:"dǎng shēn",调温:"diào wēn",杆塔:"gān tǎ",葛布:"gé bù",拱券:"gǒng xuàn",夹生:"jiā shēng",露馅:"lòu xiàn",恰切:"qià qiè",散见:"sǎn jiàn",哨卡:"shào qiǎ",烫发:"tàng fà",体量:"tǐ liàng",挺括:"tǐng kuò",系带:"jì dài",相士:"xiàng shì",羊圈:"yáng juàn",转矩:"zhuàn jǔ",吧台:"bā tái",苍术:"cāng zhú",菲薄:"fěi bó",蛤蚧:"gé jiè",蛤蜊:"gé lí",瓜蔓:"guā wàn",怪相:"guài xiàng",临帖:"lín tiè",女红:"nǚ gōng",刨床:"bào chuáng",翘楚:"qiáo chǔ",数九:"shǔ jiǔ",谈兴:"tán xìng",雄劲:"xióng jìng",扎染:"zā rǎn",遮荫:"zhē yīn",周正:"zhōu zhèng",赚头:"zhuàn tou",扒手:"pá shǒu",搀和:"chān huo",诚朴:"chéng pǔ",肚量:"dù liàng",干结:"gān jié",工尺:"gōng chě",家累:"jiā lěi",曲水:"qū shuǐ",沙参:"shā shēn",挑花:"tiǎo huā",阿门:"ā mén",背篓:"bēi lǒu",瘪三:"biē sān",裁处:"cái chǔ",创痛:"chuāng tòng",福相:"fú xiàng",更动:"gēng dòng",豪兴:"háo xìng",还阳:"huán yáng",还嘴:"huán zuǐ",借调:"jiè diào",卷云:"juǎn yún",流弹:"liú dàn",想头:"xiǎng tou",削价:"xuē jià",校阅:"jiào yuè",雅量:"yǎ liàng",别传:"bié zhuàn",薄酒:"bó jiǔ",春假:"chūn jià",发妻:"fà qī",哗哗:"huā huā",宽绰:"kuān chuo",了悟:"liǎo wù",切花:"qiē huā",审度:"shěn duó",应许:"yīng xǔ",转台:"zhuàn tái",仔猪:"zǐ zhū",裁量:"cái liáng",藏戏:"zàng xì",乘兴:"chéng xìng",绸缪:"chóu móu",摧折:"cuī zhé",调经:"tiáo jīng",调职:"diào zhí",缝缀:"féng zhuì",骨朵:"gū duǒ",核儿:"hú er",恒量:"héng liàng",还价:"huán jià",浑朴:"hún pǔ",苦差:"kǔ chāi",面糊:"miàn hù",煞车:"shā chē",省视:"xǐng shì",什锦:"shí jǐn",信差:"xìn chāi",余切:"yú qiē",攒眉:"cuán méi",炸糕:"zhá gāo",钻杆:"zuàn gǎn",扒灰:"pá huī",拌和:"bàn huò",长调:"cháng diào",大溜:"dà liù",抖搂:"dǒu lōu",飞转:"fēi zhuàn",干仗:"gàn zhàng",好胜:"hào shèng",画片:"huà piàn",搅混:"jiǎo hún",螺杆:"luó gǎn",木模:"mù mú",怒号:"nù háo",频数:"pín shù",无宁:"wú níng",遗少:"yí shào",邮差:"yóu chāi",占卦:"zhān guà",占星:"zhān xīng",重审:"chóng shěn",自量:"zì liàng",调防:"diào fáng",发廊:"fà láng",反调:"fǎn diào",缝子:"fèng zi",更夫:"gēng fū",骨子:"gǔ zi",光杆:"guāng gǎn",夹棍:"jiā gùn",居丧:"jū sāng",巨贾:"jù gǔ",看押:"kān yā",空转:"kōng zhuàn",量力:"liàng lì",炮烙:"páo luò",赔还:"péi huán",扑扇:"pū shān",散记:"sǎn jì",散件:"sǎn jiàn",删削:"shān xuē",射干:"shè gàn",条几:"tiáo jī",偷空:"tōu kòng",削壁:"xuē bì",校核:"jiào hé",阴干:"yīn gān",择菜:"zhái cài",重九:"chóng jiǔ",主调:"zhǔ diào",自禁:"zì jīn",吧唧:"bā jī",便溺:"biàn niào",词调:"cí diào",叨咕:"dáo gu",落枕:"lào zhěn",铺砌:"pū qì",刷白:"shuà bái",委靡:"wěi mǐ",系泊:"xì bó",相马:"xiàng mǎ",熨帖:"yù tiē",转筋:"zhuàn jīn",棒喝:"bàng hè",傧相:"bīn xiàng",镐头:"gǎo tóu",间苗:"jiàn miáo",乐池:"yuè chí",卖相:"mài xiàng",屏弃:"bǐng qì",铅弹:"qiān dàn",切变:"qiē biàn",请调:"qǐng diào",群氓:"qún méng",散板:"sǎn bǎn",省察:"xǐng chá",事假:"shì jià",纤绳:"qiàn shéng",重影:"chóng yǐng",耕种:"gēng zhòng",种地:"zhòng dì",种菜:"zhòng cài",栽种:"zāi zhòng",接种:"jiē zhòng",垦种:"kěn zhòng",种殖:"zhòng zhí",种瓜:"zhòng guā",种豆:"zhòng dòu",种树:"zhòng shù",睡着:"shuì zháo",笼子:"lóng zi",重启:"chóng qǐ",重整:"chóng zhěng",重弹:"chóng tán",重足:"chóng zú",重山:"chóng shān",重游:"chóng yóu",重峦:"chóng luán",爷爷:"yé ye",奶奶:"nǎi nai",姥爷:"lǎo ye",爸爸:"bà ba",妈妈:"mā ma",婶婶:"shěn shen",舅舅:"jiù jiu",姑姑:"gū gu",叔叔:"shū shu",姨夫:"yí fu",舅母:"jiù mu",姑父:"gū fu",姐夫:"jiě fu",婆婆:"pó po",公公:"gōng gong",舅子:"jiù zi",姐姐:"jiě jie",哥哥:"gē ge",妹妹:"mèi mei",妹夫:"mèi fu",姨子:"yí zi",宝宝:"bǎo bao",娃娃:"wá wa",孩子:"hái zi",日子:"rì zi",样子:"yàng zi",狮子:"shī zi",身子:"shēn zi",架子:"jià zi",嫂子:"sǎo zi",鼻子:"bí zi",亭子:"tíng zi",折子:"zhé zi",面子:"miàn zi",脖子:"bó zi",辈子:"bèi zi",帽子:"mào zi",拍子:"pāi zi",柱子:"zhù zi",辫子:"biàn zi",鸽子:"gē zi",房子:"fáng zi",丸子:"wán zi",摊子:"tān zi",牌子:"pái zi",胡子:"hú zi",鬼子:"guǐ zi",矮子:"ǎi zi",鸭子:"yā zi",小子:"xiǎo zi",影子:"yǐng zi",屋子:"wū zi",对子:"duì zi",点子:"diǎn zi",本子:"běn zi",种子:"zhǒng zi",儿子:"ér zi",兔子:"tù zi",骗子:"piàn zi",院子:"yuàn zi",猴子:"hóu zi",嗓子:"sǎng zi",侄子:"zhí zi",柿子:"shì zi",钳子:"qián zi",虱子:"shī zi",瓶子:"píng zi",豹子:"bào zi",筷子:"kuài zi",篮子:"lán zi",绳子:"shéng zi",嘴巴:"zuǐ ba",耳朵:"ěr duo",茄子:"qié zi",蚌埠:"bèng bù",崆峒:"kōng tóng",琵琶:"pí pa",蘑菇:"mó gu",葫芦:"hú lu",狐狸:"hú li",桔子:"jú zi",盒子:"hé zi",桌子:"zhuō zi",竹子:"zhú zi",师傅:"shī fu",衣服:"yī fu",袜子:"wà zi",杯子:"bēi zi",刺猬:"cì wei",麦子:"mài zi",队伍:"duì wu",知了:"zhī liǎo",鱼儿:"yú er",馄饨:"hún tun",灯笼:"dēng long",庄稼:"zhuāng jia",聪明:"cōng ming",镜子:"jìng zi",银子:"yín zi",盘子:"pán zi",了却:"liǎo què",力气:"lì qi",席子:"xí zi",林子:"lín zi",朝霞:"zhāo xiá",朝夕:"zhāo xī",朝气:"zhāo qì",翅膀:"chì bǎng",省长:"shěng zhǎng",臧否:"zāng pǐ",否泰:"pǐ tài",变得:"biàn de",丈夫:"zhàng fu",豆腐:"dòu fu",笔杆:"bǐ gǎn",枞阳:"zōng yáng",行人:"xíng rén",打着:"dǎ zhe",第一:"dì yī",万一:"wàn yī",之一:"zhī yī",得之:"dé zhī",统一:"tǒng yī",唯一:"wéi yī",专一:"zhuān yī",单一:"dān yī",如一:"rú yī",其一:"qí yī",合一:"hé yī",逐一:"zhú yī",周一:"zhōu yī",初一:"chū yī",研一:"yán yī",归一:"guī yī",假一:"jiǎ yī",闻一:"wén yī",了了:"liǎo liǎo",公了:"gōng liǎo",私了:"sī liǎo",一月:"yī yuè",一号:"yī hào",一级:"yī jí",一等:"yī děng",一哥:"yī gē",月一:"yuè yī",一一:"yī yī",二一:"èr yī",三一:"sān yī",四一:"sì yī",五一:"wǔ yī",六一:"liù yī",七一:"qī yī",八一:"bā yī",九一:"jiǔ yī","一〇":"yī líng",一零:"yī líng",一二:"yī èr",一三:"yī sān",一四:"yī sì",一五:"yī wǔ",一六:"yī liù",一七:"yī qī",一八:"yī bā",一九:"yī jiǔ",一又:"yī yòu",一饼:"yī bǐng",一楼:"yī lóu",为例:"wéi lì",为准:"wéi zhǔn",沧海:"cāng hǎi",难为:"nán wéi",责难:"zé nàn",患难:"huàn nàn",磨难:"mó nàn",大难:"dà nàn",刁难:"diāo nàn",殉难:"xùn nàn",落难:"luò nàn",罹难:"lí nàn",灾难:"zāi nàn",难民:"nàn mín",苦难:"kǔ nàn",危难:"wēi nàn",发难:"fā nàn",逃难:"táo nàn",避难:"bì nàn",遇难:"yù nàn",阻难:"zǔ nàn",厄难:"è nàn",徇难:"xùn nàn",空难:"kōng nàn",喜欢:"xǐ huan",朝朝:"zhāo zhāo",不行:"bù xíng",轧轧:"yà yà",弯曲:"wān qū",扭曲:"niǔ qū",曲直:"qū zhí",委曲:"wěi qū",酒曲:"jiǔ qū",曲径:"qū jìng",曲解:"qū jiě",歪曲:"wāi qū",曲线:"qū xiàn",曲阜:"qū fù",九曲:"jiǔ qū",曲折:"qū zhé",曲肱:"qū gōng",曲意:"qū yì",仡佬:"gē lǎo"},Kne=Object.keys(BC).map(e=>({zh:e,pinyin:BC[e],probability:2e-8,length:2,priority:Mr.Normal,dict:Symbol("dict2")})),$C={为什么:"wèi shén me",实际上:"shí jì shang",检察长:"jiǎn chá zhǎng",干什么:"gàn shén me",这会儿:"zhè huì er",尽可能:"jǐn kě néng",董事长:"dǒng shì zhǎng",了不起:"liǎo bù qǐ",参谋长:"cān móu zhǎng",朝鲜族:"cháo xiǎn zú",海内外:"hǎi nèi wài",禁不住:"jīn bú zhù",柏拉图:"bó lā tú",不在乎:"bú zài hu",洛杉矶:"luò shān jī",有点儿:"yǒu diǎn er",迫击炮:"pǎi jī pào",不得了:"bù dé liǎo",马尾松:"mǎ wěi sōng",运输量:"yùn shū liàng",发脾气:"fā pí qi",士大夫:"shì dà fū",鸭绿江:"yā lù jiāng",压根儿:"yà gēn er",对得起:"duì de qǐ",那会儿:"nà huì er",自个儿:"zì gě er",物理量:"wù lǐ liàng",怎么着:"zěn me zhāo",明晃晃:"míng huǎng huǎng",节假日:"jié jià rì",心里话:"xīn lǐ huà",发行量:"fā xíng liàng",兴冲冲:"xìng chōng chōng",分子量:"fēn zǐ liàng",国子监:"guó zǐ jiàn",老大难:"lǎo dà nán",党内外:"dǎng nèi wài",这么着:"zhè me zhāo",少奶奶:"shào nǎi nai",暗地里:"àn dì lǐ",更年期:"gēng nián qī",工作量:"gōng zuò liàng",背地里:"bèi dì lǐ",山里红:"shān li hóng",好好儿:"hǎo hāo er",交响乐:"jiāo xiǎng yuè",好意思:"hǎo yì si",吐谷浑:"tǔ yù hún",没意思:"méi yì si",理发师:"lǐ fà shī",塔什干:"tǎ shí gān",充其量:"chōng qí liàng",靠得住:"kào de zhù",车行道:"chē xíng dào",人行道:"rén xíng dào",中郎将:"zhōng láng jiàng",照明弹:"zhào míng dàn",烟幕弹:"yān mù dàn",没奈何:"mò nài hé",乱哄哄:"luàn hōng hōng",惠更斯:"huì gēng sī",载重量:"zài zhòng liàng",瞧得起:"qiáo de qǐ",纪传体:"jì zhuàn tǐ",阿房宫:"ē páng gōng",卷心菜:"juǎn xīn cài",戏班子:"xì bān zi",过得去:"guò de qù",花岗石:"huā gāng shí",外甥女:"wài sheng nǚ",团团转:"tuán tuán zhuàn",大堡礁:"dà bǎo jiāo",燃烧弹:"rán shāo dàn",劳什子:"láo shí zi",摇滚乐:"yáo gǔn yuè",夹竹桃:"jiā zhú táo",闹哄哄:"nào hōng hōng",三连冠:"sān lián guàn",重头戏:"zhòng tóu xì",二人转:"èr rén zhuàn",节骨眼:"jiē gǔ yǎn",知识面:"zhī shi miàn",护士长:"hù shi zhǎng",信号弹:"xìn hào dàn",干电池:"gān diàn chí",枪杆子:"qiāng gǎn zi",哭丧棒:"kū sāng bàng",鼻咽癌:"bí yān ái",瓦岗军:"wǎ gāng jūn",买得起:"mǎi de qǐ",癞蛤蟆:"lài há ma",脊梁骨:"jǐ liang gǔ",子母弹:"zǐ mǔ dàn",开小差:"kāi xiǎo chāi",女强人:"nǚ qiáng rén",英雄传:"yīng xióng zhuàn",爵士乐:"jué shì yuè",说笑话:"shuō xiào hua",碰头会:"pèng tóu huì",玻璃钢:"bō li gāng",曳光弹:"yè guāng dàn",少林拳:"shào lín quán",咏叹调:"yǒng tàn diào",少先队:"shào xiān duì",灵长目:"líng zhǎng mù",对着干:"duì zhe gàn",蒙蒙亮:"méng méng liàng",软骨头:"ruǎn gǔ tou",铺盖卷:"pū gài juǎn",和稀泥:"huò xī ní",背黑锅:"bēi hēi guō",红彤彤:"hóng tōng tōng",武侯祠:"wǔ hóu cí",打哆嗦:"dǎ duō suo",户口簿:"hù kǒu bù",马尾藻:"mǎ wěi zǎo",夜猫子:"yè māo zi",打手势:"dǎ shǒu shì",龙王爷:"lóng wáng yé",气头上:"qì tóu shang",糊涂虫:"hú tu chóng",笔杆子:"bǐ gǎn zi",占便宜:"zhàn pián yi",打主意:"dǎ zhǔ yì",多弹头:"duō dàn tóu",露一手:"lòu yì shǒu",堰塞湖:"yàn sè hú",保得住:"bǎo de zhù",趵突泉:"bào tū quán",奥得河:"ào de hé",司务长:"sī wù zhǎng",禁不起:"jīn bù qǐ",什刹海:"shí chà hǎi",莲花落:"lián huā lào",见世面:"jiàn shì miàn",豁出去:"huō chū qù",电位差:"diàn wèi chā",挨个儿:"āi gè er",那阵儿:"nà zhèn er",肺活量:"fèi huó liàng",大师傅:"dà shī fu",掷弹筒:"zhì dàn tǒng",打呼噜:"dǎ hū lu",广渠门:"ān qú mén",未见得:"wèi jiàn dé",大婶儿:"dà shěn er",谈得来:"tán de lái",脚丫子:"jiǎo yā zi",空包弹:"kōng bāo dàn",窝里斗:"wō li dòu",弹着点:"dàn zhuó diǎn",个头儿:"gè tóu er",看得起:"kàn de qǐ",糊涂账:"hú tu zhàng",大猩猩:"dà xīng xing",禁得起:"jīn de qǐ",法相宗:"fǎ xiàng zōng",可怜相:"kě lián xiàng",吃得下:"chī de xià",汉堡包:"hàn bǎo bāo",闹嚷嚷:"nào rāng rāng",数来宝:"shǔ lái bǎo",合得来:"hé de lái",干性油:"gān xìng yóu",闷葫芦:"mèn hú lu",呱呱叫:"guā guā jiào",西洋参:"xī yáng shēn",林荫道:"lín yīn dào",拉家常:"lā jiā cháng",卷铺盖:"juǎn pū gài",过得硬:"guò de yìng",飞将军:"fēi jiāng jūn",挑大梁:"tiǎo dà liáng",哈巴狗:"hǎ ba gǒu",过家家:"guò jiā jiā",催泪弹:"cuī lèi dàn",雨夹雪:"yǔ jiā xuě",敲竹杠:"qiāo zhú gàng",列车长:"liè chē zhǎng",华达呢:"huá dá ní",犯得着:"fàn de zháo",土疙瘩:"tǔ gē da",煞风景:"shā fēng jǐng",轻量级:"qīng liàng jí",羞答答:"xiū dā dā",石子儿:"shí zǐ er",达姆弹:"dá mǔ dàn",科教片:"kē jiào piān",侃大山:"kǎn dà shān",丁点儿:"dīng diǎn er",吃得消:"chī de xiāo",捋虎须:"luō hǔ xū",高丽参:"gāo lí shēn",众生相:"zhòng shēng xiàng",咽峡炎:"yān xiá yán",禁得住:"jīn de zhù",吃得开:"chī de kāi",柞丝绸:"zuò sī chóu",应声虫:"yìng shēng chóng",数得着:"shǔ de zháo",傻劲儿:"shǎ jìn er",铅玻璃:"qiān bō li",可的松:"kě dì sōng",划得来:"huá de lái",晕乎乎:"yūn hū hū",屎壳郎:"shǐ ke làng",尥蹶子:"liào juě zi",藏红花:"zàng hóng huā",闷罐车:"mèn guàn chē",卡脖子:"qiǎ bó zi",红澄澄:"hóng deng deng",赶得及:"gǎn de jí",当间儿:"dāng jiàn er",露马脚:"lòu mǎ jiǎo",鸡内金:"jī nèi jīn",犯得上:"fàn de shàng",钉齿耙:"dīng chǐ bà",饱和点:"bǎo hé diǎn",龙爪槐:"lóng zhǎo huái",喝倒彩:"hè dào cǎi",定冠词:"dìng guàn cí",担担面:"dàn dan miàn",吃得住:"chī de zhù",爪尖儿:"zhuǎ jiān er",支着儿:"zhī zhāo er",折跟头:"zhē gēn tou",阴着儿:"yīn zhāo er",烟卷儿:"yān juǎn er",宣传弹:"xuān chuán dàn",信皮儿:"xìn pí er",弦切角:"xián qiē jiǎo",缩砂密:"sù shā mì",说得来:"shuō de lái",水漂儿:"shuǐ piāo er",耍笔杆:"shuǎ bǐ gǎn",数得上:"shǔ de shàng",数不着:"shǔ bù zháo",数不清:"shǔ bù qīng",什件儿:"shí jiàn er",生死簿:"shēng sǐ bù",扇风机:"shān fēng jī",撒呓挣:"sā yì zheng",日记簿:"rì jì bù",热得快:"rè de kuài",亲家公:"qìng jia gōng",奇函数:"jī hán shù",拍纸簿:"pāi zhǐ bù",努劲儿:"nǔ jìn er",泥娃娃:"ní wá wa",内切圆:"nèi qiē yuán",哪会儿:"nǎ huì er",闷头儿:"mēn tóu er",没谱儿:"méi pǔ er",铆劲儿:"mǎo jìn er",溜肩膀:"liū jiān bǎng",了望台:"liào wàng tái",老来少:"lǎo lái shào",坤角儿:"kūn jué er",考勤簿:"kǎo qín bù",卷笔刀:"juǎn bǐ dāo",进给量:"jìn jǐ liàng",划不来:"huá bù lái",汗褂儿:"hàn guà er",鼓囊囊:"gǔ nāng nāng",够劲儿:"gòu jìn er",公切线:"gōng qiē xiàn",搁得住:"gé de zhù",赶浪头:"gǎn làng tóu",赶得上:"gǎn de shàng",干酵母:"gān jiào mǔ",嘎渣儿:"gā zhā er",嘎嘣脆:"gā bēng cuì",对得住:"duì de zhù",逗闷子:"dòu mèn zi",顶呱呱:"dǐng guā guā",滴溜儿:"dī liù er",大轴子:"dà zhòu zi",打板子:"dǎ bǎn zi",寸劲儿:"cùn jìn er",醋劲儿:"cù jìn er",揣手儿:"chuāi shǒu er",冲劲儿:"chòng jìn er",吃得来:"chī de lái",不更事:"bù gēng shì",奔头儿:"bèn tou er",百夫长:"bǎi fū zhǎng",娃娃亲:"wá wa qīn",死劲儿:"sǐ jìn er",骨朵儿:"gū duǒ er",功劳簿:"gōng láo bù",都江堰:"dū jiāng yàn",一担水:"yí dàn shuǐ",否极泰:"pǐ jí tài",泰来否:"tài lái pǐ",咳特灵:"ké tè líng",开户行:"kāi hù háng",郦食其:"lì yì jī",花事了:"huā shì liǎo",一更更:"yì gēng gēng",一重山:"yì chóng shān",风一更:"fēng yì gēng",雪一更:"xuě yì gēng",归一码:"guī yì mǎ",星期一:"xīng qī yī",礼拜一:"lǐ bài yī",一季度:"yī jì dù",一月一:"yī yuè yī",一字马:"yī zì mǎ",一是一:"yī shì yī",一次方:"yī cì fāng",一阳指:"yī yáng zhǐ",一字决:"yī zì jué",一年级:"yī nián jí",一不做:"yī bú zuò",屈戌儿:"qū qu ér",难为水:"nán wéi shuǐ",难为情:"nán wéi qíng",行一行:"xíng yì háng",别别的:"biè bié de",干哪行:"gàn nǎ háng",干一行:"gàn yì háng",曲别针:"qū bié zhēn"},Vne=Object.keys($C).map(e=>({zh:e,pinyin:$C[e],probability:2e-8,length:3,priority:Mr.Normal,dict:Symbol("dict3")})),DC={成吉思汗:"chéng jí sī hán",四通八达:"sì tōng bā dá",一模一样:"yì mú yí yàng",青藏高原:"qīng zàng gāo yuán",阿弥陀佛:"ē mí tuó fó",解放思想:"jiè fàng sī xiǎng",所作所为:"suǒ zuò suǒ wéi",迷迷糊糊:"mí mí hu hū",荷枪实弹:"hè qiāng shí dàn",兴高采烈:"xìng gāo cǎi liè",无能为力:"wú néng wéi lì",布鲁塞尔:"bù lǔ sài ěr",为所欲为:"wéi suǒ yù wéi",克什米尔:"kè shí mǐ ěr",没完没了:"méi wán méi liǎo",不为人知:"bù wéi rén zhī",结结巴巴:"jiē jiē bā bā",前仆后继:"qián pū hòu jì",铺天盖地:"pū tiān gài dì",直截了当:"zhí jié liǎo dàng",供不应求:"gōng bú yìng qiú",御史大夫:"yù shǐ dà fū",不为瓦全:"bù wéi wǎ quán",不可收拾:"bù kě shōu shi",胡作非为:"hú zuò fēi wéi",分毫不差:"fēn háo bú chà",模模糊糊:"mó mó hu hū",不足为奇:"bù zú wéi qí",悄无声息:"qiǎo wú shēng xī",了如指掌:"liǎo rú zhǐ zhǎng",深恶痛绝:"shēn wù tòng jué",高高兴兴:"gāo gāo xìng xìng",唉声叹气:"āi shēng tàn qì",汉藏语系:"hàn zàng yǔ xì",处心积虑:"chǔ xīn jī lǜ",泣不成声:"qì bù chéng shēng",半夜三更:"bàn yè sān gēng",失魂落魄:"shī hún luò pò",二十八宿:"èr shí bā xiù",转来转去:"zhuàn lái zhuàn qù",数以万计:"shǔ yǐ wàn jì",相依为命:"xiāng yī wéi mìng",恋恋不舍:"liàn liàn bù shě",屈指可数:"qū zhǐ kě shǔ",神出鬼没:"shén chū guǐ mò",结结实实:"jiē jiē shí shí",有的放矢:"yǒu dì fàng shǐ",叽哩咕噜:"jī lǐ gū lū",调兵遣将:"diào bīng qiǎn jiàng",载歌载舞:"zài gē zài wǔ",转危为安:"zhuǎn wēi wéi ān",踏踏实实:"tā tā shi shí",桑给巴尔:"sāng jǐ bā ěr",装模作样:"zhuāng mú zuò yàng",见义勇为:"jiàn yì yǒng wéi",相差无几:"xiāng chā wú jǐ",叹为观止:"tàn wéi guān zhǐ",闷闷不乐:"mèn mèn bú lè",喜怒哀乐:"xǐ nù āi lè",鲜为人知:"xiǎn wéi rén zhī",张牙舞爪:"zhāng yá wǔ zhǎo",为非作歹:"wéi fēi zuò dǎi",含糊其辞:"hán hú qí cí",疲于奔命:"pí yú bēn mìng",勉为其难:"miǎn wéi qí nán",依依不舍:"yī yī bù shě",顶头上司:"dǐng tóu shàng si",不着边际:"bù zhuó biān jì",大模大样:"dà mú dà yàng",寻欢作乐:"xún huān zuò lè",一走了之:"yì zǒu liǎo zhī",字里行间:"zì lǐ háng jiān",含含糊糊:"hán hán hu hū",恰如其分:"qià rú qí fèn",破涕为笑:"pò tì wéi xiào",深更半夜:"shēn gēng bàn yè",千差万别:"qiān chā wàn bié",数不胜数:"shǔ bú shèng shǔ",据为己有:"jù wéi jǐ yǒu",天旋地转:"tiān xuán dì zhuàn",养尊处优:"yǎng zūn chǔ yōu",玻璃纤维:"bō li xiān wéi",吵吵闹闹:"chāo chao nào nào",晕头转向:"yūn tóu zhuàn xiàng",土生土长:"tǔ shēng tǔ zhǎng",宁死不屈:"nìng sǐ bù qū",不省人事:"bù xǐng rén shì",尽力而为:"jìn lì ér wéi",精明强干:"jīng míng qiáng gàn",唠唠叨叨:"láo lao dāo dāo",叽叽喳喳:"jī ji zhā zhā",功不可没:"gōng bù kě mò",锲而不舍:"qiè ér bù shě",排忧解难:"pái yōu jiě nàn",稀里糊涂:"xī li hú tú",各有所长:"gè yǒu suǒ cháng",的的确确:"dí dí què què",哄堂大笑:"hōng táng dà xiào",听而不闻:"tīng ér bù wén",刀耕火种:"dāo gēng huǒ zhòng",内分泌腺:"nèi fèn mì xiàn",化险为夷:"huà xiǎn wéi yí",百发百中:"bǎi fā bǎi zhòng",重见天日:"chóng jiàn tiān rì",反败为胜:"fǎn bài wéi shèng",一了百了:"yì liǎo bǎi liǎo",大大咧咧:"dà da liē liē",心急火燎:"xīn jí huǒ liǎo",粗心大意:"cū xīn dà yi",鸡皮疙瘩:"jī pí gē da",夷为平地:"yí wéi píng dì",日积月累:"rì jī yuè lěi",设身处地:"shè shēn chǔ dì",投其所好:"tóu qí suǒ hào",间不容发:"jiān bù róng fà",人满为患:"rén mǎn wéi huàn",穷追不舍:"qióng zhuī bù shě",为时已晚:"wéi shí yǐ wǎn",如数家珍:"rú shǔ jiā zhēn",心里有数:"xīn lǐ yǒu shù",以牙还牙:"yǐ yá huán yá",神不守舍:"shén bù shǒu shě",孟什维克:"mèng shí wéi kè",各自为战:"gè zì wéi zhàn",怨声载道:"yuàn shēng zài dào",救苦救难:"jiù kǔ jiù nàn",好好先生:"hǎo hǎo xiān sheng",怪模怪样:"guài mú guài yàng",抛头露面:"pāo tóu lù miàn",游手好闲:"yóu shǒu hào xián",无所不为:"wú suǒ bù wéi",调虎离山:"diào hǔ lí shān",步步为营:"bù bù wéi yíng",好大喜功:"hào dà xǐ gōng",众矢之的:"zhòng shǐ zhī dì",长生不死:"cháng shēng bù sǐ",蔚为壮观:"wèi wéi zhuàng guān",不可胜数:"bù kě shèng shǔ",鬼使神差:"guǐ shǐ shén chāi",洁身自好:"jié shēn zì hào",敢作敢为:"gǎn zuò gǎn wéi",茅塞顿开:"máo sè dùn kāi",走马换将:"zǒu mǎ huàn jiàng",为时过早:"wéi shí guò zǎo",为人师表:"wéi rén shī biǎo",阴差阳错:"yīn chā yáng cuò",油腔滑调:"yóu qiāng huá diào",重蹈覆辙:"chóng dǎo fù zhé",骂骂咧咧:"mà ma liē liē",絮絮叨叨:"xù xù dāo dāo",如履薄冰:"rú lǚ bó bīng",损兵折将:"sǔn bīng zhé jiàng",拐弯抹角:"guǎi wān mò jiǎo",像模像样:"xiàng mú xiàng yàng",供过于求:"gōng guò yú qiú",开花结果:"kāi huā jiē guǒ",仔仔细细:"zǐ zǐ xì xì",川藏公路:"chuān zàng gōng lù",河北梆子:"hé běi bāng zi",长年累月:"cháng nián lěi yuè",正儿八经:"zhèng er bā jīng",不识抬举:"bù shí tái ju",重振旗鼓:"chóng zhèn qí gǔ",气息奄奄:"qì xī yān yān",紧追不舍:"jǐn zhuī bù shě",服服帖帖:"fú fu tiē tiē",强词夺理:"qiǎng cí duó lǐ",噼里啪啦:"pī li pā lā",人才济济:"rén cái jǐ jǐ",发人深省:"fā rén shēn xǐng",不足为凭:"bù zú wéi píng",为富不仁:"wéi fù bù rén",连篇累牍:"lián piān lěi dú",呼天抢地:"hū tiān qiāng dì",落落大方:"luò luò dà fāng",自吹自擂:"zì chuī zì léi",乐善好施:"lè shàn hào shī",以攻为守:"yǐ gōng wéi shǒu",磨磨蹭蹭:"mó mó cèng cèng",削铁如泥:"xuē tiě rú ní",助纣为虐:"zhù zhòu wéi nüè",以退为进:"yǐ tuì wéi jìn",嘁嘁喳喳:"qī qī chā chā",枪林弹雨:"qiāng lín dàn yǔ",令人发指:"lìng rén fà zhǐ",转败为胜:"zhuǎn bài wéi shèng",转弯抹角:"zhuǎn wān mò jiǎo",在劫难逃:"zài jié nán táo",正当防卫:"zhèng dàng fáng wèi",不足为怪:"bù zú wéi guài",难兄难弟:"nàn xiōng nàn dì",咿咿呀呀:"yī yī yā yā",弹尽粮绝:"dàn jìn liáng jué",阿谀奉承:"ē yú fèng chéng",稀里哗啦:"xī li huā lā",返老还童:"fǎn lǎo huán tóng",好高骛远:"hào gāo wù yuǎn",鹿死谁手:"lù sǐ shéi shǒu",差强人意:"chā qiáng rén yì",大吹大擂:"dà chuī dà léi",成家立业:"chéng jiā lì yè",自怨自艾:"zì yuàn zì yì",负债累累:"fù zhài lěi lěi",古为今用:"gǔ wéi jīn yòng",入土为安:"rù tǔ wéi ān",下不为例:"xià bù wéi lì",一哄而上:"yì hōng ér shàng",没头苍蝇:"méi tóu cāng ying",天差地远:"tiān chā dì yuǎn",风卷残云:"fēng juǎn cán yún",多灾多难:"duō zāi duō nàn",乳臭未干:"rǔ xiù wèi gān",行家里手:"háng jiā lǐ shǒu",狼狈为奸:"láng bèi wéi jiān",处变不惊:"chǔ biàn bù jīng",一唱一和:"yí chàng yí hè",一念之差:"yí niàn zhī chā",金蝉脱壳:"jīn chán tuō qiào",滴滴答答:"dī dī dā dā",硕果累累:"shuò guǒ léi léi",好整以暇:"hào zhěng yǐ xiá",红得发紫:"hóng de fā zǐ",传为美谈:"chuán wéi měi tán",富商大贾:"fù shāng dà gǔ",四海为家:"sì hǎi wéi jiā",了若指掌:"liǎo ruò zhǐ zhǎng",大有可为:"dà yǒu kě wéi",出头露面:"chū tóu lù miàn",鼓鼓囊囊:"gǔ gu nāng nāng",窗明几净:"chuāng míng jī jìng",泰然处之:"tài rán chǔ zhī",怒发冲冠:"nù fà chōng guān",有机玻璃:"yǒu jī bō li",骨头架子:"gǔ tou jià zi",义薄云天:"yì bó yún tiān",一丁点儿:"yī dīng diǎn er",时来运转:"shí lái yùn zhuǎn",陈词滥调:"chén cí làn diào",化整为零:"huà zhěng wéi líng",火烧火燎:"huǒ shāo huǒ liǎo",干脆利索:"gàn cuì lì suǒ",吊儿郎当:"diào er láng dāng",广种薄收:"guǎng zhòng bó shōu",种瓜得瓜:"zhòng guā dé guā",种豆得豆:"zhòng dòu dé dòu",难舍难分:"nán shě nán fēn",歃血为盟:"shà xuè wéi méng",奋发有为:"fèn fā yǒu wéi",阴错阳差:"yīn cuò yáng chā",东躲西藏:"dōng duǒ xī cáng",烟熏火燎:"yān xūn huǒ liǎo",钻牛角尖:"zuān niú jiǎo jiān",乔装打扮:"qiáo zhuāng dǎ bàn",改弦更张:"gǎi xián gēng zhāng",河南梆子:"hé nán bāng zi",好吃懒做:"hào chī lǎn zuò",何乐不为:"hé lè bù wéi",大出风头:"dà chū fēng tóu",攻城掠地:"gōng chéng lüè dì",漂漂亮亮:"piào piào liang liang",折衷主义:"zhé zhōng zhǔ yì",大马哈鱼:"dà mǎ hǎ yú",绿树成荫:"lǜ shù chéng yīn",率先垂范:"shuài xiān chuí fàn",家长里短:"jiā cháng lǐ duǎn",宽大为怀:"kuān dà wéi huái",左膀右臂:"zuǒ bǎng yòu bì",一笑了之:"yí xiào liǎo zhī",天下为公:"tiān xià wéi gōng",还我河山:"huán wǒ hé shān",何足为奇:"hé zú wéi qí",好自为之:"hǎo zì wéi zhī",风姿绰约:"fēng zī chuò yuē",大雨滂沱:"dà yǔ pāng tuó",传为佳话:"chuán wéi jiā huà",吃里扒外:"chī lǐ pá wài",重操旧业:"chóng cāo jiù yè",小家子气:"xiǎo jiā zi qì",少不更事:"shào bù gēng shì",难分难舍:"nán fēn nán shě",添砖加瓦:"tiān zhuān jiā wǎ",是非分明:"shì fēi fēn míng",舍我其谁:"shě wǒ qí shuí",偏听偏信:"piān tīng piān xìn",量入为出:"liàng rù wéi chū",降龙伏虎:"xiáng lóng fú hǔ",钢化玻璃:"gāng huà bō li",正中下怀:"zhèng zhòng xià huái",以身许国:"yǐ shēn xǔ guó",一语中的:"yì yǔ zhòng dì",丧魂落魄:"sàng hún luò pò",三座大山:"sān zuò dà shān",济济一堂:"jǐ jǐ yì táng",好事之徒:"hào shì zhī tú",干净利索:"gàn jìng lì suǒ",出将入相:"chū jiàng rù xiàng",袅袅娜娜:"niǎo niǎo nuó nuó",狐狸尾巴:"hú li wěi ba",好逸恶劳:"hào yì wù láo",大而无当:"dà ér wú dàng",打马虎眼:"dǎ mǎ hu yǎn",板上钉钉:"bǎn shàng dìng dīng",吆五喝六:"yāo wǔ hè liù",虾兵蟹将:"xiā bīng xiè jiàng",水调歌头:"shuǐ diào gē tóu",数典忘祖:"shǔ diǎn wàng zǔ",人事不省:"rén shì bù xǐng",曲高和寡:"qǔ gāo hè guǎ",屡教不改:"lǚ jiào bù gǎi",互为因果:"hù wéi yīn guǒ",互为表里:"hù wéi biǎo lǐ",厚此薄彼:"hòu cǐ bó bǐ",过关斩将:"guò guān zhǎn jiàng",疙疙瘩瘩:"gē ge dā dā",大腹便便:"dà fù pián pián",走为上策:"zǒu wéi shàng cè",冤家对头:"yuān jia duì tóu",有隙可乘:"yǒu xì kě chèng",一鳞半爪:"yì lín bàn zhǎo",片言只语:"piàn yán zhǐ yǔ",开花结实:"kāi huā jié shí",经年累月:"jīng nián lěi yuè",含糊其词:"hán hú qí cí",寡廉鲜耻:"guǎ lián xiǎn chǐ",成年累月:"chéng nián lěi yuè",不徇私情:"bú xùn sī qíng",不当人子:"bù dāng rén zǐ",膀大腰圆:"bǎng dà yāo yuán",指腹为婚:"zhǐ fù wéi hūn",这么点儿:"zhè me diǎn er",意兴索然:"yì xīng suǒ rán",绣花枕头:"xiù huā zhěn tou",无的放矢:"wú dì fàng shǐ",望闻问切:"wàng wén wèn qiè",舍己为人:"shě jǐ wèi rén",穷年累月:"qióng nián lěi yuè",排难解纷:"pái nàn jiě fēn",处之泰然:"chǔ zhī tài rán",指鹿为马:"zhǐ lù wéi mǎ",危如累卵:"wēi rú lěi luǎn",天兵天将:"tiān bīng tiān jiàng",舍近求远:"shě jìn qiú yuǎn",南腔北调:"nán qiāng běi diào",苦中作乐:"kǔ zhōng zuò lè",厚积薄发:"hòu jī bó fā",臭味相投:"xiù wèi xiāng tóu",长幼有序:"zhǎng yòu yǒu xù",逼良为娼:"bī liáng wéi chāng",悲悲切切:"bēi bēi qiè qiē",败军之将:"bài jūn zhī jiàng",欺行霸市:"qī háng bà shì",削足适履:"xuē zú shì lǚ",先睹为快:"xiān dǔ wéi kuài",啼饥号寒:"tí jī háo hán",疏不间亲:"shū bú jiàn qīn",神差鬼使:"shén chāi guǐ shǐ",敲敲打打:"qiāo qiāo dǎ dǎ",平铺直叙:"píng pū zhí xù",没头没尾:"méi tóu mò wěi",寥寥可数:"liáo liáo kě shǔ",哼哈二将:"hēng hā èr jiàng",鹤发童颜:"hè fà tóng yán",各奔前程:"gè bèn qián chéng",弹无虚发:"dàn wú xū fā",大人先生:"dà rén xiān sheng",与民更始:"yǔ mín gēng shǐ",树碑立传:"shù bēi lì zhuàn",是非得失:"shì fēi dé shī",实逼处此:"shí bī chǔ cǐ",塞翁失马:"sài wēng shī mǎ",日薄西山:"rì bó xī shān",切身体会:"qiè shēn tǐ huì",片言只字:"piàn yán zhǐ zì",跑马卖解:"pǎo mǎ mài xiè",宁折不弯:"nìng zhé bù wān",零零散散:"líng líng sǎn sǎn",量体裁衣:"liàng tǐ cái yī",连中三元:"lián zhòng sān yuán",礼崩乐坏:"lǐ bēng yuè huài",不为已甚:"bù wéi yǐ shèn",转悲为喜:"zhuǎn bēi wéi xǐ",以眼还眼:"yǐ yǎn huán yǎn",蔚为大观:"wèi wéi dà guān",未为不可:"wèi wéi bù kě",童颜鹤发:"tóng yán hè fà",朋比为奸:"péng bǐ wéi jiān",莫此为甚:"mò cǐ wéi shèn",夹枪带棒:"jiā qiāng dài bàng",富商巨贾:"fù shāng jù jiǎ",淡然处之:"dàn rán chǔ zhī",箪食壶浆:"dān shí hú jiāng",创巨痛深:"chuāng jù tòng shēn",草长莺飞:"cǎo zhǎng yīng fēi",坐视不救:"zuò shī bú jiù",以己度人:"yǐ jǐ duó rén",随行就市:"suí háng jiù shì",文以载道:"wén yǐ zài dào",文不对题:"wén bú duì tí",铁板钉钉:"tiě bǎn dìng dīng",身体发肤:"shēn tǐ fà fū",缺吃少穿:"quē chī shǎo chuān",目无尊长:"mù wú zūn zhǎng",吉人天相:"jí rén tiān xiàng",毁家纾难:"huǐ jiā shū nàn",钢筋铁骨:"gāng jīn tiě gǔ",丢卒保车:"diū zú bǎo jū",丢三落四:"diū sān là sì",闭目塞听:"bì mù sè tīng",削尖脑袋:"xuē jiān nǎo dài",为非作恶:"wéi fēi zuò è",人才难得:"rén cái nán dé",情非得已:"qíng fēi dé yǐ",切中要害:"qiè zhòng yào hài",火急火燎:"huǒ jí huǒ liǎo",画地为牢:"huà dì wéi láo",好酒贪杯:"hào jiǔ tān bēi",长歌当哭:"cháng gē dàng kū",载沉载浮:"zài chén zài fú",遇难呈祥:"yù nàn chéng xiáng",榆木疙瘩:"yú mù gē da",以邻为壑:"yǐ lín wéi hè",洋为中用:"yáng wéi zhōng yòng",言为心声:"yán wéi xīn shēng",言必有中:"yán bì yǒu zhòng",图穷匕见:"tú qióng bǐ xiàn",滂沱大雨:"páng tuó dà yǔ",目不暇给:"mù bù xiá jǐ",量才录用:"liàng cái lù yòng",教学相长:"jiào xué xiāng zhǎng",悔不当初:"huǐ bù dāng chū",呼幺喝六:"hū yāo hè liù",不足为训:"bù zú wéi xùn",不拘形迹:"bù jū xíng jī",傍若无人:"páng ruò wú rén",罪责难逃:"zuì zé nán táo",自我吹嘘:"zì wǒ chuī xū",转祸为福:"zhuǎn huò wéi fú",勇冠三军:"yǒng guàn sān jūn",易地而处:"yì dì ér chǔ",卸磨杀驴:"xiè mò shā lǘ",玩儿不转:"wán ér bú zhuàn",天道好还:"tiān dào hǎo huán",身单力薄:"shēn dān lì bó",撒豆成兵:"sǎ dòu chéng bīng",片纸只字:"piàn zhǐ zhī zì",宁缺毋滥:"nìng quē wú làn",没没无闻:"mò mò wú wén",量力而为:"liàng lì ér wéi",历历可数:"lì lì kě shǔ",口碑载道:"kǒu bēi zài dào",君子好逑:"jūn zǐ hǎo qiú",好为人师:"hào wéi rén shī",豪商巨贾:"háo shāng jù jiǎ",各有所好:"gè yǒu suǒ hào",度德量力:"duó dé liàng lì",指天为誓:"zhǐ tiān wéi shì",逸兴遄飞:"yì xìng chuán fēi",心宽体胖:"xīn kuān tǐ pán",为德不卒:"wéi dé bù zú",天下为家:"tiān xià wéi jiā",视为畏途:"shì wéi wèi tú",三灾八难:"sān zāi bā nàn",沐猴而冠:"mù hóu ér guàn",哩哩啦啦:"lī li lā lā",见缝就钻:"jiàn fèng jiù zuān",夹层玻璃:"jiā céng bō li",急公好义:"jí gōng hào yì",积年累月:"jī nián lěi yuè",划地为牢:"huá dì wéi láo",更名改姓:"gēng míng gǎi xìng",奉为圭臬:"fèng wéi guī niè",多难兴邦:"duō nàn xīng bāng",不破不立:"bú pò bú lì",坐地自划:"zuò dì zì huá",坐不重席:"zuò bù chóng xí",坐不窥堂:"zuò bù kuī táng",作嫁衣裳:"zuò jià yī shang",左枝右梧:"zuǒ zhī yòu wú",左宜右有:"zuǒ yí yòu yǒu",钻头觅缝:"zuān tóu mì fèng",钻天打洞:"zuān tiān dǎ dòng",钻皮出羽:"zuān pí chū yǔ",钻火得冰:"zuān huǒ dé bīng",钻洞觅缝:"zuàn dòng mì féng",钻冰求火:"zuān bīng qiú huǒ",子为父隐:"zǐ wéi fù yǐn",擢发难数:"zhuó fà nán shǔ",着人先鞭:"zhuó rén xiān biān",斫雕为朴:"zhuó diāo wéi pǔ",锥处囊中:"zhuī chǔ náng zhōng",椎心饮泣:"chuí xīn yǐn qì",椎心泣血:"chuí xīn qì xuè",椎牛飨士:"chuí niú xiǎng shì",椎牛歃血:"chuí niú shà xuè",椎牛发冢:"chuí niú fà zhǒng",椎埋屠狗:"chuí mái tú gǒu",椎埋狗窃:"chuí mái gǒu qiè",壮发冲冠:"zhuàng fā chōng guàn",庄严宝相:"zhuāng yán bǎo xiàng",转愁为喜:"zhuǎn chóu wéi xǐ",转嗔为喜:"zhuǎn chēn wéi xǐ",拽巷啰街:"zhuài xiàng luó jiē",拽耙扶犁:"zhuāi pá fú lí",拽布拖麻:"zhuài bù tuō má",箸长碗短:"zhù cháng wǎn duǎn",铸剑为犁:"zhù jiàn wéi lí",杼柚其空:"zhù yòu qí kōng",杼柚空虚:"zhù yòu kōng xū",助天为虐:"zhù tiān wéi nüè",属垣有耳:"zhǔ yuán yǒu ěr",属毛离里:"zhǔ máo lí lǐ",属辞比事:"zhǔ cí bǐ shì",逐物不还:"zhú wù bù huán",铢量寸度:"zhū liáng cùn duó",铢两悉称:"zhū liǎng xī chèn",侏儒观戏:"zhū rú guān xì",朱轓皁盖:"zhū fān zào gài",昼度夜思:"zhòu duó yè sī",诪张为幻:"zhōu zhāng wéi huàn",重明继焰:"chóng míng jì yàn",众啄同音:"zhòng zhuó tóng yīn",众毛攒裘:"zhòng máo cuán qiú",众好众恶:"zhòng hào zhòng wù",擿埴索涂:"zhāi zhí suǒ tú",稚齿婑媠:"zhì chǐ wǒ tuó",至当不易:"zhì dàng bú yì",指皂为白:"zhǐ zào wéi bái",指雁为羹:"zhǐ yàn wéi gēng",指树为姓:"zhǐ shù wéi xìng",指山说磨:"zhǐ shān shuō mò",止戈为武:"zhǐ gē wéi wǔ",枝干相持:"zhī gàn xiāng chí",枝大于本:"zh dà yú běn",支吾其词:"zhī wú qí cí",正身率下:"zhèng shēn shuài xià",正冠李下:"zhèng guàn lǐ xià",整冠纳履:"zhěng guān nà lǚ",整躬率物:"zhěng gōng shuài wù",整顿干坤:"zhěng dùn gàn kūn",针头削铁:"zhēn tóu xuē tiě",贞松劲柏:"zhēn sōng jìng bǎi",赭衣塞路:"zhě yī sè lù",折箭为誓:"shé jiàn wéi shì",折而族之:"zhé ér zú zhī",昭德塞违:"zhāo dé sè wéi",章句小儒:"zhāng jù xiǎo rú",湛恩汪濊:"zhàn ēn wāng huì",占风望气:"zhān fēng wàng qì",斩将搴旗:"zhǎn jiàng qiān qí",曾母投杼:"zēng mǔ tóu zhù",曾参杀人:"zēng shēn shā rén",造谣中伤:"zào yáo zhòng shāng",早占勿药:"zǎo zhān wù yào",凿龟数策:"záo guī shǔ cè",攒三聚五:"cuán sān jù wǔ",攒眉蹙额:"cuán mei cù é",攒零合整:"cuán líng hé zhěng",攒锋聚镝:"cuán fēng jù dí",载笑载言:"zài xiào zài yán",载酒问字:"zài jiǔ wèn zì",殒身不恤:"yǔn shēn bú xù",云舒霞卷:"yún shū xiá juǎn",月中折桂:"yuè zhōng shé guì",月落参横:"yuè luò shēn héng",鬻驽窃价:"yù nú qiè jià",鬻鸡为凤:"yù jī wéi fèng",遇难成祥:"yù nàn chéng xiáng",郁郁累累:"yù yù lěi lěi",玉卮无当:"yù zhī wú dàng",语笑喧阗:"yǔ xiào xuān tián",与世沉浮:"yǔ shì chén fú",与时消息:"yǔ shí xiāo xi",逾墙钻隙:"yú qiáng zuān xì",渔夺侵牟:"yú duó qīn móu",杅穿皮蠹:"yú chuān pí dù",余勇可贾:"yú yǒng kě gǔ",予智予雄:"yú zhì yú xióng",予取予求:"yú qǔ yú qiú",于家为国:"yú jiā wéi guó",有借无还:"yǒu jiè wú huán",有加无已:"yǒu jiā wú yǐ",有国难投:"yǒu guó nán tóu",游必有方:"yóu bì yǒu fāng",油干灯尽:"yóu gàn dēng jìn",尤云殢雨:"yóu yún tì yǔ",庸中皦皦:"yōng zhōng jiǎo jiǎo",郢书燕说:"yǐng shū yān shuō",营蝇斐锦:"yíng yíng fēi jǐn",鹰心雁爪:"yīng xīn yàn zhǎo",莺吟燕儛:"yīng yín yàn wǔ",应天顺时:"yīng tiān shùn shí",印累绶若:"yìn léi shòu ruò",隐占身体:"yǐn zhàn shēn tǐ",饮犊上流:"yìn dú shàng liú",引绳切墨:"yǐn shéng qiē mò",龈齿弹舌:"yín chǐ dàn shé",因缘为市:"yīn yuán wéi shì",因树为屋:"yīn shù wéi wū",溢美溢恶:"yì měi yì wù",抑塞磊落:"yì sè lěi luò",倚闾望切:"yǐ lǘ wàng qiē",以意为之:"yǐ yì wéi zhī",以言为讳:"yǐ yán wéi huì",以疏间亲:"yǐ shū jiàn qīn",以水济水:"yǐ shuǐ jǐ shuǐ",以书为御:"yǐ shū wéi yù",以守为攻:"yǐ shǒu wéi gōng",以升量石:"yǐ shēng liáng dàn",以慎为键:"yǐ shèn wéi jiàn",以筌为鱼:"yǐ quán wéi yú",以利累形:"yǐ lì lěi xíng",以毁为罚:"yǐ huǐ wéi fá",以黑为白:"yǐ hēi wéi bái",以规为瑱:"yǐ guī wéi tiàn",以古为鉴:"yǐ gǔ wéi jiàn",以宫笑角:"yǐ gōng xiào jué",以法为教:"yǐ fǎ wéi jiào",以大恶细:"yǐ dà wù xì",遗世忘累:"yí shì wàng lěi",遗寝载怀:"yí qǐn zài huái",移的就箭:"yí dì jiù jiàn",依头缕当:"yī tóu lǚ dàng",衣租食税:"yì zū shí shuì",衣轻乘肥:"yì qīng chéng féi",衣裳之会:"yī shang zhī huì",衣单食薄:"yī dān shí bó",一还一报:"yì huán yí bào",叶公好龙:"yè gōng hào lóng",野调无腔:"yě diào wú qiāng",瑶池女使:"yáo chí nǚ shǐ",幺麽小丑:"yāo mó xiǎo chǒu",养精畜锐:"yǎng jīng xù ruì",卬首信眉:"áng shǒu shēn méi",洋洋纚纚:"yáng yáng sǎ sǎ",羊羔美酒:"yáng gāo měi jiǔ",扬风扢雅:"yáng fēng jié yǎ",燕昭市骏:"yān zhāo shì jùn",燕昭好马:"yān zhāo hǎo mǎ",燕石妄珍:"yān shí wàng zhēn",燕骏千金:"yān jùn qiān jīn",燕金募秀:"yān jīn mù xiù",燕驾越毂:"yān jià yuè gǔ",燕歌赵舞:"yān gē zhào wǔ",燕岱之石:"yān dài zhī shí",燕处危巢:"yàn chǔ wēi cháo",掞藻飞声:"shàn zǎo fēi shēng",偃革为轩:"yǎn gé wéi xuān",妍蚩好恶:"yán chī hǎo è",压良为贱:"yā liáng wéi jiàn",搀行夺市:"chān háng duó shì",泣数行下:"qì shù háng xià",当行出色:"dāng háng chū sè",秀出班行:"xiù chū bān háng",儿女成行:"ér nǚ chéng háng",大行大市:"dà háng dà shì",寻行数墨:"xún háng shǔ mò",埙篪相和:"xūn chí xiāng hè",血债累累:"xuè zhài lěi lěi",炫玉贾石:"xuàn yù gǔ shí",炫石为玉:"xuàn shí wéi yù",悬石程书:"xuán dàn chéng shū",悬狟素飡:"xuán huán sù cān",悬龟系鱼:"xuán guī xì yú",揎拳捋袖:"xuān quán luō xiù",轩鹤冠猴:"xuān hè guàn hóu",畜妻养子:"xù qī yǎng zǐ",羞人答答:"xiū rén dā dā",修鳞养爪:"xiū lín yǎng zhǎo",熊据虎跱:"xióng jù hǔ zhì",兄死弟及:"xiōng sǐ dì jí",腥闻在上:"xīng wén zài shàng",兴文匽武:"xīng wén yǎn wǔ",兴观群怨:"xìng guān qún yuàn",兴高彩烈:"xìng gāo cǎi liè",心手相应:"xīn shǒu xiāng yìng",心口相应:"xīn kǒu xiāng yīng",挟势弄权:"xié shì nòng quán",胁肩累足:"xié jiān lěi zú",校短量长:"jiào duǎn liáng cháng",小眼薄皮:"xiǎo yǎn bó pí",硝云弹雨:"xiāo yún dàn yǔ",鸮鸣鼠暴:"xiāo míng shǔ bào",削株掘根:"xuē zhū jué gēn",削铁无声:"xuē tiě wú shēng",削职为民:"xuē zhí wéi mín",削木为吏:"xuē mù wéi lì",想望风褱:"xiǎng wàng fēng huái",香培玉琢:"xiang pei yu zhuó",相鼠有皮:"xiàng shǔ yǒu pí",相时而动:"xiàng shí ér dòng",相切相磋:"xiāng qiē xiāng cuō",相女配夫:"xiàng nǚ pèi fū",相门有相:"xiàng mén yǒu xiàng",挦章撦句:"xián zhāng chě jù",先我着鞭:"xiān wǒ zhuó biān",习焉不察:"xí yān bù chá",歙漆阿胶:"shè qī ē jiāo",晰毛辨发:"xī máo biàn fà",悉索薄赋:"xī suǒ bó fù",雾鳞云爪:"wù lín yún zhǎo",物稀为贵:"wù xī wéi guì",碔砆混玉:"wǔ fū hùn yù",武断专横:"wǔ duàn zhuān héng",五石六鹢:"wǔ shí liù yì",五色相宣:"wǔ sè xiāng xuān",五侯七贵:"wǔ hóu qī guì",五侯蜡烛:"wǔ hòu là zhú",五羖大夫:"wǔ gǔ dà fū",吾自有处:"wú zì yǒu chǔ",无下箸处:"wú xià zhù chǔ",无伤无臭:"wú shāng wú xiù",无能为役:"wú néng wéi yì",无寇暴死:"wú kòu bào sǐ",无孔不钻:"wú kǒng bú zuàn",无间可乘:"wú jiān kě chéng",无间冬夏:"wú jiān dōng xià",无恶不为:"wú è bù wéi",无动为大:"wú dòng wéi dà",诬良为盗:"wū liáng wéi dào",握拳透爪:"wò quán tòu zhǎo",文武差事:"wén wǔ chāi shì",委委佗佗:"wēi wēi tuó tuó",惟日为岁:"wéi rì wéi suì",帷薄不修:"wéi bó bù xiū",为善最乐:"wéi shàn zuì lè",为山止篑:"wéi shān zhǐ kuì",为仁不富:"wéi rén bú fù",为裘为箕:"wéi qiú wéi jī",为民父母:"wéi mín fù mǔ",为虺弗摧:"wéi huǐ fú cuī",为好成歉:"wéi hǎo chéng qiàn",为鬼为蜮:"wéi guǐ wéi yù",望风响应:"wàng fēng xiǎng yīng",望尘僄声:"wàng chén piào shēng",往渚还汀:"wǎng zhǔ huán tīng",王贡弹冠:"wáng gòng dàn guàn",亡国大夫:"wáng guó dà fū",万贯家私:"wàn guàn jiā sī",晚食当肉:"wǎn shí dàng ròu",晚节不保:"wǎn jié bù bǎo",玩岁愒时:"wán suì kài shí",蛙蟆胜负:"wā má shèng fù",吞言咽理:"tūn yán yàn lǐ",颓垣断堑:"tuí yuán duàn qiàn",推干就湿:"tuī gàn jiù shī",剸繁决剧:"tuán fán jué jù",团头聚面:"tuán tóu jù miàn",兔丝燕麦:"tù sī yàn mài",兔头麞脑:"tù tóu zhāng nǎo",兔葵燕麦:"tù kuí yàn mài",吐哺握发:"tǔ bǔ wò fà",投传而去:"tóu zhuàn ér qù",头没杯案:"tóu mò bēi àn",头昏脑闷:"tóu hūn nǎo mèn",头会箕敛:"tóu kuài jī liǎn",头出头没:"tóu chū tóu mò",痛自创艾:"tòng zì chuāng yì",同恶相助:"tóng wù xiāng zhù",同恶相恤:"tóng wù xiāng xù",痌瘝在抱:"tōng guān zài bào",通文调武:"tōng wén diào wǔ",停留长智:"tíng liú zhǎng zhì",铁树开华:"tiě shù kāi huā",条贯部分:"tiáo guàn bù fēn",挑牙料唇:"tiǎo yá liào chún",挑么挑六:"tiāo yāo tiāo liù",挑唇料嘴:"tiǎo chún liào zuǐ",恬不为意:"tián bù wéi yì",恬不为怪:"tián bù wéi guài",天下为笼:"tiān xià wéi lóng",天台路迷:"tiān tái lù mí",天年不遂:"tiān nián bú suì",探囊胠箧:"tàn náng qū qiè",谭言微中:"tán yán wēi zhòng",谈言微中:"tán yán wēi zhòng",狧穅及米:"shì kāng jí mǐ",随物应机:"suí wù yīng jī",搜岩采干:"sōu yán cǎi gàn",宋斤鲁削:"sòng jīn lǔ xuē",松筠之节:"sōng yún zhī jié",四亭八当:"sì tíng bā dàng",四马攒蹄:"sì mǎ cuán tí",四不拗六:"sì bú niù liù",思所逐之:"sī suǒ zhú zhī",丝恩发怨:"sī ēn fà yuàn",硕望宿德:"shuò wàng xiǔ dé",铄古切今:"shuò gǔ qiē jīn",顺风而呼:"shùn fēng ér hū",顺风吹火:"shùn fēng chuī huǒ",水中著盐:"shuǐ zhōng zhuó yán",双柑斗酒:"shuāng gān dǒu jiǔ",数米而炊:"shǔ mǐ ér chuī",数米量柴:"shǔ mǐ liáng chái",数理逻辑:"shù lǐ luó ji",数黑论黄:"shǔ hēi lùn huáng",数白论黄:"shǔ bái lùn huáng",束缊还妇:"shù yūn huán fù",束蒲为脯:"shù pú wéi pú",束椽为柱:"shù chuán wéi zhù",书缺有间:"shū quē yǒu jiàn",手足重茧:"shǒu zú chóng jiǎn",手足异处:"shǒu zú yì chǔ",手脚干净:"shǒu jiǎo gàn jìng",手不应心:"shǒu bù yīng xīn",螫手解腕:"shì shǒu jiě wàn",释知遗形:"shì zhī yí xíng",适时应务:"shì shí yīng wù",适情率意:"shì qíng shuài yì",适当其冲:"shì dāng qí chōng",视为知己:"shì wéi zhī jǐ",使羊将狼:"shǐ yáng jiàng láng",食为民天:"shí wéi mín tiān",拾掇无遗:"shí duō wú yí",实与有力:"shí yù yǒu lì",石英玻璃:"shí yīng bō li",石室金匮:"shí shì jīn guì",什袭珍藏:"shí xí zhēn cáng",什伍东西:"shí wǔ dōng xī",什围伍攻:"shí wéi wǔ gōng",十魔九难:"shí mó jiǔ nàn",诗书发冢:"shī shū fà zhǒng",虱处裈中:"shī chǔ kūn zhōng",师直为壮:"shī zhí wéi zhuàng",尸居龙见:"shī jū lóng xiàn",圣经贤传:"shèng jīng xián zhuàn",圣君贤相:"shèng jūn xián xiàng",生拖死拽:"shēng tuō sǐ zhuài",审己度人:"shěn jǐ duó rén",神武挂冠:"shén wǔ guà guàn",神龙失埶:"shén lóng shī shì",深文曲折:"shēn wén qǔ shé",深厉浅揭:"shēn lì qiǎn qì",深谷为陵:"shēn gǔ wéi líng",深恶痛疾:"shēn wù tòng jí",深仇宿怨:"shēn chóu xiǔ yuàn",舍己为公:"shě jǐ wèi gōng",舍短取长:"shě duǎn qǔ cháng",舍策追羊:"shě cè zhuī yáng",蛇蝎为心:"shé xiē wéi xīn",少成若性:"shào chéng ruò xìng",上当学乖:"shàng dàng xué guāi",赏不当功:"shǎng bù dāng gōng",善自为谋:"shàn zì wéi móu",善为说辞:"shàn wéi shuō cí",善善恶恶:"shàn shàn wù è",善财难舍:"shàn cái nán shě",苫眼铺眉:"shān yǎn pū méi",讪牙闲嗑:"shàn yá xián kē",山阴乘兴:"shān yīn chéng xīng",山殽野湋:"shān yáo yě wéi",山溜穿石:"shān liù chuān shí",山节藻棁:"shān jié zǎo zhuō",杀鸡为黍:"shā jī wéi shǔ",色厉胆薄:"sè lì dǎn bó",桑荫未移:"sāng yīn wèi yí",桑荫不徙:"sāng yīn bù xǐ",桑土绸缪:"sāng tǔ chóu miù",桑户棬枢:"sāng hù juàn shū",三战三北:"sān zhàn sān běi",三瓦两舍:"sān wǎ liǎng shě",三人为众:"sān rén wèi zhòng",三差两错:"sān chā liǎng cuò",塞井焚舍:"sāi jǐng fén shě",洒心更始:"sǎ xīn gèng shǐ",洒扫应对:"sǎ sǎo yìng duì",软红香土:"ruǎn hóng xiāng tǔ",入吾彀中:"rù wú gòu zhōng",入铁主簿:"rù tiě zhǔ bù",入理切情:"rù lǐ qiē qíng",汝成人耶:"rǔ chéng rén yé",如水投石:"rú shuǐ tóu shí",如切如磋:"rú qiē rú cuō",如登春台:"rú dēng chūn tái",肉薄骨并:"ròu bó gǔ bìng",柔情绰态:"róu qíng chuò tài",戎马劻勷:"róng mǎ kuāng ráng",日中为市:"rì zhōng wéi shì",日月参辰:"rì yuè shēn chén",日省月修:"rì xǐng yuè xiū",日削月割:"rì xuē yuè gē",日省月试:"rì xǐng yuè shì",任达不拘:"rèn dá bù jū",人言藉藉:"rén yán jí jí",人模狗样:"rén mú gǒu yàng",人莫予毒:"rén mò yú dú",热熬翻饼:"rè áo fān bǐng",圈牢养物:"juàn láo yǎng wù",取予有节:"qǔ yǔ yǒu jié",诎要桡腘:"qū yāo ráo guó",穷形尽相:"qióng xíng jìn xiàng",情凄意切:"qíng qī yì qiè",情见势屈:"qíng xiàn shì qū",情见乎辞:"qíng xiàn hū cí",清都绛阙:"qīng dōu jiàng què",倾肠倒肚:"qīng cháng dào dǔ",青紫被体:"qīng zǐ pī tǐ",青林黑塞:"qīng lín hēi sài",螓首蛾眉:"qín shǒu é méi",琴瑟之好:"qín sè zhī hào",且住为佳:"qiě zhù wéi jiā",切树倒根:"qiē shù dǎo gēn",切理餍心:"qiē lǐ yàn xīn",切近的当:"qiē jìn de dāng",翘足引领:"qiáo zú yǐn lǐng",巧发奇中:"qiǎo fā qí zhòng",强嘴拗舌:"jiàng zuǐ niù shé",强直自遂:"qiáng zhí zì suí",强死强活:"qiǎng sǐ qiǎng huó",强食自爱:"qiǎng shí zì ài",强食靡角:"qiǎng shí mí jiǎo",强弓劲弩:"qiáng gōng jìng nǔ",强聒不舍:"qiǎng guō bù shě",强凫变鹤:"qiáng fú biàn hè",强而后可:"qiǎng ér hòu kě",强得易贫:"qiǎng dé yì pín",遣兴陶情:"qiǎn xìng táo qíng",牵羊担酒:"qiān yáng dān jiǔ",千了百当:"qiān liǎo bǎi dàng",泣下如雨:"qì xià rú yǔ",起偃为竖:"qǐ yǎn wéi shù",岂弟君子:"kǎi tì jūn zǐ",綦溪利跂:"qí xī lì qí",棋输先著:"qí shū xiān zhuó",齐王舍牛:"qí wáng shě niú",欺天诳地:"qī tiān kuáng dì",普天率土:"pǔ tiān shuài tǔ",铺胸纳地:"pū xiōng nà dì",铺锦列绣:"pū jǐn liè xiù",破家为国:"pò jiā wèi guó",破觚为圜:"pò gū wéi yuán",萍飘蓬转:"píng piāo péng zhuàn",帡天极地:"píng tiān jí dì",屏声息气:"bǐng shēng xī qì",凭几据杖:"píng jī jù zhàng",贫嘴薄舌:"pín zuǐ bó shé",片语只辞:"piàn yǔ zhī cí",披发文身:"pī fà wén shēn",烹龙炮凤:"pēng lóng páo fèng",炰鳖脍鲤:"fǒu biē kuài lǐ",庞眉皓发:"páng méi hào fà",攀花折柳:"pān huā zhé liǔ",攀蟾折桂:"pān chán shé guì",女大难留:"nǚ dà nán liú",弄玉吹箫:"nòng yù chuī xiāo",弄管调弦:"nòng guǎn tiáo xián",弄粉调朱:"nòng fěn diào zhū",浓抹淡妆:"nóng mò dàn zhuāng",捻土为香:"niǎn tǔ wéi xiāng",年谊世好:"nián yì shì hǎo",年华垂暮:"nián huá chuí mù",儗不于伦:"nǐ bù yú lún",泥而不滓:"ní ér bù zǐ",能者为师:"néng zhě wéi shī",能不称官:"néng bú chèn guān",挠直为曲:"náo zhí wéi qū",难进易退:"nán jìn yì tuì",难得糊涂:"nán dé hú tú",南蛮鴂舌:"nán mán jué shé",南贩北贾:"nán fàn běi gǔ",牧猪奴戏:"mù zhū nú xì",目眢心忳:"mù yuān xīn tún",目挑心招:"mù tiǎo xīn zhāo",目量意营:"mù liàng yì yíng",木头木脑:"mù tóu mù nǎo",木干鸟栖:"mù gàn niǎo qī",侔色揣称:"móu sè chuǎi chèn",莫予毒也:"mò yú dú yě",抹粉施脂:"mò fěn shī zhī",磨砻镌切:"mó lóng juān qiē",磨棱刓角:"mó léng wán jiǎo",摸门不着:"mō mén bù zháo",摸不着边:"mō bù zhuó biān",命中注定:"mìng zhōng zhù dìng",鸣鹤之应:"míng hè zhī yìng",明效大验:"míng xiào dà yàn",名我固当:"míng wǒ gù dāng",邈处欿视:"miǎo chǔ kǎn shì",黾穴鸲巢:"měng xué qú cháo",绵里薄材:"mián lǐ bó cái",靡有孑遗:"mǐ yǒu jié yí",靡衣偷食:"mǐ yī tōu shí",迷恋骸骨:"mí liàn hái gǔ",扪参历井:"mén shēn lì jǐng",门单户薄:"mén dān hù bó",昧旦晨兴:"mèi dàn chén xīng",冒名接脚:"mào míng jiē jiǎo",毛遂堕井:"máo suí duò jǐng",毛发倒竖:"máo fā dǎo shù",卖文为生:"mài wén wéi shēng",卖李钻核:"mài lǐ zuān hé",买椟还珠:"mǎi dú huán zhū",埋三怨四:"mán sān yuàn sì",马入华山:"mǎ rù huá shān",落魄江湖:"luò pò jiāng hú",落落难合:"luò luò nán hé",落草为寇:"luò cǎo wéi kòu",罗织构陷:"luó zhī gòu xiàn",鸾凤和鸣:"luán fèng hè míng",率由旧章:"shuài yóu jiù zhāng",率土同庆:"shuài tǔ tóng qìng",率兽食人:"shuài shòu shí rén",率土归心:"shuài tǔ guī xīn",率马以骥:"shuài mǎ yǐ jì",率尔成章:"shuài ěr chéng zhāng",鲁斤燕削:"lǔ jīn yàn xuē",漏尽更阑:"lòu jìn gēng lán",笼鸟槛猿:"lóng niǎo jiàn yuán",笼鸟池鱼:"lóng niǎo chí yú",龙游曲沼:"lóng yóu qū zhǎo",龙血玄黄:"lóng xuè xuán huáng",龙雕凤咀:"lóng diāo fèng jǔ",六尺之讬:"liù chǐ zhī tuō",令原之戚:"líng yuán zhī qī",令人捧腹:"lìng rén pěng fù",陵劲淬砺:"líng jìng cuì lì",临敌易将:"lín dí yì jiàng",裂裳衣疮:"liè shang yī chuāng",裂冠毁冕:"liè guàn huǐ miǎn",了无惧色:"liǎo wú jù sè",了身达命:"liǎo shēn dá mìng",了然无闻:"liǎo rán wú wén",了不可见:"liǎo bù kě jiàn",了不长进:"liǎo bù zhǎng jìn",燎发摧枯:"liǎo fà cuī kū",审时度势:"shěn shí duó shì",量小力微:"liàng xiǎo lì wēi",相时度力:"xiāng shí duó lì",量枘制凿:"liàng ruì zhì záo",量如江海:"liàng rú jiāng hǎi",量金买赋:"liàng jīn mǎi fù",量己审分:"liàng jǐ shěn fēn",敛骨吹魂:"liǎn gǔ chuī hún",詈夷为跖:"lì yí wéi zhí",利令志惛:"lì lìng zhì hūn",李广不侯:"lǐ guǎng bú hòu",礼为情貌:"lǐ wéi qíng mào",礼让为国:"lǐ ràng wéi guó",犁生骍角:"lí shēng xīng jiǎo",离本徼末:"lí běn jiǎo mò",楞眉横眼:"léng méi hèng yǎn",擂天倒地:"léi tiān dǎo dì",累足成步:"lěi zú chéng bù",累瓦结绳:"lěi wǎ jié shéng",累土至山:"lěi tǔ zhì shān",累土聚沙:"lěi tǔ jù shā",累卵之危:"lěi luǎn zhī wēi",累累如珠:"lěi lěi rú zhū",累块积苏:"lěi kuài jī sū",乐山乐水:"lè shān lè shuǐ",潦原浸天:"lǎo yuán jìn tiān",老师宿儒:"lǎo shī xiǔ rú",牢什古子:"láo shí gǔ zi",琅嬛福地:"láng huán fú dì",揆情度理:"kuí qíng duó lǐ",旷日累时:"kuàng rì lěi shí",匡救弥缝:"kuāng jiù mí fèng",枯树生华:"kū shù shēng huā",口轻舌薄:"kǒu qīng shé bó",口角生风:"kǒu jiǎo shēng fēng",口角春风:"kǒu jiǎo chūn fēng",口角风情:"kǒu jiǎo fēng qíng",口干舌焦:"kǒu gān shé jiāo",口腹之累:"kǒu fù zhī lěi",空腹便便:"kōng fù pián pián",嗑牙料嘴:"kē yá liào zuǐ",刻木为鹄:"kè mù wéi hú",咳珠唾玉:"ké zhū tuò yù",咳唾成珠:"ké tuò chéng zhū",抗颜为师:"kàng yán wéi shī",开华结果:"kāi huā jié guǒ",峻阪盐车:"jùn bǎn yán chē",嚼铁咀金:"jiáo tiě jǔ jīn",嚼墨喷纸:"jué mò pēn zhǐ",倔头强脑:"juè tóu jiàng nǎo",倔头倔脑:"juè tóu juè nǎo",倦鸟知还:"juàn niǎo zhī huán",卷席而葬:"juǎn xí ér zàng",卷甲倍道:"juǎn jiǎ bèi dào",聚米为山:"jù mǐ wéi shān",举手相庆:"jǔ shǒu xiāng qìng",举世混浊:"jǔ shì hún zhuó",鞠为茂草:"jū wéi mào cǎo",拘神遣将:"jū shén qiǎn jiàng",居下讪上:"jū xià shàn shàng",久要不忘:"jiǔ yāo bú wàng",九转功成:"jiǔ zhuǎn gōng chéng",九蒸三熯:"jiǔ zhēng sān hàn",敬业乐群:"jìng yè lè qún",井底虾蟆:"jǐng dǐ xiā má",旌旗卷舒:"jīng qí juǎn shū",荆棘载途:"jīng jí zài tú",禁舍开塞:"jìn shě kāi sāi",祲威盛容:"jìn wēi shèng róng",进退消长:"jìn tuì xiāo cháng",进退应矩:"jìn tuì yīng jǔ",进退触籓:"jìn tuì chù fān",进退跋疐:"jìn tuì bá zhì",尽多尽少:"jǐn duō jǐn shǎo",锦囊还矢:"jǐn náng huán shǐ",矜己自饰:"jīn jǐ zì shì",矜功负气:"jīn gōng fù qì",津关险塞:"jīn guān xiǎn sài",金吾不禁:"jīn wú bú jìn",金翅擘海:"jīn chì bāi hǎi",解衣衣人:"jiě yī yī rén",解人难得:"jiě rén nán dé",解铃系铃:"jiě líng xì líng",解发佯狂:"jiě fà yáng kuáng",诘屈磝碻:"jié qū áo qiāo",教猱升木:"jiāo náo shēng mù",较瘦量肥:"jiào shòu liàng féi",角立杰出:"jiǎo lì jié chū",焦沙烂石:"jiāo shā làn shí",骄儿騃女:"jiāo ér sì nǚ",浇风薄俗:"jiāo fēng bó sú",降妖捉怪:"xiáng yāo zhuō guài",将取固予:"jiāng qǔ gù yǔ",将门有将:"jiàng mén yǒu jiàng",将夺固与:"jiāng duó gù yǔ",槛花笼鹤:"jiàn huā lóng hè",鉴影度形:"jiàn yǐng duó xíng",渐不可长:"jiàn bù kě zhǎng",见素抱朴:"xiàn sù bào pǔ",见弃于人:"jiàn qì yú rén",简丝数米:"jiǎn sī shǔ mǐ",俭不中礼:"jiǎn bú zhòng lǐ",间见层出:"jiàn xiàn céng chū",尖嘴薄舌:"jiān zuǐ bó shé",甲冠天下:"jiǎ guàn tiān xià",葭莩之亲:"jiā fú zhī qīn",家累千金:"jiā lèi qiān jīn",家给人足:"jiā jǐ rén zú",家道从容:"jiā dào cóng róng",夹袋人物:"jiā dài rén wù",霁风朗月:"jì fēng lǎng yuè",寄兴寓情:"jì xìng yù qíng",计深虑远:"jì shēn lǜ yuǎn",计功量罪:"jì gōng liàng zuì",掎裳连襼:"jǐ shang lián yì",虮虱相吊:"jǐ shī xiāng diào",疾不可为:"jí bù kě wéi",极深研几:"jí shēn yán jī",及宾有鱼:"jí bīn yǒu yú",激薄停浇:"jī bó tíng jiāo",积素累旧:"jī sù lěi jiù",积时累日:"jī shí lěi rì",积露为波:"jī lù wéi bō",积德累功:"jī dé lěi gōng",积谗糜骨:"jī chán méi gǔ",击排冒没:"jī pái mào mò",祸为福先:"huò wéi fú xiān",祸福相依:"huò fú xiāng yī",获隽公车:"huò jùn gōng chē",混应滥应:"hùn yīng làn yīng",毁舟为杕:"huǐ zhōu wéi duò",毁钟为铎:"huǐ zhōng wéi duó",毁冠裂裳:"huǐ guān liè cháng",晦盲否塞:"huì máng pǐ sè",回船转舵:"huí chuán zhuàn duò",潢池盗弄:"huáng chí dào nòng",黄冠草履:"huáng guàn cǎo lǚ",黄发儿齿:"huáng fà ér chǐ",黄发垂髫:"huáng fà chuí tiáo",还珠返璧:"huán zhū fǎn bì",还年驻色:"huán nián zhù sè",还年却老:"huán nián què lǎo",坏裳为裤:"huài shang wéi kù",画荻和丸:"huà dí huò wán",化枭为鸠:"huà xiāo wéi jiū",化腐为奇:"huà fǔ wéi qí",化鸱为凤:"huà chī wéi fèng",花不棱登:"huā bu lēng dēng",户限为穿:"hù xiàn wéi chuān",呼卢喝雉:"hū lú hè zhì",呼来喝去:"hū lái hè qù",呼不给吸:"hū bù jǐ xī",厚味腊毒:"hòu wèi xī dú",厚德载物:"hòu dé zài wù",鸿渐于干:"hóng jiàn yú gàn",洪炉燎发:"hóng lú liáo fà",红绳系足:"hóng shéng jì zú",红不棱登:"hóng bu lēng dēng",横抢硬夺:"hèng qiǎng yìng duó",横恩滥赏:"hèng ēn làn shǎng",恨海难填:"hèn hǎi nán tián",鹤发鸡皮:"hè fà jī pí",涸思干虑:"hé sī gān lǜ",河涸海干:"hé hé hǎi gān",和颜说色:"hé yán yuè sè",合从连衡:"hé zòng lián héng",浩浩汤汤:"hào hào shāng shāng",好勇斗狠:"hào yǒng dòu hěn",好问则裕:"hào wèn zé yù",好为事端:"hào wéi shì duān",好问决疑:"hào wèn jué yí",好生之德:"hào shēng zhī dé",好奇尚异:"hǎo qí shàng yì",好恶不同:"hǎo è bù tóng",好丹非素:"hào dān fēi sù",豪干暴取:"háo gàn bào qǔ",毫发不爽:"háo fà bù shuǎng",寒酸落魄:"hán suān luò pò",含英咀华:"hán yīng jǔ huá",含糊不明:"hán hú bù míng",过为已甚:"guò wéi yǐ shèn",桂折兰摧:"guì shé lán cuī",规旋矩折:"guī xuán jǔ shé",广文先生:"guǎng wén xiān sheng",广陵散绝:"guǎng líng sǎn jué",冠山戴粒:"guàn shān dài lì",冠屦倒施:"guàn jù dǎo shī",挂席为门:"guà xí wéi mén",寡见鲜闻:"guǎ jiàn xiǎn wén",瓜葛相连:"guā gé xiāng lián",鼓吻奋爪:"gǔ wěn fèn zhǎo",古调单弹:"gǔ diào dān tán",古调不弹:"gǔ diào bù tán",姑射神人:"gū yè shén rén",苟合取容:"gǒu hé qǔ róng",狗续侯冠:"gǒu xù hòu guàn",钩爪锯牙:"gōu zhǎo jù yá",共枝别干:"gòng zhī bié gàn",共为唇齿:"gòng wéi chún chǐ",拱手而降:"gǒng shǒu ér xiáng",拱肩缩背:"gǒng jiān suō bèi",功薄蝉翼:"gōng bó chán yì",弓调马服:"gōng diào mǎ fú",更姓改物:"gēng xìng gǎi wù",更仆难数:"gēng pú nán shǔ",更令明号:"gēng lìng míng hào",更待干罢:"gèng dài gàn bà",更唱迭和:"gēng chàng dié hé",更长梦短:"gēng cháng mèng duǎn",各色名样:"gè sè míng yàng",格格不纳:"gé gé bú nà",格格不吐:"gé gé bù tǔ",告朔饩羊:"gù shuò xì yáng",膏车秣马:"gào chē mò mǎ",高义薄云:"gāo yì bó yún",岗头泽底:"gāng tóu zé dǐ",敢为敢做:"gǎn wéi gǎn zuò",甘分随时:"gān fèn suí shí",甘处下流:"gān chǔ xià liú",干啼湿哭:"gàn tí shī kū",干名犯义:"gàn míng fàn yì",干将莫邪:"gān jiāng mò yé",干城之将:"gān chéng zhī jiàng",腹载五车:"fù zài wǔ chē",父债子还:"fù zhài zǐ huán",父为子隐:"fù wéi zǐ yǐn",辅世长民:"fǔ shì zhǎng mín",福为祸始:"fú wéi huò shǐ",符号逻辑:"fú hào luó jí",浮收勒折:"fú shōu lè shé",肤受之愬:"fū shòu zhī sù",否终则泰:"pǐ zhōng zé tài",佛头著粪:"fó tóu zhuó fèn",奉为楷模:"fèng wéi kǎi mó",凤靡鸾吪:"fèng mǐ luán é",封豨修蛇:"fēng xī xiū shé",风影敷衍:"fēng yǐng fū yǎn",丰屋蔀家:"fēng wū bù jiā",粪土不如:"fèn tǔ bù rú",分风劈流:"fēn fēng pǐ liú",沸沸汤汤:"fèi fèi shāng shāng",菲食薄衣:"fěi shí bó yī",飞将数奇:"fēi jiàng shù qí",放辟邪侈:"fàng pì xié chǐ",方领圆冠:"fāng lǐng yuán guàn",犯而不校:"fàn ér bú jiào",返本还源:"fǎn běn huán yuán",反劳为逸:"fǎn láo wéi yì",法轮常转:"fǎ lún cháng zhuàn",罚不当罪:"fá bù dāng zuì",发引千钧:"fà yǐn qiān jūn",发奸擿伏:"fā jiān tī fú",发短心长:"fà duǎn xīn cháng",二竖为虐:"èr shù wéi nüè",儿女心肠:"ér nǚ xīn cháng",儿女亲家:"ér nǚ qìng jiā",遏恶扬善:"è wù yáng shàn",饿殍枕藉:"è piǎo zhěn jí",饿殍载道:"è piǎo zài dào",恶醉强酒:"wù zuì qiǎng jiǔ",恶意中伤:"è yì zhòng shāng",恶湿居下:"wù shī jū xià",恶居下流:"wù jū xià liú",恶不去善:"wù bú qù shàn",扼吭夺食:"è háng duó shí",扼襟控咽:"è jīn kòng yān",峨峨汤汤:"é é shāng shāng",屙金溺银:"ē jīn niào yín",朵颐大嚼:"duǒ yí dà jiáo",夺人所好:"duó rén suǒ hào",多言数穷:"duō yán shuò qióng",多文为富:"duō wén wéi fù",多端寡要:"duō duān guǎ yào",多财善贾:"duō cái shàn gǔ",遁世无闷:"dùn shì wú mèn",遁迹黄冠:"dùn jì huáng guàn",堆案盈几:"duī àn yíng jī",断还归宗:"duàn huán guī zōng",短见薄识:"duǎn jiàn bó shí",蠹居棊处:"dù jū qí chǔ",度己以绳:"duó jǐ yǐ shéng",杜默为诗:"dù mò wéi shī",杜鹃啼血:"dù juān tí xuè",笃近举远:"dǔ jìn jǔ yuǎn",独有千秋:"dú yǒu qiān qiū",读书得间:"dú shū dé jiàn",斗转参横:"dǒu zhuǎn shēn héng",兜肚连肠:"dōu dǔ lián cháng",洞见症结:"dòng jiàn zhèng jié",恫疑虚喝:"dòng yí xū hè",动中窾要:"dòng zhōng kuǎn yào",东鸣西应:"dōng míng xī yīng",东鳞西爪:"dōng lín xī zhǎo",东量西折:"dōng liàng xī shé",东家西舍:"dōng jiā xī shè",东扯西拽:"dōng chě xī zhuāi",鼎铛有耳:"dǐng chēng yǒu ěr",鼎铛玉石:"dǐng chēng yù shí",钉头磷磷:"dīng tóu lín lín",跌宕不羁:"diē dàng bù jī",跌弹斑鸠:"diē dàn bān jiū",雕心雁爪:"diāo xīn yàn zhǎo",颠倒衣裳:"diān dǎo yī cháng",德薄能鲜:"dé bó néng xiǎn",得马折足:"dé mǎ shé zú",蹈其覆辙:"dǎo qí fù zhé",捣虚撇抗:"dǎo xū piē kàng",倒载干戈:"dào zài gān gē",倒裳索领:"dào cháng suǒ lǐng",倒果为因:"dào guǒ wéi yīn",叨在知己:"tāo zài zhī jǐ",叨陪末座:"tāo péi mò zuò",党豺为虐:"dǎng chái wéi nüè",当轴处中:"dāng zhóu chǔ zhōng",当着不着:"dāng zhuó bù zhuó",当务始终:"dāng wù shǐ zhōng",淡汝浓抹:"dàn rǔ nóng mǒ",弹丸脱手:"tán wán tuō shǒu",弹铗无鱼:"dàn jiá wú yú",箪食瓢饮:"dān sì piáo yǐn",大璞不完:"dà pú bù wán",大明法度:"dà míng fǎ dù",大车以载:"dà chē yǐ zài",打闷葫芦:"dǎ mèn hú lu",沓来踵至:"tà lái zhǒng zhì",厝火燎原:"cuò huǒ liǎo yuán",撮科打哄:"cuō kē dǎ hòng",寸积铢累:"cùn jī zhū lěi",啛啛喳喳:"cuì cuì chā chā",摧折豪强:"cuī zhé háo qiáng",摧刚为柔:"cuī gāng wéi róu",从俗就简:"cóng sú jiù jiǎn",此发彼应:"cǐ fā bǐ yīng",此唱彼和:"cǐ chàng bǐ hè",慈悲为本:"cí bēi wéi běn",纯属骗局:"chún shǔ piàn jú",春笋怒发:"chūn sǔn nù fā",垂头搨翼:"chuí tóu tà yì",传为笑谈:"chuán wéi xiào tán",传风扇火:"chuán fēng shān huǒ",穿红着绿:"chuān hóng zhuó lǜ",触处机来:"chù chǔ jī lái",处尊居显:"chǔ zūn jū xiǎn",处堂燕雀:"chǔ táng yàn què",处实效功:"chǔ shí xiào gōng",处高临深:"chǔ gāo lín shēn",出入无间:"chū rù wú jiān",出门应辙:"chū mén yīng zhé",出处语默:"chū chǔ yǔ mò",出处殊途:"chū chǔ shū tú",出处进退:"chū chǔ jìn tuì",愁山闷海:"chóu shān mèn hǎi",冲冠眦裂:"chōng guàn zì liè",齿牙为祸:"chǐ yá wéi huò",尺二冤家:"chǐ èr yuān jia",尺短寸长:"chǐ duǎn cùn cháng",尺寸之功:"chǐ cùn zhī gōng",城北徐公:"chéng běi xú gōng",成败兴废:"chéng bài xīng fèi",趁水和泥:"chèn shuǐ huò ní",称雨道晴:"chēng yǔ dào qíng",称体载衣:"chēng tǐ zài yī",称体裁衣:"chèn tǐ cái yī",称家有无:"chèn jiā yǒu wú",称德度功:"chēng dé duó gōng",沉吟章句:"chén yín zhāng jù",沉吟不决:"chén yín bù jué",沉疴宿疾:"chén kē sù jí",扯纤拉烟:"chě qiàn lā yān",扯顺风旗:"chě shùn fēng qí",车载船装:"chē zǎi chuán zhuāng",朝升暮合:"zhāo shēng mù gě",朝攀暮折:"zhāo pān mù shé",超今冠古:"chāo jīn guàn gǔ",倡而不和:"chàng ér bú hè",畅所欲为:"chàng suǒ yù wéi",苌弘碧血:"cháng hóng bì xiě",长幼尊卑:"zhǎng yòu zūn bēi",长绳系日:"cháng shéng jì rì",长年三老:"zhǎng nián sān lǎo",长春不老:"cháng chūn bù lǎo",长傲饰非:"zhǎng ào shì fēi",昌亭旅食:"chāng tíng lǚ shí",禅絮沾泥:"chán xù zhān ní",差三错四:"chā sān cuò sì",层台累榭:"céng tái lěi xiè",层见迭出:"céng xiàn dié chū",藏踪蹑迹:"cáng zōng niè jì",苍蝇见血:"cāng yíng jiàn xiě",餐松啖柏:"cān sōng dàn bó",骖风驷霞:"cān fēng sì xiá",参伍错综:"cēn wǔ cuò zōng",参辰卯酉:"shēn chén mǎo yǒu",材优干济:"cái yōu gān jǐ",材薄质衰:"cái bó zhì shuāi",才大难用:"cái dà nán yòng",才薄智浅:"cái bó zhì qiǎn",不足为意:"bù zú wéi yì",不足为据:"bù zú wéi jù",不足为法:"bù zú wéi fǎ",不足齿数:"bù zú chǐ shǔ",不着疼热:"bù zhuó téng rè",不知薡蕫:"bù zhī dǐng dǒng",不越雷池:"bú yuè léi chí",不相为谋:"bù xiāng wéi móu",不贪为宝:"bù tān wéi bǎo",不了而了:"bù liǎo ér liǎo",不可揆度:"bù kě kuí duó",不遑启处:"bù huáng qǐ chǔ",不当不正:"bù dāng bú zhèng",不差什么:"bú chà shén me",不差累黍:"bù chā lěi shǔ",擘两分星:"bò liǎng fēn xīng",簸土扬沙:"bǒ tǔ yáng shā",薄物细故:"bó wù xì gù",薄寒中人:"bó hán zhòng rén",博文约礼:"bó wén yuē lǐ",播糠眯目:"bō kāng mí mù",剥皮抽筋:"bō pí chōu jīn",剥肤椎髓:"bō fū chuí suǐ",波属云委:"bō zhǔ yún wěi",波骇云属:"bō hài yún zhǔ",兵微将寡:"bīng wēi jiàng guǎ",兵强将勇:"bīng qiáng jiàng yǒng",兵多将广:"bīng duō jiàng guǎng",兵不由将:"bīng bù yóu jiàng",冰解的破:"bīng jiě dì pò",彬彬济济:"bīn bīn jǐ jǐ",摽梅之年:"biào méi zhī nián",表里为奸:"biǎo lǐ wéi jiān",飙发电举:"biāo fā diàn jǔ",变贪厉薄:"biàn tān lì bó",敝盖不弃:"bì gài bú qì",秕言谬说:"bǐ yán miù shuō",比物属事:"bǐ wù zhǔ shì",被山带河:"pī shān dài hé",被甲枕戈:"pī jiǎ zhěn gē",被甲据鞍:"pī jiǎ jù ān",被褐怀玉:"pī hè huái yù",被发缨冠:"pī fà yīng guàn",背曲腰躬:"bèi qǔ yāo gōng",北窗高卧:"běi chuāng gāo wò",北辰星拱:"běi chén xīng gǒng",北鄙之音:"běi bǐ zhī yīn",卑宫菲食:"bēi gōng fěi shí",暴衣露冠:"pù yī lù guàn",暴腮龙门:"pù sāi lóng mén",暴露文学:"bào lù wén xué",暴虎冯河:"bào hǔ píng hé",抱蔓摘瓜:"bào wàn zhāi guā",抱法处势:"bào fǎ chǔ shì",褒贬与夺:"bāo biǎn yǔ duó",帮闲钻懒:"bāng xián zuān lǎn",拜将封侯:"bài jiàng fēng hóu",百兽率舞:"bǎi shòu shuài wǔ",百孔千创:"bǎi kǒng qiān chuāng",白衣卿相:"bái yī qīng xiàng",白首为郎:"bái shǒu wéi láng",白首相知:"bái shǒu xiāng zhī",把玩无厌:"bǎ wán wú yàn",拔锅卷席:"bá guō juǎn xí",拔本塞源:"bá běn sè yuán",傲不可长:"ào bù kě zhǎng",熬更守夜:"áo gēng shǒu yè",安时处顺:"ān shí chǔ shùn",安身为乐:"ān shēn wéi lè",安老怀少:"ān lǎo huái shào",安步当车:"ān bù dàng chē",爱人好士:"ài rén hào shì",矮人观场:"ǎi rén guān chǎng",捱风缉缝:"ái fēng jī fèng",挨山塞海:"āi shān sè hǎi",阿家阿翁:"ā jiā ā wēng",阿党相为:"ē dǎng xiāng wéi",追亡逐北:"zhuī wáng zhú běi",竹篮打水:"zhú lán dá shuǐ",知疼着热:"zhī téng zháo rè",语不惊人:"yǔ bù jīng rén",于今为烈:"yú jīn wéi liè",一日三省:"yí rì sān xǐng",穴居野处:"xué jū yě chǔ",五脊六兽:"wǔ jǐ liù shòu",无声无臭:"wú shēng wú xiù",谓予不信:"wèi yú bú xìn",舍身为国:"shě shēn wéi guó",杀妻求将:"shā qī qiú jiàng",强作解人:"qiǎng zuò jiě rén",气冲斗牛:"qì chōng dǒu niú",临深履薄:"lín shēn lǚ bó",钧天广乐:"jūn tiān guǎng yuè",艰难竭蹶:"jiān nán jié jué",夹七夹八:"jiā qī jiā bā",混混噩噩:"hún hún è è",厚古薄今:"hòu gǔ bó jīn",鬼怕恶人:"guǐ pà è rén",伽马射线:"gā mǎ shè xiàn",佛头着粪:"fó tóu zhuó fèn",奉为至宝:"fèng wéi zhì bǎo",登坛拜将:"dēng tán bài jiàng",晨昏定省:"chén hūn dìng xǐng",察察为明:"chá chá wéi míng",博闻强识:"bó wén qiáng zhì",避难就易:"bì nán jiù yì",了无生机:"liǎo wú shēng jī",有一说一:"yǒu yī shuō yī",独一无二:"dú yī wú èr",说一不二:"shuō yī bù èr",举一反三:"jǔ yī fǎn sān",数一数二:"shǔ yī shǔ èr",杀一儆百:"shā yī jǐng bǎi",丁一卯二:"dīng yī mǎo èr",丁一确二:"dīng yī què èr",不一而止:"bù yī ér zhǐ",无一幸免:"wú yī xìng miǎn",表里不一:"biǎo lǐ bù yī",良莠不一:"liáng yǒu bù yī",心口不一:"xīn kǒu bù yī",言行不一:"yán xíng bù yī",政令不一:"zhèng lìng bù yī",参差不一:"cēn cī bù yī",纷纷不一:"fēn fēn bù yī",毁誉不一:"huǐ yù bù yī",不一而三:"bù yī ér sān",百不一遇:"bǎi bù yī yù",言行抱一:"yán xíng bào yī",瑜百瑕一:"yú bǎi xiá yī",背城借一:"bèi chéng jiè yī",凭城借一:"píng chéng jiè yī",劝百讽一:"quàn bǎi fěng yī",群居和一:"qún jū hé yī",百不获一:"bǎi bù huò yī",百不失一:"bǎi bù shī yī",百无失一:"bǎi wú shī yī",万不失一:"wàn bù shī yī",万无失一:"wàn wú shī yī",合而为一:"hé ér wéi yī",合两为一:"hé liǎng wéi yī",合二为一:"hé èr wéi yī",天下为一:"tiān xià wéi yī",相与为一:"xiāng yǔ wéi yī",较若画一:"jiào ruò huà yī",较如画一:"jiào rú huà yī",斠若画一:"jiào ruò huà yī",言行若一:"yán xíng ruò yī",始终若一:"shǐ zhōng ruò yī",终始若一:"zhōng shǐ ruò yī",惟精惟一:"wéi jīng wéi yī",众多非一:"zhòng duō fēi yī",不能赞一:"bù néng zàn yī",问一答十:"wèn yī dá shí",一不扭众:"yī bù niǔ zhòng",一以贯之:"yī yǐ guàn zhī",一以当百:"yī yǐ dāng bǎi",百不当一:"bǎi bù dāng yī",十不当一:"shí bù dāng yī",以一警百:"yǐ yī jǐng bǎi",以一奉百:"yǐ yī fèng bǎi",以一持万:"yǐ yī chí wàn",以一知万:"yǐ yī zhī wàn",百里挑一:"bǎi lǐ tiāo yī",整齐划一:"zhěng qí huà yī",一来二去:"yī lái èr qù",一路公交:"yī lù gōng jiāo",一路汽车:"yī lù qì chē",一路巴士:"yī lù bā shì",朝朝朝落:"zhāo cháo zhāo luò",曲意逢迎:"qū yì féng yíng",一行不行:"yì háng bù xíng",行行不行:"háng háng bù xíng"},Zne=Object.keys(DC).map(e=>({zh:e,pinyin:DC[e],probability:2e-8,length:4,priority:Mr.Normal,dict:Symbol("dict4")})),RC={巴尔干半岛:"bā ěr gàn bàn dǎo",巴尔喀什湖:"bā ěr kā shí hú",不幸而言中:"bú xìng ér yán zhòng",布尔什维克:"bù ěr shí wéi kè",何乐而不为:"hé lè ér bù wéi",苛政猛于虎:"kē zhèng měng yú hǔ",蒙得维的亚:"méng dé wéi dì yà",民以食为天:"mín yǐ shí wéi tiān",事后诸葛亮:"shì hòu zhū gě liàng",物以稀为贵:"wù yǐ xī wéi guì",先下手为强:"xiān xià shǒu wéi qiáng",行行出状元:"háng háng chū zhuàng yuan",亚得里亚海:"yà dé lǐ yà hǎi",眼不见为净:"yǎn bú jiàn wéi jìng",竹筒倒豆子:"zhú tǒng dào dòu zi"},Gne=Object.keys(RC).map(e=>({zh:e,pinyin:RC[e],probability:2e-8,length:5,priority:Mr.Normal,dict:Symbol("dict5")}));function zC(e,t){return e&&(e.decimal<t.decimal||e.decimal===t.decimal&&e.probability>t.probability)?e:t}function OC(e){e.probability<1e-300&&(e.probability*=1e300,e.decimal+=1)}function Qne(e){return e.priority===Mr.Custom?-(e.length*e.length*100):e.priority===Mr.Surname?-(e.length*e.length*10):0}function Yne(e,t){const n=[];let i=e.length-1,s=e[i];for(let o=t-1;o>=0;o--){const r=o+1>=t?{probability:1,decimal:0,patterns:[]}:n[o+1];for(;s&&s.index+s.length-1===o;){const a=s.index,u={probability:s.probability*r.probability,decimal:r.decimal+Qne(s),patterns:r.patterns,concatPattern:s};OC(u),n[a]=zC(n[a],u),s=e[--i]}const l={probability:1e-13*r.probability,decimal:0,patterns:r.patterns};OC(l),n[o]=zC(n[o],l),n[o].concatPattern&&(n[o].patterns=n[o].patterns.concat(n[o].concatPattern),n[o].concatPattern=void 0,delete n[o+1])}return n[0].patterns.reverse()}function PC(e,t){return e&&e.count<=t.count?e:t}function Jne(e){return e.priority===Mr.Custom?-(e.length*e.length*1e5):e.priority===Mr.Surname?-(e.length*e.length*100):1}function Xne(e,t){const n=[];let i=e.length-1,s=e[i];for(let o=t-1;o>=0;o--){const r=o+1>=t?{count:0,patterns:[]}:n[o+1];for(;s&&s.index+s.length-1===o;){const a=s.index,u={count:Jne(s)+r.count,patterns:r.patterns,concatPattern:s};n[a]=PC(n[a],u),s=e[--i]}const l={count:1+r.count,patterns:r.patterns};n[o]=PC(n[o],l),n[o].concatPattern&&(n[o].patterns=n[o].patterns.concat(n[o].concatPattern),n[o].concatPattern=void 0,delete n[o+1])}return n[0].patterns.reverse()}function eie(e,t){return!(t.index+t.length<=e.index||t.priority>e.priority||t.priority===e.priority&&t.length>e.length)}function tie(e){const t=[];for(let n=e.length-1;n>=0;){const{index:i}=e[n];let s=n-1;for(;s>=0&&eie(e[n],e[s]);)s--;(s<0||e[s].index+e[s].length<=i)&&t.push(e[n]),n=s}return t.reverse()}var jC;(function(e){e[e.ReverseMaxMatch=1]="ReverseMaxMatch",e[e.MaxProbability=2]="MaxProbability",e[e.MinTokenization=3]="MinTokenization"})(jC||(jC={}));class HC{constructor(t,n="",i=""){this.children=new Map,this.fail=null,this.patterns=[],this.parent=t,this.prefix=n,this.key=i}}class nie{constructor(){this.dictMap=new Map,this.queues=[],this.root=new HC(null)}build(t){this.buildTrie(t),this.buildFailPointer()}buildTrie(t){for(let n of t){const i=N3(n.zh);let s=this.root;for(let o=0;o<i.length;o++){let r=i[o];if(!s.children.has(r)){const l=new HC(s,i.slice(0,o).join(""),r);s.children.set(r,l),this.addNodeToQueues(l)}s=s.children.get(r)}this.insertPattern(s.patterns,n),n.node=s,this.addPatternToDictMap(n)}}buildFailPointer(){let t=[],n=0;for(this.queues.forEach(i=>{t=t.concat(i)}),this.queues=[];t.length>n;){let i=t[n++],s=i.parent&&i.parent.fail,o=i.key;for(;s&&!s.children.has(o);)s=s.fail;s?i.fail=s.children.get(o):i.fail=this.root}}addPatternToDictMap(t){this.dictMap.has(t.dict)||this.dictMap.set(t.dict,new Set),this.dictMap.get(t.dict).add(t)}addNodeToQueues(t){this.queues[sl(t.prefix)]||(this.queues[sl(t.prefix)]=[]),this.queues[sl(t.prefix)].push(t)}insertPattern(t,n){for(let i=t.length-1;i>=0;i--){const s=t[i];if(n.priority===s.priority&&n.probability>=s.probability)t[i+1]=s;else if(n.priority>s.priority)t[i+1]=s;else{t[i+1]=n;return}}t[0]=n}removeDict(t){this.dictMap.has(t)&&(this.dictMap.get(t).forEach(i=>{i.node.patterns=i.node.patterns.filter(s=>s!==i)}),this.dictMap.delete(t))}match(t,n){let i=this.root,s=[];const o=N3(t);for(let r=0;r<o.length;r++){let l=o[r];for(;i!==null&&!i.children.has(l);)i=i.fail;if(i===null)i=this.root;else{i=i.children.get(l);const a=i.patterns.find(c=>n==="off"?c.priority!==Mr.Surname:n==="head"?c.length-1-r===0:!0);a&&s.push(Object.assign(Object.assign({},a),{index:r-a.length+1}));let u=i.fail;for(;u!==null;){const c=u.patterns.find(d=>n==="off"?d.priority!==Mr.Surname:n==="head"?d.length-1-r===0:!0);c&&s.push(Object.assign(Object.assign({},c),{index:r-c.length+1})),u=u.fail}}}return s}search(t,n,i=2){const s=this.match(t,n);return i===1?tie(s):i===3?Xne(s,sl(t)):Yne(s,sl(t))}}const iie=[...Gne,...Zne,...Vne,...Kne,...Hne,...Une],EL=new nie;EL.build(iie);const sie=new ML,oie=()=>sie,rie=[];function lie(){return rie}const Kh=e=>{const t=xu.get(e);return t?t.split(" ")[0]:e},aie=e=>{const t=[],n=lie();for(let i=0;i<e.length;i++){const s=e[i],o=s.charCodeAt(0);n[o]?t[i]=n[o]:t[i]=s}return t.join("")},uie=(e,t,n,i,s)=>{const o=s?aie(e):e,r=EL.search(o,n,i);let l=0;const a=N3(e);for(let u=0;u<a.length;){const c=r[l];if(c&&u===c.index){if(c.length===1&&c.priority<=Mr.Normal){const p=a[u];c.zh=p;let g="";g=WC(p,a[u-1],a[u+1]),t[u]={origin:p,result:g,isZh:g!==p,originPinyin:g},u++,l++;continue}const d=c.pinyin.split(" ");let f=0;s&&(c.zh=a.slice(c.index,c.index+c.length).join(""));for(let p=0;p<c.length;p++)t[u+p]={origin:a[p+c.index],result:d[f]||"",isZh:!0,originPinyin:d[f]||""},f++;u+=c.length,l++}else{const d=a[u];let f="";f=WC(d,a[u-1],a[u+1]),t[u]={origin:d,result:f,isZh:f!==d,originPinyin:f},u++}}return{list:t,matches:r}},uv=e=>e.replace(/(ā|á|ǎ|à)/g,"a").replace(/(ō|ó|ǒ|ò)/g,"o").replace(/(ē|é|ě|è)/g,"e").replace(/(ī|í|ǐ|ì)/g,"i").replace(/(ū|ú|ǔ|ù)/g,"u").replace(/(ǖ|ǘ|ǚ|ǜ)/g,"ü").replace(/(n̄|ń|ň|ǹ)/g,"n").replace(/(m̄|ḿ|m̌|m̀)/g,"m").replace(/(ê̄|ế|ê̌|ề)/g,"ê"),TL=(e,t="off")=>{const n=oie();let i=xu.get(e)?xu.get(e).split(" "):[];if(n.get(e))i=n.get(e).split(" ");else if(t!=="off"){const s=F3[e];s&&(i=[s].concat(i.filter(o=>o!==s)))}return i},cie=(e,t="off")=>{let n=TL(e,t);return n.length>0?n.map(i=>({origin:e,result:i,isZh:!0,originPinyin:i})):[{origin:e,result:e,isZh:!1,originPinyin:e}]},Mm=(e,t)=>{const n=e.split(" "),i=[],s=[];for(let o of n)for(let r of Dne)if(o.startsWith(r)){let l=o.slice(r.length);Rne.indexOf(r)!==-1&&zne.indexOf(l)!==-1&&(l=One[l]),i.push(r),s.push(l);break}return t==="standard"&&i.forEach((o,r)=>{(o==="y"||o==="w")&&(i[r]="")}),{final:s.join(" "),initial:i.join(" ")}},Sg=e=>{const{final:t}=Mm(e);let n="",i="",s="";return Pne.indexOf(uv(t))!==-1?(n=t[0],i=t[1],s=t.slice(2)):(i=t[0]||"",s=t.slice(1)||""),{head:n,body:i,tail:s}},cv=e=>{const t=/(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/,n=/(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/,i=/(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/,s=/(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/,o=/(a|o|e|i|u|ü|ê)/,r=/(n|m)$/,l=[];return e.split(" ").forEach(u=>{t.test(u)?l.push("1"):n.test(u)?l.push("2"):i.test(u)?l.push("3"):s.test(u)?l.push("4"):o.test(u)||r.test(u)?l.push("0"):l.push("")}),l.join(" ")},die=(e,t)=>{const n=uv(e).split(" "),i=cv(t).split(" "),s=[];return n.forEach((o,r)=>{s.push(`${o}${i[r]}`)}),s.join(" ")},LL=(e,t)=>{const n=[];return e.split(" ").forEach(s=>{n.push(t?s[0]:s)}),n.join(" ")};function fie(e,t,n){if(qne.indexOf(e)===-1)return Kh(e);if(t===n&&t&&Kh(t)!==t)return uv(Kh(e));if(n&&!Wne[e].includes(n)){const i=Kh(n);if(i!==n){const s=cv(i),o=IL[e];for(let r in o)if(o[r].indexOf(Number(s))!==-1)return r}}}function hie(e,t){if(e==="了"&&(!t||!xu.get(t)))return"liǎo"}function pie(e,t){if(e==="々")return!t||!xu.get(t)?"tóng":xu.get(t).split(" ")[0]}function WC(e,t,n){return pie(e,t)||hie(e,t)||fie(e,t,n)||Kh(e)}const gie=e=>typeof e!="string"?(console.error("The first param of pinyin is error: "+e+' is not assignable to type "string".'),!1):!0;function ay(e,t){return t instanceof RegExp?t.test(e):!0}const mie=(e,t)=>{let n=t.nonZh;if(n==="removed")return e.filter(i=>i.isZh||!ay(i.origin,t.nonZhScope));if(n==="consecutive"){for(let i=e.length-2;i>=0;i--){const s=e[i],o=e[i+1];!s.isZh&&!o.isZh&&ay(s.origin,t.nonZhScope)&&ay(o.origin,t.nonZhScope)&&(s.origin+=o.origin,s.result+=o.result,o.delete=!0)}return e.filter(i=>!i.delete)}else return e},qC=(e,t)=>sl(e)===1&&t.multiple?cie(e,t.surname):!1,vie=(e,t)=>{switch(t.pattern){case"pinyin":break;case"num":e.forEach(n=>{n.result=n.isZh?cv(n.result):""});break;case"initial":e.forEach(n=>{n.result=n.isZh?Mm(n.result,t.initialPattern).initial:""});break;case"final":e.forEach(n=>{n.result=n.isZh?Mm(n.result,t.initialPattern).final:""});break;case"first":e.forEach(n=>{n.result=LL(n.result,n.isZh)});break;case"finalHead":e.forEach(n=>{n.result=n.isZh?Sg(n.result).head:""});break;case"finalBody":e.forEach(n=>{n.result=n.isZh?Sg(n.result).body:""});break;case"finalTail":e.forEach(n=>{n.result=n.isZh?Sg(n.result).tail:""});break}},yie=(e,t)=>{switch(t.toneType){case"symbol":break;case"none":e.forEach(n=>{n.isZh&&(n.result=uv(n.result))});break;case"num":{e.forEach(n=>{n.isZh&&(n.result=die(n.result,n.originPinyin))});break}}},bie=(e,t)=>{t.v&&e.forEach(n=>{n.isZh&&(n.result=n.result.replace(/ü/g,typeof t.v=="string"?t.v:"v"))})},kie=(e,t,n)=>{if(t.multiple&&sl(n)===1){let i="";e=e.filter(s=>{const o=s.result!==i;return i=s.result,o})}return t.type==="array"?e.map(i=>i.result):t.type==="all"?e.map(i=>{const s=i.isZh?i.result:"",{initial:o,final:r}=Mm(s,t.initialPattern),{head:l,body:a,tail:u}=Sg(s);let c=[];return s!==""&&(c=[s].concat(TL(i.origin,t.surname).filter(d=>d!==s))),{origin:i.origin,pinyin:s,initial:o,final:r,first:LL(i.result,i.isZh),finalHead:l,finalBody:a,finalTail:u,num:Number(cv(i.originPinyin)),isZh:i.isZh,polyphonic:c,inZhRange:!!xu.get(i.origin),result:i.result}}):e.map(i=>i.result).join(t.separator)},Aie=(e,t)=>(t===!1&&e.forEach(n=>{n.origin==="一"?n.result=n.originPinyin="yī":n.origin==="不"&&(n.result=n.originPinyin="bù")}),e),Cie={pattern:"pinyin",toneType:"symbol",type:"string",multiple:!1,mode:"normal",removeNonZh:!1,nonZh:"spaced",v:!1,separator:" ",toneSandhi:!0,segmentit:2};function Im(e,t){if(t=Object.assign(Object.assign({},Cie),t||{}),!gie(e))return e;if(e==="")return t.type==="array"||t.type==="all"?[]:"";t.surname===void 0&&(t.mode==="surname"?t.surname="all":t.surname="off"),t.type==="all"&&(t.pattern="pinyin"),t.pattern==="num"&&(t.toneType="none"),t.removeNonZh&&(t.nonZh="removed");let i=Array(sl(e)),{list:s}=uie(e,i,t.surname,t.segmentit,t.traditional);return s=Aie(s,t.toneSandhi),s=mie(s,t),qC(e,t)&&(s=qC(e,t)),vie(s,t),yie(s,t),bie(s,t),kie(s,t,e)}var B3;(function(e){e[e.AllSegment=1]="AllSegment",e[e.AllArray=2]="AllArray",e[e.AllString=3]="AllString",e[e.PinyinSegment=4]="PinyinSegment",e[e.PinyinArray=5]="PinyinArray",e[e.PinyinString=6]="PinyinString",e[e.ZhSegment=7]="ZhSegment",e[e.ZhArray=8]="ZhArray",e[e.ZhString=9]="ZhString"})(B3||(B3={}));B3.AllSegment;const NL=[{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"},{name:"/goal",desc:"commands.goal.desc"},{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 wie(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 Em="skill:";function xie(e){return e.startsWith(Em)?e.slice(Em.length):e}function FL(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${Em}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...NL,...t]}const UC=new Map;function BL(e){let t=UC.get(e);if(!t){const n=Im(e,{toneType:"none",type:"array"}),i=Im(e,{pattern:"first",toneType:"none",type:"array"});t=_ie(e,n,i),UC.set(e,t)}return t}const KC={full:[],first:[],offsets:[],literal:[]};function _ie(e,t,n){if(t.length!==n.length)return KC;const i=[],s=[];let o=0;for(let r=0;r<t.length;r++){i.push(o);const l=t[r];l.length>0&&e.slice(o,o+l.length).toLowerCase()===l.toLowerCase()?(s.push(!0),o+=l.length):(s.push(!1),o+=Array.from(e.slice(o))[0]?.length??0)}return i.push(o),o!==e.length?KC:{full:t,first:n,offsets:i,literal:s}}function $3(e,t,n,i){const s=e[t];let o=0,r=-1,l=-1,a=0,u=0;for(let f=0;f<s.length;f++){const p=o+(s[f]?.length??0);if(r<0&&n<p&&(r=f,a=o),i<=p){l=f,u=o;break}o=p}if(r<0||l<0)return;const c=e.literal[r]?e.offsets[r]+(n-a):e.offsets[r],d=e.literal[l]?e.offsets[l]+(i-u):e.offsets[l+1];return[c,d]}const VC=new Map;function Sie(e){let t=VC.get(e);return t||(t={full:Im(e,{toneType:"none",type:"string",separator:""}),first:Im(e,{pattern:"first",toneType:"none",type:"string",separator:""})},VC.set(e,t)),t}function $L(e,t){const n=e.toLowerCase().indexOf(t);return n<0?void 0:[n,n+t.length]}function Mie(e,t){const n=e.toLowerCase();let i=0,s=-1,o=-1;for(let r=0;r<n.length&&i<t.length;r++)n[r]===t[i]&&(i===0&&(s=r),o=r,i++);return i===t.length?[s,o+1]:void 0}function Iie(e,t){return $L(e,t)??Mie(e,t)}function Eie(e,t){const n=$L(e,t);if(n)return n;if(!/^[\x21-\x7e]+$/.test(t))return;const i=BL(e),s=i.first.join("").indexOf(t);if(s>=0)return $3(i,"first",s,s+t.length);const o=i.full.join("").indexOf(t);if(!(o<0))return $3(i,"full",o,o+t.length)}function Tie(e,t,n){const i=e.trim().replace(/^\//,"").toLowerCase();if(i==="")return{};const s=Iie(t,i),o=Eie(n,i);return{name:s?[s]:void 0,desc:o?[o]:void 0}}const Lie={keys:[{name:"name",weight:3},{name:"desc",weight:1},{name:"pinyinFull",weight:1},{name:"pinyinFirst",weight:1}],includeScore:!0,includeMatches:!0,ignoreLocation:!0,threshold:.4};function Nie(e,t){const n=e.toLowerCase(),i=t.toLowerCase();return n===i?0:n.startsWith(i)?1:2}function ZC(e){const t=[...e].sort((i,s)=>i[0]-s[0]),n=[];for(const i of t){const s=n[n.length-1];s&&i[0]<=s[1]?s[1]=Math.max(s[1],i[1]):n.push([...i])}return n}function Fie(e,t){const n=[],i=[];for(const s of t??[])for(const[o,r]of s.indices)if(s.key==="name")n.push([o+1,r+2]);else if(s.key==="desc")i.push([o,r+1]);else if(s.key==="pinyinFirst"||s.key==="pinyinFull"){const l=$3(BL(e.desc),s.key==="pinyinFirst"?"first":"full",o,r+1);l&&i.push(l)}return{name:n.length>0?ZC(n):void 0,desc:i.length>0?ZC(i):void 0}}function Bie(e,t=NL,n=i=>i.desc){const i=e.trim().replace(/^\//,"");if(i==="")return t.map(o=>({item:o,ranges:{}}));const s=t.map((o,r)=>{const l=n(o),a=Sie(l);return{index:r,item:o,name:o.name.replace(/^\//,""),desc:l,pinyinFull:a.full,pinyinFirst:a.first}});return new Nne(s,Lie).search(i).map(({item:o,score:r,matches:l})=>({doc:o,score:r??1,rank:Nie(o.name,i),ranges:Fie(o,l)})).sort((o,r)=>o.rank!==r.rank?o.rank-r.rank:o.score!==r.score?o.score-r.score:o.doc.index-r.doc.index).map(({doc:o,ranges:r})=>({item:o.item,ranges:r}))}function $ie(e,t){if(t.length===0||e.length===0)return t;const n=Date.parse(t[0].createdAt);if(Number.isNaN(n))return t;const i=new Set(t.map(r=>r.id)),s=new Set(t.flatMap(r=>r.role==="user"&&r.promptId!==void 0?[r.promptId]:[])),o=e.filter(r=>{const l=Date.parse(r.createdAt);return!(Number.isNaN(l)||l>=n||i.has(r.id)||r.role==="user"&&(r.userMessageId!==void 0&&i.has(r.userMessageId)||r.promptId!==void 0&&s.has(r.promptId)))});return o.length>0?[...o,...t]:t}function Die(e){const t=new Map,n=new Set;function i(o){const r=t.get(o);if(r!==void 0)return r;const l=(async()=>e(o))().finally(()=>{t.delete(o),n.delete(o)&&i(o)});return t.set(o,l),l}function s(o){if(t.has(o)){n.add(o);return}i(o)}return{run:i,request:s}}const un={permission:"kimi-web.permission",activeWorkspace:"kimi-active-workspace",planArmed:"kimi-web.plan-armed",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",workspaceSort:"kimi-web.workspace-sort",workspaceRecencyFloor:"kimi-web.workspace-recency-floor",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",openInDefaultTarget:"kimi-web.open-in.default-target",openInLastTarget:"kimi-web.open-in.last-target",sidebarCollapsed:"kimi-web.sidebar-collapsed",sidebarWidth:"kimi-web.sidebar-width",sidebarViewMode:"kimi-web.sidebar-view-mode",shortcutOverrides:"kimi-web.shortcut-overrides",dockIconChoice:"kimi-web.dock-icon-choice",updateSkippedVersion:"kimi-web.update-skipped-version",planMode:"kimi-web.plan-mode",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 GC(e){return`kimi-web.draft.${e&&e.length>0?e:"__new__"}`}function uo(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Ns(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function lr(e){try{globalThis.localStorage.removeItem(e)}catch{}}function od(e){const t=uo(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function Pu(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function K5(){const e=uo(un.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[i,s]of Object.entries(t))s===!0&&(n[i]=!0);return n}catch{return{}}}function V5(e){const n={...K5()};for(const[i,s]of Object.entries(e))s?n[i]=!0:delete n[i];Ns(un.unread,JSON.stringify(n))}function Rie(){const e=od(un.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function uy(e){Pu(un.collapsedWorkspaces,Array.from(e))}function zie(){return od(un.pinnedCollapsed)===!0}function D3(e){Pu(un.pinnedCollapsed,e)}function Oie(){return uo(un.sidebarViewMode)==="flat"?"flat":"grouped"}function Pie(e){Ns(un.sidebarViewMode,e)}function jie(){const e=od(un.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function DL(e){Pu(un.workspaceOrder,Array.from(e))}function Hie(){return uo(un.workspaceSort)==="recent"?"recent":"manual"}function Wie(e){Ns(un.workspaceSort,e)}function qie(){const e=od(un.workspaceRecencyFloor);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="number"&&Number.isFinite(i)&&(t[n]=i);return t}function RL(e){Pu(un.workspaceRecencyFloor,e)}function zL(){const e=od(un.pinnedSessions);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function dv(e){Pu(un.pinnedSessions,Array.from(e))}function P0(){const e=od(un.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="string"&&(t[n]=i);return t}function QC(e){Pu(un.workspaceNameOverrides,e)}function YC(e,t){const n=new Set(e.map(a=>a.id)),i=t.filter(a=>a.kind==="subagent"&&!n.has(a.id));if(i.length===0)return e;const s=new Map(e.map(a=>[a.id,a])),o=new Set,r=i.map(a=>{const u=a.backgroundTaskId!==void 0?s.get(a.backgroundTaskId):void 0;if(u===void 0)return a;o.add(u.id);const c=a.status==="running"&&u.status!=="running";return{...a,status:a.status==="running"?u.status:a.status,subagentPhase:c?u.status==="completed"?"completed":"failed":a.subagentPhase,completedAt:u.completedAt??a.completedAt,completedAtEstimated:u.completedAt!==void 0?void 0:a.completedAtEstimated,outputPreview:u.outputPreview??a.outputPreview,outputBytes:u.outputBytes??a.outputBytes,model:a.model??u.model,thinkingEffort:a.thinkingEffort??u.thinkingEffort}});return[...e.filter(a=>!o.has(a.id)),...r]}function Uie(e,t){if(e.length===0)return t;const n=new Map(t.map(r=>[r.id,r])),i=new Set(e.map(r=>r.id)),s=e.map(r=>{const l=n.get(r.id);if(!l)return r;const a=r.completedAt===void 0&&l.completedAt===void 0&&l.status==="running"&&r.status!=="running";return{...r,outputLines:l.outputLines,text:l.text,completedAt:r.completedAt??l.completedAt??(a?new Date().toISOString():void 0),completedAtEstimated:r.completedAt!==void 0?void 0:l.completedAt!==void 0?l.completedAtEstimated:a?!0:void 0,model:r.model??l.model,thinkingEffort:r.thinkingEffort??l.thinkingEffort}}),o=t.filter(r=>!i.has(r.id));return o.length===0?s:[...s,...o]}function Kie(){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 Vie(e,t=Kie()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyF"||e.key.toLowerCase()==="f")&&!e.defaultPrevented}const Zie=new Map([["ς","σ"],["ß","ss"],["ſ","s"],["ff","ff"],["fi","fi"],["fl","fl"],["ffi","ffi"],["ffl","ffl"],["ſt","st"],["st","st"],["ʼn","ʼn"],["µ","μ"],["K","k"],["Å","å"],["Ω","ω"]]);function Gie(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function Qie(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 i="";const s=[];let o=!1;for(let r=0;r<e.length;r++)n.test(e[r])?o||(i+=" ",s.push(r),o=!0):(i+=e[r],s.push(r),o=!1);return{text:i,map:s}}function JC(e){let t="";const n=[];let i=0;for(const s of e){const o=s.toLowerCase(),r=Zie.get(o)??o;t+=r;for(let l=0;l<r.length;l++)n.push({start:i,length:s.length});i+=s.length}return{folded:t,map:n}}function*Yie(e,t){if(t.length===0||e.length===0)return;const n=e.map(c=>JC(c.text)),i="\0";let s="";const o=[];for(let c=0;c<e.length;c++)c>0&&e[c].gapBefore&&(s+=i),o[c]=s.length,s+=n[c].folded;const r=Xie(JC(t).folded);if(r===null)return;const l=new RegExp(r,"g");function a(c){let d=0,f=o.length-1,p=0;for(;d<=f;){const g=d+f>>1;o[g]<=c?(p=g,d=g+1):f=g-1}return p}let u;for(;;){const c=l.exec(s);if(c===null)return;const d=c.index,f=d+c[0].length-1,p=a(d),g=a(f),m=n[p].map[d-o[p]],y=n[g].map[f-o[g]],w={startSeg:p,startOffset:m.start,endSeg:g,endOffset:y.start+y.length};u!==void 0&&u.startSeg===w.startSeg&&u.startOffset===w.startOffset&&u.endSeg===w.endSeg&&u.endOffset===w.endOffset||(u=w,yield w)}}const Jie=/[.*+?^${}()|[\]\\]/g;function Xie(e){const t=[];let n=0;for(;n<e.length;){const i=/^\s+/.exec(e.slice(n));if(i!==null){t.push("\\s+"),n+=i[0].length;continue}const s=/^[^\s]+/.exec(e.slice(n));t.push(s[0].replaceAll(Jie,"\\$&")),n+=s[0].length}return t.length===0?null:t.join("")}const XC="script, style, noscript, template, [inert], .top-sentinel",ese=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BR","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),tse=new Set(["inline","inline-block","inline-flex","inline-grid","inline-table","contents","ruby"]);function nse(e,t){const n=t.get(e);if(n!==void 0)return n;const i=ese.has(e.tagName)||!tse.has(getComputedStyle(e).display);return t.set(e,i),i}function ise(e,t,n){let i=e.parentElement;for(;i!==null&&i!==t&&!nse(i,n);)i=i.parentElement;return i??t}const sse=1e3;function ose(e,t){if(t.length===0)return{ranges:[],truncated:!1};const n=e.ownerDocument,i=n.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode(u){return u.nodeType===Node.ELEMENT_NODE?u.matches(XC)?NodeFilter.FILTER_REJECT:u.matches("br, hr, wbr")&&!u.closest(XC)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),s=new WeakMap,o=new WeakMap,r=[];let l=!1;for(let u=i.nextNode();u!==null;u=i.nextNode()){if(u.nodeType===Node.ELEMENT_NODE){l=!0;continue}const c=u.nodeValue??"";if(c.length===0)continue;const d=u.parentElement;if(d===null)continue;let f=o.get(d);f===void 0&&(f=Gie(getComputedStyle(d).whiteSpace),o.set(d,f));let{text:p,map:g}=Qie(c,f);if(p.length===0)continue;const m=ise(u,e,s),y=r.at(-1),w=l||y===void 0||y.block!==m;!w&&y.text.endsWith(" ")&&p.startsWith(" ")&&(p=p.slice(1),g=g.slice(1),p.length===0)||(r.push({text:p,gapBefore:w,node:u,block:m,wsMap:g}),l=!1)}const a=[];for(const u of Yie(r,t)){const c=r[u.startSeg],d=r[u.endSeg],f=n.createRange();if(f.setStart(c.node,c.wsMap[u.startOffset]),f.setEnd(d.node,d.wsMap[u.endOffset-1]+1),f.getClientRects().length!==0){if(a.length>=sse)return{ranges:a,truncated:!0};a.push(f)}}return{ranges:a,truncated:!1}}const OL="kimi-transcript-search",R3="kimi-transcript-search-current";function PL(){return globalThis.CSS?.highlights??null}function cy(e,t){const n=PL(),i=globalThis.Highlight;if(!n||!i)return;if(e.length===0){z3();return}const s=new i;for(const r of e)s.add(r);n.set(OL,s);const o=e[t];if(o!==void 0){const r=new i;r.add(o),n.set(R3,r)}else n.delete(R3)}function z3(){const e=PL();e?.delete(OL),e?.delete(R3)}function rse(){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 lse(e,t=rse()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyA"||e.key.toLowerCase()==="a")&&!e.defaultPrevented}function ase(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement&&(e.isContentEditable||e.closest("input, textarea")!==null)}function use(e,t){return typeof Element>"u"||!(e instanceof Element)?null:e.closest(t)}function ew(e){e.ownerDocument.getSelection()?.selectAllChildren(e)}const cse=`https://www.kimi.com/code?from=${Wf?"kimi_code_desktop":"kimi_code_web"}`;function Cp(){window.open(cse,"_blank","noopener")}function dse(e,t,n){if(e.length===0)return null;const i=new Set(e),s=t.filter(r=>i.has(r)),o=e.filter(r=>!t.includes(r));return o.length===0&&s.length===t.length?null:t.length===0&&n!==void 0?o.toSorted((r,l)=>(n.get(l)??Number.NEGATIVE_INFINITY)-(n.get(r)??Number.NEGATIVE_INFINITY)):[...o,...s]}function fse(e,t){const n=new Map(t.map((i,s)=>[i,s]));return e.toSorted((i,s)=>(n.get(i.id)??-1)-(n.get(s.id)??-1))}function hse(e,t,n,i="before"){const s=e.indexOf(t),o=e.indexOf(n);if(s===-1||o===-1||s===o)return e;const r=[...e];r.splice(s,1);const l=s<o?o-1:o,a=i==="before"?l:l+1;return r.splice(a,0,t),r}function pse(e,t){return e.toSorted((n,i)=>(t.get(i.id)??Number.NEGATIVE_INFINITY)-(t.get(n.id)??Number.NEGATIVE_INFINITY))}function gse(e,t){let n=!1;const i={...e};for(const[s,o]of t)o>(i[s]??Number.NEGATIVE_INFINITY)&&(i[s]=o,n=!0);return{next:i,changed:n}}function mse(e,t){const n=new Map;for(const i of e){if(i.parentSessionId||i.archived)continue;const s=new Date(i.updatedAt).getTime();if(Number.isNaN(s))continue;const o=t(i);s>(n.get(o)??Number.NEGATIVE_INFINITY)&&n.set(o,s)}return n}function vse(e,t){const n=new Map;for(const i of e){const s=t[i.id]??Number.NEGATIVE_INFINITY,o=i.lastOpenedAt?Date.parse(i.lastOpenedAt):Number.NaN,r=Number.isNaN(o)?Number.NEGATIVE_INFINITY:o;n.set(i.id,Math.max(s,r))}return n}function yse(e,t){const n=Object.keys(e);if(!n.some(s=>!t.has(s)))return{next:e,changed:!1};const i={};for(const s of n)t.has(s)&&(i[s]=e[s]);return{next:i,changed:!0}}const bse=5;function kse(e,t,n,i=bse){if(e.length<=i)return e;const s=e.slice(0,i);if(t&&!s.some(o=>o.id===t)){const o=e.find(r=>r.id===t);o&&(s[i-1]=o)}return s}const Ase={class:"sd-body"},Cse={class:"sd-search"},wse=["aria-label"],xse={key:0,class:"sd-section","aria-hidden":"true"},_se={class:"sd-section-count"},Sse=["aria-selected","onClick","onMousemove"],Mse=["innerHTML"],Ise=["innerHTML"],Ese=["aria-selected","onClick","onMousemove"],Tse={class:"sd-line1"},Lse=["innerHTML"],Nse={class:"sd-time"},Fse={class:"sd-line2"},Bse=["innerHTML"],$se=["innerHTML"],Dse={key:1,class:"sd-empty"},Rse={class:"sd-foot","aria-hidden":"true"},zse={class:"sd-hint"},Ose={class:"sd-hint"},Pse={class:"sd-hint"},jse=200,Hse=3,Wse=tt({__name:"SearchSessionsDialog",props:{sessions:{},workspaces:{},activeId:{}},emits:["select","selectWorkspace","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=Z(!0),r=Z(""),l=Z(null),a=Z(null),u=F(()=>{const S=r.value.trim().toLowerCase(),M=[];if(S.length===0)for(const N of i.workspaces.slice(0,Hse))M.push({kind:"workspace",key:`ws:${N.id}`,hit:{workspace:N,inName:!1,inPath:!1}});else for(const N of i.workspaces){const D=N.name.toLowerCase().includes(S),T=N.shortPath.toLowerCase().includes(S);!D&&!T||M.push({kind:"workspace",key:`ws:${N.id}`,hit:{workspace:N,inName:D,inPath:T}})}const _=[];for(const N of i.sessions){const D=N.title??"",T=N.lastPrompt??"",$=N.workspaceName??"",P=S.length>0&&D.toLowerCase().includes(S),O=S.length>0&&T.toLowerCase().includes(S),R=S.length>0&&$.toLowerCase().includes(S);if(!(S.length>0&&!P&&!O&&!R)&&(_.push({kind:"session",key:`s:${N.id}`,hit:{session:N,inTitle:P,inWorkspace:R,snippetText:T?wte(T,r.value):""}}),_.length>=jse))break}return M.length>0&&_.length>0&&(M[0].section={label:n("sidebar.workspaces"),count:M.length},_[0].section={label:n("sidebar.sessionsHeader"),count:_.length}),[...M,..._]}),c=Z(0);Qe(r,()=>{c.value=0});function d(S){const M=u.value.length;return M===0?0:Math.max(0,Math.min(M-1,S))}async function f(){await kt(),a.value?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest"})}function p(S){c.value=d(c.value+S),f()}function g(S){s("select",S),s("close")}function m(S){s("selectWorkspace",S),s("close")}function y(){r.value="",l.value?.focus()}function w(){const S=u.value[c.value];S&&(S.kind==="workspace"?m(S.hit.workspace.id):g(S.hit.session.id))}function k(){return l.value?.el??null}const{handleCompositionStart:A,handleCompositionEnd:v,isComposingKeyEvent:x}=Kr();function E(S){if(x(S)){S.key==="Escape"&&S.stopPropagation();return}S.key==="ArrowDown"?(S.preventDefault(),p(1)):S.key==="ArrowUp"?(S.preventDefault(),p(-1)):S.key==="Enter"&&(S.preventDefault(),w())}return pn(()=>{l.value?.focus()}),(S,M)=>(b(),fe(h(La),{open:o.value,"onUpdate:open":M[1]||(M[1]=_=>o.value=_),title:h(n)("sidebar.searchPlaceholder"),size:"lg",height:"fixed",padded:!1,"initial-focus":k,onClose:M[2]||(M[2]=_=>s("close"))},{default:he(()=>[C("div",Ase,[C("div",Cse,[V(h(io),{ref_key:"inputRef",ref:l,modelValue:r.value,"onUpdate:modelValue":M[0]||(M[0]=_=>r.value=_),placeholder:h(n)("sidebar.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:E,onCompositionstart:h(A),onCompositionend:h(v)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),V(h(gn),{text:h(n)("sidebar.searchClear")},{default:he(()=>[C("button",{type:"button",class:De(["search-clear",{"is-on":r.value.length>0}]),tabindex:"-1","aria-label":h(n)("sidebar.searchClear"),onClick:y},[V(h(Ce),{name:"close",size:"sm"})],10,wse)]),_:1},8,["text"])]),C("div",{ref_key:"listRef",ref:a,class:"sd-list",role:"listbox"},[u.value.length>0?(b(!0),I(Be,{key:0},yt(u.value,(_,N)=>(b(),I(Be,{key:_.key},[_.section?(b(),I("div",xse,[C("span",null,B(_.section.label),1),C("span",_se,B(_.section.count),1)])):ne("",!0),_.kind==="workspace"?(b(),I("button",{key:1,class:De(["sd-row sd-row-ws",{on:N===c.value}]),role:"option","aria-selected":N===c.value,onClick:D=>m(_.hit.workspace.id),onMousemove:D=>c.value=N},[V(h(Ce),{class:"sd-folder",name:"folder-closed",size:"sm"}),C("span",{class:"sd-ws-name",innerHTML:h(_h)(_.hit.workspace.name,_.hit.inName?r.value:"")},null,8,Mse),C("span",{class:"sd-ws-path",innerHTML:h(_h)(_.hit.workspace.shortPath,_.hit.inPath?r.value:"")},null,8,Ise)],42,Sse)):(b(),I("button",{key:2,class:De(["sd-row",{on:N===c.value,active:_.hit.session.id===e.activeId}]),role:"option","aria-selected":N===c.value,onClick:D=>g(_.hit.session.id),onMousemove:D=>c.value=N},[C("span",Tse,[C("span",{class:"sd-title",innerHTML:h(_h)(_.hit.session.title,_.hit.inTitle?r.value:"")},null,8,Lse),C("span",Nse,B(_.hit.session.time),1)]),C("span",Fse,[C("span",{class:"sd-meta-ws",innerHTML:h(_h)(_.hit.session.workspaceName??_.hit.session.workspaceId??"",_.hit.inWorkspace?r.value:"")},null,8,Bse),_.hit.snippetText?(b(),I(Be,{key:0},[M[3]||(M[3]=C("span",{class:"sd-meta-sep","aria-hidden":"true"},"·",-1)),C("span",{class:"sd-meta-snippet",innerHTML:h(_h)(_.hit.snippetText,r.value)},null,8,$se)],64)):ne("",!0)])],42,Ese))],64))),128)):(b(),I("div",Dse,[V(h(eU),{title:r.value.trim()?h(n)("sidebar.searchNoResults"):h(n)("sidebar.searchEmpty")},{icon:he(()=>[V(h(Ce),{name:"search",size:"lg"})]),_:1},8,["title"])]))],512),C("div",Rse,[C("span",zse,[V(h(Aa),{keys:["↑","↓"]}),Ue(B(h(n)("sidebar.searchHintSelect")),1)]),M[4]||(M[4]=C("span",{class:"sd-dot"},"·",-1)),C("span",Ose,[V(h(Aa),{keys:["Enter"]}),Ue(B(h(n)("sidebar.searchHintOpen")),1)]),M[5]||(M[5]=C("span",{class:"sd-dot"},"·",-1)),C("span",Pse,[V(h(Aa),{keys:["Esc"]}),Ue(B(h(n)("sidebar.searchHintClose")),1)])])])]),_:1},8,["open","title"]))}}),qse=vt(Wse,[["__scopeId","data-v-5bf43f78"]]);var Use=Object.create,Z5=Object.defineProperty,Kse=Object.getOwnPropertyDescriptor,jL=Object.getOwnPropertyNames,Vse=Object.getPrototypeOf,Zse=Object.prototype.hasOwnProperty,HL=(e,t)=>function(){return t||(0,e[jL(e)[0]])((t={exports:{}}).exports,t),t.exports},Gse=e=>{let t={};for(var n in e)Z5(t,n,{get:e[n],enumerable:!0});return t},Qse=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=jL(t),o=0,r=s.length,l;o<r;o++)l=s[o],!Zse.call(e,l)&&l!==n&&Z5(e,l,{get:(a=>t[a]).bind(null,l),enumerable:!(i=Kse(t,l))||i.enumerable});return e},WL=(e,t,n)=>(n=e!=null?Use(Vse(e)):{},Qse(Z5(n,"default",{value:e,enumerable:!0}),e));function Yse(e,t,n,i){const s=Number(e[t].meta.id+1).toString();let o="";return typeof i.docId=="string"&&(o=`-${i.docId}-`),o+s}function Jse(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function Xse(e,t,n,i,s){const o=s.rules.footnote_anchor_name(e,t,n,i,s),r=s.rules.footnote_caption(e,t,n,i,s);let l=o;return e[t].meta.subId>0&&(l+=`:${e[t].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${o}" id="fnref${l}">${r}</a></sup>`}function eoe(e,t,n){return(n.xhtmlOut?`<hr class="footnotes-sep" /> +`:`<hr class="footnotes-sep"> +`)+`<section class="footnotes"> +<ol class="footnotes-list"> +`}function toe(){return`</ol> +</section> +`}function noe(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),`<li id="fn${o}" class="footnote-item">`}function ioe(){return`</li> +`}function soe(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),` <a href="#fnref${o}" class="footnote-backref">↩︎</a>`}function ooe(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=Xse,e.renderer.rules.footnote_block_open=eoe,e.renderer.rules.footnote_block_close=toe,e.renderer.rules.footnote_open=noe,e.renderer.rules.footnote_close=ioe,e.renderer.rules.footnote_anchor=soe,e.renderer.rules.footnote_caption=Jse,e.renderer.rules.footnote_anchor_name=Yse;function i(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 p;for(p=d+2;p<f;p++){if(l.src.charCodeAt(p)===32)return!1;if(l.src.charCodeAt(p)===93)break}if(p===d+2||p+1>=f||l.src.charCodeAt(++p)!==58)return!1;if(c)return!0;p++,l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.refs||(l.env.footnotes.refs={});const g=l.src.slice(d+2,p-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 y=l.bMarks[a],w=l.tShift[a],k=l.sCount[a],A=l.parentType,v=p,x=l.sCount[a]+p-(l.bMarks[a]+l.tShift[a]);let E=x;for(;p<f;){const M=l.src.charCodeAt(p);if(n(M))M===9?E+=4-E%4:E++;else break;p++}l.tShift[a]=p-v,l.sCount[a]=E-x,l.bMarks[a]=v,l.blkIndent+=4,l.parentType="footnote",l.sCount[a]<l.blkIndent&&(l.sCount[a]+=l.blkIndent),l.md.block.tokenize(l,a,u,!0),l.parentType=A,l.blkIndent-=4,l.tShift[a]=w,l.sCount[a]=k,l.bMarks[a]=y;const S=new l.Token("footnote_reference_close","",-1);return S.level=--l.level,l.tokens.push(S),!0}function s(l,a){const u=l.posMax,c=l.pos;if(c+2>=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 p=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:p},l.env.footnotes.list[p]={content:l.src.slice(d,f),tokens:g}}return l.pos=f+1,l.posMax=u,!0}function o(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;d++){if(l.src.charCodeAt(d)===32||l.src.charCodeAt(d)===10)return!1;if(l.src.charCodeAt(d)===93)break}if(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 p;l.env.footnotes.refs[`:${f}`]<0?(p=l.env.footnotes.list.length,l.env.footnotes.list[p]={label:f,count:0},l.env.footnotes.refs[`:${f}`]=p):p=l.env.footnotes.refs[`:${f}`];const g=l.env.footnotes.list[p].count;l.env.footnotes.list[p].count++;const m=l.push("footnote_ref","",0);m.meta={id:p,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 p=l.env.footnotes.list;l.tokens.push(new l.Token("footnote_block_open","",1));for(let g=0,m=p.length;g<m;g++){const y=new l.Token("footnote_open","",1);if(y.meta={id:g,label:p[g].label},l.tokens.push(y),p[g].tokens){a=[];const A=new l.Token("paragraph_open","p",1);A.block=!0,a.push(A);const v=new l.Token("inline","",0);v.children=p[g].tokens,v.content=p[g].content,a.push(v);const x=new l.Token("paragraph_close","p",-1);x.block=!0,a.push(x)}else p[g].label&&(a=f[`:${p[g].label}`]);a&&(l.tokens=l.tokens.concat(a));let w;l.tokens[l.tokens.length-1].type==="paragraph_close"?w=l.tokens.pop():w=null;const k=p[g].count>0?p[g].count:1;for(let A=0;A<k;A++){const v=new l.Token("footnote_anchor","",0);v.meta={id:g,subId:A,label:p[g].label},l.tokens.push(v)}w&&l.tokens.push(w),l.tokens.push(new l.Token("footnote_close","",-1))}l.tokens.push(new l.Token("footnote_block_close","",-1))}e.block.ruler.before("reference","footnote_def",i,{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",s),e.inline.ruler.after("footnote_inline","footnote_ref",o),e.core.ruler.after("inline","footnote_tail",r)}function roe(e){function t(i,s){const o=i.pos,r=i.src.charCodeAt(o);if(s||r!==43)return!1;const l=i.scanDelims(i.pos,!0);let a=l.length;const u=String.fromCharCode(r);if(a<2)return!1;if(a%2){const c=i.push("text","",0);c.content=u,a--}for(let c=0;c<a;c+=2){const d=i.push("text","",0);d.content=u+u,!(!l.can_open&&!l.can_close)&&i.delimiters.push({marker:r,length:0,jump:c/2,token:i.tokens.length-1,end:-1,open:l.can_open,close:l.can_close})}return i.pos+=l.length,!0}function n(i,s){let o;const r=[],l=s.length;for(let a=0;a<l;a++){const u=s[a];if(u.marker!==43||u.end===-1)continue;const c=s[u.end];o=i.tokens[u.token],o.type="ins_open",o.tag="ins",o.nesting=1,o.markup="++",o.content="",o=i.tokens[c.token],o.type="ins_close",o.tag="ins",o.nesting=-1,o.markup="++",o.content="",i.tokens[c.token-1].type==="text"&&i.tokens[c.token-1].content==="+"&&r.push(c.token-1)}for(;r.length;){const a=r.pop();let u=a+1;for(;u<i.tokens.length&&i.tokens[u].type==="ins_close";)u++;u--,a!==u&&(o=i.tokens[u],i.tokens[u]=i.tokens[a],i.tokens[a]=o)}}e.inline.ruler.before("emphasis","ins",t),e.inline.ruler2.before("emphasis","ins",function(i){const s=i.tokens_meta,o=(i.tokens_meta||[]).length;n(i,i.delimiters);for(let r=0;r<o;r++)s[r]&&s[r].delimiters&&n(i,s[r].delimiters)})}function loe(e){function t(i,s){const o=i.pos,r=i.src.charCodeAt(o);if(s||r!==61)return!1;const l=i.scanDelims(i.pos,!0);let a=l.length;const u=String.fromCharCode(r);if(a<2)return!1;if(a%2){const c=i.push("text","",0);c.content=u,a--}for(let c=0;c<a;c+=2){const d=i.push("text","",0);d.content=u+u,!(!l.can_open&&!l.can_close)&&i.delimiters.push({marker:r,length:0,jump:c/2,token:i.tokens.length-1,end:-1,open:l.can_open,close:l.can_close})}return i.pos+=l.length,!0}function n(i,s){const o=[],r=s.length;for(let l=0;l<r;l++){const a=s[l];if(a.marker!==61||a.end===-1)continue;const u=s[a.end],c=i.tokens[a.token];c.type="mark_open",c.tag="mark",c.nesting=1,c.markup="==",c.content="";const d=i.tokens[u.token];d.type="mark_close",d.tag="mark",d.nesting=-1,d.markup="==",d.content="",i.tokens[u.token-1].type==="text"&&i.tokens[u.token-1].content==="="&&o.push(u.token-1)}for(;o.length;){const l=o.pop();let a=l+1;for(;a<i.tokens.length&&i.tokens[a].type==="mark_close";)a++;if(a--,l!==a){const u=i.tokens[a];i.tokens[a]=i.tokens[l],i.tokens[l]=u}}}e.inline.ruler.before("emphasis","mark",t),e.inline.ruler2.before("emphasis","mark",function(i){let s;const o=i.tokens_meta,r=(i.tokens_meta||[]).length;for(n(i,i.delimiters),s=0;s<r;s++)o[s]&&o[s].delimiters&&n(i,o[s].delimiters)})}const aoe=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function uoe(e,t){const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==94||t||i+2>=n)return!1;e.pos=i+1;let s=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===94){s=!0;break}e.md.inline.skipToken(e)}if(!s||i+1===e.pos)return e.pos=i,!1;const o=e.src.slice(i+1,e.pos);if(o.match(/(^|[^\\])(\\\\)*\s/))return e.pos=i,!1;e.posMax=e.pos,e.pos=i+1;const r=e.push("sup_open","sup",1);r.markup="^";const l=e.push("text","",0);l.content=o.replace(aoe,"$1");const a=e.push("sup_close","sup",-1);return a.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function coe(e){e.inline.ruler.after("emphasis","sup",uoe)}var doe=HL({"../../node_modules/.pnpm/markdown-it-task-checkbox@1.0.6/node_modules/markdown-it-task-checkbox/index.js":((e,t)=>{t.exports=function(m,y){y=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},y),m.core.ruler.after("inline","github-task-lists",function(w){for(var k=w.tokens,A=0,v=2;v<k.length;v++)s(k,v)&&(o(k[v],A,y,w.Token),A+=1,n(k[v-2],"class",y.liClass),n(k[i(k,v-2)],"class",y.ulClass))})};function n(m,y,w){var k=m.attrIndex(y),A=[y,w];k<0?m.attrPush(A):m.attrs[k]=A}function i(m,y){for(var w=m[y].level-1,k=y-1;k>=0;k--)if(m[k].level===w)return k;return-1}function s(m,y){return d(m[y])&&f(m[y-1])&&p(m[y-2])&&g(m[y])}function o(m,y,w,k){var A=w.idPrefix+y;m.children[0].content=m.children[0].content.slice(3),m.children.unshift(l(A,k)),m.children.push(a(k)),m.children.unshift(r(m,A,w,k)),w.divWrap&&(m.children.unshift(u(w,k)),m.children.push(c(k)))}function r(m,y,w,k){var A=new k("checkbox_input","input",0);return A.attrs=[["type","checkbox"],["id",y]],/^\[[xX]\][ \u00A0]/.test(m.content)===!0&&A.attrs.push(["checked","true"]),w.disabled===!0&&A.attrs.push(["disabled","true"]),A}function l(m,y){var w=new y("label_open","label",1);return w.attrs=[["for",m]],w}function a(m){return new m("label_close","label",-1)}function u(m,y){var w=new y("checkbox_open","div",0);return w.attrs=[["class",m.divClass]],w}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 p(m){return m.type==="list_item_open"}function g(m){return/^\[[xX \u00A0]\][ \u00A0]/.test(m.content)}})});const foe=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]]);function hoe(e){return e>=55296&&e<=57343||e>1114111?65533:foe.get(e)??e}function poe(e){const t=atob(e),n=t.length&-2,i=new Uint16Array(n/2);for(let s=0,o=0;s<n;s+=2){const r=t.charCodeAt(s),l=t.charCodeAt(s+1);i[o++]=r|l<<8}return i}const goe=poe("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");var To;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(To||(To={}));var Ui;(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"})(Ui||(Ui={}));const tw=32;function O3(e){return e>=Ui.ZERO&&e<=Ui.NINE}function moe(e){return e>=Ui.UPPER_A&&e<=Ui.UPPER_F||e>=Ui.LOWER_A&&e<=Ui.LOWER_F}function voe(e){return e>=Ui.UPPER_A&&e<=Ui.UPPER_Z||e>=Ui.LOWER_A&&e<=Ui.LOWER_Z||O3(e)}function yoe(e){return e===Ui.EQUALS||voe(e)}var zs;(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"})(zs||(zs={}));var su;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(su||(su={}));var boe=class{decodeTree;emitCodePoint;errors;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}state=zs.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=su.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=zs.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case zs.EntityStart:return e.charCodeAt(t)===Ui.NUM?(this.state=zs.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=zs.NamedEntity,this.stateNamedEntity(e,t));case zs.NumericStart:return this.stateNumericStart(e,t);case zs.NumericDecimal:return this.stateNumericDecimal(e,t);case zs.NumericHex:return this.stateNumericHex(e,t);case zs.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|tw)===Ui.LOWER_X?(this.state=zs.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=zs.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t<e.length;){const n=e.charCodeAt(t);if(O3(n)||moe(n)){const i=n<=Ui.NINE?n-Ui.ZERO:(n|tw)-Ui.LOWER_A+10;this.result=this.result*16+i,this.consumed++,t++}else return this.emitNumericEntity(n,3)}return-1}stateNumericDecimal(e,t){for(;t<e.length;){const n=e.charCodeAt(t);if(O3(n))this.result=this.result*10+(n-Ui.ZERO),this.consumed++,t++;else return this.emitNumericEntity(n,2)}return-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Ui.SEMI)this.consumed+=1;else if(this.decodeMode===su.Strict)return 0;return this.emitCodePoint(hoe(this.result),this.consumed),this.errors&&(e!==Ui.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let i=n[this.treeIndex],s=(i&To.VALUE_LENGTH)>>14;for(;t<e.length;){if(s===0&&(i&To.FLAG13)!==0){const r=(i&To.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const l=i&To.JUMP_TABLE;if(e.charCodeAt(t)!==l)return this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}for(;this.runConsumed<r;){if(t>=e.length)return-1;const l=this.runConsumed-1,a=n[this.treeIndex+1+(l>>1)],u=l%2===0?a&255:a>>8&255;if(e.charCodeAt(t)!==u)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(r>>1),i=n[this.treeIndex],s=(i&To.VALUE_LENGTH)>>14}if(t>=e.length)break;const o=e.charCodeAt(t);if(o===Ui.SEMI&&s!==0&&(i&To.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);if(this.treeIndex=Aoe(n,i,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===su.Attribute&&(s===0||yoe(o))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],s=(i&To.VALUE_LENGTH)>>14,s!==0){if(o===Ui.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==su.Strict&&(i&To.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}t++,this.excess++}return-1}emitNotTerminatedNamedEntity(){const{result:e,decodeTree:t}=this,n=(t[e]&To.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:i}=this;return this.emitCodePoint(t===1?i[e]&~(To.VALUE_LENGTH|To.FLAG13):i[e+1],n),t===3&&this.emitCodePoint(i[e+2],n),n}end(){switch(this.state){case zs.NamedEntity:return this.result!==0&&(this.decodeMode!==su.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case zs.NumericDecimal:return this.emitNumericEntity(0,2);case zs.NumericHex:return this.emitNumericEntity(0,3);case zs.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case zs.EntityStart:return 0}}};function koe(e){let t="";const n=new boe(e,i=>t+=String.fromCodePoint(i));return function(s,o){let r=0,l=0;for(;(l=s.indexOf("&",l))>=0;){t+=s.slice(r,l),n.startEntity(o);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 Aoe(e,t,n,i){const s=(t&To.BRANCH_LENGTH)>>7,o=t&To.JUMP_TABLE;if(s===0)return o!==0&&i===o?n:-1;if(o){const u=i-o;return u<0||u>=s?-1:e[n+u]-1}const r=s+1>>1;let l=0,a=s-1;for(;l<=a;){const u=l+a>>>1,c=e[n+(u>>1)]>>(u&1)*8&255;if(c<i)l=u+1;else if(c>i)a=u-1;else return e[n+r+u]}return-1}const Coe=koe(goe);function G5(e,t=su.Legacy){return Coe(e,t)}var woe=WL(doe());const nw={};function xoe(e){let t=nw[e];if(t)return t;t=nw[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);t.push(i)}for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2)}return t}function fv(e,t){typeof t!="string"&&(t=fv.defaultChars);const n=xoe(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(i){let s="";for(let o=0,r=i.length;o<r;o+=3){const l=parseInt(i.slice(o+1,o+3),16);if(l<128){s+=n[l];continue}if((l&224)===192&&o+3<r){const a=parseInt(i.slice(o+4,o+6),16);if((a&192)===128){const u=l<<6&1984|a&63;u<128?s+="��":s+=String.fromCharCode(u),o+=3;continue}}if((l&240)===224&&o+6<r){const a=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16);if((a&192)===128&&(u&192)===128){const c=l<<12&61440|a<<6&4032|u&63;c<2048||c>=55296&&c<=57343?s+="���":s+=String.fromCharCode(c),o+=6;continue}}if((l&248)===240&&o+9<r){const a=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16),c=parseInt(i.slice(o+10,o+12),16);if((a&192)===128&&(u&192)===128&&(c&192)===128){let d=l<<18&1835008|a<<12&258048|u<<6&4032|c&63;d<65536||d>1114111?s+="����":(d-=65536,s+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}s+="�"}return s})}fv.defaultChars=";/?:@&=+$,#";fv.componentChars="";var P3=fv;const iw={};function _oe(e){let t=iw[e];if(t)return t;t=iw[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function hv(e,t,n){typeof t!="string"&&(n=t,t=hv.defaultChars),typeof n>"u"&&(n=!0);const i=_oe(t);let s="";for(let o=0,r=e.length;o<r;o++){const l=e.charCodeAt(o);if(n&&l===37&&o+2<r&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){s+=e.slice(o,o+3),o+=2;continue}if(l<128){s+=i[l];continue}if(l>=55296&&l<=57343){if(l>=55296&&l<=56319&&o+1<r){const a=e.charCodeAt(o+1);if(a>=56320&&a<=57343){s+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[o])}return s}hv.defaultChars=";/?:@&=+$,-_.!~*'()#";hv.componentChars="-_.!~*'()";var qL=hv;function Q5(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 Tm(){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 Soe=/^([a-z0-9.+-]+:)/i,Moe=/:[0-9]*$/,Ioe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Eoe=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` +`," "]),Toe=["'"].concat(Eoe),sw=["%","/","?",";","#"].concat(Toe),ow=["/","?","#"],Loe=255,rw=/^[+a-z0-9A-Z_-]{0,63}$/,Noe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,lw={javascript:!0,"javascript:":!0},aw={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Foe(e,t){if(e&&e instanceof Tm)return e;const n=new Tm;return n.parse(e,t),n}Tm.prototype.parse=function(e,t){let n,i,s,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const u=Ioe.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let r=Soe.exec(o);if(r&&(r=r[0],n=r.toLowerCase(),this.protocol=r,o=o.substr(r.length)),(t||r||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=o.substr(0,2)==="//",s&&!(r&&lw[r])&&(o=o.substr(2),this.slashes=!0)),!lw[r]&&(s||r&&!aw[r])){let u=-1;for(let g=0;g<ow.length;g++)i=o.indexOf(ow[g]),i!==-1&&(u===-1||i<u)&&(u=i);let c,d;u===-1?d=o.lastIndexOf("@"):d=o.lastIndexOf("@",u),d!==-1&&(c=o.slice(0,d),o=o.slice(d+1),this.auth=c),u=-1;for(let g=0;g<sw.length;g++)i=o.indexOf(sw[g]),i!==-1&&(u===-1||i<u)&&(u=i);u===-1&&(u=o.length),o[u-1]===":"&&u--;const f=o.slice(0,u);o=o.slice(u),this.parseHost(f),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const g=this.hostname.split(/\./);for(let m=0,y=g.length;m<y;m++){const w=g[m];if(w&&!w.match(rw)){let k="";for(let A=0,v=w.length;A<v;A++)w.charCodeAt(A)>127?k+="x":k+=w[A];if(!k.match(rw)){const A=g.slice(0,m),v=g.slice(m+1),x=w.match(Noe);x&&(A.push(x[1]),v.unshift(x[2])),v.length&&(o=v.join(".")+o),this.hostname=A.join(".");break}}}}this.hostname.length>Loe&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=o.indexOf("#");l!==-1&&(this.hash=o.substr(l),o=o.slice(0,l));const a=o.indexOf("?");return a!==-1&&(this.search=o.substr(a),o=o.slice(0,a)),o&&(this.pathname=o),aw[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Tm.prototype.parseHost=function(e){let t=Moe.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 Y5=Foe,UL=Gse({decode:()=>P3,encode:()=>qL,format:()=>Q5,parse:()=>Y5}),Boe=Object.defineProperty,KL=e=>{let t={};for(var n in e)Boe(t,n,{get:e[n],enumerable:!0});return t},Es=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,i=t.length;n<i;n++)if(t[n][0]===e)return n;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,t){const n=this.attrIndex(e),i=[e,t];n<0?this.attrPush(i):this.attrs[n]=i}attrGet(e){const t=this.attrIndex(e);let n=null;return t>=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}`}},$oe=KL({arrayReplaceAt:()=>Hoe,assign:()=>Poe,countLines:()=>es,escapeHtml:()=>Yoe,escapeRE:()=>Xoe,fromCodePoint:()=>J1,has:()=>Ooe,isMdAsciiPunct:()=>Fm,isPunctChar:()=>Nm,isPunctCode:()=>j3,isSpace:()=>joe,isString:()=>Roe,isValidEntityCode:()=>gv,isWhiteSpace:()=>Y1,lib:()=>ere,mdurl:()=>UL,normalizeReference:()=>pv,ucmicro:()=>Lm,unescapeAll:()=>X1,unescapeMd:()=>Koe});const Lm={Any:/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Cc:/[\0-\x1F\x7F-\x9F]/,Cf:/[\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]/,P:/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,S:/[\$\+<->\^`\|~\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]/,Z:/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/};function Doe(e){return Object.prototype.toString.call(e)}function Roe(e){return Doe(e)==="[object String]"}const zoe=Object.prototype.hasOwnProperty;function Ooe(e,t){return zoe.call(e,t)}function Poe(e,...t){return t.forEach(n=>{if(n){if(typeof n!="object")throw new TypeError(`${String(n)}must be object`);Object.keys(n).forEach(i=>{e[i]=n[i]})}}),e}function joe(e){return e===9||e===32}function Y1(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 Nm(e){return Lm.P.test(e)||Lm.S.test(e)}const uw=new Map;function j3(e){if(Fm(e))return!0;if(e>=0&&e<128)return!1;const t=uw.get(e);if(t!==void 0)return t;const n=Nm(String.fromCharCode(e));return uw.set(e,n),n}function Fm(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 pv(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function Hoe(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function gv(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 J1(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 VL=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,Woe=new RegExp(`${VL.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),qoe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Uoe(e,t){if(t.charCodeAt(0)===35&&qoe.test(t)){const i=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return gv(i)?J1(i):e}const n=G5(e);return n!==e?n:e}function Koe(e){return e.includes("\\")?e.replace(VL,"$1"):e}function X1(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(Woe,(t,n,i)=>n||Uoe(t,i))}const Voe=/[&<>"]/,Zoe=/[&<>"]/g,Goe={"&":"&","<":"<",">":">",'"':"""};function Qoe(e){return Goe[e]}function Yoe(e){return Voe.test(e)?e.replace(Zoe,Qoe):e}const Joe=/[.?*+^$[\]\\(){}|-]/g;function Xoe(e){return e.replace(Joe,"\\$&")}const ere={mdurl:UL,ucmicro:Lm};function es(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` +`,n+1))!==-1;)t++;return t}const tre=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,nre=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,ire=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,J5=["references","footnotes","abbreviations","abbr","abbrs"],X5=Symbol.for("markdown-it-ts.global-state"),eb=Object.prototype.hasOwnProperty;function cw(e){return e==="reference-definition"||e==="footnote-definition"||e==="abbreviation-definition"}function ll(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function pu(e){if(Array.isArray(e))return e.map(t=>pu(t));if(ll(e)){const t={};for(const n of Object.keys(e))t[n]=pu(e[n]);return t}return e}function Bm(e){return Array.isArray(e)?e.map((t,n)=>String(n)):ll(e)?Object.keys(e):[]}function H3(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;n<e.length;n++)if(!H3(e[n],t[n]))return!1;return!0}if(ll(e)||ll(t)){if(!ll(e)||!ll(t))return!1;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const s of n)if(!eb.call(t,s)||!H3(e[s],t[s]))return!1;return!0}return Object.is(e,t)}function ZL(e,t){if(Array.isArray(e))return e[Number(t)];if(ll(e))return e[t]}function sre(e,t){if(Array.isArray(e)&&Array.isArray(t)){e.length=t.length;for(let n=0;n<t.length;n++)e[n]=pu(t[n]);return e}if(ll(e)&&ll(t)){for(const n of Object.keys(e))eb.call(t,n)||delete e[n];for(const n of Object.keys(t))e[n]=pu(t[n]);return e}return pu(t)}function ore(e,t,n){const i=n.ownedKeys??[],s=e[t];if(ll(s)||Array.isArray(s)){const o=new Set(Bm(n.value));for(const r of i)n.existed&&o.has(r)?s[r]=pu(ZL(n.value,r)):delete s[r];!n.existed&&Bm(s).length===0&&delete e[t];return}n.existed?e[t]=pu(n.value):delete e[t]}function tb(e){const t=e[X5];return cw(t)?{reason:t,snapshot:{}}:t&&typeof t=="object"&&cw(t.reason)&&t.snapshot&&typeof t.snapshot=="object"?t:null}function rre(e,t){Object.defineProperty(e,X5,{value:t,enumerable:!1,configurable:!0,writable:!0})}function Qo(e){return!e||!e.includes("]:")&&!e.includes("*[")?null:tre.test(e)?"footnote-definition":nre.test(e)?"abbreviation-definition":ire.test(e)?"reference-definition":null}function wp(e){return tb(e)?.reason??null}function ff(e,t,n){if(wp(e)&&Ea(e),!t)return n();nb(e,t);try{const i=n();return ib(e),i}catch(i){throw Ea(e),i}}function nb(e,t){try{Ea(e);const n={};for(const i of J5)n[i]=eb.call(e,i)?{existed:!0,value:pu(e[i])}:{existed:!1};rre(e,{reason:t,snapshot:n})}catch{}}function ib(e){const t=tb(e);if(t)for(const n of J5){const i=t.snapshot[n];if(!i)continue;i.ownedKeys=[];const s=e[n];if(!ll(s)&&!Array.isArray(s))continue;const o=new Set(Bm(i.existed?i.value:void 0));i.ownedKeys=Bm(s).filter(r=>o.has(r)?!H3(s[r],ZL(i.value,r)):!0)}}function Ea(e){const t=tb(e);if(t){for(const n of J5){const i=t.snapshot[n];if(!i){delete e[n];continue}if(i.ownedKeys){ore(e,n,i);continue}i.existed?e[n]=sre(e[n],i.value):delete e[n]}delete e[X5]}}function dy(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 W3=Symbol.for("markdown-it-ts.diagnostics");function xp(e,t){if(e)try{const n=e[W3];if(n&&typeof n=="object")return n;if(!t)return;const i={};return e[W3]=i,i}catch{return}}function ua(e){return xp(e,!1)}function lre(e){if(e)try{const t=e[W3];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function Lo(e){lre(e)}function Sh(e,t){const n=xp(e,!0);n&&(n.stockFast=t)}function ps(e,t){const n=xp(e,!0);n&&(n.strategy=t)}function fy(e,t){const n=xp(e,!0);n&&(n.chunk=t)}function GL(e,t){const n=xp(e,!0);n&&(n.unbounded=t)}const are=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ure=/[\0-\x1F\x7F-\x9F]/,cre=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\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[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\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\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,dre=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var fre=class{src_Any=are.source;src_Cc=ure.source;src_Z=dre.source;src_P=cre.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){const i=this.escapeRE(e),s=this.escapeRE(t),o=`(?:(?!${this.src_ZCc}|${i}|${s}).)`;let r=`${i}${o}{0,1000}${s}`;for(let l=2;l<=n;l++)r=`${i}(?:${o}|${r}){0,1000}${s}`;return r}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){const e="[0-9A-Fa-f]{1,4}",t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},hy={validate:(e,t,n)=>{const i=n.re.get_http_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)},hre={"http:":hy,"https:":hy,"ftp:":hy,"//":{validate:function(e,t,n){const i=n.re.get_relative_proto_validator();i.lastIndex=t;const s=i.exec(e);return s?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:s[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){const i=n.re.get_mailto_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)}},pre="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|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",gre="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function mre(){const e=gre.split("|");return pre.split("|").forEach(t=>{const n=t.indexOf(":"),i=t.slice(0,n);for(const s of t.slice(n+1))e.push(i+s)}),e}var vre={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:mre(),urlAuth:!1,maxLength:1e4},dw=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,i){const s=e.slice(n,i);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=i,this.raw=s,this.text=s,this.url=s}},QL=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:t,...n}=e;this.__opts__={...vre,...n},this.__schemas__={...hre},this.re=t||new fre,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{const n={normalize:(i,s)=>s.normalize(i),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;for(n=this.re.get_schema_search(),n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const i=this.re.get_fuzzy_mail_host_search(),s=this.re.get_mail_name_validator();for(i.lastIndex=0;(t=i.exec(e))!==null;){const o=e.slice(Math.max(0,t.index-65),t.index);if(s.test(o))return!0}}return!1}testSchemaAt(e,t,n){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this):0}match(e){const t=[],n=this.re.get_schema_search();let i,s,o,r,l,a,u=!1,c=!1,d=!1,f=0;if(!e.length)return null;for(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(s=this.re.get_fuzzy_mail_host_search(),s.lastIndex=0,o=this.re.get_mail_name_validator());;){const p=Math.max(f-1,0);if(s&&o&&!d&&(!l||l.index<f))for(s.lastIndex<p&&(s.lastIndex=p);;){const k=s.exec(e);if(!k){d=!0,l=void 0;break}const A=o.exec(e.slice(Math.max(0,k.index-65),k.index));if(A){if(l={schema:"mailto:",index:k.index-A[1].length,lastIndex:k.index+k[0].length},l.index>=f)break;s.lastIndex<p&&(s.lastIndex=p)}}if(i&&!c&&(!r||r.index<f))for(i.lastIndex<p&&(i.lastIndex=p);;){const k=i.exec(e);if(!k){c=!0,r=void 0;break}if(r={schema:"",index:k.index+k[1].length,lastIndex:k.index+k[0].length},r.index>=f)break;i.lastIndex<p&&(i.lastIndex=p)}let g=l;(!g||r&&(r.index<g.index||r.index===g.index&&r.lastIndex>g.lastIndex))&&(g=r);let m;if(!u)for(;;){if(!a){n.lastIndex<p&&(n.lastIndex=p);const v=n.exec(e);if(!v){u=!0;break}a={schema:v[2],index:v.index+v[1].length,lastIndex:v.index+v[0].length}}if(a.index<f){a=void 0;continue}if(g&&a.index>g.index)break;const k=a;a=void 0;const A=this.testSchemaAt(e,k.schema,k.lastIndex);if(A){m={schema:k.schema,index:k.index,lastIndex:k.lastIndex+A};break}}let y=m;if((!y||l&&(l.index<y.index||l.index===y.index&&l.lastIndex>y.lastIndex))&&(y=l),(!y||r&&(r.index<y.index||r.index===y.index&&r.lastIndex>y.lastIndex))&&(y=r),!y)break;y===l?l=void 0:y===r&&(r=void 0);const w=new dw(e,y.schema,y.index,y.lastIndex);w.schema?this.__schemas__[w.schema].normalize(w,this):this.normalize(w),t.push(w),f=y.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;const t=this.re.get_schema_at_start().exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;const i=new dw(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[i.schema].normalize(i,this),i}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}},yre=HL({"../../node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.js":((e,t)=>{const d=/^xn--/,f=/[^\0-\x7F]/,p=/[\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,y=Math.floor,w=String.fromCharCode;function k(O){throw new RangeError(g[O])}function A(O,R){const W=[];let z=O.length;for(;z--;)W[z]=R(O[z]);return W}function v(O,R){const W=O.split("@");let z="";W.length>1&&(z=W[0]+"@",O=W[1]),O=O.replace(p,".");const G=A(O.split("."),R).join(".");return z+G}function x(O){const R=[];let W=0;const z=O.length;for(;W<z;){const G=O.charCodeAt(W++);if(G>=55296&&G<=56319&&W<z){const K=O.charCodeAt(W++);(K&64512)==56320?R.push(((G&1023)<<10)+(K&1023)+65536):(R.push(G),W--)}else R.push(G)}return R}const E=O=>String.fromCodePoint(...O),S=function(O){return O>=48&&O<58?26+(O-48):O>=65&&O<91?O-65:O>=97&&O<123?O-97:36},M=function(O,R){return O+22+75*(O<26)-((R!=0)<<5)},_=function(O,R,W){let z=0;for(O=W?y(O/700):O>>1,O+=y(O/R);O>m*26>>1;z+=36)O=y(O/m);return y(z+(m+1)*O/(O+38))},N=function(O){const R=[],W=O.length;let z=0,G=128,K=72,H=O.lastIndexOf("-");H<0&&(H=0);for(let q=0;q<H;++q)O.charCodeAt(q)>=128&&k("not-basic"),R.push(O.charCodeAt(q));for(let q=H>0?H+1:0;q<W;){const X=z;for(let ue=1,ie=36;;ie+=36){q>=W&&k("invalid-input");const xe=S(O.charCodeAt(q++));xe>=36&&k("invalid-input"),xe>y((2147483647-z)/ue)&&k("overflow"),z+=xe*ue;const ce=ie<=K?1:ie>=K+26?26:ie-K;if(xe<ce)break;const pe=36-ce;ue>y(2147483647/pe)&&k("overflow"),ue*=pe}const ee=R.length+1;K=_(z-X,ee,X==0),y(z/ee)>2147483647-G&&k("overflow"),G+=y(z/ee),z%=ee,R.splice(z++,0,G)}return String.fromCodePoint(...R)},D=function(O){const R=[];O=x(O);const W=O.length;let z=128,G=0,K=72;for(const X of O)X<128&&R.push(w(X));const H=R.length;let q=H;for(H&&R.push("-");q<W;){let X=2147483647;for(const ue of O)ue>=z&&ue<X&&(X=ue);const ee=q+1;X-z>y((2147483647-G)/ee)&&k("overflow"),G+=(X-z)*ee,z=X;for(const ue of O)if(ue<z&&++G>2147483647&&k("overflow"),ue===z){let ie=G;for(let xe=36;;xe+=36){const ce=xe<=K?1:xe>=K+26?26:xe-K;if(ie<ce)break;const pe=ie-ce,Ne=36-ce;R.push(w(M(ce+pe%Ne,0))),ie=y(pe/Ne)}R.push(w(M(ie,0))),K=_(G,ee,q===H),G=0,++q}++G,++z}return R.join("")},P={version:"2.3.1",ucs2:{decode:x,encode:E},decode:N,encode:D,toASCII:function(O){return v(O,function(R){return f.test(R)?"xn--"+D(R):R})},toUnicode:function(O){return v(O,function(R){return d.test(R)?N(R.slice(4).toLowerCase()):R})}};t.exports=P})}),YL=WL(yre());function sb(e,t,n){let i,s=t;const o={ok:!1,pos:0,str:""};if(e.charCodeAt(s)===60){for(s++;s<n;){if(i=e.charCodeAt(s),i===10||i===60)return o;if(i===62)return o.pos=s+1,o.str=X1(e.slice(t+1,s)),o.ok=!0,o;if(i===92&&s+1<n){s+=2;continue}s++}return o}let r=0;for(;s<n&&(i=e.charCodeAt(s),!(i===32||i<32||i===127));){if(i===92&&s+1<n){if(e.charCodeAt(s+1)===32)break;s+=2;continue}if(i===40&&(r++,r>32))return o;if(i===41){if(r===0)break;r--}s++}return t===s||r!==0||(o.str=X1(e.slice(t,s)),o.pos=s,o.ok=!0),o}var JL=sb;const Mg=-2;function bre(e,t,n,i){let s=1,o=t+1;for(;o<n;){const r=e.charCodeAt(o);if(r===93){if(s--,s===0)return o;if(i){const l=o+1<n?e.charCodeAt(o+1):0;if(l===40||l===91)return Mg}o++;continue}if(r===92){o+=2;continue}if(r===96||r===60||r===33&&o+1<n&&e.charCodeAt(o+1)===91)return Mg;if(r===91){s++,o++;continue}o++}return-1}function ob(e,t,n){let i=1,s=!1,o,r;const l=e.src,a=e.posMax,u=e.pos,c=e.linkLabelNoCloseFrom;if(c>=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=bre(l,t,a,n);if(f!==Mg)return f;for(e.pos=t+1;e.pos<a;){if(o=l.charCodeAt(e.pos),o===93&&(i--,i===0)){s=!0;break}if(r=e.pos,e.md.inline.skipToken(e),o===91){if(r===e.pos-1)i++;else if(n)return e.pos=u,-1}}let p=-1;return s&&(p=e.pos),e.pos=u,p}var $m=ob;function rb(e,t,n,i){let s,o=t;const r={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)r.str=i.str,r.marker=i.marker;else{if(o>=n)return r;let l=e.charCodeAt(o);if(l!==34&&l!==39&&l!==40)return r;t++,o++,l===40&&(l=41),r.marker=l}for(;o<n;){if(s=e.charCodeAt(o),s===r.marker)return r.pos=o+1,r.str+=X1(e.slice(t,o)),r.ok=!0,r;if(s===40&&r.marker===41)return r;s===92&&o+1<n&&o++,o++}return r.can_continue=!0,r.str+=X1(e.slice(t,o)),r}var XL=rb;function mv(e,t){if(!e.attrs)return-1;for(let n=0;n<e.attrs.length;n++)if(e.attrs[n][0]===t)return n;return-1}function lb(e,t){e.attrs||(e.attrs=[]),e.attrs.push(t)}function kre(e,t,n){const i=mv(e,t),s=[t,n];i<0?lb(e,s):e.attrs[i]=s}function Are(e,t){const n=mv(e,t);return n>=0?e.attrs[n][1]:null}function Cre(e,t,n){const i=mv(e,t);i<0?lb(e,[t,n]):e.attrs[i][1]=`${e.attrs[i][1]} ${n}`}var wre=KL({attrGet:()=>Are,attrIndex:()=>mv,attrJoin:()=>Cre,attrPush:()=>lb,attrSet:()=>kre,parseLinkDestination:()=>sb,parseLinkLabel:()=>ob,parseLinkTitle:()=>rb});function xre(e){return e.includes("\r")||e.includes("\0")}function eN(e){return typeof e=="string"?e:e.toString()}function _re(e){if(e.inlineMode){const t=new Es("inline","",0);t.content=eN(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 Sre=/^([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])?)*)$/,Mre=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Ire(e,t){let n=e.pos;const i=e.src;if(i.charCodeAt(n)!==60)return!1;const s=n,o=e.posMax;for(;;){if(++n>=o)return!1;const l=i.charCodeAt(n);if(l===60)return!1;if(l===62)break}const r=i.slice(s+1,n);if(Mre.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(Sre.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 tN=Ire;function Ere(e,t){const n=e.src;let i=e.pos;if(n.charCodeAt(i)!==96)return!1;const s=i;i++;const o=e.posMax;for(;i<o&&n.charCodeAt(i)===96;)i++;const r=n.slice(s,i),l=r.length;if(e.backticksScanned&&(e.backticks[l]||0)<=s)return t||(e.pending+=r),e.pos+=l,!0;let a=i,u;for(;(u=n.indexOf("`",a))!==-1;){for(a=u+1;a<o&&n.charCodeAt(a)===96;)a++;const c=a-u;if(c===l){if(!t){const d=e.push("code_inline","code",0);d.markup=r;let f=n.slice(i,u);f.includes(` +`)&&(f=f.replace(/\n/g," ")),f.length>2&&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 nN=Ere;function fw(e){const t={},n=e.length;if(!n)return;let i=0,s=-2;const o=[];for(let r=0;r<n;r++){const l=e[r];if(o.push(0),(e[i].marker!==l.marker||s!==l.token-1)&&(i=r),s=l.token,l.length=l.length||0,!l.close)continue;Object.prototype.hasOwnProperty.call(t,l.marker)||(t[l.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[l.marker][(l.open?3:0)+l.length%3];let u=i-o[i]-1,c=u;for(;u>a;u-=o[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 p=u>0&&!e[u-1].open?o[u-1]+1:0;o[r]=r-u+p,o[u]=p,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 Tre(e){const t=e.tokens_meta,n=e.tokens_meta.length;fw(e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&fw(t[i].delimiters)}var Lre=Tre;const iN="*",sN="_";function Nre(e,t){if(t)return!1;const n=e.src.charCodeAt(e.pos);if(n!==95&&n!==42)return!1;const i=e.scanDelims(e.pos,n===42);if(!i||i.length===0)return!1;const s=n===42?iN:sN,o=i.length,r=i.can_open,l=i.can_close,a=e.tokens,u=e.delimiters;for(let c=0;c<o;c++){const d=e.push("text","",0);d.content=s,u.push({marker:n,length:o,token:a.length-1,end:-1,open:r,close:l})}return e.pos+=o,!0}function hw(e,t){const n=t.length,i=e.tokens;for(let s=n-1;s>=0;s--){const o=t[s],r=o.marker;if(r!==95&&r!==42||o.end===-1)continue;const l=t[o.end],a=o.token,u=l.token,c=s>0&&t[s-1].end===o.end+1&&t[s-1].marker===r&&t[s-1].token===a-1&&t[o.end+1].token===u+1,d=r===42?iN:sN,f=i[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 p=i[u];c?(p.type="strong_close",p.tag="strong",p.nesting=-1,p.markup=d+d,p.content=""):(p.type="em_close",p.tag="em",p.nesting=-1,p.markup=d,p.content=""),c&&(i[t[s-1].token].content="",i[t[o.end+1].token].content="",s--)}}function Fre(e){const t=e.tokens_meta,n=e.tokens_meta.length;hw(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&hw(e,t[i].delimiters)}const q3={tokenize:Nre,postProcess:Fre};function oN(e){return G5(e)}function ab(e){return e>=48&&e<=57}function Bre(e){const t=e|32;return ab(e)||t>=97&&t<=102}function rN(e){const t=e|32;return t>=97&&t<=122}function $re(e){return rN(e)||ab(e)}function Dre(e,t,n){let i=t+2;if(i>=n)return null;let s=!1,o=7,r=i;for((e.charCodeAt(i)|32)===120&&(s=!0,o=6,i++,r=i);i<n&&i-r<o;){const l=e.charCodeAt(i);if(!(s?Bre(l):ab(l)))break;i++}return i===r||i>=n||e.charCodeAt(i)!==59?null:e.slice(t,i+1)}function Rre(e,t,n){let i=t+1;if(i>=n||!rN(e.charCodeAt(i)))return null;for(i++;i<n&&i-t-1<32&&$re(e.charCodeAt(i));)i++;if(i-t-1<2||i>=n||e.charCodeAt(i)!==59)return null;const s=e.slice(t,i+1);return oN(s)!==s?s:null}function zre(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const s=Dre(e.src,n,i);if(s){if(!t){const o=(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=gv(o)?J1(o):J1(65533),r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}else{const s=Rre(e.src,n,i);if(s){const o=oN(s);if(!t){const r=e.push("text_special","",0);r.content=o,r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}return!1}var lN=zre;const aN=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),U3=new Array(128),uN=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);U3[e]=`\\${t}`,uN[e]=aN[e]?t:U3[e]}function pw(e,t,n){e.pending&&e.pushPending();const i=new Es("text_special","",0);i.level=e.level,i.content=t,i.markup=n,i.info="escape",e.pendingLevel=e.level,e.tokens.push(i),e.tokens_meta.push(null)}function Ore(e,t){let n=e.pos;const i=e.posMax,s=e.src;if(s.charCodeAt(n)!==92||(n++,n>=i))return!1;let o=s.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<i&&(o=s.charCodeAt(n),!(o!==9&&o!==32));)n++;return e.pos=n,!0}if(o<128)return t?(e.pos=n+1,!0):(pw(e,uN[o],U3[o]),e.pos=n+1,!0);if(t){if(o>=55296&&o<=56319&&n+1<i){const a=s.charCodeAt(n+1);a>=56320&&a<=57343&&n++}return e.pos=n+1,!0}let r=s.charAt(n);if(o>=55296&&o<=56319&&n+1<i){const a=s.charCodeAt(n+1);a>=56320&&a<=57343&&(r+=s.charAt(n+1),n++)}const l=`\\${r}`;return pw(e,o<256&&aN[o]?r:l,l),e.pos=n+1,!0}var cN=Ore;function Pre(e){let t,n,i=0;const s=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++){const r=s[t];r&&(r.nesting&&r.nesting<0&&i--,r.level=i,r.nesting&&r.nesting>0&&i++,r.type==="text"&&t+1<o&&s[t+1]?.type==="text"?s[t+1].content=r.content+s[t+1].content:(t!==n&&(s[n]=r),n++))}t!==n&&(s.length=n)}var jre=Pre;const dN=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,fN="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Hre=new RegExp(`^(?:${dN}|${fN}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<\\?[\\s\\S]*?\\?>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),Wre=new RegExp(`^(?:${dN}|${fN})`);function hN(e){return e===32||e===9||e===10||e===12||e===13}function qre(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||hN(t)}function Ure(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<e.length;t++){const n=e.charCodeAt(t);if(n===62)return!0;if(!hN(n))return!1}return!1}function Kre(e){const t=e|32;return t>=97&&t<=122}function Vre(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos,s=e.src;if(s.charCodeAt(i)!==60||i+2>=n)return!1;const o=s.charCodeAt(i+1);if(o!==33&&o!==63&&o!==47&&!Kre(o))return!1;const r=s.slice(i).match(Hre);if(!r)return!1;const l=r[0];if(!t){const a=e.pushSimple("html_inline","");a.content=l,qre(l)&&e.linkLevel++,Ure(l)&&e.linkLevel--}return e.pos+=l.length,!0}var pN=Vre;function Zre(e,t){let n,i,s,o,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 p=e.pos+2,g=$m(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o<f&&e.src.charCodeAt(o)===40){for(o++;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);if(o>=f)return!1;if(l=JL(e.src,o,e.posMax),l.ok){for(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?o=l.pos:c="",u=o;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);if(l=XL(e.src,o,e.posMax),o<f&&u!==o&&l.ok)for(a=l.str,o=l.pos;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);else a=""}if(o>=f||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<f&&e.src.charCodeAt(o)===91?(u=o+1,o=$m(e,o),o>=0?s=e.src.slice(u,o++):o=g+1):o=g+1,s||(s=e.src.slice(p,g)),r=e.env.references[pv(s)],!r)return e.pos=d,!1;c=r.href,a=r.title}if(!t){i=e.src.slice(p,g);const m=[];e.md.inline.parse(i,e.md,e.env,m);const y=e.push("image","img",0);y.attrs=[["src",c],["alt",""]],y.children=m,y.content=i,a&&y.attrs.push(["title",a])}return e.pos=o,e.posMax=f,!0}var gN=Zre;function py(e,t,n){for(;t<n;){const i=e.charCodeAt(t);if(i!==32&&i!==10)break;t++}return t}function Gre(e,t){if(e.src.charCodeAt(e.pos)!==91)return!1;const n=e.src,i=e.pos,s=e.posMax,o=e.pos+1,r=$m(e,e.pos,!0);if(r<0)return!1;let l=r+1,a="",u="",c=!0;if(l<s&&n.charCodeAt(l)===40){l=py(n,l+1,s);const d=JL(n,l,s);if(d.ok){const f=e.md.normalizeLink(d.str);e.md.validateLink(f)&&(a=f,l=d.pos,c=!1)}else l<s&&n.charCodeAt(l)===41&&(a="",c=!1);if(!c){if(l=py(n,l,s),l<s&&n.charCodeAt(l)!==41){const f=XL(n,l,s);f.ok&&(u=f.str,l=py(n,f.pos,s))}l<s&&n.charCodeAt(l)===41?l++:c=!0}}if(c){if(typeof e.env.references>"u")return!1;let d;if(l=r+1,l<s&&n.charCodeAt(l)===91){const p=l+1,g=$m(e,l);g>=0?(d=n.slice(p,g),d||(d=n.slice(o,r)),l=g+1):d=n.slice(o,r)}else d=n.slice(o,r);const f=e.env.references[pv(d)];if(!f)return e.pos=i,!1;a=f.href,u=f.title}if(!t){e.pos=o,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 mN=Gre;function vN(e){const t=e|32;return t>=97&&t<=122}function Qre(e){return e>=48&&e<=57}function Yre(e){return vN(e)||Qre(e)||e===43||e===45||e===46}function Jre(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&Yre(e.charCodeAt(t));)t--;return t++,t>=e.length||!vN(e.charCodeAt(t))?null:e.slice(t)}function Xre(e,t,n){let i=t;for(;i<n;){const s=e.charCodeAt(i);if(s<=32||s===127||s===60)break;i++}return e.slice(t,i)}function yN(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const s=Jre(e.pending);if(!s)return!1;const o=Xre(e.src,n-s.length,i),r=e.md.linkify.matchAtStart(o);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 ele(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,s=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),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;){const o=e.src.charCodeAt(n);if(o!==9&&o!==32)break;n++}return e.pos=n,!0}var bN=ele;function tle(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;const s=e.scanDelims(e.pos,!0);if(!s)return!1;let o=s.length;const r=String.fromCharCode(i);if(o<2)return!1;let l;o%2&&(l=e.push("text","",0),l.content=r,o--);for(let a=0;a<o;a+=2)l=e.push("text","",0),l.content=r+r,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}function gw(e,t){let n;const i=[],s=t.length;for(let o=0;o<s;o++){const r=t[o];if(r.marker!==126||r.end===-1)continue;const l=t[r.end];n=e.tokens[r.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[l.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[l.token-1].type==="text"&&e.tokens[l.token-1].content==="~"&&i.push(l.token-1)}for(;i.length;){const o=i.pop();let r=o+1;for(;r<e.tokens.length&&e.tokens[r].type==="s_close";)r++;r--,o!==r&&(n=e.tokens[r],e.tokens[r]=e.tokens[o],e.tokens[o]=n)}}function nle(e){const t=e.delimiters;gw(e,t);const n=e.tokens_meta;if(n)for(let i=0;i<n.length;i++)n[i]&&n[i].delimiters&&gw(e,n[i].delimiters)}const K3={tokenize:tle,postProcess:nle};function mw(e){switch(e){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!0;default:return!1}}function ile(e,t){const n=e.src,i=e.pos,s=e.posMax;if(i>=s||mw(n.charCodeAt(i)))return!1;let o=i+1;for(;o<s&&!mw(n.charCodeAt(o));)o++;return t||(e.pending+=o===i+1?n.charAt(i):n.slice(i,o)),e.pos=o,!0}var kN=ile;function ub(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function sle(e){if(e.length===0)return 0;const t=e.slice().sort((i,s)=>i-s),n=Math.floor(t.length/2);return t.length%2===0?(t[n-1]+t[n])/2:t[n]}function ole(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 AN(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,i={enabled:!0,fixture:n.fixture,mode:n.mode,startedAt:ub(),records:Object.create(null)};return t.__mdtsRuleProfile=i,i}function hf(e,t,n,i,s,o){const r=AN(e);if(!r)return;const l=`${t}:${n}`,a=r.records[l]??(r.records[l]=ole(t,n));a.calls++,a.inclusiveMs+=i,i>a.maxMs&&(a.maxMs=i),a.samples.push(i),o?(a.silentCalls++,s&&a.silentHits++):(a.normalCalls++,s&&a.normalHits++),s&&a.hits++,r.completedAt=ub()}function rle(e){const t=AN(e);if(!t)return null;const n=Object.keys(t.records);for(let i=0;i<n.length;i++){const s=t.records[n[i]];s.medianMs=sle(s.samples)}return t.completedAt=ub(),t}var vw=class{rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t,n){const i=this.rules.findIndex(s=>s.name===e);i>=0&&this.rules.splice(i,1),this.rules.push({name:e,fn:t,alt:n?.alt||[],enabled:!0}),this.invalidateCache()}at(e,t,n){const i=this.rules.findIndex(s=>s.name===e);if(t===void 0){if(i<0)return;const s=this.rules[i];return Object.freeze({name:s.name,fn:s.fn,alt:s.alt?Object.freeze(s.alt.slice()):void 0,enabled:s.enabled})}if(i<0)throw new Error(`Parser rule not found: ${e}`);this.rules[i].fn=t,n?.alt!==void 0&&(this.rules[i].alt=n.alt),this.invalidateCache()}before(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}after(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s+1,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.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 i of this.rules)if(i.enabled&&i.alt)for(const s of i.alt)e.add(s);const t=new Map,n=new Map;for(const i of e){const s=[],o=[];for(const r of this.rules)r.enabled&&(i!==""&&!r.alt?.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t.set(i,s),n.set(i,o)}this.cache=t,this.namedCache=n}},CN=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,i){this.src=e,this.md=t,this.env=n,this.tokens=i,this.tokens_meta=new Array(i.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 Es("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 Es(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 i=new Es(e,t,n);let s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.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(i),this.tokens_meta.push(s),i}scanDelims(e,t){const{src:n,posMax:i}=this,s=n.charCodeAt(e);let o=e;for(;o<i&&n.charCodeAt(o)===s;)o++;const r=o-e,l=e>0?n.charCodeAt(e-1):32,a=o<i?n.charCodeAt(o):32,u=Y1(l),c=Y1(a),d=j3(l),f=j3(a),p=!c&&(!f||u||d),g=!u&&(!d||c||f);return{can_open:p&&(t||!g||d),can_close:g&&(t||!p||f),length:r}}};CN.prototype.Token=Es;const lle=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/;function yw(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return bN(e,t);case 33:return gN(e,t);case 38:return lN(e,t);case 42:case 95:return q3.tokenize(e,t);case 58:return e.md.options.linkify&&yN(e,t);case 60:return tN(e,t)||pN(e,t);case 91:return mN(e,t);case 92:return cN(e,t);case 96:return nN(e,t);case 126:return K3.tokenize(e,t);default:return kN(e,t)}}function wN(e){return!lle.test(e)}var ale=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new vw,this.ruler2=new vw,this.ruler.push("text",kN),this.ruler.push("linkify",yN),this.ruler.push("newline",bN),this.ruler.push("escape",cN),this.ruler.push("backticks",nN),this.ruler.push("strikethrough",K3.tokenize),this.ruler.push("emphasis",q3.tokenize),this.ruler.push("link",mN),this.ruler.push("image",gN),this.ruler.push("autolink",tN),this.ruler.push("html_inline",pN),this.ruler.push("entity",lN),this.ruler2.push("balance_pairs",Lre),this.ruler2.push("strikethrough",K3.postProcess),this.ruler2.push("emphasis",q3.postProcess),this.ruler2.push("fragments_join",jre),this.defaultRulerVersion=this.ruler.version,this.defaultRuler2Version=this.ruler2.version}skipToken(e){const t=e.pos,n=this.getRules(),i=n.length,s=e.cache,o=s[t],r=!!e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules"));if(o!==void 0){e.pos=o;return}let l=!1;if(e.level<e.maxNesting){if(r){const a=this.ruler.getNamedRules("");for(let u=0;u<i;u++){e.level++;const c=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();l=a[u].fn(e,!0);const d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(hf(e.env,"inline",a[u].name,d-c,!!l,!0),e.level--,l){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}}else if(this.isDefaultRuleset()){if(e.level++,l=yw(e,!0),e.level--,l&&t>=e.pos)throw new Error("inline rule didn't increment state.pos")}else for(let a=0;a<i;a++)if(e.level++,l=n[a](e,!0),e.level--,l){if(t>=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,i=e.posMax;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const o=this.isDefaultRuleset();for(;e.pos<i;){const r=e.pos;let l=!1;if(e.level<e.maxNesting){if(o)l=yw(e,!1);else for(let a=0;a<n&&(l=t[a](e,!1),!l);a++);if(l&&r>=e.pos)throw new Error("inline rule didn't increment state.pos")}if(l){if(e.pos>=i)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending();return}const s=this.ruler.getNamedRules("");for(;e.pos<i;){const o=e.pos;let r=!1;if(e.level<e.maxNesting)for(let l=0;l<n;l++){const a=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();r=s[l].fn(e,!1);const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(hf(e.env,"inline",s[l].name,u-a,!!r,!1),r){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(r){if(e.pos>=i)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,i){if(typeof e=="string"&&e.length>0&&this.isDefaultRuleset()&&wN(e)){const a=new Es("text","",0);a.content=e,i.push(a);return}const s=new CN(e,t,n,i);this.tokenize(s);const o=this.getRules2(),r=o.length;if(!(s.env&&(Object.prototype.hasOwnProperty.call(s.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(s.env,"__mdtsProfileRules")))){for(let a=0;a<r;a++)o[a](s,!1);return}const l=this.ruler2.getNamedRules("");for(let a=0;a<r;a++){const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();l[a].fn(s,!1);const c=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();hf(s.env,"inline2",l[a].name,c-u,!0,!1)}}parse(e,t,n,i){this.parseSource(e,t,n,i)}getRules(){return this.cachedRulesVersion!==this.ruler.version&&(this.cachedRules=this.ruler.getRules(""),this.cachedRulesVersion=this.ruler.version),this.cachedRules}getRules2(){return this.cachedRules2Version!==this.ruler2.version&&(this.cachedRules2=this.ruler2.getRules(""),this.cachedRules2Version=this.ruler2.version),this.cachedRules2}};function ule(e){const t=e.tokens,n=!!e.md?.inline?.isDefaultRuleset?.();for(let i=0,s=t.length;i<s;i++){const o=t[i];if(o.type==="inline"&&e.md){if(o.children||(o.children=[]),n&&o.content.length>0&&wN(o.content)){const r=new Es("text","",0);r.content=o.content,o.children.push(r);continue}e.md.inline.parse(o.content,e.md,e.env,o.children)}}}const cle=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,dle=/[0-9a-z]/i;function fle(e){return/^<a[>\s]/i.test(e)}function hle(e){return/^<\/a\s*>/i.test(e)}function ple(e,t){if(t.schema||t.index!==0||!t.raw)return t;for(let n=1;n<t.raw.length;n++){const i=t.raw[n-1],s=t.raw[n];if(!cle.test(i)||!dle.test(s))continue;const o=t.raw.slice(n),r=e.match(o)?.[0];if(!(!r||r.index!==0||r.lastIndex!==o.length))return{...r,index:t.index+n,lastIndex:t.index+n+r.lastIndex}}return t}function gle(e){const t=e.tokens;if(e.md?.options?.linkify)for(let n=0;n<t.length;n++){const i=t[n];if(i.type!=="inline"||!e.md.linkify.test(i.content))continue;let s=i.children;s||(s=[],i.children=s);let o=0;for(let r=s.length-1;r>=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"&&(fle(l.content)&&o>0&&o--,hle(l.content)&&o++),o>0||l.type!=="text"||!e.md.linkify.test(l.content))continue;const a=l.content;let u=(e.md.linkify.match(a)||[]).map(p=>ple(e.md.linkify,p));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 p=0;p<u.length;p++){const g=u[p],m=e.md.normalizeLink(g.url);if(!e.md.validateLink(m))continue;let y=g.text;g.schema?g.schema==="mailto:"&&!/^mailto:/i.test(y)?y=e.md.normalizeLinkText(`mailto:${y}`).replace(/^mailto:/,""):y=e.md.normalizeLinkText(y):y=e.md.normalizeLinkText(`http://${y}`).replace(/^http:\/\//,"");const w=g.index;if(w>f){const x=new Es("text","",0);x.content=a.slice(f,w),x.level=d,c.push(x)}const k=new Es("link_open","a",1);k.attrs=[["href",m]],k.level=d++,k.markup="linkify",k.info="auto",c.push(k);const A=new Es("text","",0);A.content=y,A.level=d,c.push(A);const v=new Es("link_close","a",-1);v.level=--d,v.markup="linkify",v.info="auto",c.push(v),f=g.lastIndex}if(f!==0){if(f<a.length){const p=new Es("text","",0);p.content=a.slice(f),p.level=d,c.push(p)}s.splice(r,1,...c)}}}}const mle=/\r\n?|\n/g,vle=/\0/g;function yle(e){if(!e||typeof e.src!="string")return;const t=e.src,n=t.includes("\r"),i=t.includes("\0");if(!n&&!i)return;let s=t;n&&(s=s.replace(mle,` +`)),i&&(s=s.replace(vle,"�")),e.src=s}const xN=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,ble=/\((?:c|tm|r)\)/i,kle=/\((c|tm|r)\)/gi,Ale={c:"©",r:"®",tm:"™"};function Cle(e,t){return Ale[t.toLowerCase()]}function wle(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(kle,Cle)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function xle(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&xN.test(i.content)&&(i.content=i.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–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function _le(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 i=n.content||(Array.isArray(n.children)?n.children.map(s=>s.type==="text"?s.content:"").join(""):"");ble.test(i)&&wle(n.children||[]),xN.test(i)&&xle(n.children||[])}}var Sle=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(i=>i.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(i=>i.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 i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}after(e,t,n){const i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i+1,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.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 Mle=/['"]/,bw=/['"]/g,kw="’";function j0(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function Ile(e,t){let n;const i=[],s=t.md&&t.md.options&&t.md.options.quotes||"“”‘’";for(let o=0;o<e.length;o++){const r=e[o],l=e[o].level;for(n=i.length-1;n>=0&&!(i[n].level<=l);n--);if(i.length=n+1,r.type!=="text")continue;let a=r.content,u=0,c=a.length;e:for(;u<c;){bw.lastIndex=u;const d=bw.exec(a);if(!d)break;let f=!0,p=!0;u=d.index+1;const g=d[0]==="'";let m=32;if(d.index-1>=0)m=a.charCodeAt(d.index-1);else for(n=o-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 y=32;if(u<c)y=a.charCodeAt(u);else for(n=o+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){y=e[n].content.charCodeAt(0);break}const w=Fm(m)||Nm(String.fromCharCode(m)),k=Fm(y)||Nm(String.fromCharCode(y)),A=Y1(m),v=Y1(y);if(v?f=!1:k&&(A||w||(f=!1)),A?p=!1:w&&(v||k||(p=!1)),y===34&&d[0]==='"'&&m>=48&&m<=57&&(p=f=!1),f&&p&&(f=w,p=k),!f&&!p){g&&(r.content=j0(r.content,d.index,kw));continue}if(p)for(n=i.length-1;n>=0;n--){let x=i[n];if(i[n].level<l)break;if(x.single===g&&i[n].level===l){x=i[n];let E,S;g?(E=s[2]||"‘",S=s[3]||"’"):(E=s[0]||"“",S=s[1]||"”"),r.content=j0(r.content,d.index,S),e[x.token].content=j0(e[x.token].content,x.pos,E),u+=S.length-1,x.token===o&&(u+=E.length-1),a=r.content,c=a.length,i.length=n;continue e}}f?i.push({token:o,pos:d.index,single:g,level:l}):p&&g&&(r.content=j0(r.content,d.index,kw))}}}function Ele(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 i=typeof n.content=="string"?n.content:(n.children||[]).map(s=>s.content||"").join("");!Mle.test(i)||!n.children||Ile(n.children,e)}}function Tle(e){const t=e.tokens||[],n=t.length;for(let i=0;i<n;i++){const s=t[i];if(s.type!=="inline"||!Array.isArray(s.children))continue;const o=s.children,r=o.length;for(let u=0;u<r;u++)o[u].type==="text_special"&&(o[u].type="text");let l=0,a=0;for(;a<r;a++)o[a].type==="text"&&a+1<r&&o[a+1].type==="text"?o[a+1].content=o[a].content+o[a+1].content:(a!==l&&(o[l]=o[a]),l++);a!==l&&(o.length=l)}}const Lle=/^(?:vbscript|javascript|file|data):/,Nle=/^data:image\/(?:gif|png|jpeg|webp);/,_N=["http:","https:","mailto:"];function SN(e){const t=e.trim().toLowerCase();return Lle.test(t)?Nle.test(t):!0}function MN(e){const t=Y5(e,!0);if(t.hostname&&(!t.protocol||_N.includes(t.protocol)))try{t.hostname=YL.default.toASCII(t.hostname)}catch{}return qL(Q5(t))}function IN(e){const t=Y5(e,!0);if(t.hostname&&(!t.protocol||_N.includes(t.protocol)))try{t.hostname=YL.default.toUnicode(t.hostname)}catch{}return P3(Q5(t),`${P3.defaultChars}%`)}function Fle(e){switch(e){case 9:case 32:return!0}return!1}function Ble(e,t,n,i){const s=e.src,o=e.bMarks,r=e.eMarks,l=e.tShift,a=e.sCount,u=e.bsCount;let c=o[t]+l[t],d=r[t];const f=e.lineMax;if(a[t]-e.blkIndent>=4||s.charCodeAt(c)!==62)return!1;if(i)return!0;const p=[],g=[],m=[],y=[],w=e.md.block.ruler.getRulesForState(e,"blockquote"),k=e.parentType;e.parentType="blockquote";let A=!1,v;for(v=t;v<n;v++){const _=a[v]<e.blkIndent;if(c=o[v]+l[v],d=r[v],c>=d)break;if(s.charCodeAt(c++)===62&&!_){let D=a[v]+1,T,$;s.charCodeAt(c)===32?(c++,D++,$=!1,T=!0):s.charCodeAt(c)===9?(T=!0,(u[v]+D)%4===3?(c++,D++,$=!1):$=!0):T=!1;let P=D;for(p.push(o[v]),o[v]=c;c<d;){const O=s.charCodeAt(c);if(Fle(O))O===9?P+=4-(P+u[v]+($?1:0))%4:P++;else break;c++}A=c>=d,g.push(u[v]),u[v]=a[v]+1+(T?1:0),m.push(a[v]),a[v]=P-D,y.push(l[v]),l[v]=c-o[v];continue}if(A)break;let N=!1;for(let D=0,T=w.length;D<T;D++)if(w[D](e,v,n,!0)){N=!0;break}if(N){e.lineMax=v,e.blkIndent!==0&&(p.push(o[v]),g.push(u[v]),y.push(l[v]),m.push(a[v]),a[v]-=e.blkIndent);break}p.push(o[v]),g.push(u[v]),y.push(l[v]),m.push(a[v]),a[v]=-1}const x=e.blkIndent;e.blkIndent=0;const E=e.push("blockquote_open","blockquote",1);E.markup=">";const S=[t,0];E.map=S,e.md.block.tokenize(e,t,v);const M=e.push("blockquote_close","blockquote",-1);M.markup=">",e.lineMax=f,e.parentType=k,S[1]=e.line;for(let _=0;_<y.length;_++)o[_+t]=p[_],l[_+t]=y[_],a[_+t]=m[_],u[_+t]=g[_];return e.blkIndent=x,!0}function $le(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let i=t+1,s=i;for(;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,s=i;continue}break}e.line=s;const o=e.push("code_block","code",0);return o.content=`${e.getLines(t,s,4+e.blkIndent,!1)} +`,o.map=[t,e.line],!0}function Dle(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>o)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,o);if(r===96&&c.includes(String.fromCharCode(r)))return!1;if(i)return!0;let d=t,f=!1;for(;d++,!(d>=n||(s=l=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],s<o&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(s)===r&&!(e.sCount[d]-e.blkIndent>=4)&&(s=e.skipChars(s,r),!(s-l<a)&&(s=e.skipSpaces(s),!(s<o)))){f=!0;break}a=e.sCount[t],e.line=d+(f?1:0);const p=e.push("fence","code",0);return p.info=c,p.content=e.getLines(t+1,d,a,!0),p.markup=u,p.map=[t,e.line],!0}const Aw=["","h1","h2","h3","h4","h5","h6"],Cw=["","#","##","###","####","#####","######"];function ww(e){switch(e){case 9:case 32:return!0}return!1}function Rle(e,t,n,i){const s=e.src,o=e.bMarks,r=e.tShift,l=e.eMarks;let a=o[t]+r[t],u=l[t];if(e.sCount[t]-e.blkIndent>=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&&a<u&&d<=6;)d++,c=s.charCodeAt(++a);if(d>6||a<u&&!ww(c))return!1;if(i)return!0;u=e.skipSpacesBack(u,a);const f=e.skipCharsBack(u,35,a);f>a&&ww(s.charCodeAt(f-1))&&(u=f),e.line=t+1;const p=e.push("heading_open",Aw[d],1);p.markup=Cw[d],p.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",Aw[d],-1);return m.markup=Cw[d],!0}function zle(e){switch(e){case 9:case 32:return!0}return!1}function Ole(e,t,n,i){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(o++);if(r!==42&&r!==45&&r!==95)return!1;let l=1;for(;o<s;){const u=e.src.charCodeAt(o++);if(u!==r&&!zle(u))return!1;u===r&&l++}if(l<3)return!1;if(i)return!0;e.line=t+1;const a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=new Array(l+1).join(String.fromCharCode(r)),!0}const Td=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${Wre.source}\\s*$`),/^$/,!1]];function Ple(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=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,o),l=0;for(;l<Td.length&&!Td[l][0].test(r);l++);if(l===Td.length)return!1;if(i)return Td[l][2];let a=t+1;if(!Td[l][1].test(r)){for(;a<n&&!(e.sCount[a]<e.blkIndent);a++)if(s=e.bMarks[a]+e.tShift[a],o=e.eMarks[a],r=e.src.slice(s,o),Td[l][1].test(r)){r.length!==0&&a++;break}}e.line=a;const u=e.push("html_block","",0);return u.map=[t,a],u.content=e.getLines(t,a,e.blkIndent,!0),!0}function xw(e){switch(e){case 9:case 32:return!0}return!1}const f1={Pipe:1,ParagraphTerminator:2};function jle(e){switch(e){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 124:case 126:return!0}return e>=48&&e<=57}var EN=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,i){this.src=e,this.md=t,this.env=n,this.tokens=i;const s=this.src;let o=0,r=0,l=0,a=!1,u=0;for(let c=0,d=s.length;c<d;c++){const f=s.charCodeAt(c);if(f===124&&(u|=f1.Pipe|f1.ParagraphTerminator),!a)if(xw(f)){o++,f===9?r+=4-r%4:r++;continue}else a=!0,jle(f)&&(u|=f1.ParagraphTerminator);(f===10||c===d-1)&&(f!==10&&c++,this.bMarks.push(l),this.eMarks.push(c),this.tShift.push(o),this.sCount.push(r),this.bsCount.push(0),this.lineFlags.push(u),a=!1,o=0,r=0,u=0,l=c+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineFlags.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){if(n===0){const s=new Es(e,t,0);return s.block=!0,s.level=this.level,this.tokens.push(s),s}const i=new Es(e,t,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){const t=this.bMarks,n=this.tShift,i=this.eMarks;for(let s=this.lineMax;e<s&&!(t[e]+n[e]<i[e]);e++);return e}skipSpaces(e){const t=this.src;for(let n=t.length;e<n;e++){const i=t.charCodeAt(e);if(i!==9&&i!==32)break}return e}skipSpacesBack(e,t){if(e<=t)return e;const n=this.src;for(;e>t;){const i=n.charCodeAt(--e);if(i!==9&&i!==32)return e+1}return e}skipChars(e,t){const n=this.src;for(let i=n.length;e<i&&n.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,n){if(e<=n)return e;const i=this.src;for(;e>n;)if(t!==i.charCodeAt(--e))return e+1;return e}getLines(e,t,n,i){if(e>=t)return"";if(e+1===t){const c=e,d=this.bMarks[c];let f=d;const p=i?this.eMarks[c]+1:this.eMarks[c];let g=0;const m=this.src,y=this.bsCount,w=this.tShift;for(;f<p&&g<n;){const k=m.charCodeAt(f);if(k===9||k===32)k===9?g+=4-(g+y[c])%4:g++;else if(f-d<w[c])g++;else break;f++}return g>n?new Array(g-n+1).join(" ")+m.slice(f,p):m.slice(f,p)}const s=new Array(t-e),o=this.src,r=this.bMarks,l=this.eMarks,a=this.bsCount,u=this.tShift;for(let c=0,d=e;d<t;d++,c++){let f=0;const p=r[d];let g=p,m;for(d+1<t||i?m=l[d]+1:m=l[d];g<m&&f<n;){const y=o.charCodeAt(g);if(xw(y))y===9?f+=4-(f+a[d])%4:f++;else if(g-p<u[d])f++;else break;g++}f>n?s[c]=new Array(f-n+1).join(" ")+o.slice(g,m):s[c]=o.slice(g,m)}return s.join("")}};EN.prototype.Token=Es;function Hle(e,t,n){for(let i=t;i<n;i++)if(e.charCodeAt(i)===124)return!0;return!1}function TN(e){const t=e?.md?.block?.ruler;return t?t.version===t.__mdtsDefaultVersion:!1}function LN(e,t,n,i,s){if(e.lineFlags&&(e.lineFlags[t]&f1.ParagraphTerminator)===0||i>=s)return!1;const o=n.charCodeAt(i);switch(o){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 126:return!0}return o>=48&&o<=57?!0:Hle(n,i,s)}const _w=["","h1","h2"];function Wle(e,t,n){const i=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.src,o=e.bMarks,r=e.tShift,l=e.eMarks,a=e.sCount,u=e.blkIndent,c=TN(e);if(a[t]-u>=4)return!1;const d=e.parentType;e.parentType="paragraph";let f=0,p,g=t+1;for(;g<n;g++){const v=o[g]+r[g],x=l[g];if(v>=x)break;if(a[g]-u>3)continue;if(a[g]>=u&&(p=s.charCodeAt(v),p===45||p===61)){let S=v+1,M=S;for(;S<x&&s.charCodeAt(S)===p;)S++;for(M=S;S<x;){const _=s.charCodeAt(S);if(_!==9&&_!==32)break;S++}if(S>=x){f=p===61?1:2;break}if(M-v>1)continue}if(a[g]<0||c&&!LN(e,g,s,v,x))continue;let E=!1;for(let S=0,M=i.length;S<M;S++)if(i[S](e,g,n,!0)){E=!0;break}if(E)break}if(!f)return!1;let m;if(g===t+1){const v=o[t]+r[t];let x=l[t];for(;x>v;){const E=s.charCodeAt(x-1);if(E!==9&&E!==32)break;x--}m=s.slice(v,x)}else m=e.getLines(t,g,u,!1).trim();e.line=g+1;const y=p===61?"=":"-",w=e.push("heading_open",_w[f],1);w.markup=y,w.map=[t,e.line];const k=e.push("inline","",0);k.content=m,k.map=[t,e.line-1],k.children=[];const A=e.push("heading_close",_w[f],-1);return A.markup=y,e.parentType=d,!0}function NN(e){switch(e){case 9:case 32:return!0}return!1}function Sw(e,t){const n=e.eMarks,i=e.bMarks,s=e.tShift,o=e.src,r=n[t];let l=i[t]+s[t];const a=o.charCodeAt(l++);return a!==42&&a!==45&&a!==43||l<r&&!NN(o.charCodeAt(l))?-1:l}function Mw(e,t){const n=e.bMarks,i=e.tShift,s=e.eMarks,o=e.src,r=n[t]+i[t],l=s[t];let a=r;if(a+1>=l)return-1;let u=o.charCodeAt(a++);if(u<48||u>57)return-1;for(;;){if(a>=l)return-1;if(u=o.charCodeAt(a++),u>=48&&u<=57){if(a-r>=10)return-1;continue}if(u===41||u===46)break;return-1}return a<l&&(u=o.charCodeAt(a),!NN(u))?-1:a}function qle(e,t,n){const i=e.bMarks,s=e.tShift,o=e.src,r=i[t]+s[t];let l=0;for(let a=r;a<n-1;a++)l=l*10+o.charCodeAt(a)-48;return l}const Ule=["0","1","2","3","4","5","6","7","8","9"];function Kle(e,t){const n=e.level+2,i=e.tokens;for(let s=t+2,o=i.length-2;s<o;s++){const r=i[s];if(r.level===n){if(r.type==="paragraph_open"){r.hidden=!0,i[s+2].hidden=!0,s+=2;continue}if(r.nesting===1){let l=1;for(;l>0&&++s<o;)l+=i[s].nesting}}}}function Vle(e,t,n,i){let s,o,r=0,l=t,a=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let u=!1;i&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(u=!0);let c,d,f;const p=e.src,g=e.bMarks,m=e.tShift,y=e.eMarks,w=e.sCount,k=e.bsCount,A=g[l]+m[l];if(A>=y[l])return!1;const v=p.charCodeAt(A);if(v>=48&&v<=57){if(f=Mw(e,l),f<0||(c=!0,r=A,d=qle(e,l,f),u&&d!==1))return!1}else if(v===42||v===45||v===43){if(f=Sw(e,l),f<0)return!1;c=!1}else return!1;if(u&&e.skipSpaces(f)>=y[l])return!1;if(i)return!0;const x=p.charCodeAt(f-1),E=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 S=[l,0];e.tokens[e.tokens.length-1].map=S,e.tokens[e.tokens.length-1].markup=E;let M=!1;const _=e.tokens.length-1,N=e.md.block.ruler.getRulesForState(e,"list"),D=e.parentType;for(e.parentType="list";l<n;){o=f,s=y[l];const T=w[l]+f-(g[l]+m[l]);let $=T;for(;o<s;){const ee=p.charCodeAt(o);if(ee===9)$+=4-($+k[l])%4;else if(ee===32)$++;else break;o++}const P=o;let O;P>=s?O=1:O=$-T,O>4&&(O=1);const R=T+O,W=e.push("list_item_open","li",1);W.markup=E;const z=[l,0];W.map=z,c&&(W.info=f-r-1===1?Ule[p.charCodeAt(r)-48]:p.slice(r,f-1));const G=e.tight,K=e.tShift[l],H=e.sCount[l],q=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=R,e.tight=!0,e.tShift[l]=P-g[l],e.sCount[l]=$,P>=s&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||M)&&(a=!1),M=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=q,e.tShift[l]=K,e.sCount[l]=H,e.tight=G,e.push("list_item_close","li",-1).markup=E,l=e.line,z[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let X=!1;for(let ee=0,ue=N.length;ee<ue;ee++)if(N[ee](e,l,n,!0)){X=!0;break}if(X)break;if(c){if(f=Mw(e,l),f<0)break;r=g[l]+m[l]}else if(f=Sw(e,l),f<0)break;if(x!==p.charCodeAt(f-1))break}return c?e.push("ordered_list_close","ol",-1).markup=E:e.push("bullet_list_close","ul",-1).markup=E,S[1]=l,e.line=l,e.parentType=D,a&&Kle(e,_),!0}function Iw(e){return e===9||e===32}function Zle(e,t,n){const i=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.parentType,o=e.src,r=e.bMarks,l=e.tShift,a=e.eMarks,u=e.sCount,c=e.blkIndent,d=TN(e);let f=t+1;for(e.parentType="paragraph";f<n&&!e.isEmpty(f);f++){if(u[f]-c>3||u[f]<0)continue;if(s==="list"&&u[f]>=c){const A=r[f]+l[f],v=a[f];if(A<v){const x=o.charCodeAt(A);if(x===42||x===45||x===43){if(A+1>=v||Iw(o.charCodeAt(A+1)))break}else if(x>=48&&x<=57&&A+1<v){let E=A+1;for(;;){if(E>=v){E=-1;break}const S=o.charCodeAt(E++);if(S>=48&&S<=57){if(E-A>=10){E=-1;break}continue}if((S===41||S===46)&&(E>=v||Iw(o.charCodeAt(E))))break;E=-1;break}if(E>=0)break}}}const y=r[f]+l[f],w=a[f];if(d&&!LN(e,f,o,y,w))continue;let k=!1;for(let A=0,v=i.length;A<v;A++)if(i[A](e,f,n,!0)){k=!0;break}if(k)break}const p=e.getLines(t,f,c,!1).trim();e.line=f;const g=e.push("paragraph_open","p",1);g.map=[t,e.line];const m=e.push("inline","",0);return m.content=p,m.map=[t,e.line],m.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}function H0(e){switch(e){case 9:case 32:return!0}return!1}function Gle(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],r=t+1;const l=e.md.block.ruler.getRulesForState(e,"reference");if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==91)return!1;function a(A){const v=e.lineMax;if(A>=v||e.isEmpty(A))return null;let x=!1;if(e.sCount[A]-e.blkIndent>3&&(x=!0),e.sCount[A]<0&&(x=!0),!x){const M=e.parentType;e.parentType="reference";let _=!1;for(let N=0,D=l.length;N<D;N++)if(l[N](e,A,v,!0)){_=!0;break}if(e.parentType=M,_)return null}const E=e.bMarks[A]+e.tShift[A],S=e.eMarks[A];return e.src.slice(E,S+1)}let u=e.src.slice(s,o+1);o=u.length;let c=-1;for(s=1;s<o;s++){const A=u.charCodeAt(s);if(A===91)return!1;if(A===93){c=s;break}else if(A===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(A===92&&(s++,s<o&&u.charCodeAt(s)===10)){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(s=c+2;s<o;s++){const A=u.charCodeAt(s);if(A===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(!H0(A))break}const d=e.md.helpers.parseLinkDestination(u,s,o);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;s=d.pos;const p=s,g=r,m=s;for(;s<o;s++){const A=u.charCodeAt(s);if(A===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(!H0(A))break}let y=e.md.helpers.parseLinkTitle(u,s,o);for(;y.can_continue;){const A=a(r);if(A===null)break;u+=A,s=o,o=u.length,r++,y=e.md.helpers.parseLinkTitle(u,s,o,y)}let w;for(s<o&&m!==s&&y.ok?(w=y.str,s=y.pos):(w="",s=p,r=g);s<o&&H0(u.charCodeAt(s));)s++;if(s<o&&u.charCodeAt(s)!==10&&w)for(w="",s=p,r=g;s<o&&H0(u.charCodeAt(s));)s++;if(s<o&&u.charCodeAt(s)!==10)return!1;const k=pv(u.slice(1,c));return k?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[k]>"u"&&(e.env.references[k]={title:w,href:f}),e.line=r),!0):!1}function gy(e){switch(e){case 9:case 32:return!0}return!1}const Qle=65536;function my(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function Yle(e,t){if(e.lineFlags)return(e.lineFlags[t]&f1.Pipe)!==0;for(let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];n<i;n++)if(e.src.charCodeAt(n)===124)return!0;return!1}function Ew(e){const t=[],n=e.length;let i=0,s=e.charCodeAt(i),o=!1,r=0,l="";for(;i<n;)s===124&&(o?(l+=e.substring(r,i-1),r=i):(t.push(l+e.substring(r,i)),l="",r=i+1)),o=s===92,i++,s=e.charCodeAt(i);return t.push(l+e.substring(r)),t}function Jle(e,t,n,i){if(t+2>n)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent||e.sCount[s]-e.blkIndent>=4)return!1;let o=e.bMarks[s]+e.tShift[s];if(o>=e.eMarks[s])return!1;const r=e.src.charCodeAt(o++);if(r!==124&&r!==45&&r!==58||o>=e.eMarks[s])return!1;const l=e.src.charCodeAt(o++);if(l!==124&&l!==45&&l!==58&&!gy(l)||r===45&&gy(l)||!Yle(e,t))return!1;for(;o<e.eMarks[s];){const v=e.src.charCodeAt(o);if(v!==124&&v!==45&&v!==58&&!gy(v))return!1;o++}let a=my(e,t+1),u=a.split("|");const c=[];for(let v=0;v<u.length;v++){const x=u[v].trim();if(!x){if(v===0||v===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(x))return!1;x.charCodeAt(x.length-1)===58?c.push(x.charCodeAt(0)===58?"center":"right"):x.charCodeAt(0)===58?c.push("left"):c.push("")}if(a=my(e,t).trim(),e.sCount[t]-e.blkIndent>=4)return!1;u=Ew(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(i)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRulesForState(e,"blockquote"),g=e.push("table_open","table",1),m=[t,0];g.map=m;const y=e.push("thead_open","thead",1);y.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let v=0;v<u.length;v++){const x=e.push("th_open","th",1);c[v]&&(x.attrs=[["style",`text-align:${c[v]}`]]);const E=e.push("inline","",0);E.content=u[v].trim(),E.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let k,A=0;for(s=t+2;s<n&&!(e.sCount[s]<e.blkIndent);s++){let v=!1;for(let E=0,S=p.length;E<S;E++)if(p[E](e,s,n,!0)){v=!0;break}if(v||(a=my(e,s).trim(),!a)||e.sCount[s]-e.blkIndent>=4||(u=Ew(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),A+=d-u.length,A>Qle))break;if(s===t+2){const E=e.push("tbody_open","tbody",1);E.map=k=[t+2,0]}const x=e.push("tr_open","tr",1);x.map=[s,s+1];for(let E=0;E<d;E++){const S=e.push("td_open","td",1);c[E]&&(S.attrs=[["style",`text-align:${c[E]}`]]);const M=e.push("inline","",0);M.content=u[E]?u[E].trim():"",M.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return k&&(e.push("tbody_close","tbody",-1),k[1]=s),e.push("table_close","table",-1),m[1]=s,e.parentType=f,e.line=s,!0}var Xle=class{_rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t,n){this._rules.push({name:e,enabled:!0,fn:t,alt:n?.alt||[]}),this.invalidateCache()}before(e,t,n,i){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s,0,{name:t,enabled:!0,fn:n,alt:i?.alt||[]}),this.invalidateCache()}after(e,t,n,i){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:i?.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:i,fn:s})=>(o,r,l,a)=>{const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),c=s(o,r,l,a),d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();return hf(o?.env,"block",i,d-u,c,!!a),c}):this.getRules(t)}at(e,t,n){const i=this._rules.findIndex(s=>s.name===e);if(i===-1)throw new Error(`Parser rule not found: ${e}`);this._rules[i].fn=t,n?.alt&&(this._rules[i].alt=n.alt),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled||(this._rules[r].enabled=!0,s=!0)}),s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled&&(this._rules[r].enabled=!1,s=!0)}),s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this._rules){const s=t.has(i.name);i.enabled!==s&&(i.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){const e=new Set([""]);for(const i of this._rules)if(i.enabled)for(const s of i.alt)e.add(s);const t=Object.create(null),n=Object.create(null);for(const i of e){const s=[],o=[];for(const r of this._rules)r.enabled&&(i!==""&&!r.alt.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t[i]=s,n[i]=o}this.cache=t,this.namedCache=n}};const W0=[["table",Jle,["paragraph","reference"]],["code",$le],["fence",Dle,["paragraph","reference","blockquote","list"]],["blockquote",Ble,["paragraph","reference","blockquote","list"]],["hr",Ole,["paragraph","reference","blockquote","list"]],["list",Vle,["paragraph","reference","blockquote"]],["reference",Gle],["html_block",Ple,["paragraph","reference","blockquote"]],["heading",Rle,["paragraph","reference","blockquote"]],["lheading",Wle],["paragraph",Zle]];var eae=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new Xle;for(let e=0;e<W0.length;e++)this.ruler.push(W0[e][0],W0[e][1],{alt:(W0[e][2]||[]).slice()});this.ruler.__mdtsDefaultVersion=this.ruler.version}tokenize(e,t,n){const i=this.getRules(),s=i.length,o=e.md.options.maxNesting,r=e.bMarks,l=e.tShift,a=e.eMarks,u=e.sCount;let c=t,d=!1;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){for(;c<n;){for(;c<n&&r[c]+l[c]>=a[c];)c++;if(e.line=c,c>=n||u[c]<e.blkIndent)break;if(e.level>=o){e.line=n;break}const p=e.line;let g=!1;for(let m=0;m<s;m++)if(g=i[m](e,c,n,!1),g){if(p>=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<n&&r[c]+l[c]>=a[c]&&(d=!0,c++,e.line=c)}return}const f=this.ruler.getNamedRules("");for(;c<n;){for(;c<n&&r[c]+l[c]>=a[c];)c++;if(e.line=c,c>=n||u[c]<e.blkIndent)break;if(e.level>=o){e.line=n;break}const p=e.line;let g=!1;for(let m=0;m<s;m++){const y=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();g=f[m].fn(e,c,n,!1);const w=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(hf(e.env,"block",f[m].name,w-y,g,!1),g){if(p>=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<n&&r[c]+l[c]>=a[c]&&(d=!0,c++,e.line=c)}}parse(e,t,n,i){if(!e||e.length===0)return;const s=new EN(e,t,n,i);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}},FN=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}};FN.prototype.Token=Es;const Tw=[["normalize",yle],["block",_re],["inline",ule],["linkify",gle],["replacements",_le],["smartquotes",Ele],["text_join",Tle]],tae={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},nae={parseLinkLabel:ob,parseLinkDestination:sb,parseLinkTitle:rb};function iae(){return{...tae}}function sae(){return{...nae}}var oae=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new eae,this.inline=new ale,this.ruler=new Sle;for(let e=0;e<Tw.length;e++){const[t,n]=Tw[e];this.ruler.push(t,n)}this.fallbackParser={block:this.block,inline:this.inline,core:this,options:iae(),helpers:sae(),normalizeLink:MN,normalizeLinkText:IN,validateLink:SN,linkify:null}}resolveParser(e){return e||(this.linkifyInstance||(this.linkifyInstance=new QL({fuzzyLink:!0})),this.fallbackParser.block!==this.block&&(this.fallbackParser.block=this.block),this.fallbackParser.inline!==this.inline&&(this.fallbackParser.inline=this.inline),this.fallbackParser.core=this,this.fallbackParser.linkify=this.linkifyInstance,this.fallbackParser)}createState(e,t={},n){return new FN(e,this.resolveParser(n),t)}getCoreRules(){return this.cachedCoreRulesVersion!==this.ruler.version&&(this.cachedCoreRules=this.ruler.getRules(""),this.cachedCoreRulesVersion=this.ruler.version),this.cachedCoreRules}getCoreNamedRules(){return this.cachedCoreNamedRulesVersion!==this.ruler.version&&(this.cachedCoreNamedRules=this.ruler.getNamedRules(""),this.cachedCoreNamedRulesVersion=this.ruler.version),this.cachedCoreNamedRules}process(e){if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const n=this.getCoreRules();for(let i=0;i<n.length;i++)n[i](e);return}const t=this.getCoreNamedRules();for(let n=0;n<t.length;n++){const i=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();t[n].fn(e);const s=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();hf(e.env,"core",t[n].name,s-i,!0,!1)}rle(e.env)}parseSource(e,t={},n){if(typeof e!="string"&&xre(e))return this.parse(eN(e),t,n);const i=this.createState(e,t,n);return this.process(i),this.lastState=i,i}parse(e,t={},n){if(typeof e!="string")throw new TypeError("Input data should be a String");return this.parseSource(e,t,n)}getTokens(){return this.lastState?this.lastState.tokens:[]}};const rae=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/;function Dm(e){return!rae.test(e)}function Vh(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function Ig(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9)return!1}return!0}function Lw(e,t,n){return t+2<n&&e.charCodeAt(t)===96&&e.charCodeAt(t+1)===96&&e.charCodeAt(t+2)===96}function vy(e,t,n){return t+1<n&&e.charCodeAt(t)===45&&e.charCodeAt(t+1)===32}function lae(e){if(e.length>3)return Dm(e);for(let t=0;t<e.length;t++)switch(e.charCodeAt(t)){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!1}return!0}const aae=["","h1","h2","h3","h4","h5","h6"],uae=["","#","##","###","####","#####","######"],Nw=0,yy=1,by=2;function Or(e,t,n,i){const s=new Es(e,t,n);return s.level=i,s.block=!0,s}function cb(e,t,n){const i=Or("inline","",0,n);i.map=[t,t+1],i.content=e;const s=new Es("text","",0);return s.content=e,i.children=[s],i}function cae(e,t,n,i,s){let o=0,r=n;for(;r<i&&t.charCodeAt(r)===35&&o<6;)r++,o++;if(o===0||r>=i||t.charCodeAt(r)!==32)return!1;let l=r+1;for(;l<i&&t.charCodeAt(l)===32;)l++;let a=i;for(;a>l&&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(!Dm(c))return!1;const d=aae[o],f=uae[o],p=Or("heading_open",d,1,0);p.map=[s,s+1],p.markup=f,e.push(p),e.push(cb(c,s,1));const g=Or("heading_close",d,-1,0);return g.markup=f,e.push(g),!0}function dae(e,t,n){const i=Or("paragraph_open","p",1,0);i.map=[n,n+1],e.push(i),e.push(cb(t,n,1)),e.push(Or("paragraph_close","p",-1,0))}function fae(e,t,n){const i=e.charCodeAt(n-1);return i===32||i===9?e.slice(t,n).trim():e.slice(t,n)}function ky(e,t){for(;t<e.length&&e.charCodeAt(t)===10;)t++;return t}function hae(e,t){const n=Or("bullet_list_open","ul",1,0);return n.map=[t,t],n.markup="-",e.push(n),n}function pae(e,t,n){const i=Or("list_item_open","li",1,1);i.map=[n,n+1],i.markup="-",e.push(i);const s=Or("paragraph_open","p",1,2);s.map=[n,n+1],s.hidden=!0,e.push(s),e.push(cb(t,n,3));const o=Or("paragraph_close","p",-1,2);o.hidden=!0,e.push(o);const r=Or("list_item_close","li",-1,1);return r.markup="-",e.push(r),i}function gae(e){const t=Or("bullet_list_close","ul",-1,0);t.markup="-",e.push(t)}function mae(e,t,n,i){if(!Lw(e,t,n))return null;const s=e.slice(t+3,n);if(s.includes("`"))return null;const o=n<e.length?n+1:n;let r=o,l=o,a=i+1;for(;l<e.length;){const u=Vh(e,l);if(Lw(e,l,u)&&Ig(e,l+3,u)){const c=Or("fence","code",0,0);return c.map=[i,a+1],c.markup="```",c.info=s,c.content=e.slice(o,r),{token:c,nextPos:u<e.length?u+1:u,nextLine:a+1}}l=u<e.length?u+1:u,r=l,a++}return null}function vae(e,t){if(e.length===0)return t&&(t.matched=!0),[];if(e.includes("\r")||e.includes("\0"))return null;const n=[];let i=e.length>=1e5?Nw:by,s="",o=!1,r=!1,l=0,a=0;for(;l<e.length;){const u=Vh(e,l);if(l===u){l=u<e.length?u+1:u,a++;continue}const c=e.charCodeAt(l);if(c===32||c===9){if(!Ig(e,l,u))return null;l=u<e.length?u+1:u,a++;continue}if(c===35){if(!cae(n,e,l,u,a))return null;t&&(t.blocks++,t.headings++);const g=u<e.length?u+1:u;l=ky(e,g),a+=1+l-g;continue}if(c===45){if(!vy(e,l,u))return null;const g=a;let m=l,y=a,w=null,k=null;for(;m<e.length;){const x=Vh(e,m);if(!vy(e,m,x))break;const E=m+2,S=x===E+1?e[E]:e.slice(E,x);if(!lae(S))return null;w===null&&(w=hae(n,g)),k=pae(n,S,y),m=x<e.length?x+1:x,y++}if(w===null||k===null)return null;let A=m,v=y;for(;A<e.length;){if(e.charCodeAt(A)===10){A++,v++;continue}const x=Vh(e,A);if(!Ig(e,A,x)){if(vy(e,A,x))return null;break}A=x<e.length?x+1:x,v++}w.map[1]=v,k.map[1]=v,gae(n),t&&(t.blocks++,t.lists++),l=A,a=v;continue}if(c===96){const g=mae(e,l,u,a);if(!g)return null;n.push(g.token),t&&(t.blocks++,t.fences++),l=ky(e,g.nextPos),a=g.nextLine+l-g.nextPos;continue}const d=fae(e,l,u);let f;if(i===by?(t&&t.paragraphCacheBypasses++,f=Dm(d)):i===yy&&d===s?(t&&t.paragraphCacheHits++,f=o):(t&&t.paragraphCacheMisses++,f=Dm(d),i===Nw?(r&&(i=d===s?yy:by),s=d,o=f,r=!0):i===yy&&(s=d,o=f)),!f)return null;const p=u<e.length?u+1:u;if(p<e.length&&e.charCodeAt(p)!==10&&!Ig(e,p,Vh(e,p)))return null;dae(n,d,a),t&&(t.blocks++,t.paragraphs++),l=ky(e,p),a+=1+l-p}return t&&(t.matched=!0),n}const yae=/[&<>"]/,Fw=/[&<>"]/g,bae=/&/g,kae=/[<>"]/g,Aae={"&":"&","<":"<",">":">",'"':"""};function Ay(e){return Aae[e]||e}function pi(e){if(e.length===0)return"";if(e.length<32)return yae.test(e)?e.replace(Fw,Ay):e;const t=e.includes("&"),n=e.includes("<"),i=e.includes(">"),s=e.includes('"');return!t&&!n&&!i&&!s?e:t&&!n&&!i&&!s?e.replace(bae,"&"):t?e.replace(Fw,Ay):e.replace(kae,Ay)}const Cae=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),wae=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function BN(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(Cae,(t,n,i)=>{if(n)return n;if(wae.test(i)){const o=i[1].toLowerCase()==="x"?Number.parseInt(i.slice(2),16):Number.parseInt(i.slice(1),10);return gv(o)?J1(o):"�"}const s=G5(t);return s!==t?s:t})}const xae=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,_ae=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,Sae=/"/g;function Qd(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function Rm(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9)return!1}return!0}function q0(e,t){for(;t<e.length&&e.charCodeAt(t)===10;)t++;return t}function Mae(e,t){return t>=e.length||e.charCodeAt(t)===10?!1:!Rm(e,t,Qd(e,t))}function Bw(e,t,n){return t+2<n&&e.charCodeAt(t)===96&&e.charCodeAt(t+1)===96&&e.charCodeAt(t+2)===96}function Iae(e,t,n){const i=e.charCodeAt(n-1);return i===32||i===9?e.slice(t,n).trim():e.slice(t,n)}function db(e){return _ae.test(e)?xae.test(e)?null:e.replace(Sae,"""):e}function Eae(e,t,n){let i=0,s=t;for(;s<n&&e.charCodeAt(s)===35&&i<6;)s++,i++;if(i===0||s>=n||e.charCodeAt(s)!==32)return null;let o=s+1;for(;o<n&&e.charCodeAt(o)===32;)o++;let r=n;for(;r>o&&e.charCodeAt(r-1)===32;)r--;let l=r;for(;l>o&&e.charCodeAt(l-1)===35;)l--;if(l>o&&e.charCodeAt(l-1)===32)for(r=l-1;r>o&&e.charCodeAt(r-1)===32;)r--;const a=db(e.slice(o,r));return a===null?null:`<h${i}>${a}</h${i}> +`}function $w(e,t,n){return t+1<n&&e.charCodeAt(t)===45&&e.charCodeAt(t+1)===32}function Tae(e,t){switch(e.charCodeAt(t)){case 34:return`<li>"</li> +`;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`<li>${e[t]}</li> +`}function Lae(e,t,n){const i=t+2;if(n===i+1)return Tae(e,i);const s=db(e.slice(t+2,n));return s===null?null:`<li>${s}</li> +`}function Nae(e,t,n){for(;t<n;){const s=e.charCodeAt(t);if(s!==32&&s!==9)break;t++}for(;n>t;){const s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}let i=n;for(let s=t;s<n;s++){const o=e.charCodeAt(s);if(o===96)return null;if(o===32||o===9){i=s;break}}return e.slice(t,i)}function Fae(e,t,n,i,s){if(!Bw(e,t,n))return null;const o=Nae(e,t+3,n);if(o===null)return null;const r=n<e.length?n+1:n;let l=r,a=r;for(;a<e.length;){const u=Qd(e,a);if(Bw(e,a,u)&&Rm(e,a+3,u)){const c=e.slice(r,l);let d;return o===i.lang?(s&&s.fenceCacheHits++,d=i.open):(s&&s.fenceCacheMisses++,d=o?`<pre><code class="language-${pi(o)}">`:"<pre><code>",i.lang=o,i.open=d),{html:`${d}${pi(c)}</code></pre> +`,nextPos:u<e.length?u+1:u}}a=u<e.length?u+1:u,l=a}return null}function $N(e,t){if(e.length===0)return t&&(t.matched=!0),"";if(e.includes("\r")||e.includes("\0"))return null;let n=0,i="";const s=e.length>=25e4,o=[],r={lang:null,open:""};let l="",a="",u="",c="";for(;n<e.length;){const d=Qd(e,n);if(n===d){n=d<e.length?d+1:d;continue}const f=e.charCodeAt(n);if(f===32||f===9){if(!Rm(e,n,d))return null;n=d<e.length?d+1:d;continue}if(f===35){const y=Eae(e,n,d);if(y===null)return null;t&&(t.blocks++,t.headings++),s?o.push(y):i+=y,n=q0(e,d<e.length?d+1:d);continue}if(f===45){let y=n;for(;y<e.length;){const v=Qd(e,y);if(!$w(e,y,v))break;y=v<e.length?v+1:v}if(y===n)return null;const w=e.slice(n,y);let k;if(w===l)t&&t.listCacheHits++,k=a;else{t&&t.listCacheMisses++;let v=n;for(k=`<ul> +`;v<y;){const x=Qd(e,v),E=Lae(e,v,x);if(E===null)return null;k+=E,v=x<e.length?x+1:x}k+=`</ul> +`,l=w,a=k}let A=q0(e,y);for(;A<e.length;){if(e.charCodeAt(A)===10){A++;continue}const v=Qd(e,A);if(!Rm(e,A,v)){if($w(e,A,v))return null;break}A=v<e.length?v+1:v}t&&(t.blocks++,t.lists++),s?o.push(k):i+=k,n=A;continue}if(f===96){const y=Fae(e,n,d,r,t);if(!y)return null;t&&(t.blocks++,t.fences++),s?o.push(y.html):i+=y.html,n=q0(e,y.nextPos);continue}const p=Iae(e,n,d);let g;if(p===u)t&&t.paragraphCacheHits++,g=c;else{t&&t.paragraphCacheMisses++;const y=db(p);if(y===null)return null;g=`<p>${y}</p> +`,u=p,c=g}const m=d<e.length?d+1:d;if(m<e.length&&e.charCodeAt(m)!==10&&Mae(e,m))return null;t&&(t.blocks++,t.paragraphs++),s?o.push(g):i+=g,n=q0(e,m)}return t&&(t.matched=!0),s?o.join(""):i}function Dw(e){return $N(e)}function Rw(e,t){return $N(e,t)}const Bae={maxChunkChars:1e4,maxChunkLines:200,fenceAware:!0,maxChunks:void 0,fallbackOnGlobalState:!0};function zm(e,t,n={},i){Lo(n);const s={...Bae,...i||{}},o=Qo(t);if(s.fallbackOnGlobalState!==!1&&o)return fy(n,{count:1,fallback:!0,fallbackReason:o,globalStateDetected:o,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),ff(n,o,()=>e.core.parse(t,n,e).tokens);let r=Eg(t,s);if(s.maxChunks&&r.length>s.maxChunks&&(r=zae(r,s.maxChunks)),Tg(t,r))return fy(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),ff(n,o,()=>e.core.parse(t,n,e).tokens);let l=0;const a=[];return fy(n,{count:r.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:o||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!o}),ff(n,o,()=>{for(let u=0;u<r.length;u++){const c=r[u],d=t.slice(c.start,c.end),f=e.core.parse(d,n,e).tokens;l!==0&&f.length&&Dae(f,l),Rae(a,f),l+=c.lineCount}return a})}function Eg(e,t,n=!0){const i=[];let s=0,o=0,r=0,l=0,a=0,u=0,c=null;function d(f){f<=r||(i.push({start:r,end:f,lineCount:l}),r=f,s=0,o=0,l=0)}for(let f=0;f<e.length;){let p=e.indexOf(` +`,f),g=p;p===-1?(p=e.length,g=e.length):g=p+1;const m=Oae(e,f,p);if(t.fenceAware){let k=f;for(;k<p;){const v=e.charCodeAt(k);if(v===32||v===9)k++;else break}const A=e[k];if(A==="`"||A==="~"){let v=k;for(;v<p&&e[v]===A;)v++;const x=v-k;x>=3&&(c?c.marker===A&&x>=c.length&&(c=null):c={marker:A,length:x})}}const y=g-f;s+=y,o+=1,l+=1,m?(a=0,u=0):(a+=1,u+=y);const w=m;if((s>=t.maxChunkChars||o>=t.maxChunkLines)&&!c)if(w)d(g);else{const k=Math.max(10,Math.floor(t.maxChunkLines*.5)),A=Math.max(t.maxChunkChars,8e3);(a>=k||u>=A)&&d(g)}f=g}return n&&d(e.length),i}function Tg(e,t,n={rangesCoverWholeSource:!0}){const i=n.rangesCoverWholeSource?t.length-1:t.length;for(let s=0;s<i;s++)if(!$ae(e,t[s].end))return!0;return!1}function $ae(e,t){if(t<=0||t>e.length||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;for(let i=n+1;i<t-1;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}function Dae(e,t){if(t===0)return;const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function Rae(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function zae(e,t){if(e.length<=t)return e;const n=[];let i=0;for(let s=0;s<t;s++){const o=t-s,r=e.length-i,l=Math.ceil(r/o),a=e.slice(i,i+l);let u=0;for(let c=0;c<a.length;c++)u+=a[c].lineCount;n.push({start:a[0].start,end:a[a.length-1].end,lineCount:u}),i+=l}return n}function Oae(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}const DN=4e6,RN=8e4,Pae=1e4,jae=200,Hae=1e4,Wae=200;function zN(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function qae(e,t){if(t===0)return;const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function Ua(e){return e.length===0?0:es(e)+(e.charCodeAt(e.length-1)===10?0:1)}function Uae(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}function Kae(e,t){if(!t||e.length===0)return!1;let n=null;for(let i=0;i<e.length;){let s=e.indexOf(` +`,i);s===-1&&(s=e.length);let o=i;for(;o<s;){const l=e.charCodeAt(o);if(l===32||l===9)o++;else break}const r=e[o];if(r==="`"||r==="~"){let l=o;for(;l<s&&e[l]===r;)l++;const a=l-o;a>=3&&(n?n.marker===r&&a>=n.length&&(n=null):n={marker:r,length:a})}i=s===e.length?e.length:s+1}return n!==null}function Vae(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 Uae(e,n+1,e.length-1)?!Kae(e,t):!1}function Zae(e,t,n,i={}){const s=i.mode??"full",o=i.fenceAware??(s==="stream"?e.options.streamChunkFenceAware??!0:e.options.fullChunkFenceAware??!0);if(i.maxChunkChars!==void 0||i.maxChunkLines!==void 0||i.autoTune===!1){const r=i.maxChunkChars??(s==="stream"?e.options.streamChunkSizeChars??Hae:e.options.fullChunkSizeChars??Pae),l=i.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??Wae:e.options.fullChunkSizeLines??jae);return{maxChunkChars:r,maxChunkLines:l,holdBelowChars:r,holdBelowLines:l,fenceAware:o}}return s==="stream"?t<=5e3?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=2e4?{maxChunkChars:16e3,maxChunkLines:200,holdBelowChars:16e3,holdBelowLines:200,fenceAware:o}:t<=5e4?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}:t<=1e5&&n<=2500?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:1e5,holdBelowLines:2500,fenceAware:o}:t<=2e5?{maxChunkChars:2e4,maxChunkLines:150,holdBelowChars:2e4,holdBelowLines:150,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}}var _p=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=Ua(this.pending);if(this.pending.length<t.holdBelowChars&&n<t.holdBelowLines)return this.updateEnvDiagnostics(e,t,n),null;const i=Eg(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!1);if(!i.length)return this.updateEnvDiagnostics(e,t,n),null;if(Tg(this.pending,i,{rangesCoverWholeSource:!1}))return this.updateEnvDiagnostics(e,t,n),null;const s=this.commitRanges(i,e);return this.pending=this.pending.slice(s),this.updateEnvDiagnostics(e,t,Ua(this.pending)),this.tokens}flushIfBoundary(e={}){if(!this.pending)return null;const t=this.resolveWindow();if(!Vae(this.pending,t.fenceAware))return this.updateEnvDiagnostics(e,t,Ua(this.pending)),null;const n=Eg(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!0);if(!n.length)return this.updateEnvDiagnostics(e,t,Ua(this.pending)),null;const i=Tg(this.pending,n,{rangesCoverWholeSource:!0})?[{start:0,end:this.pending.length,lineCount:Ua(this.pending)}]:n;return this.commitRanges(i,e),this.pending="",this.updateEnvDiagnostics(e,t,0),this.tokens}flushForce(e={}){if(!this.pending){this.prepareGlobalStateEnv(e,"");const i=this.resolveWindow();return this.updateEnvDiagnostics(e,i,0),this.tokens}const t=this.resolveWindow(),n=Eg(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!0);if(n.length){const i=Tg(this.pending,n,{rangesCoverWholeSource:!0})?[{start:0,end:this.pending.length,lineCount:Ua(this.pending)}]:n;this.commitRanges(i,e),this.pending=""}return this.updateEnvDiagnostics(e,t,0),this.tokens}reset(){this.pending="",this.tokens=[],this.committedChars=0,this.committedLines=0,this.fedChunks=0,this.parsedChunks=0,this.globalStateEnv=null,this.markedGlobalStateReason=null}peek(){return this.tokens}pendingText(){return this.pending}stats(){return{mode:this.options.mode??"full",fedChunks:this.fedChunks,parsedChunks:this.parsedChunks,committedChars:this.committedChars,committedLines:this.committedLines,pendingChars:this.pending.length,pendingLines:Ua(this.pending),retainedTokens:this.options.retainTokens!==!1}}resolveWindow(){const e=this.committedChars+this.pending.length,t=this.committedLines+Ua(this.pending);return Zae(this.md,e,t,this.options)}prepareGlobalStateEnv(e,t){if(this.globalStateEnv!==e&&(wp(e)&&Ea(e),this.globalStateEnv=e,this.markedGlobalStateReason=null),this.markedGlobalStateReason)return;const n=Qo(t);n&&(nb(e,n),this.markedGlobalStateReason=n)}commitRanges(e,t){if(!e.length)return 0;this.prepareGlobalStateEnv(t,this.pending);let n=0;try{for(let i=0;i<e.length;i++){const s=e[i],o=this.pending.slice(s.start,s.end),r=this.md.core.parse(o,t,this.md).tokens,l=this.committedChars,a=this.committedLines;a!==0&&r.length&&qae(r,a),this.options.retainTokens!==!1&&zN(this.tokens,r),this.committedChars+=o.length,this.committedLines+=s.lineCount,this.parsedChunks+=1,this.options.onChunkTokens&&this.options.onChunkTokens(r,{chunkIndex:this.parsedChunks,chunkChars:o.length,chunkLines:s.lineCount,tokenCount:r.length,startOffset:l,endOffset:this.committedChars,startLine:a,endLine:this.committedLines}),n=s.end}return this.markedGlobalStateReason&&ib(t),n}catch(i){throw this.markedGlobalStateReason&&(Ea(t),this.globalStateEnv=null,this.markedGlobalStateReason=null),i}}updateEnvDiagnostics(e,t,n){GL(e,{mode:this.options.mode??"full",maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,committedChars:this.committedChars,committedLines:this.committedLines,pendingChars:this.pending.length,pendingLines:n,fedChunks:this.fedChunks,parsedChunks:this.parsedChunks,globalStateDetected:this.markedGlobalStateReason||void 0})}};function Gae(e,t,n={},i={}){Lo(n);const s=new _p(e,{mode:"full",...i});for(const o of t)s.feed(o),s.flushAvailable(n);return s.flushForce(n)}async function Qae(e,t,n={},i={}){Lo(n);const s=new _p(e,{mode:"full",...i});for await(const o of t)s.feed(o),s.flushAvailable(n);return s.flushForce(n)}function Yae(e,t,n,i={},s={}){Lo(i);const o=new _p(e,{mode:"full",...s,retainTokens:!1,onChunkTokens:n});for(const r of t)o.feed(r),o.flushAvailable(i);return o.flushForce(i),o.stats()}async function Jae(e,t,n,i={},s={}){Lo(i);const o=new _p(e,{mode:"full",...s,retainTokens:!1,onChunkTokens:n});for await(const r of t)o.feed(r),o.flushAvailable(i);return o.flushForce(i),o.stats()}function ON(e,t,n){if(e.options.autoUnbounded===!1)return!1;const i=e.options.autoUnboundedThresholdChars??DN,s=e.options.autoUnboundedThresholdLines??RN;return t>=i||n>=s}function PN(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??DN))return"yes";const i=e.options.autoUnboundedThresholdLines??RN;return n!==void 0?n>=i?"yes":"no":t+1<i?"no":"need-lines"}function h1(e,t,n={},i={}){Lo(n);const s=Qo(t);if(wp(n)&&Ea(n),i.fallbackOnGlobalState!==!1&&s)return GL(n,{mode:"full",fallback:!0,fallbackReason:s,committedChars:t.length,committedLines:es(t),pendingChars:0,pendingLines:0,fedChunks:1,parsedChunks:1,globalStateDetected:s}),ff(n,s,()=>e.core.parse(t,n,e).tokens);const o=[],r=new _p(e,{mode:"full",...i,retainTokens:!1,onChunkTokens(l){zN(o,l)}});if(s&&nb(n,s),r.feed(t),r.flushForce(n),s&&(ib(n),i.fallbackOnGlobalState===!1)){const l=ua(n)?.unbounded;l&&(l.globalStateDetected=s,l.globalStateFallbackDisabled=!0)}return o}const pf=(e,t,n)=>e<t?t:e>n?n:e;function jN(e){return e.experimental?{...e,...e.experimental}:e}const zw=[{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"}],Ow=[{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 HN(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function Xae(e,t=Math.max(0,e/40|0),n={}){const i=jN(n),s=i.fullChunkFenceAware??!0,o=i.fullChunkTargetChunks??8,r=i.fullChunkAdaptive!==!1;for(let l=0;l<zw.length;l++){const a=zw[l];if(e<=a.max){if(a.strategy!=="adaptive")return HN(s,a);break}}return e>5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:pf(Math.ceil(e/o),8e3,64e3),maxChunkLines:pf(Math.ceil(t/o),150,700),maxChunks:pf(Math.ceil(e/64e3),o,16),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.fullChunkSizeChars??1e4,maxChunkLines:i.fullChunkSizeLines??200,fenceAware:s,maxChunks:i.fullChunkMaxChunks}}function Pw(e,t=Math.max(0,e/40|0),n={}){const i=jN(n),s=i.streamChunkFenceAware??!0,o=i.streamChunkTargetChunks??8,r=i.streamChunkAdaptive!==!1;for(let l=0;l<Ow.length;l++){const a=Ow[l];if(e<=a.max){if(a.strategy!=="adaptive")return HN(s,a);break}}return e>5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:pf(Math.ceil(e/o),8e3,64e3),maxChunkLines:pf(Math.ceil(t/o),150,700),maxChunks:pf(Math.ceil(e/64e3),o,32),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.streamChunkSizeChars??1e4,maxChunkLines:i.streamChunkSizeLines??200,maxChunks:i.streamChunkMaxChunks,fenceAware:s}}var eue={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"]}}},tue={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},nue={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 vv(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function Lg(e,t){if(vv(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const jw=e=>vv(e)?e:Promise.resolve(e);function p1(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 pi(e)}}function _u(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${p1(t[0])}="${pi(t[1])}"`;for(let i=1;i<e.length;i++){const s=e[i];n+=` ${p1(s[0])}="${pi(s[1])}"`}return n}function WN(e){if(!e)return{langName:"",langAttrs:""};let t=0;for(;t<e.length;){const i=e.charCodeAt(t);if(i===32||i===9||i===10)break;t++}if(t>=e.length)return{langName:e,langAttrs:""};let n=t;for(;n<e.length;){const i=e.charCodeAt(n);if(i!==32&&i!==9&&i!==10)break;n++}return{langName:e.slice(0,t),langAttrs:n<e.length?e.slice(n):""}}function g1(e,t,n,i,s){if(t.indexOf("<pre")===0)return`${t} +`;if(n){if(!e.attrs||e.attrs.length===0)return`<pre><code class="${pi(`${s.langPrefix??"language-"}${i}`)}">${t}</code></pre> +`;const o=e.attrIndex("class"),r=e.attrs?e.attrs.slice():[],l=`${s.langPrefix??"language-"}${i}`;return o<0?r.push(["class",l]):(r[o]=r[o].slice(),r[o][1]+=` ${l}`),`<pre><code${_u(r)}>${t}</code></pre> +`}return`<pre><code${_u(e.attrs)}>${t}</code></pre> +`}function ep(e){return!e.attrs||e.attrs.length===0?`<code>${pi(e.content)}</code>`:`<code${_u(e.attrs)}>${pi(e.content)}</code>`}function V3(e){const t=pi(e.content);return e.attrs?`<pre${_u(e.attrs)}><code>${t}</code></pre> +`:`<pre><code>${t}</code></pre> +`}function iue(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}<p>`;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}<td>`;case"th_open":return`${t}<th>`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}<td style="${pi(n[0][1])}">`;if(e.type==="th_open")return`${t}<th style="${pi(n[0][1])}">`}return null}function Hw(e){const t=e.attrs;return!t||t.length===0?"<a>":t.length===1?`<a ${p1(t[0][0])}="${pi(t[0][1])}">`:t.length===2?`<a ${p1(t[0][0])}="${pi(t[0][1])}" ${p1(t[1][0])}="${pi(t[1][1])}">`:`<a${_u(t)}>`}function sue(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 Ww(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 Om(e,t){if(e.hidden)return"";const n=e.attrs,i=e.nesting,s=e.tag;if(!n||n.length===0)return i===0?t?`<${s} />`:`<${s}>`:i===-1?`</${s}>`:`<${s}>`;let o=(i===-1?"</":"<")+s+_u(n);return i===0&&t&&(o+=" /"),`${o}>`}const oue={langPrefix:"language-",xhtmlOut:!1,breaks:!1},U0=Object.prototype.hasOwnProperty,Kn={code_inline(e,t){return ep(e[t])},code_block(e,t){return V3(e[t])},fence(e,t,n,i,s){const o=e[t],r=o.info?BN(o.info).trim():"",{langName:l,langAttrs:a}=WN(r),u=n.highlight,c=pi(o.content);if(!u)return g1(o,c,r,l,n);const d=u(o.content,l,a);return vv(d)?d.then(f=>g1(o,f||c,r,l,n)):g1(o,d||c,r,l,n)},image(e,t,n,i,s){const o=e[t],r=s.renderInlineAsText(o.children||[],n,i),l=o.attrIndex("alt");return l>=0&&o.attrs?o.attrs[l][1]=r:o.attrs?o.attrs.push(["alt",r]):o.attrs=[["alt",r]],Om(o,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`<br /> +`:`<br> +`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`<br /> +`:`<br> +`:` +`},text(e,t){return pi(e[t].content)},text_special(e,t){return pi(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function qw(e,t,n){const i=e.info?BN(e.info).trim():"",{langName:s,langAttrs:o}=WN(i),r=t.highlight,l=pi(e.content);if(!r)return g1(e,l,i,s,t);const a=r(e.content,s,o);if(vv(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return g1(e,a||l,i,s,t)}function Cy(e,t,n,i){switch(e.type){case"text":return t.text===Kn.text?e.content.length===0?"":pi(e.content):null;case"text_special":return t.text_special===Kn.text_special?e.content.length===0?"":pi(e.content):null;case"softbreak":return t.softbreak===Kn.softbreak?i:null;case"hardbreak":return t.hardbreak===Kn.hardbreak?n:null;case"html_inline":return t.html_inline===Kn.html_inline?e.content:null;case"code_inline":return t.code_inline===Kn.code_inline?ep(e):null;default:return null}}function rue(e,t,n,i,s){const o=e[0];switch(o.type){case"text":if(s.text===Kn.text)return o.content.length===0?"":pi(o.content);break;case"text_special":if(s.text_special===Kn.text_special)return o.content.length===0?"":pi(o.content);break;case"softbreak":if(s.softbreak===Kn.softbreak)return t.breaks?t.xhtmlOut?`<br /> +`:`<br> +`:` +`;break;case"hardbreak":if(s.hardbreak===Kn.hardbreak)return t.xhtmlOut?`<br /> +`:`<br> +`;break;case"html_inline":if(s.html_inline===Kn.html_inline)return o.content;break;case"code_inline":if(s.code_inline===Kn.code_inline)return ep(o);break}const r=s[o.type];if(!r)return Om(o,t.xhtmlOut===!0);const l=r(e,0,t,n,i);return typeof l=="string"?l:Lg(l,o.type)}var lue=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...Kn}}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 i=this.mergeOptions(t),s=n??{},o=this.rules,r=i.xhtmlOut===!0;let l,a,u,c,d,f,p="",g="",m=!1,y="";for(let w=0;w<e.length;w++){const k=e[w],A=k.type,v=w>0&&e[w-1].hidden?` +`:"";if(A==="list_item_open"&&(!k.attrs||k.attrs.length===0)&&w+3<e.length){const S=e[w+1],M=e[w+2],_=e[w+3];if(S.type==="paragraph_open"&&S.hidden&&M.type==="inline"&&_.type==="paragraph_close"&&_.hidden){y+=`${v}<li>${this.renderInlineTokens(M.children||[],i,s)}`,w+=3;continue}}if(w+2<e.length){const S=e[w+1],M=e[w+2];if(S.type==="inline"&&M.nesting===-1&&M.tag===k.tag&&!M.hidden){const _=iue(k,v);if(_!==null){y+=`${_+this.renderInlineTokens(S.children||[],i,s)}</${k.tag}> +`,w+=2;continue}}}if(A==="inline"){const S=k.children||[];if(S.length===1){m||(l=o.text,a=o.text_special,u=o.softbreak,c=o.hardbreak,d=o.html_inline,f=o.code_inline,p=i.xhtmlOut?`<br /> +`:`<br> +`,g=i.breaks?p:` +`,m=!0);const M=S[0];switch(M.type){case"text":if(l===Kn.text){y+=pi(M.content);continue}break;case"text_special":if(a===Kn.text_special){y+=pi(M.content);continue}break;case"softbreak":if(u===Kn.softbreak){y+=g;continue}break;case"hardbreak":if(c===Kn.hardbreak){y+=p;continue}break;case"html_inline":if(d===Kn.html_inline){y+=M.content;continue}break;case"code_inline":if(f===Kn.code_inline){y+=ep(M);continue}break}}y+=this.renderInlineTokens(S,i,s);continue}const x=o[A];if(!x){const S=k.attrs;if(!k.hidden){if(!S||S.length===0)switch(A){case"hr":y+=r?`<hr /> +`:`<hr> +`;continue;case"heading_open":y+=`<${k.tag}>`;continue;case"heading_close":y+=`</${k.tag}> +`;continue;case"paragraph_open":y+=`${v}<p>`;continue;case"paragraph_close":y+=`</p> +`;continue;case"list_item_open":{const M=e[w+1];y+=v+(M&&(M.type==="inline"||M.hidden||M.nesting===-1&&M.tag==="li")?"<li>":`<li> +`);continue}case"list_item_close":y+=`</li> +`;continue;case"bullet_list_open":y+=`${v}<ul> +`;continue;case"bullet_list_close":y+=`</ul> +`;continue;case"blockquote_open":y+=v+(e[w+1]&&e[w+1].nesting===-1&&e[w+1].tag==="blockquote"?"<blockquote>":`<blockquote> +`);continue;case"blockquote_close":y+=`</blockquote> +`;continue;case"ordered_list_open":y+=`${v}<ol> +`;continue;case"ordered_list_close":y+=`</ol> +`;continue;case"table_open":y+=`${v}<table> +`;continue;case"table_close":y+=`</table> +`;continue;case"thead_open":y+=`${v}<thead> +`;continue;case"thead_close":y+=`</thead> +`;continue;case"tbody_open":y+=`${v}<tbody> +`;continue;case"tbody_close":y+=`</tbody> +`;continue;case"tr_open":y+=`${v}<tr> +`;continue;case"tr_close":y+=`</tr> +`;continue;case"td_open":y+=`${v}<td>`;continue;case"td_close":y+=`</td> +`;continue;case"th_open":y+=`${v}<th>`;continue;case"th_close":y+=`</th> +`;continue}else if(S.length===1){const M=S[0];if(A==="ordered_list_open"&&M[0]==="start"){y+=`${v}<ol start="${pi(M[1])}"> +`;continue}if(A==="td_open"&&M[0]==="style"){y+=`${v}<td style="${pi(M[1])}">`;continue}if(A==="th_open"&&M[0]==="style"){y+=`${v}<th style="${pi(M[1])}">`;continue}}}y+=this.renderToken(e,w,i);continue}if(A==="code_block"&&x===Kn.code_block){y+=V3(k);continue}if(A==="fence"&&x===Kn.fence){y+=qw(k,i);continue}if(A==="html_block"&&x===Kn.html_block){y+=k.content;continue}const E=x(e,w,i,s,this);typeof E=="string"?y+=E:y+=Lg(E,k.type)}return y}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const i=this.mergeOptions(t),s=n??{},o=this.rules;let r="";for(let l=0;l<e.length;l++){const a=e[l];if(a.type==="inline"){r+=await this.renderInlineTokensAsync(a.children||[],i,s);continue}const u=o[a.type];u?r+=await jw(u(e,l,i,s,this)):r+=this.renderToken(e,l,i)}return r}renderInline(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineTokens(e,i,s)}async renderInlineAsync(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineTokensAsync(e,i,s)}renderInlineAsText(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineAsTextInternal(e,i,s)}renderAttrs(e){return _u(e.attrs)}renderToken(e,t,n){const i=e[t];if(i.hidden)return"";const s=i.block,o=i.nesting,r=i.tag,l=i.attrs;let a=!1;if(s&&(a=!0,o===1&&t+1<e.length)){const f=e[t+1];(f.type==="inline"||f.hidden||f.nesting===-1&&f.tag===r)&&(a=!1)}const u=s&&o!==-1&&t>0&&e[t-1].hidden?` +`:"",c=a?`> +`:">";if(!l||l.length===0)return o===0?n.xhtmlOut?`${u}<${r} /${c}`:`${u}<${r}${c}`:o===-1?`${u}</${r}${c}`:`${u}<${r}${c}`;let d=u+(o===-1?"</":"<")+r+_u(l);return o===0&&n.xhtmlOut&&(d+=" /"),d+c}mergeOptions(e){const t=this.normalizedBase;if(!e||e.highlight===t.highlight&&e.langPrefix===t.langPrefix&&e.xhtmlOut===t.xhtmlOut&&e.breaks===t.breaks)return t;let n=null;const i=()=>(n||(n={...t}),n);if(U0.call(e,"highlight")&&e.highlight!==t.highlight&&(i().highlight=e.highlight),U0.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(i().langPrefix=s)}if(U0.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(i().xhtmlOut=s)}if(U0.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(i().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...oue,...this.baseOptions})}renderSingleToken(e,t,n,i){const s=this.rules,o=t.type;if(o==="code_block"&&s.code_block===Kn.code_block)return V3(t);if(o==="html_block"&&s.html_block===Kn.html_block)return t.content;const r=this.mergeOptions(n),l=i??{};if(o==="inline")return this.renderInlineTokens(t.children||[],r,l);const a=s[o];if(!a)return t.block?this.renderToken(e,0,r):Om(t,r.xhtmlOut===!0);if(o==="fence"&&a===Kn.fence)return qw(t,r);const u=a(e,0,r,l,this);return typeof u=="string"?u:Lg(u,o)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const i=this.rules;if(e.length===1)return rue(e,t,n,this,i);const s=t.xhtmlOut===!0,o=s?`<br /> +`:`<br> +`,r=t.breaks?o:` +`,l=i.text,a=i.text_special,u=i.softbreak,c=i.hardbreak,d=i.html_inline,f=i.code_inline,p=i.link_open,g=i.link_close,m=i.em_open,y=i.em_close,w=i.strong_open,k=i.strong_close;let A="";for(let v=0;v<e.length;v++){const x=e[v];if(x.type==="link_open"&&!p&&!g&&v+2<e.length){const M=e[v+1];if(e[v+2].type==="link_close"&&sue(M)){const _=Cy(M,i,o,r);if(_!==null){const N=`${Hw(x)+_}</a>`;if(u===Kn.softbreak&&v+3<e.length&&e[v+3].type==="softbreak"){A+=N+r,v+=3;continue}A+=N,v+=2;continue}}}if(x.type==="link_open"&&!p&&!g&&v+1<e.length&&e[v+1].type==="link_close"){A+=`${Hw(x)}</a>`,v+=1;continue}if(x.type==="em_open"&&!m&&!y&&v+2<e.length){const M=e[v+1];if(e[v+2].type==="em_close"&&Ww(M)){const _=Cy(M,i,o,r);if(_!==null){A+=`<em>${_}</em>`,v+=2;continue}}}if(x.type==="strong_open"&&!w&&!k&&v+2<e.length){const M=e[v+1];if(e[v+2].type==="strong_close"&&Ww(M)){const _=Cy(M,i,o,r);if(_!==null){A+=`<strong>${_}</strong>`,v+=2;continue}}}switch(x.type){case"text":if(l===Kn.text){const M=x.content.length===0?"":pi(x.content);if(d===Kn.html_inline&&v+1<e.length&&e[v+1].type==="html_inline"){for(A+=M+e[++v].content;v+1<e.length&&e[v+1].type==="html_inline";)A+=e[++v].content;continue}A+=M;continue}break;case"text_special":if(a===Kn.text_special){x.content.length!==0&&(A+=pi(x.content));continue}break;case"softbreak":if(u===Kn.softbreak){A+=r;continue}break;case"hardbreak":if(c===Kn.hardbreak){A+=o;continue}break;case"html_inline":if(d===Kn.html_inline){for(A+=x.content;v+1<e.length&&e[v+1].type==="html_inline";)A+=e[++v].content;continue}break;case"code_inline":if(f===Kn.code_inline){A+=ep(x);continue}break}const E=i[x.type];if(!E){A+=x.block?this.renderToken(e,v,t):Om(x,s);continue}const S=E(e,v,t,n,this);typeof S=="string"?A+=S:A+=Lg(S,x.type)}return A}async renderInlineTokensAsync(e,t,n){if(!e||e.length===0)return"";const i=this.rules;let s="";for(let o=0;o<e.length;o++){const r=i[e[o].type];r?s+=await jw(r(e,o,t,n,this)):s+=this.renderToken(e,o,t)}return s}renderInlineAsTextInternal(e,t,n){if(!e||e.length===0)return"";let i="";for(let s=0;s<e.length;s++){const o=e[s];switch(o.type){case"text":case"text_special":i+=o.content;break;case"image":i+=this.renderInlineAsTextInternal(o.children||[],t,n);break;case"html_inline":case"html_block":i+=o.content;break;case"softbreak":case"hardbreak":i+=` +`;break}}return i}},aue=lue;const uue=[],wy=4096;function cue(e){const t=e.length;let n=0;for(;n<=t;){let i=e.indexOf(` +`,n);i===-1&&(i=t);const s=i<t;let o=n,r=0;for(;o<i;){const l=e.charCodeAt(o);if(l===32){if(r++,o++,r>=4)return!0;continue}if(l===9){if(r+=4-r%4,o++,r>=4)return!0;continue}break}if(o<i){const l=e.charCodeAt(o);switch(l){case 35:{let a=o;for(;a<i&&e.charCodeAt(a)===35;)a++;const u=a-o;if(u>0&&u<=6){if(a<i){const c=e.charCodeAt(a);if(c===32||c===9||c===13)return!0}else if(a===i&&s)return!0}break}case 62:{const a=o+1;if(a<i){const u=e.charCodeAt(a);if(u===32||u===9||u===13)return!0}else if(a===i&&s)return!0;break}case 45:case 42:case 43:{const a=o+1;if(a<i){const u=e.charCodeAt(a);if(u===32||u===9||u===13)return!0}else if(a===i&&s)return!0;break}case 96:case 126:{let a=o;for(;a<i&&e.charCodeAt(a)===l;)a++;if(a-o>=3)return!0;break}default:if(l>=48&&l<=57){let a=o+1;for(;a<i;){const u=e.charCodeAt(a);if(u<48||u>57)break;a++}if(a<i&&e.charCodeAt(a)===46){const u=a+1;if(u<i){const c=e.charCodeAt(u);if(c===32||c===9||c===13)return!0}else if(u===i&&s)return!0}}break}}if(i===t)break;n=i+1}return!1}function due(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n][0]!==t[n][0]||e[n][1]!==t[n][1])return!1;return!0}function fue(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!qN(e[n],t[n]))return!1;return!0}function qN(e,t){if(!e||!t||e.type!==t.type)return!1;const n=e.map,i=t.map;return!!n!=!!i||n&&i&&(n[0]!==i[0]||n[1]!==i[1])||e.tag!==t.tag||e.nesting!==t.nesting||e.markup!==t.markup||e.info!==t.info||e.block!==t.block||e.hidden!==t.hidden||!due(e.attrs,t.attrs)||!fue(e.children,t.children)?!1:(e.content||"")===(t.content||"")}function Uw(){return{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}}var hue=class{core;cache=null;stats=Uw();MIN_SIZE_FOR_OPTIMIZATION=1e3;DEFAULT_SKIP_CACHE_CHARS=1e6;DEFAULT_SKIP_CACHE_LINES=1e5;IMPLICIT_STREAM_CHUNK_MIN_CHARS=16e4;MIN_LIST_LINES_FOR_MERGE=80;MIN_LIST_CHARS_FOR_MERGE=800;MIN_TABLE_LINES_FOR_MERGE=48;MIN_TABLE_CHARS_FOR_MERGE=1200;MIN_UNBOUNDED_APPEND_TOTAL_CHARS=5e5;MIN_UNBOUNDED_APPEND_CHARS=64e3;MIN_UNBOUNDED_APPEND_LINES=700;constructor(e){this.core=e}reset(){this.cache=null,this.stats.resets+=1,this.stats.lastMode="reset"}resetStats(){const{resets:e}=this.stats;this.stats=Uw(),this.stats.resets=e}parse(e,t,n){const i=t,s=this.cache;if(Lo(i??s?.env),!s||i&&i!==s.env){const $=i??{},P=!!n.__explicitStreamChunkFallbackSetting,O=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,R=!!n.options?.streamChunkedFallback,W=!P&&O,z=R||W,G=n.options?.streamChunkAdaptive!==!1,K=n.options?.streamChunkTargetChunks??8,H=n.options?.streamChunkSizeChars,q=n.options?.streamChunkSizeLines,X=n.options?.streamChunkMaxChunks,ee=!!n.__explicitStreamChunkConfig,ue=n.options?.autoTuneChunks!==!1,ie=n.options?.streamChunkFenceAware??!0,xe=n.options?.streamLargeCachePolicy??"retain",ce=n.options?.streamSkipCacheAboveChars??this.DEFAULT_SKIP_CACHE_CHARS,pe=n.options?.streamSkipCacheAboveLines??this.DEFAULT_SKIP_CACHE_LINES;let Ne,te=!1;if(xe==="skip"&&(te=e.length>=ce,!te&&pe!==void 0&&(Ne=es(e),te=Ne>=pe)),te){const j=this.parseFullDocument(e,$,n,Ne,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ps($,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!ua($)?.unbounded}),j.tokens}else if(z){const j=(de,me,Ie)=>de<me?me:de>Ie?Ie:de;Ne===void 0&&(Ne=es(e));const Y=ue&&!ee?Pw(e.length,Ne,n.options):null,ve=Y?.maxChunkChars??(G?j(Math.ceil(e.length/K),8e3,64e3):H??1e4),re=Y?.maxChunkLines??(G?j(Math.ceil(Ne/K),150,700):q??200),se=Y?.maxChunks??(G?j(Math.ceil(e.length/64e3),K,32):X),U=e.length>0&&e.charCodeAt(e.length-1)===10,J=W&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&Y?.strategy!=="plain";if((R||J)&&(e.length>=ve*2||Ne>=re*2)&&U){const de=zm(n,e,$,{maxChunkChars:ve,maxChunkLines:re,fenceAware:Y?.fenceAware??ie,maxChunks:se});return this.cache={src:e,tokens:de,env:$,lineCount:Ne,lastSegment:void 0,globalStateReason:Qo(e)},this.updateCacheLineCount(this.cache,Ne),this.recordChunkedParseResult($,R?"explicit-initial-large-doc":"default-initial-large-doc"),de}}const ye=this.parseFullDocument(e,$,n,Ne);return Ne=ye.lineCount,this.cache={src:e,tokens:ye.tokens,env:$,lineCount:Ne,lastSegment:void 0,globalStateReason:Qo(e)},this.updateCacheLineCount(this.cache,Ne),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ps($,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!ua($)?.unbounded}),ye.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",ps(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const o=e.startsWith(s.src)?e.slice(s.src.length):null;let r=s.globalStateReason;r===void 0&&(r=Qo(s.src),s.globalStateReason=r);const l=r?null:o!==null?this.detectGlobalStateForAppend(s,o):Qo(e),a=r||l;if(a){const $=i??s.env;Ea($);const P=Qo(e),O=this.parseFullDocument(e,$,n),R=O.tokens,W=O.lineCount;return this.cache={src:e,tokens:R,env:$,lineCount:W,lastSegment:void 0,globalStateReason:P},this.updateCacheLineCount(this.cache,W),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ps($,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!ua($)?.unbounded}),R}const u=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length<u&&e.length<u*1.5&&!e.startsWith(s.src)){const $=i??s.env,P=this.parseFullDocument(e,$,n),O=P.tokens,R=P.lineCount;return this.cache={src:e,tokens:O,env:$,lineCount:R,lastSegment:void 0,globalStateReason:Qo(e)},this.updateCacheLineCount(this.cache,R),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ps($,{area:"stream",path:"stream-full",reason:"small-non-append",unbounded:!!ua($)?.unbounded}),O}const c=this.getAppendedSegment(s.src,e,o);if(c&&!this.shouldPreferTailReparseForAppend(s)){const $=s.lineCount??es(s.src);let P=3;c.length>5e3?P=8:c.length>1e3?P=6:c.length>200&&(P=4),P=Math.min(P,$);let O=null;const R=n.options?.streamContextParseStrategy??"chars",W=n.options?.streamContextParseMinChars??200,z=n.options?.streamContextParseMinLines??2;let G;const K=()=>(G===void 0&&(G=es(c)),G),H=this.canDirectlyParseAppend(s),q=H&&this.shouldUseUnboundedAppend(e,s,c);let X=!1;if(!H)switch(R){case"lines":X=K()>=z;break;case"constructs":if(c.length>=W){X=!0;break}if(cue(c)){X=!0;break}X=K()>=z;break;case"chars":default:X=c.length>=W}if(P>0&&X){const ie=this.getTailLines(s.src,P)+c;try{const xe=this.core.parse(ie,s.env,n).tokens,ce=xe.findIndex(pe=>pe.map&&typeof pe.map[1]=="number"&&pe.map[1]>P);if(ce!==-1){const pe=xe.slice(ce),Ne=$-P;Ne!==0&&this.shiftTokenLines(pe,Ne),O={tokens:pe}}}catch{O=null}}else O=null;if(!O){const ie=$;if(q)O={tokens:h1(n,c,s.env,{mode:"stream"})},ie>0&&this.shiftTokenLines(O.tokens,ie);else{const xe=this.core.parse(c,s.env,n);ie>0&&this.shiftTokenLines(xe.tokens,ie),O=xe}}let ee=0;if(s.tokens.length>0&&O.tokens.length>0){const ie=s.tokens[s.tokens.length-1],xe=O.tokens[0];try{ie.type==="inline"&&xe.type==="inline"&&(xe.children&&xe.children.length>0&&(ie.children||(ie.children=[]),this.appendTokens(ie.children,xe.children)),ie.content=(ie.content||"")+(xe.content||""),ee=1)}catch{ee=0}}const ue=s.tokens.length;if(O.tokens.length>ee){const ie=s.tokens,xe=O.tokens,ce=Math.min(ie.length,xe.length-ee);let pe=0;for(let Ne=ce;Ne>0;Ne--){let te=!0;for(let ye=0;ye<Ne;ye++){const j=ie[ie.length-Ne+ye],Y=xe[ee+ye];if(!qN(j,Y)){te=!1;break}}if(te){pe=Ne;break}}pe>0&&(ee+=pe),xe.length>ee&&this.appendTokens(s.tokens,xe,ee)}if(s.src=e,s.globalStateReason=null,s.lineCount=$+(G??K()),s.tokens.length>ue){const ie=this.getLastSegment(s.tokens,e,ue,s.tokens.length,e.length-c.length,$);ie?s.lastSegment=ie:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,q&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",ps(s.env,{area:"stream",path:q?"stream-unbounded-append":"stream-append",reason:q?"large-delta":"safe-append",unbounded:q}),s.tokens}const d=i??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",ps(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const p=!!n.__explicitStreamChunkFallbackSetting,g=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,y=!p&&!c&&g,w=m||y,k=n.options?.streamChunkAdaptive!==!1,A=n.options?.streamChunkTargetChunks??8,v=n.options?.streamChunkSizeChars,x=n.options?.streamChunkSizeLines,E=n.options?.streamChunkMaxChunks,S=!!n.__explicitStreamChunkConfig,M=n.options?.autoTuneChunks!==!1,_=n.options?.streamChunkFenceAware??!0;let N=c&&s.lineCount!==void 0?s.lineCount+es(c):void 0;if(w){N===void 0&&(N=es(e));const $=(K,H,q)=>K<H?H:K>q?q:K,P=M&&!S?Pw(e.length,N,n.options):null,O=P?.maxChunkChars??(k?$(Math.ceil(e.length/A),8e3,64e3):v??1e4),R=P?.maxChunkLines??(k?$(Math.ceil(N/A),150,700):x??200),W=P?.maxChunks??(k?$(Math.ceil(e.length/64e3),A,32):E),z=e.length>0&&e.charCodeAt(e.length-1)===10,G=y&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&P?.strategy!=="plain";if((m||G)&&(e.length>=O*2||N>=R*2)&&z){const K=zm(n,e,d,{maxChunkChars:O,maxChunkLines:R,fenceAware:P?.fenceAware??_,maxChunks:W});return this.cache={src:e,tokens:K,env:d,lineCount:N,lastSegment:void 0,globalStateReason:Qo(e)},this.updateCacheLineCount(this.cache,N),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),K}}const D=this.parseFullDocument(e,d,n,N),T=D.tokens;return N=D.lineCount,this.cache={src:e,tokens:T,env:d,lineCount:N,lastSegment:void 0,globalStateReason:Qo(e)},this.updateCacheLineCount(this.cache,N),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ps(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!ua(d)?.unbounded}),T}recordChunkedParseResult(e,t){const n=ua(e)?.chunk,i=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,i){this.stats.fullParses+=1,this.stats.lastMode="full",ps(e,{area:"stream",path:"stream-full",reason:`global-state:${i}`,unbounded:!!ua(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",ps(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,i,s=!0){const o=Qo(e);wp(t)&&Ea(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?PN(n,e.length,i):"no";if(r==="yes"){const a=h1(n,e,t);return ps(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:i??(s?es(e):0)}}let l=i;if(r==="need-lines"&&(l=es(e),ON(n,e.length,l))){const a=h1(n,e,t);return ps(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?es(e):0),{tokens:ff(t,o,()=>this.core.parse(e,t,n).tokens),lineCount:l}}shouldUseUnboundedAppend(e,t,n){return!n||e.length<this.MIN_UNBOUNDED_APPEND_TOTAL_CHARS&&n.length<this.MIN_UNBOUNDED_APPEND_CHARS?!1:n.length>=this.MIN_UNBOUNDED_APPEND_CHARS?!0:es(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` +`))return null;const i=n??t.slice(e.length);if(!i)return null;const s=i.length;if(i.charCodeAt(s-1)!==10)return null;let o=0,r=-1;for(let a=0;a<s&&!(i.charCodeAt(a)===10&&(r===-1&&(r=a),o++,o>=2));a++);if(o<2)return null;const l=(r===-1?i:i.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(i)?null:i}tryTailSegmentReparse(e,t,n,i){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const o=t.src.slice(0,s.srcOffset);if(!e.startsWith(o))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,i,s,a);if(u)return u}if(this.mayContainReferenceDefinition(r)||this.mayContainReferenceDefinition(l))return null;try{const u=this.core.parse(l,n,i),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+es(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 i=e.length-1;i>=0;i--)if(e.charCodeAt(i)===10&&(n--,n===0))return e.slice(i+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,i=e.slice(n),s=i.length;let o=null,r=0;for(;r<=s;){let l=i.indexOf(` +`,r);l===-1&&(l=s);let a=r;for(;a<l;){const u=i.charCodeAt(a);if(u===32||u===9)a++;else break}if(a<l){const u=i.charCodeAt(a);if(u===96||u===126){let c=a;for(;c<l&&i.charCodeAt(c)===u;)c++;const d=c-a;d>=3&&(o?o.marker===u&&d>=o.length&&(o=null):o={marker:u,length:d})}}if(l===s)break;r=l+1}return o!==null}peek(){return this.cache?.tokens??uue}getStats(){return{...this.stats}}appendTokens(e,t,n=0,i=t.length){for(let s=n;s<i;s++)e.push(t[s])}updateCacheLineCount(e,t){e.lineCount=t??es(e.src),e.lastSegment=void 0,e.globalStateCarry=void 0}detectGlobalStateForAppend(e,t){if(e.globalStateReason)return e.globalStateReason;const n=(e.globalStateCarry??e.src.slice(-wy))+t,i=Qo(n);return e.globalStateCarry=n.length>wy?n.slice(n.length-wy):n,i&&(e.globalStateReason=i),i}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,i=e.length,s,o){if(i<=n)return null;let r=Number.POSITIVE_INFINITY,l=-1,a=0;for(let u=i-1;u>=n;u--){const c=e[u];if(c.map&&(c.map[0]<r&&(r=c.map[0]),c.map[1]>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:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}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:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}}return null}getLineStartOffset(e,t,n,i){if(n!==void 0&&i!==void 0&&t>=i)return this.getLineStartOffsetFrom(e,n,t-i);if(t<=0)return 0;let s=t,o=-1;for(;s>0;){if(o=e.indexOf(` +`,o+1),o===-1)return e.length;s--}return o+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let i=n,s=t-1;for(;i>0;){if(s=e.indexOf(` +`,s+1),s===-1)return e.length;i--}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,i,s,o){if(!o||this.mayContainReferenceDefinition(o))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,i,s,o,r);case"table_open":return this.tryTableTailAppendMerge(e,t,n,i,s,o,r);default:return null}}tryListTailAppendMerge(e,t,n,i,s,o,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(l<this.MIN_LIST_LINES_FOR_MERGE&&a<this.MIN_LIST_CHARS_FOR_MERGE)return null;const u=r.type==="bullet_list_open"?"bullet_list_close":"ordered_list_close";let c;try{c=this.core.parse(o,n,i).tokens}catch{return null}if(!this.isSingleTopLevelContainer(c,r.type,u,r.markup))return null;const d=c.slice(1,-1);if(d.length===0)return null;const f=t.lineCount??es(t.src);f>0&&this.shiftTokenLines(d,f);const p=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,r.level),g=this.getListParagraphMode(c,0,c.length,0);(p==="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+es(o);t.lineCount=m;const y=this.getDocLineCount(e,m);return r.map&&(r.map[1]=y),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:y,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,i,s,o,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(o))return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l<this.MIN_TABLE_LINES_FOR_MERGE&&a<this.MIN_TABLE_CHARS_FOR_MERGE)return null;const u=this.getTableHeaderContext(t.src.slice(s.srcOffset));if(!u)return null;const c=`${u}${o}`;let d;try{d=this.core.parse(c,n,i).tokens}catch{return null}if(!this.isSingleTopLevelContainer(d,"table_open","table_close")||(d[0]?.map?.[1]??-1)!==this.getDocLineCount(c))return null;const f=this.getTableBodySection(d,0,d.length,0),p=this.getTableBodySection(t.tokens,s.tokenStart,t.tokens.length,r.level);if(!f||!p||f.tbodyOpenIndex<0||f.tbodyCloseIndex<0)return null;const g=p.tbodyOpenIndex>=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 y=p.tbodyCloseIndex>=0?p.tbodyCloseIndex:p.tableCloseIndex,w=t.lineCount??es(t.src);t.tokens.splice(y,0,...g),t.src=e,t.env=n,t.globalStateReason=null;const k=w+es(o);t.lineCount=k;const A=this.getDocLineCount(e,k);if(r.map&&(r.map[1]=A),p.tbodyOpenIndex>=0){const v=t.tokens[p.tbodyOpenIndex];v?.map&&(v.map[1]=A)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:A,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,i){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===i){s=l;break}}if(s<0)return null;let o=-1,r=-1;for(let l=t+1;l<s;l++){const a=e[l];if(a.type==="tbody_open"&&a.level===i+1){o=l;break}}if(o>=0){for(let l=s-1;l>o;l--){const a=e[l];if(a.type==="tbody_close"&&a.level===i+1){r=l;break}}if(r<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:o,tbodyCloseIndex:r}}isSingleTopLevelContainer(e,t,n,i){if(e.length<2)return!1;const s=e[0],o=e[e.length-1];if(s.type!==t||o.type!==n||s.level!==0||o.level!==0||i!==void 0&&s.markup!==i)return!1;let r=0;for(let l=0;l<e.length;l++){const a=e[l];if(a.level===0&&l>0&&l<e.length-1&&r===0)return!1;(a.nesting>0||a.nesting<0)&&(r+=a.nesting)}return r===0}getListParagraphMode(e,t,n,i){let s=!1,o=!1;const r=i+2;for(let l=t;l<n;l++){const a=e[l];if(!(a.type!=="paragraph_open"||a.level!==r)&&(a.hidden?s=!0:o=!0,s&&o))return"loose"}return o?"loose":s?"tight":"none"}setListParagraphVisibility(e,t,n,i,s){const o=i+2;for(let r=t;r<n;r++){const l=e[r];(l.type==="paragraph_open"||l.type==="paragraph_close")&&l.level===o&&(l.hidden=s)}}shouldPreferTailReparseForAppend(e){const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"bullet_list_open":case"ordered_list_open":case"blockquote_open":case"table_open":return!0;case"paragraph_open":case"code_block":case"html_block":return!this.endsWithBlankLine(e.src);default:return!1}}endsWithBlankLine(e){const t=e.length;if(t<2||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0;){const i=e.charCodeAt(n);if(i===32||i===9){n--;continue}return i===10}return!0}getDocLineCount(e,t=es(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 i=0;i<e.length;i++){const s=e[i];if(s.map&&(s.map[0]+=t,s.map[1]+=t),s.children){n??=[];for(let o=s.children.length-1;o>=0;o--)n.push(s.children[o]);for(;n.length>0;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let r=o.children.length-1;r>=0;r--)n.push(o.children[r])}}}}};const Kw={default:tue,zero:nue,commonmark:eue};function pue(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function gue(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 Vw(e){return e.experimental?{...e,...e.experimental}:e}function $r(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 Zw(e,t,n){for(let i=0;i<n.length;i++){const s=n[i];if($r(t,s)||$r(e,s))return!0}return!1}function Gw(e,t,n){return $r(t,n)||$r(e,n)}function Qw(e,t){const n=ua(e)?.chunk;if(n?.fallback){ps(e,{area:"parse",path:"plain",reason:`global-state:${n.fallbackReason||"unknown"}`});return}ps(e,{area:"parse",path:"full-chunk",chunked:!0,reason:t})}function Ld(){return typeof performance<"u"?performance.now():Date.now()}function mue(e,t){let n={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100,stream:!1,streamOptimizationMinSize:1e3,streamChunkedFallback:!1,streamChunkSizeChars:1e4,streamChunkSizeLines:200,streamChunkFenceAware:!0,streamChunkAdaptive:!0,streamChunkTargetChunks:8,streamChunkMaxChunks:void 0,streamLargeCachePolicy:"retain",streamSkipCacheAboveChars:1e6,streamSkipCacheAboveLines:1e5,fullChunkedFallback:!1,fullChunkThresholdChars:2e4,fullChunkThresholdLines:400,fullChunkSizeChars:1e4,fullChunkSizeLines:200,fullChunkFenceAware:!0,fullChunkAdaptive:!0,fullChunkTargetChunks:8,fullChunkMaxChunks:void 0,autoTuneChunks:!0,autoUnbounded:!0,autoUnboundedThresholdChars:4e6,autoUnboundedThresholdLines:8e4},i="default",s;!t&&typeof e!="string"?(s=e,i="default"):typeof e=="string"&&(i=e,s=t);const o=Kw[i];if(!o)throw new Error(`Wrong \`markdown-it\` preset "${i}", check name`);if(o?.options&&(n={...n,...o.options}),s&&(n={...n,...s}),n=Vw(n),typeof n.quotes=="string"){const M=n.quotes;M.length>=4?n.quotes=[M[0],M[1],M[2],M[3]]:n.quotes=["“","”","‘","’"]}let r=Zw(o?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=Zw(o?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=Gw(o?.options,s,"fullChunkedFallback"),u=Gw(o?.options,s,"streamChunkedFallback"),c=!1,d=null,f=null;const p=new oae;let g=null;const m=()=>(g||(g=new aue(n)),g);let y=null;const w=()=>(y||(y=new hue(p)),y);let k=null;const A=()=>(k||(k=new QL({fuzzyLink:!0})),k),v=M=>!c&&!!d&&!gue(M,d),x=(M,_)=>i==="default"&&!c&&g===null&&f!==null&&M.parse===f&&v(M)&&!M.stream.enabled&&_<(M.options.autoUnboundedThresholdChars??4e6)&&M.options.html===!1&&M.options.xhtmlOut===!1&&M.options.breaks===!1&&M.options.langPrefix==="language-"&&M.options.linkify===!1&&M.options.typographer===!1&&M.options.highlight===null,E=(M,_)=>i==="default"&&!c&&v(M)&&!M.stream.enabled&&!M.options.fullChunkedFallback&&_<(M.options.autoUnboundedThresholdChars??4e6)&&M.options.html===!1&&M.options.linkify===!1&&M.options.typographer===!1,S={core:p,block:p.block,inline:p.inline,get linkify(){const M=A();return Object.defineProperty(this,"linkify",{value:M,writable:!0,configurable:!0}),M},get renderer(){const M=m();return Object.defineProperty(this,"renderer",{value:M,writable:!0,configurable:!0}),M},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:u,__canUseImplicitLargeInputStrategy(){return v(this)},set(M){const _=Vw(M);return this.options={...this.options,..._},($r(M,"fullChunkSizeChars")||$r(M,"fullChunkSizeLines")||$r(M,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),($r(M,"streamChunkSizeChars")||$r(M,"streamChunkSizeLines")||$r(M,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),$r(M,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),$r(M,"streamChunkedFallback")&&(u=!0,this.__explicitStreamChunkFallbackSetting=!0),g&&g.set(_),typeof _.stream=="boolean"&&(this.stream.enabled=_.stream,y&&(y.reset(),y.resetStats())),this},configure(M){const _=typeof M=="string"?Kw[M]:M;if(!_)throw new Error("Wrong `markdown-it` preset, can't be empty");if(_.options&&this.set(_.options),_.components){const N=_.components;N.core?.rules&&this.core.ruler.enableOnly(N.core.rules),N.block?.rules&&this.block.ruler.enableOnly(N.block.rules),N.inline?.rules&&this.inline.ruler.enableOnly(N.inline.rules),N.inline2?.rules&&this.inline.ruler2.enableOnly(N.inline2.rules)}return this},enable(M,_){const N=Array.isArray(M)?M:[M],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const $ of D){if(!$)continue;const P=$.enable(N,!0);for(let O=0;O<P.length;O++)T.add(P[O])}if(!_){const $=N.filter(P=>!T.has(P));if($.length)throw new Error(`Rules manager: invalid rule name ${$.join(", ")}`)}return this},disable(M,_){const N=Array.isArray(M)?M:[M],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const $ of D){if(!$)continue;const P=$.disable(N,!0);for(let O=0;O<P.length;O++)T.add(P[O])}if(!_){const $=N.filter(P=>!T.has(P));if($.length)throw new Error(`Rules manager: invalid rule name ${$.join(", ")}`)}return this},use(M,..._){const N=typeof M=="function"?M:M&&typeof M.default=="function"?M.default:void 0;if(!N)throw new TypeError("MarkdownIt.use: plugin must be a function");const D=[this,..._],T=M;return c=!0,N.apply(T,D),this},render(M,_){let N;if(x(this,M.length)){_!==void 0&&(Lo(_),N=dy("render"));const $=N?Ld():0,P=N?Rw(M,N):Dw(M);if(N&&(N.attemptMs=Ld()-$,P===null&&(N.fallbackReason="unsupported-stock-subset"),Sh(_,N)),P!==null)return _!==void 0&&ps(_,{area:"render",path:"stock-fast",reason:"stock-subset"}),P}const D=_??{},T=this.parse(M,D);return N&&Sh(D,N),m().render(T,this.options,D)},async renderAsync(M,_){let N;if(x(this,M.length)){_!==void 0&&(Lo(_),N=dy("render"));const $=N?Ld():0,P=N?Rw(M,N):Dw(M);if(N&&(N.attemptMs=Ld()-$,P===null&&(N.fallbackReason="unsupported-stock-subset"),Sh(_,N)),P!==null)return _!==void 0&&ps(_,{area:"render",path:"stock-fast",reason:"stock-subset"}),P}const D=_??{},T=this.parse(M,D);return N&&Sh(D,N),m().renderAsync(T,this.options,D)},renderIterable(M,_={}){const N=this.parseIterable(M,_);return m().render(N,this.options,_)},async renderAsyncIterable(M,_={}){const N=await this.parseAsyncIterable(M,_);return m().renderAsync(N,this.options,_)},renderInline(M,_={}){const N=this.parseInline(M,_);return m().render(N,this.options,_)},validateLink:SN,normalizeLink:MN,normalizeLinkText:IN,utils:$oe,helpers:{...wre},parse(M,_){if(typeof M!="string")throw new TypeError("Input data should be a String");if(_!==void 0&&Lo(_),E(this,M.length)){const $=_===void 0?void 0:dy("parse"),P=$?Ld():0,O=vae(M,$);if($&&($.attemptMs=Ld()-P,O===null&&($.fallbackReason="unsupported-stock-subset"),Sh(_,$)),O!==null)return _!==void 0&&ps(_,{area:"parse",path:"stock-fast",reason:"stock-subset"}),O}const N=_??{};let D;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&v(this)){const $=PN(this,M.length);if($==="yes"){const P=h1(this,M,N);return ps(_,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),P}$==="need-lines"&&(D=es(M))}if(!this.stream.enabled){const $=M.length,P=this.options.autoTuneChunks!==!1,O=r,R=!a&&v(this),W=!!this.options.fullChunkedFallback,z=R&&$>=2e5;let G;(W||z||D!==void 0)&&(G=D??es(M));const K=(W||z)&&P&&!O?Xae($,G,this.options):null;if(W||z){const H=G??0;if(W?$>=(this.options.fullChunkThresholdChars??2e4)||H>=(this.options.fullChunkThresholdLines??400):z){if(K&&K.strategy!=="plain"){const q=zm(this,M,N,{maxChunkChars:K.maxChunkChars,maxChunkLines:K.maxChunkLines,fenceAware:K.fenceAware,maxChunks:K.maxChunks});return _&&Qw(_,W?"explicit-full-chunk":"default-large-string"),q}if(W){const q=(te,ye,j)=>te<ye?ye:te>j?j:te,X=this.options.fullChunkAdaptive!==!1,ee=this.options.fullChunkTargetChunks??8,ue=q(Math.ceil($/ee),8e3,64e3),ie=q(Math.ceil(H/ee),150,700),xe=X?ue:this.options.fullChunkSizeChars??1e4,ce=X?ie:this.options.fullChunkSizeLines??200,pe=X?q(Math.ceil($/64e3),ee,32):this.options.fullChunkMaxChunks,Ne=zm(this,M,N,{maxChunkChars:xe,maxChunkLines:ce,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:pe});return _&&Qw(_,"explicit-full-chunk"),Ne}}}if(D!==void 0&&v(this)&&ON(this,$,G??D)){const H=h1(this,M,N);return ps(_,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),H}}const T=Qo(M);return ps(_,{area:"parse",path:"plain",reason:"default-plain"}),ff(N,T,()=>p.parse(M,N,this).tokens)},parseIterable(M,_={}){return Lo(_),Gae(this,M,_)},parseAsyncIterable(M,_={}){return Lo(_),Qae(this,M,_)},parseIterableToSink(M,_,N={}){return Lo(N),Yae(this,M,_,N)},parseAsyncIterableToSink(M,_,N={}){return Lo(N),Jae(this,M,_,N)},parseInline(M,_={}){if(typeof M!="string")throw new TypeError("Input data should be a String");Lo(_),wp(_)&&Ea(_);const N=p.createState(M,_,this);return N.inlineMode=!0,p.process(N),N.tokens}};if(S.stream={enabled:!!n.stream,parse(M,_){return S.stream.enabled?w().parse(M,_,S):S.parse(M,_??{})},reset(){w().reset()},peek(){return y?y.peek():[]},stats(){return y?y.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){y&&y.resetStats()}},o?.components){const M=o.components;M.core?.rules&&S.core.ruler.enableOnly(M.core.rules),M.block?.rules&&S.block.ruler.enableOnly(M.block.rules),M.inline?.rules&&S.inline.ruler.enableOnly(M.inline.rules),M.inline2?.rules&&S.inline.ruler2.enableOnly(M.inline2.rules)}return d=pue(S),f=S.parse,S}var vue=mue;const UN=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],yue=["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"],KN=["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"],bue=["svg","g","path"],kue=["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"],Aue=["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"],Cue=["action","data","href","src","srcset","poster","xlink:href","formaction"],wue=["script"],xue=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],Su=new Set(UN),VN=new Set(KN),tp=new Set([...UN,...yue,...KN,...bue]),ZN=new Set([...tp,...kue]),_ue=new Set(Aue),Sue=new Set(Cue),Sp=new Set(wue),GN=new Set(xue);function QN(e){let t="";for(const n of e){const i=n.charCodeAt(0);i<=31||i>=127&&i<=159||/\s/u.test(n)||(t+=n)}return t}const Mue={amp:"&",bsol:"\\",colon:":",newline:` +`,sol:"/",tab:" "};function YN(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,i,s)=>{const o=n??i;if(o){const r=Number.parseInt(o,n?10:16);try{return Number.isFinite(r)?String.fromCodePoint(r):""}catch{return""}}return Mue[String(s??"").toLowerCase()]??t})}const K0=new Set(["http","https","mailto","tel"]),Iue=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),ac=new Set(["http","https"]);function JN(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const Eue=/^https?:\/\//i;function Tue(e){if(!Eue.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 Lue(e,t,n){if(!m1(t,n)||!e.startsWith("file:///"))return!1;const i=e.charAt(8);return i!=="/"&&i!=="\\"}function m1(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function Nue(e,t){return t==="href"||t==="xlink:href"?m1(e,t)?K0:ac:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?ac:(m1(e,t),K0)}function Rc(e,t={}){if(Tue(e))return!1;const n=QN(YN(e)).toLowerCase(),i=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 i==="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 o=JN(n);return o?o==="file"?!Lue(n,i,s):m1(i,s)?Iue.has(o):!Nue(i,s).has(o):!1}function Fue(e){const t=YN(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=JN(QN(t).toLowerCase());return n==="http"||n==="https"}function Bue(e,t={}){const n=String(e??"").trim();return n?Rc(n,t)?"":n:""}function Yw(e){return Bue(e,{tagName:"img",attrName:"src"})}function $ue(e,t,n){function i(f){return f.trim().split(" ",2)[0]===t}function s(f,p,g,m,y){return f[p].nesting===1&&f[p].attrJoin("class",t),y.renderToken(f,p,g,m,y)}n=n||{};const o=3,r=n.marker||":",l=r.charCodeAt(0),a=r.length,u=n.validate||i,c=n.render||s;function d(f,p,g,m){let y,w=!1,k=f.bMarks[p]+f.tShift[p],A=f.eMarks[p];if(l!==f.src.charCodeAt(k))return!1;for(y=k+1;y<=A&&r[(y-k)%a]===f.src[y];y++);const v=Math.floor((y-k)/a);if(v<o)return!1;y-=(y-k)%a;const x=f.src.slice(k,y),E=f.src.slice(y,A);if(!u(E,x))return!1;if(m)return!0;let S=p;for(;S++,!(S>=g||(k=f.bMarks[S]+f.tShift[S],A=f.eMarks[S],k<A&&f.sCount[S]<f.blkIndent));)if(l===f.src.charCodeAt(k)&&!(f.sCount[S]-f.blkIndent>=4)){for(y=k+1;y<=A&&r[(y-k)%a]===f.src[y];y++);if(!(Math.floor((y-k)/a)<v)&&(y-=(y-k)%a,y=f.skipSpaces(y),!(y<A))){w=!0;break}}const M=f.parentType,_=f.lineMax;f.parentType="container",f.lineMax=S;const N=f.push("container_"+t+"_open","div",1);N.markup=x,N.block=!0,N.info=E,N.map=[p,S],f.md.block.tokenize(f,p+1,S);const D=f.push("container_"+t+"_close","div",-1);return D.markup=f.src.slice(k,y),D.block=!0,f.parentType=M,f.lineMax=_,f.line=S+(w?1:0),!0}e.block.ruler.before("fence","container_"+t,d,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules["container_"+t+"_open"]=c,e.renderer.rules["container_"+t+"_close"]=c}function Due(e){const t=String(e??"").trim();if(!t.startsWith("{")||!t.endsWith("}"))return null;const n=t.slice(1,-1).trim();if(!n)return{};if(n.includes("{")||n.includes("[")||n.includes("]"))return null;const i=[];let s="",o=!1,r=!1;for(let a=0;a<n.length;a++){const u=n[a];if(u==="\\"){s+=u,a+1<n.length&&(s+=n[a+1],a++);continue}if(!r&&u==="'"){o=!o,s+=u;continue}if(!o&&u==='"'){r=!r,s+=u;continue}if(!o&&!r&&u===","){i.push(s.trim()),s="";continue}s+=u}s.trim()&&i.push(s.trim());const l={};for(const a of i){if(!a)continue;let u=!1,c=!1,d=-1;for(let y=0;y<a.length;y++){const w=a[y];if(w==="\\"){y++;continue}if(!c&&w==="'"){u=!u;continue}if(!u&&w==='"'){c=!c;continue}if(!u&&!c&&w===":"){d=y;break}}if(d===-1)return null;const f=a.slice(0,d).trim(),p=a.slice(d+1).trim();if(!f)return null;let g=f;if(g.startsWith('"')&&g.endsWith('"')||g.startsWith("'")&&g.endsWith("'"))try{g=JSON.parse(g.replace(/^'/,'"').replace(/'$/,'"'))}catch{return null}if(!/^[_$A-Z][\w$-]*$/i.test(g))return null;let m;if(!p)m="";else if(p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'"))try{m=JSON.parse(p.replace(/^'/,'"').replace(/'$/,'"'))}catch{m=p}else/^-?\d+(?:\.\d+)?$/.test(p)?m=Number(p):p==="true"||p==="false"?m=p==="true":p==="null"?m=null:m=p;l[g]=m}return l}function XN(e,t,n){for(const i of e){const s=i,o=s.map;if(Array.isArray(o)&&o.length>=2){const r=Number(o[0]),l=Number(o[1]);Number.isFinite(r)&&Number.isFinite(l)&&(s.map=[r+t,Math.min(l+t,n)])}Array.isArray(s.children)&&XN(s.children,t,n)}}function Rue(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use($ue,t,{render(n,i){return n[i].nesting===1?`<div class="vmr-container vmr-container-${t}">`:`</div> +`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,i,s)=>{const o=t,r=o.bMarks[n]+o.tShift[n],l=o.eMarks[n],a=o.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,p;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 E=0,S=-1;for(let M=0;M<m.length;M++)if(m[M]==="{"?E++:m[M]==="}"&&E--,E===0){S=M+1;break}S>0&&(p=m.slice(0,S))}p||(f=d||void 0)}if(s)return!0;const y=!!o.env.__markstreamFinal;let w=n+1,k=!1;for(;w<=i;){const E=o.bMarks[w]+o.tShift[w],S=o.eMarks[w];if(o.src.slice(E,S).trim()===":::"){k=!0;break}w++}k||(w=i);const A=o.push("vmr_container_open","div",1);if(A.attrSet("class",`vmr-container vmr-container-${c}`),A.map=[n,k?w:i],A.meta={...A.meta??{},unclosed:!k&&!y},f&&A.attrSet("data-args",f),p)try{const E=JSON.parse(p);for(const[S,M]of Object.entries(E)){const _=M!=null&&typeof M=="object";A.attrSet(`data-${S}`,_?JSON.stringify(M):String(M))}}catch{const E=Due(p);if(E)for(const[S,M]of Object.entries(E)){const _=M!=null&&typeof M=="object";A.attrSet(`data-${S}`,_?JSON.stringify(M):String(M))}else A.attrSet("data-attrs",p)}const v=[];for(let E=n+1;E<w;E++){const S=o.bMarks[E]+o.tShift[E],M=o.eMarks[E];v.push(o.src.slice(S,M))}if(v.some(E=>E.trim().length>0)){let E=v.join(` +`);E.endsWith(` +`)||(E+=` +`),E.endsWith(` + +`)||(E+=` +`);const S=o.tokens[o.tokens.length-1];S&&(S.raw=E);const M=[];o.md.block.parse(E,o.md,o.env,M),XN(M,n+1,n+1+v.length),o.tokens.push(...M)}const x=o.push("vmr_container_close","div",-1);return k||(x.hidden=!0,x.map=[i,i]),o.line=k?w+1:w,!0},{alt:["paragraph","reference","blockquote","list"]})}function pl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function is(e){let t=!1,n=!1;for(let i=0;i<e.length;i++){const s=e[i];if(s==="\\"){i++;continue}if(!n&&s==="'"){t=!t;continue}if(!t&&s==='"'){n=!n;continue}if(!t&&!n&&s===">")return i}return-1}function yv(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let i;for(;(i=n.exec(e))!==null;){const s=i[1];if(!s)continue;const o=i[2]||i[3]||i[4]||"";t.push([s,o])}return t}const zue=/^[a-z][a-z0-9_-]*$/;function Jw(e){return zue.test(String(e??"").trim().toLowerCase())}function Ur(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return Jw(t)?t.toLowerCase():"";let n=1;for(;n<t.length&&/\s/.test(t[n]);)n++;if(t[n]==="/")for(n++;n<t.length&&/\s/.test(t[n]);)n++;const i=n;for(;n<t.length&&/[\w-]/.test(t[n]);)n++;const s=t.slice(i,n).toLowerCase(),o=t[n]??"";return o&&!/[\s/>]/.test(o)?"":Jw(s)?s:""}function rd(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const i of e){const s=Ur(i);!s||t.has(s)||(t.add(s),n.push(s))}return n}function Oue(...e){const t=new Set,n=[];for(const i of e)for(const s of rd(i))t.has(s)||(t.add(s),n.push(s));return n}function Pue(e){const t=rd(e);return{key:t.join(","),tags:t}}function eF(e){return Ur(e)}function jue(e,t){const n=String(e??""),i=Ur(t);if(!i)return!1;const s=pl(i),o=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return o?o[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function tF(e,t){const n=Ur(t);return!!n&&!tp.has(n)&&!jue(e,n)}function Hue(e,t){const n=String(e??""),i=Ur(t);if(!i)return n;const s=pl(i),o=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(o,"").replace(r,"")}const nF=Su,Wue=tp,iF=new Set(VN);iF.delete("details");const que=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,Uue=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,Z3=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,Kue=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function Pm(e){return(e.match(Z3)?.[1]??"").toLowerCase()}function fb(e){return/^\s*<\s*\//.test(e)}function hb(e,t){return nF.has(t)||/\/\s*>\s*$/.test(e)}function Vue(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i];if(!s||s.type!=="html_inline")continue;const o=String(s.content??""),r=Pm(o);if(r===t){if(fb(o)){if(n===0)return i;n--;continue}hb(o,r)||n++}}return-1}function Zue(e,t){let n=0;for(const i of e){if(!i||i.type!=="html_inline")continue;const s=String(i.content??""),o=Pm(s);if(o===t){if(fb(s)){n>0&&n--;continue}hb(s,o)||n++}}return n}function Xw(e,t,n=0){const i=new RegExp(String.raw`<\s*(\/?)\s*${pl(t)}(?=[\s>/])[^>]*>`,"gi");i.lastIndex=Math.max(0,n);let s=0,o;for(;(o=i.exec(e))!==null;){const r=o[0]??"",l=!!o[1],a=!l&&/\/\s*>$/.test(r);if(l){if(s===0)return{start:o.index,end:o.index+r.length};s--;continue}a||s++}return null}function Gue(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${pl(t)}(?=[\s>/])[^>]*>`,"gi");let i=0,s;for(;(s=n.exec(e))!==null;){const o=s[0]??"",r=!!s[1],l=!r&&/\/\s*>$/.test(o);if(r){i>0&&i--;continue}l||i++}return i}function jm(e){const t=e;return String(t.raw??t.content??t.markup??"")}function Que(e){const t=e;return t.meta||(t.meta={}),t.meta}function xy(e,t,n){const i=Que(e);i.markstreamCustomHtmlRaw=t,i.markstreamCustomHtmlInner=n}function Yue(e,t){if(!t.size)return;const n=Array.from(t,p=>new RegExp(String.raw`<\s*${pl(p)}(?=[\s>/])`,"i")),i=[];let s=!1;const o=p=>p?n.some(g=>g.test(p)):!1,r=p=>{if(!(!p||!i.length))for(const g of i)g.raw+=p,g.inner+=p},l=()=>{!i.length||!s||(r(` +`),s=!1)},a=p=>{r(p)},u=p=>{for(let m=0;m<i.length;m++)i[m].raw+=p,m<i.length-1&&(i[m].inner+=p);const g=i.pop();xy(g.token,g.raw,g.inner)},c=p=>{const g=i[i.length-1]?.tag;if(!g)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${pl(g)}\s*>`,"i");return p.match(m)?.[0]??null},d=p=>!!c(p),f=(p,g,m)=>{const y=m??(p.type==="html_inline"?Pm(g):"");if(!(y&&t.has(y))){r(g);return}const w=fb(g),k=!w&&hb(g,y);if(w){if(!i.length||i[i.length-1].tag!==y){r(g);return}u(g);return}if(r(g),k){xy(p,g,"");return}i.push({tag:y,token:p,raw:g,inner:""})};for(const p of e){if(p.type==="inline"&&Array.isArray(p.children)){const g=String(p.content??"");if(d(g)?s=!1:l(),!i.length&&!o(g)){s=!1;continue}let m=0,y=!0;for(const w of p.children){const k=jm(w),A=w.type==="html_inline"?Pm(k):"",v=A&&t.has(A);let x=k;if(y&&g&&k&&(i.length||v)){const E=g.indexOf(k,m);if(E!==-1)a(g.slice(m,E)),x=g.slice(E,E+k.length),m=E+k.length;else{if(i.length&&!v)continue;y=!1}}f(w,x,A)}y&&g&&m<g.length&&i.length&&a(g.slice(m)),s=i.length>0;continue}if(i.length&&typeof p.content=="string"){const g=jm(p),m=p.type==="html_block"?c(g):null;if(m){u(`${s?` +`:""}${m}`),s=i.length>0;continue}if(!p.content)continue;l(),r(p.content),s=!0}}for(const p of i)xy(p.token,p.raw,p.inner)}function Jue(e){return/^\s*<\s*[!?]/.test(e)}function Xue(e){const t=new Set(Wue);if(e&&Array.isArray(e))for(const n of e){const i=String(n??"").trim();if(!i)continue;const s=i.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function ex(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function ece(e,t){let n=null;for(const o of e.matchAll(que)){const r=o.index??-1;if(r<0)continue;const l=(o[1]??"").toLowerCase();ex(l,t)&&is(e.slice(r))===-1&&(!n||r<n.index)&&(n={index:r,tag:l,closing:!1})}for(const o of e.matchAll(Uue)){const r=o.index??-1;if(r<0)continue;const l=(o[1]??"").toLowerCase();ex(l,t)&&is(e.slice(r))===-1&&(!n||r<n.index)&&(n={index:r,tag:l,closing:!0})}const i=/<\/\s*$/.exec(e);if(i&&typeof i.index=="number"){const o=i.index;!e.slice(o).includes(">")&&(!n||o<n.index)&&(n={index:o,tag:"",closing:!0})}const s=/<\s*$/.exec(e);if(s&&typeof s.index=="number"){const o=s.index,r=e.slice(o);!r.startsWith("</")&&!r.includes(">")&&(!n||o<n.index)&&(n={index:o,tag:"",closing:!1})}return n}function tce(e,t){const n=e;return Object.assign(Object.create(Object.getPrototypeOf(n)),n,{type:"text",content:t,raw:t})}function nce(e,t){if(!e.length)return{children:e};const n=[];let i=null,s=null;function o(a,u){a&&(u?n.push(tce(u,a)):n.push({type:"text",content:a,raw:a}))}function r(a,u){let c=0;for(;c<a.length;){const d=a.indexOf("<",c);if(d===-1){o(a.slice(c),u);break}o(a.slice(c,d),u);const f=a.slice(d),p=f.match(Z3);if(!p){o("<",u),c=d+1;continue}const g=is(f);if(g===-1){o("<",u),c=d+1;continue}const m=f.slice(0,g+1),y=(p[1]??"").toLowerCase();t.has(y)?n.push({type:"html_inline",tag:"",content:m,raw:m}):o(m,u),c=d+m.length}}function l(a,u){if(!a)return;const c=ece(a,t);if(!c){r(a,u);return}const d=a.slice(0,c.index);d&&r(d,u),i={tag:c.tag,buffer:a.slice(c.index),closing:c.closing},s=i.buffer}for(const a of e){if(i){i.buffer+=jm(a),s=i.buffer;const u=is(i.buffer);if(u===-1)continue;const c=i.buffer.slice(0,u+1),d=i.buffer.slice(u+1);n.push({type:"html_inline",tag:"",content:c,raw:c}),i=null,s=null,d&&l(d);continue}if(a.type==="html_inline"){const u=jm(a),c=(u.match(Z3)?.[1]??"").toLowerCase();if(c&&t.has(c)&&is(u)===-1){i={tag:c,buffer:u,closing:/^<\s*\//.test(u)},s=i.buffer;continue}}if(a.type==="text"){const u=String(a.content??"");if(!u.includes("<")){n.push(a);continue}l(u,a);continue}n.push(a)}return{children:n,pendingBuffer:s??void 0}}const ice=["a","span","strong","em","b","i","u"];function sce(e,t={}){const n=new Set;if(t.customHtmlTags?.length)for(const f of t.customHtmlTags){const p=Ur(f);p&&n.add(p)}const i=f=>{const p=f,g=new Set(n),m=Array.isArray(p.env?.__markstreamCustomHtmlTags)?p.env.__markstreamCustomHtmlTags:[];for(const A of m){const v=Ur(String(A??""));v&&g.add(v)}const y=Xue(Array.from(g)),w=new Set(ice);for(const A of g)w.add(A);return{autoCloseInlineTagSet:w,commonHtmlTags:y,customTagSet:g,shouldMergeHtmlBlockTag:A=>g.has(A)||!y.has(A)||iF.has(A)}},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 p=f.children[0];return p?.type!=="html_block"?"":String(f.content??p.content??"")},o=(f,p)=>{f.type="html_block",f.content=p,f.raw=p,f.children=[]},r=f=>f.replace(/^(?:\r?\n)+/,""),l=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),u=(f,p)=>{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 y={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return p==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},y,{type:"paragraph_close",tag:"p",nesting:-1}]:p==="text"?[{type:"text",content:m,raw:m}]:[y]},c=(f,p,g)=>f[p-1]?.type==="paragraph_open"&&f[p+1]?.type==="paragraph_close"?"inline":g,d=(f,p)=>{const g=r(p);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 p=f.tokens??[],{commonHtmlTags:g,customTagSet:m}=i(f);for(const y of p){const w=y;if(w.type!=="inline"||!Array.isArray(w.children))continue;const k=String(w.content??""),A=w.children.length?w.children:k.includes("<")?[{type:"text",content:k,raw:k}]:null;if(A)try{const v=nce(A,g);if(w.children=v.children,v.pendingBuffer){const x=k.lastIndexOf(v.pendingBuffer);if(x!==-1){const E=k.slice(0,x);w.content=E,typeof w.raw=="string"&&(w.raw=E)}}}catch(v){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",v)}}Yue(p,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const p=f.tokens??[],{autoCloseInlineTagSet:g,customTagSet:m,shouldMergeHtmlBlockTag:y}=i(f),w=[];for(let k=0;k<p.length;k++){const A=p[k];if(w.length>0){const[x,E]=w[w.length-1];if(k!==E){if(A.type==="paragraph_open"||A.type==="paragraph_close"){p.splice(k,1),k--;continue}const S=String(A.content??A.raw??"");if(S){const M=p[E],_=`${String(M.content||"")} +${S}`,N=is(_),D=N===-1?null:Xw(_,x,N+1);if(D){const T=_.slice(0,D.end),$=_.slice(D.end);M.content=T,M.loading=!1,p.splice(k,1),w.pop();const P=d(M,$)?[]:u($,c(p,k,"paragraph"));P.length&&p.splice(k,0,...P),k--;continue}M.content=_,M.loading!==!1&&(M.loading=!0)}p.splice(k,1),k--;continue}}const v=s(A);if(v){if(Jue(v))continue;const x=(v.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),E=/^\s*<\s*\//.test(v);if(!x||!y(x))continue;if(o(A,v),!E)x&&!new RegExp(`^\\s*<\\s*${x}\\b[^>]*\\/\\s*>`,"i").test(v)&&Gue(v,x)>0&&w.push([x,k]);else if(w.length>0&&x&&w[w.length-1][0]===x){const[,S]=w[w.length-1],M=p[S];M.content=`${String(M.content||"")} +${v}`,M.loading=!1,w.pop(),p.splice(k,1),k--}continue}else if(w.length>0){if(A.type==="paragraph_open"||A.type==="paragraph_close"){p.splice(k,1),k--;continue}const x=A.content||"",E=new RegExp(`<\\s*\\/\\s*${w[w.length-1][0]}\\s*>`,"i").test(x);if(x){const[,S]=w[w.length-1],M=p[S];M.content=`${M.content||""} +${x}`,M.loading!==!1&&(M.loading=!E)}E&&w.pop(),p.splice(k,1),k--}else continue}if(m.size>0){const k=new Map,A=new Map,v=S=>{let M=k.get(S);return M||(M=new RegExp(`<\\s*${S}\\b`,"i"),k.set(S,M)),M},x=S=>{let M=A.get(S);return M||(M=new RegExp(`<\\s*\\/\\s*${S}\\s*>`,"i"),A.set(S,M)),M},E=[];for(let S=0;S<p.length;S++){const M=p[S],_=String(M.content??"");if(E.length>0){const D=E[E.length-1],T=p[D.index],$=M.type==="html_block"?x(D.tag).exec(_):null;if($){const R=$.index+$[0].length,W=_.slice(0,R),z=_.slice(R);T.content=`${String(T.content??"")} +${W}`,Array.isArray(T.children)&&T.children.push({type:"html_inline",content:`</${D.tag}>`,raw:`</${D.tag}>`}),E.pop();const G=d(T,z)?[]:u(z,c(p,S,"paragraph"));G.length?p.splice(S,1,...G):(p.splice(S,1),S--);continue}if(M.type!=="inline")continue;const P=Array.isArray(M.children)?M.children:[],O=Vue(P,D.tag);if(O!==-1){const R=P.slice(0,O+1),W=P.slice(O+1),z=R.map(G=>String(G?.content??G?.raw??"")).join("");if(T.content=`${String(T.content??"")} +${z}`,Array.isArray(T.children)&&T.children.push(...R),W.length){const G=W.map(K=>String(K.content??K.raw??"")).join("");if(G.trim()){const K=G.replace(/^\s+/,"");if(d(T,G))p.splice(S,1),S--;else if(K.startsWith("<"))p.splice(S,1,{type:"html_block",content:K});else{const H=u(G,c(p,S,"paragraph"));p.splice(S,1,...H)}}else p.splice(S,1),S--}else p.splice(S,1),S--;E.pop();continue}T.content=`${String(T.content??"")} +${_}`,Array.isArray(T.children)&&T.children.push(...P),p.splice(S,1),S--;continue}if(M.type!=="inline")continue;const N=Array.isArray(M.children)?M.children:[];for(const D of m)if((N.length?Zue(N,D):v(D).test(_)&&!x(D).test(_)?1:0)>0){E.push({tag:D,index:S});break}}}{let k=0;for(let A=0;A<p.length;A++){const v=p[A];if(v.type==="paragraph_open"){k++;continue}v.type==="paragraph_close"&&(k>0?k--:(p.splice(A,1),A--))}}for(let k=0;k<p.length;k++){const A=p[k];if(A.type==="html_block"){const M=(A.content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(M.startsWith("!")||M.startsWith("?")){A.loading=!1;continue}if(m.has(M)){const O=String(A.content??""),R=is(O),W=R===-1?null:Xw(O,M,R+1);A.loading=W?!1:A.loading!==void 0?A.loading:!0;const z=W?.start??-1,G=W?W.end-W.start:0;if(z!==-1){const K=O.slice(0,z+G);let H="";R!==-1&&R<z&&(H=O.slice(R+1,z)),A.children=[{type:M,content:H,raw:K,attrs:[],tag:M,loading:!1}],A.content=K,A.raw=K;const q=u(O.slice(z+G)||"","text");q.length&&p.splice(k+1,0,...q)}else A.children=[{type:M,content:"",raw:O,attrs:[],tag:M,loading:!0}];continue}if(["br","hr","img","input","link","meta","div","p","ul","li"].includes(M))continue;A.type="inline";const _=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let N;for(;(N=_.exec(A.content||""))!==null;)N[1],N[2]||N[3]||N[4];const D=String(A.content??""),T=new RegExp(`<\\/\\s*${M}\\s*>`,"i").exec(D),$=T?T.index:-1,P=T?T[0].length:0;if($!==-1){const O=D.slice(0,$+P),R=(D.slice($+P)||"").replace(/^\s+/,"");A.children=[{type:"html_block",content:O,tag:M,loading:!1}],A.content=O,A.raw=O,R&&p.splice(k+1,0,R.startsWith("<")?{type:"html_block",content:R}:{type:"text",content:R,raw:R})}else A.children=[{type:"html_block",content:A.content,tag:M,loading:!0}];continue}if(!A||A.type!=="inline")continue;if(A.children.length===2&&A.children[0].type==="html_inline"){const M=(A.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),_=A.children[1],N=String(_?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(_?.type==="html_inline"&&N===M)continue;g.has(M)?(A.children[0].loading=!0,A.children[0].tag=M,A.children.push({type:"html_inline",tag:M,loading:!0,content:`</${M}>`})):A.children=[{type:"html_block",loading:!0,tag:M,content:String(A.children[0]?.content??"")+String(A.children[1]?.content??"")}];continue}else if(A.children.length===3&&A.children[0].type==="html_inline"&&A.children[2].type==="html_inline"){const M=(A.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(g.has(M))continue;A.children=[{type:"html_block",loading:!1,tag:M,content:A.children.map(_=>_.content).join("")}];continue}if(!A.content?.startsWith("<")||A.children?.length!==1)continue;const v=String(A.content),x=A,E=x.children[0];if(E?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(v)&&(x.children.length=0);continue}const S=String(E.content??v).match(Kue)?.[1]?.toLowerCase()??"";if(S){if(/\/\s*>\s*$/.test(v)||nF.has(S)){x.children=[{type:"html_inline",content:v}];continue}x.children.length=0}}})}function oce(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 rce(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const i=n.tokens??[];for(let s=0;s<i.length;s++){const o=i[s];if(o.type!=="code_block")continue;const r=String(o.content??"").trim();if(!r)continue;const l=r.split(/\r?\n/).filter(a=>a.trim().length>0);if(l.length===1&&!oce(l[0]??"")){const a=l[0]??"",u=o.level??0;i.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 sF=/\.([a-z0-9]{1,15})$/i,lce=/[_()[\]{}<>]/u,ace=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,uce=/[?#@]/u,cce=/[\\/]/u,dce=/^[\p{L}\p{N}./\\-]+$/u,fce=/^[A-Za-z0-9-]{1,63}$/u,hce=/^xn--[a-z0-9-]{2,59}$/i,pce=/^(?:[A-Z]{1,6}|\d{1,8})$/u,gce=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,mce=/文件名\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,vce=/文件名\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,yce=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,bce=2e3,kce=512,Ace={},Cce=new Set(["ai","md","py","rs","sh","zip"]),oF=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),wce=new Set([...oF,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),xce=new Set(["com","dev","io","page","site"]),_ce=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),Sce=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"]),Mc=new Map;function tx(e,t){if(!e||e.length>kce)return t;for(Mc.set(e,t);Mc.size>bce;){const n=Mc.keys().next().value;if(!n)break;Mc.delete(n)}return t}function np(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function _y(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return np(n)?n:void 0}function nx(e,t){if(!np(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 ix(e){const t=Mp(e);return np(t)?t:void 0}function Mce(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function sx(e,t){if(!np(t))return;const n=String(e??"").trim().split(/\s+/u).map(Mce).filter(Boolean);if(n.length===0)return;const i={};return t?.filename&&n.every(s=>Hm(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(i.filename=!0),t?.explicitFilename&&i.filename&&(i.explicitFilename=!0),t?.marketTicker&&n.every(s=>Hm(s,{marketTicker:!0}))&&(i.marketTicker=!0),np(i)?i:void 0}function ju(e,t=!1){let n;return{options(i){return t||i==null?nx(e,n):nx(e,_y(ix(i),sx(i,n)))},remember(i){const s=ix(i);n=t?_y(n,s):_y(s,sx(i,n))},reset(){n=void 0}}}function ox(e){return fce.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function Ice(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return ox(n)||hce.test(n)?t.every(ox):!1}function rF(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function Ece(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function Tce(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function lF(e,t,n){const i=Ece(t);return rF(e)&&Tce(i)&&String(n??"").toLowerCase().includes(i.toLowerCase())}function Lce(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 Mp(e){const t=String(e??""),n=Mc.get(t);return n?(Mc.delete(t),Mc.set(t,n),n):Lce(t)?tx(t,{explicitFilename:mce.test(t),filename:vce.test(t),marketTicker:yce.test(t)}):tx(t,Ace)}function Nce(e){return Ice(e.split(/[\\/]/)[0]??"")}function Fce(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function Bce(e){if(lce.test(e)||!dce.test(e))return!0;if(cce.test(e))return!Nce(e);const t=e.replace(sF,"");return rF(t)?!0:t.split(".").filter(Boolean).some(Fce)}function $ce(e,t,n){if(!(n?wce:oF).has(t))return!1;const i=e.slice(0,-(t.length+1));return i===""?e.startsWith("."):(n?gce:pce).test(i)}function Hm(e,t={}){if(!e||ace.test(e)||uce.test(e))return!1;const n=e.match(sF);if(!n)return!1;const i=String(n[1]??"").toLowerCase();return $ce(e,i,t.marketTicker===!0)?!0:Sce.has(i)?!Cce.has(i)||t.filename?!0:Bce(e):!!(t.explicitFilename&&xce.has(i)||t.filename&&_ce.has(i))}const aF=new WeakMap,uF=new WeakSet;function G3(e,t){return aF.set(e,t),e}function Dce(e){return aF.get(e)}function Rce(e){uF.add(e)}function zce(e){return e===void 0||uF.has(e)}const rx=["!"];function lx(e){return e==="linkify"||e==="autolink"?e:"recovery"}function Vo(e){return{type:"text",content:e,raw:e}}function uc(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 cc(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 Ka(e,t,n,i="recovery"){let s="";if(t.includes('"')){const o=t.split('"');t=o[0].trim(),s=o[1].trim()}return G3({type:"link",loading:n,href:t,title:s,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`},i)}function Oce(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(Vo(t))}}function ax(e,t){let n=-1;for(const i of t){const s=e.indexOf(i);s!==-1&&(n===-1||s<n)&&(n=s)}return n}function Pce(e){const t=e.attrs?.find(n=>n?.[0]==="href")?.[1];return typeof t=="string"?t:""}function jce(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(i=>i?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function ux(e,t,n){let i="";for(let s=t+1;s<n;s++){const o=e[s];if(o?.type!=="text"||typeof o.content!="string")return null;i+=o.content}return i||null}function cx(e){let t=0;for(let n=0;n<e.length;n++){const i=e[n];if(i==="(")t++;else if(i===")"){if(t===0)return n;t--}}return-1}function Hce(e){e.core.ruler.after("inline","fix_link_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=Wce(s.children,typeof s.content=="string"?s.content:void 0)}catch(o){console.error("[applyFixLinkTokens] failed to fix inline children",o)}}})}function Wce(e,t){if(e.length<3)return e;const n=e.some(r=>r.type==="code_inline"),i=new Map;let s=0;for(let r=0;r<e.length;r++){const l=e[r];if(l.type==="link_open"){let a=-1;for(let u=r+1;u<e.length;u++)if(e[u]?.type==="link_close"){a=u;break}if(a!==-1&&l.markup==="linkify"){i.set(l,s);const u=ux(e,r,a),c=s>0&&u?cx(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 o=Mp(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;u<e.length;u++)if(e[u]?.type==="link_close"){a=u;break}if(a!==-1){const u=ux(e,r,a),c=Pce(l);if(!n&&l.markup==="linkify"&&u&&!lF(u,c,t)&&Hm(u,o)){e.splice(r,a-r+1,Vo(u));continue}let d=ax(u??"",rx);if(l.markup==="linkify"&&u?.includes(")")&&(i.get(l)??0)>0){const g=cx(u);g!==-1&&(d===-1||g<d)&&(d=g)}const f=ax(c,rx);let p=d;for(let g=r+1;g<a;g++){const m=e[g];if(m?.type!=="text"||typeof m.content!="string")continue;if(p>=m.content.length){p-=m.content.length;continue}if(p<0)break;const y=m.content[p],w=m.content.slice(0,p);let k=m.content.slice(p);for(let x=g+1;x<a;x++){const E=e[x];E?.type==="text"&&typeof E.content=="string"&&(k+=E.content)}m.content=w,m.raw=w;const A=a-(g+1);A>0&&(e.splice(g+1,A),a=g+1);let v=c;if(y==="!"&&f!==-1)v=c.slice(0,f);else if(k){const x=encodeURI(k);if(x&&c.endsWith(x))v=c.slice(0,c.length-x.length);else{const E=y?encodeURI(y):"",S=E?c.indexOf(E):-1;S!==-1&&(v=c.slice(0,S))}}v!==c&&jce(l,v),k&&e.splice(a+1,0,Vo(k));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;u<e.length;u++)if(e[u]?.type==="em_close"){e[u].type="strong_close",e[u].tag="strong",e[u].markup="**";break}}else if(l?.type==="text"&&l.content?.endsWith("(")&&e[r+1]?.type==="link_open"){const a=l.content.match(/\[([^\]]+)\]/);if(a){let u=l.content.slice(0,a.index);const c=u.match(/(\*+)$/),d=lx(e[r+1]?.markup),f=[];if(c){u=u.slice(0,c.index),u&&f.push(Vo(u));const p=a[1],g=c[1].length;uc(f,g);let m=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(m+=e[r+4]?.content||"",e[r+4].content=""),f.push(Ka(p,m,!e[r+4]?.content?.startsWith(")"),d)),cc(f,g),e[r+4]?.type==="text"){const y=e[r+4].content?.replace(/^\)\**/,"");y&&f.push(Vo(y)),e.splice(r,5,...f)}else e.splice(r,4,...f)}else{u&&f.push(Vo(u));let p=a[1];const g=p.match(/^\*+/);if(g){const y=g[0].length;p=p.replace(/^\*+/,"").replace(/\*+$/,"");let w=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(w+=e[r+4]?.content||"",e[r+4].content=""),uc(f,y),f.push(Ka(p,w,!e[r+4]?.content?.startsWith(")"),d)),cc(f,y),e[r+4]?.type==="text"){const k=e[r+4].content?.replace(/^\)/,"");k&&f.push(Vo(k)),e.splice(r,5,...f)}else e.splice(r,4,...f);r===0?r=f.length-1:r-=f.length+1;continue}let m=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(m+=e[r+4]?.content||"",e[r+4].content=""),f.push(Ka(p,m,!e[r+4]?.content?.startsWith(")"),d)),e[r+4]?.type==="text"){const y=e[r+4].content?.replace(/^\)/,"");y&&f.push(Vo(y)),e.splice(r,5,...f)}else e.splice(r,4,...f)}r-=f.length+1;continue}}else if(l.type==="link_open"&&l.markup==="linkify"&&e[r-1]?.type==="text"&&e[r-1].content?.endsWith("(")){if(e[r-2]?.type==="link_close"){const a=[],u=e[r-3].content||"";let c=l.attrs?.find(d=>d[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(Ka(u,c,f,"linkify"));const p=e[r+3].content?.replace(/^\)\**/,"");p&&a.push(Vo(p)),e.splice(r-4,8,...a)}else a.push(G3({type:"link",loading:!0,href:c,title:"",text:u,children:[{type:"text",content:c,raw:c}],raw:`[${u}](${c})`},"linkify")),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(w=>w[0]==="href")?.[1]||"",d=u.find(w=>w[0]==="title")?.[1]||"";let f=3,p=2;const g=(e[r-3]?.content||"").match(/^(\*+)$/),m=[];if(g){p+=1;const w=g[1].length;uc(m,w)}if(l.markup!=="linkify"&&e[r+1].type==="text"&&e[r+1]?.content?.startsWith("](")){f+=1;for(let w=r+1;w<e.length;w++){const k=g?g[1].length:e[r-3].markup.length,A=e[w];if(k===1&&A.type==="em_close")break;if(k===2&&A.type==="strong_close")break;if(k===3&&(A.type==="em_close"||A.type==="strong_close"))break;f+=1}}const y=G3({type:"link",loading:!1,href:c,title:d,text:a,children:[{type:"text",content:a,raw:a}],raw:`[${a}](${c})`},l.markup?lx(l.markup):"explicit");if(m.push(y),g){const w=g[1].length;cc(m,w)}e.splice(r-p,f,...m),r-=m.length+1;continue}else if(l.content?.startsWith("](")&&e[r-1].markup?.includes("*")&&e[r-4]?.type==="text"&&e[r-4].content?.endsWith("[")){const a=e[r-1].markup.length,u=[],c=e[r-4].content.slice(0,e[r-4].content.length-a);c&&u.push(Vo(c)),uc(u,a);const d=e[r-2].content||"";let f=l.content.slice(2),p=!0;if(e[r+1]?.type==="text"){const g=(e[r+1]?.content??"").indexOf(")");p=g===-1,g===-1&&(f+=e[r+1]?.content?.slice(0,g)||"",e[r+1].content="")}if(u.push(Ka(d,f,p)),cc(u,a),e[r+1]?.type==="text"){const g=e[r+1].content?.replace(/^\)\**/,"");g&&u.push(Vo(g)),e.splice(r-4,8,...u)}else e[r+1]?.type==="link_open"?e.splice(r-4,10,...u):e.splice(r-4,7,...u);r-=u.length+1;continue}else if(l.content?.startsWith("](")&&e[r-1].type==="strong_close"&&e[r-4]?.type==="text"&&e[r-4]?.content?.includes("**[")){const a=[],u=e[r-4].content.split("**[")[0];u&&a.push(Vo(u)),uc(a,2);const c=e[r-2].content||"";let d=l.content.slice(2),f=!0;if(e[r+1]?.type==="text"){const p=(e[r+1]?.content??"").indexOf(")");f=p===-1,p===-1&&(d+=e[r+1]?.content?.slice(0,p)||"",e[r+1].content="")}if(a.push(Ka(c,d,f)),cc(a,2),e[r+1]?.type==="text"){const p=e[r+1].content?.replace(/^\)\**/,"");p&&a.push(Vo(p)),e.splice(r-4,8,...a)}else e[r+1]?.type==="link_open"?e.splice(r-4,10,...a):e.splice(r-4,7,...a);r-=a.length+1;continue}else if(l.type==="strong_close"&&e[r+1]?.type==="text"&&e[r+1].content?.includes("](")&&e[r-1].type==="text"&&/\[.*$/.test(e[r-1].content||"")){const a=[],[u,c]=e[r-1].content?.split("[")||["",""];u&&a.push(Vo(u)),uc(a,2);let[d,f]=e[r+1].content.split("](");d=c+d;let p=4;if(e[r+2]?.type==="link_open"){const m=e[r+2].attrs?.find(y=>y[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,p+=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(Ka(d,f,g)),cc(a,2),e.splice(r-2,p,...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=[];uc(d,2),d.push(Ka(u,c,!1)),cc(d,2),e.splice(r,9,...d),r-=d.length-1;continue}}}}if(n)return e;for(let r=0;r<e.length-1;r++){const l=e[r],a=e[r+1];if(l?.type!=="link"||a?.type!=="text"||typeof a.content!="string"||!a.content.startsWith("!"))continue;const u=String(l.href??"");if(String(l.text??"")!==u||!u.endsWith("=")&&!u.endsWith("#"))continue;Oce(l,"!");const c=a.content.slice(1);c?(a.content=c,a.raw=c):e.splice(r+1,1)}return e}function qce(e){e.core.ruler.after("inline","fix_list_item_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=Uce(s.children)}catch(o){console.error("[applyFixListItem] failed to fix inline children",o)}}})}function Uce(e){const t=e[e.length-1],n=String(t?.content??"");return t?.type==="text"&&/^\s*\d+\.\s*$/.test(n)&&e[e.length-2]?.tag==="br"&&e.splice(e.length-1,1),e}function Kce(e){e.core.ruler.after("inline","fix_strong_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=Vce(s.children)}catch(o){console.error("[applyFixStrongTokens] failed to fix inline children",o)}}})}function Vce(e){let t=0;const n=new Set,i=new Set;let s=0;for(let c=0;c<e.length;c++){const d=e[c],f=d.type;if(f==="strong_open"){t++;const p=String(d.markup??"");let g=c-1;for(;g>=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y<e.length&&e[y].type==="text"&&e[y].content==="";)y++;const w=e[y];p==="__"&&(m?.content?.endsWith("_")||w?.content?.startsWith("_")||w?.markup?.includes("_"))&&(d.type="text",d.tag="",d.content=p,d.raw=p,d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null,n.add(t))}else if(f==="strong_close")n.has(t)&&d.markup==="__"&&(d.type="text",d.content=d.markup,d.raw=String(d.markup??""),d.tag="",d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null),t--,t<0&&(t=0);else if(f==="em_open"){s++;const p=String(d.markup??"");let g=c-1;for(;g>=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y<e.length&&e[y].type==="text"&&e[y].content==="";)y++;const w=e[y];p==="_"&&(m?.content?.endsWith("_")||w?.content?.startsWith("_")||w?.markup?.includes("_"))&&(d.type="text",d.tag="",d.content=p,d.raw=p,d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null,i.add(s))}else f==="em_close"&&(i.has(s)&&d.markup==="_"&&(d.type="text",d.content=d.markup,d.raw=String(d.markup??""),d.tag="",d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null),s--,s<0&&(s=0))}if(e.length<5)return e;const o=e.length-4,r=e[o];let l=[...e];const a=e[o+1],u=String(r.content??"");if(r.type==="link_open"&&e[o-1]?.type==="em_open"&&e[o-2]?.type==="text"&&e[o-2].content?.endsWith("*")){const c=String(e[o-2].content??"").slice(0,-1),d=[{type:"strong_open",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""},e[o],e[o+1],e[o+2],{type:"strong_close",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""}];c&&d.unshift({type:"text",content:c,raw:c}),l.splice(o-2,6,...d)}else if(r.type==="text"&&u.endsWith("*")&&a.type==="em_open"){const c=e[o+2],d=c?.type==="text"?4:3,f=[{type:"strong_open",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""},{type:"text",content:c?.type==="text"?String(c.content??""):"",raw:c?.type==="text"?String(c.content??""):""},{type:"strong_close",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""}],p=u.slice(0,-1);p&&f.unshift({type:"text",content:p,raw:p}),l.splice(o,d,...f)}return l=Zce(l),l}function Zce(e){if(e.length<7)return e;const t=[];for(let n=0;n<e.length;n++){const i=e[n],s=e[n+1],o=e[n+2],r=e[n+3],l=e[n+4],a=e[n+5],u=e[n+6];if(i?.type==="strong_open"&&s?.type==="text"&&o?.type==="strong_close"&&r?.type==="strong_open"&&l?.type==="math_inline"&&a?.type==="strong_close"&&u?.type==="text"){const c=String(u.content??""),d=c.indexOf("**");if(d!==-1){const f=c.slice(0,d),p=c.slice(d+2);t.push(i),t.push(s),t.push(l),f&&t.push({...u,type:"text",content:f,raw:f}),t.push(a),p&&t.push({...u,type:"text",content:p,raw:p}),n+=6;continue}}if(i?.type==="strong_open"&&s?.type==="text"&&o?.type==="strong_close"&&r?.type==="strong_open"&&l?.type==="math_inline"&&a?.type==="strong_close"){const c=Gce(e,n+6);if(c){t.push(i),t.push(s),t.push(l);for(let d=n+6;d<c.index;d++)t.push(e[d]);c.beforeClose&&t.push({...e[c.index],type:"text",content:c.beforeClose,raw:c.beforeClose}),t.push(a),c.afterClose&&t.push({...e[c.index],type:"text",content:c.afterClose,raw:c.afterClose}),n=c.index;continue}}t.push(i)}return t}function Gce(e,t){for(let n=t;n<e.length;n++){const i=e[n];if(i?.type==="strong_open")return null;if(i?.type!=="text")continue;const s=String(i.content??""),o=s.indexOf("**");if(o!==-1)return{index:n,beforeClose:s.slice(0,o),afterClose:s.slice(o+2)}}return null}function Qce(e){e.core.ruler.after("block","fix_table_tokens",t=>{const n=t;try{const i=nde(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(i)&&(n.tokens=i)}catch(i){console.error("[applyFixTableTokens] failed to fix table tokens",i)}})}function dx(){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 fx(){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 hx(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 cF(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(i=>i.trim().length>0)?n:null}function Sy(e){return cF(e)!==null}function dF(e){return/^:?-+:?$/.test(e.trim())}function Yce(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(dF)}function Jce(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function Xce(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(dF)&&Jce(n)}function ede(e){return e==="|"||e==="|:"}function tde(e){const t=cF(e);return t!==null&&t.every(n=>!n.includes(":"))}function nde(e,t=!1,n=""){const i=[...e];if(e.length<3)return i;const s=e.length-2,o=e[s];if(o.type==="inline"){const r=String(o.content??""),l=r.split(` +`)[0]??"",[a="",u="",...c]=r.split(` +`),d=!t&&!r.includes(` +`)&&/\r?\n$/.test(n)&&Sy(r);if(!t&&(r.includes(` +`)&&c.length===0&&Sy(a)&&Xce(u)||d)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>hx(g)),p=[...dx(),...f,...fx()];i.splice(s-1,3,...p)}else if(r.includes(` +`)&&c.length===0&&Sy(a)&&Yce(u)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>hx(g)),p=[...dx(),...f,...fx()];i.splice(s-1,3,...p)}else r.includes(` +`)&&c.length===0&&tde(a)&&ede(u)&&(o.content=r.slice(0,-2),o.children.splice(2,1))}return i}function ide(e,t,n,i){const s=e.length;if(n==="$$"&&i==="$$"){let u=t;for(;u<s-1;){if(e[u]==="$"&&e[u+1]==="$"){let c=u-1,d=0;for(;c>=0&&e[c]==="\\";)d++,c--;if(d%2===0)return u}u++}return-1}const o=n[n.length-1],r=i;let l=0,a=t;for(;a<s;){if(e.slice(a,a+r.length)===r){let c=a-1,d=0;for(;c>=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===o?l++:u===r[r.length-1]&&l>0&&l--,a++}return-1}var sde=ide;const ode=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],Wm=ode.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),rde=/\\[a-z]+/i,fF="(?:\\\\|\\u0008)",lde=new RegExp(String.raw`${fF}(?:${Wm})\s*\{[^}]+\}`,"i"),ade=new RegExp(String.raw`(?:${fF})?(?:${Wm})\s*\{`,"i"),ude=/\\(?:text|frac|left|right|times)/,cde=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,dde=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,fde=/[A-Z]+\s*\([^)]+\)/i,hde=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,pde=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,gde=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,mde={"\b":"\\b","\v":"\\v","\f":"\\f"};function vde(e){let t="";for(const n of e)t+=mde[n]??n;return t}function ou(e){if(!e)return!1;const t=vde(e),n=t.trim();if(gde.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const i=rde.test(t),s=lde.test(t),o=ade.test(t),r=ude.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=cde.test(t)&&!dde.test(t),u=fde.test(t),c=hde.test(n),d=pde.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),p=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return i||s||o||r||l||a||u||c||d||f||p}const hF="__markstreamMathPluginApplied",Q3=80,pF=2e4,px=pF+4096;function pb(e){return!!e[hF]}function yde(e){e[hF]=!0}const gF=["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"],bde=["cdot","mathbf{","partial","mu_{"],mF=gF.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),vF="[ \r\b\f\v]",kde=new RegExp(`([^\\\\])(${bde.map(e=>e).join("|")})+`,"g"),Ade=/span\{([^}]+)\}/,Cde=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,wde=/(^|[^\\])\\\r?\n/g,xde=/(^|[^\\])\\$/g,_de=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,Sde=new RegExp(`(${vF})|(${mF})\\b`,"g"),gx=new Map,mx=new Map;function Mde(e){if(!e)return Sde;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),i=gx.get(n);if(i)return i;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,o=new RegExp(`(${vF})|(${s})\\b`,"g");return gx.set(n,o),o}function Ide(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const i=e?"__default__":n.join(""),s=mx.get(i);if(s)return s;const o=e?[Wm,mF].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),Wm].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${o})\\s*\\{`,"g");return mx.set(i,r),r}const vx={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function yx(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function Ede(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&_de.test(n))return t;const i=n?t.slice(n.length):t;return`${n}${"\\!".repeat(i.length)}`})}function bx(e){const t=/(^|[^\\])(__|\*\*)/g;let n,i=null;for(;(n=t.exec(e))!==null;)i={marker:n[2],index:n.index+(n[1]?.length??0)};return i}function Va(e,t){const n=t?.commands??gF,i=t?.escapeExclamation??!0,s=t?.commands==null,o=Mde(s?void 0:n);let r=e.replace(o,(u,c,d,f,p)=>{if(c!==void 0&&vx[c]!==void 0)return`\\${vx[c]}`;if(d&&n.includes(d)){const g=p&&typeof f=="number"?p[f-1]:void 0;return g==="\\"||g&&/\w/.test(g)?u:`\\${d}`}return u});i&&(r=Ede(r));let l=r;const a=Ide(s,s?void 0:n);return l=l.replace(a,(u,c,d)=>`${c}\\${d}{`),l=l.replace(Ade,"span\\{$1\\}").replace(Cde,"\\operatorname{span}\\{$1\\}"),l=l.replace(wde,`$1\\\\ +`),l=l.replace(xde,"$1\\\\"),l=l.replace(kde,"$1\\$2"),l}function kx(e){const t=e.trim();return!(!ou(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 yF(e){const t=[];let n=0;for(;n<e.length;){if(e[n]!=="`"){n++;continue}const i=n;let s=1;for(;i+s<e.length&&e[i+s]==="`";)s++;let o=i+s,r=-1;for(;o<e.length;){if(e[o]!=="`"){o++;continue}let l=1;for(;o+l<e.length&&e[o+l]==="`";)l++;if(l===s){r=o;break}o+=l}if(r!==-1){t.push([i,r+s]),n=r+s;continue}n=i+s}return t}function qm(e,t){for(const n of e)if(t>=n[0]&&t<n[1])return n;return null}function Tde(e,t=!1){const n=[];let i=0;for(;i<e.length-1;){if(e[i]==="!"&&e[i+1]==="["){const s=i;let o=i+2,r=1;for(;o<e.length&&r>0;){if(e[o]==="\\"&&o+1<e.length){o+=2;continue}e[o]==="["?r++:e[o]==="]"&&r--,o++}if(r===0&&o<e.length&&e[o]==="("){let l=o+1,a=1;for(;l<e.length&&a>0;){if(e[l]==="\\"&&l+1<e.length){l+=2;continue}e[l]==="("?a++:e[l]===")"&&a--,l++}if(a===0){n.push([s,l]),i=l;continue}if(t){n.push([s,e.length]),i=e.length;continue}}}i++}return n}function Ip(e,t){let n=t-1,i=0;for(;n>=0&&e[n]==="\\";)i++,n--;return i%2===1}function Y3(e,t){let n=t;for(;n<e.length;){const i=e.indexOf("$",n);if(i===-1)return-1;if(Ip(e,i)){n=i+1;continue}return i}return-1}function My(e,t){let n=t;for(;n<e.length;){const i=Y3(e,n);if(i===-1)return-1;if(i>0&&e[i-1]==="$"||i+1<e.length&&e[i+1]==="$"){n=i+1;continue}return i}return-1}function Pd(e,t,n=0){let i=Math.max(0,n);for(;i<e.length;){const s=e.indexOf(t,i);if(s===-1)return-1;if(!Ip(e,s))return s;i=s+Math.max(1,t.length)}return-1}function Ax(e,t,n=0,i=e.length,s=[]){let o=0,r=Math.max(0,n);const l=Math.min(e.length,Math.max(0,i));for(;r<l;){const a=e.indexOf(t,r);if(a===-1||a>=l)break;const u=qm(s,a);if(u){r=Math.max(a+Math.max(1,t.length),u[1]);continue}Ip(e,a)||o++,r=a+Math.max(1,t.length)}return o}function gb(e,t,n){const i=sp(String(e??""));if(!i.endsWith(t))return-1;const s=i.length-t.length;if(s<=0||!sp(i.slice(0,s)).trim()||Ip(i,s))return-1;const o=yF(i);if(qm(o,s))return-1;const r=Ax(i,t,0,s,o);if(t==="$$"){if(r%2===1)return-1}else if(r>Ax(i,n,0,s,o))return-1;return s}function ip(e){return e===" "||e===" "}function sp(e){let t=e.length;for(;t>0&&ip(e[t-1]);)t--;return e.slice(0,t)}function Cx(e){let t=0;for(let n=0;n<e.length;n++)e[n]===` +`&&t++;return t}function wx(e){if(!e)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}function Lde(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let i=0;i<e.length;i++){const s=e[i];if(s===t){n++;continue}if(!ip(s))return!1}return n>=3}function Nde(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let i=0;for(;t[n]==="-";)i++,n++;return i<3?!1:(t[n]===":"&&n++,n===t.length)}function Fde(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(Nde)}function Bde(e){let t=0;if(!wx(e[t]))return!1;for(;wx(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:ip(e[t+1])}function bF(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&&ip(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&ip(t[1])||Bde(t)||Lde(t)||Fde(t))}function xx(e,t){return e?t?`${e} +${t}`:e:t}function J3(e){const t=String(e??"").trim();return t?ou(t):!1}function _x(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)|0;return t.toString(36)}function kF(e){if(e.length<=px)return{source:e,lineOffset:0};let t=e.length-px;const n=e.indexOf(` +`,t);return n===-1?{source:"",lineOffset:Cx(e)}:(t=n+1,{source:e.slice(t),lineOffset:Cx(e.slice(0,t))})}function AF(e){const t=String(e??"");if(!t||!t.includes("$$")&&!t.includes("\\["))return!1;const{source:n}=kF(t);if(!n)return!1;const i=n.split(/\r?\n/),s=Math.max(0,i.length-Q3-2),o=[["$$","$$"],["\\[","\\]"]];for(let r=s;r<i.length;r++){const l=sp(i[r]);if(l&&!bF(l)){for(const[a,u]of o)if(gb(l,a,u)!==-1)return!0}}return!1}function $de(e){const t=String(e??"");if(!t||!t.includes("$$")&&!t.includes("\\["))return null;const{source:n,lineOffset:i}=kF(t);if(!n)return null;const s=n.split(/\r?\n/),o=Math.max(0,s.length-Q3-2),r=[["$$","$$"],["\\[","\\]"]];for(let l=o;l<s.length-1;l++){const a=sp(s[l]);for(const[u,c]of r){const d=gb(a,u,c);if(d===-1)continue;let f="",p=!1;for(let g=l+1;g<s.length;g++){if(g-l>Q3){p=!0;break}const m=s[g],y=Pd(m,c);if(y!==-1){const w=xx(f,m.slice(0,y));if(!J3(w)){p=!0;break}const k=m.slice(y+c.length),A=k.trim()?`suffix:${_x(k)}`:"nosuffix";return["closed",u,i+l,d,i+g,y,_x(w),A].join(":")}if(bF(m)){p=!0;break}if(f=xx(f,m),f.length>pF){p=!0;break}}if(!p&&J3(f))return["pending",u,i+l,d].join(":")}}return null}function Iy(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function Dde(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const i=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(i)?!1:i===""||/^[)\s,.!?;:]/.test(i)}function Ey(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function Rde(e,t){yde(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)},i=(r,l)=>{const a=r,u=!!t?.strictDelimiters,c=!a?.env?.__markstreamFinal,d=(k,A)=>{let v=A;for(;v<k.length&&(k[v]===" "||k[v]===" ");)v++;if(v===A||!(k[v]===` +`||k[v]==="\r"&&k[v+1]===` +`))return A;const x=k.slice(A,v),E=a.push("text","",0);return E.content=x,v};if(/^\*[^*]+/.test(a.src))return!1;if(a.src[a.pos]==="$"){let k=a.pos+1;for(;a.src[k]==="$";)k++;const A=k-a.pos,v=a.src[k];if(A>=3&&(!v||/\s/.test(v))){const x=a.push("text","",0);return x.content=a.src.slice(a.pos,k),a.pos=k,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],p=String(a.pending??""),g=Math.max(0,a.pos-p.length);let m=g,y=g;const w=g;for(const[k,A]of f){const v=a.src,x=yF(v),E=Tde(v,c);let S=!1;k==="$$"&&m!==w&&(m=w);let M=-1,_=-1,N=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 O=a.push("text_special","",0);O.content=T==="\\)"?")":"(",O.markup=T,a.pos=a.pos+T.length,m=a.pos;return}if(!T)return;if(k==="$$"&&T.includes("$")){let O=0;for(;O<T.length;){const R=Y3(T,O);if(R===-1){const ie=T.slice(O);if(ie){const xe=a.push("text","",0);xe.content=ie,a.pos=a.pos+ie.length,m=a.pos}break}if(R>0&&T[R-1]==="$"||R+1<T.length&&T[R+1]==="$"){const ie=T.slice(O,R+1);if(ie){const xe=a.push("text","",0);xe.content=ie,a.pos=a.pos+ie.length,m=a.pos}O=R+1;continue}const W=T.slice(O,R);if(W){const ie=a.push("text","",0);ie.content=W,a.pos=a.pos+W.length,m=a.pos}const z=My(T,R+1);if(z===-1){const ie=T.slice(R),xe=a.push("text","",0);xe.content=ie,a.pos=a.pos+ie.length,m=a.pos;break}const G=T.slice(R+1,z),K=G.includes("`"),H=!G||!G.trim(),q=T[z+1],X=Iy(G,q),ee=Ey(G);if(!K&&!H&&!X&&!ee){const ie=a.push("math_inline","math",0);ie.content=Va(G,t),ie.markup="$",ie.raw=`$${G}$`,ie.loading=!1,a.pos=a.pos+(z-R+1),m=a.pos,O=z+1;continue}const ue=a.push("text","",0);ue.content="$",a.pos=a.pos+1,m=a.pos,O=R+1}return}const $=T.indexOf("![");if($!==-1){if($>0){const W=T.slice(0,$),z=a.push("text","",0);z.content=W,a.pos=a.pos+W.length,m=a.pos}const O=T.slice($).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(O){const[,W,z]=O,G=z.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),K=G?G[1]:z,H=G&&G[2]?G[2]:null,q=a.push("image","img",0);q.attrs=[["src",K],["alt",W]],H&&q.attrs.push(["title",H]),q.content=W,q.children=[{type:"text",content:W,tag:""}],a.pos=a.pos+O[0].length,m=a.pos;const X=T.slice($+O[0].length);X&&D(X);return}const R=a.push("text","",0);R.content=T,a.pos=a.pos+T.length,m=a.pos;return}const P=a.push("text","",0);P.content=T,a.pos=a.pos+T.length,m=a.pos};for(;!(m>=v.length);){const T=v.indexOf(k,m);if(T===-1)break;if(Ip(v,T)){m=T+Math.max(1,k.length);continue}const $=qm(x,T);if($){m=$[1];continue}const P=qm(E,T);if(P){m=P[1];continue}if(T===M&&m===_){if(N++,N>2){m=T+Math.max(1,k.length);continue}}else N=0,M=T,_=m;if(k==="("&&T>0){let X=T-1;for(;X>=0&&v[X]===" ";)X--;if(X>=0&&v[X]==="]"){m=T+k.length;continue}}if(k==="$"&&T>0&&v[T-1]==="$"){m=T+1;continue}if(k==="$"&&T<v.length-1&&v[T+1]==="$"){m=T+2;continue}const O=k==="$"?My(v,T+k.length):sde(v,T+k.length,k,A);if(O===-1){const X=v.slice(T+k.length);if(X.includes(k)){m=v.indexOf(k,T+k.length);continue}if(O===-1){const ee=k==="$"&&Dde(X);if(c&&!u&&!ee&&ou(X)&&!X.includes("`")){if(m=T+k.length,S=!0,!l){a.pending="";const ue=y?v.slice(y,m):v.slice(0,m),ie=yx(ue)%2===1;if(y)D(v.slice(y,m));else{let xe=v.slice(0,m);xe.endsWith(k)&&(xe=xe.slice(0,xe.length-k.length)),D(xe)}if(ie){const xe=bx(ue)?.marker??"**",ce=a.push("strong_open","",0);ce.markup=xe;const pe=a.push("math_inline","math",0);pe.content=Va(X,t),pe.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",pe.raw=`${k}${X}${A}`,pe.loading=!0,ce.content=X,a.push("strong_close","",0)}else{const xe=a.push("math_inline","math",0);xe.content=Va(X,t),xe.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",xe.raw=`${k}${X}${A}`,xe.loading=!0}a.pos=v.length}m=v.length,y=m}break}}const R=v.slice(T+k.length,O),W=R.includes("`"),z=!R||!R.trim(),G=k==="$",K=v[O+A.length],H=G&&Iy(R,K),q=G&&Ey(R);if(u?W||z||H||q:W||z||H||q||!G&&!ou(R)){m=O+A.length;const X=v.slice(a.pos,m);a.pending||(D(X),y=m);continue}if(S=!0,!l){const X=v.slice(a.pos-(a.pending??"").length,T);let ee=v.slice(0,m)?v.slice(y,T):X;const ue=yx(ee)%2===1;T!==a.pos&&ue&&(ee=a.pending+v.slice(a.pos,T));const ie=ue?bx(ee):null,xe=ie?.marker??"**";if(a.pending!==ee)if(a.pending="",ue)if(ie){const ce=ee.slice(ie.index+xe.length);D(ee.slice(0,ie.index));const pe=a.push("strong_open","",0);pe.markup=xe;const Ne=a.push("text","",0);Ne.content=ce,a.push("strong_close","",0)}else D(ee);else D(ee);if(ue){const ce=a.push("strong_open","",0);ce.markup=xe;const pe=a.push("math_inline","math",0);pe.content=Va(R,t),pe.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",pe.raw=`${k}${R}${A}`,pe.loading=!1;const Ne=v.slice(O+A.length).startsWith(xe);return Ne&&a.push("strong_close","",0),a.pos=d(v,O+A.length),m=a.pos,y=m,Ne||a.push("strong_close","",0),!0}else{const ce=a.push("math_inline","math",0);ce.content=Va(R,t),ce.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",ce.raw=`${k}${R}${A}`,ce.loading=!1}}return m=d(v,O+A.length),y=m,a.pos=m,!0}if(S){if(l)a.pos=m;else{if(k==="$$"&&m<v.length&&v.slice(m).includes("$")){let T=m;for(;!(T>=v.length);){const $=Y3(v,T);if($===-1)break;if($+1<v.length&&v[$+1]==="$"){T=$+2;continue}if($>0&&v[$-1]==="$"){T=$+1;continue}const P=My(v,$+1);if(P===-1)break;const O=v.slice($+1,P),R=O.includes("`"),W=!O||!O.trim(),z=v[P+1],G=Iy(O,z),K=Ey(O);if(!R&&!W&&!G&&!K){const H=v.slice(m,$);H&&D(H);const q=a.push("math_inline","math",0);q.content=Va(O,t),q.markup="$",q.raw=`$${O}$`,q.loading=!1,m=P+1,T=P+1}else D("$"),T=$+1}T<v.length&&D(v.slice(T))}else m<v.length&&D(v.slice(m));a.pos=v.length}return!0}}return!1},s=(r,l,a,u)=>{const c=r,d=!c?.env?.__markstreamFinal,f=t?.strictDelimiters,p=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],g=c.bMarks[l]+c.tShift[l];let m=c.src.slice(g,c.eMarks[l]).trim(),y=!1,w="",k="",A=!1,v="",x=!1;for(const[H,q]of p)if(m.startsWith(H))if(H.includes("[")){const X=H==="\\["?m.slice(H.length):"";if(H==="\\["&&Pd(X,q)===-1&&!/^\s*!\[/.test(X)&&!X.includes("`")&&ou(X)){y=!0,w=H,k=q;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(l+1<a){y=!0,w=H,k=q;break}continue}}else if(m.replace("\\","")==="["){if(l+1<a){y=!0,w=H,k=q;break}continue}else{const ee=c.tokens[c.tokens.length-1];if(ee&&ee.type==="list_item_open"&&ee.mark==="-"&&m.slice(H.length,m.indexOf("]")).trim()==="x")continue;if(m.replace("\\","").startsWith("[")&&!m.includes("](")){const ue=m.indexOf("]");if(m.slice(ue).trim()!=="]")continue;const ie=m.slice(H.length,ue);if(H==="["?kx(ie):ou(ie)){y=!0,w=H,k=q;break}continue}}}else{y=!0,w=H,k=q;break}else if((H==="$$"||H==="\\[")&&m.endsWith(H)&&l+1<a){const X=gb(m,H,q);if(X===-1)continue;v=sp(m.slice(0,X)),x=!0;const ee=c.bMarks[l+1]+c.tShift[l+1];m=c.src.slice(ee,c.eMarks[l+1]).trim(),A=!0,y=!0,w=H,k=q;break}if(!y)return!1;if(u&&!x)return!0;const E=m.indexOf(w),S=E+w.length,M=!f&&w==="["?m.indexOf("\\]",S):-1,_=M>=0?"\\]":k,N=M>=0?M:Pd(m,k,S);if(!A&&N>w.length){const H=m.slice(E+w.length,N),q=c.push("math_block","math",0);q.content=Va(H),q.markup=w==="$$"?"$$":w==="["?"[]":"\\[\\]",q.map=[l,l+1],q.raw=`${w}${H}${_}`,q.block=!0,q.loading=!1,c.line=l+1;const X=m.slice(N+_.length);return X.trim()&&n(c,X,l),!0}let D=l,T="",$=!1,P="",O=l;const R=A?m:m===w?"":m.slice(w.length),W=!f&&w==="\\["?"]":"",z=Pd(R,k);if(z!==-1){const H=z;T=R.slice(0,H),P=R.slice(H+k.length),O=A?l+1:l,$=!0,D=O}else for(R&&!A&&(T=R),D=l+1;D<a;D++){const H=c.bMarks[D]+c.tShift[D],q=c.eMarks[D],X=c.src.slice(H,q),ee=X.trim();if(!f&&w==="["&&ee==="\\]"){k="\\]",$=!0;break}if(W&&X.trim()===W){k=W,$=!0;break}if(ee===k){$=!0;break}else if(!f&&w==="["&&X.includes("\\]")){$=!0;const ue=X.indexOf("\\]");k="\\]";const ie=X.slice(0,ue);ie&&(T+=(T?` +`:"")+ie),P=X.slice(ue+k.length),O=D;break}else if(Pd(X,k)!==-1){$=!0;const ue=Pd(X,k),ie=X.slice(0,ue);ie&&(T+=(T?` +`:"")+ie),P=X.slice(ue+k.length),O=D;break}T+=(T?` +`:"")+X}if((!d||f)&&!$)return!1;const G=/^\s*!\[/.test(T);if(!(x?!G&&J3(T):w==="$$"?!G:w==="["?kx(T):ou(T)))return!1;if(u)return!0;v&&n(c,v,l);const K=c.push("math_block","math",0);return K.content=Va(T),K.markup=w==="$$"?"$$":w==="["?"[]":"\\[\\]",K.raw=`${w}${T}${T.startsWith(` +`)?` +`:""}${k}`,K.map=[l,D+1],K.block=!0,K.loading=!$,c.line=D+1,P.trim()&&n(c,P,O),!0},o=(r,l,a,u)=>{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",i),e.block.ruler.before("lheading","explicit_math_block",o,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function zde(e){const t=e.renderer.rules.image||function(n,i,s,o,r){const l=n,a=r;return a.renderToken?a.renderToken(l,i,s):""};e.renderer.rules.image=(n,i,s,o,r)=>{const l=n;return l[i].attrSet?.("loading","lazy"),t(l,i,s,o,r)},e.renderer.rules.fence=e.renderer.rules.fence||((n,i)=>{const s=n[i],o=String(s.info??"").trim();return`<pre class="${o?`language-${e.utils.escapeHtml(o.split(/\s+/g)[0])}`:""}"><code>${e.utils.escapeHtml(String(s.content??""))}</code></pre>`})}const Ode=/^<a[>\s]/i,Pde=/^<\/a\s*>/i;function jde(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.test(String(e.content??""));let i=0;for(let s=n.length-1;s>=0;s--){const o=n[s];if(o?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==o.level&&n[s]?.type!=="link_open";)s--;continue}if(o?.type==="html_inline"){const r=String(o.content??"");Ode.test(r)&&i>0&&i--,Pde.test(r)&&i++}if(!(i>0)&&o?.type==="text"&&t.test(String(o.content??"")))return!0}return!1}function Hde(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(i=>i.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",i=>{if(!i.md?.options?.linkify)return;const s=Array.isArray(i.tokens)?i.tokens:[],o=i.md.linkify;if(!o)return;const r=s.filter(l=>jde(l,o));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(i)),i,{tokens:r}))})}function Wde(e){const t=e.inline.ruler,n=t.getNamedRules?.(),i=n?.find(l=>l.name==="link")?.fn,s=n?.find(l=>l.name==="image")?.fn;if(typeof i!="function"||typeof s!="function")return;const o=e.validateLink,r=e;r.__markstreamOriginalValidateLink=o,t.at("link",(...l)=>{const a=l[0].md,u=a?.validateLink===o?a.options?.validateLink:a?.validateLink;if(!a||typeof u!="function")return i(...l);const c=a.validateLink;a.validateLink=u;try{return i(...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=o;try{return s(...l)}finally{a.validateLink=u}})}function qde(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},i=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),o=new vue({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:i,...n}});if(!s){const r=l=>!Rc(l,{tagName:"a",attrName:"href"});Rce(r),o.set({validateLink:r})}return Wde(o),Hde(o),(e.enableMath??!0)&&Rde(o,{...e.mathOptions??{}}),(e.enableContainers??!0)&&Rue(o),e.enableFixIndentedCodeBlock!==!1&&rce(o),Hce(o),Kce(o),qce(o),Qce(o),zde(o),sce(o,{customHtmlTags:e.customHtmlTags}),o}function zc(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=>zc(n))),t}function Ude(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function Kde(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,i=n===""||n==="true";return{type:"checkbox_input",checked:i,raw:i?"[x]":"[ ]"}}function Vde(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function V0(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="em_close";){const l=e[o];s+=String(e[o].content??l.text??""),r.push(e[o]),o++}return i.push(...Ki(r,void 0,void 0,n)),{node:{type:"emphasis",children:i,raw:`*${s}*`},nextIndex:o<e.length?o+1:e.length}}function Zde(e,t){return new RegExp(`\r? +[ \\t]*${e}{${t},}[ \\t]*$`)}const CF=["diff ","index ","--- ","+++ ","@@ "],Gde=/\r?\n/;function Qde(e){const t=String(e??"");return t?CF.some(n=>n.startsWith(t)||t.startsWith(n)):!1}function Sx(e,t,n,i){n.length>0&&e.push(...n),i.length>0&&t.push(...i),n.length=0,i.length=0}function Mx(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function Yde(e,t){const n=[],i=[],s=[],o=[],r=e.split(Gde),l=/\r?\n$/.test(e),a=r.some(p=>p.startsWith("diff ")||p.startsWith("--- ")||p.startsWith("+++ ")||p.startsWith("@@ ")),u=p=>{const g=p;if(!CF.some(m=>g.startsWith(m)))if(g.startsWith("-")){const m=g.slice(1);s.push(Mx(m,a))}else if(g.startsWith("+")){const m=g.slice(1);o.push(Mx(m,a))}else{Sx(n,i,s,o);const m=a&&g.startsWith(" ")?g.slice(1):g;n.push(m),i.push(m)}},c=l?Math.max(0,r.length-1):r.length;for(let p=0;p<c;p++){const g=r[p]??"";!t&&!l&&p===c-1&&Qde(g)||u(g)}(t||s.length>0||o.length>0)&&Sx(n,i,s,o);const d=n.join(` +`),f=i.join(` +`);return{original:t&&l&&d?`${d} +`:d,updated:t&&l&&f?`${f} +`:f}}function mb(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},i=typeof n.closed=="boolean"?n.closed:void 0,s=i===!0||i!==!1&&t,o=String(e.info??""),r=o.startsWith("diff"),l=r?(()=>{const u=o,c=u.indexOf(" ");return c===-1?"":String(u.slice(c+1)??"")})():o;let a=String(e.content??"");if(!s&&e.markup){const u=e.markup[0],c=e.markup.length,d=Zde(u,c);d.test(a)&&(a=a.replace(d,""))}if(r){const{original:u,updated:c}=Yde(a,s===!0);return{type:"code_block",language:l,code:String(c??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t,originalCode:u,updatedCode:c}}return{type:"code_block",language:l,code:String(a??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t}}function Jde(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function Xde(){return{type:"hardbreak",raw:`\\ +`}}function efe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="mark_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Ki(r,void 0,void 0,n)),{node:{type:"highlight",children:i,raw:`==${s}==`},nextIndex:o<e.length?o+1:e.length}}let Ty=null;const Ly=new WeakMap;function Ix(){return Ty||(Ty={customTagSet:null,allowedTagSet:Cv()}),Ty}function wF(e){const t=e.match(/^<\s*(?:\/\s*)?([\w-]+)/);return t?t[1].toLowerCase():""}function xF(e){return/^<\s*\//.test(e)}function _F(e,t){return/\/\s*>\s*$/.test(t)||Su.has(e)}function tfe(e){if(!e||e.length===0)return Ix();const t=Ly.get(e);if(t)return t;const n=e.map(Ur).filter(Boolean);if(!n.length){const s=Ix();return Ly.set(e,s),s}const i={customTagSet:new Set(n),allowedTagSet:Cv({customHtmlTags:e})};return Ly.set(e,i),i}function SF(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function nfe(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,i=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof i=="string"?{raw:n,inner:i}:null}function Um(e,t){const n=t.toLowerCase();for(let i=e.length-1;i>=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function ife(e,t,n){const i=e.slice();return Um(i,"href")||i.push(["href",t]),n!=null&&!Um(i,"title")&&i.push(["title",n]),i}function X3(e){return e.map(SF).join("")}function Ng(e){const t=[],n=i=>{const s=String(i??"");if(!s)return;const o=t[t.length-1];if(o?.type==="text"){o.content=`${o.content}${s}`,o.raw=`${o.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const i of e)if(i){if(i.type==="reference"||i.type==="footnote_reference"){n(String(i.raw??""));continue}if("children"in i&&Array.isArray(i.children)){t.push({...i,children:Ng(i.children)});continue}t.push(i)}return t}function sfe(e,t,n){let i=0;for(let s=t;s<e.length;s++){const o=e[s];if(o.type!=="html_inline")continue;const r=String(o.content??""),l=wF(r),a=xF(r),u=_F(l,r);if(!a&&!u&&l===n){i++;continue}if(a&&l===n){if(i===0)return s;i--}}return-1}function Ny(e,t,n){const i=[e[t]];let s=[],o=t+1,r=!1;const l=n?sfe(e,t+1,n):-1;return l!==-1?(s=e.slice(t+1,l),i.push(...s,e[l]),o=l+1,r=!0):(s=e.slice(t+1),s.length&&i.push(...s),o=e.length),{closed:r,html:X3(i),innerTokens:s,nextIndex:o}}function ofe(e,t,n,i,s,o,r){const l=String(e.content??""),a=wF(l),{customTagSet:u,allowedTagSet:c}=tfe(r?.customHtmlTags);if(!a)return[{type:"inline_code",code:l,raw:l},n+1];if(!c.has(a)&&!Ny(t,n,a).closed){const x=SF(e);return[{type:"text",content:x,raw:x},n+1]}if(a==="br")return[{type:"hardbreak",raw:l},n+1];const d=xF(l),f=_F(a,l);if(d)return[{type:"html_inline",tag:a,content:l,children:[],raw:l,loading:!1},n+1];if(a==="a"){const x=Ny(t,n,a),E=yv(l),S=x.innerTokens,M=String(Um(E,"href")??""),_=Um(E,"title"),N=_==null?null:String(_),D=ife(E,M,N),T=Ng(S.length?i(S,s,o,r):[]),$=S.length?X3(S):M||"";return!T.length&&$&&T.push({type:"text",content:$,raw:$}),[{type:"link",href:M,title:N,text:$,attrs:D,children:T,loading:!x.closed,raw:x.html||l},x.nextIndex]}if(f)return[{type:u?.has(a)?a:"html_inline",tag:a,content:l,children:[],raw:l,loading:!1},n+1];const p=Ny(t,n,a);if(a==="p"||a==="div")return[{type:"paragraph",children:Ng(p.innerTokens.length?i(p.innerTokens,s,o,r):[]),raw:p.html},p.nextIndex];const g=Ng(p.innerTokens.length?i(p.innerTokens,s,o,r):[]);let m=p.html||l,y=!p.closed,w=!1;if(!p.closed){const x=`</${a}>`;m.toLowerCase().includes(x.toLowerCase())||(m+=x),w=!0,y=!0}const k=[],A=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let v;for(;(v=A.exec(l))!==null;){const x=v[1],E=v[2]||v[3]||v[4]||"";k.push([x,E])}if(u?.has(a)){const x=nfe(e);return[{type:a,tag:a,attrs:k,content:x?x.inner:p.innerTokens.length?X3(p.innerTokens):"",children:p.innerTokens.length?i(p.innerTokens,s,o,r):[],raw:x?.raw??m,loading:e.loading||y,autoClosed:w},p.nextIndex]}return[{type:"html_inline",tag:a,attrs:k,content:m,children:g,raw:m,loading:y,autoClosed:w},p.nextIndex]}function MF(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=>MF(t)).join(""):String(e.content??"")}function rfe(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>MF(t)).join("")}function Ex(e,t=!1){let n=e.attrs??[],i=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,i=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),o=n.find(d=>d[0]==="alt")?.[1],r=rfe(i??e);let l="";r?l=r:o!=null&&String(o).length>0?l=String(o):i?.content!=null&&String(i.content).length>0?l=String(i.content):Array.isArray(i?.children)&&i.children[0]?.content?l=String(i.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 lfe(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function afe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="ins_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Ki(r,void 0,void 0,n)),{node:{type:"insert",children:i,raw:`++${String(s)}++`},nextIndex:o<e.length?o+1:e.length}}function ufe(e){const t=[];if(!Array.isArray(e))return t;for(const n of e){const i=n?.[0];i&&t.push([String(i),String(n?.[1]??"")])}return t}function Km(e,t){const n=t.toLowerCase();for(let i=e.length-1;i>=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function cfe(e,t,n){const i=e.slice();return Km(i,"href")||i.push(["href",t]),n!=null&&!Km(i,"title")&&i.push(["title",n]),i}function Z0(e,t,n){const i=e[t],s=ufe(i.attrs),o=String(Km(s,"href")??""),r=Km(s,"title"),l=r==null?null:String(r),a=cfe(s,o,l);let u=t+1;const c=[];let d=!0;for(;u<e.length&&e[u].type!=="link_close";)c.push(e[u]),u++;e[u]?.type==="link_close"&&(d=!1);let f=c;const p=c[c.length-1];if(n?.__insideStrong&&p?.type==="text"&&String(p.content??"").endsWith("**")&&!c.some(y=>y.type==="strong_open")){const y=String(p.content??""),w=String(p.raw??y),k=zc(p);k.content=y.slice(0,-2),k.raw=w.replace(/\*\*$/,""),f=c.slice(),f[f.length-1]=k}const g=Ki(f,void 0,void 0,n),m=g.map(y=>{const w=y;return"content"in y?String(w.content??""):String(w.raw??"")}).join("");return{node:{type:"link",href:o,title:l,text:m,children:g,raw:`[${m}](${o}${l?` "${l}"`:""})`,loading:d,attrs:a},nextIndex:u<e.length?u+1:e.length}}function Tx(e){const t=e.content??"",n=e.raw==="$$"?`$${t}$`:e.raw||"";return{type:"math_inline",content:t,loading:!!e.loading,raw:n,markup:e.markup}}function dfe(e){return{type:"reference",id:String(e.content??""),raw:String(e.markup??`[${e.content??""}]`)}}function Lx(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="s_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Ki(r,void 0,void 0,n)),{node:{type:"strikethrough",children:i,raw:`~~${s}~~`},nextIndex:o<e.length?o+1:e.length}}const ffe=/\\([\\()[\]`$|*_\-!])/g;function hfe(e,t){if(!e)return;const n=String(e);if(n&&(n===t||n.replace(ffe,"$1")===t))return n}function Mh(e,t,n,i){const s=[];let o="",r=t+1;const l=[];let a=1;for(;r<e.length;){if(e[r].type==="strong_close"){if(a===1)break;a--}e[r].type==="strong_open"&&a++,o+=String(e[r].content??""),l.push(e[r]),r++}const u={...i,__insideStrong:!0};return s.push(...Ki(l,hfe(n,o),void 0,u)),{node:{type:"strong",children:s,raw:`**${String(o)}**`},nextIndex:r<e.length?r+1:e.length}}function pfe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="sub_close";)s+=String(e[o].content??""),r.push(e[o]),o++;i.push(...Ki(r,void 0,void 0,n));const l=String(e[t].content??""),a=s||l;return{node:{type:"subscript",children:i.length>0?i:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:o<e.length?o+1:e.length}}function gfe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="sup_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Ki(r,void 0,void 0,n)),{node:{type:"superscript",children:i.length>0?i:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:o<e.length?o+1:e.length}}function mfe(e){const t=String(e.content??"");return{type:"text",content:t,raw:t}}const vfe=/[^~]*~{2,}[^~]+/,yfe=/\*\*/,bfe=/[[_*^~]/,kfe=/\\([\\()[\]`$|*_\-!])/g,vb=new Set(["\\","(",")","[","]","`","$","|","*","_","-","!"]),Afe=/\s/u,Cfe=/[!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]/,wfe=/\p{P}/u,xfe=/^[\x22\x27《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,_fe=/^[\x22\x27》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,Sfe=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,Mfe=/:\/\//,e8=1,IF=2,Ife=4,Efe=8,EF=16,Ja=32,Fg=64,Zh=128,TF=256,Tfe=512,Gh=1024,Lfe=1982;function G0(e){let t=0;for(let n=0;n<e.length;n++)switch(e.charCodeAt(n)){case 33:t|=Zh;break;case 36:t|=TF;break;case 40:t|=Gh;break;case 42:t|=IF;break;case 91:t|=Ja;break;case 92:t|=e8;break;case 93:t|=Fg;break;case 95:t|=Ife;break;case 96:t|=EF;break;case 124:t|=Tfe;break;case 126:t|=Efe;break}return t}function Nfe(e){let t=0,n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="*"){n+=2;continue}e[n]==="*"&&t++,n++}return t}function LF(e,t=0){if(!e)return-1;let n=0;for(let i=0;i<e.length;i++){const s=e[i],o=e[i+1];if(s==="\\"&&o&&vb.has(o)){if(o==="*"&&n>=t){n++,i++;continue}n++,i++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function Mu(e){return!!e&&Afe.test(e)}function Iu(e){return!!e&&(Cfe.test(e)||wfe.test(e))}function NF(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&xfe.test(e)}function FF(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&_fe.test(e)}function Ffe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!i||Mu(i)?!1:!(Iu(i)&&!NF(i,n)&&n&&!Mu(n)&&!Iu(n))}function Bfe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!n||Mu(n)?!1:!(Iu(n)&&!FF(n,i)&&i&&!Mu(i)&&!Iu(i))}function $fe(e,t,n=0){let i=n,s=!1;for(;i<t.length;){const o=e?LF(e,i):t.indexOf("*",i);if(o===-1)break;if(Bfe(t,o))return{index:o,sawInvalidClose:s};s=!0,i=o+1}return{index:-1,sawInvalidClose:s}}function Dfe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+2];return!i||Mu(i)?!1:!(Iu(i)&&!NF(i,n)&&n&&!Mu(n)&&!Iu(n))}function Rfe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+2];return!n||Mu(n)?!1:!(Iu(n)&&!FF(n,i)&&i&&!Mu(i)&&!Iu(i))}function zfe(e,t=0){let n=t,i=!1;for(;n<e.length;){const s=e.indexOf("**",n);if(s===-1)break;if(Rfe(e,s))return{index:s,sawInvalidClose:i};i=!0,n=s+2}return{index:-1,sawInvalidClose:i}}function Ofe(e){let t="",n=0;for(;n<e.length;){if(e[n]!=="\\"){t+=e[n],n++;continue}let i=0;for(;n+i<e.length&&e[n+i]==="\\";)i++;const s=e[n+i];if(t+="\\".repeat(Math.floor(i/2)),i%2===1){if(s&&vb.has(s)){t+=s,n+=i+1;continue}t+="\\"}n+=i}return t}function Pfe(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i],o=e[i+1];if(s==="\\"&&o&&vb.has(o)){if(n===t)return i+1;n++,i++;continue}if(n===t)return i;n++}return-1}function jfe(e,t,n){const i=Pfe(e,t);if(i===-1||e[i]!==n)return!1;let s=0;for(let o=i-1;o>=0&&e[o]==="\\";o--)s++;return s%2===1}const Hfe=/[\p{L}\p{N}]/u,Wfe=/^[\p{L}\p{N}]+$/u;function t8(e){return e?Hfe.test(e):!1}function BF(e){return e?Wfe.test(e):!1}function v1(e,t){let n=t;for(;n<e.length&&e[n]==="*";)n++;const i=t>0?e[t-1]:void 0,s=n<e.length?e[n]:void 0;return{len:n-t,prev:i,next:s,intraword:t8(i)&&t8(s)}}function qfe(e){const t=[];for(let n=0;n<e.length;){if(e[n]!=="*"){n++;continue}const i=v1(e,n),s=n+i.len;i.len>=2&&i.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n<t.length-1;n++){const i=t[n],s=t[n+1];if(!BF(e.slice(i.end,s.start)))return s.end}return-1}function Ufe(e){return!!e&&e.trim()===e&&/^[\p{L}\p{N}\s]+$/u.test(e)}function Kfe(e,t){let n=t;for(;n<e.length;){const i=e.indexOf("***",n);if(i===-1)return-1;const s=v1(e,i);if(s.len>=3)return i;n=i+s.len}return-1}function Vfe(e){return e?Sfe.test(e)||Mfe.test(e):!1}function Zfe(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function Ki(e,t,n,i){if(!e||e.length===0)return[];const s=i?.__linkifyDemotionContext,o=Mp(t),r={filename:s?.filename||o.filename,explicitFilename:s?.explicitFilename||o.explicitFilename,marketTicker:s?.marketTicker||o.marketTicker};(r.filename||r.explicitFilename||r.marketTicker)&&(i={...i,__linkifyDemotionContext:r});const l=i,a=[];let u=null,c=0;const d=i?.requireClosingStrong,f=e;function p(){return e===f&&(e=e.slice()),e}function g(){u=null}function m(te,ye){const j=e.length===1?t:String(ye.content??""),Y=[],ve=qfe(te);if(ve!==-1){x(te.slice(0,ve),te.slice(0,ve));const se=te.slice(ve);return se&&(D({type:"text",content:se,raw:se}),c--),c++,!0}if(vfe.test(te)){const se=te.indexOf("~~");se!==-1&&Y.push({type:"strikethrough",index:se})}if(yfe.test(te)){const se=te.indexOf("**");se!==-1&&Y.push({type:"strong",index:se})}if(/[^*]*\*[^*]+/.test(te)){const se=j?LF(j,0):te.indexOf("*");if(j&&se===-1)return!1;se!==-1&&Y.push({type:"emphasis",index:se})}Y.sort((se,U)=>se.index!==U.index?se.index-U.index:se.type===U.type?0:se.type==="strong"?-1:U.type==="strong"?1:0);const re=Y[0];if(!re)return!1;if(re.type==="strikethrough"){const se=re.index,U=se>-1?te.slice(0,se):"";if(U&&x(U,U),se===-1)return c++,!0;const J=te.indexOf("~~",se+2),de=J===-1?te.slice(se+2):te.slice(se+2,J),me=J===-1?"":te.slice(J+2),{node:Ie}=Lx([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:de,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,i);return g(),v(Ie),me&&(D({type:"text",content:me,raw:me}),c--),c++,!0}if(re.type==="strong"){const se=re.index,U=se>-1?te.slice(0,se):"";if(U&&x(U,U),se===-1)return c++,!0;if(t&&se===0){let ke=!1,Le=0;for(;Le<te.length&&te[Le]==="*";)Le++;if(t.startsWith("\\*")&&(ke=!0),ke){let it=0,Fe=0;for(;Fe<t.length&&it<Le;)if(t[Fe]==="\\"&&Fe+1<t.length&&t[Fe+1]==="*")it+=1,Fe+=2;else{if(t[Fe]==="*")break;Fe++}if(it>=2)return x(te,te),c++,!0}}if(t&&(te.match(/\*/g)||[]).length>Nfe(t))return x(te.slice(U.length),te.slice(U.length)),c++,!0;const J=v1(te,se);if(J.len>=3){const ke=Kfe(te,se+J.len);if(ke!==-1){const Le=te.slice(se+J.len,ke);if(Ufe(Le)){const{node:it}=Mh([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Le,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,i);g(),v(it);const Fe=te.slice(ke+3);return Fe&&(D({type:"text",content:Fe,raw:Fe}),c--),c++,!0}}}if(!Dfe(te,se)){const ke=te.slice(se,se+J.len);x(ke,ke);const Le=te.slice(se+J.len);return Le&&(D({type:"text",content:Le,raw:Le}),c--),c++,!0}const de=zfe(te,se+2);let me="",Ie="";if(de.index!==-1){me=te.slice(se+2,de.index),Ie=te.slice(de.index+2);const ke=de.index,Le=v1(te,ke);if(J.intraword&&Le.intraword&&!BF(me)||!me&&J.len>=4&&J.intraword)return x(te.slice(U.length),te.slice(U.length)),c++,!0}else{if(d||de.sawInvalidClose||J.intraword)return x(te.slice(U.length),te.slice(U.length)),c++,!0;me=te.slice(se+2),Ie=""}if(!me&&/^\*+$/.test(Ie))return x(te,te),c++,!0;const{node:je}=Mh([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:me,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,i);return g(),v(je),Ie&&(D({type:"text",content:Ie,raw:Ie}),c--),c++,!0}if(re.type==="emphasis"){let se=re.index;se===-1&&(se=0);const U=te.slice(0,se);if(U&&x(U,U),!Ffe(te,se)){x(te[se],te[se]);const ke=te.slice(se+1);return ke&&(D({type:"text",content:ke,raw:ke}),c--),c++,!0}const J=v1(te,se),de=$fe(j,te,se+1),me=de.index,Ie=e[c+1];if(i?.final&&Ie?.type==="em_open"&&me!==-1&&te.slice(se+1,me).trim()!==te.slice(se+1,me)||me===-1&&(de.sawInvalidClose||i?.final||J.intraword||!t8(te[se+1])))return x(te.slice(se),te.slice(se)),c++,!0;const{node:je}=V0([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:me>-1?te.slice(se+1,me):te.slice(se+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,i);if(g(),v(je),me!==-1&&me<te.length-1){const ke=te.slice(me+1);ke&&(D({type:"text",content:ke,raw:ke}),c--)}return c++,!0}return!1}function y(te,ye){if(!te.includes("`"))return!1;const Y=(Ie=>{for(let je=0;je<Ie.length;je++){if(Ie[je]!=="`")continue;let ke=0;for(let Le=je-1;Le>=0&&Ie[Le]==="\\";Le--)ke++;if(ke%2===0)return je}return-1})(te);if(Y===-1)return!1;let ve=1;for(let Ie=Y+1;Ie<te.length&&te[Ie]==="`";Ie++)ve++;const re="`".repeat(ve),se=Y+ve,U=te.indexOf(re,se);if(U===-1){if(ve===1){const je=te.slice(0,Y),ke=te.slice(Y+1);return je&&(m(je,ye)?c--:x(je,je)),k({type:"inline_code",code:ke,raw:String(ke)}),c++,!0}let Ie=te;for(let je=c+1;je<e.length;je++)Ie+=String((e[je].content??"")+(e[je].markup??""));return c=e.length-1,x(Ie,Ie),c++,!0}g();const J=te.slice(0,Y),de=te.slice(Y+ve,U),me=te.slice(U+ve);return J&&(m(J,ye)?c--:x(J,J)),k({type:"inline_code",code:de,raw:String(de??"")}),me&&(D({type:"text",content:me,raw:me}),c--),c++,!0}function w(te){const ye=l?.__markdownIt;if(!ye||e.length<=1||!e.some(re=>re?.type==="math_inline")||!bfe.test(te))return null;const j=ye.parseInline(te,{__markstreamFinal:!!i?.final});if(!Array.isArray(j)||j.length===0)return null;const Y=(j.find(re=>re?.type==="inline")?.children??[]).filter(re=>!(re?.type==="text"&&String(re.content??"")===""));if(!Y.length||!Y.some(re=>re?.type!=="text")||Y.length===1&&Y[0]?.type==="text"&&String(Y[0].content??"")===te)return null;const ve=Ki(Y,te,n,i);return ve.length?ve:null}function k(te){g(),a.push(te)}function A(te){g();const ye=zc(te);a.push(ye)}function v(te){k(te)}function x(te,ye){u?(u.content+=te,u.raw+=ye??te):(u={type:"text",content:String(te??""),raw:String(ye??te??"")},a.push(u))}function E(te,ye){if(!te)return;const j=Ki([{...ye,type:"text",content:te,raw:te}],te,n,i);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)v(Y)}function S(te,ye){return String(te.markup??"").startsWith(ye)}function M(te){if(!u||te.loading!==!0||te.markup!=="\\(\\)")return;const ye=e[c-1];!ye||ye.type!=="text"||!S(ye,"\\(")||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 _(te){return te.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 N(te,ye,j=G0(te)){let Y=te;const ve=String(ye.content??"");return(j&e8)!==0&&Y.endsWith("\\")&&!S(ye,"\\\\")&&!ve.endsWith("\\\\")&&(Y=Y.slice(0,-1)),(j&Gh)!==0&&Y.endsWith("(")&&!S(ye,"\\(")&&!ve.endsWith("\\(")&&(Y=Y.slice(0,-1)),(j&IF)!==0&&/\*+$/.test(Y)&&!S(ye,"\\*")&&!ve.endsWith("\\*")&&(Y=Y.replace(/\*+$/,"")),Y}for(;c<e.length;){const te=e[c];D(te)}function D(te){switch(te.type){case"text":$(te);break;case"softbreak":u?(u.content+=` +`,u.raw+=` +`):(u={type:"text",content:` +`,raw:` +`},a.push(u)),c++;break;case"code_inline":v(lfe(te)),c++;break;case"html_inline":{const[ye,j]=ofe(te,e,c,Ki,t,n,i);v(ye),c=j;break}case"link_open":P(te);break;case"image":ee(te)||(g(),v(Ex(te)),c++);break;case"strong_open":{g();const{node:ye,nextIndex:j}=Mh(e,c,te.content,i);v(ye),c=j;break}case"em_open":{g();const{node:ye,nextIndex:j}=V0(e,c,i);v(ye),c=j;break}case"s_open":{g();const{node:ye,nextIndex:j}=Lx(e,c,i);v(ye),c=j;break}case"mark_open":{g();const{node:ye,nextIndex:j}=efe(e,c,i);v(ye),c=j;break}case"ins_open":{g();const{node:ye,nextIndex:j}=afe(e,c,i);v(ye),c=j;break}case"sub_open":{g();const{node:ye,nextIndex:j}=pfe(e,c,i);v(ye),c=j;break}case"sup_open":{g();const{node:ye,nextIndex:j}=gfe(e,c,i);v(ye),c=j;break}case"sub":g(),v({type:"subscript",children:[{type:"text",content:String(te.content??""),raw:String(te.content??"")}],raw:`~${String(te.content??"")}~`}),c++;break;case"sup":g(),v({type:"superscript",children:[{type:"text",content:String(te.content??""),raw:String(te.content??"")}],raw:`^${String(te.content??"")}^`}),c++;break;case"emoji":{g();const ye=e[c-1];ye?.type==="text"&&/\|:-+/.test(String(ye.content??""))?x("",""):v(Vde(te)),c++;break}case"checkbox":g(),v(Ude(te)),c++;break;case"checkbox_input":g(),v(Kde(te)),c++;break;case"footnote_ref":g(),v(Jde(te)),c++;break;case"footnote_anchor":{g();const ye=te.meta??{};k({type:"footnote_anchor",id:String(ye.label??te.content??""),raw:String(te.content??"")}),c++;break}case"hardbreak":g(),v(Xde()),c++;break;case"fence":g(),v(mb(e[c])),c++;break;case"math_inline":M(te),g(),!te.content&&te.markup==="$"&&e[c+1]?.type==="text"&&e[c+2]?.type==="math_inline"?(v(Tx({...te,content:e[c+1].content})),c+=2):v(Tx(te)),c++;break;case"reference":R(te);break;case"text_special":x(String(te.content??""),String(te.content??"")),c++;break;default:{const ye=te;if(te.type==="link"&&ye.href!=null&&i?.validateLink&&!i.validateLink(String(ye.href))){g();const j=String(ye.text??"");x(j,j),c++}else ue(te)||z(te)||K(te)||W(te)||A(te),c++;break}}}function T(te,ye,j,Y,ve=G0(te)){const re=mfe({...ye,content:te});if(u){u.content+=i?.final?re.content:N(re.content,ye,ve),u.raw+=re.raw;return}const se=j?.tag==="br"&&e[c-2]?.content==="[";Y||(re.content=i?.final?re.content:N(re.content,ye,ve)),u=re,u.center=se,a.push(u)}function $(te){const ye=String(te.content??""),j=G0(ye),Y=(j&e8)!==0,ve=e.length===1&&Y&&typeof t=="string"?String(t):"";let re=ve?Ofe(ve):Y?ye.replace(kfe,"$1"):ye;const se=re===ye?j:G0(re);if(te.content==="<"||re==="1"&&e[c-1]?.tag==="br"){c++;return}const U=(se&TF)!==0?re.indexOf("$"):-1;U!==-1&&U===re.lastIndexOf("$")&&re.endsWith("$")&&(re=re.slice(0,-1)),re.endsWith("undefined")&&!t?.endsWith("undefined")&&(re=re.slice(0,-9));let J=a.length,de="";for(let ke=a.length-1;ke>=0;ke--){const Le=a[ke];if(Le.type!=="text")break;J=ke,de=String(Le.content??"")+de}J<a.length&&(re.startsWith(de)?(u=null,a.length=J):u=a[a.length-1]);const me=e[c+1];if((re==="`"||re==="|"||re==="$")&&!S(te,`\\${re}`)||/^\*+$/.test(re)&&!S(te,"\\*")){c++;return}if(!me&&i?.final!==!0&&(se&Gh)!==0&&/[^\]]\s*\(\s*$/.test(re)&&(re=re.replace(/\(\s*$/,"")),!re){c++;return}if((se&(Ja|Zh))===(Ja|Zh)&&X(re)||(se&(Fg|Gh))===(Fg|Gh)&&ie(re))return;if((se&Lfe)===0){T(re,te,e[c-1],me,se),c++;return}if((se&Ja)!==0&&Ne(re))return;const Ie=e[c-1];if((se&Ja)!==0&&re==="["&&!me?.markup?.includes("*")&&!S(te,"\\[")||(se&Fg)!==0&&re==="]"&&!Ie?.markup?.includes("*")&&!S(te,"\\]")){c++;return}if((se&EF)!==0&&y(ye,te)||(se&(Zh|Ja))===(Zh|Ja)&&pe(re)||(se&Ja)!==0&&(e[c+1]?.type!=="link_open"||_(re))&&ce(re,te))return;const je=w(ye);if(je){g();for(const ke of je)v(ke);c++;return}m(re,te)||(T(re,te,Ie,me,se),c++)}function P(te){if(O(te))return;if(xe()){const{node:J,nextIndex:de}=Z0(e,c,i),me=String(J.text||J.href||"");x(me,me),c=de;return}g();const ye=c,{node:j,nextIndex:Y}=Z0(e,c,i);c=Y;const ve=j.text||j.href||"";if(te.markup==="linkify"&&!lF(ve,j.href,t)&&Hm(ve,l?.__linkifyDemotionContext)){x(ve,ve);return}const re=j.children.length===1&&j.children[0]?.type==="text";if(j.loading&&t&&j.text===j.href&&re){const J=Zfe(t,j.href);J&&(j.text=J,j.children=[{type:"text",content:J,raw:J}],j.raw=`[${J}](${j.href}${j.title?` "${j.title}"`:""})`)}if(i?.validateLink&&!i.validateLink(j.href)){x(j.text,j.text);return}const se=te.attrs?.find(([J])=>J==="href")?.[1],U=String(se??"");if(t&&U){const J=t.indexOf("](");if(J!==-1){const de=t.indexOf(")",J+2);de===-1?j.loading=!0:j.loading&&t.slice(J+2,de).includes(U)&&(j.loading=!1)}}/^file:\/\/\/[a-z]:\//i.test(j.href)&&K(j,ye-1)||W(j)||k(j)}function O(te){if(te.markup!=="linkify")return!1;const{node:ye,nextIndex:j}=Z0(e,c,i);return G(ye,j)?(c=j,!0):!1}function R(te){g(),v(dfe(te)),c++}function W(te){if(te.type!=="link")return!1;const ye=a[a.length-1];if(!ye||ye.type!=="text")return!1;const j=String(ye.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!j)return!1;const Y=te,ve=String(Y.href??""),re=String(Y.text??""),se=String(j[2]??""),U=ve.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!ve||!(re===ve||re===U||Vfe(re)))return!1;const J=String(j[1]??"");return J?(ye.content=J,ye.raw=J):a.pop(),k({...te,text:se,children:[{type:"text",content:se,raw:se}],raw:`[${se}](${ve}${Y.title?` "${Y.title}"`:""})`}),!0}function z(te){if(te.type!=="link")return!1;const ye=te,j=String(ye.href??"");return j?G({href:j,title:ye.title==null||ye.title===""?null:String(ye.title),loading:!!ye.loading},c+1):!1}function G(te,ye){const j=a[a.length-1];if(j?.type!=="image"||j.src||!j.loading||!String(j.raw??"").endsWith("]("))return!1;const Y=e[ye],ve=String(Y?.content??"");if(Y?.type!=="text"||!ve.startsWith(")"))return!1;a.pop(),u=null;const re=String(j.alt??"");k({type:"image",src:te.href,alt:re,title:te.title,raw:`![${re}](${te.href}${te.title?` "${te.title}"`:""})`,loading:!!te.loading});const se=ve.slice(1),U=zc(Y);return U.content=se,U.raw=se,p()[ye]=U,!0}function K(te,ye=c-1){if(te.type!=="link")return!1;const j=a[a.length-1],Y=e[ye];if(!j||j.type!=="text"||Y?.type!=="text")return!1;const ve=String(j.content??""),re=String(Y.content??"");if(!ve.endsWith("!")||!re.endsWith("!")||S(Y,"\\!"))return!1;const se=ve.slice(0,-1);se?(j.content=se,j.raw=se,u=j):(a.pop(),u=null);const U=te,J=String(U.text??U.children?.map(Ie=>String(Ie?.content??Ie?.raw??"")).join("")??""),de=String(U.href??""),me=U.title==null||U.title===""?null:String(U.title);return k({type:"image",src:de,alt:J,title:me,raw:`![${J}](${de}${me?` "${me}"`:""})`,loading:!!U.loading}),!0}function H(te,ye="",j=null){const Y=String(te.alt??te.raw??"");return{type:"link",href:ye,title:j,text:Y,children:[te],raw:`[${Y}](${ye}${j?` "${j}"`:""})`,loading:!0}}function q(te){const ye=te.startsWith("![")?te:`![${te}`,j=ye.slice(2),Y=j.indexOf("](");return{type:"image",src:"",alt:Y===-1?j.replace(/\]$/,""):j.slice(0,Y),title:null,raw:ye,loading:!0}}function X(te){const ye=te.indexOf("[![");if(ye===-1||typeof t=="string"&&e.length===1&&jfe(t,ye,"["))return!1;const j=te.slice(0,ye);return j&&x(j,j),k(H(q(te.slice(ye+1)))),c++,!0}function ee(te){if(i?.final)return!1;const ye=e[c-1];if(ye?.type!=="text"||!String(ye.content??"").endsWith("[")||S(ye,"\\["))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,u=j):(a.pop(),u=null)}return k(H(Ex(te))),c++,!0}function ue(te){if(te.type!=="link")return!1;const ye=te,j=String(ye.raw??""),Y=String(ye.text??"");if(!j.startsWith("[![")&&!Y.startsWith("!["))return!1;const ve=ye.title==null||ye.title===""?null:String(ye.title);return k(H({type:"image",src:String(ye.href??""),alt:Y.replace(/^!\[/,"").replace(/\]$/,""),title:ve,raw:j.startsWith("[![")?j.slice(1):j,loading:!0})),!0}function ie(te){if(!te.startsWith("]("))return!1;const ye=e[c-2];if(ye?.type==="text"&&String(ye.content??"").endsWith("[")&&S(ye,"\\["))return!1;const j=a[a.length-1];if(j?.type!=="image"&&j?.type!=="link")return!1;const Y=j,ve=j?.type==="link"&&Array.isArray(Y.children)&&Y.children.length===1&&Y.children[0]?.type==="image"?a.pop():null,re=ve?ve.children[0]:a.pop();if(!re||re.type!=="image")return!1;const se=e[c+1];let U=String(ve?.href??""),J=ve?.title==null?null:String(ve.title),de=!0;if(se?.type==="link_open"){const{node:Ie,nextIndex:je}=Z0(e,c+1,i);U=Ie.href,J=Ie.title,de=!0,c=je}else{if(U=te.slice(2),U.includes('"')){const Ie=U.split('"');U=String(Ie[0]??"").trim(),J=Ie[1]==null?null:String(Ie[1]).trim()}c++}const me=H(re,U,J);return me.loading=de,k(me),!0}function xe(){const te=e[c-3];return e[c-2]?.type==="image"&&e[c-1]?.type==="text"&&String(e[c-1].content??"")==="]("&&te?.type==="text"&&String(te.content??"").endsWith("[")&&S(te,"\\[")}function ce(te,ye){const j=te.indexOf("[");if(j===-1)return!1;let Y=te.slice(0,j);const ve=te.indexOf("](",j);if(ve!==-1){const re=e[c+2];let se=te.slice(j+1,ve);if(se.includes("[")){const ke=se.indexOf("[");Y+=te.slice(0,j+ke+1);const Le=j+ke+1;se=te.slice(Le+1,ve)}const U=e[c+1];if(te.endsWith("](")&&U?.type==="link_open"&&re){const ke=e[c+4];let Le=4,it=!0;if(ke?.type==="text"){const Re=String(ke.content??"");if(Re.startsWith(")")){it=!1;const Ke=Re.slice(1);if(Ke){const ht=zc(ke);ht.content=Ke,ht.raw=Ke,p()[c+4]=ht}else Le++}else Re==="."&&Le++}E(Y,ye);const Fe=String(re.content??"");return i?.validateLink&&!i.validateLink(Fe)?x(se,se):k({type:"link",href:Fe,title:null,text:se,children:[{type:"text",content:se,raw:se}],loading:it}),c+=Le,!0}const J=te.indexOf(")",ve),de=J!==-1?te.slice(ve+2,J):"",me=J===-1;let Ie=Y.match(/\*+$/);if(Ie&&(Y=Y.replace(/\*+$/,"")),E(Y,ye),Ie||(Ie=se.match(/^\*+/)),!d&&Ie){const ke=Ie[0].length;se=se.replace(/^\*+/,"").replace(/\*+$/,"");const Le=[];if(ke===1?Le.push({type:"em_open",tag:"em",nesting:1}):ke===2?Le.push({type:"strong_open",tag:"strong",nesting:1}):ke===3&&(Le.push({type:"strong_open",tag:"strong",nesting:1}),Le.push({type:"em_open",tag:"em",nesting:1})),Le.push({type:"link",href:de,title:null,text:se,children:[{type:"text",content:se,raw:se}],loading:me}),ke===1){Le.push({type:"em_close",tag:"em",nesting:-1});const{node:it}=V0(Le,0,i);v(it)}else if(ke===2){Le.push({type:"strong_close",tag:"strong",nesting:-1});const{node:it}=Mh(Le,0,void 0,i);v(it)}else if(ke===3){Le.push({type:"em_close",tag:"em",nesting:-1}),Le.push({type:"strong_close",tag:"strong",nesting:-1});const{node:it}=Mh(Le,0,void 0,i);v(it)}else{const{node:it}=V0(Le,0,i);v(it)}}else i?.validateLink&&!i.validateLink(de)?x(se,se):k({type:"link",href:de,title:null,text:se,children:[{type:"text",content:se,raw:se}],loading:me});const je=J!==-1?te.slice(J+1):"";return je&&(D({type:"text",content:je,raw:je}),c--),c++,!0}return!1}function pe(te){const ye=te.indexOf("![");if(ye===-1)return!1;const j=te.slice(0,ye);return j&&!u?u={type:"text",content:j,raw:j}:j&&u&&(u.content+=j),u&&(a.push(u),u=null),k(q(te.slice(ye))),c++,!0}function Ne(te){if(!(te?.startsWith("[")&&n?.type==="list_item_open"))return!1;const ye=te.slice(1).match(/[^\s\]]/);if(ye===null)return c++,!0;if(ye&&/x/i.test(ye[0])){const j=ye[0]==="x"||ye[0]==="X";return k({type:"checkbox_input",checked:j,raw:j?"[x]":"[ ]"}),c++,!0}return!1}return a}function yb(e,t,n){const i=n?.__sourceLineMapper;if(!i)return{startLine:e,endLine:t};const s=i(e),o=t>e?i(t-1).endLine:i(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,o)}}function Nx(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let i=0;for(let s=0;s<n;s++)e[s]===` +`&&i++;return i}function Gfe(e,t,n){const i=Math.max(0,Math.min(e.length,Math.trunc(t))),s=Math.max(i,Math.min(e.length,Math.trunc(n))),o=Nx(e,i);let r=Nx(e,s);return s>i&&e[s-1]!==` +`&&r++,{startLine:o,endLine:r}}function op(e,t,n,i){const s=Gfe(e,t,n);return yb(s.startLine,s.endLine,i)}function Qfe(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const i=Number(n[0]),s=Number(n[1]);return!Number.isFinite(i)||!Number.isFinite(s)?null:yb(i,s,t)}function Zn(e,t,n){if(!n?.includeSourceMap)return e;const i=Qfe(t,n);if(!i)return e;if(e.sourceMap=i,e.type==="code_block"){const s=e;s.startLine=i.startLine,s.endLine=i.endLine}return e}function Yfe(e,t,n,i){if(!i?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const o=Number(s[0]),r=Number(s[1]),l=Number(n);return!Number.isFinite(o)||!Number.isFinite(r)||!Number.isFinite(l)||(e.sourceMap=yb(o,Math.max(r,l),i)),e}function Jfe(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??""),r=o.replace(/[ \t\r\n]+$/g,"");if(r===o)break;if(r){s.content=r;break}i.pop();continue}break}}function Xfe(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 i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(o)){i.pop();continue}const r=o.replace(/[ \t\r\n\d.)]+$/g,"");r!==o&&(r?s.content=r:i.pop())}break}}function ehe(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Uf(e,t,n){const i=e[t],s=[],o=ju(n,!0);let r=t+1;for(;r<e.length&&e[r].type!=="bullet_list_close"&&e[r].type!=="ordered_list_close";)if(e[r].type==="list_item_open"){const a=[];let u=r+1;for(;u<e.length&&e[u].type!=="list_item_close";)if(e[u].type==="paragraph_open"){const d=e[u+1],f=ehe(d)?zc(d):d,p=e[u-1];f!==d&&(Xfe(f),Jfe(f));const g=String(f.content??""),m={type:"paragraph",children:Ki(f.children||[],g,p,o.options()),raw:g};n?.includeSourceMap&&Zn(m,e[u],n),a.push(m),o.remember(g),u+=3}else if(e[u].type==="blockquote_open"){const[d,f]=Kf(e,u,o.options());a.push(d),o.remember(d.raw),u=f}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[d,f]=Uf(e,u,o.options());a.push(d),o.remember(d.raw),u=f}else{const d=kb(e,u,o.options(),bb);d?(a.push(d[0]),o.remember(d[0].raw),u=d[1]):u+=1}const c={type:"list_item",children:a,raw:a.map(d=>d.raw).join("")};n?.includeSourceMap&&Zn(c,e[r],n),s.push(c),r=u+1}else r+=1;const l={type:"list",ordered:i.type==="ordered_list_open",start:(()=>{if(i.attrs&&i.attrs.length){const a=i.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&&Zn(l,i,n),[l,r+1]}function the(e,t,n,i){const s=String(n[1]??"note"),o=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=ju(i,!0);let a=t+1;for(;a<e.length&&e[a].type!=="container_close";)if(e[a].type==="paragraph_open"){const u=e[a+1];if(u){const c={type:"paragraph",children:Ki(u.children||[],String(u.content??""),void 0,l.options()),raw:String(u.content??"")};i?.includeSourceMap&&Zn(c,e[a],i),r.push(c),l.remember(c.raw)}a+=3}else if(e[a].type==="bullet_list_open"||e[a].type==="ordered_list_open"){const[u,c]=Uf(e,a,l.options());i?.includeSourceMap&&Zn(u,e[a],i),r.push(u),l.remember(u.raw),a=c}else if(e[a].type==="blockquote_open"){const[u,c]=Kf(e,a,l.options());i?.includeSourceMap&&Zn(u,e[a],i),r.push(u),l.remember(u.raw),a=c}else{const u=bv(e,a,l.options());u?(r.push(u[0]),l.remember(u[0].raw),a=u[1]):a++}return[{type:"admonition",kind:s,title:o,children:r,raw:`:::${s} ${o} +${r.map(u=>u.raw).join(` +`)} +:::`},a+1]}const nhe=new Set(["warning","info","note","tip","danger","caution"]);function ihe(e){let t=0;for(;t<e.length&&t<3&&e[t]===":";)t++;if(t===0||e[t]===":")return null;const n=e.slice(t).trimStart();if(!n)return null;const i=n.search(/\s/),s=(i===-1?n:n.slice(0,i)).toLowerCase();return nhe.has(s)?{kind:s,title:i===-1?"":n.slice(i).trim()}:null}function she(e,t,n){const i=e[t];let s="note",o="";const r=i.type.match(/^container_(\w+)_open$/);if(r){s=r[1];const d=String(i.info??"").trim();if(d&&!d.startsWith(":::")&&d.toLowerCase().startsWith(s)){const f=d.slice(s.length).trim();f&&(o=f)}}else{const d=ihe(String(i.info??"").trim());d&&(s=d.kind,o=d.title)}o||(o=s.charAt(0).toUpperCase()+s.slice(1));const l=[],a=ju(n,!0);let u=t+1;const c=new RegExp(`^container_${s}_close$`);for(;u<e.length&&e[u].type!=="container_close"&&!c.test(e[u].type);)if(e[u].type==="paragraph_open"){const d=e[u+1];if(d){const f=d.children||[];let p=-1;for(let m=f.length-1;m>=0;m--){const y=f[m];if(y.type==="text"&&/:+/.test(y.content)){p=m;break}}const g={type:"paragraph",children:Ki((p!==-1?f.slice(0,p):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&Zn(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]=Uf(e,u,a.options());n?.includeSourceMap&&Zn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else if(e[u].type==="blockquote_open"){const[d,f]=Kf(e,u,a.options());n?.includeSourceMap&&Zn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else{const d=bv(e,u,a.options());d?(l.push(d[0]),a.remember(d[0].raw),u=d[1]):u++}return[{type:"admonition",kind:s,title:o,children:l,raw:`:::${s} ${o} +${l.map(d=>d.raw).join(` +`)} +:::`},u+1]}const ohe=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function rhe(e,t,n){const i=e[t];if(i.type!=="container_open")return null;const s=ohe.exec(String(i.info??""));return s?the(e,t,s,n):null}const bb={parseContainer:(e,t,n)=>she(e,t,n),matchAdmonition:rhe};function Kf(e,t,n){const i=[],s=ju(n,!0);let o=t+1;for(;o<e.length&&e[o].type!=="blockquote_close";){const l=e[o];switch(l.type){case"paragraph_open":{const a=e[o+1],u={type:"paragraph",children:Ki(a.children||[],String(a.content??""),void 0,s.options()),raw:String(a.content??"")};n?.includeSourceMap&&Zn(u,l,n),i.push(u),s.remember(u.raw),o+=3;break}case"bullet_list_open":case"ordered_list_open":{const[a,u]=Uf(e,o,s.options());i.push(a),s.remember(a.raw),o=u;break}case"blockquote_open":{const[a,u]=Kf(e,o,s.options());i.push(a),s.remember(a.raw),o=u;break}default:{const a=kb(e,o,s.options(),bb);a?(i.push(a[0]),s.remember(a[0].raw),o=a[1]):o++;break}}}const r={type:"blockquote",children:i,raw:i.map(l=>l.raw).join(` +`)};return n?.includeSourceMap&&Zn(r,e[t],n),[r,o+1]}function lhe(e){if(e.info?.startsWith("diff"))return mb(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let i=t;n?.[1]&&(i=t.replace(/<antArtifact[^>]*>/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:i,raw:i,loading:!s}}function ahe(e,t,n){const i=[];let s=t+1,o=[],r=[];const l=ju(n,!0);for(;s<e.length&&e[s].type!=="dl_close";)if(e[s].type==="dt_open"){const a=e[s+1];o=Ki(a.children||[],void 0,void 0,l.options()),l.remember(o.map(u=>u.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(r=[];a<e.length&&e[a].type!=="dd_close";)if(e[a].type==="paragraph_open"){const u=e[a+1];r.push({type:"paragraph",children:Ki(u.children||[],String(u.content??""),void 0,l.options()),raw:String(u.content??"")}),l.remember(String(u.content??"")),a+=3}else a++;o.length>0&&(i.push({type:"definition_item",term:o,definition:r,raw:`${o.map(u=>u.raw).join("")}: ${r.map(u=>u.raw).join(` +`)}`}),o=[]),s=a+1}else s++;return[{type:"definition_list",items:i,raw:i.map(a=>a.raw).join(` +`)},s+1]}function uhe(e,t,n){const i=e[t].meta??{},s=String(i?.label??"0"),o=[],r=ju(n,!0);let l=t+1;for(;l<e.length&&e[l].type!=="footnote_close";)if(e[l].type==="paragraph_open"){const a=e[l+1],u=a.children?[...a.children]:[];e[l+2].type==="footnote_anchor"&&u.push(e[l+2]);const c={type:"paragraph",children:Ki(u,String(a.content??""),void 0,r.options()),raw:String(a.content??"")};o.push(c),r.remember(c.raw),l+=3}else l++;return[{type:"footnote",id:s,children:o,raw:`[^${s}]: ${o.map(a=>a.raw).join(` +`)}`},l+1]}function che(e,t,n){const i=e[t],s=i.attrs,o=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(i.tag?.substring(1)??"1"),l=Number.parseInt(r,10),a=e[t+1],u=String(a.content??"");return{type:"heading",level:l,text:u,...o?{attrs:o}:{},children:Ki(a.children||[],u,void 0,n),raw:u}}function dhe(e,t,n){const i=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${i}(?=\s|>|/)`,"i"),o=new RegExp(String.raw`^<\s*\/\s*${i}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l<e.length;){const a=e.indexOf("<",l);if(a===-1)return-1;const u=e.slice(a);if(o.test(u)){const c=is(u);if(c===-1)return-1;if(r===0)return a+c+1;r--,l=a+c+1;continue}if(s.test(u)){const c=is(u);if(c===-1)return-1;const d=u.slice(0,c+1);/\/\s*>$/.test(d)||r++,l=a+c+1;continue}l=a+1}return-1}function $F(e){const t=String(e.content??"");if(/^\s*<!--/.test(t)||/^\s*<!/.test(t)||/^\s*<\?/.test(t))return{type:"html_block",content:t,raw:t,tag:"",loading:!1};const n=(t.match(/^\s*<([A-Z][\w:-]*)/i)?.[1]||"").toLowerCase();if(!n)return{type:"html_block",content:t,raw:t,tag:"",loading:!1};const i=is(t),s=i===-1?t:t.slice(0,i+1),o=i!==-1&&/\/\s*>$/.test(s),r=Su.has(n),l=yv(s),a=(i===-1?-1:dhe(t,n,i+1))!==-1,u=!(r||o||a);return{type:"html_block",content:u?`${t.replace(/<[^>]*$/,"")} +</${n}>`:t,raw:t,tag:n,attrs:l.length?l:void 0,loading:u}}function fhe(e){const t=String(e.content??""),n=e.raw==="$$"?`$$${t}$$`:String(e.raw??"");return{type:"math_block",content:t,loading:!!e.loading,raw:n,markup:e.markup}}function hhe(e){if(!e)return"left";for(const t of e){if(!t)continue;const[n,i]=t;if(!i)continue;const s=String(i).trim().toLowerCase();if(n==="style"){const o=/text-align\s*:\s*(left|right|center)/i.exec(s);if(o)return o[1].toLowerCase()}}return"left"}function DF(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function RF(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return DF(n)?n:void 0}function phe(e,t,n){const i=RF(Mp(t),n);if(!DF(i))return e;const s=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:s?.filename||i?.filename,explicitFilename:s?.explicitFilename||i?.explicitFilename,marketTicker:s?.marketTicker||i?.marketTicker}}}function ghe(e,t,n){let i=t+1,s=null;const o=[];let r=!1;for(;i<e.length&&e[i].type!=="table_close";)if(e[i].type==="thead_open")r=!0,i++;else if(e[i].type==="thead_close")r=!1,i++;else if(e[i].type==="tbody_open"||e[i].type==="tbody_close")i++;else if(e[i].type==="tr_open"){const a=[];let u=i+1,c;for(;u<e.length&&e[u].type!=="tr_close";)if(e[u].type==="th_open"||e[u].type==="td_open"){const f=e[u].type==="th_open",p=e[u+1],g=String(p.content??""),m=hhe(e[u].attrs),y=a.length,w=!f&&!r,k=w?s?.cells[y]?.raw:void 0;a.push({type:"table_cell",header:f||r,children:Ki(p.children||[],g,void 0,phe(n,k,w?c:void 0)),raw:g,align:m}),w&&(c=RF(c,Mp(g))),u+=3}else u++;const d={type:"table_row",cells:a,raw:a.map(f=>f.raw).join("|")};r?s=d:o.push(d),i=u+1}else i++;s||(s={type:"table_row",cells:[],raw:""});const l=e[t].loading===!0;return[{type:"table",header:s,rows:o,loading:l&&!n?.final&&o.length===0,raw:[s,...o].map(a=>a.raw).join(` +`)},i+1]}function mhe(){return{type:"thematic_break",raw:"---"}}let Fy=null;const By=new WeakMap;function Fx(){return Fy||(Fy={allowedTagSet:Cv(),customTagSet:null}),Fy}function vhe(e){if(!e||e.length===0)return Fx();const t=By.get(e);if(t)return t;const n=e.map(Ur).filter(Boolean);if(!n.length){const s=Fx();return By.set(e,s),s}const i={allowedTagSet:Cv({customHtmlTags:e}),customTagSet:new Set(n)};return By.set(e,i),i}function yhe(e,t,n){const i=e[t],s=i.attrs;let o="";const r={};if(s){for(const[p,g]of s)if(p==="class"){const m=g.match(/(?:\s|^)vmr-container-(\S+)/);m&&(o=m[1])}else if(p.startsWith("data-")){const m=p.slice(5);try{r[m]=JSON.parse(g)}catch{r[m]=g}}}const l=[],a=ju(n,!0);let u=t+1;for(;u<e.length&&e[u].type!=="vmr_container_close";)if(e[u].type==="paragraph_open"){const p=e[u+1];if(p){const g={type:"paragraph",children:Ki(p.children||[],void 0,void 0,a.options()),raw:String(p.content??"")};n?.includeSourceMap&&Zn(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[p,g]=Uf(e,u,a.options());n?.includeSourceMap&&Zn(p,e[u],n),l.push(p),a.remember(p.raw),u=g}else if(e[u].type==="blockquote_open"){const[p,g]=Kf(e,u,a.options());n?.includeSourceMap&&Zn(p,e[u],n),l.push(p),a.remember(p.raw),u=g}else{const p=bv(e,u,a.options());p?(l.push(p[0]),a.remember(p[0].raw),u=p[1]):u++}const c=u<e.length&&e[u].type==="vmr_container_close",d=c&&i.meta?.unclosed!==!0||!!n?.final;let f=`::: ${o}`;return Object.keys(r).length>0&&(f+=` ${JSON.stringify(r)}`),f+=` +`,l.length>0&&(f+=i.raw??l.map(p=>p.raw).join(` +`),f+=` +`),f+=":::",[{type:"vmr_container",name:o,loading:!d,attrs:Object.keys(r).length>0?r:void 0,children:l,raw:f},c?u+1:u]}function $y(e,t,n,i){if(n?.type.endsWith("_close")){let s=Array.isArray(n.map)?Number(n.map[1]):NaN;return Number.isFinite(s)||(s=Array.isArray(t.map)?Number(t.map[1])+1:NaN),Yfe(e,t,s,i)}return Zn(e,t,i)}function bhe(e){return e.replace(/^\r?\n/,"").replace(/\r?\n$/,"")}function khe(e,t){if(!e||!t)return e;const n=new RegExp(String.raw`[\t ]*<\s*\/\s*${t}[^>]*$`,"i");return e.replace(n,"")}function Ahe(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${pl(i)}(?=\s|>|/)`,"i"),o=new RegExp(String.raw`^<\s*\/\s*${pl(i)}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l<e.length;){const a=e.indexOf("<",l);if(a===-1)break;const u=e.slice(a);if(o.test(u)){const c=is(u);if(c===-1)return null;if(r===0)return{start:a,end:a+c+1};r--,l=a+c+1;continue}if(s.test(u)){const c=is(u);if(c===-1)return null;const d=u.slice(0,c+1);/\/\s*>$/.test(d)||r++,l=a+c+1;continue}l=a+1}return null}function Che(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=new RegExp(String.raw`<\s*${i}(?=\s|>|/)`,"gi");s.lastIndex=Math.max(0,n||0);const o=s.exec(e);if(!o||o.index==null)return null;const r=o.index,l=e.slice(r),a=is(l);if(a===-1)return null;const u=r+a;if(/\/\s*>\s*$/.test(l.slice(0,a+1))){const g=u+1;return{raw:e.slice(r,g),start:r,end:g}}let c=1,d=u+1;const f=g=>{const m=e.slice(g);return new RegExp(String.raw`^<\s*${i}(?=\s|>|/)`,"i").test(m)},p=g=>{const m=e.slice(g);return new RegExp(String.raw`^<\s*\/\s*${i}(?=\s|>)`,"i").test(m)};for(;d<e.length;){const g=e.indexOf("<",d);if(g===-1)return{raw:e.slice(r),start:r,end:e.length};if(p(g)){const m=e.indexOf(">",g);if(m===-1)return null;if(c--,c===0){const y=m+1;return{raw:e.slice(r,y),start:r,end:y}}d=m+1;continue}if(f(g)){const m=is(e.slice(g));if(m===-1)return null;c++,d=g+m+1;continue}d=g+1}return{raw:e.slice(r),start:r,end:e.length}}function n8(e){return Number.isFinite(e)&&e>0?e:0}function whe(e,t){const n=n8(t);if(!e||n<=0)return 0;let i=0;for(let s=0;s<e.length;s++)if(e[s]===` +`&&(i++,i===n))return s+1;return e.length}function bv(e,t,n){const i=e[t],s=n?.includeSourceMap===!0;switch(i.type){case"heading_open":{const o=che(e,t,n);return s&&Zn(o,i,n),[o,t+3]}case"code_block":{const o=lhe(i);return s&&Zn(o,i,n),[o,t+1]}case"fence":{const o=mb(i);return s&&Zn(o,i,n),[o,t+1]}case"math_block":{const o=fhe(i);return s&&Zn(o,i,n),[o,t+1]}case"html_block":{const o=$F(i),r=o.tag?vhe(n?.customHtmlTags):null;if(o.tag&&o.loading&&r&&!r.allowedTagSet.has(o.tag)){const l=String(i.content??"").replace(/\n+$/,""),a={type:"paragraph",children:l?[{type:"text",content:l,raw:l}]:[],raw:l};return s&&Zn(a,i,n),[a,t+1]}if(o.tag&&r?.customTagSet?.has(o.tag)){const l=o.tag,a=String(n?.__sourceMarkdown??""),u=Number(n?.__customHtmlBlockCursor??0),c=Array.isArray(i.map)?whe(a,Number(i.map?.[0]??0)):0,d=Che(a,l,Math.max(n8(u),n8(c)));d&&n&&(n.__customHtmlBlockCursor=d.end);const f=String(d?.raw??o.raw??""),p=is(f),g=p!==-1?f.slice(0,p+1):f,m=p!==-1&&/\/\s*>\s*$/.test(g),y=p===-1?null:Ahe(f,l,p+1),w=y?.start??-1;let k="";p!==-1&&(w!==-1&&p<w?k=f.slice(p+1,w):k=f.slice(p+1)),w===-1&&(k=khe(k,l));const A=[],v=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let x;for(;(x=v.exec(g))!==null;){const M=x[1];if(!M||M.toLowerCase()===l)continue;const _=x[2]||x[3]||x[4]||"";A.push([M,_])}const E=!n?.final&&!m&&y==null,S={type:l,tag:l,content:bhe(k),raw:String(d?.raw??o.raw??f),loading:E,attrs:A.length?A:void 0};return s&&(d?S.sourceMap=op(a,d.start,d.end,n):Zn(S,i,n)),[S,t+1]}return s&&Zn(o,i,n),[o,t+1]}case"table_open":{const[o,r]=ghe(e,t,n);return s&&Zn(o,i,n),[o,r]}case"dl_open":{const[o,r]=ahe(e,t,n);return s&&Zn(o,i,n),[o,r]}case"footnote_open":{const[o,r]=uhe(e,t,n);return s&&Zn(o,i,n),[o,r]}case"hr":{const o=mhe();return s&&Zn(o,i,n),[o,t+1]}}return null}function kb(e,t,n,i){const s=bv(e,t,n);if(s)return s;const o=e[t],r=n?.includeSourceMap===!0;switch(o.type){case"container_warning_open":case"container_info_open":case"container_note_open":case"container_tip_open":case"container_danger_open":case"container_caution_open":case"container_error_open":if(i?.parseContainer){const l=i.parseContainer(e,t,n);return r&&$y(l[0],o,e[l[1]-1],n),l}break;case"container_open":if(i?.matchAdmonition){const l=i.matchAdmonition(e,t,n);if(l)return r&&$y(l[0],o,e[l[1]-1],n),l}break;case"vmr_container_open":{const l=yhe(e,t,n);return r&&$y(l[0],o,e[l[1]-1],n),l}}return null}function xhe(){return{type:"hardbreak",raw:`\\ +`}}function _he(e,t,n){const i=e[t+1],s=String(i.content??"");return{type:"paragraph",children:Ki(i.children||[],s,void 0,n),raw:s}}const Bx=new WeakMap,zF=new WeakMap,$x=new WeakMap,Dx=new WeakMap;function Il(e,t,n){const i=t?.map,s=n?.__sourceMarkdown;if(!Array.isArray(i)||i.length<2||typeof s!="string"||!n)return;const o=Number(i[0]),r=Number(i[1]);if(!Number.isFinite(o)||!Number.isFinite(r))return;let l=$x.get(n);if(!l){l=[0];for(let a=0;a<s.length;a++)s[a]===` +`&&l.push(a+1);$x.set(n,l)}zF.set(e,{start:l[Math.max(0,Math.trunc(o))]??s.length,end:l[Math.max(0,Math.trunc(r))]??s.length})}const kv=new WeakMap,Rx=new WeakMap,She=["$","\\["],Mhe=/(^|\r?\n)[\t ]*:::[\t ]*(?:warning|info|note|tip|danger|caution|error)(?=[\t ]|\r?\n|$)[^\r\n]*(?:\r?\n[\t ]*)*$/,Ihe=1024,Ehe=16,i8=new WeakMap,y1=new WeakMap,Qh=new WeakMap,The=new Set(["code_inline","em_close","em_open","emoji","hardbreak","html_block","html_inline","image","ins_close","ins_open","link","link_close","link_open","mark_close","mark_open","math_inline","s_close","s_open","softbreak","strong_close","strong_open","sub","sup","text"]),Lhe=new Map([["paragraph_open","paragraph_close"],["heading_open","heading_close"],["bullet_list_open","bullet_list_close"],["ordered_list_open","ordered_list_close"],["blockquote_open","blockquote_close"],["table_open","table_close"]]),Nhe=new Set(["code_block","fence","hr","inline","math_block"]);function tl(){return typeof performance<"u"?performance.now():Date.now()}function gu(e,t,n){e&&(e[t]=(e[t]??0)+n)}function OF(e){return e.__timing}function PF(e,t,n){return t&&gu(t,"parseMarkdownToStructureTotalMs",tl()-n),e}function jF(e,t){const n=t.postTransformNodes;if(typeof n!="function")return e;const i=n(e);return Array.isArray(i)?i:e}function zx(e,t,n,i){return PF(jF(e,t),n,i)}function jd(e,t,n){if(!n)return Yx(e,t);gu(n,"processTokensInputTokens",e.length);const i=tl(),s=Yx(e,t);return gu(n,"processTokensMs",tl()-i),s}function HF(e,t){return e.every(n=>{if(!The.has(n.type)||(n.type==="link"||n.type==="link_open"||n.type==="link_close")&&!zce(t))return!1;if(n.type==="link"){const s=Dce(n);if(s!=="explicit"&&s!=="linkify"&&s!=="autolink")return!1}if(n.type==="link_open"||n.type==="link_close"){const s=n.markup??"";if(s!==""&&s!=="linkify"&&s!=="autolink")return!1}const i=n.children;return!Array.isArray(i)||HF(i,t)})}function Fhe(e){const t=Lhe.get(e);if(t)return t;const n=/^container_(.+)_open$/.exec(e);return n?`container_${n[1]}_close`:void 0}function Bhe(e,t){const n=[];let i=!1,s=0;for(;s<e.length;){const o=e[s];if(!o||o.level!==0)return null;const r=Fhe(o.type);let l=s+1;if(r){if(o.nesting!==1)return null;for(;l<e.length;){const a=e[l];if(a.level===0){if(a.type!==r||a.nesting!==-1)return null;l++;break}l++}if(e[l-1]?.type!==r)return null;if(o.type==="paragraph_open"||o.type==="heading_open"){if(l!==s+3||e[s+1]?.type!=="inline")return null}else i=!0}else if(Nhe.has(o.type)){if(o.nesting!==0)return null;i=!0}else return null;for(let a=s;a<l;a++){const u=e[a];if(u.type!=="inline")continue;const c=u.children;if(!Array.isArray(c)||!HF(c,t))return null}n.push(s),s=l}return{mixed:i,starts:n}}function $he(e){return/\r?\n[\t ]*\r?\n[\t ]*$/.test(e)}function Dhe(e){return e.__reuseStableTopLevelNodes===!0&&e.final!==!0&&!e.preTransformTokens&&!e.postTransformTokens&&!e.postTransformNodes&&!e.customHtmlTags?.length&&e.includeSourceMap!==!0}function Ox(e,t,n,i,s,o){const r=i.starts;if(r.length===0||s.length!==r.length){y1.delete(e);return}const l=r.map((a,u)=>{const c=r[u+1]??n.length;return{firstToken:n[a],lastToken:n[c-1],tokenCount:c-a}});y1.set(e,{groupBoundaries:l,source:t,nodes:s,stableGroupCount:i.mixed?Math.max(0,r.length-1):$he(t)?r.length:Math.max(0,r.length-1),requireClosingStrong:o.requireClosingStrong,validateLink:o.validateLink})}function Rhe(e,t,n,i){const s=n.length-1;for(let o=0;o<i;o++){const r=n[o],l=n[o+1]??t.length,a=e.groupBoundaries[o];if(!a||a.tokenCount!==l-r)return!1;if(!(a.firstToken===t[r]&&a.lastToken===t[l-1])&&(o>=s||!Hx(a.firstToken,t[r])||!Hx(a.lastToken,t[l-1])))return!1}return!0}function zhe(e,t,n,i,s){const o=e,r=i.__disableStructuredReuse===!0;if(!(Ab(e,i)&&Dhe(i)))return r||y1.delete(o),jd(n,i,s);if(r)return jd(n,i,s);const l=Bhe(n,i.validateLink);if(!l)return y1.delete(o),jd(n,i,s);const a=l.starts,u=y1.get(o),c=Qh.get(o),d=u&&l.mixed?Math.min(u.stableGroupCount,Math.max(0,u.groupBoundaries.length-1)):u?.stableGroupCount??0;if(u&&d>0&&u.requireClosingStrong===i.requireClosingStrong&&u.validateLink===i.validateLink&&t.startsWith(u.source)&&a.length>=d&&(c==="append"||c==="tail")&&Rhe(u,n,a,d)){const p=a[d]??n.length,g=jd(n.slice(p),{...i,__linkifyDemotionSeed:u.nodes.slice(0,d).map(y=>String(y.raw??""))},s),m=a.length-d;if(g.length===m){const y=u.nodes.slice(0,d).concat(g);return gu(s,"processTokensReusedTopLevelNodes",d),Ox(e,t,n,l,y,i),y}}const f=jd(n,i,s);return Ox(e,t,n,l,f,i),f}function Ohe(e){const t=e?.customHtmlTags;if(!Array.isArray(t)||t.length===0)return null;const n=rd(t);return n.length?new Set(n):null}function Phe(e,t){const n=e;let i=Bx.get(n);i||(i=new Map,Bx.set(n,i));const s=t.__markstreamFinal===!0?"final":"streaming";let o=i.get(s);o||(o={},i.set(s,o));for(const r of Object.keys(o))Object.prototype.hasOwnProperty.call(t,r)||delete o[r];return Object.assign(o,t),o}function jhe(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Q0(e,t,n){for(const i of Reflect.ownKeys(e)){const s=Object.getOwnPropertyDescriptor(e,i);if(!s||!("value"in s))continue;const o=Object.getOwnPropertyDescriptor(t,i);o&&(!("value"in o)||o.writable===!1)||(t[i]=wc(s.value,n))}}function wc(e,t=new WeakMap){if(!e||typeof e!="object")return e;const n=e,i=t.get(n);if(i)return i;if(Array.isArray(e)){const r=[];t.set(n,r);for(const l of e)r.push(wc(l,t));return r}if(e instanceof Map){const r=new Map;t.set(n,r);for(const[l,a]of e)r.set(wc(l,t),wc(a,t));return r}if(e instanceof Set){const r=new Set;t.set(n,r);for(const l of e)r.add(wc(l,t));return r}if(e instanceof Date){const r=new Date(e.getTime());return t.set(n,r),r}if(e instanceof RegExp){const r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,t.set(n,r),r}if(typeof URL<"u"&&e instanceof URL){const r=new URL(e.href);return t.set(n,r),Q0(n,r,t),r}if(typeof URLSearchParams<"u"&&e instanceof URLSearchParams){const r=new URLSearchParams(e.toString());return t.set(n,r),Q0(n,r,t),r}if(e instanceof Error){let r;const l=e.constructor;try{r=new l(e.message)}catch{r=new Error(e.message)}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),t.set(n,r),Q0(n,r,t),r}if(typeof Promise<"u"&&e instanceof Promise||typeof Node<"u"&&e instanceof Node)return t.set(n,e),e;if(!jhe(e)){const r=Object.create(Object.getPrototypeOf(e));return t.set(n,r),Q0(n,r,t),r}const s={};t.set(n,s);const o=e;for(const r of Object.keys(o))s[r]=wc(o[r],t);return s}function WF(e,t=!0){if(!t)return zc(e);const n=Object.create(Object.getPrototypeOf(e)),i=new WeakMap;for(const s of Reflect.ownKeys(e)){const o=Object.getOwnPropertyDescriptor(e,s);if(!o)continue;if(!("value"in o)){Object.defineProperty(n,s,o);continue}const r=o.value;let l=r;s==="attrs"&&Array.isArray(r)?l=r.map(a=>[...a]):s==="map"&&Array.isArray(r)?l=[...r]:s==="children"&&Array.isArray(r)?l=r.map(a=>WF(a,t)):t&&r&&typeof r=="object"&&(l=wc(r,i)),Object.defineProperty(n,s,{...o,value:l})}return n}function Px(e,t=!0){return e.map(n=>WF(n,t))}function Ab(e,t){const n=t,i=e.stream,s=t.streamParse??"auto";return n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&(s===!0||s==="auto"&&t.final!==!0)&&i?.enabled===!0&&typeof i.parse=="function"}function Hhe(e,t){const n=t,i=t.streamParse??"auto",s=e.stream;return t.final===!0&&i==="auto"&&n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&s?.enabled===!0&&typeof s.reset=="function"}function Whe(e){kv.delete(e)}function qhe(){return{fenceChar:"",fenceInBlockquote:!1,fenceInList:!1,fenceLen:0,fenceListIndent:0,inDollarMath:!1,inFence:!1,inMath:!1,listContentIndent:null,dollarMathOpenOffset:null,mathOpenOffset:null}}function b1(e){return{...e}}function Uhe(e,t,n,i=Av(t).state){kv.set(e,{explicitBracketMath:i,source:t,key:n,pendingCandidate:n===null&&AF(t)})}function Khe(e){return e.endsWith("$")||e.endsWith("\\")}function Vhe(e){const t=Math.max(e.lastIndexOf(` +`)+1,0),n=e.slice(t).replace(/[\t ]+$/,"");return She.some(i=>n.endsWith(i))}function Zhe(e,t){return t?!!(t.includes("$$")||t.includes("\\[")||e.endsWith("$")&&t[0]==="$"||e.endsWith("\\")&&t[0]==="["||Vhe(e)&&/[\r\n]/.test(t)):!1}function Rl(e,t){let n=t-1,i=0;for(;n>=0&&e[n]==="\\";)i++,n--;return i%2===1}function s8(e){return e===" "||e===" "}function qF(e,t){return t===" "?e+1:e+4-e%4}function Cb(e){let t=0,n=0;for(;t<e.length&&s8(e[t]);)n=qF(n,e[t]),t++;return{index:t,column:n}}function Vf(e){const t=Cb(e);return t.column>3?null:t}function Dy(e){const t=Vf(e);if(!t)return null;const n=t.index,i=e[n];if(i!=="`"&&i!=="~")return null;let s=n;for(;s<e.length&&e[s]===i;)s++;const o=s-n;if(o<3)return null;const r=e.slice(s);return i==="`"&&r.includes("`")?null:{markerChar:i,markerLen:o,rest:r}}function wb(e){const t=Vf(e);if(!t)return null;const n=e.slice(t.index),i=/^(?:[-+*]|\d{1,9}[.)])(?=[\t ]|$)/.exec(n)?.[0];if(!i)return null;let s=t.index+i.length,o=t.column+i.length;if(!s8(e[s]))return null;for(;s<e.length&&s8(e[s]);)o=qF(o,e[s]),s++;return{content:e.slice(s),contentIndent:o}}function xb(e){let t=e,n=!1;for(;;){const i=Vf(t);if(!i)return n?t:null;let s=i.index;if(t[s]!==">")return n?t:null;n=!0,s++,(t[s]===" "||t[s]===" ")&&s++,t=t.slice(s)}}function _b(e){const t=Dy(e);if(t)return{...t,inBlockquote:!1,inList:!1,listIndent:0};const n=xb(e),i=n==null?null:Dy(n);if(i)return{...i,inBlockquote:!0,inList:!1,listIndent:0};const s=wb(e);if(!s)return null;const o=Dy(s.content);return o==null?null:{...o,inBlockquote:!1,inList:!0,listIndent:s.contentIndent}}function UF(e,t){let n=!1,i="",s=0,o=!1,r=!1,l=0,a=null,u=0;for(;u<t;){const c=e.indexOf(` +`,u),d=c===-1||c>=t?t:c,f=e.slice(u,d),p=f.endsWith("\r")?f.slice(0,-1):f,g=Cb(p),m=wb(p);n&&o&&p.trim()&&xb(p)==null&&(n=!1,i="",s=0,o=!1,r=!1,l=0),n&&r&&p.trim()&&g.column<l&&!m&&(n=!1,i="",s=0,o=!1,r=!1,l=0),m?a=m.contentIndent:p.trim()&&a!=null&&g.column<a&&!n&&(a=null);const y=_b(p);if(y&&(n?y.markerChar===i&&y.markerLen>=s&&/^\s*$/.test(y.rest)&&(n=!1,i="",s=0,o=!1,r=!1,l=0):(n=!0,i=y.markerChar,s=y.markerLen,o=y.inBlockquote,r=y.inList||a!=null&&!y.inBlockquote&&g.column>=a,l=y.listIndent||a||0)),c===-1||c>=t)break;u=c+1}return n}function Ghe(e,t){const n=d=>d===" "||d===" ",i=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"||d===":"},s=d=>{if(d[0]!=="<")return null;let f=1;for(;f<d.length&&n(d[f]);)f++;const p=d[f]==="/";if(p)for(f++;f<d.length&&n(d[f]);)f++;const g=f;for(;f<d.length&&i(d[f]);)f++;if(f===g)return null;const m=d.slice(g,f).toLowerCase();if(!VN.has(m))return null;const y=d[f];if(y&&y!==" "&&y!==" "&&y!==">"&&y!=="/")return null;const w=is(d);if(w===-1)return null;let k=w-1;for(;k>=0&&n(d[k]);)k--;return{closing:p,tag:m,selfClosing:!p&&d[k]==="/",after:d.slice(w+1)}},o=(d,f)=>{const p=d.toLowerCase();let g=0;for(;g<p.length;){const m=p.indexOf("</",g);if(m===-1)return!1;for(g=m+2;g<p.length&&n(p[g]);)g++;if(p.startsWith(f,g)){const y=p[g+f.length];if(!y||y===" "||y===" "||y===">")return!0}}return!1},r=[];let l=!1,a=!1,u=!1,c=0;for(;c<t;){const d=e.indexOf(` +`,c),f=d===-1||d>=t?t:d,p=e.slice(c,f),g=p.endsWith("\r")?p.slice(0,-1):p,m=Vf(g);if(m){const y=g.slice(m.index);if(l)l=!y.includes("-->");else if(a)a=!y.includes(">");else if(u)u=!y.includes("?>");else if(y.startsWith("<!--"))l=!y.includes("-->");else if(y.startsWith("<?"))u=!y.includes("?>");else if(y.startsWith("<!"))a=!y.includes(">");else{const w=s(y);if(w)if(w.closing){for(let k=r.length-1;k>=0;k--)if(r[k]===w.tag){r.length=k;break}}else w.selfClosing||o(w.after,w.tag)||r.push(w.tag)}}if(d===-1||d>=t)break;c=d+1}return l||a||u||r.length>0}function Qhe(e,t,n){if(!n?.length)return!1;const i=new Set(rd(n));if(!i.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===":"},o=c=>c===" "||c===" ",r=c=>{if(c[0]!=="<")return null;let d=1;for(;d<c.length&&o(c[d]);)d++;const f=c[d]==="/";if(f)for(d++;d<c.length&&o(c[d]);)d++;const p=d;for(;d<c.length&&s(c[d]);)d++;if(d===p)return null;const g=c.slice(p,d).toLowerCase();if(!i.has(g))return null;const m=c[d];if(m&&m!==" "&&m!==" "&&m!==">"&&m!=="/")return null;const y=c.indexOf(">",d);if(y===-1)return null;let w=y-1;for(;w>=0&&o(c[w]);)w--;return{closing:f,tag:g,selfClosing:!f&&c[w]==="/",after:c.slice(y+1)}},l=(c,d)=>{const f=c.toLowerCase();let p=0;for(;p<f.length;){const g=f.indexOf("</",p);if(g===-1)return!1;for(p=g+2;p<f.length&&o(f[p]);)p++;if(f.startsWith(d,p)){const m=f[p+d.length];if(!m||m===" "||m===" "||m===">")return!0}}return!1},a=[];let u=0;for(;u<t;){const c=e.indexOf(` +`,u),d=c===-1||c>=t?t:c,f=e.slice(u,d),p=f.endsWith("\r")?f.slice(0,-1):f,g=Vf(p);if(g){const m=r(p.slice(g.index));if(m)if(m.closing){for(let y=a.length-1;y>=0;y--)if(a[y]===m.tag){a.length=y;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 Yhe(e,t){const n=Mhe.exec(e);if(!n)return null;const i=n[1]??"",s=n.index+i.length,o=e.indexOf(` +`,s),r=e.slice(s,o===-1?e.length:o);return!Vf(r.endsWith("\r")?r.slice(0,-1):r)||UF(e,s)||Ghe(e,s)||Qhe(e,s,t)?null:`${e.slice(0,n.index)}${i}`}function Sb(e,t,n){let i=t;for(;i<e.length&&e[i]===n;)i++;return i-t}function KF(e,t,n){let i=t;for(;i<e.length;){const s=e.indexOf("`",i);if(s===-1)return-1;const o=Sb(e,s,"`");if(o===n)return s;i=s+o}return-1}function Ry(e){e.inFence=!1,e.fenceChar="",e.fenceLen=0,e.fenceInBlockquote=!1,e.fenceInList=!1,e.fenceListIndent=0}function jx(e,t,n,i,s){let o=0,r=!1;for(;o<e.length;){const l=o;if(t.inMath){if(e.startsWith("\\]",o)&&!Rl(e,l)){i!=null&&s&&n+o+2>i&&(r=!0),t.inMath=!1,t.mathOpenOffset=null,o+=2;continue}o++;continue}if(t.inDollarMath){if(e.startsWith("$$",o)&&!Rl(e,l)){i!=null&&s&&n+o+2>i&&(r=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,o+=2;continue}o++;continue}if(e[o]==="`"&&!Rl(e,l)){const a=Sb(e,o,"`"),u=KF(e,o+a,a);if(u===-1)break;o=u+a;continue}if(e.startsWith("\\[",o)&&!Rl(e,l)){t.inMath=!0,t.mathOpenOffset=n+o,o+=2;continue}if(e.startsWith("$$",o)&&!Rl(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+o,o+=2;continue}o++}return r}function Jhe(e,t){if(!pb(t))return e;const n=t,i=Rx.get(n),s=i?.source===e?i.state:i&&e.startsWith(i.source)?VF(i.state,e.slice(i.source.length),i.source.length-i.state.lineBuffer.length).state:Av(e).state;Rx.set(n,{source:e,state:s});const{context:o}=s,r=o.inMath?o.mathOpenOffset:o.inDollarMath?o.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 ou(l)&&!c?e:e.slice(0,r)}function Xhe(e,t,n,i,s){const o=Cb(e),r=wb(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&xb(e)==null&&Ry(t),t.inFence&&t.fenceInList&&e.trim()&&o.column<t.fenceListIndent&&!r&&Ry(t),r?t.listContentIndent=r.contentIndent:e.trim()&&t.listContentIndent!=null&&o.column<t.listContentIndent&&!t.inFence&&(t.listContentIndent=null),!t.inMath&&!t.inDollarMath){const l=_b(e);if(l)t.inFence?l.markerChar===t.fenceChar&&l.markerLen>=t.fenceLen&&/^\s*$/.test(l.rest)&&Ry(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&&o.column>=t.listContentIndent,t.fenceListIndent=l.listIndent||t.listContentIndent||0);else if(!t.inFence)return jx(e,t,n,i,s)}else return jx(e,t,n,i,s);return!1}function Av(e,t=qhe(),n=null,i=!1,s=0){const o=b1(t);let r=b1(t),l="",a=!1,u=0;for(;u<e.length;){const c=e.indexOf(` +`,u),d=c!==-1,f=d&&c>u&&e[c-1]==="\r"?c-1:d?c:e.length,p=e.slice(u,f);Xhe(p,o,s+u,n,i)&&(a=!0),d?(r=b1(o),l=""):l=p,u=d?c+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:o,lineBuffer:l}}}function VF(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:b1(e.committedContext),context:b1(e.context),lineBuffer:e.lineBuffer+t}}:Av(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function e1e(e,t){if(!pb(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const i=e,s=kv.get(i);if(s?.source===t)return;const o=s?t.startsWith(s.source):!1,r=o&&s?t.slice(s.source.length):"",l=o&&s?VF(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):Av(t),a=l.state,u=o&&s?l.closedOpenMath:!1;if(s&&o&&s.key===null&&s.pendingCandidate===!1&&!u&&!Zhe(s.source,r)&&!Khe(t)){s.source=t,s.explicitBracketMath=a;return}const c=$de(t);(s&&(s&&!o||s.key!==c||u)||!s&&c)&&n.reset(),Uhe(e,t,c,a)}function t1e(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function ZF(e,t){const n=e?.map,i=t?.map;return n===i?!0:!Array.isArray(n)||!Array.isArray(i)?!1:n.length===i.length&&n.every((s,o)=>s===i[o])}function n1e(e,t){const n=e?.attrs,i=t?.attrs;if(n===i)return!0;if(!Array.isArray(n)||!Array.isArray(i)||n.length!==i.length)return!1;for(let s=0;s<n.length;s++){const o=n[s],r=i[s];if(o[0]!==r[0]||o[1]!==r[1])return!1}return!0}function Hx(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.level===t.level&&e.markup===t.markup&&e.content===t.content&&e.info===t.info&&ZF(e,t)&&n1e(e,t)}function zy(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&&ZF(e,t)}function Wx(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function i1e(e){for(let t=0;t+5<e.length;t++)if(Wx(e,t)&&Wx(e,t+3)&&zy(e[t],e[t+3])&&zy(e[t+1],e[t+4])&&zy(e[t+2],e[t+5]))return!0;return!1}function s1e(e,t,n){return pb(e)&&AF(t)&&i1e(n)}function o1e(e){const t=kv.get(e);return typeof t?.key=="string"&&t.key.startsWith("pending:")}function qx(e,t,n,i){const s=e;if(i.customHtmlTags?.length&&(n.__markstreamCustomHtmlTags=i.customHtmlTags),!Ab(e,i)||(e1e(e,t),o1e(e)))return Qh.set(s,"sync"),e.parse(t,n);const o=e.stream.parse(t,Phe(e,n));if(s1e(e,t,o))return e.stream?.reset?.(),Qh.set(s,"sync"),e.parse(t,n);const r=e.stream?.stats?.();if(Qh.set(s,r?.lastMode??"stream"),!t1e(i))return o;const l=OF(i);if(!l)return Px(o,!0);const a=tl(),u=Px(o,!0);return gu(l,"tokenCloneMs",tl()-a),u}function Cv(e){const t=e?.customHtmlTags;if(!Array.isArray(t)||t.length===0)return tp;const n=new Set(tp);for(const i of rd(t))i&&n.add(i);return n}function r1e(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:e.type==="hardbreak"?"<br>":""}function Ux(e){return{type:"paragraph",children:e,raw:e.map(r1e).join("")}}function Kx(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function Vx(e,t){if(e.type!=="paragraph")return null;const n=e.children,i=Array.isArray(n)?n:[];if(i.length===0)return null;const s=Ohe(t);if(!s?.size)return null;let o=-1;for(let c=0;c<i.length;c++){const d=i[c];if(!s.has(String(d?.type??"").toLowerCase()))continue;const f=i.slice(0,c);if(String(d.content??"").trim()&&f.some(p=>p?.type==="hardbreak")){o=c;break}}if(o===-1)return null;const r=i.slice(0,o),l=i[o];if(!l)return null;const a=[];r.length&&a.push(Ux(r)),a.push(l);const u=i.slice(o+1);return u.length&&a.push(Ux(u)),a}function l1e(e){const t=e.trim();if(!t)return null;const n=/^(?:<!doctype\s+html[^>]*>\s*)?<html(?:\s[^>]*)?>/i.test(t),i=/<\/html>\s*$/i.test(t);return!n||!i?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 a1e(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*${pl(t)}\s*>\s*$`,"i").test(n)}const Oy=new Set(["iframe","script","style","textarea","title"]);function Ep(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=f=>{if(e.startsWith("<!--",f)){const A=e.indexOf("-->",f+4);return{closing:!1,end:A===-1?e.length:A+3,selfClosing:!1,tag:""}}if(e.startsWith("<![CDATA[",f)){const A=e.indexOf("]]>",f+9);return{closing:!1,end:A===-1?e.length:A+3,selfClosing:!1,tag:""}}const p=is(e.slice(f));if(p===-1)return null;const g=f+p+1,m=e.slice(f,g);if(/^<\s*[!?]/.test(m))return{closing:!1,end:g,selfClosing:!1,tag:""};let y=m.slice(1).trimStart();const w=y.startsWith("/");w&&(y=y.slice(1).trimStart());const k=y.match(/^([A-Z][\w:-]*)/i);return k?.[1]?{closing:w,end:g,selfClosing:/\/\s*>$/.test(m),tag:k[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},o=(f,p)=>{const g=new RegExp(String.raw`<\s*\/\s*${pl(f)}(?=\s|>)`,"gi");g.lastIndex=p;const m=g.exec(e);if(!m||m.index==null)return null;const y=s(m.index);return y?{start:m.index,end:y.end}:null};let r=-1,l=-1,a=Math.max(0,n);for(;a<e.length;){const f=e.indexOf("<",a);if(f===-1)return null;const p=s(f);if(!p)return null;if(!p.closing&&p.tag===i){r=f,l=p.end-1;break}if(!p.closing&&Oy.has(p.tag)){a=o(p.tag,p.end)?.end??e.length;continue}a=p.end}if(r===-1||l===-1)return null;const u=e.slice(r,l+1);if(Su.has(i)||/\/\s*>$/.test(u))return{raw:u,start:r,end:l+1,closed:!0};if(Oy.has(i)){const f=o(i,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<e.length;){const f=e.indexOf("<",d);if(f===-1)return{raw:e.slice(r),start:r,end:e.length,closed:!1};const p=s(f);if(!p)return null;if(p.closing&&p.tag===i){c--;const g=p.end;if(c===0)return{raw:e.slice(r,g),start:r,end:g,closeStart:f,closed:!0};d=g;continue}if(!p.closing&&p.tag===i){!p.selfClosing&&!Su.has(p.tag)&&c++,d=p.end;continue}if(!p.closing&&Oy.has(p.tag)){d=o(p.tag,p.end)?.end??e.length;continue}d=p.end}return{raw:e.slice(r),start:r,end:e.length,closed:!1}}function u1e(e,t){if(!t)return 0;let n=0,i=0;for(;n<e.length&&i<t.length;){if(e[n]===t[i]){n++,i++;continue}if(e[n]==="\r"||e[n]===` +`){n++;continue}return-1}return i===t.length?n:-1}function c1e(e,t,n){return n?e:`${e.replace(/<[^>]*$/,"")} +</${t}>`}function Zx(e){return e.replace(/\r\n/g,` +`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function d1e(e,t,n){return n?e.includes(n,t)?!0:Zx(e.slice(Math.max(0,t))).includes(Zx(n)):!1}function f1e(e,t){let n=Math.max(0,t);for(;n<e.length&&(e[n]===" "||e[n]===" ");)n++;return e[n]==="\r"?(n++,e[n]===` +`&&n++,n):e[n]===` +`?n+1:t}function Gx(e){if(e.type!=="html_block"||String(e.tag??"").toLowerCase()!=="details")return!1;const t=String(e.raw??e.content??"");return/^\s*<details\b/i.test(t)}function h1e(e){if(e.type!=="html_block")return!1;const t=String(e.raw??e.content??"");return/^\s*<\/details\b/i.test(t)}function GF(e,t){const n=new RegExp(String.raw`<\s*\/\s*${pl(t)}(?=\s|>)`,"gi");let i=-1,s;for(;(s=n.exec(e))!==null;)i=s.index;return i}function QF(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const p1e=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),g1e=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function m1e(e){return/\n\s*\n/.test(e)||g1e.test(e)}function v1e(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(i=>p1e.has(String(i?.type??"").toLowerCase()))||t.some(i=>{if(i?.type!=="html_block")return!1;const s=i;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!m1e(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function y1e(e){const t=[];let n=0;for(;n<e.length;){for(;/\s/.test(e[n]??"");)n++;if(n>=e.length)break;const i=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!i?.[1])return null;const s=Ep(e,i[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function b1e(e,t,n,i){const s=n.customHtmlTags?.join("\0")??"",o=t,r=Dx.get(o),l=r&&r.final===i&&r.customHtmlTags===s&&r.requireClosingStrong===n.requireClosingStrong&&r.validateLink===n.validateLink,a=e.map((u,c)=>l&&r.blocks[c]===u?r.children[c]:gf(u,t,n));return Dx.set(o,{blocks:e,children:a,customHtmlTags:s,final:i,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function k1e(e,t,n,i){return e.map(s=>{if(s?.type!=="html_block")return s;const o=s,r=String(o.tag??"").toLowerCase();if(!r||r==="details"||GN.has(r)||Array.isArray(o.children))return s;const l=String(s.raw??o.content??"");if(!l)return s;const a=is(l);if(a===-1)return s;const u=Ep(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 p=QF(n,i),g=d?null:y1e(f),m=g?b1e(g,t,p,i):gf(f,t,p);return v1e(f,m)?{...s,children:m}:s})}function A1e(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function gf(e,t,n){return e.trim()?JF(e,t,{...n,__disableStreamParse:!0,__disableStructuredReuse:!0}):[]}function C1e(e,t,n){const i=gf(e,t,n),s=i[0];return i.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:i}function w1e(e,t,n){const i=$F({content:e}),s=is(e),o=GF(e,"summary");if(s!==-1&&o!==-1&&o>=s+1){const r=C1e(e.slice(s+1,o),t,n);r.length>0&&(i.children=r)}return i.raw=e,i}function x1e(e,t,n){const i=is(e);if(i===-1)return[];const s=e.slice(i+1);if(!s.trim())return[];const o=Ep(s,"summary",0);if(!o)return gf(s,t,n);const r=s.slice(0,o.start),l=s.slice(o.end);return[...gf(r,t,n),w1e(o.raw,t,n),...gf(l,t,n)]}function YF(e,t,n,i,s,o=0){const r=[];let l=o;for(let a=0;a<e.length;a++){const u=e[a],c=k1(u);let d=-1;if(c&&(d=t.indexOf(c,l),d!==-1&&(l=d+c.length)),!Gx(u)){r.push(u);continue}const f=String(u.raw??k1(u)??""),p=d!==-1?d:t.indexOf(f,Math.max(0,l-f.length));if(p===-1){r.push(u);continue}let g=1,m=-1;for(let K=a+1;K<e.length;K++){const H=e[K];if(Gx(H)){g++;continue}if(h1e(H)&&(g--,g===0)){m=K;break}}const y=Ep(t,"details",p),w=m===-1&&y?.closed===!0,k=w?(()=>{const K=GF(f,"details");return K!==-1?f.slice(0,K):f})():f,[A]=YF(w?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,i,s,p+f.length),v=x1e(k,n,QF(i,s)),x=m===-1?"</details>":String(e[m].raw??k1(e[m])??"</details>"),E=w||m!==-1&&y?.closed===!0,S=x.replace(/[\t\r\n ]+$/,""),M=E?(()=>{const K=(y?.raw??"").lastIndexOf(S);return K===-1?t.length:p+K})():t.length,_=is(f),N=w&&_!==-1?p+_+1:p+f.length,D=t.slice(N,M===-1?t.length:M),T=n.parse(D,{__markstreamFinal:s}),$=n.renderer.render(T,n.options,{__markstreamFinal:s}),P=M+S.length,O=E?Math.max(M+x.length,f1e(t,P)):t.length,R=E?t.slice(M,O):x,W=E?t.slice(p,O):t.slice(p),z=w&&_!==-1?f.slice(0,_+1):f,G={...u,tag:"details",attrs:yv(f.slice(0,_+1)),raw:W,content:`${z}${$}${R}`,children:[...v,...A],loading:!s&&!E};if(i.includeSourceMap&&(G.sourceMap=op(t,p,E?O:t.length,i)),r.push(G),l=E?O:t.length,m===-1&&!w)break;m!==-1&&(a=m)}return[r,l]}function _1e(e,t,n,i){if(!n)return e;const s=e.slice();let o=0;for(let r=0;r<s.length;r++){const l=s[r],a=k1(l),u=a?n.indexOf(a,o):-1;if(l?.type!=="html_block"){u!==-1&&(o=u+a.length);continue}const c=String(l.tag??"").toLowerCase();if(!c)continue;if(c==="details"){u!==-1&&(o=u+a.length);continue}const d=Ep(n,c,u!==-1?u:o);if(!d)continue;o=d.end;const f=String(l.content??a),p=String(l.raw??f),g=u+p.length;if(u!==-1&&d.end<g&&n.slice(u,g)===p){o=g,i?.includeSourceMap&&(l.sourceMap=op(n,u,g,i));continue}const m=c1e(d.raw,c,d.closed),y=!t&&!d.closed,w=f!==m||p!==d.raw||!!l.loading!==y,k=is(d.raw),A=k===-1?"":d.raw.slice(0,k+1),v=A?yv(A):[];if(l.content=m,l.raw=d.raw,l.loading=y,l.attrs=v.length?v:void 0,i?.includeSourceMap&&(l.sourceMap=op(n,d.start,d.end,i)),!w)continue;let x=u1e(d.raw,p);x===-1&&(x=0);const E=r+1;for(;E<s.length;){if(d.closed&&a1e(s[E],c)){s.splice(E,1);continue}const S=k1(s[E]);if(!S)break;const M=d.raw.indexOf(S,x);if(M===-1){if(d1e(n,d.end,S))break;const _=zF.get(s[E]);if(!_)break;if(_.start>=d.start&&_.end<=d.end){s.splice(E,1);continue}break}x=M+S.length,s.splice(E,1)}}return s}function S1e(e){const t=l=>l===" "||l===" "||l===` +`||l==="\r",n=l=>{if(!l||l[0]!=="<"||l.includes(">"))return!1;let a=1;if(a<l.length&&t(l[a])||l.startsWith("<!--")||l.startsWith("<?")||l.startsWith("<!")||l[a]==="/"&&(a++,a<l.length&&t(l[a])))return!1;const u=m=>{const y=m.charCodeAt(0);return y>=65&&y<=90||y>=97&&y<=122},c=m=>{const y=m.charCodeAt(0);return y>=48&&y<=57},d=m=>m==="!"||u(m),f=m=>u(m)||c(m)||m===":"||m==="-",p=m=>u(m)||c(m)||m==="_"||m==="."||m===":"||m==="-",g=p;if(a>=l.length||!d(l[a]))return!1;for(a++;a<l.length&&f(l[a]);)a++;for(;a<l.length;){for(;a<l.length&&t(l[a]);)a++;if(a>=l.length)return!0;if(l[a]==="/"){for(a++;a<l.length&&t(l[a]);)a++;return a>=l.length}if(!p(l[a]))return!1;for(a++;a<l.length&&g(l[a]);)a++;for(;a<l.length&&t(l[a]);)a++;if(a<l.length&&l[a]==="="){for(a++;a<l.length&&t(l[a]);)a++;if(a>=l.length)return!0;const m=l[a];if(m==='"'||m==="'"){for(a++;a<l.length&&l[a]!==m;)a++;if(a>=l.length)return!0;a++}else{for(;a<l.length;){const y=l[a];if(t(y)||y==="<"||y===">"||y==='"'||y==="'"||y==="`")break;a++}if(a>=l.length)return!0}}}return!0},i=(l,a)=>UF(l,a),s=String(e??""),o=s.lastIndexOf("<");if(o===-1||i(s,o))return s;if(o>0){const l=s[o-1],a=l===" "||l===" "||l===` +`||l==="\r",u=s[o-2];if(!a&&!((l==="n"||l==="r")&&u==="\\"))return s}const r=s.slice(o);return r.includes(">")||r.length>1&&(r[1]===" "||r[1]===" "||r[1]===` +`||r[1]==="\r")||!n(r)?s:s.slice(0,o)}function Qx(e,t){if(e===t)return;const n=e.split(/\r?\n/),i=t.split(/\r?\n/),s=[];let o=0;for(let r=0;r<i.length;r++){const l=i[r]??"";if(n[o]===l){s[r]={startLine:o,endLine:o+1},o++;continue}const a=n[o]??"";if(l!==""&&a!==l&&a.startsWith(l)){let p=l,g=-1;for(let m=r+1;m<i.length;m++){if(p+=i[m]??"",p===a){g=m;break}if(!a.startsWith(p))break}if(g!==-1){for(let m=r;m<=g;m++)s[m]={startLine:o,endLine:o+1};o++,r=g;continue}s[r]={startLine:o,endLine:o+1};continue}let u=n[o]??"",c=-1;for(let p=o+1;p<n.length;p++){if(u+=`\\n${n[p]??""}`,u===l){c=p+1;break}if(!l.startsWith(u))break}if(c!==-1){s[r]={startLine:o,endLine:c},o=c;continue}let d=-1;if(l!==""){const p=Math.min(n.length,o+80);for(let g=o;g<p;g++)if(n[g]===l){d=g;break}}if(d!==-1){s[r]={startLine:d,endLine:d+1},o=d+1;continue}const f=Math.min(Math.max(0,n.length-1),Math.max(0,o-1));s[r]={startLine:f,endLine:f+1}}return r=>{const l=Number.isFinite(r)?Math.max(0,Math.trunc(r)):0;if(l<s.length)return s[l]??{startLine:0,endLine:0};const a=s[s.length-1]??{startLine:Math.max(0,n.length-1),endLine:n.length},u=Math.min(n.length,a.endLine+l-s.length);return{startLine:u,endLine:Math.min(n.length,u+1)}}}function M1e(e,t){if(!e||!t.length)return e;const n=new Set(t.map(g=>String(g??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const i=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===":"},o=g=>{if(!g)return!1;if(g[0]===" ")return!0;let m=0;for(let y=0;y<g.length;y++){const w=g[y];if(w===" "){if(m++,m>=4)return!0;continue}if(w===" ")return!0;break}return!1},r=g=>{let m=!1,y=!1;for(let w=0;w<g.length;w++){const k=g[w];if(k==="\\"){w++;continue}if(!y&&k==="'"){m=!m;continue}if(!m&&k==='"'){y=!y;continue}if(!m&&!y&&k===">")return w}return-1},l=g=>{let m=0;for(;m<g.length&&i(g[m]);)m++;const y=g[m];if(y!=="`"&&y!=="~")return null;let w=m;for(;w<g.length&&g[w]===y;)w++;const k=w-m;return k<3?null:{markerChar:y,markerLen:k,rest:g.slice(w)}},a=(g,m)=>{if(o(g))return-1;const y=g.replace(/^[ \t]+/,"");if(!y||y.startsWith(">")||y.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(y))return-1;let w=!1,k=0;for(;k<g.length;){const A=g[k];if(A!=="<"){i(A)||(w=!0),k++;continue}const v=r(g.slice(k));if(v===-1){w=!0,k++;continue}const x=g.slice(k,k+v+1);let E=1;for(;E<x.length&&i(x[E]);)E++;if(E>=x.length){w=!0,k++;continue}const S=x[E];if(S==="!"||S==="?"){w=!0,k+=v+1;continue}if(S==="/"){w=!0,k+=v+1;continue}const M=E;for(;E<x.length&&s(x[E]);)E++;if(E===M){w=!0,k++;continue}const _=x.slice(M,E).toLowerCase(),N=x[E];if(N&&N!==" "&&N!==" "&&N!==">"&&N!=="/"){w=!0,k++;continue}const D=new RegExp(String.raw`<\s*\/\s*${_}\s*>`,"i"),T=/\/\s*>$/.test(x),$=D.test(g.slice(k+v+1)),P=D.test(e.slice(m+k+v+1)),O=/[\r\n]/.test(e.slice(m+k+v+1));if(w&&n.has(_)&&!T&&!$&&(P||O))return k;w=!0,k+=v+1}return-1};let u=!1,c="",d=0,f="",p=0;for(;p<e.length;){const g=e.indexOf(` +`,p),m=g!==-1,y=m&&g>p&&e[g-1]==="\r",w=m?y?g-1:g:e.length,k=e.slice(p,w),A=m?y?`\r +`:` +`:"",v=l(k);let x=k;if(!u&&!v){const E=a(k,p);if(E!==-1){const S=A||` +`;x=`${k.slice(0,E).replace(/[ \t]+$/,"")}${S}${S}${k.slice(E).replace(/^[ \t]+/,"")}`}}f+=x,f+=A,v&&(u?v.markerChar===c&&v.markerLen>=d&&/^\s*$/.test(v.rest)&&(u=!1,c="",d=0):(u=!0,c=v.markerChar,d=v.markerLen)),p=m?g+1:e.length}return f}function I1e(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const i=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==="-"},o=d=>{let f=0;for(;f<d.length&&i(d[f]);)f++;return d.slice(f)},r=d=>{let f=!1,p=!1;for(let g=0;g<d.length;g++){const m=d[g];if(m==="\\"){g++;continue}if(!p&&m==="'"){f=!f;continue}if(!f&&m==='"'){p=!p;continue}if(!f&&!p&&m===">")return g}return-1},l=(d,f,p)=>{const g=p.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let y=m+1;for(;y<d.length&&i(d[y]);)y++;if(y>=d.length||d[y]!=="/"){m=d.indexOf("<",m+1);continue}for(y++;y<d.length&&i(d[y]);)y++;if(y+g.length>d.length){m=d.indexOf("<",m+1);continue}let w=!0;for(let A=0;A<g.length;A++){const v=d[y+A];if((v>="A"&&v<="Z"?String.fromCharCode(v.charCodeAt(0)+32):v)!==g[A]){w=!1;break}}if(!w){m=d.indexOf("<",m+1);continue}let k=y+g.length;if(k<d.length&&s(d[k])){m=d.indexOf("<",m+1);continue}for(;k<d.length&&i(d[k]);)k++;if(k<d.length&&d[k]===">")return!0;m=d.indexOf("<",m+1)}return!1},a=d=>{let f=0;for(;f<d.length&&i(d[f]);)f++;if(f>=d.length||d[f]!=="<")return d;for(f++;f<d.length&&i(d[f]);)f++;if(f>=d.length||d[f]==="/")return d;const p=f;for(;f<d.length&&s(d[f]);)f++;if(f===p)return d;const g=d.slice(p,f).toLowerCase();if(!n.has(g))return d;const m=r(d.slice(f));if(m===-1)return d;const y=f+m;if(l(d,y+1,g))return d;const w=o(d.slice(y+1));return w?`${d.slice(0,y+1)} +${w}`:d};let u="",c=0;for(;c<e.length;){const d=e.indexOf(` +`,c);if(d===-1){u+=a(e.slice(c));break}const f=d>c&&e[d-1]==="\r",p=f?d-1:d,g=e.slice(c,p);u+=a(g),u+=f?`\r +`:` +`,c=d+1}return u}function E1e(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const i=f=>f===" "||f===" ",s=f=>{let p=0,g=!1,m=0;for(;p<f.length;){for(;p<f.length&&i(f[p]);)p++;if(p>=f.length||f[p]!==">")break;for(g=!0,p++;p<f.length&&i(f[p]);)p++;m=p}return g?{prefix:f.slice(0,m),content:f.slice(m)}:null},o=f=>{let p=0;for(;p<f.length&&i(f[p]);)p++;const g=f[p];if(g!=="`"&&g!=="~")return null;let m=p;for(;m<f.length&&f[m]===g;)m++;const y=m-p;return y<3?null:{markerChar:g,markerLen:y,rest:f.slice(m)}},r=Array.from(n).map(f=>new 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(;d<e.length;){const f=e.indexOf(` +`,d),p=f!==-1,g=p&&f>d&&e[f-1]==="\r",m=p?g?f-1:f:e.length,y=e.slice(d,m),w=p?g?`\r +`:` +`:"",k=s(y),A=k?.prefix??"",v=k?.content??y,x=o(v);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 E=v;if(!l&&E.includes("</"))for(const S of r)E=E.replace(S,(M,_,N,D)=>{if(D.replace(/^[\t ]+/,"").startsWith("|"))return M;const T=D.slice(0,N).replace(/^[\t ]+/,"");if(T.length>0){const $=_.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",P=T.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!$||!P||$!==P)return M}return`${_} + +`});if(A){const S=A+E.split(` +`).join(` +${A}`);c+=S}else c+=E;c+=w,d=p?f+1:e.length}return c}function T1e(e,t){if(!e||!t.length)return e;const n=new Set(t.map(T=>String(T??"").toLowerCase()));if(!n.size)return e;const i=T=>T===" "||T===" ",s=T=>{if(!T)return!1;if(T[0]===" ")return!0;let $=0;for(let P=0;P<T.length;P++){const O=T[P];if(O===" "){if($++,$>=4)return!0;continue}if(O===" ")return!0;break}return!1},o=T=>{const $=T.charCodeAt(0);return $>=65&&$<=90||$>=97&&$<=122||$>=48&&$<=57||T==="_"||T==="-"||T===":"},r=T=>{let $=0;for(;$<T.length&&i(T[$]);)$++;return T.slice($)},l=T=>{let $=0,P=!1,O=0;for(;$<T.length;){for(;$<T.length&&i(T[$]);)$++;if($>=T.length||T[$]!==">")break;for(P=!0,$++;$<T.length&&i(T[$]);)$++;O=$}if(!P)return null;const R=T.slice(0,O);return{prefix:R,key:R.replace(/[ \t]+$/,""),content:T.slice(O)}},a=T=>r(T).startsWith("<"),u=T=>{for(let $=0;$<T.length;$++){const P=T[$];if(P!==" "&&P!==" ")return!1}return!0},c=T=>{if(s(T))return"";const $=r(T);if(!$.startsWith("<"))return"";let P=1;for(;P<$.length&&i($[P]);)P++;if(P>=$.length||$[P]==="/"||$[P]==="!"||$[P]==="?")return"";const O=P;for(;P<$.length&&o($[P]);)P++;if(P===O)return"";const R=$.slice(O,P).toLowerCase();if(!n.has(R))return"";const W=$[P];return W&&W!==" "&&W!==" "&&W!==">"&&W!=="/"?"":R},d=T=>{if(s(T))return null;const $=r(T);if(!$.startsWith("<"))return null;let P=1;for(;P<$.length&&i($[P]);)P++;if(P>=$.length)return null;const O=$[P]==="/";if(O)for(P++;P<$.length&&i($[P]);)P++;const R=$[P];if(!R||R==="!"||R==="?")return null;const W=P;for(;P<$.length&&o($[P]);)P++;if(P===W)return null;const z=$.slice(W,P).toLowerCase();if(!n.has(z))return null;const G=$[P];if(G&&G!==" "&&G!==" "&&G!==">"&&G!=="/")return null;if(O)return{type:"close",name:z};if(/\/\s*>\s*$/.test($))return{type:"open",name:z,complete:!0};const K=$.indexOf(">",P);if(K!==-1){const H=$.slice(K+1);if(new RegExp(`<\\s*\\/\\s*${z}\\s*>`,"i").test(H))return{type:"open",name:z,complete:!0}}return{type:"open",name:z,complete:!1}},f=T=>{if(s(T))return null;const $=r(T).replace(/[ \t]+$/,"");if(!$.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test($))return null;const P=$.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(P?.[1])return P[1].toLowerCase();const O=$.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!O?.[1]||!O[2])return null;const R=O[1].toLowerCase();return R===O[2].toLowerCase()?R:null};let p=!1,g="",m=0;const y=T=>{let $=0;for(;$<T.length&&i(T[$]);)$++;const P=T[$];if(P!=="`"&&P!=="~")return null;let O=$;for(;O<T.length&&T[O]===P;)O++;const R=O-$;return R<3?null:{markerChar:P,markerLen:R,rest:T.slice(O)}},w=T=>y(T),k=T=>{const $=r(T);return $?s(T)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test($):!1},A=(T,$,P)=>{let O=T,R=0;for(;O<e.length;){const W=e.indexOf(` +`,O),z=W!==-1,G=z&&W>O&&e[W-1]==="\r",K=z?G?W-1:W:e.length,H=e.slice(O,K),q=l(H),X=q?.key??"";if(R>0&&$&&X!==$)break;const ee=q?.content??H,ue=d(ee);if(ue?.name===P){if(ue.type==="open")ue.complete||R++;else if(R>0&&(R--,R===0))return!1}else if(R>0&&(u(ee)||k(ee)))return!0;if(z)O=W+1;else break}return!1};let v="",x=0,E=!0,S=!1,M=!1,_=` +`;const N=[];let D="";for(;x<e.length;){const T=e.indexOf(` +`,x),$=T!==-1,P=$&&T>x&&e[T-1]==="\r",O=$?P?T-1:T:e.length,R=e.slice(x,O),W=$?P?`\r +`:` +`:"",z=l(R),G=z?.key??"",K=z?.content??R,H=w(K);H&&(p?H.markerChar===g&&H.markerLen>=m&&/^\s*$/.test(H.rest)&&(p=!1,g="",m=0):(p=!0,g=H.markerChar,m=H.markerLen));const q=N.length>0;if(!p&&!q){const ee=c(K),ue=!!ee&&!E&&S&&M&&A(x,G,ee);ee&&!E&&(!S||ue)&&(G&&D&&G===D?v+=`${G}${_}`:G||(v+=_))}if(v+=R,v+=W,W&&(_=W),!p){const ee=d(K);if(ee){if(ee.type==="open")ee.complete||N.push(ee.name);else for(let ue=N.length-1;ue>=0;ue--)if(N[ue]===ee.name){N.length=ue;break}}}const X=u(K);E=X,S=!X&&a(K),M=!X&&!!f(K),D=G,x=$?T+1:e.length}return v}function L1e(e){let t=!1,n="",i=0,s=!1,o=!1,r=!1,l=0;const a=(c,d)=>{const f=_b(c);if(f){t?f.markerChar===n&&f.markerLen>=i&&/^\s*$/.test(f.rest)&&(t=!1,n="",i=0):(t=!0,n=f.markerChar,i=f.markerLen);return}if(t)return;let p=0;for(;p<c.length;){if(s){c.startsWith("$$",p)&&!Rl(c,p)?(s=!1,p+=2):p++;continue}if(o){c.startsWith("\\]",p)&&!Rl(c,p)?(o=!1,p+=2):p++;continue}const g=c[p];if(g==="`"){const m=Sb(c,p,"`"),y=KF(c,p+m,m);if(y===-1)break;p=y+m;continue}if(g==="\\"){const m=c[p+1];m==="["&&!Rl(c,p)?(o=!0,p+=2):(m==="]"&&Rl(c,p),p+=2);continue}if(g==="$"){if(c[p+1]==="$"&&!Rl(c,p)){s=!0,r=!1,p+=2;continue}if(r){r=!1,p++;continue}const m=c[p+1];(m===void 0||m!==" "&&m!==" "&&!/\d/.test(m))&&(r=!0),p++;continue}p++}};return{scanTo:c=>{for(;l<c;){const d=e.indexOf(` +`,l),f=d===-1||d>=c?c:d,p=f>l&&e[f-1]==="\r"?f-1:f;if(a(e.slice(l,p)),d===-1||d>=c){l=c;break}r=!1,l=d+1}},inMath:()=>s||o||r}}function Py(e,t,n,i){let s=e.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2");const o=L1e(s);if(s=s.replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,(r,l,a,u)=>{o.scanTo(u+1);const c=o.inMath();return o.scanTo(u+r.length),c?`${l}\\n${a}`:r}),t||(s.endsWith("- *")&&(s=s.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*-\s*$/,r=>r.startsWith(` +`)?` +`:""):/(?:^|\n)\s*--\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*--\s*$/,r=>r.startsWith(` +`)?` +`:""):/(?:^|\n)\s*>\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*>\s*$/,r=>r.startsWith(` +`)?` +`:""):/\n\s*[*+]\s*$/.test(s)?s=s.replace(/\n\s*[*+]\s*$/,` +`):/(?:^|\n)\s*\d+\s*$/.test(s)?/^\d+$/.test(s.trim())||(s=s.replace(/(?:^|\n)\s*\d+\s*$/,r=>r.startsWith(` +`)?` +`:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(s)?s=s.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(r,l,a)=>`${l}${a.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*\d+[.)]\s*$/,r=>r.startsWith(` +`)?` +`:""):/\n[[(]\n*$/.test(s)&&(s=s.replace(/(\n\[|\n\()+\n*$/g,` +`)),s=Yhe(s,i.customHtmlTags)??s),i.customHtmlTags?.length&&s.includes("<")){const r=rd(i.customHtmlTags);if(r.length&&(s=M1e(s,r),s=I1e(s,r),s=T1e(s,r),s=E1e(s,r),s.includes("</")))for(const l of r){const a=new RegExp(String.raw`(^[\t ]*<\s*\/\s*${l}\s*>[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");s=s.replace(a,"$1$2$2")}}return t||(s=S1e(s)),s}function N1e(e,t,n,i){const s=e,o=`${n?"final":"stream"}:${(i.customHtmlTags??[]).join(",")}`,r=i8.get(s);let l;if(!n&&!i.customHtmlTags?.length&&r&&r.mode===o&&t.length>=r.source.length&&t.startsWith(r.source)){const a=Math.max(0,r.source.length-Ihe-Ehe),u=Py(t.slice(a),n,e,i),c=r.source.length-a;l=u.length>=c&&u.slice(0,c)===r.safeMarkdown.slice(-c)?r.safeMarkdown.slice(0,r.safeMarkdown.length-c)+u:Py(t,n,e,i)}else l=Py(t,n,e,i);return n||(l=Jhe(l,e)),i8.set(s,{source:t,safeMarkdown:l,mode:o}),l}function JF(e,t,n={}){const i=OF(n),s=i?tl():0,o=!!n.final,r=(e??"").toString();Hhe(t,n)&&(t.stream.reset(),Whe(t),i8.delete(t));const l=N1e(t,r,o,n);i&&gu(i,"safeMarkdownMs",tl()-s);const a=l1e(l);if(a){if(n.includeSourceMap){const x={...n,__sourceLineMapper:Qx(r,l)};a[0].sourceMap=op(l,0,l.length,x)}const A=n.preTransformTokens,v=n.postTransformTokens;if(Ab(t,n)||typeof A=="function"||typeof v=="function"){const x=qx(t,l,{__markstreamFinal:o},n),E=typeof A=="function"&&A(x)||x;typeof v=="function"&&v(E)}return zx(a,n,i,s)}const u=i?tl():0,c=qx(t,l,{__markstreamFinal:o},n);if(i&&gu(i,"tokenizeMs",tl()-u),!c||!Array.isArray(c))return zx([],n,i,s);const d=n.preTransformTokens,f=n.postTransformTokens;let p=c;d&&typeof d=="function"&&(p=d(p)||p);const g=t,m=typeof g.validateLink=="function"&&g.__markstreamOriginalValidateLink&&g.validateLink!==g.__markstreamOriginalValidateLink?g.validateLink:void 0,y=n.validateLink??m??g.options?.validateLink??(typeof g.validateLink=="function"?g.validateLink:void 0),w={...n,validateLink:y,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?Qx(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let k=zhe(t,l,p,w,i);if(f&&typeof f=="function"){const A=f(p);if(Array.isArray(A)){const v=A[0],x=v?.type;v&&typeof x=="string"?k=jd(A,{...w,__customHtmlBlockCursor:0},i):k=A}}if(A1e(k)){const A=i?tl():0;k=_1e(k,o,l,w),k=YF(k,l,t,w,o)[0],k=k1e(k,t,w,o),i&&gu(i,"htmlBlockPassesMs",tl()-A)}if(o){const A=new WeakSet,v=x=>{if(!x||typeof x!="object"||A.has(x))return;if(A.add(x),Array.isArray(x)){for(const S of x)v(S);return}const E=x;E.type==="html_block"&&E.loading===!0&&(E.loading=!1);for(const S of Object.values(E))v(S)};v(k)}return k=jF(k,n),n.debug&&console.log("Parsed Markdown Tree Structure:",k),PF(k,i,s)}function Yx(e,t){if(!e||!Array.isArray(e))return[];const n=[],i=ju(t),s=t?.__linkifyDemotionSeed;if(Array.isArray(s)&&s.length)for(const l of s)i.remember(String(l??""));const o=t?.includeSourceMap===!0;let r=0;for(;r<e.length;){const l=kb(e,r,i.options(),bb);if(l){Il(l[0],e[r],t),n.push(l[0]),i.remember(l[0].raw),r=l[1];continue}const a=e[r];switch(a.type){case"paragraph_open":{const u=String(e[r+1]?.content??""),c=_he(e,r,i.options(u));o&&Zn(c,a,t);const d=Vx(c,t);if(d){o&&Kx(d,c);for(const f of d)Il(f,a,t);n.push(...d)}else Il(c,a,t),n.push(c);i.remember(c.raw),r+=3;break}case"bullet_list_open":case"ordered_list_open":{const[u,c]=Uf(e,r,i.options());o&&Zn(u,a,t),Il(u,a,t),n.push(u),i.remember(u.raw),r=c;break}case"blockquote_open":{const[u,c]=Kf(e,r,i.options());o&&Zn(u,a,t),Il(u,a,t),n.push(u),i.remember(u.raw),r=c;break}case"footnote_anchor":{const u=a.meta??{},c={type:"footnote_anchor",id:String(u.label??a.content??""),raw:String(a.content??"")};o&&Zn(c,a,t),Il(c,a,t),n.push(c),i.remember(String(a.content??"")),r++;break}case"hardbreak":n.push(xhe()),i.reset(),r++;break;case"text":{const u=String(a.content??""),c={type:"paragraph",raw:u,children:u?[{type:"text",content:u,raw:u}]:[]};o&&Zn(c,a,t),Il(c,a,t),n.push(c),i.remember(u),r++;break}case"inline":{const u=String(a.content??""),c=Ki(a.children||[],u,void 0,i.options(u));if(c.length!==0)if(c.every(d=>d.type==="html_block")){if(o)for(const d of c)Zn(d,a,t);for(const d of c)Il(d,a,t);n.push(...c)}else{const d={type:"paragraph",raw:u,children:c};o&&Zn(d,a,t);const f=Vx(d,t);if(f){o&&Kx(f,d);for(const p of f)Il(p,a,t);n.push(...f)}else Il(d,a,t),n.push(d)}i.remember(u)}r+=1;break;default:r+=1;break}}return n}const F1e=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g,A1=/\d/u,B1e=/[,.!?;:,。;、!?:]/u,$1e=/\d\p{Script=Han}{1,3}$/u;function D1e(e){return e.pos>0&&e.pos+1<e.posMax&&A1.test(e.src[e.pos-1])&&A1.test(e.src[e.pos+1])}function R1e(e,t,n,i,s,o={}){const r=e.charCodeAt(0);return(l,a)=>{const u=l,c=u.posMax,d=u.pos;if(u.src.charCodeAt(d)!==r||a||o.refuseDigitRange&&D1e(u))return!1;u.pos=d+1;let f=!1;for(;u.pos<c;){if(u.src.charCodeAt(u.pos)===r){f=!0;break}u.md.inline.skipToken(u)}if(!f||d+1===u.pos)return u.pos=d,!1;const p=u.src.slice(d+1,u.pos);if(!p||p.match(/(^|[^\\])(\\\\)*\s/))return u.pos=d,!1;const g=u.src[u.pos+1],m=A1.test(p[0]),y=g!==void 0&&A1.test(g);if(m&&y&&($1e.test(u.src.slice(0,d))||B1e.test(p)||A1.test(p[p.length-1])))return u.pos=d,!1;const w=u.push(n,s,1);w.markup=t;const k=u.push("text","",0);k.content=p.replace(F1e,"$1");const A=u.push(i,s,-1);return A.markup=t,u.pos=u.pos+1,!0}}function z1e(e){const t=R1e("~","~","sub_open","sub_close","sub",{refuseDigitRange:!0});e.inline.ruler.after("emphasis","sub",t)}const O1e=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,P1e=new Set([...Sp,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),j1e=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 Jx(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function H1e(e){return typeof e=="string"?e:e==null?"":String(e)}function XF(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function ru(e){return H1e(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function eB(e){return ru(e).replace(/`/g,"`")}function wv(e){return String(e??"").trim().toLowerCase()}function Mb(e,t="safe"){const n=wv(e);return n?t==="escape"?!0:t==="trusted"?Sp.has(n):!j1e.has(n):!1}function tB(e,t="safe"){const n=wv(e);return n?t==="escape"?!0:t==="trusted"?Sp.has(n):P1e.has(n):!1}function Xx(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,i])=>i===""?` ${n}`:` ${n}="${eB(i)}"`).join("")}function nB(e){const t=e.startsWith("/"),n=t?e.slice(1):e,i=n.match(O1e);return i?{attrsStr:t?"":n.slice(i[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:i[1]}:null}function W1e(e,t){const n=e.split(",").map(i=>i.trim()).filter(Boolean);return n.length===0?!1:n.some(i=>{const s=i.split(/\s+/,1)[0]??"";return!s||Rc(s,{tagName:t,attrName:"srcset"})})}function iB(e,t,n,i){return _ue.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?W1e(t,i):!!(Sue.has(e)&&t&&Rc(t,{tagName:i,attrName:e}))}function xc(e,t){const n=t.toLowerCase();return Object.keys(e).find(i=>i.toLowerCase()===n)}function sB(e,t,n,i=!1){if(t!=="safe"||wv(n)!=="a")return e;const s=xc(e,"href");if(i&&(!s||!e[s])){const a=xc(e,"target"),u=xc(e,"rel");return a&&delete e[a],u&&delete e[u],e}const o=xc(e,"target");if((o?String(e[o]).trim():"").toLowerCase()!=="_blank")return e;const r=xc(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 e_(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!XF(r)||iB(l,o,t,n)||(i[r]=o)}return sB(i,t,n,!!xc(e,"href"))}function oB(e,t){const n=e.toLowerCase();return ZN.has(n)?!1:Jx(t,n)||Jx(t,e)}function Ib(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!XF(r)||iB(l,o,t,n)||(i[r]=o)}return sB(i,t,n,!!xc(e,"href"))}function C1(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,i]of e)n&&(t[String(n)]=i==null?"":String(i));return t}function Bg(e,t="safe",n){const i=Ib(C1(e),t,n),s=Object.entries(i).map(([o,r])=>[o,r]);return s.length>0?s:void 0}function q1e(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 i=Number(e);if(e!==""&&!Number.isNaN(i))return i}return e}function U1e(e){const t={};for(const[n,i]of Object.entries(e))t[n]=q1e(i,n);return t}function jy(e){return e.trim().length>0}function rB(e){const t=[];let n=0;for(;n<e.length;){if(e.startsWith("<!--",n)){const r=e.indexOf("-->",n);if(r!==-1){n=r+3;continue}break}const i=e.indexOf("<",n);if(i===-1){if(n<e.length){const r=e.slice(n);jy(r)&&t.push({type:"text",content:r})}break}if(i>n){const r=e.slice(n,i);jy(r)&&t.push({type:"text",content:r})}if(e.startsWith("![CDATA[",i+1)){const r=e.indexOf("]]>",i);if(r!==-1){t.push({type:"text",content:e.slice(i,r+3)}),n=r+3;continue}break}if(e.startsWith("!",i+1)){const r=e.indexOf(">",i);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=nB(e.slice(i+1,s));if(!o){const r=e.slice(i,s+1);jy(r)&&t.push({type:"text",content:r}),n=s+1;continue}if(o.isClosing)t.push({type:"tag_close",tagName:o.tagName});else{const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||Su.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r})}n=s+1}return t}function K1e(e){const t=[];let n=0;for(;n<e.length;){if(e.startsWith("<!--",n)){const l=e.indexOf("-->",n);if(l!==-1){n=l+3;continue}break}const i=e.indexOf("<",n);if(i===-1){n<e.length&&t.push({type:"text",content:e.slice(n)});break}if(i>n&&t.push({type:"text",content:e.slice(n,i)}),e.startsWith("![CDATA[",i+1)){const l=e.indexOf("]]>",i);if(l!==-1){t.push({type:"text",content:e.slice(i,l+3)}),n=l+3;continue}break}if(e.startsWith("!",i+1)){const l=e.indexOf(">",i);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=nB(e.slice(i+1,s));if(!o){t.push({type:"text",content:e.slice(i,s+1)}),n=s+1;continue}if(o.isClosing){t.push({type:"tag_close",tagName:o.tagName}),n=s+1;continue}const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||Su.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r}),n=s+1}return t}function V1e(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${ru(t)}>`;const n=Object.entries(e.attrs??{}).map(([i,s])=>s===""?` ${ru(i)}`:` ${ru(i)}="${eB(s)}"`).join("");return e.type==="self_closing"?`<${ru(t)}${n} />`:`<${ru(t)}${n}>`}function Z1e(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of rB(e))if((n.type==="tag_open"||n.type==="self_closing")&&oB(n.tagName??"",t))return!0;return!1}function mf(e,t="safe"){if(!e)return"";if(t==="escape")return ru(e);const n=K1e(e),i=[],s=[],o=[];for(const r of n){if(r.type==="text"){o.length===0&&s.push(ru(r.content??""));continue}const l=wv(r.tagName);if(!l)continue;if(tB(l,t)){r.type==="tag_open"?o.push(l):r.type==="tag_close"&&o[o.length-1]===l&&o.pop();continue}if(o.length>0)continue;if(t==="safe"&&Mb(l,t)){s.push(V1e(r));continue}if(r.type==="self_closing"){s.push(`<${l}${Xx(e_(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${Xx(e_(r.attrs??{},t,l))}>`),Su.has(l)||i.push(l);continue}const a=i.lastIndexOf(l);if(a===-1)continue;for(;i.length>a+1;){const c=i.pop();c&&s.push(`</${c}>`)}const u=i.pop();u&&s.push(`</${u}>`)}for(;i.length>0;){const r=i.pop();r&&s.push(`</${r}>`)}return s.join("")}const G1e=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],t_="http://www.w3.org/2000/svg",Q1e=new Set(["script","style","iframe","object","embed","link","meta"]),Y1e=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"]),J1e=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),X1e=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),epe=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function tpe(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function npe(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function ipe(e){const t=e.nodeName.toLowerCase();return t==="use"?tpe(e):t==="image"?npe(e):t==="text"||t==="tspan"?!!e.textContent?.trim():epe.has(t)}function spe(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 ope(e,t,n){const i=e.toLowerCase(),s=t.toLowerCase(),o=String(n??"").trim();return o?(i==="use"||i==="marker"||i==="clippath"||i==="mask")&&(s==="href"||s==="xlink:href")?o.startsWith("#")?o:"":i==="a"&&(s==="href"||s==="xlink:href")?Rc(o,{tagName:"a",attrName:"href"})?"":o:i==="image"&&(s==="href"||s==="xlink:href"||s==="src")?Rc(o,{tagName:"img",attrName:"src"})?"":o:s==="href"||s==="xlink:href"?o.startsWith("#")?o:"":Rc(o,{tagName:i,attrName:s})?"":o:""}function rpe(e,t){let n=t+4;for(;n<e.length&&/\s/.test(e[n]??"");)n++;const i=e[n];if(i==='"'||i==="'"){const o=n+1,r=e.indexOf(i,o);if(r===-1)return{next:e.length,url:""};for(n=r+1;n<e.length&&/\s/.test(e[n]??"");)n++;return{next:n<e.length&&e[n]===")"?n+1:n,url:e.slice(o,r)}}const s=n;for(;n<e.length&&e[n]!==")";)n++;return{next:n<e.length?n+1:n,url:e.slice(s,n)}}function lB(e){return e.replace(/\\([0-9a-f]{1,6}\s?|.)/gi,(t,n)=>{const i=n.trim();if(/^[0-9a-f]+$/i.test(i)){const s=Number.parseInt(i,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function aB(e){const t=lB(e),n=t.toLowerCase();let i=0;for(;i<n.length;){const s=n.indexOf("url(",i);if(s===-1)return!1;const o=rpe(t,s);if(i=Math.max(o.next,s+4),!o.url.trim().startsWith("#"))return!0}return!1}function n_(e){const t=lB(e);return G1e.some(n=>n.test(t))||aB(t)}function lpe(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 Y0(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function uB(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,i=n.tagName.toLowerCase();if(!Q1e.has(i)){if(i==="br"){t.push(` +`);return}for(const s of Array.from(n.childNodes))uB(s,t)}}function ape(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];uB(t,n);const i=n.join("").split(/\r?\n/).map(c=>c.trim()).filter(Boolean);if(!i.length){t.remove();continue}const s=Y0(t.getAttribute("width")),o=Y0(t.getAttribute("height")),r=Y0(t.getAttribute("x")),l=Y0(t.getAttribute("y")),a=e.ownerDocument.createElementNS(t_,"text");a.setAttribute("x",String(r+s/2)),a.setAttribute("y",String(l+o/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")),i.length===1)a.textContent=i[0];else{const c=-.6*(i.length-1);for(const[d,f]of i.entries()){const p=e.ownerDocument.createElementNS(t_,"tspan");p.setAttribute("x",String(r+s/2)),p.setAttribute("dy",d===0?`${c}em`:"1.2em"),p.textContent=f,a.appendChild(p)}}t.parentNode?.replaceChild(a,t)}}function upe(e){ape(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const i=n.tagName.toLowerCase();if(!Y1e.has(i)){n.remove();continue}if(i==="style"&&n_(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const o of s){const r=o.name.toLowerCase();if(/^on/i.test(r)){n.removeAttribute(o.name);continue}if(r==="style"&&o.value&&n_(o.value)){n.removeAttribute(o.name);continue}if(r==="srcdoc"){n.removeAttribute(o.name);continue}if(J1e.has(r)&&o.value){const l=ope(i,r,o.value);if(!l){n.removeAttribute(o.name);continue}l!==o.value&&n.setAttribute(o.name,l);continue}if(X1e.has(r)&&o.value&&aB(o.value)){n.removeAttribute(o.name);continue}if(o.value){const l=spe(o.value);l!==o.value&&n.setAttribute(o.name,l)}}lpe(n)}}function AYe(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 upe(n),cpe(n)?null:n}catch{return null}}function cpe(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const o=Number.parseFloat(s[2]||""),r=Number.parseFloat(s[3]||"");if(!Number.isFinite(o)||!Number.isFinite(r)||o<=0||r<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let i=!1;for(const s of n){ipe(s)&&(i=!0);for(const o of Array.from(s.attributes))if(/\bNaN\b/i.test(o.value)||o.name==="style"&&/max-width:\s*0(?:px)?/i.test(o.value))return!0}return!i}const J0=[];function Hy(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function dpe(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function fpe(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function i_(e=`editor-${Date.now()}`,t={}){const n=qde(t),i=n;i.__markstreamRegisteredPluginCount=J0.length,i.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||J0.length);const s={"common.copy":"Copy"};let o;if(typeof t.i18n=="function")o=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const p=t.i18n;o=g=>p[g]??s[g]??g}else o=p=>s[p]??p;if(Array.isArray(t.plugin))for(const p of t.plugin){const g=p;if(Array.isArray(g)){const[m,...y]=g;typeof m=="function"&&n.use(m,...y)}else typeof g=="function"&&n.use(g)}if(Array.isArray(t.apply))for(const p of t.apply)try{p(n)}catch(g){console.error("[getMarkdown] apply function threw an error",g)}if(J0.length)for(const p of J0)if(Array.isArray(p)){const[g,...m]=p;typeof g=="function"&&n.use(g,...m)}else typeof p=="function"&&n.use(p);n.use(z1e),n.use(coe),n.use(loe);const r=woe,l=r.default??r;n.use(l),n.use(roe),n.use(ooe),n.core.ruler.after("block","mark_fence_closed",p=>{const g=p,m=g.src,y=!!g.env?.__markstreamFinal,w=m.split(/\r?\n/);for(const k of g.tokens){if(k.type!=="fence"||!k.map||!k.markup)continue;const A=k.map[0],v=k.map[1],x=k.markup,E=x[0],S=x.length,M=w[Math.max(0,v-1)]??"";let _=0;for(;_<M.length&&(M[_]===" "||M[_]===" ");)_++;let N=0;for(;_+N<M.length&&M[_+N]===E;)N++;let D=_+N;for(;D<M.length&&(M[D]===" "||M[D]===" ");)D++;const T=y?!0:v>A+1&&N>=S&&D===M.length,$=k;$.meta=$.meta??{},$.meta.unclosed=!T,$.meta.closed=!!T}}),n.renderer.rules.fence=(p,g)=>{const m=p[g],y=String(m.info??"").trim(),w=String(m.content??""),k=btoa(unescape(encodeURIComponent(w))),A=dpe(y),v=Hy(A),x=fpe(`editor-${e}-${g}-${A}`),E=Hy(o("common.copy"));return`<div class="code-block" data-code="${k}" data-lang="${v}" id="${x}"> + <div class="code-header"> + <span class="code-lang">${Hy(A.toUpperCase())}</span> + <button class="copy-button" data-code="${k}">${E}</button> + </div> + <div class="code-editor"></div> + </div>`};const a=/^\[(\d+)\]/,u=/^\[([^\]\n]+)\]/,c=p=>{if(!p.startsWith("["))return!1;const g=u.exec(p);if(!g)return p!=="["&&!/^\[\d+$/.test(p);const m=String(g[1]??"");return p.slice(g[0].length).startsWith("(")?!1:!/^\d+$/.test(m)},d=(p,g)=>{const m=p;if(m.src[m.pos]!=="[")return!1;const y=a.exec(m.src.slice(m.pos));if(!y)return!1;const w=m.src.slice(Math.max(0,m.pos-120),m.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(w))return!1;const k=m.src.slice(m.pos+y[0].length);if(k.startsWith("](")||k.startsWith("(")||c(k))return!1;if(!g){const A=y[1],v=m.push("reference","span",0);v.content=A,v.markup=y[0],v.raw=y[0]}return m.pos+=y[0].length,!0};n.inline.ruler.before("escape","reference",d),n.renderer.rules.reference=(p,g)=>{const y=String(p[g].content??"");return`<span class="reference-link" data-reference-id="${y}" role="button" tabindex="0" title="Click to view reference">${y}</span>`};const f=n.use.bind(n);return n.use=((...p)=>(i.__markstreamHasCustomParserExtensions=!0,f(...p))),n}function hpe({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 cB({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:i,streamRenderVersionChanged:s=!1}){const o=`${n.settledContent}${n.streamedDelta}`;return i?n.streamedDelta&&o===e?s?{settledContent:o,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:hpe({nextContent:e,previousContent:t??o,typewriterEnabled:i}):{settledContent:e,streamedDelta:"",appended:!1}}const ppe={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 gpe(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function dB(e){const t=gpe(e);return ppe[t]??t}function mpe(e){if(!Array.isArray(e))return;const t=e.filter(i=>typeof i=="string").map(i=>dB(i)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function vpe(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const i of e){if(typeof i!="string")continue;const s=i.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function ype(e){return vpe(e)?.join("\0")??""}function bpe(e,t){return`${ype(e)}\0\0${mpe(t)?.join("\0")??""}`}function Nd(e,t,n=1){const i=Number(e);return Number.isFinite(i)?Math.max(n,i):t}function s_(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var kpe=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,p=this.pendingChars<=0;if(this.source+=d,p){const g=o_();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=o_();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.startedAt<this.normalizedStartDelayMs){this.rafId=requestAnimationFrame(this.tick);return}const f=1e3/Math.max(1,this.maxCommitFps),p=Math.min(100,Math.max(0,d-this.lastTick));if(p<f){this.rafId=requestAnimationFrame(this.tick);return}this.lastTick=d;const g=this.pendingChars,m=g>this.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,y=xpe(g/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(y-this.currentCps)*.2,this.charBudget+=this.currentCps*(p/1e3),this.charBudget<1){this.ensureLoop();return}const w=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),k=wpe(this.source.slice(this.visible.length),w,this.segmenter);k.text&&(this.visible+=k.text,this.charBudget=Math.max(0,this.charBudget-k.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:i=1e3,targetLatencyMs:s=900,catchUpLatencyMs:o=350,catchUpThreshold:r=600,maxCommitFps:l=30,startDelayMs:a=80,maxCharsPerCommit:u=80,flushOnFinish:c=!1}=e;this.minCharsPerSecond=Nd(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Nd(i,1e3,1)),this.normalizedTargetLatencyMs=Nd(s,900,1),this.normalizedCatchUpLatencyMs=Nd(o,350,1),this.normalizedCatchUpThreshold=s_(r,600),this.normalizedStartDelayMs=s_(a,80),this.maxCommitFps=Math.trunc(Nd(l,30,1)),this.maxCharsPerCommit=Math.trunc(Nd(u,80,1)),this.flushOnFinish=c,this.segmenter=Cpe(),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 Ape(e={},t){const n=new kpe(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 Cpe(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function wpe(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const o=Array.from(e).slice(0,t);return{text:o.join(""),graphemeCount:o.length}}let i="",s=0;for(const o of n.segment(e)){if(s>=t)break;i+=o.segment,s++}return{text:i,graphemeCount:s}}function o_(){return typeof performance<"u"?performance.now():Date.now()}function xpe(e,t,n){return Math.min(n,Math.max(t,e))}var _pe=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const o8=Symbol.for("markstream-vue:node-lifecycle");function CYe(){}const Eb=new Map;let fB="material";const Yd=new Map,r_=new Map;let r8=null;function Spe(e){Eb.set(e.id,e)}function Mpe(e){const t=Eb.get(fB);if(!t)return;const n=t.core[e];if(n)return n;const i=Yd.get(t.id);if(i){const s=i[e];if(s)return s}t.loadExtended&&!Yd.has(t.id)&&Epe(t)}function Ipe(){var e,t;return(t=(e=Eb.get(fB))==null?void 0:e.fallback)!=null?t:""}function Epe(e){return _pe(this,null,function*(){var t,n,i;if(Yd.has(e.id))return(t=Yd.get(e.id))!=null?t:null;let s=r_.get(e.id);return s||(s=((i=(n=e.loadExtended)==null?void 0:n.call(e))!=null?i:Promise.resolve(null)).then(o=>(Yd.set(e.id,o),r8?.(),o)).catch(()=>(Yd.set(e.id,null),null)),r_.set(e.id,s)),s})}const l_='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>',a_='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>',Tpe={id:"material",core:{"":a_,plain:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>',text:a_,javascript:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ffca28" d="M2 2v12h12V2zm6 6h1v4a1.003 1.003 0 0 1-1 1H7a1.003 1.003 0 0 1-1-1v-1h1v1h1zm3 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>',typescript:'<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 16 16"><path fill="#0288d1" d="M2 2v12h12V2zm4 6h3v1H8v4H7V9H6zm5 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>',jsx:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00bcd4" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#00bcd4" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#00bcd4" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#00bcd4" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>',tsx:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#0288d1" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#0288d1" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#0288d1" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>',html:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e65100" d="m4 4 2 22 10 2 10-2 2-22Zm19.72 7H11.28l.29 3h11.86l-.802 9.335L15.99 25l-6.635-1.646L8.93 19h3.02l.19 2 3.86.77 3.84-.77.29-4H8.84L8 8h16Z"/></svg>',css:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7e57c2" d="M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/></svg>',scss:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ec407a" d="M27.837 5.673a4.33 4.33 0 0 0-2.293-2.701c-2.362-1.261-6.11-1.298-9.548-.092a26.3 26.3 0 0 0-8.76 4.966c-2.752 2.542-3.438 4.925-3.189 6.194.523 2.668 3.274 4.539 5.485 6.042.418.284.822.559 1.175.816-1.429.76-4.261 2.444-5.088 4.248a3.88 3.88 0 0 0-.118 3.332A2.37 2.37 0 0 0 6.869 29.8a5.6 5.6 0 0 0 1.49.2 6.35 6.35 0 0 0 5.19-2.856 6.74 6.74 0 0 0 .864-5.382 7.3 7.3 0 0 1 2.044-.03 3.92 3.92 0 0 1 2.816 1.311 1.82 1.82 0 0 1 .423 1.262 1.55 1.55 0 0 1-.772 1.05c-.234.14-.586.355-.504.803.036.194.198.633.894.512a2.93 2.93 0 0 0 2.145-2.651 4 4 0 0 0-1.197-2.904 5.94 5.94 0 0 0-4.396-1.626 10.6 10.6 0 0 0-2.672.304 20 20 0 0 0-2.203-1.846c-1.712-1.3-3.33-2.529-3.235-4.26.125-2.263 2.468-4.532 6.964-6.744 4.016-1.976 7.254-2.037 8.944-1.438a2 2 0 0 1 1.204.883 2.77 2.77 0 0 1-.36 2.47 9.71 9.71 0 0 1-7.425 4.304 3.86 3.86 0 0 1-3.238-.757c-.278-.302-.593-.645-1.074-.383q-.565.31-.225 1.189a3.9 3.9 0 0 0 2.407 1.92 11.7 11.7 0 0 0 7.128-.671c3.527-1.35 6.681-5.202 5.756-8.787M11.895 24.475a4 4 0 0 1-.192.468 4.5 4.5 0 0 1-.753 1.081 2.83 2.83 0 0 1-2.533 1.107c-.056-.032-.078-.146-.085-.193a3.28 3.28 0 0 1 1.076-2.284 11.3 11.3 0 0 1 2.644-1.933 3.85 3.85 0 0 1-.157 1.754"/></svg>',json:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="#f9a825" d="M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80z"/></svg>',python:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M9.86 2A2.86 2.86 0 0 0 7 4.86v1.68h4.29c.39 0 .71.57.71.96H4.86A2.86 2.86 0 0 0 2 10.36v3.781a2.86 2.86 0 0 0 2.86 2.86h1.18v-2.68a2.85 2.85 0 0 1 2.85-2.86h5.25c1.58 0 2.86-1.271 2.86-2.851V4.86A2.86 2.86 0 0 0 14.14 2zm-.72 1.61c.4 0 .72.12.72.71s-.32.891-.72.891c-.39 0-.71-.3-.71-.89s.32-.711.71-.711"/><path fill="#fdd835" d="M17.959 7v2.68a2.85 2.85 0 0 1-2.85 2.859H9.86A2.85 2.85 0 0 0 7 15.389v3.75a2.86 2.86 0 0 0 2.86 2.86h4.28A2.86 2.86 0 0 0 17 19.14v-1.68h-4.291c-.39 0-.709-.57-.709-.96h7.14A2.86 2.86 0 0 0 22 13.64V9.86A2.86 2.86 0 0 0 19.14 7zM8.32 11.513l-.004.004.038-.004zm6.54 7.276c.39 0 .71.3.71.89a.71.71 0 0 1-.71.71c-.4 0-.72-.12-.72-.71s.32-.89.72-.89"/></svg>',ruby:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#f44336" d="M18.041 3.177c2.24.382 2.879 1.919 2.843 3.527V6.67l-1.013 13.266-13.132.897h.008c-1.093-.044-3.518-.151-3.634-3.545l1.217-2.222 2.462 5.74 2.097-6.77-.045.009.018-.018 6.85 2.186L13.945 9.3l6.53-.409-5.144-4.212 2.71-1.51v.009M3.113 17.252v.017zM6.916 6.874c2.63-2.622 6.033-4.168 7.34-2.844 1.297 1.306-.072 4.523-2.702 7.135-2.666 2.613-6.015 4.248-7.322 2.933-1.306-1.324.036-4.612 2.675-7.224z"/></svg>',go:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00acc1" d="M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5"/><path fill="#00acc1" d="M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z"/></svg>',java:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M4 26h24v2H4zM28 4H7a1 1 0 0 0-1 1v13a4 4 0 0 0 4 4h10a4 4 0 0 0 4-4v-4h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 8h-4V6h4Z"/></svg>',kotlin:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><defs><linearGradient id="a" x1="1.725" x2="22.185" y1="22.67" y2="1.982" gradientTransform="translate(1.306 1.129)scale(.89324)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7c4dff"/><stop offset=".5" stop-color="#d500f9"/><stop offset="1" stop-color="#ef5350"/></linearGradient></defs><path fill="url(#a)" d="M2.975 2.976v18.048h18.05v-.03l-4.478-4.511-4.48-4.515 4.48-4.515 4.443-4.477z"/></svg>',c:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>',cpp:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>',cs:l_,csharp:l_,php:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1e88e5" d="M12 18.08c-6.63 0-12-2.72-12-6.08s5.37-6.08 12-6.08S24 8.64 24 12s-5.37 6.08-12 6.08m-5.19-7.95c.54 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.58 1.09q-.42.33-1.29.33h-.87l.53-2.76zm-3.5 5.55h1.44l.34-1.75h1.23c.54 0 .98-.06 1.33-.17.35-.12.67-.31.96-.58.24-.22.43-.46.58-.73.15-.26.26-.56.31-.88.16-.78.05-1.39-.33-1.82-.39-.44-.99-.65-1.82-.65H4.59zm7.25-8.33-1.28 6.58h1.42l.74-3.77h1.14c.36 0 .6.06.71.18s.13.34.07.66l-.57 2.93h1.45l.59-3.07c.13-.62.03-1.07-.27-1.36-.3-.27-.85-.4-1.65-.4h-1.27L12 7.35zM18 10.13c.55 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.57 1.09-.29.22-.72.33-1.3.33h-.85l.5-2.76zm-3.5 5.55h1.44l.34-1.75h1.22c.55 0 1-.06 1.35-.17.35-.12.65-.31.95-.58.24-.22.44-.46.58-.73.15-.26.26-.56.32-.88.15-.78.04-1.39-.34-1.82-.36-.44-.99-.65-1.82-.65h-2.75z"/></svg>',shell:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>',powershell:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#03a9f4" d="M29.07 6H7.677A1.535 1.535 0 0 0 6.24 7.113l-4.2 17.774A.852.852 0 0 0 2.93 26h21.393a1.535 1.535 0 0 0 1.436-1.113L29.96 7.112A.852.852 0 0 0 29.07 6M8.626 23.797a1.4 1.4 0 0 1-1.814-.31l-.007-.009a1.075 1.075 0 0 1 .315-1.599l9.6-6.061-6.102-5.852-.01-.01a1.068 1.068 0 0 1 .084-1.625l.037-.03a1.38 1.38 0 0 1 1.8.07l7.233 6.957a1.1 1.1 0 0 1 .236.739 1.08 1.08 0 0 1-.412.79c-.074.04-.146.119-10.951 6.935ZM24 22.94A1.135 1.135 0 0 1 22.803 24h-5.634a1.061 1.061 0 1 1 .001-2.112h5.633A1.134 1.134 0 0 1 24 22.938Z"/></svg>',sql:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M16 24c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-8c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-12C10.477 4 6 4.895 6 6v4c0 1.1 4.475 2 10 2s10-.9 10-2V6c0-1.105-4.477-2-10-2"/></svg>',yaml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff5252" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m12 16v-2H9v2zm-4-4v-2H6v2z"/></svg>',markdown:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>',xml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>',rust:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="m30 12-4-2V6h-4l-2-4-4 2-4-2-2 4H6v4l-4 2 2 4-2 4 4 2v4h4l2 4 4-2 4 2 2-4h4v-4l4-2-2-4ZM6 16a9.9 9.9 0 0 1 .842-4H10v8H6.842A9.9 9.9 0 0 1 6 16m10 10a9.98 9.98 0 0 1-7.978-4H16v-2h-2v-2h4c.819.819.297 2.308 1.179 3.37a1.89 1.89 0 0 0 1.46.63h3.34A9.98 9.98 0 0 1 16 26m-2-12v-2h4a1 1 0 0 1 0 2Zm11.158 6H24a2.006 2.006 0 0 1-2-2 2 2 0 0 0-2-2 3 3 0 0 0 3-3q0-.08-.004-.161A3.115 3.115 0 0 0 19.83 10H8.022a9.986 9.986 0 0 1 17.136 10"/></svg>',vue:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#41b883" d="M1.791 3.851 12 21.471 22.209 3.936V3.85H18.24l-6.18 10.616L5.906 3.851z"/><path fill="#35495e" d="m5.907 3.851 6.152 10.617L18.24 3.851h-3.723L12.084 8.03 9.66 3.85z"/></svg>',mermaid:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>'},fallback:'<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>',loadExtended:()=>ns(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Lpe=vl(0);r8=()=>{Lpe.value++},Spe(Tpe);const Npe={"":"",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 xv(e){var t;const n=(function(i){if(!i)return"";const s=i.trim();if(!s)return"";const[o]=s.split(/\s+/),[r]=o.split(":");return r.toLowerCase()})(e);return(t=Npe[n])!=null?t:n}function wYe(e){const t=xv(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 xYe(e){return Mpe(xv(e))||Ipe()}const u_={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 _v=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});let Fo=null,Ic=!1,Ec=null,Sv=Lb;function Tp(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function Tb(){try{const e=globalThis;return Tp(e?.katex)}catch{return null}}function Lb(){return _v(null,null,function*(){const e=Tb();if(e)return e;const t=yield ns(()=>import("./katex-DnlPpQZa.js"),[]);try{yield ns(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([0,1]))}catch{}return Tp(t)})}function hB(e){const t=Promise.resolve(e).then(n=>{var i;return Ec===t&&n?(Fo=(i=Tp(n))!=null?i:n,Fo):null}).catch(()=>null).finally(()=>{Ec===t&&(Ec=null)});return Ec=t,Ic=!0,t}function Fpe(e){Sv=e,Fo=null,Ic=!1,Ec=null}function Bpe(e){Fpe(Lb)}function pB(){return typeof Sv=="function"}function _Ye(){var e;const t=Sv;if(!t||t===Lb)return null;if(Fo)return Fo;const n=Tb();if(n)return Fo=n,Fo;if(Ic)return null;try{const i=t();return i?typeof i?.then=="function"?(hB(i),null):(Fo=(e=Tp(i))!=null?e:i,Fo):null}catch{return null}}function gB(){return _v(this,null,function*(){var e;const t=Tb();if(t)return Fo=t,Fo;if(Fo)return Fo;if(Ec)return Ec;if(Ic)return null;const n=Sv;if(!n)return Ic=!0,null;try{const i=n();if(typeof i?.then=="function")return hB(i);if(i)return Fo=(e=Tp(i))!=null?e:i,Ic=!0,Fo}catch{}return Ic=!0,null})}function mB(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let uu=null,nu=null;const no=new Map,ya=new Map;let rp=5;const Oc=new Set;function w1(){if(no.size<rp&&Oc.size){let e=rp-no.size;for(const t of Array.from(Oc)){if(e<=0)break;Oc.delete(t),e--;try{t()}catch{}}}}function vB(){for(const e of Array.from(Oc)){Oc.delete(e);try{e()}catch{}}}function $pe(e){uu=e,nu=null,uu.onmessage=t=>{const{id:n,html:i,error:s}=t.data,o=no.get(n);if(o)if(no.delete(n),clearTimeout(o.timeoutId),o.cleanup(),w1(),s)o.aborted||o.reject(new Error(s));else{const{content:r,displayMode:l}=t.data;if(r){const a=`${l?"d":"i"}:${r}`;if(ya.set(a,i),ya.size>200){const u=ya.keys().next().value;ya.delete(u)}}o.aborted||o.resolve(i)}},uu.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,i]of no.entries())clearTimeout(i.timeoutId),i.cleanup(),i.aborted||i.reject(new Error(`Worker error: ${t.message}`));no.clear(),vB()}}function Dpe(){var e;for(const t of no.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));no.clear(),vB(),uu&&((e=uu.terminate)==null||e.call(uu)),uu=null,nu=null}function Rpe(e,t=!0,n=2e3,i){return _v(this,null,function*(){performance.now();const s=mB(e);if(!pB()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(nu)return Promise.reject(nu);const o=`${t?"d":"i"}:${s}`,r=ya.get(o);if(r)return w1(),Promise.resolve(r);const l=uu||(nu=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),nu.name="WorkerInitError",nu.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(nu);if(no.size>=rp){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=no.size,a.max=rp,Promise.reject(a)}return new Promise((a,u)=>{if(i?.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=no.get(c);if(!m)return;no.delete(c),m.cleanup();const y=new Error("Worker render timed out");y.name="WorkerTimeout",y.code="WORKER_TIMEOUT",m.aborted||m.reject(y),w1()},n);d=()=>{const m=no.get(c);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const y=new Error("Aborted");y.name="AbortError",u(y)},i&&i.addEventListener("abort",d,{once:!0});const p=a,g=u;no.set(c,{resolve:m=>{p(m)},reject:m=>{g(m)},timeoutId:f,aborted:!1,cleanup:()=>{i&&d&&i.removeEventListener("abort",d),d=null}});try{l.postMessage({id:c,content:s,displayMode:t})}catch(m){const y=no.get(c);no.delete(c),clearTimeout(f),y?.cleanup(),y?.reject(m),w1()}})})}function SYe(e,t=!0,n){const i=`${t?"d":"i"}:${mB(e)}`;if(ya.set(i,n),ya.size>200){const s=ya.keys().next().value;ya.delete(s)}}const zpe="WORKER_BUSY";function Ope(e=2e3,t){return no.size<rp?Promise.resolve():new Promise((n,i)=>{let s,o=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),Oc.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{o||(o=!0,a(),n())},Oc.add(l),s=globalThis.setTimeout(()=>{if(o)return;o=!0,a();const u=new Error("Wait for worker slot timed out");u.name="WorkerBusyTimeout",u.code="WORKER_BUSY_TIMEOUT",i(u)},e),queueMicrotask(()=>w1()),t&&(r=()=>{if(o)return;o=!0,a();const u=new Error("Aborted");u.name="AbortError",i(u)},t.aborted?r():t.addEventListener("abort",r,{once:!0}))})}const Ih={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function MYe(e){return _v(this,arguments,function*(t,n=!0,i={}){var s,o,r,l;if(!pB()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=i.timeout)!=null?s:Ih.timeout,u=(o=i.waitTimeout)!=null?o:Ih.waitTimeout,c=(r=i.backoffMs)!=null?r:Ih.backoffMs,d=(l=i.maxRetries)!=null?l:Ih.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):Ih.maxRetries,p=i.signal;let g=0;for(;;){if(p?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield Rpe(t,n,a,p)}catch(m){if(m?.code!==zpe||g>=f)throw m;if(g++,yield Ope(u,p).catch(()=>{}),p?.aborted){const y=new Error("Aborted");throw y.name="AbortError",y}c>0&&(yield new Promise(y=>globalThis.setTimeout(y,c*g)))}}})}function Jd(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function Ppe(e){var t;for(const n of e.split(/\r?\n/)){const i=n.trim();if(!i||i.startsWith("%%"))continue;const s=i.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function Vm(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),i=Ppe(e);return i==="gantt"?220+28*n:i==="sequencediagram"?180+26*n:i==="classdiagram"||i==="statediagram"||i==="erdiagram"?180+24*n:i==="flowchart"||i==="graph"?170+28*n:200+22*n}function Zm(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 yB(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function Gm(e,t=360,n=500){return yB(e,t,n)}function Qm(e,t=360,n=500){return yB(e,t,n)}var jpe=Object.defineProperty,Hpe=Object.defineProperties,Wpe=Object.getOwnPropertyDescriptors,c_=Object.getOwnPropertySymbols,qpe=Object.prototype.hasOwnProperty,Upe=Object.prototype.propertyIsEnumerable,d_=(e,t,n)=>t in e?jpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bB=(e,t)=>{for(var n in t||(t={}))qpe.call(t,n)&&d_(e,n,t[n]);if(c_)for(var n of c_(t))Upe.call(t,n)&&d_(e,n,t[n]);return e},f_=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const Ym=()=>ns(()=>import("./mermaid.core-DpBz6UHc.js").then(e=>e.bp),__vite__mapDeps([2,3]));let la=null,Xd=Ym,Yh=null,l8=!1,a8=!1,Jh=0;function Kpe(e){Xd=e,Jh++,la=null,Yh=null,l8=!1,a8=!1}function Vpe(e){Kpe(Ym)}function h_(){return typeof Xd=="function"}function p_(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=bB({},t),i={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:o=>typeof t.initialize=="function"?t.initialize(o):s.initialize?s.initialize(o):void 0},Hpe(n,Wpe(i))}var n,i;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function g_(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const i=bB({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,i):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(i):void 0}}catch{}}function IYe(){return f_(this,null,function*(){if(la)return la;const e=(function(){try{const i=globalThis;return p_(i?.mermaid)}catch{return null}})();if(e)return la=e,g_(la),la;const t=Xd,n=Jh;return t?t===Ym&&l8?null:Yh||(Yh=f_(null,null,function*(){let i;try{i=yield t()}catch(s){if(t===Ym)return n===Jh&&t===Xd&&(l8=!0,(function(o){a8||(a8=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',o))})(s)),null;throw s}finally{n===Jh&&t===Xd&&(Yh=null)}return n!==Jh||t!==Xd?null:i?(la=p_(i),g_(la),la):null}),Yh):null})}let Yo=null,iu=null;const nl=new Map,yc=new Map;function $g(e){for(const t of nl.values())t.reject(e);nl.clear(),yc.clear()}let m_=5,v_=!1;const Zpe="WORKER_BUSY",y_="MERMAID_DISABLED";function Gpe(e){if(Yo&&Yo!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",$g(n)}Yo=e,iu=null;const t=e;Yo.onmessage=n=>{if(Yo!==t)return;const{id:i,ok:s,result:o,error:r}=n.data,l=nl.get(i);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(o))},Yo.onerror=n=>{var i,s;if(Yo===t)if(nl.size!==0){try{v_?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}$g(new Error(`Worker error: ${n.message}`))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},Yo.onmessageerror=n=>{var i,s;if(Yo===t)if(nl.size!==0){try{v_?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}$g(new Error("Worker messageerror"))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function Qpe(){var e;if(Yo)try{$g(new Error("Worker cleared")),(e=Yo.terminate)==null||e.call(Yo)}catch{}Yo=null,iu=null}function kB(e,t,n,i){if(!h_()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=y_,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let o=yc.get(s);return o||(o=(function(r,l,a=1400){if(!h_()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=y_,Promise.reject(c)}if(iu)return Promise.reject(iu);const u=Yo||(iu=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),iu.name="WorkerInitError",iu.code="WORKER_INIT_ERROR",null);if(!u)return Promise.reject(iu);if(nl.size>=m_){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=Zpe,c.inFlight=nl.size,c.max=m_,Promise.reject(c)}return new Promise((c,d)=>{const f=Math.random().toString(36).slice(2);let p,g=!1;const m=()=>{g||(g=!0,p!=null&&globalThis.clearTimeout(p),nl.delete(f))},y={resolve:w=>{m(),c(w)},reject:w=>{m(),d(w)}};nl.set(f,y);try{u.postMessage({id:f,action:r,payload:l})}catch(w){return nl.delete(f),void d(w)}p=globalThis.setTimeout(()=>{const w=new Error("Worker call timed out");w.name="WorkerTimeout",w.code="WORKER_TIMEOUT";const k=nl.get(f);k&&k.reject(w)},a)})})(e,t,n),yc.set(s,o),o.then(()=>{yc.get(s)===o&&yc.delete(s)},()=>{yc.get(s)===o&&yc.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)})})})(o,i)}function EYe(e,t,n=1400,i){return kB("canParse",{code:e,theme:t},n,i)}function TYe(e,t,n=1400,i){return kB("findPrefix",{code:e,theme:t},n,i)}var Ype=Object.defineProperty,Jpe=Object.defineProperties,Xpe=Object.getOwnPropertyDescriptors,b_=Object.getOwnPropertySymbols,e0e=Object.prototype.hasOwnProperty,t0e=Object.prototype.propertyIsEnumerable,k_=(e,t,n)=>t in e?Ype(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t)=>{for(var n in t||(t={}))e0e.call(t,n)&&k_(e,n,t[n]);if(b_)for(var n of b_(t))t0e.call(t,n)&&k_(e,n,t[n]);return e},dn=(e,t)=>Jpe(e,Xpe(t)),Ti=(e,t,n)=>new Promise((i,s)=>{var o=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?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const n0e="__global__",Wy="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",u8=(()=>{const e=globalThis;if(e[Wy])return e[Wy];const t={scopedCustomComponents:{},revision:vl(0)};return e[Wy]=t,t})(),A_=u8.revision,i0e=Symbol("markstreamCustomComponents"),s0e=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 Lp(e){return s0e.has(String(e).trim().toLowerCase())}function o0e(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function qy(e={}){const t={};for(const[n,i]of Object.entries(e))if(i!=null){t[n]=i;for(const s of new Set([Ur(n),Ur(o0e(n))]))!s||Lp(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=i)}return t}function Cs(e){const t=an(i0e,null);return F(()=>{var n;return A_.value,(function(i,s={}){return A_.value,At(At(At({},qy(u8.scopedCustomComponents[n0e]||{})),qy(s)),qy((function(o){return o&&u8.scopedCustomComponents[o]||{}})(i)))})(e?.(),(n=t?.value)!=null?n:{})})}const r0e=["aria-label"],l0e={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"},a0e={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"},oi=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},kr=oi(tt({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(b(),I("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(b(),I("svg",a0e,[...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(),I("svg",l0e,[...n[0]||(n[0]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,r0e))}),[["__scopeId","data-v-be21ab83"]]);kr.install=e=>{e.component(kr.__name,kr)};const u0e={class:"emoji-node"},nr=oi(tt({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(b(),I("span",u0e,B(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);nr.install=e=>{e.component(nr.__name,nr)};const c0e=["id"],d0e=["title"],Ar=oi(tt({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const i=document.querySelector(t);i?i.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(i,s)=>(b(),I("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[C("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+B(e.node.id)+"]",9,d0e)],8,c0e))}}),[["__scopeId","data-v-c1463a29"]]);Ar.install=e=>{e.component(Ar.__name,Ar)};const AB=(()=>{try{return!1}catch{}return!1})();function Uy(e){AB&&console.warn(e)}function C_(e,t="safe",n){return Ib(e,t,n)}function CB(e){return U1e(e)}function Ky(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function Nb(e,t="safe"){const n=String(e.tag||e.type||"").trim(),i=Bg((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),Ky(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),Ky(r.value)]):Object.entries(s).map(([r,l])=>[r,Ky(l)]):null,t,n);var s;if(!i)return;const o=CB(C1(i));return Object.keys(o).length>0?o:void 0}function w_(e,t,n=!1){const i=Object.entries(t??{}),s=i.length>0?i.map(([o,r])=>r===""?` ${o}`:` ${o}="${r}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function Eh(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function Vy(e,t,n,i,s,o,r=!1){const l=(function(d,f){return oB(d,f)})(e,i);if(Sp.has(e.toLowerCase())||!l&&tB(e,o))return null;if(!l&&Mb(e,o))return r?[w_(e,t,!0)]:[w_(e,t),...n,`</${e}>`];const a=Ib(t,o,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=i[e]||i[e.toLowerCase()],f=CB(a);return cn(d,dn(At({},f),{key:c}),n.length>0?n:void 0)}return cn(e,dn(At({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function wB(e,t){return Z1e(e,t)}function Jm(e,t,n="safe"){if(!e)return[];try{return(function(o,r,l="safe"){let a=0;const u=[],c=[];for(const d of o)if(d.type==="text")(u.length>0?u[u.length-1].children:c).push(d.content);else if(d.type==="self_closing"){const f=Vy(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);Eh(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 p=-1;for(let g=u.length-1;g>=0;g--)if(u[g].tagName.toLowerCase()===f){p=g;break}if(p!==-1)for(;u.length>p;){const g=u.pop(),m=Vy(g.tagName,g.attrs||{},g.children,r,g.autoKey,l);u.length>0?Eh(u[u.length-1].children,m):Eh(c,m),g.tagName.toLowerCase()!==f&&u.length>p&&Uy(`Auto-closing unclosed tag: <${g.tagName}>`)}else Uy(`Ignoring closing tag with no matching opening tag: </${d.tagName}>`)}for(;u.length>0;){const d=u.pop(),f=Vy(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?Eh(u[u.length-1].children,f):Eh(c,f),Uy(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(rB(e),t,n)}catch(s){return i=s,AB&&console.error("Failed to parse HTML to VNodes:",i),null}var i}const f0e=["innerHTML"],Cr=oi(tt({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=an("markstreamHtmlPolicy",void 0),i=F(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=Cs(()=>t.customId),o=tt({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(i.value==="escape")return{mode:"html",content:mf(l,i.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=Jm(l,s.value,i.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!wB(l,s.value))return{mode:"html",content:mf(l,i.value)};const a=Jm(l,s.value,i.value);return a===null?{mode:"html",content:mf(l,i.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(b(),I("span",{key:0,class:De(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[V(h(o),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(b(),I("span",{key:1,class:De(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},B(r.value.content),3)):(b(),I("span",{key:2,class:De(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,f0e))}}),[["__scopeId","data-v-d17f12b0"]]);Cr.install=e=>{e.component(Cr.__name,Cr)};const h0e={class:"inline-code"},p0e={key:0},xo=oi(tt({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=Of(),i=an("markstreamFade",void 0),s=an("markstreamTextStreamState",void 0),o=an("markstreamStreamVersion",void 0),r=F(()=>{const k=n.fade;return k===""||k===!0||k==="true"||k!==!1&&k!=="false"&&void 0}),l=F(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=F(()=>{var k;return String((k=t.node.code)!=null?k:"")}),u=F(()=>!l.value),c=F(()=>{var k;const A=(k=n["index-key"])!=null?k:n.indexKey;return A==null||A===""?"":String(A)}),d=Z(t.node.code),f=Z(""),p=Z(0);let g;function m(){g?.(),g=void 0}function y(){m(),f.value&&(d.value=d.value+f.value,f.value="")}Qe([()=>t.node.code,c,l],([k])=>{const A=String(k??""),v=c.value,x=cB({nextContent:A,persistedContent:v?s?.get(v):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value});d.value=x.settledContent,f.value=x.streamedDelta,x.appended?(p.value+=1,(function(){if(!f.value||g||!o)return;const E=o.value;g=Qe(()=>o.value,S=>{S!==E&&y()},{flush:"sync"})})()):f.value||m(),v&&s?.set(v,A)},{immediate:!0}),Rf(m);const w=F(()=>p.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(k,A)=>(b(),I("code",h0e,[u.value?(b(),I(Be,{key:0},[Ue(B(a.value),1)],64)):(b(),I(Be,{key:1},[d.value?(b(),I("span",p0e,B(d.value),1)):ne("",!0),f.value?(b(),I("span",{key:1,class:De(["inline-code-stream-delta",[w.value]]),onAnimationend:y},B(f.value),35)):ne("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);xo.install=e=>{e.component(xo.__name,xo)};const c8=Z(!1),x_=Z(""),__=Z("top"),x1=Z(null),_1=Z(null),d8=Z(null),f8=Z(null),S_=Z(null);let Dg=null,Rg=null,h8=0;function xB(){Dg&&(clearTimeout(Dg),Dg=null),Rg&&(clearTimeout(Rg),Rg=null)}let X0=!1,eg=null,M_=!1;function g0e(e,t,n="top",i=!1,s,o){if(!e)return;const r=++h8;xB();const l=()=>Ti(null,null,function*(){var a,u;if(yield(function(){return Ti(this,null,function*(){if(!X0&&!M_&&typeof document<"u"){eg!=null||(eg=Ti(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([ns(()=>import("./vue.runtime.esm-bundler-D5Z_EMXj.js"),[]),ns(()=>import("./Tooltip-CbHFsn-6.js"),[])]),p=document.createElement("div");p.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(p),c({setup:()=>()=>{var g;return d(f,{visible:c8.value,"anchor-el":x1.value,content:x_.value,placement:__.value,id:_1.value,originX:d8.value,originY:f8.value,isDark:(g=S_.value)!=null?g:void 0})}}).mount(p),X0=!0}));try{yield eg}catch(c){X0=!1,eg=null,M_=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),X0&&r===h8){_1.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,x1.value=e,x_.value=t,__.value=n,d8.value=(a=s?.x)!=null?a:null,f8.value=(u=s?.y)!=null?u:null,S_.value=typeof o=="boolean"?o:null,c8.value=!0;try{e.setAttribute("aria-describedby",_1.value)}catch{}}});i?l():Dg=setTimeout(l,80)}function m0e(e=!1){h8+=1,xB();const t=()=>{if(x1.value&&_1.value)try{x1.value.removeAttribute("aria-describedby")}catch{}c8.value=!1,x1.value=null,_1.value=null,d8.value=null,f8.value=null};e?t():Rg=setTimeout(t,120)}const v0e={"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..."},y0e=Symbol("markstreamI18nFallback");function _B(e,t){var n;return(n=t?.[e])!=null?n:v0e[e]}const p8=(e,t)=>{var n;return(n=_B(e,t))!=null?n:(function(i){return(i.split(".").pop()||i).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function I_(e,t){return{t(n){const i=_B(n,t);if(e.te&&i!=null&&!e.te(n))return p8(n,t);const s=e.t(n);return s===n&&i!=null?p8(n,t):s}}}function b0e(){const e=(function(){var n,i,s;try{const o=As(),r=y0e,l=o?.provides,a=(n=o?.appContext)==null?void 0:n.provides;return(s=(i=l?.[r])!=null?i:a?.[r])!=null?s:null}catch{}return null})(),t=(function(){var n,i;try{const s=As(),o=s?.proxy,r=o?.$t;if(typeof r=="function"){const u=o?.$te;return{t:r.bind(o),te:typeof u=="function"?u.bind(o):void 0}}const l=(i=(n=s?.appContext)==null?void 0:n.config)==null?void 0:i.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 I_(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const i=n();if(i&&typeof i.t=="function")return I_({t:i.t.bind(i),te:typeof i.te=="function"?i.te.bind(i):void 0},e)}catch{}}catch{}return{t:n=>p8(n,e)}}const SB=Symbol("ViewportPriority"),MB=Symbol("ViewportPriorityOptions"),IB=Symbol("OffscreenHeavyNodeDeferral"),k0e=F(()=>!1),Zc="400px";function Fb(){return an(MB,void 0)}function Bb(){return an(IB,k0e)}function A0e(e,t){var n,i;const s=typeof window<"u"&&typeof document<"u",o=typeof t=="boolean"?Z(t):t,r=s?(n=window.requestIdleCallback)!=null?n:S=>window.setTimeout(()=>S({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(i=window.cancelIdleCallback)!=null?i:S=>window.clearTimeout(S):null,a=new WeakMap;let u=1;const c=new Map,d=new Map,f=new Set;let p=null,g=null;function m(S){if(!S)return"viewport";let M=a.get(S);return M||(M=u++,a.set(S,M)),String(M)}function y(){if(p!=null){try{l?.(p)}catch{}p=null}}function w(S){if(S){const M=c.get(S);if(M&&!M.targets.size){try{M.io.disconnect()}catch{}c.delete(S)}}d.size||f.size||y()}function k(S){const M=d.get(S);if(!M)return;const _=c.get(M.bucketKey);if(!M.visible.value){M.visible.value=!0;try{M.resolve()}catch{}}try{_?.io.unobserve(S)}catch{}_?.targets.delete(S),d.delete(S),f.delete(S),w(M.bucketKey)}function A(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&p==null&&f.size&&(p=r(()=>{p=null;const S=f.values().next().value;S&&(f.delete(S),k(S),f.size&&A())},{timeout:1200}))}function v(S,M){if(!s||typeof IntersectionObserver>"u")return null;const _=(function(O,R){var W,z,G;return{root:(W=e?.(O??null))!=null?W:null,rootMargin:(z=R?.rootMargin)!=null?z:Zc,threshold:(G=R?.threshold)!=null?G:0}})(S,M),N=[m((D=_).root),D.rootMargin,D.threshold].join("\0");var D;const T=c.get(N);if(T)return{key:N,bucket:T};let $;try{$=new IntersectionObserver(O=>{for(const R of O)(R.isIntersecting||R.intersectionRatio>0)&&k(R.target)},{root:_.root,rootMargin:_.rootMargin,threshold:_.threshold})}catch{return null}const P={io:$,targets:new Map};return c.set(N,P),{key:N,bucket:P}}function x(){if(s&&o.value)for(const[S,M]of Array.from(d.entries())){const _=v(S,M.opts);if(!_){k(S);continue}if(_.key===M.bucketKey)continue;const N=M.bucketKey,D=c.get(N);try{D?.io.unobserve(S)}catch{}D?.targets.delete(S),M.bucketKey=_.key,_.bucket.targets.set(S,M),_.bucket.io.observe(S),w(N)}}Qe(o,S=>{if(!S){for(const M of Array.from(d.keys()))k(M);y()}},{flush:"sync"});const E=(S,M)=>{const _=Z(!1);let N,D=!1;const T=new Promise(R=>{N=()=>{D||(D=!0,R())}}),$=()=>{const R=d.get(S);if(!R)return f.delete(S),void w();const W=c.get(R.bucketKey);try{W?.io.unobserve(S)}catch{}W?.targets.delete(S),d.delete(S),f.delete(S),w(R.bucketKey)};if(!s||!o.value)return _.value=!0,N(),{isVisible:_,whenVisible:T,destroy:$};const P=v(S,M);if(!P)return _.value=!0,N(),{isVisible:_,whenVisible:T,destroy:$};const O={resolve:N,visible:_,bucketKey:P.key,opts:M};return d.set(S,O),P.bucket.targets.set(S,O),P.bucket.io.observe(S),s&&g==null&&(g=window.requestAnimationFrame(()=>{g=null,x()})),M?.allowIdle!==!1&&(f.add(S),A()),{isVisible:_,whenVisible:T,destroy:$}};return E.refresh=x,Pn(SB,E),E}function $b(){var e,t;const n=an(SB,void 0);if(n)return n;const i=new WeakMap,s=new Map,o=new Set;let r=null;const l=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:p=>window.setTimeout(()=>p({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:p=>window.clearTimeout(p):null,u=()=>{if(r!=null){try{a?.(r)}catch{}r=null}},c=p=>{if(!p)return;const g=s.get(p);if(g&&!g.targets.size){try{g.io.disconnect()}catch{}s.delete(p)}},d=p=>{const g=i.get(p);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(p)}catch{}i.delete(p),m?.targets.delete(p),o.delete(p),c(g.bucketKey),o.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&o.size&&(r=l(()=>{r=null;const p=o.values().next().value;p&&(o.delete(p),d(p),o.size&&f())},{timeout:1200}))};return(p,g)=>{const m=Z(!1);let y,w=!1;const k=new Promise(x=>{y=()=>{w||(w=!0,x())}}),A=()=>{const x=i.get(p);if(!x)return o.delete(p),void(o.size||u());const E=s.get(x.bucketKey);try{E?.io.unobserve(p)}catch{}i.delete(p),E?.targets.delete(p),o.delete(p),c(x.bucketKey),o.size||u()},v=(x=>{var E,S;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const M=($=>{var P,O;return[(P=$?.rootMargin)!=null?P:Zc,(O=$?.threshold)!=null?O:0].join("\0")})(x),_=s.get(M);if(_)return{key:M,bucket:_};const N=(E=x?.rootMargin)!=null?E:Zc;let D;try{D=new IntersectionObserver($=>{for(const P of $)(P.isIntersecting||P.intersectionRatio>0)&&d(P.target)},{root:null,rootMargin:N,threshold:(S=x?.threshold)!=null?S:0})}catch{return null}const T={io:D,targets:new Set};return s.set(M,T),{key:M,bucket:T}})(g);return v?(i.set(p,{resolve:y,visible:m,bucketKey:v.key}),v.bucket.targets.add(p),v.bucket.io.observe(p),g?.allowIdle!==!1&&(o.add(p),f()),{isVisible:m,whenVisible:k,destroy:A}):(m.value=!0,y(),{isVisible:m,whenVisible:k,destroy:A})}}function C0e(e,t){var n,i;const s=(i=(n=e.indexKey)!=null?n:t["index-key"])!=null?i:t.indexKey;return s==null||s===""?"":String(s)}const w0e=["data-markstream-viewport-pending"],x0e=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],_0e={key:1,class:"image-placeholder"},S0e={key:1,class:"image-node__raw-text"},M0e={key:2,class:"image-shimmer-overlay"},I0e={key:1,class:"image-node__raw-text"},E0e={key:3,class:"image-error"},mu=oi(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,i,s;const o=e,r=t,l=Z(!1),a=Z(!1),u=Z(""),c=Z("primary"),d=Z(null),f=Of(),p=an(o8,null),g=$b(),m=Fb(),y=Bb(),w=F(()=>Yw(o.node.src)),k=F(()=>Yw(o.fallbackSrc)),A=(s=(i=(n=As())==null?void 0:n.vnode.el)==null?void 0:i.querySelector)==null?void 0:s.call(i,"img"),v=typeof window<"u"&&A?.getAttribute("src")===(w.value||k.value),x=Z(typeof window>"u"||v||!y.value),E=vl(null);let S="",M=null;const _=F(()=>u.value),N=F(()=>!o.lazy),D=F(()=>typeof window<"u"&&y.value&&!v),T=F(()=>!D.value||x.value),$=F(()=>T.value?_.value:""),P=F(()=>{var ce,pe;return(pe=(ce=m?.value.heavyBlockMargin)!=null?ce:m?.value.rootMargin)!=null?pe:Zc}),O=F(()=>!o.node.loading&&c.value!=="failed"&&u.value.length>0),R=F(()=>c.value==="failed"),W=F(()=>(!N.value||D.value&&!x.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),z=F(()=>C0e(o,f));function G(ce=z.value){ce&&d.value&&p?.reportHeight(ce,d.value.offsetHeight)}function K(ce=z.value){ce&&kt(()=>{G(ce)})}function H(){M&&(clearTimeout(M),M=null)}function q(){const ce=z.value;ce&&S!==ce&&(S&&p?.markSettled(S),H(),S=ce,p?.markPending(ce),typeof window<"u"&&(M=window.setTimeout(()=>{S===ce&&(K(ce),X())},8e3)))}function X(){return Ti(this,null,function*(){const ce=S;ce&&(H(),S="",yield kt(),G(ce),p?.markSettled(ce))})}function ee(){if(c.value==="primary"&&k.value&&k.value!==u.value)return c.value="fallback",u.value=k.value,l.value=!1,a.value=!1,void K();c.value="failed",a.value=!0,r("error",u.value),K()}function ue(){l.value=!0,a.value=!1,r("load",_.value),K()}function ie(ce){ce.preventDefault(),l.value&&!a.value&&r("click",[ce,_.value])}const{t:xe}=b0e();return Qe([w,k,()=>o.node.loading],()=>(l.value=!1,a.value=!1,o.node.loading||w.value?(u.value=w.value,void(c.value="primary")):k.value?(u.value=k.value,void(c.value="fallback")):(u.value="",c.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Qe([d,D],([ce,pe],Ne,te)=>{var ye;if((ye=E.value)==null||ye.destroy(),E.value=null,!pe||x.value)return void(x.value=!0);if(!ce)return void(x.value=!1);let j=!0;const Y=g(ce,{rootMargin:P.value,allowIdle:!1});E.value=Y,x.value=Y.isVisible.value,Y.whenVisible.then(()=>{j&&E.value===Y&&(x.value=!0)}),te(()=>{j=!1,Y.destroy(),E.value===Y&&(E.value=null)})},{immediate:!0}),Qe([O,l,a,_,()=>o.lazy,T],([ce,pe,Ne,te,ye,j])=>ce&&te&&!Ne&&j?pe?(X(),void K()):ye?(q(),void K()):void(pe||Ne||q()):(X(),void K()),{flush:"post",immediate:!0}),Gn(()=>{var ce;(ce=E.value)==null||ce.destroy(),E.value=null,(function(){const pe=S;pe&&(H(),S="",p?.markSettled(pe))})()}),(ce,pe)=>{var Ne,te,ye,j,Y;return b(),I("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":D.value&&!x.value?"true":void 0},[O.value?(b(),I("img",{key:0,src:$.value||void 0,alt:String((te=(Ne=o.node.alt)!=null?Ne:o.node.title)!=null?te:""),title:String((j=(ye=o.node.title)!=null?ye:o.node.alt)!=null?j:""),class:De(["image-node__img",{"is-loading":!N.value&&!l.value,"is-loaded":N.value||l.value,"has-natural-size":l.value,"cursor-pointer":l.value}]),loading:o.lazy?"lazy":void 0,fetchpriority:N.value?"high":void 0,decoding:N.value?"sync":"async",tabindex:l.value?0:-1,"aria-label":(Y=o.node.alt)!=null?Y:h(xe)("image.preview"),onError:ee,onLoad:ue,onClick:ie},null,42,x0e)):ne("",!0),e.node.loading&&!a.value?(b(),I("span",_0e,[o.usePlaceholder?En(ce.$slots,"placeholder",{key:0,node:o.node,displaySrc:_.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[pe[0]||(pe[0]=C("span",{class:"image-shimmer"},null,-1))],!0):(b(),I("span",S0e,B(e.node.raw),1))])):ne("",!0),W.value&&!e.node.loading?(b(),I("span",M0e,[o.usePlaceholder?En(ce.$slots,"placeholder",{key:0,node:o.node,displaySrc:_.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[pe[1]||(pe[1]=C("span",{class:"image-shimmer"},null,-1))],!0):(b(),I("span",I0e,B(e.node.raw),1))])):ne("",!0),R.value?(b(),I("span",E0e,[En(ce.$slots,"error",{node:o.node,displaySrc:_.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[pe[2]||(pe[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,B(h(xe)("image.loadError")),1)],!0)])):ne("",!0)],8,w0e)}}}),[["__scopeId","data-v-046e82ac"]]);mu.install=e=>{e.component(mu.__name,mu)};const T0e={key:2},Zl=tt({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=Cs(()=>t.customId),i=an("markstreamHtmlPolicy",void 0),s=an("markstreamNestedRendererProps",void 0),o=F(()=>{var g;return(g=i?.value)!=null?g:"safe"}),r=F(()=>{var g,m;const y=(g=s?.value)!=null?g:{};return dn(At({},y),{customId:(m=t.customId)!=null?m:y.customId,htmlPolicy:o.value})}),l=rl({loader:()=>Promise.resolve().then(()=>Kb),suspensible:!1}),a=F(()=>t.components[String(t.node.type)]),u=F(()=>!!(a.value&&n.value[t.node.type]&&!Lp(String(t.node.type)))),c=F(()=>u.value?Nb(t.node,o.value):void 0),d=F(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=F(()=>{var g;return String((g=t.node.content)!=null?g:"")}),p=F(()=>{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(),fe(Ms(a.value),Yn({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:he(()=>[d.value?(b(),fe(h(l),Yn({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(),fe(h(l),Yn({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"])):ne("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(b(),fe(Ms(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(),I("span",T0e,B(p.value),1)):ne("",!0)}}),E_=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function L0e(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return dn(At(At({},E_),n),{enabled:(t=n.enabled)==null||t})}return At({},E_)}function Db(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,i=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=i}function EB(e){var t,n;const i=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(i.length<3)return"";const s=i[0];if(s!=="`"&&s!=="~"||i[1]!==s||i[2]!==s)return"";let o=3;for(;i[o]===s;)o+=1;return i.slice(o).trim()}function T_(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function N0e(e){var t;return e.diff===!0||T_(e.language)||T_(EB(String((t=e.raw)!=null?t:"")))}function F0e(e,t,n){const i=(function(s){const o=EB(s);if(!o)return"";const r=o.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:i||t,caption:i?n?`Diff / ${t}`:t:""}}const B0e=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],$0e={key:0,translate:"no",class:"markstream-pre__diff-code"},D0e={class:"markstream-pre__diff-pane-content"},R0e={class:"markstream-pre__diff-number","aria-hidden":"true"},z0e={class:"markstream-pre__diff-content"},O0e={class:"markstream-pre__diff-content-inner"},P0e={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},j0e=["textContent"],H0e=["textContent"],Jo=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(ie,xe){const ce=String(ie??"");return xe?ce:ce.replace(/\r\n$|\n$|\r$/,"")}const i=F(()=>{var ie,xe,ce;const pe=String((xe=(ie=t.node)==null?void 0:ie.language)!=null?xe:"");return String((ce=String(pe).split(/\s+/g)[0])!=null?ce:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=F(()=>`language-${i.value}`),o=F(()=>{var ie;return t.loading===!0||((ie=t.node)==null?void 0:ie.loading)===!0}),r=F(()=>{var ie;return n((ie=t.node)==null?void 0:ie.code,o.value)});let l="",a=1;const u=F(()=>(function(ie){let xe=0,ce=1;ie.startsWith(l)&&(xe=l.length,ce=a,xe>0&&ie[xe-1]==="\r"&&ie[xe]===` +`&&xe++);for(let pe=xe;pe<ie.length;pe++)ie[pe]===` +`?ce++:ie[pe]==="\r"&&(ce++,ie[pe+1]===` +`&&pe++);return l=ie,a=ce,ce})(r.value)),c=F(()=>r.value.split(/\r\n|\n|\r/));let d=0,f="";const p=F(()=>{const ie=u.value;ie<d&&(d=0,f="");for(let xe=d+1;xe<=ie;xe++)f+=`${f?` +`:""}${xe}`;return d=ie,f}),g=F(()=>{var ie;return t.showLineNumbers===!0&&((ie=t.node)==null?void 0:ie.diff)===!0}),m=F(()=>g.value&&t.diffInline===!0),y=F(()=>{const ie=Number(t.reservedHeightPx);if(!Number.isFinite(ie)||ie<=0)return;const xe=`${Math.ceil(ie)}px`;return o.value?{maxHeight:xe,overflow:"auto"}:{height:xe,minHeight:xe,maxHeight:xe,overflow:"auto"}}),w=["diff ","index ","--- ","+++ ","@@ "];function k(ie){return String(ie??"").trim().length===0}function A(ie,xe="context",ce={}){const pe=k(ie);return{code:ie,kind:pe&&xe!=="hunk"&&xe!=="spacer"&&!ce.preserveBlankKind?"context":xe,empty:pe}}function v(ie){const xe=n(ie,o.value);return xe?xe.split(/\r\n|\n|\r/):[]}function x(ie,xe){return!k(ie[xe])||xe<ie.length-1}function E(ie){return ie.startsWith("-")&&!ie.startsWith("---")}function S(ie){return ie.startsWith("+")&&!ie.startsWith("+++")}function M(ie){return ie.some(xe=>w.some(ce=>xe.startsWith(ce)))}function _(ie,xe){return xe||!ie.startsWith(" ")||ie.startsWith(" ")?ie:` ${ie}`}function N(ie,xe){const ce=ie.length,pe=xe.length,Ne=[];let te=0;for(;te<ce&&te<pe&&ie[te]===xe[te];)Ne.push({originalIndex:te,modifiedIndex:te}),te++;const ye=[];let j=ce-1,Y=pe-1;for(;j>=te&&Y>=te&&ie[j]===xe[Y];)ye.unshift({originalIndex:j,modifiedIndex:Y}),j--,Y--;const ve=j-te+1,re=Y-te+1;if(ve<=0||re<=0||o.value||(ve+1)*(re+1)>15e5)return Ne.concat(ye);const se=re+1,U=new Uint32Array((ve+1)*(re+1));for(let Ie=ve-1;Ie>=0;Ie--)for(let je=re-1;je>=0;je--){const ke=Ie*se+je;if(ie[te+Ie]===xe[te+je])U[ke]=U[(Ie+1)*se+je+1]+1;else{const Le=U[(Ie+1)*se+je],it=U[Ie*se+je+1];U[ke]=Le>=it?Le:it}}const J=[];let de=0,me=0;for(;de<ve&&me<re;)ie[te+de]===xe[te+me]?(J.push({originalIndex:te+de,modifiedIndex:te+me}),de++,me++):U[(de+1)*se+me]>=U[de*se+me+1]?de++:me++;return Ne.concat(J,ye)}function D(ie){var xe;const ce=(function(){var Y,ve;const re=t.diffHideUnchangedRegions;if(re==null||re===!1)return null;const se=re===!0?{}:re;return se.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((Y=se.contextLineCount)!=null?Y:2)),minimumLineCount:Math.max(1,Math.floor((ve=se.minimumLineCount)!=null?ve:4))}})();if(!ce||ie.length<1||ie.length>2||ie.length===2&&ie[0].lines.length!==ie[1].lines.length)return ie;const pe=ie[0].lines,Ne=(xe=ie[1])==null?void 0:xe.lines,te=Y=>pe[Y].kind==="context"&&(Ne===void 0||Ne[Y].kind==="context"&&pe[Y].code===Ne[Y].code),ye=[];let j=0;for(;j<pe.length;){const Y=j;for(;j<pe.length&&te(j);)j++;const ve=j;if(ve-Y>=ce.minimumLineCount){const re=Y+(Y===0?0:ce.contextLineCount),se=ve-(ve===pe.length?0:ce.contextLineCount);se-re>=ce.minimumLineCount&&ye.push({start:re,end:se})}j===Y&&j++}return ye.length?ie.map((Y,ve)=>{const re=[];let se=0;for(const U of ye)re.push(...Y.lines.slice(se,U.start)),re.push({code:ve===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${Y.key}-collapsed-${U.start}-${U.end}`,number:""}),se=U.end;return re.push(...Y.lines.slice(se)),dn(At({},Y),{lines:re})}):ie}const T=F(()=>{var ie,xe,ce,pe;if(!g.value)return[];const Ne=(function(ve){const re=ve.some(U=>E(U)),se=ve.some(U=>S(U));return re&&se||(function(){var U,J,de,me;if(i.value==="diff")return!0;const Ie=(me=(de=String((J=(U=t.node)==null?void 0:U.raw)!=null?J:"").split(/\r?\n/,1)[0])==null?void 0:de.trim())!=null?me:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(Ie)})()&&(re||se)})(c.value),te=(function(){var ve,re;return((ve=t.node)==null?void 0:ve.originalCode)!=null||((re=t.node)==null?void 0:re.updatedCode)!=null})();if(m.value){const ve=te?(function(re,se){const U=v(re),J=v(se),de=N(U,J);if(de.length>0){const it=[];let Fe=0,Re=0;for(const Ke of de){for(;Fe<Ke.originalIndex;)it.push(dn(At({},A(U[Fe],"removed",{preserveBlankKind:x(U,Fe)})),{key:`inline-removed-source-${Fe}`,number:Fe+1})),Fe++;for(;Re<Ke.modifiedIndex;)it.push(dn(At({},A(J[Re],"added",{preserveBlankKind:x(J,Re)})),{key:`inline-added-source-${Re}`,number:Re+1})),Re++;it.push(dn(At({},A(J[Ke.modifiedIndex])),{key:`inline-context-source-${Ke.originalIndex}-${Ke.modifiedIndex}`,number:Ke.modifiedIndex+1})),Fe=Ke.originalIndex+1,Re=Ke.modifiedIndex+1}for(;Fe<U.length;)it.push(dn(At({},A(U[Fe],"removed",{preserveBlankKind:x(U,Fe)})),{key:`inline-removed-source-${Fe}`,number:Fe+1})),Fe++;for(;Re<J.length;)it.push(dn(At({},A(J[Re],"added",{preserveBlankKind:x(J,Re)})),{key:`inline-added-source-${Re}`,number:Re+1})),Re++;return it}const me=[];let Ie=0,je=U.length-1,ke=J.length-1;for(;Ie<=je&&Ie<=ke&&U[Ie]===J[Ie];)me.push(dn(At({},A(J[Ie])),{key:`inline-prefix-${Ie}`,number:Ie+1})),Ie++;const Le=[];for(;je>=Ie&&ke>=Ie&&U[je]===J[ke];)Le.unshift(dn(At({},A(J[ke])),{key:`inline-suffix-${ke}`,number:ke+1})),je--,ke--;for(let it=Ie;it<=je;it++)me.push(dn(At({},A(U[it],"removed",{preserveBlankKind:x(U,it)})),{key:`inline-removed-source-${it}`,number:it+1}));for(let it=Ie;it<=ke;it++)me.push(dn(At({},A(J[it],"added",{preserveBlankKind:x(J,it)})),{key:`inline-added-source-${it}`,number:it+1}));return me.concat(Le)})((ie=t.node)==null?void 0:ie.originalCode,(xe=t.node)==null?void 0:xe.updatedCode):(function(re){const se=[];let U=1,J=1;const de=M(re);for(const[me,Ie]of re.entries())if(Ie.startsWith("@@")){const je=Ie.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);je&&(U=Number(je[1]),J=Number(je[2])),se.push(dn(At({},A(Ie,"hunk")),{key:`inline-hunk-${me}`,number:""}))}else if(E(Ie))se.push(dn(At({},A(_(Ie.slice(1),de),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${me}`,number:U++}));else if(S(Ie))se.push(dn(At({},A(_(Ie.slice(1),de),"added",{preserveBlankKind:!0})),{key:`inline-added-${me}`,number:J++}));else{const je=de&&Ie.startsWith(" ")?Ie.slice(1):Ie;se.push(dn(At({},A(je)),{key:`inline-context-${me}`,number:J})),U++,J++}return se})(c.value);return D([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:ve}])}if(!Ne&&te)return(function(ve,re){const se=v(ve),U=v(re),J=N(se,U),de=[],me=[];let Ie=0,je=0,ke=0;const Le=(it,Fe)=>{const Re=Math.max(it-Ie,Fe-je);for(let Ke=0;Ke<Re;Ke++){const ht=Ie+Ke,ot=je+Ke;de.push(ht<it?dn(At({},A(se[ht],"removed",{preserveBlankKind:x(se,ht)})),{key:`original-changed-${ke}-${ht}`,number:ht+1}):dn(At({},A("","spacer")),{key:`original-spacer-${ke}-${Ke}`,number:""})),me.push(ot<Fe?dn(At({},A(U[ot],"added",{preserveBlankKind:x(U,ot)})),{key:`modified-changed-${ke}-${ot}`,number:ot+1}):dn(At({},A("","spacer")),{key:`modified-spacer-${ke}-${Ke}`,number:""}))}Ie=it,je=Fe,ke++};for(const it of J)Le(it.originalIndex,it.modifiedIndex),de.push(dn(At({},A(se[it.originalIndex])),{key:`original-context-${it.originalIndex}-${it.modifiedIndex}`,number:it.originalIndex+1})),me.push(dn(At({},A(U[it.modifiedIndex])),{key:`modified-context-${it.originalIndex}-${it.modifiedIndex}`,number:it.modifiedIndex+1})),Ie=it.originalIndex+1,je=it.modifiedIndex+1;return Le(se.length,U.length),D([{key:"original",className:"markstream-pre__diff-pane--original",lines:de},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:me}])})((ce=t.node)==null?void 0:ce.originalCode,(pe=t.node)==null?void 0:pe.updatedCode);const ye=[],j=[],Y=M(c.value);for(const ve of c.value)if(ve.startsWith("@@"))ye.push(A(ve,"hunk")),j.push(A(ve,"hunk"));else if(ve.startsWith("-")&&!ve.startsWith("---"))ye.push(A(_(ve.slice(1),Y),"removed",{preserveBlankKind:!0}));else if(ve.startsWith("+")&&!ve.startsWith("+++"))j.push(A(_(ve.slice(1),Y),"added",{preserveBlankKind:!0}));else{const re=Y&&ve.startsWith(" ")?ve.slice(1):ve;ye.push(A(re)),j.push(A(re))}return D([{key:"original",className:"markstream-pre__diff-pane--original",lines:ye.map((ve,re)=>dn(At({},ve),{key:`original-${re}`,number:re+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:j.map((ve,re)=>dn(At({},ve),{key:`modified-${re}`,number:re+1}))}])}),$=F(()=>{var ie,xe;if(t.showLineNumbers!==!0)return;let ce=g.value?1:u.value;if(g.value){ce=Math.max(ce,v((ie=t.node)==null?void 0:ie.originalCode).length,v((xe=t.node)==null?void 0:xe.updatedCode).length);for(const Ne of T.value)for(const te of Ne.lines)typeof te.number=="number"&&(ce=Math.max(ce,te.number))}const pe=`${Math.max(2,String(ce).length)}ch`;return{"--markstream-pre-line-number-width":pe,"--markstream-pre-diff-line-number-width":pe,"--markstream-code-padding-left":"calc(var(--markstream-pre-line-number-padding-left, 2ch) + var(--markstream-pre-line-number-width, 2ch) + var(--markstream-pre-line-number-padding-right, 1ch) + var(--markstream-pre-line-number-separator-width, 2px) + var(--markstream-pre-line-number-gap-to-code, 1ch))"}}),P=F(()=>T.value.some(ie=>ie.lines.some(xe=>xe.kind==="collapsed"))),O=F(()=>{const ie=i.value;return ie?`Code block: ${ie}`:"Code block"}),R=Z(null),W=Z([]);let z=null,G=!1,K=null;function H(ie){const xe=Number.parseFloat(String(ie??""));return Number.isFinite(xe)&&xe>0?xe:0}function q(ie,xe){var ce;if(!ie)return xe;if(ie.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const pe=ie.querySelector(".markstream-pre__diff-content"),Ne=pe?.getBoundingClientRect(),te=(ce=Ne?.height)!=null?ce:0;return Math.max(xe,Math.ceil(te))}function X(){G||typeof window>"u"||(z!=null&&window.cancelAnimationFrame(z),z=window.requestAnimationFrame(()=>{z=null,G||(function(){var ie,xe;z=null;const ce=R.value;if(!ce||!g.value||m.value||!ce.classList.contains("is-wrap"))return void(W.value.length&&(W.value=[]));const pe=(function(re){const se=window.getComputedStyle(re),U=H(se.getPropertyValue("--markstream-pre-diff-line-height"));if(U>0)return U;const J=H(se.lineHeight);return J>0?J:18})(ce),Ne=Array.from(ce.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),te=Array.from(ce.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),ye=Math.max(Ne.length,te.length),j=[];for(let re=0;re<ye;re++){const se=q((ie=Ne[re])!=null?ie:null,pe),U=q((xe=te[re])!=null?xe:null,pe),J=Math.max(pe,se,U);j.push({rowHeight:J,originalHeight:se,modifiedHeight:U})}var Y,ve;Y=W.value,ve=j,Y.length===ve.length&&Y.every((re,se)=>{const U=ve[se];return U&&Math.abs(re.rowHeight-U.rowHeight)<=.5&&Math.abs(re.originalHeight-U.originalHeight)<=.5&&Math.abs(re.modifiedHeight-U.modifiedHeight)<=.5})||(W.value=j)})()}))}function ee(ie){K?.disconnect(),K=null,ie&&g.value&&!m.value&&typeof ResizeObserver<"u"&&(K=new ResizeObserver(()=>{X()}),K.observe(ie))}function ue(ie,xe){const ce=W.value[ie];if(!ce)return;const pe=xe==="original"?ce.originalHeight:ce.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(ce.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(pe)}px`}}return Qe(R,ie=>{ee(ie),kt(()=>X())},{flush:"post"}),Qe([g,m,T],()=>{ee(R.value),kt(()=>X())},{flush:"post",immediate:!0}),Gn(()=>{G=!0,z!=null&&(window.cancelAnimationFrame(z),z=null),K?.disconnect(),K=null}),(ie,xe)=>(b(),I("pre",{ref_key:"preRef",ref:R,style:Vt([y.value,$.value]),class:De([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":g.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":P.value}]),"aria-busy":o.value,"aria-label":O.value,"data-language":i.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[g.value?(b(),I("code",$0e,[(b(!0),I(Be,null,yt(T.value,ce=>(b(),I("span",{key:ce.key,class:De(["markstream-pre__diff-pane",ce.className])},[C("span",D0e,[(b(!0),I(Be,null,yt(ce.lines,(pe,Ne)=>(b(),I("span",{key:pe.key,class:De(["markstream-pre__diff-line",[`markstream-pre__diff-line--${pe.kind}`,{"markstream-pre__diff-line--empty":pe.empty}]]),style:Vt(ue(Ne,ce.key))},[xe[0]||(xe[0]=C("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),C("span",R0e,B(pe.number),1),C("span",z0e,[C("span",O0e,B(pe.code),1)])],6))),128))])],2))),128))])):(b(),I(Be,{key:1},[t.showLineNumbers?(b(),I("span",P0e,[C("span",{class:"markstream-pre__line-numbers-text",textContent:B(p.value)},null,8,j0e)])):ne("",!0),C("code",{translate:"no",class:"markstream-pre__code",textContent:B(r.value)},null,8,H0e)],64))],14,B0e))}});Jo.install=e=>{e.component(Jo.__name,Jo)};const ss=oi(tt({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=Of(),i=an("markstreamFade",void 0),s=an("markstreamTextStreamState",void 0),o=an("markstreamStreamVersion",void 0),r=F(()=>{const x=n.fade;return x===""||x===!0||x==="true"||x!==!1&&x!=="false"&&void 0}),l=F(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=F(()=>{var x;const E=(x=n["index-key"])!=null?x:n.indexKey;return E==null||E===""?"":String(E)}),u=Z(t.node.content),c=Z(""),d=Z(0),f=Z(t.node.content);let p;const g=Z(null),m=Z(null);let y="",w=null;function k(){p?.(),p=void 0}function A(){k(),c.value&&(u.value=u.value+c.value,c.value="")}Qe([u,g,m],function(){var x,E;const S=g.value;if(!S)return;const M=String((x=u.value)!=null?x:""),_=m.value;return w||(w=S.firstChild,y=(E=w?.data)!=null?E:""),M.startsWith(y)?!w&&M?(S.textContent=M,w=S.firstChild,void(y=M)):void(M.length>y.length&&_&&(_.appendChild(document.createTextNode(M.slice(y.length))),y=M)):(S.textContent=M,w=S.firstChild,_&&(_.textContent=""),void(y=M))},{immediate:!0}),Qe([()=>t.node.content,a,l],([x])=>{const E=String(x??""),S=a.value,M=cB({nextContent:E,persistedContent:S?s?.get(S):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=M.settledContent,c.value=M.streamedDelta,M.appended?(d.value+=1,(function(){if(!c.value||p||!o)return;const _=o.value;p=Qe(()=>o.value,N=>{N!==_&&A()},{flush:"sync"})})()):c.value||k(),S&&s?.set(S,E)},{immediate:!0}),Rf(k);const v=F(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(x,E)=>(b(),I("span",{class:De([[e.node.center?"text-node-center":""],"text-node"])},[Bn(C("span",{ref_key:"settledTextEl",ref:g},B(f.value),513),[[rs,u.value!==""]]),Bn(C("span",{ref_key:"settledAppendsEl",ref:m},null,512),[[rs,u.value!==""]]),c.value?(b(),I("span",{key:0,class:De(["text-node-stream-delta",[v.value]]),onAnimationend:A},B(c.value),35)):ne("",!0)],2))}}),[["__scopeId","data-v-fd79037c"]]);function Xh(e,t,n){return tt({name:e,inheritAttrs:!1,setup(i,{attrs:s,slots:o}){var r,l;const a=$b(),u=Fb(),c=Bb(),d=typeof window<"u"&&((l=(r=As())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=Z(typeof window>"u"||d||!c.value),p=vl(null);let g=null;function m(y){const w=y&&"$el"in y?y.$el:y;p.value=w instanceof HTMLElement?w:null}return typeof window<"u"&&Qe([p,c],([y,w],k,A)=>{if(g?.destroy(),g=null,!w||f.value)return void(f.value=!0);if(!y)return;let v=!0;const x=a(y,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});g=x,f.value=x.isVisible.value,x.whenVisible.then(()=>{v&&g===x&&(f.value=!0)}),A(()=>{v=!1,x.destroy(),g===x&&(g=null)})},{immediate:!0}),Gn(()=>{g?.destroy(),g=null}),()=>cn(f.value?t:n,dn(At({},s),{ref:m}),o)}})}ss.install=e=>{e.component(ss.__name,ss)};const Xm=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 i,s,o,r,l,a,u;const c=xv(String((s=(i=n.node)==null?void 0:i.language)!=null?s:"")),d=u_[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):u_[""]),f=N0e(n.node),p=F0e(String((r=(o=n.node)==null?void 0:o.raw)!=null?r:""),d,f),g=n.monacoOptions,m=f&&((l=n.estimatedDiffInline)!=null?l:Db(g??{},typeof window>"u"?0:window.innerWidth)),y=g?.diffAppearance,w=y==="dark"||y!=="light"&&n.isDark===!0,k=typeof g?.fontSize=="number"&&Number.isFinite(g.fontSize)&&g.fontSize>0?g.fontSize:12,A=typeof g?.lineHeight=="number"&&Number.isFinite(g.lineHeight)&&g.lineHeight>0?g.lineHeight:k===12?18:Math.max(12,Math.round(1.5*k)),v=typeof g?.tabSize=="number"&&Number.isFinite(g.tabSize)&&g.tabSize>0?g.tabSize:4,x=f?0:8,E=typeof((a=g?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(g.padding.top)&&g.padding.top>=0?g.padding.top:x,S=typeof((u=g?.padding)==null?void 0:u.bottom)=="number"&&Number.isFinite(g.padding.bottom)&&g.padding.bottom>=0?g.padding.bottom:x,M=typeof g?.fontFamily=="string"?g.fontFamily.trim():"",_=At(At({fontSize:`${k}px`,lineHeight:`${A}px`,tabSize:v,paddingTop:`${E}px`,paddingBottom:`${S}px`,"--markstream-pre-line-number-top":`${E}px`},f?{"--markstream-pre-diff-line-height":`${A}px`}:{}),M?{"--markstream-code-font-family":M}:{}),N=()=>cn("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"},[cn("svg",{class:"action-icon",width:"14",height:"14"})]),D=n.isShowPreview!==!1&&(c==="html"||c==="svg"),T=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||D&&n.showPreviewButton!==!1,$=O=>{if(O!=null)return typeof O=="number"?`${O}px`:String(O)},P=At(At(At({"--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(--markstream-code-fallback-bg, var(--code-bg, #fff))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return cn("div",dn(At({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":w,"is-diff":f,"is-plain-text":c===""||c==="plaintext"||c==="text"},t.class],style:[P,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:cn("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)]"},[cn("div",{class:"code-header-main",style:{minWidth:0,flex:"1 1 auto",display:"flex",alignItems:"center",gap:"var(--ms-gap-header-main, 0.625rem)",overflow:"hidden"}},[cn("span",{class:"icon-slot h-4 w-4 flex-shrink-0","aria-hidden":"true",style:{display:"inline-flex",width:"1rem",height:"1rem",flex:"0 0 auto"}}),cn("div",{class:"code-header-copy",style:{minWidth:0,display:"grid",gap:"2px"}},[cn("div",{class:"code-header-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--ms-text-label, 0.75rem)",fontWeight:"500",color:"var(--code-action-fg)"}},p.title),p.caption?cn("div",{class:"code-header-caption",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.75rem",color:"var(--code-line-number)"}},p.caption):null])]),cn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?cn("div",{class:"code-diff-stats","aria-hidden":"true"},[cn("span",{class:"code-diff-stat removed"},"-0"),cn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:N(),n.showCollapseButton===!1?null:N(),T?cn("div",{class:"relative"},[N()]):null])]),cn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[cn(Jo,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?L0e(g?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:_,"data-markstream-code-loading":"1"})]),cn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[cn("div",{class:"loading-skeleton"},[cn("div",{class:"skeleton-line"}),cn("div",{class:"skeleton-line"}),cn("div",{class:"skeleton-line short"})])]),cn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),Zy=Xh("ViewportDeferredCodeBlockNode",rl({loader:()=>Ti(null,null,function*(){try{return(yield ns(()=>import("./CodeBlockNode-CZYIqTV_.js"),__vite__mapDeps([4,5]))).default}catch(e){return console.warn('[markstream-vue] Failed to load the enhanced CodeBlockNode chunk; falling back to preformatted code rendering. Enhanced code blocks require the optional "stream-diffs" peer (or "stream-monaco" as a fallback).',e),Jo}}),loadingComponent:Xm,delay:0,suspensible:!1}),Xm),yl=rl(()=>Ti(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,i,s,o;return cn(ss,dn(At({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield gB(),(yield ns(()=>import("./index7-DyLV34jk.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,i,s,o;return cn(ss,dn(At({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))}})),TB=rl(()=>Ti(null,null,function*(){try{return yield gB(),(yield ns(()=>import("./index6-DeApd9L_.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,i,s;return cn(ss,dn(At({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(i=e.node.content)!=null?i:""}$$`}}))}})),Do=oi(tt({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(b(),I("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]=i=>t.$emit("click",i,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=i=>t.$emit("mouseEnter",i,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=i=>t.$emit("mouseLeave",i,e.node.id,e.messageId,e.threadId))},B(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);Do.install=e=>{e.component(Do.__name,Do)};const W0e={class:"superscript-node"},ir=oi(tt({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,emphasis:Po,footnote_reference:Ar,strikethrough:zo,highlight:wr,insert:or,subscript:sr,emoji:nr,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("sup",W0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"superscript"}-${l}`,components:i.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"]]);ir.install=e=>{e.component(ir.__name,ir)};const q0e={class:"subscript-node"},sr=oi(tt({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,emphasis:Po,footnote_reference:Ar,strikethrough:zo,highlight:wr,insert:or,superscript:ir,emoji:nr,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("sub",q0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"subscript"}-${l}`,components:i.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"]]);sr.install=e=>{e.component(sr.__name,sr)};const U0e={class:"strong-node"},Ro=oi(tt({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,emphasis:Po,strikethrough:zo,highlight:wr,insert:or,subscript:sr,superscript:ir,emoji:nr,footnote_reference:Ar,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("strong",U0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"strong"}-${l}`,components:i.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"]]);Ro.install=e=>{e.component(Ro.__name,Ro)};const K0e={class:"strikethrough-node"},zo=oi(tt({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,emphasis:Po,highlight:wr,insert:or,subscript:sr,superscript:ir,emoji:nr,footnote_reference:Ar,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("del",K0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"strikethrough"}-${l}`,components:i.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"]]);zo.install=e=>{e.component(zo.__name,zo)};const V0e=["href","title","aria-label","aria-hidden","target","rel"],Z0e=["aria-hidden"],G0e={class:"link-text-wrapper relative inline-flex"},Q0e={class:"leading-[normal] link-text"},Oo=oi(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=an("markstreamShowTooltips",void 0),i=F(()=>{const w=n?.value;return typeof w=="boolean"?w:t.showTooltip}),s=F(()=>{var w,k,A,v,x;const E=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",S=(w=t.animationOpacity)!=null?w:.35,M=Math.max(.12,Math.min(.5*S,S)),_={"--underline-height":`${(k=t.underlineHeight)!=null?k:2}px`,"--underline-bottom":E,"--underline-opacity":String(S),"--underline-rest-opacity":String(M),"--underline-duration":`${(A=t.animationDuration)!=null?A:1.6}s`,"--underline-timing":(v=t.animationTiming)!=null?v:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(x=t.animationIteration)!=null?x:"infinite"};return t.color&&(_["--link-color"]=t.color),_}),o=Cs(()=>t.customId),r=F(()=>At({text:ss,strong:Ro,strikethrough:zo,emphasis:Po,image:mu,html_inline:Cr,inline_code:xo},o.value)),l=Of(),a=F(()=>{var w,k;const A=(w=t.node)==null?void 0:w.attrs;if(!A||typeof A!="object")return{};const v={};if(Array.isArray(A))for(const x of A)Array.isArray(x)&&x[0]&&(v[String(x[0])]=String((k=x[1])!=null?k:""));else for(const[x,E]of Object.entries(A))x&&E!=null&&E!==!1&&(v[x]=E===!0?"":String(E));return C_(v,"safe","a")}),u=F(()=>At(At({},l),a.value)),c=F(()=>{var w,k;return C_({href:String((k=(w=t.node)==null?void 0:w.href)!=null?k:"")},"safe","a").href}),d=F(()=>{if(!c.value)return;const w=u.value.target;return(typeof w=="string"?w.trim():String(w??"").trim())||(Fue(c.value)?"_blank":void 0)}),f=F(()=>{var w;return String((w=d.value)!=null?w:"").trim().toLowerCase()==="_blank"}),p=F(()=>{if(!c.value)return;const w=u.value.rel,k=new Set((typeof w=="string"?w:String(w??"")).split(/\s+/).filter(Boolean)),A=new Set(Array.from(k).filter(v=>v.toLowerCase()!=="opener"));return f.value&&(A.add("noopener"),A.add("noreferrer")),A.size>0?Array.from(A).join(" "):void 0}),g=F(()=>{const w=At({},u.value);return delete w.title,delete w.href,delete w.target,delete w.rel,w});function m(){i.value&&m0e()}const y=F(()=>{var w,k;const A=(w=t.node)==null?void 0:w.title;return typeof A=="string"&&A.trim().length>0?A:String((k=c.value)!=null?k:"")});return(w,k)=>{var A,v;return e.node.loading?(b(),I("span",Yn({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},h(l),{style:s.value}),[C("span",G0e,[C("span",Q0e,[V(h(ss),{class:"leading-[normal] link-text",node:{type:"text",content:String((A=e.node.text)!=null?A:""),raw:String((v=e.node.text)!=null?v:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),k[1]||(k[1]=C("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,Z0e)):(b(),I("a",Yn({key:0,class:"link-node",href:c.value,title:i.value?"":y.value,"aria-label":`Link: ${y.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:p.value},g.value,{style:s.value,onMouseenter:k[0]||(k[0]=x=>(function(E){var S,M,_,N;if(!i.value)return;const D=E,T=D?.clientX!=null&&D?.clientY!=null?{x:D.clientX,y:D.clientY}:void 0,$=((S=t.node)==null?void 0:S.title)||((M=c.value)!=null&&M.includes("xn--")&&((N=(_=t.node)==null?void 0:_.text)!=null&&N.includes("://"))?t.node.text:c.value)||"";g0e(E.currentTarget,$,"top",!1,T)})(x)),onMouseleave:m}),[(b(!0),I(Be,null,yt(e.node.children,(x,E)=>(b(),fe(h(Zl),{key:`${e.indexKey||"emphasis"}-${E}`,components:r.value,node:x,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${E}`},null,8,["components","node","custom-id","index-key"]))),128))],16,V0e))}}}),[["__scopeId","data-v-367e6ca4"]]);Oo.install=e=>{e.component(Oo.__name,Oo)};const Y0e={class:"insert-node"},or=oi(tt({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,emphasis:Po,strikethrough:zo,highlight:wr,subscript:sr,superscript:ir,emoji:nr,footnote_reference:Ar,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("ins",Y0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"insert"}-${l}`,components:i.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"]]);or.install=e=>{e.component(or.__name,or)};const J0e={class:"highlight-node"},wr=oi(tt({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,emphasis:Po,strikethrough:zo,insert:or,subscript:sr,superscript:ir,emoji:nr,footnote_reference:Ar,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("mark",J0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"highlight"}-${l}`,components:i.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"]]);wr.install=e=>{e.component(wr.__name,wr)};const X0e={class:"emphasis-node"},Po=oi(tt({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,strikethrough:zo,highlight:wr,insert:or,subscript:sr,superscript:ir,emoji:nr,footnote_reference:Ar,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("em",X0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"emphasis"}-${l}`,components:i.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"]]);Po.install=e=>{e.component(Po.__name,Po)};const ege={class:"hard-break"},vu=oi(tt({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(b(),I("br",ege))}),[["__scopeId","data-v-50c58f70"]]);vu.install=e=>{e.component(vu.__name,vu)};const lp=tt({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=wt({checkbox:kr,checkbox_input:kr,emoji:nr,emphasis:Po,hardbreak:vu,highlight:wr,inline_code:xo,insert:or,link:Oo,reference:Do,strikethrough:zo,strong:Ro,subscript:sr,superscript:ir,text:ss}),i=Cs(()=>t.customId),s=F(()=>{const o=i.value;return Object.keys(o).length>0?At(At({},n),o):n});return(o,r)=>(b(!0),I(Be,null,yt(e.nodes,(l,a)=>(b(),fe(h(Zl),{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 g8(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(g8)}function e2(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(g8))return e;if(!t||e.length!==1)return null;const i=e[0];if(i?.type!=="paragraph"||!Array.isArray(i.children))return null;const s=i.children;return(n||s.length>0)&&s.every(g8)?s:null}function Gc(e){var t,n;if(!e?.length)return null;let i="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;i+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return i}const tge=["cite"],nge={key:0,dir:"auto",class:"paragraph-node"},ige=["custom-id"],zg=oi(tt({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>!!n.value.paragraph),s=F(()=>!!n.value.text),o=F(()=>e2(t.node.children,!i.value)),r=F(()=>t.fade!==!1||s.value?null:Gc(o.value));return Pn("markstreamShowTooltips",F(()=>t.showTooltips)),Pn("markstreamFade",F(()=>t.fade)),(l,a)=>(b(),I("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[o.value?(b(),I("p",nge,[r.value!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(r.value),9,ige)):(b(),fe(h(lp),{key:1,nodes:o.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(b(),fe(h(rr),{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,tge))}}),[["__scopeId","data-v-abfecebc"]]);zg.install=e=>{e.component(zg.__name,zg)};const sge={class:"definition-list"},oge={class:"definition-term"},rge={class:"definition-desc"},Og=oi(tt({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(b(),I("dl",sge,[(b(!0),I(Be,null,yt(t.node.items,(s,o)=>(b(),I(Be,{key:o},[C("dt",oge,[V(h(rr),{"index-key":`definition-term-${t.indexKey}-${o}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),C("dd",rge,[V(h(rr),{"index-key":`definition-desc-${t.indexKey}-${o}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[1]||(i[1]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);Og.install=e=>{e.component(Og.__name,Og)};const lge=["href","title"],S1=oi(tt({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(i){var s;if(i.preventDefault(),typeof document>"u")return;const o=`fnref-${String((s=t.node.id)!=null?s:"")}`,r=document.getElementById(o);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}return(i,s)=>(b(),I("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,lge))}}),[["__scopeId","data-v-e1eb37b6"]]);S1.install=e=>{e.component(S1.__name,S1)};const age=["id"],uge={class:"flex-1"},Pg=tt({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(b(),I("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[C("div",uge,[V(h(rr),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,age))}});Pg.install=e=>{e.component(Pg.__name,Pg)};const cge=["custom-id"],m8=oi(tt({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=an("markstreamFade",void 0),s=F(()=>i?.value!==!1||n.value.text?null:Gc(t.node.children)),o=F(()=>At({text:ss,inline_code:xo,link:Oo,image:mu,strong:Ro,emphasis:Po,strikethrough:zo,highlight:wr,insert:or,subscript:sr,superscript:ir,emoji:nr,checkbox:kr,checkbox_input:kr,footnote_reference:Ar,hardbreak:vu,math_inline:yl,reference:Do},n.value));return(r,l)=>(b(),fe(Ms(`h${e.node.level}`),Yn({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:he(()=>[s.value!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(s.value),9,cge)):(b(!0),I(Be,{key:1},yt(e.node.children,(a,u)=>(b(),fe(h(Zl),{key:u,components:o.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"]]),Mv=m8;Mv.install=e=>{e.component(m8.__name,m8)};const dge={key:0,dir:"auto",class:"paragraph-node"},fge=["custom-id"],hge={dir:"auto",class:"paragraph-node"},pge=["custom-id"],vf=oi(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=F(()=>{var p;return(p=t.node)!=null?p:t.item}),i=Cs(()=>t.customId),s=F(()=>!!i.value.paragraph),o=F(()=>!!i.value.text),r=F(()=>{var p;return e2((p=n.value)==null?void 0:p.children,!s.value)}),l=F(()=>{var p;if(s.value)return null;const g=(p=n.value)==null?void 0:p.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 y=g.slice(1);if(!y.every(k=>k?.type==="list"))return null;const w=e2([m]);return w?{paragraphChildren:w,nestedLists:y}:null});function a(){return t.fade===!1&&!o.value}const u=F(()=>a()?Gc(r.value):null),c=F(()=>{var p;return a()?Gc((p=l.value)==null?void 0:p.paragraphChildren):null}),d=Object.freeze({}),f=F(()=>{const{value:p}=t;return typeof p=="number"&&Number.isFinite(p)?{value:p}:d});return Pn("markstreamShowTooltips",F(()=>t.showTooltips)),Pn("markstreamFade",F(()=>t.fade)),(p,g)=>{var m,y;return b(),I("li",Yn({class:"list-item",dir:"auto"},f.value),[r.value?(b(),I("p",dge,[u.value!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(u.value),9,fge)):(b(),fe(h(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(),I(Be,{key:1},[C("p",hge,[c.value!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(c.value),9,pge)):(b(),fe(h(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),I(Be,null,yt(l.value.nestedLists,(w,k)=>(b(),fe(h(rr),{key:k,nodes:[w],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${k}`,"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]=A=>p.$emit("copy",A))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(b(),fe(h(rr),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(y=(m=n.value)==null?void 0:m.children)!=null?y:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:g[1]||(g[1]=w=>p.$emit("copy",w))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);vf.install=e=>{e.component(vf.__name,vf)};const yf=oi(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=Cs(()=>e.customId),n=F(()=>t.value.list_item||vf);return(i,s)=>(b(),fe(Ms(e.node.ordered?"ol":"ul"),{class:De(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:he(()=>[(b(!0),I(Be,null,yt(e.node.items,(o,r)=>{var l;return b(),fe(Ms(n.value),Yn({key:`${e.indexKey||"list"}-${r}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:o,"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=>i.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);yf.install=e=>{e.component(yf.__name,yf)};const gge={key:2,class:"html-block-node__raw"},mge=["innerHTML"],vge={key:1,class:"html-block-node__placeholder"},M1=oi(tt({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=an("markstreamHtmlPolicy",void 0),i=an("markstreamNestedRendererProps",void 0),s=F(()=>{var T,$;return($=(T=t.htmlPolicy)!=null?T:n?.value)!=null?$:"safe"}),o=F(()=>{var T,$;const P=(T=i?.value)!=null?T:{};return dn(At({},P),{customId:($=t.customId)!=null?$:P.customId,htmlPolicy:s.value})}),r=rl({loader:()=>Promise.resolve().then(()=>Kb),suspensible:!1}),l=F(()=>{const T=Bg(t.node.attrs,s.value);if(!T)return;const $=C1(T);return Object.keys($).length>0?$:void 0}),a=F(()=>{const T=String(t.node.tag||"").trim(),$=Bg(t.node.attrs,s.value,T);if(!$)return;const P=C1($);return Object.keys(P).length>0?P:void 0}),u=Cs(()=>t.customId),c=tt({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=Z(null),f=Z(typeof window>"u"),p=Z(t.node.content),g=F(()=>Array.isArray(t.node.children)?t.node.children:[]),m=F(()=>String(t.node.tag||"div")),y=F(()=>{var T;if(m.value.trim().toLowerCase()!=="details"||(T=t.node.attrs)!=null&&T.some(([P])=>String(P).toLowerCase()==="open"))return null;const $=g.value[0];return $?.type==="html_block"&&String($.tag||"").toLowerCase()==="summary"?$:null}),w=F(()=>{var T;return Gc((T=y.value)==null?void 0:T.children)}),k=F(()=>{const T=y.value;if(!T)return;const $=Bg(T.attrs,s.value,"summary");if(!$)return;const P=C1($);return Object.keys(P).length>0?P:void 0}),A=F(()=>w.value==null?g.value:g.value.slice(1)),v=F(()=>{const T=m.value.trim().toLowerCase();return GN.has(T)||Mb(T,s.value)}),x=F(()=>g.value.length>0&&!!t.node.tag&&!v.value),E=F(()=>{var T,$,P;if(x.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(T=p.value)!=null?T:""};const O=($=p.value)!=null?$:t.node.content;if(!O)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:mf(O,s.value)};if(t.node.loading){const W=Jm(O,u.value,s.value);return W===null?{mode:"text",content:(P=t.node.raw)!=null?P:O}:{mode:"dynamic",nodes:W}}if(!wB(O,u.value))return{mode:"html",content:mf(O,s.value)};const R=Jm(O,u.value,s.value);return R===null?{mode:"html",content:mf(O,s.value)}:{mode:"dynamic",nodes:R}}),S=$b(),M=Fb(),_=Bb(),N=vl(null),D=!!t.node.loading;return typeof window<"u"?(Qe([()=>d.value,()=>M?.value.heavyBlockMargin,()=>M?.value.rootMargin],([T],$,P)=>{var O,R,W,z;if((R=(O=N.value)==null?void 0:O.destroy)==null||R.call(O),N.value=null,!D)return f.value=!0,void(p.value=t.node.content);if(!T)return void(f.value=!1);let G=!0;const K=(z=(W=M?.value.heavyBlockMargin)!=null?W:M?.value.rootMargin)!=null?z:Zc,H=S(T,{rootMargin:K,allowIdle:!_.value});N.value=H,f.value=f.value||H.isVisible.value,H.whenVisible.then(()=>{G&&N.value===H&&(f.value=!0)}),P(()=>{G=!1,H.destroy(),N.value===H&&(N.value=null)})},{immediate:!0}),Qe(()=>t.node.content,T=>{D&&!f.value||(p.value=T)})):f.value=!0,Gn(()=>{var T,$;($=(T=N.value)==null?void 0:T.destroy)==null||$.call(T),N.value=null}),(T,$)=>(b(),fe(Ms(x.value?m.value:"div"),Yn({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":h(_)&&!f.value?"true":void 0},x.value?a.value:void 0),{default:he(()=>[f.value?(b(),I(Be,{key:0},[E.value.mode==="structured"?(b(),I(Be,{key:0},[w.value!==null?(b(),I(Be,{key:0},[C("summary",XR(DI(k.value)),B(w.value),17),A.value.length?(b(),fe(h(r),Yn({key:0},o.value,{nodes:A.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):ne("",!0)],64)):(b(),fe(h(r),Yn({key:1},o.value,{nodes:g.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):E.value.mode==="dynamic"?(b(),fe(h(c),{key:1,nodes:E.value.nodes},null,8,["nodes"])):E.value.mode==="text"?(b(),I("pre",gge,B(E.value.content),1)):(b(),I("div",Yn({key:3},l.value,{innerHTML:E.value.content}),null,16,mge))],64)):(b(),I("div",vge,[En(T.$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"]]);M1.install=e=>{e.component(M1.__name,M1)};const yge={dir:"auto",class:"paragraph-node"},bge=["custom-id"],Pc=oi(tt({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=Cs(()=>t.customId),i=an("markstreamHtmlPolicy",void 0),s=an("markstreamFade",void 0),o=an("markstreamParseOptions",void 0),r=an("markstreamCustomMarkdownIt",void 0),l=an("markstreamNestedRendererProps",void 0),a=F(()=>{var M;return(M=i?.value)!=null?M:"safe"}),u=F(()=>{var M;return(M=t.parseOptions)!=null?M:o?.value}),c=F(()=>{var M;return(M=t.customMarkdownIt)!=null?M:r?.value}),d=F(()=>{var M,_;return(_=t.customHtmlTags)!=null?_:(M=l?.value)==null?void 0:M.customHtmlTags}),f=F(()=>{var M,_;const N=(M=l?.value)!=null?M:{};return dn(At({},N),{customId:(_=t.customId)!=null?_:N.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),p=rl({loader:()=>Promise.resolve().then(()=>Kb),suspensible:!1});function g(M){var _;return M.type==="text"&&String((_=M.content)!=null?_:"").trim()===""}const m=F(()=>t.node.children.filter(M=>!g(M))),y=F(()=>m.value.length>0&&m.value.every(M=>M.type==="image"||(function(_){var N;const D=(function(T){return T.type==="link"&&Array.isArray(T.children)?T.children.filter($=>!g($)):[]})(_);return D.length===1&&((N=D[0])==null?void 0:N.type)==="image"})(M))),w=F(()=>new Set(rd(d.value))),k=F(()=>{if(!y.value||m.value.length<=1)return t.node.children;const M=[];for(let _=0;_<t.node.children.length;_++){const N=t.node.children[_];if(!g(N)){M.push(N);continue}const D=M.length>0,T=t.node.children.slice(_+1).some($=>!g($));D&&T&&M.push(dn(At({},N),{content:" ",raw:" "}))}return M}),A=F(()=>s?.value===!1&&!n.value.text),v=F(()=>A.value?Gc(k.value):null);function x(M,_){return{node:M,"index-key":`${t.indexKey}-${_}`,"custom-id":t.customId,"custom-html-tags":d.value}}const E=F(()=>At({inline_code:xo,image:mu,link:Oo,hardbreak:vu,emphasis:Po,strong:Ro,strikethrough:zo,highlight:wr,insert:or,subscript:sr,superscript:ir,html_inline:Cr,html_block:M1,emoji:nr,checkbox:kr,math_inline:yl,checkbox_input:kr,reference:Do,footnote_anchor:S1,footnote_reference:Ar,text:ss},n.value)),S=F(()=>k.value.map((M,_)=>{var N;const D=(function(T){var $,P,O,R;if(T.type==="html_block"||T.type==="html_inline"){const W=String(($=T.tag)!=null?$:"").trim().toLowerCase()||eF(T.content);if(W&&!w.value.has(W)&&tF((P=T.content)!=null?P:T.raw,W)){const z=String((R=(O=T.content)!=null?O:T.raw)!=null?R:"");return{child:{type:"text",content:z,raw:z},component:ss,isCustomComponent:!1}}}return{child:T,component:E.value[T.type],isCustomComponent:!!(n.value[T.type]&&!Lp(String(T.type)))}})(M);return dn(At({},D),{index:_,key:`${t.indexKey||"paragraph"}-${_}`,customAttrs:D.isCustomComponent?Nb(D.child,a.value):void 0,hasSlotChildren:Array.isArray(D.child.children)&&D.child.children.length>0,slotContent:String((N=D.child.content)!=null?N:""),originalChild:M})}));return(M,_)=>(b(),I("p",yge,[v.value!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(v.value),9,bge)):(b(!0),I(Be,{key:1},yt(S.value,N=>{return b(),I(Be,{key:N.key},[y.value&&g(N.originalChild)?(b(),I(Be,{key:0},[Ue(B((D=N.originalChild,String((T=D.content)!=null?T:""))),1)],64)):N.isCustomComponent?(b(),fe(Ms(N.component),Yn({key:1,ref_for:!0},N.customAttrs,{node:N.child,loading:N.child.loading,"index-key":N.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:he(()=>[N.hasSlotChildren?(b(),fe(h(p),Yn({key:0,ref_for:!0},f.value,{nodes:N.child.children,"index-key":N.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):N.slotContent?(b(),fe(h(p),Yn({key:1,ref_for:!0},f.value,{content:N.slotContent,final:!N.child.loading,"index-key":`${N.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):ne("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(b(),fe(Ms(N.component),Yn({key:2,ref_for:!0},x(N.child,N.index)),null,16))],64);var D,T}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);Pc.install=e=>{e.component(Pc.__name,Pc)};const kge={class:"table-node-wrapper"},Age=["aria-busy"],Cge={key:0},wge=["custom-id"],xge=["aria-label","onPointerdown"],_ge=["custom-id"],Sge={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},I1=oi(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=F(()=>{var w;return(w=t.node.loading)!=null&&w}),i=F(()=>{var w;return(w=t.node.rows)!=null?w:[]}),s=Z(null),o=Z([]);let r=null;const l=F(()=>t.node.header.cells.length),a=F(()=>o.value.some(w=>Number.isFinite(w)&&w>0)),u=F(()=>a.value?o.value.map(w=>w>0?{width:`${w}px`}:void 0):[]);Pn("markstreamShowTooltips",F(()=>t.showTooltips)),Pn("markstreamFade",F(()=>t.fade));const c=Cs(()=>t.customId),d=F(()=>!!c.value.text),f=F(()=>!!c.value.paragraph),p=new WeakMap;function g(w){const k=t.fade===!1&&!d.value,A=!f.value,v=p.get(w);if(v?.children===w.children&&v.textFastPath===k&&v.paragraphFastPath===A)return v.info;const x=e2(w.children,A,!0),E={simpleChildren:x,plainText:x&&k?Gc(x):null};return p.set(w,{children:w.children,textFastPath:k,paragraphFastPath:A,info:E}),E}function m(w){if(!r)return;w.preventDefault();const k=r.startWidth+r.nextStartWidth,A=Math.min(48,Math.floor(k/2)),v=Math.max(A,Math.min(k-A,Math.round(r.startWidth+w.clientX-r.startX))),x=[...r.widths];x[r.index]=v,x[r.index+1]=k-v,o.value=x}function y(){r&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),r=null)}return Qe(l,()=>{y(),o.value=[]}),Gn(y),(w,k)=>(b(),I("div",kge,[C("table",{ref_key:"tableRef",ref:s,class:De(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(b(),I("colgroup",Cge,[(b(!0),I(Be,null,yt(e.node.header.cells,(A,v)=>(b(),I("col",{key:v,style:Vt(u.value[v])},null,4))),128))])):ne("",!0),C("thead",null,[C("tr",null,[(b(!0),I(Be,null,yt(e.node.header.cells,(A,v)=>(b(),I("th",{key:v,dir:"auto",class:De([A.align==="right"?"text-right":A.align==="center"?"text-center":"text-left"])},[g(A).plainText!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(g(A).plainText),9,wge)):g(A).simpleChildren?(b(),fe(h(lp),{key:1,nodes:g(A).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${v}`},null,8,["nodes","custom-id","index-key"])):(b(),fe(h(rr),{key:2,nodes:A.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:k[0]||(k[0]=x=>w.$emit("copy",x))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),v<e.node.header.cells.length-1?(b(),I("button",{key:3,type:"button",class:"table-node__resize-handle","aria-label":`Resize columns ${v+1} and ${v+2}`,onPointerdown:x=>(function(E,S){if(S.button!==0)return;const M=(function(){var D;const T=(D=s.value)==null?void 0:D.querySelectorAll("thead th");return Array.from(T??[],$=>Math.round($.getBoundingClientRect().width))})(),_=M[E],N=M[E+1];_&&N&&(S.preventDefault(),r={index:E,startX:S.clientX,startWidth:_,nextStartWidth:N,widths:M},o.value=M,window.addEventListener("pointermove",m),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y))})(v,x)},null,40,xge)):ne("",!0)],2))),128))])]),C("tbody",null,[(b(!0),I(Be,null,yt(i.value,(A,v)=>(b(),I("tr",{key:v},[(b(!0),I(Be,null,yt(A.cells,(x,E)=>(b(),I("td",{key:E,class:De([x.align==="right"?"text-right":x.align==="center"?"text-center":"text-left"]),dir:"auto"},[g(x).plainText!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(g(x).plainText),9,_ge)):g(x).simpleChildren?(b(),fe(h(lp),{key:1,nodes:g(x).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${v}-${E}`},null,8,["nodes","custom-id","index-key"])):(b(),fe(h(rr),{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:k[1]||(k[1]=S=>w.$emit("copy",S))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,Age),V(ys,{name:"table-node-fade"},{default:he(()=>[n.value?(b(),I("div",Sge,[En(w.$slots,"loading",{isLoading:n.value},()=>[k[2]||(k[2]=C("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),k[3]||(k[3]=C("span",{class:"sr-only"},"Loading",-1))],!0)])):ne("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);I1.install=e=>{e.component(I1.__name,I1)};const Mge={class:"hr-node"},jg=oi({},[["render",function(e,t){return b(),I("hr",Mge)}],["__scopeId","data-v-39b2349c"]]);jg.install=e=>{e.component(jg.__name,jg)};const Ige={class:"unknown-node"},v8=tt({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(b(),I("div",Ige,B(e.node.raw),1))}),Hg=oi(tt({__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}`),i=Cs(()=>t.customId),s=F(()=>At({text:ss,paragraph:Pc,heading:Mv,inline_code:xo,link:Oo,image:mu,strong:Ro,emphasis:Po,strikethrough:zo,insert:or,subscript:sr,superscript:ir,checkbox:kr,checkbox_input:kr,hardbreak:vu,math_inline:yl,reference:Do,list:yf,math_block:TB,table:I1},i.value));return(o,r)=>(b(),I("div",Yn({class:n.value},e.node.attrs),[(b(!0),I(Be,null,yt(e.node.children,(l,a)=>{return b(),fe(Ms((u=l.type,s.value[u]||v8)),{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"]]);Hg.install=e=>{e.component(Hg.__name,Hg)};const Ege=["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"],L_=[[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 Tge(e){if(e<=255)return Ege[e];let t=0,n=L_.length-1;for(;t<=n;){const i=t+n>>1,s=L_[i];if(e<s[0])n=i-1;else{if(!(e>s[1]))return s[2];t=i+1}}return"L"}const Lge=/[ \t\n\r\f]+/g,Nge=/[\t\n\r\f]| {2,}|^ | $/;let Gy=null;const Fge=new RegExp("\\p{Script=Arabic}","u"),Eu=new RegExp("\\p{M}","u"),Rb=new RegExp("\\p{Nd}","u");function N_(e){return Fge.test(e)}function F_(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<e.length;t++){const n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){const i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){if(F_(i-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(F_(n))return!0}}return!1}const Bge=new Set([" "," ","⁠","\uFEFF"]),$ge=new Set(["-","‐","–","—"]);function LB(e,t){return!((function(n){const i=E1(n);return i!==null&&Bge.has(i)})(e)||t&&((function(n){const i=E1(n);return i!==null&&(zb.has(i)||Qc.has(i))})(e)||(function(n){const i=E1(n);return i!==null&&$ge.has(i)})(e)))}const zb=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Iv=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),Ob=new Set(["'","’"]),Qc=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),Dge=new Set([":",".","،","؛"]),Rge=new Set(["၏"]),zge=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Oge(e){if(Pb(e))return!0;let t=!1;for(const n of e)if(Qc.has(n)||n2(n))t=!0;else if(!t||!Eu.test(n))return!1;return t}function Pge(e){for(const t of e)if(!zb.has(t)&&!Qc.has(t))return!1;return e.length>0}function jge(e){if(Pb(e))return!0;for(const t of e)if(!(Iv.has(t)||Ob.has(t)||Eu.test(t)||n2(t)))return!1;return e.length>0}function Pb(e){let t=!1;for(const n of e)if(n!=="\\"&&!Eu.test(n)){if(!(Iv.has(n)||Qc.has(n)||Ob.has(n)))return!1;t=!0}return t}function t2(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const i=e.charCodeAt(n);if(i<56320||i>57343)return n;const s=n-1;if(s<0)return n;const o=e.charCodeAt(s);return o>=55296&&o<=56319?s:n}function E1(e){if(e.length===0)return null;const t=t2(e,e.length);return e.slice(t)}const Hge=[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 n2(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,i){for(let s=0;s<i.length;s+=2)if(n>=i[s]&&n<=i[s+1])return!0;return!1})(t,Hge)}function Wge(e){const t=(function(n){for(const i of n)if(!Eu.test(i))return i;return null})(e);return t!==null&&Rb.test(t)}function qge(e){const t=Array.from(e);let n=t.length;for(;n>0;){const i=t[n-1];if(Eu.test(i))n--;else{if(!Iv.has(i)&&!Ob.has(i))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function Uge(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function B_(e,t,n,i){const s=t[i],o=e[i];if(s==null)return o;const r=n[i];if(o.length===r)return o;const l=s.repeat(r);return e[i]=l,l}function $_(e,t){return e&&t!==null&&Dge.has(t)}function Kge(e){const t=E1(e);return t!==null&&Rge.has(t)}function Vge(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 y8(e){let t=e.length;for(;t>0;){const n=t2(e,t),i=e.slice(n,t);if(zge.has(i))return!0;if(!Qc.has(i))return!1;t=n}return!1}function Zge(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 Gge=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Xr(e){return e.length===1?e[0]:e.join("")}function Qge(e,t){const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),Xr(n)}function Yge(e,t,n,i){if(!Gge.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let o=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=Zge(c,i),f=d==="text"&&t;o===null||d!==o||f!==a?(o!==null&&s.push({text:Xr(r),isWordLike:a,kind:o,start:l}),o=d,r=[c],l=n+u,a=f,u+=c.length):(r.push(c),u+=c.length)}return o!==null&&s.push({text:Xr(r),isWordLike:a,kind:o,start:l}),s}function Qy(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const Jge=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Xge(e,t){const n=e.texts[t];return!!n.startsWith("www.")||Jge.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function eme(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}const tme=new Set([":","-","/","×",",",".","+","–","—"]),nme=/[\p{P}\p{S}\p{Co}]/u,ime=new RegExp("\\p{Emoji_Presentation}","u"),sme=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function NB(e){const t=e.charCodeAt(0);return t<128?(function(n){return n>=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!sme.has(e)&&!ime.test(e)&&nme.test(e)}function D_(e){let t=!1;for(const n of e)if(!Eu.test(n)){if(!NB(n))return!1;t=!0}return t}function ome(e,t,n,i){const s=!t&&D_(e),o=!i&&D_(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=t2(c,d),p=c.slice(f,d);if(!Eu.test(p))return p;d=f}return null})(a);return u!==null&&n2(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=t2(a,u),d=a.slice(c,u);if(!Eu.test(d))return NB(d)||n2(d);u=c}return!1})(e);return!!(s||o||l)&&!Pl(e)&&!Pl(n)&&(t||s||r)&&(i||o)}function R_(e){for(const t of e)if(Rb.test(t))return!0;return!1}function Wg(e){if(e.length===0)return!1;for(const t of e)if(!Rb.test(t)&&!tme.has(t))return!1;return!0}function rme(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let i=0;for(let s=0;s<e.len;s++)e.kinds[s]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:s,consumedEndSegmentIndex:s+1}),i=s+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function lme(e,t,n="normal",i="normal"){const s=(function(a){const u=a??"normal";return u==="pre-wrap"?{mode:u,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:u,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}})(n),o=s.mode==="pre-wrap"?(function(a){return/[\r\f]/.test(a)?a.replace(/\r\n/g,` +`).replace(/[\r\f]/g,` +`):a})(e):(function(a){if(!Nge.test(a))return a;let u=a.replace(Lge," ");return u.charCodeAt(0)===32&&(u=u.slice(1)),u.length>0&&u.charCodeAt(u.length-1)===32&&(u=u.slice(0,-1)),u})(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=(function(a,u,c){var d,f,p;const g=(Gy===null&&(Gy=new Intl.Segmenter(void 0,{granularity:"word"})),Gy);let m=0;const y=[],w=[],k=[],A=[],v=[],x=[],E=[],S=[],M=[],_=[],N=[],D=[];for(const R of g.segment(a))for(const W of Yge(R.segment,(d=R.isWordLike)!=null&&d,R.index,c)){let z=function(){x[ie]!==null&&(w[ie]=[B_(y,x,E,ie)],x[ie]=null),w[ie].push(W.text),k[ie]=k[ie]||W.isWordLike,S[ie]=S[ie]||H,M[ie]=M[ie]||q,_[ie]=ee,N[ie]=ue,D[ie]=$_(M[ie],X)};const G=W.kind==="text",K=Uge(W.text,W.isWordLike,W.kind),H=Pl(W.text),q=N_(W.text),X=E1(W.text),ee=y8(W.text),ue=Kge(W.text),ie=m-1;u.carryCJKAfterClosingQuote&&G&&m>0&&A[ie]==="text"&&H&&S[ie]&&_[ie]||G&&m>0&&A[ie]==="text"&&Pge(W.text)&&S[ie]||G&&m>0&&A[ie]==="text"&&N[ie]?z():G&&m>0&&A[ie]==="text"&&W.isWordLike&&q&&D[ie]?(z(),k[ie]=!0):K!==null&&m>0&&A[ie]==="text"&&x[ie]===K?E[ie]=((f=E[ie])!=null?f:1)+1:G&&!W.isWordLike&&m>0&&A[ie]==="text"&&!S[ie]&&(Oge(W.text)||W.text==="-"&&k[ie])?z():(y[m]=W.text,w[m]=[W.text],k[m]=W.isWordLike,A[m]=W.kind,v[m]=W.start,x[m]=K,E[m]=K===null?0:1,S[m]=H,M[m]=q,_[m]=ee,N[m]=ue,D[m]=$_(q,X),m++)}for(let R=0;R<m;R++)x[R]===null?y[R]=Xr(w[R]):y[R]=B_(y,x,E,R);for(let R=1;R<m;R++)A[R]!=="text"||k[R]||!Pb(y[R])||A[R-1]!=="text"||S[R-1]||(y[R-1]+=y[R],k[R-1]=k[R-1]||k[R],y[R]="");const T=Array.from({length:m},()=>null);let $=-1;for(let R=m-1;R>=0;R--){const W=y[R];if(W.length!==0){if(A[R]==="text"&&!k[R]&&$>=0&&A[$]==="text"&&(jge(W)||W==="-"&&Wge(y[$]))){const z=(p=T[$])!=null?p:[];z.push(W),T[$]=z,v[$]=v[R],y[R]="";continue}$=R}}for(let R=0;R<m;R++){const W=T[R];W!=null&&(y[R]=Qge(W,y[R]))}let P=0;for(let R=0;R<m;R++){const W=y[R];W.length!==0&&(P!==R&&(y[P]=W,k[P]=k[R],A[P]=A[R],v[P]=v[R]),P++)}y.length=P,k.length=P,A.length=P,v.length=P;const O=(function(R){const W=R.texts.slice(),z=R.isWordLike.slice(),G=R.kinds.slice(),K=R.starts.slice();for(let H=0;H<W.length-1;H++){if(G[H]!=="text"||G[H+1]!=="text"||!Pl(W[H])||!Pl(W[H+1]))continue;const q=qge(W[H]);q!==null&&(W[H]=q.head,W[H+1]=q.tail+W[H+1],K[H+1]=K[H]+q.head.length)}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=[],z=[],G=[],K=[];let H=0;for(;H<R.len;){const q=R.texts[H],X=R.kinds[H],ee=R.isWordLike[H];if(X==="text"){const ue=[q];let ie=H+1,xe=ee;for(;ie<R.len&&R.kinds[ie]==="text"&&ome(R.texts[ie-1],R.isWordLike[ie-1],R.texts[ie],R.isWordLike[ie]);){const ce=R.texts[ie];ue.push(ce),xe=xe||R.isWordLike[ie],ie++}if(ie>H+1){W.push(Xr(ue)),z.push(xe),G.push("text"),K.push(R.starts[H]),H=ie;continue}}W.push(q),z.push(ee),G.push(X),K.push(R.starts[H]),H++}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=[],z=[],G=[],K=[];for(let H=0;H<R.len;H++){const q=R.texts[H];if(R.kinds[H]==="text"&&q.includes("-")){const X=q.split("-");let ee=X.length>1;for(let ue=0;ue<X.length;ue++){const ie=X[ue];if(!ee)break;ie.length!==0&&R_(ie)&&Wg(ie)||(ee=!1)}if(ee){let ue=0;for(let ie=0;ie<X.length;ie++){const xe=X[ie],ce=ie<X.length-1?`${xe}-`:xe;W.push(ce),z.push(!0),G.push("text"),K.push(R.starts[H]+ue),ue+=ce.length}continue}}W.push(q),z.push(R.isWordLike[H]),G.push(R.kinds[H]),K.push(R.starts[H])}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=[],z=[],G=[],K=[];for(let H=0;H<R.len;H++){const q=R.texts[H],X=R.kinds[H];if(X==="text"&&Wg(q)&&R_(q)){const ee=[q];let ue=H+1;for(;ue<R.len&&R.kinds[ue]==="text"&&Wg(R.texts[ue]);)ee.push(R.texts[ue]),ue++;W.push(Xr(ee)),z.push(!0),G.push("text"),K.push(R.starts[H]),H=ue-1;continue}W.push(q),z.push(R.isWordLike[H]),G.push(X),K.push(R.starts[H])}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=[],z=[],G=[],K=[];for(let H=0;H<R.len;H++){const q=R.texts[H];if(W.push(q),z.push(R.isWordLike[H]),G.push(R.kinds[H]),K.push(R.starts[H]),!eme(q))continue;const X=H+1;if(X>=R.len||Qy(R.kinds[X]))continue;const ee=[],ue=R.starts[X];let ie=X;for(;ie<R.len&&!Qy(R.kinds[ie]);)ee.push(R.texts[ie]),ie++;ee.length>0&&(W.push(Xr(ee)),z.push(!0),G.push("text"),K.push(ue),H=ie-1)}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=R.texts.slice(),z=R.isWordLike.slice(),G=R.kinds.slice(),K=R.starts.slice();for(let q=0;q<R.len;q++){if(G[q]!=="text"||!Xge(R,q))continue;const X=[W[q]];let ee=q+1;for(;ee<R.len&&!Qy(G[ee]);){X.push(W[ee]),z[q]=!0;const ue=W[ee].includes("?");if(G[ee]="text",W[ee]="",ee++,ue)break}W[q]=Xr(X)}let H=0;for(let q=0;q<W.length;q++){const X=W[q];X.length!==0&&(H!==q&&(W[H]=X,z[H]=z[q],G[H]=G[q],K[H]=K[q]),H++)}return W.length=H,z.length=H,G.length=H,K.length=H,{len:H,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=[],z=[],G=[],K=[];let H=0;for(;H<R.len;){const q=[R.texts[H]];let X=R.isWordLike[H],ee=R.kinds[H],ue=R.starts[H];if(ee==="glue"){const ie=[q[0]],xe=ue;for(H++;H<R.len&&R.kinds[H]==="glue";)ie.push(R.texts[H]),H++;const ce=Xr(ie);if(!(H<R.len&&R.kinds[H]==="text")){W.push(ce),z.push(!1),G.push("glue"),K.push(xe);continue}q[0]=ce,q.push(R.texts[H]),X=R.isWordLike[H],ee="text",ue=xe,H++}else H++;if(ee==="text")for(;H<R.len&&R.kinds[H]==="glue";){const ie=[];for(;H<R.len&&R.kinds[H]==="glue";)ie.push(R.texts[H]),H++;const xe=Xr(ie);H<R.len&&R.kinds[H]==="text"?(q.push(xe,R.texts[H]),X=X||R.isWordLike[H],H++):q.push(xe)}W.push(Xr(q)),z.push(X),G.push(ee),K.push(ue)}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})({len:P,texts:y,isWordLike:k,kinds:A,starts:v})))))));for(let R=0;R<O.len-1;R++){const W=Vge(O.texts[R]);W!==null&&(O.kinds[R]!=="space"&&O.kinds[R]!=="preserved-space"||O.kinds[R+1]!=="text"||!N_(O.texts[R+1])||(O.texts[R]=W.space,O.isWordLike[R]=!1,O.kinds[R]=O.kinds[R]==="preserved-space"?"preserved-space":"space",O.texts[R+1]=W.marks+O.texts[R+1],O.starts[R+1]=O.starts[R]+W.space.length))}return O})(o,t,s),l=i==="keep-all"?(function(a,u,c){if(u.len<=1)return u;const d=[],f=[],p=[],g=[];let m=-1,y=!1;function w(A){d.push(u.texts[A]),f.push(u.isWordLike[A]),p.push("text"),g.push(u.starts[A])}function k(A){if(!(m<0)){if(y)m+1===A?w(m):(function(v,x){let E=!1;for(let _=v;_<x;_++)E=E||u.isWordLike[_];const S=u.starts[v],M=x<u.len?u.starts[x]:a.length;d.push(a.slice(S,M)),f.push(E),p.push("text"),g.push(S)})(m,A);else for(let v=m;v<A;v++)w(v);m=-1,y=!1}}for(let A=0;A<u.len;A++){const v=u.texts[A],x=u.kinds[A];x!=="text"?(k(A),d.push(v),f.push(u.isWordLike[A]),p.push(x),g.push(u.starts[A])):(m>=0&&!LB(u.texts[A-1],c)&&k(A),m<0&&(m=A),y=y||Pl(v))}return k(u.len),{len:d.length,texts:d,isWordLike:f,kinds:p,starts:g}})(o,r,t.breakKeepAllAfterPunctuation):r;return At({normalized:o,chunks:rme(l,s)},l)}let Fd=null;const z_=new Map;let Bd=null;const ame=new RegExp("\\p{Emoji_Presentation}","u"),ume=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let Yy=null;const O_=new Map;function b8(){if(Fd!==null)return Fd;if(typeof OffscreenCanvas<"u")return Fd=new OffscreenCanvas(1,1).getContext("2d"),Fd;if(typeof document<"u")return Fd=document.createElement("canvas").getContext("2d"),Fd;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Za(e,t){let n=t.get(e);return n===void 0&&(n={width:b8().measureText(e).width,containsCJK:Pl(e)},t.set(e,n)),n}function i2(){if(Bd!==null)return Bd;if(typeof navigator>"u")return Bd={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Bd;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 Bd={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Bd}function FB(){return Yy===null&&(Yy=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Yy}function cme(e){return ame.test(e)||e.includes("️")}function dc(e,t,n){return n===0?t.width:t.width-(function(i,s){return s.emojiCount===void 0&&(s.emojiCount=(function(o){let r=0;const l=FB();for(const a of l.segment(o))cme(a.segment)&&r++;return r})(i)),s.emojiCount})(e,t)*n}function dme(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function P_(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function j_(e,t,n=e.widths.length){for(;t<n&&dme(e.kinds[t]);)t++;return t}function fme(e,t){if(t<=0)return 0;const n=e%t;return Math.abs(n)<=1e-6?t:t-n}function hme(e,t,n){return e.letterSpacing!==0&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function jb(e,t){return t===0?0:e+t}function pme(e,t,n,i,s){return jb(i,t==="tab"?s+(function(o,r){return o.letterSpacing!==0&&o.spacingGraphemeCounts[r]>0?o.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function H_(e,t,n,i){return jb(i,t==="tab"?0:e.lineEndFitAdvances[n])}function W_(e,t,n,i,s){return jb(i,t==="tab"?s:e.lineEndPaintAdvances[n])}function gme(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function mme(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function tg(e,t,n){let i=t;for(;i<e.length&&e[i]<n;)i++;return i}function vme(e,t){return(function(n,i){if(n.simpleLineWalkFastPath)return(function(T,$){const{widths:P,kinds:O,breakableFitAdvances:R,breakablePreferredBreaks:W}=T;if(P.length===0)return 0;const z=$+i2().lineFitEpsilon;let G=0,K=0,H=!1,q=0,X=0,ee=-1,ue=0;function ie(ye=q,j=X,Y=K){G++,K=0,H=!1,ee=-1,ue=0}function xe(ye,j){H=!0,q=ye+1,X=0,K=j}function ce(ye,j,Y){H=!0,q=ye,X=j+1,K=Y}function pe(ye,j){H?(K+=j,q=ye+1,X=0):xe(ye,j)}function Ne(ye,j){var Y;const ve=R[ye],re=(Y=W[ye])!=null?Y:null;let se=re===null?-1:tg(re,0,j+1),U=-1,J=0,de=j;for(;de<ve.length;){const me=ve[de];if(H)if(K+me>z){if(re!==null&&U>j){ie(ye,U,J),de=U,se=tg(re,se,de+1),U=-1,J=0;continue}ie(),ce(ye,de,me)}else K+=me,q=ye,X=de+1;else ce(ye,de,me);const Ie=de+1;re!==null&&re[se]===Ie&&(U=Ie,J=K,se++),de++}H&&q===ye&&X===ve.length&&(q=ye+1,X=0)}let te=0;for(;te<P.length&&(H||(te=j_(T,te),!(te>=P.length)));){const ye=P[te],j=P_(O[te]);if(H)if(K+ye>z){if(j){pe(te,ye),ie(te+1,0,K-ye),te++;continue}if(ee>=0){if(q>ee||q===ee&&X>0){ie();continue}ie(ee,0,ue);continue}if(ye>z&&R[te]!==null){ie(),Ne(te,0),te++;continue}ie()}else pe(te,ye),j&&(ee=te+1,ue=K-ye),te++;else ye>z&&R[te]!==null?Ne(te,0):xe(te,ye),j&&(ee=te+1,ue=K-ye),te++}return H&&ie(),G})(n,i);const{widths:s,kinds:o,breakableFitAdvances:r,breakablePreferredBreaks:l,discretionaryHyphenWidth:a,chunks:u}=n;if(s.length===0||u.length===0)return 0;const c=i2(),d=i+c.lineFitEpsilon;let f=0,p=0,g=!1,m=0,y=0,w=-1,k=0,A=null;function v(){w=-1,k=0,A=null}function x(T=m,$=y,P){f++,p=0,g=!1,v()}function E(T,$){g=!0,m=T+1,y=0,p=$}function S(T,$,P){g=!0,m=T,y=$+1,p=P}function M(T,$){g?(p+=$,m=T+1,y=0):E(T,$)}function _(T,$,P,O,R,W){if(!$)return;const z=H_(n,T,P,R);W_(n,T,P,R,O),w=P+1,k=p-W+z,A=T}function N(T,$){var P;const O=r[T],R=(P=l[T])!=null?P:null;let W=R===null?-1:tg(R,0,$+1),z=-1,G=$;for(;G<O.length;){const K=O[G];if(g){const q=gme(n,!0,K),X=p+q;if(mme(n,X)>d){if(R!==null&&z>$){x(T,z),G=z,W=tg(R,W,G+1),z=-1;continue}x(),S(T,G,K)}else p=X,m=T,y=G+1}else S(T,G,K);const H=G+1;R!==null&&R[W]===H&&(z=H,W++),G++}g&&m===T&&y===O.length&&(m=T+1,y=0)}function D(T){f++,v()}for(let T=0;T<u.length;T++){const $=u[T];if($.startSegmentIndex===$.endSegmentIndex){D();continue}g=!1,p=0,$.startSegmentIndex,m=$.startSegmentIndex,y=0,v();let P=$.startSegmentIndex;for(;P<$.endSegmentIndex&&(g||(P=j_(n,P,$.endSegmentIndex),!(P>=$.endSegmentIndex)));){const O=o[P],R=P_(O),W=hme(n,g,P),z=O==="tab"?fme(p+W,n.tabStopAdvance):s[P],G=W+z,K=pme(n,O,P,W,z);if(O!=="soft-hyphen")if(g){if(p+K>d){const H=p+H_(n,O,P,W);if(W_(n,O,P,W,z),A==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&k<=d){x(w,0);continue}if(R&&H<=d){M(P,G),x(P+1,0),P++;continue}if(w>=0&&k<=d){if(m>w||m===w&&y>0){x();continue}const q=w;x(q,0),P=q;continue}if(K>d&&r[P]!==null){x(),N(P,0),P++;continue}x();continue}M(P,G),_(O,R,P,z,W,G),P++}else K>d&&r[P]!==null?N(P,0):E(P,z),_(O,R,P,z,W,G),P++;else g&&(m=P+1,y=0,w=P+1,k=p+a,A=O),P++}g&&($.consumedEndSegmentIndex,x($.consumedEndSegmentIndex,0))}return f})(e,t)}let Jy=null;function Hb(){return Jy===null&&(Jy=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Jy}function yme(e,t){const n=[];let i=[],s=0,o=!1,r=!1,l=!1;function a(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:s}),i=[],o=!1,r=!1,l=!1)}function u(d,f,p){i=[d],s=f,o=p,r=y8(d),l=Iv.has(d)}function c(d,f){i.push(d),o=o||f;const p=y8(d);r=d.length===1&&Qc.has(d)&&r||p,l=!1}for(const d of Hb().segment(e)){const f=d.segment,p=Pl(f);i.length!==0?l||zb.has(f)||Qc.has(f)||t.carryCJKAfterClosingQuote&&p&&r?c(f,p):o||p?(a(),u(f,d.index,p)):c(f,p):u(f,d.index,p)}return a(),n}function bme(e,t,n){if(t.length<=1)return t;const i=[];let s=-1,o=!1;function r(l){if(!(s<0)){if(o)s+1===l?i.push(t[s]):(function(a,u){const c=t[a].start,d=u<t.length?t[u].start:e.length;i.push({text:e.slice(c,d),start:c})})(s,l);else for(let a=s;a<l;a++)i.push(t[a]);s=-1,o=!1}}for(let l=0;l<t.length;l++){const a=t[l];s>=0&&!LB(t[l-1].text,n)&&r(l),s<0&&(s=l),o=o||Pl(a.text)}return r(t.length),i}function q_(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const i=Hb();for(const s of i.segment(e))n++;return n}function kme(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Ame(e,t,n,i,s){const o=i2(),{cache:r,emojiCorrection:l}=(function(D,T){b8().font=D;const $=(function(R){let W=z_.get(R);return W||(W=new Map,z_.set(R,W)),W})(D),P=(function(R){const W=R.match(/(\d+(?:\.\d+)?)\s*px/);return W?parseFloat(W[1]):16})(D),O=T?(function(R,W){let z=O_.get(R);if(z!==void 0)return z;const G=b8();G.font=R;const K=G.measureText("😀").width;if(z=0,K>W+.5&&typeof document<"u"&&document.body!==null){const H=document.createElement("span");H.style.font=R,H.style.display="inline-block",H.style.visibility="hidden",H.style.position="absolute",H.textContent="😀",document.body.appendChild(H);const q=H.getBoundingClientRect().width;document.body.removeChild(H),K-q>.5&&(z=K-q)}return O_.set(R,z),z})(D,P):0;return{cache:$,fontSize:P,emojiCorrection:O}})(t,(a=e.normalized,ume.test(a)));var a;const u=dc("-",Za("-",r),l)+(s===0?0:2*s),c=8*dc(" ",Za(" ",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=[],p=[],g=[],m=[];let y=e.chunks.length<=1&&!d;const w=null,k=[],A=[],v=[],x=null,E=Array.from({length:e.len});function S(D,T,$,P,O,R,W,z,G){O!=="text"&&O!=="space"&&O!=="zero-width-break"&&(y=!1),f.push(T),p.push($),g.push(P),m.push(O),k.push(W),A.push(z),d&&v.push(G)}function M(D,T,$,P,O){const R=Za(D,r),W=d?q_(D,T):0,z=(function(q,X,ee){return X>1?q+(X-1)*ee:q})(dc(D,R,l),W,s),G=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:z,K=G===0?0:G+(W>0?s:0),H=T==="space"||T==="zero-width-break"?0:z;if(O&&P&&D.length>1){let q="sum-graphemes";s!==0?q="segment-prefixes":Wg(D)?q="pair-context":o.preferPrefixWidthsForBreakableRuns&&(q="segment-prefixes");const X=(function(ue,ie,xe,ce,pe){if(ie.breakableFitAdvances!==void 0&&ie.breakableFitMode===pe)return ie.breakableFitAdvances;ie.breakableFitMode=pe;const Ne=FB(),te=[];for(const ve of Ne.segment(ue))te.push(ve.segment);if(te.length<=1)return ie.breakableFitAdvances=null,ie.breakableFitAdvances;if(pe==="sum-graphemes"){const ve=[];for(const re of te){const se=Za(re,xe);ve.push(dc(re,se,ce))}return ie.breakableFitAdvances=ve,ie.breakableFitAdvances}if(pe==="pair-context"||te.length>96){const ve=[];let re=null,se=0;for(const U of te){const J=dc(U,Za(U,xe),ce);if(re===null)ve.push(J);else{const de=re+U,me=Za(de,xe);ve.push(dc(de,me,ce)-se)}re=U,se=J}return ie.breakableFitAdvances=ve,ie.breakableFitAdvances}const ye=[];let j="",Y=0;for(const ve of te){j+=ve;const re=dc(j,Za(j,xe),ce);ye.push(re-Y),Y=re}return ie.breakableFitAdvances=ye,ie.breakableFitAdvances})(D,R,r,l,q),ee=X===null||i==="keep-all"?null:(function(ue){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(ue))return null;const ie=[];let xe=0;for(const ce of Hb().segment(ue))xe++,kme(ce.segment)&&ie.push(xe);return ie.length===0?null:ie})(D);return void S(D,z,K,H,T,$,X,ee,W)}S(D,z,K,H,T,$,null,null,W)}for(let D=0;D<e.len;D++){E[D]=f.length;const T=e.texts[D],$=e.isWordLike[D],P=e.kinds[D],O=e.starts[D];if(P==="soft-hyphen"){S(T,0,u,u,P,O,null,null,0);continue}if(P==="hard-break"){S(T,0,0,0,P,O,null,null,0);continue}if(P==="tab"){S(T,0,0,0,P,O,null,null,d?q_(T,P):0);continue}const R=Za(T,r);if(P==="text"&&R.containsCJK){const W=yme(T,o),z=i==="keep-all"?bme(T,W,o.breakKeepAllAfterPunctuation):W;for(let G=0;G<z.length;G++){const K=z[G];M(K.text,"text",O+K.start,$,i==="keep-all"||!Pl(K.text))}continue}M(T,P,O,$,!0)}const _=(function(D,T,$){const P=[];for(let O=0;O<D.length;O++){const R=D[O],W=R.startSegmentIndex<T.length?T[R.startSegmentIndex]:$,z=R.endSegmentIndex<T.length?T[R.endSegmentIndex]:$,G=R.consumedEndSegmentIndex<T.length?T[R.consumedEndSegmentIndex]:$;P.push({startSegmentIndex:W,endSegmentIndex:z,consumedEndSegmentIndex:G})}return P})(e.chunks,E,f.length),N=w===null?null:(function(D,T){const $=(function(O){const R=O.length;if(R===0)return null;const W=new Array(R);let z=!1;for(let ee=0;ee<R;){const ue=O.charCodeAt(ee);let ie=ue,xe=1;if(ue>=55296&&ue<=56319&&ee+1<R){const pe=O.charCodeAt(ee+1);pe>=56320&&pe<=57343&&(ie=pe-56320+(ue-55296<<10)+65536,xe=2)}const ce=Tge(ie);ce!=="R"&&ce!=="AL"&&ce!=="AN"||(z=!0);for(let pe=0;pe<xe;pe++)W[ee+pe]=ce;ee+=xe}if(!z)return null;let G=0;for(let ee=0;ee<R;ee++){const ue=W[ee];if(ue==="L"){G=0;break}if(ue==="R"||ue==="AL"){G=1;break}}const K=new Int8Array(R);for(let ee=0;ee<R;ee++)K[ee]=G;const H=1&G?"R":"L",q=H;let X=q;for(let ee=0;ee<R;ee++)W[ee]==="NSM"?W[ee]=X:X=W[ee];X=q;for(let ee=0;ee<R;ee++){const ue=W[ee];ue==="EN"?W[ee]=X==="AL"?"AN":"EN":ue!=="R"&&ue!=="L"&&ue!=="AL"||(X=ue)}for(let ee=0;ee<R;ee++)W[ee]==="AL"&&(W[ee]="R");for(let ee=1;ee<R-1;ee++)W[ee]==="ES"&&W[ee-1]==="EN"&&W[ee+1]==="EN"&&(W[ee]="EN"),W[ee]!=="CS"||W[ee-1]!=="EN"&&W[ee-1]!=="AN"||W[ee+1]!==W[ee-1]||(W[ee]=W[ee-1]);for(let ee=0;ee<R;ee++){if(W[ee]!=="EN")continue;let ue;for(ue=ee-1;ue>=0&&W[ue]==="ET";ue--)W[ue]="EN";for(ue=ee+1;ue<R&&W[ue]==="ET";ue++)W[ue]="EN"}for(let ee=0;ee<R;ee++){const ue=W[ee];ue!=="WS"&&ue!=="ES"&&ue!=="ET"&&ue!=="CS"||(W[ee]="ON")}X=q;for(let ee=0;ee<R;ee++){const ue=W[ee];ue==="EN"?W[ee]=X==="L"?"L":"EN":ue!=="R"&&ue!=="L"||(X=ue)}for(let ee=0;ee<R;ee++){if(W[ee]!=="ON")continue;let ue=ee+1;for(;ue<R&&W[ue]==="ON";)ue++;const ie=(ee>0?W[ee-1]:q)!=="L"?"R":"L";if(ie===((ue<R?W[ue]:q)!=="L"?"R":"L"))for(let xe=ee;xe<ue;xe++)W[xe]=ie;ee=ue-1}for(let ee=0;ee<R;ee++)W[ee]==="ON"&&(W[ee]=H);for(let ee=0;ee<R;ee++){const ue=W[ee];1&K[ee]?ue!=="L"&&ue!=="AN"&&ue!=="EN"||K[ee]++:ue==="R"?K[ee]++:ue!=="AN"&&ue!=="EN"||(K[ee]+=2)}return K})(D);if($===null)return null;const P=new Int8Array(T.length);for(let O=0;O<T.length;O++)P[O]=$[T[O]];return P})(e.normalized,w);return x!==null?{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:u,tabStopAdvance:c,chunks:_,segments:x}:{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:u,tabStopAdvance:c,chunks:_}}const Xy="__MARKSTREAM_VUE_HEIGHT_ESTIMATION_EXPERIMENT__",Cme=["diff ","index ","--- ","+++ ","@@ "],_s=(()=>{const e=globalThis;if(e[Xy])return e[Xy];const t={configs:{},controllers:{},revision:vl(0),preparedCache:new Map,blockEstimateCache:new Map};return e[Xy]=t,t})();let Th=null;const e4=_s.revision;function U_(e){var t;return e&&(t=_s.configs[e])!=null?t:null}function K_(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function wme(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function t4(e){var t,n,i;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const o of e){if(!wme(o))return null;o.type==="text"?s+=String((t=o.content)!=null?t:""):o.type==="emoji"?s+=String((i=(n=o.name)!=null?n:o.raw)!=null?i:""):o.type==="hardbreak"&&(s+=` +`)}return s.length>0?s:null}function n4(e,t,n){var i,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var o;if(Th!=null)return Th;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return Th=!!((o=r.getContext)!=null&&o.call(r,"2d")),Th}catch{return Th=!1,!1}})())return null;try{const o=Math.round(100*t)/100,r=[(i=n.whiteSpace)!=null?i:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,o,e].join("\0"),l=_s.blockEstimateCache.get(r);if(l)return _s.blockEstimateCache.delete(r),_s.blockEstimateCache.set(r,l),{kind:"simple-text",height:l.height,contentHeight:l.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",u=(function(p,g,m){const y=`${m}\0${g}\0${p}`,w=_s.preparedCache.get(y);if(w)return _s.preparedCache.delete(y),_s.preparedCache.set(y,w),w.prepared;const k=(function(A,v,x){return(function(E,S,M,_){var N,D;const T=(N=_?.wordBreak)!=null?N:"normal",$=(D=_?.letterSpacing)!=null?D:0;return Ame(lme(E,i2(),_?.whiteSpace,T),S,!1,T,$)})(A,v,0,x)})(p,g,{whiteSpace:m});for(_s.preparedCache.set(y,{prepared:k});_s.preparedCache.size>240;){const A=_s.preparedCache.keys().next().value;if(!A)break;_s.preparedCache.delete(A)}return k})(e,n.font,a),c=(function(p,g,m){const y=vme(p,g);return{lineCount:y,height:y*m}})(u,Math.max(24,o-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,c.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(_s.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});_s.blockEstimateCache.size>4e3;){const p=_s.blockEstimateCache.keys().next().value;if(!p)break;_s.blockEstimateCache.delete(p)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function BB(e,t,n){var i,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const o=t4(e.children);return o&&n.paragraph?n4(o,t,n.paragraph):null}if(e.type==="heading"){const o=Number(e.level||0),r=t4(e.children),l=n.headings[o];return r&&l?n4(r,t,l):null}if(e.type==="list_item"){const o=Array.isArray(e.children)?e.children:[];if(o.length!==1||((i=o[0])==null?void 0:i.type)!=="paragraph"||!n.listItem)return null;const r=t4((s=o[0])==null?void 0:s.children);return r?n4(r,t,n.listItem):null}if(e.type==="list"){const o=Array.isArray(e.items)?e.items:[];if(!o.length)return null;let r=Math.max(0,n.listWrapperOverhead);for(const l of o){const a=BB(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 Lh(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function fc(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function i4(e,t,n=0){return e.diff?Db(t??{},n)?(function(i){const s=fc(i.raw);if(s){const o=s.split(/\r?\n/);return i.originalCode!=null||i.updatedCode!=null?Math.max(1,o.filter(r=>!Cme.some(l=>r.startsWith(l))).length):Math.max(1,o.length)}return Lh(fc(i.originalCode))+Lh(fc(i.updatedCode))})(e):(function(i){const s=i.originalCode,o=i.updatedCode;if(s!=null||o!=null)return Math.max(Lh(fc(s)),Lh(fc(o)));const r=fc(i.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):Lh(fc(e.code,e.loading===!0))}function xme(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function s4(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const i=window.getComputedStyle(t),s=e.offsetHeight,o=K_(i.lineHeight,1.5*K_(i.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:xme(i),lineHeight:o,wrapperOverhead:Math.max(0,s-o),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const _me=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function V_(e,t={}){var n;const i={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return i;const o=Object.getOwnPropertyDescriptors(e);for(const[r,l]of Object.entries(o))_me.has(r)||s.has(r)||l.enumerable&&"value"in l&&(i[r]=l.value);return i}function Z_(e,t,n,i){var s;const o=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),r=(function(f,p){return Number.isFinite(f)?Math.min(Math.max(0,f),p):0})(n,o);if(!i.isReverseFlexScrollRoot(e))return void(e.scrollTop=r);const l=Math.max(0,o-r),a=[-l,l];let u=a[0],c=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const p=i.getNormalizedScrollTop(e,t,!1),g=Math.abs(p-r);g<c&&(c=g,u=f)}e.scrollTop=u;const d=(s=i.epsilonPx)!=null?s:2;Math.abs(i.getNormalizedScrollTop(e,t,!1)-r)>d&&(e.scrollTop=u)}function G_(e,t){let n=0,i=null,s=null;const o=()=>{const r=s;s=null,i=null,r&&(n=Date.now(),e(...r))};return function(...r){const l=Date.now(),a=t-(l-n);s=r,a<=0?(i&&(clearTimeout(i),i=null),n=l,s=null,e(...r)):i||(i=setTimeout(o,a))}}function Q_(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const $B=Symbol("MarkstreamMathBlockMinHeightCache");function LYe(){return an($B,null)}const Sme=new Set(["text","inline_code","emoji","footnote_reference"]),Mme=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function Nh(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function hc(e,t,n,i=22){const s=String(e??"");if(!s)return n;const o=Math.max(18,Math.floor(Math.max(320,t)/8)),r=s.split(/\r?\n/).length,l=Math.ceil(s.length/o),a=Math.max(1,r,l);return Math.max(n,Math.ceil(a*i+12))}function DB(e){var t;if(!e||typeof e!="object")return!1;const n=e,i=String((t=n.type)!=null?t:"");if(Sme.has(i))return!0;if(!Mme.has(i))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(DB)}function k8(e){var t,n,i,s,o,r,l,a;if(!e||typeof e!="object")return"";const u=e,c=String((t=u.type)!=null?t:"");if(c==="text")return String((i=(n=u.content)!=null?n:u.raw)!=null?i:"");if(c==="inline_code")return String((r=(o=(s=u.code)!=null?s:u.content)!=null?o: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 p=u[f];if(Array.isArray(p)){const g=p.map(k8).filter(Boolean).join(" ");g&&d.push(g)}}return d.join(" ").replace(/\s+/g," ").trim()}function RB(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const i=t[n];return Array.isArray(i)&&i.some(RB)})}function Ime(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),i=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),o=Math.max(1,i,s);return 30+26*Math.max(0,o-1)}function Eme(e,t){var n,i,s,o,r,l,a,u,c,d,f,p,g,m;if(!e||typeof e!="object")return 32;const y=e,w=String((n=y.type)!=null?n:""),k=Number.isFinite(t)&&t>0?t:640;switch(w){case"heading":return(function(A){var v;const x=Number((v=A.level)!=null?v:A.depth);return x>=4?20:x===3?30:x===2?32:44})(y);case"paragraph":return(function(A,v){const x=String(A??"");if(!x)return 28;const E=Math.max(18,Math.floor(Math.max(320,v)/8)),S=x.split(/\r?\n/).length,M=Math.ceil(x.length/E);return Math.max(1,S,M)<=1?28:hc(x,v,34)})(String((s=(i=y.raw)!=null?i:y.content)!=null?s:""),k);case"list":return(function(A,v){var x;const E=Array.isArray(A.items)?A.items:[];if(!E.length)return 48;const S=Math.max(48,30*E.length+12);let M=12;for(const D of E)M+=Ime(k8(D)||String((x=D.raw)!=null?x:""),v);const _=Math.max(0,M-S);if(E.length>20){const D=Math.round(2.4*E.length);return Math.round(S+Math.max(D,Math.min(_,3*E.length)))}if(_<=0)return S;const N=E.length>8?8*E.length:_;return Math.round(S+Math.min(_,N))})(y,k);case"list_item":return hc(String((r=(o=y.raw)!=null?o:y.content)!=null?r:""),k,34);case"blockquote":return hc(String((a=(l=y.raw)!=null?l:y.content)!=null?a:""),k,56);case"table":return(function(A,v){const x=[...A.header?[A.header]:[],...Array.isArray(A.rows)?A.rows:[]];if(!x.length){const E=Array.isArray(A.children)?A.children.length:3;return Math.max(120,38*E+48)}return Math.max(120,Math.round(4+x.reduce((E,S)=>E+(function(M,_){const N=Math.max(1,M.length),D=Math.max(80,(_-32)/N),T=Math.max(10,Math.floor(D/8)),$=Math.max(1,...M.map(P=>{var O;const R=k8(P)||String((O=P?.raw)!=null?O:"");return Math.ceil(R.length/T)||1}));return 54+34*Math.max(0,$-1)+(N<=3&&M.some(RB)?14:0)})((function(M){var _;return Array.isArray(M?.cells)&&(_=M.cells)!=null?_:[]})(S),v),0)))})(y,k);case"code_block":{const A=String((u=y.language)!=null?u:"").trim().toLowerCase(),v=String((d=(c=y.code)!=null?c:y.raw)!=null?d:"");return A==="mermaid"?Gm(Vm(v)):A==="infographic"?Qm(Zm(v)):hc(v,k,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(A,v){var x,E,S;const M=A.match(/^\s*<details\b([^>]*)>/i);return M&&!/(?:^|\s)open(?:\s|=|$)/i.test((x=M[1])!=null?x:"")?hc(((S=(E=A.match(/<summary\b[^>]*>([\s\S]*?)<\/summary>/i))==null?void 0:E[1])==null?void 0:S.replace(/<[^>]*>/g,"").trim())||"Details",v,28,28):hc(A,v,96)})(String((p=(f=y.raw)!=null?f:y.content)!=null?p:""),k);case"thematic_break":return 24;default:return hc(String((m=(g=y.raw)!=null?g:y.content)!=null?m:""),k,40)}}function Y_(e,t,n){return Math.min(Math.max(e,t),n)}const Tme=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],Lme=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","safeMarkdownMs","tokenizeMs","htmlBlockPassesMs","parseMarkdownToStructureTotalMs"],Nme=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),zB=["raw","content","code","originalCode","updatedCode"],J_=new WeakMap,X_=new WeakMap;let Fme=1;function Jr(){return typeof performance<"u"?performance.now():Date.now()}function eS(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function vr(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=J_.get(t);return n||(n=Fme++,J_.set(t,n)),String(n)}function tS(e,t,n,i={}){var s,o;const r=i.includeFinal!==!1,l={md:vr(t),customMarkdownIt:vr(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(o=e.streamParse)!=null?o:"auto",validateLink:vr(e.validateLink),preTransformTokens:vr(e.preTransformTokens),postTransformTokens:vr(e.postTransformTokens),postTransformNodes:vr(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function nS(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 iS(e){const t=OB(e);return t.length>=2&&t.every(n=>{const i=n.trim();return i.length>=1&&i.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function OB(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function PB(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Wb(e){const t=String(e??"");return`${t.length}:${PB(t)}`}function A8(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?Wb(r):`${r.length}:${PB(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${vr(e)}`;if(typeof e!="object")return typeof e;const i=e,s=t.get(i);if(s)return`cycle:${s}`;if(n>=6)return`object:${vr(i)}`;const o=vr(i);if(t.set(i,o),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>A8(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}:${A8(r[u],t,n+1)}`).join(";")}`}return typeof e}function s2(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function jB(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(i=>s2(i)?Tu(i,t,n+1):jB(i,t,n+1)).join(",")}`:s2(e)?Tu(e,t,n):A8(e,t,n)}function Bme(e,t,n){return Object.keys(e).sort().filter(i=>i!=="children"&&!zB.includes(i)).map(i=>{const s=e[i];return typeof s=="string"?`${i}=s:${Wb(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${i}=${String(s)}`:typeof s=="function"?`${i}=fn:${vr(s)}`:Nme.has(i)&&(Array.isArray(s)||typeof s=="object")?`${i}=${jB(s,t,n+1)}`:s&&typeof s=="object"?`${i}=object:${vr(s)}`:""}).filter(Boolean).join(";")}function $me(e){return zB.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${Wb(n)}`:""}).filter(Boolean).join(";")}function Tu(e,t=new WeakMap,n=0){const i=X_.get(e);if(i)return i;const s=e,o=t.get(s);if(o)return`node-cycle:${o}`;if(n>=6)return`node:${e.type}:${vr(s)}`;const r=vr(s);t.set(s,r);const l=(function(a,u,c){const d=a,f=Array.isArray(d.children)?d.children:[],p=f.length?f.slice(0,200).map(g=>Tu(g,u,c+1)).join("|"):"";return[a.type,$me(d),Bme(d,u,c),f.length,p].join(":")})(e,t,n);return X_.set(s,l),l}function HB(e,t){return Tu(e)===Tu(t)}function qb(e,t,n){const i=Jr(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=Jr()-i,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function sS(e,t,n){return qb(t,n,()=>Tu(e))}function WB(e,t,n){return sS(e,n,"stabilizeSignatureMs")===sS(t,n,"stabilizeSignatureMs")}function ng(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function oS(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function rS(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function Dme(e,t){return e.length===t.length&&e===t}function Ub(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const i=e,s=t,o=Object.keys(i).filter(c=>c!=="type"&&c!=="children").sort(),r=Object.keys(s).filter(c=>c!=="type"&&c!=="children").sort();if(o.length!==r.length)return!1;for(let c=0;c<o.length;c++){const d=o[c];if(d!==r[c])return!1;const f=i[d],p=s[d];if(typeof f!=typeof p)return!1;if(typeof f!="string"){if(typeof f!="number"&&typeof f!="boolean"&&f!=null)return null;if(!Object.is(f,p))return!1}else if(typeof p!="string"||!Dme(f,p))return!1}const l=Object.prototype.hasOwnProperty.call(i,"children");if(l!==Object.prototype.hasOwnProperty.call(s,"children"))return!1;if(!l)return!0;const a=i.children,u=s.children;if(!Array.isArray(a)||!Array.isArray(u))return null;if(a.length!==u.length)return!1;for(let c=0;c<a.length;c++){const d=a[c],f=u[c];if(!s2(d)||!s2(f))return null;const p=Ub(d,f,n+1);if(p==null)return null;if(!p)return!1}return!0}function Rme(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.type!==t.type)return!1;const n=Ub(e,t);return n??HB(e,t)}function zme(e,t,n){if(!e||!t)return!1;if(e===t)return!0;if(e.type!==t.type)return!1;let i=null;return qb(n,"stabilizeSignatureMs",()=>{i=Ub(e,t)}),i??WB(e,t,n)}function Ome(e,t){const n={};for(const i of Tme){const s=e[i],o=t?.[i];typeof s=="number"&&(n[i]=s-(typeof o=="number"?o:0))}return n}function Pme(e,t){var n;const i=i_(t.instanceMsgId),s=new Map,o=(n=t.smoothStreamingEnabled)!=null?n:F(()=>!1),r=Z(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let P="",O=0,R=!1,W=!1,z=!1,G=!1;function K(){P="",O=0,R=!1,W=!1,z=!1,G=!1}function H(q){let X=!1;for(let ee=0;ee<q.length;ee++){const ue=q.charCodeAt(ee);if(ue===10||ue===13){const xe=ue===10&&G;G=ue===13,R=!1,xe||(z||(W=!1,O=0),z=!1);continue}G=!1;const ie=ue===9||ue===32;if(ie||(z=!0,W&&(X=!0)),O)if(O!==1)ie||(ue!==58?O=ue===91?1:0:(X=!0,W=!0));else{if(R){R=!1;continue}if(ue===92){R=!0;continue}ue===93&&(O=2)}else ue===91&&(O=1)}return X}return(q,X)=>{if(!q||!X.startsWith(q)||X.length<=q.length)return K(),[!0,0];let ee=0;P!==q&&(K(),H(q),ee=q.length);const ue=X.slice(q.length),ie=H(ue);return P=X,[ie,ee+ue.length]}})();let p,g=0,m=0,y=Jr(),w=-1,k=0;function A(P){w=Number.isInteger(P)?P:0,k+=1}function v(){p&&(clearTimeout(p),p=void 0)}function x(){v();const P=t.renderContent.value;r.value!==P&&(r.value=P),y=Jr()}Qe([t.renderContent,t.effectiveFinal,o],([P,O,R])=>{r.value!==P&&(!R||O||(function(W,z){if(!W&&z||z.length<=80||z.length<W.length||!z.startsWith(W))return!0;const G=z.slice(W.length);return!!G&&(!!iS(nS(z))||!(!G.includes(` + +`)&&!/(?:^|\n)(?:#{1,6}\s|[-+*]\s+|\d+[.)]\s+|>\s*|`{3,}|~{3,})/.test(G))||G.endsWith(` +`)&&!(function(K){const H=nS(K);if(iS(H))return!1;const q=OB(H);return q.length>=2&&q.some(X=>X.trim())})(z))})(r.value,P)?x():(function(){if(m+=1,p)return;const W=Math.max(0,(function(z){const G=z.parseCoalesceMs;return typeof G=="number"&&Number.isFinite(G)&&G>=0?G:80})(e)-(Jr()-y));W<=0?x():p=setTimeout(x,W)})())},{flush:"sync",immediate:!0}),Rf(v);const E=F(()=>{var P,O,R,W;return Oue(e.customHtmlTags,(P=e.parseOptions)==null?void 0:P.customHtmlTags,(W=(R=(O=t.customComponentsMap)==null?void 0:O.value)!=null?R:{},Object.entries(W).map(([z,G])=>{const K=Ur(z);return G==null||!K||Lp(K)||ZN.has(K)||Sp.has(K)?"":K}).filter(Boolean)))}),S=F(()=>{const{key:P,tags:O}=Pue(E.value);if(!P)return i;const R=s.get(P);if(R)return R;const W=i_(t.instanceMsgId,{customHtmlTags:O});return s.set(P,W),W}),M=F(()=>{const P=S.value;if(!e.customMarkdownIt)return P;const O=e.customMarkdownIt(P);return P.__markstreamHasCustomParserExtensions=!0,O.__markstreamHasCustomParserExtensions=!0,O}),_=F(()=>{var P,O;const R=(P=e.parseOptions)!=null?P:{},W=t.effectiveFinal.value,z=E.value,G=W!=null,K=z.length>0;return G||K||R.streamParse==null?At(At(dn(At({},R),{streamParse:(O=R.streamParse)==null||O}),G?{final:W}:{}),K?{customHtmlTags:z}:{}):R}),N=F(()=>{var P;return new Set(((P=_.value.customHtmlTags)!=null?P:[]).map(O=>String(O).trim().toLowerCase()).filter(Boolean))}),D=F(()=>tS(_.value,M.value,e.customMarkdownIt,{includeFinal:!0})),T=F(()=>tS(_.value,M.value,e.customMarkdownIt,{includeFinal:!1}));Qe([D,T],([P,O],[R,W])=>{R&&(P===R&&O===W||(x(),O!==W&&(l=[],c="")))},{flush:"sync"});const $=F(()=>{var P,O,R,W,z,G,K,H,q,X,ee;if((P=e.nodes)!=null&&P.length)return l=[],c="",A(0),wt(e.nodes.slice());const ue=r.value;if(!ue)return l=[],c="",A(-1),[];const ie=t.debugPerformanceEnabled.value,xe=ie?Jr():0,ce=M.value,pe=D.value,Ne=T.value;a&&pe!==a&&(function(Fe){var Re,Ke;(Ke=(Re=Fe.stream)==null?void 0:Re.reset)==null||Ke.call(Re)})(ce),u&&Ne!==u&&(l=[],c="");const te=Object.keys((R=(O=t.customComponentsMap)==null?void 0:O.value)!=null?R:{}).length>0||typeof _.value.postTransformNodes=="function";te!==d&&(l=[],c="");const ye=!te&&l.length>0&&ue.startsWith(c)&&Ne===u,j=ie?eS(ce):null,Y=ie?{}:void 0,ve=rS(ce),re=!ve&&!te,se=At(At(dn(At({},_.value),{__reuseStableTopLevelNodes:re}),ve?{__disableStreamParse:!0}:{}),Y?{__timing:Y}:{}),U=JF(ue,ce,se),J=ie?Jr():0,de=ie?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let me,Ie=ie?ng(U.length):void 0,je=0,ke=0,Le=0;if(ye){const Fe=ie?Jr():0,[Re,Ke]=(function(ot){var gt,Tt;const[yn,Gt]=ot.scanGlobalReferenceAppend(ot.previousContent,ot.content),Kt=ot.parseOptions;return[ot.previousDirtyStartIndex>0&&Kt.final!==!0&&!ot.customMarkdownIt&&!rS(ot.md)&&!yn&&typeof Kt.preTransformTokens!="function"&&typeof Kt.postTransformTokens!="function"&&typeof Kt.postTransformNodes!="function"&&((Tt=(gt=Kt.customHtmlTags)==null?void 0:gt.length)!=null?Tt:0)===0?ot.previousDirtyStartIndex:0,Gt]})({content:ue,previousContent:c,previousDirtyStartIndex:w,parseOptions:_.value,customMarkdownIt:e.customMarkdownIt,md:ce,scanGlobalReferenceAppend:f});Le=Ke;const ht=Re<=0;if(de){const ot=(function(gt,Tt,yn,Gt={}){var Kt;if(!Tt.length)return{nodes:gt,metrics:ng(gt.length)};const mn=(Kt=Gt.scanStartIndex)!=null?Kt:0,_n=Gt.reuseDirtyTail!==!1,He=(function(Rt,Ct,Fn,Tn=0){const as=Math.min(Rt.length,Ct.length);for(let Qt=Math.min(as,Math.max(0,Tn));Qt<as;Qt++)if(!zme(Ct[Qt],Rt[Qt],Fn))return Qt;return Rt.length===Ct.length?-1:as})(gt,Tt,yn,mn);if(He<0)return{nodes:Tt,metrics:{reusedNodeCount:gt.length,dirtyStartIndex:He,stablePrefixNodeCount:gt.length,dirtyTailNodeCount:0}};const st=gt.slice();let Ve=He;for(let Rt=0;Rt<He;Rt++)st[Rt]=Tt[Rt];if(_n)for(let Rt=He;Rt<gt.length;Rt++){const Ct=Tt[Rt],Fn=gt[Rt];Ct&&WB(Ct,Fn,yn)&&(st[Rt]=Ct,Ve+=1)}return{nodes:st,metrics:{reusedNodeCount:Ve,dirtyStartIndex:He,stablePrefixNodeCount:He,dirtyTailNodeCount:oS(He,gt,Tt)}}})(U,l,de,{reuseDirtyTail:ht,scanStartIndex:Re});me=ot.nodes,Ie=ot.metrics}else{const ot=(function(gt,Tt,yn={}){var Gt;if(!Tt.length)return{nodes:gt,metrics:ng(gt.length)};const Kt=(Gt=yn.scanStartIndex)!=null?Gt:0,mn=yn.reuseDirtyTail!==!1,_n=(function(Ve,Rt,Ct=0){const Fn=Math.min(Ve.length,Rt.length);for(let Tn=Math.min(Fn,Math.max(0,Ct));Tn<Fn;Tn++)if(!Rme(Rt[Tn],Ve[Tn]))return Tn;return Ve.length===Rt.length?-1:Fn})(gt,Tt,Kt);if(_n<0)return{nodes:Tt,metrics:{reusedNodeCount:gt.length,dirtyStartIndex:_n,stablePrefixNodeCount:gt.length,dirtyTailNodeCount:0}};const He=gt.slice();let st=_n;for(let Ve=0;Ve<_n;Ve++)He[Ve]=Tt[Ve];if(mn)for(let Ve=_n;Ve<gt.length;Ve++){const Rt=Tt[Ve],Ct=gt[Ve];Rt&&HB(Rt,Ct)&&(He[Ve]=Rt,st+=1)}return{nodes:He,metrics:{reusedNodeCount:st,dirtyStartIndex:_n,stablePrefixNodeCount:_n,dirtyTailNodeCount:oS(_n,gt,Tt)}}})(U,l,{reuseDirtyTail:ht,scanStartIndex:Re});me=ot.nodes,Ie=ot.metrics}je=ie?Jr()-Fe:0,ke=ht?Ie?.dirtyStartIndex==null||Ie.dirtyStartIndex<0?me.length:Ie.dirtyStartIndex:me.length}else me=U,Ie=ng(me.length);t.effectiveFinal.value!==!0&&(de?(function(Fe,Re,Ke=0){for(let ht=Math.max(0,Ke);ht<Fe.length;ht++)qb(Re,"primeSignatureMs",()=>Tu(Fe[ht]))})(me,de,ke):(function(Fe,Re=0){for(let Ke=Math.max(0,Re);Ke<Fe.length;Ke++)Tu(Fe[Ke])})(me,ke));const it=ie?Jr()-J:0;if(g+=1,c=ue,a=pe,u=Ne,d=te,l=me,A((W=Ie?.dirtyStartIndex)!=null?W:0),ie){const Fe=eS(ce),Re=typeof Fe?.total=="number"&&Fe.total>((z=j?.total)!=null?z:0);t.logPerf(Re?"parse(stream)":"parse(sync)",At(At(At({rendererId:t.instanceMsgId,ms:Math.round(Jr()-xe),nodes:me.length,contentLength:ue.length,parseCommitCount:g,parseCoalescedCount:m,nodeReuseMs:it,referenceDefinitionScanChars:Le,signatureMs:(G=de?.signatureMs)!=null?G:0,stabilizeSignatureMs:(K=de?.stabilizeSignatureMs)!=null?K:0,primeSignatureMs:(H=de?.primeSignatureMs)!=null?H:0,signatureCallCount:(q=de?.signatureCallCount)!=null?q:0,stabilizeSignatureCallCount:(X=de?.stabilizeSignatureCallCount)!=null?X:0,primeSignatureCallCount:(ee=de?.primeSignatureCallCount)!=null?ee:0,stabilizeMs:je},Ie??{}),Y?Object.fromEntries(Lme.map(Ke=>{var ht;return[Ke,(ht=Y[Ke])!=null?ht:0]})):{}),Fe?{streamMode:Fe.lastMode,streamDelta:Ome(Fe,j),streamStats:Fe}:{}))}return wt(me)});return{effectiveCustomHtmlTags:E,effectiveCustomHtmlTagsSet:N,mdBase:S,mdInstance:M,mergedParseOptions:_,getParsedNodesDirtyStartIndex:()=>w,getParsedNodesRevision:()=>k,parsedNodes:$}}function jme(e){const{isClient:t}=e,n=Z(new Set),i=new Map,s=new Map,o=new Map;function r(u){if(!t)return;const c=o.get(u);c!=null&&(window.clearTimeout(c),o.delete(u))}function l(){if(t)for(const u of o.values())window.clearTimeout(u);o.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:i,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:o,clearVisibilityFallback:r,clearAllVisibilityFallbacks:l,markNodeVisible:function(u,c=!0){var d;c&&r(u),(function(f,p){if((m=(g=e.shouldTrackVisibleNodeIndices)==null?void 0:g.call(e))!=null&&!m)return;var g,m;const y=n.value,w=y.has(f);if(p){if(w)return;const A=new Set(y);return A.add(f),void(n.value=A)}if(!w)return;const k=new Set(y);k.delete(f),n.value=k})(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,p]of s.entries())f<u||(p(),s.delete(f));for(const[f,p]of i.entries())f<u||(p.destroy(),i.delete(f),r(f),(c=e.onNodeVisibilityCleaned)==null||c.call(e,f));for(const f of Array.from(o.keys()))f<u||r(f);if(!n.value.size)return;const d=new Set;for(const f of n.value)f<u&&d.add(f);n.value=d},destroyNodeVisibilityState:function(){a();for(const u of s.values())u();s.clear();for(const u of i.values())u.destroy();i.clear(),l()}}}function Hme(e={}){const t=Z(""),n=Z(""),i=Z(!1),s=Ape(e),o=()=>{const c=s.getSnapshot();t.value=c.source,n.value=c.visible,i.value=c.done},r=s.subscribe(o);o();const l=F(()=>Math.max(0,t.value.length-n.value.length)),a=F(()=>l.value===0),u=F(()=>i.value&&a.value);return P2()&&Rf(()=>{r(),s.destroy()}),{source:t,visible:n,done:i,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 Wme={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},lS=/auto|scroll|overlay/i;function qme(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return lS.test(t)||lS.test(n)}function Ume(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 Kme={class:"m-0 p-0"},Vme=["data-probe"],Zme=oi(tt(dn(At({},{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(i){var s,o;return(o=(s=t.headingNodes)==null?void 0:s[i])!=null?o:null}return(i,s)=>(b(),I("div",{class:"height-estimation-probes",style:Vt({width:`${e.width}px`}),"aria-hidden":"true"},[C("div",{ref:o=>e.setParagraphWrapper(o),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[V(h(Pc),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),C("div",{ref:o=>e.setListItemWrapper(o),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[C("ul",Kme,[V(h(vf),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),C("div",{ref:o=>e.setListWrapper(o),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[V(h(yf),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(b(),I(Be,null,yt(6,o=>C("div",{key:`probe-heading-${o}`,ref_for:!0,ref:r=>e.setHeadingWrapper(o,r),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${o}`},[V(h(Mv),{node:n(o),"index-key":`probe-heading-${o}`},null,8,["node","index-key"])],10,Vme)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),aS=tt({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,i;return Qm((i=Jd(e.estimatedPreviewHeightPx))!=null?i:Zm(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return cn("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?cn("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)"}},[cn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[cn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),cn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),cn("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},()=>cn("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,cn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[cn("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:"")),cn("div",{class:"absolute inset-0"},[cn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),uS=tt({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,i;return Gm((i=Jd(e.estimatedPreviewHeightPx))!=null?i:Vm(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return cn("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?cn("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)"}},[cn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[cn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),cn("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},()=>cn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[cn("span",{class:"action-icon block"})])))]):null,cn("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)"}},[cn("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:"")),cn("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"}})])])}}}),Gme={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 Rs(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 Qme=["data-custom-id"],Yme=["data-node-index","data-node-type"],cS="typewriter-simple-cursor-target",qB=oi(tt(dn(At({},{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 i=e,s=n;function o(L){if(!(typeof Event<"u"&&L instanceof Event))return typeof L=="string"&&s("copy-code",L),void s("copy",L)}const r=As(),l=an("markstreamNestedRendererProps",void 0);function a(L){const Q=r?.vnode.props;return!!Q&&(Object.prototype.hasOwnProperty.call(Q,L)||Object.prototype.hasOwnProperty.call(Q,String(L).replace(/[A-Z]/g,le=>`-${le.toLowerCase()}`)))}function u(L){var Q,le;const ae=i[L];return a(L)?ae:(le=(Q=l?.value)==null?void 0:Q[L])!=null?le:ae}const c=F(()=>{return(L=u("mode"))==="chat"||L==="minimal"||L==="docs"?L:"docs";var L}),d=F(()=>Q_(u("typewriter"))),f=F(()=>d.value!=="off"),p=F(()=>u("domMode")==="minimal"?"minimal":"full"),g=F(()=>{return(L={mode:c.value,codeRenderer:u("codeRenderer"),renderCodeBlocksAsPre:u("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":L.codeRenderer==="pre"||L.codeRenderer==="shiki"||L.codeRenderer==="monaco"?L.codeRenderer:L.renderCodeBlocksAsPre===!1||L.mode==="docs"?"monaco":"pre";var L}),m=F(()=>Gme[c.value]),y=F(()=>{var L;return(L=u("showTooltips"))!=null?L:m.value.showTooltips}),w=F(()=>{var L;return(L=u("fade"))!=null?L:m.value.fade}),k=F(()=>{var L;return(L=u("batchRendering"))!=null?L:m.value.batchRendering}),A=F(()=>{var L;return(L=u("initialRenderBatchSize"))!=null?L:m.value.initialRenderBatchSize}),v=F(()=>{var L;return(L=u("renderBatchSize"))!=null?L:m.value.renderBatchSize}),x=F(()=>{var L;return(L=u("renderBatchDelay"))!=null?L:m.value.renderBatchDelay}),E=F(()=>{var L;return(L=u("renderBatchBudgetMs"))!=null?L:m.value.renderBatchBudgetMs}),S=F(()=>{var L;return(L=u("renderBatchIdleTimeoutMs"))!=null?L:m.value.renderBatchIdleTimeoutMs}),M=F(()=>{var L;return(L=u("deferNodesUntilVisible"))!=null?L:m.value.deferNodesUntilVisible}),_=F(()=>{var L;return(L=u("maxLiveNodes"))!=null?L:m.value.maxLiveNodes}),N=F(()=>{var L;return(L=u("liveNodeBuffer"))!=null?L:m.value.liveNodeBuffer}),D=F(()=>{var L;return(L=u("nodeVirtual"))!=null?L:m.value.nodeVirtual}),T={get content(){return i.content},get nodes(){return i.nodes},get final(){return i.final},get parseOptions(){return u("parseOptions")},get customMarkdownIt(){return u("customMarkdownIt")},get debugPerformance(){return i.debugPerformance},get customHtmlTags(){return u("customHtmlTags")},get mode(){return u("mode")},get domMode(){return p.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 y.value},get themes(){return u("themes")},get langs(){return u("langs")},get isDark(){return u("isDark")},get customId(){return u("customId")},get indexKey(){return i.indexKey},get typewriter(){return u("typewriter")},get smoothStreaming(){return i.smoothStreaming},get smoothStreamingOptions(){return u("smoothStreamingOptions")},get parseCoalesceMs(){return u("parseCoalesceMs")},get fade(){return w.value},get batchRendering(){return k.value},get initialRenderBatchSize(){return A.value},get renderBatchSize(){return v.value},get renderBatchDelay(){return x.value},get renderBatchBudgetMs(){return E.value},get renderBatchIdleTimeoutMs(){return S.value},get deferNodesUntilVisible(){return M.value},get maxLiveNodes(){return _.value},get liveNodeBuffer(){return N.value},get nodeVirtual(){return D.value},get virtualScroll(){return i.virtualScroll},get renderAsFragment(){return i.renderAsFragment}};function $(L){s("height-change",L)}function P(L){s("virtual-state-change",L)}function O(L){s("anchor-change",L)}const R=Z(),W=Z(null),z=Z(null),G=Z(null),K=Ts({1:null,2:null,3:null,4:null,5:null,6:null}),H=Z(!1),q=new Map,X=Z(0),ee=Z(0),ue=Z({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function ie(L,Q){return typeof L!="string"?Q:L.trim()||Q}function xe(L){const Q=Number(L);return Number.isFinite(Q)&&Q>0?Math.max(1,Math.trunc(Q)):640}const ce=F(()=>{var L;const Q=(L=T.viewportPriorityOptions)!=null?L:{},le=ie(Q.rootMargin,Zc);return{rootMargin:le,heavyBlockMargin:ie(Q.heavyBlockMargin,le),maxTargets:xe(Q.maxTargets)}}),pe=F(()=>{var L;return(L=ce.value.rootMargin)!=null?L:Zc}),Ne=F(()=>{var L;return(L=ce.value.maxTargets)!=null?L:640});function te(){var L,Q;if(((L=i.virtualScroll)==null?void 0:L.enabled)!==!0)return null;const le=(Q=i.virtualScroll)==null?void 0:Q.scrollRoot;return ye(typeof le=="function"?le():le)}function ye(L){return L?typeof HTMLElement<"u"&&L instanceof HTMLElement?L:typeof L=="object"&&"value"in L?ye(L.value):typeof L=="object"&&"$el"in L?ye(L.$el):null:null}Pn(MB,ce);const{isClient:j,renderAsFragment:Y,debugPerformanceEnabled:ve,resolvedShowTooltips:re,resolvedHtmlPolicy:se,inheritedSmoothStreaming:U,ownsTypewriterCursor:J}=(function(L){const Q=typeof window<"u",le=Of(),ae=an("markstreamHtmlPolicy",void 0),be=an("markstreamTypewriterCursor",void 0),Te=an("markstreamSmoothStreaming",void 0),ze=F(()=>L.renderAsFragment===!0),We=F(()=>!!(L.debugPerformance&&Q&&typeof console<"u")),lt=F(()=>{var rt;if(typeof L.showTooltips=="boolean")return L.showTooltips;const Oe=(rt=le.showTooltips)!=null?rt:le["show-tooltips"];return Oe===""||Oe===!0||Oe==="true"||Oe!==!1&&Oe!=="false"&&void 0}),qe=F(()=>{var rt,Oe;return(Oe=(rt=L.htmlPolicy)!=null?rt:ae?.value)!=null?Oe:"safe"}),Xe=F(()=>be?.value!==!0);return{isClient:Q,renderAsFragment:ze,debugPerformanceEnabled:We,resolvedShowTooltips:lt,resolvedHtmlPolicy:qe,inheritedSmoothStreaming:Te,inheritedTypewriterCursor:be,ownsTypewriterCursor:Xe}})(T),{resolveViewportRoot:de,resolveScrollContainer:me,isReverseFlexScrollRoot:Ie,getNormalizedScrollTop:je,getOffsetTopWithinRoot:ke}=(function(L,Q){function le(){var We,lt;return(lt=(We=Q.scrollRoot)==null?void 0:We.call(Q))!=null?lt:null}function ae(We){if(typeof window>"u")return null;const lt=le();if(lt)return lt;const qe=We??L.value;if(!qe)return null;const Xe=qe.ownerDocument||document,rt=Xe.scrollingElement||Xe.documentElement;let Oe=qe;for(;Oe&&Oe!==Xe.body&&Oe!==rt;){if(qme(window.getComputedStyle(Oe))&&Ume(Oe))return Oe;Oe=Oe.parentElement}return null}function be(We){if(!Q.isClient)return!1;try{const lt=window.getComputedStyle(We);return!!(lt.display||"").toLowerCase().includes("flex")&&(lt.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function Te(We,lt,qe){var Xe,rt;if(qe)return ze(lt);const Oe=We.scrollTop;if(!be(We))return Oe;const et=Oe<0?-Oe:Oe;return Math.max(0,((Xe=We.scrollHeight)!=null?Xe:0)-((rt=We.clientHeight)!=null?rt:0))-et}function ze(We){var lt,qe,Xe,rt,Oe;const et=Number((lt=We.scrollingElement)==null?void 0:lt.scrollTop),ut=Number((Xe=(qe=We.documentElement)==null?void 0:qe.scrollTop)!=null?Xe:0),at=Number((Oe=(rt=We.body)==null?void 0:rt.scrollTop)!=null?Oe:0);return Math.max(0,Number.isFinite(et)?et:0,Number.isFinite(ut)?ut:0,Number.isFinite(at)?at:0)}return{resolveViewportRoot:ae,resolveScrollContainer:function(We){var lt,qe,Xe,rt;const Oe=le();if(Oe)return Oe;const et=ae((lt=We??L.value)!=null?lt:null);if(et)return et;const ut=(rt=(Xe=We?.ownerDocument)!=null?Xe:(qe=L.value)==null?void 0:qe.ownerDocument)!=null?rt:typeof document<"u"?document:null;return ut?.scrollingElement||ut?.documentElement||null},isReverseFlexScrollRoot:be,getNormalizedScrollTop:Te,getOffsetTopWithinRoot:function(We,lt){const qe=lt.ownerDocument||We.ownerDocument||document;if((function(et,ut){return et===ut.documentElement||et===ut.body||et===ut.scrollingElement})(lt,qe))return We.getBoundingClientRect().top+ze(qe);const Xe=lt.getBoundingClientRect(),rt=We.getBoundingClientRect(),Oe=Te(lt,qe,!1);return rt.top-Xe.top+Oe}}})(R,{isClient:j,scrollRoot:te});Pn("markstreamShowTooltips",re),Pn("markstreamHtmlPolicy",se),Pn("markstreamTypewriter",f),Pn("markstreamFade",F(()=>T.fade!==!1)),Pn("markstreamTypewriterCursor",F(()=>!0)),Pn("markstreamTextStreamState",q),Pn("markstreamStreamVersion",X),Pn("markstreamParseOptions",F(()=>T.parseOptions)),Pn("markstreamCustomMarkdownIt",F(()=>T.customMarkdownIt));const{smoothStreamingEnabled:Le,renderContent:it,requestedFinal:Fe,effectiveFinal:Re}=(function(L,Q){const le=Hme(At(At({},Wme),L.smoothStreamingOptions)),ae=F(()=>{var Oe,et,ut;return L.smoothStreaming!==!1&&!((Oe=L.nodes)!=null&&Oe.length)&&(L.smoothStreaming===!0||!((et=Q.inheritedSmoothStreaming)!=null&&et.value))&&(L.smoothStreaming===!0||Q_(L.typewriter)!=="off"||((ut=L.maxLiveNodes)!=null?ut:0)<=0)}),be=Z(!Q.isClient||L.smoothStreaming===!0);pn(()=>{be.value=!0});const Te=F(()=>be.value&&ae.value),ze=F(()=>{var Oe;return Te.value?le.visible.value:(Oe=L.content)!=null?Oe:""}),We=F(()=>{var Oe,et;const ut=(Oe=L.parseOptions)!=null?Oe:{};return(et=L.final)!=null?et:ut.final}),lt=F(()=>{const Oe=We.value;return Te.value&&Oe!=null?!!Oe&&le.caughtUp.value:Oe});let qe=0,Xe=!1;function rt(){qe=0,Xe=!1}return Qe([()=>L.content,()=>L.nodes,Te,We],([Oe,et,ut,at])=>{if(et?.length)return rt(),void le.reset("");const Mt=Oe??"";if(!ut)return rt(),le.reset(Mt),void(at&&le.finish({flush:!0}));const mt=le.source.value;if(Mt){if(Mt!==mt)if(Mt.startsWith(mt)){const zt=Mt.slice(mt.length),qt=le.pendingChars.value;zt.length<=8?(qe++,Xe||qe>=2&&qt<=8?(Xe=!0,le.reset(Mt)):le.enqueue(zt)):(rt(),le.enqueue(zt))}else rt(),le.reset(Mt)}else rt(),le.reset("");at&&le.finish()},{immediate:!0}),{smoothStream:le,smoothStreamingEligible:ae,smoothStreamingEnabled:Te,renderContent:ze,requestedFinal:We,effectiveFinal:lt}})(T,{isClient:j,inheritedSmoothStreaming:U}),Ke=Fe.value===!0;Pn("markstreamSmoothStreaming",Le);const ht=Z(!1),ot=Z(!1),gt=Z(!1);let Tt="",yn=!1,Gt=null;function Kt(){j&&Gt!=null&&(window.clearTimeout(Gt),Gt=null)}function mn(){ht.value=!1,Kt()}function _n(L,Q){if(!ve.value)return;const le=(function(){if(!ve.value)return null;const ae=Ct(He),be=Ct(st),Te=Math.max(Rt,be);if(ae<=0&&Te<=0)return null;const ze={total:ae,maxPerFrame:Te,byLabel:(We=He,Object.fromEntries(Array.from(We.entries()).sort((lt,qe)=>qe[1]-lt[1]||lt[0].localeCompare(qe[0]))))};var We;return He.clear(),st.clear(),Rt=0,ze})();console.info(`[markstream-vue][perf] ${L}`,le?dn(At({},Q),{layoutReads:le}):Q)}Qe([()=>T.indexKey,()=>T.customId],()=>{var L,Q;mn(),ot.value=!1,gt.value=!((L=i.nodes)!=null&&L.length)&&Fe.value!==!0&&!!i.content,Tt=(Q=it.value)!=null?Q:"",yn=Tt.length>0},{flush:"sync"}),Qe([()=>i.content,()=>i.nodes,Fe],([L,Q,le])=>{!Q?.length&&le!==!0&&L&&(gt.value=!0)},{flush:"sync",immediate:!0}),Qe([it,()=>i.nodes,Fe],([L,Q,le])=>{const ae=L??"";return Q?.length||le===!0?(mn(),ot.value=!1,Tt=ae,void(yn=!0)):(ae.length>0&&(gt.value=!0),yn?(Tt&&ae.length>Tt.length&&ae.startsWith(Tt)?(ht.value=!0,ot.value=!0,j&&(Kt(),Gt=window.setTimeout(()=>{var be;Gt=null,Re.value===!0||(be=i.nodes)!=null&&be.length||(bd(),ht.value=!1,ea())},1200))):(ae.length<Tt.length||!ae.startsWith(Tt))&&(mn(),ot.value=!1),void(Tt=ae)):(Tt=ae,void(yn=!0)))},{flush:"sync",immediate:!0});const He=new Map,st=new Map;let Ve=!1,Rt=0;function Ct(L){let Q=0;for(const le of L.values())Q+=le;return Q}function Fn(){Rt=Math.max(Rt,Ct(st)),st.clear(),Ve=!1}function Tn(L){L.maxPerFrame=Math.max(Number(L.maxPerFrame||0),Number(L.currentFrameTotal||0)),L.currentFrameTotal=0,L.frameScheduled=!1}function as(L){var Q,le;ve.value&&(He.set(L,((Q=He.get(L))!=null?Q:0)+1),st.set(L,((le=st.get(L))!=null?le:0)+1),(function(ae){const be=(function(){if(!j||typeof window>"u")return null;const Te=window;if(Te.__markstreamLayoutReadPerformance)return Te.__markstreamLayoutReadPerformance;const ze={total:0,maxPerFrame:0,byLabel:{}};return Te.__markstreamLayoutReadPerformance=ze,ze})();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(()=>Tn(be),0):queueMicrotask(()=>Tn(be)):window.requestAnimationFrame(()=>Tn(be))))})(L),Ve||(Ve=!0,j&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(Fn):typeof queueMicrotask!="function"?setTimeout(Fn,0):queueMicrotask(Fn)))}function Qt(L,Q){return as(L),Q()}const ni=T.customId?`renderer-${T.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,zn=(function(L){const Q=new Map;return{scope:L,cache:Q,clear:()=>Q.clear()}})(ni),Sn=ni;Pn($B,zn);const mi=Cs(()=>T.customId),{effectiveCustomHtmlTagsSet:Ws,mergedParseOptions:Li,parsedNodes:Lt,getParsedNodesDirtyStartIndex:xi,getParsedNodesRevision:Qi}=Pme(T,{instanceMsgId:ni,renderContent:it,effectiveFinal:Re,smoothStreamingEnabled:Le,debugPerformanceEnabled:ve,customComponentsMap:mi,logPerf:_n});Qe(Lt,()=>{ht.value||zn.clear(),X.value+=1},{immediate:!0});const ci=F(()=>({customId:T.customId,customHtmlTags:Li.value.customHtmlTags,parseOptions:T.parseOptions,customMarkdownIt:T.customMarkdownIt,htmlPolicy:se.value,viewportPriority:T.viewportPriority,viewportPriorityOptions:ce.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:re.value,themes:T.themes,langs:T.langs,isDark:T.isDark,typewriter:f.value,smoothStreamingOptions:T.smoothStreamingOptions,parseCoalesceMs:T.parseCoalesceMs,fade:T.fade}));Pn("markstreamNestedRendererProps",ci);const Fs=F(()=>Lt.value),Ni=F(()=>Lt.value.length),$i=Z(null),So=Z(null),_i=Z(null),Yi=Z(null),co=i.indexKey!=null&&String(i.indexKey).startsWith("list-item-"),Bs=!co&&T.customId?U_(T.customId):null,Hi=F(()=>Bs?(e4.value,U_(T.customId)):null),vi=F(()=>{var L;return!!(!Y.value&&T.customId&&!co&&((L=Hi.value)!=null&&L.enabled))}),Mn=F(()=>!!(j&&vi.value)),Dn=F(()=>{var L;return!!(!Y.value&&((L=i.virtualScroll)!=null&&L.enabled))}),Ln=F(()=>Dn.value),ws=Z(!1);pn(()=>{ws.value=!0});const Cn=F(()=>!!(j&&Dn.value));Pn("markstreamHostScrollManaged",Cn);const Di=F(()=>!!(ws.value&&Cn.value)),ri=F(()=>Mn.value||Cn.value),ur=F(()=>Mn.value||Di.value),jo=F(()=>{var L;return ri.value&&((L=Hi.value)==null?void 0:L.textEstimation)!==!1});function On(){const L=ee.value||Qt("getMeasuredContainerWidth.clientWidth",()=>{var Q;return((Q=R.value)==null?void 0:Q.clientWidth)||0});return Number.isFinite(L)&&L>0?L:0}const us=F(()=>{const L=On();return L>0?Math.max(1,Math.round(L)):640}),qs=F(()=>{var L,Q;return!(Re.value!==!0||Dn.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(L=i.nodes)!=null&&L.length||gt.value||!(((Q=T.maxLiveNodes)!=null?Q:0)<=0))}),Us=F(()=>{var L;return qs.value?50:Math.max(1,(L=T.maxLiveNodes)!=null?L:320)}),Ji=F(()=>{var L;return qs.value?16:Math.max(0,(L=T.liveNodeBuffer)!=null?L:60)}),$e=F(()=>{var L;return!Y.value&&T.nodeVirtual!==!1&&!(((L=T.maxLiveNodes)!=null?L:0)<=0&&!qs.value)&&(T.nodeVirtual===!0?Lt.value.length>0:Lt.value.length>Us.value)}),nt=F(()=>$e.value||Mn.value||Cn.value),Nt=F(()=>T.viewportPriority!==!1),Zt=F(()=>!!Nt.value&&!H.value);var Nn;Nn=F(()=>Nt.value),Pn(IB,Nn);const cs=F(()=>{var L;return!(Y.value||T.deferNodesUntilVisible===!1||((L=T.maxLiveNodes)!=null?L:0)<=0||$e.value||Lt.value.length>900||T.viewportPriority===!1)}),Fi=A0e(L=>{var Q;return de((Q=L??R.value)!=null?Q:null)},Nt),{requestFrame:di,cancelFrame:fi,hasIdleCallback:Ks,isTestEnv:Si}=(function(L){const Q=L.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,le=L.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ae=L.isClient&&typeof window.requestIdleCallback=="function",be=(function(){var Te;if(typeof globalThis>"u"||!("process"in globalThis))return;const ze=(Te=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:Te.value;return ze?.env})();return{requestFrame:Q,cancelFrame:le,hasIdleCallback:ae,isTestEnv:be?.NODE_ENV==="test"}})({isClient:j}),Vs=F(()=>Re.value===!0&&!Dn.value),{resolvedBatchSize:Zs,resolvedInitialBatch:Wi,batchingEnabled:xs,incrementalRenderingActive:fo,renderedCount:yi,previousRenderContext:Mo,adaptiveBatchSize:ho,previousBatchConfig:Gs}=(function(L,Q){var le;const ae=F(()=>{var rt;const Oe=Math.trunc((rt=L.renderBatchSize)!=null?rt:80);return Number.isFinite(Oe)?Math.max(0,Oe):0}),be=F(()=>{var rt;const Oe=Math.trunc((rt=L.initialRenderBatchSize)!=null?rt:ae.value);return Number.isFinite(Oe)?Math.max(0,Oe):ae.value}),Te=F(()=>!Q.renderAsFragment.value&&L.batchRendering!==!1&&ae.value>0&&Q.isClient&&!Q.isTestEnv),ze=Z(0),We=Z({key:L.indexKey,total:0}),lt=Z(Math.max(1,ae.value||1)),qe=F(()=>{var rt,Oe,et;return Te.value&&!((rt=Q.continuousStreaming)!=null&&rt.value)&&!((Oe=Q.forceFullRenderFinalContent)!=null&&Oe.value)&&((et=L.maxLiveNodes)!=null?et:0)<=0}),Xe=Z({batchSize:ae.value,initial:be.value,delay:(le=L.renderBatchDelay)!=null?le:16,enabled:qe.value});return{resolvedBatchSize:ae,resolvedInitialBatch:be,batchingEnabled:Te,incrementalRenderingActive:qe,renderedCount:ze,previousRenderContext:We,adaptiveBatchSize:lt,previousBatchConfig:Xe}})(T,{isClient:j,isTestEnv:Si,renderAsFragment:Y,forceFullRenderFinalContent:Vs,continuousStreaming:F(()=>ot.value&&Re.value!==!0)}),ds=F(()=>{var L;return!Y.value&&T.batchRendering!==!1&&Zs.value>0&&!Si&&((L=T.maxLiveNodes)!=null?L:0)<=0&&!Vs.value}),Ho=F(()=>ds.value),cr=F(()=>ri.value||Ho.value),ft=F(()=>{var L;return cr.value&&((L=Hi.value)==null?void 0:L.codeBlockEstimation)!==!1}),Me=new Map,Ze=new Map,on=new WeakMap;let Mi=null;const Wo=new WeakMap,bi=new Map,Al=[];let qo=[],Er=[],dr=-1;const fr=vl(Al),po=new Set,Gl=Z(0);let oe=0;const Ae=Z(0),Se=F(()=>(Ae.value,Array.from(Me.entries()).sort((L,Q)=>L[0]-Q[0]))),Pe=Z(null),Ye=Z(null);let Je,xt=null,bt=0,nn=null;function Ot(){Je.markFallbackHeightPrefixDirty()}function wn(L){return Je.getFallbackNodeHeight(L)}function Qn(L,Q){return Je.estimateHeightRange(L,Q)}function $t(L){return Je.estimateIndexForOffset(L)}const{activeRestoreAnchor:Ht,getRelativeScrollTopWithinContainer:Wn,setRelativeScrollTopWithinContainer:Ee,resolveAnchorOffset:ct,clearRestoreReconcile:dt,scheduleRestoreReconcile:Wt,captureRestoreAnchor:ki,restoreAnchor:$s,getAnchorDrift:Ql}=(function(L){const{isClient:Q,containerRef:le,parsedNodeCount:ae,requestFrame:be,cancelFrame:Te,resolveScrollContainer:ze,getNormalizedScrollTop:We,getOffsetTopWithinRoot:lt,isReverseFlexScrollRoot:qe,estimateIndexForOffset:Xe,estimateHeightRange:rt,getFallbackNodeHeight:Oe,clamp:et}=L,ut=Z(null);let at=null,Mt=[];function mt(){const tn=ze(),kn=le.value;if(!tn||!kn)return null;const In=tn.ownerDocument||kn.ownerDocument||document;if(tn===In.documentElement||tn===In.body||tn===In.scrollingElement){const hi=kn.getBoundingClientRect();return Math.max(0,-hi.top)}return Math.max(0,We(tn,In,!1)-lt(kn,tn))}function zt(tn){var kn;const In=ze(),hi=le.value;if(!In||!hi)return;const Xs=Math.max(0,tn),Ds=In.ownerDocument||hi.ownerDocument||document,Gr=Ds.defaultView||(typeof window<"u"?window:null);if(In===Ds.documentElement||In===Ds.body||In===Ds.scrollingElement){const _l=We(In,Ds,!0)+hi.getBoundingClientRect().top;return void((kn=Gr?.scrollTo)==null||kn.call(Gr,0,Math.max(0,_l+Xs)))}Z_(In,Ds,lt(hi,In)+Xs,{isReverseFlexScrollRoot:_l=>{var vh;return(vh=qe?.(_l))!=null&&vh},getNormalizedScrollTop:We})}function qt(tn){const kn=ae.value,In=et(tn.nodeIndex,0,Math.max(0,kn-1));return rt(0,In)+Math.max(0,tn.offsetWithinNodePx)}function en(){if(at!=null&&(Te?.(at),at=null),Q)for(const tn of Mt)window.clearTimeout(tn);Mt=[]}function Yt(tn){const kn=qt(tn),In=mt();In!=null&&Math.abs(In-kn)<=.5||zt(kn)}return{activeRestoreAnchor:ut,getRelativeScrollTopWithinContainer:mt,setRelativeScrollTopWithinContainer:zt,resolveAnchorOffset:qt,clearRestoreReconcile:en,applyRestoreAnchor:Yt,scheduleRestoreReconcile:function(){ut.value&&Q&&at==null&&(at=be?be(()=>{at=null,ut.value&&Yt(ut.value)}):null,at==null&&ut.value&&Yt(ut.value))},captureRestoreAnchor:function(){const tn=mt(),kn=ae.value;if(tn==null||kn<=0)return null;const In=et(Xe(tn+1),0,kn-1),hi=rt(0,In),Xs=Oe(In);return{nodeIndex:In,offsetWithinNodePx:et(tn-hi,0,Math.max(0,Xs-1))}},restoreAnchor:function(tn){const kn=ae.value;if(ut.value={nodeIndex:et(tn.nodeIndex,0,Math.max(0,kn-1)),offsetWithinNodePx:Math.max(0,tn.offsetWithinNodePx)},en(),Yt(ut.value),Q)for(const In of[0,120,280,480])Mt.push(window.setTimeout(()=>{ut.value&&Yt(ut.value)},In))},getAnchorDrift:function(tn){const kn=mt();return kn==null?null:kn-qt(tn)}}})({isClient:j,containerRef:R,parsedNodeCount:Ni,requestFrame:di,cancelFrame:fi,resolveScrollContainer:()=>Pe.value||me(),getNormalizedScrollTop:je,getOffsetTopWithinRoot:ke,isReverseFlexScrollRoot:Ie,estimateIndexForOffset:$t,estimateHeightRange:Qn,getFallbackNodeHeight:wn,clamp:Js}),{nodeHeights:Xi,heightStats:os,heightTreeSize:Ku,heightSumTree:ld,heightKnownTree:Hp,averageNodeHeight:Gf,resetHeightMeasurements:Wp,pruneHeightMeasurements:qp,rebuildHeightTrees:ad,recordNodeHeight:Ov,removeNodeHeights:Pv,exportHeightCache:ge,importHeightCache:we,fenwickRangeSum:Ge}=(function(L={}){const Q=Ts({}),le=Ts({total:0,count:0}),ae=Z(0),be=Z([]),Te=Z([]);function ze(){for(const Oe of Object.keys(Q))delete Q[Number(Oe)];le.total=0,le.count=0,ae.value=0,be.value=[],Te.value=[]}function We(Oe,et,ut){for(let at=et+1;at<Oe.length;at+=at&-at)Oe[at]+=ut}function lt(Oe,et){let ut=0;for(let at=et+1;at>0;at-=at&-at)ut+=Oe[at];return ut}function qe(Oe){ae.value=Oe;const et=new Array(Oe+1).fill(0),ut=new Array(Oe+1).fill(0);for(const[at,Mt]of Object.entries(Q)){const mt=Number(at),zt=Number(Mt);!Number.isFinite(mt)||mt<0||mt>=Oe||!Number.isFinite(zt)||zt<=0||(We(et,mt,zt),We(ut,mt,1))}be.value=et,Te.value=ut}function Xe(Oe){if(!Number.isInteger(Oe)||Oe<0)return!1;const et=Q[Oe];if(!Number.isFinite(et)||et<=0)return!1;if(delete Q[Oe],le.total=Math.max(0,le.total-et),le.count=Math.max(0,le.count-1),ae.value>Oe){const ut=be.value,at=Te.value;ut.length&&at.length&&(We(ut,Oe,-et),We(at,Oe,-1))}return!0}const rt=F(()=>le.count>0?Math.max(12,le.total/le.count):32);return{nodeHeights:Q,heightStats:le,heightTreeSize:ae,heightSumTree:be,heightKnownTree:Te,averageNodeHeight:rt,resetHeightMeasurements:ze,pruneHeightMeasurements:function(Oe){if(Oe<=0)return void ze();let et=0,ut=0;for(const[at,Mt]of Object.entries(Q)){const mt=Number(at),zt=Number(Mt);!Number.isFinite(mt)||mt<0||mt>=Oe||!Number.isFinite(zt)||zt<=0?delete Q[mt]:(et+=zt,ut++)}le.total=et,le.count=ut},rebuildHeightTrees:qe,recordNodeHeight:function(Oe,et,ut={}){(function(at,Mt,mt={}){var zt;if(!Number.isFinite(Mt)||Mt<=0)return!1;const qt=Q[at];if(qt&&(mt.allowShrink===!1&&Mt<qt||Math.abs(Mt-qt)<=1))return!1;if(Q[at]=Mt,qt?le.total+=Mt-qt:(le.total+=Mt,le.count++),ae.value>at){const en=be.value,Yt=Te.value;if(en.length&&Yt.length)if(qt){const tn=Mt-qt;tn!==0&&We(en,at,tn)}else We(en,at,Mt),We(Yt,at,1)}mt.notify!==!1&&((zt=L.onHeightRecorded)==null||zt.call(L))})(Oe,et,dn(At({},ut),{notify:!0}))},removeNodeHeight:function(Oe,et={}){var ut;const at=Xe(Oe);return at&&et.notify!==!1&&((ut=L.onHeightRecorded)==null||ut.call(L)),at},removeNodeHeights:function(Oe,et={}){var ut;let at=0;for(const Mt of Oe)Xe(Number(Mt))&&at++;return at>0&&et.notify!==!1&&((ut=L.onHeightRecorded)==null||ut.call(L)),at},exportHeightCache:function(){return Object.entries(Q).map(([Oe,et])=>({index:Number(Oe),height:Number(et)})).filter(Oe=>Number.isFinite(Oe.index)&&Oe.index>=0&&Number.isFinite(Oe.height)&&Oe.height>0).sort((Oe,et)=>Oe.index-et.index)},importHeightCache:function(Oe,et={}){var ut;if(!Array.isArray(Oe))return;const at=ae.value;let Mt=!1;if(et.mode!=="merge"){const mt=Object.keys(Q);if(mt.length>0){for(const zt of mt)delete Q[Number(zt)];Mt=!0}}for(const mt of Oe){const zt=Number(mt.index),qt=Number(mt.height);if(!Number.isInteger(zt)||zt<0||at>0&&zt>=at||!Number.isFinite(qt)||qt<=0)continue;const en=Q[zt];en&&Math.abs(en-qt)<=1||(Q[zt]=qt,Mt=!0)}Mt&&((function(){let mt=0,zt=0;const qt=ae.value;for(const[en,Yt]of Object.entries(Q)){const tn=Number(en),kn=Number(Yt);!Number.isFinite(tn)||tn<0||qt>0&&tn>=qt||!Number.isFinite(kn)||kn<=0?delete Q[tn]:(mt+=kn,zt++)}le.total=mt,le.count=zt})(),at>0&&qe(at),(ut=L.onHeightRecorded)==null||ut.call(L))},fenwickRangeSum:function(Oe,et,ut){if(ut<=et)return 0;const at=lt(Oe,ut-1);return et<=0?at:at-lt(Oe,et-1)}}})({onHeightRecorded:()=>{Ot(),Cn.value&&dh(),Ht.value&&Wt(),Ye.value&&md(),Ii("node-resize")}});function Ft(L){Number.isInteger(L)&&L>=0&&po.add(L)}function sn(L){for(const Q of L)Ft(Number(Q))}function fn(L){oe++;let Q=!0;try{const le=L();return Q=le!==!1,le}finally{oe--,oe===0&&Q&&Gl.value++}}function qn(){qo=[],Er=[],dr=-1,po.clear(),fr.value=Al}function Ai(){qn(),fn(()=>Wp()),bi.clear()}function Qs(L){!Number.isInteger(L)||L<0||L>=Lt.value.length||bi.set(L,eh(L))}function Vu(L,Q,le={}){const ae=Xi[L];Ft(L),Ov(L,Q,le);const be=Xi[L];return Object.is(ae,be)?(po.delete(L),!1):(be&&be>0?Qs(L):ae&&bi.delete(L),!0)}function Qf(L,Q){const le=Qt("getNodeLayoutHeight.slot.offsetHeight",()=>{var ae,be;return(be=(ae=Me.get(L))==null?void 0:ae.offsetHeight)!=null?be:0});return le>0?le:Qt("getNodeLayoutHeight.content.offsetHeight",()=>Q.offsetHeight)}function Ek(L,Q={}){Q.mode!=="merge"?qn():sn(L.map(le=>le.index)),fn(()=>we(L,Q)),p9()}const Cl=F(()=>cs.value&&Zt.value),YD=F(()=>{var L;return!Y.value&&T.batchRendering!==!1&&Zs.value>0&&((L=T.maxLiveNodes)!=null?L:0)<=0}),JD=F(()=>!Y.value&&Ke&&Re.value===!0&&!$e.value&&!Dn.value&&!vi.value&&!Cl.value&&!YD.value),Tk=F(()=>!!Fi&&Cl.value),Lk=F(()=>$e.value||Cn.value),{focusIndex:Yl,liveRange:Ys,updateLiveRange:Yf}=(function(L,Q){const{parsedNodeCount:le,virtualizationEnabled:ae,maxLiveNodesResolved:be,liveNodeBufferResolved:Te,clamp:ze}=Q,We=Te??F(()=>{var Xe;return Math.max(0,(Xe=L.liveNodeBuffer)!=null?Xe:60)}),lt=Z(0),qe=Ts({start:0,end:0});return{liveNodeBufferResolved:We,focusIndex:lt,liveRange:qe,updateLiveRange:function(){const Xe=le.value;if(!ae.value||Xe===0)return qe.start=0,void(qe.end=Xe);const rt=Math.min(be.value,Xe),Oe=We.value,et=ze(lt.value-Oe,0,Math.max(0,Xe-rt));qe.start=et,qe.end=Math.min(Xe,et+rt)}}})(T,{parsedNodeCount:Ni,virtualizationEnabled:$e,maxLiveNodesResolved:Us,liveNodeBufferResolved:Ji,clamp:Js}),wl=new Map,Zu=new Map,Ba=new Map,Up=[],Jl=new Map,$a=new Set,Nk=Z(0);let jv=!1;const Fk=F(()=>(Nk.value,$a.size)),hr=new Map,xl=new Map,Bk=Z(0),Hv=F(()=>{Bk.value;let L=0;for(const Q of hr.values())L+=Math.max(0,Q);return L});let pr=null;const Kp=F(()=>{if(!$e.value)return Lt.value.length;const L=Ji.value,Q=Math.max(Ys.end+L,Wi.value),le=Math.min(Lt.value.length,Q);return Math.max(yi.value,le)});function Vp(){jv||(jv=!0,queueMicrotask(()=>{jv=!1,Nk.value+=1}))}function $k(L,Q,le="node-resize"){if(!j||typeof window>"u")return null;const ae=window.setTimeout(()=>{$a.delete(ae)&&Vp();try{Q()}finally{Ii(le)}},Math.max(0,L));return $a.add(ae),Vp(),ae}function Zp(L){j&&L!=null&&($a.delete(L)&&Vp(),window.clearTimeout(L))}function Dk(){if(j&&typeof window<"u")for(const L of $a)window.clearTimeout(L);$a.size&&($a.clear(),Vp()),Up.length=0,Ba.clear()}function XD(L){W.value=L}function eR(L){z.value=L}function tR(L){G.value=L}const{cancelScheduledFocusSync:Wv,scheduleFocusSync:Zr}=(function(L){const{isClient:Q,containerRef:le,virtualizationEnabled:ae,requestFrame:be,cancelFrame:Te,syncFocusToScroll:ze}=L;let We=null;function lt(){var Xe,rt,Oe;return(Oe=(rt=(Xe=le.value)==null?void 0:Xe.ownerDocument)==null?void 0:rt.defaultView)!=null?Oe:typeof window<"u"?window:null}function qe(){if(!We)return;const Xe=lt();We.viaTimeout?Xe?Xe.clearTimeout(We.id):clearTimeout(We.id):Te?.(We.id),We=null}return{cancelScheduledFocusSync:qe,scheduleFocusSync:function(Xe={}){if(!ae.value)return;if(!Q)return void ze(!0);if(Xe.immediate)return qe(),void ze(!0);if(We)return;const rt=()=>{We=null,ze()};if(be)return void(We={id:be(rt),viaTimeout:!1});const Oe=lt();We={id:Oe?Oe.setTimeout(rt,16):setTimeout(rt,16),viaTimeout:!0}}}})({isClient:j,containerRef:R,virtualizationEnabled:$e,requestFrame:di,cancelFrame:fi,syncFocusToScroll:function(L=!1){var Q;if(!$e.value)return;const le=Pe.value||me();if(!le)return;const ae=le.ownerDocument||((Q=R.value)==null?void 0:Q.ownerDocument)||document,be=ae?.defaultView||(typeof window<"u"?window:null),Te=le===ae?.documentElement||le===ae?.body,ze=Lt.value.length;if(ze<=0)return;if(!Te&&ze>0&&Ie(le)){const at=Qt("syncFocusToScroll.clientHeight",()=>le.clientHeight||0),Mt=Qt("syncFocusToScroll.scrollTop",()=>le.scrollTop),mt=Mt<0?-Mt:Mt;return void Yp(Js((We=Math.max(0,mt)+.5*Math.max(0,at),Je.estimateIndexForOffsetFromEnd(We)),0,Math.max(0,ze-1)),L)}var We;const lt=(function(at,Mt,mt,zt){const qt=R.value;if(!qt)return null;const en=zt?0:Qt("syncFocusToScroll.model.root.getBoundingClientRect",()=>at.getBoundingClientRect().top),Yt=Qt("syncFocusToScroll.model.container.getBoundingClientRect",()=>qt.getBoundingClientRect().top),tn=Math.max(0,en-Yt),kn=zt?Qt("syncFocusToScroll.model.viewport.clientHeight",()=>{var In,hi,Xs,Ds;return(Ds=(Xs=(hi=mt?.innerHeight)!=null?hi:(In=Mt.documentElement)==null?void 0:In.clientHeight)!=null?Xs:at.clientHeight)!=null?Ds:0}):Qt("syncFocusToScroll.model.root.clientHeight",()=>at.clientHeight);return Js($t(tn+.5*Math.max(0,kn)),0,Math.max(0,Lt.value.length-1))})(le,ae,be,Te);if(lt!=null)return void Yp(lt,L);const qe=Te?null:Qt("syncFocusToScroll.root.getBoundingClientRect",()=>le.getBoundingClientRect()),Xe=Te?0:qe.top,rt=Te?Qt("syncFocusToScroll.viewport.clientHeight",()=>{var at,Mt;return(Mt=(at=be?.innerHeight)!=null?at:le.clientHeight)!=null?Mt:0}):qe.bottom,Oe=Se.value;let et=null,ut=null;for(const[at,Mt]of Oe){if(!Mt)continue;const mt=Qt("syncFocusToScroll.slot.getBoundingClientRect",()=>Mt.getBoundingClientRect());mt.bottom<=Xe||mt.top>=rt||(et==null&&(et=at),ut=at)}if(et==null||ut==null){const at=R.value;if(!at)return;const Mt=Te?{top:0}:Qt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>le.getBoundingClientRect()),mt=Qt("syncFocusToScroll.fallback.scrollTop",()=>je(le,ae,Te)),zt=Te?(()=>{const en=Qt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>at.getBoundingClientRect()),Yt=(Te?0:Mt.top)-en.top;return Math.max(0,Yt)})():(()=>{const en=ke(at,le);return Math.max(0,mt-en)})(),qt=Te?Qt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var en,Yt,tn,kn;return(kn=(tn=(Yt=be?.innerHeight)!=null?Yt:(en=ae?.documentElement)==null?void 0:en.clientHeight)!=null?tn:le.clientHeight)!=null?kn:0}):Qt("syncFocusToScroll.fallback.root.clientHeight",()=>le.clientHeight);return void Yp(Js($t(zt+.5*Math.max(0,qt)),0,Math.max(0,Lt.value.length-1)),!0)}Yp(Math.round((et+ut)/2),L)}}),{visibleNodeIndices:qv,nodeVisibilityHandles:ud,nodeVisibilityWatchStops:Gp,nodeVisibilityFallbackTimers:Rk,clearVisibilityFallback:Qp,markNodeVisible:Da,cleanupNodeVisibility:nR,destroyNodeVisibilityState:Uv}=jme({isClient:j,shouldTrackVisibleNodeIndices:()=>Cl.value,shouldCleanupNodeVisibility:()=>$e.value,onNodeMarkedVisible:L=>{$e.value?Zr():Yl.value=Js(L,0,Math.max(0,Lt.value.length-1))},onNodeVisibilityCleaned:L=>{Me.delete(L)&&d6()}}),{cleanupScrollListener:zk,setupScrollListener:iR}=(function(L){const{isClient:Q,virtualizationEnabled:le,listenerEnabled:ae,scrollRootElement:be,resolveScrollContainer:Te,scheduleFocusSync:ze,onScroll:We}=L;let lt=null,qe=null;function Xe(){lt&&(lt(),lt=null),qe=null,be.value=null}function rt(Oe){const et=L.getScrollTop?L.getScrollTop(Oe):Oe.scrollTop;return Math.max(0,Number.isFinite(et)?Math.abs(et):0)}return{cleanupScrollListener:Xe,setupScrollListener:function(){if(!Q)return;if(!((Oe=ae?.value)!=null?Oe:le.value))return void Xe();var Oe;const et=Te();if(!et)return void Xe();if(be.value===et&<)return;Xe(),qe=rt(et);const ut=()=>{if(We?.(),le.value){const at=(function(Mt){const mt=rt(Mt),zt=qe;qe=mt;const qt=Math.max(480,.75*(Mt.clientHeight||0));return zt==null?mt>qt?{immediate:!0}:void 0:Math.abs(mt-zt)>qt?{immediate:!0}:void 0})(et);at?ze(at):ze()}};et.addEventListener("scroll",ut,{passive:!0}),be.value=et,lt=()=>{et.removeEventListener("scroll",ut)}}}})({isClient:j,virtualizationEnabled:$e,listenerEnabled:Lk,scrollRootElement:Pe,resolveScrollContainer:me,scheduleFocusSync:Zr,onScroll:function(){const L=Ye.value;if(!L)return;const Q=Xf();if(!Q||(function(ae){if(oh()>=bt)return nn=null,!1;const be=nn;if(be==null)return!0;const Te=Math.abs(ae.scrollTop-be)<=2;return Te||(nn=null),Te})(Q))return;const le=Xk(Q);le!=null?(le<-32||Math.abs(Math.max(0,le)-Math.max(0,L.distanceFromBottomPx))>32)&&gd("restore"):gd("restore")},getScrollTop:L=>{var Q;const le=L.ownerDocument||((Q=R.value)==null?void 0:Q.ownerDocument)||document,ae=L===le.documentElement||L===le.body||L===le.scrollingElement;return Qt("scrollListener.getScrollTop",()=>je(L,le,ae))}});function Yp(L,Q=!1){const le=Js(L,0,Math.max(0,Lt.value.length-1));!Q&&Math.abs(le-Yl.value)<=1||(Yl.value=le,Yf())}function Js(L,Q,le){return Math.min(Math.max(L,Q),le)}function Kv(L=Lt.value.length){const Q=xi();return!Number.isInteger(Q)||Q<0?L:Js(Q,0,L)}function Vv(L){return L?.firstElementChild}function Ok(L,Q){var le;return L?(le=L.matches)!=null&&le.call(L,Q)?L:L.querySelector(Q):null}function sR(L,Q){L<1||L>6||(K[L]=Q)}function Pk(){if(!ri.value)return void(ee.value=0);const L=Qt("updateExperimentContainerWidth.clientWidth",()=>{var Q,le;return(le=(Q=R.value)==null?void 0:Q.clientWidth)!=null?le:0});ee.value=L>0?L:0}let Jf=null;function Zv(){Jf?.disconnect(),Jf=null}const jk=Xh("ViewportDeferredMarkdownCodeBlockNode",rl({loader:()=>Ti(null,null,function*(){return(yield ns(()=>import("./index5-BHVixm2V.js"),__vite__mapDeps([6,4,5]))).default}),loadingComponent:Xm,delay:0,suspensible:!1}),Xm);function Hk(L){return L===jk}const Wk=F(()=>g.value==="pre"?Jo:g.value==="shiki"?jk:Zy);function qk(){var L;return((L=T.codeBlockProps)==null?void 0:L.showHeader)!==!1}function Uk(L,Q,le){const ae=Xi[Q],be=typeof ae=="number"&&ae>0;if(jo.value&&!be&&!(function(Te){return!!mi.value.paragraph&&(Te.type==="paragraph"||Te.type==="list_item"||Te.type==="list")})(L)){const Te=BB(L,le,ue.value);if(Te)return Te}if(ft.value&&L.type==="code_block"){const Te=(function(ze){if(ze.type!=="code_block")return null;const We=w6(ze,l0(ze));return Hk(We)?"markdown":We===Jo?"pre":We===Wk.value||We===Zy?"monaco":null})(L);if(Te==="monaco"||Te==="markdown"||Te==="pre")return(function(ze,We){var lt,qe,Xe;if(!ze||ze.type!=="code_block")return null;const rt=We.rendererKind,Oe=rt!=="pre"&&We.showHeader!==!1,et=!!ze.diff;let ut=0,at=500;if(rt==="monaco"){const mt=(lt=We.monacoOptions)!=null?lt:{},zt=i4(ze,mt,We.width),qt=(function(Yt){const tn=typeof Yt?.fontSize=="number"&&Yt.fontSize>0?Yt.fontSize:12;return typeof Yt?.lineHeight=="number"&&Yt.lineHeight>0?Yt.lineHeight:Math.round(1.5*tn)})(mt),en=(function(Yt,tn){var kn,In;const hi=typeof((kn=Yt?.padding)==null?void 0:kn.top)=="number"?Yt.padding.top:tn?0:8,Xs=typeof((In=Yt?.padding)==null?void 0:In.bottom)=="number"?Yt.padding.bottom:tn?0:8;return Math.max(0,hi)+Math.max(0,Xs)})(mt,et);at=typeof mt.MAX_HEIGHT=="number"&&mt.MAX_HEIGHT>0?mt.MAX_HEIGHT:500,ut=Math.round(zt*qt+en)}else if(rt==="markdown"){const mt=i4(ze);ut=Math.round(21*mt+32)}else{const mt=i4(ze);ut=Math.round(28*mt),at=Number.POSITIVE_INFINITY}const Mt=Math.max(1,Math.min(ut,at));return At({kind:"code-block",height:Math.round(Mt+(Oe?40:0)),contentHeight:Mt,rendererKind:rt},et&&rt==="monaco"?{diffInline:Db((qe=We.monacoOptions)!=null?qe:{},(Xe=We.width)!=null?Xe:0)}:{})})(L,{rendererKind:Te,monacoOptions:T.codeBlockMonacoOptions,showHeader:qk(),width:le})}return null}I4(()=>{if(Gl.value,oe>0)return;const L=Lt.value,Q=Qi();if(!L.length||!cr.value)return qo=[],Er=[],dr=-1,po.clear(),void(fr.value=Al);const le=ee.value||Qt("estimatedNodeHeights.clientWidth",()=>{var qe;return((qe=R.value)==null?void 0:qe.clientWidth)||0});if(!Number.isFinite(le)||le<=0)return qo=[],Er=[],dr=-1,po.clear(),void(fr.value=Al);const ae=(function(qe){return[Math.round(qe),jo.value,ft.value,ue.value,T.codeBlockMonacoOptions,qk(),g.value,mi.value,e4.value]})(le),be=qo.length<=L.length&&(ze=ae,(Te=Er).length===ze.length&&Te.every((qe,Xe)=>Object.is(qe,ze[Xe])));var Te,ze;const We=be&&dr===Q?L.length:be?Kv(L.length):0,lt=be?Array.from(po):[];qo.length=L.length;for(let qe=We;qe<L.length;qe++)qo[qe]=Uk(L[qe],qe,le);for(const qe of lt)qe>=0&&qe<L.length&&qe<We&&(qo[qe]=Uk(L[qe],qe,le));po.clear(),Er=ae,dr=Q,fr.value=qo,xz(fr)},{flush:"sync"});const cd=F(()=>fr.value);Je=(function(L){let Q=!0,le=[0],ae="";function be(Xe){var rt;const Oe=L.nodeHeights[Xe];if(Number.isFinite(Oe)&&Oe>0)return Oe;const et=L.parsedNodes.value[Xe],ut=et?.type,at=!!((rt=L.hasCustomParagraphComponent)!=null&&rt.call(L)),Mt=L.estimatedNodeHeights.value[Xe],mt=Mt?.height;if(!(function(qt,en,Yt){return!!(Yt&&en?.kind==="simple-text"&&(qt==="paragraph"||qt==="list_item"||qt==="list"))})(ut,Mt,at)&&Number.isFinite(mt)&&mt>0)return mt;const zt=Eme(et,L.getContainerWidth()||640);return ut==="heading"||ut==="paragraph"&&zt<=28&&(function(qt,en){if(en)return!1;const Yt=qt.children;return!Array.isArray(Yt)||!Yt.length||Yt.every(DB)})(et,at)?zt:Math.max(L.averageNodeHeight.value,zt)}function Te(){var Xe;const rt=L.parsedNodes.value.length,Oe=L.getPrefixCacheKeyParts().join(":");if(!Q&&ae===Oe)return le;const et=new Array(rt+1);et[0]=0;for(let ut=0;ut<rt;ut++)et[ut+1]=et[ut]+(L.heightEstimationActive.value?be(ut):(Xe=L.nodeHeights[ut])!=null?Xe:L.averageNodeHeight.value);return le=et,ae=Oe,Q=!1,et}function ze(Xe){var rt,Oe;const et=L.parsedNodes.value.length;if(et<=0||Xe<=0)return 0;const ut=Te();if(Xe>=((rt=ut[et])!=null?rt:0))return et-1;let at=0,Mt=et-1,mt=et-1;for(;at<=Mt;){const zt=at+Mt>>1;((Oe=ut[zt+1])!=null?Oe:0)>=Xe?(mt=zt,Mt=zt-1):at=zt+1}return mt}function We(Xe,rt){var Oe,et;if(Xe>=rt)return 0;if(L.heightEstimationActive.value)return(function(Mt,mt){var zt,qt;const en=L.parsedNodes.value.length,Yt=Y_(Math.trunc(Mt),0,en),tn=Y_(Math.trunc(mt),Yt,en);if(Yt>=tn)return 0;const kn=Te();return((zt=kn[tn])!=null?zt:0)-((qt=kn[Yt])!=null?qt:0)})(Xe,rt);if(L.heightTreeSize.value!==L.parsedNodes.value.length){let Mt=0;for(let mt=Xe;mt<rt;mt++)Mt+=(Oe=L.nodeHeights[mt])!=null?Oe:L.averageNodeHeight.value;return Mt}const ut=L.heightSumTree.value,at=L.heightKnownTree.value;if(!ut.length||!at.length){let Mt=0;for(let mt=Xe;mt<rt;mt++)Mt+=(et=L.nodeHeights[mt])!=null?et:L.averageNodeHeight.value;return Mt}return L.fenwickRangeSum(ut,Xe,rt)+(rt-Xe-L.fenwickRangeSum(at,Xe,rt))*L.averageNodeHeight.value}function lt(Xe){var rt;if(Xe<=0)return 0;const Oe=L.parsedNodes.value;if(L.heightEstimationActive.value)return ze(Xe);if(L.heightTreeSize.value===Oe.length&&L.heightSumTree.value.length&&L.heightKnownTree.value.length){const ut=L.averageNodeHeight.value,at=L.heightSumTree.value,Mt=L.heightKnownTree.value,mt=Yt=>Yt<=0?0:L.fenwickRangeSum(at,0,Yt)+(Yt-L.fenwickRangeSum(Mt,0,Yt))*ut;let zt=0,qt=Oe.length-1,en=Oe.length-1;for(;zt<=qt;){const Yt=zt+qt>>1;mt(Yt+1)>=Xe?(en=Yt,qt=Yt-1):zt=Yt+1}return en}let et=Xe;for(let ut=0;ut<Oe.length;ut++){const at=(rt=L.nodeHeights[ut])!=null?rt:L.averageNodeHeight.value;if(et<=at)return ut;et-=at}return Math.max(0,Oe.length-1)}function qe(){if(!L.heightEstimationActive.value)return 0;let Xe=0;const rt=L.estimatedNodeHeights.value;for(let Oe=0;Oe<rt.length;Oe++){if(!rt[Oe])continue;const et=L.nodeHeights[Oe];Number.isFinite(et)&&et>0||Xe++}return Xe}return{markFallbackHeightPrefixDirty:function(){Q=!0},getFallbackNodeHeight:be,estimateHeightRange:We,estimateIndexForOffset:lt,estimateIndexForOffsetFromEnd:function(Xe){var rt,Oe;const et=L.parsedNodes.value;if(!et.length)return 0;if(Xe<=0)return Math.max(0,et.length-1);if(L.heightEstimationActive.value){const at=(rt=Te()[et.length])!=null?rt:0;return ze(Math.max(0,at-Xe))}if(L.heightTreeSize.value===et.length){const at=We(0,et.length);return lt(Math.max(0,at-Xe))}let ut=Xe;for(let at=et.length-1;at>=0;at--){const Mt=(Oe=L.nodeHeights[at])!=null?Oe:L.averageNodeHeight.value;if(ut<=Mt)return at;ut-=Mt}return 0},getEstimatedNodeHeightCount:qe,buildVirtualHeightSummary:function(Xe){var rt;const Oe=L.parsedNodes.value.length;return{totalNodes:Oe,measuredCount:L.heightStats.count,estimatedCount:qe(),averageNodeHeight:L.averageNodeHeight.value,topSpacerHeight:Xe.topSpacerHeight,bottomSpacerHeight:Xe.bottomSpacerHeight,estimatedTotalHeight:We(0,Oe),width:(rt=Xe.width)!=null?rt:L.getContainerWidth()}}}})({parsedNodes:Lt,nodeHeights:Xi,heightStats:os,heightTreeSize:Ku,heightSumTree:ld,heightKnownTree:Hp,averageNodeHeight:Gf,heightEstimationActive:ri,estimatedNodeHeights:cd,getContainerWidth:On,hasCustomParagraphComponent:()=>!!mi.value.paragraph,getPrefixCacheKeyParts:()=>{var L;const Q=Nh(ee.value||Qt("getFallbackHeightPrefix.clientWidth",()=>{var ae;return((ae=R.value)==null?void 0:ae.clientWidth)||0})),le=((L=i.virtualScroll)==null?void 0:L.measurementKey)==null?"":String(i.virtualScroll.measurementKey);return[Lt.value.length,os.count,Math.round(os.total),Math.round(100*Gf.value),le,Q,ri.value?1:0,e4.value,X.value,mi.value.paragraph?1:0]},fenwickRangeSum:Ge}),Qe(()=>Lt.value.length,L=>{var Q;Ot(),L<=0?Ai():(L<Ku.value&&(Q=L,qn(),fn(()=>qp(Q))),L!==Ku.value&&ad(L))},{immediate:!0});const oR=F(()=>{if(!$e.value)return Lt.value.map((ae,be)=>({node:ae,index:be}));const L=Lt.value.length,Q=Js(Ys.start,0,L),le=Js(Ys.end,Q,L);return Lt.value.slice(Q,le).map((ae,be)=>({node:ae,index:Q+be}))}),Gv=F(()=>$e.value?Qn(0,Math.min(Ys.start,Lt.value.length)):0),Qv=F(()=>{if(!$e.value)return 0;const L=Lt.value.length;return Qn(Math.min(Ys.end,L),L)});function Kk(){return Je.buildVirtualHeightSummary({topSpacerHeight:Gv.value,bottomSpacerHeight:Qv.value,width:Gu()})}function rR(){const L=Lt.value,Q=Kk();return dn(At({},Q),{probe:{paragraphReady:!!ue.value.paragraph,listItemReady:!!ue.value.listItem,listWrapperOverhead:ue.value.listWrapperOverhead,headingReadyLevels:Object.entries(ue.value.headings).filter(([,le])=>!!le).map(([le])=>Number(le))},nodes:L.map((le,ae)=>{var be,Te,ze,We,lt,qe,Xe,rt,Oe;return{index:ae,type:le.type,estimateKind:(Te=(be=cd.value[ae])==null?void 0:be.kind)!=null?Te:null,rendererKind:(We=(ze=cd.value[ae])==null?void 0:ze.rendererKind)!=null?We:null,estimatedHeight:(qe=(lt=cd.value[ae])==null?void 0:lt.height)!=null?qe:null,estimatedContentHeight:(rt=(Xe=cd.value[ae])==null?void 0:Xe.contentHeight)!=null?rt:null,measuredHeight:(Oe=Xi[ae])!=null?Oe:null}})})}function Yv(){return i.indexKey!=null?String(i.indexKey):Dn.value?`virtual-${Ri()}`:"markdown-renderer"}function Vk(L){const Q=String(L),le=`${Yv()}-`;if(!Q.startsWith(le))return null;const ae=Q.slice(le.length).match(/^(\d+)(?:$|-)/);if(!ae)return null;const be=Number(ae[1]);return!Number.isInteger(be)||be<0||be>=Lt.value.length?null:be}function Ri(){var L,Q,le;const ae=(L=i.virtualScroll)==null?void 0:L.sessionKey;return String(ae!=null&&ae!==""?ae:(le=(Q=i.indexKey)!=null?Q:T.customId)!=null?le:ni)}function fs(){var L;const Q=(L=i.virtualScroll)==null?void 0:L.threadKey;return Q==null||Q===""?void 0:String(Q)}const lR=F(()=>{var L,Q,le;return(le=fs())!=null?le:String((Q=(L=i.indexKey)!=null?L:T.customId)!=null?Q:ni)});function Jv(L){var Q;return(L??"")===((Q=fs())!=null?Q:"")}function Xl(){var L,Q,le;return Q=(L=i.virtualScroll)==null?void 0:L.measurementKey,le=(function(){const ae=g.value;return(function(be){var Te,ze;const We=be.renderer,lt=We==="monaco"?be.codeBlockMonacoOptions:void 0,qe=be.codeBlockProps,Xe=We==="shiki";return[be.isDark?"dark":"light",We==="monaco"?"code-rich":We==="pre"?"code-pre":"code-shiki",be.codeBlockStream===!1?"code-static":"code-stream",Rs(be.codeBlockMinWidth),Rs(be.codeBlockMaxWidth),...Xe?[bpe((Te=qe?.themes)!=null?Te:be.themes,(ze=qe?.langs)!=null?ze:be.langs)]:[],Rs(lt?.fontSize),Rs(lt?.lineHeight),Rs(lt?.fontFamily),Rs(lt?.tabSize),Rs(lt?.MAX_HEIGHT),Rs(lt?.wordWrap),Rs(lt?.wrappingIndent),Rs(lt?.padding),Rs(qe?.showHeader),Rs(qe?.showCopyButton),Rs(qe?.showExpandButton),Rs(qe?.showPreviewButton),Rs(qe?.showCollapseButton),Rs(qe?.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})})(),[Q==null?"":String(Q),le].join("\0")}function Gu(){return On()}const Jp=F(()=>Nh(Gu())),gr=F(()=>[Xl(),Jp.value].join("\0")),aR=F(()=>{var L;return Dn.value?["virtual",(L=fs())!=null?L:"",Ri(),gr.value].join("\0"):i.indexKey});function dd(){Bk.value+=1}function Xv(L){return!(!L||!Number.isInteger(L.index)||L.index<0||L.index>=Lt.value.length||L.sessionKey!==Ri()||L.threadKey!==fs()||L.layoutEpochKey!==gr.value)}function Zk(L){const Q=String(L),le=xl.get(Q);return le?Xv(le)?le.index:null:Vk(Q)}function Gk(L="async-node"){(hr.size||xl.size)&&(hr.clear(),xl.clear(),dd(),Ii(L))}const fd=an(o8,null),e9={reportHeight(L,Q){if(!Cn.value)return;const le=Zk(L);if(le==null)return;const ae=wl.get(le);if(!ae)return;const be=Number(Q),Te=Qf(le,ae);(function(ze,We,lt={}){fn(()=>Vu(ze,We,lt))})(le,Number.isFinite(be)&&be>0?Math.max(be,Te||0):Te)},markPending(L){if(!Cn.value)return;const Q=Vk(L);Q!=null&&(function(le,ae){var be;const Te=xl.get(le);if(Te&&Xv(Te))return hr.set(le,Math.max(0,(be=hr.get(le))!=null?be:0)+1),dd(),void Ii("async-node");hr.set(le,1),xl.set(le,(function(ze){return{index:ze,sessionKey:Ri(),threadKey:fs(),layoutEpochKey:gr.value}})(ae)),dd(),Ii("async-node")})(String(L),Q)},markSettled(L){if(!Cn.value)return;const Q=String(L),le=Zk(L);(le!=null||(function(ae){return hr.has(String(ae))})(Q))&&(function(ae){var be;const Te=(be=hr.get(ae))!=null?be:0;return!(Te<=0||(Te<=1?(hr.delete(ae),xl.delete(ae)):hr.set(ae,Te-1),dd(),Te===1&&Ii("async-node"),0))})(Q)&&le!=null&&ea()}};function uR(){let L=0;for(const Q of wl.values())L+=Qt("getVisibleDomHeight.offsetHeight",()=>{var le;return(le=Q?.offsetHeight)!=null?le:0});return Math.ceil(Math.max(0,L))}Pn(o8,{reportHeight(L,Q){e9.reportHeight(L,Q),fd?.reportHeight(L,Q)},markPending(L){e9.markPending(L),fd?.markPending(L)},markSettled(L){e9.markSettled(L),fd?.markSettled(L)}});let t9,n9=null,hd=null;function Xp(L){return L!==!1&&L!=null&&L!==""}function Qk(){return $e.value?(function(){if(!$e.value)return!0;const L=Lt.value.length,Q=Js(Ys.start,0,L),le=Js(Ys.end,Q,L);if(Q>=le)return!0;for(let ae=Q;ae<le;ae++)if(!Me.has(ae)||i0(ae)&&!wl.has(ae))return!1;return!0})():yi.value>=Kp.value}function i9(){return Re.value===!0&&!ht.value&&Hv.value===0&&$a.size===0&&Jl.size===0&&pr==null&&Qk()}function Yk(){var L,Q;if(((L=i.virtualScroll)==null?void 0:L.settleMode)!=="manual"||n9===Ri()&&t9===fs())return!0;const le=(Q=i.virtualScroll)==null?void 0:Q.settledToken;return!!Xp(le)&&hd===fh(le)}function s9(){return i9()&&Yk()}function cR(L,Q){return Q.totalNodes<=0?L==="final"?"final":"estimate":Q.measuredCount>=Q.totalNodes?L==="final"?"final":"measured":Q.measuredCount>0||Q.estimatedCount>0?"mixed":"estimate"}function Qu(L="manual",Q){const le=Kk(),ae=(function(be){return be||(Re.value!==!0?Lt.value.length>0?"streaming":"estimating":!Qk()||Jl.size>0||pr!=null?"measuring":s9()?"settled":"settling")})(Q);return{sessionKey:Ri(),threadKey:fs(),phase:ae,nodeCount:le.totalNodes,liveRange:{start:Ys.start,end:Ys.end},renderedCount:yi.value,measuredCount:le.measuredCount,estimatedCount:le.estimatedCount,averageNodeHeight:le.averageNodeHeight,topSpacerHeight:le.topSpacerHeight,bottomSpacerHeight:le.bottomSpacerHeight,visibleDomHeight:uR(),totalHeight:Jk(),width:le.width,final:Re.value===!0,stable:s9(),confidence:cR(ae,le),reason:L}}function Xf(){const L=Pe.value||me(),Q=R.value;if(!L||!Q)return null;const le=L.ownerDocument||Q.ownerDocument||document,ae=L===le.documentElement||L===le.body||L===le.scrollingElement,be=Qt("getScrollBox.scrollTop",()=>je(L,le,ae)),Te=Qt("getScrollBox.scrollHeight",()=>{var We,lt,qe,Xe,rt;return ae?Math.max((lt=(We=le.documentElement)==null?void 0:We.scrollHeight)!=null?lt:0,(Xe=(qe=le.body)==null?void 0:qe.scrollHeight)!=null?Xe:0,(rt=L.scrollHeight)!=null?rt:0):L.scrollHeight}),ze=Qt("getScrollBox.clientHeight",()=>{var We;return ae?((We=le.documentElement)==null?void 0:We.clientHeight)||L.clientHeight||0:L.clientHeight});return{root:L,doc:le,isViewportRoot:ae,scrollTop:be,scrollHeight:Te,clientHeight:ze}}function Jk(){const L=Lt.value.length,Q=Math.max(0,Qn(0,L)),le=Qt("getRendererLogicalHeight.offsetHeight",()=>{var be,Te;return(Te=(be=R.value)==null?void 0:be.offsetHeight)!=null?Te:0}),ae=Math.max(0,le>0?le:Qt("getRendererLogicalHeight.scrollHeight",()=>{var be,Te;return(Te=(be=R.value)==null?void 0:be.scrollHeight)!=null?Te:0}));return L<=0?Math.ceil(le):$e.value?Q>0?Math.max(1,Math.ceil(Q),(function(){let be=Gv.value+Qv.value;for(const Te of Me.values())Te&&(be+=Math.max(0,Qt("getVirtualizedDomLogicalHeight.offsetHeight",()=>Te.offsetHeight||0)));return Math.ceil(Math.max(0,be))})(),(function(be,Te){return be<=0||Te<=0?0:Te<=be+Math.max(512,.05*be)?Math.ceil(Te):0})(Q,ae)):Math.max(1,Math.ceil(ae)):Cn.value?Q>0||os.count>0||Je.getEstimatedNodeHeightCount()>0?(fo.value&&yi.value,Math.max(1,Math.ceil(ae),Math.ceil(Q))):Math.ceil(ae):Math.max(1,Math.ceil(ae),Math.ceil(Q))}function Xk(L){const Q=R.value;if(!Q)return null;const le=Qt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>Q.getBoundingClientRect());return(function(be){return be.isViewportRoot?be.clientHeight:Qt("getViewportBottomInRoot.getBoundingClientRect",()=>be.root.getBoundingClientRect().bottom)})(L)-le.bottom}function dR(L={}){const Q=L.requireViewport!==!1,le=(function(Te=64){const ze=Xf(),We=R.value;if(!ze||!We)return!1;const lt=(function(Xe){if(Xe.isViewportRoot)return{top:0,bottom:Xe.clientHeight};const rt=Qt("getVirtualViewportRect.getBoundingClientRect",()=>Xe.root.getBoundingClientRect());return{top:rt.top,bottom:rt.bottom}})(ze),qe=Qt("isRendererNearVirtualViewport.getBoundingClientRect",()=>We.getBoundingClientRect());return qe.bottom>=lt.top-Te&&qe.top<=lt.bottom+Te})();if(Q&&!le)return null;const ae=(function(){const Te=Xf(),ze=R.value;if(!Te||!ze||Math.max(0,Te.scrollHeight-Te.scrollTop-Te.clientHeight)>64)return null;const We=Xk(Te);return We==null?null:We>=-8&&We<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,We)}:null})();if(ae)return{anchor:ae,captured:!0};const be=ki();if(be)return{anchor:{type:"node",nodeIndex:be.nodeIndex,offsetWithinNodePx:be.offsetWithinNodePx},captured:le};if(L.allowFallback===!0){const Te=(function(){const ze=Lt.value.length;return ze<=0?null:{type:"node",nodeIndex:Js(Yl.value,0,Math.max(0,ze-1)),offsetWithinNodePx:0}})();return Te?{anchor:Te,captured:!1}:null}return null}function o9(L){let Q=2166136261;for(let le=0;le<L.length;le++)Q^=L.charCodeAt(le),Q=Math.imul(Q,16777619);return(Q>>>0).toString(36)}function fR(L,Q){let le=L;for(let ae=0;ae<Q.length;ae++)le^=Q.charCodeAt(ae),le=Math.imul(le,16777619);return le^=31,le=Math.imul(le,16777619),le}const hR=new Set(["children","items","header","rows","cells","attrs","data","term","definition"]);function e0(L,Q=new WeakSet,le=0){if(L==null||typeof L=="number"||typeof L=="boolean")return String(L);if(typeof L=="string")return`s:${(function(ae){const be=ae.length>8192?`${ae.slice(0,8192)}...${ae.length}`:ae;return`${ae.length}:${o9(be)}`})(L)}`;if(typeof L=="function")return"fn";if(typeof L!="object")return typeof L;if(Q.has(L))return"cycle";if(le>=6)return"max-depth";Q.add(L);try{if(Array.isArray(L)){if(L.length<=160){const qe=[];for(let Xe=0;Xe<L.length;Xe++)qe.push(e0(L[Xe],Q,le+1));return`a:${L.length}:${qe.join(",")}`}const Te=[],ze=[],We=Math.max(0,L.length-32);let lt=2166136261;for(let qe=0;qe<L.length;qe++){const Xe=e0(L[qe],Q,le+1);lt=fR(lt,Xe),qe<32&&Te.push(Xe),qe>=We&&ze.push(Xe)}return[`a:${L.length}`,`h=${Te.join(",")}`,`t=${ze.join(",")}`,`all=${(lt>>>0).toString(36)}`].join(":")}const ae=L,be=Object.keys(ae).filter(Te=>{const ze=ae[Te];return Te!=="parent"&&Te!=="el"&&Te!=="component"&&(ze==null||typeof ze=="string"||typeof ze=="number"||typeof ze=="boolean"||hR.has(Te))}).sort();return`o:${be.length}:${be.map(Te=>`${Te}=${e0(ae[Te],Q,le+1)}`).join(";")}`}finally{Q.delete(L)}}let r9=-1,l9="",Yu=[2166136261];function eh(L){const Q=Lt.value[L];return Q?o9(e0(Q)):""}function pR(L,Q){let le=L;for(let ae=0;ae<Q.length;ae++)le^=Q.charCodeAt(ae),le=Math.imul(le,16777619);return le>>>0}function a9(){var L,Q;const le=X.value;if(r9===le)return l9;const ae=Lt.value.length;let be=Kv(ae);(r9!==le-1||be>ae||Yu.length<be+1)&&(be=0),be===0?Yu=[2166136261]:Yu.length=be+1;for(let Te=be;Te<ae;Te++){const ze=eh(Te);Yu[Te+1]=pR((L=Yu[Te])!=null?L:2166136261,ze)}return Yu.length=ae+1,l9=(((Q=Yu[ae])!=null?Q:2166136261)>>>0).toString(36),r9=le,l9}function pd(L,Q={}){var le;const ae=Q.includeHeightCache===!0,be=(le=Q.includeContentHash)!=null?le:ae,Te=ae?(function(We){const lt=(function(){var at,Mt;const mt=Number((Mt=(at=i.virtualScroll)==null?void 0:at.heightCacheLimit)!=null?Mt:5e3);return!Number.isFinite(mt)||mt<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(mt))})();if(!Number.isFinite(lt)||We.length<=lt)return We;const qe=new Map,Xe=at=>{!at||qe.size>=lt||qe.set(at.index,at)},rt=Lt.value.length,Oe=Js(Ys.start-2*Ji.value,0,rt),et=Js(Ys.end+2*Ji.value,Oe,rt);for(const at of We)at.index>=Oe&&at.index<et&&Xe(at);const ut=Math.max(1,Math.ceil(We.length/lt));for(let at=0;at<We.length&&qe.size<lt;at+=ut)Xe(We[at]);for(let at=We.length-1;at>=0&&qe.size<lt;at-=ut)Xe(We[at]);return Array.from(qe.values()).sort((at,Mt)=>at.index-Mt.index).slice(0,lt)})(ge().map(We=>{var lt;const qe=Lt.value[We.index];return qe?dn(At({},We),{nodeType:String((lt=qe.type)!=null?lt:""),signature:eh(We.index)}):null}).filter(We=>!!We)):[],ze=dR({allowFallback:Q.allowAnchorFallback===!0,requireViewport:Q.requireViewport});return ze||Te.length||Q.includeEmptyState===!0?dn(At({sessionKey:L.sessionKey,threadKey:L.threadKey},ze?{anchor:ze.anchor,anchorCaptured:ze.captured}:{anchorCaptured:!1}),{metrics:L,width:L.width,contentHash:be?a9():void 0,measurementKey:Xl()||void 0,heightCache:Te.length?Te:void 0}):null}function u9(L){var Q,le;const ae=Xf();if(!ae)return;const be=(function(We){const lt=R.value;if(!lt)return null;const qe=ke(lt,We.root),Xe=Lt.value.length,rt=Qt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>lt.offsetHeight||0),Oe=Math.max(0,rt>0?rt:Xe>0?Qt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>lt.scrollHeight||0):0),et=Jk();return qe+Math.max(Oe,et)})(ae);if(be==null)return;const Te=Math.max(0,L.distanceFromBottomPx),ze=Math.max(0,be-ae.clientHeight-Te);(function(We){bt=oh()+120,nn=We})(ze),ae.isViewportRoot?(le=(Q=ae.doc.defaultView)==null?void 0:Q.scrollTo)==null||le.call(Q,0,ze):Z_(ae.root,ae.doc,ze,{isReverseFlexScrollRoot:Ie,getNormalizedScrollTop:je})}const c9=[];function e6(){if(j)for(xt!=null&&(fi?.(xt),xt=null);c9.length;){const L=c9.pop();L!=null&&window.clearTimeout(L)}}function gd(L){const Q=!!Ye.value;Ye.value=null,bt=0,nn=null,e6(),Q&&L&&Ii(L)}function md(){if(!Ye.value||!j||xt!=null)return;const L=()=>{xt=null;const Q=Ye.value;Q&&u9(Q)};xt=di?di(L):null,xt==null&&L()}function t6(L,Q={}){const le=Lt.value.length;return le<=0?[]:L.filter(ae=>!(!Number.isInteger(ae.index)||ae.index<0||ae.index>=le)&&!(!Number.isFinite(ae.height)||ae.height<=0)&&!(Q.requireSignature&&!ae.signature)&&!(Q.requireCompatibilityMetadata&&!ae.nodeType&&!ae.signature)&&(function(be){var Te;const ze=Lt.value[be.index];return!(!ze||be.nodeType&&be.nodeType!==String((Te=ze.type)!=null?Te:"")||be.signature&&be.signature!==eh(be.index))})(ae))}function n6(L){const Q=Nh(Gu()),le=Nh(L);return Q!==-1&&le!==-1&&Q===le}function d9(L){var Q;const le=Number(L?.width);if(Number.isFinite(le)&&le>0)return le;const ae=Number((Q=L?.metrics)==null?void 0:Q.width);return Number.isFinite(ae)&&ae>0?ae:null}function i6(L){var Q;return L.sessionKey===Ri()&&!!Jv(L.threadKey)&&((Q=L.measurementKey)!=null?Q:"")===Xl()&&!!n6(d9(L))&&!!(function(le){const ae=le.heightCache;return!!ae?.length&&(s6(le)?ae.some(be=>!!(be.nodeType||be.signature)):ae.some(be=>!!be.signature))})(L)}function s6(L){return!!(L.contentHash&&L.contentHash===a9())}function gR(L){return!s6(L)}let Ju=null,Xu=null,t0=null,th=null,nh=null;function f9(L){var Q;const le=L.map(be=>{var Te,ze;return[be.index,Math.round(10*be.height),(Te=be.nodeType)!=null?Te:"",(ze=be.signature)!=null?ze:""].join("")}).join(""),ae=Nh(Gu());return[(Q=fs())!=null?Q:"",Ri(),Xl(),Lt.value.length,ae,L.length,o9(le)].join(":")}function o6(L=(Q=>(Q=i.virtualScroll)==null?void 0:Q.heightCache)()){if(!Cn.value||!L?.length||Lt.value.length<=0||!n6((Q=i.virtualScroll)==null?void 0:Q.heightCacheWidth))return!1;var Q;const le=t6(L,{requireSignature:!0});if(!le.length)return!1;const ae=f9(le);return ae===Ju?(Xu="standalone",!0):(Ek(le,{mode:"merge"}),Ot(),Ju=ae,Xu="standalone",lh(),Ii("restore"),!0)}function h9(L,Q={}){var le,ae,be;if(!Cn.value||!L||L.sessionKey!==Ri()||!Jv(L.threadKey)||Lt.value.length<=0)return!1;const Te=!!((le=L.heightCache)!=null&&le.length)&&!n0(),ze=!L.anchor||L.anchorCaptured===!1&&Q.allowUncapturedAnchor!==!0?null:L.anchor,We=Q.restoreAnchor===!0&&!!ze&&!n0()&&Number(d9(L))>0;let lt=!1;if((ae=L.heightCache)!=null&&ae.length&&i6(L)){const Xe=t6(L.heightCache,{requireCompatibilityMetadata:!L.contentHash,requireSignature:gR(L)});Xe.length&&(Ek(Xe,{mode:"merge"}),Ot(),Ju=f9(Xe),Xu="restore",lh(),lt=!0)}if(Te||We)return!1;if(!Q.restoreAnchor||!ze)return lt&&Ii("restore"),!0;const qe=(function(Xe,rt){var Oe;const et=Xe.anchor,ut=et?et.type==="bottom"?`bottom:${Math.round(et.distanceFromBottomPx)}`:`node:${et.nodeIndex}:${Math.round(et.offsetWithinNodePx)}`:"none";return[(Oe=fs())!=null?Oe:"",Ri(),Xl(),Jp.value,rt,ut].join(":")})(L,(be=Q.restoreToken)!=null?be:"imperative");return t0===qe?(lt&&Ii("restore"),!0):(t0=qe,(function(Xe){const rt=()=>{if(Xe.type==="node")return gd(),void $s({nodeIndex:Xe.nodeIndex,offsetWithinNodePx:Xe.offsetWithinNodePx});if(dt(),Ht.value=null,Ye.value=Xe,e6(),u9(Xe),j)for(const Oe of[0,120,280,480])c9.push(window.setTimeout(()=>{const et=Ye.value;et&&u9(et)},Oe))};(function(Oe){if(!$e.value)return!1;const et=Lt.value.length;return!(et<=0||(Yl.value=Oe.type==="node"?Js(Oe.nodeIndex,0,et-1):et-1,Yf(),0))})(Xe)?kt(rt):rt()})(ze),Ii("restore"),!0)}function n0(){const L=Gu();return Number.isFinite(L)&&L>0}function r6(L){var Q;return L.sessionKey===Ri()&&!!Jv(L.threadKey)&&(Lt.value.length<=0||!(!((Q=L.heightCache)!=null&&Q.length)||n0())||!(!(L.anchor&&Number(d9(L))>0)||n0()))}function p9(){bi.clear();for(const L of Object.keys(Xi)){const Q=Number(L);Number.isInteger(Q)&&Q>=0&&Q<Lt.value.length&&Qs(Q)}}function ih(){pr!=null&&(fi?.(pr),pr=null),w9()}function l6(){return!j||Si?Promise.resolve():new Promise(L=>{let Q=!1,le=null;const ae=()=>{Q||(Q=!0,le!=null&&window.clearTimeout(le),L())};if(di)return di(ae),void(le=window.setTimeout(ae,50));le=window.setTimeout(ae,0)})}function g9(L,Q=fs(),le=gr.value){return Ri()===L&&fs()===Q&&gr.value===le}function m9(){return Ti(this,arguments,function*(L={}){var Q,le,ae,be,Te;const ze=Ri(),We=fs(),lt=gr.value,qe=(Q=L.frames)!=null?Q:2,Xe=(le=L.timeoutMs)!=null?le:120,rt=(ae=L.reason)!=null?ae:"manual",Oe=L.expectedSettledTokenKey,et=L.flushPendingTimers===!0,ut=Qu(rt),at=()=>dn(At({},ut),{phase:ut.final?"settling":ut.phase,stable:!1,confidence:ut.confidence==="final"?"mixed":ut.confidence,reason:rt}),Mt=()=>g9(ze,We,lt)&&(Oe==null||rh()===Oe);for(let en=0;en<qe;en++){if(yield kt(),!Mt()||(yield l6(),!Mt()))return at();ea(),ih()}if(yield(function(en){return!j||en<=0?Promise.resolve():new Promise(Yt=>window.setTimeout(Yt,en))})(Xe),!Mt()||(et&&Dk(),ea(),ih(),!Mt()))return at();const mt=i9();mt&&(n9=ze,t9=We,((be=i.virtualScroll)==null?void 0:be.settleMode)==="manual"&&Oe!=null&&Xp((Te=i.virtualScroll)==null?void 0:Te.settledToken)&&rh()===Oe&&(hd=fh(i.virtualScroll.settledToken)));const zt=Mt()&&mt&&Yk(),qt=Qu(rt,zt?"final":void 0);return A9(qt,!0),qt})}let v9="content",ec=null,tc=null,y9=0,sh=null,vd=null,b9=null,k9=null;function oh(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function a6(L){var Q,le;const ae=sh;if(!ae)return!0;const be=(le=(Q=i.virtualScroll)==null?void 0:Q.heightDiffThresholdPx)!=null?le:1;return Math.abs(L.totalHeight-ae.totalHeight)>be||L.sessionKey!==ae.sessionKey||L.phase!==ae.phase||L.stable!==ae.stable||L.final!==ae.final||L.threadKey!==ae.threadKey||L.nodeCount!==ae.nodeCount||L.measuredCount!==ae.measuredCount||L.width!==ae.width}function rh(L=(Q=>(Q=i.virtualScroll)==null?void 0:Q.settledToken)()){return Rs(L)}function u6(L,Q){var le,ae;return[L,Q.sessionKey,(le=Q.threadKey)!=null?le:"",Xl(),a9(),Rs((ae=i.virtualScroll)==null?void 0:ae.settledToken),Math.round(Q.totalHeight),Math.round(Q.width)].join("\0")}function lh(){b9=null,k9=null,vd=null}function mR(L){const Q=L.heightCache;return Q?.length?f9(Q):""}function ah(L){var Q,le,ae;const be=L.metrics,Te=L.anchor?(ze=L.anchor).type==="bottom"?`bottom:${Math.round(ze.distanceFromBottomPx)}`:`node:${ze.nodeIndex}:${Math.round(ze.offsetWithinNodePx)}`:"none";var ze;return[L.sessionKey,(Q=L.threadKey)!=null?Q:"",(le=L.measurementKey)!=null?le:Xl(),(ae=L.contentHash)!=null?ae:"",mR(L),Te,L.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 A9(L,Q=!1){if(!Cn.value||(function(ze=!1){return!ze&&Dn.value&&!Di.value})(Q))return;const le=Q||a6(L),ae=(function(ze,We=!1){return We||ze.stable||ze.phase==="final"?{state:pd(ze,{includeHeightCache:!0})}:{state:pd(ze)}})(L,Q),be=ae.state,Te=!!(be&&(le||(function(ze,We=!1){return!!We||ah(ze)!==vd})(be,Q)));if(le&&($(L),sh=L,y9=oh()),be&&Te&&(P(be),be.anchor&&O(be.anchor),vd=ah(be)),L.stable){const ze=u6("settled",L);if(ze!==b9){b9=ze;const We=pd(L,{includeHeightCache:!0});We&&(P(We),vd=ah(We)),(function(lt){s("render-settled",lt)})(L)}}if(L.phase==="final"){const ze=u6("final",L);if(ze!==k9){k9=ze;const We=pd(L,{includeHeightCache:!0});We&&(P(We),vd=ah(We)),(function(lt){s("render-final",lt)})(L)}}}function C9(){ec!=null&&(fi?.(ec),ec=null),tc!=null&&j&&(window.clearTimeout(tc),tc=null)}function c6(){ec=null,tc=null,(function(L){if(Jl.size>0||pr!=null)return!0;switch(L){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(v9)&&(ea(),ih()),A9(Qu(v9))}function Ii(L){var Q,le;if(!Cn.value||(v9=L,ec!=null||tc!=null))return;const ae=Math.max(0,(le=(Q=i.virtualScroll)==null?void 0:Q.emitIntervalMs)!=null?le:32),be=Math.max(0,ae-(oh()-y9)),Te=()=>{tc=null,ec=di?di(c6):null,ec==null&&c6()};j&&be>0?tc=window.setTimeout(Te,be):Te()}function d6(){Ae.value+=1}function i0(L){if(fo.value&&L>=yi.value){const Q=Lt.value[L],le=Fe.value===!0&&Re.value!==!0&&L>=Lt.value.length-2,ae=Q?.type==="code_block"||Q?.type==="image"||Q?.type==="mermaid"||Q?.type==="infographic";if(!le||ae)return!1}return!Cl.value||L<Wi.value||qv.value.has(L)}function yd(L){const Q=Gp.get(L);Q&&(Q(),Gp.delete(L));const le=ud.get(L);le&&(le.destroy(),ud.delete(L)),Qp(L)}function s0(L,Q){let le=!1;if(Q){const Te=Me.get(L);Me.set(L,Q),Te!==Q&&(le=!0)}else Me.delete(L)&&(le=!0);if(le&&d6(),Q||Qp(L),!Tk.value||!Fi)return yd(L),void(Q&&Cl.value&&Da(L,!0));if(!$e.value&&Cl.value&&!H.value&&ud.size>=Ne.value&&(H.value||(H.value=!0,Uv()),!Tk.value||!Fi))return yd(L),void(Q&&Da(L,!0));if(L<Wi.value&&!$e.value||qv.value.has(L))return yd(L),void Da(L,!0);if(!Q)return void yd(L);yd(L);const ae=Fi(Q,{rootMargin:pe.value});if(!ae)return;ud.set(L,ae),Da(L,ae.isVisible.value),Cl.value&&(function(Te){if(!j||!Cl.value)return;Qp(Te);const ze=Te%17*23,We=window.setTimeout(()=>{if(Rk.delete(Te),!Cl.value||qv.value.has(Te))return;const lt=Me.get(Te);if(!lt)return;const qe=me(lt),Xe=lt.ownerDocument||document,rt=Xe.defaultView||window,Oe=!qe||qe===Xe.documentElement||qe===Xe.body,et=!Oe&&qe?Qt("nodeVisibilityFallback.root.getBoundingClientRect",()=>qe.getBoundingClientRect()):null,ut=Oe?0:et.top,at=Oe?Qt("nodeVisibilityFallback.clientHeight",()=>{var mt,zt;return(zt=(mt=rt.innerHeight)!=null?mt:qe?.clientHeight)!=null?zt:0}):et.bottom,Mt=Qt("nodeVisibilityFallback.node.getBoundingClientRect",()=>lt.getBoundingClientRect());Mt.bottom>=ut-500&&Mt.top<=at+500&&Da(Te,!0)},1800+ze);Rk.set(Te,We)})(L);let be=null;be=Qe(()=>ae.isVisible.value,Te=>{if(Te){Qp(L),Da(L,!0),be?.(),Gp.delete(L),ud.get(L)===ae&&ud.delete(L);try{ae.destroy()}catch{}}},{immediate:!0}),Gp.set(L,be),$e.value&&Zr()}function w9(){pr=null,fn(()=>{let L=!1;for(const[Q,le]of Jl)Jl.delete(Q),wl.get(Q)===le.el&&Zu.get(Q)===le.version&&(L=Vu(Q,le.height,{allowShrink:le.allowShrink})||L);return L})}function bd(){pr!=null&&(fi?.(pr),pr=null),Jl.clear()}function o0(L,Q){(function(le,ae,be){var Te;if(!Number.isFinite(be)||be<=0||wl.get(le)!==ae)return;const ze=Zu.get(le);if(ze==null)return;const We=Lt.value[le],lt=ht.value&&Re.value!==!0&&!((Te=i.nodes)!=null&&Te.length)&&le>=Lt.value.length-2,qe=!(We?.loading===!0||lt),Xe=Jl.get(le),rt=Xe?Xe.allowShrink&&qe:qe,Oe=Xe&&!rt?Math.max(Xe.height,be):be;Jl.set(le,{height:Oe,allowShrink:rt,version:ze,el:ae}),pr==null&&(pr=di?di(w9):null,pr==null&&w9())})(L,Q,Qf(L,Q))}function ea(){for(const[L,Q]of wl)Q&&o0(L,Q)}function f6(){Mi?.disconnect(),Mi=null,Ze.clear()}function x9(){for(;Up.length;)Zp(Up.pop())}Qe(Di,L=>{L&&Ii("content")},{flush:"post"}),t({getVirtualMetrics:Qu,captureVirtualState:function(L={}){var Q;return pd(Qu("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:L.allowFallbackAnchor===!0,requireViewport:L.requireViewport===!0,includeEmptyState:(Q=L.includeEmptyState)==null||Q})},restoreVirtualState:function(L,Q={}){const le=Q.restoreAnchor===!0,ae=Q.restoreToken==null?"imperative":String(Q.restoreToken);th=L,nh={restoreAnchor:le,restoreToken:ae,allowUncapturedAnchor:Q.allowUncapturedAnchor===!0},!h9(L,{restoreAnchor:le,restoreToken:ae,allowUncapturedAnchor:Q.allowUncapturedAnchor===!0})&&r6(L)||(th=null,nh=null)},forceMeasure:function(L="manual"){return Ti(this,null,function*(){yield kt(),yield l6(),ea(),ih(),yield kt();const Q=Qu(L);return A9(Q,!0),Q})},settle:m9,scrollToNode:function(L,Q="start"){gd(),dt();const le=Lt.value.length;if(le<=0)return;const ae=Js(L,0,le-1),be=()=>{var Te;const ze=ct({nodeIndex:ae,offsetWithinNodePx:0}),We=wn(ae),lt=Xf(),qe=(Te=lt?.clientHeight)!=null?Te:0,Xe=Wn();let rt=ze;if(Q==="center")rt=ze-qe/2+We/2;else if(Q==="end")rt=ze-qe+We;else if(Q==="nearest"&&Xe!=null){if(ze>=Xe&&ze+We<=Xe+qe)return;rt=ze<Xe?ze:ze-qe+We}Ee(Math.max(0,rt)),Zr({immediate:!0}),$e.value&&(Yl.value=ae,Yf())};if($e.value)return Yl.value=ae,Yf(),void kt(be);be()}}),Qe(()=>nt.value,L=>{if(!L){f6();for(const Q of Ba.values())for(const le of Q)Zp(le);Ba.clear(),Zu.clear(),x9(),bd()}},{immediate:!0}),Qe(Re,L=>{L&&(function(){if(j&&Re.value&&wl.size){x9();for(const Q of[80,240,640]){const le=$k(Q,()=>{for(const[ae,be]of wl)be&&o0(ae,be)},"final");le!=null&&Up.push(le)}}})(),Ii(L?"final":"content")});const vR=G_(()=>Ii("content"),16),yR=G_(()=>Ii("batch"),16);Qe([()=>Lt.value.length,()=>yi.value],()=>{Ye.value&&md(),vR()},{flush:"post",immediate:!0}),Qe([()=>Ys.start,()=>Ys.end],()=>{yR()},{flush:"post"});const{cleanupBatchScheduler:bR}=(function(L){const{props:Q,isClient:le,isTestEnv:ae,parsedNodesIdentity:be,parsedNodeCount:Te,desiredRenderedCount:ze,datasetKey:We,batchingEnabled:lt,incrementalRenderingActive:qe,resolvedBatchSize:Xe,resolvedInitialBatch:rt,renderedCount:Oe,adaptiveBatchSize:et,previousRenderContext:ut,previousBatchConfig:at,requestFrame:Mt,cancelFrame:mt,hasIdleCallback:zt,cleanupNodeVisibility:qt,onDatasetKeyChanged:en,onDatasetChanged:Yt}=L;let tn=null,kn="raf",In=null,hi=0,Xs=!1,Ds=!1;const Gr=new Set,_l=new Set;function vh(){if(le){tn!=null&&(kn==="raf"&&mt?mt(tn):kn==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(tn):kn==="timeout"&&window.clearTimeout(tn),tn=null),hi+=1;for(const go of Gr)mt&&mt(go);for(const go of _l)window.clearTimeout(go);Gr.clear(),_l.clear(),In=null,Xs=!1,Ds=!1}}function p0(){return typeof performance<"u"?performance.now():Date.now()}function T6(go){(function(ta){var za;if(!qe.value)return;const na=Math.max(2,(za=Q.renderBatchBudgetMs)!=null?za:6),ia=Math.max(1,Xe.value||1),Qr=Math.max(1,Math.floor(ia/4));ta>1.5*na?et.value=Math.max(Qr,Math.floor(.8*et.value)):ta<.6*na&&et.value<ia&&(et.value=Math.min(ia,Math.ceil(1.2*et.value)))})(go),Xs=!1;const Ko=Ds||Oe.value<ze.value;Ds=!1,Ko&&F6()}function L6(go,Ko={}){var ta,za;if(!qe.value)return;const na=ze.value;if(Oe.value>=na)return;const ia=Math.max(1,go),Qr=()=>{const Cd=p0();tn=null;const yh=In??ia;In=null;const wd=p0();Oe.value=Math.min(na,Oe.value+yh),qt(Oe.value),(function(L9,g0){if(!le)return void T6(g0);Xs=!0;const B6=++hi;kt().then(()=>{var $6;if(B6!==hi)return;const PR=p0(),jR=Math.max(g0,PR-L9),D6=()=>{B6===hi&&T6(jR)};if(Mt){let ic=null,xd=null,z6=!1;const O6=()=>{z6||(z6=!0,ic!==null&&(Gr.delete(ic),ic=null),xd!==null&&(_l.delete(xd),window.clearTimeout(xd),xd=null),D6())};return ic=Mt(()=>{O6()}),Gr.add(ic),xd=window.setTimeout(()=>{ic!==null&&mt&&mt(ic),O6()},Math.max(32,($6=Q.renderBatchIdleTimeoutMs)!=null?$6:120)),void _l.add(xd)}const R6=window.setTimeout(()=>{_l.delete(R6),D6()},0);_l.add(R6)})})(Cd,p0()-wd)};if(!le||Ko.immediate)return void Qr();const Oa=Math.max(0,(ta=Q.renderBatchDelay)!=null?ta:16);if(In=In!=null?Math.max(In,ia):ia,tn==null){if(!ae&&zt&&window.requestIdleCallback){const Cd=Math.max(0,(za=Q.renderBatchIdleTimeoutMs)!=null?za:120);return kn="idle",void(tn=window.requestIdleCallback(()=>Qr(),{timeout:Cd}))}if(Mt&&!ae)return kn="raf",void(tn=Mt(()=>{Oa===0?Qr():(kn="timeout",tn=window.setTimeout(()=>Qr(),Oa))}));kn="timeout",tn=window.setTimeout(()=>Qr(),Oa)}}function N6(go,Ko={}){Xs?Ds=!0:go==null?F6():L6(go,Ko)}function F6(){qe.value&&L6(lt.value?Math.max(1,Math.round(et.value)):Math.max(1,Xe.value))}return Qe([be,Te,We,qe,Xe,rt,()=>Q.renderBatchDelay],()=>{var go;const Ko=Te.value,ta=ut.value,za=We.value,na=!Object.is(za,ta.key),ia=Ko!==ta.total,Qr=na||ia;ut.value={key:za,total:Ko};const Oa=at.value,Cd=(go=Q.renderBatchDelay)!=null?go:16,yh=Oa.batchSize!==Xe.value||Oa.initial!==rt.value||Oa.delay!==Cd||Oa.enabled!==qe.value;at.value={batchSize:Xe.value,initial:rt.value,delay:Cd,enabled:qe.value},na&&en(Ko),(Qr||yh||!qe.value)&&vh(),(Qr||yh)&&(et.value=Math.max(1,Xe.value||1)),Qr&&Yt();const wd=ze.value;if(!Ko)return Oe.value=0,void qt(0);if(!qe.value)return Oe.value=wd,void qt(Oe.value);const L9=na||ta.total===0;Oe.value=L9||yh?Math.min(wd,rt.value):Math.min(Oe.value,wd);const g0=Math.max(1,rt.value||Xe.value||Ko);Oe.value<wd?N6(g0,{immediate:!le}):qt(Oe.value)},{immediate:!0}),Qe(ze,(go,Ko)=>{qe.value&&(typeof Ko=="number"&&go<=Ko||go>Oe.value&&N6())}),{cleanupBatchScheduler:vh}})({props:T,isClient:j,isTestEnv:Si,parsedNodesIdentity:Fs,parsedNodeCount:Ni,desiredRenderedCount:Kp,datasetKey:aR,batchingEnabled:xs,incrementalRenderingActive:fo,resolvedBatchSize:Zs,resolvedInitialBatch:Wi,renderedCount:yi,adaptiveBatchSize:ho,previousRenderContext:Mo,previousBatchConfig:Gs,requestFrame:di,cancelFrame:fi,hasIdleCallback:Ks,cleanupNodeVisibility:nR,onDatasetKeyChanged:L=>{bd(),Ai(),Ot(),lh(),L>0&&ad(L)},onDatasetChanged:()=>{$e.value&&Zr({immediate:!0})}});Qe([Lk,$e,()=>R.value,()=>te()],([L,Q])=>{if(!L)return zk(),void Wv();iR(),Q?Zr({immediate:!0}):Wv()},{flush:"post",immediate:!0}),Qe([()=>Lt.value.length,()=>$e.value],L=>Ti(null,[L],function*([Q,le]){le&&Q&&j&&(yield kt(),Zr({immediate:!0}))}),{flush:"post"}),Qe(ri,L=>{L&&(function(){var Q;if($i.value&&So.value&&_i.value&&((Q=Yi.value)!=null&&Q[1]))return;const le=wt({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ae=wt({type:"list_item",children:[le],raw:"- Probe paragraph text"}),be=wt({type:"list",ordered:!1,items:[ae],raw:"- Probe paragraph text"});$i.value=le,So.value=ae,_i.value=be;const Te={1:null,2:null,3:null,4:null,5:null,6:null};for(let ze=1;ze<=6;ze++)Te[ze]=wt({type:"heading",level:ze,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(ze)} Probe heading`});Yi.value=Te})()},{immediate:!0}),Qe([()=>R.value,ri],()=>{if(!ri.value)return Zv(),void(ee.value=0);Pk(),Zv(),ri.value&&R.value&&typeof ResizeObserver<"u"&&(Jf=new ResizeObserver(()=>{Pk(),Ht.value&&Wt(),Ye.value&&md(),Ii("resize")}),Jf.observe(R.value))},{immediate:!0}),Qe([ri,us,gr],()=>Ti(null,null,function*(){if(!ri.value)return ue.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Ot();yield kt(),(function(){if(!ri.value||typeof window>"u")return ue.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Ot();const L={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},Q=Ok(Vv(W.value),".paragraph-node");L.paragraph=s4(W.value,Q,"pre-wrap");const le=Vv(z.value),ae=le?.querySelector(".paragraph-node");L.listItem=s4(z.value,ae,"pre-wrap");const be=Qt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var ze,We;return(We=(ze=G.value)==null?void 0:ze.offsetHeight)!=null?We:0}),Te=Qt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var ze,We;return(We=(ze=z.value)==null?void 0:ze.offsetHeight)!=null?We:0});L.listWrapperOverhead=Math.max(0,be-Te);for(let ze=1;ze<=6;ze++){const We=Ok(Vv(K[ze]),`h${ze}`);L.headings[ze]=s4(K[ze],We,"pre-wrap")}ue.value=L,Ot()})()}),{flush:"post",immediate:!0}),Qe(()=>Lt.value.length,()=>{$e.value&&Zr({immediate:!0})}),Qe([ri,ee],()=>{Ot(),$e.value&&Zr({immediate:!0}),Ht.value&&Wt(),Ye.value&&md(),Ii("resize")},{immediate:!1}),Qe(()=>Cl.value,L=>{if(L)for(const[Q,le]of Me)s0(Q,le);else if(Uv(),$e.value)Zr({immediate:!0});else for(const[Q,le]of Me)le&&Da(Q,!0)},{immediate:!1}),Qe([pe,Ne,()=>te()],()=>{var L;(L=Fi.refresh)==null||L.call(Fi);for(const[Q,le]of Me)s0(Q,le)},{immediate:!1}),Qe([()=>T.viewportPriority,()=>Lt.value.length,Ne],([L,Q,le])=>{if(L!==!1){if(H.value&&(Q<=200||Q<=le)){H.value=!1;for(const[ae,be]of Me)s0(ae,be)}}else H.value=!1}),Qe(()=>yi.value,()=>{$e.value&&Zr({immediate:!0})}),Qe([Yl,Us,Ji,()=>Lt.value.length,$e],()=>{Yf()},{immediate:!0});let uh=null,ch=!1,kd=null;function dh(){uh=null,n9=null,t9=void 0,hd=null,lh()}function _9(){bd(),Ai(),Ot(),bi.clear();const L=Lt.value.length;L>0&&ad(L),p9()}function S9(){C9(),Dk(),sh=null,Ju=null,Xu=null,t0=null,th=null,nh=null,ch=!1,dh(),Gk("restore"),dt(),gd()}function fh(L){var Q;return[(Q=fs())!=null?Q:"",Ri(),Xl(),Jp.value,rh(L),Lt.value.length,Math.round(Qn(0,Lt.value.length)),Math.round(Gu()),os.count,Math.round(os.total)].join(":")}function h6(){return Ti(this,null,function*(){var L,Q,le,ae;const be=(L=i.virtualScroll)==null?void 0:L.settledToken,Te=rh(be),ze=Ri(),We=fs(),lt=gr.value;if(Cn.value&&((Q=i.virtualScroll)==null?void 0:Q.settleMode)==="manual"&&Xp(be))if(i9()){if(fh(be)!==hd&&!ch){ch=!0;try{const qe=yield m9({reason:"manual",expectedSettledTokenKey:Te}),Xe=rh()===Te;g9(ze,We,lt)&&qe.sessionKey===ze&&qe.threadKey===We&&Xe&&qe.stable&&qe.phase==="final"&&(hd=fh((le=i.virtualScroll)==null?void 0:le.settledToken))}finally{ch=!1,yield kt();const qe=(ae=i.virtualScroll)==null?void 0:ae.settledToken,Xe=Xp(qe)?fh(qe):"";g9(ze,We,lt)&&Xe&&hd!==Xe&&h6()}}}else Ii("manual")})}Qe(Cn,(L,Q)=>{if(L!==Q){if(!L)return S9(),void C9();S9(),_9(),kd=gr.value,Ii("content")}},{flush:"post"}),Qe([Cn,gr],([L,Q])=>{L?kd!=null?kd!==Q&&(kd=Q,(function(le="resize"){bd(),Ai(),Ot(),bi.clear();const ae=Lt.value.length;ae>0&&ad(ae),p9(),Ju=null,Xu=null,t0=null,sh=null,ch=!1,dh(),o6(),kt(()=>{ea(),Ht.value&&Wt(),Ye.value&&md(),Ii(le)})})("resize")):kd=Q:kd=null},{flush:"post",immediate:!0}),Qe([Cn,()=>Ri(),()=>fs()],([L])=>{L&&(S9(),_9(),Gk("content"),Ii("content"))}),Qe([Cn,()=>Ri(),()=>fs(),gr,()=>Lt.value.length],([L])=>{L&&(function(Q="async-node"){let le=!1;for(const[ae,be]of Array.from(xl.entries()))Xv(be)||(xl.delete(ae),hr.delete(ae),le=!0);le&&(dd(),Ii(Q))})("async-node")},{flush:"post"}),Qe([Cn,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.sessionKey},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey},()=>i.indexKey,()=>X.value],([L])=>{L&&(lh(),(function(Q="content"){if(!Cn.value)return;const le=[],ae=Lt.value.length,be=Kv(ae);for(const Te of Array.from(bi.keys())){if(Te>=ae){le.push(Te);continue}if(Te<be)continue;const ze=eh(Te),We=bi.get(Te);We!=null&&We!==ze&&le.push(Te),bi.set(Te,ze)}for(const Te of Array.from(bi.keys()))Te>=ae&&bi.delete(Te);le.length&&((function(Te,ze={}){const We=Array.from(Te,Number);sn(We);let lt=0;if(fn(()=>(lt=Pv(We,ze),lt>0)),lt>0)(function(qe){for(const Xe of qe)bi.delete(Xe)})(We);else for(const qe of We)po.delete(qe)})(le,{notify:!1}),Ot(),dh(),Ht.value&&Wt(),Ye.value&&md(),Ii(Q))})("content"))},{flush:"post",immediate:!0}),Qe([Cn,()=>Lt.value.length,()=>Ri(),()=>fs()],([L,Q,le,ae],[be,Te,ze,We])=>{L&&be&&le===ze&&ae===We&&Q!==Te&&dh()},{flush:"post"}),Qe([Cn,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.heightCache},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.heightCacheWidth},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey},()=>Lt.value.length,()=>Ri(),ee],()=>{o6()},{flush:"post",immediate:!0}),Qe([Cn,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreAnchor},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey},()=>Lt.value.length,()=>Ri(),ee],L=>Ti(null,[L],function*([Q,le]){if(!Q||!le)return;yield kt();const ae=(function(){var be;const Te=(be=i.virtualScroll)==null?void 0:be.restoreAnchor;return Te==null||Te===!1?null:Te===!0?"true":String(Te)})();h9(le,{restoreAnchor:ae!=null,restoreToken:ae??void 0})}),{flush:"post",immediate:!0}),Qe([Cn,ee,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey}],([L])=>{var Q;if(!L)return;const le=(Q=i.virtualScroll)==null?void 0:Q.restoreState;le&&Ju&&Xu==="restore"&&(i6(le)||(_9(),Ju=null,Xu=null,Ii("resize")))},{flush:"post"}),Qe([Cn,()=>Lt.value.length,()=>Ri(),ee],L=>Ti(null,[L],function*([Q]){var le;const ae=th,be=nh;Q&&ae&&(yield kt(),!h9(ae,{restoreAnchor:be?.restoreAnchor===!0,restoreToken:(le=be?.restoreToken)!=null?le:"imperative",allowUncapturedAnchor:be?.allowUncapturedAnchor===!0})&&r6(ae)||(th=null,nh=null))}),{flush:"post",immediate:!0}),Qe([Cn,Re,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.settleMode},()=>Ri(),()=>fs(),gr,Hv,Fk,()=>yi.value,Kp,()=>os.count,()=>os.total],([L,Q,le])=>{if(!L||Q!==!0||le==="manual"||!s9())return;const ae=(function(){var be;const Te=Lt.value.length;return[(be=fs())!=null?be:"",Ri(),Xl(),Jp.value,Te,Math.round(Qn(0,Te)),Math.round(Gu()),os.count,Math.round(os.total)].join(":")})();uh!==ae&&(uh=ae,m9({reason:"final"}).then(be=>{be.stable||uh!==ae||(uh=null)}))},{flush:"post",immediate:!0}),Qe([Cn,Re,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.settleMode},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.settledToken},()=>Ri(),()=>fs(),gr,Hv,Fk,()=>yi.value,Kp,()=>Lt.value.length,()=>os.count,()=>os.total],()=>{h6()},{flush:"post",immediate:!0}),Qe([()=>Lt.value.length,$e,Us,Ji,()=>Ys.start,()=>Ys.end],([L,Q,le,ae,be,Te])=>{ve.value&&_n("virtualization",{nodes:L,virtualization:Q,maxLiveNodes:le,buffer:ae,focusIndex:Yl.value,scroll:Q?(()=>{const ze=Pe.value||me();return ze?{reverse:Ie(ze),scrollTop:Math.round(ze.scrollTop),scrollTopAbs:Math.round(Math.abs(ze.scrollTop)),scrollHeight:Math.round(ze.scrollHeight),clientHeight:Math.round(ze.clientHeight)}:null})():null,liveRange:{start:be,end:Te},rendered:yi.value})}),Qe([()=>T.customId],([L],Q,le)=>{if(!L||co)return;const ae=(function(be,Te){return be?(_s.controllers[be]=Te,()=>{_s.controllers[be]===Te&&delete _s.controllers[be]}):()=>{}})(L,{captureRestoreAnchor:ki,restoreAnchor:$s,getAnchorDrift:Ql,getReport:rR});le(()=>{ae()})},{immediate:!0}),Gn(()=>{(function(){if(Cn.value)try{ea(),ih();const L=Qu("manual");a6(L)&&($(L),sh=L,y9=oh());const Q=pd(L,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});Q&&(P(Q),Q.anchor&&O(Q.anchor),vd=ah(Q))}catch{}})(),bR(),Uv(),Kt(),f6();for(const L of Ba.values())for(const Q of L)Zp(Q);Ba.clear(),Zu.clear(),bi.clear(),x9(),bd(),Zv(),dt(),gd(),C9(),zk(),Wv()});const kR=Xh("ViewportDeferredMermaidBlockNode",rl({loader:()=>Ti(null,null,function*(){try{return(yield ns(()=>import("./index11-Cx5Yh-Ch.js"),__vite__mapDeps([7,5]))).default}catch(L){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".',L),Jo}}),loadingComponent:uS,delay:0}),uS),AR=Xh("ViewportDeferredInfographicBlockNode",rl({loader:()=>Ti(null,null,function*(){try{return(yield ns(()=>import("./index10-C561zpWg.js"),[])).default}catch(L){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.',L),Jo}}),loadingComponent:aS,delay:0}),aS),CR=Xh("ViewportDeferredD2BlockNode",rl(()=>Ti(null,null,function*(){try{return(yield ns(()=>import("./index8-B1ktcQVe.js"),[])).default}catch(L){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".',L),Jo}})),Jo),p6={text:ss,paragraph:Pc,heading:Mv,code_block:Zy,list:yf,list_item:vf,blockquote:zg,table:I1,definition_list:Og,footnote:Pg,footnote_reference:Ar,footnote_anchor:S1,admonition:qg,vmr_container:Hg,hardbreak:vu,link:Oo,image:mu,thematic_break:jg,math_inline:yl,math_block:TB,strong:Ro,emphasis:Po,strikethrough:zo,highlight:wr,insert:or,subscript:sr,superscript:ir,emoji:nr,checkbox:kr,checkbox_input:kr,inline_code:xo,html_inline:Cr,reference:Do,html_block:M1},wR=F(()=>Yv()),g6=F(()=>V_(T.codeBlockProps)),xR=F(()=>V_(T.codeBlockProps,{omit:["langs"]})),m6=F(()=>At(At({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 re.value=="boolean"?{showTooltips:re.value}:{}),xR.value)),v6=F(()=>At(dn(At({},m6.value),{langs:T.langs}),g6.value));function y6(L){return typeof L=="boolean"?L:void 0}const _R=F(()=>{const L=T.codeBlockProps||{},Q={},le=y6(L.showLineNumbers);le!==void 0&&(Q.showLineNumbers=le);const ae=y6(L.diffInline);ae!==void 0&&(Q.diffInline=ae);const be=(function(Te){const ze=Number(Te);return Number.isFinite(ze)&&ze>0?ze:void 0})(L.reservedHeightPx);return be!==void 0&&(Q.reservedHeightPx=be),Q}),SR=F(()=>At(At({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,themes:T.themes,langs:T.langs,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof re.value=="boolean"?{showTooltips:re.value}:{}),g6.value)),MR=F(()=>At({},T.mermaidProps||{})),b6=F(()=>At({},T.d2Props||{})),IR=F(()=>At({},T.infographicProps||{})),hh=F(()=>({typewriter:f.value,fade:T.fade,customHtmlTags:Li.value.customHtmlTags})),ER=F(()=>At(At({},hh.value),typeof re.value=="boolean"?{showTooltip:re.value}:{})),TR=F(()=>At(At({},hh.value),typeof re.value=="boolean"?{showTooltips:re.value}:{})),LR=F(()=>At(At({},hh.value),typeof re.value=="boolean"?{showTooltips:re.value}:{})),NR=F(()=>At(At({},hh.value),typeof re.value=="boolean"?{showTooltips:re.value}:{}));function FR(L){return Array.isArray(L.children)&&L.children.length>0}const r0=F(()=>oR.value.map(L=>{var Q,le,ae,be,Te,ze,We,lt;let qe=(function(mt){var zt,qt,en,Yt,tn,kn,In;if(mt.type!=="code_block")return mt;const hi=mt,Xs=[String((zt=hi.language)!=null?zt:""),String((qt=hi.loading)!=null?qt:""),String((en=hi.diff)!=null?en:""),String((Yt=hi.code)!=null?Yt:""),String((tn=hi.originalCode)!=null?tn:""),String((kn=hi.updatedCode)!=null?kn:""),String((In=hi.raw)!=null?In:"")].join("\0"),Ds=Wo.get(hi);if(Ds&&Ds.signature===Xs)return Ds.node;const Gr=At({},hi);return Wo.set(hi,{signature:Xs,node:Gr}),Gr})(L.node);const Xe=l0(qe);let rt=w6(qe,Xe);if((qe.type==="html_block"||qe.type==="html_inline")&&rt===p6[qe.type]){const mt=qe,zt=String((Q=mt.tag)!=null?Q:"").trim().toLowerCase()||eF(mt.content);if(zt){const qt=mi.value[zt];if(Ws.value.has(zt)&&qt)rt=qt,qe=dn(At({},mt),{type:zt,tag:zt,content:Hue(mt.content,zt)});else if(tF((le=mt.content)!=null?le:mt.raw,zt)){const en=String((be=(ae=mt.content)!=null?ae:mt.raw)!=null?be:"");qe.type==="html_inline"?(rt=ss,qe={type:"text",content:en,raw:en}):(rt=Pc,qe={type:"paragraph",children:[{type:"text",content:en,raw:en}],raw:en})}}}const Oe=qe.type==="code_block"&&g.value==="pre"&&rt===Jo&&!M9(mi.value,Xe);let et=At({},(function(mt,zt,qt){const en=zt??l0(mt);if(mt.type==="code_block"){const Yt=en?M9(mi.value,en):void 0;if(qt&&g.value==="pre"&&!Yt&&qt===Jo)return _R.value;if(qt&&en&&qt===Yt)return en==="mermaid"?A6(mt):en==="infographic"?C6(mt):en==="d2"||en==="d2lang"?b6.value:v6.value;if(qt&&qt===mi.value.code_block)return v6.value;if(Hk(qt))return SR.value}return en==="mermaid"?A6(mt):en==="infographic"?C6(mt):en==="d2"||en==="d2lang"?b6.value:mt.type==="link"?ER.value:mt.type==="list"?TR.value:mt.type==="blockquote"?LR.value:mt.type==="table"?NR.value:mt.type==="code_block"?m6.value:hh.value})(qe,Xe,rt));const ut=ri.value?cd.value[L.index]:null;qe.type==="code_block"&&ut?.kind==="code-block"&&(et=dn(At({},et),Oe?{reservedHeightPx:(Te=ut.height)!=null?Te:ut.contentHeight}:{estimatedHeightPx:ut.height,estimatedContentHeightPx:ut.contentHeight,estimatedDiffInline:ut.diffInline})),Oe||qe.type!=="code_block"||Xe!=="mermaid"||Jd(et.estimatedPreviewHeightPx)!=null||(et=dn(At({},et),{estimatedPreviewHeightPx:Gm(Vm(String((ze=qe.code)!=null?ze:"")))})),Oe||qe.type!=="code_block"||Xe!=="infographic"||Jd(et.estimatedPreviewHeightPx)!=null||(et=dn(At({},et),{estimatedPreviewHeightPx:Qm(Zm(String((We=qe.code)!=null?We:"")))})),qe.type==="math_block"&&(et=dn(At({},et),{cacheScope:Sn}));const at=(function(mt,zt){const qt=String(mt.type);return!Lp(qt)&&mi.value[qt]===zt})(qe,rt),Mt=at?Nb(qe,se.value):void 0;return dn(At({},L),{node:qe,component:rt,bindings:et,customBindings:At(At({},Mt??{}),et),rendersCustomNode:at,hasSlotChildren:FR(qe),slotContent:String((lt=qe.content)!=null?lt:""),isCodeBlock:qe.type==="code_block",indexKey:`${wR.value}-${L.index}`,vnodeKey:`${lR.value}\0${L.index}\0${qe.type}`})}));function l0(L){var Q;return L?.type==="code_block"?String((Q=L.language)!=null?Q:"").trim().toLowerCase():""}function M9(L,Q){const le=Q.trim().toLowerCase();if(le)for(const ae of[le,xv(le),dB(le)]){const be=ae&&L[ae];if(be)return be}}function k6(L,Q,le,ae){var be,Te;const ze=At({},L.value);return Jd(ze.estimatedPreviewHeightPx)==null&&(ze.estimatedPreviewHeightPx=ae(le(String((be=Q?.code)!=null?be:"")),void 0,ze.maxHeight==="none"?null:(Te=Jd(ze.maxHeight))!=null?Te:void 0)),ze}function A6(L){return k6(MR,L,Vm,Gm)}function C6(L){return k6(IR,L,Zm,Qm)}function w6(L,Q){if(!L)return v8;const le=mi.value,ae=le[String(L.type)];if(L.type==="code_block"){const be=Q??l0(L),Te=be?M9(le,be):void 0;return Te||(g.value==="pre"?le.code_block||Jo:be==="mermaid"?le.mermaid||kR:be==="infographic"?le.infographic||AR:be==="d2"||be==="d2lang"?le.d2||CR:ae||le.code_block||Wk.value)}return ae||p6[String(L.type)]||v8}function I9(L){s("click",L)}function BR(L){var Q;(Q=L.target)!=null&&Q.closest("[data-node-index]")&&s("mouseover",L)}function $R(L){var Q;(Q=L.target)!=null&&Q.closest("[data-node-index]")&&s("mouseout",L)}function x6(L){s("mouseover",L)}function _6(L){s("mouseout",L)}const nc=Z(null),Uo=Z(!1),ph=Z(null),DR=F(()=>!(T.domMode!=="minimal"||Y.value||T.fade!==!1||f.value||Uo.value||ds.value||$e.value||Ln.value||vi.value||cs.value||Object.keys(mi.value).length!==0));let gh,Ad=null,E9=0,a0=0,u0=0;const S6=["code_block","admonition","table","math_block","html_block","image","thematic_break"],RR=new Set(S6),M6=[".typewriter-cursor",".height-estimation-probes",...S6.map(L=>`[data-node-type="${L}"]`),"script","style"].join(",");function I6(L){if(!L||typeof L!="object")return!1;const Q=L.type;return typeof Q=="string"&&RR.has(Q)}function c0(L){var Q,le;if(!L||typeof L!="object")return 0;const ae=L,be=(le=(Q=ae.raw)!=null?Q:ae.content)!=null?le:ae.code;if(typeof be=="string")return be.length;const Te=ae.children;if(Array.isArray(Te))return Te.reduce((We,lt)=>We+c0(lt),0);const ze=ae.items;return Array.isArray(ze)?ze.reduce((We,lt)=>We+c0(lt),0):0}function d0(){gh&&(clearTimeout(gh),gh=void 0)}function T9(){E9+=1,Ad!=null&&(fi?.(Ad),Ad=null)}function mh(){T9(),Ra(),nc.value&&(nc.value.style.visibility="hidden")}function zR(L){var Q;if(L.nodeType!==Node.TEXT_NODE||!((Q=L.textContent)!=null?Q:"").trim())return!1;const le=L.parentElement;return!!le&&!le.closest(M6)}function OR(L){let Q=L.lastChild;for(;Q;){if(zR(Q))return Q;if(Q.nodeType===Node.ELEMENT_NODE){const le=Q;if(!le.matches(M6)&&le.lastChild){Q=le.lastChild;continue}}for(;Q&&Q!==L&&!Q.previousSibling;)Q=Q.parentNode;if(!Q||Q===L)break;Q=Q.previousSibling}return null}function E6(){const L=r0.value;for(let Q=L.length-1;Q>=0;Q--){const le=L[Q];if(!le||I6(le.node)||!i0(le.index))continue;const ae=Me.get(le.index);if(!ae)continue;const be=OR(ae);if(be)return be}return null}function Ra(){ph.value&&(ph.value.classList.remove(cS),ph.value=null)}function f0(){if(d.value!=="simple"||!j||!Uo.value||!R.value)return void Ra();const L=E6(),Q=L?(function(le){var ae;const be=(ae=le.parentElement)==null?void 0:ae.closest(".text-node");return be instanceof HTMLElement?be:le.parentElement})(L):null;Q!==ph.value&&(Ra(),Q&&(Q.classList.add(cS),ph.value=Q))}function h0(){if(d.value!=="precise"||!j||!Uo.value||Ad!=null)return;const L=E9,Q=()=>{Ad=null,L===E9&&(function(){var le,ae;if(d.value!=="precise"||!(j&&Uo.value&&R.value&&nc.value))return;const be=R.value,Te=nc.value;Te.style.visibility="hidden";const ze=E6();if(!ze)return;let We=0,lt=0,qe=20,Xe=!1;if(ze?.textContent){const rt=ze.textContent.length,Oe=document.createRange();Oe.setStart(ze,Math.max(0,rt-1)),Oe.setEnd(ze,rt);const et=typeof Oe.getClientRects=="function"?Oe.getClientRects():void 0,ut=(ae=et?.[et.length-1])!=null?ae:(le=ze.parentElement)==null?void 0:le.getBoundingClientRect();if(ut){const at=Qt("typewriterCursor.root.getBoundingClientRect",()=>be.getBoundingClientRect());We=ut.right-at.left+be.scrollLeft,lt=ut.top-at.top+be.scrollTop,qe=ut.height||qe,Xe=!0}Oe.detach()}Xe&&(Te.style.transform=`translate(${Math.max(0,We)}px, ${Math.max(0,lt)}px)`,Te.style.height=`${qe}px`,Te.style.visibility="visible")})()};di?Ad=di(Q):Q()}return Qe([it,()=>i.content,()=>i.nodes,()=>T.typewriter,Re],()=>Ti(null,null,function*(){var L,Q;if(!j||Y.value||!J.value)return;if(Re.value)return Uo.value=!1,d0(),void mh();if((L=i.nodes)!=null&&L.length)return Uo.value=!1,d0(),mh(),a0=((Q=i.content)!=null?Q:"").length,void(u0=it.value.length);const le=(function(){var We,lt;return(We=i.nodes)!=null&&We.length?i.nodes.reduce((qe,Xe)=>qe+c0(Xe),0):((lt=i.content)!=null?lt:"").length})(),ae=(function(){var We;return(We=i.nodes)!=null&&We.length?i.nodes.reduce((lt,qe)=>lt+c0(qe),0):it.value.length})(),be=!I6(Lt.value[Lt.value.length-1]),Te=le>a0,ze=ae>u0;if(!f.value||!be||!Te&&!ze)return f.value&&be||(Uo.value=!1,mh()),a0=le,void(u0=ae);a0=le,u0=ae,Uo.value=!0,d.value==="precise"&&nc.value&&(nc.value.style.visibility="hidden"),d0(),yield kt(),d.value==="simple"?f0():(Ra(),h0()),gh=setTimeout(()=>{gh=void 0,Uo.value=!1},3e3)}),{flush:"post",immediate:!0}),Qe(Uo,L=>Ti(null,null,function*(){L?(yield kt(),d.value!=="simple"?(Ra(),d.value==="precise"&&h0()):f0()):mh()}),{flush:"post"}),Qe(d,()=>Ti(null,null,function*(){if(j&&!Y.value&&J.value&&Uo.value){if(yield kt(),d.value==="simple")return T9(),void f0();Ra(),d.value!=="precise"?mh():h0()}}),{flush:"post"}),Qe([()=>yi.value,()=>Ys.start,()=>Ys.end],()=>Ti(null,null,function*(){j&&!Y.value&&J.value&&Uo.value&&(yield kt(),d.value!=="simple"?(Ra(),d.value==="precise"&&h0()):f0())}),{flush:"post"}),Gn(()=>{d0(),T9(),Ra(),zn.clear()}),(L,Q)=>{const le=mO("NodeRenderer",!0);return h(Y)?(b(!0),I(Be,{key:0},yt(r0.value,ae=>(b(),I(Be,{key:ae.vnodeKey},[ae.rendersCustomNode?(b(),fe(Ms(ae.component),Yn({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:I9,onMouseover:x6,onMouseout:_6,onCopy:Q[0]||(Q[0]=be=>o(be)),onHandleArtifactClick:Q[1]||(Q[1]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ae.hasSlotChildren?(b(),fe(le,Yn({key:0,ref_for:!0},ci.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(),fe(le,Yn({key:1,ref_for:!0},ci.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"])):ne("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),fe(Ms(ae.component),Yn({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:I9,onMouseover:x6,onMouseout:_6,onCopy:Q[2]||(Q[2]=be=>o(be)),onHandleArtifactClick:Q[3]||(Q[3]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(b(),I("div",{key:1,ref_key:"containerRef",ref:R,class:De(["markstream-vue markdown-renderer",[{dark:T.isDark},{virtualized:$e.value},{"virtual-scroll-coordinated":Di.value},{"stable-layout":JD.value},{"typewriter-simple-cursor":Uo.value&&d.value==="simple"}]]),"data-custom-id":T.customId,onClick:I9,onMouseover:BR,onMouseout:$R},[ur.value||$e.value?(b(),I(Be,{key:0},[ur.value?(b(),fe(Zme,{key:0,width:us.value,"flow-root":$e.value||Di.value,"paragraph-node":$i.value,"list-item-node":So.value,"list-node":_i.value,"heading-nodes":Yi.value,"set-paragraph-wrapper":XD,"set-list-item-wrapper":eR,"set-list-wrapper":tR,"set-heading-wrapper":sR},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):ne("",!0),$e.value?(b(),I("div",{key:1,class:"node-spacer",style:Vt({height:`${Gv.value}px`}),"aria-hidden":"true"},null,4)):ne("",!0)],64)):ne("",!0),DR.value?(b(!0),I(Be,{key:1},yt(r0.value,ae=>(b(),I(Be,{key:ae.vnodeKey},[i0(ae.index)?(b(),fe(Ms(ae.component),Yn({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:Q[4]||(Q[4]=be=>s("mouseover",be)),onMouseout:Q[5]||(Q[5]=be=>s("mouseout",be)),onCopy:Q[6]||(Q[6]=be=>o(be)),onHandleArtifactClick:Q[7]||(Q[7]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):ne("",!0)],64))),128)):(b(!0),I(Be,{key:2},yt(r0.value,ae=>(b(),I("div",{key:ae.vnodeKey,ref_for:!0,ref:be=>s0(ae.index,be),class:"node-slot","data-node-index":ae.index,"data-node-type":ae.node.type},[i0(ae.index)?(b(),I("div",{key:0,ref_for:!0,ref:be=>(function(Te,ze){var We;ze||(function(rt){const Oe=`${Yv()}-${rt}`;let et=!1;for(const ut of Array.from(hr.keys())){const at=xl.get(ut);(at?.index===rt||ut===Oe||ut.startsWith(`${Oe}-`))&&(hr.delete(ut),xl.delete(ut),et=!0)}et&&(dd(),Ii("async-node"))})(Te),Jl.delete(Te),(function(rt){var Oe;const et=((Oe=Zu.get(rt))!=null?Oe:0)+1;Zu.set(rt,et)})(Te);const lt=Ba.get(Te);if(lt){for(const rt of lt)Zp(rt);Ba.delete(Te)}if((function(rt){const Oe=Ze.get(rt);Oe&&(Mi?.unobserve(Oe),on.delete(Oe),Ze.delete(rt))})(Te),!ze||!nt.value)return wl.delete(Te),void Zu.delete(Te);wl.set(Te,ze);const qe=()=>{o0(Te,ze)};queueMicrotask(qe);const Xe=(Mi||typeof ResizeObserver>"u"||(Mi=new ResizeObserver(rt=>{if(rt.length)for(const Oe of rt){const et=on.get(Oe.target),ut=Ze.get(et??-1);et!=null&&ut&&o0(et,ut)}else ea()})),Mi);if(Xe&&(Ze.set(Te,ze),on.set(ze,Te),Xe.observe(ze)),typeof window<"u"){const rt=((We=Lt.value[Te])==null?void 0:We.type)==="code_block"?[16,80,240,800]:Re.value?[80]:[];if(rt.length){const Oe=rt.map(et=>$k(et,qe,"node-resize")).filter(et=>et!=null);Oe.length&&Ba.set(Te,Oe)}}})(ae.index,be),class:"node-content"},[ae.isCodeBlock?ae.rendersCustomNode?(b(),fe(Ms(ae.component),Yn({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:Q[12]||(Q[12]=be=>o(be)),onHandleArtifactClick:Q[13]||(Q[13]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ae.hasSlotChildren?(b(),fe(le,Yn({key:0,ref_for:!0},ci.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(),fe(le,Yn({key:1,ref_for:!0},ci.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"])):ne("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),fe(Ms(ae.component),Yn({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:Q[14]||(Q[14]=be=>o(be)),onHandleArtifactClick:Q[15]||(Q[15]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(b(),fe(ys,{key:0,name:"fade",css:T.fade!==!1,appear:T.fade!==!1},{default:he(()=>[ae.rendersCustomNode?(b(),fe(Ms(ae.component),Yn({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:Q[8]||(Q[8]=be=>o(be)),onHandleArtifactClick:Q[9]||(Q[9]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ae.hasSlotChildren?(b(),fe(le,Yn({key:0,ref_for:!0},ci.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(),fe(le,Yn({key:1,ref_for:!0},ci.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"])):ne("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),fe(Ms(ae.component),Yn({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:Q[10]||(Q[10]=be=>o(be)),onHandleArtifactClick:Q[11]||(Q[11]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(b(),I("div",{key:1,class:"node-placeholder",style:Vt({height:`${wn(ae.index)}px`})},null,4))],8,Yme))),128)),Uo.value&&d.value==="precise"?(b(),I("span",{key:3,ref_key:"typewriterCursorRef",ref:nc,class:"typewriter-cursor","aria-hidden":"true"},null,512)):ne("",!0),$e.value?(b(),I("div",{key:4,class:"node-spacer",style:Vt({height:`${Qv.value}px`}),"aria-hidden":"true"},null,4)):ne("",!0)],42,Qme))}}})),[["__scopeId","data-v-a9489508"]]),rr=qB;rr.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",rr.__name,rr.name].filter(n=>!!n));for(const n of t)e.component(n,qB)};const Kb=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"})),Jme={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"},Xme={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"},e2e={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"},t2e={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"},n2e={class:"admonition-title"},i2e=["aria-expanded","aria-controls"],s2e=["id"],qg=oi(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 i=e,s=t,o=F(()=>{if(i.node.title&&i.node.title.trim().length)return i.node.title;const u=i.node.kind||"note";return u.charAt(0).toUpperCase()+u.slice(1)}),r=Z(!!i.node.collapsible&&!((n=i.node.open)==null||n));function l(){i.node.collapsible&&(r.value=!r.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(u,c)=>(b(),I("div",{class:De(["admonition",[`admonition-${i.node.kind}`]])},[C("div",{id:a,class:"admonition-legend"},[i.node.kind==="note"||i.node.kind==="info"?(b(),I("svg",Jme,[...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)])])):i.node.kind==="tip"?(b(),I("svg",Xme,[...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)])])):i.node.kind==="warning"||i.node.kind==="caution"?(b(),I("svg",e2e,[...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)])])):i.node.kind==="danger"||i.node.kind==="error"?(b(),I("svg",t2e,[...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)])])):ne("",!0),C("span",n2e,B(o.value),1),i.node.collapsible?(b(),I("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(b(),I("svg",{style:Vt({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,i2e)):ne("",!0)]),Bn(C("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[V(h(rr),{"index-key":`admonition-${e.indexKey}`,nodes:i.node.children,"custom-id":i.customId,typewriter:i.typewriter,fade:i.fade,onCopy:c[0]||(c[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,s2e),[[rs,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);qg.install=e=>{e.component(qg.__name,qg)};const C8=()=>ns(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let ig=null,sg=C8,og=null,dS=!1,fS=!1;function NYe(){return Ti(this,null,function*(){if(ig)return ig;const e=sg;return e?e===C8&&dS?null:og||(og=Ti(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===C8)return e===sg&&(dS=!0,(function(i){fS||(fS=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',i))})(n)),null;throw n}finally{e===sg&&(og=null)}return e!==sg?null:t?(ig=(function(n){var i;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=(i=n.default)!=null?i:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),ig):null}),og):null})}let rg=null,UB=null,lg=null;function FYe(){return typeof UB=="function"}function BYe(){return Ti(this,null,function*(){if(rg)return rg;const e=UB;return e?lg||(lg=Ti(null,null,function*(){const t=yield e(),n=(function(i){var s,o,r;if(!i)return null;const l=(s=i.default)!=null?s:i,a=typeof l=="function"&&typeof((o=l.prototype)==null?void 0:o.render)=="function"?l:(r=i.Infographic)!=null?r:l?.Infographic;return typeof a=="function"?a:null})(t);return n?(rg=n,rg):null}).finally(()=>{lg=null}),lg):null})}const $Ye=Symbol("markstreamLanguageIconResolver"),KB=["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"],o2e=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),w8=[...KB].sort((e,t)=>t.length-e.length).join("|"),o4=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${w8}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${w8})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?,。;!?)])`].join(""),"gi"),VB=/[),.;!?,。;!?)]+$/;function r2e(e){const t=e.toLowerCase();return KB.some(n=>t.endsWith(`.${n}`))}function l2e(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${w8}))["']`,"gi");let i;for(;(i=n.exec(e))!==null;){const s=i[1];if(!s)continue;const o=s.split("/").pop();o&&t.set(o,s)}return t}function a2e(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const i=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!i)return null;let s=(i[1]??"").replace(VB,"");if(!s)return null;const o=s.split("/").pop()??s,r=s.includes("/"),l=o2e.has(o),a=r2e(o);if(r&&!l&&!a)return null;if(!r&&!l){const d=t.aliases?.get(o);if(!d)return null;s=d}const u=i[2]??i[3],c=u?Number(u):void 0;return{path:s,line:c!==void 0&&Number.isFinite(c)&&c>0?c:void 0}}function u2e(e,t={}){const n=[];o4.lastIndex=0;let i;for(;(i=o4.exec(e))!==null;){const s=i[0]??"",o=i[1]??"",r=s.indexOf(o);if(r<0)continue;const l=i[2]??i[3];let a=o+(l?s.slice(r+o.length):"");const u=a.replace(VB,""),c=a.length-u.length;a=u;const d=a2e(a,t);if(!d)continue;const f=i.index+r,p=f+a.length;n.push({...d,start:f,end:p,text:a}),c>0&&(o4.lastIndex-=c)}return n}const c2e=/^---[ \t]*$/,d2e=/^---[ \t]*(?:\r\n|\n)/;function f2e(e){const t=d2e.exec(e);if(t===null)return{frontmatter:null,body:e};let n=t[0].length;const i=n;for(;n<=e.length;){let s=e.indexOf(` +`,n);s===-1&&(s=e.length);let o=e.slice(n,s);if(o.endsWith("\r")&&(o=o.slice(0,-1)),c2e.test(o)){const r=e.slice(i,n);if(r==="")return{frontmatter:null,body:e};const l=s<e.length?e.slice(s+1):"";return{frontmatter:r,body:l}}if(s===e.length)break;n=s+1}return{frontmatter:null,body:e}}function ag(e,t){let n=0,i=t-1;for(;i>=0&&e[i]==="\\";)n++,i--;return n%2===1}const h2e=/\s/,p2e=/\p{Nd}/u;function Yc(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function g2e(e,t){if(t<=0)return;const n=e.charCodeAt(t-1),i=n>=56320&&n<=57343&&t>1?t-2:t-1,s=e.codePointAt(i);return s===void 0?void 0:String.fromCodePoint(s)}function hS(e){return e!==void 0&&h2e.test(e)}function Bf(e){return e!==void 0&&p2e.test(e)}function m2e(e,t){const n=e[t+1];return Bf(Yc(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−"||n==="+"||n==="-")&&Bf(Yc(e,t+2))}function o2(e){return e!==void 0&&e>="A"&&e<="Z"}const ZB=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 v2e(e,t){if(!o2(e[t-1]))return!1;let n=t-1;for(;n>0&&o2(e[n-1]);)n--;return ZB.test(e.slice(n,t))||Bf(Yc(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(Yc(e,t+1)??"")}function y2e(e,t){if(!o2(e[t-1]))return!1;let n=t-1;for(;n>0&&o2(e[n-1]);)n--;return ZB.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}const b2e=/^[-–—,,、;;::~~(([【//]$/;function k2e(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!Bf(Yc(e,t+2)))return!1;const i=e[t-1];return i!==void 0&&b2e.test(i)}function A2e(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 i=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${i}(?:\p{L}+)?(?:(?:${t})+${i}(?:\p{L}+)?)*$`,"u").test(n)}const El=-1,pS=1,gS=2,mS=3;function C2e(e){const t=e.length,n=new Uint8Array(t),i=new Int32Array(t+1).fill(El),s=new Int32Array(t+1),o=new Int32Array(t+1),r=[],l=[];{const z=[];for(let q=0;q<t;q++)if(e[q]==="`"){if(ag(e,q))continue;let X=q+1;for(;X<t&&e[X]==="`";)X++;z.push([q,X]),q=X-1}const G=new Map;for(let q=0;q<z.length;q++){const X=z[q][1]-z[q][0],ee=G.get(X);ee?ee.push(q):G.set(X,[q])}const K=new Map;let H=0;for(;H<z.length;){const[q,X]=z[H],ee=X-q,ue=G.get(ee);let ie=K.get(ee)??0;for(;ie<ue.length&&ue[ie]<=H;)ie++;K.set(ee,ie),ie<ue.length?(l.push([q,z[ue[ie]][1]]),H=ue[ie]+1):H++}}let a=0;const u=z=>{for(;a<l.length&&z>=(l[a]?.[1]??0);)a++;const G=l[a];return G!==void 0&&z>=G[0]},c=new Set(' \n\r)。,、;:!?"<>`「」『』【】〔〕()*—–“”‘’'),d=[];for(const z of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))d.push(z.index);for(const z of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))d.push(z.index);for(const z of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(z.index===0||!/[\w~/.-]/.test(e[z.index-1]))&&d.push(z.index);d.sort((z,G)=>z-G);let f=-1;for(const z of d){if(z<f)continue;let G=z,K=0,H=0,q=0;for(;G<t;){const X=e[G];if(X==="(")K++;else if(X===")"){if(K===0)break;K--}else if(X==="[")H++;else if(X==="]"){if(H===0)break;H--}else if(X==="{")q++;else if(X==="}"){if(q===0)break;q--}else{if(c.has(X))break;if((X===","||X===";"||X==="!"||X==="?")&&!/[A-Za-z0-9$]/.test(e[G+1]??""))break;if(X===":"&&H===0&&G>z+7&&!/[\w/?#@~.+&=%-]/.test(e[G+1]??""))break}G++}r.push([z,G]),f=G}const p=[];for(let z=0;z<t;z++){if(e[z]!=="<"||e[z+1]===void 0||!/[a-zA-Z/]/.test(e[z+1]))continue;let G=z+1;const K=e[G]==="/";K&&G++;const H=/^[a-zA-Z][a-zA-Z0-9-]*/.exec(e.slice(G));if(!H)continue;G+=H[0].length;const q=e[G];if(q===void 0||!/[\s/>]/.test(q))continue;let X=G,ee=El,ue=El;for(;X<t;){const ie=e[X];if(ie===">"){ue=X;break}if(!K&&ie==="/"&&e[X+1]===">"){ue=X+1;break}if(!/\s/.test(ie)){ee=X;break}for(;X<t&&/\s/.test(e[X]);)X++;const xe=e[X];if(xe===void 0)break;if(xe===">"){ue=X;break}if(K){ee=X;break}if(xe==="/"&&e[X+1]===">"){ue=X+1;break}const ce=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(X));if(!ce){ee=X;break}X+=ce[0].length;let pe=X;for(;pe<t&&/\s/.test(e[pe]);)pe++;if(e[pe]==="="){for(pe++;pe<t&&/\s/.test(e[pe]);)pe++;const Ne=e[pe];if(Ne==='"'||Ne==="'"){const te=e.indexOf(Ne,pe+1);if(te===-1){ee=pe;break}X=te+1}else{const te=/^[^\s"'=<>`]+/.exec(e.slice(pe));if(!te){ee=pe;break}X=pe+te[0].length}}}if(ue!==El)p.push([z,ue+1]),z=ue;else if(ee!==El){const ie=e.indexOf("<",z+1);z=(ie!==-1&&ie<ee?ie:ee)-1}else break}let g=!0,m=!0,y=!0,w=!0;for(let z=0;z<t;z++){if(e[z]!=="<")continue;const G=e[z+1];let K=!1;if(G==="?"&&m){const ee=e.indexOf("?>",z+2);ee===-1?m=!1:(p.push([z,ee+2]),z=ee+1,K=!0)}else if(G==="!"){if(e[z+2]==="-"&&e[z+3]==="-"){if(g){const ee=e.indexOf("-->",z+4);ee===-1?g=!1:(p.push([z,ee+3]),z=ee+2,K=!0)}}else if(e.startsWith("[CDATA[",z+2)){if(y){const ee=e.indexOf("]]>",z+9);ee===-1?y=!1:(p.push([z,ee+3]),z=ee+2,K=!0)}}else if(w&&/[A-Z]/.test(e[z+2]??"")){const ee=e.indexOf(">",z+3);ee===-1?w=!1:(p.push([z,ee+1]),z=ee,K=!0)}}if(K)continue;if(G!==void 0&&/[a-zA-Z]/.test(G)){const ee=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(z+1));if(ee){let ue=z+1+ee[0].length;for(;ue<t&&e[ue]!==">"&&e[ue]!=="<"&&!/\s/.test(e[ue]);)ue++;if(e[ue]===">"){p.push([z,ue+1]),z=ue;continue}}}if(G===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(G))continue;let H=z+1;for(;H<t&&/[\w.!#$%&'*+/=?^`{|}~-]/.test(e[H]);)H++;if(e[H]!=="@")continue;H++;const q=/^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?/;let X=q.exec(e.slice(H));if(X){for(H+=X[0].length;e[H]==="."&&(X=q.exec(e.slice(H+1)),!!X);)H+=1+X[0].length;e[H]===">"&&(p.push([z,H+1]),z=H)}}p.sort((z,G)=>z[0]-G[0]);const k=[];for(const[z,G]of p){const K=k[k.length-1];K&&z<=K[1]?K[1]=Math.max(K[1],G):k.push([z,G])}r.push(...k);let A=0;const v=z=>{for(;A<k.length&&z>=(k[A]?.[1]??0);)A++;const G=k[A];return G!==void 0&&z>=G[0]},x=[];let E=null,S=0,M=!1;for(let z=0;z<t;z++)if(e[z]==="\\")z++;else if(M)e[z]===">"&&(M=!1);else if(!(u(z)||v(z))){if(E!==null)e[z]===E&&(E=null);else if(x.length>0&&(e[z]==='"'||e[z]==="'")&&z>0&&/\s/.test(e[z-1]))E=e[z];else if(e[z]==="[")S++;else if(e[z]==="]")S>0&&e[z+1]==="("&&(x.push(z),M=e[z+2]==="<",z++),S=Math.max(0,S-1);else if(e[z]==="("&&x.length>0)x.push(-1);else if(e[z]===")"&&x.length>0){const G=x.pop();if(G!==void 0&&G>=0){const K=e.slice(G+2,z);(/\s/.exec(K)===null||K.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(K)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(K))&&r.push([G,z+1])}}}r.sort((z,G)=>z[0]-G[0]);const _=[];for(const[z,G]of r){const K=_[_.length-1];K&&z<=K[1]?K[1]=Math.max(K[1],G):_.push([z,G])}const N=z=>{let G=0,K=_.length-1;for(;G<=K;){const H=G+K>>1,q=_[H];if(q===void 0)return!1;if(z<q[0])K=H-1;else if(z>=q[1])G=H+1;else return!0}return!1},D=new Uint8Array(t);{let z=-1,G=!1,K=!1,H=0;for(let q=0;q<=t;q++){const X=q<t&&e[q]==="`";if(q===t||X){if(X&&z!==-1&&K&&!G&&H===0)for(let ue=z+1;ue<q;ue++)D[ue]=1;z=q,G=!1,K=!1,H=0;continue}if(z===-1)continue;const ee=e[q];ee==="$"?ag(e,q)||(e[q+1]==="{"?(K=!0,H++,q++):H===0&&(G=!0)):H>0&&(ee==="{"?H++:ee==="}"&&H--)}}for(let z=0;z<t;z++)o[z+1]=(o[z]??0)+(e[z]==="`"&&!ag(e,z)?1:0),e[z]==="$"&&(ag(e,z)||N(z)||D[z]===1?n[z]=pS:hS(e[z-1])||Bf(Yc(e,z+1))||k2e(e,z)?n[z]=gS:n[z]=mS),s[z+1]=(s[z]??0)+(n[z]===gS?1:0);let T=El;for(let z=t-1;z>=0;z--)n[z]===mS&&(T=z),i[z]=T;const $=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,P=/[^\p{L}\p{Nd}\s]$/u,O=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,R=/(?:^|\s)[a-z]{2,}/,W=(z,G)=>{const K=Yc(e,z+1);if(K===void 0||!$.test(K))return!1;const H=i[z+1]??El;if(H!==El){const q=e.slice(z+1,H);return!(q.length===((q.codePointAt(0)??0)>65535?2:1))&&O.test(q)||/[,;:!?]$/.test(q)||/^[a-z]{2,}$/.test(q)?!1:(s[H]??0)-(s[z+1]??0)===0&&(o[H]??0)-(o[z+1]??0)===0}return P.test(G)||O.test(G)||R.test(G)};return(z,G=-1)=>{if(e[z]!=="$"||n[z]===pS||e[z+1]==="$"||e[z-1]==="$"&&G!==z||v2e(e,z)||z+1>=t||hS(e[z+1]))return null;const K=i[z+1]??El;if(K===El||(s[K]??0)-(s[z+1]??0)>0||(o[K]??0)-(o[z+1]??0)>0)return null;const H=e.slice(z+1,K);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(H)||e[K+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(H)||Bf(g2e(e,z))&&A2e(H)||m2e(e,z)&&(W(K,H)||y2e(e,K)||/\s/.test(H)&&/\p{Nd}$/u.test(H)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(H)||e[K+1]==="$"&&!/\p{L}/u.test(H)&&/[^\p{L}\p{Nd}\s]$/u.test(H))?null:{content:H,end:K+1}}}const vS=new WeakMap;function w2e(e,t){if(e.src[e.pos]!=="$")return!1;let n=vS.get(e);(!n||n.src!==e.src)&&(n={src:e.src,match:C2e(e.src),lastEnd:-1},vS.set(e,n));const i=n.match(e.pos,n.lastEnd);if(!i||i.end>e.posMax)return!1;if(n.lastEnd=i.end,t)return e.pos=i.end,!0;const s=e.push("math_inline","math",0);return s.content=i.content,s.markup="$",s.raw=e.src.slice(e.pos,i.end),s.loading=!1,e.pos=i.end,!0}function x2e(e){return e.inline.ruler.disable("math"),e.inline.ruler.before("escape","math",w2e),e}const _2e=12e4,S2e=6e4,M2e=32,I2e=3e4,yS=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function E2e(e){let t=0,n=0,i=0;yS.lastIndex=0;let s;for(;(s=yS.exec(e))!==null;){const r=s[3]??"";t+=1,n+=r.length,i=Math.max(i,r.length)}return{codeRenderer:e.length>=_2e||n>=S2e||t>=M2e||i>=I2e?"pre":"shiki",codeFenceCount:t,codeChars:n}}async function GB(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 L2e(e)}function T2e(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||GB(e)}function L2e(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 QB="md-table-wide",YB="md-table-toggle",JB="md-table-fade",bS="md-table-toggle--show",N2e="md-table-at-end",F2e="kimi-table-layout",XB='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>',B2e='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" y1="10" x2="21" y2="3"/><line x1="3" y1="21" x2="10" y2="14"/></svg>';function Np(e){return e.querySelector(`button.${YB}`)}function e$(e){return e.querySelector(`.${JB}`)}const $2e=26;function D2e(e){const t=Np(e);if(!t)return;const n=e.querySelector("thead tr")??e.querySelector("tr");if(!n)return;const i=n.getBoundingClientRect(),s=e.getBoundingClientRect().top,o=Math.max(2,Math.round(i.top-s+(i.height-$2e)/2));t.style.top=`${o}px`,t.style.right=`${o}px`}function R2e(e){return e.closest(".a-msg .msg")!==null}function z2e(e){const t=e.querySelector("table");return t!==null&&t.scrollWidth>e.clientWidth+1}function t$(e){const t=`translateX(${e.scrollLeft}px)`,n=e$(e);n&&(n.style.transform=t);const i=Np(e);i&&(i.style.transform=t);const s=e.scrollLeft+e.clientWidth>=e.scrollWidth-2;e.classList.toggle(N2e,s)}function O2e(e,t){const n=Np(e);if(n)return n;if(!R2e(e))return null;const i=document.createElement("div");i.className=JB,i.setAttribute("aria-hidden","true");const s=document.createElement("button");return s.type="button",s.className=YB,s.innerHTML=XB,s.setAttribute("aria-label",t.widen),s.title=t.widen,s.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),P2e(e,t)}),e.appendChild(i),e.appendChild(s),e.addEventListener("scroll",()=>t$(e),{passive:!0}),Vb(e),s}function P2e(e,t){const n=e.classList.toggle(QB),i=Np(e);if(i){i.innerHTML=n?B2e:XB;const s=n?t.restore:t.widen;i.setAttribute("aria-label",s),i.title=s}Vb(e),e.dispatchEvent(new CustomEvent(F2e,{bubbles:!0}))}function Vb(e){const t=Np(e);if(!t)return;const n=z2e(e),i=e.classList.contains(QB);t.classList.toggle(bS,n||i);const s=e$(e);s&&s.classList.toggle(bS,n),D2e(e),t$(e)}function j2e(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function H2e(e){return new Worker("/assets/mermaidParser.worker-BFSlSHEW.js",{type:"module",name:e?.name})}const W2e={key:0,class:"md-frontmatter"},q2e={key:1,class:"diff-wrap"},U2e={class:"diff-bar"},K2e=["aria-label","onClick"],V2e={class:"diff-pre"},Z2e={key:0,class:"diff-sign"},G2e={class:"diff-text"},Q2e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",kS="github-light",AS="github-dark",Y2e=tt({__name:"Markdown",props:{text:{},openFile:{},streaming:{type:Boolean,default:!1}},setup(e){Bpe(),Vpe(),Dpe(),Qpe(),$pe(new j2e),Gpe(new H2e);const{t}=jf(),n=an("resolveImage"),i=Z(null),s=e,o=F(()=>!s.streaming),r=F(()=>f2e(s.text??"")),l=F(()=>r.value.frontmatter),a=F(()=>r.value.body),u=F(()=>l2e(a.value)),c=F(()=>s.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:E2e(a.value)),d=rv(),f=F(()=>!s.streaming),p=Ts(new Map),g=new Set,m=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,y=/(<img\b[^>]*?\bsrc=")([^"]+)(")/gi;function w(K){return!/^(https?:|data:|blob:)/i.test(K)}function k(K){if(!n)return;const H=[];for(const q of[m,y]){q.lastIndex=0;let X;for(;(X=q.exec(K))!==null;)H.push(X[2]??"")}for(const q of H)!q||!w(q)||p.has(q)||g.has(q)||(g.add(q),n(q).then(X=>{p.set(q,X!==q?X:"")}).catch(()=>{p.set(q,"")}).finally(()=>{g.delete(q)}))}function A(K){if(!n)return K;const H=q=>{if(!w(q))return null;const X=p.get(q);return X===void 0?Q2e:X===""?null:X};return K.replace(m,(q,X,ee,ue)=>{const ie=H(ee);return ie===null?q:`${X}${ie}${ue}`}).replace(y,(q,X,ee,ue)=>{const ie=H(ee);return ie===null?q:`${X}${ie}${ue}`})}Qe(a,K=>k(K),{immediate:!0});function v(){if(!i.value||!s.openFile||s.streaming)return;const K=document.createTreeWalker(i.value,NodeFilter.SHOW_TEXT),H=[];let q=K.nextNode();for(;q;){const X=q,ee=X.parentElement;ee&&!ee.closest("a, pre, .md-file-link, svg")&&X.data.trim().length>0&&H.push(X),q=K.nextNode()}for(const X of H){const ee=u2e(X.data,{aliases:u.value});if(ee.length===0||!X.parentNode)continue;const ue=document.createDocumentFragment();let ie=0;for(const xe of ee){xe.start>ie&&ue.append(document.createTextNode(X.data.slice(ie,xe.start)));const ce=document.createElement("button");ce.type="button",ce.className="md-file-link",ce.textContent=xe.text,ce.title=xe.line?`${xe.path}:${xe.line}`:xe.path,ce.addEventListener("click",pe=>{pe.preventDefault(),pe.stopPropagation(),s.openFile?.({path:xe.path,line:xe.line})}),ue.append(ce),ie=xe.end}ie<X.data.length&&ue.append(document.createTextNode(X.data.slice(ie))),X.parentNode.replaceChild(ue,X)}}function x(K){return!(!K||/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(K))}function E(K){let H=K.length;for(const q of["#","?"]){const X=K.indexOf(q);X!==-1&&X<H&&(H=X)}return K.slice(0,H)}function S(){if(!i.value||!s.openFile||s.streaming)return;const K=i.value.querySelectorAll("a[href]");for(const H of K){if(H.dataset.mdLinkHandled==="true"||H.closest("svg"))continue;const q=H.getAttribute("href")??"";x(q)&&(H.dataset.mdLinkHandled="true",H.addEventListener("click",X=>{X.preventDefault(),X.stopPropagation(),s.openFile?.({path:E(q)})}))}}function M(){return{widen:t("conversation.widenTable"),restore:t("conversation.restoreTableWidth")}}function _(){if(!i.value||s.streaming)return;const K=M();for(const H of i.value.querySelectorAll(".table-node-wrapper"))O2e(H,K)}function N(){if(!(!i.value||s.streaming))for(const K of i.value.querySelectorAll(".table-node-wrapper"))Vb(K)}function D(){kt().then(()=>{v(),S(),_()})}Qe(()=>s.text,D),Qe(()=>s.streaming,D);let T=null,$=null;pn(()=>{D(),i.value&&(T=new MutationObserver(D),T.observe(i.value,{childList:!0,subtree:!0}),$=new ResizeObserver(N),$.observe(i.value))}),An(()=>{T?.disconnect(),$?.disconnect()});const P={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}}},O=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,R=F(()=>{const K=A(a.value),H=[];let q=0;O.lastIndex=0;let X;for(;(X=O.exec(K))!==null;){const ue=X[1]??"",ie=K.slice(q,X.index)+(ue||"");ie.trim()&&H.push({kind:"md",text:ie}),H.push({kind:"diff",code:X[2]??""}),q=O.lastIndex}const ee=K.slice(q);return(ee.trim()||H.length===0)&&H.push({kind:"md",text:ee}),H});function W(K){return K.split(` +`).map(H=>H.startsWith("@@")?{type:"hunk",sign:"",text:H}:/^\+(?!\+\+)/.test(H)?{type:"add",sign:"+",text:H.slice(1)}:/^-(?!--)/.test(H)?{type:"del",sign:"-",text:H.slice(1)}:H.startsWith(" ")?{type:"ctx",sign:"",text:H.slice(1)}:{type:"ctx",sign:"",text:H})}const z=Z(null);function G(K,H){GB(K).then(q=>{q&&(z.value=H,setTimeout(()=>{z.value=null},1400))})}return(K,H)=>(b(),I("div",{ref_key:"mdRef",ref:i,class:"md"},[l.value!==null?(b(),I("pre",W2e,B(l.value),1)):ne("",!0),(b(!0),I(Be,null,yt(R.value,(q,X)=>(b(),I(Be,{key:X},[q.kind==="md"?(b(),fe(h(rr),{key:0,content:q.text,"custom-markdown-it":h(x2e),mode:"chat","code-renderer":c.value.codeRenderer,"is-dark":h(d),"code-block-light-theme":kS,"code-block-dark-theme":AS,themes:[kS,AS],"code-block-props":P,final:o.value,"smooth-streaming":e.streaming,"batch-rendering":f.value,"defer-nodes-until-visible":!1,onCopy:h(T2e)},null,8,["content","custom-markdown-it","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(b(),I("div",q2e,[C("div",U2e,[H[0]||(H[0]=C("span",{class:"diff-lang"},"diff",-1)),V(h(gn),{text:h(t)("filePreview.copyCode")},{default:he(()=>[C("button",{class:"diff-copy","aria-label":h(t)("filePreview.copyCode"),onClick:ee=>G(q.code,X)},[V(h(Ce),{name:z.value===X?"check":"copy",size:"sm"},null,8,["name"])],8,K2e)]),_:2},1032,["text"])]),C("pre",V2e,[C("code",null,[(b(!0),I(Be,null,yt(W(q.code),(ee,ue)=>(b(),I("span",{key:ue,class:De(["diff-line",`diff-${ee.type}`])},[ee.type!=="hunk"?(b(),I("span",Z2e,B(ee.sign),1)):ne("",!0),C("span",G2e,B(ee.text),1)],2))),128))])])]))],64))),128))],512))}}),Kl=vt(Y2e,[["__scopeId","data-v-f0354d0f"]]),J2e=640,X2e=`(max-width: ${J2e}px)`;function eve(){const e=Z(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(X2e);e.value=t.matches;const n=i=>{e.value=i.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),An(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),An(()=>t.removeListener(n))),e}const n$=Z(typeof window>"u"?0:window.innerWidth);let ug=0,r2=!1;function x8(){n$.value=window.innerWidth}function tve(){r2||typeof window>"u"||(window.addEventListener("resize",x8),r2=!0,x8())}function nve(){!r2||typeof window>"u"||(window.removeEventListener("resize",x8),r2=!1)}function i$(e,t,n){return Math.max(t,e-n)}function _8(e,t,n){return Math.min(n,Math.max(t,e))}function s$(){return pn(()=>{ug+=1,tve()}),Gn(()=>{ug=Math.max(0,ug-1),ug===0&&nve()}),{viewportWidth:n$}}const ive=24;function sve(e){const t=Z(null),n=Z(!0);let i=null,s=null,o=null,r=0,l=0,a=!1,u=0;function c(){const y=t.value;y&&(y.scrollTop=Math.max(y.scrollTop,r))}function d(){const w=t.value?.firstElementChild??null;w!==o&&(o&&i?.unobserve(o),o=w,w&&i?.observe(w))}function f(){const y=t.value;!y||a||(n.value=r-y.scrollTop-l<ive)}function p(y){y!==u||!a||(a=!1,f())}function g(){n.value=!1,a=!0;const y=++u;if(typeof requestAnimationFrame!="function"){queueMicrotask(()=>p(y));return}requestAnimationFrame(()=>{requestAnimationFrame(()=>p(y))})}function m(){const y=t.value;y&&(i?.disconnect(),s?.disconnect(),o=null,a=!1,u++,r=0,l=0,typeof ResizeObserver=="function"?(i=new ResizeObserver(()=>{const w=t.value;if(!w)return;const{scrollHeight:k,clientHeight:A}=w,v=k>r+1,x=A<l-1;if(r=k,l=A,a){p(u);return}n.value&&(v||x)&&c()}),i.observe(y),d()):(r=y.scrollHeight,l=y.clientHeight,c()),typeof MutationObserver=="function"&&(s=new MutationObserver(d),s.observe(y,{childList:!0})))}return Qe(e,()=>{n.value=!0,kt(m)}),Qe(t,()=>void kt(m)),pn(()=>void kt(m)),An(()=>{u++,i?.disconnect(),s?.disconnect()}),{scroller:t,following:n,onScroll:f,pinScroll:g}}function ove(e){try{const t=uo(e);if(t===null)return null;const n=Number(t);return Number.isFinite(n)?n:null}catch{return null}}function CS(e,t){try{Ns(e,String(t))}catch{}}function rve(e){const{storageKey:t,defaultWidth:n,min:i,max:s,reverse:o=!1,axis:r="x",applyLive:l}=e;function a(D){return Number.isFinite(D)?Math.min(fu(s),Math.max(i,Math.round(D))):n}const u=Z(a(ove(t)??n)),c=Z(!1);function d(D){const T=D<=i,$=D>=fu(s),P=r==="x"?"col-resize":"row-resize";if(T&&$)return P;const[O,R]=r==="x"?["e-resize","w-resize"]:["s-resize","n-resize"];return $?o?O:R:T?o?R:O:P}const f=Z(null),p=F(()=>d(f.value??u.value));function g(D){typeof document>"u"||(document.body.style.cursor=d(D))}function m(D){const T=a(D);u.value=T,CS(t,T)}Qe(()=>fu(s),D=>{!c.value&&u.value>D&&m(D)});let y=0,w=0,k=null,A=-1,v=0,x=0,E=0;function S(){if(x=0,!c.value)return;const D=v-y;E=a(w+(o?-D:D)),f.value=E,g(E),l?l(E):u.value=E}function M(D){if(c.value&&(v=r==="x"?D.clientX:D.clientY,x===0)){if(typeof requestAnimationFrame!="function"){S();return}x=requestAnimationFrame(S)}}function _(){if(c.value){if(x!==0&&(cancelAnimationFrame(x),S()),c.value=!1,l?m(E):CS(t,u.value),f.value=null,typeof document<"u"&&(document.body.style.userSelect="",document.body.style.cursor=""),k){try{k.releasePointerCapture(A)}catch{}k.removeEventListener("pointermove",M),k.removeEventListener("pointerup",_),k.removeEventListener("pointercancel",_)}k=null,A=-1}}function N(D){D.preventDefault(),c.value=!0,y=r==="x"?D.clientX:D.clientY,w=a(u.value),E=w,k=D.currentTarget,A=D.pointerId,typeof document<"u"&&(document.body.style.userSelect="none"),g(w);try{k.setPointerCapture(A)}catch{}k.addEventListener("pointermove",M),k.addEventListener("pointerup",_),k.addEventListener("pointercancel",_)}return Gn(_),{width:u,dragging:c,cursor:p,clamp:a,setWidth:m,onPointerDown:N}}const ol=Z(null),bf=Z(!1),lve=F(()=>ol.value!==null);function Zb(e){const t=ol.value;!t||bf.value||(ol.value=null,t.resolve(e))}async function ave(){const e=ol.value;if(!(!e||bf.value)){if(!e.action){Zb(!0);return}bf.value=!0;try{await e.action(),ol.value===e&&(ol.value=null),e.resolve(!0)}catch(t){ol.value===e&&(ol.value=null),e.reject(t)}finally{bf.value=!1}}}function uve(e){return bf.value?Promise.resolve(!1):(ol.value&&Zb(!1),new Promise((t,n)=>{ol.value={...e,resolve:t,reject:n}}))}function Hu(){return{current:ol,busy:bf,isConfirmOpen:lve,confirm:uve,settle:Zb,runAction:ave}}function cve(e){const{sessionId:t}=e;function n(a){return uo(GC(a))??""}function i(a,u){const c=GC(a);u?Ns(c,u):lr(c)}const s=Z(n(t())),o=Z(null);Qe(s,a=>{i(t(),a)}),Qe(t,(a,u)=>{a!==u&&(i(u,s.value),s.value=n(a))});function r(a){s.value=a,kt(()=>{const u=o.value;if(!u)return;u.focus();const c=a.length;u.setSelectionRange(c,c)})}function l(){i(t(),"")}return{text:s,editorRef:o,loadForEdit:r,clearDraft:l}}function dve(e){return e?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable===!0:!1}function fve(e){const{sessionId:t,mobile:n,starting:i,dockedComposer:s,emptyComposer:o}=e,r=Z(!1);Qe(t,()=>{n()||(r.value=!0)}),Qe([r,s,o,i],()=>{if(!r.value)return;const l=s.value??o.value;if(!l)return;const a=typeof document<"u"?document.activeElement:null;if(dve(a)){r.value=!1;return}l.focus(),(typeof document>"u"||document.activeElement!==a)&&(r.value=!1)},{flush:"post"})}const l2=100;function hve(e){const t=od(un.inputHistory);if(Array.isArray(t)){const n=t.filter(o=>typeof o=="string"&&o.length>0);if(!e||n.length===0)return{};const i=n.length>l2?n.slice(-l2):n,s={[e]:i};return Pu(un.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function pve(e){const{text:t,editorRef:n,sessionId:i}=e,s=Z(hve(i())),o=F(()=>s.value[i()??""]??[]);let r=-1,l="";function a(y){const w=i();if(r=-1,!w)return;const k=y.trim();if(!k)return;const A=s.value[w]??[];if(A.at(-1)===k)return;const v=[...A,k],x=v.length>l2?v.slice(-l2):v;s.value={...s.value,[w]:x},Pu(un.inputHistory,s.value)}function u(){const y=n.value;return y?(y.selectionStart??0)===0:!1}function c(y){t.value=y,kt(()=>{const w=n.value;if(!w)return;const k=y.length;w.setSelectionRange(k,k)})}function d(){const y=o.value;if(y.length!==0){if(r===-1)l=t.value,r=y.length-1;else if(r>0)r-=1;else return;c(y[r])}}function f(){if(r===-1)return;const y=o.value;r<y.length-1?(r+=1,c(y[r])):(r=-1,c(l))}function p(){r=-1}function g(){return r!==-1}function m(){return o.value.length>0}return Qe(i,()=>{r=-1}),{push:a,caretAtTextStart:u,recallOlder:d,recallNewer:f,resetBrowsing:p,isBrowsing:g,hasHistory:m}}function gve(e){const{text:t,editorRef:n,skills:i,emitCommand:s,historyPush:o,clearDraft:r,resolveDesc:l}=e,a=Z(!1),u=Z([]),c=Z([]),d=Z(0);function f(){const g=t.value;if(/^\/\S*$/.test(g)){const m=Bie(g,FL(i()),l);u.value=m.map(y=>y.item),c.value=m.map(y=>y.ranges),d.value=0,a.value=!0}else a.value=!1}function p(g){if(a.value=!1,g.acceptsInput){t.value=`${g.name} `,kt(()=>{const m=n.value;if(!m)return;const y=t.value.length;m.setSelectionRange(y,y),m.focus()});return}t.value="",r?.(),o(g.name),s(g.name)}return{open:a,items:u,ranges:c,active:d,update:f,select:p}}function mve(e){const{text:t,editorRef:n,searchFiles:i}=e,s=Z(!1),o=Z([]),r=Z(0),l=Z(!1);let a=null;function u(){const p=t.value,g=n.value?.selectionStart??p.length;let m=g-1;for(;m>=0&&!/\s/.test(p[m]);)m--;m++;const y=p.slice(m,g);return y.startsWith("@")?{token:y.slice(1),start:m,end:g}:null}function c(){const p=u(),g=i();if(a!==null&&clearTimeout(a),!p||!g||p.token.length===0){s.value=!1,l.value=!1;return}const m=p.token;a=setTimeout(async()=>{l.value=!0,s.value=!0,r.value=0;const y=()=>{const w=u();return w!==null&&w.token===m&&s.value};try{const w=await g(m);y()&&(o.value=w)}catch{y()&&(o.value=[])}finally{y()&&(l.value=!1)}},200)}function d(){a!==null&&(clearTimeout(a),a=null),s.value=!1,l.value=!1}function f(p){const g=u();if(!g)return;const m=t.value;t.value=m.slice(0,g.start)+p.path+m.slice(g.end),s.value=!1,kt(()=>{const y=n.value;if(!y)return;const w=g.start+p.path.length;y.setSelectionRange(w,w),y.focus()})}return{open:s,items:o,active:r,loading:l,update:c,close:d,select:f}}const vve="kimi-web.file-preview-width",Hd=320;function yve({client:e,sideWidth:t,detailTarget:n,closeFilePreview:i}){const{viewportWidth:s}=s$(),o=F(()=>Math.max(0,s.value-t.value)),r=F(()=>i$(o.value,Hd,Hd));function l(re){return _8(Math.round(re),Hd,r.value)}function a(){return l(o.value/2)}const u=F(()=>a()),c=Z(u.value),d=F(()=>_8(c.value,Hd,r.value)),f=Z(null),p=F(()=>{const re=f.value;if(!re)return null;const se=e.turns.value.find(U=>U.id===re.turnId);return se?.role==="compaction"&&se.text?se.text:null}),g=F(()=>p.value!==null);function m(re){if(f.value?.turnId===re.turnId){f.value=null,n.value==="compaction"&&(n.value=null);return}n.value="compaction",f.value=re}function y(){f.value=null,n.value==="compaction"&&(n.value=null)}const w=Z(null),k=F(()=>{const re=w.value;if(!re)return{entry:void 0,version:0};const se=e.auxiliaryTranscripts.getEntry(re.sessionId,re.subagentId);return{entry:se,version:se?.version.value??0}});function A(re){const se=e.turns.value.flatMap(U=>U.tools??[]).find(U=>U.agentId===re);if(!se)return{};try{const U=JSON.parse(se.arg);return{name:typeof U.description=="string"?U.description:void 0,subagentType:typeof U.subagent_type=="string"?U.subagent_type:void 0,status:se.status,outputLines:se.output}}catch{return{}}}const v=F(()=>{const re=w.value;if(!re)return null;const se=e.activeAppTasks.value.find(Ke=>Ke.agentId===re.subagentId||Ke.id===re.subagentId||Ke.backgroundTaskId===re.subagentId);if(se)return AX(se,e.findBashCommandForTask(se));const U=k.value.entry?.channel,J=U?.agents.find(Ke=>Ke.agentId===re.subagentId),de=U?.refreshError??!1,me=U===void 0||U.loading,Ie=U?.snapshot.meta.activity==="turn",je=A(re.subagentId),ke=U?.snapshot.items.findLast(Ke=>Ke.kind==="turn"),Le=ke?.kind==="turn"&&ke.state==="cancelled",it=ke?.kind==="turn"&&ke.state==="failed"||je.status==="error",Fe=Ie?"working":Le?"cancelled":it?"failed":me?"queued":de&&je.status===void 0?"failed":"completed",Re=Ie?"running":Le?"cancelled":it?"failed":me?"running":de&&je.status===void 0?"failed":"completed";return{id:re.subagentId,name:J?.label??je.name??re.subagentId,subagentType:je.subagentType??(J?.type==="sub"?"subagent":J?.type),phase:Fe,status:Re,outputLines:je.outputLines}}),x=F(()=>{const re=k.value.entry;if(!re)return[];const se=w.value,U=re.channel.agents.find(J=>J.agentId===se?.subagentId);return BX(re.channel.snapshot,e.getFileUrl,U)}),E=F(()=>k.value.entry?.channel.loading??!1),S=F(()=>k.value.entry?.channel.refreshError??!1),M=F(()=>k.value.entry?.channel.loadingOlder??!1),_=F(()=>k.value.entry?.channel.loadOlderError??!1),N=F(()=>k.value.entry?.channel.snapshot.hasMoreOlder??!1),D=F(()=>k.value.entry?.channel.snapshot.meta.activity==="turn"),T=F(()=>v.value!==null);function $(re){const se=e.activeAppTasks.value.find(U=>U.agentId===re||U.id===re||U.backgroundTaskId===re);return!se||se.kind==="subagent"&&se.agentId===re}function P(re){return e.activeAppTasks.value.find(U=>U.agentId===re||U.id===re||U.backgroundTaskId===re)?.agentId??re}function O(re){const se=e.activeSessionId.value;if(!re||!se)return;const U=P(re);if(n.value==="agent"&&w.value?.sessionId===se&&w.value.subagentId===U){R();return}const J=w.value;J&&J.subagentId!==U&&e.auxiliaryTranscripts.deactivate(J.sessionId,J.subagentId),w.value={sessionId:se,subagentId:U},n.value="agent",$(U)&&e.auxiliaryTranscripts.activate(se,U)}Qe(()=>e.activeAppTasks.value,re=>{const se=w.value;if(!se)return;const U=re.find(J=>J.backgroundTaskId===se.subagentId&&J.agentId!==void 0);!U||U.agentId===se.subagentId||(w.value={sessionId:se.sessionId,subagentId:U.agentId},n.value==="agent"&&e.auxiliaryTranscripts.activate(se.sessionId,U.agentId))});function R(){const re=w.value;re&&e.auxiliaryTranscripts.deactivate(re.sessionId,re.subagentId),w.value=null,n.value==="agent"&&(n.value=null)}Qe(n,(re,se)=>{if(se!=="agent"||re==="agent")return;const U=w.value;U&&e.auxiliaryTranscripts.deactivate(U.sessionId,U.subagentId)});function W(){const re=k.value.entry;re&&re.channel.loadOlder().catch(()=>{})}const z=Z("list"),G=Z(null);function K(){if(n.value==="diff"){H();return}n.value="diff",z.value="list",G.value=null,e.loadGitStatus(e.activeSessionId.value)}function H(){n.value==="diff"&&(n.value=null),z.value="list",G.value=null,e.clearFileDiff()}async function q(re){z.value="detail",G.value=re,await e.loadFileDiff(re)}const X=vl(null);function ee(re){if(X.value===re&&n.value==="turn-diff"){ue();return}X.value=re,n.value="turn-diff"}function ue(){X.value=null,n.value==="turn-diff"&&(n.value=null)}async function ie(re){if(!e.activeSessionId.value&&e.activeWorkspaceId.value){const se=await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,re);return n.value="btw",se}return await e.openSideChat(re),n.value="btw",null}function xe(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function ce(){n.value==="btw"&&(n.value=null)}const pe=F(()=>e.sideChatVisible.value),Ne=F(()=>n.value!==null&&(n.value!=="compaction"||g.value)&&(n.value!=="agent"||T.value)&&(n.value!=="btw"||pe.value)),te=Z(!1),ye=Z({});function j(){switch(n.value){case"compaction":return f.value?{kind:"compaction",...f.value}:null;case"agent":return w.value?{kind:"agent",...w.value}:null;case"btw":return{kind:"btw"};default:return null}}function Y(re){if(re)switch(re.kind){case"compaction":f.value={turnId:re.turnId},n.value="compaction";break;case"agent":if(e.activeSessionId.value){const se=P(re.subagentId);w.value={sessionId:e.activeSessionId.value,subagentId:se},n.value="agent",$(se)&&e.auxiliaryTranscripts.activate(e.activeSessionId.value,se)}break;case"btw":e.sideChatVisible.value&&(n.value="btw");break}}function ve(){return n.value==="compaction"&&g.value?(y(),!0):n.value==="agent"&&T.value?(R(),!0):n.value==="file"?(i(),!0):n.value==="diff"?(H(),!0):n.value==="turn-diff"?(ue(),!0):n.value==="btw"?(xe(),!0):!1}return Qe(e.activeSessionId,(re,se)=>{if(se){const U=j();U?ye.value[se]=U:delete ye.value[se]}i(),y(),R(),H(),ue(),ce(),re&&Y(ye.value[re])}),{PREVIEW_WIDTH_KEY:vve,PREVIEW_MIN:Hd,previewDefaultWidth:u,previewMax:r,previewWidth:c,previewPanelWidth:d,compactionPanelText:p,compactionPanelVisible:g,openCompactionPanel:m,closeCompactionPanel:y,agentPanelMember:v,agentPanelTurns:x,agentPanelLoading:E,agentPanelLoadError:S,agentPanelLoadingMore:M,agentPanelLoadMoreError:_,agentPanelHasMore:N,agentPanelRunning:D,agentPanelVisible:T,openAgentPanel:O,closeAgentPanel:R,loadOlderAgentMessages:W,detailDiffMode:z,detailDiffPath:G,openDiffDetail:K,closeDiffDetail:H,selectDiffFile:q,turnDiffChange:X,openTurnDiff:ee,closeTurnDiff:ue,btwVisible:pe,openSideChatTab:ie,closeSideChat:xe,hideSideChatPanel:ce,sidePanelVisible:Ne,panelDragging:te,closeOpenSidePanel:ve}}const bve=un.sidebarWidth,wS=un.sidebarCollapsed,xS=270,r4=220,kve=480,Ave=320;function Cve(e={}){const{viewportWidth:t}=s$(),n=Z(xS),i=Z(!1),s=Z(!1),o=F(()=>{const c=Ave+(fu(e.previewOpen)?Hd:0);return Math.min(kve,i$(t.value,r4,c))}),r=F(()=>_8(n.value,r4,o.value));function l(){try{i.value=uo(wS)==="true"}catch{i.value=!1}}function a(){try{Ns(wS,String(i.value))}catch{}}function u(){i.value=!i.value,a()}return{SIDEBAR_WIDTH_KEY:bve,SIDEBAR_DEFAULT:xS,SIDEBAR_MIN:r4,sidebarMax:o,sessionColWidth:n,sidebarCollapsed:i,sidebarDragging:s,sideWidth:r,loadSidebarCollapsed:l,toggleSidebarCollapse:u}}const wve=40409;function _S(e){return Ps(e)&&e.code===wve}function SS(e){return e.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(e)||e.startsWith("\\\\")}function MS(e){if(e.startsWith("\\\\"))return e;const t=/^[a-zA-Z]:/.test(e)?e.slice(0,2):"",n=[];for(const i of e.slice(t.length).split(/[\\/]+/))if(!(!i||i===".")){if(i===".."){n.pop();continue}n.push(i)}return t?`${t}/${n.join("/")}`:`/${n.join("/")}`}function xve({client:e,detailTarget:t,t:n}){const i=Z(null),s=Z(null),o=Z(!1),r=Z(null),l=Z(null);let a=0;const u=F(()=>{const v=l.value;return v?e.getFileDownloadUrl(v):null}),c=F(()=>i.value!==null&&l.value!==null);function d(v){return v.length>1?v.replace(/\/+$/,""):v}function f(v){const x=av(v,e.status.value.cwd);return x===null||x.split(/[\\/]+/).includes("..")?null:p(x)||null}function p(v){const x=[];for(const E of v.split(/[\\/]+/))if(!(!E||E===".")){if(E===".."){x.pop();continue}x.push(E)}return x.join("/")}function g(v){const x=v.trim();if(!x)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(x))return{error:n("filePreview.errors.unsupportedPath")};if(x.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const E=d(e.status.value.cwd);if(x.startsWith("/")){if(!E||x!==E&&!x.startsWith(`${E}/`))return{error:n("filePreview.errors.outsideWorkspace")};const M=x===E?"":x.slice(E.length+1);if(M.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const _=p(M);return _?{path:_}:{error:n("filePreview.errors.isDirectory")}}if(x.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const S=p(x);return S?{path:S}:{error:n("filePreview.errors.emptyPath")}}async function m(v){const x=i.value;if(t.value==="file"&&x&&x.path===v.path&&x.line===v.line&&(x.content??"")===(v.content??"")){w();return}const E=++a;if(t.value="file",s.value=null,r.value=null,o.value=!0,i.value=v,l.value=null,typeof v.content=="string"){o.value=!1,s.value={path:v.path,content:v.content,encoding:"utf-8",mime:"text/markdown",isBinary:!1,size:v.content.length};return}if(!SS(v.path)&&v.path.split(/[\\/]+/).includes("..")){const M=d(e.status.value.cwd);M&&(v={...v,path:MS(`${M}/${v.path}`)})}if(SS(v.path)){v={...v,path:MS(v.path)};const M=f(v.path);if(M!==null)v={...v,path:M};else{try{const _=await e.readHostFileContent(v.path);if(E!==a)return;l.value=null,s.value={path:v.path,content:_.content,encoding:_.encoding,mime:_.mime,isBinary:_.isBinary,size:_.size}}catch(_){if(E!==a)return;r.value=_S(_)?n("filePreview.errors.notFound"):WU(_)?n("filePreview.errors.tooLarge"):_ instanceof Error?_.message:n("filePreview.errors.loadFailed")}finally{E===a&&(o.value=!1)}return}}const S=g(v.path);if("error"in S){o.value=!1,r.value=S.error;return}l.value=S.path;try{const M=await e.readFileContent(S.path);if(E!==a)return;M?s.value={...M,path:M.path||S.path}:r.value=n("filePreview.errors.loadFailed")}catch(M){if(E!==a)return;r.value=_S(M)?n("filePreview.errors.notFound"):M instanceof Error?M.message:n("filePreview.errors.loadFailed")}finally{E===a&&(o.value=!1)}}function y(){a+=1,i.value=null,l.value=null,s.value=null,r.value=null,o.value=!1}function w(){y(),t.value==="file"&&(t.value=null)}Qe(t,(v,x)=>{x==="file"&&v!=="file"&&y()});function k(){const v=s.value?.path??i.value?.path;v&&e.openWorkspaceFile(v,i.value?.line)}function A(){const v=s.value?.path??i.value?.path;v&&e.revealWorkspaceFile(v)}return{previewTarget:i,previewFile:s,previewLoading:o,previewError:r,previewDownloadUrl:u,previewExternalActions:c,openFilePreview:m,closeFilePreview:w,openPreviewInEditor:k,revealPreviewFile:A}}function _ve({running:e,title:t="Kimi Code"}){if(Wf){I4(()=>{typeof document<"u"&&(document.title=fu(t))});return}const n=["◐","◓","◑","◒"],i=Z(0);let s=null;function o(){s===null&&(i.value=0,s=setInterval(()=>{i.value=(i.value+1)%n.length},250))}function r(){s!==null&&(clearInterval(s),s=null),i.value=0}Qe(e,a=>{a?o():r()},{immediate:!0});const l=F(()=>`${e.value?`${n[i.value]} `:""}${fu(t)}`);I4(()=>{typeof document<"u"&&(document.title=l.value)}),An(()=>{r()})}function Sve(e){if(e.startsWith("kimi-complete-"))return"turn_complete";if(e.startsWith("kimi-question-"))return"question";if(e.startsWith("kimi-approval-"))return"approval"}function Mve(e,t,n){return e==="idle"&&!t&&!n}function o$(e,t){const n=uo(e);return n===null?t:n==="1"}const a2=Z(o$(un.notifyEnabled,!0)),Gb=Z(o$(un.notifySound,!0)),Qb=Z(typeof Notification<"u"?Notification.permission:"denied"),Ive="/favicon.ico";async function Eve(e){if(!e){a2.value=!1,Ns(un.notifyEnabled,"0");return}if(typeof Notification>"u")return;let t=Notification.permission;if(t==="default")try{t=await Notification.requestPermission()}catch{}Qb.value=t,t==="granted"&&(a2.value=!0,Ns(un.notifyEnabled,"1"))}function Tve(e){Gb.value=e,Ns(un.notifySound,e?"1":"0")}function Yb(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function Lve(e,t){return{title:e("settings.notifyTitle"),body:Yb(t,e("settings.notifyFallback"))}}function Nve(e,t,n){return{title:e("settings.notifyQuestionTitle"),body:Yb(n,t,e("settings.notifyQuestionFallback"))}}function Fve(e,t,n){return{title:e("settings.notifyApprovalTitle"),body:Yb(n,t,e("settings.notifyApprovalFallback"))}}function l4(e,t,n){if(!a2.value||typeof Notification>"u")return;const i=Notification.permission;if(i!=="denied"){if(i==="default"){Notification.requestPermission().then(s=>{Qb.value=s,s==="granted"&&IS(e,t,n)});return}IS(e,t,n)}}function IS(e,t,n){if(!e.isUserWatching)try{const i=new Notification(t.title,{body:t.body,tag:n,icon:Ive,silent:!Gb.value}),s=Sve(n);s!==void 0&&void 0,i.onclick=()=>{try{window.kimiDesktop?.showWindow?.(),window.focus()}catch{}s!==void 0&&void 0,e.onClick(),i.close()}}catch{}}function Bve(e){function t(s,o){l4(o,Lve(e.t,o.sessionTitle),`kimi-complete-${s}-${o.promptId??Date.now()}`)}function n(s){l4(s,Nve(e.t,s.sessionTitle,s.questionPreview),`kimi-question-${s.questionId}`)}function i(s){l4(s,Fve(e.t,s.sessionTitle,s.toolName),`kimi-approval-${s.approvalId}`)}return{notifyEnabled:a2,notifySound:Gb,notifyPermission:Qb,setNotifyEnabled:Eve,setNotifySound:Tve,maybeNotifyCompletion:t,maybeNotifyQuestion:n,maybeNotifyApproval:i}}function $ve(e){const{api:t,uploadImage:n,sessionId:i,insertFolderPaths:s}=e,o=Z({}),r=F(()=>o.value[i()??""]??[]),l=Z(null),a=Z(null),u=Z(!1);let c=0;function d(){return`att_${++c}`}function f(H,q){o.value={...o.value,[H]:q}}function p(H){if(H.previewUrl!==void 0)try{URL.revokeObjectURL(H.previewUrl)}catch{}}function g(H){return H.startsWith("image/")?"image":H.startsWith("video/")?"video":"file"}function m(H){return H<1024*1024?"<1mb":H<10*1024*1024?"1-10mb":H<50*1024*1024?"10-50mb":"50mb+"}async function y(H,q){const X=n();if(!X)return;const ee=i()??"";if(H.length!==0)for(const ue of H){const ie=g(ue.type);m(ue.size),Math.min(H.length,100);const xe=d(),ce=ie==="file"?void 0:URL.createObjectURL(ue),pe={localId:xe,name:ue.name,kind:ie,previewUrl:ce,mediaType:ue.type||"application/octet-stream",size:ue.size,uploading:!0};f(ee,[...o.value[ee]??[],pe]),X(ue,ue.name).then(Ne=>{const te=o.value[ee]??[];f(ee,te.map(ye=>ye.localId===xe?{...ye,uploading:!1,fileId:Ne?.fileId,mediaType:Ne?.mediaType??ye.mediaType,error:Ne===null}:ye))}).catch(()=>{const Ne=o.value[ee]??[];f(ee,Ne.map(te=>te.localId===xe?{...te,uploading:!1,error:!0}:te))})}}function w(H){const q=i()??"",X=o.value[q]??[],ee=X.find(ue=>ue.localId===H);l.value?.localId===H&&(l.value=null),ee&&p(ee),f(q,X.filter(ue=>ue.localId!==H))}function k(H){l.value=H}function A(){l.value=null}function v(){a.value?.click()}function x(H){const q=H.target,X=Array.from(q.files??[]);y(X),q.value=""}function E(H){if(!n())return;const q=H.clipboardData;if(!q)return;const X=[],ee=new Set,ue=(ie,xe)=>{const ce=`${ie.size}:${ie.type}:${xe}`;if(ee.has(ce))return;ee.add(ce);const pe=ie.type.split("/")[1]??"png",Ne=xe.includes(".")?xe:`paste-${Date.now()}.${pe}`;X.push(ie instanceof File?ie:new File([ie],Ne,{type:ie.type}))};for(const ie of Array.from(q.items))if(ie.kind==="file"){const xe=ie.getAsFile();xe&&ue(xe,xe.name||`paste-${Date.now()}.${ie.type.split("/")[1]??"png"}`)}for(const ie of Array.from(q.files))ue(ie,ie.name);X.length!==0&&(H.preventDefault(),y(X))}let S=0;function M(H){!n()||!Array.from(H.dataTransfer?.items??[]).some(X=>X.kind==="file")||(H.preventDefault(),H.stopPropagation(),u.value=!0)}function _(){u.value=!1}function N(H){S=0,u.value=!1;const{files:q,folderPaths:X}=v3(H);X.length>0&&(s?.(X),H.preventDefault(),H.stopPropagation()),n()&&(H.preventDefault(),H.stopPropagation(),y(q))}function D(H){return Array.from(H.dataTransfer?.items??[]).some(q=>q.kind==="file")}function T(H){!n()||!D(H)||(H.preventDefault(),S+=1,u.value=!0)}function $(H){!n()||!D(H)||H.preventDefault()}function P(H){!n()||!D(H)||(S=Math.max(0,S-1),S===0&&(u.value=!1))}function O(H){S=0,u.value=!1;const{files:q,folderPaths:X}=v3(H);X.length>0&&(s?.(X),H.preventDefault()),n()&&(H.preventDefault(),y(q))}function R(){const H=i()??"";for(const q of o.value[H]??[])p(q);f(H,[])}function W(){l.value=null,R()}function z(H,q,X){const ee=o.value[H]??[];ee.some(ue=>ue.localId===q)&&f(H,ee.map(ue=>ue.localId===q?{...ue,...X}:ue))}function G(H){return fetch(H).then(q=>{if(!q.ok)throw new Error(`fetch failed: ${q.status}`);return q.blob()})}function K(H,q,X){const ee=q??i()??"";if(X?.append!==!0){for(const ue of o.value[ee]??[])p(ue);f(ee,[])}for(const ue of H){const ie=d(),xe=/^data:/i.test(ue.url),ce=/^blob:/i.test(ue.url),pe=ue.name??ue.kind;if(ue.fileId){const Ne={localId:ie,name:pe,kind:ue.kind,previewUrl:ue.kind==="file"?void 0:ue.url,uploading:!1,fileId:ue.fileId};f(ee,[...o.value[ee]??[],Ne]),ue.kind==="image"&&!xe&&!ce&&t.getFileBlob(ue.fileId).then(te=>{const ye=URL.createObjectURL(te);if(!(o.value[ee]??[]).some(Y=>Y.localId===ie)){URL.revokeObjectURL(ye);return}z(ee,ie,{previewUrl:ye})}).catch(()=>{})}else{if(!ue.url)continue;const Ne=n();if(!Ne)continue;const te={localId:ie,name:pe,kind:ue.kind,previewUrl:ue.url,uploading:!0};f(ee,[...o.value[ee]??[],te]),G(ue.url).then(ye=>{const j=pe.includes(".")?pe:`${pe}.${ye.type.split("/")[1]??"bin"}`;return Ne(ye,j)}).then(ye=>{if(ye===null){const j=o.value[ee]??[];f(ee,j.filter(Y=>Y.localId!==ie));return}z(ee,ie,{uploading:!1,fileId:ye.fileId})}).catch(()=>{const ye=o.value[ee]??[];f(ee,ye.filter(j=>j.localId!==ie))})}}}return Qe(i,()=>{l.value=null}),pn(()=>{document.addEventListener("paste",E),document.addEventListener("dragenter",T),document.addEventListener("dragover",$),document.addEventListener("dragleave",P),document.addEventListener("drop",O)}),An(()=>{document.removeEventListener("paste",E),document.removeEventListener("dragenter",T),document.removeEventListener("dragover",$),document.removeEventListener("dragleave",P),document.removeEventListener("drop",O);for(const H of Object.values(o.value))for(const q of H)p(q);l.value=null}),{attachments:r,previewAttachment:l,fileInputRef:a,isDragOver:u,removeAttachment:w,openAttachmentPreview:k,closeAttachmentPreview:A,openFilePicker:v,handleFileInputChange:x,handleDragOver:M,handleDragLeave:_,handleDrop:N,clearAfterSubmit:R,clearAttachments:W,loadAttachments:K}}const Dve=3;function r$(e){const t=Z("starting"),n=Z(!1),i=Z(null),s=Z(0);let o=null,r=null,l=null,a=0,u=!1,c=!1;function d(){o&&(clearTimeout(o),o=null),r&&(clearInterval(r),r=null),l&&(clearTimeout(l),l=null)}function f(w){d(),t.value="success",l=setTimeout(()=>{l=null,e.onSuccess?.()},w)}function p(){r&&clearInterval(r),r=setInterval(()=>{s.value>0?s.value--:(r&&clearInterval(r),r=null)},1e3)}function g(w){o&&clearTimeout(o),o=setTimeout(async()=>{const k=await e.onPollOAuthLogin();if(!c&&!u){if(k===null){if(a+=1,a>=Dve){d(),n.value=!0,t.value="error";return}g(w);return}a=0,k.status==="authenticated"?f(1200):k.status==="expired"||k.status==="cancelled"?(d(),t.value="expired",k.status,void 0):g(w)}},w*1e3)}async function m(){d(),i.value=null,n.value=!1,a=0,u=!1,t.value="starting";const w=await e.onStartOAuthLogin();if(c){w!==null&&w.status!=="authenticated"&&e.onCancelOAuthLogin();return}if(!w){t.value="error";return}if(w.status==="authenticated"){f(800);return}i.value={flowId:w.flowId,verificationUri:w.verificationUri,verificationUriComplete:w.verificationUriComplete,userCode:w.userCode,expiresIn:w.expiresIn,interval:w.interval},s.value=w.expiresIn,t.value="device-code",p(),g(w.interval)}function y(){t.value!=="success"&&(d(),t.value==="device-code"&&!u&&(u=!0,e.onCancelOAuthLogin()))}return P2()&&Rf(()=>{c=!0,y()}),{step:t,pollError:n,flow:i,secondsLeft:s,startFlow:m,cancelFlow:y}}const Rve={state:"idle"};function zve(e){const t=Z(Rve),n=Z(uo(un.updateSkippedVersion)),i=Z(!1);if(typeof e?.getUpdateAutoDownload=="function"&&e.getUpdateAutoDownload().then(o=>{i.value=o}).catch(()=>{}),e!==void 0){let o=!1;e.onUpdateStatus(r=>{o=!0,t.value=r}),e.getUpdateStatus().then(r=>{o||(t.value=r)}).catch(()=>{})}const s=F(()=>{const o=t.value;return!(o.state==="idle"||o.state==="available"&&o.version!==void 0&&o.version===n.value)});return{status:t,visible:s,canCheck:typeof e?.checkForUpdates=="function",autoDownload:i,canToggleAutoDownload:typeof e?.getUpdateAutoDownload=="function"&&typeof e?.setUpdateAutoDownload=="function",setAutoDownload:(o,r)=>{i.value=o,typeof e?.setUpdateAutoDownload=="function"&&e.setUpdateAutoDownload(o).then(()=>{}).catch(()=>{})},skipVersion:()=>{const o=t.value.version;t.value.state==="available"&&o!==void 0&&(n.value=o,Ns(un.updateSkippedVersion,o))},check:async()=>{if(typeof e?.checkForUpdates!="function")return Promise.resolve({outcome:"unsupported"});const o=await e.checkForUpdates().catch(()=>({outcome:"error",message:"bridge call failed"}));return o.outcome==="available"&&o.version!==void 0&&o.version===n.value&&(n.value=null,lr(un.updateSkippedVersion)),o},download:()=>{e?.downloadUpdate().catch(()=>{})},install:()=>{e?.installUpdate().catch(()=>{})}}}let a4=null;function l$(){return a4===null&&(a4=zve(window.kimiDesktop)),a4}class Ove{transcript;sessionId;agentId;fetchPage;pageSize;onChange;onGap;refreshPromise=null;buffered=[];agents_=[];seq_;loadingOlder_=!1;loadOlderError_=!1;refreshError_=!1;constructor(t){this.sessionId=t.sessionId,this.agentId=t.agentId,this.transcript=new FK(t.agentId),this.fetchPage=t.fetchPage,this.pageSize=t.pageSize??20,this.onChange=t.onChange,this.onGap=t.onGap}get snapshot(){return this.transcript.snapshot()}get seq(){return this.seq_}get agents(){return this.agents_}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlder_}get loadOlderError(){return this.loadOlderError_}get refreshError(){return this.refreshError_}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshError_=!1;const t=this.fetchPage({pageSize:this.pageSize}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshError_=!0,n}).finally(()=>{this.refreshPromise=null;const n=this.buffered;this.buffered=[];for(const i of n)this.applyOps(i.ops,i.seq);this.onChange?.()});return this.refreshPromise=t,this.onChange?.(),t}receiveReset(t,n){this.transcript.receive([{op:"reset",agentId:this.agentId,snapshot:t}]),n!==void 0&&(this.seq_=n),this.refreshError_=!1,this.onChange?.()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlder_)return this.buffered.push({ops:t,...n!==void 0?{seq:n}:{}}),!1;if(n!==void 0&&this.seq_!==void 0){if(n<=this.seq_)return!0;if(n!==this.seq_+1)return this.onGap?.(),!1}const i=this.transcript.apply(t);return n!==void 0&&(this.seq_=n),i.gap!==void 0&&this.onGap?.(),i.accepted.length>0&&this.onChange?.(),i.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlder_)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlder_=!0,this.loadOlderError_=!1,this.onChange?.();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:this.pageSize});this.applyPage(n,!1)}catch(n){throw this.loadOlderError_=!0,n}finally{this.loadingOlder_=!1;const n=this.buffered;this.buffered=[];for(const i of n)this.applyOps(i.ops,i.seq);this.onChange?.()}}}applyPage(t,n){this.agents_=t.agents;const i=this.snapshot,s=n?t:{...t,items:Pve(t.items,i.items),hasMoreOlder:t.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}}function Pve(e,t){const n=new Set,i=[];for(const s of[...e,...t]){const o=s.kind==="turn"?s.turnId:s.kind==="marker"?s.markerId:s.refId;n.has(o)||(n.add(o),i.push(s))}return i}function jve(e){const t=KM(new Map),n=new Map,i=new Map,s=new Set;let o=null,r=null;function l(){o!==null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(o),o=null),r!==null&&(clearTimeout(r),r=null);for(const A of s)A.version.value+=1;s.clear()}function a(A){s.add(A),!(o!==null||r!==null)&&(typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(l)),r=setTimeout(l,50))}function u(A,v){return`${A}\0${v}`}function c(A,v,x){const E=e.getEventConnection();E!==null&&(E.subscribeTranscript(A,v,x),i.set(A,v))}function d(A,v){const x=u(A,v),E=t.get(x);if(E!==void 0)return E;const S={channel:new Ove({sessionId:A,agentId:v,fetchPage:M=>e.api.getSessionTranscript(A,{...M,agentId:v}),onChange:()=>{a(S)},onGap:()=>{f(S)}}),version:Z(0),baselineLoaded:!1,resumePromise:null};return t.set(x,S),S}async function f(A){if(A.resumePromise!==null)return A.resumePromise;const v=p(A).finally(()=>{A.resumePromise===v&&(A.resumePromise=null)});return A.resumePromise=v,v}async function p(A){try{await A.channel.refresh(),A.baselineLoaded=!0,n.get(A.channel.sessionId)===A.channel.agentId&&c(A.channel.sessionId,A.channel.agentId,A.channel.seq)}catch{n.get(A.channel.sessionId)===A.channel.agentId&&c(A.channel.sessionId,A.channel.agentId)}}function g(A,v){e.connectEventsIfNeeded(),n.set(A,v);const x=d(A,v);return x.baselineLoaded?c(A,v,x.channel.seq):f(x),x}function m(A,v){if(n.get(A)!==v)return;n.delete(A);const x=i.get(A);x!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(A,[x]),i.delete(A))}function y(A,v,x,E){if(n.get(A)!==v)return;const S=d(A,v);S.channel.receiveReset(x,E),S.baselineLoaded=!0}function w(A,v,x,E){return n.get(A)!==v?!0:d(A,v).channel.applyOps(x,E)}function k(A){n.delete(A),i.delete(A)&&e.getEventConnection()?.unsubscribeTranscript(A);for(const[v,x]of t)x.channel.sessionId===A&&(t.delete(v),s.delete(x))}return{getEntry:(A,v)=>t.get(u(A,v)),activate:g,deactivate:m,receiveReset:y,applyOps:w,forgetSession:k}}const Hve=["data-state"],Wve=["aria-label"],qve={class:"upd-pill-text"},Uve={key:0,class:"upd-meta"},Kve={key:1,class:"upd-notes"},Vve={class:"upd-notes-title"},Zve={key:2,class:"upd-progress"},Gve={key:3,class:"upd-message"},Qve={class:"upd-foot"},Yve={class:"upd-foot-actions"},Jve=tt({__name:"UpdateIndicator",setup(e){const{t,locale:n}=Bt(),{status:i,visible:s,skipVersion:o,download:r,install:l,autoDownload:a,setAutoDownload:u,canToggleAutoDownload:c}=l$(),d=Z(!1),f="0.36.0".trim()?"0.36.0":"",p=F(()=>{switch(i.value.state){case"available":return t("sidebar.update");case"downloading":return`${i.value.percent??0}%`;case"downloaded":return t("sidebar.updateDone");case"error":return t("sidebar.updateFailed");default:return""}}),g=F(()=>{switch(i.value.state){case"available":return t("sidebar.updateAvailable",{version:i.value.version??""});case"downloading":return t("sidebar.updateDownloading",{percent:i.value.percent??0});case"downloaded":return t("sidebar.updateReady",{version:i.value.version??""});case"error":return t("sidebar.updateFailed");default:return""}}),m=F(()=>{const S=i.value.releaseDate;if(S===void 0||S==="")return"";const M=new Date(S),_=Number.isNaN(M.getTime())?S:M.toLocaleDateString();return t("sidebar.updateReleaseDate",{date:_})}),y=F(()=>{const S=[];return m.value!==""&&S.push(m.value),f!==""&&S.push(t("sidebar.updateCurrentVersion",{version:f})),S.join(" · ")}),w=F(()=>i.value.percent??0),k=F(()=>{const S=i.value.releaseNotes;return S===void 0?"":((n.value.toLowerCase().startsWith("zh")?S.zh:S.en)??S.zh??S.en??"").trim()}),A=F(()=>{switch(i.value.state){case"error":return"alert-triangle";default:return"download"}});function v(){r()}function x(){o(),d.value=!1}function E(){l(),d.value=!1}return(S,M)=>h(s)?(b(),I("span",{key:0,class:"upd","data-state":h(i).state},[C("button",{class:"upd-pill",type:"button","aria-label":p.value,onClick:M[0]||(M[0]=_=>d.value=!0)},[V(h(Ce),{class:"upd-pill-icon",name:A.value,size:"sm"},null,8,["name"]),C("span",qve,B(p.value),1)],8,Wve),V(h(La),{open:d.value,title:g.value,size:"lg","onUpdate:open":M[4]||(M[4]=_=>d.value=_)},{foot:he(()=>[C("div",Qve,[C("div",Yve,[h(i).state==="available"?(b(),I(Be,{key:0},[V(h(jt),{variant:"ghost",onClick:x},{default:he(()=>[Ue(B(h(t)("sidebar.updateSkip")),1)]),_:1}),V(h(jt),{onClick:v},{default:he(()=>[Ue(B(h(t)("sidebar.updateDownloadNow")),1)]),_:1})],64)):h(i).state==="downloading"?(b(),fe(h(jt),{key:1,variant:"secondary",onClick:M[1]||(M[1]=_=>d.value=!1)},{default:he(()=>[Ue(B(h(t)("sidebar.updateBackground")),1)]),_:1})):h(i).state==="downloaded"?(b(),I(Be,{key:2},[V(h(jt),{variant:"ghost",onClick:M[2]||(M[2]=_=>d.value=!1)},{default:he(()=>[Ue(B(h(t)("sidebar.updateRestartLater")),1)]),_:1}),V(h(jt),{onClick:E},{default:he(()=>[Ue(B(h(t)("sidebar.updateRestartNow")),1)]),_:1})],64)):h(i).state==="error"?(b(),fe(h(jt),{key:3,variant:"danger-soft",onClick:v},{default:he(()=>[Ue(B(h(t)("sidebar.updateRetry")),1)]),_:1})):ne("",!0)]),h(c)?(b(),fe(h($q),{key:0,class:"upd-auto","model-value":h(a),"onUpdate:modelValue":M[3]||(M[3]=_=>h(u)(_,"update_prompt"))},{default:he(()=>[Ue(B(h(t)("sidebar.updateAutoDownload")),1)]),_:1},8,["model-value"])):ne("",!0)])]),default:he(()=>[(h(i).state==="available"||h(i).state==="downloaded")&&y.value?(b(),I("p",Uve,B(y.value),1)):ne("",!0),k.value?(b(),I("section",Kve,[C("h4",Vve,B(h(t)("sidebar.updateWhatsNew")),1),V(h(Kl),{text:k.value},null,8,["text"])])):ne("",!0),h(i).state==="downloading"?(b(),I("div",Zve,[C("div",{class:"upd-progress-fill",style:Vt({width:`${w.value}%`})},null,4)])):ne("",!0),h(i).state==="error"&&h(i).message?(b(),I("p",Gve,B(h(i).message),1)):ne("",!0)]),_:1},8,["open","title"])],8,Hve)):ne("",!0)}}),Xve=vt(Jve,[["__scopeId","data-v-2b5c23f7"]]),u2=[{code:"en",label:"English"},{code:"zh",label:"简体中文"}],jn=nq({locale:NE()});function Jb(e){jn.global.locale.value=e,Ns(un.locale,e)}const e9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function t9e(e,t){return b(),I("svg",e9e,[...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 n9e=wt({name:"kimi-add",render:t9e}),i9e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function s9e(e,t){return b(),I("svg",i9e,[...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 o9e=wt({name:"kimi-add-conversation",render:s9e}),r9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function l9e(e,t){return b(),I("svg",r9e,[...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 a9e=wt({name:"kimi-archive",render:l9e}),u9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function c9e(e,t){return b(),I("svg",u9e,[...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 d9e=wt({name:"kimi-arrow-down",render:c9e}),f9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function h9e(e,t){return b(),I("svg",f9e,[...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 p9e=wt({name:"kimi-arrow-left",render:h9e}),g9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function m9e(e,t){return b(),I("svg",g9e,[...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 v9e=wt({name:"kimi-arrow-right",render:m9e}),y9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function b9e(e,t){return b(),I("svg",y9e,[...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 k9e=wt({name:"kimi-arrow-up",render:b9e}),A9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function C9e(e,t){return b(),I("svg",A9e,[...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 w9e=wt({name:"kimi-check",render:C9e}),x9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _9e(e,t){return b(),I("svg",x9e,[...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 S9e=wt({name:"kimi-chevron-down",render:_9e}),M9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function I9e(e,t){return b(),I("svg",M9e,[...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 E9e=wt({name:"kimi-chevron-right",render:I9e}),T9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function L9e(e,t){return b(),I("svg",T9e,[...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 N9e=wt({name:"kimi-chevron-up",render:L9e}),F9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function B9e(e,t){return b(),I("svg",F9e,[...t[0]||(t[0]=[C("circle",{cx:"12",cy:"12",r:"10.875",stroke:"currentColor","stroke-width":"2.25"},null,-1),C("path",{d:"M7.125 12.6L10.65 16.125L17.025 8.85",stroke:"currentColor","stroke-width":"2.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const $9e=wt({name:"kimi-circle-check",render:B9e}),D9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function R9e(e,t){return b(),I("svg",D9e,[...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 z9e=wt({name:"kimi-clock",render:R9e}),O9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P9e(e,t){return b(),I("svg",O9e,[...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 j9e=wt({name:"kimi-close",render:P9e}),H9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function W9e(e,t){return b(),I("svg",H9e,[...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 q9e=wt({name:"kimi-collapse",render:W9e}),U9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function K9e(e,t){return b(),I("svg",U9e,[...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 V9e=wt({name:"kimi-comment",render:K9e}),Z9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function G9e(e,t){return b(),I("svg",Z9e,[...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 Q9e=wt({name:"kimi-copy",render:G9e}),Y9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function J9e(e,t){return b(),I("svg",Y9e,[...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 X9e=wt({name:"kimi-dark-mode",render:J9e}),eye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tye(e,t){return b(),I("svg",eye,[...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 nye=wt({name:"kimi-download",render:tye}),iye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function sye(e,t){return b(),I("svg",iye,[...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 oye=wt({name:"kimi-edit",render:sye}),rye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lye(e,t){return b(),I("svg",rye,[...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 aye=wt({name:"kimi-expand",render:lye}),uye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function cye(e,t){return b(),I("svg",uye,[...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 ES=wt({name:"kimi-file",render:cye}),dye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fye(e,t){return b(),I("svg",dye,[...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 hye=wt({name:"kimi-file-text",render:fye}),pye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function gye(e,t){return b(),I("svg",pye,[...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 mye=wt({name:"kimi-folder",render:gye}),vye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yye(e,t){return b(),I("svg",vye,[...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 bye=wt({name:"kimi-folder-open",render:yye}),kye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Aye(e,t){return b(),I("svg",kye,[...t[0]||(t[0]=[C("path",{d:"M9.5 3Q10.8 8.2 16 9.5Q10.8 10.8 9.5 16Q8.2 10.8 3 9.5Q8.2 8.2 9.5 3Z",fill:"currentColor"},null,-1),C("path",{d:"M17.25 13.5Q18 16.5 21 17.25Q18 18 17.25 21Q16.5 18 13.5 17.25Q16.5 16.5 17.25 13.5Z",fill:"currentColor"},null,-1)])])}const Cye=wt({name:"kimi-gen-title",render:Aye}),wye={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function xye(e,t){return b(),I("svg",wye,[...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 _ye=wt({name:"kimi-folder-plus",render:xye}),Sye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Mye(e,t){return b(),I("svg",Sye,[...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 Iye=wt({name:"kimi-follow-system",render:Mye}),Eye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tye(e,t){return b(),I("svg",Eye,[...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 Lye=wt({name:"kimi-full-access",render:Tye}),Nye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fye(e,t){return b(),I("svg",Nye,[...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 Bye=wt({name:"kimi-globe",render:Fye}),$ye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dye(e,t){return b(),I("svg",$ye,[...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 Rye=wt({name:"kimi-grip",render:Dye}),zye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Oye(e,t){return b(),I("svg",zye,[...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 Pye=wt({name:"kimi-hand",render:Oye}),jye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Hye(e,t){return b(),I("svg",jye,[...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 Wye=wt({name:"kimi-histogram",render:Hye}),qye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Uye(e,t){return b(),I("svg",qye,[...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 Kye=wt({name:"kimi-image",render:Uye}),Vye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zye(e,t){return b(),I("svg",Vye,[...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 Gye=wt({name:"kimi-image-failed",render:Zye}),Qye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Yye(e,t){return b(),I("svg",Qye,[...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 Jye=wt({name:"kimi-info",render:Yye}),Xye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e4e(e,t){return b(),I("svg",Xye,[...t[0]||(t[0]=[Lu('<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.09998C6.53222 2.09998 2.09998 6.53222 2.09998 12C2.09998 17.4677 6.53222 21.9 12 21.9C17.4677 21.9 21.9 17.4677 21.9 12C21.9 6.53222 17.4677 2.09998 12 2.09998ZM3.89998 12C3.89998 7.52633 7.52633 3.89998 12 3.89998C16.4736 3.89998 20.1 7.52633 20.1 12C20.1 16.4736 16.4736 20.1 12 20.1C7.52633 20.1 3.89998 16.4736 3.89998 12Z" fill="currentColor"></path><path d="M9.4286 9.47153C9.4286 8.97448 9.83154 8.57153 10.3286 8.57153H11.1C11.5971 8.57153 12 8.97448 12 9.47153C12 9.96859 11.5971 10.3715 11.1 10.3715H10.3286C9.83154 10.3715 9.4286 9.96859 9.4286 9.47153Z" fill="currentColor"></path><path d="M5.14289 9.47155C5.14289 8.97449 5.54583 8.57155 6.04289 8.57155H7.67146C8.16851 8.57155 8.57146 8.97449 8.57146 9.47155C8.57146 9.9686 8.16851 10.3715 7.67146 10.3715H6.04289C5.54583 10.3715 5.14289 9.9686 5.14289 9.47155Z" fill="currentColor"></path><path d="M8.57146 16.3287C8.57146 15.8316 8.9744 15.4287 9.47145 15.4287H14.5286C15.0257 15.4287 15.4286 15.8316 15.4286 16.3287C15.4286 16.8257 15.0257 17.2287 14.5286 17.2287H9.47145C8.9744 17.2287 8.57146 16.8257 8.57146 16.3287Z" fill="currentColor"></path><path d="M6.04288 12.0001C5.54583 12.0001 5.14288 12.403 5.14288 12.9001C5.14288 13.3972 5.54583 13.8001 6.04288 13.8001H6.81431C7.31137 13.8001 7.71431 13.3972 7.71431 12.9001C7.71431 12.403 7.31137 12.0001 6.81431 12.0001H6.04288Z" fill="currentColor"></path><path d="M9.47145 12.0001C8.9744 12.0001 8.57146 12.403 8.57146 12.9001C8.57146 13.3972 8.9744 13.8001 9.47146 13.8001H10.2429C10.7399 13.8001 11.1429 13.3972 11.1429 12.9001C11.1429 12.403 10.7399 12.0001 10.2429 12.0001H9.47145Z" fill="currentColor"></path><path d="M12.8572 9.47153C12.8572 8.97448 13.2601 8.57153 13.7572 8.57153H14.5286C15.0257 8.57153 15.4286 8.97448 15.4286 9.47153C15.4286 9.96859 15.0257 10.3715 14.5286 10.3715H13.7572C13.2601 10.3715 12.8572 9.96859 12.8572 9.47153Z" fill="currentColor"></path><path d="M12.9 12.0001C12.403 12.0001 12 12.403 12 12.9001C12 13.3972 12.403 13.8001 12.9 13.8001H13.6715C14.1685 13.8001 14.5715 13.3972 14.5715 12.9001C14.5715 12.403 14.1685 12.0001 13.6715 12.0001H12.9Z" fill="currentColor"></path><path d="M16.2857 9.47153C16.2857 8.97448 16.6887 8.57153 17.1857 8.57153H17.9572C18.4542 8.57153 18.8572 8.97448 18.8572 9.47153C18.8572 9.96859 18.4542 10.3715 17.9572 10.3715H17.1857C16.6887 10.3715 16.2857 9.96859 16.2857 9.47153Z" fill="currentColor"></path><path d="M16.3286 12.0001C15.8315 12.0001 15.4286 12.403 15.4286 12.9001C15.4286 13.3972 15.8315 13.8001 16.3286 13.8001H17.9572C18.4542 13.8001 18.8572 13.3972 18.8572 12.9001C18.8572 12.403 18.4542 12.0001 17.9572 12.0001H16.3286Z" fill="currentColor"></path>',10)])])}const t4e=wt({name:"kimi-keyboard",render:e4e}),n4e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function i4e(e,t){return b(),I("svg",n4e,[...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 s4e=wt({name:"kimi-left-panel",render:i4e}),o4e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function r4e(e,t){return b(),I("svg",o4e,[...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 l4e=wt({name:"kimi-left-panel-expand",render:r4e}),a4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function u4e(e,t){return b(),I("svg",a4e,[...t[0]||(t[0]=[Lu('<g><path d="M12.9 1.7999C12.9 1.30285 12.4971 0.899902 12 0.899902C11.5029 0.899902 11.1 1.30285 11.1 1.7999V2.7999C11.1 3.29696 11.5029 3.6999 12 3.6999C12.4971 3.6999 12.9 3.29696 12.9 2.7999V1.7999Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.1 11.9999C6.1 8.7414 8.74152 6.09988 12 6.09988C15.2585 6.09988 17.9 8.7414 17.9 11.9999C17.9 15.2584 15.2585 17.8999 12 17.8999C8.74152 17.8999 6.1 15.2584 6.1 11.9999ZM12 7.89988C9.73563 7.89988 7.9 9.73551 7.9 11.9999C7.9 14.2642 9.73563 16.0999 12 16.0999C14.2644 16.0999 16.1 14.2642 16.1 11.9999C16.1 9.73551 14.2644 7.89988 12 7.89988Z" fill="currentColor"></path><path d="M0.899994 11.9999C0.899994 11.5028 1.30294 11.0999 1.79999 11.0999H2.79999C3.29705 11.0999 3.69999 11.5028 3.69999 11.9999C3.69999 12.4969 3.29705 12.8999 2.79999 12.8999H1.79999C1.30294 12.8999 0.899994 12.4969 0.899994 11.9999Z" fill="currentColor"></path><path d="M12 20.2991C12.4971 20.2991 12.9 20.702 12.9 21.1991V22.1991C12.9 22.6961 12.4971 23.0991 12 23.0991C11.5029 23.0991 11.1 22.6961 11.1 22.1991V21.1991C11.1 20.702 11.5029 20.2991 12 20.2991Z" fill="currentColor"></path><path d="M21.2016 11.0999C20.7045 11.0999 20.3016 11.5028 20.3016 11.9999C20.3016 12.4969 20.7045 12.8999 21.2016 12.8999H22.2016C22.6986 12.8999 23.1016 12.4969 23.1016 11.9999C23.1016 11.5028 22.6986 11.0999 22.2016 11.0999H21.2016Z" fill="currentColor"></path><path d="M20.1995 3.79903C20.551 4.1505 20.551 4.72035 20.1995 5.07182L19.4924 5.77893C19.141 6.1304 18.5711 6.1304 18.2196 5.77893C17.8682 5.42746 17.8682 4.85761 18.2196 4.50614L18.9268 3.79903C19.2782 3.44756 19.8481 3.44756 20.1995 3.79903Z" fill="currentColor"></path><path d="M19.4942 18.2215C19.1427 17.87 18.5729 17.87 18.2214 18.2215C17.87 18.573 17.87 19.1428 18.2214 19.4943L18.9285 20.2014C19.28 20.5529 19.8498 20.5529 20.2013 20.2014C20.5528 19.8499 20.5528 19.2801 20.2013 18.9286L19.4942 18.2215Z" fill="currentColor"></path><path d="M5.78079 18.2213C6.13227 18.5727 6.13227 19.1426 5.78079 19.4941L5.07369 20.2012C4.72222 20.5526 4.15237 20.5526 3.8009 20.2012C3.44942 19.8497 3.44942 19.2798 3.8009 18.9284L4.508 18.2213C4.85947 17.8698 5.42932 17.8698 5.78079 18.2213Z" fill="currentColor"></path><path d="M5.07077 3.79912C4.7193 3.44764 4.14945 3.44764 3.79798 3.79912C3.4465 4.15059 3.4465 4.72044 3.79798 5.07191L4.50508 5.77901C4.85655 6.13049 5.4264 6.13049 5.77787 5.77902C6.12935 5.42754 6.12935 4.85769 5.77787 4.50622L5.07077 3.79912Z" fill="currentColor"></path></g>',1)])])}const c4e=wt({name:"kimi-light-mode",render:u4e}),d4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function f4e(e,t){return b(),I("svg",d4e,[...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 h4e=wt({name:"kimi-link",render:f4e}),p4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g4e(e,t){return b(),I("svg",p4e,[...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 m4e=wt({name:"kimi-list",render:g4e}),v4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y4e(e,t){return b(),I("svg",v4e,[...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 b4e=wt({name:"kimi-mail",render:y4e}),k4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A4e(e,t){return b(),I("svg",k4e,[...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 C4e=wt({name:"kimi-minus",render:A4e}),w4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function x4e(e,t){return b(),I("svg",w4e,[...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 _4e=wt({name:"kimi-microscope",render:x4e}),S4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function M4e(e,t){return b(),I("svg",S4e,[...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 I4e=wt({name:"kimi-more",render:M4e}),E4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T4e(e,t){return b(),I("svg",E4e,[...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 L4e=wt({name:"kimi-music",render:T4e}),N4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F4e(e,t){return b(),I("svg",N4e,[...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 B4e=wt({name:"kimi-pause",render:F4e}),$4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D4e(e,t){return b(),I("svg",$4e,[...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 R4e=wt({name:"kimi-pencil",render:D4e}),z4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O4e(e,t){return b(),I("svg",z4e,[...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 P4e=wt({name:"kimi-play",render:O4e}),j4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H4e(e,t){return b(),I("svg",j4e,[...t[0]||(t[0]=[C("path",{d:"M18.36 6.64a9 9 0 1 1-12.73 0",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{d:"M12 2v10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const W4e=wt({name:"kimi-power",render:H4e}),q4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U4e(e,t){return b(),I("svg",q4e,[...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 K4e=wt({name:"kimi-question",render:U4e}),V4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Z4e(e,t){return b(),I("svg",V4e,[...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 G4e=wt({name:"kimi-robot",render:Z4e}),Q4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Y4e(e,t){return b(),I("svg",Q4e,[...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 J4e=wt({name:"kimi-search",render:Y4e}),X4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e3e(e,t){return b(),I("svg",X4e,[...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 t3e=wt({name:"kimi-send",render:e3e}),n3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function i3e(e,t){return b(),I("svg",n3e,[...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 s3e=wt({name:"kimi-setting",render:i3e}),o3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function r3e(e,t){return b(),I("svg",o3e,[...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 l3e=wt({name:"kimi-shield-question",render:r3e}),a3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function u3e(e,t){return b(),I("svg",a3e,[...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 c3e=wt({name:"kimi-sign-in",render:u3e}),d3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function f3e(e,t){return b(),I("svg",d3e,[...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 h3e=wt({name:"kimi-sign-out",render:f3e}),p3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g3e(e,t){return b(),I("svg",p3e,[...t[0]||(t[0]=[Lu('<path d="M4 6H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M18.0 6H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="16" cy="6" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle><path d="M4 12H6.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M10.5 12H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="8.5" cy="12" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle><path d="M4 18H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M18.0 18H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="16" cy="18" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle>',9)])])}const m3e=wt({name:"kimi-sliders",render:g3e}),v3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y3e(e,t){return b(),I("svg",v3e,[...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 b3e=wt({name:"kimi-stop",render:y3e}),k3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A3e(e,t){return b(),I("svg",k3e,[...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 C3e=wt({name:"kimi-target",render:A3e}),w3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function x3e(e,t){return b(),I("svg",w3e,[...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 _3e=wt({name:"kimi-task",render:x3e}),S3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function M3e(e,t){return b(),I("svg",S3e,[...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 I3e=wt({name:"kimi-terminal",render:M3e}),E3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T3e(e,t){return b(),I("svg",E3e,[...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 L3e=wt({name:"kimi-thinking",render:T3e}),N3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F3e(e,t){return b(),I("svg",N3e,[...t[0]||(t[0]=[Lu('<path d="M9.28994 4.92561C9.6436 4.57634 9.64716 4.0065 9.29789 3.65284C8.94862 3.29918 8.37878 3.29563 8.02512 3.6449L5.91339 5.73041L5.16642 4.95888C4.82067 4.60177 4.2509 4.59256 3.89379 4.9383C3.53668 5.28404 3.52747 5.85382 3.87321 6.21093L5.25245 7.63551C5.41956 7.80811 5.64874 7.90674 5.88897 7.90943C6.1292 7.91213 6.36053 7.81866 6.53146 7.64985L9.28994 4.92561Z" fill="currentColor"></path><path d="M12 5.10022C11.503 5.10022 11.1 5.50316 11.1 6.00022C11.1 6.49728 11.503 6.90022 12 6.90022L19.9965 6.90022C20.4935 6.90022 20.8965 6.49728 20.8965 6.00022C20.8965 5.50316 20.4935 5.10022 19.9965 5.10022L12 5.10022Z" fill="currentColor"></path><path d="M12 11.1002C11.503 11.1002 11.1 11.5032 11.1 12.0002C11.1 12.4973 11.503 12.9002 12 12.9002H19.9965C20.4935 12.9002 20.8965 12.4973 20.8965 12.0002C20.8965 11.5032 20.4935 11.1002 19.9965 11.1002L12 11.1002Z" fill="currentColor"></path><path d="M11.1 18.0002C11.1 17.5032 11.503 17.1002 12 17.1002L19.9965 17.1002C20.4935 17.1002 20.8965 17.5032 20.8965 18.0002C20.8965 18.4973 20.4935 18.9002 19.9965 18.9002H12C11.503 18.9002 11.1 18.4973 11.1 18.0002Z" fill="currentColor"></path><path d="M9.29789 9.77064C9.64716 10.1243 9.6436 10.6941 9.28994 11.0434L6.53146 13.7676C6.36053 13.9365 6.1292 14.0299 5.88897 14.0272C5.64874 14.0245 5.41956 13.9259 5.25245 13.7533L3.87321 12.3287C3.52747 11.9716 3.53668 11.4018 3.89379 11.0561C4.2509 10.7104 4.82067 10.7196 5.16642 11.0767L5.91339 11.8482L8.02512 9.76269C8.37878 9.41342 8.94862 9.41698 9.29789 9.77064Z" fill="currentColor"></path><path d="M9.29789 15.7436C9.64716 16.0973 9.6436 16.6671 9.28994 17.0164L6.53146 19.7406C6.36053 19.9094 6.1292 20.0029 5.88897 20.0002C5.64874 19.9975 5.41956 19.8989 5.25245 19.7263L3.87321 18.3017C3.52747 17.9446 3.53668 17.3748 3.89379 17.0291C4.2509 16.6833 4.82067 16.6926 5.16642 17.0497L5.91339 17.8212L8.02512 15.7357C8.37878 15.3864 8.94862 15.39 9.29789 15.7436Z" fill="currentColor"></path>',6)])])}const B3e=wt({name:"kimi-todo",render:F3e}),$3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D3e(e,t){return b(),I("svg",$3e,[...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 R3e=wt({name:"kimi-translate",render:D3e}),z3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O3e(e,t){return b(),I("svg",z3e,[...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 P3e=wt({name:"kimi-trash",render:O3e}),j3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H3e(e,t){return b(),I("svg",j3e,[...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 W3e=wt({name:"kimi-undo",render:H3e}),q3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U3e(e,t){return b(),I("svg",q3e,[...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 K3e=wt({name:"kimi-user",render:U3e}),V3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Z3e(e,t){return b(),I("svg",V3e,[...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 G3e=wt({name:"kimi-warning",render:Z3e}),Q3e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Y3e(e,t){return b(),I("svg",Q3e,[...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 J3e=wt({name:"tabler-layout-sidebar-right-collapse",render:Y3e}),X3e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function e8e(e,t){return b(),I("svg",X3e,[...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 t8e=wt({name:"tabler-paperclip",render:e8e}),n8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function i8e(e,t){return b(),I("svg",n8e,[...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 s8e=wt({name:"ri-braces-line",render:i8e}),o8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function r8e(e,t){return b(),I("svg",o8e,[...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 l8e=wt({name:"ri-calendar-close-line",render:r8e}),a8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function u8e(e,t){return b(),I("svg",a8e,[...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 c8e=wt({name:"ri-calendar-schedule-line",render:u8e}),d8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function f8e(e,t){return b(),I("svg",d8e,[...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 h8e=wt({name:"ri-calendar-todo-line",render:f8e}),p8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function g8e(e,t){return b(),I("svg",p8e,[...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 m8e=wt({name:"ri-code-line",render:g8e}),v8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function y8e(e,t){return b(),I("svg",v8e,[...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 b8e=wt({name:"ri-emotion-line",render:y8e}),k8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function A8e(e,t){return b(),I("svg",k8e,[...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 C8e=wt({name:"ri-external-link-line",render:A8e}),w8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function x8e(e,t){return b(),I("svg",w8e,[...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 _8e=wt({name:"ri-eye-line",render:x8e}),S8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function M8e(e,t){return b(),I("svg",S8e,[...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 I8e=wt({name:"ri-eye-off-line",render:M8e}),E8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function T8e(e,t){return b(),I("svg",E8e,[...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 L8e=wt({name:"ri-file-add-line",render:T8e}),N8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function F8e(e,t){return b(),I("svg",N8e,[...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 B8e=wt({name:"ri-flashlight-line",render:F8e}),$8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function D8e(e,t){return b(),I("svg",$8e,[...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 R8e=wt({name:"ri-folder-fill",render:D8e}),z8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function O8e(e,t){return b(),I("svg",z8e,[...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 P8e=wt({name:"ri-git-fork-line",render:O8e}),j8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function H8e(e,t){return b(),I("svg",j8e,[...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 W8e=wt({name:"ri-git-pull-request-line",render:H8e}),q8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function U8e(e,t){return b(),I("svg",q8e,[...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 K8e=wt({name:"ri-list-settings-line",render:U8e}),V8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Z8e(e,t){return b(),I("svg",V8e,[...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 G8e=wt({name:"ri-node-tree",render:Z8e}),Q8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Y8e(e,t){return b(),I("svg",Q8e,[...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 J8e=wt({name:"ri-pushpin-line",render:Y8e}),X8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function e5e(e,t){return b(),I("svg",X8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"},null,-1)])])}const t5e=wt({name:"ri-sort-desc",render:e5e}),n5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function i5e(e,t){return b(),I("svg",n5e,[...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 s5e=wt({name:"ri-star-fill",render:i5e}),o5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function r5e(e,t){return b(),I("svg",o5e,[...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 l5e=wt({name:"ri-star-line",render:r5e}),a5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function u5e(e,t){return b(),I("svg",a5e,[...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 c5e=wt({name:"ri-tools-line",render:u5e}),d5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function f5e(e,t){return b(),I("svg",d5e,[...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 h5e=wt({name:"ri-unpin-line",render:f5e}),p5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,g5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> + <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"/> + <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"/> +</svg> +`,m5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +</svg> +`,v5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,y5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,b5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,k5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,A5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,C5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,w5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,x5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,_5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<circle cx="12" cy="12" r="10.875" stroke="currentColor" stroke-width="2.25"/> +<path d="M7.125 12.6L10.65 16.125L17.025 8.85" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"/> +</svg> +`,S5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +</svg> +`,M5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,I5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +</svg> +`,E5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,T5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +</svg> +`,L5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,N5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,F5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,B5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,TS=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g> +<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"/> +</g> +</svg> +`,$5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +<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"/> +</svg> +`,D5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,R5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g> +<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"/> +</g> +</svg> +`,z5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M9.5 3Q10.8 8.2 16 9.5Q10.8 10.8 9.5 16Q8.2 10.8 3 9.5Q8.2 8.2 9.5 3Z" fill="currentColor"/> +<path d="M17.25 13.5Q18 16.5 21 17.25Q18 18 17.25 21Q16.5 18 13.5 17.25Q16.5 16.5 17.25 13.5Z" fill="currentColor"/> +</svg> +`,O5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> + <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"/> + <g id="af-p1"> + <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"/> + </g> +</svg> +`,P5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,j5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,H5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,W5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,q5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,U5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,K5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +</svg> +`,V5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +</svg> +`,Z5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,G5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.09998C6.53222 2.09998 2.09998 6.53222 2.09998 12C2.09998 17.4677 6.53222 21.9 12 21.9C17.4677 21.9 21.9 17.4677 21.9 12C21.9 6.53222 17.4677 2.09998 12 2.09998ZM3.89998 12C3.89998 7.52633 7.52633 3.89998 12 3.89998C16.4736 3.89998 20.1 7.52633 20.1 12C20.1 16.4736 16.4736 20.1 12 20.1C7.52633 20.1 3.89998 16.4736 3.89998 12Z" fill="currentColor"/> +<path d="M9.4286 9.47153C9.4286 8.97448 9.83154 8.57153 10.3286 8.57153H11.1C11.5971 8.57153 12 8.97448 12 9.47153C12 9.96859 11.5971 10.3715 11.1 10.3715H10.3286C9.83154 10.3715 9.4286 9.96859 9.4286 9.47153Z" fill="currentColor"/> +<path d="M5.14289 9.47155C5.14289 8.97449 5.54583 8.57155 6.04289 8.57155H7.67146C8.16851 8.57155 8.57146 8.97449 8.57146 9.47155C8.57146 9.9686 8.16851 10.3715 7.67146 10.3715H6.04289C5.54583 10.3715 5.14289 9.9686 5.14289 9.47155Z" fill="currentColor"/> +<path d="M8.57146 16.3287C8.57146 15.8316 8.9744 15.4287 9.47145 15.4287H14.5286C15.0257 15.4287 15.4286 15.8316 15.4286 16.3287C15.4286 16.8257 15.0257 17.2287 14.5286 17.2287H9.47145C8.9744 17.2287 8.57146 16.8257 8.57146 16.3287Z" fill="currentColor"/> +<path d="M6.04288 12.0001C5.54583 12.0001 5.14288 12.403 5.14288 12.9001C5.14288 13.3972 5.54583 13.8001 6.04288 13.8001H6.81431C7.31137 13.8001 7.71431 13.3972 7.71431 12.9001C7.71431 12.403 7.31137 12.0001 6.81431 12.0001H6.04288Z" fill="currentColor"/> +<path d="M9.47145 12.0001C8.9744 12.0001 8.57146 12.403 8.57146 12.9001C8.57146 13.3972 8.9744 13.8001 9.47146 13.8001H10.2429C10.7399 13.8001 11.1429 13.3972 11.1429 12.9001C11.1429 12.403 10.7399 12.0001 10.2429 12.0001H9.47145Z" fill="currentColor"/> +<path d="M12.8572 9.47153C12.8572 8.97448 13.2601 8.57153 13.7572 8.57153H14.5286C15.0257 8.57153 15.4286 8.97448 15.4286 9.47153C15.4286 9.96859 15.0257 10.3715 14.5286 10.3715H13.7572C13.2601 10.3715 12.8572 9.96859 12.8572 9.47153Z" fill="currentColor"/> +<path d="M12.9 12.0001C12.403 12.0001 12 12.403 12 12.9001C12 13.3972 12.403 13.8001 12.9 13.8001H13.6715C14.1685 13.8001 14.5715 13.3972 14.5715 12.9001C14.5715 12.403 14.1685 12.0001 13.6715 12.0001H12.9Z" fill="currentColor"/> +<path d="M16.2857 9.47153C16.2857 8.97448 16.6887 8.57153 17.1857 8.57153H17.9572C18.4542 8.57153 18.8572 8.97448 18.8572 9.47153C18.8572 9.96859 18.4542 10.3715 17.9572 10.3715H17.1857C16.6887 10.3715 16.2857 9.96859 16.2857 9.47153Z" fill="currentColor"/> +<path d="M16.3286 12.0001C15.8315 12.0001 15.4286 12.403 15.4286 12.9001C15.4286 13.3972 15.8315 13.8001 16.3286 13.8001H17.9572C18.4542 13.8001 18.8572 13.3972 18.8572 12.9001C18.8572 12.403 18.4542 12.0001 17.9572 12.0001H16.3286Z" fill="currentColor"/> +</svg> +`,Q5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> + <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"/> + <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)"/> + <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"/> +</svg> +`,Y5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> + <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"/> + <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)"/> + <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"/> +</svg> +`,J5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g> +<path d="M12.9 1.7999C12.9 1.30285 12.4971 0.899902 12 0.899902C11.5029 0.899902 11.1 1.30285 11.1 1.7999V2.7999C11.1 3.29696 11.5029 3.6999 12 3.6999C12.4971 3.6999 12.9 3.29696 12.9 2.7999V1.7999Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M6.1 11.9999C6.1 8.7414 8.74152 6.09988 12 6.09988C15.2585 6.09988 17.9 8.7414 17.9 11.9999C17.9 15.2584 15.2585 17.8999 12 17.8999C8.74152 17.8999 6.1 15.2584 6.1 11.9999ZM12 7.89988C9.73563 7.89988 7.9 9.73551 7.9 11.9999C7.9 14.2642 9.73563 16.0999 12 16.0999C14.2644 16.0999 16.1 14.2642 16.1 11.9999C16.1 9.73551 14.2644 7.89988 12 7.89988Z" fill="currentColor"/> +<path d="M0.899994 11.9999C0.899994 11.5028 1.30294 11.0999 1.79999 11.0999H2.79999C3.29705 11.0999 3.69999 11.5028 3.69999 11.9999C3.69999 12.4969 3.29705 12.8999 2.79999 12.8999H1.79999C1.30294 12.8999 0.899994 12.4969 0.899994 11.9999Z" fill="currentColor"/> +<path d="M12 20.2991C12.4971 20.2991 12.9 20.702 12.9 21.1991V22.1991C12.9 22.6961 12.4971 23.0991 12 23.0991C11.5029 23.0991 11.1 22.6961 11.1 22.1991V21.1991C11.1 20.702 11.5029 20.2991 12 20.2991Z" fill="currentColor"/> +<path d="M21.2016 11.0999C20.7045 11.0999 20.3016 11.5028 20.3016 11.9999C20.3016 12.4969 20.7045 12.8999 21.2016 12.8999H22.2016C22.6986 12.8999 23.1016 12.4969 23.1016 11.9999C23.1016 11.5028 22.6986 11.0999 22.2016 11.0999H21.2016Z" fill="currentColor"/> +<path d="M20.1995 3.79903C20.551 4.1505 20.551 4.72035 20.1995 5.07182L19.4924 5.77893C19.141 6.1304 18.5711 6.1304 18.2196 5.77893C17.8682 5.42746 17.8682 4.85761 18.2196 4.50614L18.9268 3.79903C19.2782 3.44756 19.8481 3.44756 20.1995 3.79903Z" fill="currentColor"/> +<path d="M19.4942 18.2215C19.1427 17.87 18.5729 17.87 18.2214 18.2215C17.87 18.573 17.87 19.1428 18.2214 19.4943L18.9285 20.2014C19.28 20.5529 19.8498 20.5529 20.2013 20.2014C20.5528 19.8499 20.5528 19.2801 20.2013 18.9286L19.4942 18.2215Z" fill="currentColor"/> +<path d="M5.78079 18.2213C6.13227 18.5727 6.13227 19.1426 5.78079 19.4941L5.07369 20.2012C4.72222 20.5526 4.15237 20.5526 3.8009 20.2012C3.44942 19.8497 3.44942 19.2798 3.8009 18.9284L4.508 18.2213C4.85947 17.8698 5.42932 17.8698 5.78079 18.2213Z" fill="currentColor"/> +<path d="M5.07077 3.79912C4.7193 3.44764 4.14945 3.44764 3.79798 3.79912C3.4465 4.15059 3.4465 4.72044 3.79798 5.07191L4.50508 5.77901C4.85655 6.13049 5.4264 6.13049 5.77787 5.77902C6.12935 5.42754 6.12935 4.85769 5.77787 4.50622L5.07077 3.79912Z" fill="currentColor"/> +</g> +</svg> +`,X5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,ebe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,tbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g> +<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"/> +</g> +</svg> +`,nbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,ibe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,sbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +<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"/> +</svg> +`,obe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +<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"/> +</svg> +`,rbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +</svg> +`,lbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,abe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,ube=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M18.36 6.64a9 9 0 1 1-12.73 0" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> +<path d="M12 2v10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> +</svg> +`,cbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +<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"/> +</svg> +`,dbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,fbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,hbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,pbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +</svg> +`,gbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +<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"/> +</svg> +`,mbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,vbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,ybe='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M18.0 6H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="16" cy="6" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M4 12H6.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M10.5 12H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="8.5" cy="12" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M4 18H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M18.0 18H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="16" cy="18" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/></svg>',bbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,kbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,Abe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +<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"/> +</svg> +`,Cbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +<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"/> +</svg> +`,wbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,xbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M9.28994 4.92561C9.6436 4.57634 9.64716 4.0065 9.29789 3.65284C8.94862 3.29918 8.37878 3.29563 8.02512 3.6449L5.91339 5.73041L5.16642 4.95888C4.82067 4.60177 4.2509 4.59256 3.89379 4.9383C3.53668 5.28404 3.52747 5.85382 3.87321 6.21093L5.25245 7.63551C5.41956 7.80811 5.64874 7.90674 5.88897 7.90943C6.1292 7.91213 6.36053 7.81866 6.53146 7.64985L9.28994 4.92561Z" fill="currentColor"/> +<path d="M12 5.10022C11.503 5.10022 11.1 5.50316 11.1 6.00022C11.1 6.49728 11.503 6.90022 12 6.90022L19.9965 6.90022C20.4935 6.90022 20.8965 6.49728 20.8965 6.00022C20.8965 5.50316 20.4935 5.10022 19.9965 5.10022L12 5.10022Z" fill="currentColor"/> +<path d="M12 11.1002C11.503 11.1002 11.1 11.5032 11.1 12.0002C11.1 12.4973 11.503 12.9002 12 12.9002H19.9965C20.4935 12.9002 20.8965 12.4973 20.8965 12.0002C20.8965 11.5032 20.4935 11.1002 19.9965 11.1002L12 11.1002Z" fill="currentColor"/> +<path d="M11.1 18.0002C11.1 17.5032 11.503 17.1002 12 17.1002L19.9965 17.1002C20.4935 17.1002 20.8965 17.5032 20.8965 18.0002C20.8965 18.4973 20.4935 18.9002 19.9965 18.9002H12C11.503 18.9002 11.1 18.4973 11.1 18.0002Z" fill="currentColor"/> +<path d="M9.29789 9.77064C9.64716 10.1243 9.6436 10.6941 9.28994 11.0434L6.53146 13.7676C6.36053 13.9365 6.1292 14.0299 5.88897 14.0272C5.64874 14.0245 5.41956 13.9259 5.25245 13.7533L3.87321 12.3287C3.52747 11.9716 3.53668 11.4018 3.89379 11.0561C4.2509 10.7104 4.82067 10.7196 5.16642 11.0767L5.91339 11.8482L8.02512 9.76269C8.37878 9.41342 8.94862 9.41698 9.29789 9.77064Z" fill="currentColor"/> +<path d="M9.29789 15.7436C9.64716 16.0973 9.6436 16.6671 9.28994 17.0164L6.53146 19.7406C6.36053 19.9094 6.1292 20.0029 5.88897 20.0002C5.64874 19.9975 5.41956 19.8989 5.25245 19.7263L3.87321 18.3017C3.52747 17.9446 3.53668 17.3748 3.89379 17.0291C4.2509 16.6833 4.82067 16.6926 5.16642 17.0497L5.91339 17.8212L8.02512 15.7357C8.37878 15.3864 8.94862 15.39 9.29789 15.7436Z" fill="currentColor"/> +</svg> +`,_be=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +<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"/> +</svg> +`,Sbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +<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"/> +<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"/> +</svg> +`,Mbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,Ibe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +</svg> +`,Ebe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<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"/> +<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"/> +<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"/> +</svg> +`,Tbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><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"/><path d="m9 10l2 2l-2 2"/></g></svg>',Lbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Nbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Fbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Bbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',$be='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Dbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Rbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',zbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Obe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Pbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',jbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Hbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"/></svg>',Wbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',qbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Ube='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Kbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Vbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Zbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Gbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"/></svg>',Qbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Ybe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Jbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',Xbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><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"/></svg>',eke={sm:14,md:16,lg:20};function St(e,t){return{component:e,svg:t}}const a$={plus:St(n9e,p5e),"chat-new":St(o9e,g5e),"calendar-close":St(l8e,Fbe),"calendar-schedule":St(c8e,Bbe),"calendar-todo":St(h8e,$be),close:St(j9e,M5e),check:St(w9e,A5e),"circle-check":St($9e,_5e),archive:St(a9e,m5e),search:St(J4e,fbe),copy:St(Q9e,T5e),link:St(h4e,X5e),"external-link":St(C8e,zbe),download:St(nye,N5e),undo:St(W3e,Mbe),send:St(t3e,hbe),image:St(Kye,K5e),settings:St(s3e,pbe),sliders:St(m3e,ybe),"light-mode":St(c4e,J5e),"dark-mode":St(X9e,L5e),"follow-system":St(Iye,P5e),"log-in":St(c3e,mbe),"log-out":St(h3e,vbe),hand:St(Pye,q5e),"full-access":St(Lye,j5e),"shield-question":St(l3e,gbe),"chevron-down":St(S9e,C5e),"chevron-right":St(E9e,w5e),"chevron-up":St(N9e,x5e),"arrow-up":St(k9e,k5e),"arrow-down":St(d9e,v5e),"arrow-right":St(v9e,b5e),"arrow-left":St(p9e,y5e),minus:St(C4e,nbe),microscope:St(_4e,ibe),"panel-collapse":St(s4e,Q5e),"panel-collapse-right":St(J3e,Tbe),"panel-expand":St(l4e,Y5e),expand:St(aye,B5e),collapse:St(q9e,I5e),list:St(m4e,ebe),"list-settings":St(K8e,Kbe),"tree-view":St(G8e,Vbe),sort:St(t5e,Gbe),grip:St(Rye,W5e),folder:St(bye,R5e),"folder-closed":St(mye,D5e),"folder-plus":St(_ye,O5e),"folder-solid":St(R8e,Wbe),file:St(ES,TS),"file-text":St(hye,$5e),"file-edit":St(oye,F5e),"file-plus":St(L8e,jbe),"file-off":St(ES,TS),attachment:St(t8e,Lbe),"image-off":St(Gye,V5e),eye:St(_8e,Obe),"eye-off":St(I8e,Pbe),code:St(m8e,Dbe),terminal:St(I3e,Cbe),pencil:St(R4e,lbe),tool:St(c5e,Jbe),glob:St(s8e,Nbe),globe:St(Bye,H5e),translate:St(R3e,_be),"check-list":St(B3e,xbe),bolt:St(B8e,Hbe),keyboard:St(t4e,G5e),trash:St(P3e,Sbe),"git-fork":St(P8e,qbe),"git-pull-request":St(W8e,Ube),message:St(V9e,E5e),mail:St(b4e,tbe),user:St(K3e,Ibe),info:St(Jye,Z5e),"help-circle":St(K4e,cbe),"alert-triangle":St(G3e,Ebe),clock:St(z9e,S5e),robot:St(G4e,dbe),sparkles:St(_3e,Abe),"gen-title":St(Cye,z5e),histogram:St(Wye,U5e),music:St(L4e,obe),emoji:St(b8e,Rbe),target:St(C3e,kbe),pause:St(B4e,rbe),play:St(P4e,abe),power:St(W4e,ube),pin:St(J8e,Zbe),stop:St(b3e,bbe),star:St(s5e,Qbe),"star-outline":St(l5e,Ybe),unpin:St(h5e,Xbe),"dots-horizontal":St(I4e,sbe),thinking:St(L3e,wbe)};function tke(e){return a$[e]}function nke(e,t){return e.replace(/<svg\b[^>]*>/,n=>n.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^<svg\b/,`<svg class="kw-icon" width="${t}" height="${t}" aria-hidden="true"`)}function Wd(e,t="md"){const n=a$[e];return n?nke(n.svg,eke[t]):""}const DYe=[["Actions",["plus","attachment","chat-new","close","check","search","copy","link","external-link","download","undo","send","image","settings","sliders","log-in","log-out","eye","eye-off"]],["Navigation & layout",["chevron-down","chevron-right","chevron-up","arrow-up","arrow-down","arrow-right","arrow-left","minus","panel-collapse","panel-collapse-right","panel-expand","expand","collapse","list","list-settings","tree-view","sort","grip"]],["Files & tools",["folder","folder-closed","folder-plus","folder-solid","file","file-text","file-edit","file-plus","file-off","image-off","code","terminal","pencil","tool","glob","globe","check-list","bolt","git-fork","git-pull-request","archive","pin","unpin","target","calendar-schedule","calendar-todo","calendar-close","keyboard","trash","microscope"]],["Communication",["message","mail","user","robot","emoji","translate"]],["Status & media",["info","help-circle","alert-triangle","hand","full-access","shield-question","clock","histogram","music","sparkles","gen-title","pause","play","stop","star","star-outline","dots-horizontal","thinking","light-mode","dark-mode","follow-system"]]],Xb=(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t);function Zf(e){return DT(Xb,e)}function LS(e,t,n=!1){return F5(Xb,e,t,n)}function ike(e){return yJ(Xb,e)}const ske={read:"file-text",bash:"terminal",edit:"pencil",multi_edit:"pencil",write:"file-plus",grep:"search",search:"search",glob:"glob",ls:"folder",web_fetch:"globe",todo:"check-list",task:"sparkles",agentswarm:"sparkles",askuserquestion:"help-circle",exitplanmode:"file-text",creategoal:"target",getgoal:"target",setgoalbudget:"target",updategoal:"target",croncreate:"calendar-schedule",cronlist:"calendar-todo",crondelete:"calendar-close"};function u$(e){const t=ao(e);let n=ske[t];return!n&&(e??"").trim().toLowerCase().includes("skill")&&(n="bolt"),n||(n="tool"),n}function c$(e){return Wd(u$(e),"sm")}function ba(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 d$(e){return!(e.tool.status==="ok"&&e.tool.media)}function oke(e){const t=ba(e),n=[];let i=[],s=null;const o=()=>{const[l]=i;i.length===1&&l?n.push(l):i.length>1&&n.push({kind:"activity-run",items:i}),i=[]},r=()=>{s&&n.push({kind:"notification",items:s.items,sourceIndex:s.sourceIndex}),s=null};return t.forEach((l,a)=>{if(l.kind==="notification"){o(),s?s.items.push(l.notification):s={items:[l.notification],sourceIndex:a};return}if(r(),l.kind==="thinking"){i.push({kind:"thinking",thinking:l.thinking,startedAt:l.startedAt,durationMs:l.durationMs,sourceIndex:a});return}if(l.kind==="tool"&&d$(l)){i.push({kind:"tool",tool:l.tool,sourceIndex:a});return}o(),l.kind==="text"?n.push({kind:"text",text:l.text,sourceIndex:a}):l.kind==="tool"&&n.push({kind:"tool",tool:l.tool,sourceIndex:a})}),o(),r(),n}const NS=new WeakMap;function f$(e){const t=NS.get(e);if(t!==void 0)return t;const n=rke(e);return NS.set(e,n),n}function rke(e){const t=oke(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;r<t.length;r++){const l=t[r];if(l?.kind==="tool"&&!d$(l)){n=r;break}if(l?.kind==="notification"){n=r;break}}if(n===-1)return{folded:t,visible:[]}}const i=t.slice(0,n),s=t.slice(n),o=i.filter(r=>r.kind==="notification");return o.length>0?{folded:i.filter(r=>r.kind!=="notification"),visible:[...o,...s]}:{folded:i,visible:s}}function lke(e){let t;for(const n of e){if(n.kind!=="thinking"||n.startedAt===void 0)continue;const i=Date.parse(n.startedAt);Number.isNaN(i)||(t===void 0||i<t)&&(t=i)}return t}function FS(e){if(e===void 0)return;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function ake(e){if(e.state.phase==="settled")return e.durationMs!==void 0?Math.max(0,e.durationMs):e.startMs===void 0||e.endedMs===void 0?void 0:Math.max(0,e.endedMs-e.startMs);if(e.startMs!==void 0)return Math.max(0,e.state.nowMs-e.startMs)}function uke(e){return f$(e).visible.flatMap(t=>t.kind==="text"&&t.text?[t.text]:[]).join(` + +`)}function cke(e){const t=[];for(const n of ba(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 i=n.tool.output.join(` +`);t.push(`\`\`\` +[${n.tool.name}] +${i} +\`\`\``)}else if(n.kind==="notification"){const i=n.notification,s=[i.title,i.type,...i.body.split(` +`)].filter(o=>o!=="");s.length>0&&t.push(`> **Notification** +> ${s.join(` +> `)}`)}return t.join(` + +`)}function h$(e){return e.tool.id||`tool-${e.sourceIndex}`}function p$(e,t){return e.kind==="activity-run"?`activity-run-${e.items[0]?.sourceIndex??t}`:e.kind==="tool"?h$({tool:e.tool,sourceIndex:e.sourceIndex}):`${e.kind}-${e.sourceIndex}`}function dke(e){const t=new Map;for(const n of ba(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const i=n.tool,s=ao(i.name);if(s!=="edit"&&s!=="multi_edit"&&s!=="write")continue;let o,r=0,l=0,a=!1,u=!1,c=null;if(s==="write")o=rC(i),a=!0,u=!0;else if(c=KT(i),o=rC(i),c){const p=jT(c);r=p.added,l=p.removed}else u=!0;if(!o)continue;const d=fke(o),f=t.get(d);if(f)if(f.added+=r,f.removed+=l,f.hasWrite||=a,f.statsIncomplete||=u,f.diff!==null&&c!==null){let p=0,g=0;for(const y of f.diff)y.oldNo!==void 0&&y.oldNo>p&&(p=y.oldNo),y.newNo!==void 0&&y.newNo>g&&(g=y.newNo);const m=c.map(y=>({...y,oldNo:y.oldNo!==void 0?y.oldNo+p:void 0,newNo:y.newNo!==void 0?y.newNo+g:void 0}));f.diff=[...f.diff,{type:"hunk",text:"···"},...m]}else f.diff=null;else t.set(d,{path:o,added:r,removed:l,hasWrite:a,statsIncomplete:u,diff:c})}return[...t.values()]}function fke(e){const t=e.replace(/\\/g,"/");let n="",i=t,s=!1;const o=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);o?(n=`//${o[1].toLowerCase()}/`,i=t.slice(o[0].length-(o[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,i=t.slice(3),s=!0):t.startsWith("/")&&(n="/",i=t.slice(1));const r=n!=="",l=[];for(const c of i.split("/"))if(!(!c||c===".")){if(c===".."){l.length>0&&l[l.length-1]!==".."?l.pop():r||l.push(c);continue}l.push(c)}const a=l.join("/"),u=n+a;return s?u.toLowerCase():u}const hke=2e3,Fh=new Map;function pke(e){const t=[];for(const n of ba(e)){if(n.kind!=="tool")continue;const i=n.tool,s=ao(i.name);s!=="edit"&&s!=="multi_edit"&&s!=="write"||t.push(`${i.id}:${i.status}:${i.arg.length}`)}return t.join("|")}function gke(e){const t=pke(e),n=Fh.get(e.id);if(n&&n.key===t)return n.changes;const i=dke(e);if(Fh.set(e.id,{key:t,changes:i}),Fh.size>hke){const s=Fh.keys().next().value;s!==void 0&&Fh.delete(s)}return i}const mke=["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"],g$=500,c2=256*1024,BS=200,u4=16384,c4=500,d4=50,f4=50,vke=6,yke=/api[_-]?key|authorization|token|secret|password|cookie|credential|email|phone|nickname|avatar/i,bke=/^[A-Za-z0-9+/=_-]{200,}$/;let h4=null;function bl(){if(h4!==null)return h4;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=uo(un.debug)==="1"),h4=e,e}const yu=[],ef=[];let e1=0;const _c=[];let t1=0,kke=1;const d2=new TextEncoder,Ake=new Set(mke),ek=Z(0),n1=vl(!1);function Cke(){return yu}function wke(){yu.length=0,ef.length=0,e1=0,_c.length=0,t1=0,ek.value++}function Na(e){if(!n1.value){try{const t={id:kke++,ts:Date.now(),source:e.source,kind:String(kf(e.kind)),label:String(kf(e.label)),sessionId:e.sessionId===void 0?void 0:String(kf(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:Wu(e.detail)},n=JSON.stringify(t),i=d2.encode(n).byteLength;if(i>c2)return;for(yu.push(t),ef.push(n),e1+=i+(ef.length>1?1:0);yu.length>g$||e1>c2;){const s=ef.shift();yu.shift(),s!==void 0&&(e1-=d2.encode(s).byteLength,ef.length>0&&(e1-=1))}}catch{return}ek.value++}}function pc(e){if(typeof e=="string")return e.length<=BS?e:e.slice(0,BS)}function Fr(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function xke(e,t){if(Ake.has(e))try{const n={ts:Date.now(),event:e,sessionId:pc(t?.sessionId),status:pc(t?.status),operation:pc(t?.operation),seq:Fr(t?.seq),durationMs:Fr(t?.durationMs),messageCount:Fr(t?.messageCount),contentCount:Fr(t?.contentCount),mediaCount:Fr(t?.mediaCount),sessionCount:Fr(t?.sessionCount),workspaceCount:Fr(t?.workspaceCount),promptId:pc(t?.promptId),zipBytes:Fr(t?.zipBytes),errorName:pc(t?.errorName),errorCode:Fr(t?.errorCode),requestId:pc(t?.requestId),phase:pc(t?.phase),httpStatus:Fr(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:Fr(t?.line),col:Fr(t?.col)},i=JSON.stringify(n),s=d2.encode(i).byteLength;if(s>c2)return;for(_c.push(i),t1+=s+(_c.length>1?1:0);_c.length>g$||t1>c2;){const o=_c.shift();o!==void 0&&(t1-=d2.encode(o).byteLength,_c.length>0&&(t1-=1))}}catch{return}}function kf(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const o=e;return bke.test(o)?`[base64-like, ${o.length} chars omitted]`:o.length>c4?`${o.slice(0,c4)}… [+${o.length-c4} chars]`:o}if(n!=="object")return String(e);if(t>=vke)return"[max depth]";if(Array.isArray(e)){const o=e.slice(0,d4).map(r=>kf(r,t+1));return e.length>d4&&o.push(`[+${e.length-d4} more items]`),o}const i={},s=Object.entries(e);for(const[o,r]of s.slice(0,f4))i[o]=yke.test(o)?"[redacted]":kf(r,t+1);return s.length>f4&&(i._truncatedKeys=s.length-f4),i}function Wu(e){if(e===void 0)return;const t=kf(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 _ke(e){bl()&&Na({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:Wu(e.body)}})}function Ske(e){if(!bl())return;const t=e.code!==0;Na({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:Wu(e.data)}})}function Mke(e){bl()&&Na({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 Ike(e,t){bl()&&Na({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:Wu(t)})}function Eke(e){if(!bl())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",i=t.payload,s=typeof i?.session_id=="string"?i.session_id:void 0;Na({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:Wu(e)})}function Tke(e){if(!bl())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",i=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,o=typeof t.offset=="number"?t.offset:void 0,r=[i,s!==void 0?`seq=${s}`:void 0,o!==void 0?`offset=${o}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);Na({source:"ws",kind:"ws:in",eventType:n,sessionId:i,seq:s,offset:o,label:`← ${n}${r.length>0?` (${r.join(" ")})`:""}`,detail:Wu(t.payload)})}const Lke={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function Nke(e,t,n){bl()&&Na({source:"client",kind:`client:${e}`,label:`${Lke[e]} ${t}`,detail:Wu(n)})}function Fke(e,t){bl()&&Na({source:"client",kind:"client:event",label:`· ${e}`,detail:Wu(t)})}function Bo(e,t){xke(e,t),Na({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 p4=!1,cg=null;function Bke(){if(p4)return()=>cg?.();p4=!0;const e=[];try{if(typeof window<"u"){const n=s=>{Bo("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno}),ga(`[kimi-web] window error: ${s.message}`,s.error instanceof Error?s.error.stack:void 0)},i=s=>{const o=s.reason;Bo("window:unhandled-rejection",{status:"failed",errorName:o instanceof Error?o.name:typeof o}),ga(`[kimi-web] unhandled rejection: ${Dke(o)}`,o instanceof Error?o.stack:void 0)};window.addEventListener("error",n),window.addEventListener("unhandledrejection",i),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",i)})}}catch{}if(bl())for(const n of["error","warn","log","info","debug"]){const i=console[n];if(typeof i!="function")continue;const s=(...o)=>{try{Nke(n,o.map($ke).join(" "),o.length>1?o:o[0])}catch{}i.apply(console,o)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=i)})}const t=()=>{if(cg===t){for(const n of e.toReversed())n();cg=null,p4=!1}};return cg=t,t}function $ke(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 Dke(e){if(e instanceof Error)return e.message;try{return String(e)}catch{return"[unstringifiable reason]"}}function m$(e=yu){if(typeof document>"u")return;const t=new Blob([Rke(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let i;try{i=document.createElement("a"),i.href=n,i.download=`kimi-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(i),i.click()}finally{i?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function Rke(e=yu){return e===yu?ef.join(` +`):e.map(t=>JSON.stringify(t)).join(` +`)}function zke(){return _c.join(` +`)}const $S=un.clientId,Oke="kimi-code-web",Pke="web";function jke(){return{serverHttpUrl:Wke(),clientId:Uke(),clientName:Oke,clientVersion:Kke(),clientUiMode:Pke}}function Hke(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function Wke(){const e=v$();return S8(e||void 0)}const DS="kimi-desktop-server-origin";function v$(){if(typeof window>"u")return;const e=new URLSearchParams(window.location.search).get("kimi_origin");try{return e?(window.sessionStorage.setItem(DS,e),e):window.sessionStorage.getItem(DS)??void 0}catch{return e??void 0}}function S8(e){const t=e&&e.trim()?e:Hke(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function RS(e){return e.replace(/^https?:\/\//,"").replace(/\/$/,"")}function qke(){if(typeof window<"u"){const t=v$();if(t)return RS(S8(t))}const e=typeof window<"u"&&window.location?.origin?window.location.origin:"";return RS(e)}function Uke(){const e=uo($S);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Ns($S,t),t}function Kke(){return"0.36.0".trim()?"0.36.0":"0.0.0-dev"}const Vke={restRequest:e=>_ke(e),restResponse:e=>Ske(e),restFailure:e=>Mke(e),wsEvent:e=>{switch(e.kind){case"lifecycle":Ike(e.event,e.detail);break;case"in":Tke(e.frame);break;case"out":Eke(e.frame);break}},traceKeyEvent:(e,t)=>Bo(e,t)},Zke={getToken:Tte,markAuthRequired:Bte},Gke=(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t);function Qke(){const e=jke();return NJ({origin:e.serverHttpUrl,identity:{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode},tracer:Vke,credentialStore:Zke,t:Gke})}const Yke=Qke();function Pt(){return Yke}function M8(e){const t=[];for(const n of e??[])n.kind==="video"?t.push({type:"video",source:{kind:"file",fileId:n.fileId}}):n.kind==="file"?t.push({type:"file",fileId:n.fileId,name:n.name??"",mediaType:n.mediaType||"application/octet-stream",size:n.size??0}):t.push({type:"image",source:{kind:"file",fileId:n.fileId}});return t}const Jke=1e3,Xke=4096,zS=32*1024;function e6e(e,t,n){let i=null,s;const o=new Set;async function r(p){try{const m=await n.api.listTasks(p),y=e.tasksBySession[p]??[],w=new Map(y.map(v=>[v.id,v])),k=new Map(y.filter(v=>v.backgroundTaskId!==void 0).map(v=>[v.backgroundTaskId,v])),A=m.map(v=>{const x=w.get(v.id)??k.get(v.id),E=v.completedAt===void 0&&x?.completedAt===void 0&&x?.status==="running"&&v.status!=="running";return{...v,completedAt:v.completedAt??x?.completedAt??(E?new Date().toISOString():void 0),completedAtEstimated:v.completedAt!==void 0?void 0:x?.completedAt!==void 0?x.completedAtEstimated:E?!0:void 0}});e.tasksBySession={...e.tasksBySession,[p]:YC(A,y)},await l(p,m)}catch{}}async function l(p,g){if(e.activeSessionId!==p)return;const m=g??e.tasksBySession[p]??[],y=n.api,w=new Map;if(await Promise.all(m.map(async A=>{if((A.status==="completed"||A.status==="failed"||A.status==="cancelled")&&!o.has(A.id)&&!((A.outputLines?.length??0)>0))try{const x=await y.getTask(p,A.id,{withOutput:!0,outputBytes:zS});x.outputPreview!==void 0&&w.set(A.id,{preview:x.outputPreview,bytes:x.outputBytes}),o.add(A.id)}catch{}})),w.size===0)return;const k=e.tasksBySession[p]??[];e.tasksBySession={...e.tasksBySession,[p]:k.map(A=>{const v=w.get(A.id)??(A.backgroundTaskId!==void 0?w.get(A.backgroundTaskId):void 0);return v?{...A,outputPreview:v.preview,outputBytes:v.bytes}:A})}}async function a(p){if(e.activeSessionId!==p)return;const g=n.api;let m;try{m=await g.listTasks(p)}catch{return}const y=new Map;await Promise.all(m.map(async x=>{const E=x.status==="running",S=x.status==="completed"||x.status==="failed"||x.status==="cancelled";if(!(!E&&!S)&&!(S&&(o.has(x.id)||(x.outputLines?.length??0)>0)))try{const M=await g.getTask(p,x.id,{withOutput:!0,outputBytes:E?Xke:zS});M.outputPreview!==void 0&&y.set(x.id,{preview:M.outputPreview,bytes:M.outputBytes}),S&&o.add(x.id)}catch{}}));const w=e.tasksBySession[p]??[],k=new Map(w.map(x=>[x.id,x])),A=new Map(w.filter(x=>x.backgroundTaskId!==void 0).map(x=>[x.backgroundTaskId,x])),v=m.map(x=>{const E=k.get(x.id)??A.get(x.id),S=y.get(x.id),M=x.completedAt===void 0&&E?.completedAt===void 0&&E?.status==="running"&&x.status!=="running";return{...x,outputLines:E?.outputLines,text:E?.text,completedAt:x.completedAt??E?.completedAt??(M?new Date().toISOString():void 0),completedAtEstimated:x.completedAt!==void 0?void 0:E?.completedAt!==void 0?E.completedAtEstimated:M?!0:void 0,outputPreview:S?.preview??E?.outputPreview,outputBytes:S?.bytes??E?.outputBytes}});e.tasksBySession={...e.tasksBySession,[p]:YC(v,w)}}function u(p){i!==null&&s===p||(c(),s=p,a(p),i=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||(e.activeSessionId===p?a(p):c())},Jke))}function c(){i!==null&&(clearInterval(i),i=null),s=void 0,o.clear()}const d=Z(0);let f=null;return Qe(()=>t.value.some(p=>p.status==="running"),p=>{p&&f===null?f=setInterval(()=>{d.value=(d.value+1)%Number.MAX_SAFE_INTEGER},1e3):!p&&f!==null&&(clearInterval(f),f=null)},{immediate:!0}),Qe(()=>{const p=e.activeSessionId;if(!p)return{sid:void 0,hasRunning:!1};const g=e.tasksBySession[p]??[];return{sid:p,hasRunning:g.some(m=>m.status==="running")}},({sid:p,hasRunning:g},m,y)=>{let w;g&&p!==void 0?u(p):p!==void 0?w=setTimeout(()=>{(e.tasksBySession[p]??[]).some(A=>A.status==="running")||c()},1500):c(),y(()=>{w!==void 0&&clearTimeout(w)})},{deep:!0,immediate:!0}),{taskClock:F(()=>d.value),loadTasksForSession:r}}function t6e(e,t){const{api:n,pushOperationFailure:i,nextOptimisticMsgId:s,connectEventsIfNeeded:o,getEventConn:r,resolveThinkingForPrompt:l,refreshSessionStatus:a}=t,u=Z({}),c=F(()=>{const W=e.activeSessionId;if(!W)return null;const z=u.value[W];return z?{parentId:W,agentId:z.agentId}:null}),d=F(()=>c.value?.parentId??null),f=F(()=>c.value!==null),p=F(()=>{const W=c.value;return W?!!e.sideChatSendingByAgent[W.agentId]:!1}),g=F(()=>{const W=c.value;return W?e.sideChatSendingByAgent[W.agentId]?!0:(e.tasksBySession[W.parentId]??[]).some(z=>z.id===W.agentId&&z.status==="running"):!1}),m=W=>n.getFileUrl(W),y=[],w=VT(),k=F(()=>{const W=c.value;return W?w({messages:e.sideChatMessagesByAgent[W.agentId]??[],approvals:y,getFileUrl:m,sessionActive:g.value}):[]});function A(W,z){e.sideChatMessagesByAgent[W]=z(e.sideChatMessagesByAgent[W]??[])}function v(W,z){A(W,G=>[...G,z])}function x(W,z){A(W,G=>{const K=G.find(H=>H.id===z);return K?.promptId!==void 0||K?.userMessageId!==void 0?G:G.filter(H=>H.id!==z)})}function E(W,z){const G=e.sideChatUserMessageIdsBySession[W]??[];G.includes(z)||(e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[W]:[...G,z]})}function S(W,z,G,K){A(W,H=>{const q=H.findIndex(ie=>ie.id===z);if(q===-1)return H;const X=H.findIndex((ie,xe)=>xe!==q&&ie.role==="user"&&(ie.id===K||ie.userMessageId===K||ie.promptId===G)),ee=H[q],ue=X===-1?ee:H[X];return H.flatMap((ie,xe)=>xe===X?[]:xe!==q?[ie]:[{...ue,id:ee.id,promptId:G,userMessageId:K,metadata:{...ue.metadata,...ee.metadata}}])})}function M(W,z){E(z.sessionId,z.userMessageId??z.id),A(W,G=>{const K=G.findIndex(X=>X.role==="user"&&(X.userMessageId===(z.userMessageId??z.id)||X.promptId!==void 0&&X.promptId===z.promptId));if(K===-1)return[...G,z];const H=G[K],q=[...G];return q[K]={...z,id:H.id,promptId:z.promptId??H.promptId,userMessageId:z.userMessageId??z.id,metadata:{...z.metadata,...H.metadata}},q})}function _(W,z,G){G&&A(W,K=>{const H=K.at(-1);if(H?.role==="assistant"){const q=H.content[0],X=q?.type==="text"?q.text:"";return[...K.slice(0,-1),{...H,content:[{type:"text",text:`${X}${G}`}]}]}return[...K,{id:s(),sessionId:z,role:"assistant",content:[{type:"text",text:G}],createdAt:new Date().toISOString()}]})}function N(W,z,G){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[W]:!1},!G)return;const H=(e.sideChatMessagesByAgent[W]??[]).at(-1);(H?.role==="assistant"&&H.content[0]?.type==="text"?H.content[0].text:"").trim().length>0||_(W,z,G)}async function D(W){const z=e.activeSessionId;return z?T(z,W):!1}async function T(W,z){if(!u.value[W]){let G;try{({agentId:G}=await n.startBtw(W))}catch(K){return i("openSideChat",K,{sessionId:W}),!1}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[G]:e.sideChatMessagesByAgent[G]??[]},u.value={...u.value,[W]:{agentId:G}},o(),r()?.markSideChannelAgent(W,G)}return z&&z.trim()?$(W,z.trim()):!0}async function $(W,z){const G=u.value[W],K=z.trim();if(!G||!K)return!1;const H=W,q=G.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[q]:!0};const X=s(),ee={id:X,sessionId:H,role:"user",content:[{type:"text",text:K}],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};v(q,ee);let ue,ie=!1;try{const xe=e.sessions.find(te=>te.id===H),ce=(xe?.model&&xe.model.length>0?xe.model:e.defaultModel)??void 0,pe=await l(H,ce)??e.thinking;ue=e.pendingThinkingBySession[H],ie=!0;const Ne=await n.submitPrompt(H,{content:[{type:"text",text:K}],agentId:q,model:ce,thinking:pe,permissionMode:e.permission,planMode:e.planModeBySession[H]??!1,swarmMode:e.swarmModeBySession[H]??!1});return pe!==void 0&&Ca(e,H,ue),S(q,X,Ne.promptId,Ne.userMessageId),E(H,Ne.userMessageId),!0}catch(xe){return Ca(e,H,ue)&&a(H),i("sendSideChatPrompt",xe,{sessionId:H}),x(q,X),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[q]:!1},!(!ie||xe instanceof au)}}function P(){const W=e.activeSessionId;if(!W)return;const{[W]:z,...G}=u.value;u.value=G}async function O(W){const z=c.value;return z?$(z.parentId,W):!1}function R(W){if(!u.value[W])return;const{[W]:z,...G}=u.value;u.value=G}return{sideChatTargetBySession:u,sideChatSessionId:d,sideChatVisible:f,sideChatSending:p,sideChatRunning:g,sideChatTurns:k,appendSideChatAssistantText:_,finishSideChatAgent:N,reconcileSideChatUserMessage:M,openSideChat:D,openSideChatOn:T,closeSideChat:P,sendSideChatPrompt:O,clearSideChatForSession:R}}const y$=un.starredModels,OS=new Error("profile persist failed");function n6e(){try{const e=uo(y$);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function i6e(e){try{Ns(y$,JSON.stringify(e))}catch{}}function s6e(e,t){const{api:n,pushOperationFailure:i,refreshSessionStatus:s,persistSessionProfile:o,savePlanModeToStorage:r,activity:l,updateSession:a,updateSessionMessages:u,loadConfig:c,checkAuth:d,beginLocalTurn:f,settleLocalTurn:p}=t,g=Z([]),m=Z(n6e()),y=Z({}),w=Z({}),k=Z([]),A=Z(null);function v(j){if(!(j==null||j.length===0))return g.value.find(Y=>Y.id===j)??g.value.find(Y=>Y.model===j)}function x(){const j=e.activeSessionId?e.sessions.find(ve=>ve.id===e.activeSessionId):void 0,Y=j===void 0?A.value??e.defaultModel:j.model||e.defaultModel;return v(Y)?.id??Y??void 0}function E(j){if(j===void 0)return;const Y=v(j);return Y===void 0?void 0:G1(Y)}function S(j,Y){const ve=j==null?void 0:e.thinkingBySession[j];return ve!==void 0&&Vee(Y,ve)?ve:G1(Y)}function M(j,Y){if(Y===void 0)return;const ve=v(Y);return ve===void 0?void 0:S(j,ve)}async function _(j,Y){return j!=null&&e.thinkingBySession[j]===void 0&&await s(j),M(j,Y)}function N(j){e.thinking=j;const Y=e.activeSessionId;return j!==void 0&&Y!==null&&Y!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Y]:j},m3(e,Y)),j}Qe([()=>e.activeSessionId,()=>x(),()=>{const j=e.activeSessionId;return j==null?void 0:e.thinkingBySession[j]}],()=>{const j=v(x());j!==void 0&&(e.thinking=S(e.activeSessionId,j))});function D(j){n.setConfig({thinking:Zee(j,v(x())?.supportEfforts)}).catch(Y=>i("setConfig",Y))}async function T(j){try{const Y=await n.listSkills(j);y.value={...y.value,[j]:Y}}catch{}}async function $(j){try{const Y=await n.listSkillsForWorkspace(j);w.value={...w.value,[j]:Y}}catch{}}async function P(){try{g.value=await n.listModels();const j=v(x());j!==void 0&&(e.thinking=S(e.activeSessionId,j))}catch(j){i("loadModels",j)}}async function O(){try{k.value=await n.listProviders()}catch(j){i("loadProviders",j)}}async function R(j){const Y=e.activeSessionId,ve=v(j),re=e.thinking,se=Y?e.sessions.find(me=>me.id===Y)?.model:void 0,U=x()!==(ve?.id??j),J=Gee(ve,re,U);if(!Y)return A.value=j,e.thinking=J,J!==re&&J!==void 0&&D(J),!0;a(Y,me=>({...me,model:j}));let de;J!==re&&(e.thinking=J,J!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Y]:J},de=m3(e,Y)));try{await n.updateSession(Y,{model:j,thinking:J!==re?J:void 0})}catch(me){return a(Y,Ie=>({...Ie,model:se??Ie.model})),J!==re&&(e.thinking=re,re!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Y]:re}),Ca(e,Y,de)&&s(Y)),i("setModel",me,{sessionId:Y}),!1}return J!==re&&J!==void 0&&D(J),Ca(e,Y,de),await s(Y),!0}function W(j){const Y=new Set(m.value);Y.has(j)?Y.delete(j):Y.add(j),m.value=Array.from(Y),i6e(m.value)}async function z(j,Y,ve,re,se){const U=re??e.activeSessionId;if(!U)return!1;const J=l.value==="idle"&&!e.inFlightBySession[U],de=`msg_skill_opt_${Date.now().toString(36)}`,me=J?f(U):void 0;let Ie=!1;if(J){e.inFlightBySession={...e.inFlightBySession,[U]:!0};const je={id:de,sessionId:U,role:"user",content:[{type:"text",text:`/${j}${Y?` ${Y}`:""}`},...M8(ve)],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:j,skillArgs:Y}}};u(U,ke=>[...ke,je])}try{if(se?.skipThinkingPersist!==!0){const je=e.sessions.find(Fe=>Fe.id===U)?.model,ke=(je&&je.length>0?je:e.defaultModel)??void 0,Le=e.planArmedBySession[U]??!1;if(!await o({thinking:await _(U,ke)??e.thinking,swarmMode:e.swarmModeBySession?.[U]??!1,permissionMode:e.permission,...Le?{planMode:!0}:{}},U))throw OS;Le&&(e.planArmedBySession={...e.planArmedBySession,[U]:!1},r(),e.planModeBySession={...e.planModeBySession,[U]:!0})}return Ie=!0,await n.activateSkill(U,j,Y,M8(ve)),!0}catch(je){return J&&(e.inFlightBySession={...e.inFlightBySession,[U]:!1},u(U,ke=>ke.filter(Le=>Le.id!==de))),je!==OS&&i("activateSkill",je,{sessionId:U}),!(!Ie||je instanceof au)}finally{me!==void 0&&p(U,me)}}async function G(j){return n.getProvider(j)}async function K(j){try{return await n.addProvider(j),await Promise.all([O(),P(),c()]),await d(),null}catch(Y){return ga("[kimi-code] operation failed: addProvider",Y),Y instanceof Error?Y.message:String(Y)}}async function H(j,Y){try{return await n.updateProvider(j,Y),await Promise.all([O(),P(),c()]),null}catch(ve){return ga("[kimi-code] operation failed: updateProvider",ve),ve instanceof Error?ve.message:String(ve)}}async function q(j){try{const Y=await n.deleteProvider(j);return await Promise.all([O(),P(),c()]),await d(),Y}catch(Y){return i("deleteProvider",Y),null}}async function X(j){try{const Y=await n.refreshProvider(j);for(const ve of Y.failed)i("refreshProvider",new Error(ve.reason),{message:ve.provider});await Promise.all([O(),P(),c()])}catch(Y){i("refreshProvider",Y)}}async function ee(){try{const j=await n.refreshAllProviders();for(const Y of j.failed)i("refreshAllProviders",new Error(Y.reason),{message:Y.provider});await Promise.all([O(),P(),c()])}catch(j){i("refreshAllProviders",j)}}async function ue(){try{return{kind:"ok",items:await n.listCatalogProviders()}}catch(j){return j instanceof au&&j.code===void 0?{kind:"unsupported"}:(ga("[kimi-code] operation failed: loadCatalogProviders",j),{kind:"error"})}}async function ie(j){try{return await n.importCatalogProvider(j),await Promise.all([O(),P(),c()]),await d(),null}catch(Y){return ga("[kimi-code] operation failed: importCatalogProvider",Y),Y instanceof Error?Y.message:String(Y)}}async function xe(j){try{const Y=await n.importCustomRegistry(j);return await Promise.all([O(),P(),c()]),await d(),Y}catch(Y){return ga("[kimi-code] operation failed: importCustomRegistry",Y),Y instanceof Error?Y.message:String(Y)}}async function ce(){try{return await n.startOAuthLogin()}catch{return null}}async function pe(){try{return await n.pollOAuthLogin()}catch(j){return Dl("[kimi-code] pollOAuthLogin failed",j),null}}async function Ne(){try{await n.cancelOAuthLogin()}catch{}}async function te(){try{return await n.getUsage()}catch(j){return{kind:"error",message:j instanceof Error?j.message:String(j)}}}function ye(j){const Y=N(j);o({thinking:Y}),Y!==void 0&&D(Y)}return{models:g,starredModelIds:m,providers:k,draftModel:A,skillsBySession:y,skillsByWorkspace:w,loadSkillsForSession:T,loadSkillsForWorkspace:$,loadModels:P,loadProviders:O,setModel:R,thinkingLevelForModelId:E,thinkingLevelForSessionId:M,resolveThinkingForPrompt:_,toggleStarModel:W,activateSkill:z,addProvider:K,updateProvider:H,deleteProvider:q,getProvider:G,loadCatalogProviders:ue,importCatalogProvider:ie,importCustomRegistry:xe,refreshProvider:X,refreshAllProviders:ee,startOAuthLogin:ce,pollOAuthLogin:pe,cancelOAuthLogin:Ne,getUsage:te,setThinking:ye}}const o6e=50,Ug=5,tk=5,f2=50,r6e=40401,l6e=40402,a6e=40410,u6e=40409,c6e=40902,d6e=2e3,f6e=10;function g4(e){return Ps(e)&&e.code===c6e}const h6e=40904;function p6e(e){return Ps(e)&&e.code===h6e}function g6e(e){return!e||e.state!=="open"&&e.state!=="closed"&&e.state!=="merged"?null:{number:e.number,state:e.state,url:e.url}}function m6e(e,t){return e==null||t==null?e==null&&t==null:e.number===t.number&&e.state===t.state&&e.url===t.url}const gc=Ts({}),dg=Ts({}),m4=Ts({}),Tl=Ts(new Set),Ev=new Map,Jc=new Map,h2=new Map;let v6e=0;const bc=new Map,y6e=3,b6e=3,Kg=new Map;function k6e(e){const t=Kg.get(e);if(!(t!==void 0&&(t.done||t.attempts>=b6e))){Kg.set(e,{attempts:(t?.attempts??0)+1,done:!1});try{Pt().generateSessionTitle(e,{source:"first_turn"}).then(n=>{n!==null&&Kg.set(e,{attempts:0,done:!0})}).catch(()=>{})}catch{}}}let PS=0;function A6e(){return PS+=1,`${Date.now().toString(36)}-${PS}`}function C6e(e){return{generation:Ev.get(e)??0,pending:(Jc.get(e)?.size??0)>0}}function I8(e){const t=++v6e;Ev.set(e,t);const n=Jc.get(e)??new Set;return n.add(t),Jc.set(e,n),t}function E8(e,t){const n=Jc.get(e);if(n===void 0||(n.delete(t),n.size>0))return;Jc.delete(e);const i=h2.get(e);h2.delete(e),i?.()}function w6e(e){Ev.delete(e),Jc.delete(e),h2.delete(e),bc.delete(e)}function x6e(e,t){return!t.pending&&t.generation===(Ev.get(e)??0)}function _6e(e,t){if((Jc.get(e)?.size??0)===0){t();return}h2.set(e,t)}function S6e(e,t){const{t:n}=jn.global,{confirm:i}=Hu(),{taskPoller:s,sideChat:o,modelProvider:r,pushOperationFailure:l,notify:a,activity:u,sessionsKnownEmpty:c,setSessions:d,updateSession:f,upsertSessionSorted:p,appendSession:g,forgetSession:m,unpinSessions:y,setActiveSessionId:w,updateSessionMessages:k,nextOptimisticMsgId:A,getEventConn:v,syncSessionFromSnapshot:x,reopenSession:E,hasLoadedMessages:S,refreshSessionStatus:M,refreshSessionGoal:_,refillSessionGoalOnReload:N,refreshSessionPlans:D,settlePlanReviewLocally:T,persistSessionProfile:$,mergedWorkspaces:P,workspacesView:O,status:R,workspaceIdForSession:W,savePermissionToStorage:z,savePlanModeToStorage:G,saveSwarmModeToStorage:K,saveGoalModeToStorage:H,draftModes:q,saveUnread:X,saveActiveWorkspaceToStorage:ee,saveHiddenWorkspacesToStorage:ue,goalErrorMessage:ie,initialized:xe,connectIssue:ce,selectedDiffPath:pe,fileDiffLines:Ne,fileDiffLoading:te,fileDiffTexts:ye,fileDiffEmptyFile:j}=t;let Y=0,ve=!1;function re(oe,Ae,Se,Pe){k(oe,Ye=>{const Je=Ye.findIndex(Ot=>Ot.id===Ae);if(Je===-1)return Ye;const xt=Ye.findIndex((Ot,wn)=>wn!==Je&&Ot.role==="user"&&(Ot.id===Pe||Ot.userMessageId===Pe||Ot.promptId===Se)),bt=Ye[Je],nn=xt===-1?bt:Ye[xt];return Ye.flatMap((Ot,wn)=>wn===xt?[]:wn!==Je?[Ot]:[{...nn,id:bt.id,promptId:Se,userMessageId:Pe,metadata:{...nn.metadata,...bt.metadata}}])})}async function se(oe){if(e.messagesLoadingMoreBySession[oe])return;const Ae=e.messagesBySession[oe];if(!Ae||Ae.length===0)return;const Se=Ae[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[oe]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[oe]:!1};try{const Pe=await Pt().listMessages(oe,{beforeId:Se,pageSize:o6e}),Ye=[...Pe.items].reverse();k(oe,Je=>[...Ye,...Je]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[oe]:Pe.hasMore}}catch(Pe){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[oe]:!0},l("loadOlderMessages",Pe,{sessionId:oe})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[oe]:!1}}}function U(oe,Ae){s.loadTasksForSession(oe),me(oe),Ae?.skipStatus!==!0&&M(oe),_(oe),D(oe),Object.prototype.hasOwnProperty.call(r.skillsBySession.value,oe)||r.loadSkillsForSession(oe)}async function J(oe){const Ae=e.activeSessionId;if(Ae){pe.value=oe,Ne.value=[],ye.value=null,j.value=!1,te.value=!0;try{const Pe=await Pt().getFileDiff(Ae,oe);if(pe.value!==oe||e.activeSessionId!==Ae)return;const Ye=eee(Pe.diff);if(Ne.value=Ye,Ye.length===0){const xt=await Mi(oe).catch(()=>null);if(pe.value!==oe||e.activeSessionId!==Ae)return;j.value=xt!==null&&xt.size===0;return}te.value=!1;const Je=await HX(Ye,{truncated:Pe.truncated,readNewText:async()=>{const xt=await Mi(oe).catch(()=>null);return!xt||xt.isBinary||xt.encoding!=="utf-8"?null:xt.content}});if(pe.value!==oe||e.activeSessionId!==Ae)return;ye.value=Je}catch(Se){pe.value===oe&&(Ne.value=[]),Dl("[loadFileDiff] diff unavailable for",oe,Se)}finally{pe.value===oe&&(te.value=!1)}}}function de(){pe.value=null,Ne.value=[],ye.value=null,j.value=!1,te.value=!1}async function me(oe){try{const Se=await Pt().getGitStatus(oe);e.gitStatusBySession={...e.gitStatusBySession,[oe]:Se};const Pe=g6e(Se.pullRequest);f(oe,Ye=>m6e(Ye.pullRequest,Pe)?Ye:{...Ye,pullRequest:Pe})}catch{}}let Ie=0;async function je(oe){try{const Ae=await Pt().getUserInfo();if(oe!==Ie||e.managedProviderStatus!=="authenticated")return;e.managedUserInfo=Ae.kind==="ok"?Ae.userInfo:null,Ae.kind==="ok"?e.managedMembership=Ae.userInfo.userLevel===f6e?"free":"member":e.managedMembership=Ae.status===402?"free":null}catch{if(oe!==Ie)return;e.managedProviderStatus==="authenticated"&&(e.managedUserInfo=null,e.managedMembership=null)}}async function ke(){e.managedProviderStatus==="authenticated"&&await je(++Ie)}async function Le(){const oe=++Ie;try{const Se=await Pt().getAuth();return e.authReady=Se.ready,e.defaultModel=Se.defaultModel,e.managedProviderStatus=Se.managedProvider?.status??null,e.managedProviderStatus==="authenticated"?je(oe):(e.managedUserInfo=null,e.managedMembership=null),ce.value=null,"proceed"}catch(Ae){return Ps(Ae)&&(Ae.code===401||Ae.code===zE)?(ce.value=null,"server-auth-required"):(ce.value=(Ae instanceof Error?Ae.message:String(Ae)).slice(0,140),"retry")}}async function it(){let oe=!0;for(;;){const Ae=await Le();if(Ae!=="retry")return Ae;oe&&(ce.value=null,oe=!1),await new Promise(Se=>{setTimeout(Se,d6e)})}}async function Fe(){try{const oe=Pt();e.config=await oe.getConfig()}catch{}}async function Re(oe){try{const Se=await Pt().setConfig(oe);return e.config=Se,e.defaultModel=Se.defaultModel??null,!0}catch(Ae){return l("setConfig",Ae),!1}}const Ke=100,ht=720*60*1e3;async function ot(oe){const Ae=Pt(),Se=[];let Pe,Ye;for(;oe?.shouldContinue?.()!==!1;){let Je;try{Je=await Ae.listSessions({pageSize:Ke,beforeId:Pe,excludeEmpty:!0})}catch(xt){if(Se.length===0)throw xt;Ye=xt;break}if(Se.push(...Je.items),!Je.hasMore||Je.items.length===0)break;Pe=Je.items[Je.items.length-1].id}return{sessions:Se,error:Ye}}function gt(oe){const Ae=new Map(e.sessions.map(Se=>[Se.id,Se]));d(oe.map(Se=>{const Pe=Ae.get(Se.id);if(Pe===void 0)return Se;const Ye=ym(Se.usage)&&!ym(Pe.usage),Je=Se.pullRequest??Pe.pullRequest;return!Ye&&Je===Se.pullRequest?Se:{...Se,usage:Ye?Pe.usage:Se.usage,pullRequest:Je}}))}function Tt(oe){const Ae=[...oe],Se=new Set(Ae.map(Pe=>Pe.id));for(const Pe of e.sessions)Se.has(Pe.id)||(Ae.push(Pe),Se.add(Pe.id));return Ae.sort((Pe,Ye)=>new Date(Ye.updatedAt).getTime()-new Date(Pe.updatedAt).getTime()),Ae}async function yn(oe){const Ae=Pt(),Se=[],Pe=Date.now(),Ye=Ot=>Pe-new Date(Ot.updatedAt).getTime();let Je,xt=!1,bt=!0,nn;for(;;){let Ot;try{Ot=await Ae.listSessions({workspaceId:oe,pageSize:Ug,beforeId:Je,excludeEmpty:!0})}catch($t){if(bt)throw $t;nn=$t,xt=!0;break}if(xt=Ot.hasMore,Ot.items.length===0)break;const wn=Ot.items[Ot.items.length-1],Qn=Ye(wn)>=ht;if(!bt&&Qn){const $t=Ot.items.findIndex(Wn=>Ye(Wn)>=ht),Ht=$t>=0?$t+1:Ot.items.length;Se.push(...Ot.items.slice(0,Ht)),xt=Ot.hasMore||Ht<Ot.items.length;break}if(Se.push(...Ot.items),bt=!1,!Ot.hasMore||Qn)break;Je=wn.id}return{workspaceId:oe,page:{items:Se,hasMore:xt},error:nn}}async function Gt(){const oe=e.workspaces;if(oe.length===0){const $t=await ot(),Ht=$t.error===void 0?$t.sessions:Tt($t.sessions);return e.sessionsHasMoreByWorkspace={},e.sessionsCursorByWorkspace={},e.sessionsInitialCountByWorkspace={},e.sessionsFullyLoaded=$t.error===void 0,$t.error!==void 0&&l("load",$t.error),Ht}const Ae=await Promise.allSettled(oe.map($t=>yn($t.id))),Se=[],Pe=new Set,Ye=new Map,Je=new Set;let xt;for(let $t=0;$t<Ae.length;$t++){const Ht=Ae[$t];if(Ht.status==="fulfilled"){Ye.set(Ht.value.workspaceId,Ht.value.page),Ht.value.error!==void 0&&(Je.size===0&&(xt=Ht.value.error),Je.add(Ht.value.workspaceId));for(const Wn of Ht.value.page.items)Pe.has(Wn.id)||(Se.push(Wn),Pe.add(Wn.id));continue}Je.size===0&&(xt=Ht.reason),Je.add(oe[$t].id)}if(Ye.size===0){l("load",xt);return}const bt=new Set(oe.filter($t=>Je.has($t.id)).map($t=>$t.root)),nn=new Set(oe.map($t=>$t.id));for(const $t of e.sessions)!($t.workspaceId!==void 0&&nn.has($t.workspaceId)?Je.has($t.workspaceId):bt.has($t.cwd)||Je.has(W($t)))||Pe.has($t.id)||(Se.push($t),Pe.add($t.id));const Ot={},wn={},Qn={};for(const{id:$t}of oe){const Ht=Ye.get($t);if(Ht===void 0){const Wn=e.sessionsHasMoreByWorkspace[$t],Ee=e.sessionsCursorByWorkspace[$t],ct=e.sessionsInitialCountByWorkspace[$t];Wn!==void 0&&(Ot[$t]=Wn),Ee!==void 0&&(wn[$t]=Ee),ct!==void 0&&(Qn[$t]=ct);continue}Ot[$t]=Ht.hasMore,wn[$t]=Ht.items.length>0?Ht.items[Ht.items.length-1].id:void 0,Qn[$t]=Math.max(Ht.items.length,Ug)}return e.sessionsHasMoreByWorkspace=Ot,e.sessionsCursorByWorkspace=wn,e.sessionsInitialCountByWorkspace=Qn,e.sessionsFullyLoaded=!1,Se.sort(($t,Ht)=>new Date(Ht.updatedAt).getTime()-new Date($t.updatedAt).getTime()),Je.size>0&&l("load",xt),Se}async function Kt(oe){if(!e.sessionsLoadingMoreByWorkspace[oe]&&e.sessionsHasMoreByWorkspace[oe]!==!1&&e.sessionsCursorByWorkspace[oe]!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[oe]:!0};try{let Ae=e.sessionsCursorByWorkspace[oe],Se;for(let Je=0;Je<3&&Ae!==void 0&&(Se=await Pt().listSessions({workspaceId:oe,pageSize:tk,beforeId:Ae,excludeEmpty:!0}),e.sessionsCursorByWorkspace[oe]!==Ae);Je+=1)Se=void 0,Ae=e.sessionsCursorByWorkspace[oe];if(Se===void 0)return;const Pe=new Set(e.sessions.map(Je=>Je.id)),Ye=Se.items.filter(Je=>!Pe.has(Je.id));Ye.length>0&&d([...e.sessions,...Ye]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[oe]:Se.items.length>0?Se.items[Se.items.length-1].id:Ae},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[oe]:Se.hasMore}}catch(Ae){l("loadMoreSessions",Ae)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[oe]:!1}}}}function mn(oe){return e.sessions.filter(Ae=>!Ae.parentSessionId&&W(Ae)===oe)}const _n=5;function He(oe,Ae){const Se=new Set(e.sessions.map(Je=>Je.id)),Pe=oe.items.filter(Je=>!Se.has(Je.id)&&(Je.meta.last_prompt??"").length>0).map(YU);Pe.length>0&&d([...e.sessions,...Pe]);for(const Je of oe.items)if(Se.has(Je.id)&&Je.git!==void 0){const xt=Je.git.pull_request;f(Je.id,bt=>bt.pullRequest===xt?bt:{...bt,pullRequest:xt})}if(oe.items.length>0){const Je=Math.min(...oe.items.map(xt=>xt.meta.updated_at));e.flatSessionsFrontier=Ae?.resetFrontier===!0||e.flatSessionsFrontier===null?Je:Math.min(e.flatSessionsFrontier,Je)}e.flatSessionsNextPageToken=oe.nextPageToken,e.flatSessionsHasMore=oe.hasMore;const Ye=new Set(O.value.map(Je=>Je.id));return oe.items.filter(Je=>(Je.meta.last_prompt??"").length>0&&Ye.has(W({workspaceId:Je.workspace.id,cwd:Je.workspace.cwd??""}))).length}async function st(){const oe=await Pt().listSessionsV2({pageSize:f2,include:"git"});He(oe,{resetFrontier:!0}),e.flatSessionsSeeded=!0}async function Ve(){if(!(e.flatSessionsSeeded||e.flatSessionsLoading)){e.flatSessionsLoading=!0;try{await st()}catch(oe){l("ensureFlatSessions",oe)}finally{e.flatSessionsLoading=!1}}}async function Rt(){if(!(e.flatSessionsLoading||e.flatSessionsLoadingMore)&&e.flatSessionsHasMore){e.flatSessionsLoadingMore=!0;try{if(!e.flatSessionsSeeded){await st();return}if(e.flatSessionsNextPageToken===null)return;for(let oe=0;oe<_n;oe+=1){const Ae=e.flatSessionsNextPageToken;if(Ae===null||!e.flatSessionsHasMore)break;let Se;try{Se=await Pt().listSessionsV2({pageSize:f2,pageToken:Ae,include:"git"})}catch(Pe){if(!KU(Pe))throw Pe;e.flatSessionsNextPageToken=null,await st();break}if(He(Se)>0)break}}catch(oe){l("loadMoreFlatSessions",oe)}finally{e.flatSessionsLoadingMore=!1}}}async function Ct(oe,Ae,Se,Pe){if(e.sessionsCursorByWorkspace[oe]===Ae){const Je=new Date(Se).getTime();let xt;for(const bt of e.sessions){if(W(bt)!==oe)continue;const nn=new Date(bt.updatedAt).getTime();nn<=Je||(xt===void 0||nn<new Date(xt.updatedAt).getTime())&&(xt=bt)}e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[oe]:xt?.id}}let Ye=3;for(;Ye>0&&mn(oe).length<Pe&&(e.sessionsHasMoreByWorkspace[oe]??!1);){const Je=e.sessionsCursorByWorkspace[oe],xt=mn(oe).length;if(Je===void 0)try{const bt=await Pt().listSessions({workspaceId:oe,pageSize:Ug,excludeEmpty:!0}),nn=new Set(e.sessions.map(wn=>wn.id)),Ot=bt.items.filter(wn=>!nn.has(wn.id));Ot.length>0&&d([...e.sessions,...Ot].sort((wn,Qn)=>new Date(Qn.updatedAt).getTime()-new Date(wn.updatedAt).getTime())),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[oe]:bt.items.length>0?bt.items[bt.items.length-1].id:void 0},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[oe]:bt.hasMore}}catch(bt){l("loadMoreSessions",bt);break}else await Kt(oe);if(Ye-=1,mn(oe).length===xt&&e.sessionsCursorByWorkspace[oe]===Je)break}}async function Fn(){if(e.sessionsFullyLoaded)return;const oe=await ot().catch(Pe=>(Dl("[kimi-web] loadAllSessions failed; search covers only loaded sessions",Pe),null));if(oe===null)return;const Ae=oe.error===void 0?oe.sessions:Tt(oe.sessions);if(gt(Ae),e.sessionsFullyLoaded=oe.error===void 0,oe.error!==void 0)return;const Se={};for(const Pe of e.workspaces)Se[Pe.id]=!1;e.sessionsHasMoreByWorkspace=Se}async function Tn(){const oe=await Pt().getMeta().catch(()=>null);oe!==null&&(e.serverVersion=oe.serverVersion,e.availableOpenInApps=oe.openInApps,e.dangerousBypassAuth=oe.dangerousBypassAuth,e.experimentalFlags=oe.experimentalFlags,e.backend=oe.backend,e.webTitle=oe.webTitle)}async function as(){const oe=Date.now();let Ae="accepted";Bo("app:load:start"),e.loading=!0;const Se=!xe.value;let Pe=!0;try{if(Se&&await it()==="server-auth-required"){Pe=!1,Ae="auth-required";return}const Ye=Pt();await Promise.all([Ye.getHealth().catch(()=>null),Tn(),r.loadModels()]),Se||await Le(),await Fe(),await Qt();const Je=await Gt(),xt=Je??e.sessions;if(Je!==void 0&>(Je),!Se&&Je!==void 0&&e.flatSessionsSeeded){e.flatSessionsSeeded=!1,e.flatSessionsNextPageToken=null,e.flatSessionsHasMore=!0,e.flatSessionsFrontier=null;try{await st()}catch($t){l("ensureFlatSessions",$t)}}const bt=zL().filter($t=>!e.sessions.some(Ht=>Ht.id===$t));if(bt.length>0){const $t=await Promise.all(bt.map(Wn=>co(Wn))),Ht=bt.filter((Wn,Ee)=>$t[Ee]==="stale");Ht.length>0&&y(Ht)}for(const $t of e.sessions)($t.mainTurnActive??$t.busy)&&e.goalBySession[$t.id]===void 0&&N($t.id);const nn=xt[0],Ot=e.activeWorkspaceId;!(Ot!==null&&P.value.some($t=>$t.id===Ot))&&nn&&zn(W(nn)),vi();const Qn=typeof window<"u"?AC(window.location):void 0;!e.activeSessionId&&Qn!==void 0&&(e.sessions.some(Ht=>Ht.id===Qn)||await Yi(Qn))&&await Mn(Qn,{urlMode:"replace"}),!e.activeSessionId&&xt.length>0&&await Mn(xt[0].id,{urlMode:"replace"})}catch(Ye){Ae="failed",l("load",Ye)}finally{e.loading=!1,Pe&&(xe.value=!0),Bo("app:load:complete",{status:Ae,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-oe})}}async function Qt(){try{const oe=Pt(),[Ae,Se]=await Promise.all([oe.listWorkspaces().catch(()=>[]),oe.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=ni(Ae),e.fsHome=Se.home||null,e.recentRoots=Se.recentRoots}catch{}}function ni(oe){const Ae=P0();return Object.keys(Ae).length===0?oe:oe.map(Se=>{const Pe=Ae[Se.root];return Pe!==void 0?{...Se,name:Pe}:Se})}function zn(oe){e.activeWorkspaceId=oe,ee(oe)}function Sn(oe){zn(oe);const Ae=e.sessions.filter(Se=>W(Se)===oe);if(Ae.length>0){const Se=Ae[0];Se&&Se.id!==e.activeSessionId&&Mn(Se.id)}else w(void 0),_i(void 0,"push")}function mi(oe){const Ae=P0()[oe.root],Se=Ae!==void 0?{...oe,name:Ae}:oe,Pe=el(Se.root);e.hiddenWorkspaceRoots.some(xt=>el(xt)===Pe)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(xt=>el(xt)!==Pe),ue(e.hiddenWorkspaceRoots));const Ye=e.workspaces.findIndex(xt=>xt.id===Se.id||xt.root===Se.root);if(Ye===-1){e.workspaces=[Se,...e.workspaces];return}const Je=[...e.workspaces];Je[Ye]=Se,e.workspaces=Je}function Ws(oe){if(oe.type==="workspaceCreated"||oe.type==="workspaceUpdated"){mi(oe.workspace);return}const Ae=e.workspaces.find(Pe=>Pe.id===oe.workspaceId)?.root??oe.root;if(Ae&&!e.hiddenWorkspaceRoots.includes(Ae)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Ae],ue(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(Pe=>Pe.id!==oe.workspaceId&&Pe.root!==Ae),e.activeWorkspaceId===oe.workspaceId||e.activeWorkspaceId===Ae){const Pe=O.value[0]?.id??null;if(e.activeWorkspaceId=Pe,Pe)ee(Pe);else try{lr(un.activeWorkspace)}catch{}w(void 0),e.sessionLoading=!1,de(),_i(void 0,"replace")}}function Li(){w(void 0),_i(void 0,"push")}function Lt(oe){zn(oe),Li(),de()}async function xi(oe){const Ae=P.value.find(wn=>wn.id===oe);if(!Ae)return null;const Se=e.thinking,Pe=Pt();let Ye,Je=Ae.root;try{const wn=await Pe.addWorkspace({root:Ae.root});Ye=wn.id,Je=wn.root,mi(wn)}catch{}const xt=r.draftModel.value??void 0,bt=await Pe.createSession({workspaceId:Ye,cwd:Je,model:xt});r.draftModel.value=null;const nn=xt!==void 0&&(!bt.model||bt.model.length===0)?{...bt,model:xt}:bt;p(nn);const Ot=bt.id;return Se!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Ot]:Se},m3(e,Ot)),zn(bt.workspaceId??Ye??oe),await Mn(bt.id,{skipStatusRefresh:!0}),q.planMode&&(e.planArmedBySession={...e.planArmedBySession,[Ot]:!0},G()),q.swarmMode&&(e.swarmModeBySession={...e.swarmModeBySession,[Ot]:!0},K()),q.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[Ot]:!0},H()),q.planMode=!1,q.swarmMode=!1,q.goalMode=!1,Ot}async function Qi(oe,Ae,Se){if(Tl.has(oe))return null;Tl.add(oe);let Pe=null;try{const Ye=await xi(oe);return Ye?(Pe=Ye,await Dn(Ye,Ae,Se),Ye):null}catch(Ye){return l("startSessionAndSendPrompt",Ye),Pe}finally{Tl.delete(oe)}}async function ci(oe,Ae,Se,Pe){if(Tl.has(oe))return null;Tl.add(oe);let Ye=null;try{const Je=await xi(oe);if(!Je)return null;Ye=Je;const xt=e.planArmedBySession[Je]??!1,bt=e.swarmModeBySession[Je]??!1,nn=e.sessions.find($t=>$t.id===Je),Ot=(nn?.model&&nn.model.length>0?nn.model:e.defaultModel)??void 0,wn=await r.resolveThinkingForPrompt(Je,Ot)??e.thinking;return await $({model:Ot,planMode:xt,swarmMode:bt,permissionMode:e.permission,thinking:wn},Je)&&(xt&&(e.planArmedBySession={...e.planArmedBySession,[Je]:!1},G(),e.planModeBySession={...e.planModeBySession,[Je]:!0}),await r.activateSkill(Ae,Se,Pe,Je,{skipThinkingPersist:!0})),Je}catch(Je){return l("startSessionAndActivateSkill",Je),Ye}finally{Tl.delete(oe)}}async function Fs(oe,Ae){if(Tl.has(oe))return null;Tl.add(oe);let Se=null;try{const Pe=await xi(oe);return Pe?(Se=Pe,await o.openSideChatOn(Pe,Ae),Pe):null}catch(Pe){return l("startSessionAndOpenSideChat",Pe),Se}finally{Tl.delete(oe)}}async function Ni(oe){const Ae=oe.trim();if(!Ae)return!1;const Se=Pt();try{const Pe=await Se.addWorkspace({root:Ae});return mi(Pe),Lt(Pe.id),!0}catch(Pe){return Dl("[kimi-web] addWorkspaceByPath failed for",Ae,Pe),!1}}async function $i(oe){try{return await Pt().browseFs(oe)}catch{return{path:"",parent:null,entries:[]}}}async function So(){try{return await Pt().getFsHome()}catch{return{home:"",recentRoots:[]}}}function _i(oe,Ae){if(Ae==="none"||typeof window>"u"||!window.history)return;const Se=Wte(oe);if(window.location.pathname!==Se)try{Ae==="push"?window.history.pushState(null,"",Se):window.history.replaceState(null,"",Se)}catch{}}async function Yi(oe){try{const Ae=await Pt().getSession(oe);return e.sessions.some(Se=>Se.id===Ae.id)||g(Ae),!0}catch{return!1}}async function co(oe){try{const Ae=await Pt().getSession(oe);return Ae.archived?"stale":(e.sessions.some(Se=>Se.id===Ae.id)||g(Ae),"ok")}catch(Ae){return Ps(Ae)&&Ae.code===r6e?"stale":"retry"}}function Bs(){const oe=AC(window.location);if(oe===void 0){w(void 0);return}if(oe!==e.activeSessionId){if(e.sessions.some(Ae=>Ae.id===oe)){Mn(oe,{urlMode:"none"});return}(async()=>{if(await Yi(oe)){await Mn(oe,{urlMode:"none"});return}const Ae=e.sessions[0];Ae?await Mn(Ae.id,{urlMode:"replace"}):(w(void 0),_i(void 0,"replace"))})()}}let Hi=!1;function vi(){Hi||typeof window>"u"||(Hi=!0,window.addEventListener("popstate",Bs))}async function Mn(oe,Ae){if(!e.sessions.some(Ye=>Ye.id===oe)){const Ye=++Y;if(!await Yi(oe)||Ye!==Y)return}const Se=S(oe),Pe=!Se&&c.has(oe);c.delete(oe);try{_i(oe,Ae?.urlMode??"push"),e.sessionLoading=!Se&&!Pe,w(oe),e.unreadBySession[oe]&&(e.unreadBySession={...e.unreadBySession,[oe]:!1},X({[oe]:!1})),de();const Ye=e.sessions.find(Je=>Je.id===oe);if(Ye){const Je=W(Ye);e.activeWorkspaceId!==Je&&zn(Je)}if(Se){if(await E(oe)==="not-found")return}else if(await x(oe,{skipStatusRefresh:Ae?.skipStatusRefresh===!0})==="not-found")return;U(oe,{skipStatus:Ae?.skipStatusRefresh===!0})}catch(Ye){l("selectSession",Ye,{sessionId:oe})}finally{e.activeSessionId===oe&&(e.sessionLoading=!1)}}async function Dn(oe,Ae,Se){const Pe=I8(oe);e.inFlightBySession={...e.inFlightBySession,[oe]:!0};const Ye=A();let Je=e.pendingThinkingBySession[oe];try{const xt=Pt(),bt=[];if(Ae&&bt.push({type:"text",text:Ae}),bt.push(...M8(Se)),bt.length===0)return e.inFlightBySession={...e.inFlightBySession,[oe]:!1},"rejected";const nn={id:Ye,sessionId:oe,role:"user",content:bt,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};k(oe,dt=>[...dt,nn]);const Ot=e.sessions.find(dt=>dt.id===oe),wn=(Ot?.model&&Ot.model.length>0?Ot.model:e.defaultModel)??void 0,Qn=e.planArmedBySession[oe]??!1,$t=Qn||(e.planModeBySession[oe]??!1),Ht=e.swarmModeBySession[oe]??!1,Wn=e.goalModeBySession[oe]??!1;Qn&&(e.planArmedBySession={...e.planArmedBySession,[oe]:!1},G(),(e.planModeBySession[oe]??!1)||(await xt.updateSession(oe,{planMode:!0}),e.planModeBySession={...e.planModeBySession,[oe]:!0})),Wn&&Ae&&(await xt.updateSession(oe,{goalObjective:Ae.trim(),planMode:!1}),e.planModeBySession={...e.planModeBySession,[oe]:!1});const Ee=await r.resolveThinkingForPrompt(oe,wn)??e.thinking;Je=e.pendingThinkingBySession[oe];const ct=await xt.submitPrompt(oe,{content:bt,model:wn,thinking:Ee,permissionMode:e.permission,planMode:$t&&!(Wn&&Ae),swarmMode:Ht});return Ee!==void 0&&Ca(e,oe,Je),Wn&&Ae&&(e.goalModeBySession={...e.goalModeBySession,[oe]:!1},H()),e.promptIdBySession={...e.promptIdBySession,[oe]:ct.promptId},re(oe,Ye,ct.promptId,ct.userMessageId),v()?.bindNextPromptId(oe,ct.promptId),"ok"}catch(xt){return e.inFlightBySession={...e.inFlightBySession,[oe]:!1},k(oe,bt=>bt.some(nn=>nn.id===Ye)?bt.filter(nn=>nn.id!==Ye||nn.promptId!==void 0||nn.userMessageId!==void 0):bt),Ca(e,oe,Je)&&M(oe),l("sendPrompt",xt,{sessionId:oe}),Ps(xt)?"rejected":"uncertain"}finally{E8(oe,Pe)}}async function Ln(oe,Ae){const Se=e.activeSessionId;if(Se){if(u.value!=="idle"||e.inFlightBySession[Se]){Di(oe,Ae);return}if((e.queuedBySession[Se]?.length??0)>0){Di(oe,Ae),ri(Se);return}await Dn(Se,oe,Ae)}}async function ws(oe,Ae){const Se=e.activeSessionId;if(!Se)return;const Pe=e.queuedBySession[Se]??[],Ye=[],Je=[];for(const Ht of Pe){const Wn=Ht.text.trim();Wn&&Ye.push(Wn),Ht.attachments?.length&&Je.push(...Ht.attachments)}const xt=oe.trim();if(xt&&Ye.push(xt),Ae?.length&&Je.push(...Ae),Ye.length===0&&Je.length===0)return;Pe.length>0&&(e.queuedBySession={...e.queuedBySession,[Se]:[]});const bt=Ye.join(` + +`),nn=()=>{if(Pe.length===0)return;const Ht=e.queuedBySession[Se]??[];e.queuedBySession={...e.queuedBySession,[Se]:[...Pe,...Ht]}};if(u.value==="idle"&&!e.inFlightBySession[Se]){await Dn(Se,bt,Je)==="rejected"&&nn();return}const Ot=[];bt&&Ot.push({type:"text",text:bt});for(const Ht of Je)Ht.kind==="video"?Ot.push({type:"video",source:{kind:"file",fileId:Ht.fileId}}):Ht.kind==="file"?Ot.push({type:"file",fileId:Ht.fileId,name:Ht.name??"",mediaType:Ht.mediaType||"application/octet-stream",size:Ht.size??0}):Ot.push({type:"image",source:{kind:"file",fileId:Ht.fileId}});const wn=A(),Qn={id:wn,sessionId:Se,role:"user",content:Ot,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};k(Se,Ht=>[...Ht,Qn]);const $t=I8(Se);try{const Ht=Pt(),Wn=e.sessions.find(ki=>ki.id===Se),Ee=(Wn?.model&&Wn.model.length>0?Wn.model:e.defaultModel)??void 0,ct=await r.resolveThinkingForPrompt(Se,Ee)??e.thinking,dt=e.pendingThinkingBySession[Se],Wt=await Ht.submitPrompt(Se,{content:Ot,model:Ee,thinking:ct,permissionMode:e.permission,planMode:e.planModeBySession[Se]??!1,swarmMode:e.swarmModeBySession[Se]??!1});if(ct!==void 0&&Ca(e,Se,dt),re(Se,wn,Wt.promptId,Wt.userMessageId),Wt.status!=="queued"){e.promptIdBySession={...e.promptIdBySession,[Se]:Wt.promptId},v()?.bindNextPromptId(Se,Wt.promptId);return}try{await Ht.steerPrompts(Se,[Wt.promptId])}catch{}}catch(Ht){k(Se,Wn=>Wn.filter(Ee=>Ee.id!==wn||Ee.promptId!==void 0||Ee.userMessageId!==void 0)),Ps(Ht)&&nn(),l("steer",Ht,{sessionId:Se})}finally{E8(Se,$t)}}async function Cn(oe,Ae){try{const Pe=await Pt().uploadFile({file:oe,name:Ae});return{fileId:Pe.id,name:Pe.name,mediaType:Pe.mediaType}}catch(Se){return l("uploadImage",Se),null}}function Di(oe,Ae){const Se=e.activeSessionId;if(!Se)return;const Pe=e.queuedBySession[Se]??[],Ye={text:oe,attachments:Ae,id:A6e()};e.queuedBySession={...e.queuedBySession,[Se]:[...Pe,Ye]}}function ri(oe){const[Ae,...Se]=e.queuedBySession[oe]??[];Ae!==void 0&&(e.queuedBySession={...e.queuedBySession,[oe]:Se},Dn(oe,Ae.text,Ae.attachments).then(Pe=>{if(Pe==="ok"){bc.delete(oe);return}if(Pe==="uncertain"){bc.delete(oe);return}if(!e.sessions.some(nn=>nn.id===oe)){bc.delete(oe);return}const Ye=Ae.id??Ae.text,Je=bc.get(oe),xt=Je!==void 0&&Je.key===Ye?Je.count+1:1;if(xt>=y6e){bc.delete(oe),(e.queuedBySession[oe]?.length??0)>0&&ri(oe);return}bc.set(oe,{key:Ye,count:xt});const bt=e.queuedBySession[oe]??[];e.queuedBySession={...e.queuedBySession,[oe]:[Ae,...bt]}}))}function ur(oe,Ae){const Se=e.inFlightBySession[oe]===!0;if(e.inFlightBySession={...e.inFlightBySession,[oe]:!1},e.promptIdBySession[oe]!==void 0){const Ye={...e.promptIdBySession};delete Ye[oe],e.promptIdBySession=Ye}return(Se||Ae?.turnWasActive===!0||(e.turnActiveBySession[oe]??!1))&&ri(oe),Se}function jo(oe,Ae){Ae.inFlightTurn!==null&&Ae.busy||ur(oe)}async function On(){const oe=e.activeSessionId;if(!oe)return!1;const Ae=e.sessions.find(bt=>bt.id===oe);let Se=e.promptIdBySession[oe];if(Se===void 0){const bt=Ae?.currentPromptId;bt!==void 0&&bt.length>0&&!bt.startsWith("pr_")&&(Se=bt)}const Pe=Pt();let Ye=!1;const Je=()=>{e.inFlightBySession={...e.inFlightBySession,[oe]:!1},e.turnActiveBySession={...e.turnActiveBySession,[oe]:!1}};if(Se!==void 0)try{if((await Pe.abortPrompt(oe,Se)).aborted)return!0;Ye=!0;const nn={...e.promptIdBySession};delete nn[oe],e.promptIdBySession=nn,Je()}catch(bt){if(Ps(bt)&&bt.code===l6e){Ye=!0;const nn={...e.promptIdBySession};delete nn[oe],e.promptIdBySession=nn,Je()}else return l("abortCurrentPrompt",bt,{sessionId:oe}),!1}if(Ye||!((e.inFlightBySession[oe]??!1)||(e.turnActiveBySession[oe]??!1)||(Ae?.mainTurnActive??!1)))return!1;try{return(await Pe.abortSession(oe)).aborted===!0}catch(bt){return l("abortCurrentPrompt",bt,{sessionId:oe}),!1}}function us(oe,Ae){const Se=e.approvalsBySession[oe]??[];e.approvalsBySession={...e.approvalsBySession,[oe]:Se.filter(Pe=>Pe.approvalId!==Ae)}}function qs(oe,Ae){const Se=e.questionsBySession[oe]??[];e.questionsBySession={...e.questionsBySession,[oe]:Se.filter(Pe=>Pe.questionId!==Ae)}}async function Us(oe,Ae){const Se=e.activeSessionId;if(!Se||dg[oe])return;dg[oe]=!0;const Pe=e.approvalsBySession[Se]?.find(Ye=>Ye.approvalId===oe&&Ye.toolName==="ExitPlanMode")?.toolCallId;try{const Ye=Pt(),Je={decision:Ae.decision,scope:Ae.scope,feedback:Ae.feedback,selectedLabel:Ae.selectedLabel};await Ye.respondApproval(Se,oe,Je),us(Se,oe),Pe!==void 0&&(T(Se,Pe,{state:Ae.decision,selectedOption:Ae.selectedLabel,feedback:Ae.feedback}),D(Se,Pe))}catch(Ye){g4(Ye)?(us(Se,oe),Pe!==void 0&&D(Se,Pe)):l("respondApproval",Ye,{sessionId:Se})}finally{delete dg[oe]}}async function Ji(oe,Ae){const Se=e.activeSessionId;if(Se&&!gc[oe]){gc[oe]="answer";try{await Pt().respondQuestion(Se,oe,Ae),qs(Se,oe)}catch(Pe){g4(Pe)?qs(Se,oe):l("respondQuestion",Pe,{sessionId:Se})}finally{delete gc[oe]}}}async function $e(oe){const Ae=e.activeSessionId;if(Ae&&!gc[oe]){gc[oe]="dismiss";try{await Pt().dismissQuestion(Ae,oe),qs(Ae,oe)}catch(Se){g4(Se)?qs(Ae,oe):l("dismissQuestion",Se,{sessionId:Ae})}finally{delete gc[oe]}}}async function nt(oe){const Ae=e.activeSessionId;if(Ae&&!m4[oe]){m4[oe]=!0;try{const Se=Pt(),Pe=(e.tasksBySession[Ae]??[]).find(Je=>Je.id===oe)?.backgroundTaskId;await Se.cancelTask(Ae,Pe??oe);const Ye=e.tasksBySession[Ae]??[];e.tasksBySession={...e.tasksBySession,[Ae]:Ye.map(Je=>Je.id===oe?{...Je,status:"cancelled",completedAt:Je.completedAt??new Date().toISOString(),completedAtEstimated:Je.completedAt===void 0?!0:Je.completedAtEstimated}:Je)}}catch(Se){p6e(Se)||l("cancelTask",Se,{sessionId:Ae})}finally{delete m4[oe]}}}function Nt(oe){const Ae=e.activeSessionId;Ae?(e.planArmedBySession={...e.planArmedBySession,[Ae]:oe},G(),!oe&&(e.planModeBySession[Ae]??!1)&&(e.planModeBySession={...e.planModeBySession,[Ae]:!1},$({planMode:!1},Ae))):q.planMode=oe}function Zt(){const oe=e.activeSessionId,Ae=oe?(e.planArmedBySession[oe]??!1)||(e.planModeBySession[oe]??!1):q.planMode;Nt(!Ae)}function Nn(oe){const Ae=e.activeSessionId;Ae?(e.swarmModeBySession={...e.swarmModeBySession,[Ae]:oe},K(),$({swarmMode:oe})):q.swarmMode=oe}async function cs(){const oe=e.activeSessionId,Se=!(oe?e.swarmModeBySession[oe]??!1:q.swarmMode);Se&&e.permission==="manual"&&!await i({title:n("workspace.swarmEnableTitle"),message:n("workspace.swarmEnableConfirm"),variant:"primary"})||Nn(Se)}function Fi(oe){const Ae=e.activeSessionId;Ae?(e.goalModeBySession={...e.goalModeBySession,[Ae]:oe},H()):q.goalMode=oe}function di(){const oe=e.activeSessionId,Ae=oe?e.goalModeBySession[oe]??!1:q.goalMode;Fi(!Ae)}async function fi(oe){const Ae=oe.trim();if(!Ae||e.permission==="manual"&&!await i({title:n("workspace.goalStartTitle"),message:n("workspace.goalStartConfirm",{objective:Ae}),variant:"primary"}))return null;let Se=e.activeSessionId,Pe=null;if(!Se){const Ye=e.activeWorkspaceId,Je=Ye&&O.value.some(xt=>xt.id===Ye)?Ye:O.value[0]?.id??null;if(!Je)return null;try{Se=await xi(Je)??void 0,Pe=Se??null}catch(xt){return l("createGoal",xt),null}if(!Se)return null}try{await Pt().updateSession(Se,{goalObjective:Ae,planMode:!1}),e.planModeBySession={...e.planModeBySession,[Se]:!1}}catch(Ye){return l("createGoal",Ye,{sessionId:Se,message:ie(Ye)}),Pe}return e.goalModeBySession[Se]&&(e.goalModeBySession={...e.goalModeBySession,[Se]:!1},H()),e.activeSessionId===Se?await Ln(Ae):await Dn(Se,Ae),Pe}function Ks(oe){const Ae=e.activeSessionId;Ae&&Promise.resolve(Pt().updateSession(Ae,{goalControl:oe})).catch(Se=>{l("controlGoal",Se,{sessionId:Ae,message:ie(Se)})})}function Si(oe){e.permission=oe,z(oe),$({permissionMode:oe})}function Vs(oe){const Ae=[...e.warnings];Ae.splice(oe,1),e.warnings=Ae}async function Zs(oe,Ae){try{await Pt().updateSession(oe,{title:Ae}),f(oe,Pe=>({...Pe,title:Ae}))}catch(Se){l("renameSession",Se,{sessionId:oe})}}async function Wi(oe){const Ae=await Pt().generateSessionTitle(oe,{force:!0,source:"digest"});return Ae===null&&a({severity:"info",title:n("sidebar.genTitleUnavailable")}),Ae}async function xs(oe,Ae){const Se=e.workspaces.find(Ye=>Ye.id===oe)?.root,Pe=()=>{e.workspaces=e.workspaces.map(Ye=>Ye.id===oe?{...Ye,name:Ae}:Ye)};try{if(await Pt().updateWorkspace(oe,{name:Ae}),Se!==void 0){const Ye=P0();Se in Ye&&(delete Ye[Se],QC(Ye))}Pe()}catch(Ye){if(Se!==void 0&&Ps(Ye)&&Ye.code===a6e){QC({...P0(),[Se]:Ae}),Pe();return}l("renameWorkspace",Ye)}}async function fo(oe){const Ae=e.workspaces.find(Je=>Je.id===oe)?.root??P.value.find(Je=>Je.id===oe)?.root??oe,Se=e.activeSessionId?e.sessions.find(Je=>Je.id===e.activeSessionId):void 0,Pe=e.activeWorkspaceId===oe||e.activeWorkspaceId===Ae,Ye=!!(Se&&(Se.cwd===Ae||Se.workspaceId===oe||W(Se)===oe));Ae&&!e.hiddenWorkspaceRoots.includes(Ae)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Ae],ue(e.hiddenWorkspaceRoots));try{await Pt().deleteWorkspace(oe)}catch(Je){Dl("[kimi-web] deleteWorkspace registry cleanup failed for",oe,Je)}if(e.workspaces=e.workspaces.filter(Je=>Je.id!==oe&&Je.root!==Ae),Pe||Ye){const Je=O.value[0]?.id??null;if(e.activeWorkspaceId=Je,Je)ee(Je);else try{lr(un.activeWorkspace)}catch{}}(Pe||Ye)&&(w(void 0),e.sessionLoading=!1,de(),_i(void 0,"replace"))}async function yi(oe){try{const Ae=Pt(),Se=e.sessions.find(bt=>bt.id===oe),Pe=Se!==void 0?W(Se):void 0,Ye=Pe!==void 0?mn(Pe).length:0;await Ae.archiveSession(oe),m(oe),Kg.delete(oe),Se!==void 0&&Pe!==void 0&&Ct(Pe,oe,Se.updatedAt,Ye),o.clearSideChatForSession(oe);const{[oe]:Je,...xt}=e.sideChatUserMessageIdsBySession;if(e.sideChatUserMessageIdsBySession=xt,e.activeSessionId===oe){const bt=e.sessions[0];bt?await Mn(bt.id,{urlMode:"replace"}):(w(void 0),_i(void 0,"replace"))}}catch(Ae){l("archiveSession",Ae,{sessionId:oe})}}async function Mo(oe){if(ve)return!1;const Ae=oe??e.activeSessionId;if(!Ae){const Pe=n("commands.export.noSession");return Bo("export:failed",{status:"no-session"}),l("exportSession",new Error(Pe),{message:Pe}),!1}ve=!0;const Se=Date.now();Bo("export:start",{sessionId:Ae});try{const Pe=zke(),{blob:Ye,fileName:Je}=await Pt().exportSession(Ae,Pe,{desktop:Wf});if(typeof document>"u")throw new Error("Document is unavailable");const xt=URL.createObjectURL(Ye);let bt;try{bt=document.createElement("a"),bt.href=xt,bt.download=Je,document.body.append(bt),bt.click()}finally{bt?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(xt)}catch{}},0)}return Bo("export:accepted",{sessionId:Ae,status:"accepted",zipBytes:Ye.size,durationMs:Date.now()-Se}),!0}catch(Pe){const Ye=typeof Pe=="object"&&Pe!==null?Pe:void 0;return Bo("export:failed",{sessionId:Ae,status:"failed",durationMs:Date.now()-Se,errorName:typeof Ye?.name=="string"?Ye.name:typeof Pe,errorCode:typeof Ye?.code=="number"?Ye.code:void 0,requestId:typeof Ye?.requestId=="string"?Ye.requestId:void 0,phase:typeof Ye?.phase=="string"?Ye.phase:void 0,httpStatus:typeof Ye?.status=="number"?Ye.status:void 0}),l("exportSession",Pe,{sessionId:Ae,...Ps(Pe)&&Pe.code===qU?{message:n("commands.export.tooLarge",{sessionId:Ae})}:{}}),!1}finally{ve=!1}}async function ho(oe){try{const Ae=await Pt().restoreSession(oe);return p(Ae),!0}catch(Ae){return l("restoreSession",Ae,{sessionId:oe}),!1}}function Gs(oe){return Pt().listSessions({archivedOnly:!0,beforeId:oe?.beforeId,pageSize:oe?.pageSize??50})}async function ds(){try{await Pt().logout(),await Le(),await as()}catch(oe){l("logout",oe)}}function Ho(oe){const Ae=e.activeSessionId;Ae&&Pt().compactSession(Ae,oe).catch(Se=>{l("compact",Se,{sessionId:Ae})})}async function cr(oe){const Ae=oe??e.activeSessionId;if(Ae)try{const Se=await Pt().forkSession(Ae);p(Se),await Mn(Se.id)}catch(Se){l("fork",Se,{sessionId:Ae})}}async function ft(oe=1){const Ae=e.activeSessionId;if(!Ae)return null;const Se=e.messagesBySession[Ae]??[];let Pe=-1;for(let bt=Se.length-1;bt>=0;bt--){const nn=Se[bt];if(nn.role==="user"&&!(nn.metadata?.origin&&nn.metadata.origin.kind!=="user")){Pe=bt;break}}const Ye=Pe>=0?Se[Pe].content.filter(bt=>bt.type==="text").map(bt=>bt.text).join(` +`):null,Je=oe===1&&Pe>=0&&Se.slice(Pe+1).every(bt=>bt.role!=="user"),xt=Je?e.sessions.find(bt=>bt.id===Ae):void 0;if(Je&&(e.messagesBySession={...e.messagesBySession,[Ae]:Se.slice(0,Pe)},xt!==void 0)){const bt={...xt};delete bt.lastTurnReason,p(bt)}try{return await Pt().undoSession(Ae,oe),await x(Ae),{text:Ye}}catch(bt){return Je&&(e.messagesBySession={...e.messagesBySession,[Ae]:Se},xt!==void 0&&p(xt),await x(Ae).catch(()=>{})),l("undo",bt,{sessionId:Ae}),null}}function Me(oe){const Ae=e.activeSessionId;if(!Ae)return;const Se=e.queuedBySession[Ae]??[];if(oe<0||oe>=Se.length)return;const Pe=[...Se];Pe.splice(oe,1),e.queuedBySession={...e.queuedBySession,[Ae]:Pe}}function Ze(oe,Ae){const Se=e.activeSessionId;if(!Se)return;const Pe=e.queuedBySession[Se]??[];if(oe===Ae||oe<0||oe>=Pe.length||Ae<0||Ae>=Pe.length)return;const Ye=[...Pe],[Je]=Ye.splice(oe,1);Je!==void 0&&(Ye.splice(Ae,0,Je),e.queuedBySession={...e.queuedBySession,[Se]:Ye})}async function on(oe){const Ae=e.activeSessionId;if(!Ae)return[];try{return(await Pt().listDirectory(Ae,{path:oe,includeGitStatus:!0})).items}catch{return[]}}async function Mi(oe){const Ae=e.activeSessionId;if(!Ae)return null;try{const Pe=await Pt().readFile(Ae,{path:oe});return{path:Pe.path,content:Pe.content,encoding:Pe.encoding,mime:Pe.mime,languageId:Pe.languageId,isBinary:Pe.isBinary,size:Pe.size,lineCount:Pe.lineCount}}catch(Se){if(Dl("[kimi-web] readFileContent failed for",oe,Se),Ps(Se)&&Se.code===u6e)throw Se;return null}}async function Wo(oe){return Pt().readHostFileContent(oe)}const bi=10485760;function Al(oe){const Ae=e.activeSessionId;return Ae?Pt().getFileDownloadUrl(Ae,oe):null}async function qo(oe,Ae){const Se=e.activeSessionId;if(!Se)return!1;try{return await Pt().openFile(Se,{path:oe,line:Ae}),!0}catch(Pe){return l("openFile",Pe,{sessionId:Se}),!1}}async function Er(oe){const Ae=e.activeSessionId;if(!Ae)return;const Se=R.value.cwd||".";try{await Pt().openInApp(Ae,oe,Se)}catch(Pe){l("openInApp",Pe,{sessionId:Ae})}}async function dr(oe){const Ae=e.activeSessionId;if(!Ae)return!1;try{return await Pt().revealFile(Ae,{path:oe}),!0}catch(Se){return l("revealFile",Se,{sessionId:Ae}),!1}}function fr(oe){return oe.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(oe)||oe.startsWith("\\\\")}async function po(oe){if(/^(https?:|data:|blob:)/i.test(oe))return oe;const Ae=e.activeSessionId;if(!Ae)return oe;let Se=oe;if(fr(Se)){const Pe=e.sessions.find(Je=>Je.id===Ae)?.cwd,Ye=Pe?av(Se,Pe):null;if(Ye)Se=Ye;else try{const Je=await Wo(Se);return!Je.isBinary||Je.encoding!=="base64"?oe:`data:${Je.mime};base64,${Je.content}`}catch{return oe}}try{const Ye=await Pt().readFile(Ae,{path:Se,length:bi});return!Ye.isBinary||Ye.encoding!=="base64"||Ye.truncated?oe:`data:${Ye.mime};base64,${Ye.content}`}catch{return oe}}async function Gl(oe){const Ae=e.sessions.find(Pe=>Pe.id===e.activeSessionId),Se=Ae===void 0?e.activeWorkspaceId:W(Ae);if(!Se)return[];try{return(await Pt().searchFiles(Se,{query:oe,limit:20})).items.map(Je=>({path:Je.path,name:Je.name}))}catch{return[]}}return{loadFileDiff:J,clearFileDiff:de,loadGitStatus:me,checkAuth:Le,probeManagedMembership:ke,loadConfig:Fe,updateConfig:Re,listAllSessionsGlobal:ot,load:as,refreshServerMeta:Tn,loadWorkspaces:Qt,loadMoreSessions:Kt,loadAllSessions:Fn,ensureFlatSessions:Ve,loadMoreFlatSessions:Rt,selectWorkspace:zn,openWorkspace:Sn,upsertWorkspacePreserveOrder:mi,applyWorkspaceEvent:Ws,clearActiveSession:Li,openWorkspaceDraft:Lt,startSessionAndSendPrompt:Qi,startSessionAndActivateSkill:ci,startSessionAndOpenSideChat:Fs,addWorkspaceByPath:Ni,browseFs:$i,getFsHome:So,writeSessionUrl:_i,fetchSessionIntoList:Yi,onSessionRoutePopState:Bs,bindSessionRoute:vi,selectSession:Mn,submitPromptInternal:Dn,finishPromptLocal:ur,maybeGenerateSessionTitle:k6e,localTurnStartState:C6e,isLocalTurnSnapshotCurrent:x6e,afterLocalTurnStartsSettle:_6e,handleSessionSnapshot:jo,sendPrompt:Ln,steerPrompt:ws,uploadImage:Cn,enqueue:Di,unqueue:Me,reorderQueue:Ze,abortCurrentPrompt:On,respondApproval:Us,respondQuestion:Ji,dismissQuestion:$e,pendingQuestionActions:gc,pendingApprovalActions:dg,cancelTask:nt,setPlanMode:Nt,togglePlanMode:Zt,setSwarmMode:Nn,toggleSwarmMode:cs,setGoalMode:Fi,toggleGoalMode:di,createGoal:fi,controlGoal:Ks,setPermission:Si,dismissWarning:Vs,renameSession:Zs,regenerateSessionTitle:Wi,renameWorkspace:xs,deleteWorkspace:fo,archiveSession:yi,exportSession:Mo,restoreSession:ho,loadArchivedSessions:Gs,logout:ds,compact:Ho,forkSession:cr,undo:ft,listDir:on,readFileContent:Mi,readHostFileContent:Wo,getFileDownloadUrl:Al,openWorkspaceFile:qo,openInApp:Er,revealWorkspaceFile:dr,resolveImageUrl:po,searchFiles:Gl,loadOlderMessages:se,refreshSessionSidecars:U,isStartingFirstPrompt:()=>Tl.size>0}}function M6e(e){const t=e.replace(/[/\\]+$/,"");return t===""?e:t.split(/[/\\]/).pop()??t}function I6e(e,t){return e!==""?e:t?`${M6e(t)} | Kimi Code`:"Kimi Code"}function E6e(e){return F(()=>I6e(fu(e.webTitle),fu(e.activeWorkspaceRoot)))}const fg=YT(),lu=Bve({t:(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t)}),b$=un.permission,k$=un.activeWorkspace,A$=un.planArmed,C$=un.swarmMode,w$=un.goalMode,jS=40401,p2=un.onboarded;lr(un.codeFont);lr(un.accent);lr(un.theme);lr(un.thinking);lr(un.notifyOnComplete);lr(un.notifyOnQuestion);lr(un.notifyOnApproval);lr(un.soundOnComplete);function T6e(){try{const e=uo(b$);if(e==="auto"||e==="yolo"||e==="manual")return e}catch{}return"manual"}function L6e(e){try{Ns(b$,e)}catch{}}function hg(e){const t=uo(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const i={};for(const[s,o]of Object.entries(n))o===!0&&(i[s]=!0);return i}catch{return{}}}function nk(e,t){try{const n={};for(const[i,s]of Object.entries(t))s&&(n[i]=!0);Ns(e,JSON.stringify(n))}catch{}}function ik(){nk(A$,_e.planArmedBySession)}function x$(){nk(C$,_e.swarmModeBySession)}function _$(){nk(w$,_e.goalModeBySession)}function N6e(){try{return uo(k$)}catch{return null}}const S$=un.hiddenWorkspaces;function F6e(){try{const e=uo(S$);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function B6e(e){try{Ns(S$,JSON.stringify(e))}catch{}}function $6e(e){try{Ns(k$,e)}catch{}}function D6e(e,t){if(t&&e.startsWith(t)){const i=e.slice(t.length);return i?`~${i}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const _e=Ts({...$J(),connected:!1,serverVersion:"",webTitle:"",dangerousBypassAuth:!1,backend:"v1",experimentalFlags:{},workspaceName:"kimi-web",connection:"disconnected",permission:T6e(),thinking:void 0,thinkingBySession:{},pendingThinkingBySession:{},planModeBySession:hg(un.planMode),planArmedBySession:hg(A$),swarmModeBySession:hg(C$),goalModeBySession:hg(w$),loading:!1,sessionLoading:!1,queuedBySession:{},gitStatusBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:K5(),authReady:!1,defaultModel:null,managedProviderStatus:null,managedUserInfo:null,managedMembership:null,workspaces:[],activeWorkspaceId:N6e(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:F6e(),availableOpenInApps:[],config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1,flatSessionsNextPageToken:null,flatSessionsHasMore:!0,flatSessionsLoading:!1,flatSessionsLoadingMore:!1,flatSessionsSeeded:!1,flatSessionsFrontier:null}),wa=Ts({}),sk=Ts({}),T1=new Map,i1=new Map;function R6e(e,t){return`${e}\0${t??"*"}`}function M$(e,t,n){sk[t]=n;const i=wa[e]?.[t];i&&(wa[e]={...wa[e],[t]:{...i,review:n}})}async function ap(e,t){if(t!==void 0){ap(e);return}const n=R6e(e,t),i=(T1.get(n)??0)+1;T1.set(n,i),t!==void 0&&i1.set(e,(i1.get(e)??0)+1);const s=i1.get(e)??0;try{const o=await Pt().getSessionPlans(e,{agentId:"main",toolCallId:t});if(T1.get(n)!==i||t===void 0&&(i1.get(e)??0)!==s||!_e.sessions.some(l=>l.id===e))return;const r=Object.fromEntries(o.map(l=>[l.toolCallId,l]));for(const[l,a]of Object.entries(r)){const u=sk[l];u&&(!a.review||a.review.state==="pending")&&(r[l]={...a,review:u})}wa[e]=t===void 0?r:{...wa[e],...r}}catch(o){Dl("[refreshSessionPlans] plan history unavailable for",e,o)}}function z6e(e){const t=`${e}\0`;for(const n of T1.keys())n.startsWith(t)&&T1.delete(n);i1.delete(e),delete wa[e]}function O6e(e){delete wa[e]}const Fp=Ts({planMode:!1,swarmMode:!1,goalMode:!1});function ok(e){_e.sessions=e}function Tv(e,t){_e.sessions=_e.sessions.map(n=>n.id===e?t(n):n)}function P6e(e){_e.sessions=Hte(_e.sessions,e)}function j6e(e){_e.sessions=[..._e.sessions,e]}function H6e(e){_e.sessions=_e.sessions.filter(t=>t.id!==e)}function I$(){const e=_e.activeSessionId;e&&_e.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(_e.unreadBySession[e]=!1,V5({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===un.unread&&(_e.unreadBySession=K5(),I$())});function T8(){if(xr===null||!xr.health().stale)return;Bo("ws:stale-reconnect",{sessionId:_e.activeSessionId,status:"stale"}),Fke("ws: stale socket on focus, reconnecting",{activeSessionId:_e.activeSessionId}),xr.reconnect();const e=_e.activeSessionId;e&&b2.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(I$(),T8())});typeof window<"u"&&(window.addEventListener("focus",T8),window.addEventListener("online",T8));function rk(e){_e.activeSessionId=e}function W6e(e){Zo(_e.messagesBySession,e)}function q6e(e,t){_e.messagesBySession[e]=t}function E$(e,t){_e.messagesBySession[e]=t(_e.messagesBySession[e]??[])}function U6e(e){delete _e.messagesBySession[e]}function T$(e){xr?.unsubscribe(e),m2.forgetSession(e),N8.delete(e),g7e(e),Af.discard(({meta:t})=>t.sessionId===e),H6e(e),U6e(e),z6e(e),delete _e.approvalsBySession[e],delete _e.questionsBySession[e],delete _e.tasksBySession[e],delete _e.goalBySession[e],delete _e.gitStatusBySession[e],delete _e.lastSeqBySession[e],delete _e.compactionBySession[e],delete _e.messagesLoadingMoreBySession[e],delete _e.messagesHasMoreBySession[e],delete _e.messagesLoadMoreErrorBySession[e],delete L8[e],y2.delete(e),Vg.delete(e),U$.delete(e),w6e(e),delete _e.queuedBySession[e],delete _e.promptIdBySession[e],delete _e.inFlightBySession[e],delete _e.turnActiveBySession[e],delete _e.turnEndedPromptIdBySession[e],delete _e.turnErrorBySession[e],delete _e.turnRetryBySession[e],delete _e.planModeBySession[e],delete _e.planArmedBySession[e],delete _e.swarmModeBySession[e],delete _e.goalModeBySession[e],delete _e.thinkingBySession[e],delete _e.pendingThinkingBySession[e],ik(),x$(),_$(),lo.value.includes(e)&&(lo.value=cL(lo.value,e),dv(lo.value))}const L$=Z(null),N$=Z([]),F$=Z(!1),B$=Z(null),$$=Z(!1),D$=Z(!1),R$=Z(null);async function Xc(e){let t;try{t=await Pt().getSessionStatus(e)}catch{return}Tv(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),_e.swarmModeBySession[e]=t.swarmMode,_e.planModeBySession[e]=t.planMode,lr(un.planMode),t.thinkingEffort.length>0&&lL(_e,e,t.thinkingEffort)}const g2=new Set;function K6e(e){g2.add(e),z$(e).finally(()=>{g2.delete(e)})}async function z$(e){const t=_e.goalVersionBySession[e]??0;let n;try{n=await Pt().getSessionGoal(e)}catch{return}(_e.goalVersionBySession[e]??0)===t&&(n===null||n.status==="complete"?delete _e.goalBySession[e]:_e.goalBySession[e]=n)}function O$(e,t){const n=t??_e.activeSessionId;if(!n)return Promise.resolve(!1);const i=e.thinking!==void 0?_e.pendingThinkingBySession[n]:void 0;return Promise.resolve(Pt().updateSession(n,e)).then(()=>(Ca(_e,n,i),Xc(n))).then(()=>!0).catch(s=>(Ca(_e,n,i)&&Xc(n),$p("persistSessionProfile",s,{sessionId:n}),!1))}function P$(e){try{return uo(e)??""}catch{return""}}function V6e(){return typeof window>"u"?!1:new URLSearchParams(window.location.search).get("kimi_onboarded")==="1"}const j$=V6e();if(j$&&P$(p2)!=="1")try{Ns(p2,"1")}catch{}const H$=Z(j$||P$(p2)==="1");function Z6e(e){H$.value=e;try{Ns(p2,e?"1":"0")}catch{}e&&window.kimiDesktop?.setOnboarded?.()}let xr=null;const m2=jve({api:Pt(),connectEventsIfNeeded:lk,getEventConnection:()=>xr});let HS=0;function W$(){return HS+=1,`msg_opt_${Date.now().toString(36)}_${HS}`}function WS(e,t,n){const i={sessions:_e.sessions,activeSessionId:_e.activeSessionId,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,turnErrorBySession:_e.turnErrorBySession,turnRetryBySession:_e.turnRetryBySession,compactionBySession:_e.compactionBySession,config:_e.config,warnings:_e.warnings},s=qJ(i,e,{sessionId:t,seq:n},{t:(o,r)=>r===void 0?jn.global.t(o):jn.global.t(o,r)});s.sessions!==i.sessions&&ok(s.sessions),s.activeSessionId!==i.activeSessionId&&rk(s.activeSessionId),W6e(s.messagesBySession),Zo(_e.approvalsBySession,s.approvalsBySession),Zo(_e.planReviewByToolCallId,s.planReviewByToolCallId),Zo(_e.questionsBySession,s.questionsBySession),Zo(_e.tasksBySession,s.tasksBySession),Zo(_e.goalBySession,s.goalBySession),Zo(_e.goalVersionBySession,s.goalVersionBySession),Zo(_e.lastSeqBySession,s.lastSeqBySession),Zo(_e.turnActiveBySession,s.turnActiveBySession),Zo(_e.turnEndedPromptIdBySession,s.turnEndedPromptIdBySession),Zo(_e.turnErrorBySession,s.turnErrorBySession),Zo(_e.turnRetryBySession,s.turnRetryBySession),Zo(_e.compactionBySession,s.compactionBySession),s.config!==i.config&&(_e.config=s.config??null),UJ(s.warnings,i.warnings)||(_e.warnings=s.warnings),e.type==="goalUpdated"&&g2.delete(t),e.type==="configChanged"&&(_e.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(Un.loadModels(),Un.loadProviders()),e.type==="sessionUsageUpdated"&&(e.swarmMode!==void 0&&(_e.swarmModeBySession[e.sessionId]=e.swarmMode),e.planMode!==void 0&&(_e.planModeBySession[e.sessionId]=e.planMode),e.thinking!==void 0&&lL(_e,e.sessionId,e.thinking)),e.type==="sessionDeleted"&&dk(e.sessionId)}function G6e(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="user")return;if(n.role==="assistant")for(let i=n.content.length-1;i>=0;i--){const s=n.content[i];if(s.type==="toolUse"&&s.toolName==="ExitPlanMode")return s.toolCallId}}}function Q6e(e,t){const n=_e.lastSeqBySession[t.sessionId]??0,i=_e.turnActiveBySession[t.sessionId]??!1,s=e.type==="approvalResolved"||e.type==="approvalExpired"?_e.approvalsBySession[t.sessionId]?.find(r=>r.approvalId===e.approvalId&&r.toolName==="ExitPlanMode")?.toolCallId:void 0,o=yo.sideChatTargetBySession.value[t.sessionId];if(e.type==="messageCreated"&&e.message.role==="user"&&e.agentId!==void 0&&Object.prototype.hasOwnProperty.call(_e.sideChatMessagesByAgent,e.agentId)){WS({type:"unknown",raw:{_noop:!0}},t.sessionId,t.seq),yo.reconcileSideChatUserMessage(e.agentId,e.message);return}if(WS(e,t.sessionId,t.seq),o){const{agentId:r}=o,l=t.sessionId;e.type==="agentDelta"&&e.agentId===r?e.delta.text&&yo.appendSideChatAssistantText(r,l,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===r?yo.finishSideChatAgent(r,l):e.type==="taskProgress"&&e.taskId===r?yo.appendSideChatAssistantText(r,l,e.outputChunk):e.type==="taskCompleted"&&e.taskId===r&&yo.finishSideChatAgent(r,l,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const r=e.message.sessionId;_e.promptIdBySession[r]!==e.message.promptId&&(_e.promptIdBySession[r]=e.message.promptId)}if(e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const r=e.reason;zAe(e.sessionId,r==="cancelled"||r==="failed"||r==="blocked"?"aborted":"idle",i);const l=G6e(_e.messagesBySession[e.sessionId]??[]);l!==void 0&&ap(e.sessionId,l)}if(e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&i||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&RAe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&_e.promptIdBySession[e.sessionId]===e.promptId&&Et.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&OAe(e.sessionId,e.question),e.type==="approvalRequested"&&PAe(e.sessionId,e.approval),s!==void 0){const r=e.type==="approvalResolved"?{state:e.decision,selectedOption:e.selectedLabel,feedback:e.feedback}:{state:"cancelled"};M$(t.sessionId,s,r),ap(t.sessionId,s)}}const Af=ZX(({appEvent:e,meta:t})=>Q6e(e,t),({appEvent:e})=>qX(e),{coalesce:QX}),Y6e=3e4;let qS=0,vo=null;const L1=new Map;let v2=0,Cf=null;function J6e(){Cf!==null&&(clearTimeout(Cf),Cf=null)}function US(e){if(!_e.connected||Cf!==null)return;const t=Math.min(Y6e,1e3*2**v2);v2+=1,Dl("[kimi-web] session work reconciliation incomplete; retrying",e),Cf=setTimeout(()=>{Cf=null,_e.connected&&q$()},t)}function X6e(e,t){const n=new Map(e.map(u=>[u.id,u]));let i=!1,s=!1;const o={..._e.turnActiveBySession},r=[],l=new Map,a=_e.sessions.map(u=>{const c=n.get(u.id);if(c===void 0)return u;const d=t.workEventSeqBySession.get(u.id)??0,f=t.turnEventSeqBySession.get(u.id)??0,p=t.pendingEventBySession.get(u.id),g=d>c.lastSeq,m=f>c.lastSeq,y=p!==void 0&&p.seq>c.lastSeq,w=g||m&&u.mainTurnActive===!0?u.busy||u.mainTurnActive===!0:c.busy,k=g||m?u.mainTurnActive:c.mainTurnActive??(w?u.mainTurnActive:!1),A=y?p.source==="work"?u.pendingInteraction:(_e.approvalsBySession[u.id]?.length??0)>0?"approval":(_e.questionsBySession[u.id]?.length??0)>0?"question":"none":c.pendingInteraction??(w?u.pendingInteraction:"none");(y&&p.source==="work"||!y&&(c.pendingInteraction!==void 0||c.busy===!1))&&A!==void 0&&l.set(u.id,A);const v=g?u.lastTurnReason:c.lastTurnReason;L1.set(u.id,Math.max(L1.get(u.id)??0,c.lastSeq));const x=t.turnStartBySession.get(u.id);return(k===!1||k===void 0&&!w)&&t.witnessedTurnBySession.has(u.id)&&x!==void 0&&Et.isLocalTurnSnapshotCurrent(u.id,x)&&r.push(u.id),k===!0&&!o[u.id]?(o[u.id]=!0,s=!0):(k===!1||!w)&&o[u.id]&&(delete o[u.id],s=!0),u.busy===w&&u.mainTurnActive===k&&u.pendingInteraction===A&&u.lastTurnReason===v?u:(i=!0,{...u,busy:w,mainTurnActive:k,pendingInteraction:A,lastTurnReason:v})});i&&ok(a),s&&Zo(_e.turnActiveBySession,o);for(const[u,c]of l)c==="none"?(delete _e.approvalsBySession[u],delete _e.questionsBySession[u]):c==="question"&&delete _e.approvalsBySession[u];for(const u of r)Et.finishPromptLocal(u,{turnWasActive:!0})}async function q$(){const e={workEventSeqBySession:new Map,turnEventSeqBySession:new Map,pendingEventBySession:new Map,turnStartBySession:new Map(_e.sessions.map(t=>[t.id,Et.localTurnStartState(t.id)])),witnessedTurnBySession:new Set(_e.sessions.filter(t=>_e.inFlightBySession[t.id]||_e.turnActiveBySession[t.id]).map(t=>t.id))};vo=e;try{const t=await Et.listAllSessionsGlobal({shouldContinue:()=>vo===e&&_e.connected});if(vo!==e||!_e.connected)return;Af.flush(),X6e(t.sessions,e),vo=null,t.error!==void 0?US(t.error):v2=0}catch(t){if(vo!==e||!_e.connected)return;vo=null,US(t)}}function lk(){if(xr!==null||typeof WebSocket>"u")return;Bo("ws:connection",{status:"connecting"}),_e.connection="connecting",xr=Pt().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){Et.applyWorkspaceEvent(t);return}const i=t.type==="sessionWorkChanged",s=t.type==="turnActiveChanged",o=t.type==="approvalRequested"||t.type==="approvalResolved"||t.type==="approvalExpired"||t.type==="questionRequested"||t.type==="questionAnswered"||t.type==="questionDismissed";if((i||s||o)&&n.seq>0){const r=L1.get(n.sessionId)??0;if(n.seq<=r)return;L1.set(n.sessionId,n.seq)}if(vo!==null&&(i||s||o))if(i){const r=vo.workEventSeqBySession.get(n.sessionId)??0;if(n.seq>r&&vo.workEventSeqBySession.set(n.sessionId,n.seq),t.pendingInteraction!==void 0||!t.busy){const l=vo.pendingEventBySession.get(n.sessionId);(l===void 0||n.seq>l.seq)&&vo.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"work"})}}else if(s){const r=vo.turnEventSeqBySession.get(n.sessionId)??0;n.seq>r&&vo.turnEventSeqBySession.set(n.sessionId,n.seq)}else{const r=vo.pendingEventBySession.get(n.sessionId);(r===void 0||n.seq>r.seq)&&vo.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"interaction"})}for(const r of GX({appEvent:t,meta:n}))Af(r)},onResync(t,n,i){Bo("ws:resync",{sessionId:t,status:"required",seq:n}),Af.flush(),y2.add(t),b2.request(t)},onError(t,n,i){Bo("ws:error",{status:"failed",errorCode:t,fatal:i}),Bp({severity:"error",title:jn.global.t("warnings.wsTitle"),message:n,details:[qi("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){Bo("ws:connection",{status:t?"connected":"disconnected"}),_e.connected=t,_e.connection=t?"connected":"disconnected",t||(vo=null,L1.clear(),J6e(),v2=0),t&&(qS+=1,l7e(),Et.refreshServerMeta())},onReplayComplete(){Af.flush(),qS>1&&q$()},onTranscriptReset(t,n,i,s){m2.receiveReset(t,n,i,s)},onTranscriptOps(t,n,i,s){return m2.applyOps(t,n,i,s)}})}const L8={},y2=new Set,Vg=new Set,U$=new Set;function e7e(e){return Ps(e)&&e.code===jS?!0:typeof e=="object"&&e!==null&&e.code===jS}function qi(e,t){if(!(t==null||t===""))return{label:jn.global.t(`warnings.details.${e}`),value:K$(t)}}function K$(e){if(e instanceof Error)return typeof e.stack=="string"&&e.stack?e.stack:e.message?`${e.name}: ${e.message}`:e.name;if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function t7e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function n7e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function i7e(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function s7e(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function KS(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function o7e(e,t,n){const i=X2(t),s=Ps(t),o=i||s?t.timestamp:void 0,r=i||s?t.durationMs:void 0,l=[qi("operation",e),qi("sessionId",n??_e.activeSessionId),qi("connection",_e.connection),qi("timestamp",s7e(o??Date.now()))];return i?l.push(qi("duration",KS(r)),qi("request",`${t.method} ${t.path}`),qi("endpoint",t.url),qi("requestId",t.requestId),qi("phase",t.phase),qi("timeout",`${t.timeoutMs}ms`),qi("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),qi("contentType",t.contentType),qi("responsePreview",t.bodyPreview),qi("cause",t.cause)):s?l.push(qi("duration",KS(r)),qi("code",t.code),qi("requestId",t.requestId),qi("message",t.message),qi("details",t.details)):l.push(qi("errorName",t7e(t)),qi("message",n7e(t)??K$(t)),qi("stack",i7e(t))),l.filter(a=>a!==void 0)}function r7e(e,t,n={}){const i=X2(t),s=Ps(t),o=HU(t),r=n.title??(i?o?jn.global.t("warnings.daemonTimeoutTitle"):jn.global.t("warnings.daemonNetworkTitle"):s?jn.global.t("warnings.daemonApiTitle"):jn.global.t("warnings.operationFailedTitle")),l=n.message??(i?o?jn.global.t("warnings.daemonTimeoutMessage"):jn.global.t("warnings.daemonNetworkMessage"):s?t.message:jn.global.t("warnings.operationFailedMessage"));return{severity:"error",title:r,message:l,details:o7e(e,t,n.sessionId)}}function Bp(e){_e.warnings=[..._e.warnings,e]}function l7e(){const e=jn.global.t("warnings.wsTitle"),t=_e.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==_e.warnings.length&&(_e.warnings=t)}function $p(e,t,n){ga(`[kimi-web] operation failed: ${e}`,t);const i=Ps(t),s=X2(t);Bo("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:i?t.code:void 0,requestId:i||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),Bp(r7e(e,t,n))}const a7e={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function u7e(e){if(!Ps(e)||e.code===void 0)return;const t=a7e[e.code];return t?jn.global.t(t):void 0}async function c7e(e){if(T$(e),_e.activeSessionId!==e)return;const t=_e.sessions[0];t?await Et.selectSession(t.id,{urlMode:"replace"}):(rk(void 0),_e.sessionLoading=!1,Et.writeSessionUrl(void 0,"replace"))}const VS=new Set;async function d7e(e){if(!VS.has(e)){VS.add(e);try{const t=await Pt().getSessionWarnings(e),n=jn.global.t("warnings.noteLabel");for(const i of t)Bp(`${n}: ${i.message}`)}catch{}}}async function ak(e,t){const n=Et.localTurnStartState(e);try{const s=await Pt().getSessionSnapshot(e);if(!_e.sessions.some(d=>d.id===e))return"ok";Af.flush();const o=_e.lastSeqBySession[e]??0,r=L8[e],l=y2.has(e)||k2.has(e);if(!l&&r!==void 0&&r===s.epoch&&o>s.asOfSeq)return Vg.delete(e)||(Vg.add(e),b2.request(e)),"ok";if(!Et.isLocalTurnSnapshotCurrent(e,n))return Et.afterLocalTurnStartsSettle(e,()=>{b2.request(e)}),"ok";const a=_e.turnRetryBySession[e];a!==void 0&&a.turnId!==s.inFlightTurn?.turnId&&delete _e.turnRetryBySession[e],(l||s.session.lastTurnReason!=="failed")&&delete _e.turnErrorBySession[e];const u=ym(s.session.usage),c=s.session.mainTurnActive??(s.inFlightTurn!==null&&s.session.busy);Tv(e,d=>QU(d,s.session,c)),q6e(e,$ie(_e.messagesBySession[e]??[],s.messages)),_e.tasksBySession[e]=Uie(s.subagents,_e.tasksBySession[e]??[]),_e.messagesHasMoreBySession[e]=s.hasMoreMessages,_e.approvalsBySession[e]=s.pendingApprovals;for(const d of s.pendingApprovals){const f=d.display;f?.kind==="plan_review"&&typeof f.plan=="string"&&f.plan.length>0&&(_e.planReviewByToolCallId[d.toolCallId]={plan:f.plan,path:typeof f.path=="string"?f.path:void 0})}return _e.questionsBySession[e]=s.pendingQuestions,_e.lastSeqBySession[e]=s.asOfSeq,L8[e]=s.epoch,y2.delete(e),Vg.delete(e),Et.handleSessionSnapshot(e,{inFlightTurn:s.inFlightTurn,busy:s.session.busy}),c?_e.turnActiveBySession[e]=!0:delete _e.turnActiveBySession[e],lk(),xr&&(xr.seedSnapshot(e,s),xr.subscribe(e,{seq:s.asOfSeq,epoch:s.epoch}),p7e(e)),k2.delete(e),u&&t?.skipStatusRefresh!==!0&&Xc(e),d7e(e),"ok"}catch(i){return e7e(i)?(await c7e(e),"not-found"):($p("getSessionSnapshot",i,{title:jn.global.t("warnings.sessionSnapshotTitle"),message:jn.global.t("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const b2=Die(ak);function f7e(e){return Object.prototype.hasOwnProperty.call(_e.messagesBySession,e)}const h7e=4,ca=[],k2=new Set;function p7e(e){const t=ca.indexOf(e);for(t!==-1&&ca.splice(t,1),ca.unshift(e);ca.length>h7e;){let n=-1;for(let s=ca.length-1;s>=0;s--)if(ca[s]!==_e.activeSessionId){n=s;break}if(n===-1)break;const[i]=ca.splice(n,1);if(i===void 0)break;xr?.unsubscribe(i),k2.add(i)}}function g7e(e){const t=ca.indexOf(e);t!==-1&&ca.splice(t,1),k2.delete(e)}async function m7e(e){return ak(e)}function $f(e,t){return(_e.inFlightBySession[e]??!1)||(_e.turnActiveBySession[e]??!1)||(t??_e.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function Dp(e){try{const t=new Date(e),i=Date.now()-t.getTime(),s=i/36e5;if(i<6e4)return jn.global.t("sessions.justNow");if(s<1)return`${Math.round(i/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const o=i/864e5;return o<7?`${Math.round(o)}d`:o<30?`${Math.round(o/7)}w`:o<365?`${Math.round(o/30)}mo`:`${Math.round(o/365)}y`}catch{return e}}const v7e=3e4,ed=Z(0);let v4=null;function y7e(){v4===null&&(v4=setInterval(()=>{ed.value=(ed.value+1)%Number.MAX_SAFE_INTEGER},v7e),v4.unref?.())}function b7e(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const i=typeof t.path=="string"?t.path:"";if(Array.isArray(t.diff))return{kind:"diff",path:i,diff:t.diff};const s=typeof t.old_text=="string"?t.old_text:typeof t.before=="string"?t.before:void 0,o=typeof t.new_text=="string"?t.new_text:typeof t.after=="string"?t.after:void 0;if(s!==void 0&&o!==void 0){const r=Ff(s,o)??Cm(s,o);return{kind:"diff",path:i,diff:r}}return{kind:"diff",path:i,diff:[]}}if(n==="file_io"){const i=typeof t.path=="string"?t.path:"",s=typeof t.operation=="string"?t.operation:"";if(s==="write"&&typeof t.content=="string")return{kind:"file",path:i,content:t.content};if(s==="edit"&&typeof t.before=="string"&&typeof t.after=="string"){const r=Ff(t.before,t.after)??Cm(t.before,t.after);return{kind:"diff",path:i,diff:r}}const o=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:s||n,path:i,detail:o}}if(n==="shell"||n==="command"){const i=typeof t.command=="string"?t.command:e.action,s=typeof t.cwd=="string"?t.cwd:void 0,o=typeof t.danger=="string"?t.danger:OT(i);return{kind:"shell",command:i,cwd:s,danger:o}}if(n==="file_content"||n==="file"){const i=typeof t.path=="string"?t.path:"",s=typeof t.content=="string"?t.content:"",o=typeof t.language=="string"?t.language:void 0;return{kind:"file",path:i,content:s,language:o}}if(n==="file_op"||n==="fileop"){const i=typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,s=typeof t.path=="string"?t.path:"",o=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:i,path:s,detail:o}}if(n==="url_fetch"||n==="url"){const i=typeof t.url=="string"?t.url:e.action;return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:i}}if(n==="search"){const i=typeof t.query=="string"?t.query:e.action,s=typeof t.scope=="string"?t.scope:void 0;return{kind:"search",query:i,scope:s}}if(n==="invocation"||n==="agent_call"||n==="skill_call"){const i=typeof t.kind=="string"?t.kind:n,s=typeof t.name=="string"?t.name:e.toolName,o=typeof t.description=="string"?t.description:void 0;return{kind:"invocation",kind2:i,name:s,description:o}}if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(o=>{const r=o??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const i=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:i,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function k7e(e){return{questionId:e.questionId,sessionId:e.sessionId,toolCallId:e.toolCallId,questions:e.questions.map(t=>({id:t.id,question:t.question,header:t.header,body:t.body,options:t.options.map(n=>({id:n.id,label:n.label,description:n.description,recommended:n.recommended})),multiSelect:t.multiSelect,allowOther:t.allowOther,otherLabel:t.otherLabel}))}}const A7e=F(()=>{const e=_e.activeSessionId,t=e?_e.messagesBySession[e]??[]:[],n=new Map;for(const s of t)if(s.role==="assistant")for(const o of s.content){if(o.type!=="toolUse"||o.toolName!=="Bash"&&o.toolName!=="bash")continue;const r=o.input,l=r&&typeof r.command=="string"?r.command:void 0;l&&n.set(o.toolCallId,l)}const i=new Map;if(n.size===0)return i;for(const s of t)if(s.role==="tool")for(const o of s.content){if(o.type!=="toolResult")continue;const r=B5(o.output);if(!r)continue;let l;for(const u of r){const c=/task_id:\s*(\S+)/.exec(u);if(c?.[1]){l=c[1];break}}if(!l)continue;const a=n.get(o.toolCallId);a&&i.set(l,a)}return i});function V$(e){return A7e.value.get(e.id)}const C7e=F(()=>{const e=_e.activeSessionId,t=e?_e.messagesBySession[e]??[]:[],n=new Map;for(const i of t)if(i.role==="assistant")for(const s of i.content){if(s.type!=="toolUse")continue;const o=s.input,r=o&&typeof o.prompt=="string"?o.prompt:void 0;r&&!n.has(s.toolCallId)&&n.set(s.toolCallId,r);const l=o?.items;if(!r&&Array.isArray(l)&&!n.has(s.toolCallId)){const a=l.filter(u=>typeof u=="string");a.length>0&&n.set(s.toolCallId,a)}}return n});function w7e(e){if(!e.parentToolCallId)return;const t=C7e.value.get(e.parentToolCallId);return Array.isArray(t)?e.swarmIndex!==void 0?t[e.swarmIndex]:void 0:t}function x7e(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",i;if(e.status==="running"&&e.startedAt){i=Date.now()-new Date(e.startedAt).getTime();const l=Math.round(i/1e3),a=Math.floor(l/60),u=l%60;n=jn.global.t("tasks.timingRunning",{time:`${a}:${String(u).padStart(2,"0")}`})}else e.completedAt&&e.startedAt&&!e.completedAtEstimated?(i=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime(),n=jn.global.t("tasks.timingDone",{time:Ma(i,{h:jn.global.t("status.timeUnitHour"),m:jn.global.t("status.timeUnitMinute"),s:jn.global.t("status.timeUnitSecond")})})):n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,o=e.command??V$(e),r=e.kind==="bash"&&o?`$ ${o}`:e.kind==="subagent"?w7e(e)??e.subagentType:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:i,meta:r,output:s,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,swarmIndex:e.swarmIndex,completedAt:e.completedAt,createdAt:e.createdAt,model:e.model,thinkingEffort:e.thinkingEffort}}const _7e=F(()=>{const e=_e.sessions.find(n=>n.id===_e.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:_e.workspaceName,branch:t}}),S7e=F(()=>(ed.value,_e.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:Dp(e.updatedAt),busy:$f(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason,workspaceId:gl(e),cwd:e.cwd})))),M7e=F(()=>_e.activeSessionId??""),I7e=F(()=>{const e=_e.activeSessionId;if(e)return Un.skillsBySession.value[e]??[];const t=Nv.value;return t?Un.skillsByWorkspace.value[t]??[]:[]}),uk=F(()=>{const e=_e.activeSessionId;return e?_e.inFlightBySession[e]??!1:!1}),E7e=F(()=>Et.isStartingFirstPrompt()),yo=t6e(_e,{api:Pt(),pushOperationFailure:$p,nextOptimisticMsgId:W$,connectEventsIfNeeded:lk,getEventConn:()=>xr,resolveThinkingForPrompt:(e,t)=>Un.resolveThinkingForPrompt(e,t),refreshSessionStatus:Xc}),Rp=F(()=>{const e=_e.activeSessionId;if(!e)return[];const t=yo.sideChatTargetBySession.value[e]?.agentId;return(_e.tasksBySession[e]??[]).filter(n=>n.id!==t)}),Z$=e6e(_e,Rp,{api:Pt()}),zp=F(()=>{const e=_e.activeSessionId;return e?(_e.turnActiveBySession[e]??!1)||(_e.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),T7e=F(()=>{const e=_e.activeSessionId;if(e)return _e.turnErrorBySession[e]}),L7e=F(()=>{const e=_e.activeSessionId;if(e&&zp.value)return _e.turnRetryBySession[e]}),G$=e=>Pt().getFileUrl(e),N7e=[],F7e=VT(),Q$=F(()=>{const e=_e.activeSessionId;if(!e)return[];const t=new Set(_e.sideChatUserMessageIdsBySession[e]??[]);return F7e({messages:(_e.messagesBySession[e]??[]).filter(n=>!t.has(n.id)),approvals:_e.approvalsBySession[e]??N7e,getFileUrl:G$,sessionActive:zp.value,planReviewByToolCallId:_e.planReviewByToolCallId,plansByToolCallId:wa[e]})}),B7e=F(()=>uk.value||zp.value),N8=new Map,$7e=F(()=>{Z$.taskClock.value;const e=Rp.value.map(x7e),t=_e.activeSessionId;if(t){let n=N8.get(t);n||(n=new Map,N8.set(t,n));const i=e.filter(r=>r.kind==="subagent"&&r.runInBackground);for(const r of i){const l=r.agentId??r.id;if(r.agentId!==void 0&&r.backgroundTaskId!==void 0&&!n.has(l)){const a=n.get(r.backgroundTaskId);a!==void 0&&(n.delete(r.backgroundTaskId),n.set(l,a))}}const s=i.filter(r=>!n.has(r.agentId??r.id)).sort((r,l)=>(r.createdAt??"").localeCompare(l.createdAt??""));let o=n.size===0?0:Math.max(...n.values())+1;for(const r of s)n.set(r.agentId??r.id,o++);for(const r of i)r.swarmIndex=n.get(r.agentId??r.id)}return e}),Y$=F(()=>aee(Rp.value)),D7e=F(()=>cee(Rp.value)),qd=F(()=>{const e=_e.activeSessionId;return e?_e.goalBySession[e]??null:null}),R7e=F(()=>{const e=_e.activeSessionId;return e?JX(_e.messagesBySession[e]??[]):[]}),z7e=F(()=>{const e=_e.activeSessionId;return e?_e.compactionBySession[e]??null:null}),O7e=F(()=>_e.connection),P7e=F(()=>_e.loading),j7e=F(()=>_e.sessionLoading),H7e=F(()=>{const e=_e.activeSessionId;return e?_e.messagesLoadingMoreBySession[e]??!1:!1}),W7e=F(()=>{const e=_e.activeSessionId;return e?_e.messagesHasMoreBySession[e]??!1:!1}),q7e=F(()=>{const e=_e.activeSessionId;return e?_e.messagesLoadMoreErrorBySession[e]??!1:!1}),U7e=F(()=>_e.serverVersion),J$=F(()=>_e.webTitle),K7e=F(()=>_e.experimentalFlags),V7e=F(()=>_e.backend),Z7e=F(()=>_e.dangerousBypassAuth);function G7e(){_e.dangerousBypassAuth=!1}const Q7e=F(()=>_e.permission),Y7e=F(()=>_e.thinking),X$=F(()=>{const e=_e.activeSessionId;return e?_e.planModeBySession[e]??!1:Fp.planMode}),J7e=F(()=>{const e=_e.activeSessionId;return e?_e.planArmedBySession[e]??!1:Fp.planMode}),X7e=F(()=>{const e=_e.activeSessionId;return e?_e.swarmModeBySession[e]??!1:Fp.swarmMode}),eAe=F(()=>{const e=_e.activeSessionId;return e?_e.goalModeBySession[e]??!1:Fp.goalMode}),tAe=F(()=>{const e=_e.activeSessionId,t=(e?wa[e]:void 0)??{},n={},i=new Set;for(const o of Q$.value)for(const r of o.tools??[]){if(r.name!=="ExitPlanMode")continue;i.add(r.id);const l=t[r.id];if(l){n[r.id]=l;continue}const a=_e.planReviewByToolCallId[r.id],u=nAe(r.arg),c=a?.plan??u?.plan,d=r.planPath??a?.path;!c&&!d||(n[r.id]={agentId:"main",toolCallId:r.id,turnId:o.id,source:"interaction",plan:c??"",path:d,options:u?.options,review:sk[r.id]})}return{...Object.fromEntries(Object.entries(t).filter(([o])=>!i.has(o))),...n}});function nAe(e){try{const t=JSON.parse(e);return{plan:typeof t.plan=="string"?t.plan:void 0,options:Array.isArray(t.options)?t.options:void 0}}catch{return}}const iAe=F(()=>{const e=uee(Y$.value);return{plan:X$.value,goal:qd.value&&qd.value.status!=="complete"?{status:qd.value.status,turnsUsed:qd.value.turnsUsed,elapsedMs:qd.value.wallClockMs}:null,swarm:e.total>0?e:null}}),sAe=F(()=>{const e=_e.activeSessionId;if(!e)return[];const t=Pt();return(_e.queuedBySession[e]??[]).map(n=>({id:n.id??n.text,text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(i=>({fileId:i.fileId,kind:i.kind,url:t.getFileUrl(i.fileId),name:i.name}))}))}),oAe=F(()=>_e.warnings),rAe=F(()=>{const e=_e.activeSessionId;return e?(_e.questionsBySession[e]??[]).map(k7e):[]}),lAe=F(()=>{const e=_e.activeSessionId;return e?(_e.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:b7e(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),ck=F(()=>{const e=_e.activeSessionId;return e?(_e.approvalsBySession[e]??[]).length>0?"awaiting-approval":(_e.questionsBySession[e]??[]).length>0?"awaiting-question":uk.value||zp.value?"running":"idle":"idle"}),Un=s6e(_e,{api:Pt(),pushOperationFailure:$p,refreshSessionStatus:Xc,persistSessionProfile:O$,savePlanModeToStorage:ik,activity:ck,updateSession:Tv,updateSessionMessages:E$,loadConfig:()=>Et.loadConfig(),checkAuth:()=>Et.checkAuth(),beginLocalTurn:I8,settleLocalTurn:E8}),F8=F(()=>{const e=_e.activeSessionId;if(!e)return null;const t=_e.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),aAe=F(()=>{const e=_e.activeSessionId;return e?_e.gitStatusBySession[e]?.pullRequest??null:null}),uAe=F(()=>{const e=_e.activeSessionId;if(!e)return[];const t=_e.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,i])=>({path:n,status:i})).sort((n,i)=>n.path.localeCompare(i.path)):[]}),cAe=F(()=>{const e=_e.activeSessionId;if(!e)return null;const t=_e.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),eD=F(()=>{const e=_e.sessions.find(r=>r.id===_e.activeSessionId),t=F8.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?Un.draftModel.value:null,i=(e?.model&&e.model.length>0?e.model:n??_e.defaultModel)??"—",s=Un.models.value.find(r=>r.id===i)??Un.models.value.find(r=>r.model===i);return{model:s?.displayName||s?.model||(i.includes("/")?i.split("/").pop():i),modelId:s?.id??i,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:_e.permission,branch:t,cwd:e?.cwd??"",isGitRepo:F8.value!==null}}),dAe=F(()=>N$.value),fAe=F(()=>_e.sessions.find(t=>t.id===_e.activeSessionId)?.usage.totalCostUsd??0),hAe=F(()=>_e.authReady),pAe=F(()=>_e.defaultModel),gAe=F(()=>_e.managedProviderStatus),mAe=F(()=>_e.managedUserInfo),vAe=F(()=>_e.managedMembership),yAe=F(()=>_e.config),bAe=F(()=>{const e=_e.activeSessionId;if(!e)return{};const t=_e.gitStatusBySession[e];return t?{...t.entries}:{}}),kAe=F(()=>{const e=new Map;for(const t of _e.workspaces){const n=el(t.root);e.has(n)||e.set(n,t.id)}return e});function gl(e){return kAe.value.get(el(e.cwd))??e.workspaceId??e.cwd}const Lv=F(()=>Hee({workspaces:_e.workspaces,sessions:_e.sessions,hiddenWorkspaceRoots:_e.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:_e.sessionsHasMoreByWorkspace})),A2=Z(jie()),C2=Z(Hie());function AAe(e){C2.value!==e&&(C2.value=e,Wie(e))}const up=Z(qie());Qe(()=>_e.sessions,e=>{const t=mse(e,gl),{next:n,changed:i}=gse(up.value,t);i&&(up.value=n,RL(n))});const tD=F(()=>vse(Lv.value,up.value));Qe(()=>[Lv.value.map(e=>e.id).join("\0"),_e.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],i=dse(n,A2.value,tD.value);i!==null&&(A2.value=i,DL(i));const{next:s,changed:o}=yse(up.value,new Set(n));o&&(up.value=s,RL(s))});const lo=Z(zL());function nD(e){const t=ate(lo.value,e);t!==lo.value&&(lo.value=t,dv(t))}function dk(e){const t=cL(lo.value,e);t!==lo.value&&(lo.value=t,dv(t))}function CAe(e){const t=new Set(e),n=lo.value.filter(i=>!t.has(i));n.length!==lo.value.length&&(lo.value=n,dv(n))}function wAe(e){lo.value.includes(e)?dk(e):nD(e)}const ml=F(()=>{const e=Lv.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:D6e(t.root,_e.fsHome),sessionCount:t.sessionCount}));return C2.value==="recent"?pse(e,tD.value):fse(e,A2.value)}),Nv=F(()=>{const e=_e.activeWorkspaceId,t=ml.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});Qe(Nv,e=>{e&&(Object.prototype.hasOwnProperty.call(Un.skillsByWorkspace.value,e)||Un.loadSkillsForWorkspace(e))},{immediate:!0});const iD=F(()=>{const e=Nv.value;return e?ml.value.find(t=>t.id===e)??null:null}),xAe=E6e({webTitle:J$,activeWorkspaceRoot:()=>iD.value?.root??null}),_Ae=F(()=>{ed.value;const e=new Set(ml.value.map(n=>n.id)),t=new Map(ml.value.map(n=>[n.id,n.name]));return _e.sessions.filter(n=>!n.parentSessionId&&e.has(gl(n))).map(n=>{const i=gl(n);return{id:n.id,title:n.title,time:Dp(n.updatedAt),busy:$f(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:i,workspaceName:t.get(i)}})}),B8=Z(f2),Fv=F(()=>{ed.value;const e=new Set(ml.value.map(r=>r.id)),t=new Map(ml.value.map(r=>[r.id,r.name])),n=new Set(lo.value),i=(r,l)=>new Date(l.updatedAt).getTime()-new Date(r.updatedAt).getTime(),s=_e.flatSessionsFrontier,o=[];for(const r of _e.sessions)r.parentSessionId||r.archived||n.has(r.id)||!e.has(gl(r))||!(j5({busy:$f(r.id,r.mainTurnActive),unread:hk.value[r.id]??!1,questionCount:cp.value[r.id]?.questions??0,approvalCount:cp.value[r.id]?.approvals??0,pendingInteraction:r.pendingInteraction,lastTurnReason:r.lastTurnReason})!=="idle")&&s!==null&&new Date(r.updatedAt).getTime()<s||o.push(r);return o.sort(i),o.map(r=>{const l=gl(r);return{id:r.id,title:r.title,time:Dp(r.updatedAt),busy:$f(r.id,r.mainTurnActive),pendingInteraction:r.pendingInteraction,lastTurnReason:r.lastTurnReason,lastPrompt:r.lastPrompt,updatedAt:r.updatedAt,workspaceId:l,workspaceName:t.get(l),cwdLabel:r.cwd?qf(r.cwd):"-",pullRequest:r.pullRequest}})});function SAe(e){return j5({busy:e.busy,unread:hk.value[e.id]??!1,questionCount:cp.value[e.id]?.questions??0,approvalCount:cp.value[e.id]?.approvals??0,pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})!=="idle"}const fk=F(()=>{const e=Fv.value;let t=B8.value;for(let n=e.length-1;n>=t;n--)if(SAe(e[n])){t=n+1;break}return t}),MAe=F(()=>Fv.value.slice(0,fk.value)),IAe=F(()=>_e.flatSessionsHasMore||fk.value<Fv.value.length);function EAe(){B8.value=fk.value+f2,B8.value>Fv.value.length&&_e.flatSessionsHasMore&&Et.loadMoreFlatSessions()}function sD(e){ed.value;const t=new Set(lo.value),n=new Map,i=new Map;for(const s of _e.sessions.toSorted((o,r)=>new Date(r.updatedAt).getTime()-new Date(o.updatedAt).getTime())){if(s.parentSessionId)continue;const o=gl(s);if(e&&t.has(s.id)){i.set(o,(i.get(o)??0)+1);continue}const r={id:s.id,title:s.title,time:Dp(s.updatedAt),busy:$f(s.id,s.mainTurnActive),pendingInteraction:s.pendingInteraction,lastTurnReason:s.lastTurnReason,updatedAt:s.updatedAt},l=n.get(o)??[];l.push(r),n.set(o,l)}return ml.value.map(s=>({workspace:s,sessions:n.get(s.id)??[],pinnedCount:i.get(s.id)??0,hasMore:_e.sessionsHasMoreByWorkspace[s.id]??!1,loadingMore:_e.sessionsLoadingMoreByWorkspace[s.id]??!1,initialCount:_e.sessionsInitialCountByWorkspace[s.id]??Ug}))}const TAe=F(()=>sD(!0)),LAe=F(()=>sD(!1)),NAe=F(()=>{ed.value;const e=new Set(ml.value.map(s=>s.id)),t=new Map(ml.value.map(s=>[s.id,s.name])),n=_e.sessions.filter(s=>!s.parentSessionId&&!s.archived&&e.has(gl(s)));return ute(n,lo.value).pinned.toSorted((s,o)=>new Date(o.updatedAt).getTime()-new Date(s.updatedAt).getTime()).map(s=>{const o=gl(s);return{id:s.id,title:s.title,time:Dp(s.updatedAt),busy:$f(s.id,s.mainTurnActive),pendingInteraction:s.pendingInteraction,lastTurnReason:s.lastTurnReason,updatedAt:s.updatedAt,workspaceId:o,workspaceName:t.get(o),pinned:!0,cwdLabel:s.cwd?qf(s.cwd):"-",pullRequest:s.pullRequest}})});function FAe(e){A2.value=e,DL(e)}const oD=F(()=>{const e={};for(const[t,n]of Object.entries(_e.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(_e.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),cp=F(()=>{const e={};for(const[t,n]of Object.entries(_e.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(_e.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),hk=F(()=>{const e={};for(const[t,n]of Object.entries(_e.unreadBySession))n&&(e[t]=!0);return e}),BAe=F(()=>{const e={},t=oD.value;for(const n of _e.sessions){const i=t[n.id]??0;if(i<=0)continue;const s=gl(n);e[s]=(e[s]??0)+i}return e}),$Ae=F(()=>_e.recentRoots),DAe=F(()=>_e.availableOpenInApps),Et=S6e(_e,{taskPoller:Z$,sideChat:yo,modelProvider:Un,pushOperationFailure:$p,notify:Bp,activity:ck,sessionsKnownEmpty:U$,setSessions:ok,updateSession:Tv,upsertSessionSorted:P6e,appendSession:j6e,forgetSession:T$,unpinSessions:CAe,setActiveSessionId:rk,updateSessionMessages:E$,nextOptimisticMsgId:W$,getEventConn:()=>xr,syncSessionFromSnapshot:ak,reopenSession:m7e,hasLoadedMessages:f7e,refreshSessionStatus:Xc,refreshSessionGoal:z$,refillSessionGoalOnReload:K6e,refreshSessionPlans:ap,settlePlanReviewLocally:M$,persistSessionProfile:O$,mergedWorkspaces:Lv,workspacesView:ml,status:eD,workspaceIdForSession:gl,savePermissionToStorage:L6e,savePlanModeToStorage:ik,saveSwarmModeToStorage:x$,saveGoalModeToStorage:_$,draftModes:Fp,saveUnread:V5,saveActiveWorkspaceToStorage:$6e,saveHiddenWorkspacesToStorage:B6e,goalErrorMessage:u7e,initialized:D$,connectIssue:R$,selectedDiffPath:L$,fileDiffLines:N$,fileDiffLoading:F$,fileDiffTexts:B$,fileDiffEmptyFile:$$});function pk(e){return e===_e.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function RAe(e){_e.turnActiveBySession[e]&&delete _e.turnActiveBySession[e],_e.inFlightBySession[e]&&(_e.inFlightBySession[e]=!1)}function zAe(e,t,n){const i=_e.promptIdBySession[e],s=_e.goalBySession[e]?.status==="active"||g2.has(e);Et.finishPromptLocal(e,{turnWasActive:n}),(_e.experimentalFlags?.auto_session_title??_e.config?.experimental?.auto_session_title)===!0&&Et.maybeGenerateSessionTitle(e),Et.loadGitStatus(e),e===_e.activeSessionId?Xc(e):t==="idle"&&!s&&(_e.unreadBySession[e]=!0,V5({[e]:!0}));const o=(_e.approvalsBySession[e]??[]).length>0,r=(_e.questionsBySession[e]??[]).length>0;!s&&Mve(t,o,r)&&lu.maybeNotifyCompletion(e,{isUserWatching:pk(e),sessionTitle:_e.sessions.find(l=>l.id===e)?.title??"",promptId:i,onClick:()=>{Et.selectSession(e)}})}function OAe(e,t){const n=t.questions[0],i=n?.header?.trim()??"",s=n?.question?.trim()??"",o=i&&s?`${i}: ${s}`:s||i;lu.maybeNotifyQuestion({isUserWatching:pk(e),sessionTitle:_e.sessions.find(r=>r.id===e)?.title??"",questionPreview:o,questionId:t.questionId,onClick:()=>{Et.selectSession(e)}})}function PAe(e,t){lu.maybeNotifyApproval({isUserWatching:pk(e),sessionTitle:_e.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{Et.selectSession(e)}})}function Fa(){return y7e(),{workspace:_7e,sessions:S7e,activeSessionId:M7e,workspacesView:ml,workspaceSortMode:C2,visibleWorkspace:iD,activeWorkspaceId:Nv,sessionsForView:_Ae,workspaceGroups:TAe,mobileWorkspaceGroups:LAe,pinnedSessions:NAe,flatSessions:MAe,flatSessionsHasMore:IAe,flatSessionsLoadingMore:F(()=>_e.flatSessionsLoadingMore),attentionBySession:oD,pendingBySession:cp,attentionByWorkspace:BAe,unreadBySession:hk,recentRoots:$Ae,turns:Q$,tasks:$7e,activeAppTasks:Rp,findBashCommandForTask:V$,auxiliaryTranscripts:m2,getFileUrl:G$,todos:R7e,goal:qd,sessionPlans:tAe,refreshSessionPlans:ap,invalidateSessionPlans:O6e,swarms:Y$,swarmMembersByToolCallId:D7e,activationBadges:iAe,compaction:z7e,status:eD,sessionCost:fAe,fileDiff:dAe,selectedDiffPath:L$,fileDiffLoading:F$,fileDiffTexts:B$,fileDiffEmptyFile:$$,changes:uAe,gitInfo:F8,gitDiffStats:cAe,activePullRequest:aAe,changesByPath:bAe,pendingApprovals:lAe,availableOpenInApps:DAe,connection:O7e,loading:P7e,sessionLoading:j7e,loadingMoreMessages:H7e,hasMoreMessages:W7e,loadMoreMessagesError:q7e,serverVersion:U7e,webTitle:J$,documentBaseTitle:xAe,backend:V7e,dangerousBypassAuth:Z7e,experimentalFlags:K7e,clearDangerousBypassAuth:G7e,initialized:D$,connectIssue:R$,permission:Q7e,thinking:Y7e,planMode:X$,planArmed:J7e,swarmMode:X7e,goalMode:eAe,queued:sAe,warnings:oAe,questions:rAe,activity:ck,turnActive:zp,activeTurnError:T7e,activeTurnRetry:L7e,inFlight:uk,working:B7e,isStartingFirstPrompt:E7e,models:Un.models,starredModelIds:Un.starredModelIds,providers:Un.providers,fontScale:fg.fontScale,setFontScale:fg.setFontScale,colorScheme:fg.colorScheme,setColorScheme:fg.setColorScheme,notifyEnabled:lu.notifyEnabled,notifySound:lu.notifySound,notifyPermission:lu.notifyPermission,setNotifyEnabled:lu.setNotifyEnabled,setNotifySound:lu.setNotifySound,onboarded:H$,setOnboarded:Z6e,load:Et.load,selectSession:Et.selectSession,clearActiveSession:Et.clearActiveSession,loadOlderMessages:Et.loadOlderMessages,loadWorkspaces:Et.loadWorkspaces,loadMoreSessions:Et.loadMoreSessions,loadAllSessions:Et.loadAllSessions,ensureFlatSessions:Et.ensureFlatSessions,loadMoreFlatSessions:EAe,selectWorkspace:Et.selectWorkspace,openWorkspace:Et.openWorkspace,openWorkspaceDraft:Et.openWorkspaceDraft,startSessionAndSendPrompt:Et.startSessionAndSendPrompt,startSessionAndActivateSkill:Et.startSessionAndActivateSkill,startSessionAndOpenSideChat:Et.startSessionAndOpenSideChat,addWorkspaceByPath:Et.addWorkspaceByPath,browseFs:Et.browseFs,getFsHome:Et.getFsHome,sendPrompt:Et.sendPrompt,steerPrompt:Et.steerPrompt,sideChatVisible:yo.sideChatVisible,sideChatSessionId:yo.sideChatSessionId,sideChatTurns:yo.sideChatTurns,sideChatRunning:yo.sideChatRunning,sideChatSending:yo.sideChatSending,openSideChat:yo.openSideChat,closeSideChat:yo.closeSideChat,sendSideChatPrompt:yo.sendSideChatPrompt,uploadImage:Et.uploadImage,abortCurrentPrompt:Et.abortCurrentPrompt,respondApproval:Et.respondApproval,respondQuestion:Et.respondQuestion,dismissQuestion:Et.dismissQuestion,pendingQuestionActions:Et.pendingQuestionActions,pendingApprovalActions:Et.pendingApprovalActions,cancelTask:Et.cancelTask,setPermission:Et.setPermission,setThinking:Un.setThinking,setPlanMode:Et.setPlanMode,togglePlanMode:Et.togglePlanMode,setSwarmMode:Et.setSwarmMode,toggleSwarmMode:Et.toggleSwarmMode,setGoalMode:Et.setGoalMode,toggleGoalMode:Et.toggleGoalMode,createGoal:Et.createGoal,controlGoal:Et.controlGoal,enqueue:Et.enqueue,dismissWarning:Et.dismissWarning,renameSession:Et.renameSession,regenerateSessionTitle:Et.regenerateSessionTitle,renameWorkspace:Et.renameWorkspace,deleteWorkspace:Et.deleteWorkspace,reorderWorkspaces:FAe,setWorkspaceSortMode:AAe,pinSession:nD,unpinSession:dk,togglePinSession:wAe,archiveSession:Et.archiveSession,exportSession:Et.exportSession,restoreSession:Et.restoreSession,loadArchivedSessions:Et.loadArchivedSessions,compact:Et.compact,forkSession:Et.forkSession,undo:Et.undo,unqueue:Et.unqueue,reorderQueue:Et.reorderQueue,searchFiles:Et.searchFiles,loadGitStatus:Et.loadGitStatus,loadFileDiff:Et.loadFileDiff,clearFileDiff:Et.clearFileDiff,listDir:Et.listDir,readFileContent:Et.readFileContent,readHostFileContent:Et.readHostFileContent,getFileDownloadUrl:Et.getFileDownloadUrl,openWorkspaceFile:Et.openWorkspaceFile,openInApp:Et.openInApp,revealWorkspaceFile:Et.revealWorkspaceFile,resolveImageUrl:Et.resolveImageUrl,loadModels:Un.loadModels,loadProviders:Un.loadProviders,skills:I7e,activateSkill:Un.activateSkill,setModel:Un.setModel,toggleStarModel:Un.toggleStarModel,addProvider:Un.addProvider,updateProvider:Un.updateProvider,getProvider:Un.getProvider,deleteProvider:Un.deleteProvider,refreshProvider:Un.refreshProvider,refreshAllProviders:Un.refreshAllProviders,loadCatalogProviders:Un.loadCatalogProviders,importCatalogProvider:Un.importCatalogProvider,importCustomRegistry:Un.importCustomRegistry,authReady:hAe,defaultModel:pAe,managedProviderStatus:gAe,managedUserInfo:mAe,managedMembership:vAe,notify:Bp,config:yAe,loadConfig:Et.loadConfig,updateConfig:Et.updateConfig,checkAuth:Et.checkAuth,probeManagedMembership:Et.probeManagedMembership,startOAuthLogin:Un.startOAuthLogin,pollOAuthLogin:Un.pollOAuthLogin,cancelOAuthLogin:Un.cancelOAuthLogin,getUsage:Un.getUsage,logout:Et.logout}}const jAe=["aria-expanded"],HAe={class:"user-menu-avatar","aria-hidden":"true"},WAe=["src"],qAe={class:"user-menu-name"},UAe={class:"user-menu-name"},KAe={class:"user-menu-item-label"},VAe={class:"user-menu-item-label"},ZAe={class:"user-menu-item-label user-menu-login-label"},GAe={class:"user-menu-item-label"},QAe={class:"user-menu-row-value"},YAe={class:"user-menu-item-label"},JAe={class:"user-menu-row-value"},XAe={class:"user-menu-item-label"},eCe={key:0,class:"user-menu-usage"},tCe={key:0,class:"user-menu-usage-state"},nCe={key:1,class:"user-menu-usage-state"},iCe={class:"user-menu-usage-error"},sCe={key:2,class:"user-menu-usage-state user-menu-usage-empty"},oCe={class:"user-menu-usage-main"},rCe={class:"user-menu-usage-label"},lCe={key:0,class:"user-menu-usage-hint"},aCe={class:"user-menu-item-label"},uCe={class:"user-menu-item-label"},cCe=tt({__name:"UserMenu",emits:["login","openSettings"],setup(e,{emit:t}){const n=t,{t:i,locale:s}=Bt(),o=Fa(),{confirm:r}=Hu(),l=F(()=>o.managedProviderStatus.value==="authenticated"),a=o.managedUserInfo,u=o.managedMembership,c=F(()=>a.value?.nickname||i("sidebar.defaultUserName")),d=F(()=>u.value==="free"||fte(a.value?.userLevel)),f=F(()=>u.value!=="free"),p=Z(!1);Qe(()=>a.value?.avatar,()=>{p.value=!1});const g=F(()=>!!a.value?.avatar&&!p.value),m=o.colorScheme,y=F(()=>i(`theme.${m.value}`)),w=F(()=>m.value==="light"?"light-mode":m.value==="dark"?"dark-mode":"follow-system"),k=[{value:"light",labelKey:"theme.light",icon:"light-mode"},{value:"dark",labelKey:"theme.dark",icon:"dark-mode"},{value:"system",labelKey:"theme.system",icon:"follow-system"}];function A(J){o.setColorScheme(J)}const v=F(()=>u2.find(J=>J.code===s.value)?.label??s.value);function x(J){s.value!==J&&Jb(J)}const E=Z(!1),S=Z({}),M=Z(null),_=Z(null);let N=null;function D(J){const de=J.target;de.closest(".user-menu")||de.closest(".user-menu-trigger")||de.closest(".user-submenu")||R()}function T(J){J.key==="Escape"&&(J.stopPropagation(),R())}async function $(){if(E.value){R();return}E.value=!0,document.addEventListener("mousedown",D),document.addEventListener("keydown",T,!0),window.addEventListener("resize",R),l.value&&te(),await kt(),P();const J=_.value;J&&(N=new ResizeObserver(O),N.observe(J))}function P(){const J=_.value,de=M.value?.el;if(!J||!de)return;const me=J.getBoundingClientRect(),Ie=4,je=8,ke=de.offsetHeight,Le={left:`${Math.round(me.left)}px`,width:`${Math.round(me.width)}px`};me.top-ke-Ie<je?S.value={...Le,top:`${Math.round(Math.min(me.bottom+Ie,window.innerHeight-ke-je))}px`,bottom:"auto",transformOrigin:"top left","--menu-pop-shift":"-2px"}:S.value={...Le,top:"auto",bottom:`${Math.round(window.innerHeight-me.top+Ie)}px`,transformOrigin:"bottom left","--menu-pop-shift":"2px"}}function O(){const J=_.value;if(!J)return;W.value=null;const de=J.getBoundingClientRect();S.value={...S.value,left:`${Math.round(de.left)}px`,width:`${Math.round(de.width)}px`}}function R(){E.value=!1,W.value=null,ie(),N?.disconnect(),N=null,document.removeEventListener("mousedown",D),document.removeEventListener("keydown",T,!0),window.removeEventListener("resize",R)}Gn(R);const W=Z(null),z=Z({}),G=Z(null),K={usage:null,theme:null,language:null};let H=null;function q(J){return de=>{K[J]=de instanceof HTMLElement?de:de?.$el??null}}function X(J){ie(),W.value!==J&&(W.value=J,kt(xe))}function ee(J,de){J.key!=="Enter"&&J.key!==" "&&J.key!=="ArrowRight"||(J.preventDefault(),X(de))}function ue(){ie(),H=setTimeout(()=>{W.value=null,H=null},250)}function ie(){H!==null&&(clearTimeout(H),H=null)}function xe(){const J=W.value,de=M.value?.el,me=G.value?.el,Ie=J!==null?K[J]:null;if(!de||!me||!Ie)return;const je=4,ke=8,Le=de.getBoundingClientRect(),it=Ie.getBoundingClientRect(),Fe=me.offsetHeight,Re=Math.min(me.offsetWidth,Le.width);let Ke=Le.right+je,ht=!1;Ke+Re>window.innerWidth-ke&&(Ke=Math.max(ke,Le.left-Re-je),ht=!0);const ot=Math.max(ke,Math.min(it.top,window.innerHeight-Fe-ke));z.value={top:`${Math.round(ot)}px`,left:`${Math.round(Ke)}px`,maxWidth:`${Math.round(Le.width)}px`,transformOrigin:ht?"top right":"top left","--menu-pop-shift":"-2px"}}const ce=Z(!1),pe=Z(null);let Ne=0;async function te(){const J=++Ne;ce.value=!0;try{const de=await o.getUsage();J===Ne&&(pe.value=de)}finally{J===Ne&&(ce.value=!1)}}const ye=F(()=>{if(pe.value?.kind!=="ok")return[];const{summary:J,limits:de}=pe.value,me=cte(de,5,"hour");return[J,me].filter(Ie=>Ie!=null)}),j=F(()=>pe.value?.kind==="error"?pe.value.message:i("settings.planUsage.loadFailed"));function Y(J){return J.resetAt===void 0?"":fL(J.resetAt,i)}function ve(){R(),Cp()}function re(){R(),n("login")}function se(){R(),n("openSettings")}async function U(){R(),await r({title:i("sidebar.logoutConfirmTitle"),message:i("sidebar.logoutConfirmMessage"),variant:"danger",action:()=>o.logout()})}return(J,de)=>(b(),I(Be,null,[C("button",{ref_key:"triggerRef",ref:_,class:"user-menu-trigger",type:"button","aria-haspopup":"menu","aria-expanded":E.value,onClick:It($,["stop"])},[l.value?(b(),I(Be,{key:0},[C("span",HAe,[g.value?(b(),I("img",{key:0,src:h(a)?.avatar,alt:"",onError:de[0]||(de[0]=me=>p.value=!0)},null,40,WAe)):(b(),fe(h(Ce),{key:1,name:"user",size:"sm"}))]),C("span",qAe,B(c.value),1)],64)):(b(),I(Be,{key:1},[V(h(Ce),{name:"user"}),C("span",UAe,B(h(i)("sidebar.notSignedIn")),1)],64))],8,jAe),(b(),fe(Wr,{to:"body"},[V(ys,{name:"menu-pop"},{default:he(()=>[E.value?(b(),fe(h(cl),{key:0,ref_key:"menuRef",ref:M,class:"user-menu",style:Vt(S.value),onClick:de[14]||(de[14]=It(()=>{},["stop"]))},{default:he(()=>[l.value?(b(),I(Be,{key:0},[f.value?(b(),fe(h(bn),{key:0,ref:q("usage"),"aria-haspopup":"true","aria-expanded":W.value==="usage",onMouseenter:de[1]||(de[1]=me=>X("usage")),onMouseleave:ue,onFocus:de[2]||(de[2]=me=>X("usage")),onBlur:ue,onClick:de[3]||(de[3]=me=>X("usage")),onKeydown:de[4]||(de[4]=me=>ee(me,"usage"))},{default:he(()=>[V(h(Ce),{name:"histogram",size:"sm"}),C("span",KAe,B(h(i)("settings.planUsage.title")),1),V(h(Ce),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"])):ne("",!0),d.value?(b(),fe(h(bn),{key:1,onClick:ve,onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"music",size:"sm"}),C("span",VAe,B(h(i)("sidebar.upgradeMembership")),1),V(h(Ce),{name:"external-link",size:"sm"})]),_:1})):ne("",!0),V(h(bn),{separator:""})],64)):(b(),I(Be,{key:1},[V(h(bn),{class:"user-menu-login",onClick:re,onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"log-in",size:"sm"}),C("span",ZAe,B(h(i)("sidebar.signIn")),1)]),_:1}),V(h(bn),{separator:""})],64)),V(h(bn),{ref:q("theme"),"aria-haspopup":"true","aria-expanded":W.value==="theme",onMouseenter:de[5]||(de[5]=me=>X("theme")),onMouseleave:ue,onFocus:de[6]||(de[6]=me=>X("theme")),onBlur:ue,onClick:de[7]||(de[7]=me=>X("theme")),onKeydown:de[8]||(de[8]=me=>ee(me,"theme"))},{default:he(()=>[V(h(Ce),{name:w.value,size:"sm"},null,8,["name"]),C("span",GAe,B(h(i)("theme.colorSchemeLabel")),1),C("span",QAe,B(y.value),1),V(h(Ce),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),V(h(bn),{ref:q("language"),"aria-haspopup":"true","aria-expanded":W.value==="language",onMouseenter:de[9]||(de[9]=me=>X("language")),onMouseleave:ue,onFocus:de[10]||(de[10]=me=>X("language")),onBlur:ue,onClick:de[11]||(de[11]=me=>X("language")),onKeydown:de[12]||(de[12]=me=>ee(me,"language"))},{default:he(()=>[V(h(Ce),{name:"translate",size:"sm"}),C("span",YAe,B(h(i)("sidebar.language")),1),C("span",JAe,B(v.value),1),V(h(Ce),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),V(h(bn),{onClick:se,onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"settings",size:"sm"}),C("span",XAe,B(h(i)("settings.title")),1)]),_:1}),l.value?(b(),I(Be,{key:2},[V(h(bn),{separator:""}),V(h(bn),{onClick:de[13]||(de[13]=me=>void U()),onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"log-out",size:"sm"}),Ue(" "+B(h(i)("sidebar.signOut")),1)]),_:1})],64)):ne("",!0)]),_:1},8,["style"])):ne("",!0)]),_:1})])),(b(),fe(Wr,{to:"body"},[V(ys,{name:"menu-pop"},{default:he(()=>[W.value!==null?(b(),fe(h(cl),{key:0,ref_key:"submenuRef",ref:G,class:"user-submenu",style:Vt(z.value),role:W.value==="usage"?"dialog":"menu",onClick:de[16]||(de[16]=It(()=>{},["stop"])),onMouseenter:ie,onMouseleave:ue,onFocusin:ie,onFocusout:ue},{default:he(()=>[W.value==="usage"?(b(),I("div",eCe,[ce.value?(b(),I("div",tCe,[V(h(Bi),{size:"sm"})])):pe.value?.kind!=="ok"?(b(),I("div",nCe,[C("span",iCe,B(j.value),1),V(h(jt),{variant:"ghost",size:"sm",onClick:de[15]||(de[15]=me=>void te())},{default:he(()=>[Ue(B(h(i)("settings.planUsage.retry")),1)]),_:1})])):ye.value.length===0?(b(),I("span",sCe,B(h(i)("settings.planUsage.empty")),1)):(b(!0),I(Be,{key:3},yt(ye.value,(me,Ie)=>(b(),I("div",{key:Ie,class:"user-menu-usage-row"},[C("span",oCe,[C("span",rCe,B(h(dL)(me,h(i))),1),Y(me)?(b(),I("span",lCe,B(Y(me)),1)):ne("",!0)]),C("span",{class:De(["user-menu-usage-value",`sev-${h(y3)(me.used,me.limit)}`])},B(h(i)("settings.planUsage.usedPct",{pct:h(wg)(me.used,me.limit)})),3)]))),128))])):W.value==="theme"?(b(),I(Be,{key:1},yt(k,me=>V(h(bn),{key:me.value,onClick:Ie=>A(me.value)},{default:he(()=>[V(h(Ce),{name:me.icon,size:"sm"},null,8,["name"]),C("span",aCe,B(h(i)(me.labelKey)),1),h(m)===me.value?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)]),_:2},1032,["onClick"])),64)):(b(!0),I(Be,{key:2},yt(h(u2),me=>(b(),fe(h(bn),{key:me.code,onClick:Ie=>x(me.code)},{default:he(()=>[C("span",uCe,B(me.label),1),h(s)===me.code?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)]),_:2},1032,["onClick"]))),128))]),_:1},8,["style","role"])):ne("",!0)]),_:1})]))],64))}}),dCe=vt(cCe,[["__scopeId","data-v-ee9821b4"]]),fCe={class:"ep-search"},hCe=["placeholder"],pCe={class:"ep-scroll"},gCe={key:0,class:"ep-grid"},mCe=["onClick"],vCe={key:1,class:"ep-empty"},yCe={class:"ep-label"},bCe={class:"ep-grid"},kCe=["onClick"],ACe={class:"ep-label"},CCe={class:"ep-grid"},wCe=["onClick"],ZS="kimi-web.recent-emojis",xCe=tt({__name:"SessionEmojiPicker",props:{current:{default:null},removable:{type:Boolean,default:!0}},emits:["pick"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),{handleCompositionStart:s,handleCompositionEnd:o,isComposingKeyEvent:r}=Kr(),l=e,a=n,u=["⏳","⚠️","🐛","✨","🔥","🚀","🎯","🧪","📝","🔍","🛠️","💡","📦","🎨","🔒","📈","🧹","🚧","✅","❓","🌙","☕","🐳","🗂️","📊","🤖","🧩","⚙️","🌱","📌","💥","🕐"],c={faces:"sidebar.emojiGroupFaces",nature:"sidebar.emojiGroupNature",food:"sidebar.emojiGroupFood",activity:"sidebar.emojiGroupActivity",objects:"sidebar.emojiGroupObjects",symbols:"sidebar.emojiGroupSymbols"},d=Dee.map(E=>({id:E,labelKey:c[E],emojis:sL.filter(S=>S.group===E).map(S=>S.emoji)})),f=Z(p());function p(){try{const E=JSON.parse(localStorage.getItem(ZS)??"[]");return Array.isArray(E)?E.filter(S=>typeof S=="string"):[]}catch{return[]}}function g(E,S){f.value=Pee(f.value,E);try{localStorage.setItem(ZS,JSON.stringify(f.value))}catch{}a("pick",E,S)}const m=Z(""),y=F(()=>m.value.trim().length>0),w=F(()=>zee(m.value)),k=Z(null);pn(()=>k.value?.focus());function A(E){if(r(E))return;const S=w.value[0];y.value&&S&&g(S)}function v(){let E=l.current??void 0;for(;E===void 0||E===l.current;)E=u[Math.floor(Math.random()*u.length)];g(E,"random")}const x=Z(null);return t({el:F(()=>x.value?.el),isComposingKeyEvent:r}),(E,S)=>(b(),fe(h(cl),{ref_key:"menuRef",ref:x,class:"emoji-picker",role:"dialog","aria-label":h(i)("sidebar.sessionEmojiTitle"),onKeydown:S[4]||(S[4]=It(()=>{},["stop"]))},{default:he(()=>[C("div",fCe,[V(h(Ce),{name:"search",size:"sm"}),Bn(C("input",{ref_key:"inputRef",ref:k,"onUpdate:modelValue":S[0]||(S[0]=M=>m.value=M),class:"ep-input",type:"text",placeholder:h(i)("sidebar.searchEmoji"),autocomplete:"off",spellcheck:"false",onKeydown:qr(A,["enter"]),onCompositionstart:S[1]||(S[1]=(...M)=>h(s)&&h(s)(...M)),onCompositionend:S[2]||(S[2]=(...M)=>h(o)&&h(o)(...M))},null,40,hCe),[[_o,m.value]])]),C("div",pCe,[y.value?(b(),I(Be,{key:0},[w.value.length?(b(),I("div",gCe,[(b(!0),I(Be,null,yt(w.value,M=>(b(),I("button",{key:M,class:De(["ep-e",{sel:M===e.current}]),type:"button",onClick:_=>g(M)},B(M),11,mCe))),128))])):(b(),I("div",vCe,B(h(i)("sidebar.noEmojiResults")),1))],64)):(b(),I(Be,{key:1},[f.value.length?(b(),I(Be,{key:0},[C("div",yCe,B(h(i)("sidebar.recentEmojis")),1),C("div",bCe,[(b(!0),I(Be,null,yt(f.value,M=>(b(),I("button",{key:M,class:De(["ep-e",{sel:M===e.current}]),type:"button",onClick:_=>g(M)},B(M),11,kCe))),128))])],64)):ne("",!0),(b(!0),I(Be,null,yt(h(d),M=>(b(),I(Be,{key:M.id},[C("div",ACe,B(h(i)(M.labelKey)),1),C("div",CCe,[(b(!0),I(Be,null,yt(M.emojis,_=>(b(),I("button",{key:_,class:De(["ep-e",{sel:_===e.current}]),type:"button",onClick:N=>g(_)},B(_),11,wCe))),128))])],64))),128))],64))]),V(h(bn),{separator:""}),V(h(bn),{role:"button",disabled:!(e.current&&e.removable),onClick:S[3]||(S[3]=M=>a("pick",null))},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"}),Ue(" "+B(h(i)("sidebar.removeEmoji")),1)]),_:1},8,["disabled"]),V(h(bn),{role:"button",onClick:v},{default:he(()=>[V(h(Ce),{name:"sparkles",size:"sm"}),Ue(" "+B(h(i)("sidebar.randomEmoji")),1)]),_:1})]),_:1},8,["aria-label"]))}}),_Ce=vt(xCe,[["__scopeId","data-v-b0dbbae4"]]),SCe={class:"row"},MCe={key:0,class:"lead","aria-hidden":"true"},ICe={key:1,class:"unread-dot"},ECe={class:"left"},TCe=["readonly","onKeydown"],LCe={key:0,class:"gen-dots","aria-hidden":"true"},NCe=["aria-label"],FCe={key:1,class:"act"},BCe={key:0,class:"ts"},$Ce={key:1,class:"st"},DCe={key:1,class:"unread-dot"},RCe={key:2,class:"ha"},zCe={key:0,class:"sub"},OCe={class:"sub-text"},PCe=["aria-label"],jCe={class:"menu-time"},HCe=tt({__name:"SessionRow",props:{session:{},active:{type:Boolean},approvalCount:{default:0},questionCount:{default:0},unread:{type:Boolean,default:!1}},emits:["select","rename","generateTitle","renameStateChange","archive","fork","export","pin"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),s=e,o=n;function r(ot){const gt=new Date(ot);if(Number.isNaN(gt.getTime()))return ot;const Tt=yn=>String(yn).padStart(2,"0");return`${gt.getFullYear()}-${Tt(gt.getMonth()+1)}-${Tt(gt.getDate())} ${Tt(gt.getHours())}:${Tt(gt.getMinutes())}`}const l=F(()=>s.session.updatedAt?r(s.session.updatedAt):s.session.time),a=F(()=>s.session.cwdLabel!==void 0),u=F(()=>X.value?"idle":j5({busy:s.session.busy,unread:s.unread,questionCount:s.questionCount,approvalCount:s.approvalCount,pendingInteraction:s.session.pendingInteraction,lastTurnReason:s.session.lastTurnReason})),c=F(()=>u.value==="awaiting-question"),d=F(()=>u.value==="awaiting-approval"),f=F(()=>u.value==="aborted"),p=F(()=>u.value==="running"),g=F(()=>u.value==="unread"),m=F(()=>u.value!=="idle"),y=Z(!1),w=Z(null),k=Z({});function A(ot){const gt=ot.target;w.value?.el?.contains(gt)||x()}async function v(){P(),y.value=!0,setTimeout(()=>document.addEventListener("mousedown",A),0),window.addEventListener("resize",x),await kt()}function x(){y.value=!1,document.removeEventListener("mousedown",A),window.removeEventListener("resize",x)}An(()=>{document.removeEventListener("mousedown",A),document.removeEventListener("mousedown",O),window.removeEventListener("keydown",R,!0),window.removeEventListener("resize",x),window.removeEventListener("resize",P)});const E=F(()=>bL(s.session.title)),S=F(()=>{const ot=E.value.emoji;return ot?s.session.title.slice(ot.length):s.session.title}),M=Z(!1),_=Z(null),N=Z({});let D=null;function T(ot,gt,Tt){const yn=_.value?.el,Gt=4,Kt=8,mn=yn?.offsetHeight??0,_n=yn?.offsetWidth??0;let He=ot.bottom+Gt,st=!1;He+mn>window.innerHeight-Kt&&(He=Math.max(Kt,ot.top-mn-Gt),st=!0);const Ve=Tt??(gt==="left"?ot.left:ot.right-_n),Rt=Math.max(Kt,Math.min(Ve,window.innerWidth-_n-Kt)),Ct=Tt===void 0?gt:`${Math.round(Math.min(Math.max(Tt-Rt,0),_n))}px`;N.value={top:`${Math.round(He)}px`,left:`${Math.round(Rt)}px`,transformOrigin:`${Ct} ${st?"bottom":"top"}`,"--menu-pop-shift":st?"2px":"-2px"}}async function $(ot,gt,Tt="left",yn){const Gt=gt??ot?.getBoundingClientRect();if(Gt){if(M.value){P();return}x(),D=ot??null,M.value=!0,setTimeout(()=>document.addEventListener("mousedown",O),0),window.addEventListener("keydown",R,!0),window.addEventListener("resize",P),await kt(),T(Gt,Tt,yn)}}function P(){M.value=!1,D=null,document.removeEventListener("mousedown",O),window.removeEventListener("keydown",R,!0),window.removeEventListener("resize",P)}function O(ot){const gt=ot.target;_.value?.el?.contains(gt)||D?.contains(gt)||P()}function R(ot){ot.key==="Escape"&&(_.value?.isComposingKeyEvent(ot)||(ot.preventDefault(),ot.stopPropagation(),P()))}function W(ot){return ot.clientX||ot.clientY?new DOMRect(ot.clientX,ot.clientY,0,0):void 0}function z(ot){ot.stopPropagation();const gt=ot;$(gt.currentTarget,W(gt),"left",gt.clientX||void 0)}function G(ot){const gt=w.value?.el,Tt=ot,yn=W(Tt)??gt?.getBoundingClientRect();x(),$(gt,yn,"left",Tt.clientX||void 0)}function K(ot){if(P(),ot===E.value.emoji)return;const gt=jte(s.session.title,ot);gt&>!==s.session.title&&o("rename",s.session.id,gt)}const H=Fa(),q=F(()=>(H.experimentalFlags.value.auto_session_title??H.config.value?.experimental?.auto_session_title)===!0),X=Z(!1),ee=Z(""),ue=Z(null),ie=Z(null),xe=Z(!1);let ce="",pe=null;const{handleCompositionStart:Ne,handleCompositionEnd:te,isComposingKeyEvent:ye}=Kr();async function j(){x(),P(),X.value=!0,ee.value=s.session.title,await kt();try{ue.value?.focus(),ue.value?.select()}catch{}}function Y(){if(!X.value)return;const ot=ee.value.trim();ot&&ot!==pe&&ot!==s.session.title&&o("rename",s.session.id,ot),X.value=!1}function ve(){xe.value||Y()}function re(ot){ye(ot)||xe.value||Y()}function se(ot){ye(ot)||U()}function U(){xe.value=!1,X.value=!1}function J(ot){const gt=ie.value;if(!(gt===null||!(ot.target instanceof Node)||gt.contains(ot.target))){if(xe.value){xe.value=!1,X.value=!1;return}Y()}}Qe(X,ot=>{ot?document.addEventListener("pointerdown",J,!0):document.removeEventListener("pointerdown",J,!0)}),An(()=>document.removeEventListener("pointerdown",J,!0));function de(){xe.value||(xe.value=!0,ce=ee.value,pe=null,ee.value="",o("generateTitle",s.session.id,ot=>{xe.value=!1,X.value&&(ee.value=ot??ce,pe=ot,kt(()=>{try{ue.value?.focus(),ue.value?.select()}catch{}}))}))}Qe(X,ot=>o("renameStateChange",ot));async function me(ot){X.value||(ot.preventDefault(),ot.stopPropagation(),y.value&&x(),await v(),Ie(ot))}function Ie(ot){const gt=w.value?.el,Tt=8,yn=gt?.offsetHeight??0,Gt=gt?.offsetWidth??0;let Kt=ot.clientY,mn=!1;Kt+yn>window.innerHeight-Tt&&(Kt=Math.max(Tt,ot.clientY-yn),mn=!0);let _n=ot.clientX,He=!1;_n+Gt>window.innerWidth-Tt&&(_n=Math.max(Tt,ot.clientX-Gt),He=!0),k.value={top:`${Math.round(Kt)}px`,left:`${Math.round(_n)}px`,transformOrigin:`${mn?"bottom":"top"} ${He?"right":"left"}`,"--menu-pop-shift":mn?"2px":"-2px"}}const je=Z(!1),ke=Z(!1);async function Le(){const ot=await ro(s.session.id);je.value=ot,ke.value=!ot,setTimeout(()=>{je.value=!1,ke.value=!1,x()},1500)}function it(){x(),o("fork",s.session.id)}function Fe(){x(),o("export",s.session.id)}function Re(){x(),o("pin",s.session.id)}function Ke(){x(),o("archive",s.session.id)}t({closeMenu:x});function ht(){const ot=s.session.pullRequest?.url;ot&&window.open(ot,"_blank","noopener")}return(ot,gt)=>(b(),I("div",{class:De(["se",{on:e.active,flat:a.value}]),onClick:gt[8]||(gt[8]=Tt=>o("select",e.session.id)),onContextmenu:me},[C("div",SCe,[a.value?ne("",!0):(b(),I("span",MCe,[p.value?(b(),fe(h(Bi),{key:0,size:"sm"})):g.value?(b(),I("span",ICe)):ne("",!0)])),C("div",ECe,[X.value?(b(),I("div",{key:0,ref_key:"renameWrapRef",ref:ie,class:De(["rename-wrap",{generating:xe.value}]),onClick:gt[4]||(gt[4]=It(()=>{},["stop"]))},[Bn(C("input",{ref_key:"renameInputRef",ref:ue,"onUpdate:modelValue":gt[0]||(gt[0]=Tt=>ee.value=Tt),class:"rename-input",readonly:xe.value,onKeydown:[qr(It(re,["stop"]),["enter"]),qr(It(se,["stop"]),["esc"])],onCompositionstart:gt[1]||(gt[1]=(...Tt)=>h(Ne)&&h(Ne)(...Tt)),onCompositionend:gt[2]||(gt[2]=(...Tt)=>h(te)&&h(te)(...Tt)),onBlur:ve},null,40,TCe),[[_o,ee.value]]),xe.value?(b(),I("span",LCe,[...gt[9]||(gt[9]=[C("i",null,null,-1),C("i",null,null,-1),C("i",null,null,-1)])])):ne("",!0),q.value?(b(),fe(h(gn),{key:1,text:h(i)("sidebar.genTitle")},{default:he(()=>[V(h(rn),{class:"gen-title-btn",size:"sm",label:h(i)("sidebar.genTitle"),disabled:xe.value,onMousedown:gt[3]||(gt[3]=It(()=>{},["prevent","stop"])),onClick:It(de,["stop"])},{default:he(()=>[V(h(Ce),{name:"gen-title"})]),_:1},8,["label","disabled"])]),_:1},8,["text"])):ne("",!0)],2)):(b(),I("span",{key:1,class:"t",onDblclick:It(j,["stop"])},[E.value.emoji?(b(),I("button",{key:0,type:"button",class:"emoji","aria-label":h(i)("sidebar.setEmoji"),onClick:It(z,["stop"]),onDblclick:gt[5]||(gt[5]=It(()=>{},["stop"]))},B(E.value.emoji),41,NCe)):ne("",!0),Ue(B(S.value),1)],32))]),X.value?ne("",!0):(b(),I("span",FCe,[V(h(gn),{text:h(i)("workspace.awaitingAnswerTitle")},{default:he(()=>[c.value?(b(),fe(h(Hl),{key:0,variant:"info",size:"sm"},{default:he(()=>[Ue(B(h(i)("workspace.awaitingAnswer")),1)]),_:1})):ne("",!0)]),_:1},8,["text"]),V(h(gn),{text:h(i)("workspace.awaitingPermissionTitle")},{default:he(()=>[d.value?(b(),fe(h(Hl),{key:0,variant:"warning",size:"sm"},{default:he(()=>[Ue(B(h(i)("workspace.awaitingPermission")),1)]),_:1})):ne("",!0)]),_:1},8,["text"]),V(h(gn),{text:h(i)("workspace.abortedTitle")},{default:he(()=>[f.value?(b(),fe(h(Hl),{key:0,variant:"danger",size:"sm"},{default:he(()=>[Ue(B(h(i)("workspace.aborted")),1)]),_:1})):ne("",!0)]),_:1},8,["text"]),!a.value||!m.value?(b(),I("span",BCe,B(e.session.time),1)):p.value||g.value?(b(),I("span",$Ce,[p.value?(b(),fe(h(Bi),{key:0,size:"sm"})):(b(),I("span",DCe))])):ne("",!0),X.value?ne("",!0):(b(),I("span",RCe,[V(h(gn),{text:e.session.pinned?h(i)("sidebar.unpin"):h(i)("sidebar.pin")},{default:he(()=>[V(h(rn),{class:"pin-btn",size:"sm",label:e.session.pinned?h(i)("sidebar.unpin"):h(i)("sidebar.pin"),onClick:It(Re,["stop"])},{default:he(()=>[V(h(Ce),{name:e.session.pinned?"unpin":"pin"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"]),V(h(gn),{text:h(i)("sidebar.archive")},{default:he(()=>[V(h(rn),{class:"archive-btn",size:"sm",label:h(i)("sidebar.archive"),onClick:It(Ke,["stop"])},{default:he(()=>[V(h(Ce),{name:"archive"})]),_:1},8,["label"])]),_:1},8,["text"])]))]))]),e.session.cwdLabel!==void 0?(b(),I("div",zCe,[V(h(Ce),{class:"sub-icon",name:"folder-closed",size:"sm"}),C("span",OCe,B(e.session.cwdLabel),1),e.session.pullRequest?(b(),I("button",{key:0,type:"button",class:De(["pr",`pr--${e.session.pullRequest.state}`]),"aria-label":`PR #${e.session.pullRequest.number}`,onClick:It(ht,["stop"])},[V(h(Ce),{name:"git-pull-request",size:"sm"}),C("span",null,"#"+B(e.session.pullRequest.number),1)],10,PCe)):ne("",!0)])):ne("",!0),(b(),fe(Wr,{to:"body"},[V(ys,{name:"menu-pop"},{default:he(()=>[y.value?(b(),fe(h(cl),{key:0,ref_key:"menuRef",ref:w,class:"menu",style:Vt(k.value),onClick:gt[6]||(gt[6]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{danger:ke.value,onClick:Le},{default:he(()=>[V(h(Ce),{name:"copy",size:"sm"}),Ue(" "+B(ke.value?h(i)("sidebar.copyFailed"):je.value?h(i)("sidebar.copied"):h(i)("sidebar.copySessionId")),1)]),_:1},8,["danger"]),V(h(bn),{separator:""}),V(h(bn),{onClick:j},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),Ue(" "+B(h(i)("sidebar.rename")),1)]),_:1}),V(h(bn),{onClick:G},{default:he(()=>[V(h(Ce),{name:"emoji",size:"sm"}),Ue(" "+B(h(i)("sidebar.setEmoji")),1)]),_:1}),V(h(bn),{onClick:it},{default:he(()=>[V(h(Ce),{name:"git-fork",size:"sm"}),Ue(" "+B(h(i)("sidebar.fork")),1)]),_:1}),V(h(bn),{onClick:Fe},{default:he(()=>[V(h(Ce),{name:"download",size:"sm"}),Ue(" "+B(h(i)("sidebar.export")),1)]),_:1}),V(h(bn),{onClick:Re},{default:he(()=>[V(h(Ce),{name:e.session.pinned?"unpin":"pin",size:"sm"},null,8,["name"]),Ue(" "+B(e.session.pinned?h(i)("sidebar.unpin"):h(i)("sidebar.pin")),1)]),_:1}),V(h(bn),{onClick:Ke},{default:he(()=>[V(h(Ce),{name:"archive",size:"sm"}),Ue(" "+B(h(i)("sidebar.archive")),1)]),_:1}),V(h(bn),{separator:""}),C("div",jCe,B(l.value),1)]),_:1},8,["style"])):ne("",!0)]),_:1})])),(b(),fe(Wr,{to:"body"},[V(ys,{name:"menu-pop"},{default:he(()=>[M.value?(b(),fe(_Ce,{key:0,ref_key:"pickerRef",ref:_,class:"picker",style:Vt(N.value),current:E.value.emoji,removable:E.value.rest.length>0,onClick:gt[7]||(gt[7]=It(()=>{},["stop"])),onPick:K},null,8,["style","current","removable"])):ne("",!0)]),_:1})]))],34))}}),gk=vt(HCe,[["__scopeId","data-v-8cccabc6"]]),WCe=["draggable"],qCe={class:"gh-top"},UCe={class:"gh-name"},KCe=["inert"],VCe={key:0,class:"show-more-row"},ZCe=["disabled"],GCe={class:"show-more-label"},QCe={key:1,class:"show-more-sep","aria-hidden":"true"},YCe={class:"show-more-label"},JCe={key:1,class:"group-empty"},XCe=tt({__name:"WorkspaceGroup",props:{group:{},activeWorkspaceId:{},activeId:{},renamingId:{},renameValue:{},renameInputRef:{},pendingBySession:{},unreadBySession:{},wsMenuOpenId:{},dragging:{type:Boolean},sortable:{type:Boolean},isCollapsed:{type:Function},visibleLimit:{type:Function},flashSessionId:{},pinnedDragSession:{}},emits:["groupClick","groupContextmenu","toggleWsMenu","createInWorkspace","selectSession","renameSession","generateSessionTitle","archiveSession","forkSession","exportSession","pinSession","dropPinnedSession","expand","collapse","confirmRename","cancelRename","updateRenameValue","wsDragstart","wsDragend"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=F({get:()=>i.renameValue,set:N=>s("updateRenameValue",N)}),r=Z(!1),l=F(()=>i.pinnedDragSession!=null),a=F(()=>i.pinnedDragSession?.workspaceId===i.group.workspace.id);function u(N){if(i.pinnedDragSession!=null){if(!a.value){N.dataTransfer&&(N.dataTransfer.dropEffect="none");return}N.preventDefault(),N.dataTransfer&&(N.dataTransfer.dropEffect="move"),r.value=!0}}function c(N){i.pinnedDragSession==null||!a.value||(N.preventDefault(),r.value=!1,s("dropPinnedSession",i.pinnedDragSession.id))}function d(N){N.currentTarget.contains(N.relatedTarget)||(r.value=!1)}const f=F(()=>i.visibleLimit(i.group.workspace.id)??i.group.initialCount),p=F(()=>{const N=i.group.sessions.slice(0,f.value);if(i.activeId&&!N.some(D=>D.id===i.activeId)){const D=i.group.sessions.find(T=>T.id===i.activeId);if(D)return[...N,D]}return N}),g=F(()=>i.group.sessions.length>f.value||i.group.hasMore||i.group.loadingMore),m=F(()=>f.value>i.group.initialCount);function y(N){i.renameInputRef.value=N instanceof HTMLInputElement?N:null}const{handleCompositionStart:w,handleCompositionEnd:k,isComposingKeyEvent:A}=Kr();function v(N){A(N)||s("confirmRename")}function x(N){A(N)||s("cancelRename")}const E=Z(null);function S(N){i.renamingId!==i.group.workspace.id&&s("groupContextmenu",i.group.workspace,N)}function M(N){i.sortable!==!1&&N.dataTransfer&&(N.dataTransfer.effectAllowed="move",N.dataTransfer.setData("text/plain",i.group.workspace.id),s("wsDragstart",i.group.workspace.id))}function _(N,D){D.dataTransfer&&(D.dataTransfer.effectAllowed="move",D.dataTransfer.setData(xm,N),D.dataTransfer.setData("text/plain",N))}return(N,D)=>(b(),I("div",{class:De(["group",{dragging:e.dragging,"pinned-drag-active":l.value&&a.value,"pinned-drop-hover":r.value,"pinned-drop-blocked":l.value&&!a.value}]),onDragover:u,onDrop:c,onDragleave:d},[C("div",{class:De(["gh",{on:e.group.workspace.id===e.activeWorkspaceId&&e.activeId==="",collapsed:e.isCollapsed(e.group.workspace.id)}]),draggable:e.sortable!==!1&&e.renamingId!==e.group.workspace.id,onClick:D[7]||(D[7]=It(T=>s("groupClick",e.group.workspace.id,T),["stop"])),onContextmenu:S,onDragstart:M,onDragend:D[8]||(D[8]=T=>s("wsDragend"))},[C("div",qCe,[e.isCollapsed(e.group.workspace.id)?(b(),fe(h(Ce),{key:0,class:"gh-folder",name:"folder-closed"})):(b(),fe(h(Ce),{key:1,class:"gh-folder",name:"folder"})),e.renamingId!==e.group.workspace.id?(b(),fe(h(gn),{key:2,text:e.group.workspace.root},{default:he(()=>[C("span",UCe,B(e.group.workspace.name),1)]),_:1},8,["text"])):Bn((b(),I("input",{key:3,ref:y,"onUpdate:modelValue":D[0]||(D[0]=T=>o.value=T),class:"gh-rename",type:"text",onKeydown:[qr(v,["enter"]),qr(x,["esc"])],onCompositionstart:D[1]||(D[1]=(...T)=>h(w)&&h(w)(...T)),onCompositionend:D[2]||(D[2]=(...T)=>h(k)&&h(k)(...T)),onBlur:D[3]||(D[3]=T=>s("cancelRename")),onClick:D[4]||(D[4]=It(()=>{},["stop"]))},null,544)),[[_o,o.value]]),e.renamingId!==e.group.workspace.id?(b(),I("div",{key:4,class:De(["gh-actions",{open:e.wsMenuOpenId===e.group.workspace.id}])},[V(h(rn),{class:De(["gh-more",{open:e.wsMenuOpenId===e.group.workspace.id}]),size:"sm",label:h(n)("sidebar.options"),tooltip:h(n)("sidebar.options"),"aria-haspopup":"menu","aria-expanded":e.wsMenuOpenId===e.group.workspace.id,onClick:D[5]||(D[5]=It(T=>s("toggleWsMenu",e.group.workspace,T),["stop"]))},{default:he(()=>[V(h(Ce),{name:"dots-horizontal"})]),_:1},8,["class","label","tooltip","aria-expanded"]),V(h(rn),{class:"gh-add",size:"sm",label:h(n)("workspace.newInGroup"),tooltip:h(n)("workspace.newInGroup"),onClick:D[6]||(D[6]=It(T=>s("createInWorkspace",e.group.workspace.id),["stop"]))},{default:he(()=>[V(h(Ce),{name:"chat-new"})]),_:1},8,["label","tooltip"])],2)):ne("",!0)])],42,WCe),C("div",{class:De(["group-sessions",{collapsed:e.isCollapsed(e.group.workspace.id)}]),inert:e.isCollapsed(e.group.workspace.id)},[(b(!0),I(Be,null,yt(p.value,T=>(b(),fe(gk,{key:T.id,session:T,active:T.id===e.activeId,"approval-count":e.pendingBySession[T.id]?.approvals??0,"question-count":e.pendingBySession[T.id]?.questions??0,unread:e.unreadBySession[T.id]??!1,draggable:E.value!==T.id,"data-session-id":T.id,class:De({"se-locate-flash":e.flashSessionId===T.id}),onDragstart:$=>_(T.id,$),onRenameStateChange:$=>E.value=$?T.id:null,onSelect:D[9]||(D[9]=$=>s("selectSession",$)),onRename:D[10]||(D[10]=($,P)=>s("renameSession",$,P)),onGenerateTitle:D[11]||(D[11]=($,P)=>s("generateSessionTitle",$,P)),onArchive:D[12]||(D[12]=$=>s("archiveSession",$)),onFork:D[13]||(D[13]=$=>s("forkSession",$)),onExport:D[14]||(D[14]=$=>s("exportSession",$)),onPin:D[15]||(D[15]=$=>s("pinSession",$))},null,8,["session","active","approval-count","question-count","unread","draggable","data-session-id","class","onDragstart","onRenameStateChange"]))),128)),g.value||m.value?(b(),I("div",VCe,[g.value?(b(),I("button",{key:0,class:"show-more",disabled:e.group.loadingMore,onClick:D[16]||(D[16]=It(T=>s("expand",e.group.workspace.id),["stop"]))},[V(h(Ce),{name:"chevron-down",size:"sm"}),C("span",GCe,B(e.group.loadingMore?h(n)("sidebar.loadingMore"):h(n)("sidebar.showMore")),1)],8,ZCe)):ne("",!0),g.value&&m.value?(b(),I("span",QCe,"·")):ne("",!0),m.value?(b(),I("button",{key:2,class:"show-more",onClick:D[17]||(D[17]=It(T=>s("collapse",e.group.workspace.id),["stop"]))},[V(h(Ce),{name:"chevron-up",size:"sm"}),C("span",YCe,B(h(n)("sidebar.showLess")),1)])):ne("",!0)])):ne("",!0),e.group.sessions.length===0?(b(),I("div",JCe,B(e.group.pinnedCount>0?h(n)("sidebar.allPinned",{count:e.group.pinnedCount}):h(n)("sidebar.noSessions")),1)):ne("",!0)],10,KCe)],34))}}),ewe=vt(XCe,[["__scopeId","data-v-08d57eaf"]]),twe={class:"pinned-label"},nwe={class:"pinned-title"},iwe={key:0,class:"pinned-rows"},swe=["draggable","onDragstart"],owe=tt({__name:"PinnedSessionList",props:{sessions:{},activeId:{},pendingBySession:{},unreadBySession:{},flashSessionId:{}},emits:["selectSession","renameSession","generateSessionTitle","archiveSession","forkSession","exportSession","pinSession","dropPin","sessionDragStart","sessionDragEnd"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),s=e,o=n,r=Z(zie());function l(){r.value=!r.value,D3(r.value)}function a(){r.value&&(r.value=!1,D3(!1))}t({expand:a});const u=Z(null),c=Z(null);function d(k,A){if(!A.dataTransfer)return;A.dataTransfer.effectAllowed="move",A.dataTransfer.setData("text/plain",k),u.value=k;const v=s.sessions.find(x=>x.id===k)?.workspaceId;v!==void 0&&o("sessionDragStart",k,v)}function f(){u.value=null,o("sessionDragEnd")}Qe(()=>s.sessions,k=>{u.value!==null&&!k.some(A=>A.id===u.value)&&(u.value=null)});const p=Z(!1);function g(k){return k.dataTransfer?.types.includes(xm)??!1}function m(k){g(k)&&(k.preventDefault(),k.dataTransfer&&(k.dataTransfer.dropEffect="move"),p.value=!0)}function y(k){p.value=!1;const A=k.dataTransfer?.getData(xm);A&&o("dropPin",A)}function w(k){k.currentTarget.contains(k.relatedTarget)||(p.value=!1)}return(k,A)=>(b(),I("div",{class:De(["pinned",{"drop-active":p.value}]),onDragover:m,onDrop:y,onDragleave:w},[C("div",twe,[C("span",nwe,B(h(i)("sidebar.pinned")),1),V(h(rn),{class:De(["pinned-toggle",{"pinned-toggle--on":r.value}]),size:"sm",label:r.value?h(i)("sidebar.expandPinned"):h(i)("sidebar.collapsePinned"),tooltip:r.value?h(i)("sidebar.expandPinned"):h(i)("sidebar.collapsePinned"),onClick:It(l,["stop"])},{default:he(()=>[r.value?(b(),fe(h(Ce),{key:0,name:"chevron-right"})):(b(),fe(h(Ce),{key:1,name:"chevron-down"}))]),_:1},8,["class","label","tooltip"])]),r.value?ne("",!0):(b(),I("div",iwe,[(b(!0),I(Be,null,yt(e.sessions,v=>(b(),I("div",{key:v.id,class:De(["pin-row",{dragging:u.value===v.id}]),draggable:c.value!==v.id,onDragstart:x=>d(v.id,x),onDragend:f},[V(gk,{session:v,active:v.id===e.activeId,"approval-count":e.pendingBySession[v.id]?.approvals??0,"question-count":e.pendingBySession[v.id]?.questions??0,unread:e.unreadBySession[v.id]??!1,"data-session-id":v.id,class:De({"se-locate-flash":e.flashSessionId===v.id}),onRenameStateChange:x=>c.value=x?v.id:null,onSelect:A[0]||(A[0]=x=>o("selectSession",x)),onRename:A[1]||(A[1]=(x,E)=>o("renameSession",x,E)),onGenerateTitle:A[2]||(A[2]=(x,E)=>o("generateSessionTitle",x,E)),onArchive:A[3]||(A[3]=x=>o("archiveSession",x)),onFork:A[4]||(A[4]=x=>o("forkSession",x)),onExport:A[5]||(A[5]=x=>o("exportSession",x)),onPin:A[6]||(A[6]=x=>o("pinSession",x))},null,8,["session","active","approval-count","question-count","unread","data-session-id","class","onRenameStateChange"])],42,swe))),128))]))],34))}}),rwe=vt(owe,[["__scopeId","data-v-728c6a88"]]),lwe={class:"ch"},awe={class:"ch-brand"},uwe={class:"ch-tail"},cwe={class:"search-input"},dwe={class:"side-section-label"},fwe={class:"side-section-title"},hwe={class:"side-section-actions"},pwe={key:0,class:"empty"},gwe=["data-ws-id","onDragover","onDrop"],mwe={key:0,class:"empty"},vwe={key:1,class:"show-more-row"},ywe=["disabled"],bwe={class:"show-more-label"},kwe={class:"folder-drop-card"},Awe={class:"view-menu-label"},Cwe={class:"view-menu-check"},wwe={class:"view-menu-check"},xwe={class:"view-menu-label"},_we={class:"view-menu-check"},Swe={class:"view-menu-check"},Mwe=!1,Iwe=1e3,Ewe=tt({__name:"Sidebar",props:{activeWorkspace:{default:null},activeWorkspaceId:{default:null},sessions:{},groups:{},workspaceSortMode:{default:"manual"},pinnedSessions:{default:()=>[]},flatSessions:{default:()=>[]},flatHasMore:{type:Boolean,default:!1},flatLoadingMore:{type:Boolean,default:!1},initialized:{type:Boolean,default:!1},activeId:{},attentionBySession:{default:()=>({})},pendingBySession:{default:()=>({})},unreadBySession:{default:()=>({})},colWidth:{default:220},collapsed:{type:Boolean,default:!1},dragging:{type:Boolean,default:!1}},emits:["select","create","createInWorkspace","selectWorkspace","addWorkspace","addWorkspacePaths","rename","generateTitle","archive","fork","export","pin","dropPin","unpin","renameWorkspace","deleteWorkspace","reorderWorkspaces","setWorkspaceSortMode","loadMoreSessions","loadAllSessions","ensureFlatSessions","loadMoreFlatSessions","openSettings","login","collapse"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=Z(!1),r=c()?["⌘","K"]:["Ctrl","K"],l=c()?["⌃","⇧","O"]:["Ctrl","Shift","O"];function a(){s("loadAllSessions"),o.value=!0}function u($e){($e.metaKey||$e.ctrlKey)&&($e.key.toLowerCase()==="k"?($e.preventDefault(),a()):!$e.metaKey&&$e.ctrlKey&&$e.shiftKey&&$e.key.toLowerCase()==="o"&&($e.preventDefault(),s("create")))}pn(()=>window.addEventListener("keydown",u)),Gn(()=>window.removeEventListener("keydown",u));function c(){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"}const d=Z(null),f=Z(!1),p=Z(!1),g=Z(!1);let m=null;function y($e=d.value){$e&&(f.value=$e.scrollTop>0,p.value=$e.scrollTop+$e.clientHeight<$e.scrollHeight-1)}function w($e){y($e.target),g.value=!0,m&&clearTimeout(m),m=setTimeout(()=>{g.value=!1,m=null},900)}let k=null;pn(()=>{kt(()=>{y(),typeof ResizeObserver=="function"&&d.value&&(k=new ResizeObserver(()=>y()),k.observe(d.value))})}),vp(()=>y()),Gn(()=>{k?.disconnect(),m&&clearTimeout(m),ot&&clearTimeout(ot),ke&&clearTimeout(ke)});const A=Z(new Set(Rie()));function v($e){return A.value.has($e)}function x($e){const nt=new Set(A.value);nt.has($e)?nt.delete($e):nt.add($e),A.value=nt,uy(nt)}function E(){const $e=new Set(i.groups.map(nt=>nt.workspace.id));A.value=$e,uy($e)}function S(){const $e=new Set;A.value=$e,uy($e)}const M=F(()=>i.groups.length>0&&i.groups.every($e=>A.value.has($e.workspace.id))),_=Z(new Map);function N($e){return _.value.get($e)}function D($e){const nt=i.groups.find(Nn=>Nn.workspace.id===$e);if(!nt)return;const Nt=(_.value.get($e)??nt.initialCount)+tk,Zt=new Map(_.value);Zt.set($e,Nt),_.value=Zt,nt.sessions.length<Nt&&nt.hasMore&&s("loadMoreSessions",$e)}function T($e){if(!_.value.has($e))return;const nt=new Map(_.value);nt.delete($e),_.value=nt}const $=Z(null),P=Z(null);function O($e){$.value=$e}function R(){$.value=null,P.value=null}function W($e){const nt=$e.currentTarget.getBoundingClientRect();return $e.clientY<nt.top+nt.height/2?"before":"after"}function z($e,nt){$.value===null||$.value===nt||($e.preventDefault(),$e.dataTransfer&&($e.dataTransfer.dropEffect="move"),P.value={id:nt,position:W($e)})}function G($e){const nt=$.value,Nt=P.value?.id===$e?P.value.position:"before";if(P.value=null,$.value=null,!nt||nt===$e)return;const Zt=hse(i.groups.map(Nn=>Nn.workspace.id),nt,$e,Nt);s("reorderWorkspaces",Zt)}const K=Z(null);function H($e,nt){K.value={id:$e,workspaceId:nt}}function q(){K.value=null}function X($e){K.value=null,s("unpin",$e)}const ee=Z(Oie());function ue($e){ee.value!==$e&&(ee.value=$e,Pie($e),$e==="flat"&&s("ensureFlatSessions"))}Qe(()=>i.initialized,$e=>{$e&&ee.value==="flat"&&s("ensureFlatSessions")},{immediate:!0});const ie=Z(!1),xe=Z({}),ce=Z(null);function pe($e){const nt=$e.target;nt.closest(".view-menu")||nt.closest(".side-section-view")||te()}async function Ne($e){if(ie.value){te();return}const nt=$e.currentTarget;ie.value=!0,document.addEventListener("mousedown",pe),window.addEventListener("resize",te),await kt();const Nt=ce.value?.el,Zt=nt.getBoundingClientRect(),Nn=4,cs=8,Fi=Nt?.offsetHeight??0,di=Nt?.offsetWidth??0;let fi=Zt.bottom+Nn,Ks=!1;fi+Fi>window.innerHeight-cs&&(fi=Math.max(cs,Zt.top-Fi-Nn),Ks=!0);let Si=Zt.right-di;Si<cs&&(Si=cs),xe.value={top:`${Math.round(fi)}px`,left:`${Math.round(Si)}px`,transformOrigin:Ks?"bottom right":"top right","--menu-pop-shift":Ks?"2px":"-2px"}}function te(){ie.value=!1,document.removeEventListener("mousedown",pe),window.removeEventListener("resize",te)}function ye($e){ue($e),te()}function j($e){s("setWorkspaceSortMode",$e),te()}const Y=Z(null);function ve($e,nt){nt.dataTransfer&&(nt.dataTransfer.effectAllowed="move",nt.dataTransfer.setData(xm,$e),nt.dataTransfer.setData("text/plain",$e))}const re=Z(!1);function se($e){ee.value!=="flat"||K.value===null||($e.preventDefault(),$e.dataTransfer&&($e.dataTransfer.dropEffect="move"),re.value=!0)}function U($e){ee.value!=="flat"||K.value===null||($e.preventDefault(),re.value=!1,X(K.value.id))}function J($e){$e.currentTarget.contains($e.relatedTarget)||(re.value=!1)}function de($e,nt){nt.target.closest(".gh-more, .gh-add")||x($e)}function me($e){s("select",$e)}function Ie($e){s("select",$e),Ke($e)}const je=Z(null);let ke=null;const Le=F(()=>i.groups.map($e=>$e.workspace));function it($e,nt){const Nt=getComputedStyle($e).getPropertyValue(nt).trim(),Zt=/^([\d.]+)(ms|s)$/.exec(Nt);if(!Zt)return 0;const Nn=Number.parseFloat(Zt[1]);return Zt[2]==="s"?Nn*1e3:Nn}function Fe(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}function Re($e,nt){je.value=$e,ke&&clearTimeout(ke),ke=setTimeout(()=>{je.value=null,ke=null},it(nt,"--duration-flash"))}function Ke($e){const nt=i.groups.find(Nt=>Nt.sessions.some(Zt=>Zt.id===$e));if(!nt){Tt.value?.expand(),kt(()=>{const Zt=[...Tt.value?.$el?.querySelectorAll("[data-session-id]")??[]].find(Nn=>Nn.dataset.sessionId===$e);Zt?.scrollIntoView({block:"nearest",behavior:Fe()}),Zt&&Re($e,Zt)});return}ee.value!=="grouped"&&ue("grouped"),v(nt.workspace.id)&&x(nt.workspace.id),kt(()=>{const Nt=[...d.value?.querySelectorAll("[data-session-id]")??[]].find(Zt=>Zt.dataset.sessionId===$e);Nt?.scrollIntoView({block:"start",behavior:Fe()}),Nt&&Re($e,Nt)})}const ht=Z(null);let ot=null;function gt($e){ee.value!=="grouped"&&ue("grouped"),v($e)&&x($e),s("selectWorkspace",$e),kt(()=>{const nt=[...d.value?.querySelectorAll("[data-ws-id]")??[]].find(Nt=>Nt.dataset.wsId===$e);nt?.scrollIntoView({block:"start",behavior:Fe()}),nt&&(ht.value=$e,ot&&clearTimeout(ot),ot=setTimeout(()=>{ht.value=null,ot=null},it(nt,"--duration-flash")))})}const Tt=Z(null);function yn($e){Tt.value?Tt.value.expand():D3(!1),s("pin",$e)}function Gt($e){Tt.value?.expand(),s("dropPin",$e)}const Kt=Z(0),mn=Z(!1);function _n(){Kt.value=0,mn.value=!1}function He($e){!R0()||!sy($e)||($e.preventDefault(),$e.stopPropagation(),Kt.value+=1,mn.value=!0)}function st($e){!R0()||!sy($e)||($e.preventDefault(),$e.stopPropagation(),$e.dataTransfer&&($e.dataTransfer.dropEffect="copy"))}function Ve($e){!R0()||!sy($e)||(Kt.value=Math.max(0,Kt.value-1),Kt.value===0&&(mn.value=!1))}function Rt($e){if(_n(),!R0())return;const nt=Yee($e);nt.length!==0&&($e.preventDefault(),$e.stopPropagation(),s("addWorkspacePaths",nt))}const Ct=Z(null),Fn=Z(""),Tn=Z(""),as=Z(null);function Qt(){return as}function ni($e,nt){Ct.value=$e,Tn.value=nt,Fn.value=nt,kt().then(()=>as.value?.focus())}function zn(){const $e=Ct.value,nt=Fn.value.trim();$e&&nt&&nt!==Tn.value&&s("renameWorkspace",$e,nt),Ct.value=null}function Sn(){Ct.value=null}function mi($e){Fn.value=$e}const Ws=Z(!1),Li=Z(null),Lt=Z({}),xi=Z(null);function Qi($e){xi.value?.el&&!xi.value.el.contains($e.target)&&Fs()}function ci($e,nt){nt.preventDefault(),nt.stopPropagation(),Li.value=$e,Lt.value={top:`${nt.clientY}px`,left:`${nt.clientX}px`,transformOrigin:"top left","--menu-pop-shift":"-2px"},Ws.value=!0,document.addEventListener("mousedown",Qi,!0)}function Fs(){Ws.value=!1,document.removeEventListener("mousedown",Qi,!0),Li.value=null}function Ni(){Li.value&&ro(Li.value.root),Fs()}function $i(){Li.value&&ni(Li.value.id,Li.value.name),Fs()}function So(){const $e=Li.value;$e&&(Fs(),s("deleteWorkspace",$e.id))}const _i=Z(null),Yi=Z(null),co=Z({}),Bs=Z(null);function Hi($e){const nt=$e.target;nt.closest(".gh-more")||nt.closest(".ws-menu")||Mn()}async function vi($e,nt){if(_i.value===$e.id){Mn();return}const Nt=nt.currentTarget;Yi.value=$e,_i.value=$e.id,document.addEventListener("mousedown",Hi),window.addEventListener("resize",Mn),await kt();const Zt=Bs.value?.el,Nn=Nt.getBoundingClientRect(),cs=4,Fi=8,di=Zt?.offsetHeight??0,fi=Zt?.offsetWidth??0;let Ks=Nn.bottom+cs,Si=!1;Ks+di>window.innerHeight-Fi&&(Ks=Math.max(Fi,Nn.top-di-cs),Si=!0);let Vs=Nn.right-fi;Vs<Fi&&(Vs=Fi),co.value={top:`${Math.round(Ks)}px`,left:`${Math.round(Vs)}px`,transformOrigin:Si?"bottom right":"top right","--menu-pop-shift":Si?"2px":"-2px"}}function Mn(){_i.value=null,Yi.value=null,document.removeEventListener("mousedown",Hi),window.removeEventListener("resize",Mn)}function Dn($e){ro($e.root),Mn()}function Ln($e){ni($e.id,$e.name),Mn()}function ws($e){Mn(),s("deleteWorkspace",$e.id)}Gn(()=>{document.removeEventListener("mousedown",Qi,!0),document.removeEventListener("mousedown",Hi),document.removeEventListener("mousedown",pe),window.removeEventListener("resize",Mn),window.removeEventListener("resize",te)});const Cn=Z(null);let Di;function ri(){const $e=Cn.value;$e&&($e.classList.remove("blink-now"),$e.getBoundingClientRect(),$e.classList.add("blink-now"),clearTimeout(Di),Di=setTimeout(()=>$e.classList.remove("blink-now"),300))}const ur=rl(()=>ns(()=>import("./DesignSystemView-C2ybIYYn.js"),__vite__mapDeps([8,9]))),jo=Z(!1);let On,us=!1;function qs($e){us=!1,clearTimeout(On),$e.currentTarget.setPointerCapture?.($e.pointerId),On=setTimeout(()=>{us=!0,jo.value=!0},Iwe)}function Us($e){clearTimeout(On);const nt=$e.currentTarget;nt.hasPointerCapture?.($e.pointerId)&&nt.releasePointerCapture($e.pointerId)}function Ji(){if(us){us=!1;return}ri()}return Gn(()=>{clearTimeout(On)}),($e,nt)=>(b(),I("aside",{class:De(["side",{"macos-desktop":h(Dc),collapsed:e.collapsed,"no-anim":e.dragging}]),style:Vt({width:e.collapsed?"0px":e.colWidth+"px"})},[C("div",{class:"col",style:Vt({width:e.colWidth+"px"}),onDragenter:He,onDragover:st,onDragleave:Ve,onDrop:Rt},[C("div",lwe,[C("div",awe,[h(Dc)?ne("",!0):(b(),I(Be,{key:0},[(b(),I("svg",{ref_key:"logoRef",ref:Cn,class:"ch-logo",viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Kimi Code",onClick:Ji,onPointerdown:qs,onPointerup:Us,onPointercancel:Us},[...nt[35]||(nt[35]=[Lu('<defs data-v-fb698df7><mask id="kimiEyes" maskUnits="userSpaceOnUse" data-v-fb698df7><rect x="0" y="0" width="32" height="22" fill="#fff" data-v-fb698df7></rect><g class="ch-eyes" fill="#000" data-v-fb698df7><rect class="ch-eye" x="11.8" y="7" width="2.8" height="8" rx="1.4" data-v-fb698df7></rect><rect class="ch-eye" x="17.4" y="7" width="2.8" height="8" rx="1.4" data-v-fb698df7></rect></g></mask></defs><rect x="1" y="1" width="30" height="20" rx="6" fill="var(--logo)" mask="url(#kimiEyes)" data-v-fb698df7></rect>',2)])],544)),nt[36]||(nt[36]=C("span",{class:"ch-name"},"Kimi Code",-1))],64))]),C("div",uwe,[h(Dc)?ne("",!0):(b(),fe(h(rn),{key:0,class:"ch-collapse",size:"sm",label:h(n)("sidebar.collapseSidebar"),tooltip:h(n)("sidebar.collapseSidebar"),onClick:nt[0]||(nt[0]=It(Nt=>s("collapse"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"panel-collapse"})]),_:1},8,["label","tooltip"])),V(Xve)])]),C("div",{class:De(["sidebar-actions",{"sidebar-actions--has-workspace-action":Mwe}])},[C("button",{class:"btn-new-chat",type:"button",onClick:nt[1]||(nt[1]=It(Nt=>s("create"),["stop"]))},[V(h(Ce),{name:"chat-new"}),C("span",null,B(h(n)("sidebar.newChat")),1),V(h(Aa),{keys:h(l)},null,8,["keys"])]),ne("",!0),C("button",{class:"search",type:"button",onClick:a},[V(h(Ce),{class:"search-icon",name:"search"}),C("span",cwe,B(h(n)("sidebar.search")),1),V(h(Aa),{keys:h(r)},null,8,["keys"])])],2),ee.value==="flat"||e.groups.length>0?(b(),I("div",{key:0,class:De(["sessions-head",{"sessions-head--scrolled":f.value}])},[e.pinnedSessions.length>0?(b(),fe(rwe,{key:0,ref_key:"pinnedListRef",ref:Tt,sessions:e.pinnedSessions,"active-id":e.activeId,"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,"flash-session-id":je.value,onSelectSession:me,onRenameSession:nt[3]||(nt[3]=(Nt,Zt)=>s("rename",Nt,Zt)),onGenerateSessionTitle:nt[4]||(nt[4]=(Nt,Zt)=>s("generateTitle",Nt,Zt)),onArchiveSession:nt[5]||(nt[5]=Nt=>s("archive",Nt)),onForkSession:nt[6]||(nt[6]=Nt=>s("fork",Nt)),onExportSession:nt[7]||(nt[7]=Nt=>s("export",Nt)),onPinSession:yn,onDropPin:Gt,onSessionDragStart:H,onSessionDragEnd:q},null,8,["sessions","active-id","pending-by-session","unread-by-session","flash-session-id"])):ne("",!0),C("div",dwe,[C("span",fwe,B(h(n)("sidebar.sessionsHeader")),1),C("div",hwe,[ee.value==="grouped"?(b(),fe(h(rn),{key:0,class:"side-section-toggle",size:"sm",label:M.value?h(n)("sidebar.expandAll"):h(n)("sidebar.collapseAll"),tooltip:M.value?h(n)("sidebar.expandAll"):h(n)("sidebar.collapseAll"),onClick:nt[8]||(nt[8]=It(Nt=>M.value?S():E(),["stop"]))},{default:he(()=>[M.value?(b(),fe(h(Ce),{key:0,name:"expand"})):(b(),fe(h(Ce),{key:1,name:"collapse"}))]),_:1},8,["label","tooltip"])):ne("",!0),V(h(gn),{text:h(n)("sidebar.viewSwitcher")},{default:he(()=>[V(h(rn),{class:"side-section-toggle side-section-view",size:"sm",label:h(n)("sidebar.viewSwitcher"),onClick:It(Ne,["stop"])},{default:he(()=>[V(h(Ce),{name:"list-settings"})]),_:1},8,["label"])]),_:1},8,["text"])])])],2)):ne("",!0),C("div",{ref_key:"sessionsEl",ref:d,class:De(["sessions",{scrolling:g.value,"pinned-drag-active":ee.value==="flat"&&K.value!==null,"flat-pinned-drop-hover":re.value}]),onScroll:w,onDragover:se,onDrop:U,onDragleave:J},[ee.value==="grouped"?(b(),I(Be,{key:0},[e.groups.length===0?(b(),I("div",pwe,B(h(n)("workspace.noWorkspace")),1)):(b(!0),I(Be,{key:1},yt(e.groups,Nt=>(b(),I("div",{key:Nt.workspace.id,class:De(["ws-drop-target",{"drop-before":P.value?.id===Nt.workspace.id&&P.value.position==="before","drop-after":P.value?.id===Nt.workspace.id&&P.value.position==="after","ws-locate-flash":ht.value===Nt.workspace.id}]),"data-ws-id":Nt.workspace.id,onDragover:Zt=>z(Zt,Nt.workspace.id),onDrop:Zt=>G(Nt.workspace.id)},[V(ewe,{group:Nt,"active-workspace-id":e.activeWorkspaceId,"active-id":e.activeId,"renaming-id":Ct.value,"rename-value":Fn.value,"rename-input-ref":Qt(),"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,"ws-menu-open-id":_i.value,dragging:$.value===Nt.workspace.id,sortable:e.workspaceSortMode==="manual","is-collapsed":v,"visible-limit":N,"flash-session-id":je.value,"pinned-drag-session":K.value,onGroupClick:de,onGroupContextmenu:ci,onToggleWsMenu:vi,onCreateInWorkspace:nt[9]||(nt[9]=Zt=>s("createInWorkspace",Zt)),onSelectSession:me,onRenameSession:nt[10]||(nt[10]=(Zt,Nn)=>s("rename",Zt,Nn)),onGenerateSessionTitle:nt[11]||(nt[11]=(Zt,Nn)=>s("generateTitle",Zt,Nn)),onArchiveSession:nt[12]||(nt[12]=Zt=>s("archive",Zt)),onForkSession:nt[13]||(nt[13]=Zt=>s("fork",Zt)),onExportSession:nt[14]||(nt[14]=Zt=>s("export",Zt)),onPinSession:yn,onDropPinnedSession:X,onExpand:D,onCollapse:T,onConfirmRename:zn,onCancelRename:Sn,onUpdateRenameValue:mi,onWsDragstart:O,onWsDragend:R},null,8,["group","active-workspace-id","active-id","renaming-id","rename-value","rename-input-ref","pending-by-session","unread-by-session","ws-menu-open-id","dragging","sortable","flash-session-id","pinned-drag-session"])],42,gwe))),128))],64)):(b(),I(Be,{key:1},[(b(!0),I(Be,null,yt(e.flatSessions,Nt=>(b(),fe(gk,{key:Nt.id,session:Nt,active:Nt.id===e.activeId,"approval-count":e.pendingBySession[Nt.id]?.approvals??0,"question-count":e.pendingBySession[Nt.id]?.questions??0,unread:e.unreadBySession[Nt.id]??!1,draggable:Y.value!==Nt.id,onDragstart:Zt=>ve(Nt.id,Zt),onRenameStateChange:Zt=>Y.value=Zt?Nt.id:null,onSelect:me,onRename:nt[15]||(nt[15]=(Zt,Nn)=>s("rename",Zt,Nn)),onGenerateTitle:nt[16]||(nt[16]=(Zt,Nn)=>s("generateTitle",Zt,Nn)),onArchive:nt[17]||(nt[17]=Zt=>s("archive",Zt)),onFork:nt[18]||(nt[18]=Zt=>s("fork",Zt)),onExport:nt[19]||(nt[19]=Zt=>s("export",Zt)),onPin:yn},null,8,["session","active","approval-count","question-count","unread","draggable","onDragstart","onRenameStateChange"]))),128)),e.flatSessions.length===0&&!e.flatHasMore&&e.pinnedSessions.length===0?(b(),I("div",mwe,B(h(n)("sidebar.noSessions")),1)):ne("",!0),e.flatHasMore?(b(),I("div",vwe,[C("button",{class:"show-more",disabled:e.flatLoadingMore,onClick:nt[20]||(nt[20]=It(Nt=>s("loadMoreFlatSessions"),["stop"]))},[C("span",bwe,B(e.flatLoadingMore?h(n)("sidebar.loadingMore"):h(n)("sidebar.loadMore")),1),V(h(Ce),{name:"chevron-down",size:"sm"})],8,ywe)])):ne("",!0)],64))],34),C("div",{class:De(["side-footer",{"side-footer--shadowed":p.value}])},[V(dCe,{onLogin:nt[21]||(nt[21]=Nt=>s("login")),onOpenSettings:nt[22]||(nt[22]=Nt=>s("openSettings"))})],2),C("div",{class:De(["folder-drop-overlay",{show:mn.value}]),"aria-hidden":"true"},[C("div",kwe,[V(h(Ce),{name:"folder",size:"lg"}),C("span",null,B(h(n)("sidebar.dropToAddWorkspace")),1)])],2)],36),V(ys,{name:"menu-pop"},{default:he(()=>[Ws.value?(b(),fe(h(cl),{key:0,ref_key:"ghMenuRef",ref:xi,class:"gh-menu",style:Vt(Lt.value),onClick:nt[23]||(nt[23]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{onClick:Ni},{default:he(()=>[V(h(Ce),{name:"copy",size:"sm"}),Ue(" "+B(h(n)("sidebar.copyPath")),1)]),_:1}),V(h(bn),{class:"workspace-rename-item",onClick:$i},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),Ue(" "+B(h(n)("sidebar.rename")),1)]),_:1}),V(h(bn),{danger:"",onClick:So},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"}),Ue(" "+B(h(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):ne("",!0)]),_:1}),V(ys,{name:"menu-pop"},{default:he(()=>[_i.value!==null&&Yi.value?(b(),fe(h(cl),{key:0,ref_key:"wsMenuRef",ref:Bs,class:"ws-menu",style:Vt(co.value),onClick:nt[27]||(nt[27]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{onClick:nt[24]||(nt[24]=Nt=>Dn(Yi.value))},{default:he(()=>[V(h(Ce),{name:"copy",size:"sm"}),Ue(" "+B(h(n)("sidebar.copyPath")),1)]),_:1}),V(h(bn),{class:"workspace-rename-item",onClick:nt[25]||(nt[25]=Nt=>Ln(Yi.value))},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),Ue(" "+B(h(n)("sidebar.rename")),1)]),_:1}),V(h(bn),{danger:"",onClick:nt[26]||(nt[26]=Nt=>ws(Yi.value))},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"}),Ue(" "+B(h(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):ne("",!0)]),_:1}),V(ys,{name:"menu-pop"},{default:he(()=>[ie.value?(b(),fe(h(cl),{key:0,ref_key:"viewMenuRef",ref:ce,class:"view-menu",style:Vt(xe.value),onClick:nt[32]||(nt[32]=It(()=>{},["stop"]))},{default:he(()=>[C("div",Awe,B(h(n)("sidebar.viewGroup")),1),V(h(bn),{onClick:nt[28]||(nt[28]=Nt=>ye("flat"))},{default:he(()=>[V(h(Ce),{name:"list",size:"sm"}),Ue(" "+B(h(n)("sidebar.viewFlat"))+" ",1),C("span",Cwe,[ee.value==="flat"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)])]),_:1}),V(h(bn),{onClick:nt[29]||(nt[29]=Nt=>ye("grouped"))},{default:he(()=>[V(h(Ce),{name:"tree-view",size:"sm"}),Ue(" "+B(h(n)("sidebar.viewGrouped"))+" ",1),C("span",wwe,[ee.value==="grouped"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)])]),_:1}),ee.value==="grouped"?(b(),I(Be,{key:0},[C("div",xwe,B(h(n)("sidebar.sortGroup")),1),V(h(bn),{onClick:nt[30]||(nt[30]=Nt=>j("manual"))},{default:he(()=>[V(h(Ce),{name:"grip",size:"sm"}),Ue(" "+B(h(n)("sidebar.sortManual"))+" ",1),C("span",_we,[e.workspaceSortMode==="manual"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)])]),_:1}),V(h(bn),{onClick:nt[31]||(nt[31]=Nt=>j("recent"))},{default:he(()=>[V(h(Ce),{name:"clock",size:"sm"}),Ue(" "+B(h(n)("sidebar.sortRecent"))+" ",1),C("span",Swe,[e.workspaceSortMode==="recent"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)])]),_:1})],64)):ne("",!0)]),_:1},8,["style"])):ne("",!0)]),_:1}),o.value?(b(),fe(qse,{key:0,sessions:e.sessions,workspaces:Le.value,"active-id":e.activeId,onSelect:Ie,onSelectWorkspace:gt,onClose:nt[33]||(nt[33]=Nt=>o.value=!1)},null,8,["sessions","workspaces","active-id"])):ne("",!0),(b(),fe(Wr,{to:"body"},[jo.value?(b(),fe(h(ur),{key:0,onClose:nt[34]||(nt[34]=Nt=>jo.value=!1)})):ne("",!0)]))],6))}}),Twe=vt(Ewe,[["__scopeId","data-v-fb698df7"]]),Lwe=["aria-label"],Nwe=tt({__name:"ResizeHandle",props:{storageKey:{},defaultWidth:{},min:{},max:{},reverse:{type:Boolean},ariaLabel:{},applyLive:{}},emits:["update:width","update:dragging"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),{width:o,dragging:r,cursor:l,onPointerDown:a}=rve({storageKey:n.storageKey,defaultWidth:n.defaultWidth,min:n.min,max:()=>n.max,reverse:n.reverse,applyLive:n.applyLive});return i("update:width",o.value),Qe(o,u=>i("update:width",u)),Qe(r,u=>i("update:dragging",u)),(u,c)=>(b(),I("div",{class:De(["rh",{dragging:h(r)}]),style:Vt({cursor:h(l)}),role:"separator","aria-orientation":"vertical","aria-label":e.ariaLabel??h(s)("layout.resizeHandleAria"),onPointerdown:c[0]||(c[0]=(...d)=>h(a)&&h(a)(...d))},[...c[1]||(c[1]=[C("span",{class:"rh-bar","aria-hidden":"true"},null,-1)])],46,Lwe))}}),GS=vt(Nwe,[["__scopeId","data-v-1c6dfdc5"]]),Fwe={class:"op"},Bwe={key:0,class:"op-empty"},$we=tt({__name:"OutputPanel",props:{lines:{default:void 0},emptyText:{default:""}},setup(e){const t=e,n=F(()=>t.lines??[]);return(i,s)=>(b(),I("div",Fwe,[n.value.length===0&&e.emptyText?(b(),I("div",Bwe,B(e.emptyText),1)):ne("",!0),(b(!0),I(Be,null,yt(n.value,(o,r)=>(b(),I("div",{key:r},B(o),1))),128))]))}}),Ir=vt($we,[["__scopeId","data-v-ab413c67"]]),Dwe=["disabled","aria-label","aria-expanded"],Rwe={class:"lead","aria-hidden":"true"},zwe={class:"main"},Owe={class:"task"},Pwe={key:0,class:"type"},jwe={class:"tail"},Hwe=["aria-label"],Wwe=["aria-expanded"],qwe=tt({__name:"AgentTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openAgent"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(v){if(!v)return{};try{const x=JSON.parse(v);return{description:typeof x.description=="string"?x.description:void 0,subagentType:typeof x.subagent_type=="string"?x.subagent_type:void 0}}catch{return{}}}const r=F(()=>o(i.tool.arg)),l=F(()=>i.tool.status),a=F(()=>r.value.description||r.value.subagentType||Zf(i.tool.name)),u=F(()=>r.value.description?r.value.subagentType:""),c=an("resolveAgentTaskId"),d=an("resolveAgentModel"),f=F(()=>i.tool.agentId??c?.(i.tool.id)),p=F(()=>f.value!==void 0),g=F(()=>d?.(i.tool.id,f.value)),m=F(()=>[u.value,g.value?.display,g.value?.effort].filter(v=>v).join(" · ")),y=F(()=>!!i.tool.output&&i.tool.output.length>0),w=F(()=>p.value||y.value),k=Z(!1);function A(){if(f.value!==void 0){s("openAgent",f.value);return}y.value&&(k.value=!k.value)}return(v,x)=>(b(),I("div",{class:De(["agent-card",{err:l.value==="error"}])},[C("button",{class:"head",type:"button",disabled:!w.value,"aria-label":p.value?h(n)("tasks.openDetail"):void 0,"aria-expanded":p.value?void 0:k.value,onClick:A},[C("span",Rwe,[V(h(Ce),{name:"robot",size:"sm"})]),C("span",zwe,[C("span",Owe,B(a.value),1),m.value?(b(),I("span",Pwe,B(m.value),1)):ne("",!0)]),C("span",jwe,[C("span",{class:De(["st",l.value]),role:"status","aria-label":l.value},[l.value==="ok"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):l.value==="error"?(b(),fe(h(Ce),{key:1,name:"close",size:"sm"})):(b(),fe(h(hl),{key:2,status:"running"}))],10,Hwe),p.value?(b(),fe(h(Ce),{key:0,class:"go",name:"arrow-right",size:"sm","aria-hidden":"true"})):y.value?(b(),fe(h(Ce),{key:1,class:De(["go car",{open:k.value}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"])):ne("",!0)])],8,Dwe),p.value&&y.value?(b(),I("button",{key:0,class:"saved-result",type:"button","aria-expanded":k.value,onClick:x[0]||(x[0]=E=>k.value=!k.value)},[V(h(Ce),{class:De(["saved-result__chevron",{open:k.value}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"]),C("span",null,B(h(n)("tools.output.saved")),1)],8,Wwe)):ne("",!0),y.value&&k.value?(b(),I("div",{key:1,class:De(["result",{"result--legacy":!p.value}])},[V(Ir,{lines:e.tool.output},null,8,["lines"])],2)):ne("",!0)],2))}}),Uwe=vt(qwe,[["__scopeId","data-v-5bbb3a70"]]);function Kwe(e){if(!e)return[];try{const n=JSON.parse(e).questions;if(!Array.isArray(n))return[];const i=[];for(const s of n){if(!s||typeof s!="object")continue;const o=s,r=Array.isArray(o.options)?o.options.map(l=>{const a=l&&typeof l=="object"?l:{};return{label:typeof a.label=="string"?a.label:"",description:typeof a.description=="string"?a.description:""}}):[];i.push({question:typeof o.question=="string"?o.question:"",header:typeof o.header=="string"?o.header:"",options:r,multiSelect:o.multi_select===!0})}return i}catch{return[]}}const pg={recognized:!1,answers:{},note:""};function Vwe(e){const t=e?.[0];if(!t)return pg;let n;try{n=JSON.parse(t)}catch{return pg}if(!n||typeof n!="object"||Array.isArray(n))return pg;const i=n.answers;if(!i||typeof i!="object"||Array.isArray(i))return pg;const s={};for(const[o,r]of Object.entries(i))typeof r=="string"?s[o]=r:r===!0&&(s[o]=!0);return{recognized:!0,answers:s,note:typeof n.note=="string"?n.note:""}}function Zwe(e,t,n){return e[t]??e[`q_${n}`]}const Gwe=/^opt_\d+_(\d+)$/;function Qwe(e,t=[]){if(e===void 0)return{selected:new Set,otherText:"",indeterminate:!1};if(e===!0)return{selected:new Set,otherText:"",indeterminate:!0};const n=new Map;t.forEach((r,l)=>{r.label.length>0&&!n.has(r.label)&&n.set(r.label,l)});const i=n.get(e);if(i!==void 0)return{selected:new Set([i]),otherText:"",indeterminate:!1};const s=new Set,o=[];for(const r of e.split(",")){const l=r.trim(),a=n.get(l);if(a!==void 0){s.add(a);continue}const u=Gwe.exec(l);u?s.add(Number(u[1])):l.length>0&&o.push(l)}return{selected:s,otherText:o.join(", "),indeterminate:!1}}const Ywe={class:"tl-ic","aria-hidden":"true"},Jwe={class:"tl-main"},Xwe=["aria-expanded","aria-label"],exe={class:"tl-tail"},txe=["aria-label"],nxe=["inert"],ixe={class:"tl-body-inner"},sxe=tt({__name:"ToolDisclosure",props:{status:{},open:{type:Boolean,default:!1},expandable:{type:Boolean,default:!1}},emits:["toggle"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=an("pinScroll",()=>{}),r=Z(null);function l(){if(!n.expandable)return;i("toggle");const u=r.value;u&&kt(()=>o(u))}const a=F(()=>n.open?s("tools.disclosure.collapse"):s("tools.disclosure.expand"));return(u,c)=>(b(),I("div",{class:De(["tool-line",{open:e.open,expandable:e.expandable,err:e.status==="error"}])},[C("div",{ref_key:"headEl",ref:r,class:De(["tl-head",{clickable:e.expandable}]),onClick:l},[C("span",Ywe,[En(u.$slots,"leading")]),C("span",Jwe,[En(u.$slots,"default"),V(h(gn),{text:a.value},{default:he(()=>[e.expandable?(b(),I("button",{key:0,class:"tl-car",type:"button","aria-expanded":e.open,"aria-label":a.value,onClick:It(l,["stop"])},[V(h(Ce),{class:"tl-car-ic",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,Xwe)):ne("",!0)]),_:1},8,["text"])]),C("span",exe,[En(u.$slots,"trailing"),C("span",{class:De(["tl-status",e.status]),role:"status","aria-label":e.status},[e.status==="ok"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):e.status==="error"?(b(),fe(h(Ce),{key:1,name:"close",size:"sm"})):e.status==="suspended"?(b(),fe(h(hl),{key:2,status:"suspended"})):(b(),fe(h(hl),{key:3,status:"running"}))],10,txe)])],2),e.expandable?(b(),I("div",{key:0,class:De(["tl-body",{open:e.open}]),inert:!e.open},[C("div",ixe,[En(u.$slots,"body")])],10,nxe)):ne("",!0)],2))}}),kl=vt(sxe,[["__scopeId","data-v-58658159"]]),oxe={key:0,class:"rc-flat"},rxe={class:"rc-head"},lxe={class:"rc-st"},axe={class:"rc-qtext"},uxe={class:"rc-lb"},cxe={key:0,class:"rc-opt"},dxe={class:"rc-lb"},fxe={class:"rc-ds"},hxe={key:1,class:"rc-opt"},pxe={class:"rc-lb"},gxe={key:2,class:"rc-qskip"},mxe={class:"tl-name"},vxe={key:0,class:"tl-dim"},yxe={key:0,class:"tl-chip"},bxe=80,kxe=tt({__name:"AskUserTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile"],setup(e){const t=e,{t:n}=Bt();function i(S,M=bxe){const _=S.trim();return _.length>M?_.slice(0,M-1)+"…":_}const s=F(()=>Kwe(t.tool.arg)),o=F(()=>Vwe(t.tool.output)),r=F(()=>o.value.recognized),l=F(()=>r.value&&Object.keys(o.value.answers).length===0&&o.value.note.length>0),a=F(()=>s.value.map((S,M)=>Qwe(Zwe(o.value.answers,S.question,M),S.options))),u=F(()=>Object.keys(o.value.answers).length);function c(S,M){return a.value[S]?.selected.has(M)??!1}function d(S){return a.value[S]?.otherText??""}function f(S){return a.value[S]?.indeterminate??!1}const p=F(()=>t.tool.status),g=F(()=>s.value.map((S,M)=>({q:S,selected:S.options.map((_,N)=>({o:_,oi:N})).filter(({oi:_})=>c(M,_))}))),m=F(()=>s.value.length===1?n("tools.ask.question",{count:1}):n("tools.ask.questions",{count:s.value.length})),y=F(()=>{const S=s.value[0]?.question??"",M=n("tools.ask.unanswered");return S?`${S} —— ${M}`:M}),w=F(()=>{if(!r.value)return i(t.tool.output?.[0]??"");if(l.value)return n("tools.ask.dismissed");const S=s.value[0]?.question??"",M=i(S);return s.value.length<=1?M:`${M} ${n("tools.ask.more",{count:s.value.length-1})}`}),k=F(()=>r.value?l.value?n("tools.ask.dismissed"):u.value===0?"":u.value===1?n("tools.ask.answer",{count:1}):n("tools.ask.answers",{count:u.value}):""),A=F(()=>!!t.tool.output&&t.tool.output.length>0),v=F(()=>r.value&&(s.value.length>0||l.value)||A.value),x=Z(t.tool.defaultExpanded===!0&&v.value),E=F(()=>Zf(t.tool.name));return Qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&v.value&&(x.value=!0)}),(S,M)=>r.value&&p.value==="ok"?(b(),I("div",{key:0,class:De(["ask-receipt",{flat:l.value||u.value===0}])},[l.value||u.value===0?(b(),I("span",oxe,B(y.value),1)):(b(),I(Be,{key:1},[C("div",rxe,[C("span",null,B(h(n)("tools.ask.collected"))+" · "+B(m.value),1),C("span",lxe,[V(h(Ce),{name:"check",size:"sm"})])]),(b(!0),I(Be,null,yt(g.value,(_,N)=>(b(),I("div",{key:N,class:"rc-q"},[C("div",axe,[C("span",null,B(_.q.question),1)]),(b(!0),I(Be,null,yt(_.selected,D=>(b(),I("div",{key:D.oi,class:"rc-opt"},[C("span",{class:De(["rc-g on",_.q.multiSelect?"chk":"rad"])},null,2),C("span",uxe,B(D.o.label),1)]))),128)),d(N)?(b(),I("div",cxe,[C("span",{class:De(["rc-g on",_.q.multiSelect?"chk":"rad"])},null,2),C("span",dxe,B(d(N)),1),C("span",fxe,B(h(n)("tools.ask.freeInput")),1)])):ne("",!0),f(N)?(b(),I("div",hxe,[M[1]||(M[1]=C("span",{class:"rc-g rad on"},null,-1)),C("span",pxe,B(h(n)("tools.ask.answered")),1)])):ne("",!0),_.selected.length===0&&!d(N)&&!f(N)?(b(),I("div",gxe,B(h(n)("tools.ask.unanswered")),1)):ne("",!0)]))),128))],64))],2)):(b(),fe(kl,{key:1,status:p.value,open:x.value,expandable:v.value,onToggle:M[0]||(M[0]=_=>x.value=!x.value)},{leading:he(()=>[V(h(Ce),{name:"help-circle",size:"sm"})]),trailing:he(()=>[k.value?(b(),I("span",yxe,B(k.value),1)):ne("",!0)]),body:he(()=>[V(Ir,{lines:e.tool.output},null,8,["lines"])]),default:he(()=>[C("span",mxe,B(E.value),1),w.value?(b(),I("span",vxe,B(w.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),Axe=vt(kxe,[["__scopeId","data-v-f29eda04"]]);function qu(e){const t=(e??"").trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function ei(e){return typeof e=="string"&&e.length>0?e:void 0}function Xa(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function rD(e){if(e)return ei(e.path)??ei(e.file_path)??ei(e.filePath)??ei(e.filename)}function lD(e){return/^(.*)[\\/][^\\/]+[\\/]?$/.exec(e)?.[1]??""}function Cxe(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean)[0];return n?`${t.host}/${n}`:t.host}catch{return e.replace(/^https?:\/\//,"")}}const wxe={class:"tl-name"},xxe={class:"tl-mono"},_xe={key:0,class:"tl-chip"},Sxe={class:"cmd-echo"},Mxe=tt({__name:"BashTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>{const u=qu(t.tool.arg);return(ei(u?.command)??ei(u?.cmd)??ei(u?.script)??t.tool.arg.replace(/^·\s*/,"")).trim()}),o=F(()=>t.tool.status==="running"),r=F(()=>!!t.tool.output&&t.tool.output.length>0),l=F(()=>r.value||o.value||s.value.length>0),a=Z(t.tool.defaultExpanded===!0&&l.value);return Qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&l.value&&(a.value=!0)}),(u,c)=>(b(),fe(kl,{status:i.value,open:a.value,expandable:l.value,onToggle:c[0]||(c[0]=d=>a.value=!a.value)},{leading:he(()=>[V(h(Ce),{name:"terminal",size:"sm"})]),trailing:he(()=>[e.tool.timing?(b(),I("span",_xe,B(e.tool.timing),1)):ne("",!0)]),body:he(()=>[C("div",Sxe,B(s.value),1),V(Ir,{lines:e.tool.output,"empty-text":o.value?h(n)("tools.output.waiting"):h(n)("tools.output.empty")},null,8,["lines","empty-text"])]),default:he(()=>[C("span",wxe,B(h(n)("tools.label.bash")),1),C("span",xxe,B(s.value),1)]),_:1},8,["status","open","expandable"]))}}),Ixe=vt(Mxe,[["__scopeId","data-v-8869dd42"]]),Exe={class:"hl-body"},Txe={key:0,class:"hl-gutter"},Lxe={key:1,class:"hl-gutter new"},Nxe={class:"hl-sign"},Fxe={class:"hl-text"},Bxe=["data-line"],$xe={key:0,class:"hl-gutter"},Dxe={class:"hl-text"},Rxe=200,zxe=tt({__name:"HighlightedCode",props:{code:{default:void 0},lines:{default:void 0},path:{default:void 0},lineNumbers:{type:[Boolean,Array],default:!1},framed:{type:Boolean,default:!0},fullTexts:{default:null},lineClass:{type:Function,default:void 0}},setup(e){const t=e,n=rv(),i=F(()=>Nee(t.path)),s=F(()=>t.lines!==void 0),o=F(()=>t.lineNumbers===!0&&s.value),r=F(()=>(t.lines??[]).some($=>$.oldNo!==void 0)),l=F(()=>(t.lines??[]).some($=>$.newNo!==void 0)),a=F(()=>Array.isArray(t.lineNumbers)?t.lineNumbers:null),u=F(()=>Array.isArray(t.code)?t.code:Ul(t.code??"")),c=F(()=>{const $=t.lines;return $?t.fullTexts?t.fullTexts:{before:$.filter(P=>P.oldNo!==void 0).map(P=>P.text).join(` +`),after:$.filter(P=>P.newNo!==void 0).map(P=>P.text).join(` +`)}:null}),d=Z(null),f=Z(null),p=Z(null);function g(){d.value=null,f.value=null,p.value=null}let m=null,y=0,w=0;async function k(){const $=++w;y=Date.now();const P=i.value;if(!P){$===w&&g();return}try{const{codeToTokens:O}=await ns(async()=>{const{codeToTokens:z}=await import("./index-DcbRorFd.js").then(G=>G.i);return{codeToTokens:z}},[]),R=n.value?"github-dark":"github-light",W=c.value;if(W){const[z,G]=await Promise.all([W.before?O(W.before,{lang:P,theme:R}):Promise.resolve(null),W.after?O(W.after,{lang:P,theme:R}):Promise.resolve(null)]);if($!==w)return;f.value=z?.tokens??null,p.value=G?.tokens??null}else{const z=u.value.length>0?await O(u.value.join(` +`),{lang:P,theme:R}):null;if($!==w)return;d.value=z?.tokens??null}}catch{$===w&&g()}}function A(){if(m!==null)return;const $=Math.max(0,Rxe-(Date.now()-y));m=setTimeout(()=>{m=null,k()},$)}const v=F(()=>u.value.join(` +`)),x=F(()=>c.value?.before??null),E=F(()=>c.value?.after??null);Qe([v,x,E],A),Qe([i,n,()=>t.fullTexts],()=>{w++,g(),A()}),pn(k),An(()=>{w++,m!==null&&clearTimeout(m),m=null});const S=F(()=>{let $=0;if(Array.isArray(t.lineNumbers))for(const P of t.lineNumbers)P>$&&($=P);else for(const P of t.lines??[])P.oldNo!==void 0&&P.oldNo>$&&($=P.oldNo),P.newNo!==void 0&&P.newNo>$&&($=P.newNo);return Math.max(4,String($).length)});function M($){if($.type==="del"){if($.oldNo===void 0)return null;const O=t.fullTexts?$.oldNo-1:_.value.get($.oldNo);return O===void 0?null:f.value?.[O]??null}if($.newNo===void 0)return null;const P=t.fullTexts?$.newNo-1:N.value.get($.newNo);return P===void 0?null:p.value?.[P]??null}const _=F(()=>{const $=new Map;let P=0;for(const O of t.lines??[])O.oldNo!==void 0&&$.set(O.oldNo,P++);return $}),N=F(()=>{const $=new Map;let P=0;for(const O of t.lines??[])O.newNo!==void 0&&$.set(O.newNo,P++);return $});function D($){const P={};$.color&&(P.color=$.color);const O=$.fontStyle??0;return O&1&&(P.fontStyle="italic"),O&2&&(P.fontWeight="var(--weight-semibold)"),O&4&&(P.textDecoration="underline"),P}function T($){return $.type==="add"?"+":$.type==="del"?"-":" "}return($,P)=>(b(),I("div",{class:De(["hl-code",{gutter:o.value,"plain-pad":!s.value&&!a.value,framed:e.framed}]),style:Vt({"--gutter-ch":`${S.value}ch`})},[C("div",Exe,[s.value?(b(!0),I(Be,{key:0},yt(e.lines??[],(O,R)=>(b(),I("div",{key:R,class:De(["hl-row",`row-${O.type}`])},[o.value?(b(),I(Be,{key:0},[r.value?(b(),I("span",Txe,B(O.oldNo??""),1)):ne("",!0),l.value?(b(),I("span",Lxe,B(O.newNo??""),1)):ne("",!0)],64)):ne("",!0),C("span",Nxe,B(T(O)),1),C("span",Fxe,[M(O)?(b(!0),I(Be,{key:0},yt(M(O)??[],(W,z)=>(b(),I("span",{key:z,style:Vt(D(W))},B(W.content),5))),128)):(b(),I(Be,{key:1},[Ue(B(O.text),1)],64))])],2))),128)):(b(!0),I(Be,{key:1},yt(u.value,(O,R)=>(b(),I("div",{key:R,class:De(["hl-row",e.lineClass?.(a.value?.[R]??-1)]),"data-line":a.value?.[R]},[a.value?(b(),I("span",$xe,B(a.value[R]??""),1)):ne("",!0),C("span",Dxe,[d.value?.[R]?(b(!0),I(Be,{key:0},yt(d.value[R]??[],(W,z)=>(b(),I("span",{key:z,style:Vt(D(W))},B(W.content),5))),128)):(b(),I(Be,{key:1},[Ue(B(O),1)],64))])],10,Bxe))),128))])],6))}}),al=vt(zxe,[["__scopeId","data-v-6735e4da"]]),Oxe={class:"tl-name"},Pxe={key:1,class:"tl-dim"},jxe={key:2,class:"tl-faint"},Hxe={key:0,class:"tl-add"},Wxe={key:1,class:"tl-del"},qxe={class:"diffbar","aria-hidden":"true"},Uxe={key:1,class:"tl-chip"},Kxe=tt({__name:"EditTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>ao(n.tool.name)==="write"),l=F(()=>rD(qu(n.tool.arg))??""),a=F(()=>l.value?qf(l.value):""),u=F(()=>l.value?lD(l.value):""),c=F(()=>KT(n.tool)),d=F(()=>fee(n.tool)),f=F(()=>{const x=c.value;return!x||n.tool.status==="error"?{added:0,removed:0}:jT(x)}),p=F(()=>f.value.added>0||f.value.removed>0),g=F(()=>!!n.tool.output&&n.tool.output.length>0),m=F(()=>c.value!==null&&n.tool.status!=="error"),y=F(()=>d.value!==null&&n.tool.status!=="error"),w=F(()=>m.value||y.value||g.value),k=Z(!1),A=Z(k.value);Qe(k,x=>{x&&(A.value=!0)});function v(){l.value&&i("openFile",{path:l.value})}return(x,E)=>(b(),fe(kl,{status:o.value,open:k.value,expandable:w.value,onToggle:E[0]||(E[0]=S=>k.value=!k.value)},{leading:he(()=>[V(h(Ce),{name:r.value?"file-plus":"pencil",size:"sm"},null,8,["name"])]),trailing:he(()=>[p.value?(b(),I(Be,{key:0},[f.value.added>0?(b(),I("span",Hxe,"+"+B(f.value.added),1)):ne("",!0),f.value.removed>0?(b(),I("span",Wxe,"−"+B(f.value.removed),1)):ne("",!0),C("span",qxe,[C("span",{class:"seg-add",style:Vt({flexGrow:f.value.added})},null,4),C("span",{class:"seg-del",style:Vt({flexGrow:f.value.removed})},null,4)])],64)):r.value&&o.value==="ok"?(b(),I("span",Uxe,B(h(s)("tools.chip.created")),1)):ne("",!0)]),body:he(()=>[m.value&&A.value?(b(),fe(al,{key:0,lines:c.value??[],path:l.value},null,8,["lines","path"])):y.value&&A.value?(b(),fe(al,{key:1,code:d.value?.content??"",path:d.value?.path},null,8,["code","path"])):(b(),fe(Ir,{key:2,lines:e.tool.output,"empty-text":h(s)("tools.output.waiting")},null,8,["lines","empty-text"]))]),default:he(()=>[C("span",Oxe,B(r.value?h(s)("tools.label.write"):h(s)("tools.label.edit")),1),a.value?(b(),I("button",{key:0,class:"tl-file",type:"button",onClick:It(v,["stop"])},B(a.value),1)):(b(),I("span",Pxe,B(l.value||e.tool.arg),1)),u.value?(b(),I("span",jxe,B(u.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),Vxe=vt(Kxe,[["__scopeId","data-v-bbf61950"]]),Zxe=["innerHTML"],Gxe={class:"tl-name"},Qxe={key:0,class:"tl-dim"},Yxe={key:0,class:"tl-chip"},Jxe={key:1,class:"tl-chip"},Xxe={key:0,class:"arg-full"},e_e=tt({__name:"GenericTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile"],setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>Zf(t.tool.name)),o=F(()=>c$(t.tool.name)),r=F(()=>LS(t.tool.name,t.tool.arg)),l=F(()=>LS(t.tool.name,t.tool.arg,!0)),a=F(()=>ike({name:t.tool.name,arg:t.tool.arg,output:t.tool.output,timing:t.tool.timing,status:t.tool.status})),u=F(()=>!!t.tool.output&&t.tool.output.length>0),c=F(()=>u.value||!!l.value&&l.value!==r.value),d=Z(t.tool.defaultExpanded===!0&&c.value);return Qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status,t.tool.name],()=>{t.tool.defaultExpanded===!0&&c.value&&(d.value=!0)}),(f,p)=>(b(),fe(kl,{status:i.value,open:d.value,expandable:c.value,onToggle:p[0]||(p[0]=g=>d.value=!d.value)},{leading:he(()=>[C("span",{class:"gl",innerHTML:o.value},null,8,Zxe)]),trailing:he(()=>[a.value?(b(),I("span",Yxe,B(a.value),1)):e.tool.timing?(b(),I("span",Jxe,B(e.tool.timing),1)):ne("",!0)]),body:he(()=>[l.value&&l.value!==r.value?(b(),I("div",Xxe,B(l.value),1)):ne("",!0),V(Ir,{lines:e.tool.output,"empty-text":i.value==="running"?h(n)("tools.output.waiting"):h(n)("tools.output.empty")},null,8,["lines","empty-text"])]),default:he(()=>[C("span",Gxe,B(s.value),1),r.value?(b(),I("span",Qxe,B(r.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),t_e=vt(e_e,[["__scopeId","data-v-b12a8498"]]),n_e={class:"tl-name"},i_e={key:0,class:"tl-mono"},s_e={key:1,class:"tl-mono"},o_e={key:2,class:"tl-dim"},r_e={key:3,class:"tl-faint"},l_e={key:0,class:"tl-chip"},a_e={key:0,class:"file-list"},u_e=["onClick"],c_e=tt({__name:"GlobTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>ao(n.tool.name)==="glob"),l=F(()=>qu(n.tool.arg)),a=F(()=>{const m=l.value;return ei(m?.pattern)??ei(m?.glob)??ei(m?.query)??""}),u=F(()=>{const m=l.value;return ei(m?.path)??ei(m?.dir)??ei(m?.directory)??ei(m?.cwd)??""}),c=F(()=>(n.tool.output??[]).filter(m=>m.trim().length>0)),d=F(()=>c.value.length>0),f=F(()=>d.value),p=Z(n.tool.defaultExpanded===!0&&f.value);Qe(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&f.value&&(p.value=!0)});function g(m){const y=m.trim();y&&i("openFile",{path:y})}return(m,y)=>(b(),fe(kl,{status:o.value,open:p.value,expandable:f.value,onToggle:y[0]||(y[0]=w=>p.value=!p.value)},{leading:he(()=>[V(h(Ce),{name:r.value?"tree-view":"list",size:"sm"},null,8,["name"])]),trailing:he(()=>[r.value&&c.value.length>0?(b(),I("span",l_e,B(h(s)("tools.chip.files",{count:c.value.length})),1)):ne("",!0)]),body:he(()=>[r.value?(b(),I("div",a_e,[(b(!0),I(Be,null,yt(c.value,(w,k)=>(b(),I("button",{key:k,class:"file-row",type:"button",onClick:A=>g(w)},B(w),9,u_e))),128))])):(b(),fe(Ir,{key:1,lines:e.tool.output},null,8,["lines"]))]),default:he(()=>[C("span",n_e,B(h(s)(r.value?"tools.label.glob":"tools.label.ls")),1),r.value&&a.value?(b(),I("span",i_e,B(a.value),1)):!r.value&&u.value?(b(),I("span",s_e,B(u.value),1)):(b(),I("span",o_e,B(e.tool.arg),1)),r.value&&u.value?(b(),I("span",r_e,B(u.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),d_e=vt(c_e,[["__scopeId","data-v-3936099e"]]),f_e={class:"tl-name"},h_e={key:0,class:"tl-dim"},p_e={key:1,class:"tl-pill pill-active"},g_e={key:0,class:"goal-block"},m_e={class:"goal-text"},v_e={key:0,class:"goal-criterion"},y_e=tt({__name:"GoalTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>ao(t.tool.name)),o=F(()=>qu(t.tool.arg)),r=F(()=>ei(o.value?.objective)??""),l=F(()=>ei(o.value?.completionCriterion)??ei(o.value?.completion_criterion)??""),a={active:"status.goalStatusActive",blocked:"status.goalStatusBlocked",complete:"status.goalStatusComplete"},u=F(()=>ei(o.value?.status)??""),c=F(()=>{const k=a[u.value];return k?n(k):u.value}),d=F(()=>{switch(u.value){case"complete":return"pill-done";case"blocked":return"pill-blocked";default:return"pill-active"}}),f=F(()=>{const k=Xa(o.value?.value),A=ei(o.value?.unit);return k===void 0||!A?"":["turns","tokens","milliseconds","seconds","minutes","hours"].includes(A)?n(`tools.goal.${A}`,{value:k}):n("tools.goal.budget",{value:k,unit:A})}),p=F(()=>{switch(s.value){case"creategoal":return r.value;case"updategoal":return c.value;case"setgoalbudget":return f.value;default:return""}}),g=F(()=>!!t.tool.output&&t.tool.output.length>0),m=F(()=>!!l.value||s.value==="creategoal"&&g.value),y=F(()=>m.value||g.value),w=Z(t.tool.defaultExpanded===!0&&y.value);return Qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&y.value&&(w.value=!0)}),(k,A)=>(b(),fe(kl,{status:i.value,open:w.value,expandable:y.value,onToggle:A[0]||(A[0]=v=>w.value=!w.value)},{leading:he(()=>[V(h(Ce),{name:"target",size:"sm"})]),trailing:he(()=>[s.value==="updategoal"&&c.value?(b(),I("span",{key:0,class:De(["tl-pill",d.value])},B(c.value),3)):s.value==="creategoal"?(b(),I("span",p_e,B(h(n)("status.goalStatusActive")),1)):ne("",!0)]),body:he(()=>[r.value?(b(),I("div",g_e,[C("div",m_e,B(r.value),1),l.value?(b(),I("div",v_e,B(l.value),1)):ne("",!0)])):ne("",!0),g.value?(b(),fe(Ir,{key:1,lines:e.tool.output},null,8,["lines"])):ne("",!0)]),default:he(()=>[C("span",f_e,B(h(Zf)(e.tool.name)),1),p.value?(b(),I("span",h_e,B(p.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),b_e=vt(y_e,[["__scopeId","data-v-862274de"]]),k_e={class:"tl-name"},A_e={key:0,class:"tl-mono"},C_e={key:1,class:"tl-dim"},w_e={key:2,class:"tl-faint"},x_e={key:0,class:"tl-chip"},__e={key:0,class:"match-list"},S_e=["onClick"],M_e={key:0,class:"mref"},I_e={class:"mtext"},E_e=tt({__name:"GrepTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>ao(n.tool.name)==="grep"),l=F(()=>qu(n.tool.arg)),a=F(()=>{const y=l.value;return ei(y?.pattern)??ei(y?.query)??ei(y?.regex)??""}),u=F(()=>{const y=l.value;return ei(y?.path)??ei(y?.glob)??ei(y?.include)??""}),c=F(()=>(n.tool.output??[]).filter(y=>y.trim().length>0).map(y=>{const w=/^(.+?):(\d+)[:-](.*)$/.exec(y);return w?{path:w[1],line:Number(w[2]),text:(w[3]??"").trim()}:{text:y}})),d=F(()=>c.value.length),f=F(()=>d.value>0),p=F(()=>f.value),g=Z(n.tool.defaultExpanded===!0&&p.value);Qe(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&p.value&&(g.value=!0)});function m(y){y.path&&i("openFile",{path:y.path,line:y.line})}return(y,w)=>(b(),fe(kl,{status:o.value,open:g.value,expandable:p.value,onToggle:w[0]||(w[0]=k=>g.value=!g.value)},{leading:he(()=>[V(h(Ce),{name:"search",size:"sm"})]),trailing:he(()=>[d.value>0?(b(),I("span",x_e,B(h(s)("tools.chip.results",{count:d.value})),1)):ne("",!0)]),body:he(()=>[r.value?(b(),I("div",__e,[(b(!0),I(Be,null,yt(c.value,(k,A)=>(b(),I("button",{key:A,class:De(["match-row",{link:k.path}]),type:"button",onClick:v=>m(k)},[k.path?(b(),I("span",M_e,B(k.path)+":"+B(k.line),1)):ne("",!0),C("span",I_e,B(k.text),1)],10,S_e))),128))])):(b(),fe(Ir,{key:1,lines:e.tool.output},null,8,["lines"]))]),default:he(()=>[C("span",k_e,B(h(s)(r.value?"tools.label.grep":"tools.label.search")),1),a.value?(b(),I("span",A_e,B(a.value),1)):(b(),I("span",C_e,B(e.tool.arg),1)),u.value?(b(),I("span",w_e,B(u.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),T_e=vt(E_e,[["__scopeId","data-v-899c1a48"]]),L_e=["src","controls","muted"],N_e=["src","alt"],F_e=tt({__name:"AuthMedia",props:{url:{},kind:{},alt:{},fileId:{},mediaClass:{default:"u-img"},controls:{type:Boolean,default:!0},muted:{type:Boolean,default:!1}},setup(e){const t=e,n=Z(t.fileId?"":t.url),i=Z(null),s=Z(!t.fileId);let o=null,r=0,l=!1,a=null;function u(){o!==null&&(URL.revokeObjectURL(o),o=null)}async function c(){const d=++r;if(u(),!t.fileId){n.value=t.url;return}if(s.value)try{const f=await Pt().getFileBlob(t.fileId),p=URL.createObjectURL(f);if(l||d!==r){URL.revokeObjectURL(p);return}o=p,n.value=o}catch{if(l||d!==r)return;n.value=t.url}}return Qe(()=>[t.fileId,t.url,s.value],c,{immediate:!0}),pn(()=>{typeof IntersectionObserver=="function"&&i.value?(a=new IntersectionObserver(d=>{d[0]?.isIntersecting&&(s.value=!0,a?.disconnect(),a=null)},{rootMargin:"200px"}),a.observe(i.value)):s.value=!0}),Gn(()=>{l=!0,a?.disconnect(),a=null,u()}),(d,f)=>e.kind==="video"?(b(),I("video",{key:0,ref_key:"mediaEl",ref:i,class:De(e.mediaClass),src:n.value||void 0,controls:e.controls,muted:e.muted,playsinline:"",preload:"metadata"},null,10,L_e)):(b(),I("img",{key:1,ref_key:"mediaEl",ref:i,class:De([e.mediaClass,{"is-resolving":!n.value}]),src:n.value||void 0,alt:e.alt||"",loading:"lazy"},null,10,N_e))}}),Op=vt(F_e,[["__scopeId","data-v-0826404b"]]),B_e={class:"media-title"},$_e=["src","alt"],D_e=["aria-label"],R_e={key:0,class:"media-video-tile","aria-hidden":"true"},z_e={class:"media-play-badge","aria-hidden":"true"},O_e=["src"],P_e=tt({__name:"MediaTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia"],setup(e,{emit:t}){const n=e,i=t,s=F(()=>n.tool.status==="ok"?n.tool.media:void 0);function o(d){return d.split(/[\\/]+/).pop()||d}function r(d){return d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/1024/1024).toFixed(1)} MB`}const l=F(()=>{const d=s.value;if(!d)return"";const f=[d.path?o(d.path):n.tool.name];return d.mimeType&&f.push(d.mimeType),d.bytes!==void 0&&f.push(r(d.bytes)),d.dimensions&&f.push(d.dimensions),f.join(" · ")}),a=F(()=>s.value?.url.startsWith("blob:")??!1),u=F(()=>{const d=s.value;return d?.kind==="video"&&d.fileId!==void 0&&!a.value});function c(d){const f=s.value;if(f?.kind!=="image"&&f?.kind!=="video")return;const p=f.kind==="image"?d.currentTarget.querySelector("img"):null;i("openMedia",{media:f,originImg:p})}return(d,f)=>s.value?(b(),I("div",{key:0,class:De(["media-tool",{mob:e.mobile}])},[V(h(gn),{text:s.value.path||l.value},{default:he(()=>[C("div",B_e,B(l.value),1)]),_:1},8,["text"]),s.value.kind==="image"?(b(),fe(h(gn),{key:0,text:s.value.path||l.value},{default:he(()=>[C("button",{type:"button",class:"media-image-button",onClick:c},[C("img",{class:"media-image",src:s.value.url,alt:s.value.path?o(s.value.path):l.value,loading:"lazy"},null,8,$_e)])]),_:1},8,["text"])):s.value.kind==="video"?(b(),fe(h(gn),{key:1,text:s.value.path||l.value},{default:he(()=>[C("button",{type:"button",class:"media-image-button media-video-button","aria-label":s.value.path?o(s.value.path):l.value,onClick:c},[u.value?(b(),I("span",R_e)):(b(),fe(Op,{key:1,url:s.value.url,kind:"video","file-id":a.value?void 0:s.value.fileId,"media-class":"media-video",controls:!1,muted:""},null,8,["url","file-id"])),C("span",z_e,[V(h(Ce),{name:"play",size:"sm"})])],8,D_e)]),_:1},8,["text"])):(b(),I("audio",{key:2,class:"media-audio",src:s.value.url,controls:""},null,8,O_e))],2)):ne("",!0)}}),j_e=vt(P_e,[["__scopeId","data-v-3bc3ee1a"]]),H_e=["innerHTML"],W_e={class:"tl-name"},q_e={key:0,class:"tl-faint"},U_e={key:0,class:"tl-chip"},K_e=["title"],V_e={key:1,class:"plan-content"},Z_e={key:2,class:"plan-review"},G_e={key:0},Q_e={class:"review-label"},Y_e={key:1},J_e={class:"review-label"},X_e={class:"review-feedback"},eSe=tt({__name:"PlanTool",props:{tool:{},mobile:{type:Boolean}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Z(n.tool.defaultExpanded===!0),r=F(()=>n.tool.plan),l=F(()=>r.value?.path??n.tool.planPath),a=F(()=>r.value!==void 0||l.value!==void 0||(n.tool.output?.length??0)>0),u=F(()=>{const d=r.value?.review?.state;return d?s(`tools.plan.review.${d}`):void 0});function c(){l.value&&i("openFile",{path:l.value,content:r.value?.plan})}return(d,f)=>(b(),fe(kl,{status:e.tool.status,open:o.value,expandable:a.value,onToggle:f[0]||(f[0]=p=>o.value=!o.value)},{leading:he(()=>[C("span",{class:"plan-glyph",innerHTML:h(c$)(e.tool.name)},null,8,H_e)]),trailing:he(()=>[e.tool.timing?(b(),I("span",U_e,B(e.tool.timing),1)):ne("",!0)]),body:he(()=>[l.value?(b(),I("button",{key:0,type:"button",class:"plan-path",title:l.value,onClick:c},B(l.value),9,K_e)):ne("",!0),r.value?(b(),I("div",V_e,[V(h(Kl),{text:r.value.plan,"open-file":p=>i("openFile",p)},null,8,["text","open-file"])])):ne("",!0),r.value?.review?.selectedOption||r.value?.review?.feedback?(b(),I("div",Z_e,[r.value.review.selectedOption?(b(),I("div",G_e,[C("span",Q_e,B(h(s)("tools.plan.selectedOption")),1),C("span",null,B(r.value.review.selectedOption),1)])):ne("",!0),r.value.review.feedback?(b(),I("div",Y_e,[C("span",J_e,B(h(s)("tools.plan.feedback")),1),C("span",X_e,B(r.value.review.feedback),1)])):ne("",!0)])):ne("",!0),r.value?ne("",!0):(b(),fe(Ir,{key:3,lines:e.tool.output,"empty-text":h(s)("tools.output.empty")},null,8,["lines","empty-text"]))]),default:he(()=>[C("span",W_e,B(h(Zf)(e.tool.name)),1),u.value?(b(),I("span",q_e,B(u.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),tSe=vt(eSe,[["__scopeId","data-v-8dff80a1"]]),nSe={class:"tl-name"},iSe={key:1,class:"tl-faint"},sSe={key:2,class:"tl-faint"},oSe={key:3,class:"tl-dim"},rSe={key:0,class:"tl-chip"},lSe=tt({__name:"ReadTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>qu(n.tool.arg)),l=F(()=>rD(r.value)??""),a=F(()=>l.value?qf(l.value):""),u=F(()=>l.value?lD(l.value):""),c=F(()=>{const E=r.value;if(E)return Xa(E.offset)??Xa(E.line_start)??Xa(E.start_line)}),d=F(()=>{const E=r.value;if(!E)return;const S=Xa(E.limit)??Xa(E.length);return Xa(E.line_end)??Xa(E.end_line)??(c.value!==void 0&&S!==void 0?c.value+S:void 0)}),f=F(()=>c.value!==void 0&&d.value!==void 0?`:${c.value}-${d.value}`:c.value!==void 0?`:${c.value}`:""),p=F(()=>n.tool.status==="ok"?bte(n.tool.output??[]):null),g=F(()=>p.value?.contents??[]),m=F(()=>p.value?.lineNumbers),y=F(()=>p.value?.contents.length??n.tool.output?.length??0),w=F(()=>!!n.tool.output&&n.tool.output.length>0),k=F(()=>p.value!==null||w.value),A=Z(n.tool.defaultExpanded===!0&&k.value),v=Z(A.value);Qe(A,E=>{E&&(v.value=!0)}),Qe(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&k.value&&(A.value=!0)});function x(){l.value&&i("openFile",{path:l.value,line:c.value})}return(E,S)=>(b(),fe(kl,{status:o.value,open:A.value,expandable:k.value,onToggle:S[0]||(S[0]=M=>A.value=!A.value)},{leading:he(()=>[V(h(Ce),{name:"file-text",size:"sm"})]),trailing:he(()=>[y.value>0?(b(),I("span",rSe,B(h(s)("tools.chip.lines",{count:y.value})),1)):ne("",!0)]),body:he(()=>[l.value?(b(),I("button",{key:0,class:"path-link",type:"button",onClick:x},B(l.value),1)):ne("",!0),p.value&&v.value?(b(),fe(al,{key:1,code:g.value,path:l.value,"line-numbers":m.value},null,8,["code","path","line-numbers"])):(b(),fe(Ir,{key:2,lines:e.tool.output,"empty-text":h(s)("tools.output.waiting")},null,8,["lines","empty-text"]))]),default:he(()=>[C("span",nSe,B(h(s)("tools.label.read")),1),a.value?(b(),I("button",{key:0,class:"tl-file",type:"button",onClick:It(x,["stop"])},B(a.value),1)):ne("",!0),u.value?(b(),I("span",iSe,B(u.value),1)):ne("",!0),f.value?(b(),I("span",sSe,B(f.value),1)):ne("",!0),a.value?ne("",!0):(b(),I("span",oSe,B(l.value||e.tool.arg),1))]),_:1},8,["status","open","expandable"]))}}),aSe=vt(lSe,[["__scopeId","data-v-0edbdd82"]]),uSe=["aria-expanded"],cSe={class:"title"},dSe={key:0,class:"meta"},fSe={key:1,class:"sum-txt"},hSe={class:"rt"},pSe={class:"status"},gSe={key:0,class:"chip"},mSe={key:1,class:"tm"},vSe={class:"body"},ySe={class:"overview"},bSe={class:"overview-line"},kSe={class:"big"},ASe={key:0,class:"lbl"},CSe={key:1,class:"lbl"},wSe={key:2,class:"lbl"},xSe={key:3,class:"lbl"},_Se={key:0,class:"seg","aria-hidden":"true"},SSe={key:1,class:"legend"},MSe=["disabled","aria-label","aria-expanded","onClick"],ISe={class:"mname"},ESe={class:"mact"},TSe={class:"mphase"},LSe=["aria-expanded","onClick"],NSe={key:1,class:"fallback-output"},FSe={key:2,class:"waiting"},BSe=tt({__name:"SwarmTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(z){if(!z)return{};try{const G=JSON.parse(z),K=Array.isArray(G.items)?G.items:void 0;return{description:typeof G.description=="string"?G.description:void 0,itemCount:K?.length}}catch{return{}}}const r=an("resolveSwarmMembers"),l=F(()=>o(i.tool.arg)),a=F(()=>Zf(i.tool.name)),u=F(()=>l.value.description??""),c=F(()=>r?.(i.tool.id)??[]),d=F(()=>rte(i.tool.output)),f=an("modelDisplay"),p=an("subagentEffort"),g=F(()=>{let z;for(const G of c.value){const K=f?.(G.model),H=p?.(G.thinkingEffort),q=[K,H].filter(ee=>ee!==void 0);if(q.length===0)continue;const X=q.join(" · ");if(z===void 0)z=X;else if(z!==X)return}return z}),m=F(()=>i.tool.status),y=F(()=>m.value==="running"?"running":m.value==="error"||(d.value?.failed??0)>0?"error":"ok"),w=F(()=>oee(c.value,d.value)),k=F(()=>{const z={completed:0,working:0,suspended:0,queued:0,failed:0,cancelled:0};for(const G of w.value)z[G.phase]++;return z}),A=F(()=>w.value.length||l.value.itemCount||0),v=F(()=>k.value.completed+k.value.failed+k.value.cancelled),x=F(()=>{const z=d.value;if(!z)return"";const G=z.aborted??0;return G>0?n("tools.swarm.doneSubWithCancelled",{completed:z.completed,failed:z.failed,cancelled:G}):n("tools.swarm.doneSub",{completed:z.completed,failed:z.failed})}),E=F(()=>k.value.working+k.value.suspended+k.value.queued),S=[{phase:"completed",cls:"s-ok"},{phase:"working",cls:"s-run"},{phase:"suspended",cls:"s-warn"},{phase:"failed",cls:"s-fail"},{phase:"cancelled",cls:"s-queue"},{phase:"queued",cls:"s-queue"}],M=F(()=>S.map(({phase:z,cls:G})=>({phase:z,count:k.value[z],cls:G})).filter(z=>z.count>0)),_=Z(m.value==="running"||E.value>0);function N(){_.value=!_.value}const D=F(()=>w.value.length>0||d.value||m.value==="running"?"":(i.tool.output??[]).join(` +`).trim()),T=Z(new Set);function $(z){return T.value.has(z)}function P(z){const G=new Set(T.value);G.has(z)?G.delete(z):G.add(z),T.value=G}function O(z){if(z.agentId){s("openAgent",z.agentId);return}z.body&&P(z.id)}function R(z){return z.agentId!==void 0&&z.body.length>0&&(z.phase==="completed"||z.phase==="failed"||z.phase==="cancelled")}function W(z){return n(`tools.swarm.phase${z[0].toUpperCase()}${z.slice(1)}`)}return(z,G)=>(b(),I("div",{class:De(["swarm-card",{open:_.value,err:y.value==="error"}])},[C("button",{class:"head",type:"button","aria-expanded":_.value,onClick:N},[V(h(Ce),{class:"ic",name:"sparkles",size:"sm"}),C("span",cSe,B(a.value),1),u.value?(b(),I("span",dSe,"·")):ne("",!0),u.value?(b(),I("span",fSe,B(u.value),1)):ne("",!0),C("span",hSe,[C("span",pSe,[y.value==="ok"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):y.value==="error"?(b(),fe(h(Ce),{key:1,name:"close",size:"sm"})):(b(),fe(h(hl),{key:2,status:"running"}))]),v.value>0||A.value>0?(b(),I("span",gSe,B(v.value)+" / "+B(A.value),1)):ne("",!0),e.tool.timing?(b(),I("span",mSe,B(e.tool.timing),1)):ne("",!0)]),V(h(Ce),{class:"car",name:"chevron-right",size:"sm"})],8,uSe),Bn(C("div",vSe,[C("div",ySe,[C("div",bSe,[C("span",kSe,B(h(n)("tools.swarm.progress",{done:v.value,total:A.value})),1),g.value?(b(),I("span",ASe,B(g.value),1)):ne("",!0),y.value==="running"&&A.value>0?(b(),I("span",CSe,B(h(n)("tools.swarm.runningSub",{count:E.value})),1)):d.value?(b(),I("span",wSe,B(x.value),1)):(b(),I("span",xSe,B(h(n)("tools.swarm.waiting")),1))]),A.value>0&&M.value.length>0?(b(),I("div",_Se,[(b(!0),I(Be,null,yt(M.value,K=>(b(),I("span",{key:K.phase,class:De(K.cls),style:Vt({flex:K.count})},null,6))),128))])):ne("",!0),M.value.length>1?(b(),I("div",SSe,[(b(!0),I(Be,null,yt(M.value,K=>(b(),I("span",{key:K.phase},[C("i",{class:De(["lg-dot",K.cls])},null,2),Ue(B(W(K.phase))+" "+B(K.count),1)]))),128))])):ne("",!0)]),w.value.length>0?(b(!0),I(Be,{key:0},yt(w.value,K=>(b(),I("div",{key:K.id,class:De(["member",[`phase-${K.phase}`,{open:!K.agentId&&$(K.id)}]])},[C("button",{class:"member-head",type:"button",disabled:!K.agentId&&!K.body,"aria-label":K.agentId?h(n)("tasks.openDetail"):void 0,"aria-expanded":!K.agentId&&K.body?$(K.id):void 0,onClick:H=>O(K)},[V(h(hl),{class:"row-dot",status:K.phase},null,8,["status"]),V(h(gn),{text:K.name},{default:he(()=>[C("span",ISe,B(K.name),1)]),_:2},1032,["text"]),K.activity?(b(),fe(h(gn),{key:0,text:K.activity},{default:he(()=>[C("span",ESe,B(K.activity),1)]),_:2},1032,["text"])):ne("",!0),C("span",TSe,B(W(K.phase)),1),K.agentId?(b(),fe(h(Ce),{key:1,class:"mcar",name:"arrow-right",size:"sm"})):K.body?(b(),fe(h(Ce),{key:2,class:"mcar",name:"chevron-right",size:"sm"})):ne("",!0)],8,MSe),R(K)?(b(),I("button",{key:0,class:"member-saved",type:"button","aria-expanded":$(K.id),onClick:H=>P(K.id)},[V(h(Ce),{class:De(["member-saved-car",{open:$(K.id)}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"]),C("span",null,B(h(n)("tools.output.saved")),1)],8,LSe)):ne("",!0),K.body&&(!K.agentId||R(K))?Bn((b(),I("div",{key:1,class:"member-body"},B(K.body),513)),[[rs,$(K.id)]]):ne("",!0)],2))),128)):D.value?(b(),I("div",NSe,B(D.value),1)):(b(),I("div",FSe,B(h(n)("tools.swarm.waiting")),1))],512),[[rs,_.value]])],2))}}),$Se=vt(BSe,[["__scopeId","data-v-f7b643ea"]]),DSe=tt({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e;return(n,i)=>(b(),I("span",{class:De(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},[t.status==="run"?(b(),fe(h(hl),{key:0,status:"running"})):t.status==="pending"?(b(),fe(h(hl),{key:1,status:"idle"})):t.status==="done"?(b(),fe(h(Ce),{key:2,name:"check",size:"sm"})):(b(),fe(h(Ce),{key:3,name:"close",size:"sm"}))],2))}}),RSe=vt(DSe,[["__scopeId","data-v-f1aedfd0"]]),zSe={class:"tl-name"},OSe={key:0,class:"tl-dim"},PSe={key:0,class:"tl-chip"},jSe={key:1,class:"todo-bar","aria-hidden":"true"},HSe={key:0,class:"todo-list"},WSe={class:"todo-title"},qSe=tt({__name:"TodoTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt();function i(g){const m=qu(g),y=m&&Array.isArray(m.todos)?m.todos:m&&Array.isArray(m.items)?m.items:void 0;if(!y)return[];const w=[];for(const k of y){if(!k||typeof k!="object")continue;const A=k,v=ei(A.title)??ei(A.content)??ei(A.activeForm)??ei(A.text);if(!v)continue;const x=ei(A.status)??"pending";w.push({title:v,status:x==="in_progress"?"in_progress":x==="done"||x==="completed"?"done":"pending"})}return w}const s=F(()=>t.tool.status),o=F(()=>i(t.tool.arg)),r=F(()=>o.value.filter(g=>g.status==="done").length),l=F(()=>o.value.length),a=F(()=>o.value.find(g=>g.status==="in_progress")),u=F(()=>l.value>0?r.value/l.value:0),c=F(()=>!!t.tool.output&&t.tool.output.length>0),d=F(()=>l.value>0||c.value),f=Z(t.tool.defaultExpanded===!0&&d.value);Qe(()=>[t.tool.defaultExpanded,t.tool.status],()=>{t.tool.defaultExpanded===!0&&d.value&&(f.value=!0)});function p(g){return g.status==="in_progress"?"run":g.status}return(g,m)=>(b(),fe(kl,{status:s.value,open:f.value,expandable:d.value,onToggle:m[0]||(m[0]=y=>f.value=!f.value)},{leading:he(()=>[V(h(Ce),{name:"check-list",size:"sm"})]),trailing:he(()=>[l.value>0?(b(),I("span",PSe,B(r.value)+"/"+B(l.value),1)):ne("",!0),l.value>0?(b(),I("span",jSe,[C("span",{class:"todo-fill",style:Vt({width:`${u.value*100}%`})},null,4)])):ne("",!0)]),body:he(()=>[l.value>0?(b(),I("div",HSe,[(b(!0),I(Be,null,yt(o.value,(y,w)=>(b(),I("div",{key:w,class:De(["todo-row",`s-${y.status}`])},[V(RSe,{status:p(y)},null,8,["status"]),C("span",WSe,B(y.title),1)],2))),128))])):c.value?(b(),fe(Ir,{key:1,lines:e.tool.output},null,8,["lines"])):ne("",!0)]),default:he(()=>[C("span",zSe,B(h(n)("tools.label.todo")),1),a.value?(b(),I("span",OSe,B(a.value.title),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),USe=vt(qSe,[["__scopeId","data-v-1b7f51f3"]]),KSe={class:"tl-name"},VSe={key:0},ZSe={key:1,class:"tl-dim"},GSe={key:0,class:"fetch-url"},QSe=tt({__name:"WebFetchTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>{const u=qu(t.tool.arg);return ei(u?.url)??ei(u?.uri)??""}),o=F(()=>s.value?Cxe(s.value):""),r=F(()=>!!t.tool.output&&t.tool.output.length>0),l=F(()=>r.value),a=Z(t.tool.defaultExpanded===!0&&l.value);return Qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&l.value&&(a.value=!0)}),(u,c)=>(b(),fe(kl,{status:i.value,open:a.value,expandable:l.value,onToggle:c[0]||(c[0]=d=>a.value=!a.value)},{leading:he(()=>[V(h(Ce),{name:"globe",size:"sm"})]),body:he(()=>[s.value?(b(),I("div",GSe,B(s.value),1)):ne("",!0),V(Ir,{lines:e.tool.output,"empty-text":h(n)("tools.output.waiting")},null,8,["lines","empty-text"])]),default:he(()=>[C("span",KSe,B(h(n)("tools.label.web_fetch")),1),o.value?(b(),I("span",VSe,B(o.value),1)):(b(),I("span",ZSe,B(e.tool.arg),1))]),_:1},8,["status","open","expandable"]))}}),YSe=vt(QSe,[["__scopeId","data-v-8c248fcc"]]);function JSe(e){if(e.media&&e.status==="ok")return j_e;switch(ao(e.name)){case"bash":return Ixe;case"read":return aSe;case"edit":case"write":case"multi_edit":return Vxe;case"grep":case"search":return T_e;case"glob":case"ls":return d_e;case"web_fetch":return YSe;case"todo":return USe;case"task":return Uwe;case"agentswarm":return $Se;case"askuserquestion":return Axe;case"exitplanmode":return tSe;case"creategoal":case"getgoal":case"setgoalbudget":case"updategoal":return b_e;default:return t_e}}const mk=tt({__name:"ToolCall",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const n=e,i=t,s=F(()=>JSe(n.tool));return(o,r)=>(b(),fe(Ms(s.value),{tool:e.tool,mobile:e.mobile,onOpenMedia:r[0]||(r[0]=l=>i("openMedia",l)),onOpenFile:r[1]||(r[1]=l=>i("openFile",l)),onOpenAgent:r[2]||(r[2]=l=>i("openAgent",l))},null,40,["tool","mobile"]))}}),XSe=["aria-expanded"],eMe={class:"think-title"},tMe={key:0,class:"think-time"},nMe=["inert"],iMe={class:"think-text"},sMe=tt({__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=Z(!1),{t:i}=Bt();Qe(()=>t.streaming,(d,f)=>{f&&!d&&(n.value=!1)});const s=Z(Date.now());Qe(()=>[t.streaming,t.startedAt],([d,f],p,g)=>{if(!d||!f)return;s.value=Date.now();const m=setInterval(()=>{s.value=Date.now()},1e3);g(()=>clearInterval(m))},{immediate:!0});const o=F(()=>{if(t.streaming&&t.startedAt){const d=Date.parse(t.startedAt);return Number.isFinite(d)?Ma(s.value-d):""}if(t.durationMs!==void 0){const d=Ma(t.durationMs);return d?`· ${d}`:""}return""}),r=an("pinScroll",()=>{}),l=Z(null),a=Z(null),u=Z(!1);function c(){if(!n.value){const f=(a.value?.scrollHeight??0)>(typeof window<"u"?window.innerHeight:0);u.value=t.streaming&&f}if(n.value=!n.value,t.streaming)return;const d=l.value;d&&kt(()=>r(d))}return(d,f)=>(b(),I("div",{class:De(["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:c},[V(h(Ce),{class:"think-bulb",name:"thinking",size:"sm"}),C("span",eMe,B(e.streaming?h(i)("thinking.streaming"):h(i)("thinking.panelTitle")),1),o.value?(b(),I("span",tMe,B(o.value),1)):ne("",!0),V(h(Ce),{class:"think-car",name:"chevron-right",size:"sm"})],8,XSe),C("div",{class:De(["think-body",{open:n.value,instant:u.value}]),inert:!n.value},[C("div",{ref_key:"bodyInnerEl",ref:a,class:"think-body-inner"},[C("pre",iMe,B(e.text),1)],512)],10,nMe)],2))}}),vk=vt(sMe,[["__scopeId","data-v-7d463c2a"]]),aD=(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t);function oMe(e,t={}){return See(aD,e,t)}function rMe(e,t){return Iee(aD,e,t)}const lMe=["aria-expanded"],aMe=["aria-label"],uMe=["title"],cMe={key:0,class:"ar-sep"},dMe=["inert"],fMe={class:"ar-body-inner"},hMe=tt({__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,i=t,s=F(()=>n.items.at(-1)),o=F(()=>{const M=s.value;if(n.streaming&&M?.kind==="thinking")return M;for(let _=n.items.length-1;_>=0;_--){const N=n.items[_];if(N?.kind==="tool"&&N.tool.status==="running")return N}return null}),r=F(()=>{if(n.streaming)return"running";for(const M of n.items)if(M.kind==="tool"&&M.tool.status==="running")return"running";for(const M of n.items)if(M.kind==="tool"&&M.tool.status==="error")return"error";return"done"}),l=Z(r.value==="running"),a=an("pinScroll",()=>{}),u=Z(null),c=Z(null),d=Z(void 0),f=Z(Date.now()),p=F(()=>{let M=null;for(const _ of n.items)if(_.kind==="thinking"&&_.startedAt!==void 0){const N=Date.parse(_.startedAt);Number.isFinite(N)&&(M===null||N<M)&&(M=N)}return M});Qe(r,(M,_,N)=>{if(M==="running"){_!==void 0&&_!=="running"&&(l.value=!0),c.value===null&&(c.value=p.value??Date.now()),d.value=void 0,f.value=Date.now();const D=setInterval(()=>{f.value=Date.now()},1e3);N(()=>clearInterval(D));return}_==="running"&&(l.value=!1,c.value!==null&&(d.value=Date.now()-c.value),c.value=null)},{immediate:!0});function g(){if(l.value=!l.value,n.streaming)return;const M=u.value;M&&kt(()=>a(M))}const m=F(()=>{if(r.value==="done")return"check";if(r.value==="error")return"close";const M=o.value??s.value;return M?M.kind==="thinking"?"thinking":u$(M.tool.name):"tool"}),y=F(()=>rMe(n.items,o.value)),w=F(()=>oMe(n.items,{durationMs:d.value})),k=F(()=>r.value!=="running"||c.value===null?"":Ma(f.value-c.value)),A=F(()=>{if(r.value!=="running")return w.value.clauses;const M=[];return y.value.current&&M.push(y.value.current),M.push(...y.value.done),k.value&&M.push({fragments:[{text:k.value,tone:"faint"}]}),M}),v=F(()=>r.value!=="running"?w.value.plain:[y.value.plain,k.value].filter(Boolean).join(" · "));function x(M){if(M==="danger")return"ar-danger";if(M==="faint")return"ar-faint"}function E(M){return M.kind==="tool"?h$(M):`thinking-${M.sourceIndex}`}function S(M){return n.streaming&&M.kind==="thinking"&&M.durationMs===void 0&&M.sourceIndex===s.value?.sourceIndex}return(M,_)=>(b(),I("div",{class:De(["activity-run",{open:l.value}])},[C("button",{ref_key:"headEl",ref:u,class:"ar-head",type:"button","aria-expanded":l.value,onClick:g},[C("span",{class:De(["ar-glyph",{run:r.value==="running",err:r.value==="error",ok:r.value==="done"}]),role:"status","aria-label":r.value},[V(h(Ce),{name:m.value,size:"sm","aria-hidden":"true"},null,8,["name"])],10,aMe),C("span",{class:"ar-sum",title:v.value},[(b(!0),I(Be,null,yt(A.value,(N,D)=>(b(),I(Be,{key:D},[D>0?(b(),I("span",cMe," · ")):ne("",!0),(b(!0),I(Be,null,yt(N.fragments,(T,$)=>(b(),I("span",{key:$,class:De(x(T.tone))},B(T.text),3))),128))],64))),128))],8,uMe),V(h(Ce),{class:"ar-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,lMe),C("div",{class:De(["ar-body",{open:l.value}]),inert:!l.value},[C("div",fMe,[(b(!0),I(Be,null,yt(e.items,N=>(b(),I(Be,{key:E(N)},[N.kind==="thinking"?(b(),fe(vk,{key:0,text:N.thinking,mobile:e.mobile,streaming:S(N),"started-at":N.startedAt,"duration-ms":N.durationMs},null,8,["text","mobile","streaming","started-at","duration-ms"])):(b(),fe(mk,{key:1,tool:N.tool,mobile:e.mobile,onOpenMedia:_[0]||(_[0]=D=>i("openMedia",D)),onOpenFile:_[1]||(_[1]=D=>i("openFile",D)),onOpenAgent:_[2]||(_[2]=D=>i("openAgent",D))},null,8,["tool","mobile"]))],64))),128))])],10,dMe)],2))}}),uD=vt(hMe,[["__scopeId","data-v-91eb361a"]]),pMe={class:"msg-time"},gMe=tt({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>oL(t.time,n("conversation.yesterday")));return(s,o)=>(b(),I("span",pMe,B(i.value),1))}}),w2=vt(gMe,[["__scopeId","data-v-9153170e"]]),mMe=["aria-expanded"],vMe={class:"ntf-chip"},yMe={class:"ntf-main"},bMe={class:"ntf-title"},kMe={class:"ntf-sub"},AMe={class:"ntf-side"},CMe={class:"ng-dots"},wMe={class:"ng-list"},xMe=["aria-expanded","onClick"],_Me={class:"ntf-chip"},SMe={class:"ntf-main"},MMe={class:"ntf-title"},IMe={class:"ntf-sub"},EMe={class:"ntf-side"},TMe={class:"st"},LMe={class:"ntf-body"},NMe={class:"ntf-body-in"},FMe={class:"nd-fields"},BMe={class:"k"},$Me={class:"v"},DMe={class:"k"},RMe={class:"v"},zMe={class:"k"},OMe={class:"v"},PMe={key:0,class:"nd-body"},jMe={key:1,class:"nd-out"},HMe=["title"],WMe=["onClick"],qMe={class:"nd-raw"},UMe=["aria-expanded"],KMe={class:"ntf-chip"},VMe={class:"ntf-main"},ZMe={class:"ntf-title"},GMe={class:"ntf-sub"},QMe={class:"ntf-side"},YMe={class:"st"},JMe={class:"ntf-body"},XMe={class:"ntf-body-in"},eIe={class:"nd-fields"},tIe={class:"k"},nIe={class:"v"},iIe={class:"k"},sIe={class:"v"},oIe={class:"k"},rIe={class:"v"},lIe={key:0,class:"nd-body"},aIe={key:1,class:"nd-out"},uIe=["title"],cIe={class:"nd-raw"},dIe=tt({__name:"NotificationCard",props:{items:{}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.items.length>1),s=Z(!1),o=Z(new Set);function r(A,v){return A.id!==""?`${A.id}#${v}`:`ntf-${v}`}function l(A){const v=new Set(o.value);v.has(A)?v.delete(A):v.add(A),o.value=v}const a={completed:"check",failed:"alert-triangle",timed_out:"clock",killed:"stop",lost:"alert-triangle",info:"info"};function u(A){const v=Cg(A);return v==="info"&&A.sourceKind==="subagent"?"robot":a[v]}function c(A){return A.sourceKind==="subagent"?n("conversation.notification.kindSubagent"):n("conversation.notification.kindTask")}function d(A){return n(`conversation.notification.title.${Cg(A)}`,{kind:c(A)})}function f(A){return n(`conversation.notification.status.${Cg(A)}`)}function p(A){return tX(A)}function g(A){return A==="ok"?"done":A==="err"?"error":A==="warn"?"warn":""}const m=F(()=>t.items.map(A=>A.title).filter(A=>A!=="").join(" · ")),y=Z(null);let w=null;async function k(A,v){await ro(A)&&(y.value=v,w!==null&&clearTimeout(w),w=setTimeout(()=>{w=null,y.value=null},1200))}return(A,v)=>i.value?(b(),I("div",{key:0,class:De(["ntf-group-card",{open:s.value}])},[C("button",{class:"ntf-head",type:"button","aria-expanded":s.value,onClick:v[0]||(v[0]=x=>s.value=!s.value)},[C("span",vMe,[V(h(Ce),{name:"terminal",size:"sm"})]),C("span",yMe,[C("span",bMe,B(h(n)("conversation.notification.groupTitle",{n:e.items.length})),1),C("span",kMe,B(m.value),1)]),C("span",AMe,[C("span",CMe,[(b(!0),I(Be,null,yt(e.items,(x,E)=>(b(),I("span",{key:r(x,E),class:De(["dot",g(p(x))])},null,2))),128))]),V(h(Ce),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,mMe),Bn(C("div",wMe,[(b(!0),I(Be,null,yt(e.items,(x,E)=>(b(),I("div",{key:r(x,E),class:De(["ng-item",[p(x),{open:o.value.has(r(x,E))}]])},[C("button",{class:"ntf-head",type:"button","aria-expanded":o.value.has(r(x,E)),onClick:S=>l(r(x,E))},[C("span",_Me,[V(h(Ce),{name:u(x),size:"sm"},null,8,["name"])]),C("span",SMe,[C("span",MMe,B(d(x)),1),C("span",IMe,B(x.title),1)]),C("span",EMe,[C("span",TMe,B(f(x)),1),x.createdAt?(b(),fe(w2,{key:0,time:x.createdAt},null,8,["time"])):ne("",!0),V(h(Ce),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,xMe),Bn(C("div",LMe,[C("div",NMe,[C("div",FMe,[C("span",BMe,B(h(n)("conversation.notification.fields.type")),1),C("span",$Me,B(x.type),1),C("span",DMe,B(h(n)("conversation.notification.fields.source")),1),C("span",RMe,B(x.sourceKind)+" · "+B(x.sourceId),1),C("span",zMe,B(h(n)("conversation.notification.fields.severity")),1),C("span",OMe,B(x.severity||"—"),1)]),x.body?(b(),I("div",PMe,B(x.body),1)):ne("",!0),x.outputFile?(b(),I("div",jMe,[V(h(Ce),{class:"nd-out-ic",name:"file-text",size:"sm"}),C("span",{class:"path",title:x.outputFile.path},B(x.outputFile.path),9,HMe),C("button",{class:"nd-act",type:"button",onClick:It(S=>k(x.outputFile.path,r(x,E)),["stop"])},B(y.value===r(x,E)?h(n)("conversation.notification.copied"):h(n)("conversation.notification.copyPath")),9,WMe)])):ne("",!0),C("details",qMe,[C("summary",null,[V(h(Ce),{class:"nd-raw-car",name:"chevron-right",size:"sm"}),C("span",null,B(h(n)("conversation.notification.rawPayload")),1)]),C("pre",null,B(x.raw),1)])])],512),[[rs,o.value.has(r(x,E))]])],2))),128))],512),[[rs,s.value]])],2)):e.items[0]?(b(),I("div",{key:1,class:De(["ntf",[p(e.items[0]),{open:o.value.has(r(e.items[0],0))}]])},[C("button",{class:"ntf-head",type:"button","aria-expanded":o.value.has(r(e.items[0],0)),onClick:v[1]||(v[1]=x=>l(r(e.items[0],0)))},[C("span",KMe,[V(h(Ce),{name:u(e.items[0]),size:"sm"},null,8,["name"])]),C("span",VMe,[C("span",ZMe,B(d(e.items[0])),1),C("span",GMe,B(e.items[0].title),1)]),C("span",QMe,[C("span",YMe,B(f(e.items[0])),1),e.items[0].createdAt?(b(),fe(w2,{key:0,time:e.items[0].createdAt},null,8,["time"])):ne("",!0),V(h(Ce),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,UMe),Bn(C("div",JMe,[C("div",XMe,[C("div",eIe,[C("span",tIe,B(h(n)("conversation.notification.fields.type")),1),C("span",nIe,B(e.items[0].type),1),C("span",iIe,B(h(n)("conversation.notification.fields.source")),1),C("span",sIe,B(e.items[0].sourceKind)+" · "+B(e.items[0].sourceId),1),C("span",oIe,B(h(n)("conversation.notification.fields.severity")),1),C("span",rIe,B(e.items[0].severity||"—"),1)]),e.items[0].body?(b(),I("div",lIe,B(e.items[0].body),1)):ne("",!0),e.items[0].outputFile?(b(),I("div",aIe,[V(h(Ce),{class:"nd-out-ic",name:"file-text",size:"sm"}),C("span",{class:"path",title:e.items[0].outputFile.path},B(e.items[0].outputFile.path),9,uIe),C("button",{class:"nd-act",type:"button",onClick:v[2]||(v[2]=It(x=>k(e.items[0].outputFile.path,r(e.items[0],0)),["stop"]))},B(y.value===r(e.items[0],0)?h(n)("conversation.notification.copied"):h(n)("conversation.notification.copyPath")),1)])):ne("",!0),C("details",cIe,[C("summary",null,[V(h(Ce),{class:"nd-raw-car",name:"chevron-right",size:"sm"}),C("span",null,B(h(n)("conversation.notification.rawPayload")),1)]),C("pre",null,B(e.items[0].raw),1)])])],512),[[rs,o.value.has(r(e.items[0],0))]])],2)):ne("",!0)}}),cD=vt(dIe,[["__scopeId","data-v-69e0a1db"]]),fIe=["aria-expanded"],hIe=["title"],pIe=["inert"],gIe={class:"tf-body-inner"},mIe={key:1,class:"msg"},vIe=tt({__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,i=t,{t:s}=Bt(),o=F(()=>n.streamingTailIndex!==null),r=F(()=>n.live?n.parked?"parked":"live":"settled"),l=Z(!1),a=F(()=>o.value||l.value),u=Z(a.value),c=Z(a.value);let d=null;Qe(a,S=>{if(S){if(d!==null&&(clearTimeout(d),d=null),u.value){c.value=!0;return}u.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.value=!0})});return}c.value=!1,d=setTimeout(()=>{d=null,u.value=!1},200)});const f=an("pinScroll",()=>{}),p=Z(null),g=Z(Date.now());let m=null;function y(){m!==null&&(clearInterval(m),m=null)}An(()=>{y(),d!==null&&clearTimeout(d)}),Qe(r,(S,M)=>{S!=="settled"?(g.value=Date.now(),m===null&&(m=setInterval(()=>{g.value=Date.now()},1e3))):y(),M==="live"&&S!=="live"&&(l.value=!1)},{immediate:!0});const w=F(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),k=F(()=>ake({startMs:w.value,endedMs:n.endedMs,durationMs:n.durationMs,state:r.value==="settled"?{phase:"settled"}:{phase:"live",nowMs:g.value}}));function A(){l.value=!l.value,kt(()=>{const S=p.value;S&&f(S)})}const v=F(()=>{const S=k.value===void 0?"":Ma(k.value);return S?s("conversation.fold.worked",{duration:S}):s("conversation.fold.workedUnknown")});function x(S){return n.streamingTailIndex===null||S.kind==="thinking"&&S.durationMs!==void 0?!1:S.sourceIndex===n.streamingTailIndex}function E(S){if(n.streamingTailIndex===null)return!1;const M=S.items.at(-1);return M?.kind==="thinking"&&M.durationMs!==void 0?!1:M!==void 0&&M.sourceIndex===n.streamingTailIndex}return(S,M)=>e.items.length>0?(b(),I("div",{key:0,class:De(["turn-fold",{open:a.value,streaming:o.value}])},[o.value?ne("",!0):(b(),I("button",{key:0,ref_key:"headEl",ref:p,class:"tf-head",type:"button","aria-expanded":l.value,onClick:A},[C("span",{class:"tf-sum",title:v.value},B(v.value),9,hIe),V(h(Ce),{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,fIe)),u.value?(b(),I("div",{key:1,class:De(["tf-body",{open:c.value}]),inert:!a.value},[C("div",gIe,[(b(!0),I(Be,null,yt(e.items,(_,N)=>(b(),I(Be,{key:h(p$)(_,N)},[_.kind==="thinking"?(b(),fe(vk,{key:0,text:_.thinking,mobile:e.mobile,streaming:x(_),"started-at":_.startedAt,"duration-ms":_.durationMs},null,8,["text","mobile","streaming","started-at","duration-ms"])):_.kind==="text"&&_.text?(b(),I("div",mIe,[V(h(Kl),{text:_.text,streaming:x(_),"open-file":D=>i("openFile",D)},null,8,["text","streaming","open-file"])])):_.kind==="activity-run"?(b(),fe(uD,{key:2,items:_.items,mobile:e.mobile,streaming:E(_),onOpenMedia:M[0]||(M[0]=D=>i("openMedia",D)),onOpenFile:M[1]||(M[1]=D=>i("openFile",D)),onOpenAgent:M[2]||(M[2]=D=>i("openAgent",D))},null,8,["items","mobile","streaming"])):_.kind==="tool"?(b(),fe(mk,{key:3,tool:_.tool,mobile:e.mobile,onOpenMedia:M[3]||(M[3]=D=>i("openMedia",D)),onOpenFile:M[4]||(M[4]=D=>i("openFile",D)),onOpenAgent:M[5]||(M[5]=D=>i("openAgent",D))},null,8,["tool","mobile"])):_.kind==="notification"?(b(),fe(cD,{key:4,items:_.items},null,8,["items"])):ne("",!0)],64))),128))])],10,pIe)):ne("",!0)],2)):ne("",!0)}}),yIe=vt(vIe,[["__scopeId","data-v-66797f5d"]]),bIe={class:"turn-files"},kIe={class:"tf-ic","aria-hidden":"true"},AIe={class:"tf-title"},CIe={key:0,class:"tf-stats"},wIe={key:0,class:"tf-add"},xIe={key:1,class:"tf-del"},_Ie={class:"diffbar","aria-hidden":"true"},SIe={class:"tf-list"},MIe={key:0,class:"tf-dir"},IIe={class:"tf-base"},EIe={key:0,class:"tf-stats"},TIe={key:0,class:"tf-add"},LIe={key:1,class:"tf-del"},y4=3,NIe=tt({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.interactive!==!1),r=F(()=>{const v=n.changes.length;return s(v===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:v})}),l=F(()=>n.changes.some(v=>v.statsIncomplete)),a=F(()=>{let v=0,x=0;for(const E of n.changes)v+=E.added,x+=E.removed;return{added:v,removed:x}}),u=F(()=>!l.value&&(a.value.added>0||a.value.removed>0)),c=Z(!1),d=F(()=>c.value?n.changes:n.changes.slice(0,y4)),f=F(()=>Math.max(0,n.changes.length-y4)),p=F(()=>n.changes.length>y4),g=F(()=>c.value?s("conversation.turnFiles.showLess"):f.value===1?s("conversation.turnFiles.moreOne"):s("conversation.turnFiles.more",{number:f.value}));function m(v){const x=n.cwd?av(v,n.cwd):null;return x!==null?x||qf(v):v}function y(v){const x=m(v),E=Math.max(x.lastIndexOf("/"),x.lastIndexOf("\\"));return E>0?x.slice(0,E+1):""}function w(v){const x=m(v),E=Math.max(x.lastIndexOf("/"),x.lastIndexOf("\\"));return E>=0?x.slice(E+1):x}function k(v){return v.statsIncomplete||v.added===0&&v.removed===0?null:{added:v.added,removed:v.removed}}function A(v){v.hasWrite?i("openFile",{path:v.path}):i("openDiff",v)}return(v,x)=>(b(),I("div",bIe,[V(h(Tq),null,fI({head:he(()=>[C("span",kIe,[V(h(Ce),{name:"pencil",size:"sm"})]),C("span",AIe,B(r.value),1),u.value?(b(),I("span",CIe,[a.value.added>0?(b(),I("span",wIe,"+"+B(a.value.added),1)):ne("",!0),a.value.removed>0?(b(),I("span",xIe,"−"+B(a.value.removed),1)):ne("",!0),C("span",_Ie,[C("span",{class:"seg-add",style:Vt({flexGrow:a.value.added})},null,4),C("span",{class:"seg-del",style:Vt({flexGrow:a.value.removed})},null,4)])])):ne("",!0)]),default:he(()=>[C("ul",SIe,[(b(!0),I(Be,null,yt(d.value,E=>(b(),I("li",{key:E.path,class:"tf-row"},[(b(),fe(Ms(o.value?"button":"span"),{class:"tf-file",type:o.value?"button":void 0,onClick:S=>o.value&&A(E)},{default:he(()=>[y(E.path)?(b(),I("span",MIe,B(y(E.path)),1)):ne("",!0),C("span",IIe,B(w(E.path)),1)]),_:2},1032,["type","onClick"])),k(E)?(b(),I("span",EIe,[k(E).added>0?(b(),I("span",TIe,"+"+B(k(E).added),1)):ne("",!0),k(E).removed>0?(b(),I("span",LIe,"−"+B(k(E).removed),1)):ne("",!0)])):ne("",!0)]))),128))])]),_:2},[p.value?{name:"foot",fn:he(()=>[V(h(jt),{variant:"ghost",size:"sm",class:"tf-more","aria-expanded":c.value,onClick:x[0]||(x[0]=E=>c.value=!c.value)},{default:he(()=>[Ue(B(g.value)+" ",1),V(h(Ce),{class:De(["tf-more-car",{open:c.value}]),name:"chevron-down",size:"sm","aria-hidden":"true"},null,8,["class"])]),_:1},8,["aria-expanded"])]),key:"0"}:void 0]),1024)]))}}),FIe=vt(NIe,[["__scopeId","data-v-f37da416"]]),BIe={class:"activity-notice",role:"status"},$Ie={"aria-hidden":"true"},DIe={class:"an-label"},RIe=tt({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(b(),I("div",BIe,[C("span",$Ie,[V(h(Bi),{size:"sm"})]),C("span",DIe,B(e.label),1)]))}}),zIe=vt(RIe,[["__scopeId","data-v-cc29061f"]]),OIe=["data-turn-id"],PIe=["title"],jIe={class:"cn-head-text"},HIe={key:0,class:"cn-bubble"},WIe={class:"cn-prompt"},qIe={key:1,class:"cn-meta"},UIe=tt({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.cron),s=F(()=>i.value?.missedCount!==void 0),o=F(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),r=F(()=>{const f=i.value;return!f?.cron||f.recurring===!1?"":f.cron}),l=F(()=>s.value?"error":"ok"),a=F(()=>{const f=i.value;if(!f)return"";const p=[];return f.recurring===!1&&p.push(n("conversation.cron.oneShot")),typeof f.coalescedCount=="number"&&f.coalescedCount>1&&p.push(n("conversation.cron.coalesced",{n:f.coalescedCount})),f.missedCount!==void 0&&p.push(n("conversation.cron.missedCount",{n:f.missedCount})),f.stale===!0&&p.push(n("conversation.cron.finalDelivery")),p.join(" · ")}),u=F(()=>{const f=[o.value];return r.value&&f.push(r.value),a.value&&f.push(a.value),f.join(" · ")}),c=F(()=>{const f=i.value?.jobId;return f?n("conversation.cron.job",{id:f}):void 0}),d=F(()=>t.text??"");return(f,p)=>(b(),I("div",{class:De(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[C("div",{class:De(["cn-head",l.value]),title:c.value},[V(h(Ce),{name:"clock",size:"sm",class:"cn-head-ico","aria-hidden":"true"}),C("span",jIe,B(u.value),1)],10,PIe),d.value?(b(),I("div",HIe,[C("span",WIe,B(d.value),1)])):ne("",!0),e.createdAt?(b(),I("div",qIe,[V(w2,{time:e.createdAt},null,8,["time"])])):ne("",!0)],10,OIe))}}),KIe=vt(UIe,[["__scopeId","data-v-9f79345d"]]);let yk=!1,Tc=null,QS=!1;function VIe(){Tc!==null&&(clearTimeout(Tc),Tc=null),yk=!0}function ZIe(){Tc!==null&&clearTimeout(Tc),Tc=setTimeout(()=>{Tc=null,yk=!1},0)}function GIe(){QS||typeof document>"u"||(QS=!0,document.addEventListener("compositionstart",VIe,!0),document.addEventListener("compositionend",ZIe,!0))}function QIe(e){return yk||e.isComposing||e.keyCode===229}const YIe=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,JIe=/^(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,XIe=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,YS="text/plain;charset=utf-8";function eEe(e,t){const n=(t??"").toLowerCase();if(YIe.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:YS;const i=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return i===void 0?null:JIe.test(i)?YS:XIe.test(i)?`image/${i==="jpg"?"jpeg":i==="ico"?"x-icon":i}`:i==="pdf"?"application/pdf":null}async function dD(e,t,n,i){const s=eEe(n,i);if(s===null)return"unsupported";const o=window.open("","_blank");o!==null&&(o.opener=null);const r=await e.getFileBlob(t).catch(()=>null);if(r===null)return o?.close(),"failed";const l=URL.createObjectURL(new Blob([r],{type:s}));if(o!==null)o.location.href=l;else{const a=document.createElement("a");a.href=l,a.download=n??t,a.click()}return setTimeout(()=>{URL.revokeObjectURL(l)},6e4),"previewed"}/*! + * PhotoSwipe 5.4.4 - https://photoswipe.com + * (c) 2024 Dmytro Semenov + */function yr(e,t,n){const i=document.createElement(t);return e&&(i.className=e),n&&n.appendChild(i),i}function gs(e,t){return e.x=t.x,e.y=t.y,t.id!==void 0&&(e.id=t.id),e}function fD(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function $8(e,t){const n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.sqrt(n*n+i*i)}function N1(e,t){return e.x===t.x&&e.y===t.y}function Pp(e,t,n){return Math.min(Math.max(e,t),n)}function dp(e,t,n){let i=`translate3d(${e}px,${t||0}px,0)`;return n!==void 0&&(i+=` scale3d(${n},${n},1)`),i}function Lc(e,t,n,i){e.style.transform=dp(t,n,i)}const tEe="cubic-bezier(.4,0,.22,1)";function hD(e,t,n,i){e.style.transition=t?`${t} ${n}ms ${i||tEe}`:"none"}function D8(e,t,n){e.style.width=typeof t=="number"?`${t}px`:t,e.style.height=typeof n=="number"?`${n}px`:n}function nEe(e){hD(e)}function iEe(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 Br={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function sEe(e){return"button"in e&&e.button===1||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}function oEe(e,t,n=document){let i=[];if(e instanceof Element)i=[e];else if(e instanceof NodeList||Array.isArray(e))i=Array.from(e);else{const s=typeof e=="string"?e:t;s&&(i=Array.from(n.querySelectorAll(s)))}return i}function JS(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let pD=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{pD=!0}}))}catch{}class rEe{constructor(){this._pool=[]}add(t,n,i,s){this._toggleListener(t,n,i,s)}remove(t,n,i,s){this._toggleListener(t,n,i,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,n,i,s,o,r){if(!t)return;const l=o?"removeEventListener":"addEventListener";n.split(" ").forEach(u=>{if(u){r||(o?this._pool=this._pool.filter(d=>d.type!==u||d.listener!==i||d.target!==t):this._pool.push({target:t,type:u,listener:i,passive:s}));const c=pD?{passive:s||!1}:!1;t[l](u,i,c)}})}}function gD(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function s1(e,t,n,i,s){let o=0;if(t.paddingFn)o=t.paddingFn(n,i,s)[e];else if(t.padding)o=t.padding[e];else{const r="padding"+e[0].toUpperCase()+e.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function mD(e,t,n,i){return{x:t.x-s1("left",e,t,n,i)-s1("right",e,t,n,i),y:t.y-s1("top",e,t,n,i)-s1("bottom",e,t,n,i)}}class lEe{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,i=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,o=s1(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-i)/2)+o,this.max[t]=i>r?Math.round(r-i)+o:this.center[t],this.min[t]=i>r?o: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 Pp(n,this.max[t],this.min[t])}}const XS=4e3;class vD{constructor(t,n,i,s){this.pswp=s,this.options=t,this.itemData=n,this.index=i,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,i){const s={x:t,y:n};this.elementSize=s,this.panAreaSize=i;const o=i.x/s.x,r=i.y/s.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o: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",i=this.options[n];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>XS&&(t=XS/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}class aEe{constructor(t,n,i){this.data=t,this.index=n,this.pswp=i,this.isActive=n===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new vD(i.options,t,n,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:n}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=yr("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 lEe(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 i=Math.round(this.width*n)||this.pswp.viewportSize.x,s=Math.round(this.height*n)||this.pswp.viewportSize.y;!this.sizeChanged(i,s)&&!t||this.content.setDisplayedSize(i,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,i,s){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:n,transitionDuration:i}),o.animations.stopAllPan();const r=this.currZoomLevel;s||(t=Pp(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),fD(this.pan);const l=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:l,duration:i,easing:o.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,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];n||(n=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const o=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-n[t])*o+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),gs(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,n,i){i/=this.currentResolution||this.zoomLevels.initial,Lc(this.container,t,n,i)}calculateSize(){const{pswp:t}=this;gs(this.panAreaSize,mD(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 dp(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const uEe=.35,cEe=.6,eM=.4,tM=.5;function dEe(e,t){return e*t/(1-t)}class fEe{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&gs(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:n,dragAxis:i}=this.gestures,{currSlide:s}=this.pswp;if(i==="y"&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const o=s.pan.y+(t.y-n.y);if(!this.pswp.dispatch("verticalDrag",{panY:o}).defaultPrevented){this._setPanWithFriction("y",o,cEe);const r=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(r),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(fD(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:n,currSlide:i}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),n.isShifted()){const r=(n.x-n.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-tM&&r<0||t.x<.1&&r<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>tM&&r>0||t.x>-.1&&r>.5)&&(s=-1,t.x=Math.max(t.x,0)),n.moveIndexBy(s,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:n}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:s,bounds:o}=i,r=s[t],l=this.pswp.bgOpacity<1&&t==="y",u=r+dEe(n[t],.995);if(l){const g=this._getVerticalDragRatio(r),m=this._getVerticalDragRatio(u);if(g<0&&m<-eM||g>0&&m>eM){this.pswp.close();return}}const c=o.correctPan(t,u);if(r===c)return;const d=c===u?1:.82,f=this.pswp.bgOpacity,p=c-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:c,velocity:n[t],dampingRatio:d,onUpdate:g=>{if(l&&this.pswp.bgOpacity<1){const m=1-(c-g)/p;this.pswp.applyBgOpacity(Pp(f+(1-f)*m,0,1))}s[t]=Math.floor(g),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:n,dragAxis:i,prevP1:s,isMultitouch:o}=this.gestures,{currSlide:r,mainScroll:l}=this.pswp,a=n[t]-s[t],u=l.x+a;if(!a||!r)return!1;if(t==="x"&&!r.isPannable()&&!o)return l.moveTo(u,!0),!0;const{bounds:c}=r,d=r.pan[t]+a;if(this.pswp.options.allowPanToNext&&i==="x"&&t==="x"&&!o){const f=l.getCurrSlideX(),p=l.x-f,g=a>0,m=!g;if(d>c.min[t]&&g){if(c.min[t]<=this.startPan[t])return l.moveTo(u,!0),!0;this._setPanWithFriction(t,d)}else if(d<c.max[t]&&m){if(this.startPan[t]<=c.max[t])return l.moveTo(u,!0),!0;this._setPanWithFriction(t,d)}else if(p!==0){if(p>0)return l.moveTo(Math.max(u,f),!0),!0;if(p<0)return l.moveTo(Math.min(u,f),!0),!0}else this._setPanWithFriction(t,d)}else t==="y"?!l.isShifted()&&c.min.y!==c.max.y&&this._setPanWithFriction(t,d):this._setPanWithFriction(t,d);return!1}_getVerticalDragRatio(t){var n,i;return(t-((n=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&n!==void 0?n:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,n,i){const{currSlide:s}=this.pswp;if(!s)return;const{pan:o,bounds:r}=s;if(r.correctPan(t,n)!==n||i){const a=Math.round(n-o[t]);o[t]+=a*(i||uEe)}else o[t]=n}}const hEe=.05,pEe=.15;function nM(e,t,n){return e.x=(t.x+n.x)/2,e.y=(t.y+n.y)/2,e}class gEe{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,gs(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:n,p2:i,startP2:s,pswp:o}=this.gestures,{currSlide:r}=o;if(!r)return;const l=r.zoomLevels.min,a=r.zoomLevels.max;if(!r.isZoomable()||o.mainScroll.isShifted())return;nM(this._startZoomPoint,n,s),nM(this._zoomPoint,t,i);let u=1/$8(n,s)*$8(t,i)*this._startZoomLevel;if(u>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),u<l)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=r.zoomLevels.initial){const c=1-(l-u)/(l/1.2);o.dispatch("pinchClose",{bgOpacity:c}).defaultPrevented||o.applyBgOpacity(c)}else u=l-(l-u)*pEe;else u>a&&(u=a+(u-a)*hEe);r.pan.x=this._calculatePanForZoomLevel("x",u),r.pan.y=this._calculatePanForZoomLevel("y",u),r.setZoomLevel(u),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:n}=t;(!n||n.currZoomLevel<n.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,n){const i=n/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:n}=this.gestures,{currSlide:i}=n;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(t=!0);const s=i.currZoomLevel;let o,r=!0;s<i.zoomLevels.initial?o=i.zoomLevels.initial:s>i.zoomLevels.max?o=i.zoomLevels.max:(r=!1,o=s);const l=n.bgOpacity,a=n.bgOpacity<1,u=gs({x:0,y:0},i.pan);let c=gs({x:0,y:0},u);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,gs(this._startPan,u)),r&&(c={x:this._calculatePanForZoomLevel("x",o),y:this._calculatePanForZoomLevel("y",o)}),i.setZoomLevel(o),c={x:i.bounds.correctPan("x",c.x),y:i.bounds.correctPan("y",c.y)},i.setZoomLevel(s);const d=!N1(c,u);if(!d&&!r&&!a){i._setResolution(o),i.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&&(i.pan.x=u.x+(c.x-u.x)*f,i.pan.y=u.y+(c.y-u.y)*f),r){const p=s+(o-s)*f;i.setZoomLevel(p)}i.applyCurrentZoomPan()}a&&n.bgOpacity<1&&n.applyBgOpacity(Pp(l+(1-l)*f,0,1))},onComplete:()=>{i._setResolution(o),i.applyCurrentZoomPan()}})}}function iM(e){return!!e.target.closest(".pswp__container")}class mEe{constructor(t){this.gestures=t}click(t,n){const i=n.target.classList,s=i.contains("pswp__img"),o=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,n):o&&this._doClickOrTapAction("bgClick",t,n)}tap(t,n){iM(n)&&this._doClickOrTapAction("tap",t,n)}doubleTap(t,n){iM(n)&&this._doClickOrTapAction("doubleTap",t,n)}_doClickOrTapAction(t,n,i){var s;const{pswp:o}=this.gestures,{currSlide:r}=o,l=t+"Action",a=o.options[l];if(!o.dispatch(l,{point:n,originalEvent:i}).defaultPrevented){if(typeof a=="function"){a.call(o,n,i);return}switch(a){case"close":case"next":o[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):o.options.clickToCloseNonZoomable&&o.close();break;case"toggle-controls":(s=this.gestures.pswp.element)===null||s===void 0||s.classList.toggle("pswp--ui-visible");break}}}}const vEe=10,yEe=300,bEe=25;class kEe{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 fEe(this),this.zoomLevels=new gEe(this),this.tapHandler=new mEe(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,i,s){const{pswp:o}=this,{events:r}=o,l=s?t+s:"";r.add(o.scrollWrap,t+n,this.onPointerDown.bind(this)),r.add(window,t+"move",this.onPointerMove.bind(this)),r.add(window,t+i,this.onPointerUp.bind(this)),l&&r.add(o.scrollWrap,l,this.onPointerUp.bind(this))}onPointerDown(t){const n=t.type==="mousedown"||t.pointerType==="mouse";if(n&&t.button>0)return;const{pswp:i}=this;if(!i.opener.isOpen){t.preventDefault();return}i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(n&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,gs(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,gs(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?N1(this.p1,this.prevP1)||this.drag.change():(!N1(this.p1,this.prevP1)||!N1(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const n=Date.now(),i=n-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=n,gs(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 i=this.pswp.options.doubleTapAction?yEe:0;this._tapTimer?(this._clearTapTimer(),$8(this._lastStartP1,this.startP1)<bEe&&this.tapHandler.doubleTap(this.startP1,t)):(gs(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,n){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&n>5?i/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 i=t,s=this._ongoingPointers.findIndex(o=>o.id===i.pointerId);n==="up"&&s>-1?this._ongoingPointers.splice(s,1):n==="down"&&s===-1?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&gs(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&gs(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),n==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){gs(this.prevP1,this.p1),gs(this.prevP2,this.p2)}_updateStartPoints(){gs(this.startP1,this.p1),gs(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])>=vEe&&(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 AEe=.35;class CEe{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,i=Math.round(n.viewportSize.x+n.viewportSize.x*n.options.spacing),s=i!==this.slideWidth;s&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((o,r)=>{s&&Lc(o.el,(r+this._containerShiftIndex)*this.slideWidth),t&&o.slide&&o.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=yr("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,i){const{pswp:s}=this;let o=s.potentialIndex+t;const r=s.getNumItems();if(s.canLoop()){o=s.getLoopedIndex(o);const a=(t+r)%r;a<=r/2?t=a:t=a-r}else o<0?o=0:o>=r&&(o=r-1),t=o-s.potentialIndex;s.potentialIndex=o,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:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:u=>{this.moveTo(u)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let a=s.potentialIndex-s.currIndex;if(s.canLoop()){const u=(a+r)%r;u<=r/2?a=u:a=u-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,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,n.currIndex=n.potentialIndex;let s=Math.abs(i),o;s>=3&&(this._containerShiftIndex+=i+(i>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;r<s;r++)i>0?(o=this.itemHolders.shift(),o&&(this.itemHolders[2]=o,this._containerShiftIndex++,Lc(o.el,(this._containerShiftIndex+2)*this.slideWidth),n.setContent(o,n.currIndex-s+r+2))):(o=this.itemHolders.pop(),o&&(this.itemHolders.unshift(o),this._containerShiftIndex--,Lc(o.el,this._containerShiftIndex*this.slideWidth),n.setContent(o,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(i),n.currSlide&&n.currSlide.applyCurrentZoomPan(),n.dispatch("change")}moveTo(t,n){if(!this.pswp.canLoop()&&n){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const s=Math.round(t-this.x);(i<0&&s>0||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+s*AEe)}this.x=t,this.pswp.container&&Lc(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:n??!1})}}const wEe={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},mc=(e,t)=>t?e:wEe[e];class xEe{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||sEe(t))return;let i,s,o=!1;const r="key"in t;switch(r?t.key:t.keyCode){case mc("Escape",r):n.options.escKey&&(i="close");break;case mc("z",r):i="toggleZoom";break;case mc("ArrowLeft",r):s="x";break;case mc("ArrowUp",r):s="y";break;case mc("ArrowRight",r):s="x",o=!0;break;case mc("ArrowDown",r):o=!0,s="y";break;case mc("Tab",r):this._focusRoot();break}if(s){t.preventDefault();const{currSlide:l}=n;n.options.arrowKeys&&s==="x"&&n.getNumItems()>1?i=o?"next":"prev":l&&l.currZoomLevel>l.zoomLevels.fit&&(l.pan[s]+=o?-80:80,l.panTo(l.pan.x,l.pan.y))}i&&(t.preventDefault(),n[i]())}_onFocusIn(t){const{template:n}=this.pswp;n&&document!==t.target&&n!==t.target&&!n.contains(t.target)&&n.focus()}}const _Ee="cubic-bezier(.4,0,.22,1)";class SEe{constructor(t){var n;this.props=t;const{target:i,onComplete:s,transform:o,onFinish:r=()=>{},duration:l=333,easing:a=_Ee}=t;this.onFinish=r;const u=o?"transform":"opacity",c=(n=t[u])!==null&&n!==void 0?n:"";this._target=i,this._onComplete=s,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{hD(i,u,l,a),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},l+500),i.style[u]=c},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),nEe(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const MEe=12,IEe=.75;class EEe{constructor(t,n,i){this.velocity=t*1e3,this._dampingRatio=n||IEe,this._naturalFrequency=i||MEe,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,n){let i=0,s;n/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*n);if(this._dampingRatio===1)s=this.velocity+this._naturalFrequency*t,i=(t+s*n)*o,this.velocity=i*-this._naturalFrequency+s*o;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);i=o*(t*r+s*l),this.velocity=i*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*l+this._dampedFrequency*s*r)}return i}}class TEe{constructor(t){this.props=t,this._raf=0;const{start:n,end:i,velocity:s,onUpdate:o,onComplete:r,onFinish:l=()=>{},dampingRatio:a,naturalFrequency:u}=t;this.onFinish=l;const c=new EEe(s,a,u);let d=Date.now(),f=n-i;const p=()=>{this._raf&&(f=c.easeFrame(f,Date.now()-d),Math.abs(f)<1&&Math.abs(c.velocity)<50?(o(i),r&&r(),this.onFinish()):(d=Date.now(),o(f+i),this._raf=requestAnimationFrame(p)))};this._raf=requestAnimationFrame(p)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class LEe{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,n){const i=n?new TEe(t):new SEe(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}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 NEe{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:i,deltaY:s}=t;if(n&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(n.isZoomable()){let o=-s;t.deltaMode===1?o*=.05:o*=t.deltaMode?1:.002,o=2**o;const r=n.currZoomLevel*o;n.zoomTo(r,{x:t.clientX,y:t.clientY})}}else n.isPannable()&&(t.deltaMode===1&&(i*=18,s*=18),n.panTo(n.pan.x-i,n.pan.y-s))}}function FEe(e){if(typeof e=="string")return e;if(!e||!e.isCustomSVG)return"";const t=e;let n='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return n=n.split("%d").join(t.size||32),t.outlineID&&(n+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),n+=t.inner,n+="</svg>",n}class BEe{constructor(t,n){var i;const s=n.name||n.className;let o=n.html;if(t.options[s]===!1)return;typeof t.options[s+"SVG"]=="string"&&(o=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=yr(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 p=f||d;p&&a.setAttribute("aria-label",p)}a.innerHTML=FEe(o),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 u=n.appendTo||"bar";let c=t.element;u==="bar"?(t.topBar||(t.topBar=yr("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),c=t.topBar):(a.classList.add("pswp__hide-on-close"),u==="wrapper"&&(c=t.scrollWrap)),(i=c)===null||i===void 0||i.appendChild(t.applyFilters("uiElement",a,n))}}function yD(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.currIndex<t.getNumItems()-1):e.disabled=!(t.currIndex>0))})}const $Ee={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:yD},DEe={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(e,t)=>{yD(e,t,!0)}},REe={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},zEe={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},OEe={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(e,t)=>{let n,i=null;const s=(l,a)=>{e.classList.toggle("pswp__preloader--"+l,a)},o=l=>{n!==l&&(n=l,s("active",l))},r=()=>{var l;if(!((l=t.currSlide)!==null&&l!==void 0&&l.content.isLoading())){o(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var a;o(!!(!((a=t.currSlide)===null||a===void 0)&&a.content.isLoading())),i=null},t.options.preloaderDelay))};t.on("change",r),t.on("loadComplete",l=>{t.currSlide===l.slide&&r()}),t.ui&&(t.ui.updatePreloaderVisibility=r)}},PEe={name:"counter",order:5,onInit:(e,t)=>{t.on("change",()=>{e.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function sM(e,t){e.classList.toggle("pswp--zoomed-in",t)}class jEe{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=[REe,$Ee,DEe,zEe,OEe,PEe],t.dispatch("uiRegister"),this.uiElementsData.sort((n,i)=>(n.order||0)-(i.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 BEe(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:n,options:i}=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 o=n.zoomLevels.initial-n.zoomLevels.secondary;if(Math.abs(o)<.01||!n.isZoomable()){sM(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;sM(t,r<=s),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--click-to-zoom")}}function HEe(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function WEe(e,t,n){const i=e.getBoundingClientRect(),s=i.width/t,o=i.height/n,r=s>o?s:o,l=(i.width-t*r)/2,a=(i.height-n*r)/2,u={x:i.left+l,y:i.top+a,w:t*r};return u.innerRect={w:i.width,h:i.height,x:l,y:a},u}function qEe(e,t,n){const i=n.dispatch("thumbBounds",{index:e,itemData:t,instance:n});if(i.thumbBounds)return i.thumbBounds;const{element:s}=t;let o,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?o=WEe(r,t.width||t.w||0,t.height||t.h||0):o=HEe(r)),n.applyFilters("thumbBounds",o,t,e)}class UEe{constructor(t,n){this.type=t,this.defaultPrevented=!1,n&&Object.assign(this,n)}preventDefault(){this.defaultPrevented=!0}}class KEe{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,n,i=100){var s,o,r;this._filters[t]||(this._filters[t]=[]),(s=this._filters[t])===null||s===void 0||s.push({fn:n,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((l,a)=>l.priority-a.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,n,i)}removeFilter(t,n){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==n)),this.pswp&&this.pswp.removeFilter(t,n)}applyFilters(t,...n){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(s=>{n[0]=s.fn.apply(this,n)}),n[0]}on(t,n){var i,s;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(n),(s=this.pswp)===null||s===void 0||s.on(t,n)}off(t,n){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(s=>n!==s)),(i=this.pswp)===null||i===void 0||i.off(t,n)}dispatch(t,n){var i;if(this.pswp)return this.pswp.dispatch(t,n);const s=new UEe(t,n);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,s)}),s}}class VEe{constructor(t,n){if(this.element=yr("pswp__img pswp__img--placeholder",t?"img":"div",n),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,n){this.element&&(this.element.tagName==="IMG"?(D8(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=dp(0,0,t/250)):D8(this.element,t,n))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class ZEe{constructor(t,n,i){this.instance=n,this.data=t,this.index=i,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=Br.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 i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new VEe(i,this.slide.container)}this.element&&!n||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=yr("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=yr("pswp__content","div"),this.element.innerHTML=this.data.html||""),n&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var n,i;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=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=Br.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=Br.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===Br.LOADED||this.state===Br.ERROR)&&this.removePlaceholder())}onError(){this.state=Br.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===Br.LOADING,this)}isError(){return this.state===Br.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&&(D8(this.element,t,n),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=n,i?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!==Br.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 i=yr("pswp__error-msg","div");i.innerText=(t=(n=this.instance.options)===null||n===void 0?void 0:n.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=yr("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),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===Br.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||JS())?(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&&!JS()?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===Br.LOADED||this.state===Br.ERROR)&&this.removePlaceholder()))}}const GEe=5;function bD(e,t,n){const i=t.createContentFromData(e,n);let s;const{options:o}=t;if(o){s=new vD(o,e,-1);let r;t.pswp?r=t.pswp.viewportSize:r=gD(o,t);const l=mD(o,r,e,n);s.update(i.width,i.height,l)}return i.lazyLoad(),s&&i.setDisplayedSize(Math.ceil(i.width*s.initial),Math.ceil(i.height*s.initial)),i}function QEe(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return bD(n,t,e)}class YEe{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,GEe),this._cachedItems=[]}updateLazy(t){const{pswp:n}=this;if(n.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=n.options,s=t===void 0?!0:t>=0;let o;for(o=0;o<=i[1];o++)this.loadSlideByIndex(n.currIndex+(s?o:-o));for(o=1;o<=i[0];o++)this.loadSlideByIndex(n.currIndex+(s?-o:o))}loadSlideByIndex(t){const n=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(n);i||(i=QEe(n,this.pswp),i&&this.addToCache(i))}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(i=>!i.isAttached&&!i.hasSlide);n!==-1&&this._cachedItems.splice(n,1)[0].destroy()}}removeByIndex(t){const n=this._cachedItems.findIndex(i=>i.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 JEe extends KEe{getNumItems(){var t;let n=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?n=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(n=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:n});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,n){return new ZEe(t,this,n)}getItemData(t){var n;const i=(n=this.options)===null||n===void 0?void 0:n.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),s=i.items[t]);let o=s;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var n,i;return(n=this.options)!==null&&n!==void 0&&n.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?oEe(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const n={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){n.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(n.srcset=i.dataset.pswpSrcset),n.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,n.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,n.w=n.width,n.h=n.height,i.dataset.pswpType&&(n.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var s;n.msrc=o.currentSrc||o.src,n.alt=(s=o.getAttribute("alt"))!==null&&s!==void 0?s:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(n.thumbCropped=!0)}return this.applyFilters("domItemData",n,t,i)}lazyLoadData(t,n){return bD(t,this,n)}}const Bh=.003;class XEe{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:i}=t;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(i.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=i.showHideOpacity)!==null&&s!==void 0?s:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>Bh,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(Bh)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var o;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(o=this.pswp.currSlide)===null||o===void 0?void 0:o.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(Bh)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(Bh)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(Bh)))):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,i=!0;iEe(this._placeholder).finally(()=>{n=!0,i||t(!0)}),setTimeout(()=>{i=!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:i}=this._thumbBounds,{currSlide:s,viewportSize:o}=n;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const r=-o.x+(this._thumbBounds.x-i.x)+i.w,l=-o.y+(this._thumbBounds.y-i.y)+i.h,a=o.x-i.w,u=o.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",dp(r,l)),this._animateTo(this._cropContainer2,"transform",dp(a,u))):(Lc(this._cropContainer1,r,l),Lc(this._cropContainer2,a,u))}s&&(gs(s.pan,i||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,n,i){if(!this._duration){t.style[n]=i;return}const{animations:s}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};o[n]=i,s.startTransition(o)}}const eTe={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 tTe extends JEe{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 rEe,this.animations=new LEe,this.mainScroll=new CEe(this),this.gestures=new kEe(this),this.opener=new XEe(this),this.keyboard=new xEe(this),this.contentLoader=new YEe(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 NEe(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)),Pp(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 i;(i=n.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((n,i)=>{var s,o;let r=((s=(o=this.currSlide)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:0)-1+i;if(this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(n,t,!0),i===1)){var l;this.currSlide=n.slide,(l=n.slide)===null||l===void 0||l.setIsActive(!0)}}),this.dispatch("change")}setContent(t,n,i){if(this.canLoop()&&(n=this.getLoopedIndex(n)),t.slide){if(t.slide.index===n&&!i)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 aEe(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=gD(this.options,this);!t&&N1(n,this._prevViewportSize)||(gs(this._prevViewportSize,n),this.dispatch("beforeResize"),gs(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=yr("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=yr("pswp__bg","div",this.element),this.scrollWrap=yr("pswp__scroll-wrap","section",this.element),this.container=yr("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 jEe(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return qEe(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),{...eTe,...t}}}function nTe(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 iTe(e,t,n){if(n?.currentSrc&&n.naturalWidth>0)return{src:n.currentSrc,w:n.naturalWidth,h:n.naturalHeight,objectUrl:null};let i=t.url,s=null;if(t.fileId)try{const r=await e.getFileBlob(t.fileId);s=URL.createObjectURL(r),i=s}catch{}const o=await nTe(i);return o?{src:i,...o,objectUrl:s}:(s&&URL.revokeObjectURL(s),null)}function sTe(e){const t=(s,o)=>{const r=parseFloat(e(s));return Number.isFinite(r)&&r>0?r:o},n=t("--space-6",24),i=t("--space-8",32)+n;return{top:i,bottom:i,left:n,right:n}}function oTe(e){let t=!1,n=!1,i=null;return(async()=>{const s=await iTe(e.api,e.media,e.thumbImg);if(t){s?.objectUrl&&URL.revokeObjectURL(s.objectUrl);return}if(!s){e.onClose();return}const o=e.thumbImg?.currentSrc===s.src?e.thumbImg:null;i=new tTe({dataSource:[{src:s.src,w:s.w,h:s.h,thumbCropped:!0,...o?{msrc:o.currentSrc,element:o}:{}}],index:0,showHideAnimationType:o?"zoom":"fade",arrowPrev:!1,arrowNext:!1,counter:!1,close:!1,zoom:!1,wheelToZoom:!0,escKey:!0,trapFocus:!1,bgOpacity:1,padding:sTe(l=>getComputedStyle(document.documentElement).getPropertyValue(l))}),i.addFilter("thumbEl",l=>l?.isConnected?l:null);const r=e.media.path;i.on("uiRegister",()=>{const l=i?.ui;!l||!r||l.registerElement({name:"caption",className:"media-preview-caption",isButton:!1,appendTo:"root",onInit:a=>{a.textContent=r}})}),i.on("openingAnimationStart",()=>{Ao.value+=1,e.onOpen?.()}),i.on("destroy",()=>{n=!0,Ao.value=Math.max(0,Ao.value-1),s.objectUrl&&URL.revokeObjectURL(s.objectUrl),e.onClose()}),i.init()})(),()=>{t=!0,i&&!n&&i.close()}}function eo(e){this.content=e}eo.prototype={constructor:eo,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,s=i.find(e),o=i.content.slice();return s==-1?o.push(n||e,t):(o[s+1]=t,n&&(o[s]=n)),new eo(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new eo(n)},addToStart:function(e,t){return new eo([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new eo(n)},addBefore:function(e,t,n){var i=this.remove(t),s=i.content.slice(),o=i.find(e);return s.splice(o==-1?s.length:o,0,t,n),new eo(s)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=eo.from(e),e.size?new eo(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=eo.from(e),e.size?new eo(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=eo.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};eo.from=function(e){if(e instanceof eo)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new eo(t)};function kD(e,t,n){for(let i=0;;i++){if(i==e.childCount||i==t.childCount)return e.childCount==t.childCount?null:n;let s=e.child(i),o=t.child(i);if(s==o){n+=s.nodeSize;continue}if(!s.sameMarkup(o))return n;if(s.isText&&s.text!=o.text){let r=s.text,l=o.text,a=0;for(;r[a]==l[a];a++)n++;return a&&a<r.length&&a<l.length&&wD(r.charCodeAt(a-1))&&CD(r.charCodeAt(a))&&n--,n}if(s.content.size||o.content.size){let r=kD(s.content,o.content,n+1);if(r!=null)return r}n+=s.nodeSize}}function AD(e,t,n,i){for(let s=e.childCount,o=t.childCount;;){if(s==0||o==0)return s==o?null:{a:n,b:i};let r=e.child(--s),l=t.child(--o),a=r.nodeSize;if(r==l){n-=a,i-=a;continue}if(!r.sameMarkup(l))return{a:n,b:i};if(r.isText&&r.text!=l.text){let u=r.text,c=l.text,d=u.length,f=c.length;for(;d>0&&f>0&&u[d-1]==c[f-1];)d--,f--,n--,i--;return d&&f&&d<u.length&&wD(u.charCodeAt(d-1))&&CD(u.charCodeAt(d))&&(n++,i++),{a:n,b:i}}if(r.content.size||l.content.size){let u=AD(r.content,l.content,n-1,i-1);if(u)return u}n-=a,i-=a}}function CD(e){return e>=56320&&e<57344}function wD(e){return e>=55296&&e<56320}class ai{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let i=0;i<t.length;i++)this.size+=t[i].nodeSize}nodesBetween(t,n,i,s=0,o){for(let r=0,l=0;l<n;r++){let a=this.content[r],u=l+a.nodeSize;if(u>t&&i(a,s+l,o||null,r)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),i,s+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,i,s){let o="",r=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&i&&(r?r=!1:o+=i),o+=u},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,i=t.firstChild,s=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(i)&&(s[s.length-1]=n.withText(n.text+i.text),o=1);o<t.content.length;o++)s.push(t.content[o]);return new ai(s,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let i=[],s=0;if(n>t)for(let o=0,r=0;r<n;o++){let l=this.content[o],a=r+l.nodeSize;a>t&&((r<t||a>n)&&(l.isText?l=l.cut(Math.max(0,t-r),Math.min(l.text.length,n-r)):l=l.cut(Math.max(0,t-r-1),Math.min(l.content.size,n-r-1))),i.push(l),s+=l.nodeSize),r=a}return new ai(i,s)}cutByIndex(t,n){return t==n?ai.empty:t==0&&n==this.content.length?this:new ai(this.content.slice(t,n))}replaceChild(t,n){let i=this.content[t];if(i==n)return this;let s=this.content.slice(),o=this.size+n.nodeSize-i.nodeSize;return s[t]=n,new ai(s,o)}addToStart(t){return new ai([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ai(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,i=0;n<this.content.length;n++){let s=this.content[n];t(s,i,n),i+=s.nodeSize}}findDiffStart(t,n=0){return kD(this,t,n)}findDiffEnd(t,n=this.size,i=t.size){return AD(this,t,n,i)}findIndex(t){if(t==0)return gg(0,t);if(t==this.size)return gg(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let s=this.child(n),o=i+s.nodeSize;if(o>=t)return o==t?gg(n+1,o):gg(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return ai.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return ai.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ai.empty;let n,i=0;for(let s=0;s<t.length;s++){let o=t[s];i+=o.nodeSize,s&&o.isText&&t[s-1].sameMarkup(o)?(n||(n=t.slice(0,s)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new ai(n||t,i)}static from(t){if(!t)return ai.empty;if(t instanceof ai)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new ai([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ai.empty=new ai([],0);const b4={index:0,offset:0};function gg(e,t){return b4.index=e,b4.offset=t,b4}function x2(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!x2(e[i],t[i]))return!1}else{for(let i in e)if(!(i in t)||!x2(e[i],t[i]))return!1;for(let i in t)if(!(i in e))return!1}return!0}class Hs{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,i=!1;for(let s=0;s<t.length;s++){let o=t[s];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,s));else{if(o.type.excludes(this.type))return t;!i&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,s)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&x2(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=t.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=i.create(n.attrs);return i.checkAttrs(s.attrs),s}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].eq(n[i]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return Hs.none;if(t instanceof Hs)return[t];let n=t.slice();return n.sort((i,s)=>i.type.rank-s.type.rank),n}}Hs.none=[];class _2 extends Error{}class zl{constructor(t,n,i){this.content=t,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let i=_D(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return i&&new zl(i,this.openStart,this.openEnd)}removeBetween(t,n){return new zl(xD(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return zl.empty;let i=n.openStart||0,s=n.openEnd||0;if(typeof i!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new zl(ai.fromJSON(t,n.content),i,s)}static maxOpen(t,n=!0){let i=0,s=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)s++;return new zl(t,i,s)}}zl.empty=new zl(ai.empty,0,0);function xD(e,t,n){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i),{index:r,offset:l}=e.findIndex(n);if(s==t||o.isText){if(l!=n&&!e.child(r).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(i!=r)throw new RangeError("Removing non-flat range");return e.replaceChild(i,o.copy(xD(o.content,t-s-1,n-s-1)))}function _D(e,t,n,i,s,o){let{index:r,offset:l}=e.findIndex(t),a=e.maybeChild(r);if(l==t||a.isText)return o&&i<=0&&s<=0&&!o.canReplace(r,r,n)?null:e.cut(0,t).append(n).append(e.cut(t));let u=_D(a.content,t-l-1,n,r==0?i-1:0,r==e.childCount-1?s-1:0,a);return u&&e.replaceChild(r,a.copy(u))}function rTe(e,t,n){if(n.openStart>e.depth)throw new _2("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new _2("Inconsistent open depths");return SD(e,t,n,0)}function SD(e,t,n,i){let s=e.index(i),o=e.node(i);if(s==t.index(i)&&i<e.depth-n.openStart){let r=SD(e,t,n,i+1);return o.copy(o.content.replaceChild(s,r))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==i&&t.depth==i){let r=e.parent,l=r.content;return Hc(r,l.cut(0,e.parentOffset).append(n.content).append(l.cut(t.parentOffset)))}else{let{start:r,end:l}=lTe(n,e);return Hc(o,ID(e,r,l,t,i))}else return Hc(o,S2(e,t,i))}function MD(e,t){if(!t.type.compatibleContent(e.type))throw new _2("Cannot join "+t.type.name+" onto "+e.type.name)}function R8(e,t,n){let i=e.node(n);return MD(i,t.node(n)),i}function jc(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function F1(e,t,n,i){let s=(t||e).node(n),o=0,r=t?t.index(n):s.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(jc(e.nodeAfter,i),o++));for(let l=o;l<r;l++)jc(s.child(l),i);t&&t.depth==n&&t.textOffset&&jc(t.nodeBefore,i)}function Hc(e,t){if(!e.type.validContent(t))throw new _2("Invalid content for node "+e.type.name);return e.copy(t)}function ID(e,t,n,i,s){let o=e.depth>s&&R8(e,t,s+1),r=i.depth>s&&R8(n,i,s+1),l=[];return F1(null,e,s,l),o&&r&&t.index(s)==n.index(s)?(MD(o,r),jc(Hc(o,ID(e,t,n,i,s+1)),l)):(o&&jc(Hc(o,S2(e,t,s+1)),l),F1(t,n,s,l),r&&jc(Hc(r,S2(n,i,s+1)),l)),F1(i,null,s,l),new ai(l)}function S2(e,t,n){let i=[];if(F1(null,e,n,i),e.depth>n){let s=R8(e,t,n+1);jc(Hc(s,S2(e,t,n+1)),i)}return F1(t,null,n,i),new ai(i)}function lTe(e,t){let n=t.depth-e.openStart,s=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)s=t.node(o).copy(ai.from(s));return{start:s.resolveNoCache(e.openStart+n),end:s.resolveNoCache(s.content.size-e.openEnd-n)}}class fp{constructor(t,n,i){this.pos=t,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],s=t.child(n);return i?t.child(n).cut(i):s}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let i=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)s+=i.child(o).nodeSize;return s}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Hs.none;if(this.textOffset)return t.child(n).marks;let i=t.maybeChild(n-1),s=t.maybeChild(n);if(!i){let l=i;i=s,s=l}let o=i.marks;for(var r=0;r<o.length;r++)o[r].type.spec.inclusive===!1&&(!s||!o[r].isInSet(s.marks))&&(o=o[r--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,s=t.parent.maybeChild(t.index());for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);i>=0;i--)if(t.pos<=this.end(i)&&(!n||n(this.node(i))))return new cTe(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let i=[],s=0,o=n;for(let r=t;;){let{index:l,offset:a}=r.content.findIndex(o),u=o-a;if(i.push(r,l,s+a),!u||(r=r.child(l),r.isText))break;o=u-1,s+=a+1}return new fp(n,i,o)}static resolveCached(t,n){let i=oM.get(t);if(i)for(let o=0;o<i.elts.length;o++){let r=i.elts[o];if(r.pos==n)return r}else oM.set(t,i=new aTe);let s=i.elts[i.i]=fp.resolve(t,n);return i.i=(i.i+1)%uTe,s}}class aTe{constructor(){this.elts=[],this.i=0}}const uTe=12,oM=new WeakMap;class cTe{constructor(t,n,i){this.$from=t,this.$to=n,this.depth=i}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const dTe=Object.create(null);let wf=class z8{constructor(t,n,i,s=Hs.none){this.type=t,this.attrs=n,this.marks=s,this.content=i||ai.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,i,s=0){this.content.nodesBetween(t,n,i,s,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,i,s){return this.content.textBetween(t,n,i,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,i){return this.type==t&&x2(this.attrs,n||t.defaultAttrs||dTe)&&Hs.sameSet(this.marks,i||Hs.none)}copy(t=null){return t==this.content?this:new z8(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new z8(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,i=!1){if(t==n)return zl.empty;let s=this.resolve(t),o=this.resolve(n),r=i?0:s.sharedDepth(n),l=s.start(r),u=s.node(r).content.cut(s.pos-l,o.pos-l);return new zl(u,s.depth-r,o.depth-r)}replace(t,n,i){return rTe(this.resolve(t),this.resolve(n),i)}nodeAt(t){for(let n=this;;){let{index:i,offset:s}=n.content.findIndex(t);if(n=n.maybeChild(i),!n)return null;if(s==t||n.isText)return n;t-=s+1}}childAfter(t){let{index:n,offset:i}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(t);if(i<t)return{node:this.content.child(n),index:n,offset:i};let s=this.content.child(n-1);return{node:s,index:n-1,offset:i-s.nodeSize}}resolve(t){return fp.resolveCached(this,t)}resolveNoCache(t){return fp.resolve(this,t)}rangeHasMark(t,n,i){let s=!1;return n>t&&this.nodesBetween(t,n,o=>(i.isInSet(o.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),ED(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,i=ai.empty,s=0,o=i.childCount){let r=this.contentMatchAt(t).matchFragment(i,s,o),l=r&&r.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=s;a<o;a++)if(!this.type.allowsMarks(i.child(a).marks))return!1;return!0}canReplaceWith(t,n,i,s){if(s&&!this.type.allowsMarks(s))return!1;let o=this.contentMatchAt(t).matchType(i),r=o&&o.matchFragment(this.content,n);return r?r.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=Hs.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),t=i.addToSet(t)}if(!Hs.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,i)}let s=ai.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,s,i);return o.type.checkAttrs(o.attrs),o}};wf.prototype.text=void 0;class M2 extends wf{constructor(t,n,i,s){if(super(t,n,null,s),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ED(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new M2(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new M2(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function ED(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class td{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new fTe(t,n);if(i.next==null)return td.empty;let s=TD(i);i.next&&i.err("Unexpected trailing text");let o=bTe(yTe(s));return kTe(o,i),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,i=t.childCount){let s=this;for(let o=n;s&&o<i;o++)s=s.matchType(t.child(o).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let i=0;i<t.next.length;i++)if(this.next[n].type==t.next[i].type)return!0;return!1}fillBefore(t,n=!1,i=0){let s=[this];function o(r,l){let a=r.matchFragment(t,i);if(a&&(!n||a.validEnd))return ai.from(l.map(u=>u.createAndFill()));for(let u=0;u<r.next.length;u++){let{type:c,next:d}=r.next[u];if(!(c.isText||c.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=o(d,l.concat(c));if(f)return f}}return null}return o(this,[])}findWrapping(t){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==t)return this.wrapCache[i+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let s=i.shift(),o=s.match;if(o.matchType(t)){let r=[];for(let l=s;l.type;l=l.via)r.push(l.type);return r.reverse()}for(let r=0;r<o.next.length;r++){let{type:l,next:a}=o.next[r];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!s.type||a.validEnd)&&(i.push({match:l.contentMatch,type:l,via:s}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(i){t.push(i);for(let s=0;s<i.next.length;s++)t.indexOf(i.next[s].next)==-1&&n(i.next[s].next)}return n(this),t.map((i,s)=>{let o=s+(i.validEnd?"*":" ")+" ";for(let r=0;r<i.next.length;r++)o+=(r?", ":"")+i.next[r].type.name+"->"+t.indexOf(i.next[r].next);return o}).join(` +`)}}td.empty=new td(!0);class fTe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function TD(e){let t=[];do t.push(hTe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function hTe(e){let t=[];do t.push(pTe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function pTe(e){let t=vTe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=gTe(e,t);else break;return t}function rM(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function gTe(e,t){let n=rM(e),i=n;return e.eat(",")&&(e.next!="}"?i=rM(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:t}}function mTe(e,t){let n=e.nodeTypes,i=n[t];if(i)return[i];let s=[];for(let o in n){let r=n[o];r.isInGroup(t)&&s.push(r)}return s.length==0&&e.err("No node type or group '"+t+"' found"),s}function vTe(e){if(e.eat("(")){let t=TD(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=mTe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function yTe(e){let t=[[]];return s(o(e,0),n()),t;function n(){return t.push([])-1}function i(r,l,a){let u={term:a,to:l};return t[r].push(u),u}function s(r,l){r.forEach(a=>a.to=l)}function o(r,l){if(r.type=="choice")return r.exprs.reduce((a,u)=>a.concat(o(u,l)),[]);if(r.type=="seq")for(let a=0;;a++){let u=o(r.exprs[a],l);if(a==r.exprs.length-1)return u;s(u,l=n())}else if(r.type=="star"){let a=n();return i(l,a),s(o(r.expr,a),a),[i(a)]}else if(r.type=="plus"){let a=n();return s(o(r.expr,l),a),s(o(r.expr,a),a),[i(a)]}else{if(r.type=="opt")return[i(l)].concat(o(r.expr,l));if(r.type=="range"){let a=l;for(let u=0;u<r.min;u++){let c=n();s(o(r.expr,a),c),a=c}if(r.max==-1)s(o(r.expr,a),a);else for(let u=r.min;u<r.max;u++){let c=n();i(a,c),s(o(r.expr,a),c),a=c}return[i(a)]}else{if(r.type=="name")return[i(l,void 0,r.value)];throw new Error("Unknown expr type")}}}}function LD(e,t){return t-e}function lM(e,t){let n=[];return i(t),n.sort(LD);function i(s){let o=e[s];if(o.length==1&&!o[0].term)return i(o[0].to);n.push(s);for(let r=0;r<o.length;r++){let{term:l,to:a}=o[r];!l&&n.indexOf(a)==-1&&i(a)}}}function bTe(e){let t=Object.create(null);return n(lM(e,0));function n(i){let s=[];i.forEach(r=>{e[r].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c<s.length;c++)s[c][0]==l&&(u=s[c][1]);lM(e,a).forEach(c=>{u||s.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=t[i.join(",")]=new td(i.indexOf(e.length-1)>-1);for(let r=0;r<s.length;r++){let l=s[r][1].sort(LD);o.next.push({type:s[r][0],next:t[l.join(",")]||n(l)})}return o}}function kTe(e,t){for(let n=0,i=[e];n<i.length;n++){let s=i[n],o=!s.validEnd,r=[];for(let l=0;l<s.next.length;l++){let{type:a,next:u}=s.next[l];r.push(a.name),o&&!(a.isText||a.hasRequiredAttrs())&&(o=!1),i.indexOf(u)==-1&&i.push(u)}o&&t.err("Only non-generatable nodes ("+r.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ND(e){let t=Object.create(null);for(let n in e){let i=e[n];if(!i.hasDefault)return null;t[n]=i.default}return t}function FD(e,t){let n=Object.create(null);for(let i in e){let s=t&&t[i];if(s===void 0){let o=e[i];if(o.hasDefault)s=o.default;else throw new RangeError("No value supplied for attribute "+i)}n[i]=s}return n}function BD(e,t,n,i){for(let s in t)if(!(s in e))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${i}`);for(let s in e)e[s].validate&&e[s].validate(t[s])}function $D(e,t){let n=Object.create(null);if(t)for(let i in t)n[i]=new CTe(e,i,t[i]);return n}class I2{constructor(t,n,i){this.name=t,this.schema=n,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=$D(t,i.attrs),this.defaultAttrs=ND(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==td.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:FD(this.attrs,t)}create(t=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new wf(this,this.computeAttrs(t),ai.from(n),Hs.setFrom(i))}createChecked(t=null,n,i){return n=ai.from(n),this.checkContent(n),new wf(this,this.computeAttrs(t),n,Hs.setFrom(i))}createAndFill(t=null,n,i){if(t=this.computeAttrs(t),n=ai.from(n),n.size){let r=this.contentMatch.fillBefore(n);if(!r)return null;n=r.append(n)}let s=this.contentMatch.matchFragment(n),o=s&&s.fillBefore(ai.empty,!0);return o?new wf(this,t,n.append(o),Hs.setFrom(i)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let i=0;i<t.childCount;i++)if(!this.allowsMarks(t.child(i).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){BD(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let i=0;i<t.length;i++)this.allowsMarkType(t[i].type)?n&&n.push(t[i]):n||(n=t.slice(0,i));return n?n.length?n:Hs.none:t}static compile(t,n){let i=Object.create(null);t.forEach((o,r)=>i[o]=new I2(o,n,r));let s=n.spec.topNode||"doc";if(!i[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}}function ATe(e,t,n){let i=n.split("|");return s=>{let o=s===null?"null":typeof s;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${t} on type ${e}, got ${o}`)}}class CTe{constructor(t,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?ATe(t,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class bk{constructor(t,n,i,s){this.name=t,this.rank=n,this.schema=i,this.spec=s,this.attrs=$D(t,s.attrs),this.excluded=null;let o=ND(this.attrs);this.instance=o?new Hs(this,o):null}create(t=null){return!t&&this.instance?this.instance:new Hs(this,FD(this.attrs,t))}static compile(t,n){let i=Object.create(null),s=0;return t.forEach((o,r)=>i[o]=new bk(o,s++,n,r)),i}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){BD(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class wTe{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in t)n[s]=t[s];n.nodes=eo.from(t.nodes),n.marks=eo.from(t.marks||{}),this.nodes=I2.compile(this.spec.nodes,this),this.marks=bk.compile(this.spec.marks,this);let i=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let o=this.nodes[s],r=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=i[r]||(i[r]=td.parse(r,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?aM(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let s in this.marks){let o=this.marks[s],r=o.spec.excludes;o.excluded=r==null?[o]:r==""?[]:aM(this,r.split(" "))}this.nodeFromJSON=s=>wf.fromJSON(this,s),this.markFromJSON=s=>Hs.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,i,s){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof I2){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,i,s)}text(t,n){let i=this.nodes.text;return new M2(i,i.defaultAttrs,t,Hs.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function aM(e,t){let n=[];for(let i=0;i<t.length;i++){let s=t[i],o=e.marks[s],r=o;if(o)n.push(o);else for(let l in e.marks){let a=e.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&n.push(r=a)}if(!r)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return n}new wTe({nodes:{doc:{content:"block+"},paragraph:{group:"block",content:"inline*",toDOM:()=>["p",0],parseDOM:[{tag:"p"}]},text:{group:"inline"}}});const xTe=["aria-label"],_Te=["aria-label"],STe={class:"media-lightbox-card"},MTe={class:"media-lightbox-frame"},ITe={key:0,class:"media-lightbox-name"},ETe=["aria-label"],TTe='button:not([disabled]), video[controls], [tabindex]:not([tabindex="-1"])',LTe=tt({__name:"MediaLightbox",props:{media:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=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=Z(null),u=Z(null),c=Z(!1);let d=null,f=null;function p(g){if(g.key==="Escape"){g.preventDefault(),i("close");return}if(g.key!=="Tab"||!a.value)return;const m=a.value.querySelectorAll(TTe),y=m[0],w=m[m.length-1];!y||!w||(a.value.contains(document.activeElement)?g.shiftKey&&document.activeElement===y?(g.preventDefault(),w.focus()):!g.shiftKey&&document.activeElement===w&&(g.preventDefault(),y.focus()):(g.preventDefault(),(g.shiftKey?w:y).focus()))}return pn(()=>{if(o.value){f=oTe({api:Pt(),media:n.media,thumbImg:n.originImg??null,onOpen:()=>{c.value=!0},onClose:()=>i("close")});return}Ao.value+=1,d=document.activeElement instanceof HTMLElement?document.activeElement:null,window.addEventListener("keydown",p),u.value?.focus()}),Gn(()=>{if(f){f(),f=null;return}Ao.value=Math.max(0,Ao.value-1),window.removeEventListener("keydown",p),d?.focus()}),(g,m)=>(b(),fe(Wr,{to:"body"},[o.value?c.value?(b(),fe(h(gn),{key:1,text:h(s)("model.close")},{default:he(()=>[C("button",{type:"button",class:"media-lightbox-close","aria-label":h(s)("model.close"),onClick:m[2]||(m[2]=y=>i("close"))},[V(h(Ce),{name:"close",size:"sm"})],8,ETe)]),_:1},8,["text"])):ne("",!0):(b(),I("div",{key:0,ref_key:"overlayRef",ref:a,class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":l.value,onMousedown:m[1]||(m[1]=It(y=>i("close"),["self"]))},[V(h(gn),{text:h(s)("model.close")},{default:he(()=>[C("button",{ref_key:"closeRef",ref:u,type:"button",class:"media-lightbox-close","aria-label":h(s)("model.close"),onClick:m[0]||(m[0]=y=>i("close"))},[V(h(Ce),{name:"close",size:"sm"})],8,_Te)]),_:1},8,["text"]),C("div",STe,[C("div",MTe,[V(Op,{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?(b(),I("div",ITe,B(r.value),1)):ne("",!0)])],40,xTe))]))}}),kk=vt(LTe,[["__scopeId","data-v-6c0c564d"]]),NTe=["title","aria-label"],FTe={key:1,class:"media-thumb-media media-thumb-tile","aria-hidden":"true"},BTe={key:2,class:"media-thumb-badge","aria-hidden":"true"},$Te={key:3,class:"media-thumb-badge is-error","aria-hidden":"true"},DTe={key:4,class:"media-thumb-badge","aria-hidden":"true"},RTe=["aria-label"],zTe=tt({__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,i=t;function s(u){i("activate",u.currentTarget.querySelector("img"))}const{t:o}=Bt(),r=F(()=>n.name?n.name:n.kind==="video"?o("composer.attachmentVideo"):o("composer.attachmentImage")),l=F(()=>n.url?.startsWith("blob:")??!1),a=F(()=>!n.url||n.kind==="video"&&n.fileId!==void 0&&!l.value);return(u,c)=>(b(),I("span",{class:De(["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?(b(),I("span",FTe)):(b(),fe(Op,{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?(b(),I("span",BTe,[V(h(Bi),{size:"sm",label:h(o)("composer.uploading")},null,8,["label"])])):e.error?(b(),I("span",$Te,[V(h(Ce),{name:"info",size:"sm"})])):e.kind==="video"?(b(),I("span",DTe,[V(h(Ce),{name:"play",size:"sm"})])):ne("",!0)],8,NTe),e.removable?(b(),fe(h(gn),{key:0,text:e.removeLabel??h(o)("composer.remove")},{default:he(()=>[C("button",{type:"button",class:"media-thumb-rm","aria-label":e.removeLabel??h(o)("composer.remove"),onClick:c[0]||(c[0]=d=>i("remove"))},[V(h(Ce),{name:"close",size:"sm"})],8,RTe)]),_:1},8,["text"])):ne("",!0)],2))}}),DD=vt(zTe,[["__scopeId","data-v-a7ab7e98"]]),OTe=["title","data-kind"],PTe=["aria-label"],jTe={class:"att-tile"},HTe={class:"att-name"},WTe={key:1,class:"att-err"},qTe=["aria-label"],UTe=tt({__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,i=t,{t:s}=Bt(),o=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 c=o.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(c)?"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(c){return c<1024?`${c} B`:c<1024*1024?`${Math.round(c/1024)} KB`:`${(c/(1024*1024)).toFixed(1)} MB`}const u=F(()=>{const c=[l.value];return n.size!==void 0&&c.push(a(n.size)),c.join(" · ")});return(c,d)=>(b(),I("span",{class:De(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:u.value,"data-kind":e.kind},[C("button",{type:"button",class:"att-activate","aria-label":u.value,onClick:d[0]||(d[0]=f=>i("activate"))},[C("span",jTe,[e.kind==="image"&&e.url?(b(),fe(Op,{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"?(b(),fe(h(Ce),{key:1,name:"play",size:"sm"})):e.kind==="image"?(b(),fe(h(Ce),{key:2,name:"image",size:"sm"})):(b(),fe(h(Ce),{key:3,name:r.value,size:"sm"},null,8,["name"]))]),C("span",HTe,B(l.value),1),e.uploading?(b(),fe(h(Bi),{key:0,size:"sm",label:h(s)("composer.uploading")},null,8,["label"])):e.error?(b(),I("span",WTe,[V(h(Ce),{name:"info",size:"sm"})])):ne("",!0)],8,PTe),e.removable?(b(),fe(h(gn),{key:0,text:e.removeLabel??h(s)("composer.remove")},{default:he(()=>[C("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??h(s)("composer.remove"),onClick:d[1]||(d[1]=f=>i("remove"))},[V(h(Ce),{name:"close",size:"sm"})],8,qTe)]),_:1},8,["text"])):ne("",!0)],10,OTe))}}),RD=vt(UTe,[["__scopeId","data-v-f3a3043a"]]),KTe="/assets/kimi_avatar_default-srYjF2HV.riv",VTe={key:0,class:"mascot-fallback",viewBox:"5 0 240.776 240.776","aria-hidden":"true"},ZTe="light/dark",GTe="click_avator",QTe="hoverspace",YTe=tt({__name:"KimiMascot",setup(e){const t=Z(!1),n=Z(null),i=rv();let s=null,o=null,r=null;function l(){s!==null&&vC(s,ZTe,i.value?1:0)}pn(async()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches)try{const[{Rive:c,RuntimeLoader:d},f,p]=await Promise.all([ns(()=>import("./rive-CeXCFBdn.js").then(k=>k.r),__vite__mapDeps([10,3])),ns(()=>import("./rive-BxcgqsjB.js"),[]).then(k=>k.default),ns(()=>import("./rive_fallback-ByshBW-N.js"),[]).then(k=>k.default)]),g=n.value;if(!g)return;d.setWasmUrl(f),d.setWasmFallbackUrl(p);const m=new c({canvas:g,src:KTe,autoplay:!0,onLoad(){const k=m.stateMachineNames[0];k!==void 0&&m.play(k),requestAnimationFrame(()=>{n.value&&(l(),m.resizeDrawingSurfaceToCanvas(),r=vL(m,g),t.value=!0)})}});s=m;const y=Qe(i,l),w=()=>m.resizeDrawingSurfaceToCanvas();window.addEventListener("resize",w),o=()=>{r?.(),r=null,y(),window.removeEventListener("resize",w),m.cleanup(),s=null}}catch{}}),Gn(()=>{o?.(),o=null});function a(c){s!==null&&vC(s,QTe,c)}function u(){s!==null&&kte(s,GTe)}return(c,d)=>(b(),I("div",{class:"mascot-host",role:"img","aria-label":"Kimi mascot",onPointerenter:d[0]||(d[0]=f=>a(!0)),onPointerleave:d[1]||(d[1]=f=>a(!1)),onClick:u},[t.value?ne("",!0):(b(),I("svg",VTe,[...d[2]||(d[2]=[Lu('<defs data-v-27600ac7><radialGradient id="mascot-body-gradient" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(125.388 105.735) scale(121.866)" data-v-27600ac7><stop stop-color="#117DFB" data-v-27600ac7></stop><stop stop-color="#449BFF" offset="0.759254" data-v-27600ac7></stop><stop stop-color="#77B6FF" offset="1" data-v-27600ac7></stop></radialGradient></defs><g data-v-27600ac7><path d="M125.388 0C191.877 0 245.776 53.8995 245.776 120.388C245.776 186.877 191.877 240.776 125.388 240.776C58.8996 240.776 5 186.877 5 120.388C5 53.8995 58.8996 0 125.388 0Z" fill="#2389FF" data-v-27600ac7></path><path d="M125.388 0C191.877 0 245.776 53.8995 245.776 120.388C245.776 186.877 191.877 240.776 125.388 240.776C58.8996 240.776 5 186.877 5 120.388C5 53.8995 58.8996 0 125.388 0Z" fill="url(#mascot-body-gradient)" data-v-27600ac7></path></g><g transform="translate(-33.4 0)" data-v-27600ac7><g transform="rotate(7.8 127.94 83.94)" data-v-27600ac7><path d="M111.089 73.2179C109.935 64.8166 115.756 57.078 124.091 55.9333C132.426 54.7886 140.117 60.6713 141.271 69.0726L144.785 94.6564C145.939 103.058 140.118 110.796 131.783 111.941C123.449 113.086 115.757 107.203 114.603 98.8018L111.089 73.2179Z" fill="#FFFFFF" data-v-27600ac7></path></g><g transform="translate(0 8.5) rotate(7.8 189.67 75.44)" data-v-27600ac7><path d="M174.422 65.1492C173.326 57.1679 178.518 49.8626 186.019 48.8324C193.52 47.8021 200.489 53.4371 201.586 61.4184L204.924 85.723C206.02 93.7042 200.828 101.01 193.327 102.04C185.825 103.07 178.856 97.435 177.76 89.4538L174.422 65.1492Z" fill="#FFFFFF" data-v-27600ac7></path></g></g>',3)])])),C("canvas",{ref_key:"canvasRef",ref:n,class:De(["mascot-canvas",{ready:t.value}])},null,2)],32))}}),JTe=vt(YTe,[["__scopeId","data-v-27600ac7"]]),XTe={class:"working-indicator",role:"status"},eLe={class:"wi-mascot","aria-hidden":"true"},tLe={class:"wi-label"},nLe=tt({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(b(),I("div",XTe,[C("span",eLe,[V(JTe)]),C("span",tLe,B(e.label),1)]))}}),zD=vt(nLe,[["__scopeId","data-v-8abb44ef"]]),iLe={class:"chat"},sLe={key:0,class:"chat-loading"},oLe={class:"chat-loading-text"},rLe={key:1,class:"chat-empty"},lLe={key:1,class:"top-sentinel-text"},aLe={key:0,class:"u-turn"},uLe=["data-turn-id"],cLe={key:0,class:"u-media"},dLe={key:1,class:"u-atts"},fLe={key:2,class:"skill-act"},hLe={class:"skill-act-head"},pLe={key:3,class:"skill-act"},gLe={class:"skill-act-head"},mLe=["aria-expanded","onClick"],vLe={key:0,class:"u-meta"},yLe=["aria-label","onClick"],bLe={class:"u-edit-hint"},kLe=["aria-label","onClick"],ALe=["aria-label","onClick"],CLe=["data-turn-id"],wLe=["onClick"],xLe={class:"cd-view"},_Le={key:1,class:"cd-label"},SLe=["data-turn-id"],MLe={key:0,class:"goal-prov"},ILe={key:1,class:"msg"},ELe={key:3,class:"a-msg-ft"},TLe={key:0,class:"a-time"},LLe=["aria-label","onClick"],NLe={key:4,class:"compact-divider",role:"separator"},FLe={class:"cd-label",role:"status"},BLe={key:3,class:"turn-failed",role:"alert"},$Le={class:"tf-chip","aria-hidden":"true"},DLe={class:"tf-main"},RLe={class:"tf-title"},zLe=["title"],OLe=["title"],PLe={key:5,class:"sending-placeholder"},jLe={key:6,class:"q-stack"},HLe={class:"q-head"},WLe={class:"q-title"},qLe={class:"q-hint"},ULe=["onDragover","onDrop"],KLe={class:"u-bub q-bub"},VLe=["title","onDragstart"],ZLe=["title","onClick"],GLe={key:0,class:"u-text q-text"},QLe={key:1,class:"q-text q-text-placeholder"},YLe=["aria-expanded","onClick"],JLe={key:0,class:"q-imgs"},XLe={key:0,class:"q-file"},eNe={key:1,class:"q-tag q-tag-next"},tNe={key:2,class:"q-tag q-tag-idx"},nNe=["aria-label","onClick"],iNe={key:0,class:"open-unsupported",role:"status"},sNe=2500,oNe=10,rNe=tt({__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},turnFailed:{type:Boolean,default:!1},turnError:{default:null},turnRetry:{default:null}},emits:["openFile","openMedia","openTurnDiff","copyConversationCopied","openCompaction","openAgent","editMessage","armedUndo","loadOlderMessages","unqueue","editQueued","reorderQueue","resumeTurn"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),{confirm:s}=Hu();An(()=>{pe!==null&&(clearTimeout(pe),pe=null),q!==null&&(clearTimeout(q),q=null),z!==null&&(clearTimeout(z),z=null),ht!==null&&(clearTimeout(ht),ht=null)});const o=e,r=Z(null);let l=null;function a(){!r.value||typeof IntersectionObserver>"u"||(l?.disconnect(),l=new IntersectionObserver(He=>{He[0]?.isIntersecting&&o.hasMoreMessages&&!o.loadingMore&&!o.loadingMoreError&&!o.sessionLoading&&!o.isFollowing&&m("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),l.observe(r.value))}pn(a),An(()=>{l?.disconnect(),l=null}),Qe(()=>[o.hasMoreMessages,o.loadingMore,o.loadingMoreError],()=>{kt().then(a)});const u=F(()=>{if(!o.turnActive||o.turns.length===0)return null;const He=o.turns.at(-1);return He.role==="assistant"?He.id:null}),c=F(()=>{const He=new Map;for(const st of o.turns){if(st.role!=="assistant"||st.id===u.value)continue;const Ve=gke(st);Ve.length>0&&He.set(st.id,Ve)}return He}),d=F(()=>o.working),f=F(()=>{const He=o.turnRetry;if(He!=null)return i("conversation.workingRetry",{n:He.nextAttempt,max:He.maxAttempts});const st=o.turns.at(-1),Ve=st?.role==="assistant"&&(st.text.trim().length>0||(st.thinking?.trim().length??0)>0||(st.tools?.length??0)>0);return i(Ve?"conversation.working":"conversation.requesting")}),p=F(()=>o.turnError?.code==="loop.max_steps_exceeded"?i("conversation.turnFailedMaxSteps"):i("conversation.turnFailed")),g=F(()=>{const He=o.turnError;if(!He)return"";const st=[];return He.code!==void 0&&He.code.length>0&&st.push(He.code),He.statusCode!==void 0&&st.push(`HTTP ${He.statusCode}`),He.requestId!==void 0&&He.requestId.length>0&&st.push(He.requestId),st.join(" · ")}),m=n,y=He=>m("openFile",He),w=He=>m("openMedia",He),k=He=>m("openAgent",He),A=He=>m("openTurnDiff",He),v=Z(null),x=Z(null);function E(He){return(He.attachments?.length??0)>0}function S(He){m("editQueued",He)}function M(He,st){if(v.value=He,!st.dataTransfer)return;st.dataTransfer.effectAllowed="move",st.dataTransfer.setData("text/plain",String(He));const Ve=st.currentTarget?.closest(".q-turn");Ve&&st.dataTransfer.setDragImage(Ve,24,24)}function _(He,st){if(v.value===null)return;st.preventDefault(),st.dataTransfer&&(st.dataTransfer.dropEffect="move");const Ve=st.currentTarget.getBoundingClientRect(),Rt=st.clientY<Ve.top+Ve.height/2?"before":"after";x.value={index:He,position:Rt}}function N(He,st){st.preventDefault();const Ve=v.value,Rt=x.value?.position??"before";if(v.value=null,x.value=null,Ve===null)return;let Ct=Rt==="before"?He:He+1;Ve<Ct&&(Ct-=1),Ve!==Ct&&m("reorderQueue",{from:Ve,to:Ct})}function D(){v.value=null,x.value=null}const T=F(()=>{for(let He=o.turns.length-1;He>=0;He--){const st=o.turns[He];if(st.goalContinuation)return null;if(st.role==="user")return st.id}return null});function $(He){return!o.readOnly&&He.role==="user"&&He.id===T.value&&!o.working&&!He.skillActivation&&!He.pluginCommand}function P(He){const st=He.compaction,Ve=st?.trigger==="auto"?i("conversation.compactedAuto"):i("conversation.compactedPlain");return typeof st?.tokensBefore=="number"&&typeof st?.tokensAfter=="number"?Ve+i("conversation.compactedTokens",{before:Ia(st.tokensBefore),after:Ia(st.tokensAfter)}):Ve}const O=Z(null);function R(He){const st=He.createdAt===void 0?NaN:Date.parse(He.createdAt),Ve=He.endedAt??(Number.isFinite(st)&&He.durationMs!==void 0?new Date(st+He.durationMs).toISOString():He.createdAt);return Ve===void 0?"":oL(Ve,i("conversation.yesterday"))}const W=Z(null);let z=null;async function G(He){await s({title:i("conversation.undo"),message:i("conversation.undoConfirm"),variant:"primary"})&&K(He)}function K(He){W.value===null&&(W.value=He.id,m("editMessage",{text:He.text,attachments:He.attachments}),z=setTimeout(()=>{z=null,W.value=null},sNe))}Qe(()=>o.turns,He=>{W.value!==null&&(He.some(st=>st.id===W.value)||(W.value=null,z!==null&&(clearTimeout(z),z=null)))},{flush:"post"});const H=Z(!1);let q=null;function X(){if(o.turns.length===0)return;const He=[];for(const Ve of o.turns){if(Ve.role==="compaction"||Ve.role==="cron")continue;const Rt=Ve.role==="user"?"User":"Assistant",Ct=cke(Ve);Ct.trim()&&He.push(`**${Rt}** + +${Ct}`)}const st=He.join(` + +--- + +`);ro(st).then(Ve=>{Ve&&(H.value=!0,m("copyConversationCopied"),q!==null&&clearTimeout(q),q=setTimeout(()=>{q=null,H.value=!1},2e3))}).catch(()=>{})}function ee(He){const st=[];for(let Ve=He;Ve>=0;Ve--){const Rt=o.turns[Ve];if(!Rt||Rt.role!=="assistant")break;st.unshift(Rt)}return st}function ue(He){return ee(He).map(st=>uke(st)).filter(Boolean).join(` + +`)}function ie(){for(let He=o.turns.length-1;He>=0;He-=1)if(o.turns[He]?.role==="assistant")return ue(He);return""}function xe(){const He=ie();He.trim()&&ro(He).then(st=>{st&&(H.value=!0,m("copyConversationCopied"),q!==null&&clearTimeout(q),q=setTimeout(()=>{q=null,H.value=!1},2e3))}).catch(()=>{})}t({copyConversation:X,copyFinalSummary:xe});function ce(He){const st=o.turns[He];if(!st||st.role!=="assistant")return!1;const Ve=o.turns[He+1];return!Ve||Ve.role!=="assistant"}let pe=null;function Ne(He){const st=o.turns[He];if(!st)return;const Ve=ue(He);Ve.trim()&&ro(Ve).then(Rt=>{Rt&&(O.value=st.id,pe!==null&&clearTimeout(pe),pe=setTimeout(()=>{pe=null,O.value=null},1400))}).catch(()=>{})}function te(He){const st=He.text;st.trim()&&ro(st).then(Ve=>{Ve&&(O.value=He.id,pe!==null&&clearTimeout(pe),pe=setTimeout(()=>{pe=null,O.value=null},1400))}).catch(()=>{})}const ye=Ts(new Set),j=Ts(new Set),Y=new Map,ve=new WeakMap,re=an("pinScroll",()=>{}),se=new ResizeObserver(He=>{for(const st of He){const Ve=st.target,Rt=ve.get(Ve);Rt!==void 0&&U(Rt,Ve)}});An(()=>se.disconnect());function U(He,st){const Ve=parseFloat(getComputedStyle(st).lineHeight);if(!Number.isFinite(Ve)||Ve<=0)return;const Ct=(st.textContent??"").match(/\n+$/)?.[0].length??0;st.scrollHeight-Math.max(0,Ct-1)*Ve>Ve*oNe+1?ye.add(He):ye.delete(He)}function J(He,st){if(!(st instanceof HTMLElement)||Y.get(He)===st)return;const Ve=Y.get(He);Ve!==void 0&&se.unobserve(Ve),Y.set(He,st),ve.set(st,He),se.observe(st),U(He,st)}function de(He){return`queue:${He.id}`}Qe([()=>o.turns,()=>o.queued],()=>{const He=new Set(o.turns.map(st=>st.id));for(const st of o.queued)He.add(de(st));for(const[st,Ve]of Y)He.has(st)||(se.unobserve(Ve),Y.delete(st),ye.delete(st),j.delete(st))});function me(He){return He.skillActivation?He.skillActivation.args||null:He.pluginCommand?He.pluginCommand.args||null:He.text||null}function Ie(He){return He.skillActivation!==void 0||He.pluginCommand!==void 0}function je(He){return ye.has(He)&&!j.has(He)}function ke(He,st){const Ve=j.has(He);Ve&&st.currentTarget instanceof HTMLElement&&re(st.currentTarget),Ve?j.delete(He):j.add(He)}function Le(He){return He.kind==="image"||He.kind==="video"}function it(He){return(He.attachments??[]).filter(Le)}function Fe(He){return(He.attachments??[]).filter(st=>!Le(st))}function Re(He){return{kind:He.kind==="video"?"video":"image",url:He.url,path:He.name,fileId:He.fileId}}const Ke=Z(null);let ht=null;const ot=Z(null),gt=Z(null);function Tt(He,st){if(He.kind==="image"||He.kind==="video"){gt.value=st??null,ot.value=Re(He);return}He.fileId!==void 0&&dD(Pt(),He.fileId,He.name,He.mediaType).then(Ve=>{Ve==="unsupported"&&(Ke.value=He.name??He.fileId??"",ht!==null&&clearTimeout(ht),ht=setTimeout(()=>{ht=null,Ke.value=null},2400))})}function yn(He,st){return He.id!==u.value||st.kind==="thinking"&&st.durationMs!==void 0?!1:st.sourceIndex===ba(He).length-1}function Gt(He,st){if(He.id!==u.value)return!1;const Ve=st.items.at(-1);return Ve?.kind==="thinking"&&Ve.durationMs!==void 0?!1:Ve!==void 0&&Ve.sourceIndex===ba(He).length-1}const Kt={folded:[],visible:[]};function mn(He){return He.role!=="assistant"?Kt:f$(He)}function _n(He){if(He.id!==u.value)return null;const st=ba(He),Ve=st.at(-1);if(Ve?.kind==="thinking"&&Ve.durationMs!==void 0)return null;if(Ve?.kind==="tool"&&Ve.tool.status==="running"){const Rt=Ve.tool.id;if(o.approvals?.some(Ct=>Ct.toolCallId===Rt)||o.questions?.some(Ct=>Ct.toolCallId===Rt))return null}return st.length-1}return(He,st)=>(b(),I(Be,null,[C("div",iLe,[e.sessionLoading?(b(),I("div",sLe,[V(h(Bi),{size:"sm"}),C("span",oLe,B(h(i)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(b(),I("div",rLe)):ne("",!0),e.hasMoreMessages||e.loadingMore?(b(),I("div",{key:2,ref_key:"topSentinelRef",ref:r,class:De(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(b(),I("span",lLe,[V(h(Bi),{size:"sm"}),Ue(" "+B(h(i)("conversation.loadingOlder")),1)])):(b(),I("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:st[0]||(st[0]=Ve=>m("loadOlderMessages"))},B(h(i)("conversation.loadOlder")),1))],2)):ne("",!0),(b(!0),I(Be,null,yt(e.turns,(Ve,Rt)=>(b(),I(Be,{key:Ve.id},[Ve.role==="user"?(b(),I("div",aLe,[C("div",{class:De(["u-bub turn-anchor",{undoing:W.value===Ve.id}]),"data-turn-id":Ve.id},[it(Ve).length>0?(b(),I("div",cLe,[(b(!0),I(Be,null,yt(it(Ve),(Ct,Fn)=>(b(),fe(DD,{key:Fn,kind:Ct.kind,name:Ct.name,url:Ct.url,"file-id":Ct.fileId,onActivate:Tn=>Tt(Ct,Tn)},null,8,["kind","name","url","file-id","onActivate"]))),128))])):ne("",!0),Fe(Ve).length>0?(b(),I("div",dLe,[(b(!0),I(Be,null,yt(Fe(Ve),(Ct,Fn)=>(b(),fe(RD,{key:Fn,kind:Ct.kind,name:Ct.name,url:Ct.url,"file-id":Ct.fileId,"media-type":Ct.mediaType,size:Ct.size,onActivate:Tn=>Tt(Ct)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):ne("",!0),Ve.skillActivation?(b(),I("div",fLe,[C("div",hLe,[st[3]||(st[3]=C("span",{class:"skill-act-arrow"},"▶",-1)),C("span",null,B(h(i)("conversation.activatedSkill",{name:Ve.skillActivation.name})),1)])])):Ve.pluginCommand?(b(),I("div",pLe,[C("div",gLe,[st[4]||(st[4]=C("span",{class:"skill-act-arrow"},"▶",-1)),C("span",null,"/"+B(Ve.pluginCommand.pluginId)+":"+B(Ve.pluginCommand.commandName),1)])])):ne("",!0),me(Ve)!==null?(b(),I("div",{key:4,class:De(["u-text-wrap",{"is-clamped":je(Ve.id),"u-text-wrap-args":Ie(Ve)}])},[C("div",{class:De(Ie(Ve)?"skill-act-args":"u-text"),ref_for:!0,ref:Ct=>J(Ve.id,Ct)},B(me(Ve)),3),ye.has(Ve.id)?(b(),I("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!je(Ve.id),onClick:Ct=>ke(Ve.id,Ct)},[C("span",null,B(je(Ve.id)?h(i)("conversation.userMessage.expand"):h(i)("conversation.userMessage.collapse")),1),V(h(Ce),{class:"u-text-toggle-car",name:"chevron-down",size:"sm","aria-hidden":"true"})],8,mLe)):ne("",!0)],2)):ne("",!0)],10,uLe),Ve.createdAt||$(Ve)||!e.readOnly&&e.undoHintTurnId===Ve.id?(b(),I("div",vLe,[$(Ve)||!e.readOnly&&e.undoHintTurnId===Ve.id?(b(),I("div",{key:0,class:De(["u-edit-wrap",{undoing:W.value===Ve.id}])},[e.undoHintTurnId===Ve.id?(b(),fe(h(gn),{key:0,text:h(i)("conversation.undoTooltip")},{default:he(()=>[C("button",{type:"button",class:"u-edit u-edit-armed","aria-label":h(i)("conversation.undoTooltip"),onClick:Ct=>m("armedUndo",Ve.id)},[V(h(Ce),{name:"undo",size:"sm"}),C("span",bLe,[Ue(B(h(i)("conversation.escUndoHintPre")),1),V(h(Aa),{keys:["Esc"]}),Ue(B(h(i)("conversation.escUndoHintPost")),1)])],8,yLe)]),_:2},1032,["text"])):(b(),fe(h(gn),{key:1,text:h(i)("conversation.undoTooltip")},{default:he(()=>[C("button",{type:"button",class:"u-edit","aria-label":h(i)("conversation.undoTooltip"),onClick:Ct=>G(Ve)},[V(h(Ce),{name:"undo",size:"sm"})],8,kLe)]),_:2},1032,["text"]))],2)):ne("",!0),V(h(gn),{text:h(i)("filePreview.copy")},{default:he(()=>[Ve.text.trim().length>0?(b(),I("button",{key:0,type:"button",class:"u-copy","aria-label":h(i)("filePreview.copy"),onClick:It(Ct=>te(Ve),["stop"])},[O.value!==Ve.id?(b(),fe(h(Ce),{key:0,name:"copy",size:"sm"})):(b(),fe(h(Ce),{key:1,name:"check",size:"sm"}))],8,ALe)):ne("",!0)]),_:2},1032,["text"]),Ve.createdAt?(b(),fe(w2,{key:1,time:Ve.createdAt},null,8,["time"])):ne("",!0)])):ne("",!0)])):Ve.role==="compaction"?(b(),I("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":Ve.id,role:"separator"},[st[5]||(st[5]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1)),Ve.text?(b(),I("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:Ct=>m("openCompaction",{turnId:Ve.id})},[C("span",null,B(P(Ve)),1),C("span",xLe,B(h(i)("conversation.viewSummary")),1)],8,wLe)):(b(),I("span",_Le,B(P(Ve)),1)),st[6]||(st[6]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,CLe)):Ve.role==="cron"?(b(),fe(KIe,{key:2,text:Ve.text,cron:Ve.cron,"turn-id":Ve.id,"created-at":Ve.createdAt},null,8,["text","cron","turn-id","created-at"])):(b(),I("div",{key:3,class:"a-msg turn-anchor","data-turn-id":Ve.id},[Ve.goalContinuation?(b(),I("div",MLe,[V(h(Ce),{name:"target",size:"sm","aria-hidden":"true"}),C("span",null,B(h(i)("conversation.goal.continuation")),1)])):ne("",!0),mn(Ve).folded.length>0?(b(),fe(yIe,{key:1,items:mn(Ve).folded,mobile:"","streaming-tail-index":_n(Ve),live:Ve.id===u.value,parked:Ve.id===u.value&&_n(Ve)===null,"seed-ms":h(lke)(h(ba)(Ve)),"created-ms":h(FS)(Ve.createdAt),"ended-ms":h(FS)(Ve.endedAt),"duration-ms":Ve.durationMs,onOpenMedia:w,onOpenFile:y,onOpenAgent:k},null,8,["items","streaming-tail-index","live","parked","seed-ms","created-ms","ended-ms","duration-ms"])):ne("",!0),(b(!0),I(Be,null,yt(mn(Ve).visible,(Ct,Fn)=>(b(),I(Be,{key:h(p$)(Ct,Fn)},[Ct.kind==="thinking"?(b(),fe(vk,{key:0,text:Ct.thinking,mobile:"",streaming:yn(Ve,Ct),"started-at":Ct.startedAt,"duration-ms":Ct.durationMs},null,8,["text","streaming","started-at","duration-ms"])):Ct.kind==="text"&&Ct.text?(b(),I("div",ILe,[V(h(Kl),{text:Ct.text,streaming:yn(Ve,Ct),"open-file":y},null,8,["text","streaming"])])):Ct.kind==="activity-run"?(b(),fe(uD,{key:2,items:Ct.items,mobile:"",streaming:Gt(Ve,Ct),onOpenMedia:w,onOpenFile:y,onOpenAgent:k},null,8,["items","streaming"])):Ct.kind==="tool"?(b(),fe(mk,{key:3,tool:Ct.tool,mobile:"",onOpenMedia:w,onOpenFile:y,onOpenAgent:k},null,8,["tool"])):Ct.kind==="notification"?(b(),fe(cD,{key:4,items:Ct.items},null,8,["items"])):ne("",!0)],64))),128)),c.value.get(Ve.id)?(b(),fe(FIe,{key:2,changes:c.value.get(Ve.id),cwd:o.cwd,interactive:e.turnFilesInteractive,onOpenDiff:A,onOpenFile:y},null,8,["changes","cwd","interactive"])):ne("",!0),Ve.id!==u.value&&ce(Rt)&&(ue(Rt).trim().length>0||R(Ve))?(b(),I("div",ELe,[R(Ve)?(b(),I("span",TLe,B(R(Ve)),1)):ne("",!0),V(h(gn),{text:h(i)("filePreview.copy")},{default:he(()=>[ue(Rt).trim().length>0?(b(),I("button",{key:0,class:"a-cpbtn","aria-label":h(i)("filePreview.copy"),onClick:Ct=>Ne(Rt)},[O.value!==Ve.id?(b(),fe(h(Ce),{key:0,name:"copy",size:"sm"})):(b(),fe(h(Ce),{key:1,name:"check",size:"sm"}))],8,LLe)):ne("",!0)]),_:2},1032,["text"])])):ne("",!0)],8,SLe)),Ve.role==="assistant"&&Ve.id===e.interruptedTurnId?(b(),I("div",NLe,[st[7]||(st[7]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1)),C("span",FLe,B(h(i)("conversation.turnInterrupted")),1),st[8]||(st[8]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1))])):ne("",!0)],64))),128)),e.turnFailed?(b(),I("div",BLe,[C("span",$Le,[V(h(Ce),{name:"alert-triangle",size:"sm"})]),C("div",DLe,[C("span",RLe,B(p.value),1),e.turnError?.message?(b(),I("span",{key:0,class:"tf-sub",title:e.turnError.message},B(e.turnError.message),9,zLe)):ne("",!0),g.value?(b(),I("span",{key:1,class:"tf-meta",title:g.value},B(g.value),9,OLe)):ne("",!0)]),e.readOnly?ne("",!0):(b(),fe(h(jt),{key:0,variant:"secondary",size:"sm",onClick:st[1]||(st[1]=Ve=>m("resumeTurn"))},{default:he(()=>[Ue(B(h(i)("conversation.turnFailedResume")),1)]),_:1}))])):ne("",!0),e.compaction?(b(),fe(zIe,{key:4,label:h(i)("conversation.compacting")},null,8,["label"])):ne("",!0),d.value?(b(),I("div",PLe,[V(zD,{label:f.value},null,8,["label"])])):ne("",!0),e.queued.length>0?(b(),I("div",jLe,[C("div",HLe,[C("span",WLe,[V(h(Ce),{name:"mail",size:"sm"}),Ue(" "+B(h(i)("composer.queueLabel"))+" · ",1),C("b",null,B(e.queued.length),1)]),C("span",qLe,B(h(i)("composer.queueAutoDrain")),1)]),(b(!0),I(Be,null,yt(e.queued,(Ve,Rt)=>(b(),I("div",{key:Ve.id,class:De(["u-turn q-turn",{"q-dragging":v.value===Rt,"drop-before":x.value?.index===Rt&&x.value.position==="before","drop-after":x.value?.index===Rt&&x.value.position==="after"}]),onDragover:Ct=>_(Rt,Ct),onDrop:Ct=>N(Rt,Ct)},[C("div",KLe,[C("span",{class:"q-grip",title:h(i)("composer.queueDragTitle"),draggable:"true",onDragstart:Ct=>M(Rt,Ct),onDragend:D},[V(h(Ce),{name:"grip",size:"sm"})],40,VLe),C("div",{class:De(["q-clamp u-text-wrap",{"is-clamped":je(de(Ve))}])},[C("button",{type:"button",class:"q-body",title:h(i)("composer.editQueued"),ref_for:!0,ref:Ct=>J(de(Ve),Ct),onClick:Ct=>S(Rt)},[Ve.text?(b(),I("span",GLe,B(Ve.text),1)):(b(),I("span",QLe,[V(h(Ce),{name:"file",size:"sm"}),Ue(" "+B(h(i)("composer.queuedAttachments",{n:Ve.attachments?.length??0})),1)]))],8,ZLe),ye.has(de(Ve))?(b(),I("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!je(de(Ve)),onClick:Ct=>ke(de(Ve),Ct)},[C("span",null,B(je(de(Ve))?h(i)("conversation.userMessage.expand"):h(i)("conversation.userMessage.collapse")),1),V(h(Ce),{class:"u-text-toggle-car",name:"chevron-down",size:"sm","aria-hidden":"true"})],8,YLe)):ne("",!0)],2),E(Ve)?(b(),I("div",JLe,[(b(!0),I(Be,null,yt(Ve.attachments,(Ct,Fn)=>(b(),I(Be,{key:Fn},[Ct.kind==="file"?(b(),I("span",XLe,[V(h(Ce),{name:"file",size:"sm"}),Ue(" "+B(Ct.name??Ct.fileId),1)])):(b(),fe(Op,{key:1,url:Ct.url,kind:Ct.kind,"file-id":Ct.fileId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id"]))],64))),128))])):ne("",!0),Rt===0?(b(),I("span",eNe,B(h(i)("composer.queueNext")),1)):(b(),I("span",tNe,"#"+B(Rt+1),1)),V(h(gn),{text:h(i)("composer.remove")},{default:he(()=>[C("button",{type:"button",class:"q-rm","aria-label":h(i)("composer.remove"),onClick:It(Ct=>m("unqueue",Rt),["stop"])},[V(h(Ce),{name:"close",size:"sm"})],8,nNe)]),_:2},1032,["text"])])],42,ULe))),128))])):ne("",!0)]),Ke.value!==null?(b(),I("div",iNe,B(h(i)("composer.attachmentOpenUnsupported",{name:Ke.value})),1)):ne("",!0),ot.value?(b(),fe(kk,{key:1,media:ot.value,"origin-img":gt.value,onClose:st[2]||(st[2]=Ve=>{ot.value=null,gt.value=null})},null,8,["media","origin-img"])):ne("",!0)],64))}}),Ak=vt(rNe,[["__scopeId","data-v-2304fd80"]]),lNe={class:"ch-id"},aNe=["title"],uNe={key:1,class:"ch-ws"},cNe={key:2,class:"ch-sep"},dNe=["onKeydown"],fNe={class:"ch-ses"},hNe={key:0,class:"ch-pill ch-sync-pill"},pNe={key:0,class:"ch-ahead"},gNe={key:1,class:"ch-behind"},mNe={key:1,class:"ch-pill ch-diff-pill"},vNe={key:0,class:"ch-add"},yNe={key:1,class:"ch-del"},bNe=tt({__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}=Bt(),i=e,s=t,o=F(()=>i.ahead??0),r=F(()=>i.behind??0),l=F(()=>i.gitDiffStats?.totalAdditions??0),a=F(()=>i.gitDiffStats?.totalDeletions??0),u=F(()=>l.value>0||a.value>0),c={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function d(ee){return ee.trim().toLowerCase().replaceAll("_","-")}function f(ee){const ue=d(ee);return c[ue]?`pr-${ue}`:"pr-unknown"}function p(ee){return n(c[d(ee)]??"header.prStatusUnknown")}const g=Z(!1),m=Z(null),y=Z(null),w=Z({});function k(ee){const ue=ee.target;y.value?.el?.contains(ue)||m.value?.el?.contains(ue)||x()}function A(){x()}async function v(ee){if(ee.stopPropagation(),g.value){x();return}g.value=!0,document.addEventListener("mousedown",k),window.addEventListener("resize",A),await kt();const ue=m.value?.el,ie=y.value?.el;if(!ue||!ie)return;const xe=ue.getBoundingClientRect(),ce=4,pe=8,Ne=ie.offsetWidth,te=ie.offsetHeight;let ye=xe.bottom+ce,j=!1;ye+te>window.innerHeight-pe&&(ye=Math.max(pe,xe.top-te-ce),j=!0);let Y=xe.left,ve=!1;Y+Ne>window.innerWidth-pe&&(Y=Math.max(pe,xe.right-Ne),ve=!0),w.value={top:`${Math.round(ye)}px`,left:`${Math.round(Y)}px`,transformOrigin:`${j?"bottom":"top"} ${ve?"right":"left"}`,"--menu-pop-shift":j?"2px":"-2px"}}function x(){g.value=!1,document.removeEventListener("mousedown",k),window.removeEventListener("resize",A)}An(()=>{document.removeEventListener("mousedown",k),window.removeEventListener("resize",A)});function E(){s("copyAll"),x()}function S(){s("copyFinalSummary"),x()}const M=Z(!1);function _(){i.sessionId&&ro(i.sessionId).then(ee=>{ee&&(M.value=!0,setTimeout(()=>{M.value=!1},1200))})}const N=Z(!1),D=Z(""),T=Z(null),{handleCompositionStart:$,handleCompositionEnd:P,isComposingKeyEvent:O}=Kr();async function R(){if(x(),!!i.sessionId){N.value=!0,D.value=i.sessionTitle??"",await kt();try{T.value?.focus(),T.value?.select()}catch{}}}function W(){const ee=D.value.trim();ee&&i.sessionId&&ee!==(i.sessionTitle??"").trim()&&s("renameSession",i.sessionId,ee),N.value=!1}function z(ee){O(ee)||W()}function G(){N.value=!1}function K(){i.sessionId&&(x(),s("forkSession",i.sessionId))}function H(){i.sessionId&&(x(),s("exportSession",i.sessionId))}function q(){i.sessionId&&(x(),s("archiveSession",i.sessionId))}const X=!1;return(ee,ue)=>(b(),I("header",{class:De(["chat-header",{"macos-desktop":h(Dc)}])},[C("div",lNe,[h(X)?(b(),I("span",{key:0,class:"ch-dev",title:h(n)("header.devBadge")},"DEV",8,aNe)):ne("",!0),e.workspaceName?(b(),I("span",uNe,B(e.workspaceName),1)):ne("",!0),e.workspaceName&&e.sessionTitle?(b(),I("span",cNe,"/")):ne("",!0),N.value?Bn((b(),I("input",{key:3,ref_key:"renameInputRef",ref:T,"onUpdate:modelValue":ue[0]||(ue[0]=ie=>D.value=ie),class:"ch-rename",type:"text",onKeydown:[qr(It(z,["stop"]),["enter"]),qr(It(G,["stop"]),["esc"])],onCompositionstart:ue[1]||(ue[1]=(...ie)=>h($)&&h($)(...ie)),onCompositionend:ue[2]||(ue[2]=(...ie)=>h(P)&&h(P)(...ie)),onBlur:W,onClick:ue[3]||(ue[3]=It(()=>{},["stop"]))},null,40,dNe)),[[_o,D.value]]):e.sessionTitle?(b(),fe(h(gn),{key:4,text:e.sessionTitle},{default:he(()=>[C("span",fNe,B(e.sessionTitle),1)]),_:1},8,["text"])):ne("",!0)]),V(h(rn),{ref_key:"kebabRef",ref:m,class:De(["ch-act-more",{open:g.value}]),label:h(n)("header.options"),tooltip:h(n)("header.options"),"aria-expanded":g.value,"aria-haspopup":"menu",onClick:ue[4]||(ue[4]=It(ie=>v(ie),["stop"]))},{default:he(()=>[V(h(Ce),{name:"dots-horizontal",size:"sm"})]),_:1},8,["class","label","tooltip","aria-expanded"]),V(ys,{name:"menu-pop"},{default:he(()=>[g.value?(b(),fe(h(cl),{key:0,ref_key:"menuRef",ref:y,class:"ch-menu",style:Vt(w.value),onClick:ue[5]||(ue[5]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{onClick:E},{default:he(()=>[V(h(Ce),{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),Ue(" "+B(e.copied?h(n)("header.copied"):h(n)("header.copyAll")),1)]),_:1}),V(h(bn),{onClick:S},{default:he(()=>[V(h(Ce),{name:"file-text",size:"sm"}),Ue(" "+B(h(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(b(),I(Be,{key:0},[V(h(bn),{separator:""}),V(h(bn),{onClick:_},{default:he(()=>[V(h(Ce),{name:M.value?"check":"copy",size:"sm"},null,8,["name"]),Ue(" "+B(M.value?h(n)("header.copied"):h(n)("header.copySessionId")),1)]),_:1}),V(h(bn),{onClick:R},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),Ue(" "+B(h(n)("header.renameSession")),1)]),_:1}),V(h(bn),{onClick:K},{default:he(()=>[V(h(Ce),{name:"git-fork",size:"sm"}),Ue(" "+B(h(n)("header.forkSession")),1)]),_:1}),V(h(bn),{onClick:H},{default:he(()=>[V(h(Ce),{name:"download",size:"sm"}),Ue(" "+B(h(n)("header.exportSession")),1)]),_:1}),V(h(bn),{onClick:q},{default:he(()=>[V(h(Ce),{name:"archive",size:"sm"}),Ue(" "+B(h(n)("header.archiveSession")),1)]),_:1})],64)):ne("",!0)]),_:1},8,["style"])):ne("",!0)]),_:1}),ue[8]||(ue[8]=C("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(b(),I("button",{key:0,type:"button",class:"ch-git",onClick:ue[6]||(ue[6]=ie=>s("openChanges"))},[V(h(Ce),{class:"ch-branch-icon",name:"git-fork",size:"sm"}),C("span",{class:De(["ch-branch",{"ch-detached":!e.branch}])},B(e.branch||h(n)("header.detached")),3),o.value>0||r.value>0?(b(),I("span",hNe,[o.value>0?(b(),I("span",pNe,"↑"+B(o.value),1)):ne("",!0),r.value>0?(b(),I("span",gNe,"↓"+B(r.value),1)):ne("",!0)])):ne("",!0),u.value?(b(),I("span",mNe,[l.value>0?(b(),I("span",vNe,"+"+B(l.value),1)):ne("",!0),a.value>0?(b(),I("span",yNe,"-"+B(a.value),1)):ne("",!0)])):ne("",!0)])):ne("",!0),e.pr?(b(),I("button",{key:1,type:"button",class:De(["ch-pill ch-pr",f(e.pr.state)]),onClick:ue[7]||(ue[7]=ie=>e.pr&&s("openPr",e.pr.url))},[V(h(Ce),{name:"git-pull-request",size:"sm"}),C("span",null,"PR #"+B(e.pr.number)+" · "+B(p(e.pr.state)),1)],2)):ne("",!0)],2))}}),kNe=vt(bNe,[["__scopeId","data-v-cac58d83"]]),ANe=["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"],uM=[[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 CNe(e){if(e<=255)return ANe[e];let t=0,n=uM.length-1;for(;t<=n;){const i=t+n>>1,s=uM[i];if(e<s[0]){n=i-1;continue}if(e>s[1]){t=i+1;continue}return s[2]}return"L"}function wNe(e){const t=e.length;if(t===0)return null;const n=new Array(t);let i=!1;for(let u=0;u<t;){const c=e.charCodeAt(u);let d=c,f=1;if(c>=55296&&c<=56319&&u+1<t){const g=e.charCodeAt(u+1);g>=56320&&g<=57343&&(d=(c-55296<<10)+(g-56320)+65536,f=2)}const p=CNe(d);(p==="R"||p==="AL"||p==="AN")&&(i=!0);for(let g=0;g<f;g++)n[u+g]=p;u+=f}if(!i)return null;let s=0;for(let u=0;u<t;u++){const c=n[u];if(c==="L"){s=0;break}if(c==="R"||c==="AL"){s=1;break}}const o=new Int8Array(t);for(let u=0;u<t;u++)o[u]=s;const r=s&1?"R":"L",l=r;let a=l;for(let u=0;u<t;u++)n[u]==="NSM"?n[u]=a:a=n[u];a=l;for(let u=0;u<t;u++){const c=n[u];c==="EN"?n[u]=a==="AL"?"AN":"EN":(c==="R"||c==="L"||c==="AL")&&(a=c)}for(let u=0;u<t;u++)n[u]==="AL"&&(n[u]="R");for(let u=1;u<t-1;u++)n[u]==="ES"&&n[u-1]==="EN"&&n[u+1]==="EN"&&(n[u]="EN"),n[u]==="CS"&&(n[u-1]==="EN"||n[u-1]==="AN")&&n[u+1]===n[u-1]&&(n[u]=n[u-1]);for(let u=0;u<t;u++){if(n[u]!=="EN")continue;let c;for(c=u-1;c>=0&&n[c]==="ET";c--)n[c]="EN";for(c=u+1;c<t&&n[c]==="ET";c++)n[c]="EN"}for(let u=0;u<t;u++){const c=n[u];(c==="WS"||c==="ES"||c==="ET"||c==="CS")&&(n[u]="ON")}a=l;for(let u=0;u<t;u++){const c=n[u];c==="EN"?n[u]=a==="L"?"L":"EN":(c==="R"||c==="L")&&(a=c)}for(let u=0;u<t;u++){if(n[u]!=="ON")continue;let c=u+1;for(;c<t&&n[c]==="ON";)c++;const d=u>0?n[u-1]:l,f=c<t?n[c]:l,p=d!=="L"?"R":"L";if(p===(f!=="L"?"R":"L"))for(let m=u;m<c;m++)n[m]=p;u=c-1}for(let u=0;u<t;u++)n[u]==="ON"&&(n[u]=r);for(let u=0;u<t;u++){const c=n[u];(o[u]&1)===0?c==="R"?o[u]++:(c==="AN"||c==="EN")&&(o[u]+=2):(c==="L"||c==="AN"||c==="EN")&&o[u]++}return o}function xNe(e,t){const n=wNe(e);if(n===null)return null;const i=new Int8Array(t.length);for(let s=0;s<t.length;s++)i[s]=n[t[s]];return i}const _Ne=/[ \t\n\r\f]+/g,SNe=/[\t\n\r\f]| {2,}|^ | $/;function MNe(e){const t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function INe(e){if(!SNe.test(e))return e;let t=e.replace(_Ne," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function ENe(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` +`).replace(/[\r\f]/g,` +`):e}let k4=null,TNe;function LNe(){return k4===null&&(k4=new Intl.Segmenter(TNe,{granularity:"word"})),k4}const NNe=/\p{Script=Arabic}/u,Uu=/\p{M}/u,Ck=/\p{Nd}/u;function cM(e){return NNe.test(e)}function dM(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<e.length;t++){const n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){const i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){const s=(n-55296<<10)+(i-56320)+65536;if(dM(s))return!0;t++;continue}}if(dM(n))return!0}}return!1}function FNe(e){const t=jp(e);return t!==null&&(wk.has(t)||nd.has(t))}const BNe=new Set([" "," ","⁠","\uFEFF"]),$Ne=new Set(["-","‐","–","—"]);function DNe(e){const t=jp(e);return t!==null&&BNe.has(t)}function RNe(e){const t=jp(e);return t!==null&&$Ne.has(t)}function OD(e,t){return DNe(e)?!1:t?!(FNe(e)||RNe(e)):!0}const wk=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Bv=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),xk=new Set(["'","’"]),nd=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),zNe=new Set([":",".","،","؛"]),ONe=new Set(["၏"]),PNe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function jNe(e){if(_k(e))return!0;let t=!1;for(const n of e){if(nd.has(n)||Dv(n)){t=!0;continue}if(!(t&&Uu.test(n)))return!1}return t}function HNe(e){for(const t of e)if(!wk.has(t)&&!nd.has(t))return!1;return e.length>0}function WNe(e){if(_k(e))return!0;for(const t of e)if(!Bv.has(t)&&!xk.has(t)&&!Uu.test(t)&&!Dv(t))return!1;return e.length>0}function _k(e){let t=!1;for(const n of e)if(!(n==="\\"||Uu.test(n))){if(Bv.has(n)||nd.has(n)||xk.has(n)){t=!0;continue}return!1}return t}function $v(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const i=e.charCodeAt(n);if(i<56320||i>57343)return n;const s=n-1;if(s<0)return n;const o=e.charCodeAt(s);return o>=55296&&o<=56319?s:n}function jp(e){if(e.length===0)return null;const t=$v(e,e.length);return e.slice(t)}function qNe(e){for(const t of e)if(!Uu.test(t))return t;return null}function UNe(e){for(let t=e.length;t>0;){const n=$v(e,t),i=e.slice(n,t);if(!Uu.test(i))return i;t=n}return null}const KNe=[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 VNe(e,t){for(let n=0;n<t.length;n+=2)if(e>=t[n]&&e<=t[n+1])return!0;return!1}function Dv(e){const t=e.codePointAt(0);return t!==void 0&&VNe(t,KNe)}function ZNe(e){const t=UNe(e);return t!==null&&Dv(t)}function GNe(e){const t=qNe(e);return t!==null&&Ck.test(t)}function QNe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const i=t[n-1];if(Uu.test(i)){n--;continue}if(Bv.has(i)||xk.has(i)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function YNe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function fM(e,t,n,i){const s=t[i],o=e[i];if(s==null)return o;const r=n[i];if(o.length===r)return o;const l=s.repeat(r);return e[i]=l,l}function hM(e,t){return e&&t!==null&&zNe.has(t)}function JNe(e){const t=jp(e);return t!==null&&ONe.has(t)}function XNe(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 O8(e){let t=e.length;for(;t>0;){const n=$v(e,t),i=e.slice(n,t);if(PNe.has(i))return!0;if(!nd.has(i))return!1;t=n}return!1}function eFe(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 tFe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function dl(e){return e.length===1?e[0]:e.join("")}function nFe(e,t){const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),dl(n)}function iFe(e,t,n,i){if(!tFe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let o=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=eFe(c,i),f=d==="text"&&t;if(o!==null&&d===o&&f===a){r.push(c),u+=c.length;continue}o!==null&&s.push({text:dl(r),isWordLike:a,kind:o,start:l}),o=d,r=[c],l=n+u,a=f,u+=c.length}return o!==null&&s.push({text:dl(r),isWordLike:a,kind:o,start:l}),s}function P8(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const sFe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function oFe(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:sFe.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function rFe(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function lFe(e){const t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),s=e.starts.slice();for(let r=0;r<e.len;r++){if(i[r]!=="text"||!oFe(e,r))continue;const l=[t[r]];let a=r+1;for(;a<e.len&&!P8(i[a]);){l.push(t[a]),n[r]=!0;const u=t[a].includes("?");if(i[a]="text",t[a]="",a++,u)break}t[r]=dl(l)}let o=0;for(let r=0;r<t.length;r++){const l=t[r];l.length!==0&&(o!==r&&(t[o]=l,n[o]=n[r],i[o]=i[r],s[o]=s[r]),o++)}return t.length=o,n.length=o,i.length=o,s.length=o,{len:o,texts:t,isWordLike:n,kinds:i,starts:s}}function aFe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o];if(t.push(r),n.push(e.isWordLike[o]),i.push(e.kinds[o]),s.push(e.starts[o]),!rFe(r))continue;const l=o+1;if(l>=e.len||P8(e.kinds[l]))continue;const a=[],u=e.starts[l];let c=l;for(;c<e.len&&!P8(e.kinds[c]);)a.push(e.texts[c]),c++;a.length>0&&(t.push(dl(a)),n.push(!0),i.push("text"),s.push(u),o=c-1)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}const uFe=new Set([":","-","/","×",",",".","+","–","—"]),cFe=/[\p{P}\p{S}\p{Co}]/u,dFe=/\p{Emoji_Presentation}/u,fFe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function hFe(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function PD(e){const t=e.charCodeAt(0);return t<128?hFe(t):!fFe.has(e)&&!dFe.test(e)&&cFe.test(e)}function pM(e){let t=!1;for(const n of e)if(!Uu.test(n)){if(!PD(n))return!1;t=!0}return t}function pFe(e){for(let t=e.length;t>0;){const n=$v(e,t),i=e.slice(n,t);if(Uu.test(i)){t=n;continue}return PD(i)||Dv(i)}return!1}function gFe(e,t,n,i){const s=!t&&pM(e),o=!i&&pM(n),r=ZNe(e),l=(t||r)&&pFe(e);return!s&&!o&&!l||Vl(e)||Vl(n)?!1:(t||s||r)&&(i||o)}function jD(e){for(const t of e)if(Ck.test(t))return!0;return!1}function E2(e){if(e.length===0)return!1;for(const t of e)if(!(Ck.test(t)||uFe.has(t)))return!1;return!0}function mFe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o],l=e.kinds[o];if(l==="text"&&E2(r)&&jD(r)){const a=[r];let u=o+1;for(;u<e.len&&e.kinds[u]==="text"&&E2(e.texts[u]);)a.push(e.texts[u]),u++;t.push(dl(a)),n.push(!0),i.push("text"),s.push(e.starts[o]),o=u-1;continue}t.push(r),n.push(e.isWordLike[o]),i.push(l),s.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function vFe(e){const t=[],n=[],i=[],s=[];let o=0;for(;o<e.len;){const r=e.texts[o],l=e.kinds[o],a=e.isWordLike[o];if(l==="text"){const u=[r];let c=o+1,d=a;for(;c<e.len&&e.kinds[c]==="text"&&gFe(e.texts[c-1],e.isWordLike[c-1],e.texts[c],e.isWordLike[c]);){const f=e.texts[c];u.push(f),d=d||e.isWordLike[c],c++}if(c>o+1){t.push(dl(u)),n.push(d),i.push("text"),s.push(e.starts[o]),o=c;continue}}t.push(r),n.push(a),i.push(l),s.push(e.starts[o]),o++}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function yFe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o];if(e.kinds[o]==="text"&&r.includes("-")){const l=r.split("-");let a=l.length>1;for(let u=0;u<l.length;u++){const c=l[u];if(!a)break;(c.length===0||!jD(c)||!E2(c))&&(a=!1)}if(a){let u=0;for(let c=0;c<l.length;c++){const d=l[c],f=c<l.length-1?`${d}-`:d;t.push(f),n.push(!0),i.push("text"),s.push(e.starts[o]+u),u+=f.length}continue}}t.push(r),n.push(e.isWordLike[o]),i.push(e.kinds[o]),s.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function bFe(e){const t=[],n=[],i=[],s=[];let o=0;for(;o<e.len;){const r=[e.texts[o]];let l=e.isWordLike[o],a=e.kinds[o],u=e.starts[o];if(a==="glue"){const c=[r[0]],d=u;for(o++;o<e.len&&e.kinds[o]==="glue";)c.push(e.texts[o]),o++;const f=dl(c);if(o<e.len&&e.kinds[o]==="text")r[0]=f,r.push(e.texts[o]),l=e.isWordLike[o],a="text",u=d,o++;else{t.push(f),n.push(!1),i.push("glue"),s.push(d);continue}}else o++;if(a==="text")for(;o<e.len&&e.kinds[o]==="glue";){const c=[];for(;o<e.len&&e.kinds[o]==="glue";)c.push(e.texts[o]),o++;const d=dl(c);if(o<e.len&&e.kinds[o]==="text"){r.push(d,e.texts[o]),l=l||e.isWordLike[o],o++;continue}r.push(d)}t.push(dl(r)),n.push(l),i.push(a),s.push(u)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function kFe(e){const t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),s=e.starts.slice();for(let o=0;o<t.length-1;o++){if(i[o]!=="text"||i[o+1]!=="text"||!Vl(t[o])||!Vl(t[o+1]))continue;const r=QNe(t[o]);r!==null&&(t[o]=r.head,t[o+1]=r.tail+t[o+1],s[o+1]=s[o]+r.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function AFe(e,t,n){const i=LNe();let s=0;const o=[],r=[],l=[],a=[],u=[],c=[],d=[],f=[],p=[],g=[],m=[],y=[];for(const E of i.segment(e))for(const S of iFe(E.segment,E.isWordLike??!1,E.index,n)){let R=function(){c[O]!==null&&(r[O]=[fM(o,c,d,O)],c[O]=null),r[O].push(S.text),l[O]=l[O]||S.isWordLike,f[O]=f[O]||N,p[O]=p[O]||D,g[O]=$,m[O]=P,y[O]=hM(p[O],T)};const M=S.kind==="text",_=YNe(S.text,S.isWordLike,S.kind),N=Vl(S.text),D=cM(S.text),T=jp(S.text),$=O8(S.text),P=JNe(S.text),O=s-1;t.carryCJKAfterClosingQuote&&M&&s>0&&a[O]==="text"&&N&&f[O]&&g[O]||M&&s>0&&a[O]==="text"&&HNe(S.text)&&f[O]||M&&s>0&&a[O]==="text"&&m[O]?R():M&&s>0&&a[O]==="text"&&S.isWordLike&&D&&y[O]?(R(),l[O]=!0):_!==null&&s>0&&a[O]==="text"&&c[O]===_?d[O]=(d[O]??1)+1:M&&!S.isWordLike&&s>0&&a[O]==="text"&&!f[O]&&(jNe(S.text)||S.text==="-"&&l[O])?R():(o[s]=S.text,r[s]=[S.text],l[s]=S.isWordLike,a[s]=S.kind,u[s]=S.start,c[s]=_,d[s]=_===null?0:1,f[s]=N,p[s]=D,g[s]=$,m[s]=P,y[s]=hM(D,T),s++)}for(let E=0;E<s;E++){if(c[E]!==null){o[E]=fM(o,c,d,E);continue}o[E]=dl(r[E])}for(let E=1;E<s;E++)a[E]==="text"&&!l[E]&&_k(o[E])&&a[E-1]==="text"&&!f[E-1]&&(o[E-1]+=o[E],l[E-1]=l[E-1]||l[E],o[E]="");const w=Array.from({length:s},()=>null);let k=-1;for(let E=s-1;E>=0;E--){const S=o[E];if(S.length!==0){if(a[E]==="text"&&!l[E]&&k>=0&&a[k]==="text"&&(WNe(S)||S==="-"&&GNe(o[k]))){const M=w[k]??[];M.push(S),w[k]=M,u[k]=u[E],o[E]="";continue}k=E}}for(let E=0;E<s;E++){const S=w[E];S!=null&&(o[E]=nFe(S,o[E]))}let A=0;for(let E=0;E<s;E++){const S=o[E];S.length!==0&&(A!==E&&(o[A]=S,l[A]=l[E],a[A]=a[E],u[A]=u[E]),A++)}o.length=A,l.length=A,a.length=A,u.length=A;const v=bFe({len:A,texts:o,isWordLike:l,kinds:a,starts:u}),x=kFe(vFe(yFe(mFe(aFe(lFe(v))))));for(let E=0;E<x.len-1;E++){const S=XNe(x.texts[E]);S!==null&&(x.kinds[E]!=="space"&&x.kinds[E]!=="preserved-space"||x.kinds[E+1]!=="text"||!cM(x.texts[E+1])||(x.texts[E]=S.space,x.isWordLike[E]=!1,x.kinds[E]=x.kinds[E]==="preserved-space"?"preserved-space":"space",x.texts[E+1]=S.marks+x.texts[E+1],x.starts[E+1]=x.starts[E]+S.space.length))}return x}function CFe(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let i=0;for(let s=0;s<e.len;s++)e.kinds[s]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:s,consumedEndSegmentIndex:s+1}),i=s+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function wFe(e,t,n){if(t.len<=1)return t;const i=[],s=[],o=[],r=[];let l=-1,a=!1;function u(f){i.push(t.texts[f]),s.push(t.isWordLike[f]),o.push("text"),r.push(t.starts[f])}function c(f,p){let g=!1;for(let w=f;w<p;w++)g=g||t.isWordLike[w];const m=t.starts[f],y=p<t.len?t.starts[p]:e.length;i.push(e.slice(m,y)),s.push(g),o.push("text"),r.push(m)}function d(f){if(!(l<0)){if(a)l+1===f?u(l):c(l,f);else for(let p=l;p<f;p++)u(p);l=-1,a=!1}}for(let f=0;f<t.len;f++){const p=t.texts[f],g=t.kinds[f];if(g==="text"){l>=0&&!OD(t.texts[f-1],n)&&d(f),l<0&&(l=f),a=a||Vl(p);continue}d(f),i.push(p),s.push(t.isWordLike[f]),o.push(g),r.push(t.starts[f])}return d(t.len),{len:i.length,texts:i,isWordLike:s,kinds:o,starts:r}}function xFe(e,t,n="normal",i="normal"){const s=MNe(n),o=s.mode==="pre-wrap"?ENe(e):INe(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=AFe(o,t,s),l=i==="keep-all"?wFe(o,r,t.breakKeepAllAfterPunctuation):r;return{normalized:o,chunks:CFe(l,s),...l}}let $d=null;const gM=new Map;let Dd=null;const _Fe=96,SFe=/\p{Emoji_Presentation}/u,MFe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let A4=null;const mM=new Map;function Sk(){if($d!==null)return $d;if(typeof OffscreenCanvas<"u")return $d=new OffscreenCanvas(1,1).getContext("2d"),$d;if(typeof document<"u")return $d=document.createElement("canvas").getContext("2d"),$d;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function IFe(e){let t=gM.get(e);return t||(t=new Map,gM.set(e,t)),t}function cu(e,t){let n=t.get(e);return n===void 0&&(n={width:Sk().measureText(e).width,containsCJK:Vl(e)},t.set(e,n)),n}function Rv(){if(Dd!==null)return Dd;if(typeof navigator>"u")return Dd={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Dd;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/"),i=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Dd={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:i,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Dd}function EFe(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function HD(){return A4===null&&(A4=new Intl.Segmenter(void 0,{granularity:"grapheme"})),A4}function TFe(e){return SFe.test(e)||e.includes("️")}function LFe(e){return MFe.test(e)}function NFe(e,t){let n=mM.get(e);if(n!==void 0)return n;const i=Sk();i.font=e;const s=i.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const o=document.createElement("span");o.style.font=e,o.style.display="inline-block",o.style.visibility="hidden",o.style.position="absolute",o.textContent="😀",document.body.appendChild(o);const r=o.getBoundingClientRect().width;document.body.removeChild(o),s-r>.5&&(n=s-r)}return mM.set(e,n),n}function FFe(e){let t=0;const n=HD();for(const i of n.segment(e))TFe(i.segment)&&t++;return t}function BFe(e,t){return t.emojiCount===void 0&&(t.emojiCount=FFe(e)),t.emojiCount}function Nc(e,t,n){return n===0?t.width:t.width-BFe(e,t)*n}function $Fe(e,t,n,i,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const o=HD(),r=[];for(const c of o.segment(e))r.push(c.segment);if(r.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const c=[];for(const d of r){const f=cu(d,n);c.push(Nc(d,f,i))}return t.breakableFitAdvances=c,t.breakableFitAdvances}if(s==="pair-context"||r.length>_Fe){const c=[];let d=null,f=0;for(const p of r){const g=cu(p,n),m=Nc(p,g,i);if(d===null)c.push(m);else{const y=d+p,w=cu(y,n);c.push(Nc(y,w,i)-f)}d=p,f=m}return t.breakableFitAdvances=c,t.breakableFitAdvances}const l=[];let a="",u=0;for(const c of r){a+=c;const d=cu(a,n),f=Nc(a,d,i);l.push(f-u),u=f}return t.breakableFitAdvances=l,t.breakableFitAdvances}function DFe(e,t){const n=Sk();n.font=e;const i=IFe(e),s=EFe(e),o=t?NFe(e,s):0;return{cache:i,fontSize:s,emojiCorrection:o}}function RFe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function WD(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function qD(e,t,n=e.widths.length){for(;t<n;){const i=e.kinds[t];if(!RFe(i))break;t++}return t}function zFe(e,t){if(t<=0)return 0;const n=e%t;return Math.abs(n)<=1e-6?t:t-n}function OFe(e,t,n){return e.letterSpacing!==0&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function Mk(e,t){return t===0?0:e+t}function PFe(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function jFe(e,t,n,i,s){const o=t==="tab"?s+PFe(e,n):e.lineEndFitAdvances[n];return Mk(i,o)}function vM(e,t,n,i){const s=t==="tab"?0:e.lineEndFitAdvances[n];return Mk(i,s)}function yM(e,t,n,i,s){const o=t==="tab"?s:e.lineEndPaintAdvances[n];return Mk(i,o)}function HFe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function WFe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function T2(e,t,n){let i=t;for(;i<e.length&&e[i]<n;)i++;return i}function qFe(e,t,n,i,s){if(e.letterSpacing===0)return 0;if(s>0)return e.spacingGraphemeCounts[i]>0?e.letterSpacing:0;for(let o=i-1;o>=t;o--){const r=e.kinds[o];if(!(r==="space"||r==="zero-width-break"||r==="hard-break")){if(r==="soft-hyphen"){if(o===i-1)return 0;continue}return o===t&&n>0||e.spacingGraphemeCounts[o]>0?e.letterSpacing:0}}return 0}function UFe(e,t,n,i,s,o){return t+qFe(e,n,i,s,o)}function KFe(e,t,n){const{widths:i,kinds:s,breakableFitAdvances:o,breakablePreferredBreaks:r}=e;if(i.length===0)return 0;const a=Rv().lineFitEpsilon,u=t+a;let c=0,d=0,f=!1,p=0,g=0,m=0,y=0,w=-1,k=0;function A(){w=-1,k=0}function v(N=m,D=y,T=d){c++,n?.(T,p,g,N,D),d=0,f=!1,A()}function x(N,D){f=!0,p=N,g=0,m=N+1,y=0,d=D}function E(N,D,T){f=!0,p=N,g=D,m=N,y=D+1,d=T}function S(N,D){if(!f){x(N,D);return}d+=D,m=N+1,y=0}function M(N,D){const T=o[N],$=r[N]??null;let P=$===null?-1:T2($,0,D+1),O=-1,R=0,W=D;for(;W<T.length;){const z=T[W];if(!f)E(N,W,z);else if(d+z>u){if($!==null&&O>D){v(N,O,R),W=O,P=T2($,P,W+1),O=-1,R=0;continue}v(),E(N,W,z)}else d+=z,m=N,y=W+1;const G=W+1;$!==null&&$[P]===G&&(O=G,R=d,P++),W++}f&&m===N&&y===T.length&&(m=N+1,y=0)}let _=0;for(;_<i.length&&!(!f&&(_=qD(e,_),_>=i.length));){const N=i[_],D=s[_],T=WD(D);if(!f){N>u&&o[_]!==null?M(_,0):x(_,N),T&&(w=_+1,k=d-N),_++;continue}if(d+N>u){if(T){S(_,N),v(_+1,0,d-N),_++;continue}if(w>=0){if(m>w||m===w&&y>0){v();continue}v(w,0,k);continue}if(N>u&&o[_]!==null){v(),M(_,0),_++;continue}v();continue}S(_,N),T&&(w=_+1,k=d-N),_++}return f&&v(),c}function VFe(e,t,n){if(e.simpleLineWalkFastPath)return KFe(e,t,n);const{widths:i,kinds:s,breakableFitAdvances:o,breakablePreferredBreaks:r,discretionaryHyphenWidth:l,chunks:a}=e;if(i.length===0||a.length===0)return 0;const u=Rv(),c=u.lineFitEpsilon,d=t+c;let f=0,p=0,g=!1,m=0,y=0,w=0,k=0,A=-1,v=0,x=0,E=null;function S(){A=-1,v=0,x=0,E=null}function M(){return E==="soft-hyphen"&&A===w&&k===0?x:p}function _(R=w,W=k,z){f++,n!==void 0&&n(UFe(e,z??M(),m,y,R,W),m,y,R,W),p=0,g=!1,S()}function N(R,W){g=!0,m=R,y=0,w=R+1,k=0,p=W}function D(R,W,z){g=!0,m=R,y=W,w=R,k=W+1,p=z}function T(R,W){if(!g){N(R,W);return}p+=W,w=R+1,k=0}function $(R,W,z,G,K,H){if(!W)return;const q=vM(e,R,z,K),X=yM(e,R,z,K,G);A=z+1,v=p-H+q,x=p-H+X,E=R}function P(R,W){const z=o[R],G=r[R]??null;let K=G===null?-1:T2(G,0,W+1),H=-1,q=0,X=W;for(;X<z.length;){const ee=z[X];if(!g)D(R,X,ee);else{const ie=HFe(e,!0,ee),xe=p+ie;if(WFe(e,xe)>d){if(G!==null&&H>W){_(R,H,q),X=H,K=T2(G,K,X+1),H=-1,q=0;continue}_(),D(R,X,ee)}else p=xe,w=R,k=X+1}const ue=X+1;G!==null&&G[K]===ue&&(H=ue,q=p,K++),X++}g&&w===R&&k===z.length&&(w=R+1,k=0)}function O(R){f++,n?.(0,R.startSegmentIndex,0,R.consumedEndSegmentIndex,0),S()}for(let R=0;R<a.length;R++){const W=a[R];if(W.startSegmentIndex===W.endSegmentIndex){O(W);continue}g=!1,p=0,m=W.startSegmentIndex,y=0,w=W.startSegmentIndex,k=0,S();let z=W.startSegmentIndex;for(;z<W.endSegmentIndex&&!(!g&&(z=qD(e,z,W.endSegmentIndex),z>=W.endSegmentIndex));){const G=s[z],K=WD(G),H=OFe(e,g,z),q=G==="tab"?zFe(p+H,e.tabStopAdvance):i[z],X=H+q,ee=jFe(e,G,z,H,q);if(G==="soft-hyphen"){g&&(w=z+1,k=0,A=z+1,v=p+l,x=p+l,E=G),z++;continue}if(!g){ee>d&&o[z]!==null?P(z,0):N(z,q),$(G,K,z,q,H,X),z++;continue}if(p+ee>d){const ie=p+vM(e,G,z,H),xe=p+yM(e,G,z,H,q);if(E==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&v<=d){_(A,0,x);continue}if(K&&ie<=d){T(z,X),_(z+1,0,xe),z++;continue}if(A>=0&&v<=d){if(w>A||w===A&&k>0){_();continue}const ce=A;_(ce,0,x),z=ce;continue}if(ee>d&&o[z]!==null){_(),P(z,0),z++;continue}_();continue}T(z,X),$(G,K,z,q,H,X),z++}if(g){const G=A===W.consumedEndSegmentIndex?x:p;_(W.consumedEndSegmentIndex,0,G)}}return f}let C4=null;function Ik(){return C4===null&&(C4=new Intl.Segmenter(void 0,{granularity:"grapheme"})),C4}function ZFe(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function GFe(e,t){const n=[];let i=[],s=0,o=!1,r=!1,l=!1;function a(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:s}),i=[],o=!1,r=!1,l=!1)}function u(d,f,p){i=[d],s=f,o=p,r=O8(d),l=Bv.has(d)}function c(d,f){i.push(d),o=o||f;const p=O8(d);d.length===1&&nd.has(d)?r=r||p:r=p,l=!1}for(const d of Ik().segment(e)){const f=d.segment,p=Vl(f);if(i.length===0){u(f,d.index,p);continue}if(l||wk.has(f)||nd.has(f)||t.carryCJKAfterClosingQuote&&p&&r){c(f,p);continue}if(!o&&!p){c(f,p);continue}a(),u(f,d.index,p)}return a(),n}function QFe(e,t,n){if(t.length<=1)return t;const i=[];let s=-1,o=!1;function r(a,u){const c=t[a].start,d=u<t.length?t[u].start:e.length;i.push({text:e.slice(c,d),start:c})}function l(a){if(!(s<0)){if(o)s+1===a?i.push(t[s]):r(s,a);else for(let u=s;u<a;u++)i.push(t[u]);s=-1,o=!1}}for(let a=0;a<t.length;a++){const u=t[a];s>=0&&!OD(t[a-1].text,n)&&l(a),s<0&&(s=a),o=o||Vl(u.text)}return l(t.length),i}function bM(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const i=Ik();for(const s of i.segment(e))n++;return n}function YFe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function JFe(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const i of Ik().segment(e))n++,YFe(i.segment)&&t.push(n);return t.length===0?null:t}function XFe(e,t,n){return t>1?e+(t-1)*n:e}function eBe(e,t,n,i,s){const o=Rv(),{cache:r,emojiCorrection:l}=DFe(t,LFe(e.normalized)),a=Nc("-",cu("-",r),l)+(s===0?0:s*2),c=Nc(" ",cu(" ",r),l)*8,d=s!==0;if(e.len===0)return ZFe();const f=[],p=[],g=[],m=[];let y=e.chunks.length<=1&&!d;const w=n?[]:null,k=[],A=[],v=[],x=n?[]:null,E=Array.from({length:e.len});function S(D,T,$,P,O,R,W,z,G){O!=="text"&&O!=="space"&&O!=="zero-width-break"&&(y=!1),f.push(T),p.push($),g.push(P),m.push(O),w?.push(R),k.push(W),A.push(z),d&&v.push(G),x!==null&&x.push(D)}function M(D,T,$,P,O){const R=cu(D,r),W=d?bM(D,T):0,z=XFe(Nc(D,R,l),W,s),G=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:z,K=G===0?0:G+(W>0?s:0),H=T==="space"||T==="zero-width-break"?0:z;if(O&&P&&D.length>1){let q="sum-graphemes";s!==0?q="segment-prefixes":E2(D)?q="pair-context":o.preferPrefixWidthsForBreakableRuns&&(q="segment-prefixes");const X=$Fe(D,R,r,l,q),ee=X===null||i==="keep-all"?null:JFe(D);S(D,z,K,H,T,$,X,ee,W);return}S(D,z,K,H,T,$,null,null,W)}for(let D=0;D<e.len;D++){E[D]=f.length;const T=e.texts[D],$=e.isWordLike[D],P=e.kinds[D],O=e.starts[D];if(P==="soft-hyphen"){S(T,0,a,a,P,O,null,null,0);continue}if(P==="hard-break"){S(T,0,0,0,P,O,null,null,0);continue}if(P==="tab"){S(T,0,0,0,P,O,null,null,d?bM(T,P):0);continue}const R=cu(T,r);if(P==="text"&&R.containsCJK){const W=GFe(T,o),z=i==="keep-all"?QFe(T,W,o.breakKeepAllAfterPunctuation):W;for(let G=0;G<z.length;G++){const K=z[G];M(K.text,"text",O+K.start,$,i==="keep-all"||!Vl(K.text))}continue}M(T,P,O,$,!0)}const _=tBe(e.chunks,E,f.length),N=w===null?null:xNe(e.normalized,w);return x!==null?{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:a,tabStopAdvance:c,chunks:_,segments:x}:{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:a,tabStopAdvance:c,chunks:_}}function tBe(e,t,n){const i=[];for(let s=0;s<e.length;s++){const o=e[s],r=o.startSegmentIndex<t.length?t[o.startSegmentIndex]:n,l=o.endSegmentIndex<t.length?t[o.endSegmentIndex]:n,a=o.consumedEndSegmentIndex<t.length?t[o.consumedEndSegmentIndex]:n;i.push({startSegmentIndex:r,endSegmentIndex:l,consumedEndSegmentIndex:a})}return i}function nBe(e,t,n,i){const s=i?.wordBreak??"normal",o=i?.letterSpacing??0,r=xFe(e,Rv(),i?.whiteSpace,s);return eBe(r,t,n,s,o)}function iBe(e,t,n){return nBe(e,t,!0,n)}function sBe(e){let t=0;return VFe(e,Number.POSITIVE_INFINITY,n=>{n>t&&(t=n)}),t}const oBe={class:"slash-menu","data-menu-frame":""},rBe={key:0,class:"slash-empty",role:"status"},lBe=["id","aria-selected","onMouseenter","onMousedown"],aBe={class:"slash-name"},uBe={key:0,class:"slash-match"},cBe={class:"slash-desc"},dBe={key:0,class:"slash-desc-match"},fBe=tt({__name:"SlashMenu",props:{items:{},activeIndex:{},query:{default:""},ranges:{}},emits:["select","hover"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(A,v){if(!v||v.length===0)return[{text:A,hit:!1}];const x=[];let E=0;for(const[S,M]of[...v].sort((_,N)=>_[0]-N[0]))S>E&&x.push({text:A.slice(E,S),hit:!1}),x.push({text:A.slice(S,M),hit:!0}),E=M;return E<A.length&&x.push({text:A.slice(E),hit:!1}),x}function r(A){return A.isSkill?A.desc:n(A.desc)}const l=F(()=>i.items.map((A,v)=>{const x=r(A),E=i.ranges?.[v]??Tie(i.query,A.name,x);return{item:A,namePieces:o(A.name,E.name),desc:x,descPieces:o(x,E.desc)}})),a=Z(null),u=Z(!1),c=Z(!1);let d=null;const f=Z(null);function p(){const A=a.value;if(!A)return;u.value=A.scrollTop>0,c.value=A.scrollTop+A.clientHeight<A.scrollHeight-1;const{scrollTop:v,scrollHeight:x,clientHeight:E}=A;if(x<=E+1){f.value=null;return}const S=getComputedStyle(A),M=parseFloat(S.getPropertyValue("--menu-scrollbar-track-inset"))||0,_=parseFloat(S.getPropertyValue("--menu-scrollbar-thumb-min"))||24,N=E-M*2,D=Math.max(_,E/x*N),T=x-E,$=A.offsetTop+M+v/T*(N-D);f.value={top:$,height:D}}function g(){p()}let m=null;function y(A){const v=a.value,x=f.value;if(!v||!x)return;A.preventDefault(),m?.();const E=A.pointerId;A.target.setPointerCapture?.(A.pointerId);const S=getComputedStyle(v),M=parseFloat(S.getPropertyValue("--menu-scrollbar-track-inset"))||0,_=v.clientHeight-M*2-x.height,N=v.scrollHeight-v.clientHeight,D=A.clientY,T=v.scrollTop,$=R=>{R.pointerId!==E||_<=0||(v.scrollTop=T+(R.clientY-D)/_*N)},P=R=>{R.pointerId===E&&O()},O=()=>{window.removeEventListener("pointerup",P),window.removeEventListener("pointermove",$),window.removeEventListener("pointercancel",P),m===O&&(m=null)};m=O,window.addEventListener("pointermove",$),window.addEventListener("pointerup",P),window.addEventListener("pointercancel",P)}const w=F(()=>{const A=u.value,v=c.value,x="var(--menu-scroll-fade)";if(A&&v)return`linear-gradient(to bottom, transparent 0, black ${x}, black calc(100% - ${x}), transparent 100%)`;if(A)return`linear-gradient(to bottom, transparent, black ${x})`;if(v)return`linear-gradient(to top, transparent, black ${x})`});pn(()=>{p(),typeof ResizeObserver=="function"&&a.value&&(d=new ResizeObserver(p),d.observe(a.value))}),An(()=>{d?.disconnect(),d=null,m?.()});function k(){const A=a.value;if(!A)return;const v=A.querySelectorAll('[role="option"]')[i.activeIndex];if(!v)return;const x=A.getBoundingClientRect(),E=v.getBoundingClientRect(),S=E.top-x.top+A.scrollTop,M=S+E.height;S<A.scrollTop?A.scrollTop=S:M>A.scrollTop+A.clientHeight&&(A.scrollTop=M-A.clientHeight)}return Qe(()=>i.activeIndex,()=>{kt(k)}),Qe(()=>i.items,()=>{kt(()=>{p(),k()})}),(A,v)=>(b(),I("div",oBe,[e.items.length===0?(b(),I("div",rBe,B(h(n)("composer.noCommands")),1)):ne("",!0),Bn(C("div",{id:"composer-slash-menu",ref_key:"scrollEl",ref:a,class:"slash-scroll",role:"listbox",style:Vt({maskImage:w.value}),onScroll:g},[(b(!0),I(Be,null,yt(l.value,(x,E)=>(b(),I("div",{key:`${x.item.name}-${E}`,id:`composer-slash-option-${E}`,class:De(["slash-item",{active:E===i.activeIndex}]),role:"option","aria-selected":E===i.activeIndex,onMouseenter:S=>s("hover",E),onMousedown:It(S=>s("select",x.item),["prevent"])},[C("span",aBe,[(b(!0),I(Be,null,yt(x.namePieces,(S,M)=>(b(),I(Be,{key:M},[S.hit?(b(),I("span",uBe,B(S.text),1)):(b(),I(Be,{key:1},[Ue(B(S.text),1)],64))],64))),128))]),C("span",cBe,[(b(!0),I(Be,null,yt(x.descPieces,(S,M)=>(b(),I(Be,{key:M},[S.hit?(b(),I("span",dBe,B(S.text),1)):(b(),I(Be,{key:1},[Ue(B(S.text),1)],64))],64))),128))])],42,lBe))),128))],36),[[rs,e.items.length>0]]),f.value&&e.items.length>0?(b(),I("div",{key:1,class:"scroll-thumb",onPointerdown:y,style:Vt({top:`${f.value.top}px`,height:`${f.value.height}px`})},null,36)):ne("",!0)]))}}),hBe=vt(fBe,[["__scopeId","data-v-98398dd7"]]),pBe={class:"mention-menu","data-menu-frame":""},gBe={key:0,class:"mention-state dim",role:"status"},mBe={key:1,class:"mention-state dim",role:"status"},vBe=["id","aria-selected","onMouseenter","onMousedown"],yBe=["innerHTML"],bBe={class:"mention-name"},kBe={class:"mention-path"},ABe=tt({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean}},emits:["select","hover"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Z(null),r=Z(!1),l=Z(!1);let a=null;const u=Z(null);function c(){const _=o.value;if(!_)return;r.value=_.scrollTop>0,l.value=_.scrollTop+_.clientHeight<_.scrollHeight-1;const{scrollTop:N,scrollHeight:D,clientHeight:T}=_;if(D<=T+1){u.value=null;return}const $=getComputedStyle(_),P=parseFloat($.getPropertyValue("--menu-scrollbar-track-inset"))||0,O=parseFloat($.getPropertyValue("--menu-scrollbar-thumb-min"))||24,R=T-P*2,W=Math.max(O,T/D*R),z=D-T,G=_.offsetTop+P+N/z*(R-W);u.value={top:G,height:W}}function d(){c()}let f=null;function p(_){const N=o.value,D=u.value;if(!N||!D)return;_.preventDefault(),f?.();const T=_.pointerId;_.target.setPointerCapture?.(_.pointerId);const $=getComputedStyle(N),P=parseFloat($.getPropertyValue("--menu-scrollbar-track-inset"))||0,O=N.clientHeight-P*2-D.height,R=N.scrollHeight-N.clientHeight,W=_.clientY,z=N.scrollTop,G=q=>{q.pointerId!==T||O<=0||(N.scrollTop=z+(q.clientY-W)/O*R)},K=q=>{q.pointerId===T&&H()},H=()=>{window.removeEventListener("pointerup",K),window.removeEventListener("pointermove",G),window.removeEventListener("pointercancel",K),f===H&&(f=null)};f=H,window.addEventListener("pointermove",G),window.addEventListener("pointerup",K),window.addEventListener("pointercancel",K)}const g=F(()=>{const _=r.value,N=l.value,D="var(--menu-scroll-fade)";if(_&&N)return`linear-gradient(to bottom, transparent 0, black ${D}, black calc(100% - ${D}), transparent 100%)`;if(_)return`linear-gradient(to bottom, transparent, black ${D})`;if(N)return`linear-gradient(to top, transparent, black ${D})`});pn(()=>{c(),typeof ResizeObserver=="function"&&o.value&&(a=new ResizeObserver(c),a.observe(o.value))}),An(()=>{a?.disconnect(),a=null,f?.()});function m(){const _=o.value;if(!_)return;const N=_.querySelectorAll('[role="option"]')[n.activeIndex];if(!N)return;const D=_.getBoundingClientRect(),T=N.getBoundingClientRect(),$=T.top-D.top+_.scrollTop,P=$+T.height;$<_.scrollTop?_.scrollTop=$:P>_.scrollTop+_.clientHeight&&(_.scrollTop=P-_.clientHeight)}Qe(()=>n.activeIndex,()=>{kt(m)}),Qe(()=>n.items,()=>{kt(()=>{c(),m()})});const y=Wd("folder","sm"),w=Wd("code","sm"),k=Wd("file-text","sm"),A=Wd("image","sm"),v=Wd("file","sm"),x=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"]),E=new Set(["md","markdown","mdx","txt","rst","adoc","pdf","doc","docx"]),S=new Set(["png","jpg","jpeg","gif","svg","webp","bmp","ico","avif"]);function M(_){const N=_.path;if(N.endsWith("/"))return y;const D=_.name||N.split("/").pop()||N,T=D.lastIndexOf("."),$=T>0?D.slice(T+1).toLowerCase():"";return $?x.has($)?w:E.has($)?k:S.has($)?A:v:v}return(_,N)=>(b(),I("div",pBe,[n.loading?(b(),I("div",gBe,B(h(s)("mention.searching")),1)):n.items.length===0?(b(),I("div",mBe,B(h(s)("mention.noMatch")),1)):ne("",!0),Bn(C("div",{id:"composer-mention-menu",ref_key:"scrollEl",ref:o,class:"mention-scroll",role:"listbox",style:Vt({maskImage:g.value}),onScroll:d},[(b(!0),I(Be,null,yt(n.items,(D,T)=>(b(),I("div",{key:D.path,id:`composer-mention-option-${T}`,class:De(["mention-item",{active:T===n.activeIndex}]),role:"option","aria-selected":T===n.activeIndex,onMouseenter:$=>i("hover",T),onMousedown:It($=>i("select",D),["prevent"])},[C("span",{class:"mention-icon",innerHTML:M(D),"aria-hidden":"true"},null,8,yBe),C("span",bBe,B(D.name),1),C("span",kBe,B(D.path),1)],42,vBe))),128))],36),[[rs,!n.loading&&n.items.length>0]]),u.value&&!n.loading&&n.items.length>0?(b(),I("div",{key:2,class:"scroll-thumb",onPointerdown:p,style:Vt({top:`${u.value.top}px`,height:`${u.value.height}px`})},null,36)):ne("",!0)]))}}),CBe=vt(ABe,[["__scopeId","data-v-53eca905"]]),wBe={class:"composer-card"},xBe={key:0,class:"att-strip"},_Be={key:1,class:"att-row"},SBe={key:0,class:"att-more"},MBe={class:"cin-wrap"},IBe=["onClick"],EBe={class:"am-icon"},TBe={class:"am-name"},LBe={key:0,class:"am-desc"},NBe={class:"input-row"},FBe=["placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant"],BBe=["aria-label"],$Be={class:"toolbar-left"},DBe=["aria-label","onKeydown"],RBe={class:"perm-pill-label"},zBe=["onClick"],OBe={class:"pd-info"},PBe={class:"pd-desc"},jBe={class:"pd-check"},HBe={key:1,class:"swarm-chip"},WBe={class:"swarm-label"},qBe={class:"toolbar-right"},UBe=["aria-label"],KBe=["aria-expanded"],VBe={class:"mp-name"},ZBe={key:0,class:"think-suffix"},GBe={class:"mp-name"},QBe={class:"mp-name"},YBe=["aria-label"],JBe=["aria-label","disabled"],XBe={class:"md-list"},e$e={key:0,class:"md-section"},t$e=["onClick"],n$e={class:"md-check"},i$e={class:"md-name"},s$e={class:"md-provider"},o$e={key:1,class:"md-divider"},r$e={key:2,class:"md-section"},l$e=["onClick"],a$e={class:"md-check"},u$e={class:"md-name"},c$e={key:0,class:"md-divider"},d$e={class:"md-thinking"},f$e={class:"md-name"},h$e={key:0,class:"md-note"},p$e={key:2,class:"md-note"},g$e={class:"md-cache-note"},m$e={class:"md-check md-more-icon"},v$e={class:"md-name"},y$e={key:1,class:"composer-footer"},b$e={class:"drop-card"},kM=36,k$e=tt({__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},planArmed:{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","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","login"],setup(e,{expose:t,emit:n}){const i=e,s=F(()=>i.starting?r("composer.starting"):i.running?r("composer.placeholderRunning"):i.goalMode?r("status.goalPlaceholder"):i.planArmed||i.planMode?r("status.planPlaceholder"):r("composer.placeholder")),o=n,{t:r,locale:l}=Bt(),{text:a,editorRef:u,loadForEdit:c,clearDraft:d}=cve({sessionId:()=>i.sessionId}),f=u;function p(){const Ee=f.value;Ee&&(Ee.style.height="auto",Ee.style.height=`${Ee.scrollHeight}px`)}Qe(a,()=>void kt(p));const g=Z(!1);function m(){g.value=!g.value,kt(()=>{p(),A(),f.value?.focus()})}function y(){g.value&&(g.value=!1,kt(p))}function w(Ee){if(typeof getComputedStyle>"u")return kM;const ct=Number.parseFloat(getComputedStyle(Ee).minHeight);return Number.isFinite(ct)&&ct>0?ct:kM}const k=Z(!1);function A(){const Ee=f.value;k.value=!!Ee&&Ee.scrollHeight>w(Ee)}Qe(a,()=>{kt(A)});const v=pve({text:a,editorRef:f,sessionId:()=>i.sessionId});function x(){Si.value||(i.goalMode&&o("toggleGoal"),o("togglePlan"))}function E(){if(Wi.value){o("focusGoal");return}i.goalMode||(Si.value&&o("togglePlan"),o("toggleGoal"))}const{open:S,items:M,ranges:_,active:N,update:D,select:T}=gve({text:a,editorRef:f,skills:()=>i.skills,emitCommand:Ee=>{if(Ee==="/plan"){x();return}if(Ee==="/goal"){E();return}if(Ee==="/swarm"){Vs.value||o("toggleSwarm");return}o("command",{cmd:Ee,attachments:[]})},historyPush:Ee=>v.push(Ee),clearDraft:d,resolveDesc:Ee=>Ee.isSkill?Ee.desc:r(Ee.desc)}),$=F(()=>a.value.startsWith("/")&&!a.value.includes(" ")?a.value.slice(1):""),P=F(()=>{if(S.value)return"composer-slash-menu";if(R.value)return"composer-mention-menu"}),O=F(()=>{if(S.value&&M.value.length>0)return`composer-slash-option-${N.value}`;if(R.value&&!G.value&&W.value.length>0)return`composer-mention-option-${z.value}`}),{open:R,items:W,active:z,loading:G,update:K,close:H,select:q}=mve({text:a,editorRef:f,searchFiles:()=>i.searchFiles});Qe(()=>i.sessionId,()=>{g.value=!1,S.value=!1,H()});function X(){S.value=!1,H()}function ee(){v.resetBrowsing(),D(),K(),(S.value||R.value||Sn.value)&&Dn()}function ue(Ee){const ct=Ee.map(Xi=>/\s/.test(Xi)?`"${Xi}"`:Xi).join(" "),dt=f.value,Wt=a.value,ki=dt&&document.activeElement===dt?dt.selectionStart:Wt.length,$s=ki>0&&!/\s/.test(Wt[ki-1])?" ":"",Ql=ki<Wt.length&&!/\s/.test(Wt[ki])?" ":"";v.resetBrowsing(),a.value=Wt.slice(0,ki)+$s+ct+Ql+Wt.slice(ki),kt(()=>{const Xi=f.value;if(!Xi)return;const os=ki+$s.length+ct.length;Xi.setSelectionRange(os,os),Xi.focus(),p()})}const{attachments:ie,previewAttachment:xe,fileInputRef:ce,isDragOver:pe,removeAttachment:Ne,openAttachmentPreview:te,closeAttachmentPreview:ye,openFilePicker:j,handleFileInputChange:Y,handleDragOver:ve,handleDragLeave:re,handleDrop:se,clearAfterSubmit:U,clearAttachments:J,loadAttachments:de}=$ve({api:Pt(),uploadImage:()=>i.uploadImage,sessionId:()=>i.sessionId,insertFolderPaths:ue}),me=Ee=>Ee.kind==="image"||Ee.kind==="video",Ie=F(()=>ie.value.filter(me)),je=F(()=>ie.value.filter(Ee=>!me(Ee))),ke=Z(null),Le=Z(null),it=Z(!1);function Fe(){const Ee=ke.value,ct=Le.value;it.value=Ee!==null&&ct!==null&&ct.scrollHeight>Ee.clientHeight+1}let Re=null;Qe(ke,Ee=>{if(Re?.disconnect(),Re=null,Ee){const ct=new ResizeObserver(Fe);ct.observe(Ee),Re=ct}Fe()},{immediate:!0}),Qe(ie,()=>void kt(Fe),{deep:!0}),An(()=>Re?.disconnect());const Ke=Z(null);Qe(()=>[Ie.value.length,je.value.length],([Ee,ct],[dt,Wt])=>{Ee<=dt&&ct<=Wt||kt(()=>{const ki=ke.value;ki&&(Ee>dt&&Ke.value?ki.scrollTop=Ke.value.offsetHeight-ki.clientHeight:ki.scrollTop=ki.scrollHeight)})}),pn(()=>{a.value&&kt(()=>{p(),A()})}),An(()=>{Ve()});function ht(){f.value?.focus({preventScroll:!0})}function ot(Ee){de(Ee)}function gt(Ee){return{fileId:Ee.fileId,kind:Ee.kind,name:Ee.name,mediaType:Ee.mediaType,size:Ee.size}}const Tt=Z(null);function yn(Ee,ct){if(Ee.kind==="file"){Ee.fileId!==void 0&&dD(Pt(),Ee.fileId,Ee.name,Ee.mediaType);return}Tt.value=ct??null,te(Ee)}const Gt=F(()=>{const Ee=xe.value;return!Ee||!Ee.previewUrl?null:{kind:Ee.kind==="video"?"video":"image",url:Ee.previewUrl,path:Ee.name,fileId:Ee.previewUrl.startsWith("blob:")?void 0:Ee.fileId}}),Kt=F(()=>!ie.value.some(Ee=>Ee.uploading)&&(a.value.trim()!==""||ie.value.some(Ee=>!Ee.error&&Ee.fileId)));function mn(){const Ee=a.value.trim();if(ie.value.some(Wt=>Wt.uploading))return;const ct=ie.value.filter(Wt=>!Wt.uploading&&!Wt.error&&Wt.fileId);if(!Ee&&ct.length===0)return;if(v.push(Ee),Ee==="/plan"){a.value="",d(),S.value=!1,y(),x();return}if(Ee==="/goal"){a.value="",d(),S.value=!1,y(),E();return}if(Ee==="/swarm"){a.value="",d(),S.value=!1,y(),Vs.value||o("toggleSwarm");return}if(Ee){const Wt=wie(Ee),ki=Wt?FL(i.skills).find($s=>$s.name===Wt.cmd||$s.name===`/${Em}${Wt.cmd.slice(1)}`):void 0;if(Wt&&ki){const $s=Wt.arg?`${Wt.cmd} ${Wt.arg}`:Wt.cmd,Ql=ki.isSkill===!0;a.value="",d(),S.value=!1,y(),Ql?(xe.value=null,Tt.value=null,U(),H(),o("command",{cmd:$s,attachments:ct.map(Xi=>gt(Xi))})):o("command",{cmd:$s,attachments:[]});return}}const dt={text:Ee,attachments:ct.map(Wt=>gt(Wt))};xe.value=null,Tt.value=null,U(),a.value="",d(),S.value=!1,H(),y(),o("submit",dt)}function _n(){if(!i.running||ie.value.some(Wt=>Wt.uploading))return;const Ee=a.value.trim(),ct=ie.value.filter(Wt=>!Wt.uploading&&!Wt.error&&Wt.fileId);if(!Ee&&ct.length===0&&i.queued.length===0)return;const dt={text:Ee,attachments:ct.map(Wt=>gt(Wt))};U(),v.push(Ee),a.value="",d(),S.value=!1,H(),y(),o("steer",dt)}let He=!1,st=null;function Ve(){st!==null&&(clearTimeout(st),st=null)}function Rt(){Ve(),He=!0}function Ct(){Ve(),st=setTimeout(()=>{st=null,He=!1},0)}function Fn(Ee){return He||Ee.isComposing||Ee.keyCode===229}function Tn(Ee){if(Fn(Ee))return;if(xs.value&&Ee.key==="Backspace"&&!Ee.shiftKey&&!Ee.altKey&&!Ee.metaKey&&!Ee.ctrlKey){const dt=f.value;if(dt&&dt.selectionStart===0&&dt.selectionEnd===0){Ee.preventDefault(),fo();return}}if(Ee.key==="Escape"){if(Sn.value){Ee.preventDefault(),Dn();return}if(ni.value){Ee.preventDefault(),Bs();return}if(zn.value){Ee.preventDefault(),vi();return}}if(S.value){if(Ee.key==="Escape"){Ee.preventDefault(),S.value=!1;return}if(Ee.key==="Tab"&&M.value.length===0){S.value=!1;return}}if(S.value&&M.value.length>0){if(Ee.key==="ArrowDown"){Ee.preventDefault(),N.value=(N.value+1)%M.value.length;return}if(Ee.key==="ArrowUp"){Ee.preventDefault(),N.value=(N.value-1+M.value.length)%M.value.length;return}if(Ee.key==="Enter"||Ee.key==="Tab"){Ee.preventDefault();const dt=M.value[N.value];dt&&T(dt);return}}if(R.value&&!G.value){if(Ee.key==="Escape"){Ee.preventDefault(),H();return}if(W.value.length>0){if(Ee.key==="ArrowDown"){Ee.preventDefault(),z.value=(z.value+1)%W.value.length;return}if(Ee.key==="ArrowUp"){Ee.preventDefault(),z.value=(z.value-1+W.value.length)%W.value.length;return}if(Ee.key==="Enter"||Ee.key==="Tab"){Ee.preventDefault();const dt=W.value[z.value];dt&&q(dt);return}}}if(Ee.key==="s"&&(Ee.ctrlKey||Ee.metaKey)&&!Ee.shiftKey&&!Ee.altKey){i.running&&(Ee.preventDefault(),_n());return}const ct=S.value&&M.value.length>0;if(!g.value&&!ct&&!R.value&&!Ee.shiftKey&&!Ee.altKey&&!Ee.metaKey&&!Ee.ctrlKey){const dt=v.isBrowsing();if(Ee.key==="ArrowUp"&&v.hasHistory()&&(dt||v.caretAtTextStart())){Ee.preventDefault(),v.recallOlder(),S.value=!1;return}if(Ee.key==="ArrowDown"&&dt){Ee.preventDefault(),v.recallNewer(),S.value=!1;return}}if(Ee.key==="Enter"&&!Ee.shiftKey){if(g.value&&!(Ee.metaKey||Ee.ctrlKey))return;Ee.preventDefault(),mn()}}const as=F(()=>r("composer.send")),Qt=F(()=>!!i.uploadImage),ni=Z(!1),zn=Z(!1),Sn=Z(!1),mi=Z(null),Ws=Z(null),Li=Z(null),Lt=Z(null),xi=Z(null),Qi=Z(null);let ci=null;function Fs(){const Ee=xi.value;if(!Ee)return;const{scrollTop:ct,scrollHeight:dt,clientHeight:Wt}=Ee;if(dt<=Wt+1){Qi.value=null;return}const ki=getComputedStyle(Ee),$s=parseFloat(ki.getPropertyValue("--menu-scrollbar-track-inset"))||0,Ql=parseFloat(ki.getPropertyValue("--menu-scrollbar-thumb-min"))||24,Xi=Wt-$s*2,os=Math.max(Ql,Wt/dt*Xi),Ku=dt-Wt,ld=Ee.offsetTop+$s+ct/Ku*(Xi-os);Qi.value={top:ld,height:os}}function Ni(){Fs()}Qe(Sn,async Ee=>{ci?.disconnect(),ci=null,Qi.value=null,Ee&&(await kt(),Fs(),typeof ResizeObserver=="function"&&xi.value&&(ci=new ResizeObserver(Fs),ci.observe(xi.value)))}),An(()=>{ci?.disconnect(),ci=null});const $i=Z(""),So=F(()=>{const Ee={};return $i.value&&(Ee.right=$i.value),Ee}),_i=F(()=>ni.value||zn.value||Sn.value||S.value||R.value);t({loadForEdit:c,loadAttachmentsForEdit:ot,focus:ht,anyPopupOpen:_i,isEmpty:()=>a.value.trim().length===0&&ie.value.length===0});function co(){ni.value=!ni.value,ni.value?(Wo(),zn.value=!1,Sn.value=!1,document.addEventListener("click",On,!0)):document.removeEventListener("click",On,!0)}function Bs(){ni.value=!1,!zn.value&&!Sn.value&&document.removeEventListener("click",On,!0)}function Hi(){zn.value=!zn.value,zn.value?(Mi(),ni.value=!1,Sn.value=!1,document.addEventListener("click",On,!0)):document.removeEventListener("click",On,!0)}function vi(){zn.value=!1,!ni.value&&!Sn.value&&document.removeEventListener("click",On,!0)}function Mn(){Sn.value=!Sn.value,Sn.value?(ni.value=!1,zn.value=!1,S.value=!1,R.value=!1,document.addEventListener("click",On,!0),kt(()=>{Ws.value?.querySelector(".am-row")?.focus()})):document.removeEventListener("click",On,!0)}function Dn(){Sn.value=!1,!ni.value&&!zn.value&&document.removeEventListener("click",On,!0)}const Ln=F(()=>{const Ee=[];return Qt.value&&Ee.push({id:"files",icon:"attachment",nameKey:"composer.addFiles",action:Di}),Ee.push({id:"goal",icon:"target",nameKey:"status.goalLabel",descKey:"composer.addGoalDesc",action:ri}),Ee.push({id:"plan",icon:"file-edit",nameKey:"status.planLabel",descKey:"composer.addPlanDesc",action:ur}),Ee.push({id:"swarm",icon:"sparkles",nameKey:"status.swarmLabel",descKey:"composer.addSwarmDesc",action:jo}),Ee});function ws(Ee){Ee.action(),f.value?.focus()}function Cn(Ee){if(Ee.key==="Escape"){Ee.preventDefault(),Dn(),f.value?.focus();return}if(Ee.key==="Tab"){Dn();return}if(Ee.key!=="ArrowDown"&&Ee.key!=="ArrowUp")return;Ee.preventDefault();const ct=Array.from(Ws.value?.querySelectorAll(".am-row")??[]);if(ct.length===0)return;const dt=ct.indexOf(document.activeElement),Wt=Ee.key==="ArrowDown"?(dt+1)%ct.length:(dt-1+ct.length)%ct.length;ct[Wt]?.focus()}function Di(){Dn(),j()}function ri(){Dn(),i.goalMode||E()}function ur(){Dn(),Si.value||x()}function jo(){Dn(),Vs.value||o("toggleSwarm")}function On(Ee){const ct=Ee.target,dt=mi.value?.contains(ct)??!1,Wt=Ws.value?.contains(ct)??!1;!dt&&!Wt&&(Bs(),vi(),Dn())}An(()=>{document.removeEventListener("click",On,!0)});const us=F(()=>{const Ee=i.status?.ctxMax??0;return Ee<=0?0:Math.min(100,Math.max(0,Math.ceil((i.status?.ctxUsed??0)/Ee*100)))}),qs=F(()=>{const Ee=Ia(i.status?.ctxUsed??0),ct=Ia(i.status?.ctxMax??0);return r("status.ctxTooltip",{used:Ee,max:ct,pct:us.value})}),Us=F(()=>us.value>=80),Ji=F(()=>i.models?.find(Ee=>Ee.id===i.status?.modelId)),$e=F(()=>lv(Ji.value)),nt=F(()=>Ap(Ji.value)),Nt=F(()=>wm(Ji.value,i.thinking)),Zt=F(()=>nt.value.includes(Nt.value)?Nt.value:""),Nn=F(()=>Kee(Nt.value)),cs=F(()=>$e.value==="unsupported"||nt.value.length<=1),Fi=F(()=>{if(!Nn.value)return"";const Ee=(Ji.value?.supportEfforts?.length??0)>0,ct=Nt.value;return Ee&&ct!=="on"?r("composer.thinkingSuffixEffort",{level:ct}):r("composer.thinkingSuffix")});function di(Ee){cs.value||o("setThinking",O5(Ji.value,Ee))}function fi(Ee){return Ee==="on"?r("status.thinkingOn"):Ee==="off"?r("status.thinkingOff"):g3(Ee)}const Ks=F(()=>nt.value.map(Ee=>({value:Ee,label:fi(Ee)}))),Si=F(()=>i.planArmed===!0||i.planMode===!0),Vs=F(()=>i.swarmMode===!0),Zs=F(()=>i.goal?.status??i.activationBadges?.goal?.status??null),Wi=F(()=>Zs.value!==null&&Zs.value!=="complete"),xs=F(()=>i.goalMode?"goal":i.planArmed?"plan":null);function fo(){xs.value==="goal"?o("toggleGoal"):xs.value==="plan"&&o("togglePlan")}const yi=Z(null),Mo=Z(""),ho=F(()=>Mo.value?{textIndent:Mo.value}:void 0);let Gs=null;function ds(){const Ee=yi.value;Mo.value=Ee?`calc(${Ee.offsetWidth}px + var(--space-1-5) - var(--space-05))`:""}Qe(xs,async Ee=>{if(Gs?.disconnect(),Gs=null,!Ee){Mo.value="";return}await kt(),ds(),typeof ResizeObserver=="function"&&yi.value&&(Gs=new ResizeObserver(ds),Gs.observe(yi.value))},{immediate:!0}),An(()=>{Gs?.disconnect(),Gs=null});const Ho=[{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"}],cr=Z(null),ft=Z(""),Me=Z("");function Ze(Ee){const ct={};return Ee&&(ct["--composer-menu-desc-width"]=Ee),ct}const on=F(()=>({...Ze(ft.value),...Me.value?{left:Me.value}:{}}));function Mi(){const Ee=Li.value,ct=mi.value;if(!Ee||!ct){Me.value="";return}Me.value=`${Math.round(Ee.getBoundingClientRect().left-ct.getBoundingClientRect().left)}px`}function Wo(){const Ee=Lt.value,ct=mi.value;if(!Ee||!ct){$i.value="";return}$i.value=`${Math.round(ct.getBoundingClientRect().right-Ee.getBoundingClientRect().right)}px`}let bi=null;function Al(Ee){const ct=Number.parseFloat(Ee);return Number.isFinite(ct)?ct:0}function qo(Ee){return`${Ee.fontStyle||"normal"} ${Ee.fontWeight||"400"} ${Ee.fontSize} ${Ee.fontFamily}`}function Er(Ee){return Ee.letterSpacing==="normal"?0:Al(Ee.letterSpacing)}function dr(Ee,ct){if(!Ee)return 0;const dt=iBe(Ee,qo(ct),{letterSpacing:Er(ct)});return sBe(dt)}function fr(){const Ee=cr.value?.querySelector(".pd-desc");if(!Ee)return;const ct=getComputedStyle(Ee),dt=Math.max(0,...Ho.map(Wt=>dr(r(Wt.descKey),ct)));ft.value=dt>0?`${Math.ceil(dt)}px`:""}function po(){typeof window>"u"||(bi!==null&&window.cancelAnimationFrame(bi),kt(()=>{bi=window.requestAnimationFrame(()=>{bi=null,fr()})}))}Qe(l,()=>{po(),S.value&&D()},{immediate:!0}),pn(()=>{po(),document.fonts?.ready.then(po)}),An(()=>{bi!==null&&(window.cancelAnimationFrame(bi),bi=null)});function Gl(Ee){o("setPermission",Ee),vi()}const oe=F(()=>Ho.find(Ee=>Ee.mode===i.status?.permission)),Ae=F(()=>oe.value?r(oe.value.labelKey):""),Se=F(()=>oe.value?.icon??"hand"),Pe=F(()=>Ji.value?.provider??""),Ye=F(()=>!Pe.value||!i.models?.length?[]:i.models.filter(Ee=>Ee.provider===Pe.value)),Je=F(()=>(i.models?.length??0)>0),xt=F(()=>i.authReady===!1&&!Je.value),bt=F(()=>xt.value&&!(i.managedSignedIn??!1)),nn=F(()=>xt.value&&(i.managedSignedIn??!1)&&i.managedMembership==="free"),Ot=F(()=>new Set(i.starredIds??[]));function wn(Ee){return Ot.value.has(Ee)}const Qn=F(()=>i.models?.length?i.models.filter(Ee=>wn(Ee.id)&&Ee.provider!==Pe.value):[]),$t=Z(null);Qe(ni,async Ee=>{if(!Ee)return;await kt(),($t.value?.querySelector(".md-row.is-current")??$t.value?.querySelector(".md-row"))?.focus()});function Ht(Ee){if(Ee.key!=="ArrowDown"&&Ee.key!=="ArrowUp")return;const ct=Array.from($t.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(!ct.length)return;Ee.preventDefault();const dt=ct.indexOf(document.activeElement),Wt=Ee.key==="ArrowDown"?(dt+1)%ct.length:(dt-1+ct.length)%ct.length;ct[Wt]?.focus()}function Wn(Ee){o("selectModel",Ee),Bs()}return(Ee,ct)=>(b(),I("div",{class:De(["composer",{"drag-over":h(pe),expanded:g.value}]),onDragover:ct[19]||(ct[19]=(...dt)=>h(ve)&&h(ve)(...dt)),onDragleave:ct[20]||(ct[20]=(...dt)=>h(re)&&h(re)(...dt)),onDrop:ct[21]||(ct[21]=(...dt)=>h(se)&&h(se)(...dt))},[Gt.value?(b(),fe(kk,{key:0,media:Gt.value,"origin-img":Tt.value,onClose:ct[0]||(ct[0]=dt=>{Tt.value=null,h(ye)()})},null,8,["media","origin-img"])):ne("",!0),C("div",wBe,[h(ie).length>0?(b(),I("div",xBe,[C("div",{ref_key:"attScrollRef",ref:ke,class:De(["att-scroll",{"is-overflowing":it.value}])},[C("div",{ref_key:"attScrollContentRef",ref:Le,class:"att-scroll-content"},[Ie.value.length>0?(b(),I("div",{key:0,ref_key:"attMediaRowRef",ref:Ke,class:"att-row att-row-media"},[(b(!0),I(Be,null,yt(Ie.value,dt=>(b(),fe(DD,{key:dt.localId,kind:dt.kind,name:dt.name,url:dt.previewUrl,"file-id":dt.fileId,uploading:dt.uploading,error:dt.error,removable:"","remove-label":h(r)("composer.removeNamed",{name:dt.name}),onActivate:Wt=>yn(dt,Wt),onRemove:Wt=>h(Ne)(dt.localId)},null,8,["kind","name","url","file-id","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):ne("",!0),je.value.length>0?(b(),I("div",_Be,[(b(!0),I(Be,null,yt(je.value,dt=>(b(),fe(RD,{key:dt.localId,kind:"file",name:dt.name,"media-type":dt.mediaType,size:dt.size,uploading:dt.uploading,error:dt.error,removable:"","remove-label":h(r)("composer.removeNamed",{name:dt.name}),onActivate:Wt=>yn(dt),onRemove:Wt=>h(Ne)(dt.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):ne("",!0)],512)],2),it.value?(b(),I("span",SBe,B(h(r)("composer.attachmentCount",{n:h(ie).length})),1)):ne("",!0),h(ie).length>=2?(b(),fe(h(gn),{key:1,text:h(r)("composer.clearAll")},{default:he(()=>[V(h(rn),{class:"att-clear",size:"sm",label:h(r)("composer.clearAll"),onClick:h(J)},{default:he(()=>[V(h(Ce),{name:"trash"})]),_:1},8,["label","onClick"])]),_:1},8,["text"])):ne("",!0)])):ne("",!0),C("div",MBe,[h(S)?(b(),fe(hBe,{key:0,items:h(M),ranges:h(_),"active-index":h(N),query:$.value,onSelect:h(T),onHover:ct[1]||(ct[1]=dt=>N.value=dt)},null,8,["items","ranges","active-index","query","onSelect"])):ne("",!0),h(R)?(b(),fe(CBe,{key:1,items:h(W),"active-index":h(z),loading:h(G),onSelect:h(q),onHover:ct[2]||(ct[2]=dt=>z.value=dt)},null,8,["items","active-index","loading","onSelect"])):ne("",!0),V(ys,{name:"composer-menu-pop"},{default:he(()=>[Sn.value?(b(),I("div",{key:0,ref_key:"addMenuRef",ref:Ws,class:"add-menu",onClick:ct[4]||(ct[4]=It(()=>{},["stop"])),onKeydown:Cn},[C("div",{ref_key:"addScrollRef",ref:xi,class:"am-scroll",role:"menu",onScroll:Ni},[(b(!0),I(Be,null,yt(Ln.value,dt=>(b(),I("button",{key:dt.id,type:"button",class:"am-row",role:"menuitem",onMousedown:ct[3]||(ct[3]=It(()=>{},["prevent"])),onClick:Wt=>ws(dt)},[C("span",EBe,[V(h(Ce),{name:dt.icon,size:"sm"},null,8,["name"])]),C("span",TBe,B(h(r)(dt.nameKey)),1),dt.descKey?(b(),I("span",LBe,B(h(r)(dt.descKey)),1)):ne("",!0)],40,IBe))),128))],544),Qi.value?(b(),I("div",{key:0,class:"scroll-thumb",style:Vt({top:`${Qi.value.top}px`,height:`${Qi.value.height}px`})},null,4)):ne("",!0)],544)):ne("",!0)]),_:1}),C("div",NBe,[xs.value?(b(),I("span",{key:0,ref_key:"wmPillRef",ref:yi,class:"wm-pill"},[V(h(Ce),{name:xs.value==="goal"?"target":"file-edit",size:"sm"},null,8,["name"]),C("span",null,B(xs.value==="goal"?h(r)("status.goalLabel"):h(r)("status.planLabel")),1),V(h(rn),{class:"wm-x",size:"sm",label:h(r)("status.workModeDismiss"),tooltip:h(r)("status.workModeDismiss"),onMousedown:ct[5]||(ct[5]=It(()=>{},["prevent"])),onClick:fo},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],512)):ne("",!0),Bn(C("textarea",{ref_key:"textareaRef",ref:f,"onUpdate:modelValue":ct[6]||(ct[6]=dt=>ls(a)?a.value=dt:null),class:"ph",style:Vt(ho.value),placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!P.value,"aria-controls":P.value,"aria-activedescendant":O.value,onKeydown:Tn,onCompositionstart:Rt,onCompositionend:Ct,onInput:ee,onBlur:X},null,44,FBe),[[_o,h(a)]]),V(h(gn),{text:g.value?h(r)("composer.collapseTitle"):h(r)("composer.expandTitle")},{default:he(()=>[g.value||k.value?(b(),I("button",{key:0,class:"expand-btn",type:"button","aria-label":g.value?h(r)("composer.collapseTitle"):h(r)("composer.expandTitle"),onClick:m},[g.value?(b(),fe(h(Ce),{key:0,name:"collapse",size:"sm"})):(b(),fe(h(Ce),{key:1,name:"expand",size:"sm"}))],8,BBe)):ne("",!0)]),_:1},8,["text"])])]),Qt.value?(b(),I("input",{key:1,ref_key:"fileInputRef",ref:ce,type:"file",multiple:"",class:"file-input-hidden",onChange:ct[7]||(ct[7]=(...dt)=>h(Y)&&h(Y)(...dt))},null,544)):ne("",!0),C("div",{ref_key:"toolbarRef",ref:mi,class:"toolbar"},[C("div",{ref_key:"menuMeasureRef",ref:cr,class:"menu-measure","aria-hidden":"true"},[...ct[22]||(ct[22]=[C("span",{class:"pd-desc"},null,-1)])],512),C("div",$Be,[V(h(rn),{class:"composer-attach",size:"md",label:h(r)("composer.addMenu"),tooltip:h(r)("composer.addMenu"),"aria-haspopup":"menu","aria-expanded":Sn.value,onMousedown:ct[8]||(ct[8]=It(()=>{},["prevent"])),onClick:It(Mn,["stop"])},{default:he(()=>[V(h(Ce),{name:"plus"})]),_:1},8,["label","tooltip","aria-expanded"]),e.status?(b(),I("span",{key:0,ref_key:"permPillRef",ref:Li,class:De(["perm-pill",["perm-"+e.status.permission,{open:zn.value}]]),role:"button",tabindex:"0","aria-label":Ae.value,onClick:It(Hi,["stop"]),onKeydown:[qr(Hi,["enter"]),qr(It(Hi,["prevent"]),["space"])]},[V(h(Ce),{class:"perm-pill-icon",name:Se.value,size:"md"},null,8,["name"]),C("span",RBe,B(Ae.value),1)],42,DBe)):ne("",!0),V(ys,{name:"composer-menu-pop"},{default:he(()=>[zn.value&&e.status?(b(),I("div",{key:0,class:"perm-dropdown",style:Vt(on.value),role:"menu",onClick:ct[9]||(ct[9]=It(()=>{},["stop"]))},[(b(),I(Be,null,yt(Ho,dt=>C("button",{key:dt.mode,class:De(["pd-row",{"is-current":dt.mode===e.status.permission}]),role:"menuitem",onClick:Wt=>Gl(dt.mode)},[C("span",{class:"pd-icon",style:Vt({color:dt.color})},[V(h(Ce),{name:dt.icon,size:"md"},null,8,["name"])],4),C("span",OBe,[C("span",{class:"pd-name",style:Vt({color:dt.color})},B(h(r)(dt.labelKey)),5),C("span",PBe,B(h(r)(dt.descKey)),1)]),C("span",jBe,[dt.mode===e.status.permission?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)])],10,zBe)),64))],4)):ne("",!0)]),_:1}),Vs.value?(b(),I("span",HBe,[V(h(Ce),{class:"swarm-ic",name:"sparkles",size:"md"}),C("span",WBe,B(h(r)("status.swarmLabel")),1),V(h(rn),{class:"swarm-x",size:"sm",label:h(r)("status.swarmDismiss"),tooltip:h(r)("status.swarmDismiss"),onMousedown:ct[10]||(ct[10]=It(()=>{},["prevent"])),onClick:ct[11]||(ct[11]=It(dt=>o("toggleSwarm"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])])):ne("",!0)]),C("div",qBe,[Us.value?(b(),I("button",{key:0,class:"compact-chip",onClick:ct[12]||(ct[12]=It(dt=>o("compact"),["stop"]))},"/compact")):ne("",!0),V(h(gn),{text:qs.value},{default:he(()=>[e.status&&!e.hideContext?(b(),I("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":qs.value},[V(h(Oq),{pct:us.value},null,8,["pct"])],8,UBe)):ne("",!0)]),_:1},8,["text"]),e.status&&!bt.value&&!nn.value?(b(),I("button",{key:1,ref_key:"modelPillRef",ref:Lt,type:"button",class:De(["model-pill",{open:ni.value}]),"aria-haspopup":"menu","aria-expanded":ni.value,onClick:It(co,["stop"])},[C("span",VBe,B(e.status.model),1),Fi.value?(b(),I("span",ZBe,B(Fi.value),1)):ne("",!0),V(h(Ce),{class:"cv",name:"chevron-down",size:"sm"})],10,KBe)):e.status&&nn.value?(b(),I("button",{key:2,type:"button",class:"model-pill login-pill",onClick:ct[13]||(ct[13]=It(dt=>h(Cp)(),["stop"]))},[V(h(Ce),{name:"music",size:"sm"}),C("span",GBe,B(h(r)("sidebar.upgrade")),1)])):e.status&&bt.value?(b(),I("button",{key:3,type:"button",class:"model-pill login-pill",onClick:ct[14]||(ct[14]=It(dt=>o("login"),["stop"]))},[V(h(Ce),{name:"log-in",size:"sm"}),C("span",QBe,B(h(r)("login.action")),1)])):ne("",!0),e.working?(b(),fe(h(gn),{key:4,text:h(r)("composer.interruptTitle")},{default:he(()=>[C("button",{class:"stop","aria-label":h(r)("composer.interrupt"),onClick:ct[15]||(ct[15]=dt=>o("interrupt"))},[V(h(Ce),{name:"stop",size:"sm"})],8,YBe)]),_:1},8,["text"])):ne("",!0),V(h(gn),{text:as.value},{default:he(()=>[C("button",{class:De(["send",{"is-starting":e.starting}]),"aria-label":as.value,disabled:e.starting||!Kt.value,onClick:ct[16]||(ct[16]=dt=>mn())},[e.starting?(b(),fe(h(Bi),{key:0,size:"sm"})):(b(),fe(h(Ce),{key:1,name:"send",size:"sm"}))],10,JBe)]),_:1},8,["text"])]),V(ys,{name:"composer-menu-pop"},{default:he(()=>[ni.value&&e.status?(b(),I("div",{key:0,ref_key:"modelDropdownRef",ref:$t,class:"model-dropdown",style:Vt(So.value),role:"menu",onClick:ct[18]||(ct[18]=It(()=>{},["stop"])),onKeydown:Ht},[C("div",XBe,[Qn.value.length>0?(b(),I("div",e$e,B(h(r)("status.starredModels")),1)):ne("",!0),(b(!0),I(Be,null,yt(Qn.value,dt=>(b(),I("button",{key:dt.id,class:De(["md-row",{"is-current":dt.id===e.status.modelId}]),role:"menuitem",onClick:Wt=>Wn(dt.id)},[C("span",n$e,[dt.id===e.status.modelId?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)]),C("span",i$e,B(dt.displayName??dt.model),1),C("span",s$e,B(dt.provider),1),V(h(Ce),{class:"md-star",name:"star",size:"sm"})],10,t$e))),128)),Qn.value.length>0?(b(),I("div",o$e)):ne("",!0),Ye.value.length>0?(b(),I("div",r$e,B(Pe.value),1)):ne("",!0),(b(!0),I(Be,null,yt(Ye.value,dt=>(b(),I("button",{key:dt.id,class:De(["md-row",{"is-current":dt.id===e.status.modelId}]),role:"menuitem",onClick:Wt=>Wn(dt.id)},[C("span",a$e,[dt.id===e.status.modelId?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)]),C("span",u$e,B(dt.displayName??dt.model),1),wn(dt.id)?(b(),fe(h(Ce),{key:0,class:"md-star",name:"star",size:"sm"})):ne("",!0)],10,l$e))),128))]),Ye.value.length>0?(b(),I("div",c$e)):ne("",!0),C("div",d$e,[C("span",f$e,B(h(r)("status.thinkingLabel")),1),$e.value==="unsupported"?(b(),I("span",h$e,B(h(r)("status.modeNotSupported")),1)):nt.value.length>1?(b(),fe(h(wo),{key:1,"model-value":Zt.value,options:Ks.value,size:"xs","onUpdate:modelValue":di},null,8,["model-value","options"])):(b(),I("span",p$e,B(fi(nt.value[0]??Nt.value)),1))]),ct[23]||(ct[23]=C("div",{class:"md-divider"},null,-1)),C("div",g$e,B(h(r)("status.cacheNote")),1),ct[24]||(ct[24]=C("div",{class:"md-divider"},null,-1)),C("button",{class:"md-row md-row-more",role:"menuitem",onClick:ct[17]||(ct[17]=dt=>{Bs(),o("pickModel")})},[C("span",m$e,[V(h(Ce),{name:"list",size:"sm"})]),C("span",v$e,B(h(r)("status.moreModels")),1),V(h(Ce),{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],36)):ne("",!0)]),_:1})],512)]),Ee.$slots.footer?(b(),I("div",y$e,[En(Ee.$slots,"footer",{},void 0,!0)])):ne("",!0),C("div",{class:De(["drop-overlay",{show:h(pe)}]),"aria-hidden":"true"},[C("div",b$e,[V(h(Ce),{name:"file-plus",size:"lg"}),C("span",null,B(h(r)("composer.dropToAttach")),1)])],2)],34))}}),UD=vt(k$e,[["__scopeId","data-v-a4ef2d7c"]]),A$e={class:"goal-panel"},C$e={key:0,class:"goal-criterion"},w$e={class:"goal-criterion-label"},x$e=tt({__name:"GoalPanel",props:{goal:{},openFile:{type:Function}},setup(e){const{t}=Bt();return(n,i)=>(b(),I("div",A$e,[V(h(Kl),{text:e.goal.objective,"open-file":e.openFile},null,8,["text","open-file"]),e.goal.completionCriterion?(b(),I("div",C$e,[C("span",w$e,[V(h(Ce),{name:"check-list",size:"sm"}),Ue(" "+B(h(t)("status.goalDoneWhen")),1)]),V(h(Kl),{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,["text","open-file"])])):ne("",!0)]))}}),_$e=vt(x$e,[["__scopeId","data-v-cdb3e8b0"]]),S$e={class:"plan-panel"},M$e={key:0,class:"plan-review-row"},I$e={class:"plan-review-label"},E$e={key:1,class:"plan-review-row"},T$e={class:"plan-review-label"},L$e={class:"plan-review-feedback"},N$e={key:3,class:"plan-path-only"},F$e={class:"plan-path-hint"},B$e={key:1,class:"plan-empty"},$$e=tt({__name:"PlanPanel",props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.plan&&!t.plan.plan&&t.plan.path?t.plan.path:void 0);function s(){i.value&&t.openFile?.({path:i.value})}return(o,r)=>(b(),I("div",S$e,[e.plan?(b(),I(Be,{key:0},[e.plan.review?.selectedOption?(b(),I("div",M$e,[C("span",I$e,B(h(n)("tools.plan.selectedOption")),1),C("span",null,B(e.plan.review.selectedOption),1)])):ne("",!0),e.plan.review?.feedback?(b(),I("div",E$e,[C("span",T$e,B(h(n)("tools.plan.feedback")),1),C("span",L$e,B(e.plan.review.feedback),1)])):ne("",!0),e.plan.plan?(b(),fe(h(Kl),{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,["text","open-file"])):ne("",!0),i.value?(b(),I("div",N$e,[C("span",F$e,B(h(n)("tools.plan.pathOnlyHint")),1),V(h(jt),{variant:"ghost",size:"sm",class:"plan-path",onClick:s},{default:he(()=>[Ue(B(i.value),1)]),_:1})])):ne("",!0)],64)):(b(),I("div",B$e,[V(h(Ce),{name:"file-edit",size:"lg",class:"plan-empty-ico"}),C("span",null,B(e.planModeOn?h(n)("status.planEmptyArmed"):h(n)("status.planEmptyIdle")),1)]))]))}}),D$e=vt($$e,[["__scopeId","data-v-dea23306"]]),R$e={key:0,class:"qh-chip"},z$e={class:"qtitle"},O$e={class:"qbody"},P$e={class:"qopts"},j$e=["onClick"],H$e={class:"qopt-key"},W$e={class:"qopt-text"},q$e={class:"qopt-label"},U$e={key:0,class:"qopt-desc"},K$e={class:"qopt-label"},V$e=["placeholder"],Z$e={class:"qfoot"},G$e={class:"qbtns"},Q$e={class:"qhint"},Y$e=tt({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:i}=Bt(),s=t,o=Z(0),r=Z(!1);function l(){r.value&&(r.value=!1)}const a=F(()=>n.question.questions[o.value]),u=F(()=>n.question.questions.length);function c(){o.value>0&&o.value--}function d(){o.value<u.value-1&&o.value++}function f(K){const H=g.value[K];return H?H.kind==="multi"?H.optionIds.length>0:H.kind==="multiWithOther"?H.optionIds.length>0||H.otherText.trim().length>0:H.kind==="other"?H.text.trim().length>0:!0:!1}function p(){return f(a.value.id)}const g=Z({});function m(K){return K.recommended===!0?!0:/\b(?:recommended|recommend)\b|推荐/.test(`${K.label} ${K.description??""}`.toLowerCase())}function y(){const K={...g.value};let H=!1;for(const q of n.question.questions){if(K[q.id])continue;const X=q.options.filter(m);X.length!==0&&(K[q.id]=q.multiSelect?{kind:"multi",optionIds:X.map(ee=>ee.id)}:{kind:"single",optionId:X[0].id},H=!0)}H&&(g.value=K)}Qe(()=>n.question.questionId,()=>{o.value=0,r.value=!1,g.value={},A.value={}}),Qe(()=>n.question,()=>{o.value>=n.question.questions.length&&(o.value=0),y()},{immediate:!0,deep:!0});function w(K,H){const q=g.value[K];if(q&&q.kind==="single"&&q.optionId===H){const X={...g.value};delete X[K],g.value=X}else g.value={...g.value,[K]:{kind:"single",optionId:H}}}function k(K,H){const q=g.value[K],X=q&&(q.kind==="multi"||q.kind==="multiWithOther")?q.kind==="multi"?[...q.optionIds]:[...q.optionIds]:[],ee=X.indexOf(H);ee>=0?X.splice(ee,1):X.push(H);const ue=g.value[K],ie=ue&&ue.kind==="multiWithOther"?ue.otherText:"";ie?g.value={...g.value,[K]:{kind:"multiWithOther",optionIds:X,otherText:ie}}:g.value={...g.value,[K]:{kind:"multi",optionIds:X}}}const A=Z({}),v=Z(null);function x(K){const H=n.question.questions.find(X=>X.id===K),q=A.value[K]??"";if(H.multiSelect){const X=g.value[K],ee=X&&(X.kind==="multi"||X.kind==="multiWithOther")?X.kind==="multi"?[...X.optionIds]:[...X.optionIds]:[];g.value={...g.value,[K]:{kind:"multiWithOther",optionIds:ee,otherText:q}}}else g.value={...g.value,[K]:{kind:"other",text:q}}}function E(K){x(K),kt(()=>v.value?.focus())}function S(K,H){const q=g.value[K];return q?q.kind==="single"?q.optionId===H:q.kind==="multi"||q.kind==="multiWithOther"?q.optionIds.includes(H):!1:!1}function M(K){const H=g.value[K];return!!(H&&(H.kind==="other"||H.kind==="multiWithOther"))}function _(){return n.question.questions.every(K=>f(K.id))}const N=F(()=>n.busyKind==="answer"),D=F(()=>n.busyKind==="dismiss"),T=F(()=>!!n.busyKind);function $(){if(T.value||!_())return;const K={answers:g.value,method:"click"};s("answer",n.question.questionId,K)}function P(){T.value||s("dismiss",n.question.questionId)}const O=Z(0);Qe([o,()=>n.question.questionId],()=>{O.value=0});const{handleCompositionStart:R,handleCompositionEnd:W,isComposingKeyEvent:z}=Kr();function G(K){const H=(document.activeElement?.tagName??"").toLowerCase(),q=H==="input"||H==="textarea";if(K.metaKey||K.ctrlKey||K.altKey||T.value||z(K)||Ao.value>0)return;if(K.key==="Enter"){if(K.preventDefault(),r.value)return;o.value<u.value-1&&p()?d():_()&&$();return}if(q)return;if(K.key==="Escape"){if(Ao.value>0||K.defaultPrevented)return;K.preventDefault(),P();return}if(r.value)return;if(K.key==="ArrowDown"||K.key==="ArrowUp"){const ee=a.value,ue=ee.options.length+(ee.allowOther?1:0);if(ue===0)return;K.preventDefault();const ie=K.key==="ArrowDown"?1:-1,xe=Math.min(ue-1,Math.max(0,O.value+ie));if(xe===O.value)return;O.value=xe;const ce=ee.options[O.value];ce?ee.multiSelect||w(ee.id,ce.id):ee.allowOther&&!ee.multiSelect&&x(ee.id);return}if(K.key===" "&&a.value.multiSelect){K.preventDefault();const ee=a.value,ue=ee.options[O.value];ue?k(ee.id,ue.id):ee.allowOther&&x(ee.id);return}const X=parseInt(K.key,10);if(!isNaN(X)&&X>=1&&X<=9){K.preventDefault();const ee=a.value,ue=X-1,ie=ee.options[ue];ie&&(O.value=ue,ee.multiSelect?k(ee.id,ie.id):w(ee.id,ie.id))}}return pn(()=>document.addEventListener("keydown",G)),An(()=>document.removeEventListener("keydown",G)),(K,H)=>(b(),I("div",{class:De(["qcard",{minimized:r.value}])},[C("div",{class:De(["qh",{clickable:r.value}]),onClick:l},[u.value>1?(b(),I("span",R$e,B(o.value+1),1)):ne("",!0),C("span",z$e,B(a.value.question),1),V(h(rn),{class:"qmin",size:"sm",label:r.value?h(i)("question.expand"):h(i)("question.minimize"),tooltip:r.value?h(i)("question.expand"):h(i)("question.minimize"),onClick:H[0]||(H[0]=It(q=>r.value=!r.value,["stop"]))},{default:he(()=>[r.value?(b(),fe(h(Ce),{key:0,name:"chevron-up",size:"md"})):(b(),fe(h(Ce),{key:1,name:"minus",size:"md"}))]),_:1},8,["label","tooltip"]),V(h(rn),{class:"qclose",size:"sm",label:h(i)("question.dismiss"),tooltip:h(i)("question.dismiss"),disabled:T.value,onClick:It(P,["stop"])},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip","disabled"])],2),r.value?ne("",!0):(b(),I(Be,{key:0},[C("div",O$e,[a.value.body?(b(),fe(h(Kl),{key:0,text:a.value.body,class:"qmdbody"},null,8,["text"])):ne("",!0),C("div",P$e,[(b(!0),I(Be,null,yt(a.value.options,(q,X)=>(b(),I("label",{key:q.id,class:De(["qopt",{selected:S(a.value.id,q.id),highlighted:a.value.multiSelect&&X===O.value}]),onClick:It(ee=>{O.value=X,a.value.multiSelect?k(a.value.id,q.id):w(a.value.id,q.id)},["prevent"])},[C("span",H$e,B(X+1),1),C("span",{class:De(["qopt-glyph",a.value.multiSelect?"chk":"rad"])},null,2),C("span",W$e,[C("span",q$e,B(q.label),1),q.description?(b(),I("span",U$e,B(q.description),1)):ne("",!0)])],10,j$e))),128)),a.value.allowOther?(b(),I("label",{key:0,class:De(["qopt",{selected:M(a.value.id),highlighted:a.value.multiSelect&&O.value===a.value.options.length}]),onClick:H[6]||(H[6]=It(q=>{O.value=a.value.options.length,E(a.value.id)},["prevent"]))},[H[7]||(H[7]=C("span",{class:"qopt-key"},null,-1)),C("span",{class:De(["qopt-glyph",a.value.multiSelect?"chk":"rad"])},null,2),C("span",K$e,B(a.value.otherLabel??h(i)("question.otherDefault")),1),Bn(C("input",{ref_key:"otherInputEl",ref:v,"onUpdate:modelValue":H[1]||(H[1]=q=>A.value[a.value.id]=q),class:"other-input",type:"text",placeholder:a.value.otherLabel??h(i)("question.otherDefault"),onInput:H[2]||(H[2]=q=>x(a.value.id)),onFocus:H[3]||(H[3]=q=>x(a.value.id)),onCompositionstart:H[4]||(H[4]=(...q)=>h(R)&&h(R)(...q)),onCompositionend:H[5]||(H[5]=(...q)=>h(W)&&h(W)(...q))},null,40,V$e),[[_o,A.value[a.value.id]]])],2)):ne("",!0)])]),C("div",Z$e,[C("div",G$e,[o.value<u.value-1?(b(),fe(h(jt),{key:0,class:"qmain",size:"md",variant:"primary",disabled:!p(),onClick:d},{default:he(()=>[Ue(B(h(i)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(b(),fe(h(jt),{key:1,class:"qmain",size:"md",variant:"primary",disabled:!_(),loading:N.value,onClick:$},{default:he(()=>[Ue(B(h(i)("question.submit")),1)]),_:1},8,["disabled","loading"])),u.value>1?(b(),fe(h(jt),{key:2,size:"md",variant:"ghost",disabled:o.value===0||T.value,onClick:c},{default:he(()=>[Ue(B(h(i)("question.back")),1)]),_:1},8,["disabled"])):ne("",!0),V(h(jt),{size:"md",variant:"ghost",loading:D.value,disabled:T.value,onClick:P},{default:he(()=>[Ue(B(h(i)("question.dismiss")),1)]),_:1},8,["loading","disabled"])]),C("span",Q$e,B(h(i)("question.hint")),1)])],64))],2))}}),J$e=vt(Y$e,[["__scopeId","data-v-ca95f2cd"]]),X$e={class:"akind"},eDe={key:1,class:"apeek"},tDe={class:"ab"},nDe=["title"],iDe={class:"code-path"},sDe={key:2,class:"body-shell"},oDe={class:"shell-cmd"},rDe={key:0,class:"shell-cwd"},lDe={key:1,class:"shell-danger"},aDe={class:"code-path"},uDe={key:4,class:"body-chip"},cDe={class:"chip-label"},dDe={class:"chip-value"},fDe={key:0,class:"chip-detail"},hDe={key:5,class:"body-chip"},pDe={key:0,class:"chip-label"},gDe={class:"chip-value"},mDe={key:6,class:"body-chip"},vDe={class:"chip-label"},yDe={class:"chip-value"},bDe={key:0,class:"chip-detail"},kDe={key:7,class:"body-chip"},ADe={class:"chip-label"},CDe={class:"chip-value"},wDe={key:0,class:"chip-detail"},xDe={key:8,class:"body-todo"},_De={class:"todo-glyph"},SDe={key:0,class:"plan-opts"},MDe=["disabled","onClick"],IDe={class:"popt-key"},EDe={class:"popt-text"},TDe={class:"popt-label"},LDe={key:0,class:"popt-desc"},NDe={key:10,class:"body-generic"},FDe={class:"gen-text"},BDe={key:11,class:"feedback-wrap"},$De=["placeholder"],DDe={class:"feedback-hint"},RDe={class:"af"},zDe={class:"abtns"},ODe={key:0,class:"knum"},PDe={key:0,class:"knum"},jDe=tt({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean},openFile:{type:Function}},emits:["decide"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>{const q=n.block;return q.kind!=="plan_review"?null:{plan:q.plan,path:q.path,options:q.options??[]}}),r=Z(!1),l=Z(null),a=Z(!1);function u(){a.value=(l.value?.scrollTop??0)>0}function c(q){a.value=q.target.scrollTop>0}const d=Z(!1),f=F(()=>{const q=n.block.kind;return q==="plan_review"||q==="diff"||q==="file"});function p(){r.value&&(r.value=!1)}const g=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function m(){return g.includes(n.block.kind)?n.block.kind:"generic"}function y(){return s(`approval.title.${m()}`)}const w=F(()=>{const q=n.block;switch(q.kind){case"diff":case"file":case"fileop":return q.path;case"shell":return q.command;case"url":return q.url;case"search":return q.query;case"invocation":return q.name;case"generic":return q.summary;default:return""}}),k=Z(!1),A=Z(""),v=Z(null);function x(){n.busy||(k.value=!0,A.value="",setTimeout(()=>v.value?.focus(),0))}function E(){if(n.busy)return;const q=A.value.trim();o.value?$("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:q||void 0}):$("feedback",{decision:"rejected",feedback:q||void 0}),k.value=!1,A.value=""}function S(){n.busy||(k.value=!1,A.value="")}const{handleCompositionStart:M,handleCompositionEnd:_,isComposingKeyEvent:N}=Kr();function D(q){N(q)||(q.key==="Enter"&&!q.shiftKey?(q.preventDefault(),E()):q.key==="Escape"&&(q.preventDefault(),S()))}const T=Z(null);Qe(()=>n.busy,q=>{q||(T.value=null)});function $(q,X){n.busy||(T.value=q,i("decide",X))}function P(){$("approve",{decision:"approved"})}function O(){$("approveSession",{decision:"approved",scope:"session"})}function R(){$("reject",{decision:"rejected"})}function W(){$("approvePlan",{decision:"approved"})}function z(q){$(`option:${q}`,{decision:"approved",selectedLabel:q})}function G(){n.busy||x()}function K(){$("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function H(q){const X=(document.activeElement?.tagName??"").toLowerCase();if(X==="input"||X==="textarea"||q.metaKey||q.ctrlKey||q.altKey||Ao.value>0||q.defaultPrevented)return;if(k.value){q.key==="Escape"&&(q.preventDefault(),S());return}if(n.busy||r.value)return;const ee=o.value;if(ee){if(ee.options.length===0){q.key==="1"?(q.preventDefault(),W()):q.key==="2"?(q.preventDefault(),G()):q.key==="3"&&(q.preventDefault(),K());return}q.key==="1"&&ee.options[0]?(q.preventDefault(),z(ee.options[0].label)):q.key==="2"&&ee.options[1]?(q.preventDefault(),z(ee.options[1].label)):q.key==="3"&&ee.options[2]&&(q.preventDefault(),z(ee.options[2].label));return}q.key==="1"?(q.preventDefault(),P()):q.key==="2"?(q.preventDefault(),O()):q.key==="3"?(q.preventDefault(),R()):q.key==="4"&&(q.preventDefault(),x())}return pn(()=>document.addEventListener("keydown",H)),An(()=>document.removeEventListener("keydown",H)),vp(u),(q,X)=>(b(),I("div",{class:De(["appr",{minimized:r.value}])},[C("div",{class:De(["ah",{clickable:r.value}]),onClick:p},[C("span",X$e,B(y()),1),e.agentName&&!r.value?(b(),fe(h(Hl),{key:0,variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(h(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):ne("",!0),r.value&&w.value?(b(),I("span",eDe,B(w.value),1)):ne("",!0),f.value&&!r.value?(b(),fe(h(rn),{key:2,class:"aexpand",size:"sm",label:d.value?h(s)("approval.collapsePlan"):h(s)("approval.expandPlan"),tooltip:d.value?h(s)("approval.collapsePlan"):h(s)("approval.expandPlan"),onClick:X[0]||(X[0]=ee=>d.value=!d.value)},{default:he(()=>[V(h(Ce),{name:d.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label","tooltip"])):ne("",!0),V(h(rn),{class:"amin",size:"sm",label:r.value?h(s)("question.expand"):h(s)("question.minimize"),tooltip:r.value?h(s)("question.expand"):h(s)("question.minimize"),onClick:X[1]||(X[1]=It(ee=>r.value=!r.value,["stop"]))},{default:he(()=>[r.value?(b(),fe(h(Ce),{key:0,name:"chevron-up",size:"md"})):(b(),fe(h(Ce),{key:1,name:"minus",size:"md"}))]),_:1},8,["label","tooltip"])],2),r.value?ne("",!0):(b(),I(Be,{key:0},[C("div",tDe,[e.block.kind==="plan_review"&&e.block.path?(b(),I("button",{key:0,type:"button",class:"plan-path",title:e.block.path,onClick:X[2]||(X[2]=ee=>n.openFile?.({path:e.block.path,content:e.block.plan}))},B(e.block.path),9,nDe)):ne("",!0),e.block.kind==="diff"?(b(),I("div",{key:1,class:De(["body-code",{expanded:d.value}])},[C("div",iDe,B(e.block.path),1),e.block.diff.length>0?(b(),fe(al,{key:0,lines:e.block.diff,path:e.block.path},null,8,["lines","path"])):ne("",!0)],2)):e.block.kind==="shell"?(b(),I("div",sDe,[C("div",oDe,[X[6]||(X[6]=C("span",{class:"shell-dollar"},"$",-1)),Ue(" "+B(e.block.command),1)]),e.block.cwd?(b(),I("div",rDe,"cwd: "+B(e.block.cwd),1)):ne("",!0),e.block.danger?(b(),I("div",lDe,[V(h(Ce),{name:"alert-triangle",size:"sm",class:"shell-danger-ic"}),C("span",null,B(h(s)("approval.danger",{detail:e.block.danger})),1)])):ne("",!0)])):e.block.kind==="file"?(b(),I("div",{key:3,class:De(["body-code",{expanded:d.value}])},[C("div",aDe,B(e.block.path),1),V(al,{code:e.block.content,path:e.block.path},null,8,["code","path"])],2)):e.block.kind==="fileop"?(b(),I("div",uDe,[C("span",cDe,B(e.block.op),1),C("span",dDe,B(e.block.path),1),e.block.detail?(b(),I("span",fDe,B(e.block.detail),1)):ne("",!0)])):e.block.kind==="url"?(b(),I("div",hDe,[e.block.method?(b(),I("span",pDe,B(e.block.method),1)):ne("",!0),C("span",gDe,B(e.block.url),1)])):e.block.kind==="search"?(b(),I("div",mDe,[C("span",vDe,B(h(s)("approval.searchQueryLabel")),1),C("span",yDe,B(e.block.query),1),e.block.scope?(b(),I("span",bDe,B(h(s)("approval.searchScope",{scope:e.block.scope})),1)):ne("",!0)])):e.block.kind==="invocation"?(b(),I("div",kDe,[C("span",ADe,B(e.block.kind2),1),C("span",CDe,B(e.block.name),1),e.block.description?(b(),I("span",wDe,B(e.block.description),1)):ne("",!0)])):e.block.kind==="todo"?(b(),I("div",xDe,[(b(!0),I(Be,null,yt(e.block.items,(ee,ue)=>(b(),I("div",{key:ue,class:"todo-item"},[C("span",_De,B(ee.status==="done"||ee.status==="completed"?"✓":"○"),1),C("span",{class:De(["todo-title",{"todo-done":ee.status==="done"||ee.status==="completed"}])},B(ee.title),3)]))),128))])):e.block.kind==="plan_review"?(b(),I("div",{key:9,class:De(["body-plan-wrap",{scrolled:a.value}])},[C("div",{ref_key:"planBodyEl",ref:l,class:De(["body-plan",{expanded:d.value}]),onScroll:c},[V(h(Kl),{text:e.block.plan,"open-file":n.openFile},null,8,["text","open-file"])],34),o.value&&o.value.options.length>0?(b(),I("div",SDe,[(b(!0),I(Be,null,yt(o.value.options,(ee,ue)=>(b(),I("button",{key:ue,type:"button",class:"popt",disabled:e.busy,onClick:ie=>z(ee.label)},[C("span",IDe,B(ue+1),1),C("span",EDe,[C("span",TDe,B(ee.label),1),ee.description?(b(),I("span",LDe,B(ee.description),1)):ne("",!0)]),T.value===`option:${ee.label}`?(b(),fe(h(Bi),{key:0,size:"sm",class:"popt-spin"})):ne("",!0)],8,MDe))),128))])):ne("",!0)],2)):(b(),I("div",NDe,[C("span",FDe,B(e.block.summary),1)])),k.value?(b(),I("div",BDe,[Bn(C("textarea",{ref_key:"feedbackRef",ref:v,"onUpdate:modelValue":X[3]||(X[3]=ee=>A.value=ee),class:"feedback-ta",placeholder:h(s)("approval.feedbackPlaceholder"),rows:"2",onKeydown:D,onCompositionstart:X[4]||(X[4]=(...ee)=>h(M)&&h(M)(...ee)),onCompositionend:X[5]||(X[5]=(...ee)=>h(_)&&h(_)(...ee))},null,40,$De),[[_o,A.value]]),C("div",DDe,B(h(s)("approval.feedbackHint")),1)])):ne("",!0)]),C("div",RDe,[C("div",zDe,[k.value?(b(),I(Be,{key:0},[V(h(jt),{size:"md",variant:"danger-soft",loading:T.value==="feedback",disabled:e.busy,onClick:E},{default:he(()=>[Ue(B(h(s)("approval.feedbackSubmit")),1)]),_:1},8,["loading","disabled"]),V(h(jt),{size:"md",variant:"ghost",disabled:e.busy,onClick:S},{default:he(()=>[Ue(B(h(s)("approval.feedbackCancel")),1)]),_:1},8,["disabled"])],64)):o.value?(b(),I(Be,{key:1},[o.value.options.length===0?(b(),fe(h(jt),{key:0,class:"amain",size:"md",variant:"primary",loading:T.value==="approvePlan",disabled:e.busy,onClick:W},{default:he(()=>[X[7]||(X[7]=C("span",{class:"knum"},"1",-1)),Ue(B(h(s)("approval.approvePlan")),1)]),_:1},8,["loading","disabled"])):ne("",!0),V(h(jt),{size:"md",variant:"ghost",disabled:e.busy,onClick:G},{default:he(()=>[o.value.options.length===0?(b(),I("span",ODe,"2")):ne("",!0),Ue(B(h(s)("approval.revise")),1)]),_:1},8,["disabled"]),V(h(jt),{size:"md",variant:"ghost",loading:T.value==="rejectAndExit",disabled:e.busy,onClick:K},{default:he(()=>[o.value.options.length===0?(b(),I("span",PDe,"3")):ne("",!0),Ue(B(h(s)("approval.rejectAndExit")),1)]),_:1},8,["loading","disabled"])],64)):(b(),I(Be,{key:2},[V(h(jt),{class:"amain",size:"md",variant:"primary",loading:T.value==="approve",disabled:e.busy,onClick:P},{default:he(()=>[X[8]||(X[8]=C("span",{class:"knum"},"1",-1)),Ue(B(h(s)("approval.approve")),1)]),_:1},8,["loading","disabled"]),V(h(jt),{size:"md",variant:"ghost",loading:T.value==="approveSession",disabled:e.busy,onClick:O},{default:he(()=>[X[9]||(X[9]=C("span",{class:"knum"},"2",-1)),Ue(B(h(s)("approval.approveSession")),1)]),_:1},8,["loading","disabled"]),V(h(jt),{size:"md",variant:"ghost",loading:T.value==="reject",disabled:e.busy,onClick:R},{default:he(()=>[X[10]||(X[10]=C("span",{class:"knum"},"3",-1)),Ue(B(h(s)("approval.reject")),1)]),_:1},8,["loading","disabled"]),V(h(jt),{size:"md",variant:"ghost",disabled:e.busy,onClick:x},{default:he(()=>[X[11]||(X[11]=C("span",{class:"knum"},"4",-1)),Ue(B(h(s)("approval.feedback")),1)]),_:1},8,["disabled"])],64))])])],64))],2))}}),HDe=vt(jDe,[["__scopeId","data-v-cd852243"]]),WDe={class:"taskspane"},qDe={class:"tp-list"},UDe={key:0,class:"tp-empty"},KDe={class:"tp-main"},VDe=["aria-label","onClick"],ZDe=["aria-label"],GDe={class:"tp-name"},QDe={key:1,class:"tp-meta"},YDe={key:2,class:"tp-model"},JDe={key:3,class:"tp-model"},XDe={key:4,class:"tp-time"},eRe=tt({__name:"TasksPane",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=e,i={active:"tasks.emptyRecent",running:"tasks.emptyRunning",done:"tasks.emptyDone",all:"tasks.emptyTasks"},s=F(()=>i[n.filter??"all"]),o=t,{t:r}=Bt();function l(y){return!!(y.output&&y.output.length>0||y.meta)}function a(y){u(y)&&o("open",y.agentId??y.id)}function u(y){return y.kind==="subagent"||l(y)}function c(y){return typeof y.durationMs!="number"?"":Ma(y.durationMs,{h:r("status.timeUnitHour"),m:r("status.timeUnitMinute"),s:r("status.timeUnitSecond")})}function d(y){return y.state==="done"?r("tasks.stateDone"):y.state==="fail"?r("tasks.stateFail"):y.state==="cancelled"?r("tasks.stateCancelled"):r("tasks.running")}const f=an("modelDisplay"),p=an("subagentEffort");function g(y){if(y.kind==="subagent")return f?.(y.model)}function m(y){if(y.kind==="subagent")return p?.(y.thinkingEffort)}return(y,w)=>(b(),I("div",WDe,[C("div",qDe,[e.tasks.length===0?(b(),I("div",UDe,B(h(r)(s.value)),1)):(b(!0),I(Be,{key:1},yt(e.tasks,k=>(b(),I("div",{key:k.id,class:De(["tp-row",{fail:k.state==="fail",expandable:u(k)}])},[C("div",KDe,[u(k)?(b(),I("button",{key:0,type:"button",class:"tp-open","aria-label":k.name,onClick:A=>a(k)},null,8,VDe)):ne("",!0),C("span",{class:"tp-glyph",role:"img","aria-label":d(k)},[k.state==="run"?(b(),fe(h(hl),{key:0,status:"running"})):k.state==="done"?(b(),fe(h(Ce),{key:1,class:"tp-done",name:"circle-check",size:"sm"})):k.state==="cancelled"?(b(),fe(h(Ce),{key:2,class:"tp-cancelled",name:"close",size:"sm"})):(b(),fe(h(Ce),{key:3,class:"tp-fail",name:"close",size:"sm"}))],8,ZDe),C("span",GDe,B(k.name),1),k.meta?(b(),I("span",QDe,B(k.meta),1)):ne("",!0),g(k)?(b(),I("span",YDe,B(g(k)),1)):ne("",!0),m(k)?(b(),I("span",JDe,B(m(k)),1)):ne("",!0),c(k)?(b(),I("span",XDe,B(c(k)),1)):ne("",!0),k.state==="run"?(b(),fe(h(rn),{key:5,class:"tp-stop",size:"sm",label:h(r)("tasks.stop"),tooltip:h(r)("tasks.stop"),onClick:It(A=>o("cancel",k.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip","onClick"])):ne("",!0),u(k)?(b(),fe(h(Ce),{key:6,class:"tp-chevron",name:"chevron-right",size:"sm"})):ne("",!0)])],2))),128))])]))}}),tRe=vt(eRe,[["__scopeId","data-v-d5a5712a"]]),nRe={key:0,class:"sg-empty"},iRe={key:1,class:"sg-grid"},sRe=["aria-label","onClick"],oRe={class:"sg-top"},rRe={class:"sg-num"},lRe={class:"sg-name"},aRe={key:1,class:"sg-desc"},uRe={class:"sg-foot"},cRe={key:0,class:"sg-model"},dRe={class:"sg-status"},fRe={class:"sg-state"},hRe={key:0,class:"sg-time"},pRe=tt({__name:"SubagentGrid",props:{tasks:{},filter:{}},emits:["open","cancel"],setup(e,{emit:t}){const n=e,i={active:"tasks.emptyRecent",running:"tasks.emptyRunning",done:"tasks.emptyDone",all:"tasks.emptyTasks"},s=F(()=>i[n.filter??"all"]),o=t,{t:r}=Bt(),l=an("modelDisplay"),a=an("subagentEffort");function u(g){const m=[l?.(g.model),a?.(g.thinkingEffort)].filter(y=>y!==void 0);return m.length>0?m.join(" · "):void 0}function c(g){return r(g==="done"?"tasks.stateDone":g==="fail"?"tasks.stateFail":g==="cancelled"?"tasks.stateCancelled":"tasks.running")}function d(g){return typeof g.durationMs!="number"?"":Ma(g.durationMs,{h:r("status.timeUnitHour"),m:r("status.timeUnitMinute"),s:r("status.timeUnitSecond")})}function f(g,m){return String((g.swarmIndex??m)+1).padStart(2,"0")}function p(g){return!!g.agentId||!!(g.output&&g.output.length>0)}return(g,m)=>e.tasks.length===0?(b(),I("div",nRe,B(h(r)(s.value)),1)):(b(),I("div",iRe,[(b(!0),I(Be,null,yt(e.tasks,(y,w)=>(b(),I("div",{key:y.id,class:De(["sg-card",[`s-${y.state}`,{openable:p(y)}]])},[p(y)?(b(),I("button",{key:0,type:"button",class:"sg-open","aria-label":y.name,onClick:k=>o("open",y.agentId??y.id)},null,8,sRe)):ne("",!0),C("div",oRe,[C("span",rRe,B(f(y,w)),1),C("span",lRe,B(y.name),1)]),y.meta?(b(),I("div",aRe,B(y.meta),1)):ne("",!0),C("div",uRe,[u(y)?(b(),I("div",cRe,[V(h(Ce),{name:"robot",size:"sm"}),C("span",null,B(u(y)),1)])):ne("",!0),C("div",dRe,[C("span",fRe,[y.state==="run"?(b(),fe(h(hl),{key:0,status:"running"})):y.state==="done"?(b(),fe(h(Ce),{key:1,class:"sg-ic-done",name:"circle-check",size:"sm"})):(b(),fe(h(Ce),{key:2,name:"close",size:"sm"})),Ue(" "+B(c(y.state)),1)]),d(y)?(b(),I("span",hRe,[V(h(Ce),{name:"clock",size:"sm"}),Ue(B(d(y)),1)])):ne("",!0)])]),y.state==="run"?(b(),fe(h(rn),{key:2,class:"sg-cancel",size:"sm",label:h(r)("tasks.stop"),tooltip:h(r)("tasks.stop"),onClick:It(k=>o("cancel",y.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip","onClick"])):ne("",!0)],2))),128))]))}}),gRe=vt(pRe,[["__scopeId","data-v-f7e4b600"]]),mRe={class:"todo-card"},vRe={key:0,class:"tc-empty"},yRe={class:"tc-name"},bRe=tt({__name:"TodoCard",props:{todos:{}},setup(e){const t=e,{t:n}=Bt();return(i,s)=>(b(),I("div",mRe,[t.todos.length===0?(b(),I("div",vRe,[V(h(Ce),{name:"check-list",size:"lg",class:"tc-empty-ico"}),C("span",null,B(h(n)("tasks.emptyTodo")),1)])):ne("",!0),(b(!0),I(Be,null,yt(t.todos,(o,r)=>(b(),I("div",{key:r,class:De(["tc-row",`s-${o.status}`])},[C("span",{class:De(["tc-glyph",`g-${o.status}`]),"aria-hidden":"true"},[o.status==="in_progress"?(b(),fe(h(Bi),{key:0,size:"xs",class:"tc-spin"})):o.status==="done"?(b(),fe(h(Ce),{key:1,name:"circle-check",size:"md"})):ne("",!0)],2),C("span",yRe,B(o.title),1)],2))),128))]))}}),kRe=vt(bRe,[["__scopeId","data-v-f090f678"]]),$h=tt({__name:"WorkPill",props:{icon:{},active:{type:Boolean},label:{}},emits:["click"],setup(e,{emit:t}){const n=t;return(i,s)=>(b(),fe(h(DE),{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:s[0]||(s[0]=o=>n("click",o))},{default:he(()=>[V(h(Ce),{name:e.icon,size:"md"},null,8,["name"]),C("span",null,[En(i.$slots,"default")]),En(i.$slots,"meta")]),_:3},8,["active","aria-pressed","aria-label"]))}}),ARe={class:"wp-head-tab"},CRe={key:0,class:"wp-head-meta"},wRe={key:0,class:"wp-head-actions"},xRe=tt({__name:"WorkPanelHead",props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(b(),I(Be,null,[C("span",ARe,[V(h(Ce),{name:e.icon,size:"md"},null,8,["name"]),C("span",null,B(e.title),1),e.meta?(b(),I("span",CRe,B(e.meta),1)):ne("",!0)]),t.$slots.actions?(b(),I("span",wRe,[En(t.$slots,"actions",{},void 0,!0)])):ne("",!0)],64))}}),Dh=vt(xRe,[["__scopeId","data-v-82048a74"]]),_Re={class:"fc-label"},SRe=tt({__name:"FilterControl",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,s=F(()=>n.options.find(N=>N.value===n.modelValue)),o=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches?"lg":"md",r=Z(null),l=Z(!1);let a=0,u=null;async function c(){const N=r.value?.closest(".dock-work-head");if(!N)return;const D=N.querySelector(".wp-head-tab"),T=getComputedStyle(N),$=(parseFloat(T.columnGap)||0)*2,P=N.clientWidth-parseFloat(T.paddingLeft)-parseFloat(T.paddingRight)-$,O=D?.scrollWidth??0;if(!l.value){const W=r.value?.querySelector(".ui-seg");W!==null&&W.offsetWidth>0&&(a=W.offsetWidth)}const R=O+a>P;if(l.value=R,!R){await kt();const W=r.value?.querySelector(".ui-seg");W!==null&&W.offsetWidth>0&&(a=W.offsetWidth),l.value=O+a>P}}pn(()=>{const N=r.value?.closest(".dock-work-head");!N||typeof ResizeObserver!="function"||(u=new ResizeObserver(c),u.observe(N),c())}),Qe(l,N=>{!N&&d.value&&w()}),Qe(Ao,N=>{N>0&&d.value&&w()}),Qe(()=>n.options,async()=>{a=0,await kt(),c()},{flush:"post"});const d=Z(!1),f=Z(null);function p(){return f.value?.$el??null}const g=Z(null),m=Z({left:"0px",top:"0px"});async function y(){if(d.value){w();return}d.value=!0,await kt(),k(),A(),window.addEventListener("mousedown",E,!0),window.addEventListener("keydown",S,!0),window.addEventListener("resize",k),window.addEventListener("scroll",k,!0)}function w(N){d.value=!1,window.removeEventListener("mousedown",E,!0),window.removeEventListener("keydown",S,!0),window.removeEventListener("resize",k),window.removeEventListener("scroll",k,!0),N?.refocus&&p()?.focus()}function k(){const N=p();if(!N)return;const D=N.getBoundingClientRect(),T=g.value?.offsetHeight??0,$=getComputedStyle(document.documentElement),P=Number.parseFloat($.getPropertyValue("--space-2"))||0,O=Number.parseFloat($.getPropertyValue("--space-1"))||0,R=g.value?.offsetWidth??0,W=Math.min(D.left,Math.max(P,window.innerWidth-R-P));D.bottom+O+T<=window.innerHeight-P?m.value={left:`${W}px`,top:`${D.bottom+O}px`}:m.value={left:`${W}px`,bottom:`${window.innerHeight-D.top+O}px`}}function A(){const N=g.value;if(!N)return;(N.querySelector(".ui-menu-item.is-active")??N.querySelector(".ui-menu-item"))?.focus()}function v(){d.value||y()}function x(N){const D=N.relatedTarget;D&&(g.value?.contains(D)||p()?.contains(D))||w()}function E(N){const D=N.target;if(D){if(g.value?.contains(D)){N.stopImmediatePropagation();return}p()?.contains(D)||w()}}function S(N){N.key==="Escape"&&(N.preventDefault(),N.stopImmediatePropagation(),w({refocus:!0}))}function M(N){if(N.key!=="ArrowDown"&&N.key!=="ArrowUp")return;N.preventDefault();const D=Array.from(g.value?.querySelectorAll(".ui-menu-item")??[]);if(D.length===0)return;const T=D.indexOf(document.activeElement),$=N.key==="ArrowDown"?(T+1)%D.length:(T-1+D.length)%D.length;D[$]?.focus()}function _(N){i("update:modelValue",N),w({refocus:!0})}return Gn(()=>{u?.disconnect(),d.value&&w()}),(N,D)=>(b(),I("span",{ref_key:"root",ref:r,class:"filter-control"},[l.value?(b(),I(Be,{key:0},[V(h(DE),{ref_key:"triggerRef",ref:f,class:"fc-trigger","aria-haspopup":"menu","aria-expanded":d.value,onClick:y,onKeydown:[qr(It(v,["prevent"]),["down"]),qr(It(v,["prevent"]),["up"])],onFocusout:x},{default:he(()=>[s.value?.icon?(b(),fe(h(Ce),{key:0,name:s.value.icon,size:"sm"},null,8,["name"])):ne("",!0),C("span",null,B(s.value?.label),1),V(h(Ce),{class:"fc-chevron",name:"chevron-down",size:"sm"})]),_:1},8,["aria-expanded","onKeydown"]),(b(),fe(Wr,{to:"body"},[d.value?(b(),I("div",{key:0,ref_key:"menuBoxRef",ref:g,class:"fc-menu",style:Vt(m.value),onKeydown:M,onFocusout:x},[V(h(cl),null,{default:he(()=>[(b(!0),I(Be,null,yt(e.options,T=>(b(),fe(h(bn),{key:T.value,role:"menuitemradio",active:T.value===e.modelValue,"aria-checked":T.value===e.modelValue,size:h(o),onClick:$=>_(T.value)},{default:he(()=>[T.icon?(b(),fe(h(Ce),{key:0,name:T.icon,size:"sm","data-icon":T.icon},null,8,["name","data-icon"])):ne("",!0),C("span",_Re,B(T.label),1),T.value===e.modelValue?(b(),fe(h(Ce),{key:1,class:"fc-check",name:"check",size:"sm"})):ne("",!0)]),_:2},1032,["active","aria-checked","size","onClick"]))),128))]),_:1})],36)):ne("",!0)]))],64)):(b(),fe(h(wo),{key:1,"model-value":e.modelValue,options:e.options,size:"md","onUpdate:modelValue":D[0]||(D[0]=T=>i("update:modelValue",T))},null,8,["model-value","options"]))],512))}}),AM=vt(SRe,[["__scopeId","data-v-153e0d9c"]]),MRe={class:"dock-work-head"},IRe={key:0,class:"dock-workbar"},ERe={key:0,class:"dw-running"},TRe={key:0,class:"dw-running"},LRe={class:"dw-count"},NRe=tt({__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},planArmed:{type:Boolean},swarmMode:{type:Boolean},goalMode:{type:Boolean},activationBadges:{},models:{},authReady:{type:Boolean},managedSignedIn:{type:Boolean},managedMembership:{},starredIds:{},skills:{},goal:{},dockPanel:{},overlayOpen:{type:Boolean},sessionPlans:{},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","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","login","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const i=e,s=n,{t:o}=Bt(),{confirm:r,isConfirmOpen:l}=Hu(),a=F(()=>{switch(i.goal?.status){case"active":return o("status.goalStatusActive");case"paused":return o("status.goalStatusPaused");case"blocked":return o("status.goalStatusBlocked");case"complete":return o("status.goalStatusComplete");default:return""}}),u=F(()=>i.goal?Ma(i.goal.wallClockMs,{h:o("status.timeUnitHour"),m:o("status.timeUnitMinute"),s:o("status.timeUnitSecond")}):"");async function c(){await r({title:o("status.goalCancel"),message:o("status.goalCancelConfirm"),confirmLabel:o("status.goalCancelConfirmYes"),cancelLabel:o("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const d=[{id:"active",labelKey:"tasks.filterRecent",icon:"clock"},{id:"running",labelKey:"tasks.filterRunning",icon:"play"},{id:"done",labelKey:"tasks.filterDone",icon:"circle-check"},{id:"all",labelKey:"tasks.filterAll",icon:"list"}];function f(re,se){return(se.completedAt??se.createdAt??"").localeCompare(re.completedAt??re.createdAt??"")||(se.createdAt??"").localeCompare(re.createdAt??"")}function p(re,se){if(se==="all")return re;if(se==="running")return re.filter(J=>J.state==="run");if(se==="done")return re.filter(J=>J.state!=="run");const U=[];for(const J of re){if(J.state==="run")continue;let de=U.length;for(;de>0&&f(U[de-1],J)>0;)de--;U.splice(de,0,J),U.length>5&&(U.length=5)}return[...re.filter(J=>J.state==="run"),...U]}const g=Z("active"),m=Z("active"),y=F(()=>p(i.bashTasks,g.value)),w=F(()=>p(i.subagentTasks,m.value)),k=F(()=>d.map(re=>({value:re.id,label:o(re.labelKey),icon:re.icon}))),A=F({get:()=>g.value,set:re=>{g.value=re}}),v=F({get:()=>m.value,set:re=>{m.value=re}}),x=F(()=>(i.todos?.length??0)>0&&i.todoDoneCount===(i.todos?.length??0)),E=F(()=>i.bashTasks.some(re=>re.kind==="tool")),S=F(()=>E.value?"tasks.dockTasks":"tasks.dockBash"),M=F(()=>`${o("status.goalLabel")} ${a.value}`.trim()),_=F(()=>i.bashRunning>0?`${o(S.value)} ${i.bashRunning} ${o("tasks.running")}`:o(S.value)),N=F(()=>i.subagentRunning>0?`${o("tasks.dockSubagent")} ${i.subagentRunning} ${o("tasks.running")}`:o("tasks.dockSubagent")),D=F(()=>`${o("tasks.todoProgressTitle")} ${i.todoDoneCount}/${i.todos?.length??0}`),T=F(()=>Object.values(i.sessionPlans??{}).at(-1)),$=F(()=>{const re=T.value?.review?.state;return re?o(`tools.plan.review.${re}`):""});function P(){const re=T.value;re?.path&&i.openFile?.(re.plan?{path:re.path,content:re.plan}:{path:re.path})}const O=Z(null),R=F(()=>O.value?.anyPopupOpen===!0),W=F(()=>R.value||i.dockPanel!=null),z=Z(null),G=Z(null),K=Z(!1),H=Z("50%");function q(re,se){const U=se.currentTarget;if(U&&G.value){const J=U.getBoundingClientRect(),de=G.value.getBoundingClientRect();H.value=`${J.left+J.width/2-de.left}px`}s("toggle-dock-panel",re)}function X(re){return O.value?(O.value.loadForEdit(re),!0):!1}function ee(re){O.value?.loadAttachmentsForEdit(re)}function ue(){O.value?.focus()}const ie=()=>O.value?.isEmpty?.()??!1;function xe(re){if(!i.dockPanel)return;const se=re.target;se&&(z.value?.contains(se)||se instanceof Element&&se.closest(".ui-pill")||s("close-dock-panel"))}function ce(re){re.key!=="Escape"||re.repeat||QIe(re)||re.defaultPrevented||R.value||l.value||i.overlayOpen||(re.preventDefault(),re.stopImmediatePropagation(),s("close-dock-panel"))}const pe=Z(null),Ne=Z(!1);function te(){const re=pe.value;Ne.value=re?re.scrollTop>0:!1}function ye(re){Ne.value=re.target.scrollTop>0}let j=null;Qe(()=>i.dockPanel,async re=>{typeof document<"u"&&(document.removeEventListener("mousedown",xe,!0),document.removeEventListener("keydown",ce,!0),re&&(document.addEventListener("mousedown",xe,!0),document.addEventListener("keydown",ce,!0))),j?.disconnect(),j=null,re?(await kt(),te(),typeof ResizeObserver=="function"&&pe.value&&(j=new ResizeObserver(te),j.observe(pe.value))):Ne.value=!1},{immediate:!0});let Y=null;function ve(){const re=G.value?.offsetHeight??0;document.documentElement.style.setProperty("--dock-h",`${re}px`);const se=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--p-bp-sm"));K.value=(G.value?.offsetWidth??0)<(Number.isFinite(se)?se:640)}return pn(()=>{GIe(),!(typeof ResizeObserver!="function"||!G.value)&&(Y=new ResizeObserver(ve),Y.observe(G.value),ve())}),An(()=>{typeof document<"u"&&(document.removeEventListener("mousedown",xe,!0),document.removeEventListener("keydown",ce,!0)),Y?.disconnect(),Y=null,j?.disconnect(),j=null}),t({loadForEdit:X,loadAttachmentsForEdit:ee,focus:ue,anyPopupOpen:R,isEmpty:ie}),(re,se)=>(b(),I("div",{ref_key:"dockRef",ref:G,class:De(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":W.value,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":K.value}]]),onClick:se[36]||(se[36]=It(()=>{},["stop"]))},[V(ys,{name:"dock-panel"},{default:he(()=>[e.dockPanel?(b(),I("div",{ref_key:"workPanelRef",ref:z,key:e.dockPanel,class:De(["dock-work-panel",[`panel-${e.dockPanel}`,{"body-scrolled-up":Ne.value}]]),style:Vt({transformOrigin:`${H.value} 100%`}),onClick:se[11]||(se[11]=It(()=>{},["stop"]))},[C("div",MRe,[e.dockPanel==="bash"?(b(),fe(Dh,{key:0,icon:"terminal",title:h(o)(S.value),meta:`${e.bashRunning} ${h(o)("tasks.running")}`},{actions:he(()=>[V(AM,{modelValue:A.value,"onUpdate:modelValue":se[0]||(se[0]=U=>A.value=U),options:k.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="subagent"?(b(),fe(Dh,{key:1,icon:"sparkles",title:h(o)("tasks.dockSubagent"),meta:`${e.subagentRunning} ${h(o)("tasks.running")}`},{actions:he(()=>[V(AM,{modelValue:v.value,"onUpdate:modelValue":se[1]||(se[1]=U=>v.value=U),options:k.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="todos"?(b(),fe(Dh,{key:2,icon:x.value?"check-list":"list",title:h(o)("tasks.todoProgressTitle"),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,["icon","title","meta"])):e.dockPanel==="goal"?(b(),fe(Dh,{key:3,icon:"target",title:h(o)("status.goalLabel"),meta:u.value},{actions:he(()=>[e.goal?(b(),I(Be,{key:0},[e.goal.status==="active"?(b(),fe(h(rn),{key:0,size:"sm",label:h(o)("status.goalPause"),tooltip:h(o)("status.goalPause"),onClick:se[2]||(se[2]=It(U=>s("controlGoal","pause"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"pause",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),e.goal.status==="paused"||e.goal.status==="blocked"?(b(),fe(h(rn),{key:1,size:"sm",label:h(o)("status.goalResume"),tooltip:h(o)("status.goalResume"),onClick:se[3]||(se[3]=It(U=>s("controlGoal","resume"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"play",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),V(h(rn),{size:"sm",label:h(o)("status.goalCancel"),tooltip:h(o)("status.goalCancel"),onClick:It(c,["stop"])},{default:he(()=>[V(h(Ce),{name:"power",size:"md"})]),_:1},8,["label","tooltip"]),V(h(rn),{size:"sm",label:h(o)("tasks.closePanel"),tooltip:h(o)("tasks.closePanel"),onClick:se[4]||(se[4]=It(U=>s("close-dock-panel"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])],64)):ne("",!0)]),_:1},8,["title","meta"])):e.dockPanel==="plan"?(b(),fe(Dh,{key:4,icon:"file-edit",title:h(o)("status.planLabel"),meta:$.value},{actions:he(()=>[T.value?.path?(b(),fe(h(rn),{key:0,size:"sm",label:h(o)("tasks.openPanel"),tooltip:h(o)("tasks.openPanel"),onClick:It(P,["stop"])},{default:he(()=>[V(h(Ce),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),e.planArmed||e.planMode?(b(),fe(h(rn),{key:1,size:"sm",label:h(o)("status.workModeDismiss"),tooltip:h(o)("status.workModeDismiss"),onClick:se[5]||(se[5]=It(U=>s("togglePlan"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"power",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),V(h(rn),{size:"sm",label:h(o)("tasks.closePanel"),tooltip:h(o)("tasks.closePanel"),onClick:se[6]||(se[6]=It(U=>s("close-dock-panel"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])]),_:1},8,["title","meta"])):ne("",!0)]),C("div",{ref_key:"workBodyRef",ref:pe,class:"dock-work-body",onScroll:ye},[e.dockPanel==="bash"?(b(),fe(tRe,{key:0,tasks:y.value,filter:g.value,onCancel:se[7]||(se[7]=U=>s("cancelTask",U)),onOpen:se[8]||(se[8]=U=>s("openAgent",U))},null,8,["tasks","filter"])):e.dockPanel==="subagent"?(b(),fe(gRe,{key:1,tasks:w.value,filter:m.value,onCancel:se[9]||(se[9]=U=>s("cancelTask",U)),onOpen:se[10]||(se[10]=U=>s("openAgent",U))},null,8,["tasks","filter"])):e.dockPanel==="todos"?(b(),fe(kRe,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(b(),fe(_$e,{key:3,goal:e.goal,"open-file":e.openFile},null,8,["goal","open-file"])):e.dockPanel==="plan"?(b(),fe(D$e,{key:4,plan:T.value,"plan-mode-on":e.planMode,"open-file":e.openFile},null,8,["plan","plan-mode-on","open-file"])):ne("",!0)],544)],6)):ne("",!0)]),_:1}),e.hasDockWork||e.planMode||T.value?(b(),I("div",IRe,[e.goal?(b(),fe($h,{key:0,icon:"target",label:M.value,active:e.dockPanel==="goal",onClick:se[12]||(se[12]=U=>q("goal",U))},{meta:he(()=>[C("span",{class:De(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},B(a.value),3)]),default:he(()=>[Ue(B(h(o)("status.goalLabel"))+" ",1)]),_:1},8,["label","active"])):ne("",!0),e.planMode||T.value?(b(),fe($h,{key:1,icon:"file-edit",label:h(o)("status.planLabel"),active:e.dockPanel==="plan",onClick:se[13]||(se[13]=U=>q("plan",U))},{default:he(()=>[Ue(B(h(o)("status.planLabel")),1)]),_:1},8,["label","active"])):ne("",!0),e.bashTasks.length>0?(b(),fe($h,{key:2,icon:"terminal",label:_.value,active:e.dockPanel==="bash",onClick:se[14]||(se[14]=U=>q("bash",U))},{meta:he(()=>[e.bashRunning>0?(b(),I("span",ERe,[V(h(hl),{status:"running"}),Ue(B(e.bashRunning),1)])):ne("",!0)]),default:he(()=>[Ue(B(h(o)(S.value))+" ",1)]),_:1},8,["label","active"])):ne("",!0),e.subagentTasks.length>0?(b(),fe($h,{key:3,icon:"sparkles",label:N.value,active:e.dockPanel==="subagent",onClick:se[15]||(se[15]=U=>q("subagent",U))},{meta:he(()=>[e.subagentRunning>0?(b(),I("span",TRe,[V(h(hl),{status:"running"}),Ue(B(e.subagentRunning),1)])):ne("",!0)]),default:he(()=>[Ue(B(h(o)("tasks.dockSubagent"))+" ",1)]),_:1},8,["label","active"])):ne("",!0),(e.todos?.length??0)>0?(b(),fe($h,{key:4,icon:x.value?"check-list":"list",label:D.value,active:e.dockPanel==="todos",onClick:se[16]||(se[16]=U=>q("todos",U))},{meta:he(()=>[C("span",LRe,B(e.todoDoneCount)+"/"+B(e.todos?.length??0),1)]),default:he(()=>[Ue(B(h(o)("tasks.todoProgressTitle"))+" ",1)]),_:1},8,["icon","label","active"])):ne("",!0)])):ne("",!0),e.pendingQuestion?(b(),fe(J$e,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:se[17]||(se[17]=(U,J)=>s("answer",U,J)),onDismiss:se[18]||(se[18]=U=>s("dismiss",U))},null,8,["question","busy-kind"])):e.pendingApproval?(b(),fe(HDe,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,"open-file":e.openFile,onDecide:se[19]||(se[19]=U=>s("approval",e.pendingApproval.approvalId,U))},null,8,["block","agent-name","busy","open-file"])):(b(),fe(UD,{key:3,ref_key:"composerRef",ref:O,"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,"plan-armed":e.planArmed,"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:se[20]||(se[20]=U=>s("submit",U)),onSteer:se[21]||(se[21]=U=>s("steer",U)),onCommand:se[22]||(se[22]=U=>s("command",U)),onInterrupt:se[23]||(se[23]=U=>s("interrupt")),onSetPermission:se[24]||(se[24]=U=>s("setPermission",U)),onSetThinking:se[25]||(se[25]=U=>s("setThinking",U)),onTogglePlan:se[26]||(se[26]=U=>s("togglePlan")),onToggleSwarm:se[27]||(se[27]=U=>s("toggleSwarm")),onToggleGoal:se[28]||(se[28]=U=>s("toggleGoal")),onCreateGoal:se[29]||(se[29]=U=>s("createGoal",U)),onControlGoal:se[30]||(se[30]=U=>s("controlGoal",U)),onFocusGoal:se[31]||(se[31]=U=>s("focusGoal")),onCompact:se[32]||(se[32]=U=>s("compact")),onPickModel:se[33]||(se[33]=U=>s("pickModel")),onSelectModel:se[34]||(se[34]=U=>s("selectModel",U)),onLogin:se[35]||(se[35]=U=>s("login"))},null,8,["session-id","running","working","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","goal","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","starting"]))],2))}}),FRe=vt(NRe,[["__scopeId","data-v-e91fb967"]]),BRe=["aria-label","aria-hidden"],$Re={class:"toc-scroll"},DRe=["onClick"],RRe={class:"toc-label"},zRe=240,ORe=tt({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Z(null),r=Z(!0);let l=null;function a(){const c=o.value,d=c?.offsetParent;if(!c||!d)return;const f=c.getBoundingClientRect().left,p=d.getBoundingClientRect().right;r.value=p-f>=zRe}const u=F(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1);return Qe(u,c=>{l?.disconnect(),l=null,c&&kt(()=>{const d=o.value,f=d?.offsetParent;!d||!f||(typeof ResizeObserver<"u"&&(l=new ResizeObserver(a),l.observe(f)),a())})},{immediate:!0}),Gn(()=>{l?.disconnect(),l=null}),(c,d)=>u.value?(b(),I("nav",{key:0,ref_key:"navRef",ref:o,class:De(["conversation-toc",{"toc-clipped":!r.value||e.occluded}]),"aria-label":h(s)("conversation.toc"),"aria-hidden":r.value&&!e.occluded?void 0:!0},[C("div",$Re,[(b(!0),I(Be,null,yt(e.items,f=>(b(),I("button",{key:f.id,type:"button",class:De(["toc-row",{active:e.activeTurnId===f.id}]),onClick:p=>i("select",f.id)},[d[0]||(d[0]=C("span",{class:"toc-bar"},null,-1)),C("span",RRe,B(f.title),1)],10,DRe))),128))])],10,BRe)):ne("",!0)}}),PRe=vt(ORe,[["__scopeId","data-v-b8ba267a"]]),jRe={class:"tsearch-main"},HRe=["placeholder"],WRe={key:0,class:"tsearch-spin"},qRe=["inert"],URe={class:"tsearch-foot"},KRe={class:"tsearch-count",role:"status"},VRe={class:"tsearch-rings","aria-hidden":"true"},ZRe=800,GRe=400,QRe=1500,YRe=tt({__name:"TranscriptSearch",props:{pane:{},reveal:{},mobile:{type:Boolean,default:!1}},emits:["close"],setup(e,{expose:t,emit:n}){const i=e,s=n,{t:o}=Bt(),{handleCompositionStart:r,handleCompositionEnd:l,isComposingKeyEvent:a}=Kr(),u=Z(""),c=Z(!1),d=Z([]),f=Z(0),p=Z(null),g=F(()=>d.value.length),m=F(()=>u.value.trim()!==""&&!c.value),y=Z(!1),w=F(()=>{if(g.value===0)return o("conversation.search.noResults");const q={current:f.value+1,total:g.value};return y.value?o("conversation.search.resultsCapped",q):o("conversation.search.results",q)});let k=null,A=null,v=null,x=null,E=null,S=0;const M=Z([]);function _(){const q=i.pane,X=d.value[f.value];if(!q||X===void 0){M.value=[];return}const ee=q.getBoundingClientRect(),ue=[];for(const ie of X.getClientRects())ue.push({top:`${ie.top-ee.top+q.scrollTop}px`,left:`${ie.left-ee.left}px`,width:`${ie.width}px`,height:`${ie.height}px`});M.value=ue}function N(q,X){return q.type==="attributes"&&q.target===X?!0:D(q)}function D(q){const X=ee=>ee instanceof Element&&(ee.classList.contains("tsearch-rings")||ee.closest(".tsearch-rings")!==null);if(X(q.target))return!0;if(q.type==="childList"){const ee=[...q.addedNodes,...q.removedNodes];if(ee.length>0&&ee.every(X))return!0}return!1}function T(){M.value.length!==0&&(E!==null&&clearTimeout(E),E=setTimeout(()=>{E=null,_()},120))}function $(){return i.pane?.querySelector(".chat")??null}function P(){if(k!==null&&(clearTimeout(k),k=null),u.value.trim()===""){c.value=!1,O();return}c.value=!0,k=setTimeout(O,ZRe)}function O(q="first"){k!==null&&(clearTimeout(k),k=null),c.value=!1;const X=$();if(u.value.trim()===""||X===null){d.value=[],y.value=!1,f.value=0,z3(),_();return}const ee=d.value[f.value],ue=ee?.startContainer??null,ie=ee?.startOffset??0,xe=ose(X,u.value.trim()),ce=xe.ranges;if(y.value=xe.truncated,d.value=ce,ce.length===0){f.value=0,cy([],0),_();return}if(q!==!1){const Ne=R(ce);f.value=q==="backward"?(Ne-1+ce.length)%ce.length:Ne,W();return}const pe=ue!==null?ce.findIndex(Ne=>Ne.startContainer===ue&&Ne.startOffset===ie):-1;f.value=pe>=0?pe:R(ce),cy(ce,f.value),_()}function R(q){const X=i.pane?.getBoundingClientRect().top??0,ee=q.findIndex(ue=>{const ie=ue.getClientRects(),xe=ie[ie.length-1];return xe!==void 0&&xe.bottom>=X});return ee===-1?0:ee}function W(){const q=d.value[f.value];cy(d.value,f.value),q!==void 0&&i.reveal(q),_()}function z(q){g.value!==0&&(f.value=(f.value+q+g.value)%g.value,W())}function G(q){if(q.key==="Enter"&&!a(q)){if(q.preventDefault(),k!==null){O(q.shiftKey?"backward":"first");return}z(q.shiftKey?-1:1)}}function K(q){q.key==="Escape"&&(a(q)||(q.preventDefault(),q.stopPropagation(),s("close")))}function H(){const q=p.value;q&&(q.focus(),q.select())}return t({focusInput:H}),pn(()=>{kt(()=>p.value?.focus()),i.pane&&typeof MutationObserver=="function"&&(v=new MutationObserver(X=>{if(u.value.trim()!==""&&!X.every(ee=>N(ee,i.pane))&&k===null){if(Date.now()-S>=QRe){S=Date.now(),A!==null&&(clearTimeout(A),A=null),O(!1);return}A!==null&&clearTimeout(A),A=setTimeout(()=>{A=null,k===null&&(S=Date.now(),O(!1))},GRe)}}),v.observe(i.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),i.pane?.addEventListener("scroll",T,{passive:!0});const q=[i.pane,i.pane?.querySelector(".content-wrap")??null];if(typeof ResizeObserver=="function"){x=new ResizeObserver(()=>_());for(const X of q)X&&x.observe(X)}}),An(()=>{k!==null&&clearTimeout(k),A!==null&&clearTimeout(A),E!==null&&clearTimeout(E),v?.disconnect(),v=null,x?.disconnect(),x=null,i.pane?.removeEventListener("scroll",T),z3()}),(q,X)=>(b(),I("div",{class:De(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:K},[C("div",jRe,[V(h(Ce),{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),Bn(C("input",{ref_key:"inputRef",ref:p,"onUpdate:modelValue":X[0]||(X[0]=ee=>u.value=ee),type:"text",class:"tsearch-input",placeholder:h(o)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:P,onKeydown:G,onCompositionstart:X[1]||(X[1]=(...ee)=>h(r)&&h(r)(...ee)),onCompositionend:X[2]||(X[2]=(...ee)=>h(l)&&h(l)(...ee))},null,40,HRe),[[_o,u.value]]),c.value?(b(),I("span",WRe,[V(h(Bi),{size:"sm",label:h(o)("conversation.search.searching")},null,8,["label"])])):ne("",!0),X[6]||(X[6]=C("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),V(h(rn),{class:"tsearch-close",size:"sm",label:h(o)("conversation.search.close"),tooltip:h(o)("conversation.search.close"),onClick:X[3]||(X[3]=ee=>s("close"))},{default:he(()=>[V(h(Ce),{name:"close"})]),_:1},8,["label","tooltip"])]),C("div",{class:De(["tsearch-foot-wrap",{open:m.value}]),inert:!m.value},[C("div",URe,[V(h(rn),{size:"sm",label:h(o)("conversation.search.previous"),tooltip:h(o)("conversation.search.previous"),disabled:g.value===0,onClick:X[4]||(X[4]=ee=>z(-1))},{default:he(()=>[V(h(Ce),{name:"arrow-up"})]),_:1},8,["label","tooltip","disabled"]),V(h(rn),{size:"sm",label:h(o)("conversation.search.next"),tooltip:h(o)("conversation.search.next"),disabled:g.value===0,onClick:X[5]||(X[5]=ee=>z(1))},{default:he(()=>[V(h(Ce),{name:"arrow-down"})]),_:1},8,["label","tooltip","disabled"]),C("span",KRe,B(w.value),1)])],10,qRe),e.pane?(b(),fe(Wr,{key:0,to:e.pane},[C("div",VRe,[(b(!0),I(Be,null,yt(M.value,(ee,ue)=>(b(),I("div",{key:ue,class:"tsearch-ring",style:Vt(ee)},null,4))),128))])],8,["to"])):ne("",!0)],34))}}),JRe=vt(YRe,[["__scopeId","data-v-26f3fed5"]]),XRe="/assets/k3_doodle1-27EZ2HSw.riv",eze={class:"doodle-host"},tze={key:0,class:"doodle-fallback"},nze=tt({__name:"KimiDoodle",setup(e){const t=Z(!1),n=Z(null),i=rv();let s=null,o=null;return pn(async()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches)try{let r=function(){const m=f.stateMachineNames[0];if(!m)return;const y=(f.stateMachineInputs(m)??[]).find(w=>w.name==="light/dark");y&&(y.value=i.value?1:0)};const[{Rive:l,RuntimeLoader:a},u,c]=await Promise.all([ns(()=>import("./rive-CeXCFBdn.js").then(m=>m.r),__vite__mapDeps([10,3])),ns(()=>import("./rive-BxcgqsjB.js"),[]).then(m=>m.default),ns(()=>import("./rive_fallback-ByshBW-N.js"),[]).then(m=>m.default)]),d=n.value;if(!d)return;a.setWasmUrl(u),a.setWasmFallbackUrl(c);const f=new l({canvas:d,src:XRe,autoplay:!0,onLoad(){const m=f.stateMachineNames[0];m&&f.play(m),requestAnimationFrame(()=>{n.value&&(r(),f.resizeDrawingSurfaceToCanvas(),o=vL(f,d),t.value=!0)})}}),p=Qe(i,r),g=()=>f.resizeDrawingSurfaceToCanvas();window.addEventListener("resize",g),s=()=>{o?.(),o=null,p(),window.removeEventListener("resize",g),f.cleanup()}}catch{}}),Gn(()=>{s?.(),s=null}),(r,l)=>(b(),I("div",eze,[t.value?ne("",!0):(b(),I("div",tze,[En(r.$slots,"fallback",{},void 0,!0)])),C("canvas",{ref_key:"canvasRef",ref:n,class:De(["doodle-canvas",{ready:t.value}]),role:"img","aria-label":"Kimi"},null,2)]))}}),ize=vt(nze,[["__scopeId","data-v-694a2ad0"]]),sze={class:"empty-hint"},oze={class:"empty-hint-title"},rze={key:1,class:"empty-hint-title is-starting"},lze={key:2,class:"empty-hint-text"},aze={key:0,class:"upgrade-banner"},uze={class:"upgrade-banner-text"},cze={class:"ws-bar"},dze={key:0,class:"ws-anchor"},fze=["aria-expanded"],hze={class:"ws-chip-name"},pze={class:"ws-caption"},gze=["onClick"],mze={class:"ws-info"},vze={class:"ws-name"},yze={class:"ws-path"},bze=["aria-label"],kze={key:0,class:"undo-toast",role:"status","aria-live":"polite"},Aze={class:"undo-toast-text"},Cze=48,Rh=80,CM=1e3,wze=420,xze=3e3,_ze=5e3,Sze=1e4,Mze=2500,Ize=tt({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},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:{},turnError:{},turnRetry:{},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:i}=Bt(),s=e,o=n,r=Z(!1),l=Z(!1),a=Z(null),u=F(()=>s.workspaces?.find(we=>we.id===s.activeWorkspaceId)?.name??s.workspaceName??""),c=F(()=>(s.workspaces?.length??0)>0),d=F(()=>s.authReady===!1&&(s.models?.length??0)===0&&s.managedSignedIn===!0&&s.managedMembership==="free"),f=F(()=>kse(s.workspaces??[],s.activeWorkspaceId));function p(ge){if(r.value){r.value=!1;return}const we=ge.currentTarget?.closest(".ws-anchor"),Ge=we?.closest(".panes");if(we instanceof HTMLElement&&Ge instanceof HTMLElement){const Ft=we.getBoundingClientRect(),sn=Ge.getBoundingClientRect(),fn=sn.bottom-Ft.bottom-4,qn=Ft.top-sn.top-4;l.value=qn>fn;const Ai=Math.max(0,Math.floor(l.value?qn:fn));a.value=`min(calc(var(--space-8) * 10), ${Ai}px)`}else l.value=!1,a.value=null;r.value=!0}function g(ge){r.value=!1,ge!==s.activeWorkspaceId&&o("selectWorkspace",ge)}lr(un.contentAlign);const m=Z(null),y=Z(null),w=Z(null),k=Z(!1);let A=null;function v(ge,we){const Ge=w.value??y.value;return!Ge||Ge.loadForEdit(ge)===!1?!1:(Ge.loadAttachmentsForEdit(we??[]),!0)}function x(){k.value=!0,A!==null&&clearTimeout(A),A=setTimeout(()=>{A=null,k.value=!1},2e3)}const E=F(()=>s.tasks.filter(ge=>ge.kind==="bash"||ge.kind==="tool"&&!ge.id.startsWith("question-"))),S=F(()=>s.tasks.filter(ge=>ge.kind==="subagent"&&ge.runInBackground)),M=F(()=>E.value.filter(ge=>ge.state==="run").length),_=F(()=>S.value.filter(ge=>ge.state==="run").length);function N(ge){const we=s.tasks,Ge=we.find(sn=>sn.id===ge)??we.find(sn=>sn.parentToolCallId===ge);if(Ge?.agentId)return Ge.agentId;const Ft=we.filter(sn=>sn.kind==="subagent"&&!sn.parentToolCallId&&sn.agentId);if(Ft.length===1)return Ft[0].agentId}Pn("resolveAgentTaskId",N);const D=an("modelDisplay"),T=an("subagentEffort");function $(ge,we){const Ge=we??N(ge);if(Ge===void 0)return;const Ft=s.tasks.find(qn=>qn.agentId===Ge||qn.id===Ge),sn=D?.(Ft?.model),fn=T?.(Ft?.thinkingEffort);if(!(sn===void 0&&fn===void 0))return{display:sn,effort:fn}}Pn("resolveAgentModel",$),Pn("pinScroll",ur);const P=F(()=>(s.todos??[]).filter(ge=>ge.status==="done").length),O=F(()=>s.goal!=null||E.value.length>0||S.value.length>0||(s.todos?.length??0)>0),R=Z(null),W=F(()=>s.gitInfo?s.changes?.length??0:0);function z(ge){R.value=R.value===ge?null:ge}function G(){R.value=null}function K(){s.goal&&(R.value="goal")}Qe(()=>[s.goal,E.value.length,S.value.length,s.todos?.length,s.planMode,s.sessionPlans],()=>{const ge=R.value;if(ge===null)return;ge==="goal"&&s.goal!=null||ge==="bash"&&E.value.length>0||ge==="subagent"&&S.value.length>0||ge==="todos"&&(s.todos?.length??0)>0||ge==="plan"&&(s.planMode===!0||Object.keys(s.sessionPlans??{}).length>0)||G()});function H(ge){if(ge.role==="compaction")return i("conversation.compactedPlain");if(ge.role==="user"){if(ge.skillActivation)return`/${ge.skillActivation.name}`;if(ge.pluginCommand)return`/${ge.pluginCommand.pluginId}:${ge.pluginCommand.commandName}`;const Ge=ge.text.trim().replaceAll(/\s+/g," ");return Ge.length>0?Ge:"user"}const we=(ge.text||ge.thinking||"").trim().replaceAll(/\s+/g," ");return we.length>0?we:(ge.tools?.length??0)>0?`${ge.tools.length} tools`:"kimi"}const q=F(()=>s.turns.filter(ge=>ge.role==="user").map((ge,we)=>({id:ge.id,role:ge.role,no:we+1,title:H(ge)}))),X=Z(null);function ee(){const ge=J.value;if(!ge)return;const we=q.value;if(we.length===0)return;if(He()<=Rh){X.value=we[we.length-1].id;return}if(ie||ue===null){const fn=ge.scrollTop,qn=ge.getBoundingClientRect().top,Ai=[];for(const Qs of ge.querySelectorAll(".turn-anchor[data-turn-id]")){const Vu=Qs.dataset.turnId;Vu&&Ai.push({id:Vu,top:Qs.getBoundingClientRect().top-qn+fn})}ue=Ai,ie=!1}const Ge=new Set(we.map(fn=>fn.id)),Ft=ge.scrollTop+ge.clientHeight/2;let sn=null;for(const fn of ue)Ge.has(fn.id)&&fn.top<=Ft&&(sn=fn.id);X.value=sn??we[0].id}let ue=null,ie=!0;function xe(){ie=!0}let ce=0;function pe(){ce||(ce=vi(()=>{ce=0,ee()}))}const Ne=Z(!1);let te=0;function ye(){te||(te=vi(()=>{te=0,Y()}))}function j(){ye(),xe()}function Y(){const ge=J.value,we=!s.mobile&&ge?ge.closest(".con")?.querySelector(".conversation-toc"):null,Ge=we?.querySelector(".toc-bar");let Ft=!1;if(ge&&we&&Ge){const sn=Ge.getBoundingClientRect(),fn=we.getBoundingClientRect(),qn=sn.left+sn.width/2;Ft=Array.from(ge.querySelectorAll(".table-node-wrapper")).some(Ai=>{const Qs=Ai.getBoundingClientRect();return Qs.left<=qn&&qn<=Qs.right&&Qs.top<fn.bottom&&Qs.bottom>fn.top})}Ne.value!==Ft&&(Ne.value=Ft)}const ve=F(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),re=F(()=>{const ge=ve.value;if(ge)return s.pendingQuestionActions?.[ge.questionId]}),se=F(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),U=F(()=>{const ge=se.value;return ge?!!s.pendingApprovalActions?.[ge.approvalId]:!1}),J=Z(null),de=Z(null),me=Z(0),Ie=Z(0),je=Z(!1),ke=Z(null);let Le=null;function it(){if(s.turns.length!==0){if(je.value){ke.value?.focusInput();return}Le=document.activeElement,je.value=!0}}function Fe(){je.value=!1,kt(()=>{Le instanceof HTMLElement&&Le.isConnected&&Le.focus(),Le=null})}Qe(()=>s.turns.length===0&&!s.sessionLoading,ge=>{ge&&je.value&&Fe()});const Re=F(()=>({"--panes-scrollbar-width":`${me.value}px`})),Ke=F(()=>({"--chat-dock-height":`${Ie.value+Cze}px`}));function ht(ge){return ge instanceof HTMLElement?ge:ge&&"$el"in ge&&ge.$el instanceof HTMLElement?ge.$el:null}let ot=0;function gt(){ot||(ot=vi(()=>{ot=0;const ge=J.value,we=ge?Math.max(0,ge.offsetWidth-ge.clientWidth):0;we!==me.value&&(me.value=we);const Ge=de.value?.offsetHeight??0;Ge!==Ie.value&&(Ie.value=Ge)}))}function Tt(ge){const we=ht(ge);we!==J.value&&(J.value=we,we&&fr())}function yn(ge){const we=ht(ge);we!==de.value&&(de.value=we??null,ge&&"loadForEdit"in ge&&typeof ge.loadForEdit=="function"&&"focus"in ge&&typeof ge.focus=="function"?w.value={loadForEdit:ge.loadForEdit.bind(ge),loadAttachmentsForEdit:"loadAttachmentsForEdit"in ge&&typeof ge.loadAttachmentsForEdit=="function"?ge.loadAttachmentsForEdit.bind(ge):()=>{},focus:ge.focus.bind(ge),get anyPopupOpen(){return"anyPopupOpen"in ge&&ge.anyPopupOpen===!0},isEmpty:"isEmpty"in ge&&typeof ge.isEmpty=="function"?ge.isEmpty.bind(ge):void 0}:w.value=null,dr())}const Gt=Z(!0),Kt=Z(!1),mn=Z(!1);let _n=null;function He(){const ge=J.value;return ge?yi-ge.scrollTop-Mo:0}let st=0,Ve=0,Rt=0,Ct=0,Fn=0,Tn=0,as=0;function Qt(){return Date.now()<Ve}function ni(){ye(),mn.value=!0,_n&&clearTimeout(_n),_n=setTimeout(()=>{mn.value=!1,_n=null},900);const ge=J.value;if(!ge)return;const we=ge.scrollTop;if(ri()){st=we;return}if(performance.now()-Rt<100){st=we;return}const Ge=He();if(Qt()){Gt.value=!0,Kt.value=!1,st=we;return}we<st-1&&Ge>1?ge.scrollHeight-we-ge.clientHeight>1&&(Gt.value=!1,Kt.value=!0):Ge<=Rh&&we>st+1&&Date.now()>=Ct&&(Gt.value=!0,Kt.value=!1),st=we,pe()}function zn(ge=!1){const we=J.value;Gt.value=!0,Kt.value=!1,$i(),we&&(!ge&&performance.now()<Fn||(ge?mi():we.scrollTop=Math.max(we.scrollTop,yi),st=we.scrollTop))}let Sn=0;function mi(ge=320){const we=J.value;if(!we)return;if(Sn&&(Mn(Sn),Sn=0),typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){we.scrollTop=we.scrollHeight,st=we.scrollTop;return}const Ge=we.scrollTop,Ft=performance.now();Rt=Ft,Fn=Ft+ge+wze;const sn=()=>{Sn=0;const fn=Math.min(1,(performance.now()-Ft)/ge),qn=1-Math.pow(1-fn,3);we.scrollTop=Ge+(we.scrollHeight-Ge)*qn,st=we.scrollTop,fn<1?Sn=vi(sn):Fn=0};Sn=vi(sn)}function Ws(ge,we){return(we.closest("[inert]")?.closest(".tool-group, .activity-run, .turn-fold")??we).getBoundingClientRect().top-ge.getBoundingClientRect().top+ge.scrollTop}function Li(ge,we){const Ge=Array.from(ge.querySelectorAll(".turn-anchor[data-turn-id], [data-scroll-anchor-id]")).map(fn=>({node:fn,top:Ws(ge,fn)})),Ft=Ge.findIndex(fn=>fn.top>=we),sn=Ft<0?Math.max(0,Ge.length-1):Ft;return Ge.slice(sn,sn+2).flatMap(fn=>{const qn=fn.node.dataset.scrollAnchorId,Ai=qn??fn.node.dataset.turnId;return Ai?[{kind:qn?"tool":"turn",id:Ai,top:fn.top}]:[]})}const Lt=new Map;function xi(ge,we){for(const Ge of we.anchors){const Ft=Ge.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",sn=ge.querySelector(`[${Ft}="${Fs(Ge.id)}"]`);if(sn)return Ws(ge,sn)-Ge.top}return ge.scrollHeight-we.oldHeight}function Qi(ge,we,Ge=ge.scrollTop){return ge.scrollTop=Ge+xi(ge,we),st=ge.scrollTop,ge.scrollTop}async function ci(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||ds.value||!s.hasMoreMessages)return;const ge=s.sessionId,we=J.value,Ge=we?.scrollTop??0,Ft={anchors:we?Li(we,Ge):[],oldHeight:we?.scrollHeight??0};Ho(ge,!0),ft();try{if(await kt(),await s.loadOlderMessages(ge),await kt(),s.sessionId!==ge){Lt.set(ge,Ft);return}const sn=J.value;if(!sn)return;Qi(sn,Ft),Lt.delete(ge)}finally{Ho(ge,!1)}}function Fs(ge){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(ge):ge.replaceAll(/["\\]/g,"\\$&")}let Ni=null;function $i(){Ni!==null&&(clearTimeout(Ni),Ni=null)}function So(ge){Me(),Gt.value=!1,Kt.value=He()>Rh,ge.scrollIntoView({behavior:"smooth",block:"center"}),$i(),Ni=setTimeout(()=>{Ni=null;const we=J.value;if(!we||!ge.isConnected)return;const Ge=ge.getBoundingClientRect().top+ge.offsetHeight/2-(we.getBoundingClientRect().top+we.clientHeight/2);Math.abs(Ge)>48&&(we.scrollTop+=Ge)},480)}function _i(ge){const we=J.value;if(!we)return;const Ge=we.querySelector(`.turn-anchor[data-turn-id="${Fs(ge)}"]`);Ge&&So(Ge)}function Yi(ge,we){const Ge=ge.startContainer.parentElement;if(Ge!==null)for(let Ft=Ge;Ft!==null&&Ft!==we;Ft=Ft.parentElement){const sn=getComputedStyle(Ft),fn=/(auto|scroll)/.test(sn.overflowY)&&Ft.scrollHeight>Ft.clientHeight,qn=/(auto|scroll)/.test(sn.overflowX)&&Ft.scrollWidth>Ft.clientWidth;if(!fn&&!qn)continue;const Ai=ge.getClientRects()[0];if(!Ai)return;const Qs=Ft.getBoundingClientRect();fn&&(Ft.scrollTop+=Ai.top+Ai.height/2-(Qs.top+Ft.clientHeight/2)),qn&&(Ft.scrollLeft+=Ai.left+Ai.width/2-(Qs.left+Ft.clientWidth/2))}}function co(ge){const we=J.value;if(!we)return;const Ge=ge.startContainer.parentElement;Me(),Gt.value=!1,Kt.value=He()>Rh,Ct=Date.now()+700;const Ft=Ge?.closest(".u-text-wrap.is-clamped");if(Ft){Ft.querySelector(".u-text-toggle")?.click(),kt(()=>Bs(ge,we));return}Bs(ge,we)}function Bs(ge,we){const Ge=ge.startContainer.parentElement;Yi(ge,we);const Ft=ge.getClientRects()[0];if(!Ft){Ge instanceof HTMLElement&&So(Ge);return}const sn=we.getBoundingClientRect(),fn=Ft.top+Ft.height/2-(sn.top+we.clientHeight/2),qn=typeof window>"u"||!window.matchMedia("(prefers-reduced-motion: reduce)").matches;we.scrollTo({top:we.scrollTop+fn,behavior:qn?"smooth":"auto"}),$i(),Ni=setTimeout(()=>{Ni=null;const Ai=J.value,Qs=ge.getClientRects()[0];if(!Ai||!Qs)return;const Vu=Ai.getBoundingClientRect(),Qf=Qs.top+Qs.height/2-(Vu.top+Ai.clientHeight/2);Math.abs(Qf)>48&&(Ai.scrollTop+=Qf)},480)}function Hi(){const ge=J.value;if(!ge)return"none";const we=ge.firstElementChild,Ge=we instanceof HTMLElement?we.offsetHeight:0,Ft=de.value?.offsetHeight??0;return`${ge.scrollHeight}:${ge.clientHeight}:${Ge}:${Ft}`}function vi(ge){return typeof requestAnimationFrame=="function"?requestAnimationFrame(ge):setTimeout(ge,16)}function Mn(ge){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(ge):clearTimeout(ge)}let Dn=0,Ln=0,ws=null,Cn=0;const Di=Z(!1);function ri(){return performance.now()<Dn}function ur(ge,we=200){const Ge=J.value;if(!Ge||ds.value||(Me(),Gt.value=!1,ws=ge,Cn=ge.getBoundingClientRect().top,Dn=performance.now()+we,Di.value=!0,Ln))return;const Ft=()=>{if(Ln=0,!ws)return;if(Gt.value){ws=null,Di.value=!1;return}if(performance.now()>=Dn){ws=null,Di.value=!1,jo();return}const sn=ws.getBoundingClientRect().top-Cn;sn&&(Ge.scrollTop+=sn),Ln=vi(Ft)};Ln=vi(Ft)}function jo(){He()<=Rh?(Gt.value=!0,Kt.value=!1):(Gt.value=!1,Kt.value=!0)}function On(ge=36,we){if(!Gt.value&&!Qt()){we?.();return}const Ge=++as;let Ft="",sn=0,fn=0;Tn&&(Mn(Tn),Tn=0);const qn=()=>{if(Tn=0,Ge!==as)return;if(!Gt.value&&!Qt()){we?.();return}zn(!1);const Ai=Hi();sn=Ai===Ft?sn+1:0,Ft=Ai,fn++,sn<3&&fn<ge?Tn=vi(qn):we?.()};Tn=vi(qn)}function us(ge,we){return ge!==void 0&&ge.length>0&&we.length>=ge.length&&ge.firstId!==we.firstId&&ge.lastId===we.lastId&&ge.lastTextLen===we.lastTextLen&&ge.lastThinkingLen===we.lastThinkingLen&&ge.lastToolsLen===we.lastToolsLen&&ge.approvalIds===we.approvalIds}const qs=F(()=>{const ge=(s.approvals??[]).map(fn=>fn.approvalId).join(","),we=s.turns,Ge=we.at(-1),Ft=Ge?.thinking?.length??0,sn=Ge?.tools?.reduce((fn,qn)=>fn+qn.name.length+(qn.arg?.length??0)+(qn.output?.join("").length??0),0)??0;return{length:we.length,firstId:we[0]?.id??"",lastId:Ge?.id??"",lastTextLen:Ge?.text.length??0,lastThinkingLen:Ft,lastToolsLen:sn,approvalIds:ge}});let Us=s.fileReloadKey;Qe(qs,async(ge,we)=>{const Ge=s.fileReloadKey,Ft=Ge!==Us;if(Us=Ge,ds.value&&us(we,ge)){pe();return}if(Ft){pe();return}await kt(),Gt.value||Qt()?zn(ge.length<we.length):Kt.value=!0,pe()}),Qe(de,()=>{dr()}),Qe(()=>s.mobile,async()=>{await kt(),gt()});const Ji=new Map,$e=Z(!1);let nt=0,Nt=null;function Zt(){$e.value=!0,nt&&(Mn(nt),nt=0),Nt&&clearTimeout(Nt),Nt=setTimeout(()=>{$e.value=!1,Nt=null},1200)}function Nn(){if(!$e.value)return;let ge=2;const we=()=>{if(nt=0,ge--,ge>0){nt=vi(we);return}$e.value=!1,Nt&&(clearTimeout(Nt),Nt=null)};nt&&Mn(nt),nt=vi(we)}Qe(()=>s.fileReloadKey,async(ge,we)=>{const Ge=J.value;we&&Ge&&Ji.set(String(we),{top:Ge.scrollTop,following:Gt.value}),Me(),Zt(),await kt();const Ft=J.value,sn=ge?Ji.get(String(ge)):void 0;if(sn&&Ft){const fn=Lt.get(String(ge)),qn=fn?Qi(Ft,fn,sn.top):sn.top;fn&&Lt.delete(String(ge)),Gt.value=sn.following,Ft.scrollTop=qn,st=Ft.scrollTop,Kt.value=!sn.following&&He()>1,sn.following?On(36,Nn):Nn()}else Gt.value=!0,st=0,zn(!1),On(36,Nn);xe(),ee()}),Qe(()=>s.sessionLoading,async(ge,we)=>{ge||!we||(Gt.value=!0,await kt(),On(36,Nn),pe())}),Qe(()=>s.turnActive,async(ge,we)=>{ge||!we||!Gt.value&&!Qt()||(await kt(),On(48),pe())});function cs(){Gt.value=!0,Kt.value=!1,Ve=Date.now()+CM,kt(()=>{zn(!0),On(16)})}function Fi(ge){cs(),o("submit",ge)}function di(ge){Gt.value=!0,Kt.value=!1,Ve=Date.now()+CM,o("editMessage",ge)}function fi(ge){const we=s.queued?.[ge],Ge=we?.text??"";v(Ge,we?.attachments)&&o("editQueued",ge)}function Ks(ge){o("reorderQueue",ge)}function Si(ge,we){cs(),o("answer",ge,we)}function Vs(ge,we){!ge||!we||o("approval",ge,we)}let Zs=null,Wi=null,xs=null,fo=null,yi=0,Mo=0,ho=0;const Gs=Z(new Set),ds=F(()=>!!s.sessionId&&Gs.value.has(s.sessionId));function Ho(ge,we){const Ge=new Set(Gs.value);we?Ge.add(ge):Ge.delete(ge),Gs.value=Ge}function cr(){ds.value||ho||(ho=vi(()=>{ho=0,!ds.value&&(ri()||(Gt.value||Qt())&&zn(!1))}))}function ft(){as++,Tn&&(Mn(Tn),Tn=0),ho&&(Mn(ho),ho=0)}function Me(){const ge=J.value;if(Ve=0,Ct=0,ft(),Dn=0,ws=null,Di.value=!1,Sn&&(Mn(Sn),Sn=0),$i(),ge){const we=ge.scrollTop;typeof ge.scrollTo=="function"?ge.scrollTo({top:we,behavior:"auto"}):ge.scrollTop=we}Fn=0,Rt=Number.NEGATIVE_INFINITY,ge&&(st=ge.scrollTop)}function Ze(){const ge=J.value;!ge||ge.scrollHeight-ge.clientHeight<=1&&!s.hasMoreMessages||(Gt.value=!1,Me(),ge.scrollHeight-ge.clientHeight>1&&(Kt.value=!0))}function on(ge){const we=J.value;if(!we)return!1;for(const Ge of ge.composedPath()){if(Ge===we)return!1;if(Ge instanceof HTMLElement&&Ge.scrollHeight>Ge.clientHeight+1&&Ge.scrollTop>1)return!0}return!1}function Mi(ge){ge.defaultPrevented||ge.ctrlKey||ge.shiftKey||($i(),!(ge.deltaY>=0||on(ge))&&Ze())}function Wo(ge){const we=J.value;if(!we||ge.defaultPrevented||ge.button!==0||ge.pointerType==="touch")return;const Ge=we.getBoundingClientRect(),Ft=we.offsetWidth-we.clientWidth,sn=Ft>0?Ft:12;ge.target===we&&ge.clientX>=Ge.right-sn&&Ze()}let bi=null;function Al(ge){bi=ge.touches.length===1?ge.touches[0].clientY:null}function qo(ge){const we=ge.touches.length===1?ge.touches[0].clientY:null;$i(),we!==null&&bi!==null&&we>bi+2&&!on(ge)&&Ze(),bi=we}function Er(){if(!Wi)return;const ge=J.value?.firstElementChild??null;ge!==xs&&(xs&&Wi.unobserve(xs),xs=ge,ge&&Wi.observe(ge))}function dr(){if(!Wi)return;const ge=de.value;ge!==fo&&(fo&&Wi.unobserve(fo),fo=ge,ge&&Wi.observe(ge))}function fr(){const ge=J.value;gt(),Zs&&(Zs.disconnect(),ge&&Zs.observe(ge,{childList:!0,subtree:!0,characterData:!0})),Wi&&(Wi.disconnect(),xs=null,fo=null,ge&&Wi.observe(ge),Er(),dr()),yi=ge?.scrollHeight??0,Mo=ge?.clientHeight??0,ye(),xe()}function po(){Er(),cr(),ye(),xe()}function Gl(){typeof document>"u"||document.visibilityState==="visible"&&Gt.value&&On()}const oe=Z(!1);let Ae=null;function Se(){oe.value=!0,Ae!==null&&clearTimeout(Ae),Ae=setTimeout(()=>{oe.value=!1},xze)}const Pe=Z(null);let Ye=null;const Je=Z(null);let xt=null,bt=!1;function nn(){Pe.value=null,Je.value=null,bt=!1,Ye!==null&&(clearTimeout(Ye),Ye=null),xt!==null&&(clearTimeout(xt),xt=null)}function Ot(){for(let ge=s.turns.length-1;ge>=0;ge--){const we=s.turns[ge];if(we.goalContinuation)return null;if(we.role==="user")return we}return null}function wn(ge){return ba(ge).some(we=>we.kind==="thinking"&&we.thinking.trim().length>0||we.kind==="text"&&we.text.trim().length>0||we.kind==="tool")}function Qn(){if(Pe.value!==null||Je.value!==null||!s.working||(s.queued?.length??0)>0)return;const ge=Ot();if(ge===null||ge.skillActivation!==void 0||ge.pluginCommand!==void 0)return;s.turns.slice(s.turns.indexOf(ge)+1).every(Ge=>Ge.role==="assistant"&&!wn(Ge))?(Je.value=ge.id,bt=!1,xt=setTimeout(()=>{Je.value=null},Sze)):Pe.value=ge.id}let $t=!1,Ht=null;function Wn(ge){if($t)return;nn();const we=s.turns.find(Ft=>Ft.id===ge);we===void 0||we.role!=="user"||Ot()?.id!==we.id||(w.value??y.value)?.isEmpty?.()===!1||($t=!0,Ht=setTimeout(()=>{$t=!1,Ht=null},Mze),di({text:we.text,attachments:we.attachments}))}function Ee(){Je.value===null||s.working||!bt||Wn(Je.value)}Qe(()=>s.working,(ge,we)=>{if(!(we!==!0||ge)){if(Je.value!==null){Ee();return}Pe.value!==null&&Ye===null&&(Ye=setTimeout(()=>{Pe.value=null,Ye=null},_ze))}}),Qe(()=>Ot()?.id??null,(ge,we)=>{ge!==we&&nn()}),Qe(()=>s.sessionId,nn),Qe(()=>s.queued?.length,ge=>{(ge??0)>0&&nn()});const ct=F(()=>{if(s.lastTurnReason!=="cancelled"||s.working||s.turnActive)return null;const ge=s.turns[s.turns.length-1];return ge?.role==="assistant"&&wn(ge)?ge.id:null}),dt=F(()=>s.lastTurnReason==="failed"&&!s.working&&!s.turnActive&&s.turns.length>0);function Wt(){cs(),o("submit",{text:i("conversation.turnFailedResumeText"),attachments:[]})}const ki=F(()=>s.working?null:Pe.value);function $s(){o("interrupt")}function Ql(){return(w.value?.anyPopupOpen??y.value?.anyPopupOpen)===!0}const{handleCompositionStart:Xi,handleCompositionEnd:os,isComposingKeyEvent:Ku}=Kr();let ld=null;function Hp(ge){ld=ge.target}function Gf(ge){const we=ge instanceof Element&&ge!==document.body?ge:ld,Ge=use(we,".global-preview");if(Ge){ew(Ge);return}const Ft=J.value?.querySelector(".chat");Ft&&ew(Ft)}function Wp(ge){if(!(ge.target instanceof Element&&ge.target.closest(".terminal-host")!==null)){if(ge.key==="Escape"&&!s.overlayOpen&&!Ql()&&!ge.defaultPrevented&&!ge.repeat&&!Ku(ge)){ki.value!==null?(ge.preventDefault(),Wn(ki.value)):s.working&&(ge.preventDefault(),Qn(),$s());return}if(Vie(ge)&&!s.overlayOpen&&s.turns.length>0){ge.preventDefault(),it();return}lse(ge)&&!s.overlayOpen&&!ase(ge.target)&&(ge.preventDefault(),Gf(ge.target))}}function qp(){Gt.value&&cr()}pn(()=>{kt(()=>{typeof MutationObserver=="function"&&(Zs=new MutationObserver(po)),typeof ResizeObserver=="function"&&(Wi=new ResizeObserver(()=>{ye(),xe(),gt();const ge=J.value;if(!ge)return;const{scrollHeight:we,clientHeight:Ge}=ge,Ft=we>yi+1,sn=Ge<Mo-1;yi=we,Mo=Ge,!ri()&&(Ft||sn)&&cr()})),fr(),On(48),ee(),J.value?.addEventListener("kimi-table-layout",j),typeof document<"u"&&(document.addEventListener("visibilitychange",Gl),document.addEventListener("keydown",Wp),document.addEventListener("pointerdown",Hp,!0),document.addEventListener("compositionstart",Xi),document.addEventListener("compositionend",os)),window.visualViewport?.addEventListener("resize",qp)})}),An(()=>{J.value?.removeEventListener("kimi-table-layout",j),Zs&&Zs.disconnect(),Wi&&Wi.disconnect(),ho&&Mn(ho),Tn&&Mn(Tn),Ln&&Mn(Ln),Sn&&Mn(Sn),te&&Mn(te),ce&&Mn(ce),Ni!==null&&clearTimeout(Ni),_n&&clearTimeout(_n),Ae!==null&&clearTimeout(Ae),Ye!==null&&clearTimeout(Ye),xt!==null&&clearTimeout(xt),Ht!==null&&clearTimeout(Ht),A!==null&&(clearTimeout(A),A=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",Gl),document.removeEventListener("keydown",Wp),document.removeEventListener("pointerdown",Hp,!0),document.removeEventListener("compositionstart",Xi),document.removeEventListener("compositionend",os)),window.visualViewport?.removeEventListener("resize",qp)});function ad(){(w.value??y.value)?.focus()}fve({sessionId:()=>s.sessionId,mobile:()=>s.mobile===!0,starting:()=>s.starting===!0,dockedComposer:w,emptyComposer:y});function Ov(){Se()}function Pv(ge){if(Je.value!==null){if(!ge){bt||nn();return}bt=!0,Ee()}}return t({loadComposerForEdit:v,focusComposer:ad,notifyUndone:Ov,onAbortOutcome:Pv,selectAllRegion:Gf,focusGoal:K}),(ge,we)=>(b(),I("section",{class:De(["con",{mobile:e.mobile}])},[!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(b(),fe(kNe,{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":W.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:k.value,onOpenChanges:we[0]||(we[0]=Ge=>o("openChanges")),onCopyAll:we[1]||(we[1]=Ge=>m.value?.copyConversation()),onCopyFinalSummary:we[2]||(we[2]=Ge=>m.value?.copyFinalSummary()),onOpenPr:we[3]||(we[3]=Ge=>e.pr&&o("openPr",e.pr.url)),onRenameSession:we[4]||(we[4]=(Ge,Ft)=>o("renameSession",Ge,Ft)),onForkSession:we[5]||(we[5]=Ge=>o("forkSession",Ge)),onArchiveSession:we[6]||(we[6]=Ge=>o("archiveSession",Ge)),onExportSession:we[7]||(we[7]=Ge=>o("exportSession",Ge))},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?ne("",!0):(b(),I("div",{key:1,class:De(["empty-drag",{"macos-desktop":h(Dc)}])},null,2)),V(PRe,{items:q.value,"active-turn-id":X.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:Ne.value,onSelect:_i},null,8,["items","active-turn-id","mobile","session-loading","occluded"]),C("div",{class:"chat-layout",style:Vt(Ke.value)},[C("div",{ref:Tt,class:De(["panes chat-scroll",{"is-following":Gt.value,"history-prepending":ds.value,"is-pinned":Di.value,scrolling:mn.value,"session-settling":$e.value}]),onScrollPassive:ni,onWheelPassive:Mi,onPointerdownPassive:Wo,onTouchstartPassive:Al,onTouchmovePassive:qo},[C("div",{class:De(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(b(),I(Be,{key:0},[we[55]||(we[55]=C("div",{class:"empty-spacer"},null,-1)),C("div",sze,[e.starting?(b(),I("span",rze,[V(h(Bi),{size:"sm"}),C("span",null,B(h(i)("conversation.starting")),1)])):(b(),fe(ize,{key:0,class:"empty-doodle"},{fallback:he(()=>[C("span",oze,B(h(i)("composer.emptyConversationTitle")),1)]),_:1})),e.starting?ne("",!0):(b(),I("span",lze,B(h(i)("composer.emptyConversation")),1))]),d.value?(b(),I("div",aze,[V(h(Ce),{class:"upgrade-banner-icon",name:"music",size:"sm"}),C("span",uze,B(h(i)("composer.upgradeBanner")),1),C("button",{type:"button",class:"upgrade-banner-cta",onClick:we[8]||(we[8]=Ge=>h(Cp)())},B(h(i)("sidebar.upgrade")),1)])):ne("",!0),V(UD,{ref_key:"emptyComposerRef",ref:y,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,"plan-armed":e.planArmed,"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:Fi,onSteer:we[11]||(we[11]=Ge=>o("steer",Ge)),onCommand:we[12]||(we[12]=Ge=>o("command",Ge)),onInterrupt:$s,onUnqueue:we[13]||(we[13]=Ge=>o("unqueue",Ge)),onEditQueued:we[14]||(we[14]=Ge=>o("editQueued",Ge)),onSetPermission:we[15]||(we[15]=Ge=>o("setPermission",Ge)),onSetThinking:we[16]||(we[16]=Ge=>o("setThinking",Ge)),onTogglePlan:we[17]||(we[17]=Ge=>o("togglePlan")),onToggleSwarm:we[18]||(we[18]=Ge=>o("toggleSwarm")),onToggleGoal:we[19]||(we[19]=Ge=>o("toggleGoal")),onOpenBtw:we[20]||(we[20]=Ge=>o("command",{cmd:"/btw",attachments:[]})),onCreateGoal:we[21]||(we[21]=Ge=>o("createGoal",Ge)),onControlGoal:we[22]||(we[22]=Ge=>o("controlGoal",Ge)),onFocusGoal:K,onCompact:we[23]||(we[23]=Ge=>o("compact")),onPickModel:we[24]||(we[24]=Ge=>o("pickModel")),onSelectModel:we[25]||(we[25]=Ge=>o("selectModel",Ge)),onLogin:we[26]||(we[26]=Ge=>o("login"))},fI({_:2},[e.starting?void 0:{name:"footer",fn:he(()=>[C("div",cze,[c.value?(b(),I("div",dze,[V(h(gn),{text:h(i)("conversation.switchWorkspace")},{default:he(()=>[C("button",{type:"button",class:De(["ws-chip",{open:r.value}]),"aria-expanded":r.value,onClick:It(p,["stop"])},[V(h(Ce),{name:"folder"}),C("span",hze,B(u.value),1),V(h(Ce),{class:"ws-chip-chev",name:"chevron-down",size:"sm"})],10,fze)]),_:1},8,["text"]),r.value?(b(),I("div",{key:0,class:De(["ws-panel",{up:l.value}]),style:Vt(a.value?{maxHeight:a.value}:void 0),role:"menu"},[C("div",pze,B(h(i)("workspace.recentLabel")),1),(b(!0),I(Be,null,yt(f.value,Ge=>(b(),I("button",{key:Ge.id,type:"button",class:De(["ws-row",{on:Ge.id===e.activeWorkspaceId}]),role:"menuitem",onClick:It(Ft=>g(Ge.id),["stop"])},[V(h(Ce),{name:"folder"}),C("span",mze,[C("span",vze,B(Ge.name),1),C("span",yze,B(Ge.shortPath),1)]),Ge.id===e.activeWorkspaceId?(b(),fe(h(Ce),{key:0,class:"ws-check",name:"check",size:"sm"})):ne("",!0)],10,gze))),128)),we[54]||(we[54]=C("div",{class:"ws-divider"},null,-1)),C("button",{type:"button",class:"ws-action",role:"menuitem",onClick:we[9]||(we[9]=It(Ge=>{r.value=!1,o("addWorkspace")},["stop"]))},[V(h(Ce),{name:"folder-plus"}),C("span",null,B(h(i)("conversation.pickFolder")),1)])],6)):ne("",!0)])):(b(),I("button",{key:1,type:"button",class:"ws-chip ws-ghost",onClick:we[10]||(we[10]=Ge=>o("addWorkspace"))},[V(h(Ce),{name:"folder-plus"}),C("span",null,B(h(i)("conversation.pickFolder")),1)]))])]),key:"0"}]),1032,["session-id","running","working","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","goal","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","starting"]),r.value?(b(),I("div",{key:1,class:"ws-backdrop",onClick:we[27]||(we[27]=Ge=>r.value=!1)})):ne("",!0),we[56]||(we[56]=C("div",{class:"empty-spacer"},null,-1))],64)):(b(),fe(Ak,{ref_key:"chatPaneRef",ref:m,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":Gt.value,queued:e.queued,"undo-hint-turn-id":ki.value,"interrupted-turn-id":ct.value,"turn-failed":dt.value,"turn-error":e.turnError??null,"turn-retry":e.turnRetry??null,onResumeTurn:Wt,onOpenFile:we[28]||(we[28]=Ge=>o("openFile",Ge)),onOpenMedia:we[29]||(we[29]=Ge=>o("openMedia",Ge)),onOpenTurnDiff:we[30]||(we[30]=Ge=>o("openTurnDiff",Ge)),onCopyConversationCopied:x,onOpenCompaction:we[31]||(we[31]=Ge=>o("openCompaction",Ge)),onOpenAgent:we[32]||(we[32]=Ge=>o("openAgent",Ge)),onEditMessage:di,onArmedUndo:Wn,onLoadOlderMessages:ci,onUnqueue:we[33]||(we[33]=Ge=>o("unqueue",Ge)),onEditQueued:fi,onReorderQueue:Ks},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","turn-failed","turn-error","turn-retry"]))],2)],34),e.turns.length===0&&!e.sessionLoading?ne("",!0):(b(),fe(FRe,{key:0,ref:yn,style:Vt(Re.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,"plan-armed":e.planArmed,"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,"session-plans":e.sessionPlans,"dock-panel":R.value,"overlay-open":e.overlayOpen,"bash-tasks":E.value,"subagent-tasks":S.value,"bash-running":M.value,"subagent-running":_.value,"todo-done-count":P.value,"has-dock-work":O.value,todos:e.todos,"pending-question":ve.value,"question-busy-kind":re.value,"pending-approval":se.value,"approval-busy":U.value,mobile:e.mobile,onToggleDockPanel:we[34]||(we[34]=Ge=>z(Ge)),onCloseDockPanel:we[35]||(we[35]=Ge=>G()),onOpenAgent:we[36]||(we[36]=Ge=>o("openAgent",Ge)),"open-file":Ge=>o("openFile",Ge),onAnswer:Si,onDismiss:we[37]||(we[37]=Ge=>o("dismiss",Ge)),onApproval:Vs,onCancelTask:we[38]||(we[38]=Ge=>o("cancelTask",Ge)),onControlGoal:we[39]||(we[39]=Ge=>o("controlGoal",Ge)),onSubmit:Fi,onSteer:we[40]||(we[40]=Ge=>o("steer",Ge)),onCommand:we[41]||(we[41]=Ge=>o("command",Ge)),onInterrupt:$s,onSetPermission:we[42]||(we[42]=Ge=>o("setPermission",Ge)),onSetThinking:we[43]||(we[43]=Ge=>o("setThinking",Ge)),onTogglePlan:we[44]||(we[44]=Ge=>o("togglePlan")),onToggleSwarm:we[45]||(we[45]=Ge=>o("toggleSwarm")),onToggleGoal:we[46]||(we[46]=Ge=>o("toggleGoal")),onOpenBtw:we[47]||(we[47]=Ge=>o("command",{cmd:"/btw",attachments:[]})),onCreateGoal:we[48]||(we[48]=Ge=>o("createGoal",Ge)),onFocusGoal:K,onCompact:we[49]||(we[49]=Ge=>o("compact")),onPickModel:we[50]||(we[50]=Ge=>o("pickModel")),onSelectModel:we[51]||(we[51]=Ge=>o("selectModel",Ge)),onLogin:we[52]||(we[52]=Ge=>o("login"))},null,8,["style","session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","goal","session-plans","dock-panel","overlay-open","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),je.value?(b(),fe(JRe,{key:2,ref_key:"transcriptSearchRef",ref:ke,pane:J.value,mobile:e.mobile,reveal:co,onClose:Fe},null,8,["pane","mobile"])):ne("",!0),V(ys,{name:"pill"},{default:he(()=>[Kt.value?(b(),I("button",{key:0,class:"newmsg-pill",style:Vt({bottom:`${Ie.value+12}px`}),"aria-label":h(i)("conversation.jumpToLatestAria"),onClick:we[53]||(we[53]=Ge=>zn(!0))},[V(h(Ce),{class:"pill-chevron",name:"arrow-down",size:"sm"}),Ue(" "+B(h(i)("conversation.newMessages")),1)],12,bze)):ne("",!0)]),_:1}),V(ys,{name:"undo-toast"},{default:he(()=>[oe.value?(b(),I("div",kze,[C("span",Aze,B(h(i)("conversation.undone")),1)])):ne("",!0)]),_:1})],2))}}),Eze=vt(Ize,[["__scopeId","data-v-8c7ebe8d"]]),Tze={key:0,class:"fp-empty fp-error"},Lze={key:1,class:"fp-empty"},Nze={key:2,class:"fp-loading"},Fze={class:"fp-path"},Bze={class:"fp-meta"},$ze={key:0,class:"fp-lines"},Dze={class:"fp-size"},Rze={key:3,class:"fp-search"},zze=["placeholder"],Oze={key:0,class:"fp-search-count"},Pze=["href","aria-label"],jze={key:1,class:"fp-code"},Hze={key:1,class:"fp-body fp-code"},Wze={key:2,class:"fp-body"},qze=["srcdoc","title"],Uze={key:1,class:"fp-code"},Kze={key:3,class:"fp-body fp-pdf-wrap"},Vze=["src","title"],Zze={key:1,class:"fp-binary-card"},Gze={class:"fp-binary-label"},Qze={key:4,class:"fp-body fp-table-wrap"},Yze={class:"fp-table"},Jze=["data-line"],Xze={key:5,class:"fp-body fp-image-wrap"},eOe=["src","alt"],tOe={key:1,class:"fp-binary-card"},nOe={class:"fp-binary-icon"},iOe={class:"fp-binary-label"},sOe={key:6,class:"fp-body fp-code"},oOe={key:7,class:"fp-body fp-binary-wrap"},rOe={class:"fp-binary-card"},lOe={class:"fp-binary-icon"},aOe={class:"fp-binary-label"},uOe=tt({__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}=Bt();function i(ce,pe){const Ne=pe.startsWith("/"),te=pe.split("/").filter(Boolean);for(const ye of ce.split("/"))ye===""||ye==="."||(ye===".."?te.pop():te.push(ye));return(Ne?"/":"")+te.join("/")}const s=an("resolveImage",async ce=>ce),o=F(()=>{const ce=u.file?.path??"",pe=ce.lastIndexOf("/");return pe>0?ce.slice(0,pe):""});function r(ce){if(/^(https?:|data:|blob:)/i.test(ce)||ce.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(ce)||ce.startsWith("\\\\"))return ce;const pe=o.value;return pe?i(ce,pe):ce}async function l(ce){const pe=r(ce);return s?s(pe):pe}Pn("resolveImage",l);function a(ce){let pe=ce.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(pe)||pe.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(pe)||pe.startsWith("\\\\"))return ce;for(const te of["#","?"]){const ye=pe.indexOf(te);ye!==-1&&(pe=pe.slice(0,ye))}const Ne=o.value;return{...ce,path:i(pe,Ne)}}const u=e,c=t;function d(ce){u.openFile?.(a(ce))}const f=Z(null),p=F(()=>{const ce=u.file;if(!ce)return"binary";const pe=ce.mime??"",Ne=ce.languageId??"",te=ce.path.toLowerCase();return pe==="text/markdown"||Ne==="markdown"||Ne==="md"||te.endsWith(".mdx")?"markdown":pe==="application/json"||Ne==="json"?"json":pe==="text/html"||Ne==="html"||te.endsWith(".html")||te.endsWith(".htm")?"html":pe==="application/pdf"||te.endsWith(".pdf")?"pdf":pe==="text/csv"||Ne==="csv"||te.endsWith(".csv")?"csv":pe.startsWith("image/")?"image":ce.isBinary?"binary":pe.startsWith("text/")||Ne!==""?"text":"binary"});function g(ce){const pe=atob(ce),Ne=Uint8Array.from(pe,te=>te.charCodeAt(0));return new TextDecoder().decode(Ne)}const m=F(()=>{const ce=u.file;if(!ce)return"";if(ce.encoding==="base64")try{return g(ce.content)}catch{return ce.content}return ce.content}),y=F(()=>{if(p.value!=="json"||!u.file)return"";try{return JSON.stringify(JSON.parse(m.value),null,2)}catch{return m.value}}),w=F(()=>u.file?(p.value==="json"?y.value:m.value).split(` +`):[]),k=F(()=>u.file?p.value==="json"?y.value:m.value:""),A=F(()=>w.value.map((ce,pe)=>pe+1)),v=F(()=>u.file&&k.value.length<=u3?u.file.path:void 0),x=Z(""),E=Z(0),S=F(()=>{const ce=x.value.trim().toLowerCase();if(!ce)return[];const pe=[];return w.value.forEach((Ne,te)=>{Ne.toLowerCase().includes(ce)&&pe.push(te+1)}),pe});Qe(x,()=>{E.value=0});function M(ce,pe=!1){ce&&kt(()=>{const Ne=f.value?.querySelector(".fp-body"),te=Ne?.querySelector(`[data-line="${ce}"]`);if(!Ne||!te)return;pe&&(Ne.scrollTop=0);const ye=Ne.getBoundingClientRect(),j=te.getBoundingClientRect(),Y=j.top-ye.top+Ne.scrollTop;Ne.scrollTop=Y-Ne.clientHeight/2+j.height/2})}Qe(()=>[u.file?.path,u.line],()=>M(u.line,!0),{immediate:!0});function _(ce){const pe=S.value;pe.length!==0&&(E.value=(E.value+ce+pe.length)%pe.length,M(pe[E.value]))}function N(ce){const pe=S.value;return{target:u.line===ce,hit:pe.includes(ce),active:pe[E.value]===ce}}function D(ce){return ce<1024?`${ce} B`:ce<1024*1024?`${(ce/1024).toFixed(1)} KB`:`${(ce/(1024*1024)).toFixed(1)} MB`}const T=Z(!1),$=Z(!1);function P(){u.file&&ro(k.value).then(ce=>{ce&&(T.value=!0,setTimeout(()=>{T.value=!1},1400))})}function O(){u.file&&ro(u.file.path).then(ce=>{ce&&($.value=!0,setTimeout(()=>{$.value=!1},1400))})}const R=Z("preview"),W=Z("preview"),z=Z("fit");function G(ce){R.value=ce}function K(ce){W.value=ce}function H(ce){z.value=ce}Qe(p,ce=>{R.value=ce==="html"?"preview":"source",W.value="preview",z.value="fit"});const q=F(()=>{const ce=u.file;return!ce||p.value!=="image"?null:ce.encoding==="base64"?`data:${ce.mime};base64,${ce.content}`:ce.mime==="image/svg+xml"?`data:${ce.mime};charset=utf-8,${encodeURIComponent(ce.content)}`:null}),X=F(()=>{const ce=u.file;return!ce||p.value!=="pdf"?null:u.downloadUrl?u.downloadUrl:ce.encoding==="base64"?`data:${ce.mime};base64,${ce.content}`:null}),ee=F(()=>u.file?["<!doctype html>",'<meta charset="utf-8">',`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: blob:; style-src 'unsafe-inline'; font-src data:;">`,m.value].join(""):"");function ue(ce){const pe=[];let Ne="",te=!1;for(let ye=0;ye<ce.length;ye++){const j=ce[ye];j==='"'&&ce[ye+1]==='"'?(Ne+='"',ye++):j==='"'?te=!te:j===","&&!te?(pe.push(Ne),Ne=""):Ne+=j}return pe.push(Ne),pe}const ie=F(()=>w.value.slice(0,200).map(ue));function xe(ce,pe=55){return!ce||ce.length<=pe?ce:"…"+ce.slice(ce.length-pe+1)}return(ce,pe)=>(b(),I("div",{ref_key:"rootRef",ref:f,class:"file-preview"},[e.error&&!e.loading?(b(),I("div",Tze,[C("span",null,B(e.error),1),e.closable?(b(),fe(h(jt),{key:0,variant:"secondary",size:"sm",onClick:pe[0]||(pe[0]=Ne=>c("close"))},{default:he(()=>[Ue(B(h(n)("filePreview.close")),1)]),_:1})):ne("",!0)])):!e.file&&!e.loading?(b(),I("div",Lze,B(h(n)("filePreview.empty")),1)):e.loading?(b(),I("div",Nze,[pe[7]||(pe[7]=C("span",{class:"spinner"},null,-1)),C("span",null,B(h(n)("filePreview.loading")),1)])):e.file?(b(),I(Be,{key:3},[V(h(Uc),{wrap:"",title:h(n)("common.preview"),closable:e.closable,"close-label":h(n)("filePreview.close"),onClose:pe[6]||(pe[6]=Ne=>c("close"))},{default:he(()=>[V(h(gn),{text:e.file.path},{default:he(()=>[C("span",Fze,B(xe(e.file.path)),1)]),_:1},8,["text"]),C("span",Bze,[e.file.lineCount?(b(),I("span",$ze,B(h(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):ne("",!0),C("span",Dze,B(D(e.file.size)),1)]),p.value==="html"?(b(),fe(h(wo),{key:0,"model-value":R.value,size:"sm",options:[{value:"preview",label:h(n)("filePreview.preview")},{value:"source",label:h(n)("filePreview.source")}],"onUpdate:modelValue":G},null,8,["model-value","options"])):ne("",!0),p.value==="markdown"?(b(),fe(h(wo),{key:1,"model-value":W.value,size:"sm",options:[{value:"preview",label:h(n)("filePreview.preview")},{value:"source",label:h(n)("filePreview.source")}],"onUpdate:modelValue":K},null,8,["model-value","options"])):ne("",!0),p.value==="image"?(b(),fe(h(wo),{key:2,"model-value":z.value,size:"sm",options:[{value:"fit",label:h(n)("filePreview.fit")},{value:"actual",label:h(n)("filePreview.actual")}],"onUpdate:modelValue":H},null,8,["model-value","options"])):ne("",!0),p.value==="text"||p.value==="json"||p.value==="html"||p.value==="csv"?(b(),I("div",Rze,[Bn(C("input",{"onUpdate:modelValue":pe[1]||(pe[1]=Ne=>x.value=Ne),class:"fp-search-input",type:"search",placeholder:h(n)("filePreview.search")},null,8,zze),[[_o,x.value]]),x.value.trim()?(b(),I("span",Oze,B(S.value.length),1)):ne("",!0),V(h(rn),{size:"sm",disabled:S.value.length===0,label:h(n)("filePreview.prevMatch"),tooltip:h(n)("filePreview.prevMatch"),onClick:pe[2]||(pe[2]=Ne=>_(-1))},{default:he(()=>[V(h(Ce),{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label","tooltip"]),V(h(rn),{size:"sm",disabled:S.value.length===0,label:h(n)("filePreview.nextMatch"),tooltip:h(n)("filePreview.nextMatch"),onClick:pe[3]||(pe[3]=Ne=>_(1))},{default:he(()=>[V(h(Ce),{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label","tooltip"])])):ne("",!0),V(h(rn),{size:"sm",class:De({copied:$.value}),label:$.value?h(n)("filePreview.copied"):h(n)("filePreview.copyPath"),tooltip:$.value?h(n)("filePreview.copied"):h(n)("filePreview.copyPath"),onClick:O},{default:he(()=>[$.value?(b(),fe(h(Ce),{key:1,class:"fp-check",name:"check",size:"md"})):(b(),fe(h(Ce),{key:0,name:"link",size:"md"}))]),_:1},8,["class","label","tooltip"]),e.externalActions?(b(),fe(h(rn),{key:4,size:"sm",label:h(n)("filePreview.openInEditor"),tooltip:h(n)("filePreview.openInEditor"),onClick:pe[4]||(pe[4]=Ne=>c("openExternal"))},{default:he(()=>[V(h(Ce),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),e.externalActions?(b(),fe(h(rn),{key:5,size:"sm",label:h(n)("filePreview.reveal"),tooltip:h(n)("filePreview.reveal"),onClick:pe[5]||(pe[5]=Ne=>c("reveal"))},{default:he(()=>[V(h(Ce),{name:"folder",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),e.downloadUrl?(b(),fe(h(gn),{key:6,text:h(n)("filePreview.download")},{default:he(()=>[C("a",{class:"fp-download",href:e.downloadUrl,target:"_blank",rel:"noreferrer",download:"","aria-label":h(n)("filePreview.download")},[V(h(Ce),{name:"download",size:"md"})],8,Pze)]),_:1},8,["text"])):ne("",!0),!e.file.isBinary&&p.value!=="image"?(b(),fe(h(rn),{key:7,size:"sm",class:De({copied:T.value}),label:T.value?h(n)("filePreview.copied"):h(n)("filePreview.copy"),tooltip:T.value?h(n)("filePreview.copied"):h(n)("filePreview.copy"),onClick:P},{default:he(()=>[T.value?(b(),fe(h(Ce),{key:1,class:"fp-check",name:"check",size:"md"})):(b(),fe(h(Ce),{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label","tooltip"])):ne("",!0)]),_:1},8,["title","closable","close-label"]),p.value==="markdown"?(b(),I("div",{key:0,class:De(["fp-body",{"fp-markdown":W.value==="preview"}])},[W.value==="preview"?(b(),fe(h(Kl),{key:0,text:m.value,"open-file":u.openFile?d:void 0},null,8,["text","open-file"])):(b(),I("div",jze,[V(al,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])]))],2)):p.value==="json"?(b(),I("div",Hze,[V(al,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])])):p.value==="html"?(b(),I("div",Wze,[R.value==="preview"?(b(),I("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:ee.value,title:e.file.path},null,8,qze)):(b(),I("div",Uze,[V(al,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])]))])):p.value==="pdf"?(b(),I("div",Kze,[X.value?(b(),I("iframe",{key:0,class:"fp-pdf-frame",src:X.value,title:e.file.path},null,8,Vze)):(b(),I("div",Zze,[C("span",Gze,B(h(n)("filePreview.pdfNoPreview")),1)]))])):p.value==="csv"?(b(),I("div",Qze,[C("table",Yze,[C("tbody",null,[(b(!0),I(Be,null,yt(ie.value,(Ne,te)=>(b(),I("tr",{key:te,class:De(N(te+1)),"data-line":te+1},[C("th",null,B(te+1),1),(b(!0),I(Be,null,yt(Ne,(ye,j)=>(b(),I("td",{key:j},B(ye),1))),128))],10,Jze))),128))])])])):p.value==="image"?(b(),I("div",Xze,[q.value?(b(),I("img",{key:0,src:q.value,alt:e.file.path,class:De(["fp-image",{actual:z.value==="actual"}])},null,10,eOe)):(b(),I("div",tOe,[C("span",nOe,[V(h(Ce),{name:"image-off",size:"lg"})]),C("span",iOe,B(h(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:D(e.file.size)})),1)]))])):p.value==="text"?(b(),I("div",sOe,[V(al,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])])):(b(),I("div",oOe,[C("div",rOe,[C("span",lOe,[V(h(Ce),{name:"file-off",size:"lg"})]),C("span",aOe,B(h(n)("filePreview.binaryNoPreview",{mime:e.file.mime||h(n)("filePreview.unknownType"),size:D(e.file.size)})),1)])]))],64)):ne("",!0)],512))}}),cOe=vt(uOe,[["__scopeId","data-v-4c55a361"]]),dOe={class:"tp"},fOe=tt({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Z(null);return Qe(()=>n.text,()=>{const r=o.value;!r||!(r.scrollHeight-r.scrollTop-r.clientHeight<24)||kt(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})},{immediate:!0}),(r,l)=>(b(),I("div",dOe,[V(h(Uc),{title:h(s)("common.preview"),subtitle:e.subtitle??h(s)("thinking.panelTitle"),"close-label":h(s)("thinking.close"),onClose:l[0]||(l[0]=a=>i("close"))},null,8,["title","subtitle","close-label"]),C("pre",{ref_key:"bodyEl",ref:o,class:"tp-body"},B(e.text),513)]))}}),hOe=vt(fOe,[["__scopeId","data-v-afb1f46f"]]),pOe={class:"agent-panel"},gOe={key:0,class:"agent-fallback"},mOe={key:0,class:"agent-error"},vOe=tt({__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,i=t,{t:s}=Bt(),o=Z(null),r=F(()=>{const M=n.member.prompt?.trim(),_=M?`$ ${M}`:null;return A.value.filter(N=>N!==M&&N!==_).join(` +`)});let l=null,a=0;function u(M){const _=M==="command"?n.member.prompt:r.value;if(!_)return;const N=a;ro(_).then(D=>{!D||N!==a||(l!==null&&clearTimeout(l),o.value=M,l=setTimeout(()=>{l=null,o.value=null},1400))})}const c=F(()=>n.member.id),{scroller:d,following:f,onScroll:p,pinScroll:g}=sve(c);Qe(c,()=>{a++,l!==null&&clearTimeout(l),l=null,o.value=null});const m=Z(!1);let y=null,w=null;function k(){y!==null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(y),w!==null&&clearTimeout(w),y=null,w=null}Qe(c,()=>{m.value=!1,k();const M=()=>{k(),m.value=!0};typeof requestAnimationFrame=="function"?y=requestAnimationFrame(()=>{y=requestAnimationFrame(M)}):w=setTimeout(M,32)},{immediate:!0}),Gn(k);const A=F(()=>{const M=new Set,_=[],N=n.member.prompt?.trim(),D=N?`$ ${N}`:null;for(const T of[n.member.prompt,n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` +`),n.member.summary]){const $=T?.trim();!$||M.has($)||D!==null&&$===D||(M.add($),_.push($))}return _});Pn("pinScroll",()=>{d.value&&g()});function v(M){switch(M){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");case"cancelled":return s("tools.swarm.phaseCancelled")}}const x=an("modelDisplay"),E=an("subagentEffort"),S=F(()=>{const M=[n.member.subagentType,x?.(n.member.model),E?.(n.member.thinkingEffort)].filter(_=>!!_);return M.length>0?M.join(" · "):void 0});return(M,_)=>(b(),I("div",pOe,[V(h(Uc),{title:e.member.name,subtitle:S.value,"close-label":h(s)("thinking.close"),onClose:_[2]||(_[2]=N=>i("close"))},{default:he(()=>[V(h(Hl),{variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(v(e.member.phase)),1)]),_:1}),e.member.prompt?(b(),fe(h(gn),{key:0,text:h(s)("tasks.copyCommand")},{default:he(()=>[V(h(rn),{size:"sm",label:h(s)("tasks.copyCommand"),onClick:_[0]||(_[0]=N=>u("command"))},{default:he(()=>[V(h(Ce),{name:o.value==="command"?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"])):ne("",!0),r.value?(b(),fe(h(gn),{key:1,text:h(s)("tasks.copyOutput")},{default:he(()=>[V(h(rn),{size:"sm",label:h(s)("tasks.copyOutput"),onClick:_[1]||(_[1]=N=>u("output"))},{default:he(()=>[V(h(Ce),{name:o.value==="output"?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"])):ne("",!0)]),_:1},8,["title","subtitle","close-label"]),C("div",{ref_key:"scroller",ref:d,class:"agent-transcript",onScrollPassive:_[8]||(_[8]=(...N)=>h(p)&&h(p)(...N))},[m.value?(b(),I(Be,{key:0},[e.turns.length===0&&!e.loading&&(e.loadError||A.value.length>0)?(b(),I("div",gOe,[e.loadError?(b(),I("div",mOe,B(h(s)("tasks.transcriptLoadError")),1)):ne("",!0),A.value.length>0?(b(),fe(Ir,{key:1,lines:A.value},null,8,["lines"])):ne("",!0)])):(b(),fe(Ak,{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":h(f),"read-only":"",onLoadOlderMessages:_[3]||(_[3]=N=>i("loadOlderMessages")),onOpenAgent:_[4]||(_[4]=N=>i("openAgent",N)),onOpenFile:_[5]||(_[5]=N=>i("openFile",N)),onOpenMedia:_[6]||(_[6]=N=>i("openMedia",N)),onOpenTurnDiff:_[7]||(_[7]=N=>i("openTurnDiff",N))},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))],64)):ne("",!0)],544)]))}}),yOe=vt(vOe,[["__scopeId","data-v-84a2873f"]]),bOe={class:"sc"},kOe={key:0,class:"sc-empty"},AOe={key:2,class:"sc-loading"},COe={class:"sc-composer"},wOe=["placeholder"],xOe=["disabled"],_Oe=tt({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{},onSend:{type:Function}},emits:["close","openMedia"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.turns.find(E=>E.role==="user")?.text?.trim()??""),r=F(()=>n.title?.trim()||s("sideChat.title")),l=F(()=>n.subtitle?.trim()?n.subtitle.trim():o.value||s("sideChat.subtitle")),a=Z(""),u=Z(null),c=Z(null),d=Z(!1);async function f(){const x=a.value,E=x.trim();if(!(!E||d.value)){d.value=!0;try{if(!await n.onSend(E)||a.value!==x)return;a.value="",kt(()=>{u.value&&(u.value.style.height="auto"),p()})}finally{d.value=!1}}}function p(){const x=c.value;x&&(x.scrollTop=x.scrollHeight)}Pn("pinScroll",x=>{const E=c.value;if(!E)return;const S=x.getBoundingClientRect().top;requestAnimationFrame(()=>{E.scrollTop+=x.getBoundingClientRect().top-S})});const g=F(()=>{const x=n.turns;if(x.length===0)return"0";const E=x.at(-1),S=E.thinking?.length??0,M=E.tools?.reduce((_,N)=>_+N.name.length+(N.arg?.length??0)+(N.output?.join("").length??0),0)??0;return`${x.length}:${E.text.length}:${S}:${M}`});Qe(g,async()=>{!n.running&&!n.sending||(await kt(),p())});const m=F(()=>n.sending?n.turns.at(-1)?.role==="user":!1),{handleCompositionStart:y,handleCompositionEnd:w,isComposingKeyEvent:k}=Kr();function A(x){x.key==="Enter"&&!x.shiftKey&&!k(x)&&(x.preventDefault(),f())}function v(){const x=u.value;x&&(x.style.height="auto",x.style.height=`${Math.min(x.scrollHeight,160)}px`)}return(x,E)=>(b(),I("div",bOe,[V(h(Uc),{title:r.value,subtitle:l.value,"close-label":h(s)("thinking.close"),onClose:E[0]||(E[0]=S=>i("close"))},null,8,["title","subtitle","close-label"]),C("div",{ref_key:"bodyRef",ref:c,class:"sc-body"},[e.turns.length===0?(b(),I("div",kOe,B(h(s)("sideChat.empty")),1)):(b(),fe(Ak,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running,"turn-files-interactive":!1,onOpenMedia:E[1]||(E[1]=S=>i("openMedia",S))},null,8,["turns","turn-active","working"])),m.value?(b(),I("div",AOe,[V(zD,{label:h(s)("conversation.requesting")},null,8,["label"])])):ne("",!0)],512),C("div",COe,[Bn(C("textarea",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":E[2]||(E[2]=S=>a.value=S),class:"sc-input",rows:"1",placeholder:h(s)("sideChat.placeholder"),onInput:v,onKeydown:A,onCompositionstart:E[3]||(E[3]=(...S)=>h(y)&&h(y)(...S)),onCompositionend:E[4]||(E[4]=(...S)=>h(w)&&h(w)(...S))},null,40,wOe),[[_o,a.value]]),V(h(gn),{text:h(s)("sideChat.send")},{default:he(()=>[C("button",{type:"button",class:"sc-send",disabled:!a.value.trim(),onClick:f},[V(h(Ce),{name:"arrow-right",size:"sm"})],8,xOe)]),_:1},8,["text"])])]))}}),SOe=vt(_Oe,[["__scopeId","data-v-bb28a4e0"]]),MOe={class:"changes-pane"},IOe={class:"dv-path"},EOe={class:"diff-head"},TOe={class:"back-label"},LOe={key:"loading",class:"empty-state diff-loading"},NOe={key:"lines",class:"dv-lines-wrap"},FOe={key:"empty",class:"empty-state"},BOe={class:"dv-change-count"},$Oe={class:"ch-head"},DOe={class:"br-heading"},ROe={class:"br-label"},zOe={class:"br-name"},OOe={key:0,class:"sync-info"},POe={key:0,class:"ahead"},jOe={key:0,class:"behind"},HOe={key:1,class:"empty-head"},WOe={class:"ch-list-content"},qOe=["onClick"],UOe={class:"fpath"},KOe=["onClick"],VOe={class:"tree-name"},ZOe=["onClick"],GOe={class:"tree-name"},QOe={key:2,class:"empty-state"},YOe={class:"empty-state-icon","aria-hidden":"true"},JOe={key:3,class:"empty-state"},XOe=tt({__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}=Bt();function i($){return n($===1?"diff.fileCountOne":"diff.fileCountOther",{number:$})}const s=e,o=t;function r($){const P=$.toLowerCase();return P==="modified"?"modified":P==="added"?"added":P==="deleted"?"deleted":P==="renamed"?"renamed":P==="untracked"?"untracked":P==="conflicted"?"conflicted":P==="ignored"?"ignored":P==="clean"?"clean":"unknown"}const l={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function a($){return l[r($)]??"?"}function u($,P=60){return $.length<=P?$:"…"+$.slice($.length-P+1)}const c=F(()=>s.gitInfo!==null),d=F(()=>s.changes.length>0),f=F(()=>(s.selectedDiffPath??null)!==null),p=F(()=>s.mode==="detail"||s.mode==="full"&&f.value),g=F(()=>s.fileDiff??[]),m=F(()=>s.fileDiffLoading===!0);function y($){o("open",$)}function w(){o("back")}function k(){o("close")}const A=Z("list");function v($){A.value=$}function x($){const P={children:[]},O=[...$].sort((R,W)=>R.path.localeCompare(W.path));for(const R of O){const W=R.path.endsWith("/"),z=R.path.split("/").filter(Boolean);if(z.length===0)continue;let G=P;for(let K=0;K<z.length;K++){const H=z[K],q=K===z.length-1&&!W,X=z.slice(0,K+1).join("/");let ee=G.children.find(ue=>ue.name===H&&ue.kind===(q?"file":"folder"));ee||(ee={name:H,path:X,kind:q?"file":"folder",status:q?R.status:void 0,children:[]},G.children.push(ee)),G=ee}}return P.children}const E=F(()=>x(s.changes)),S=Z(new Set);function M($){return!S.value.has($)}const _=F(()=>{const $=[];function P(O,R){for(const W of O)$.push({node:W,depth:R}),W.kind==="folder"&&M(W.path)&&P(W.children,R+1)}return P(E.value,0),$});function N($){const P=new Set(S.value);P.has($.path)?P.delete($.path):P.add($.path),S.value=P}function D($){return`calc(var(--tree-base-indent) + ${$} * var(--tree-indent-step))`}function T($){return{paddingLeft:D($),"--tree-depth":String($)}}return($,P)=>(b(),I("div",MOe,[p.value?(b(),I(Be,{key:0},[V(h(Uc),{title:h(n)("diff.title"),closable:e.closable,"close-label":h(n)("diff.close"),onClose:k},{default:he(()=>[V(h(gn),{text:e.selectedDiffPath??""},{default:he(()=>[C("span",IOe,B(u(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),C("div",EOe,[e.hideBack?ne("",!0):(b(),fe(h(jt),{key:0,variant:"ghost",size:"sm",onClick:w},{default:he(()=>[V(h(Ce),{name:"arrow-left",size:"sm"}),C("span",TOe,B(h(n)("diff.back")),1)]),_:1}))]),V(ys,{name:"diff-content",mode:"out-in"},{default:he(()=>[m.value?(b(),I("div",LOe,[V(h(Bi),{size:"md"}),C("span",null,B(h(n)("diff.loading")),1)])):g.value.length>0?(b(),I("div",NOe,[V(al,{lines:g.value,path:e.selectedDiffPath??void 0,"line-numbers":"",framed:!1,"full-texts":e.fullTexts??null},null,8,["lines","path","full-texts"])])):(b(),I("div",FOe,B(e.emptyFile?h(n)("diff.emptyFile"):h(n)("diff.noDiff")),1))]),_:1})],64)):(b(),I(Be,{key:1},[V(h(Uc),{title:h(n)("diff.title"),closable:e.closable,"close-label":h(n)("diff.close"),onClose:k},{default:he(()=>[C("span",BOe,B(i(e.changes.length)),1),V(h(wo),{"model-value":A.value,size:"sm",options:[{value:"list",label:h(n)("diff.list"),icon:"list"},{value:"tree",label:h(n)("diff.tree"),icon:"tree-view"}],"onUpdate:modelValue":v},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),C("div",$Oe,[c.value?(b(),I(Be,{key:0},[C("span",DOe,[V(h(Ce),{class:"br-icon",name:"git-fork",size:"sm"}),C("span",ROe,B(h(n)("diff.branch")),1)]),C("span",zOe,B(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(b(),I("span",OOe,[V(h(gn),{text:h(n)("diff.aheadTitle")},{default:he(()=>[e.gitInfo.ahead>0?(b(),I("span",POe,"↑"+B(e.gitInfo.ahead),1)):ne("",!0)]),_:1},8,["text"]),V(h(gn),{text:h(n)("diff.behindTitle")},{default:he(()=>[e.gitInfo.behind>0?(b(),I("span",jOe,"↓"+B(e.gitInfo.behind),1)):ne("",!0)]),_:1},8,["text"])])):ne("",!0)],64)):(b(),I("span",HOe,B(h(n)("diff.empty")),1))]),d.value&&A.value==="list"?(b(),fe(h(sA),{key:0,class:"ch-list"},{default:he(()=>[C("div",WOe,[(b(!0),I(Be,null,yt(e.changes,O=>(b(),fe(h(gn),{key:O.path,text:O.path},{default:he(()=>[C("button",{type:"button",class:"ch-row",onClick:R=>y(O.path)},[C("span",{class:De(["badge",r(O.status)])},B(a(O.status)),3),C("span",UOe,B(u(O.path)),1)],8,qOe)]),_:2},1032,["text"]))),128))])]),_:1})):d.value&&A.value==="tree"?(b(),fe(h(sA),{key:1,class:"ch-list ch-tree"},{default:he(()=>[V(QI,{name:"tree-collapse",tag:"ul",class:"tree-list ch-list-content"},{default:he(()=>[(b(!0),I(Be,null,yt(_.value,({node:O,depth:R})=>(b(),I("li",{key:O.path,class:"tree-node"},[O.kind==="folder"?(b(),I("button",{key:0,type:"button",class:"tree-row tree-folder",style:Vt(T(R)),onClick:W=>N(O)},[V(h(Ce),{class:"tree-icon",name:"folder-solid",size:"sm"}),C("span",VOe,B(O.name),1)],12,KOe)):(b(),fe(h(gn),{key:1,text:O.path},{default:he(()=>[C("button",{type:"button",class:"tree-row tree-file",style:Vt(T(R)),onClick:W=>y(O.path)},[C("span",{class:De(["badge",r(O.status)])},B(a(O.status)),3),C("span",GOe,B(O.name),1)],12,ZOe)]),_:2},1032,["text"]))]))),128))]),_:1})]),_:1})):c.value?(b(),I("div",QOe,[C("span",YOe,[V(h(Ce),{name:"check",size:"lg"})]),Ue(" "+B(h(n)("diff.clean")),1)])):(b(),I("div",JOe,B(h(n)("diff.empty")),1))],64))]))}}),ePe=vt(XOe,[["__scopeId","data-v-7d5ab9c7"]]),tPe={class:"td"},nPe={class:"td-path"},iPe={class:"td-body"},sPe={key:1,class:"td-empty"},oPe=tt({__name:"TurnDiffPanel",props:{change:{},cwd:{},closable:{type:Boolean}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>{const a=n.cwd?av(n.change.path,n.cwd):null;return r(a??n.change.path)});function r(a,u=48){return!a||a.length<=u?a:"…"+a.slice(a.length-u+1)}const l=F(()=>n.change.diff!==null&&n.change.diff.length>0);return(a,u)=>(b(),I("div",tPe,[V(h(Uc),{title:h(s)("conversation.turnFiles.diffTitle"),closable:e.closable,"close-label":h(s)("filePreview.close"),onClose:u[1]||(u[1]=c=>i("close"))},{default:he(()=>[V(h(gn),{text:e.change.path},{default:he(()=>[C("span",nPe,B(o.value),1)]),_:1},8,["text"]),V(h(rn),{size:"sm",label:h(s)("conversation.turnFiles.openFile"),tooltip:h(s)("conversation.turnFiles.openFile"),onClick:u[0]||(u[0]=c=>i("openFile",e.change.path))},{default:he(()=>[V(h(Ce),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])]),_:1},8,["title","closable","close-label"]),C("div",iPe,[l.value?(b(),fe(al,{key:0,lines:e.change.diff,path:e.change.path,framed:!1},null,8,["lines","path"])):(b(),I("div",sPe,[C("p",null,B(h(s)("conversation.turnFiles.diffUnavailable")),1),V(h(jt),{variant:"ghost",size:"sm",onClick:u[2]||(u[2]=c=>i("openFile",e.change.path))},{default:he(()=>[Ue(B(h(s)("conversation.turnFiles.openFile")),1)]),_:1})]))])]))}}),rPe=vt(oPe,[["__scopeId","data-v-fdd0bc05"]]);function KD(e,t){let n=null;pn(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,kt(()=>{const i=t?.value??e.value;try{i?.focus()}catch{}})}),Gn(()=>{const i=n;if(n=null,!(!i||typeof document>"u"||!document.contains(i)))try{i.focus()}catch{}})}const lPe={class:"search-wrap"},aPe=["aria-label"],uPe=["aria-label"],cPe=["aria-pressed","onClick"],dPe={key:1,class:"state-row"},fPe={key:2,class:"state-row unavail"},hPe=["aria-label"],pPe=["aria-selected","onClick","onMouseenter"],gPe={class:"model-main"},mPe={class:"model-name"},vPe={class:"model-meta"},yPe={class:"model-side"},bPe={key:0,class:"empty"},kPe={class:"footer-hint","aria-hidden":"true"},APe=tt({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=F(()=>new Set(i.starredIds??[]));function r(D){return o.value.has(D)}const l=Z(""),a=Z(null),u=Z(null),c=Z(null),d=Z("all"),f={image_in:"model.capabilityImageInput",video_in:"model.capabilityVideoInput",tool_use:"model.capabilityToolUse",thinking:"model.capabilityThinking",always_thinking:"model.capabilityAlwaysThinking"};function p(D){const T=f[D];return T?n(T):D.replaceAll("_"," ")}function g(D){const T=[D.provider,n("model.contextSuffix",{size:Ia(D.maxContextSize)})];for(const $ of D.capabilities??[])T.push(p($));return T.join(" · ")}KD(u,a);const m=F(()=>{const D=new Set,T=[{id:"all",label:n("model.allTab")}];for(const $ of i.models)D.has($.provider)||(D.add($.provider),T.push({id:$.provider,label:$.provider}));return T}),y=F(()=>{const D=l.value.toLowerCase().trim(),T=i.models.filter($=>{if(d.value!=="all"&&$.provider!==d.value)return!1;const P=($.displayName??$.model).toLowerCase().includes(D),O=$.provider.toLowerCase().includes(D),R=$.id.toLowerCase().includes(D);return!D||P||O||R});return d.value!=="all"?T:T.sort(($,P)=>{const O=r($.id)?1:0;return(r(P.id)?1:0)-O})}),w=F(()=>y.value),k=Z(0);Qe([l,d],()=>{k.value=0}),Qe(m,D=>{D.some(T=>T.id===d.value)||(d.value="all")}),Qe(w,D=>{k.value=Math.min(k.value,Math.max(D.length-1,0))}),Qe(k,async()=>{await kt(),c.value?.querySelector(".model-row.is-selected")?.scrollIntoView({block:"nearest"})});const{handleCompositionStart:A,handleCompositionEnd:v,isComposingKeyEvent:x}=Kr();function E(D){if(!x(D)){if(D.key==="Escape"){s("close");return}if(D.key==="ArrowDown")D.preventDefault(),k.value=Math.min(k.value+1,w.value.length-1);else if(D.key==="ArrowUp")D.preventDefault(),k.value=Math.max(k.value-1,0);else if(D.key==="Enter"){const T=w.value[k.value];T&&s("select",T.id)}}}pn(()=>{document.addEventListener("keydown",E)}),An(()=>{document.removeEventListener("keydown",E)});function S(D){s("select",D)}function M(){l.value="",a.value?.focus()}function _(D){return w.value.indexOf(D)}function N(D){d.value=D}return(D,T)=>(b(),fe(h(La),{open:!0,"close-on-esc":!1,title:h(n)("model.title"),size:"lg",height:"fixed",padded:!1,onClose:T[1]||(T[1]=$=>s("close"))},{default:he(()=>[C("div",{ref_key:"dialogRef",ref:u,class:"mp"},[C("div",lPe,[V(h(io),{ref_key:"searchRef",ref:a,modelValue:l.value,"onUpdate:modelValue":T[0]||(T[0]=$=>l.value=$),placeholder:h(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:"",onCompositionstart:h(A),onCompositionend:h(v)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),V(h(gn),{text:h(n)("model.clearSearch")},{default:he(()=>[C("button",{type:"button",class:De(["search-clear",{"is-on":l.value.length>0}]),tabindex:"-1","aria-label":h(n)("model.clearSearch"),onClick:M},[V(h(Ce),{name:"close",size:"sm"})],10,aPe)]),_:1},8,["text"])]),m.value.length>1?(b(),I("div",{key:0,class:"chip-strip","aria-label":h(n)("model.providerTabs")},[(b(!0),I(Be,null,yt(m.value,$=>(b(),I("button",{key:$.id,type:"button",class:De(["chip",{"is-active":$.id===d.value}]),"aria-pressed":$.id===d.value,onClick:P=>N($.id)},B($.label),11,cPe))),128))],8,uPe)):ne("",!0),e.loading?(b(),I("div",dPe,[V(h(Bi),{size:"sm"}),C("span",null,B(h(n)("model.loading")),1)])):e.unavailable?(b(),I("div",fPe,[V(h(Ce),{name:"alert-triangle",size:"lg"}),C("span",null,B(h(n)("model.unavailable")),1)])):(b(),I("div",{key:3,ref_key:"listRef",ref:c,class:"model-list",role:"listbox","aria-label":h(n)("model.title")},[(b(!0),I(Be,null,yt(w.value,$=>(b(),I("div",{key:$.id,class:De(["model-row",{"is-current":$.id===e.current,"is-selected":_($)===k.value}]),role:"option","aria-selected":$.id===e.current,onClick:P=>S($.id),onMouseenter:P=>k.value=_($)},[C("span",gPe,[C("span",mPe,B($.displayName??$.model),1),C("span",vPe,B(g($)),1)]),C("span",yPe,[$.id===e.current?(b(),fe(h(Ce),{key:0,class:"model-check",name:"check",size:"sm"})):ne("",!0),V(h(rn),{class:De(["model-star",{"is-starred":r($.id)}]),size:"sm",label:r($.id)?h(n)("model.unstarTitle"):h(n)("model.starTitle"),tooltip:r($.id)?h(n)("model.unstarTitle"):h(n)("model.starTitle"),onClick:It(P=>s("toggle-star",$.id),["stop"])},{default:he(()=>[r($.id)?(b(),fe(h(Ce),{key:0,name:"star",size:"md"})):(b(),fe(h(Ce),{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["class","label","tooltip","onClick"])])],42,pPe))),128)),w.value.length===0?(b(),I("div",bPe,B(i.models.length===0?h(n)("model.emptyNoModels"):h(n)("model.emptyNoMatch")),1)):ne("",!0)],8,hPe)),C("div",kPe,[V(h(Aa),{keys:["↑","↓"]}),C("span",null,B(h(n)("model.hintNavigate")),1),T[2]||(T[2]=C("span",{class:"hint-dot"},"·",-1)),V(h(Aa),{keys:["Enter"]}),C("span",null,B(h(n)("model.hintSelect")),1),T[3]||(T[3]=C("span",{class:"hint-dot"},"·",-1)),V(h(Aa),{keys:["Esc"]}),C("span",null,B(h(n)("model.hintClose")),1)])],512)]),_:1},8,["title"]))}}),CPe=vt(APe,[["__scopeId","data-v-3ba22330"]]),wPe={key:0,class:"center-body"},xPe={class:"center-text"},_Pe={key:1,class:"nb"},SPe={class:"nb-lead"},MPe=["href"],IPe={class:"nb-code-row"},EPe=["title"],TPe={class:"nb-status"},LPe={class:"nb-status-text"},NPe={class:"nb-countdown"},FPe={key:2,class:"center-body"},BPe={class:"center-text success-text"},$Pe={class:"center-hint"},DPe={class:"center-body"},RPe={class:"center-text err-text"},zPe={class:"center-hint"},OPe={class:"actions"},PPe={class:"center-body"},jPe={class:"center-text warn-text"},HPe={class:"center-hint"},WPe={class:"actions"},qPe=tt({__name:"LoginDialog",props:{onStartOAuthLogin:{type:Function},onPollOAuthLogin:{type:Function},onCancelOAuthLogin:{type:Function}},emits:["success","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=Z(!0),s=t,o=e,{step:r,pollError:l,flow:a,secondsLeft:u,startFlow:c,cancelFlow:d}=r$({onStartOAuthLogin:o.onStartOAuthLogin,onPollOAuthLogin:o.onPollOAuthLogin,onCancelOAuthLogin:o.onCancelOAuthLogin,onSuccess:()=>{s("success"),s("close")}}),f=Z(!1);pn(async()=>{await c()});async function p(){!a.value||!await ro(a.value.verificationUriComplete)||(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}async function g(){d(),s("close")}function m(y){const w=Math.floor(y/60),k=y%60;return`${w}:${String(k).padStart(2,"0")}`}return(y,w)=>(b(),fe(h(La),{open:i.value,"onUpdate:open":w[0]||(w[0]=k=>i.value=k),title:h(n)("login.title"),"close-on-overlay":!1,onClose:g},{default:he(()=>[h(r)==="starting"?(b(),I("div",wPe,[V(h(Bi),{size:"md"}),C("span",xPe,B(h(n)("login.starting")),1)])):h(r)==="device-code"&&h(a)?(b(),I("div",_Pe,[C("div",SPe,B(h(n)("login.lead")),1),C("a",{class:"nb-primary",href:h(a).verificationUriComplete,target:"_blank",rel:"noopener noreferrer"},[Ue(B(h(n)("login.authorizeInBrowser"))+" ",1),V(h(Ce),{name:"external-link",size:"sm"})],8,MPe),C("div",IPe,[C("span",{class:"nb-link",title:h(a).verificationUriComplete},B(h(a).verificationUriComplete),9,EPe),V(h(jt),{class:De(["nb-copy",{"is-copied":f.value}]),variant:"secondary",size:"sm",onClick:p},{default:he(()=>[f.value?(b(),I(Be,{key:0},[V(h(Ce),{name:"check",size:"sm"}),Ue(" "+B(h(n)("login.copied")),1)],64)):(b(),I(Be,{key:1},[V(h(Ce),{name:"copy",size:"sm"}),Ue(" "+B(h(n)("login.copyLink")),1)],64))]),_:1},8,["class"])]),C("div",TPe,[V(h(Bi),{size:"sm",label:h(n)("login.waitingAuth")},null,8,["label"]),C("span",LPe,B(h(n)("login.waitingAutoClose")),1),C("span",NPe,B(m(h(u))),1)])])):h(r)==="success"?(b(),I("div",FPe,[V(h(cf),{kind:"success"}),C("span",BPe,B(h(n)("login.success")),1),C("span",$Pe,B(h(n)("login.successHint")),1)])):h(r)==="expired"?(b(),I(Be,{key:3},[C("div",DPe,[V(h(cf),{kind:"expired"}),C("span",RPe,B(h(n)("login.expiredTitle")),1),C("span",zPe,B(h(n)("login.expiredHint")),1)]),C("div",OPe,[V(h(jt),{variant:"primary",onClick:h(c)},{default:he(()=>[Ue(B(h(n)("login.retry")),1)]),_:1},8,["onClick"]),V(h(jt),{variant:"secondary",onClick:g},{default:he(()=>[Ue(B(h(n)("login.closeBtn")),1)]),_:1})])],64)):h(r)==="error"?(b(),I(Be,{key:4},[C("div",PPe,[V(h(cf),{kind:"error"}),C("span",jPe,B(h(l)?h(n)("login.pollErrorTitle"):h(n)("login.errorTitle")),1),C("span",HPe,B(h(l)?h(n)("login.pollErrorHint"):h(n)("login.errorHint")),1)]),C("div",WPe,[V(h(jt),{variant:"primary",onClick:h(c)},{default:he(()=>[Ue(B(h(n)("login.retry")),1)]),_:1},8,["onClick"]),V(h(jt),{variant:"secondary",onClick:g},{default:he(()=>[Ue(B(h(n)("login.closeBtn")),1)]),_:1})])],64)):ne("",!0)]),_:1},8,["open","title"]))}}),UPe=vt(qPe,[["__scopeId","data-v-0b06fca3"]]),VD=tt({__name:"LanguageSwitcher",props:{size:{default:"md"}},setup(e){const{locale:t}=Bt(),n=u2.map(s=>({value:s.code,label:s.label}));function i(s){t.value!==s&&Jb(s)}return(s,o)=>(b(),fe(h(wo),{"model-value":h(t),options:h(n),size:e.size,"onUpdate:modelValue":i},null,8,["model-value","options","size"]))}}),KPe={class:"msg"},VPe={class:"pf-field"},ZPe={class:"pf-field-label"},GPe={class:"pf-field"},QPe={class:"pf-field-label"},YPe={class:"pf-field"},JPe={class:"pf-field-label"},XPe={class:"pf-key-wrap"},eje={class:"pf-field"},tje={class:"pf-field-label"},nje={class:"pf-field"},ije={class:"pf-field-label"},sje={class:"pf-models"},oje={key:0,class:"pf-models-empty"},rje={class:"pf-model-grid pf-model-head"},lje={key:1},aje={key:0},uje={class:"pf-foot"},cje={key:0,class:"pf-managed-note"},dje={class:"pf-confirm-msg"},fje=tt({__name:"ProviderForm",props:{mode:{},provider:{},guard:{type:Boolean}},emits:["dirtyChange","guardStay","guardDiscard","added","saved","deleting","deleted","cancel"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Fa(),r=Ts({id:"",type:"openai",apiKey:"",baseUrl:"",models:[z0()]}),l=Z(""),a=Z(!1),u=Z(!1),c=Z(!1),d=F(()=>n.mode==="add"),f=F(()=>n.provider!==void 0&&gL(n.provider)),p=F(()=>{const $=n.provider;return $===void 0?0:b3($,o.config.value?.models).length}),g=F(()=>f.value&&p.value===0),m=F(()=>pte.map($=>({value:$,label:s(`providers.types.${$}`)}))),y=F(()=>f.value?s("providers.apiKeyManaged"):!d.value&&n.provider?.hasApiKey===!0?s("providers.apiKeySet"):"sk-…");function w(){l.value="",u.value=!1;const $=n.provider;if(d.value||$===void 0){r.id="",r.type="openai",r.apiKey="",r.baseUrl="",r.models=[z0()];return}r.id=$.id,r.type=$.type,r.apiKey="",r.baseUrl=$.baseUrl??"";const P=b3($,o.config.value?.models);r.models=P.length>0?P:[z0()]}pn(()=>{w(),v()});const k=Z(!1),A=Z(!1);async function v(){const $=n.provider;if(!(d.value||$===void 0||f.value||$.hasApiKey!==!0))try{const P=await o.getProvider($.id);if(A.value)return;P.apiKey!==void 0&&P.apiKey!==""&&(r.apiKey=P.apiKey,k.value=!0)}catch{}}function x(){i("dirtyChange",!0)}const E=Z(!1),S=Z();function M($){l.value=$,kt(()=>S.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}async function _(){if(a.value)return;const $=gte(r,{requireApiKey:d.value,requireBaseUrl:d.value});if($!==null){M(s(`providers.error.${$}`));return}l.value="",a.value=!0;try{if(d.value){const P=await o.addProvider(mte(r));if(P!==null){M(P);return}i("dirtyChange",!1),o.notify({severity:"success",title:s("providers.added")}),i("added",r.id.trim())}else{const P=n.provider;if(P===void 0)return;const O=o.config.value?.providers?.[P.id]?.defaultModel,R=await o.updateProvider(P.id,vte(r,P,{includeBlankApiKey:k.value,existingDefaultModel:O}));if(R!==null){M(R);return}await o.checkAuth(),o.notify({severity:"success",title:s("providers.saved")}),i("dirtyChange",!1),i("saved",r.id.trim())}}finally{a.value=!1}}async function N(){const $=n.provider;if(!($===void 0||c.value)){c.value=!0,i("deleting"),await new Promise(P=>setTimeout(P,300));try{if(await o.deleteProvider($.id)===null){u.value=!1;return}i("dirtyChange",!1),i("deleted",$.id)}finally{c.value=!1}}}function D(){r.models.push(z0()),x()}function T($){r.models.length<=1||(r.models.splice($,1),x())}return($,P)=>(b(),I("div",{class:"pf-form",onInput:x},[e.guard?(b(),fe(h(Ac),{key:0,variant:"warning",class:"pf-guard"},{default:he(()=>[C("span",KPe,B(h(s)("providers.unsavedGuard")),1),V(h(jt),{variant:"secondary",size:"sm",onClick:P[0]||(P[0]=O=>i("guardStay"))},{default:he(()=>[Ue(B(h(s)("providers.guardStay")),1)]),_:1}),V(h(jt),{variant:"danger",size:"sm",onClick:P[1]||(P[1]=O=>i("guardDiscard"))},{default:he(()=>[Ue(B(h(s)("providers.guardDiscard")),1)]),_:1})]),_:1})):ne("",!0),l.value?(b(),I("div",{key:1,ref_key:"errorBox",ref:S},[V(h(Ac),{variant:"danger"},{default:he(()=>[Ue(B(l.value),1)]),_:1})],512)):ne("",!0),C("div",VPe,[C("label",ZPe,[Ue(B(h(s)("providers.fieldId")),1),P[11]||(P[11]=C("span",{class:"req"}," *",-1))]),V(h(io),{modelValue:r.id,"onUpdate:modelValue":P[2]||(P[2]=O=>r.id=O),placeholder:"my-openai",disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","disabled"])]),C("div",GPe,[C("label",QPe,[Ue(B(h(s)("providers.fieldType")),1),P[12]||(P[12]=C("span",{class:"req"}," *",-1))]),V(h(e3),{"model-value":r.type,options:m.value,disabled:f.value,"onUpdate:modelValue":P[3]||(P[3]=O=>{r.type=O,x()})},null,8,["model-value","options","disabled"])]),C("div",YPe,[C("label",JPe,[Ue(B(h(s)("providers.fieldApiKey")),1),P[13]||(P[13]=C("span",{class:"req"}," *",-1))]),C("div",XPe,[V(h(io),{modelValue:r.apiKey,"onUpdate:modelValue":P[4]||(P[4]=O=>r.apiKey=O),type:E.value?"text":"password",placeholder:y.value,disabled:f.value,autocomplete:"off",spellcheck:"false",onInput:P[5]||(P[5]=O=>A.value=!0)},null,8,["modelValue","type","placeholder","disabled"]),f.value?ne("",!0):(b(),fe(h(rn),{key:0,class:"pf-key-eye",size:"sm",label:h(s)(E.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:h(s)(E.value?"providers.hideApiKey":"providers.showApiKey"),onClick:P[6]||(P[6]=O=>E.value=!E.value)},{default:he(()=>[V(h(Ce),{name:E.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"]))])]),C("div",eje,[C("label",tje,[Ue(B(h(s)("providers.fieldBaseUrl")),1),P[14]||(P[14]=C("span",{class:"req"}," *",-1))]),V(h(io),{modelValue:r.baseUrl,"onUpdate:modelValue":P[7]||(P[7]=O=>r.baseUrl=O),placeholder:h(s)("providers.baseUrlPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder","disabled"])]),C("div",nje,[C("label",ije,[Ue(B(h(s)("providers.fieldModels")),1),P[15]||(P[15]=C("span",{class:"req"}," *",-1))]),C("div",sje,[g.value?(b(),I("div",oje,B(h(s)("providers.noModels")),1)):(b(),I(Be,{key:1},[C("div",rje,[C("span",null,[Ue(B(h(s)("providers.colModelId")),1),P[16]||(P[16]=C("span",{class:"req"}," *",-1))]),C("span",null,[Ue(B(h(s)("providers.colContext")),1),P[17]||(P[17]=C("span",{class:"req"}," *",-1))]),C("span",null,B(h(s)("providers.colDisplayName")),1),P[18]||(P[18]=C("span",null,null,-1))]),(b(!0),I(Be,null,yt(r.models,(O,R)=>(b(),I("div",{key:R,class:"pf-model-grid"},[V(h(io),{modelValue:O.model,"onUpdate:modelValue":W=>O.model=W,placeholder:h(s)("providers.modelIdPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),V(h(io),{modelValue:O.maxContextSize,"onUpdate:modelValue":W=>O.maxContextSize=W,inputmode:"numeric",placeholder:h(s)("providers.modelContextPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),V(h(io),{modelValue:O.displayName,"onUpdate:modelValue":W=>O.displayName=W,placeholder:h(s)("providers.modelNamePlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),f.value?(b(),I("span",lje)):(b(),fe(h(rn),{key:0,size:"sm",label:h(s)("providers.removeModel"),tooltip:h(s)("providers.removeModel"),disabled:r.models.length<=1,onClick:W=>T(R)},{default:he(()=>[V(h(Ce),{name:"trash",size:"sm"})]),_:1},8,["label","tooltip","disabled","onClick"]))]))),128)),f.value?ne("",!0):(b(),I("div",aje,[V(h(jt),{variant:"ghost",size:"sm",onClick:D},{default:he(()=>[V(h(Ce),{name:"plus",size:"sm"}),Ue(" "+B(h(s)("providers.addModel")),1)]),_:1})]))],64))])]),C("div",uje,[f.value?(b(),I("span",cje,B(h(s)("providers.managedHint")),1)):d.value?(b(),I(Be,{key:1},[V(h(jt),{variant:"secondary",size:"sm",onClick:P[8]||(P[8]=O=>i("cancel"))},{default:he(()=>[Ue(B(h(s)("common.cancel")),1)]),_:1}),V(h(jt),{variant:"primary",size:"sm",disabled:a.value,onClick:_},{default:he(()=>[Ue(B(h(s)("providers.addProvider")),1)]),_:1},8,["disabled"])],64)):u.value&&n.provider!==void 0?(b(),I(Be,{key:2},[C("span",dje,B(h(s)("providers.deleteConfirm",{id:n.provider.id,count:p.value})),1),P[19]||(P[19]=C("span",{class:"spacer"},null,-1)),V(h(jt),{variant:"secondary",size:"sm",disabled:c.value,onClick:P[9]||(P[9]=O=>u.value=!1)},{default:he(()=>[Ue(B(h(s)("common.cancel")),1)]),_:1},8,["disabled"]),V(h(jt),{variant:"danger",size:"sm",disabled:c.value,onClick:N},{default:he(()=>[Ue(B(h(s)("providers.deleteConfirmYes")),1)]),_:1},8,["disabled"])],64)):(b(),I(Be,{key:3},[V(h(jt),{variant:"danger-soft",size:"sm",onClick:P[10]||(P[10]=O=>u.value=!0)},{default:he(()=>[Ue(B(h(s)("providers.deleteProvider")),1)]),_:1}),P[20]||(P[20]=C("span",{class:"spacer"},null,-1)),V(h(jt),{variant:"primary",size:"sm",disabled:a.value,onClick:_},{default:he(()=>[Ue(B(h(s)("providers.save")),1)]),_:1},8,["disabled"])],64))])],32))}}),ZD=vt(fje,[["__scopeId","data-v-ac0597e3"]]),hje={class:"af"},pje={class:"msg"},gje={key:2,class:"af-catalog"},mje={key:0,class:"af-center"},vje={key:1,class:"af-error"},yje={class:"af-list"},bje=["disabled","onClick"],kje={class:"af-entry-name"},Aje={key:1,class:"af-entry-reason"},Cje={key:2,class:"af-entry-count"},wje={key:0,class:"af-empty"},xje={class:"af-field"},_je={class:"af-label"},Sje={class:"af-field"},Mje={class:"af-label"},Ije={class:"af-key-wrap"},Eje={key:0,class:"af-field"},Tje={class:"af-label"},Lje={class:"af-note"},Nje={class:"af-foot"},Fje={class:"af-hint"},Bje={class:"af-field"},$je={class:"af-label"},Dje={class:"af-field"},Rje={class:"af-label"},zje={class:"af-key-wrap"},Oje={class:"af-foot"},Pje={class:"af-manual"},jje=tt({__name:"AddProviderFlow",props:{guard:{type:Boolean}},emits:["dirtyChange","guardStay","guardDiscard","added","cancel"],setup(e,{emit:t}){const n=t,{t:i,te:s}=Bt(),o=Fa(),r=Z("catalog"),l=F(()=>[{value:"catalog",label:i("providers.catalog.sourceCatalog")},{value:"registry",label:i("providers.catalog.sourceRegistry")},{value:"manual",label:i("providers.catalog.sourceManual")}]),a=Z("loading"),u=Z([]);async function c(){a.value="loading";const z=await o.loadCatalogProviders();z.kind==="ok"?(u.value=z.items,a.value="ready"):z.kind==="unsupported"?(a.value="unsupported",r.value==="catalog"&&(r.value="manual")):a.value="error"}pn(c);const d=Z(""),f=F(()=>{const z=d.value.trim().toLowerCase();return z===""?u.value:u.value.filter(G=>G.name.toLowerCase().includes(z)||G.id.toLowerCase().includes(z))});function p(z){const G=z.rejectReason;return G!==null&&s(`providers.catalog.rejectReason.${G}`)?i(`providers.catalog.rejectReason.${G}`):i("providers.catalog.rejected")}const g=Z(null),m=Z({id:"",apiKey:"",baseUrl:""}),y=Z(!1),w=Z(!1),k=Z("");function A(z){g.value=z,m.value={id:z.id,apiKey:"",baseUrl:""},k.value="",y.value=!1}function v(){g.value=null,k.value="",n("dirtyChange",!1)}function x(){n("dirtyChange",!0)}const E=F(()=>{if(g.value===null)return!1;const G=m.value.id.trim();return G!==""&&o.providers.value.some(K=>K.id===G)}),S=Z();function M(z){k.value=z,kt(()=>S.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}function _(){const z=m.value,G=z.id.trim();return G===""?i("providers.error.idRequired"):hL.test(G)?z.apiKey.trim()===""?i("providers.error.apiKeyRequired"):g.value?.needsBaseUrl===!0&&z.baseUrl.trim()===""?i("providers.error.baseUrlRequired"):null:i("providers.error.idInvalid")}async function N(){const z=g.value;if(z===null||w.value)return;const G=_();if(G!==null){M(G);return}k.value="",w.value=!0;try{const K=m.value,H=K.id.trim(),q=K.baseUrl.trim(),X=await o.importCatalogProvider({catalogId:z.id,apiKey:K.apiKey.trim(),...q===""?{}:{baseUrl:q},...H===z.id?{}:{id:H}});if(X!==null){M(X);return}o.notify({severity:"success",title:i("providers.added")}),n("dirtyChange",!1),n("added",H)}finally{w.value=!1}}const D=Z({url:"",apiKey:""}),T=Z(!1),$=Z(!1),P=Z(""),O=Z();function R(z){P.value=z,kt(()=>O.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}async function W(){if($.value)return;const z=D.value.url.trim();if(z===""){R(i("providers.error.registryUrlRequired"));return}P.value="",$.value=!0;try{const G=D.value.apiKey.trim(),K=await o.importCustomRegistry({url:z,...G===""?{}:{apiKey:G}});if(typeof K=="string"){R(K);return}o.notify({severity:"success",title:i("providers.catalog.registryImported",{count:K.providers.length})}),n("dirtyChange",!1);const H=K.providers[0];H!==void 0?n("added",H.id):n("cancel")}finally{$.value=!1}}return(z,G)=>(b(),I("div",hje,[e.guard?(b(),fe(h(Ac),{key:0,variant:"warning",class:"af-guard"},{default:he(()=>[C("span",pje,B(h(i)("providers.unsavedGuard")),1),V(h(jt),{variant:"secondary",size:"sm",onClick:G[0]||(G[0]=K=>n("guardStay"))},{default:he(()=>[Ue(B(h(i)("providers.guardStay")),1)]),_:1}),V(h(jt),{variant:"danger",size:"sm",onClick:G[1]||(G[1]=K=>n("guardDiscard"))},{default:he(()=>[Ue(B(h(i)("providers.guardDiscard")),1)]),_:1})]),_:1})):ne("",!0),a.value!=="unsupported"?(b(),fe(h(wo),{key:1,modelValue:r.value,"onUpdate:modelValue":G[2]||(G[2]=K=>r.value=K),size:"sm",options:l.value},null,8,["modelValue","options"])):ne("",!0),a.value!=="unsupported"?Bn((b(),I("div",gje,[a.value==="loading"?(b(),I("div",mje,[V(h(Bi),{size:"sm"}),C("span",null,B(h(i)("providers.catalog.loading")),1)])):a.value==="error"?(b(),I("div",vje,[V(h(Ac),{variant:"danger"},{default:he(()=>[Ue(B(h(i)("providers.catalog.loadError")),1)]),_:1}),C("div",null,[V(h(jt),{variant:"secondary",size:"sm",onClick:c},{default:he(()=>[Ue(B(h(i)("providers.catalog.retry")),1)]),_:1})])])):g.value===null?(b(),I(Be,{key:2},[V(h(io),{modelValue:d.value,"onUpdate:modelValue":G[3]||(G[3]=K=>d.value=K),placeholder:h(i)("providers.catalog.searchPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"]),C("div",yje,[(b(!0),I(Be,null,yt(f.value,K=>(b(),I("button",{key:K.id,type:"button",class:"af-entry",disabled:K.rejected,onClick:H=>A(K)},[C("span",kje,B(K.name),1),K.wireType!==null?(b(),fe(h(Hl),{key:0,variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(K.wireType),1)]),_:2},1024)):ne("",!0),G[16]||(G[16]=C("span",{class:"grow"},null,-1)),K.rejected?(b(),I("span",Aje,B(p(K)),1)):(b(),I("span",Cje,B(h(i)("providers.modelCount",{count:K.models.length})),1))],8,bje))),128)),f.value.length===0?(b(),I("div",wje,B(h(i)("providers.catalog.empty")),1)):ne("",!0)])],64)):(b(),I("div",{key:3,class:"af-import",onInput:x},[C("button",{type:"button",class:"af-back",onClick:v},[V(h(Ce),{name:"arrow-left",size:"sm"}),Ue(" "+B(h(i)("providers.catalog.backToList")),1)]),C("div",xje,[C("label",_je,[Ue(B(h(i)("providers.fieldId")),1),G[17]||(G[17]=C("span",{class:"req"}," *",-1))]),V(h(io),{modelValue:m.value.id,"onUpdate:modelValue":G[4]||(G[4]=K=>m.value.id=K),autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),C("div",Sje,[C("label",Mje,[Ue(B(h(i)("providers.fieldApiKey")),1),G[18]||(G[18]=C("span",{class:"req"}," *",-1))]),C("div",Ije,[V(h(io),{modelValue:m.value.apiKey,"onUpdate:modelValue":G[5]||(G[5]=K=>m.value.apiKey=K),type:y.value?"text":"password",placeholder:"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type"]),V(h(rn),{class:"af-key-eye",size:"sm",label:h(i)(y.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:h(i)(y.value?"providers.hideApiKey":"providers.showApiKey"),onClick:G[6]||(G[6]=K=>y.value=!y.value)},{default:he(()=>[V(h(Ce),{name:y.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])])]),g.value.needsBaseUrl?(b(),I("div",Eje,[C("label",Tje,[Ue(B(h(i)("providers.fieldBaseUrl")),1),G[19]||(G[19]=C("span",{class:"req"}," *",-1))]),V(h(io),{modelValue:m.value.baseUrl,"onUpdate:modelValue":G[7]||(G[7]=K=>m.value.baseUrl=K),placeholder:h(i)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])])):ne("",!0),E.value?(b(),fe(h(Ac),{key:1,variant:"warning"},{default:he(()=>[Ue(B(h(i)("providers.catalog.overwriteWarning")),1)]),_:1})):ne("",!0),C("div",Lje,B(h(i)("providers.catalog.willImport",{count:g.value.models.length})),1),k.value?(b(),I("div",{key:2,ref_key:"importErrorBox",ref:S},[V(h(Ac),{variant:"danger"},{default:he(()=>[Ue(B(k.value),1)]),_:1})],512)):ne("",!0),C("div",Nje,[V(h(jt),{variant:"secondary",size:"sm",onClick:G[8]||(G[8]=K=>n("cancel"))},{default:he(()=>[Ue(B(h(i)("common.cancel")),1)]),_:1}),V(h(jt),{variant:"primary",size:"sm",disabled:w.value,onClick:N},{default:he(()=>[Ue(B(h(i)("providers.catalog.importAction")),1)]),_:1},8,["disabled"])])],32))],512)),[[rs,r.value==="catalog"]]):ne("",!0),Bn(C("div",{class:"af-registry",onInput:x},[C("div",Fje,B(h(i)("providers.catalog.registryHint")),1),C("div",Bje,[C("label",$je,[Ue(B(h(i)("providers.catalog.registryUrlLabel")),1),G[20]||(G[20]=C("span",{class:"req"}," *",-1))]),V(h(io),{modelValue:D.value.url,"onUpdate:modelValue":G[9]||(G[9]=K=>D.value.url=K),placeholder:"https://example.com/api.json",autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),C("div",Dje,[C("label",Rje,B(h(i)("providers.fieldApiKey")),1),C("div",zje,[V(h(io),{modelValue:D.value.apiKey,"onUpdate:modelValue":G[10]||(G[10]=K=>D.value.apiKey=K),type:T.value?"text":"password",placeholder:h(i)("providers.modelNamePlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","placeholder"]),V(h(rn),{class:"af-key-eye",size:"sm",label:h(i)(T.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:h(i)(T.value?"providers.hideApiKey":"providers.showApiKey"),onClick:G[11]||(G[11]=K=>T.value=!T.value)},{default:he(()=>[V(h(Ce),{name:T.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])])]),P.value?(b(),I("div",{key:0,ref_key:"registryErrorBox",ref:O},[V(h(Ac),{variant:"danger"},{default:he(()=>[Ue(B(P.value),1)]),_:1})],512)):ne("",!0),C("div",Oje,[V(h(jt),{variant:"secondary",size:"sm",onClick:G[12]||(G[12]=K=>n("cancel"))},{default:he(()=>[Ue(B(h(i)("common.cancel")),1)]),_:1}),V(h(jt),{variant:"primary",size:"sm",disabled:$.value,onClick:W},{default:he(()=>[Ue(B(h(i)("providers.catalog.importAction")),1)]),_:1},8,["disabled"])])],544),[[rs,r.value==="registry"]]),Bn(C("div",Pje,[V(ZD,{mode:"add",guard:!1,onDirtyChange:G[13]||(G[13]=K=>n("dirtyChange",K)),onAdded:G[14]||(G[14]=K=>n("added",K)),onCancel:G[15]||(G[15]=K=>n("cancel"))})],512),[[rs,r.value==="manual"]])]))}}),Hje=vt(jje,[["__scopeId","data-v-9e5ec0a8"]]),Wje={class:"pp"},qje={class:"pp-head"},Uje={class:"pp-title"},Kje={key:0,class:"pp-loading"},Vje={key:1,class:"pp-group"},Zje={class:"pp-add-label"},Gje={class:"pp-chev"},Qje={class:"pp-acc"},Yje={class:"pp-acc-in"},Jje={key:1,class:"pp-empty"},Xje=["onClick"],eHe={class:"grow"},tHe={class:"pp-id"},nHe={class:"pp-count"},iHe={class:"pp-chev"},sHe={class:"pp-acc"},oHe={class:"pp-acc-in"},vc="$add",rHe=tt({__name:"ProvidersPanel",setup(e){const{t}=Bt(),n=Fa(),i=Z(!0),s=Z(null),o=Z(null);let r=0;const l=Z(!1),a=Z(!1),u=Z(null),c=Z("");let d=0;const f=F(()=>[...n.providers.value].sort((E,S)=>E.id.localeCompare(S.id)));function p(E){return b3(E,n.config.value?.models).length}Qe(s,(E,S)=>{S!==null&&S!==E&&(o.value=S,window.clearTimeout(r),r=window.setTimeout(()=>{o.value=null},300)),l.value=!1}),Qe(l,E=>{E||(a.value=!1,u.value=null)}),An(()=>{window.clearTimeout(r),window.clearTimeout(d)});const g=Z(!1);Qe(s,E=>{E===vc?(g.value=!1,kt(()=>requestAnimationFrame(()=>{g.value=!0}))):g.value=!1}),pn(async()=>{i.value=!0;try{await Promise.all([n.loadProviders(),n.loadModels(),n.loadConfig()])}finally{i.value=!1}});function m(E){const S=s.value===E?null:E;if(l.value){u.value=S,a.value=!0;return}s.value=S}function y(){a.value=!1,u.value=null}function w(){a.value=!1,s.value=u.value,u.value=null}function k(E){c.value=E,window.clearTimeout(d),d=window.setTimeout(()=>{c.value=""},1200)}function A(E){s.value=E}function v(E){s.value=E,k(E)}function x(){s.value=null}return(E,S)=>(b(),I("section",Wje,[C("div",qje,[C("h3",Uje,B(h(t)("settings.tabs.providers")),1),V(h(jt),{variant:"secondary",size:"sm",onClick:S[0]||(S[0]=M=>m(vc))},{default:he(()=>[V(h(Ce),{name:"plus",size:"sm"}),Ue(" "+B(h(t)("providers.addProvider")),1)]),_:1})]),i.value?(b(),I("div",Kje,[V(h(Bi),{size:"sm"}),C("span",null,B(h(t)("providers.loading")),1)])):(b(),I("div",Vje,[s.value===vc||o.value===vc?(b(),I("div",{key:0,class:De(["pp-item pp-add-item",{open:s.value===vc&&g.value}])},[C("button",{type:"button",class:"pp-row pp-add-row",onClick:S[1]||(S[1]=M=>m(vc))},[C("span",Zje,B(h(t)("providers.addProvider")),1),S[6]||(S[6]=C("span",{class:"grow"},null,-1)),C("span",Gje,[V(h(Ce),{name:"chevron-right",size:"sm"})])]),C("div",Qje,[C("div",Yje,[V(Hje,{guard:a.value&&s.value===vc,onDirtyChange:S[2]||(S[2]=M=>l.value=M),onGuardStay:y,onGuardDiscard:w,onAdded:v,onCancel:S[3]||(S[3]=M=>s.value=null)},null,8,["guard"])])])],2)):ne("",!0),f.value.length===0?(b(),I("div",Jje,B(h(t)("providers.empty")),1)):ne("",!0),(b(!0),I(Be,null,yt(f.value,M=>(b(),I("div",{key:M.id,class:De(["pp-item",{open:s.value===M.id,flash:c.value===M.id}])},[C("button",{type:"button",class:"pp-row",onClick:_=>m(M.id)},[C("div",eHe,[C("span",tHe,B(M.id),1),V(h(Hl),{variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(M.type),1)]),_:2},1024),h(gL)(M)?(b(),fe(h(Hl),{key:0,variant:"info",size:"sm"},{default:he(()=>[Ue(B(h(t)("providers.managedBadge")),1)]),_:1})):ne("",!0)]),C("span",nHe,B(h(t)("providers.modelCount",{count:p(M)})),1),C("span",iHe,[V(h(Ce),{name:"chevron-right",size:"sm"})])],8,Xje),C("div",sHe,[C("div",oHe,[s.value===M.id||o.value===M.id?(b(),fe(ZD,{key:0,mode:"edit",provider:M,guard:a.value&&s.value===M.id,onDirtyChange:S[4]||(S[4]=_=>l.value=_),onGuardStay:y,onGuardDiscard:w,onSaved:A,onDeleting:S[5]||(S[5]=_=>s.value=null),onDeleted:x},null,8,["provider","guard"])):ne("",!0)])])],2))),128))]))]))}}),lHe=vt(rHe,[["__scopeId","data-v-9aa0e3a8"]]),aHe={class:"sec"},uHe={class:"sec-title"},cHe={class:"pu-group"},dHe={class:"pu-row"},fHe={class:"pu-main"},hHe={class:"pu-label"},pHe={class:"pu-hint"},gHe=tt({__name:"PlanUpgradeCard",setup(e){const{t}=Bt();return(n,i)=>(b(),I("section",aHe,[C("h3",uHe,B(h(t)("settings.planUsage.title")),1),C("div",cHe,[C("div",dHe,[C("span",fHe,[C("span",hHe,B(h(t)("settings.planUsage.freeTitle")),1),C("span",pHe,B(h(t)("settings.planUsage.freeHint")),1)]),V(h(jt),{variant:"primary",size:"sm",onClick:i[0]||(i[0]=s=>h(Cp)())},{default:he(()=>[Ue(B(h(t)("sidebar.upgrade")),1)]),_:1})])])]))}}),GD=vt(gHe,[["__scopeId","data-v-5711dff8"]]),mHe={class:"sec"},vHe={class:"sec-title"},yHe={class:"pu-group"},bHe={key:0,class:"pu-row pu-state"},kHe={key:1,class:"pu-row pu-state"},AHe={class:"pu-error-text"},CHe={key:2,class:"pu-row pu-state pu-empty"},wHe={class:"pu-main"},xHe={class:"pu-label"},_He={key:0,class:"pu-hint"},SHe={class:"pu-value"},MHe=["aria-valuenow","aria-valuemax"],IHe={key:0,class:"sec"},EHe={class:"sec-title"},THe={class:"pu-group"},LHe={class:"pu-row"},NHe={class:"pu-main"},FHe={class:"pu-label"},BHe={class:"pu-value"},$He={key:0,class:"pu-value-sub"},DHe={key:0,class:"pu-meter"},RHe={class:"pu-row"},zHe={class:"pu-main"},OHe={class:"pu-label"},PHe={class:"pu-value"},jHe={class:"pu-row"},HHe={class:"pu-main"},WHe={class:"pu-label"},qHe={class:"pu-value"},UHe={class:"pu-value-sub"},KHe=tt({__name:"PlanUsageCard",props:{onFetchUsage:{type:Function}},setup(e){const t=e,{t:n}=Bt(),i=Z(!0),s=Z(null);async function o(){i.value=!0;try{s.value=await t.onFetchUsage()}finally{i.value=!1}}pn(o);const r=F(()=>s.value?.kind==="ok"?s.value:null),l=F(()=>r.value?.extraUsage??null),a=F(()=>{const m=r.value;return m===null?[]:m.summary===null?m.limits:[m.summary,...m.limits]}),u=F(()=>a.value.length>0),c=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 p(m,y){const w=hte(m,y);return`${w.symbol}${w.number}`}function g(m){return m.resetAt===void 0?"":fL(m.resetAt,n)}return(m,y)=>d.value?(b(),fe(GD,{key:0})):(b(),I(Be,{key:1},[C("section",mHe,[C("h3",vHe,B(h(n)("settings.planUsage.title")),1),C("div",yHe,[i.value?(b(),I("div",bHe,[V(h(Bi),{size:"sm"})])):r.value===null?(b(),I("div",kHe,[C("span",AHe,B(c.value),1),V(h(jt),{variant:"ghost",size:"sm",onClick:o},{default:he(()=>[Ue(B(h(n)("settings.planUsage.retry")),1)]),_:1})])):u.value?(b(!0),I(Be,{key:3},yt(a.value,(w,k)=>(b(),I("div",{key:k,class:"pu-row"},[C("span",wHe,[C("span",xHe,B(h(dL)(w,h(n))),1),g(w)?(b(),I("span",_He,B(g(w)),1)):ne("",!0)]),C("span",SHe,B(h(n)("settings.planUsage.usedPct",{pct:h(wg)(w.used,w.limit)})),1),C("span",{class:"pu-meter",role:"progressbar","aria-valuenow":w.used,"aria-valuemax":w.limit},[C("i",{class:De(`sev-${h(y3)(w.used,w.limit)}`),style:Vt({width:`${h(wg)(w.used,w.limit)}%`})},null,6)],8,MHe)]))),128)):(b(),I("div",CHe,B(h(n)("settings.planUsage.empty")),1))])]),l.value!==null?(b(),I("section",IHe,[C("h3",EHe,B(h(n)("settings.planUsage.boosterTitle")),1),C("div",THe,[C("div",LHe,[C("span",NHe,[C("span",FHe,B(h(n)("settings.planUsage.monthlyUsed")),1)]),C("span",BHe,[Ue(B(p(l.value.monthlyUsedCents,l.value.currency)),1),f.value?(b(),I("span",$He," / "+B(p(l.value.monthlyChargeLimitCents,l.value.currency)),1)):ne("",!0)]),f.value?(b(),I("span",DHe,[C("i",{class:De(`sev-${h(y3)(l.value.monthlyUsedCents,l.value.monthlyChargeLimitCents)}`),style:Vt({width:`${h(wg)(l.value.monthlyUsedCents,l.value.monthlyChargeLimitCents)}%`})},null,6)])):ne("",!0)]),C("div",RHe,[C("span",zHe,[C("span",OHe,B(h(n)("settings.planUsage.monthlyLimit")),1)]),C("span",PHe,[f.value?(b(),I(Be,{key:0},[Ue(B(p(l.value.monthlyChargeLimitCents,l.value.currency)),1)],64)):(b(),I(Be,{key:1},[Ue(B(h(n)("settings.planUsage.unlimited")),1)],64))])]),C("div",jHe,[C("span",HHe,[C("span",WHe,B(h(n)("settings.planUsage.boosterBalance")),1)]),C("span",qHe,[Ue(B(p(l.value.balanceCents,l.value.currency)),1),C("span",UHe," / "+B(p(l.value.totalCents,l.value.currency)),1)])])])])):ne("",!0)],64))}}),VHe=vt(KHe,[["__scopeId","data-v-f39cdded"]]),ZHe=["aria-expanded","aria-label"],GHe={class:"sm-picker__value-text"},QHe=["aria-label"],YHe=["aria-label"],JHe={class:"sm-picker__group"},XHe=["aria-selected","onMouseenter","onClick"],eWe={class:"sm-picker__option-label"},tWe=["aria-label"],nWe={class:"sm-picker__group"},iWe=["aria-selected","onMouseenter","onClick"],sWe={class:"sm-picker__option-label"},oWe=188,rWe=250,w4=8,lWe=tt({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{}},emits:["select"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Z(null),r=Z(null),l=Z(null),a=Z(null),u=new Map,c=Z(!1),d=Z(!1),f=Z({}),p=`sm-picker-${Math.random().toString(36).slice(2,9)}`,g=Z(""),m=Z(null),y=Z("right"),w=Z(0),k=Z("models"),A=Z(0),v=Z(0);let x=null;const E=F(()=>n.groups.flatMap(te=>te.options)),S=F(()=>n.modelValue?E.value.find(te=>te.id===n.modelValue)?.label??n.modelValue:""),M=F(()=>n.modelValue?n.effort?`${S.value} · ${n.effort}`:S.value:s("settings.noSecondaryModel")),_=F(()=>{const te=m.value;if(te===null)return[];const ye=Ap(n.modelInfoById[te]),j=n.effort===""?[null,...ye]:[...ye];return n.modelValue===te&&n.effort!==""&&!ye.includes(n.effort)&&j.push(n.effort),j});function N(te){return n.modelValue!==m.value?!1:te===null?n.effort==="":n.effort===te}function D(){const te=_.value.findIndex(ye=>N(ye));return te>=0?te:0}function T(te,ye){te instanceof HTMLElement?u.set(ye,te):u.delete(ye)}function $(){x!==null&&(clearTimeout(x),x=null)}function P(){$(),x=setTimeout(()=>{m.value=null,k.value==="efforts"&&(k.value="models")},rWe)}function O(te){te!==g.value&&(g.value=te,A.value=Math.max(0,E.value.findIndex(ye=>ye.id===te)))}function R(){const te=r.value,ye=l.value;if(!te||!ye)return;const j=te.getBoundingClientRect(),Y=ye.offsetHeight,ve=window.innerHeight-j.bottom;d.value=ve<Y+w4&&j.top>Y;const re=Math.max(w4,window.innerWidth-j.right);f.value=d.value?{right:`${re}px`,bottom:`${window.innerHeight-j.top+4}px`,top:"auto"}:{right:`${re}px`,top:`${j.bottom+4}px`,bottom:"auto"}}function W(){const te=l.value,ye=m.value===null?void 0:u.get(m.value);if(!te||!ye)return;const j=te.getBoundingClientRect(),Y=ye.getBoundingClientRect(),ve=a.value?.offsetHeight??0,re=Math.max(0,window.innerHeight-w4-ve-j.top);w.value=Math.max(0,Math.min(Y.top-j.top-4,te.offsetHeight-40,re));const se=window.innerWidth-j.right,U=j.left;y.value=se>=oWe||se>=U?"right":"left"}function z(te,{moveFocus:ye=!1}={}){O(te),$(),m.value=te,ye&&(k.value="efforts",v.value=D()),kt(W)}function G(){m.value=null,k.value="models"}function K(){c.value||(c.value=!0,g.value=n.modelValue||(E.value[0]?.id??""),A.value=Math.max(0,E.value.findIndex(te=>te.id===g.value)),m.value=null,k.value="models",kt(R))}function H({restoreFocus:te=!1}={}){c.value&&($(),c.value=!1,m.value=null,te&&kt(()=>r.value?.focus()))}function q(){c.value?H():K()}function X(te){if(m.value===null)return;const ye={model:m.value,effort:te??void 0};(ye.model!==n.modelValue||(ye.effort??"")!==n.effort)&&i("select",ye),H({restoreFocus:!0})}function ee(){kt(()=>{l.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function ue(te){const ye=E.value;if(ye.length===0)return;const j=(A.value+te+ye.length)%ye.length,Y=ye[j].id;O(Y),m.value!==null&&z(Y),ee()}function ie(te){const ye=_.value;ye.length!==0&&(v.value=(v.value+te+ye.length)%ye.length,ee())}function xe(te){if(!c.value){(te.key==="Enter"||te.key===" "||te.key==="ArrowDown")&&(te.preventDefault(),K());return}if(te.key==="ArrowDown")te.preventDefault(),k.value==="models"?ue(1):ie(1);else if(te.key==="ArrowUp")te.preventDefault(),k.value==="models"?ue(-1):ie(-1);else if(te.key==="ArrowRight")te.preventDefault(),z(g.value,{moveFocus:!0});else if(te.key==="ArrowLeft")te.preventDefault(),m.value!==null&&G();else if(te.key==="Enter"||te.key===" ")te.preventDefault(),k.value==="models"?z(g.value,{moveFocus:!0}):X(_.value[v.value]??null);else if(te.key==="Home"||te.key==="End"){te.preventDefault();const ye=te.key==="Home";if(k.value==="models"){const j=E.value;if(j.length===0)return;const Y=(ye?j[0]:j.at(-1)).id;O(Y),m.value!==null&&z(Y)}else v.value=ye?0:_.value.length-1;ee()}else te.key==="Escape"&&(te.preventDefault(),H({restoreFocus:!0}))}function ce(te){const ye=te.target;o.value?.contains(ye)||l.value?.contains(ye)||H()}function pe(te){if(c.value){if(l.value?.contains(te.target)){W();return}R(),W()}}function Ne(){H()}return pn(()=>{document.addEventListener("pointerdown",ce),document.addEventListener("scroll",pe,!0),window.addEventListener("resize",Ne)}),An(()=>{document.removeEventListener("pointerdown",ce),document.removeEventListener("scroll",pe,!0),window.removeEventListener("resize",Ne),$()}),(te,ye)=>(b(),I("div",{ref_key:"rootRef",ref:o,class:De(["sm-picker",{"is-open":c.value}])},[C("button",{ref_key:"triggerRef",ref:r,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":p,"aria-expanded":c.value,"aria-haspopup":"dialog","aria-label":h(s)("settings.secondaryModel"),onClick:q,onKeydown:xe},[C("span",{class:De(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[C("span",GHe,B(M.value),1)],2),V(h(Ce),{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,ZHe),(b(),fe(Wr,{to:"body"},[c.value?(b(),I("div",{key:0,id:p,ref_key:"menuRef",ref:l,class:De(["sm-picker__menu",{"sm-picker__menu--up":d.value}]),style:Vt(f.value),role:"dialog","aria-label":h(s)("settings.secondaryModel")},[C("div",{class:"sm-picker__models",role:"listbox","aria-label":h(s)("settings.secondaryModel")},[(b(!0),I(Be,null,yt(e.groups,j=>(b(),I(Be,{key:j.provider},[C("div",JHe,B(j.provider),1),(b(!0),I(Be,null,yt(j.options,Y=>(b(),I("button",{key:Y.id,ref_for:!0,ref:ve=>T(ve,Y.id),class:De(["sm-picker__option",{"is-selected":Y.id===e.modelValue,"is-active":Y.id===g.value,"is-kb-active":k.value==="models"&&Y.id===g.value}]),type:"button",role:"option","aria-selected":Y.id===e.modelValue,onMouseenter:ve=>z(Y.id),onMouseleave:P,onClick:ve=>z(Y.id,{moveFocus:!0})},[V(h(Ce),{class:"sm-picker__check",name:"check",size:"sm"}),C("span",eWe,B(Y.label),1),V(h(Ce),{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,XHe))),128))],64))),128))],8,YHe),m.value!==null?(b(),I("div",{key:0,ref_key:"flyoutRef",ref:a,class:De(["sm-picker__flyout",`sm-picker__flyout--${y.value}`]),style:Vt({top:`${w.value}px`}),role:"listbox","aria-label":h(s)("settings.secondaryModelEffort"),onMouseenter:$,onMouseleave:P},[C("div",nWe,B(h(s)("settings.secondaryModelEffort")),1),(b(!0),I(Be,null,yt(_.value,(j,Y)=>(b(),I("button",{key:j??"__default__",class:De(["sm-picker__option",{"is-selected":N(j),"is-active":k.value==="efforts"&&Y===v.value,"is-kb-active":k.value==="efforts"&&Y===v.value,"is-muted":j===null}]),type:"button",role:"option","aria-selected":N(j),onMouseenter:ve=>{k.value="efforts",v.value=Y},onClick:ve=>X(j)},[V(h(Ce),{class:"sm-picker__check",name:"check",size:"sm"}),C("span",sWe,B(j??h(s)("settings.secondaryModelEffortAuto")),1)],42,iWe))),128))],46,tWe)):ne("",!0)],14,QHe)):ne("",!0)]))],2))}}),aWe=vt(lWe,[["__scopeId","data-v-eb75e643"]]),uWe=["aria-label"],cWe={class:"settings-tabs-header"},dWe={class:"settings-dialog-title"},fWe={class:"settings-tab-list"},hWe=["aria-selected","onClick"],pWe={class:"settings-region"},gWe={class:"settings-region-header"},mWe={class:"panel"},vWe={class:"sec"},yWe={class:"sec-title"},bWe={class:"settings-group"},kWe={class:"row"},AWe={class:"rlabel"},CWe={class:"hint"},wWe={class:"row language-row"},xWe={class:"rlabel"},_We={class:"hint"},SWe={class:"row font-size-row"},MWe={class:"rlabel"},IWe={class:"hint"},EWe={class:"sec notification-settings"},TWe={class:"sec-title"},LWe={class:"settings-group"},NWe={class:"row"},FWe={class:"rlabel"},BWe={class:"hint"},$We={key:0,class:"hint"},DWe={class:"row"},RWe={class:"rlabel"},zWe={class:"hint"},OWe={class:"panel"},PWe={class:"sec"},jWe={class:"sec-title"},HWe={class:"settings-group"},WWe={class:"account-row"},qWe={class:"account-avatar","aria-hidden":"true"},UWe=["src"],KWe={class:"account-meta"},VWe={class:"account-name-row"},ZWe={class:"account-name"},GWe={class:"account-sub"},QWe={key:0,class:"panel"},YWe={class:"panel"},JWe={class:"sec"},XWe={class:"sec-head"},eqe={class:"sec-title"},tqe={class:"settings-group"},nqe={class:"row"},iqe={class:"rlabel"},sqe={class:"hint"},oqe={key:0,class:"select-wrap"},rqe={key:1,class:"rvalue mono"},lqe={class:"row"},aqe={class:"rlabel"},uqe={class:"hint"},cqe={class:"row"},dqe={class:"rlabel"},fqe={class:"hint"},hqe={class:"row"},pqe={class:"rlabel"},gqe={class:"hint"},mqe={key:1,class:"empty-config"},vqe={key:0,class:"sec"},yqe={class:"sec-head"},bqe={class:"sec-title"},kqe={class:"settings-group"},Aqe={class:"row"},Cqe={class:"rlabel"},wqe={class:"hint"},xqe={key:0,class:"select-wrap"},_qe={key:1,class:"rvalue mono"},Sqe={class:"panel"},Mqe={class:"sec"},Iqe={class:"sec-title"},Eqe={class:"settings-group"},Tqe={class:"row"},Lqe={class:"rlabel"},Nqe={class:"hint"},Fqe={class:"rvalue"},Bqe={class:"row"},$qe={class:"rlabel"},Dqe={class:"hint"},Rqe={class:"rvalue"},zqe={class:"row"},Oqe={class:"rlabel"},Pqe={class:"hint"},jqe={class:"rvalue"},Hqe={key:0,class:"row"},Wqe={class:"rlabel"},qqe={key:0,class:"hint"},Uqe={key:1,class:"hint"},Kqe={key:1,class:"row"},Vqe={class:"rlabel"},Zqe={class:"hint"},Gqe={key:0,class:"sec"},Qqe={class:"sec-title"},Yqe={class:"settings-group"},Jqe={class:"row"},Xqe={class:"rlabel"},eUe={class:"hint"},tUe={class:"hint"},nUe={class:"sec"},iUe={class:"sec-title"},sUe={class:"settings-group"},oUe={class:"row"},rUe={class:"rlabel"},lUe={class:"hint"},aUe={key:0,class:"hint"},uUe={class:"panel"},cUe={class:"panel-head"},dUe={class:"panel-title"},fUe={class:"panel-desc"},hUe={class:"archive-toolbar"},pUe={class:"archive-search"},gUe=["placeholder"],mUe={key:0,class:"archive-empty"},vUe={key:0,class:"archive-list"},yUe={class:"archive-workspace"},bUe={class:"path"},kUe={class:"count"},AUe={class:"setting-card"},CUe={class:"archive-meta"},wUe={class:"archive-name"},xUe={class:"archive-time"},_Ue={key:1,class:"archive-empty"},SUe=100,MUe=tt({__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}=Bt(),i=e,s=t,o=F(()=>i.managedProviderStatus==="authenticated"),r=F(()=>o.value?i.managedUserInfo?.nickname||n("sidebar.defaultUserName"):n("sidebar.notSignedIn")),l=F(()=>i.managedUserInfo?.userLevelName?.trim()??""),a=Z(!1);Qe(()=>i.managedUserInfo?.avatar,()=>{a.value=!1});const u=F(()=>!!i.managedUserInfo?.avatar&&!a.value),c=F(()=>o.value?n("settings.signedIn"):n("settings.signedOutHint")),d=Z(i.initialTab??"general"),f=Z(!1);let p=null;function g(){f.value=!0,p&&clearTimeout(p),p=setTimeout(()=>{f.value=!1,p=null},900)}const m=[{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"}],y=qke(),w=["manual","yolo","auto"],k={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},A=Z(null);KD(A);const{isConfirmOpen:v}=Hu();function x(Fe){Fe.key==="Escape"&&!Fe.defaultPrevented&&!v.value&&s("close")}pn(()=>document.addEventListener("keydown",x)),An(()=>{document.removeEventListener("keydown",x),p&&clearTimeout(p)});function E(){m$()}const S=(()=>{const Fe="0.36.0".trim()?"0.36.0":"";let Re="";if("2026-08-16T05:28:28.514Z".trim()){const ht=new Date("2026-08-16T05:28:28.514Z");if(!Number.isNaN(ht.getTime())){const ot=gt=>String(gt).padStart(2,"0");Re=`${ht.getFullYear()}-${ot(ht.getMonth()+1)}-${ot(ht.getDate())} ${ot(ht.getHours())}:${ot(ht.getMinutes())}`}}const Ke=Re===""?Fe:`${Fe} · ${Re}`;return Ke===""?"-":Ke})(),M=l$(),_=Z(!1),N=Z(null);async function D(){if(!_.value){_.value=!0,N.value=null;try{N.value=await M.check()}finally{_.value=!1}}}const T=F(()=>{const Fe=N.value;if(Fe===null)return"";switch(Fe.outcome){case"available":return M.status.value.state==="downloaded"?n("settings.updateCheckDownloaded",{version:Fe.version??""}):M.autoDownload.value?n("settings.updateCheckAvailableAuto",{version:Fe.version??""}):n("settings.updateCheckAvailable",{version:Fe.version??""});case"latest":return n("settings.updateCheckLatest");case"unsupported":return n("settings.updateCheckUnsupported");case"error":return n("settings.updateCheckFailed")}}),$=F(()=>{const Fe=new Map;for(const Re of i.models??[])Fe.set(Re.id,{id:Re.id,label:Re.displayName??Re.model??Re.id,provider:Re.provider});for(const[Re,Ke]of Object.entries(i.config?.models??{})){if(Fe.has(Re))continue;const ht=W(Ke);Fe.set(Re,{id:Re,label:z(Re,Ke,ht),provider:ht??Re})}return Array.from(Fe.values())}),P=F(()=>{const Fe=new Map;for(const Re of $.value){const Ke=Fe.get(Re.provider)??[];Ke.push(Re),Fe.set(Re.provider,Ke)}for(const Re of Fe.values())Re.sort((Ke,ht)=>Ke.label.localeCompare(ht.label));return Array.from(Fe.entries()).toSorted(([Re],[Ke])=>Re.localeCompare(Ke)).map(([Re,Ke])=>({provider:Re,options:Ke}))}),O=F(()=>{const Fe=P.value.flatMap(Re=>Re.options.map(Ke=>({value:Ke.id,label:Ke.label,group:Re.provider})));return i.config?.defaultModel||Fe.unshift({value:"",label:n("settings.noDefaultModel"),group:"",disabled:!0}),Fe}),R=F(()=>{const Fe=i.config?.defaultPermissionMode;return Fe==="auto"||Fe==="yolo"||Fe==="manual"?Fe:"manual"});function W(Fe){if(!Fe||typeof Fe!="object")return;const Re=Fe;return typeof Re.provider=="string"?Re.provider:void 0}function z(Fe,Re,Ke){if(!Re||typeof Re!="object")return Fe;const ht=Re,ot=typeof ht.model=="string"?ht.model:void 0,gt=Ke??W(Re);return ot&>?`${Fe} (${gt}/${ot})`:ot?`${Fe} (${ot})`:Fe}function G(Fe){return Fe===!0}function K(Fe){!Fe||Fe===i.config?.defaultModel||s("updateConfig",{defaultModel:Fe})}function H(Fe){Fe!==R.value&&s("updateConfig",{defaultPermissionMode:Fe})}const q=F(()=>(i.experimentalFlags?.["secondary-model"]??i.config?.experimental?.["secondary-model"])===!0),X=F(()=>i.config?.secondaryModel?.model??""),ee=F(()=>i.config?.secondaryModel?.defaultEffort??""),ue=F(()=>Object.fromEntries((i.models??[]).map(Fe=>[Fe.id,Fe])));function ie(Fe){Fe.model===X.value&&(Fe.effort??"")===ee.value||s("updateConfig",{secondaryModel:Fe.effort?{model:Fe.model,defaultEffort:Fe.effort}:{model:Fe.model}})}function xe(Fe){const Re=i.config?.[Fe];s("updateConfig",{[Fe]:!G(Re)})}function ce(){const Fe=i.config?.thinking;return!Fe||typeof Fe!="object"?!0:Fe.enabled!==!1}function pe(){s("updateConfig",{thinking:{enabled:!ce()}})}function Ne(){const Fe=i.config?.telemetry!==!1;s("updateConfig",{telemetry:!Fe})}function te(Fe){d.value=Fe}const ye=Fa(),j=F(()=>o.value&&ye.managedMembership.value==="free"),Y=Z([]),ve=Z(!1),re=Z(!1),se=Z(""),U=Z("all"),J=Z("archived-desc");async function de(){if(!(ve.value||re.value)){ve.value=!0;try{const Fe=[];let Re;for(;;){const Ke=await ye.loadArchivedSessions({beforeId:Re,pageSize:SUe});if(Fe.push(...Ke.items),!Ke.hasMore||Ke.items.length===0)break;const ht=Ke.items.at(-1)?.id;if(ht===void 0)break;Re=ht}Y.value=Fe,re.value=!0}catch(Fe){Dl("loadAllArchived failed",Fe)}finally{ve.value=!1}}}Qe(d,Fe=>{Fe==="archived"&&!re.value&&de()},{immediate:!0});const me=F(()=>{const Fe=new Set;for(const Re of Y.value)Fe.add(Re.cwd);return Array.from(Fe).sort((Re,Ke)=>Re.localeCompare(Ke))}),Ie=F(()=>[{value:"all",label:n("settings.archivedAllWorkspaces")},...me.value.map(Fe=>({value:Fe,label:Fe}))]),je=F(()=>{const Fe=se.value.trim().toLowerCase();let Re=Y.value.filter(Ke=>Ke.archived===!0);return U.value!=="all"&&(Re=Re.filter(Ke=>Ke.cwd===U.value)),Fe&&(Re=Re.filter(Ke=>Ke.title.toLowerCase().includes(Fe))),Re=Re.slice(),J.value==="archived-desc"?Re.sort((Ke,ht)=>(ht.archivedAt??ht.updatedAt).localeCompare(Ke.archivedAt??Ke.updatedAt)):J.value==="created-desc"?Re.sort((Ke,ht)=>ht.createdAt.localeCompare(Ke.createdAt)):Re.sort((Ke,ht)=>Ke.title.localeCompare(ht.title,"zh")),Re}),ke=F(()=>{const Fe=new Map;for(const Re of je.value){const Ke=Fe.get(Re.cwd)??[];Ke.push(Re),Fe.set(Re.cwd,Ke)}return Array.from(Fe.entries()).map(([Re,Ke])=>({cwd:Re,items:Ke}))});async function Le(Fe){await ye.restoreSession(Fe)&&(Y.value=Y.value.filter(Ke=>Ke.id!==Fe))}function it(Fe){const Re=new Date(Fe);if(Number.isNaN(Re.getTime()))return Fe;const Ke=ht=>String(ht).padStart(2,"0");return`${Re.getFullYear()}-${Ke(Re.getMonth()+1)}-${Ke(Re.getDate())} ${Ke(Re.getHours())}:${Ke(Re.getMinutes())}`}return(Fe,Re)=>(b(),fe(h(La),{open:!0,"close-on-esc":!1,"aria-label":h(n)("settings.title"),size:"xl",height:"fixed",padded:!1,level:"grouped",onClose:Re[16]||(Re[16]=Ke=>s("close"))},{default:he(()=>[C("div",{ref_key:"dialogRef",ref:A,class:"sd"},[C("nav",{class:"settings-tabs",role:"tablist","aria-label":h(n)("settings.title")},[C("header",cWe,[C("h2",dWe,B(h(n)("settings.title")),1)]),C("div",fWe,[(b(),I(Be,null,yt(m,Ke=>C("button",{key:Ke.id,type:"button",class:De(["tab",{on:d.value===Ke.id}]),role:"tab","aria-selected":d.value===Ke.id,onClick:ht=>te(Ke.id)},[V(h(Ce),{name:Ke.icon,size:"md"},null,8,["name"]),C("span",null,B(h(n)(Ke.labelKey)),1)],10,hWe)),64))])],8,uWe),C("section",pWe,[C("header",gWe,[V(h(rn),{size:"sm",label:h(n)("settings.close"),tooltip:h(n)("settings.close"),onClick:Re[0]||(Re[0]=Ke=>s("close"))},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])]),C("div",{class:De(["body",{scrolling:f.value}]),onScroll:g},[Bn(C("section",mWe,[C("section",vWe,[C("h3",yWe,B(h(n)("settings.appearance")),1),C("div",bWe,[C("div",kWe,[C("span",AWe,[Ue(B(h(n)("theme.colorSchemeLabel"))+" ",1),C("span",CWe,B(h(n)("settings.colorSchemeHint")),1)]),V(h(wo),{"model-value":e.colorScheme,options:[{value:"light",label:h(n)("theme.light"),icon:"light-mode"},{value:"dark",label:h(n)("theme.dark"),icon:"dark-mode"},{value:"system",label:h(n)("theme.system")}],"onUpdate:modelValue":Re[1]||(Re[1]=Ke=>s("setColorScheme",Ke))},null,8,["model-value","options"])]),C("div",wWe,[C("span",xWe,[Ue(B(h(n)("sidebar.language"))+" ",1),C("span",_We,B(h(n)("settings.languageHint")),1)]),V(VD)]),C("div",SWe,[C("span",MWe,[Ue(B(h(n)("settings.uiFontSize"))+" ",1),C("span",IWe,B(h(n)("settings.uiFontSizeHint")),1)]),V(h(wo),{"model-value":e.fontScale,options:[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],"aria-label":h(n)("settings.uiFontSize"),"onUpdate:modelValue":Re[2]||(Re[2]=Ke=>s("setFontScale",Ke))},null,8,["model-value","aria-label"])])])]),C("section",EWe,[C("h3",TWe,B(h(n)("settings.notifications")),1),C("div",LWe,[C("div",NWe,[C("span",FWe,[Ue(B(h(n)("settings.notifyEnabled"))+" ",1),C("span",BWe,B(h(n)("settings.notifyEnabledHint")),1),e.notifyPermission==="denied"?(b(),I("span",$We,B(h(n)("settings.notifyDenied")),1)):ne("",!0)]),V(h(Md),{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:h(n)("settings.notifyEnabled"),"onUpdate:modelValue":Re[3]||(Re[3]=Ke=>s("setNotify",Ke))},null,8,["model-value","disabled","label"])]),C("div",DWe,[C("span",RWe,[Ue(B(h(n)("settings.notifySound"))+" ",1),C("span",zWe,B(h(n)("settings.notifySoundHint")),1)]),V(h(Md),{"model-value":e.notifySound,label:h(n)("settings.notifySound"),"onUpdate:modelValue":Re[4]||(Re[4]=Ke=>s("setNotifySound",Ke))},null,8,["model-value","label"])])])])],512),[[rs,d.value==="general"]]),Bn(C("section",OWe,[C("section",PWe,[C("h3",jWe,B(h(n)("settings.account")),1),C("div",HWe,[C("div",WWe,[C("span",qWe,[u.value?(b(),I("img",{key:0,src:i.managedUserInfo?.avatar,alt:"",onError:Re[5]||(Re[5]=Ke=>a.value=!0)},null,40,UWe)):(b(),fe(h(Ce),{key:1,name:"user",size:"md"}))]),C("span",KWe,[C("span",VWe,[C("span",ZWe,B(r.value),1),l.value?(b(),fe(h(Hl),{key:0,class:"account-level",variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(l.value),1)]),_:1})):ne("",!0)]),C("span",GWe,B(c.value),1)]),o.value?(b(),fe(h(jt),{key:0,variant:"danger-soft",size:"sm",onClick:Re[6]||(Re[6]=Ke=>s("logout"))},{default:he(()=>[Ue(B(h(n)("sidebar.signOut")),1)]),_:1})):(b(),fe(h(jt),{key:1,variant:"primary",size:"sm",onClick:Re[7]||(Re[7]=Ke=>s("login"))},{default:he(()=>[Ue(B(h(n)("sidebar.signIn")),1)]),_:1}))])])]),j.value?(b(),fe(GD,{key:0})):o.value?(b(),fe(VHe,{key:1,"on-fetch-usage":i.onFetchUsage},null,8,["on-fetch-usage"])):ne("",!0)],512),[[rs,d.value==="account"]]),d.value==="providers"?(b(),I("section",QWe,[V(lHe)])):ne("",!0),Bn(C("section",YWe,[C("section",JWe,[C("div",XWe,[C("h3",eqe,B(h(n)("settings.agentDefaults")),1)]),C("div",tqe,[e.config?(b(),I(Be,{key:0},[C("div",nqe,[C("span",iqe,[Ue(B(h(n)("settings.defaultModel"))+" ",1),C("span",sqe,B(h(n)("settings.defaultModelHint")),1)]),P.value.length>0?(b(),I("div",oqe,[V(h(e3),{"model-value":e.config.defaultModel??"",options:O.value,"aria-label":h(n)("settings.defaultModel"),"onUpdate:modelValue":K},null,8,["model-value","options","aria-label"])])):(b(),I("span",rqe,B(e.config.defaultModel??h(n)("settings.noDefaultModel")),1))]),C("div",lqe,[C("span",aqe,[Ue(B(h(n)("settings.defaultPermission"))+" ",1),C("span",uqe,B(h(n)("settings.defaultPermissionHint")),1)]),V(h(wo),{"model-value":R.value,options:w.map(Ke=>({value:Ke,label:h(n)(k[Ke])})),"onUpdate:modelValue":Re[8]||(Re[8]=Ke=>H(Ke))},null,8,["model-value","options"])]),C("div",cqe,[C("span",dqe,[Ue(B(h(n)("settings.defaultThinking"))+" ",1),C("span",fqe,B(h(n)("settings.defaultThinkingHint")),1)]),V(h(Md),{"model-value":ce(),label:h(n)("settings.defaultThinking"),"onUpdate:modelValue":Re[9]||(Re[9]=Ke=>pe())},null,8,["model-value","label"])]),C("div",hqe,[C("span",pqe,[Ue(B(h(n)("settings.defaultPlanMode"))+" ",1),C("span",gqe,B(h(n)("settings.defaultPlanModeHint")),1)]),V(h(Md),{"model-value":G(e.config.defaultPlanMode),label:h(n)("settings.defaultPlanMode"),"onUpdate:modelValue":Re[10]||(Re[10]=Ke=>xe("defaultPlanMode"))},null,8,["model-value","label"])])],64)):(b(),I("div",mqe,B(h(n)("settings.configUnavailable")),1))])]),e.config&&q.value?(b(),I("section",vqe,[C("div",yqe,[C("h3",bqe,B(h(n)("settings.secondaryModelSection")),1)]),C("div",kqe,[C("div",Aqe,[C("span",Cqe,[Ue(B(h(n)("settings.secondaryModel"))+" ",1),C("span",wqe,B(h(n)("settings.secondaryModelHint")),1)]),P.value.length>0?(b(),I("div",xqe,[V(aWe,{"model-value":X.value,effort:ee.value,groups:P.value,"model-info-by-id":ue.value,onSelect:ie},null,8,["model-value","effort","groups","model-info-by-id"])])):(b(),I("span",_qe,B(X.value||h(n)("settings.noSecondaryModel")),1))])])])):ne("",!0)],512),[[rs,d.value==="agent"]]),Bn(C("section",Sqe,[C("section",Mqe,[C("h3",Iqe,B(h(n)("settings.versionAndUpdates")),1),C("div",Eqe,[C("div",Tqe,[C("span",Lqe,[Ue(B(h(n)("settings.appVersion"))+" ",1),C("span",Nqe,B(h(n)("settings.appVersionHint")),1)]),C("span",Fqe,B(h(S)),1)]),C("div",Bqe,[C("span",$qe,[Ue(B(h(n)("settings.serverVersion"))+" ",1),C("span",Dqe,B(h(n)("settings.serverVersionHint")),1)]),C("span",Rqe,B(e.serverVersion||"-"),1)]),C("div",zqe,[C("span",Oqe,[Ue(B(h(n)("settings.serverAddress"))+" ",1),C("span",Pqe,B(h(n)("settings.serverAddressHint")),1)]),C("span",jqe,B(h(y)),1)]),h(M).canCheck?(b(),I("div",Hqe,[C("span",Wqe,[Ue(B(h(n)("settings.checkUpdate"))+" ",1),T.value?(b(),I("span",qqe,B(T.value),1)):(b(),I("span",Uqe,B(h(n)("settings.checkUpdateHint")),1))]),V(h(jt),{variant:"secondary",size:"sm",disabled:_.value,onClick:D},{default:he(()=>[Ue(B(_.value?h(n)("settings.updateChecking"):h(n)("settings.checkUpdateBtn")),1)]),_:1},8,["disabled"])])):ne("",!0),h(M).canToggleAutoDownload?(b(),I("div",Kqe,[C("span",Vqe,[Ue(B(h(n)("settings.autoDownloadUpdate"))+" ",1),C("span",Zqe,B(h(n)("settings.autoDownloadUpdateHint")),1)]),V(h(Md),{"model-value":h(M).autoDownload.value,label:h(n)("settings.autoDownloadUpdate"),"onUpdate:modelValue":Re[11]||(Re[11]=Ke=>h(M).setAutoDownload(Ke,"settings"))},null,8,["model-value","label"])])):ne("",!0)])]),e.config?(b(),I("section",Gqe,[C("h3",Qqe,B(h(n)("settings.privacy")),1),C("div",Yqe,[C("div",Jqe,[C("span",Xqe,[Ue(B(h(n)("settings.telemetry"))+" ",1),C("span",eUe,B(h(n)("settings.telemetryHint")),1),C("span",tUe,B(h(n)("settings.telemetryRestartHint")),1)]),V(h(Md),{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:h(n)("settings.telemetry"),"onUpdate:modelValue":Re[12]||(Re[12]=Ke=>Ne())},null,8,["model-value","disabled","label"])])])])):ne("",!0),C("section",nUe,[C("h3",iUe,B(h(n)("settings.diagnostics")),1),C("div",sUe,[C("div",oUe,[C("span",rUe,[Ue(B(h(n)("settings.exportLog"))+" ",1),C("span",lUe,B(h(n)("settings.exportLogHint")),1),h(bl)()?ne("",!0):(b(),I("span",aUe,B(h(n)("settings.logHint")),1))]),V(h(jt),{variant:"secondary",size:"sm",onClick:E},{default:he(()=>[Ue(B(h(n)("settings.exportLogBtn")),1)]),_:1})])])])],512),[[rs,d.value==="advanced"]]),Bn(C("section",uUe,[C("div",cUe,[C("h4",dUe,B(h(n)("settings.archivedTitle")),1),C("p",fUe,B(h(n)("settings.archivedDesc")),1)]),C("div",hUe,[C("label",pUe,[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)),Bn(C("input",{"onUpdate:modelValue":Re[13]||(Re[13]=Ke=>se.value=Ke),placeholder:h(n)("settings.archivedSearch")},null,8,gUe),[[_o,se.value]])]),V(h(e3),{"model-value":U.value,options:Ie.value,size:"sm","aria-label":h(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":Re[14]||(Re[14]=Ke=>U.value=Ke)},null,8,["model-value","options","aria-label"]),V(h(wo),{size:"sm","model-value":J.value,options:[{value:"archived-desc",label:h(n)("settings.archivedSortArchived"),icon:"clock"},{value:"created-desc",label:h(n)("settings.archivedSortCreated"),icon:"calendar-schedule"},{value:"name-asc",label:h(n)("settings.archivedSortName"),icon:"sort"}],"onUpdate:modelValue":Re[15]||(Re[15]=Ke=>J.value=Ke)},null,8,["model-value","options"])]),ve.value?(b(),I("div",mUe,B(h(n)("settings.archivedLoadingAll")),1)):(b(),I(Be,{key:1},[ke.value.length>0?(b(),I("div",vUe,[(b(!0),I(Be,null,yt(ke.value,Ke=>(b(),I("section",{key:Ke.cwd,class:"archive-card"},[C("div",yUe,[V(h(Ce),{name:"folder-closed",size:"md"}),C("span",bUe,B(Ke.cwd),1),C("span",kUe,B(h(n)("settings.archivedSessionsCount",{count:Ke.items.length})),1)]),C("div",AUe,[(b(!0),I(Be,null,yt(Ke.items,ht=>(b(),I("div",{key:ht.id,class:"archive-row"},[C("div",CUe,[C("div",wUe,B(ht.title),1),C("div",xUe,B(h(n)("settings.archivedAt",{time:it(ht.archivedAt??ht.updatedAt)})),1)]),V(h(jt),{variant:"secondary",size:"sm",onClick:ot=>Le(ht.id)},{default:he(()=>[V(h(Ce),{name:"undo",size:"sm"}),C("span",null,B(h(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(b(),I("div",_Ue,B(Y.value.length===0?h(n)("settings.archivedEmpty"):h(n)("settings.archivedNoMatch")),1))],64))],512),[[rs,d.value==="archived"]])],34)])],512)]),_:1},8,["aria-label"]))}}),IUe=vt(MUe,[["__scopeId","data-v-ca0381a0"]]),EUe={class:"aw"},TUe={class:"crumbbar"},LUe={class:"crumbs"},NUe={key:0,class:"crumb-sep"},FUe=["onClick"],BUe={key:0,class:"filterbar"},$Ue=["placeholder"],DUe={class:"folder-list"},RUe={key:0,class:"fl-loading"},zUe=["onClick"],OUe={class:"folder-name search-rel"},PUe={key:0,class:"fl-empty"},jUe={key:1,class:"fl-loading"},HUe=["onClick"],WUe={class:"folder-name"},qUe={key:0,class:"fl-empty"},UUe={class:"paste-row"},KUe={class:"paste-input-wrap"},VUe={key:1,class:"add-error",role:"alert"},ZUe={class:"actions"},GUe={class:"footer-hint"},QUe=600,YUe=6,wM=150,JUe=tt({__name:"AddWorkspaceDialog",props:{browseFs:{type:Function},getFsHome:{type:Function},defaultPath:{},error:{}},emits:["add","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=Z(!0),r=Z(!1),l=Z(!1),a=Z(""),u=Z(null),c=Z([]),d=Z(""),f=Z(!1),p=Z([]),g=F(()=>d.value.trim().length>0);let m=0,y=null;function w(z,G){const K=z.toLowerCase(),H=G.toLowerCase();let q=0;for(let X=0;X<H.length&&q<K.length;X++)H[X]===K[q]&&q++;return q===K.length}async function k(z){const G=a.value,K=z.trim();if(!G||K===""){p.value=[],f.value=!1;return}const H=++m;f.value=!0;const q=[],X=[{path:G,depth:0}];let ee=0;for(;X.length>0&&ee<QUe&&q.length<wM;){if(H!==m)return;const ue=X.shift();ee++;let ie;try{ie=await i.browseFs(ue.path)}catch{continue}if(H!==m)return;for(const xe of ie.entries){if(!xe.isDir)continue;const ce=xe.path.startsWith(G)?xe.path.slice(G.length).replace(/^\/+/,""):xe.path;if(w(K,ce||xe.name)&&(q.push({path:xe.path,name:xe.name,rel:ce||xe.name}),q.length>=wM))break;ue.depth+1<YUe&&X.push({path:xe.path,depth:ue.depth+1})}H===m&&(p.value=[...q])}H===m&&(f.value=!1)}Qe(d,z=>{if(y&&clearTimeout(y),z.trim()===""){m++,p.value=[],f.value=!1;return}y=setTimeout(()=>void k(z),220)});const A=Z(!1),v=Z(""),x=F(()=>v.value.trim()),E=F(()=>{const z=a.value;if(!z)return[];const G=z.split("/").filter(Boolean),K=[{label:"/",path:"/"}];let H="";for(const q of G)H+=`/${q}`,K.push({label:q,path:H});return K}),S=F(()=>a.value.length>0);async function M(z){r.value=!0;try{const G=await i.browseFs(z);if(!G.path){l.value=!0;return}a.value=G.path,u.value=G.parent,c.value=G.entries,d.value="",l.value=!1}catch{l.value=!0}finally{r.value=!1}}function _(z){z.isDir&&M(z.path)}function N(){u.value&&M(u.value)}function D(){S.value&&s("add",a.value)}function T(){x.value.length!==0&&s("add",x.value)}const{handleCompositionStart:$,handleCompositionEnd:P,isComposingKeyEvent:O}=Kr();function R(z){O(z)||T()}function W(z){z.key==="Escape"&&O(z)&&z.stopPropagation()}return pn(async()=>{r.value=!0;try{if(i.defaultPath&&(await M(i.defaultPath),!l.value))return;const z=await i.getFsHome();z.home?await M(z.home):l.value=!0}catch{l.value=!0}finally{r.value=!1}}),An(()=>{y&&clearTimeout(y)}),(z,G)=>(b(),fe(h(La),{open:o.value,"onUpdate:open":G[5]||(G[5]=K=>o.value=K),title:h(n)("workspace.addTitle"),size:"lg",height:"fixed",padded:!1,onClose:G[6]||(G[6]=K=>s("close"))},{default:he(()=>[C("div",EUe,[l.value?ne("",!0):(b(),I(Be,{key:0},[C("div",TUe,[V(h(rn),{size:"sm",disabled:!u.value,label:h(n)("workspace.up"),tooltip:h(n)("workspace.up"),onClick:N},{default:he(()=>[V(h(Ce),{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label","tooltip"]),C("div",LUe,[(b(!0),I(Be,null,yt(E.value,(K,H)=>(b(),I(Be,{key:K.path},[H>1?(b(),I("span",NUe,"/")):ne("",!0),C("button",{class:De(["crumb",{last:H===E.value.length-1}]),onClick:q=>M(K.path)},B(K.label),11,FUe)],64))),128))])]),r.value?ne("",!0):(b(),I("div",BUe,[V(h(Ce),{class:"filter-icon",name:"search",size:"md"}),Bn(C("input",{"onUpdate:modelValue":G[0]||(G[0]=K=>d.value=K),class:"filter-input",type:"text",placeholder:h(n)("workspace.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:G[1]||(G[1]=It(()=>{},["stop"]))},null,40,$Ue),[[_o,d.value]]),f.value?(b(),fe(h(Bi),{key:0,size:"sm"})):ne("",!0)])),C("div",DUe,[r.value?(b(),I("div",RUe,B(h(n)("workspace.browsing")),1)):g.value?(b(),I(Be,{key:1},[(b(!0),I(Be,null,yt(p.value,K=>(b(),I("button",{key:K.path,class:"folder-row",onClick:H=>M(K.path)},[V(h(Ce),{class:"dir-icon",name:"folder-closed",size:"sm"}),C("span",OUe,B(K.rel),1)],8,zUe))),128)),!f.value&&p.value.length===0?(b(),I("div",PUe,B(h(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&p.value.length===0?(b(),I("div",jUe,B(h(n)("workspace.searching")),1)):ne("",!0)],64)):(b(),I(Be,{key:2},[(b(!0),I(Be,null,yt(c.value,K=>(b(),I("button",{key:K.path,class:"folder-row",onClick:H=>_(K)},[V(h(Ce),{class:"dir-icon",name:"folder-closed",size:"sm"}),C("span",WUe,B(K.name),1)],8,HUe))),128)),c.value.length===0?(b(),I("div",qUe,B(h(n)("workspace.noSubfolders")),1)):ne("",!0)],64))])],64)),C("div",{class:De(["paste-section",{"paste-only":l.value}])},[!l.value&&!A.value?(b(),fe(h(jt),{key:0,variant:"ghost",size:"sm",onClick:G[2]||(G[2]=K=>A.value=!0)},{default:he(()=>[Ue(B(h(n)("workspace.pasteToggle")),1)]),_:1})):(b(),fe(h(oU),{key:1,label:h(n)("workspace.pathLabel")},{default:he(()=>[C("div",UUe,[C("div",KUe,[V(h(io),{modelValue:v.value,"onUpdate:modelValue":G[3]||(G[3]=K=>v.value=K),placeholder:h(n)("workspace.pathPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:[qr(It(R,["stop"]),["enter"]),W],onCompositionstart:h($),onCompositionend:h(P)},null,8,["modelValue","placeholder","onKeydown","onCompositionstart","onCompositionend"])]),V(h(rn),{disabled:x.value.length===0,label:h(n)("workspace.add"),tooltip:h(n)("workspace.add"),onClick:T},{default:he(()=>[V(h(Ce),{name:"plus",size:"md"})]),_:1},8,["disabled","label","tooltip"])])]),_:1},8,["label"]))],2),e.error?(b(),I("div",VUe,B(e.error),1)):ne("",!0),C("div",ZUe,[V(h(gn),{text:a.value},{default:he(()=>[l.value?ne("",!0):(b(),fe(h(jt),{key:0,variant:"primary",disabled:!S.value,onClick:D},{default:he(()=>[Ue(B(h(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),V(h(jt),{variant:"secondary",onClick:G[4]||(G[4]=K=>s("close"))},{default:he(()=>[Ue(B(h(n)("workspace.cancel")),1)]),_:1})]),C("div",GUe,B(h(n)("workspace.browseHint")),1)])]),_:1},8,["open","title"]))}}),XUe=vt(JUe,[["__scopeId","data-v-fea98be5"]]),eKe={key:0,class:"confirm-dialog__message"},tKe=tt({__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,i=t,{t:s}=Bt();function o(){n.loading||(i("update:open",!1),i("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(),i("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",r),Gn(()=>{typeof window<"u"&&window.removeEventListener("keydown",r)}),(l,a)=>(b(),fe(h(La),{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]=u=>i("update:open",u)),onClose:o},{foot:he(()=>[V(h(jt),{variant:"secondary",disabled:e.loading,onClick:o},{default:he(()=>[Ue(B(e.cancelLabel??h(s)("common.cancel")),1)]),_:1},8,["disabled"]),V(h(jt),{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=u=>i("confirm"))},{default:he(()=>[Ue(B(e.confirmLabel??h(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:he(()=>[e.message?(b(),I("p",eKe,B(e.message),1)):ne("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),nKe=vt(tKe,[["__scopeId","data-v-aa5422da"]]),iKe=tt({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:i,runAction:s}=Hu();function o(){s()}return(r,l)=>h(t)!==null?(b(),fe(nKe,{key:0,open:!0,title:h(t).title,message:h(t).message,"confirm-label":h(t).confirmLabel,"cancel-label":h(t).cancelLabel,variant:h(t).variant,loading:h(n),onConfirm:o,onCancel:l[0]||(l[0]=a=>h(i)(!1))},null,8,["title","message","confirm-label","cancel-label","variant","loading"])):ne("",!0)}}),sKe={class:"rows"},oKe={class:"row"},rKe={class:"row"},lKe={class:"row"},aKe={class:"row"},uKe={class:"row"},cKe={class:"row"},dKe={class:"ctx-text"},fKe={key:0,class:"bar"},hKe={class:"row"},pKe=tt({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},swarmMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=Z(!0),r=F(()=>i.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(i.status.ctxUsed/i.status.ctxMax*100)))),l=F(()=>i.status.ctxMax>0?n("status.statusContextValue",{used:Ia(i.status.ctxUsed),max:Ia(i.status.ctxMax),pct:r.value}):n("status.statusNone"));function a(g){return n(g==="yolo"?"status.permissionYolo":g==="auto"?"status.permissionAuto":"status.permissionManual")}const u=F(()=>{const g=i.status.permission;return g==="auto"?"var(--color-danger)":g==="yolo"?"var(--color-warning)":"var(--color-text)"}),c=F(()=>i.planMode?n("status.planOn"):n("status.planOff")),d=F(()=>i.swarmMode?n("status.swarmOn"):n("status.swarmOff")),f=F(()=>typeof i.costUsd=="number"&&i.costUsd>0),p=F(()=>f.value?`$${i.costUsd.toFixed(4)}`:n("status.statusNone"));return(g,m)=>(b(),fe(h(La),{open:o.value,"onUpdate:open":m[0]||(m[0]=y=>o.value=y),title:h(n)("status.statusPanelTitle"),onClose:m[1]||(m[1]=y=>s("close"))},{default:he(()=>[C("dl",sKe,[C("div",oKe,[C("dt",null,B(h(n)("status.statusModel")),1),C("dd",null,B(e.status.model),1)]),C("div",rKe,[C("dt",null,B(h(n)("status.statusThinking")),1),C("dd",null,B(e.thinking),1)]),C("div",lKe,[C("dt",null,B(h(n)("status.statusPermission")),1),C("dd",{style:Vt({color:u.value})},B(a(e.status.permission)),5)]),C("div",aKe,[C("dt",null,B(h(n)("status.statusPlanMode")),1),C("dd",{class:De({"plan-on":e.planMode})},B(c.value),3)]),C("div",uKe,[C("dt",null,B(h(n)("status.statusSwarmMode")),1),C("dd",{class:De({"swarm-on":e.swarmMode})},B(d.value),3)]),C("div",cKe,[C("dt",null,B(h(n)("status.statusContext")),1),C("dd",null,[C("span",dKe,B(l.value),1),e.status.ctxMax>0?(b(),I("span",fKe,[C("i",{style:Vt({width:r.value+"%"})},null,4)])):ne("",!0)])]),C("div",hKe,[C("dt",null,B(h(n)("status.statusCost")),1),C("dd",null,B(p.value),1)])])]),_:1},8,["open","title"]))}}),gKe=vt(pKe,[["__scopeId","data-v-340d1b31"]]),mKe={key:0,class:"actions"},vKe=["onClick"],yKe=["onClick"],bKe={key:1,class:"details"},kKe=tt({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt();function o(_){return typeof _=="object"&&_!==null}function r(_){return o(_)?_.title:_}function l(_){return o(_)?_.message??"":""}function a(_){return o(_)?_.details:void 0}function u(_){return o(_)?_.severity==="error":_.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|失败|failed/i.test(_)}function c(_){return o(_)?_.severity==="error"?"danger":_.severity==="success"?"success":_.severity==="info"?"info":"warning":u(_)?"danger":"warning"}function d(_){return o(_)?`notice:${_.severity}:${_.title}:${_.message??""}:${JSON.stringify(_.details??[])}`:`text:${_}`}function f(_){if(!o(_))return _;const N=[_.title];_.message&&N.push(_.message);const D=_.details??[];if(D.length>0){N.push("",`${s("warnings.diagnostics")}:`);for(const T of D)N.push(`${T.label}: ${T.value}`)}return N.join(` +`)}let p=1;const g=Z([]),m=new Map,y=new Map;function w(_){const N=u(_)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?N+5e3:N}function k(_,N){const D=m.get(_)??{handle:null,deadline:0,remaining:0};D.handle=setTimeout(()=>M(_),N),D.deadline=Date.now()+N,m.set(_,D)}function A(_){const N=m.get(_);N&&N.handle!==null&&clearTimeout(N.handle),m.delete(_)}function v(_){const N=m.get(_);!N||N.handle===null||(clearTimeout(N.handle),N.handle=null,N.remaining=Math.max(0,N.deadline-Date.now()))}function x(_){if(g.value.find(T=>T.id===_)?.detailsOpen)return;const D=m.get(_);!D||D.handle!==null||k(_,D.remaining)}function E(_){_.detailsOpen=!_.detailsOpen,_.detailsOpen?v(_.id):x(_.id)}async function S(_){if(!await ro(f(_.warning)))return;_.copied=!0;const D=y.get(_.id);D&&clearTimeout(D),y.set(_.id,setTimeout(()=>{_.copied=!1,y.delete(_.id)},1400))}function M(_){A(_);const N=y.get(_);N&&clearTimeout(N),y.delete(_);const D=g.value.findIndex(T=>T.id===_);D!==-1&&(g.value=g.value.filter(T=>T.id!==_),i("dismiss",D))}return Qe(()=>n.warnings,_=>{const N=[...g.value];g.value=_.map(D=>{const T=d(D),$=N.findIndex(R=>R.key===T),P=$===-1?void 0:N.splice($,1)[0];if(P)return P.warning=D,P;const O={id:p++,key:T,warning:D,detailsOpen:!1,copied:!1};return k(O.id,w(D)),O});for(const D of N){A(D.id);const T=y.get(D.id);T&&clearTimeout(T),y.delete(D.id)}},{immediate:!0,flush:"post"}),An(()=>{m.forEach(_=>{_.handle!==null&&clearTimeout(_.handle)}),m.clear(),y.forEach(_=>clearTimeout(_)),y.clear()}),(_,N)=>(b(),fe(QI,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:he(()=>[(b(!0),I(Be,null,yt(g.value,D=>(b(),fe(h(OU),{key:D.id,variant:c(D.warning),title:r(D.warning),message:l(D.warning),"dismiss-label":h(s)("warnings.dismiss"),onDismiss:T=>M(D.id),onPointerenter:T=>v(D.id),onPointerleave:T=>x(D.id)},{default:he(()=>[a(D.warning)?.length?(b(),I("div",mKe,[C("button",{class:"link",type:"button",onClick:T=>E(D)},B(D.detailsOpen?h(s)("warnings.hideDetails"):h(s)("warnings.showDetails")),9,vKe),C("button",{class:"link",type:"button",onClick:T=>S(D)},B(D.copied?h(s)("warnings.copied"):h(s)("warnings.copyDetails")),9,yKe)])):ne("",!0),D.detailsOpen&&a(D.warning)?.length?(b(),I("dl",bKe,[(b(!0),I(Be,null,yt(a(D.warning),T=>(b(),I("div",{key:`${T.label}:${T.value}`,class:"detail-row"},[C("dt",null,B(T.label),1),C("dd",null,B(T.value),1)]))),128))])):ne("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),AKe=vt(kKe,[["__scopeId","data-v-ac44e9ef"]]),CKe={class:"topbar"},wKe={class:"wsq"},xKe=["aria-label"],_Ke={class:"tb-path"},SKe={class:"ws"},MKe={class:"se"},IKe={class:"tb-sub"},EKe=tt({__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}=Bt(),i=e,s=t,o=F(()=>{const a=i.workspace,c=(a?.name||a?.root||"").trim().charAt(0);return c?c.toUpperCase():"K"}),r=F(()=>i.workspace?.name??n("workspace.noWorkspace")),l=F(()=>i.running?n("mobile.running"):n("mobile.idle"));return(a,u)=>(b(),I("div",CKe,[C("span",wKe,B(o.value),1),C("button",{type:"button",class:"tb-mid","aria-label":h(n)("mobile.openSwitcher"),onClick:u[0]||(u[0]=c=>s("openSwitcher"))},[C("span",_Ke,[C("span",SKe,B(r.value),1),e.sessionTitle?(b(),I(Be,{key:0},[u[2]||(u[2]=C("span",{class:"sl"},"/",-1)),C("span",MKe,B(e.sessionTitle),1)],64)):ne("",!0),u[3]||(u[3]=C("span",{class:"cv"},"⌄",-1))]),C("span",IKe,[C("span",{class:De(["rd",{on:e.running}])},null,2),C("span",null,B(l.value),1),e.branch?(b(),I(Be,{key:0},[Ue(" · "+B(e.branch),1)],64)):ne("",!0),e.sessionCount>0?(b(),I(Be,{key:1},[Ue(" · "+B(h(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):ne("",!0)])],8,xKe),V(h(rn),{size:"lg",label:h(n)("mobile.openSettings"),onClick:u[1]||(u[1]=c=>s("openSettings"))},{default:he(()=>[V(h(Ce),{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),TKe=vt(EKe,[["__scopeId","data-v-7f357087"]]),LKe={key:0,class:"sheet-root"},NKe=["aria-label"],FKe=["aria-label"],BKe={key:0,class:"sheet-head"},$Ke={class:"sheet-title"},DKe={class:"sheet-body"},RKe=tt({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(){s("update:modelValue",!1),s("close")}function r(l){l.key==="Escape"&&i.closeOnEsc&&o()}return Qe(()=>i.modelValue,l=>{typeof document>"u"||(l?document.addEventListener("keydown",r):document.removeEventListener("keydown",r))},{immediate:!0}),An(()=>{typeof document<"u"&&document.removeEventListener("keydown",r)}),(l,a)=>(b(),fe(ys,{name:"sheet"},{default:he(()=>[e.modelValue?(b(),I("div",LKe,[C("div",{class:"sheet-scrim",onClick:o}),C("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||h(n)("mobile.sheetLabel")},[C("button",{type:"button",class:"sheet-grab","aria-label":h(n)("mobile.closeSheet"),onClick:o},null,8,FKe),e.title?(b(),I("div",BKe,[C("span",$Ke,B(e.title),1)])):ne("",!0),C("div",DKe,[En(l.$slots,"default",{},void 0,!0)])],8,NKe)])):ne("",!0)]),_:3}))}}),QD=vt(RKe,[["__scopeId","data-v-c3d5dadc"]]),zKe={class:"mlist"},OKe={key:0,class:"mempty"},PKe=["onClick"],jKe={class:"mgh-main"},HKe={class:"mgh-name"},WKe={class:"mgh-path"},qKe={key:2,class:"att"},UKe={key:0,class:"mempty small"},KKe=["onClick"],VKe={class:"m"},ZKe={class:"s"},GKe={key:0,class:"att"},QKe={key:1,class:"mshow-more-row"},YKe=["disabled","onClick"],JKe={key:1,class:"mshow-more-sep","aria-hidden":"true"},XKe=["onClick"],eVe=tt({__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}=Bt(),i=e,s=t;function o(){s("update:modelValue",!1)}function r($){s("select",$),o()}function l($){s("createInWorkspace",$),o()}function a(){s("create"),o()}function u(){s("addWorkspace"),o()}const c=Z(new Set);function d($){return c.value.has($)}function f($){const P=new Set(c.value);P.has($)?P.delete($):P.add($),c.value=P,x.value=null,_.value=null}const p=Z(new Map);function g($){return p.value.get($.workspace.id)??$.initialCount}function m($){const P=$.sessions.slice(0,g($));if(i.activeId&&!P.some(O=>O.id===i.activeId)){const O=$.sessions.find(R=>R.id===i.activeId);if(O)return[...P,O]}return P}function y($){return $.sessions.length>g($)||$.hasMore||$.loadingMore}function w($){return g($)>$.initialCount}function k($){const P=i.groups.find(W=>W.workspace.id===$);if(!P)return;const O=g(P)+tk,R=new Map(p.value);R.set($,O),p.value=R,P.sessions.length<O&&P.hasMore&&s("loadMore",$)}function A($){if(!p.value.has($))return;const P=new Map(p.value);P.delete($),p.value=P}function v($){return i.attentionByWorkspace[$]??0}const x=Z(null);function E($){x.value=x.value===$?null:$,_.value=null}function S($){x.value=null;const O=(typeof window<"u"?window.prompt(n("sidebar.rename"),$.title):null)?.trim();O&&s("rename",$.id,O)}function M($){x.value=null,s("archive",$)}const _=Z(null);function N($){_.value=_.value===$?null:$,x.value=null}function D($){ro($.root),_.value=null}function T($){_.value=null,s("deleteWorkspace",$.id)}return($,P)=>(b(),fe(QD,{"model-value":e.modelValue,"onUpdate:modelValue":P[2]||(P[2]=O=>s("update:modelValue",O))},{default:he(()=>[C("button",{type:"button",class:"newrow",onClick:a},[V(h(Ce),{name:"message",size:"sm"}),Ue(" "+B(h(n)("sidebar.newChat")),1)]),C("button",{type:"button",class:"newrow secondary",onClick:u},[V(h(Ce),{name:"folder",size:"sm"}),Ue(" "+B(h(n)("sidebar.newWorkspace")),1)]),C("div",zKe,[e.groups.length===0?(b(),I("div",OKe,B(h(n)("workspace.noWorkspace")),1)):ne("",!0),(b(!0),I(Be,null,yt(e.groups,O=>(b(),I("div",{key:O.workspace.id,class:"mgroup"},[C("div",{class:De(["mgh",{on:O.workspace.id===e.activeWorkspaceId}]),onClick:R=>f(O.workspace.id)},[d(O.workspace.id)?(b(),fe(h(Ce),{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(b(),fe(h(Ce),{key:1,class:"mgh-folder",name:"folder",size:"sm"})),C("div",jKe,[C("span",HKe,B(O.workspace.name),1),V(h(gn),{text:O.workspace.root},{default:he(()=>[C("span",WKe,B(O.workspace.shortPath),1)]),_:2},1032,["text"])]),d(O.workspace.id)&&v(O.workspace.id)>0?(b(),I("span",qKe,B(v(O.workspace.id)),1)):ne("",!0),V(h(rn),{size:"lg",class:"mgh-more",label:h(n)("sidebar.options"),onClick:It(R=>N(O.workspace.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),V(h(rn),{size:"lg",class:"mgh-add",label:h(n)("workspace.newInGroup"),onClick:It(R=>l(O.workspace.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),_.value===O.workspace.id?(b(),fe(h(cl),{key:3,class:"kmenu wsmenu",onClick:P[0]||(P[0]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{size:"lg",onClick:R=>D(O.workspace)},{default:he(()=>[Ue(B(h(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),V(h(bn),{size:"lg",danger:"",onClick:R=>T(O.workspace)},{default:he(()=>[Ue(B(h(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):ne("",!0)],10,PKe),Bn(C("div",null,[O.sessions.length===0?(b(),I("div",UKe,B(h(n)("sidebar.noSessions")),1)):ne("",!0),(b(!0),I(Be,null,yt(m(O),R=>(b(),I("div",{key:R.id,class:De(["srow",{cur:R.id===e.activeId}]),onClick:W=>r(R.id)},[C("div",VKe,[C("div",{class:De(["t",{run:R.busy,aborted:!R.busy&&(e.attentionBySession[R.id]??0)===0&&R.lastTurnReason==="failed"}])},B(R.title),3),C("div",ZKe,B(R.time),1)]),(e.attentionBySession[R.id]??0)>0?(b(),I("span",GKe,B(e.attentionBySession[R.id]),1)):ne("",!0),V(h(rn),{size:"lg",class:"kb",label:h(n)("sidebar.options"),onClick:It(W=>E(R.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),x.value===R.id?(b(),fe(h(cl),{key:1,class:"kmenu",onClick:P[1]||(P[1]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{size:"lg",onClick:W=>S(R)},{default:he(()=>[Ue(B(h(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),V(h(bn),{size:"lg",onClick:W=>M(R.id)},{default:he(()=>[Ue(B(h(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):ne("",!0)],10,KKe))),128)),y(O)||w(O)?(b(),I("div",QKe,[y(O)?(b(),I("button",{key:0,type:"button",class:"mshow-more",disabled:O.loadingMore,onClick:It(R=>k(O.workspace.id),["stop"])},[V(h(Ce),{name:"chevron-down",size:"sm"}),Ue(" "+B(O.loadingMore?h(n)("sidebar.loadingMore"):h(n)("sidebar.showMore")),1)],8,YKe)):ne("",!0),y(O)&&w(O)?(b(),I("span",JKe,"·")):ne("",!0),w(O)?(b(),I("button",{key:2,type:"button",class:"mshow-more",onClick:It(R=>A(O.workspace.id),["stop"])},[V(h(Ce),{name:"chevron-up",size:"sm"}),Ue(" "+B(h(n)("sidebar.showLess")),1)],8,XKe)):ne("",!0)])):ne("",!0)],512),[[rs,!d(O.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),tVe=vt(eVe,[["__scopeId","data-v-67278201"]]),nVe={class:"group-title"},iVe={class:"srow-main"},sVe={class:"srow-label"},oVe={class:"srow-sub"},rVe={class:"srow read-only"},lVe={class:"srow-main"},aVe={class:"srow-label"},uVe={key:0,class:"srow-sub"},cVe={class:"cache-note"},dVe=["aria-checked"],fVe={class:"srow-main"},hVe={class:"srow-label"},pVe={class:"srow-sub"},gVe=["aria-checked"],mVe={class:"srow-main"},vVe={class:"srow-label"},yVe={class:"srow-sub"},bVe={class:"srow-main"},kVe={class:"srow-label"},AVe={class:"srow-sub"},CVe=["aria-checked"],wVe={class:"srow-main"},xVe={class:"srow-label"},_Ve={class:"srow-sub"},SVe={class:"srow-main"},MVe={class:"srow-label"},IVe={class:"srow read-only"},EVe={class:"srow-main"},TVe={class:"srow-label"},LVe={class:"srow-sub"},NVe=["aria-label"],FVe={class:"group-title"},BVe={class:"srow-main"},$Ve={class:"srow-label"},DVe={class:"srow-sub"},RVe={class:"srow read-only pref"},zVe={class:"srow-main"},OVe={class:"srow-label"},PVe={class:"srow read-only pref"},jVe={class:"srow-main"},HVe={class:"srow-label"},WVe={class:"srow read-only pref"},qVe={class:"srow-main"},UVe={class:"srow-label"},KVe={key:2,class:"srow read-only acct-profile"},VVe={class:"acct-avatar","aria-hidden":"true"},ZVe=["src"],GVe={class:"srow-main"},QVe={class:"acct-name-row"},YVe={class:"srow-label"},JVe={class:"srow-sub"},XVe={class:"srow-main"},eZe={class:"srow-label"},tZe={class:"srow-main"},nZe={class:"srow-label"},iZe={key:5,class:"srow read-only"},sZe={class:"srow-main"},oZe={class:"srow-label"},rZe={class:"srow-val dim"},lZe={class:"arch-subhead"},aZe={class:"arch-count"},uZe={class:"arch-tools"},cZe={key:0,class:"arch-empty"},dZe={class:"arch-meta"},fZe={class:"arch-name"},hZe={class:"arch-time"},pZe={key:2,class:"arch-empty"},gZe=100,mZe=tt({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},initialView:{},status:{},thinking:{},planMode:{type:Boolean},goalMode:{type:Boolean},goalActive:{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","toggleGoal","focusGoal","toggleSwarm","setPermission","setColorScheme","setFontScale","login","logout"],setup(e,{emit:t}){const{t:n}=Bt(),{isConfirmOpen:i}=Hu(),s=e,o=t;function r(ce){o("setColorScheme",ce)}const l=["manual","yolo","auto"],a=F(()=>s.models?.find(ce=>ce.id===s.status?.modelId)),u=F(()=>lv(a.value)),c=F(()=>Ap(a.value)),d=F(()=>wm(a.value,s.thinking)),f=F(()=>c.value.includes(d.value)?d.value:""),p=F(()=>c.value.map(ce=>({value:ce,label:g3(ce)}))),g=F(()=>s.planMode===!0),m=F(()=>s.goalMode===!0);function y(){if(s.goalActive){o("focusGoal");return}!m.value&&g.value&&o("togglePlan"),o("toggleGoal")}function w(){!g.value&&m.value&&o("toggleGoal"),o("togglePlan")}const k=F(()=>s.swarmMode===!0),A=Z(!1);Qe(()=>s.managedUserInfo?.avatar,()=>{A.value=!1});const v=F(()=>!!s.managedUserInfo?.avatar&&!A.value),x=F(()=>s.managedUserInfo?.userLevelName?.trim()??""),E=F(()=>{const ce=s.status.permission;return ce==="auto"?"var(--color-danger)":ce==="yolo"?"var(--color-warning)":"var(--color-text-muted)"}),S=F(()=>{const ce=s.status.permission,pe=n(ce==="yolo"?"mobile.permYoloSub":ce==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${ce} · ${pe}`}),M=F(()=>s.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(s.status.ctxUsed/s.status.ctxMax*100))):0),_=F(()=>s.status.ctxMax>0?`${Ia(s.status.ctxUsed)}/${Ia(s.status.ctxMax)}`:n("status.statusNone"));function N(ce){o("setThinking",O5(a.value,ce))}function D(){const ce=l.indexOf(s.status.permission),pe=l[(ce+1)%l.length];o("setPermission",pe)}function T(){o("pickModel"),o("update:modelValue",!1)}function $(){o("login"),o("update:modelValue",!1)}function P(){o("logout"),o("update:modelValue",!1)}const O=Fa(),R=Z("main"),W=Z([]),z=Z(!1),G=Z(!1),K=Z(""),H=Z("archived-desc");async function q(){if(!z.value){z.value=!0,G.value=!1;try{const ce=[];let pe;for(;;){const Ne=await O.loadArchivedSessions({beforeId:pe,pageSize:gZe});if(ce.push(...Ne.items),!Ne.hasMore||Ne.items.length===0)break;const te=Ne.items.at(-1)?.id;if(te===void 0)break;pe=te}W.value=ce,G.value=!0}catch(ce){Dl("loadAllArchived failed",ce)}finally{z.value=!1}}}function X(){R.value="archived",K.value="",q()}Qe(()=>s.modelValue,ce=>{ce&&s.initialView==="archived"&&X()});function ee(){R.value="main"}const ue=F(()=>{const ce=K.value.trim().toLowerCase();let pe=W.value.filter(Ne=>Ne.archived===!0);return ce&&(pe=pe.filter(Ne=>Ne.title.toLowerCase().includes(ce))),pe=pe.slice(),H.value==="archived-desc"?pe.sort((Ne,te)=>(te.archivedAt??te.updatedAt).localeCompare(Ne.archivedAt??Ne.updatedAt)):H.value==="created-desc"?pe.sort((Ne,te)=>te.createdAt.localeCompare(Ne.createdAt)):pe.sort((Ne,te)=>Ne.title.localeCompare(te.title,"zh")),pe});async function ie(ce){await O.restoreSession(ce)&&(W.value=W.value.filter(Ne=>Ne.id!==ce))}function xe(ce){const pe=new Date(ce);if(Number.isNaN(pe.getTime()))return ce;const Ne=te=>String(te).padStart(2,"0");return`${pe.getFullYear()}-${Ne(pe.getMonth()+1)}-${Ne(pe.getDate())} ${Ne(pe.getHours())}:${Ne(pe.getMinutes())}`}return Qe(()=>s.modelValue,ce=>{ce||(R.value="main")}),(ce,pe)=>(b(),fe(QD,{"model-value":e.modelValue,title:h(n)("mobile.settingsTitle"),"close-on-esc":!h(i),"onUpdate:modelValue":pe[5]||(pe[5]=Ne=>o("update:modelValue",Ne))},{default:he(()=>[R.value==="main"?(b(),I(Be,{key:0},[C("div",nVe,B(h(n)("mobile.groupSession")),1),C("button",{type:"button",class:"srow",onClick:T},[C("span",iVe,[C("span",sVe,B(h(n)("status.statusModel")),1),C("span",oVe,B(e.status.model),1)]),pe[6]||(pe[6]=C("span",{class:"chev"},"›",-1))]),C("div",rVe,[C("span",lVe,[C("span",aVe,B(h(n)("status.statusThinking")),1),u.value==="unsupported"?(b(),I("span",uVe,B(h(n)("status.modeNotSupported")),1)):ne("",!0)]),c.value.length>1?(b(),fe(h(wo),{key:0,"model-value":f.value,options:p.value,size:"sm","onUpdate:modelValue":N},null,8,["model-value","options"])):(b(),I("span",{key:1,class:De(["srow-val",{dim:d.value==="off"}])},B(d.value==="off"?h(n)("status.planOff"):h(g3)(d.value)),3))]),C("div",cVe,B(h(n)("status.cacheNote")),1),C("button",{type:"button",class:"srow",role:"switch","aria-checked":g.value,onClick:w},[C("span",fVe,[C("span",hVe,B(h(n)("status.statusPlanMode")),1),C("span",pVe,B(h(n)("mobile.planModeSub")),1)]),C("span",{class:De(["toggle",{on:g.value}]),"aria-hidden":"true"},null,2)],8,dVe),e.goalActive?(b(),I("button",{key:1,type:"button",class:"srow",onClick:y},[C("span",bVe,[C("span",kVe,B(h(n)("status.goalLabel")),1),C("span",AVe,B(h(n)("mobile.goalModeSub")),1)]),V(h(Ce),{class:"srow-chevron",name:"chevron-right",size:"sm","aria-hidden":"true"})])):(b(),I("button",{key:0,type:"button",class:"srow",role:"switch","aria-checked":m.value,onClick:y},[C("span",mVe,[C("span",vVe,B(h(n)("status.goalLabel")),1),C("span",yVe,B(h(n)("mobile.goalModeSub")),1)]),C("span",{class:De(["toggle",{on:m.value}]),"aria-hidden":"true"},null,2)],8,gVe)),C("button",{type:"button",class:"srow",role:"switch","aria-checked":k.value,onClick:pe[0]||(pe[0]=Ne=>o("toggleSwarm"))},[C("span",wVe,[C("span",xVe,B(h(n)("status.statusSwarmMode")),1),C("span",_Ve,B(h(n)("mobile.swarmModeSub")),1)]),C("span",{class:De(["toggle",{on:k.value}]),"aria-hidden":"true"},null,2)],8,CVe),C("button",{type:"button",class:"srow",onClick:D},[C("span",SVe,[C("span",MVe,B(h(n)("status.statusPermission")),1),C("span",{class:"srow-sub",style:Vt({color:E.value})},B(S.value),5)]),pe[7]||(pe[7]=C("span",{class:"chev"},"›",-1))]),C("div",IVe,[C("span",EVe,[C("span",TVe,B(h(n)("status.statusContext")),1),C("span",LVe,B(_.value),1)]),C("span",{class:"ctx-meter","aria-label":_.value},[C("i",{style:Vt({width:M.value+"%"})},null,4)],8,NVe)]),C("div",FVe,B(h(n)("mobile.groupApp")),1),C("button",{type:"button",class:"srow",onClick:X},[C("span",BVe,[C("span",$Ve,B(h(n)("mobile.archivedSessions")),1),C("span",DVe,B(h(n)("mobile.archivedSessionsSub")),1)]),pe[8]||(pe[8]=C("span",{class:"chev"},"›",-1))]),C("div",RVe,[C("span",zVe,[C("span",OVe,B(h(n)("theme.colorSchemeLabel")),1)]),V(h(wo),{"model-value":e.colorScheme??"system",options:[{value:"light",label:h(n)("theme.light"),icon:"light-mode"},{value:"dark",label:h(n)("theme.dark"),icon:"dark-mode"},{value:"system",label:h(n)("theme.system")}],"onUpdate:modelValue":r},null,8,["model-value","options"])]),C("div",PVe,[C("span",jVe,[C("span",HVe,B(h(n)("sidebar.language")),1)]),V(VD)]),C("div",WVe,[C("span",qVe,[C("span",UVe,B(h(n)("settings.uiFontSize")),1)]),V(h(wo),{"model-value":e.fontScale,options:[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],"aria-label":h(n)("settings.uiFontSize"),"onUpdate:modelValue":pe[1]||(pe[1]=Ne=>o("setFontScale",Ne))},null,8,["model-value","aria-label"])]),e.managedProviderStatus==="authenticated"?(b(),I("div",KVe,[C("span",VVe,[v.value?(b(),I("img",{key:0,src:e.managedUserInfo?.avatar,alt:"",onError:pe[2]||(pe[2]=Ne=>A.value=!0)},null,40,ZVe)):(b(),fe(h(Ce),{key:1,name:"user",size:"md"}))]),C("span",GVe,[C("span",QVe,[C("span",YVe,B(e.managedUserInfo?.nickname||h(n)("sidebar.defaultUserName")),1),x.value?(b(),fe(h(Hl),{key:0,class:"acct-level",variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(x.value),1)]),_:1})):ne("",!0)]),C("span",JVe,B(h(n)("settings.signedIn")),1)])])):ne("",!0),e.managedProviderStatus==="authenticated"?(b(),I("button",{key:3,type:"button",class:"srow acct out",onClick:P},[C("span",XVe,[C("span",eZe,B(h(n)("sidebar.signOut")),1)])])):(b(),I("button",{key:4,type:"button",class:"srow acct in",onClick:$},[C("span",tZe,[C("span",nZe,B(h(n)("sidebar.signIn")),1)])])),e.serverVersion?(b(),I("div",iZe,[C("span",sZe,[C("span",oZe,B(h(n)("settings.serverVersion")),1)]),C("span",rZe,B(e.serverVersion),1)])):ne("",!0)],64)):(b(),I(Be,{key:1},[C("div",lZe,[C("button",{type:"button",class:"arch-back",onClick:ee},[pe[9]||(pe[9]=C("span",{class:"chev back"},"‹",-1)),Ue(" "+B(h(n)("mobile.archivedBack")),1)]),C("span",aZe,B(h(n)("mobile.sessionCount",{n:ue.value.length})),1)]),C("div",uZe,[V(h(io),{class:"arch-search-input","model-value":K.value,size:"sm",placeholder:h(n)("settings.archivedSearch"),"onUpdate:modelValue":pe[3]||(pe[3]=Ne=>K.value=Ne)},null,8,["model-value","placeholder"]),V(h(wo),{size:"sm","model-value":H.value,options:[{value:"archived-desc",label:h(n)("settings.archivedSortArchived")},{value:"created-desc",label:h(n)("settings.archivedSortCreated")},{value:"name-asc",label:h(n)("settings.archivedSortName")}],"onUpdate:modelValue":pe[4]||(pe[4]=Ne=>H.value=Ne)},null,8,["model-value","options"])]),z.value?(b(),I("div",cZe,B(h(n)("settings.archivedLoadingAll")),1)):ue.value.length>0?(b(!0),I(Be,{key:1},yt(ue.value,Ne=>(b(),I("div",{key:Ne.id,class:"arch-row"},[C("div",dZe,[C("div",fZe,B(Ne.title),1),C("div",hZe,B(h(n)("settings.archivedAt",{time:xe(Ne.archivedAt??Ne.updatedAt)})),1)]),V(h(jt),{variant:"secondary",size:"sm",onClick:te=>ie(Ne.id)},{default:he(()=>[Ue(B(h(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(b(),I("div",pZe,B(W.value.length===0?h(n)("settings.archivedEmpty"):h(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title","close-on-esc"]))}}),vZe=vt(mZe,[["__scopeId","data-v-81e94fd3"]]),yZe=["mask"],bZe=tt({__name:"BrandLogo",props:{size:{default:64}},setup(e){const t=`bl-eyes-${Zz()}`,n=Z(null);let i;function s(){const o=n.value;o&&(o.classList.remove("blink-now"),o.getBoundingClientRect(),o.classList.add("blink-now"),clearTimeout(i),i=setTimeout(()=>o.classList.remove("blink-now"),300))}return Gn(()=>clearTimeout(i)),(o,r)=>(b(),I("svg",{ref_key:"logoRef",ref:n,class:"brand-logo",style:Vt({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,yZe)],4))}}),j8=vt(bZe,[["__scopeId","data-v-f04205a8"]]),kZe={key:0,class:"ls-done-card"},AZe={class:"ls-done-badge"},CZe={class:"ls-card-text"},wZe={class:"ls-card-title"},xZe={class:"ls-card-hint"},_Ze={key:1,class:"ls-cards"},SZe={class:"ls-card-text"},MZe={class:"ls-card-title"},IZe={class:"ls-reco"},EZe={class:"ls-card-hint"},TZe={class:"ls-card-logo ls-card-icon"},LZe={class:"ls-card-text"},NZe={class:"ls-card-title"},FZe={class:"ls-card-hint"},BZe={key:2,class:"ls-flow"},$Ze={key:0,class:"ls-center"},DZe={class:"ls-center-text"},RZe={key:1,class:"ls-device"},zZe={class:"ls-lead"},OZe=["href"],PZe={class:"ls-code-row"},jZe=["title"],HZe={class:"ls-status"},WZe={class:"ls-status-text"},qZe={class:"ls-countdown"},UZe={key:2,class:"ls-center"},KZe={class:"ls-center-text ls-success-text"},VZe={class:"ls-center-hint"},ZZe={class:"ls-center"},GZe={class:"ls-center-text ls-err-text"},QZe={class:"ls-center-hint"},YZe={class:"ls-actions"},JZe={class:"ls-center"},XZe={class:"ls-center-text ls-warn-text"},eGe={class:"ls-center-hint"},tGe={class:"ls-actions"},nGe=tt({__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}=Bt(),i=e,s=t,o=Z("choice"),{step:r,pollError:l,flow:a,secondsLeft:u,startFlow:c,cancelFlow:d}=r$({onStartOAuthLogin:i.onStartOAuthLogin,onPollOAuthLogin:i.onPollOAuthLogin,onCancelOAuthLogin:i.onCancelOAuthLogin,onSuccess:()=>s("success")}),f=Z(!1);function p(){o.value="flow",c()}function g(){d(),o.value="choice"}async function m(){!a.value||!await ro(a.value.verificationUriComplete)||(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}function y(w){const k=Math.floor(w/60),A=w%60;return`${k}:${String(A).padStart(2,"0")}`}return(w,k)=>e.authReady?(b(),I("div",kZe,[C("span",AZe,[V(h(Ce),{name:"check",size:"sm"})]),C("div",CZe,[C("div",wZe,B(h(n)("onboarding.login.loggedInTitle")),1),C("div",xZe,B(h(n)("onboarding.login.loggedInHint")),1)])])):o.value==="choice"?(b(),I("div",_Ze,[C("button",{class:"ls-card",type:"button",onClick:p},[V(j8,{size:40,class:"ls-card-logo"}),C("div",SZe,[C("div",MZe,[Ue(B(h(n)("onboarding.login.kimiTitle"))+" ",1),C("span",IZe,B(h(n)("onboarding.login.recommended")),1)]),C("div",EZe,B(h(n)("onboarding.login.kimiHint")),1)]),V(h(Ce),{name:"chevron-right",size:"lg",class:"ls-card-chevron"})]),C("button",{class:"ls-card",type:"button",onClick:k[0]||(k[0]=A=>s("addProvider"))},[C("span",TZe,[V(h(Ce),{name:"bolt",size:"lg"})]),C("div",LZe,[C("div",NZe,B(h(n)("onboarding.login.customProviderTitle")),1),C("div",FZe,B(h(n)("onboarding.login.customProviderHint")),1)]),V(h(Ce),{name:"chevron-right",size:"lg",class:"ls-card-chevron"})])])):(b(),I("div",BZe,[h(r)==="starting"?(b(),I("div",$Ze,[V(h(Bi),{size:"md"}),C("span",DZe,B(h(n)("login.starting")),1)])):h(r)==="device-code"&&h(a)?(b(),I("div",RZe,[C("div",zZe,B(h(n)("login.lead")),1),C("a",{class:"ls-primary",href:h(a).verificationUriComplete,target:"_blank",rel:"noopener noreferrer"},[Ue(B(h(n)("login.authorizeInBrowser"))+" ",1),V(h(Ce),{name:"external-link",size:"sm"})],8,OZe),C("div",PZe,[C("span",{class:"ls-link",title:h(a).verificationUriComplete},B(h(a).verificationUriComplete),9,jZe),V(h(jt),{class:De(["ls-copy",{"is-copied":f.value}]),variant:"secondary",size:"sm",onClick:m},{default:he(()=>[f.value?(b(),I(Be,{key:0},[V(h(Ce),{name:"check",size:"sm"}),Ue(" "+B(h(n)("login.copied")),1)],64)):(b(),I(Be,{key:1},[V(h(Ce),{name:"copy",size:"sm"}),Ue(" "+B(h(n)("login.copyLink")),1)],64))]),_:1},8,["class"])]),C("div",HZe,[V(h(Bi),{size:"sm",label:h(n)("login.waitingAuth")},null,8,["label"]),C("span",WZe,B(h(n)("login.waitingAutoClose")),1),C("span",qZe,B(y(h(u))),1)])])):h(r)==="success"?(b(),I("div",UZe,[V(h(cf),{kind:"success"}),C("span",KZe,B(h(n)("login.success")),1),C("span",VZe,B(h(n)("login.successHint")),1)])):h(r)==="expired"?(b(),I(Be,{key:3},[C("div",ZZe,[V(h(cf),{kind:"expired"}),C("span",GZe,B(h(n)("login.expiredTitle")),1),C("span",QZe,B(h(n)("login.expiredHint")),1)]),C("div",YZe,[V(h(jt),{variant:"secondary",onClick:g},{default:he(()=>[Ue(B(h(n)("onboarding.back")),1)]),_:1}),V(h(jt),{variant:"primary",onClick:h(c)},{default:he(()=>[Ue(B(h(n)("login.retry")),1)]),_:1},8,["onClick"])])],64)):h(r)==="error"?(b(),I(Be,{key:4},[C("div",JZe,[V(h(cf),{kind:"error"}),C("span",XZe,B(h(l)?h(n)("login.pollErrorTitle"):h(n)("login.errorTitle")),1),C("span",eGe,B(h(l)?h(n)("login.pollErrorHint"):h(n)("login.errorHint")),1)]),C("div",tGe,[V(h(jt),{variant:"secondary",onClick:g},{default:he(()=>[Ue(B(h(n)("onboarding.back")),1)]),_:1}),V(h(jt),{variant:"primary",onClick:h(c)},{default:he(()=>[Ue(B(h(n)("login.retry")),1)]),_:1},8,["onClick"])])],64)):ne("",!0)]))}}),iGe=vt(nGe,[["__scopeId","data-v-1ff21828"]]),sGe=["aria-label"],oGe={class:"wiz-body"},rGe={key:0,class:"wiz-step"},lGe={class:"wiz-title"},aGe={class:"wiz-sub"},uGe={class:"pref-group"},cGe={class:"pref-label"},dGe={class:"lang-cards"},fGe=["onClick"],hGe={class:"opt-label"},pGe={class:"pref-group"},gGe={class:"pref-label"},mGe={class:"theme-cards"},vGe=["onClick"],yGe={class:"opt-label"},bGe={key:1,class:"wiz-step"},kGe={class:"wiz-title"},AGe={class:"wiz-sub"},CGe={class:"wiz-step-fill"},wGe={class:"wiz-foot"},xGe={class:"wiz-foot-ghost"},_Ge=tt({__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:i}=Bt(),s=e,o=t;function r(){o("addProvider")}const l=["preferences","login"],a=Z(0),u=F(()=>l[a.value]??"preferences");function c(){a.value<l.length-1&&a.value++}function d(){a.value>0&&a.value--}function f(w){i.value!==w&&Jb(w)}const{colorScheme:p,setColorScheme:g}=YT(),m=[{value:"system",labelKey:"theme.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function y(){o("loginSuccess")}return(w,k)=>(b(),I("div",{class:"wizard",role:"dialog","aria-modal":"true","aria-label":h(n)("onboarding.welcome.title")},[C("div",oGe,[u.value==="preferences"?(b(),I("section",rGe,[V(j8,{size:72}),C("h1",lGe,B(h(n)("onboarding.welcome.title")),1),C("p",aGe,B(h(n)("onboarding.welcome.subtitle")),1),C("div",uGe,[C("div",cGe,B(h(n)("onboarding.welcome.languageLabel")),1),C("div",dGe,[(b(!0),I(Be,null,yt(h(u2),A=>(b(),I("button",{key:A.code,class:De(["opt-card lang-card",{selected:h(i)===A.code}]),type:"button",onClick:v=>f(A.code)},[C("span",{class:De(["opt-radio",{on:h(i)===A.code}])},null,2),C("span",hGe,B(A.label),1)],10,fGe))),128))])]),C("div",pGe,[C("div",gGe,B(h(n)("onboarding.welcome.themeLabel")),1),C("div",mGe,[(b(),I(Be,null,yt(m,A=>C("button",{key:A.value,class:De(["opt-card theme-card",{selected:h(p)===A.value}]),type:"button",onClick:v=>h(g)(A.value)},[C("span",{class:De(["tp",`tp-${A.value}`]),"aria-hidden":"true"},[A.value==="system"?(b(),I(Be,{key:0},[k[2]||(k[2]=Lu('<span class="tp-half tp-half-light" data-v-6546a2d8><span class="tp-side" data-v-6546a2d8></span><span class="tp-lines" data-v-6546a2d8><span data-v-6546a2d8></span><span data-v-6546a2d8></span><span data-v-6546a2d8></span></span></span><span class="tp-half tp-half-dark" data-v-6546a2d8><span class="tp-side" data-v-6546a2d8></span><span class="tp-lines" data-v-6546a2d8><span data-v-6546a2d8></span><span data-v-6546a2d8></span><span data-v-6546a2d8></span></span></span>',2))],64)):(b(),I(Be,{key:1},[k[3]||(k[3]=C("span",{class:"tp-side"},null,-1)),k[4]||(k[4]=C("span",{class:"tp-lines"},[C("span"),C("span"),C("span")],-1))],64))],2),C("span",yGe,B(h(n)(A.labelKey)),1)],10,vGe)),64))])])])):(b(),I("section",bGe,[V(j8,{size:72}),C("h1",kGe,B(h(n)("onboarding.login.title")),1),C("p",AGe,B(h(n)("onboarding.login.subtitle")),1),C("div",CGe,[V(iGe,{"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:y,onAddProvider:r},null,8,["auth-ready","on-start-o-auth-login","on-poll-o-auth-login","on-cancel-o-auth-login"])])])),C("div",wGe,[u.value==="preferences"?(b(),fe(h(jt),{key:0,variant:"primary",size:"lg",class:"wiz-primary",onClick:c},{default:he(()=>[Ue(B(h(n)("onboarding.continue")),1)]),_:1})):u.value==="login"&&s.authReady?(b(),fe(h(jt),{key:1,variant:"primary",size:"lg",class:"wiz-primary",onClick:k[0]||(k[0]=A=>o("complete"))},{default:he(()=>[Ue(B(h(n)("onboarding.login.finish")),1)]),_:1})):ne("",!0),C("div",xGe,[a.value>0?(b(),fe(h(jt),{key:0,variant:"ghost",onClick:d},{default:he(()=>[Ue(B(h(n)("onboarding.back")),1)]),_:1})):ne("",!0),u.value==="login"&&s.authReady?ne("",!0):(b(),fe(h(jt),{key:1,variant:"ghost",onClick:k[1]||(k[1]=A=>o("complete"))},{default:he(()=>[Ue(B(u.value==="login"?h(n)("onboarding.login.skip"):h(n)("onboarding.skip")),1)]),_:1}))])])])],8,sGe))}}),SGe=vt(_Ge,[["__scopeId","data-v-6546a2d8"]]),MGe=["aria-label"],IGe={class:"gload-box"},EGe={class:"gload-text"},TGe=tt({__name:"GlobalLoading",setup(e){const{t}=Bt();return(n,i)=>(b(),I("div",{class:"gload",role:"status","aria-label":h(t)("app.connecting")},[C("div",IGe,[i[0]||(i[0]=Lu('<svg class="gload-logo" viewBox="0 0 96 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-v-ab85ede1><path fill="currentColor" d="M35.767 31.329c0 .37.3.671.67.671h4.305c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.672-.671h-4.304c-.37 0-.671.3-.671.671z" data-v-ab85ede1></path><path fill="currentColor" d="M90.353 31.329c0 .37.3.671.67.671h4.305c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.672-.671h-4.304a.67.67 0 0 0-.671.671z" data-v-ab85ede1></path><path fill="currentColor" d="M73.256 0a.67.67 0 0 0-.652.512l-6.366 26.1c-.106.428-.607.428-.71 0L59.159.512A.67.67 0 0 0 58.511 0H47.725c-.37 0-.668.3-.668.671V31.33c0 .37.3.671.67.671h4.781c.37 0 .671-.292.671-.662V5.554c0-.515.604-.622.726-.127l6.358 26.06a.67.67 0 0 0 .653.513h9.931c.31 0 .58-.212.653-.512L77.855 5.43c.122-.495.726-.388.726.127v25.772c0 .37.3.671.671.671h4.78c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.671-.671z" data-v-ab85ede1></path><path fill="currentColor" d="M15.279 14.837 28.264 1.133A.671.671 0 0 0 27.777 0h-6.043a.67.67 0 0 0-.477.199L6.374 15.223c-.231.234-.573.025-.573-.35V.672c0-.37-.3-.671-.671-.671H.67a.67.67 0 0 0-.67.67V31.33c0 .37.3.671.671.671H5.13c.37 0 .671-.3.671-.671v-6.114a.5.5 0 0 1 .13-.35l4.594-4.69a.293.293 0 0 1 .386-.045l12.286 9.305c1.796 1.245 4.083 2.06 6.178 2.401a.645.645 0 0 0 .743-.648v-5.537a.7.7 0 0 0-.562-.677c-1.215-.262-2.565-.758-3.59-1.468L15.332 15.58c-.22-.152-.248-.544-.052-.744" data-v-ab85ede1></path></svg>',1)),V(h(Bi),{size:"md",label:h(t)("app.connecting")},null,8,["label"]),C("div",EGe,B(h(t)("app.connecting")),1)])],8,MGe))}}),LGe=vt(TGe,[["__scopeId","data-v-ab85ede1"]]),NGe={class:"kap-root"},FGe={class:"kap-head"},BGe={class:"kap-count"},$Ge={class:"kap-head-actions"},DGe={class:"kap-filters"},RGe=["value"],zGe={class:"kap-check"},OGe={class:"kap-check"},PGe={class:"kap-view-toggle",role:"group"},jGe={key:0,class:"kap-empty"},HGe=["onClick"],WGe={class:"kap-ts"},qGe={class:"kap-label"},UGe={key:0,class:"kap-detail"},KGe={class:"kap-detail-actions"},VGe=["onClick"],ZGe={key:1,class:"kap-agg"},GGe={class:"mono"},QGe={class:"mono"},YGe={class:"num"},JGe={class:"num"},XGe={key:0},eQe={class:"mono"},tQe={class:"num"},nQe={class:"num"},iQe={key:0},sQe=tt({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,i=Z("all"),s=Z(""),o=Z(""),r=Z(!1),l=Z("timeline"),a=F(()=>(ek.value,[...Cke()])),u=F(()=>{const _=new Set;for(const N of a.value)N.sessionId&&_.add(N.sessionId);return[..._].sort()});function c(_){return _.kind==="rest:error"||_.code!==void 0&&_.code!==0||_.eventType==="error"||_.eventType==="parse-error"}const d=F(()=>{const _=s.value.trim().toLowerCase();return a.value.filter(N=>!(i.value!=="all"&&N.source!==i.value||o.value&&N.sessionId!==o.value||r.value&&!c(N)||_&&!`${N.label} ${N.kind} ${N.eventType??""} ${N.sessionId??""} ${N.requestId??""}`.toLowerCase().includes(_)))}),f=F(()=>{const _=new Map;for(const N of d.value){if(N.kind!=="ws:in"&&N.kind!=="ws:out")continue;const D=N.kind==="ws:in"?"←":"→",T=`${D} ${N.eventType??"?"} @ ${N.sessionId??"-"}`,$=_.get(T)??{key:T,sessionId:N.sessionId??"-",eventType:N.eventType??"?",dir:D,count:0};$.count++,N.seq!==void 0&&($.lastSeq=N.seq),_.set(T,$)}return[..._.values()].sort((N,D)=>D.count-N.count)}),p=F(()=>{const _=new Map;for(const N of d.value){if(N.source!=="rest"||N.kind==="rest:request")continue;const D=`${N.method??"?"} ${N.path??"?"}`,T=_.get(D)??{count:0,errors:0,totalMs:0,timed:0};T.count++,c(N)&&T.errors++,N.durationMs!==void 0&&(T.totalMs+=N.durationMs,T.timed++),_.set(D,T)}return[..._.entries()].map(([N,D])=>({key:N,count:D.count,errors:D.errors,avgMs:D.timed>0?Math.round(D.totalMs/D.timed):0})).sort((N,D)=>D.count-N.count)}),g=Z(null),m=Z(!0),y=Z(null),w=Z(null);Qe(()=>d.value.length,async()=>{if(!m.value||l.value!=="timeline")return;await kt();const _=y.value;_&&(_.scrollTop=_.scrollHeight)});function k(_){g.value=g.value===_?null:_}function A(_){const N=new Date(_),D=(T,$=2)=>String(T).padStart($,"0");return`${D(N.getHours())}:${D(N.getMinutes())}:${D(N.getSeconds())}.${D(N.getMilliseconds(),3)}`}function v(_){return JSON.stringify(_,null,2)}async function x(_){await ro(v(_))&&(w.value=_.id,setTimeout(()=>{w.value===_.id&&(w.value=null)},1500))}function E(){m$(d.value)}function S(_){return c(_)||_.source==="client"?"b-err":_.source==="rest"?"b-rest":_.kind==="ws:lifecycle"?"b-life":_.kind==="ws:out"?"b-out":"b-in"}function M(_){return _.source==="rest"?"REST":_.source==="client"?"APP":"WS"}return(_,N)=>(b(),I("section",NGe,[C("header",FGe,[N[11]||(N[11]=C("strong",null,"KAP debug",-1)),C("span",BGe,B(d.value.length)+"/"+B(a.value.length),1),C("div",$Ge,[C("button",{type:"button",class:De({on:h(n1)}),onClick:N[0]||(N[0]=D=>n1.value=!h(n1))},B(h(n1)?"resume":"pause"),3),C("button",{type:"button",onClick:N[1]||(N[1]=D=>h(wke)())},"clear"),C("button",{type:"button",onClick:N[2]||(N[2]=D=>E())},"export jsonl"),V(h(gn),{text:"Close window"},{default:he(()=>[C("button",{type:"button",onClick:N[3]||(N[3]=D=>n("close"))},"✕")]),_:1})])]),C("div",DGe,[Bn(C("select",{"onUpdate:modelValue":N[4]||(N[4]=D=>i.value=D),"aria-label":"Source filter"},[...N[12]||(N[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),[[W4,i.value]]),Bn(C("select",{"onUpdate:modelValue":N[5]||(N[5]=D=>o.value=D),"aria-label":"Session filter"},[N[13]||(N[13]=C("option",{value:""},"all sessions",-1)),(b(!0),I(Be,null,yt(u.value,D=>(b(),I("option",{key:D,value:D},B(D),9,RGe))),128))],512),[[W4,o.value]]),Bn(C("input",{"onUpdate:modelValue":N[6]||(N[6]=D=>s.value=D),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[_o,s.value]]),C("label",zGe,[Bn(C("input",{"onUpdate:modelValue":N[7]||(N[7]=D=>r.value=D),type:"checkbox"},null,512),[[hm,r.value]]),N[14]||(N[14]=Ue(" errors",-1))]),C("label",OGe,[Bn(C("input",{"onUpdate:modelValue":N[8]||(N[8]=D=>m.value=D),type:"checkbox"},null,512),[[hm,m.value]]),N[15]||(N[15]=Ue(" follow",-1))]),C("div",PGe,[C("button",{type:"button",class:De({on:l.value==="timeline"}),onClick:N[9]||(N[9]=D=>l.value="timeline")},"timeline",2),C("button",{type:"button",class:De({on:l.value==="aggregate"}),onClick:N[10]||(N[10]=D=>l.value="aggregate")},"aggregate",2)])]),l.value==="timeline"?(b(),I("div",{key:0,ref_key:"listRef",ref:y,class:"kap-list"},[d.value.length===0?(b(),I("div",jGe," No trace entries yet. REST calls and WS frames will appear here. ")):ne("",!0),(b(!0),I(Be,null,yt(d.value,D=>(b(),I("div",{key:D.id,class:"kap-row-wrap"},[C("button",{type:"button",class:De(["kap-row",{expanded:g.value===D.id}]),onClick:T=>k(D.id)},[C("span",WGe,B(A(D.ts)),1),C("span",{class:De(["kap-badge",S(D)])},B(M(D)),3),C("span",qGe,B(D.label),1)],10,HGe),g.value===D.id?(b(),I("div",UGe,[C("div",KGe,[C("button",{type:"button",onClick:T=>x(D)},B(w.value===D.id?"copied ✓":"copy json"),9,VGe)]),C("pre",null,B(v(D)),1)])):ne("",!0)]))),128))],512)):(b(),I("div",ZGe,[N[20]||(N[20]=C("h4",null,"WS frames by session / type",-1)),C("table",null,[N[17]||(N[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,[(b(!0),I(Be,null,yt(f.value,D=>(b(),I("tr",{key:D.key},[C("td",null,B(D.dir),1),C("td",GGe,B(D.eventType),1),C("td",QGe,B(D.sessionId),1),C("td",YGe,B(D.count),1),C("td",JGe,B(D.lastSeq??"—"),1)]))),128)),f.value.length===0?(b(),I("tr",XGe,[...N[16]||(N[16]=[C("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):ne("",!0)])]),N[21]||(N[21]=C("h4",null,"REST by endpoint",-1)),C("table",null,[N[19]||(N[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,[(b(!0),I(Be,null,yt(p.value,D=>(b(),I("tr",{key:D.key},[C("td",eQe,B(D.key),1),C("td",tQe,B(D.count),1),C("td",{class:De(["num",{err:D.errors>0}])},B(D.errors),3),C("td",nQe,B(D.avgMs),1)]))),128)),p.value.length===0?(b(),I("tr",iQe,[...N[18]||(N[18]=[C("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):ne("",!0)])])]))]))}}),oQe=vt(sQe,[["__scopeId","data-v-2b13888e"]]),rQe=tt({__name:"DebugPanel",setup(e){const t=Z(!1);let n=null,i=null,s=null;const o=["data-color-scheme"];function r(c){const d=document.documentElement,f=c.documentElement;for(const p of o){const g=d.getAttribute(p);g!==null?f.setAttribute(p,g):f.removeAttribute(p)}}function l(c){const d=c.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const g of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(g.cloneNode(!0));r(d),d.body.style.margin="0";const p=d.createElement("div");return p.style.height="100vh",d.body.appendChild(p),p}function a(){s?.disconnect(),s=null;try{i?.unmount()}catch{}i=null,n=null,t.value=!1}function u(){if(n&&!n.closed){n.focus();return}const c=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!c)return;n=c;const d=l(c),f=pm(oQe,{onClose:()=>c.close()});f.mount(d),i=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&r(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...o]}),c.addEventListener("pagehide",a),c.addEventListener("beforeunload",a)}return pn(()=>{u()}),Gn(()=>{n&&!n.closed&&n.close(),a()}),(c,d)=>(b(),fe(h(gn),{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:he(()=>[C("button",{class:"kap-fab",type:"button",onClick:u}," KAP ")]),_:1},8,["text"]))}}),lQe=vt(rQe,[["__scopeId","data-v-21de79fc"]]),aQe=tt({__name:"ServerAuthDialog",setup(e){const t=Z(""),n=Z(null),i=Z(!1);pn(()=>{kt(()=>n.value?.focus())});function s(){const r=t.value;!r||i.value||(i.value=!0,yL(r),window.location.reload())}function o(r){r.key==="Enter"&&(r.preventDefault(),s())}return(r,l)=>(b(),fe(h(La),{open:!0,title:"Server token required","hide-close":!0,"close-on-overlay":!1,"close-on-esc":!1},{foot:he(()=>[V(h(jt),{variant:"primary",disabled:!t.value||i.value,loading:i.value,onClick:s},{default:he(()=>[Ue(B(i.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])]),default:he(()=>[l[1]||(l[1]=C("p",{class:"server-auth-hint"},[Ue(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),C("code",null,"KIMI_CODE_PASSWORD"),Ue("). ")],-1)),V(h(io),{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:i.value,onKeydown:o},null,8,["modelValue","disabled"])]),_:1}))}}),uQe=vt(aQe,[["__scopeId","data-v-331563ff"]]),cQe=["aria-label"],dQe=tt({__name:"InternalBuildBanner",setup(e){const{t}=Bt(),n=Wf;return(i,s)=>h(n)?(b(),I("span",{key:0,class:"internal-build-tag",role:"note","aria-label":h(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,B(h(t)("app.internalBuildBanner")),1)],8,cQe)):ne("",!0)}}),fQe=vt(dQe,[["__scopeId","data-v-14c3d0e0"]]),hQe={class:"app-shell"},pQe=["inert"],gQe=["aria-label","aria-hidden"],mQe=tt({__name:"App",setup(e){Ete();const t=Z(!1);let n=null;const i=Fa(),s=F(()=>!i.dangerousBypassAuth.value&&t.value);Pn("resolveImage",i.resolveImageUrl),Pn("resolveSwarmMembers",ft=>i.swarmMembersByToolCallId.value.get(ft)??[]),Pn("modelDisplay",ft=>Wee(ft,i.models.value));const{t:o}=Bt();Pn("subagentEffort",ft=>qee(ft));const{confirm:r}=Hu(),l=bl(),a=eve(),u=Z(!1),c=Z(!1),d=F(()=>{const ft=i.activeSessionId.value;return i.sessions.value.find(Me=>Me.id===ft)?.title??""}),f=F(()=>{const ft=i.activeSessionId.value;return i.sessions.value.find(Me=>Me.id===ft)?.lastTurnReason??null}),p=F(()=>i.visibleWorkspace.value?.sessionCount??0),g=F(()=>i.activity.value!=="idle");_ve({running:g,title:i.documentBaseTitle});function m(ft){const Me=i.models.value.find(Wo=>Wo.id===i.status.value.modelId),Ze=Ap(Me),on=Ze.indexOf(wm(Me,ft)),Mi=Ze[(on+1)%Ze.length]??Ze[0]??"off";return O5(Me,Mi)}const y=F(()=>{const ft=i.models.value.find(Me=>Me.id===i.status.value.modelId);return wm(ft,i.thinking.value)}),w=Z(!i.onboarded.value);function k(){i.setOnboarded(!0),w.value=!1}function A(){k(),On.value="providers",ci.value=!0}let v=0;function x(){const ft=window.visualViewport,Me=document.documentElement.style;Me.setProperty("--app-height",`${ft?.height??window.innerHeight}px`),Me.setProperty("--app-top",`${ft?.offsetTop??0}px`)}function E(){v||(v=requestAnimationFrame(()=>{v=0,x()}))}pn(()=>{n=Fte(()=>{t.value=!0,i.clearDangerousBypassAuth()}),i.load(),te(),x(),window.visualViewport?.addEventListener("resize",E),window.visualViewport?.addEventListener("scroll",E),window.addEventListener("resize",E),document.addEventListener("keydown",S,!0)}),An(()=>{document.removeEventListener("keydown",S,!0),window.visualViewport?.removeEventListener("resize",E),window.visualViewport?.removeEventListener("scroll",E),window.removeEventListener("resize",E),v&&(cancelAnimationFrame(v),v=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function S(ft){ft.key==="Escape"&&(So.value||ft.defaultPrevented||Qt()&&(ft.stopImmediatePropagation(),ft.preventDefault()))}const M=Z(null),{previewTarget:_,previewFile:N,previewLoading:D,previewError:T,previewDownloadUrl:$,previewExternalActions:P,openFilePreview:O,closeFilePreview:R,openPreviewInEditor:W,revealPreviewFile:z}=xve({client:i,detailTarget:M,t:(ft,Me)=>Me===void 0?o(ft):o(ft,Me)}),G=F(()=>M.value!==null),K=Z(null),H=Z(null);function q(ft){H.value=ft.originImg??null,K.value=ft.media}const{SIDEBAR_WIDTH_KEY:X,SIDEBAR_DEFAULT:ee,SIDEBAR_MIN:ue,sidebarMax:ie,sessionColWidth:xe,sidebarCollapsed:ce,sidebarDragging:pe,sideWidth:Ne,loadSidebarCollapsed:te,toggleSidebarCollapse:ye}=Cve({previewOpen:G}),{PREVIEW_WIDTH_KEY:j,PREVIEW_MIN:Y,previewDefaultWidth:ve,previewMax:re,previewWidth:se,previewPanelWidth:U,compactionPanelText:J,compactionPanelVisible:de,openCompactionPanel:me,closeCompactionPanel:Ie,agentPanelMember:je,agentPanelTurns:ke,agentPanelLoading:Le,agentPanelLoadError:it,agentPanelLoadingMore:Fe,agentPanelLoadMoreError:Re,agentPanelHasMore:Ke,agentPanelRunning:ht,openAgentPanel:ot,closeAgentPanel:gt,loadOlderAgentMessages:Tt,detailDiffMode:yn,detailDiffPath:Gt,openDiffDetail:Kt,closeDiffDetail:mn,selectDiffFile:_n,turnDiffChange:He,openTurnDiff:st,closeTurnDiff:Ve,btwVisible:Rt,openSideChatTab:Ct,closeSideChat:Fn,sidePanelVisible:Tn,panelDragging:as,closeOpenSidePanel:Qt}=yve({client:i,sideWidth:Ne,detailTarget:M,closeFilePreview:R}),ni=Z(null);function zn(ft){ni.value?.style.setProperty("--preview-w",`${ft}px`)}Qe([ni,U],([ft,Me])=>ft?.style.setProperty("--preview-w",`${Me}px`),{immediate:!0});const Sn=Z(null),mi=F(()=>{const ft=i.goal.value?.status;return ft==="active"||ft==="paused"||ft==="blocked"});function Ws(){c.value=!1,Sn.value?.focusGoal()}const Li=Z(!1),Lt=Z(!1),xi=Z(!1),Qi=Z(!1),ci=Z(!1);let Fs;pn(()=>{Fs=window.kimiDesktop?.onMenuAction?.(ft=>{ft==="open-settings"?ci.value=!0:ft==="new-chat"&&ds()})}),An(()=>{Fs?.()});const Ni=Z(null),$i=Z(null),So=F(()=>Ao.value>0||Li.value||Lt.value||xi.value||Qi.value||ci.value||w.value||u.value||c.value),_i=Z(!1),Yi=Z(!1),co=Z(!1);async function Bs(){_i.value=!0,Yi.value=!1,Li.value=!0;try{await i.refreshAllProviders()}catch{Yi.value=!0}finally{_i.value=!1}}function Hi(){Lt.value=!0}async function vi(){await r({title:o("sidebar.logoutConfirmTitle"),message:o("sidebar.logoutConfirmMessage"),variant:"danger",action:()=>i.logout()})}async function Mn(ft){Li.value=!1,await Dn(ft)}async function Dn(ft){await i.setModel(ft)&&ft!==i.defaultModel.value&&i.updateConfig({defaultModel:ft})}const Ln=Z(null);let ws=0;async function Cn(ft){await i.archiveSession(ft),!i.sessionsForView.value.some(Me=>Me.id===ft)&&(Ln.value={kind:"archive",id:ft,key:++ws})}let Di=!1;async function ri(ft){if(Di)return;Di=!0;const Me=++ws,Ze=setTimeout(()=>{(Ln.value===null||Ln.value.key<=Me)&&(Ln.value={kind:"export",state:"running",key:Me})},400);try{await i.exportSession(ft)&&!Wf?(Ln.value===null||Ln.value.key<=Me)&&(Ln.value={kind:"export",state:"done",key:++ws}):Ln.value?.kind==="export"&&Ln.value.key===Me&&(Ln.value=null)}finally{clearTimeout(Ze),Di=!1}}async function ur(){const ft=Ln.value;!ft||ft.kind!=="archive"||await i.restoreSession(ft.id)&&Ln.value?.key===ft.key&&(Ln.value=null)}function jo(ft){ft!==void 0&&Ln.value?.key===ft&&(Ln.value=null)}const On=Z(void 0),us=Z(void 0);Qe(c,ft=>{ft||(us.value=void 0)});function qs(){Ln.value=null,a.value?(us.value="archived",c.value=!0):(On.value="archived",ci.value=!0)}async function Us(ft){const Me=i.workspacesView.value.find(Ze=>Ze.id===ft)?.name??ft;await r({title:o("sidebar.removeWorkspace"),message:o("workspace.removeWorkspaceConfirm",{name:Me}),variant:"danger",action:()=>i.deleteWorkspace(ft)})}async function Ji(ft){co.value=!0;try{await i.updateConfig(ft)&&await i.checkAuth()}finally{co.value=!1}}async function $e(){return i.startOAuthLogin()}async function nt(){return i.pollOAuthLogin()}async function Nt(){return i.cancelOAuthLogin()}async function Zt(){Lt.value=!1,await i.checkAuth(),await i.load()}async function Nn(){k(),await i.checkAuth(),await i.load()}async function cs(ft){const Me=i.activeSessionId.value;await i.undo(1)!==null&&(Me&&(i.invalidateSessionPlans(Me),i.refreshSessionPlans(Me)),await kt(),Sn.value?.loadComposerForEdit(ft.text,ft.attachments),Sn.value?.notifyUndone())}async function Fi(){const ft=await i.abortCurrentPrompt();Sn.value?.onAbortOutcome(ft)}function di(ft){const Me=Pt();return ft.map(Ze=>({kind:Ze.kind,url:Me.getFileUrl(Ze.fileId),fileId:Ze.fileId,name:Ze.name}))}async function fi(ft,Me){if(i.authReady.value)return!0;const Ze=i.managedProviderStatus.value==="authenticated";Ze&&i.managedMembership.value===null&&await i.probeManagedMembership();const on=Ze&&i.managedMembership.value==="free",Mi=await r(on?{title:o("login.upgradeRequiredTitle"),message:o("login.upgradeRequiredMessage"),confirmLabel:o("sidebar.upgrade"),variant:"primary"}:{title:o("login.requiredTitle"),message:o("login.requiredMessage"),confirmLabel:o("login.goToLogin"),variant:"primary"});return Sn.value?.loadComposerForEdit(ft,di(Me)),Mi&&(on?Cp():Hi()),!1}async function Ks(ft,Me=[]){if(i.activeSessionId.value||i.activeWorkspaceId.value)return!0;const Ze=await r({title:o("workspace.requiredTitle"),message:o("workspace.requiredMessage"),confirmLabel:o("conversation.pickFolder"),variant:"primary"});return Sn.value?.loadComposerForEdit(ft,di(Me)),Ze&&(xi.value=!0),!1}async function Si(ft,Me=[]){return await fi(ft,Me)?Ks(ft,Me):!1}async function Vs(ft){const{cmd:Me,attachments:Ze}=ft;if(Me==="/compact"||Me.startsWith("/compact ")){if(!await Si(Me))return;i.compact(Me.slice(8).trim()||void 0);return}if(Me==="/swarm"||Me.startsWith("/swarm ")){const on=Me.slice(6).trim();if(on==="on")i.setSwarmMode(!0);else if(on==="off")i.setSwarmMode(!1);else if(on){if(!await Si(Me))return;i.setSwarmMode(!0),i.sendPrompt(on)}else i.toggleSwarmMode();return}if(Me==="/goal"||Me.startsWith("/goal ")){const on=Me.slice(5).trim();if(on==="pause"||on==="resume"||on==="cancel")i.controlGoal(on);else if(on){if(!await Si(Me))return;i.createGoal(on)}else i.toggleGoalMode();return}if(Me==="/btw"||Me.startsWith("/btw ")){const on=Me.slice(4).trim();if(!on&&i.sideChatVisible.value)Fn();else{if(on&&!await Si(Me))return;Ct(on||void 0)}return}switch(Me){case"/new":case"/clear":ds();break;case"/fork":i.forkSession();break;case"/export":ri();break;case"/undo":{const on=i.activeSessionId.value;i.undo().then(Mi=>{Mi&&on&&(i.invalidateSessionPlans(on),i.refreshSessionPlans(on))});break}case"/auto":i.setPermission("auto");break;case"/yolo":i.setPermission("yolo");break;case"/thinking":i.setThinking(m(i.thinking.value));break;case"/status":Qi.value=!0;break;case"/login":Hi();break;default:{const on=Me.indexOf(" "),Mi=xie((on===-1?Me:Me.slice(0,on)).slice(1)),Wo=on===-1?void 0:Me.slice(on+1).trim()||void 0;if(!Mi)break;if(!await Si(Me,Ze))return;!i.activeSessionId.value&&i.activeWorkspaceId.value?i.startSessionAndActivateSkill(i.activeWorkspaceId.value,Mi,Wo,Ze):i.activateSkill(Mi,Wo,Ze);break}}}function Zs(ft){i.unqueue(ft)}function Wi(ft){i.unqueue(ft)}function xs(ft){i.reorderQueue(ft.from,ft.to)}async function fo(ft){if(!await fi(ft.text,ft.attachments))return;const Me=i.activeWorkspaceId.value;if(!i.activeSessionId.value&&Me){await i.startSessionAndSendPrompt(Me,ft.text,ft.attachments);return}if(!i.activeSessionId.value&&!Me){Ni.value=ft,await r({title:o("workspace.requiredTitle"),message:o("workspace.requiredMessage"),confirmLabel:o("conversation.pickFolder"),variant:"primary"})?xi.value=!0:yi();return}i.sendPrompt(ft.text,ft.attachments)}function yi(){const ft=Ni.value;Ni.value=null,ft&&Sn.value?.loadComposerForEdit(ft.text,di(ft.attachments))}async function Mo(ft){if($i.value=null,!await i.addWorkspaceByPath(ft)){$i.value=o("workspace.addFailed");return}xi.value=!1;const Ze=Ni.value;Ni.value=null;const on=i.activeWorkspaceId.value;Ze&&on&&await i.startSessionAndSendPrompt(on,Ze.text,Ze.attachments)}function ho(){yi(),$i.value=null,xi.value=!1}function Gs(){kt(()=>{Sn.value?.focusComposer()})}function ds(){const ft=i.activeWorkspaceId.value;ft?i.openWorkspaceDraft(ft):i.clearActiveSession(),Gs()}function Ho(ft){i.openWorkspaceDraft(ft),Gs()}function cr(ft){ft&&window.open(ft,"_blank","noopener")}return(ft,Me)=>(b(),I("div",hQe,[s.value?(b(),fe(uQe,{key:0})):ne("",!0),C("div",{class:De(["app",{mobile:h(a),"sidebar-collapsed":h(ce)&&!h(a),"macos-desktop":h(Dc)}]),inert:w.value},[h(a)?(b(),fe(TKe,{key:1,workspace:h(i).visibleWorkspace.value,"session-title":d.value,running:g.value,branch:h(i).status.value.branch,"session-count":p.value,onOpenSwitcher:Me[23]||(Me[23]=Ze=>u.value=!0),onOpenSettings:Me[24]||(Me[24]=Ze=>c.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(b(),I(Be,{key:0},[V(Twe,{collapsed:h(ce),dragging:h(pe),"col-width":h(Ne),"active-workspace":h(i).visibleWorkspace.value,"active-workspace-id":h(i).activeWorkspaceId.value,sessions:h(i).sessionsForView.value,groups:h(i).workspaceGroups.value,"workspace-sort-mode":h(i).workspaceSortMode.value,"pinned-sessions":h(i).pinnedSessions.value,"flat-sessions":h(i).flatSessions.value,"flat-has-more":h(i).flatSessionsHasMore.value,"flat-loading-more":h(i).flatSessionsLoadingMore.value,initialized:h(i).initialized.value,"active-id":h(i).activeSessionId.value,"attention-by-session":h(i).attentionBySession.value,"pending-by-session":h(i).pendingBySession.value,"unread-by-session":h(i).unreadBySession.value,onSelect:Me[0]||(Me[0]=Ze=>h(i).selectSession(Ze)),onCreate:ds,onCreateInWorkspace:Me[1]||(Me[1]=Ze=>Ho(Ze)),onSelectWorkspace:Me[2]||(Me[2]=Ze=>h(i).openWorkspace(Ze)),onAddWorkspace:Me[3]||(Me[3]=Ze=>xi.value=!0),onRename:Me[4]||(Me[4]=(Ze,on)=>h(i).renameSession(Ze,on)),onGenerateTitle:Me[5]||(Me[5]=(Ze,on)=>void h(i).regenerateSessionTitle(Ze).then(on)),onArchive:Me[6]||(Me[6]=Ze=>Cn(Ze)),onFork:Me[7]||(Me[7]=Ze=>h(i).forkSession(Ze)),onExport:Me[8]||(Me[8]=Ze=>void ri(Ze)),onPin:Me[9]||(Me[9]=Ze=>h(i).togglePinSession(Ze)),onUnpin:Me[10]||(Me[10]=Ze=>h(i).unpinSession(Ze)),onDropPin:Me[11]||(Me[11]=Ze=>h(i).pinSession(Ze)),onRenameWorkspace:Me[12]||(Me[12]=(Ze,on)=>h(i).renameWorkspace(Ze,on)),onDeleteWorkspace:Me[13]||(Me[13]=Ze=>Us(Ze)),onReorderWorkspaces:Me[14]||(Me[14]=Ze=>h(i).reorderWorkspaces(Ze)),onSetWorkspaceSortMode:Me[15]||(Me[15]=Ze=>h(i).setWorkspaceSortMode(Ze)),onLoadMoreSessions:Me[16]||(Me[16]=Ze=>void h(i).loadMoreSessions(Ze)),onLoadAllSessions:Me[17]||(Me[17]=Ze=>void h(i).loadAllSessions()),onEnsureFlatSessions:Me[18]||(Me[18]=Ze=>void h(i).ensureFlatSessions()),onLoadMoreFlatSessions:Me[19]||(Me[19]=Ze=>void h(i).loadMoreFlatSessions()),onOpenSettings:Me[20]||(Me[20]=Ze=>ci.value=!0),onLogin:Hi,onCollapse:h(ye)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","groups","workspace-sort-mode","pinned-sessions","flat-sessions","flat-has-more","flat-loading-more","initialized","active-id","attention-by-session","pending-by-session","unread-by-session","onCollapse"]),Bn(V(GS,{class:"side-handle","storage-key":h(X),"default-width":h(ee),min:h(ue),max:h(ie),"onUpdate:width":Me[21]||(Me[21]=Ze=>xe.value=Ze),"onUpdate:dragging":Me[22]||(Me[22]=Ze=>pe.value=Ze)},null,8,["storage-key","default-width","min","max"]),[[rs,!h(ce)]])],64)),V(Eze,{ref_key:"conversationPaneRef",ref:Sn,mobile:h(a),turns:h(i).turns.value,"session-id":h(i).activeSessionId.value,approvals:h(i).pendingApprovals.value,changes:h(i).changes.value,"git-info":h(i).gitInfo.value,tasks:h(i).tasks.value,todos:h(i).todos.value,goal:h(i).goal.value,"session-plans":h(i).sessionPlans.value,"activation-badges":h(i).activationBadges.value,status:h(i).status.value,thinking:h(i).thinking.value,"plan-mode":h(i).planMode.value,"plan-armed":h(i).planArmed.value,"swarm-mode":h(i).swarmMode.value,"goal-mode":h(i).goalMode.value,models:h(i).models.value,"auth-ready":h(i).authReady.value,"managed-signed-in":h(i).managedProviderStatus.value==="authenticated","managed-membership":h(i).managedMembership.value,"starred-ids":h(i).starredModelIds.value,skills:h(i).skills.value,questions:h(i).questions.value,"pending-question-actions":h(i).pendingQuestionActions,"pending-approval-actions":h(i).pendingApprovalActions,running:g.value,"overlay-open":So.value,"turn-active":h(i).turnActive.value,queued:h(i).queued.value,"search-files":h(i).searchFiles,"upload-image":h(i).uploadImage,working:h(i).working.value,"last-turn-reason":f.value,"turn-error":h(i).activeTurnError.value??null,"turn-retry":h(i).activeTurnRetry.value??null,starting:h(i).isStartingFirstPrompt.value,"file-reload-key":h(i).activeSessionId.value,"session-loading":h(i).sessionLoading.value,compaction:h(i).compaction.value,"has-more-messages":h(i).hasMoreMessages.value,"loading-more":h(i).loadingMoreMessages.value,"loading-more-error":h(i).loadMoreMessagesError.value,"load-older-messages":h(i).loadOlderMessages,"workspace-name":h(i).visibleWorkspace.value?.name,"workspace-root":h(i).visibleWorkspace.value?.root??h(i).status.value.cwd,"git-diff-stats":h(i).gitDiffStats.value,workspaces:h(i).workspacesView.value,"active-workspace-id":h(i).activeWorkspaceId.value,"session-title":d.value,pr:h(i).activePullRequest.value,onOpenChanges:Me[25]||(Me[25]=Ze=>h(Kt)()),onSelectWorkspace:Me[26]||(Me[26]=Ze=>Ho(Ze)),onAddWorkspace:Me[27]||(Me[27]=Ze=>xi.value=!0),onOpenPr:cr,onSubmit:Me[28]||(Me[28]=Ze=>fo(Ze)),onLogin:Me[29]||(Me[29]=Ze=>Hi()),onSteer:Me[30]||(Me[30]=Ze=>h(i).steerPrompt(Ze.text,Ze.attachments)),onApproval:Me[31]||(Me[31]=(Ze,on)=>h(i).respondApproval(Ze,on)),onCancelTask:Me[32]||(Me[32]=Ze=>h(i).cancelTask(Ze)),onAnswer:Me[33]||(Me[33]=(Ze,on)=>h(i).respondQuestion(Ze,on)),onDismiss:Me[34]||(Me[34]=Ze=>h(i).dismissQuestion(Ze)),onCommand:Vs,onInterrupt:Fi,onUnqueue:Zs,onEditQueued:Wi,onReorderQueue:xs,onSetPermission:Me[35]||(Me[35]=Ze=>h(i).setPermission(Ze)),onSetThinking:Me[36]||(Me[36]=Ze=>h(i).setThinking(Ze)),onTogglePlan:Me[37]||(Me[37]=Ze=>h(i).togglePlanMode()),onToggleSwarm:Me[38]||(Me[38]=Ze=>h(i).toggleSwarmMode()),onToggleGoal:Me[39]||(Me[39]=Ze=>h(i).toggleGoalMode()),onCreateGoal:Me[40]||(Me[40]=Ze=>h(i).createGoal(Ze)),onControlGoal:Me[41]||(Me[41]=Ze=>h(i).controlGoal(Ze)),onRefreshGitStatus:Me[42]||(Me[42]=Ze=>h(i).activeSessionId.value&&h(i).loadGitStatus(h(i).activeSessionId.value)),onRenameSession:Me[43]||(Me[43]=(Ze,on)=>h(i).renameSession(Ze,on)),onForkSession:Me[44]||(Me[44]=Ze=>h(i).forkSession(Ze)),onArchiveSession:Me[45]||(Me[45]=Ze=>Cn(Ze)),onExportSession:Me[46]||(Me[46]=Ze=>void ri(Ze)),onCompact:Me[47]||(Me[47]=Ze=>h(i).compact()),onPickModel:Me[48]||(Me[48]=Ze=>Bs()),onSelectModel:Me[49]||(Me[49]=Ze=>Dn(Ze)),onOpenFile:Me[50]||(Me[50]=Ze=>h(O)(Ze)),onOpenMedia:q,onOpenTurnDiff:Me[51]||(Me[51]=Ze=>h(st)(Ze)),onOpenCompaction:Me[52]||(Me[52]=Ze=>h(me)(Ze)),onOpenAgent:Me[53]||(Me[53]=Ze=>h(ot)(Ze)),onEditMessage:cs},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","session-plans","activation-badges","status","thinking","plan-mode","plan-armed","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","turn-error","turn-retry","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"]),!h(a)&&(h(Dc)||h(ce))?(b(),fe(h(rn),{key:2,class:"sidebar-toggle-btn",size:"sm",label:h(ce)?h(o)("sidebar.expandSidebar"):h(o)("sidebar.collapseSidebar"),tooltip:h(ce)?h(o)("sidebar.expandSidebar"):h(o)("sidebar.collapseSidebar"),onClick:h(ye)},{default:he(()=>[V(h(Ce),{name:h(ce)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","tooltip","onClick"])):ne("",!0),!h(a)&&h(ce)?(b(),fe(h(rn),{key:3,class:"new-chat-btn",size:"sm",label:h(o)("sidebar.newChat"),tooltip:h(o)("sidebar.newChat"),onClick:ds},{default:he(()=>[V(h(Ce),{name:"chat-new"})]),_:1},8,["label","tooltip"])):ne("",!0),h(Tn)&&!h(a)?(b(),fe(GS,{key:4,class:"preview-handle","storage-key":h(j),"default-width":h(ve),min:h(Y),max:h(re),reverse:"","aria-label":h(o)("layout.resizePreviewAria"),"apply-live":zn,"onUpdate:width":Me[54]||(Me[54]=Ze=>se.value=Ze),"onUpdate:dragging":Me[55]||(Me[55]=Ze=>as.value=Ze)},null,8,["storage-key","default-width","min","max","aria-label"])):ne("",!0),!h(a)||h(Tn)?(b(),I("aside",{key:5,ref_key:"previewPanelEl",ref:ni,class:De(["global-preview",{open:h(Tn),mobile:h(a)}]),role:"complementary","aria-label":h(o)("layout.detailPanelAria"),"aria-hidden":!h(Tn)},[M.value==="compaction"&&h(de)?(b(),fe(hOe,{key:0,text:h(J)??"",subtitle:h(o)("conversation.summaryTitle"),onClose:h(Ie)},null,8,["text","subtitle","onClose"])):M.value==="agent"&&h(je)?(b(),fe(yOe,{key:1,member:h(je),turns:h(ke),running:h(ht),loading:h(Le),"load-error":h(it),"has-more":h(Ke),"loading-more":h(Fe),"load-more-error":h(Re),onClose:h(gt),onLoadOlderMessages:h(Tt),onOpenAgent:h(ot),onOpenFile:h(O),onOpenMedia:q,onOpenTurnDiff:Me[56]||(Me[56]=Ze=>h(st)(Ze))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onClose","onLoadOlderMessages","onOpenAgent","onOpenFile"])):M.value==="btw"&&h(Rt)?(b(),fe(SOe,{key:2,turns:h(i).sideChatTurns.value,running:h(i).sideChatRunning.value,sending:h(i).sideChatSending.value,"on-send":h(i).sendSideChatPrompt,onClose:h(Fn),onOpenMedia:q},null,8,["turns","running","sending","on-send","onClose"])):M.value==="diff"?(b(),fe(ePe,{key:3,mode:h(yn),changes:h(i).changes.value,"git-info":h(i).gitInfo.value,"file-diff":h(i).fileDiff.value,"full-texts":h(i).fileDiffTexts.value,"empty-file":h(i).fileDiffEmptyFile.value,"selected-diff-path":h(i).selectedDiffPath.value,"file-diff-loading":h(i).fileDiffLoading.value,closable:"",onOpen:h(_n),onBack:Me[57]||(Me[57]=Ze=>{yn.value="list",Gt.value=null,h(i).clearFileDiff()}),onClose:h(mn)},null,8,["mode","changes","git-info","file-diff","full-texts","empty-file","selected-diff-path","file-diff-loading","onOpen","onClose"])):M.value==="file"?(b(),fe(cOe,{key:4,file:h(N),loading:h(D),error:h(T),line:h(_)?.line,"download-url":h($),closable:"","external-actions":h(P),"open-file":h(O),onClose:h(R),onOpenExternal:h(W),onReveal:h(z)},null,8,["file","loading","error","line","download-url","external-actions","open-file","onClose","onOpenExternal","onReveal"])):M.value==="turn-diff"&&h(He)?(b(),fe(rPe,{key:5,change:h(He),cwd:h(i).status.value.cwd,closable:"",onClose:h(Ve),onOpenFile:Me[58]||(Me[58]=Ze=>h(O)({path:Ze}))},null,8,["change","cwd","onClose"])):ne("",!0)],10,gQe)):ne("",!0),V(fQe,{class:"internal-build-fab"}),Li.value?(b(),fe(CPe,{key:6,models:h(i).models.value,current:h(i).status.value.modelId,"starred-ids":h(i).starredModelIds.value,loading:_i.value,unavailable:Yi.value,onSelect:Me[59]||(Me[59]=Ze=>Mn(Ze)),onToggleStar:Me[60]||(Me[60]=Ze=>h(i).toggleStarModel(Ze)),onClose:Me[61]||(Me[61]=Ze=>Li.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):ne("",!0),ci.value?(b(),fe(IUe,{key:7,"color-scheme":h(i).colorScheme.value,"font-scale":h(i).fontScale.value,"managed-provider-status":h(i).managedProviderStatus.value,"managed-user-info":h(i).managedUserInfo.value,"on-fetch-usage":h(i).getUsage,notify:h(i).notifyEnabled.value,"notify-permission":h(i).notifyPermission.value,"notify-sound":h(i).notifySound.value,config:h(i).config.value,models:h(i).models.value,"config-saving":co.value,"server-version":h(i).serverVersion.value,backend:h(i).backend.value,"experimental-flags":h(i).experimentalFlags.value,"initial-tab":On.value,onSetColorScheme:Me[62]||(Me[62]=Ze=>h(i).setColorScheme(Ze)),onSetFontScale:Me[63]||(Me[63]=Ze=>h(i).setFontScale(Ze)),onSetNotify:Me[64]||(Me[64]=Ze=>h(i).setNotifyEnabled(Ze)),onSetNotifySound:Me[65]||(Me[65]=Ze=>h(i).setNotifySound(Ze)),onUpdateConfig:Me[66]||(Me[66]=Ze=>Ji(Ze)),onLogin:Me[67]||(Me[67]=()=>{ci.value=!1,Hi()}),onLogout:vi,onClose:Me[68]||(Me[68]=Ze=>{ci.value=!1,On.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"])):ne("",!0),Qi.value?(b(),fe(gKe,{key:8,status:h(i).status.value,thinking:y.value,"plan-mode":h(i).planMode.value,"swarm-mode":h(i).swarmMode.value,"cost-usd":h(i).sessionCost.value,onClose:Me[69]||(Me[69]=Ze=>Qi.value=!1)},null,8,["status","thinking","plan-mode","swarm-mode","cost-usd"])):ne("",!0),xi.value?(b(),fe(XUe,{key:9,"browse-fs":h(i).browseFs,"get-fs-home":h(i).getFsHome,"default-path":h(i).visibleWorkspace.value?.root??h(i).status.value.cwd,error:$i.value,onAdd:Me[70]||(Me[70]=Ze=>Mo(Ze)),onClose:ho},null,8,["browse-fs","get-fs-home","default-path","error"])):ne("",!0),V(ys,{name:"gload-fade"},{default:he(()=>[h(i).initialized.value?ne("",!0):(b(),fe(LGe,{key:0,issue:h(i).connectIssue.value},null,8,["issue"]))]),_:1}),V(AKe,{warnings:h(i).warnings.value,onDismiss:h(i).dismissWarning},null,8,["warnings","onDismiss"]),(b(),fe(Wr,{to:"body"},[V(ys,{name:"action-toast"},{default:he(()=>[Ln.value?(b(),fe(h(fq),{key:Ln.value.key,duration:Ln.value.kind==="export"?Ln.value.state==="running"?6e4:4e3:8e3,"dismiss-token":Ln.value.key,onDismiss:jo},{default:he(()=>[Ln.value.kind==="archive"?(b(),I(Be,{key:0},[C("button",{type:"button",onClick:ur},B(h(o)("sidebar.archiveToastUndo")),1),Ue(" "+B(h(o)("sidebar.archiveToastMid"))+" ",1),C("button",{type:"button",onClick:qs},B(h(o)("sidebar.archiveToastSettings")),1),Ue(" "+B(h(o)("sidebar.archiveToastTail")),1)],64)):(b(),I(Be,{key:1},[Ue(B(Ln.value.state==="running"?h(o)("commands.export.started"):h(o)("commands.export.done")),1)],64))]),_:1},8,["duration","dismiss-token"])):ne("",!0)]),_:1})])),h(l)?(b(),fe(lQe,{key:10})):ne("",!0),V(iKe),h(a)?(b(),fe(tVe,{key:11,modelValue:u.value,"onUpdate:modelValue":Me[71]||(Me[71]=Ze=>u.value=Ze),groups:h(i).mobileWorkspaceGroups.value,"active-workspace-id":h(i).activeWorkspaceId.value,"active-id":h(i).activeSessionId.value,"attention-by-session":h(i).attentionBySession.value,"attention-by-workspace":h(i).attentionByWorkspace.value,onSelect:Me[72]||(Me[72]=Ze=>h(i).selectSession(Ze)),onCreate:ds,onCreateInWorkspace:Me[73]||(Me[73]=Ze=>Ho(Ze)),onAddWorkspace:Me[74]||(Me[74]=Ze=>xi.value=!0),onRename:Me[75]||(Me[75]=(Ze,on)=>h(i).renameSession(Ze,on)),onArchive:Me[76]||(Me[76]=Ze=>Cn(Ze)),onDeleteWorkspace:Me[77]||(Me[77]=Ze=>Us(Ze)),onLoadMore:Me[78]||(Me[78]=Ze=>void h(i).loadMoreSessions(Ze))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):ne("",!0),h(a)?(b(),fe(vZe,{key:12,modelValue:c.value,"onUpdate:modelValue":Me[79]||(Me[79]=Ze=>c.value=Ze),"initial-view":us.value,status:h(i).status.value,thinking:h(i).thinking.value,models:h(i).models.value,"plan-mode":h(i).planArmed.value||h(i).planMode.value,"goal-mode":h(i).goalMode.value,"goal-active":mi.value,"swarm-mode":h(i).swarmMode.value,"color-scheme":h(i).colorScheme.value,"font-scale":h(i).fontScale.value,"managed-provider-status":h(i).managedProviderStatus.value,"managed-user-info":h(i).managedUserInfo.value,"server-version":h(i).serverVersion.value,onPickModel:Me[80]||(Me[80]=Ze=>Bs()),onSetThinking:Me[81]||(Me[81]=Ze=>h(i).setThinking(Ze)),onTogglePlan:Me[82]||(Me[82]=Ze=>h(i).togglePlanMode()),onToggleGoal:Me[83]||(Me[83]=Ze=>h(i).toggleGoalMode()),onFocusGoal:Ws,onToggleSwarm:Me[84]||(Me[84]=Ze=>h(i).toggleSwarmMode()),onSetPermission:Me[85]||(Me[85]=Ze=>h(i).setPermission(Ze)),onSetColorScheme:Me[86]||(Me[86]=Ze=>h(i).setColorScheme(Ze)),onSetFontScale:Me[87]||(Me[87]=Ze=>h(i).setFontScale(Ze)),onLogin:Me[88]||(Me[88]=()=>{c.value=!1,Hi()}),onLogout:vi},null,8,["modelValue","initial-view","status","thinking","models","plan-mode","goal-mode","goal-active","swarm-mode","color-scheme","font-scale","managed-provider-status","managed-user-info","server-version"])):ne("",!0)],10,pQe),h(i).initialized.value&&w.value?(b(),fe(SGe,{key:1,"auth-ready":h(i).managedProviderStatus.value==="authenticated","on-start-o-auth-login":$e,"on-poll-o-auth-login":nt,"on-cancel-o-auth-login":Nt,onComplete:k,onLoginSuccess:Nn,onAddProvider:A},null,8,["auth-ready"])):ne("",!0),Lt.value?(b(),fe(UPe,{key:2,"on-start-o-auth-login":$e,"on-poll-o-auth-login":nt,"on-cancel-o-auth-login":Nt,onSuccess:Zt,onClose:Me[89]||(Me[89]=Ze=>Lt.value=!1)})):ne("",!0),K.value?(b(),fe(kk,{key:3,media:K.value,"origin-img":H.value,onClose:Me[90]||(Me[90]=Ze=>{K.value=null,H.value=null})},null,8,["media","origin-img"])):ne("",!0)]))}}),vQe=vt(mQe,[["__scopeId","data-v-01f1cfe9"]]);Bke();const zv=pm(vQe).use(jn),yQe={t:(e,t)=>jn.global.t(e,t)};zv.provide(FE,yQe);zv.provide($E,e=>tke(e)?.component);zv.provide(wee,Fa());zv.mount("#app");if(Wf){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{sz as $,fI as A,Vz as B,ms as C,pYe as D,TM as E,Be as F,Lu as G,Ue as H,V as I,Mz as J,OQe as K,rl as L,tt as M,xP as N,WQe as O,qQe as P,VQe as Q,Gg as R,af as S,Wr as T,UQe as U,o5 as V,HQe as W,mYe as X,KQe as Y,uYe as Z,bQe as _,oI as a,Ms as a$,As as a0,P2 as a1,SQe as a2,Z8 as a3,DI as a4,cn as a5,zf as a6,NQe as a7,bYe as a8,$Qe as a9,cI as aA,aO as aB,pO as aC,pn as aD,hO as aE,fO as aF,Rf as aG,dO as aH,An as aI,vp as aJ,Nz as aK,b as aL,AP as aM,TQe as aN,Pn as aO,ZM as aP,EQe as aQ,Xg as aR,Ts as aS,M4 as aT,Z as aU,iYe as aV,OP as aW,yt as aX,En as aY,mO as aZ,PQe as a_,zQe as aa,RQe as ab,DQe as ac,oYe as ad,kYe as ae,an as af,JO as ag,U2 as ah,du as ai,_a as aj,ls as ak,sYe as al,br as am,ku as an,wt as ao,QQe as ap,YQe as aq,Yn as ar,kt as as,iP as at,De as au,XR as av,Vt as aw,lO as ax,cO as ay,Gn as az,IQe as b,b0e as b$,fYe as b0,z1 as b1,rm as b2,cYe as b3,bu as b4,KM as b5,AQe as b6,vl as b7,Oz as b8,dYe as b9,_o as bA,rs as bB,XO as bC,lYe as bD,Qe as bE,I4 as bF,FQe as bG,jz as bH,XQe as bI,he as bJ,ZQe as bK,Bn as bL,qr as bM,rYe as bN,It as bO,LQe as bP,oi as bQ,ns as bR,_Ye as bS,SYe as bT,mB as bU,MYe as bV,zpe as bW,gB as bX,o8 as bY,LYe as bZ,C0e as b_,kQe as ba,B as bb,mg as bc,jQe as bd,Vn as be,wQe as bf,CQe as bg,fu as bh,nYe as bi,xz as bj,h as bk,Of as bl,yYe as bm,gYe as bn,SP as bo,Zz as bp,eYe as bq,Pz as br,vYe as bs,GQe as bt,BQe as bu,sI as bv,hm as bw,BP as bx,JI as by,W4 as bz,aYe as c,$b as c0,Fb as c1,Bb as c2,FYe as c3,Qm as c4,Jd as c5,Zm as c6,g0e as c7,m0e as c8,BYe as c9,FIe as cA,hl as cB,Bi as cC,vt as cD,NYe as ca,CYe as cb,$Ye as cc,xv as cd,Jo as ce,N0e as cf,L0e as cg,Lpe as ch,xYe as ci,Mpe as cj,Ipe as ck,wYe as cl,Db as cm,F0e as cn,E_ as co,u_ as cp,Ppe as cq,Gm as cr,Vm as cs,IYe as ct,TYe as cu,AYe as cv,EYe as cw,Ce as cx,DYe as cy,zD as cz,tYe as d,hu as e,xQe as f,ys as g,QI as h,_Qe as i,MQe as j,Hr as k,pp as l,Ls as m,D2 as n,Sa as o,hYe as p,F as q,pm as r,fe as s,ne as t,I as u,C as v,zO as w,JQe as x,RO as y,PP as z}; diff --git a/apps/kimi-code/dist-web/assets/index-D7acQhzk.js b/apps/kimi-code/dist-web/assets/index-wuJEF9t-.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index-D7acQhzk.js rename to apps/kimi-code/dist-web/assets/index-wuJEF9t-.js index 812059f0e..18ad8cac3 100644 --- a/apps/kimi-code/dist-web/assets/index-D7acQhzk.js +++ b/apps/kimi-code/dist-web/assets/index-wuJEF9t-.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-CbkQVtd0.js";import{f as Ld}from"./index-CbkQVtd0.js";import{bR as k}from"./index-CgXirkUy.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;c<h;c++){const u=d.children[c],f=a.children[c];if(!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;const g=this.parseLineIndex(u,n);if((g??0)>s)break;if(g==null||g<o)continue;let b=r?"single":g===o?"first":g===s?"last":"";u.setAttribute("data-selected-line",b),f.setAttribute("data-selected-line",b),f.nextSibling instanceof HTMLElement&&u.nextSibling instanceof HTMLElement&&(u.nextSibling.hasAttribute("data-line-annotation")||u.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(r?(b="last",u.setAttribute("data-selected-line","first")):g===o?b="":g===s&&u.setAttribute("data-selected-line",""),u.nextSibling.setAttribute("data-selected-line",b),f.nextSibling.setAttribute("data-selected-line",b))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:r,tokenText:o}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,i){return{start:e,end:t,...n!=null?{side:n}:{},...n!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let t=!1,n,i,r,o,s,l,a,d,h,c;for(const f of e){if(!(f instanceof HTMLElement))continue;if(c==null&&f.hasAttribute("data-merge-conflict-action")){const m=f.getAttribute("data-merge-conflict-action")??void 0,p=f.getAttribute("data-merge-conflict-conflict-index")??void 0,C=p!=null?Number.parseInt(p,10):NaN;uo(m)&&Number.isFinite(C)&&(c={kind:"merge-conflict-action",resolution:m,conflictIndex:C})}if(l==null&&f.hasAttribute("data-char")){l=f;const m=f.getAttribute("data-char");if(m!=null){const p=Number.parseInt(m,10);if(!Number.isNaN(p)){const C=f.textContent??"",v=p+C.length;(C.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(a={tokenElement:l,lineCharStart:p,lineCharEnd:v,tokenText:C});continue}}}const g=s==null?f.getAttribute("data-column-number")??void 0:void 0;if(g!=null){s=f,h=Number.parseInt(g,10),t=!0,n=In(f),o=f.getAttribute("data-line-index")??void 0;continue}const b=r==null?f.getAttribute("data-line")??void 0:void 0;if(b!=null){r=f,h=Number.parseInt(b,10),n=In(f),o=f.getAttribute("data-line-index")??void 0;continue}if(d==null&&(f.hasAttribute("data-expand-button")||f.hasAttribute("data-unmodified-lines"))){d={hunkIndex:void 0,direction:f.hasAttribute("data-expand-up")?"up":f.hasAttribute("data-expand-down")?"down":"both",all:f.hasAttribute("data-expand-all-button")};continue}const y=d!=null?f.getAttribute("data-expand-index")??void 0:void 0;if(d!=null&&y!=null){const m=Number.parseInt(y,10);Number.isNaN(m)||(d.hunkIndex=m);continue}if(i==null&&f.hasAttribute("data-code")){i=f;break}}if(c!=null)return c;if(d?.hunkIndex!=null)return{type:"line-info",hunkIndex:d.hunkIndex,direction:d.direction,all:d.all};if(r??=o!=null?wn(i,`[data-line][data-line-index="${o}"]`):void 0,s??=o!=null?wn(i,`[data-column-number][data-line-index="${o}"]`):void 0,i==null||r==null||s==null||n==null||h==null||Number.isNaN(h))return;const u=this.parseLineIndex(r,this.isSplitDiff());return a!=null?this.mode==="file"?{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u,...a}:{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:Tn(n,i),splitLineIndex:u,...a}:this.mode==="file"?{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u}:{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:Tn(n,i),splitLineIndex:u}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const n=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.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-DcbRorFd.js";import{f as Ld}from"./index-DcbRorFd.js";import{bR as k}from"./index-_5lXYMaO.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;c<h;c++){const u=d.children[c],f=a.children[c];if(!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;const g=this.parseLineIndex(u,n);if((g??0)>s)break;if(g==null||g<o)continue;let b=r?"single":g===o?"first":g===s?"last":"";u.setAttribute("data-selected-line",b),f.setAttribute("data-selected-line",b),f.nextSibling instanceof HTMLElement&&u.nextSibling instanceof HTMLElement&&(u.nextSibling.hasAttribute("data-line-annotation")||u.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(r?(b="last",u.setAttribute("data-selected-line","first")):g===o?b="":g===s&&u.setAttribute("data-selected-line",""),u.nextSibling.setAttribute("data-selected-line",b),f.nextSibling.setAttribute("data-selected-line",b))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:r,tokenText:o}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,i){return{start:e,end:t,...n!=null?{side:n}:{},...n!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let t=!1,n,i,r,o,s,l,a,d,h,c;for(const f of e){if(!(f instanceof HTMLElement))continue;if(c==null&&f.hasAttribute("data-merge-conflict-action")){const m=f.getAttribute("data-merge-conflict-action")??void 0,p=f.getAttribute("data-merge-conflict-conflict-index")??void 0,C=p!=null?Number.parseInt(p,10):NaN;uo(m)&&Number.isFinite(C)&&(c={kind:"merge-conflict-action",resolution:m,conflictIndex:C})}if(l==null&&f.hasAttribute("data-char")){l=f;const m=f.getAttribute("data-char");if(m!=null){const p=Number.parseInt(m,10);if(!Number.isNaN(p)){const C=f.textContent??"",v=p+C.length;(C.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(a={tokenElement:l,lineCharStart:p,lineCharEnd:v,tokenText:C});continue}}}const g=s==null?f.getAttribute("data-column-number")??void 0:void 0;if(g!=null){s=f,h=Number.parseInt(g,10),t=!0,n=In(f),o=f.getAttribute("data-line-index")??void 0;continue}const b=r==null?f.getAttribute("data-line")??void 0:void 0;if(b!=null){r=f,h=Number.parseInt(b,10),n=In(f),o=f.getAttribute("data-line-index")??void 0;continue}if(d==null&&(f.hasAttribute("data-expand-button")||f.hasAttribute("data-unmodified-lines"))){d={hunkIndex:void 0,direction:f.hasAttribute("data-expand-up")?"up":f.hasAttribute("data-expand-down")?"down":"both",all:f.hasAttribute("data-expand-all-button")};continue}const y=d!=null?f.getAttribute("data-expand-index")??void 0:void 0;if(d!=null&&y!=null){const m=Number.parseInt(y,10);Number.isNaN(m)||(d.hunkIndex=m);continue}if(i==null&&f.hasAttribute("data-code")){i=f;break}}if(c!=null)return c;if(d?.hunkIndex!=null)return{type:"line-info",hunkIndex:d.hunkIndex,direction:d.direction,all:d.all};if(r??=o!=null?wn(i,`[data-line][data-line-index="${o}"]`):void 0,s??=o!=null?wn(i,`[data-column-number][data-line-index="${o}"]`):void 0,i==null||r==null||s==null||n==null||h==null||Number.isNaN(h))return;const u=this.parseLineIndex(r,this.isSplitDiff());return a!=null?this.mode==="file"?{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u,...a}:{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:Tn(n,i),splitLineIndex:u,...a}:this.mode==="file"?{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u}:{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:Tn(n,i),splitLineIndex:u}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const n=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.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<e.length;r++)o=e.charCodeAt(r),n=Math.imul(n^o,2654435761),i=Math.imul(i^o,1597334677);return n=Math.imul(n^n>>>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)<Math.abs(i-r)}const Pn=new WeakMap;function Ht(e){const t=Pn.get(e);if(t!=null)return t;const n=e.colors??{},i={...n},r=n["editor.background"]??e.bg,o=n["editor.foreground"]??e.fg,s=n["sideBar.background"]??r,l=n["sideBar.foreground"]??o;ie(i,"editor.background",r),ie(i,"editor.foreground",o),ie(i,"sideBar.background",s),ie(i,"sideBar.foreground",l),ie(i,"input.background",n["input.background"]??s),ie(i,"sideBarSectionHeader.foreground",n["sideBarSectionHeader.foreground"]??l),ie(i,"list.activeSelectionForeground",n["list.activeSelectionForeground"]??l),ie(i,"gitDecoration.addedResourceForeground",Mt(n["gitDecoration.addedResourceForeground"],n["terminal.ansiGreen"],n["editorGutter.addedBackground"])),ie(i,"gitDecoration.modifiedResourceForeground",Mt(n["gitDecoration.modifiedResourceForeground"],n["terminal.ansiBlue"],n["editorGutter.modifiedBackground"])),ie(i,"gitDecoration.deletedResourceForeground",Mt(n["gitDecoration.deletedResourceForeground"],n["terminal.ansiRed"],n["editorGutter.deletedBackground"]));const a=(Dn(n["list.focusOutline"])?void 0:n["list.focusOutline"])??(Dn(n.focusBorder)?void 0:n.focusBorder);a!=null?i["list.focusOutline"]=a:delete i["list.focusOutline"];const d=n["list.hoverBackground"];d!=null&&(ls(d,s)||as(d,s,l))&&delete i["list.hoverBackground"];const h=Object.freeze({...e,colors:Object.freeze(i)});return Pn.set(e,h),h}function ie(e,t,n){n!=null&&n!==""&&(e[t]=n)}function Mt(...e){for(const t of e)if(t!=null&&t!=="")return t}function ls(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function fn({theme:e=_,highlighter:t,prefix:n}){let i="";if(typeof e=="string"){const r=t.getTheme(e),o=Ht(r);i+=`color:${o.fg};`,i+=`background-color:${o.bg};`,i+=`${B("global")}fg:${o.fg};`,i+=`${B("global")}bg:${o.bg};`,i+=Dt(r,n)}else{let r=t.getTheme(e.dark),o=Ht(r);i+=`${B("global")}dark:${o.fg};`,i+=`${B("global")}dark-bg:${o.bg};`,i+=Dt(r,"dark"),r=t.getTheme(e.light),o=Ht(r),i+=`${B("global")}light:${o.fg};`,i+=`${B("global")}light-bg:${o.bg};`,i+=Dt(r,"light")}return i}function Dt(e,t){t=t!=null?`${t}-`:"";let n="";const i=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];i!=null&&(n+=`${B("global")}${t}addition-color:${i};`);const r=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];r!=null&&(n+=`${B("global")}${t}deletion-color:${r};`);const o=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return o!=null&&(n+=`${B("global")}${t}modified-color:${o};`),n}function Kt(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t.children;"children"in t?t=t.children[0]:t=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}function Ct({lines:e,startingLine:t=0,totalLines:n=1/0,callback:i}){const r=Math.min(t+n,e.length),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;s<r;s++){const l=s===o;if(i({lineIndex:s,lineNumber:s+1,content:e[s],isLastLine:l})===!0||l)break}}function St(e){return e!==""?e.split(jr):[]}const ds={forcePlainText:!1};function hs(e,t,{theme:n=_,tokenizeMaxLineLength:i,useTokenTransformer:r},{forcePlainText:o,startingLine:s,totalLines:l,lines:a}=ds){o?(s??=0,l??=1/0):(s=0,l=1/0);const d=s>0||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=`<svg data-icon-sprite aria-hidden="true" width="0" height="0"> diff --git a/apps/kimi-code/dist-web/assets/index10-1H9a2FKj.js b/apps/kimi-code/dist-web/assets/index10-C561zpWg.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index10-1H9a2FKj.js rename to apps/kimi-code/dist-web/assets/index10-C561zpWg.js index 951f7cd56..2eec5e165 100644 --- a/apps/kimi-code/dist-web/assets/index10-1H9a2FKj.js +++ b/apps/kimi-code/dist-web/assets/index10-C561zpWg.js @@ -1,2 +1,2 @@ -import{bQ as Re,M as Ae,b$ as qe,c0 as Ge,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-CgXirkUy.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},$1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},j1=["disabled"],L1=["disabled"],P1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},E1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=qe(),J=Ge(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,q=!1,te="",G=!1,he=0;function le(n){return!G&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(G||!P.value||!p.value)return;if(me)return oe=!0,void(q=q||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`<div style="padding: var(--ms-inset-panel-body); color: hsl(var(--ms-destructive))">Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}</div>`)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=q;oe=!1,q=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){G||!P.value||k.value||c.value||U(()=>{G||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(G=!0,he+=1,oe=!1,q=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(`<svg width="15.52" height="16" viewBox="0 0 291 300" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path d="M140.904 239.376C128.83 239.683 119.675 239.299 115.448 243.843C110.902 248.07 111.288 257.227 110.979 269.302C111.118 274.675 111.118 279.478 111.472 283.52C111.662 285.638 111.95 287.547 112.406 289.224C112.411 289.243 112.416 289.259 112.422 289.28C112.462 289.419 112.496 289.558 112.539 289.691C113.168 291.787 114.088 293.491 115.446 294.758C116.662 296.064 118.283 296.963 120.264 297.59C120.36 297.614 120.464 297.646 120.555 297.675C120.56 297.68 120.56 297.68 120.566 297.68C120.848 297.768 121.142 297.846 121.443 297.923C121.454 297.923 121.464 297.928 121.478 297.934C122.875 298.272 124.424 298.507 126.11 298.678C126.326 298.696 126.542 298.718 126.763 298.739C130.79 299.086 135.558 299.088 140.904 299.222C152.974 298.912 162.128 299.302 166.36 294.758C170.904 290.526 170.515 281.371 170.824 269.302C170.515 257.227 170.907 248.07 166.36 243.843C162.131 239.299 152.974 239.683 140.904 239.376Z" fill="#FF6376"></path><path d="M21.2155 128.398C12.6555 128.616 6.16484 128.339 3.16751 131.56C-0.0538222 134.56 0.218178 141.054 -0.000488281 149.608C0.218178 158.168 -0.0538222 164.659 3.16751 167.656C6.16484 170.878 12.6555 170.606 21.2155 170.824C25.0262 170.726 28.4288 170.726 31.2955 170.475C32.7968 170.342 34.1488 170.136 35.3382 169.814C35.3542 169.811 35.3648 169.806 35.3782 169.803C35.4768 169.774 35.5755 169.747 35.6688 169.718C37.1568 169.272 38.3648 168.622 39.2635 167.656C40.1915 166.795 40.8262 165.646 41.2715 164.243C41.2875 164.174 41.3115 164.102 41.3328 164.035C41.3328 164.035 41.3355 164.032 41.3355 164.027C41.3968 163.827 41.4529 163.622 41.5062 163.406C41.5062 163.398 41.5115 163.392 41.5142 163.382C41.7542 162.392 41.9222 161.294 42.0422 160.096C42.0555 159.944 42.0715 159.792 42.0848 159.635C42.3328 156.779 42.3328 153.398 42.4262 149.608C42.2075 141.054 42.4848 134.56 39.2635 131.56C36.2635 128.339 29.7728 128.616 21.2155 128.398Z" fill="#FFCCCC"></path><path d="M81.0595 184.171C70.8568 184.433 63.1208 184.102 59.5475 187.942C55.7075 191.518 56.0328 199.254 55.7742 209.454C56.0328 219.657 55.7075 227.393 59.5475 230.963C63.1208 234.803 70.8568 234.478 81.0595 234.739C85.6008 234.622 89.6595 234.622 93.0728 234.323C94.8648 234.163 96.4755 233.921 97.8942 233.534C97.9102 233.529 97.9235 233.526 97.9422 233.521C98.0568 233.486 98.1742 233.457 98.2888 233.422C100.06 232.889 101.5 232.113 102.569 230.963C103.676 229.937 104.433 228.566 104.964 226.894C104.985 226.811 105.012 226.726 105.036 226.646C105.041 226.643 105.041 226.643 105.041 226.638C105.116 226.401 105.18 226.153 105.244 225.897C105.244 225.889 105.249 225.881 105.254 225.867C105.54 224.689 105.74 223.379 105.881 221.953C105.9 221.771 105.916 221.59 105.934 221.403C106.228 218.001 106.228 213.969 106.342 209.454C106.081 199.254 106.412 191.518 102.572 187.942C98.9955 184.102 91.2568 184.433 81.0595 184.171Z" fill="#FF939F"></path><path d="M260.591 151.87C215.652 151.87 203.02 164.523 203.02 209.462H198.476C198.476 164.523 185.836 151.881 140.895 151.881V147.337C185.836 147.337 198.487 134.705 198.487 89.7659H203.02C203.02 134.705 215.652 147.337 260.591 147.337V151.87ZM286.052 124.158C281.82 119.614 272.66 120.001 260.591 119.689C248.521 119.385 239.361 119.771 235.129 115.227C230.585 110.995 230.983 101.846 230.671 89.7659C230.513 83.7312 230.535 78.4272 230.023 74.1019C229.513 69.7659 228.481 66.4219 226.209 64.3046C221.967 59.7606 212.817 60.1472 200.748 59.8459C188.681 60.1472 179.519 59.7606 175.287 64.3046C170.753 68.5366 171.129 77.6966 170.828 89.7659C170.516 101.835 170.9 110.995 166.356 115.227C162.124 119.771 152.985 119.374 140.905 119.689C138.873 119.739 136.924 119.771 135.071 119.811C119.313 118.697 106.337 112.318 106.337 89.7659C106.212 84.6699 106.233 80.1792 105.807 76.5206C105.367 72.8726 104.492 70.0379 102.575 68.2566C99.0013 64.4112 91.2573 64.7446 81.0653 64.4832C70.86 64.7446 63.1186 64.4112 59.5533 68.2566C55.708 71.8299 56.0306 79.5632 55.7693 89.7659C56.0306 99.9686 55.708 107.702 59.5533 111.278C63.1186 115.113 70.86 114.79 81.0653 115.049C103.617 115.049 109.996 128.035 111.1 143.803C111.068 145.659 111.028 147.587 110.975 149.619C111.121 154.987 111.121 159.79 111.476 163.835C111.663 165.95 111.945 167.857 112.404 169.534C112.412 169.555 112.412 169.566 112.423 169.598C112.465 169.734 112.497 169.867 112.537 170.003C113.164 172.099 114.092 173.809 115.447 175.07C116.665 176.371 118.281 177.278 120.271 177.905C120.364 177.934 120.46 177.955 120.564 177.987C120.855 178.081 121.145 178.153 121.439 178.238C121.46 178.238 121.471 178.238 121.479 178.249C122.876 178.582 124.42 178.822 126.108 178.987C126.327 179.009 126.545 179.03 126.764 179.051C130.788 179.395 135.559 179.395 140.905 179.529C152.975 179.843 162.124 179.457 166.356 184.001C170.9 188.233 170.516 197.371 170.828 209.451C171.129 221.529 170.743 230.681 175.287 234.91C179.519 239.454 188.681 239.07 200.748 239.371C206.127 239.235 210.921 239.235 214.975 238.881C217.079 238.694 218.985 238.403 220.676 237.955C220.695 237.945 220.705 237.934 220.727 237.934C220.873 237.891 220.999 237.859 221.135 237.819C223.228 237.193 224.937 236.265 226.209 234.91C227.511 233.691 228.409 232.065 229.044 230.097C229.065 230.003 229.095 229.899 229.127 229.803V229.793C229.22 229.513 229.295 229.222 229.367 228.918C229.367 228.897 229.377 228.897 229.377 228.878C229.721 227.481 229.951 225.937 230.127 224.249C230.137 224.03 230.169 223.811 230.191 223.593C230.535 219.571 230.535 214.798 230.671 209.451C230.972 197.371 230.585 188.233 235.129 184.001C239.361 179.457 248.511 179.843 260.591 179.529C272.66 179.227 281.82 179.614 286.052 175.07C290.596 170.838 290.209 161.689 290.511 149.619C290.209 137.539 290.596 128.379 286.052 124.158Z" fill="#FF356A"></path><path d="M112.405 49.848C112.411 49.8694 112.416 49.8827 112.421 49.904C112.461 50.0427 112.499 50.1814 112.539 50.3147C113.171 52.4134 114.088 54.1147 115.448 55.384C116.661 56.6907 118.283 57.5894 120.264 58.2134C120.36 58.24 120.464 58.2694 120.555 58.3014C120.56 58.3067 120.56 58.3067 120.565 58.3067C120.848 58.3947 121.141 58.4694 121.443 58.5467C121.453 58.5467 121.464 58.552 121.48 58.5574C122.875 58.896 124.424 59.1334 126.112 59.3014C126.325 59.3227 126.541 59.3414 126.763 59.3627C130.789 59.712 135.56 59.712 140.904 59.8454C152.973 59.5387 162.128 59.928 166.36 55.384C170.907 51.152 170.515 41.9947 170.824 29.9254C170.517 17.8507 170.907 8.69602 166.363 4.46935C162.131 -0.0746511 152.973 0.309349 140.904 1.52588e-05C128.829 0.309349 119.675 -0.0746511 115.448 4.46935C110.904 8.69602 111.288 17.8507 110.979 29.9254C111.117 35.3014 111.117 40.1014 111.472 44.144C111.661 46.2614 111.949 48.1707 112.405 49.848Z" fill="#FF6376"></path></g></svg> +import{bQ as Re,M as Ae,b$ as qe,c0 as Ge,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-_5lXYMaO.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},$1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},j1=["disabled"],L1=["disabled"],P1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},E1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=qe(),J=Ge(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,q=!1,te="",G=!1,he=0;function le(n){return!G&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(G||!P.value||!p.value)return;if(me)return oe=!0,void(q=q||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`<div style="padding: var(--ms-inset-panel-body); color: hsl(var(--ms-destructive))">Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}</div>`)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=q;oe=!1,q=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){G||!P.value||k.value||c.value||U(()=>{G||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(G=!0,he+=1,oe=!1,q=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(`<svg width="15.52" height="16" viewBox="0 0 291 300" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path d="M140.904 239.376C128.83 239.683 119.675 239.299 115.448 243.843C110.902 248.07 111.288 257.227 110.979 269.302C111.118 274.675 111.118 279.478 111.472 283.52C111.662 285.638 111.95 287.547 112.406 289.224C112.411 289.243 112.416 289.259 112.422 289.28C112.462 289.419 112.496 289.558 112.539 289.691C113.168 291.787 114.088 293.491 115.446 294.758C116.662 296.064 118.283 296.963 120.264 297.59C120.36 297.614 120.464 297.646 120.555 297.675C120.56 297.68 120.56 297.68 120.566 297.68C120.848 297.768 121.142 297.846 121.443 297.923C121.454 297.923 121.464 297.928 121.478 297.934C122.875 298.272 124.424 298.507 126.11 298.678C126.326 298.696 126.542 298.718 126.763 298.739C130.79 299.086 135.558 299.088 140.904 299.222C152.974 298.912 162.128 299.302 166.36 294.758C170.904 290.526 170.515 281.371 170.824 269.302C170.515 257.227 170.907 248.07 166.36 243.843C162.131 239.299 152.974 239.683 140.904 239.376Z" fill="#FF6376"></path><path d="M21.2155 128.398C12.6555 128.616 6.16484 128.339 3.16751 131.56C-0.0538222 134.56 0.218178 141.054 -0.000488281 149.608C0.218178 158.168 -0.0538222 164.659 3.16751 167.656C6.16484 170.878 12.6555 170.606 21.2155 170.824C25.0262 170.726 28.4288 170.726 31.2955 170.475C32.7968 170.342 34.1488 170.136 35.3382 169.814C35.3542 169.811 35.3648 169.806 35.3782 169.803C35.4768 169.774 35.5755 169.747 35.6688 169.718C37.1568 169.272 38.3648 168.622 39.2635 167.656C40.1915 166.795 40.8262 165.646 41.2715 164.243C41.2875 164.174 41.3115 164.102 41.3328 164.035C41.3328 164.035 41.3355 164.032 41.3355 164.027C41.3968 163.827 41.4529 163.622 41.5062 163.406C41.5062 163.398 41.5115 163.392 41.5142 163.382C41.7542 162.392 41.9222 161.294 42.0422 160.096C42.0555 159.944 42.0715 159.792 42.0848 159.635C42.3328 156.779 42.3328 153.398 42.4262 149.608C42.2075 141.054 42.4848 134.56 39.2635 131.56C36.2635 128.339 29.7728 128.616 21.2155 128.398Z" fill="#FFCCCC"></path><path d="M81.0595 184.171C70.8568 184.433 63.1208 184.102 59.5475 187.942C55.7075 191.518 56.0328 199.254 55.7742 209.454C56.0328 219.657 55.7075 227.393 59.5475 230.963C63.1208 234.803 70.8568 234.478 81.0595 234.739C85.6008 234.622 89.6595 234.622 93.0728 234.323C94.8648 234.163 96.4755 233.921 97.8942 233.534C97.9102 233.529 97.9235 233.526 97.9422 233.521C98.0568 233.486 98.1742 233.457 98.2888 233.422C100.06 232.889 101.5 232.113 102.569 230.963C103.676 229.937 104.433 228.566 104.964 226.894C104.985 226.811 105.012 226.726 105.036 226.646C105.041 226.643 105.041 226.643 105.041 226.638C105.116 226.401 105.18 226.153 105.244 225.897C105.244 225.889 105.249 225.881 105.254 225.867C105.54 224.689 105.74 223.379 105.881 221.953C105.9 221.771 105.916 221.59 105.934 221.403C106.228 218.001 106.228 213.969 106.342 209.454C106.081 199.254 106.412 191.518 102.572 187.942C98.9955 184.102 91.2568 184.433 81.0595 184.171Z" fill="#FF939F"></path><path d="M260.591 151.87C215.652 151.87 203.02 164.523 203.02 209.462H198.476C198.476 164.523 185.836 151.881 140.895 151.881V147.337C185.836 147.337 198.487 134.705 198.487 89.7659H203.02C203.02 134.705 215.652 147.337 260.591 147.337V151.87ZM286.052 124.158C281.82 119.614 272.66 120.001 260.591 119.689C248.521 119.385 239.361 119.771 235.129 115.227C230.585 110.995 230.983 101.846 230.671 89.7659C230.513 83.7312 230.535 78.4272 230.023 74.1019C229.513 69.7659 228.481 66.4219 226.209 64.3046C221.967 59.7606 212.817 60.1472 200.748 59.8459C188.681 60.1472 179.519 59.7606 175.287 64.3046C170.753 68.5366 171.129 77.6966 170.828 89.7659C170.516 101.835 170.9 110.995 166.356 115.227C162.124 119.771 152.985 119.374 140.905 119.689C138.873 119.739 136.924 119.771 135.071 119.811C119.313 118.697 106.337 112.318 106.337 89.7659C106.212 84.6699 106.233 80.1792 105.807 76.5206C105.367 72.8726 104.492 70.0379 102.575 68.2566C99.0013 64.4112 91.2573 64.7446 81.0653 64.4832C70.86 64.7446 63.1186 64.4112 59.5533 68.2566C55.708 71.8299 56.0306 79.5632 55.7693 89.7659C56.0306 99.9686 55.708 107.702 59.5533 111.278C63.1186 115.113 70.86 114.79 81.0653 115.049C103.617 115.049 109.996 128.035 111.1 143.803C111.068 145.659 111.028 147.587 110.975 149.619C111.121 154.987 111.121 159.79 111.476 163.835C111.663 165.95 111.945 167.857 112.404 169.534C112.412 169.555 112.412 169.566 112.423 169.598C112.465 169.734 112.497 169.867 112.537 170.003C113.164 172.099 114.092 173.809 115.447 175.07C116.665 176.371 118.281 177.278 120.271 177.905C120.364 177.934 120.46 177.955 120.564 177.987C120.855 178.081 121.145 178.153 121.439 178.238C121.46 178.238 121.471 178.238 121.479 178.249C122.876 178.582 124.42 178.822 126.108 178.987C126.327 179.009 126.545 179.03 126.764 179.051C130.788 179.395 135.559 179.395 140.905 179.529C152.975 179.843 162.124 179.457 166.356 184.001C170.9 188.233 170.516 197.371 170.828 209.451C171.129 221.529 170.743 230.681 175.287 234.91C179.519 239.454 188.681 239.07 200.748 239.371C206.127 239.235 210.921 239.235 214.975 238.881C217.079 238.694 218.985 238.403 220.676 237.955C220.695 237.945 220.705 237.934 220.727 237.934C220.873 237.891 220.999 237.859 221.135 237.819C223.228 237.193 224.937 236.265 226.209 234.91C227.511 233.691 228.409 232.065 229.044 230.097C229.065 230.003 229.095 229.899 229.127 229.803V229.793C229.22 229.513 229.295 229.222 229.367 228.918C229.367 228.897 229.377 228.897 229.377 228.878C229.721 227.481 229.951 225.937 230.127 224.249C230.137 224.03 230.169 223.811 230.191 223.593C230.535 219.571 230.535 214.798 230.671 209.451C230.972 197.371 230.585 188.233 235.129 184.001C239.361 179.457 248.511 179.843 260.591 179.529C272.66 179.227 281.82 179.614 286.052 175.07C290.596 170.838 290.209 161.689 290.511 149.619C290.209 137.539 290.596 128.379 286.052 124.158Z" fill="#FF356A"></path><path d="M112.405 49.848C112.411 49.8694 112.416 49.8827 112.421 49.904C112.461 50.0427 112.499 50.1814 112.539 50.3147C113.171 52.4134 114.088 54.1147 115.448 55.384C116.661 56.6907 118.283 57.5894 120.264 58.2134C120.36 58.24 120.464 58.2694 120.555 58.3014C120.56 58.3067 120.56 58.3067 120.565 58.3067C120.848 58.3947 121.141 58.4694 121.443 58.5467C121.453 58.5467 121.464 58.552 121.48 58.5574C122.875 58.896 124.424 59.1334 126.112 59.3014C126.325 59.3227 126.541 59.3414 126.763 59.3627C130.789 59.712 135.56 59.712 140.904 59.8454C152.973 59.5387 162.128 59.928 166.36 55.384C170.907 51.152 170.515 41.9947 170.824 29.9254C170.517 17.8507 170.907 8.69602 166.363 4.46935C162.131 -0.0746511 152.973 0.309349 140.904 1.52588e-05C128.829 0.309349 119.675 -0.0746511 115.448 4.46935C110.904 8.69602 111.288 17.8507 110.979 29.9254C111.117 35.3014 111.117 40.1014 111.472 44.144C111.661 46.2614 111.949 48.1707 112.405 49.848Z" fill="#FF6376"></path></g></svg> `)},null,8,C1),e[21]||(e[21]=t("span",{class:"infographic-label font-medium font-mono truncate"},"Infographic",-1))])),n.$slots["header-center"]?(r(),u("div",k1,[ge(n.$slots,"header-center",{},void 0,!0)])):l.showModeToggle?(r(),u("div",x1,[t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"":"is-active",Ee.value?"opacity-50 cursor-not-allowed":""]]),disabled:Ee.value,onClick:e[0]||(e[0]=()=>He("preview")),onMouseenter:e[1]||(e[1]=o=>h(o,s(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>h(o,s(a)("common.preview")||"Preview")),onMouseleave:v,onBlur:v},[t("div",b1,[e[22]||(e[22]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("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"}),t("circle",{cx:"12",cy:"12",r:"3"})])],-1)),t("span",null,X(s(a)("common.preview")||"Preview"),1)])],42,y1),t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"is-active":""]]),onClick:e[3]||(e[3]=()=>He("source")),onMouseenter:e[4]||(e[4]=o=>h(o,s(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>h(o,s(a)("common.source")||"Source")),onMouseleave:v,onBlur:v},[t("div",M1,[e[23]||(e[23]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),t("span",null,X(s(a)("common.source")||"Source"),1)])],34)])):F("",!0),n.$slots["header-right"]?(r(),u("div",B1,[ge(n.$slots,"header-right",{},void 0,!0)])):(r(),u("div",F1,[l.showCollapseButton?(r(),u("button",{key:0,class:b(se),"aria-pressed":c.value,onClick:e[6]||(e[6]=o=>c.value=!c.value),onMouseenter:e[7]||(e[7]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onMouseleave:v,onBlur:v},[(r(),u("svg",{style:Ce({rotate:c.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[24]||(e[24]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,T1)):F("",!0),l.showCopyButton?(r(),u("button",{key:1,class:b(se),onClick:_e,onMouseenter:e[9]||(e[9]=o=>Te(o)),onFocus:e[10]||(e[10]=o=>Te(o)),onMouseleave:v,onBlur:v},[H.value?(r(),u("svg",$1,[...e[26]||(e[26]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(r(),u("svg",H1,[...e[25]||(e[25]=[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),t("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):F("",!0),l.showExportButton?(r(),u("button",{key:2,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Ie,onMouseenter:e[11]||(e[11]=o=>h(o,s(a)("common.export")||"Export")),onFocus:e[12]||(e[12]=o=>h(o,s(a)("common.export")||"Export")),onMouseleave:v,onBlur:v},[...e[27]||(e[27]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,j1)):F("",!0),l.showFullscreenButton?(r(),u("button",{key:3,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Oe,onMouseenter:e[13]||(e[13]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onFocus:e[14]||(e[14]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onMouseleave:v,onBlur:v},[j.value?(r(),u("svg",E1,[...e[29]||(e[29]=[t("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)])])):(r(),u("svg",P1,[...e[28]||(e[28]=[t("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)])]))],42,L1)):F("",!0)]))])):F("",!0),t1(t("div",null,[k.value?(r(),u("div",z1,[t("pre",S1,X(z.value),1)])):(r(),u("div",Z1,[l.showZoomControls?(r(),u("div",V1,[t("div",D1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e,onMouseenter:e[15]||(e[15]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onMouseleave:v,onBlur:v},[...e[30]||(e[30]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je,onMouseenter:e[17]||(e[17]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onMouseleave:v,onBlur:v},[...e[31]||(e[31]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le,onMouseenter:e[19]||(e[19]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onMouseleave:v,onBlur:v},X(Math.round(100*M.value))+"% ",33)])])):F("",!0),t("div",{class:"infographic-preview relative transition-all overflow-hidden block",style:Ce({height:ce.value}),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},[L.value||S.value?F("",!0):(r(),u("pre",N1,X(z.value),1)),t("div",{class:b(["absolute inset-0 cursor-grab",{"cursor-grabbing":_.value}]),style:Ce(ze.value)},[t("div",{ref_key:"infographicContainer",ref:p,class:"w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],36)]))],512),[[l1,!c.value]]),(r(),a1(c1,{to:"body"},[t("div",{class:b(["markstream-vue",{dark:l.isDark}])},[i1(u1,{name:"infographic-dialog",appear:""},{default:r1(()=>[j.value?(r(),u("div",{key:0,class:"infographic-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:s1(ve,["self"])},[t("div",Y1,[t("div",_1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e},[...e[32]||(e[32]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je},[...e[33]||(e[33]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le},X(Math.round(100*M.value))+"% ",1),t("button",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",onClick:ve},[...e[34]||(e[34]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),t("div",{ref_key:"modalContent",ref:D,class:b(["w-full h-full flex items-center justify-center p-4 overflow-hidden",{"cursor-grab":!_.value,"cursor-grabbing":_.value}]),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},null,34)])])):F("",!0)]),_:1})],2)]))],10,p1))}}),[["__scopeId","data-v-de34ec4b"]]);ke.install=R=>{R.component(ke.__name,ke)};export{ke as default}; diff --git a/apps/kimi-code/dist-web/assets/index11-DDroxORK.js b/apps/kimi-code/dist-web/assets/index11-Cx5Yh-Ch.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index11-DDroxORK.js rename to apps/kimi-code/dist-web/assets/index11-Cx5Yh-Ch.js index b5f0bd4bb..3ff048368 100644 --- a/apps/kimi-code/dist-web/assets/index11-DDroxORK.js +++ b/apps/kimi-code/dist-web/assets/index11-Cx5Yh-Ch.js @@ -1,4 +1,4 @@ -import{cq as _t,bQ as _n,M as Hn,c2 as Nn,c1 as In,b$ as Yn,c0 as qn,aU as m,bl as Wn,af as Xn,bY as Vn,bE as Y,az as Un,c8 as wn,aD as Zn,as as q,aI as Kn,aL as M,u as B,aY as Rt,v as u,bk as w,bb as Ze,au as ae,t as pe,aw as Ft,bL as Gn,bB as Jn,ar as yn,bd as kn,s as Qn,I as el,bJ as tl,bO as nl,g as ll,T as rl,q as F,c7 as xn,c5 as zt,cr as ol,cs as al,ct as il,cu as ul,cv as sl,b_ as cl,cw as dl}from"./index-CgXirkUy.js";import{i as Lt}from"./safeRaf-DGuzXxDK.js";function vl(d,f){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,f-12),f))}function Cn(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function ml(d){const f=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(f)||(function(y){const z=y.split(";",1)[0],a=z.indexOf(":");return a>0&&Cn(z.slice(0,a))})(f)}function fl(d){if(!d.includes(";"))return d;const f=d.indexOf(":");if(f===-1||!(function($,Q){const k=$.slice(0,Q);return/^\s*Note\b/i.test(k)||Cn(k)})(d,f))return d;const y=d.slice(0,f+1),z=d.slice(f+1),a=(function($){let Q="",k=!1;for(let P=0;P<$.length;P++){const ee=$[P];ee!==";"||vl($,P)||ml($.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:$})(z);return a===z?d:`${y}${a}`}function At(d){if(_t(d)!=="sequencediagram")return d;const f=d.split(/(\r\n|\n|\r)/);let y=!1;for(let z=0;z<f.length;z+=2){const a=f[z],$=fl(a);$!==a&&(f[z]=$,y=!0)}return y?f.join(""):d}var hl=Object.defineProperty,gl=Object.defineProperties,pl=Object.getOwnPropertyDescriptors,bn=Object.getOwnPropertySymbols,wl=Object.prototype.hasOwnProperty,yl=Object.prototype.propertyIsEnumerable,kl=Math.pow,Mn=(d,f,y)=>f in d?hl(d,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[f]=y,Tn=(d,f)=>{for(var y in f||(f={}))wl.call(f,y)&&Mn(d,y,f[y]);if(bn)for(var y of bn(f))yl.call(f,y)&&Mn(d,y,f[y]);return d},T=(d,f,y)=>new Promise((z,a)=>{var $=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?z(P.value):Promise.resolve(P.value).then($,Q);k((y=y.apply(d,f)).next())});const xl=["data-markstream-mode","data-markstream-pending"],bl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Ml={key:0},Tl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Cl=["innerHTML"],Bl={key:2},El={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},Sl={class:"flex items-center gap-x-1"},$l={key:4},Pl={key:5,class:"mermaid-header-actions flex items-center"},Dl=["aria-pressed"],Rl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Fl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},zl=["aria-label","disabled"],Ll=["aria-label","disabled"],Al={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},jl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},_l={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},Il={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Yl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},ql={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Wl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},pt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",jt=_n(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:f}){var y,z;const a=d,$=f,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style","br"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=m(!1),P=m(typeof window>"u"),ee=Nn(),Ht=In(),Ee=F(()=>a.isStrict?"strict":"loose"),Bn=F(()=>({startOnLoad:!1,securityLevel:Ee.value,dompurifyConfig:Ee.value==="strict"?Q:void 0,htmlLabels:Ee.value!=="strict"&&void 0,flowchart:Ee.value==="strict"?{htmlLabels:!1}:void 0}));function we(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Oe(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=sl(o);if(!c)return null;const h=(function(i,s){const p=Array.from(i.childNodes),E=document.createElement("div");return E.dataset.mermaidSvgLayer="1",E.style.zIndex="1",E.appendChild(s),i.insertBefore(E,i.firstChild),p.length>0&&(function(W){const j=()=>{var U;for(const J of W)(U=J.parentNode)==null||U.removeChild(J)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(j)}):setTimeout(j,32)})(p),E})(r,c);return{svg:c.outerHTML,bindTarget:h}})(e,t);return l||n.keepPreviousOnFailure||we(e),l}let ie=null;function ye(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ie?.(e)}catch{}}const{t:g}=Yn();let ue=!1,ke=0;function Ke(){return T(this,null,function*(){try{const e=yield il();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(P.value=!0)}})}const Ge=m(!1),X=m(!1),Je=m(),Z=m(),v=m(),se=m(),Qe=m(null),En=qn(),je=m(null),xe=m(typeof window>"u"||!ee.value),On=Wn(),te=Xn(Vn,null);let ce="",be=0,et=0;const Nt=F(()=>cl(a,On));function wt(){const e=Nt.value;e&&(ce&&ce!==e&&(te?.markSettled(ce),be=0),ce=e,be+=1,et+=1,be===1&&te?.markPending(e))}function yt(){return T(this,null,function*(){const e=ce;if(!e||(be=Math.max(0,be-1),be>0))return;ce="";const t=++et;yield q(),t===et&&((function(n=Nt.value){n&&Je.value&&te?.reportHeight(n,Je.value.offsetHeight)})(e),te?.markSettled(e))})}function It(){const e=ce;e&&(ce="",be=0,et+=1,te?.markSettled(e))}const Yt=m(),D=F(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Sn(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Ee.value==="strict"&&(l.htmlLabels=!1,l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%% +import{cq as _t,bQ as _n,M as Hn,c2 as Nn,c1 as In,b$ as Yn,c0 as qn,aU as m,bl as Wn,af as Xn,bY as Vn,bE as Y,az as Un,c8 as wn,aD as Zn,as as q,aI as Kn,aL as M,u as B,aY as Rt,v as u,bk as w,bb as Ze,au as ae,t as pe,aw as Ft,bL as Gn,bB as Jn,ar as yn,bd as kn,s as Qn,I as el,bJ as tl,bO as nl,g as ll,T as rl,q as F,c7 as xn,c5 as zt,cr as ol,cs as al,ct as il,cu as ul,cv as sl,b_ as cl,cw as dl}from"./index-_5lXYMaO.js";import{i as Lt}from"./safeRaf-DGuzXxDK.js";function vl(d,f){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,f-12),f))}function Cn(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function ml(d){const f=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(f)||(function(y){const z=y.split(";",1)[0],a=z.indexOf(":");return a>0&&Cn(z.slice(0,a))})(f)}function fl(d){if(!d.includes(";"))return d;const f=d.indexOf(":");if(f===-1||!(function($,Q){const k=$.slice(0,Q);return/^\s*Note\b/i.test(k)||Cn(k)})(d,f))return d;const y=d.slice(0,f+1),z=d.slice(f+1),a=(function($){let Q="",k=!1;for(let P=0;P<$.length;P++){const ee=$[P];ee!==";"||vl($,P)||ml($.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:$})(z);return a===z?d:`${y}${a}`}function At(d){if(_t(d)!=="sequencediagram")return d;const f=d.split(/(\r\n|\n|\r)/);let y=!1;for(let z=0;z<f.length;z+=2){const a=f[z],$=fl(a);$!==a&&(f[z]=$,y=!0)}return y?f.join(""):d}var hl=Object.defineProperty,gl=Object.defineProperties,pl=Object.getOwnPropertyDescriptors,bn=Object.getOwnPropertySymbols,wl=Object.prototype.hasOwnProperty,yl=Object.prototype.propertyIsEnumerable,kl=Math.pow,Mn=(d,f,y)=>f in d?hl(d,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[f]=y,Tn=(d,f)=>{for(var y in f||(f={}))wl.call(f,y)&&Mn(d,y,f[y]);if(bn)for(var y of bn(f))yl.call(f,y)&&Mn(d,y,f[y]);return d},T=(d,f,y)=>new Promise((z,a)=>{var $=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?z(P.value):Promise.resolve(P.value).then($,Q);k((y=y.apply(d,f)).next())});const xl=["data-markstream-mode","data-markstream-pending"],bl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Ml={key:0},Tl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Cl=["innerHTML"],Bl={key:2},El={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},Sl={class:"flex items-center gap-x-1"},$l={key:4},Pl={key:5,class:"mermaid-header-actions flex items-center"},Dl=["aria-pressed"],Rl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Fl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},zl=["aria-label","disabled"],Ll=["aria-label","disabled"],Al={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},jl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},_l={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},Il={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Yl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},ql={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Wl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},pt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",jt=_n(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:f}){var y,z;const a=d,$=f,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style","br"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=m(!1),P=m(typeof window>"u"),ee=Nn(),Ht=In(),Ee=F(()=>a.isStrict?"strict":"loose"),Bn=F(()=>({startOnLoad:!1,securityLevel:Ee.value,dompurifyConfig:Ee.value==="strict"?Q:void 0,htmlLabels:Ee.value!=="strict"&&void 0,flowchart:Ee.value==="strict"?{htmlLabels:!1}:void 0}));function we(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Oe(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=sl(o);if(!c)return null;const h=(function(i,s){const p=Array.from(i.childNodes),E=document.createElement("div");return E.dataset.mermaidSvgLayer="1",E.style.zIndex="1",E.appendChild(s),i.insertBefore(E,i.firstChild),p.length>0&&(function(W){const j=()=>{var U;for(const J of W)(U=J.parentNode)==null||U.removeChild(J)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(j)}):setTimeout(j,32)})(p),E})(r,c);return{svg:c.outerHTML,bindTarget:h}})(e,t);return l||n.keepPreviousOnFailure||we(e),l}let ie=null;function ye(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ie?.(e)}catch{}}const{t:g}=Yn();let ue=!1,ke=0;function Ke(){return T(this,null,function*(){try{const e=yield il();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(P.value=!0)}})}const Ge=m(!1),X=m(!1),Je=m(),Z=m(),v=m(),se=m(),Qe=m(null),En=qn(),je=m(null),xe=m(typeof window>"u"||!ee.value),On=Wn(),te=Xn(Vn,null);let ce="",be=0,et=0;const Nt=F(()=>cl(a,On));function wt(){const e=Nt.value;e&&(ce&&ce!==e&&(te?.markSettled(ce),be=0),ce=e,be+=1,et+=1,be===1&&te?.markPending(e))}function yt(){return T(this,null,function*(){const e=ce;if(!e||(be=Math.max(0,be-1),be>0))return;ce="";const t=++et;yield q(),t===et&&((function(n=Nt.value){n&&Je.value&&te?.reportHeight(n,Je.value.offsetHeight)})(e),te?.markSettled(e))})}function It(){const e=ce;e&&(ce="",be=0,et+=1,te?.markSettled(e))}const Yt=m(),D=F(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Sn(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Ee.value==="strict"&&(l.htmlLabels=!1,l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%% `;return n.trim().startsWith("%%{")?n:r+n}function qt(){var e;return(function(t){const n=(function(){var r;const o=Z.value?getComputedStyle(Z.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return(r=zt(o))!=null?r:360})(),l=un();return ol(t,n,l)})((e=zt(a.estimatedPreviewHeightPx))!=null?e:al(D.value))}function Wt(){return`${qt()}px`}const _e=m(null);function kt(){var e;return!!((e=v.value)!=null&&e.querySelector("svg"))}function Xt(){return a.loading!==!1&&(kt()||!!_e.value)}const C=m(1),_=m(0),H=m(0),tt=m(!1),nt=m({x:0,y:0}),x=m(!0),lt=m(!1),re=m(!1),de=m(null);let xt="",bt=!1,ve="";const rt=m(0),Mt=m(!1),$n=F(()=>{var e;return Math.max(0,(e=a.renderDebounceMs)!=null?e:300)}),Pn=F(()=>{var e;return Math.max(0,(e=a.contentStableDelayMs)!=null?e:500)}),He=F(()=>{var e;return Math.max(120,(e=a.previewPollDelayMs)!=null?e:800)}),Dn=F(()=>{var e;return Math.max(He.value,(e=a.previewPollMaxDelayMs)!=null?e:4e3)}),Vt=F(()=>{var e;return Math.max(1,Math.trunc((e=a.previewPollMaxAttempts)!=null?e:12))}),me=F(()=>a.loading!==!1);let Ne=null,Ie=null,Se=null,$e=null,Ye=0;const Ut=(y=globalThis.requestIdleCallback)!=null?y:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),Zt=(z=globalThis.cancelIdleCallback)!=null?z:e=>clearTimeout(e);function b(e=ke){return!ue&&e===ke}function L(){return b()&&xe.value&&!X.value}function Tt(){Se!=null&&(globalThis.clearTimeout(Se),Se=null),$e!=null&&(Zt($e),$e=null)}function qe(){ue||Se==null&&$e==null&&(Se=globalThis.setTimeout(()=>{Se=null,L()&&($e=Ut(()=>{$e=null,L()&&gn()},{timeout:500}))},$n.value))}function We(){Ie!=null&&(globalThis.clearTimeout(Ie),Ie=null)}function Kt(e=600){if(typeof globalThis>"u"||ue)return;const t=Math.max(0,e);We(),Ie=globalThis.setTimeout(()=>{if(Ie=null,!ue){if(a.loading||re.value||!L())return void Kt(Math.min(1200,Math.max(300,1.2*t)));qe()}},t)}const N=m(Wt()),ot=m(N.value);let Pe=null;const O=m(!1),K=m(!1),fe=m({}),he=m(0);let V=null,De=null;const I=m(!1),Rn=F(()=>{var e,t;return!(X.value||x.value||P.value&&!re.value&&!de.value&&(O.value||I.value&&((t=(e=v.value)==null?void 0:e.textContent)!=null&&t.trim())))}),Me=m({zoom:1,translateX:0,translateY:0,containerHeight:N.value}),Gt=F(()=>a.enableWheelZoom?{wheel:Fn}:{}),G=F(()=>{var e,t,n,l;return{worker:(e=a.workerTimeoutMs)!=null?e:1400,parse:(t=a.parseTimeoutMs)!=null?t:1800,render:(n=a.renderTimeoutMs)!=null?n:2500,fullRender:(l=a.fullRenderTimeoutMs)!=null?l:4e3}});let Re=null,at=null,Fe=!1,Te=He.value,ne=null,it=0,Ct=!0,ut=0;function Ce(e,t){const n=t?.timeoutMs,l=t?.signal;if(l?.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,o=!1,c=null;return new Promise((h,i)=>{const s=()=>{r!=null&&clearTimeout(r),c&&l&&l.removeEventListener("abort",c)};n&&n>0&&(r=globalThis.setTimeout(()=>{o||(o=!0,s(),i(new Error("Operation timed out")))},n)),l&&(c=()=>{o||(o=!0,s(),i(new DOMException("Aborted","AbortError")))},l.addEventListener("abort",c)),e().then(p=>{o||(o=!0,s(),h(p))}).catch(p=>{o||(o=!0,s(),i(p))})})}function Jt(e){if(typeof document>"u"||!v.value)return;if(typeof a.onRenderError=="function"&&a.onRenderError(e,D.value,v.value)===!0)return I.value=!0,void A();const t=document.createElement("div");t.style.padding="var(--ms-inset-panel-body)",t.style.color="hsl(var(--ms-destructive))",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),we(v.value),v.value.appendChild(t);const l=v.value?getComputedStyle(v.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";N.value=l||"360px",ot.value=N.value,I.value=!0,A()}function Qt(e){const t=typeof e=="string"?e:typeof e?.message=="string"?e.message:"";return typeof t=="string"&&/timed out/i.test(t)}function en(e){return e?.name==="AbortError"}function Bt(e){return!Qt(e)&&!en(e)}typeof window<"u"&&Y([()=>Je.value,ee],([e,t])=>{var n;if((n=je.value)==null||n.destroy(),je.value=null,!t||xe.value)return void(xe.value=!0);if(!e)return void(xe.value=!1);const l=En(e,{rootMargin:Ht?.value.heavyBlockMargin,allowIdle:!1});je.value=l,xe.value=l.isVisible.value,l.whenVisible.then(()=>{xe.value=!0})},{immediate:!0}),Un(()=>{var e;ue=!0,ke+=1,he.value+=1,(e=je.value)==null||e.destroy(),je.value=null,It(),Tt()});const st=F(()=>a.showTooltips!==!1);function tn(e){return!e||e.disabled}function R(e,t,n="top"){if(!st.value||tn(e.currentTarget))return;const l=e,r=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;xn(e.currentTarget,t,n,!1,r,a.isDark)}function S(){st.value&&wn()}function nn(e){if(!st.value||tn(e.currentTarget))return;const t=Ge.value?g("common.copied")||"Copied":g("common.copy")||"Copy",n=e,l=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;xn(e.currentTarget,t,"top",!1,l,a.isDark)}function ln(e,t){const n={theme:t==="dark"?"dark":"default"};Ee.value==="strict"&&(n.htmlLabels=!1,n.flowchart={htmlLabels:!1});const l=`%%{init: ${JSON.stringify(n)}}%% `;return e.trimStart().startsWith("%%{")?e:l+e}function ct(){return Ct&&!x.value&&!O.value&&!I.value}function rn(e){const t=e.trim();return!(!t||t.startsWith("%%"))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(":")}function Et(e){if(_t(e)==="gantt")return(function(n){var l;const r=n.split(/\r?\n/);for(!/\r?\n$/.test(n)&&r.length>0&&r.pop();r.length>0;){const o=(l=r[r.length-1])==null?void 0:l.trim();if(o&&!o.startsWith("%%")){if(rn(o))break;r.pop()}else r.pop()}return r.some(rn)?r.join(` `):""})(e);const t=e.split(/\r?\n/);for(;t.length>0;){const n=t[t.length-1].trimEnd();if(n!==""){if(!(/^[-=~>|<\s]+$/.test(n.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(n)||/[-|><]$/.test(n)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(n)))break;t.pop()}else t.pop()}return t.join(` diff --git a/apps/kimi-code/dist-web/assets/index5-Bc_8yuJc.js b/apps/kimi-code/dist-web/assets/index5-BHVixm2V.js similarity index 95% rename from apps/kimi-code/dist-web/assets/index5-Bc_8yuJc.js rename to apps/kimi-code/dist-web/assets/index5-BHVixm2V.js index b7531ca90..b1094c6c2 100644 --- a/apps/kimi-code/dist-web/assets/index5-Bc_8yuJc.js +++ b/apps/kimi-code/dist-web/assets/index5-BHVixm2V.js @@ -1 +1 @@ -import c from"./CodeBlockNode-DAv0N-7R.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-CgXirkUy.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default}; +import c from"./CodeBlockNode-CZYIqTV_.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-_5lXYMaO.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default}; diff --git a/apps/kimi-code/dist-web/assets/index6-ByC5gnox.js b/apps/kimi-code/dist-web/assets/index6-DeApd9L_.js similarity index 98% rename from apps/kimi-code/dist-web/assets/index6-ByC5gnox.js rename to apps/kimi-code/dist-web/assets/index6-DeApd9L_.js index 44060bf65..c42204ac0 100644 --- a/apps/kimi-code/dist-web/assets/index6-ByC5gnox.js +++ b/apps/kimi-code/dist-web/assets/index6-DeApd9L_.js @@ -1 +1 @@ -import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-CgXirkUy.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default}; +import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-_5lXYMaO.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default}; diff --git a/apps/kimi-code/dist-web/assets/index7-1my_tbsi.js b/apps/kimi-code/dist-web/assets/index7-DyLV34jk.js similarity index 98% rename from apps/kimi-code/dist-web/assets/index7-1my_tbsi.js rename to apps/kimi-code/dist-web/assets/index7-DyLV34jk.js index c73f70b5e..1ccf8e82a 100644 --- a/apps/kimi-code/dist-web/assets/index7-1my_tbsi.js +++ b/apps/kimi-code/dist-web/assets/index7-DyLV34jk.js @@ -1 +1 @@ -import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-CgXirkUy.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default}; +import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-_5lXYMaO.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default}; diff --git a/apps/kimi-code/dist-web/assets/index8-DPCQMDEU.js b/apps/kimi-code/dist-web/assets/index8-B1ktcQVe.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index8-DPCQMDEU.js rename to apps/kimi-code/dist-web/assets/index8-B1ktcQVe.js index 6e8689004..febe8af12 100644 --- a/apps/kimi-code/dist-web/assets/index8-DPCQMDEU.js +++ b/apps/kimi-code/dist-web/assets/index8-B1ktcQVe.js @@ -1 +1 @@ -import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-CgXirkUy.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},It={class:"d2-code"},Ft={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),I=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",I.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!I.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,F=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=I.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=I.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Ie=(function(Fe){if(typeof window>"u"||typeof DOMParser>"u"||!Fe)return"";const Ze=Fe.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Ie||"",ae.value=Ie?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,F?(F=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(F=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o<e)return F=!0,void(U==null&&(U=window.setTimeout(()=>{U=null,F&&(F=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,I.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,F=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("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,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",It,[u("code",null,N(I.value),1)]),s.value?(v(),m("p",Ft,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(I.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default}; +import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-_5lXYMaO.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},It={class:"d2-code"},Ft={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),I=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",I.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!I.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,F=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=I.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=I.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Ie=(function(Fe){if(typeof window>"u"||typeof DOMParser>"u"||!Fe)return"";const Ze=Fe.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Ie||"",ae.value=Ie?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,F?(F=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(F=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o<e)return F=!0,void(U==null&&(U=window.setTimeout(()=>{U=null,F&&(F=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,I.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,F=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("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,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",It,[u("code",null,N(I.value),1)]),s.value?(v(),m("p",Ft,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(I.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default}; diff --git a/apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-CLfieRpE.js b/apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-CqPgDY2n.js similarity index 69% rename from apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-CLfieRpE.js rename to apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-CqPgDY2n.js index 9884549ab..ef063fce7 100644 --- a/apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-CLfieRpE.js +++ b/apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-CqPgDY2n.js @@ -1,2 +1,2 @@ -import{_ as a,l as s,F as n,e as i}from"./mermaid.core-DHQD1STq.js";import{p}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var g={parse:a(async r=>{const e=await p("info",r);s.debug(e)},"parse")},v={version:"11.16.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,o)=>{s.debug(`rendering info diagram +import{_ as a,l as s,F as n,e as i}from"./mermaid.core-DpBz6UHc.js";import{p}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var g={parse:a(async r=>{const e=await p("info",r);s.debug(e)},"parse")},v={version:"11.16.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,o)=>{s.debug(`rendering info diagram `+r);const t=n(e);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),l={draw:c},w={parser:g,db:m,renderer:l};export{w as diagram}; diff --git a/apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-BghMxuhr.js b/apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-BrPR76fO.js similarity index 99% rename from apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-BghMxuhr.js rename to apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-BrPR76fO.js index df515d0bd..f9f1dc4eb 100644 --- a/apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-BghMxuhr.js +++ b/apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-BrPR76fO.js @@ -1,4 +1,4 @@ -import{_ as l,c as lt,a1 as ct,F as ut,al as dt,q as yt,k as ft,o as et,a as pt,b as gt,g as kt,s as mt,p as wt,e as _t}from"./mermaid.core-DHQD1STq.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(B){i.length=i.length-2*B,f.length=f.length-B,r.length=r.length-B}l(X,"popStack");function J(){var B;return B=h.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(h=B,B=h.pop()),B=s.symbols_[B]||B),B}l(J,"lex");for(var M,F,N,Y,W={},G,V,tt,U;;){if(F=i[i.length-1],this.defaultActions[F]?N=this.defaultActions[F]:((M===null||typeof M>"u")&&(M=J()),N=v[F]&&v[F][M]),typeof N>"u"||!N.length||!N[0]){var q="";U=[];for(G in v[F])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`: +import{_ as l,c as lt,a1 as ct,F as ut,al as dt,q as yt,k as ft,o as et,a as pt,b as gt,g as kt,s as mt,p as wt,e as _t}from"./mermaid.core-DpBz6UHc.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(B){i.length=i.length-2*B,f.length=f.length-B,r.length=r.length-B}l(X,"popStack");function J(){var B;return B=h.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(h=B,B=h.pop()),B=s.symbols_[B]||B),B}l(J,"lex");for(var M,F,N,Y,W={},G,V,tt,U;;){if(F=i[i.length-1],this.defaultActions[F]?N=this.defaultActions[F]:((M===null||typeof M>"u")&&(M=J()),N=v[F]&&v[F][M]),typeof N>"u"||!N.length||!N[0]){var q="";U=[];for(G in v[F])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`: `+b.showPosition()+` Expecting `+U.join(", ")+", got '"+(this.terminals_[M]||M)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(q,{text:b.match,token:this.terminals_[M]||M,line:b.yylineno,loc:R,expected:U})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+M);switch(N[0]){case 1:i.push(M),f.push(b.yytext),r.push(b.yylloc),i.push(N[1]),M=null,$=b.yyleng,w=b.yytext,I=b.yylineno,R=b.yylloc;break;case 2:if(V=this.productions_[N[1]][1],W.$=f[f.length-V],W._$={first_line:r[r.length-(V||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(V||1)].first_column,last_column:r[r.length-1].last_column},H&&(W._$.range=[r[r.length-(V||1)].range[0],r[r.length-1].range[1]]),Y=this.performAction.apply(W,[w,$,I,S.yy,N[1],f,r].concat(C)),typeof Y<"u")return Y;V&&(i=i.slice(0,-1*V*2),f=f.slice(0,-1*V),r=r.slice(0,-1*V)),i.push(this.productions_[N[1]][0]),f.push(W.$),r.push(W._$),tt=v[i[i.length-2]][i[i.length-1]],i.push(tt);break;case 3:return!0}}return!0},"parse")},O=(function(){var T={EOF:1,parseError:l(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:l(function(e,s){return this.yy=s||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var s=e.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:l(function(e){var s=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var h=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),i.length-1&&(this.yylineno-=i.length-1);var f=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:i?(i.length===h.length?this.yylloc.first_column:0)+h[h.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-s]),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(e){this.unput(this.match.slice(e))},"less"),pastInput:l(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var e=this.pastInput(),s=new Array(e.length+1).join("-");return e+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-CP_Jp2XI.js b/apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-M5m-6IMM.js similarity index 98% rename from apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-CP_Jp2XI.js rename to apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-M5m-6IMM.js index de8330977..6285d5f3a 100644 --- a/apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-CP_Jp2XI.js +++ b/apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-M5m-6IMM.js @@ -1,4 +1,4 @@ -import{g as gt}from"./chunk-5VM5RSS4-BgO5oPj2.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-32BRIVSS-BjbI6vv4.js";import{g as _t,s as vt,a as bt,b as wt,p as Tt,o as St,_ as s,c as R,d as X,e as $t,q as Mt}from"./mermaid.core-DHQD1STq.js";import{d as it}from"./arc-VnV5ZHHs.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";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:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`: +import{g as gt}from"./chunk-5VM5RSS4-D5nhu_pI.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-32BRIVSS-Dx199TNh.js";import{g as _t,s as vt,a as bt,b as wt,p as Tt,o as St,_ as s,c as R,d as X,e as $t,q as Mt}from"./mermaid.core-DpBz6UHc.js";import{d as it}from"./arc-BNlcm8Io.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";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:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`: `+_.showPosition()+` Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,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:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=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),l.length-1&&(this.yylineno-=l.length-1);var d=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:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-B_pkJKY_.js b/apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-RlJqNQKm.js similarity index 99% rename from apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-B_pkJKY_.js rename to apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-RlJqNQKm.js index 163e6a750..1c7cb29fa 100644 --- a/apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-B_pkJKY_.js +++ b/apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-RlJqNQKm.js @@ -1,4 +1,4 @@ -import{_ as o,l as te,c as H,F as fe,af as ye,ag as be,ah as me,ad as _e,D as Y,i as j,Y as ke,Z as Ee,aa as Se,ab as ce,ac as le}from"./mermaid.core-DHQD1STq.js";import{g as Ne}from"./chunk-5VM5RSS4-BgO5oPj2.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],_=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],k=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(k,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(k,[2,19]),e(k,[2,21],{15:30,24:G}),e(k,[2,22]),e(k,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(k,[2,16],{15:37,24:G}),e(k,[2,17]),e(k,[2,18]),e(k,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(k,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Z=b.yylloc;t.push(Z);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var E,P,x,q,F={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=ae()),x=U[P]&&U[P][E]),typeof x>"u"||!x.length||!x[0]){var Q="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Q="Parse error on line "+(W+1)+`: +import{_ as o,l as te,c as H,F as fe,af as ye,ag as be,ah as me,ad as _e,D as Y,i as j,Y as ke,Z as Ee,aa as Se,ab as ce,ac as le}from"./mermaid.core-DpBz6UHc.js";import{g as Ne}from"./chunk-5VM5RSS4-D5nhu_pI.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],_=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],k=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(k,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(k,[2,19]),e(k,[2,21],{15:30,24:G}),e(k,[2,22]),e(k,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(k,[2,16],{15:37,24:G}),e(k,[2,17]),e(k,[2,18]),e(k,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(k,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Z=b.yylloc;t.push(Z);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var E,P,x,q,F={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=ae()),x=U[P]&&U[P][E]),typeof x>"u"||!x.length||!x[0]){var Q="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Q="Parse error on line "+(W+1)+`: `+b.showPosition()+` Expecting `+X.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Q="Parse error on line "+(W+1)+": Unexpected "+(E==re?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Q,{text:b.match,token:this.terminals_[E]||E,line:b.yylineno,loc:Z,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(x[0]){case 1:r.push(E),u.push(b.yytext),t.push(b.yylloc),r.push(x[1]),E=null,se=b.yyleng,c=b.yytext,W=b.yylineno,Z=b.yylloc;break;case 2:if(C=this.productions_[x[1]][1],F.$=u[u.length-C],F._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(F._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),q=this.performAction.apply(F,[c,se,W,R.yy,x[1],u,t].concat(ge)),typeof q<"u")return q;C&&(r=r.slice(0,-1*C*2),u=u.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),u.push(F.$),t.push(F._$),oe=U[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},K=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(i,n){return this.yy=n||this.yy||{},this._input=i,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:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var n=i.length,r=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=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 u=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===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/linear-DLrQx2aB.js b/apps/kimi-code/dist-web/assets/linear-BWc4ICs9.js similarity index 98% rename from apps/kimi-code/dist-web/assets/linear-DLrQx2aB.js rename to apps/kimi-code/dist-web/assets/linear-BWc4ICs9.js index a9ba1b46b..32cd3ed58 100644 --- a/apps/kimi-code/dist-web/assets/linear-DLrQx2aB.js +++ b/apps/kimi-code/dist-web/assets/linear-BWc4ICs9.js @@ -1 +1 @@ -import{b9 as j,ba as p,bb as w,bc as k,bd as q}from"./mermaid.core-DHQD1STq.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=N(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=N(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function N(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function d(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=d(u,e),f=t(a,f)):(e=d(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=d(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=x(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=N,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t}; +import{b9 as j,ba as p,bb as w,bc as k,bd as q}from"./mermaid.core-DpBz6UHc.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=N(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=N(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function N(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function d(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=d(u,e),f=t(a,f)):(e=d(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=d(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=x(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=N,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t}; diff --git a/apps/kimi-code/dist-web/assets/mermaid.core-DHQD1STq.js b/apps/kimi-code/dist-web/assets/mermaid.core-DpBz6UHc.js similarity index 99% rename from apps/kimi-code/dist-web/assets/mermaid.core-DHQD1STq.js rename to apps/kimi-code/dist-web/assets/mermaid.core-DpBz6UHc.js index 68242f24a..9a8aed0a5 100644 --- a/apps/kimi-code/dist-web/assets/mermaid.core-DHQD1STq.js +++ b/apps/kimi-code/dist-web/assets/mermaid.core-DpBz6UHc.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-VKFMJZFB-D_g3ijKj.js","assets/chunk-RYQCIY6F-ClGLd9-g.js","assets/graph-DOmOIIwC.js","assets/map-DxJ2ADlA.js","assets/layout-D-LzfAck.js","assets/index-CgXirkUy.js","assets/index-BkulrdXm.css","assets/_commonjsHelpers-CqkleIqs.js","assets/swimlanes-5IMT3BWC-D0t01F1o.js","assets/cose-bilkent-JH36ORCC-CxHxs_ia.js","assets/cytoscape.esm-OyMbaexL.js","assets/c4Diagram-LMCZKHZV-D9CNQmKj.js","assets/chunk-32BRIVSS-BjbI6vv4.js","assets/flowDiagram-23GEKE2U-C0UVrrA6.js","assets/chunk-5VM5RSS4-BgO5oPj2.js","assets/chunk-XXDRQBXY-AKdWVjUf.js","assets/chunk-VR4S4FIN-CFZ-U2wY.js","assets/channel-CCgkeAox.js","assets/swimlanesDiagram-G3AALYLV-1XCKB3VS.js","assets/erDiagram-Q63AITRT-Ba0EdkRL.js","assets/gitGraphDiagram-IHSO6WYX-koxYdU4T.js","assets/chunk-2Q5K7J3B-BRQfHNsr.js","assets/chunk-JWPE2WC7-CPYc1Q95.js","assets/cynefin-VYW2F7L2-Cbq_W2rg.js","assets/ganttDiagram-NO4QXBWP-JXL1f3pm.js","assets/linear-DLrQx2aB.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-FWYZ7A6U-CLfieRpE.js","assets/pieDiagram-ENE6RG2P-BRTgRbIK.js","assets/arc-VnV5ZHHs.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-ABIIQ3AL-Cqd6UTPe.js","assets/xychartDiagram-FW5EYKEG-DvB4kNEE.js","assets/requirementDiagram-TGXJPOKE-C7bAU0jd.js","assets/sequenceDiagram-DBY2YBRQ-AbAJXDB5.js","assets/classDiagram-OUVF2IWQ-joxy0H72.js","assets/chunk-V7JOEXUC-DRWtsWPL.js","assets/classDiagram-v2-EOCWNBFH-joxy0H72.js","assets/stateDiagram-2N3HPSRC-DvqaD8Eo.js","assets/chunk-EX3LRPZG-CnbEmu7W.js","assets/stateDiagram-v2-6OUMAXLB-D-BVu44I.js","assets/journeyDiagram-5HDEW3XC-CP_Jp2XI.js","assets/timeline-definition-FHXFAJF6-doJ2oiYT.js","assets/mindmap-definition-LN4V7U3C-CKYrzvBu.js","assets/kanban-definition-HUTT4EX6-B_pkJKY_.js","assets/sankeyDiagram-HTMAVEWB-DVlRtVRy.js","assets/diagram-NH7WQ7WH-DulkvbtN.js","assets/diagram-WEI45ONY-Dcl5s4A_.js","assets/blockDiagram-677ZJIJ3-DbZfwKqi.js","assets/diagram-OA4YK3LP-CkS8iR3C.js","assets/architectureDiagram-ZJ3FMSHR-vHnTqMir.js","assets/diagram-FQU43EPY-BsAKjn07.js","assets/ishikawaDiagram-FXEZZL3T-BghMxuhr.js","assets/vennDiagram-L72KCM5P-De4w5Aco.js","assets/diagram-G47NLZAW-BuEBRets.js","assets/wardleyDiagram-EHGQE667-CiqgclaU.js","assets/cynefinDiagram-TSTJHNR4-DV_qWAFu.js","assets/railroadDiagram-RFXS5EU6-nXFgW9ad.js","assets/chunk-MOJQB5TN-t9_0csvx.js","assets/ebnfDiagram-CCIWWBDH-D-Jk-ZBL.js","assets/abnfDiagram-VRR7QNED-C1nSQTfb.js","assets/pegDiagram-2B236MQR-DasvmypV.js"])))=>i.map(i=>d[i]); -import{bR as nt}from"./index-CgXirkUy.js";import{g as gy}from"./_commonjsHelpers-CqkleIqs.js";var _c=Object.defineProperty,p=(e,t)=>_c(e,"name",{value:t,configurable:!0}),my=(e,t)=>{for(var r in t)_c(e,r,{get:t[r],enumerable:!0})},So={exports:{}},yy=So.exports,zl;function Cy(){return zl||(zl=1,(function(e,t){(function(r,i){e.exports=i()})(yy,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var A=["th","st","nd","rd"],F=$%100;return"["+$+(A[(F-20)%10]||A[F]||A[0])+"]"}},k=function($,A,F){var D=String($);return!D||D.length>=A?$:""+Array(A+1-D.length).join(F)+$},T={s:k,z:function($){var A=-$.utcOffset(),F=Math.abs(A),D=Math.floor(F/60),M=F%60;return(A<=0?"+":"-")+k(D,2,"0")+":"+k(M,2,"0")},m:function $(A,F){if(A.date()<F.date())return-$(F,A);var D=12*(F.year()-A.year())+(F.month()-A.month()),M=A.clone().add(D,d),H=F-M<0,Y=A.clone().add(D+(H?-1:1),d);return+(-(D+(F-M)/(H?M-Y:Y-M))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:d,y:u,w:h,d:c,D:g,h:l,m:n,s:a,ms:s,Q:f}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},S="en",_={};_[S]=b;var L="$isDayjsObject",v=function($){return $ instanceof z||!(!$||!$[L])},N=function $(A,F,D){var M;if(!A)return S;if(typeof A=="string"){var H=A.toLowerCase();_[H]&&(M=H),F&&(_[H]=F,M=H);var Y=A.split("-");if(!M&&Y.length>1)return $(Y[0])}else{var G=A.name;_[G]=A,M=G}return!D&&M&&(S=M),M||!D&&S},R=function($,A){if(v($))return $.clone();var F=typeof A=="object"?A:{};return F.date=$,F.args=arguments,new z(F)},P=T;P.l=N,P.i=v,P.w=function($,A){return R($,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var z=(function(){function $(F){this.$L=N(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[L]=!0}var A=$.prototype;return A.parse=function(F){this.$d=(function(D){var M=D.date,H=D.utc;if(M===null)return new Date(NaN);if(P.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var Y=M.match(y);if(Y){var G=Y[2]-1||0,lt=(Y[7]||"0").substring(0,3);return H?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,lt)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,lt)}}return new Date(M)})(F),this.init()},A.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},A.$utils=function(){return P},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(F,D){var M=R(F);return this.startOf(D)<=M&&M<=this.endOf(D)},A.isAfter=function(F,D){return R(F)<this.startOf(D)},A.isBefore=function(F,D){return this.endOf(D)<R(F)},A.$g=function(F,D,M){return P.u(F)?this[D]:this.set(M,F)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(F,D){var M=this,H=!!P.u(D)||D,Y=P.p(F),G=function(Bt,St){var ut=P.w(M.$u?Date.UTC(M.$y,St,Bt):new Date(M.$y,St,Bt),M);return H?ut:ut.endOf(c)},lt=function(Bt,St){return P.w(M.toDate()[Bt].apply(M.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(St)),M)},ht=this.$W,dt=this.$M,bt=this.$D,et="set"+(this.$u?"UTC":"");switch(Y){case u:return H?G(1,0):G(31,11);case d:return H?G(1,dt):G(0,dt+1);case h:var ft=this.$locale().weekStart||0,kt=(ht<ft?ht+7:ht)-ft;return G(H?bt-kt:bt+(6-kt),dt);case c:case g:return lt(et+"Hours",0);case l:return lt(et+"Minutes",1);case n:return lt(et+"Seconds",2);case a:return lt(et+"Milliseconds",3);default:return this.clone()}},A.endOf=function(F){return this.startOf(F,!1)},A.$set=function(F,D){var M,H=P.p(F),Y="set"+(this.$u?"UTC":""),G=(M={},M[c]=Y+"Date",M[g]=Y+"Date",M[d]=Y+"Month",M[u]=Y+"FullYear",M[l]=Y+"Hours",M[n]=Y+"Minutes",M[a]=Y+"Seconds",M[s]=Y+"Milliseconds",M)[H],lt=H===c?this.$D+(D-this.$W):D;if(H===d||H===u){var ht=this.clone().set(g,1);ht.$d[G](lt),ht.init(),this.$d=ht.set(g,Math.min(this.$D,ht.daysInMonth())).$d}else G&&this.$d[G](lt);return this.init(),this},A.set=function(F,D){return this.clone().$set(F,D)},A.get=function(F){return this[P.p(F)]()},A.add=function(F,D){var M,H=this;F=Number(F);var Y=P.p(D),G=function(dt){var bt=R(H);return P.w(bt.date(bt.date()+Math.round(dt*F)),H)};if(Y===d)return this.set(d,this.$M+F);if(Y===u)return this.set(u,this.$y+F);if(Y===c)return G(1);if(Y===h)return G(7);var lt=(M={},M[n]=i,M[l]=o,M[a]=r,M)[Y]||1,ht=this.$d.getTime()+F*lt;return P.w(ht,this)},A.subtract=function(F,D){return this.add(-1*F,D)},A.format=function(F){var D=this,M=this.$locale();if(!this.isValid())return M.invalidDate||m;var H=F||"YYYY-MM-DDTHH:mm:ssZ",Y=P.z(this),G=this.$H,lt=this.$m,ht=this.$M,dt=M.weekdays,bt=M.months,et=M.meridiem,ft=function(St,ut,de,Tt){return St&&(St[ut]||St(D,H))||de[ut].slice(0,Tt)},kt=function(St){return P.s(G%12||12,St,"0")},Bt=et||function(St,ut,de){var Tt=St<12?"AM":"PM";return de?Tt.toLowerCase():Tt};return H.replace(C,(function(St,ut){return ut||(function(de){switch(de){case"YY":return String(D.$y).slice(-2);case"YYYY":return P.s(D.$y,4,"0");case"M":return ht+1;case"MM":return P.s(ht+1,2,"0");case"MMM":return ft(M.monthsShort,ht,bt,3);case"MMMM":return ft(bt,ht);case"D":return D.$D;case"DD":return P.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return ft(M.weekdaysMin,D.$W,dt,2);case"ddd":return ft(M.weekdaysShort,D.$W,dt,3);case"dddd":return dt[D.$W];case"H":return String(G);case"HH":return P.s(G,2,"0");case"h":return kt(1);case"hh":return kt(2);case"a":return Bt(G,lt,!0);case"A":return Bt(G,lt,!1);case"m":return String(lt);case"mm":return P.s(lt,2,"0");case"s":return String(D.$s);case"ss":return P.s(D.$s,2,"0");case"SSS":return P.s(D.$ms,3,"0");case"Z":return Y}return null})(St)||Y.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(F,D,M){var H,Y=this,G=P.p(D),lt=R(F),ht=(lt.utcOffset()-this.utcOffset())*i,dt=this-lt,bt=function(){return P.m(Y,lt)};switch(G){case u:H=bt()/12;break;case d:H=bt();break;case f:H=bt()/3;break;case h:H=(dt-ht)/6048e5;break;case c:H=(dt-ht)/864e5;break;case l:H=dt/o;break;case n:H=dt/i;break;case a:H=dt/r;break;default:H=dt}return M?H:P.a(H)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return _[this.$L]},A.locale=function(F,D){if(!F)return this.$L;var M=this.clone(),H=N(F,D,!0);return H&&(M.$L=H),M},A.clone=function(){return P.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},$})(),W=z.prototype;return R.prototype=W,[["$ms",s],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",g]].forEach((function($){W[$[1]]=function(A){return this.$g(A,$[0],$[1])}})),R.extend=function($,A){return $.$i||($(A,z,R),$.$i=!0),R},R.locale=N,R.isDayjs=v,R.unix=function($){return R(1e3*$)},R.en=_[S],R.Ls=_,R.p={},R}))})(So)),So.exports}var xy=Cy();const by=gy(xy);var Ne={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},q={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Cn=p(function(e="fatal"){let t=Ne.fatal;typeof e=="string"?e.toLowerCase()in Ne&&(t=Ne[e]):typeof e=="number"&&(t=e),q.trace=()=>{},q.debug=()=>{},q.info=()=>{},q.warn=()=>{},q.error=()=>{},q.fatal=()=>{},t<=Ne.fatal&&(q.fatal=console.error?console.error.bind(console,he("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",he("FATAL"))),t<=Ne.error&&(q.error=console.error?console.error.bind(console,he("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",he("ERROR"))),t<=Ne.warn&&(q.warn=console.warn?console.warn.bind(console,he("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",he("WARN"))),t<=Ne.info&&(q.info=console.info?console.info.bind(console,he("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",he("INFO"))),t<=Ne.debug&&(q.debug=console.debug?console.debug.bind(console,he("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("DEBUG"))),t<=Ne.trace&&(q.trace=console.debug?console.debug.bind(console,he("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("TRACE")))},"setLogLevel"),he=p(e=>`%c${by().format("ss.SSS")} : ${e} : `,"format");const _o={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;switch(i){case"r":return _o.hue2rgb(s,o,e+1/3)*255;case"g":return _o.hue2rgb(s,o,e)*255;case"b":return _o.hue2rgb(s,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const o=Math.max(e,t,r),s=Math.min(e,t,r),a=(o+s)/2;if(i==="l")return a*100;if(o===s)return 0;const n=o-s,l=a>.5?n/(2-o-s):n/(o+s);if(i==="s")return l*100;switch(o){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},ky={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},wy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:_o,lang:ky,unit:wy},Je={};for(let e=0;e<=255;e++)Je[e]=at.unit.dec2hex(e);const Gt={ALL:0,RGB:1,HSL:2};class Ty{constructor(){this.type=Gt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Gt.ALL}is(t){return this.type===t}}class Sy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Ty}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Gt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:o}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:o}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Gt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Gt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Gt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Gt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Gt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Gt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const gs=new Sy({r:0,g:0,b:0,a:0},"transparent"),Xr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Xr.re);if(!t)return;const r=t[1],i=parseInt(r,16),o=r.length,s=o%4===0,a=o>4,n=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return gs.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`#${Je[Math.round(t)]}${Je[Math.round(r)]}${Je[Math.round(i)]}${Je[Math.round(o*255)]}`:`#${Je[Math.round(t)]}${Je[Math.round(r)]}${Je[Math.round(i)]}`}},Cr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Cr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Cr.re);if(!r)return;const[,i,o,s,a,n]=r;return gs.set({h:Cr._hue2deg(i),s:at.channel.clamp.s(parseFloat(o)),l:at.channel.clamp.l(parseFloat(s)),a:a?at.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:o}=e;return o<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${o})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},Ei={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Ei.colors[e];if(t)return Xr.parse(t)},stringify:e=>{const t=Xr.stringify(e);for(const r in Ei.colors)if(Ei.colors[r]===t)return r}},wi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(wi.re);if(!r)return;const[,i,o,s,a,n,l,c,h]=r;return gs.set({r:at.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:at.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(o)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},Ee={format:{keyword:Ei,hex:Xr,rgb:wi,rgba:wi,hsl:Cr,hsla:Cr},parse:e=>{if(typeof e!="string")return e;const t=Xr.parse(e)||wi.parse(e)||Cr.parse(e)||Ei.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Gt.HSL)||e.data.r===void 0?Cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?wi.stringify(e):Xr.stringify(e)},Bc=(e,t)=>{const r=Ee.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return Ee.stringify(r)},or=(e,t,r=0,i=1)=>{if(typeof e!="number")return Bc(e,{a:t});const o=gs.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return Ee.stringify(o)},_y=e=>{const{r:t,g:r,b:i}=Ee.parse(e),o=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(o)},By=e=>_y(e)>=.5,ke=e=>!By(e),vc=(e,t,r)=>{const i=Ee.parse(e),o=i[t],s=at.channel.clamp[t](o+r);return o!==s&&(i[t]=s),Ee.stringify(i)},O=(e,t)=>vc(e,"l",t),I=(e,t)=>vc(e,"l",-t),x=(e,t)=>{const r=Ee.parse(e),i={};for(const o in t)t[o]&&(i[o]=r[o]+t[o]);return Bc(e,i)},vy=(e,t,r=50)=>{const{r:i,g:o,b:s,a}=Ee.parse(e),{r:n,g:l,b:c,a:h}=Ee.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,C=i*m+n*y,b=o*m+l*y,k=s*m+c*y,T=a*d+h*(1-d);return or(C,b,k,T)},B=(e,t=100)=>{const r=Ee.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,vy(r,e,t)};/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */function Hl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Ly(e){if(Array.isArray(e))return e}function Fy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,n=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(i=s.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,o=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return n}}function Ay(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-VKFMJZFB-BCr0U4UL.js","assets/chunk-RYQCIY6F-DYUKYgim.js","assets/graph-DOmOIIwC.js","assets/map-DxJ2ADlA.js","assets/layout-D-LzfAck.js","assets/index-_5lXYMaO.js","assets/index-C_ObXpF5.css","assets/_commonjsHelpers-CqkleIqs.js","assets/swimlanes-5IMT3BWC-BaZl8tge.js","assets/cose-bilkent-JH36ORCC-Bvd7lU_r.js","assets/cytoscape.esm-OyMbaexL.js","assets/c4Diagram-LMCZKHZV-Dus3HzI2.js","assets/chunk-32BRIVSS-Dx199TNh.js","assets/flowDiagram-23GEKE2U-CBIszsQp.js","assets/chunk-5VM5RSS4-D5nhu_pI.js","assets/chunk-XXDRQBXY-BYo5O_6D.js","assets/chunk-VR4S4FIN-JAO0vJUe.js","assets/channel-DPT3_xql.js","assets/swimlanesDiagram-G3AALYLV-WxMWFajS.js","assets/erDiagram-Q63AITRT-CnsIdx2o.js","assets/gitGraphDiagram-IHSO6WYX-BH8WCC4D.js","assets/chunk-2Q5K7J3B-CqtdGPMZ.js","assets/chunk-JWPE2WC7-BtckK32c.js","assets/cynefin-VYW2F7L2-Dac1VpFl.js","assets/ganttDiagram-NO4QXBWP-Bp3UvmyY.js","assets/linear-BWc4ICs9.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-FWYZ7A6U-CqPgDY2n.js","assets/pieDiagram-ENE6RG2P-CJ6o_adA.js","assets/arc-BNlcm8Io.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-ABIIQ3AL-BBv6VFSq.js","assets/xychartDiagram-FW5EYKEG-BJN2UZpr.js","assets/requirementDiagram-TGXJPOKE-CGyvAsFO.js","assets/sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js","assets/classDiagram-OUVF2IWQ-BeJtrUxZ.js","assets/chunk-V7JOEXUC-Bj6HhMBf.js","assets/classDiagram-v2-EOCWNBFH-BeJtrUxZ.js","assets/stateDiagram-2N3HPSRC-DxGZaCFf.js","assets/chunk-EX3LRPZG-5GJmdVbS.js","assets/stateDiagram-v2-6OUMAXLB-BudL4GKN.js","assets/journeyDiagram-5HDEW3XC-M5m-6IMM.js","assets/timeline-definition-FHXFAJF6-zMligh5P.js","assets/mindmap-definition-LN4V7U3C-G8LQJrFP.js","assets/kanban-definition-HUTT4EX6-RlJqNQKm.js","assets/sankeyDiagram-HTMAVEWB-CYJzk73F.js","assets/diagram-NH7WQ7WH-CZRzvszj.js","assets/diagram-WEI45ONY-BhWQTWhi.js","assets/blockDiagram-677ZJIJ3-Cp3c1EWu.js","assets/diagram-OA4YK3LP-B2qPmny7.js","assets/architectureDiagram-ZJ3FMSHR-pdH2rk7i.js","assets/diagram-FQU43EPY-DPlhFZdP.js","assets/ishikawaDiagram-FXEZZL3T-BrPR76fO.js","assets/vennDiagram-L72KCM5P-KpUZjKlm.js","assets/diagram-G47NLZAW-D-tFNEyZ.js","assets/wardleyDiagram-EHGQE667-9gU-F74d.js","assets/cynefinDiagram-TSTJHNR4-cH6p2fBn.js","assets/railroadDiagram-RFXS5EU6-7QSjLg66.js","assets/chunk-MOJQB5TN-B49sRSVS.js","assets/ebnfDiagram-CCIWWBDH-C7ceb06g.js","assets/abnfDiagram-VRR7QNED-COKyJfaN.js","assets/pegDiagram-2B236MQR-Bqe1YNn0.js"])))=>i.map(i=>d[i]); +import{bR as nt}from"./index-_5lXYMaO.js";import{g as gy}from"./_commonjsHelpers-CqkleIqs.js";var _c=Object.defineProperty,p=(e,t)=>_c(e,"name",{value:t,configurable:!0}),my=(e,t)=>{for(var r in t)_c(e,r,{get:t[r],enumerable:!0})},So={exports:{}},yy=So.exports,zl;function Cy(){return zl||(zl=1,(function(e,t){(function(r,i){e.exports=i()})(yy,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var A=["th","st","nd","rd"],F=$%100;return"["+$+(A[(F-20)%10]||A[F]||A[0])+"]"}},k=function($,A,F){var D=String($);return!D||D.length>=A?$:""+Array(A+1-D.length).join(F)+$},T={s:k,z:function($){var A=-$.utcOffset(),F=Math.abs(A),D=Math.floor(F/60),M=F%60;return(A<=0?"+":"-")+k(D,2,"0")+":"+k(M,2,"0")},m:function $(A,F){if(A.date()<F.date())return-$(F,A);var D=12*(F.year()-A.year())+(F.month()-A.month()),M=A.clone().add(D,d),H=F-M<0,Y=A.clone().add(D+(H?-1:1),d);return+(-(D+(F-M)/(H?M-Y:Y-M))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:d,y:u,w:h,d:c,D:g,h:l,m:n,s:a,ms:s,Q:f}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},S="en",_={};_[S]=b;var L="$isDayjsObject",v=function($){return $ instanceof z||!(!$||!$[L])},N=function $(A,F,D){var M;if(!A)return S;if(typeof A=="string"){var H=A.toLowerCase();_[H]&&(M=H),F&&(_[H]=F,M=H);var Y=A.split("-");if(!M&&Y.length>1)return $(Y[0])}else{var G=A.name;_[G]=A,M=G}return!D&&M&&(S=M),M||!D&&S},R=function($,A){if(v($))return $.clone();var F=typeof A=="object"?A:{};return F.date=$,F.args=arguments,new z(F)},P=T;P.l=N,P.i=v,P.w=function($,A){return R($,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var z=(function(){function $(F){this.$L=N(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[L]=!0}var A=$.prototype;return A.parse=function(F){this.$d=(function(D){var M=D.date,H=D.utc;if(M===null)return new Date(NaN);if(P.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var Y=M.match(y);if(Y){var G=Y[2]-1||0,lt=(Y[7]||"0").substring(0,3);return H?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,lt)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,lt)}}return new Date(M)})(F),this.init()},A.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},A.$utils=function(){return P},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(F,D){var M=R(F);return this.startOf(D)<=M&&M<=this.endOf(D)},A.isAfter=function(F,D){return R(F)<this.startOf(D)},A.isBefore=function(F,D){return this.endOf(D)<R(F)},A.$g=function(F,D,M){return P.u(F)?this[D]:this.set(M,F)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(F,D){var M=this,H=!!P.u(D)||D,Y=P.p(F),G=function(Bt,St){var ut=P.w(M.$u?Date.UTC(M.$y,St,Bt):new Date(M.$y,St,Bt),M);return H?ut:ut.endOf(c)},lt=function(Bt,St){return P.w(M.toDate()[Bt].apply(M.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(St)),M)},ht=this.$W,dt=this.$M,bt=this.$D,et="set"+(this.$u?"UTC":"");switch(Y){case u:return H?G(1,0):G(31,11);case d:return H?G(1,dt):G(0,dt+1);case h:var ft=this.$locale().weekStart||0,kt=(ht<ft?ht+7:ht)-ft;return G(H?bt-kt:bt+(6-kt),dt);case c:case g:return lt(et+"Hours",0);case l:return lt(et+"Minutes",1);case n:return lt(et+"Seconds",2);case a:return lt(et+"Milliseconds",3);default:return this.clone()}},A.endOf=function(F){return this.startOf(F,!1)},A.$set=function(F,D){var M,H=P.p(F),Y="set"+(this.$u?"UTC":""),G=(M={},M[c]=Y+"Date",M[g]=Y+"Date",M[d]=Y+"Month",M[u]=Y+"FullYear",M[l]=Y+"Hours",M[n]=Y+"Minutes",M[a]=Y+"Seconds",M[s]=Y+"Milliseconds",M)[H],lt=H===c?this.$D+(D-this.$W):D;if(H===d||H===u){var ht=this.clone().set(g,1);ht.$d[G](lt),ht.init(),this.$d=ht.set(g,Math.min(this.$D,ht.daysInMonth())).$d}else G&&this.$d[G](lt);return this.init(),this},A.set=function(F,D){return this.clone().$set(F,D)},A.get=function(F){return this[P.p(F)]()},A.add=function(F,D){var M,H=this;F=Number(F);var Y=P.p(D),G=function(dt){var bt=R(H);return P.w(bt.date(bt.date()+Math.round(dt*F)),H)};if(Y===d)return this.set(d,this.$M+F);if(Y===u)return this.set(u,this.$y+F);if(Y===c)return G(1);if(Y===h)return G(7);var lt=(M={},M[n]=i,M[l]=o,M[a]=r,M)[Y]||1,ht=this.$d.getTime()+F*lt;return P.w(ht,this)},A.subtract=function(F,D){return this.add(-1*F,D)},A.format=function(F){var D=this,M=this.$locale();if(!this.isValid())return M.invalidDate||m;var H=F||"YYYY-MM-DDTHH:mm:ssZ",Y=P.z(this),G=this.$H,lt=this.$m,ht=this.$M,dt=M.weekdays,bt=M.months,et=M.meridiem,ft=function(St,ut,de,Tt){return St&&(St[ut]||St(D,H))||de[ut].slice(0,Tt)},kt=function(St){return P.s(G%12||12,St,"0")},Bt=et||function(St,ut,de){var Tt=St<12?"AM":"PM";return de?Tt.toLowerCase():Tt};return H.replace(C,(function(St,ut){return ut||(function(de){switch(de){case"YY":return String(D.$y).slice(-2);case"YYYY":return P.s(D.$y,4,"0");case"M":return ht+1;case"MM":return P.s(ht+1,2,"0");case"MMM":return ft(M.monthsShort,ht,bt,3);case"MMMM":return ft(bt,ht);case"D":return D.$D;case"DD":return P.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return ft(M.weekdaysMin,D.$W,dt,2);case"ddd":return ft(M.weekdaysShort,D.$W,dt,3);case"dddd":return dt[D.$W];case"H":return String(G);case"HH":return P.s(G,2,"0");case"h":return kt(1);case"hh":return kt(2);case"a":return Bt(G,lt,!0);case"A":return Bt(G,lt,!1);case"m":return String(lt);case"mm":return P.s(lt,2,"0");case"s":return String(D.$s);case"ss":return P.s(D.$s,2,"0");case"SSS":return P.s(D.$ms,3,"0");case"Z":return Y}return null})(St)||Y.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(F,D,M){var H,Y=this,G=P.p(D),lt=R(F),ht=(lt.utcOffset()-this.utcOffset())*i,dt=this-lt,bt=function(){return P.m(Y,lt)};switch(G){case u:H=bt()/12;break;case d:H=bt();break;case f:H=bt()/3;break;case h:H=(dt-ht)/6048e5;break;case c:H=(dt-ht)/864e5;break;case l:H=dt/o;break;case n:H=dt/i;break;case a:H=dt/r;break;default:H=dt}return M?H:P.a(H)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return _[this.$L]},A.locale=function(F,D){if(!F)return this.$L;var M=this.clone(),H=N(F,D,!0);return H&&(M.$L=H),M},A.clone=function(){return P.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},$})(),W=z.prototype;return R.prototype=W,[["$ms",s],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",g]].forEach((function($){W[$[1]]=function(A){return this.$g(A,$[0],$[1])}})),R.extend=function($,A){return $.$i||($(A,z,R),$.$i=!0),R},R.locale=N,R.isDayjs=v,R.unix=function($){return R(1e3*$)},R.en=_[S],R.Ls=_,R.p={},R}))})(So)),So.exports}var xy=Cy();const by=gy(xy);var Ne={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},q={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Cn=p(function(e="fatal"){let t=Ne.fatal;typeof e=="string"?e.toLowerCase()in Ne&&(t=Ne[e]):typeof e=="number"&&(t=e),q.trace=()=>{},q.debug=()=>{},q.info=()=>{},q.warn=()=>{},q.error=()=>{},q.fatal=()=>{},t<=Ne.fatal&&(q.fatal=console.error?console.error.bind(console,he("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",he("FATAL"))),t<=Ne.error&&(q.error=console.error?console.error.bind(console,he("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",he("ERROR"))),t<=Ne.warn&&(q.warn=console.warn?console.warn.bind(console,he("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",he("WARN"))),t<=Ne.info&&(q.info=console.info?console.info.bind(console,he("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",he("INFO"))),t<=Ne.debug&&(q.debug=console.debug?console.debug.bind(console,he("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("DEBUG"))),t<=Ne.trace&&(q.trace=console.debug?console.debug.bind(console,he("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("TRACE")))},"setLogLevel"),he=p(e=>`%c${by().format("ss.SSS")} : ${e} : `,"format");const _o={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;switch(i){case"r":return _o.hue2rgb(s,o,e+1/3)*255;case"g":return _o.hue2rgb(s,o,e)*255;case"b":return _o.hue2rgb(s,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const o=Math.max(e,t,r),s=Math.min(e,t,r),a=(o+s)/2;if(i==="l")return a*100;if(o===s)return 0;const n=o-s,l=a>.5?n/(2-o-s):n/(o+s);if(i==="s")return l*100;switch(o){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},ky={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},wy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:_o,lang:ky,unit:wy},Je={};for(let e=0;e<=255;e++)Je[e]=at.unit.dec2hex(e);const Gt={ALL:0,RGB:1,HSL:2};class Ty{constructor(){this.type=Gt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Gt.ALL}is(t){return this.type===t}}class Sy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Ty}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Gt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:o}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:o}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Gt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Gt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Gt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Gt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Gt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Gt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const gs=new Sy({r:0,g:0,b:0,a:0},"transparent"),Xr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Xr.re);if(!t)return;const r=t[1],i=parseInt(r,16),o=r.length,s=o%4===0,a=o>4,n=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return gs.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`#${Je[Math.round(t)]}${Je[Math.round(r)]}${Je[Math.round(i)]}${Je[Math.round(o*255)]}`:`#${Je[Math.round(t)]}${Je[Math.round(r)]}${Je[Math.round(i)]}`}},Cr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Cr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Cr.re);if(!r)return;const[,i,o,s,a,n]=r;return gs.set({h:Cr._hue2deg(i),s:at.channel.clamp.s(parseFloat(o)),l:at.channel.clamp.l(parseFloat(s)),a:a?at.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:o}=e;return o<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${o})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},Ei={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Ei.colors[e];if(t)return Xr.parse(t)},stringify:e=>{const t=Xr.stringify(e);for(const r in Ei.colors)if(Ei.colors[r]===t)return r}},wi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(wi.re);if(!r)return;const[,i,o,s,a,n,l,c,h]=r;return gs.set({r:at.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:at.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(o)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},Ee={format:{keyword:Ei,hex:Xr,rgb:wi,rgba:wi,hsl:Cr,hsla:Cr},parse:e=>{if(typeof e!="string")return e;const t=Xr.parse(e)||wi.parse(e)||Cr.parse(e)||Ei.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Gt.HSL)||e.data.r===void 0?Cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?wi.stringify(e):Xr.stringify(e)},Bc=(e,t)=>{const r=Ee.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return Ee.stringify(r)},or=(e,t,r=0,i=1)=>{if(typeof e!="number")return Bc(e,{a:t});const o=gs.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return Ee.stringify(o)},_y=e=>{const{r:t,g:r,b:i}=Ee.parse(e),o=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(o)},By=e=>_y(e)>=.5,ke=e=>!By(e),vc=(e,t,r)=>{const i=Ee.parse(e),o=i[t],s=at.channel.clamp[t](o+r);return o!==s&&(i[t]=s),Ee.stringify(i)},O=(e,t)=>vc(e,"l",t),I=(e,t)=>vc(e,"l",-t),x=(e,t)=>{const r=Ee.parse(e),i={};for(const o in t)t[o]&&(i[o]=r[o]+t[o]);return Bc(e,i)},vy=(e,t,r=50)=>{const{r:i,g:o,b:s,a}=Ee.parse(e),{r:n,g:l,b:c,a:h}=Ee.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,C=i*m+n*y,b=o*m+l*y,k=s*m+c*y,T=a*d+h*(1-d);return or(C,b,k,T)},B=(e,t=100)=>{const r=Ee.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,vy(r,e,t)};/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */function Hl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Ly(e){if(Array.isArray(e))return e}function Fy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,n=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(i=s.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,o=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return n}}function Ay(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ey(e,t){return Ly(e)||Fy(e,t)||My(e,t)||Ay()}function My(e,t){if(e){if(typeof e=="string")return Hl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hl(e,t):void 0}}const Lc=Object.entries,Yl=Object.setPrototypeOf,$y=Object.isFrozen,Oy=Object.getPrototypeOf,Iy=Object.getOwnPropertyDescriptor;let Ut=Object.freeze,jt=Object.seal,zr=Object.create,Fc=typeof Reflect<"u"&&Reflect,ya=Fc.apply,Ca=Fc.construct;Ut||(Ut=function(t){return t});jt||(jt=function(t){return t});ya||(ya=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];return t.apply(r,o)});Ca||(Ca=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return new t(...i)});const ui=Ot(Array.prototype.forEach),Dy=Ot(Array.prototype.lastIndexOf),Ul=Ot(Array.prototype.pop),Rr=Ot(Array.prototype.push),Py=Ot(Array.prototype.splice),er=Array.isArray,Ti=Ot(String.prototype.toLowerCase),Ks=Ot(String.prototype.toString),jl=Ot(String.prototype.match),fi=Ot(String.prototype.replace),Gl=Ot(String.prototype.indexOf),Ry=Ot(String.prototype.trim),Ny=Ot(Number.prototype.toString),qy=Ot(Boolean.prototype.toString),Xl=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),Vl=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),Nt=Ot(Object.prototype.hasOwnProperty),pi=Ot(Object.prototype.toString),zt=Ot(RegExp.prototype.test),fr=Wy(TypeError);function Ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return ya(e,t,i)}}function Wy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Ca(e,r)}}function mt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ti;if(Yl&&Yl(e,null),!er(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=r(o);s!==o&&($y(t)||(t[i]=s),o=s)}e[o]=!0}return e}function zy(e){for(let t=0;t<e.length;t++)Nt(e,t)||(e[t]=null);return e}function Qt(e){const t=zr(null);for(const i of Lc(e)){var r=Ey(i,2);const o=r[0],s=r[1];Nt(e,o)&&(er(s)?t[o]=zy(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=Qt(s):t[o]=s)}return t}function Hy(e){switch(typeof e){case"string":return e;case"number":return Ny(e);case"boolean":return qy(e);case"bigint":return Xl?Xl(e):"0";case"symbol":return Vl?Vl(e):"Symbol()";case"undefined":return pi(e);case"function":case"object":{if(e===null)return pi(e);const t=e,r=Be(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:pi(i)}return pi(e)}default:return pi(e)}}function Be(e,t){for(;e!==null;){const i=Iy(e,t);if(i){if(i.get)return Ot(i.get);if(typeof i.value=="function")return Ot(i.value)}e=Oy(e)}function r(){return null}return r}function Yy(e){try{return zt(e,""),!0}catch{return!1}}const Zl=Ut(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Qs=Ut(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Js=Ut(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Uy=Ut(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ta=Ut(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),jy=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Kl=Ut(["#text"]),Ql=Ut(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),ea=Ut(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Jl=Ut(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),uo=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Gy=jt(/{{[\w\W]*|^[\w\W]*}}/g),Xy=jt(/<%[\w\W]*|^[\w\W]*%>/g),Vy=jt(/\${[\w\W]*/g),Zy=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ky=jt(/^aria-[\-\w]+$/),th=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Qy=jt(/^(?:\w+script|data):/i),Jy=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),t0=jt(/^html$/i),e0=jt(/^[a-z][.\w]*(-[.\w]+)+$/i),eh=jt(/<[/\w!]/g),r0=jt(/<[/\w]/g),i0=jt(/<\/no(script|embed|frames)/i),o0=jt(/\/>/i),_e={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},s0=function(){return typeof window>"u"?null:window},a0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(i=r.getAttribute(o));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},rh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Qe=function(t,r,i,o){return Nt(t,r)&&er(t[r])?mt(o.base?Qt(o.base):{},t[r],o.transform):i};function Ac(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s0();const t=j=>Ac(j);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==_e.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,o=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,f=n.prototype,u=Be(f,"cloneNode"),g=Be(f,"remove"),m=Be(f,"nextSibling"),y=Be(f,"childNodes"),C=Be(f,"parentNode"),b=Be(f,"shadowRoot"),k=Be(f,"attributes"),T=a&&a.prototype?Be(a.prototype,"nodeType"):null,S=a&&a.prototype?Be(a.prototype,"nodeName"):null;if(typeof s=="function"){const j=r.createElement("template");j.content&&j.content.ownerDocument&&(r=j.content.ownerDocument)}let _,L="",v,N=!1,R=0;const P=function(){if(R>0)throw fr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(w){P(),R++;try{return _.createHTML(w)}finally{R--}},W=function(w){P(),R++;try{return _.createScriptURL(w)}finally{R--}},$=function(){return N||(v=a0(d,o),N=!0),v},A=r,F=A.implementation,D=A.createNodeIterator,M=A.createDocumentFragment,H=A.getElementsByTagName,Y=i.importNode;let G=rh();t.isSupported=typeof Lc=="function"&&typeof C=="function"&&F&&F.createHTMLDocument!==void 0;const lt=Gy,ht=Xy,dt=Vy,bt=Zy,et=Ky,ft=Qy,kt=Jy,Bt=e0;let St=th,ut=null;const de=mt({},[...Zl,...Qs,...Js,...ta,...Kl]);let Tt=null;const Mr=mt({},[...Ql,...ea,...Jl,...uo]);let Lt=Object.seal(zr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),li=null,bl=null;const Ve=Object.seal(zr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let kl=!0,Os=!0,wl=!1,Tl=!0,Ze=!1,hi=!0,dr=!1,Is=!1,Ds=null,Ps=null,Rs=!1,$r=!1,oo=!1,so=!1,Sl=!0,_l=!1;const Bl="user-content-";let Ns=!0,qs=!1,Or={},Te=null;const Ws=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let vl=null;const Ll=mt({},["audio","video","img","source","image","track"]);let zs=null;const Fl=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ao="http://www.w3.org/1998/Math/MathML",no="http://www.w3.org/2000/svg",Se="http://www.w3.org/1999/xhtml";let Ir=Se,Hs=!1,Ys=null;const Jm=mt({},[ao,no,Se],Ks),Al=Ut(["mi","mo","mn","ms","mtext"]);let Us=mt({},Al);const El=Ut(["annotation-xml"]);let js=mt({},El);const ty=mt({},["title","style","font","a","script"]);let ci=null;const ey=["application/xhtml+xml","text/html"],ry="text/html";let Ft=null,Dr=null;const iy=r.createElement("form"),Ml=function(w){return w instanceof RegExp||w instanceof Function},Gs=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Dr&&Dr===w)return;(!w||typeof w!="object")&&(w={}),w=Qt(w),ci=ey.indexOf(w.PARSER_MEDIA_TYPE)===-1?ry:w.PARSER_MEDIA_TYPE,Ft=ci==="application/xhtml+xml"?Ks:Ti,ut=Qe(w,"ALLOWED_TAGS",de,{transform:Ft}),Tt=Qe(w,"ALLOWED_ATTR",Mr,{transform:Ft}),Ys=Qe(w,"ALLOWED_NAMESPACES",Jm,{transform:Ks}),zs=Qe(w,"ADD_URI_SAFE_ATTR",Fl,{transform:Ft,base:Fl}),vl=Qe(w,"ADD_DATA_URI_TAGS",Ll,{transform:Ft,base:Ll}),Te=Qe(w,"FORBID_CONTENTS",Ws,{transform:Ft}),li=Qe(w,"FORBID_TAGS",Qt({}),{transform:Ft}),bl=Qe(w,"FORBID_ATTR",Qt({}),{transform:Ft}),Or=Nt(w,"USE_PROFILES")?w.USE_PROFILES&&typeof w.USE_PROFILES=="object"?Qt(w.USE_PROFILES):w.USE_PROFILES:!1,kl=w.ALLOW_ARIA_ATTR!==!1,Os=w.ALLOW_DATA_ATTR!==!1,wl=w.ALLOW_UNKNOWN_PROTOCOLS||!1,Tl=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ze=w.SAFE_FOR_TEMPLATES||!1,hi=w.SAFE_FOR_XML!==!1,dr=w.WHOLE_DOCUMENT||!1,$r=w.RETURN_DOM||!1,oo=w.RETURN_DOM_FRAGMENT||!1,so=w.RETURN_TRUSTED_TYPE||!1,Rs=w.FORCE_BODY||!1,Sl=w.SANITIZE_DOM!==!1,_l=w.SANITIZE_NAMED_PROPS||!1,Ns=w.KEEP_CONTENT!==!1,qs=w.IN_PLACE||!1,St=Yy(w.ALLOWED_URI_REGEXP)?w.ALLOWED_URI_REGEXP:th,Ir=typeof w.NAMESPACE=="string"?w.NAMESPACE:Se,Us=Nt(w,"MATHML_TEXT_INTEGRATION_POINTS")&&w.MATHML_TEXT_INTEGRATION_POINTS&&typeof w.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qt(w.MATHML_TEXT_INTEGRATION_POINTS):mt({},Al),js=Nt(w,"HTML_INTEGRATION_POINTS")&&w.HTML_INTEGRATION_POINTS&&typeof w.HTML_INTEGRATION_POINTS=="object"?Qt(w.HTML_INTEGRATION_POINTS):mt({},El);const E=Nt(w,"CUSTOM_ELEMENT_HANDLING")&&w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING=="object"?Qt(w.CUSTOM_ELEMENT_HANDLING):zr(null);if(Lt=zr(null),Nt(E,"tagNameCheck")&&Ml(E.tagNameCheck)&&(Lt.tagNameCheck=E.tagNameCheck),Nt(E,"attributeNameCheck")&&Ml(E.attributeNameCheck)&&(Lt.attributeNameCheck=E.attributeNameCheck),Nt(E,"allowCustomizedBuiltInElements")&&typeof E.allowCustomizedBuiltInElements=="boolean"&&(Lt.allowCustomizedBuiltInElements=E.allowCustomizedBuiltInElements),jt(Lt),Ze&&(Os=!1),oo&&($r=!0),Or&&(ut=mt({},Kl),Tt=zr(null),Or.html===!0&&(mt(ut,Zl),mt(Tt,Ql)),Or.svg===!0&&(mt(ut,Qs),mt(Tt,ea),mt(Tt,uo)),Or.svgFilters===!0&&(mt(ut,Js),mt(Tt,ea),mt(Tt,uo)),Or.mathMl===!0&&(mt(ut,ta),mt(Tt,Jl),mt(Tt,uo))),Ve.tagCheck=null,Ve.attributeCheck=null,Nt(w,"ADD_TAGS")&&(typeof w.ADD_TAGS=="function"?Ve.tagCheck=w.ADD_TAGS:er(w.ADD_TAGS)&&(ut===de&&(ut=Qt(ut)),mt(ut,w.ADD_TAGS,Ft))),Nt(w,"ADD_ATTR")&&(typeof w.ADD_ATTR=="function"?Ve.attributeCheck=w.ADD_ATTR:er(w.ADD_ATTR)&&(Tt===Mr&&(Tt=Qt(Tt)),mt(Tt,w.ADD_ATTR,Ft))),Nt(w,"ADD_URI_SAFE_ATTR")&&er(w.ADD_URI_SAFE_ATTR)&&mt(zs,w.ADD_URI_SAFE_ATTR,Ft),Nt(w,"FORBID_CONTENTS")&&er(w.FORBID_CONTENTS)&&(Te===Ws&&(Te=Qt(Te)),mt(Te,w.FORBID_CONTENTS,Ft)),Nt(w,"ADD_FORBID_CONTENTS")&&er(w.ADD_FORBID_CONTENTS)&&(Te===Ws&&(Te=Qt(Te)),mt(Te,w.ADD_FORBID_CONTENTS,Ft)),Ns&&(ut["#text"]=!0),dr&&mt(ut,["html","head","body"]),ut.table&&(mt(ut,["tbody"]),delete li.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw fr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const U=_;_=w.TRUSTED_TYPES_POLICY;try{L=z("")}catch(J){throw _=U,J}}else w.TRUSTED_TYPES_POLICY===null?(_=void 0,L=""):(_===void 0&&(_=$()),_&&typeof L=="string"&&(L=z("")));Ut&&Ut(w),Dr=w},$l=mt({},[...Qs,...Js,...Uy]),Ol=mt({},[...ta,...jy]),oy=function(w,E,U){return E.namespaceURI===Se?w==="svg":E.namespaceURI===ao?w==="svg"&&(U==="annotation-xml"||Us[U]):!!$l[w]},sy=function(w,E,U){return E.namespaceURI===Se?w==="math":E.namespaceURI===no?w==="math"&&js[U]:!!Ol[w]},ay=function(w,E,U){return E.namespaceURI===no&&!js[U]||E.namespaceURI===ao&&!Us[U]?!1:!Ol[w]&&(ty[w]||!$l[w])},ny=function(w){let E=C(w);(!E||!E.tagName)&&(E={namespaceURI:Ir,tagName:"template"});const U=Ti(w.tagName),J=Ti(E.tagName);return Ys[w.namespaceURI]?w.namespaceURI===no?oy(U,E,J):w.namespaceURI===ao?sy(U,E,J):w.namespaceURI===Se?ay(U,E,J):!!(ci==="application/xhtml+xml"&&Ys[w.namespaceURI]):!1},Ke=function(w){Rr(t.removed,{element:w});try{C(w).removeChild(w)}catch{if(g(w),!C(w))throw fr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Il=function(w){const E=y(w);if(E){const J=[];ui(E,pt=>{Rr(J,pt)}),ui(J,pt=>{try{g(pt)}catch{}})}const U=k(w);if(U)for(let J=U.length-1;J>=0;--J){const pt=U[J],yt=pt&&pt.name;if(typeof yt=="string")try{w.removeAttribute(yt)}catch{}}},ur=function(w,E){try{Rr(t.removed,{attribute:E.getAttributeNode(w),from:E})}catch{Rr(t.removed,{attribute:null,from:E})}if(E.removeAttribute(w),w==="is")if($r||oo)try{Ke(E)}catch{}else try{E.setAttribute(w,"")}catch{}},ly=function(w){const E=k(w);if(E)for(let U=E.length-1;U>=0;--U){const J=E[U],pt=J&&J.name;if(!(typeof pt!="string"||Tt[Ft(pt)]))try{w.removeAttribute(pt)}catch{}}},hy=function(w){const E=[w];for(;E.length>0;){const U=E.pop();(T?T(U):U.nodeType)===_e.element&&ly(U);const pt=y(U);if(pt)for(let yt=pt.length-1;yt>=0;--yt)E.push(pt[yt])}},Dl=function(w){let E=null,U=null;if(Rs)w="<remove></remove>"+w;else{const yt=jl(w,/^[\r\n\t ]+/);U=yt&&yt[0]}ci==="application/xhtml+xml"&&Ir===Se&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const J=_?z(w):w;if(Ir===Se)try{E=new h().parseFromString(J,ci)}catch{}if(!E||!E.documentElement){E=F.createDocument(Ir,"template",null);try{E.documentElement.innerHTML=Hs?L:J}catch{}}const pt=E.body||E.documentElement;return w&&U&&pt.insertBefore(r.createTextNode(U),pt.childNodes[0]||null),Ir===Se?H.call(E,dr?"html":"body")[0]:dr?E.documentElement:pt},Pl=function(w){return D.call(w.ownerDocument||w,w,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},lo=function(w){return w=fi(w,lt," "),w=fi(w,ht," "),w=fi(w,dt," "),w},Xs=function(w){var E;w.normalize();const U=D.call(w.ownerDocument||w,w,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let J=U.nextNode();for(;J;)J.data=lo(J.data),J=U.nextNode();const pt=(E=w.querySelectorAll)===null||E===void 0?void 0:E.call(w,"template");pt&&ui(pt,yt=>{Pr(yt.content)&&Xs(yt.content)})},ho=function(w){const E=S?S(w):null;return typeof E!="string"||Ft(E)!=="form"?!1:typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||w.attributes!==k(w)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function"||w.nodeType!==T(w)||w.childNodes!==y(w)},Pr=function(w){if(!T||typeof w!="object"||w===null)return!1;try{return T(w)===_e.documentFragment}catch{return!1}},di=function(w){if(!T||typeof w!="object"||w===null)return!1;try{return typeof T(w)=="number"}catch{return!1}};function Re(j,w,E){j.length!==0&&ui(j,U=>{U.call(t,w,E,Dr)})}const cy=function(w,E){return!!(hi&&w.hasChildNodes()&&!di(w.firstElementChild)&&zt(eh,w.textContent)&&zt(eh,w.innerHTML)||hi&&w.namespaceURI===Se&&E==="style"&&di(w.firstElementChild)||w.nodeType===_e.processingInstruction||hi&&w.nodeType===_e.comment&&zt(r0,w.data))},dy=function(w,E){if(!li[E]&&ql(E)&&(Lt.tagNameCheck instanceof RegExp&&zt(Lt.tagNameCheck,E)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(E)))return!1;if(Ns&&!Te[E]){const U=C(w),J=y(w);if(J&&U){const pt=J.length;for(let yt=pt-1;yt>=0;--yt){const Rt=qs?J[yt]:u(J[yt],!0);U.insertBefore(Rt,m(w))}}}return Ke(w),!0},Rl=function(w){if(Re(G.beforeSanitizeElements,w,null),ho(w))return Ke(w),!0;const E=Ft(S?S(w):w.nodeName);if(Re(G.uponSanitizeElement,w,{tagName:E,allowedTags:ut}),cy(w,E))return Ke(w),!0;if(li[E]||!(Ve.tagCheck instanceof Function&&Ve.tagCheck(E))&&!ut[E])return dy(w,E);if((T?T(w):w.nodeType)===_e.element&&!ny(w)||(E==="noscript"||E==="noembed"||E==="noframes")&&zt(i0,w.innerHTML))return Ke(w),!0;if(Ze&&w.nodeType===_e.text){const J=lo(w.textContent);w.textContent!==J&&(Rr(t.removed,{element:w.cloneNode()}),w.textContent=J)}return Re(G.afterSanitizeElements,w,null),!1},Nl=function(w,E,U){if(bl[E]||Sl&&(E==="id"||E==="name")&&(U in r||U in iy))return!1;const J=Tt[E]||Ve.attributeCheck instanceof Function&&Ve.attributeCheck(E,w);if(!(Os&&zt(bt,E))){if(!(kl&&zt(et,E))){if(J){if(!zs[E]){if(!zt(St,fi(U,kt,""))){if(!((E==="src"||E==="xlink:href"||E==="href")&&w!=="script"&&Gl(U,"data:")===0&&vl[w])){if(!(wl&&!zt(ft,fi(U,kt,"")))){if(U)return!1}}}}}else if(!(ql(w)&&(Lt.tagNameCheck instanceof RegExp&&zt(Lt.tagNameCheck,w)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(w))&&(Lt.attributeNameCheck instanceof RegExp&&zt(Lt.attributeNameCheck,E)||Lt.attributeNameCheck instanceof Function&&Lt.attributeNameCheck(E,w))||E==="is"&&Lt.allowCustomizedBuiltInElements&&(Lt.tagNameCheck instanceof RegExp&&zt(Lt.tagNameCheck,U)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(U))))return!1}}return!0},uy=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ql=function(w){return!uy[Ti(w)]&&zt(Bt,w)},fy=function(w,E,U,J){if(_&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!U)switch(d.getAttributeType(w,E)){case"TrustedHTML":return z(J);case"TrustedScriptURL":return W(J)}return J},py=function(w,E,U,J){try{U?w.setAttributeNS(U,E,J):w.setAttribute(E,J),ho(w)?Ke(w):Ul(t.removed)}catch{ur(E,w)}},Wl=function(w){Re(G.beforeSanitizeAttributes,w,null);const E=w.attributes;if(!E||ho(w))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Tt,forceKeepAttr:void 0};let J=E.length;const pt=Ft(w.nodeName);for(;J--;){const yt=E[J],Rt=yt.name,Mt=yt.namespaceURI,le=yt.value,ue=Ft(Rt),Zs=le;let Kt=Rt==="value"?Zs:Ry(Zs);if(U.attrName=ue,U.attrValue=Kt,U.keepAttr=!0,U.forceKeepAttr=void 0,Re(G.uponSanitizeAttribute,w,U),Kt=U.attrValue,_l&&(ue==="id"||ue==="name")&&Gl(Kt,Bl)!==0&&(ur(Rt,w),Kt=Bl+Kt),hi&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Kt)){ur(Rt,w);continue}if(ue==="attributename"&&jl(Kt,"href")){ur(Rt,w);continue}if(!U.forceKeepAttr){if(!U.keepAttr){ur(Rt,w);continue}if(!Tl&&zt(o0,Kt)){ur(Rt,w);continue}if(Ze&&(Kt=lo(Kt)),!Nl(pt,ue,Kt)){ur(Rt,w);continue}Kt=fy(pt,ue,Mt,Kt),Kt!==Zs&&py(w,Rt,Mt,Kt)}}Re(G.afterSanitizeAttributes,w,null)},co=function(w){let E=null;const U=Pl(w);for(Re(G.beforeSanitizeShadowDOM,w,null);E=U.nextNode();)if(Re(G.uponSanitizeShadowNode,E,null),Rl(E),Wl(E),Pr(E.content)&&co(E.content),(T?T(E):E.nodeType)===_e.element){const pt=b(E);Pr(pt)&&(Vs(pt),co(pt))}Re(G.afterSanitizeShadowDOM,w,null)},Vs=function(w){const E=[{node:w,shadow:null}];for(;E.length>0;){const U=E.pop();if(U.shadow){co(U.shadow);continue}const J=U.node,yt=(T?T(J):J.nodeType)===_e.element,Rt=y(J);if(Rt)for(let Mt=Rt.length-1;Mt>=0;--Mt)E.push({node:Rt[Mt],shadow:null});if(yt){const Mt=S?S(J):null;if(typeof Mt=="string"&&Ft(Mt)==="template"){const le=J.content;Pr(le)&&E.push({node:le,shadow:null})}}if(yt){const Mt=b(J);Pr(Mt)&&E.push({node:null,shadow:Mt},{node:Mt,shadow:null})}}};return t.sanitize=function(j){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,U=null,J=null,pt=null;if(Hs=!j,Hs&&(j="<!-->"),typeof j!="string"&&!di(j)&&(j=Hy(j),typeof j!="string"))throw fr("dirty is not a string, aborting");if(!t.isSupported)return j;Is?(ut=Ds,Tt=Ps):Gs(w),(G.uponSanitizeElement.length>0||G.uponSanitizeAttribute.length>0)&&(ut=Qt(ut)),G.uponSanitizeAttribute.length>0&&(Tt=Qt(Tt)),t.removed=[];const yt=qs&&typeof j!="string"&&di(j);if(yt){const le=S?S(j):j.nodeName;if(typeof le=="string"){const ue=Ft(le);if(!ut[ue]||li[ue])throw fr("root node is forbidden and cannot be sanitized in-place")}if(ho(j))throw fr("root node is clobbered and cannot be sanitized in-place");try{Vs(j)}catch(ue){throw Il(j),ue}}else if(di(j))E=Dl("<!---->"),U=E.ownerDocument.importNode(j,!0),U.nodeType===_e.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?E=U:E.appendChild(U),Vs(U);else{if(!$r&&!Ze&&!dr&&j.indexOf("<")===-1)return _&&so?z(j):j;if(E=Dl(j),!E)return $r?null:so?L:""}E&&Rs&&Ke(E.firstChild);const Rt=Pl(yt?j:E);try{for(;J=Rt.nextNode();)Rl(J),Wl(J),Pr(J.content)&&co(J.content)}catch(le){throw yt&&Il(j),le}if(yt)return ui(t.removed,le=>{le.element&&hy(le.element)}),Ze&&Xs(j),j;if($r){if(Ze&&Xs(E),oo)for(pt=M.call(E.ownerDocument);E.firstChild;)pt.appendChild(E.firstChild);else pt=E;return(Tt.shadowroot||Tt.shadowrootmode)&&(pt=Y.call(i,pt,!0)),pt}let Mt=dr?E.outerHTML:E.innerHTML;return dr&&ut["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&zt(t0,E.ownerDocument.doctype.name)&&(Mt="<!DOCTYPE "+E.ownerDocument.doctype.name+`> `+Mt),Ze&&(Mt=lo(Mt)),_&&so?z(Mt):Mt},t.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Gs(j),Is=!0,Ds=ut,Ps=Tt},t.clearConfig=function(){Dr=null,Is=!1,Ds=null,Ps=null,_=v,L=""},t.isValidAttribute=function(j,w,E){Dr||Gs({});const U=Ft(j),J=Ft(w);return Nl(U,J,E)},t.addHook=function(j,w){typeof w=="function"&&Nt(G,j)&&Rr(G[j],w)},t.removeHook=function(j,w){if(Nt(G,j)){if(w!==void 0){const E=Dy(G[j],w);return E===-1?void 0:Py(G[j],E,1)[0]}return Ul(G[j])}},t.removeHooks=function(j){Nt(G,j)&&(G[j]=[])},t.removeAllHooks=function(){G=rh()},t}var Kr=Ac(),xa=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>xa(e,s,o)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=xa(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Dt=xa,$e="#ffffff",Oe="#f2f2f2",st=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),n0=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||I(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||I(this.mainBkg,10)):(this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},l0=p(e=>{const t=new n0;return t.calculate(e),t},"getThemeVariables"),h0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=or(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=I("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=I(this.sectionBkgColor,10),this.taskBorderColor=or(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=or(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||O(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||I(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=O(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=O(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=O(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=B(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||B(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||O(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??O(this["cScale"+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=O(this.secondaryColor,20),this.git1=O(this.pie2||this.secondaryColor,20),this.git2=O(this.pie3||this.tertiaryColor,20),this.git3=O(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=O(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=O(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=O(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=O(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||O("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||O("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||O("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||O("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||O(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||O(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||O(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},c0=p(e=>{const t=new h0;return t.calculate(e),t},"getThemeVariables"),d0=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=or(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||I(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||I(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=I(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||I(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||x(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||B(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||B(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||O(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||O(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||I(B(this.git0),25),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(Object.keys(this).forEach(r=>{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},u0=p(e=>{const t=new d0;return t.calculate(e),t},"getThemeVariables"),f0=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=O("#cde498",10),this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.primaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=I(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||I(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||I(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=I(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||I(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||x(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},p0=p(e=>{const t=new f0;return t.calculate(e),t},"getThemeVariables"),g0=class{static{p(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=O(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=O(this.contrast,55),this.border2=this.contrast,this.actorBorder=O(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||B(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||O(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||I(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=O(this.contrast,30),this.sectionBkgColor2=O(this.contrast,30),this.taskBorderColor=I(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=O(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=I(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??this["cScale"+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=I(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},m0=p(e=>{const t=new g0;return t.calculate(e),t},"getThemeVariables"),y0=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||x(e,{h:30}),this.cScale4=this.cScale4||x(e,{h:60}),this.cScale5=this.cScale5||x(e,{h:90}),this.cScale6=this.cScale6||x(e,{h:120}),this.cScale7=this.cScale7||x(e,{h:150}),this.cScale8=this.cScale8||x(e,{h:210,l:150}),this.cScale9=this.cScale9||x(e,{h:270}),this.cScale10=this.cScale10||x(e,{h:300}),this.cScale11=this.cScale11||x(e,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=I(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=I(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||B(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||I(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||x(e,{h:64}),this.fillType3=this.fillType3||x(t,{h:64}),this.fillType4=this.fillType4||x(e,{h:-64}),this.fillType5=this.fillType5||x(t,{h:-64}),this.fillType6=this.fillType6||x(e,{h:128}),this.fillType7=this.fillType7||x(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||x(e,{l:-10}),this.pie5=this.pie5||x(t,{l:-10}),this.pie6=this.pie6||x(r,{l:-10}),this.pie7=this.pie7||x(e,{h:60,l:-10}),this.pie8=this.pie8||x(e,{h:-60,l:-10}),this.pie9=this.pie9||x(e,{h:120,l:0}),this.pie10=this.pie10||x(e,{h:60,l:-20}),this.pie11=this.pie11||x(e,{h:-60,l:-20}),this.pie12=this.pie12||x(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||x(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||x(e,{h:-30}),this.git4=this.git4||x(e,{h:-60}),this.git5=this.git5||x(e,{h:-90}),this.git6=this.git6||x(e,{h:60}),this.git7=this.git7||x(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},C0=p(e=>{const t=new y0;return t.calculate(e),t},"getThemeVariables"),x0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.border1="#ccc",this.border2=or(255,255,255,.25),this.arrowheadColor=B(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},b0=p(e=>{const t=new x0;return t.calculate(e),t},"getThemeVariables"),k0=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=st("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=I(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=I(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||B(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||I(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||x(e,{h:64}),this.fillType3=this.fillType3||x(t,{h:64}),this.fillType4=this.fillType4||x(e,{h:-64}),this.fillType5=this.fillType5||x(t,{h:-64}),this.fillType6=this.fillType6||x(e,{h:128}),this.fillType7=this.fillType7||x(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||x(e,{l:-10}),this.pie5=this.pie5||x(t,{l:-10}),this.pie6=this.pie6||x(r,{l:-10}),this.pie7=this.pie7||x(e,{h:60,l:-10}),this.pie8=this.pie8||x(e,{h:-60,l:-10}),this.pie9=this.pie9||x(e,{h:120,l:0}),this.pie10=this.pie10||x(e,{h:60,l:-20}),this.pie11=this.pie11||x(e,{h:-60,l:-20}),this.pie12=this.pie12||x(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||x(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||x(e,{h:-30}),this.git4=this.git4||x(e,{h:-60}),this.git5=this.git5||x(e,{h:-90}),this.git6=this.git6||x(e,{h:60}),this.git7=this.git7||x(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},w0=p(e=>{const t=new k0;return t.calculate(e),t},"getThemeVariables"),T0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.border1="#ccc",this.border2=or(255,255,255,.25),this.arrowheadColor=B(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},S0=p(e=>{const t=new T0;return t.calculate(e),t},"getThemeVariables"),_0=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||B(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||I(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||x(e,{h:64}),this.fillType3=this.fillType3||x(t,{h:64}),this.fillType4=this.fillType4||x(e,{h:-64}),this.fillType5=this.fillType5||x(t,{h:-64}),this.fillType6=this.fillType6||x(e,{h:128}),this.fillType7=this.fillType7||x(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||x(e,{l:-10}),this.pie5=this.pie5||x(t,{l:-10}),this.pie6=this.pie6||x(r,{l:-10}),this.pie7=this.pie7||x(e,{h:60,l:-10}),this.pie8=this.pie8||x(e,{h:-60,l:-10}),this.pie9=this.pie9||x(e,{h:120,l:0}),this.pie10=this.pie10||x(e,{h:60,l:-20}),this.pie11=this.pie11||x(e,{h:-60,l:-20}),this.pie12=this.pie12||x(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||x(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||x(e,{h:-30}),this.git4=this.git4||x(e,{h:-60}),this.git5=this.git5||x(e,{h:-90}),this.git6=this.git6||x(e,{h:60}),this.git7=this.git7||x(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},B0=p(e=>{const t=new _0;return t.calculate(e),t},"getThemeVariables"),v0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.border1="#ccc",this.border2=or(255,255,255,.25),this.arrowheadColor=B(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=I(this["cScale"+t],75);const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},L0=p(e=>{const t=new v0;return t.calculate(e),t},"getThemeVariables"),He={base:{getThemeVariables:l0},dark:{getThemeVariables:c0},default:{getThemeVariables:u0},forest:{getThemeVariables:p0},neutral:{getThemeVariables:m0},neo:{getThemeVariables:C0},"neo-dark":{getThemeVariables:b0},redux:{getThemeVariables:w0},"redux-dark":{getThemeVariables:S0},"redux-color":{getThemeVariables:B0},"redux-dark-color":{getThemeVariables:L0}},Wt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Ec={...Wt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:He.default.getThemeVariables(),sequence:{...Wt.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Wt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Wt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Wt.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Wt.pie,useWidth:984},xyChart:{...Wt.xyChart,useWidth:void 0},requirement:{...Wt.requirement,useWidth:void 0},packet:{...Wt.packet},eventmodeling:{...Wt.eventmodeling},treeView:{...Wt.treeView,useWidth:void 0},radar:{...Wt.radar},railroad:{...Wt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Wt.ishikawa},sankey:{...Wt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Wt.venn},cynefin:{...Wt.cynefin}},Mc=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Mc(e[i],"")]:[...r,t+i],[]),"keyify"),F0=new Set(Mc(Ec,"")),$c=Ec,A0={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},E0=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(q.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Ro=p(e=>{if(q.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ro(t));return}for(const t of Object.keys(e)){if(q.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!F0.has(t)||e[t]==null){q.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=A0[t];i?E0(e[t],i):(q.debug("sanitizing object",t),Ro(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(q.debug("sanitizing css option",t),e[t]=Oc(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}q.debug("After sanitization",e)}},"sanitizeDirective"),Oc=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Qr=Object.freeze($c),Ie=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ie=Dt({},Qr),No,Tr=[],Mi=Dt({},Qr),ms=p((e,t)=>{let r=Dt({},e),i={};for(const o of t)Pc(o),i=Dt(i,o);if(r=Dt(r,i),i.theme&&i.theme in He){const o=Dt({},No),s=Dt(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in He&&(r.themeVariables=He[r.theme].getThemeVariables(s))}return Mi=r,Nc(Mi),Mi},"updateCurrentConfig"),M0=p(e=>(ie=Dt({},Qr),ie=Dt(ie,e),e.theme&&He[e.theme]&&(ie.themeVariables=He[e.theme].getThemeVariables(e.themeVariables)),ms(ie,Tr),ie),"setSiteConfig"),$0=p(e=>{No=Dt({},e)},"saveConfigFromInitialize"),O0=p(e=>(ie=Dt(ie,e),ms(ie,Tr),ie),"updateSiteConfig"),Ic=p(()=>Dt({},ie),"getSiteConfig"),Dc=p(e=>(Nc(e),Dt(Mi,e),vt()),"setConfig"),vt=p(()=>Dt({},Mi),"getConfig"),Pc=p(e=>{e&&(["secure",...ie.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(q.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Pc(e[t])}))},"sanitize"),I0=p(e=>{Ro(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Tr.push(e),ms(ie,Tr)},"addDirective"),qo=p((e=ie)=>{Tr=[],ms(e,Tr)},"reset"),D0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},ih={},Rc=p(e=>{ih[e]||(q.warn(D0[e]),ih[e]=!0)},"issueWarning"),Nc=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Rc("LAZY_LOAD_DEPRECATED")},"checkConfig"),kL=p(()=>{let e={};No&&(e=Dt(e,No));for(const t of Tr)e=Dt(e,t);return e},"getUserDefinedConfig"),ee=p(e=>(e.flowchart?.htmlLabels!=null&&Rc("FLOWCHART_HTML_LABELS_DEPRECATED"),Ie(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),qc=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,$i=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,P0=/\s*%%.*\n/gm,Wc=class extends Error{static{p(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},Sr={},xn=p(function(e,t){e=e.replace(qc,"").replace($i,"").replace(P0,` `);for(const[r,{detector:i}]of Object.entries(Sr))if(i(e,t))return r;throw new Wc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ba=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)zc(t,r,i)},"registerLazyLoadedDiagrams"),zc=p((e,t,r)=>{Sr[e]&&q.warn(`Detector with key ${e} already exists. Overwriting.`),Sr[e]={detector:t,loader:r},q.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),R0=p(e=>Sr[e].loader,"getDiagramLoader"),Vi=/<br\s*\/?>/gi,N0=p(e=>e?Uc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),q0=(()=>{let e=!1;return()=>{e||(Hc(),e=!0)}})();function Hc(){const e="data-temp-href-target";Kr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Kr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Hc,"setupDompurifyHooks");var Yc=p(e=>(q0(),Kr.sanitize(e)),"removeScript"),oh=p((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Yc(e):r!=="loose"&&(e=Uc(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Y0(e))}return e},"sanitizeMore"),be=p((e,t)=>e&&(t.dompurifyConfig?e=Kr.sanitize(oh(e,t),t.dompurifyConfig).toString():e=Kr.sanitize(oh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),W0=p((e,t)=>typeof e=="string"?be(e,t):e.flat().map(r=>be(r,t)),"sanitizeTextOrArray"),z0=p(e=>Vi.test(e),"hasBreaks"),H0=p(e=>e.split(Vi),"splitBreaks"),Y0=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Uc=p(e=>e.replace(Vi,"#br#"),"breakToPlaceholder"),U0=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),j0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),G0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),sh=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let o=t[i];if(o===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];X0(s,a)&&(o=s+","+a,i++,r.pop())}r.push(V0(o))}return r.join("")},"parseGenericTypes"),ka=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),X0=p((e,t)=>{const r=ka(e,"~"),i=ka(t,"~");return r===1&&i===1},"shouldCombineSets"),V0=p(e=>{const t=ka(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let o=i.indexOf("~"),s=i.lastIndexOf("~");for(;o!==-1&&s!==-1&&o!==s;)i[o]="<",i[s]=">",o=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),ah=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),wa=/\$\$(.*?)\$\$/g,Pi=p(e=>(e.match(wa)?.length??0)>0,"hasKatex"),wL=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await jc(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),Z0=p(async(e,t)=>{if(!Pi(e))return e;if(!(ah()||t.legacyMathML||t.forceLegacyMathML))return e.replace(wa,"MathML is unsupported in this environment.");{const{default:r}=await nt(async()=>{const{default:o}=await import("./katex-HP8lGamR.js");return{default:o}},[]),i=t.forceLegacyMathML||!ah()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Vi).map(o=>Pi(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(wa,(o,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),jc=p(async(e,t)=>be(await Z0(e,t),t),"renderKatexSanitized"),Zi={getRows:N0,sanitizeText:be,sanitizeTextOrArray:W0,hasBreaks:z0,splitBreaks:H0,lineBreakRegex:Vi,removeScript:Yc,getUrl:U0,evaluate:Ie,getMax:j0,getMin:G0},K0=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Q0=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Gc=p(function(e,t,r,i){const o=Q0(t,r,i);K0(e,o)},"configureSvgSize"),J0=p(function(e,t,r,i){const o=t.node().getBBox(),s=o.width,a=o.height;q.info(`SVG bounds: ${s}x${a}`,o);let n=0,l=0;q.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=a+r*2,q.info(`Calculated bounds: ${n}x${l}`),Gc(t,l,n,i);const c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Bo={};function Ta(e){return[...e.cssRules].map(t=>t.cssText).join(` @@ -300,8 +300,8 @@ Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error L0,20`)},"requirement_arrow"),LS=p((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 L20,10 M20,10 - L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),FS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),AS=p((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),ES={extension:hS,composition:cS,aggregation:dS,dependency:uS,lollipop:fS,point:pS,circle:gS,cross:mS,barb:yS,barbNeo:CS,only_one:xS,zero_or_one:bS,one_or_more:kS,zero_or_more:wS,only_one_neo:TS,zero_or_one_neo:SS,one_or_more_neo:_S,zero_or_more_neo:BS,requirement_arrow:vS,requirement_contains:FS,requirement_arrow_neo:LS,requirement_contains_neo:AS},MS=lS,$S={common:Zi,getConfig:vt,insertCluster:LT,insertEdge:nS,insertEdgeLabel:tS,insertMarkers:MS,insertNode:Hg,interpolateToCurve:Vn,labelHelper:it,log:q,positionEdgeLabel:eS},Gi={},Gg=p(e=>{for(const t of e)Gi[t.name]=t},"registerLayoutLoaders"),OS=p(()=>{Gg([{name:"dagre",loader:p(async()=>await nt(()=>import("./dagre-VKFMJZFB-D_g3ijKj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"swimlane",loader:p(async()=>await nt(()=>import("./swimlanes-5IMT3BWC-D0t01F1o.js"),__vite__mapDeps([8,5,6,1,2,3,7])),"loader")},{name:"cose-bilkent",loader:p(async()=>await nt(()=>import("./cose-bilkent-JH36ORCC-CxHxs_ia.js"),__vite__mapDeps([9,10,7,5,6])),"loader")}])},"registerDefaultLayoutLoaders");OS();var GL=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in Gi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}const i=Gi[e.layoutAlgorithm],o=await i.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),n){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return o.render(e,t,$S,{algorithm:i.algorithm},r)},"render"),XL=p((e="",{fallback:t="dagre"}={})=>{if(e in Gi)return e;if(t in Gi)return q.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),ml="comm",Xg="rule",Vg="decl",IS="@media",DS="@import",PS="@supports",RS="@namespace",un="@keyframes",Zg="@layer",NS="@scope",qS=Math.abs,Di=String.fromCharCode;function Kg(e){return e.trim()}function fn(e,t,r){return e.replace(t,r)}function Zr(e,t){return e.charCodeAt(t)|0}function ii(e,t,r){return e.slice(t,r)}function Fe(e){return e.length}function Qg(e){return e.length}function To(e,t){return t.push(e),e}var Es=1,oi=1,Jg=0,ce=0,$t=0,ni="";function yl(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:Es,column:oi,length:a,return:"",siblings:n}}function WS(){return $t}function zS(){return $t=ce>0?Zr(ni,--ce):0,oi--,$t===10&&(oi=1,Es--),$t}function xe(){return $t=ce<Jg?Zr(ni,ce++):0,oi++,$t===10&&(oi=1,Es++),$t}function ir(){return Zr(ni,ce)}function Do(){return ce}function Ms(e,t){return ii(ni,e,t)}function Xi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function HS(e){return Es=oi=1,Jg=Fe(ni=e),ce=0,[]}function YS(e){return ni="",e}function ga(e){return Kg(Ms(ce-1,pn(e===91?e+2:e===40?e+1:e)))}function US(e){for(;($t=ir())&&$t<33;)xe();return Xi(e)>2||Xi($t)>3?"":" "}function jS(e,t){for(;--t&&xe()&&!($t<48||$t>102||$t>57&&$t<65||$t>70&&$t<97););return Ms(e,Do()+(t<6&&ir()==32&&xe()==32))}function pn(e){for(;xe();)switch($t){case e:return ce;case 34:case 39:e!==34&&e!==39&&pn($t);break;case 40:e===41&&pn(e);break;case 92:xe();break}return ce}function GS(e,t){for(;xe()&&e+$t!==57;)if(e+$t===84&&ir()===47)break;return"/*"+Ms(t,ce-1)+"*"+Di(e===47?e:xe())}function XS(e){for(;!Xi(ir());)xe();return Ms(e,ce)}function VS(e){return YS(Po("",null,null,null,[""],e=HS(e),0,[0],e))}function Po(e,t,r,i,o,s,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,g=0,m=1,y=1,C=1,b=0,k=0,T="",S=o,_=s,L=i,v=T;y;)switch(g=k,k=xe()){case 40:g!=108&&Zr(v,d-1)==58?(b++,v+="("):v+=ga(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=ga(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Di(k);break}v+=US(g);break;case 92:v+=jS(Do()-1,7);continue;case 47:switch(ir()){case 42:case 47:To(ZS(GS(xe(),Do()),t,r,l),l),(Xi(g||1)==5||Xi(ir()||1)==5)&&Fe(v)&&ii(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:n[c++]=Fe(v)*C;case 125*m:case 59:case 0:if(b>0&&k){v+=Di(k);break}switch(k){case 0:case 125:y=0;case 59+h:C==-1&&(v=fn(v,/\f/g,"")),u>0&&(Fe(v)-d||m===0)&&To(u>32?bc(v+";",i,r,d-1,l):bc(fn(v," ","")+";",i,r,d-2,l),l);break;case 59:v+=";";default:if(To(L=xc(v,t,r,c,h,o,n,T,S=[],_=[],d,s),s),k===123)if(h===0)Po(v,t,L,L,S,s,d,n,_);else{switch(f){case 99:if(Zr(v,3)===110)break;case 108:if(Zr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Po(e,L,L,i&&To(xc(e,L,L,0,0,o,n,T,o,S=[],d,_),_),o,_,d,n,i?S:_):Po(v,L,L,L,[""],_,0,n,_)}}c=h=u=0,m=C=1,T=v="",d=a;break;case 58:d=1+Fe(v),u=g;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&zS()==125)continue}switch(v+=Di(k),k*m){case 38:C=h>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Fe(v)-1)*C,C=1;break;case 64:ir()===45&&(v+=ga(xe())),f=ir(),h=d=Fe(T=v+=XS(Do())),k++;break;case 45:g===45&&Fe(v)==2&&(m=0)}}return s}function xc(e,t,r,i,o,s,a,n,l,c,h,d){for(var f=o-1,u=o===0?s:[""],g=Qg(u),m=0,y=0,C=0;m<i;++m)for(var b=0,k=ii(e,f+1,f=qS(y=a[m])),T=e;b<g;++b)(T=Kg(y>0?u[b]+" "+k:fn(k,/&\f/g,u[b])))&&(l[C++]=T);return yl(e,t,r,o===0?Xg:n,l,c,h,d)}function ZS(e,t,r,i){return yl(e,t,r,ml,Di(WS()),ii(e,2,-2),0,i)}function bc(e,t,r,i,o){return yl(e,t,r,Vg,ii(e,0,i),ii(e,i+1,-1),i,o)}function gn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function KS(e,t,r,i){switch(e.type){case Zg:if(e.children.length)break;case DS:case RS:case Vg:return e.return=e.return||e.value;case ml:return"";case un:return e.return=e.value+"{"+gn(e.children,i)+"}";case Xg:if(!Fe(e.value=e.props.join(",")))return""}return Fe(r=gn(e.children,i))?e.return=e.value+"{"+r+"}":""}function QS(e){var t=Qg(e);return function(r,i,o,s){for(var a="",n=0;n<t;n++)a+=e[n](r,i,o,s)||"";return a}}var tm="c4",JS=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),t_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./c4Diagram-LMCZKHZV-D9CNQmKj.js");return{diagram:t}},__vite__mapDeps([11,12,5,6,7]));return{id:tm,diagram:e}},"loader"),e_={id:tm,detector:JS,loader:t_},r_=e_,em="flowchart",i_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),o_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-C0UVrrA6.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:em,diagram:e}},"loader"),s_={id:em,detector:i_,loader:o_},a_=s_,rm="flowchart-v2",n_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),l_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-C0UVrrA6.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:rm,diagram:e}},"loader"),h_={id:rm,detector:n_,loader:l_},c_=h_,im="swimlane",d_=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),u_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-G3AALYLV-1XCKB3VS.js");return{diagram:t}},__vite__mapDeps([18,13,14,15,16,12,17,5,6,7]));return{id:im,diagram:e}},"loader"),f_={id:im,detector:d_,loader:u_},p_=f_,om="er",g_=p(e=>/^\s*erDiagram/.test(e),"detector"),m_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./erDiagram-Q63AITRT-Ba0EdkRL.js");return{diagram:t}},__vite__mapDeps([19,15,16,17,5,6,7]));return{id:om,diagram:e}},"loader"),y_={id:om,detector:g_,loader:m_},C_=y_,sm="gitGraph",x_=p(e=>/^\s*gitGraph/.test(e),"detector"),b_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-IHSO6WYX-koxYdU4T.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,5,6,7]));return{id:sm,diagram:e}},"loader"),k_={id:sm,detector:x_,loader:b_},w_=k_,am="gantt",T_=p(e=>/^\s*gantt/.test(e),"detector"),S_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ganttDiagram-NO4QXBWP-JXL1f3pm.js");return{diagram:t}},__vite__mapDeps([24,7,25,26,27,5,6]));return{id:am,diagram:e}},"loader"),__={id:am,detector:T_,loader:S_},B_=__,nm="info",v_=p(e=>/^\s*info/.test(e),"detector"),L_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./infoDiagram-FWYZ7A6U-CLfieRpE.js");return{diagram:t}},__vite__mapDeps([28,23,5,6,7]));return{id:nm,diagram:e}},"loader"),F_={id:nm,detector:v_,loader:L_},lm="pie",A_=p(e=>/^\s*pie/.test(e),"detector"),E_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./pieDiagram-ENE6RG2P-BRTgRbIK.js");return{diagram:t}},__vite__mapDeps([29,22,23,5,6,30,31,26,7]));return{id:lm,diagram:e}},"loader"),M_={id:lm,detector:A_,loader:E_},hm="quadrantChart",$_=p(e=>/^\s*quadrantChart/.test(e),"detector"),O_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./quadrantDiagram-ABIIQ3AL-Cqd6UTPe.js");return{diagram:t}},__vite__mapDeps([32,25,26,27,5,6,7]));return{id:hm,diagram:e}},"loader"),I_={id:hm,detector:$_,loader:O_},D_=I_,cm="xychart",P_=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),R_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./xychartDiagram-FW5EYKEG-DvB4kNEE.js");return{diagram:t}},__vite__mapDeps([33,26,31,25,27,5,6,7]));return{id:cm,diagram:e}},"loader"),N_={id:cm,detector:P_,loader:R_},q_=N_,dm="requirement",W_=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),z_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./requirementDiagram-TGXJPOKE-C7bAU0jd.js");return{diagram:t}},__vite__mapDeps([34,15,16,5,6,7]));return{id:dm,diagram:e}},"loader"),H_={id:dm,detector:W_,loader:z_},Y_=H_,um="sequence",U_=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),j_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./sequenceDiagram-DBY2YBRQ-AbAJXDB5.js");return{diagram:t}},__vite__mapDeps([35,21,12,5,6,7]));return{id:um,diagram:e}},"loader"),G_={id:um,detector:U_,loader:j_},X_=G_,fm="class",V_=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Z_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./classDiagram-OUVF2IWQ-joxy0H72.js");return{diagram:t}},__vite__mapDeps([36,37,14,15,16,12,5,6,7]));return{id:fm,diagram:e}},"loader"),K_={id:fm,detector:V_,loader:Z_},Q_=K_,pm="classDiagram",J_=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),tB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./classDiagram-v2-EOCWNBFH-joxy0H72.js");return{diagram:t}},__vite__mapDeps([38,37,14,15,16,12,5,6,7]));return{id:pm,diagram:e}},"loader"),eB={id:pm,detector:J_,loader:tB},rB=eB,gm="state",iB=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),oB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./stateDiagram-2N3HPSRC-DvqaD8Eo.js");return{diagram:t}},__vite__mapDeps([39,40,15,16,12,2,4,3,5,6,7]));return{id:gm,diagram:e}},"loader"),sB={id:gm,detector:iB,loader:oB},aB=sB,mm="stateDiagram",nB=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),lB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-6OUMAXLB-D-BVu44I.js");return{diagram:t}},__vite__mapDeps([41,40,15,16,12,5,6,7]));return{id:mm,diagram:e}},"loader"),hB={id:mm,detector:nB,loader:lB},cB=hB,ym="journey",dB=p(e=>/^\s*journey/.test(e),"detector"),uB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./journeyDiagram-5HDEW3XC-CP_Jp2XI.js");return{diagram:t}},__vite__mapDeps([42,14,12,30,5,6,7]));return{id:ym,diagram:e}},"loader"),fB={id:ym,detector:dB,loader:uB},pB=fB,gB=p((e,t,r)=>{q.debug(`rendering svg for syntax error -`);const i=Yk(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Gc(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Cm={draw:gB},mB=Cm,yB={db:{},renderer:Cm,parser:{parse:p(()=>{},"parse")}},CB=yB,xm="flowchart-elk",xB=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),bB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-C0UVrrA6.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:xm,diagram:e}},"loader"),kB={id:xm,detector:xB,loader:bB},wB=kB,bm="timeline",TB=p(e=>/^\s*timeline/.test(e),"detector"),SB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./timeline-definition-FHXFAJF6-doJ2oiYT.js");return{diagram:t}},__vite__mapDeps([43,30,5,6,7]));return{id:bm,diagram:e}},"loader"),_B={id:bm,detector:TB,loader:SB},BB=_B,km="mindmap",vB=p(e=>/^\s*mindmap/.test(e),"detector"),LB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./mindmap-definition-LN4V7U3C-CKYrzvBu.js");return{diagram:t}},__vite__mapDeps([44,15,16,5,6,7]));return{id:km,diagram:e}},"loader"),FB={id:km,detector:vB,loader:LB},AB=FB,wm="kanban",EB=p(e=>/^\s*kanban/.test(e),"detector"),MB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./kanban-definition-HUTT4EX6-B_pkJKY_.js");return{diagram:t}},__vite__mapDeps([45,14,5,6,7]));return{id:wm,diagram:e}},"loader"),$B={id:wm,detector:EB,loader:MB},OB=$B,Tm="sankey",IB=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),DB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./sankeyDiagram-HTMAVEWB-DVlRtVRy.js");return{diagram:t}},__vite__mapDeps([46,31,26,5,6,7]));return{id:Tm,diagram:e}},"loader"),PB={id:Tm,detector:IB,loader:DB},RB=PB,Sm="packet",NB=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),qB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-NH7WQ7WH-DulkvbtN.js");return{diagram:t}},__vite__mapDeps([47,22,23,5,6,7]));return{id:Sm,diagram:e}},"loader"),WB={id:Sm,detector:NB,loader:qB},_m="radar",zB=p(e=>/^\s*radar-beta/.test(e),"detector"),HB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-WEI45ONY-Dcl5s4A_.js");return{diagram:t}},__vite__mapDeps([48,22,23,5,6,7]));return{id:_m,diagram:e}},"loader"),YB={id:_m,detector:zB,loader:HB},Bm="block",UB=p(e=>/^\s*block(-beta)?/.test(e),"detector"),jB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./blockDiagram-677ZJIJ3-DbZfwKqi.js");return{diagram:t}},__vite__mapDeps([49,14,2,17,5,6,7]));return{id:Bm,diagram:e}},"loader"),GB={id:Bm,detector:UB,loader:jB},XB=GB,vm="treeView",VB=p(e=>/^\s*treeView-beta/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-OA4YK3LP-CkS8iR3C.js");return{diagram:t}},__vite__mapDeps([50,21,22,23,5,6,7]));return{id:vm,diagram:e}},"loader"),KB={id:vm,detector:VB,loader:ZB},QB=KB,Lm="architecture",JB=p(e=>/^\s*architecture/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./architectureDiagram-ZJ3FMSHR-vHnTqMir.js");return{diagram:t}},__vite__mapDeps([51,22,23,5,6,10,7]));return{id:Lm,diagram:e}},"loader"),ev={id:Lm,detector:JB,loader:tv},rv=ev,Fm="eventmodeling",iv=p(e=>/^\s*eventmodeling/.test(e),"detector"),ov=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-FQU43EPY-BsAKjn07.js");return{diagram:t}},__vite__mapDeps([52,22,23,5,6,7]));return{id:Fm,diagram:e}},"loader"),sv={id:Fm,detector:iv,loader:ov},av=sv,Am="ishikawa",nv=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),lv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-FXEZZL3T-BghMxuhr.js");return{diagram:t}},__vite__mapDeps([53,5,6,7]));return{id:Am,diagram:e}},"loader"),hv={id:Am,detector:nv,loader:lv},Em="venn",cv=p(e=>/^\s*venn-beta/.test(e),"detector"),dv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./vennDiagram-L72KCM5P-De4w5Aco.js");return{diagram:t}},__vite__mapDeps([54,5,6,7]));return{id:Em,diagram:e}},"loader"),uv={id:Em,detector:cv,loader:dv},fv=uv,Mm="treemap",pv=p(e=>/^\s*treemap/.test(e),"detector"),gv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-G47NLZAW-BuEBRets.js");return{diagram:t}},__vite__mapDeps([55,22,16,23,5,6,27,31,26,7]));return{id:Mm,diagram:e}},"loader"),mv={id:Mm,detector:pv,loader:gv},$m="wardley",yv=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./wardleyDiagram-EHGQE667-CiqgclaU.js");return{diagram:t}},__vite__mapDeps([56,22,23,5,6,7]));return{id:$m,diagram:e}},"loader"),xv={id:$m,detector:yv,loader:Cv},bv=xv,Om="cynefin",kv=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),wv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./cynefinDiagram-TSTJHNR4-DV_qWAFu.js");return{diagram:t}},__vite__mapDeps([57,22,23,5,6,7]));return{id:Om,diagram:e}},"loader"),Tv={id:Om,detector:kv,loader:wv},Im="railroad",Sv=p(e=>/^\s*railroad-beta/i.test(e),"detector"),_v=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./railroadDiagram-RFXS5EU6-nXFgW9ad.js");return{diagram:t}},__vite__mapDeps([58,59,22,23,5,6,7]));return{id:Im,diagram:e}},"loader"),Bv={id:Im,detector:Sv,loader:_v},Dm="railroadEbnf",vv=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Lv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ebnfDiagram-CCIWWBDH-D-Jk-ZBL.js");return{diagram:t}},__vite__mapDeps([60,59,22,23,5,6,7]));return{id:Dm,diagram:e}},"loader"),Fv={id:Dm,detector:vv,loader:Lv},Pm="railroadAbnf",Av=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Ev=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./abnfDiagram-VRR7QNED-C1nSQTfb.js");return{diagram:t}},__vite__mapDeps([61,59,22,23,5,6,7]));return{id:Pm,diagram:e}},"loader"),Mv={id:Pm,detector:Av,loader:Ev},Rm="railroadPeg",$v=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Ov=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./pegDiagram-2B236MQR-DasvmypV.js");return{diagram:t}},__vite__mapDeps([62,59,22,23,5,6,7]));return{id:Rm,diagram:e}},"loader"),Iv={id:Rm,detector:$v,loader:Ov},kc=!1,$s=p(()=>{kc||(kc=!0,zo("error",CB,e=>e.toLowerCase().trim()==="error"),zo("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ba(wB,AB,rv),ba(r_,OB,rB,Q_,C_,B_,F_,M_,Y_,X_,p_,c_,a_,BB,w_,cB,aB,pB,D_,RB,WB,q_,XB,av,QB,YB,hv,mv,Bv,Fv,Mv,Iv,fv,bv,Tv))},"addDiagrams"),Dv=p(async()=>{q.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Sr).map(async([r,{detector:i,loader:o}])=>{if(o)try{Sa(r)}catch{try{const{diagram:s,id:a}=await o();zo(a,s,i)}catch(s){throw q.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Sr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){q.error(`Failed to load ${t.length} external diagrams`);for(const r of t)q.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Pv="graphics-document document";function Nm(e,t){e.attr("role",Pv),t!==""&&e.attr("aria-roledescription",t)}p(Nm,"setA11yDiagramInfo");function qm(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}p(qm,"addSVGa11yTitleDescription");var mn=class Wm{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static{p(this,"Diagram")}static async fromText(t,r={}){const i=vt(),o=xn(t,i);t=Z2(t)+` + L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),FS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),AS=p((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),ES={extension:hS,composition:cS,aggregation:dS,dependency:uS,lollipop:fS,point:pS,circle:gS,cross:mS,barb:yS,barbNeo:CS,only_one:xS,zero_or_one:bS,one_or_more:kS,zero_or_more:wS,only_one_neo:TS,zero_or_one_neo:SS,one_or_more_neo:_S,zero_or_more_neo:BS,requirement_arrow:vS,requirement_contains:FS,requirement_arrow_neo:LS,requirement_contains_neo:AS},MS=lS,$S={common:Zi,getConfig:vt,insertCluster:LT,insertEdge:nS,insertEdgeLabel:tS,insertMarkers:MS,insertNode:Hg,interpolateToCurve:Vn,labelHelper:it,log:q,positionEdgeLabel:eS},Gi={},Gg=p(e=>{for(const t of e)Gi[t.name]=t},"registerLayoutLoaders"),OS=p(()=>{Gg([{name:"dagre",loader:p(async()=>await nt(()=>import("./dagre-VKFMJZFB-BCr0U4UL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"swimlane",loader:p(async()=>await nt(()=>import("./swimlanes-5IMT3BWC-BaZl8tge.js"),__vite__mapDeps([8,5,6,1,2,3,7])),"loader")},{name:"cose-bilkent",loader:p(async()=>await nt(()=>import("./cose-bilkent-JH36ORCC-Bvd7lU_r.js"),__vite__mapDeps([9,10,7,5,6])),"loader")}])},"registerDefaultLayoutLoaders");OS();var GL=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in Gi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}const i=Gi[e.layoutAlgorithm],o=await i.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),n){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return o.render(e,t,$S,{algorithm:i.algorithm},r)},"render"),XL=p((e="",{fallback:t="dagre"}={})=>{if(e in Gi)return e;if(t in Gi)return q.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),ml="comm",Xg="rule",Vg="decl",IS="@media",DS="@import",PS="@supports",RS="@namespace",un="@keyframes",Zg="@layer",NS="@scope",qS=Math.abs,Di=String.fromCharCode;function Kg(e){return e.trim()}function fn(e,t,r){return e.replace(t,r)}function Zr(e,t){return e.charCodeAt(t)|0}function ii(e,t,r){return e.slice(t,r)}function Fe(e){return e.length}function Qg(e){return e.length}function To(e,t){return t.push(e),e}var Es=1,oi=1,Jg=0,ce=0,$t=0,ni="";function yl(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:Es,column:oi,length:a,return:"",siblings:n}}function WS(){return $t}function zS(){return $t=ce>0?Zr(ni,--ce):0,oi--,$t===10&&(oi=1,Es--),$t}function xe(){return $t=ce<Jg?Zr(ni,ce++):0,oi++,$t===10&&(oi=1,Es++),$t}function ir(){return Zr(ni,ce)}function Do(){return ce}function Ms(e,t){return ii(ni,e,t)}function Xi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function HS(e){return Es=oi=1,Jg=Fe(ni=e),ce=0,[]}function YS(e){return ni="",e}function ga(e){return Kg(Ms(ce-1,pn(e===91?e+2:e===40?e+1:e)))}function US(e){for(;($t=ir())&&$t<33;)xe();return Xi(e)>2||Xi($t)>3?"":" "}function jS(e,t){for(;--t&&xe()&&!($t<48||$t>102||$t>57&&$t<65||$t>70&&$t<97););return Ms(e,Do()+(t<6&&ir()==32&&xe()==32))}function pn(e){for(;xe();)switch($t){case e:return ce;case 34:case 39:e!==34&&e!==39&&pn($t);break;case 40:e===41&&pn(e);break;case 92:xe();break}return ce}function GS(e,t){for(;xe()&&e+$t!==57;)if(e+$t===84&&ir()===47)break;return"/*"+Ms(t,ce-1)+"*"+Di(e===47?e:xe())}function XS(e){for(;!Xi(ir());)xe();return Ms(e,ce)}function VS(e){return YS(Po("",null,null,null,[""],e=HS(e),0,[0],e))}function Po(e,t,r,i,o,s,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,g=0,m=1,y=1,C=1,b=0,k=0,T="",S=o,_=s,L=i,v=T;y;)switch(g=k,k=xe()){case 40:g!=108&&Zr(v,d-1)==58?(b++,v+="("):v+=ga(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=ga(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Di(k);break}v+=US(g);break;case 92:v+=jS(Do()-1,7);continue;case 47:switch(ir()){case 42:case 47:To(ZS(GS(xe(),Do()),t,r,l),l),(Xi(g||1)==5||Xi(ir()||1)==5)&&Fe(v)&&ii(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:n[c++]=Fe(v)*C;case 125*m:case 59:case 0:if(b>0&&k){v+=Di(k);break}switch(k){case 0:case 125:y=0;case 59+h:C==-1&&(v=fn(v,/\f/g,"")),u>0&&(Fe(v)-d||m===0)&&To(u>32?bc(v+";",i,r,d-1,l):bc(fn(v," ","")+";",i,r,d-2,l),l);break;case 59:v+=";";default:if(To(L=xc(v,t,r,c,h,o,n,T,S=[],_=[],d,s),s),k===123)if(h===0)Po(v,t,L,L,S,s,d,n,_);else{switch(f){case 99:if(Zr(v,3)===110)break;case 108:if(Zr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Po(e,L,L,i&&To(xc(e,L,L,0,0,o,n,T,o,S=[],d,_),_),o,_,d,n,i?S:_):Po(v,L,L,L,[""],_,0,n,_)}}c=h=u=0,m=C=1,T=v="",d=a;break;case 58:d=1+Fe(v),u=g;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&zS()==125)continue}switch(v+=Di(k),k*m){case 38:C=h>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Fe(v)-1)*C,C=1;break;case 64:ir()===45&&(v+=ga(xe())),f=ir(),h=d=Fe(T=v+=XS(Do())),k++;break;case 45:g===45&&Fe(v)==2&&(m=0)}}return s}function xc(e,t,r,i,o,s,a,n,l,c,h,d){for(var f=o-1,u=o===0?s:[""],g=Qg(u),m=0,y=0,C=0;m<i;++m)for(var b=0,k=ii(e,f+1,f=qS(y=a[m])),T=e;b<g;++b)(T=Kg(y>0?u[b]+" "+k:fn(k,/&\f/g,u[b])))&&(l[C++]=T);return yl(e,t,r,o===0?Xg:n,l,c,h,d)}function ZS(e,t,r,i){return yl(e,t,r,ml,Di(WS()),ii(e,2,-2),0,i)}function bc(e,t,r,i,o){return yl(e,t,r,Vg,ii(e,0,i),ii(e,i+1,-1),i,o)}function gn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function KS(e,t,r,i){switch(e.type){case Zg:if(e.children.length)break;case DS:case RS:case Vg:return e.return=e.return||e.value;case ml:return"";case un:return e.return=e.value+"{"+gn(e.children,i)+"}";case Xg:if(!Fe(e.value=e.props.join(",")))return""}return Fe(r=gn(e.children,i))?e.return=e.value+"{"+r+"}":""}function QS(e){var t=Qg(e);return function(r,i,o,s){for(var a="",n=0;n<t;n++)a+=e[n](r,i,o,s)||"";return a}}var tm="c4",JS=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),t_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./c4Diagram-LMCZKHZV-Dus3HzI2.js");return{diagram:t}},__vite__mapDeps([11,12,5,6,7]));return{id:tm,diagram:e}},"loader"),e_={id:tm,detector:JS,loader:t_},r_=e_,em="flowchart",i_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),o_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-CBIszsQp.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:em,diagram:e}},"loader"),s_={id:em,detector:i_,loader:o_},a_=s_,rm="flowchart-v2",n_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),l_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-CBIszsQp.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:rm,diagram:e}},"loader"),h_={id:rm,detector:n_,loader:l_},c_=h_,im="swimlane",d_=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),u_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-G3AALYLV-WxMWFajS.js");return{diagram:t}},__vite__mapDeps([18,13,14,15,16,12,17,5,6,7]));return{id:im,diagram:e}},"loader"),f_={id:im,detector:d_,loader:u_},p_=f_,om="er",g_=p(e=>/^\s*erDiagram/.test(e),"detector"),m_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./erDiagram-Q63AITRT-CnsIdx2o.js");return{diagram:t}},__vite__mapDeps([19,15,16,17,5,6,7]));return{id:om,diagram:e}},"loader"),y_={id:om,detector:g_,loader:m_},C_=y_,sm="gitGraph",x_=p(e=>/^\s*gitGraph/.test(e),"detector"),b_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-IHSO6WYX-BH8WCC4D.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,5,6,7]));return{id:sm,diagram:e}},"loader"),k_={id:sm,detector:x_,loader:b_},w_=k_,am="gantt",T_=p(e=>/^\s*gantt/.test(e),"detector"),S_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ganttDiagram-NO4QXBWP-Bp3UvmyY.js");return{diagram:t}},__vite__mapDeps([24,7,25,26,27,5,6]));return{id:am,diagram:e}},"loader"),__={id:am,detector:T_,loader:S_},B_=__,nm="info",v_=p(e=>/^\s*info/.test(e),"detector"),L_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./infoDiagram-FWYZ7A6U-CqPgDY2n.js");return{diagram:t}},__vite__mapDeps([28,23,5,6,7]));return{id:nm,diagram:e}},"loader"),F_={id:nm,detector:v_,loader:L_},lm="pie",A_=p(e=>/^\s*pie/.test(e),"detector"),E_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./pieDiagram-ENE6RG2P-CJ6o_adA.js");return{diagram:t}},__vite__mapDeps([29,22,23,5,6,30,31,26,7]));return{id:lm,diagram:e}},"loader"),M_={id:lm,detector:A_,loader:E_},hm="quadrantChart",$_=p(e=>/^\s*quadrantChart/.test(e),"detector"),O_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./quadrantDiagram-ABIIQ3AL-BBv6VFSq.js");return{diagram:t}},__vite__mapDeps([32,25,26,27,5,6,7]));return{id:hm,diagram:e}},"loader"),I_={id:hm,detector:$_,loader:O_},D_=I_,cm="xychart",P_=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),R_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./xychartDiagram-FW5EYKEG-BJN2UZpr.js");return{diagram:t}},__vite__mapDeps([33,26,31,25,27,5,6,7]));return{id:cm,diagram:e}},"loader"),N_={id:cm,detector:P_,loader:R_},q_=N_,dm="requirement",W_=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),z_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./requirementDiagram-TGXJPOKE-CGyvAsFO.js");return{diagram:t}},__vite__mapDeps([34,15,16,5,6,7]));return{id:dm,diagram:e}},"loader"),H_={id:dm,detector:W_,loader:z_},Y_=H_,um="sequence",U_=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),j_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js");return{diagram:t}},__vite__mapDeps([35,21,12,5,6,7]));return{id:um,diagram:e}},"loader"),G_={id:um,detector:U_,loader:j_},X_=G_,fm="class",V_=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Z_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./classDiagram-OUVF2IWQ-BeJtrUxZ.js");return{diagram:t}},__vite__mapDeps([36,37,14,15,16,12,5,6,7]));return{id:fm,diagram:e}},"loader"),K_={id:fm,detector:V_,loader:Z_},Q_=K_,pm="classDiagram",J_=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),tB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./classDiagram-v2-EOCWNBFH-BeJtrUxZ.js");return{diagram:t}},__vite__mapDeps([38,37,14,15,16,12,5,6,7]));return{id:pm,diagram:e}},"loader"),eB={id:pm,detector:J_,loader:tB},rB=eB,gm="state",iB=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),oB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./stateDiagram-2N3HPSRC-DxGZaCFf.js");return{diagram:t}},__vite__mapDeps([39,40,15,16,12,2,4,3,5,6,7]));return{id:gm,diagram:e}},"loader"),sB={id:gm,detector:iB,loader:oB},aB=sB,mm="stateDiagram",nB=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),lB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-6OUMAXLB-BudL4GKN.js");return{diagram:t}},__vite__mapDeps([41,40,15,16,12,5,6,7]));return{id:mm,diagram:e}},"loader"),hB={id:mm,detector:nB,loader:lB},cB=hB,ym="journey",dB=p(e=>/^\s*journey/.test(e),"detector"),uB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./journeyDiagram-5HDEW3XC-M5m-6IMM.js");return{diagram:t}},__vite__mapDeps([42,14,12,30,5,6,7]));return{id:ym,diagram:e}},"loader"),fB={id:ym,detector:dB,loader:uB},pB=fB,gB=p((e,t,r)=>{q.debug(`rendering svg for syntax error +`);const i=Yk(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Gc(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Cm={draw:gB},mB=Cm,yB={db:{},renderer:Cm,parser:{parse:p(()=>{},"parse")}},CB=yB,xm="flowchart-elk",xB=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),bB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-CBIszsQp.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:xm,diagram:e}},"loader"),kB={id:xm,detector:xB,loader:bB},wB=kB,bm="timeline",TB=p(e=>/^\s*timeline/.test(e),"detector"),SB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./timeline-definition-FHXFAJF6-zMligh5P.js");return{diagram:t}},__vite__mapDeps([43,30,5,6,7]));return{id:bm,diagram:e}},"loader"),_B={id:bm,detector:TB,loader:SB},BB=_B,km="mindmap",vB=p(e=>/^\s*mindmap/.test(e),"detector"),LB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./mindmap-definition-LN4V7U3C-G8LQJrFP.js");return{diagram:t}},__vite__mapDeps([44,15,16,5,6,7]));return{id:km,diagram:e}},"loader"),FB={id:km,detector:vB,loader:LB},AB=FB,wm="kanban",EB=p(e=>/^\s*kanban/.test(e),"detector"),MB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./kanban-definition-HUTT4EX6-RlJqNQKm.js");return{diagram:t}},__vite__mapDeps([45,14,5,6,7]));return{id:wm,diagram:e}},"loader"),$B={id:wm,detector:EB,loader:MB},OB=$B,Tm="sankey",IB=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),DB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./sankeyDiagram-HTMAVEWB-CYJzk73F.js");return{diagram:t}},__vite__mapDeps([46,31,26,5,6,7]));return{id:Tm,diagram:e}},"loader"),PB={id:Tm,detector:IB,loader:DB},RB=PB,Sm="packet",NB=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),qB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-NH7WQ7WH-CZRzvszj.js");return{diagram:t}},__vite__mapDeps([47,22,23,5,6,7]));return{id:Sm,diagram:e}},"loader"),WB={id:Sm,detector:NB,loader:qB},_m="radar",zB=p(e=>/^\s*radar-beta/.test(e),"detector"),HB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-WEI45ONY-BhWQTWhi.js");return{diagram:t}},__vite__mapDeps([48,22,23,5,6,7]));return{id:_m,diagram:e}},"loader"),YB={id:_m,detector:zB,loader:HB},Bm="block",UB=p(e=>/^\s*block(-beta)?/.test(e),"detector"),jB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./blockDiagram-677ZJIJ3-Cp3c1EWu.js");return{diagram:t}},__vite__mapDeps([49,14,2,17,5,6,7]));return{id:Bm,diagram:e}},"loader"),GB={id:Bm,detector:UB,loader:jB},XB=GB,vm="treeView",VB=p(e=>/^\s*treeView-beta/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-OA4YK3LP-B2qPmny7.js");return{diagram:t}},__vite__mapDeps([50,21,22,23,5,6,7]));return{id:vm,diagram:e}},"loader"),KB={id:vm,detector:VB,loader:ZB},QB=KB,Lm="architecture",JB=p(e=>/^\s*architecture/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./architectureDiagram-ZJ3FMSHR-pdH2rk7i.js");return{diagram:t}},__vite__mapDeps([51,22,23,5,6,10,7]));return{id:Lm,diagram:e}},"loader"),ev={id:Lm,detector:JB,loader:tv},rv=ev,Fm="eventmodeling",iv=p(e=>/^\s*eventmodeling/.test(e),"detector"),ov=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-FQU43EPY-DPlhFZdP.js");return{diagram:t}},__vite__mapDeps([52,22,23,5,6,7]));return{id:Fm,diagram:e}},"loader"),sv={id:Fm,detector:iv,loader:ov},av=sv,Am="ishikawa",nv=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),lv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-FXEZZL3T-BrPR76fO.js");return{diagram:t}},__vite__mapDeps([53,5,6,7]));return{id:Am,diagram:e}},"loader"),hv={id:Am,detector:nv,loader:lv},Em="venn",cv=p(e=>/^\s*venn-beta/.test(e),"detector"),dv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./vennDiagram-L72KCM5P-KpUZjKlm.js");return{diagram:t}},__vite__mapDeps([54,5,6,7]));return{id:Em,diagram:e}},"loader"),uv={id:Em,detector:cv,loader:dv},fv=uv,Mm="treemap",pv=p(e=>/^\s*treemap/.test(e),"detector"),gv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-G47NLZAW-D-tFNEyZ.js");return{diagram:t}},__vite__mapDeps([55,22,16,23,5,6,27,31,26,7]));return{id:Mm,diagram:e}},"loader"),mv={id:Mm,detector:pv,loader:gv},$m="wardley",yv=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./wardleyDiagram-EHGQE667-9gU-F74d.js");return{diagram:t}},__vite__mapDeps([56,22,23,5,6,7]));return{id:$m,diagram:e}},"loader"),xv={id:$m,detector:yv,loader:Cv},bv=xv,Om="cynefin",kv=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),wv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./cynefinDiagram-TSTJHNR4-cH6p2fBn.js");return{diagram:t}},__vite__mapDeps([57,22,23,5,6,7]));return{id:Om,diagram:e}},"loader"),Tv={id:Om,detector:kv,loader:wv},Im="railroad",Sv=p(e=>/^\s*railroad-beta/i.test(e),"detector"),_v=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./railroadDiagram-RFXS5EU6-7QSjLg66.js");return{diagram:t}},__vite__mapDeps([58,59,22,23,5,6,7]));return{id:Im,diagram:e}},"loader"),Bv={id:Im,detector:Sv,loader:_v},Dm="railroadEbnf",vv=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Lv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ebnfDiagram-CCIWWBDH-C7ceb06g.js");return{diagram:t}},__vite__mapDeps([60,59,22,23,5,6,7]));return{id:Dm,diagram:e}},"loader"),Fv={id:Dm,detector:vv,loader:Lv},Pm="railroadAbnf",Av=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Ev=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./abnfDiagram-VRR7QNED-COKyJfaN.js");return{diagram:t}},__vite__mapDeps([61,59,22,23,5,6,7]));return{id:Pm,diagram:e}},"loader"),Mv={id:Pm,detector:Av,loader:Ev},Rm="railroadPeg",$v=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Ov=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./pegDiagram-2B236MQR-Bqe1YNn0.js");return{diagram:t}},__vite__mapDeps([62,59,22,23,5,6,7]));return{id:Rm,diagram:e}},"loader"),Iv={id:Rm,detector:$v,loader:Ov},kc=!1,$s=p(()=>{kc||(kc=!0,zo("error",CB,e=>e.toLowerCase().trim()==="error"),zo("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ba(wB,AB,rv),ba(r_,OB,rB,Q_,C_,B_,F_,M_,Y_,X_,p_,c_,a_,BB,w_,cB,aB,pB,D_,RB,WB,q_,XB,av,QB,YB,hv,mv,Bv,Fv,Mv,Iv,fv,bv,Tv))},"addDiagrams"),Dv=p(async()=>{q.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Sr).map(async([r,{detector:i,loader:o}])=>{if(o)try{Sa(r)}catch{try{const{diagram:s,id:a}=await o();zo(a,s,i)}catch(s){throw q.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Sr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){q.error(`Failed to load ${t.length} external diagrams`);for(const r of t)q.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Pv="graphics-document document";function Nm(e,t){e.attr("role",Pv),t!==""&&e.attr("aria-roledescription",t)}p(Nm,"setA11yDiagramInfo");function qm(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}p(qm,"addSVGa11yTitleDescription");var mn=class Wm{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static{p(this,"Diagram")}static async fromText(t,r={}){const i=vt(),o=xn(t,i);t=Z2(t)+` `;try{Sa(o)}catch{const c=R0(o);if(!c)throw new Wc(`Diagram ${o} not found.`);const{id:h,diagram:d}=await c();zo(h,d)}const{db:s,parser:a,renderer:n,init:l}=Sa(o);return a.parser&&(a.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await a.parse(t),new Wm(o,t,s,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},wc=[],Rv=p(()=>{wc.forEach(e=>{e()}),wc=[]},"attachFunctions"),Nv=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function zm(e){const t=e.match(qc);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(` `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(` `):t[2];let o=K1(i,{schema:Z1})??{};o=typeof o=="object"&&!Array.isArray(o)?o:{};const s={};return o.displayMode&&(s.displayMode=o.displayMode.toString()),o.title&&(s.title=o.title.toString()),o.config&&(s.config=o.config),{text:e.slice(t[0].length),metadata:s}}p(zm,"extractFrontMatter");var qv=p(e=>e.replace(/\r\n?/g,` diff --git a/apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-CKYrzvBu.js b/apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-G8LQJrFP.js similarity index 98% rename from apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-CKYrzvBu.js rename to apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-G8LQJrFP.js index ac6431242..a61aab5f9 100644 --- a/apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-CKYrzvBu.js +++ b/apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-G8LQJrFP.js @@ -1,4 +1,4 @@ -import{g as oe}from"./chunk-XXDRQBXY-AKdWVjUf.js";import{s as ae}from"./chunk-VR4S4FIN-CFZ-U2wY.js";import{_ as l,l as C,v as ce,x as le,z as he,D as G,c as B,i as F,b6 as de,aa as ge,ab as ue,ac as pe}from"./mermaid.core-DHQD1STq.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function fe(e,n=0){return(E[e[n+0]]+E[e[n+1]]+E[e[n+2]]+E[e[n+3]]+"-"+E[e[n+4]]+E[e[n+5]]+"-"+E[e[n+6]]+E[e[n+7]]+"-"+E[e[n+8]]+E[e[n+9]]+"-"+E[e[n+10]]+E[e[n+11]]+E[e[n+12]]+E[e[n+13]]+E[e[n+14]]+E[e[n+15]]).toLowerCase()}const me=new Uint8Array(16);function ye(){return crypto.getRandomValues(me)}function Ee(e,n,g){return crypto.randomUUID?crypto.randomUUID():_e(e)}function _e(e,n,g){e=e||{};const a=e.random??e.rng?.()??ye();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,fe(a)}var Y=(function(){var e=l(function(D,s,i,o){for(i=i||{},o=D.length;o--;i[D[o]]=s);return i},"o"),n=[1,4],g=[1,13],a=[1,12],t=[1,15],h=[1,16],f=[1,20],m=[1,19],_=[6,7,8],T=[1,26],I=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,p,r,$){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:g,7:[1,10],9:9,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(_,[2,3]),{1:[2,2]},e(_,[2,4]),e(_,[2,5]),{1:[2,6],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:g,9:22,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:T,7:I,10:23,11:w},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:T,7:I,10:32,11:w},{1:[2,7],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(R,[2,14],{7:q,11:J}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(R,[2,13],{7:q,11:J}),e(A,[2,11]),e(A,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],p=[null],r=[],$=this.table,u="",M=0,K=0,ne=2,Q=1,ie=r.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(L.yy[H]=this.yy[H]);y.setInput(s,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var z=y.yylloc;r.push(z);var se=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(k){o.length=o.length-2*k,p.length=p.length-k,r.length=r.length-k}l(re,"popStack");function Z(){var k;return k=c.pop()||y.lex()||Q,typeof k!="number"&&(k instanceof Array&&(c=k,k=c.pop()),k=i.symbols_[k]||k),k}l(Z,"lex");for(var b,v,S,W,O={},U,x,ee,V;;){if(v=o[o.length-1],this.defaultActions[v]?S=this.defaultActions[v]:((b===null||typeof b>"u")&&(b=Z()),S=$[v]&&$[v][b]),typeof S>"u"||!S.length||!S[0]){var X="";V=[];for(U in $[v])this.terminals_[U]&&U>ne&&V.push("'"+this.terminals_[U]+"'");y.showPosition?X="Parse error on line "+(M+1)+`: +import{g as oe}from"./chunk-XXDRQBXY-BYo5O_6D.js";import{s as ae}from"./chunk-VR4S4FIN-JAO0vJUe.js";import{_ as l,l as C,v as ce,x as le,z as he,D as G,c as B,i as F,b6 as de,aa as ge,ab as ue,ac as pe}from"./mermaid.core-DpBz6UHc.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function fe(e,n=0){return(E[e[n+0]]+E[e[n+1]]+E[e[n+2]]+E[e[n+3]]+"-"+E[e[n+4]]+E[e[n+5]]+"-"+E[e[n+6]]+E[e[n+7]]+"-"+E[e[n+8]]+E[e[n+9]]+"-"+E[e[n+10]]+E[e[n+11]]+E[e[n+12]]+E[e[n+13]]+E[e[n+14]]+E[e[n+15]]).toLowerCase()}const me=new Uint8Array(16);function ye(){return crypto.getRandomValues(me)}function Ee(e,n,g){return crypto.randomUUID?crypto.randomUUID():_e(e)}function _e(e,n,g){e=e||{};const a=e.random??e.rng?.()??ye();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,fe(a)}var Y=(function(){var e=l(function(D,s,i,o){for(i=i||{},o=D.length;o--;i[D[o]]=s);return i},"o"),n=[1,4],g=[1,13],a=[1,12],t=[1,15],h=[1,16],f=[1,20],m=[1,19],_=[6,7,8],T=[1,26],I=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,p,r,$){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:g,7:[1,10],9:9,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(_,[2,3]),{1:[2,2]},e(_,[2,4]),e(_,[2,5]),{1:[2,6],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:g,9:22,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:T,7:I,10:23,11:w},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:T,7:I,10:32,11:w},{1:[2,7],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(R,[2,14],{7:q,11:J}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(R,[2,13],{7:q,11:J}),e(A,[2,11]),e(A,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],p=[null],r=[],$=this.table,u="",M=0,K=0,ne=2,Q=1,ie=r.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(L.yy[H]=this.yy[H]);y.setInput(s,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var z=y.yylloc;r.push(z);var se=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(k){o.length=o.length-2*k,p.length=p.length-k,r.length=r.length-k}l(re,"popStack");function Z(){var k;return k=c.pop()||y.lex()||Q,typeof k!="number"&&(k instanceof Array&&(c=k,k=c.pop()),k=i.symbols_[k]||k),k}l(Z,"lex");for(var b,v,S,W,O={},U,x,ee,V;;){if(v=o[o.length-1],this.defaultActions[v]?S=this.defaultActions[v]:((b===null||typeof b>"u")&&(b=Z()),S=$[v]&&$[v][b]),typeof S>"u"||!S.length||!S[0]){var X="";V=[];for(U in $[v])this.terminals_[U]&&U>ne&&V.push("'"+this.terminals_[U]+"'");y.showPosition?X="Parse error on line "+(M+1)+`: `+y.showPosition()+` Expecting `+V.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on line "+(M+1)+": Unexpected "+(b==Q?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(X,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:z,expected:V})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+b);switch(S[0]){case 1:o.push(b),p.push(y.yytext),r.push(y.yylloc),o.push(S[1]),b=null,K=y.yyleng,u=y.yytext,M=y.yylineno,z=y.yylloc;break;case 2:if(x=this.productions_[S[1]][1],O.$=p[p.length-x],O._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},se&&(O._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),W=this.performAction.apply(O,[u,K,M,L.yy,S[1],p,r].concat(ie)),typeof W<"u")return W;x&&(o=o.slice(0,-1*x*2),p=p.slice(0,-1*x),r=r.slice(0,-1*x)),o.push(this.productions_[S[1]][0]),p.push(O.$),r.push(O._$),ee=$[o[o.length-2]][o[o.length-1]],o.push(ee);break;case 3:return!0}}return!0},"parse")},te=(function(){var D={EOF:1,parseError:l(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:l(function(s,i){return this.yy=i||this.yy||{},this._input=s,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 s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:l(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=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===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),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(s){this.unput(this.match.slice(s))},"less"),pastInput:l(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-DasvmypV.js b/apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-Bqe1YNn0.js similarity index 87% rename from apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-DasvmypV.js rename to apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-Bqe1YNn0.js index 1f94ed28d..0f1b59466 100644 --- a/apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-DasvmypV.js +++ b/apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-Bqe1YNn0.js @@ -1 +1 @@ -import{g as l,r as m,d as a}from"./chunk-MOJQB5TN-t9_0csvx.js";import{p}from"./chunk-JWPE2WC7-CPYc1Q95.js";import{_ as t,l as o}from"./mermaid.core-DHQD1STq.js";import{M as u,d as c}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},L={parser:b,db:a,renderer:m,styles:l};export{L as diagram}; +import{g as l,r as m,d as a}from"./chunk-MOJQB5TN-B49sRSVS.js";import{p}from"./chunk-JWPE2WC7-BtckK32c.js";import{_ as t,l as o}from"./mermaid.core-DpBz6UHc.js";import{M as u,d as c}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},L={parser:b,db:a,renderer:m,styles:l};export{L as diagram}; diff --git a/apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-BRTgRbIK.js b/apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-CJ6o_adA.js similarity index 94% rename from apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-BRTgRbIK.js rename to apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-CJ6o_adA.js index bbeb5d41a..c41294a92 100644 --- a/apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-BRTgRbIK.js +++ b/apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-CJ6o_adA.js @@ -1,4 +1,4 @@ -import{p as at}from"./chunk-JWPE2WC7-CPYc1Q95.js";import{K as T,N as B,b5 as rt,g as nt,s as it,a as ot,b as st,p as lt,o as ct,_ as g,l as G,c as ut,B as dt,F as gt,a1 as pt,e as ht,q as ft,D as mt}from"./mermaid.core-DHQD1STq.js";import{p as vt}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import{d as X}from"./arc-VnV5ZHHs.js";import{o as xt}from"./ordinal-Cboi1Yqb.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function St(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function yt(t){return t}function wt(){var t=yt,n=St,y=null,b=T(0),l=T(B),p=T(0);function i(e){var r,s=(e=rt(e)).length,h,w,$=0,f=new Array(s),o=new Array(s),D=+b.apply(this,arguments),E=Math.min(B,Math.max(-B,l.apply(this,arguments)-D)),k,F=Math.min(Math.abs(E)/s,p.apply(this,arguments)),u=F*(E<0?-1:1),A;for(r=0;r<s;++r)(A=o[f[r]=r]=+t(e[r],r,e))>0&&($+=A);for(n!=null?f.sort(function(M,m){return n(o[M],o[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(E-s*u)/$:0;r<s;++r,D=k)h=f[r],A=o[h],k=D+(A>0?A*w:0)+u,o[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:F};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var At=mt.pie,I={sections:new Map,showData:!1},W=I.sections,V=I.showData,Ct=structuredClone(At),$t=g(()=>structuredClone(Ct),"getConfig"),Dt=g(()=>{W=new Map,V=I.showData,ft()},"clear"),Tt=g(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);W.has(t)||(W.set(t,n),G.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),bt=g(()=>W,"getSections"),kt=g(t=>{V=t},"setShowData"),zt=g(()=>V,"getShowData"),Z={getConfig:$t,clear:Dt,setDiagramTitle:ct,getDiagramTitle:lt,setAccTitle:st,getAccTitle:ot,setAccDescription:it,getAccDescription:nt,addSection:Tt,getSections:bt,setShowData:kt,getShowData:zt},Et=g((t,n)=>{at(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Mt={parse:g(async t=>{const n=await vt("pie",t);G.debug(n),Et(n,Z)},"parse")},Rt=g(t=>` +import{p as at}from"./chunk-JWPE2WC7-BtckK32c.js";import{K as T,N as B,b5 as rt,g as nt,s as it,a as ot,b as st,p as lt,o as ct,_ as g,l as G,c as ut,B as dt,F as gt,a1 as pt,e as ht,q as ft,D as mt}from"./mermaid.core-DpBz6UHc.js";import{p as vt}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import{d as X}from"./arc-BNlcm8Io.js";import{o as xt}from"./ordinal-Cboi1Yqb.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function St(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function yt(t){return t}function wt(){var t=yt,n=St,y=null,b=T(0),l=T(B),p=T(0);function i(e){var r,s=(e=rt(e)).length,h,w,$=0,f=new Array(s),o=new Array(s),D=+b.apply(this,arguments),E=Math.min(B,Math.max(-B,l.apply(this,arguments)-D)),k,F=Math.min(Math.abs(E)/s,p.apply(this,arguments)),u=F*(E<0?-1:1),A;for(r=0;r<s;++r)(A=o[f[r]=r]=+t(e[r],r,e))>0&&($+=A);for(n!=null?f.sort(function(M,m){return n(o[M],o[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(E-s*u)/$:0;r<s;++r,D=k)h=f[r],A=o[h],k=D+(A>0?A*w:0)+u,o[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:F};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var At=mt.pie,I={sections:new Map,showData:!1},W=I.sections,V=I.showData,Ct=structuredClone(At),$t=g(()=>structuredClone(Ct),"getConfig"),Dt=g(()=>{W=new Map,V=I.showData,ft()},"clear"),Tt=g(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);W.has(t)||(W.set(t,n),G.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),bt=g(()=>W,"getSections"),kt=g(t=>{V=t},"setShowData"),zt=g(()=>V,"getShowData"),Z={getConfig:$t,clear:Dt,setDiagramTitle:ct,getDiagramTitle:lt,setAccTitle:st,getAccTitle:ot,setAccDescription:it,getAccDescription:nt,addSection:Tt,getSections:bt,setShowData:kt,getShowData:zt},Et=g((t,n)=>{at(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Mt={parse:g(async t=>{const n=await vt("pie",t);G.debug(n),Et(n,Z)},"parse")},Rt=g(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; diff --git a/apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-Cqd6UTPe.js b/apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-BBv6VFSq.js similarity index 99% rename from apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-Cqd6UTPe.js rename to apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-BBv6VFSq.js index f4a7b61a4..5869d4c59 100644 --- a/apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-Cqd6UTPe.js +++ b/apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-BBv6VFSq.js @@ -1,4 +1,4 @@ -import{s as Se,g as _e,p as ee,o as Ae,a as ke,b as Fe,_ as r,c as Et,l as qt,d as vt,e as Pe,q as ve,D as z,i as Ce,W as Le}from"./mermaid.core-DHQD1STq.js";import{l as te}from"./linear-DLrQx2aB.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Ct=(function(){var t=r(function(Y,s,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=s);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],k=[1,45],ct=[1,14],dt=[1,23],ut=[1,18],xt=[1,19],ot=[1,20],bt=[1,21],lt=[1,22],i=[1,24],Dt=[1,25],zt=[1,26],Vt=[1,27],It=[1,28],wt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Ht=[1,73],Xt=[1,74],Mt=[1,75],Yt=[1,76],jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],St=[1,103],Gt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" ⟶ ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" ⟶ ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(c,[2,29],{10:St}),t(Gt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(c,[2,50],{10:St}),t(Gt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Kt=0,Te=2,Zt=1,qe=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(j.yy[At]=this.yy[At]);D.setInput(s,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var kt=D.yylloc;e.push(kt);var me=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){u.length=u.length-2*R,A.length=A.length-R,e.length=e.length-R}r(be,"popStack");function Jt(){var R;return R=d.pop()||D.lex()||Zt,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}r(Jt,"lex");for(var B,G,W,Ft,rt={},pt,M,$t,yt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=Jt()),W=ht[G]&&ht[G][B]),typeof W>"u"||!W.length||!W[0]){var Pt="";yt=[];for(pt in ht[G])this.terminals_[pt]&&pt>Te&&yt.push("'"+this.terminals_[pt]+"'");D.showPosition?Pt="Parse error on line "+(gt+1)+`: +import{s as Se,g as _e,p as ee,o as Ae,a as ke,b as Fe,_ as r,c as Et,l as qt,d as vt,e as Pe,q as ve,D as z,i as Ce,W as Le}from"./mermaid.core-DpBz6UHc.js";import{l as te}from"./linear-BWc4ICs9.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Ct=(function(){var t=r(function(Y,s,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=s);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],k=[1,45],ct=[1,14],dt=[1,23],ut=[1,18],xt=[1,19],ot=[1,20],bt=[1,21],lt=[1,22],i=[1,24],Dt=[1,25],zt=[1,26],Vt=[1,27],It=[1,28],wt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Ht=[1,73],Xt=[1,74],Mt=[1,75],Yt=[1,76],jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],St=[1,103],Gt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" ⟶ ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" ⟶ ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(c,[2,29],{10:St}),t(Gt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(c,[2,50],{10:St}),t(Gt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Kt=0,Te=2,Zt=1,qe=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(j.yy[At]=this.yy[At]);D.setInput(s,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var kt=D.yylloc;e.push(kt);var me=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){u.length=u.length-2*R,A.length=A.length-R,e.length=e.length-R}r(be,"popStack");function Jt(){var R;return R=d.pop()||D.lex()||Zt,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}r(Jt,"lex");for(var B,G,W,Ft,rt={},pt,M,$t,yt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=Jt()),W=ht[G]&&ht[G][B]),typeof W>"u"||!W.length||!W[0]){var Pt="";yt=[];for(pt in ht[G])this.terminals_[pt]&&pt>Te&&yt.push("'"+this.terminals_[pt]+"'");D.showPosition?Pt="Parse error on line "+(gt+1)+`: `+D.showPosition()+` Expecting `+yt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Pt="Parse error on line "+(gt+1)+": Unexpected "+(B==Zt?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Pt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:kt,expected:yt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+B);switch(W[0]){case 1:u.push(B),A.push(D.yytext),e.push(D.yylloc),u.push(W[1]),B=null,Kt=D.yyleng,n=D.yytext,gt=D.yylineno,kt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],rt.$=A[A.length-M],rt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},me&&(rt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Ft=this.performAction.apply(rt,[n,Kt,gt,j.yy,W[1],A,e].concat(qe)),typeof Ft<"u")return Ft;M&&(u=u.slice(0,-1*M*2),A=A.slice(0,-1*M),e=e.slice(0,-1*M)),u.push(this.productions_[W[1]][0]),A.push(rt.$),e.push(rt._$),$t=ht[u[u.length-2]][u[u.length-1]],u.push($t);break;case 3:return!0}}return!0},"parse")},ye=(function(){var Y={EOF:1,parseError:r(function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},"parseError"),setInput:r(function(s,l){return this.yy=l||this.yy||{},this._input=s,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:r(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var l=s.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:r(function(s){var l=s.length,u=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=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),u.length-1&&(this.yylineno-=u.length-1);var A=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:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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:r(function(s){this.unput(this.match.slice(s))},"less"),pastInput:r(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var s=this.pastInput(),l=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-nXFgW9ad.js b/apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-7QSjLg66.js similarity index 84% rename from apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-nXFgW9ad.js rename to apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-7QSjLg66.js index a00fbc7c8..ecfba2b27 100644 --- a/apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-nXFgW9ad.js +++ b/apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-7QSjLg66.js @@ -1 +1 @@ -import{g as s,r as l,d as t}from"./chunk-MOJQB5TN-t9_0csvx.js";import{p as m}from"./chunk-JWPE2WC7-CPYc1Q95.js";import{_ as n,l as i}from"./mermaid.core-DHQD1STq.js";import{M as p,c as u}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},P={parser:y,db:t,renderer:l,styles:s};export{P as diagram}; +import{g as s,r as l,d as t}from"./chunk-MOJQB5TN-B49sRSVS.js";import{p as m}from"./chunk-JWPE2WC7-BtckK32c.js";import{_ as n,l as i}from"./mermaid.core-DpBz6UHc.js";import{M as p,c as u}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},P={parser:y,db:t,renderer:l,styles:s};export{P as diagram}; diff --git a/apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-C7bAU0jd.js b/apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-CGyvAsFO.js similarity index 99% rename from apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-C7bAU0jd.js rename to apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-CGyvAsFO.js index d69c51f3e..7ccc888ca 100644 --- a/apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-C7bAU0jd.js +++ b/apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-CGyvAsFO.js @@ -1,4 +1,4 @@ -import{g as ze}from"./chunk-XXDRQBXY-AKdWVjUf.js";import{s as Ge}from"./chunk-VR4S4FIN-CFZ-U2wY.js";import{_ as h,z as Ye,b as Xe,a as Je,s as Ze,g as et,o as tt,p as st,c as Te,l as Ne,q as it,u as rt,v as nt,x as at,y as lt}from"./mermaid.core-DHQD1STq.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var qe=(function(){var e=h(function($,r,a,c){for(a=a||{},c=$.length;c--;a[$[c]]=r);return a},"o"),u=[1,3],o=[1,4],n=[1,5],i=[1,6],f=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],_=[1,22],E=[2,7],g=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],p=[1,39],R=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],Ae=[1,70],Ve=[1,71],ve=[1,72],Le=[1,73],xe=[1,74],Oe=[1,75],we=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Me=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:h(function(r,a,c,s,m,t,me){var l=t.length-1;switch(m){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:u,9:o,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:u,9:o,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(f,[2,6]),{3:12,4:2,6:u,9:o,11:n,13:i},{1:[2,2]},{4:17,5:_,7:13,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},e(f,[2,4]),e(f,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:_,7:42,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:43,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:44,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:45,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:46,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:47,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:48,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:49,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:50,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:p,90:R},{30:63,33:62,75:P,89:p,90:R},{30:64,33:62,75:P,89:p,90:R},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{62:77,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{30:78,33:62,75:P,89:p,90:R},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:p,90:R},{5:[1,95]},{30:96,33:62,75:P,89:p,90:R},{5:[1,97]},{30:98,33:62,75:P,89:p,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:De}),{33:103,75:[1,102],89:p,90:R},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:De}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:p,90:R},{33:120,89:p,90:R},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:p,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:h(function(r,a){if(a.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=a,c}},"parseError"),parse:h(function(r){var a=this,c=[0],s=[],m=[null],t=[],me=this.table,l="",Re=0,Fe=0,He=2,$e=1,Ke=t.slice.call(arguments,1),y=Object.create(this.lexer),z={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(z.yy[Se]=this.yy[Se]);y.setInput(r,z.yy),z.yy.lexer=y,z.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var be=y.yylloc;t.push(be);var We=y.options&&y.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(I){c.length=c.length-2*I,m.length=m.length-I,t.length=t.length-I}h(je,"popStack");function Pe(){var I;return I=s.pop()||y.lex()||$e,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=a.symbols_[I]||I),I}h(Pe,"lex");for(var b,G,N,Ie,J={},ge,F,Ue,ye;;){if(G=c[c.length-1],this.defaultActions[G]?N=this.defaultActions[G]:((b===null||typeof b>"u")&&(b=Pe()),N=me[G]&&me[G][b]),typeof N>"u"||!N.length||!N[0]){var ke="";ye=[];for(ge in me[G])this.terminals_[ge]&&ge>He&&ye.push("'"+this.terminals_[ge]+"'");y.showPosition?ke="Parse error on line "+(Re+1)+`: +import{g as ze}from"./chunk-XXDRQBXY-BYo5O_6D.js";import{s as Ge}from"./chunk-VR4S4FIN-JAO0vJUe.js";import{_ as h,z as Ye,b as Xe,a as Je,s as Ze,g as et,o as tt,p as st,c as Te,l as Ne,q as it,u as rt,v as nt,x as at,y as lt}from"./mermaid.core-DpBz6UHc.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var qe=(function(){var e=h(function($,r,a,c){for(a=a||{},c=$.length;c--;a[$[c]]=r);return a},"o"),u=[1,3],o=[1,4],n=[1,5],i=[1,6],f=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],_=[1,22],E=[2,7],g=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],p=[1,39],R=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],Ae=[1,70],Ve=[1,71],ve=[1,72],Le=[1,73],xe=[1,74],Oe=[1,75],we=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Me=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:h(function(r,a,c,s,m,t,me){var l=t.length-1;switch(m){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:u,9:o,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:u,9:o,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(f,[2,6]),{3:12,4:2,6:u,9:o,11:n,13:i},{1:[2,2]},{4:17,5:_,7:13,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},e(f,[2,4]),e(f,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:_,7:42,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:43,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:44,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:45,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:46,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:47,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:48,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:49,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:50,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:p,90:R},{30:63,33:62,75:P,89:p,90:R},{30:64,33:62,75:P,89:p,90:R},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{62:77,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{30:78,33:62,75:P,89:p,90:R},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:p,90:R},{5:[1,95]},{30:96,33:62,75:P,89:p,90:R},{5:[1,97]},{30:98,33:62,75:P,89:p,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:De}),{33:103,75:[1,102],89:p,90:R},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:De}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:p,90:R},{33:120,89:p,90:R},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:p,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:h(function(r,a){if(a.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=a,c}},"parseError"),parse:h(function(r){var a=this,c=[0],s=[],m=[null],t=[],me=this.table,l="",Re=0,Fe=0,He=2,$e=1,Ke=t.slice.call(arguments,1),y=Object.create(this.lexer),z={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(z.yy[Se]=this.yy[Se]);y.setInput(r,z.yy),z.yy.lexer=y,z.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var be=y.yylloc;t.push(be);var We=y.options&&y.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(I){c.length=c.length-2*I,m.length=m.length-I,t.length=t.length-I}h(je,"popStack");function Pe(){var I;return I=s.pop()||y.lex()||$e,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=a.symbols_[I]||I),I}h(Pe,"lex");for(var b,G,N,Ie,J={},ge,F,Ue,ye;;){if(G=c[c.length-1],this.defaultActions[G]?N=this.defaultActions[G]:((b===null||typeof b>"u")&&(b=Pe()),N=me[G]&&me[G][b]),typeof N>"u"||!N.length||!N[0]){var ke="";ye=[];for(ge in me[G])this.terminals_[ge]&&ge>He&&ye.push("'"+this.terminals_[ge]+"'");y.showPosition?ke="Parse error on line "+(Re+1)+`: `+y.showPosition()+` Expecting `+ye.join(", ")+", got '"+(this.terminals_[b]||b)+"'":ke="Parse error on line "+(Re+1)+": Unexpected "+(b==$e?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(ke,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:be,expected:ye})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+b);switch(N[0]){case 1:c.push(b),m.push(y.yytext),t.push(y.yylloc),c.push(N[1]),b=null,Fe=y.yyleng,l=y.yytext,Re=y.yylineno,be=y.yylloc;break;case 2:if(F=this.productions_[N[1]][1],J.$=m[m.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},We&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Ie=this.performAction.apply(J,[l,Fe,Re,z.yy,N[1],m,t].concat(Ke)),typeof Ie<"u")return Ie;F&&(c=c.slice(0,-1*F*2),m=m.slice(0,-1*F),t=t.slice(0,-1*F)),c.push(this.productions_[N[1]][0]),m.push(J.$),t.push(J._$),Ue=me[c[c.length-2]][c[c.length-1]],c.push(Ue);break;case 3:return!0}}return!0},"parse")},Qe=(function(){var $={EOF:1,parseError:h(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:h(function(r,a){return this.yy=a||this.yy||{},this._input=r,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:h(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:h(function(r){var a=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var s=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),c.length-1&&(this.yylineno-=c.length-1);var m=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:c?(c.length===s.length?this.yylloc.first_column:0)+s[s.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(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:h(function(r){this.unput(this.match.slice(r))},"less"),pastInput:h(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-DVlRtVRy.js b/apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-CYJzk73F.js similarity index 99% rename from apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-DVlRtVRy.js rename to apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-CYJzk73F.js index ed9501fff..30d929f53 100644 --- a/apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-DVlRtVRy.js +++ b/apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-CYJzk73F.js @@ -1,4 +1,4 @@ -import{o as kt,p as mt,s as xt,g as _t,b as vt,a as bt,_ as y,c as ot,b8 as St,d as G,ad as wt,q as Lt,k as Et}from"./mermaid.core-DHQD1STq.js";import{o as At}from"./ordinal-Cboi1Yqb.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function Tt(t){for(var i=t.length/6|0,s=new Array(i),l=0;l<i;)s[l]="#"+t.slice(l*6,++l*6);return s}const Mt=Tt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function at(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s<l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function dt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function J(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Nt(t){return t.target.depth}function Ct(t){return t.depth}function Pt(t,i){return i-1-t.height}function gt(t,i){return t.sourceLinks.length?t.depth:i-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,i){return q(t.source,i.source)||t.index-i.index}function ct(t,i){return q(t.target,i.target)||t.index-i.index}function q(t,i){return t.y0-i.y0}function tt(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function Dt(t){return t.links}function ut(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ht({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function jt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,k=Ot,o=gt,a,h,m=$t,_=Dt,d=6;function v(){const n={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:Y(n),v):k},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:Y(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(m=typeof n=="function"?n:Y(n),v):m},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:Y(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[k(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ut(c,p)),typeof b!="object"&&(b=r.target=ut(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=at(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function $(n){const f=dt(n,c=>(l-i-(c.length-1)*g)/J(c,tt));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;r<c.length;++r){const p=c[r];p.y0+=e*(r+1),p.y1+=e*(r+1)}w(c)}}function S(n){const f=N(n);g=Math.min(x,(l-i)/(at(f,c=>c.length)-1)),$(f);for(let c=0;c<d;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/d);F(f,e,r),C(f,e,r)}}function C(n,f,c){for(let e=1,r=n.length;e<r;++e){const p=n[e];for(const b of p){let L=0,z=0;for(const{source:W,value:Z}of b.targetLinks){let U=Z*(b.layer-W.layer);L+=P(W,b)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function F(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,z=0;for(const{target:W,value:Z}of b.sourceLinks){let U=Z*(W.layer-b.layer);L+=E(b,W)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function D(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),R(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),R(n,i,0,f)}function R(n,f,c,e){for(;c<n.length;++c){const r=n[c],p=(f-r.y0)*e;p>1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function j({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ct);for(const{target:{targetLinks:c}}of n)c.sort(lt)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ct),c.sort(lt)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var et=Math.PI,nt=2*et,B=1e-6,zt=nt-B;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,k=s-t,o=l-i,a=x-t,h=g-i,m=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(m>B)if(!(Math.abs(h*k-o*a)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((et-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,$=I/A;Math.abs(N-1)>B&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+$*k)+","+(this._y1=i+$*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),k=s*Math.sin(l),o=t+g,a=i+k,h=1^x,m=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>B||Math.abs(this._y1-a)>B)&&(this._+="L"+o+","+a),s&&(m<0&&(m=m%nt+nt),m>zt?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=et)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Ft(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Wt(t){return t.target}function Ut(t){var i=Vt,s=Wt,l=Bt,u=Ft,x=null;function g(){var k,o=Rt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=k=pt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(i=k,g):i},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(l=typeof k=="function"?k:ft(+k),g):l},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:ft(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Gt(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Yt(){return Ut(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var rt=(function(){var t=y(function(k,o,a,h){for(a=a||{},h=k.length;h--;a[k[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,$=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;d.push(D);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function j(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=a.symbols_[L]||L),L}y(j,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=j()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: +import{o as kt,p as mt,s as xt,g as _t,b as vt,a as bt,_ as y,c as ot,b8 as St,d as G,ad as wt,q as Lt,k as Et}from"./mermaid.core-DpBz6UHc.js";import{o as At}from"./ordinal-Cboi1Yqb.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function Tt(t){for(var i=t.length/6|0,s=new Array(i),l=0;l<i;)s[l]="#"+t.slice(l*6,++l*6);return s}const Mt=Tt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function at(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s<l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function dt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function J(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Nt(t){return t.target.depth}function Ct(t){return t.depth}function Pt(t,i){return i-1-t.height}function gt(t,i){return t.sourceLinks.length?t.depth:i-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,i){return q(t.source,i.source)||t.index-i.index}function ct(t,i){return q(t.target,i.target)||t.index-i.index}function q(t,i){return t.y0-i.y0}function tt(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function Dt(t){return t.links}function ut(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ht({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function jt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,k=Ot,o=gt,a,h,m=$t,_=Dt,d=6;function v(){const n={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:Y(n),v):k},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:Y(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(m=typeof n=="function"?n:Y(n),v):m},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:Y(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[k(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ut(c,p)),typeof b!="object"&&(b=r.target=ut(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=at(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function $(n){const f=dt(n,c=>(l-i-(c.length-1)*g)/J(c,tt));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;r<c.length;++r){const p=c[r];p.y0+=e*(r+1),p.y1+=e*(r+1)}w(c)}}function S(n){const f=N(n);g=Math.min(x,(l-i)/(at(f,c=>c.length)-1)),$(f);for(let c=0;c<d;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/d);F(f,e,r),C(f,e,r)}}function C(n,f,c){for(let e=1,r=n.length;e<r;++e){const p=n[e];for(const b of p){let L=0,z=0;for(const{source:W,value:Z}of b.targetLinks){let U=Z*(b.layer-W.layer);L+=P(W,b)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function F(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,z=0;for(const{target:W,value:Z}of b.sourceLinks){let U=Z*(W.layer-b.layer);L+=E(b,W)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function D(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),R(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),R(n,i,0,f)}function R(n,f,c,e){for(;c<n.length;++c){const r=n[c],p=(f-r.y0)*e;p>1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function j({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ct);for(const{target:{targetLinks:c}}of n)c.sort(lt)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ct),c.sort(lt)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var et=Math.PI,nt=2*et,B=1e-6,zt=nt-B;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,k=s-t,o=l-i,a=x-t,h=g-i,m=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(m>B)if(!(Math.abs(h*k-o*a)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((et-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,$=I/A;Math.abs(N-1)>B&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+$*k)+","+(this._y1=i+$*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),k=s*Math.sin(l),o=t+g,a=i+k,h=1^x,m=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>B||Math.abs(this._y1-a)>B)&&(this._+="L"+o+","+a),s&&(m<0&&(m=m%nt+nt),m>zt?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=et)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Ft(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Wt(t){return t.target}function Ut(t){var i=Vt,s=Wt,l=Bt,u=Ft,x=null;function g(){var k,o=Rt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=k=pt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(i=k,g):i},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(l=typeof k=="function"?k:ft(+k),g):l},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:ft(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Gt(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Yt(){return Ut(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var rt=(function(){var t=y(function(k,o,a,h){for(a=a||{},h=k.length;h--;a[k[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,$=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;d.push(D);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function j(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=a.symbols_[L]||L),L}y(j,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=j()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: `+S.showPosition()+` Expecting `+p.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:D,expected:p})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),d.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,D=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:d[d.length-(e||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(e||1)].first_column,last_column:d[d.length-1].last_column},R&&(f._$.range=[d[d.length-(e||1)].range[0],d[d.length-1].range[1]]),n=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,d].concat($)),typeof n<"u")return n;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),d=d.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),d.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},x=(function(){var k={EOF:1,parseError:y(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:y(function(o,a){return this.yy=a||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:y(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var a=o.match(/(?:\r\n?|\n).*/g);return a?(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:y(function(o){var a=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;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),h.length-1&&(this.yylineno-=h.length-1);var _=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:h?(h.length===m.length?this.yylloc.first_column:0)+m[m.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-a]),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(o){this.unput(this.match.slice(o))},"less"),pastInput:y(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:y(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:y(function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-AbAJXDB5.js b/apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js similarity index 99% rename from apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-AbAJXDB5.js rename to apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js index cf3ed2a68..6ee7c9b03 100644 --- a/apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-AbAJXDB5.js +++ b/apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js @@ -1,4 +1,4 @@ -import{I as tr}from"./chunk-2Q5K7J3B-BRQfHNsr.js";import{_ as x,X as er,c as $,d as Vt,l as at,j as Ce,e as rr,f as ar,k as N,b as ke,s as sr,o as ir,a as nr,g as or,p as cr,Y as lr,Z as hr,q as dr,i as Yt,y as Z,$ as Q,a0 as Pt,a1 as Me,a2 as Tr,z as Kt,a3 as pr,a4 as Be}from"./mermaid.core-DHQD1STq.js";import{a as Er,b as ae,g as dt,d as ur,c as se,e as ie}from"./chunk-32BRIVSS-BjbI6vv4.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var te=(function(){var e=x(function(ut,S,v,P){for(v=v||{},P=ut.length;P--;v[ut[P]]=S);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],u=[1,14],d=[1,15],p=[1,17],_=[1,18],E=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],w=[1,32],A=[1,33],D=[1,34],M=[1,35],V=[1,36],W=[1,37],U=[1,38],G=[1,39],X=[1,40],nt=[1,42],j=[1,43],H=[1,44],st=[1,45],tt=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],At=[1,74],kt=[1,80],m=[1,81],k=[1,82],lt=[1,83],et=[1,84],K=[1,85],Ot=[1,86],ne=[1,87],oe=[1,88],ce=[1,89],le=[1,90],he=[1,91],de=[1,92],Te=[1,93],pe=[1,94],Ee=[1,95],ue=[1,96],fe=[1,97],_e=[1,98],ge=[1,99],xe=[1,100],Ie=[1,101],ye=[1,102],Re=[1,103],Oe=[1,104],Le=[1,105],be=[2,78],St=[4,5,17,51,53,54],Dt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Ut=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Gt=[5,52],F=[70,71,72,73],ot=[1,151],Xt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(S,v,P,y,z,c,wt){var h=c.length-1;switch(z){case 3:return y.apply(c[h]),c[h];case 4:case 10:this.$=[];break;case 5:case 11:c[h-1].push(c[h]),this.$=c[h-1];break;case 6:case 7:case 12:case 13:this.$=c[h];break;case 8:case 9:case 14:this.$=[];break;case 16:c[h].type="createParticipant",this.$=c[h];break;case 17:c[h-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[h-2])}),c[h-1].push({type:"boxEnd",boxText:c[h-2]}),this.$=c[h-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-2]),sequenceIndexStep:Number(c[h-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-1].actor};break;case 30:y.setDiagramTitle(c[h].substring(6)),this.$=c[h].substring(6);break;case 31:y.setDiagramTitle(c[h].substring(7)),this.$=c[h].substring(7);break;case 32:this.$=c[h].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[h].trim(),y.setAccDescription(this.$);break;case 35:c[h-1].unshift({type:"loopStart",loopText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.LOOP_START}),c[h-1].push({type:"loopEnd",loopText:c[h-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[h-1];break;case 36:c[h-1].unshift({type:"rectStart",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_START}),c[h-1].push({type:"rectEnd",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[h-1];break;case 37:c[h-1].unshift({type:"optStart",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_START}),c[h-1].push({type:"optEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[h-1];break;case 38:c[h-1].unshift({type:"altStart",altText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.ALT_START}),c[h-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[h-1];break;case 39:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 40:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 41:c[h-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.CRITICAL_START}),c[h-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[h-1];break;case 42:c[h-1].unshift({type:"breakStart",breakText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_START}),c[h-1].push({type:"breakEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[h-1];break;case 44:this.$=c[h-3].concat([{type:"option",optionText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[h]]);break;case 46:this.$=c[h-3].concat([{type:"and",parText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.PAR_AND},c[h]]);break;case 48:this.$=c[h-3].concat([{type:"else",altText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.ALT_ELSE},c[h]]);break;case 49:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 50:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 51:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 52:case 57:c[h-1].draw="actor",c[h-1].type="addParticipant",this.$=c[h-1];break;case 53:c[h-1].type="destroyParticipant",this.$=c[h-1];break;case 54:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 55:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 56:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 58:this.$=[c[h-1],{type:"addNote",placement:c[h-2],actor:c[h-1].actor,text:c[h]}];break;case 59:c[h-2]=[].concat(c[h-1],c[h-1]).slice(0,2),c[h-2][0]=c[h-2][0].actor,c[h-2][1]=c[h-2][1].actor,this.$=[c[h-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[h-2].slice(0,2),text:c[h]}];break;case 60:this.$=[c[h-1],{type:"addLinks",actor:c[h-1].actor,text:c[h]}];break;case 61:this.$=[c[h-1],{type:"addALink",actor:c[h-1].actor,text:c[h]}];break;case 62:this.$=[c[h-1],{type:"addProperties",actor:c[h-1].actor,text:c[h]}];break;case 63:this.$=[c[h-1],{type:"addDetails",actor:c[h-1].actor,text:c[h]}];break;case 66:this.$=[c[h-2],c[h]];break;case 67:this.$=c[h];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor}];break;case 71:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-4].actor}];break;case 72:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor}];break;case 73:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-4].actor}];break;case 74:this.$=[c[h-5],c[h-1],{type:"addMessage",from:c[h-5].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-5].actor}];break;case 75:this.$=[c[h-3],c[h-1],{type:"addMessage",from:c[h-3].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h]}];break;case 76:this.$={type:"addParticipant",actor:c[h-1],config:c[h]};break;case 77:this.$=c[h-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[h]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[h].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,5]),{9:48,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:At},{23:75,55:76,73:At},{23:77,73:Y},{69:78,72:[1,79],78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],be),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(Dt,i,{7:120}),e(Dt,i,{7:121}),e(Dt,i,{7:122}),e(me,i,{41:123,7:124}),e(Ut,i,{43:125,7:126}),e(Ut,i,{7:126,43:127}),e(Ae,i,{46:128,7:129}),e(Dt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Gt,be,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,161],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,162],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,163],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,47],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,50:[1,165],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,45],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,49:[1,167],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,43],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,48:[1,170],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,171],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Gt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:U,53:G,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(St,[2,12]),e(me,i,{7:124,41:201}),e(Ut,i,{7:126,43:202}),e(Ae,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Gt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(S,v){if(v.recoverable)this.trace(S);else{var P=new Error(S);throw P.hash=v,P}},"parseError"),parse:x(function(S){var v=this,P=[0],y=[],z=[null],c=[],wt=this.table,h="",Ct=0,Se=0,Ze=2,we=1,Qe=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Jt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Jt)&&(gt.yy[Jt]=this.yy[Jt]);J.setInput(S,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Zt=J.yylloc;c.push(Zt);var $e=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(it){P.length=P.length-2*it,z.length=z.length-it,c.length=c.length-it}x(je,"popStack");function Ne(){var it;return it=y.pop()||J.lex()||we,typeof it!="number"&&(it instanceof Array&&(y=it,it=y.pop()),it=v.symbols_[it]||it),it}x(Ne,"lex");for(var rt,xt,ct,Qt,Lt={},Mt,Tt,Pe,Bt;;){if(xt=P[P.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Ne()),ct=wt[xt]&&wt[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var $t="";Bt=[];for(Mt in wt[xt])this.terminals_[Mt]&&Mt>Ze&&Bt.push("'"+this.terminals_[Mt]+"'");J.showPosition?$t="Parse error on line "+(Ct+1)+`: +import{I as tr}from"./chunk-2Q5K7J3B-CqtdGPMZ.js";import{_ as x,X as er,c as $,d as Vt,l as at,j as Ce,e as rr,f as ar,k as N,b as ke,s as sr,o as ir,a as nr,g as or,p as cr,Y as lr,Z as hr,q as dr,i as Yt,y as Z,$ as Q,a0 as Pt,a1 as Me,a2 as Tr,z as Kt,a3 as pr,a4 as Be}from"./mermaid.core-DpBz6UHc.js";import{a as Er,b as ae,g as dt,d as ur,c as se,e as ie}from"./chunk-32BRIVSS-Dx199TNh.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var te=(function(){var e=x(function(ut,S,v,P){for(v=v||{},P=ut.length;P--;v[ut[P]]=S);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],u=[1,14],d=[1,15],p=[1,17],_=[1,18],E=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],w=[1,32],A=[1,33],D=[1,34],M=[1,35],V=[1,36],W=[1,37],U=[1,38],G=[1,39],X=[1,40],nt=[1,42],j=[1,43],H=[1,44],st=[1,45],tt=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],At=[1,74],kt=[1,80],m=[1,81],k=[1,82],lt=[1,83],et=[1,84],K=[1,85],Ot=[1,86],ne=[1,87],oe=[1,88],ce=[1,89],le=[1,90],he=[1,91],de=[1,92],Te=[1,93],pe=[1,94],Ee=[1,95],ue=[1,96],fe=[1,97],_e=[1,98],ge=[1,99],xe=[1,100],Ie=[1,101],ye=[1,102],Re=[1,103],Oe=[1,104],Le=[1,105],be=[2,78],St=[4,5,17,51,53,54],Dt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Ut=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Gt=[5,52],F=[70,71,72,73],ot=[1,151],Xt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(S,v,P,y,z,c,wt){var h=c.length-1;switch(z){case 3:return y.apply(c[h]),c[h];case 4:case 10:this.$=[];break;case 5:case 11:c[h-1].push(c[h]),this.$=c[h-1];break;case 6:case 7:case 12:case 13:this.$=c[h];break;case 8:case 9:case 14:this.$=[];break;case 16:c[h].type="createParticipant",this.$=c[h];break;case 17:c[h-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[h-2])}),c[h-1].push({type:"boxEnd",boxText:c[h-2]}),this.$=c[h-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-2]),sequenceIndexStep:Number(c[h-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-1].actor};break;case 30:y.setDiagramTitle(c[h].substring(6)),this.$=c[h].substring(6);break;case 31:y.setDiagramTitle(c[h].substring(7)),this.$=c[h].substring(7);break;case 32:this.$=c[h].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[h].trim(),y.setAccDescription(this.$);break;case 35:c[h-1].unshift({type:"loopStart",loopText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.LOOP_START}),c[h-1].push({type:"loopEnd",loopText:c[h-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[h-1];break;case 36:c[h-1].unshift({type:"rectStart",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_START}),c[h-1].push({type:"rectEnd",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[h-1];break;case 37:c[h-1].unshift({type:"optStart",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_START}),c[h-1].push({type:"optEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[h-1];break;case 38:c[h-1].unshift({type:"altStart",altText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.ALT_START}),c[h-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[h-1];break;case 39:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 40:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 41:c[h-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.CRITICAL_START}),c[h-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[h-1];break;case 42:c[h-1].unshift({type:"breakStart",breakText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_START}),c[h-1].push({type:"breakEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[h-1];break;case 44:this.$=c[h-3].concat([{type:"option",optionText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[h]]);break;case 46:this.$=c[h-3].concat([{type:"and",parText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.PAR_AND},c[h]]);break;case 48:this.$=c[h-3].concat([{type:"else",altText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.ALT_ELSE},c[h]]);break;case 49:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 50:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 51:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 52:case 57:c[h-1].draw="actor",c[h-1].type="addParticipant",this.$=c[h-1];break;case 53:c[h-1].type="destroyParticipant",this.$=c[h-1];break;case 54:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 55:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 56:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 58:this.$=[c[h-1],{type:"addNote",placement:c[h-2],actor:c[h-1].actor,text:c[h]}];break;case 59:c[h-2]=[].concat(c[h-1],c[h-1]).slice(0,2),c[h-2][0]=c[h-2][0].actor,c[h-2][1]=c[h-2][1].actor,this.$=[c[h-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[h-2].slice(0,2),text:c[h]}];break;case 60:this.$=[c[h-1],{type:"addLinks",actor:c[h-1].actor,text:c[h]}];break;case 61:this.$=[c[h-1],{type:"addALink",actor:c[h-1].actor,text:c[h]}];break;case 62:this.$=[c[h-1],{type:"addProperties",actor:c[h-1].actor,text:c[h]}];break;case 63:this.$=[c[h-1],{type:"addDetails",actor:c[h-1].actor,text:c[h]}];break;case 66:this.$=[c[h-2],c[h]];break;case 67:this.$=c[h];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor}];break;case 71:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-4].actor}];break;case 72:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor}];break;case 73:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-4].actor}];break;case 74:this.$=[c[h-5],c[h-1],{type:"addMessage",from:c[h-5].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-5].actor}];break;case 75:this.$=[c[h-3],c[h-1],{type:"addMessage",from:c[h-3].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h]}];break;case 76:this.$={type:"addParticipant",actor:c[h-1],config:c[h]};break;case 77:this.$=c[h-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[h]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[h].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,5]),{9:48,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:At},{23:75,55:76,73:At},{23:77,73:Y},{69:78,72:[1,79],78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],be),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(Dt,i,{7:120}),e(Dt,i,{7:121}),e(Dt,i,{7:122}),e(me,i,{41:123,7:124}),e(Ut,i,{43:125,7:126}),e(Ut,i,{7:126,43:127}),e(Ae,i,{46:128,7:129}),e(Dt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Gt,be,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,161],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,162],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,163],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,47],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,50:[1,165],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,45],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,49:[1,167],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,43],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,48:[1,170],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,171],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Gt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:U,53:G,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(St,[2,12]),e(me,i,{7:124,41:201}),e(Ut,i,{7:126,43:202}),e(Ae,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Gt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(S,v){if(v.recoverable)this.trace(S);else{var P=new Error(S);throw P.hash=v,P}},"parseError"),parse:x(function(S){var v=this,P=[0],y=[],z=[null],c=[],wt=this.table,h="",Ct=0,Se=0,Ze=2,we=1,Qe=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Jt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Jt)&&(gt.yy[Jt]=this.yy[Jt]);J.setInput(S,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Zt=J.yylloc;c.push(Zt);var $e=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(it){P.length=P.length-2*it,z.length=z.length-it,c.length=c.length-it}x(je,"popStack");function Ne(){var it;return it=y.pop()||J.lex()||we,typeof it!="number"&&(it instanceof Array&&(y=it,it=y.pop()),it=v.symbols_[it]||it),it}x(Ne,"lex");for(var rt,xt,ct,Qt,Lt={},Mt,Tt,Pe,Bt;;){if(xt=P[P.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Ne()),ct=wt[xt]&&wt[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var $t="";Bt=[];for(Mt in wt[xt])this.terminals_[Mt]&&Mt>Ze&&Bt.push("'"+this.terminals_[Mt]+"'");J.showPosition?$t="Parse error on line "+(Ct+1)+`: `+J.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[rt]||rt)+"'":$t="Parse error on line "+(Ct+1)+": Unexpected "+(rt==we?"end of input":"'"+(this.terminals_[rt]||rt)+"'"),this.parseError($t,{text:J.match,token:this.terminals_[rt]||rt,line:J.yylineno,loc:Zt,expected:Bt})}if(ct[0]instanceof Array&&ct.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+rt);switch(ct[0]){case 1:P.push(rt),z.push(J.yytext),c.push(J.yylloc),P.push(ct[1]),rt=null,Se=J.yyleng,h=J.yytext,Ct=J.yylineno,Zt=J.yylloc;break;case 2:if(Tt=this.productions_[ct[1]][1],Lt.$=z[z.length-Tt],Lt._$={first_line:c[c.length-(Tt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Tt||1)].first_column,last_column:c[c.length-1].last_column},$e&&(Lt._$.range=[c[c.length-(Tt||1)].range[0],c[c.length-1].range[1]]),Qt=this.performAction.apply(Lt,[h,Se,Ct,gt.yy,ct[1],z,c].concat(Qe)),typeof Qt<"u")return Qt;Tt&&(P=P.slice(0,-1*Tt*2),z=z.slice(0,-1*Tt),c=c.slice(0,-1*Tt)),P.push(this.productions_[ct[1]][0]),z.push(Lt.$),c.push(Lt._$),Pe=wt[P[P.length-2]][P[P.length-1]],P.push(Pe);break;case 3:return!0}}return!0},"parse")},Je=(function(){var ut={EOF:1,parseError:x(function(v,P){if(this.yy.parser)this.yy.parser.parseError(v,P);else throw new Error(v)},"parseError"),setInput:x(function(S,v){return this.yy=v||this.yy||{},this._input=S,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:x(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var v=S.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),S},"input"),unput:x(function(S){var v=S.length,P=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var y=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 z=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===y.length?this.yylloc.first_column:0)+y[y.length-P.length].length-P[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(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:x(function(S){this.unput(this.match.slice(S))},"less"),pastInput:x(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var S=this.pastInput(),v=new Array(S.length+1).join("-");return S+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-B-P0cHus.js b/apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-C2VEYVmu.js similarity index 86% rename from apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-B-P0cHus.js rename to apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-C2VEYVmu.js index c97e030ef..e790a2b6e 100644 --- a/apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-B-P0cHus.js +++ b/apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-C2VEYVmu.js @@ -1 +1 @@ -import{_ as o}from"./mermaid.core-DHQD1STq.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function c(){return!!i()?.mermaidCaptureSizes}o(c,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,c as shouldCaptureSizes}; +import{_ as o}from"./mermaid.core-DpBz6UHc.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function c(){return!!i()?.mermaidCaptureSizes}o(c,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,c as shouldCaptureSizes}; diff --git a/apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-DvqaD8Eo.js b/apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-DxGZaCFf.js similarity index 96% rename from apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-DvqaD8Eo.js rename to apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-DxGZaCFf.js index 67e74c85e..7fc2eb3c5 100644 --- a/apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-DvqaD8Eo.js +++ b/apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-DxGZaCFf.js @@ -1 +1 @@ -import{s as R,a as W,S as N}from"./chunk-EX3LRPZG-CnbEmu7W.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,a7 as _,a8 as U,a3 as C,y as F}from"./mermaid.core-DHQD1STq.js";import{G as O}from"./graph-DOmOIIwC.js";import{l as J}from"./layout-D-LzfAck.js";import"./chunk-XXDRQBXY-AKdWVjUf.js";import"./chunk-VR4S4FIN-CFZ-U2wY.js";import"./chunk-32BRIVSS-BjbI6vv4.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";import"./map-DxJ2ADlA.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},xt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{xt as diagram}; +import{s as R,a as W,S as N}from"./chunk-EX3LRPZG-5GJmdVbS.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,a7 as _,a8 as U,a3 as C,y as F}from"./mermaid.core-DpBz6UHc.js";import{G as O}from"./graph-DOmOIIwC.js";import{l as J}from"./layout-D-LzfAck.js";import"./chunk-XXDRQBXY-BYo5O_6D.js";import"./chunk-VR4S4FIN-JAO0vJUe.js";import"./chunk-32BRIVSS-Dx199TNh.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";import"./map-DxJ2ADlA.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},xt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{xt as diagram}; diff --git a/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-BudL4GKN.js b/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-BudL4GKN.js new file mode 100644 index 000000000..b4051d7d3 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-BudL4GKN.js @@ -0,0 +1 @@ +import{s as r,b as e,a,S as s}from"./chunk-EX3LRPZG-5GJmdVbS.js";import{_ as i}from"./mermaid.core-DpBz6UHc.js";import"./chunk-XXDRQBXY-BYo5O_6D.js";import"./chunk-VR4S4FIN-JAO0vJUe.js";import"./chunk-32BRIVSS-Dx199TNh.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-D-BVu44I.js b/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-D-BVu44I.js deleted file mode 100644 index 16ef35975..000000000 --- a/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-D-BVu44I.js +++ /dev/null @@ -1 +0,0 @@ -import{s as r,b as e,a,S as s}from"./chunk-EX3LRPZG-CnbEmu7W.js";import{_ as i}from"./mermaid.core-DHQD1STq.js";import"./chunk-XXDRQBXY-AKdWVjUf.js";import"./chunk-VR4S4FIN-CFZ-U2wY.js";import"./chunk-32BRIVSS-BjbI6vv4.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-D0t01F1o.js b/apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-BaZl8tge.js similarity index 99% rename from apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-D0t01F1o.js rename to apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-BaZl8tge.js index 70298a77f..1400222ed 100644 --- a/apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-D0t01F1o.js +++ b/apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-BaZl8tge.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-X5ZJPWSS-B-P0cHus.js","assets/mermaid.core-DHQD1STq.js","assets/index-CgXirkUy.js","assets/index-BkulrdXm.css","assets/_commonjsHelpers-CqkleIqs.js"])))=>i.map(i=>d[i]); -import{bR as Er}from"./index-CgXirkUy.js";import{c as Tr}from"./chunk-RYQCIY6F-ClGLd9-g.js";import{am as wr,an as Ar,ao as Rr,ap as Nr,l as Ke,c as Or,ag as Pr,af as Br,ah as kr,at as _r,av as Fr,z as Dr,as as Hr,aw as Xr,y as Oe,ax as Ye,_ as d,ay as Ao}from"./mermaid.core-DHQD1STq.js";import{G as Yr}from"./graph-DOmOIIwC.js";import"./map-DxJ2ADlA.js";import"./_commonjsHelpers-CqkleIqs.js";async function _o(t,e){const n=new Yr({multigraph:!0,compound:!0}),o=[...e.edges],s=Or(),r=t.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),c=r.insert("g").attr("class","edges edgePath"),a=r.insert("g").attr("class","edgeLabels"),l=r.insert("g").attr("class","nodes"),g=new Map,x=t.node()!=null;await Promise.all(e.nodes.map(async I=>{if(I.isGroup)n.setNode(I.id,{...I});else{if(x){const u=await Pr(l,I,{config:s,dir:I.dir}),p=u.node()?.getBBox()??{width:0,height:0};g.set(I.id,u),I.width=p.width,I.height=p.height}n.setNode(I.id,{...I})}}));for(const I of o)n.setEdge(I.start,I.end,{...I},I.id),e.edges.some(p=>p.id===I.id)||e.edges.push(I);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:I}=await Er(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-X5ZJPWSS-B-P0cHus.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2,3,4]));I(t,e)}return{graph:n,groups:{clusters:i,edgePaths:c,edgeLabels:a,nodes:l,rootGroups:r},nodeElements:g}}d(_o,"createGraphWithElements");var Ro=5,Ge=1e-5,$e=1e-6;function qe(t){const e=[];for(let n=0;n<t.length-1;n++)e.push({a:t[n],b:t[n+1]});return e}d(qe,"buildSegmentList");function Fo(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,c=o.y-n.y,a=s*c-r*i;if(a===0)return null;const l=n.x-t.x,g=n.y-t.y,x=(l*c-g*i)/a,I=(l*r-g*s)/a;return x<=$e||x>=1-$e||I<=$e||I>=1-$e?null:{point:{x:t.x+x*s,y:t.y+x*r},tA:x,tB:I}}d(Fo,"segmentIntersection");function vn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}d(vn,"isHorizontalSeg");function Do(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n],s=qe(o.points);for(let r=n+1;r<t.length;r++){const i=t[r],c=qe(i.points);for(const[a,l]of s.entries())for(const[g,x]of c.entries()){const I=Fo(l.a,l.b,x.a,x.b);if(!I)continue;const u=vn(l),p=vn(x);(u!==p?u:!1)?e.push({jumpEdgeId:o.id,otherEdgeId:i.id,segIndex:a,t:I.tA,point:I.point}):e.push({jumpEdgeId:i.id,otherEdgeId:o.id,segIndex:g,t:I.tB,point:I.point})}}}return e}d(Do,"findEdgeIntersections");function re(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}d(re,"fmt");function we(t){return`${re(t.x)},${re(t.y)}`}d(we,"pointToString");function Ho(t){const e=t.b.x-t.a.x,n=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(n)?e>=0?1:0:n>=0?1:0}d(Ho,"getArcSweepFlag");var Gr=.001;function Xo(t,e){if(t.length<2)return t.map(r=>({...r}));const n=t.map(r=>({...r})),o=e.arrowTypeStart&&Ao[e.arrowTypeStart];if(o){const r=t[0],i=t[1],c=Math.atan2(i.y-r.y,i.x-r.x);n[0].x=r.x+o*Math.cos(c),n[0].y=r.y+o*Math.sin(c)}const s=e.arrowTypeEnd&&Ao[e.arrowTypeEnd];if(s){const r=t.length,i=t[r-2],c=t[r-1],a=Math.atan2(c.y-i.y,c.x-i.x);n[r-1].x=c.x-s*Math.cos(a),n[r-1].y=c.y-s*Math.sin(a)}return n}d(Xo,"applyMarkerOffsets");function Yo(t,e,n,o,s){const r=t.point.x,i=t.point.y,c={x:r-e*t.r,y:i-n*t.r},a={x:r+e*t.r,y:i+n*t.r},l=[`L${we(c)}`];return s==="arc"?l.push(`A${re(t.r)},${re(t.r)} 0 0 ${o} ${we(a)}`):l.push(`M${we(a)}`),l}d(Yo,"emitJump");function Ln(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=n.x-e.x,c=n.y-e.y,a=Math.hypot(s,r),l=Math.hypot(i,c);if(a<Ge||l<Ge)return null;const g=s/a,x=r/a,I=i/l,u=c/l,p=g*I+x*u,f=Math.max(-1,Math.min(1,p)),y=Math.acos(f);if(y<Ge||Math.abs(Math.PI-y)<Ge)return null;const v=Math.min(o/Math.sin(y/2),a/2,l/2);return{startX:e.x-g*v,startY:e.y-x*v,endX:e.x+I*v,endY:e.y+u*v,ctrlX:e.x,ctrlY:e.y,cutLen:v}}d(Ln,"computeRoundedCorner");function Go(t,e,n){const o=t.points;if(o.length<2)return"";const s=Xo(o,t),r=t.curve==="rounded",i=qe(s),c=new Map;for(const l of e){const g=i[l.segIndex];if(!g)continue;const x=Math.hypot(g.b.x-g.a.x,g.b.y-g.a.y),I=c.get(l.segIndex)??[];I.push({t:l.t,point:l.point,d:l.t*x,r:n.jumpRadius}),c.set(l.segIndex,I)}const a=[`M${we(s[0])}`];for(let l=0;l<i.length;l++){const g=i[l],x=Math.hypot(g.b.x-g.a.x,g.b.y-g.a.y),I=x===0?0:(g.b.x-g.a.x)/x,u=x===0?0:(g.b.y-g.a.y)/x,p=Ho(g);let f=0;if(r&&l>0){const E=Ln(s[l-1],s[l],s[l+1]??s[l],Ro);E&&(f=E.cutLen)}let y=x,v=null;r&&l<i.length-1&&(v=Ln(s[l],s[l+1],s[l+2]??s[l+1],Ro),v&&(y=x-v.cutLen));const M=[...c.get(l)??[]].sort((E,T)=>E.t-T.t);for(const E of M)E.r=Math.min(E.r,E.d-f,y-E.d);for(let E=0;E<M.length-1;E++){const T=M[E+1].d-M[E].d;if(M[E].r+M[E+1].r>T){const m=T/2;M[E].r=Math.min(M[E].r,m),M[E+1].r=Math.min(M[E+1].r,m)}}for(const E of M)E.r<Gr||a.push(...Yo(E,I,u,p,n.jumpStyle));r&&v?(a.push(`L${re(v.startX)},${re(v.startY)}`),a.push(`Q${re(v.ctrlX)},${re(v.ctrlY)} ${re(v.endX)},${re(v.endY)}`)):a.push(`L${we(g.b)}`)}return a.join(" ")}d(Go,"rewriteEdgePath");function $o(t){return/^[\d\s+,.LMelm-]*$/.test(t)}d($o,"isStraightPath");function zo(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}d(zo,"curveSupportsLineHops");function Vo(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),n=JSON.parse(e);if(!Array.isArray(n))return null;const o=[];for(const s of n)s&&typeof s.x=="number"&&typeof s.y=="number"&&o.push({x:s.x,y:s.y});return o.length>=2?o:null}catch{return null}}d(Vo,"decodeDataPoints");function jo(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const s=new Map;for(const l of e)s.set(l.id,l);const r=[],i=new Map;for(const l of e){const g=typeof CSS<"u"&&CSS.escape?CSS.escape(l.id):l.id,x=o.querySelector(`path[data-id="${g}"]`);if(!x)continue;i.set(l.id,x);const u=Vo(x.getAttribute("data-points"))??l.points;r.push({...l,points:u})}const c=Do(r);if(c.length===0)return;const a=new Map;for(const l of c){const g=a.get(l.jumpEdgeId)??[];g.push(l),a.set(l.jumpEdgeId,g)}for(const l of r){const g=a.get(l.id);if(!g||g.length===0)continue;const I=s.get(l.id)?.curve;if(I!==void 0&&!zo(I))continue;const u=i.get(l.id);if(!u)continue;if(I===void 0){const E=u.getAttribute("d")??"";if(!$o(E))continue}const p=u.getAttribute("style")??"",f=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(p),y=f?Number.parseFloat(f[1]):null,v=f?Number.parseFloat(f[2]):null,M=Go(l,g,n);if(u.setAttribute("d",M),y!==null&&v!==null&&typeof u.getTotalLength=="function"){const E=u.getTotalLength(),T=Math.max(0,E-y-v),m=`0 ${y} ${T} ${v}`,S=p.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${m};`).replace(/;\s*;+/g,";");u.setAttribute("style",S)}}}d(jo,"applyLineJumpsToSvg");async function Uo(t,e){for(const s of t.nodes)s.isGroup?await Br(e.clusters,s):kr(s);const n=new Map;for(const s of t.nodes)s?.id&&n.set(s.id,s);for(const s of t.edges){const r=s.start?n.get(s.start)??{}:{},i=s.end?n.get(s.end)??{}:{},c=_r(e.edgePaths,{...s},{},t.type,r,i,t.diagramId);s.label&&await Fr(e.rootGroups,s),s.label&&Wo(s,c)}const o=t.config?.swimlane?.lineHops;if(o!==!1){const s=o==="gap"?"gap":"arc",r=t.edges.filter(i=>Array.isArray(i.points)&&i.points.length>=2).map(i=>({id:i.id,points:i.points,curve:i.curve,arrowTypeStart:i.arrowTypeStart,arrowTypeEnd:i.arrowTypeEnd}));jo(e.edgePaths,r,{enabled:!0,jumpRadius:6,jumpStyle:s})}}d(Uo,"adjustLayout");function Wo(t,e){const n=e?.updatedPath??e?.originalPath,o=Dr(),{subGraphTitleTotalMargin:s}=Hr({flowchart:o.flowchart??{}});if(t.label){const r=Xr.get(t.id);let i=t.x,c=t.y;if(n){const a=Oe.calcLabelPosition(n);Ke.debug("Moving label "+t.label+" from (",i,",",c,") to (",a.x,",",a.y,") abc88"),e&&(i=a.x,c=a.y)}r.attr("transform",`translate(${i}, ${c+s/2})`)}if(t?.startLabelLeft){const r=Ye.get(t.id).startLeft;let i=t?.x,c=t?.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.startLabelRight){const r=Ye.get(t.id).startRight;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.endLabelLeft){const r=Ye.get(t.id).endLeft;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.endLabelRight){const r=Ye.get(t.id).endRight;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}}d(Wo,"positionEdgeLabel");var Mn="__swimlane_default__",$r=21,No=20;function En(t){return Math.max(t.padding??No,No)}d(En,"topLaneHorizontalPadding");function Ko(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const i=n-s/2,c=Math.min(r,n+s/2),a=Math.min($r,Math.max(0,c-i)),l=i+a;if(l<=i){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:i,bottom:l}}d(Ko,"assignTopLaneTitleRect");function qo(t){const e=t.direction,n=t.nodes??=[];for(const r of t.nodes??[])r.isGroup&&!r.parentId&&(r.shape="swimlane",e&&(r.direction=e));const o=n.filter(r=>!r.isGroup&&!r.parentId);if(o.length===0)return;let s=n.find(r=>r.id===Mn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:Mn,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(s));for(const r of o)r.parentId=Mn}d(qo,"prepareLayoutForSwimlanes");function Jo(t){const e=new Map;for(const a of t.nodes??[])e.set(a.id,a);const n=[];for(const a of t.edges??[]){const l=typeof a.start=="string"?a.start:void 0,g=typeof a.end=="string"?a.end:void 0;!l||!g||a.labelNodeId||n.push({id:a.id,src:l,dst:g,ref:a})}const o=t.nodes??[],s=o.filter(a=>a.isGroup),r=o.filter(a=>!a.isGroup);return{nodes:[...[...s].reverse(),...r].map(a=>a.id),edges:n,layout:t,nodeById:e}}d(Jo,"toGraphView");function Zo(t,e,n,o){const{layout:s}=t,r=t.nodeById,i=o?.layerGap??100,c=o?.nodeGap??40;let a=0;for(const I of e.layers){let u=0;for(const p of I){const f=r.get(p);if(!f){u++;continue}f.layer=a,f.order=u;const y=n.x[p]??u*c,v=n.y[p]??a*i;f.x=y,f.y=v,u++}a++}const l=s.nodes??[],g=new Map,x=[];for(const I of l){if(!I?.isGroup)continue;I.parentId||x.push(I);const u=l.filter(M=>M.parentId===I.id);let p=1/0,f=-1/0,y=1/0,v=-1/0;for(const M of u){const E=M.x??n.x[M.id],T=M.y??n.y[M.id],m=M.width??0,S=M.height??0;E!=null&&T!=null&&(p=Math.min(p,E-m/2),f=Math.max(f,E+m/2),y=Math.min(y,T-S/2),v=Math.max(v,T+S/2))}if(p===1/0||y===1/0)I.x=I.x??0,I.y=I.y??0,I.width=I.width??0,I.height=I.height??0;else{const M=I.padding??20,E=I.parentId?M:2*En(I),T=M,m=Math.max(0,f-p)+E,S=Math.max(0,v-y)+T,A=(p+f)/2,R=(y+v)/2;I.x=A,I.y=R,I.width=m,I.height=S,g.set(I.id,{minX:p,maxX:f,minY:y,maxY:v})}}if(x.length>0&&g.size>0){let I=1/0,u=-1/0,p=0;for(const f of x){const y=f.padding??20;y>p&&(p=y);const v=g.get(f.id);v&&(I=Math.min(I,v.minY),u=Math.max(u,v.maxY))}if(I!==1/0&&u!==-1/0){const f=Math.max(0,u-I),v=Math.max(p,36),M=f+2*v,E=(I+u)/2;for(const k of x)k.y=E,k.height=M,k.swimlaneContentTop=I;const T=[...x].sort((k,O)=>{const _=k.x??0,H=O.x??0;return _-H}),m=[],S=[],A=[];for(const k of T){const O=g.get(k.id);if(!O)continue;const _=Math.max(0,O.maxX-O.minX)+2*En(k),H=(O.minX+O.maxX)/2;m.push(k.id),S.push(H),A.push(_)}const R=m.length;if(R>0){const k=new Map;if(R===1)k.set(m[0],A[0]);else{const O=[];for(let j=0;j<R-1;j++)O.push(S[j+1]-S[j]);const _=new Array(R);_[0]=0;for(let j=0;j<R-1;j++)_[j+1]=2*O[j]-_[j];let H=0,P=Number.POSITIVE_INFINITY;for(let j=0;j<R;j++){const J=A[j];j%2===0?H=Math.max(H,J-_[j]):P=Math.min(P,_[j]-J)}let G=H;H<=P?G=(H+P)/2:G=H;for(let j=0;j<R;j++){const J=_[j]+(j%2===0?G:-G),dt=Math.max(A[j],J);k.set(m[j],dt)}}for(const O of x){const _=k.get(O.id);_!=null&&(O.width=_),Ko(O)}}}}}d(Zo,"writeBackToLayoutData");var zr="[EdgeLabelNodes]";function Qo(t){const e=[],n=[],o=new Map;for(const i of t.nodes)o.set(i.id,i);for(const i of t.edges){if(!i.label||i.label.length===0||i.isLayoutOnly||i.labelNodeId)continue;const c=i.start?o.get(i.start):void 0,a=i.end?o.get(i.end):void 0;if(!c||!a){Ke.warn(zr,`Edge ${i.id} has missing source or target node`);continue}const l=`edge-label-${i.start}-${i.end}-${i.id}`,x=c.parentId!==a.parentId?a.parentId:c.parentId,I={id:l,label:i.label,edgeStart:i.start??"",edgeEnd:i.end??"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:x,isGroup:!1,labelStyle:Array.isArray(i.labelStyle)?i.labelStyle[0]:i.labelStyle??"",...c.dir?{dir:c.dir}:{}};e.push(I),i.labelNodeId=l,i.label=void 0,i.text=void 0;const u={id:`${i.id}-to-label`,start:i.start,end:l,type:"normal",isLayoutOnly:!0},p={id:`${i.id}-from-label`,start:l,end:i.end,type:"normal",isLayoutOnly:!0};n.push(u,p)}const s=[...t.nodes,...e],r=[...t.edges,...n];return{...t,nodes:s,edges:r}}d(Qo,"createEdgeLabelNodes");var Ft=.001;function oo(t){const e=t.x??0,n=t.y??0,o=t.width??0,s=t.height??0;return o>0&&s>0?{cx:e,cy:n,rect:Ae(e,n,o,s)}:void 0}d(oo,"measuredNodeRect");function so(t){if(t.isGroup)return;const e=oo(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}d(so,"nodeBoundsInfoFor");function oe(t,e,n=Ft){return Math.abs(t.x-e.x)<n&&Math.abs(t.y-e.y)<n}d(oe,"samePoint");function ft(t,e,n=Ft){return Math.abs(t.x-e.x)<n}d(ft,"sameX");function ht(t,e,n=Ft){return Math.abs(t.y-e.y)<n}d(ht,"sameY");function Tt(t,e,n=Ft){return ht(t,e,n)&&Math.abs(t.x-e.x)>n}d(Tt,"isHorizontalSegment");function wt(t,e,n=Ft){return ft(t,e,n)&&Math.abs(t.y-e.y)>n}d(wt,"isVerticalSegment");function zt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}d(zt,"overlapLength");function ce(t,e,n=Ft){return t.horizontal&&e.horizontal&&ht(t.a,e.a,n)?zt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&ft(t.a,e.a,n)?zt(t.a.y,t.b.y,e.a.y,e.b.y):0}d(ce,"sameAxisSegmentOverlapLength");function Re(t,e=Ft){const n=[];for(let o=0;o<t.length-1;o++){const s=t[o],r=t[o+1],i=Tt(s,r,e),c=wt(s,r,e);(i||c)&&n.push({index:o,a:s,b:r,horizontal:i,vertical:c})}return n}d(Re,"orthogonalSegmentsForPoints");function Qt(t,e=Ft){const n=Re(t,e);let o=0;for(let s=1;s<n.length;s++)n[s-1].horizontal!==n[s].horizontal&&o++;return o}d(Qt,"countOrthogonalBends");function pt(t,e=Ft){const n=[];for(const o of t){const s=n.length>0?n[n.length-1]:void 0;(!s||!oe(s,o,e))&&n.push({x:o.x,y:o.y})}return n}d(pt,"dedupeConsecutivePoints");function ro(t,e=Ft){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Tt(n,o,e)&&wt(o,s,e)&&Tt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:wt(n,o,e)&&Tt(o,s,e)&&wt(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}d(ro,"classifyThreeSegmentRoute");function cn(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),c=Math.max(t.y,e.y);return r>n.left-o&&s<n.right+o&&c>n.top-o&&i<n.bottom+o}d(cn,"segmentBoundsOverlapRect");function io(t,e,n=0){return t.x>e.left+n&&t.x<e.right-n&&t.y>e.top+n&&t.y<e.bottom-n}d(io,"pointInsideRect");function ts(t,e){return t.left<=e.left&&t.right>=e.right&&t.top<=e.top&&t.bottom>=e.bottom}d(ts,"rectContainsRect");function Je(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}d(Je,"rectsOverlap");function Tn(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}d(Tn,"inflateRect");function Ae(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}d(Ae,"rectFromCenterSize");function qt(t){return oo(t)?.rect}d(qt,"rectOfNodeBounds");function Ie(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}d(Ie,"portForRectSide");function co(t,e,n,o,s,r=Ft){const i=e==="left"||e==="right",c=o==="left"||o==="right";if(i&&c){if(e==="right"&&o==="left"&&t.x<n.x||e==="left"&&o==="right"&&t.x>n.x){if(ht(t,n,r))return[t,n];const x=(t.x+n.x)/2;return[t,{x,y:t.y},{x,y:n.y},n]}if(e===o){if(ht(t,n,r))return;const x=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x,y:t.y},{x,y:n.y},n]}return}if(!i&&!c){if(e===o){if(ft(t,n,r))return;const I=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:I},{x:n.x,y:I},n]}if(!(e==="bottom"&&o==="top"&&t.y<n.y||e==="top"&&o==="bottom"&&t.y>n.y))return;if(ft(t,n,r))return[t,n];const x=(t.y+n.y)/2;return[t,{x:t.x,y:x},{x:n.x,y:x},n]}if(i&&!c){const g=e==="right"&&n.x>t.x||e==="left"&&n.x<t.x,x=o==="top"&&t.y<n.y||o==="bottom"&&t.y>n.y;return g&&x?[t,{x:n.x,y:t.y},n]:void 0}const a=e==="bottom"&&n.y>t.y||e==="top"&&n.y<t.y,l=o==="left"&&t.x<n.x||o==="right"&&t.x>n.x;return a&&l?[t,{x:t.x,y:n.y},n]:void 0}d(co,"buildOrthogonalPortPath");function ao(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}d(ao,"buildSameSideTrackPath");function an(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=so(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}d(an,"collectRealNodeBounds");function me(t){const e=[],n=[];for(const o of t){const s=so(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}d(me,"collectNodeRectEntries");function es(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,i=o.width??0,c=o.height??0;n.push({nodeId:o.id,...Ae(s,r,i,c)})}return n}d(es,"collectLayoutNodeRects");function lo(t,e,n=Ft){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),i=e.get(s);if(!(!r||!i))return{srcId:o,dstId:s,srcInfo:r,dstInfo:i,collinearX:Math.abs(r.cx-i.cx)<n,collinearY:Math.abs(r.cy-i.cy)<n}}d(lo,"getNodePairGeometry");function At(t,e,n,o=[],s=0){for(const r of n)if(!o.includes(r.id)&&cn(t,e,r.rect,-s))return!0;return!1}d(At,"segmentHitsAnyRect");function fo(t,e,n,o,s=Ft,r=1e-6){const i=ht(t,e,s),c=ft(t,e,s),a=ht(n,o,s),l=ft(n,o,s);if(i&&a||c&&l||!(i||c)||!(a||l))return!1;const g=i?{a:t,b:e}:{a:n,b:o},x=c?{a:t,b:e}:{a:n,b:o},I=g.a.y,u=Math.min(g.a.x,g.b.x),p=Math.max(g.a.x,g.b.x),f=x.a.x,y=Math.min(x.a.y,x.b.y),v=Math.max(x.a.y,x.b.y);if(f<u||f>p||I<y||I>v)return!1;const M=Math.abs(f-g.a.x)<r&&Math.abs(I-g.a.y)<r||Math.abs(f-g.b.x)<r&&Math.abs(I-g.b.y)<r,E=Math.abs(f-x.a.x)<r&&Math.abs(I-x.a.y)<r||Math.abs(f-x.b.x)<r&&Math.abs(I-x.b.y)<r;return!(M&&E)}d(fo,"orthogonalSegmentsCross");function ns(t,e,n,o,s=Ft){const r=ht(t,e,s),i=ft(t,e,s),c=ht(n,o,s),a=ft(n,o,s);return i&&a&&ft(t,n,s)?zt(t.y,e.y,n.y,o.y)>s:r&&c&&ht(t,n,s)?zt(t.x,e.x,n.x,o.x)>s:!1}d(ns,"sameAxisSegmentsOverlap");function Ze(t,e,n,o,{epsilon:s=Ft,skipDegenerateOther:r=!1}={}){for(const i of n){if(i===o||i.isLayoutOnly)continue;const c=i.points;if(!(!c||c.length<2))for(let a=0;a<c.length-1;a++){const l=c[a],g=c[a+1];if(!(r&&oe(l,g,s))&&(fo(t,e,l,g,s)||ns(t,e,l,g,s)))return!0}}return!1}d(Ze,"segmentConflictsWithAnyEdge");function le(t,e,n,o,s=Ft){const r=ht(t,e,s),i=ft(t,e,s),c=ht(n,o,s),a=ft(n,o,s);if(!(r&&a||i&&c))return!1;const l=r?{a:t,b:e}:{a:n,b:o},g=r?{a:n,b:o}:{a:t,b:e},x=l.a.y,I=Math.min(l.a.x,l.b.x),u=Math.max(l.a.x,l.b.x),p=g.a.x,f=Math.min(g.a.y,g.b.y),y=Math.max(g.a.y,g.b.y);return p>I+s&&p<u-s&&x>f+s&&x<y-s}d(le,"orthogonalSegmentsStrictlyCross");function wn(t,e,n){const o=Math.min(e,n),s=Math.max(e,n);return t>o+Ft&&t<s-Ft}d(wn,"strictlyBetween");function os(t,e,n){return ft(t,e)&&ft(e,n)?wn(e.y,t.y,n.y):ht(t,e)&&ht(e,n)?wn(e.x,t.x,n.x):!1}d(os,"isCollinearIntermediate");function ss(t){let e=!1;const n=[];for(let o=0;o<t.length;o++){const s=n[n.length-1],r=t[o],i=o+1<t.length?t[o+1]:void 0;if(s&&i){if(oe(s,i)){o++,e=!0;continue}if(os(s,r,i)){e=!0;continue}}n.push(r)}return{points:n,changed:e}}d(ss,"simplifyPolylineOnce");function Qe(t){const e=[t[0]];for(let o=1;o<t.length;o++){const s=e[e.length-1],r=t[o];if(!ft(s,r)&&!ht(s,r)){const i=e.length>=2?e[e.length-2]:void 0,a=(i?ft(i,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(a)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!oe(s,o))&&n.push(o)}return n}d(Qe,"orthogonalizePolyline");function ae(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=ss(e);if(e=o.points,!o.changed)break}return e}d(ae,"simplifyPolyline");var nt=.001,Vr=.5,Oo=4;function uo(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length<n)return;const s=o.start?e.get(o.start):void 0,r=o.end?e.get(o.end):void 0;return{edge:o,points:o.points,srcRect:s?qt(s):void 0,dstRect:r?qt(r):void 0}}d(uo,"endpointContextFor");function rs(t,e,n){if(ht(t,e,nt))return{x:t.x<n.left?n.left:n.right,y:t.y};if(ft(t,e,nt)){const o=t.y<n.top?n.top:n.bottom;return{x:t.x,y:o}}return{x:Math.min(n.right,Math.max(n.left,t.x)),y:Math.min(n.bottom,Math.max(n.top,t.y))}}d(rs,"segmentEnterPoint");function An(t,e,n){const o=n?1:-1;let s=n?0:t.length-1;for(;s>=0&&s<t.length&&io(t[s],e,Vr);)s+=o;if(s<0||s>=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const i=rs(t[s],t[r],e);return n?[i,...t.slice(s)]:[...t.slice(0,s+1),i]}d(An,"clipEndpoint");function is(t,e){for(const n of t){const o=uo(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=An(s,o.srcRect,!0)),o.dstRect&&(s=An(s,o.dstRect,!1)),s=ae(Qe(s)),s=ho(s,o.srcRect,o.dstRect),o.edge.points=ae(Qe(s))}}d(is,"clipEdgeEndpointsToNodeBoundaries");function Rn(t,e,n,o=!1){if(ht(t,e,nt)){if(e.y<n.top-nt||e.y>n.bottom+nt)return e;if(o){if(t.x<n.left-nt)return{x:n.left,y:t.y};if(t.x>n.right+nt)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(ft(t,e,nt)){if(e.x<n.left-nt||e.x>n.right+nt)return e;if(o){if(t.y<n.top-nt)return{x:t.x,y:n.top};if(t.y>n.bottom+nt)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}d(Rn,"snapEndpointToBoundary");function tn(t,e,n){const o=t[e];for(let s=e+n;s>=0&&s<t.length;s+=n){const r=t[s];if(!oe(r,o,nt))return r}return t[e+n]}d(tn,"firstDistinctAdjacent");function en(t,e){const n=t+Oo,o=e-Oo;return n<=o?{lo:n,hi:o}:{lo:(t+e)/2,hi:(t+e)/2}}d(en,"cornerClearanceRange");function Nn(t,e,n){const{lo:o,hi:s}=en(e,n);return Math.min(s,Math.max(o,t))}d(Nn,"clampToCornerClearance");function cs(t){const e=Math.max(...t.map(o=>o.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}d(cs,"intersectRanges");function On(t,e){return e==="left"||e==="right"?en(t.top,t.bottom):en(t.left,t.right)}d(On,"clearanceRangeForSide");function nn(t,e,n){const o=t.y>=n.top-nt&&t.y<=n.bottom+nt,s=t.x>=n.left-nt&&t.x<=n.right+nt;if(ht(t,e,nt)&&o){if(Math.abs(t.x-n.left)<nt)return"left";if(Math.abs(t.x-n.right)<nt)return"right"}if(ft(t,e,nt)&&s){if(Math.abs(t.y-n.top)<nt)return"top";if(Math.abs(t.y-n.bottom)<nt)return"bottom"}}d(nn,"terminalSideForSegment");function Pe(t){return t==="left"||t==="right"}d(Pe,"isHorizontalSide");function as(t,e,n,o,s){const r=[],i=n?nn(t,e,n):void 0,c=o?nn(e,t,o):void 0;return n&&i&&Pe(i)===s&&r.push(On(n,i)),o&&c&&Pe(c)===s&&r.push(On(o,c)),r.length>0?cs(r):void 0}d(as,"straightClearanceRange");function Pn(t,e,n,o,s){const r=as(t,e,n,o,s);if(!r)return;const i=s?t.y:t.x,c=Math.min(r.hi,Math.max(r.lo,i));if(!(Math.abs(c-i)<nt))return s?[{x:t.x,y:c},{x:e.x,y:c}]:[{x:c,y:t.y},{x:c,y:e.y}]}d(Pn,"clearStraightEndpointCornerAxis");function ho(t,e,n){if(t.length!==2)return t;const[o,s]=t;return ht(o,s,nt)?Pn(o,s,e,n,!0)??t:ft(o,s,nt)?Pn(o,s,e,n,!1)??t:t}d(ho,"clearStraightEndpointCornerConnections");function ls(t,e,n){return Pe(n)?{x:t.x,y:Nn(t.y,e.top,e.bottom)}:{x:Nn(t.x,e.left,e.right),y:t.y}}d(ls,"cornerClearedEndpoint");function fs(t,e,n,o,s,r){const i=t.map(c=>({...c}));for(let c=e;c>=0&&c<t.length;c+=n){const a=t[c];if(r&&!ht(a,o,nt)||!r&&!ft(a,o,nt))break;r?i[c].y=s.y:i[c].x=s.x}return i}d(fs,"moveCollinearEndpointRun");function Bn(t,e,n){if(t.length<2)return t;const o=n?0:t.length-1,s=n?1:-1,r=t[o],i=tn(t,o,s);if(!i)return t;const c=nn(r,i,e);if(!c)return t;const a=Pe(c),l=ls(r,e,c);return oe(r,l,nt)?t:fs(t,o,s,r,l,a)}d(Bn,"clearEndpointCornerConnection");function kn(t,e,n){const o=Math.min(t.x,e.x)>=n.left-nt&&Math.max(t.x,e.x)<=n.right+nt,s=Math.min(t.y,e.y)>=n.top-nt&&Math.max(t.y,e.y)<=n.bottom+nt;if(Math.abs(t.y-n.top)<nt&&Math.abs(e.y-n.top)<nt&&o)return"top";if(Math.abs(t.y-n.bottom)<nt&&Math.abs(e.y-n.bottom)<nt&&o)return"bottom";if(Math.abs(t.x-n.left)<nt&&Math.abs(e.x-n.left)<nt&&s)return"left";if(Math.abs(t.x-n.right)<nt&&Math.abs(e.x-n.right)<nt&&s)return"right"}d(kn,"borderSideForSegment");function _n(t,e,n,o){switch(t){case"top":return ft(e,n,nt)&&n.y<o.top-nt;case"bottom":return ft(e,n,nt)&&n.y>o.bottom+nt;case"left":return ht(e,n,nt)&&n.x<o.left-nt;case"right":return ht(e,n,nt)&&n.x>o.right+nt}}d(_n,"leavesOutward");function Fn(t,e,n){if(t.length<3)return t;if(n){const r=kn(t[0],t[1],e);return r&&_n(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=kn(t[o-1],t[o],e);return s&&_n(s,t[o-1],t[o-2],e)?t.slice(0,o):t}d(Fn,"collapseOwnBorderStub");function ds(t,e,n){let o=t;if(e){const r=tn(o,0,1);if(r){const i=Rn(r,o[0],e);i!==o[0]&&(o=[i,...o.slice(1)])}o=Fn(o,e,!0)}if(n){const r=o.length-1,i=tn(o,r,-1);if(i){const c=Rn(i,o[r],n,!0);c!==o[r]&&(o=[...o.slice(0,r),c])}o=Fn(o,n,!1)}const s=ho(o,e,n);return s!==o||o.length===2?s:(e&&(o=Bn(o,e,!0)),n&&(o=Bn(o,n,!1)),o)}d(ds,"snapAndCollapseEndpoints");function Dn(t,e){for(const n of t){const o=uo(n,e,2);if(!o)continue;const s=pt(o.points,nt),r=ds(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=i}}d(Dn,"prepareEdgeEndpointsForRenderer");function go(t){return new Map(t.map(e=>[e.id,e]))}d(go,"buildNodeMap");function us(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!s?.isGroup)break;o=s.id,n=s.parentId}return o}d(us,"resolveTopLevelGroupId");function Hn(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!s?.isGroup)break;n++,o=s.parentId}return n}d(Hn,"groupDepth");function po(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const i=r.x,c=r.y;if(typeof i!="number"||typeof c!="number")continue;const a=r.width??0,l=r.height??0;e=Math.min(e,i-a/2),n=Math.max(n,i+a/2),o=Math.min(o,c-l/2),s=Math.max(s,c+l/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}d(po,"boundsForChildren");function hs(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}d(hs,"applyGroupBounds");function gs(t){const e=go(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>Hn(s,e)-Hn(o,e));for(const o of n){const s=t.filter(i=>i.parentId===o.id),r=po(s);r&&hs(o,r)}}d(gs,"recomputeNestedGroupBounds");function on(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(a=>!a.isGroup);let r=1/0,i=-1/0;for(const a of s){const l=a[e];typeof l=="number"&&(r=Math.min(r,l),i=Math.max(i,l))}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const c=d(a=>r+i-a,"mirror");for(const a of n){const l=a[e];typeof l=="number"&&(a[e]=c(l));const g=a.groupTitleRect;g&&(a.groupTitleRect=e==="x"?{...g,left:c(g.right),right:c(g.left)}:{...g,top:c(g.bottom),bottom:c(g.top)})}for(const a of o)for(const l of a.points??[])l[e]=c(l[e]);return!0}d(on,"mirrorAxis");function ps(t){return(t.nodes??[]).some(n=>!n.isGroup)?on(t,"y"):!0}d(ps,"applyBtDirectionTransform");function ms(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(P=>!P.isGroup);let r=1/0,i=1/0;for(const P of s){const G=P.x??0,j=P.y??0;G<r&&(r=G),j<i&&(i=j)}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const c=36;let a=0,l=0;for(const P of s)a+=P.width??0,l+=P.height??0;const g=a/s.length,x=l/s.length,I=x>0?Math.max(1,g/x):1;for(const P of s){const G=P.x??0,J=((P.y??0)-i)*I+c,dt=G-r;P.x=J,P.y=dt}for(const P of o)if(P.points)for(const G of P.points){const j=G.x,dt=(G.y-i)*I+c,mt=j-r;G.x=dt,G.y=mt}gs(n);const u=n.filter(P=>P.isGroup&&!P.parentId);if(u.length===0)return e==="RL"&&on(t,"x"),!0;const p=go(n),f=new Map;for(const P of n){if(P.isGroup)continue;const G=us(P,p);if(!G)continue;const j=f.get(G)??[];j.push(P),f.set(G,j)}let y=0;for(const P of u){const G=P.padding??0;G>y&&(y=G)}const v=[];let M=1/0,E=-1/0;for(const P of u){const G=f.get(P.id)??[],j=po(G);j&&(M=Math.min(M,j.minX),E=Math.max(E,j.maxX),v.push({lane:P,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(M===1/0||E===-1/0)return!0;const T=Math.max(0,E-M),m=Math.max(y,10),S=T+2*m,A=c+S,O=(M+E)/2-S/2-c,_=O+A/2,H=Math.max(y,c);v.sort((P,G)=>P.centerY-G.centerY);for(let P=0;P<v.length;P++){const G=v[P];let j,J;if(P===0?j=G.contentTop-H:j=(v[P-1].contentBottom+G.contentTop)/2,P===v.length-1)J=G.contentBottom+H;else{const kt=v[P+1];J=(G.contentBottom+kt.contentTop)/2}const dt=Math.max(0,J-j),mt=(j+J)/2;G.lane.x=_,G.lane.y=mt,G.lane.width=A,G.lane.height=dt,G.lane.swimlaneContentTop=G.contentTop,G.lane.groupTitleRect={left:O,right:O+c,top:j,bottom:J}}return e==="RL"&&on(t,"x"),!0}d(ms,"applyLrDirectionTransform");var se=1e-6,jr=8,ze=jr,Ur=[0,ze,-ze,2*ze,-2*ze];function ys(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e);for(const s of t){if(s.isLayoutOnly)continue;const r=s.points;if(!r||r.length<4)continue;const i=ro(pt(r,se),se);if(!i)continue;const{p3:c}=i,a=i.kind==="HVH",l=lo(s,n,se);if(!l)continue;const{srcId:g,dstId:x,srcInfo:I,dstInfo:u,collinearX:p,collinearY:f}=l;if(p||f)continue;let y;const v=I.rect;for(const M of Ur){let E,T,m;if(a){const _=u.cy>I.cy?v.bottom:v.top,H=I.cx+M;if(H<=v.left+se||H>=v.right-se)continue;E={x:H,y:_},T={x:H,y:c.y},m={x:c.x,y:c.y}}else{const _=u.cx>I.cx?v.right:v.left,H=I.cy+M;if(H<=v.top+se||H>=v.bottom-se)continue;E={x:_,y:H},T={x:c.x,y:H},m={x:c.x,y:c.y}}const S=oe(E,T,se),A=oe(T,m,se);if(S&&A||!S&&At(E,T,o,[g],1)||!A&&At(T,m,o,[x],1))continue;const R=!S&&Ze(E,T,t,s,{epsilon:se,skipDegenerateOther:!0}),k=!A&&Ze(T,m,t,s,{epsilon:se,skipDegenerateOther:!0});if(!(R||k)){S?y=[T,m]:A?y=[E,T]:y=[E,T,m];break}}y&&(s.points=y)}}d(ys,"portSwapToLShape");function xs(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values());for(const c of t){if(c.isLayoutOnly)continue;const a=c.points;if(!a||a.length<4)continue;const l=pt(a,.001);if(l.length<4)continue;const g=l.length-1,x=l[g],I=l[g-1],u=l[g-2],p=x.x-I.x,f=x.y-I.y,y=Math.hypot(p,f);if(y>=10||y<.001)continue;const v=I.x-u.x,M=I.y-u.y;if(Math.hypot(v,M)<.001)continue;const T=Tt(I,x,.001),m=wt(I,x,.001),S=Tt(u,I,.001),A=wt(u,I,.001);if(!(T&&A||m&&S))continue;const R=c.end,k=c.start,O=R?e.get(R):void 0;if(!O)continue;const _=O.x??0,H=O.y??0,P=qt(O);if(!P)continue;let G,j;if(A){const W=M<0;G={x:_,y:u.y},j={x:_,y:W?P.bottom:P.top}}else{const W=v>0;G={x:u.x,y:H},j={x:W?P.right:P.left,y:H}}if(At(G,j,r,R?[R]:[],-2)||At(G,j,i,[],-2))continue;if(k){const W=e.get(k),et=W?qt(W):void 0;if(et&&io(G,et,2))continue}const J=d((W,et)=>`${W.x.toFixed(3)},${W.y.toFixed(3)}|${et.x.toFixed(3)},${et.y.toFixed(3)}`,"ownSegmentKey"),dt=new Set;for(let W=0;W<l.length-1;W++)dt.add(J(l[W],l[W+1]));const mt=d((W,et)=>{for(const at of t){if(at===c||at.isLayoutOnly)continue;const gt=at.points;if(!(!gt||gt.length<2))for(let xt=0;xt<gt.length-1;xt++){const vt=gt[xt],Vt=gt[xt+1];if(!dt.has(J(vt,Vt))&&le(W,et,vt,Vt,.001))return!0}}return!1},"segmentCrossesOtherEdge");if(mt(G,j))continue;if(g-3>=0){const W=l[g-3],et=[k,R].filter(at=>!!at);if(At(W,G,r,et,-2)||mt(W,G))continue}const Pt=[...l.slice(0,g-2),G,j];c.points=Pt;const Q=c.labelNodeId;if(Q){const W=e.get(Q);if(W){const et=W.width??0,at=W.height??0;if(et>0&&at>0){let gt,xt,vt=-1;for(let Vt=0;Vt<Pt.length-1;Vt++){const jt=Pt[Vt],Ut=Pt[Vt+1],te=Math.hypot(Ut.x-jt.x,Ut.y-jt.y),Se=ht(jt,Ut,.001),de=ft(jt,Ut,.001);(Se&&te>=et+2||de&&te>=at+2)&&te>vt&&(vt=te,gt=(jt.x+Ut.x)/2,xt=(jt.y+Ut.y)/2)}gt!==void 0&&xt!==void 0&&(W.x=gt,W.y=xt)}}}}}d(xs,"collapseShortTerminalStub");var Z=.001,_t=8,it=Re,In=d((t,e)=>ft(t,e,Z)||ht(t,e,Z),"orthogonallyAligned");function bs(t,e){const s=d((u,p)=>{const f=u.x??0,y=u.y??0,v=p.x-f,M=p.y-y;let E=(u.width??0)/2,T=(u.height??0)/2;return Math.abs(M)*E>Math.abs(v)*T?(M<0&&(T=-T),{x:f+(M===0?0:T*v/M),y:y+T}):(v<0&&(E=-E),{x:f+E,y:y+(v===0?0:E*M/v)})},"rectIntersect"),r=d((u,p)=>{const f=pt(u.points??[]);if(f.length<2)return;const y=p?u.start:u.end,v=y?e.get(y):void 0,M=v?qt(v):void 0;if(!v||!y||!M)return;const E=p?f[0]:f[f.length-1],T=p?f[1]:f[f.length-2],m=s(v,E);let S=E;if(In(T,m)&&(S=T),ft(m,S,Z))return{edge:u,edgeId:String(u.id??""),nodeId:y,atStart:p,orientation:"V",coord:m.x,min:Math.min(m.y,S.y),max:Math.max(m.y,S.y),boundary:m,railEnd:S,rect:M};if(ht(m,S,Z))return{edge:u,edgeId:String(u.id??""),nodeId:y,atStart:p,orientation:"H",coord:m.y,min:Math.min(m.x,S.x),max:Math.max(m.x,S.x),boundary:m,railEnd:S,rect:M}},"terminalLaneFor"),i=d((u,p)=>Math.max(0,Math.min(u.max,p.max)-Math.max(u.min,p.min)),"projectedOverlapLength"),c=d((u,p)=>u.nodeId!==p.nodeId||u.orientation!==p.orientation?!1:u.orientation==="H"?(Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1)&&ft(u.boundary,p.boundary,1):(Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1)&&ht(u.boundary,p.boundary,1),"sameTerminalFace"),a=d((u,p)=>u.nodeId!==p.nodeId||u.orientation!==p.orientation?!1:i(u,p)>=_t&&Math.abs(u.coord-p.coord)<.5,"exactTerminalLaneConflict"),l=d((u,p)=>{if(u.nodeId!==p.nodeId||u.orientation!==p.orientation||u.orientation!=="H"||u.atStart===p.atStart)return!1;const f=i(u,p);if(f<_t)return!1;const y=u.rect.bottom-u.rect.top;return f<y||f>2*y?!1:c(u,p)&&Math.abs(u.coord-p.coord)<16},"nearTerminalLaneConflict"),g=d((u,p)=>{const f=pt(u.edge.points??[]);if(f.length<2)return;const y=u.orientation==="V"?{x:u.boundary.x+p,y:u.boundary.y}:{x:u.boundary.x,y:u.boundary.y+p},v=u.orientation==="V"?{x:u.railEnd.x+p,y:u.railEnd.y}:{x:u.railEnd.x,y:u.railEnd.y+p};if(!d(()=>Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1?ht(y,u.boundary,Z)&&y.x>=u.rect.left+1&&y.x<=u.rect.right-1:Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1?ft(y,u.boundary,Z)&&y.y>=u.rect.top+1&&y.y<=u.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(u.atStart){const S=f.length>1&&oe(f[1],u.railEnd,Z),A=f.slice(S?2:1),R=A[0];return R&&!In(R,v)?void 0:[y,v,...A]}const E=f.length>1&&oe(f[f.length-2],u.railEnd,Z),T=f.slice(0,E?-2:-1),m=T[T.length-1];if(!(m&&!In(m,v)))return[...T,v,y]},"shiftedCandidate"),x=d(u=>{const p=u.edge,f=pt(p.points??[]);if(f.length!==2)return!1;const y=p.start,v=p.end,M=y?e.get(y):void 0,E=v?e.get(v):void 0;if(!M||!E)return!1;const T=M.x??0,m=M.y??0,S=E.x??0,A=E.y??0,[R,k]=f;return ht(R,k,Z)&&Math.abs(m-A)<1&&Math.abs(T-S)>1||ft(R,k,Z)&&Math.abs(T-S)<1&&Math.abs(m-A)>1},"laneIsStraightCollinearConnector"),I=[-7,7,-14,14,-21,21];for(let u=0;u<8;u++){const p=t.filter(y=>!y.isLayoutOnly).flatMap(y=>[r(y,!0),r(y,!1)]).filter(y=>!!y);let f=!1;for(let y=0;y<p.length&&!f;y++)for(let v=y+1;v<p.length&&!f;v++){const M=p[y],E=p[v];if(M.edge===E.edge||!(a(M,E)||l(M,E)))continue;const T=!a(M,E),m=[M,E].sort((S,A)=>{const R=x(S),k=x(A);return R!==k?Number(R)-Number(k):+!A.atStart-+!S.atStart});for(const S of m){for(const A of I){const R=g(S,A);if(!R)continue;const k=r({...S.edge,points:R},S.atStart);if(!(!k||p.some(O=>O.edge!==S.edge&&(a(k,O)||T&&l(k,O))))){S.edge.points=R,f=!0;break}}if(f)break}}if(!f)return}}d(bs,"separateSharedRenderedTerminalLanes");function Ms(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=d((c,a)=>{const l=c.start,g=c.end,x=it(a);if(x.length!==a.length-1)return!1;const I=[l,g].filter(u=>!!u);for(const u of x)if(At(u.a,u.b,o,I,-2)||At(u.a,u.b,s,[],-2))return!1;for(const u of t){if(u===c||u.isLayoutOnly)continue;const p=u.points;if(!(!p||p.length<2)){for(const f of x)for(const y of it(pt(p)))if(ce(f,y,.5)>=_t||le(f.a,f.b,y.a,y.b,Z))return!1}}return!0},"candidateIsSafe"),i=d((c,a)=>{if(a+4>=c.length)return;const l=c[a],g=c[a+1],x=c[a+2],I=c[a+3],u=c[a+4],p=Tt(l,g)&&wt(g,x)&&Tt(x,I)&&wt(I,u)&&ft(l,I,Z)&&ft(l,u,Z)&&ft(g,x,Z)&&(g.x-l.x)*(I.x-x.x)<0,f=wt(l,g)&&Tt(g,x)&&wt(x,I)&&Tt(I,u)&&ht(l,I,Z)&&ht(l,u,Z)&&ht(g,x,Z)&&(g.y-l.y)*(I.y-x.y)<0;if(p||f)return pt([...c.slice(0,a+1),u,...c.slice(a+5)]);if(a+5>=c.length)return;const y=c[a+5],v=wt(l,g)&&Tt(g,x)&&wt(x,I)&&Tt(I,u)&&wt(u,y)&&ft(l,u,Z)&&ft(l,y,Z)&&ft(x,I,Z)&&(x.x-g.x)*(u.x-I.x)<0,M=Tt(l,g)&&wt(g,x)&&Tt(x,I)&&wt(I,u)&&Tt(u,y)&&ht(l,u,Z)&&ht(l,y,Z)&&ht(x,I,Z)&&(x.y-g.y)*(u.y-I.y)<0;if(!(!v&&!M))return pt([...c.slice(0,a+1),y,...c.slice(a+6)])},"withoutDogleg");for(let c=0;c<8;c++){let a=!1;for(const l of t){if(l.isLayoutOnly)continue;const g=pt(l.points??[]);for(let x=0;x<=g.length-5;x++){const I=i(g,x);if(!(!I||!r(l,I))){l.points=I,a=!0;break}}if(a)break}if(!a)return}}d(Ms,"collapseRedundantRectangularDoglegs");function Xn(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values()),c=t.filter(p=>!p.isLayoutOnly),a=d((p,f,y)=>pt(p===f?y??[]:p.points??[]),"pointsFor"),l=d((p,f)=>{let y=0;for(let v=0;v<c.length;v++){const M=it(a(c[v],p,f));for(let E=v+1;E<c.length;E++){const T=it(a(c[E],p,f));for(const m of M)for(const S of T)le(m.a,m.b,S.a,S.b,Z)&&y++}}return y},"strictCrossingCount"),g=d(p=>{const f=it(p);if(f.length!==3)return;const y=f[1];if(!(f[0].horizontal===y.horizontal||f[2].horizontal===y.horizontal))return{index:y.index,horizontal:y.horizontal,vertical:y.vertical,segment:y}},"middleRail"),x=d((p,f)=>{const y=[p.start,p.end].filter(v=>!!v);return r.filter(v=>{if(y.includes(v.id))return!1;const M=v.rect;return f.horizontal?zt(f.a.x,f.b.x,M.left,M.right)>=_t&&f.a.y>=M.top-2&&f.a.y<=M.bottom+2:zt(f.a.y,f.b.y,M.top,M.bottom)>=_t&&f.a.x>=M.left-2&&f.a.x<=M.right+2})},"blockingRectsFor"),I=d((p,f,y)=>{const v=p.map(E=>({...E}));if(f.horizontal)v[f.index].y=y,v[f.index+1].y=y;else if(f.vertical)v[f.index].x=y,v[f.index+1].x=y;else return;const M=ae(pt(v));return it(M).length===M.length-1?M:void 0},"candidateByMovingRail"),u=d((p,f,y)=>{const v=[p.start,p.end].filter(E=>!!E),M=it(f);if(M.length!==f.length-1)return!1;for(const E of M)if(At(E.a,E.b,r,v,-2)||At(E.a,E.b,i,[],-2))return!1;for(const E of c)if(E!==p){for(const T of M)for(const m of it(a(E)))if(ce(T,m,.5)>=_t)return!1}return l(p,f)<=y},"candidateIsSafe");for(let p=0;p<8;p++){const f=l();let y=!1;for(const v of c){const M=a(v),E=g(M);if(!E)continue;const T=x(v,E.segment);if(T.length===0)continue;const m=E.horizontal?[Math.min(...T.map(S=>S.rect.top))-20,Math.max(...T.map(S=>S.rect.bottom))+20]:[Math.min(...T.map(S=>S.rect.left))-20,Math.max(...T.map(S=>S.rect.right))+20];for(const S of m){const A=I(M,E.segment,S);if(!(!A||!u(v,A,f))){v.points=A,y=!0;break}}if(y)break}if(!y)return}}d(Xn,"liftObstacleHuggingSameSideRails");function Yn(t,e){const o=d(a=>{const l=a.groupTitleRect;if(!(!l||typeof l.left!="number"||typeof l.right!="number"||typeof l.top!="number"||typeof l.bottom!="number"||!Number.isFinite(l.left)||!Number.isFinite(l.right)||!Number.isFinite(l.top)||!Number.isFinite(l.bottom)||l.right<=l.left||l.bottom<=l.top))return{left:l.left,right:l.right,top:l.top,bottom:l.bottom}},"validTitleRect"),s=d(a=>{if(!a.isGroup||a.parentId)return;const l=a.direction,g=typeof l=="string"?l.toUpperCase():"";if(g==="LR"||g==="RL"||g==="BT")return;const x=o(a),I=a.y,u=a.height;if(!x||typeof I!="number"||typeof u!="number"||!Number.isFinite(I)||!Number.isFinite(u)||u<=0)return;const p=x.right-x.left,f=x.bottom-x.top;if(!(f<=0||p<f))return{node:a,rect:x}},"topLaneTitleFor"),r=d((a,l)=>{if(!a.horizontal)return!1;const g=a.a.y;return g<=l.top+Z||g>=l.bottom-Z?!1:zt(a.a.x,a.b.x,l.left,l.right)>=_t},"horizontalSegmentIntersectsTitle"),i=[...e.values()].map(s).filter(a=>!!a);if(i.length===0)return;let c=0;for(const a of t){if(a.isLayoutOnly)continue;const l=pt(a.points??[]);for(const g of it(l))for(const x of i)r(g,x.rect)&&(c=Math.max(c,x.rect.bottom-g.a.y+4))}if(!(c<=Z))for(const a of i){const l=a.node.y,g=a.node.height;typeof l!="number"||typeof g!="number"||!Number.isFinite(l)||!Number.isFinite(g)||g<=0||(a.node.y=l-c/2,a.node.height=g+c,a.node.groupTitleRect={...a.rect,top:a.rect.top-c,bottom:a.rect.bottom-c})}}d(Yn,"liftTopLaneTitleBandsAboveRails");function Gn(t,e){const o=d(l=>{const g=l.groupTitleRect;if(!(!g||typeof g.left!="number"||typeof g.right!="number"||typeof g.top!="number"||typeof g.bottom!="number"||!Number.isFinite(g.left)||!Number.isFinite(g.right)||!Number.isFinite(g.top)||!Number.isFinite(g.bottom)||g.right<=g.left||g.bottom<=g.top))return{left:g.left,right:g.right,top:g.top,bottom:g.bottom}},"validTitleRect"),s=d(l=>{if(!l.isGroup||l.parentId||l.direction!=="LR")return;const x=o(l),I=l.x,u=l.width;if(!x||typeof I!="number"||typeof u!="number"||!Number.isFinite(I)||!Number.isFinite(u)||u<=0)return;const p=x.right-x.left,f=x.bottom-x.top;if(!(p<=0||f<p))return{node:l,rect:x}},"leftLaneTitleFor"),r=d((l,g)=>{if(!l.vertical)return!1;const x=l.a.x;return x<=g.left+Z||x>=g.right-Z?!1:zt(l.a.y,l.b.y,g.top,g.bottom)>=_t},"verticalSegmentIntersectsTitle"),i=d((l,g)=>{if(!l.horizontal)return!1;const x=l.a.y;return x<=g.top+Z||x>=g.bottom-Z?!1:zt(l.a.x,l.b.x,g.left,g.right)>=_t},"horizontalSegmentIntersectsTitle"),c=[...e.values()].map(s).filter(l=>!!l);if(c.length===0)return;let a=0;for(const l of t){if(l.isLayoutOnly)continue;const g=pt(l.points??[]);for(const x of it(g))for(const I of c)if(r(x,I.rect))a=Math.max(a,I.rect.right-x.a.x+4);else if(i(x,I.rect)){const u=Math.min(x.a.x,x.b.x);a=Math.max(a,I.rect.right-u+4)}}if(!(a<=Z))for(const l of c){const g=l.node.x,x=l.node.width;typeof g!="number"||typeof x!="number"||!Number.isFinite(g)||!Number.isFinite(x)||x<=0||(l.node.x=g-a/2,l.node.width=x+a,l.node.groupTitleRect={...l.rect,left:l.rect.left-a,right:l.rect.right-a})}}d(Gn,"shiftLeftLaneTitleBandsLeftOfRails");function Is(t,e){const{realNodeRects:o}=me(e.values()),s=t.filter(p=>!p.isLayoutOnly),r=d((p,f=new Map)=>pt(f.get(p)??p.points??[]),"replacementPointsFor"),i=d((p=new Map)=>{let f=0;for(let y=0;y<s.length;y++){const v=it(r(s[y],p));for(let M=y+1;M<s.length;M++){const E=it(r(s[M],p));for(const T of v)for(const m of E)le(T.a,T.b,m.a,m.b,Z)&&f++}}return f},"crossingCount"),c=d((p=new Map)=>s.reduce((f,y)=>f+Qt(r(y,p)),0),"totalBends"),a=d(p=>{const f=r(p);if(f.length<4)return;const y=f[f.length-2],v=f[f.length-1];if(!(!Tt(y,v,Z)&&!wt(y,v,Z)))return{tailStart:y,terminal:v}},"terminalTailFor"),l=d((p,f)=>{const y=r(p);if(y.length<3)return;const v=y[0],M=y[1];let E;if(Tt(v,M,Z))E={x:M.x,y:f.tailStart.y};else if(wt(v,M,Z))E={x:f.tailStart.x,y:M.y};else return;const T=ae(pt([v,M,E,f.tailStart,f.terminal]));return it(T).length===T.length-1?T:void 0},"candidateWithDestinationTail"),g=d((p,f)=>{const y=[p.start,p.end].filter(v=>!!v);for(const v of it(f))if(At(v.a,v.b,o,y,-2))return!0;return!1},"pathHasNodeHit"),x=d((p,f,y)=>{for(const v of s)if(v!==p){for(const M of it(f))for(const E of it(r(v,y)))if(ce(M,E,.5)>=_t)return!0}return!1},"pathHasSharedTrack"),I=d((p,f,y)=>!g(p,f)&&!x(p,f,y),"candidateIsSafe"),u=d(()=>{const p=new Map;for(const f of s){const y=f.end;if(!y||!e.has(y)||r(f).length<4)continue;const M=p.get(y)??[];M.push(f),p.set(y,M)}return p},"edgesByDestination");for(let p=0;p<4;p++){const f=i();if(f===0)return;const y=c();let v,M=f,E=y;for(const T of u().values())for(let m=0;m<T.length;m++)for(let S=m+1;S<T.length;S++){const A=T[m],R=T[S],k=a(A),O=a(R);if(!k||!O)continue;const _=l(A,O),H=l(R,k);if(!_||!H)continue;const P=new Map([[A,_],[R,H]]);if(!I(A,_,P)||!I(R,H,P))continue;const G=i(P),j=c(P);G>=f||G>M||G===M&&j>=E||(v=P,M=G,E=j)}if(!v)return;for(const[T,m]of v)T.points=m}}d(Is,"swapDestinationTerminalTailsToReduceCrossings");function Ss(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values()),c=t.filter(T=>!T.isLayoutOnly),a=d((T,m=new Map)=>pt(m.get(T)??T.points??[]),"replacementPointsFor"),l=d((T=new Map)=>{let m=0;for(let S=0;S<c.length;S++){const A=it(a(c[S],T));for(let R=S+1;R<c.length;R++){const k=it(a(c[R],T));for(const O of A)for(const _ of k)le(O.a,O.b,_.a,_.b,Z)&&m++}}return m},"strictCrossingCount"),g=d((T=new Map)=>c.reduce((m,S)=>m+Qt(a(S,T)),0),"totalBends"),x=d(T=>{const m=T.start,S=T.end,A=m?e.get(m):void 0,R=S?e.get(S):void 0,k=A?qt(A):void 0,O=R?qt(R):void 0;return k&&O?{src:k,dst:O}:void 0},"endpointRectsFor"),I=d((T,m,S)=>{if(S.index<=0||S.index+1>=m.length-1)return;const A=x(T);if(A){if(S.vertical){const R=S.a.x,k=Math.min(A.src.left,A.dst.left),O=Math.max(A.src.right,A.dst.right),_=R<k-Z?"left":R>O+Z?"right":void 0;return _?{edge:T,points:m,segmentIndex:S.index,axis:"vertical",side:_,coord:R,min:Math.min(S.a.y,S.b.y),max:Math.max(S.a.y,S.b.y)}:void 0}if(S.horizontal){const R=S.a.y,k=Math.min(A.src.top,A.dst.top),O=Math.max(A.src.bottom,A.dst.bottom),_=R<k-Z?"top":R>O+Z?"bottom":void 0;return _?{edge:T,points:m,segmentIndex:S.index,axis:"horizontal",side:_,coord:R,min:Math.min(S.a.x,S.b.x),max:Math.max(S.a.x,S.b.x)}:void 0}}},"externalRailForSegment"),u=d(()=>{const T=[];for(const m of c){const S=a(m);for(const A of it(S)){const R=I(m,S,A);R&&T.push(R)}}return T},"collectExternalRails"),p=d((T,m)=>T.edge!==m.edge&&T.axis===m.axis&&T.side===m.side&&zt(T.min,T.max,m.min,m.max)>=_t,"railsInteract"),f=d(T=>{const m=[],S=new Set;for(const A of T){if(S.has(A))continue;const R=[A],k=[];for(S.add(A);R.length>0;){const O=R.pop();k.push(O);for(const _ of T)!S.has(_)&&p(O,_)&&(S.add(_),R.push(_))}k.length>1&&m.push(k)}return m},"connectedComponents"),y=d(T=>{const m=[];for(const S of T)m.some(A=>Math.abs(A-S.coord)<Z)||m.push(S.coord);for(;m.length<T.length;){const S=Math.min(...m),A=Math.max(...m),R=T[0].side;m.push(R==="left"||R==="top"?S-12*(T.length-m.length):A+12*(T.length-m.length))}return m},"uniqueCoordsFor"),v=d(T=>{const m=T.map(R=>R.coord),S=y(T),A=[];if(T.length<=6){const R=new Array(S.length).fill(!1),k=[],O=d(()=>{if(k.length===T.length){k.some((_,H)=>Math.abs(_-m[H])>=Z)&&A.push([...k]);return}for(const[_,H]of S.entries())R[_]||(R[_]=!0,k.push(H),O(),k.pop(),R[_]=!1)},"visit");return O(),A}for(let R=0;R<m.length;R++)for(let k=R+1;k<m.length;k++){const O=[...m];[O[R],O[k]]=[O[k],O[R]],A.push(O)}return A},"coordinateAssignmentsFor"),M=d((T,m)=>{const S=new Map;for(const[R,k]of T.entries()){const O=m[R],_=S.get(k.edge)??k.points.map(H=>({x:H.x,y:H.y}));k.axis==="vertical"?(_[k.segmentIndex].x=O,_[k.segmentIndex+1].x=O):(_[k.segmentIndex].y=O,_[k.segmentIndex+1].y=O),S.set(k.edge,_)}const A=new Map;for(const[R,k]of S){const O=ae(pt(k));if(it(O).length!==O.length-1)return;A.set(R,O)}return A},"replacementsForAssignment"),E=d(T=>{for(const[m,S]of T){const A=[m.start,m.end].filter(R=>!!R);for(const R of it(S))if(At(R.a,R.b,r,A,-2)||At(R.a,R.b,i,[],-2))return!1}for(let m=0;m<c.length;m++){const S=c[m],A=T.has(S),R=it(a(S,T));for(let k=m+1;k<c.length;k++){const O=c[k];if(!A&&!T.has(O))continue;const _=it(a(O,T));for(const H of R)for(const P of _)if(ce(H,P,.5)>=_t)return!1}}return!0},"candidateIsSafe");for(let T=0;T<4;T++){const m=l();if(m===0)return;let S,A=m,R=g(),k=Number.POSITIVE_INFINITY;for(const O of f(u()))for(const _ of v(O)){const H=M(O,_);if(!H||!E(H))continue;const P=l(H);if(P>=m)continue;const G=g(H),j=O.reduce((J,dt,mt)=>J+Math.abs(_[mt]-dt.coord),0);P>A||P===A&&(G>R||G===R&&j>=k)||(S=H,A=P,R=G,k=j)}if(!S)return;for(const[O,_]of S)O.points=_}}d(Ss,"reassignCrossingExternalRailChannels");function Cs(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=t.filter(u=>!u.isLayoutOnly),i=d((u,p,f)=>pt(u===p?f??[]:u.points??[]),"pointsFor"),c=d(u=>it(u).reduce((p,f)=>{const y=f.a.x-f.b.x,v=f.a.y-f.b.y;return p+Math.hypot(y,v)},0),"pathLength"),a=d((u,p)=>{let f=0;for(let y=0;y<r.length;y++){const v=it(i(r[y],u,p));for(let M=y+1;M<r.length;M++){const E=it(i(r[M],u,p));for(const T of v)for(const m of E)le(T.a,T.b,m.a,m.b,Z)&&f++}}return f},"strictCrossingCount"),l=d((u,p)=>{if(u.horizontal){const f=u.a.y;return(Math.abs(f-p.top)<1||Math.abs(f-p.bottom)<1)&&zt(u.a.x,u.b.x,p.left,p.right)>=_t}if(u.vertical){const f=u.a.x;return(Math.abs(f-p.left)<1||Math.abs(f-p.right)<1)&&zt(u.a.y,u.b.y,p.top,p.bottom)>=_t}return!1},"segmentRunsAlongRectBorder"),g=d(u=>{const p=[u.start,u.end].filter(y=>!!y),f=[];for(const y of p){const v=e.get(y),M=v?qt(v):void 0;M&&f.push(M)}return f},"endpointRectsFor"),x=d((u,p)=>{if(p+3>=u.length)return[];const f=u[p],y=u[p+1],v=u[p+2],M=u[p+3],E=Tt(f,y,Z)&&wt(y,v,Z)&&Tt(v,M,Z),T=wt(f,y,Z)&&Tt(y,v,Z)&&wt(v,M,Z);if(!E&&!T)return[];if(!(E?Math.sign(y.x-f.x)!==Math.sign(M.x-v.x):Math.sign(y.y-f.y)!==Math.sign(M.y-v.y)))return[];const S=ft(f,M,Z)||ht(f,M,Z)?[]:[{x:f.x,y:M.y},{x:M.x,y:f.y}],A=S.length===0?[[...u.slice(0,p+1),...u.slice(p+3)]]:S.map(k=>[...u.slice(0,p+1),k,...u.slice(p+3)]),R=new Set;return A.map(k=>ae(pt(k))).filter(k=>{if(it(k).length!==k.length-1||!k.some(_=>oe(_,M,Z)))return!1;const O=k.map(_=>`${_.x.toFixed(3)},${_.y.toFixed(3)}`).join("|");return R.has(O)?!1:(R.add(O),!0)})},"shortcutCandidatesAt"),I=d((u,p,f)=>{const y=[u.start,u.end].filter(M=>!!M),v=g(u);for(const M of it(p))if(At(M.a,M.b,o,y,-2)||At(M.a,M.b,s,[],-2)||v.some(E=>l(M,E)))return!1;for(const M of r)if(M!==u){for(const E of it(p))for(const T of it(i(M)))if(ce(E,T,.5)>=_t)return!1}return a(u,p)<=f},"candidateIsSafe");for(let u=0;u<8;u++){const p=a();let f,y,v=p,M=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;for(const T of r){const m=i(T),S=Qt(m,Z),A=c(m);for(let R=0;R<=m.length-4;R++)for(const k of x(m,R)){const O=Qt(k,Z),_=c(k);if(!(O<S||O===S&&_<A-Z)||!I(T,k,p))continue;const P=a(T,k);P>v||P===v&&(O>M||O===M&&_>=E)||(f=T,y=k,v=P,M=O,E=_)}}if(!f||!y)return;f.points=y}}d(Cs,"shortcutRedundantOrthogonalJogs");function vs(t,e){const i=[];for(const N of e.values()){if(N.isGroup||N.isEdgeLabel)continue;const F=N.x??0,D=N.y??0,V=qt(N);V&&i.push({id:String(N.id??""),cx:F,cy:D,rect:V})}if(i.length===0)return;const c=new Map(i.map(N=>[N.id,N])),a=i.map(N=>({id:N.id,rect:N.rect})),l=["top","bottom","left","right"],g={top:Math.min(...i.map(N=>N.rect.top))-20,bottom:Math.max(...i.map(N=>N.rect.bottom))+20,left:Math.min(...i.map(N=>N.rect.left))-20,right:Math.max(...i.map(N=>N.rect.right))+20},x=t.filter(N=>!N.isLayoutOnly),I=new Map(x.map((N,F)=>[N,F])),u=d(N=>{const F=N==="left"||N==="top"?-1:1,D=[];for(let V=0;V<=2;V++)D.push(g[N]+F*20*V);return D},"outwardTracksForSide"),p=d((N,F=new Map)=>pt(F.get(N)??N.points??[]),"replacementPointsFor"),f=d((N,F)=>{let D=0;for(const V of N)for(const h of F)le(V.a,V.b,h.a,h.b,Z)&&D++;return D},"crossingCountBetweenSegments"),y=d((N,F)=>f(it(N),it(F)),"crossingCountBetweenPaths"),v=d((N=new Map)=>{let F=0;const D=[],V=new Set,h=[],b=d(C=>{V.has(C)||(V.add(C),h.push(C))},"addEdge");for(let C=0;C<x.length;C++){const L=x[C],w=p(L,N);for(let B=C+1;B<x.length;B++){const U=x[B],q=y(w,p(U,N));q>0&&(F+=q,D.push({first:L,second:U,count:q}),b(L),b(U))}}return h.sort((C,L)=>(I.get(C)??0)-(I.get(L)??0)),{count:F,pairs:D,edgeSet:V,edges:h}},"crossingSnapshot"),M=d((N,F)=>{const D=new Set(F.keys());if(D.size===0)return N.count;let V=0;for(const b of N.pairs)(D.has(b.first)||D.has(b.second))&&(V+=b.count);let h=0;for(let b=0;b<x.length;b++){const C=x[b],L=D.has(C),w=p(C,F);for(let B=b+1;B<x.length;B++){const U=x[B];!L&&!D.has(U)||(h+=y(w,p(U,F)))}}return N.count-V+h},"crossingCountWithReplacements"),E=d(N=>{const F=new Map;for(const h of N.pairs){const b=F.get(h.first)??new Set;b.add(h.second),F.set(h.first,b);const C=F.get(h.second)??new Set;C.add(h.first),F.set(h.second,C)}const D=[],V=new Set;for(const h of N.edges){if(V.has(h))continue;const b=[h],C=[];for(V.add(h);b.length>0;){const L=b.pop();C.push(L);for(const w of F.get(L)??[])V.has(w)||(V.add(w),b.push(w))}C.sort((L,w)=>(I.get(L)??0)-(I.get(w)??0)),C.length>1&&D.push(C)}return D},"crossingComponents"),T=d(N=>[N.start,N.end].filter(F=>!!F),"endpointIdsFor"),m=d(N=>{const F=[];for(const D of E(N)){const V=new Set(D),h=new Set(D.flatMap(C=>T(C))),b=[...D];for(const C of x)V.has(C)||T(C).some(L=>h.has(L))&&b.push(C);b.sort((C,L)=>(I.get(C)??0)-(I.get(L)??0)),F.push(b)}return F},"pairSearchGroups"),S=d((N,F,D)=>M(N,new Map([[F,D]])),"crossingCountWithSingleReplacement"),A=d(N=>{const F=new Map;for(const D of N.pairs)F.set(D.first,(F.get(D.first)??0)+D.count),F.set(D.second,(F.get(D.second)??0)+D.count);return F},"currentCrossingsByEdge"),R=d(N=>N.slice(1).reduce((F,D,V)=>{const h=N[V];return F+Math.abs(D.x-h.x)+Math.abs(D.y-h.y)},0),"pathLength"),k=d((N=new Map)=>x.reduce((F,D)=>F+Qt(p(D,N)),0),"totalBends"),O=d((N=new Map)=>x.reduce((F,D)=>F+R(p(D,N)),0),"totalLength"),_=d((N,F,D=new Map)=>{const V=it(F);for(const h of x)if(h!==N){for(const b of V)for(const C of it(p(h,D)))if(ce(b,C,.5)>=_t)return!0}return!1},"pathHasSegmentConflict"),H=d((N,F)=>{const D=[N.start,N.end].filter(V=>!!V);for(const V of it(F))if(At(V.a,V.b,a,D,-2))return!0;return!1},"pathHitsNode"),P=d((N,F)=>{const D=ae(pt(F));it(D).length===D.length-1&&N.push(D)},"pushOrthogonalCandidate"),G=d(N=>N==="left"||N==="right","sideIsHorizontal"),j=d((N,F,D)=>{switch(F){case"left":return Math.min(N.x,D.x)-20;case"right":return Math.max(N.x,D.x)+20;case"top":return Math.min(N.y,D.y)-20;case"bottom":return Math.max(N.y,D.y)+20}},"localTrackForSameSide"),J=d((N,F,D,V)=>{const h=D==="left"||D==="top"?-1:1,b=[j(F,D,V),g[D]];for(const C of b)for(let L=0;L<=2;L++)P(N,ao(F,D,V,C+h*20*L))},"addSameSideCandidates"),dt=d((N,F,D,V,h)=>{for(const b of u(D))for(const C of u(h))P(N,[F,{x:b,y:F.y},{x:b,y:C},{x:V.x,y:C},V])},"addHorizontalToVerticalCandidates"),mt=d((N,F,D,V,h)=>{for(const b of u(D))for(const C of u(h))P(N,[F,{x:F.x,y:b},{x:C,y:b},{x:C,y:V.y},V])},"addVerticalToHorizontalCandidates"),kt=d((N,F,D,V,h)=>{const b=[...u("top"),...u("bottom")];for(const C of u(D))for(const L of u(h))for(const w of b)P(N,[F,{x:C,y:F.y},{x:C,y:w},{x:L,y:w},{x:L,y:V.y},V])},"addHorizontalPairCandidates"),Pt=d((N,F,D,V,h)=>{const b=[...u("left"),...u("right")];for(const C of u(D))for(const L of u(h))for(const w of b)P(N,[F,{x:F.x,y:C},{x:w,y:C},{x:w,y:L},{x:V.x,y:L},V])},"addVerticalPairCandidates"),Q=d(N=>{const F=new Set;return N.map(D=>pt(D)).filter(D=>{const V=D.map(h=>`${h.x.toFixed(3)},${h.y.toFixed(3)}`).join("|");return F.has(V)||D.length<2?!1:(F.add(V),!0)})},"dedupeCandidatePaths"),W=d((N,F,D,V)=>{const h=[],b=co(N,F,D,V,20,Z);b&&P(h,b),F===V&&J(h,N,F,D);const C=G(F),L=G(V);return C&&!L?dt(h,N,F,D,V):!C&&L?mt(h,N,F,D,V):C?kt(h,N,F,D,V):Pt(h,N,F,D,V),Q(h)},"buildCandidatesForSides"),et=d((N,F,D,V)=>{const h=[...u("left"),...u("right")],b=[...u("top"),...u("bottom")];for(const C of l){const L=Ie(V,C),w=C==="top"||C==="bottom"?u(C):b;for(const B of h){P(N,[F,D,{x:B,y:D.y},{x:B,y:L.y},L]);for(const U of w)P(N,[F,D,{x:B,y:D.y},{x:B,y:U},{x:L.x,y:U},L])}}},"addVerticalDepartureOuterTrackCandidates"),at=d((N,F,D,V)=>{const h=[...u("left"),...u("right")],b=[...u("top"),...u("bottom")];for(const C of l){const L=Ie(V,C),w=C==="left"||C==="right"?u(C):h;for(const B of b){P(N,[F,D,{x:D.x,y:B},{x:L.x,y:B},L]);for(const U of w)P(N,[F,D,{x:D.x,y:B},{x:U,y:B},{x:U,y:L.y},L])}}},"addHorizontalDepartureOuterTrackCandidates"),gt=d(N=>{const F=N.start,D=N.end,V=D?c.get(D):void 0;if(!F||!V)return[];const h=pt(N.points??[]);if(h.length<4)return[];const b=h[0],C=h[1],L=[];return wt(b,C,Z)?et(L,b,C,V):Tt(b,C,Z)&&at(L,b,C,V),L},"terminalPreservingOuterTrackCandidates"),xt=d(N=>{const F=N.start,D=N.end,V=F?c.get(F):void 0,h=D?c.get(D):void 0;if(!V||!h)return[];const b=[];for(const C of l){const L=Ie(V,C);for(const w of l)b.push(...W(L,C,Ie(h,w),w))}return b.push(...gt(N)),b},"candidatePathsFor"),vt=d(()=>new Map(x.map(N=>[N,it(p(N))])),"currentSegmentsByEdge"),Vt=d((N,F,D)=>{const V=new Set;for(const h of x){if(h===N)continue;const b=D.get(h)??it(p(h));F.some(C=>b.some(L=>ce(C,L,.5)>=_t))&&V.add(h)}return V},"sharedTrackConflictsFor"),jt=d((N,F,D,V)=>{const h=new Set;return xt(N).map(C=>ae(pt(C))).filter(C=>{if(H(N,C))return!1;const L=C.map(w=>`${w.x.toFixed(3)},${w.y.toFixed(3)}`).join("|");return h.has(L)||C.length<2?!1:(h.add(L),!0)}).map(C=>{const L=it(C);let w=0;for(const B of x)B!==N&&(w+=f(L,D.get(B)??it(p(B))));return{candidate:C,candidateSegments:L,crossings:F.count-(V.get(N)??0)+w,bends:Qt(C,Z),totalBends:Qt(C),length:R(C)}}).filter(({crossings:C})=>C<=F.count).sort((C,L)=>C.crossings-L.crossings||C.bends-L.bends||C.length-L.length).slice(0,48).map(C=>({path:C.candidate,segments:C.candidateSegments,sharedTrackConflicts:Vt(N,C.candidateSegments,D),totalBends:C.totalBends,length:C.length}))},"pairCandidatesFor"),Ut=d((N,F,D,V,h,b)=>{let C=0;for(const w of N.pairs)(w.first===F||w.second===F||w.first===V||w.second===V)&&(C+=w.count);let L=f(D.segments,h.segments);for(const w of x){if(w===F||w===V)continue;const B=b.get(w)??it(p(w));L+=f(D.segments,B)+f(h.segments,B)}return N.count-C+L},"pairCrossingCount"),te=d((N,F)=>{for(const D of N.sharedTrackConflicts)if(D!==F)return!1;return!0},"conflictsOnlyWith"),Se=d((N,F)=>N.segments.some(D=>F.segments.some(V=>ce(D,V,.5)>=_t)),"candidatesShareTrack"),de=d((N,F,D,V)=>te(F,D.edge)&&te(V,N.edge)&&!Se(F,V),"pairCandidatesAreCompatible"),Ce=d((N,F,D,V,h)=>{const b=Ut(N.current,F.edge,D,V.edge,h,N.baseSegments);if(!(b>=N.current.count))return{replacements:new Map([[F.edge,D.path],[V.edge,h.path]]),crossings:b,bends:N.currentBends-(N.baseBendsByEdge.get(F.edge)??0)-(N.baseBendsByEdge.get(V.edge)??0)+D.totalBends+h.totalBends,length:N.currentLength-(N.baseLengthByEdge.get(F.edge)??0)-(N.baseLengthByEdge.get(V.edge)??0)+D.length+h.length}},"scorePairReplacement"),dn=d((N,F)=>N.crossings<F.crossings||N.crossings===F.crossings&&(N.bends<F.bends||N.bends===F.bends&&N.length<F.length),"pairScoreIsBetter"),un=d((N,F,D,V)=>{let h=V;for(const b of F.candidates)for(const C of D.candidates){if(!de(F,b,D,C))continue;const L=Ce(N,F,b,D,C);L&&dn(L,h)&&(h=L)}return h},"bestScoreForOptionPair"),hn=d(N=>{const F=k(),D=O(),V=vt(),h=A(N),b=new Map(x.map(q=>[q,Qt(p(q))])),C=new Map(x.map(q=>[q,R(p(q))])),L=new Map,w=m(N);for(const q of w)for(const z of q){if(L.has(z))continue;const Y=jt(z,N,V,h);Y.length>0&&L.set(z,{edge:z,candidates:Y})}let B={replacements:new Map,crossings:N.count,bends:F,length:D};const U={current:N,currentBends:F,currentLength:D,baseBendsByEdge:b,baseLengthByEdge:C,baseSegments:V};for(const q of w){const z=new Set(q.filter(ot=>N.edgeSet.has(ot))),Y=q.map(ot=>L.get(ot)).filter(ot=>!!ot);for(let ot=0;ot<Y.length;ot++){const rt=Y[ot];for(let st=ot+1;st<Y.length;st++){const tt=Y[st];!z.has(rt.edge)&&!z.has(tt.edge)||(B=un(U,rt,tt,B))}}}return B.replacements.size>0?B.replacements:void 0},"bestPairedReplacement");for(let N=0;N<4;N++){const F=v(),D=F.count;if(D===0)return;let V,h,b=D,C=Number.POSITIVE_INFINITY;for(const w of F.edges){const B=Qt(p(w),Z);for(const U of xt(w)){const q=H(w,U),z=!q&&_(w,U),Y=S(F,w,U),ot=Qt(U,Z);q||z||!(Y<D||Y===D&&ot<B)||Y>b||Y===b&&ot>=C||(V=w,h=U,b=Y,C=ot)}}if(V&&h){V.points=h;continue}const L=hn(F);if(!L)return;for(const[w,B]of L)w.points=B}}d(vs,"resolveRenderedOrthogonalCrossings");var pe=.001,Wr=8;function Ls(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e),s=["top","bottom","left","right"],r=20,i={top:Math.min(...o.map(f=>f.rect.top))-r,bottom:Math.max(...o.map(f=>f.rect.bottom))+r,left:Math.min(...o.map(f=>f.rect.left))-r,right:Math.max(...o.map(f=>f.rect.right))+r},c=d((f,y,v,M)=>{const E=[],T=co(f,y,v,M,r,pe);return T&&E.push(T),y===M&&E.push(ao(f,y,v,i[y])),E},"buildOrthogonalPathCandidates"),a=d((f,y)=>{for(let v=0;v<f.length-1;v++){const M=f[v],E=f[v+1];if(At(M,E,o,y,1))return!0}return!1},"pathHitsNode"),l=d((f,y,v=!1)=>{let M=0;const E=Re(f,pe),T=y.start,m=y.end;for(const S of t){if(S===y||S.isLayoutOnly)continue;const A=S.start,R=S.end;if(!v&&T&&m&&(A===T||A===m||R===T||R===m))continue;const k=S.points;if(!(!k||k.length<2))for(const O of E)for(const _ of Re(k,pe)){if(fo(O.a,O.b,_.a,_.b,pe,pe)){M++;continue}ce(O,_,pe)>=Wr&&M++}}return M},"pathConflictCount"),g=4,x=d((f,y)=>{const v=Math.abs(f.y-y.rect.top),M=Math.abs(f.y-y.rect.bottom),E=Math.abs(f.x-y.rect.left),T=Math.abs(f.x-y.rect.right);let m="top",S=v;return M<S&&(m="bottom",S=M),E<S&&(m="left",S=E),T<S&&(m="right",S=T),m},"nearestSideOfRect"),I=new Map,u=d((f,y,v)=>{const M=I.get(f)??[];M.push({side:y,edgeId:v}),I.set(f,M)},"addFaceClaim");for(const f of t){if(f.isLayoutOnly)continue;const y=f.points??[];if(y.length<1)continue;const v=f.id??"",M=f.start,E=f.end;if(M){const T=n.get(M);T&&u(M,x(y[0],T),v)}if(E){const T=n.get(E);T&&u(E,x(y[y.length-1],T),v)}}const p=d((f,y,v)=>I.get(f)?.some(M=>M.edgeId!==v&&M.side===y)??!1,"faceIsClaimed");for(const f of t){if(f.isLayoutOnly)continue;const y=f.points;if(!y||y.length<2)continue;const v=Qt(y,pe);if(v<g)continue;const M=f.start,E=f.end;if(!M||!E)continue;const T=n.get(M),m=n.get(E);if(!T||!m)continue;const S=f.id??"",A=l(y,f,!0),R=l(y,f);let k,O=A,_=v;for(const H of s){if(p(M,H,S))continue;const P=Ie(T,H);for(const G of s){if(p(E,G,S))continue;const j=Ie(m,G);for(const J of c(P,H,j,G)){if(a(J,[M,E]))continue;const dt=Qt(J,pe);if(A>0){const mt=l(J,f,!0);if(mt>O||mt===O&&dt>=_)continue;O=mt,_=dt,k=J;continue}l(J,f)>R||dt<_&&(_=dt,k=J)}}}if(k){f.points=k;const H=I.get(M);H&&I.set(M,H.filter(G=>G.edgeId!==S));const P=I.get(E);P&&I.set(E,P.filter(G=>G.edgeId!==S)),u(M,x(k[0],T),S),u(E,x(k[k.length-1],m),S)}}}d(Ls,"simplifyDetouredEdges");var Kt=.001,Po=10,Ve=7;function $n(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const i=r.x-s.x,c=r.y-s.y;if(!(Math.abs(i)+Math.abs(c)<Kt)){if(Math.abs(c)<=Kt){const l=s.x+Math.sign(i)*Po;return{left:Math.min(s.x,l),right:Math.max(s.x,l),top:s.y-Ve,bottom:s.y+Ve}}if(Math.abs(i)<=Kt){const l=s.y+Math.sign(c)*Po;return{left:s.x-Ve,right:s.x+Ve,top:Math.min(s.y,l),bottom:Math.max(s.y,l)}}return{left:Math.min(s.x,r.x),right:Math.max(s.x,r.x),top:Math.min(s.y,r.y),bottom:Math.max(s.y,r.y)}}}d($n,"markerClearanceRectFor");function Es(t){return{left:Math.min(t.left,t.right),right:Math.max(t.left,t.right),top:Math.min(t.top,t.bottom),bottom:Math.max(t.top,t.bottom)}}d(Es,"normalizeRect");function zn(t,e){const n=pt(e),o=$n(n,!0),s=$n(n,!1);return[o,s].some(r=>r&&Je(t,Es(r)))}d(zn,"labelOverlapsOwnMarker");function Ue(t,e){const n=[];for(const p of t){if(p.isLayoutOnly)continue;const f=p.points;if(!(!f||f.length<2))for(let y=0;y<f.length-1;y++)n.push({edgeId:p.id,p1:f[y],p2:f[y+1]})}const o=[],s=[];for(const p of e.values()){const f=p.isGroup,y=p.parentId;if(f&&!y){const M=qt(p);M&&s.push({id:p.id,rect:M});continue}if(f||p.isEdgeLabel)continue;const v=qt(p);v&&o.push({nodeId:p.id,rect:v})}const r=3,i=1,c=12,a=d((p,f)=>{const y=Tn(f,r);for(const{nodeId:v,rect:M}of o)if(v!==p&&Je(y,M))return!0;return!1},"labelOverlapsForeignNode"),l=d((p,f)=>{const y=Tn(f,r);for(const v of n)if(v.edgeId!==p&&cn(v.p1,v.p2,y))return!0;return!1},"labelOverlapsForeignEdge"),g=d((p,f,y)=>a(p,y)||l(f,y),"labelOverlapsAnything"),x=[],I=d(p=>{for(const{id:f,rect:y}of s)if(ts(y,p))return f},"findContainingLane"),u=d((p,f)=>x.some(y=>y.labelId!==p&&Je(f,y.rect)),"overlapsPlacedLabel");for(const p of t){if(p.isLayoutOnly)continue;const f=p.labelNodeId;if(!f)continue;const y=e.get(f);if(!y)continue;const v=p.points;if(!v||v.length<2)continue;const M=y.width??0,E=y.height??0;if(M<=0||E<=0)continue;const T=[];for(let Q=0;Q<v.length-1;Q++){const W=v[Q],et=v[Q+1],at=Math.abs(W.x-et.x),gt=Math.abs(W.y-et.y);at<Kt&><Kt||at>=Kt&>>=Kt||T.push({idx:Q,length:at+gt,orientation:at>=Kt?"horizontal":"vertical",midX:(W.x+et.x)/2,midY:(W.y+et.y)/2})}if(T.length===0)continue;const m=T.length>=3?T.filter(Q=>Q.idx>0&&Q.idx<T.length-1):T,S=m.length>0?m:T,A=M>=E?"horizontal":"vertical",R=d(Q=>[...Q].sort((W,et)=>{const at=W.orientation===A,gt=et.orientation===A;if(at!==gt)return at?-1:1;const xt=W.length>=(W.orientation==="horizontal"?M:E)+2,vt=et.length>=(et.orientation==="horizontal"?M:E)+2;return xt!==vt?xt?-1:1:et.length-W.length}),"rankSegments"),k=T[0],O=T[T.length-1],_=[.5,.25,.75,.05,.95,.15,.85,.1,.9],H=d((Q,W)=>{const et=v[Q.idx],at=v[Q.idx+1];return{midX:et.x+(at.x-et.x)*W,midY:et.y+(at.y-et.y)*W}},"anchorAtT"),P=d((Q,W,et)=>Math.min(et,Math.max(W,Q)),"clamp"),G=d((Q,W)=>Q.midX>=W.left-Kt&&Q.midX<=W.right+Kt&&Q.midY>=W.top-Kt&&Q.midY<=W.bottom+Kt,"pointInsideRectInclusive"),j=d(Q=>{const W=Ae(Q.midX,Q.midY,M,E),et=I(W);if(et)return{laneId:et,anchor:Q,rect:W};const at=s.find(({rect:te})=>G(Q,te));if(!at)return;const gt=at.rect.left+M/2+i,xt=at.rect.right-M/2-i,vt=at.rect.top+E/2+i,Vt=at.rect.bottom-E/2-i;if(gt>xt||vt>Vt)return;const jt={midX:P(Q.midX,gt,xt),midY:P(Q.midY,vt,Vt)},Ut=Ae(jt.midX,jt.midY,M,E);return G(Q,Ut)?{laneId:at.id,anchor:jt,rect:Ut}:void 0},"placementForAnchor"),J=d((Q,W,et)=>Q.orientation==="horizontal"?Math.abs(W.midX-et.x):Math.abs(W.midY-et.y),"distanceAlongSegment"),dt=d((Q,W)=>{const at=(Q.orientation==="horizontal"?M/2:E/2)+c;if(Q===k){const gt=v[Q.idx];if(J(Q,W,gt)+Kt<at)return!1}if(Q===O){const gt=v[Q.idx+1];if(J(Q,W,gt)+Kt<at)return!1}return!0},"labelClearsTerminalEndpoints"),mt=d(Q=>{const W=R(Q);for(const et of W)for(const at of _){const gt=H(et,at);if(!dt(et,gt))continue;const xt=j(gt);if(xt&&!zn(xt.rect,v)&&!u(f,xt.rect)&&!g(f,p.id,xt.rect))return{laneId:xt.laneId,anchor:xt.anchor}}},"tryPool"),kt=d((Q,W,et=!1)=>{const at=R(Q);for(const gt of at){const xt={midX:gt.midX,midY:gt.midY};if(W&&!dt(gt,xt))continue;const vt=j(xt);if(vt&&!zn(vt.rect,v)&&!u(f,vt.rect)&&!a(f,vt.rect)&&(et||!l(p.id,vt.rect)))return{laneId:vt.laneId,anchor:vt.anchor}}},"findLaneContainingFallback"),Pt=mt(S)??(S.length<T.length?mt(T):void 0)??kt(T,!0)??kt(T,!1)??kt(T,!1,!0);if(Pt){y.x=Pt.anchor.midX,y.y=Pt.anchor.midY,y.parentId=Pt.laneId;const Q=Ae(Pt.anchor.midX,Pt.anchor.midY,M,E),W=x.findIndex(et=>et.labelId===f);W>=0?x[W]={labelId:f,rect:Q}:x.push({labelId:f,rect:Q})}}}d(Ue,"anchorLabelsToPolyline");var Sn=1e-6,Kr=8,Bo=Kr/2,qr=3;function Vn(t,e){return t<e?`${t}::${e}`:`${e}::${t}`}d(Vn,"pairKey");function Ts(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e),s=new Map;for(const i of e){const c=i.id;if(!i.isGroup&&i.isEdgeLabel){s.set(c,{w:i.width??0,h:i.height??0});continue}}const r=d((i,c,a,l)=>{const g=Vn(c,a);let x=0;const I=d(u=>{if(!u)return;const p=s.get(u);if(!p)return;const f=l==="x"?p.w/2:p.h/2;f>x&&(x=f)},"consider");I(i.labelNodeId);for(const u of t){if(u===i||u.isLayoutOnly)continue;const p=u.start,f=u.end;!p||!f||Vn(p,f)===g&&I(u.labelNodeId)}return x>0?x+qr:0},"labelClearanceFor");for(const i of t){if(i.isLayoutOnly)continue;const c=i.points;if(!ro(c,Sn))continue;const a=lo(i,n,Sn);if(!a)continue;const{srcId:l,dstId:g,srcInfo:x,dstInfo:I,collinearX:u,collinearY:p}=a;if(u===p)continue;let f,y;if(u){const m=I.cy>x.cy;f={x:x.cx,y:m?x.rect.bottom:x.rect.top},y={x:I.cx,y:m?I.rect.top:I.rect.bottom}}else{const m=I.cx>x.cx;f={x:m?x.rect.right:x.rect.left,y:x.cy},y={x:m?I.rect.left:I.rect.right,y:I.cy}}if(At(f,y,o,[l,g],1))continue;const M=r(i,l,g,u?"x":"y"),E=M>Bo?M:Bo,T=[0,E,-E];for(const m of T){const S={...f},A={...y};if(u){if(S.x+=m,A.x+=m,S.x<=x.rect.left||S.x>=x.rect.right||A.x<=I.rect.left||A.x>=I.rect.right)continue}else if(S.y+=m,A.y+=m,S.y<=x.rect.top||S.y>=x.rect.bottom||A.y<=I.rect.top||A.y>=I.rect.bottom)continue;if(!At(S,A,o,[l,g],1)&&!Ze(S,A,t,i,{epsilon:Sn})){i.points=[S,A];break}}}}d(Ts,"straightenCollinearSiblingDetours");function jn(t,e){const{realNodeRects:a,labelNodeRects:l}=me(e.values()),g=d((m,S)=>Re(S,.001).map(A=>({...A,edge:m,interior:A.index>=1&&A.index<=S.length-3})),"segmentsFor"),x=d(()=>{const m=[];for(const S of t){if(S.isLayoutOnly)continue;const A=S.points;!A||A.length<2||m.push(...g(S,pt(A)))}return m},"allSegments"),I=d((m,S)=>m.horizontal&&S.horizontal?zt(m.a.x,m.b.x,S.a.x,S.b.x)>=8&&Math.abs(m.a.y-S.a.y)<7:m.vertical&&S.vertical?zt(m.a.y,m.b.y,S.a.y,S.b.y)>=8&&Math.abs(m.a.x-S.a.x)<7:!1,"hasCrowdedParallelTrack"),u=d((m,S)=>{const A=m.start,R=m.end,k=g(m,S);if(k.length!==S.length-1)return!1;const O=[A,R].filter(H=>!!H),_=m.labelNodeId?[m.labelNodeId]:[];for(const H of k)if(At(H.a,H.b,a,O,-2)||At(H.a,H.b,l,_,-2))return!1;for(const H of t){if(H===m||H.isLayoutOnly)continue;const P=H.points;if(!(!P||P.length<2)){for(const G of k)for(const j of g(H,pt(P)))if(I(G,j)||le(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),p=d((m,S)=>{const A=pt(m.edge.points??[]);if(A.length<4||m.index>=A.length-1)return;const R=A.map(k=>({...k}));if(m.horizontal)R[m.index].y+=S,R[m.index+1].y+=S;else if(m.vertical)R[m.index].x+=S,R[m.index+1].x+=S;else return;return g(m.edge,R).length===R.length-1?R:void 0},"shiftedCandidate"),f=d((m,S)=>({x:m.x??(S.left+S.right)/2,y:m.y??(S.top+S.bottom)/2}),"nodeCenter"),y=d(m=>{const S=m.edge,A=pt(S.points??[]);if(A.length!==4||m.index!==1)return;const R=S.start?e.get(S.start):void 0,k=S.end?e.get(S.end):void 0,O=R?qt(R):void 0,_=k?qt(k):void 0,H=A.slice(m.index+2);if(!(!R||!k||!O||!_||H.length===0))return{sourceCenter:f(R,O),targetCenter:f(k,_),sourceRect:O,tail:H}},"sourceDetourContextFor"),v=d((m,S,A,R,k,O)=>{const _=R.y>=A.y,H=_?k.bottom:k.top,P=H+(_?20:-20);if(_&&m.b.y<=P+.001||!_&&m.b.y>=P-.001)return;const G=m.a.x+S;return pt([{x:A.x,y:H},{x:A.x,y:P},{x:G,y:P},{x:G,y:m.b.y},...O],.001)},"verticalSourceDetour"),M=d((m,S,A,R,k,O)=>{const _=R.x>=A.x,H=_?k.right:k.left,P=H+(_?20:-20);if(_&&m.b.x<=P+.001||!_&&m.b.x>=P-.001)return;const G=m.a.y+S;return pt([{x:H,y:A.y},{x:P,y:A.y},{x:P,y:G},{x:m.b.x,y:G},...O],.001)},"horizontalSourceDetour"),E=d((m,S)=>{const A=y(m);if(A){if(m.vertical)return v(m,S,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail);if(m.horizontal)return M(m,S,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail)}},"sourceDetourCandidate"),T=[-7,7,-14,14,-21,21];for(let m=0;m<12;m++){const S=x();let A=!1;for(let R=0;R<S.length&&!A;R++)for(let k=R+1;k<S.length&&!A;k++){const O=S[R],_=S[k];if(O.edge===_.edge||!I(O,_))continue;const H=[O,_].filter(P=>P.interior);for(const P of H){for(const G of T){const j=p(P,G);if(j&&u(P.edge,j)){P.edge.points=j,A=!0;break}const J=E(P,G);if(J&&u(P.edge,J)){P.edge.points=J,A=!0;break}}if(A)break}}if(!A)return}}d(jn,"nudgeSharedInteriorSubpaths");function ws(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,c=o.y-n.y,a=s*c-r*i;if(Math.abs(a)<1e-10)return!1;const l=n.x-t.x,g=n.y-t.y,x=(l*c-g*i)/a,I=(l*r-g*s)/a,u=.01;return x>u&&x<1-u&&I>u&&I<1-u}d(ws,"segmentsIntersect");function As(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=es(e),r=[];for(const c of n){if(c.isLayoutOnly)continue;const a=c.points;if(!a||a.length<2)continue;const l=c.start,g=c.end,x=c.labelNodeId,I=c.id??`${l}->${g}`;for(const u of s)if(!(u.nodeId===l||u.nodeId===g)&&!(x&&u.nodeId===x)){for(let p=0;p<a.length-1;p++)if(cn(a[p],a[p+1],u,-1)){o.push({type:"edge-node-overlap",edgeId:I,targetId:u.nodeId,detail:`segment ${p} passes through node "${u.nodeId}"`});break}}for(let u=0;u<a.length-1;u++)r.push({edgeId:I,start:l,end:g,p1:a[u],p2:a[u+1]})}const i=new Set;for(let c=0;c<r.length;c++)for(let a=c+1;a<r.length;a++){const l=r[c],g=r[a];if(l.edgeId!==g.edgeId&&!(l.start===g.start||l.start===g.end||l.end===g.start||l.end===g.end)&&ws(l.p1,l.p2,g.p1,g.p2)){const x=l.edgeId<g.edgeId?`${l.edgeId}|${g.edgeId}`:`${g.edgeId}|${l.edgeId}`;i.has(x)||(i.add(x),o.push({type:"edge-edge-crossing",edgeId:l.edgeId,targetId:g.edgeId,detail:`edges "${l.edgeId}" and "${g.edgeId}" cross`}))}}if(o.length>0){const c=o.filter(l=>l.type==="edge-node-overlap").length,a=o.filter(l=>l.type==="edge-edge-crossing").length;Ke.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${c} edge-node overlap(s), ${a} edge crossing(s)`);for(const l of o)Ke.warn(`[SWIMLANE_VALIDATE] ${l.type}: ${l.detail}`)}return o}d(As,"validateSwimlanesLayout");function Rs(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(c=>!c.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!ms(t,e)||e==="BT"&&s.length>0&&!ps(t))return;for(const c of o){if(c.isLayoutOnly)continue;const a=c.points;!a||a.length<2||(c.points=ae(Qe(a)))}Ls(o,n),Ts(o,n),ys(o,n);const r=new Map;for(const c of n)r.set(String(c.id),c);Ue(o,r),is(o,r),xs(o,r),jn(o,r),bs(o,r),Ms(o,r),Xn(o,r),Is(o,r);const i=d(()=>{vs(o,r),Ss(o,r),Cs(o,r),Ue(o,r),Dn(o,r),Xn(o,r),Ue(o,r),Dn(o,r)},"finalizeRenderedEdges");i(),jn(o,r),i(),Yn(o,r),Gn(o,r),Yn(o,r),Gn(o,r)}d(Rs,"postProcessSwimlaneLayout");function ye(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const i=`${r.id}:${r.src}->${r.dst}`;n.has(i)||(n.add(i),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}d(ye,"normalizeGraph");function mo(t,e){return t.edges.filter(n=>n.dst===e)}d(mo,"incoming");function Ns(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}d(Ns,"buildSuccessorMap");function yo(t){const e=Ns(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}d(yo,"buildSortedSuccessorMap");function xo(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}d(xo,"buildInDegreeMap");function bo(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}d(bo,"sortedZeroInDegreeNodes");function ln(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}d(ln,"buildPredecessorSuccessorMaps");function Mo(t,e,n,o){let s=0;for(const i of t.nodes)o?.skipGroups&&t.nodeById.get(i)?.isGroup||(s=Math.max(s,n[i]??0));const r=Array.from({length:s+1},()=>[]);for(const i of e)o?.skipGroups&&t.nodeById.get(i)?.isGroup||r[Math.max(0,n[i]??0)].push(i);return r}d(Mo,"buildLayersFromRanks");function Be(t){const e=xo(t),n=bo(e),o=[],s=yo(t);for(;n.length;){const r=n.shift();o.push(r);for(const i of s.get(r)??[])if(e.set(i,(e.get(i)??0)-1),(e.get(i)??0)===0){let c=0;for(;c<n.length&&n[c]<i;)c++;n.splice(c,0,i)}}return o.length===t.nodes.length?o:null}d(Be,"topoSortIfAcyclic");function Ne(t){const e=new Map;let n=0;for(const o of t)e.set(o,n),n++;return e}d(Ne,"buildLayerIndex");function Io(t){const e=new Array(t.length),n=d((o,s)=>{if(s-o<=1)return 0;const r=o+s>>1;let i=n(o,r)+n(r,s),c=o,a=r,l=o;for(;c<r||a<s;)a>=s||c<r&&t[c]<=t[a]?e[l++]=t[c++]:(e[l++]=t[a++],i+=r-c);for(let g=o;g<s;g++)t[g]=e[g];return i},"count");return n(0,t.length)}d(Io,"countInversions");function Os(t){const e=ye(t),n=new Map;for(const g of e.nodes)n.set(g,[]);for(const g of e.edges)n.get(g.src).push(g);for(const g of n.values())g.sort((x,I)=>x.dst===I.dst?x.id.localeCompare(I.id):x.dst.localeCompare(I.dst));const o=Object.create(null);for(const g of e.nodes)o[g]=0;const s=[],r=d(g=>{o[g]=1;for(const x of n.get(g)??[]){const I=x.dst;o[I]===0?r(I):o[I]===1&&s.push(x)}o[g]=2},"dfs"),i=[...e.nodes].sort((g,x)=>g.localeCompare(x));for(const g of i)o[g]===0&&r(g);const c=new Set(s.map(g=>`${g.id}:${g.src}->${g.dst}`)),a=e.edges.map(g=>c.has(`${g.id}:${g.src}->${g.dst}`)?{id:g.id,src:g.dst,dst:g.src,weight:g.weight,ref:g.ref}:g);return{acyclic:{nodes:[...e.nodes],edges:a,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}d(Os,"removeCycles_DFS");function Ps(t){const e=new Map,n=d(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const c=n(r)??r;return e.set(o,c),c},"resolve");for(const o of t.nodes)n(o);return e}d(Ps,"buildTopLaneMap");function fe(t){const e=Ps(t);return n=>e.get(n)??null}d(fe,"createTopLaneResolver");function fn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}d(fn,"buildTopLaneOrder");function So(t,e){const n=fn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const i of e)!o.has(i)||s.has(i)||(s.add(i),r.push(i));for(const i of n)s.has(i)||r.push(i);return r}d(So,"resolveTopLaneOrder");var Jr={EPSILON:1e-6},sn={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},ko={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Bs(t,e){const n=ye(t),o=e?.laneOf??(()=>null),s=e?.rankHint,{preds:r}=ln(n);for(const m of r.values())m.sort((S,A)=>S.localeCompare(A));const i=Be(n)??[...n.nodes].sort((m,S)=>m.localeCompare(S)),c=new Map;for(const[m,S]of i.entries())c.set(S,m);const a=new Map,l=new Map;for(const m of n.nodes)l.set(m,[]);for(const m of i){const S=(r.get(m)??[]).filter(A=>a.has(A));if(S.length>0){const A=ks(m,S,{laneOf:o,rankHint:s,topoIndex:c});a.set(m,A),l.get(A).push(m)}else a.has(m)||a.set(m,null)}for(const m of n.nodes)a.has(m)||a.set(m,null);const g=new Set;for(const m of n.nodes)(a.get(m)??null)===null&&g.add(m);const x=[...g].sort((m,S)=>{const A=c.get(m)??0,R=c.get(S)??0;return A===R?m.localeCompare(S):A-R}),I=_s(n),u=new Map;for(const[m,S]of I.entries())u.set(m,[...S].sort((A,R)=>A.localeCompare(R)));const p=Fs(u),f=Ds(u),y=new Map;for(const m of n.nodes)y.set(m,[]);for(const m of f)for(const S of m.nodes){const A=y.get(S);A?A.push(m.id):y.set(S,[m.id])}const v=[],M=[],E=new Set,T=d(m=>{if(!E.has(m)){E.add(m),v.push(m);for(const S of l.get(m)??[])T(S);M.push(m)}},"walk");for(const m of x)T(m);for(const m of i)T(m);return{parent:a,children:l,roots:x,componentOf:p,blocks:f,nodeBlocks:y,adjacency:u,preorder:v,postorder:M,topologicalOrder:i}}d(Bs,"buildDrivingTree");function ks(t,e,n){const o=n.laneOf(t);return[...e].sort((r,i)=>{const c=n.laneOf(r),a=n.laneOf(i),l=c!=null&&c===o,g=a!=null&&a===o;if(l!==g)return l?-1:1;const x=n.rankHint?.[r],I=n.rankHint?.[i];if(x!=null&&I!=null&&x!==I)return I-x;const u=n.topoIndex.get(r)??0,p=n.topoIndex.get(i)??0;return u!==p?u-p:r.localeCompare(i)})[0]}d(ks,"chooseParent");function _s(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}d(_s,"buildAdjacency");function Fs(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const i of t.get(r)??[])e.has(i)||s.push(i)}}n++}return e}d(Fs,"assignComponents");function Ds(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const i=d((c,a)=>{e.set(c,++r),n.set(c,r);for(const l of t.get(c)??[])l!==a&&(e.has(l)?(e.get(l)??0)<(e.get(c)??0)&&(o.push([c,l]),n.set(c,Math.min(n.get(c)??r,e.get(l)??r))):(o.push([c,l]),i(l,c),n.set(c,Math.min(n.get(c)??r,n.get(l)??r)),(n.get(l)??0)>=(e.get(c)??0)&&s.push(Hs(c,l,o,s.length))))},"visit");for(const c of t.keys())e.has(c)||i(c,null);return s}d(Ds,"computeBlocks");function Hs(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const i=n.pop();if(s.push(i),r.add(i[0]),r.add(i[1]),i[0]===t&&i[1]===e||i[0]===e&&i[1]===t)break}return{id:o,edges:s,nodes:[...r]}}d(Hs,"popBlock");function Xs(t,e,n){const o=[...t.nodes],s=new Map;for(const[M,E]of o.entries())s.set(E,M);const r=o.length,i=new Array(r).fill(-1),c=new Array(r).fill(0),a=[],l=new Set;for(const M of o){const E=n.parent.get(M)??null,T=s.get(M);T!=null&&E==null&&(i[T]=-1,c[T]=0,l.has(M)||(l.add(M),a.push(M)))}for(;a.length>0;){const M=a.shift(),E=s.get(M);if(E==null)continue;const T=n.children.get(M)??[];for(const m of T){if(l.has(m))continue;const S=s.get(m);S!=null&&(i[S]=E,c[S]=c[E]+1,l.add(m),a.push(m))}}for(const M of o){if(l.has(M))continue;const E=s.get(M);E!=null&&(i[E]=-1,c[E]=0,l.add(M))}const g=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),x=Array.from({length:g},()=>new Array(r).fill(-1));for(let M=0;M<r;M++)x[0][M]=i[M];for(let M=1;M<g;M++)for(let E=0;E<r;E++){const T=x[M-1][E];x[M][E]=T===-1?-1:x[M-1][T]}const I=d((M,E)=>{if(M===-1||E===-1)return-1;c[M]<c[E]&&([M,E]=[E,M]);const T=c[M]-c[E];for(let m=0;m<g;m++)if(T>>m&1&&(M=x[m][M],M===-1))return-1;if(M===E)return M;for(let m=g-1;m>=0;m--){const S=x[m][M],A=x[m][E];S===-1||A===-1||S!==A&&(M=S,E=A)}return x[0][M]},"lcaIndex"),u=Array.from({length:r},()=>new Map);for(const M of t.edges){let E=M.src,T=M.dst,m=e[E],S=e[T];if(m==null||S==null||(m>S&&([E,T]=[T,E],[m,S]=[S,m]),m==null||S==null||m===S))continue;const A=s.get(E),R=s.get(T);if(A==null||R==null)continue;const k=I(A,R);if(k===-1)continue;const O=u[k];for(let _=m;_<S;_++)O.set(_,(O.get(_)??0)+1)}const p=new Map,f=d((M,E)=>{if(E.size!==0)for(const[T,m]of E)M.set(T,(M.get(T)??0)+m)},"mergeInto"),y=new Set,v=d(M=>{const E=s.get(M);y.add(M);const T=E==null?void 0:u[E],m=T?new Map(T):new Map,S=n.children.get(M)??[];for(const A of S){const R=v(A),k=e[M];if(k!=null){let O=p.get(M);O||(O=new Map,p.set(M,O));let _=R.get(k)??0;const H=e[A];H!=null&&H>k&&(_+=1),O.set(A,_)}f(m,R)}return m},"dfs");for(const M of n.roots)y.has(M)||v(M);for(const M of o)y.has(M)||v(M);return p}d(Xs,"computeSubtreeCrossCounts");function Ys(t,e,n){const o=new Map,s=d(r=>{let i=n[r]??0;const c=[...e.get(r)??[]];c.sort(Co(n));for(const a of c){s(a);const l=o.get(a);l!=null&&(i=Math.min(i,l))}o.set(r,i)},"annotate");for(const r of t)s(r);return o}d(Ys,"annotateMinimumLayers");function Co(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}d(Co,"compareByRankThenId");function Gs(t,e,n,o){let s=0;for(const a of e){const l=n[a]??0;l>s&&(s=l)}const r=Array.from({length:s+1},()=>[]),i=new Set,c=d(a=>{if(i.has(a))return;i.add(a);const l=n[a]??0;r[l]||(r[l]=[]),r[l].push(a);for(const g of o(a))c(g)},"emit");for(const a of t)c(a);for(const a of e)if(!i.has(a)){const l=n[a]??0;r[l]||(r[l]=[]),r[l].push(a),i.add(a)}return r}d(Gs,"emitNodesInTreeOrder");function $s(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}d($s,"deduplicateLayers");function zs(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const i=e[s]??0,c=[],a=[],l=n.get(s);for(const g of r){const x=o.get(g)??i;x>i?c.push({child:g,min:x}):a.push(g)}return c.sort((g,x)=>g.min===x.min?g.child.localeCompare(x.child):g.min-x.min),a.sort((g,x)=>{const I=l?.get(g)??0,u=l?.get(x)??0;if(I!==u)return I-u;const p=o.get(g)??i,f=o.get(x)??i;return p!==f?p-f:g.localeCompare(x)}),[...c.map(g=>g.child),...a]}}d(zs,"createChildOrderer");function rn(t,e,n){const o=Bs(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const x of t.nodes)s.has(x)||s.set(x,[]);const i=Xs(t,e,o),c=[...r].sort(Co(e)),a=Ys(c,s,e),l=zs(s,e,i,a);let g=Gs(c,t.nodes,e,l);return g=$s(g),g}d(rn,"buildMultitreeLayerOrder");function Vs(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(e),i=[];for(const c of n)o.has(c.src)&&s.has(c.dst)&&i.push(r.get(c.dst));return Io(i)}d(Vs,"countCrossingsBetweenAdjacent");function Un(t,e,n){const o=[];for(const r of e){const i=n[r.src],c=n[r.dst];if(i==null||c==null||i===c)continue;let a=r.src,l=r.dst,g=i,x=c;i>c&&(a=r.dst,l=r.src,g=c,x=i);for(let I=g;I<x;I++)o.push({id:`${r.id}@${I}`,src:a,dst:l,ref:r.ref})}let s=0;for(let r=0;r+1<t.length;r++)s+=Vs(t[r],t[r+1],o);return s}d(Un,"totalCrossings");function js(t,e){const n={...e},{preds:o}=ln(t),s=fe(t),r=rn(t,n,s);let i=Un(r,t.edges,n);const c=sn.MAX_CROSSING_OPTIMIZATION_PASSES;for(let a=0;a<c;a++){let l=!1;const g=[...t.nodes].sort((x,I)=>(n[I]??0)-(n[x]??0));for(const x of g){const I=n[x]??0;if(I===0)continue;let u=0;for(const v of o.get(x)??[])u=Math.max(u,(n[v]??0)+1);if(u>=I)continue;const p=I;n[x]=u;const f=rn(t,n,s),y=Un(f,t.edges,n);y<i?(i=y,l=!0):n[x]=p}if(!l)break}return n}d(js,"optimizeRanksByCrossings");function Us(t,e){const n=fe(t),o=[...t.nodes].sort((s,r)=>(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const i=t.edges.filter(f=>f.src===s);if(i.length===0)continue;let c=!1,a=0;for(const f of i){const y=n(f.dst);y==null||y===r?c=!0:a++}if(a===0||c)continue;let l=0,g=!1;for(const f of t.edges){if(f.dst!==s)continue;const y=n(f.src);y&&(y===r?g=!0:l++)}if(l>0||!g)continue;const x=e[s]??0,I=x+a;let u=0;for(const f of t.edges)f.dst===s&&(u=Math.max(u,(e[f.src]??0)+1));const p=Math.max(x,u,I);p!==x&&(e[s]=p)}}d(Us,"adjustCrossLaneSources");function Ws(t,e){const n=ye(t),o=Be(n)??[...n.nodes].sort(),s=e?.compactSingleInput??!1,r=fe(n);let i=Object.create(null);for(const a of o){const l=mo(n,a),g=e?.ignoreCrossLaneEdges?l.filter(x=>{const I=r(x.src),u=r(a);return!I||!u?!0:I===u}):l;if(g.length===0)i[a]=0;else if(s&&g.length===1){const x=g[0].src,I=r(x),u=r(a);I!==u?i[a]=i[x]??0:i[a]=(i[x]??0)+1}else{let x=-1/0;for(const I of g)x=Math.max(x,(i[I.src]??0)+1);i[a]=x===-1/0?0:x}}return(e?.optimizeRanksByCrossings??!1)&&(i=js(n,i)),e?.ignoreCrossLaneEdges&&Us(n,i),{layers:rn(n,i,r),rankOf:i,dummy:new Set}}d(Ws,"assignLayers_LongestPath");function Ks(t,e){const n=ye(t),s={...Ws(n,{compactSingleInput:e?.compactSingleInput,ignoreCrossLaneEdges:e?.ignoreCrossLaneEdges,optimizeRanksByCrossings:e?.optimizeRanksByCrossings}).rankOf},r=fe(n),{preds:i,succs:c}=ln(n,p=>{if(e?.ignoreCrossLaneEdges){const f=r(p.src),y=r(p.dst);if(f&&y&&f!==y)return!1}return!0}),a=Be(n)??[...n.nodes],l=[...a].reverse(),g=d((p,f)=>{let y=0;for(const E of i.get(p)??[])y=Math.max(y,(s[E]??0)+1);let v=Number.POSITIVE_INFINITY;const M=c.get(p)??[];return M.length>0&&(v=Math.min(...M.map(E=>(s[E]??0)-1))),Number.isFinite(v)||(v=Math.max(y,f)),Math.min(Math.max(f,y),v)},"clampFeasible"),x=sn.GRAVITY_ITERATIONS,I=d(p=>{let f=!1;for(const y of p){const v=i.get(y)??[],M=c.get(y)??[];if(v.length===0&&M.length===0)continue;const E=v.length>0?v.reduce((A,R)=>A+(s[R]??0)+1,0)/v.length:s[y]??0,T=M.length>0?M.reduce((A,R)=>A+(s[R]??0)-1,0)/M.length:s[y]??0,m=Math.round((E+T)/2),S=g(y,m);S!==s[y]&&(s[y]=S,f=!0)}return f},"relaxOrder");for(let p=0;p<x;p++){const f=I(a),y=I(l);if(!f&&!y)break}for(const p of a){let f=0;for(const y of i.get(p)??[])f=Math.max(f,(s[y]??0)+1);(s[p]??0)<f&&(s[p]=f)}for(const p of l){const f=c.get(p)??[];if(f.length>0){const y=Math.min(...f.map(v=>(s[v]??0)-1));(s[p]??0)>y&&(s[p]=y)}}return{layers:Mo(n,a,s),rankOf:s,dummy:new Set}}d(Ks,"assignLayers_Gravity");function qs(t){const e=xo(t),n=yo(t);let o=bo(e);const s=[];for(;o.length>0;){const r=[];for(const i of o){s.push(i);for(const c of n.get(i)??[])e.set(c,(e.get(c)??0)-1),(e.get(c)??0)===0&&r.push(c)}o=r.sort((i,c)=>i.localeCompare(c))}return s.length===t.nodes.length?s:null}d(qs,"topoSortByGenerationIfAcyclic");function Js(t,e){const n=ye(t),o=e?.direction==="LR"?qs(n)??[...n.nodes].sort():Be(n)??[...n.nodes].sort(),s=fe(n),r=d(g=>s(g)??g,"laneOf"),i=Object.create(null),c=new Map,a=d((g,x)=>e?.ignoreCrossLaneEdges??!0?r(g)===r(x)?1:0:1,"edgeWeight");for(const g of o){if(n.nodeById.get(g)?.isGroup)continue;const I=mo(n,g);let u=0;if(I.length>0)for(const v of I){const M=v.src,E=i[M]??0;u=Math.max(u,E+a(M,g))}const p=r(g),f=c.get(p)??0,y=Math.max(u,f);i[g]=y,c.set(p,y+1)}return{layers:Mo(n,o,i,{skipGroups:!0}),rankOf:i,dummy:new Set}}d(Js,"assignLayers_LaneAwareCompact");function Zs(t,e){const n=ye(e),{rankOf:o}=t,s=t.layers.map(u=>[...u]),r=new Set(t.dummy?[...t.dummy]:[]);let i=0;const c=new Map(n.nodeById),a=d(u=>{const p=`placeholder-${i++}`,f={id:p,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(p,f),r.add(p);s.length<=u;)s.push([]);return s[u].push(p),o[p]=u,p},"addDummyAt"),l=[...n.edges].sort((u,p)=>u.id===p.id?u.src===p.src?u.dst.localeCompare(p.dst):u.src.localeCompare(p.src):u.id.localeCompare(p.id)),g=[];for(const u of l){const p=o[u.src]??0,f=o[u.dst]??0;if(f-p<=1){g.push(u);continue}let y=u.src;for(let M=p+1,E=0;M<f;M++,E++){const T=a(M);g.push({id:`${u.id}#${E}`,src:y,dst:T,weight:u.weight,ref:u.ref}),y=T}const v=f-p-2;g.push({id:`${u.id}#${Math.max(v+1,0)}`,src:y,dst:u.dst,weight:u.weight,ref:u.ref})}const I={nodes:[...n.nodes,...[...r].filter(u=>!n.nodes.includes(u))],edges:g,layout:n.layout,nodeById:c};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:I}}d(Zs,"makeProperLayering");function Wn(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}d(Wn,"median");function Kn(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}d(Kn,"barycenter");function Qs(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}d(Qs,"neighborPositionsFor");function tr(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}d(tr,"currentOrderTieBreak");function qn(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(t),i=Ne(e),c=[];for(const l of n)o.has(l.src)&&s.has(l.dst)&&c.push({u:r.get(l.src),v:i.get(l.dst)});c.sort((l,g)=>l.u===g.u?l.v-g.v:l.u-g.u);const a=c.map(l=>l.v);return Io(a)}d(qn,"countCrossingsBetweenAdjacent");function We(t,e,n){return[...t].sort((o,s)=>{const r=Wn(e.get(o)??[]),i=Wn(e.get(s)??[]);return r===i?tr(o,s,n):isFinite(r)?isFinite(i)?r-i:-1:1})}d(We,"sortByHeuristic");function Jn(t,e,n,o,s,r){const i=Ne(t),c=Ne(e),a=Qs(e,i,n,o);if(!s||!r||r.length===0)return We(e,a,c);const l=new Map;for(const I of e){const u=s(I),p=l.get(u)??[];p.push(I),l.set(u,p)}const g=[];for(const I of r){const u=l.get(I);if(!u||u.length===0)continue;const p=We(u,a,c);g.push(...p)}const x=l.get(null);if(x&&x.length>0){const I=We(x,a,c);for(const u of I){const p=Kn(a.get(u)??[]);let f=g.length;if(isFinite(p))for(const[y,v]of g.entries()){const M=Kn(a.get(v)??[]);if(p<M){f=y;break}}g.splice(f,0,u)}}return g}d(Jn,"reorderLayer");function Zn(t,e,n,o,s){const r=[...e],i=new Set(t),c=new Set(e),a=o?new Set(o):null,l=n.filter(f=>i.has(f.src)&&c.has(f.dst)),g=a?n.filter(f=>c.has(f.src)&&a.has(f.dst)):void 0,x=d(f=>{let y=qn(t,f,l);return g&&o&&(y+=qn(f,o,g)),y},"crossingScore"),I=s?new Map:null;if(s&&I)for(const f of e)I.set(f,s(f));let u=!0,p=x(r);for(;u;){u=!1;for(let f=0;f+1<r.length;f++){if(I){const M=I.get(r[f]),E=I.get(r[f+1]);if(M!==E)continue}const y=p;[r[f],r[f+1]]=[r[f+1],r[f]];const v=x(r);v<y?(p=v,u=!0):[r[f],r[f+1]]=[r[f+1],r[f]]}}return r}d(Zn,"transposeImprove");function er(t,e,n){const o=t.layers.map(c=>[...c]),s=e.edges,r=fe(e),i=So(e,n?.laneOrder);for(let c=0;c<3;c++){for(let a=1;a<o.length;a++)o[a]=Jn(o[a-1],o[a],s,"down",r,i),o[a]=Zn(o[a-1],o[a],s,o[a+1],r);for(let a=o.length-2;a>=0;a--)o[a]=Jn(o[a+1],o[a],s,"up",r,i),o[a]=Zn(o[a+1],o[a],s,o[a-1],r)}return{layers:o}}d(er,"orderLayers");function nr(t,e,n){const o=n?.layerGap??ko.DEFAULT_LAYER_GAP,s=n?.nodeGap??ko.DEFAULT_NODE_GAP,r=n?.laneGap??s*2,i=n?.direction??"TB",c=i==="LR"||i==="RL",a=t.layers,l=Object.create(null),g=Object.create(null),x=d(O=>e.nodeById.get(O),"getNode"),I=d(O=>x(O)?.width??0,"getWidth"),u=d(O=>x(O)?.height??0,"getHeight"),p=fe(e),f=So(e,n?.laneOrder),y=a.map(O=>O.reduce((_,H)=>Math.max(_,u(H)),0)),v=[];if(c)for(let O=0;O+1<a.length;O++){const _=a[O].reduce((mt,kt)=>Math.max(mt,I(kt)),0),H=a[O+1].reduce((mt,kt)=>Math.max(mt,I(kt)),0),P=y[O],G=y[O+1],j=P/2+G/2,J=(_+H)/2,dt=Math.max(0,J-j-o);v.push(dt)}const M=new Set;for(const O of a)for(const _ of O)M.add(p(_));const E=M.has(null),T=f.filter(O=>M.has(O)),m=[...E?[null]:[],...T],S=Object.create(null);for(const O of T)S[O]=0;E&&(S.null=0);for(const O of a){const _=Object.create(null),H=[];for(const P of O){const G=p(P);G===null?H.push(P):(_[G]||=[]).push(P)}for(const[P,G]of Object.entries(_)){const j=G.reduce((J,dt)=>J+I(dt),0)+s*Math.max(0,G.length-1);S[P]=Math.max(S[P]??0,j)}if(E&&H.length){const P=H.reduce((G,j)=>G+I(j),0)+s*Math.max(0,H.length-1);S.null=Math.max(S.null??0,P)}}const A=new Map;{const O=m.map(P=>(P===null?S.null:S[P])??0);let H=-(O.reduce((P,G)=>P+G,0)+r*Math.max(0,m.length-1))/2;for(let P=0;P<m.length;P++){const G=m[P],j=O[P]??0,J=H+j/2;A.set(G,J),H+=j,P<m.length-1&&(H+=r)}}let R=0;for(const[O,_]of a.entries()){const H=y[O]??0,P=new Map;for(const j of _){const J=p(j),dt=P.get(J)??[];dt.push(j),P.set(J,dt)}for(const j of m){const J=P.get(j)??[];if(J.length===0)continue;const dt=A.get(j);if(J.length===1){const mt=J[0];l[mt]=dt,g[mt]=R+H/2}else{const mt=J.map(Q=>I(Q)),kt=mt.reduce((Q,W)=>Q+W,0)+s*(J.length-1);let Pt=dt-kt/2;for(const[Q,W]of J.entries()){const et=mt[Q];l[W]=Pt+et/2,g[W]=R+H/2,Pt+=et+s}}}const G=v[O]??0;R+=H+o+G}const k=new Map;for(const O of e.edges){const _=O.ref.id;k.has(_)||k.set(_,[]),k.get(_).push(O)}for(const[,O]of k){if(O.length===0)continue;const _=O[0].ref,H=_.start,P=_.end;if(H==null||P==null)continue;const G=Math.round(((l[H]??0)+(l[P]??0))/2),j=new Set;for(const J of O)j.add(J.src),j.add(J.dst);for(const J of j){if(J===H||J===P)continue;e.nodeById.get(J)?.isDummy&&(l[J]=G)}}return{x:l,y:g}}d(nr,"assignCoordinates");var or=8;function sr(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return e>>>0}d(sr,"hashString");function rr(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}d(rr,"mulberry32");function ir(t,e){const n=[...t],o=rr(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}d(ir,"deterministicShuffle");function cr(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}d(cr,"sourceDistance");function Qn(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:i}of e){const c=n.get(s),a=n.get(r);c==null||a==null||(o+=i*Math.abs(c-a))}return o}d(Qn,"laneArrangementCost");function ar(t){const e=fn(t);if(e.length<2)return[];const n=new Map(e.map((r,i)=>[r,i])),o=fe(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const i=typeof r.start=="string"?r.start:void 0,c=typeof r.end=="string"?r.end:void 0;if(!i||!c||!t.nodeById.has(i)||!t.nodeById.has(c))continue;const a=o(i),l=o(c);if(!a||!l||a===l)continue;const g=n.get(a),x=n.get(l);if(g==null||x==null)continue;const[I,u]=g<=x?[a,l]:[l,a],p=`${I}\0${u}`,f=s.get(p);f?f.weight++:s.set(p,{a:I,b:u,weight:1})}return[...s.values()]}d(ar,"buildWeightedLaneEdges");function to(t,e,n){const o=[...t];let s=Qn(o,e),r=!0,i=0;const c=Math.max(1,o.length);for(;r&&i<c;){r=!1,i++;for(let a=0;a+1<o.length;a++){[o[a],o[a+1]]=[o[a+1],o[a]];const l=Qn(o,e);l<s?(s=l,r=!0):[o[a],o[a+1]]=[o[a+1],o[a]]}}return{order:o,cost:s,sourceDistance:cr(o,n)}}d(to,"greedySwitch");function lr(t,e){return t.cost!==e.cost?t.cost<e.cost:t.sourceDistance<e.sourceDistance}d(lr,"isBetterCandidate");function fr(t,e,n){const o=[...e].sort((s,r)=>s.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:i})=>`${s}:${r}:${i}`).join("|");return sr(`${t.join("|")}#${o}#${n}`)}d(fr,"seedForRestart");function dr(t,e={}){const n=fn(t);if(n.length<2)return n;const o=ar(t);if(o.length===0)return n;const s=new Map(n.map((c,a)=>[c,a]));let r=to(n,o,s);const i=Math.max(0,e.restarts??or);for(let c=0;c<i;c++){const a=fr(n,o,c),l=ir(n,a),g=to(l,o,s);lr(g,r)&&(r=g)}return r.order}d(dr,"optimizeTopLaneOrder");function ur(t,e){const n=e?.ignoreCrossLaneEdges??!0,o=e?.optimizeRanksByCrossings??!0,s=ye(t),r=e?.automaticLaneOrdering?dr(s,{restarts:or}):void 0,i=Os(s),c=i.acyclic,a=n?Js(c,{compactSingleInput:e?.compactSingleInput??sn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:e?.direction}):Ks(c,{compactSingleInput:e?.compactSingleInput??sn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:o}),{layering:l,graphWithDummies:g}=Zs(a,c),x=er(l,g,{laneOrder:r}),I=nr(x,g,{layerGap:e?.layerGap,nodeGap:e?.nodeGap,direction:e?.direction,laneOrder:r});return{acyclic:c,reversed:i.reversed,layering:l,ordered:x,coordinates:I}}d(ur,"sugiyamaLayout");var ct=Jr.EPSILON,Zr=8,be=15,Te=15,je=25,ne=20,Cn=10;function eo(t,e,n){const o=t.x??0,s=t.y??0,r=e.x-o,i=e.y-s,c=Math.abs(r),a=Math.abs(i);return c<ct&&a<ct?n:a>ct&&a*3>=c?i>0?"bottom":"top":c>ct?r>0?"right":"left":n}d(eo,"chooseOrthogonalSide");function no(t,e){return Math.abs(t.to-e.from)<ct||Math.abs(t.to-e.to)<ct?t.to:t.from}d(no,"sharedLineEndpointCoord");function Me(t,e){return t.orient==="vertical"?{x:t.coord,y:e}:{x:e,y:t.coord}}d(Me,"pointOnLine");function hr(t,e){const n=t.nodes??[],o=t.edges??[],s=[];for(const h of o)h.isLayoutOnly||s.push({...h,__originalEdge:h});const r=new Map,i=new Map,c=[],a=e==="LR";for(const h of n)r.set(h.id,h);const l=n.filter(h=>h.isGroup&&!h.parentId);for(const h of l){const b={id:h.id},C=d(L=>{i.set(L.id,b),n.filter(w=>w.parentId===L.id).forEach(C)},"assignLane");C(h)}const g=n.filter(h=>!h.isGroup&&!h.isEdgeLabel).map(h=>{const b=h.width??10,C=h.height??10,L=h.x??0,w=h.y??0,B=Zr;return{nodeId:h.id,minX:L-b/2-B,maxX:L+b/2+B,minY:w-C/2-B,maxY:w+C/2+B,visualXHalfExtent:a?C/2+B:b/2+B}}),x=d((h,b,C,L)=>{let w=c.find(B=>B.orientation===h&&Math.abs(B.coord-b)<1);return w||(w={id:`pipe-${h}-${b.toFixed(0)}`,orientation:h,coord:b,spanMin:C,spanMax:L,tracks:[]},c.push(w)),w.spanMin=Math.min(w.spanMin,C),w.spanMax=Math.max(w.spanMax,L),w},"getOrAddPipe"),I=d((h,b)=>{const C=h.width??10,L=h.height??10,w=h.x??0,B=h.y??0;switch(b){case"top":return{x:w,y:B-L/2};case"bottom":return{x:w,y:B+L/2};case"left":return{x:w-C/2,y:B};case"right":return{x:w+C/2,y:B}}},"portForSide"),u=d((h,b,C)=>I(h,eo(h,b,C?"bottom":"top")),"getOrthogonalPort"),p=[],f=[],y=new Set,v=1e3,M=d((h,b,C)=>{if(p.length===0)return 0;const L=Math.abs(b.y-C.y)<ct,w=Math.abs(b.x-C.x)<ct;if(!L&&!w)return 0;let B=0;if(L){const U=b.y,q=Math.min(b.x,C.x)-ct,z=Math.max(b.x,C.x)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===h||Y.orientation!=="vertical"||Y.pipe.coord<q||Y.pipe.coord>z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}else if(w){const U=b.x,q=Math.min(b.y,C.y)-ct,z=Math.max(b.y,C.y)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===h||Y.orientation!=="horizontal"||Y.pipe.coord<q||Y.pipe.coord>z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}return B},"crossingPenalty"),E=s.map((h,b)=>{if(!h.start||!h.end)return{idx:b,crossLane:0,dx:0,dy:0};const C=r.get(h.start),L=r.get(h.end),w=i.get(h.start),B=i.get(h.end),U=w&&B&&w.id!==B.id?1:0,q=C&&L?Math.abs((L.x??0)-(C.x??0)):0,z=C&&L?Math.abs((L.y??0)-(C.y??0)):0;return{idx:b,crossLane:U,dx:q,dy:z}}).sort((h,b)=>{if(h.crossLane!==b.crossLane)return b.crossLane-h.crossLane;const C=h.dx+h.dy,L=b.dx+b.dy;return Math.abs(C-L)>1?C-L:h.idx-b.idx}).map(h=>h.idx),T=d((h,b,C,L)=>{const w=Math.min(h.x,b.x),B=Math.max(h.x,b.x),U=Math.min(h.y,b.y),q=Math.max(h.y,b.y);return!!g.find(Y=>C&&Y.nodeId===C||L&&Y.nodeId===L?!1:Math.abs(h.x-b.x)>ct?Y.minY<h.y&&Y.maxY>h.y&&Y.maxX>w&&Y.minX<B:Y.minX<h.x&&Y.maxX>h.x&&Y.maxY>U&&Y.minY<q)},"isSegmentBlocked"),m=new Map,S=new Map;for(const h of s)!h.start||!h.end||h.start===h.end||(S.set(h.start,(S.get(h.start)??0)+1),S.set(h.end,(S.get(h.end)??0)+1));const A=d((h,b)=>eo(h,b,"bottom"),"determineSide"),R=new Map;for(const[h,b]of s.entries()){if(!b.start||!b.end||b.start===b.end||b.points&&b.points.length>0)continue;const C=r.get(b.start),L=r.get(b.end);if(!C||!L)continue;const w=(L.x??0)-(C.x??0),B=(L.y??0)-(C.y??0);R.set(h,{edgeIdx:h,srcId:b.start,dstId:b.end,srcSide:A(C,{x:L.x??0,y:L.y??0}),dstSide:A(L,{x:C.x??0,y:C.y??0}),absDx:Math.abs(w),absDy:Math.abs(B),dxSign:Math.sign(w),dySign:Math.sign(B)})}const k=d(h=>h.srcSide==="top"||h.srcSide==="bottom"?h.absDx===0?1/0:h.absDy/h.absDx:h.absDy===0?1/0:h.absDx/h.absDy,"preferenceStrength"),O=d(h=>h.srcSide==="top"||h.srcSide==="bottom"?h.dxSign>=0?"right":"left":h.dySign>=0?"bottom":"top","secondarySide"),_=new Map;for(const h of R.values()){const b=`${h.srcId}:${h.srcSide}`;_.has(b)||_.set(b,[]),_.get(b).push(h)}const H=new Map,P=d((h,b)=>`${h}:${b}`,"loadKey");for(const h of R.values())H.set(P(h.srcId,h.srcSide),(H.get(P(h.srcId,h.srcSide))??0)+1),H.set(P(h.dstId,h.dstSide),(H.get(P(h.dstId,h.dstSide))??0)+1);for(const h of _.values())if(!(h.length<2)){h.sort((b,C)=>{const L=k(b),w=k(C);return Math.abs(L-w)>1e-9?w-L:b.edgeIdx-C.edgeIdx});for(let b=1;b<h.length;b++){const C=h[b],L=O(C),w=H.get(P(C.srcId,C.srcSide))??0,B=H.get(P(C.srcId,L))??0;B>=w||(H.set(P(C.srcId,C.srcSide),w-1),H.set(P(C.srcId,L),B+1),C.srcSide=L)}}const G=d(h=>{const b=h?.shape;return b==="question"||b==="diamond"},"isDiamondNode"),j=new Map;for(const h of R.values())j.has(h.dstId)||j.set(h.dstId,new Set),j.get(h.dstId).add(h.dstSide);for(const h of R.values()){if(!G(r.get(h.srcId)))continue;const b=j.get(h.srcId);if(!b?.has(h.srcSide))continue;const C=O(h);if(b.has(C)||(H.get(P(h.srcId,C))??0)>0)continue;const L=H.get(P(h.srcId,h.srcSide))??0;H.set(P(h.srcId,h.srcSide),Math.max(0,L-1)),H.set(P(h.srcId,C),1),h.srcSide=C}for(const h of R.values()){const{edgeIdx:b,srcId:C,dstId:L,srcSide:w,dstSide:B}=h,U=r.get(C),q=r.get(L),z=`${C}:${w}:src`,Y=w==="top"||w==="bottom"?q.x??0:q.y??0;m.has(z)||m.set(z,[]),m.get(z).push({edgeIdx:b,oppositeCoord:Y});const ot=`${L}:${B}:dst`,rt=B==="top"||B==="bottom"?U.x??0:U.y??0;m.has(ot)||m.set(ot,[]),m.get(ot).push({edgeIdx:b,oppositeCoord:rt})}const J=new Map,dt=8;for(const[h,b]of m){if(b.length<2)continue;b.sort((Lt,Dt)=>Lt.oppositeCoord-Dt.oppositeCoord);const C=h.split(":"),L=C.slice(0,-2).join(":"),w=C[C.length-2],B=C[C.length-1],U=r.get(L);if(!U)continue;const z=w==="left"||w==="right"?U.height??10:U.width??10,Y=U.shape,rt=Y==="question"||Y==="diamond"?z*.3:z,tt=Math.min(20,Math.max(dt,rt/(b.length+1))),Rt=-(tt*(b.length-1))/2;for(const[Lt,Dt]of b.entries()){const Jt=Rt+Lt*tt,gn=`${Dt.edgeIdx}:${B}`;J.set(gn,Jt)}}const mt=d(h=>!!s[h]?.labelNodeId,"edgeHasLabelNode"),kt=d((h,b)=>h?(m.get(`${h}:${b}:src`)??[]).some(({edgeIdx:C})=>mt(C))||(m.get(`${h}:${b}:dst`)??[]).some(({edgeIdx:C})=>mt(C)):!1,"faceHasLabelNode"),Pt=d((h,b,C)=>b==="top"||b==="bottom"?{x:h.x+C,y:h.y}:{x:h.x,y:h.y+C},"applyPortOffset"),Q=d((h,b,C)=>{const L=R.get(h),w={x:C.x??0,y:C.y??0},B={x:b.x??0,y:b.y??0},U=L?.srcSide??A(b,w),q=L?.dstSide??A(C,B);let z=L?I(b,L.srcSide):u(b,w,!0),Y=L?I(C,L.dstSide):u(C,B,!1);const ot=J.get(`${h}:src`),rt=J.get(`${h}:dst`);return ot!==void 0&&(z=Pt(z,U,ot)),rt!==void 0&&(Y=Pt(Y,q,rt)),{pSrcPort:z,pDstPort:Y,srcSide:U,dstSide:q}},"portsForEdge");for(const h of E){const b=s[h];if(f[h]=[],!b.start||!b.end||b.points&&b.points.length>0||b.start===b.end)continue;const C=r.get(b.start),L=r.get(b.end);if(!C||!L)continue;const{pSrcPort:w,pDstPort:B,srcSide:U,dstSide:q}=Q(h,C,L),z={...w},Y={...B},ot=U==="top"||U==="bottom",rt=q==="top"||q==="bottom";if(ot){const X=w.y>(C.y??0);z.y=X?w.y+ne:w.y-ne}else{const X=w.x>(C.x??0);z.x=X?w.x+ne:w.x-ne}if(rt){const X=B.y>(L.y??0);Y.y=X?B.y+ne:B.y-ne}else{const X=B.x>(L.x??0);Y.x=X?B.x+ne:B.x-ne}const st=d((X,$)=>{for(const K of g)if(!$.includes(K.nodeId)&&X.x>K.minX&&X.x<K.maxX&&X.y>K.minY&&X.y<K.maxY)return{inside:!0,obstacle:K};return{inside:!1}},"isPointInObstacle"),tt=d((X,$,K,lt,Ct)=>{if(Ct){const Nt=X.y>($.y??0);return{x:(K.x??0)>=X.x?lt.maxX+be:lt.minX-be,y:Nt?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:Nt}}const bt=X.x>($.x??0),Et=(K.y??0)>=X.y;return{x:bt?lt.maxX+be:lt.minX-be,y:Et?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:bt}},"obstacleDetour");let yt=[];const Rt=[b.start,b.end],Lt=st(z,Rt);if(Lt.inside&&Lt.obstacle){const X=Lt.obstacle;if(ot){const $=tt(w,C,L,X,!0);z.x=$.x,z.y=$.y;const K=$.leavesPositiveSide?Math.min(X.minY-2,w.y+ne):Math.max(X.maxY+2,w.y-ne);yt=[{x:w.x,y:K},{x:$.x,y:K},{x:$.x,y:$.y}]}else{const $=tt(w,C,L,X,!1),K=$.leavesPositiveSide?Math.min(X.minX-2,w.x+ne):Math.max(X.maxX+2,w.x-ne);z.x=$.x,z.y=$.y,yt=[{x:K,y:w.y},{x:K,y:$.y},{x:$.x,y:$.y}]}}let Dt=[];const Jt=st(Y,Rt);if(Jt.inside&&Jt.obstacle){const X=Jt.obstacle;if(rt){const $=tt(B,L,C,X,!0);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:B.x,y:$.y}]}else{const $=tt(B,L,C,X,!1);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:$.x,y:B.y}]}}if(yt.length===0&&Dt.length===0){const X=be,$=Math.abs(z.x-Y.x)<X,K=Math.abs(z.y-Y.y)<X,lt=J.get(`${h}:src`)!==void 0||J.get(`${h}:dst`)!==void 0,Ct=(m.get(`${b.start??""}:${U}:src`)?.length??0)+(m.get(`${b.start??""}:${U}:dst`)?.length??0),bt=(m.get(`${b.end??""}:${q}:src`)?.length??0)+(m.get(`${b.end??""}:${q}:dst`)?.length??0),Et=Ct>1||bt>1,Nt=S.get(b.start??"")??0,ut=S.get(b.end??"")??0,Yt=Ct>1&&kt(b.start,U)||bt>1&&kt(b.end,q),ee=Ct<=1||Nt<=2,Bt=bt<=1||ut<=2;if(($||K)&&!lt&&(!Et||Et&&!Yt&&ee&&Bt)&&!T(w,B,b.start,b.end)){b.points=[{...w},{...z},{...Y},{...B}],y.add(h);const Mt=K?"horizontal":"vertical",$t=K?w.y:w.x,It=K?Math.min(w.x,B.x):Math.min(w.y,B.y),St=K?Math.max(w.x,B.x):Math.max(w.y,B.y),Wt={id:`fast-path-${Mt}-${$t.toFixed(0)}-${h}`,orientation:Mt,coord:$t,spanMin:It,spanMax:St,tracks:[]};p.push({edgeIndex:h,segmentIndex:0,orientation:Mt,pipe:Wt,trackIndex:0,from:It,to:St});continue}}const gn=x("vertical",z.x,z.y,z.y);z.x=gn.coord;const mr=x("vertical",Y.x,Y.y,Y.y);Y.x=mr.coord;let ue=Math.min(z.x,Y.x)-50,he=Math.max(z.x,Y.x)+50,ve=Math.min(z.y,Y.y)-50,Le=Math.max(z.y,Y.y)+50;for(const X of g){const $=Math.min(z.x,Y.x),K=Math.max(z.x,Y.x),lt=Math.min(z.y,Y.y),Ct=Math.max(z.y,Y.y);X.minX<K&&X.maxX>$&&X.minY<Ct&&X.maxY>lt&&(ue=Math.min(ue,X.minX-je),he=Math.max(he,X.maxX+je),ve=Math.min(ve,X.minY-je),Le=Math.max(Le,X.maxY+je))}for(const X of g){if(X.maxX<ue||X.minX>he||X.maxY<ve||X.minY>Le)continue;const $=be;x("horizontal",X.minY-$,ue,he),x("horizontal",X.maxY+$,ue,he);const K=Te;x("vertical",X.minX-K,ve,Le),x("vertical",X.maxX+K,ve,Le)}x("horizontal",z.y,ue,he),x("horizontal",Y.y,ue,he);const yr=c.filter(X=>X.orientation==="horizontal"&&X.coord>=ve&&X.coord<=Le),xr=c.filter(X=>X.orientation==="vertical"&&X.coord>=ue&&X.coord<=he),ke=d((X,$)=>`${X.toFixed(1)},${$.toFixed(1)}`,"getKey"),_e=ke(z.x,z.y),vo=ke(Y.x,Y.y),Fe=new Map,pn=new Map,mn=new Map,De=new Set,xe=[];Fe.set(_e,0),mn.set(_e,"n"),xe.push({key:_e,f:Math.hypot(Y.x-z.x,Y.y-z.y),pt:z}),De.add(_e);let Ht=[];const ge=d((X,$)=>T(X,$,b.start,b.end),"checkSegmentBlocked"),yn={x:Y.x,y:z.y},br=ge(z,yn),Mr=ge(yn,Y),Ir=br||Mr,xn={x:z.x,y:Y.y},Sr=ge(z,xn),Cr=ge(xn,Y);if(Ir?Sr||Cr||(Math.abs(z.x-Y.x)<ct?Ht=[z,Y]:Ht=[z,xn,Y]):Math.abs(z.y-Y.y)<ct||Math.abs(z.x-Y.x)<ct?Ht=[z,Y]:Ht=[z,yn,Y],Ht.length===0)for(;xe.length>0;){xe.sort((ut,Yt)=>ut.f-Yt.f);const X=xe.shift();if(De.delete(X.key),X.key===vo){let ut=vo,Yt=Y;for(Ht=[Yt];pn.has(ut);){const ee=pn.get(ut);Ht.unshift(ee),Yt=ee,ut=ke(ee.x,ee.y)}break}const $=X.pt.x,K=X.pt.y,lt=xr.sort((ut,Yt)=>ut.coord-Yt.coord),Ct=lt.findIndex(ut=>Math.abs(ut.coord-$)<1),bt=yr.sort((ut,Yt)=>ut.coord-Yt.coord),Et=bt.findIndex(ut=>Math.abs(ut.coord-K)<1),Nt=[];Ct>0&&Nt.push({x:lt[Ct-1].coord,y:K}),Ct>=0&&Ct<lt.length-1&&Nt.push({x:lt[Ct+1].coord,y:K}),Et>0&&Nt.push({x:$,y:bt[Et-1].coord}),Et>=0&&Et<bt.length-1&&Nt.push({x:$,y:bt[Et+1].coord});for(const ut of Nt){const Yt=Math.min($,ut.x),ee=Math.max($,ut.x),Bt=Math.min(K,ut.y),Gt=Math.max(K,ut.y);if(g.some(Zt=>Zt.nodeId===b.start||Zt.nodeId===b.end?!1:Yt!==ee?Zt.minY<K&&Zt.maxY>K&&Zt.maxX>Yt&&Zt.minX<ee:Zt.minX<$&&Zt.maxX>$&&Zt.maxY>Bt&&Zt.minY<Gt))continue;const Mt=ke(ut.x,ut.y),$t=Math.abs(ut.x-$)+Math.abs(ut.y-K),It=M(h,X.pt,ut);let St=0;const Wt=Y.x-z.x,Ee=Y.y-z.y,He=ut.x-$,bn=ut.y-K;(Ee>10&&bn<-5||Ee<-10&&bn>5)&&(St=Math.abs(bn)*100),(Wt>10&&He<-5||Wt<-10&&He>5)&&(St+=Math.abs(He)*50);let Lo=0;const Eo=mn.get(X.key)??"n",To=Math.abs(He)>ct?"h":"v";Eo!=="n"&&Eo!==To&&(Lo=50);const vr=$t+It+St+Lo,Xe=(Fe.get(X.key)??1/0)+vr,wo=Math.abs(Y.x-ut.x)+Math.abs(Y.y-ut.y);if(Xe<(Fe.get(Mt)??1/0))if(pn.set(Mt,X.pt),Fe.set(Mt,Xe),mn.set(Mt,To),!De.has(Mt))xe.push({key:Mt,f:Xe+wo,pt:ut}),De.add(Mt);else{const Zt=xe.findIndex(Lr=>Lr.key===Mt);Zt!==-1&&(xe[Zt].f=Xe+wo)}}}if(Ht.length===0&&(Ht=[z,{x:z.x,y:Y.y},Y]),Ht.length>4){const X=Ht[0],$=Ht[Ht.length-1];let K=Math.min(X.x,$.x),lt=Math.max(X.x,$.x),Ct=Math.min(X.y,$.y),bt=Math.max(X.y,$.y);for(const Bt of Ht)K=Math.min(K,Bt.x),lt=Math.max(lt,Bt.x),Ct=Math.min(Ct,Bt.y),bt=Math.max(bt,Bt.y);const Et=lt>Math.max(X.x,$.x),Nt=K<Math.min(X.x,$.x);if(a){const Bt=Te;if(Et){const Gt=Math.max(X.x,$.x),Ot=Math.min(X.y,$.y),Mt=Math.max(X.y,$.y),$t=g.filter(It=>It.minX<Gt&&It.maxX>Gt&&It.minY<Mt&&It.maxY>Ot);if($t.length>0){let It=Math.max(X.x,$.x);for(const St of $t){const Wt=(St.minX+St.maxX)/2;if(St.visualXHalfExtent===void 0||isNaN(St.visualXHalfExtent))continue;const Ee=Wt+St.visualXHalfExtent+Bt;It=Math.max(It,Ee)}isNaN(It)||(lt=It)}}if(Nt){const Gt=g.filter(Ot=>Ot.minX<Math.min(X.x,$.x)+Bt&&Ot.minY<Math.max(X.y,$.y)&&Ot.maxY>Math.min(X.y,$.y));if(Gt.length>0){let Ot=Math.min(X.x,$.x);for(const Mt of Gt){const It=(Mt.minX+Mt.maxX)/2-Mt.visualXHalfExtent-Bt;Ot=Math.min(Ot,It)}K=Ot}}}const ut=d(Bt=>{const Gt=$.y>X.y,Ot=g.filter(It=>{const St=Math.min(X.x,$.x)<It.maxX&&Math.max(X.x,$.x)>It.minX,Wt=Math.min(X.y,$.y)<It.maxY&&Math.max(X.y,$.y)>It.minY;return St&&Wt});let Mt=Ot;if(a&&Ot.length>0){const It=Ot.filter(St=>St.minX<Bt&&St.maxX>Bt);It.length>0&&(Mt=It)}if(Mt.length===0)return $.y;const $t=be;if(Gt){const St=Math.max(...Mt.map(Wt=>Wt.maxY))+$t;if(St<$.y-ct)return St}else{const St=Math.min(...Mt.map(Wt=>Wt.minY))-$t;if(St>$.y+ct)return St}return $.y},"findBestReturnY"),Yt=d(Bt=>{const Gt=ut(Bt),Ot={x:Bt,y:X.y},Mt={x:Bt,y:Gt},$t={x:$.x,y:Gt},It=ge(X,Ot),St=ge(Ot,Mt),Wt=ge(Mt,$t),Ee=Gt!==$.y?ge($t,$):!1;return!It&&!St&&!Wt&&!Ee?Math.abs(Gt-$.y)<ct?[X,Ot,Mt,$]:[X,Ot,Mt,$t,$]:null},"trySimplifyWithDetourX"),ee=Et&&!Nt?Yt(lt):Nt&&!Et?Yt(K):null;ee&&(Ht=ee)}const Xt=[w,...yt,...Ht,...Dt.reverse(),B];if(Xt.length>=3){const X=Xt[Xt.length-1],$=Xt[Xt.length-2],K=Xt[Xt.length-3],lt=Math.abs(K.y-$.y)<ct&&Math.abs($.y-X.y)<ct,Ct=Math.abs(K.x-$.x)<ct&&Math.abs($.x-X.x)<ct;if(lt){const bt=Math.sign($.x-K.x),Et=Math.sign(X.x-K.x);bt!==0&&bt===Et&&Math.abs($.x-K.x)>Math.abs(X.x-K.x)&&Xt.splice(-2,1)}else if(Ct){const bt=Math.sign($.y-K.y),Et=Math.sign(X.y-K.y);bt!==0&&bt===Et&&Math.abs($.y-K.y)>Math.abs(X.y-K.y)&&Xt.splice(-2,1)}}const ie=[Xt[0]];for(let X=1;X<Xt.length-1;X++){if(X===1){ie.push(Xt[X]);continue}const $=ie[ie.length-1],K=Xt[X],lt=Xt[X+1];if(Math.abs($.y-K.y)<ct&&Math.abs(K.y-lt.y)<ct){const Ct=K.x>$.x,bt=lt.x>K.x;if(Ct!==bt){ie.push(K);continue}continue}if(Math.abs($.x-K.x)<ct&&Math.abs(K.x-lt.x)<ct){const Ct=K.y>$.y,bt=lt.y>K.y;if(Ct!==bt){ie.push(K);continue}continue}ie.push(K)}ie.push(Xt[Xt.length-1]);for(let X=0;X<ie.length-1;X++){const $=ie[X],K=ie[X+1],lt=Math.abs($.x-K.x)<ct?"vertical":"horizontal",Ct=lt==="vertical"?$.x:$.y,bt=lt==="vertical"?Math.min($.y,K.y):Math.min($.x,K.x),Et=lt==="vertical"?Math.max($.y,K.y):Math.max($.x,K.x),Nt=x(lt,Ct,bt,Et),ut={edgeIndex:h,segmentIndex:X,orientation:lt,pipe:Nt,trackIndex:0,from:bt,to:Et};p.push(ut),f[h].push(p.length-1),Nt.tracks[0]||(Nt.tracks[0]={index:0,coord:Nt.coord,segments:[]}),Nt.tracks[0].segments.push({edgeIndex:h,segmentIndex:X,from:bt,to:Et})}}const W=d((h,b)=>h.from<b.to&&b.from<h.to,"segmentsOverlap"),et=d((h,b,C,L)=>{const w=!L.segments.some(U=>(U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex)&&W(U,h)),B=!C.segments.some(U=>(U.edgeIndex!==h.edgeIndex||U.segmentIndex!==h.segmentIndex)&&W(U,b));return w&&B?(h.trackIndex=L.index,b.trackIndex=C.index,C.segments=[...C.segments.filter(U=>U.edgeIndex!==h.edgeIndex||U.segmentIndex!==h.segmentIndex),{edgeIndex:b.edgeIndex,segmentIndex:b.segmentIndex,from:b.from,to:b.to}],L.segments=[...L.segments.filter(U=>U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex),{edgeIndex:h.edgeIndex,segmentIndex:h.segmentIndex,from:h.from,to:h.to}],!0):!1},"trySwapSegmentsAcrossTracks"),at=d(h=>{const b=h.tracks.length;return h.tracks[b]={index:b,coord:h.coord,segments:[]},b},"createNewTrack"),gt=d((h,b)=>{const C=h.pipe.tracks[h.trackIndex];C.segments=C.segments.filter(w=>w.edgeIndex!==h.edgeIndex||w.segmentIndex!==h.segmentIndex),h.trackIndex=b,h.pipe.tracks[b].segments.push({edgeIndex:h.edgeIndex,segmentIndex:h.segmentIndex,from:h.from,to:h.to})},"moveSegmentToTrack"),xt=d((h,b)=>{const C=f[h.edgeIndex];for(const L of C){const w=p[L];w.pipe===h.pipe&>(w,b)}},"moveSegmentChainToTrack"),vt=d(h=>{const b=f[h.edgeIndex],C=b.indexOf(p.indexOf(h)),L=[];return C>0&&L.push(p[b[C-1]]),C<b.length-1&&L.push(p[b[C+1]]),L},"getAdjacentSegmentsAlongEdge"),Vt=d((h,b)=>{if(h.orientation===b.orientation)return!1;const C=h.orientation==="horizontal"?h:b,L=h.orientation==="horizontal"?b:h;return L.pipe.coord>C.from&&L.pipe.coord<C.to&&C.pipe.coord>L.from&&C.pipe.coord<L.to},"haveAnyCrossing"),jt=d((h,b)=>{for(const C of h.tracks)if(!C.segments.some(w=>(w.edgeIndex!==b.edgeIndex||w.segmentIndex!==b.segmentIndex)&&W(w,b)))return C.index;return-1},"findAvailableTrack"),Ut=d((h,b)=>{if(h.trackIndex===b.trackIndex)return W(h,b);const C=vt(h),L=vt(b);return C.some(w=>L.some(B=>Vt(w,B)))},"segmentsConflict"),te=d((h,b,C)=>{if(et(h,b,h.pipe.tracks[h.trackIndex],b.pipe.tracks[b.trackIndex]))return;const L=jt(h.pipe,b);C(b,L!==-1?L:at(h.pipe))},"resolveTrackConflict"),Se=d(h=>{let b=0;for(let C=0;C<h.length;C++)for(let L=C+1;L<h.length;L++){const w=h[C],B=h[L];w.pipe===B.pipe&&Ut(w,B)&&(b++,te(w,B,xt))}return b},"resolveHandleConflicts"),de=new Map,Ce=d(h=>{if(de.has(h))return de.get(h);const b=f[h];if(b.length===0){const q={dest:0,deviation:0,base:0,delta:0};return de.set(h,q),q}const L=p[b[0]].pipe.coord;let w=L;for(let q=1;q<b.length;q++){const z=p[b[q]];if(z.orientation==="horizontal"){const Y=z.from,ot=z.to;w=Math.abs(Y-L)>Math.abs(ot-L)?Y:ot;break}}const B=Math.abs(w-L),U={dest:w,deviation:B,base:L,delta:w-L};return de.set(h,U),U},"getDestInfo"),dn=d(()=>{let h=0;const b=new Map;for(const[L,w]of s.entries())f[L].length!==0&&w.start&&(b.has(w.start)||b.set(w.start,[]),b.get(w.start).push(L));const C=d(L=>{const w=s[L];if(!w.start||!w.end)return 0;const B=r.get(w.start),U=r.get(w.end);if(!B||!U)return 0;const q=(U.x??0)-(B.x??0),z=(U.y??0)-(B.y??0);return Math.abs(q)+Math.abs(z)},"getEdgeDistance");for(const L of b.values()){L.sort((B,U)=>{const q=Ce(B),z=Ce(U);if(Math.abs(q.deviation-z.deviation)>1)return q.deviation-z.deviation;if(Math.abs(q.dest-z.dest)>1)return q.dest-z.dest;const Y=C(B),ot=C(U);if(Math.abs(Y-ot)>1)return ot-Y;const rt=f[B].length,st=f[U].length;if(rt!==st)return rt-st;if(rt===1){const tt=f[B][0],yt=f[U][0];if(p[tt]&&p[yt]){const Rt=p[tt],Lt=p[yt],Dt=Math.abs(Rt.to-Rt.from),Jt=Math.abs(Lt.to-Lt.from);if(Math.abs(Dt-Jt)>1)return Dt-Jt}}return 0});const w=L.map(B=>p[f[B][0]]);h+=Se(w)}return h},"fixSourceHandleCrossings"),un=d(()=>{let h=0;const b=new Map;for(const[C,L]of s.entries())f[C].length!==0&&L.end&&(b.has(L.end)||b.set(L.end,[]),b.get(L.end).push(C));for(const C of b.values()){C.sort((w,B)=>{const U=d(Y=>{const ot=f[Y];if(ot.length<2)return 0;const rt=p[ot[ot.length-2]];return Math.abs(rt.to-rt.from)},"getDist"),q=U(w),z=U(B);return Math.abs(q-z)>.1?q-z:w-B});const L=C.map(w=>p[f[w][f[w].length-1]]);h+=Se(L)}return h},"fixTargetHandleCrossings"),hn=d(()=>{let h=0;for(const b of c){const C=[];for(const L of b.tracks)for(const w of L.segments){const B=f[w.edgeIndex].find(U=>p[U].segmentIndex===w.segmentIndex);B!==void 0&&C.push(p[B])}C.sort((L,w)=>L.edgeIndex-w.edgeIndex||L.segmentIndex-w.segmentIndex);for(let L=0;L<C.length;L++)for(let w=L+1;w<C.length;w++){const B=C[L],U=C[w];Ut(B,U)&&(h++,te(B,U,gt))}}return h},"fixPipeCrossings");let N=0;const F=10;for(;N<F;){let h=0;if(h+=dn(),h+=un(),h+=hn(),h===0)break;N++}const D=new Map;for(const h of c){const b=[];h.tracks.forEach(L=>{L.segments.forEach(w=>{b.push({edgeIndex:w.edgeIndex,segmentIndex:w.segmentIndex,trackIndex:L.index,from:w.from,to:w.to})})}),b.sort((L,w)=>L.from-w.from);const C=[];if(b.length>0){let L=[b[0]],w=b[0].to;for(let B=1;B<b.length;B++){const U=b[B];U.from<w?(L.push(U),w=Math.max(w,U.to)):(C.push(L),L=[U],w=U.to)}C.push(L)}for(const L of C){const w=new Set;L.forEach(tt=>w.add(tt.trackIndex));const B=new Map;L.forEach(tt=>{const yt=Ce(tt.edgeIndex);B.set(tt.trackIndex,(B.get(tt.trackIndex)??0)+yt.delta)});const U=[...w].filter(tt=>(B.get(tt)??0)<-1),q=[...w].filter(tt=>(B.get(tt)??0)>1),z=[...w].filter(tt=>Math.abs(B.get(tt)??0)<=1);U.sort((tt,yt)=>(B.get(yt)??0)-(B.get(tt)??0)),q.sort((tt,yt)=>(B.get(tt)??0)-(B.get(yt)??0));const Y=d((tt,yt)=>{L.filter(Rt=>Rt.trackIndex===tt).forEach(Rt=>{const Lt=y.has(Rt.edgeIndex)?h.coord:yt;D.set(`${Rt.edgeIndex}-${Rt.segmentIndex}`,Lt)})},"assignCoord");let ot=0;for(const tt of U)ot++,Y(tt,h.coord-ot*Cn);if(z.length===0&&w.size>0){const tt=[...w].sort((Lt,Dt)=>Math.abs(B.get(Lt)??0)-Math.abs(B.get(Dt)??0))[0],yt=U.indexOf(tt);yt!==-1&&U.splice(yt,1);const Rt=q.indexOf(tt);Rt!==-1&&q.splice(Rt,1),z.push(tt)}let rt=0;for(const tt of z){if(rt===0)Y(tt,h.coord);else{const yt=rt%2===1?1:-1,Rt=Math.ceil(rt/2);Y(tt,h.coord+yt*Rt*Cn*.5)}rt++}let st=0;for(const tt of q)st++,Y(tt,h.coord+st*Cn)}}for(const[h,b]of s.entries()){const C=f[h]??[];if(C.length===0)continue;const L=[],w=r.get(b.start),B=r.get(b.end),{pSrcPort:U,pDstPort:q}=Q(h,w,B),z=C.map(rt=>{const st=p[rt],tt=D.get(`${st.edgeIndex}-${st.segmentIndex}`)??st.pipe.coord;return{orient:st.orientation,coord:tt,from:st.from,to:st.to}});L.push(U);for(let rt=0;rt<z.length;rt++){const st=z[rt],tt=L[L.length-1],yt=st.orient==="vertical"?tt.y:tt.x,Rt=st.orient==="vertical"?tt.x:tt.y,Lt=z[rt+1],Dt=rt<z.length-1;if(Math.abs(Rt-st.coord)>ct&&L.push(Me(st,yt)),Dt&&Lt.orient===st.orient)if(Math.abs(st.coord-Lt.coord)>ct){const Jt=st.orient==="vertical"?(yt+Lt.from)/2:no(st,Lt);L.push(Me(st,Jt),Me(Lt,Jt))}else(rt===0||rt===z.length-2)&&L.push(Me(st,no(st,Lt)));else if(Dt)L.push(Me(st,Lt.coord));else{const Jt=Math.abs(st.from-yt)<Math.abs(st.to-yt)?st.to:st.from;L.push(Me(st,Jt))}}const Y=L[L.length-1];(Math.abs(Y.x-q.x)>ct||Math.abs(Y.y-q.y)>ct)&&L.push(q);const ot=[];L.length>0&&ot.push(L[0]);for(let rt=1;rt<L.length;rt++){const st=L[rt],tt=ot[ot.length-1];(Math.abs(st.x-tt.x)>ct||Math.abs(st.y-tt.y)>ct)&&ot.push(st)}b.points=ot}for(const h of s){const b=h.__originalEdge;b&&h.points&&(b.points=h.points)}t.edges=(t.edges??[]).filter(h=>!h.isLayoutOnly);const V=d((h,b)=>{const C=b.x??0,L=b.y??0,w=b.width??0,B=b.height??0;if(w<=0||B<=0)return h;const U=C-w/2,q=C+w/2,z=L-B/2,Y=L+B/2;if(h.x<U||h.x>q||h.y<z||h.y>Y)return h;const ot=h.x-U,rt=q-h.x,st=h.y-z,tt=Y-h.y,yt=Math.min(ot,rt,st,tt);return yt===ot?{x:U,y:h.y}:yt===rt?{x:q,y:h.y}:yt===st?{x:h.x,y:z}:{x:h.x,y:Y}},"nodeBoundaryClamp");for(const h of t.edges){const b=h.points;if(!b||b.length<2)continue;const C=h.start,L=h.end,w=C?r.get(C):void 0,B=L?r.get(L):void 0;w&&(b[0]=V(b[0],w)),B&&(b[b.length-1]=V(b[b.length-1],B))}return t}d(hr,"routeEdgesOrthogonal");function gr(t){return t.direction??"TB"}d(gr,"getSwimlaneDirection");function pr(t){const e=Jo(t),n=t.config.flowchart?.nodeSpacing??40,o=t.config.flowchart?.rankSpacing??100,s=t.config.swimlane?.ignoreCrossLaneEdges??!0,r=t.config.swimlane?.optimizeRanksByCrossings??!0,i=t.config.swimlane?.automaticLaneOrdering??!1,c=gr(t),{ordered:a,coordinates:l}=ur(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:i,direction:c});Zo(e,a,l,{nodeGap:n,layerGap:o});for(const g of t.edges??[])delete g.points;hr(t,c);for(const g of t.edges??[])(!g.curve||g.curve==="basis")&&(g.curve="rounded");return Rs(t,c),As(t),c}d(pr,"runSwimlaneLayoutCore");async function Qr(t,e){const n=e.select("g");wr(n,t.markers,t.type,t.diagramId),Ar(),Rr(),Nr(),Tr(),qo(t);const o=Qo(t);t.nodes=o.nodes,t.edges=o.edges;const{groups:s}=await _o(n,t);pr(t),await Uo(t,s)}d(Qr,"render");export{Qr as render}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-X5ZJPWSS-C2VEYVmu.js","assets/mermaid.core-DpBz6UHc.js","assets/index-_5lXYMaO.js","assets/index-C_ObXpF5.css","assets/_commonjsHelpers-CqkleIqs.js"])))=>i.map(i=>d[i]); +import{bR as Er}from"./index-_5lXYMaO.js";import{c as Tr}from"./chunk-RYQCIY6F-DYUKYgim.js";import{am as wr,an as Ar,ao as Rr,ap as Nr,l as Ke,c as Or,ag as Pr,af as Br,ah as kr,at as _r,av as Fr,z as Dr,as as Hr,aw as Xr,y as Oe,ax as Ye,_ as d,ay as Ao}from"./mermaid.core-DpBz6UHc.js";import{G as Yr}from"./graph-DOmOIIwC.js";import"./map-DxJ2ADlA.js";import"./_commonjsHelpers-CqkleIqs.js";async function _o(t,e){const n=new Yr({multigraph:!0,compound:!0}),o=[...e.edges],s=Or(),r=t.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),c=r.insert("g").attr("class","edges edgePath"),a=r.insert("g").attr("class","edgeLabels"),l=r.insert("g").attr("class","nodes"),g=new Map,x=t.node()!=null;await Promise.all(e.nodes.map(async I=>{if(I.isGroup)n.setNode(I.id,{...I});else{if(x){const u=await Pr(l,I,{config:s,dir:I.dir}),p=u.node()?.getBBox()??{width:0,height:0};g.set(I.id,u),I.width=p.width,I.height=p.height}n.setNode(I.id,{...I})}}));for(const I of o)n.setEdge(I.start,I.end,{...I},I.id),e.edges.some(p=>p.id===I.id)||e.edges.push(I);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:I}=await Er(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-X5ZJPWSS-C2VEYVmu.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2,3,4]));I(t,e)}return{graph:n,groups:{clusters:i,edgePaths:c,edgeLabels:a,nodes:l,rootGroups:r},nodeElements:g}}d(_o,"createGraphWithElements");var Ro=5,Ge=1e-5,$e=1e-6;function qe(t){const e=[];for(let n=0;n<t.length-1;n++)e.push({a:t[n],b:t[n+1]});return e}d(qe,"buildSegmentList");function Fo(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,c=o.y-n.y,a=s*c-r*i;if(a===0)return null;const l=n.x-t.x,g=n.y-t.y,x=(l*c-g*i)/a,I=(l*r-g*s)/a;return x<=$e||x>=1-$e||I<=$e||I>=1-$e?null:{point:{x:t.x+x*s,y:t.y+x*r},tA:x,tB:I}}d(Fo,"segmentIntersection");function vn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}d(vn,"isHorizontalSeg");function Do(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n],s=qe(o.points);for(let r=n+1;r<t.length;r++){const i=t[r],c=qe(i.points);for(const[a,l]of s.entries())for(const[g,x]of c.entries()){const I=Fo(l.a,l.b,x.a,x.b);if(!I)continue;const u=vn(l),p=vn(x);(u!==p?u:!1)?e.push({jumpEdgeId:o.id,otherEdgeId:i.id,segIndex:a,t:I.tA,point:I.point}):e.push({jumpEdgeId:i.id,otherEdgeId:o.id,segIndex:g,t:I.tB,point:I.point})}}}return e}d(Do,"findEdgeIntersections");function re(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}d(re,"fmt");function we(t){return`${re(t.x)},${re(t.y)}`}d(we,"pointToString");function Ho(t){const e=t.b.x-t.a.x,n=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(n)?e>=0?1:0:n>=0?1:0}d(Ho,"getArcSweepFlag");var Gr=.001;function Xo(t,e){if(t.length<2)return t.map(r=>({...r}));const n=t.map(r=>({...r})),o=e.arrowTypeStart&&Ao[e.arrowTypeStart];if(o){const r=t[0],i=t[1],c=Math.atan2(i.y-r.y,i.x-r.x);n[0].x=r.x+o*Math.cos(c),n[0].y=r.y+o*Math.sin(c)}const s=e.arrowTypeEnd&&Ao[e.arrowTypeEnd];if(s){const r=t.length,i=t[r-2],c=t[r-1],a=Math.atan2(c.y-i.y,c.x-i.x);n[r-1].x=c.x-s*Math.cos(a),n[r-1].y=c.y-s*Math.sin(a)}return n}d(Xo,"applyMarkerOffsets");function Yo(t,e,n,o,s){const r=t.point.x,i=t.point.y,c={x:r-e*t.r,y:i-n*t.r},a={x:r+e*t.r,y:i+n*t.r},l=[`L${we(c)}`];return s==="arc"?l.push(`A${re(t.r)},${re(t.r)} 0 0 ${o} ${we(a)}`):l.push(`M${we(a)}`),l}d(Yo,"emitJump");function Ln(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=n.x-e.x,c=n.y-e.y,a=Math.hypot(s,r),l=Math.hypot(i,c);if(a<Ge||l<Ge)return null;const g=s/a,x=r/a,I=i/l,u=c/l,p=g*I+x*u,f=Math.max(-1,Math.min(1,p)),y=Math.acos(f);if(y<Ge||Math.abs(Math.PI-y)<Ge)return null;const v=Math.min(o/Math.sin(y/2),a/2,l/2);return{startX:e.x-g*v,startY:e.y-x*v,endX:e.x+I*v,endY:e.y+u*v,ctrlX:e.x,ctrlY:e.y,cutLen:v}}d(Ln,"computeRoundedCorner");function Go(t,e,n){const o=t.points;if(o.length<2)return"";const s=Xo(o,t),r=t.curve==="rounded",i=qe(s),c=new Map;for(const l of e){const g=i[l.segIndex];if(!g)continue;const x=Math.hypot(g.b.x-g.a.x,g.b.y-g.a.y),I=c.get(l.segIndex)??[];I.push({t:l.t,point:l.point,d:l.t*x,r:n.jumpRadius}),c.set(l.segIndex,I)}const a=[`M${we(s[0])}`];for(let l=0;l<i.length;l++){const g=i[l],x=Math.hypot(g.b.x-g.a.x,g.b.y-g.a.y),I=x===0?0:(g.b.x-g.a.x)/x,u=x===0?0:(g.b.y-g.a.y)/x,p=Ho(g);let f=0;if(r&&l>0){const E=Ln(s[l-1],s[l],s[l+1]??s[l],Ro);E&&(f=E.cutLen)}let y=x,v=null;r&&l<i.length-1&&(v=Ln(s[l],s[l+1],s[l+2]??s[l+1],Ro),v&&(y=x-v.cutLen));const M=[...c.get(l)??[]].sort((E,T)=>E.t-T.t);for(const E of M)E.r=Math.min(E.r,E.d-f,y-E.d);for(let E=0;E<M.length-1;E++){const T=M[E+1].d-M[E].d;if(M[E].r+M[E+1].r>T){const m=T/2;M[E].r=Math.min(M[E].r,m),M[E+1].r=Math.min(M[E+1].r,m)}}for(const E of M)E.r<Gr||a.push(...Yo(E,I,u,p,n.jumpStyle));r&&v?(a.push(`L${re(v.startX)},${re(v.startY)}`),a.push(`Q${re(v.ctrlX)},${re(v.ctrlY)} ${re(v.endX)},${re(v.endY)}`)):a.push(`L${we(g.b)}`)}return a.join(" ")}d(Go,"rewriteEdgePath");function $o(t){return/^[\d\s+,.LMelm-]*$/.test(t)}d($o,"isStraightPath");function zo(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}d(zo,"curveSupportsLineHops");function Vo(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),n=JSON.parse(e);if(!Array.isArray(n))return null;const o=[];for(const s of n)s&&typeof s.x=="number"&&typeof s.y=="number"&&o.push({x:s.x,y:s.y});return o.length>=2?o:null}catch{return null}}d(Vo,"decodeDataPoints");function jo(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const s=new Map;for(const l of e)s.set(l.id,l);const r=[],i=new Map;for(const l of e){const g=typeof CSS<"u"&&CSS.escape?CSS.escape(l.id):l.id,x=o.querySelector(`path[data-id="${g}"]`);if(!x)continue;i.set(l.id,x);const u=Vo(x.getAttribute("data-points"))??l.points;r.push({...l,points:u})}const c=Do(r);if(c.length===0)return;const a=new Map;for(const l of c){const g=a.get(l.jumpEdgeId)??[];g.push(l),a.set(l.jumpEdgeId,g)}for(const l of r){const g=a.get(l.id);if(!g||g.length===0)continue;const I=s.get(l.id)?.curve;if(I!==void 0&&!zo(I))continue;const u=i.get(l.id);if(!u)continue;if(I===void 0){const E=u.getAttribute("d")??"";if(!$o(E))continue}const p=u.getAttribute("style")??"",f=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(p),y=f?Number.parseFloat(f[1]):null,v=f?Number.parseFloat(f[2]):null,M=Go(l,g,n);if(u.setAttribute("d",M),y!==null&&v!==null&&typeof u.getTotalLength=="function"){const E=u.getTotalLength(),T=Math.max(0,E-y-v),m=`0 ${y} ${T} ${v}`,S=p.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${m};`).replace(/;\s*;+/g,";");u.setAttribute("style",S)}}}d(jo,"applyLineJumpsToSvg");async function Uo(t,e){for(const s of t.nodes)s.isGroup?await Br(e.clusters,s):kr(s);const n=new Map;for(const s of t.nodes)s?.id&&n.set(s.id,s);for(const s of t.edges){const r=s.start?n.get(s.start)??{}:{},i=s.end?n.get(s.end)??{}:{},c=_r(e.edgePaths,{...s},{},t.type,r,i,t.diagramId);s.label&&await Fr(e.rootGroups,s),s.label&&Wo(s,c)}const o=t.config?.swimlane?.lineHops;if(o!==!1){const s=o==="gap"?"gap":"arc",r=t.edges.filter(i=>Array.isArray(i.points)&&i.points.length>=2).map(i=>({id:i.id,points:i.points,curve:i.curve,arrowTypeStart:i.arrowTypeStart,arrowTypeEnd:i.arrowTypeEnd}));jo(e.edgePaths,r,{enabled:!0,jumpRadius:6,jumpStyle:s})}}d(Uo,"adjustLayout");function Wo(t,e){const n=e?.updatedPath??e?.originalPath,o=Dr(),{subGraphTitleTotalMargin:s}=Hr({flowchart:o.flowchart??{}});if(t.label){const r=Xr.get(t.id);let i=t.x,c=t.y;if(n){const a=Oe.calcLabelPosition(n);Ke.debug("Moving label "+t.label+" from (",i,",",c,") to (",a.x,",",a.y,") abc88"),e&&(i=a.x,c=a.y)}r.attr("transform",`translate(${i}, ${c+s/2})`)}if(t?.startLabelLeft){const r=Ye.get(t.id).startLeft;let i=t?.x,c=t?.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.startLabelRight){const r=Ye.get(t.id).startRight;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.endLabelLeft){const r=Ye.get(t.id).endLeft;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.endLabelRight){const r=Ye.get(t.id).endRight;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}}d(Wo,"positionEdgeLabel");var Mn="__swimlane_default__",$r=21,No=20;function En(t){return Math.max(t.padding??No,No)}d(En,"topLaneHorizontalPadding");function Ko(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const i=n-s/2,c=Math.min(r,n+s/2),a=Math.min($r,Math.max(0,c-i)),l=i+a;if(l<=i){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:i,bottom:l}}d(Ko,"assignTopLaneTitleRect");function qo(t){const e=t.direction,n=t.nodes??=[];for(const r of t.nodes??[])r.isGroup&&!r.parentId&&(r.shape="swimlane",e&&(r.direction=e));const o=n.filter(r=>!r.isGroup&&!r.parentId);if(o.length===0)return;let s=n.find(r=>r.id===Mn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:Mn,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(s));for(const r of o)r.parentId=Mn}d(qo,"prepareLayoutForSwimlanes");function Jo(t){const e=new Map;for(const a of t.nodes??[])e.set(a.id,a);const n=[];for(const a of t.edges??[]){const l=typeof a.start=="string"?a.start:void 0,g=typeof a.end=="string"?a.end:void 0;!l||!g||a.labelNodeId||n.push({id:a.id,src:l,dst:g,ref:a})}const o=t.nodes??[],s=o.filter(a=>a.isGroup),r=o.filter(a=>!a.isGroup);return{nodes:[...[...s].reverse(),...r].map(a=>a.id),edges:n,layout:t,nodeById:e}}d(Jo,"toGraphView");function Zo(t,e,n,o){const{layout:s}=t,r=t.nodeById,i=o?.layerGap??100,c=o?.nodeGap??40;let a=0;for(const I of e.layers){let u=0;for(const p of I){const f=r.get(p);if(!f){u++;continue}f.layer=a,f.order=u;const y=n.x[p]??u*c,v=n.y[p]??a*i;f.x=y,f.y=v,u++}a++}const l=s.nodes??[],g=new Map,x=[];for(const I of l){if(!I?.isGroup)continue;I.parentId||x.push(I);const u=l.filter(M=>M.parentId===I.id);let p=1/0,f=-1/0,y=1/0,v=-1/0;for(const M of u){const E=M.x??n.x[M.id],T=M.y??n.y[M.id],m=M.width??0,S=M.height??0;E!=null&&T!=null&&(p=Math.min(p,E-m/2),f=Math.max(f,E+m/2),y=Math.min(y,T-S/2),v=Math.max(v,T+S/2))}if(p===1/0||y===1/0)I.x=I.x??0,I.y=I.y??0,I.width=I.width??0,I.height=I.height??0;else{const M=I.padding??20,E=I.parentId?M:2*En(I),T=M,m=Math.max(0,f-p)+E,S=Math.max(0,v-y)+T,A=(p+f)/2,R=(y+v)/2;I.x=A,I.y=R,I.width=m,I.height=S,g.set(I.id,{minX:p,maxX:f,minY:y,maxY:v})}}if(x.length>0&&g.size>0){let I=1/0,u=-1/0,p=0;for(const f of x){const y=f.padding??20;y>p&&(p=y);const v=g.get(f.id);v&&(I=Math.min(I,v.minY),u=Math.max(u,v.maxY))}if(I!==1/0&&u!==-1/0){const f=Math.max(0,u-I),v=Math.max(p,36),M=f+2*v,E=(I+u)/2;for(const k of x)k.y=E,k.height=M,k.swimlaneContentTop=I;const T=[...x].sort((k,O)=>{const _=k.x??0,H=O.x??0;return _-H}),m=[],S=[],A=[];for(const k of T){const O=g.get(k.id);if(!O)continue;const _=Math.max(0,O.maxX-O.minX)+2*En(k),H=(O.minX+O.maxX)/2;m.push(k.id),S.push(H),A.push(_)}const R=m.length;if(R>0){const k=new Map;if(R===1)k.set(m[0],A[0]);else{const O=[];for(let j=0;j<R-1;j++)O.push(S[j+1]-S[j]);const _=new Array(R);_[0]=0;for(let j=0;j<R-1;j++)_[j+1]=2*O[j]-_[j];let H=0,P=Number.POSITIVE_INFINITY;for(let j=0;j<R;j++){const J=A[j];j%2===0?H=Math.max(H,J-_[j]):P=Math.min(P,_[j]-J)}let G=H;H<=P?G=(H+P)/2:G=H;for(let j=0;j<R;j++){const J=_[j]+(j%2===0?G:-G),dt=Math.max(A[j],J);k.set(m[j],dt)}}for(const O of x){const _=k.get(O.id);_!=null&&(O.width=_),Ko(O)}}}}}d(Zo,"writeBackToLayoutData");var zr="[EdgeLabelNodes]";function Qo(t){const e=[],n=[],o=new Map;for(const i of t.nodes)o.set(i.id,i);for(const i of t.edges){if(!i.label||i.label.length===0||i.isLayoutOnly||i.labelNodeId)continue;const c=i.start?o.get(i.start):void 0,a=i.end?o.get(i.end):void 0;if(!c||!a){Ke.warn(zr,`Edge ${i.id} has missing source or target node`);continue}const l=`edge-label-${i.start}-${i.end}-${i.id}`,x=c.parentId!==a.parentId?a.parentId:c.parentId,I={id:l,label:i.label,edgeStart:i.start??"",edgeEnd:i.end??"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:x,isGroup:!1,labelStyle:Array.isArray(i.labelStyle)?i.labelStyle[0]:i.labelStyle??"",...c.dir?{dir:c.dir}:{}};e.push(I),i.labelNodeId=l,i.label=void 0,i.text=void 0;const u={id:`${i.id}-to-label`,start:i.start,end:l,type:"normal",isLayoutOnly:!0},p={id:`${i.id}-from-label`,start:l,end:i.end,type:"normal",isLayoutOnly:!0};n.push(u,p)}const s=[...t.nodes,...e],r=[...t.edges,...n];return{...t,nodes:s,edges:r}}d(Qo,"createEdgeLabelNodes");var Ft=.001;function oo(t){const e=t.x??0,n=t.y??0,o=t.width??0,s=t.height??0;return o>0&&s>0?{cx:e,cy:n,rect:Ae(e,n,o,s)}:void 0}d(oo,"measuredNodeRect");function so(t){if(t.isGroup)return;const e=oo(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}d(so,"nodeBoundsInfoFor");function oe(t,e,n=Ft){return Math.abs(t.x-e.x)<n&&Math.abs(t.y-e.y)<n}d(oe,"samePoint");function ft(t,e,n=Ft){return Math.abs(t.x-e.x)<n}d(ft,"sameX");function ht(t,e,n=Ft){return Math.abs(t.y-e.y)<n}d(ht,"sameY");function Tt(t,e,n=Ft){return ht(t,e,n)&&Math.abs(t.x-e.x)>n}d(Tt,"isHorizontalSegment");function wt(t,e,n=Ft){return ft(t,e,n)&&Math.abs(t.y-e.y)>n}d(wt,"isVerticalSegment");function zt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}d(zt,"overlapLength");function ce(t,e,n=Ft){return t.horizontal&&e.horizontal&&ht(t.a,e.a,n)?zt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&ft(t.a,e.a,n)?zt(t.a.y,t.b.y,e.a.y,e.b.y):0}d(ce,"sameAxisSegmentOverlapLength");function Re(t,e=Ft){const n=[];for(let o=0;o<t.length-1;o++){const s=t[o],r=t[o+1],i=Tt(s,r,e),c=wt(s,r,e);(i||c)&&n.push({index:o,a:s,b:r,horizontal:i,vertical:c})}return n}d(Re,"orthogonalSegmentsForPoints");function Qt(t,e=Ft){const n=Re(t,e);let o=0;for(let s=1;s<n.length;s++)n[s-1].horizontal!==n[s].horizontal&&o++;return o}d(Qt,"countOrthogonalBends");function pt(t,e=Ft){const n=[];for(const o of t){const s=n.length>0?n[n.length-1]:void 0;(!s||!oe(s,o,e))&&n.push({x:o.x,y:o.y})}return n}d(pt,"dedupeConsecutivePoints");function ro(t,e=Ft){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Tt(n,o,e)&&wt(o,s,e)&&Tt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:wt(n,o,e)&&Tt(o,s,e)&&wt(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}d(ro,"classifyThreeSegmentRoute");function cn(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),c=Math.max(t.y,e.y);return r>n.left-o&&s<n.right+o&&c>n.top-o&&i<n.bottom+o}d(cn,"segmentBoundsOverlapRect");function io(t,e,n=0){return t.x>e.left+n&&t.x<e.right-n&&t.y>e.top+n&&t.y<e.bottom-n}d(io,"pointInsideRect");function ts(t,e){return t.left<=e.left&&t.right>=e.right&&t.top<=e.top&&t.bottom>=e.bottom}d(ts,"rectContainsRect");function Je(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}d(Je,"rectsOverlap");function Tn(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}d(Tn,"inflateRect");function Ae(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}d(Ae,"rectFromCenterSize");function qt(t){return oo(t)?.rect}d(qt,"rectOfNodeBounds");function Ie(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}d(Ie,"portForRectSide");function co(t,e,n,o,s,r=Ft){const i=e==="left"||e==="right",c=o==="left"||o==="right";if(i&&c){if(e==="right"&&o==="left"&&t.x<n.x||e==="left"&&o==="right"&&t.x>n.x){if(ht(t,n,r))return[t,n];const x=(t.x+n.x)/2;return[t,{x,y:t.y},{x,y:n.y},n]}if(e===o){if(ht(t,n,r))return;const x=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x,y:t.y},{x,y:n.y},n]}return}if(!i&&!c){if(e===o){if(ft(t,n,r))return;const I=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:I},{x:n.x,y:I},n]}if(!(e==="bottom"&&o==="top"&&t.y<n.y||e==="top"&&o==="bottom"&&t.y>n.y))return;if(ft(t,n,r))return[t,n];const x=(t.y+n.y)/2;return[t,{x:t.x,y:x},{x:n.x,y:x},n]}if(i&&!c){const g=e==="right"&&n.x>t.x||e==="left"&&n.x<t.x,x=o==="top"&&t.y<n.y||o==="bottom"&&t.y>n.y;return g&&x?[t,{x:n.x,y:t.y},n]:void 0}const a=e==="bottom"&&n.y>t.y||e==="top"&&n.y<t.y,l=o==="left"&&t.x<n.x||o==="right"&&t.x>n.x;return a&&l?[t,{x:t.x,y:n.y},n]:void 0}d(co,"buildOrthogonalPortPath");function ao(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}d(ao,"buildSameSideTrackPath");function an(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=so(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}d(an,"collectRealNodeBounds");function me(t){const e=[],n=[];for(const o of t){const s=so(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}d(me,"collectNodeRectEntries");function es(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,i=o.width??0,c=o.height??0;n.push({nodeId:o.id,...Ae(s,r,i,c)})}return n}d(es,"collectLayoutNodeRects");function lo(t,e,n=Ft){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),i=e.get(s);if(!(!r||!i))return{srcId:o,dstId:s,srcInfo:r,dstInfo:i,collinearX:Math.abs(r.cx-i.cx)<n,collinearY:Math.abs(r.cy-i.cy)<n}}d(lo,"getNodePairGeometry");function At(t,e,n,o=[],s=0){for(const r of n)if(!o.includes(r.id)&&cn(t,e,r.rect,-s))return!0;return!1}d(At,"segmentHitsAnyRect");function fo(t,e,n,o,s=Ft,r=1e-6){const i=ht(t,e,s),c=ft(t,e,s),a=ht(n,o,s),l=ft(n,o,s);if(i&&a||c&&l||!(i||c)||!(a||l))return!1;const g=i?{a:t,b:e}:{a:n,b:o},x=c?{a:t,b:e}:{a:n,b:o},I=g.a.y,u=Math.min(g.a.x,g.b.x),p=Math.max(g.a.x,g.b.x),f=x.a.x,y=Math.min(x.a.y,x.b.y),v=Math.max(x.a.y,x.b.y);if(f<u||f>p||I<y||I>v)return!1;const M=Math.abs(f-g.a.x)<r&&Math.abs(I-g.a.y)<r||Math.abs(f-g.b.x)<r&&Math.abs(I-g.b.y)<r,E=Math.abs(f-x.a.x)<r&&Math.abs(I-x.a.y)<r||Math.abs(f-x.b.x)<r&&Math.abs(I-x.b.y)<r;return!(M&&E)}d(fo,"orthogonalSegmentsCross");function ns(t,e,n,o,s=Ft){const r=ht(t,e,s),i=ft(t,e,s),c=ht(n,o,s),a=ft(n,o,s);return i&&a&&ft(t,n,s)?zt(t.y,e.y,n.y,o.y)>s:r&&c&&ht(t,n,s)?zt(t.x,e.x,n.x,o.x)>s:!1}d(ns,"sameAxisSegmentsOverlap");function Ze(t,e,n,o,{epsilon:s=Ft,skipDegenerateOther:r=!1}={}){for(const i of n){if(i===o||i.isLayoutOnly)continue;const c=i.points;if(!(!c||c.length<2))for(let a=0;a<c.length-1;a++){const l=c[a],g=c[a+1];if(!(r&&oe(l,g,s))&&(fo(t,e,l,g,s)||ns(t,e,l,g,s)))return!0}}return!1}d(Ze,"segmentConflictsWithAnyEdge");function le(t,e,n,o,s=Ft){const r=ht(t,e,s),i=ft(t,e,s),c=ht(n,o,s),a=ft(n,o,s);if(!(r&&a||i&&c))return!1;const l=r?{a:t,b:e}:{a:n,b:o},g=r?{a:n,b:o}:{a:t,b:e},x=l.a.y,I=Math.min(l.a.x,l.b.x),u=Math.max(l.a.x,l.b.x),p=g.a.x,f=Math.min(g.a.y,g.b.y),y=Math.max(g.a.y,g.b.y);return p>I+s&&p<u-s&&x>f+s&&x<y-s}d(le,"orthogonalSegmentsStrictlyCross");function wn(t,e,n){const o=Math.min(e,n),s=Math.max(e,n);return t>o+Ft&&t<s-Ft}d(wn,"strictlyBetween");function os(t,e,n){return ft(t,e)&&ft(e,n)?wn(e.y,t.y,n.y):ht(t,e)&&ht(e,n)?wn(e.x,t.x,n.x):!1}d(os,"isCollinearIntermediate");function ss(t){let e=!1;const n=[];for(let o=0;o<t.length;o++){const s=n[n.length-1],r=t[o],i=o+1<t.length?t[o+1]:void 0;if(s&&i){if(oe(s,i)){o++,e=!0;continue}if(os(s,r,i)){e=!0;continue}}n.push(r)}return{points:n,changed:e}}d(ss,"simplifyPolylineOnce");function Qe(t){const e=[t[0]];for(let o=1;o<t.length;o++){const s=e[e.length-1],r=t[o];if(!ft(s,r)&&!ht(s,r)){const i=e.length>=2?e[e.length-2]:void 0,a=(i?ft(i,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(a)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!oe(s,o))&&n.push(o)}return n}d(Qe,"orthogonalizePolyline");function ae(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=ss(e);if(e=o.points,!o.changed)break}return e}d(ae,"simplifyPolyline");var nt=.001,Vr=.5,Oo=4;function uo(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length<n)return;const s=o.start?e.get(o.start):void 0,r=o.end?e.get(o.end):void 0;return{edge:o,points:o.points,srcRect:s?qt(s):void 0,dstRect:r?qt(r):void 0}}d(uo,"endpointContextFor");function rs(t,e,n){if(ht(t,e,nt))return{x:t.x<n.left?n.left:n.right,y:t.y};if(ft(t,e,nt)){const o=t.y<n.top?n.top:n.bottom;return{x:t.x,y:o}}return{x:Math.min(n.right,Math.max(n.left,t.x)),y:Math.min(n.bottom,Math.max(n.top,t.y))}}d(rs,"segmentEnterPoint");function An(t,e,n){const o=n?1:-1;let s=n?0:t.length-1;for(;s>=0&&s<t.length&&io(t[s],e,Vr);)s+=o;if(s<0||s>=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const i=rs(t[s],t[r],e);return n?[i,...t.slice(s)]:[...t.slice(0,s+1),i]}d(An,"clipEndpoint");function is(t,e){for(const n of t){const o=uo(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=An(s,o.srcRect,!0)),o.dstRect&&(s=An(s,o.dstRect,!1)),s=ae(Qe(s)),s=ho(s,o.srcRect,o.dstRect),o.edge.points=ae(Qe(s))}}d(is,"clipEdgeEndpointsToNodeBoundaries");function Rn(t,e,n,o=!1){if(ht(t,e,nt)){if(e.y<n.top-nt||e.y>n.bottom+nt)return e;if(o){if(t.x<n.left-nt)return{x:n.left,y:t.y};if(t.x>n.right+nt)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(ft(t,e,nt)){if(e.x<n.left-nt||e.x>n.right+nt)return e;if(o){if(t.y<n.top-nt)return{x:t.x,y:n.top};if(t.y>n.bottom+nt)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}d(Rn,"snapEndpointToBoundary");function tn(t,e,n){const o=t[e];for(let s=e+n;s>=0&&s<t.length;s+=n){const r=t[s];if(!oe(r,o,nt))return r}return t[e+n]}d(tn,"firstDistinctAdjacent");function en(t,e){const n=t+Oo,o=e-Oo;return n<=o?{lo:n,hi:o}:{lo:(t+e)/2,hi:(t+e)/2}}d(en,"cornerClearanceRange");function Nn(t,e,n){const{lo:o,hi:s}=en(e,n);return Math.min(s,Math.max(o,t))}d(Nn,"clampToCornerClearance");function cs(t){const e=Math.max(...t.map(o=>o.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}d(cs,"intersectRanges");function On(t,e){return e==="left"||e==="right"?en(t.top,t.bottom):en(t.left,t.right)}d(On,"clearanceRangeForSide");function nn(t,e,n){const o=t.y>=n.top-nt&&t.y<=n.bottom+nt,s=t.x>=n.left-nt&&t.x<=n.right+nt;if(ht(t,e,nt)&&o){if(Math.abs(t.x-n.left)<nt)return"left";if(Math.abs(t.x-n.right)<nt)return"right"}if(ft(t,e,nt)&&s){if(Math.abs(t.y-n.top)<nt)return"top";if(Math.abs(t.y-n.bottom)<nt)return"bottom"}}d(nn,"terminalSideForSegment");function Pe(t){return t==="left"||t==="right"}d(Pe,"isHorizontalSide");function as(t,e,n,o,s){const r=[],i=n?nn(t,e,n):void 0,c=o?nn(e,t,o):void 0;return n&&i&&Pe(i)===s&&r.push(On(n,i)),o&&c&&Pe(c)===s&&r.push(On(o,c)),r.length>0?cs(r):void 0}d(as,"straightClearanceRange");function Pn(t,e,n,o,s){const r=as(t,e,n,o,s);if(!r)return;const i=s?t.y:t.x,c=Math.min(r.hi,Math.max(r.lo,i));if(!(Math.abs(c-i)<nt))return s?[{x:t.x,y:c},{x:e.x,y:c}]:[{x:c,y:t.y},{x:c,y:e.y}]}d(Pn,"clearStraightEndpointCornerAxis");function ho(t,e,n){if(t.length!==2)return t;const[o,s]=t;return ht(o,s,nt)?Pn(o,s,e,n,!0)??t:ft(o,s,nt)?Pn(o,s,e,n,!1)??t:t}d(ho,"clearStraightEndpointCornerConnections");function ls(t,e,n){return Pe(n)?{x:t.x,y:Nn(t.y,e.top,e.bottom)}:{x:Nn(t.x,e.left,e.right),y:t.y}}d(ls,"cornerClearedEndpoint");function fs(t,e,n,o,s,r){const i=t.map(c=>({...c}));for(let c=e;c>=0&&c<t.length;c+=n){const a=t[c];if(r&&!ht(a,o,nt)||!r&&!ft(a,o,nt))break;r?i[c].y=s.y:i[c].x=s.x}return i}d(fs,"moveCollinearEndpointRun");function Bn(t,e,n){if(t.length<2)return t;const o=n?0:t.length-1,s=n?1:-1,r=t[o],i=tn(t,o,s);if(!i)return t;const c=nn(r,i,e);if(!c)return t;const a=Pe(c),l=ls(r,e,c);return oe(r,l,nt)?t:fs(t,o,s,r,l,a)}d(Bn,"clearEndpointCornerConnection");function kn(t,e,n){const o=Math.min(t.x,e.x)>=n.left-nt&&Math.max(t.x,e.x)<=n.right+nt,s=Math.min(t.y,e.y)>=n.top-nt&&Math.max(t.y,e.y)<=n.bottom+nt;if(Math.abs(t.y-n.top)<nt&&Math.abs(e.y-n.top)<nt&&o)return"top";if(Math.abs(t.y-n.bottom)<nt&&Math.abs(e.y-n.bottom)<nt&&o)return"bottom";if(Math.abs(t.x-n.left)<nt&&Math.abs(e.x-n.left)<nt&&s)return"left";if(Math.abs(t.x-n.right)<nt&&Math.abs(e.x-n.right)<nt&&s)return"right"}d(kn,"borderSideForSegment");function _n(t,e,n,o){switch(t){case"top":return ft(e,n,nt)&&n.y<o.top-nt;case"bottom":return ft(e,n,nt)&&n.y>o.bottom+nt;case"left":return ht(e,n,nt)&&n.x<o.left-nt;case"right":return ht(e,n,nt)&&n.x>o.right+nt}}d(_n,"leavesOutward");function Fn(t,e,n){if(t.length<3)return t;if(n){const r=kn(t[0],t[1],e);return r&&_n(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=kn(t[o-1],t[o],e);return s&&_n(s,t[o-1],t[o-2],e)?t.slice(0,o):t}d(Fn,"collapseOwnBorderStub");function ds(t,e,n){let o=t;if(e){const r=tn(o,0,1);if(r){const i=Rn(r,o[0],e);i!==o[0]&&(o=[i,...o.slice(1)])}o=Fn(o,e,!0)}if(n){const r=o.length-1,i=tn(o,r,-1);if(i){const c=Rn(i,o[r],n,!0);c!==o[r]&&(o=[...o.slice(0,r),c])}o=Fn(o,n,!1)}const s=ho(o,e,n);return s!==o||o.length===2?s:(e&&(o=Bn(o,e,!0)),n&&(o=Bn(o,n,!1)),o)}d(ds,"snapAndCollapseEndpoints");function Dn(t,e){for(const n of t){const o=uo(n,e,2);if(!o)continue;const s=pt(o.points,nt),r=ds(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=i}}d(Dn,"prepareEdgeEndpointsForRenderer");function go(t){return new Map(t.map(e=>[e.id,e]))}d(go,"buildNodeMap");function us(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!s?.isGroup)break;o=s.id,n=s.parentId}return o}d(us,"resolveTopLevelGroupId");function Hn(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!s?.isGroup)break;n++,o=s.parentId}return n}d(Hn,"groupDepth");function po(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const i=r.x,c=r.y;if(typeof i!="number"||typeof c!="number")continue;const a=r.width??0,l=r.height??0;e=Math.min(e,i-a/2),n=Math.max(n,i+a/2),o=Math.min(o,c-l/2),s=Math.max(s,c+l/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}d(po,"boundsForChildren");function hs(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}d(hs,"applyGroupBounds");function gs(t){const e=go(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>Hn(s,e)-Hn(o,e));for(const o of n){const s=t.filter(i=>i.parentId===o.id),r=po(s);r&&hs(o,r)}}d(gs,"recomputeNestedGroupBounds");function on(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(a=>!a.isGroup);let r=1/0,i=-1/0;for(const a of s){const l=a[e];typeof l=="number"&&(r=Math.min(r,l),i=Math.max(i,l))}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const c=d(a=>r+i-a,"mirror");for(const a of n){const l=a[e];typeof l=="number"&&(a[e]=c(l));const g=a.groupTitleRect;g&&(a.groupTitleRect=e==="x"?{...g,left:c(g.right),right:c(g.left)}:{...g,top:c(g.bottom),bottom:c(g.top)})}for(const a of o)for(const l of a.points??[])l[e]=c(l[e]);return!0}d(on,"mirrorAxis");function ps(t){return(t.nodes??[]).some(n=>!n.isGroup)?on(t,"y"):!0}d(ps,"applyBtDirectionTransform");function ms(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(P=>!P.isGroup);let r=1/0,i=1/0;for(const P of s){const G=P.x??0,j=P.y??0;G<r&&(r=G),j<i&&(i=j)}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const c=36;let a=0,l=0;for(const P of s)a+=P.width??0,l+=P.height??0;const g=a/s.length,x=l/s.length,I=x>0?Math.max(1,g/x):1;for(const P of s){const G=P.x??0,J=((P.y??0)-i)*I+c,dt=G-r;P.x=J,P.y=dt}for(const P of o)if(P.points)for(const G of P.points){const j=G.x,dt=(G.y-i)*I+c,mt=j-r;G.x=dt,G.y=mt}gs(n);const u=n.filter(P=>P.isGroup&&!P.parentId);if(u.length===0)return e==="RL"&&on(t,"x"),!0;const p=go(n),f=new Map;for(const P of n){if(P.isGroup)continue;const G=us(P,p);if(!G)continue;const j=f.get(G)??[];j.push(P),f.set(G,j)}let y=0;for(const P of u){const G=P.padding??0;G>y&&(y=G)}const v=[];let M=1/0,E=-1/0;for(const P of u){const G=f.get(P.id)??[],j=po(G);j&&(M=Math.min(M,j.minX),E=Math.max(E,j.maxX),v.push({lane:P,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(M===1/0||E===-1/0)return!0;const T=Math.max(0,E-M),m=Math.max(y,10),S=T+2*m,A=c+S,O=(M+E)/2-S/2-c,_=O+A/2,H=Math.max(y,c);v.sort((P,G)=>P.centerY-G.centerY);for(let P=0;P<v.length;P++){const G=v[P];let j,J;if(P===0?j=G.contentTop-H:j=(v[P-1].contentBottom+G.contentTop)/2,P===v.length-1)J=G.contentBottom+H;else{const kt=v[P+1];J=(G.contentBottom+kt.contentTop)/2}const dt=Math.max(0,J-j),mt=(j+J)/2;G.lane.x=_,G.lane.y=mt,G.lane.width=A,G.lane.height=dt,G.lane.swimlaneContentTop=G.contentTop,G.lane.groupTitleRect={left:O,right:O+c,top:j,bottom:J}}return e==="RL"&&on(t,"x"),!0}d(ms,"applyLrDirectionTransform");var se=1e-6,jr=8,ze=jr,Ur=[0,ze,-ze,2*ze,-2*ze];function ys(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e);for(const s of t){if(s.isLayoutOnly)continue;const r=s.points;if(!r||r.length<4)continue;const i=ro(pt(r,se),se);if(!i)continue;const{p3:c}=i,a=i.kind==="HVH",l=lo(s,n,se);if(!l)continue;const{srcId:g,dstId:x,srcInfo:I,dstInfo:u,collinearX:p,collinearY:f}=l;if(p||f)continue;let y;const v=I.rect;for(const M of Ur){let E,T,m;if(a){const _=u.cy>I.cy?v.bottom:v.top,H=I.cx+M;if(H<=v.left+se||H>=v.right-se)continue;E={x:H,y:_},T={x:H,y:c.y},m={x:c.x,y:c.y}}else{const _=u.cx>I.cx?v.right:v.left,H=I.cy+M;if(H<=v.top+se||H>=v.bottom-se)continue;E={x:_,y:H},T={x:c.x,y:H},m={x:c.x,y:c.y}}const S=oe(E,T,se),A=oe(T,m,se);if(S&&A||!S&&At(E,T,o,[g],1)||!A&&At(T,m,o,[x],1))continue;const R=!S&&Ze(E,T,t,s,{epsilon:se,skipDegenerateOther:!0}),k=!A&&Ze(T,m,t,s,{epsilon:se,skipDegenerateOther:!0});if(!(R||k)){S?y=[T,m]:A?y=[E,T]:y=[E,T,m];break}}y&&(s.points=y)}}d(ys,"portSwapToLShape");function xs(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values());for(const c of t){if(c.isLayoutOnly)continue;const a=c.points;if(!a||a.length<4)continue;const l=pt(a,.001);if(l.length<4)continue;const g=l.length-1,x=l[g],I=l[g-1],u=l[g-2],p=x.x-I.x,f=x.y-I.y,y=Math.hypot(p,f);if(y>=10||y<.001)continue;const v=I.x-u.x,M=I.y-u.y;if(Math.hypot(v,M)<.001)continue;const T=Tt(I,x,.001),m=wt(I,x,.001),S=Tt(u,I,.001),A=wt(u,I,.001);if(!(T&&A||m&&S))continue;const R=c.end,k=c.start,O=R?e.get(R):void 0;if(!O)continue;const _=O.x??0,H=O.y??0,P=qt(O);if(!P)continue;let G,j;if(A){const W=M<0;G={x:_,y:u.y},j={x:_,y:W?P.bottom:P.top}}else{const W=v>0;G={x:u.x,y:H},j={x:W?P.right:P.left,y:H}}if(At(G,j,r,R?[R]:[],-2)||At(G,j,i,[],-2))continue;if(k){const W=e.get(k),et=W?qt(W):void 0;if(et&&io(G,et,2))continue}const J=d((W,et)=>`${W.x.toFixed(3)},${W.y.toFixed(3)}|${et.x.toFixed(3)},${et.y.toFixed(3)}`,"ownSegmentKey"),dt=new Set;for(let W=0;W<l.length-1;W++)dt.add(J(l[W],l[W+1]));const mt=d((W,et)=>{for(const at of t){if(at===c||at.isLayoutOnly)continue;const gt=at.points;if(!(!gt||gt.length<2))for(let xt=0;xt<gt.length-1;xt++){const vt=gt[xt],Vt=gt[xt+1];if(!dt.has(J(vt,Vt))&&le(W,et,vt,Vt,.001))return!0}}return!1},"segmentCrossesOtherEdge");if(mt(G,j))continue;if(g-3>=0){const W=l[g-3],et=[k,R].filter(at=>!!at);if(At(W,G,r,et,-2)||mt(W,G))continue}const Pt=[...l.slice(0,g-2),G,j];c.points=Pt;const Q=c.labelNodeId;if(Q){const W=e.get(Q);if(W){const et=W.width??0,at=W.height??0;if(et>0&&at>0){let gt,xt,vt=-1;for(let Vt=0;Vt<Pt.length-1;Vt++){const jt=Pt[Vt],Ut=Pt[Vt+1],te=Math.hypot(Ut.x-jt.x,Ut.y-jt.y),Se=ht(jt,Ut,.001),de=ft(jt,Ut,.001);(Se&&te>=et+2||de&&te>=at+2)&&te>vt&&(vt=te,gt=(jt.x+Ut.x)/2,xt=(jt.y+Ut.y)/2)}gt!==void 0&&xt!==void 0&&(W.x=gt,W.y=xt)}}}}}d(xs,"collapseShortTerminalStub");var Z=.001,_t=8,it=Re,In=d((t,e)=>ft(t,e,Z)||ht(t,e,Z),"orthogonallyAligned");function bs(t,e){const s=d((u,p)=>{const f=u.x??0,y=u.y??0,v=p.x-f,M=p.y-y;let E=(u.width??0)/2,T=(u.height??0)/2;return Math.abs(M)*E>Math.abs(v)*T?(M<0&&(T=-T),{x:f+(M===0?0:T*v/M),y:y+T}):(v<0&&(E=-E),{x:f+E,y:y+(v===0?0:E*M/v)})},"rectIntersect"),r=d((u,p)=>{const f=pt(u.points??[]);if(f.length<2)return;const y=p?u.start:u.end,v=y?e.get(y):void 0,M=v?qt(v):void 0;if(!v||!y||!M)return;const E=p?f[0]:f[f.length-1],T=p?f[1]:f[f.length-2],m=s(v,E);let S=E;if(In(T,m)&&(S=T),ft(m,S,Z))return{edge:u,edgeId:String(u.id??""),nodeId:y,atStart:p,orientation:"V",coord:m.x,min:Math.min(m.y,S.y),max:Math.max(m.y,S.y),boundary:m,railEnd:S,rect:M};if(ht(m,S,Z))return{edge:u,edgeId:String(u.id??""),nodeId:y,atStart:p,orientation:"H",coord:m.y,min:Math.min(m.x,S.x),max:Math.max(m.x,S.x),boundary:m,railEnd:S,rect:M}},"terminalLaneFor"),i=d((u,p)=>Math.max(0,Math.min(u.max,p.max)-Math.max(u.min,p.min)),"projectedOverlapLength"),c=d((u,p)=>u.nodeId!==p.nodeId||u.orientation!==p.orientation?!1:u.orientation==="H"?(Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1)&&ft(u.boundary,p.boundary,1):(Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1)&&ht(u.boundary,p.boundary,1),"sameTerminalFace"),a=d((u,p)=>u.nodeId!==p.nodeId||u.orientation!==p.orientation?!1:i(u,p)>=_t&&Math.abs(u.coord-p.coord)<.5,"exactTerminalLaneConflict"),l=d((u,p)=>{if(u.nodeId!==p.nodeId||u.orientation!==p.orientation||u.orientation!=="H"||u.atStart===p.atStart)return!1;const f=i(u,p);if(f<_t)return!1;const y=u.rect.bottom-u.rect.top;return f<y||f>2*y?!1:c(u,p)&&Math.abs(u.coord-p.coord)<16},"nearTerminalLaneConflict"),g=d((u,p)=>{const f=pt(u.edge.points??[]);if(f.length<2)return;const y=u.orientation==="V"?{x:u.boundary.x+p,y:u.boundary.y}:{x:u.boundary.x,y:u.boundary.y+p},v=u.orientation==="V"?{x:u.railEnd.x+p,y:u.railEnd.y}:{x:u.railEnd.x,y:u.railEnd.y+p};if(!d(()=>Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1?ht(y,u.boundary,Z)&&y.x>=u.rect.left+1&&y.x<=u.rect.right-1:Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1?ft(y,u.boundary,Z)&&y.y>=u.rect.top+1&&y.y<=u.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(u.atStart){const S=f.length>1&&oe(f[1],u.railEnd,Z),A=f.slice(S?2:1),R=A[0];return R&&!In(R,v)?void 0:[y,v,...A]}const E=f.length>1&&oe(f[f.length-2],u.railEnd,Z),T=f.slice(0,E?-2:-1),m=T[T.length-1];if(!(m&&!In(m,v)))return[...T,v,y]},"shiftedCandidate"),x=d(u=>{const p=u.edge,f=pt(p.points??[]);if(f.length!==2)return!1;const y=p.start,v=p.end,M=y?e.get(y):void 0,E=v?e.get(v):void 0;if(!M||!E)return!1;const T=M.x??0,m=M.y??0,S=E.x??0,A=E.y??0,[R,k]=f;return ht(R,k,Z)&&Math.abs(m-A)<1&&Math.abs(T-S)>1||ft(R,k,Z)&&Math.abs(T-S)<1&&Math.abs(m-A)>1},"laneIsStraightCollinearConnector"),I=[-7,7,-14,14,-21,21];for(let u=0;u<8;u++){const p=t.filter(y=>!y.isLayoutOnly).flatMap(y=>[r(y,!0),r(y,!1)]).filter(y=>!!y);let f=!1;for(let y=0;y<p.length&&!f;y++)for(let v=y+1;v<p.length&&!f;v++){const M=p[y],E=p[v];if(M.edge===E.edge||!(a(M,E)||l(M,E)))continue;const T=!a(M,E),m=[M,E].sort((S,A)=>{const R=x(S),k=x(A);return R!==k?Number(R)-Number(k):+!A.atStart-+!S.atStart});for(const S of m){for(const A of I){const R=g(S,A);if(!R)continue;const k=r({...S.edge,points:R},S.atStart);if(!(!k||p.some(O=>O.edge!==S.edge&&(a(k,O)||T&&l(k,O))))){S.edge.points=R,f=!0;break}}if(f)break}}if(!f)return}}d(bs,"separateSharedRenderedTerminalLanes");function Ms(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=d((c,a)=>{const l=c.start,g=c.end,x=it(a);if(x.length!==a.length-1)return!1;const I=[l,g].filter(u=>!!u);for(const u of x)if(At(u.a,u.b,o,I,-2)||At(u.a,u.b,s,[],-2))return!1;for(const u of t){if(u===c||u.isLayoutOnly)continue;const p=u.points;if(!(!p||p.length<2)){for(const f of x)for(const y of it(pt(p)))if(ce(f,y,.5)>=_t||le(f.a,f.b,y.a,y.b,Z))return!1}}return!0},"candidateIsSafe"),i=d((c,a)=>{if(a+4>=c.length)return;const l=c[a],g=c[a+1],x=c[a+2],I=c[a+3],u=c[a+4],p=Tt(l,g)&&wt(g,x)&&Tt(x,I)&&wt(I,u)&&ft(l,I,Z)&&ft(l,u,Z)&&ft(g,x,Z)&&(g.x-l.x)*(I.x-x.x)<0,f=wt(l,g)&&Tt(g,x)&&wt(x,I)&&Tt(I,u)&&ht(l,I,Z)&&ht(l,u,Z)&&ht(g,x,Z)&&(g.y-l.y)*(I.y-x.y)<0;if(p||f)return pt([...c.slice(0,a+1),u,...c.slice(a+5)]);if(a+5>=c.length)return;const y=c[a+5],v=wt(l,g)&&Tt(g,x)&&wt(x,I)&&Tt(I,u)&&wt(u,y)&&ft(l,u,Z)&&ft(l,y,Z)&&ft(x,I,Z)&&(x.x-g.x)*(u.x-I.x)<0,M=Tt(l,g)&&wt(g,x)&&Tt(x,I)&&wt(I,u)&&Tt(u,y)&&ht(l,u,Z)&&ht(l,y,Z)&&ht(x,I,Z)&&(x.y-g.y)*(u.y-I.y)<0;if(!(!v&&!M))return pt([...c.slice(0,a+1),y,...c.slice(a+6)])},"withoutDogleg");for(let c=0;c<8;c++){let a=!1;for(const l of t){if(l.isLayoutOnly)continue;const g=pt(l.points??[]);for(let x=0;x<=g.length-5;x++){const I=i(g,x);if(!(!I||!r(l,I))){l.points=I,a=!0;break}}if(a)break}if(!a)return}}d(Ms,"collapseRedundantRectangularDoglegs");function Xn(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values()),c=t.filter(p=>!p.isLayoutOnly),a=d((p,f,y)=>pt(p===f?y??[]:p.points??[]),"pointsFor"),l=d((p,f)=>{let y=0;for(let v=0;v<c.length;v++){const M=it(a(c[v],p,f));for(let E=v+1;E<c.length;E++){const T=it(a(c[E],p,f));for(const m of M)for(const S of T)le(m.a,m.b,S.a,S.b,Z)&&y++}}return y},"strictCrossingCount"),g=d(p=>{const f=it(p);if(f.length!==3)return;const y=f[1];if(!(f[0].horizontal===y.horizontal||f[2].horizontal===y.horizontal))return{index:y.index,horizontal:y.horizontal,vertical:y.vertical,segment:y}},"middleRail"),x=d((p,f)=>{const y=[p.start,p.end].filter(v=>!!v);return r.filter(v=>{if(y.includes(v.id))return!1;const M=v.rect;return f.horizontal?zt(f.a.x,f.b.x,M.left,M.right)>=_t&&f.a.y>=M.top-2&&f.a.y<=M.bottom+2:zt(f.a.y,f.b.y,M.top,M.bottom)>=_t&&f.a.x>=M.left-2&&f.a.x<=M.right+2})},"blockingRectsFor"),I=d((p,f,y)=>{const v=p.map(E=>({...E}));if(f.horizontal)v[f.index].y=y,v[f.index+1].y=y;else if(f.vertical)v[f.index].x=y,v[f.index+1].x=y;else return;const M=ae(pt(v));return it(M).length===M.length-1?M:void 0},"candidateByMovingRail"),u=d((p,f,y)=>{const v=[p.start,p.end].filter(E=>!!E),M=it(f);if(M.length!==f.length-1)return!1;for(const E of M)if(At(E.a,E.b,r,v,-2)||At(E.a,E.b,i,[],-2))return!1;for(const E of c)if(E!==p){for(const T of M)for(const m of it(a(E)))if(ce(T,m,.5)>=_t)return!1}return l(p,f)<=y},"candidateIsSafe");for(let p=0;p<8;p++){const f=l();let y=!1;for(const v of c){const M=a(v),E=g(M);if(!E)continue;const T=x(v,E.segment);if(T.length===0)continue;const m=E.horizontal?[Math.min(...T.map(S=>S.rect.top))-20,Math.max(...T.map(S=>S.rect.bottom))+20]:[Math.min(...T.map(S=>S.rect.left))-20,Math.max(...T.map(S=>S.rect.right))+20];for(const S of m){const A=I(M,E.segment,S);if(!(!A||!u(v,A,f))){v.points=A,y=!0;break}}if(y)break}if(!y)return}}d(Xn,"liftObstacleHuggingSameSideRails");function Yn(t,e){const o=d(a=>{const l=a.groupTitleRect;if(!(!l||typeof l.left!="number"||typeof l.right!="number"||typeof l.top!="number"||typeof l.bottom!="number"||!Number.isFinite(l.left)||!Number.isFinite(l.right)||!Number.isFinite(l.top)||!Number.isFinite(l.bottom)||l.right<=l.left||l.bottom<=l.top))return{left:l.left,right:l.right,top:l.top,bottom:l.bottom}},"validTitleRect"),s=d(a=>{if(!a.isGroup||a.parentId)return;const l=a.direction,g=typeof l=="string"?l.toUpperCase():"";if(g==="LR"||g==="RL"||g==="BT")return;const x=o(a),I=a.y,u=a.height;if(!x||typeof I!="number"||typeof u!="number"||!Number.isFinite(I)||!Number.isFinite(u)||u<=0)return;const p=x.right-x.left,f=x.bottom-x.top;if(!(f<=0||p<f))return{node:a,rect:x}},"topLaneTitleFor"),r=d((a,l)=>{if(!a.horizontal)return!1;const g=a.a.y;return g<=l.top+Z||g>=l.bottom-Z?!1:zt(a.a.x,a.b.x,l.left,l.right)>=_t},"horizontalSegmentIntersectsTitle"),i=[...e.values()].map(s).filter(a=>!!a);if(i.length===0)return;let c=0;for(const a of t){if(a.isLayoutOnly)continue;const l=pt(a.points??[]);for(const g of it(l))for(const x of i)r(g,x.rect)&&(c=Math.max(c,x.rect.bottom-g.a.y+4))}if(!(c<=Z))for(const a of i){const l=a.node.y,g=a.node.height;typeof l!="number"||typeof g!="number"||!Number.isFinite(l)||!Number.isFinite(g)||g<=0||(a.node.y=l-c/2,a.node.height=g+c,a.node.groupTitleRect={...a.rect,top:a.rect.top-c,bottom:a.rect.bottom-c})}}d(Yn,"liftTopLaneTitleBandsAboveRails");function Gn(t,e){const o=d(l=>{const g=l.groupTitleRect;if(!(!g||typeof g.left!="number"||typeof g.right!="number"||typeof g.top!="number"||typeof g.bottom!="number"||!Number.isFinite(g.left)||!Number.isFinite(g.right)||!Number.isFinite(g.top)||!Number.isFinite(g.bottom)||g.right<=g.left||g.bottom<=g.top))return{left:g.left,right:g.right,top:g.top,bottom:g.bottom}},"validTitleRect"),s=d(l=>{if(!l.isGroup||l.parentId||l.direction!=="LR")return;const x=o(l),I=l.x,u=l.width;if(!x||typeof I!="number"||typeof u!="number"||!Number.isFinite(I)||!Number.isFinite(u)||u<=0)return;const p=x.right-x.left,f=x.bottom-x.top;if(!(p<=0||f<p))return{node:l,rect:x}},"leftLaneTitleFor"),r=d((l,g)=>{if(!l.vertical)return!1;const x=l.a.x;return x<=g.left+Z||x>=g.right-Z?!1:zt(l.a.y,l.b.y,g.top,g.bottom)>=_t},"verticalSegmentIntersectsTitle"),i=d((l,g)=>{if(!l.horizontal)return!1;const x=l.a.y;return x<=g.top+Z||x>=g.bottom-Z?!1:zt(l.a.x,l.b.x,g.left,g.right)>=_t},"horizontalSegmentIntersectsTitle"),c=[...e.values()].map(s).filter(l=>!!l);if(c.length===0)return;let a=0;for(const l of t){if(l.isLayoutOnly)continue;const g=pt(l.points??[]);for(const x of it(g))for(const I of c)if(r(x,I.rect))a=Math.max(a,I.rect.right-x.a.x+4);else if(i(x,I.rect)){const u=Math.min(x.a.x,x.b.x);a=Math.max(a,I.rect.right-u+4)}}if(!(a<=Z))for(const l of c){const g=l.node.x,x=l.node.width;typeof g!="number"||typeof x!="number"||!Number.isFinite(g)||!Number.isFinite(x)||x<=0||(l.node.x=g-a/2,l.node.width=x+a,l.node.groupTitleRect={...l.rect,left:l.rect.left-a,right:l.rect.right-a})}}d(Gn,"shiftLeftLaneTitleBandsLeftOfRails");function Is(t,e){const{realNodeRects:o}=me(e.values()),s=t.filter(p=>!p.isLayoutOnly),r=d((p,f=new Map)=>pt(f.get(p)??p.points??[]),"replacementPointsFor"),i=d((p=new Map)=>{let f=0;for(let y=0;y<s.length;y++){const v=it(r(s[y],p));for(let M=y+1;M<s.length;M++){const E=it(r(s[M],p));for(const T of v)for(const m of E)le(T.a,T.b,m.a,m.b,Z)&&f++}}return f},"crossingCount"),c=d((p=new Map)=>s.reduce((f,y)=>f+Qt(r(y,p)),0),"totalBends"),a=d(p=>{const f=r(p);if(f.length<4)return;const y=f[f.length-2],v=f[f.length-1];if(!(!Tt(y,v,Z)&&!wt(y,v,Z)))return{tailStart:y,terminal:v}},"terminalTailFor"),l=d((p,f)=>{const y=r(p);if(y.length<3)return;const v=y[0],M=y[1];let E;if(Tt(v,M,Z))E={x:M.x,y:f.tailStart.y};else if(wt(v,M,Z))E={x:f.tailStart.x,y:M.y};else return;const T=ae(pt([v,M,E,f.tailStart,f.terminal]));return it(T).length===T.length-1?T:void 0},"candidateWithDestinationTail"),g=d((p,f)=>{const y=[p.start,p.end].filter(v=>!!v);for(const v of it(f))if(At(v.a,v.b,o,y,-2))return!0;return!1},"pathHasNodeHit"),x=d((p,f,y)=>{for(const v of s)if(v!==p){for(const M of it(f))for(const E of it(r(v,y)))if(ce(M,E,.5)>=_t)return!0}return!1},"pathHasSharedTrack"),I=d((p,f,y)=>!g(p,f)&&!x(p,f,y),"candidateIsSafe"),u=d(()=>{const p=new Map;for(const f of s){const y=f.end;if(!y||!e.has(y)||r(f).length<4)continue;const M=p.get(y)??[];M.push(f),p.set(y,M)}return p},"edgesByDestination");for(let p=0;p<4;p++){const f=i();if(f===0)return;const y=c();let v,M=f,E=y;for(const T of u().values())for(let m=0;m<T.length;m++)for(let S=m+1;S<T.length;S++){const A=T[m],R=T[S],k=a(A),O=a(R);if(!k||!O)continue;const _=l(A,O),H=l(R,k);if(!_||!H)continue;const P=new Map([[A,_],[R,H]]);if(!I(A,_,P)||!I(R,H,P))continue;const G=i(P),j=c(P);G>=f||G>M||G===M&&j>=E||(v=P,M=G,E=j)}if(!v)return;for(const[T,m]of v)T.points=m}}d(Is,"swapDestinationTerminalTailsToReduceCrossings");function Ss(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values()),c=t.filter(T=>!T.isLayoutOnly),a=d((T,m=new Map)=>pt(m.get(T)??T.points??[]),"replacementPointsFor"),l=d((T=new Map)=>{let m=0;for(let S=0;S<c.length;S++){const A=it(a(c[S],T));for(let R=S+1;R<c.length;R++){const k=it(a(c[R],T));for(const O of A)for(const _ of k)le(O.a,O.b,_.a,_.b,Z)&&m++}}return m},"strictCrossingCount"),g=d((T=new Map)=>c.reduce((m,S)=>m+Qt(a(S,T)),0),"totalBends"),x=d(T=>{const m=T.start,S=T.end,A=m?e.get(m):void 0,R=S?e.get(S):void 0,k=A?qt(A):void 0,O=R?qt(R):void 0;return k&&O?{src:k,dst:O}:void 0},"endpointRectsFor"),I=d((T,m,S)=>{if(S.index<=0||S.index+1>=m.length-1)return;const A=x(T);if(A){if(S.vertical){const R=S.a.x,k=Math.min(A.src.left,A.dst.left),O=Math.max(A.src.right,A.dst.right),_=R<k-Z?"left":R>O+Z?"right":void 0;return _?{edge:T,points:m,segmentIndex:S.index,axis:"vertical",side:_,coord:R,min:Math.min(S.a.y,S.b.y),max:Math.max(S.a.y,S.b.y)}:void 0}if(S.horizontal){const R=S.a.y,k=Math.min(A.src.top,A.dst.top),O=Math.max(A.src.bottom,A.dst.bottom),_=R<k-Z?"top":R>O+Z?"bottom":void 0;return _?{edge:T,points:m,segmentIndex:S.index,axis:"horizontal",side:_,coord:R,min:Math.min(S.a.x,S.b.x),max:Math.max(S.a.x,S.b.x)}:void 0}}},"externalRailForSegment"),u=d(()=>{const T=[];for(const m of c){const S=a(m);for(const A of it(S)){const R=I(m,S,A);R&&T.push(R)}}return T},"collectExternalRails"),p=d((T,m)=>T.edge!==m.edge&&T.axis===m.axis&&T.side===m.side&&zt(T.min,T.max,m.min,m.max)>=_t,"railsInteract"),f=d(T=>{const m=[],S=new Set;for(const A of T){if(S.has(A))continue;const R=[A],k=[];for(S.add(A);R.length>0;){const O=R.pop();k.push(O);for(const _ of T)!S.has(_)&&p(O,_)&&(S.add(_),R.push(_))}k.length>1&&m.push(k)}return m},"connectedComponents"),y=d(T=>{const m=[];for(const S of T)m.some(A=>Math.abs(A-S.coord)<Z)||m.push(S.coord);for(;m.length<T.length;){const S=Math.min(...m),A=Math.max(...m),R=T[0].side;m.push(R==="left"||R==="top"?S-12*(T.length-m.length):A+12*(T.length-m.length))}return m},"uniqueCoordsFor"),v=d(T=>{const m=T.map(R=>R.coord),S=y(T),A=[];if(T.length<=6){const R=new Array(S.length).fill(!1),k=[],O=d(()=>{if(k.length===T.length){k.some((_,H)=>Math.abs(_-m[H])>=Z)&&A.push([...k]);return}for(const[_,H]of S.entries())R[_]||(R[_]=!0,k.push(H),O(),k.pop(),R[_]=!1)},"visit");return O(),A}for(let R=0;R<m.length;R++)for(let k=R+1;k<m.length;k++){const O=[...m];[O[R],O[k]]=[O[k],O[R]],A.push(O)}return A},"coordinateAssignmentsFor"),M=d((T,m)=>{const S=new Map;for(const[R,k]of T.entries()){const O=m[R],_=S.get(k.edge)??k.points.map(H=>({x:H.x,y:H.y}));k.axis==="vertical"?(_[k.segmentIndex].x=O,_[k.segmentIndex+1].x=O):(_[k.segmentIndex].y=O,_[k.segmentIndex+1].y=O),S.set(k.edge,_)}const A=new Map;for(const[R,k]of S){const O=ae(pt(k));if(it(O).length!==O.length-1)return;A.set(R,O)}return A},"replacementsForAssignment"),E=d(T=>{for(const[m,S]of T){const A=[m.start,m.end].filter(R=>!!R);for(const R of it(S))if(At(R.a,R.b,r,A,-2)||At(R.a,R.b,i,[],-2))return!1}for(let m=0;m<c.length;m++){const S=c[m],A=T.has(S),R=it(a(S,T));for(let k=m+1;k<c.length;k++){const O=c[k];if(!A&&!T.has(O))continue;const _=it(a(O,T));for(const H of R)for(const P of _)if(ce(H,P,.5)>=_t)return!1}}return!0},"candidateIsSafe");for(let T=0;T<4;T++){const m=l();if(m===0)return;let S,A=m,R=g(),k=Number.POSITIVE_INFINITY;for(const O of f(u()))for(const _ of v(O)){const H=M(O,_);if(!H||!E(H))continue;const P=l(H);if(P>=m)continue;const G=g(H),j=O.reduce((J,dt,mt)=>J+Math.abs(_[mt]-dt.coord),0);P>A||P===A&&(G>R||G===R&&j>=k)||(S=H,A=P,R=G,k=j)}if(!S)return;for(const[O,_]of S)O.points=_}}d(Ss,"reassignCrossingExternalRailChannels");function Cs(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=t.filter(u=>!u.isLayoutOnly),i=d((u,p,f)=>pt(u===p?f??[]:u.points??[]),"pointsFor"),c=d(u=>it(u).reduce((p,f)=>{const y=f.a.x-f.b.x,v=f.a.y-f.b.y;return p+Math.hypot(y,v)},0),"pathLength"),a=d((u,p)=>{let f=0;for(let y=0;y<r.length;y++){const v=it(i(r[y],u,p));for(let M=y+1;M<r.length;M++){const E=it(i(r[M],u,p));for(const T of v)for(const m of E)le(T.a,T.b,m.a,m.b,Z)&&f++}}return f},"strictCrossingCount"),l=d((u,p)=>{if(u.horizontal){const f=u.a.y;return(Math.abs(f-p.top)<1||Math.abs(f-p.bottom)<1)&&zt(u.a.x,u.b.x,p.left,p.right)>=_t}if(u.vertical){const f=u.a.x;return(Math.abs(f-p.left)<1||Math.abs(f-p.right)<1)&&zt(u.a.y,u.b.y,p.top,p.bottom)>=_t}return!1},"segmentRunsAlongRectBorder"),g=d(u=>{const p=[u.start,u.end].filter(y=>!!y),f=[];for(const y of p){const v=e.get(y),M=v?qt(v):void 0;M&&f.push(M)}return f},"endpointRectsFor"),x=d((u,p)=>{if(p+3>=u.length)return[];const f=u[p],y=u[p+1],v=u[p+2],M=u[p+3],E=Tt(f,y,Z)&&wt(y,v,Z)&&Tt(v,M,Z),T=wt(f,y,Z)&&Tt(y,v,Z)&&wt(v,M,Z);if(!E&&!T)return[];if(!(E?Math.sign(y.x-f.x)!==Math.sign(M.x-v.x):Math.sign(y.y-f.y)!==Math.sign(M.y-v.y)))return[];const S=ft(f,M,Z)||ht(f,M,Z)?[]:[{x:f.x,y:M.y},{x:M.x,y:f.y}],A=S.length===0?[[...u.slice(0,p+1),...u.slice(p+3)]]:S.map(k=>[...u.slice(0,p+1),k,...u.slice(p+3)]),R=new Set;return A.map(k=>ae(pt(k))).filter(k=>{if(it(k).length!==k.length-1||!k.some(_=>oe(_,M,Z)))return!1;const O=k.map(_=>`${_.x.toFixed(3)},${_.y.toFixed(3)}`).join("|");return R.has(O)?!1:(R.add(O),!0)})},"shortcutCandidatesAt"),I=d((u,p,f)=>{const y=[u.start,u.end].filter(M=>!!M),v=g(u);for(const M of it(p))if(At(M.a,M.b,o,y,-2)||At(M.a,M.b,s,[],-2)||v.some(E=>l(M,E)))return!1;for(const M of r)if(M!==u){for(const E of it(p))for(const T of it(i(M)))if(ce(E,T,.5)>=_t)return!1}return a(u,p)<=f},"candidateIsSafe");for(let u=0;u<8;u++){const p=a();let f,y,v=p,M=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;for(const T of r){const m=i(T),S=Qt(m,Z),A=c(m);for(let R=0;R<=m.length-4;R++)for(const k of x(m,R)){const O=Qt(k,Z),_=c(k);if(!(O<S||O===S&&_<A-Z)||!I(T,k,p))continue;const P=a(T,k);P>v||P===v&&(O>M||O===M&&_>=E)||(f=T,y=k,v=P,M=O,E=_)}}if(!f||!y)return;f.points=y}}d(Cs,"shortcutRedundantOrthogonalJogs");function vs(t,e){const i=[];for(const N of e.values()){if(N.isGroup||N.isEdgeLabel)continue;const F=N.x??0,D=N.y??0,V=qt(N);V&&i.push({id:String(N.id??""),cx:F,cy:D,rect:V})}if(i.length===0)return;const c=new Map(i.map(N=>[N.id,N])),a=i.map(N=>({id:N.id,rect:N.rect})),l=["top","bottom","left","right"],g={top:Math.min(...i.map(N=>N.rect.top))-20,bottom:Math.max(...i.map(N=>N.rect.bottom))+20,left:Math.min(...i.map(N=>N.rect.left))-20,right:Math.max(...i.map(N=>N.rect.right))+20},x=t.filter(N=>!N.isLayoutOnly),I=new Map(x.map((N,F)=>[N,F])),u=d(N=>{const F=N==="left"||N==="top"?-1:1,D=[];for(let V=0;V<=2;V++)D.push(g[N]+F*20*V);return D},"outwardTracksForSide"),p=d((N,F=new Map)=>pt(F.get(N)??N.points??[]),"replacementPointsFor"),f=d((N,F)=>{let D=0;for(const V of N)for(const h of F)le(V.a,V.b,h.a,h.b,Z)&&D++;return D},"crossingCountBetweenSegments"),y=d((N,F)=>f(it(N),it(F)),"crossingCountBetweenPaths"),v=d((N=new Map)=>{let F=0;const D=[],V=new Set,h=[],b=d(C=>{V.has(C)||(V.add(C),h.push(C))},"addEdge");for(let C=0;C<x.length;C++){const L=x[C],w=p(L,N);for(let B=C+1;B<x.length;B++){const U=x[B],q=y(w,p(U,N));q>0&&(F+=q,D.push({first:L,second:U,count:q}),b(L),b(U))}}return h.sort((C,L)=>(I.get(C)??0)-(I.get(L)??0)),{count:F,pairs:D,edgeSet:V,edges:h}},"crossingSnapshot"),M=d((N,F)=>{const D=new Set(F.keys());if(D.size===0)return N.count;let V=0;for(const b of N.pairs)(D.has(b.first)||D.has(b.second))&&(V+=b.count);let h=0;for(let b=0;b<x.length;b++){const C=x[b],L=D.has(C),w=p(C,F);for(let B=b+1;B<x.length;B++){const U=x[B];!L&&!D.has(U)||(h+=y(w,p(U,F)))}}return N.count-V+h},"crossingCountWithReplacements"),E=d(N=>{const F=new Map;for(const h of N.pairs){const b=F.get(h.first)??new Set;b.add(h.second),F.set(h.first,b);const C=F.get(h.second)??new Set;C.add(h.first),F.set(h.second,C)}const D=[],V=new Set;for(const h of N.edges){if(V.has(h))continue;const b=[h],C=[];for(V.add(h);b.length>0;){const L=b.pop();C.push(L);for(const w of F.get(L)??[])V.has(w)||(V.add(w),b.push(w))}C.sort((L,w)=>(I.get(L)??0)-(I.get(w)??0)),C.length>1&&D.push(C)}return D},"crossingComponents"),T=d(N=>[N.start,N.end].filter(F=>!!F),"endpointIdsFor"),m=d(N=>{const F=[];for(const D of E(N)){const V=new Set(D),h=new Set(D.flatMap(C=>T(C))),b=[...D];for(const C of x)V.has(C)||T(C).some(L=>h.has(L))&&b.push(C);b.sort((C,L)=>(I.get(C)??0)-(I.get(L)??0)),F.push(b)}return F},"pairSearchGroups"),S=d((N,F,D)=>M(N,new Map([[F,D]])),"crossingCountWithSingleReplacement"),A=d(N=>{const F=new Map;for(const D of N.pairs)F.set(D.first,(F.get(D.first)??0)+D.count),F.set(D.second,(F.get(D.second)??0)+D.count);return F},"currentCrossingsByEdge"),R=d(N=>N.slice(1).reduce((F,D,V)=>{const h=N[V];return F+Math.abs(D.x-h.x)+Math.abs(D.y-h.y)},0),"pathLength"),k=d((N=new Map)=>x.reduce((F,D)=>F+Qt(p(D,N)),0),"totalBends"),O=d((N=new Map)=>x.reduce((F,D)=>F+R(p(D,N)),0),"totalLength"),_=d((N,F,D=new Map)=>{const V=it(F);for(const h of x)if(h!==N){for(const b of V)for(const C of it(p(h,D)))if(ce(b,C,.5)>=_t)return!0}return!1},"pathHasSegmentConflict"),H=d((N,F)=>{const D=[N.start,N.end].filter(V=>!!V);for(const V of it(F))if(At(V.a,V.b,a,D,-2))return!0;return!1},"pathHitsNode"),P=d((N,F)=>{const D=ae(pt(F));it(D).length===D.length-1&&N.push(D)},"pushOrthogonalCandidate"),G=d(N=>N==="left"||N==="right","sideIsHorizontal"),j=d((N,F,D)=>{switch(F){case"left":return Math.min(N.x,D.x)-20;case"right":return Math.max(N.x,D.x)+20;case"top":return Math.min(N.y,D.y)-20;case"bottom":return Math.max(N.y,D.y)+20}},"localTrackForSameSide"),J=d((N,F,D,V)=>{const h=D==="left"||D==="top"?-1:1,b=[j(F,D,V),g[D]];for(const C of b)for(let L=0;L<=2;L++)P(N,ao(F,D,V,C+h*20*L))},"addSameSideCandidates"),dt=d((N,F,D,V,h)=>{for(const b of u(D))for(const C of u(h))P(N,[F,{x:b,y:F.y},{x:b,y:C},{x:V.x,y:C},V])},"addHorizontalToVerticalCandidates"),mt=d((N,F,D,V,h)=>{for(const b of u(D))for(const C of u(h))P(N,[F,{x:F.x,y:b},{x:C,y:b},{x:C,y:V.y},V])},"addVerticalToHorizontalCandidates"),kt=d((N,F,D,V,h)=>{const b=[...u("top"),...u("bottom")];for(const C of u(D))for(const L of u(h))for(const w of b)P(N,[F,{x:C,y:F.y},{x:C,y:w},{x:L,y:w},{x:L,y:V.y},V])},"addHorizontalPairCandidates"),Pt=d((N,F,D,V,h)=>{const b=[...u("left"),...u("right")];for(const C of u(D))for(const L of u(h))for(const w of b)P(N,[F,{x:F.x,y:C},{x:w,y:C},{x:w,y:L},{x:V.x,y:L},V])},"addVerticalPairCandidates"),Q=d(N=>{const F=new Set;return N.map(D=>pt(D)).filter(D=>{const V=D.map(h=>`${h.x.toFixed(3)},${h.y.toFixed(3)}`).join("|");return F.has(V)||D.length<2?!1:(F.add(V),!0)})},"dedupeCandidatePaths"),W=d((N,F,D,V)=>{const h=[],b=co(N,F,D,V,20,Z);b&&P(h,b),F===V&&J(h,N,F,D);const C=G(F),L=G(V);return C&&!L?dt(h,N,F,D,V):!C&&L?mt(h,N,F,D,V):C?kt(h,N,F,D,V):Pt(h,N,F,D,V),Q(h)},"buildCandidatesForSides"),et=d((N,F,D,V)=>{const h=[...u("left"),...u("right")],b=[...u("top"),...u("bottom")];for(const C of l){const L=Ie(V,C),w=C==="top"||C==="bottom"?u(C):b;for(const B of h){P(N,[F,D,{x:B,y:D.y},{x:B,y:L.y},L]);for(const U of w)P(N,[F,D,{x:B,y:D.y},{x:B,y:U},{x:L.x,y:U},L])}}},"addVerticalDepartureOuterTrackCandidates"),at=d((N,F,D,V)=>{const h=[...u("left"),...u("right")],b=[...u("top"),...u("bottom")];for(const C of l){const L=Ie(V,C),w=C==="left"||C==="right"?u(C):h;for(const B of b){P(N,[F,D,{x:D.x,y:B},{x:L.x,y:B},L]);for(const U of w)P(N,[F,D,{x:D.x,y:B},{x:U,y:B},{x:U,y:L.y},L])}}},"addHorizontalDepartureOuterTrackCandidates"),gt=d(N=>{const F=N.start,D=N.end,V=D?c.get(D):void 0;if(!F||!V)return[];const h=pt(N.points??[]);if(h.length<4)return[];const b=h[0],C=h[1],L=[];return wt(b,C,Z)?et(L,b,C,V):Tt(b,C,Z)&&at(L,b,C,V),L},"terminalPreservingOuterTrackCandidates"),xt=d(N=>{const F=N.start,D=N.end,V=F?c.get(F):void 0,h=D?c.get(D):void 0;if(!V||!h)return[];const b=[];for(const C of l){const L=Ie(V,C);for(const w of l)b.push(...W(L,C,Ie(h,w),w))}return b.push(...gt(N)),b},"candidatePathsFor"),vt=d(()=>new Map(x.map(N=>[N,it(p(N))])),"currentSegmentsByEdge"),Vt=d((N,F,D)=>{const V=new Set;for(const h of x){if(h===N)continue;const b=D.get(h)??it(p(h));F.some(C=>b.some(L=>ce(C,L,.5)>=_t))&&V.add(h)}return V},"sharedTrackConflictsFor"),jt=d((N,F,D,V)=>{const h=new Set;return xt(N).map(C=>ae(pt(C))).filter(C=>{if(H(N,C))return!1;const L=C.map(w=>`${w.x.toFixed(3)},${w.y.toFixed(3)}`).join("|");return h.has(L)||C.length<2?!1:(h.add(L),!0)}).map(C=>{const L=it(C);let w=0;for(const B of x)B!==N&&(w+=f(L,D.get(B)??it(p(B))));return{candidate:C,candidateSegments:L,crossings:F.count-(V.get(N)??0)+w,bends:Qt(C,Z),totalBends:Qt(C),length:R(C)}}).filter(({crossings:C})=>C<=F.count).sort((C,L)=>C.crossings-L.crossings||C.bends-L.bends||C.length-L.length).slice(0,48).map(C=>({path:C.candidate,segments:C.candidateSegments,sharedTrackConflicts:Vt(N,C.candidateSegments,D),totalBends:C.totalBends,length:C.length}))},"pairCandidatesFor"),Ut=d((N,F,D,V,h,b)=>{let C=0;for(const w of N.pairs)(w.first===F||w.second===F||w.first===V||w.second===V)&&(C+=w.count);let L=f(D.segments,h.segments);for(const w of x){if(w===F||w===V)continue;const B=b.get(w)??it(p(w));L+=f(D.segments,B)+f(h.segments,B)}return N.count-C+L},"pairCrossingCount"),te=d((N,F)=>{for(const D of N.sharedTrackConflicts)if(D!==F)return!1;return!0},"conflictsOnlyWith"),Se=d((N,F)=>N.segments.some(D=>F.segments.some(V=>ce(D,V,.5)>=_t)),"candidatesShareTrack"),de=d((N,F,D,V)=>te(F,D.edge)&&te(V,N.edge)&&!Se(F,V),"pairCandidatesAreCompatible"),Ce=d((N,F,D,V,h)=>{const b=Ut(N.current,F.edge,D,V.edge,h,N.baseSegments);if(!(b>=N.current.count))return{replacements:new Map([[F.edge,D.path],[V.edge,h.path]]),crossings:b,bends:N.currentBends-(N.baseBendsByEdge.get(F.edge)??0)-(N.baseBendsByEdge.get(V.edge)??0)+D.totalBends+h.totalBends,length:N.currentLength-(N.baseLengthByEdge.get(F.edge)??0)-(N.baseLengthByEdge.get(V.edge)??0)+D.length+h.length}},"scorePairReplacement"),dn=d((N,F)=>N.crossings<F.crossings||N.crossings===F.crossings&&(N.bends<F.bends||N.bends===F.bends&&N.length<F.length),"pairScoreIsBetter"),un=d((N,F,D,V)=>{let h=V;for(const b of F.candidates)for(const C of D.candidates){if(!de(F,b,D,C))continue;const L=Ce(N,F,b,D,C);L&&dn(L,h)&&(h=L)}return h},"bestScoreForOptionPair"),hn=d(N=>{const F=k(),D=O(),V=vt(),h=A(N),b=new Map(x.map(q=>[q,Qt(p(q))])),C=new Map(x.map(q=>[q,R(p(q))])),L=new Map,w=m(N);for(const q of w)for(const z of q){if(L.has(z))continue;const Y=jt(z,N,V,h);Y.length>0&&L.set(z,{edge:z,candidates:Y})}let B={replacements:new Map,crossings:N.count,bends:F,length:D};const U={current:N,currentBends:F,currentLength:D,baseBendsByEdge:b,baseLengthByEdge:C,baseSegments:V};for(const q of w){const z=new Set(q.filter(ot=>N.edgeSet.has(ot))),Y=q.map(ot=>L.get(ot)).filter(ot=>!!ot);for(let ot=0;ot<Y.length;ot++){const rt=Y[ot];for(let st=ot+1;st<Y.length;st++){const tt=Y[st];!z.has(rt.edge)&&!z.has(tt.edge)||(B=un(U,rt,tt,B))}}}return B.replacements.size>0?B.replacements:void 0},"bestPairedReplacement");for(let N=0;N<4;N++){const F=v(),D=F.count;if(D===0)return;let V,h,b=D,C=Number.POSITIVE_INFINITY;for(const w of F.edges){const B=Qt(p(w),Z);for(const U of xt(w)){const q=H(w,U),z=!q&&_(w,U),Y=S(F,w,U),ot=Qt(U,Z);q||z||!(Y<D||Y===D&&ot<B)||Y>b||Y===b&&ot>=C||(V=w,h=U,b=Y,C=ot)}}if(V&&h){V.points=h;continue}const L=hn(F);if(!L)return;for(const[w,B]of L)w.points=B}}d(vs,"resolveRenderedOrthogonalCrossings");var pe=.001,Wr=8;function Ls(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e),s=["top","bottom","left","right"],r=20,i={top:Math.min(...o.map(f=>f.rect.top))-r,bottom:Math.max(...o.map(f=>f.rect.bottom))+r,left:Math.min(...o.map(f=>f.rect.left))-r,right:Math.max(...o.map(f=>f.rect.right))+r},c=d((f,y,v,M)=>{const E=[],T=co(f,y,v,M,r,pe);return T&&E.push(T),y===M&&E.push(ao(f,y,v,i[y])),E},"buildOrthogonalPathCandidates"),a=d((f,y)=>{for(let v=0;v<f.length-1;v++){const M=f[v],E=f[v+1];if(At(M,E,o,y,1))return!0}return!1},"pathHitsNode"),l=d((f,y,v=!1)=>{let M=0;const E=Re(f,pe),T=y.start,m=y.end;for(const S of t){if(S===y||S.isLayoutOnly)continue;const A=S.start,R=S.end;if(!v&&T&&m&&(A===T||A===m||R===T||R===m))continue;const k=S.points;if(!(!k||k.length<2))for(const O of E)for(const _ of Re(k,pe)){if(fo(O.a,O.b,_.a,_.b,pe,pe)){M++;continue}ce(O,_,pe)>=Wr&&M++}}return M},"pathConflictCount"),g=4,x=d((f,y)=>{const v=Math.abs(f.y-y.rect.top),M=Math.abs(f.y-y.rect.bottom),E=Math.abs(f.x-y.rect.left),T=Math.abs(f.x-y.rect.right);let m="top",S=v;return M<S&&(m="bottom",S=M),E<S&&(m="left",S=E),T<S&&(m="right",S=T),m},"nearestSideOfRect"),I=new Map,u=d((f,y,v)=>{const M=I.get(f)??[];M.push({side:y,edgeId:v}),I.set(f,M)},"addFaceClaim");for(const f of t){if(f.isLayoutOnly)continue;const y=f.points??[];if(y.length<1)continue;const v=f.id??"",M=f.start,E=f.end;if(M){const T=n.get(M);T&&u(M,x(y[0],T),v)}if(E){const T=n.get(E);T&&u(E,x(y[y.length-1],T),v)}}const p=d((f,y,v)=>I.get(f)?.some(M=>M.edgeId!==v&&M.side===y)??!1,"faceIsClaimed");for(const f of t){if(f.isLayoutOnly)continue;const y=f.points;if(!y||y.length<2)continue;const v=Qt(y,pe);if(v<g)continue;const M=f.start,E=f.end;if(!M||!E)continue;const T=n.get(M),m=n.get(E);if(!T||!m)continue;const S=f.id??"",A=l(y,f,!0),R=l(y,f);let k,O=A,_=v;for(const H of s){if(p(M,H,S))continue;const P=Ie(T,H);for(const G of s){if(p(E,G,S))continue;const j=Ie(m,G);for(const J of c(P,H,j,G)){if(a(J,[M,E]))continue;const dt=Qt(J,pe);if(A>0){const mt=l(J,f,!0);if(mt>O||mt===O&&dt>=_)continue;O=mt,_=dt,k=J;continue}l(J,f)>R||dt<_&&(_=dt,k=J)}}}if(k){f.points=k;const H=I.get(M);H&&I.set(M,H.filter(G=>G.edgeId!==S));const P=I.get(E);P&&I.set(E,P.filter(G=>G.edgeId!==S)),u(M,x(k[0],T),S),u(E,x(k[k.length-1],m),S)}}}d(Ls,"simplifyDetouredEdges");var Kt=.001,Po=10,Ve=7;function $n(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const i=r.x-s.x,c=r.y-s.y;if(!(Math.abs(i)+Math.abs(c)<Kt)){if(Math.abs(c)<=Kt){const l=s.x+Math.sign(i)*Po;return{left:Math.min(s.x,l),right:Math.max(s.x,l),top:s.y-Ve,bottom:s.y+Ve}}if(Math.abs(i)<=Kt){const l=s.y+Math.sign(c)*Po;return{left:s.x-Ve,right:s.x+Ve,top:Math.min(s.y,l),bottom:Math.max(s.y,l)}}return{left:Math.min(s.x,r.x),right:Math.max(s.x,r.x),top:Math.min(s.y,r.y),bottom:Math.max(s.y,r.y)}}}d($n,"markerClearanceRectFor");function Es(t){return{left:Math.min(t.left,t.right),right:Math.max(t.left,t.right),top:Math.min(t.top,t.bottom),bottom:Math.max(t.top,t.bottom)}}d(Es,"normalizeRect");function zn(t,e){const n=pt(e),o=$n(n,!0),s=$n(n,!1);return[o,s].some(r=>r&&Je(t,Es(r)))}d(zn,"labelOverlapsOwnMarker");function Ue(t,e){const n=[];for(const p of t){if(p.isLayoutOnly)continue;const f=p.points;if(!(!f||f.length<2))for(let y=0;y<f.length-1;y++)n.push({edgeId:p.id,p1:f[y],p2:f[y+1]})}const o=[],s=[];for(const p of e.values()){const f=p.isGroup,y=p.parentId;if(f&&!y){const M=qt(p);M&&s.push({id:p.id,rect:M});continue}if(f||p.isEdgeLabel)continue;const v=qt(p);v&&o.push({nodeId:p.id,rect:v})}const r=3,i=1,c=12,a=d((p,f)=>{const y=Tn(f,r);for(const{nodeId:v,rect:M}of o)if(v!==p&&Je(y,M))return!0;return!1},"labelOverlapsForeignNode"),l=d((p,f)=>{const y=Tn(f,r);for(const v of n)if(v.edgeId!==p&&cn(v.p1,v.p2,y))return!0;return!1},"labelOverlapsForeignEdge"),g=d((p,f,y)=>a(p,y)||l(f,y),"labelOverlapsAnything"),x=[],I=d(p=>{for(const{id:f,rect:y}of s)if(ts(y,p))return f},"findContainingLane"),u=d((p,f)=>x.some(y=>y.labelId!==p&&Je(f,y.rect)),"overlapsPlacedLabel");for(const p of t){if(p.isLayoutOnly)continue;const f=p.labelNodeId;if(!f)continue;const y=e.get(f);if(!y)continue;const v=p.points;if(!v||v.length<2)continue;const M=y.width??0,E=y.height??0;if(M<=0||E<=0)continue;const T=[];for(let Q=0;Q<v.length-1;Q++){const W=v[Q],et=v[Q+1],at=Math.abs(W.x-et.x),gt=Math.abs(W.y-et.y);at<Kt&><Kt||at>=Kt&>>=Kt||T.push({idx:Q,length:at+gt,orientation:at>=Kt?"horizontal":"vertical",midX:(W.x+et.x)/2,midY:(W.y+et.y)/2})}if(T.length===0)continue;const m=T.length>=3?T.filter(Q=>Q.idx>0&&Q.idx<T.length-1):T,S=m.length>0?m:T,A=M>=E?"horizontal":"vertical",R=d(Q=>[...Q].sort((W,et)=>{const at=W.orientation===A,gt=et.orientation===A;if(at!==gt)return at?-1:1;const xt=W.length>=(W.orientation==="horizontal"?M:E)+2,vt=et.length>=(et.orientation==="horizontal"?M:E)+2;return xt!==vt?xt?-1:1:et.length-W.length}),"rankSegments"),k=T[0],O=T[T.length-1],_=[.5,.25,.75,.05,.95,.15,.85,.1,.9],H=d((Q,W)=>{const et=v[Q.idx],at=v[Q.idx+1];return{midX:et.x+(at.x-et.x)*W,midY:et.y+(at.y-et.y)*W}},"anchorAtT"),P=d((Q,W,et)=>Math.min(et,Math.max(W,Q)),"clamp"),G=d((Q,W)=>Q.midX>=W.left-Kt&&Q.midX<=W.right+Kt&&Q.midY>=W.top-Kt&&Q.midY<=W.bottom+Kt,"pointInsideRectInclusive"),j=d(Q=>{const W=Ae(Q.midX,Q.midY,M,E),et=I(W);if(et)return{laneId:et,anchor:Q,rect:W};const at=s.find(({rect:te})=>G(Q,te));if(!at)return;const gt=at.rect.left+M/2+i,xt=at.rect.right-M/2-i,vt=at.rect.top+E/2+i,Vt=at.rect.bottom-E/2-i;if(gt>xt||vt>Vt)return;const jt={midX:P(Q.midX,gt,xt),midY:P(Q.midY,vt,Vt)},Ut=Ae(jt.midX,jt.midY,M,E);return G(Q,Ut)?{laneId:at.id,anchor:jt,rect:Ut}:void 0},"placementForAnchor"),J=d((Q,W,et)=>Q.orientation==="horizontal"?Math.abs(W.midX-et.x):Math.abs(W.midY-et.y),"distanceAlongSegment"),dt=d((Q,W)=>{const at=(Q.orientation==="horizontal"?M/2:E/2)+c;if(Q===k){const gt=v[Q.idx];if(J(Q,W,gt)+Kt<at)return!1}if(Q===O){const gt=v[Q.idx+1];if(J(Q,W,gt)+Kt<at)return!1}return!0},"labelClearsTerminalEndpoints"),mt=d(Q=>{const W=R(Q);for(const et of W)for(const at of _){const gt=H(et,at);if(!dt(et,gt))continue;const xt=j(gt);if(xt&&!zn(xt.rect,v)&&!u(f,xt.rect)&&!g(f,p.id,xt.rect))return{laneId:xt.laneId,anchor:xt.anchor}}},"tryPool"),kt=d((Q,W,et=!1)=>{const at=R(Q);for(const gt of at){const xt={midX:gt.midX,midY:gt.midY};if(W&&!dt(gt,xt))continue;const vt=j(xt);if(vt&&!zn(vt.rect,v)&&!u(f,vt.rect)&&!a(f,vt.rect)&&(et||!l(p.id,vt.rect)))return{laneId:vt.laneId,anchor:vt.anchor}}},"findLaneContainingFallback"),Pt=mt(S)??(S.length<T.length?mt(T):void 0)??kt(T,!0)??kt(T,!1)??kt(T,!1,!0);if(Pt){y.x=Pt.anchor.midX,y.y=Pt.anchor.midY,y.parentId=Pt.laneId;const Q=Ae(Pt.anchor.midX,Pt.anchor.midY,M,E),W=x.findIndex(et=>et.labelId===f);W>=0?x[W]={labelId:f,rect:Q}:x.push({labelId:f,rect:Q})}}}d(Ue,"anchorLabelsToPolyline");var Sn=1e-6,Kr=8,Bo=Kr/2,qr=3;function Vn(t,e){return t<e?`${t}::${e}`:`${e}::${t}`}d(Vn,"pairKey");function Ts(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e),s=new Map;for(const i of e){const c=i.id;if(!i.isGroup&&i.isEdgeLabel){s.set(c,{w:i.width??0,h:i.height??0});continue}}const r=d((i,c,a,l)=>{const g=Vn(c,a);let x=0;const I=d(u=>{if(!u)return;const p=s.get(u);if(!p)return;const f=l==="x"?p.w/2:p.h/2;f>x&&(x=f)},"consider");I(i.labelNodeId);for(const u of t){if(u===i||u.isLayoutOnly)continue;const p=u.start,f=u.end;!p||!f||Vn(p,f)===g&&I(u.labelNodeId)}return x>0?x+qr:0},"labelClearanceFor");for(const i of t){if(i.isLayoutOnly)continue;const c=i.points;if(!ro(c,Sn))continue;const a=lo(i,n,Sn);if(!a)continue;const{srcId:l,dstId:g,srcInfo:x,dstInfo:I,collinearX:u,collinearY:p}=a;if(u===p)continue;let f,y;if(u){const m=I.cy>x.cy;f={x:x.cx,y:m?x.rect.bottom:x.rect.top},y={x:I.cx,y:m?I.rect.top:I.rect.bottom}}else{const m=I.cx>x.cx;f={x:m?x.rect.right:x.rect.left,y:x.cy},y={x:m?I.rect.left:I.rect.right,y:I.cy}}if(At(f,y,o,[l,g],1))continue;const M=r(i,l,g,u?"x":"y"),E=M>Bo?M:Bo,T=[0,E,-E];for(const m of T){const S={...f},A={...y};if(u){if(S.x+=m,A.x+=m,S.x<=x.rect.left||S.x>=x.rect.right||A.x<=I.rect.left||A.x>=I.rect.right)continue}else if(S.y+=m,A.y+=m,S.y<=x.rect.top||S.y>=x.rect.bottom||A.y<=I.rect.top||A.y>=I.rect.bottom)continue;if(!At(S,A,o,[l,g],1)&&!Ze(S,A,t,i,{epsilon:Sn})){i.points=[S,A];break}}}}d(Ts,"straightenCollinearSiblingDetours");function jn(t,e){const{realNodeRects:a,labelNodeRects:l}=me(e.values()),g=d((m,S)=>Re(S,.001).map(A=>({...A,edge:m,interior:A.index>=1&&A.index<=S.length-3})),"segmentsFor"),x=d(()=>{const m=[];for(const S of t){if(S.isLayoutOnly)continue;const A=S.points;!A||A.length<2||m.push(...g(S,pt(A)))}return m},"allSegments"),I=d((m,S)=>m.horizontal&&S.horizontal?zt(m.a.x,m.b.x,S.a.x,S.b.x)>=8&&Math.abs(m.a.y-S.a.y)<7:m.vertical&&S.vertical?zt(m.a.y,m.b.y,S.a.y,S.b.y)>=8&&Math.abs(m.a.x-S.a.x)<7:!1,"hasCrowdedParallelTrack"),u=d((m,S)=>{const A=m.start,R=m.end,k=g(m,S);if(k.length!==S.length-1)return!1;const O=[A,R].filter(H=>!!H),_=m.labelNodeId?[m.labelNodeId]:[];for(const H of k)if(At(H.a,H.b,a,O,-2)||At(H.a,H.b,l,_,-2))return!1;for(const H of t){if(H===m||H.isLayoutOnly)continue;const P=H.points;if(!(!P||P.length<2)){for(const G of k)for(const j of g(H,pt(P)))if(I(G,j)||le(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),p=d((m,S)=>{const A=pt(m.edge.points??[]);if(A.length<4||m.index>=A.length-1)return;const R=A.map(k=>({...k}));if(m.horizontal)R[m.index].y+=S,R[m.index+1].y+=S;else if(m.vertical)R[m.index].x+=S,R[m.index+1].x+=S;else return;return g(m.edge,R).length===R.length-1?R:void 0},"shiftedCandidate"),f=d((m,S)=>({x:m.x??(S.left+S.right)/2,y:m.y??(S.top+S.bottom)/2}),"nodeCenter"),y=d(m=>{const S=m.edge,A=pt(S.points??[]);if(A.length!==4||m.index!==1)return;const R=S.start?e.get(S.start):void 0,k=S.end?e.get(S.end):void 0,O=R?qt(R):void 0,_=k?qt(k):void 0,H=A.slice(m.index+2);if(!(!R||!k||!O||!_||H.length===0))return{sourceCenter:f(R,O),targetCenter:f(k,_),sourceRect:O,tail:H}},"sourceDetourContextFor"),v=d((m,S,A,R,k,O)=>{const _=R.y>=A.y,H=_?k.bottom:k.top,P=H+(_?20:-20);if(_&&m.b.y<=P+.001||!_&&m.b.y>=P-.001)return;const G=m.a.x+S;return pt([{x:A.x,y:H},{x:A.x,y:P},{x:G,y:P},{x:G,y:m.b.y},...O],.001)},"verticalSourceDetour"),M=d((m,S,A,R,k,O)=>{const _=R.x>=A.x,H=_?k.right:k.left,P=H+(_?20:-20);if(_&&m.b.x<=P+.001||!_&&m.b.x>=P-.001)return;const G=m.a.y+S;return pt([{x:H,y:A.y},{x:P,y:A.y},{x:P,y:G},{x:m.b.x,y:G},...O],.001)},"horizontalSourceDetour"),E=d((m,S)=>{const A=y(m);if(A){if(m.vertical)return v(m,S,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail);if(m.horizontal)return M(m,S,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail)}},"sourceDetourCandidate"),T=[-7,7,-14,14,-21,21];for(let m=0;m<12;m++){const S=x();let A=!1;for(let R=0;R<S.length&&!A;R++)for(let k=R+1;k<S.length&&!A;k++){const O=S[R],_=S[k];if(O.edge===_.edge||!I(O,_))continue;const H=[O,_].filter(P=>P.interior);for(const P of H){for(const G of T){const j=p(P,G);if(j&&u(P.edge,j)){P.edge.points=j,A=!0;break}const J=E(P,G);if(J&&u(P.edge,J)){P.edge.points=J,A=!0;break}}if(A)break}}if(!A)return}}d(jn,"nudgeSharedInteriorSubpaths");function ws(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,c=o.y-n.y,a=s*c-r*i;if(Math.abs(a)<1e-10)return!1;const l=n.x-t.x,g=n.y-t.y,x=(l*c-g*i)/a,I=(l*r-g*s)/a,u=.01;return x>u&&x<1-u&&I>u&&I<1-u}d(ws,"segmentsIntersect");function As(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=es(e),r=[];for(const c of n){if(c.isLayoutOnly)continue;const a=c.points;if(!a||a.length<2)continue;const l=c.start,g=c.end,x=c.labelNodeId,I=c.id??`${l}->${g}`;for(const u of s)if(!(u.nodeId===l||u.nodeId===g)&&!(x&&u.nodeId===x)){for(let p=0;p<a.length-1;p++)if(cn(a[p],a[p+1],u,-1)){o.push({type:"edge-node-overlap",edgeId:I,targetId:u.nodeId,detail:`segment ${p} passes through node "${u.nodeId}"`});break}}for(let u=0;u<a.length-1;u++)r.push({edgeId:I,start:l,end:g,p1:a[u],p2:a[u+1]})}const i=new Set;for(let c=0;c<r.length;c++)for(let a=c+1;a<r.length;a++){const l=r[c],g=r[a];if(l.edgeId!==g.edgeId&&!(l.start===g.start||l.start===g.end||l.end===g.start||l.end===g.end)&&ws(l.p1,l.p2,g.p1,g.p2)){const x=l.edgeId<g.edgeId?`${l.edgeId}|${g.edgeId}`:`${g.edgeId}|${l.edgeId}`;i.has(x)||(i.add(x),o.push({type:"edge-edge-crossing",edgeId:l.edgeId,targetId:g.edgeId,detail:`edges "${l.edgeId}" and "${g.edgeId}" cross`}))}}if(o.length>0){const c=o.filter(l=>l.type==="edge-node-overlap").length,a=o.filter(l=>l.type==="edge-edge-crossing").length;Ke.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${c} edge-node overlap(s), ${a} edge crossing(s)`);for(const l of o)Ke.warn(`[SWIMLANE_VALIDATE] ${l.type}: ${l.detail}`)}return o}d(As,"validateSwimlanesLayout");function Rs(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(c=>!c.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!ms(t,e)||e==="BT"&&s.length>0&&!ps(t))return;for(const c of o){if(c.isLayoutOnly)continue;const a=c.points;!a||a.length<2||(c.points=ae(Qe(a)))}Ls(o,n),Ts(o,n),ys(o,n);const r=new Map;for(const c of n)r.set(String(c.id),c);Ue(o,r),is(o,r),xs(o,r),jn(o,r),bs(o,r),Ms(o,r),Xn(o,r),Is(o,r);const i=d(()=>{vs(o,r),Ss(o,r),Cs(o,r),Ue(o,r),Dn(o,r),Xn(o,r),Ue(o,r),Dn(o,r)},"finalizeRenderedEdges");i(),jn(o,r),i(),Yn(o,r),Gn(o,r),Yn(o,r),Gn(o,r)}d(Rs,"postProcessSwimlaneLayout");function ye(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const i=`${r.id}:${r.src}->${r.dst}`;n.has(i)||(n.add(i),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}d(ye,"normalizeGraph");function mo(t,e){return t.edges.filter(n=>n.dst===e)}d(mo,"incoming");function Ns(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}d(Ns,"buildSuccessorMap");function yo(t){const e=Ns(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}d(yo,"buildSortedSuccessorMap");function xo(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}d(xo,"buildInDegreeMap");function bo(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}d(bo,"sortedZeroInDegreeNodes");function ln(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}d(ln,"buildPredecessorSuccessorMaps");function Mo(t,e,n,o){let s=0;for(const i of t.nodes)o?.skipGroups&&t.nodeById.get(i)?.isGroup||(s=Math.max(s,n[i]??0));const r=Array.from({length:s+1},()=>[]);for(const i of e)o?.skipGroups&&t.nodeById.get(i)?.isGroup||r[Math.max(0,n[i]??0)].push(i);return r}d(Mo,"buildLayersFromRanks");function Be(t){const e=xo(t),n=bo(e),o=[],s=yo(t);for(;n.length;){const r=n.shift();o.push(r);for(const i of s.get(r)??[])if(e.set(i,(e.get(i)??0)-1),(e.get(i)??0)===0){let c=0;for(;c<n.length&&n[c]<i;)c++;n.splice(c,0,i)}}return o.length===t.nodes.length?o:null}d(Be,"topoSortIfAcyclic");function Ne(t){const e=new Map;let n=0;for(const o of t)e.set(o,n),n++;return e}d(Ne,"buildLayerIndex");function Io(t){const e=new Array(t.length),n=d((o,s)=>{if(s-o<=1)return 0;const r=o+s>>1;let i=n(o,r)+n(r,s),c=o,a=r,l=o;for(;c<r||a<s;)a>=s||c<r&&t[c]<=t[a]?e[l++]=t[c++]:(e[l++]=t[a++],i+=r-c);for(let g=o;g<s;g++)t[g]=e[g];return i},"count");return n(0,t.length)}d(Io,"countInversions");function Os(t){const e=ye(t),n=new Map;for(const g of e.nodes)n.set(g,[]);for(const g of e.edges)n.get(g.src).push(g);for(const g of n.values())g.sort((x,I)=>x.dst===I.dst?x.id.localeCompare(I.id):x.dst.localeCompare(I.dst));const o=Object.create(null);for(const g of e.nodes)o[g]=0;const s=[],r=d(g=>{o[g]=1;for(const x of n.get(g)??[]){const I=x.dst;o[I]===0?r(I):o[I]===1&&s.push(x)}o[g]=2},"dfs"),i=[...e.nodes].sort((g,x)=>g.localeCompare(x));for(const g of i)o[g]===0&&r(g);const c=new Set(s.map(g=>`${g.id}:${g.src}->${g.dst}`)),a=e.edges.map(g=>c.has(`${g.id}:${g.src}->${g.dst}`)?{id:g.id,src:g.dst,dst:g.src,weight:g.weight,ref:g.ref}:g);return{acyclic:{nodes:[...e.nodes],edges:a,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}d(Os,"removeCycles_DFS");function Ps(t){const e=new Map,n=d(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const c=n(r)??r;return e.set(o,c),c},"resolve");for(const o of t.nodes)n(o);return e}d(Ps,"buildTopLaneMap");function fe(t){const e=Ps(t);return n=>e.get(n)??null}d(fe,"createTopLaneResolver");function fn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}d(fn,"buildTopLaneOrder");function So(t,e){const n=fn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const i of e)!o.has(i)||s.has(i)||(s.add(i),r.push(i));for(const i of n)s.has(i)||r.push(i);return r}d(So,"resolveTopLaneOrder");var Jr={EPSILON:1e-6},sn={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},ko={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Bs(t,e){const n=ye(t),o=e?.laneOf??(()=>null),s=e?.rankHint,{preds:r}=ln(n);for(const m of r.values())m.sort((S,A)=>S.localeCompare(A));const i=Be(n)??[...n.nodes].sort((m,S)=>m.localeCompare(S)),c=new Map;for(const[m,S]of i.entries())c.set(S,m);const a=new Map,l=new Map;for(const m of n.nodes)l.set(m,[]);for(const m of i){const S=(r.get(m)??[]).filter(A=>a.has(A));if(S.length>0){const A=ks(m,S,{laneOf:o,rankHint:s,topoIndex:c});a.set(m,A),l.get(A).push(m)}else a.has(m)||a.set(m,null)}for(const m of n.nodes)a.has(m)||a.set(m,null);const g=new Set;for(const m of n.nodes)(a.get(m)??null)===null&&g.add(m);const x=[...g].sort((m,S)=>{const A=c.get(m)??0,R=c.get(S)??0;return A===R?m.localeCompare(S):A-R}),I=_s(n),u=new Map;for(const[m,S]of I.entries())u.set(m,[...S].sort((A,R)=>A.localeCompare(R)));const p=Fs(u),f=Ds(u),y=new Map;for(const m of n.nodes)y.set(m,[]);for(const m of f)for(const S of m.nodes){const A=y.get(S);A?A.push(m.id):y.set(S,[m.id])}const v=[],M=[],E=new Set,T=d(m=>{if(!E.has(m)){E.add(m),v.push(m);for(const S of l.get(m)??[])T(S);M.push(m)}},"walk");for(const m of x)T(m);for(const m of i)T(m);return{parent:a,children:l,roots:x,componentOf:p,blocks:f,nodeBlocks:y,adjacency:u,preorder:v,postorder:M,topologicalOrder:i}}d(Bs,"buildDrivingTree");function ks(t,e,n){const o=n.laneOf(t);return[...e].sort((r,i)=>{const c=n.laneOf(r),a=n.laneOf(i),l=c!=null&&c===o,g=a!=null&&a===o;if(l!==g)return l?-1:1;const x=n.rankHint?.[r],I=n.rankHint?.[i];if(x!=null&&I!=null&&x!==I)return I-x;const u=n.topoIndex.get(r)??0,p=n.topoIndex.get(i)??0;return u!==p?u-p:r.localeCompare(i)})[0]}d(ks,"chooseParent");function _s(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}d(_s,"buildAdjacency");function Fs(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const i of t.get(r)??[])e.has(i)||s.push(i)}}n++}return e}d(Fs,"assignComponents");function Ds(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const i=d((c,a)=>{e.set(c,++r),n.set(c,r);for(const l of t.get(c)??[])l!==a&&(e.has(l)?(e.get(l)??0)<(e.get(c)??0)&&(o.push([c,l]),n.set(c,Math.min(n.get(c)??r,e.get(l)??r))):(o.push([c,l]),i(l,c),n.set(c,Math.min(n.get(c)??r,n.get(l)??r)),(n.get(l)??0)>=(e.get(c)??0)&&s.push(Hs(c,l,o,s.length))))},"visit");for(const c of t.keys())e.has(c)||i(c,null);return s}d(Ds,"computeBlocks");function Hs(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const i=n.pop();if(s.push(i),r.add(i[0]),r.add(i[1]),i[0]===t&&i[1]===e||i[0]===e&&i[1]===t)break}return{id:o,edges:s,nodes:[...r]}}d(Hs,"popBlock");function Xs(t,e,n){const o=[...t.nodes],s=new Map;for(const[M,E]of o.entries())s.set(E,M);const r=o.length,i=new Array(r).fill(-1),c=new Array(r).fill(0),a=[],l=new Set;for(const M of o){const E=n.parent.get(M)??null,T=s.get(M);T!=null&&E==null&&(i[T]=-1,c[T]=0,l.has(M)||(l.add(M),a.push(M)))}for(;a.length>0;){const M=a.shift(),E=s.get(M);if(E==null)continue;const T=n.children.get(M)??[];for(const m of T){if(l.has(m))continue;const S=s.get(m);S!=null&&(i[S]=E,c[S]=c[E]+1,l.add(m),a.push(m))}}for(const M of o){if(l.has(M))continue;const E=s.get(M);E!=null&&(i[E]=-1,c[E]=0,l.add(M))}const g=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),x=Array.from({length:g},()=>new Array(r).fill(-1));for(let M=0;M<r;M++)x[0][M]=i[M];for(let M=1;M<g;M++)for(let E=0;E<r;E++){const T=x[M-1][E];x[M][E]=T===-1?-1:x[M-1][T]}const I=d((M,E)=>{if(M===-1||E===-1)return-1;c[M]<c[E]&&([M,E]=[E,M]);const T=c[M]-c[E];for(let m=0;m<g;m++)if(T>>m&1&&(M=x[m][M],M===-1))return-1;if(M===E)return M;for(let m=g-1;m>=0;m--){const S=x[m][M],A=x[m][E];S===-1||A===-1||S!==A&&(M=S,E=A)}return x[0][M]},"lcaIndex"),u=Array.from({length:r},()=>new Map);for(const M of t.edges){let E=M.src,T=M.dst,m=e[E],S=e[T];if(m==null||S==null||(m>S&&([E,T]=[T,E],[m,S]=[S,m]),m==null||S==null||m===S))continue;const A=s.get(E),R=s.get(T);if(A==null||R==null)continue;const k=I(A,R);if(k===-1)continue;const O=u[k];for(let _=m;_<S;_++)O.set(_,(O.get(_)??0)+1)}const p=new Map,f=d((M,E)=>{if(E.size!==0)for(const[T,m]of E)M.set(T,(M.get(T)??0)+m)},"mergeInto"),y=new Set,v=d(M=>{const E=s.get(M);y.add(M);const T=E==null?void 0:u[E],m=T?new Map(T):new Map,S=n.children.get(M)??[];for(const A of S){const R=v(A),k=e[M];if(k!=null){let O=p.get(M);O||(O=new Map,p.set(M,O));let _=R.get(k)??0;const H=e[A];H!=null&&H>k&&(_+=1),O.set(A,_)}f(m,R)}return m},"dfs");for(const M of n.roots)y.has(M)||v(M);for(const M of o)y.has(M)||v(M);return p}d(Xs,"computeSubtreeCrossCounts");function Ys(t,e,n){const o=new Map,s=d(r=>{let i=n[r]??0;const c=[...e.get(r)??[]];c.sort(Co(n));for(const a of c){s(a);const l=o.get(a);l!=null&&(i=Math.min(i,l))}o.set(r,i)},"annotate");for(const r of t)s(r);return o}d(Ys,"annotateMinimumLayers");function Co(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}d(Co,"compareByRankThenId");function Gs(t,e,n,o){let s=0;for(const a of e){const l=n[a]??0;l>s&&(s=l)}const r=Array.from({length:s+1},()=>[]),i=new Set,c=d(a=>{if(i.has(a))return;i.add(a);const l=n[a]??0;r[l]||(r[l]=[]),r[l].push(a);for(const g of o(a))c(g)},"emit");for(const a of t)c(a);for(const a of e)if(!i.has(a)){const l=n[a]??0;r[l]||(r[l]=[]),r[l].push(a),i.add(a)}return r}d(Gs,"emitNodesInTreeOrder");function $s(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}d($s,"deduplicateLayers");function zs(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const i=e[s]??0,c=[],a=[],l=n.get(s);for(const g of r){const x=o.get(g)??i;x>i?c.push({child:g,min:x}):a.push(g)}return c.sort((g,x)=>g.min===x.min?g.child.localeCompare(x.child):g.min-x.min),a.sort((g,x)=>{const I=l?.get(g)??0,u=l?.get(x)??0;if(I!==u)return I-u;const p=o.get(g)??i,f=o.get(x)??i;return p!==f?p-f:g.localeCompare(x)}),[...c.map(g=>g.child),...a]}}d(zs,"createChildOrderer");function rn(t,e,n){const o=Bs(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const x of t.nodes)s.has(x)||s.set(x,[]);const i=Xs(t,e,o),c=[...r].sort(Co(e)),a=Ys(c,s,e),l=zs(s,e,i,a);let g=Gs(c,t.nodes,e,l);return g=$s(g),g}d(rn,"buildMultitreeLayerOrder");function Vs(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(e),i=[];for(const c of n)o.has(c.src)&&s.has(c.dst)&&i.push(r.get(c.dst));return Io(i)}d(Vs,"countCrossingsBetweenAdjacent");function Un(t,e,n){const o=[];for(const r of e){const i=n[r.src],c=n[r.dst];if(i==null||c==null||i===c)continue;let a=r.src,l=r.dst,g=i,x=c;i>c&&(a=r.dst,l=r.src,g=c,x=i);for(let I=g;I<x;I++)o.push({id:`${r.id}@${I}`,src:a,dst:l,ref:r.ref})}let s=0;for(let r=0;r+1<t.length;r++)s+=Vs(t[r],t[r+1],o);return s}d(Un,"totalCrossings");function js(t,e){const n={...e},{preds:o}=ln(t),s=fe(t),r=rn(t,n,s);let i=Un(r,t.edges,n);const c=sn.MAX_CROSSING_OPTIMIZATION_PASSES;for(let a=0;a<c;a++){let l=!1;const g=[...t.nodes].sort((x,I)=>(n[I]??0)-(n[x]??0));for(const x of g){const I=n[x]??0;if(I===0)continue;let u=0;for(const v of o.get(x)??[])u=Math.max(u,(n[v]??0)+1);if(u>=I)continue;const p=I;n[x]=u;const f=rn(t,n,s),y=Un(f,t.edges,n);y<i?(i=y,l=!0):n[x]=p}if(!l)break}return n}d(js,"optimizeRanksByCrossings");function Us(t,e){const n=fe(t),o=[...t.nodes].sort((s,r)=>(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const i=t.edges.filter(f=>f.src===s);if(i.length===0)continue;let c=!1,a=0;for(const f of i){const y=n(f.dst);y==null||y===r?c=!0:a++}if(a===0||c)continue;let l=0,g=!1;for(const f of t.edges){if(f.dst!==s)continue;const y=n(f.src);y&&(y===r?g=!0:l++)}if(l>0||!g)continue;const x=e[s]??0,I=x+a;let u=0;for(const f of t.edges)f.dst===s&&(u=Math.max(u,(e[f.src]??0)+1));const p=Math.max(x,u,I);p!==x&&(e[s]=p)}}d(Us,"adjustCrossLaneSources");function Ws(t,e){const n=ye(t),o=Be(n)??[...n.nodes].sort(),s=e?.compactSingleInput??!1,r=fe(n);let i=Object.create(null);for(const a of o){const l=mo(n,a),g=e?.ignoreCrossLaneEdges?l.filter(x=>{const I=r(x.src),u=r(a);return!I||!u?!0:I===u}):l;if(g.length===0)i[a]=0;else if(s&&g.length===1){const x=g[0].src,I=r(x),u=r(a);I!==u?i[a]=i[x]??0:i[a]=(i[x]??0)+1}else{let x=-1/0;for(const I of g)x=Math.max(x,(i[I.src]??0)+1);i[a]=x===-1/0?0:x}}return(e?.optimizeRanksByCrossings??!1)&&(i=js(n,i)),e?.ignoreCrossLaneEdges&&Us(n,i),{layers:rn(n,i,r),rankOf:i,dummy:new Set}}d(Ws,"assignLayers_LongestPath");function Ks(t,e){const n=ye(t),s={...Ws(n,{compactSingleInput:e?.compactSingleInput,ignoreCrossLaneEdges:e?.ignoreCrossLaneEdges,optimizeRanksByCrossings:e?.optimizeRanksByCrossings}).rankOf},r=fe(n),{preds:i,succs:c}=ln(n,p=>{if(e?.ignoreCrossLaneEdges){const f=r(p.src),y=r(p.dst);if(f&&y&&f!==y)return!1}return!0}),a=Be(n)??[...n.nodes],l=[...a].reverse(),g=d((p,f)=>{let y=0;for(const E of i.get(p)??[])y=Math.max(y,(s[E]??0)+1);let v=Number.POSITIVE_INFINITY;const M=c.get(p)??[];return M.length>0&&(v=Math.min(...M.map(E=>(s[E]??0)-1))),Number.isFinite(v)||(v=Math.max(y,f)),Math.min(Math.max(f,y),v)},"clampFeasible"),x=sn.GRAVITY_ITERATIONS,I=d(p=>{let f=!1;for(const y of p){const v=i.get(y)??[],M=c.get(y)??[];if(v.length===0&&M.length===0)continue;const E=v.length>0?v.reduce((A,R)=>A+(s[R]??0)+1,0)/v.length:s[y]??0,T=M.length>0?M.reduce((A,R)=>A+(s[R]??0)-1,0)/M.length:s[y]??0,m=Math.round((E+T)/2),S=g(y,m);S!==s[y]&&(s[y]=S,f=!0)}return f},"relaxOrder");for(let p=0;p<x;p++){const f=I(a),y=I(l);if(!f&&!y)break}for(const p of a){let f=0;for(const y of i.get(p)??[])f=Math.max(f,(s[y]??0)+1);(s[p]??0)<f&&(s[p]=f)}for(const p of l){const f=c.get(p)??[];if(f.length>0){const y=Math.min(...f.map(v=>(s[v]??0)-1));(s[p]??0)>y&&(s[p]=y)}}return{layers:Mo(n,a,s),rankOf:s,dummy:new Set}}d(Ks,"assignLayers_Gravity");function qs(t){const e=xo(t),n=yo(t);let o=bo(e);const s=[];for(;o.length>0;){const r=[];for(const i of o){s.push(i);for(const c of n.get(i)??[])e.set(c,(e.get(c)??0)-1),(e.get(c)??0)===0&&r.push(c)}o=r.sort((i,c)=>i.localeCompare(c))}return s.length===t.nodes.length?s:null}d(qs,"topoSortByGenerationIfAcyclic");function Js(t,e){const n=ye(t),o=e?.direction==="LR"?qs(n)??[...n.nodes].sort():Be(n)??[...n.nodes].sort(),s=fe(n),r=d(g=>s(g)??g,"laneOf"),i=Object.create(null),c=new Map,a=d((g,x)=>e?.ignoreCrossLaneEdges??!0?r(g)===r(x)?1:0:1,"edgeWeight");for(const g of o){if(n.nodeById.get(g)?.isGroup)continue;const I=mo(n,g);let u=0;if(I.length>0)for(const v of I){const M=v.src,E=i[M]??0;u=Math.max(u,E+a(M,g))}const p=r(g),f=c.get(p)??0,y=Math.max(u,f);i[g]=y,c.set(p,y+1)}return{layers:Mo(n,o,i,{skipGroups:!0}),rankOf:i,dummy:new Set}}d(Js,"assignLayers_LaneAwareCompact");function Zs(t,e){const n=ye(e),{rankOf:o}=t,s=t.layers.map(u=>[...u]),r=new Set(t.dummy?[...t.dummy]:[]);let i=0;const c=new Map(n.nodeById),a=d(u=>{const p=`placeholder-${i++}`,f={id:p,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(p,f),r.add(p);s.length<=u;)s.push([]);return s[u].push(p),o[p]=u,p},"addDummyAt"),l=[...n.edges].sort((u,p)=>u.id===p.id?u.src===p.src?u.dst.localeCompare(p.dst):u.src.localeCompare(p.src):u.id.localeCompare(p.id)),g=[];for(const u of l){const p=o[u.src]??0,f=o[u.dst]??0;if(f-p<=1){g.push(u);continue}let y=u.src;for(let M=p+1,E=0;M<f;M++,E++){const T=a(M);g.push({id:`${u.id}#${E}`,src:y,dst:T,weight:u.weight,ref:u.ref}),y=T}const v=f-p-2;g.push({id:`${u.id}#${Math.max(v+1,0)}`,src:y,dst:u.dst,weight:u.weight,ref:u.ref})}const I={nodes:[...n.nodes,...[...r].filter(u=>!n.nodes.includes(u))],edges:g,layout:n.layout,nodeById:c};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:I}}d(Zs,"makeProperLayering");function Wn(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}d(Wn,"median");function Kn(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}d(Kn,"barycenter");function Qs(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}d(Qs,"neighborPositionsFor");function tr(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}d(tr,"currentOrderTieBreak");function qn(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(t),i=Ne(e),c=[];for(const l of n)o.has(l.src)&&s.has(l.dst)&&c.push({u:r.get(l.src),v:i.get(l.dst)});c.sort((l,g)=>l.u===g.u?l.v-g.v:l.u-g.u);const a=c.map(l=>l.v);return Io(a)}d(qn,"countCrossingsBetweenAdjacent");function We(t,e,n){return[...t].sort((o,s)=>{const r=Wn(e.get(o)??[]),i=Wn(e.get(s)??[]);return r===i?tr(o,s,n):isFinite(r)?isFinite(i)?r-i:-1:1})}d(We,"sortByHeuristic");function Jn(t,e,n,o,s,r){const i=Ne(t),c=Ne(e),a=Qs(e,i,n,o);if(!s||!r||r.length===0)return We(e,a,c);const l=new Map;for(const I of e){const u=s(I),p=l.get(u)??[];p.push(I),l.set(u,p)}const g=[];for(const I of r){const u=l.get(I);if(!u||u.length===0)continue;const p=We(u,a,c);g.push(...p)}const x=l.get(null);if(x&&x.length>0){const I=We(x,a,c);for(const u of I){const p=Kn(a.get(u)??[]);let f=g.length;if(isFinite(p))for(const[y,v]of g.entries()){const M=Kn(a.get(v)??[]);if(p<M){f=y;break}}g.splice(f,0,u)}}return g}d(Jn,"reorderLayer");function Zn(t,e,n,o,s){const r=[...e],i=new Set(t),c=new Set(e),a=o?new Set(o):null,l=n.filter(f=>i.has(f.src)&&c.has(f.dst)),g=a?n.filter(f=>c.has(f.src)&&a.has(f.dst)):void 0,x=d(f=>{let y=qn(t,f,l);return g&&o&&(y+=qn(f,o,g)),y},"crossingScore"),I=s?new Map:null;if(s&&I)for(const f of e)I.set(f,s(f));let u=!0,p=x(r);for(;u;){u=!1;for(let f=0;f+1<r.length;f++){if(I){const M=I.get(r[f]),E=I.get(r[f+1]);if(M!==E)continue}const y=p;[r[f],r[f+1]]=[r[f+1],r[f]];const v=x(r);v<y?(p=v,u=!0):[r[f],r[f+1]]=[r[f+1],r[f]]}}return r}d(Zn,"transposeImprove");function er(t,e,n){const o=t.layers.map(c=>[...c]),s=e.edges,r=fe(e),i=So(e,n?.laneOrder);for(let c=0;c<3;c++){for(let a=1;a<o.length;a++)o[a]=Jn(o[a-1],o[a],s,"down",r,i),o[a]=Zn(o[a-1],o[a],s,o[a+1],r);for(let a=o.length-2;a>=0;a--)o[a]=Jn(o[a+1],o[a],s,"up",r,i),o[a]=Zn(o[a+1],o[a],s,o[a-1],r)}return{layers:o}}d(er,"orderLayers");function nr(t,e,n){const o=n?.layerGap??ko.DEFAULT_LAYER_GAP,s=n?.nodeGap??ko.DEFAULT_NODE_GAP,r=n?.laneGap??s*2,i=n?.direction??"TB",c=i==="LR"||i==="RL",a=t.layers,l=Object.create(null),g=Object.create(null),x=d(O=>e.nodeById.get(O),"getNode"),I=d(O=>x(O)?.width??0,"getWidth"),u=d(O=>x(O)?.height??0,"getHeight"),p=fe(e),f=So(e,n?.laneOrder),y=a.map(O=>O.reduce((_,H)=>Math.max(_,u(H)),0)),v=[];if(c)for(let O=0;O+1<a.length;O++){const _=a[O].reduce((mt,kt)=>Math.max(mt,I(kt)),0),H=a[O+1].reduce((mt,kt)=>Math.max(mt,I(kt)),0),P=y[O],G=y[O+1],j=P/2+G/2,J=(_+H)/2,dt=Math.max(0,J-j-o);v.push(dt)}const M=new Set;for(const O of a)for(const _ of O)M.add(p(_));const E=M.has(null),T=f.filter(O=>M.has(O)),m=[...E?[null]:[],...T],S=Object.create(null);for(const O of T)S[O]=0;E&&(S.null=0);for(const O of a){const _=Object.create(null),H=[];for(const P of O){const G=p(P);G===null?H.push(P):(_[G]||=[]).push(P)}for(const[P,G]of Object.entries(_)){const j=G.reduce((J,dt)=>J+I(dt),0)+s*Math.max(0,G.length-1);S[P]=Math.max(S[P]??0,j)}if(E&&H.length){const P=H.reduce((G,j)=>G+I(j),0)+s*Math.max(0,H.length-1);S.null=Math.max(S.null??0,P)}}const A=new Map;{const O=m.map(P=>(P===null?S.null:S[P])??0);let H=-(O.reduce((P,G)=>P+G,0)+r*Math.max(0,m.length-1))/2;for(let P=0;P<m.length;P++){const G=m[P],j=O[P]??0,J=H+j/2;A.set(G,J),H+=j,P<m.length-1&&(H+=r)}}let R=0;for(const[O,_]of a.entries()){const H=y[O]??0,P=new Map;for(const j of _){const J=p(j),dt=P.get(J)??[];dt.push(j),P.set(J,dt)}for(const j of m){const J=P.get(j)??[];if(J.length===0)continue;const dt=A.get(j);if(J.length===1){const mt=J[0];l[mt]=dt,g[mt]=R+H/2}else{const mt=J.map(Q=>I(Q)),kt=mt.reduce((Q,W)=>Q+W,0)+s*(J.length-1);let Pt=dt-kt/2;for(const[Q,W]of J.entries()){const et=mt[Q];l[W]=Pt+et/2,g[W]=R+H/2,Pt+=et+s}}}const G=v[O]??0;R+=H+o+G}const k=new Map;for(const O of e.edges){const _=O.ref.id;k.has(_)||k.set(_,[]),k.get(_).push(O)}for(const[,O]of k){if(O.length===0)continue;const _=O[0].ref,H=_.start,P=_.end;if(H==null||P==null)continue;const G=Math.round(((l[H]??0)+(l[P]??0))/2),j=new Set;for(const J of O)j.add(J.src),j.add(J.dst);for(const J of j){if(J===H||J===P)continue;e.nodeById.get(J)?.isDummy&&(l[J]=G)}}return{x:l,y:g}}d(nr,"assignCoordinates");var or=8;function sr(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return e>>>0}d(sr,"hashString");function rr(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}d(rr,"mulberry32");function ir(t,e){const n=[...t],o=rr(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}d(ir,"deterministicShuffle");function cr(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}d(cr,"sourceDistance");function Qn(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:i}of e){const c=n.get(s),a=n.get(r);c==null||a==null||(o+=i*Math.abs(c-a))}return o}d(Qn,"laneArrangementCost");function ar(t){const e=fn(t);if(e.length<2)return[];const n=new Map(e.map((r,i)=>[r,i])),o=fe(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const i=typeof r.start=="string"?r.start:void 0,c=typeof r.end=="string"?r.end:void 0;if(!i||!c||!t.nodeById.has(i)||!t.nodeById.has(c))continue;const a=o(i),l=o(c);if(!a||!l||a===l)continue;const g=n.get(a),x=n.get(l);if(g==null||x==null)continue;const[I,u]=g<=x?[a,l]:[l,a],p=`${I}\0${u}`,f=s.get(p);f?f.weight++:s.set(p,{a:I,b:u,weight:1})}return[...s.values()]}d(ar,"buildWeightedLaneEdges");function to(t,e,n){const o=[...t];let s=Qn(o,e),r=!0,i=0;const c=Math.max(1,o.length);for(;r&&i<c;){r=!1,i++;for(let a=0;a+1<o.length;a++){[o[a],o[a+1]]=[o[a+1],o[a]];const l=Qn(o,e);l<s?(s=l,r=!0):[o[a],o[a+1]]=[o[a+1],o[a]]}}return{order:o,cost:s,sourceDistance:cr(o,n)}}d(to,"greedySwitch");function lr(t,e){return t.cost!==e.cost?t.cost<e.cost:t.sourceDistance<e.sourceDistance}d(lr,"isBetterCandidate");function fr(t,e,n){const o=[...e].sort((s,r)=>s.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:i})=>`${s}:${r}:${i}`).join("|");return sr(`${t.join("|")}#${o}#${n}`)}d(fr,"seedForRestart");function dr(t,e={}){const n=fn(t);if(n.length<2)return n;const o=ar(t);if(o.length===0)return n;const s=new Map(n.map((c,a)=>[c,a]));let r=to(n,o,s);const i=Math.max(0,e.restarts??or);for(let c=0;c<i;c++){const a=fr(n,o,c),l=ir(n,a),g=to(l,o,s);lr(g,r)&&(r=g)}return r.order}d(dr,"optimizeTopLaneOrder");function ur(t,e){const n=e?.ignoreCrossLaneEdges??!0,o=e?.optimizeRanksByCrossings??!0,s=ye(t),r=e?.automaticLaneOrdering?dr(s,{restarts:or}):void 0,i=Os(s),c=i.acyclic,a=n?Js(c,{compactSingleInput:e?.compactSingleInput??sn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:e?.direction}):Ks(c,{compactSingleInput:e?.compactSingleInput??sn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:o}),{layering:l,graphWithDummies:g}=Zs(a,c),x=er(l,g,{laneOrder:r}),I=nr(x,g,{layerGap:e?.layerGap,nodeGap:e?.nodeGap,direction:e?.direction,laneOrder:r});return{acyclic:c,reversed:i.reversed,layering:l,ordered:x,coordinates:I}}d(ur,"sugiyamaLayout");var ct=Jr.EPSILON,Zr=8,be=15,Te=15,je=25,ne=20,Cn=10;function eo(t,e,n){const o=t.x??0,s=t.y??0,r=e.x-o,i=e.y-s,c=Math.abs(r),a=Math.abs(i);return c<ct&&a<ct?n:a>ct&&a*3>=c?i>0?"bottom":"top":c>ct?r>0?"right":"left":n}d(eo,"chooseOrthogonalSide");function no(t,e){return Math.abs(t.to-e.from)<ct||Math.abs(t.to-e.to)<ct?t.to:t.from}d(no,"sharedLineEndpointCoord");function Me(t,e){return t.orient==="vertical"?{x:t.coord,y:e}:{x:e,y:t.coord}}d(Me,"pointOnLine");function hr(t,e){const n=t.nodes??[],o=t.edges??[],s=[];for(const h of o)h.isLayoutOnly||s.push({...h,__originalEdge:h});const r=new Map,i=new Map,c=[],a=e==="LR";for(const h of n)r.set(h.id,h);const l=n.filter(h=>h.isGroup&&!h.parentId);for(const h of l){const b={id:h.id},C=d(L=>{i.set(L.id,b),n.filter(w=>w.parentId===L.id).forEach(C)},"assignLane");C(h)}const g=n.filter(h=>!h.isGroup&&!h.isEdgeLabel).map(h=>{const b=h.width??10,C=h.height??10,L=h.x??0,w=h.y??0,B=Zr;return{nodeId:h.id,minX:L-b/2-B,maxX:L+b/2+B,minY:w-C/2-B,maxY:w+C/2+B,visualXHalfExtent:a?C/2+B:b/2+B}}),x=d((h,b,C,L)=>{let w=c.find(B=>B.orientation===h&&Math.abs(B.coord-b)<1);return w||(w={id:`pipe-${h}-${b.toFixed(0)}`,orientation:h,coord:b,spanMin:C,spanMax:L,tracks:[]},c.push(w)),w.spanMin=Math.min(w.spanMin,C),w.spanMax=Math.max(w.spanMax,L),w},"getOrAddPipe"),I=d((h,b)=>{const C=h.width??10,L=h.height??10,w=h.x??0,B=h.y??0;switch(b){case"top":return{x:w,y:B-L/2};case"bottom":return{x:w,y:B+L/2};case"left":return{x:w-C/2,y:B};case"right":return{x:w+C/2,y:B}}},"portForSide"),u=d((h,b,C)=>I(h,eo(h,b,C?"bottom":"top")),"getOrthogonalPort"),p=[],f=[],y=new Set,v=1e3,M=d((h,b,C)=>{if(p.length===0)return 0;const L=Math.abs(b.y-C.y)<ct,w=Math.abs(b.x-C.x)<ct;if(!L&&!w)return 0;let B=0;if(L){const U=b.y,q=Math.min(b.x,C.x)-ct,z=Math.max(b.x,C.x)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===h||Y.orientation!=="vertical"||Y.pipe.coord<q||Y.pipe.coord>z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}else if(w){const U=b.x,q=Math.min(b.y,C.y)-ct,z=Math.max(b.y,C.y)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===h||Y.orientation!=="horizontal"||Y.pipe.coord<q||Y.pipe.coord>z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}return B},"crossingPenalty"),E=s.map((h,b)=>{if(!h.start||!h.end)return{idx:b,crossLane:0,dx:0,dy:0};const C=r.get(h.start),L=r.get(h.end),w=i.get(h.start),B=i.get(h.end),U=w&&B&&w.id!==B.id?1:0,q=C&&L?Math.abs((L.x??0)-(C.x??0)):0,z=C&&L?Math.abs((L.y??0)-(C.y??0)):0;return{idx:b,crossLane:U,dx:q,dy:z}}).sort((h,b)=>{if(h.crossLane!==b.crossLane)return b.crossLane-h.crossLane;const C=h.dx+h.dy,L=b.dx+b.dy;return Math.abs(C-L)>1?C-L:h.idx-b.idx}).map(h=>h.idx),T=d((h,b,C,L)=>{const w=Math.min(h.x,b.x),B=Math.max(h.x,b.x),U=Math.min(h.y,b.y),q=Math.max(h.y,b.y);return!!g.find(Y=>C&&Y.nodeId===C||L&&Y.nodeId===L?!1:Math.abs(h.x-b.x)>ct?Y.minY<h.y&&Y.maxY>h.y&&Y.maxX>w&&Y.minX<B:Y.minX<h.x&&Y.maxX>h.x&&Y.maxY>U&&Y.minY<q)},"isSegmentBlocked"),m=new Map,S=new Map;for(const h of s)!h.start||!h.end||h.start===h.end||(S.set(h.start,(S.get(h.start)??0)+1),S.set(h.end,(S.get(h.end)??0)+1));const A=d((h,b)=>eo(h,b,"bottom"),"determineSide"),R=new Map;for(const[h,b]of s.entries()){if(!b.start||!b.end||b.start===b.end||b.points&&b.points.length>0)continue;const C=r.get(b.start),L=r.get(b.end);if(!C||!L)continue;const w=(L.x??0)-(C.x??0),B=(L.y??0)-(C.y??0);R.set(h,{edgeIdx:h,srcId:b.start,dstId:b.end,srcSide:A(C,{x:L.x??0,y:L.y??0}),dstSide:A(L,{x:C.x??0,y:C.y??0}),absDx:Math.abs(w),absDy:Math.abs(B),dxSign:Math.sign(w),dySign:Math.sign(B)})}const k=d(h=>h.srcSide==="top"||h.srcSide==="bottom"?h.absDx===0?1/0:h.absDy/h.absDx:h.absDy===0?1/0:h.absDx/h.absDy,"preferenceStrength"),O=d(h=>h.srcSide==="top"||h.srcSide==="bottom"?h.dxSign>=0?"right":"left":h.dySign>=0?"bottom":"top","secondarySide"),_=new Map;for(const h of R.values()){const b=`${h.srcId}:${h.srcSide}`;_.has(b)||_.set(b,[]),_.get(b).push(h)}const H=new Map,P=d((h,b)=>`${h}:${b}`,"loadKey");for(const h of R.values())H.set(P(h.srcId,h.srcSide),(H.get(P(h.srcId,h.srcSide))??0)+1),H.set(P(h.dstId,h.dstSide),(H.get(P(h.dstId,h.dstSide))??0)+1);for(const h of _.values())if(!(h.length<2)){h.sort((b,C)=>{const L=k(b),w=k(C);return Math.abs(L-w)>1e-9?w-L:b.edgeIdx-C.edgeIdx});for(let b=1;b<h.length;b++){const C=h[b],L=O(C),w=H.get(P(C.srcId,C.srcSide))??0,B=H.get(P(C.srcId,L))??0;B>=w||(H.set(P(C.srcId,C.srcSide),w-1),H.set(P(C.srcId,L),B+1),C.srcSide=L)}}const G=d(h=>{const b=h?.shape;return b==="question"||b==="diamond"},"isDiamondNode"),j=new Map;for(const h of R.values())j.has(h.dstId)||j.set(h.dstId,new Set),j.get(h.dstId).add(h.dstSide);for(const h of R.values()){if(!G(r.get(h.srcId)))continue;const b=j.get(h.srcId);if(!b?.has(h.srcSide))continue;const C=O(h);if(b.has(C)||(H.get(P(h.srcId,C))??0)>0)continue;const L=H.get(P(h.srcId,h.srcSide))??0;H.set(P(h.srcId,h.srcSide),Math.max(0,L-1)),H.set(P(h.srcId,C),1),h.srcSide=C}for(const h of R.values()){const{edgeIdx:b,srcId:C,dstId:L,srcSide:w,dstSide:B}=h,U=r.get(C),q=r.get(L),z=`${C}:${w}:src`,Y=w==="top"||w==="bottom"?q.x??0:q.y??0;m.has(z)||m.set(z,[]),m.get(z).push({edgeIdx:b,oppositeCoord:Y});const ot=`${L}:${B}:dst`,rt=B==="top"||B==="bottom"?U.x??0:U.y??0;m.has(ot)||m.set(ot,[]),m.get(ot).push({edgeIdx:b,oppositeCoord:rt})}const J=new Map,dt=8;for(const[h,b]of m){if(b.length<2)continue;b.sort((Lt,Dt)=>Lt.oppositeCoord-Dt.oppositeCoord);const C=h.split(":"),L=C.slice(0,-2).join(":"),w=C[C.length-2],B=C[C.length-1],U=r.get(L);if(!U)continue;const z=w==="left"||w==="right"?U.height??10:U.width??10,Y=U.shape,rt=Y==="question"||Y==="diamond"?z*.3:z,tt=Math.min(20,Math.max(dt,rt/(b.length+1))),Rt=-(tt*(b.length-1))/2;for(const[Lt,Dt]of b.entries()){const Jt=Rt+Lt*tt,gn=`${Dt.edgeIdx}:${B}`;J.set(gn,Jt)}}const mt=d(h=>!!s[h]?.labelNodeId,"edgeHasLabelNode"),kt=d((h,b)=>h?(m.get(`${h}:${b}:src`)??[]).some(({edgeIdx:C})=>mt(C))||(m.get(`${h}:${b}:dst`)??[]).some(({edgeIdx:C})=>mt(C)):!1,"faceHasLabelNode"),Pt=d((h,b,C)=>b==="top"||b==="bottom"?{x:h.x+C,y:h.y}:{x:h.x,y:h.y+C},"applyPortOffset"),Q=d((h,b,C)=>{const L=R.get(h),w={x:C.x??0,y:C.y??0},B={x:b.x??0,y:b.y??0},U=L?.srcSide??A(b,w),q=L?.dstSide??A(C,B);let z=L?I(b,L.srcSide):u(b,w,!0),Y=L?I(C,L.dstSide):u(C,B,!1);const ot=J.get(`${h}:src`),rt=J.get(`${h}:dst`);return ot!==void 0&&(z=Pt(z,U,ot)),rt!==void 0&&(Y=Pt(Y,q,rt)),{pSrcPort:z,pDstPort:Y,srcSide:U,dstSide:q}},"portsForEdge");for(const h of E){const b=s[h];if(f[h]=[],!b.start||!b.end||b.points&&b.points.length>0||b.start===b.end)continue;const C=r.get(b.start),L=r.get(b.end);if(!C||!L)continue;const{pSrcPort:w,pDstPort:B,srcSide:U,dstSide:q}=Q(h,C,L),z={...w},Y={...B},ot=U==="top"||U==="bottom",rt=q==="top"||q==="bottom";if(ot){const X=w.y>(C.y??0);z.y=X?w.y+ne:w.y-ne}else{const X=w.x>(C.x??0);z.x=X?w.x+ne:w.x-ne}if(rt){const X=B.y>(L.y??0);Y.y=X?B.y+ne:B.y-ne}else{const X=B.x>(L.x??0);Y.x=X?B.x+ne:B.x-ne}const st=d((X,$)=>{for(const K of g)if(!$.includes(K.nodeId)&&X.x>K.minX&&X.x<K.maxX&&X.y>K.minY&&X.y<K.maxY)return{inside:!0,obstacle:K};return{inside:!1}},"isPointInObstacle"),tt=d((X,$,K,lt,Ct)=>{if(Ct){const Nt=X.y>($.y??0);return{x:(K.x??0)>=X.x?lt.maxX+be:lt.minX-be,y:Nt?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:Nt}}const bt=X.x>($.x??0),Et=(K.y??0)>=X.y;return{x:bt?lt.maxX+be:lt.minX-be,y:Et?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:bt}},"obstacleDetour");let yt=[];const Rt=[b.start,b.end],Lt=st(z,Rt);if(Lt.inside&&Lt.obstacle){const X=Lt.obstacle;if(ot){const $=tt(w,C,L,X,!0);z.x=$.x,z.y=$.y;const K=$.leavesPositiveSide?Math.min(X.minY-2,w.y+ne):Math.max(X.maxY+2,w.y-ne);yt=[{x:w.x,y:K},{x:$.x,y:K},{x:$.x,y:$.y}]}else{const $=tt(w,C,L,X,!1),K=$.leavesPositiveSide?Math.min(X.minX-2,w.x+ne):Math.max(X.maxX+2,w.x-ne);z.x=$.x,z.y=$.y,yt=[{x:K,y:w.y},{x:K,y:$.y},{x:$.x,y:$.y}]}}let Dt=[];const Jt=st(Y,Rt);if(Jt.inside&&Jt.obstacle){const X=Jt.obstacle;if(rt){const $=tt(B,L,C,X,!0);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:B.x,y:$.y}]}else{const $=tt(B,L,C,X,!1);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:$.x,y:B.y}]}}if(yt.length===0&&Dt.length===0){const X=be,$=Math.abs(z.x-Y.x)<X,K=Math.abs(z.y-Y.y)<X,lt=J.get(`${h}:src`)!==void 0||J.get(`${h}:dst`)!==void 0,Ct=(m.get(`${b.start??""}:${U}:src`)?.length??0)+(m.get(`${b.start??""}:${U}:dst`)?.length??0),bt=(m.get(`${b.end??""}:${q}:src`)?.length??0)+(m.get(`${b.end??""}:${q}:dst`)?.length??0),Et=Ct>1||bt>1,Nt=S.get(b.start??"")??0,ut=S.get(b.end??"")??0,Yt=Ct>1&&kt(b.start,U)||bt>1&&kt(b.end,q),ee=Ct<=1||Nt<=2,Bt=bt<=1||ut<=2;if(($||K)&&!lt&&(!Et||Et&&!Yt&&ee&&Bt)&&!T(w,B,b.start,b.end)){b.points=[{...w},{...z},{...Y},{...B}],y.add(h);const Mt=K?"horizontal":"vertical",$t=K?w.y:w.x,It=K?Math.min(w.x,B.x):Math.min(w.y,B.y),St=K?Math.max(w.x,B.x):Math.max(w.y,B.y),Wt={id:`fast-path-${Mt}-${$t.toFixed(0)}-${h}`,orientation:Mt,coord:$t,spanMin:It,spanMax:St,tracks:[]};p.push({edgeIndex:h,segmentIndex:0,orientation:Mt,pipe:Wt,trackIndex:0,from:It,to:St});continue}}const gn=x("vertical",z.x,z.y,z.y);z.x=gn.coord;const mr=x("vertical",Y.x,Y.y,Y.y);Y.x=mr.coord;let ue=Math.min(z.x,Y.x)-50,he=Math.max(z.x,Y.x)+50,ve=Math.min(z.y,Y.y)-50,Le=Math.max(z.y,Y.y)+50;for(const X of g){const $=Math.min(z.x,Y.x),K=Math.max(z.x,Y.x),lt=Math.min(z.y,Y.y),Ct=Math.max(z.y,Y.y);X.minX<K&&X.maxX>$&&X.minY<Ct&&X.maxY>lt&&(ue=Math.min(ue,X.minX-je),he=Math.max(he,X.maxX+je),ve=Math.min(ve,X.minY-je),Le=Math.max(Le,X.maxY+je))}for(const X of g){if(X.maxX<ue||X.minX>he||X.maxY<ve||X.minY>Le)continue;const $=be;x("horizontal",X.minY-$,ue,he),x("horizontal",X.maxY+$,ue,he);const K=Te;x("vertical",X.minX-K,ve,Le),x("vertical",X.maxX+K,ve,Le)}x("horizontal",z.y,ue,he),x("horizontal",Y.y,ue,he);const yr=c.filter(X=>X.orientation==="horizontal"&&X.coord>=ve&&X.coord<=Le),xr=c.filter(X=>X.orientation==="vertical"&&X.coord>=ue&&X.coord<=he),ke=d((X,$)=>`${X.toFixed(1)},${$.toFixed(1)}`,"getKey"),_e=ke(z.x,z.y),vo=ke(Y.x,Y.y),Fe=new Map,pn=new Map,mn=new Map,De=new Set,xe=[];Fe.set(_e,0),mn.set(_e,"n"),xe.push({key:_e,f:Math.hypot(Y.x-z.x,Y.y-z.y),pt:z}),De.add(_e);let Ht=[];const ge=d((X,$)=>T(X,$,b.start,b.end),"checkSegmentBlocked"),yn={x:Y.x,y:z.y},br=ge(z,yn),Mr=ge(yn,Y),Ir=br||Mr,xn={x:z.x,y:Y.y},Sr=ge(z,xn),Cr=ge(xn,Y);if(Ir?Sr||Cr||(Math.abs(z.x-Y.x)<ct?Ht=[z,Y]:Ht=[z,xn,Y]):Math.abs(z.y-Y.y)<ct||Math.abs(z.x-Y.x)<ct?Ht=[z,Y]:Ht=[z,yn,Y],Ht.length===0)for(;xe.length>0;){xe.sort((ut,Yt)=>ut.f-Yt.f);const X=xe.shift();if(De.delete(X.key),X.key===vo){let ut=vo,Yt=Y;for(Ht=[Yt];pn.has(ut);){const ee=pn.get(ut);Ht.unshift(ee),Yt=ee,ut=ke(ee.x,ee.y)}break}const $=X.pt.x,K=X.pt.y,lt=xr.sort((ut,Yt)=>ut.coord-Yt.coord),Ct=lt.findIndex(ut=>Math.abs(ut.coord-$)<1),bt=yr.sort((ut,Yt)=>ut.coord-Yt.coord),Et=bt.findIndex(ut=>Math.abs(ut.coord-K)<1),Nt=[];Ct>0&&Nt.push({x:lt[Ct-1].coord,y:K}),Ct>=0&&Ct<lt.length-1&&Nt.push({x:lt[Ct+1].coord,y:K}),Et>0&&Nt.push({x:$,y:bt[Et-1].coord}),Et>=0&&Et<bt.length-1&&Nt.push({x:$,y:bt[Et+1].coord});for(const ut of Nt){const Yt=Math.min($,ut.x),ee=Math.max($,ut.x),Bt=Math.min(K,ut.y),Gt=Math.max(K,ut.y);if(g.some(Zt=>Zt.nodeId===b.start||Zt.nodeId===b.end?!1:Yt!==ee?Zt.minY<K&&Zt.maxY>K&&Zt.maxX>Yt&&Zt.minX<ee:Zt.minX<$&&Zt.maxX>$&&Zt.maxY>Bt&&Zt.minY<Gt))continue;const Mt=ke(ut.x,ut.y),$t=Math.abs(ut.x-$)+Math.abs(ut.y-K),It=M(h,X.pt,ut);let St=0;const Wt=Y.x-z.x,Ee=Y.y-z.y,He=ut.x-$,bn=ut.y-K;(Ee>10&&bn<-5||Ee<-10&&bn>5)&&(St=Math.abs(bn)*100),(Wt>10&&He<-5||Wt<-10&&He>5)&&(St+=Math.abs(He)*50);let Lo=0;const Eo=mn.get(X.key)??"n",To=Math.abs(He)>ct?"h":"v";Eo!=="n"&&Eo!==To&&(Lo=50);const vr=$t+It+St+Lo,Xe=(Fe.get(X.key)??1/0)+vr,wo=Math.abs(Y.x-ut.x)+Math.abs(Y.y-ut.y);if(Xe<(Fe.get(Mt)??1/0))if(pn.set(Mt,X.pt),Fe.set(Mt,Xe),mn.set(Mt,To),!De.has(Mt))xe.push({key:Mt,f:Xe+wo,pt:ut}),De.add(Mt);else{const Zt=xe.findIndex(Lr=>Lr.key===Mt);Zt!==-1&&(xe[Zt].f=Xe+wo)}}}if(Ht.length===0&&(Ht=[z,{x:z.x,y:Y.y},Y]),Ht.length>4){const X=Ht[0],$=Ht[Ht.length-1];let K=Math.min(X.x,$.x),lt=Math.max(X.x,$.x),Ct=Math.min(X.y,$.y),bt=Math.max(X.y,$.y);for(const Bt of Ht)K=Math.min(K,Bt.x),lt=Math.max(lt,Bt.x),Ct=Math.min(Ct,Bt.y),bt=Math.max(bt,Bt.y);const Et=lt>Math.max(X.x,$.x),Nt=K<Math.min(X.x,$.x);if(a){const Bt=Te;if(Et){const Gt=Math.max(X.x,$.x),Ot=Math.min(X.y,$.y),Mt=Math.max(X.y,$.y),$t=g.filter(It=>It.minX<Gt&&It.maxX>Gt&&It.minY<Mt&&It.maxY>Ot);if($t.length>0){let It=Math.max(X.x,$.x);for(const St of $t){const Wt=(St.minX+St.maxX)/2;if(St.visualXHalfExtent===void 0||isNaN(St.visualXHalfExtent))continue;const Ee=Wt+St.visualXHalfExtent+Bt;It=Math.max(It,Ee)}isNaN(It)||(lt=It)}}if(Nt){const Gt=g.filter(Ot=>Ot.minX<Math.min(X.x,$.x)+Bt&&Ot.minY<Math.max(X.y,$.y)&&Ot.maxY>Math.min(X.y,$.y));if(Gt.length>0){let Ot=Math.min(X.x,$.x);for(const Mt of Gt){const It=(Mt.minX+Mt.maxX)/2-Mt.visualXHalfExtent-Bt;Ot=Math.min(Ot,It)}K=Ot}}}const ut=d(Bt=>{const Gt=$.y>X.y,Ot=g.filter(It=>{const St=Math.min(X.x,$.x)<It.maxX&&Math.max(X.x,$.x)>It.minX,Wt=Math.min(X.y,$.y)<It.maxY&&Math.max(X.y,$.y)>It.minY;return St&&Wt});let Mt=Ot;if(a&&Ot.length>0){const It=Ot.filter(St=>St.minX<Bt&&St.maxX>Bt);It.length>0&&(Mt=It)}if(Mt.length===0)return $.y;const $t=be;if(Gt){const St=Math.max(...Mt.map(Wt=>Wt.maxY))+$t;if(St<$.y-ct)return St}else{const St=Math.min(...Mt.map(Wt=>Wt.minY))-$t;if(St>$.y+ct)return St}return $.y},"findBestReturnY"),Yt=d(Bt=>{const Gt=ut(Bt),Ot={x:Bt,y:X.y},Mt={x:Bt,y:Gt},$t={x:$.x,y:Gt},It=ge(X,Ot),St=ge(Ot,Mt),Wt=ge(Mt,$t),Ee=Gt!==$.y?ge($t,$):!1;return!It&&!St&&!Wt&&!Ee?Math.abs(Gt-$.y)<ct?[X,Ot,Mt,$]:[X,Ot,Mt,$t,$]:null},"trySimplifyWithDetourX"),ee=Et&&!Nt?Yt(lt):Nt&&!Et?Yt(K):null;ee&&(Ht=ee)}const Xt=[w,...yt,...Ht,...Dt.reverse(),B];if(Xt.length>=3){const X=Xt[Xt.length-1],$=Xt[Xt.length-2],K=Xt[Xt.length-3],lt=Math.abs(K.y-$.y)<ct&&Math.abs($.y-X.y)<ct,Ct=Math.abs(K.x-$.x)<ct&&Math.abs($.x-X.x)<ct;if(lt){const bt=Math.sign($.x-K.x),Et=Math.sign(X.x-K.x);bt!==0&&bt===Et&&Math.abs($.x-K.x)>Math.abs(X.x-K.x)&&Xt.splice(-2,1)}else if(Ct){const bt=Math.sign($.y-K.y),Et=Math.sign(X.y-K.y);bt!==0&&bt===Et&&Math.abs($.y-K.y)>Math.abs(X.y-K.y)&&Xt.splice(-2,1)}}const ie=[Xt[0]];for(let X=1;X<Xt.length-1;X++){if(X===1){ie.push(Xt[X]);continue}const $=ie[ie.length-1],K=Xt[X],lt=Xt[X+1];if(Math.abs($.y-K.y)<ct&&Math.abs(K.y-lt.y)<ct){const Ct=K.x>$.x,bt=lt.x>K.x;if(Ct!==bt){ie.push(K);continue}continue}if(Math.abs($.x-K.x)<ct&&Math.abs(K.x-lt.x)<ct){const Ct=K.y>$.y,bt=lt.y>K.y;if(Ct!==bt){ie.push(K);continue}continue}ie.push(K)}ie.push(Xt[Xt.length-1]);for(let X=0;X<ie.length-1;X++){const $=ie[X],K=ie[X+1],lt=Math.abs($.x-K.x)<ct?"vertical":"horizontal",Ct=lt==="vertical"?$.x:$.y,bt=lt==="vertical"?Math.min($.y,K.y):Math.min($.x,K.x),Et=lt==="vertical"?Math.max($.y,K.y):Math.max($.x,K.x),Nt=x(lt,Ct,bt,Et),ut={edgeIndex:h,segmentIndex:X,orientation:lt,pipe:Nt,trackIndex:0,from:bt,to:Et};p.push(ut),f[h].push(p.length-1),Nt.tracks[0]||(Nt.tracks[0]={index:0,coord:Nt.coord,segments:[]}),Nt.tracks[0].segments.push({edgeIndex:h,segmentIndex:X,from:bt,to:Et})}}const W=d((h,b)=>h.from<b.to&&b.from<h.to,"segmentsOverlap"),et=d((h,b,C,L)=>{const w=!L.segments.some(U=>(U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex)&&W(U,h)),B=!C.segments.some(U=>(U.edgeIndex!==h.edgeIndex||U.segmentIndex!==h.segmentIndex)&&W(U,b));return w&&B?(h.trackIndex=L.index,b.trackIndex=C.index,C.segments=[...C.segments.filter(U=>U.edgeIndex!==h.edgeIndex||U.segmentIndex!==h.segmentIndex),{edgeIndex:b.edgeIndex,segmentIndex:b.segmentIndex,from:b.from,to:b.to}],L.segments=[...L.segments.filter(U=>U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex),{edgeIndex:h.edgeIndex,segmentIndex:h.segmentIndex,from:h.from,to:h.to}],!0):!1},"trySwapSegmentsAcrossTracks"),at=d(h=>{const b=h.tracks.length;return h.tracks[b]={index:b,coord:h.coord,segments:[]},b},"createNewTrack"),gt=d((h,b)=>{const C=h.pipe.tracks[h.trackIndex];C.segments=C.segments.filter(w=>w.edgeIndex!==h.edgeIndex||w.segmentIndex!==h.segmentIndex),h.trackIndex=b,h.pipe.tracks[b].segments.push({edgeIndex:h.edgeIndex,segmentIndex:h.segmentIndex,from:h.from,to:h.to})},"moveSegmentToTrack"),xt=d((h,b)=>{const C=f[h.edgeIndex];for(const L of C){const w=p[L];w.pipe===h.pipe&>(w,b)}},"moveSegmentChainToTrack"),vt=d(h=>{const b=f[h.edgeIndex],C=b.indexOf(p.indexOf(h)),L=[];return C>0&&L.push(p[b[C-1]]),C<b.length-1&&L.push(p[b[C+1]]),L},"getAdjacentSegmentsAlongEdge"),Vt=d((h,b)=>{if(h.orientation===b.orientation)return!1;const C=h.orientation==="horizontal"?h:b,L=h.orientation==="horizontal"?b:h;return L.pipe.coord>C.from&&L.pipe.coord<C.to&&C.pipe.coord>L.from&&C.pipe.coord<L.to},"haveAnyCrossing"),jt=d((h,b)=>{for(const C of h.tracks)if(!C.segments.some(w=>(w.edgeIndex!==b.edgeIndex||w.segmentIndex!==b.segmentIndex)&&W(w,b)))return C.index;return-1},"findAvailableTrack"),Ut=d((h,b)=>{if(h.trackIndex===b.trackIndex)return W(h,b);const C=vt(h),L=vt(b);return C.some(w=>L.some(B=>Vt(w,B)))},"segmentsConflict"),te=d((h,b,C)=>{if(et(h,b,h.pipe.tracks[h.trackIndex],b.pipe.tracks[b.trackIndex]))return;const L=jt(h.pipe,b);C(b,L!==-1?L:at(h.pipe))},"resolveTrackConflict"),Se=d(h=>{let b=0;for(let C=0;C<h.length;C++)for(let L=C+1;L<h.length;L++){const w=h[C],B=h[L];w.pipe===B.pipe&&Ut(w,B)&&(b++,te(w,B,xt))}return b},"resolveHandleConflicts"),de=new Map,Ce=d(h=>{if(de.has(h))return de.get(h);const b=f[h];if(b.length===0){const q={dest:0,deviation:0,base:0,delta:0};return de.set(h,q),q}const L=p[b[0]].pipe.coord;let w=L;for(let q=1;q<b.length;q++){const z=p[b[q]];if(z.orientation==="horizontal"){const Y=z.from,ot=z.to;w=Math.abs(Y-L)>Math.abs(ot-L)?Y:ot;break}}const B=Math.abs(w-L),U={dest:w,deviation:B,base:L,delta:w-L};return de.set(h,U),U},"getDestInfo"),dn=d(()=>{let h=0;const b=new Map;for(const[L,w]of s.entries())f[L].length!==0&&w.start&&(b.has(w.start)||b.set(w.start,[]),b.get(w.start).push(L));const C=d(L=>{const w=s[L];if(!w.start||!w.end)return 0;const B=r.get(w.start),U=r.get(w.end);if(!B||!U)return 0;const q=(U.x??0)-(B.x??0),z=(U.y??0)-(B.y??0);return Math.abs(q)+Math.abs(z)},"getEdgeDistance");for(const L of b.values()){L.sort((B,U)=>{const q=Ce(B),z=Ce(U);if(Math.abs(q.deviation-z.deviation)>1)return q.deviation-z.deviation;if(Math.abs(q.dest-z.dest)>1)return q.dest-z.dest;const Y=C(B),ot=C(U);if(Math.abs(Y-ot)>1)return ot-Y;const rt=f[B].length,st=f[U].length;if(rt!==st)return rt-st;if(rt===1){const tt=f[B][0],yt=f[U][0];if(p[tt]&&p[yt]){const Rt=p[tt],Lt=p[yt],Dt=Math.abs(Rt.to-Rt.from),Jt=Math.abs(Lt.to-Lt.from);if(Math.abs(Dt-Jt)>1)return Dt-Jt}}return 0});const w=L.map(B=>p[f[B][0]]);h+=Se(w)}return h},"fixSourceHandleCrossings"),un=d(()=>{let h=0;const b=new Map;for(const[C,L]of s.entries())f[C].length!==0&&L.end&&(b.has(L.end)||b.set(L.end,[]),b.get(L.end).push(C));for(const C of b.values()){C.sort((w,B)=>{const U=d(Y=>{const ot=f[Y];if(ot.length<2)return 0;const rt=p[ot[ot.length-2]];return Math.abs(rt.to-rt.from)},"getDist"),q=U(w),z=U(B);return Math.abs(q-z)>.1?q-z:w-B});const L=C.map(w=>p[f[w][f[w].length-1]]);h+=Se(L)}return h},"fixTargetHandleCrossings"),hn=d(()=>{let h=0;for(const b of c){const C=[];for(const L of b.tracks)for(const w of L.segments){const B=f[w.edgeIndex].find(U=>p[U].segmentIndex===w.segmentIndex);B!==void 0&&C.push(p[B])}C.sort((L,w)=>L.edgeIndex-w.edgeIndex||L.segmentIndex-w.segmentIndex);for(let L=0;L<C.length;L++)for(let w=L+1;w<C.length;w++){const B=C[L],U=C[w];Ut(B,U)&&(h++,te(B,U,gt))}}return h},"fixPipeCrossings");let N=0;const F=10;for(;N<F;){let h=0;if(h+=dn(),h+=un(),h+=hn(),h===0)break;N++}const D=new Map;for(const h of c){const b=[];h.tracks.forEach(L=>{L.segments.forEach(w=>{b.push({edgeIndex:w.edgeIndex,segmentIndex:w.segmentIndex,trackIndex:L.index,from:w.from,to:w.to})})}),b.sort((L,w)=>L.from-w.from);const C=[];if(b.length>0){let L=[b[0]],w=b[0].to;for(let B=1;B<b.length;B++){const U=b[B];U.from<w?(L.push(U),w=Math.max(w,U.to)):(C.push(L),L=[U],w=U.to)}C.push(L)}for(const L of C){const w=new Set;L.forEach(tt=>w.add(tt.trackIndex));const B=new Map;L.forEach(tt=>{const yt=Ce(tt.edgeIndex);B.set(tt.trackIndex,(B.get(tt.trackIndex)??0)+yt.delta)});const U=[...w].filter(tt=>(B.get(tt)??0)<-1),q=[...w].filter(tt=>(B.get(tt)??0)>1),z=[...w].filter(tt=>Math.abs(B.get(tt)??0)<=1);U.sort((tt,yt)=>(B.get(yt)??0)-(B.get(tt)??0)),q.sort((tt,yt)=>(B.get(tt)??0)-(B.get(yt)??0));const Y=d((tt,yt)=>{L.filter(Rt=>Rt.trackIndex===tt).forEach(Rt=>{const Lt=y.has(Rt.edgeIndex)?h.coord:yt;D.set(`${Rt.edgeIndex}-${Rt.segmentIndex}`,Lt)})},"assignCoord");let ot=0;for(const tt of U)ot++,Y(tt,h.coord-ot*Cn);if(z.length===0&&w.size>0){const tt=[...w].sort((Lt,Dt)=>Math.abs(B.get(Lt)??0)-Math.abs(B.get(Dt)??0))[0],yt=U.indexOf(tt);yt!==-1&&U.splice(yt,1);const Rt=q.indexOf(tt);Rt!==-1&&q.splice(Rt,1),z.push(tt)}let rt=0;for(const tt of z){if(rt===0)Y(tt,h.coord);else{const yt=rt%2===1?1:-1,Rt=Math.ceil(rt/2);Y(tt,h.coord+yt*Rt*Cn*.5)}rt++}let st=0;for(const tt of q)st++,Y(tt,h.coord+st*Cn)}}for(const[h,b]of s.entries()){const C=f[h]??[];if(C.length===0)continue;const L=[],w=r.get(b.start),B=r.get(b.end),{pSrcPort:U,pDstPort:q}=Q(h,w,B),z=C.map(rt=>{const st=p[rt],tt=D.get(`${st.edgeIndex}-${st.segmentIndex}`)??st.pipe.coord;return{orient:st.orientation,coord:tt,from:st.from,to:st.to}});L.push(U);for(let rt=0;rt<z.length;rt++){const st=z[rt],tt=L[L.length-1],yt=st.orient==="vertical"?tt.y:tt.x,Rt=st.orient==="vertical"?tt.x:tt.y,Lt=z[rt+1],Dt=rt<z.length-1;if(Math.abs(Rt-st.coord)>ct&&L.push(Me(st,yt)),Dt&&Lt.orient===st.orient)if(Math.abs(st.coord-Lt.coord)>ct){const Jt=st.orient==="vertical"?(yt+Lt.from)/2:no(st,Lt);L.push(Me(st,Jt),Me(Lt,Jt))}else(rt===0||rt===z.length-2)&&L.push(Me(st,no(st,Lt)));else if(Dt)L.push(Me(st,Lt.coord));else{const Jt=Math.abs(st.from-yt)<Math.abs(st.to-yt)?st.to:st.from;L.push(Me(st,Jt))}}const Y=L[L.length-1];(Math.abs(Y.x-q.x)>ct||Math.abs(Y.y-q.y)>ct)&&L.push(q);const ot=[];L.length>0&&ot.push(L[0]);for(let rt=1;rt<L.length;rt++){const st=L[rt],tt=ot[ot.length-1];(Math.abs(st.x-tt.x)>ct||Math.abs(st.y-tt.y)>ct)&&ot.push(st)}b.points=ot}for(const h of s){const b=h.__originalEdge;b&&h.points&&(b.points=h.points)}t.edges=(t.edges??[]).filter(h=>!h.isLayoutOnly);const V=d((h,b)=>{const C=b.x??0,L=b.y??0,w=b.width??0,B=b.height??0;if(w<=0||B<=0)return h;const U=C-w/2,q=C+w/2,z=L-B/2,Y=L+B/2;if(h.x<U||h.x>q||h.y<z||h.y>Y)return h;const ot=h.x-U,rt=q-h.x,st=h.y-z,tt=Y-h.y,yt=Math.min(ot,rt,st,tt);return yt===ot?{x:U,y:h.y}:yt===rt?{x:q,y:h.y}:yt===st?{x:h.x,y:z}:{x:h.x,y:Y}},"nodeBoundaryClamp");for(const h of t.edges){const b=h.points;if(!b||b.length<2)continue;const C=h.start,L=h.end,w=C?r.get(C):void 0,B=L?r.get(L):void 0;w&&(b[0]=V(b[0],w)),B&&(b[b.length-1]=V(b[b.length-1],B))}return t}d(hr,"routeEdgesOrthogonal");function gr(t){return t.direction??"TB"}d(gr,"getSwimlaneDirection");function pr(t){const e=Jo(t),n=t.config.flowchart?.nodeSpacing??40,o=t.config.flowchart?.rankSpacing??100,s=t.config.swimlane?.ignoreCrossLaneEdges??!0,r=t.config.swimlane?.optimizeRanksByCrossings??!0,i=t.config.swimlane?.automaticLaneOrdering??!1,c=gr(t),{ordered:a,coordinates:l}=ur(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:i,direction:c});Zo(e,a,l,{nodeGap:n,layerGap:o});for(const g of t.edges??[])delete g.points;hr(t,c);for(const g of t.edges??[])(!g.curve||g.curve==="basis")&&(g.curve="rounded");return Rs(t,c),As(t),c}d(pr,"runSwimlaneLayoutCore");async function Qr(t,e){const n=e.select("g");wr(n,t.markers,t.type,t.diagramId),Ar(),Rr(),Nr(),Tr(),qo(t);const o=Qo(t);t.nodes=o.nodes,t.edges=o.edges;const{groups:s}=await _o(n,t);pr(t),await Uo(t,s)}d(Qr,"render");export{Qr as render}; diff --git a/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-1XCKB3VS.js b/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-1XCKB3VS.js deleted file mode 100644 index cce51e75b..000000000 --- a/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-1XCKB3VS.js +++ /dev/null @@ -1,8 +0,0 @@ -import{c as r,s as e}from"./flowDiagram-23GEKE2U-C0UVrrA6.js";import{_ as a}from"./mermaid.core-DHQD1STq.js";import"./chunk-5VM5RSS4-BgO5oPj2.js";import"./chunk-XXDRQBXY-AKdWVjUf.js";import"./chunk-VR4S4FIN-CFZ-U2wY.js";import"./chunk-32BRIVSS-BjbI6vv4.js";import"./channel-CCgkeAox.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var o=a(t=>`${e(t)} - .swimlane.cluster rect { - stroke: ${t.clusterBorder} !important; - } - [data-look="neo"].cluster rect { - filter: none; - } -`,"getStyles"),m=o,y=r({defaultLayout:"swimlane",styles:m});export{y as diagram}; diff --git a/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-WxMWFajS.js b/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-WxMWFajS.js new file mode 100644 index 000000000..67aa2454a --- /dev/null +++ b/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-WxMWFajS.js @@ -0,0 +1,8 @@ +import{c as r,s as e}from"./flowDiagram-23GEKE2U-CBIszsQp.js";import{_ as a}from"./mermaid.core-DpBz6UHc.js";import"./chunk-5VM5RSS4-D5nhu_pI.js";import"./chunk-XXDRQBXY-BYo5O_6D.js";import"./chunk-VR4S4FIN-JAO0vJUe.js";import"./chunk-32BRIVSS-Dx199TNh.js";import"./channel-DPT3_xql.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var o=a(t=>`${e(t)} + .swimlane.cluster rect { + stroke: ${t.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,"getStyles"),m=o,y=r({defaultLayout:"swimlane",styles:m});export{y as diagram}; diff --git a/apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-doJ2oiYT.js b/apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-zMligh5P.js similarity index 99% rename from apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-doJ2oiYT.js rename to apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-zMligh5P.js index 80622130d..3ddf286cf 100644 --- a/apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-doJ2oiYT.js +++ b/apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-zMligh5P.js @@ -1,4 +1,4 @@ -import{_ as o,z as pt,aa as Rt,ab as Ct,ac as Wt,c as gt,l as E,F as Pt,a1 as Bt,ad as ft,d as U,u as Vt,ae as Ft,q as zt}from"./mermaid.core-DHQD1STq.js";import{d as ot}from"./arc-VnV5ZHHs.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var K=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,X,Z;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";Z=[];for(G in S[$])this.terminals_[G]&&G>W&&Z.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`: +import{_ as o,z as pt,aa as Rt,ab as Ct,ac as Wt,c as gt,l as E,F as Pt,a1 as Bt,ad as ft,d as U,u as Vt,ae as Ft,q as zt}from"./mermaid.core-DpBz6UHc.js";import{d as ot}from"./arc-BNlcm8Io.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var K=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,X,Z;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";Z=[];for(G in S[$])this.terminals_[G]&&G>W&&Z.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`: `+w.showPosition()+` Expecting `+Z.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(I+1)+": Unexpected "+(_==O?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:w.match,token:this.terminals_[_]||_,line:w.yylineno,loc:F,expected:Z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+_);switch(T[0]){case 1:l.push(_),x.push(w.yytext),u.push(w.yylloc),l.push(T[1]),_=null,R=w.yyleng,v=w.yytext,I=w.yylineno,F=w.yylloc;break;case 2:if(B=this.productions_[T[1]][1],C.$=x[x.length-B],C._$={first_line:u[u.length-(B||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(B||1)].first_column,last_column:u[u.length-1].last_column},K&&(C._$.range=[u[u.length-(B||1)].range[0],u[u.length-1].range[1]]),P=this.performAction.apply(C,[v,R,I,H.yy,T[1],x,u].concat(L)),typeof P<"u")return P;B&&(l=l.slice(0,-1*B*2),x=x.slice(0,-1*B),u=u.slice(0,-1*B)),l.push(this.productions_[T[1]][0]),x.push(C.$),u.push(C._$),X=S[l[l.length-2]][l[l.length-1]],l.push(X);break;case 3:return!0}}return!0},"parse")},m=(function(){var k={EOF:1,parseError:o(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),setInput:o(function(s,d){return this.yy=d||this.yy||{},this._input=s,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:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.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),s},"input"),unput:o(function(s){var d=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=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),l.length-1&&(this.yylineno-=l.length-1);var x=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:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-De4w5Aco.js b/apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-KpUZjKlm.js similarity index 99% rename from apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-De4w5Aco.js rename to apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-KpUZjKlm.js index a30239b83..5f97ccfc5 100644 --- a/apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-De4w5Aco.js +++ b/apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-KpUZjKlm.js @@ -1,4 +1,4 @@ -import{b4 as Wt,s as Kt,g as Ht,p as Yt,o as Xt,a as Zt,b as Jt,_ as w,z as wt,F as Qt,d as ot,al as $t,aa as te,ab as ee,ac as ne,e as se,q as ie,B as oe,D as re}from"./mermaid.core-DHQD1STq.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(q(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});x.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(J(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)J(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(J(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(J(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)J(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);J(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Ot(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const D=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&D.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(F=>D.has(F)));let I={},C={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Ct(k,r,h)),I=Nt(k,s,e,i,f),C=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const O=x.select("svg");n?O.attr("viewBox",`0 0 ${s} ${e}`):O.attr("width",s).attr("height",e);const R={};let T=!1;O.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(T=!0,R[k.sets[0]]=Me(F))});function A(k){return F=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,p)}}const G=O.selectAll(".venn-area").data(d,k=>k.sets),P=G.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),L=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),L.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;T&&typeof z.transition=="function"?(z=K(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),p);const N=z.selectAll("text").filter(k=>k.sets in C).text(k=>V(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(T?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const j=K(G.exit()).remove();typeof G.transition=="function"&&j.selectAll("path").attrTween("d",A);const X=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(L.style("font-size","0px"),N.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:G,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Dt:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=q(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(` +import{b4 as Wt,s as Kt,g as Ht,p as Yt,o as Xt,a as Zt,b as Jt,_ as w,z as wt,F as Qt,d as ot,al as $t,aa as te,ab as ee,ac as ne,e as se,q as ie,B as oe,D as re}from"./mermaid.core-DpBz6UHc.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(q(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});x.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(J(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)J(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(J(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(J(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)J(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);J(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Ot(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const D=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&D.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(F=>D.has(F)));let I={},C={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Ct(k,r,h)),I=Nt(k,s,e,i,f),C=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const O=x.select("svg");n?O.attr("viewBox",`0 0 ${s} ${e}`):O.attr("width",s).attr("height",e);const R={};let T=!1;O.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(T=!0,R[k.sets[0]]=Me(F))});function A(k){return F=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,p)}}const G=O.selectAll(".venn-area").data(d,k=>k.sets),P=G.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),L=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),L.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;T&&typeof z.transition=="function"?(z=K(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),p);const N=z.selectAll("text").filter(k=>k.sets in C).text(k=>V(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(T?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const j=K(G.exit()).remove();typeof G.transition=="function"&&j.selectAll("path").attrTween("d",A);const X=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(L.style("font-size","0px"),N.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:G,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Dt:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=q(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(` M`,t,n),e.push(` m`,-s,0),e.push(` a`,s,s,0,1,0,s*2,0),e.push(` diff --git a/apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-B6hrKKNQ.js b/apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-D5Z_EMXj.js similarity index 98% rename from apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-B6hrKKNQ.js rename to apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-D5Z_EMXj.js index 240f2e57c..8bbe7ba75 100644 --- a/apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-B6hrKKNQ.js +++ b/apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-D5Z_EMXj.js @@ -1,4 +1,4 @@ -import{B as t,a as o,C as r,D as n,E as i,b as c,c as l,F as d,K as p,R as b,S as m,d as f,T as u,e as h,f as S,g as y,h as R,i as v,V as C,j as g,k as w,l as T,m as E,n as x,o as M,p as k,q as D,r as P,s as V,t as A,u as B,v as H,w as N,x as O,y as I,z,A as F,G as U,H as K,I as W,J as j,L as q,M as G,N as L,O as J,P as Q,Q as X,U as Y,W as Z,X as _,Y as $,Z as aa,_ as ea,$ as sa,a0 as ta,a1 as oa,a2 as ra,a3 as na,a4 as ia,a5 as ca,a6 as la,a7 as da,a8 as pa,a9 as ba,aa as ma,ab as fa,ac as ua,ad as ha,ae as Sa,af as ya,ag as Ra,ah as va,ai as Ca,aj as ga,ak as wa,al as Ta,am as Ea,an as xa,ao as Ma,ap as ka,aq as Da,ar as Pa,as as Va,at as Aa,au as Ba,av as Ha,aw as Na,ax as Oa,ay as Ia,az as za,aA as Fa,aB as Ua,aC as Ka,aD as Wa,aE as ja,aF as qa,aG as Ga,aH as La,aI as Ja,aJ as Qa,aK as Xa,aL as Ya,aM as Za,aN as _a,aO as $a,aP as ae,aQ as ee,aR as se,aS as te,aT as oe,aU as re,aV as ne,aW as ie,aX as ce,aY as le,aZ as de,a_ as pe,a$ as be,b0 as me,b1 as fe,b2 as ue,b3 as he,b4 as Se,b5 as ye,b6 as Re,b7 as ve,b8 as Ce,b9 as ge,ba as we,bb as Te,bc as Ee,bd as xe,be as Me,bf as ke,bg as De,bh as Pe,bi as Ve,bj as Ae,bk as Be,bl as He,bm as Ne,bn as Oe,bo as Ie,bp as ze,bq as Fe,br as Ue,bs as Ke,bt as We,bu as je,bv as qe,bw as Ge,bx as Le,by as Je,bz as Qe,bA as Xe,bB as Ye,bC as Ze,bD as _e,bE as $e,bF as as,bG as es,bH as ss,bI as ts,bJ as os,bK as rs,bL as ns,bM as is,bN as cs,bO as ls,bP as ds}from"./index-CgXirkUy.js";/** +import{B as t,a as o,C as r,D as n,E as i,b as c,c as l,F as d,K as p,R as b,S as m,d as f,T as u,e as h,f as S,g as y,h as R,i as v,V as C,j as g,k as w,l as T,m as E,n as x,o as M,p as k,q as D,r as P,s as V,t as A,u as B,v as H,w as N,x as O,y as I,z,A as F,G as U,H as K,I as W,J as j,L as q,M as G,N as L,O as J,P as Q,Q as X,U as Y,W as Z,X as _,Y as $,Z as aa,_ as ea,$ as sa,a0 as ta,a1 as oa,a2 as ra,a3 as na,a4 as ia,a5 as ca,a6 as la,a7 as da,a8 as pa,a9 as ba,aa as ma,ab as fa,ac as ua,ad as ha,ae as Sa,af as ya,ag as Ra,ah as va,ai as Ca,aj as ga,ak as wa,al as Ta,am as Ea,an as xa,ao as Ma,ap as ka,aq as Da,ar as Pa,as as Va,at as Aa,au as Ba,av as Ha,aw as Na,ax as Oa,ay as Ia,az as za,aA as Fa,aB as Ua,aC as Ka,aD as Wa,aE as ja,aF as qa,aG as Ga,aH as La,aI as Ja,aJ as Qa,aK as Xa,aL as Ya,aM as Za,aN as _a,aO as $a,aP as ae,aQ as ee,aR as se,aS as te,aT as oe,aU as re,aV as ne,aW as ie,aX as ce,aY as le,aZ as de,a_ as pe,a$ as be,b0 as me,b1 as fe,b2 as ue,b3 as he,b4 as Se,b5 as ye,b6 as Re,b7 as ve,b8 as Ce,b9 as ge,ba as we,bb as Te,bc as Ee,bd as xe,be as Me,bf as ke,bg as De,bh as Pe,bi as Ve,bj as Ae,bk as Be,bl as He,bm as Ne,bn as Oe,bo as Ie,bp as ze,bq as Fe,br as Ue,bs as Ke,bt as We,bu as je,bv as qe,bw as Ge,bx as Le,by as Je,bz as Qe,bA as Xe,bB as Ye,bC as Ze,bD as _e,bE as $e,bF as as,bG as es,bH as ss,bI as ts,bJ as os,bK as rs,bL as ns,bM as is,bN as cs,bO as ls,bP as ds}from"./index-_5lXYMaO.js";/** * vue v3.5.39 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT diff --git a/apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-CiqgclaU.js b/apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-9gU-F74d.js similarity index 99% rename from apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-CiqgclaU.js rename to apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-9gU-F74d.js index e1ebf7e55..eda6d1978 100644 --- a/apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-CiqgclaU.js +++ b/apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-9gU-F74d.js @@ -1,4 +1,4 @@ -import{p as St}from"./chunk-JWPE2WC7-CPYc1Q95.js";import{s as Mt,g as Nt,p as zt,o as Lt,a as Tt,b as At,_ as u,W as Xt,z as Et,B as U,l as K,F as Yt,e as It,q as Bt,c as j}from"./mermaid.core-DHQD1STq.js";import{p as Ft}from"./cynefin-VYW2F7L2-Cbq_W2rg.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";var D=u((e,n)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),J=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(St(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,F=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,F,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=J(r.fromPort)??J(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Ft("wardley",e);K.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),Bt()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:At,getAccTitle:Tt,setDiagramTitle:Lt,getDiagramTitle:zt,getAccDescription:Nt,setAccDescription:Mt},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{K.debug(`Rendering Wardley map +import{p as St}from"./chunk-JWPE2WC7-BtckK32c.js";import{s as Mt,g as Nt,p as zt,o as Lt,a as Tt,b as At,_ as u,W as Xt,z as Et,B as U,l as K,F as Yt,e as It,q as Bt,c as j}from"./mermaid.core-DpBz6UHc.js";import{p as Ft}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var D=u((e,n)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),J=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(St(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,F=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,F,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=J(r.fromPort)??J(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Ft("wardley",e);K.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),Bt()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:At,getAccTitle:Tt,setDiagramTitle:Lt,getDiagramTitle:zt,getAccDescription:Nt,setAccDescription:Mt},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{K.debug(`Rendering Wardley map `+e);const a=Ht(),d=qt(),w=a.nodeRadius*1.6,C=x.db,g=C.getWardleyData(),F=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,E=Yt(n);E.selectAll("*").remove(),It(E,b,S,a.useMaxWidth),E.attr("viewBox",`0 0 ${S} ${b}`);const v=E.append("g").attr("class","wardley-map"),G=E.append("defs");G.append("marker").attr("id",`arrow-${n}`).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("fill",d.evolutionStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-end-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-start-${n}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const Y=S-a.padding*2,I=b-a.padding*2;F&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(F);const z=u(t=>a.padding+t/100*Y,"projectX"),L=u(t=>b-a.padding-t/100*I,"projectY"),R=v.append("g").attr("class","wardley-axes");R.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),R.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const ut=g.axes.xLabel??"Evolution",wt=g.axes.yLabel??"Visibility";R.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+Y/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(ut),R.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+I/2})`).text(wt);const B=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:Gt;if(B.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,o=[];if(s&&s.length===B.length){let i=0;s.forEach(p=>{o.push({start:i,end:p}),i=p})}else{const i=1/B.length;B.forEach((p,l)=>{o.push({start:l*i,end:(l+1)*i})})}B.forEach((i,p)=>{const l=o[p],f=a.padding+l.start*Y,h=a.padding+l.end*Y,y=(f+h)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const o=s/4,i=a.padding+Y*o;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-I*o).attr("y2",b-a.padding-I*o).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:z(t.x),y:L(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(o=>{if(o.componentIds.length===0)return;const i=o.componentIds.map(h=>({id:h,pos:c.get(h),node:g.nodes.find(y=>y.id===h)})).filter(h=>h.pos&&h.node).sort((h,y)=>h.node.x-y.node.x);for(let h=0;h<i.length-1;h++){const y=i[h],m=i[h+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",m.pos.x).attr("y2",m.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(o.componentIds.forEach(h=>{const y=c.get(h);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(o.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const V=v.append("g").attr("class","wardley-links"),_=new Map;g.pipelines.forEach(t=>{_.set(t.nodeId,new Set(t.componentIds))});const Z=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||_.get(t.target)?.has(t.source)));V.selectAll("line").data(Z).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.x+l/h*p}).attr("y1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.y+f/h*p}).attr("x2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.x+l/h*p}).attr("y2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.y+f/h*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${n})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${n})`:null),V.selectAll("text").data(Z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=o.y-s.y,l=o.x-s.x,f=Math.sqrt(l*l+p*p),h=8,y=p/f;return i+y*h}).attr("y",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.y+o.y)/2,p=o.x-s.x,l=o.y-s.y,f=Math.sqrt(p*p+l*l),h=8,y=-p/f;return i+y*h}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=(s.y+o.y)/2,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f),y=8,m=f/h,P=-l/h,N=i+m*y,O=p+P*y;let X=Math.atan2(f,l)*180/Math.PI;return(X>90||X<-90)&&(X+=180),`rotate(${X} ${N} ${O})`}).text(t=>t.label);const mt=v.append("g").attr("class","wardley-trends"),kt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const o=z(t.targetX),i=L(t.targetY),p=o-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),h=a.nodeRadius+2,y=f>h?o-p/f*h:o,m=f>h?i-l/f*h:i;return{origin:s,targetX:o,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);mt.selectAll("line").data(kt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${n})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const q=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y1",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y-o/2}).attr("x2",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y2",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y+o/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let o=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(o+=10);const i=t.labelOffsetX??o;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let o=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(o-=10);const i=t.labelOffsetY??o;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const o=s.coordinates.map(i=>({x:z(i.x),y:L(i.y)}));if(o.length>1)for(let i=0;i<o.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",o[i].x).attr("y1",o[i].y).attr("x2",o[i+1].x).attr("y2",o[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");o.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=z(g.annotationsBox.x),o=L(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),h=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(h.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",o+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(H=>{const W=H.node(),Pt=W.getComputedTextLength();m=Math.max(m,Pt);const Ct=W.getBBox();P=Math.max(P,Ct.height)});const N=m+i*2+105,O=h.length*p+i*2+P/2,X=a.padding,bt=S-a.padding-N,$t=a.padding,vt=b-a.padding-O;s=Math.max(X,Math.min(s,bt)),o=Math.max($t,Math.min(o,vt)),y.forEach((H,W)=>{H.attr("x",s+i).attr("y",o+i+(W+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",o).attr("width",N).attr("height",O).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const o=z(s.x),i=L(s.y);t.append("text").attr("x",o).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const o=z(s.x),i=L(s.y),p=60,l=30,f=20,h=` M ${o} ${i-l/2} L ${o+p-f} ${i-l/2} diff --git a/apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-DvB4kNEE.js b/apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-BJN2UZpr.js similarity index 99% rename from apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-DvB4kNEE.js rename to apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-BJN2UZpr.js index ba39e88fd..17ca9dd8d 100644 --- a/apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-DvB4kNEE.js +++ b/apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-BJN2UZpr.js @@ -1,4 +1,4 @@ -import{s as si,g as ai,p as Et,o as ni,a as oi,b as ri,_ as n,l as It,F as hi,e as li,q as ci,z as pt,i as ui,B as Mt,D as gi,W as xi,az as di,a7 as Dt}from"./mermaid.core-DHQD1STq.js";import{i as fi}from"./init-Gi6I4Gst.js";import{o as pi}from"./ordinal-Cboi1Yqb.js";import{l as vt}from"./linear-DLrQx2aB.js";import"./index-CgXirkUy.js";import"./_commonjsHelpers-CqkleIqs.js";import"./defaultLocale-DX6XiGOO.js";function mi(t,i,e){t=+t,i=+i,e=(a=arguments.length)<2?(i=t,t=0,1):a<3?1:+e;for(var s=-1,a=Math.max(0,Math.ceil((i-t)/e))|0,c=new Array(a);++s<a;)c[s]=t+s*e;return c}function ut(){var t=pi().unknown(void 0),i=t.domain,e=t.range,s=0,a=1,c,l,f=!1,S=0,k=0,L=.5;delete t.unknown;function _(){var y=i().length,E=a<s,v=E?a:s,P=E?s:a;c=(P-v)/Math.max(1,y-S+k*2),f&&(c=Math.floor(c)),v+=(P-v-c*(y-S))*L,l=c*(1-S),f&&(v=Math.round(v),l=Math.round(l));var I=mi(y).map(function(p){return v+c*p});return e(E?I.reverse():I)}return t.domain=function(y){return arguments.length?(i(y),_()):i()},t.range=function(y){return arguments.length?([s,a]=y,s=+s,a=+a,_()):[s,a]},t.rangeRound=function(y){return[s,a]=y,s=+s,a=+a,f=!0,_()},t.bandwidth=function(){return l},t.step=function(){return c},t.round=function(y){return arguments.length?(f=!!y,_()):f},t.padding=function(y){return arguments.length?(S=Math.min(1,k=+y),_()):S},t.paddingInner=function(y){return arguments.length?(S=Math.min(1,y),_()):S},t.paddingOuter=function(y){return arguments.length?(k=+y,_()):k},t.align=function(y){return arguments.length?(L=Math.max(0,Math.min(1,y)),_()):L},t.copy=function(){return ut(i(),[s,a]).round(f).paddingInner(S).paddingOuter(k).align(L)},fi.apply(_(),arguments)}var gt=(function(){var t=n(function(F,r,u,g){for(u=u||{},g=F.length;g--;u[F[g]]=r);return u},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],c=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],S=[1,25],k=[1,26],L=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],P=[1,33],I=[1,34],p=[1,35],T=[1,36],h=[1,37],B=[1,43],W=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],b=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],A=[1,65],V=[26,28],R={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,u,g,x,w,o,K){var d=o.length-1;switch(w){case 5:x.setOrientation(o[d]);break;case 9:x.setDiagramTitle(o[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[d]);break;case 13:x.setLineData(o[d-1],o[d]);break;case 14:x.setBarData({text:"",type:"text"},o[d]);break;case 15:x.setBarData(o[d-1],o[d]);break;case 16:this.$=o[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[d-1];break;case 20:case 30:this.$=[o[d-2],...o[d]];break;case 21:case 31:this.$=[o[d]];break;case 22:this.$={value:Number(o[d-1]),label:o[d]};break;case 23:this.$={value:Number(o[d]),label:""};break;case 24:x.setXAxisTitle(o[d]);break;case 25:x.setXAxisTitle(o[d-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[d]);break;case 28:x.setXAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 29:this.$=o[d-1];break;case 32:x.setYAxisTitle(o[d]);break;case 33:x.setYAxisTitle(o[d-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 39:this.$={text:o[d],type:"text"};break;case 40:this.$={text:o[d],type:"text"};break;case 41:this.$={text:o[d],type:"markdown"};break;case 42:this.$=o[d];break;case 43:this.$=o[d-1]+""+o[d];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:c,38:l}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:c,38:l}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:c,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:c,38:l}),{1:[2,3]},t(f,[2,5]),t(i,[2,7],{4:22,36:a,37:c,38:l}),{11:23,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:39,13:38,24:B,29:W,30:S,31:40,32:41,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:45,15:44,29:X,30:S,35:46,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:49,17:48,24:Y,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:52,17:51,24:Y,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{20:[1,53]},{22:[1,54]},t(C,[2,18]),{1:[2,2]},t(C,[2,8]),t(C,[2,9]),t(H,[2,39],{41:55,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h}),t(H,[2,40]),t(H,[2,41]),t(b,[2,42]),t(b,[2,44]),t(b,[2,45]),t(b,[2,46]),t(b,[2,47]),t(b,[2,48]),t(b,[2,49]),t(b,[2,50]),t(b,[2,51]),t(b,[2,52]),t(b,[2,53]),t(C,[2,10]),t(C,[2,24],{32:41,31:56,24:B,29:W}),t(C,[2,26]),t(C,[2,27]),{33:[1,57]},{11:59,30:S,34:58,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},t(C,[2,11]),t(C,[2,32],{35:60,29:X}),t(C,[2,34]),{33:[1,61]},t(C,[2,12]),{17:62,24:Y},{25:63,27:64,29:A},t(C,[2,14]),{17:66,24:Y},t(C,[2,16]),t(C,[2,17]),t(b,[2,43]),t(C,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(C,[2,33]),{29:[1,70]},t(C,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(V,[2,23],{30:[1,73]}),t(C,[2,15]),t(C,[2,28]),t(C,[2,29]),{11:59,30:S,34:74,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},t(C,[2,35]),t(C,[2,19]),{25:75,27:64,29:A},t(V,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,u){if(u.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=u,g}},"parseError"),parse:n(function(r){var u=this,g=[0],x=[],w=[null],o=[],K=this.table,d="",et=0,Rt=0,Jt=2,_t=1,ti=o.slice.call(arguments,1),D=Object.create(this.lexer),U={yy:{}};for(var rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rt)&&(U.yy[rt]=this.yy[rt]);D.setInput(r,U.yy),U.yy.lexer=D,U.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ht=D.yylloc;o.push(ht);var ii=D.options&&D.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ei(z){g.length=g.length-2*z,w.length=w.length-z,o.length=o.length-z}n(ei,"popStack");function kt(){var z;return z=x.pop()||D.lex()||_t,typeof z!="number"&&(z instanceof Array&&(x=z,z=x.pop()),z=u.symbols_[z]||z),z}n(kt,"lex");for(var M,$,O,lt,G={},st,N,Tt,at;;){if($=g[g.length-1],this.defaultActions[$]?O=this.defaultActions[$]:((M===null||typeof M>"u")&&(M=kt()),O=K[$]&&K[$][M]),typeof O>"u"||!O.length||!O[0]){var ct="";at=[];for(st in K[$])this.terminals_[st]&&st>Jt&&at.push("'"+this.terminals_[st]+"'");D.showPosition?ct="Parse error on line "+(et+1)+`: +import{s as si,g as ai,p as Et,o as ni,a as oi,b as ri,_ as n,l as It,F as hi,e as li,q as ci,z as pt,i as ui,B as Mt,D as gi,W as xi,az as di,a7 as Dt}from"./mermaid.core-DpBz6UHc.js";import{i as fi}from"./init-Gi6I4Gst.js";import{o as pi}from"./ordinal-Cboi1Yqb.js";import{l as vt}from"./linear-BWc4ICs9.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";import"./defaultLocale-DX6XiGOO.js";function mi(t,i,e){t=+t,i=+i,e=(a=arguments.length)<2?(i=t,t=0,1):a<3?1:+e;for(var s=-1,a=Math.max(0,Math.ceil((i-t)/e))|0,c=new Array(a);++s<a;)c[s]=t+s*e;return c}function ut(){var t=pi().unknown(void 0),i=t.domain,e=t.range,s=0,a=1,c,l,f=!1,S=0,k=0,L=.5;delete t.unknown;function _(){var y=i().length,E=a<s,v=E?a:s,P=E?s:a;c=(P-v)/Math.max(1,y-S+k*2),f&&(c=Math.floor(c)),v+=(P-v-c*(y-S))*L,l=c*(1-S),f&&(v=Math.round(v),l=Math.round(l));var I=mi(y).map(function(p){return v+c*p});return e(E?I.reverse():I)}return t.domain=function(y){return arguments.length?(i(y),_()):i()},t.range=function(y){return arguments.length?([s,a]=y,s=+s,a=+a,_()):[s,a]},t.rangeRound=function(y){return[s,a]=y,s=+s,a=+a,f=!0,_()},t.bandwidth=function(){return l},t.step=function(){return c},t.round=function(y){return arguments.length?(f=!!y,_()):f},t.padding=function(y){return arguments.length?(S=Math.min(1,k=+y),_()):S},t.paddingInner=function(y){return arguments.length?(S=Math.min(1,y),_()):S},t.paddingOuter=function(y){return arguments.length?(k=+y,_()):k},t.align=function(y){return arguments.length?(L=Math.max(0,Math.min(1,y)),_()):L},t.copy=function(){return ut(i(),[s,a]).round(f).paddingInner(S).paddingOuter(k).align(L)},fi.apply(_(),arguments)}var gt=(function(){var t=n(function(F,r,u,g){for(u=u||{},g=F.length;g--;u[F[g]]=r);return u},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],c=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],S=[1,25],k=[1,26],L=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],P=[1,33],I=[1,34],p=[1,35],T=[1,36],h=[1,37],B=[1,43],W=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],b=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],A=[1,65],V=[26,28],R={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,u,g,x,w,o,K){var d=o.length-1;switch(w){case 5:x.setOrientation(o[d]);break;case 9:x.setDiagramTitle(o[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[d]);break;case 13:x.setLineData(o[d-1],o[d]);break;case 14:x.setBarData({text:"",type:"text"},o[d]);break;case 15:x.setBarData(o[d-1],o[d]);break;case 16:this.$=o[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[d-1];break;case 20:case 30:this.$=[o[d-2],...o[d]];break;case 21:case 31:this.$=[o[d]];break;case 22:this.$={value:Number(o[d-1]),label:o[d]};break;case 23:this.$={value:Number(o[d]),label:""};break;case 24:x.setXAxisTitle(o[d]);break;case 25:x.setXAxisTitle(o[d-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[d]);break;case 28:x.setXAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 29:this.$=o[d-1];break;case 32:x.setYAxisTitle(o[d]);break;case 33:x.setYAxisTitle(o[d-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 39:this.$={text:o[d],type:"text"};break;case 40:this.$={text:o[d],type:"text"};break;case 41:this.$={text:o[d],type:"markdown"};break;case 42:this.$=o[d];break;case 43:this.$=o[d-1]+""+o[d];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:c,38:l}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:c,38:l}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:c,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:c,38:l}),{1:[2,3]},t(f,[2,5]),t(i,[2,7],{4:22,36:a,37:c,38:l}),{11:23,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:39,13:38,24:B,29:W,30:S,31:40,32:41,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:45,15:44,29:X,30:S,35:46,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:49,17:48,24:Y,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:52,17:51,24:Y,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{20:[1,53]},{22:[1,54]},t(C,[2,18]),{1:[2,2]},t(C,[2,8]),t(C,[2,9]),t(H,[2,39],{41:55,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h}),t(H,[2,40]),t(H,[2,41]),t(b,[2,42]),t(b,[2,44]),t(b,[2,45]),t(b,[2,46]),t(b,[2,47]),t(b,[2,48]),t(b,[2,49]),t(b,[2,50]),t(b,[2,51]),t(b,[2,52]),t(b,[2,53]),t(C,[2,10]),t(C,[2,24],{32:41,31:56,24:B,29:W}),t(C,[2,26]),t(C,[2,27]),{33:[1,57]},{11:59,30:S,34:58,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},t(C,[2,11]),t(C,[2,32],{35:60,29:X}),t(C,[2,34]),{33:[1,61]},t(C,[2,12]),{17:62,24:Y},{25:63,27:64,29:A},t(C,[2,14]),{17:66,24:Y},t(C,[2,16]),t(C,[2,17]),t(b,[2,43]),t(C,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(C,[2,33]),{29:[1,70]},t(C,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(V,[2,23],{30:[1,73]}),t(C,[2,15]),t(C,[2,28]),t(C,[2,29]),{11:59,30:S,34:74,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},t(C,[2,35]),t(C,[2,19]),{25:75,27:64,29:A},t(V,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,u){if(u.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=u,g}},"parseError"),parse:n(function(r){var u=this,g=[0],x=[],w=[null],o=[],K=this.table,d="",et=0,Rt=0,Jt=2,_t=1,ti=o.slice.call(arguments,1),D=Object.create(this.lexer),U={yy:{}};for(var rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rt)&&(U.yy[rt]=this.yy[rt]);D.setInput(r,U.yy),U.yy.lexer=D,U.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ht=D.yylloc;o.push(ht);var ii=D.options&&D.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ei(z){g.length=g.length-2*z,w.length=w.length-z,o.length=o.length-z}n(ei,"popStack");function kt(){var z;return z=x.pop()||D.lex()||_t,typeof z!="number"&&(z instanceof Array&&(x=z,z=x.pop()),z=u.symbols_[z]||z),z}n(kt,"lex");for(var M,$,O,lt,G={},st,N,Tt,at;;){if($=g[g.length-1],this.defaultActions[$]?O=this.defaultActions[$]:((M===null||typeof M>"u")&&(M=kt()),O=K[$]&&K[$][M]),typeof O>"u"||!O.length||!O[0]){var ct="";at=[];for(st in K[$])this.terminals_[st]&&st>Jt&&at.push("'"+this.terminals_[st]+"'");D.showPosition?ct="Parse error on line "+(et+1)+`: `+D.showPosition()+` Expecting `+at.join(", ")+", got '"+(this.terminals_[M]||M)+"'":ct="Parse error on line "+(et+1)+": Unexpected "+(M==_t?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(ct,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:ht,expected:at})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+M);switch(O[0]){case 1:g.push(M),w.push(D.yytext),o.push(D.yylloc),g.push(O[1]),M=null,Rt=D.yyleng,d=D.yytext,et=D.yylineno,ht=D.yylloc;break;case 2:if(N=this.productions_[O[1]][1],G.$=w[w.length-N],G._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},ii&&(G._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),lt=this.performAction.apply(G,[d,Rt,et,U.yy,O[1],w,o].concat(ti)),typeof lt<"u")return lt;N&&(g=g.slice(0,-1*N*2),w=w.slice(0,-1*N),o=o.slice(0,-1*N)),g.push(this.productions_[O[1]][0]),w.push(G.$),o.push(G._$),Tt=K[g[g.length-2]][g[g.length-1]],g.push(Tt);break;case 3:return!0}}return!0},"parse")},Q=(function(){var F={EOF:1,parseError:n(function(u,g){if(this.yy.parser)this.yy.parser.parseError(u,g);else throw new Error(u)},"parseError"),setInput:n(function(r,u){return this.yy=u||this.yy||{},this._input=r,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:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var u=r.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var u=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var x=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),g.length-1&&(this.yylineno-=g.length-1);var w=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:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),u=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/index.html b/apps/kimi-code/dist-web/index.html index 7e6e7dc2b..e74c0c84e 100644 --- a/apps/kimi-code/dist-web/index.html +++ b/apps/kimi-code/dist-web/index.html @@ -14,8 +14,8 @@ the server's Content-Security-Policy forbids inline scripts. --> <script src="/boot.js"></script> <title>Kimi Code Web - - + +
diff --git a/apps/kimi-code/src/cli/sub/web/run.ts b/apps/kimi-code/src/cli/sub/web/run.ts index 3600cfe7b..279293744 100644 --- a/apps/kimi-code/src/cli/sub/web/run.ts +++ b/apps/kimi-code/src/cli/sub/web/run.ts @@ -149,6 +149,10 @@ export function buildWebCommand(cmd: Command): Command { 'Mount /api/v1/debug/* routes for test introspection. OFF by default; production callers leave this unset.', false, ) + .option( + '--web-title ', + 'Set a custom browser tab title for this web UI instance (default: "<workspace dir> | Kimi Code").', + ) .option('--no-open', 'Do not open the web UI in the default browser.', true) .action(async (opts: WebCliOptions) => { try { @@ -295,6 +299,7 @@ async function runServerInProcess( allowRemoteTerminals: options.allowRemoteTerminals, allowedHosts: options.allowedHosts, disableAuth: options.dangerousBypassAuth, + webTitle: options.webTitle, // Attach the engine's cloud telemetry appender (still gated by the config // `telemetry` toggle). Complements the v1 client registered above, which // only covers host-level events. diff --git a/apps/kimi-code/src/cli/sub/web/shared.ts b/apps/kimi-code/src/cli/sub/web/shared.ts index 79dfff7d4..a416d7e88 100644 --- a/apps/kimi-code/src/cli/sub/web/shared.ts +++ b/apps/kimi-code/src/cli/sub/web/shared.ts @@ -46,6 +46,8 @@ export interface ParsedServerOptions { dangerousBypassAuth: boolean; /** Extra `Host` header values to allow through the DNS-rebinding check. */ allowedHosts: readonly string[]; + /** Custom browser tab title for this web UI instance (`--web-title`). */ + webTitle?: string; } export interface ServerCliOptions { @@ -63,6 +65,8 @@ export interface ServerCliOptions { dangerousBypassAuth?: boolean; /** Extra `Host` header values to allow (`--allowed-host`). */ allowedHost?: string[]; + /** Custom browser tab title for this web UI instance (`--web-title`). */ + webTitle?: string; } export function parseServerOptions(opts: ServerCliOptions): ParsedServerOptions { @@ -76,6 +80,7 @@ export function parseServerOptions(opts: ServerCliOptions): ParsedServerOptions allowRemoteTerminals: opts.allowRemoteTerminals === true, dangerousBypassAuth: opts.dangerousBypassAuth === true, allowedHosts: parseAllowedHostArgs(opts.allowedHost), + webTitle: opts.webTitle, }; } diff --git a/apps/kimi-code/test/cli/web/web.test.ts b/apps/kimi-code/test/cli/web/web.test.ts index 1b51bfc53..e757866d8 100644 --- a/apps/kimi-code/test/cli/web/web.test.ts +++ b/apps/kimi-code/test/cli/web/web.test.ts @@ -103,6 +103,7 @@ describe('kimi web', () => { expect(longs).toContain('--dangerous-bypass-auth'); expect(longs).toContain('--log-level'); expect(longs).toContain('--debug-endpoints'); + expect(longs).toContain('--web-title'); // web opens the browser by default → the option is the negative --no-open. expect(longs).toContain('--no-open'); // The background/daemon era flags are gone: the server always runs in the @@ -470,6 +471,32 @@ describe('`kimi web` option threading', () => { expect(calls.options).toMatchObject({ logLevel: 'debug' }); }); + it('passes --web-title through to the runner', async () => { + const { handleWebCommand } = await import('#/cli/sub/web/run'); + const { runner, calls } = makeRunner(); + const { stdout, stderr } = makeIo(); + + await handleWebCommand( + { port: '58627', webTitle: 'My Dev Box', open: false }, + { startServerForeground: runner, openUrl: vi.fn(), stdout, stderr }, + ); + + expect(calls.options).toMatchObject({ webTitle: 'My Dev Box' }); + }); + + it('leaves webTitle undefined when --web-title is not passed', async () => { + const { handleWebCommand } = await import('#/cli/sub/web/run'); + const { runner, calls } = makeRunner(); + const { stdout, stderr } = makeIo(); + + await handleWebCommand( + { port: '58627', open: false }, + { startServerForeground: runner, openUrl: vi.fn(), stdout, stderr }, + ); + + expect(calls.options?.webTitle).toBeUndefined(); + }); + it('rejects an invalid --log-level before calling the runner', async () => { const { handleWebCommand } = await import('#/cli/sub/web/run'); const startServerForeground = vi.fn(async () => undefined as never); diff --git a/packages/kap-server/src/protocol/rest-meta.ts b/packages/kap-server/src/protocol/rest-meta.ts index 1dda5f3aa..cf6d27e4c 100644 --- a/packages/kap-server/src/protocol/rest-meta.ts +++ b/packages/kap-server/src/protocol/rest-meta.ts @@ -50,6 +50,13 @@ export const metaResponseSchema = z.object({ * probing routes. */ backend: z.enum(['v1', 'v2']).optional(), + /** + * Custom browser tab title for this instance, set by the host at boot + * (the CLI's `--web-title`). Instance-level and frozen at registration — + * never changes for the life of the process. Absent when unset: the web UI + * then falls back to `<workspace dir> | Kimi Code`. + */ + web_title: z.string().optional(), }); export type MetaResponse = z.infer<typeof metaResponseSchema>; diff --git a/packages/kap-server/src/routes/meta.ts b/packages/kap-server/src/routes/meta.ts index 932cbd231..b7dfe414a 100644 --- a/packages/kap-server/src/routes/meta.ts +++ b/packages/kap-server/src/routes/meta.ts @@ -42,6 +42,12 @@ export interface MetaRouteOptions { * the web UI can skip the token prompt and connect without a credential. */ readonly dangerousBypassAuth: boolean; + /** + * Custom browser tab title for this instance (the CLI's `--web-title`). + * Surfaced as `web_title` in the `/meta` payload; instance-level and frozen + * at boot, so it joins the frozen static fields. Omitted when unset. + */ + readonly webTitle?: string; /** * Resolves the effective experimental-flag map (flag id → enabled) at * request time. Backed by `IFlagService.snapshot()` in production; tests may @@ -67,6 +73,7 @@ export function registerMetaRoute(app: RouteHost, opts: MetaRouteOptions): void open_in_apps: [], dangerous_bypass_auth: opts.dangerousBypassAuth, backend: 'v2' as const, + web_title: opts.webTitle, }); const route = defineRoute( diff --git a/packages/kap-server/src/routes/registerApiV1Routes.ts b/packages/kap-server/src/routes/registerApiV1Routes.ts index 1cd286b30..63f80df3a 100644 --- a/packages/kap-server/src/routes/registerApiV1Routes.ts +++ b/packages/kap-server/src/routes/registerApiV1Routes.ts @@ -90,6 +90,12 @@ export interface RegisterApiV1RoutesOptions { * flag). */ readonly dangerousBypassAuth?: boolean; + /** + * Custom browser tab title for this instance, surfaced as `web_title` in the + * `/meta` payload. Set by `start.ts` from the `webTitle` server option (the + * CLI's `--web-title` flag). + */ + readonly webTitle?: string; } export async function registerApiV1Routes( @@ -112,6 +118,7 @@ export async function registerApiV1Routes( serverId: ulid(), startedAt: new Date().toISOString(), dangerousBypassAuth: opts.dangerousBypassAuth === true, + webTitle: opts.webTitle, getExperimentalFlags: async () => { // Same edge-facade contract as the config route: never project // config-derived state before the initial load settles — an early diff --git a/packages/kap-server/src/start.ts b/packages/kap-server/src/start.ts index 5778cb165..c931e351a 100644 --- a/packages/kap-server/src/start.ts +++ b/packages/kap-server/src/start.ts @@ -135,6 +135,13 @@ export interface ServerStartOptions { readonly allowRemoteTerminals?: boolean; readonly authTokenService?: IAuthTokenService; readonly disableAuth?: boolean; + /** + * Custom browser tab title for this web UI instance (the CLI's + * `--web-title`). Surfaced as `web_title` in `GET /api/v1/meta` so the web + * UI can distinguish multiple instances on different machines. Instance-level + * and frozen at boot; omit to let the UI fall back to `<workspace dir> | Kimi Code`. + */ + readonly webTitle?: string; /** * Optional *additional* credential accepted on the RPC surface (debug REST + * WebSocket) alongside the persistent bearer token. Never required and never @@ -550,6 +557,7 @@ export async function startServer(opts: ServerStartOptions): Promise<RunningServ broadcaster, transcriptService, dangerousBypassAuth: opts.disableAuth === true, + webTitle: opts.webTitle, }); // `/api/v2` — same envelope conventions as v1, domain-grouped payloads. diff --git a/packages/kap-server/test/meta.test.ts b/packages/kap-server/test/meta.test.ts index 948ee16ab..761a87908 100644 --- a/packages/kap-server/test/meta.test.ts +++ b/packages/kap-server/test/meta.test.ts @@ -124,3 +124,49 @@ describe('/api/v1/meta experimental_flags', () => { expect((await getMetaFlags(base))['tool-select']).toBe(true); }); }); + +describe('/api/v1/meta web_title', () => { + let server: RunningServer | undefined; + let home: string | undefined; + + afterEach(async () => { + if (server !== undefined) { + await server.close(); + server = undefined; + } + if (home !== undefined) { + await rm(home, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 }); + home = undefined; + } + }); + + async function bootWithWebTitle( + webTitle?: string, + ): Promise<{ base: string; body: { data: { web_title?: string } } }> { + home = await mkdtemp(join(tmpdir(), 'kimi-server-v2-meta-title-')); + server = await startServer({ + hostIdentity: TEST_HOST_IDENTITY, + host: '127.0.0.1', + port: 0, + homeDir: home, + logLevel: 'silent', + webTitle, + }); + const base = `http://127.0.0.1:${server.port}`; + const res = await authedFetch(server, base, '/api/v1/meta'); + expect(res.status).toBe(200); + const body = (await res.json()) as { code: number; data: { web_title?: string } }; + expect(body.code).toBe(0); + return { base, body }; + } + + it('surfaces the boot-time webTitle as web_title', async () => { + const { body } = await bootWithWebTitle('My Dev Box'); + expect(body.data.web_title).toBe('My Dev Box'); + }); + + it('omits web_title when no webTitle was passed', async () => { + const { body } = await bootWithWebTitle(); + expect(body.data.web_title).toBeUndefined(); + }); +});