@puddle-code/cli 0.4.16 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -15
- package/dist/host-control.mjs +419 -3
- package/dist/index.js +442 -6
- package/dist/public/assets/App-ESs-lBsA.js +49 -0
- package/dist/public/assets/CompilationCommandForm-D7uBn2um.js +1 -0
- package/dist/public/assets/Dashboard-DWwOy6bQ.js +1 -0
- package/dist/public/assets/DraftRecovery-DO-ymSIW.js +1 -0
- package/dist/public/assets/EditorTabClose-DEizui0i.js +1 -0
- package/dist/public/assets/FileCloseScope-DKbSgHF2.js +1 -0
- package/dist/public/assets/FileEditorSettingsMenu-DnMJu5pC.js +1 -0
- package/dist/public/assets/LazyTerminal-B0GmOiTE.js +2 -0
- package/dist/public/assets/{ModelRefcount-BeuZdwWp.js → ModelRefcount-DBzR9UEq.js} +1 -1
- package/dist/public/assets/NotebookWidget-DlpLANDa.js +7 -0
- package/dist/public/assets/{PaneEditorBody-DPgmBaUE.js → PaneEditorBody-DRZ6NrJ1.js} +19 -19
- package/dist/public/assets/PdfViewer-B3z9sh0x.js +2 -0
- package/dist/public/assets/Ripple-C8HPFMGB.css +1 -0
- package/dist/public/assets/Ripple-CLkhZZWa.js +11 -0
- package/dist/public/assets/SettingsDialog-DBUHpb9S.js +8 -0
- package/dist/public/assets/Terminal-C3TQK74f.js +65 -0
- package/dist/public/assets/Workspace-CiATCR9s.css +1 -0
- package/dist/public/assets/Workspace-D_NxUGYW.js +20 -0
- package/dist/public/assets/api--n1Ha6tG.js +1 -0
- package/dist/public/assets/auth-eu0vmKkB.js +1 -0
- package/dist/public/assets/buffer-store-CBhXNRZm.js +1 -0
- package/dist/public/assets/chevron-right-DUkOv15w.js +1 -0
- package/dist/public/assets/command-BeX8pm7h.js +1 -0
- package/dist/public/assets/content-state-BDt3NnGs.js +1 -0
- package/dist/public/assets/context-BRrQlmgI.js +1 -0
- package/dist/public/assets/{cssMode-C63oO3vc.js → cssMode-BSxvHUeX.js} +1 -1
- package/dist/public/assets/{dist-DjnLfB6V.js → dist-BcrNV8NP.js} +1 -1
- package/dist/public/assets/dist-NuV8HBEc.js +1 -0
- package/dist/public/assets/{drafts-B_tChlzR.js → drafts-CCenbr5J.js} +1 -1
- package/dist/public/assets/editor-links-qwyINDCv.js +1 -0
- package/dist/public/assets/editor-sync-C5CgYn_q.js +1 -0
- package/dist/public/assets/{editor.api2-DTL_SiN1.js → editor.api2-Cyagyq8b.js} +1 -1
- package/dist/public/assets/{errors-efDAjyqa.js → errors-DWF9D4n6.js} +1 -1
- package/dist/public/assets/expanding-content-BUkS1Qk4.js +1 -0
- package/dist/public/assets/file-editor-settings-1cj6VRxs.js +1 -0
- package/dist/public/assets/{file-links-BEG4YRgY.js → file-links-BEPA2kg5.js} +1 -1
- package/dist/public/assets/forward-link-CcmVXHkx.js +1 -0
- package/dist/public/assets/{freemarker2-DKWtaCtp.js → freemarker2-RlVF_xG6.js} +1 -1
- package/dist/public/assets/{handlebars-uU1ujPOt.js → handlebars-2p1QNu5W.js} +1 -1
- package/dist/public/assets/{html-CrP_wDJ5.js → html-BOC2G_CE.js} +1 -1
- package/dist/public/assets/{htmlMode-lNJ18wA0.js → htmlMode-933MVCdH.js} +1 -1
- package/dist/public/assets/index-Botodnry.js +10 -0
- package/dist/public/assets/index-rjm6DMrz.css +2 -0
- package/dist/public/assets/{javascript-WHxEzdgn.js → javascript-C77bzTLL.js} +1 -1
- package/dist/public/assets/{jsonMode-xHnT5kRj.js → jsonMode-Cvtq6-nG.js} +1 -1
- package/dist/public/assets/languages-O6mK4sJI.js +16 -0
- package/dist/public/assets/{liquid-B1ddyofJ.js → liquid-CTjKJxys.js} +1 -1
- package/dist/public/assets/local-store-8IcyY3pd.js +64 -0
- package/dist/public/assets/{lspLanguageFeatures-CCO_e4_t.js → lspLanguageFeatures-DJLTbYTu.js} +1 -1
- package/dist/public/assets/{mdx-m1X3FtyX.js → mdx-CCh44hnn.js} +1 -1
- package/dist/public/assets/{monaco.contribution-BXkMDWX9.js → monaco.contribution-DOhsxmke.js} +2 -2
- package/dist/public/assets/notification-delivery-CWj1p0u-.js +1 -0
- package/dist/public/assets/{popover-CUC3fMrJ.js → popover-Okyclsx8.js} +1 -1
- package/dist/public/assets/preferences-Dy_61zsm.js +1 -0
- package/dist/public/assets/preview-kind-CJ9RTgbs.js +1 -0
- package/dist/public/assets/profile-store-CarO9MCP.js +2 -0
- package/dist/public/assets/project-actions-Zt9oqLe5.js +1 -0
- package/dist/public/assets/project-drag-Bqy-V-45.js +1 -0
- package/dist/public/assets/protocol-support-BUdL5Q-x.js +1 -0
- package/dist/public/assets/{python-CRTN4ovU.js → python-mu5lS7bI.js} +1 -1
- package/dist/public/assets/queries-DnuokC1N.js +1 -0
- package/dist/public/assets/{razor-Cj7Cr6Fr.js → razor-ChcAhcMd.js} +1 -1
- package/dist/public/assets/render-rich-content-BULX1bwr.js +4 -0
- package/dist/public/assets/scroll-restoration-Bl3jxJsC.js +1 -0
- package/dist/public/assets/search-Ct_rLLa4.js +1 -0
- package/dist/public/assets/select-DzQdQNsv.js +1 -0
- package/dist/public/assets/selection-actions-BSqrsD_7.js +1 -0
- package/dist/public/assets/session-order-CCDTBSiH.js +1 -0
- package/dist/public/assets/settings-2-CInoy48z.js +1 -0
- package/dist/public/assets/switch-BsUkvj8j.js +1 -0
- package/dist/public/assets/trash-2-DQeNROsF.js +1 -0
- package/dist/public/assets/{tsMode-D0nEO9DL.js → tsMode-B7nLznL7.js} +1 -1
- package/dist/public/assets/{typescript-CQjjq4UE.js → typescript-DmvD4smm.js} +1 -1
- package/dist/public/assets/use-arrangement-ready-D18CpR8E.js +1 -0
- package/dist/public/assets/use-desktop-state-Dw9EfOjg.js +2 -0
- package/dist/public/assets/view-state-store-CY9DI6-i.js +1 -0
- package/dist/public/assets/{workers-m2qsiPbB.js → workers-CqunsJhE.js} +1 -1
- package/dist/public/assets/ws-DH0dKRnO.js +1 -0
- package/dist/public/assets/{xml-Ci2P6_gm.js → xml-CX8dI9sv.js} +1 -1
- package/dist/public/assets/{yaml-76T3bIWj.js → yaml-DbxzTbJh.js} +1 -1
- package/dist/public/index.html +5 -3
- package/dist/public/puddle-app.png +0 -0
- package/dist/public/puddle.svg +6 -5
- package/dist/pudl.js +419 -3
- package/package.json +1 -1
- package/dist/public/assets/App-D2NIub0q.js +0 -25
- package/dist/public/assets/CompilationCommandForm-0dW_hRVe.js +0 -1
- package/dist/public/assets/Dashboard-CS0vtM4u.js +0 -1
- package/dist/public/assets/EditorTabClose-Ctgsk3yN.js +0 -1
- package/dist/public/assets/LazyTerminal-DHusHr-B.js +0 -2
- package/dist/public/assets/NotebookWidget-CH5zoEVV.js +0 -7
- package/dist/public/assets/PdfViewer-DhzjgqhY.js +0 -2
- package/dist/public/assets/Ripple-CPTxioAz.css +0 -1
- package/dist/public/assets/Ripple-Dr6j05W2.js +0 -11
- package/dist/public/assets/SettingsDialog-BvPZONxi.js +0 -8
- package/dist/public/assets/Terminal-VQUxoYa8.js +0 -65
- package/dist/public/assets/Workspace-CuAYZ1-B.css +0 -1
- package/dist/public/assets/Workspace-DtnFFmCw.js +0 -20
- package/dist/public/assets/api-CULxlzTe.js +0 -1
- package/dist/public/assets/archive-BYp06n6i.js +0 -1
- package/dist/public/assets/auth-C3ruG3fE.js +0 -64
- package/dist/public/assets/buffer-store-Bh2IilxW.js +0 -16
- package/dist/public/assets/command-CymPHY02.js +0 -1
- package/dist/public/assets/context-D1MuDP6X.js +0 -1
- package/dist/public/assets/dist-BS4thlzc.js +0 -1
- package/dist/public/assets/dist-D_h3lAbU.js +0 -1
- package/dist/public/assets/editor-sync-W1bamxAP.js +0 -1
- package/dist/public/assets/expanding-content-mbqCROSn.js +0 -1
- package/dist/public/assets/forward-link-BfAPpjGN.js +0 -1
- package/dist/public/assets/index-8ZeniHH1.js +0 -10
- package/dist/public/assets/index-D_XpA70m.css +0 -2
- package/dist/public/assets/media-refresh-store-D36KU0BQ.js +0 -1
- package/dist/public/assets/notification-delivery-CaDNuszd.js +0 -1
- package/dist/public/assets/preferences-Dbd4UMkr.js +0 -1
- package/dist/public/assets/preview-kind-DiWpvEc0.js +0 -1
- package/dist/public/assets/protocol-support-BwRR1kRO.js +0 -1
- package/dist/public/assets/render-rich-content-DmnxTNBP.js +0 -4
- package/dist/public/assets/scroll-restoration-wdDB8mmu.js +0 -1
- package/dist/public/assets/select-BWD4Eh-G.js +0 -1
- package/dist/public/assets/selection-actions-Dih9eZsN.js +0 -1
- package/dist/public/assets/session-order-D4IUSoRp.js +0 -1
- package/dist/public/assets/switch-Dz9pPRp-.js +0 -1
- package/dist/public/assets/use-ui-state-Cp6TbkHi.js +0 -1
- package/dist/public/assets/view-state-store-DVvLMbeY.js +0 -1
- package/dist/public/assets/ws-DjQ6OZLM.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{C as n}from"./protocol-support-BUdL5Q-x.js";import{A as r,M as i,at as a,ct as o,j as s,lt as c,nt as l,ot as u,r as d}from"./local-store-8IcyY3pd.js";import{a as f,c as p,o as m,p as h,s as ee,t as g}from"./LazyTerminal-B0GmOiTE.js";import{n as _,o as v,r as y,s as b}from"./theme-swfNLod9.js";import{t as x}from"./jsx-runtime-By8HlURe.js";import{i as S,n as C,t as te}from"./api--n1Ha6tG.js";import{i as ne,l as w}from"./profile-store-CarO9MCP.js";import{St as re,V as ie,it as T,k as ae,mt as oe,r as se,rt as ce,st as E}from"./queries-DnuokC1N.js";import{t as le}from"./utils-B6KiDbIe.js";import{i as ue,o as de,r as fe,s as pe,t as me}from"./dialog-CTN-Lln6.js";import{t as D}from"./createLucideIcon-DyMAgLa3.js";import{c as he,d as ge,s as _e,u as ve}from"./switch-BsUkvj8j.js";import{t as ye}from"./ws-DH0dKRnO.js";function be(e,t){return`[${h(t)}] ${e}`.slice(0,160)}function xe(e){return e}var O=e(t(),1);function Se(e,t){let n=E(t);return Ce({filters:{...e,status:`pending`}},n).length}function k(e,t){return e.findAll(t.filters).map(e=>t.select?t.select(e):e.state)}function Ce(e={},t){let n=E(t).getMutationCache(),r=O.useRef(e),i=O.useRef(null);return i.current===null&&(i.current=k(n,e)),O.useEffect(()=>{r.current=e}),O.useSyncExternalStore(O.useCallback(e=>n.subscribe(()=>{let t=re(i.current,k(n,r.current));i.current!==t&&(i.current=t,oe.schedule(e))}),[n]),()=>i.current,()=>i.current)}var we=D(`alarm-clock`,[[`circle`,{cx:`12`,cy:`13`,r:`8`,key:`3y4lt7`}],[`path`,{d:`M12 9v4l2 2`,key:`1c63tq`}],[`path`,{d:`M5 3 2 6`,key:`18tl5t`}],[`path`,{d:`m22 6-3-3`,key:`1opdir`}],[`path`,{d:`M6.38 18.7 4 21`,key:`17xu3x`}],[`path`,{d:`M17.64 18.67 20 21`,key:`kv2oe2`}]]),Te=D(`amphora`,[[`path`,{d:`M10 2v5.632c0 .424-.272.795-.653.982A6 6 0 0 0 6 14c.006 4 3 7 5 8`,key:`1h8rid`}],[`path`,{d:`M10 5H8a2 2 0 0 0 0 4h.68`,key:`3ezsi6`}],[`path`,{d:`M14 2v5.632c0 .424.272.795.652.982A6 6 0 0 1 18 14c0 4-3 7-5 8`,key:`yt6q09`}],[`path`,{d:`M14 5h2a2 2 0 0 1 0 4h-.68`,key:`8f95yk`}],[`path`,{d:`M18 22H6`,key:`mg6kv4`}],[`path`,{d:`M9 2h6`,key:`1jrp98`}]]),Ee=D(`anchor`,[[`path`,{d:`M12 6v16`,key:`nqf5sj`}],[`path`,{d:`m19 13 2-1a9 9 0 0 1-18 0l2 1`,key:`y7qv08`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}]]),De=D(`anvil`,[[`path`,{d:`M7 10H6a4 4 0 0 1-4-4 1 1 0 0 1 1-1h4`,key:`1hjpb6`}],[`path`,{d:`M7 5a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1 7 7 0 0 1-7 7H8a1 1 0 0 1-1-1z`,key:`1qn45f`}],[`path`,{d:`M9 12v5`,key:`3anwtq`}],[`path`,{d:`M15 12v5`,key:`5xh3zn`}],[`path`,{d:`M5 20a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3 1 1 0 0 1-1 1H6a1 1 0 0 1-1-1`,key:`1fi4x8`}]]),Oe=D(`apple`,[[`path`,{d:`M12 6.528V3a1 1 0 0 1 1-1h0`,key:`11qiee`}],[`path`,{d:`M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21`,key:`110c12`}]]),ke=D(`armchair`,[[`path`,{d:`M19 9V6a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v3`,key:`irtipd`}],[`path`,{d:`M3 16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5a2 2 0 0 0-4 0v1.5a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5V11a2 2 0 0 0-4 0z`,key:`1qyhux`}],[`path`,{d:`M5 18v2`,key:`ppbyun`}],[`path`,{d:`M19 18v2`,key:`gy7782`}]]),Ae=D(`axe`,[[`path`,{d:`m14 12-8.381 8.38a1 1 0 0 1-3.001-3L11 9`,key:`5z9253`}],[`path`,{d:`M15 15.5a.5.5 0 0 0 .5.5A6.5 6.5 0 0 0 22 9.5a.5.5 0 0 0-.5-.5h-1.672a2 2 0 0 1-1.414-.586l-5.062-5.062a1.205 1.205 0 0 0-1.704 0L9.352 5.648a1.205 1.205 0 0 0 0 1.704l5.062 5.062A2 2 0 0 1 15 13.828z`,key:`19zklq`}]]),je=D(`banana`,[[`path`,{d:`M4 13c3.5-2 8-2 10 2a5.5 5.5 0 0 1 8 5`,key:`1cscit`}],[`path`,{d:`M5.15 17.89c5.52-1.52 8.65-6.89 7-12C11.55 4 11.5 2 13 2c3.22 0 5 5.5 5 8 0 6.5-4.2 12-10.49 12C5.11 22 2 22 2 20c0-1.5 1.14-1.55 3.15-2.11Z`,key:`1y1nbv`}]]),Me=D(`bath`,[[`path`,{d:`M10 4 8 6`,key:`1rru8s`}],[`path`,{d:`M17 19v2`,key:`ts1sot`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}],[`path`,{d:`M7 19v2`,key:`12npes`}],[`path`,{d:`M9 5 7.621 3.621A2.121 2.121 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5`,key:`14ym8i`}]]),Ne=D(`beef`,[[`path`,{d:`M16.4 13.7A6.5 6.5 0 1 0 6.28 6.6c-1.1 3.13-.78 3.9-3.18 6.08A3 3 0 0 0 5 18c4 0 8.4-1.8 11.4-4.3`,key:`cisjcv`}],[`path`,{d:`m18.5 6 2.19 4.5a6.48 6.48 0 0 1-2.29 7.2C15.4 20.2 11 22 7 22a3 3 0 0 1-2.68-1.66L2.4 16.5`,key:`5byaag`}],[`circle`,{cx:`12.5`,cy:`8.5`,r:`2.5`,key:`9738u8`}]]),Pe=D(`beer`,[[`path`,{d:`M17 11h1a3 3 0 0 1 0 6h-1`,key:`1yp76v`}],[`path`,{d:`M9 12v6`,key:`1u1cab`}],[`path`,{d:`M13 12v6`,key:`1sugkk`}],[`path`,{d:`M14 7.5c-1 0-1.44.5-3 .5s-2-.5-3-.5-1.72.5-2.5.5a2.5 2.5 0 0 1 0-5c.78 0 1.57.5 2.5.5S9.44 2 11 2s2 1.5 3 1.5 1.72-.5 2.5-.5a2.5 2.5 0 0 1 0 5c-.78 0-1.5-.5-2.5-.5Z`,key:`1510fo`}],[`path`,{d:`M5 8v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`,key:`19jb7n`}]]),Fe=D(`biceps-flexed`,[[`path`,{d:`M12.409 13.017A5 5 0 0 1 22 15c0 3.866-4 7-9 7-4.077 0-8.153-.82-10.371-2.462-.426-.316-.631-.832-.62-1.362C2.118 12.723 2.627 2 10 2a3 3 0 0 1 3 3 2 2 0 0 1-2 2c-1.105 0-1.64-.444-2-1`,key:`1pmlyh`}],[`path`,{d:`M15 14a5 5 0 0 0-7.584 2`,key:`5rb254`}],[`path`,{d:`M9.964 6.825C8.019 7.977 9.5 13 8 15`,key:`kbvsx9`}]]),Ie=D(`bike`,[[`circle`,{cx:`18.5`,cy:`17.5`,r:`3.5`,key:`15x4ox`}],[`circle`,{cx:`5.5`,cy:`17.5`,r:`3.5`,key:`1noe27`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`path`,{d:`M12 17.5V14l-3-3 4-3 2 3h2`,key:`1npguv`}]]),Le=D(`bird`,[[`path`,{d:`M16 7h.01`,key:`1kdx03`}],[`path`,{d:`M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20`,key:`oj1oa8`}],[`path`,{d:`m20 7 2 .5-2 .5`,key:`12nv4d`}],[`path`,{d:`M10 18v3`,key:`1yea0a`}],[`path`,{d:`M14 17.75V21`,key:`1pymcb`}],[`path`,{d:`M7 18a6 6 0 0 0 3.84-10.61`,key:`1npnn0`}]]),Re=D(`bone`,[[`path`,{d:`M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5Z`,key:`w610uw`}]]),ze=D(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Be=D(`book`,[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),Ve=D(`boom-box`,[[`path`,{d:`M4 9V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4`,key:`vvzvr1`}],[`path`,{d:`M8 8v1`,key:`xcqmfk`}],[`path`,{d:`M12 8v1`,key:`1rj8u4`}],[`path`,{d:`M16 8v1`,key:`1q12zr`}],[`rect`,{width:`20`,height:`12`,x:`2`,y:`9`,rx:`2`,key:`igpb89`}],[`circle`,{cx:`8`,cy:`15`,r:`2`,key:`fa4a8s`}],[`circle`,{cx:`16`,cy:`15`,r:`2`,key:`14c3ya`}]]),He=D(`briefcase-business`,[[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2`,key:`1ksdt3`}],[`path`,{d:`M22 13a18.15 18.15 0 0 1-20 0`,key:`12hx5q`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]),Ue=D(`brush`,[[`path`,{d:`m11 10 3 3`,key:`fzmg1i`}],[`path`,{d:`M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z`,key:`p4q2r7`}],[`path`,{d:`M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031`,key:`wy6l02`}]]),We=D(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),Ge=D(`cake`,[[`path`,{d:`M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8`,key:`1w3rig`}],[`path`,{d:`M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1`,key:`n2jgmb`}],[`path`,{d:`M2 21h20`,key:`1nyx9w`}],[`path`,{d:`M7 8v3`,key:`1qtyvj`}],[`path`,{d:`M12 8v3`,key:`hwp4zt`}],[`path`,{d:`M17 8v3`,key:`1i6e5u`}],[`path`,{d:`M7 4h.01`,key:`1bh4kh`}],[`path`,{d:`M12 4h.01`,key:`1ujb9j`}],[`path`,{d:`M17 4h.01`,key:`1upcoc`}]]),Ke=D(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),qe=D(`candy-cane`,[[`path`,{d:`m10.8 5 2.111 4.223`,key:`11kb8w`}],[`path`,{d:`M17.75 7 15 2.1`,key:`12x7e8`}],[`path`,{d:`m4.874 14.647 2.12 4.24`,key:`ccpt4b`}],[`path`,{d:`M5.7 21a2 2 0 0 1-3.5-2l8.6-14a6 6 0 0 1 10.4 6 2 2 0 1 1-3.464-2 2 2 0 1 0-3.464-2z`,key:`u5e8z4`}],[`path`,{d:`m7.906 9.712 2.005 4.411`,key:`1k0qph`}]]),Je=D(`candy`,[[`path`,{d:`M10 7v10.9`,key:`1gynux`}],[`path`,{d:`M14 6.1V17`,key:`116kdf`}],[`path`,{d:`M16 7V3a1 1 0 0 1 1.707-.707 2.5 2.5 0 0 0 2.152.717 1 1 0 0 1 1.131 1.131 2.5 2.5 0 0 0 .717 2.152A1 1 0 0 1 21 8h-4`,key:`gpb6xx`}],[`path`,{d:`M16.536 7.465a5 5 0 0 0-7.072 0l-2 2a5 5 0 0 0 0 7.07 5 5 0 0 0 7.072 0l2-2a5 5 0 0 0 0-7.07`,key:`1tsln4`}],[`path`,{d:`M8 17v4a1 1 0 0 1-1.707.707 2.5 2.5 0 0 0-2.152-.717 1 1 0 0 1-1.131-1.131 2.5 2.5 0 0 0-.717-2.152A1 1 0 0 1 3 16h4`,key:`qexcha`}]]),Ye=D(`car`,[[`path`,{d:`M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2`,key:`5owen`}],[`circle`,{cx:`7`,cy:`17`,r:`2`,key:`u2ysq9`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}],[`circle`,{cx:`17`,cy:`17`,r:`2`,key:`axvx0g`}]]),Xe=D(`carrot`,[[`path`,{d:`M15 16a1 1 0 0 0-7-7q-4 4-5.987 12.385a.5.5 0 0 0 .602.602Q11 20 15 16l-3-3`,key:`1ta62j`}],[`path`,{d:`M15 9q4 4 7 0-3-4-7 0 4-4 0-7-4 3 0 7`,key:`1svf7i`}],[`path`,{d:`m8 15-2.58-2.58`,key:`7t238r`}]]),Ze=D(`cat`,[[`path`,{d:`M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z`,key:`x6xyqk`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M11.25 16.25h1.5L12 17l-.75-.75Z`,key:`12kq1m`}]]),Qe=D(`chef-hat`,[[`path`,{d:`M17 21a1 1 0 0 0 1-1v-5.35c0-.457.316-.844.727-1.041a4 4 0 0 0-2.134-7.589 5 5 0 0 0-9.186 0 4 4 0 0 0-2.134 7.588c.411.198.727.585.727 1.041V20a1 1 0 0 0 1 1Z`,key:`1qvrer`}],[`path`,{d:`M6 17h12`,key:`1jwigz`}]]),$e=D(`cherry`,[[`path`,{d:`M2 17a5 5 0 0 0 10 0c0-2.76-2.5-5-5-3-2.5-2-5 .24-5 3Z`,key:`cvxqlc`}],[`path`,{d:`M12 17a5 5 0 0 0 10 0c0-2.76-2.5-5-5-3-2.5-2-5 .24-5 3Z`,key:`1ostrc`}],[`path`,{d:`M7 14c3.22-2.91 4.29-8.75 5-12 1.66 2.38 4.94 9 5 12`,key:`hqx58h`}],[`path`,{d:`M22 9c-4.29 0-7.14-2.33-10-7 5.71 0 10 4.67 10 7Z`,key:`eykp1o`}]]),et=D(`citrus`,[[`path`,{d:`M21.66 17.67a1.08 1.08 0 0 1-.04 1.6A12 12 0 0 1 4.73 2.38a1.1 1.1 0 0 1 1.61-.04z`,key:`4ite01`}],[`path`,{d:`M19.65 15.66A8 8 0 0 1 8.35 4.34`,key:`1gxipu`}],[`path`,{d:`m14 10-5.5 5.5`,key:`92pfem`}],[`path`,{d:`M14 17.85V10H6.15`,key:`xqmtsk`}]]),tt=D(`clapperboard`,[[`path`,{d:`m12.296 3.464 3.02 3.956`,key:`qash78`}],[`path`,{d:`M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z`,key:`1h7j8b`}],[`path`,{d:`M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`4lm6w1`}],[`path`,{d:`m6.18 5.276 3.1 3.899`,key:`zjj9t3`}]]),nt=D(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),rt=D(`clover`,[[`path`,{d:`M16.17 7.83 2 22`,key:`t58vo8`}],[`path`,{d:`M4.02 12a2.827 2.827 0 1 1 3.81-4.17A2.827 2.827 0 1 1 12 4.02a2.827 2.827 0 1 1 4.17 3.81A2.827 2.827 0 1 1 19.98 12a2.827 2.827 0 1 1-3.81 4.17A2.827 2.827 0 1 1 12 19.98a2.827 2.827 0 1 1-4.17-3.81A1 1 0 1 1 4 12`,key:`17k36q`}],[`path`,{d:`m7.83 7.83 8.34 8.34`,key:`1d7sxk`}]]),it=D(`coffee`,[[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M14 2v2`,key:`6buw04`}],[`path`,{d:`M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1`,key:`pwadti`}],[`path`,{d:`M6 2v2`,key:`colzsn`}]]),at=D(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),ot=D(`cookie`,[[`path`,{d:`M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5`,key:`laymnq`}],[`path`,{d:`M8.5 8.5v.01`,key:`ue8clq`}],[`path`,{d:`M16 15.5v.01`,key:`14dtrp`}],[`path`,{d:`M12 12v.01`,key:`u5ubse`}],[`path`,{d:`M11 17v.01`,key:`1hyl5a`}],[`path`,{d:`M7 14v.01`,key:`uct60s`}]]),st=D(`croissant`,[[`path`,{d:`M10.2 18H4.774a1.5 1.5 0 0 1-1.352-.97 11 11 0 0 1 .132-6.487`,key:`14kkz9`}],[`path`,{d:`M18 10.2V4.774a1.5 1.5 0 0 0-.97-1.352 11 11 0 0 0-6.486.132`,key:`1g7v07`}],[`path`,{d:`M18 5a4 3 0 0 1 4 3 2 2 0 0 1-2 2 10 10 0 0 0-5.139 1.42`,key:`ratg6b`}],[`path`,{d:`M5 18a3 4 0 0 0 3 4 2 2 0 0 0 2-2 10 10 0 0 1 1.42-5.14`,key:`4454f0`}],[`path`,{d:`M8.709 2.554a10 10 0 0 0-6.155 6.155 1.5 1.5 0 0 0 .676 1.626l9.807 5.42a2 2 0 0 0 2.718-2.718l-5.42-9.807a1.5 1.5 0 0 0-1.626-.676`,key:`qmemie`}]]),ct=D(`crown`,[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),lt=D(`dice-5`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`path`,{d:`M16 8h.01`,key:`cr5u4v`}],[`path`,{d:`M8 8h.01`,key:`1e4136`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}],[`path`,{d:`M16 16h.01`,key:`1f9h7w`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}]]),ut=D(`dog`,[[`path`,{d:`M11.25 16.25h1.5L12 17z`,key:`w7jh35`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309`,key:`u7s9ue`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5`,key:`v8hric`}]]),dt=D(`drama`,[[`path`,{d:`M10 11h.01`,key:`d2at3l`}],[`path`,{d:`M14 6h.01`,key:`k028ub`}],[`path`,{d:`M18 6h.01`,key:`1v4wsw`}],[`path`,{d:`M6.5 13.1h.01`,key:`1748ia`}],[`path`,{d:`M22 5c0 9-4 12-6 12s-6-3-6-12c0-2 2-3 6-3s6 1 6 3`,key:`172yzv`}],[`path`,{d:`M17.4 9.9c-.8.8-2 .8-2.8 0`,key:`1obv0w`}],[`path`,{d:`M10.1 7.1C9 7.2 7.7 7.7 6 8.6c-3.5 2-4.7 3.9-3.7 5.6 4.5 7.8 9.5 8.4 11.2 7.4.9-.5 1.9-2.1 1.9-4.7`,key:`rqjl8i`}],[`path`,{d:`M9.1 16.5c.3-1.1 1.4-1.7 2.4-1.4`,key:`1mr6wy`}]]),ft=D(`droplet`,[[`path`,{d:`M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z`,key:`c7niix`}]]),pt=D(`drum`,[[`path`,{d:`m2 2 8 8`,key:`1v6059`}],[`path`,{d:`m22 2-8 8`,key:`173r8a`}],[`ellipse`,{cx:`12`,cy:`9`,rx:`10`,ry:`5`,key:`liohsx`}],[`path`,{d:`M7 13.4v7.9`,key:`1yi6u9`}],[`path`,{d:`M12 14v8`,key:`1tn2tj`}],[`path`,{d:`M17 13.4v7.9`,key:`eqz2v3`}],[`path`,{d:`M2 9v8a10 5 0 0 0 20 0V9`,key:`1750ul`}]]),mt=D(`dumbbell`,[[`path`,{d:`M17.596 12.768a2 2 0 1 0 2.829-2.829l-1.768-1.767a2 2 0 0 0 2.828-2.829l-2.828-2.828a2 2 0 0 0-2.829 2.828l-1.767-1.768a2 2 0 1 0-2.829 2.829z`,key:`9m4mmf`}],[`path`,{d:`m2.5 21.5 1.4-1.4`,key:`17g3f0`}],[`path`,{d:`m20.1 3.9 1.4-1.4`,key:`1qn309`}],[`path`,{d:`M5.343 21.485a2 2 0 1 0 2.829-2.828l1.767 1.768a2 2 0 1 0 2.829-2.829l-6.364-6.364a2 2 0 1 0-2.829 2.829l1.768 1.767a2 2 0 0 0-2.828 2.829z`,key:`1t2c92`}],[`path`,{d:`m9.6 14.4 4.8-4.8`,key:`6umqxw`}]]),ht=D(`egg`,[[`path`,{d:`M12 2C8 2 4 8 4 14a8 8 0 0 0 16 0c0-6-4-12-8-12`,key:`1le142`}]]),gt=D(`feather`,[[`path`,{d:`M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z`,key:`18jl4k`}],[`path`,{d:`M16 8 2 22`,key:`vp34q`}],[`path`,{d:`M17.5 15H9`,key:`1oz8nu`}]]),_t=D(`fish`,[[`path`,{d:`M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z`,key:`15baut`}],[`path`,{d:`M18 12v.5`,key:`18hhni`}],[`path`,{d:`M16 17.93a9.77 9.77 0 0 1 0-11.86`,key:`16dt7o`}],[`path`,{d:`M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33`,key:`l9di03`}],[`path`,{d:`M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4`,key:`1kjonw`}],[`path`,{d:`m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98`,key:`1zlm23`}]]),vt=D(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),yt=D(`flower-2`,[[`path`,{d:`M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1`,key:`3pnvol`}],[`circle`,{cx:`12`,cy:`8`,r:`2`,key:`1822b1`}],[`path`,{d:`M12 10v12`,key:`6ubwww`}],[`path`,{d:`M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z`,key:`9hd38g`}],[`path`,{d:`M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z`,key:`ufn41s`}]]),bt=D(`flower`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5`,key:`14wa3c`}],[`path`,{d:`M12 7.5V9`,key:`1oy5b0`}],[`path`,{d:`M7.5 12H9`,key:`eltsq1`}],[`path`,{d:`M16.5 12H15`,key:`vk5kw4`}],[`path`,{d:`M12 16.5V15`,key:`k7eayi`}],[`path`,{d:`m8 8 1.88 1.88`,key:`nxy4qf`}],[`path`,{d:`M14.12 9.88 16 8`,key:`1lst6k`}],[`path`,{d:`m8 16 1.88-1.88`,key:`h2eex1`}],[`path`,{d:`M14.12 14.12 16 16`,key:`uqkrx3`}]]),xt=D(`footprints`,[[`path`,{d:`M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z`,key:`1dudjm`}],[`path`,{d:`M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z`,key:`l2t8xc`}],[`path`,{d:`M16 17h4`,key:`1dejxt`}],[`path`,{d:`M4 13h4`,key:`1bwh8b`}]]),St=D(`forklift`,[[`path`,{d:`M12 12H5a2 2 0 0 0-2 2v5`,key:`7zsz91`}],[`path`,{d:`M15 19h7`,key:`1askl3`}],[`path`,{d:`M16 19V2`,key:`1gf9nk`}],[`path`,{d:`M6 12V7a2 2 0 0 1 2-2h2.172a2 2 0 0 1 1.414.586l3.828 3.828A2 2 0 0 1 16 10.828`,key:`enx9tf`}],[`path`,{d:`M7 19h4`,key:`fumhkk`}],[`circle`,{cx:`13`,cy:`19`,r:`2`,key:`wjnkru`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,key:`v8kfzx`}]]),Ct=D(`gamepad-2`,[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]),wt=D(`gem`,[[`path`,{d:`M10.5 3 8 9l4 13 4-13-2.5-6`,key:`b3dvk1`}],[`path`,{d:`M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z`,key:`7w4byz`}],[`path`,{d:`M2 9h20`,key:`16fsjt`}]]),Tt=D(`gavel`,[[`path`,{d:`m14 13-8.381 8.38a1 1 0 0 1-3.001-3l8.384-8.381`,key:`pgg06f`}],[`path`,{d:`m16 16 6-6`,key:`vzrcl6`}],[`path`,{d:`m21.5 10.5-8-8`,key:`a17d9x`}],[`path`,{d:`m8 8 6-6`,key:`18bi4p`}],[`path`,{d:`m8.5 7.5 8 8`,key:`1oyaui`}]]),Et=D(`ghost`,[[`path`,{d:`M9 10h.01`,key:`qbtxuw`}],[`path`,{d:`M15 10h.01`,key:`1qmjsl`}],[`path`,{d:`M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z`,key:`uwwb07`}]]),Dt=D(`gift`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`,key:`1sqzm4`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`,key:`kc0143`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`,key:`1hberx`}]]),Ot=D(`glasses`,[[`circle`,{cx:`6`,cy:`15`,r:`4`,key:`vux9w4`}],[`circle`,{cx:`18`,cy:`15`,r:`4`,key:`18o8ve`}],[`path`,{d:`M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2`,key:`1ag4bs`}],[`path`,{d:`M2.5 13 5 7c.7-1.3 1.4-2 3-2`,key:`1hm1gs`}],[`path`,{d:`M21.5 13 19 7c-.7-1.3-1.5-2-3-2`,key:`1r31ai`}]]),kt=D(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),At=D(`graduation-cap`,[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]),jt=D(`guitar`,[[`path`,{d:`m11.9 12.1 4.514-4.514`,key:`109xqo`}],[`path`,{d:`M20.1 2.3a1 1 0 0 0-1.4 0l-1.114 1.114A2 2 0 0 0 17 4.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 17.828 7h1.344a2 2 0 0 0 1.414-.586L21.7 5.3a1 1 0 0 0 0-1.4z`,key:`txyc8t`}],[`path`,{d:`m6 16 2 2`,key:`16qmzd`}],[`path`,{d:`M8.23 9.85A3 3 0 0 1 11 8a5 5 0 0 1 5 5 3 3 0 0 1-1.85 2.77l-.92.38A2 2 0 0 0 12 18a4 4 0 0 1-4 4 6 6 0 0 1-6-6 4 4 0 0 1 4-4 2 2 0 0 0 1.85-1.23z`,key:`1de1vg`}]]),Mt=D(`ham`,[[`path`,{d:`M13.144 21.144A7.274 10.445 45 1 0 2.856 10.856`,key:`1k1t7q`}],[`path`,{d:`M13.144 21.144A7.274 4.365 45 0 0 2.856 10.856a7.274 4.365 45 0 0 10.288 10.288`,key:`153t1g`}],[`path`,{d:`M16.565 10.435 18.6 8.4a2.501 2.501 0 1 0 1.65-4.65 2.5 2.5 0 1 0-4.66 1.66l-2.024 2.025`,key:`gzrt0n`}],[`path`,{d:`m8.5 16.5-1-1`,key:`otr954`}]]),Nt=D(`hammer`,[[`path`,{d:`m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9`,key:`1hayfq`}],[`path`,{d:`m18 15 4-4`,key:`16gjal`}],[`path`,{d:`m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5`,key:`15ts47`}]]),Pt=D(`hand-metal`,[[`path`,{d:`M18 12.5V10a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4`,key:`wc6myp`}],[`path`,{d:`M14 11V9a2 2 0 1 0-4 0v2`,key:`94qvcw`}],[`path`,{d:`M10 10.5V5a2 2 0 1 0-4 0v9`,key:`m1ah89`}],[`path`,{d:`m7 15-1.76-1.76a2 2 0 0 0-2.83 2.82l3.6 3.6C7.5 21.14 9.2 22 12 22h2a8 8 0 0 0 8-8V7a2 2 0 1 0-4 0v5`,key:`t1skq1`}]]),Ft=D(`headphones`,[[`path`,{d:`M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3`,key:`1xhozi`}]]),It=D(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),Lt=D(`ice-cream-bowl`,[[`path`,{d:`M12 17c5 0 8-2.69 8-6H4c0 3.31 3 6 8 6m-4 4h8m-4-3v3M5.14 11a3.5 3.5 0 1 1 6.71 0`,key:`1uxfcu`}],[`path`,{d:`M12.14 11a3.5 3.5 0 1 1 6.71 0`,key:`4k3m1s`}],[`path`,{d:`M15.5 6.5a3.5 3.5 0 1 0-7 0`,key:`zmuahr`}]]),Rt=D(`ice-cream-cone`,[[`path`,{d:`m7 11 4.08 10.35a1 1 0 0 0 1.84 0L17 11`,key:`1v6356`}],[`path`,{d:`M17 7A5 5 0 0 0 7 7`,key:`151p3v`}],[`path`,{d:`M17 7a2 2 0 0 1 0 4H7a2 2 0 0 1 0-4`,key:`1sdaij`}]]),A=D(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),zt=D(`lamp-desk`,[[`path`,{d:`M10.293 2.293a1 1 0 0 1 1.414 0l2.5 2.5 5.994 1.227a1 1 0 0 1 .506 1.687l-7 7a1 1 0 0 1-1.687-.506l-1.227-5.994-2.5-2.5a1 1 0 0 1 0-1.414z`,key:`sb8slu`}],[`path`,{d:`m14.207 4.793-3.414 3.414`,key:`m2x3oj`}],[`path`,{d:`M3 20a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z`,key:`8b3myj`}],[`path`,{d:`m9.086 6.5-4.793 4.793a1 1 0 0 0-.18 1.17L7 18`,key:`43s6cu`}]]),Bt=D(`lasso`,[[`path`,{d:`M3.704 14.467a10 8 0 1 1 3.115 2.375`,key:`wxgc5m`}],[`path`,{d:`M7 22a5 5 0 0 1-2-3.994`,key:`1xp6a4`}],[`circle`,{cx:`5`,cy:`16`,r:`2`,key:`18csp3`}]]),Vt=D(`leaf`,[[`path`,{d:`M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z`,key:`nnexq3`}],[`path`,{d:`M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12`,key:`mt58a7`}]]),Ht=D(`lollipop`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}],[`path`,{d:`M11 11a2 2 0 0 0 4 0 4 4 0 0 0-8 0 6 6 0 0 0 12 0`,key:`107gwy`}]]),Ut=D(`magnet`,[[`path`,{d:`m12 15 4 4`,key:`lnac28`}],[`path`,{d:`M2.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.029-6.029a1 1 0 1 1 3 3l-6.029 6.029a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.365-6.367A1 1 0 0 0 8.716 4.282z`,key:`nlhkjb`}],[`path`,{d:`m5 8 4 4`,key:`j6kj7e`}]]),Wt=D(`map`,[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]),j=D(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Gt=D(`mountain-snow`,[[`path`,{d:`m8 3 4 8 5-5 5 15H2L8 3z`,key:`otkl63`}],[`path`,{d:`M4.14 15.08c2.62-1.57 5.24-1.43 7.86.42 2.74 1.94 5.49 2 8.23.19`,key:`1pvmmp`}]]),Kt=D(`mountain`,[[`path`,{d:`m8 3 4 8 5-5 5 15H2L8 3z`,key:`otkl63`}]]),qt=D(`music`,[[`path`,{d:`M9 18V5l12-2v13`,key:`1jmyc2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}]]),Jt=D(`origami`,[[`path`,{d:`M12 12V4a1 1 0 0 1 1-1h6.297a1 1 0 0 1 .651 1.759l-4.696 4.025`,key:`1bx4vc`}],[`path`,{d:`m12 21-7.414-7.414A2 2 0 0 1 4 12.172V6.415a1.002 1.002 0 0 1 1.707-.707L20 20.009`,key:`1h3km6`}],[`path`,{d:`m12.214 3.381 8.414 14.966a1 1 0 0 1-.167 1.199l-1.168 1.163a1 1 0 0 1-.706.291H6.351a1 1 0 0 1-.625-.219L3.25 18.8a1 1 0 0 1 .631-1.781l4.165.027`,key:`1hj4wg`}]]),Yt=D(`panda`,[[`path`,{d:`M11.25 17.25h1.5L12 18z`,key:`1wmwwj`}],[`path`,{d:`m15 12 2 2`,key:`k60wz4`}],[`path`,{d:`M18 6.5a.5.5 0 0 0-.5-.5`,key:`1ch4h4`}],[`path`,{d:`M20.69 9.67a4.5 4.5 0 1 0-7.04-5.5 8.35 8.35 0 0 0-3.3 0 4.5 4.5 0 1 0-7.04 5.5C2.49 11.2 2 12.88 2 14.5 2 19.47 6.48 22 12 22s10-2.53 10-7.5c0-1.62-.48-3.3-1.3-4.83`,key:`1c660l`}],[`path`,{d:`M6 6.5a.495.495 0 0 1 .5-.5`,key:`eviuep`}],[`path`,{d:`m9 12-2 2`,key:`326nkw`}]]),Xt=D(`party-popper`,[[`path`,{d:`M5.8 11.3 2 22l10.7-3.79`,key:`gwxi1d`}],[`path`,{d:`M4 3h.01`,key:`1vcuye`}],[`path`,{d:`M22 8h.01`,key:`1mrtc2`}],[`path`,{d:`M15 2h.01`,key:`1cjtqr`}],[`path`,{d:`M22 20h.01`,key:`1mrys2`}],[`path`,{d:`m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10`,key:`hbicv8`}],[`path`,{d:`m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17`,key:`1i94pl`}],[`path`,{d:`m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7`,key:`1cofks`}],[`path`,{d:`M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z`,key:`4kbmks`}]]),Zt=D(`paw-print`,[[`circle`,{cx:`11`,cy:`4`,r:`2`,key:`vol9p0`}],[`circle`,{cx:`18`,cy:`8`,r:`2`,key:`17gozi`}],[`circle`,{cx:`20`,cy:`16`,r:`2`,key:`1v9bxh`}],[`path`,{d:`M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z`,key:`1ydw1z`}]]),Qt=D(`pickaxe`,[[`path`,{d:`m14 13-8.381 8.38a1 1 0 0 1-3.001-3L11 9.999`,key:`1lw9ds`}],[`path`,{d:`M15.973 4.027A13 13 0 0 0 5.902 2.373c-1.398.342-1.092 2.158.277 2.601a19.9 19.9 0 0 1 5.822 3.024`,key:`ffj4ej`}],[`path`,{d:`M16.001 11.999a19.9 19.9 0 0 1 3.024 5.824c.444 1.369 2.26 1.676 2.603.278A13 13 0 0 0 20 8.069`,key:`8tj4zw`}],[`path`,{d:`M18.352 3.352a1.205 1.205 0 0 0-1.704 0l-5.296 5.296a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l5.296-5.296a1.205 1.205 0 0 0 0-1.704z`,key:`hh6h97`}]]),$t=D(`pizza`,[[`path`,{d:`m12 14-1 1`,key:`11onhr`}],[`path`,{d:`m13.75 18.25-1.25 1.42`,key:`1yisr3`}],[`path`,{d:`M17.775 5.654a15.68 15.68 0 0 0-12.121 12.12`,key:`1qtqk6`}],[`path`,{d:`M18.8 9.3a1 1 0 0 0 2.1 7.7`,key:`fbbbr2`}],[`path`,{d:`M21.964 20.732a1 1 0 0 1-1.232 1.232l-18-5a1 1 0 0 1-.695-1.232A19.68 19.68 0 0 1 15.732 2.037a1 1 0 0 1 1.232.695z`,key:`1hyfdd`}]]),en=D(`plane`,[[`path`,{d:`M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z`,key:`1v9wt8`}]]),tn=D(`popcorn`,[[`path`,{d:`M18 8a2 2 0 0 0 0-4 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0 0 4`,key:`10td1f`}],[`path`,{d:`M10 22 9 8`,key:`yjptiv`}],[`path`,{d:`m14 22 1-14`,key:`8jwc8b`}],[`path`,{d:`M20 8c.5 0 .9.4.8 1l-2.6 12c-.1.5-.7 1-1.2 1H7c-.6 0-1.1-.4-1.2-1L3.2 9c-.1-.6.3-1 .8-1Z`,key:`1qo33t`}]]),nn=D(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),rn=D(`rabbit`,[[`path`,{d:`M13 16a3 3 0 0 1 2.24 5`,key:`1epib5`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3`,key:`ue9ozu`}],[`path`,{d:`M20 8.54V4a2 2 0 1 0-4 0v3`,key:`49iql8`}],[`path`,{d:`M7.612 12.524a3 3 0 1 0-1.6 4.3`,key:`1e33i0`}]]),an=D(`rainbow`,[[`path`,{d:`M22 17a10 10 0 0 0-20 0`,key:`ozegv`}],[`path`,{d:`M6 17a6 6 0 0 1 12 0`,key:`5giftw`}],[`path`,{d:`M10 17a2 2 0 0 1 4 0`,key:`gnsikk`}]]),on=D(`rat`,[[`path`,{d:`M13 22H4a2 2 0 0 1 0-4h12`,key:`bt3f23`}],[`path`,{d:`M13.236 18a3 3 0 0 0-2.2-5`,key:`1tbvmo`}],[`path`,{d:`M16 9h.01`,key:`1bdo4e`}],[`path`,{d:`M16.82 3.94a3 3 0 1 1 3.237 4.868l1.815 2.587a1.5 1.5 0 0 1-1.5 2.1l-2.872-.453a3 3 0 0 0-3.5 3`,key:`9ch7kn`}],[`path`,{d:`M17 4.988a3 3 0 1 0-5.2 2.052A7 7 0 0 0 4 14.015 4 4 0 0 0 8 18`,key:`3s7e9i`}]]),sn=D(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),cn=D(`rocking-chair`,[[`path`,{d:`m15 13 3.708 7.416`,key:`1edxn9`}],[`path`,{d:`M3 19a15 15 0 0 0 18 0`,key:`d0d1c4`}],[`path`,{d:`m3 2 3.21 9.633A2 2 0 0 0 8.109 13H18`,key:`tpa4et`}],[`path`,{d:`m9 13-3.708 7.416`,key:`1oplxx`}]]),ln=D(`sailboat`,[[`path`,{d:`M10 2v15`,key:`1qf71f`}],[`path`,{d:`M7 22a4 4 0 0 1-4-4 1 1 0 0 1 1-1h16a1 1 0 0 1 1 1 4 4 0 0 1-4 4z`,key:`1pxcvx`}],[`path`,{d:`M9.159 2.46a1 1 0 0 1 1.521-.193l9.977 8.98A1 1 0 0 1 20 13H4a1 1 0 0 1-.824-1.567z`,key:`5oog16`}]]),un=D(`sandwich`,[[`path`,{d:`m2.37 11.223 8.372-6.777a2 2 0 0 1 2.516 0l8.371 6.777`,key:`f1wd0e`}],[`path`,{d:`M21 15a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-5.25`,key:`1pfu07`}],[`path`,{d:`M3 15a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h9`,key:`1oq9qw`}],[`path`,{d:`m6.67 15 6.13 4.6a2 2 0 0 0 2.8-.4l3.15-4.2`,key:`1fnwu5`}],[`rect`,{width:`20`,height:`4`,x:`2`,y:`11`,rx:`1`,key:`itshg`}]]),dn=D(`scissors`,[[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M8.12 8.12 12 12`,key:`1alkpv`}],[`path`,{d:`M20 4 8.12 15.88`,key:`xgtan2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M14.8 14.8 20 20`,key:`ptml3r`}]]),M=D(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),fn=D(`shell`,[[`path`,{d:`M14 11a2 2 0 1 1-4 0 4 4 0 0 1 8 0 6 6 0 0 1-12 0 8 8 0 0 1 16 0 10 10 0 1 1-20 0 11.93 11.93 0 0 1 2.42-7.22 2 2 0 1 1 3.16 2.44`,key:`1cn552`}]]),pn=D(`ship`,[[`path`,{d:`M12 10.189V14`,key:`1p8cqu`}],[`path`,{d:`M12 2v3`,key:`qbqxhf`}],[`path`,{d:`M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6`,key:`qpkstq`}],[`path`,{d:`M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76`,key:`7tigtc`}],[`path`,{d:`M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`,key:`1924j5`}]]),mn=D(`shrimp`,[[`path`,{d:`M11 12h.01`,key:`1lr4k6`}],[`path`,{d:`M13 22c.5-.5 1.12-1 2.5-1-1.38 0-2-.5-2.5-1`,key:`fatpdi`}],[`path`,{d:`M14 2a3.28 3.28 0 0 1-3.227 1.798l-6.17-.561A2.387 2.387 0 1 0 4.387 8H15.5a1 1 0 0 1 0 13 1 1 0 0 0 0-5H12a7 7 0 0 1-7-7V8`,key:`kehrqe`}],[`path`,{d:`M14 8a8.5 8.5 0 0 1 0 8`,key:`1imjx2`}],[`path`,{d:`M16 16c2 0 4.5-4 4-6`,key:`z0nejz`}]]),hn=D(`skull`,[[`path`,{d:`m12.5 17-.5-1-.5 1h1z`,key:`3me087`}],[`path`,{d:`M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z`,key:`1o5pge`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}]]),gn=D(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),_n=D(`snowflake`,[[`path`,{d:`m10 20-1.25-2.5L6 18`,key:`18frcb`}],[`path`,{d:`M10 4 8.75 6.5 6 6`,key:`7mghy3`}],[`path`,{d:`m14 20 1.25-2.5L18 18`,key:`1chtki`}],[`path`,{d:`m14 4 1.25 2.5L18 6`,key:`1b4wsy`}],[`path`,{d:`m17 21-3-6h-4`,key:`15hhxa`}],[`path`,{d:`m17 3-3 6 1.5 3`,key:`11697g`}],[`path`,{d:`M2 12h6.5L10 9`,key:`kv9z4n`}],[`path`,{d:`m20 10-1.5 2 1.5 2`,key:`1swlpi`}],[`path`,{d:`M22 12h-6.5L14 15`,key:`1mxi28`}],[`path`,{d:`m4 10 1.5 2L4 14`,key:`k9enpj`}],[`path`,{d:`m7 21 3-6-1.5-3`,key:`j8hb9u`}],[`path`,{d:`m7 3 3 6h4`,key:`1otusx`}]]),vn=D(`soup`,[[`path`,{d:`M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z`,key:`4rw317`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}],[`path`,{d:`M19.5 12 22 6`,key:`shfsr5`}],[`path`,{d:`M16.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.73 1.62`,key:`rpc6vp`}],[`path`,{d:`M11.25 3c.27.1.8.53.74 1.36-.05.83-.93 1.2-.98 2.02-.06.78.33 1.24.72 1.62`,key:`1lf63m`}],[`path`,{d:`M6.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.74 1.62`,key:`97tijn`}]]),yn=D(`spade`,[[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`M2 14.499a5.5 5.5 0 0 0 9.591 3.675.6.6 0 0 1 .818.001A5.5 5.5 0 0 0 22 14.5c0-2.29-1.5-4-3-5.5l-5.492-5.312a2 2 0 0 0-3-.02L5 8.999c-1.5 1.5-3 3.2-3 5.5`,key:`1aw2pz`}]]),bn=D(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),xn=D(`sprout`,[[`path`,{d:`M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3`,key:`139s4v`}],[`path`,{d:`M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4`,key:`1dlkgp`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),Sn=D(`squirrel`,[[`path`,{d:`M15.236 22a3 3 0 0 0-2.2-5`,key:`21bitc`}],[`path`,{d:`M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4`,key:`oh0fg0`}],[`path`,{d:`M18 13h.01`,key:`9veqaj`}],[`path`,{d:`M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10`,key:`980v8a`}]]),Cn=D(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),N=D(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),wn=D(`swords`,[[`polyline`,{points:`14.5 17.5 3 6 3 3 6 3 17.5 14.5`,key:`1hfsw2`}],[`line`,{x1:`13`,x2:`19`,y1:`19`,y2:`13`,key:`1vrmhu`}],[`line`,{x1:`16`,x2:`20`,y1:`16`,y2:`20`,key:`1bron3`}],[`line`,{x1:`19`,x2:`21`,y1:`21`,y2:`19`,key:`13pww6`}],[`polyline`,{points:`14.5 6.5 18 3 21 3 21 6 17.5 9.5`,key:`hbey2j`}],[`line`,{x1:`5`,x2:`9`,y1:`14`,y2:`18`,key:`1hf58s`}],[`line`,{x1:`7`,x2:`4`,y1:`17`,y2:`20`,key:`pidxm4`}],[`line`,{x1:`3`,x2:`5`,y1:`19`,y2:`21`,key:`1pehsh`}]]),Tn=D(`tent`,[[`path`,{d:`M3.5 21 14 3`,key:`1szst5`}],[`path`,{d:`M20.5 21 10 3`,key:`1310c3`}],[`path`,{d:`M15.5 21 12 15l-3.5 6`,key:`1ddtfw`}],[`path`,{d:`M2 21h20`,key:`1nyx9w`}]]),En=D(`train-front`,[[`path`,{d:`M8 3.1V7a4 4 0 0 0 8 0V3.1`,key:`1v71zp`}],[`path`,{d:`m9 15-1-1`,key:`1yrq24`}],[`path`,{d:`m15 15 1-1`,key:`1t0d6s`}],[`path`,{d:`M9 19c-2.8 0-5-2.2-5-5v-4a8 8 0 0 1 16 0v4c0 2.8-2.2 5-5 5Z`,key:`1p0hjs`}],[`path`,{d:`m8 19-2 3`,key:`13i0xs`}],[`path`,{d:`m16 19 2 3`,key:`xo31yx`}]]),Dn=D(`tree-pine`,[[`path`,{d:`m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z`,key:`cpyugq`}],[`path`,{d:`M12 22v-3`,key:`kmzjlo`}]]),On=D(`trees`,[[`path`,{d:`M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z`,key:`1l6gj6`}],[`path`,{d:`M7 16v6`,key:`1a82de`}],[`path`,{d:`M13 19v3`,key:`13sx9i`}],[`path`,{d:`M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5`,key:`1sj9kv`}]]),kn=D(`trophy`,[[`path`,{d:`M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978`,key:`1n3hpd`}],[`path`,{d:`M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978`,key:`rfe1zi`}],[`path`,{d:`M18 9h1.5a1 1 0 0 0 0-5H18`,key:`7xy6bh`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`,key:`1mhfuq`}],[`path`,{d:`M6 9H4.5a1 1 0 0 1 0-5H6`,key:`tex48p`}]]),An=D(`turtle`,[[`path`,{d:`m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z`,key:`1lbbv7`}],[`path`,{d:`M4.82 7.9 8 10`,key:`m9wose`}],[`path`,{d:`M15.18 7.9 12 10`,key:`p8dp2u`}],[`path`,{d:`M16.93 10H20a2 2 0 0 1 0 4H2`,key:`12nsm7`}]]),jn=D(`umbrella`,[[`path`,{d:`M12 13v7a2 2 0 0 0 4 0`,key:`rpgb42`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M20.992 13a1 1 0 0 0 .97-1.274 10.284 10.284 0 0 0-19.923 0A1 1 0 0 0 3 13z`,key:`124nyo`}]]),Mn=D(`volleyball`,[[`path`,{d:`M11 7a16 16 20 0 1 10.98 4.362`,key:`1mmfx7`}],[`path`,{d:`M12 12a13 13 0 0 1-8.66 5`,key:`14sm5y`}],[`path`,{d:`M16.83 13.634a16 16 0 0 1-9.267 7.328`,key:`j0eyj5`}],[`path`,{d:`M20.66 17A13 13 0 0 0 12 12a13 13 0 0 1 0-10`,key:`qaetsw`}],[`path`,{d:`M8.17 15.366a16 16 0 0 1-1.713-11.69`,key:`17ewdd`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Nn=D(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Pn=D(`wind`,[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`,key:`148xed`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`,key:`1u4tom`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`,key:`75valh`}]]),Fn=D(`worm`,[[`path`,{d:`m19 12-1.5 3`,key:`9bcu4o`}],[`path`,{d:`M19.63 18.81 22 20`,key:`121v98`}],[`path`,{d:`M6.47 8.23a1.68 1.68 0 0 1 2.44 1.93l-.64 2.08a6.76 6.76 0 0 0 10.16 7.67l.42-.27a1 1 0 1 0-2.73-4.21l-.42.27a1.76 1.76 0 0 1-2.63-1.99l.64-2.08A6.66 6.66 0 0 0 3.94 3.9l-.7.4a1 1 0 1 0 2.55 4.34z`,key:`1tij6q`}]]),In=[{name:`mountain`,Icon:Kt},{name:`mountain-snow`,Icon:Gt},{name:`tree-pine`,Icon:Dn},{name:`trees`,Icon:On},{name:`leaf`,Icon:Vt},{name:`flower`,Icon:bt},{name:`flower-2`,Icon:yt},{name:`sprout`,Icon:xn},{name:`sun`,Icon:N},{name:`moon`,Icon:j},{name:`star`,Icon:Cn},{name:`cloud`,Icon:nt},{name:`snowflake`,Icon:_n},{name:`zap`,Icon:_e},{name:`flame`,Icon:vt},{name:`droplet`,Icon:ft},{name:`rainbow`,Icon:an},{name:`wind`,Icon:Pn},{name:`bird`,Icon:Le},{name:`fish`,Icon:_t},{name:`cat`,Icon:Ze},{name:`dog`,Icon:ut},{name:`rabbit`,Icon:rn},{name:`turtle`,Icon:An},{name:`bug`,Icon:We},{name:`snail`,Icon:gn},{name:`paw-print`,Icon:Zt},{name:`feather`,Icon:gt},{name:`rocket`,Icon:sn},{name:`anchor`,Icon:Ee},{name:`compass`,Icon:at},{name:`map`,Icon:Wt},{name:`tent`,Icon:Tn},{name:`camera`,Icon:Ke},{name:`music`,Icon:qt},{name:`headphones`,Icon:Ft},{name:`palette`,Icon:ve},{name:`brush`,Icon:Ue},{name:`pencil`,Icon:p},{name:`book`,Icon:Be},{name:`book-open`,Icon:ze},{name:`coffee`,Icon:it},{name:`pizza`,Icon:$t},{name:`ice-cream-cone`,Icon:Rt},{name:`cake`,Icon:Ge},{name:`gift`,Icon:Dt},{name:`gamepad-2`,Icon:Ct},{name:`puzzle`,Icon:nn},{name:`bike`,Icon:Ie},{name:`car`,Icon:Ye},{name:`plane`,Icon:en},{name:`ship`,Icon:pn},{name:`sailboat`,Icon:ln},{name:`train-front`,Icon:En},{name:`heart`,Icon:It},{name:`sparkles`,Icon:bn},{name:`crown`,Icon:ct},{name:`gem`,Icon:wt},{name:`trophy`,Icon:kn},{name:`ghost`,Icon:Et},{name:`bot`,Icon:ge},{name:`globe`,Icon:kt},{name:`guitar`,Icon:jt}],Ln=Object.fromEntries(In.map(e=>[e.name,e.Icon])),P=x();function Rn({icon:e,colour:t,className:n}){let r=le(`size-4 shrink-0`,t?f(t):`text-fg-muted`,n);return(0,P.jsx)(e&&Ln[e]||he,{className:r,style:m(t)})}function F(e,t,n){let r=e=>[1,3,5].map(t=>parseInt(e.slice(t,t+2),16)),i=r(t);return`#`+r(e).map((e,t)=>Math.round(e*n+i[t]*(1-n)).toString(16).padStart(2,`0`)).join(``)}var zn={navy:`--identity-navy`,gold:`--identity-gold`,blue:`--ansi-blue`,green:`--ansi-green`,red:`--ansi-red`,violet:`--ansi-magenta`,cyan:`--ansi-cyan`};function Bn(e){return[1,3,5].reduce((t,n,r)=>{let i=parseInt(e.slice(n,n+2),16)/255;return t+(i<=.04045?i/12.92:((i+.055)/1.055)**2.4)*[.2126,.7152,.0722][r]},0)}function I(e,t,n,r=4.5){let i=t.map(Bn);for(let t=0;t<=100;t++){let a=F(e,n,1-t/100),o=Bn(a);if(i.every(e=>(Math.max(o,e)+.05)/(Math.min(o,e)+.05)>=r))return a}return n}function Vn(e,t,n){let r=zn[e],i=ee(e);if(!r&&!i)return{};let a=i?e:n(r),o=n(`--host-shade`),s=n(`--host-paper`),c=t===`dark`,l=c?o:s,u=c?F(a,s,.18):F(a,o,.45),d=c?F(a,s,.4):F(a,o,.65),f=c?a:F(a,o,.75),p=c?F(a,s,.55):F(u,s,.76),m=n(`--bg-base`),h=c?s:o,g=F(a,F(h,m,c?.08:.06),c?.13:.05),_=F(g,h,c?.92:.96),v=F(g,n(`--bg-surface`),1/3),y=F(_,n(`--bg-elevated`),1/3),b=F(_,n(`--bg-tray`),1/3),x=[l,m,v,y,b],S=I(F(a,b,.3),x,h,1.5);return u=I(u,x,h),d=I(d,x,h),p=I(p,x,h),f=I(f,x,h),{"--bg-surface":v,"--bg-elevated":y,"--bg-tray":b,"--border":S,"--text-primary":u,"--text-secondary":d,"--text-muted":p,"--text-gold":f,"--explorer-foreground":u,"--explorer-folder":u,"--accent":f,"--accent-hover":u,"--focus-ring":f,"--nav-selection":f,"--nav-selection-ink":l,"--action":u,"--action-hover":d,"--action-ink":l,"--selection":f+(c?`4d`:`33`),"--explorer-selection":f+`2e`,"--explorer-hover":f+`0d`}}var L=[{name:`alarm-clock`,Icon:we},{name:`amphora`,Icon:Te},{name:`apple`,Icon:Oe},{name:`armchair`,Icon:ke},{name:`axe`,Icon:Ae},{name:`banana`,Icon:je},{name:`bath`,Icon:Me},{name:`beef`,Icon:Ne},{name:`beer`,Icon:Pe},{name:`biceps-flexed`,Icon:Fe},{name:`bone`,Icon:Re},{name:`boom-box`,Icon:Ve},{name:`briefcase-business`,Icon:He},{name:`candy`,Icon:Je},{name:`candy-cane`,Icon:qe},{name:`carrot`,Icon:Xe},{name:`cherry`,Icon:$e},{name:`chef-hat`,Icon:Qe},{name:`citrus`,Icon:et},{name:`clapperboard`,Icon:tt},{name:`clover`,Icon:rt},{name:`cookie`,Icon:ot},{name:`croissant`,Icon:st},{name:`dice5`,Icon:lt},{name:`drama`,Icon:dt},{name:`drum`,Icon:pt},{name:`dumbbell`,Icon:mt},{name:`egg`,Icon:ht},{name:`footprints`,Icon:xt},{name:`forklift`,Icon:St},{name:`gavel`,Icon:Tt},{name:`glasses`,Icon:Ot},{name:`graduation-cap`,Icon:At},{name:`ham`,Icon:Mt},{name:`hammer`,Icon:Nt},{name:`hand-metal`,Icon:Pt},{name:`ice-cream-bowl`,Icon:Lt},{name:`key-round`,Icon:A},{name:`lamp-desk`,Icon:zt},{name:`lasso`,Icon:Bt},{name:`lollipop`,Icon:Ht},{name:`magnet`,Icon:Ut},{name:`origami`,Icon:Jt},{name:`panda`,Icon:Yt},{name:`party-popper`,Icon:Xt},{name:`pickaxe`,Icon:Qt},{name:`popcorn`,Icon:tn},{name:`rat`,Icon:on},{name:`rocking-chair`,Icon:cn},{name:`sandwich`,Icon:un},{name:`scissors`,Icon:dn},{name:`shell`,Icon:fn},{name:`shrimp`,Icon:mn},{name:`skull`,Icon:hn},{name:`soup`,Icon:vn},{name:`spade`,Icon:yn},{name:`squirrel`,Icon:Sn},{name:`swords`,Icon:wn},{name:`umbrella`,Icon:jn},{name:`volleyball`,Icon:Mn},{name:`wand-sparkles`,Icon:Nn},{name:`worm`,Icon:Fn},{name:`anvil`,Icon:De}],R=Object.fromEntries(L.map(({name:e,Icon:t})=>[e,t]));function z(e=!0){let t=ne(),n=ie(e?t??void 0:void 0),r=n.data?.hostColour;return{ready:e&&n.isSuccess,icon:n.data?.hostIcon,colour:l.some(e=>e===r)||ee(r)?r:null}}function B({icon:e,className:t=`size-4 shrink-0`}){return(0,P.jsx)(e&&Object.hasOwn(R,e)&&R[e]||M,{className:t,"aria-hidden":`true`})}function Hn({enabled:e=!0}){let{colour:t}=z(e);return(0,O.useLayoutEffect)(()=>{let e=document.documentElement,n=[],r=()=>{for(let t of n)e.style.removeProperty(t);n=[],delete e.dataset.hostColour},i=()=>{if(r(),!t)return;let i=Vn(t,y(),_());n=Object.keys(i);for(let[t,n]of Object.entries(i))e.style.setProperty(t,n);e.dataset.hostColour=t};i();let a=b(i,{first:!0});return v(),()=>{a(),r(),v()}},[t]),null}function Un(){let e=ae(),{icon:t,colour:n,ready:r}=z(),i=se(e.data),a=(0,O.useRef)(null);return(0,O.useLayoutEffect)(()=>{let e=document.documentElement,t=a.current?.querySelector(`svg`);if(!(!r||!i||!t))return e.dataset.desktopHostIdentity=JSON.stringify({name:i,colour:n,icon:[...t.children].map(e=>({tag:e.localName,attrs:Object.fromEntries([...e.attributes].filter(e=>e.name!==`class`).map(e=>[e.name,e.value]))}))}),()=>{delete e.dataset.desktopHostIdentity}},[r,i,t,n]),(0,P.jsx)(`span`,{hidden:!0,ref:a,children:(0,P.jsx)(B,{icon:t})})}function Wn({stream:e,label:t,hint:n,onClose:r}){let[i,a]=(0,O.useState)(null);return(0,P.jsx)(me,{open:!0,onOpenChange:e=>!e&&r(),children:(0,P.jsxs)(fe,{className:`h-[85vh] max-w-[calc(100vw-4rem)]`,children:[(0,P.jsxs)(de,{children:[(0,P.jsxs)(pe,{children:[t,` — login`]}),(0,P.jsx)(ue,{children:i===null?`Complete the agent’s login flow below.${n===void 0?` The account shows as logged in once it finishes cleanly.`:` ${n}`}`:`The login exited with code ${i} without completing. The output above may say why; close this and try again.`})]}),(0,P.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-md bg-ground p-1`,children:(0,P.jsx)(g,{stream:e,onExit:e=>e===0?r():a(e)})})]})})}function Gn(e){let t=e?.catalogue,n=t?.releases.latest;if(e?.availability!==`ready`||!t)return[];let r=[],i=t.releases.components?.daemon??n,a=t.releases.components?.runtime??n;return i?.host_asset&&u(i.version,t.daemon_version)&&r.push({component:`daemon`,version:i.version}),a?.host_asset&&t.runtime_default&&u(a.version,t.runtime_default.version)&&r.push({component:`runtime`,version:a.version}),r}function V(e){return e.staged&&!e.dispatched&&[`staged`,`preflight`,`approved`].includes(e.phase)}function Kn(e,t){let n=e?.result?.operation;if(e?.availability!==`ready`||!e.result?.ok||!n||!V(n)||!t?.ok||t.operation?.id!==n.id||t.operation.revision!==n.revision)return null;let r=t.review;if(!r)return null;let i=r.interruption_fingerprint,a=r.fingerprint??i;return!a||!r.can_apply&&!i||i&&!e.capabilities.interruption_approval?null:{action:`apply`,reference:{id:n.id,revision:n.revision},fingerprint:a,...i?{interruption_approval:i}:{}}}function qn(e){let t=e?.result?.operation;return!!t&&!a(t.phase)}function Jn(e){let t=e.result?.operation;return e.availability===`unavailable`&&e.observation===`recorded`&&e.capabilities.offline_continuation&&e.result?.ok&&t?.dispatched&&!a(t.phase)?{action:`continue-offline`,reference:{id:t.id,revision:t.revision}}:null}var Yn={checking:`Checking update`,downloading:`Downloading`,staged:`Downloaded and verified`,preflight:`Ready for review`,approved:`Approved`,dispatching:`Starting update`,applying:`Applying update`,verifying:`Verifying update`,complete:`Update complete`,blocked:`Update blocked`,cancelled:`Update cancelled`,superseded:`Update replaced`,failed:`Update failed`,recovery_required:`Recovery required`,rolled_back:`Update rolled back`},Xn=class{offered=new Set;take(e,t){return t.filter(({component:t,version:n})=>{let r=JSON.stringify([e,t,n]);return this.offered.has(r)?!1:(this.offered.add(r),!0)})}};function H(){return d()?.scope??`local`}function U(e){let t=d(),r=t?.generation,a=t?`/api/host/updates`:`/cockpit/updates`,s=()=>{if(!e)throw Error(`Host updates require host-approved device access.`);if(d()!==t||t?.generation!==r)throw Error(`Host update connection changed. Refresh status before continuing.`)};return async(e,r)=>{s(),t&&e&&i.parse(e);let c=a;e||(!t||n(o.parse(await C(`GET`,`/api/version`,void 0,r)).protocol,{major:26,minor:2}))&&(c+=`?components=1`);let l;try{l=e?await C(`POST`,a,e,r):await C(`GET`,c,void 0,r)}catch(t){if(e||c===a||!(t instanceof te)||![400,403].includes(t.status))throw t;l=await C(`GET`,a,void 0,r)}return s(),l}}function Zn(e,t){let n=[`cockpit-host-updates`,t],r,i=()=>{let t=e.getQueryData(n);if(t?.availability!==`ready`||t.observation===`recorded`||!t.catalogue)return;let i=JSON.stringify([t.catalogue.daemon_version,t.catalogue.runtime_default?.version??null]);i!==r&&(r=i,e.invalidateQueries({queryKey:[`release-notes`]}))},a=e.getQueryCache().subscribe(e=>{e.type===`updated`&&e.query.queryKey[0]===n[0]&&e.query.queryKey[1]===t&&i()});return i(),a}function W(){return[`cockpit-host-updates`,H()]}function G(){let e=d(),t=T({queryKey:[`host-update-access`,H(),e?.generation],queryFn:async({signal:e})=>{let t=o.parse(await C(`GET`,`/api/version`,void 0,e));return t.protocol.major>=26&&t.remote_host_updates===!0},enabled:!!e,staleTime:1/0,retry:!1});return!e||t.data===!0}function Qn(e=!d()){let t=U(e);return xe({queryKey:W(),queryFn:async({signal:e})=>s.parse(await t(void 0,e)),enabled:e,retry:!1,staleTime:5e3,refetchInterval:e=>e.state.error instanceof te&&e.state.error.status===404?!1:[`checking`,`downloading`,`dispatching`,`applying`,`verifying`].includes(e.state.data?.result?.operation?.phase??``)||e.state.data?.catalogue?.releases.state===`checking`?2e3:6e4})}function $n(e,t=!d()){let n=W(),i=U(t);return{mutationKey:[`cockpit-host-update-action`,H()],retry:!1,networkMode:`always`,mutationFn:async e=>r.parse(await i(e)),onMutate:async()=>{await e.cancelQueries({queryKey:n})},onSuccess:t=>{e.setQueryData(n,e=>e&&{...e,result:t})},onSettled:async()=>{await e.invalidateQueries({queryKey:n})}}}function er(){return T(Qn(G()))}function tr(){let e=E(),t=G(),n=[`cockpit-host-update-action`,H()],r=Se({mutationKey:n}),i=ce($n(e,t));return{...i,busy:r>0,act:t=>{e.isMutating({mutationKey:n})||i.mutate(t)}}}function nr(){let e=E(),t=H();(0,O.useEffect)(()=>{let n=[`cockpit-host-updates`,t],r=()=>{e.invalidateQueries({queryKey:n}),e.invalidateQueries({queryKey:[`release-notes`]})},i=ye.onHostUpdatesChanged(r),a=Zn(e,t),o=ye.onConnectionChange(e=>{e&&r()});return()=>{i(),a(),o()}},[e,t])}var K=e=>e&&typeof e==`object`?e:{},q=[{id:`appearance`,label:`Appearance`,fields:[{key:`theme`,store:`theme`},{key:`cursorPackage`,store:`client`},{key:`uiFontSize`,store:`client`},{key:`terminalFontSize`,store:`client`},{key:`rippleEnabled`,store:`client`},{key:`editorFontSize`,store:`client`},{key:`density`,store:`client`},{key:`reduceMotion`,store:`client`},{key:`showHostOnFocus`,store:`client`},{key:`terminalScrollback`,store:`client`},{key:`projectBasedLayout`,store:`client`},{key:`showAllProjectSessions`,store:`client`}]},{id:`profile`,label:`Profile`,fields:[{key:`branch_prefix`,store:`profileColumn`},{key:`icon`,store:`profileColumn`},{key:`icon_colour`,store:`profileColumn`}]},{id:`sessions`,label:`Sessions`,fields:[{key:`onboardingTemplate`,store:`profileSettings`},{key:`concurrentTemplate`,store:`profileSettings`},{key:`restartTemplate`,store:`profileSettings`},{key:`tabTitleTemplate`,store:`profileSettings`},{key:`sessionDefaults`,store:`profileSettings`},{key:`allowSkipPermissions`,store:`profileSettings`},{key:`captureSessionEnv`,store:`profileSettings`}]},{id:`editor`,label:`Editor`,fields:[{key:`editorTabSize`,store:`client`},{key:`editorWordWrap`,store:`client`},{key:`editorLinkSshHost`,store:`client`}]},{id:`hotkeys`,label:`Hotkeys`,fields:[{key:`hotkeys`,store:`profileSettings`}]},{id:`notifications`,label:`Notifications`,fields:[{key:`notifications`,store:`profileSettings`,pick:e=>{let{desktop:t,sound:n,when_focused:r}=K(e);return{desktop:t,sound:n,...r===void 0?{}:{when_focused:r}}},mergeInto:(e,t)=>({...K(t),...K(e)})}]},{id:`scratchpad`,label:`Scratchpad (profile-wide entries)`,fields:[{key:`entries`,store:`scratchpad`}]}];function J(e){return e.filter(e=>e.scope===`profile`).map(e=>({title:e.title,body:e.body,tags:e.tags,agent_type:e.agent_type}))}function rr(e){return JSON.stringify([e.title??``,e.body,e.tags,e.agent_type??``])}function ir(e,t){if(!Array.isArray(e))return[];let n=new Set(J(t).map(rr)),r=new Set,i=[];for(let t of e){let e=K(t);if(typeof e.body!=`string`||e.body.length===0)continue;let a={title:typeof e.title==`string`&&e.title!==``?e.title:null,body:e.body,tags:Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`):[],agent_type:typeof e.agent_type==`string`?e.agent_type:null},o=rr(a);n.has(o)||r.has(o)||(r.add(o),i.push(a))}return i}function ar(e,t){switch(e.store){case`client`:return t.client[e.key];case`theme`:return t.theme;case`profileSettings`:return t.profileSettings[e.key];case`profileColumn`:return t.profile[e.key];case`scratchpad`:return J(t.scratchpad)}}function or(e,t){let n={};for(let r of q){if(!e.includes(r.id))continue;let i={};for(let e of r.fields){let n=ar(e,t);n!==void 0&&(i[e.key]=e.pick?e.pick(n):n)}Object.keys(i).length>0&&(n[r.id]=i)}return n}function sr(e,t,n,r){if(!e||typeof e!=`object`)return[];let i=e,a={},o={},s={},c=[];for(let e of q){if(r&&!r.includes(e.id))continue;let l=i[e.id];if(!l||typeof l!=`object`)continue;let u=l,d=!1;for(let r of e.fields){if(!(r.key in u))continue;let e=u[r.key];if(r.store===`scratchpad`){let r=ir(e,n.scratchpad);r.length>0&&(t.createScratchpad(r),d=!0);continue}d=!0;let i=r.mergeInto?r.mergeInto(e,r.store===`profileSettings`?n.profileSettings[r.key]:void 0):e;r.store===`client`?a[r.key]=i:r.store===`theme`?t.setTheme(i):r.store===`profileSettings`?o[r.key]=i:s[r.key]=i}d&&c.push(e.label)}return Object.keys(a).length>0&&t.setClient(a),Object.keys(o).length>0&&t.patchProfileSettings(o),Object.keys(s).length>0&&t.patchProfileColumns(s),c}var cr={version:1,profiles:{}};function lr(e,t){return e.profiles[t]??{enabled:!0,groups:q.map(e=>e.id),doc:{},updatedAt:new Date(0).toISOString()}}async function ur(){try{let e=await fetch(`/cockpit/local-sync`,{headers:S(),cache:`no-store`});return e.ok?{available:!0,file:await e.json()}:{available:!1,file:cr}}catch{return{available:!1,file:cr}}}function dr(){return T({queryKey:[`local-sync`],queryFn:ur,staleTime:5e3,refetchOnWindowFocus:!0,retry:!1})}function fr(){let e=E();return ce({mutationFn:async e=>{let t=await fetch(`/cockpit/local-sync`,{method:`PUT`,headers:{...S(),"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(`The local sync store did not accept the write.`);return await t.json()},onSuccess:t=>e.setQueryData([`local-sync`],{available:!0,file:t})})}function pr(){return w()?.showNotification?`unverified`:typeof Notification>`u`?`unsupported`:Notification.permission}async function mr(e,t){let n;try{return await Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(Error(t)),1e4)})])}finally{clearTimeout(n)}}var Y;async function hr(){return!(`serviceWorker`in navigator)||!window.isSecureContext?null:(Y||=gr().catch(e=>{throw Y=void 0,e}),Y)}async function gr(){let e=await mr(navigator.serviceWorker.register(`/notification-worker.js`),`Notification support did not respond. Reload Puddle and try again.`);if(e.active)return e;let t=e.installing??e.waiting;if(!t)throw Error(`Notification support could not start. Reload and try again.`);return await new Promise((e,n)=>{let r=r=>{clearTimeout(a),t.removeEventListener(`statechange`,i),r?n(r):e()},i=()=>{t.state===`activated`?r():t.state===`redundant`&&r(Error(`Notification support could not start.`))},a=setTimeout(()=>r(Error(`Notification support timed out.`)),1e4);t.addEventListener(`statechange`,i),i()}),e}async function _r(e,t){if(!e.active)throw Error(`Notification support is not active.`);await new Promise((n,r)=>{let i=new MessageChannel,a=e=>{clearTimeout(o),i.port1.close(),e?r(e):n()},o=setTimeout(()=>a(Error(`Notification delivery timed out.`)),1e4);i.port1.onmessage=e=>a(e.data?.ok?void 0:Error(`The browser could not deliver the notification. Check system permissions.`)),e.active.postMessage({t:`show-notification`,request:t},[i.port2])})}var X={state:`unverified`,message:null},Z=new Set,Q=new Map,vr=!1,yr=!1;function br(e,t){Q.set(e,t),Q.size>64&&Q.delete(Q.keys().next().value)}function $(e){X=e;for(let e of Z)e();return e}function xr(){return(0,O.useSyncExternalStore)(e=>(Z.add(e),()=>{Z.delete(e)}),()=>X)}async function Sr(){let e=w();if(e?.notificationStatus)try{$(c.parse(await e.notificationStatus()))}catch{$({state:`failed`,message:`Could not read desktop notification delivery status.`})}}async function Cr(e,t,n){try{let r=w();if(r?.showNotification){!vr&&r.onNotificationClick&&(r.onNotificationClick((e,t)=>{t||Q.get(e)?.(),Q.delete(e)}),vr=!0),br(e.id,t);let{target:i,...a}=e;return $(c.parse(await r.showNotification({...a,...r.notificationTargets?{target:i}:{},...r.notificationSubtitles&&n?{title:`${n.host} · ${n.project.name}`.slice(0,160),subtitle:e.title}:{}})))}if(typeof Notification>`u`)return $({state:`unsupported`,message:`This browser cannot show notifications.`});if(Notification.permission!==`granted`)return $({state:`failed`,message:`Allow notifications for Puddle in browser settings.`});let i=n?{...e,title:be(e.title,n.project)}:e,a=await hr();return a?(yr||=(navigator.serviceWorker.addEventListener(`message`,e=>{e.data?.t!==`notification-click`||typeof e.data.id!=`string`||(e.data.target||Q.get(e.data.id)?.(),Q.delete(e.data.id))}),!0),br(e.id,t),await _r(a,i),$({state:`shown`,message:null})):await new Promise(n=>{let r=new Notification(i.title,{body:e.body,tag:e.id,silent:!0}),a=setTimeout(()=>n($({state:`unverified`,message:`Delivery has not been confirmed. Check system notification settings.`})),5e3);r.onshow=()=>{clearTimeout(a),n($({state:`shown`,message:null}))},r.onerror=()=>{clearTimeout(a),n($({state:`failed`,message:`The browser could not deliver the notification. Check system permissions.`}))},r.onclick=()=>{window.focus(),t(),r.close()}})}catch(e){return $({state:`failed`,message:e instanceof Error?e.message:`Notification delivery failed.`})}}export{In as A,Wn as C,z as D,B as E,M,j as N,L as O,A as P,qn as S,Hn as T,Gn as _,lr as a,Yn as b,q as c,G as d,tr as f,Xn as g,H as h,pr as i,N as j,Rn as k,sr as l,er as m,Sr as n,dr as o,nr as p,xr as r,fr as s,Cr as t,or as u,V as v,Un as w,Kn as x,Jn as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{t as r}from"./utils-B6KiDbIe.js";import{C as i,E as a,T as o,_ as s,f as c,g as l,h as u,m as d,p as f,v as p,x as m,y as h}from"./dialog-CTN-Lln6.js";import{o as g,r as _}from"./x-CbfJFzGo.js";import{_ as v,
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{t as r}from"./utils-B6KiDbIe.js";import{C as i,E as a,T as o,_ as s,f as c,g as l,h as u,m as d,p as f,v as p,x as m,y as h}from"./dialog-CTN-Lln6.js";import{o as g,r as _}from"./x-CbfJFzGo.js";import{_ as v,d as y,g as b,h as x,m as S,p as C,u as w}from"./dist-NuV8HBEc.js";var T=e(t(),1),E=n(),D=`Popover`,[O,ee]=o(D,[v]),k=v(),[A,j]=O(D),M=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=k(t),c=T.useRef(null),[u,d]=T.useState(!1),[f,p]=l({prop:r,defaultProp:i??!1,onChange:a,caller:D});return(0,E.jsx)(b,{...s,children:(0,E.jsx)(A,{scope:t,contentId:h(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:T.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:T.useCallback(()=>d(!0),[]),onCustomAnchorRemove:T.useCallback(()=>d(!1),[]),modal:o,children:n})})};M.displayName=D;var N=`PopoverAnchor`,P=T.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=j(N,n),a=k(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return T.useEffect(()=>(o(),()=>s()),[o,s]),(0,E.jsx)(C,{...a,...r,ref:t})});P.displayName=N;var F=`PopoverTrigger`,I=T.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,o=j(F,n),s=k(n),c=g(t,o.triggerRef),l=(0,E.jsx)(i.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":Z(o.open),...r,ref:c,onClick:a(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:(0,E.jsx)(C,{asChild:!0,...s,children:l})});I.displayName=F;var L=`PopoverPortal`,[R,z]=O(L,{forceMount:void 0}),B=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=j(L,t);return(0,E.jsx)(R,{scope:t,forceMount:n,children:(0,E.jsx)(s,{present:n||a.open,children:(0,E.jsx)(p,{asChild:!0,container:i,children:r})})})};B.displayName=L;var V=`PopoverContent`,H=T.forwardRef((e,t)=>{let n=z(V,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=j(V,e.__scopePopover);return(0,E.jsx)(s,{present:r||a.open,children:a.modal?(0,E.jsx)(W,{...i,ref:t}):(0,E.jsx)(G,{...i,ref:t})})});H.displayName=V;var U=_(`PopoverContent.RemoveScroll`),W=T.forwardRef((e,t)=>{let n=j(V,e.__scopePopover),r=T.useRef(null),i=g(t,r),o=T.useRef(!1);return T.useEffect(()=>{let e=r.current;if(e)return f(e)},[]),(0,E.jsx)(c,{as:U,allowPinchZoom:!0,children:(0,E.jsx)(K,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a(e.onCloseAutoFocus,e=>{e.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:a(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;o.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:a(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),G=T.forwardRef((e,t)=>{let n=j(V,e.__scopePopover),r=T.useRef(!1),i=T.useRef(!1);return(0,E.jsx)(K,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),K=T.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:f,...p}=e,h=j(V,n),g=k(n);return u(),(0,E.jsx)(d,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,E.jsx)(m,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,E.jsx)(x,{"data-state":Z(h.open),role:`dialog`,id:h.contentId,...g,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),q=`PopoverClose`,J=T.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,o=j(q,n);return(0,E.jsx)(i.button,{type:`button`,...r,ref:t,onClick:a(e.onClick,()=>o.onOpenChange(!1))})});J.displayName=q;var Y=`PopoverArrow`,X=T.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=k(n);return(0,E.jsx)(S,{...i,...r,ref:t})});X.displayName=Y;function Z(e){return e?`open`:`closed`}var Q=M,$=I,te=B,ne=H,re=Q,ie=$;function ae({className:e,align:t=`end`,sideOffset:n=8,...i}){return(0,E.jsx)(te,{children:(0,E.jsx)(ne,{align:t,sideOffset:n,className:r(`overlay-popover-motion z-50 p-5`,y,w,e),...i})})}export{ae as n,ie as r,re as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./local-store-8IcyY3pd.js";import{i as r}from"./client-settings-BdKglwtW.js";var i=e(t(),1),a=n(`puddle.ripple.boundaries`);function o(){a.set(`{}`)}function s(e){return typeof e==`number`&&Number.isInteger(e)&&e>=0&&e<=500}function c(e){if(e===`cli`||s(e))return!0;if(!e||typeof e!=`object`)return!1;let{rows:t,inputOffset:n}=e;return s(t)&&typeof n==`number`&&Number.isInteger(n)&&n>=-3&&n<=3}function l(e){try{let t=JSON.parse(e??`{}`);return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(e=>c(e[1])).slice(-256))}catch{return{}}}function u(e,t,n=null){let r=Object.entries(l(a.get())).filter(([t])=>t!==e);if(t!==null){typeof t==`number`&&(t=Math.max(0,Math.min(500,Math.round(t))));let i=typeof t==`number`&&t>0&&n!==null&&Math.abs(t-n)<=3?{rows:t,inputOffset:t-n}:t;r.push([e,i])}a.set(JSON.stringify(Object.fromEntries(r.slice(-256))))}function d(e){let{rippleEnabled:t}=r(),n=(0,i.useSyncExternalStore)(a.subscribe,a.get);return(0,i.useMemo)(()=>l(n)[e]??(t?null:`cli`),[n,e,t])}export{u as n,d as r,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return e.kind??`file`}function t(t){if(t.view===`linked`||t.view===`locked`)return t.view;let n=`${e(t)}:${t.session}:${t.sha??``}:${t.root??``}:${t.path}`;return t.git_area===void 0?n:`${n}:git-${t.git_area}`}var n={ipynb:`notebook`,md:`markdown`,markdown:`markdown`,mdown:`markdown`,html:`html`,htm:`html`};function r(e){let t=e.split(`/`).pop()??e,r=t.lastIndexOf(`.`);return r<=0?null:n[t.slice(r+1).toLowerCase()]??null}function i(e,t){if(t===``||t.startsWith(`#`)||t.startsWith(`//`)||/^[a-z][a-z0-9+.-]*:/i.test(t))return null;let n=t.split(`#`)[0].split(`?`)[0];if(n===``||n===`/`)return null;let r=[...n.startsWith(`/`)?[]:e.split(`/`).slice(0,-1)];for(let e of decodeURI(n).split(`/`))if(!(e===``||e===`.`))if(e===`..`){if(r.length===0)return null;r.pop()}else r.push(e);return r.length>0?r.join(`/`):null}function a(e){let t=[],n=0,r=e=>/[\t\n\f\r ]/.test(e);for(;n<e.length;){for(;n<e.length&&(r(e[n])||e[n]===`,`);)n+=1;if(n>=e.length)break;let i=n;for(;n<e.length&&!r(e[n]);)n+=1;let a=e.slice(i,n);if(a.endsWith(`,`)){a=a.replace(/,+$/,``),a!==``&&t.push({ref:a,descriptor:``});continue}for(;n<e.length&&r(e[n]);)n+=1;let o=n;for(;n<e.length&&e[n]!==`,`;)n+=1;let s=e.slice(o,n).trim();n<e.length&&(n+=1),a!==``&&t.push({ref:a,descriptor:s})}return t}function o(e){return e.map(({ref:e,descriptor:t})=>`${e}${t===``?``:` ${t}`}`).join(`, `)}export{t as a,o as i,r as n,e as o,i as r,a as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/use-desktop-state-Dw9EfOjg.js","assets/rolldown-runtime-QTnfLwEv.js","assets/react-CZI7_Jkm.js","assets/local-store-8IcyY3pd.js","assets/client-settings-BdKglwtW.js","assets/preload-helper-Czpn1I53.js","assets/queries-DnuokC1N.js","assets/jsx-runtime-By8HlURe.js","assets/api--n1Ha6tG.js","assets/auth-eu0vmKkB.js","assets/errors-DWF9D4n6.js","assets/dist-BOS6OKSE.js","assets/react-dom-cJyBB_A4.js","assets/preview-kind-CJ9RTgbs.js","assets/content-state-BDt3NnGs.js","assets/debounce-B9DrqirV.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./react-dom-cJyBB_A4.js";import{f as r,p as i,t as a}from"./local-store-8IcyY3pd.js";import{t as o}from"./preload-helper-Czpn1I53.js";var s=e(n(),1),c=e(t(),1);async function l(){let e=u()?.windows?.reload;e?await e():window.location.reload()}function u(){return window.puddleDesktop}function d(){let[e,t]=(0,c.useState)({fullScreen:!1,animate:!1});return(0,c.useEffect)(()=>{let e=u();if(!e)return;let n=!0;e.isFullScreen?.()?.then(e=>{n&&t({fullScreen:e,animate:!1})});let r=e.onFullScreenChange?.(e=>t({fullScreen:e,animate:!0}));return()=>{n=!1,r?.()}},[]),e}var f=[`keydown`,`keyup`,`beforeinput`,`pointerdown`,`drop`],p=e=>{e.preventDefault(),e.stopImmediatePropagation()};function m(e){let t=document.getElementById(`root`);t&&(t.inert=e);for(let t of f)e?window.addEventListener(t,p,!0):window.removeEventListener(t,p,!0);e&&document.activeElement instanceof HTMLElement&&document.activeElement.blur()}var h=null,g=null,_=!1,v=new Set,y=e=>(v.add(e),()=>{v.delete(e)});function b(e){(0,s.flushSync)(()=>{_=e;for(let e of v)e()})}function x(){return h}function S(){if(!g){let e=u()?.windows;g=e?e.context().then(async e=>{h={identity:i.parse(e.identity),hostId:e.hostId,...e.stagingTransfer?{stagingTransfer:r.parse(e.stagingTransfer)}:{},...e.stagingArrangement?{stagingArrangement:r.parse(e.stagingArrangement)}:{}},(h.stagingTransfer||h.stagingArrangement)&&m(!0);let{registerDesktopWindowLifecycle:t}=await o(async()=>{let{registerDesktopWindowLifecycle:e}=await import(`./use-desktop-state-Dw9EfOjg.js`).then(e=>e.s);return{registerDesktopWindowLifecycle:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]));await t()}):Promise.resolve()}return g}function C({children:e}){let t=(0,c.useSyncExternalStore)(y,()=>_),[n,r]=(0,c.useState)(()=>!u()?.windows||h!==null),[i,a]=(0,c.useState)(null);if((0,c.useEffect)(()=>{let e=!0;return S().then(()=>{e&&r(!0)},t=>{e&&a(t instanceof Error?t:Error(`Could not restore this window`))}),()=>{e=!1}},[]),i)throw i;return n&&!t?e:null}var w=a(`puddle.profile-id`);function T(){return(0,c.useSyncExternalStore)(w.subscribe,E)}function E(){let e=x()?.identity;if(e&&e.kind!==`host`)return e.profileId;let t=w.get();return t!==null&&/^[0-9a-f]{10}$/.test(t)?t:null}function D(e){let t=x()?.identity;t&&t.kind!==`host`||(window.location.pathname!==`/`&&window.history.replaceState(null,``,`/`),w.set(e))}export{C as a,m as c,d,T as i,u as l,w as n,x as o,D as r,b as s,E as t,l as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{q as t}from"./local-store-8IcyY3pd.js";import{c as n,l as r,n as i,o as a,s as o,t as s}from"./profile-store-CarO9MCP.js";import{n as c,t as l}from"./queries-DnuokC1N.js";import{Z as u,d,r as f,u as p}from"./use-desktop-state-Dw9EfOjg.js";var m=e({handleProjectCommand:()=>_,navigateProjectRoute:()=>h,openProjectWindow:()=>g,returnProjectWindow:()=>v});function h(e){let t=/\/session\/([^/]+)$/.exec(e)?.[1];window.history.replaceState({...window.history.state,key:crypto.randomUUID(),usr:t?{notificationSession:t}:null},``,e),window.dispatchEvent(new PopStateEvent(`popstate`))}async function g(e,i){let o=r()?.windows;if(!o?.projects||!o.transfers)throw Error(`Project windows are unavailable`);if(await o.projects.focus({profileId:e,projectId:i}))return;if(a()?.identity.kind!==`host`||s()!==e)throw Error(`The project profile changed`);let d=f(e);if(!d)throw Error(`Window working set is unavailable`);let m=await l(u);if(await d.load(async()=>(await c(e))?.ui_state??t.parse({})),s()!==e)throw Error(`The project profile changed`);let g=/^\/project\/([0-9a-f]{10})/.exec(window.location.pathname)?.[1],_=g===i?`/`:window.location.pathname;await p(d,o.transfers,o.projects,i,new Map(m.map(e=>[e.id,e.project_id])),g??i,_,n),h(_)}async function _(e){let t=a()?.identity;if(!t||t.kind!==`host`&&t.profileId!==e.profileId)throw Error(`This window belongs to another profile`);t.kind===`host`&&s()!==e.profileId&&i.set(e.profileId),e.kind===`navigate-project`?h(e.route):await g(e.profileId,e.projectId)}async function v(){let e=r(),t=a()?.identity,i=e?.windows?.transfers;if(t?.kind!==`project`||!e?.closeWindow)throw Error(`Project return is unavailable`);let s=(i?.prepareProjectDock&&i.dockTargets?await i.dockTargets(t.profileId):[]).find(e=>e.identity.kind===`host`);if(!s){e.closeWindow();return}let c=f(t.profileId);if(!c||!i)throw Error(`Window working set is unavailable`);await d(c,i,t.projectId,s.identity.id,n,o)}export{v as a,m as i,h as n,g as r,_ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{q as n,s as r}from"./local-store-8IcyY3pd.js";import{t as i}from"./jsx-runtime-By8HlURe.js";import{i as a,l as o,o as s,t as c}from"./profile-store-CarO9MCP.js";import{V as l,i as u,n as d}from"./queries-DnuokC1N.js";import{Y as f,o as p}from"./use-desktop-state-Dw9EfOjg.js";import{t as m}from"./utils-B6KiDbIe.js";import{C as h,E as g,T as _,_ as v,g as ee,v as te,x as y,y as ne}from"./dialog-CTN-Lln6.js";import{i as b,o as x}from"./x-CbfJFzGo.js";import{_ as re,g as ie,h as ae,i as oe,m as se,p as ce,u as le}from"./dist-NuV8HBEc.js";import{c as ue}from"./select-DzQdQNsv.js";import{t as de}from"./createLucideIcon-DyMAgLa3.js";import{c as fe,n as pe}from"./switch-BsUkvj8j.js";import{n as S}from"./errors-DWF9D4n6.js";import{t as me}from"./debounce-B9DrqirV.js";var C=e(t(),1),w=i(),[T,he]=_(`Tooltip`,[re]),E=re(),D=`TooltipProvider`,ge=700,O=`tooltip.open`,[_e,k]=T(D),A=e=>{let{__scopeTooltip:t,delayDuration:n=ge,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=C.useRef(!0),s=C.useRef(!1),c=C.useRef(0);return C.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,w.jsx)(_e,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:C.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:C.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:C.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};A.displayName=D;var j=`Tooltip`,[ve,M]=T(j),N=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=k(j,e.__scopeTooltip),l=E(t),[u,d]=C.useState(null),f=ne(),p=C.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=C.useRef(!1),[_,v]=ee({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(O))):c.onClose(),a?.(e)},caller:j}),te=C.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),y=C.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),b=C.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),x=C.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return C.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,w.jsx)(ie,{...l,children:(0,w.jsx)(ve,{scope:t,contentId:f,open:_,stateAttribute:te,trigger:u,onTriggerChange:d,onTriggerEnter:C.useCallback(()=>{c.isOpenDelayedRef.current?x():y()},[c.isOpenDelayedRef,x,y]),onTriggerLeave:C.useCallback(()=>{m?b():(window.clearTimeout(p.current),p.current=0)},[b,m]),onOpen:y,onClose:b,disableHoverableContent:m,children:n})})};N.displayName=j;var P=`TooltipTrigger`,F=C.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=M(P,n),a=k(P,n),o=E(n),s=x(t,C.useRef(null),i.onTriggerChange),c=C.useRef(!1),l=C.useRef(!1),u=C.useCallback(()=>c.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,w.jsx)(ce,{asChild:!0,...o,children:(0,w.jsx)(h.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:g(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:g(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:g(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:g(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:g(e.onBlur,i.onClose),onClick:g(e.onClick,i.onClose)})})});F.displayName=P;var I=`TooltipPortal`,[ye,be]=T(I,{forceMount:void 0}),L=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=M(I,t);return(0,w.jsx)(ye,{scope:t,forceMount:n,children:(0,w.jsx)(v,{present:n||a.open,children:(0,w.jsx)(te,{asChild:!0,container:i,children:r})})})};L.displayName=I;var R=`TooltipContent`,z=C.forwardRef((e,t)=>{let n=be(R,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=M(R,e.__scopeTooltip);return(0,w.jsx)(v,{present:r||o.open,children:o.disableHoverableContent?(0,w.jsx)(B,{side:i,...a,ref:t}):(0,w.jsx)(xe,{side:i,...a,ref:t})})}),xe=C.forwardRef((e,t)=>{let n=M(R,e.__scopeTooltip),r=k(R,e.__scopeTooltip),i=C.useRef(null),a=x(t,i),[o,s]=C.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=C.useCallback(()=>{s(null),d(!1)},[d]),p=C.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=De(r,Ee(r,n.getBoundingClientRect())),a=Oe(t.getBoundingClientRect()),o=Ae([...i,...a]);s(o),d(!0)},[d]);return C.useEffect(()=>()=>f(),[f]),C.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),C.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!ke(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,w.jsx)(B,{...e,ref:a})}),[Se,Ce]=T(j,{isInside:!1}),we=b(`TooltipContent`),B=C.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=M(R,n),l=E(n),{onClose:u}=c;return C.useEffect(()=>(document.addEventListener(O,u),()=>document.removeEventListener(O,u)),[u]),C.useEffect(()=>{if(c.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,w.jsx)(y,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,w.jsxs)(ae,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,w.jsx)(we,{children:r}),(0,w.jsx)(Se,{scope:n,isInside:!0,children:(0,w.jsx)(ue,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});z.displayName=R;var V=`TooltipArrow`,Te=C.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=E(n);return Ce(V,n).isInside?null:(0,w.jsx)(se,{...i,...r,ref:t})});Te.displayName=V;function Ee(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function De(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Oe(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ke(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Ae(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),je(t)}function je(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Me=A,Ne=N,Pe=F,Fe=L,Ie=z,Le=Me,Re=Ne,ze=Pe;function Be({className:e,sideOffset:t=4,portalled:n=!0,...r}){let i=(0,w.jsx)(Ie,{sideOffset:t,className:m(`z-50 overflow-hidden px-2 py-1 text-xs text-fg`,oe,le,`overlay-tooltip-motion`,e),...r});return n?(0,w.jsx)(Fe,{children:i}):i}var Ve=de(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);function He({initial:e,maxLength:t,className:n,fitContent:r=!1,onCommit:i,onCancel:a}){let[o,s]=(0,C.useState)(e),c=(0,w.jsx)(`input`,{autoFocus:!0,value:o,maxLength:t,onFocus:e=>e.currentTarget.select(),onChange:e=>s(e.target.value),onBlur:()=>i(o),onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`?i(o):e.key===`Escape`&&a()},className:m(`bg-transparent outline-none`,r?`col-start-1 row-start-1 w-0 min-w-full p-0`:n)});return r?(0,w.jsxs)(`span`,{className:m(`inline-grid min-w-px`,n),children:[(0,w.jsx)(`span`,{"aria-hidden":`true`,className:`invisible col-start-1 row-start-1 whitespace-pre`,children:o||``}),c]}):c}function Ue(e){return{onClick:e=>{e.detail===2&&e.preventDefault()},onDoubleClick:t=>{t.preventDefault(),e()}}}var H=null;function We(e){return H=e,()=>{H===e&&(H=null)}}function Ge(){H?.()}var U=null;function Ke(e){return U=e,()=>{U===e&&(U=null)}}async function qe(e){if(!U)throw Error(`Open a project before opening a path.`);await U(e)}function Je(){let e=l(a()??void 0).data?.tabTitleTemplate;return(0,C.useCallback)(t=>pe(t,e),[e])}var W=(0,C.createContext)({open:()=>void 0,handler:null,setHandler:()=>void 0});function Ye({children:e}){let[t,n]=(0,C.useState)(null),r=(0,C.useCallback)(e=>n(()=>e),[]),i=(0,C.useCallback)(e=>t?.(e),[t]),a=(0,C.useMemo)(()=>({open:i,handler:t,setHandler:r}),[i,t,r]);return(0,w.jsx)(W.Provider,{value:a,children:e})}function Xe(){return(0,C.useContext)(W)}var G=new Map;function Ze(e,t){let n={text:t},r=()=>{document.title=G.get(`workspace`)?.text??G.get(`shell`)?.text??`Puddle`};return G.set(e,n),r(),()=>{G.get(e)===n&&(G.delete(e),r())}}function Qe(e,t){(0,C.useEffect)(()=>Ze(e,t),[e,t])}function $e({className:e,strokeScale:t=1}){return(0,w.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.8*t,strokeLinecap:`round`,"aria-hidden":!0,children:[(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`22`,y2:`12`}),(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17`,y2:`20.66`}),(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`7`,y2:`20.66`}),(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`2`,y2:`12`}),(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`7`,y2:`3.34`}),(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17`,y2:`3.34`}),(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17.63`,y2:`15.25`}),(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`12`,y2:`18.5`}),(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`6.37`,y2:`15.25`}),(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`6.37`,y2:`8.75`}),(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`12`,y2:`5.5`}),(0,w.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17.63`,y2:`8.75`})]})}function et({className:e,strokeScale:t=1}){return(0,w.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.6*t,"aria-hidden":!0,children:[(0,w.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`}),(0,w.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`,transform:`rotate(60 12 12)`}),(0,w.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`,transform:`rotate(120 12 12)`})]})}function tt({className:e,strokeScale:t=1}){return(0,w.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.8*t,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,w.jsx)(`path`,{d:`M8 4H4v16h4`}),(0,w.jsx)(`path`,{d:`M16 4h4v16h-4`}),(0,w.jsx)(`rect`,{x:`10.5`,y:`10.5`,width:`3`,height:`3`,fill:`currentColor`,stroke:`none`})]})}function nt({className:e}){return(0,w.jsx)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`currentColor`,"aria-hidden":!0,children:(0,w.jsx)(`path`,{d:`M12 1.5c0 5.8 4.7 10.5 10.5 10.5C16.7 12 12 16.7 12 22.5 12 16.7 7.3 12 1.5 12 7.3 12 12 7.3 12 1.5Z`})})}function rt({type:e,className:t,strokeScale:n=1}){switch(e){case`claude-code`:return(0,w.jsx)($e,{className:t,strokeScale:n});case`codex`:return(0,w.jsx)(et,{className:t,strokeScale:n});case`opencode`:return(0,w.jsx)(tt,{className:t,strokeScale:n});case`gemini-cli`:return(0,w.jsx)(nt,{className:t});default:return(0,w.jsx)(fe,{className:t,strokeWidth:2*n})}}var K=new Set,q=!1,it=null;function at(){for(let e of K)e()}function ot(e){return K.add(e),()=>K.delete(e)}function st(e){q!==e&&(q=e,at())}function ct(){st(!q)}function lt(){return(0,C.useSyncExternalStore)(ot,()=>q)}function ut(e){it=e,at()}function dt(){return(0,C.useSyncExternalStore)(ot,()=>it)}function ft(e){return JSON.stringify(pt(e))}function pt(e){return e===null?null:e.kind===`leaf`?e.tabs.length===0?null:{t:e.tabs.map(f)}:{d:e.direction,s:e.sizes.map(e=>Math.round(e*10)/10),c:e.children.map(pt)}}var J=new Set,Y=!1,mt=null;function X(){for(let e of J)e()}function ht(e){return J.add(e),()=>J.delete(e)}function gt(e){Y!==e&&(Y=e,X())}function _t(){gt(!Y)}function vt(){return(0,C.useSyncExternalStore)(ht,()=>Y)}function yt(e){mt=e,X()}function bt(){return(0,C.useSyncExternalStore)(ht,()=>mt)}var xt=2e3,St=n.parse({});function Z(e){return`puddle.ws.${e}`}function Ct(e){if(e===null)return{kind:`absent`};try{return{kind:`present`,snapshot:n.parse(JSON.parse(e))}}catch{return{kind:`corrupt`}}}function wt(){let e=a(),t=p(e),n=t!==null,[r,i]=(0,C.useState)(!1),[o,s]=(0,C.useState)(St),c=(0,C.useRef)(o);c.current=o;let l=(0,C.useRef)(null),f=(0,C.useMemo)(()=>me((e,t)=>{u(e,t).catch(e=>console.warn(`ui-state save failed: ${e.message}`))},xt),[]);return(0,C.useEffect)(()=>{if(n)return;if(e===null){l.current=null;return}let t=Z(e);l.current=t;let r=!1;i(!1),s(St);let a;try{a=Ct(sessionStorage.getItem(t)),a.kind===`corrupt`&&sessionStorage.removeItem(t)}catch(e){console.warn(`ui-state read failed: ${e.message}`),a={kind:`absent`}}return a.kind===`present`?(s(a.snapshot),i(!0)):d(e).then(e=>{r||(e&&s(e.ui_state),i(!0))}).catch(e=>{console.warn(`ui-state load failed: ${e.message}`),r||i(!0)}),()=>{r=!0,f.flush()}},[e,f,n]),t||{loaded:r,snapshot:o,current:()=>c.current,update(t){if(e===null)return;let n={...c.current,...t};c.current=n,s(n);let r=l.current??Z(e);f(e,n);try{sessionStorage.setItem(r,JSON.stringify(n))}catch(e){console.warn(`ui-state write failed: ${e.message}`)}}}}var Q=`application/x-puddle-project-window`;function $(e){let t=s()?.identity;return t?.kind===`project`&&t.projectId===e&&o()?.windows?.transfers?.beginProjectDrag!==void 0}function Tt(e,t){if(!$(t))return!1;let n=s();if(n.identity.kind!==`project`)return!1;let{profileId:r}=n.identity,i=crypto.randomUUID();return e.setData(Q,JSON.stringify({token:i,sourceId:n.identity.id,hostId:n.hostId,profileId:r})),e.effectAllowed=`move`,o().windows.transfers.beginProjectDrag({token:i,profileId:r,projectId:t}).catch(S),!0}async function Et(e){if(e.length>4096)throw Error(`Project drag is too large`);let t=r.parse(JSON.parse(e)),n=s(),i=o()?.windows?.transfers;if(n?.identity.kind!==`host`||!i?.dropProject)throw Error(`Return the project to a host window`);if(n.hostId!==t.hostId)throw Error(`Cannot transfer between hosts`);if(c()!==t.profileId)throw Error(`Select the same profile in the host before returning the project`);await i.dropProject({token:t.token,sourceId:t.sourceId,profileId:t.profileId})}function Dt(){let e=(0,C.useRef)(null),[t,n]=(0,C.useState)(!1),r=s()?.identity.kind===`host`&&o()?.windows?.transfers?.dropProject!==void 0;return(0,C.useEffect)(()=>{let t=e.current;if(!r||!t)return;let i,a=()=>{clearTimeout(i),n(!1)},o=e=>e.dataTransfer?.types.includes(Q),s=e=>{o(e)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`move`,n(!0),clearTimeout(i),i=setTimeout(a,750))},c=e=>{t.contains(e.relatedTarget)||a()},l=e=>{o(e)&&(e.preventDefault(),e.stopPropagation(),a(),Et(e.dataTransfer.getData(Q)).catch(S))};return t.addEventListener(`dragenter`,s,!0),t.addEventListener(`dragover`,s,!0),t.addEventListener(`dragleave`,c,!0),t.addEventListener(`drop`,l,!0),window.addEventListener(`dragend`,a),window.addEventListener(`blur`,a),()=>{clearTimeout(i),t.removeEventListener(`dragenter`,s,!0),t.removeEventListener(`dragover`,s,!0),t.removeEventListener(`dragleave`,c,!0),t.removeEventListener(`drop`,l,!0),window.removeEventListener(`dragend`,a),window.removeEventListener(`blur`,a)}},[r]),{ref:e,active:t,enabled:r}}export{Re as A,qe as C,He as D,We as E,Le as M,ze as N,Ue as O,Je as S,Ge as T,lt as _,wt as a,Ye as b,gt as c,vt as d,ft as f,dt as g,ct as h,Ct as i,Be as j,Ve as k,_t as l,st as m,$ as n,Z as o,ut as p,Dt as r,yt as s,Tt as t,bt as u,rt as v,Ke as w,Xe as x,Qe as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./local-store-8IcyY3pd.js";var e={major:26,minor:22};function t(t,n,r=e){return t?.major===r.major&&(t.major>n.major||t.major===n.major&&t.minor>=n.minor)}var n=e=>t(e,{major:25,minor:15});function r(e,t,n){return!e||e.major>t||e.major===t&&e.minor>=n}var i=e=>e!==void 0&&r(e,21,3),a=e=>e!==void 0&&r(e,24,5);function o(e){return r(e,17,1)}function s(e){return r(e,17,3)}var c=e=>e!==void 0&&r(e,24,4),l=e=>r(e,10,3),u=e=>r(e,12,3),d=e=>r(e,12,4),f=e=>r(e,15,3),p=e=>e!==void 0&&r(e,16,3),m=e=>r(e,16,4),h=e=>r(e,14,1),g=e=>e!==void 0&&r(e,24,6),_=e=>e!==void 0&&r(e,25,1),v=e=>e!==void 0&&r(e,25,2),y=e=>e!==void 0&&r(e,25,3),b=e=>e!==void 0&&r(e,25,4),x=e=>e!==void 0&&r(e,26,3),S=e=>t(e,{major:26,minor:4}),C=e=>t(e,{major:26,minor:5}),w=e=>t(e,{major:26,minor:6});export{t as C,l as S,x as _,p as a,n as b,h as c,S as d,m as f,g,y as h,o as i,d as l,v as m,c as n,C as o,_ as p,s as r,w as s,u as t,i as u,b as v,f as x,a as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e}from"./editor.api2-
|
|
1
|
+
import{h as e}from"./editor.api2-Cyagyq8b.js";var t={comments:{lineComment:`#`,blockComment:[`'''`,`'''`]},brackets:[[`{`,`}`],[`[`,`]`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`,notIn:[`string`]},{open:`'`,close:`'`,notIn:[`string`,`comment`]}],surroundingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],onEnterRules:[{beforeText:RegExp(`^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$`),action:{indentAction:e.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:RegExp(`^\\s*#region\\b`),end:RegExp(`^\\s*#endregion\\b`)}}},n={defaultToken:``,tokenPostfix:`.python`,keywords:`False.None.True._.and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.exec.finally.for.from.global.if.import.in.is.lambda.match.nonlocal.not.or.pass.print.raise.return.try.type.while.with.yield.int.float.long.complex.hex.abs.all.any.apply.basestring.bin.bool.buffer.bytearray.callable.chr.classmethod.cmp.coerce.compile.complex.delattr.dict.dir.divmod.enumerate.eval.execfile.file.filter.format.frozenset.getattr.globals.hasattr.hash.help.id.input.intern.isinstance.issubclass.iter.len.locals.list.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.reversed.range.raw_input.reduce.reload.repr.reversed.round.self.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.unichr.unicode.vars.xrange.zip.__dict__.__methods__.__members__.__class__.__bases__.__name__.__mro__.__subclasses__.__init__.__import__`.split(`.`),brackets:[{open:`{`,close:`}`,token:`delimiter.curly`},{open:`[`,close:`]`,token:`delimiter.bracket`},{open:`(`,close:`)`,token:`delimiter.parenthesis`}],tokenizer:{root:[{include:`@whitespace`},{include:`@numbers`},{include:`@strings`},[/[,:;]/,`delimiter`],[/[{}\[\]()]/,`@brackets`],[/@[a-zA-Z_]\w*/,`tag`],[/[a-zA-Z_]\w*/,{cases:{"@keywords":`keyword`,"@default":`identifier`}}]],whitespace:[[/\s+/,`white`],[/(^#.*$)/,`comment`],[/'''/,`string`,`@endDocString`],[/"""/,`string`,`@endDblDocString`]],endDocString:[[/[^']+/,`string`],[/\\'/,`string`],[/'''/,`string`,`@popall`],[/'/,`string`]],endDblDocString:[[/[^"]+/,`string`],[/\\"/,`string`],[/"""/,`string`,`@popall`],[/"/,`string`]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,`number.hex`],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,`number`]],strings:[[/'$/,`string.escape`,`@popall`],[/f'{1,3}/,`string.escape`,`@fStringBody`],[/'/,`string.escape`,`@stringBody`],[/"$/,`string.escape`,`@popall`],[/f"{1,3}/,`string.escape`,`@fDblStringBody`],[/"/,`string.escape`,`@dblStringBody`]],fStringBody:[[/[^\\'\{\}]+$/,`string`,`@popall`],[/[^\\'\{\}]+/,`string`],[/\{[^\}':!=]+/,`identifier`,`@fStringDetail`],[/\\./,`string`],[/'/,`string.escape`,`@popall`],[/\\$/,`string`]],stringBody:[[/[^\\']+$/,`string`,`@popall`],[/[^\\']+/,`string`],[/\\./,`string`],[/'/,`string.escape`,`@popall`],[/\\$/,`string`]],fDblStringBody:[[/[^\\"\{\}]+$/,`string`,`@popall`],[/[^\\"\{\}]+/,`string`],[/\{[^\}':!=]+/,`identifier`,`@fStringDetail`],[/\\./,`string`],[/"/,`string.escape`,`@popall`],[/\\$/,`string`]],dblStringBody:[[/[^\\"]+$/,`string`,`@popall`],[/[^\\"]+/,`string`],[/\\./,`string`],[/"/,`string.escape`,`@popall`],[/\\$/,`string`]],fStringDetail:[[/[:][^}]+/,`string`],[/[!][ars]/,`string`],[/=/,`string`],[/\}/,`identifier`,`@pop`]]}};export{t as conf,n as language};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{n as r}from"./api--n1Ha6tG.js";var i=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},a=new class extends i{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},o={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},s=new class{#e=o;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function c(e){setTimeout(e,0)}var l=typeof window>`u`||`Deno`in globalThis;function u(){}function d(e,t){return typeof e==`function`?e(t):e}function f(e){return typeof e==`number`&&e>=0&&e!==1/0}function p(e,t){return Math.max(e+(t||0)-Date.now(),0)}function m(e,t){return typeof e==`function`?e(t):e}function h(e,t){return typeof e==`function`?e(t):e}function g(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==v(o,t.options))return!1}else if(!b(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function _(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(y(t.options.mutationKey)!==y(a))return!1}else if(!b(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function v(e,t){return(t?.queryKeyHashFn||y)(e)}function y(e){return JSON.stringify(e,(e,t)=>T(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function b(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>b(e[n],t[n])):!1}var x=Object.prototype.hasOwnProperty;function S(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=w(e)&&w(t);if(!r&&!(T(e)&&T(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:x.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=S(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function C(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function T(e){if(!ee(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ee(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ee(e){return Object.prototype.toString.call(e)===`[object Object]`}function te(e){return new Promise(t=>{s.setTimeout(t,e)})}function E(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:S(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var D=Symbol();function ie(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===D?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function O(e,t){return typeof e==`function`?e(...t):!!e}function ae(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var k=(()=>{let e=()=>l;return{isServer(){return e()},setIsServer(t){e=t}}})();function A(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var oe=c;function se(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=oe,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var j=se(),M=new class extends i{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ce(e){return Math.min(1e3*2**e,3e4)}function N(e){return(e??`online`)!==`online`||M.isOnline()}var P=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function F(e){let t=!1,n=0,r,i=A(),o=()=>i.status!==`pending`,s=t=>{if(!o()){let n=new P(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>a.isFocused()&&(e.networkMode===`always`||M.isOnline())&&e.canRun(),d=()=>N(e.networkMode)&&e.canRun(),f=e=>{o()||(r?.(),i.resolve(e))},p=e=>{o()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(o()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),h=()=>{if(o())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(o())return;let i=e.retry??(k.isServer()?0:3),a=e.retryDelay??ce,s=typeof a==`function`?a(n,r):a,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),te(s).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),i)}}var I=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),f(this.gcTime)&&(this.#e=s.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(k.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(s.clearTimeout(this.#e),this.#e=void 0)}};function le(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ae(e,()=>t.signal,()=>n=!0)},u=ie(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?re:ne;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?R:L,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:L(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function L(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function R(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ue(e,t){return t?L(e,t)!=null:!1}function de(e,t){return!t||!e.getPreviousPageParam?!1:R(e,t)!=null}var fe=class extends I{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=V(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=V(this.options);e.data!==void 0&&(this.setState(B(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=E(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(u).catch(u):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>h(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===D||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>m(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!p(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=ie(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?le(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=F({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof P&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof P){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...z(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...B(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),j.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function z(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function B(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function V(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var H=class extends i{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=A(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),U(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return W(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return W(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof h(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!C(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&G(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||h(this.options.enabled,this.#t)!==h(t.enabled,this.#t)||m(this.options.staleTime,this.#t)!==m(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||h(this.options.enabled,this.#t)!==h(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return me(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(u)),t}#g(){this.#b();let e=m(this.options.staleTime,this.#t);if(k.isServer()||this.#r.isStale||!f(e))return;let t=p(this.#r.dataUpdatedAt,e)+1;this.#d=s.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(k.isServer()||h(this.options.enabled,this.#t)===!1||!f(this.#p)||this.#p===0)&&(this.#f=s.setInterval(()=>{(this.options.refetchIntervalInBackground||a.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(s.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(s.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&U(e,t),o=i&&G(e,n,t,r);(a||o)&&(l={...l,...z(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let g=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=E(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!g)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=E(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:K(e,t),refetch:this.refetch,promise:this.#o,isEnabled:h(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{let e=this.#o=S.promise=A();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!C(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){j.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function pe(e,t){return h(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&h(t.retryOnMount,e)===!1)}function U(e,t){return pe(e,t)||e.state.data!==void 0&&W(e,t,t.refetchOnMount)}function W(e,t,n){if(h(t.enabled,e)!==!1&&m(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&K(e,t)}return!1}function G(e,t,n,r){return(e!==t||h(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&K(e,n)}function K(e,t){return h(t.enabled,e)!==!1&&e.isStaleByTime(m(t.staleTime,e))}function me(e,t){return!C(e.getCurrentResult(),t)}var he=class extends I{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ge(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=F({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),j.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function ge(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var _e=class extends i{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),C(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&y(t.mutationKey)!==y(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??ge();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){j.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},q=e(t(),1),ve=n(),ye=q.createContext(void 0),J=e=>{let t=q.useContext(ye);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},be=({client:e,children:t})=>(q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,ve.jsx)(ye.Provider,{value:e,children:t})),xe=q.createContext(!1),Se=()=>q.useContext(xe);xe.Provider;function Ce(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var we=q.createContext(Ce()),Te=()=>q.useContext(we),Ee=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?O(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},De=e=>{q.useEffect(()=>{e.clearReset()},[e])},Oe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||O(n,[e.error,r])),ke=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Ae=(e,t)=>e.isLoading&&e.isFetching&&!t,je=(e,t)=>e?.suspense&&t.isPending,Me=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ne(e,t,n){let r=Se(),i=Te(),a=J(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,ke(o),Ee(o,i,s),De(i);let l=!a.getQueryCache().get(o.queryHash),[d]=q.useState(()=>new t(a,o)),f=d.getOptimisticResult(o),p=!r&&c;if(q.useSyncExternalStore(q.useCallback(e=>{let t=p?d.subscribe(j.batchCalls(e)):u;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),q.useEffect(()=>{d.setOptions(o)},[o,d]),je(o,f))throw Me(o,d,i);if(Oe({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!k.isServer()&&Ae(f,r)&&(l?Me(o,d,i):s?.promise)?.catch(u).finally(()=>{d.updateResult()}),o.notifyOnChangeProps?f:d.trackResult(f)}function Y(e,t){return Ne(e,H,t)}function X(e,t){let n=J(t),[r]=q.useState(()=>new _e(n,e));q.useEffect(()=>{r.setOptions(e)},[r,e]);let i=q.useSyncExternalStore(q.useCallback(e=>r.subscribe(j.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=q.useCallback((e,t)=>{r.mutate(e,t).catch(u)},[r]);if(i.error&&O(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Pe=12,Z=typeof document<`u`?document.hasFocus():!0;typeof window<`u`&&(window.addEventListener(`focus`,()=>{Z=!0}),window.addEventListener(`blur`,()=>{Z=!1}),a.setEventListener(e=>{let t=()=>e(void 0);return window.addEventListener(`visibilitychange`,t,!1),window.addEventListener(`focus`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t),window.removeEventListener(`focus`,t)}}));function Q(e){return()=>Z?e:e*Pe}function Fe(){return Y({queryKey:[`profiles`],queryFn:()=>r(`GET`,`/api/profiles`)})}function Ie(e){return Y({queryKey:[`profile-settings`,e],queryFn:()=>r(`GET`,`/api/profiles/${e}/settings`),enabled:e!==void 0})}function Le(e){return Y({queryKey:[`accounts`,e],queryFn:()=>r(`GET`,`/api/accounts?profile=${e}`),enabled:e!==void 0})}function Re(e){return Y({queryKey:[`account-usage`,e],queryFn:()=>r(`GET`,`/api/accounts/${e}/usage`),enabled:e!==void 0,staleTime:15e3})}function ze(){return Y({queryKey:[`repos`],queryFn:()=>r(`GET`,`/api/repos`)})}function Be(e,t=!0){return Y({queryKey:[`projects`,e??`all`],queryFn:()=>r(`GET`,e===void 0?`/api/projects`:`/api/projects?profile=${e}`),enabled:t})}function Ve(e){return Y({queryKey:[`project`,e],queryFn:()=>r(`GET`,`/api/projects/${e}`),enabled:e!==void 0,placeholderData:e=>e})}function He(e){return r(`POST`,`/api/projects/${e}/conversations/refresh`)}function Ue(e){return Y({queryKey:[`sessions`,e],queryFn:()=>r(`GET`,`/api/sessions?project=${e}`),enabled:e!==void 0})}var We={queryKey:[`sessions`,`all`],queryFn:()=>r(`GET`,`/api/sessions`)};function Ge(e=!0){return Y({...We,enabled:e})}function Ke(e){return e.fetchQuery({...We,staleTime:0})}function qe(){return Y({queryKey:[`config`],queryFn:()=>r(`GET`,`/api/config`)})}function Je(e){return Y({queryKey:[`repo-branches`,e],queryFn:()=>r(`GET`,`/api/repos/${e}/branches`),enabled:e!==void 0,staleTime:3e4})}function Ye(e,t=1e4){return Y({queryKey:[`repo-worktrees`,e],queryFn:()=>r(`GET`,`/api/repos/${e}/worktrees`),enabled:e!==void 0,staleTime:t})}function Xe(e,t){let n=J();return X({mutationFn:t=>r(`DELETE`,`/api/repos/${e}/worktrees?path=${encodeURIComponent(t)}`),onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function Ze(e,t){let n=J();return X({mutationFn:({name:t,confirm:n})=>{let i=new URLSearchParams({name:t});return n&&i.set(`confirm`,`1`),r(`DELETE`,`/api/repos/${e}/branches?${i.toString()}`)},onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function Qe(e){return Y({queryKey:[`fs-dirs`,e],queryFn:()=>r(`GET`,`/api/fs/dirs?prefix=${encodeURIComponent(e)}`),enabled:e.startsWith(`/`)||e.startsWith(`~`),placeholderData:e=>e,staleTime:1e4})}function $e(){return Y({queryKey:[`version`],queryFn:()=>r(`GET`,`/api/version`),staleTime:1/0})}function et(){return Y({queryKey:[`host`],queryFn:()=>r(`GET`,`/api/host`),staleTime:1/0})}function tt(e){return e?e.displayName||e.hostname:void 0}function nt(){return Y({queryKey:[`agents`],queryFn:()=>r(`GET`,`/api/agents`),staleTime:3e4,refetchOnWindowFocus:!0})}function rt(){let e=J();return X({mutationFn:e=>r(`POST`,`/api/profiles`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function it(e){let t=J();return X({mutationFn:t=>r(`PATCH`,`/api/profiles/${e}/settings`,t),onSuccess:n=>t.setQueryData([`profile-settings`,e],n)})}function at(){let e=J();return X({mutationFn:({id:e,...t})=>r(`PATCH`,`/api/profiles/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function ot(){let e=J();return X({mutationFn:({id:e,...t})=>r(`PATCH`,`/api/accounts/${e}`,t),onSuccess:t=>{e.invalidateQueries({queryKey:[`accounts`,t.profile_id]}),e.invalidateQueries({queryKey:[`account-usage`,t.id]})}})}function st(){let e=J();return X({mutationFn:e=>r(`DELETE`,`/api/profiles/${e}`),onSuccess:()=>e.clear()})}function ct(){let e=J();return X({mutationFn:e=>r(`DELETE`,`/api/accounts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`accounts`]})})}function lt(){let e=J();return X({mutationFn:e=>r(`POST`,`/api/accounts`,e),onSuccess:t=>void e.invalidateQueries({queryKey:[`accounts`,t.profile_id]})})}function ut(){return X({mutationFn:e=>r(`POST`,`/api/accounts/${e}/login`)})}function dt(){let e=J();return X({mutationFn:e=>r(`POST`,`/api/repos`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function ft(){let e=J();return X({mutationFn:({id:e,...t})=>r(`PATCH`,`/api/repos/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function pt(){let e=J();return X({mutationFn:e=>r(`POST`,`/api/repos/${e}/fetch`),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function mt(){let e=J();return X({mutationFn:e=>r(`POST`,`/api/projects`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`projects`]})})}function ht(){let e=J();return X({mutationFn:({id:e,...t})=>r(`PATCH`,`/api/projects/${e}`,t),onSuccess:t=>{e.setQueryData([`project`,t.id],e=>e&&{...e,project:t}),e.invalidateQueries({queryKey:[`projects`]})}})}function gt(e,t){return Y({queryKey:[`scratchpad`,e,t??`none`],queryFn:()=>r(`GET`,`/api/scratchpad?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function _t(){let e=J();return X({mutationFn:e=>r(`POST`,`/api/scratchpad`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function vt(){let e=J();return X({mutationFn:({id:e,...t})=>r(`PATCH`,`/api/scratchpad/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function yt(){let e=J();return X({mutationFn:e=>r(`DELETE`,`/api/scratchpad/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function bt(e,t){return Y({queryKey:[`layouts`,e,t??`none`],queryFn:()=>r(`GET`,`/api/layouts?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function xt(){let e=J();return X({mutationFn:e=>r(`POST`,`/api/layouts`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function St(){let e=J();return X({mutationFn:({id:e,...t})=>r(`PATCH`,`/api/layouts/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function Ct(){let e=J();return X({mutationFn:e=>r(`DELETE`,`/api/layouts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function $(e,t){e.invalidateQueries({queryKey:[`sessions`]}),e.invalidateQueries({queryKey:[`project`,t.project_id]})}function wt(){let e=J();return X({mutationFn:e=>r(`POST`,`/api/sessions`,e),onSuccess:t=>$(e,t)})}function Tt(e){let t=J();return X({mutationFn:t=>r(`POST`,`/api/sessions/${t}/${e}`),onSuccess:e=>$(t,e)})}function Et(){let e=J();return X({mutationFn:({sessionId:e,accountId:t})=>r(`POST`,`/api/sessions/${e}/migrate`,{account_id:t}),onSuccess:t=>$(e,t)})}function Dt(){let e=J();return X({mutationFn:({sessionId:e,accountId:t})=>r(`POST`,`/api/sessions/${e}/handoff`,{account_id:t}),onSuccess:(t,{sessionId:n})=>{$(e,t),e.invalidateQueries({queryKey:[`session`,n]})}})}function Ot(){let e=J();return X({mutationFn:e=>r(`POST`,`/api/sessions/${e}/archive`),onSuccess:t=>$(e,t)})}function kt(){let e=J();return X({mutationFn:e=>r(`POST`,`/api/sessions/${e}/unarchive`),onSuccess:t=>$(e,t)})}function At(){let e=J();return X({mutationFn:({sessionId:e,title:t})=>r(`PATCH`,`/api/sessions/${e}`,{title:t}),onSuccess:t=>$(e,t)})}function jt(){let e=J();return X({mutationFn:e=>r(`PATCH`,`/api/config`,e),onSuccess:(t,n)=>{e.setQueryData([`config`],t),`displayName`in n&&e.invalidateQueries({queryKey:[`host`]})}})}async function Mt(e){try{return await r(`GET`,`/api/profiles/${e}/state`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`no_state`)return null;throw e}}function Nt(e,t){return r(`PUT`,`/api/profiles/${e}/state`,{ui_state:t})}function Pt(e,t){return Y({queryKey:[`ports`,e],queryFn:()=>r(`GET`,`/api/sessions/${e}/ports`),enabled:e!==void 0&&t,refetchInterval:Q(5e3),refetchIntervalInBackground:!1})}function Ft(e,t){return Y({queryKey:[`session-env`,e],queryFn:()=>r(`GET`,`/api/sessions/${e}/env`),enabled:e!==void 0&&t,refetchInterval:Q(5e3),refetchIntervalInBackground:!1})}function It(){let e=J();return X({mutationFn:e=>r(`DELETE`,`/api/sessions/${e}/env`),onSuccess:(t,n)=>{e.setQueryData([`session-env`,n],{vars:[]})}})}export{Pt as $,bt as A,vt as B,Ct as C,m as Ct,pt as D,Qe as E,i as Et,St as F,Xe as G,Fe as H,at as I,Ye as J,At as K,it as L,Et as M,ot as N,Dt as O,jt as P,Ft as Q,ht as R,Ze as S,S as St,yt as T,a as Tt,Ve as U,Ie as V,Be as W,gt as X,ze as Y,Tt as Z,dt as _,v as _t,He as a,Ne as at,$e as b,u as bt,nt as c,he as ct,It as d,ue as dt,Ue as et,qe as f,de as ft,mt as g,y as gt,rt as h,d as ht,Nt as i,Y as it,ut as j,et as k,Ge as l,H as lt,xt as m,j as mt,Mt as n,Q as nt,Re as o,be as ot,lt as p,M as pt,Je as q,tt as r,X as rt,Le as s,J as st,Ke as t,kt as tt,Ot as u,fe as ut,_t as v,_ as vt,st as w,D as wt,ct as x,b as xt,wt as y,g as yt,ft as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e}from"./editor.api2-
|
|
1
|
+
import{h as e}from"./editor.api2-Cyagyq8b.js";var t=[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`menuitem`,`meta`,`param`,`source`,`track`,`wbr`],n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[`<!--`,`-->`]},brackets:[[`<!--`,`-->`],[`<`,`>`],[`{`,`}`],[`(`,`)`]],autoClosingPairs:[{open:`{`,close:`}`},{open:`[`,close:`]`},{open:`(`,close:`)`},{open:`"`,close:`"`},{open:`'`,close:`'`}],surroundingPairs:[{open:`"`,close:`"`},{open:`'`,close:`'`},{open:`<`,close:`>`}],onEnterRules:[{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:RegExp(`<(?!(?:${t.join(`|`)}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,`i`),action:{indentAction:e.IndentAction.Indent}}]},r={defaultToken:``,tokenPostfix:``,tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.root`}],[/<!DOCTYPE/,`metatag.html`,`@doctype`],[/<!--/,`comment.html`,`@comment`],[/(<)([\w\-]+)(\/>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)(script)/,[`delimiter.html`,{token:`tag.html`,next:`@script`}]],[/(<)(style)/,[`delimiter.html`,{token:`tag.html`,next:`@style`}]],[/(<)([:\w\-]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/(<\/)([\w\-]+)/,[`delimiter.html`,{token:`tag.html`,next:`@otherTag`}]],[/</,`delimiter.html`],[/[ \t\r\n]+/],[/[^<@]+/]],doctype:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.comment`}],[/[^>]+/,`metatag.content.html`],[/>/,`metatag.html`,`@pop`]],comment:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.comment`}],[/-->/,`comment.html`,`@pop`],[/[^-]+/,`comment.content.html`],[/./,`comment.content.html`]],otherTag:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.otherTag`}],[/\/?>/,`delimiter.html`,`@pop`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.script`}],[/type/,`attribute.name`,`@scriptAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],scriptAfterType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.scriptAfterType`}],[/=/,`delimiter`,`@scriptAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptAfterTypeEquals:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.scriptAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@scriptWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.text/javascript`,nextEmbedded:`text/javascript`}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptWithCustomType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.scriptWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@scriptEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:`@rematch`,next:`@pop`}]],scriptEmbedded:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInEmbeddedState.scriptEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/script/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],style:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.style`}],[/type/,`attribute.name`,`@styleAfterType`],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,[`delimiter.html`,`tag.html`,{token:`delimiter.html`,next:`@pop`}]]],styleAfterType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.styleAfterType`}],[/=/,`delimiter`,`@styleAfterTypeEquals`],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleAfterTypeEquals:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.styleAfterTypeEquals`}],[/"([^"]*)"/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/'([^']*)'/,{token:`attribute.value`,switchTo:`@styleWithCustomType.$1`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.text/css`,nextEmbedded:`text/css`}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleWithCustomType:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInSimpleState.styleWithCustomType.$S2`}],[/>/,{token:`delimiter.html`,next:`@styleEmbedded.$S2`,nextEmbedded:`$S2`}],[/"([^"]*)"/,`attribute.value`],[/'([^']*)'/,`attribute.value`],[/[\w\-]+/,`attribute.name`],[/=/,`delimiter`],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:`@rematch`,next:`@pop`}]],styleEmbedded:[[/@[^@]/,{token:`@rematch`,switchTo:`@razorInEmbeddedState.styleEmbedded.$S2`,nextEmbedded:`@pop`}],[/<\/style/,{token:`@rematch`,next:`@pop`,nextEmbedded:`@pop`}]],razorInSimpleState:[[/@\*/,`comment.cs`,`@razorBlockCommentTopLevel`],[/@[{(]/,`metatag.cs`,`@razorRootTopLevel`],[/(@)(\s*[\w]+)/,[`metatag.cs`,{token:`identifier.cs`,switchTo:`@$S2.$S3`}]],[/[})]/,{token:`metatag.cs`,switchTo:`@$S2.$S3`}],[/\*@/,{token:`comment.cs`,switchTo:`@$S2.$S3`}]],razorInEmbeddedState:[[/@\*/,`comment.cs`,`@razorBlockCommentTopLevel`],[/@[{(]/,`metatag.cs`,`@razorRootTopLevel`],[/(@)(\s*[\w]+)/,[`metatag.cs`,{token:`identifier.cs`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}]],[/[})]/,{token:`metatag.cs`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}],[/\*@/,{token:`comment.cs`,switchTo:`@$S2.$S3`,nextEmbedded:`$S3`}]],razorBlockCommentTopLevel:[[/\*@/,`@rematch`,`@pop`],[/[^*]+/,`comment.cs`],[/./,`comment.cs`]],razorBlockComment:[[/\*@/,`comment.cs`,`@pop`],[/[^*]+/,`comment.cs`],[/./,`comment.cs`]],razorRootTopLevel:[[/\{/,`delimiter.bracket.cs`,`@razorRoot`],[/\(/,`delimiter.parenthesis.cs`,`@razorRoot`],[/[})]/,`@rematch`,`@pop`],{include:`razorCommon`}],razorRoot:[[/\{/,`delimiter.bracket.cs`,`@razorRoot`],[/\(/,`delimiter.parenthesis.cs`,`@razorRoot`],[/\}/,`delimiter.bracket.cs`,`@pop`],[/\)/,`delimiter.parenthesis.cs`,`@pop`],{include:`razorCommon`}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:`keyword.cs`},"@default":`identifier.cs`}}],[/[\[\]]/,`delimiter.array.cs`],[/[ \t\r\n]+/],[/\/\/.*$/,`comment.cs`],[/@\*/,`comment.cs`,`@razorBlockComment`],[/"([^"]*)"/,`string.cs`],[/'([^']*)'/,`string.cs`],[/(<)([\w\-]+)(\/>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<)([\w\-]+)(>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/(<\/)([\w\-]+)(>)/,[`delimiter.html`,`tag.html`,`delimiter.html`]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,`delimiter.cs`],[/\d*\d+[eE]([\-+]?\d+)?/,`number.float.cs`],[/\d*\.\d+([eE][\-+]?\d+)?/,`number.float.cs`],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,`number.hex.cs`],[/0[0-7']*[0-7]/,`number.octal.cs`],[/0[bB][0-1']*[0-1]/,`number.binary.cs`],[/\d[\d']*/,`number.cs`],[/\d/,`number.cs`]]},razorKeywords:`abstract.as.async.await.base.bool.break.by.byte.case.catch.char.checked.class.const.continue.decimal.default.delegate.do.double.descending.explicit.event.extern.else.enum.false.finally.fixed.float.for.foreach.from.goto.group.if.implicit.in.int.interface.internal.into.is.lock.long.nameof.new.null.namespace.object.operator.out.override.orderby.params.private.protected.public.readonly.ref.return.switch.struct.sbyte.sealed.short.sizeof.stackalloc.static.string.select.this.throw.true.try.typeof.uint.ulong.unchecked.unsafe.ushort.using.var.virtual.volatile.void.when.while.where.yield.model.inject`.split(`.`),escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{n as conf,r as language};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-mermaid-TizVRNLQ.js","assets/rolldown-runtime-QTnfLwEv.js","assets/theme-swfNLod9.js","assets/preload-helper-Czpn1I53.js","assets/math-CSw6sgCC.js","assets/math-delimiters-BCnTi7Ii.js","assets/purify.es-D8QhFVkO.js","assets/katex.min-ZqdHjttS.js","assets/katex-Dz-67XSV.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./preload-helper-Czpn1I53.js";import{r}from"./math-delimiters-BCnTi7Ii.js";import{c as i,l as a}from"./file-links-BEPA2kg5.js";function o(e){if(!/^https?:\/\//i.test(e)||/[\s<>"`\\\p{Cc}]/u.test(e))return!1;try{return new URL(e).hostname!==``}catch{return!1}}function s(e){let t=[];for(let n of e.matchAll(/\bhttps?:\/\/[^\s<>"'`\\{}|^]+/gi)){let e=n[0];for(;e;){let t=e.at(-1),n=t===`)`?`(`:t===`]`?`[`:null;if(/[.,;:!?]/.test(t)||n&&e.split(t).length>e.split(n).length)e=e.slice(0,-1);else break}o(e)&&t.push({uri:e,start:n.index,end:n.index+e.length})}return t}function c(e,t,n,r){let i=s(r).at(-1),a=/\bhttps?:\/\/[^\s<>"'`\\{}|^]*$/i.exec(r)?.[0];if(!a||i&&/[\])]/.test(r.slice(i.end)))return!1;let o=t.text.trimStart();if(!o||/^(?:https?:\/\/|~\/|\.{1,2}\/)/i.test(o))return!1;let c=o.split(/\s/,1)[0].replace(/[.,;:!?\])]+$/,``);if(!/^[\p{L}\p{N}_%/?.:#&=+~-]/u.test(c))return!1;let l=/[/_.?&#=%+~-]/.test(c);if(!l&&/\s/.test(o.trimEnd()))return!1;let u=e.cells[e.text.trimEnd().length-1];return a.endsWith(`/`)&&l||u!==void 0&&u.col>=n-9}function l(e,t,n){return i(e,t,n,s,c)}function u(e,t){return e.registerLinkProvider({provideLinks(n,r){r(l(e.buffer.active,n-1,e.cols).map(({candidate:e,start:n,end:r})=>({range:{start:{x:n.col+1,y:n.row+1},end:{x:r.col+1,y:r.row+1}},text:e.uri,activate:()=>t(e.uri)})))}})}function d(e,t){return t===`codex`&&/^[ \t]*[›❯] /.test(e)}function f(e,t){return t===`codex`&&/^[^\p{L}\p{N}\n]*Working\s*\([^)]*(?:esc|interrupt)[^)]*\)\s*$/iu.test(e)}function p(e,t,n=[],r=0,i){let a=t===`codex`?/^[ \t]*[›❯] /:t===`claude-code`?/^[ \t]*[❯>] /:t===`gemini-cli`?/^[ \t]*> /:void 0;if(a)return a.exec(e)?.[0].length??0;if(t!==`opencode`)return 0;let o=/^([ \t]*┃ {1,2})/.exec(e);if(!o)return 0;let s=e.indexOf(`┃`)+r,c=n.find(e=>e.start<=s&&e.end>s),l=/(?:^|;)color:(#[\da-f]{6})(?:;|$)/i.exec(c?.css??``)?.[1],u=n.some(t=>t.start<r+e.length&&t.end>s+1&&t.css.includes(`background-color:`));return!l||!i||l.toLowerCase()===i.toLowerCase()||!u?0:o[0].length}function m(e,t){switch(t){case`codex`:return/^\s*[›❯>](?:\s|$)/.test(e);case`claude-code`:return/^\s*[❯>]\s/.test(e);case`gemini-cli`:return/^\s*(?:[>!*]|\(r:\))\s/.test(e);case`opencode`:return/^\s*┃/.test(e);default:return!1}}function h(e,t){return(t===`claude-code`||t===`gemini-cli`)&&/^\s*[─━]{3,}\s*$/.test(e)||t===`gemini-cli`&&/^\s*[▄▀]{3,}\s*$/.test(e)}function g(e,t,n=null){let r=e.buffer.active,i=r.viewportY,a=e.rows;if(n!==`cli`&&r.type===`normal`&&i===r.baseY&&t){let t=e.rows;for(;t>0&&!r.getLine(i+t-1)?.translateToString(!0).trim();)t--;t=Math.max(r.cursorY+1,Math.min(e.rows,t+1)),t>=6&&(a=t)}let o=0,s=e.cols;if(t===`opencode`)for(let t=i+e.rows-1;t>=i+Math.floor(e.rows/2);t--){let e=/^(\s*)╹(▀{8,})/.exec(r.getLine(t)?.translateToString(!0)??``);if(e){o=e[1].length,s=e[0].length;break}}let c=Math.max(0,a-5),l=!1;if(t&&r.baseY+r.cursorY>=i&&r.baseY+r.cursorY<i+e.rows){let n=Math.min(i+e.rows-1,r.baseY+r.cursorY),a=t===`codex`?i+ +(r.type===`alternate`):r.type===`alternate`?i+Math.floor(e.rows/2):Math.max(i,n-Math.max(12,Math.floor(e.rows/2)));for(let e=n;e>=a;e--){let n=r.getLine(e);if(!m(n?.translateToString(!0)??``,t))continue;if(l=!0,c=e-i,t===`opencode`)for(;c>0&&m(r.getLine(i+c-1)?.translateToString(!0)??``,t);)c--;let a=r.getLine(i+c-1);(h(a?.translateToString(!0)??``,t)||a&&!a.translateToString(!0).trim()&&a.getCell(0)?.getBgColorMode()===n?.getCell(0)?.getBgColorMode()&&a.getCell(0)?.getBgColor()===n?.getCell(0)?.getBgColor())&&c--;break}}l||(a=e.rows,c=Math.max(0,e.rows-5));let u=e=>e>0&&!r.getLine(i+e-1)?.translateToString(!0).trim(),d=l?a-c+ +!!u(c):null;if(t===`codex`&&l){for(let e=i+c-1;e>=Math.max(i,i+c-10);e--)if(f(r.getLine(e)?.translateToString(!0)??``,t)){c=e-i;break}}l&&u(c)&&c--;let p=l?i+Math.max(0,c):null;if(n===`cli`)c=0;else if(n!==null){let t=typeof n==`number`?n:d===null?n.rows:d+n.inputOffset;a=Math.min(e.rows,Math.max(a,t)),c=Math.max(0,a-t)}c=Math.max(0,Math.min(a,c));let g=i+c;if(t===`codex`||t===`gemini-cli`)for(;g>i;){let e=r.getLine(g-1)?.translateToString(!0).trim()??``,n=t===`codex`?/^(?:New activity\s*·\s*)?↓\s*Back to bottom\b/.test(e):/^(?:Shift\+Tab to |\? for shortcuts$)/i.test(e)||h(e,t);if(e&&!n)break;g--}if(t===`gemini-cli`&&r.type===`alternate`){let t=Array.from({length:g-i},(t,n)=>r.getLine(i+n)?.getCell(e.cols-1)?.getChars()??``);t.some(e=>/[▄█▀]/.test(e))&&t.every(e=>/^[ ▄█▀]*$/.test(e))&&s--}let _=e.element?.querySelector(`.xterm-screen`),v=(_?.getBoundingClientRect().height||e.rows*16)/e.rows,y=e.element?.closest(`.ripple-native`),b=_&&y?Math.max(0,y.getBoundingClientRect().bottom-_.getBoundingClientRect().bottom):0,x=n===`cli`?0:Math.min(2,Math.floor(b/v))*v;return{first:i,last:g,firstCol:o,lastCol:s,controlsFirst:p,coveredLast:i+c,nativeRows:a-c,inputRows:d,cellHeight:v,bottom:c===a?0:(a-c)*v+b-x,nativeOffset:(e.rows-a)*v+x}}function _(e,t){let n=e.element?.querySelector(`.xterm-screen`);if(!n)return;let r=n.getBoundingClientRect(),i=new WheelEvent(`wheel`,{bubbles:!0,cancelable:!0,deltaX:t.deltaX,deltaY:t.deltaY,deltaMode:t.deltaMode,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey,clientX:Math.max(r.left,Math.min(r.right-1,t.clientX)),clientY:Math.max(r.top,Math.min(r.bottom-1,t.clientY))});Object.defineProperties(i,{wheelDelta:{value:void 0},wheelDeltaX:{value:void 0},wheelDeltaY:{value:void 0}}),n.dispatchEvent(i)}var v=128,y=32768,b=32,x=/^\s*(`{3,}|~{3,})(.*)$/,S=/^\s*(?:flowchart|graph)\s+(?:TB|TD|BT|RL|LR)\s*;?\s*$/,C=/^\s*sequenceDiagram\s*$/;function w(e,t){let n=e.trim();return n===``||/^(?:%%|end\b)/.test(n)?!0:t?/^(?:participant|actor|create|destroy|activate|deactivate|note|loop|alt|else|opt|par|and|critical|option|break|rect|autonumber)\b/i.test(n)||/^\S+\s*(?:--?|<<-)[<>x)+-]*>/.test(n):/^(?:subgraph|direction|style|classDef|class|linkStyle)\b/.test(n)||/^[\w-]+\s*(?:\[|\(|\{|>|@\{|<*[-=.]+[->ox| ])/.test(n)}function T(e,t,n,i,o){if(t<1||i<1)return[];let s=Math.min(v,Math.max(0,Math.floor((y/(t+1)-i)/2))),c=Math.max(0,n-s),l=Math.min(e.length,n+i+s),u=[],d=0;for(let n=c;n<l;n++){let r=a(e,n,t,o);if(!r)break;let i=e.getLine(n+1)?.isWrapped?r.text.length:r.text.trimEnd().length;if(d+=i+1,d>y)break;let s=u.at(-1);r.isWrapped&&s?(s.text+=r.text.slice(0,i),s.cells.push(...r.cells.slice(0,i))):u.push({text:r.text.slice(0,i),cells:r.cells.slice(0,i)})}let f=[],p=(t,r,a,o)=>{let s=o[0],c=o.at(-1);if(!s||!c||!r.trim()||f.length>=b||c.row<n||s.row>=n+i)return;let l=e.getLine(c.row)?.getCell(c.col)?.getWidth()??1;f.push({kind:t,source:r.trim(),display:a,start:s,end:{row:c.row,col:c.col+Math.max(1,l)-1}})};for(let e=0;e<u.length&&f.length<b;e++){let t=u[e],n=x.exec(t.text);if(n){let t=e+1;for(;t<u.length;){let e=x.exec(u[t].text);if(e&&!e[2].trim()&&e[1][0]===n[1][0]&&e[1].length>=n[1].length)break;t++}if(t===u.length)break;let r=n[2].trim().split(/\s+/)[0].toLowerCase();if([`mermaid`,`math`,`latex`,`tex`].includes(r)){let n=u.slice(e+1,t).map(e=>e.text).join(`
|
|
3
|
+
`);p(r===`mermaid`?`mermaid`:`math`,n,!0,u.slice(e,t+1).flatMap(e=>e.cells))}e=t;continue}let i=C.test(t.text);if(S.test(t.text)||i){let t=e+1;for(;t<u.length&&w(u[t].text,i);)t++;for(;t>e+1&&!u[t-1].text.trim();)t--;if(t>e+1){let n=u.slice(e,t);p(`mermaid`,n.map(e=>e.text).join(`
|
|
4
|
+
`),!0,n.flatMap(e=>e.cells)),e=t-1;continue}}let a=t.text.trim();if(a.startsWith(`$$`)||a.startsWith(`\\[`)){let t=a,n=e,i=r(t);for(;!i&&n+1<u.length&&(t+=`\n${u[++n].text.trim()}`,i=r(t),!/\n\s*\n/.test(t)););if(i?.display&&i.length===t.length){p(`math`,i.tex,!0,u.slice(e,n+1).flatMap(e=>e.cells)),e=n;continue}if(a===`$$`||a===`\\[`)continue}for(let e=0;e<t.text.length;e++){if(t.text[e]==="`"){let n=/^`+/.exec(t.text.slice(e))[0],r=t.text.indexOf(n,e+n.length);if(r<0)break;e=r+n.length-1;continue}let n=r(t.text,e);if(n){let r=t.cells.slice(e,e+n.length);(r[0]?.row===r.at(-1)?.row||t.text.trim()===t.text.slice(e,e+n.length))&&p(`math`,n.tex,n.display,r),e+=n.length-1}else t.text[e]===`\\`&&e++}}return f}var E=e(t(),1);function D(e,t){let[n,r]=(0,E.useState)(null),i=(0,E.useRef)(null),a=n?.source===e&&n.visible,o=()=>{t&&r({source:e,visible:!a})},s=e=>{e.currentTarget.closest(`.xterm`)&&e.stopPropagation()};return{sourceVisible:a,props:{role:`button`,tabIndex:0,"aria-label":a?`Show LaTeX preview`:`Show LaTeX source`,"aria-pressed":a,"aria-disabled":!t,onPointerDown:e=>{s(e),i.current={x:e.clientX,y:e.clientY,dragged:!1}},onPointerMove:e=>{s(e),i.current&&e.buttons&&Math.hypot(e.clientX-i.current.x,e.clientY-i.current.y)>4&&(i.current.dragged=!0)},onMouseMove:s,onMouseDown:s,onMouseUp:s,onClick:e=>{e.stopPropagation(),!(i.current?.dragged||!window.getSelection()?.isCollapsed)&&o()},onKeyDown:e=>{e.stopPropagation(),(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),o())},onKeyUp:e=>e.stopPropagation()}}}async function O(e,t,r,i,a=!1){if(t.kind===`mermaid`){let{renderMermaidDiagrams:o}=await n(async()=>{let{renderMermaidDiagrams:e}=await import(`./markdown-mermaid-TizVRNLQ.js`).then(e=>e.t);return{renderMermaidDiagrams:e}},__vite__mapDeps([0,1,2,3]));if(i.aborted)return;let s=document.createElement(`div`);if(s.setAttribute(`data-puddle-mermaid`,``),s.textContent=t.source,e.replaceChildren(s),await o(e,r,i,a),!i.aborted&&!s.querySelector(`svg`))throw Error(`Unable to render Mermaid diagram`)}else{let[{renderMathHtml:r},{default:a}]=await Promise.all([n(()=>import(`./math-CSw6sgCC.js`).then(e=>e.n),__vite__mapDeps([4,1,5])),n(()=>import(`./purify.es-D8QhFVkO.js`).then(e=>e.n),__vite__mapDeps([6,1])),n(()=>import(`./katex.min-ZqdHjttS.js`).then(e=>e.t),__vite__mapDeps([7,1,8]))]);if(i.aborted)return;if(e.innerHTML=a.sanitize(r(t.source,t.display)),e.querySelector(`.katex-error`))throw Error(`Unable to render LaTeX`)}}export{g as a,d as c,s as d,o as f,_ as i,f as l,D as n,h as o,u as p,T as r,p as s,O as t,l as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./view-state-store-CY9DI6-i.js";var t=new e(500,`preview-scroll`);function n(e,n,r,i=()=>!0){let a=t.get(r),o=-1,s=-1,c=()=>({height:Math.max(0,e.scrollHeight-e.clientHeight),width:Math.max(0,e.scrollWidth-e.clientWidth)}),l=()=>{!i()||!e.clientHeight||!e.clientWidth||({height:o,width:s}=c(),a&&(e.scrollTop=a.height?a.top/a.height*o:0,e.scrollLeft=a.width?a.left/a.width*s:0))},u=()=>{if(!i()||!e.clientHeight||!e.clientWidth)return;let n=c();({height:o,width:s}=n),a={top:e.scrollTop,left:e.scrollLeft,...n},t.set(r,a)},d=()=>{if(!i()||!e.clientHeight||!e.clientWidth)return;let t=c();if(t.height!==o||t.width!==s){l();return}u()};l(),e.addEventListener(`scroll`,d,{passive:!0});let f=new ResizeObserver(l);f.observe(e),f.observe(n);let p=new MutationObserver(l);return p.observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`data-scroll-ready`]}),{capture:u,dispose:()=>{d(),e.removeEventListener(`scroll`,d),f.disconnect(),p.disconnect()}}}export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-DyMAgLa3.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./react-dom-cJyBB_A4.js";import{t as r}from"./jsx-runtime-By8HlURe.js";import{t as i}from"./utils-B6KiDbIe.js";import{C as a,E as o,S as s,T as c,_ as l,b as u,f as d,g as f,h as p,m,p as h,v as g,x as _,y as v}from"./dialog-CTN-Lln6.js";import{o as y,r as b}from"./x-CbfJFzGo.js";import{_ as x,a as S,c as C,g as w,h as T,l as E,m as D,n as O,p as k,s as A,t as j}from"./dist-NuV8HBEc.js";import{t as ee}from"./createLucideIcon-DyMAgLa3.js";import{t as te}from"./chevron-down--sjpQEHH.js";var M=e(n(),1),N=e(t(),1),P=r(),F=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),I=`VisuallyHidden`,L=N.forwardRef((e,t)=>(0,P.jsx)(a.span,{...e,ref:t,style:{...F,...e.style}}));L.displayName=I;var R=L,z=ee(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);function B(e){let t=N.useRef({value:e,previous:e});return N.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function V(e,[t,n]){return Math.min(n,Math.max(t,e))}var H=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ne=[` `,`Enter`],U=`Select`,[W,G,re]=O(U),[K,ie]=c(U,[re,x]),q=x(),[ae,J]=K(U),[oe,se]=K(U),ce=`SelectProvider`;function le(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:p,required:m,form:h,internal_do_not_use_render:g}=e,_=q(t),[y,b]=N.useState(null),[x,S]=N.useState(null),[C,T]=N.useState(!1),E=j(l),[D,O]=f({prop:r,defaultProp:i??!1,onChange:a,caller:U}),[k,A]=f({prop:o,defaultProp:s,onChange:c,caller:U}),ee=N.useRef(null),te=N.useRef(k);N.useEffect(()=>{let e=h?y?.ownerDocument.getElementById(h):y?.form;if(e instanceof HTMLFormElement){let t=()=>A(te.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,y,A]);let M=!y||!!h||!!y.closest(`form`),[F,I]=N.useState(new Set),L=v(),R=Array.from(F).map(e=>e.props.value).join(`;`),z=N.useCallback(e=>{I(t=>new Set(t).add(e))},[]),B=N.useCallback(e=>{I(t=>{let n=new Set(t);return n.delete(e),n})},[]),V={required:m,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:T,contentId:L,value:k,onValueChange:A,open:D,onOpenChange:O,dir:E,triggerPointerDownPosRef:ee,disabled:p,name:u,autoComplete:d,form:h,nativeOptions:F,nativeSelectKey:R,isFormControl:M};return(0,P.jsx)(w,{..._,children:(0,P.jsx)(ae,{scope:t,...V,children:(0,P.jsx)(W.Provider,{scope:t,children:(0,P.jsx)(oe,{scope:t,onNativeOptionAdd:z,onNativeOptionRemove:B,children:it(g)?g(V):n})})})})}le.displayName=ce;var ue=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,P.jsx)(le,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,P.jsxs)(P.Fragment,{children:[n,e?(0,P.jsx)(rt,{__scopeSelect:t}):null]})})};ue.displayName=U;var de=`SelectTrigger`,fe=N.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,s=q(n),c=J(de,n),l=c.disabled||r,u=y(t,c.onTriggerChange),d=G(n),f=N.useRef(`touch`),[p,m,h]=ot(e=>{let t=d().filter(e=>!e.disabled),n=st(t,e,t.find(e=>e.value===c.value));n!==void 0&&c.onValueChange(n.value)}),g=e=>{l||(c.onOpenChange(!0),h()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,P.jsx)(k,{asChild:!0,...s,children:(0,P.jsx)(a.button,{type:`button`,role:`combobox`,"aria-controls":c.open?c.contentId:void 0,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":`none`,dir:c.dir,"data-state":c.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":at(c.value)?``:void 0,...i,ref:u,onClick:o(i.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:o(i.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:o(i.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&H.includes(e.key)&&(g(),e.preventDefault())})})})});fe.displayName=de;var pe=`SelectValue`,me=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:o,placeholder:s=``,...c}=e,l=J(pe,n),{onValueNodeHasChildrenChange:d}=l,f=o!==void 0,p=y(t,l.onValueNodeChange);u(()=>{d(f)},[d,f]);let m=at(l.value);return(0,P.jsx)(a.span,{...c,asChild:!m&&c.asChild,ref:p,style:{pointerEvents:`none`},children:(0,P.jsx)(N.Fragment,{children:m?s:o},m?`placeholder`:`value`)})});me.displayName=pe;var he=`SelectIcon`,ge=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,P.jsx)(a.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});ge.displayName=he;var _e=`SelectPortal`,[ve,ye]=K(_e,{forceMount:void 0}),be=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,P.jsx)(ve,{scope:e.__scopeSelect,forceMount:n,children:(0,P.jsx)(g,{asChild:!0,...r})})};be.displayName=_e;var Y=`SelectContent`,xe=N.forwardRef((e,t)=>{let n=ye(Y,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=J(Y,e.__scopeSelect),[o,s]=N.useState();return u(()=>{s(new DocumentFragment)},[]),(0,P.jsx)(l,{present:r||a.open,children:({present:e})=>e?(0,P.jsx)(Ee,{...i,ref:t}):(0,P.jsx)(Se,{...i,fragment:o})})});xe.displayName=Y;var Se=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?M.createPortal((0,P.jsx)(Ce,{scope:n,children:(0,P.jsx)(W.Slot,{scope:n,children:(0,P.jsx)(`div`,{ref:t,children:r})})}),i):null});Se.displayName=`SelectContentFragment`;var X=10,[Ce,Z]=K(Y),we=`SelectContentImpl`,Te=b(`SelectContent.RemoveScroll`),Ee=N.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:c,sideOffset:l,align:u,alignOffset:f,arrowPadding:g,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C,...w}=e,T=J(Y,n),[E,D]=N.useState(null),[O,k]=N.useState(null),A=y(t,D),[j,ee]=N.useState(null),[te,M]=N.useState(null),F=G(n),[I,L]=N.useState(!1),R=N.useRef(!1);N.useEffect(()=>{if(E)return h(E)},[E]),p();let z=N.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&O&&(O.scrollTop=0),n===r&&O&&(O.scrollTop=O.scrollHeight),n?.focus(),document.activeElement!==i))return},[F,O]),B=N.useCallback(()=>z([j,E]),[z,j,E]);N.useEffect(()=>{I&&B()},[I,B]);let{onOpenChange:V,triggerPointerDownPosRef:H}=T;N.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(H.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(H.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(E)||V(!1),document.removeEventListener(`pointermove`,t),H.current=null};return H.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[E,V,H]),N.useEffect(()=>{let e=()=>V(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[V]);let[ne,U]=ot(e=>{let t=F().filter(e=>!e.disabled),n=st(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),W=N.useCallback((e,t,n)=>{let r=!R.current&&!n;(T.value!==void 0&&T.value===t||r)&&(ee(e),r&&(R.current=!0))},[T.value]),re=N.useCallback(()=>E?.focus(),[E]),K=N.useCallback((e,t,n)=>{let r=!R.current&&!n;(T.value!==void 0&&T.value===t||r)&&M(e)},[T.value]),ie=r===`popper`?Ae:Oe,q=ie===Ae?{side:c,sideOffset:l,align:u,alignOffset:f,arrowPadding:g,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C}:{};return(0,P.jsx)(Ce,{scope:n,content:E,viewport:O,onViewportChange:k,itemRefCallback:W,selectedItem:j,onItemLeave:re,itemTextRefCallback:K,focusSelectedItem:B,selectedItemText:te,position:r,isPositioned:I,searchRef:ne,children:(0,P.jsx)(d,{as:Te,allowPinchZoom:!0,children:(0,P.jsx)(m,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:o(i,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,P.jsx)(_,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,P.jsx)(ie,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...q,onPlaced:()=>L(!0),ref:A,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:o(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&U(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});Ee.displayName=we;var De=`SelectItemAlignedPosition`,Oe=N.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,o=J(Y,n),s=Z(Y,n),[c,l]=N.useState(null),[d,f]=N.useState(null),p=y(t,f),m=G(n),h=N.useRef(!1),g=N.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:b,focusSelectedItem:x}=s,S=N.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&d&&_&&v&&b){let e=o.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(o.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-X,d=V(a,[X,Math.max(X,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-X,d=V(a,[X,Math.max(X,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let a=m(),s=window.innerHeight-X*2,l=_.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),y=parseInt(u.paddingBottom,10),x=f+p+l+y+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-X,D=s-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=a.length>0&&v===a[a.length-1].ref.current;c.style.bottom=`0px`;let t=d.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);c.style.height=n+`px`}else{let e=a.length>0&&v===a[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+_.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}c.style.margin=`${X}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,o.trigger,o.valueNode,c,d,_,v,b,o.dir,r]);u(()=>S(),[S]);let[C,w]=N.useState();return u(()=>{d&&w(window.getComputedStyle(d).zIndex)},[d]),(0,P.jsx)(je,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:N.useCallback(e=>{e&&g.current===!0&&(S(),x?.(),g.current=!1)},[S,x]),children:(0,P.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,P.jsx)(a.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Oe.displayName=De;var ke=`SelectPopperPosition`,Ae=N.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=X,...a}=e,o=q(n);return(0,P.jsx)(T,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});Ae.displayName=ke;var[je,Me]=K(Y,{}),Ne=`SelectViewport`,Pe=N.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,s=Z(Ne,n),c=Me(Ne,n),l=y(t,s.onViewportChange),u=N.useRef(0);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,P.jsx)(W.Slot,{scope:n,children:(0,P.jsx)(a.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:o(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-X*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}u.current=t.scrollTop})})})]})});Pe.displayName=Ne;var Fe=`SelectGroup`,[Ie,Le]=K(Fe),Re=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=v();return(0,P.jsx)(Ie,{scope:n,id:i,children:(0,P.jsx)(a.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Re.displayName=Fe;var ze=`SelectLabel`,Be=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Le(ze,n);return(0,P.jsx)(a.div,{id:i.id,...r,ref:t})});Be.displayName=ze;var Q=`SelectItem`,[Ve,He]=K(Q),Ue=N.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:c,...l}=e,u=J(Q,n),d=Z(Q,n),f=u.value===r,[p,m]=N.useState(c??``),[h,g]=N.useState(!1),_=y(t,s(e=>d.itemRefCallback?.(e,r,i))),b=v(),x=N.useRef(`touch`),S=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};return(0,P.jsx)(Ve,{scope:n,value:r,disabled:i,textId:b,isSelected:f,onItemTextChange:N.useCallback(e=>{m(t=>t||(e?.textContent??``).trim())},[]),children:(0,P.jsx)(W.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:(0,P.jsx)(a.div,{role:`option`,"aria-labelledby":b,"data-highlighted":h?``:void 0,"aria-selected":f&&h,"data-state":f?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...l,ref:_,onFocus:o(l.onFocus,()=>g(!0)),onBlur:o(l.onBlur,()=>g(!1)),onClick:o(l.onClick,()=>{x.current!==`mouse`&&S()}),onPointerUp:o(l.onPointerUp,()=>{x.current===`mouse`&&S()}),onPointerDown:o(l.onPointerDown,e=>{x.current=e.pointerType}),onPointerMove:o(l.onPointerMove,e=>{x.current=e.pointerType,i?d.onItemLeave?.():x.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:o(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:o(l.onKeyDown,e=>{i||e.target!==e.currentTarget||d.searchRef?.current!==``&&e.key===` `||(ne.includes(e.key)&&S(),e.key===` `&&e.preventDefault())})})})})});Ue.displayName=Q;var $=`SelectItemText`,We=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...o}=e,c=J($,n),l=Z($,n),d=He($,n),f=se($,n),[p,m]=N.useState(null),h=s(e=>l.itemTextRefCallback?.(e,d.value,d.disabled)),g=y(t,m,d.onItemTextChange,h),_=p?.textContent,v=N.useMemo(()=>(0,P.jsx)(`option`,{value:d.value,disabled:d.disabled,children:_},d.value),[d.disabled,d.value,_]),{onNativeOptionAdd:b,onNativeOptionRemove:x}=f;return u(()=>(b(v),()=>x(v)),[b,x,v]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(a.span,{id:d.textId,...o,ref:g}),d.isSelected&&c.valueNode&&!c.valueNodeHasChildren&&!at(c.value)?M.createPortal(o.children,c.valueNode):null]})});We.displayName=$;var Ge=`SelectItemIndicator`,Ke=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return He(Ge,n).isSelected?(0,P.jsx)(a.span,{"aria-hidden":!0,...r,ref:t}):null});Ke.displayName=Ge;var qe=`SelectScrollUpButton`,Je=N.forwardRef((e,t)=>{let n=Z(qe,e.__scopeSelect),r=Me(qe,e.__scopeSelect),[i,a]=N.useState(!1),o=y(t,r.onScrollButtonChange);return u(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,P.jsx)(Ze,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Je.displayName=qe;var Ye=`SelectScrollDownButton`,Xe=N.forwardRef((e,t)=>{let n=Z(Ye,e.__scopeSelect),r=Me(Ye,e.__scopeSelect),[i,a]=N.useState(!1),o=y(t,r.onScrollButtonChange);return u(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,P.jsx)(Ze,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Xe.displayName=Ye;var Ze=N.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,s=Z(`SelectScrollButton`,n),c=N.useRef(null),l=G(n),d=N.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return N.useEffect(()=>()=>d(),[d]),u(()=>{l().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[l]),(0,P.jsx)(a.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:o(i.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:o(i.onPointerMove,()=>{s.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:o(i.onPointerLeave,()=>{d()})})}),Qe=`SelectSeparator`,$e=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,P.jsx)(a.div,{"aria-hidden":!0,...r,ref:t})});$e.displayName=Qe;var et=`SelectArrow`,tt=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=q(n);return Z(et,n).position===`popper`?(0,P.jsx)(D,{...i,...r,ref:t}):null});tt.displayName=et;var nt=`SelectBubbleInput`,rt=N.forwardRef(({__scopeSelect:e,...t},n)=>{let r=J(nt,e),{value:i,onValueChange:o,required:s,disabled:c,name:l,autoComplete:u,form:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=N.useRef(null),h=y(n,m),g=i??``,_=B(g),v=Array.from(f).some(e=>(e.props.value??``)===``);return N.useEffect(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(_!==g&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,g),e.dispatchEvent(t)}},[_,g]),(0,P.jsxs)(a.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:l,autoComplete:u,disabled:c,form:d,onChange:e=>o(e.target.value),...t,style:{...F,...t.style},ref:h,defaultValue:g,children:[at(i)&&!v?(0,P.jsx)(`option`,{value:``}):null,Array.from(f)]},p)});rt.displayName=nt;function it(e){return typeof e==`function`}function at(e){return e===``||e===void 0}function ot(e){let t=s(e),n=N.useRef(``),r=N.useRef(0),i=N.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=N.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function st(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=ct(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function ct(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var lt=ue,ut=me;function dt({className:e,children:t,...n}){return(0,P.jsxs)(fe,{className:i(`flex h-[var(--ui-field-height)] w-full cursor-pointer items-center justify-between gap-2 px-2.5 [&>span]:truncate`,S,e),...n,children:[t,(0,P.jsx)(ge,{asChild:!0,children:(0,P.jsx)(te,{className:`size-3.5 shrink-0 text-fg-muted`})})]})}function ft({className:e,children:t,position:n=`popper`,...r}){return(0,P.jsx)(be,{children:(0,P.jsx)(xe,{position:n,sideOffset:4,className:i(`z-50 max-h-72 min-w-[var(--radix-select-trigger-width)] max-w-[var(--radix-select-content-available-width)] overflow-y-auto`,E,`overlay-select-motion`,e),...r,children:(0,P.jsx)(Pe,{children:t})})})}function pt({className:e,children:t,detail:n,...r}){return(0,P.jsxs)(Ue,{className:i(C,A,`py-1.5 pl-7 pr-2`,e),...r,children:[(0,P.jsx)(`span`,{className:`absolute left-2 flex size-3.5 items-center justify-center`,children:(0,P.jsx)(Ke,{children:(0,P.jsx)(z,{className:`size-3.5`})})}),(0,P.jsx)(We,{children:t}),n]})}export{ut as a,R as c,dt as i,ft as n,B as o,pt as r,z as s,lt as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{B as n,D as r,b as i,ct as a,ft as o,n as s,r as c,y as l,z as u}from"./local-store-8IcyY3pd.js";import{i as d}from"./editor-links-qwyINDCv.js";import{t as f}from"./jsx-runtime-By8HlURe.js";import{n as p}from"./api--n1Ha6tG.js";import{n as m}from"./dist-BOS6OKSE.js";import{t as h}from"./x-CbfJFzGo.js";import{t as g}from"./button-D-qeQvl5.js";import{t as _}from"./createLucideIcon-DyMAgLa3.js";import{t as v}from"./copy-CGsu8426.js";import{t as y}from"./ws-DH0dKRnO.js";var b=_(`clipboard-paste`,[[`path`,{d:`M11 14h10`,key:`1w8e9d`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v1.344`,key:`1e62lh`}],[`path`,{d:`m17 18 4-4-4-4`,key:`z2g111`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113`,key:`bjbb7m`}],[`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,key:`ublpy`}]]),x=_(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]);function S(){return d.get()}var C=u.options.join(`,`),w=l.imageBytes,T=20*1024*1024;async function E(e,t,n){n?.throwIfAborted();let r=u.safeParse(e.type);if(!r.success)throw Error(`Choose a PNG, JPEG, GIF or WebP image.`);if(e.size===0)throw Error(`This image is empty.`);if(e.size>T)throw Error(`Choose an image smaller than 20 MiB.`);if(!t||e.size<=w)return{blob:e,mime:r.data,resized:!1};if(r.data===`image/gif`)throw Error(`Choose a GIF no larger than 4 MiB for remote access.`);let i=await createImageBitmap(e);try{n?.throwIfAborted();let e=document.createElement(`canvas`),t=e.getContext(`2d`);if(!t)throw Error(`Could not prepare this image.`);let a=r.data===`image/jpeg`?`image/jpeg`:`image/webp`,o=Math.min(1,2048/Math.max(i.width,i.height));for(let r=0;r<8;r++){e.width=Math.max(1,Math.round(i.width*o)),e.height=Math.max(1,Math.round(i.height*o)),t.drawImage(i,0,0,e.width,e.height);for(let t of[.85,.7,.55]){let r=await new Promise(n=>e.toBlob(n,a,t));if(n?.throwIfAborted(),r&&r.size<=w)return{blob:r,mime:u.parse(r.type),resized:!0}}o*=.75}throw Error(`This image is too large to attach remotely. Choose a smaller image.`)}finally{i.close()}}var D=new WeakSet,ee=Math.floor((r.requestBytes-1024)*3/4);async function O(e,t,r,s,c,u,d){let f=e.generation,p=()=>{if(u?.throwIfAborted(),c(),e.generation!==f)throw Error(`The connection changed; the image upload was interrupted.`)};if(p(),!r.size||r.size>l.imageBytes)throw Error(`The prepared image must be no larger than 4 MiB.`);if(D.has(e))throw Error(`An image upload is already in progress.`);D.add(e);let m=crypto.randomUUID(),h=`/api/worktrees/${t}/paste-upload`,g=!1,_=!1,v=async(t,n,r)=>{p();let i=await e.request(t,n,r,u),a=await i.json();if(p(),!i.ok){let e=o.safeParse(a);throw Error(e.success?e.data.error.message:`The image upload failed.`)}return a},y=e=>v(`POST`,h,e),b=async e=>{let t=new Uint8Array(await e.arrayBuffer());return p(),btoa(Array.from(t,e=>String.fromCharCode(e)).join(``))};try{let e=a.parse(await v(`GET`,`/api/version`));if(d?.(0,r.size),!e.remote_image_uploads){if(r.size>ee)throw Error(`Update the host connector to upload images larger than 191 KiB.`);let e=await b(r),i=n.parse(await v(`POST`,`/api/worktrees/${t}/paste`,{mime:s,data:e}));return d?.(r.size,r.size),i}if(g=!0,i.parse(await y({action:`start`,upload:m,mime:s,size:r.size})).received!==0)throw Error(`Invalid image upload acknowledgement.`);for(let e=0;e<r.size;e+=l.chunkBytes){let t=r.slice(e,e+l.chunkBytes),n=await b(t),a=i.parse(await y({action:`chunk`,upload:m,offset:e,data:n}));if(a.received!==e+t.size)throw Error(`Invalid image upload acknowledgement.`);d?.(a.received,r.size)}let o=n.parse(await y({action:`finish`,upload:m}));return _=!0,o}finally{if(g&&!_&&e.generation===f)try{c(),e.request(`POST`,h,{action:`cancel`,upload:m}).catch(()=>{})}catch{}D.delete(e)}}function k(e,t,n){if(t.startsWith(`login-`)||t===`home`)return!1;let r=Array.from(e.clipboardData?.items??[]);if(r.some(e=>e.type===`text/plain`))return!1;let i=r.find(e=>e.kind===`file`&&e.type.startsWith(`image/`));if(!i)return!1;let a=i.getAsFile();return a?(A(a,t,n).then(({resized:e})=>{e&&m(`Image resized for remote access`)}).catch(e=>{m.error(e instanceof Error?`Image paste failed: ${e.message}`:`Image paste failed`)}),!0):!1}async function A(e,t,r,i={}){if(t.startsWith(`login-`)||t===`home`)throw Error(`Open a project terminal to attach an image.`);let a=c(),o=a?.generation,s=()=>{if(c()!==a||a?.generation!==o||!y.isConnected())throw Error(`The terminal connection changed; the image was not inserted.`)};i.signal?.throwIfAborted(),s(),i.onProgress?.({stage:`preparing`});let{blob:l,mime:u,resized:d}=await E(e,a!==null,i.signal);s();let f=a?await O(a,t,l,u,s,i.signal,(e,t)=>i.onProgress?.(e===t?{stage:`saving`}:{stage:`uploading`,received:e,total:t})):await(async()=>{let e=await j(l);return s(),i.signal?.throwIfAborted(),n.parse(await p(`POST`,`/api/worktrees/${t}/paste`,{mime:u,data:e}))})();return i.signal?.throwIfAborted(),s(),i.onProgress?.({stage:`inserting`}),i.insert?i.insert(`${f.path} `):a?await a.input(t,r,`${f.path} `):y.write(t,r,`${f.path} `),{resized:d}}function j(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).replace(/^data:[^,]*,/,``)),r.onerror=()=>n(r.error??Error(`could not read the clipboard image`)),r.readAsDataURL(e)})}var M=e(t(),1),N={ctrl:1,alt:2,shift:4},P=/^(?:\[[ABCD]|O[ABCD]|\[1;([2-8])[ABCD])$/,F=e=>e.startsWith(`\x1B`)?P.exec(e.slice(1)):null;function I(e){return!e.startsWith(`\x1B`)||e===`\x1B`||F(e)!==null||e===`\x1B[Z`}function L(e,t){if(!t)return e;let n=(t&N.ctrl)!==0,r=(t&N.alt)!==0,i=(t&N.shift)!==0,a=!!i|(r?2:0)|(n?4:0),o=F(e);if(o)return`\x1b[1;${1+(a|(o[1]?Number(o[1])-1:0))}${e.slice(-1)}`;if(!I(e))return e;if(e===` `||e===`\x1B[Z`)return i||e===`\x1B[Z`?`\x1B[Z`:` `;if(e===`\r`&&i)return`\x1b[13;${1+a}u`;if(i&&e.length===1){let t="`1234567890-=[]\\;',./".indexOf(e);t===-1?/[a-z]/.test(e)&&(e=e.toUpperCase()):e=`~!@#$%^&*()_+{}|:"<>?`[t]}if(n&&e.length===1){let t=e.toUpperCase().charCodeAt(0);t>=64&&t<=95?e=String.fromCharCode(t-64):e===` `?e=`\0`:e===`?`&&(e=``)}return r?`\x1b${e}`:e}function te(e){return e.length===3&&(e.startsWith(`\x1B[`)||e.startsWith(`\x1BO`))&&`ABCD`.includes(e[2])}var R=new Map,z=new Map,B=new Map,V=new Map,H=new Set,U=e=>(H.add(e),()=>{H.delete(e)}),W=()=>{for(let e of H)e()},G=(e,t)=>s(JSON.stringify([e,t]));function K(e,t){return(0,M.useSyncExternalStore)(U,()=>R.has(G(e,t)))}function q(e,t,n,r,i){let a=G(e,t);return R.set(a,n),r&&z.set(a,r),i?B.set(a,i):B.delete(a),W(),()=>{R.get(a)===n&&(R.delete(a),z.delete(a),B.delete(a),V.delete(a),W())}}function J(e,t){z.get(G(e,t))?.()}function Y(e,t){return(0,M.useSyncExternalStore)(U,()=>V.get(G(e,t))??0)}function X(e,t,n){let r=G(e,t);V.set(r,(V.get(r)??0)^n),W()}function Z(e,t,n){let r=G(e,t),i=V.get(r)??0;return!i||!I(n)?n:(V.delete(r),W(),L(n,i))}async function ne(e,t,n,r=!1){let i=G(e,t),a=R.get(i);if(!a)throw Error(`Wait for the terminal to attach; nothing was sent`);let o=r?`${a(n)}\r`:Z(e,t,n);!r&&te(o)&&B.get(i)?.()&&(o=`\x1bO${o.slice(-1)}`),await Q(e,t,o)}async function re(e,t,n){let r=G(e,t),i=R.get(r),a=c(),o=a?.generation;if(!i||!n()||!y.isConnected())throw Error(`Wait for the terminal to attach; nothing was pasted.`);let s;try{let n=navigator.clipboard.readText();J(e,t),s=await n}catch{throw Error(`Could not read the clipboard. Allow clipboard access or use your keyboard’s Paste action.`)}if(!n()||R.get(r)!==i||c()!==a||a?.generation!==o||!y.isConnected())throw Error(`The terminal changed; nothing was pasted. Try again in the active terminal.`);s&&await Q(e,t,i(s))}async function Q(e,t,n){let r=c();if(r)await r.input(e,t,n);else{if(!y.isConnected())throw Error(`Terminal is disconnected; nothing was sent`);y.write(e,t,n)}}var $=f();function ie({text:e,label:t,clear:n,paste:r}){let[i,a]=(0,M.useState)(!1);return(0,$.jsxs)(`div`,{role:`toolbar`,"aria-label":t,onPointerDown:e=>e.preventDefault(),className:`absolute right-2 top-2 z-20 flex gap-1 rounded-md bg-elevated p-1 shadow-lg`,children:[(0,$.jsxs)(g,{variant:`ghost`,size:`sm`,disabled:!e||i,onClick:async()=>{try{await navigator.clipboard.writeText(e),n()}catch{m.error(`Could not copy the selection. Try again.`)}},children:[(0,$.jsx)(v,{}),` Copy`]}),r&&(0,$.jsxs)(g,{variant:`ghost`,size:`sm`,disabled:i,onClick:async()=>{if(!i){a(!0);try{await r(),n()}catch(e){m.error(e instanceof Error?e.message:`Could not paste. Try again.`)}finally{a(!1)}}},children:[(0,$.jsx)(b,{}),` Paste`]}),(0,$.jsx)(g,{variant:`ghost`,size:`icon`,"aria-label":`Clear selection`,disabled:i,onClick:n,children:(0,$.jsx)(h,{})})]})}export{q as a,K as c,k as d,A as f,x as h,re as i,Y as l,S as m,Z as n,ne as o,C as p,J as r,X as s,ie as t,N as u};
|