@puddle-code/cli 0.4.14 → 0.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -5
- package/dist/index.js +5 -3
- package/dist/public/assets/App-D2NIub0q.js +25 -0
- package/dist/public/assets/{CompilationCommandForm-DQjUhaHj.js → CompilationCommandForm-0dW_hRVe.js} +1 -1
- package/dist/public/assets/Dashboard-CS0vtM4u.js +1 -0
- package/dist/public/assets/EditorTabClose-Ctgsk3yN.js +1 -0
- package/dist/public/assets/FindWidget-ET5pwkkB.js +1 -0
- package/dist/public/assets/LazyTerminal-DHusHr-B.js +2 -0
- package/dist/public/assets/{NotebookWidget-C25iz3Cj.js → NotebookWidget-CH5zoEVV.js} +1 -1
- package/dist/public/assets/{PaneEditorBody-AMEuxrqB.js → PaneEditorBody-DPgmBaUE.js} +7 -7
- package/dist/public/assets/{PdfViewer-BH-FXEVV.js → PdfViewer-DhzjgqhY.js} +1 -1
- package/dist/public/assets/{ReleaseNotesDialog-Pa1yagZd.js → ReleaseNotesDialog-sQVKJ6dm.js} +1 -1
- package/dist/public/assets/Ripple-CPTxioAz.css +1 -0
- package/dist/public/assets/Ripple-Dr6j05W2.js +11 -0
- package/dist/public/assets/SettingsDialog-BvPZONxi.js +8 -0
- package/dist/public/assets/Terminal-VQUxoYa8.js +65 -0
- package/dist/public/assets/Workspace-DtnFFmCw.js +20 -0
- package/dist/public/assets/{_virtual_notebook-widget-runtime-CVsZLTbL.js → _virtual_notebook-widget-runtime-RX_hqyhn.js} +1 -1
- package/dist/public/assets/{archive-i9DnVa-v.js → archive-BYp06n6i.js} +1 -1
- package/dist/public/assets/button-D-qeQvl5.js +1 -0
- package/dist/public/assets/{chevron-down-HQLVE6o5.js → chevron-down--sjpQEHH.js} +1 -1
- package/dist/public/assets/code-DRWf9a5s.js +1 -0
- package/dist/public/assets/command-CymPHY02.js +1 -0
- package/dist/public/assets/control-tray-CjoJunx1.js +1 -0
- package/dist/public/assets/{copy-D0Theg4Q.js → copy-CGsu8426.js} +1 -1
- package/dist/public/assets/createLucideIcon-DyMAgLa3.js +1 -0
- package/dist/public/assets/dialog-CTN-Lln6.js +41 -0
- package/dist/public/assets/dist-BS4thlzc.js +1 -0
- package/dist/public/assets/{dist-BeQvHdsz.js → dist-D_h3lAbU.js} +1 -1
- package/dist/public/assets/dist-DjnLfB6V.js +1 -0
- package/dist/public/assets/expanding-content-mbqCROSn.js +1 -0
- package/dist/public/assets/file-links-BEG4YRgY.js +1 -0
- package/dist/public/assets/forward-link-BfAPpjGN.js +1 -0
- package/dist/public/assets/{index-B5q_SMZR.js → index-8ZeniHH1.js} +2 -2
- package/dist/public/assets/{markdown-BlvTv1jG.js → markdown-Cseepnv3.js} +1 -1
- package/dist/public/assets/media-refresh-store-D36KU0BQ.js +1 -0
- package/dist/public/assets/notification-delivery-CaDNuszd.js +1 -0
- package/dist/public/assets/popover-CUC3fMrJ.js +1 -0
- package/dist/public/assets/preferences-Dbd4UMkr.js +1 -0
- package/dist/public/assets/{preview-kind-CPkO-rSz.js → preview-kind-DiWpvEc0.js} +1 -1
- package/dist/public/assets/render-rich-content-BoTeqQfi.css +1 -0
- package/dist/public/assets/render-rich-content-DmnxTNBP.js +4 -0
- package/dist/public/assets/{rotate-ccw-BI2k_h3A.js → rotate-ccw-CNjR2LSi.js} +1 -1
- package/dist/public/assets/select-BWD4Eh-G.js +1 -0
- package/dist/public/assets/selection-actions-Dih9eZsN.js +1 -0
- package/dist/public/assets/session-order-D4IUSoRp.js +1 -0
- package/dist/public/assets/switch-Dz9pPRp-.js +1 -0
- package/dist/public/assets/use-ui-state-Cp6TbkHi.js +1 -0
- package/dist/public/assets/utils-B6KiDbIe.js +1 -0
- package/dist/public/assets/{whole-word-BJjKpISQ.js → whole-word-2m2pmAFT.js} +1 -1
- package/dist/public/assets/ws-DjQ6OZLM.js +1 -0
- package/dist/public/assets/x-CbfJFzGo.js +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +1 -1
- package/dist/public/assets/App-HMdAT-QZ.js +0 -15
- package/dist/public/assets/Dashboard--rx_rrB_.js +0 -1
- package/dist/public/assets/EditorTabClose-CQnXn4Ha.js +0 -1
- package/dist/public/assets/FindWidget-Bh_7yWNg.js +0 -1
- package/dist/public/assets/LazyTerminal-CIclyIWs.js +0 -2
- package/dist/public/assets/Ripple-PKD1N1WS.js +0 -12
- package/dist/public/assets/Ripple-vJvVFdfw.css +0 -1
- package/dist/public/assets/SettingsDialog-B15ygzWY.js +0 -8
- package/dist/public/assets/Terminal-D4qZBQDk.js +0 -65
- package/dist/public/assets/Workspace-Baj8JhOO.js +0 -20
- package/dist/public/assets/arrow-down-CtYa-Aya.js +0 -1
- package/dist/public/assets/button-DtByPSFL.js +0 -1
- package/dist/public/assets/code-Cf4ftdOa.js +0 -1
- package/dist/public/assets/command--8Svn0Z-.js +0 -1
- package/dist/public/assets/control-tray-c9uXOo-i.js +0 -1
- package/dist/public/assets/createLucideIcon-C9A1vLE-.js +0 -1
- package/dist/public/assets/desktop-Bl69_YmL.js +0 -1
- package/dist/public/assets/dialog-DtvE8ATK.js +0 -41
- package/dist/public/assets/dist-B8heQ9Kq.js +0 -1
- package/dist/public/assets/dist-DZg8Dwbr.js +0 -1
- package/dist/public/assets/dist-Dac0re_p.js +0 -1
- package/dist/public/assets/expanding-content-CXpxNvmA.js +0 -1
- package/dist/public/assets/forward-link-CAXhnLYS.js +0 -1
- package/dist/public/assets/media-refresh-store-CYiYB60R.js +0 -1
- package/dist/public/assets/notification-delivery-CGw2AFKW.js +0 -1
- package/dist/public/assets/popover-D5HmbdQ7.js +0 -1
- package/dist/public/assets/preferences-4IYvJCFc.js +0 -1
- package/dist/public/assets/render-rich-content-DXt6ncgk.js +0 -4
- package/dist/public/assets/select-CGxTz4dh.js +0 -1
- package/dist/public/assets/selection-actions-BWAzKbbb.js +0 -1
- package/dist/public/assets/session-order-iVRWTB-C.js +0 -1
- package/dist/public/assets/square-terminal-CIkfNq3I.js +0 -1
- package/dist/public/assets/switch-DYr-iPWY.js +0 -1
- package/dist/public/assets/use-ui-state-BZrKAgQ4.js +0 -1
- package/dist/public/assets/waves-horizontal-CLDJf7Dd.js +0 -1
- package/dist/public/assets/ws-DV_MCpbg.js +0 -1
- package/dist/public/assets/x-DV6-RYI2.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{Et as n,It as r,T as i,Tt as a,Wt as o,Yt as s,Z as c,kt as l,lt as u}from"./protocol-support-BwRR1kRO.js";import{C as d,J as f,S as p,W as m,X as h,Z as g,o as _,q as v,x as y}from"./auth-C3ruG3fE.js";import{a as b,c as x,o as ee,p as te,s as S,t as ne}from"./LazyTerminal-CIclyIWs.js";import{n as re,o as C,r as ie,s as ae}from"./theme-swfNLod9.js";import{t as oe}from"./jsx-runtime-By8HlURe.js";import{i as w,n as T,t as se}from"./api-CULxlzTe.js";import{t as E}from"./desktop-Bl69_YmL.js";import{n as ce,t as D}from"./createLucideIcon-C9A1vLE-.js";import{i as le,o as ue,r as de,s as fe,t as pe}from"./dialog-DtvE8ATK.js";import{c as me,d as he,s as ge,u as _e}from"./switch-DYr-iPWY.js";import{t as O,y as ve}from"./ws-DV_MCpbg.js";function ye(e,t){return`[${te(t)}] ${e}`.slice(0,160)}function be(e){return e}var k=e(t(),1);function xe(e,t){let n=l(t);return Se({filters:{...e,status:`pending`}},n).length}function A(e,t){return e.findAll(t.filters).map(e=>t.select?t.select(e):e.state)}function Se(e={},t){let n=l(t).getMutationCache(),i=k.useRef(e),a=k.useRef(null);return a.current===null&&(a.current=A(n,e)),k.useEffect(()=>{i.current=e}),k.useSyncExternalStore(k.useCallback(e=>n.subscribe(()=>{let t=o(a.current,A(n,i.current));a.current!==t&&(a.current=t,r.schedule(e))}),[n]),()=>a.current,()=>a.current)}var Ce=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`}]]),we=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`}]]),Te=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`}]]),Ee=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`}]]),De=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`}]]),Oe=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`}]]),ke=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`}]]),Ae=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`}]]),je=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`}]]),Me=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`}]]),Ne=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`}]]),Pe=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`}]]),Fe=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`}]]),Ie=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`}]]),Le=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`}]]),Re=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`}]]),ze=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`}]]),Be=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`}]]),Ve=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`}]]),He=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`}]]),Ue=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`}]]),We=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`}]]),Ge=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`}]]),Ke=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`}]]),qe=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`}]]),Je=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`}]]),Ye=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`}]]),Xe=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`}]]),Ze=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`}]]),Qe=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`}]]),$e=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`}]]),et=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`}]]),tt=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`}]]),nt=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`}]]),rt=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`}]]),it=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`}]]),at=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`}]]),ot=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`}]]),st=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`}]]),ct=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`}]]),lt=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`}]]),ut=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`}]]),dt=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`}]]),ft=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`}]]),pt=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`}]]),mt=D(`egg`,[[`path`,{d:`M12 2C8 2 4 8 4 14a8 8 0 0 0 16 0c0-6-4-12-8-12`,key:`1le142`}]]),ht=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`}]]),gt=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`}]]),_t=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`}]]),vt=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`}]]),yt=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`}]]),bt=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`}]]),xt=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`}]]),St=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`}]]),Ct=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`}]]),wt=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`}]]),Tt=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`}]]),Et=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`}]]),Dt=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`}]]),Ot=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`}]]),kt=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`}]]),At=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`}]]),jt=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`}]]),Mt=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`}]]),Nt=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`}]]),Pt=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`}]]),Ft=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`}]]),It=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`}]]),Lt=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`}]]),j=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`}]]),Rt=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`}]]),zt=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`}]]),Bt=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`}]]),Vt=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`}]]),Ht=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`}]]),Ut=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`}]]),M=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`}]]),Wt=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`}]]),Gt=D(`mountain`,[[`path`,{d:`m8 3 4 8 5-5 5 15H2L8 3z`,key:`otkl63`}]]),Kt=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`}]]),qt=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`}]]),Jt=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`}]]),Yt=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`}]]),Xt=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`}]]),Zt=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`}]]),Qt=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`}]]),$t=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`}]]),en=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`}]]),tn=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`}]]),nn=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`}]]),rn=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`}]]),an=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`}]]),on=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`}]]),sn=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`}]]),cn=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`}]]),ln=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`}]]),un=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`}]]),dn=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`}]]),wn=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`}]]),Tn=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`}]]),En=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`}]]),Dn=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`}]]),On=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`}]]),kn=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`}]]),An=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`}]]),jn=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`}]]),Mn=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`}]]),Nn=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`}]]),Pn=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`}]]),Fn=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`}]]),In=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`}]]),Ln=[{name:`mountain`,Icon:Gt},{name:`mountain-snow`,Icon:Wt},{name:`tree-pine`,Icon:On},{name:`trees`,Icon:kn},{name:`leaf`,Icon:Bt},{name:`flower`,Icon:yt},{name:`flower-2`,Icon:vt},{name:`sprout`,Icon:xn},{name:`sun`,Icon:wn},{name:`moon`,Icon:M},{name:`star`,Icon:Cn},{name:`cloud`,Icon:tt},{name:`snowflake`,Icon:_n},{name:`zap`,Icon:ge},{name:`flame`,Icon:_t},{name:`droplet`,Icon:dt},{name:`rainbow`,Icon:rn},{name:`wind`,Icon:Fn},{name:`bird`,Icon:Ie},{name:`fish`,Icon:gt},{name:`cat`,Icon:Xe},{name:`dog`,Icon:lt},{name:`rabbit`,Icon:nn},{name:`turtle`,Icon:jn},{name:`bug`,Icon:Ue},{name:`snail`,Icon:gn},{name:`paw-print`,Icon:Xt},{name:`feather`,Icon:ht},{name:`rocket`,Icon:on},{name:`anchor`,Icon:Te},{name:`compass`,Icon:it},{name:`map`,Icon:Ut},{name:`tent`,Icon:En},{name:`camera`,Icon:Ge},{name:`music`,Icon:Kt},{name:`headphones`,Icon:Pt},{name:`palette`,Icon:_e},{name:`brush`,Icon:He},{name:`pencil`,Icon:x},{name:`book`,Icon:ze},{name:`book-open`,Icon:Re},{name:`coffee`,Icon:rt},{name:`pizza`,Icon:Qt},{name:`ice-cream-cone`,Icon:Lt},{name:`cake`,Icon:We},{name:`gift`,Icon:Et},{name:`gamepad-2`,Icon:St},{name:`puzzle`,Icon:tn},{name:`bike`,Icon:Fe},{name:`car`,Icon:Je},{name:`plane`,Icon:$t},{name:`ship`,Icon:pn},{name:`sailboat`,Icon:cn},{name:`train-front`,Icon:Dn},{name:`heart`,Icon:Ft},{name:`sparkles`,Icon:bn},{name:`crown`,Icon:st},{name:`gem`,Icon:Ct},{name:`trophy`,Icon:An},{name:`ghost`,Icon:Tt},{name:`bot`,Icon:he},{name:`globe`,Icon:Ot},{name:`guitar`,Icon:At}],Rn=Object.fromEntries(Ln.map(e=>[e.name,e.Icon])),N=oe();function zn({icon:e,colour:t,className:n}){let r=ce(`size-4 shrink-0`,t?b(t):`text-fg-muted`,n);return(0,N.jsx)(e&&Rn[e]||me,{className:r,style:ee(t)})}function P(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 Bn={navy:`--identity-navy`,gold:`--identity-gold`,blue:`--ansi-blue`,green:`--ansi-green`,red:`--ansi-red`,violet:`--ansi-magenta`,cyan:`--ansi-cyan`};function F(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(F);for(let t=0;t<=100;t++){let a=P(e,n,1-t/100),o=F(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=Bn[e],i=S(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?P(a,s,.18):P(a,o,.45),d=c?P(a,s,.4):P(a,o,.65),f=c?a:P(a,o,.75),p=c?P(a,s,.55):P(u,s,.76),m=n(`--bg-base`),h=c?s:o,g=P(a,P(h,m,c?.08:.06),c?.13:.05),_=P(g,h,c?.92:.96),v=P(g,n(`--bg-surface`),1/3),y=P(_,n(`--bg-elevated`),1/3),b=P(_,n(`--bg-tray`),1/3),x=[l,m,v,y,b],ee=I(P(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":ee,"--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:Ce},{name:`amphora`,Icon:we},{name:`apple`,Icon:De},{name:`armchair`,Icon:Oe},{name:`axe`,Icon:ke},{name:`banana`,Icon:Ae},{name:`bath`,Icon:je},{name:`beef`,Icon:Me},{name:`beer`,Icon:Ne},{name:`biceps-flexed`,Icon:Pe},{name:`bone`,Icon:Le},{name:`boom-box`,Icon:Be},{name:`briefcase-business`,Icon:Ve},{name:`candy`,Icon:qe},{name:`candy-cane`,Icon:Ke},{name:`carrot`,Icon:Ye},{name:`cherry`,Icon:Qe},{name:`chef-hat`,Icon:Ze},{name:`citrus`,Icon:$e},{name:`clapperboard`,Icon:et},{name:`clover`,Icon:nt},{name:`cookie`,Icon:at},{name:`croissant`,Icon:ot},{name:`dice5`,Icon:ct},{name:`drama`,Icon:ut},{name:`drum`,Icon:ft},{name:`dumbbell`,Icon:pt},{name:`egg`,Icon:mt},{name:`footprints`,Icon:bt},{name:`forklift`,Icon:xt},{name:`gavel`,Icon:wt},{name:`glasses`,Icon:Dt},{name:`graduation-cap`,Icon:kt},{name:`ham`,Icon:jt},{name:`hammer`,Icon:Mt},{name:`hand-metal`,Icon:Nt},{name:`ice-cream-bowl`,Icon:It},{name:`key-round`,Icon:j},{name:`lamp-desk`,Icon:Rt},{name:`lasso`,Icon:zt},{name:`lollipop`,Icon:Vt},{name:`magnet`,Icon:Ht},{name:`origami`,Icon:qt},{name:`panda`,Icon:Jt},{name:`party-popper`,Icon:Yt},{name:`pickaxe`,Icon:Zt},{name:`popcorn`,Icon:en},{name:`rat`,Icon:an},{name:`rocking-chair`,Icon:sn},{name:`sandwich`,Icon:ln},{name:`scissors`,Icon:un},{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:Tn},{name:`umbrella`,Icon:Mn},{name:`volleyball`,Icon:Nn},{name:`wand-sparkles`,Icon:Pn},{name:`worm`,Icon:In},{name:`anvil`,Icon:Ee}],R=Object.fromEntries(L.map(({name:e,Icon:t})=>[e,t]));function z(e=!0){let t=ve(),n=u(e?t??void 0:void 0),r=n.data?.hostColour;return{ready:e&&n.isSuccess,icon:n.data?.hostIcon,colour:m.some(e=>e===r)||S(r)?r:null}}function B({icon:e,className:t=`size-4 shrink-0`}){return(0,N.jsx)(e&&Object.hasOwn(R,e)&&R[e]||dn,{className:t,"aria-hidden":`true`})}function Hn({enabled:e=!0}){let{colour:t}=z(e);return(0,k.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,ie(),re());n=Object.keys(i);for(let[t,n]of Object.entries(i))e.style.setProperty(t,n);e.dataset.hostColour=t};i();let a=ae(i,{first:!0});return C(),()=>{a(),r(),C()}},[t]),null}function Un(){let e=c(),{icon:t,colour:n,ready:r}=z(),a=i(e.data),o=(0,k.useRef)(null);return(0,k.useLayoutEffect)(()=>{let e=document.documentElement,t=o.current?.querySelector(`svg`);if(!(!r||!a||!t))return e.dataset.desktopHostIdentity=JSON.stringify({name:a,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,a,t,n]),(0,N.jsx)(`span`,{hidden:!0,ref:o,children:(0,N.jsx)(B,{icon:t})})}function Wn({stream:e,label:t,hint:n,onClose:r}){let[i,a]=(0,k.useState)(null);return(0,N.jsx)(pe,{open:!0,onOpenChange:e=>!e&&r(),children:(0,N.jsxs)(de,{className:`h-[85vh] max-w-[calc(100vw-4rem)]`,children:[(0,N.jsxs)(ue,{children:[(0,N.jsxs)(fe,{children:[t,` — login`]}),(0,N.jsx)(le,{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,N.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-md bg-ground p-1`,children:(0,N.jsx)(ne,{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&&f(i.version,t.daemon_version)&&r.push({component:`daemon`,version:i.version}),a?.host_asset&&t.runtime_default&&f(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&&!v(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&&!v(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 _()?.scope??`local`}function U(e){let t=_(),n=t?.generation,r=t?`/api/host/updates`:`/cockpit/updates`,i=()=>{if(!e)throw Error(`Host updates require host-approved device access.`);if(_()!==t||t?.generation!==n)throw Error(`Host update connection changed. Refresh status before continuing.`)};return async(e,n)=>{i(),t&&e&&d.parse(e);let a=r;e||(!t||s(h.parse(await T(`GET`,`/api/version`,void 0,n)).protocol,{major:26,minor:2}))&&(a+=`?components=1`);let o;try{o=e?await T(`POST`,r,e,n):await T(`GET`,a,void 0,n)}catch(t){if(e||a===r||!(t instanceof se)||![400,403].includes(t.status))throw t;o=await T(`GET`,r,void 0,n)}return i(),o}}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=_(),t=n({queryKey:[`host-update-access`,H(),e?.generation],queryFn:async({signal:e})=>{let t=h.parse(await T(`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=!_()){let t=U(e);return be({queryKey:W(),queryFn:async({signal:e})=>p.parse(await t(void 0,e)),enabled:e,retry:!1,staleTime:5e3,refetchInterval:e=>e.state.error instanceof se&&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=!_()){let n=W(),r=U(t);return{mutationKey:[`cockpit-host-update-action`,H()],retry:!1,networkMode:`always`,mutationFn:async e=>y.parse(await r(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 n(Qn(G()))}function tr(){let e=l(),t=G(),n=[`cockpit-host-update-action`,H()],r=xe({mutationKey:n}),i=a($n(e,t));return{...i,busy:r>0,act:t=>{e.isMutating({mutationKey:n})||i.mutate(t)}}}function nr(){let e=l(),t=H();(0,k.useEffect)(()=>{let n=[`cockpit-host-updates`,t],r=()=>{e.invalidateQueries({queryKey:n}),e.invalidateQueries({queryKey:[`release-notes`]})},i=O.onHostUpdatesChanged(r),a=Zn(e,t),o=O.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 Y(e){return JSON.stringify([e.title??``,e.body,e.tags,e.agent_type??``])}function rr(e,t){if(!Array.isArray(e))return[];let n=new Set(J(t).map(Y)),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=Y(a);n.has(o)||r.has(o)||(r.add(o),i.push(a))}return i}function ir(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 ar(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=ir(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 or(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=rr(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 sr={version:1,profiles:{}};function cr(e,t){return e.profiles[t]??{enabled:!0,groups:q.map(e=>e.id),doc:{},updatedAt:new Date(0).toISOString()}}async function lr(){try{let e=await fetch(`/cockpit/local-sync`,{headers:w(),cache:`no-store`});return e.ok?{available:!0,file:await e.json()}:{available:!1,file:sr}}catch{return{available:!1,file:sr}}}function ur(){return n({queryKey:[`local-sync`],queryFn:lr,staleTime:5e3,refetchOnWindowFocus:!0,retry:!1})}function dr(){let e=l();return a({mutationFn:async e=>{let t=await fetch(`/cockpit/local-sync`,{method:`PUT`,headers:{...w(),"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 fr(){return E()?.showNotification?`unverified`:typeof Notification>`u`?`unsupported`:Notification.permission}async function pr(e,t){let n;try{return await Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(Error(t)),1e4)})])}finally{clearTimeout(n)}}var X;async function mr(){return!(`serviceWorker`in navigator)||!window.isSecureContext?null:(X||=hr().catch(e=>{throw X=void 0,e}),X)}async function hr(){let e=await pr(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 gr(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 _r={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){_r=e;for(let e of Z)e();return e}function xr(){return(0,k.useSyncExternalStore)(e=>(Z.add(e),()=>{Z.delete(e)}),()=>_r)}async function Sr(){let e=E();if(e?.notificationStatus)try{$(g.parse(await e.notificationStatus()))}catch{$({state:`failed`,message:`Could not read desktop notification delivery status.`})}}async function Cr(e,t,n){try{let r=E();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 $(g.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:ye(e.title,n.project)}:e,a=await mr();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 gr(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{Ln as A,Wn as C,z as D,B as E,dn as M,M as N,L as O,j as P,qn as S,Hn as T,Gn as _,cr as a,Yn as b,q as c,G as d,tr as f,Xn as g,H as h,fr as i,wn as j,zn as k,or as l,er as m,Sr as n,ur as o,nr as p,xr as r,dr as s,Cr as t,ar as u,V as v,Un as w,Kn as x,Jn as y};
|
|
@@ -1 +0,0 @@
|
|
|
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"./createLucideIcon-C9A1vLE-.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-DtvE8ATK.js";import{a as g,n as _}from"./dist-DZg8Dwbr.js";import{_ as v,b as y,g as b,m as x,p as S,v as C,y as w}from"./dist-Dac0re_p.js";var T=e(t(),1),E=n(),D=`Popover`,[O,ee]=o(D,[y]),k=y(),[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)(w,{...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)(b,{...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)(b,{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)(C,{"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)(v,{...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`,x,S,e),...i})})}export{ae as n,ie as r,re as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{i as n}from"./auth-C3ruG3fE.js";import{i as r}from"./client-settings-BdKglwtW.js";import{r as i}from"./index-B5q_SMZR.js";function a(){return i.get()}var o=32,s=2048;function c(e,t,n,r){let i=e.getLine(t);if(!i)return null;let a=e.getNullCell(),o=``,s=[];for(let c=Math.max(0,r?.firstCol??0);c<Math.min(n,i.length,r?.lastCol??n);c++){if(!i.getCell(c,a)||a.getWidth()===0)continue;if(c===n-1&&a.getChars()===``){let n=e.getLine(t+1);if(n?.isWrapped&&n.getCell(0)?.getWidth()===2)continue}let r=a.getChars()||` `;o+=r;for(let e=0;e<r.length;e++)s.push({row:t,col:c})}return{text:o,cells:s,isWrapped:i.isWrapped}}function l(e,t,n){return{...e,text:e.text.slice(t,n),cells:e.cells.slice(t,n)}}function u(e,t,n,r,i){if(t<0||n<1)return[];let a=Math.max(0,t-o+1),u=new Map;for(let r=a;r<t+o;r++){let t=c(e,r,n);if(!t)break;u.set(r,t)}let d=new Set,f=[];for(let c of[!0,!1])for(let p=a;p<=t;p++){if(u.get(p)?.isWrapped&&p>a)continue;let m=``,h=[];for(let a=p;a<p+o;a++){let o=u.get(a);if(!o)break;let g=u.get(a-1);if(a>p&&!o.isWrapped&&!(c&&g&&i(g,o,n,m)))break;let _=u.get(a+1),v=l(o,a>p&&!o.isWrapped?o.text.length-o.text.trimStart().length:0,_?.isWrapped?o.text.length:o.text.trimEnd().length);if(m.length+v.text.length>s)break;if(m+=v.text,h.push(...v.cells),!(a<t))for(let n of r(m)){let r=h[n.start],i=h[n.end-1];if(!r||!i||r.row>t||i.row<t)continue;let a=`${m.slice(n.start,n.end)}\0${r.row}:${r.col}-${i.row}:${i.col}`;if(d.has(a))continue;d.add(a);let o=e.getLine(i.row)?.getCell(i.col)?.getWidth()??1;f.push({candidate:n,start:r,end:{row:i.row,col:i.col+Math.max(1,o)-1},text:m.slice(n.start,n.end)})}}}return f.sort((e,t)=>t.text.length-e.text.length)}var d=e(t(),1),f=n(`puddle.ripple.sessions`),p=n(`puddle.ripple.boundaries`);function m(e){try{let t=JSON.parse(e??`{}`);return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(e=>typeof e[1]==`boolean`).slice(-256))}catch{return{}}}function h(e,t){let n=Object.entries(m(f.get())).filter(([t])=>t!==e);t!==null&&n.push([e,t]),f.set(JSON.stringify(Object.fromEntries(n.slice(-256))))}function g(e){let t=f.subscribe(e);return window.addEventListener(`storage`,e),()=>{t(),window.removeEventListener(`storage`,e)}}function _(e){let t=r(),n=m((0,d.useSyncExternalStore)(g,f.get)),i=Object.hasOwn(n,e)?n[e]:null;return{enabled:i??t.rippleEnabled===!0,override:i}}function v(e){try{let t=JSON.parse(e??`{}`);return!t||typeof t!=`object`||Array.isArray(t)?{}:Object.fromEntries(Object.entries(t).filter(e=>typeof e[1]==`number`&&Number.isInteger(e[1])&&e[1]>=1&&e[1]<=500).slice(-256))}catch{return{}}}function y(e,t){let n=Object.entries(v(p.get())).filter(([t])=>t!==e);t!==null&&n.push([e,Math.max(1,Math.min(500,Math.round(t)))]),p.set(JSON.stringify(Object.fromEntries(n.slice(-256))))}function b(e){return v((0,d.useSyncExternalStore)(p.subscribe,p.get))[e]??null}export{u as a,_ as i,h as n,c as o,b as r,a as s,y as t};
|
|
@@ -1,4 +0,0 @@
|
|
|
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{t as e}from"./preload-helper-Czpn1I53.js";import{r as t}from"./math-delimiters-BCnTi7Ii.js";import{o as n}from"./preferences-4IYvJCFc.js";var r=new Set([`localhost`,`127.0.0.1`,`::1`,`[::1]`]);function i(e,t,n){if(!n)return e;let i;try{i=new URL(e)}catch{return e}return i.protocol!==`http:`&&i.protocol!==`https:`||!r.has(i.hostname)?e:`/forward/${t}/${i.port===``?i.protocol===`https:`?`443`:`80`:i.port}?path=${encodeURIComponent(i.pathname+i.search+i.hash)}`}var a=128,o=32768,s=32,c=/^\s*(`{3,}|~{3,})(.*)$/,l=/^\s*(?:flowchart|graph)\s+(?:TB|TD|BT|RL|LR)\s*;?\s*$/,u=/^\s*sequenceDiagram\s*$/;function d(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 f(e,r,i,f,p){if(r<1||f<1)return[];let m=Math.min(a,Math.max(0,Math.floor((o/(r+1)-f)/2))),h=Math.max(0,i-m),g=Math.min(e.length,i+f+m),_=[],v=0;for(let t=h;t<g;t++){let i=n(e,t,r,p);if(!i)break;let a=e.getLine(t+1)?.isWrapped?i.text.length:i.text.trimEnd().length;if(v+=a+1,v>o)break;let s=_.at(-1);i.isWrapped&&s?(s.text+=i.text.slice(0,a),s.cells.push(...i.cells.slice(0,a))):_.push({text:i.text.slice(0,a),cells:i.cells.slice(0,a)})}let y=[],b=(t,n,r,a)=>{let o=a[0],c=a.at(-1);if(!o||!c||!n.trim()||y.length>=s||c.row<i||o.row>=i+f)return;let l=e.getLine(c.row)?.getCell(c.col)?.getWidth()??1;y.push({kind:t,source:n.trim(),display:r,start:o,end:{row:c.row,col:c.col+Math.max(1,l)-1}})};for(let e=0;e<_.length&&y.length<s;e++){let n=_[e],r=c.exec(n.text);if(r){let t=e+1;for(;t<_.length;){let e=c.exec(_[t].text);if(e&&!e[2].trim()&&e[1][0]===r[1][0]&&e[1].length>=r[1].length)break;t++}if(t===_.length)break;let n=r[2].trim().split(/\s+/)[0].toLowerCase();if([`mermaid`,`math`,`latex`,`tex`].includes(n)){let r=_.slice(e+1,t).map(e=>e.text).join(`
|
|
3
|
-
`);b(n===`mermaid`?`mermaid`:`math`,r,!0,_.slice(e,t+1).flatMap(e=>e.cells))}e=t;continue}let i=u.test(n.text);if(l.test(n.text)||i){let t=e+1;for(;t<_.length&&d(_[t].text,i);)t++;for(;t>e+1&&!_[t-1].text.trim();)t--;if(t>e+1){let n=_.slice(e,t);b(`mermaid`,n.map(e=>e.text).join(`
|
|
4
|
-
`),!0,n.flatMap(e=>e.cells)),e=t-1;continue}}let a=n.text.trim();if(a.startsWith(`$$`)||a.startsWith(`\\[`)){let n=a,r=e,i=t(n);for(;!i&&r+1<_.length&&(n+=`\n${_[++r].text.trim()}`,i=t(n),!/\n\s*\n/.test(n)););if(i?.display&&i.length===n.length){b(`math`,i.tex,!0,_.slice(e,r+1).flatMap(e=>e.cells)),e=r;continue}if(a===`$$`||a===`\\[`)continue}for(let e=0;e<n.text.length;e++){if(n.text[e]==="`"){let t=/^`+/.exec(n.text.slice(e))[0],r=n.text.indexOf(t,e+t.length);if(r<0)break;e=r+t.length-1;continue}let r=t(n.text,e);if(r){let t=n.cells.slice(e,e+r.length);(t[0]?.row===t.at(-1)?.row||n.text.trim()===n.text.slice(e,e+r.length))&&b(`math`,r.tex,r.display,t),e+=r.length-1}else n.text[e]===`\\`&&e++}}return y}async function p(t,n,r,i,a=!1){if(n.kind===`mermaid`){let{renderMermaidDiagrams:o}=await e(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=n.source,t.replaceChildren(s),await o(t,r,i,a),!i.aborted&&!s.querySelector(`svg`))throw Error(`Unable to render Mermaid diagram`)}else{let[{renderMathHtml:r},{default:a}]=await Promise.all([e(()=>import(`./math-CSw6sgCC.js`).then(e=>e.n),__vite__mapDeps([4,1,5])),e(()=>import(`./purify.es-D8QhFVkO.js`).then(e=>e.n),__vite__mapDeps([6,1])),e(()=>import(`./katex.min-ZqdHjttS.js`).then(e=>e.t),__vite__mapDeps([7,1,8]))]);if(i.aborted)return;if(t.innerHTML=a.sanitize(r(n.source,n.display)),t.querySelector(`.katex-error`))throw Error(`Unable to render LaTeX`)}}export{f as n,i as r,p as t};
|
|
@@ -1 +0,0 @@
|
|
|
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{n as i,t as a}from"./createLucideIcon-C9A1vLE-.js";import{C as o,E as s,S as c,T as l,_ as u,b as d,f,g as p,h as m,m as h,p as g,v as _,x as v,y}from"./dialog-DtvE8ATK.js";import{a as b,n as x}from"./dist-DZg8Dwbr.js";import{_ as S,b as C,c as w,d as T,f as E,g as D,n as O,t as k,u as A,v as j,y as ee}from"./dist-Dac0re_p.js";import{a as te,t as M}from"./dist-BeQvHdsz.js";import{t as N}from"./chevron-down-HQLVE6o5.js";var P=a(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),F=e(t(),1),I=e(n(),1);function L(e,[t,n]){return Math.min(n,Math.max(t,e))}var R=r(),z=[` `,`Enter`,`ArrowUp`,`ArrowDown`],B=[` `,`Enter`],V=`Select`,[H,U,ne]=O(V),[W,re]=l(V,[ne,C]),G=C(),[ie,K]=W(V),[ae,oe]=W(V),se=`SelectProvider`;function ce(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:f,required:m,form:h,internal_do_not_use_render:g}=e,_=G(t),[v,b]=F.useState(null),[x,S]=F.useState(null),[C,w]=F.useState(!1),T=k(l),[E,D]=p({prop:r,defaultProp:i??!1,onChange:a,caller:V}),[O,A]=p({prop:o,defaultProp:s,onChange:c,caller:V}),j=F.useRef(null),te=F.useRef(O);F.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=()=>A(te.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,A]);let M=!v||!!h||!!v.closest(`form`),[N,P]=F.useState(new Set),I=y(),L=Array.from(N).map(e=>e.props.value).join(`;`),z=F.useCallback(e=>{P(t=>new Set(t).add(e))},[]),B=F.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),U={required:m,trigger:v,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:I,value:O,onValueChange:A,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:j,disabled:f,name:u,autoComplete:d,form:h,nativeOptions:N,nativeSelectKey:L,isFormControl:M};return(0,R.jsx)(ee,{..._,children:(0,R.jsx)(ie,{scope:t,...U,children:(0,R.jsx)(H.Provider,{scope:t,children:(0,R.jsx)(ae,{scope:t,onNativeOptionAdd:z,onNativeOptionRemove:B,children:nt(g)?g(U):n})})})})}ce.displayName=se;var le=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,R.jsx)(ce,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,R.jsxs)(R.Fragment,{children:[n,e?(0,R.jsx)(tt,{__scopeSelect:t}):null]})})};le.displayName=V;var ue=`SelectTrigger`,de=F.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=G(n),c=K(ue,n),l=c.disabled||r,u=b(t,c.onTriggerChange),d=U(n),f=F.useRef(`touch`),[p,m,h]=rt(e=>{let t=d().filter(e=>!e.disabled),n=it(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,R.jsx)(D,{asChild:!0,...a,children:(0,R.jsx)(o.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":$(c.value)?``:void 0,...i,ref:u,onClick:s(i.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:s(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:s(i.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&z.includes(e.key)&&(g(),e.preventDefault())})})})});de.displayName=ue;var fe=`SelectValue`,pe=F.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:s=``,...c}=e,l=K(fe,n),{onValueNodeHasChildrenChange:u}=l,f=a!==void 0,p=b(t,l.onValueNodeChange);d(()=>{u(f)},[u,f]);let m=$(l.value);return(0,R.jsx)(o.span,{...c,asChild:!m&&c.asChild,ref:p,style:{pointerEvents:`none`},children:(0,R.jsx)(F.Fragment,{children:m?s:a},m?`placeholder`:`value`)})});pe.displayName=fe;var me=`SelectIcon`,he=F.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,R.jsx)(o.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});he.displayName=me;var ge=`SelectPortal`,[_e,ve]=W(ge,{forceMount:void 0}),ye=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,R.jsx)(_e,{scope:e.__scopeSelect,forceMount:n,children:(0,R.jsx)(_,{asChild:!0,...r})})};ye.displayName=ge;var q=`SelectContent`,be=F.forwardRef((e,t)=>{let n=ve(q,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=K(q,e.__scopeSelect),[o,s]=F.useState();return d(()=>{s(new DocumentFragment)},[]),(0,R.jsx)(u,{present:r||a.open,children:({present:e})=>e?(0,R.jsx)(Te,{...i,ref:t}):(0,R.jsx)(xe,{...i,fragment:o})})});be.displayName=q;var xe=F.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?I.createPortal((0,R.jsx)(Se,{scope:n,children:(0,R.jsx)(H.Slot,{scope:n,children:(0,R.jsx)(`div`,{ref:t,children:r})})}),i):null});xe.displayName=`SelectContentFragment`;var J=10,[Se,Y]=W(q),Ce=`SelectContentImpl`,we=x(`SelectContent.RemoveScroll`),Te=F.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:_,collisionPadding:y,sticky:x,hideWhenDetached:S,avoidCollisions:C,...w}=e,T=K(q,n),[E,D]=F.useState(null),[O,k]=F.useState(null),A=b(t,D),[j,ee]=F.useState(null),[te,M]=F.useState(null),N=U(n),[P,I]=F.useState(!1),L=F.useRef(!1);F.useEffect(()=>{if(E)return g(E)},[E]),m();let z=F.useCallback(e=>{let[t,...n]=N().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},[N,O]),B=F.useCallback(()=>z([j,E]),[z,j,E]);F.useEffect(()=>{P&&B()},[P,B]);let{onOpenChange:V,triggerPointerDownPosRef:H}=T;F.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]),F.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,W]=rt(e=>{let t=N().filter(e=>!e.disabled),n=it(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),re=F.useCallback((e,t,n)=>{let r=!L.current&&!n;(T.value!==void 0&&T.value===t||r)&&(ee(e),r&&(L.current=!0))},[T.value]),G=F.useCallback(()=>E?.focus(),[E]),ie=F.useCallback((e,t,n)=>{let r=!L.current&&!n;(T.value!==void 0&&T.value===t||r)&&M(e)},[T.value]),ae=r===`popper`?X:De,oe=ae===X?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:_,collisionPadding:y,sticky:x,hideWhenDetached:S,avoidCollisions:C}:{};return(0,R.jsx)(Se,{scope:n,content:E,viewport:O,onViewportChange:k,itemRefCallback:re,selectedItem:j,onItemLeave:G,itemTextRefCallback:ie,focusSelectedItem:B,selectedItemText:te,position:r,isPositioned:P,searchRef:ne,children:(0,R.jsx)(f,{as:we,allowPinchZoom:!0,children:(0,R.jsx)(h,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:s(i,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,R.jsx)(v,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,R.jsx)(ae,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...oe,onPlaced:()=>I(!0),ref:A,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:s(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&W(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=N().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()}})})})})})})});Te.displayName=Ce;var Ee=`SelectItemAlignedPosition`,De=F.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=K(q,n),s=Y(q,n),[c,l]=F.useState(null),[u,f]=F.useState(null),p=b(t,f),m=U(n),h=F.useRef(!1),g=F.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:x}=s,S=F.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&u&&_&&v&&y){let e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=y.getBoundingClientRect();if(a.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-J,d=L(a,[J,Math.max(J,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-J,d=L(a,[J,Math.max(J,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let o=m(),s=window.innerHeight-J*2,l=_.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),p=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=f+p+l+b+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-J,D=s-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=o.length>0&&v===o[o.length-1].ref.current;c.style.bottom=`0px`;let t=u.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);c.style.height=n+`px`}else{let e=o.length>0&&v===o[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=`${J}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,c,u,_,v,y,a.dir,r]);d(()=>S(),[S]);let[C,w]=F.useState();return d(()=>{u&&w(window.getComputedStyle(u).zIndex)},[u]),(0,R.jsx)(ke,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:F.useCallback(e=>{e&&g.current===!0&&(S(),x?.(),g.current=!1)},[S,x]),children:(0,R.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,R.jsx)(o.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});De.displayName=Ee;var Oe=`SelectPopperPosition`,X=F.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=J,...a}=e,o=G(n);return(0,R.jsx)(j,{...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)`}})});X.displayName=Oe;var[ke,Ae]=W(q,{}),je=`SelectViewport`,Me=F.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=Y(je,n),c=Ae(je,n),l=b(t,a.onViewportChange),u=F.useRef(0);return(0,R.jsxs)(R.Fragment,{children:[(0,R.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,R.jsx)(H.Slot,{scope:n,children:(0,R.jsx)(o.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:s(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-J*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})})})]})});Me.displayName=je;var Ne=`SelectGroup`,[Pe,Fe]=W(Ne),Ie=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=y();return(0,R.jsx)(Pe,{scope:n,id:i,children:(0,R.jsx)(o.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Ie.displayName=Ne;var Le=`SelectLabel`,Re=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Fe(Le,n);return(0,R.jsx)(o.div,{id:i.id,...r,ref:t})});Re.displayName=Le;var Z=`SelectItem`,[ze,Be]=W(Z),Ve=F.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...l}=e,u=K(Z,n),d=Y(Z,n),f=u.value===r,[p,m]=F.useState(a??``),[h,g]=F.useState(!1),_=b(t,c(e=>d.itemRefCallback?.(e,r,i))),v=y(),x=F.useRef(`touch`),S=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};return(0,R.jsx)(ze,{scope:n,value:r,disabled:i,textId:v,isSelected:f,onItemTextChange:F.useCallback(e=>{m(t=>t||(e?.textContent??``).trim())},[]),children:(0,R.jsx)(H.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:(0,R.jsx)(o.div,{role:`option`,"aria-labelledby":v,"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:s(l.onFocus,()=>g(!0)),onBlur:s(l.onBlur,()=>g(!1)),onClick:s(l.onClick,()=>{x.current!==`mouse`&&S()}),onPointerUp:s(l.onPointerUp,()=>{x.current===`mouse`&&S()}),onPointerDown:s(l.onPointerDown,e=>{x.current=e.pointerType}),onPointerMove:s(l.onPointerMove,e=>{x.current=e.pointerType,i?d.onItemLeave?.():x.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:s(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:s(l.onKeyDown,e=>{i||e.target!==e.currentTarget||d.searchRef?.current!==``&&e.key===` `||(B.includes(e.key)&&S(),e.key===` `&&e.preventDefault())})})})})});Ve.displayName=Z;var Q=`SelectItemText`,He=F.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,s=K(Q,n),l=Y(Q,n),u=Be(Q,n),f=oe(Q,n),[p,m]=F.useState(null),h=c(e=>l.itemTextRefCallback?.(e,u.value,u.disabled)),g=b(t,m,u.onItemTextChange,h),_=p?.textContent,v=F.useMemo(()=>(0,R.jsx)(`option`,{value:u.value,disabled:u.disabled,children:_},u.value),[u.disabled,u.value,_]),{onNativeOptionAdd:y,onNativeOptionRemove:x}=f;return d(()=>(y(v),()=>x(v)),[y,x,v]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(o.span,{id:u.textId,...a,ref:g}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!$(s.value)?I.createPortal(a.children,s.valueNode):null]})});He.displayName=Q;var Ue=`SelectItemIndicator`,We=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Be(Ue,n).isSelected?(0,R.jsx)(o.span,{"aria-hidden":!0,...r,ref:t}):null});We.displayName=Ue;var Ge=`SelectScrollUpButton`,Ke=F.forwardRef((e,t)=>{let n=Y(Ge,e.__scopeSelect),r=Ae(Ge,e.__scopeSelect),[i,a]=F.useState(!1),o=b(t,r.onScrollButtonChange);return d(()=>{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,R.jsx)(Ye,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Ke.displayName=Ge;var qe=`SelectScrollDownButton`,Je=F.forwardRef((e,t)=>{let n=Y(qe,e.__scopeSelect),r=Ae(qe,e.__scopeSelect),[i,a]=F.useState(!1),o=b(t,r.onScrollButtonChange);return d(()=>{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,R.jsx)(Ye,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Je.displayName=qe;var Ye=F.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Y(`SelectScrollButton`,n),c=F.useRef(null),l=U(n),u=F.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return F.useEffect(()=>()=>u(),[u]),d(()=>{l().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[l]),(0,R.jsx)(o.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:s(i.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:s(i.onPointerMove,()=>{a.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:s(i.onPointerLeave,()=>{u()})})}),Xe=`SelectSeparator`,Ze=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,R.jsx)(o.div,{"aria-hidden":!0,...r,ref:t})});Ze.displayName=Xe;var Qe=`SelectArrow`,$e=F.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=G(n);return Y(Qe,n).position===`popper`?(0,R.jsx)(S,{...i,...r,ref:t}):null});$e.displayName=Qe;var et=`SelectBubbleInput`,tt=F.forwardRef(({__scopeSelect:e,...t},n)=>{let r=K(et,e),{value:i,onValueChange:a,required:s,disabled:c,name:l,autoComplete:u,form:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=F.useRef(null),h=b(n,m),g=i??``,_=M(g),v=Array.from(f).some(e=>(e.props.value??``)===``);return F.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,R.jsxs)(o.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:l,autoComplete:u,disabled:c,form:d,onChange:e=>a(e.target.value),...t,style:{...te,...t.style},ref:h,defaultValue:g,children:[$(i)&&!v?(0,R.jsx)(`option`,{value:``}):null,Array.from(f)]},p)});tt.displayName=et;function nt(e){return typeof e==`function`}function $(e){return e===``||e===void 0}function rt(e){let t=c(e),n=F.useRef(``),r=F.useRef(0),i=F.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=F.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return F.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function it(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=at(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 at(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ot=le,st=pe;function ct({className:e,children:t,...n}){return(0,R.jsxs)(de,{className:i(`flex h-[var(--ui-field-height)] w-full cursor-pointer items-center justify-between gap-2 px-2.5 [&>span]:truncate`,w,e),...n,children:[t,(0,R.jsx)(he,{asChild:!0,children:(0,R.jsx)(N,{className:`size-3.5 shrink-0 text-fg-muted`})})]})}function lt({className:e,children:t,position:n=`popper`,...r}){return(0,R.jsx)(ye,{children:(0,R.jsx)(be,{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,R.jsx)(Me,{children:t})})})}function ut({className:e,children:t,detail:n,...r}){return(0,R.jsxs)(Ve,{className:i(T,A,`py-1.5 pl-7 pr-2`,e),...r,children:[(0,R.jsx)(`span`,{className:`absolute left-2 flex size-3.5 items-center justify-center`,children:(0,R.jsx)(We,{children:(0,R.jsx)(P,{className:`size-3.5`})})}),(0,R.jsx)(He,{children:t}),n]})}export{st as a,ct as i,lt as n,P as o,ut as r,ot as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{A as n,X as r,a as i,d as a,et as o,f as s,j as c,o as l,v as u}from"./auth-C3ruG3fE.js";import{t as d}from"./jsx-runtime-By8HlURe.js";import{n as f}from"./api-CULxlzTe.js";import{t as p}from"./createLucideIcon-C9A1vLE-.js";import{n as m}from"./dist-BOS6OKSE.js";import{t as h}from"./button-DtByPSFL.js";import{t as g}from"./copy-D0Theg4Q.js";import{t as _}from"./x-DV6-RYI2.js";import{t as v}from"./ws-DV_MCpbg.js";import{a as y}from"./preferences-4IYvJCFc.js";var b=p(`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`}]]),ee=p(`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`}]]),x=n.options.join(`,`),S=a.imageBytes,C=20*1024*1024;async function te(e,t,r){r?.throwIfAborted();let i=n.safeParse(e.type);if(!i.success)throw Error(`Choose a PNG, JPEG, GIF or WebP image.`);if(e.size===0)throw Error(`This image is empty.`);if(e.size>C)throw Error(`Choose an image smaller than 20 MiB.`);if(!t||e.size<=S)return{blob:e,mime:i.data,resized:!1};if(i.data===`image/gif`)throw Error(`Choose a GIF no larger than 4 MiB for remote access.`);let a=await createImageBitmap(e);try{r?.throwIfAborted();let e=document.createElement(`canvas`),t=e.getContext(`2d`);if(!t)throw Error(`Could not prepare this image.`);let o=i.data===`image/jpeg`?`image/jpeg`:`image/webp`,s=Math.min(1,2048/Math.max(a.width,a.height));for(let i=0;i<8;i++){e.width=Math.max(1,Math.round(a.width*s)),e.height=Math.max(1,Math.round(a.height*s)),t.drawImage(a,0,0,e.width,e.height);for(let t of[.85,.7,.55]){let i=await new Promise(n=>e.toBlob(n,o,t));if(r?.throwIfAborted(),i&&i.size<=S)return{blob:i,mime:n.parse(i.type),resized:!0}}s*=.75}throw Error(`This image is too large to attach remotely. Choose a smaller image.`)}finally{a.close()}}var w=new WeakSet,ne=Math.floor((u.requestBytes-1024)*3/4);async function re(e,t,n,i,l,u,d){let f=e.generation,p=()=>{if(u?.throwIfAborted(),l(),e.generation!==f)throw Error(`The connection changed; the image upload was interrupted.`)};if(p(),!n.size||n.size>a.imageBytes)throw Error(`The prepared image must be no larger than 4 MiB.`);if(w.has(e))throw Error(`An image upload is already in progress.`);w.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=r.parse(await v(`GET`,`/api/version`));if(d?.(0,n.size),!e.remote_image_uploads){if(n.size>ne)throw Error(`Update the host connector to upload images larger than 191 KiB.`);let e=await b(n),r=c.parse(await v(`POST`,`/api/worktrees/${t}/paste`,{mime:i,data:e}));return d?.(n.size,n.size),r}if(g=!0,s.parse(await y({action:`start`,upload:m,mime:i,size:n.size})).received!==0)throw Error(`Invalid image upload acknowledgement.`);for(let e=0;e<n.size;e+=a.chunkBytes){let t=n.slice(e,e+a.chunkBytes),r=await b(t),i=s.parse(await y({action:`chunk`,upload:m,offset:e,data:r}));if(i.received!==e+t.size)throw Error(`Invalid image upload acknowledgement.`);d?.(i.received,n.size)}let o=c.parse(await y({action:`finish`,upload:m}));return _=!0,o}finally{if(g&&!_&&e.generation===f)try{l(),e.request(`POST`,h,{action:`cancel`,upload:m}).catch(()=>{})}catch{}w.delete(e)}}function ie(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?(T(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 T(e,t,n,r={}){if(t.startsWith(`login-`)||t===`home`)throw Error(`Open a project terminal to attach an image.`);let i=l(),a=i?.generation,o=()=>{if(l()!==i||i?.generation!==a||!v.isConnected())throw Error(`The terminal connection changed; the image was not inserted.`)};r.signal?.throwIfAborted(),o(),r.onProgress?.({stage:`preparing`});let{blob:s,mime:u,resized:d}=await te(e,i!==null,r.signal);o();let p=i?await re(i,t,s,u,o,r.signal,(e,t)=>r.onProgress?.(e===t?{stage:`saving`}:{stage:`uploading`,received:e,total:t})):await(async()=>{let e=await ae(s);return o(),r.signal?.throwIfAborted(),c.parse(await f(`POST`,`/api/worktrees/${t}/paste`,{mime:u,data:e}))})();return r.signal?.throwIfAborted(),o(),r.onProgress?.({stage:`inserting`}),r.insert?r.insert(`${p.path} `):i?await i.input(t,n,`${p.path} `):v.write(t,n,`${p.path} `),{resized:d}}function ae(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 oe=/(?:^|[\s"'`([<])((?:(?:\/|\.{1,2}\/|~\/)(?:[\w.+@~-]+\/)*[\w.+@~-]+|(?:[\w.+@~-]+\/)+[\w.+@~-]*|[\w.+@~-]+\.[A-Za-z]\w{0,11}))(?::(\d{1,6})(?::(\d{1,6}))?)?/dg,se=/(?:^|[\s"'`([<])((?:~?\/|\.{1,2}\/|[\w.+@~-]+\/)(?:[\w.+@~-]+(?: [\w.+@~-]+)*\/)*[\w.+@~-]+)(?::(\d{1,6})(?::(\d{1,6}))?)?/dg,E=/"([^"\r\n]+)"|'([^'\r\n]+)'|`([^`\r\n]+)`|\(([^()\r\n]+)\)|\[([^\]\r\n[]+)\]/dg,ce=new Set([`.`,`,`,`;`,`:`,`)`,`]`,`'`,`"`]);function le(e){let t=[];for(let n of e.matchAll(E)){let e=n.slice(1).findIndex(e=>e!==void 0)+1,r=n[e];if(!r.includes(` `))continue;let i=/^(@?)(.+?)(?::(\d{1,6})(?::(\d{1,6}))?)?$/.exec(r);if(!i)continue;let a=i[2];if(!a.includes(`/`)&&!/\.[A-Za-z]\w{0,11}$/.test(a))continue;let o=n.indices[e][0]+i[1].length;t.push({path:a,line:i[3]===void 0?void 0:Number(i[3]),column:i[4]===void 0?void 0:Number(i[4]),start:o,end:n.indices[e][1]})}for(let n of[se,oe]){let r=new RegExp(n.source,n.flags),i;for(;i=r.exec(e);){let e=i.indices,n=i[1];if(!e?.[1]||n===void 0)continue;let r=e[1][0],a=e[1][1],o=n;for(o.startsWith(`@`)&&(o=o.slice(1),r++);o.length>0&&ce.has(o[o.length-1]);)o=o.slice(0,-1),a--;if(o.length===0)continue;let s=i[2]===void 0?void 0:Number.parseInt(i[2],10),c=i[3]===void 0?void 0:Number.parseInt(i[3],10),l=c!==void 0&&e[3]?e[3][1]:s!==void 0&&e[2]?e[2][1]:a;t.push({path:o,line:s,column:c,start:r,end:l})}}let n=new Set;return t.filter(e=>{let t=`${e.start}:${e.end}:${e.path}`;return n.has(t)?!1:(n.add(t),!0)}).sort((e,t)=>e.start-t.start||t.end-e.end)}function D(e,t,n){let r=e.text.trimEnd(),i=t.text.trimStart();if(!/[\w.+@~/:-]$/.test(r)||!/^[\w.+@~/:-]/.test(i)||/^(?:~\/|\.{1,2}\/)/.test(i))return!1;let a=e.cells[r.length-1];return r.endsWith(`/`)||i.startsWith(`/`)||a!==void 0&&a.col>=n-9}function O(e,t,n){return y(e,t,n,le,D)}function k(e,t){return e.kind===`file`&&e.root!==void 0&&e.root!==t?e.root:null}var ue=class{fetcher;now;positiveTtlMs;negativeTtlMs;maxEntries;maxConcurrent;entries=new Map;inflight=new Map;inUse=0;waiters=[];constructor(e){this.fetcher=e.fetcher,this.now=e.now??Date.now,this.positiveTtlMs=e.positiveTtlMs??15e3,this.negativeTtlMs=e.negativeTtlMs??5e3,this.maxEntries=e.maxEntries??500,this.maxConcurrent=e.maxConcurrent??4}resolve(e,t,n){let r=`${e}\0${t}`,i=this.entries.get(r);if(i){if(this.now()<i.expiresAt)return Promise.resolve(i.value);this.entries.delete(r)}let a=this.inflight.get(r);if(a)return a;let o=this.withSlot(()=>this.fetcher(e,t,n)).then(e=>(this.store(r,e),e)).finally(()=>{this.inflight.delete(r)});return this.inflight.set(r,o),o}store(e,t){let n=t?this.positiveTtlMs:this.negativeTtlMs;for(this.entries.set(e,{value:t,expiresAt:this.now()+n});this.entries.size>this.maxEntries;){let e=this.entries.keys().next().value;if(e===void 0)break;this.entries.delete(e)}}async withSlot(e){this.inUse>=this.maxConcurrent&&await new Promise(e=>this.waiters.push(e)),this.inUse++;try{return await e()}finally{this.inUse--,this.waiters.shift()?.()}}};async function A(e,t,n,r){let i=new URLSearchParams({path:t});return n!==void 0&&i.set(`line`,String(n)),r!==void 0&&i.set(`root`,r),f(`GET`,`/api/worktrees/${e}/resolve?${i}`)}function j(e,t,n){let r=e.kind??`file`;return{kind:r,path:e.path,...e.root===void 0?{}:{root:e.root},...e.relative_path===void 0?{}:{relativePath:e.relative_path},...r===`file`&&t!==void 0?{line:Math.max(1,t)}:{},...r===`file`&&n!==void 0?{column:n}:{}}}async function de(e,t,n){return j(await A(e,t,n?.line,n?.root),n?.line,n?.column)}async function M(e,t,n){try{return await A(e,t,n)}catch{return null}}function N(e,t,n){let r=new ue({fetcher:M});return e.registerLinkProvider({provideLinks(i,a){let o=e.buffer.active,s=O(o,i-1,e.cols);if(s.length===0){a(void 0);return}Promise.all(s.map(async({candidate:e,start:i,end:a,text:o})=>{let s=await r.resolve(t,e.path,e.line);return s?{range:{start:{x:i.col+1,y:i.row+1},end:{x:a.col+1,y:a.row+1}},text:o,decorations:{underline:!0,pointerCursor:!0},activate:t=>{!t.metaKey&&!t.ctrlKey||n(j(s,e.line,e.column))}}:null})).then(e=>{let t=e.filter(e=>e!==null);a(t.length>0?t:void 0)})}})}var P=e(t(),1),F={ctrl:1,alt:2,shift:4},I=/^(?:\[[ABCD]|O[ABCD]|\[1;([2-8])[ABCD])$/,L=e=>e.startsWith(`\x1B`)?I.exec(e.slice(1)):null;function R(e){return!e.startsWith(`\x1B`)||e===`\x1B`||L(e)!==null||e===`\x1B[Z`}function z(e,t){if(!t)return e;let n=(t&F.ctrl)!==0,r=(t&F.alt)!==0,i=(t&F.shift)!==0,a=!!i|(r?2:0)|(n?4:0),o=L(e);if(o)return`\x1b[1;${1+(a|(o[1]?Number(o[1])-1:0))}${e.slice(-1)}`;if(!R(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 B(e){return e.length===3&&(e.startsWith(`\x1B[`)||e.startsWith(`\x1BO`))&&`ABCD`.includes(e[2])}var V=new Map,H=new Map,U=new Map,W=new Map,G=new Set,K=e=>(G.add(e),()=>{G.delete(e)}),q=()=>{for(let e of G)e()},J=(e,t)=>i(JSON.stringify([e,t]));function Y(e,t){return(0,P.useSyncExternalStore)(K,()=>V.has(J(e,t)))}function fe(e,t,n,r,i){let a=J(e,t);return V.set(a,n),r&&H.set(a,r),i?U.set(a,i):U.delete(a),q(),()=>{V.get(a)===n&&(V.delete(a),H.delete(a),U.delete(a),W.delete(a),q())}}function X(e,t){H.get(J(e,t))?.()}function pe(e,t){return(0,P.useSyncExternalStore)(K,()=>W.get(J(e,t))??0)}function me(e,t,n){let r=J(e,t);W.set(r,(W.get(r)??0)^n),q()}function Z(e,t,n){let r=J(e,t),i=W.get(r)??0;return!i||!R(n)?n:(W.delete(r),q(),z(n,i))}async function he(e,t,n,r=!1){let i=J(e,t),a=V.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&&B(o)&&U.get(i)?.()&&(o=`\x1bO${o.slice(-1)}`),await Q(e,t,o)}async function ge(e,t,n){let r=J(e,t),i=V.get(r),a=l(),o=a?.generation;if(!i||!n()||!v.isConnected())throw Error(`Wait for the terminal to attach; nothing was pasted.`);let s;try{let n=navigator.clipboard.readText();X(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()||V.get(r)!==i||l()!==a||a?.generation!==o||!v.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=l();if(r)await r.input(e,t,n);else{if(!v.isConnected())throw Error(`Terminal is disconnected; nothing was sent`);v.write(e,t,n)}}var $=d();function _e({text:e,label:t,clear:n,paste:r}){let[i,a]=(0,P.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)(h,{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)(g,{}),` Copy`]}),r&&(0,$.jsxs)(h,{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)(h,{variant:`ghost`,size:`icon`,"aria-label":`Clear selection`,disabled:i,onClick:n,children:(0,$.jsx)(_,{})})]})}export{ee as _,fe as a,Y as c,k as d,N as f,x as g,T as h,ge as i,pe as l,ie as m,Z as n,he as o,de as p,X as r,me as s,_e as t,F as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import"./auth-C3ruG3fE.js";import{t as n}from"./jsx-runtime-By8HlURe.js";import{t as r}from"./preload-helper-Czpn1I53.js";import{n as i,t as a}from"./motion-Bd_MB9cH.js";import{n as o,t as s}from"./createLucideIcon-C9A1vLE-.js";import{C as c,E as l,T as u,g as d}from"./dialog-DtvE8ATK.js";import{d as f,f as p,r as m,u as h}from"./dist-Dac0re_p.js";import{_ as g,a as _,c as v,d as y,f as b,g as x,h as S,i as ee,l as C,m as te,n as ne,o as re,p as ie,r as ae,s as oe,t as se,u as ce}from"./dist-B8heQ9Kq.js";var le=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,ue=/^[\\/]{2}/;function de(e,t){return t+e.replace(/\\/g,`/`)}var fe=`popstate`;function pe(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function me(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return _e(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:E(t)}return ve(t,n,null,e)}function w(e,t){if(e===!1||e==null)throw Error(t)}function T(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function he(){return Math.random().toString(36).substring(2,10)}function ge(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function _e(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?D(t):t,state:n,key:t&&t.key||r||he(),mask:i}}function E({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function D(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ve(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=pe(e)?e:_e(h.location,e,t);n&&n(r,e),l=u()+1;let d=ge(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=pe(e)?e:_e(h.location,e,t);n&&n(r,e),l=u();let i=ge(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ye(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(fe,d),c=e,()=>{i.removeEventListener(fe,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ye(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),w(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:E(t);return i=i.replace(/ $/,`%20`),!n&&ue.test(i)&&(i=r+i),new URL(i,r)}var O=e(t(),1);function be(e,t,n=`/`){return xe(e,t,n,!1)}function xe(e,t,n,r,i){let a=A((typeof t==`string`?D(t):t).pathname||`/`,n);if(a==null)return null;let o=i??Ce(e),s=null,c=Ve(a);for(let e=0;s==null&&e<o.length;++e)s=Re(o[e],c,r);return s}function Se(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function Ce(e){let t=we(e);return Ee(t),t}function we(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;w(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=j([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(w(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),we(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Ie(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Be(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Te(e.path))a(e,t,!0,n)}),t}function Te(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Te(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Ee(e){e.sort((e,t)=>e.score===t.score?Le(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var De=/^:[\w-]+$/,Oe=/^:[\w-]+/,ke=3.5,Ae=3,je=2,Me=1,Ne=10,Pe=-2,Fe=e=>e===`*`;function Ie(e,t){let n=e.split(`/`),r=n.length;return n.some(Fe)&&(r+=Pe),t&&(r+=je),n.filter(e=>!Fe(e)).reduce((e,t)=>e+(De.test(t)?Ae:Oe.test(t)?ke:t===``?Me:Ne),r)}function Le(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Re(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ze(u,l,s.matcher,s.compiledParams):k(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=k({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:j([a,d.pathname]),pathnameBase:Xe(j([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=j([a,d.pathnameBase]))}return o}function k(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Be(e.path,e.caseSensitive,e.end);return ze(e,t,n,r)}function ze(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Be(e,t=!1,n=!0){T(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ve(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return T(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function A(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function He(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?D(e):e,a;return n?(n=Je(n),a=n.startsWith(`/`)?Ue(n.substring(1),`/`):Ue(n,t)):a=t,{pathname:a,search:Ze(r),hash:Qe(i)}}function Ue(e,t){let n=Ye(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function We(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ge(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ke(e){let t=Ge(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function qe(e,t,n,r=!1){let i;typeof e==`string`?i=D(e):(i={...e},w(!i.pathname||!i.pathname.includes(`?`),We(`?`,`pathname`,`search`,i)),w(!i.pathname||!i.pathname.includes(`#`),We(`#`,`pathname`,`hash`,i)),w(!i.search||!i.search.includes(`#`),We(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=He(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Je=e=>e.replace(/[\\/]{2,}/g,`/`),j=e=>Je(e.join(`/`)),Ye=e=>e.replace(/\/+$/,``),Xe=e=>Ye(e).replace(/^\/*/,`/`),Ze=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Qe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,$e=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function et(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function tt(e){return j(e.map(e=>e.route.path).filter(Boolean))||`/`}var nt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function rt(e,t){let n=e;if(typeof n!=`string`||!le.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(nt)try{let e=new URL(window.location.href),r=ue.test(n)?new URL(de(n,e.protocol)):new URL(n),a=A(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{T(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var it=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(it);var at=[`GET`,...it];new Set(at);var ot=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function st(e){try{return ot.includes(new URL(e).protocol)}catch{return!1}}var M=O.createContext(null);M.displayName=`DataRouter`;var N=O.createContext(null);N.displayName=`DataRouterState`;var ct=O.createContext(!1);function lt(){return O.useContext(ct)}var ut=O.createContext({isTransitioning:!1});ut.displayName=`ViewTransition`;var dt=O.createContext(new Map);dt.displayName=`Fetchers`;var ft=O.createContext(null);ft.displayName=`Await`;var P=O.createContext(null);P.displayName=`Navigation`;var F=O.createContext(null);F.displayName=`Location`;var I=O.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName=`Route`;var pt=O.createContext(null);pt.displayName=`RouteError`;var mt=`REACT_ROUTER_ERROR`,ht=`REDIRECT`,gt=`ROUTE_ERROR_RESPONSE`;function _t(e){if(e.startsWith(`${mt}:${ht}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function vt(e){if(e.startsWith(`${mt}:${gt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new $e(t.status,t.statusText,t.data)}catch{}}function yt(e,{relative:t}={}){w(L(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=O.useContext(P),{hash:i,pathname:a,search:o}=z(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:j([n,a])),r.createHref({pathname:s,search:o,hash:i})}function L(){return O.useContext(F)!=null}function R(){return w(L(),`useLocation() may be used only in the context of a <Router> component.`),O.useContext(F).location}var bt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function xt(){let{isDataRoute:e}=O.useContext(I);return e?Ut():St()}function St(){w(L(),`useNavigate() may be used only in the context of a <Router> component.`);let e=O.useContext(M),{basename:t,navigator:n}=O.useContext(P),{matches:r}=O.useContext(I),{pathname:i}=R(),a=JSON.stringify(Ke(r)),o=O.useRef(!1);return O.useLayoutEffect(()=>{o.current=!0}),O.useCallback((r,s={})=>{if(T(o.current,bt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=qe(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:j([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Ct=O.createContext(null);function wt(e){let t=O.useContext(I).outlet;return O.useMemo(()=>t&&O.createElement(Ct.Provider,{value:e},t),[t,e])}function Tt(){let{matches:e}=O.useContext(I);return e[e.length-1]?.params??{}}function z(e,{relative:t}={}){let{matches:n}=O.useContext(I),{pathname:r}=R(),i=JSON.stringify(Ke(n));return O.useMemo(()=>qe(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Et(e,t){return Dt(e,t)}function Dt(e,t,n){w(L(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=O.useContext(P),{matches:i}=O.useContext(I),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=R(),l;if(t){let e=typeof t==`string`?D(t):t;w(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):be(e,{pathname:d}),p=Pt(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:j([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:j([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?O.createElement(F.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function Ot(){let e=Ht(),t=et(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return O.createElement(O.Fragment,null,O.createElement(`h2`,null,`Unexpected Application Error!`),O.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?O.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var kt=O.createElement(Ot,null),At=class extends O.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=ct;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=vt(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:O.createElement(I.Provider,{value:this.props.routeContext},O.createElement(pt.Provider,{value:e,children:this.props.component}));return this.context?O.createElement(Mt,{error:e},t):t}},jt=new WeakMap;function Mt({children:e,error:t}){let{basename:n}=O.useContext(P);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=_t(t.digest);if(e){let r=jt.get(t);if(r)throw r;let i=rt(e.location,n),a=i.absoluteURL||i.to;if(st(a))throw Error(`Invalid redirect location`);if(nt&&!jt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw jt.set(t,n),n}return O.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Nt({routeContext:e,match:t,children:n}){let r=O.useContext(M);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),O.createElement(I.Provider,{value:e},n)}function Pt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);w(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:tt(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||kt,o&&(s<0&&c===0?(Gt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?O.createElement(n.route.Component,null):n.route.element?n.route.element:e,O.createElement(Nt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?O.createElement(At,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Ft(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function It(e){let t=O.useContext(M);return w(t,Ft(e)),t}function Lt(e){let t=O.useContext(N);return w(t,Ft(e)),t}function Rt(e){let t=O.useContext(I);return w(t,Ft(e)),t}function B(e){let t=Rt(e),n=t.matches[t.matches.length-1];return w(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function zt(){return B(`useRouteId`)}function Bt(){let e=Lt(`useNavigation`);return O.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function Vt(){let{matches:e,loaderData:t}=Lt(`useMatches`);return O.useMemo(()=>e.map(e=>Se(e,t)),[e,t])}function Ht(){let e=O.useContext(pt),t=Lt(`useRouteError`),n=B(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Ut(){let{router:e}=It(`useNavigate`),t=B(`useNavigate`),n=O.useRef(!1);return O.useLayoutEffect(()=>{n.current=!0}),O.useCallback(async(r,i={})=>{T(n.current,bt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Wt={};function Gt(e,t,n){!t&&!Wt[e]&&(Wt[e]=!0,T(!1,n))}O.memo(Kt);function Kt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Dt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function qt(e){return wt(e.context)}function Jt(e){w(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Yt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){w(!L(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=O.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=D(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=O.useMemo(()=>{let e=A(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return T(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:O.createElement(P.Provider,{value:c},O.createElement(F.Provider,{children:t,value:h}))}function Xt({children:e,location:t}){return Et(V(e),t)}O.Component;function V(e,t=[]){let n=[];return O.Children.forEach(e,(e,r)=>{if(!O.isValidElement(e))return;let i=[...t,r];if(e.type===O.Fragment){n.push.apply(n,V(e.props.children,i));return}w(e.type===Jt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;w(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=V(a.children,i)),n.push(o)}),n}var H=`application/x-www-form-urlencoded`;function U(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Zt(e){return U(e)&&e.tagName.toLowerCase()===`button`}function Qt(e){return U(e)&&e.tagName.toLowerCase()===`form`}function $t(e){return U(e)&&e.tagName.toLowerCase()===`input`}function en(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tn(e,t){return e.button===0&&(!t||t===`_self`)&&!en(e)}var W=null;function nn(){if(W===null)try{new FormData(document.createElement(`form`),0),W=!1}catch{W=!0}return W}var rn=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function an(e){return e!=null&&!rn.has(e)?(T(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${H}"`),null):e}function on(e,t){let n,r,i,a,o;if(Qt(e)){let o=e.getAttribute(`action`);r=o?A(o,t):null,n=e.getAttribute(`method`)||`get`,i=an(e.getAttribute(`enctype`))||H,a=new FormData(e)}else if(Zt(e)||$t(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?A(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=an(e.getAttribute(`formenctype`))||an(o.getAttribute(`enctype`))||H,a=new FormData(o,e),!nn()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(U(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=H,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function sn(e,t){if(e===!1||e==null)throw Error(t)}var cn={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},ln=/[&><\u2028\u2029]/g;function un(e){return e.replace(ln,e=>cn[e])}function dn(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}async function fn(e,t){if(e.id in t)return t[e.id];try{let n=await r(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pn(e){return e!=null&&typeof e.page==`string`}function mn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function hn(e,t,n){return bn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await fn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(mn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function gn(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function _n(e,t,{includeHydrateFallback:n}={}){return vn(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function vn(e){return[...new Set(e)]}function yn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function bn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!pn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(yn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function xn(){let e=O.useContext(M);return sn(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Sn(){let e=O.useContext(N);return sn(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var G=O.createContext(void 0);G.displayName=`FrameworkContext`;function Cn(){let e=O.useContext(G);return sn(e,`You must render this element inside a <HydratedRouter> element`),e}function wn(e,t){let n=O.useContext(G),[r,i]=O.useState(!1),[a,o]=O.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=O.useRef(null);O.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),O.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:K(s,p),onBlur:K(c,m),onMouseEnter:K(l,p),onMouseLeave:K(u,m),onTouchStart:K(d,p)}]:[a,f,{}]:[!1,f,{}]}function K(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Tn({page:e,...t}){let n=lt(),{nonce:r}=Cn(),{router:i}=xn(),a=O.useMemo(()=>be(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?O.createElement(Dn,{page:e,matches:a,...t}):O.createElement(On,{page:e,matches:a,...t})):null}function En(e){let{manifest:t,routeModules:n}=Cn(),[r,i]=O.useState([]);return O.useEffect(()=>{let r=!1;return hn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Dn({page:e,matches:t,...n}){let r=R(),i=O.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=dn(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return O.createElement(O.Fragment,null,i.map(e=>O.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function On({page:e,matches:t,...n}){let r=R(),{manifest:i,routeModules:a}=Cn(),{loaderData:o,matches:s}=Sn(),c=O.useMemo(()=>gn(e,t,s,i,r,`data`),[e,t,s,i,r]),l=O.useMemo(()=>gn(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=O.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=dn(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=O.useMemo(()=>_n(l,i),[l,i]),f=En(l);return O.createElement(O.Fragment,null,u.map(e=>O.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>O.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>O.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function kn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var An=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{An&&(window.__reactRouterVersion=`8.2.0`)}catch{}function jn({basename:e,children:t,useTransitions:n,window:r}){let i=O.useRef(null);i.current??=me({window:r,v5Compat:!0});let a=i.current,[o,s]=O.useState({action:a.action,location:a.location}),c=O.useCallback(e=>{n===!1?s(e):O.startTransition(()=>s(e))},[n]);return O.useLayoutEffect(()=>a.listen(c),[a,c]),O.createElement(Yt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function Mn({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=O.useState({action:n.action,location:n.location}),o=O.useCallback(e=>{r===!1?a(e):O.startTransition(()=>a(e))},[r]);return O.useLayoutEffect(()=>n.listen(o),[n,o]),O.createElement(Yt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Mn.displayName=`unstable_HistoryRouter`;var Nn=O.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=O.useContext(P),v=typeof l==`string`&&le.test(l),y=rt(l,h);l=y.to;let b=yt(l,{relative:r}),x=R(),S=null;if(o){let e=qe(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:j([h,e.pathname])),S=g.createHref(e)}let[ee,C,te]=wn(n,p),ne=Bn(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function re(t){e&&e(t),t.defaultPrevented||ne(t)}let ie=!(y.isExternal||i),ae=O.createElement(`a`,{...p,...te,href:(ie?S:void 0)||y.absoluteURL||b,onClick:ie?re:e,ref:kn(m,C),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return ee&&!v?O.createElement(O.Fragment,null,ae,O.createElement(Tn,{page:b})):ae});Nn.displayName=`Link`;var Pn=O.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=z(a,{relative:c.relative}),d=R(),f=O.useContext(N),{navigator:p,basename:m}=O.useContext(P),h=f!=null&&Jn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=A(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},ee=b?e:void 0,C;C=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let te=typeof i==`function`?i(S):i;return O.createElement(Nn,{...c,"aria-current":ee,className:C,ref:l,style:te,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Pn.displayName=`NavLink`;var Fn=O.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=O.useContext(P),g=Un(),_=Wn(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&le.test(s);return O.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?O.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Fn.displayName=`Form`;function In({getKey:e,storageKey:t,...n}){let r=O.useContext(G),{basename:i}=O.useContext(P),a=R(),o=Vt();Kn({getKey:e,storageKey:t});let s=O.useMemo(()=>{if(!r||!e)return null;let t=Gn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),O.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${un(JSON.stringify(t||q))}, ${un(JSON.stringify(s))})`}})}In.displayName=`ScrollRestoration`;function Ln(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rn(e){let t=O.useContext(M);return w(t,Ln(e)),t}function zn(e){let t=O.useContext(N);return w(t,Ln(e)),t}function Bn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=xt(),d=R(),f=z(e,{relative:o});return O.useCallback(p=>{if(tn(p,t)){p.preventDefault();let t=n===void 0?E(d)===E(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?O.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var Vn=0,Hn=()=>`__${String(++Vn)}__`;function Un(){let{router:e}=Rn(`useSubmit`),{basename:t}=O.useContext(P),n=zt(),r=e.fetch,i=e.navigate;return O.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=on(e,t);a.navigate===!1?await r(a.fetcherKey||Hn(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Wn(e,{relative:t}={}){let{basename:n}=O.useContext(P),r=O.useContext(I);w(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...z(e||`.`,{relative:t})},o=R();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:j([n,a.pathname])),E(a)}var q=`react-router-scroll-positions`,J={};function Gn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:A(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Kn({getKey:e,storageKey:t}={}){let{router:n}=Rn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=zn(`useScrollRestoration`),{basename:a}=O.useContext(P),o=R(),s=Vt(),c=Bt();O.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),qn(O.useCallback(()=>{if(c.state===`idle`){let t=Gn(o,s,a,e);J[t]=window.scrollY}try{sessionStorage.setItem(t||q,JSON.stringify(J))}catch(e){T(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(O.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||q);e&&(J=JSON.parse(e))}catch{}},[t]),O.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(J,()=>window.scrollY,e?(t,n)=>Gn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),O.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{T(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function qn(e,t){let{capture:n}=t||{};O.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Jn(e,{relative:t}={}){let n=O.useContext(ut);w(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Rn(`useViewTransitionState`),i=z(e,{relative:t});if(!n.isTransitioning)return!1;let a=A(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=A(n.nextLocation.pathname,r)||n.nextLocation.pathname;return k(i.pathname,o)!=null||k(i.pathname,a)!=null}var Yn=0,Y=new Set,Xn=()=>Yn>0;function Zn(e,t,n){if(a()||!t){e();return}for(let e of Y)e.cancel();Y.clear();let r=new Map([...document.querySelectorAll(`[data-workspace-pane]`)].filter(e=>!e.closest(`[data-motion-snapshot]`)).map(e=>[e.dataset.workspacePane,e.getBoundingClientRect()]));Yn++;try{e()}finally{requestAnimationFrame(()=>{if(Yn--,a())return;let e=n();if(!e)return;let i=e.closest(`[data-workspace-pane]`),o=(e,t,n)=>{let r=e.getBoundingClientRect();if(!r.width||!r.height)return;let i=t.left-r.left,a=t.top-r.top,o=Math.max(.02,t.width/r.width),s=Math.max(.02,t.height/r.height),c=e.animate((n?[{transform:`translate(${i}px, ${a}px) scale(${o}, ${s})`,opacity:.4,offset:0},{transform:`translate(${i*.25}px, ${a*.35}px) scale(${o+(1-o)*.85}, ${s+(1-s)*.5})`,opacity:1,offset:.55},{transform:`none`,opacity:1,offset:1}]:[{transform:`translate(${i}px, ${a}px)`,width:`${t.width}px`,height:`${t.height}px`},{transform:`none`,width:`${r.width}px`,height:`${r.height}px`}]).map(e=>({...e,transformOrigin:`top left`})),{duration:320,easing:`cubic-bezier(0.2, 0.7, 0.2, 1)`});c.effect?.updateTiming({fill:`none`}),Y.add(c),c.finished.then(()=>Y.delete(c),()=>Y.delete(c))};for(let e of document.querySelectorAll(`[data-workspace-pane]`)){if(e.closest(`[data-motion-snapshot]`))continue;let n=r.get(e.dataset.workspacePane);if(e===i&&!n)o(e,t,!0);else if(n){let t=e.getBoundingClientRect();(n.x!==t.x||n.y!==t.y||n.width!==t.width||n.height!==t.height)&&o(e,n,!1)}}i&&e!==i&&r.has(i.dataset.workspacePane)&&o(e,t,!0);let s=new MutationObserver(()=>{if(a())for(let e of Y)e.cancel()});s.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-reduce-motion`]}),Promise.allSettled([...Y].map(e=>e.finished)).then(()=>s.disconnect())})}}var X=n(),Qn=class extends O.Component{live=(0,O.createRef)();layers=(0,O.createRef)();animations=[];clear=()=>{this.animations.forEach(e=>e.cancel()),this.animations=[],this.layers.current?.replaceChildren()};getSnapshotBeforeUpdate(e){if(e.motionKey===this.props.motionKey||e.presentKeys?.includes(this.props.motionKey)&&this.props.presentKeys?.includes(e.motionKey)||e.preview&&this.props.preview||this.props.reduced||Xn())return null;let t=this.live.current;if(!t||!t.getBoundingClientRect().width)return null;let n=t.cloneNode(!0),r=t.querySelectorAll(`canvas`);n.querySelectorAll(`canvas`).forEach((e,t)=>{let n=r[t];if(!(!n||!n.width||!n.height))try{e.getContext(`2d`)?.drawImage(n,0,0)}catch{}}),n.querySelectorAll(`[data-motion-snapshot]`).forEach(e=>e.remove()),n.querySelectorAll(`iframe, audio, video, object, embed`).forEach(e=>e.remove());for(let e of[n,...n.querySelectorAll(`*`)])for(let t of e.getAttributeNames())(t===`id`||t===`autofocus`||t.startsWith(`data-`))&&e.removeAttribute(t);n.inert=!0,n.setAttribute(`aria-hidden`,`true`),n.dataset.motionSnapshot=``;let i=getComputedStyle(t),a=t.getBoundingClientRect();return n.style.width=`${a.width}px`,n.style.height=`${a.height}px`,n.style.opacity=i.opacity,n.style.scale=i.scale,n}componentDidUpdate(e,t,n){if(this.props.reduced||Xn()||e.motionKey!==this.props.motionKey&&e.presentKeys?.includes(this.props.motionKey)&&this.props.presentKeys?.includes(e.motionKey)||e.preview&&this.props.preview&&e.motionKey!==this.props.motionKey){this.clear();return}if(e.motionKey===this.props.motionKey)return;this.clear();let r=this.live.current;if(!r)return;n&&(this.layers.current?.append(n),this.animations.push(n.animate([{opacity:n.style.opacity,scale:n.style.scale},{opacity:0,scale:`0.97`}],{duration:180,easing:`ease-in`,fill:`forwards`})));let i=r.animate([{opacity:0,scale:`0.97`},{opacity:1,scale:`1`}],{duration:180,easing:`ease-out`});this.animations.push(i),i.finished.then(()=>{this.animations.includes(i)&&this.clear()},()=>{})}componentWillUnmount(){this.clear()}render(){return(0,X.jsxs)(`div`,{className:o(`relative min-h-0 min-w-0`,this.props.className),"data-content-motion":!0,children:[(0,X.jsx)(`div`,{ref:this.live,className:`size-full min-h-0 min-w-0`,children:this.props.children}),(0,X.jsx)(`div`,{ref:this.layers,className:`pointer-events-none absolute inset-0 z-30 overflow-hidden`,inert:!0,"aria-hidden":`true`})]})}};function $n(e){return(0,X.jsx)(Qn,{...e,reduced:i()})}var er=s(`corner-left-up`,[[`path`,{d:`M14 9 9 4 4 9`,key:`1af5af`}],[`path`,{d:`M20 20h-7a4 4 0 0 1-4-4V4`,key:`1blwi3`}]]),Z=`ContextMenu`,[tr,nr]=u(Z,[g]),Q=g(),[rr,ir]=tr(Z),ar=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,dir:a,modal:o=!0}=e,s=O.useRef(!1);{let e=O.useRef(!1);O.useEffect(()=>{i===!0&&!s.current&&!e.current&&(e.current=!0,console.warn("ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport."))},[i])}let[c,l]=d({prop:i,defaultProp:!1,onChange:r,caller:Z}),u=Q(t);return(0,X.jsx)(rr,{scope:t,open:c,onOpenChange:l,modal:o,hasInteractedRef:s,children:(0,X.jsx)(b,{...u,dir:a,open:c,onOpenChange:l,modal:o,children:n})})};ar.displayName=Z;var or=`ContextMenuTrigger`,sr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=ir(or,n),o=Q(n),[s,u]=O.useState({x:0,y:0}),d=O.useMemo(()=>({current:{getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s})}}),[s]),f=O.useRef(0),p=O.useCallback(()=>window.clearTimeout(f.current),[]),m=e=>{a.hasInteractedRef.current=!0,u({x:e.clientX,y:e.clientY}),a.onOpenChange(!0)};return O.useEffect(()=>p,[p]),O.useEffect(()=>void(r&&p()),[r,p]),(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(se,{...o,virtualRef:d}),(0,X.jsx)(c.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:l(e.onContextMenu,e=>{p(),m(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:l(e.onPointerDown,$(e=>{p(),a.open&&a.onOpenChange(!1),f.current=window.setTimeout(()=>m(e),700)})),onPointerMove:r?e.onPointerMove:l(e.onPointerMove,$(p)),onPointerCancel:r?e.onPointerCancel:l(e.onPointerCancel,$(p)),onPointerUp:r?e.onPointerUp:l(e.onPointerUp,$(p))})]})});sr.displayName=or;var cr=`ContextMenuPortal`,lr=e=>{let{__scopeContextMenu:t,...n}=e,r=Q(t);return(0,X.jsx)(C,{...r,...n})};lr.displayName=cr;var ur=`ContextMenuContent`,dr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ir(ur,n),a=Q(n),o=O.useRef(!1);return(0,X.jsx)(ee,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});dr.displayName=ur;var fr=`ContextMenuGroup`,pr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Q(n);return(0,X.jsx)(_,{...i,...r,ref:t})});pr.displayName=fr;var mr=`ContextMenuLabel`,hr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Q(n);return(0,X.jsx)(v,{...i,...r,ref:t})});hr.displayName=mr;var gr=`ContextMenuItem`,_r=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Q(n);return(0,X.jsx)(re,{...i,...r,ref:t})});_r.displayName=gr;var vr=`ContextMenuCheckboxItem`,yr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Q(n);return(0,X.jsx)(ae,{...i,...r,ref:t})});yr.displayName=vr;var br=`ContextMenuRadioGroup`,xr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Q(n);return(0,X.jsx)(ce,{...i,...r,ref:t})});xr.displayName=br;var Sr=`ContextMenuRadioItem`,Cr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Q(n);return(0,X.jsx)(y,{...i,...r,ref:t})});Cr.displayName=Sr;var wr=`ContextMenuItemIndicator`,Tr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Q(n);return(0,X.jsx)(oe,{...i,...r,ref:t})});Tr.displayName=wr;var Er=`ContextMenuSeparator`,Dr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Q(n);return(0,X.jsx)(ie,{...i,...r,ref:t})});Dr.displayName=Er;var Or=`ContextMenuArrow`,kr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Q(n);return(0,X.jsx)(ne,{...i,...r,ref:t})});kr.displayName=Or;var Ar=`ContextMenuSub`,jr=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=Q(t),[s,c]=d({prop:i,defaultProp:a??!1,onChange:r,caller:Ar});return(0,X.jsx)(te,{...o,open:s,onOpenChange:c,children:n})};jr.displayName=Ar;var Mr=`ContextMenuSubTrigger`,Nr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Q(n);return(0,X.jsx)(x,{...i,...r,ref:t})});Nr.displayName=Mr;var Pr=`ContextMenuSubContent`,Fr=O.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Q(n);return(0,X.jsx)(S,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Fr.displayName=Pr;function $(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Ir=ar,Lr=sr,Rr=lr,zr=dr,Br=_r,Vr=Dr,Hr=jr,Ur=Nr,Wr=Fr,Gr=Ir,Kr=Lr,qr=Hr;function Jr({className:e,...t}){return(0,X.jsx)(Rr,{children:(0,X.jsx)(zr,{className:o(`z-50 min-w-36 overflow-hidden`,p,`overlay-context-menu-motion`,e),...t})})}function Yr({className:e,...t}){return(0,X.jsx)(Br,{className:o(f,h,`[&_svg]:size-3.5`,e),...t})}function Xr({className:e,children:t,...n}){return(0,X.jsxs)(Ur,{className:o(f,h,`data-[state=open]:bg-action data-[state=open]:text-action-ink [&_svg]:size-3.5`,e),...n,children:[t,(0,X.jsx)(m,{className:`ml-auto`})]})}function Zr({className:e,...t}){return(0,X.jsx)(Rr,{children:(0,X.jsx)(Wr,{className:o(`z-50 min-w-36 overflow-hidden`,p,`overlay-context-menu-motion`,e),...t})})}function Qr({className:e,...t}){return(0,X.jsx)(Vr,{className:o(`-mx-1 my-1 h-px bg-border`,e),...t})}function $r(){return{onClick:e=>{e.detail===2&&e.preventDefault()},onDoubleClick:e=>{e.preventDefault(),e.currentTarget.dispatchEvent(new MouseEvent(`contextmenu`,{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY,button:2}))}}}function ei(e){let t=Date.parse(e.created_at);return Number.isNaN(t)?0:t}function ti(e,t){let n=new Map(t.map((e,t)=>[e,t])),r=[],i=[];for(let t of e)(n.has(t.id)?r:i).push(t);return r.sort((e,t)=>n.get(e.id)-n.get(t.id)),i.sort((e,t)=>ei(t)-ei(e)),[...i,...r]}function ni(e,t,n){if(t===n)return[...e];let r=e.filter(e=>e!==t),i=r.indexOf(n);return i===-1?[...e]:(r.splice(i,0,t),r)}function ri(e,t,n){if(t===n)return null;let r=e.find(e=>e.sessions.some(e=>e.id===t));if(!r||!r.sessions.some(e=>e.id===n))return null;let i=e.flatMap(e=>e.sessions.map(e=>e.id)),a=ni(i,t,n);return a.some((e,t)=>e!==i[t])?a:null}function ii(e,t){let n=new Set(e);return[...e,...t.filter(e=>!n.has(e))]}export{xt as C,R as S,jn as _,Gr as a,Jt as b,Qr as c,Xr as d,Kr as f,Zn as g,$n as h,ni as i,qr as l,er as m,ri as n,Jr as o,$r as p,ti as r,Yr as s,ii as t,Zr as u,Nn as v,Tt as w,Xt as x,qt as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-C9A1vLE-.js";var t=e(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{U as n}from"./auth-C3ruG3fE.js";import{t as r}from"./jsx-runtime-By8HlURe.js";import{n as i,t as a}from"./createLucideIcon-C9A1vLE-.js";import{C as o,E as s,T as c,g as l}from"./dialog-DtvE8ATK.js";import{a as u}from"./dist-DZg8Dwbr.js";import{r as d,x as f}from"./dist-Dac0re_p.js";import{t as p}from"./dist-BeQvHdsz.js";var m=a(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),h=a(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),g=a(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),_=a(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),v=a(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),y=r();function b({summary:e,summaryClassName:t,className:n,children:r,...a}){return(0,y.jsxs)(`details`,{className:i(`[&[open]>summary>svg]:rotate-90`,n),...a,children:[(0,y.jsxs)(`summary`,{className:i(`flex cursor-pointer select-none list-none items-center gap-1 text-fg-secondary transition-colors hover:text-fg [&::-webkit-details-marker]:hidden`,t),children:[(0,y.jsx)(d,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),e]}),r]})}var x=e(t(),1),S=new Set;function C(e){let t=/^#settings\/([\w-]+)$/.exec(e);return t?t[1]:null}var w=C(window.location.hash);function T(){let e=w?`#settings/${w}`:``;window.location.hash!==e&&history.replaceState(null,``,window.location.pathname+window.location.search+e)}function E(e){if(e!==w){w=e;for(let e of S)e()}queueMicrotask(T)}window.addEventListener(`hashchange`,()=>E(C(window.location.hash))),window.addEventListener(`popstate`,()=>E(C(window.location.hash)));function D(){return(0,x.useSyncExternalStore)(e=>(S.add(e),()=>{S.delete(e)}),()=>w)}function O(e=`appearance`){E(e)}function k(){E(null)}function A(e){return e.title??e.agent_title??e.osc_title??e.id.slice(0,8)}var j=` — `;function M(e){return e.replace(/\/+$/,``).split(`/`).pop()??``}function N(e){return{name:A(e),title:e.title??``,agentName:e.agent_title??``,sequence:e.osc_title??``,branch:e.branch,cwd:M(e.worktree_path),id:e.id.slice(0,8),status:e.status,agent:e.agent_type??``}}function P(e,t){let r=t&&t.length>0?t:n,i=N(e),a=[];for(let e of r.split(/(\$\{[a-zA-Z]+\})/)){if(e===``)continue;let t=/^\$\{([a-zA-Z]+)\}$/.exec(e)?.[1];t===void 0?a.push({text:e,sep:!1}):t===`separator`?a.push({text:j,sep:!0}):a.push({text:i[t]??e,sep:!1})}let o=[];a.forEach((e,t)=>{if(!e.sep){o.push(e.text);return}let n=o.join(``).trim().length>0,r=a.slice(t+1).some(e=>!e.sep&&e.text.trim().length>0);n&&r&&o.push(e.text)});let s=o.join(``).trim();return s.length>0?s:e.id.slice(0,8)}var F=`Switch`,[I,L]=c(F),[R,z]=I(F);function B(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[p,m]=l({prop:n,defaultProp:i??!1,onChange:c,caller:F}),[h,g]=x.useState(null),[_,v]=x.useState(null),b={checked:p,setChecked:m,disabled:a,control:h,setControl:g,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:x.useRef(!1),required:u,defaultChecked:i,isFormControl:!h||!!o||!!h.closest(`form`),bubbleInput:_,setBubbleInput:v};return(0,y.jsx)(R,{scope:t,...b,children:J(f)?f(b):r})}var V=`SwitchTrigger`,H=x.forwardRef(({__scopeSwitch:e,onClick:t,...n},r)=>{let{control:i,form:a,value:c,disabled:l,checked:d,required:f,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:_}=z(V,e),v=u(r,p),b=x.useRef(d);return x.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=()=>m(b.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,m]),(0,y.jsx)(o.button,{type:`button`,role:`switch`,"aria-checked":d,"aria-required":f,"data-state":Y(d),"data-disabled":l?``:void 0,disabled:l,value:c,...n,ref:v,onClick:s(t,e=>{m(e=>!e),_&&g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})})});H.displayName=V;var U=x.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,y.jsx)(B,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(H,{...d,ref:t,__scopeSwitch:n}),e&&(0,y.jsx)(q,{__scopeSwitch:n})]})})});U.displayName=F;var W=`SwitchThumb`,G=x.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=z(W,n);return(0,y.jsx)(o.span,{"data-state":Y(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});G.displayName=W;var K=`SwitchBubbleInput`,q=x.forwardRef(({__scopeSwitch:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:c,disabled:l,name:d,value:m,form:h,bubbleInput:g,setBubbleInput:_}=z(K,e),v=u(n,_),b=p(a),S=f(r);x.useEffect(()=>{let e=g;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(b!==a&&n){let t=new Event(`click`,{bubbles:r});n.call(e,a),e.dispatchEvent(t)}},[g,b,a,i]);let C=x.useRef(a);return(0,y.jsx)(o.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??C.current,required:c,disabled:l,name:d,value:m,form:h,...t,tabIndex:-1,ref:v,style:{...t.style,...S,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});q.displayName=K;function J(e){return typeof e==`function`}function Y(e){return e?`checked`:`unchecked`}function X({className:e,...t}){return(0,y.jsx)(U,{className:i(`peer group/switch inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full disabled:cursor-not-allowed disabled:opacity-50`,e),...t,children:(0,y.jsx)(`span`,{className:`pointer-events-none inline-flex h-5 w-9 shrink-0 items-center rounded-full bg-border transition-colors group-hover/switch:bg-border/70 group-data-[state=checked]/switch:bg-action host-accent:group-data-[state=unchecked]/switch:bg-explorer-hover host-accent:group-data-[state=unchecked]/switch:group-hover/switch:bg-explorer-selection/50`,children:(0,y.jsx)(G,{className:`block size-4 rounded-full bg-ground shadow-sm transition-[translate] duration-200 ease-out data-[state=checked]:translate-x-[1.125rem] data-[state=unchecked]:translate-x-0.5`})})})}export{D as a,_ as c,m as d,O as i,g as l,P as n,b as o,k as r,v as s,X as t,h as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{E as n,lt as r,w as i}from"./protocol-support-BwRR1kRO.js";import{F as a}from"./auth-C3ruG3fE.js";import{t as o}from"./jsx-runtime-By8HlURe.js";import{n as s,t as c}from"./createLucideIcon-C9A1vLE-.js";import{C as l,E as u,T as d,_ as f,g as p,v as m,x as h,y as ee}from"./dialog-DtvE8ATK.js";import{a as g,r as _}from"./dist-DZg8Dwbr.js";import{_ as v,b as y,g as te,p as b,s as x,v as S,y as ne}from"./dist-Dac0re_p.js";import{i as re}from"./dist-BeQvHdsz.js";import{c as ie,n as ae}from"./switch-DYr-iPWY.js";import{a as C,n as oe,o as w}from"./preview-kind-CPkO-rSz.js";import{y as se}from"./ws-DV_MCpbg.js";import{t as ce}from"./debounce-B9DrqirV.js";var T=e(t(),1),E=o(),[D,le]=d(`Tooltip`,[y]),O=y(),ue=`TooltipProvider`,de=700,k=`tooltip.open`,[fe,pe]=D(ue),me=e=>{let{__scopeTooltip:t,delayDuration:n=de,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=T.useRef(!0),s=T.useRef(!1),c=T.useRef(0);return T.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,E.jsx)(fe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:T.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:T.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:T.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};me.displayName=ue;var A=`Tooltip`,[he,j]=D(A),ge=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=pe(A,e.__scopeTooltip),l=O(t),[u,d]=T.useState(null),f=ee(),m=T.useRef(0),h=o??c.disableHoverableContent,g=s??c.delayDuration,_=T.useRef(!1),[v,y]=p({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(k))):c.onClose(),a?.(e)},caller:A}),te=T.useMemo(()=>v?_.current?`delayed-open`:`instant-open`:`closed`,[v]),b=T.useCallback(()=>{window.clearTimeout(m.current),m.current=0,_.current=!1,y(!0)},[y]),x=T.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),S=T.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{_.current=!0,y(!0),m.current=0},g)},[g,y]);return T.useEffect(()=>()=>{m.current&&=(window.clearTimeout(m.current),0)},[]),(0,E.jsx)(ne,{...l,children:(0,E.jsx)(he,{scope:t,contentId:f,open:v,stateAttribute:te,trigger:u,onTriggerChange:d,onTriggerEnter:T.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:T.useCallback(()=>{h?x():(window.clearTimeout(m.current),m.current=0)},[x,h]),onOpen:b,onClose:x,disableHoverableContent:h,children:n})})};ge.displayName=A;var M=`TooltipTrigger`,_e=T.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=j(M,n),a=pe(M,n),o=O(n),s=g(t,T.useRef(null),i.onTriggerChange),c=T.useRef(!1),d=T.useRef(!1),f=T.useCallback(()=>c.current=!1,[]);return T.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,E.jsx)(te,{asChild:!0,...o,children:(0,E.jsx)(l.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:u(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:u(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:u(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:u(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:u(e.onBlur,i.onClose),onClick:u(e.onClick,i.onClose)})})});_e.displayName=M;var N=`TooltipPortal`,[ve,ye]=D(N,{forceMount:void 0}),be=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=j(N,t);return(0,E.jsx)(ve,{scope:t,forceMount:n,children:(0,E.jsx)(f,{present:n||a.open,children:(0,E.jsx)(m,{asChild:!0,container:i,children:r})})})};be.displayName=N;var P=`TooltipContent`,xe=T.forwardRef((e,t)=>{let n=ye(P,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=j(P,e.__scopeTooltip);return(0,E.jsx)(f,{present:r||o.open,children:o.disableHoverableContent?(0,E.jsx)(Ee,{side:i,...a,ref:t}):(0,E.jsx)(Se,{side:i,...a,ref:t})})}),Se=T.forwardRef((e,t)=>{let n=j(P,e.__scopeTooltip),r=pe(P,e.__scopeTooltip),i=T.useRef(null),a=g(t,i),[o,s]=T.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=T.useCallback(()=>{s(null),d(!1)},[d]),p=T.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Ae(r,ke(r,n.getBoundingClientRect())),a=je(t.getBoundingClientRect()),o=Ne([...i,...a]);s(o),d(!0)},[d]);return T.useEffect(()=>()=>f(),[f]),T.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]),T.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=!Me(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,E.jsx)(Ee,{...e,ref:a})}),[Ce,we]=D(A,{isInside:!1}),Te=_(`TooltipContent`),Ee=T.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=j(P,n),l=O(n),{onClose:u}=c;return T.useEffect(()=>(document.addEventListener(k,u),()=>document.removeEventListener(k,u)),[u]),T.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,E.jsx)(h,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,E.jsxs)(S,{"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,E.jsx)(Te,{children:r}),(0,E.jsx)(Ce,{scope:n,isInside:!0,children:(0,E.jsx)(re,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});xe.displayName=P;var De=`TooltipArrow`,Oe=T.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=O(n);return we(De,n).isInside?null:(0,E.jsx)(v,{...i,...r,ref:t})});Oe.displayName=De;function ke(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 Ae(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 je(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 Me(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 Ne(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)),Pe(t)}function Pe(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 Fe=me,Ie=ge,Le=_e,Re=be,ze=xe,Be=Fe,Ve=Ie,He=Le;function Ue({className:e,sideOffset:t=4,...n}){return(0,E.jsx)(Re,{children:(0,E.jsx)(ze,{sideOffset:t,className:s(`z-50 overflow-hidden px-2 py-1 text-xs text-fg`,x,b,`overlay-tooltip-motion`,e),...n})})}var We=c(`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 Ge({initial:e,maxLength:t,className:n,fitContent:r=!1,onCommit:i,onCancel:a}){let[o,c]=(0,T.useState)(e),l=(0,E.jsx)(`input`,{autoFocus:!0,value:o,maxLength:t,onFocus:e=>e.currentTarget.select(),onChange:e=>c(e.target.value),onBlur:()=>i(o),onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`?i(o):e.key===`Escape`&&a()},className:s(`bg-transparent outline-none`,r?`col-start-1 row-start-1 w-0 min-w-full p-0`:n)});return r?(0,E.jsxs)(`span`,{className:s(`inline-grid min-w-px`,n),children:[(0,E.jsx)(`span`,{"aria-hidden":`true`,className:`invisible col-start-1 row-start-1 whitespace-pre`,children:o||``}),l]}):l}function Ke(e){return{onClick:e=>{e.detail===2&&e.preventDefault()},onDoubleClick:t=>{t.preventDefault(),e()}}}var F=null;function qe(e){return F=e,()=>{F===e&&(F=null)}}function Je(){F?.()}var I=null;function Ye(e){return I=e,()=>{I===e&&(I=null)}}async function Xe(e){if(!I)throw Error(`Open a project before opening a path.`);await I(e)}function Ze(){let e=r(se()??void 0).data?.tabTitleTemplate;return(0,T.useCallback)(t=>ae(t,e),[e])}var Qe=(0,T.createContext)({open:()=>void 0,handler:null,setHandler:()=>void 0});function $e({children:e}){let[t,n]=(0,T.useState)(null),r=(0,T.useCallback)(e=>n(()=>e),[]),i=(0,T.useCallback)(e=>t?.(e),[t]),a=(0,T.useMemo)(()=>({open:i,handler:t,setHandler:r}),[i,t,r]);return(0,E.jsx)(Qe.Provider,{value:a,children:e})}function et(){return(0,T.useContext)(Qe)}function tt({className:e,strokeScale:t=1}){return(0,E.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.8*t,strokeLinecap:`round`,"aria-hidden":!0,children:[(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`22`,y2:`12`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17`,y2:`20.66`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`7`,y2:`20.66`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`2`,y2:`12`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`7`,y2:`3.34`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17`,y2:`3.34`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17.63`,y2:`15.25`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`12`,y2:`18.5`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`6.37`,y2:`15.25`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`6.37`,y2:`8.75`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`12`,y2:`5.5`}),(0,E.jsx)(`line`,{x1:`12`,y1:`12`,x2:`17.63`,y2:`8.75`})]})}function nt({className:e,strokeScale:t=1}){return(0,E.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.6*t,"aria-hidden":!0,children:[(0,E.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`}),(0,E.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`,transform:`rotate(60 12 12)`}),(0,E.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`,transform:`rotate(120 12 12)`})]})}function rt({className:e,strokeScale:t=1}){return(0,E.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,E.jsx)(`path`,{d:`M8 4H4v16h4`}),(0,E.jsx)(`path`,{d:`M16 4h4v16h-4`}),(0,E.jsx)(`rect`,{x:`10.5`,y:`10.5`,width:`3`,height:`3`,fill:`currentColor`,stroke:`none`})]})}function it({className:e}){return(0,E.jsx)(`svg`,{viewBox:`0 0 24 24`,className:e,fill:`currentColor`,"aria-hidden":!0,children:(0,E.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 at({type:e,className:t,strokeScale:n=1}){switch(e){case`claude-code`:return(0,E.jsx)(tt,{className:t,strokeScale:n});case`codex`:return(0,E.jsx)(nt,{className:t,strokeScale:n});case`opencode`:return(0,E.jsx)(rt,{className:t,strokeScale:n});case`gemini-cli`:return(0,E.jsx)(it,{className:t});default:return(0,E.jsx)(ie,{className:t,strokeWidth:2*n})}}var L=new Set,R=!1,ot=null;function st(){for(let e of L)e()}function ct(e){return L.add(e),()=>L.delete(e)}function lt(e){R!==e&&(R=e,st())}function ut(){lt(!R)}function dt(){return(0,T.useSyncExternalStore)(ct,()=>R)}function ft(e){ot=e,st()}function pt(){return(0,T.useSyncExternalStore)(ct,()=>ot)}function z(){return crypto.randomUUID()}function B(e){return e.type===`terminal`?`term:${e.session}`:`editor:${C(e.tab)}`}function V(e,t){return B(e)===B(t)}function mt(e){return e.type===`terminal`}function ht(e){return e.type===`editor`&&(e.tab.view===`linked`||e.tab.view===`locked`)}function H(e=[],t){let n=e.map(B),r=t&&n.includes(t)?t:n.length>0?n[0]:null;return{kind:`leaf`,id:z(),tabs:e,activeKey:r,previewKey:null}}function U(e,t,n){return{kind:`split`,id:z(),direction:e,children:t,sizes:n??t.map(()=>100/Math.max(1,t.length))}}function W(e,t){if(e.kind===`leaf`)return e.id===t?e:null;for(let n of e.children){let e=W(n,t);if(e)return e}return null}function G(e,t){if(e.kind===`leaf`)return e.tabs.some(e=>B(e)===t)?e:null;for(let n of e.children){let e=G(n,t);if(e)return e}return null}function K(e){return e.kind===`leaf`?[e]:e.children.flatMap(K)}function q(e){return K(e).flatMap(e=>e.tabs)}function gt(e){return e.kind===`leaf`?[e.id]:[e.id,...e.children.flatMap(gt)]}function _t(e){let t=gt(e);return new Set(t).size!==t.length}function vt(e){return e.kind===`leaf`?{...e,id:z()}:{...e,id:z(),children:e.children.map(vt)}}function yt(e){if(!_t(e))return e;let t=new Set,n=e=>{let r=t.has(e.id)?z():e.id;return t.add(r),e.kind===`leaf`?{...e,id:r}:{...e,id:r,children:e.children.map(n)}};return n(e)}function bt(e){let t=e.tabs.map(B),n=e.activeKey&&t.includes(e.activeKey)?e.activeKey:t[0]??null,r=e.previewKey&&t.includes(e.previewKey)?e.previewKey:null;return n===e.activeKey&&r===(e.previewKey??null)?e:{...e,activeKey:n,previewKey:r}}function J(e){if(e.kind===`leaf`)return bt(e);let t=e.children.map(J),n=[],r=[];t.forEach((t,i)=>{let a=e.sizes[i]??1;if(t.kind===`split`&&t.direction===e.direction){let e=t.sizes.reduce((e,t)=>e+t,0)||t.children.length;t.children.forEach((i,o)=>{n.push(i),r.push(a*(t.sizes[o]??1)/e)})}else n.push(t),r.push(a)});let i=[],a=[];return n.forEach((e,t)=>{e.kind===`leaf`&&e.tabs.length===0||(i.push(e),a.push(r[t]??1))}),i.length===0?H([]):i.length===1?i[0]:{...e,children:i,sizes:a}}function Y(e,t,n){return e.kind===`leaf`?e.id===t?n(e):e:{...e,children:e.children.map(e=>Y(e,t,n))}}function xt(e,t,n){return Y(e,t,e=>{if(!e.tabs.some(e=>B(e)===n))return e;let t=e.tabs.filter(e=>B(e)!==n),r=e.activeKey===n?St(e,n):e.activeKey;return{...e,tabs:t,activeKey:r}})}function St(e,t){let n=e.tabs.findIndex(e=>B(e)===t);if(n===-1)return e.activeKey;let r=e.tabs.filter(e=>B(e)!==t);return r.length===0?null:B(r[Math.min(n,r.length-1)])}function Ct(e,t,n){let r=e.tabs.filter(e=>!V(e,t)),i=n===void 0?r.length:Math.max(0,Math.min(n,r.length)),a=[...r.slice(0,i),t,...r.slice(i)];return{...e,tabs:a,activeKey:B(t)}}function wt(e,t,n,r){let i=n===`left`||n===`right`?`row`:`col`,a=n===`left`||n===`top`;return J(Y(e,t,e=>{let t=H([r]);return U(i,a?[t,e]:[e,t],[50,50])}))}function Tt(e,t){let{fromLeafId:n,toLeafId:r,edge:i}=t;if(n===r)return e;let a=W(e,n),o=W(e,r);if(!a||!o)return e;if(i===`center`){let t=e=>e.kind===`leaf`?e.id===n?o:e.id===r?a:e:{...e,children:e.children.map(t)};return t(e)}let s=J(Y(e,n,e=>({...e,tabs:[],activeKey:null,previewKey:null}))),c=i===`left`||i===`right`?`row`:`col`,l=i===`left`||i===`top`;return J(Y(s,r,e=>U(c,l?[a,e]:[e,a],[50,50])))}function Et(e,t){let{ref:n,toLeafId:r,edge:i}=t,a=B(n),o=t.copy===!0&&!mt(n),s=t.index;if(i===`center`&&s!==void 0){let t=W(e,r)?.tabs.findIndex(e=>B(e)===a)??-1;t!==-1&&t<s&&--s}let c=o?e:xt(e,t.fromLeafId,a);if(i===`center`){let e=Y(c,r,e=>Ct(e,n,s));return!W(e,r)&&!G(e,a)?X(J(Dt(e,n)),a):X(J(e),a)}return W(c,r)?X(wt(c,r,i,n),a):J(H([n]))}function Dt(e,t){let n=K(e)[0];return n?Y(e,n.id,e=>Ct(e,t)):H([t])}function Ot(e,t,n){return J(Y(e,t,e=>e.tabs.some(e=>B(e)===n)?{...e,tabs:e.tabs.filter(e=>B(e)!==n),activeKey:e.activeKey===n?St(e,n):e.activeKey}:e))}function kt(e,t,n){let r=B(n);return J(Y(e,t,e=>{let t=e.previewKey===r?null:e.previewKey;return e.tabs.some(e=>V(e,n))?{...e,activeKey:r,previewKey:t}:{...e,tabs:[...e.tabs,n],activeKey:r,previewKey:t}}))}function At(e,t,n){let r=B(n);return J(Y(e,t,e=>e.tabs.some(e=>B(e)===r)?{...e,tabs:e.tabs.map(e=>B(e)===r?n:e),previewKey:e.previewKey===r?null:e.previewKey}:{...e,tabs:[...e.tabs,n]}))}function jt(e,t,n){let r=B(n);return Y(e,t,e=>({...e,tabs:e.tabs.map(e=>B(e)===r?n:e)}))}function Mt(e,t,n){let r=C(t),i=e=>e.kind===`split`?{...e,children:e.children.map(i)}:{...e,tabs:e.tabs.map(e=>e.type===`editor`&&C(e.tab)===r?{...e,tab:{...e.tab,compile_mode:n}}:e)};return i(e)}function Nt(e,t){return e.type!==`editor`||t.type!==`editor`||e.tab.view!==`preview`||t.tab.view!==void 0||oe(t.tab.path)===null?t:{...t,tab:{...t.tab,view:`preview`}}}function Pt(e,t,n){let r=B(n);return J(Y(e,t,e=>{if(e.tabs.some(e=>V(e,n)))return{...e,activeKey:r};let t=e.previewKey?e.tabs.findIndex(t=>B(t)===e.previewKey):-1,i=t>=0?e.tabs[t]:void 0,a=e.tabs.length>1&&i!==void 0&&!mt(i)&&!ht(i),o=i?Nt(i,n):n,s=a?e.tabs.map((e,n)=>n===t?o:e):[...e.tabs,o];return{...e,tabs:s,activeKey:r,previewKey:r}}))}function X(e,t){let n=e=>e.kind===`leaf`?e.previewKey===t?{...e,previewKey:null}:e:{...e,children:e.children.map(n)};return n(e)}function Ft(e,t,n,r){return Y(e,t,e=>{let t=e.tabs.findIndex(e=>e.type===`editor`&&B(e)===n),i=t>=0?e.tabs[t]:void 0;if(i===void 0||i.type!==`editor`)return e;let a={...i,tab:{...i.tab,view:r}},o=B(a);if(o===n)return{...e,tabs:e.tabs.map((e,n)=>n===t?a:e)};let s=e.tabs.some((e,n)=>n!==t&&B(e)===o),c=s?e.tabs.filter((e,n)=>n!==t):e.tabs.map((e,n)=>n===t?a:e);return{...e,tabs:c,activeKey:e.activeKey===n?o:e.activeKey,previewKey:e.previewKey===n?s?null:o:e.previewKey??null}})}function It(e,t){let n=w(e);return n!==`commit`&&n!==`untitled`&&e.session===t.session&&e.path===t.path&&e.root===t.root}function Lt(e,t,n){if(n===t.path)return e;let r=!1,i=e=>{if(e.kind===`split`){let t=e.children.map(i);return t.some((t,n)=>t!==e.children[n])?{...e,children:t}:e}let a=new Map,o=!1,s=e.tabs.map(e=>{if(e.type!==`editor`||!It(e.tab,t))return e;let r={...e,tab:{...e.tab,path:n}};return a.set(B(e),B(r)),o=!0,r});if(!o)return e;r=!0;let c=e.activeKey,l=e.previewKey??null;return{...e,tabs:s,activeKey:c===null?null:a.get(c)??c,previewKey:l===null?null:a.get(l)??l}},a=i(e);return r?a:e}function Rt(e){if(e.type!==`editor`)return null;let t=e.tab,n=w(t);return n!==`file`&&n!==`external`||t.view===`linked`||t.view===`locked`||oe(t.path)===null?null:t}function zt(e,t){let n=Rt(t);if(!n)return e;let r=!1,i=e=>{if(e.kind===`split`)return{...e,children:e.children.map(i)};let t=!1,a=e.tabs.map(e=>{if(e.type!==`editor`||!ht(e))return e;let r=e.tab;return r.session===n.session&&r.path===n.path&&(r.root??``)===(n.root??``)&&w(r)===w(n)?e:(t=!0,{type:`editor`,tab:{session:n.session,path:n.path,...n.kind===void 0?{}:{kind:n.kind},...n.root===void 0?{}:{root:n.root},view:r.view}})});return t?(r=!0,{...e,tabs:a}):e},a=i(e);return r?a:e}function Bt(e,t){return e.session===t.session&&e.path===t.path&&(e.root??``)===(t.root??``)&&w(e)===w(t)}function Vt(e,t,n){let r=K(e).flatMap(e=>e.tabs.flatMap(n=>n.type!==`editor`||n.tab.view===`linked`||n.tab.view===`locked`||!Bt(n.tab,t)?[]:[{leafId:e.id,ref:n}]));return r.find(({leafId:e})=>e===n)??r.find(({ref:e})=>(e.tab.view??`source`)===`source`)??r[0]??null}function Ht(e,t,n){return Y(e,t,e=>e.tabs.some(e=>B(e)===n)?{...e,activeKey:n}:e)}function Ut(e,t,n){function r(e){return e.kind===`leaf`?e:e.id===t&&n.length===e.children.length?{...e,children:e.children.map(r),sizes:[...n]}:{...e,children:e.children.map(r)}}return r(e)}function Wt(e){let t=e.type===`terminal`?e.session:e.tab.session;return t===`00000000-0000-0000-0000-000000000000`?null:t}function Gt(e){return t=>{let n=Wt(t);return n===null||e.has(n)}}function Z(e,t){let n=e=>e.kind===`leaf`?{...e,tabs:e.tabs.filter(t)}:{...e,children:e.children.map(n)};return J(n(e))}function Kt(e){let t=new Set,n=[];for(let r of e){let e=J(Z(r,e=>!t.has(B(e)))),i=q(e);if(i.length!==0){for(let e of i)t.add(B(e));n.push(e)}}return n.length===0?H([]):yt(n.length===1?n[0]:J(U(`row`,n)))}function qt(e){let t=e.editor_tabs.map(e=>({type:`editor`,tab:e})),n=e.session_tabs.map(e=>({type:`terminal`,session:e})),r=e.active_editor_tab?B({type:`editor`,tab:e.active_editor_tab}):null,i=e.active_session?`term:${e.active_session}`:null;if(t.length===0&&n.length===0)return H([]);if(t.length===0)return H(n,i);if(n.length===0)return H(t,r);let a=e.layout,o=typeof a.editor==`number`?a.editor:40,s=typeof a.session==`number`?a.session:60;return J(U(`col`,[H(t,r),H(n,i)],[o,s]))}function Jt(e){return JSON.stringify(Yt(e))}function Yt(e){return e===null?null:e.kind===`leaf`?e.tabs.length===0?null:{t:e.tabs.map(B)}:{d:e.direction,s:e.sizes.map(e=>Math.round(e*10)/10),c:e.children.map(Yt)}}var Q=new Set,$=!1,Xt=null;function Zt(){for(let e of Q)e()}function Qt(e){return Q.add(e),()=>Q.delete(e)}function $t(e){$!==e&&($=e,Zt())}function en(){$t(!$)}function tn(){return(0,T.useSyncExternalStore)(Qt,()=>$)}function nn(e){Xt=e,Zt()}function rn(){return(0,T.useSyncExternalStore)(Qt,()=>Xt)}var an={layout_tree:null,active_session:null,layout_ref:null};function on(e){return e.type===`terminal`?e.session:e.tab.session}function sn(e,t){let n=new Set;for(let[r,i]of Object.entries(e))if(!(r===t||!i.layout_tree))for(let e of q(i.layout_tree))e.type===`terminal`&&n.add(e.session);return[...n]}function cn(e,t){let n=e.project_layouts[t];return{...e,layout_tree:n?.layout_tree??null,active_session:n?.active_session??null,layout_ref:n?.layout_ref??null,session_tabs:[],editor_tabs:[],active_editor_tab:null}}function ln(e,t,n){return n?{loaded:e.loaded,snapshot:cn(e.snapshot,t),current:()=>cn(e.current(),t),update(n){let r={},i={...n};if(`layout_tree`in n&&(r.layout_tree=n.layout_tree??null,delete i.layout_tree),`active_session`in n&&(r.active_session=n.active_session??null,delete i.active_session),`layout_ref`in n&&(r.layout_ref=n.layout_ref??null,delete i.layout_ref),Object.keys(r).length>0){let n=e.current().project_layouts;i.project_layouts={...n,[t]:{...n[t]??an,...r}}}Object.keys(i).length>0&&e.update(i)}}:e}function un(e,t,n,r){let i=e.layout_tree??qt(e),a={};for(let o of t)a[o]={layout_tree:vt(Z(i,e=>{let i=on(e);return i===`00000000-0000-0000-0000-000000000000`?o===(r??t[0]):n.get(i)===o})),active_session:e.active_session!==null&&n.get(e.active_session)===o?e.active_session:null,layout_ref:null};return{layout_mode:`project`,project_layouts:a}}function dn(e,t,n={}){return{...e,...t,...n}}function fn(e,t,n){let r=t.layout_tree?Z(t.layout_tree,e=>{let t=on(e);return t===`00000000-0000-0000-0000-000000000000`||n.alive.has(t)}):null,i=t.active_session!==null&&n.alive.has(t.active_session)?t.active_session:null;if(t.scope===`profile`)return{projectBased:!1,patch:{layout_mode:`profile`,layout_tree:r,active_session:i,layout_ref:t.id}};let a=t.project_id??n.currentProject??n.projectIds[0]??``,o={layout_tree:r,active_session:i,layout_ref:t.id};if((e.layout_mode??`profile`)===`project`)return{projectBased:!0,patch:{project_layouts:{...e.project_layouts,[a]:o}}};let s=un(e,n.projectIds,n.sessionProject,a);return{projectBased:!0,patch:{...s,project_layouts:dn(s.project_layouts??{},e.project_layouts,{[a]:o})}}}function pn(e,t){let n=e.project_layouts,r=[...t.filter(e=>e in n),...Object.keys(n).filter(e=>!t.includes(e))].map(e=>n[e]);return{layout_mode:`profile`,project_layouts:{},layout_tree:Kt(r.map(e=>e.layout_tree).filter(e=>e!==null)),active_session:r.map(e=>e.active_session).find(e=>e!==null)??null,layout_ref:null}}var mn=2e3,hn=a.parse({});function gn(e){return`puddle.ws.${e}`}function _n(e){if(e===null)return{kind:`absent`};try{return{kind:`present`,snapshot:a.parse(JSON.parse(e))}}catch{return{kind:`corrupt`}}}function vn(){let e=se(),[t,r]=(0,T.useState)(!1),[a,o]=(0,T.useState)(hn),s=(0,T.useRef)(a);s.current=a;let c=(0,T.useRef)(null),l=(0,T.useMemo)(()=>ce((e,t)=>{n(e,t).catch(e=>console.warn(`ui-state save failed: ${e.message}`))},mn),[]);return(0,T.useEffect)(()=>{if(e===null){c.current=null;return}let t=gn(e);c.current=t;let n=!1;r(!1),o(hn);let a;try{a=_n(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`?(o(a.snapshot),r(!0)):i(e).then(e=>{n||(e&&o(e.ui_state),r(!0))}).catch(e=>{console.warn(`ui-state load failed: ${e.message}`),n||r(!0)}),()=>{n=!0,l.flush()}},[e,l]),{loaded:t,snapshot:a,current:()=>s.current,update(t){if(e===null)return;let n={...s.current,...t};s.current=n,o(n);let r=c.current??gn(e);l(e,n);try{sessionStorage.setItem(r,JSON.stringify(n))}catch(e){console.warn(`ui-state write failed: ${e.message}`)}}}}export{Je as $,H as A,B,Tt as C,Ht as D,q as E,Ut as F,pt as G,ft as H,zt as I,$e as J,dt as K,Mt as L,X as M,Z as N,G as O,Lt as P,Ye as Q,Ft as R,yt as S,W as T,lt as U,jt as V,ut as W,Ze as X,et as Y,Xe as Z,kt as _,dn as a,Ue as at,qt as b,un as c,$t as d,qe as et,en as f,At as g,Jt as h,fn as i,Ve as it,Pt as j,Rt as k,pn as l,tn as m,vn as n,Ke as nt,sn as o,Be as ot,rn as p,at as q,gn as r,We as rt,ln as s,He as st,_n as t,Ge as tt,nn as u,K as v,Et as w,Ot as x,Gt as y,Vt as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-C9A1vLE-.js";var t=e(`waves-horizontal`,[[`path`,{d:`M2 12q2.5 2 5 0t5 0 5 0 5 0`,key:`8ddzzs`}],[`path`,{d:`M2 19q2.5 2 5 0t5 0 5 0 5 0`,key:`1wj4st`}],[`path`,{d:`M2 5q2.5 2 5 0t5 0 5 0 5 0`,key:`69x50u`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{i as n,n as r,o as i,r as a}from"./auth-C3ruG3fE.js";import{t as o}from"./desktop-Bl69_YmL.js";import{n as s}from"./dist-BOS6OKSE.js";var c=e(t(),1),l=n(`puddle.profile-id`);function u(){let e=(0,c.useSyncExternalStore)(l.subscribe,l.get);return e!==null&&/^[0-9a-f]{10}$/.test(e)?e:null}function d(e){window.location.pathname!==`/`&&window.history.replaceState(null,``,`/`),l.set(e)}var f=[`Layout & tabs`,`Projects`,`Editor`,`Left sidebar`,`Right sidebar`],p=Array.from({length:10},(e,t)=>({id:`project.switch${t}`,label:`Switch to project ${t+1}`,group:`Projects`,defaultBinding:`meta+Digit${t}`})),m=[...p,{id:`host.peek`,label:`Show host identity (hold)`,group:`Layout & tabs`,defaultBinding:typeof navigator<`u`&&/Mac/.test(navigator.platform)?`alt+meta+Slash`:`ctrl+alt+Slash`,hold:!0},{id:`palette.toggle`,label:`Command palette`,group:`Layout & tabs`,defaultBinding:`meta+KeyK`},{id:`tab.close`,label:`Close current tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyW`,desktopBinding:`meta+KeyW`},{id:`tab.reopen`,label:`Reopen last closed tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyT`,desktopBinding:`shift+meta+KeyT`},{id:`tab.newUntitled`,label:`New untitled file`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyN`,desktopBinding:`meta+KeyN`},{id:`tab.next`,label:`Next tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketRight`,desktopBinding:`ctrl+Tab`},{id:`tab.prev`,label:`Previous tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketLeft`,desktopBinding:`ctrl+shift+Tab`},{id:`window.close`,label:`Close window`,group:`Layout & tabs`,defaultBinding:`meta+KeyW`,desktopBinding:`shift+meta+KeyW`},{id:`sidebar.left`,label:`Toggle left sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Comma`,desktopBinding:`meta+KeyB`},{id:`sidebar.right`,label:`Toggle right sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Period`,desktopBinding:`shift+meta+KeyB`},{id:`editor.save`,label:`Save`,group:`Editor`,defaultBinding:`meta+KeyS`,editor:!0},{id:`editor.wordWrap`,label:`Toggle word wrap`,group:`Editor`,defaultBinding:`alt+KeyZ`,editor:!0},{id:`nav.files`,label:`Open Files`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyE`},{id:`nav.search`,label:`Open Search`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyF`},{id:`nav.changes`,label:`Open Changes`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyV`},{id:`nav.worktrees`,label:`Open Worktrees`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyB`},{id:`session.newAgent`,label:`New agent`,group:`Right sidebar`,defaultBinding:`ctrl+alt+Backquote`,desktopBinding:`meta+KeyT`},{id:`session.newTerminal`,label:`New terminal`,group:`Right sidebar`,defaultBinding:`ctrl+Backquote`},{id:`scratchpad.toggle`,label:`Toggle Scratchpad`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyS`},{id:`layouts.toggle`,label:`Toggle Layouts`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyL`}],h=new Map(m.map(e=>[e.id,e])),g=typeof window<`u`&&o()!==void 0;function _(e,t=g){return t&&e.desktopBinding?e.desktopBinding:e.defaultBinding}function v(e){let t=e.code;if(!t||/^(Control|Alt|Shift|Meta)(Left|Right)$/.test(t))return null;let n=[];return e.ctrlKey&&n.push(`ctrl`),e.altKey&&n.push(`alt`),e.shiftKey&&n.push(`shift`),e.metaKey&&n.push(`meta`),n.length===0?null:(n.push(t),n.join(`+`))}var y={ctrl:`⌃`,alt:`⌥`,shift:`⇧`,meta:`⌘`},b={Comma:`,`,Period:`.`,Backquote:"`",Slash:`/`,Backslash:`\\`,Minus:`-`,Equal:`=`,Space:`␣`,Enter:`↵`,Escape:`Esc`,Tab:`⇥`,BracketLeft:`[`,BracketRight:`]`};function x(e){return e.startsWith(`Key`)?e.slice(3):e.startsWith(`Digit`)?e.slice(5):b[e]??e}function S(e){if(!e)return`—`;let t=e.split(`+`),n=t.pop()??``;return t.map(e=>y[e]??e).join(``)+x(n)}var C=new Map;function w(e,t){return C.set(e,t),()=>{C.get(e)===t&&C.delete(e)}}var T=e=>C.get(e),E=e=>h.get(e);function D(e,t){return e.hold===!0||e.id===`editor.save`||t&&e.editor!==!0}var O={},k=new Set,A=j();function j(){let e={};for(let t of m)e[t.id]=O[t.id]||_(t);return e}function M(e){O=e??{},A=j(),k.forEach(e=>e())}var N=e=>A[e]??``;function P(e){for(let[t,n]of Object.entries(A))if(n===e)return t}function F(e){return S(I()[e]??``)}function I(){return(0,c.useSyncExternalStore)(e=>(k.add(e),()=>k.delete(e)),()=>A)}var L=500,R=1e4;function z(e,t){return`${e} ${t}`}var B=new class{ws=null;open=!1;backoff=L;reconnectTimer=null;theme=null;terminals=new Map;notificationListeners=new Set;statusListeners=new Set;renameListeners=new Set;accountListeners=new Set;switchListeners=new Set;sessionsChangedListeners=new Set;hostUpdatesListeners=new Set;connectionListeners=new Set;shellWaiters=new Map;attach(e,t,n,r,i){let a={session:e,term:t,cols:n,rows:r,handlers:i,ready:!1,live:!1,pendingResize:!1};return this.terminals.set(z(e,t),a),this.ensureConnected(),this.open&&this.send({t:`attach`,session:e,term:t,cols:n,rows:r}),()=>this.detach(e,t)}detach(e,t){this.terminals.delete(z(e,t))&&this.open&&this.send({t:`detach`,session:e,term:t})}write(e,t,n){this.open&&this.terminals.get(z(e,t))?.ready&&this.send({t:`stdin`,session:e,term:t,data:n})}resize(e,t,n,r){let i=this.terminals.get(z(e,t));i&&(i.cols=n,i.rows=r,this.open&&i.ready?this.send({t:`resize`,session:e,term:t,cols:n,rows:r}):i.pendingResize=!0)}spawnShell(e){return this.ensureConnected(),this.open?new Promise((t,n)=>{let r=this.shellWaiters.get(e)??[];r.push({resolve:t,reject:n}),this.shellWaiters.set(e,r),this.open&&this.send({t:`spawn-shell`,session:e})}):Promise.reject(Error(`Connection is unavailable`))}killShell(e,t){this.open&&this.send({t:`kill-shell`,session:e,term:t})}onStatus(e){return this.statusListeners.add(e),this.ensureConnected(),()=>this.statusListeners.delete(e)}onAgentNotification(e){return this.notificationListeners.add(e),this.ensureConnected(),()=>this.notificationListeners.delete(e)}onRenamed(e){return this.renameListeners.add(e),this.ensureConnected(),()=>this.renameListeners.delete(e)}onAccount(e){return this.accountListeners.add(e),this.ensureConnected(),()=>this.accountListeners.delete(e)}onSessionSwitched(e){return this.switchListeners.add(e),this.ensureConnected(),()=>this.switchListeners.delete(e)}onSessionsChanged(e){return this.sessionsChangedListeners.add(e),this.ensureConnected(),()=>this.sessionsChangedListeners.delete(e)}onConnectionChange(e){return this.connectionListeners.add(e),()=>this.connectionListeners.delete(e)}onHostUpdatesChanged(e){return this.hostUpdatesListeners.add(e),this.ensureConnected(),()=>this.hostUpdatesListeners.delete(e)}isConnected(){return this.open}reportTheme(e,t){this.theme&&this.theme.fg===e&&this.theme.bg===t||(this.theme={fg:e,bg:t},this.open&&this.send({t:`theme`,fg:e,bg:t}))}reset(){this.ws?.close()}switchHost(){let e=this.ws;this.ws=null,this.open=!1,this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.terminals.clear();for(let e of this.shellWaiters.values())for(let t of e)t.reject(Error(`Host changed`));this.shellWaiters.clear(),e?.close();for(let e of this.connectionListeners)e(!1)}ensureConnected(){this.ws||this.reconnectTimer||this.connect()}connect(){let e=a.get(),t=i();if(!e&&!t)return;let n=window.location.protocol===`https:`?`wss`:`ws`,o=t?t.socket():new WebSocket(`${n}://${window.location.host}/ws`);this.ws=o,o.addEventListener(`open`,()=>{if(this.ws!==o){o.close();return}t||o.send(JSON.stringify({t:`auth`,token:e}))}),o.addEventListener(`message`,e=>{if(this.ws!==o)return;let t;try{t=JSON.parse(String(e.data))}catch{return}if(t.t===`authenticated`){if(this.open)return;this.open=!0,this.backoff=L,this.send({t:`subscribe-status`}),this.theme&&this.send({t:`theme`,...this.theme});for(let e of this.terminals.values()){e.ready=!1,e.pendingResize=!1;let{session:t,term:n,cols:r,rows:i}=e;this.send({t:`attach`,session:t,term:n,cols:r,rows:i})}for(let e of this.connectionListeners)e(!0)}else this.open&&this.handle(t)}),o.addEventListener(`close`,e=>{if(this.ws!==o)return;let t=this.open;this.open=!1,this.ws=null;for(let e of this.shellWaiters.values())for(let t of e)t.reject(Error(`Connection lost; operation outcome is unknown`));if(this.shellWaiters.clear(),t)for(let e of this.connectionListeners)e(!1);if(e.code===4401&&e.reason===`browser_rejected`){r();return}this.scheduleReconnect()})}scheduleReconnect(){this.reconnectTimer||this.terminals.size===0&&this.statusListeners.size===0&&this.notificationListeners.size===0&&this.renameListeners.size===0&&this.accountListeners.size===0&&this.switchListeners.size===0&&this.sessionsChangedListeners.size===0||(this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},this.backoff),this.backoff=Math.min(this.backoff*2,R))}send(e){this.open&&this.ws?.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(e))}handle(e){switch(e.t){case`agent-notification`:for(let t of this.notificationListeners)t(e);break;case`replay`:{let t=this.terminals.get(z(e.session,e.term));if(!t)break;if(t.ready=!0,t.pendingResize){t.pendingResize=!1;let{session:e,term:n,cols:r,rows:i}=t;this.send({t:`resize`,session:e,term:n,cols:r,rows:i})}t.handlers.onData(e.data,e.t);break}case`output`:this.terminals.get(z(e.session,e.term))?.handlers.onData(e.data,e.t);break;case`exit`:{let t=this.terminals.get(z(e.session,e.term));t&&(t.ready=!1,t.handlers.onExit?.(e.code)),e.term===`agent`&&t&&(t.live=!1);break}case`status`:{let t=[`starting`,`running`,`waiting_input`].includes(e.status);for(let n of this.terminals.values())if(!(n.session!==e.session||n.term!==`agent`)){if(t&&!n.live){n.ready=!1,n.pendingResize=!1;let{session:e,term:t,cols:r,rows:i}=n;this.send({t:`attach`,session:e,term:t,cols:r,rows:i})}n.live=t}for(let t of this.statusListeners)t({session:e.session,status:e.status,last_activity_at:e.last_activity_at});break}case`renamed`:for(let t of this.renameListeners)t({session:e.session,title:e.title,agent_title:e.agent_title,osc_title:e.osc_title});break;case`account`:for(let t of this.accountListeners)t({account_id:e.account_id,profile_id:e.profile_id,logged_in:e.logged_in});break;case`session-switched`:for(let t of this.switchListeners)t(e);break;case`sessions-changed`:for(let t of this.sessionsChangedListeners)t(e);break;case`host-updates-changed`:for(let e of this.hostUpdatesListeners)e();break;case`shell-spawned`:{let t=this.shellWaiters.get(e.session)?.shift();t&&t.resolve(e.term);break}case`notice`:(e.level===`warning`?s.warning:s.error)(e.title,{...e.detail===void 0?{}:{description:e.detail},duration:12e3});break;case`error`:s.error(`Connection error`,{description:e.message});break}}};export{l as _,P as a,E as c,D as d,w as f,F as g,I as h,p as i,T as l,_ as m,m as n,v as o,M as p,f as r,S as s,B as t,N as u,d as v,u as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-C9A1vLE-.js";var t=e(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{t};
|