@puddle-code/cli 0.3.9 → 0.3.11

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +3 -14
  2. package/dist/host-control.mjs +228 -171
  3. package/dist/index.js +259 -200
  4. package/dist/public/assets/App-CNB4a07v.js +2 -0
  5. package/dist/public/assets/Dashboard-v3OproVW.js +1 -0
  6. package/dist/public/assets/{EditorTabClose-BolUnwz9.js → EditorTabClose-DwhahpvS.js} +1 -1
  7. package/dist/public/assets/{FindWidget-BUmuGtbd.js → FindWidget-CVH9U-_P.js} +1 -1
  8. package/dist/public/assets/{LazyTerminal-BRPy9Nm5.js → LazyTerminal-CgQryH0p.js} +2 -2
  9. package/dist/public/assets/{ModelRefcount-DdSmsCyg.js → ModelRefcount-njA_f4bS.js} +1 -1
  10. package/dist/public/assets/NewProjectDialog-BT8rR4yn.js +1 -0
  11. package/dist/public/assets/NotebookWidget-Cwd77EGL.js +7 -0
  12. package/dist/public/assets/PaneEditorBody-RaUBrZPu.js +303 -0
  13. package/dist/public/assets/PdfViewer-Bppu4-0-.js +2 -0
  14. package/dist/public/assets/SettingsDialog-CaHklYzG.js +8 -0
  15. package/dist/public/assets/{Terminal-WzMZyNl-.js → Terminal-_10Xyj1h.js} +5 -5
  16. package/dist/public/assets/Workspace-GgVr1uYN.js +20 -0
  17. package/dist/public/assets/_virtual_notebook-widget-runtime-Dro422xS.js +6966 -0
  18. package/dist/public/assets/api-i6xNY3bF.js +1 -0
  19. package/dist/public/assets/auth-GfOuXpIe.js +64 -0
  20. package/dist/public/assets/{buffer-store-BcKRO2bQ.js → buffer-store-eMnMxbpI.js} +1 -1
  21. package/dist/public/assets/{button-Chvl9hcE.js → button-BgeBH2Uc.js} +1 -1
  22. package/dist/public/assets/{command-CaE1P1RF.js → command-D7m0dmA-.js} +1 -1
  23. package/dist/public/assets/context-DW21k43a.js +1 -0
  24. package/dist/public/assets/{context-menu-BTe3xVbd.js → context-menu-CMWkmDu6.js} +1 -1
  25. package/dist/public/assets/dialog-BMWRC2HO.js +41 -0
  26. package/dist/public/assets/disclosure-CHXbNzgZ.js +1 -0
  27. package/dist/public/assets/dist-BOS6OKSE.js +1 -0
  28. package/dist/public/assets/{dist-BYGE8AQe.js → dist-C_x5-hi8.js} +1 -1
  29. package/dist/public/assets/{dist-CYLjuW55.js → dist-Cde1E3eV.js} +1 -1
  30. package/dist/public/assets/{dist-gLP0NXk8.js → dist-Ds3438NL.js} +1 -1
  31. package/dist/public/assets/errors-O9DWXa3f.js +1 -0
  32. package/dist/public/assets/forward-link-RM7_5Shu.js +1 -0
  33. package/dist/public/assets/hotkeys-1uTWFYAL.js +1 -0
  34. package/dist/public/assets/index-CPHfr3MU.css +2 -0
  35. package/dist/public/assets/{index-Dp8dqiUy.js → index-np8JXeG6.js} +3 -3
  36. package/dist/public/assets/input-CxgRsoVg.js +1 -0
  37. package/dist/public/assets/jsx-runtime-By8HlURe.js +1 -0
  38. package/dist/public/assets/{markdown-mermaid-BX4brFyy.js → markdown-mermaid-CNYDlgGt.js} +1 -1
  39. package/dist/public/assets/media-refresh-store-Bu4kWCGq.js +1 -0
  40. package/dist/public/assets/notification-delivery-Dfvdt_1U.js +1 -0
  41. package/dist/public/assets/{popover-C20E0SGw.js → popover-CCHRaCvX.js} +1 -1
  42. package/dist/public/assets/protocol-support-BGmIChNK.js +1 -0
  43. package/dist/public/assets/{jsx-runtime-ffCh33zF.js → react-dom-cJyBB_A4.js} +1 -1
  44. package/dist/public/assets/{scroll-restoration-DTBzWrDT.js → scroll-restoration-OVgiE4G9.js} +1 -1
  45. package/dist/public/assets/select-Bg0rWqco.js +1 -0
  46. package/dist/public/assets/selection-actions-D875GPFU.js +1 -0
  47. package/dist/public/assets/{session-order-iDEtZwje.js → session-order-f7QxTbVD.js} +1 -1
  48. package/dist/public/assets/{switch-B1uGC2PW.js → switch-DhNyUV8C.js} +1 -1
  49. package/dist/public/assets/use-ui-state-CHqXhyx4.js +1 -0
  50. package/dist/public/assets/{ws-DfRorDqa.js → ws-CMPCIzY4.js} +1 -1
  51. package/dist/public/index.html +5 -4
  52. package/dist/pudl.js +245 -188
  53. package/package.json +1 -1
  54. package/dist/public/assets/App-BaLhdtWg.js +0 -2
  55. package/dist/public/assets/Dashboard-LVU8bCcQ.js +0 -1
  56. package/dist/public/assets/NewProjectDialog-BFguzZCI.js +0 -1
  57. package/dist/public/assets/PaneEditorBody-DBW-O4q7.js +0 -303
  58. package/dist/public/assets/PdfViewer-Q6yROHsM.js +0 -2
  59. package/dist/public/assets/SettingsDialog-DoVdLwtQ.js +0 -8
  60. package/dist/public/assets/Workspace-BxGgvBCU.js +0 -20
  61. package/dist/public/assets/auth-ngM0Ffss.js +0 -64
  62. package/dist/public/assets/dialog-yvLGI8FJ.js +0 -41
  63. package/dist/public/assets/disclosure-0ZiECVHr.js +0 -1
  64. package/dist/public/assets/dist-CwwiP1WN.js +0 -1
  65. package/dist/public/assets/errors-yaab6YK_.js +0 -1
  66. package/dist/public/assets/forward-link-kfVuUsZP.js +0 -1
  67. package/dist/public/assets/index-CItoWyyj.css +0 -2
  68. package/dist/public/assets/input-DDhYsCUG.js +0 -1
  69. package/dist/public/assets/media-refresh-store-D3rBSq4q.js +0 -1
  70. package/dist/public/assets/notification-delivery-B__ASJZR.js +0 -1
  71. package/dist/public/assets/protocol-support-BNUfFPAF.js +0 -1
  72. package/dist/public/assets/select-DQmSVYUL.js +0 -1
  73. package/dist/public/assets/selection-actions-JLWPcaUH.js +0 -1
  74. package/dist/public/assets/use-ui-state-jAfsiEpt.js +0 -1
@@ -1,2 +0,0 @@
1
- /*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@font-face{font-family:Ubuntu Sans;src:url(/assets/UbuntuSans-variable-D2Z3tJLW.woff2)format("woff2");font-weight:100 800;font-stretch:75% 100%;font-style:normal;font-display:swap}@font-face{font-family:Ubuntu Sans;src:url(/assets/UbuntuSans-Italic-variable-RySnp6Km.woff2)format("woff2");font-weight:100 800;font-stretch:75% 100%;font-style:italic;font-display:swap}@font-face{font-family:Ubuntu Sans Mono;src:url(/assets/UbuntuSansMono-variable-DaQTOezC.woff2)format("woff2");font-weight:400 700;font-style:normal;font-display:swap}@font-face{font-family:Ubuntu Sans Mono;src:url(/assets/UbuntuSansMono-Italic-variable-DSY888gS.woff2)format("woff2");font-weight:400 700;font-style:italic;font-display:swap}:root{--phone-key-min-width:2.25rem;--phone-key-padding-inline:.375rem;--altitude-blue:#7dadff;--krypton-green:#8be8b3;--quiet-khaki:#ddb28c;--storm-navy:#001c3d;--burnt-wood:#5a2f22;--navy-950:#000a14;--navy-900:#00132b;--navy-800:#001c3d;--navy-700:#0a2b52;--navy-600:#163c6b;--blue-200:#a7c7ff;--blue-300:#7dadff;--blue-500:#4a86e8;--blue-600:#2e6bd6;--green-200:#aff0cb;--green-300:#8be8b3;--green-500:#2fbf85;--green-600:#1fa26b;--green-700:#157a50;--neutral-0:#fff;--neutral-50:#f7f7f7;--neutral-100:#efefef;--neutral-200:#e5e5e5;--neutral-500:#6b6b6b;--khaki-50:#fbf5ec;--khaki-100:#f7ebda;--khaki-200:#ead9c0;--khaki-300:#ddb28c;--khaki-600:#a9743d;--amber-200:#f6c892;--amber-300:#f0b36e;--amber-600:#c08a4b;--ember-100:#f8b7a3;--ember-200:#f2957c;--ember-400:#d96a4e;--ember-500:#c2472e;--ember-600:#8c4a34;--ember-700:#5a2f22;--mist-100:#eaf1fb;--mist-300:#b9c9e0;--mist-500:#7e93b3;--bark-500:#8a7663;--cyan-200:#a5e4e8;--cyan-300:#7fd6dc;--cyan-500:#2fa6ae;--cyan-600:#1f8b92;--violet-200:#d0c2f7;--violet-300:#b9a3f2;--violet-500:#8b71db;--violet-600:#6d4fc4}[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg-base:var(--navy-950);--bg-surface:var(--navy-900);--bg-elevated:var(--navy-800);--border:var(--navy-600);--text-primary:var(--mist-100);--text-secondary:var(--mist-300);--text-muted:var(--mist-500);--text-gold:var(--khaki-300);--accent:var(--blue-300);--accent-hover:var(--blue-200);--focus-ring:var(--blue-300);--action:var(--mist-100);--action-hover:var(--mist-300);--action-ink:var(--navy-800);--danger:var(--ember-200);--success:var(--green-300);--warning:var(--amber-300);--status-running:var(--amber-300);--status-waiting:var(--green-300);--status-interrupted:var(--ember-200);--status-idle:var(--mist-500);--status-terminal:var(--blue-300);--selection:#7dadff4d;--diff-added:#8be8b32e;--diff-removed:#f2957c2e;--paper:var(--neutral-0);--ansi-black:var(--navy-700);--ansi-red:var(--ember-200);--ansi-green:var(--green-300);--ansi-yellow:var(--amber-300);--ansi-blue:var(--blue-300);--ansi-magenta:var(--violet-300);--ansi-cyan:var(--cyan-300);--ansi-white:var(--mist-300);--ansi-bright-black:var(--mist-500);--ansi-bright-red:var(--ember-100);--ansi-bright-green:var(--green-200);--ansi-bright-yellow:var(--amber-200);--ansi-bright-blue:var(--blue-200);--ansi-bright-magenta:var(--violet-200);--ansi-bright-cyan:var(--cyan-200);--ansi-bright-white:var(--mist-100)}[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg-base:var(--neutral-0);--bg-surface:var(--neutral-50);--bg-elevated:var(--neutral-100);--border:var(--neutral-200);--text-primary:var(--navy-800);--text-secondary:var(--navy-600);--text-muted:var(--neutral-500);--text-gold:var(--bark-500);--accent:var(--blue-600);--accent-hover:var(--blue-500);--focus-ring:var(--blue-600);--action:var(--navy-800);--action-hover:var(--navy-700);--action-ink:var(--neutral-0);--danger:var(--ember-500);--success:var(--green-700);--warning:var(--khaki-600);--status-running:var(--khaki-600);--status-waiting:var(--green-700);--status-interrupted:var(--ember-500);--status-idle:var(--neutral-500);--status-terminal:var(--blue-600);--selection:#2e6bd638;--diff-added:#1fa26b24;--diff-removed:#c2472e24;--paper:var(--neutral-0);--ansi-black:var(--navy-800);--ansi-red:var(--ember-500);--ansi-green:var(--green-600);--ansi-yellow:var(--khaki-600);--ansi-blue:var(--blue-600);--ansi-magenta:var(--violet-600);--ansi-cyan:var(--cyan-600);--ansi-white:var(--neutral-200);--ansi-bright-black:var(--bark-500);--ansi-bright-red:var(--ember-400);--ansi-bright-green:var(--green-500);--ansi-bright-yellow:var(--amber-600);--ansi-bright-blue:var(--blue-500);--ansi-bright-magenta:var(--violet-500);--ansi-bright-cyan:var(--cyan-500);--ansi-bright-white:var(--neutral-0)}.monaco-editor .puddle-dirty-added,.monaco-editor .puddle-dirty-modified{box-sizing:border-box;border-left:3px solid var(--success);cursor:pointer;margin-left:4px;width:3px!important}.monaco-editor .puddle-dirty-modified{border-left-color:var(--accent)}.monaco-editor .puddle-dirty-deleted-before,.monaco-editor .puddle-dirty-deleted-after{cursor:pointer;position:relative;width:8px!important}.monaco-editor .puddle-dirty-deleted-before:before,.monaco-editor .puddle-dirty-deleted-after:after{content:"";background:var(--danger);clip-path:polygon(0 0,100% 50%,0 100%);width:6px;height:6px;position:absolute;left:2px}.monaco-editor .puddle-dirty-deleted-before:before{top:-3px}.monaco-editor .puddle-dirty-deleted-after:after{bottom:-3px}.puddle-hidden-diff-controller{pointer-events:none;opacity:0;width:1px;height:1px;position:fixed;top:-2px;left:-2px;overflow:hidden}.puddle-dirty-peek,.puddle-dirty-peek-margin{background:var(--bg-base);overflow:hidden}.puddle-dirty-peek-header{height:28px;color:var(--text-secondary);background:var(--bg-elevated);font-family:var(--font-sans);align-items:center;gap:12px;padding:0 10px;font-size:12px;display:flex}.puddle-dirty-peek-title{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.puddle-dirty-peek-close{color:var(--text-muted);cursor:pointer;font:inherit;background:0 0;border:0;flex:none;margin-left:auto;padding:0 4px;font-size:20px;line-height:1;transition:color .12s}.puddle-dirty-peek-close:hover{color:var(--text-primary)}.puddle-dirty-peek-editor{height:calc(100% - 28px)}@media (pointer:fine){:root[data-cursor-package=rangefinder] *,:root[data-cursor-package=drafting] *,:root[data-cursor-package=invert] *{cursor:none!important}}:root[data-cursor-package=system] .monaco-editor,:root[data-cursor-package=system] .monaco-editor *{cursor:text!important}.custom-cursor{z-index:2147483647;pointer-events:none;opacity:0;will-change:transform;position:fixed;top:0;left:0}.rangefinder-cursor{-webkit-backdrop-filter:blur(1px)brightness(1.05)saturate(1.15);backdrop-filter:blur(1px)brightness(1.05)saturate(1.15);border-radius:50%;width:27px;height:27px;transition:opacity .15s,width .15s,height .15s;overflow:hidden}.rangefinder-cursor-facets{width:40.5px;max-width:none;height:40.5px;transition:width .15s,height .15s;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.rangefinder-cursor-facet-light{fill:var(--paper);fill-opacity:.32}.rangefinder-cursor-facet-dark{fill:var(--text-primary);fill-opacity:.07}:where(:root[data-theme=dark]) .rangefinder-cursor-facet-light{fill-opacity:.07}:where(:root[data-theme=dark]) .rangefinder-cursor-facet-dark{fill:var(--bg-base)}.rangefinder-cursor.is-interactive{width:11.7px;height:11.7px}.rangefinder-cursor.is-interactive .rangefinder-cursor-facets{width:17.55px;height:17.55px}.rangefinder-cursor.is-text{width:2px;height:var(--custom-cursor-caret-height,22px);background:var(--text-primary);-webkit-backdrop-filter:none;backdrop-filter:none;border-radius:1px}.rangefinder-cursor.is-text .rangefinder-cursor-facets{display:none}.drafting-cursor{width:24px;height:24px;color:var(--text-primary);filter:drop-shadow(0 0 1px var(--bg-base));transition:opacity .12s,width .12s,height .12s,color .12s}.drafting-cursor-tick{background:currentColor;transition:width .12s,height .12s,opacity .12s;display:block;position:absolute}.drafting-cursor-tick[data-side=top],.drafting-cursor-tick[data-side=bottom]{width:1px;height:6px;left:calc(50% - .5px)}.drafting-cursor-tick[data-side=top]{top:0}.drafting-cursor-tick[data-side=bottom]{bottom:0}.drafting-cursor-tick[data-side=left],.drafting-cursor-tick[data-side=right]{width:6px;height:1px;top:calc(50% - .5px)}.drafting-cursor-tick[data-side=left]{left:0}.drafting-cursor-tick[data-side=right]{right:0}.drafting-cursor.is-interactive{width:14px;height:14px;color:var(--accent)}.drafting-cursor.is-interactive .drafting-cursor-tick[data-side=top],.drafting-cursor.is-interactive .drafting-cursor-tick[data-side=bottom]{height:4px}.drafting-cursor.is-interactive .drafting-cursor-tick[data-side=left],.drafting-cursor.is-interactive .drafting-cursor-tick[data-side=right]{width:4px}.drafting-cursor.is-text{width:2px;height:var(--custom-cursor-caret-height,22px);color:var(--text-primary);background:currentColor;border-radius:1px}.drafting-cursor.is-text .drafting-cursor-tick{opacity:0}.invert-cursor{box-sizing:border-box;border:1.5px solid var(--paper);mix-blend-mode:difference;border-radius:50%;width:14px;height:14px;transition:opacity .1s,width .1s,height .1s,border-width .1s,border-radius .1s,background-color .1s}.invert-cursor.is-interactive{background:var(--paper);border-width:0;width:8px;height:8px}.invert-cursor.is-text{width:2px;height:var(--custom-cursor-caret-height,22px);background:var(--paper);border-width:0;border-radius:1px}@layer theme{:root,:host{--font-sans:"Ubuntu Sans", system-ui, sans-serif;--font-mono:"Ubuntu Sans Mono", ui-monospace, "SF Mono", monospace;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--text-xs:.75rem;--text-base:.875rem;--text-base--line-height:1.375rem;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Ubuntu Sans", system-ui, sans-serif;--default-mono-font-family:"Ubuntu Sans Mono", ui-monospace, "SF Mono", monospace;--color-ground:var(--bg-base);--color-elevated:var(--bg-elevated);--text-2xs:.6875rem}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.puddle-terminal .xterm-screen{touch-action:pinch-zoom}html{font-size:var(--ui-font-size,17.6px)}body{background-color:var(--bg-base);color:var(--text-primary);font-family:var(--font-sans);font-size:var(--text-base);line-height:var(--text-base--line-height);-webkit-font-smoothing:antialiased}::selection{background-color:var(--selection)}:focus-visible{outline:2px solid var(--focus-ring);outline-offset:1px}input:focus-visible,textarea:focus-visible{outline:none}button:not(:disabled),[role=button]:not([aria-disabled=true]),a,label[for],summary,select{cursor:pointer}button:disabled,[aria-disabled=true]{cursor:not-allowed}.tabular-nums,code,kbd{font-variant-numeric:tabular-nums}}@layer components{.status-glyph{color:var(--status-idle);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}.status-glyph[data-status=running],.status-glyph[data-status=starting]{color:var(--status-running)}.status-glyph[data-kind=terminal][data-status=running],.status-glyph[data-kind=terminal][data-status=starting]{color:var(--status-terminal)}.status-glyph[data-status=waiting_input]{color:var(--status-waiting)}.status-glyph[data-status=interrupted]{color:var(--status-interrupted)}.status-glyph[data-stale]{opacity:.45}.workbench-hover .hover-contents{white-space:nowrap!important}.workbench-hover-container{pointer-events:none}.no-scrollbar{scrollbar-width:none}.no-scrollbar::-webkit-scrollbar{display:none}.md-preview{overflow-wrap:break-word;line-height:1.6}.md-preview h1,.md-preview h2,.md-preview h3,.md-preview h4,.md-preview h5,.md-preview h6{color:var(--text-primary);margin:1.5em 0 .5em;font-weight:600;line-height:1.3}.md-preview h1{font-size:1.6em}.md-preview h2{font-size:1.3em}.md-preview h3{font-size:1.15em}.md-preview h1:first-child,.md-preview h2:first-child{margin-top:0}.md-preview p,.md-preview ul,.md-preview ol,.md-preview table,.md-preview pre,.md-preview blockquote{margin:.6em 0}.md-preview ul,.md-preview ol{padding-left:1.5em}.md-preview ul{list-style:outside}.md-preview ol{list-style:decimal}.md-preview li{margin:.2em 0}.md-preview a{color:var(--accent)}.md-preview a:hover{color:var(--accent-hover);text-decoration:underline}.md-preview mark{background:var(--selection);color:inherit;border-radius:2px;padding:.05em .15em}.md-preview code{background:var(--bg-elevated);font-family:var(--font-mono);border-radius:4px;padding:.1em .35em;font-size:.92em}.md-preview pre{background:var(--bg-elevated);border-radius:6px;padding:.75em 1em;overflow-x:auto}.md-preview pre code{background:0 0;padding:0}.md-preview blockquote{border-left:2px solid var(--border);color:var(--text-secondary);padding-left:1em}.md-preview hr{border:0;border-top:1px solid var(--border);margin:1.5em 0}.md-preview table{border-collapse:collapse;max-width:100%;display:block;overflow-x:auto}.md-preview th,.md-preview td{border-bottom:1px solid var(--border);text-align:left;padding:.3em .9em .3em 0}.md-preview th{color:var(--text-secondary);font-weight:600}.md-preview img{max-width:100%}.md-preview input[type=checkbox]{margin-right:.4em}.md-preview .footnote-ref{font-size:.75em;line-height:0}.md-preview .footnote-ref a,.md-preview .footnote-backref{text-decoration:none}.md-preview .footnotes{color:var(--text-secondary);margin-top:2em;font-size:.88em}.md-preview .footnotes-list{padding-left:1.75em}.md-preview .markdown-alert{--markdown-alert-colour:var(--accent);border-left:3px solid var(--markdown-alert-colour);margin:1em 0;padding:.1em 0 .1em 1em}.md-preview .markdown-alert-tip{--markdown-alert-colour:var(--success)}.md-preview .markdown-alert-important{--markdown-alert-colour:var(--ansi-magenta)}.md-preview .markdown-alert-warning{--markdown-alert-colour:var(--warning)}.md-preview .markdown-alert-caution{--markdown-alert-colour:var(--danger)}.md-preview .markdown-alert-title{color:var(--markdown-alert-colour);align-items:center;gap:.45em;margin:0 0 .25em;font-weight:600;display:flex}.md-preview .markdown-alert-title svg{fill:currentColor;flex:none}.md-preview .markdown-alert>:last-child{margin-bottom:0}.md-preview .mermaid-diagram{text-align:center;max-width:100%;margin:1.25em 0;overflow-x:auto}.md-preview .mermaid-diagram>pre{text-align:left}.md-preview .mermaid-diagram>svg{max-width:100%;height:auto;margin:0 auto;display:block}.md-preview .mermaid-error{color:var(--danger);text-align:left}.math-display{display:block}.md-preview .math-display{margin:.9em 0;overflow:auto hidden}.md-preview .katex{color:var(--text-primary)}.md-preview .katex-error{font-family:var(--font-mono);font-size:.92em}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-y-0{inset-block:0}.-top-1{top:calc(var(--spacing) * -1)}.-top-12{top:calc(var(--spacing) * -12)}.top-0{top:0}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-9{top:calc(var(--spacing) * 9)}.top-10{top:calc(var(--spacing) * 10)}.top-\[calc\(var\(--phone-top\,0px\)\+var\(--phone-height\,100dvh\)\/2\)\]{top:calc(var(--phone-top,0px) + var(--phone-height,100dvh) / 2)}.top-full{top:100%}.right-0{right:0}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-3\.5{right:calc(var(--spacing) * 3.5)}.right-9{right:calc(var(--spacing) * 9)}.bottom-0{bottom:0}.bottom-2{bottom:calc(var(--spacing) * 2)}.-left-10{left:calc(var(--spacing) * -10)}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-9{left:calc(var(--spacing) * 9)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.\!container{width:100%!important}@media (width>=40rem){.\!container{max-width:40rem!important}}@media (width>=48rem){.\!container{max-width:48rem!important}}@media (width>=64rem){.\!container{max-width:64rem!important}}@media (width>=80rem){.\!container{max-width:80rem!important}}@media (width>=96rem){.\!container{max-width:96rem!important}}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-auto{margin:auto}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-1{margin-inline:var(--spacing)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-auto{margin-inline:auto}.-my-1{margin-block:calc(var(--spacing) * -1)}.my-0\.5{margin-block:calc(var(--spacing) * .5)}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-16{margin-top:calc(var(--spacing) * 16)}.-mr-11{margin-right:calc(var(--spacing) * -11)}.-mr-20{margin-right:calc(var(--spacing) * -20)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-\[4\/3\]{aspect-ratio:4/3}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-24{width:calc(var(--spacing) * 24);height:calc(var(--spacing) * 24)}.size-full{width:100%;height:100%}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-1\/2{height:50%}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-72{height:calc(var(--spacing) * 72)}.h-\[9px\]{height:9px}.h-\[34rem\]{height:34rem}.h-\[85vh\]{height:85vh}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-52{max-height:calc(var(--spacing) * 52)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[40dvh\]{max-height:40dvh}.max-h-\[60vh\]{max-height:60vh}.max-h-\[65vh\]{max-height:65vh}.max-h-\[calc\(var\(--phone-height\,100dvh\)-2rem\)\]{max-height:calc(var(--phone-height,100dvh) - 2rem)}.max-h-\[min\(24rem\,var\(--radix-dropdown-menu-content-available-height\)\)\]{max-height:min(24rem, var(--radix-dropdown-menu-content-available-height))}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-7{min-height:calc(var(--spacing) * 7)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-10{min-height:calc(var(--spacing) * 10)}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-32{min-height:calc(var(--spacing) * 32)}.min-h-40{min-height:calc(var(--spacing) * 40)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1\/2{width:50%}.w-3{width:calc(var(--spacing) * 3)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-96{width:calc(var(--spacing) * 96)}.w-\[26rem\]{width:26rem}.w-\[28rem\]{width:28rem}.w-\[34rem\]{width:34rem}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-\[min\(20rem\,calc\(100\%-4\.5rem\)\)\]{width:min(20rem,100% - 4.5rem)}.w-\[min\(20rem\,calc\(100vw-1rem\)\)\]{width:min(20rem,100vw - 1rem)}.w-\[min\(30rem\,42\%\)\]{width:min(30rem,42%)}.w-\[min\(34rem\,calc\(100\%-0\.5rem\)\)\]{width:min(34rem,100% - .5rem)}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-52{max-width:calc(var(--spacing) * 52)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-\[36rem\]{max-width:36rem}.max-w-\[calc\(100vw-1rem\)\]{max-width:calc(100vw - 1rem)}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-\[calc\(100vw-4rem\)\]{max-width:calc(100vw - 4rem)}.max-w-\[var\(--radix-select-content-available-width\)\]{max-width:var(--radix-select-content-available-width)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-12{min-width:calc(var(--spacing) * 12)}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-36{min-width:calc(var(--spacing) * 36)}.min-w-64{min-width:calc(var(--spacing) * 64)}.min-w-\[calc\(var\(--spacing\)\*28\.8\)\]{min-width:calc(var(--spacing) * 28.8)}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-\[0_1_auto\]{flex:0 auto}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-top-left{transform-origin:0 0}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.cursor-text{cursor:text}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.auto-rows-fr{grid-auto-rows:minmax(0,1fr)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-\[14rem_1fr\]{grid-template-columns:14rem 1fr}.grid-rows-\[0fr\]{grid-template-rows:0fr}.grid-rows-\[1fr\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-7{gap:calc(var(--spacing) * 7)}.gap-10{gap:calc(var(--spacing) * 10)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-y-none{overscroll-behavior-y:none}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.rounded-tr-md{border-top-right-radius:var(--radius-md)}.rounded-b-md{border-bottom-right-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.bg-accent,.bg-accent\/20{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\/20{background-color:color-mix(in oklab, var(--accent) 20%, transparent)}}.bg-action{background-color:var(--action)}.bg-border,.bg-border\/50{background-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.bg-border\/50{background-color:color-mix(in oklab, var(--border) 50%, transparent)}}.bg-current{background-color:currentColor}.bg-danger{background-color:var(--danger)}.bg-elevated{background-color:var(--bg-elevated)}.bg-fg-muted{background-color:var(--text-muted)}.bg-ground,.bg-ground\/60{background-color:var(--bg-base)}@supports (color:color-mix(in lab, red, red)){.bg-ground\/60{background-color:color-mix(in oklab, var(--bg-base) 60%, transparent)}}.bg-ground\/70{background-color:var(--bg-base)}@supports (color:color-mix(in lab, red, red)){.bg-ground\/70{background-color:color-mix(in oklab, var(--bg-base) 70%, transparent)}}.bg-idle{background-color:var(--status-idle)}.bg-interrupted{background-color:var(--status-interrupted)}.bg-paper{background-color:var(--paper)}.bg-running{background-color:var(--status-running)}.bg-selection{background-color:var(--selection)}.bg-success{background-color:var(--success)}.bg-surface,.bg-surface\/40{background-color:var(--bg-surface)}@supports (color:color-mix(in lab, red, red)){.bg-surface\/40{background-color:color-mix(in oklab, var(--bg-surface) 40%, transparent)}}.bg-surface\/90{background-color:var(--bg-surface)}@supports (color:color-mix(in lab, red, red)){.bg-surface\/90{background-color:color-mix(in oklab, var(--bg-surface) 90%, transparent)}}.bg-transparent{background-color:#0000}.bg-waiting{background-color:var(--status-waiting)}.bg-warning{background-color:var(--warning)}.fill-current{fill:currentColor}.object-contain{object-fit:contain}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-0\.5{padding-right:calc(var(--spacing) * .5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-11{padding-right:calc(var(--spacing) * 11)}.pr-16{padding-right:calc(var(--spacing) * 16)}.pr-20{padding-right:calc(var(--spacing) * 20)}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-15{padding-bottom:calc(var(--spacing) * 15)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-14{padding-left:calc(var(--spacing) * 14)}.pl-\[88px\]{padding-left:88px}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:Ubuntu Sans Mono,ui-monospace,SF Mono,monospace}.font-sans{font-family:Ubuntu Sans,system-ui,sans-serif}.text-2xl{font-size:1.5rem;line-height:var(--tw-leading,2rem)}.text-2xs{font-size:.6875rem;line-height:var(--tw-leading,1rem)}.text-base{font-size:.875rem;line-height:var(--tw-leading,1.375rem)}.text-lg{font-size:1rem;line-height:var(--tw-leading,1.5rem)}.text-sm{font-size:.8125rem;line-height:var(--tw-leading,1.25rem)}.text-xs{font-size:.75rem;line-height:var(--tw-leading,1.125rem)}.text-\[8px\]{font-size:8px}.text-\[11px\]{font-size:11px}.leading-3{--tw-leading:calc(var(--spacing) * 3);line-height:calc(var(--spacing) * 3)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--accent)}.text-action-ink{color:var(--action-ink)}.text-danger{color:var(--danger)}.text-fg{color:var(--text-primary)}.text-fg-gold{color:var(--text-gold)}.text-fg-muted,.text-fg-muted\/40{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\/40{color:color-mix(in oklab, var(--text-muted) 40%, transparent)}}.text-fg-secondary{color:var(--text-secondary)}.text-ground{color:var(--bg-base)}.text-icon-amber{color:var(--ansi-yellow)}.text-icon-blue{color:var(--ansi-blue)}.text-icon-cyan{color:var(--ansi-cyan)}.text-icon-green{color:var(--ansi-green)}.text-icon-red{color:var(--ansi-red)}.text-icon-violet{color:var(--ansi-magenta)}.text-interrupted{color:var(--status-interrupted)}.text-running{color:var(--status-running)}.text-success{color:var(--success)}.text-warning{color:var(--warning)}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[grid-template-rows\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[padding\]{transition-property:padding;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.select-text{-webkit-user-select:text;user-select:text}.\[-webkit-app-region\:drag\]{-webkit-app-region:drag}.\[-webkit-app-region\:no-drag\]{-webkit-app-region:no-drag}.group-focus-within\:flex:is(:where(.group):focus-within *){display:flex}@media (hover:hover){.group-hover\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\:flex:is(:where(.group):hover *){display:flex}.group-hover\:hidden:is(:where(.group):hover *){display:none}.group-hover\:inline-flex:is(:where(.group):hover *){display:inline-flex}.group-hover\:translate-x-1:is(:where(.group):hover *){--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:\[transform\:translateX\(var\(--tail\)\)\]:is(:where(.group):hover *){transform:translateX(var(--tail))}.group-hover\:bg-\[linear-gradient\(to_right\,transparent\,var\(--color-elevated\)_1\.25rem\)\]:is(:where(.group):hover *){background-image:linear-gradient(to right,transparent,var(--color-elevated) 1.25rem)}.group-hover\:bg-\[linear-gradient\(to_right\,transparent\,var\(--color-ground\)_1\.25rem\)\]:is(:where(.group):hover *){background-image:linear-gradient(to right,transparent,var(--color-ground) 1.25rem)}.group-hover\:text-accent:is(:where(.group):hover *){color:var(--accent)}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/cell\:opacity-100:is(:where(.group\/cell):hover *){opacity:1}.group-hover\/nav\:\[transform\:translateX\(var\(--tail\)\)\]:is(:where(.group\/nav):hover *){transform:translateX(var(--tail))}.group-hover\/outline\:opacity-100:is(:where(.group\/outline):hover *),.group-hover\/output\:opacity-100:is(:where(.group\/output):hover *){opacity:1}.group-hover\/repository\:\[transform\:translateX\(var\(--tail\)\)\]:is(:where(.group\/repository):hover *){transform:translateX(var(--tail))}.group-hover\/run\:invisible:is(:where(.group\/run):hover *){visibility:hidden}.group-hover\/run\:block:is(:where(.group\/run):hover *){display:block}.group-hover\/switch\:bg-border\/70:is(:where(.group\/switch):hover *){background-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.group-hover\/switch\:bg-border\/70:is(:where(.group\/switch):hover *){background-color:color-mix(in oklab, var(--border) 70%, transparent)}}.group-hover\/terminal\:opacity-100:is(:where(.group\/terminal):hover *){opacity:1}.group-hover\/treerow\:\[transform\:translateX\(var\(--tail\)\)\]:is(:where(.group\/treerow):hover *){transform:translateX(var(--tail))}}.group-focus-visible\/run\:invisible:is(:where(.group\/run):focus-visible *){visibility:hidden}.group-focus-visible\/run\:block:is(:where(.group\/run):focus-visible *){display:block}.group-data-\[state\=checked\]\/switch\:bg-action:is(:where(.group\/switch)[data-state=checked] *){background-color:var(--action)}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.placeholder\:text-fg-muted::placeholder{color:var(--text-muted)}.empty\:hidden:empty{display:none}.focus-within\:pointer-events-auto:focus-within{pointer-events:auto}.focus-within\:opacity-100:focus-within{opacity:1}@media (hover:hover){.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-action-hover:hover{background-color:var(--action-hover)}.hover\:bg-border:hover,.hover\:bg-border\/50:hover{background-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-border\/50:hover{background-color:color-mix(in oklab, var(--border) 50%, transparent)}}.hover\:bg-border\/70:hover{background-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-border\/70:hover{background-color:color-mix(in oklab, var(--border) 70%, transparent)}}.hover\:bg-border\/80:hover{background-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-border\/80:hover{background-color:color-mix(in oklab, var(--border) 80%, transparent)}}.hover\:bg-elevated:hover{background-color:var(--bg-elevated)}.hover\:bg-ground:hover{background-color:var(--bg-base)}.hover\:bg-surface:hover{background-color:var(--bg-surface)}.hover\:text-accent-hover:hover{color:var(--accent-hover)}.hover\:text-danger:hover{color:var(--danger)}.hover\:text-fg:hover{color:var(--text-primary)}.hover\:text-fg-secondary:hover{color:var(--text-secondary)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-70:hover{opacity:.7}.hover\:opacity-75:hover{opacity:.75}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}}.focus\:bg-border\/80:focus{background-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.focus\:bg-border\/80:focus{background-color:color-mix(in oklab, var(--border) 80%, transparent)}}.focus\:bg-elevated:focus{background-color:var(--bg-elevated)}.focus\:bg-ground:focus{background-color:var(--bg-base)}.focus\:opacity-100:focus{opacity:1}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-focus:focus{--tw-ring-color:var(--focus-ring)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:bg-border\/50:focus-visible{background-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:bg-border\/50:focus-visible{background-color:color-mix(in oklab, var(--border) 50%, transparent)}}.focus-visible\:bg-elevated:focus-visible{background-color:var(--bg-elevated)}.focus-visible\:text-fg:focus-visible{color:var(--text-primary)}.active\:bg-border:active,.active\:bg-border\/70:active{background-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.active\:bg-border\/70:active{background-color:color-mix(in oklab, var(--border) 70%, transparent)}}.active\:opacity-80:active{opacity:.8}.active\:opacity-85:active{opacity:.85}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-default:disabled{cursor:default}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.has-\[\[data-state\=open\]\]\:flex:has([data-state=open]){display:flex}.has-\[\[data-state\=open\]\]\:inline-flex:has([data-state=open]){display:inline-flex}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[highlighted\]\:bg-action[data-highlighted]{background-color:var(--action)}.data-\[highlighted\]\:text-action-ink[data-highlighted]{color:var(--action-ink)}.data-\[resizing\]\:bg-accent[data-resizing]{background-color:var(--accent)}.data-\[selected\=true\]\:bg-action[data-selected=true]{background-color:var(--action)}.data-\[selected\=true\]\:text-action-ink[data-selected=true]{color:var(--action-ink)}.data-\[state\=active\]\:bg-elevated[data-state=active]{background-color:var(--bg-elevated)}.data-\[state\=active\]\:text-fg[data-state=active]{color:var(--text-primary)}.data-\[state\=checked\]\:translate-x-\[1\.125rem\][data-state=checked]{--tw-translate-x:1.125rem;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=open\]\:bg-action[data-state=open]{background-color:var(--action)}.data-\[state\=open\]\:text-action-ink[data-state=open]{color:var(--action-ink)}.data-\[state\=unchecked\]\:translate-x-0\.5[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}@media (width>=40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-10{padding-inline:calc(var(--spacing) * 10)}.sm\:py-16{padding-block:calc(var(--spacing) * 16)}}@media (pointer:coarse){.pointer-coarse\:flex{display:flex}.pointer-coarse\:inline-flex{display:inline-flex}.pointer-coarse\:opacity-100{opacity:1}}.compact\:size-3:where([data-density=compact],[data-density=compact] *){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.compact\:h-5:where([data-density=compact],[data-density=compact] *){height:calc(var(--spacing) * 5)}.compact\:h-7:where([data-density=compact],[data-density=compact] *){height:calc(var(--spacing) * 7)}.compact\:w-7:where([data-density=compact],[data-density=compact] *){width:calc(var(--spacing) * 7)}.compact\:gap-0:where([data-density=compact],[data-density=compact] *){gap:0}.compact\:gap-0\.5:where([data-density=compact],[data-density=compact] *){gap:calc(var(--spacing) * .5)}.compact\:gap-1\.5:where([data-density=compact],[data-density=compact] *){gap:calc(var(--spacing) * 1.5)}.compact\:p-1:where([data-density=compact],[data-density=compact] *){padding:var(--spacing)}.compact\:px-1\.5:where([data-density=compact],[data-density=compact] *){padding-inline:calc(var(--spacing) * 1.5)}.compact\:py-1:where([data-density=compact],[data-density=compact] *){padding-block:var(--spacing)}.compact\:pt-1\.5:where([data-density=compact],[data-density=compact] *){padding-top:calc(var(--spacing) * 1.5)}.compact\:pb-0\.5:where([data-density=compact],[data-density=compact] *){padding-bottom:calc(var(--spacing) * .5)}.compact\:pb-12\.5:where([data-density=compact],[data-density=compact] *){padding-bottom:calc(var(--spacing) * 12.5)}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-2xs [cmdk-group-heading]{font-size:.6875rem;line-height:var(--tw-leading,1rem)}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:tracking-wide [cmdk-group-heading]{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.\[\&_\[cmdk-group-heading\]\]\:text-fg-muted [cmdk-group-heading]{color:var(--text-muted)}.\[\&_\[cmdk-group-heading\]\]\:uppercase [cmdk-group-heading]{text-transform:uppercase}.\[\&_h2\]\:mt-12 h2{margin-top:calc(var(--spacing) * 12)}.\[\&_h2\]\:scroll-mt-6 h2{scroll-margin-top:calc(var(--spacing) * 6)}.\[\&_pre\]\:bg-transparent pre{background-color:#0000}.\[\&_pre\]\:px-0 pre{padding-inline:0}.\[\&_pre\]\:text-sm pre{font-size:.8125rem;line-height:var(--tw-leading,1.25rem)}.\[\&_pre\]\:text-fg pre{color:var(--text-primary)}.\[\&_svg\]\:size-3\.5 svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\]\:text-fg-muted svg{color:var(--text-muted)}.data-\[selected\=true\]\:\[\&_svg\]\:text-action-ink[data-selected=true] svg{color:var(--action-ink)}.\[\&\:\:-webkit-details-marker\]\:hidden::-webkit-details-marker{display:none}.\[\&\>\*\]\:pointer-events-auto>*{pointer-events:auto}.\[\&\>\*\]\:min-w-0>*{min-width:0}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>span\]\:truncate>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\[\&\>svg\]\:m-2>svg{margin:calc(var(--spacing) * 2)}.\[\&\[open\]\>summary\>svg\]\:rotate-90[open]>summary>svg{rotate:90deg}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n,t as r}from"./jsx-runtime-ffCh33zF.js";import{S as i,w as a,x as o,y as s}from"./dialog-yvLGI8FJ.js";import{c,n as l}from"./x-DCpy1q13.js";var u=e(t(),1),d=[`top`,`right`,`bottom`,`left`],f=Math.min,p=Math.max,m=Math.round,h=Math.floor,g=e=>({x:e,y:e}),_={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function v(e,t,n){return p(e,f(t,n))}function y(e,t){return typeof e==`function`?e(t):e}function b(e){return e.split(`-`)[0]}function x(e){return e.split(`-`)[1]}function S(e){return e===`x`?`y`:`x`}function C(e){return e===`y`?`height`:`width`}function w(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function T(e){return S(w(e))}function E(e,t,n){n===void 0&&(n=!1);let r=x(e),i=T(e),a=C(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=F(o)),[o,F(o)]}function D(e){let t=F(e);return[O(e),t,O(t)]}function O(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var k=[`left`,`right`],A=[`right`,`left`],j=[`top`,`bottom`],M=[`bottom`,`top`];function N(e,t,n){switch(e){case`top`:case`bottom`:return n?t?A:k:t?k:A;case`left`:case`right`:return t?j:M;default:return[]}}function P(e,t,n,r){let i=x(e),a=N(b(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(O)))),a}function F(e){let t=b(e);return _[t]+e.slice(t.length)}function I(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function L(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:I(e)}function R(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function z(e,t,n){let{reference:r,floating:i}=e,a=w(t),o=T(t),s=C(o),c=b(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=x(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function B(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=y(t,e),p=L(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=R(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},b=R(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-b.top+p.top)/v.y,bottom:(b.bottom-h.bottom+p.bottom)/v.y,left:(h.left-b.left+p.left)/v.x,right:(b.right-h.right+p.right)/v.x}}var ee=50,te=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:B},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=z(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ee&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=z(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ne=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=y(e,t)||{};if(l==null)return{};let d=L(u),p={x:n,y:r},m=T(i),h=C(m),g=await o.getDimensions(l),_=m===`y`,b=_?`top`:`left`,S=_?`bottom`:`right`,w=_?`clientHeight`:`clientWidth`,E=a.reference[h]+a.reference[m]-p[m]-a.floating[h],D=p[m]-a.reference[m],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),k=O?O[w]:0;(!k||!await(o.isElement==null?void 0:o.isElement(O)))&&(k=s.floating[w]||a.floating[h]);let A=E/2-D/2,j=k/2-g[h]/2-1,M=f(d[b],j),N=f(d[S],j),P=k-g[h]-N,F=k/2-g[h]/2+A,I=v(M,F,P),R=!c.arrow&&x(i)!=null&&F!==I&&a.reference[h]/2-(F<M?M:N)-g[h]/2<0,z=R?F<M?F-M:F-P:0;return{[m]:p[m]+z,data:{[m]:I,centerOffset:F-I-z,...R&&{alignmentOffset:z}},reset:R}}}),re=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=y(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=b(r),_=w(o),v=b(o)===o,x=await(s.isRTL==null?void 0:s.isRTL(c.floating)),S=d||(v||!m?[F(o)]:D(o)),C=p!==`none`;!d&&C&&S.push(...P(o,m,p,x));let T=[o,...S],O=await s.detectOverflow(t,h),k=[],A=i.flip?.overflows||[];if(l&&k.push(O[g]),u){let e=E(r,a,x);k.push(O[e[0]],O[e[1]])}if(A=[...A,{placement:r,overflows:k}],!k.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=T[e];if(t&&(!(u===`alignment`&&_!==w(t))||A.every(e=>w(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:A},reset:{placement:t}};let n=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=A.filter(e=>{if(C){let t=w(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ie(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ae(e){return d.some(t=>e[t]>=0)}var oe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=y(e,t);switch(i){case`referenceHidden`:{let e=ie(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ae(e)}}}case`escaped`:{let e=ie(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ae(e)}}}default:return{}}}}},se=new Set([`left`,`top`]);async function ce(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=b(n),s=x(n),c=w(n)===`y`,l=se.has(o)?-1:1,u=a&&c?-1:1,d=y(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var le=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ce(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ue=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=y(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=w(i),p=S(f),m=u[p],h=u[f],g=(e,t)=>v(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},de=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=y(e,t),u={x:n,y:r},d=w(i),f=S(d),p=u[f],m=u[d],h=y(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=se.has(b(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},fe=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=y(e,t),c=await i.detectOverflow(t,s),l=b(n),u=x(n),d=w(n)===`y`,{width:m,height:h}=r.floating,g,_;l===`top`||l===`bottom`?(g=l,_=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(_=l,g=u===`end`?`top`:`bottom`);let v=h-c.top-c.bottom,S=m-c.left-c.right,C=f(h-c[g],v),T=f(m-c[_],S),E=t.middlewareData.shift,D=!E,O=C,k=T;E!=null&&E.enabled.x&&(k=S),E!=null&&E.enabled.y&&(O=v),D&&!u&&(d?k=m-2*p(c.left,c.right):O=h-2*p(c.top,c.bottom)),await o({...t,availableWidth:k,availableHeight:O});let A=await i.getDimensions(a.floating);return m!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function pe(){return typeof window<`u`}function V(e){return me(e)?(e.nodeName||``).toLowerCase():`#document`}function H(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function U(e){return((me(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function me(e){return pe()?e instanceof Node||e instanceof H(e).Node:!1}function W(e){return pe()?e instanceof Element||e instanceof H(e).Element:!1}function G(e){return pe()?e instanceof HTMLElement||e instanceof H(e).HTMLElement:!1}function he(e){return!pe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof H(e).ShadowRoot}function ge(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function _e(e){return/^(table|td|th)$/.test(V(e))}function ve(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ye=/transform|translate|scale|rotate|perspective|filter/,be=/paint|layout|strict|content/,K=e=>!!e&&e!==`none`,xe;function Se(e){let t=W(e)?J(e):e;return K(t.transform)||K(t.translate)||K(t.scale)||K(t.rotate)||K(t.perspective)||!we()&&(K(t.backdropFilter)||K(t.filter))||ye.test(t.willChange||``)||be.test(t.contain||``)}function Ce(e){let t=Y(e);for(;G(t)&&!q(t);){if(Se(t))return t;if(ve(t))return null;t=Y(t)}return null}function we(){return xe??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),xe}function q(e){return/^(html|body|#document)$/.test(V(e))}function J(e){return H(e).getComputedStyle(e)}function Te(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Y(e){if(V(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||he(e)&&e.host||U(e);return he(t)?t.host:t}function Ee(e){let t=Y(e);return q(t)?(e.ownerDocument||e).body:G(t)&&ge(t)?t:Ee(t)}function X(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ee(e),i=r===e.ownerDocument?.body,a=H(r);if(i){let e=De(a);return t.concat(a,a.visualViewport||[],ge(r)?r:[],e&&n?X(e):[])}else return t.concat(r,X(r,[],n))}function De(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oe(e){let t=J(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=G(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=m(n)!==a||m(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ke(e){return W(e)?e:e.contextElement}function Z(e){let t=ke(e);if(!G(t))return g(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Oe(t),o=(a?m(n.width):n.width)/r,s=(a?m(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ae=g(0);function je(e){let t=H(e);return!we()||!t.visualViewport?Ae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Me(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===H(e)}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ke(e),o=g(1);t&&(r?W(r)&&(o=Z(r)):o=Z(e));let s=Me(a,n,r)?je(a):g(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=H(a),t=W(r)?H(r):r,n=e,i=De(n);for(;i&&t!==n;){let e=Z(i),t=i.getBoundingClientRect(),r=J(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=H(i),i=De(n)}}return R({width:u,height:d,x:c,y:l})}function Ne(e,t){let n=Te(e).scrollLeft;return t?t.left+n:Q(U(e)).left+n}function Pe(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ne(e,n),y:n.top+t.scrollTop}}function Fe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=U(r),s=t?ve(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=g(1),u=g(0),d=G(r);if((d||!a)&&((V(r)!==`body`||ge(o))&&(c=Te(r)),d)){let e=Q(r);l=Z(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Pe(o,c):g(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ie(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Le(e){let t=Te(e),n=e.ownerDocument.body,r=p(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=p(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ne(e),o=-t.scrollTop;return J(n).direction===`rtl`&&(a+=p(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Re=25;function ze(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=H(e),a=U(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!we()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ne(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Re&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Be(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Z(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ve(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ze(e,n,t);else if(t===`document`)r=Le(U(e));else if(W(t))r=Be(t,n);else{let n=je(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return R(r)}function He(e,t){let n=t.get(e);if(n)return n;let r=X(e,[],!1).filter(e=>W(e)&&V(e)!==`body`),i=null,a=J(e).position===`fixed`,o=a?Y(e):e;for(;W(o)&&!q(o);){let e=J(o),t=Se(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Y(o)}return t.set(e,r),r}function Ue(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ve(t)?[]:He(t,this._c):[].concat(n),r],o=Ve(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ve(t,a[e],i);s=p(n.top,s),c=f(n.right,c),l=f(n.bottom,l),u=p(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function We(e){let{width:t,height:n}=Oe(e);return{width:t,height:n}}function Ge(e,t,n){let r=G(t),i=U(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=g(0);if((r||!a)&&((V(t)!==`body`||ge(i))&&(s=Te(t)),r)){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ne(i));let l=i&&!r&&!a?Pe(i,s):g(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ke(e){return J(e).position===`static`}function qe(e,t){if(!G(e)||J(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return U(e)===n&&(n=n.ownerDocument.body),n}function Je(e,t){let n=H(e);if(ve(e))return n;if(!G(e)){let t=Y(e);for(;t&&!q(t);){if(W(t)&&!Ke(t))return t;t=Y(t)}return n}let r=qe(e,t);for(;r&&_e(r)&&Ke(r);)r=qe(r,t);return r&&q(r)&&Ke(r)&&!Se(r)?n:r||Ce(e)||n}var Ye=async function(e){let t=this.getOffsetParent||Je,n=this.getDimensions,r=await n(e.floating);return{reference:Ge(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xe(e){return J(e).direction===`rtl`}var Ze={convertOffsetParentRelativeRectToViewportRelativeRect:Fe,getDocumentElement:U,getClippingRect:Ue,getOffsetParent:Je,getElementRects:Ye,getClientRects:Ie,getDimensions:We,getScale:Z,isElement:W,isRTL:Xe};function Qe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $e(e,t,n){let r=null,i,a=U(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:m,height:g}=l;if(n||t(),!m||!g)return;let _=h(d),v=h(a.clientWidth-(u+m)),y=h(a.clientHeight-(d+g)),b=h(u),x={rootMargin:-_+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:p(0,f(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(!Qe(l,e.getBoundingClientRect()))return s();if(n!==c){if(!S)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{r=new IntersectionObserver(C,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}let c=H(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function et(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ke(e),u=i||a?[...l?X(l):[],...t?X(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?$e(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!Qe(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var tt=le,nt=ue,rt=re,it=fe,at=oe,ot=ne,st=de,ct=(e,t,n)=>{let r=new Map,i=n??{},a={...Ze,...i.platform,_c:r};return te(e,t,{...i,platform:a})},lt=e(n(),1),ut=typeof document<`u`?u.useLayoutEffect:function(){};function dt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!dt(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!dt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ft(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pt(e,t){let n=ft(e);return Math.round(t*n)/n}function mt(e){let t=u.useRef(e);return ut(()=>{t.current=e}),t}function ht(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[d,f]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=u.useState(r);dt(p,r)||m(r);let[h,g]=u.useState(null),[_,v]=u.useState(null),y=u.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=u.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=u.useRef(null),w=u.useRef(null),T=u.useRef(d),E=c!=null,D=mt(c),O=mt(i),k=mt(l),A=u.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),ct(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!dt(T.current,t)&&(T.current=t,lt.flushSync(()=>{f(t)}))})},[p,t,n,O,k]);ut(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[l]);let j=u.useRef(!1);ut(()=>(j.current=!0,()=>{j.current=!1}),[]),ut(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=u.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=u.useMemo(()=>({reference:x,floating:S}),[x,S]),P=u.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=pt(N.floating,d.x),r=pt(N.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ft(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:A,refs:M,elements:N,floatingStyles:P}),[d,A,M,N,P])}var gt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ot({element:r.current,padding:i}).fn(n):r?ot({element:r,padding:i}).fn(n):{}}}},_t=(e,t)=>{let n=tt(e);return{name:n.name,fn:n.fn,options:[e,t]}},vt=(e,t)=>{let n=nt(e);return{name:n.name,fn:n.fn,options:[e,t]}},yt=(e,t)=>({fn:st(e).fn,options:[e,t]}),bt=(e,t)=>{let n=rt(e);return{name:n.name,fn:n.fn,options:[e,t]}},xt=(e,t)=>{let n=it(e);return{name:n.name,fn:n.fn,options:[e,t]}},St=(e,t)=>{let n=at(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ct=(e,t)=>{let n=gt(e);return{name:n.name,fn:n.fn,options:[e,t]}},$=r(),wt=`Arrow`,Tt=u.forwardRef((e,t)=>{let{children:n,width:r=10,height:a=5,...o}=e;return(0,$.jsx)(i.svg,{...o,ref:t,width:r,height:a,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,$.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Tt.displayName=wt;var Et=Tt;function Dt(e){let[t,n]=u.useState(void 0);return s(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Ot=`Popper`,[kt,At]=a(Ot),[jt,Mt]=kt(Ot),Nt=e=>{let{__scopePopper:t,children:n}=e,[r,i]=u.useState(null),[a,o]=u.useState(void 0);return(0,$.jsx)(jt,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Nt.displayName=Ot;var Pt=`PopperAnchor`,Ft=u.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...a}=e,o=Mt(Pt,n),s=u.useRef(null),l=o.onAnchorChange,d=c(t,u.useCallback(e=>{s.current=e,e&&l(e)},[l])),f=u.useRef(null);u.useEffect(()=>{if(!r)return;let e=f.current;f.current=r.current,e!==f.current&&l(f.current)});let p=o.placementState&&Gt(o.placementState),m=p?.[0],h=p?.[1];return r?null:(0,$.jsx)(i.div,{"data-radix-popper-side":m,"data-radix-popper-align":h,...a,ref:d})});Ft.displayName=Pt;var It=`PopperContent`,[Lt,Rt]=kt(It),zt=u.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:a=0,align:l=`center`,alignOffset:d=0,arrowPadding:f=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:g=`partial`,hideWhenDetached:_=!1,updatePositionStrategy:v=`optimized`,onPlaced:y,...b}=e,x=Mt(It,n),[S,C]=u.useState(null),w=c(t,C),[T,E]=u.useState(null),D=Dt(T),O=D?.width??0,k=D?.height??0,A=r+(l===`center`?``:`-`+l),j=typeof h==`number`?h:{top:0,right:0,bottom:0,left:0,...h},M=Array.isArray(m)?m:[m],N=M.length>0,P={padding:j,boundary:M.filter(Ut),altBoundary:N},{refs:F,floatingStyles:I,placement:L,isPositioned:R,middlewareData:z}=ht({strategy:`fixed`,placement:A,whileElementsMounted:(...e)=>et(...e,{animationFrame:v===`always`}),elements:{reference:x.anchor},middleware:[_t({mainAxis:a+k,alignmentAxis:d}),p&&vt({mainAxis:!0,crossAxis:!1,limiter:g===`partial`?yt():void 0,...P}),p&&bt({...P}),xt({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),T&&Ct({element:T,padding:f}),Wt({arrowWidth:O,arrowHeight:k}),_&&St({strategy:`referenceHidden`,...P,boundary:N?P.boundary:void 0})]}),B=x.setPlacementState;s(()=>(B(L),()=>{B(void 0)}),[L,B]);let[ee,te]=Gt(L),ne=o(y);s(()=>{R&&ne?.()},[R,ne]);let re=z.arrow?.x,ie=z.arrow?.y,ae=z.arrow?.centerOffset!==0,[oe,se]=u.useState();return s(()=>{S&&se(window.getComputedStyle(S).zIndex)},[S]),(0,$.jsx)(`div`,{ref:F.setFloating,"data-radix-popper-content-wrapper":``,style:{...I,transform:R?I.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(` `),...z.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,$.jsx)(Lt,{scope:n,placedSide:ee,placedAlign:te,onArrowChange:E,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,$.jsx)(i.div,{"data-side":ee,"data-align":te,...b,ref:w,style:{...b.style,animation:R?void 0:`none`}})})})});zt.displayName=It;var Bt=`PopperArrow`,Vt={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Ht=u.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Rt(Bt,n),a=Vt[i.placedSide];return(0,$.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,$.jsx)(Et,{...r,ref:t,style:{...r.style,display:`block`}})})});Ht.displayName=Bt;function Ut(e){return e!==null}var Wt=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Gt(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Gt(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Kt=Nt,qt=Ft,Jt=zt,Yt=Ht,Xt=`rounded-md bg-border/50 text-sm text-fg placeholder:text-fg-muted transition-colors hover:bg-border/80 focus:bg-border/80 disabled:cursor-not-allowed disabled:opacity-50`,Zt=`relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-fg outline-none transition-colors`,Qt=`data-[highlighted]:bg-action data-[highlighted]:text-action-ink data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,$t=`data-[selected=true]:bg-action data-[selected=true]:text-action-ink data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`;function en({className:e,type:t,...n}){return(0,$.jsx)(`input`,{type:t,className:l(`flex h-8 w-full px-2.5`,Xt,e),...n})}function tn({className:e,...t}){return(0,$.jsx)(`textarea`,{className:l(`flex min-h-16 w-full px-2.5 py-2`,Xt,e),...t})}export{Qt as a,Yt as c,At as d,Dt as f,$t as i,Jt as l,tn as n,Zt as o,Xt as r,qt as s,en as t,Kt as u};
@@ -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-ffCh33zF.js";import{a as r,i,n as a}from"./dist-CwwiP1WN.js";import{Ft as o,It as s,Lt as c,Pt as l,Ut as u,Vt as d,Wt as ee,zt as f}from"./protocol-support-BNUfFPAF.js";import{S as p,T as m,h,v as g,w as te}from"./dialog-yvLGI8FJ.js";import{c as ne,n as _}from"./x-DCpy1q13.js";import{a as v,o as y}from"./input-DDhYsCUG.js";import{t as b}from"./createLucideIcon-DyMAgLa3.js";import{r as re}from"./dist-gLP0NXk8.js";import{_ as ie,a as ae,c as oe,d as se,f as ce,g as le,h as ue,i as de,l as fe,m as pe,n as me,o as he,p as ge,r as _e,s as ve,t as ye,u as be}from"./dist-BYGE8AQe.js";var xe=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,d=i&&c===`forward`,f=o&&c===`backward`,p=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:u(t,n.data),hasPreviousPage:ee(t,n.data),isFetchNextPageError:l,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:p,isRefetchError:s&&!l&&!f,isRefetching:a&&!d&&!p}}};function Se(e,t){return c(e,xe,t)}var Ce=b(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),we=b(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Te=b(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),Ee=b(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),De=b(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Oe=b(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),x=50;function S(e){return e===void 0?``:`&root=${encodeURIComponent(e)}`}function C(e){return e?{placeholderData:e=>e}:{}}function ke(e,t,n){let r=e!==void 0;return s({queryKey:n===void 0?[`wt-tree`,e,t]:[`wt-tree`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/tree?path=${encodeURIComponent(t)}${S(n)}`),enabled:r,...C(r)})}function Ae(e,t,n){let r=n?.root;return s({queryKey:r===void 0?[`wt-file`,e,t]:[`wt-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file?path=${encodeURIComponent(t)}${S(r)}`),enabled:e!==void 0&&(n?.enabled??!0),...n?.live===!0?{refetchInterval:l(3e3),refetchOnWindowFocus:!0}:{}})}function je(e,t){let n=f();return o({mutationFn:({path:n,...r})=>i(`PUT`,`/api/worktrees/${e}/file?path=${encodeURIComponent(n)}${S(t)}`,r),onSuccess:(r,{path:i})=>{n.invalidateQueries({queryKey:t===void 0?[`wt-file`,e,i]:[`wt-file`,e,i,t]}),n.invalidateQueries({queryKey:[`wt-diff`,e]})}})}function Me(e,t){let n=t?.against??`base`,r=t?.area,a=t?.root,o=e!==void 0&&(t?.enabled??!0);return s({queryKey:a===void 0?[`wt-diff`,e,n,r]:[`wt-diff`,e,n,r,a],queryFn:()=>{let t=r===void 0?``:`&area=${r}`;return i(`GET`,`/api/worktrees/${e}/diff?against=${n}${t}${S(a)}`)},enabled:o,refetchInterval:l(1e4),refetchOnWindowFocus:!0,...C(o)})}function Ne(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return s({queryKey:n===void 0?[`git-repositories`,e]:[`git-repositories`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-repositories${w(n)}`),enabled:r,refetchInterval:l(1e4),refetchOnWindowFocus:!0,...C(r)})}function Pe(e,t,n){let r=n?.root,a=e!==void 0&&(n?.enabled??!0);return s({queryKey:[`git-original`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-original?path=${encodeURIComponent(t)}${S(r)}`),enabled:a,refetchInterval:l(1e4),refetchOnWindowFocus:!0})}function Fe(e,t,n){let r=n?.root;return s({queryKey:[`git-index-file`,e,t,r],queryFn:()=>i(`GET`,`/api/worktrees/${e}/index-file?path=${encodeURIComponent(t)}${S(r)}`),enabled:e!==void 0&&(n?.enabled??!0)})}function Ie(e,t){let n=f();return o({mutationFn:({action:n,...r})=>i(`POST`,`/api/worktrees/${e}/git-${n}${w(t)}`,r),onSuccess:()=>{n.invalidateQueries({queryKey:[`git-repositories`,e]}),n.invalidateQueries({queryKey:[`wt-git-status`,e]}),n.invalidateQueries({queryKey:[`wt-diff`,e]}),n.invalidateQueries({queryKey:[`wt-log`,e]}),n.invalidateQueries({queryKey:[`wt-show`,e]}),n.invalidateQueries({queryKey:[`git-original`,e]}),n.invalidateQueries({queryKey:[`git-index-file`,e]})}})}function Le(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return s({queryKey:n===void 0?[`wt-git-status`,e]:[`wt-git-status`,e,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/git-status${w(n)}`),enabled:r,refetchInterval:l(1e4),refetchOnWindowFocus:!0,...C(r)})}function w(e){return e===void 0?``:`?root=${encodeURIComponent(e)}`}function Re(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/create${w(r)}`,{path:t,kind:n})}function ze(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/rename${w(r)}`,{from:t,to:n})}function Be(e,t,n,r){return i(`POST`,`/api/worktrees/${e}/copy${w(r)}`,{from:t,to:n})}function Ve(e,t,n){return i(`POST`,`/api/worktrees/${e}/transfer${w(n)}`,t)}function He(e,t,n){return i(`POST`,`/api/worktrees/${e}/delete${w(n)}`,{path:t})}function Ue(e,t,n){let{query:r,regex:a,caseSensitive:o,wholeWord:c}=t;return s({queryKey:[`wt-search`,e,r,a,o,c,n],queryFn:()=>{let t=new URLSearchParams({q:r});return a&&t.set(`regex`,`1`),o&&t.set(`case`,`1`),c&&t.set(`word`,`1`),n!==void 0&&t.set(`root`,n),i(`GET`,`/api/worktrees/${e}/search?${t.toString()}`)},enabled:e!==void 0&&r.length>0,staleTime:2e3})}function We(e,t,n,r){let a=r?.root;return s({queryKey:[`wt-file-at`,e,t,n,a],queryFn:()=>i(`GET`,`/api/worktrees/${e}/file-at?ref=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}${S(a)}`),enabled:e!==void 0&&(r?.enabled??!0),staleTime:1/0})}function Ge(e,t){let n=t?.root,r=e!==void 0&&(t?.enabled??!0);return Se({queryKey:n===void 0?[`wt-log`,e]:[`wt-log`,e,n],queryFn:({pageParam:t})=>i(`GET`,`/api/worktrees/${e}/log?limit=${x}&skip=${t}${S(n)}`),initialPageParam:0,getNextPageParam:(e,t)=>e.has_more?t.length*x:void 0,enabled:r,...C(r)})}function Ke(e,t,n){return s({queryKey:n===void 0?[`wt-show`,e,t]:[`wt-show`,e,t,n],queryFn:()=>i(`GET`,`/api/worktrees/${e}/show/${t}${w(n)}`),enabled:e!==void 0&&t!==void 0,staleTime:1/0})}var qe=64*1024*1024;function Je(e,t){let n=[],r=[],i=0;for(let a of e)r.length>0&&i+a.size>t&&(n.push(r),r=[],i=0),r.push(a),i+=a.size;return r.length>0&&n.push(r),n}async function Ye(e,t,n,i){let a=[];for(let o of Je(n,qe)){let n=new FormData;for(let e of o)n.append(`files`,e,e.name);let s=await r(`POST`,`/api/worktrees/${e}/upload?dir=${encodeURIComponent(t)}${S(i)}`,{body:n});a.push(...(await s.json()).files)}return{files:a}}function Xe(e,t){if(!e)return t;let n=/filename\*=UTF-8''([^;]+)/i.exec(e);if(n?.[1])try{return decodeURIComponent(n[1])}catch{return t}return/filename="?([^"; ]+)"?/i.exec(e)?.[1]??t}async function Ze(e,t,n){let i=await r(`GET`,`/api/worktrees/${e}/download?path=${encodeURIComponent(t)}${S(n)}`),a=await i.blob(),o=t.split(`/`).filter(Boolean).pop()??`worktree`,s=Xe(i.headers.get(`content-disposition`),o),c=URL.createObjectURL(a);try{let e=document.createElement(`a`);e.href=c,e.download=s,document.body.appendChild(e),e.click(),e.remove()}finally{URL.revokeObjectURL(c)}}var T=e(t(),1),E=[],D=new Map,O=new Map,k=new Map;function A(e,t){let n=D.get(e)??E;t.length===0?D.delete(e):D.set(e,t);let r=new Set([...n.map(e=>j(e.source)),...t.map(e=>j(e.source))]);for(let e of r)tt(e)}function Qe(e){A(e,E)}function $e(e,t,n){let r=j({session:e,path:t,...n===void 0?{}:{root:n}});return(0,T.useSyncExternalStore)((0,T.useCallback)(e=>nt(r,e),[r]),()=>et({session:e,path:t,...n===void 0?{}:{root:n}}))}function et(e){return O.get(j(e))??E}function tt(e){let t=[...D.values()].flatMap(t=>t.filter(t=>j(t.source)===e));t.length===0?O.delete(e):O.set(e,t);for(let t of k.get(e)??[])t()}function nt(e,t){let n=k.get(e)??new Set;return n.add(t),k.set(e,n),()=>{n.delete(t),n.size===0&&k.delete(e)}}function j(e){return JSON.stringify([e.session,e.root??null,e.path])}var M=n();function N(e,t,n){let r=`${encodeURIComponent(e)}:${encodeURIComponent(t)}`;return n===void 0?r:`${r}:${encodeURIComponent(n)}`}var P=new Map;function rt(e,t,n){let r={save:t,...n?{target:n}:{}};return P.set(e,r),()=>{P.get(e)===r&&P.delete(e)}}function it(e){if(e===null)return!1;let t=P.get(e);return t?(t.save(),!0):!1}async function at(e,t){let n=N(e.session,e.path,e.root),r=[...P.entries()].flatMap(([r,i])=>{let a=i.target;if(!a||a.session!==e.session||a.root!==e.root)return[];let o=ot(a.path);return r!==n&&!t.has(o)?[]:[Promise.resolve(i.save())]});return(await Promise.all(r)).every(e=>e!==!1)}function ot(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<0?``:t.slice(n+1).toLowerCase()}var st=`UTC`;function ct(e){return new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`,timeZone:st})}var F=60,I=60*F,L=24*I,lt=7*L;function ut(e,t=new Date){let n=new Date(e).getTime(),r=Math.max(0,Math.floor((t.getTime()-n)/1e3));return r<F?`just now`:r<I?`${Math.floor(r/F)} m ago`:r<L?`${Math.floor(r/I)} h ago`:r<lt?`${Math.floor(r/L)} d ago`:ct(n)}function dt(e,t){return t?`added`:e}function ft(e){return i(`POST`,`/api/profiles/${e}/untitled`)}function R(e,t){return[`untitled`,e,t]}function pt(e,t){return s({queryKey:R(e,t),queryFn:()=>i(`GET`,`/api/profiles/${e}/untitled/${t}`),enabled:e!==null,staleTime:1/0})}function mt(e,t,n,r){e.setQueryData(R(t,n),e=>e===void 0?e:{...e,content:r})}function ht(e,t,n){return i(`PUT`,`/api/profiles/${e}/untitled/${t}`,{content:n})}function gt(e,t){return i(`DELETE`,`/api/profiles/${e}/untitled/${t}`)}var z=null,B=new Map;function _t(e){z=e}function vt(e){z?.(e)}function yt(e,t){B.set(e,t)}function bt(e){return B.get(e)}function xt(e){B.delete(e)}var V=(0,T.createContext)({openFile:()=>void 0,handler:null,setHandler:()=>void 0});function St({children:e}){let[t,n]=(0,T.useState)(null),r=(0,T.useCallback)(e=>n(()=>e),[]),i=(0,T.useCallback)((e,n,r,i)=>{if(!t){a(`The editor is not ready yet.`);return}t(e,n,r,i)},[t]),o=(0,T.useMemo)(()=>({openFile:i,handler:t,setHandler:r}),[i,t,r]);return(0,M.jsx)(V.Provider,{value:o,children:e})}function Ct(){let{openFile:e}=(0,T.useContext)(V);return{openFile:e}}function wt(e){let{setHandler:t}=(0,T.useContext)(V),n=(0,T.useRef)(e);n.current=e,(0,T.useEffect)(()=>(t((e,t,r,i)=>n.current(e,t,r,i)),()=>t(null)),[t])}var H=new Map;function Tt(e,t){let n=N(e.session,e.path,e.root),r=H.get(n)??new Set;return r.add(t),H.set(n,r),()=>{r.delete(t),r.size||H.delete(n)}}function Et(e){let t=H.get(N(e.session,e.path,e.root))?.values().next().value;return t?(t(),!0):!1}var U=`DropdownMenu`,[Dt,Ot]=te(U,[ie]),W=ie(),[kt,G]=Dt(U),K=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=W(t),l=T.useRef(null),[u,d]=h({prop:i,defaultProp:a??!1,onChange:o,caller:U});return(0,M.jsx)(kt,{scope:t,triggerId:g(),triggerRef:l,contentId:g(),open:u,onOpenChange:d,onOpenToggle:T.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,M.jsx)(ce,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};K.displayName=U;var q=`DropdownMenuTrigger`,J=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=G(q,n),o=W(n),s=ne(t,a.triggerRef);return(0,M.jsx)(ye,{asChild:!0,...o,children:(0,M.jsx)(p.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:m(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:m(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});J.displayName=q;var At=`DropdownMenuPortal`,Y=e=>{let{__scopeDropdownMenu:t,...n}=e,r=W(t);return(0,M.jsx)(fe,{...r,...n})};Y.displayName=At;var X=`DropdownMenuContent`,Z=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=G(X,n),a=W(n),o=T.useRef(!1);return(0,M.jsx)(de,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:m(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:m(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Z.displayName=X;var jt=`DropdownMenuGroup`,Mt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(ae,{...i,...r,ref:t})});Mt.displayName=jt;var Nt=`DropdownMenuLabel`,Pt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(oe,{...i,...r,ref:t})});Pt.displayName=Nt;var Ft=`DropdownMenuItem`,It=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(he,{...i,...r,ref:t})});It.displayName=Ft;var Lt=`DropdownMenuCheckboxItem`,Rt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(_e,{...i,...r,ref:t})});Rt.displayName=Lt;var zt=`DropdownMenuRadioGroup`,Bt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(be,{...i,...r,ref:t})});Bt.displayName=zt;var Vt=`DropdownMenuRadioItem`,Ht=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(se,{...i,...r,ref:t})});Ht.displayName=Vt;var Ut=`DropdownMenuItemIndicator`,Wt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(ve,{...i,...r,ref:t})});Wt.displayName=Ut;var Gt=`DropdownMenuSeparator`,Kt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(ge,{...i,...r,ref:t})});Kt.displayName=Gt;var qt=`DropdownMenuArrow`,Jt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(me,{...i,...r,ref:t})});Jt.displayName=qt;var Yt=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=W(t),[s,c]=h({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,M.jsx)(pe,{...o,open:s,onOpenChange:c,children:n})},Xt=`DropdownMenuSubTrigger`,Zt=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(le,{...i,...r,ref:t})});Zt.displayName=Xt;var Qt=`DropdownMenuSubContent`,$t=T.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=W(n);return(0,M.jsx)(ue,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});$t.displayName=Qt;var en=K,tn=J,nn=Y,rn=Z,an=It,on=Kt,sn=Yt,cn=Zt,ln=$t,un=en,dn=tn,fn=sn;function pn({className:e,sideOffset:t=4,...n}){return(0,M.jsx)(nn,{children:(0,M.jsx)(rn,{sideOffset:t,className:_(`z-50 min-w-36 overflow-hidden rounded-md bg-elevated p-1 shadow-xl`,e),...n})})}function mn({className:e,...t}){return(0,M.jsx)(an,{className:_(y,v,`[&_svg]:size-3.5`,e),...t})}function hn({className:e,children:t,...n}){return(0,M.jsxs)(cn,{className:_(y,v,`data-[state=open]:bg-action data-[state=open]:text-action-ink [&_svg]:size-3.5`,e),...n,children:[t,(0,M.jsx)(re,{className:`ml-auto`})]})}function gn({className:e,...t}){return(0,M.jsx)(nn,{children:(0,M.jsx)(ln,{className:_(`z-50 min-w-36 overflow-hidden rounded-md bg-elevated p-1 shadow-xl`,e),...t})})}function _n({className:e,...t}){return(0,M.jsx)(on,{className:_(`-mx-1 my-1 h-px bg-border`,e),...t})}var Q=new Map,$=new Map;function vn(e,t,n){let r=xn(e,t,n);Q.set(r,(Q.get(r)??0)+1);for(let e of $.get(r)??[])e()}function yn(e,t,n){let r=xn(e,t,n),i=(0,T.useCallback)(e=>bn(r,e),[r]),a=(0,T.useCallback)(()=>Q.get(r)??0,[r]);return(0,T.useSyncExternalStore)(i,a,a)}function bn(e,t){let n=$.get(e);return n||(n=new Set,$.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&$.delete(e)}}function xn(e,t,n){return JSON.stringify([e,n??null,t])}export{Ge as $,at as A,S as B,ht as C,ut as D,dt as E,Be as F,Ie as G,Ye as H,Re as I,Fe as J,Pe as K,He as L,Qe as M,A as N,rt as O,$e as P,Le as Q,Ze as R,gt as S,pt as T,Ke as U,Ve as V,We as W,Me as X,je as Y,Ae as Z,yt as _,mn as a,Te as at,bt as b,gn as c,Tt as d,Ue as et,Et as f,xt as g,wt as h,pn as i,Ee as it,N as j,it as k,hn as l,Ct as m,yn as n,Oe as nt,_n as o,we as ot,St as p,Ne as q,un as r,De as rt,fn as s,Ce as st,vn as t,ke as tt,dn as u,vt as v,mt as w,ft as x,_t as y,ze as z};
@@ -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-ffCh33zF.js";import{z as r}from"./auth-ngM0Ffss.js";import{a as i,d as a,o,t as s}from"./LazyTerminal-BRPy9Nm5.js";import{o as c}from"./dist-CwwiP1WN.js";import{Ft as l,It as u,in as d,zt as ee}from"./protocol-support-BNUfFPAF.js";import{a as te,n as ne,o as re,r as ie,t as ae}from"./dialog-yvLGI8FJ.js";import{n as oe}from"./x-DCpy1q13.js";import{t as f}from"./createLucideIcon-DyMAgLa3.js";import{l as se,o as ce,s as le,u as ue}from"./switch-B1uGC2PW.js";function de(e,t){return`[${a(t)}] ${e}`.slice(0,160)}var fe=f(`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`}]]),pe=f(`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`}]]),me=f(`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`}]]),he=f(`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`}]]),ge=f(`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`}]]),_e=f(`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`}]]),ve=f(`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`}]]),p=f(`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`}]]),m=f(`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`}]]),h=f(`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`}]]),g=f(`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`}]]),_=f(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),v=f(`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`}]]),y=f(`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`}]]),b=f(`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`}]]),x=f(`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`}]]),S=f(`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`}]]),C=f(`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`}]]),w=f(`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=f(`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`}]]),E=f(`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`}]]),D=f(`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`}]]),O=f(`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`}]]),k=f(`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`}]]),A=f(`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`}]]),j=f(`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`}]]),M=f(`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`}]]),N=f(`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`}]]),P=f(`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`}]]),F=f(`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`}]]),ye=f(`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`}]]),be=f(`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`}]]),xe=f(`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`}]]),Se=f(`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`}]]),I=f(`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`}]]),Ce=f(`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`}]]),we=f(`mountain`,[[`path`,{d:`m8 3 4 8 5-5 5 15H2L8 3z`,key:`otkl63`}]]),Te=f(`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`}]]),Ee=f(`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`}]]),De=f(`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`}]]),Oe=f(`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`}]]),ke=f(`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`}]]),Ae=f(`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`}]]),je=f(`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`}]]),Me=f(`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`}]]),Ne=f(`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`}]]),Pe=f(`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`}]]),Fe=f(`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`}]]),Ie=f(`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`}]]),Le=f(`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`}]]),Re=f(`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`}]]),ze=f(`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`}]]),L=f(`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`}]]),Be=f(`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`}]]),Ve=f(`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`}]]),He=f(`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`}]]),Ue=f(`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`}]]),We=f(`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`}]]),Ge=f(`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`}]]),Ke=f(`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`}]]),R=[{name:`mountain`,Icon:we},{name:`mountain-snow`,Icon:Ce},{name:`tree-pine`,Icon:He},{name:`trees`,Icon:Ue},{name:`leaf`,Icon:xe},{name:`flower`,Icon:D},{name:`flower-2`,Icon:E},{name:`sprout`,Icon:Re},{name:`sun`,Icon:L},{name:`moon`,Icon:I},{name:`star`,Icon:ze},{name:`cloud`,Icon:_},{name:`snowflake`,Icon:Ie},{name:`zap`,Icon:ce},{name:`flame`,Icon:T},{name:`droplet`,Icon:S},{name:`rainbow`,Icon:je},{name:`wind`,Icon:Ke},{name:`bird`,Icon:me},{name:`fish`,Icon:w},{name:`cat`,Icon:g},{name:`dog`,Icon:x},{name:`rabbit`,Icon:Ae},{name:`turtle`,Icon:Ge},{name:`bug`,Icon:ve},{name:`snail`,Icon:Fe},{name:`paw-print`,Icon:Ee},{name:`feather`,Icon:C},{name:`rocket`,Icon:Me},{name:`anchor`,Icon:fe},{name:`compass`,Icon:y},{name:`map`,Icon:Se},{name:`tent`,Icon:Be},{name:`camera`,Icon:m},{name:`music`,Icon:Te},{name:`headphones`,Icon:P},{name:`palette`,Icon:se},{name:`brush`,Icon:_e},{name:`pencil`,Icon:o},{name:`book`,Icon:ge},{name:`book-open`,Icon:he},{name:`coffee`,Icon:v},{name:`pizza`,Icon:De},{name:`ice-cream-cone`,Icon:ye},{name:`cake`,Icon:p},{name:`gift`,Icon:j},{name:`gamepad-2`,Icon:O},{name:`puzzle`,Icon:ke},{name:`bike`,Icon:pe},{name:`car`,Icon:h},{name:`plane`,Icon:Oe},{name:`ship`,Icon:Pe},{name:`sailboat`,Icon:Ne},{name:`train-front`,Icon:Ve},{name:`heart`,Icon:F},{name:`sparkles`,Icon:Le},{name:`crown`,Icon:b},{name:`gem`,Icon:k},{name:`trophy`,Icon:We},{name:`ghost`,Icon:A},{name:`bot`,Icon:ue},{name:`globe`,Icon:M},{name:`guitar`,Icon:N}],qe=Object.fromEntries(R.map(e=>[e.name,e.Icon])),z=n();function Je({icon:e,colour:t,className:n}){let r=oe(`size-4 shrink-0`,t?i(t):`text-fg-muted`,n);return(0,z.jsx)(e&&qe[e]||le,{className:r})}var B=e(t(),1);function Ye({stream:e,label:t,hint:n,onClose:r}){let[i,a]=(0,B.useState)(null);return(0,z.jsx)(ae,{open:!0,onOpenChange:e=>!e&&r(),children:(0,z.jsxs)(ne,{className:`h-[85vh] max-w-[calc(100vw-4rem)]`,children:[(0,z.jsxs)(te,{children:[(0,z.jsxs)(re,{children:[t,` — login`]}),(0,z.jsx)(ie,{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,z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-md bg-ground p-1`,children:(0,z.jsx)(s,{stream:e,onExit:e=>e===0?r():a(e)})})]})})}var V=e=>e&&typeof e==`object`?e:{},H=[{id:`appearance`,label:`Appearance`,fields:[{key:`theme`,store:`theme`},{key:`cursorPackage`,store:`client`},{key:`uiFontSize`,store:`client`},{key:`terminalFontSize`,store:`client`},{key:`editorFontSize`,store:`client`},{key:`density`,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}=V(e);return{desktop:t,sound:n,...r===void 0?{}:{when_focused:r}}},mergeInto:(e,t)=>({...V(t),...V(e)})}]},{id:`scratchpad`,label:`Scratchpad (profile-wide entries)`,fields:[{key:`entries`,store:`scratchpad`}]}];function U(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 W(e){return JSON.stringify([e.title??``,e.body,e.tags,e.agent_type??``])}function Xe(e,t){if(!Array.isArray(e))return[];let n=new Set(U(t).map(W)),r=new Set,i=[];for(let t of e){let e=V(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=W(a);n.has(o)||r.has(o)||(r.add(o),i.push(a))}return i}function Ze(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 U(t.scratchpad)}}function Qe(e,t){let n={};for(let r of H){if(!e.includes(r.id))continue;let i={};for(let e of r.fields){let n=Ze(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 $e(e,t,n,r){if(!e||typeof e!=`object`)return[];let i=e,a={},o={},s={},c=[];for(let e of H){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=Xe(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 G={version:1,profiles:{}};function et(e,t){return e.profiles[t]??{enabled:!0,groups:H.map(e=>e.id),doc:{},updatedAt:new Date(0).toISOString()}}async function tt(){try{let e=await fetch(`/cockpit/local-sync`,{headers:c(),cache:`no-store`});return e.ok?{available:!0,file:await e.json()}:{available:!1,file:G}}catch{return{available:!1,file:G}}}function nt(){return u({queryKey:[`local-sync`],queryFn:tt,staleTime:5e3,refetchOnWindowFocus:!0,retry:!1})}function rt(){let e=ee();return l({mutationFn:async e=>{let t=await fetch(`/cockpit/local-sync`,{method:`PUT`,headers:{...c(),"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 it(){return d()?.showNotification?`unverified`:typeof Notification>`u`?`unsupported`:Notification.permission}async function at(e,t){let n;try{return await Promise.race([e,new Promise((e,r)=>{n=setTimeout(()=>r(Error(t)),1e4)})])}finally{clearTimeout(n)}}var K;async function ot(){return!(`serviceWorker`in navigator)||!window.isSecureContext?null:(K||=st().catch(e=>{throw K=void 0,e}),K)}async function st(){let e=await at(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 q(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 J={state:`unverified`,message:null},Y=new Set,X=new Map,Z=!1,ct=!1;function Q(e,t){X.set(e,t),X.size>64&&X.delete(X.keys().next().value)}function $(e){J=e;for(let e of Y)e();return e}function lt(){return(0,B.useSyncExternalStore)(e=>(Y.add(e),()=>{Y.delete(e)}),()=>J)}async function ut(){let e=d();if(e?.notificationStatus)try{$(r.parse(await e.notificationStatus()))}catch{$({state:`failed`,message:`Could not read desktop notification delivery status.`})}}async function dt(e,t,n){try{let i=d();if(i?.showNotification){!Z&&i.onNotificationClick&&(i.onNotificationClick((e,t)=>{t||X.get(e)?.(),X.delete(e)}),Z=!0),Q(e.id,t);let{target:a,...o}=e;return $(r.parse(await i.showNotification({...o,...i.notificationTargets?{target:a}:{},...i.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 a=n?{...e,title:de(e.title,n.project)}:e,o=await ot();return o?(ct||=(navigator.serviceWorker.addEventListener(`message`,e=>{e.data?.t!==`notification-click`||typeof e.data.id!=`string`||(e.data.target||X.get(e.data.id)?.(),X.delete(e.data.id))}),!0),Q(e.id,t),await q(o,a),$({state:`shown`,message:null})):await new Promise(n=>{let r=new Notification(a.title,{body:e.body,tag:e.id,silent:!0}),i=setTimeout(()=>n($({state:`unverified`,message:`Delivery has not been confirmed. Check system notification settings.`})),5e3);r.onshow=()=>{clearTimeout(i),n($({state:`shown`,message:null}))},r.onerror=()=>{clearTimeout(i),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{et as a,H as c,Ye as d,Je as f,be as g,I as h,it as i,$e as l,L as m,ut as n,nt as o,R as p,lt as r,rt as s,dt as t,Qe as u};
@@ -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-ffCh33zF.js";import{i as r}from"./auth-ngM0Ffss.js";import{i}from"./dist-CwwiP1WN.js";var a=n(),o=e(t(),1);function s(){return window.puddleDesktop}function c(){let[e,t]=(0,o.useState)({fullScreen:!1,animate:!1});return(0,o.useEffect)(()=>{let e=s();if(!e)return;let n=!0;e.isFullScreen?.()?.then(e=>{n&&t({fullScreen:e,animate:!1})});let r=e.onFullScreenChange?.(e=>t({fullScreen:e,animate:!0}));return()=>{n=!1,r?.()}},[]),e}var l=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},u=new class extends l{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},d={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},f=new class{#e=d;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function p(e){setTimeout(e,0)}var m=typeof window>`u`||`Deno`in globalThis;function h(){}function g(e,t){return typeof e==`function`?e(t):e}function _(e){return typeof e==`number`&&e>=0&&e!==1/0}function v(e,t){return Math.max(e+(t||0)-Date.now(),0)}function y(e,t){return typeof e==`function`?e(t):e}function b(e,t){return typeof e==`function`?e(t):e}function x(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ee(o,t.options))return!1}else if(!w(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function S(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(C(t.options.mutationKey)!==C(a))return!1}else if(!w(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ee(e,t){return(t?.queryKeyHashFn||C)(e)}function C(e){return JSON.stringify(e,(e,t)=>D(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function w(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>w(e[n],t[n])):!1}var te=Object.prototype.hasOwnProperty;function T(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ne(e)&&ne(t);if(!r&&!(D(e)&&D(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:te.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=T(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function E(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ne(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function D(e){if(!re(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!re(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function re(e){return Object.prototype.toString.call(e)===`[object Object]`}function ie(e){return new Promise(t=>{f.setTimeout(t,e)})}function O(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:T(e,t)}function ae(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function oe(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var k=Symbol();function se(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===k?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function A(e,t){return typeof e==`function`?e(...t):!!e}function ce(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var j=(()=>{let e=()=>m;return{isServer(){return e()},setIsServer(t){e=t}}})();function M(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var le=p;function ue(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=le,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var N=ue(),P=new class extends l{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function de(e){return Math.min(1e3*2**e,3e4)}function fe(e){return(e??`online`)!==`online`||P.isOnline()}var F=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function pe(e){let t=!1,n=0,r,i=M(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new F(t);p(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>u.isFocused()&&(e.networkMode===`always`||P.isOnline())&&e.canRun(),d=()=>fe(e.networkMode)&&e.canRun(),f=e=>{a()||(r?.(),i.resolve(e))},p=e=>{a()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),h=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(a())return;let i=e.retry??(j.isServer()?0:3),o=e.retryDelay??de,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),ie(s).then(()=>l()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:d,start:()=>(d()?h():m().then(h),i)}}var I=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_(this.gcTime)&&(this.#e=f.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(j.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(f.clearTimeout(this.#e),this.#e=void 0)}};function me(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ce(e,()=>t.signal,()=>n=!0)},u=se(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?oe:ae;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?he:L,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:L(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function L(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function he(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ge(e,t){return t?L(e,t)!=null:!1}function _e(e,t){return!t||!e.getPreviousPageParam?!1:he(e,t)!=null}var ve=class extends I{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=xe(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=xe(this.options);e.data!==void 0&&(this.setState(be(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=O(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(h).catch(h):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>b(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===k||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>y(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!v(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=se(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?me(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=pe({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof F&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof F){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ye(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...be(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),N.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ye(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fe(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function be(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function xe(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Se=class extends l{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=M(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),we(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return R(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return R(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof b(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!E(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Te(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||b(this.options.enabled,this.#t)!==b(t.enabled,this.#t)||y(this.options.staleTime,this.#t)!==y(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||b(this.options.enabled,this.#t)!==b(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ee(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(h)),t}#g(){this.#b();let e=y(this.options.staleTime,this.#t);if(j.isServer()||this.#r.isStale||!_(e))return;let t=v(this.#r.dataUpdatedAt,e)+1;this.#d=f.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(j.isServer()||b(this.options.enabled,this.#t)===!1||!_(this.#p)||this.#p===0)&&(this.#f=f.setInterval(()=>{(this.options.refetchIntervalInBackground||u.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(f.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(f.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&we(e,t),o=i&&Te(e,n,t,r);(a||o)&&(l={...l,...ye(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=O(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=O(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&x,isStale:z(e,t),refetch:this.refetch,promise:this.#o,isEnabled:b(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{let e=this.#o=S.promise=M();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!E(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){N.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Ce(e,t){return b(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&b(t.retryOnMount,e)===!1)}function we(e,t){return Ce(e,t)||e.state.data!==void 0&&R(e,t,t.refetchOnMount)}function R(e,t,n){if(b(t.enabled,e)!==!1&&y(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&z(e,t)}return!1}function Te(e,t,n,r){return(e!==t||b(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&z(e,n)}function z(e,t){return b(t.enabled,e)!==!1&&e.isStaleByTime(y(t.staleTime,e))}function Ee(e,t){return!E(e.getCurrentResult(),t)}var De=class extends I{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||B(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=pe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),N.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function B(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Oe=class extends l{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),E(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&C(t.mutationKey)!==C(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??B();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){N.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},V=o.createContext(void 0),H=e=>{let t=o.useContext(V);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ke=({client:e,children:t})=>(o.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,a.jsx)(V.Provider,{value:e,children:t})),Ae=o.createContext(!1),je=()=>o.useContext(Ae);Ae.Provider;function Me(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ne=o.createContext(Me()),Pe=()=>o.useContext(Ne),Fe=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?A(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Ie=e=>{o.useEffect(()=>{e.clearReset()},[e])},Le=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||A(n,[e.error,r])),Re=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},ze=(e,t)=>e.isLoading&&e.isFetching&&!t,Be=(e,t)=>e?.suspense&&t.isPending,Ve=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function He(e,t,n){let r=je(),i=Pe(),a=H(n),s=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(s);let c=a.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=r?`isRestoring`:l?`optimistic`:void 0,Re(s),Fe(s,i,c),Ie(i);let u=!a.getQueryCache().get(s.queryHash),[d]=o.useState(()=>new t(a,s)),f=d.getOptimisticResult(s),p=!r&&l;if(o.useSyncExternalStore(o.useCallback(e=>{let t=p?d.subscribe(N.batchCalls(e)):h;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),o.useEffect(()=>{d.setOptions(s)},[s,d]),Be(s,f))throw Ve(s,d,i);if(Le({result:f,errorResetBoundary:i,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(s,f),s.experimental_prefetchInRender&&!j.isServer()&&ze(f,r)&&(u?Ve(s,d,i):c?.promise)?.catch(h).finally(()=>{d.updateResult()}),s.notifyOnChangeProps?f:d.trackResult(f)}function U(e,t){return He(e,Se,t)}function W(e,t){let n=H(t),[r]=o.useState(()=>new Oe(n,e));o.useEffect(()=>{r.setOptions(e)},[r,e]);let i=o.useSyncExternalStore(o.useCallback(e=>r.subscribe(N.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=o.useCallback((e,t)=>{r.mutate(e,t).catch(h)},[r]);if(i.error&&A(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Ue=12,G=typeof document<`u`?document.hasFocus():!0;typeof window<`u`&&(window.addEventListener(`focus`,()=>{G=!0}),window.addEventListener(`blur`,()=>{G=!1}),u.setEventListener(e=>{let t=()=>e(void 0);return window.addEventListener(`visibilitychange`,t,!1),window.addEventListener(`focus`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t),window.removeEventListener(`focus`,t)}}));function K(e){return()=>G?e:e*Ue}function We(){return U({queryKey:[`profiles`],queryFn:()=>i(`GET`,`/api/profiles`)})}function Ge(e){return U({queryKey:[`profile-settings`,e],queryFn:()=>i(`GET`,`/api/profiles/${e}/settings`),enabled:e!==void 0})}function Ke(e){return U({queryKey:[`accounts`,e],queryFn:()=>i(`GET`,`/api/accounts?profile=${e}`),enabled:e!==void 0})}function qe(e){return U({queryKey:[`account-usage`,e],queryFn:()=>i(`GET`,`/api/accounts/${e}/usage`),enabled:e!==void 0,staleTime:15e3})}function Je(){return U({queryKey:[`repos`],queryFn:()=>i(`GET`,`/api/repos`)})}function Ye(e,t=!0){return U({queryKey:[`projects`,e??`all`],queryFn:()=>i(`GET`,e===void 0?`/api/projects`:`/api/projects?profile=${e}`),enabled:t})}function Xe(e){return U({queryKey:[`project`,e],queryFn:()=>i(`GET`,`/api/projects/${e}`),enabled:e!==void 0,placeholderData:e=>e})}function Ze(e){return i(`POST`,`/api/projects/${e}/conversations/refresh`)}function Qe(e){return U({queryKey:[`sessions`,e],queryFn:()=>i(`GET`,`/api/sessions?project=${e}`),enabled:e!==void 0})}var $e={queryKey:[`sessions`,`all`],queryFn:()=>i(`GET`,`/api/sessions`)};function et(e=!0){return U({...$e,enabled:e})}function tt(e){return e.fetchQuery($e)}function nt(){return U({queryKey:[`config`],queryFn:()=>i(`GET`,`/api/config`)})}function rt(e){return U({queryKey:[`repo-branches`,e],queryFn:()=>i(`GET`,`/api/repos/${e}/branches`),enabled:e!==void 0,staleTime:3e4})}function it(e,t=1e4){return U({queryKey:[`repo-worktrees`,e],queryFn:()=>i(`GET`,`/api/repos/${e}/worktrees`),enabled:e!==void 0,staleTime:t})}function at(e,t){let n=H();return W({mutationFn:t=>i(`DELETE`,`/api/repos/${e}/worktrees?path=${encodeURIComponent(t)}`),onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function ot(e,t){let n=H();return W({mutationFn:({name:t,confirm:n})=>{let r=new URLSearchParams({name:t});return n&&r.set(`confirm`,`1`),i(`DELETE`,`/api/repos/${e}/branches?${r.toString()}`)},onSuccess:r=>{n.setQueryData([`repo-worktrees`,e],r),n.invalidateQueries({queryKey:[`project`,t]})}})}function st(e){return U({queryKey:[`fs-dirs`,e],queryFn:()=>i(`GET`,`/api/fs/dirs?prefix=${encodeURIComponent(e)}`),enabled:e.startsWith(`/`)||e.startsWith(`~`),placeholderData:e=>e,staleTime:1e4})}function ct(){return U({queryKey:[`version`],queryFn:()=>i(`GET`,`/api/version`),staleTime:1/0})}function lt(){return U({queryKey:[`host`],queryFn:()=>i(`GET`,`/api/host`),staleTime:1/0})}function ut(e){return e?e.displayName||e.hostname:void 0}function dt(){return U({queryKey:[`agents`],queryFn:()=>i(`GET`,`/api/agents`),staleTime:3e4,refetchOnWindowFocus:!0})}function ft(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/profiles`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function pt(e){let t=H();return W({mutationFn:t=>i(`PATCH`,`/api/profiles/${e}/settings`,t),onSuccess:n=>t.setQueryData([`profile-settings`,e],n)})}function mt(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/profiles/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`profiles`]})})}function ht(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/accounts/${e}`,t),onSuccess:t=>{e.invalidateQueries({queryKey:[`accounts`,t.profile_id]}),e.invalidateQueries({queryKey:[`account-usage`,t.id]})}})}function gt(){let e=H();return W({mutationFn:e=>i(`DELETE`,`/api/profiles/${e}`),onSuccess:()=>e.clear()})}function _t(){let e=H();return W({mutationFn:e=>i(`DELETE`,`/api/accounts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`accounts`]})})}function vt(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/accounts`,e),onSuccess:t=>void e.invalidateQueries({queryKey:[`accounts`,t.profile_id]})})}function yt(){return W({mutationFn:e=>i(`POST`,`/api/accounts/${e}/login`)})}function bt(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/repos`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function xt(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/repos/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function St(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/repos/${e}/fetch`),onSuccess:()=>void e.invalidateQueries({queryKey:[`repos`]})})}function Ct(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/projects`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`projects`]})})}function wt(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/projects/${e}`,t),onSuccess:t=>{e.setQueryData([`project`,t.id],e=>e&&{...e,project:t}),e.invalidateQueries({queryKey:[`projects`]})}})}function Tt(e,t){return U({queryKey:[`scratchpad`,e,t??`none`],queryFn:()=>i(`GET`,`/api/scratchpad?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function Et(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/scratchpad`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Dt(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/scratchpad/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function Ot(){let e=H();return W({mutationFn:e=>i(`DELETE`,`/api/scratchpad/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`scratchpad`]})})}function kt(e,t){return U({queryKey:[`layouts`,e,t??`none`],queryFn:()=>i(`GET`,`/api/layouts?profile=${e}${t?`&project=${t}`:``}`),enabled:e!==void 0})}function At(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/layouts`,e),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function jt(){let e=H();return W({mutationFn:({id:e,...t})=>i(`PATCH`,`/api/layouts/${e}`,t),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function Mt(){let e=H();return W({mutationFn:e=>i(`DELETE`,`/api/layouts/${e}`),onSuccess:()=>void e.invalidateQueries({queryKey:[`layouts`]})})}function q(e,t){e.invalidateQueries({queryKey:[`sessions`]}),e.invalidateQueries({queryKey:[`project`,t.project_id]})}function Nt(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/sessions`,e),onSuccess:t=>q(e,t)})}function Pt(e){let t=H();return W({mutationFn:t=>i(`POST`,`/api/sessions/${t}/${e}`),onSuccess:e=>q(t,e)})}function Ft(){let e=H();return W({mutationFn:({sessionId:e,accountId:t})=>i(`POST`,`/api/sessions/${e}/migrate`,{account_id:t}),onSuccess:t=>q(e,t)})}function It(){let e=H();return W({mutationFn:({sessionId:e,accountId:t})=>i(`POST`,`/api/sessions/${e}/handoff`,{account_id:t}),onSuccess:(t,{sessionId:n})=>{q(e,t),e.invalidateQueries({queryKey:[`session`,n]})}})}function Lt(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/sessions/${e}/archive`),onSuccess:t=>q(e,t)})}function Rt(){let e=H();return W({mutationFn:e=>i(`POST`,`/api/sessions/${e}/unarchive`),onSuccess:t=>q(e,t)})}function zt(){let e=H();return W({mutationFn:({sessionId:e,title:t})=>i(`PATCH`,`/api/sessions/${e}`,{title:t}),onSuccess:t=>q(e,t)})}function Bt(){let e=H();return W({mutationFn:e=>i(`PATCH`,`/api/config`,e),onSuccess:(t,n)=>{e.setQueryData([`config`],t),`displayName`in n&&e.invalidateQueries({queryKey:[`host`]})}})}async function Vt(e){try{return await i(`GET`,`/api/profiles/${e}/state`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`no_state`)return null;throw e}}function Ht(e,t){return i(`PUT`,`/api/profiles/${e}/state`,{ui_state:t})}function Ut(e,t){return U({queryKey:[`ports`,e],queryFn:()=>i(`GET`,`/api/sessions/${e}/ports`),enabled:e!==void 0&&t,refetchInterval:K(5e3),refetchIntervalInBackground:!1})}function Wt(e,t){return U({queryKey:[`session-env`,e],queryFn:()=>i(`GET`,`/api/sessions/${e}/env`),enabled:e!==void 0&&t,refetchInterval:K(5e3),refetchIntervalInBackground:!1})}function Gt(){let e=H();return W({mutationFn:e=>i(`DELETE`,`/api/sessions/${e}/env`),onSuccess:(t,n)=>{e.setQueryData([`session-env`,n],{vars:[]})}})}var J=r(`puddle.profile-id`);function Kt(){let e=(0,o.useSyncExternalStore)(J.subscribe,J.get);return e!==null&&/^[0-9a-f]{10}$/.test(e)?e:null}function qt(e){window.location.pathname!==`/`&&window.history.replaceState(null,``,`/`),J.set(e)}var Jt=[`Layout & tabs`,`Editor`,`Left sidebar`,`Right sidebar`],Y=[{id:`palette.toggle`,label:`Command palette`,group:`Layout & tabs`,defaultBinding:`meta+KeyK`},{id:`tab.close`,label:`Close current tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyW`,desktopBinding:`meta+KeyW`},{id:`tab.reopen`,label:`Reopen last closed tab`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyT`,desktopBinding:`shift+meta+KeyT`},{id:`tab.newUntitled`,label:`New untitled file`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+KeyN`,desktopBinding:`meta+KeyN`},{id:`tab.next`,label:`Next tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketRight`,desktopBinding:`ctrl+Tab`},{id:`tab.prev`,label:`Previous tab in pane`,group:`Layout & tabs`,defaultBinding:`ctrl+alt+BracketLeft`,desktopBinding:`ctrl+shift+Tab`},{id:`window.close`,label:`Close window`,group:`Layout & tabs`,defaultBinding:`meta+KeyW`,desktopBinding:`shift+meta+KeyW`},{id:`sidebar.left`,label:`Toggle left sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Comma`,desktopBinding:`meta+KeyB`},{id:`sidebar.right`,label:`Toggle right sidebar`,group:`Layout & tabs`,defaultBinding:`alt+meta+Period`,desktopBinding:`shift+meta+KeyB`},{id:`editor.save`,label:`Save`,group:`Editor`,defaultBinding:`meta+KeyS`,editor:!0},{id:`editor.wordWrap`,label:`Toggle word wrap`,group:`Editor`,defaultBinding:`alt+KeyZ`,editor:!0},{id:`nav.files`,label:`Open Files`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyE`},{id:`nav.search`,label:`Open Search`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyF`},{id:`nav.changes`,label:`Open Changes`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyV`},{id:`nav.worktrees`,label:`Open Worktrees`,group:`Left sidebar`,defaultBinding:`alt+meta+KeyB`},{id:`session.newAgent`,label:`New agent`,group:`Right sidebar`,defaultBinding:`ctrl+alt+Backquote`,desktopBinding:`meta+KeyT`},{id:`session.newTerminal`,label:`New terminal`,group:`Right sidebar`,defaultBinding:`ctrl+Backquote`},{id:`scratchpad.toggle`,label:`Toggle Scratchpad`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyS`},{id:`layouts.toggle`,label:`Toggle Layouts`,group:`Right sidebar`,defaultBinding:`alt+meta+KeyL`}],Yt=new Map(Y.map(e=>[e.id,e])),Xt=typeof window<`u`&&s()!==void 0;function Zt(e,t=Xt){return t&&e.desktopBinding?e.desktopBinding:e.defaultBinding}function Qt(e){let t=e.code;if(!t||/^(Control|Alt|Shift|Meta)(Left|Right)$/.test(t))return null;let n=[];return e.ctrlKey&&n.push(`ctrl`),e.altKey&&n.push(`alt`),e.shiftKey&&n.push(`shift`),e.metaKey&&n.push(`meta`),n.length===0?null:(n.push(t),n.join(`+`))}var $t={ctrl:`⌃`,alt:`⌥`,shift:`⇧`,meta:`⌘`},en={Comma:`,`,Period:`.`,Backquote:"`",Slash:`/`,Backslash:`\\`,Minus:`-`,Equal:`=`,Space:`␣`,Enter:`↵`,Escape:`Esc`,Tab:`⇥`,BracketLeft:`[`,BracketRight:`]`};function tn(e){return e.startsWith(`Key`)?e.slice(3):e.startsWith(`Digit`)?e.slice(5):en[e]??e}function nn(e){if(!e)return`—`;let t=e.split(`+`),n=t.pop()??``;return t.map(e=>$t[e]??e).join(``)+tn(n)}var X=new Map;function rn(e,t){return X.set(e,t),()=>{X.get(e)===t&&X.delete(e)}}var an=e=>X.get(e),on=e=>Yt.get(e);function sn(e,t){return e.id===`editor.save`||t&&e.editor!==!0}var cn={},Z=new Set,Q=ln();function ln(){let e={};for(let t of Y)e[t.id]=cn[t.id]||Zt(t);return e}function un(e){cn=e??{},Q=ln(),Z.forEach(e=>e())}var dn=e=>Q[e]??``;function fn(e){for(let[t,n]of Object.entries(Q))if(n===e)return t}function pn(e){return nn(mn()[e]??``)}function mn(){return(0,o.useSyncExternalStore)(e=>(Z.add(e),()=>Z.delete(e)),()=>Q)}function $(e,t,n){return!e||e.major>t||e.major===t&&e.minor>=n}var hn=e=>e!==void 0&&$(e,21,3),gn=e=>e!==void 0&&$(e,24,5);function _n(e){return $(e,17,1)}function vn(e){return $(e,17,3)}var yn=e=>e!==void 0&&$(e,24,4),bn=e=>$(e,10,3),xn=e=>$(e,12,3),Sn=e=>$(e,12,4),Cn=e=>$(e,15,3),wn=e=>e!==void 0&&$(e,16,3),Tn=e=>$(e,16,4),En=e=>$(e,14,1),Dn=e=>e!==void 0&&$(e,24,6),On=e=>e!==void 0&&$(e,25,1),kn=e=>e!==void 0&&$(e,25,2),An=e=>e!==void 0&&$(e,25,3);export{_t as $,w as $t,J as A,Wt as At,dt as B,De as Bt,an as C,at as Ct,un as D,Je as Dt,rn as E,it as Et,ut as F,W as Ft,vt as G,P as Gt,Lt as H,ve as Ht,Ht as I,U as It,Ct as J,C as Jt,At as K,N as Kt,Ze as L,He as Lt,Kt as M,Qe as Mt,tt as N,Rt as Nt,Zt as O,Tt as Ot,Vt as P,K as Pt,ct as Q,h as Qt,qe as R,ke as Rt,on as S,Ye as St,sn as T,rt as Tt,Gt as U,ge as Ut,et as V,Se as Vt,nt as W,_e as Wt,Et as X,S as Xt,bt as Y,ee as Yt,Nt as Z,x as Zt,Y as _,xt as _t,wn as a,c as an,St as at,Qt as b,We as bt,hn as c,kt as ct,kn as d,ht as dt,y as en,ot as et,An as f,Bt as ft,bn as g,wt as gt,Cn as h,pt as ht,_n as i,s as in,st as it,qt as j,Ut as jt,pn as k,Pt as kt,Tn as l,yt as lt,gn as m,mt,yn as n,u as nn,gt as nt,En as o,It as ot,Dn as p,jt as pt,ft as q,g as qt,vn as r,l as rn,Ot as rt,Sn as s,lt as st,xn as t,k as tn,Mt as tt,On as u,Ft as ut,Jt as v,Dt as vt,dn as w,zt as wt,nn as x,Xe as xt,fn as y,Ge as yt,Ke as z,H as zt};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n,t as r}from"./jsx-runtime-ffCh33zF.js";import{S as i,T as a,_ as o,b as s,d as c,f as l,g as u,h as d,m as f,p,v as m,w as h,x as g,y as _}from"./dialog-yvLGI8FJ.js";import{a as v,c as y,n as b}from"./x-DCpy1q13.js";import{a as x,c as S,d as C,l as w,o as T,r as E,s as D,u as O}from"./input-DDhYsCUG.js";import{a as k,t as A}from"./dist-CYLjuW55.js";import{t as j}from"./createLucideIcon-DyMAgLa3.js";import{t as ee}from"./chevron-down--sjpQEHH.js";import{n as te,t as ne}from"./dist-gLP0NXk8.js";var M=j(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),N=e(t(),1),P=e(n(),1);function F(e,[t,n]){return Math.min(n,Math.max(t,e))}var I=r(),L=[` `,`Enter`,`ArrowUp`,`ArrowDown`],R=[` `,`Enter`],z=`Select`,[B,V,H]=te(z),[U,re]=h(z,[H,C]),W=C(),[ie,G]=U(z),[ae,K]=U(z),oe=`SelectProvider`;function se(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:p,required:h,form:g,internal_do_not_use_render:_}=e,v=W(t),[y,b]=N.useState(null),[x,S]=N.useState(null),[C,w]=N.useState(!1),T=ne(l),[E,D]=d({prop:r,defaultProp:i??!1,onChange:a,caller:z}),[k,A]=d({prop:o,defaultProp:s,onChange:c,caller:z}),j=N.useRef(null),ee=N.useRef(k);N.useEffect(()=>{let e=g?y?.ownerDocument.getElementById(g):y?.form;if(e instanceof HTMLFormElement){let t=()=>A(ee.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[g,y,A]);let te=!y||!!g||!!y.closest(`form`),[M,P]=N.useState(new Set),F=m(),L=Array.from(M).map(e=>e.props.value).join(`;`),R=N.useCallback(e=>{P(t=>new Set(t).add(e))},[]),V=N.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),H={required:h,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:w,contentId:F,value:k,onValueChange:A,open:E,onOpenChange:D,dir:T,triggerPointerDownPosRef:j,disabled:p,name:u,autoComplete:f,form:g,nativeOptions:M,nativeSelectKey:L,isFormControl:te};return(0,I.jsx)(O,{...v,children:(0,I.jsx)(ie,{scope:t,...H,children:(0,I.jsx)(B.Provider,{scope:t,children:(0,I.jsx)(ae,{scope:t,onNativeOptionAdd:R,onNativeOptionRemove:V,children:tt(_)?_(H):n})})})})}se.displayName=oe;var ce=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,I.jsx)(se,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,I.jsxs)(I.Fragment,{children:[n,e?(0,I.jsx)(et,{__scopeSelect:t}):null]})})};ce.displayName=z;var le=`SelectTrigger`,ue=N.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...o}=e,s=W(n),c=G(le,n),l=c.disabled||r,u=y(t,c.onTriggerChange),d=V(n),f=N.useRef(`touch`),[p,m,h]=nt(e=>{let t=d().filter(e=>!e.disabled),n=rt(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,I.jsx)(D,{asChild:!0,...s,children:(0,I.jsx)(i.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,...o,ref:u,onClick:a(o.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:a(o.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:a(o.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&L.includes(e.key)&&(g(),e.preventDefault())})})})});ue.displayName=le;var de=`SelectValue`,fe=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:a,children:o,placeholder:s=``,...c}=e,l=G(de,n),{onValueNodeHasChildrenChange:u}=l,d=o!==void 0,f=y(t,l.onValueNodeChange);_(()=>{u(d)},[u,d]);let p=$(l.value);return(0,I.jsx)(i.span,{...c,asChild:!p&&c.asChild,ref:f,style:{pointerEvents:`none`},children:(0,I.jsx)(N.Fragment,{children:p?s:o},p?`placeholder`:`value`)})});fe.displayName=de;var pe=`SelectIcon`,me=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...a}=e;return(0,I.jsx)(i.span,{"aria-hidden":!0,...a,ref:t,children:r||`▼`})});me.displayName=pe;var he=`SelectPortal`,[ge,_e]=U(he,{forceMount:void 0}),ve=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,I.jsx)(ge,{scope:e.__scopeSelect,forceMount:n,children:(0,I.jsx)(o,{asChild:!0,...r})})};ve.displayName=he;var q=`SelectContent`,ye=N.forwardRef((e,t)=>{let n=_e(q,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=G(q,e.__scopeSelect),[o,s]=N.useState();return _(()=>{s(new DocumentFragment)},[]),(0,I.jsx)(u,{present:r||a.open,children:({present:e})=>e?(0,I.jsx)(we,{...i,ref:t}):(0,I.jsx)(be,{...i,fragment:o})})});ye.displayName=q;var be=N.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?P.createPortal((0,I.jsx)(xe,{scope:n,children:(0,I.jsx)(B.Slot,{scope:n,children:(0,I.jsx)(`div`,{ref:t,children:r})})}),i):null});be.displayName=`SelectContentFragment`;var J=10,[xe,Y]=U(q),Se=`SelectContentImpl`,Ce=v(`SelectContent.RemoveScroll`),we=N.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:u,side:d,sideOffset:m,align:h,alignOffset:g,arrowPadding:_,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C,...w}=e,T=G(q,n),[E,D]=N.useState(null),[O,k]=N.useState(null),A=y(t,D),[j,ee]=N.useState(null),[te,ne]=N.useState(null),M=V(n),[P,F]=N.useState(!1),L=N.useRef(!1);N.useEffect(()=>{if(E)return c(E)},[E]),p();let R=N.useCallback(e=>{let[t,...n]=M().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},[M,O]),z=N.useCallback(()=>R([j,E]),[R,j,E]);N.useEffect(()=>{P&&z()},[P,z]);let{onOpenChange:B,triggerPointerDownPosRef:H}=T;N.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(H.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(H.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(E)||B(!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,B,H]),N.useEffect(()=>{let e=()=>B(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[B]);let[U,re]=nt(e=>{let t=M().filter(e=>!e.disabled),n=rt(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),W=N.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]),ie=N.useCallback(()=>E?.focus(),[E]),ae=N.useCallback((e,t,n)=>{let r=!L.current&&!n;(T.value!==void 0&&T.value===t||r)&&ne(e)},[T.value]),K=r===`popper`?X:Ee,oe=K===X?{side:d,sideOffset:m,align:h,alignOffset:g,arrowPadding:_,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C}:{};return(0,I.jsx)(xe,{scope:n,content:E,viewport:O,onViewportChange:k,itemRefCallback:W,selectedItem:j,onItemLeave:ie,itemTextRefCallback:ae,focusSelectedItem:z,selectedItemText:te,position:r,isPositioned:P,searchRef:U,children:(0,I.jsx)(l,{as:Ce,allowPinchZoom:!0,children:(0,I.jsx)(f,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:a(i,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,I.jsx)(s,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,I.jsx)(K,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...oe,onPlaced:()=>F(!0),ref:A,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:a(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&re(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=M().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(()=>R(t)),e.preventDefault()}})})})})})})});we.displayName=Se;var Te=`SelectItemAlignedPosition`,Ee=N.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...a}=e,o=G(q,n),s=Y(q,n),[c,l]=N.useState(null),[u,d]=N.useState(null),f=y(t,d),p=V(n),m=N.useRef(!1),h=N.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:b,focusSelectedItem:x}=s,S=N.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&u&&g&&v&&b){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(o.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-J,d=F(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=F(a,[J,Math.max(J,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let a=p(),s=window.innerHeight-J*2,l=g.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),_=parseInt(d.borderBottomWidth,10),y=parseInt(d.paddingBottom,10),x=f+h+l+y+_,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(g),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+h+k,j=x-A;if(A<=E){let e=a.length>0&&v===a[a.length-1].ref.current;c.style.bottom=`0px`;let t=u.clientHeight-g.offsetTop-g.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+_);c.style.height=n+`px`}else{let e=a.length>0&&v===a[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+g.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,g.scrollTop=A-E+g.offsetTop}c.style.margin=`${J}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>m.current=!0)}},[p,o.trigger,o.valueNode,c,u,g,v,b,o.dir,r]);_(()=>S(),[S]);let[C,w]=N.useState();return _(()=>{u&&w(window.getComputedStyle(u).zIndex)},[u]),(0,I.jsx)(Oe,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:N.useCallback(e=>{e&&h.current===!0&&(S(),x?.(),h.current=!1)},[S,x]),children:(0,I.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,I.jsx)(i.div,{...a,ref:f,style:{boxSizing:`border-box`,maxHeight:`100%`,...a.style}})})})});Ee.displayName=Te;var De=`SelectPopperPosition`,X=N.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=J,...a}=e,o=W(n);return(0,I.jsx)(w,{...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=De;var[Oe,ke]=U(q,{}),Ae=`SelectViewport`,je=N.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...o}=e,s=Y(Ae,n),c=ke(Ae,n),l=y(t,s.onViewportChange),u=N.useRef(0);return(0,I.jsxs)(I.Fragment,{children:[(0,I.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,I.jsx)(B.Slot,{scope:n,children:(0,I.jsx)(i.div,{"data-radix-select-viewport":``,role:`presentation`,...o,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...o.style},onScroll:a(o.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})})})]})});je.displayName=Ae;var Me=`SelectGroup`,[Ne,Pe]=U(Me),Fe=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,a=m();return(0,I.jsx)(Ne,{scope:n,id:a,children:(0,I.jsx)(i.div,{role:`group`,"aria-labelledby":a,...r,ref:t})})});Fe.displayName=Me;var Ie=`SelectLabel`,Le=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,a=Pe(Ie,n);return(0,I.jsx)(i.div,{id:a.id,...r,ref:t})});Le.displayName=Ie;var Z=`SelectItem`,[Re,ze]=U(Z),Be=N.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...c}=e,l=G(Z,n),u=Y(Z,n),d=l.value===r,[f,p]=N.useState(s??``),[h,_]=N.useState(!1),v=y(t,g(e=>u.itemRefCallback?.(e,r,o))),b=m(),x=N.useRef(`touch`),S=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};return(0,I.jsx)(Re,{scope:n,value:r,disabled:o,textId:b,isSelected:d,onItemTextChange:N.useCallback(e=>{p(t=>t||(e?.textContent??``).trim())},[]),children:(0,I.jsx)(B.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:(0,I.jsx)(i.div,{role:`option`,"aria-labelledby":b,"data-highlighted":h?``:void 0,"aria-selected":d&&h,"data-state":d?`checked`:`unchecked`,"aria-disabled":o||void 0,"data-disabled":o?``:void 0,tabIndex:o?void 0:-1,...c,ref:v,onFocus:a(c.onFocus,()=>_(!0)),onBlur:a(c.onBlur,()=>_(!1)),onClick:a(c.onClick,()=>{x.current!==`mouse`&&S()}),onPointerUp:a(c.onPointerUp,()=>{x.current===`mouse`&&S()}),onPointerDown:a(c.onPointerDown,e=>{x.current=e.pointerType}),onPointerMove:a(c.onPointerMove,e=>{x.current=e.pointerType,o?u.onItemLeave?.():x.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:a(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:a(c.onKeyDown,e=>{o||e.target!==e.currentTarget||u.searchRef?.current!==``&&e.key===` `||(R.includes(e.key)&&S(),e.key===` `&&e.preventDefault())})})})})});Be.displayName=Z;var Q=`SelectItemText`,Ve=N.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:a,...o}=e,s=G(Q,n),c=Y(Q,n),l=ze(Q,n),u=K(Q,n),[d,f]=N.useState(null),p=g(e=>c.itemTextRefCallback?.(e,l.value,l.disabled)),m=y(t,f,l.onItemTextChange,p),h=d?.textContent,v=N.useMemo(()=>(0,I.jsx)(`option`,{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:b,onNativeOptionRemove:x}=u;return _(()=>(b(v),()=>x(v)),[b,x,v]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(i.span,{id:l.textId,...o,ref:m}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!$(s.value)?P.createPortal(o.children,s.valueNode):null]})});Ve.displayName=Q;var He=`SelectItemIndicator`,Ue=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return ze(He,n).isSelected?(0,I.jsx)(i.span,{"aria-hidden":!0,...r,ref:t}):null});Ue.displayName=He;var We=`SelectScrollUpButton`,Ge=N.forwardRef((e,t)=>{let n=Y(We,e.__scopeSelect),r=ke(We,e.__scopeSelect),[i,a]=N.useState(!1),o=y(t,r.onScrollButtonChange);return _(()=>{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,I.jsx)(Je,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Ge.displayName=We;var Ke=`SelectScrollDownButton`,qe=N.forwardRef((e,t)=>{let n=Y(Ke,e.__scopeSelect),r=ke(Ke,e.__scopeSelect),[i,a]=N.useState(!1),o=y(t,r.onScrollButtonChange);return _(()=>{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,I.jsx)(Je,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});qe.displayName=Ke;var Je=N.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Y(`SelectScrollButton`,n),c=N.useRef(null),l=V(n),u=N.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return N.useEffect(()=>()=>u(),[u]),_(()=>{l().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[l]),(0,I.jsx)(i.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:a(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:a(o.onPointerMove,()=>{s.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:a(o.onPointerLeave,()=>{u()})})}),Ye=`SelectSeparator`,Xe=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,I.jsx)(i.div,{"aria-hidden":!0,...r,ref:t})});Xe.displayName=Ye;var Ze=`SelectArrow`,Qe=N.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=W(n);return Y(Ze,n).position===`popper`?(0,I.jsx)(S,{...i,...r,ref:t}):null});Qe.displayName=Ze;var $e=`SelectBubbleInput`,et=N.forwardRef(({__scopeSelect:e,...t},n)=>{let r=G($e,e),{value:a,onValueChange:o,required:s,disabled:c,name:l,autoComplete:u,form:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=N.useRef(null),h=y(n,m),g=a??``,_=A(g),v=Array.from(f).some(e=>(e.props.value??``)===``);return N.useEffect(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(_!==g&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,g),e.dispatchEvent(t)}},[_,g]),(0,I.jsxs)(i.select,{"aria-hidden":!0,required:s,tabIndex:-1,name:l,autoComplete:u,disabled:c,form:d,onChange:e=>o(e.target.value),...t,style:{...k,...t.style},ref:h,defaultValue:g,children:[$(a)&&!v?(0,I.jsx)(`option`,{value:``}):null,Array.from(f)]},p)});et.displayName=$e;function tt(e){return typeof e==`function`}function $(e){return e===``||e===void 0}function nt(e){let t=g(e),n=N.useRef(``),r=N.useRef(0),i=N.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=N.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function rt(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=it(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 it(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var at=ce,ot=fe;function st({className:e,children:t,...n}){return(0,I.jsxs)(ue,{className:b(`flex h-8 w-full cursor-pointer items-center justify-between gap-2 px-2.5 [&>span]:truncate`,E,e),...n,children:[t,(0,I.jsx)(me,{asChild:!0,children:(0,I.jsx)(ee,{className:`size-3.5 shrink-0 text-fg-muted`})})]})}function ct({className:e,children:t,position:n=`popper`,...r}){return(0,I.jsx)(ve,{children:(0,I.jsx)(ye,{position:n,sideOffset:4,className:b(`z-50 max-h-72 min-w-[var(--radix-select-trigger-width)] max-w-[var(--radix-select-content-available-width)] overflow-y-auto rounded-md bg-elevated p-1 shadow-xl`,e),...r,children:(0,I.jsx)(je,{children:t})})})}function lt({className:e,children:t,detail:n,...r}){return(0,I.jsxs)(Be,{className:b(T,x,`py-1.5 pl-7 pr-2`,e),...r,children:[(0,I.jsx)(`span`,{className:`absolute left-2 flex size-3.5 items-center justify-center`,children:(0,I.jsx)(Ue,{children:(0,I.jsx)(M,{className:`size-3.5`})})}),(0,I.jsx)(Ve,{children:t}),n]})}export{ot as a,st as i,ct as n,M as o,lt as r,at 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"./jsx-runtime-ffCh33zF.js";import{C as r,H as i,R as a,a as o,c as s,m as c,o as l,s as u,w as d}from"./auth-ngM0Ffss.js";import{d as f}from"./index-Dp8dqiUy.js";import{i as p,n as m}from"./dist-CwwiP1WN.js";import{t as h}from"./x-DCpy1q13.js";import{t as g}from"./button-Chvl9hcE.js";import{t as _}from"./createLucideIcon-DyMAgLa3.js";import{t as v}from"./copy-CGsu8426.js";import{t as y}from"./ws-DfRorDqa.js";var b=_(`clipboard-paste`,[[`path`,{d:`M11 14h10`,key:`1w8e9d`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v1.344`,key:`1e62lh`}],[`path`,{d:`m17 18 4-4-4-4`,key:`z2g111`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113`,key:`bjbb7m`}],[`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,key:`ublpy`}]]),x=_(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]);function ee(){return f.get()}var S=32,C=2048;function w(e,t,n){let r=e.getLine(t);if(!r)return null;let i=e.getNullCell(),a=``,o=[];for(let s=0;s<Math.min(n,r.length);s++){if(!r.getCell(s,i)||i.getWidth()===0)continue;if(s===n-1&&i.getChars()===``){let n=e.getLine(t+1);if(n?.isWrapped&&n.getCell(0)?.getWidth()===2)continue}let c=i.getChars()||` `;a+=c;for(let e=0;e<c.length;e++)o.push({row:t,col:s})}return{text:a,cells:o,isWrapped:r.isWrapped}}function te(e,t,n){return{...e,text:e.text.slice(t,n),cells:e.cells.slice(t,n)}}function T(e,t,n,r,i){if(t<0||n<1)return[];let a=Math.max(0,t-S+1),o=new Map;for(let r=a;r<t+S;r++){let t=w(e,r,n);if(!t)break;o.set(r,t)}let s=new Set,c=[];for(let l of[!0,!1])for(let u=a;u<=t;u++){if(o.get(u)?.isWrapped&&u>a)continue;let d=``,f=[];for(let a=u;a<u+S;a++){let p=o.get(a);if(!p)break;let m=o.get(a-1);if(a>u&&!p.isWrapped&&!(l&&m&&i(m,p,n,d)))break;let h=o.get(a+1),g=te(p,a>u&&!p.isWrapped?p.text.length-p.text.trimStart().length:0,h?.isWrapped?p.text.length:p.text.trimEnd().length);if(d.length+g.text.length>C)break;if(d+=g.text,f.push(...g.cells),!(a<t))for(let n of r(d)){let r=f[n.start],i=f[n.end-1];if(!r||!i||r.row>t||i.row<t)continue;let a=`${d.slice(n.start,n.end)}\0${r.row}:${r.col}-${i.row}:${i.col}`;if(s.has(a))continue;s.add(a);let o=e.getLine(i.row)?.getCell(i.col)?.getWidth()??1;c.push({candidate:n,start:r,end:{row:i.row,col:i.col+Math.max(1,o)-1},text:d.slice(n.start,n.end)})}}}return c.sort((e,t)=>t.text.length-e.text.length)}var ne=r.options.join(`,`),E=u.imageBytes,re=20*1024*1024;async function ie(e,t,n){n?.throwIfAborted();let i=r.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>re)throw Error(`Choose an image smaller than 20 MiB.`);if(!t||e.size<=E)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{n?.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(n?.throwIfAborted(),i&&i.size<=E)return{blob:i,mime:r.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 D=new WeakSet,ae=Math.floor((c.requestBytes-1024)*3/4);async function oe(e,t,n,r,o,c,l){let f=e.generation,p=()=>{if(c?.throwIfAborted(),o(),e.generation!==f)throw Error(`The connection changed; the image upload was interrupted.`)};if(p(),!n.size||n.size>u.imageBytes)throw Error(`The prepared image must be no larger than 4 MiB.`);if(D.has(e))throw Error(`An image upload is already in progress.`);D.add(e);let m=crypto.randomUUID(),h=`/api/worktrees/${t}/paste-upload`,g=!1,_=!1,v=async(t,n,r)=>{p();let a=await e.request(t,n,r,c),o=await a.json();if(p(),!a.ok){let e=i.safeParse(o);throw Error(e.success?e.data.error.message:`The image upload failed.`)}return o},y=e=>v(`POST`,h,e),b=async e=>{let t=new Uint8Array(await e.arrayBuffer());return p(),btoa(Array.from(t,e=>String.fromCharCode(e)).join(``))};try{let e=a.parse(await v(`GET`,`/api/version`));if(l?.(0,n.size),!e.remote_image_uploads){if(n.size>ae)throw Error(`Update the host connector to upload images larger than 191 KiB.`);let e=await b(n),i=d.parse(await v(`POST`,`/api/worktrees/${t}/paste`,{mime:r,data:e}));return l?.(n.size,n.size),i}if(g=!0,s.parse(await y({action:`start`,upload:m,mime:r,size:n.size})).received!==0)throw Error(`Invalid image upload acknowledgement.`);for(let e=0;e<n.size;e+=u.chunkBytes){let t=n.slice(e,e+u.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.`);l?.(i.received,n.size)}let i=d.parse(await y({action:`finish`,upload:m}));return _=!0,i}finally{if(g&&!_&&e.generation===f)try{o(),e.request(`POST`,h,{action:`cancel`,upload:m}).catch(()=>{})}catch{}D.delete(e)}}function O(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?(k(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 k(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||!y.isConnected())throw Error(`The terminal connection changed; the image was not inserted.`)};r.signal?.throwIfAborted(),o(),r.onProgress?.({stage:`preparing`});let{blob:s,mime:c,resized:u}=await ie(e,i!==null,r.signal);o();let f=i?await oe(i,t,s,c,o,r.signal,(e,t)=>r.onProgress?.(e===t?{stage:`saving`}:{stage:`uploading`,received:e,total:t})):await(async()=>{let e=await se(s);return o(),r.signal?.throwIfAborted(),d.parse(await p(`POST`,`/api/worktrees/${t}/paste`,{mime:c,data:e}))})();return r.signal?.throwIfAborted(),o(),r.onProgress?.({stage:`inserting`}),r.insert?r.insert(`${f.path} `):i?await i.input(t,n,`${f.path} `):y.write(t,n,`${f.path} `),{resized:u}}function se(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 A=/(?:^|[\s"'`([<])((?:(?:\/|\.{1,2}\/|~\/)(?:[\w.+@~-]+\/)*[\w.+@~-]+|(?:[\w.+@~-]+\/)+[\w.+@~-]*|[\w.+@~-]+\.[A-Za-z]\w{0,11}))(?::(\d{1,6})(?::(\d{1,6}))?)?/dg,ce=new Set([`.`,`,`,`;`,`:`,`)`,`]`,`'`,`"`]);function j(e){let t=[],n=new RegExp(A.source,A.flags),r;for(;r=n.exec(e);){let e=r.indices,n=r[1];if(!e?.[1]||n===void 0)continue;let i=e[1][0],a=e[1][1],o=n;for(o.startsWith(`@`)&&(o=o.slice(1),i++);o.length>0&&ce.has(o[o.length-1]);)o=o.slice(0,-1),a--;if(o.length===0)continue;let s=r[2]===void 0?void 0:Number.parseInt(r[2],10),c=r[3]===void 0?void 0:Number.parseInt(r[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:i,end:l})}return t}function le(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(`/`)||a!==void 0&&a.col>=n-9}function ue(e,t,n){return T(e,t,n,j,le)}function de(e,t){return e.kind===`file`&&e.root!==void 0&&e.root!==t?e.root:null}var fe=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 M(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),p(`GET`,`/api/worktrees/${e}/resolve?${i}`)}function N(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 pe(e,t,n){return N(await M(e,t,n?.line,n?.root),n?.line,n?.column)}async function P(e,t,n){try{return await M(e,t,n)}catch{return null}}function F(e,t,n){let r=new fe({fetcher:P});return e.registerLinkProvider({provideLinks(i,a){let o=e.buffer.active,s=ue(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(N(s,e.line,e.column))}}:null})).then(e=>{let t=e.filter(e=>e!==null);a(t.length>0?t:void 0)})}})}var I=e(t(),1),L={ctrl:1,alt:2,shift:4},R=/^(?:\[[ABCD]|O[ABCD]|\[1;([2-8])[ABCD])$/,z=e=>e.startsWith(`\x1B`)?R.exec(e.slice(1)):null;function B(e){return!e.startsWith(`\x1B`)||e===`\x1B`||z(e)!==null||e===`\x1B[Z`}function me(e,t){if(!t)return e;let n=(t&L.ctrl)!==0,r=(t&L.alt)!==0,i=(t&L.shift)!==0,a=!!i|(r?2:0)|(n?4:0),o=z(e);if(o)return`\x1b[1;${1+(a|(o[1]?Number(o[1])-1:0))}${e.slice(-1)}`;if(!B(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 he(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)=>o(JSON.stringify([e,t]));function ge(e,t){return(0,I.useSyncExternalStore)(K,()=>V.has(J(e,t)))}function _e(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 Y(e,t){H.get(J(e,t))?.()}function ve(e,t){return(0,I.useSyncExternalStore)(K,()=>W.get(J(e,t))??0)}function X(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||!B(n)?n:(W.delete(r),q(),me(n,i))}async function ye(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&&he(o)&&U.get(i)?.()&&(o=`\x1bO${o.slice(-1)}`),await Q(e,t,o)}async function be(e,t,n){let r=J(e,t),i=V.get(r),a=l(),o=a?.generation;if(!i||!n()||!y.isConnected())throw Error(`Wait for the terminal to attach; nothing was pasted.`);let s;try{let n=navigator.clipboard.readText();Y(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||!y.isConnected())throw Error(`The terminal changed; nothing was pasted. Try again in the active terminal.`);s&&await Q(e,t,i(s))}async function Q(e,t,n){let r=l();if(r)await r.input(e,t,n);else{if(!y.isConnected())throw Error(`Terminal is disconnected; nothing was sent`);y.write(e,t,n)}}var $=n();function xe({text:e,label:t,clear:n,paste:r}){let[i,a]=(0,I.useState)(!1);return(0,$.jsxs)(`div`,{role:`toolbar`,"aria-label":t,onPointerDown:e=>e.preventDefault(),className:`absolute right-2 top-2 z-20 flex gap-1 rounded-md bg-elevated p-1 shadow-lg`,children:[(0,$.jsxs)(g,{variant:`ghost`,size:`sm`,disabled:!e||i,onClick:async()=>{try{await navigator.clipboard.writeText(e),n()}catch{m.error(`Could not copy the selection. Try again.`)}},children:[(0,$.jsx)(v,{}),` Copy`]}),r&&(0,$.jsxs)(g,{variant:`ghost`,size:`sm`,disabled:i,onClick:async()=>{if(!i){a(!0);try{await r(),n()}catch(e){m.error(e instanceof Error?e.message:`Could not paste. Try again.`)}finally{a(!1)}}},children:[(0,$.jsx)(b,{}),` Paste`]}),(0,$.jsx)(g,{variant:`ghost`,size:`icon`,"aria-label":`Clear selection`,disabled:i,onClick:n,children:(0,$.jsx)(h,{})})]})}export{T as _,_e as a,x as b,ge as c,de as d,F as f,ne as g,k as h,be as i,ve as l,O as m,Z as n,ye as o,pe as p,Y as r,X as s,xe as t,L as u,w as v,ee 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-ffCh33zF.js";import{O as r}from"./auth-ngM0Ffss.js";import{I as i,M as a,P as o,yt as s}from"./protocol-support-BNUfFPAF.js";import{S as c,T as l,_ as u,b as d,g as f,h as p,v as ee,w as m}from"./dialog-yvLGI8FJ.js";import{c as h,n as g,o as _}from"./x-DCpy1q13.js";import{c as v,d as y,l as te,s as b,u as ne}from"./input-DDhYsCUG.js";import{i as x}from"./dist-CYLjuW55.js";import{n as S,s as re}from"./switch-B1uGC2PW.js";import{a as C,n as ie,o as w}from"./preview-kind-DiWpvEc0.js";import{t as ae}from"./debounce-B9DrqirV.js";var T=e(t(),1),E=n(),[D,oe]=m(`Tooltip`,[y]),O=y(),se=`TooltipProvider`,ce=700,k=`tooltip.open`,[le,A]=D(se),ue=e=>{let{__scopeTooltip:t,delayDuration:n=ce,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)(le,{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})};ue.displayName=se;var j=`Tooltip`,[de,M]=D(j),fe=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=A(j,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:j}),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)(de,{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})})};fe.displayName=j;var N=`TooltipTrigger`,pe=T.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=M(N,n),a=A(N,n),o=O(n),s=h(t,T.useRef(null),i.onTriggerChange),u=T.useRef(!1),d=T.useRef(!1),f=T.useCallback(()=>u.current=!1,[]);return T.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,E.jsx)(b,{asChild:!0,...o,children:(0,E.jsx)(c.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:l(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:l(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:l(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:l(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:l(e.onBlur,i.onClose),onClick:l(e.onClick,i.onClose)})})});pe.displayName=N;var P=`TooltipPortal`,[me,he]=D(P,{forceMount:void 0}),ge=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=M(P,t);return(0,E.jsx)(me,{scope:t,forceMount:n,children:(0,E.jsx)(f,{present:n||a.open,children:(0,E.jsx)(u,{asChild:!0,container:i,children:r})})})};ge.displayName=P;var F=`TooltipContent`,_e=T.forwardRef((e,t)=>{let n=he(F,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=M(F,e.__scopeTooltip);return(0,E.jsx)(f,{present:r||o.open,children:o.disableHoverableContent?(0,E.jsx)(Se,{side:i,...a,ref:t}):(0,E.jsx)(ve,{side:i,...a,ref:t})})}),ve=T.forwardRef((e,t)=>{let n=M(F,e.__scopeTooltip),r=A(F,e.__scopeTooltip),i=T.useRef(null),a=h(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=Ee(r,Te(r,n.getBoundingClientRect())),a=De(t.getBoundingClientRect()),o=ke([...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=!Oe(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,E.jsx)(Se,{...e,ref:a})}),[ye,be]=D(j,{isInside:!1}),xe=_(`TooltipContent`),Se=T.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=M(F,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)(d,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,E.jsxs)(te,{"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)(xe,{children:r}),(0,E.jsx)(ye,{scope:n,isInside:!0,children:(0,E.jsx)(x,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});_e.displayName=F;var Ce=`TooltipArrow`,we=T.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=O(n);return be(Ce,n).isInside?null:(0,E.jsx)(v,{...i,...r,ref:t})});we.displayName=Ce;function Te(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 Ee(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 De(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 Oe(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 ke(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)),Ae(t)}function Ae(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 je=ue,Me=fe,Ne=pe,Pe=ge,Fe=_e,Ie=je,Le=Me,Re=Ne;function ze({className:e,sideOffset:t=4,...n}){return(0,E.jsx)(Pe,{children:(0,E.jsx)(Fe,{sideOffset:t,className:g(`z-50 overflow-hidden rounded-md bg-elevated px-2 py-1 text-xs text-fg shadow-lg`,e),...n})})}function Be({initial:e,maxLength:t,className:n,onCommit:r,onCancel:i}){let[a,o]=(0,T.useState)(e);return(0,E.jsx)(`input`,{autoFocus:!0,value:a,maxLength:t,onFocus:e=>e.currentTarget.select(),onChange:e=>o(e.target.value),onBlur:()=>r(a),onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`?r(a):e.key===`Escape`&&i()},className:g(`bg-transparent outline-none`,n)})}function Ve(e){return{onClick:e=>{e.detail===2&&e.preventDefault()},onDoubleClick:t=>{t.preventDefault(),e()}}}var I=null;function He(e){return I=e,()=>{I===e&&(I=null)}}function Ue(){I?.()}var L=null;function We(e){return L=e,()=>{L===e&&(L=null)}}async function Ge(e){if(!L)throw Error(`Open a project before opening a path.`);await L(e)}function Ke(){let e=s(a()??void 0).data?.tabTitleTemplate;return(0,T.useCallback)(t=>S(t,e),[e])}var qe=(0,T.createContext)({open:()=>void 0,handler:null,setHandler:()=>void 0});function Je({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 Ye(){return(0,T.useContext)(qe)}function Xe({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 Ze({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 Qe({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 $e({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 et({type:e,className:t,strokeScale:n=1}){switch(e){case`claude-code`:return(0,E.jsx)(Xe,{className:t,strokeScale:n});case`codex`:return(0,E.jsx)(Ze,{className:t,strokeScale:n});case`opencode`:return(0,E.jsx)(Qe,{className:t,strokeScale:n});case`gemini-cli`:return(0,E.jsx)($e,{className:t});default:return(0,E.jsx)(re,{className:t,strokeWidth:2*n})}}var R=new Set,z=!1,tt=null;function nt(){for(let e of R)e()}function rt(e){return R.add(e),()=>R.delete(e)}function it(e){z!==e&&(z=e,nt())}function at(){it(!z)}function ot(){return(0,T.useSyncExternalStore)(rt,()=>z)}function st(e){tt=e,nt()}function ct(){return(0,T.useSyncExternalStore)(rt,()=>tt)}function B(){return crypto.randomUUID()}function V(e){return e.type===`terminal`?`term:${e.session}`:`editor:${C(e.tab)}`}function H(e,t){return V(e)===V(t)}function lt(e){return e.type===`terminal`}function ut(e){return e.type===`editor`&&(e.tab.view===`linked`||e.tab.view===`locked`)}function U(e=[],t){let n=e.map(V),r=t&&n.includes(t)?t:n.length>0?n[0]:null;return{kind:`leaf`,id:B(),tabs:e,activeKey:r,previewKey:null}}function W(e,t,n){return{kind:`split`,id:B(),direction:e,children:t,sizes:n??t.map(()=>100/Math.max(1,t.length))}}function G(e,t){if(e.kind===`leaf`)return e.id===t?e:null;for(let n of e.children){let e=G(n,t);if(e)return e}return null}function K(e,t){if(e.kind===`leaf`)return e.tabs.some(e=>V(e)===t)?e:null;for(let n of e.children){let e=K(n,t);if(e)return e}return null}function q(e){return e.kind===`leaf`?[e]:e.children.flatMap(q)}function J(e){return q(e).flatMap(e=>e.tabs)}function dt(e){return e.kind===`leaf`?[e.id]:[e.id,...e.children.flatMap(dt)]}function ft(e){let t=dt(e);return new Set(t).size!==t.length}function pt(e){return e.kind===`leaf`?{...e,id:B()}:{...e,id:B(),children:e.children.map(pt)}}function mt(e){if(!ft(e))return e;let t=new Set,n=e=>{let r=t.has(e.id)?B():e.id;return t.add(r),e.kind===`leaf`?{...e,id:r}:{...e,id:r,children:e.children.map(n)}};return n(e)}function ht(e){let t=e.tabs.map(V),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 Y(e){if(e.kind===`leaf`)return ht(e);let t=e.children.map(Y),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?U([]):i.length===1?i[0]:{...e,children:i,sizes:a}}function X(e,t,n){return e.kind===`leaf`?e.id===t?n(e):e:{...e,children:e.children.map(e=>X(e,t,n))}}function gt(e,t,n){return X(e,t,e=>{if(!e.tabs.some(e=>V(e)===n))return e;let t=e.tabs.filter(e=>V(e)!==n),r=e.activeKey===n?_t(e,n):e.activeKey;return{...e,tabs:t,activeKey:r}})}function _t(e,t){let n=e.tabs.findIndex(e=>V(e)===t);if(n===-1)return e.activeKey;let r=e.tabs.filter(e=>V(e)!==t);return r.length===0?null:V(r[Math.min(n,r.length-1)])}function vt(e,t,n){let r=e.tabs.filter(e=>!H(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:V(t)}}function yt(e,t,n,r){let i=n===`left`||n===`right`?`row`:`col`,a=n===`left`||n===`top`;return Y(X(e,t,e=>{let t=U([r]);return W(i,a?[t,e]:[e,t],[50,50])}))}function bt(e,t){let{ref:n,toLeafId:r,edge:i}=t,a=V(n),o=t.copy===!0&&!lt(n),s=t.index;if(i===`center`&&s!==void 0){let t=G(e,r)?.tabs.findIndex(e=>V(e)===a)??-1;t!==-1&&t<s&&--s}let c=o?e:gt(e,t.fromLeafId,a);if(i===`center`){let e=X(c,r,e=>vt(e,n,s));return!G(e,r)&&!K(e,a)?Z(Y(xt(e,n)),a):Z(Y(e),a)}return G(c,r)?Z(yt(c,r,i,n),a):Y(U([n]))}function xt(e,t){let n=q(e)[0];return n?X(e,n.id,e=>vt(e,t)):U([t])}function St(e,t,n){return Y(X(e,t,e=>e.tabs.some(e=>V(e)===n)?{...e,tabs:e.tabs.filter(e=>V(e)!==n),activeKey:e.activeKey===n?_t(e,n):e.activeKey}:e))}function Ct(e,t,n){let r=V(n);return Y(X(e,t,e=>{let t=e.previewKey===r?null:e.previewKey;return e.tabs.some(e=>H(e,n))?{...e,activeKey:r,previewKey:t}:{...e,tabs:[...e.tabs,n],activeKey:r,previewKey:t}}))}function wt(e,t,n){let r=V(n);return Y(X(e,t,e=>e.tabs.some(e=>V(e)===r)?{...e,tabs:e.tabs.map(e=>V(e)===r?n:e),previewKey:e.previewKey===r?null:e.previewKey}:{...e,tabs:[...e.tabs,n]}))}function Tt(e,t,n){let r=V(n);return X(e,t,e=>({...e,tabs:e.tabs.map(e=>V(e)===r?n:e)}))}function Et(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 Dt(e,t){return e.type!==`editor`||t.type!==`editor`||e.tab.view!==`preview`||t.tab.view!==void 0||ie(t.tab.path)===null?t:{...t,tab:{...t.tab,view:`preview`}}}function Ot(e,t,n){let r=V(n);return Y(X(e,t,e=>{if(e.tabs.some(e=>H(e,n)))return{...e,activeKey:r};let t=e.previewKey?e.tabs.findIndex(t=>V(t)===e.previewKey):-1,i=t>=0?e.tabs[t]:void 0,a=i!==void 0&&!lt(i)&&!ut(i),o=a?Dt(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 Z(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 kt(e,t,n,r){return X(e,t,e=>{let t=e.tabs.findIndex(e=>e.type===`editor`&&V(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=V(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&&V(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 At(e,t){let n=w(e);return n!==`commit`&&n!==`untitled`&&e.session===t.session&&e.path===t.path&&e.root===t.root}function jt(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`||!At(e.tab,t))return e;let r={...e,tab:{...e.tab,path:n}};return a.set(V(e),V(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 Mt(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`||ie(t.path)===null?null:t}function Nt(e,t){let n=Mt(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`||!ut(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 Pt(e,t){return e.session===t.session&&e.path===t.path&&(e.root??``)===(t.root??``)&&w(e)===w(t)}function Ft(e,t,n){let r=q(e).flatMap(e=>e.tabs.flatMap(n=>n.type!==`editor`||n.tab.view===`linked`||n.tab.view===`locked`||!Pt(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 It(e,t,n){return X(e,t,e=>e.tabs.some(e=>V(e)===n)?{...e,activeKey:n}:e)}function Lt(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 Rt(e){let t=e.type===`terminal`?e.session:e.tab.session;return t===`00000000-0000-0000-0000-000000000000`?null:t}function zt(e){return t=>{let n=Rt(t);return n===null||e.has(n)}}function Q(e,t){let n=e=>e.kind===`leaf`?{...e,tabs:e.tabs.filter(t)}:{...e,children:e.children.map(n)};return Y(n(e))}function Bt(e){let t=new Set,n=[];for(let r of e){let e=Y(Q(r,e=>!t.has(V(e)))),i=J(e);if(i.length!==0){for(let e of i)t.add(V(e));n.push(e)}}return n.length===0?U([]):mt(n.length===1?n[0]:Y(W(`row`,n)))}function Vt(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?V({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 U([]);if(t.length===0)return U(n,i);if(n.length===0)return U(t,r);let a=e.layout,o=typeof a.editor==`number`?a.editor:40,s=typeof a.session==`number`?a.session:60;return Y(W(`col`,[U(t,r),U(n,i)],[o,s]))}function Ht(e){return JSON.stringify(Ut(e))}function Ut(e){return e===null?null:e.kind===`leaf`?e.tabs.length===0?null:{t:e.tabs.map(V)}:{d:e.direction,s:e.sizes.map(e=>Math.round(e*10)/10),c:e.children.map(Ut)}}var Wt=new Set,$=!1,Gt=null;function Kt(){for(let e of Wt)e()}function qt(e){return Wt.add(e),()=>Wt.delete(e)}function Jt(e){$!==e&&($=e,Kt())}function Yt(){Jt(!$)}function Xt(){return(0,T.useSyncExternalStore)(qt,()=>$)}function Zt(e){Gt=e,Kt()}function Qt(){return(0,T.useSyncExternalStore)(qt,()=>Gt)}var $t={layout_tree:null,active_session:null,layout_ref:null};function en(e){return e.type===`terminal`?e.session:e.tab.session}function tn(e,t){let n=new Set;for(let[r,i]of Object.entries(e))if(!(r===t||!i.layout_tree))for(let e of J(i.layout_tree))e.type===`terminal`&&n.add(e.session);return[...n]}function nn(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 rn(e,t,n){return n?{loaded:e.loaded,snapshot:nn(e.snapshot,t),current:()=>nn(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]??$t,...r}}}Object.keys(i).length>0&&e.update(i)}}:e}function an(e,t,n,r){let i=e.layout_tree??Vt(e),a={};for(let o of t)a[o]={layout_tree:pt(Q(i,e=>{let i=en(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 on(e,t,n={}){return{...e,...t,...n}}function sn(e,t,n){let r=t.layout_tree?Q(t.layout_tree,e=>{let t=en(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=an(e,n.projectIds,n.sessionProject,a);return{projectBased:!0,patch:{...s,project_layouts:on(s.project_layouts??{},e.project_layouts,{[a]:o})}}}function cn(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:Bt(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 ln=2e3,un=r.parse({});function dn(e){return`puddle.ws.${e}`}function fn(e){if(e===null)return{kind:`absent`};try{return{kind:`present`,snapshot:r.parse(JSON.parse(e))}}catch{return{kind:`corrupt`}}}function pn(){let e=a(),[t,n]=(0,T.useState)(!1),[r,s]=(0,T.useState)(un),c=(0,T.useRef)(r);c.current=r;let l=(0,T.useRef)(null),u=(0,T.useMemo)(()=>ae((e,t)=>{i(e,t).catch(e=>console.warn(`ui-state save failed: ${e.message}`))},ln),[]);return(0,T.useEffect)(()=>{if(e===null){l.current=null;return}let t=dn(e);l.current=t;let r=!1;n(!1),s(un);let i;try{i=fn(sessionStorage.getItem(t)),i.kind===`corrupt`&&sessionStorage.removeItem(t)}catch(e){console.warn(`ui-state read failed: ${e.message}`),i={kind:`absent`}}return i.kind===`present`?(s(i.snapshot),n(!0)):o(e).then(e=>{r||(e&&s(e.ui_state),n(!0))}).catch(e=>{console.warn(`ui-state load failed: ${e.message}`),r||n(!0)}),()=>{r=!0,u.flush()}},[e,u]),{loaded:t,snapshot:r,current:()=>c.current,update(t){if(e===null)return;let n={...c.current,...t};c.current=n,s(n);let r=l.current??dn(e);u(e,n);try{sessionStorage.setItem(r,JSON.stringify(n))}catch(e){console.warn(`ui-state write failed: ${e.message}`)}}}}export{He as $,Ot as A,Tt as B,bt as C,K as D,It as E,Nt as F,ot as G,it as H,Et as I,Ye as J,et as K,kt as L,Q as M,jt as N,Mt as O,Lt as P,Ue as Q,Ft as R,mt as S,J as T,at as U,st as V,ct as W,Ge as X,Ke as Y,We as Z,Ct as _,on as a,Re as at,Vt as b,an as c,Jt as d,Be as et,Yt as f,wt as g,Ht as h,sn as i,Ie as it,Z as j,U as k,cn as l,Xt as m,pn as n,Le as nt,tn as o,Qt as p,Je as q,dn as r,ze as rt,rn as s,fn as t,Ve as tt,Zt as u,q as v,G as w,St as x,zt as y,V as z};