sliccy 5.85.2 → 5.86.1

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 (69) hide show
  1. package/dist/ui/assets/{account-store-CEcKgK0l.js → account-store-BRoDgUlX.js} +1 -1
  2. package/dist/ui/assets/{account-store-BrIeX38C.js → account-store-CBJPgi_K.js} +1 -1
  3. package/dist/ui/assets/{adobe-CG32WiFV.js → adobe-CXESPnDV.js} +1 -1
  4. package/dist/ui/assets/{adobe-C_rwB_L7.js → adobe-DBB1pdiB.js} +1 -1
  5. package/dist/ui/assets/{apps-CHvqAB5s.js → apps-D0ZwXyqm.js} +1 -1
  6. package/dist/ui/assets/{azure-openai-aArsSLS8.js → azure-openai-BDKwUylO.js} +1 -1
  7. package/dist/ui/assets/{azure-openai-DghxuVSu.js → azure-openai-COdwosC6.js} +1 -1
  8. package/dist/ui/assets/{cerebras-YQFpaj8y.js → cerebras-BQPiXItm.js} +1 -1
  9. package/dist/ui/assets/{cerebras-BMijmKPL.js → cerebras-BiRD_NC7.js} +1 -1
  10. package/dist/ui/assets/{connect-surface-CyDDmRH8.js → connect-surface-7pcDpRTl.js} +1 -1
  11. package/dist/ui/assets/{fs--fF2XHWA.js → fs-BHCjYsaL.js} +2 -2
  12. package/dist/ui/assets/{fs-CPdd4_EF.js → fs-BKJHSZEv.js} +1 -1
  13. package/dist/ui/assets/{github-DVWx0EZv.js → github-BSave6cl.js} +1 -1
  14. package/dist/ui/assets/{github-CJfmyGQW.js → github-DuhZOnx5.js} +2 -2
  15. package/dist/ui/assets/{github-copilot-DN6DOlEt.js → github-copilot-CSqwRmvy.js} +1 -1
  16. package/dist/ui/assets/{github-copilot-DDrR0Dcz.js → github-copilot-DYdhgEXI.js} +1 -1
  17. package/dist/ui/assets/js-realm-worker-cnJ4ONoy.js +48 -0
  18. package/dist/ui/assets/{kernel-worker-WPQp2XGR.js → kernel-worker-DeF2c2R1.js} +593 -593
  19. package/dist/ui/assets/{local-llm-D2U8-4pe.js → local-llm-8FNT5fxY.js} +1 -1
  20. package/dist/ui/assets/{local-llm-CUbAnTfr.js → local-llm-DmKGEgMb.js} +1 -1
  21. package/dist/ui/assets/{main-BTrkCKcp.js → main-DOO2M5qo.js} +3 -3
  22. package/dist/ui/assets/{mount-CzSeWFV6.js → mount-BLkmO41J.js} +1 -1
  23. package/dist/ui/assets/{mount-BlK__OZ-.js → mount-DD3XdJOU.js} +2 -2
  24. package/dist/ui/assets/{mount-recovery-CD54Fp3V.js → mount-recovery-By0pxoZe.js} +1 -1
  25. package/dist/ui/assets/{new-session-C7IUu6er.js → new-session-NTa7UzqI.js} +2 -2
  26. package/dist/ui/assets/{oauth-bootstrap-B2sTjDj3.js → oauth-bootstrap-COJ-aaPT.js} +2 -2
  27. package/dist/ui/assets/{openai-codex-Bm8BCgOt.js → openai-codex-B60G1Yc8.js} +1 -1
  28. package/dist/ui/assets/{openai-codex-DhvGzUGp.js → openai-codex-DnkWN1Gp.js} +1 -1
  29. package/dist/ui/assets/{openrouter-CYkCxBUR.js → openrouter-C1yBODxS.js} +1 -1
  30. package/dist/ui/assets/{openrouter-DoOya2QQ.js → openrouter-DqMDa_yJ.js} +1 -1
  31. package/dist/ui/assets/{openrouter-oauth-D4Lo0_xv.js → openrouter-oauth-C0C9bvOU.js} +1 -1
  32. package/dist/ui/assets/{openrouter-oauth-DbbJwgR0.js → openrouter-oauth-CBVRe37I.js} +1 -1
  33. package/dist/ui/assets/{panel-rpc-handlers-MBY2VUHX.js → panel-rpc-handlers-DY4oDnY8.js} +2 -2
  34. package/dist/ui/assets/{provider-BE1hrKla.js → provider-BFjkJdYP.js} +2 -2
  35. package/dist/ui/assets/{provider-CRmTiEP8.js → provider-cT5CKcya.js} +1 -1
  36. package/dist/ui/assets/{provider-settings-BC3N35hr.js → provider-settings---ec8Fxf.js} +1 -1
  37. package/dist/ui/assets/{provider-settings-CLEFZXiI.js → provider-settings-9kdL6lBv.js} +1 -1
  38. package/dist/ui/assets/{provider-store-access-DAsdseUc.js → provider-store-access-C_qRzYU-.js} +2 -2
  39. package/dist/ui/assets/provider-store-access-Co92DHkB.js +1 -0
  40. package/dist/ui/assets/{providers-D9ubZ4Fu.js → providers-CArZTmT3.js} +1 -1
  41. package/dist/ui/assets/{providers-Bx0hmius.js → providers-xz0Q54ag.js} +2 -2
  42. package/dist/ui/assets/{quick-llm-B3SR421Z.js → quick-llm-CqoD9f1I.js} +1 -1
  43. package/dist/ui/assets/{session-freezer-Bi4Cxz2T.js → session-freezer-B6lPuh8O.js} +2 -2
  44. package/dist/ui/assets/{setup-standalone-prelude-Dbi4OJ6w.js → setup-standalone-prelude-CwsFM6lC.js} +1 -1
  45. package/dist/ui/assets/{setup-sudo-BwpLRMPP.js → setup-sudo-DyDikDgL.js} +2 -2
  46. package/dist/ui/assets/{skills-C13004y8.js → skills-BpRGe3eE.js} +1 -1
  47. package/dist/ui/assets/{src-q42bWiRK.js → src-D1zLEBPM.js} +89 -89
  48. package/dist/ui/assets/{store-Cag3fxA4.js → store-9pumOMPO.js} +1 -1
  49. package/dist/ui/assets/{sudo-BZGhTM9-.js → sudo-B2hQKONd.js} +1 -1
  50. package/dist/ui/assets/{upgrade-detection-qDsHQCU3.js → upgrade-detection-D2ywu76o.js} +1 -1
  51. package/dist/ui/assets/{wc-attach-BEw0uKlO.js → wc-attach-BXiU_Xsi.js} +2 -2
  52. package/dist/ui/assets/{wc-extension-DAuj723N.js → wc-extension-v6XTSxU8.js} +2 -2
  53. package/dist/ui/assets/{wc-follower-BhDFD0Pc.js → wc-follower-q4IR-vcf.js} +3 -3
  54. package/dist/ui/assets/{wc-live-B85aXbIj.js → wc-live--lz7GUC2.js} +3 -3
  55. package/dist/ui/assets/{wc-nav-xm0TsyKD.js → wc-nav-LokA4ykk.js} +2 -2
  56. package/dist/ui/assets/{wc-onboarding-BkGVEe0u.js → wc-onboarding-gGPJV7B7.js} +2 -2
  57. package/dist/ui/assets/{wc-placeholder-DbwZsdwJ.js → wc-placeholder-XvNMxjCC.js} +2 -2
  58. package/dist/ui/assets/{wc-settings-CrCCZX1c.js → wc-settings-BPz4vmbh.js} +2 -2
  59. package/dist/ui/assets/{wc-shell-mQT4fazf.js → wc-shell-DBoq5py7.js} +4 -4
  60. package/dist/ui/assets/{wc-sprinkles-DDnwGHGb.js → wc-sprinkles-BlIwGk9s.js} +2 -2
  61. package/dist/ui/assets/{wc-tray-CndAoNqW.js → wc-tray-Y6K4xewI.js} +2 -2
  62. package/dist/ui/assets/{xai-grok-D2YuARFX.js → xai-grok-B3Y2b22u.js} +1 -1
  63. package/dist/ui/assets/{xai-grok-DuzTKMYZ.js → xai-grok-DC5LGks7.js} +1 -1
  64. package/dist/ui/index.html +6 -6
  65. package/dist/ui/llm-proxy-sw.js +1 -1
  66. package/dist/ui/packages/webapp/index.html +6 -6
  67. package/package.json +1 -1
  68. package/dist/ui/assets/js-realm-worker-B36R62ib.js +0 -48
  69. package/dist/ui/assets/provider-store-access-D4e1NXzz.js +0 -1
@@ -1,4 +1,4 @@
1
- import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./preload-helper-Czpn1I53.js";import{n,t as r}from"./icons-C5g936Qd.js";import{i,n as a,r as o,t as s}from"./speech-C5U8h4In.js";import{t as c}from"./soundscape-cues-5_sT5Un6.js";var l=[`top-left`,`top-right`,`bottom-left`,`bottom-right`,`top`,`right`,`bottom`,`left`],u=`top-right`,d=`slicc-launcher-corner`,f=[`disconnected`,`connected`,`error`],p=`disconnected`,m=`follower-status`,h=new Set(l),g=new Set(f);function _(e,t=u){return e&&h.has(e)?e:t}function v(e,t=p){return e&&g.has(e)?e:t}function y(e,t){return e>=6||e>=12&&t>=.6}function b({clientX:e,clientY:t,viewportWidth:n,viewportHeight:r,velocityXPxPerMs:i=0,velocityYPxPerMs:a=0,flickProjectionMs:o=180}){let s=x(e+i*o,0,n),c=x(t+a*o,0,r),l=s/n,u=c/r,d=l>1/3&&l<2/3,f=u>1/3&&u<2/3;if(d&&f){let e=u,t=1-u,n=l,r=1-l,i=Math.min(e,t,n,r);return i===e?`top`:i===t?`bottom`:i===n?`left`:`right`}return d?u<.5?`top`:`bottom`:f?l<.5?`left`:`right`:`${u<.5?`top`:`bottom`}-${l<.5?`left`:`right`}`}function x(e,t,n){return Math.min(Math.max(e,t),n)}var ee=`<?xml version="1.0" encoding="UTF-8"?>
1
+ import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./preload-helper-Czpn1I53.js";import{n,t as r}from"./icons-C5g936Qd.js";import{i,n as a,r as o,t as s}from"./speech-C5U8h4In.js";import{t as c}from"./soundscape-cues-5_sT5Un6.js";var l=[`top-left`,`top-right`,`bottom-left`,`bottom-right`,`top`,`right`,`bottom`,`left`],u=`top-right`,d=`slicc-launcher-corner`,f=[`disconnected`,`connected`,`error`],p=`disconnected`,m=`follower-status`,h=new Set(l),g=new Set(f);function _(e,t=u){return e&&h.has(e)?e:t}function v(e,t=p){return e&&g.has(e)?e:t}function y(e,t){return e>=6||e>=12&&t>=.6}function ee({clientX:e,clientY:t,viewportWidth:n,viewportHeight:r,velocityXPxPerMs:i=0,velocityYPxPerMs:a=0,flickProjectionMs:o=180}){let s=b(e+i*o,0,n),c=b(t+a*o,0,r),l=s/n,u=c/r,d=l>1/3&&l<2/3,f=u>1/3&&u<2/3;if(d&&f){let e=u,t=1-u,n=l,r=1-l,i=Math.min(e,t,n,r);return i===e?`top`:i===t?`bottom`:i===n?`left`:`right`}return d?u<.5?`top`:`bottom`:f?l<.5?`left`:`right`:`${u<.5?`top`:`bottom`}-${l<.5?`left`:`right`}`}function b(e,t,n){return Math.min(Math.max(e,t),n)}var te=`<?xml version="1.0" encoding="UTF-8"?>
2
2
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="100%" height="100%"><g transform="translate(151.53125, -171.3125) scale(1.25)"><g transform="translate(0, 21)"><g id="Cone">
3
3
  <path id="Cone_Bottom" data-name="Cone Bottom" d="M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z" style="fill: rgb(34, 34, 34); stroke: rgb(255, 255, 255); stroke-linejoin: round; stroke-width: 20px;"></path>
4
4
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -25,7 +25,7 @@ import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./preload-helpe
25
25
  <circle id="Right_Eye_Outline" data-name="Right Eye Outline" cx="175.1" cy="250.34" r="64.78" style="fill: rgb(0, 0, 0); stroke: rgb(255, 255, 255); stroke-miterlimit: 10; stroke-width: 6px;"></circle>
26
26
 
27
27
  </g><g><line x1="351.01" y1="183.73000000000002" x2="415.78999999999996" y2="248.51" stroke="#fff" stroke-width="15" stroke-linecap="round"></line><line x1="351.01" y1="248.51" x2="415.78999999999996" y2="183.73000000000002" stroke="#fff" stroke-width="15" stroke-linecap="round"></line></g><g><line x1="142.70999999999998" y1="217.95" x2="207.49" y2="282.73" stroke="#fff" stroke-width="15" stroke-linecap="round"></line><line x1="142.70999999999998" y1="282.73" x2="207.49" y2="217.95" stroke="#fff" stroke-width="15" stroke-linecap="round"></line></g></g></g></svg>
28
- `,te=`<?xml version="1.0" encoding="UTF-8"?>
28
+ `,ne=`<?xml version="1.0" encoding="UTF-8"?>
29
29
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="100%" height="100%"><g transform="translate(151.53125, -171.3125) scale(1.25)"><g transform="translate(0, 21)"><g id="Cone">
30
30
  <path id="Cone_Bottom" data-name="Cone Bottom" d="M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z" style="fill: #fff; stroke: #000; stroke-linejoin: round; stroke-width: 20px;"></path>
31
31
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -52,7 +52,7 @@ import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./preload-helpe
52
52
  <circle id="Right_Eye_Outline" data-name="Right Eye Outline" cx="175.1" cy="250.34" r="64.78" style="fill: #fff; stroke: #000; stroke-miterlimit: 10; stroke-width: 6px;"></circle>
53
53
 
54
54
  </g><g><line x1="351.01" y1="183.73000000000002" x2="415.78999999999996" y2="248.51" stroke="#000" stroke-width="15" stroke-linecap="round"></line><line x1="351.01" y1="248.51" x2="415.78999999999996" y2="183.73000000000002" stroke="#000" stroke-width="15" stroke-linecap="round"></line></g><g><line x1="142.70999999999998" y1="217.95" x2="207.49" y2="282.73" stroke="#000" stroke-width="15" stroke-linecap="round"></line><line x1="142.70999999999998" y1="282.73" x2="207.49" y2="217.95" stroke="#000" stroke-width="15" stroke-linecap="round"></line></g></g></g></svg>
55
- `,ne=`<?xml version="1.0" encoding="UTF-8"?>
55
+ `,re=`<?xml version="1.0" encoding="UTF-8"?>
56
56
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="100%" height="100%"><g transform="translate(151.53125, -171.3125) scale(1.25)"><g transform="translate(0, 21)"><g id="Cone">
57
57
  <path id="Cone_Bottom" data-name="Cone Bottom" d="M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z" style="fill: rgb(34, 34, 34); stroke: rgb(255, 255, 255); stroke-linejoin: round; stroke-width: 20px;"/>
58
58
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -78,7 +78,7 @@ import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./preload-helpe
78
78
  </g><g id="Left_Eye" data-name="Left Eye">
79
79
  <circle id="Right_Eye_Outline" data-name="Right Eye Outline" cx="175.1" cy="250.34" r="64.78" style="fill: rgb(0, 0, 0); stroke: rgb(255, 255, 255); stroke-miterlimit: 10; stroke-width: 6px;"/>
80
80
  <path id="Left_Pupil" data-name="Left Pupil" d="M213.74,233.23c-.13,1.98-.7,3.97-1.76,5.81-3.71,6.43-11.93,8.63-18.36,4.92-6.43-3.71-8.63-11.93-4.92-18.36,2.32-4.02,6.4-6.38,10.7-6.69-3.8-1.78-8.03-2.8-12.51-2.8-16.37,0-29.64,13.27-29.64,29.64s13.27,29.64,29.64,29.64,29.64-13.27,29.64-29.64c0-4.48-1.02-8.72-2.81-12.53Z" style="fill: rgb(255, 255, 255);"/>
81
- </g></g></g></svg>`,re=`<?xml version="1.0" encoding="UTF-8"?>
81
+ </g></g></g></svg>`,ie=`<?xml version="1.0" encoding="UTF-8"?>
82
82
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="100%" height="100%"><g transform="translate(191.47118749999993, 12.583024999999978) scale(1.1115000000000002)"><g transform="translate(0, 0)"><g id="Cone">
83
83
  <path id="Cone_Bottom" data-name="Cone Bottom" d="M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z" style="fill: rgb(34, 34, 34); stroke: rgb(255, 255, 255); stroke-linejoin: round; stroke-width: 20px;"/>
84
84
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -104,7 +104,7 @@ import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./preload-helpe
104
104
  </g><g id="Left_Eye" data-name="Left Eye">
105
105
  <circle id="Right_Eye_Outline" data-name="Right Eye Outline" cx="175.1" cy="250.34" r="64.78" style="fill: rgb(0, 0, 0); stroke: rgb(255, 255, 255); stroke-miterlimit: 10; stroke-width: 6px;"/>
106
106
  <path id="Left_Pupil" data-name="Left Pupil" d="M213.74,233.23c-.13,1.98-.7,3.97-1.76,5.81-3.71,6.43-11.93,8.63-18.36,4.92-6.43-3.71-8.63-11.93-4.92-18.36,2.32-4.02,6.4-6.38,10.7-6.69-3.8-1.78-8.03-2.8-12.51-2.8-16.37,0-29.64,13.27-29.64,29.64s13.27,29.64,29.64,29.64,29.64-13.27,29.64-29.64c0-4.48-1.02-8.72-2.81-12.53Z" style="fill: rgb(255, 255, 255);"/>
107
- </g></g></g></svg>`,ie=`<?xml version="1.0" encoding="UTF-8"?>
107
+ </g></g></g></svg>`,ae=`<?xml version="1.0" encoding="UTF-8"?>
108
108
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="100%" height="100%"><g transform="translate(151.53125, -171.3125) scale(1.25)"><g transform="translate(0, 21)"><g id="Cone">
109
109
  <path id="Cone_Bottom" data-name="Cone Bottom" d="M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z" style="fill: #fff; stroke: #000; stroke-linejoin: round; stroke-width: 20px;"/>
110
110
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -130,7 +130,7 @@ import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./preload-helpe
130
130
  </g><g id="Left_Eye" data-name="Left Eye">
131
131
  <circle id="Right_Eye_Outline" data-name="Right Eye Outline" cx="175.1" cy="250.34" r="64.78" style="fill: #fff; stroke: #000; stroke-miterlimit: 10; stroke-width: 6px;"/>
132
132
  <path id="Left_Pupil" data-name="Left Pupil" d="M213.74,233.23c-.13,1.98-.7,3.97-1.76,5.81-3.71,6.43-11.93,8.63-18.36,4.92-6.43-3.71-8.63-11.93-4.92-18.36,2.32-4.02,6.4-6.38,10.7-6.69-3.8-1.78-8.03-2.8-12.51-2.8-16.37,0-29.64,13.27-29.64,29.64s13.27,29.64,29.64,29.64,29.64-13.27,29.64-29.64c0-4.48-1.02-8.72-2.81-12.53Z" style="fill: rgb(0, 0, 0);"/>
133
- </g></g></g></svg>`,ae=`<?xml version="1.0" encoding="UTF-8"?>
133
+ </g></g></g></svg>`,oe=`<?xml version="1.0" encoding="UTF-8"?>
134
134
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="100%" height="100%"><g transform="translate(191.47118749999993, 12.583024999999978) scale(1.1115000000000002)"><g transform="translate(0, 0)"><g id="Cone">
135
135
  <path id="Cone_Bottom" data-name="Cone Bottom" d="M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z" style="fill: #fff; stroke: #000; stroke-linejoin: round; stroke-width: 20px;"/>
136
136
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -156,7 +156,7 @@ import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./preload-helpe
156
156
  </g><g id="Left_Eye" data-name="Left Eye">
157
157
  <circle id="Right_Eye_Outline" data-name="Right Eye Outline" cx="175.1" cy="250.34" r="64.78" style="fill: #fff; stroke: #000; stroke-miterlimit: 10; stroke-width: 6px;"/>
158
158
  <path id="Left_Pupil" data-name="Left Pupil" d="M213.74,233.23c-.13,1.98-.7,3.97-1.76,5.81-3.71,6.43-11.93,8.63-18.36,4.92-6.43-3.71-8.63-11.93-4.92-18.36,2.32-4.02,6.4-6.38,10.7-6.69-3.8-1.78-8.03-2.8-12.51-2.8-16.37,0-29.64,13.27-29.64,29.64s13.27,29.64,29.64,29.64,29.64-13.27,29.64-29.64c0-4.48-1.02-8.72-2.81-12.53Z" style="fill: rgb(0, 0, 0);"/>
159
- </g></g></g></svg>`;function oe(e,t){typeof customElements>`u`||customElements==null||customElements.get(e)||customElements.define(e,t)}function S(e,t){for(let n of t)n==null||n===!1||e.append(typeof n==`string`||typeof n==`number`?document.createTextNode(String(n)):n)}function C(e,t,...n){let r=document.createElement(e);if(t)for(let[e,n]of Object.entries(t))n==null||n===!1||(e===`class`?r.className=String(n):r.setAttribute(e,n===!0?``:String(n)));return S(r,n),r}function se(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var ce=se(`
159
+ </g></g></g></svg>`;function se(e,t){typeof customElements>`u`||customElements==null||customElements.get(e)||customElements.define(e,t)}function ce(e,t){for(let n of t)n==null||n===!1||e.append(typeof n==`string`||typeof n==`number`?document.createTextNode(String(n)):n)}function x(e,t,...n){let r=document.createElement(e);if(t)for(let[e,n]of Object.entries(t))n==null||n===!1||(e===`class`?r.className=String(n):r.setAttribute(e,n===!0?``:String(n)));return ce(r,n),r}function le(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var ue=le(`
160
160
  :host {
161
161
  all: initial;
162
162
  position: fixed;
@@ -319,7 +319,7 @@ import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./preload-helpe
319
319
  @media (prefers-reduced-motion: reduce) {
320
320
  .launcher, .sidebar, .backdrop { transition: none; }
321
321
  }
322
- `);function le(e){let t=e.replace(/<\?xml[^?]*\?>\s*/i,``),n=new DOMParser().parseFromString(t,`image/svg+xml`);return document.importNode(n.documentElement,!0)}var ue=[{state:`disconnected`,darkSvg:ne,lightSvg:ie},{state:`connected`,darkSvg:re,lightSvg:ae},{state:`error`,darkSvg:ee,lightSvg:te}];function de(){let e=C(`span`,{class:`logo`,part:`logo`});for(let{state:t,darkSvg:n,lightSvg:r}of ue){let i=C(`div`,{class:`logo-icon logo-for-dark`});i.appendChild(le(n));let a=C(`div`,{class:`logo-icon logo-for-light`});a.appendChild(le(r));let o=C(`span`,{class:`logo-state logo-state-${t}`,"aria-hidden":`true`},i,a);e.appendChild(o)}return e}function fe(e,t,n){return Math.min(Math.max(e,t),n)}function pe(e){try{return _(e?.localStorage.getItem(d))}catch{return u}}function me(e,t){try{e?.localStorage.setItem(d,t)}catch{}}oe(`slicc-launcher`,class extends HTMLElement{static observedAttributes=[`open`,`corner`,`app-url`,m];#e;#t;#n;#r;#i;#a;#o=``;#s=null;#c=!1;#l=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ce],this.#u()}connectedCallback(){if(!this.hasAttribute(`corner`)){let e=pe(this.ownerDocument.defaultView);this.#l=!0,this.setAttribute(`corner`,e),this.#l=!1}this.#f()}attributeChangedCallback(e){if(!this.#l&&(e===`app-url`&&this.#f(),e===`corner`&&me(this.ownerDocument.defaultView,this.corner),e===`follower-status`)){let e=this.getAttribute(m);if(e!==null){let t=v(e);t!==e&&(this.#l=!0,this.setAttribute(m,t),this.#l=!1)}}}get open(){return this.hasAttribute(`open`)}set open(e){this.open!==e&&(this.toggleAttribute(`open`,e),this.#d())}get corner(){return _(this.getAttribute(`corner`))}set corner(e){let t=_(e);this.corner===t&&this.hasAttribute(`corner`)||this.setAttribute(`corner`,t)}get appUrl(){return this.getAttribute(`app-url`)?.trim()??``}set appUrl(e){let t=(e??``).trim();t?this.setAttribute(`app-url`,t):this.removeAttribute(`app-url`)}get followerStatus(){return v(this.getAttribute(m))}set followerStatus(e){if(e==null){this.removeAttribute(m);return}let t=v(e);this.getAttribute(`follower-status`)!==t&&this.setAttribute(m,t)}show(){this.open=!0}hide(){this.open=!1}toggle(){this.open=!this.open}#u(){this.#t=C(`button`,{class:`launcher`,part:`launcher`,type:`button`,"aria-label":`Toggle SLICC`},de(),C(`span`,{class:`tab-label`,part:`tab-label`},`SLICC`)),this.#t.addEventListener(`click`,e=>{if(this.#c){this.#c=!1,e.preventDefault(),e.stopImmediatePropagation();return}this.toggle()}),this.#t.addEventListener(`dblclick`,e=>{e.preventDefault(),this.dispatchEvent(new CustomEvent(`slicc-launcher-focus`,{bubbles:!0,composed:!0}))}),this.#t.addEventListener(`pointerdown`,this.#p),this.#t.addEventListener(`pointermove`,this.#m),this.#t.addEventListener(`pointerup`,this.#h),this.#t.addEventListener(`pointercancel`,this.#g),this.#n=C(`div`,{class:`backdrop`,part:`backdrop`}),this.#n.addEventListener(`click`,()=>this.hide()),this.#i=C(`iframe`,{title:`SLICC overlay`}),this.#a=C(`div`,{class:`empty`},`Set the app-url attribute to load SLICC.`);let e=C(`div`,{class:`viewport`},this.#i,this.#a);this.#r=C(`aside`,{class:`sidebar`,part:`sidebar`,"aria-label":`SLICC launcher sidebar`},e),this.#e.replaceChildren(this.#n,this.#r,this.#t)}#d(){this.dispatchEvent(new CustomEvent(`slicc-launcher-toggle`,{detail:{open:this.open},bubbles:!0,composed:!0}))}#f(){let e=this.appUrl;if(this.#a.toggleAttribute(`hidden`,!!e),!e){this.#o&&(this.#o=``,this.#i.removeAttribute(`src`));return}e!==this.#o&&(this.#o=e,this.#i.src=e)}#p=e=>{if(!e.isPrimary||e.button!==0)return;let t=this.#t.getBoundingClientRect();this.#s={pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,startLeft:t.left,startTop:t.top,width:t.width,height:t.height,lastX:e.clientX,lastY:e.clientY,lastTimestamp:e.timeStamp,velocityX:0,velocityY:0,dragging:!1},this.#c=!1,this.#t.setPointerCapture(e.pointerId),e.preventDefault()};#m=e=>{let t=this.#s;if(!t||e.pointerId!==t.pointerId)return;let n=e.clientX-t.startX,r=e.clientY-t.startY,i=Math.hypot(n,r);!t.dragging&&y(i,0)&&(t.dragging=!0,this.setAttribute(`dragging`,``));let a=Math.max(e.timeStamp-t.lastTimestamp,1),o=(e.clientX-t.lastX)/a,s=(e.clientY-t.lastY)/a;if(t.velocityX=t.velocityX===0?o:t.velocityX*.35+o*.65,t.velocityY=t.velocityY===0?s:t.velocityY*.35+s*.65,t.lastX=e.clientX,t.lastY=e.clientY,t.lastTimestamp=e.timeStamp,!t.dragging)return;let c=Math.max(18,window.innerWidth-t.width-18),l=Math.max(18,window.innerHeight-t.height-18),u=fe(t.startLeft+n,18,c),d=fe(t.startTop+r,18,l);this.#t.style.left=`${u}px`,this.#t.style.top=`${d}px`,this.#t.style.right=`auto`,this.#t.style.bottom=`auto`,e.preventDefault()};#h=e=>{this.#_(e,!0)};#g=e=>{this.#_(e,!1)};#_(e,t){let n=this.#s;if(!n||e.pointerId!==n.pointerId)return;let r=Math.hypot(e.clientX-n.startX,e.clientY-n.startY),i=Math.hypot(n.velocityX,n.velocityY);if(t&&(n.dragging||y(r,i))){let t=b({clientX:e.clientX,clientY:e.clientY,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,velocityXPxPerMs:n.velocityX,velocityYPxPerMs:n.velocityY});this.corner=t,this.dispatchEvent(new CustomEvent(`slicc-launcher-move`,{detail:{corner:t},bubbles:!0,composed:!0})),this.#c=!0,e.preventDefault()}this.#t.hasPointerCapture(e.pointerId)&&this.#t.releasePointerCapture(e.pointerId),this.#s=null,this.removeAttribute(`dragging`),this.#t.style.left=``,this.#t.style.top=``,this.#t.style.right=``,this.#t.style.bottom=``}});function w(e,t){typeof customElements>`u`||customElements==null||customElements.get(e)||customElements.define(e,t)}function T(e,t){for(let n of t)n==null||n===!1||e.append(typeof n==`string`||typeof n==`number`?document.createTextNode(String(n)):n)}function E(e,t,...n){let r=document.createElement(e);if(t)for(let[e,n]of Object.entries(t))n==null||n===!1||(e===`class`?r.className=String(n):r.setAttribute(e,n===!0?``:String(n)));return T(r,n),r}function D(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var he=20,ge=16,_e=18,ve=D(`
322
+ `);function de(e){let t=e.replace(/<\?xml[^?]*\?>\s*/i,``),n=new DOMParser().parseFromString(t,`image/svg+xml`);return document.importNode(n.documentElement,!0)}var fe=[{state:`disconnected`,darkSvg:re,lightSvg:ae},{state:`connected`,darkSvg:ie,lightSvg:oe},{state:`error`,darkSvg:te,lightSvg:ne}];function pe(){let e=x(`span`,{class:`logo`,part:`logo`});for(let{state:t,darkSvg:n,lightSvg:r}of fe){let i=x(`div`,{class:`logo-icon logo-for-dark`});i.appendChild(de(n));let a=x(`div`,{class:`logo-icon logo-for-light`});a.appendChild(de(r));let o=x(`span`,{class:`logo-state logo-state-${t}`,"aria-hidden":`true`},i,a);e.appendChild(o)}return e}function me(e,t,n){return Math.min(Math.max(e,t),n)}function he(e){try{return _(e?.localStorage.getItem(d))}catch{return u}}function ge(e,t){try{e?.localStorage.setItem(d,t)}catch{}}se(`slicc-launcher`,class extends HTMLElement{static observedAttributes=[`open`,`corner`,`app-url`,m];#e;#t;#n;#r;#i;#a;#o=``;#s=null;#c=!1;#l=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ue],this.#u()}connectedCallback(){if(!this.hasAttribute(`corner`)){let e=he(this.ownerDocument.defaultView);this.#l=!0,this.setAttribute(`corner`,e),this.#l=!1}this.#f()}attributeChangedCallback(e){if(!this.#l&&(e===`app-url`&&this.#f(),e===`corner`&&ge(this.ownerDocument.defaultView,this.corner),e===`follower-status`)){let e=this.getAttribute(m);if(e!==null){let t=v(e);t!==e&&(this.#l=!0,this.setAttribute(m,t),this.#l=!1)}}}get open(){return this.hasAttribute(`open`)}set open(e){this.open!==e&&(this.toggleAttribute(`open`,e),this.#d())}get corner(){return _(this.getAttribute(`corner`))}set corner(e){let t=_(e);this.corner===t&&this.hasAttribute(`corner`)||this.setAttribute(`corner`,t)}get appUrl(){return this.getAttribute(`app-url`)?.trim()??``}set appUrl(e){let t=(e??``).trim();t?this.setAttribute(`app-url`,t):this.removeAttribute(`app-url`)}get followerStatus(){return v(this.getAttribute(m))}set followerStatus(e){if(e==null){this.removeAttribute(m);return}let t=v(e);this.getAttribute(`follower-status`)!==t&&this.setAttribute(m,t)}show(){this.open=!0}hide(){this.open=!1}toggle(){this.open=!this.open}#u(){this.#t=x(`button`,{class:`launcher`,part:`launcher`,type:`button`,"aria-label":`Toggle SLICC`},pe(),x(`span`,{class:`tab-label`,part:`tab-label`},`SLICC`)),this.#t.addEventListener(`click`,e=>{if(this.#c){this.#c=!1,e.preventDefault(),e.stopImmediatePropagation();return}this.toggle()}),this.#t.addEventListener(`dblclick`,e=>{e.preventDefault(),this.dispatchEvent(new CustomEvent(`slicc-launcher-focus`,{bubbles:!0,composed:!0}))}),this.#t.addEventListener(`pointerdown`,this.#p),this.#t.addEventListener(`pointermove`,this.#m),this.#t.addEventListener(`pointerup`,this.#h),this.#t.addEventListener(`pointercancel`,this.#g),this.#n=x(`div`,{class:`backdrop`,part:`backdrop`}),this.#n.addEventListener(`click`,()=>this.hide()),this.#i=x(`iframe`,{title:`SLICC overlay`}),this.#a=x(`div`,{class:`empty`},`Set the app-url attribute to load SLICC.`);let e=x(`div`,{class:`viewport`},this.#i,this.#a);this.#r=x(`aside`,{class:`sidebar`,part:`sidebar`,"aria-label":`SLICC launcher sidebar`},e),this.#e.replaceChildren(this.#n,this.#r,this.#t)}#d(){this.dispatchEvent(new CustomEvent(`slicc-launcher-toggle`,{detail:{open:this.open},bubbles:!0,composed:!0}))}#f(){let e=this.appUrl;if(this.#a.toggleAttribute(`hidden`,!!e),!e){this.#o&&(this.#o=``,this.#i.removeAttribute(`src`));return}e!==this.#o&&(this.#o=e,this.#i.src=e)}#p=e=>{if(!e.isPrimary||e.button!==0)return;let t=this.#t.getBoundingClientRect();this.#s={pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,startLeft:t.left,startTop:t.top,width:t.width,height:t.height,lastX:e.clientX,lastY:e.clientY,lastTimestamp:e.timeStamp,velocityX:0,velocityY:0,dragging:!1},this.#c=!1,this.#t.setPointerCapture(e.pointerId),e.preventDefault()};#m=e=>{let t=this.#s;if(!t||e.pointerId!==t.pointerId)return;let n=e.clientX-t.startX,r=e.clientY-t.startY,i=Math.hypot(n,r);!t.dragging&&y(i,0)&&(t.dragging=!0,this.setAttribute(`dragging`,``));let a=Math.max(e.timeStamp-t.lastTimestamp,1),o=(e.clientX-t.lastX)/a,s=(e.clientY-t.lastY)/a;if(t.velocityX=t.velocityX===0?o:t.velocityX*.35+o*.65,t.velocityY=t.velocityY===0?s:t.velocityY*.35+s*.65,t.lastX=e.clientX,t.lastY=e.clientY,t.lastTimestamp=e.timeStamp,!t.dragging)return;let c=Math.max(18,window.innerWidth-t.width-18),l=Math.max(18,window.innerHeight-t.height-18),u=me(t.startLeft+n,18,c),d=me(t.startTop+r,18,l);this.#t.style.left=`${u}px`,this.#t.style.top=`${d}px`,this.#t.style.right=`auto`,this.#t.style.bottom=`auto`,e.preventDefault()};#h=e=>{this.#_(e,!0)};#g=e=>{this.#_(e,!1)};#_(e,t){let n=this.#s;if(!n||e.pointerId!==n.pointerId)return;let r=Math.hypot(e.clientX-n.startX,e.clientY-n.startY),i=Math.hypot(n.velocityX,n.velocityY);if(t&&(n.dragging||y(r,i))){let t=ee({clientX:e.clientX,clientY:e.clientY,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,velocityXPxPerMs:n.velocityX,velocityYPxPerMs:n.velocityY});this.corner=t,this.dispatchEvent(new CustomEvent(`slicc-launcher-move`,{detail:{corner:t},bubbles:!0,composed:!0})),this.#c=!0,e.preventDefault()}this.#t.hasPointerCapture(e.pointerId)&&this.#t.releasePointerCapture(e.pointerId),this.#s=null,this.removeAttribute(`dragging`),this.#t.style.left=``,this.#t.style.top=``,this.#t.style.right=``,this.#t.style.bottom=``}});function S(e,t){typeof customElements>`u`||customElements==null||customElements.get(e)||customElements.define(e,t)}function C(e,t){for(let n of t)n==null||n===!1||e.append(typeof n==`string`||typeof n==`number`?document.createTextNode(String(n)):n)}function w(e,t,...n){let r=document.createElement(e);if(t)for(let[e,n]of Object.entries(t))n==null||n===!1||(e===`class`?r.className=String(n):r.setAttribute(e,n===!0?``:String(n)));return C(r,n),r}function T(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var _e=20,ve=16,ye=18,be=T(`
323
323
  :host{display:block;width:100%;
324
324
  --am-accent:var(--accent,#3b63fb);
325
325
  --am-accent-subtle:color-mix(in oklab,var(--am-accent) 12%,var(--canvas,#fff));
@@ -375,7 +375,7 @@ import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./preload-helpe
375
375
  .sep{height:1px;background:var(--line,#e1e1e1);margin:6px 4px;}
376
376
  .drop{position:absolute;inset:0;border-radius:10px;display:none;align-items:center;justify-content:center;text-align:center;background:var(--am-accent-subtle);border:2px dashed var(--am-accent);color:var(--am-accent);font-size:13px;font-weight:600;pointer-events:none;}
377
377
  :host([data-dropping]) .drop{display:flex;}
378
- `),ye=[{kind:`file`,label:`Files`,icon:`file`,entries:[{id:`/workspace/README.md`,label:`README.md`,sub:`/workspace`},{id:`/workspace/src/main.ts`,label:`main.ts`,sub:`/workspace/src`},{id:`/workspace/src/orchestrator.ts`,label:`orchestrator.ts`,sub:`/workspace/src`},{id:`/workspace/notes/launch-plan.md`,label:`launch-plan.md`,sub:`/workspace/notes`},{id:`/shared/CLAUDE.md`,label:`CLAUDE.md`,sub:`/shared`},{id:`/tmp/screenshot-3.png`,label:`screenshot-3.png`,sub:`/tmp`}]},{kind:`skill`,label:`Skills`,icon:`sparkles`,entries:[{id:`slicc-handoff`,label:`slicc-handoff`,sub:`Continue work in the SLICC browser agent`},{id:`playwright-cli`,label:`playwright-cli`,sub:`Automate browser interactions`},{id:`mixtape`,label:`mixtape`,sub:`Curate themed music playlists`},{id:`wavespeed`,label:`wavespeed`,sub:`Generate images, video and speech`},{id:`save-the-cat`,label:`save-the-cat`,sub:`Screenwriting beat sheets`}]},{kind:`conversation`,label:`Conversations`,icon:`message-square`,entries:[{id:`c1`,label:`Dark mode toggle`,sub:`Frozen · 2h ago`},{id:`c2`,label:`Refactor the mount backend`,sub:`Frozen · yesterday`},{id:`c3`,label:`Add slash menu (declined)`,sub:`Frozen · 3 days ago`},{id:`c4`,label:`WebGL shader walkthrough`,sub:`Frozen · last week`}]}],be=[{kind:`upload`,icon:`upload`,label:`Upload from this computer`,sub:`Drag & drop or click to browse`,quick:!0},{kind:`capture`,mode:`photo`,icon:`image`,label:`Take a photo`,quick:!0},{kind:`capture`,mode:`screenshot`,icon:`monitor`,label:`Take a screenshot`,quick:!0}];w(`slicc-add-menu`,class extends HTMLElement{static observedAttributes=[`theme`,`global-drop`,`no-camera`];#e;#t=null;#n=null;#r=!1;#i=``;#a=0;#o=[];#s=0;#c;#l;#u;#d;#f;#p;#m=e=>{this.#r&&!this.contains(e.target)&&this.close()};#h=!1;#g=0;#_=!1;#v(e){let t=e.dataTransfer?.types;return!!t&&Array.from(t).includes(`Files`)}#y(){this.#r||(this.#_=!0,this.open()),this.setAttribute(`data-dropping`,``)}#b(){this.#g=0,this.removeAttribute(`data-dropping`),this.#_&&(this.#_=!1,this.close())}#x=e=>{this.#v(e)&&(e.preventDefault(),this.#g++,!e.composedPath().includes(this.#u)&&this.#y())};#S=e=>{this.#v(e)&&e.preventDefault()};#C=e=>{this.#v(e)&&(this.#g=Math.max(0,this.#g-1),this.#g===0&&this.#b())};#w=e=>{if(!this.#v(e))return;if(e.preventDefault(),this.#g=0,e.composedPath().includes(this.#u)){this.#_=!1;return}this.removeAttribute(`data-dropping`),this.#_=!1;let t=e.dataTransfer?.files;if(t?.length)for(let e of Array.from(t))this.#B({kind:`upload`,name:e.name,size:e.size,file:e});this.close()};#T(){this.isConnected&&this.hasAttribute(`global-drop`)?this.#E():this.#D()}#E(){if(this.#h)return;this.#h=!0;let e=this.ownerDocument;e.addEventListener(`dragenter`,this.#x),e.addEventListener(`dragover`,this.#S),e.addEventListener(`dragleave`,this.#C),e.addEventListener(`drop`,this.#w)}#D(){if(!this.#h)return;this.#h=!1;let e=this.ownerDocument;e.removeEventListener(`dragenter`,this.#x),e.removeEventListener(`dragover`,this.#S),e.removeEventListener(`dragleave`,this.#C),e.removeEventListener(`drop`,this.#w),this.#g=0,this.#_=!1}constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ve]}connectedCallback(){this.#k(),this.#T()}disconnectedCallback(){document.removeEventListener(`mousedown`,this.#m),this.#D()}attributeChangedCallback(e){e===`global-drop`?this.#T():e===`no-camera`&&this.#r&&this.#P()}#O(){return this.hasAttribute(`no-camera`)?be.filter(e=>!(e.kind===`capture`&&e.mode===`photo`)):be}get results(){return this.#t}set results(e){this.#t=e,this.#r&&this.#P()}get provider(){return this.#n}set provider(e){this.#n=e,this.#r&&this.#P()}get isOpen(){return this.#r}#k(){let e=E(`input`,{type:`file`,multiple:!0,hidden:!0}),t=E(`div`,{class:`body`}),r=E(`div`,{class:`results`,part:`results`,role:`listbox`},t,E(`div`,{class:`drop`},`Drop files to add`)),i=E(`span`,{class:`ti`},n(`plus`,{size:he})),a=E(`button`,{class:`trigger`,part:`trigger`,"aria-haspopup":`true`,"aria-expanded":`false`,title:`Add to prompt`},i),o=E(`input`,{type:`text`,placeholder:`Search files, skills, conversations…`}),s=E(`div`,{class:`wrap`,part:`wrap`},r,E(`div`,{class:`row`},a,E(`div`,{class:`searchbox`},E(`span`,{class:`si`},n(`search`,{size:ge})),o)));this.#e.replaceChildren(e,s),this.#c=a,this.#l=i,this.#u=s,this.#d=o,this.#f=t,this.#p=e,this.#A(),this.#P()}#A(){this.#c.addEventListener(`click`,()=>this.toggle()),this.#d.addEventListener(`input`,()=>{this.#i=this.#d.value,this.#a=0,this.#P()}),this.#d.addEventListener(`keydown`,e=>this.#R(e)),this.#p.addEventListener(`change`,()=>{for(let e of Array.from(this.#p.files??[]))this.#B({kind:`upload`,name:e.name,size:e.size,file:e});this.#p.value=``,this.close()});for(let e of[`dragenter`,`dragover`])this.#u.addEventListener(e,e=>{e.preventDefault(),this.#r||this.open(),this.setAttribute(`data-dropping`,``)});for(let e of[`dragleave`,`drop`])this.#u.addEventListener(e,t=>{t.preventDefault();let n=t;e===`dragleave`&&this.#u.contains(n.relatedTarget)||this.removeAttribute(`data-dropping`)});this.#u.addEventListener(`drop`,e=>{let t=e.dataTransfer?.files;if(t?.length){for(let e of Array.from(t))this.#B({kind:`upload`,name:e.name,size:e.size,file:e});this.close()}})}toggle(){this.#r?this.close():this.open()}#j(e){this.#l.replaceChildren(n(e?`x`:`plus`,{size:he}))}open(){this.#r||(this.#r=!0,this.setAttribute(`data-open`,``),this.#c.setAttribute(`aria-expanded`,`true`),this.#j(!0),document.addEventListener(`mousedown`,this.#m),this.#i=``,this.#d.value=``,this.#a=0,this.#P(),requestAnimationFrame(()=>this.#d.focus()))}close(){this.#r&&(this.#r=!1,this.removeAttribute(`data-open`),this.removeAttribute(`data-dropping`),this.#c.setAttribute(`aria-expanded`,`false`),this.#j(!1),document.removeEventListener(`mousedown`,this.#m))}async#M(e){if(this.#n){let t=await this.#n(e);if(t)return t}return this.#t??ye}#N(e){let t=this.#i.trim().toLowerCase(),n=e=>!t||`${e.label} ${e.sub??``}`.toLowerCase().includes(t),r=[],i=this.#O();if(!t)for(let e of i)r.push({type:`quick`,data:e});else if(`upload take a photo screenshot`.includes(t))for(let e of i)e.label.toLowerCase().includes(t)&&r.push({type:`quick`,data:e});for(let i of e){let e=i.entries.filter(n).slice(0,t?8:4);if(e.length){r.push({type:`sec`,label:i.label});for(let t of e)r.push({type:`row`,section:i,data:t})}}return r}async#P(){let e=++this.#s,t=await this.#M(this.#i.trim().toLowerCase());if(e!==this.#s)return;let r=this.#N(t);this.#o=[];let i=[],a=!1;for(let e of r)if(e.type===`sec`)a&&i.push(E(`div`,{class:`sep`})),i.push(E(`div`,{class:`sec`},e.label)),a=!1;else if(e.type===`quick`){let t=this.#o.length;this.#o.push(e.data.kind===`upload`?{kind:`upload`,name:``,size:0}:{kind:`capture`,mode:e.data.mode??`photo`,label:e.data.label});let r=E(`span`,{class:`tx`},E(`div`,{class:`lb`},e.data.label));e.data.sub&&r.append(E(`div`,{class:`sb`},e.data.sub)),i.push(E(`div`,{class:`item quick`,"data-i":t},E(`span`,{class:`ic`},n(e.data.icon,{size:_e})),r)),a=!0}else{let t=this.#o.length;this.#o.push({kind:e.section.kind,id:e.data.id,label:e.data.label}),i.push(E(`div`,{class:`item`,"data-i":t},E(`span`,{class:`ic`},n(e.section.icon,{size:_e})),E(`span`,{class:`tx`},E(`div`,{class:`lb`},e.data.label),E(`div`,{class:`sb`},e.data.sub??``))))}i.length?this.#f.replaceChildren(...i):this.#f.replaceChildren(E(`div`,{class:`empty`},`No matches for “${this.#i}”.`));for(let e of Array.from(this.#f.querySelectorAll(`.item`))){let t=Number(e.dataset.i);e.addEventListener(`mouseenter`,()=>this.#I(t)),e.addEventListener(`click`,()=>this.#z(t))}this.#a>=this.#o.length&&(this.#a=0),this.#F()}#F(){for(let e of Array.from(this.#f.querySelectorAll(`.item`)))e.classList.toggle(`active`,Number(e.dataset.i)===this.#a)}#I(e){this.#a=e,this.#F()}#L(e){if(!this.#o.length)return;this.#a=(this.#a+e+this.#o.length)%this.#o.length,this.#F();let t=this.#f.querySelector(`.item[data-i="${this.#a}"]`);t&&t.scrollIntoView({block:`nearest`})}#R(e){e.key===`ArrowDown`?(e.preventDefault(),this.#L(1)):e.key===`ArrowUp`?(e.preventDefault(),this.#L(-1)):e.key===`Enter`?(e.preventDefault(),this.#z(this.#a)):e.key===`Escape`&&(e.preventDefault(),this.close(),this.#c.focus())}#z(e){let t=this.#o[e];if(t){if(t.kind===`upload`){this.#p.click();return}this.#B(t),this.close()}}#B(e){this.dispatchEvent(new CustomEvent(`slicc-add`,{detail:e,bubbles:!0,composed:!0}))}});var xe=D(`
378
+ `),xe=[{kind:`file`,label:`Files`,icon:`file`,entries:[{id:`/workspace/README.md`,label:`README.md`,sub:`/workspace`},{id:`/workspace/src/main.ts`,label:`main.ts`,sub:`/workspace/src`},{id:`/workspace/src/orchestrator.ts`,label:`orchestrator.ts`,sub:`/workspace/src`},{id:`/workspace/notes/launch-plan.md`,label:`launch-plan.md`,sub:`/workspace/notes`},{id:`/shared/CLAUDE.md`,label:`CLAUDE.md`,sub:`/shared`},{id:`/tmp/screenshot-3.png`,label:`screenshot-3.png`,sub:`/tmp`}]},{kind:`skill`,label:`Skills`,icon:`sparkles`,entries:[{id:`slicc-handoff`,label:`slicc-handoff`,sub:`Continue work in the SLICC browser agent`},{id:`playwright-cli`,label:`playwright-cli`,sub:`Automate browser interactions`},{id:`mixtape`,label:`mixtape`,sub:`Curate themed music playlists`},{id:`wavespeed`,label:`wavespeed`,sub:`Generate images, video and speech`},{id:`save-the-cat`,label:`save-the-cat`,sub:`Screenwriting beat sheets`}]},{kind:`conversation`,label:`Conversations`,icon:`message-square`,entries:[{id:`c1`,label:`Dark mode toggle`,sub:`Frozen · 2h ago`},{id:`c2`,label:`Refactor the mount backend`,sub:`Frozen · yesterday`},{id:`c3`,label:`Add slash menu (declined)`,sub:`Frozen · 3 days ago`},{id:`c4`,label:`WebGL shader walkthrough`,sub:`Frozen · last week`}]}],Se=[{kind:`upload`,icon:`upload`,label:`Upload from this computer`,sub:`Drag & drop or click to browse`,quick:!0},{kind:`capture`,mode:`photo`,icon:`image`,label:`Take a photo`,quick:!0},{kind:`capture`,mode:`screenshot`,icon:`monitor`,label:`Take a screenshot`,quick:!0}];S(`slicc-add-menu`,class extends HTMLElement{static observedAttributes=[`theme`,`global-drop`,`no-camera`];#e;#t=null;#n=null;#r=!1;#i=``;#a=0;#o=[];#s=0;#c;#l;#u;#d;#f;#p;#m=e=>{this.#r&&!this.contains(e.target)&&this.close()};#h=!1;#g=0;#_=!1;#v(e){let t=e.dataTransfer?.types;return!!t&&Array.from(t).includes(`Files`)}#y(){this.#r||(this.#_=!0,this.open()),this.setAttribute(`data-dropping`,``)}#b(){this.#g=0,this.removeAttribute(`data-dropping`),this.#_&&(this.#_=!1,this.close())}#x=e=>{this.#v(e)&&(e.preventDefault(),this.#g++,!e.composedPath().includes(this.#u)&&this.#y())};#S=e=>{this.#v(e)&&e.preventDefault()};#C=e=>{this.#v(e)&&(this.#g=Math.max(0,this.#g-1),this.#g===0&&this.#b())};#w=e=>{if(!this.#v(e))return;if(e.preventDefault(),this.#g=0,e.composedPath().includes(this.#u)){this.#_=!1;return}this.removeAttribute(`data-dropping`),this.#_=!1;let t=e.dataTransfer?.files;if(t?.length)for(let e of Array.from(t))this.#B({kind:`upload`,name:e.name,size:e.size,file:e});this.close()};#T(){this.isConnected&&this.hasAttribute(`global-drop`)?this.#E():this.#D()}#E(){if(this.#h)return;this.#h=!0;let e=this.ownerDocument;e.addEventListener(`dragenter`,this.#x),e.addEventListener(`dragover`,this.#S),e.addEventListener(`dragleave`,this.#C),e.addEventListener(`drop`,this.#w)}#D(){if(!this.#h)return;this.#h=!1;let e=this.ownerDocument;e.removeEventListener(`dragenter`,this.#x),e.removeEventListener(`dragover`,this.#S),e.removeEventListener(`dragleave`,this.#C),e.removeEventListener(`drop`,this.#w),this.#g=0,this.#_=!1}constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[be]}connectedCallback(){this.#k(),this.#T()}disconnectedCallback(){document.removeEventListener(`mousedown`,this.#m),this.#D()}attributeChangedCallback(e){e===`global-drop`?this.#T():e===`no-camera`&&this.#r&&this.#P()}#O(){return this.hasAttribute(`no-camera`)?Se.filter(e=>!(e.kind===`capture`&&e.mode===`photo`)):Se}get results(){return this.#t}set results(e){this.#t=e,this.#r&&this.#P()}get provider(){return this.#n}set provider(e){this.#n=e,this.#r&&this.#P()}get isOpen(){return this.#r}#k(){let e=w(`input`,{type:`file`,multiple:!0,hidden:!0}),t=w(`div`,{class:`body`}),r=w(`div`,{class:`results`,part:`results`,role:`listbox`},t,w(`div`,{class:`drop`},`Drop files to add`)),i=w(`span`,{class:`ti`},n(`plus`,{size:_e})),a=w(`button`,{class:`trigger`,part:`trigger`,"aria-haspopup":`true`,"aria-expanded":`false`,title:`Add to prompt`},i),o=w(`input`,{type:`text`,placeholder:`Search files, skills, conversations…`}),s=w(`div`,{class:`wrap`,part:`wrap`},r,w(`div`,{class:`row`},a,w(`div`,{class:`searchbox`},w(`span`,{class:`si`},n(`search`,{size:ve})),o)));this.#e.replaceChildren(e,s),this.#c=a,this.#l=i,this.#u=s,this.#d=o,this.#f=t,this.#p=e,this.#A(),this.#P()}#A(){this.#c.addEventListener(`click`,()=>this.toggle()),this.#d.addEventListener(`input`,()=>{this.#i=this.#d.value,this.#a=0,this.#P()}),this.#d.addEventListener(`keydown`,e=>this.#R(e)),this.#p.addEventListener(`change`,()=>{for(let e of Array.from(this.#p.files??[]))this.#B({kind:`upload`,name:e.name,size:e.size,file:e});this.#p.value=``,this.close()});for(let e of[`dragenter`,`dragover`])this.#u.addEventListener(e,e=>{e.preventDefault(),this.#r||this.open(),this.setAttribute(`data-dropping`,``)});for(let e of[`dragleave`,`drop`])this.#u.addEventListener(e,t=>{t.preventDefault();let n=t;e===`dragleave`&&this.#u.contains(n.relatedTarget)||this.removeAttribute(`data-dropping`)});this.#u.addEventListener(`drop`,e=>{let t=e.dataTransfer?.files;if(t?.length){for(let e of Array.from(t))this.#B({kind:`upload`,name:e.name,size:e.size,file:e});this.close()}})}toggle(){this.#r?this.close():this.open()}#j(e){this.#l.replaceChildren(n(e?`x`:`plus`,{size:_e}))}open(){this.#r||(this.#r=!0,this.setAttribute(`data-open`,``),this.#c.setAttribute(`aria-expanded`,`true`),this.#j(!0),document.addEventListener(`mousedown`,this.#m),this.#i=``,this.#d.value=``,this.#a=0,this.#P(),requestAnimationFrame(()=>this.#d.focus()))}close(){this.#r&&(this.#r=!1,this.removeAttribute(`data-open`),this.removeAttribute(`data-dropping`),this.#c.setAttribute(`aria-expanded`,`false`),this.#j(!1),document.removeEventListener(`mousedown`,this.#m))}async#M(e){if(this.#n){let t=await this.#n(e);if(t)return t}return this.#t??xe}#N(e){let t=this.#i.trim().toLowerCase(),n=e=>!t||`${e.label} ${e.sub??``}`.toLowerCase().includes(t),r=[],i=this.#O();if(!t)for(let e of i)r.push({type:`quick`,data:e});else if(`upload take a photo screenshot`.includes(t))for(let e of i)e.label.toLowerCase().includes(t)&&r.push({type:`quick`,data:e});for(let i of e){let e=i.entries.filter(n).slice(0,t?8:4);if(e.length){r.push({type:`sec`,label:i.label});for(let t of e)r.push({type:`row`,section:i,data:t})}}return r}async#P(){let e=++this.#s,t=await this.#M(this.#i.trim().toLowerCase());if(e!==this.#s)return;let r=this.#N(t);this.#o=[];let i=[],a=!1;for(let e of r)if(e.type===`sec`)a&&i.push(w(`div`,{class:`sep`})),i.push(w(`div`,{class:`sec`},e.label)),a=!1;else if(e.type===`quick`){let t=this.#o.length;this.#o.push(e.data.kind===`upload`?{kind:`upload`,name:``,size:0}:{kind:`capture`,mode:e.data.mode??`photo`,label:e.data.label});let r=w(`span`,{class:`tx`},w(`div`,{class:`lb`},e.data.label));e.data.sub&&r.append(w(`div`,{class:`sb`},e.data.sub)),i.push(w(`div`,{class:`item quick`,"data-i":t},w(`span`,{class:`ic`},n(e.data.icon,{size:ye})),r)),a=!0}else{let t=this.#o.length;this.#o.push({kind:e.section.kind,id:e.data.id,label:e.data.label}),i.push(w(`div`,{class:`item`,"data-i":t},w(`span`,{class:`ic`},n(e.section.icon,{size:ye})),w(`span`,{class:`tx`},w(`div`,{class:`lb`},e.data.label),w(`div`,{class:`sb`},e.data.sub??``))))}i.length?this.#f.replaceChildren(...i):this.#f.replaceChildren(w(`div`,{class:`empty`},`No matches for “${this.#i}”.`));for(let e of Array.from(this.#f.querySelectorAll(`.item`))){let t=Number(e.dataset.i);e.addEventListener(`mouseenter`,()=>this.#I(t)),e.addEventListener(`click`,()=>this.#z(t))}this.#a>=this.#o.length&&(this.#a=0),this.#F()}#F(){for(let e of Array.from(this.#f.querySelectorAll(`.item`)))e.classList.toggle(`active`,Number(e.dataset.i)===this.#a)}#I(e){this.#a=e,this.#F()}#L(e){if(!this.#o.length)return;this.#a=(this.#a+e+this.#o.length)%this.#o.length,this.#F();let t=this.#f.querySelector(`.item[data-i="${this.#a}"]`);t&&t.scrollIntoView({block:`nearest`})}#R(e){e.key===`ArrowDown`?(e.preventDefault(),this.#L(1)):e.key===`ArrowUp`?(e.preventDefault(),this.#L(-1)):e.key===`Enter`?(e.preventDefault(),this.#z(this.#a)):e.key===`Escape`&&(e.preventDefault(),this.close(),this.#c.focus())}#z(e){let t=this.#o[e];if(t){if(t.kind===`upload`){this.#p.click();return}this.#B(t),this.close()}}#B(e){this.dispatchEvent(new CustomEvent(`slicc-add`,{detail:e,bubbles:!0,composed:!0}))}});var Ce=T(`
379
379
  :host {
380
380
  display: inline-grid;
381
381
  grid-auto-flow: column;
@@ -409,7 +409,7 @@ import{n as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./preload-helpe
409
409
  .glyph { display: grid; place-items: center; pointer-events: none; }
410
410
  .glyph svg { display: block; }
411
411
  .label { pointer-events: none; }
412
- `),Se=[{cue:`sent`,label:`Sent`,icon:`send`},{cue:`tool-start`,label:`Tool start`,icon:`play`},{cue:`tool-finish`,label:`Tool finish`,icon:`check`}],Ce=14;w(`slicc-soundboard`,class extends HTMLElement{#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[xe]}connectedCallback(){this.#i()}get audioContext(){return this.#t}#n(){return typeof AudioContext>`u`?null:((!this.#t||this.#t.state===`closed`)&&(this.#t=new AudioContext),this.#t)}#r(e){let t=this.#n();t&&(t.state===`suspended`&&t.resume(),c(t,e))}#i(){let e=Se.map(({cue:e,label:t,icon:r})=>{let i=n(r,{size:Ce,part:`icon`}),a=E(`button`,{type:`button`,class:`cue`,part:`button`,"data-cue":e,"aria-label":`Play ${t} cue`,title:`Play ${t} cue`},E(`span`,{class:`glyph`},i),E(`span`,{class:`label`,part:`label`},t));return a.addEventListener(`click`,()=>this.#r(e)),a});this.#e.replaceChildren(...e)}});var we=`
412
+ `),we=[{cue:`sent`,label:`Sent`,icon:`send`},{cue:`tool-start`,label:`Tool start`,icon:`play`},{cue:`tool-finish`,label:`Tool finish`,icon:`check`}],Te=14;S(`slicc-soundboard`,class extends HTMLElement{#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ce]}connectedCallback(){this.#i()}get audioContext(){return this.#t}#n(){return typeof AudioContext>`u`?null:((!this.#t||this.#t.state===`closed`)&&(this.#t=new AudioContext),this.#t)}#r(e){let t=this.#n();t&&(t.state===`suspended`&&t.resume(),c(t,e))}#i(){let e=we.map(({cue:e,label:t,icon:r})=>{let i=n(r,{size:Te,part:`icon`}),a=w(`button`,{type:`button`,class:`cue`,part:`button`,"data-cue":e,"aria-label":`Play ${t} cue`,title:`Play ${t} cue`},w(`span`,{class:`glyph`},i),w(`span`,{class:`label`,part:`label`},t));return a.addEventListener(`click`,()=>this.#r(e)),a});this.#e.replaceChildren(...e)}});var Ee=`
413
413
  slicc-action-card { display: block; }
414
414
 
415
415
  /* in-chat tool / terminal / git card (.tcard) */
@@ -527,7 +527,7 @@ slicc-action-card .prcard .pmeta {
527
527
  slicc-action-card .prcard .pmeta b { color: var(--ink); }
528
528
  slicc-action-card .prcard .pmeta .add { color: #1a7f37; }
529
529
  slicc-action-card .prcard .pmeta .del { color: #cf222e; }
530
- `,Te=`slicc-action-card-style`;function Ee(e){if(e.getElementById(Te))return;let t=e.createElement(`style`);t.id=Te,t.textContent=we,(e.head??e.documentElement).appendChild(t)}var De=new Set([`tool`,`light`,`pr`]),Oe=new Set([`ink`,`cy`,`vi`,`am`,`gh`]);w(`slicc-action-card`,class extends HTMLElement{static observedAttributes=[`variant`,`glyph`,`tone`,`title`,`badge`,`number`,`status`,`branch`,`files`,`add`,`del`,`checks`];#e=[];#t=!1;connectedCallback(){Ee(this.ownerDocument),this.classList.add(`slicc-action-card`),this.#a(),this.#n()}attributeChangedCallback(e,t,n){!this.isConnected||t===n||(this.#n(),e===`variant`&&this.dispatchEvent(new CustomEvent(`slicc-action-card-change`,{bubbles:!0,composed:!0,detail:{variant:this.variant}})))}get variant(){let e=this.getAttribute(`variant`);return e&&De.has(e)?e:`tool`}set variant(e){this.setAttribute(`variant`,De.has(e)?e:`tool`)}get glyph(){return this.getAttribute(`glyph`)}set glyph(e){e==null?this.removeAttribute(`glyph`):this.setAttribute(`glyph`,e)}get tone(){let e=this.getAttribute(`tone`);return e&&Oe.has(e)?e:`ink`}set tone(e){this.setAttribute(`tone`,Oe.has(e)?e:`ink`)}get title(){return this.getAttribute(`title`)??``}set title(e){e==null?this.removeAttribute(`title`):this.setAttribute(`title`,e)}get badge(){return this.getAttribute(`badge`)}set badge(e){e==null?this.removeAttribute(`badge`):this.setAttribute(`badge`,e)}get number(){return this.getAttribute(`number`)}set number(e){e==null?this.removeAttribute(`number`):this.setAttribute(`number`,e)}get status(){return this.getAttribute(`status`)}set status(e){e==null?this.removeAttribute(`status`):this.setAttribute(`status`,e)}get branch(){return this.getAttribute(`branch`)}set branch(e){e==null?this.removeAttribute(`branch`):this.setAttribute(`branch`,e)}get files(){return this.getAttribute(`files`)}set files(e){e==null?this.removeAttribute(`files`):this.setAttribute(`files`,e)}get add(){return this.getAttribute(`add`)}set add(e){e==null?this.removeAttribute(`add`):this.setAttribute(`add`,e)}get del(){return this.getAttribute(`del`)}set del(e){e==null?this.removeAttribute(`del`):this.setAttribute(`del`,e)}get checks(){return this.getAttribute(`checks`)}set checks(e){e==null?this.removeAttribute(`checks`):this.setAttribute(`checks`,e)}#n(){let e=this.variant;e===`pr`?this.#i():this.#r(e===`light`)}#r(e){let t=this.glyph,n=this.tone,r=this.title,i=this.badge,a=n===`ink`?`ic`:`ic ${n}`,o=E(`div`,{class:`th`,part:`header`});T(o,[E(`span`,{class:a,part:`icon`},t??null),` `,E(`span`,{class:`nm`,part:`title`},r),i==null?null:E(`span`,{class:`badge`,part:`badge`},i)]);let s=E(`div`,{class:`tb`,part:`body`});s.append(...this.#e);let c=E(`div`,{class:e?`tcard light`:`tcard`,part:`card`},o,s);this.replaceChildren(c)}#i(){let e=this.title,t=this.number,n=this.status??`Open`,r=this.branch,i=this.files,a=this.add,o=this.del,s=this.checks,c=E(`div`,{class:`ph`,part:`header`});T(c,[E(`span`,{class:`gi`,part:`icon`},`⎇`),E(`span`,{class:`pt`,part:`title`},e),t==null?null:E(`span`,{class:`pn`,part:`number`},t),E(`span`,{class:`open`,part:`status`},n)]);let l=E(`div`,{class:`pmeta`,part:`meta`}),u=this.#e.filter(e=>e instanceof HTMLElement&&e.getAttribute(`slot`)===`meta`);u.length>0?l.append(...u):T(l,[r==null?null:E(`span`,null,r),i==null?null:E(`span`,null,E(`b`,null,i),` files`),a==null?null:E(`span`,{class:`add`},`+${a}`),o==null?null:E(`span`,{class:`del`},`−${o}`),s==null?null:E(`span`,null,`checks `,E(`b`,{style:`color:#1a7f37`},s))]);let d=E(`div`,{class:`prcard`,part:`card`},c,l);this.replaceChildren(d)}#a(){this.#t||(this.#t=!0,this.#e=Array.from(this.childNodes))}});var ke=`
530
+ `,De=`slicc-action-card-style`;function Oe(e){if(e.getElementById(De))return;let t=e.createElement(`style`);t.id=De,t.textContent=Ee,(e.head??e.documentElement).appendChild(t)}var ke=new Set([`tool`,`light`,`pr`]),Ae=new Set([`ink`,`cy`,`vi`,`am`,`gh`]);S(`slicc-action-card`,class extends HTMLElement{static observedAttributes=[`variant`,`glyph`,`tone`,`title`,`badge`,`number`,`status`,`branch`,`files`,`add`,`del`,`checks`];#e=[];#t=!1;connectedCallback(){Oe(this.ownerDocument),this.classList.add(`slicc-action-card`),this.#a(),this.#n()}attributeChangedCallback(e,t,n){!this.isConnected||t===n||(this.#n(),e===`variant`&&this.dispatchEvent(new CustomEvent(`slicc-action-card-change`,{bubbles:!0,composed:!0,detail:{variant:this.variant}})))}get variant(){let e=this.getAttribute(`variant`);return e&&ke.has(e)?e:`tool`}set variant(e){this.setAttribute(`variant`,ke.has(e)?e:`tool`)}get glyph(){return this.getAttribute(`glyph`)}set glyph(e){e==null?this.removeAttribute(`glyph`):this.setAttribute(`glyph`,e)}get tone(){let e=this.getAttribute(`tone`);return e&&Ae.has(e)?e:`ink`}set tone(e){this.setAttribute(`tone`,Ae.has(e)?e:`ink`)}get title(){return this.getAttribute(`title`)??``}set title(e){e==null?this.removeAttribute(`title`):this.setAttribute(`title`,e)}get badge(){return this.getAttribute(`badge`)}set badge(e){e==null?this.removeAttribute(`badge`):this.setAttribute(`badge`,e)}get number(){return this.getAttribute(`number`)}set number(e){e==null?this.removeAttribute(`number`):this.setAttribute(`number`,e)}get status(){return this.getAttribute(`status`)}set status(e){e==null?this.removeAttribute(`status`):this.setAttribute(`status`,e)}get branch(){return this.getAttribute(`branch`)}set branch(e){e==null?this.removeAttribute(`branch`):this.setAttribute(`branch`,e)}get files(){return this.getAttribute(`files`)}set files(e){e==null?this.removeAttribute(`files`):this.setAttribute(`files`,e)}get add(){return this.getAttribute(`add`)}set add(e){e==null?this.removeAttribute(`add`):this.setAttribute(`add`,e)}get del(){return this.getAttribute(`del`)}set del(e){e==null?this.removeAttribute(`del`):this.setAttribute(`del`,e)}get checks(){return this.getAttribute(`checks`)}set checks(e){e==null?this.removeAttribute(`checks`):this.setAttribute(`checks`,e)}#n(){let e=this.variant;e===`pr`?this.#i():this.#r(e===`light`)}#r(e){let t=this.glyph,n=this.tone,r=this.title,i=this.badge,a=n===`ink`?`ic`:`ic ${n}`,o=w(`div`,{class:`th`,part:`header`});C(o,[w(`span`,{class:a,part:`icon`},t??null),` `,w(`span`,{class:`nm`,part:`title`},r),i==null?null:w(`span`,{class:`badge`,part:`badge`},i)]);let s=w(`div`,{class:`tb`,part:`body`});s.append(...this.#e);let c=w(`div`,{class:e?`tcard light`:`tcard`,part:`card`},o,s);this.replaceChildren(c)}#i(){let e=this.title,t=this.number,n=this.status??`Open`,r=this.branch,i=this.files,a=this.add,o=this.del,s=this.checks,c=w(`div`,{class:`ph`,part:`header`});C(c,[w(`span`,{class:`gi`,part:`icon`},`⎇`),w(`span`,{class:`pt`,part:`title`},e),t==null?null:w(`span`,{class:`pn`,part:`number`},t),w(`span`,{class:`open`,part:`status`},n)]);let l=w(`div`,{class:`pmeta`,part:`meta`}),u=this.#e.filter(e=>e instanceof HTMLElement&&e.getAttribute(`slot`)===`meta`);u.length>0?l.append(...u):C(l,[r==null?null:w(`span`,null,r),i==null?null:w(`span`,null,w(`b`,null,i),` files`),a==null?null:w(`span`,{class:`add`},`+${a}`),o==null?null:w(`span`,{class:`del`},`−${o}`),s==null?null:w(`span`,null,`checks `,w(`b`,{style:`color:#1a7f37`},s))]);let d=w(`div`,{class:`prcard`,part:`card`},c,l);this.replaceChildren(d)}#a(){this.#t||(this.#t=!0,this.#e=Array.from(this.childNodes))}});var je=`
531
531
  slicc-action-row {
532
532
  display: block;
533
533
  margin: -2px 0 16px;
@@ -627,7 +627,7 @@ slicc-action-row .vlink {
627
627
  slicc-action-row .vlink:hover {
628
628
  border-bottom-style: solid;
629
629
  }
630
- `,Ae=`slicc-action-row-style`;function je(e){if(e.getElementById(Ae))return;let t=e.createElement(`style`);t.id=Ae,t.textContent=ke,(e.head??e.documentElement).appendChild(t)}var Me=new Set([`ink`,`vi`,`am`,`cy`,`gh`]);w(`slicc-action-row`,class extends HTMLElement{static observedAttributes=[`open`,`icon`,`tone`,`label`,`result`];#e;#t;#n;#r;#i;#a=!1;#o=()=>this.#s();connectedCallback(){je(this.ownerDocument),this.#c(),this.#l(),this.#e?.addEventListener(`click`,this.#o)}disconnectedCallback(){this.#e?.removeEventListener(`click`,this.#o)}attributeChangedCallback(e,t,n){t===n||!this.#a||(e===`open`?(this.#e.setAttribute(`aria-expanded`,String(n!==null)),this.dispatchEvent(new CustomEvent(`slicc-action-row-toggle`,{bubbles:!0,composed:!0,detail:{open:n!==null}}))):this.#l())}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get icon(){return this.getAttribute(`icon`)}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get tone(){let e=this.getAttribute(`tone`);return e&&Me.has(e)?e:`ink`}set tone(e){this.setAttribute(`tone`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get result(){return this.getAttribute(`result`)}set result(e){e==null?this.removeAttribute(`result`):this.setAttribute(`result`,e)}#s(){this.open=!this.open}#c(){if(this.#a)return;this.#a=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`slicc-act__head`))&&!(e instanceof HTMLElement&&e.classList.contains(`slicc-act__body`)));this.#e=this.ownerDocument.createElement(`button`),this.#e.type=`button`,this.#e.className=`slicc-act__head`,this.#e.setAttribute(`part`,`head`),this.#t=E(`span`,{class:`slicc-act__ic`,part:`icon`}),this.#n=E(`span`,{class:`slicc-act__label`,part:`label`}),this.#r=E(`span`,{class:`slicc-act__badge`,part:`badge`}),T(this.#e,[this.#t,this.#n,this.#r,E(`span`,{class:`slicc-act__chev`,part:`chevron`,"aria-hidden":`true`},`▸`)]),this.#i=this.ownerDocument.createElement(`div`),this.#i.className=`slicc-act__body`,this.#i.setAttribute(`part`,`body`);for(let t of e)t instanceof HTMLElement&&t.getAttribute(`slot`)===`body`?this.#i.appendChild(t):this.#n.appendChild(t);this.replaceChildren(this.#e,this.#i),this.#e.addEventListener(`click`,this.#o)}#l(){if(!this.#a)return;let e=this.tone;this.#t.className=`slicc-act__ic${e===`ink`?``:` ${e}`}`;let t=this.icon??``;t&&r(t)?this.#t.replaceChildren(n(t,{size:12})):this.#t.textContent=t;let i=this.label;i!=null&&(this.#n.textContent=i),this.#e.setAttribute(`aria-expanded`,String(this.open)),this.#r.textContent=this.result??``}});var Ne=`
630
+ `,Me=`slicc-action-row-style`;function Ne(e){if(e.getElementById(Me))return;let t=e.createElement(`style`);t.id=Me,t.textContent=je,(e.head??e.documentElement).appendChild(t)}var Pe=new Set([`ink`,`vi`,`am`,`cy`,`gh`]);S(`slicc-action-row`,class extends HTMLElement{static observedAttributes=[`open`,`icon`,`tone`,`label`,`result`];#e;#t;#n;#r;#i;#a=!1;#o=()=>this.#s();connectedCallback(){Ne(this.ownerDocument),this.#c(),this.#l(),this.#e?.addEventListener(`click`,this.#o)}disconnectedCallback(){this.#e?.removeEventListener(`click`,this.#o)}attributeChangedCallback(e,t,n){t===n||!this.#a||(e===`open`?(this.#e.setAttribute(`aria-expanded`,String(n!==null)),this.dispatchEvent(new CustomEvent(`slicc-action-row-toggle`,{bubbles:!0,composed:!0,detail:{open:n!==null}}))):this.#l())}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get icon(){return this.getAttribute(`icon`)}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get tone(){let e=this.getAttribute(`tone`);return e&&Pe.has(e)?e:`ink`}set tone(e){this.setAttribute(`tone`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get result(){return this.getAttribute(`result`)}set result(e){e==null?this.removeAttribute(`result`):this.setAttribute(`result`,e)}#s(){this.open=!this.open}#c(){if(this.#a)return;this.#a=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`slicc-act__head`))&&!(e instanceof HTMLElement&&e.classList.contains(`slicc-act__body`)));this.#e=this.ownerDocument.createElement(`button`),this.#e.type=`button`,this.#e.className=`slicc-act__head`,this.#e.setAttribute(`part`,`head`),this.#t=w(`span`,{class:`slicc-act__ic`,part:`icon`}),this.#n=w(`span`,{class:`slicc-act__label`,part:`label`}),this.#r=w(`span`,{class:`slicc-act__badge`,part:`badge`}),C(this.#e,[this.#t,this.#n,this.#r,w(`span`,{class:`slicc-act__chev`,part:`chevron`,"aria-hidden":`true`},`▸`)]),this.#i=this.ownerDocument.createElement(`div`),this.#i.className=`slicc-act__body`,this.#i.setAttribute(`part`,`body`);for(let t of e)t instanceof HTMLElement&&t.getAttribute(`slot`)===`body`?this.#i.appendChild(t):this.#n.appendChild(t);this.replaceChildren(this.#e,this.#i),this.#e.addEventListener(`click`,this.#o)}#l(){if(!this.#a)return;let e=this.tone;this.#t.className=`slicc-act__ic${e===`ink`?``:` ${e}`}`;let t=this.icon??``;t&&r(t)?this.#t.replaceChildren(n(t,{size:12})):this.#t.textContent=t;let i=this.label;i!=null&&(this.#n.textContent=i),this.#e.setAttribute(`aria-expanded`,String(this.open)),this.#r.textContent=this.result??``}});var Fe=`
631
631
  slicc-agent-message { display: block; margin-bottom: 18px; font-size: 15px; line-height: 1.5; --accent: color-mix(in srgb, var(--ctx) 55%, var(--ink)); }
632
632
  slicc-agent-message .msg-ts { font-family: var(--ui); font-size: 10px; color: var(--txt-3); opacity: .7; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
633
633
  slicc-agent-message .body { font-family: var(--ui); font-size: 14px; }
@@ -685,7 +685,7 @@ slicc-agent-message .dots i:nth-child(3) { animation-delay: .32s; }
685
685
  @keyframes slicc-am-bdot { 0%, 75%, 100% { transform: translateY(0); opacity: .45; } 38% { transform: translateY(-8px); opacity: 1; } }
686
686
  slicc-agent-message .tw-caret { display: inline-block; width: 2px; height: 1.05em; vertical-align: -2px; margin-left: 1px; background: var(--ink); animation: slicc-am-cblink .9s steps(1) infinite; }
687
687
  @keyframes slicc-am-cblink { 50% { opacity: 0; } }
688
- `,Pe=`slicc-agent-message-style`;function Fe(e){if(e.getElementById(Pe))return;let t=e.createElement(`style`);t.id=Pe,t.textContent=Ne,(e.head??e.documentElement).appendChild(t)}var Ie=[`#f43f5e`,`#06b6d4`,`#8b5cf6`],Le=new Set([``,`r`,`cy`,`vi`,`am`]);function Re(){let e=E(`div`,{class:`dots`,part:`dots`,"aria-hidden":`true`});for(let t of Ie)e.append(E(`i`,{style:`--d:${t}`}));return e}function ze(e){let t=E(`ul`,{class:`plan`,part:`plan`});for(let n of e)t.append(E(`li`,null,n));return t}function Be(e){let t=E(`ul`,{class:`check`,part:`check`});for(let n of e){let e=n.variant&&Le.has(n.variant)?n.variant:``,r=e?`ck ${e}`:`ck`,i=n.glyph??`✓`;t.append(E(`li`,null,E(`span`,{class:r},i),E(`span`,{class:`ctext`},n.text)))}return t}w(`slicc-agent-message`,class extends HTMLElement{static observedAttributes=[`thinking`,`streaming`,`progress`,`timestamp`];#e;#t=null;#n=null;#r=null;#i=!1;connectedCallback(){Fe(this.ownerDocument),this.#o(),this.#s(),this.#l()}attributeChangedCallback(e,t,n){t===n||!this.isConnected||(e===`thinking`?(this.#s(),this.dispatchEvent(new CustomEvent(`slicc-agent-message-thinking`,{bubbles:!0,composed:!0,detail:{thinking:n!==null}}))):e===`progress`?this.#c():e===`streaming`?(this.#l(),this.dispatchEvent(new CustomEvent(`slicc-agent-message-streaming`,{bubbles:!0,composed:!0,detail:{streaming:n!==null}}))):e===`timestamp`&&this.#u())}get thinking(){return this.hasAttribute(`thinking`)}set thinking(e){e?this.setAttribute(`thinking`,``):this.removeAttribute(`thinking`)}get streaming(){return this.hasAttribute(`streaming`)}set streaming(e){e?this.setAttribute(`streaming`,``):this.removeAttribute(`streaming`)}get progress(){return this.getAttribute(`progress`)}set progress(e){e==null?this.removeAttribute(`progress`):this.setAttribute(`progress`,e)}get body(){return this.#o(),this.#e}setBodyHtml(e){this.#o();let t=this.ownerDocument.createRange();t.selectNodeContents(this.#e),this.#a(t.createContextualFragment(e))}setPlan(e){this.#a(ze(e))}setCheck(e){this.#a(Be(e))}#a(e){this.#o(),this.#e.replaceChildren(e),this.#l()}#o(){if(this.#i)return;this.#i=!0,this.classList.add(`msg`,`bot`);let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`body`))),t=this.getAttribute(`timestamp`);if(t){let e=this.ownerDocument.createElement(`span`);e.className=`msg-ts`,e.setAttribute(`part`,`timestamp`),e.textContent=t,this.appendChild(e)}this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`body`,this.#e.setAttribute(`part`,`body`);for(let t of e)this.#e.appendChild(t);this.appendChild(this.#e)}#s(){let e=this.thinking;this.classList.toggle(`thinkrow`,e),e?(this.#e.style.display=`none`,this.#t||(this.#t=this.ownerDocument.createElement(`div`),this.#t.className=`thinkrow-row`,this.#t.appendChild(Re()),this.insertBefore(this.#t,this.#e)),this.#c()):(this.#e.style.removeProperty(`display`),this.#t&&(this.#t.remove(),this.#t=null,this.#n=null))}#c(){if(!this.#t)return;let e=this.progress;e?(this.#n||(this.#n=this.ownerDocument.createElement(`span`),this.#n.className=`progress`,this.#n.setAttribute(`part`,`progress`),this.#n.setAttribute(`aria-live`,`polite`),this.#t.appendChild(this.#n)),this.#n.textContent=e):this.#n&&=(this.#n.remove(),null)}#l(){this.streaming?this.#r?.isConnected?this.#e.appendChild(this.#r):(this.#r=this.ownerDocument.createElement(`span`),this.#r.className=`tw-caret`,this.#r.setAttribute(`part`,`caret`),this.#r.setAttribute(`aria-hidden`,`true`),this.#e.appendChild(this.#r)):this.#r&&=(this.#r.remove(),null)}#u(){let e=this.querySelector(`.msg-ts`),t=this.getAttribute(`timestamp`);if(t)if(e)e.textContent=t;else{let e=this.ownerDocument.createElement(`span`);e.className=`msg-ts`,e.setAttribute(`part`,`timestamp`),e.textContent=t,this.insertBefore(e,this.#e)}else e?.remove()}});var Ve=`
688
+ `,Ie=`slicc-agent-message-style`;function Le(e){if(e.getElementById(Ie))return;let t=e.createElement(`style`);t.id=Ie,t.textContent=Fe,(e.head??e.documentElement).appendChild(t)}var Re=[`#f43f5e`,`#06b6d4`,`#8b5cf6`],ze=new Set([``,`r`,`cy`,`vi`,`am`]);function Be(){let e=w(`div`,{class:`dots`,part:`dots`,"aria-hidden":`true`});for(let t of Re)e.append(w(`i`,{style:`--d:${t}`}));return e}function Ve(e){let t=w(`ul`,{class:`plan`,part:`plan`});for(let n of e)t.append(w(`li`,null,n));return t}function He(e){let t=w(`ul`,{class:`check`,part:`check`});for(let n of e){let e=n.variant&&ze.has(n.variant)?n.variant:``,r=e?`ck ${e}`:`ck`,i=n.glyph??`✓`;t.append(w(`li`,null,w(`span`,{class:r},i),w(`span`,{class:`ctext`},n.text)))}return t}S(`slicc-agent-message`,class extends HTMLElement{static observedAttributes=[`thinking`,`streaming`,`progress`,`timestamp`];#e;#t=null;#n=null;#r=null;#i=!1;connectedCallback(){Le(this.ownerDocument),this.#o(),this.#s(),this.#l()}attributeChangedCallback(e,t,n){t===n||!this.isConnected||(e===`thinking`?(this.#s(),this.dispatchEvent(new CustomEvent(`slicc-agent-message-thinking`,{bubbles:!0,composed:!0,detail:{thinking:n!==null}}))):e===`progress`?this.#c():e===`streaming`?(this.#l(),this.dispatchEvent(new CustomEvent(`slicc-agent-message-streaming`,{bubbles:!0,composed:!0,detail:{streaming:n!==null}}))):e===`timestamp`&&this.#u())}get thinking(){return this.hasAttribute(`thinking`)}set thinking(e){e?this.setAttribute(`thinking`,``):this.removeAttribute(`thinking`)}get streaming(){return this.hasAttribute(`streaming`)}set streaming(e){e?this.setAttribute(`streaming`,``):this.removeAttribute(`streaming`)}get progress(){return this.getAttribute(`progress`)}set progress(e){e==null?this.removeAttribute(`progress`):this.setAttribute(`progress`,e)}get body(){return this.#o(),this.#e}setBodyHtml(e){this.#o();let t=this.ownerDocument.createRange();t.selectNodeContents(this.#e),this.#a(t.createContextualFragment(e))}setPlan(e){this.#a(Ve(e))}setCheck(e){this.#a(He(e))}#a(e){this.#o(),this.#e.replaceChildren(e),this.#l()}#o(){if(this.#i)return;this.#i=!0,this.classList.add(`msg`,`bot`);let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`body`))),t=this.getAttribute(`timestamp`);if(t){let e=this.ownerDocument.createElement(`span`);e.className=`msg-ts`,e.setAttribute(`part`,`timestamp`),e.textContent=t,this.appendChild(e)}this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`body`,this.#e.setAttribute(`part`,`body`);for(let t of e)this.#e.appendChild(t);this.appendChild(this.#e)}#s(){let e=this.thinking;this.classList.toggle(`thinkrow`,e),e?(this.#e.style.display=`none`,this.#t||(this.#t=this.ownerDocument.createElement(`div`),this.#t.className=`thinkrow-row`,this.#t.appendChild(Be()),this.insertBefore(this.#t,this.#e)),this.#c()):(this.#e.style.removeProperty(`display`),this.#t&&(this.#t.remove(),this.#t=null,this.#n=null))}#c(){if(!this.#t)return;let e=this.progress;e?(this.#n||(this.#n=this.ownerDocument.createElement(`span`),this.#n.className=`progress`,this.#n.setAttribute(`part`,`progress`),this.#n.setAttribute(`aria-live`,`polite`),this.#t.appendChild(this.#n)),this.#n.textContent=e):this.#n&&=(this.#n.remove(),null)}#l(){this.streaming?this.#r?.isConnected?this.#e.appendChild(this.#r):(this.#r=this.ownerDocument.createElement(`span`),this.#r.className=`tw-caret`,this.#r.setAttribute(`part`,`caret`),this.#r.setAttribute(`aria-hidden`,`true`),this.#e.appendChild(this.#r)):this.#r&&=(this.#r.remove(),null)}#u(){let e=this.querySelector(`.msg-ts`),t=this.getAttribute(`timestamp`);if(t)if(e)e.textContent=t;else{let e=this.ownerDocument.createElement(`span`);e.className=`msg-ts`,e.setAttribute(`part`,`timestamp`),e.textContent=t,this.insertBefore(e,this.#e)}else e?.remove()}});var Ue=`
689
689
  slicc-chat-table { display: block; }
690
690
  slicc-chat-table > .ctable {
691
691
  width: 100%;
@@ -726,7 +726,7 @@ slicc-chat-table > .ctable code {
726
726
  overflow-wrap: anywhere;
727
727
  word-break: break-word;
728
728
  }
729
- `,He=`slicc-chat-table-style`;function Ue(e){if(e.getElementById(He))return;let t=e.createElement(`style`);t.id=He,t.textContent=Ve,(e.head??e.documentElement).appendChild(t)}function We(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}w(`slicc-chat-table`,class extends HTMLElement{static observedAttributes=[`headers`];#e;#t;#n;#r=!1;connectedCallback(){Ue(this.ownerDocument),this.#i()}attributeChangedCallback(e,t,n){e!==`headers`||t===n||(this.#r&&this.#a(),this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-chat-table-change`,{bubbles:!0,composed:!0,detail:{headers:this.headers}})))}get headers(){let e=this.getAttribute(`headers`);return e?We(e):[]}set headers(e){e==null?this.removeAttribute(`headers`):Array.isArray(e)?this.setAttribute(`headers`,e.join(`,`)):this.setAttribute(`headers`,e)}#i(){if(this.#r)return;this.#r=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLTableElement&&e.classList.contains(`ctable`)));this.#e=this.ownerDocument.createElement(`table`),this.#e.className=`ctable`,this.#e.setAttribute(`part`,`table`),this.#t=this.ownerDocument.createElement(`thead`),this.#t.setAttribute(`part`,`head`),this.#n=this.ownerDocument.createElement(`tbody`),this.#n.setAttribute(`part`,`body`),this.#e.append(this.#t,this.#n);for(let t of e)t instanceof HTMLElement&&t.getAttribute(`slot`)===`head`?this.#t.appendChild(t):this.#n.appendChild(t);this.#a(),this.appendChild(this.#e)}#a(){if(!this.#r)return;let e=this.#t.querySelector(`tr`);if(e&&!e.hasAttribute(`data-slicc-generated`))return;let t=this.headers;if(t.length===0){this.#t.replaceChildren();return}let n=E(`tr`,{"data-slicc-generated":``});for(let e of t)n.append(E(`th`,null,e));this.#t.replaceChildren(n)}});function O(e){if(typeof window>`u`||!window.location)return null;try{return new URLSearchParams(window.location.search).get(e)}catch{return null}}function k(e,t,n={}){if(!(typeof window>`u`||!window.history?.replaceState))try{let r=new URL(window.location.href),i=r.searchParams.get(e);if(i===t||i===null&&(t===null||t===``))return;t==null||t===``?r.searchParams.delete(e):r.searchParams.set(e,t),n.push?window.history.pushState(window.history.state,``,r):window.history.replaceState(window.history.state,``,r)}catch{}}var Ge=`
729
+ `,We=`slicc-chat-table-style`;function Ge(e){if(e.getElementById(We))return;let t=e.createElement(`style`);t.id=We,t.textContent=Ue,(e.head??e.documentElement).appendChild(t)}function Ke(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}S(`slicc-chat-table`,class extends HTMLElement{static observedAttributes=[`headers`];#e;#t;#n;#r=!1;connectedCallback(){Ge(this.ownerDocument),this.#i()}attributeChangedCallback(e,t,n){e!==`headers`||t===n||(this.#r&&this.#a(),this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-chat-table-change`,{bubbles:!0,composed:!0,detail:{headers:this.headers}})))}get headers(){let e=this.getAttribute(`headers`);return e?Ke(e):[]}set headers(e){e==null?this.removeAttribute(`headers`):Array.isArray(e)?this.setAttribute(`headers`,e.join(`,`)):this.setAttribute(`headers`,e)}#i(){if(this.#r)return;this.#r=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLTableElement&&e.classList.contains(`ctable`)));this.#e=this.ownerDocument.createElement(`table`),this.#e.className=`ctable`,this.#e.setAttribute(`part`,`table`),this.#t=this.ownerDocument.createElement(`thead`),this.#t.setAttribute(`part`,`head`),this.#n=this.ownerDocument.createElement(`tbody`),this.#n.setAttribute(`part`,`body`),this.#e.append(this.#t,this.#n);for(let t of e)t instanceof HTMLElement&&t.getAttribute(`slot`)===`head`?this.#t.appendChild(t):this.#n.appendChild(t);this.#a(),this.appendChild(this.#e)}#a(){if(!this.#r)return;let e=this.#t.querySelector(`tr`);if(e&&!e.hasAttribute(`data-slicc-generated`))return;let t=this.headers;if(t.length===0){this.#t.replaceChildren();return}let n=w(`tr`,{"data-slicc-generated":``});for(let e of t)n.append(w(`th`,null,e));this.#t.replaceChildren(n)}});function E(e){if(typeof window>`u`||!window.location)return null;try{return new URLSearchParams(window.location.search).get(e)}catch{return null}}function D(e,t,n={}){if(!(typeof window>`u`||!window.history?.replaceState))try{let r=new URL(window.location.href),i=r.searchParams.get(e);if(i===t||i===null&&(t===null||t===``))return;t==null||t===``?r.searchParams.delete(e):r.searchParams.set(e,t),n.push?window.history.pushState(window.history.state,``,r):window.history.replaceState(window.history.state,``,r)}catch{}}var qe=`
730
730
  slicc-chat-thread {
731
731
  flex: 1 1 auto;
732
732
  display: block;
@@ -824,7 +824,7 @@ slicc-chat-thread[open] > .slicc-thread__inner {
824
824
  padding: 16px 14px;
825
825
  }
826
826
  }
827
- `,Ke=`slicc-chat-thread-style`;function qe(e){if(e.getElementById(Ke))return;let t=e.createElement(`style`);t.id=Ke,t.textContent=Ge,(e.head??e.documentElement).appendChild(t)}w(`slicc-chat-thread`,class e extends HTMLElement{static observedAttributes=[`open`,`context`,`accent`,`url-state`];#e;#t=!1;#n=null;#r=null;#i=null;#a=null;#o=()=>{this.urlState&&(this.#a!=null&&clearTimeout(this.#a),this.#a=setTimeout(()=>{this.#a=null,k(`at`,String(Math.round(this.scrollTop)))},300))};#s=()=>{if(!this.urlState)return;let e=O(`ctx`);if(e&&e!==this.context)this.dispatchEvent(new CustomEvent(`slicc-url-context`,{bubbles:!0,composed:!0,detail:{context:e}}));else{let e=O(`at`);e!=null&&(this.scrollTop=Number.parseInt(e,10)||0)}};#c=null;#l=null;#u=null;#d=new Map;connectedCallback(){qe(this.ownerDocument),this.#y(),this.#v(),this.scrollToBottom(),this.urlState&&(this.#r=O(`at`),this.#i=O(`ctx`),this.addEventListener(`scroll`,this.#o,{passive:!0}),window.addEventListener(`popstate`,this.#s))}disconnectedCallback(){this.#n&&=(this.#e?.removeEventListener(`click`,this.#n),null),this.removeEventListener(`scroll`,this.#o),window.removeEventListener(`popstate`,this.#s),this.#a!=null&&(clearTimeout(this.#a),this.#a=null),this.#g()}attributeChangedCallback(e,t,n){t!==n&&(e===`accent`&&this.#t&&this.#v(),e===`open`&&this.#t&&this.isConnected&&this.#m(n===null),e===`context`&&this.urlState&&n!=null&&this.isConnected&&(n!==this.#i&&(this.#r=null),k(`ctx`,n,{push:!0})))}get urlState(){return this.hasAttribute(`url-state`)}set urlState(e){this.toggleAttribute(`url-state`,e)}get urlContext(){return this.urlState?O(`ctx`):null}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get context(){return this.getAttribute(`context`)}set context(e){e==null?this.removeAttribute(`context`):this.setAttribute(`context`,e)}get accent(){return this.getAttribute(`accent`)}set accent(e){e==null?this.removeAttribute(`accent`):this.setAttribute(`accent`,e)}get inner(){return this.#y(),this.#e}switchContext(e){this.#y();let t=this.context;if(e===t)return;t!=null&&this.#d.set(t,this.#_());let n=this.#d.get(e);this.#e.replaceChildren(...n?Array.from(n.cloneNode(!0).childNodes):[]),this.context=e,this.removeAttribute(`has-new`),this.dispatchEvent(new CustomEvent(`slicc-context-change`,{bubbles:!0,composed:!0,detail:{context:e,previous:t}})),this.scrollToBottom()}append(...e){this.#y(),e.length>0&&(this.#r=null),this.#e.append(...e),this.requestFollow()}static FOLLOW_SLACK=80;static RAIL_CLOSE_PADDING_GROWTH=64;#f(){return this.scrollHeight-this.scrollTop-this.clientHeight<=e.FOLLOW_SLACK}requestFollow(){this.#y(),this.#f()?(this.scrollToBottom(),this.removeAttribute(`has-new`)):this.setAttribute(`has-new`,``)}#p=()=>{this.hasAttribute(`has-new`)&&this.#f()&&this.removeAttribute(`has-new`)};replaceContent(...e){this.#y(),this.#e.replaceChildren(...e),this.removeAttribute(`has-new`),this.scrollToBottom();let t=this.#r;t!=null&&e.length>0&&requestAnimationFrame(()=>{this.#r===t&&(this.scrollTop=Number.parseInt(t,10)||0)})}scrollToBottom(){this.scrollTop=this.scrollHeight}#m(t){let n=t&&!this.#h()?e.RAIL_CLOSE_PADDING_GROWTH:0,r=e.FOLLOW_SLACK+n,i=this.scrollHeight-this.scrollTop-this.clientHeight<=r;this.#g(),i&&(this.scrollToBottom(),typeof ResizeObserver==`function`&&(this.#l=new ResizeObserver(()=>{this.scrollHeight-this.scrollTop-this.clientHeight<=r&&this.scrollToBottom()}),this.#l.observe(this.#e),this.#u=setTimeout(()=>this.#g(),450)))}#h(){return typeof matchMedia==`function`&&matchMedia(`(max-width: 560px)`).matches}#g(){this.#l&&=(this.#l.disconnect(),null),this.#u!=null&&(clearTimeout(this.#u),this.#u=null)}#_(){let e=this.ownerDocument.createDocumentFragment();for(let t of Array.from(this.#e.childNodes))e.appendChild(t.cloneNode(!0));return e}#v(){let e=this.accent;e?this.style.setProperty(`--ctx`,e):this.style.removeProperty(`--ctx`)}#y(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > .slicc-thread__inner`);if(e instanceof HTMLElement)this.#e=e;else{let e=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-thread__inner`,this.#e.setAttribute(`part`,`inner`);for(let t of e)this.#e.appendChild(t);this.appendChild(this.#e)}this.#c=this.ownerDocument.createElement(`div`),this.#c.className=`slicc-thread__follow`;let t=this.ownerDocument.createElement(`button`);t.type=`button`;let r=n(`chevron-down`,{size:14,strokeWidth:2});t.append(`New messages`,r),t.addEventListener(`click`,()=>{this.scrollToBottom(),this.removeAttribute(`has-new`)}),this.#c.append(t),this.appendChild(this.#c),this.addEventListener(`scroll`,this.#p,{passive:!0}),this.#n=e=>{let t=e.target;t instanceof HTMLElement&&this.dispatchEvent(new CustomEvent(`slicc-thread-action`,{bubbles:!0,composed:!0,detail:{target:t}}))},this.#e.addEventListener(`click`,this.#n)}});var Je=D(`
827
+ `,Je=`slicc-chat-thread-style`,Ye=120;function Xe(e){if(e.getElementById(Je))return;let t=e.createElement(`style`);t.id=Je,t.textContent=qe,(e.head??e.documentElement).appendChild(t)}S(`slicc-chat-thread`,class e extends HTMLElement{static observedAttributes=[`open`,`context`,`accent`,`url-state`];#e;#t=!1;#n=null;#r=null;#i=null;#a=!1;#o=!1;#s=0;#c=null;#l=null;#u=null;#d=null;#f=null;#p=()=>{this.#d=null,this.#f=performance.now(),D(`at`,String(Math.round(this.scrollTop)))};#m=()=>{if(!this.urlState)return;let e=this.#f==null?Ye:performance.now()-this.#f;if(e>=Ye){this.#d!=null&&clearTimeout(this.#d),this.#p();return}this.#d??=setTimeout(this.#p,Ye-e)};#h=()=>{if(!this.urlState)return;let e=E(`ctx`);if(e&&e!==this.context)this.dispatchEvent(new CustomEvent(`slicc-url-context`,{bubbles:!0,composed:!0,detail:{context:e}}));else{let e=E(`at`);e!=null&&(this.scrollTop=Number.parseInt(e,10)||0)}};#g=null;#_=new Map;connectedCallback(){Xe(this.ownerDocument),this.#E(),this.#T(),this.#b(),this.scrollToBottom(),this.urlState&&(this.#r=E(`at`),this.#i=E(`ctx`),this.addEventListener(`scroll`,this.#m,{passive:!0}),window.addEventListener(`popstate`,this.#h))}disconnectedCallback(){this.#n&&=(this.#e?.removeEventListener(`click`,this.#n),null),this.removeEventListener(`scroll`,this.#m),window.removeEventListener(`popstate`,this.#h),this.#d!=null&&(clearTimeout(this.#d),this.#d=null),this.#f=null,this.#u?.disconnect(),this.#u=null,this.#C()}attributeChangedCallback(e,t,n){t!==n&&(e===`accent`&&this.#t&&this.#T(),e===`open`&&this.#t&&this.isConnected&&this.#x(),e===`context`&&this.urlState&&n!=null&&this.isConnected&&(n!==this.#i&&(this.#r=null),D(`ctx`,n,{push:!0})))}get urlState(){return this.hasAttribute(`url-state`)}set urlState(e){this.toggleAttribute(`url-state`,e)}get urlContext(){return this.urlState?E(`ctx`):null}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get context(){return this.getAttribute(`context`)}set context(e){e==null?this.removeAttribute(`context`):this.setAttribute(`context`,e)}get accent(){return this.getAttribute(`accent`)}set accent(e){e==null?this.removeAttribute(`accent`):this.setAttribute(`accent`,e)}get inner(){return this.#E(),this.#e}switchContext(e){this.#E();let t=this.context;if(e===t)return;t!=null&&this.#_.set(t,this.#w());let n=this.#_.get(e);this.#e.replaceChildren(...n?Array.from(n.cloneNode(!0).childNodes):[]),this.context=e,this.removeAttribute(`has-new`),this.dispatchEvent(new CustomEvent(`slicc-context-change`,{bubbles:!0,composed:!0,detail:{context:e,previous:t}})),this.scrollToBottom()}append(...e){this.#E(),e.length>0&&(this.#r=null),this.#e.append(...e),this.requestFollow()}static FOLLOW_SLACK=80;#v(){return this.scrollHeight-this.scrollTop-this.clientHeight<=e.FOLLOW_SLACK}requestFollow(){this.#E(),this.#a?(this.#S(this.scrollHeight),this.removeAttribute(`has-new`)):this.setAttribute(`has-new`,``)}#y=()=>{if(this.#o&&Math.abs(this.scrollTop-this.#s)<=1){this.#C();return}this.#C(),this.#a=this.#v(),this.#a&&this.removeAttribute(`has-new`)};replaceContent(...e){this.#E(),this.#e.replaceChildren(...e),this.removeAttribute(`has-new`),this.scrollToBottom();let t=this.#r;t!=null&&e.length>0&&requestAnimationFrame(()=>{this.#r===t&&(this.#a=!1,this.#S(Number.parseInt(t,10)||0),this.#a=this.#v())})}scrollToBottom(){this.#a=!0,this.removeAttribute(`has-new`),this.#S(this.scrollHeight)}#b(){this.#u?.disconnect(),typeof ResizeObserver==`function`&&(this.#u=new ResizeObserver(()=>this.#x()),this.#u.observe(this.#e))}#x(){if(!this.#a)return;let t=this.#s-this.scrollTop;this.#o&&t>e.FOLLOW_SLACK||this.#S(this.scrollHeight)}#S(e){this.#o=!0,this.scrollTop=e,this.#s=this.scrollTop,this.#c!=null&&cancelAnimationFrame(this.#c),this.#l!=null&&clearTimeout(this.#l),`onscrollend`in HTMLElement.prototype?this.#l=setTimeout(()=>this.#C(),100):this.#c=requestAnimationFrame(()=>this.#C())}#C(){this.#o=!1,this.#c!=null&&cancelAnimationFrame(this.#c),this.#c=null,this.#l!=null&&clearTimeout(this.#l),this.#l=null}#w(){let e=this.ownerDocument.createDocumentFragment();for(let t of Array.from(this.#e.childNodes))e.appendChild(t.cloneNode(!0));return e}#T(){let e=this.accent;e?this.style.setProperty(`--ctx`,e):this.style.removeProperty(`--ctx`)}#E(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > .slicc-thread__inner`);if(e instanceof HTMLElement)this.#e=e;else{let e=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-thread__inner`,this.#e.setAttribute(`part`,`inner`);for(let t of e)this.#e.appendChild(t);this.appendChild(this.#e)}this.#g=this.ownerDocument.createElement(`div`),this.#g.className=`slicc-thread__follow`;let t=this.ownerDocument.createElement(`button`);t.type=`button`;let r=n(`chevron-down`,{size:14,strokeWidth:2});t.append(`New messages`,r),t.addEventListener(`click`,()=>{this.scrollToBottom()}),this.#g.append(t),this.appendChild(this.#g),this.addEventListener(`scroll`,this.#y,{passive:!0}),this.addEventListener(`scrollend`,()=>this.#C(),{passive:!0}),this.#n=e=>{let t=e.target;t instanceof HTMLElement&&this.dispatchEvent(new CustomEvent(`slicc-thread-action`,{bubbles:!0,composed:!0,detail:{target:t}}))},this.#e.addEventListener(`click`,this.#n)}});var Ze=T(`
828
828
  :host {
829
829
  display: flex;
830
830
  align-items: center;
@@ -862,7 +862,7 @@ code {
862
862
  overflow-wrap: anywhere;
863
863
  word-break: break-word;
864
864
  }
865
- `),Ye=[`feed`,`scoop`,`drop`,`sprinkle`],Xe={feed:`arrow-right`,scoop:`circle-plus`,drop:`circle-check`,sprinkle:`sparkles`},Ze={feed:`Delegated to`,scoop:`Spun up`,drop:`Wrapped up`,sprinkle:``},Qe={feed_scoop:`Delegated to`,scoop_scoop:`Spun up`,drop_scoop:`Wrapped up`,"sprinkle-opened":`Opened`};function $e(e){return Qe[e]??e}function et(e){return Ye.includes(e??``)?e:`feed`}function tt(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}w(`slicc-delegation-line`,class extends HTMLElement{static observedAttributes=[`kind`,`hue`,`verb`,`scoop`,`label`,`args`,`source`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Je]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){return et(this.getAttribute(`kind`))}set kind(e){this.setAttribute(`kind`,et(e))}get hue(){return this.getAttribute(`hue`)}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get verb(){return this.getAttribute(`verb`)}set verb(e){e==null?this.removeAttribute(`verb`):this.setAttribute(`verb`,e)}get scoop(){return this.getAttribute(`scoop`)}set scoop(e){e==null?this.removeAttribute(`scoop`):this.setAttribute(`scoop`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get args(){return this.getAttribute(`args`)}set args(e){e==null?this.removeAttribute(`args`):this.setAttribute(`args`,e)}get source(){return this.hasAttribute(`source`)}set source(e){this.toggleAttribute(`source`,e)}#t(){let e=this.kind,t=this.hue,r=this.verb,i=r==null?Ze[e]:$e(r),a=this.scoop,o=this.label,s=this.args?tt(this.args):[];t?this.style.setProperty(`--c`,t):this.style.removeProperty(`--c`);let c=E(`span`,{class:`darrow`,part:`arrow`},E(`slot`,{name:`arrow`},n(Xe[e],{size:13}))),l=E(`slot`,{name:`label`});i&&l.append(E(`span`,{class:`verb`},i)),a&&l.append(E(`b`,{class:`scoop`,part:`scoop`,style:t?`color:${t}`:void 0},a)),o&&l.append(E(`span`,{class:`prose`},o));let u=E(`span`,{class:`label`,part:`label`},l),d=E(`slot`,{name:`args`});for(let e of s)d.append(E(`code`,{part:`code`},e));this.#e.replaceChildren(c,u,d)}});var nt=D(`
865
+ `),Qe=[`feed`,`scoop`,`drop`,`sprinkle`],$e={feed:`arrow-right`,scoop:`circle-plus`,drop:`circle-check`,sprinkle:`sparkles`},et={feed:`Delegated to`,scoop:`Spun up`,drop:`Wrapped up`,sprinkle:``},tt={feed_scoop:`Delegated to`,scoop_scoop:`Spun up`,drop_scoop:`Wrapped up`,"sprinkle-opened":`Opened`};function nt(e){return tt[e]??e}function rt(e){return Qe.includes(e??``)?e:`feed`}function it(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}S(`slicc-delegation-line`,class extends HTMLElement{static observedAttributes=[`kind`,`hue`,`verb`,`scoop`,`label`,`args`,`source`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ze]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){return rt(this.getAttribute(`kind`))}set kind(e){this.setAttribute(`kind`,rt(e))}get hue(){return this.getAttribute(`hue`)}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get verb(){return this.getAttribute(`verb`)}set verb(e){e==null?this.removeAttribute(`verb`):this.setAttribute(`verb`,e)}get scoop(){return this.getAttribute(`scoop`)}set scoop(e){e==null?this.removeAttribute(`scoop`):this.setAttribute(`scoop`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get args(){return this.getAttribute(`args`)}set args(e){e==null?this.removeAttribute(`args`):this.setAttribute(`args`,e)}get source(){return this.hasAttribute(`source`)}set source(e){this.toggleAttribute(`source`,e)}#t(){let e=this.kind,t=this.hue,r=this.verb,i=r==null?et[e]:nt(r),a=this.scoop,o=this.label,s=this.args?it(this.args):[];t?this.style.setProperty(`--c`,t):this.style.removeProperty(`--c`);let c=w(`span`,{class:`darrow`,part:`arrow`},w(`slot`,{name:`arrow`},n($e[e],{size:13}))),l=w(`slot`,{name:`label`});i&&l.append(w(`span`,{class:`verb`},i)),a&&l.append(w(`b`,{class:`scoop`,part:`scoop`,style:t?`color:${t}`:void 0},a)),o&&l.append(w(`span`,{class:`prose`},o));let u=w(`span`,{class:`label`,part:`label`},l),d=w(`slot`,{name:`args`});for(let e of s)d.append(w(`code`,{part:`code`},e));this.#e.replaceChildren(c,u,d)}});var at=T(`
866
866
  :host {
867
867
  display: block;
868
868
  border: 1px solid var(--line);
@@ -888,7 +888,7 @@ code {
888
888
  /* palette chips carry inline-style light backgrounds — tone them down for dark mode */
889
889
  :host-context(.dark) .ch,
890
890
  :host-context([data-theme="dark"]) .ch { filter: brightness(.55) saturate(.85); }
891
- `);w(`slicc-palette-cell`,class extends HTMLElement{static observedAttributes=[`color`,`label`,`group`,`selected`];#e;#t=null;#n=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[nt]}connectedCallback(){this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`0`),this.setAttribute(`role`,`button`),this.#o(),this.#i()}disconnectedCallback(){this.#a()}attributeChangedCallback(){this.isConnected&&this.#o()}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get group(){return this.getAttribute(`group`)}set group(e){e==null?this.removeAttribute(`group`):this.setAttribute(`group`,e)}get selected(){return this.hasAttribute(`selected`)}set selected(e){this.toggleAttribute(`selected`,e)}select(){this.#r(),this.selected=!0,this.dispatchEvent(new CustomEvent(`palette-select`,{bubbles:!0,composed:!0,detail:{color:this.color,label:this.label,group:this.group}}))}#r(){let e=this.group;if(!e)return;let t=this.getRootNode().querySelectorAll(`slicc-palette-cell[group="${CSS.escape(e)}"][selected]`);for(let e of t)e!==this&&(e.selected=!1)}#i(){this.#t||(this.#t=()=>this.select(),this.#n=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.select())},this.addEventListener(`click`,this.#t),this.addEventListener(`keydown`,this.#n))}#a(){this.#t&&this.removeEventListener(`click`,this.#t),this.#n&&this.removeEventListener(`keydown`,this.#n),this.#t=null,this.#n=null}#o(){this.setAttribute(`aria-pressed`,this.selected?`true`:`false`);let e=this.color??`transparent`,t=this.label,n=E(`div`,{class:`ch`,part:`chip`,style:`background:${e}`}),r=E(`div`,{class:`cl`,part:`label`},t??E(`slot`));this.#e.replaceChildren(n,r)}});var rt=[`#f43f5e`,`#f59e0b`,`#06b6d4`,`#8b5cf6`,`#ec4899`,`#22c55e`],it=46,A=72,at=6.283185;function j(e,t){return e+Math.random()*(t-e)}var ot=[{color:`#faf6f1`,label:`paper`},{color:`#fff7ed`,label:`cream`},{color:`#f5f3ff`,label:`lilac`},{color:`#fef2f2`,label:`blush`}],st=[{color:`#8b5cf6`,label:`violet`},{color:`#f43f5e`,label:`rose`},{color:`#06b6d4`,label:`cyan`},{color:`#ef7000`,label:`cone`}],ct=0,lt=D(`
891
+ `);S(`slicc-palette-cell`,class extends HTMLElement{static observedAttributes=[`color`,`label`,`group`,`selected`];#e;#t=null;#n=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[at]}connectedCallback(){this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`0`),this.setAttribute(`role`,`button`),this.#o(),this.#i()}disconnectedCallback(){this.#a()}attributeChangedCallback(){this.isConnected&&this.#o()}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get group(){return this.getAttribute(`group`)}set group(e){e==null?this.removeAttribute(`group`):this.setAttribute(`group`,e)}get selected(){return this.hasAttribute(`selected`)}set selected(e){this.toggleAttribute(`selected`,e)}select(){this.#r(),this.selected=!0,this.dispatchEvent(new CustomEvent(`palette-select`,{bubbles:!0,composed:!0,detail:{color:this.color,label:this.label,group:this.group}}))}#r(){let e=this.group;if(!e)return;let t=this.getRootNode().querySelectorAll(`slicc-palette-cell[group="${CSS.escape(e)}"][selected]`);for(let e of t)e!==this&&(e.selected=!1)}#i(){this.#t||(this.#t=()=>this.select(),this.#n=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.select())},this.addEventListener(`click`,this.#t),this.addEventListener(`keydown`,this.#n))}#a(){this.#t&&this.removeEventListener(`click`,this.#t),this.#n&&this.removeEventListener(`keydown`,this.#n),this.#t=null,this.#n=null}#o(){this.setAttribute(`aria-pressed`,this.selected?`true`:`false`);let e=this.color??`transparent`,t=this.label,n=w(`div`,{class:`ch`,part:`chip`,style:`background:${e}`}),r=w(`div`,{class:`cl`,part:`label`},t??w(`slot`));this.#e.replaceChildren(n,r)}});var ot=[`#f43f5e`,`#f59e0b`,`#06b6d4`,`#8b5cf6`,`#ec4899`,`#22c55e`],st=46,O=72,ct=6.283185;function k(e,t){return e+Math.random()*(t-e)}var lt=[{color:`#faf6f1`,label:`paper`},{color:`#fff7ed`,label:`cream`},{color:`#f5f3ff`,label:`lilac`},{color:`#fef2f2`,label:`blush`}],ut=[{color:`#8b5cf6`,label:`violet`},{color:`#f43f5e`,label:`rose`},{color:`#06b6d4`,label:`cyan`},{color:`#ef7000`,label:`cone`}],dt=0,ft=T(`
892
892
  :host {
893
893
  position: relative;
894
894
  display: block;
@@ -975,7 +975,7 @@ canvas.sprk {
975
975
  @media (prefers-reduced-motion: reduce) {
976
976
  canvas.sprk { display: none; }
977
977
  }
978
- `);w(`slicc-dip`,class extends HTMLElement{static observedAttributes=[`name`,`hue`,`prompt`];#e;#t=`d${++ct}`;#n=null;#r=null;#i=0;#a=null;#o=[];#s=0;#c=0;#l=-999;#u=-999;#d=null;#f=null;#p=null;#m=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[lt]}connectedCallback(){this.#v(),this.#b(),this.#w()}disconnectedCallback(){this.#T(),this.#x()}attributeChangedCallback(){this.isConnected&&(this.#v(),this.#b(),this.#w())}get name(){return this.getAttribute(`name`)??`palette.shtml`}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,e)}get hue(){return this.getAttribute(`hue`)}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get prompt(){return this.getAttribute(`prompt`)}set prompt(e){e==null?this.removeAttribute(`prompt`):this.setAttribute(`prompt`,e)}get selectedCanvas(){return this.#h(`canvas:${this.#t}`)}get selectedAccent(){return this.#h(`accent:${this.#t}`)}#h(e){let t=this.querySelector(`slicc-palette-cell[group="${CSS.escape(e)}"][selected]`);return t?{color:t.getAttribute(`color`)??``,label:t.getAttribute(`label`)??``}:null}#g(e,t,n){let r=e.startsWith(`canvas`)?`canvas`:`accent`;if(!this.querySelector(`slicc-palette-cell[slot="${r}"]`))for(let i of t){let t=this.ownerDocument.createElement(`slicc-palette-cell`);t.setAttribute(`slot`,r),t.setAttribute(`color`,i.color),t.setAttribute(`label`,i.label),t.setAttribute(`group`,e),i.label===n&&t.setAttribute(`selected`,``),this.appendChild(t)}}#_(){return[document.createTextNode(`Tune the hero’s `),E(`b`,null,`canvas`),document.createTextNode(` & `),E(`b`,null,`accent`),document.createTextNode(`, then apply:`)]}#v(){let e=this.hue,t=e?`--c:${e}`:void 0,r=E(`slot`,{name:`prompt`});this.prompt?r.append(this.prompt):r.append(...this.#_()),this.#e.replaceChildren(E(`canvas`,{class:`sprk`,part:`field`,"aria-hidden":`true`}),E(`div`,{class:`dh`,part:`header`,style:t},E(`span`,{class:`sg`,part:`glyph`},n(`sparkles`,{size:12})),E(`span`,{class:`nm`,part:`name`},this.name),E(`span`,{class:`tag`,part:`tag`},`sprinkle · dip`)),E(`div`,{class:`dbody`,part:`body`,style:t},E(`p`,{class:`dprompt`,part:`prompt`},r),E(`div`,{class:`pgrid canvas`,part:`grid-canvas`},E(`slot`,{name:`canvas`})),E(`div`,{class:`pgrid accent`,part:`grid-accent`},E(`slot`,{name:`accent`})),E(`div`,{class:`dfoot`},E(`button`,{class:`dapply`,part:`apply`,type:`button`},`Apply to hero →`),E(`span`,{class:`dnote`,part:`note`})))),this.#g(`canvas:${this.#t}`,ot,`paper`),this.#g(`accent:${this.#t}`,st,`cone`),this.#y()}#y(){let e=this.#e.querySelector(`.dnote`);e&&(e.textContent=`${this.selectedCanvas?.label??`paper`} · ${this.selectedAccent?.label??`violet`}`)}#b(){this.#p||(this.#p=()=>this.#y(),this.addEventListener(`palette-select`,this.#p)),this.#m||=()=>this.#S(),this.#e.querySelector(`.dapply`)?.addEventListener(`click`,this.#m)}#x(){this.#p&&=(this.removeEventListener(`palette-select`,this.#p),null),this.#m=null}#S(){this.#y(),this.dispatchEvent(new CustomEvent(`slicc-dip-apply`,{bubbles:!0,composed:!0,detail:{canvas:this.selectedCanvas,accent:this.selectedAccent}}))}#C(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}#w(){if(this.#T(),this.#C())return;let e=this.#e.querySelector(`canvas.sprk`),t=e?.getContext(`2d`)??null;!e||!t||(this.#n=e,this.#r=t,this.#o=[],this.#E(),typeof ResizeObserver==`function`&&(this.#a=new ResizeObserver(()=>this.#E()),this.#a.observe(this)),this.#d=e=>{let t=this.getBoundingClientRect();this.#l=e.clientX-t.left,this.#u=e.clientY-t.top},this.#f=()=>{this.#l=-999,this.#u=-999},this.addEventListener(`pointermove`,this.#d),this.addEventListener(`pointerleave`,this.#f),this.#i=requestAnimationFrame(()=>this.#O()))}#T(){this.#i&&cancelAnimationFrame(this.#i),this.#i=0,this.#a?.disconnect(),this.#a=null,this.#d&&this.removeEventListener(`pointermove`,this.#d),this.#f&&this.removeEventListener(`pointerleave`,this.#f),this.#d=null,this.#f=null}#E(){let e=this.#n,t=this.#r;if(!e||!t)return;let n=this.getBoundingClientRect(),r=Math.min(typeof devicePixelRatio==`number`?devicePixelRatio:1,2);if(this.#s=n.width,this.#c=n.height||90,e.width=Math.max(1,Math.round(this.#s*r)),e.height=Math.max(1,Math.round(this.#c*r)),t.setTransform(r,0,0,r,0,0),!this.#o.length)for(let e=0;e<it;e++)this.#o.push({x:j(0,this.#s),y:j(0,this.#c),vx:j(-.1,.1),vy:j(-.08,.08),rot:j(0,at),rv:j(-.014,.014),s:j(1.2,2.2),col:rt[e%rt.length]})}#D(e,t,n,r,i){let a=this.#r;a&&(a.roundRect?(a.beginPath(),a.roundRect(e,t,n,r,i)):(a.beginPath(),a.moveTo(e+i,t),a.arcTo(e+n,t,e+n,t+r,i),a.arcTo(e+n,t+r,e,t+r,i),a.arcTo(e,t+r,e,t,i),a.arcTo(e,t,e+n,t,i),a.closePath()))}#O(){let e=this.#r;if(e){e.clearRect(0,0,this.#s,this.#c);for(let t of this.#o){let n=t.x-this.#l,r=t.y-this.#u,i=n*n+r*r;if(i<A*A){let e=Math.sqrt(i)||1,a=(A-e)/A*.5;t.vx+=n/e*a,t.vy+=r/e*a}t.vx*=.95,t.vy*=.95,t.x+=t.vx+.04,t.y+=t.vy,t.rot+=t.rv,t.x<-6&&(t.x=this.#s+6),t.x>this.#s+6&&(t.x=-6),t.y<-6&&(t.y=this.#c+6),t.y>this.#c+6&&(t.y=-6);let a=t.s*4,o=t.s*1.55;e.save(),e.translate(t.x,t.y),e.rotate(t.rot),e.globalAlpha=.5,e.fillStyle=t.col,this.#D(-a/2,-o/2,a,o,o/2),e.fill(),e.globalAlpha=.85,e.fillStyle=`#fff`,this.#D(-a/2+o*.3,-o*.34,a-o*.6,o*.3,o*.15),e.fill(),e.restore(),e.globalAlpha=1}this.#i=requestAnimationFrame(()=>this.#O())}}});var ut=14,dt=12,ft=`Something went wrong`,pt={retry:`Try again`,settings:`Open Settings`,"change-model":`Change model`,login:`Log in again`},mt={retry:`rotate-ccw`,settings:`settings`,"change-model":`sparkles`,login:`log-in`},ht=D(`
978
+ `);S(`slicc-dip`,class extends HTMLElement{static observedAttributes=[`name`,`hue`,`prompt`];#e;#t=`d${++dt}`;#n=null;#r=null;#i=0;#a=null;#o=[];#s=0;#c=0;#l=-999;#u=-999;#d=null;#f=null;#p=null;#m=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ft]}connectedCallback(){this.#v(),this.#b(),this.#w()}disconnectedCallback(){this.#T(),this.#x()}attributeChangedCallback(){this.isConnected&&(this.#v(),this.#b(),this.#w())}get name(){return this.getAttribute(`name`)??`palette.shtml`}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,e)}get hue(){return this.getAttribute(`hue`)}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get prompt(){return this.getAttribute(`prompt`)}set prompt(e){e==null?this.removeAttribute(`prompt`):this.setAttribute(`prompt`,e)}get selectedCanvas(){return this.#h(`canvas:${this.#t}`)}get selectedAccent(){return this.#h(`accent:${this.#t}`)}#h(e){let t=this.querySelector(`slicc-palette-cell[group="${CSS.escape(e)}"][selected]`);return t?{color:t.getAttribute(`color`)??``,label:t.getAttribute(`label`)??``}:null}#g(e,t,n){let r=e.startsWith(`canvas`)?`canvas`:`accent`;if(!this.querySelector(`slicc-palette-cell[slot="${r}"]`))for(let i of t){let t=this.ownerDocument.createElement(`slicc-palette-cell`);t.setAttribute(`slot`,r),t.setAttribute(`color`,i.color),t.setAttribute(`label`,i.label),t.setAttribute(`group`,e),i.label===n&&t.setAttribute(`selected`,``),this.appendChild(t)}}#_(){return[document.createTextNode(`Tune the hero’s `),w(`b`,null,`canvas`),document.createTextNode(` & `),w(`b`,null,`accent`),document.createTextNode(`, then apply:`)]}#v(){let e=this.hue,t=e?`--c:${e}`:void 0,r=w(`slot`,{name:`prompt`});this.prompt?r.append(this.prompt):r.append(...this.#_()),this.#e.replaceChildren(w(`canvas`,{class:`sprk`,part:`field`,"aria-hidden":`true`}),w(`div`,{class:`dh`,part:`header`,style:t},w(`span`,{class:`sg`,part:`glyph`},n(`sparkles`,{size:12})),w(`span`,{class:`nm`,part:`name`},this.name),w(`span`,{class:`tag`,part:`tag`},`sprinkle · dip`)),w(`div`,{class:`dbody`,part:`body`,style:t},w(`p`,{class:`dprompt`,part:`prompt`},r),w(`div`,{class:`pgrid canvas`,part:`grid-canvas`},w(`slot`,{name:`canvas`})),w(`div`,{class:`pgrid accent`,part:`grid-accent`},w(`slot`,{name:`accent`})),w(`div`,{class:`dfoot`},w(`button`,{class:`dapply`,part:`apply`,type:`button`},`Apply to hero →`),w(`span`,{class:`dnote`,part:`note`})))),this.#g(`canvas:${this.#t}`,lt,`paper`),this.#g(`accent:${this.#t}`,ut,`cone`),this.#y()}#y(){let e=this.#e.querySelector(`.dnote`);e&&(e.textContent=`${this.selectedCanvas?.label??`paper`} · ${this.selectedAccent?.label??`violet`}`)}#b(){this.#p||(this.#p=()=>this.#y(),this.addEventListener(`palette-select`,this.#p)),this.#m||=()=>this.#S(),this.#e.querySelector(`.dapply`)?.addEventListener(`click`,this.#m)}#x(){this.#p&&=(this.removeEventListener(`palette-select`,this.#p),null),this.#m=null}#S(){this.#y(),this.dispatchEvent(new CustomEvent(`slicc-dip-apply`,{bubbles:!0,composed:!0,detail:{canvas:this.selectedCanvas,accent:this.selectedAccent}}))}#C(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}#w(){if(this.#T(),this.#C())return;let e=this.#e.querySelector(`canvas.sprk`),t=e?.getContext(`2d`)??null;!e||!t||(this.#n=e,this.#r=t,this.#o=[],this.#E(),typeof ResizeObserver==`function`&&(this.#a=new ResizeObserver(()=>this.#E()),this.#a.observe(this)),this.#d=e=>{let t=this.getBoundingClientRect();this.#l=e.clientX-t.left,this.#u=e.clientY-t.top},this.#f=()=>{this.#l=-999,this.#u=-999},this.addEventListener(`pointermove`,this.#d),this.addEventListener(`pointerleave`,this.#f),this.#i=requestAnimationFrame(()=>this.#O()))}#T(){this.#i&&cancelAnimationFrame(this.#i),this.#i=0,this.#a?.disconnect(),this.#a=null,this.#d&&this.removeEventListener(`pointermove`,this.#d),this.#f&&this.removeEventListener(`pointerleave`,this.#f),this.#d=null,this.#f=null}#E(){let e=this.#n,t=this.#r;if(!e||!t)return;let n=this.getBoundingClientRect(),r=Math.min(typeof devicePixelRatio==`number`?devicePixelRatio:1,2);if(this.#s=n.width,this.#c=n.height||90,e.width=Math.max(1,Math.round(this.#s*r)),e.height=Math.max(1,Math.round(this.#c*r)),t.setTransform(r,0,0,r,0,0),!this.#o.length)for(let e=0;e<st;e++)this.#o.push({x:k(0,this.#s),y:k(0,this.#c),vx:k(-.1,.1),vy:k(-.08,.08),rot:k(0,ct),rv:k(-.014,.014),s:k(1.2,2.2),col:ot[e%ot.length]})}#D(e,t,n,r,i){let a=this.#r;a&&(a.roundRect?(a.beginPath(),a.roundRect(e,t,n,r,i)):(a.beginPath(),a.moveTo(e+i,t),a.arcTo(e+n,t,e+n,t+r,i),a.arcTo(e+n,t+r,e,t+r,i),a.arcTo(e,t+r,e,t,i),a.arcTo(e,t,e+n,t,i),a.closePath()))}#O(){let e=this.#r;if(e){e.clearRect(0,0,this.#s,this.#c);for(let t of this.#o){let n=t.x-this.#l,r=t.y-this.#u,i=n*n+r*r;if(i<O*O){let e=Math.sqrt(i)||1,a=(O-e)/O*.5;t.vx+=n/e*a,t.vy+=r/e*a}t.vx*=.95,t.vy*=.95,t.x+=t.vx+.04,t.y+=t.vy,t.rot+=t.rv,t.x<-6&&(t.x=this.#s+6),t.x>this.#s+6&&(t.x=-6),t.y<-6&&(t.y=this.#c+6),t.y>this.#c+6&&(t.y=-6);let a=t.s*4,o=t.s*1.55;e.save(),e.translate(t.x,t.y),e.rotate(t.rot),e.globalAlpha=.5,e.fillStyle=t.col,this.#D(-a/2,-o/2,a,o,o/2),e.fill(),e.globalAlpha=.85,e.fillStyle=`#fff`,this.#D(-a/2+o*.3,-o*.34,a-o*.6,o*.3,o*.15),e.fill(),e.restore(),e.globalAlpha=1}this.#i=requestAnimationFrame(()=>this.#O())}}});var pt=14,mt=12,ht=`Something went wrong`,gt={retry:`Try again`,settings:`Open Settings`,"change-model":`Change model`,login:`Log in again`},_t={retry:`rotate-ccw`,settings:`settings`,"change-model":`sparkles`,login:`log-in`},vt=T(`
979
979
  :host{
980
980
  /* Error cards sit in the assistant column (left-aligned). Tokens default to
981
981
  the light palette and flip in dark mode via the library's outer scopes
@@ -1034,7 +1034,7 @@ canvas.sprk {
1034
1034
  .retry:hover{filter:brightness(1.08);}
1035
1035
  .retry:focus-visible{outline:2px solid color-mix(in srgb,var(--err-btn-bg) 60%,var(--ink));outline-offset:2px;}
1036
1036
  .retry svg{display:block;}
1037
- `);w(`slicc-error-card`,class extends HTMLElement{static observedAttributes=[`label`,`message`,`button-label`,`message-id`,`action`,`theme`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ht]}connectedCallback(){this.#n()}disconnectedCallback(){this.#i()}attributeChangedCallback(){this.isConnected&&this.#n()}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get message(){return this.getAttribute(`message`)}set message(e){e==null?this.removeAttribute(`message`):this.setAttribute(`message`,e)}get buttonLabel(){return this.getAttribute(`button-label`)}set buttonLabel(e){e==null?this.removeAttribute(`button-label`):this.setAttribute(`button-label`,e)}get messageId(){return this.getAttribute(`message-id`)}set messageId(e){e==null?this.removeAttribute(`message-id`):this.setAttribute(`message-id`,e)}get action(){let e=this.getAttribute(`action`);return e===`settings`||e===`change-model`||e===`login`?e:`retry`}set action(e){e==null?this.removeAttribute(`action`):this.setAttribute(`action`,e)}get theme(){let e=this.getAttribute(`theme`);return e===`light`||e===`dark`?e:null}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}retry(){this.dispatchEvent(new CustomEvent(`slicc-error-retry`,{detail:{messageId:this.getAttribute(`message-id`)??null},bubbles:!0,composed:!0}))}openSettings(){this.dispatchEvent(new CustomEvent(`slicc-error-open-settings`,{detail:{messageId:this.getAttribute(`message-id`)??null},bubbles:!0,composed:!0}))}changeModel(){this.dispatchEvent(new CustomEvent(`slicc-error-change-model`,{detail:{messageId:this.getAttribute(`message-id`)??null},bubbles:!0,composed:!0}))}login(){this.dispatchEvent(new CustomEvent(`slicc-error-login`,{detail:{messageId:this.getAttribute(`message-id`)??null},bubbles:!0,composed:!0}))}#n(){let e=this.action,t=this.label??ft,r=this.message,i=this.buttonLabel??pt[e],a=mt[e],o=E(`span`,{class:`ic`,part:`icon`,"aria-hidden":!0});o.append(n(`triangle-alert`,{size:ut}));let s=E(`div`,{class:`err`,part:`card`},E(`div`,{class:`eh`,part:`header`},o,E(`span`,{class:`lbl`,part:`label`},t)),E(`div`,{class:`eb`,part:`body`},r??E(`slot`)),E(`div`,{class:`foot`},E(`button`,{type:`button`,class:`retry`,part:`button`,"aria-label":i},n(a,{size:dt}),i)));this.#e.replaceChildren(s),this.#r()}#r(){this.#i();let e=this.#e.querySelector(`.retry`);if(!e)return;let t=this.action;this.#t=()=>{t===`settings`?this.openSettings():t===`change-model`?this.changeModel():t===`login`?this.login():this.retry()},e.addEventListener(`click`,this.#t)}#i(){let e=this.#e.querySelector(`.retry`);e&&this.#t&&e.removeEventListener(`click`,this.#t),this.#t=null}});var gt=9,_t=3,vt=45,yt=D(`
1037
+ `);S(`slicc-error-card`,class extends HTMLElement{static observedAttributes=[`label`,`message`,`button-label`,`message-id`,`action`,`theme`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[vt]}connectedCallback(){this.#n()}disconnectedCallback(){this.#i()}attributeChangedCallback(){this.isConnected&&this.#n()}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get message(){return this.getAttribute(`message`)}set message(e){e==null?this.removeAttribute(`message`):this.setAttribute(`message`,e)}get buttonLabel(){return this.getAttribute(`button-label`)}set buttonLabel(e){e==null?this.removeAttribute(`button-label`):this.setAttribute(`button-label`,e)}get messageId(){return this.getAttribute(`message-id`)}set messageId(e){e==null?this.removeAttribute(`message-id`):this.setAttribute(`message-id`,e)}get action(){let e=this.getAttribute(`action`);return e===`settings`||e===`change-model`||e===`login`?e:`retry`}set action(e){e==null?this.removeAttribute(`action`):this.setAttribute(`action`,e)}get theme(){let e=this.getAttribute(`theme`);return e===`light`||e===`dark`?e:null}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}retry(){this.dispatchEvent(new CustomEvent(`slicc-error-retry`,{detail:{messageId:this.getAttribute(`message-id`)??null},bubbles:!0,composed:!0}))}openSettings(){this.dispatchEvent(new CustomEvent(`slicc-error-open-settings`,{detail:{messageId:this.getAttribute(`message-id`)??null},bubbles:!0,composed:!0}))}changeModel(){this.dispatchEvent(new CustomEvent(`slicc-error-change-model`,{detail:{messageId:this.getAttribute(`message-id`)??null},bubbles:!0,composed:!0}))}login(){this.dispatchEvent(new CustomEvent(`slicc-error-login`,{detail:{messageId:this.getAttribute(`message-id`)??null},bubbles:!0,composed:!0}))}#n(){let e=this.action,t=this.label??ht,r=this.message,i=this.buttonLabel??gt[e],a=_t[e],o=w(`span`,{class:`ic`,part:`icon`,"aria-hidden":!0});o.append(n(`triangle-alert`,{size:pt}));let s=w(`div`,{class:`err`,part:`card`},w(`div`,{class:`eh`,part:`header`},o,w(`span`,{class:`lbl`,part:`label`},t)),w(`div`,{class:`eb`,part:`body`},r??w(`slot`)),w(`div`,{class:`foot`},w(`button`,{type:`button`,class:`retry`,part:`button`,"aria-label":i},n(a,{size:mt}),i)));this.#e.replaceChildren(s),this.#r()}#r(){this.#i();let e=this.#e.querySelector(`.retry`);if(!e)return;let t=this.action;this.#t=()=>{t===`settings`?this.openSettings():t===`change-model`?this.changeModel():t===`login`?this.login():this.retry()},e.addEventListener(`click`,this.#t)}#i(){let e=this.#e.querySelector(`.retry`);e&&this.#t&&e.removeEventListener(`click`,this.#t),this.#t=null}});var yt=9,bt=3,xt=45,St=T(`
1038
1038
  :host {
1039
1039
  display: inline-flex;
1040
1040
  align-items: center;
@@ -1115,7 +1115,7 @@ canvas.sprk {
1115
1115
  @media (prefers-reduced-motion: reduce) {
1116
1116
  :host([blink]) .eye { animation: none; }
1117
1117
  }
1118
- `);w(`slicc-googly-eyes`,class extends HTMLElement{static observedAttributes=[`inverted`,`tracking`,`blink`,`eyes`,`size`];#e;#t=[];#n=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[yt]}connectedCallback(){this.#r(),this.#i()}disconnectedCallback(){this.#o()}attributeChangedCallback(e,t,n){this.isConnected&&(e===`size`||e===`eyes`?(this.#r(),this.#i()):e===`tracking`&&this.#i())}get inverted(){return this.hasAttribute(`inverted`)}set inverted(e){this.toggleAttribute(`inverted`,e)}get tracking(){return this.getAttribute(`tracking`)!==`off`}set tracking(e){e?this.setAttribute(`tracking`,`on`):this.setAttribute(`tracking`,`off`)}get blink(){return this.hasAttribute(`blink`)}set blink(e){this.toggleAttribute(`blink`,e)}get eyes(){return this.getAttribute(`eyes`)===`dead`?`dead`:`open`}set eyes(e){this.setAttribute(`eyes`,e===`dead`?`dead`:`open`)}get size(){let e=Number.parseFloat(this.getAttribute(`size`)??``);return Number.isFinite(e)&&e>0?e:gt}set size(e){this.setAttribute(`size`,String(e))}#r(){let e=this.size,t=1.3/gt*e,n=this.eyes===`dead`,r=e=>E(`span`,{class:`eye`,part:e},n?E(`span`,{class:`x`,"aria-hidden":`true`},`×`):null),i=E(`span`,{class:`eyes`,part:`eyes`,style:`--_eye:${e}px;--_border:${t}px`,role:`img`,"aria-label":n?`dead eyes`:`googly eyes`},r(`eye eye-left`),E(`slot`),r(`eye eye-right`));this.#e.replaceChildren(i),this.#t=Array.from(this.#e.querySelectorAll(`.eye`)),this.#s()}#i(){this.tracking&&this.eyes===`open`?this.#a():(this.#o(),this.#s())}#a(){this.#n||(this.#n=e=>this.#c(e),document.addEventListener(`mousemove`,this.#n))}#o(){this.#n&&=(document.removeEventListener(`mousemove`,this.#n),null)}#s(){for(let e of this.#t)e.style.setProperty(`--px`,`0px`),e.style.setProperty(`--py`,`0px`)}#c(e){for(let t of this.#t){let n=t.getBoundingClientRect(),r=n.left+n.width/2,i=n.top+n.height/2,a=Math.atan2(e.clientY-i,e.clientX-r),o=Math.min(_t,Math.hypot(e.clientX-r,e.clientY-i)/vt);t.style.setProperty(`--px`,`${(Math.cos(a)*o).toFixed(2)}px`),t.style.setProperty(`--py`,`${(Math.sin(a)*o).toFixed(2)}px`)}}});var bt=D(`
1118
+ `);S(`slicc-googly-eyes`,class extends HTMLElement{static observedAttributes=[`inverted`,`tracking`,`blink`,`eyes`,`size`];#e;#t=[];#n=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[St]}connectedCallback(){this.#r(),this.#i()}disconnectedCallback(){this.#o()}attributeChangedCallback(e,t,n){this.isConnected&&(e===`size`||e===`eyes`?(this.#r(),this.#i()):e===`tracking`&&this.#i())}get inverted(){return this.hasAttribute(`inverted`)}set inverted(e){this.toggleAttribute(`inverted`,e)}get tracking(){return this.getAttribute(`tracking`)!==`off`}set tracking(e){e?this.setAttribute(`tracking`,`on`):this.setAttribute(`tracking`,`off`)}get blink(){return this.hasAttribute(`blink`)}set blink(e){this.toggleAttribute(`blink`,e)}get eyes(){return this.getAttribute(`eyes`)===`dead`?`dead`:`open`}set eyes(e){this.setAttribute(`eyes`,e===`dead`?`dead`:`open`)}get size(){let e=Number.parseFloat(this.getAttribute(`size`)??``);return Number.isFinite(e)&&e>0?e:yt}set size(e){this.setAttribute(`size`,String(e))}#r(){let e=this.size,t=1.3/yt*e,n=this.eyes===`dead`,r=e=>w(`span`,{class:`eye`,part:e},n?w(`span`,{class:`x`,"aria-hidden":`true`},`×`):null),i=w(`span`,{class:`eyes`,part:`eyes`,style:`--_eye:${e}px;--_border:${t}px`,role:`img`,"aria-label":n?`dead eyes`:`googly eyes`},r(`eye eye-left`),w(`slot`),r(`eye eye-right`));this.#e.replaceChildren(i),this.#t=Array.from(this.#e.querySelectorAll(`.eye`)),this.#s()}#i(){this.tracking&&this.eyes===`open`?this.#a():(this.#o(),this.#s())}#a(){this.#n||(this.#n=e=>this.#c(e),document.addEventListener(`mousemove`,this.#n))}#o(){this.#n&&=(document.removeEventListener(`mousemove`,this.#n),null)}#s(){for(let e of this.#t)e.style.setProperty(`--px`,`0px`),e.style.setProperty(`--py`,`0px`)}#c(e){for(let t of this.#t){let n=t.getBoundingClientRect(),r=n.left+n.width/2,i=n.top+n.height/2,a=Math.atan2(e.clientY-i,e.clientX-r),o=Math.min(bt,Math.hypot(e.clientX-r,e.clientY-i)/xt);t.style.setProperty(`--px`,`${(Math.cos(a)*o).toFixed(2)}px`),t.style.setProperty(`--py`,`${(Math.sin(a)*o).toFixed(2)}px`)}}});var Ct=T(`
1119
1119
  :host{display:block;font-family:var(--ui);}
1120
1120
  :host([hidden]){display:none;}
1121
1121
  .handoff{border:1px solid var(--line);border-radius:13px;padding:13px 15px;margin:2px 0 18px;}
@@ -1135,7 +1135,7 @@ canvas.sprk {
1135
1135
  .opened .sg{width:20px;height:20px;border-radius:6px;display:grid;place-items:center;color:#fff;background:var(--rainbow);flex:0 0 auto;}
1136
1136
  .opened .sg svg{display:block;}
1137
1137
  .opened b{color:var(--ink);font-weight:600;}
1138
- `),xt=`Handoff request from`;w(`slicc-handoff-card`,class extends HTMLElement{static observedAttributes=[`variant`,`name`,`pre`,`text`,`eyes`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[bt]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get variant(){return this.getAttribute(`variant`)===`opened`?`opened`:`handoff`}set variant(e){this.setAttribute(`variant`,e===`opened`?`opened`:`handoff`)}get name(){return this.getAttribute(`name`)}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,e)}get pre(){return this.getAttribute(`pre`)}set pre(e){e==null?this.removeAttribute(`pre`):this.setAttribute(`pre`,e)}get text(){return this.getAttribute(`text`)}set text(e){e==null?this.removeAttribute(`text`):this.setAttribute(`text`,e)}get eyes(){return this.getAttribute(`eyes`)===`dead`?`dead`:`open`}set eyes(e){this.setAttribute(`eyes`,e===`dead`?`dead`:`open`)}#t(){this.variant===`opened`?this.#i():this.#r()}#n(){let e=this.text;return e==null?E(`slot`):document.createTextNode(e)}#r(){let e=this.pre??xt,t=this.name,r=E(`slicc-googly-eyes`,{class:`eyes`});this.eyes===`dead`&&r.setAttribute(`eyes`,`dead`);let i=E(`div`,{class:`top`,part:`top`},E(`span`,{class:`av`,part:`avatar`},r),E(`span`,{class:`lbl2`,part:`label`},E(`span`,{class:`hand`,part:`hand`,"aria-hidden":`true`},n(`hand`,{size:13})),E(`span`,{class:`pre`},e),` `,t==null?null:E(`b`,{part:`name`},t))),a=E(`p`,{part:`text`},this.#n());this.#e.replaceChildren(E(`div`,{class:`handoff`,part:`card`},i,a))}#i(){let e=this.name,t=E(`span`,{class:`sg`,part:`glyph`,"aria-hidden":`true`},n(`sparkles`,{size:12})),r=E(`span`,{part:`text`},e==null?null:E(`b`,{part:`name`},e),e==null?null:` `,this.#n());this.#e.replaceChildren(E(`div`,{class:`opened`,part:`card`},t,r))}});var St=14,Ct=`event`,wt={webhook:`webhook`,cron:`clock`,workflow:`workflow`,"session-reload":`rotate-ccw`,navigate:`compass`,discovery:`radar`,upgrade:`circle-arrow-up`,sprinkle:`sparkles`,fswatch:`eye`,"scoop-notify":`bell-ring`,"scoop-idle":`moon`,"scoop-wait":`hourglass`,"sudo-request":`key-round`},Tt=`bell`;function Et(e){return e&&wt[e.toLowerCase()]||Tt}var Dt={confirmed:`circle-check`,dismissed:`circle-x`},Ot=D(`
1138
+ `),wt=`Handoff request from`;S(`slicc-handoff-card`,class extends HTMLElement{static observedAttributes=[`variant`,`name`,`pre`,`text`,`eyes`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ct]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get variant(){return this.getAttribute(`variant`)===`opened`?`opened`:`handoff`}set variant(e){this.setAttribute(`variant`,e===`opened`?`opened`:`handoff`)}get name(){return this.getAttribute(`name`)}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,e)}get pre(){return this.getAttribute(`pre`)}set pre(e){e==null?this.removeAttribute(`pre`):this.setAttribute(`pre`,e)}get text(){return this.getAttribute(`text`)}set text(e){e==null?this.removeAttribute(`text`):this.setAttribute(`text`,e)}get eyes(){return this.getAttribute(`eyes`)===`dead`?`dead`:`open`}set eyes(e){this.setAttribute(`eyes`,e===`dead`?`dead`:`open`)}#t(){this.variant===`opened`?this.#i():this.#r()}#n(){let e=this.text;return e==null?w(`slot`):document.createTextNode(e)}#r(){let e=this.pre??wt,t=this.name,r=w(`slicc-googly-eyes`,{class:`eyes`});this.eyes===`dead`&&r.setAttribute(`eyes`,`dead`);let i=w(`div`,{class:`top`,part:`top`},w(`span`,{class:`av`,part:`avatar`},r),w(`span`,{class:`lbl2`,part:`label`},w(`span`,{class:`hand`,part:`hand`,"aria-hidden":`true`},n(`hand`,{size:13})),w(`span`,{class:`pre`},e),` `,t==null?null:w(`b`,{part:`name`},t))),a=w(`p`,{part:`text`},this.#n());this.#e.replaceChildren(w(`div`,{class:`handoff`,part:`card`},i,a))}#i(){let e=this.name,t=w(`span`,{class:`sg`,part:`glyph`,"aria-hidden":`true`},n(`sparkles`,{size:12})),r=w(`span`,{part:`text`},e==null?null:w(`b`,{part:`name`},e),e==null?null:` `,this.#n());this.#e.replaceChildren(w(`div`,{class:`opened`,part:`card`},t,r))}});var Tt=14,Et=`event`,Dt={webhook:`webhook`,cron:`clock`,workflow:`workflow`,"session-reload":`rotate-ccw`,navigate:`compass`,discovery:`radar`,upgrade:`circle-arrow-up`,sprinkle:`sparkles`,fswatch:`eye`,"scoop-notify":`bell-ring`,"scoop-idle":`moon`,"scoop-wait":`hourglass`,"sudo-request":`key-round`},Ot=`bell`;function kt(e){return e&&Dt[e.toLowerCase()]||Ot}var At={confirmed:`circle-check`,dismissed:`circle-x`},jt=T(`
1139
1139
  :host{
1140
1140
  /* Licks are right-aligned in the chat column (mirroring the lickIn slide-in
1141
1141
  from the right): the host is a full-width flex row that pushes the card to
@@ -1223,7 +1223,7 @@ canvas.sprk {
1223
1223
  :host([collapsed]) .lb{display:none;}
1224
1224
 
1225
1225
  @keyframes lickIn{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:none}}
1226
- `),kt=`·`;w(`slicc-lick-card`,class extends HTMLElement{static observedAttributes=[`kind`,`event-label`,`body`,`count`,`no-animate`,`collapsible`,`collapsed`,`theme`,`hue`,`state`];#e;#t=null;#n=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ot]}connectedCallback(){this.#r()}disconnectedCallback(){this.#a()}attributeChangedCallback(){this.isConnected&&this.#r()}get kind(){return this.getAttribute(`kind`)}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}get eventLabel(){return this.getAttribute(`event-label`)}set eventLabel(e){e==null?this.removeAttribute(`event-label`):this.setAttribute(`event-label`,e)}get body(){return this.getAttribute(`body`)}set body(e){e==null?this.removeAttribute(`body`):this.setAttribute(`body`,e)}get count(){let e=Number.parseInt(this.getAttribute(`count`)??``,10);return Number.isFinite(e)&&e>0?e:1}set count(e){e>1?this.setAttribute(`count`,String(e)):this.removeAttribute(`count`)}get noAnimate(){return this.hasAttribute(`no-animate`)}set noAnimate(e){this.toggleAttribute(`no-animate`,e)}get collapsible(){return this.hasAttribute(`collapsible`)}set collapsible(e){this.toggleAttribute(`collapsible`,e)}get collapsed(){return this.hasAttribute(`collapsed`)}set collapsed(e){this.toggleAttribute(`collapsed`,e)}get theme(){let e=this.getAttribute(`theme`);return e===`light`||e===`dark`?e:null}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}get state(){let e=this.getAttribute(`state`);return e===`confirmed`||e===`dismissed`?e:`pending`}set state(e){e==null||e===`pending`?this.removeAttribute(`state`):this.setAttribute(`state`,e)}toggle(){this.collapsible&&(this.collapsed=!this.collapsed,this.dispatchEvent(new CustomEvent(`slicc-lick-toggle`,{detail:{collapsed:this.collapsed},bubbles:!0,composed:!0})))}#r(){let e=this.kind??``,t=this.count,r=this.getAttribute(`hue`);r?(this.style.setProperty(`--lick-pill`,r),this.style.setProperty(`--lick-pill-ink`,`#fff`)):(this.style.removeProperty(`--lick-pill`),this.style.removeProperty(`--lick-pill-ink`));let i=this.eventLabel??Ct,a=t>1?`${i} ×${t}`:i,o=this.body,s=this.collapsible,c=e?`lick ${kt} ${e}`:`lick ${kt}`,l=E(`span`,{class:`bell`,part:`bell`,"aria-hidden":!0});l.append(n(Et(e),{size:St}));let u={class:`lh`,part:`header`};s&&(u.tabindex=`0`,u.role=`button`,u[`aria-expanded`]=this.collapsed?`false`:`true`);let d=E(`div`,u,l,` `,E(`span`,{class:`kind`,part:`kind`},`${c} `),E(`span`,{class:`lk`,part:`event`},a)),f=this.state;if(f!==`pending`){let e=E(`span`,{class:`status`,part:`status`,"aria-hidden":!0});e.append(n(Dt[f],{size:St})),d.append(e)}let p=E(`div`,{class:`lick`,part:`card`},d,E(`div`,{class:`lb`,part:`body`},o??E(`slot`)));this.#e.replaceChildren(p),this.#i()}#i(){if(this.#a(),!this.collapsible)return;let e=this.#e.querySelector(`.lh`);e&&(this.#t=()=>this.toggle(),this.#n=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.toggle())},e.addEventListener(`click`,this.#t),e.addEventListener(`keydown`,this.#n))}#a(){let e=this.#e.querySelector(`.lh`);e&&this.#t&&e.removeEventListener(`click`,this.#t),e&&this.#n&&e.removeEventListener(`keydown`,this.#n),this.#t=null,this.#n=null}});var At=`
1226
+ `),Mt=`·`;S(`slicc-lick-card`,class extends HTMLElement{static observedAttributes=[`kind`,`event-label`,`body`,`count`,`no-animate`,`collapsible`,`collapsed`,`theme`,`hue`,`state`];#e;#t=null;#n=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[jt]}connectedCallback(){this.#r()}disconnectedCallback(){this.#a()}attributeChangedCallback(){this.isConnected&&this.#r()}get kind(){return this.getAttribute(`kind`)}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}get eventLabel(){return this.getAttribute(`event-label`)}set eventLabel(e){e==null?this.removeAttribute(`event-label`):this.setAttribute(`event-label`,e)}get body(){return this.getAttribute(`body`)}set body(e){e==null?this.removeAttribute(`body`):this.setAttribute(`body`,e)}get count(){let e=Number.parseInt(this.getAttribute(`count`)??``,10);return Number.isFinite(e)&&e>0?e:1}set count(e){e>1?this.setAttribute(`count`,String(e)):this.removeAttribute(`count`)}get noAnimate(){return this.hasAttribute(`no-animate`)}set noAnimate(e){this.toggleAttribute(`no-animate`,e)}get collapsible(){return this.hasAttribute(`collapsible`)}set collapsible(e){this.toggleAttribute(`collapsible`,e)}get collapsed(){return this.hasAttribute(`collapsed`)}set collapsed(e){this.toggleAttribute(`collapsed`,e)}get theme(){let e=this.getAttribute(`theme`);return e===`light`||e===`dark`?e:null}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}get state(){let e=this.getAttribute(`state`);return e===`confirmed`||e===`dismissed`?e:`pending`}set state(e){e==null||e===`pending`?this.removeAttribute(`state`):this.setAttribute(`state`,e)}toggle(){this.collapsible&&(this.collapsed=!this.collapsed,this.dispatchEvent(new CustomEvent(`slicc-lick-toggle`,{detail:{collapsed:this.collapsed},bubbles:!0,composed:!0})))}#r(){let e=this.kind??``,t=this.count,r=this.getAttribute(`hue`);r?(this.style.setProperty(`--lick-pill`,r),this.style.setProperty(`--lick-pill-ink`,`#fff`)):(this.style.removeProperty(`--lick-pill`),this.style.removeProperty(`--lick-pill-ink`));let i=this.eventLabel??Et,a=t>1?`${i} ×${t}`:i,o=this.body,s=this.collapsible,c=e?`lick ${Mt} ${e}`:`lick ${Mt}`,l=w(`span`,{class:`bell`,part:`bell`,"aria-hidden":!0});l.append(n(kt(e),{size:Tt}));let u={class:`lh`,part:`header`};s&&(u.tabindex=`0`,u.role=`button`,u[`aria-expanded`]=this.collapsed?`false`:`true`);let d=w(`div`,u,l,` `,w(`span`,{class:`kind`,part:`kind`},`${c} `),w(`span`,{class:`lk`,part:`event`},a)),f=this.state;if(f!==`pending`){let e=w(`span`,{class:`status`,part:`status`,"aria-hidden":!0});e.append(n(At[f],{size:Tt})),d.append(e)}let p=w(`div`,{class:`lick`,part:`card`},d,w(`div`,{class:`lb`,part:`body`},o??w(`slot`)));this.#e.replaceChildren(p),this.#i()}#i(){if(this.#a(),!this.collapsible)return;let e=this.#e.querySelector(`.lh`);e&&(this.#t=()=>this.toggle(),this.#n=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.toggle())},e.addEventListener(`click`,this.#t),e.addEventListener(`keydown`,this.#n))}#a(){let e=this.#e.querySelector(`.lh`);e&&this.#t&&e.removeEventListener(`click`,this.#t),e&&this.#n&&e.removeEventListener(`keydown`,this.#n),this.#t=null,this.#n=null}});var Nt=`
1227
1227
  slicc-tool-cluster {
1228
1228
  display: block;
1229
1229
  margin: -2px 0 16px;
@@ -1299,7 +1299,7 @@ slicc-tool-cluster[open] .slicc-cluster__body {
1299
1299
  slicc-tool-cluster .slicc-cluster__body slicc-action-row {
1300
1300
  margin-bottom: 4px;
1301
1301
  }
1302
- `,jt=`slicc-tool-cluster-style`;function Mt(e){if(e.getElementById(jt))return;let t=e.createElement(`style`);t.id=jt,t.textContent=At,(e.head??e.documentElement).appendChild(t)}var Nt=`A few quick steps`;w(`slicc-tool-cluster`,class extends HTMLElement{static observedAttributes=[`open`,`label`,`count`];#e;#t;#n;#r;#i=!1;#a=()=>{this.open=!this.open};connectedCallback(){Mt(this.ownerDocument),this.#o(),this.#s(),this.#e?.addEventListener(`click`,this.#a)}disconnectedCallback(){this.#e?.removeEventListener(`click`,this.#a)}attributeChangedCallback(e,t,n){t===n||!this.#i||(e===`open`?(this.#e.setAttribute(`aria-expanded`,String(n!==null)),this.dispatchEvent(new CustomEvent(`slicc-tool-cluster-toggle`,{bubbles:!0,composed:!0,detail:{open:n!==null}}))):this.#s())}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get label(){return this.getAttribute(`label`)??Nt}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get count(){let e=Number.parseInt(this.getAttribute(`count`)??``,10);return Number.isFinite(e)&&e>0?e:0}set count(e){e>0?this.setAttribute(`count`,String(e)):this.removeAttribute(`count`)}get body(){return this.#o(),this.#r}append(...e){this.#o(),this.#r.append(...e),this.#s()}#o(){if(this.#i)return;this.#i=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`slicc-cluster__head`))&&!(e instanceof HTMLElement&&e.classList.contains(`slicc-cluster__body`)));this.#e=this.ownerDocument.createElement(`button`),this.#e.type=`button`,this.#e.className=`slicc-cluster__head`,this.#e.setAttribute(`part`,`head`),this.#t=E(`span`,{class:`slicc-cluster__label`,part:`label`}),this.#n=E(`span`,{class:`slicc-cluster__count`,part:`count`}),T(this.#e,[E(`span`,{class:`slicc-cluster__ic`,part:`icon`},n(`layers`,{size:12})),this.#t,this.#n,E(`span`,{class:`slicc-cluster__chev`,part:`chevron`,"aria-hidden":`true`},`▸`)]),this.#r=this.ownerDocument.createElement(`div`),this.#r.className=`slicc-cluster__body`,this.#r.setAttribute(`part`,`body`);for(let t of e)this.#r.appendChild(t);this.replaceChildren(this.#e,this.#r),this.#e.addEventListener(`click`,this.#a)}#s(){if(!this.#i)return;this.#t.textContent=this.label;let e=this.count||this.#r.children.length;this.#n.textContent=e>0?`${e} steps`:``,this.#e.setAttribute(`aria-expanded`,String(this.open))}});var Pt=400,Ft=D(`
1302
+ `,Pt=`slicc-tool-cluster-style`;function Ft(e){if(e.getElementById(Pt))return;let t=e.createElement(`style`);t.id=Pt,t.textContent=Nt,(e.head??e.documentElement).appendChild(t)}var It=`A few quick steps`;S(`slicc-tool-cluster`,class extends HTMLElement{static observedAttributes=[`open`,`label`,`count`];#e;#t;#n;#r;#i=!1;#a=()=>{this.open=!this.open};connectedCallback(){Ft(this.ownerDocument),this.#o(),this.#s(),this.#e?.addEventListener(`click`,this.#a)}disconnectedCallback(){this.#e?.removeEventListener(`click`,this.#a)}attributeChangedCallback(e,t,n){t===n||!this.#i||(e===`open`?(this.#e.setAttribute(`aria-expanded`,String(n!==null)),this.dispatchEvent(new CustomEvent(`slicc-tool-cluster-toggle`,{bubbles:!0,composed:!0,detail:{open:n!==null}}))):this.#s())}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get label(){return this.getAttribute(`label`)??It}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get count(){let e=Number.parseInt(this.getAttribute(`count`)??``,10);return Number.isFinite(e)&&e>0?e:0}set count(e){e>0?this.setAttribute(`count`,String(e)):this.removeAttribute(`count`)}get body(){return this.#o(),this.#r}append(...e){this.#o(),this.#r.append(...e),this.#s()}#o(){if(this.#i)return;this.#i=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`slicc-cluster__head`))&&!(e instanceof HTMLElement&&e.classList.contains(`slicc-cluster__body`)));this.#e=this.ownerDocument.createElement(`button`),this.#e.type=`button`,this.#e.className=`slicc-cluster__head`,this.#e.setAttribute(`part`,`head`),this.#t=w(`span`,{class:`slicc-cluster__label`,part:`label`}),this.#n=w(`span`,{class:`slicc-cluster__count`,part:`count`}),C(this.#e,[w(`span`,{class:`slicc-cluster__ic`,part:`icon`},n(`layers`,{size:12})),this.#t,this.#n,w(`span`,{class:`slicc-cluster__chev`,part:`chevron`,"aria-hidden":`true`},`▸`)]),this.#r=this.ownerDocument.createElement(`div`),this.#r.className=`slicc-cluster__body`,this.#r.setAttribute(`part`,`body`);for(let t of e)this.#r.appendChild(t);this.replaceChildren(this.#e,this.#r),this.#e.addEventListener(`click`,this.#a)}#s(){if(!this.#i)return;this.#t.textContent=this.label;let e=this.count||this.#r.children.length;this.#n.textContent=e>0?`${e} steps`:``,this.#e.setAttribute(`aria-expanded`,String(this.open))}});var Lt=400,Rt=T(`
1303
1303
  :host{position:fixed;inset:0;z-index:1000;display:none;}
1304
1304
  :host([open]){display:block;}
1305
1305
  .overlay{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;cursor:pointer;}
@@ -1307,7 +1307,7 @@ slicc-tool-cluster .slicc-cluster__body slicc-action-row {
1307
1307
  .overlay.visible .backdrop{opacity:1;}
1308
1308
  .overlay.closing .backdrop{opacity:0;}
1309
1309
  .image{position:absolute;border-radius:6px;box-shadow:0 20px 60px rgba(0,0,0,.4),0 8px 20px rgba(0,0,0,.3);max-width:90vw;max-height:90vh;object-fit:contain;transform-origin:center center;will-change:transform;transition:transform .35s cubic-bezier(.2,0,.13,1),border-radius .35s cubic-bezier(.2,0,.13,1);}
1310
- `),M=null,N=class extends HTMLElement{#e;#t=null;#n=null;#r=null;#i=null;#a=!1;#o=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ft]}disconnectedCallback(){this.#l(),M===this&&(M=null)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get isOpen(){return this.hasAttribute(`open`)}open(e,t){M&&M!==this&&M.#s(),this.#l(),this.#a=!1,this.src=e,this.setAttribute(`open`,``),M=this,this.#r=t??this;let n=document.createElement(`div`);n.className=`overlay`,n.setAttribute(`part`,`overlay`);let r=document.createElement(`div`);r.className=`backdrop`,r.setAttribute(`part`,`backdrop`),n.appendChild(r);let i=document.createElement(`img`);i.className=`image`,i.setAttribute(`part`,`image`),i.src=e,i.alt=`Image preview`,n.appendChild(i),this.#e.appendChild(n),this.#t=n,this.#n=i;let a=this.#r.getBoundingClientRect(),o=()=>{let e=window.innerWidth,t=window.innerHeight,r=e*.9,o=t*.9,s=i.naturalWidth||a.width*4,c=i.naturalHeight||a.height*4,l=Math.min(r/s,o/c,1),u=s*l,d=c*l,f=(e-u)/2,p=(t-d)/2,m=a.width/u,h=a.height/d,g=a.left+a.width/2,_=a.top+a.height/2,v=f+u/2,y=p+d/2,b=g-v,x=_-y;i.style.position=`absolute`,i.style.width=`${u}px`,i.style.height=`${d}px`,i.style.left=`${f}px`,i.style.top=`${p}px`,i.style.transform=`translate(${b}px, ${x}px) scale(${m}, ${h})`,i.style.borderRadius=`${6/Math.min(m,h)}px`,requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.style.transform=`translate(0, 0) scale(1, 1)`,i.style.borderRadius=`6px`,n.classList.add(`visible`)})})};i.complete&&i.naturalWidth>0?o():(i.onload=()=>o(),i.onerror=()=>this.#s()),this.#i=e=>{e.key===`Escape`&&this.close()},n.addEventListener(`click`,()=>this.close()),document.addEventListener(`keydown`,this.#i),this.dispatchEvent(new CustomEvent(`slicc-image-preview-open`,{bubbles:!0,composed:!0,detail:{src:e}}))}close(){let e=this.#t,t=this.#n;if(this.#a||!e||!t||M!==this)return;this.#a=!0,e.classList.add(`closing`),e.classList.remove(`visible`);let n=this.#r,r=n?n.getBoundingClientRect():null;if(r&&r.width>0&&r.height>0){let e=t.getBoundingClientRect(),n=r.width/e.width,i=r.height/e.height,a=r.left+r.width/2,o=r.top+r.height/2,s=e.left+e.width/2,c=e.top+e.height/2,l=a-s,u=o-c;t.style.transform=`translate(${l}px, ${u}px) scale(${n}, ${i})`,t.style.borderRadius=`${6/Math.min(n,i)}px`}this.dispatchEvent(new CustomEvent(`slicc-image-preview-close`,{bubbles:!0,composed:!0,detail:{src:this.src}}));let i=()=>this.#c();this.#o=setTimeout(i,Pt),e.addEventListener(`transitionend`,e=>{e.propertyName===`transform`&&(this.#o&&clearTimeout(this.#o),i())})}#s(){this.#l()}#c(){this.#l()}#l(){this.#o&&=(clearTimeout(this.#o),null),this.#i&&=(document.removeEventListener(`keydown`,this.#i),null),this.#t&&=(this.#t.remove(),null),this.#n=null,this.#r=null,this.removeAttribute(`open`),this.removeAttribute(`src`),M===this&&(M=null)}static show(e,t){let n=document.querySelector(`slicc-image-preview[data-shared]`);return n||(n=document.createElement(`slicc-image-preview`),n.setAttribute(`data-shared`,``),document.body.appendChild(n)),n.open(e,t),()=>n.close()}};w(`slicc-image-preview`,N);var It=D(`
1310
+ `),A=null,zt=class extends HTMLElement{#e;#t=null;#n=null;#r=null;#i=null;#a=!1;#o=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Rt]}disconnectedCallback(){this.#l(),A===this&&(A=null)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get isOpen(){return this.hasAttribute(`open`)}open(e,t){A&&A!==this&&A.#s(),this.#l(),this.#a=!1,this.src=e,this.setAttribute(`open`,``),A=this,this.#r=t??this;let n=document.createElement(`div`);n.className=`overlay`,n.setAttribute(`part`,`overlay`);let r=document.createElement(`div`);r.className=`backdrop`,r.setAttribute(`part`,`backdrop`),n.appendChild(r);let i=document.createElement(`img`);i.className=`image`,i.setAttribute(`part`,`image`),i.src=e,i.alt=`Image preview`,n.appendChild(i),this.#e.appendChild(n),this.#t=n,this.#n=i;let a=this.#r.getBoundingClientRect(),o=()=>{let e=window.innerWidth,t=window.innerHeight,r=e*.9,o=t*.9,s=i.naturalWidth||a.width*4,c=i.naturalHeight||a.height*4,l=Math.min(r/s,o/c,1),u=s*l,d=c*l,f=(e-u)/2,p=(t-d)/2,m=a.width/u,h=a.height/d,g=a.left+a.width/2,_=a.top+a.height/2,v=f+u/2,y=p+d/2,ee=g-v,b=_-y;i.style.position=`absolute`,i.style.width=`${u}px`,i.style.height=`${d}px`,i.style.left=`${f}px`,i.style.top=`${p}px`,i.style.transform=`translate(${ee}px, ${b}px) scale(${m}, ${h})`,i.style.borderRadius=`${6/Math.min(m,h)}px`,requestAnimationFrame(()=>{requestAnimationFrame(()=>{i.style.transform=`translate(0, 0) scale(1, 1)`,i.style.borderRadius=`6px`,n.classList.add(`visible`)})})};i.complete&&i.naturalWidth>0?o():(i.onload=()=>o(),i.onerror=()=>this.#s()),this.#i=e=>{e.key===`Escape`&&this.close()},n.addEventListener(`click`,()=>this.close()),document.addEventListener(`keydown`,this.#i),this.dispatchEvent(new CustomEvent(`slicc-image-preview-open`,{bubbles:!0,composed:!0,detail:{src:e}}))}close(){let e=this.#t,t=this.#n;if(this.#a||!e||!t||A!==this)return;this.#a=!0,e.classList.add(`closing`),e.classList.remove(`visible`);let n=this.#r,r=n?n.getBoundingClientRect():null;if(r&&r.width>0&&r.height>0){let e=t.getBoundingClientRect(),n=r.width/e.width,i=r.height/e.height,a=r.left+r.width/2,o=r.top+r.height/2,s=e.left+e.width/2,c=e.top+e.height/2,l=a-s,u=o-c;t.style.transform=`translate(${l}px, ${u}px) scale(${n}, ${i})`,t.style.borderRadius=`${6/Math.min(n,i)}px`}this.dispatchEvent(new CustomEvent(`slicc-image-preview-close`,{bubbles:!0,composed:!0,detail:{src:this.src}}));let i=()=>this.#c();this.#o=setTimeout(i,Lt),e.addEventListener(`transitionend`,e=>{e.propertyName===`transform`&&(this.#o&&clearTimeout(this.#o),i())})}#s(){this.#l()}#c(){this.#l()}#l(){this.#o&&=(clearTimeout(this.#o),null),this.#i&&=(document.removeEventListener(`keydown`,this.#i),null),this.#t&&=(this.#t.remove(),null),this.#n=null,this.#r=null,this.removeAttribute(`open`),this.removeAttribute(`src`),A===this&&(A=null)}static show(e,t){let n=document.querySelector(`slicc-image-preview[data-shared]`);return n||(n=document.createElement(`slicc-image-preview`),n.setAttribute(`data-shared`,``),document.body.appendChild(n)),n.open(e,t),()=>n.close()}};S(`slicc-image-preview`,zt);var Bt=T(`
1311
1311
  :host{display:block;margin-bottom:18px;font-family:var(--ui);font-size:15px;line-height:1.5;}
1312
1312
  :host([hidden]){display:none;}
1313
1313
  .msg{display:flex;justify-content:flex-end;}
@@ -1348,7 +1348,7 @@ slicc-tool-cluster .slicc-cluster__body slicc-action-row {
1348
1348
  :host([queued]) .b{opacity:.62;}
1349
1349
  .queued-tag{display:inline-flex;align-items:center;gap:4px;font-size:10.5px;color:var(--txt-3);}
1350
1350
  .queued-tag svg{display:block;}
1351
- `),Lt={image:`image`,text:`file-text`,file:`file`};function Rt(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}w(`slicc-user-message`,class extends HTMLElement{static observedAttributes=[`text`,`queued`,`timestamp`];#e;#t=null;#n=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[It]}connectedCallback(){this.#a()}attributeChangedCallback(){this.isConnected&&this.#a()}get text(){return this.getAttribute(`text`)}set text(e){e==null?this.removeAttribute(`text`):this.setAttribute(`text`,e)}get queued(){return this.hasAttribute(`queued`)}set queued(e){this.toggleAttribute(`queued`,e)}setBodyHtml(e){this.#t=e,this.#a()}setAttachments(e){this.#n=e.slice(),this.#a()}#r(){if(this.#t!=null)return this.ownerDocument.createRange().createContextualFragment(this.#t);let e=this.text;return e==null?E(`slot`):this.ownerDocument.createTextNode(e)}#i(e){let t=e.kind??`file`,r=E(`span`,{class:`attachment-chip__visual`});if(t===`image`&&e.src){let t=E(`img`,{src:e.src,alt:e.name||`Attached image`});t.addEventListener(`click`,n=>{n.stopPropagation(),N.show(e.src,t)}),r.append(t)}else r.append(n(Lt[t],{size:16}));let i=e.size==null?e.mime:`${e.mime||`file`} · ${Rt(e.size)}`,a=E(`span`,{class:`attachment-chip__body`},E(`span`,{class:`attachment-chip__name`},e.name),i?E(`span`,{class:`attachment-chip__meta`},i):null);return E(`div`,{class:`attachment-chip attachment-chip--${t}`},r,a)}#a(){let e=this.#n.length>0,t=this.text!=null||this.#t!=null,r=this.childNodes.length>0,i=t||r||!e,a=E(`div`,{class:`stack`,part:`stack`}),o=this.getAttribute(`timestamp`);if(o&&a.append(E(`span`,{class:`ts`,part:`timestamp`},o)),e){let e=E(`div`,{class:`attachments`,part:`attachments`});for(let t of this.#n)e.append(this.#i(t));a.append(e)}i&&a.append(E(`div`,{class:`b`,part:`bubble`},this.#r())),this.queued&&a.append(E(`span`,{class:`queued-tag`,part:`queued`},n(`clock`,{size:11}),`queued`));let s=E(`div`,{class:`msg user`,part:`message`},a);this.#e.replaceChildren(s)}});var zt=`
1351
+ `),Vt={image:`image`,text:`file-text`,file:`file`};function Ht(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}S(`slicc-user-message`,class extends HTMLElement{static observedAttributes=[`text`,`queued`,`timestamp`];#e;#t=null;#n=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Bt]}connectedCallback(){this.#a()}attributeChangedCallback(){this.isConnected&&this.#a()}get text(){return this.getAttribute(`text`)}set text(e){e==null?this.removeAttribute(`text`):this.setAttribute(`text`,e)}get queued(){return this.hasAttribute(`queued`)}set queued(e){this.toggleAttribute(`queued`,e)}setBodyHtml(e){this.#t=e,this.#a()}setAttachments(e){this.#n=e.slice(),this.#a()}#r(){if(this.#t!=null)return this.ownerDocument.createRange().createContextualFragment(this.#t);let e=this.text;return e==null?w(`slot`):this.ownerDocument.createTextNode(e)}#i(e){let t=e.kind??`file`,r=w(`span`,{class:`attachment-chip__visual`});if(t===`image`&&e.src){let t=w(`img`,{src:e.src,alt:e.name||`Attached image`});t.addEventListener(`click`,n=>{n.stopPropagation(),zt.show(e.src,t)}),r.append(t)}else r.append(n(Vt[t],{size:16}));let i=e.size==null?e.mime:`${e.mime||`file`} · ${Ht(e.size)}`,a=w(`span`,{class:`attachment-chip__body`},w(`span`,{class:`attachment-chip__name`},e.name),i?w(`span`,{class:`attachment-chip__meta`},i):null);return w(`div`,{class:`attachment-chip attachment-chip--${t}`},r,a)}#a(){let e=this.#n.length>0,t=this.text!=null||this.#t!=null,r=this.childNodes.length>0,i=t||r||!e,a=w(`div`,{class:`stack`,part:`stack`}),o=this.getAttribute(`timestamp`);if(o&&a.append(w(`span`,{class:`ts`,part:`timestamp`},o)),e){let e=w(`div`,{class:`attachments`,part:`attachments`});for(let t of this.#n)e.append(this.#i(t));a.append(e)}i&&a.append(w(`div`,{class:`b`,part:`bubble`},this.#r())),this.queued&&a.append(w(`span`,{class:`queued-tag`,part:`queued`},n(`clock`,{size:11}),`queued`));let s=w(`div`,{class:`msg user`,part:`message`},a);this.#e.replaceChildren(s)}});var Ut=`
1352
1352
  slicc-composer {
1353
1353
  flex: 0 0 auto;
1354
1354
  display: block;
@@ -1639,7 +1639,7 @@ slicc-composer .slicc-composer__ptt.is-picking {
1639
1639
  animation-name: none;
1640
1640
  }
1641
1641
  }
1642
- `,Bt=`slicc-composer-style`;function Vt(e){if(e.getElementById(Bt))return;let t=e.createElement(`style`);t.id=Bt,t.textContent=zt,(e.head??e.documentElement).appendChild(t)}var Ht=1e3,Ut=60,Wt=1e4,Gt=45e3,Kt=1500;function P(e,t,n){return new Promise((r,i)=>{let a=setTimeout(()=>i(n),t);e.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e instanceof Error?e:Error(String(e)))})})}var F=`slicc-composer:mic-device`;function qt(){try{return typeof localStorage>`u`?null:localStorage.getItem(F)}catch{return null}}function Jt(e){try{if(typeof localStorage>`u`)return;e?localStorage.setItem(F,e):localStorage.removeItem(F)}catch{}}function Yt(e){return e==null||!Number.isFinite(e)?``:e<60?`~${Math.max(1,Math.round(e))}s`:`~${Math.floor(e/60)}m ${Math.round(e%60)}s`}w(`slicc-composer`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=!1;#n=null;#r=`idle`;#i=!1;#a=0;#o=null;#s=null;#c=null;#l=null;#u=null;#d=`unknown`;#f=qt();#p=null;#m=null;#h=null;#g=null;#_=null;#v=null;#y=null;#b=null;#x=null;#S=null;#C=null;#w=[];connectedCallback(){Vt(this.ownerDocument),this.#T(),this.addEventListener(`pointerdown`,this.#E)}disconnectedCallback(){this.removeEventListener(`pointerdown`,this.#E),this.#c?.cancel(),this.#c=null,this.#j(),this.#i=!1,this.#o=null,this.#a++,this.#z(),this.#L(),this.#m&&clearTimeout(this.#m),this.#m=null,this.#R(),this.#G(),this.#ee()}attributeChangedCallback(){}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get speech(){return this.#u??=s(),this.#u}set speech(e){this.#u=e,this.#d=`unknown`}get device(){return this.#f}set device(e){this.#f=e,Jt(e)}get inner(){return this.#T(),this.#e}append(...e){this.#T(),this.#e.append(...e)}#T(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > .slicc-composer__inner`);if(e instanceof HTMLElement){this.#e=e;return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-composer__inner`,this.#e.setAttribute(`part`,`inner`);for(let e of t)this.#e.appendChild(e);this.appendChild(this.#e)}#E=e=>{if(!this.hasAttribute(`ptt`)||!e.isPrimary||this.#i||e.button!==0||this.#r===`finalizing`||this.#r===`picking`)return;let t=e.target?.closest?.(`textarea`);if(!(t instanceof HTMLTextAreaElement)||!this.contains(t)||t.value!==``)return;this.#i=!0,this.#a++,this.#o=t,this.#s=e.pointerId;try{this.setPointerCapture(e.pointerId)}catch{}let n=this.ownerDocument;n.addEventListener(`pointerup`,this.#M),this.addEventListener(`pointercancel`,this.#N),n.addEventListener(`selectionchange`,this.#D);let r=this.#a;this.#h=setTimeout(()=>{this.#L(),this.#O(this.speech,r)},400)};#D=()=>{if(!this.#h)return;let e=this.ownerDocument.getSelection();!e||e.isCollapsed||e.toString()===``||(this.#i=!1,this.#a++,this.#o=null,this.#L(),this.#z(),this.#R())};async#O(e,t){let n=await Promise.race([e.permission().then(e=>(this.#d=e,e)),new Promise(e=>setTimeout(()=>e(`pending`),Ut))]);if(!(t!==this.#a||!this.#i)){if(n===`granted`){this.#A(e,t);return}if(n===`denied`){this.#q(`denied`);return}this.#q(`enable`),this.#m=setTimeout(()=>{this.#m=null,this.#k(e,t)},Ht),n===`pending`&&e.permission().then(n=>{this.#d=n,!(t!==this.#a||!this.#i||this.#r!==`enable`)&&(n===`granted`?(this.#I(),this.#A(e,t)):n===`denied`&&(this.#I(),this.#q(`denied`)))})}}#k(e,t){t!==this.#a||!this.#i||this.#r!==`enable`||(this.#v=null,this.#q(`prompting`),P(e.requestPermission(),Wt,Error(`Microphone didn't respond. Check your mic, then hold again.`)).then(n=>{this.#d=n?`granted`:`denied`,n&&e.warmup(),t===this.#a&&(n&&this.#i?this.#A(e,t):n?this.#ee():this.#i?this.#q(`denied`):this.#ee())}).catch(e=>{this.#d=`denied`,t===this.#a&&(this.#i?(this.#v=e instanceof Error?e.message:String(e),this.#q(`denied`)):this.#ee())}))}#A(e,t){this.#r=`recording`,this.#q(`recording`),e.warmup(),this.#g?.(),this.#g=e.onStatus(e=>{this.#_=e,this.#Q()});let n=e.microphones();n.then(e=>{t===this.#a&&(this.#f??(this.#p=o(e)),i(e)&&this.#$(e))}).catch(()=>{});let r=(this.#f==null?P(n,Kt,Error(`microphone enumeration timed out`)).then(e=>o(e)).catch(()=>null):Promise.resolve(this.#f)).then(n=>e.start({deviceId:n??void 0,onPartial:e=>{t===this.#a&&this.#Z(e)},onError:e=>{t===this.#a&&this.#Z(e,!0)}}));this.#l=r,r.then(e=>{if(this.#l===r){if(this.#l=null,t!==this.#a||this.#r!==`recording`){e.cancel();return}this.#c=e}}).catch(e=>{this.#l===r&&(this.#l=null,t===this.#a&&this.#Z(e instanceof Error?e.message:String(e),!0))})}#j(){let e=this.#l;this.#l=null,e&&e.then(e=>e.cancel(),()=>{})}#M=e=>{if(!this.#i||this.#s!=null&&e.pointerId!==this.#s)return;let t=this.#S,n=!1;if(this.#r===`recording`&&t&&!t.hidden)if(e.composedPath().includes(t))n=!0;else{let r=this.ownerDocument.elementFromPoint(e.clientX,e.clientY);n=r!=null&&t.contains(r)}if(n){this.#i=!1,this.#z(),this.#R(),this.#c?.cancel(),this.#c=null,this.#j(),this.#o=null,this.#B();return}this.#P(!0)};#N=e=>{this.#s!=null&&e.pointerId!==this.#s||this.#P(!1)};#P(e){if(!this.#i)return;switch(this.#i=!1,this.#L(),this.#z(),this.#R(),this.#r){case`enable`:this.#I(),this.#o=null,this.#ee();return;case`prompting`:this.#o=null;return;case`denied`:this.#o=null,this.#ee();return;case`recording`:break;default:this.#o=null,this.#ee();return}let t=this.#c;this.#c=null;let n=this.#l;if(this.#l=null,!e){t?.cancel(),n&&n.then(e=>e.cancel(),()=>{}),this.#o=null,this.#ee();return}if(!t&&!n){this.#o=null,this.#ee();return}this.#r=`finalizing`,this.#Z(`Transcribing…`);let r=this.#a;P((t?Promise.resolve(t):n).then(e=>e.stop()),Gt,Error(`finalize timed out`)).then(e=>{r===this.#a&&(this.#ee(),this.#F(e))}).catch(()=>{r===this.#a&&(this.#ee(),this.#o=null)})}#F(e){let t=this.#o;if(this.#o=null,!t)return;let n=e.trim();if(!n){t.focus();return}t.value=t.value?/\s$/.test(t.value)?t.value+n:`${t.value} ${n}`:n,t.dispatchEvent(new Event(`input`,{bubbles:!0})),t.focus();let r=t.closest(`slicc-input-card`);r&&typeof r.submit==`function`?r.submit(`dictation`):t.dispatchEvent(new CustomEvent(`submit`,{bubbles:!0,composed:!0,detail:{value:t.value,source:`dictation`}}))}#I(){this.#m&&clearTimeout(this.#m),this.#m=null}#L(){this.#h&&clearTimeout(this.#h),this.#h=null,this.ownerDocument.removeEventListener(`selectionchange`,this.#D)}#R(){this.ownerDocument.removeEventListener(`pointerup`,this.#M),this.removeEventListener(`pointercancel`,this.#N)}#z(){let e=this.#s;if(this.#s=null,e!=null)try{this.releasePointerCapture(e)}catch{}}#B(){this.#r=`picking`,this.#X(`picking`),this.#y&&(this.#y.textContent=`Choose a microphone`),this.#b&&(this.#b.hidden=!0),this.#V();let e=this.ownerDocument;e.addEventListener(`pointerdown`,this.#U,!0),e.addEventListener(`keydown`,this.#W,!0)}#V(){let e=this.#S;if(!e||this.#C)return;let t=E(`div`,{class:`slicc-composer__ptt-device-menu`,role:`menu`}),r=null,i=this.#f??this.#p;for(let e of this.#w){let a=e.deviceId===i,o=E(`button`,{type:`button`,class:`slicc-composer__ptt-device-item`,role:`menuitemradio`,"aria-checked":a?`true`:`false`,"data-device-id":e.deviceId},e.label,E(`span`,{class:`tick`},n(`check`,{size:14})));o.addEventListener(`click`,()=>{this.device=e.deviceId,this.#K()}),(a||!r)&&(r=o),t.appendChild(o)}this.#C=t,e.appendChild(t),this.#H(t,e),r?.focus()}#H(e,t){let n=t.getBoundingClientRect(),r=(window.innerHeight||document.documentElement.clientHeight)-n.bottom-6-8,i=n.top-6-8,a=e.offsetHeight>r&&i>r;e.classList.toggle(`slicc-composer__ptt-device-menu--up`,a);let o=Math.max(a?i:r,0);e.style.maxHeight=`${Math.min(320,o)}px`}#U=e=>{this.#S&&e.composedPath().includes(this.#S)||this.#K()};#W=e=>{e.key===`Escape`&&(e.stopPropagation(),this.#K())};#G(){let e=this.ownerDocument;e.removeEventListener(`pointerdown`,this.#U,!0),e.removeEventListener(`keydown`,this.#W,!0)}#K(){this.#G(),this.#ee()}#q(e){switch(this.#r=e,this.#n||(this.#n=E(`div`,{class:`slicc-composer__ptt`,"data-ptt":!0,role:`button`}),this.appendChild(this.#n)),this.#X(e),e){case`enable`:this.#J(n(`mic`,{size:28}),`Hold to enable push to talk`,this.#Y(`Requesting microphone access when the bar fills`)),this.#n.setAttribute(`aria-label`,`Hold to enable push to talk`);break;case`prompting`:this.#J(n(`mic`,{size:28}),`Allow microphone access in the browser prompt`,this.#Y(`Waiting for permission…`)),this.#n.setAttribute(`aria-label`,`Waiting for microphone permission`);break;case`denied`:{let e=this.#v?`Microphone unavailable`:`Microphone access is blocked`,t=this.#v??`Enable the microphone for this site in your browser settings, then hold again.`;this.#J(n(`mic-off`,{size:28}),e,E(`div`,{class:`slicc-composer__ptt-load-text`},t)),this.#n.setAttribute(`aria-label`,e);break}case`recording`:{this.#S=E(`div`,{class:`slicc-composer__ptt-device`,hidden:!0}),this.#b=E(`div`,{class:`slicc-composer__ptt-caption`,"aria-live":`polite`,hidden:!0}),this.#x=E(`div`,{class:`slicc-composer__ptt-status`,hidden:!0});let e=E(`div`,{class:`slicc-composer__ptt-microw`},E(`div`,{class:`slicc-composer__ptt-mic`},n(`mic`,{size:28})),this.#S);this.#y=E(`div`,{class:`slicc-composer__ptt-label`},`Listening — release to send`),this.#n.replaceChildren(e,this.#y,this.#b,this.#x),this.#n.setAttribute(`aria-label`,`Listening — release to send`),this.#Q();break}}}#J(e,t,n){this.#n&&(this.#y=E(`div`,{class:`slicc-composer__ptt-label`},t),this.#b=null,this.#x=null,this.#S=null,this.#C=null,this.#w=[],this.#n.replaceChildren(E(`div`,{class:`slicc-composer__ptt-mic`},e),this.#y,n))}#Y(e){return E(`div`,{class:`slicc-composer__ptt-load`},E(`span`,{class:`slicc-composer__ptt-load-text`},e),E(`div`,{class:`slicc-composer__ptt-bar`},E(`div`,{class:`slicc-composer__ptt-bar-fill`})))}#X(e){this.#n&&(this.#n.classList.remove(`is-enable`,`is-prompting`,`is-denied`,`is-recording`,`is-finalizing`,`is-picking`),e!==`idle`&&this.#n.classList.add(`is-${e}`))}#Z(e,t=!1){let n=this.#b;if(!n)return;let r=e.trim().split(/\s+/).filter(Boolean);if(r.length===0){n.hidden=!0;return}n.textContent=r.slice(-8).join(` `),n.classList.toggle(`is-error`,t),n.hidden=!1}#Q(){let e=this.#x;if(!e)return;let t=this.#_;if(t?.state===`downloading`){if(t.download){let n=Yt(t.download.etaSeconds??null);e.textContent=n?`Better speech recognition downloading · ready in ${n}`:`Better speech recognition downloading…`}else e.textContent=`Preparing enhanced speech…`;e.classList.remove(`is-error`),e.hidden=!1}else t?.state===`ready`&&t.engine===`enhanced`?(e.textContent=`Enhanced speech recognition`,e.classList.remove(`is-error`),e.hidden=!1):t?.state===`unavailable`&&t.message?(e.textContent=t.message,e.classList.add(`is-error`),e.hidden=!1):(e.classList.remove(`is-error`),e.hidden=!0)}#$(e){let t=this.#S;if(!t)return;this.#w=e;let r=E(`button`,{type:`button`,class:`slicc-composer__ptt-device-btn`,"aria-label":`Choose a microphone`,"aria-haspopup":`menu`,title:`Choose a microphone`},n(`chevron-down`,{size:12}));r.addEventListener(`pointerdown`,e=>e.stopPropagation()),t.replaceChildren(r),t.hidden=!1}#ee(){this.#g?.(),this.#g=null,this.#n?.remove(),this.#n=null,this.#y=null,this.#b=null,this.#x=null,this.#S=null,this.#C=null,this.#w=[],this.#p=null,this.#v=null,this.#r=`idle`}});var Xt=`
1642
+ `,Wt=`slicc-composer-style`;function Gt(e){if(e.getElementById(Wt))return;let t=e.createElement(`style`);t.id=Wt,t.textContent=Ut,(e.head??e.documentElement).appendChild(t)}var Kt=1e3,qt=60,Jt=1e4,Yt=45e3,Xt=1500;function j(e,t,n){return new Promise((r,i)=>{let a=setTimeout(()=>i(n),t);e.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e instanceof Error?e:Error(String(e)))})})}var M=`slicc-composer:mic-device`;function Zt(){try{return typeof localStorage>`u`?null:localStorage.getItem(M)}catch{return null}}function Qt(e){try{if(typeof localStorage>`u`)return;e?localStorage.setItem(M,e):localStorage.removeItem(M)}catch{}}function $t(e){return e==null||!Number.isFinite(e)?``:e<60?`~${Math.max(1,Math.round(e))}s`:`~${Math.floor(e/60)}m ${Math.round(e%60)}s`}S(`slicc-composer`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=!1;#n=null;#r=`idle`;#i=!1;#a=0;#o=null;#s=null;#c=null;#l=null;#u=null;#d=`unknown`;#f=Zt();#p=null;#m=null;#h=null;#g=null;#_=null;#v=null;#y=null;#b=null;#x=null;#S=null;#C=null;#w=[];connectedCallback(){Gt(this.ownerDocument),this.#T(),this.addEventListener(`pointerdown`,this.#E)}disconnectedCallback(){this.removeEventListener(`pointerdown`,this.#E),this.#c?.cancel(),this.#c=null,this.#j(),this.#i=!1,this.#o=null,this.#a++,this.#z(),this.#L(),this.#m&&clearTimeout(this.#m),this.#m=null,this.#R(),this.#G(),this.#ee()}attributeChangedCallback(){}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get speech(){return this.#u??=s(),this.#u}set speech(e){this.#u=e,this.#d=`unknown`}get device(){return this.#f}set device(e){this.#f=e,Qt(e)}get inner(){return this.#T(),this.#e}append(...e){this.#T(),this.#e.append(...e)}#T(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > .slicc-composer__inner`);if(e instanceof HTMLElement){this.#e=e;return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-composer__inner`,this.#e.setAttribute(`part`,`inner`);for(let e of t)this.#e.appendChild(e);this.appendChild(this.#e)}#E=e=>{if(!this.hasAttribute(`ptt`)||!e.isPrimary||this.#i||e.button!==0||this.#r===`finalizing`||this.#r===`picking`)return;let t=e.target?.closest?.(`textarea`);if(!(t instanceof HTMLTextAreaElement)||!this.contains(t)||t.value!==``)return;this.#i=!0,this.#a++,this.#o=t,this.#s=e.pointerId;try{this.setPointerCapture(e.pointerId)}catch{}let n=this.ownerDocument;n.addEventListener(`pointerup`,this.#M),this.addEventListener(`pointercancel`,this.#N),n.addEventListener(`selectionchange`,this.#D);let r=this.#a;this.#h=setTimeout(()=>{this.#L(),this.#O(this.speech,r)},400)};#D=()=>{if(!this.#h)return;let e=this.ownerDocument.getSelection();!e||e.isCollapsed||e.toString()===``||(this.#i=!1,this.#a++,this.#o=null,this.#L(),this.#z(),this.#R())};async#O(e,t){let n=await Promise.race([e.permission().then(e=>(this.#d=e,e)),new Promise(e=>setTimeout(()=>e(`pending`),qt))]);if(!(t!==this.#a||!this.#i)){if(n===`granted`){this.#A(e,t);return}if(n===`denied`){this.#q(`denied`);return}this.#q(`enable`),this.#m=setTimeout(()=>{this.#m=null,this.#k(e,t)},Kt),n===`pending`&&e.permission().then(n=>{this.#d=n,!(t!==this.#a||!this.#i||this.#r!==`enable`)&&(n===`granted`?(this.#I(),this.#A(e,t)):n===`denied`&&(this.#I(),this.#q(`denied`)))})}}#k(e,t){t!==this.#a||!this.#i||this.#r!==`enable`||(this.#v=null,this.#q(`prompting`),j(e.requestPermission(),Jt,Error(`Microphone didn't respond. Check your mic, then hold again.`)).then(n=>{this.#d=n?`granted`:`denied`,n&&e.warmup(),t===this.#a&&(n&&this.#i?this.#A(e,t):n?this.#ee():this.#i?this.#q(`denied`):this.#ee())}).catch(e=>{this.#d=`denied`,t===this.#a&&(this.#i?(this.#v=e instanceof Error?e.message:String(e),this.#q(`denied`)):this.#ee())}))}#A(e,t){this.#r=`recording`,this.#q(`recording`),e.warmup(),this.#g?.(),this.#g=e.onStatus(e=>{this.#_=e,this.#Q()});let n=e.microphones();n.then(e=>{t===this.#a&&(this.#f??(this.#p=o(e)),i(e)&&this.#$(e))}).catch(()=>{});let r=(this.#f==null?j(n,Xt,Error(`microphone enumeration timed out`)).then(e=>o(e)).catch(()=>null):Promise.resolve(this.#f)).then(n=>e.start({deviceId:n??void 0,onPartial:e=>{t===this.#a&&this.#Z(e)},onError:e=>{t===this.#a&&this.#Z(e,!0)}}));this.#l=r,r.then(e=>{if(this.#l===r){if(this.#l=null,t!==this.#a||this.#r!==`recording`){e.cancel();return}this.#c=e}}).catch(e=>{this.#l===r&&(this.#l=null,t===this.#a&&this.#Z(e instanceof Error?e.message:String(e),!0))})}#j(){let e=this.#l;this.#l=null,e&&e.then(e=>e.cancel(),()=>{})}#M=e=>{if(!this.#i||this.#s!=null&&e.pointerId!==this.#s)return;let t=this.#S,n=!1;if(this.#r===`recording`&&t&&!t.hidden)if(e.composedPath().includes(t))n=!0;else{let r=this.ownerDocument.elementFromPoint(e.clientX,e.clientY);n=r!=null&&t.contains(r)}if(n){this.#i=!1,this.#z(),this.#R(),this.#c?.cancel(),this.#c=null,this.#j(),this.#o=null,this.#B();return}this.#P(!0)};#N=e=>{this.#s!=null&&e.pointerId!==this.#s||this.#P(!1)};#P(e){if(!this.#i)return;switch(this.#i=!1,this.#L(),this.#z(),this.#R(),this.#r){case`enable`:this.#I(),this.#o=null,this.#ee();return;case`prompting`:this.#o=null;return;case`denied`:this.#o=null,this.#ee();return;case`recording`:break;default:this.#o=null,this.#ee();return}let t=this.#c;this.#c=null;let n=this.#l;if(this.#l=null,!e){t?.cancel(),n&&n.then(e=>e.cancel(),()=>{}),this.#o=null,this.#ee();return}if(!t&&!n){this.#o=null,this.#ee();return}this.#r=`finalizing`,this.#Z(`Transcribing…`);let r=this.#a;j((t?Promise.resolve(t):n).then(e=>e.stop()),Yt,Error(`finalize timed out`)).then(e=>{r===this.#a&&(this.#ee(),this.#F(e))}).catch(()=>{r===this.#a&&(this.#ee(),this.#o=null)})}#F(e){let t=this.#o;if(this.#o=null,!t)return;let n=e.trim();if(!n){t.focus();return}t.value=t.value?/\s$/.test(t.value)?t.value+n:`${t.value} ${n}`:n,t.dispatchEvent(new Event(`input`,{bubbles:!0})),t.focus();let r=t.closest(`slicc-input-card`);r&&typeof r.submit==`function`?r.submit(`dictation`):t.dispatchEvent(new CustomEvent(`submit`,{bubbles:!0,composed:!0,detail:{value:t.value,source:`dictation`}}))}#I(){this.#m&&clearTimeout(this.#m),this.#m=null}#L(){this.#h&&clearTimeout(this.#h),this.#h=null,this.ownerDocument.removeEventListener(`selectionchange`,this.#D)}#R(){this.ownerDocument.removeEventListener(`pointerup`,this.#M),this.removeEventListener(`pointercancel`,this.#N)}#z(){let e=this.#s;if(this.#s=null,e!=null)try{this.releasePointerCapture(e)}catch{}}#B(){this.#r=`picking`,this.#X(`picking`),this.#y&&(this.#y.textContent=`Choose a microphone`),this.#b&&(this.#b.hidden=!0),this.#V();let e=this.ownerDocument;e.addEventListener(`pointerdown`,this.#U,!0),e.addEventListener(`keydown`,this.#W,!0)}#V(){let e=this.#S;if(!e||this.#C)return;let t=w(`div`,{class:`slicc-composer__ptt-device-menu`,role:`menu`}),r=null,i=this.#f??this.#p;for(let e of this.#w){let a=e.deviceId===i,o=w(`button`,{type:`button`,class:`slicc-composer__ptt-device-item`,role:`menuitemradio`,"aria-checked":a?`true`:`false`,"data-device-id":e.deviceId},e.label,w(`span`,{class:`tick`},n(`check`,{size:14})));o.addEventListener(`click`,()=>{this.device=e.deviceId,this.#K()}),(a||!r)&&(r=o),t.appendChild(o)}this.#C=t,e.appendChild(t),this.#H(t,e),r?.focus()}#H(e,t){let n=t.getBoundingClientRect(),r=(window.innerHeight||document.documentElement.clientHeight)-n.bottom-6-8,i=n.top-6-8,a=e.offsetHeight>r&&i>r;e.classList.toggle(`slicc-composer__ptt-device-menu--up`,a);let o=Math.max(a?i:r,0);e.style.maxHeight=`${Math.min(320,o)}px`}#U=e=>{this.#S&&e.composedPath().includes(this.#S)||this.#K()};#W=e=>{e.key===`Escape`&&(e.stopPropagation(),this.#K())};#G(){let e=this.ownerDocument;e.removeEventListener(`pointerdown`,this.#U,!0),e.removeEventListener(`keydown`,this.#W,!0)}#K(){this.#G(),this.#ee()}#q(e){switch(this.#r=e,this.#n||(this.#n=w(`div`,{class:`slicc-composer__ptt`,"data-ptt":!0,role:`button`}),this.appendChild(this.#n)),this.#X(e),e){case`enable`:this.#J(n(`mic`,{size:28}),`Hold to enable push to talk`,this.#Y(`Requesting microphone access when the bar fills`)),this.#n.setAttribute(`aria-label`,`Hold to enable push to talk`);break;case`prompting`:this.#J(n(`mic`,{size:28}),`Allow microphone access in the browser prompt`,this.#Y(`Waiting for permission…`)),this.#n.setAttribute(`aria-label`,`Waiting for microphone permission`);break;case`denied`:{let e=this.#v?`Microphone unavailable`:`Microphone access is blocked`,t=this.#v??`Enable the microphone for this site in your browser settings, then hold again.`;this.#J(n(`mic-off`,{size:28}),e,w(`div`,{class:`slicc-composer__ptt-load-text`},t)),this.#n.setAttribute(`aria-label`,e);break}case`recording`:{this.#S=w(`div`,{class:`slicc-composer__ptt-device`,hidden:!0}),this.#b=w(`div`,{class:`slicc-composer__ptt-caption`,"aria-live":`polite`,hidden:!0}),this.#x=w(`div`,{class:`slicc-composer__ptt-status`,hidden:!0});let e=w(`div`,{class:`slicc-composer__ptt-microw`},w(`div`,{class:`slicc-composer__ptt-mic`},n(`mic`,{size:28})),this.#S);this.#y=w(`div`,{class:`slicc-composer__ptt-label`},`Listening — release to send`),this.#n.replaceChildren(e,this.#y,this.#b,this.#x),this.#n.setAttribute(`aria-label`,`Listening — release to send`),this.#Q();break}}}#J(e,t,n){this.#n&&(this.#y=w(`div`,{class:`slicc-composer__ptt-label`},t),this.#b=null,this.#x=null,this.#S=null,this.#C=null,this.#w=[],this.#n.replaceChildren(w(`div`,{class:`slicc-composer__ptt-mic`},e),this.#y,n))}#Y(e){return w(`div`,{class:`slicc-composer__ptt-load`},w(`span`,{class:`slicc-composer__ptt-load-text`},e),w(`div`,{class:`slicc-composer__ptt-bar`},w(`div`,{class:`slicc-composer__ptt-bar-fill`})))}#X(e){this.#n&&(this.#n.classList.remove(`is-enable`,`is-prompting`,`is-denied`,`is-recording`,`is-finalizing`,`is-picking`),e!==`idle`&&this.#n.classList.add(`is-${e}`))}#Z(e,t=!1){let n=this.#b;if(!n)return;let r=e.trim().split(/\s+/).filter(Boolean);if(r.length===0){n.hidden=!0;return}n.textContent=r.slice(-8).join(` `),n.classList.toggle(`is-error`,t),n.hidden=!1}#Q(){let e=this.#x;if(!e)return;let t=this.#_;if(t?.state===`downloading`){if(t.download){let n=$t(t.download.etaSeconds??null);e.textContent=n?`Better speech recognition downloading · ready in ${n}`:`Better speech recognition downloading…`}else e.textContent=`Preparing enhanced speech…`;e.classList.remove(`is-error`),e.hidden=!1}else t?.state===`ready`&&t.engine===`enhanced`?(e.textContent=`Enhanced speech recognition`,e.classList.remove(`is-error`),e.hidden=!1):t?.state===`unavailable`&&t.message?(e.textContent=t.message,e.classList.add(`is-error`),e.hidden=!1):(e.classList.remove(`is-error`),e.hidden=!0)}#$(e){let t=this.#S;if(!t)return;this.#w=e;let r=w(`button`,{type:`button`,class:`slicc-composer__ptt-device-btn`,"aria-label":`Choose a microphone`,"aria-haspopup":`menu`,title:`Choose a microphone`},n(`chevron-down`,{size:12}));r.addEventListener(`pointerdown`,e=>e.stopPropagation()),t.replaceChildren(r),t.hidden=!1}#ee(){this.#g?.(),this.#g=null,this.#n?.remove(),this.#n=null,this.#y=null,this.#b=null,this.#x=null,this.#S=null,this.#C=null,this.#w=[],this.#p=null,this.#v=null,this.#r=`idle`}});var en=`
1643
1643
  slicc-composer-capture {
1644
1644
  position: relative;
1645
1645
  display: block;
@@ -1843,7 +1843,7 @@ slicc-composer-capture .slicc-capture__timer {
1843
1843
  slicc-composer-capture .slicc-capture__timer[hidden] {
1844
1844
  display: none;
1845
1845
  }
1846
- `,Zt=`slicc-composer-capture-style`;function Qt(e){if(e.getElementById(Zt))return;let t=e.createElement(`style`);t.id=Zt,t.textContent=Xt,(e.head??e.documentElement).appendChild(t)}var $t=`photo`,en=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`,`video/webm`];function tn(){if(typeof MediaRecorder>`u`)return`video/webm`;for(let e of en)if(MediaRecorder.isTypeSupported?.(e))return e;return`video/webm`}function nn(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,`0`)}`}w(`slicc-composer-capture`,class extends HTMLElement{static observedAttributes=[`mode`,`preferred-device`,`preferred-audio-device`];media=null;recorderFactory=null;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=!1;#u=null;#d=null;#f=null;#p=[];#m=0;#h=null;#g=null;#_=e=>{e.key===`Escape`&&this.#g&&this.#L()};connectedCallback(){Qt(this.ownerDocument),this.#H(),this.ownerDocument.addEventListener(`keydown`,this.#_)}disconnectedCallback(){if(this.ownerDocument.removeEventListener(`keydown`,this.#_),this.#N(),this.#P(),this.#I(),this.#g){let e=this.#g;this.#g=null,e(null)}}attributeChangedCallback(e,t,n){e===`mode`&&this.#l&&this.#z(n??$t)}get mode(){return this.getAttribute(`mode`)===`video`?`video`:`photo`}set mode(e){e==null?this.removeAttribute(`mode`):this.setAttribute(`mode`,e)}get preferredDevice(){return this.getAttribute(`preferred-device`)}set preferredDevice(e){e==null?this.removeAttribute(`preferred-device`):this.setAttribute(`preferred-device`,e)}get preferredAudioDevice(){return this.getAttribute(`preferred-audio-device`)}set preferredAudioDevice(e){e==null?this.removeAttribute(`preferred-audio-device`):this.setAttribute(`preferred-audio-device`,e)}#v(){return this.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}#y(e,t){return this.recorderFactory?this.recorderFactory(e,t):new MediaRecorder(e,t)}async open(e){this.#H(),e&&(this.mode=e),this.#z(this.mode);let t=this.#v();if(!t)return null;try{this.#u=await this.#b(t,this.preferredDevice,this.preferredAudioDevice,this.mode)}catch{return null}return this.#S(),this.#C(this.#u),await this.#w(t),await this.#T(t),this.hidden=!1,new Promise(e=>{this.#g=e})}async#b(e,t,n,r){let i=await this.#x(e,n,r);if(t)try{return await e.getUserMedia({video:{deviceId:{exact:t}},audio:i})}catch{}try{return await e.getUserMedia({video:!0,audio:i})}catch(t){if(i===!1)throw t;return this.#r.textContent=`Microphone unavailable — recording video only.`,e.getUserMedia({video:!0,audio:!1})}}async#x(e,t,n){if(n!==`video`)return!1;if(t)return{deviceId:{exact:t}};let r=[];try{r=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{r=[]}let i=o(a(r,`microphone`));return!i||{deviceId:{exact:i}}}#S(){this.#d=this.#u?.getAudioTracks()[0]??null}#C(e){this.#e.srcObject=e,this.#e.muted=!0,this.#e.play?.()?.catch(()=>void 0);let t=e.getVideoTracks()[0]?.getSettings?.().facingMode;this.#e.toggleAttribute(`data-mirrored`,t!==`environment`)}async#w(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`videoinput`)}catch{t=[]}let n=a(t,`camera`);this.#t.replaceChildren(...n.map(e=>E(`option`,{value:e.deviceId},e.label)));let r=this.#u?.getVideoTracks()[0]?.getSettings?.().deviceId;r&&(this.#t.value=r),this.#t.toggleAttribute(`hidden`,!i(n))}async#T(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{t=[]}let n=a(t,`microphone`);this.#n.replaceChildren(...n.map(e=>E(`option`,{value:e.deviceId},e.label)));let r=this.#d?.getSettings?.().deviceId??this.preferredAudioDevice??o(n);r&&n.some(e=>e.deviceId===r)&&(this.#n.value=r),this.#E()}#E(){if(!this.#n)return;let e=this.#n.options.length>=2,t=this.mode===`video`&&e;this.#n.toggleAttribute(`hidden`,!t)}async#D(e){let t=this.#v();if(t){this.#r.textContent=``;try{let n=await t.getUserMedia({video:{deviceId:{exact:e}}});this.#F();let r=n;if(this.mode===`video`&&this.#d&&this.#d.readyState===`live`)r.addTrack(this.#d);else if(this.mode===`video`)try{let e=await t.getUserMedia({audio:await this.#x(t,this.preferredAudioDevice,`video`)});for(let t of e.getAudioTracks())this.#d=t,r.addTrack(t)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}this.#u=r,this.#C(r),this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`camera`},bubbles:!0,composed:!0}))}catch{this.#r.textContent=`Could not switch camera — keeping the current one.`}}}async#O(e){let t=this.#v();if(!t||!this.#u)return;this.#r.textContent=``;let n;try{n=await t.getUserMedia({audio:{deviceId:{exact:e}}})}catch{this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}let r=n.getAudioTracks()[0];if(!r){this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}if(this.#d){try{this.#u.removeTrack(this.#d)}catch{}this.#d.stop()}this.#u.addTrack(r),this.#d=r,this.preferredAudioDevice=e,this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`microphone`},bubbles:!0,composed:!0}))}#k(){let e=this.ownerDocument.createElement(`canvas`);if(e.width=this.#e.videoWidth,e.height=this.#e.videoHeight,e.width===0||e.height===0){this.#r.textContent=`No frame yet — give the camera a moment.`;return}e.getContext(`2d`)?.drawImage(this.#e,0,0);let t=`image/png`,n=e.toDataURL(t);this.#R({kind:`image`,dataUrl:n,mimeType:t,width:e.width,height:e.height})}#A(){if(!this.#u||this.#f)return;this.#p=[];let e=tn(),t;try{t=this.#y(this.#u,{mimeType:e})}catch{this.#r.textContent=`Recording is not supported in this browser.`;return}t.ondataavailable=e=>{e.data&&e.data.size>0&&this.#p.push(e.data)},t.onstop=()=>this.#M(e);try{t.start()}catch{this.#r.textContent=`Could not start recording.`;return}this.#f=t,this.#m=Date.now(),this.#n.disabled=!0,this.#t.disabled=!0,this.#i.hidden=!1,this.#i.textContent=nn(0),this.#h=setInterval(()=>{this.#i.textContent=nn(Date.now()-this.#m)},250),this.#B()}#j(){let e=this.#f;if(e)try{e.state!==`inactive`&&e.stop()}catch{this.#M(e.mimeType||`video/webm`)}}#M(e){let t=this.#m?Date.now()-this.#m:0;this.#N();let n=this.#f?.mimeType||e||`video/webm`,r=new Blob(this.#p,{type:n});this.#p=[],this.#f=null,this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1);let i=typeof URL<`u`?URL.createObjectURL(r):void 0;this.#R({kind:`video`,blob:r,dataUrl:i,mimeType:n,width:this.#e.videoWidth,height:this.#e.videoHeight,durationMs:t})}#N(){this.#h!=null&&(clearInterval(this.#h),this.#h=null),this.#i.hidden=!0,this.#i.textContent=``,this.#m=0}#P(){let e=this.#f;if(this.#f=null,this.#p=[],this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1),e){e.ondataavailable=null,e.onstop=null;try{e.state!==`inactive`&&e.stop()}catch{}}}#F(){for(let e of this.#u?.getVideoTracks()??[])e.stop()}#I(){for(let e of this.#u?.getTracks()??[])e.stop();this.#u=null,this.#d=null,this.#e&&(this.#e.srcObject=null)}#L(){this.dispatchEvent(new CustomEvent(`slicc-capture-cancel`,{bubbles:!0,composed:!0})),this.#R(null)}#R(e){e&&this.dispatchEvent(new CustomEvent(`slicc-capture`,{detail:e,bubbles:!0,composed:!0})),this.#N(),this.#P(),this.#I();let t=this.#g;this.#g=null,this.hidden=!0,t?.(e)}#z(e){let t=e===`video`;this.#s.setAttribute(`aria-pressed`,String(!t)),this.#c.setAttribute(`aria-pressed`,String(t)),this.#r.textContent=t?`Mic on — video will record audio.`:``,this.#B(),this.#E()}#B(){let e=this.#a;if(e.replaceChildren(),this.mode===`photo`){e.className=`slicc-capture__btn slicc-capture__btn--primary`,e.setAttribute(`part`,`snap`),e.setAttribute(`aria-label`,`Snap photo`),e.append(n(`camera`,{size:14}),document.createTextNode(` Snap`));return}this.#f?(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`stop`),e.setAttribute(`aria-label`,`Stop recording`),e.append(E(`span`,{class:`slicc-capture__square`}),document.createTextNode(` Stop`))):(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`record`),e.setAttribute(`aria-label`,`Start recording`),e.append(E(`span`,{class:`slicc-capture__dot`}),document.createTextNode(` Record`)))}#V(){if(this.mode===`photo`){this.#k();return}this.#f?this.#j():this.#A()}#H(){if(this.#l)return;this.#l=!0,this.#e=E(`video`,{class:`slicc-capture__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#e.muted=!0,this.#r=E(`div`,{class:`slicc-capture__status`}),this.#t=E(`select`,{class:`slicc-capture__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#t.addEventListener(`change`,()=>{this.#D(this.#t.value)}),this.#n=E(`select`,{class:`slicc-capture__select`,part:`audio-picker`,"aria-label":`Microphone`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#O(this.#n.value)}),this.#s=E(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`true`,"aria-label":`Photo`},n(`image`,{size:14})),this.#s.addEventListener(`click`,()=>{this.mode=`photo`}),this.#c=E(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`false`,"aria-label":`Video`},n(`video`,{size:14})),this.#c.addEventListener(`click`,()=>{this.#U()});let e=E(`div`,{class:`slicc-capture__mode`,role:`group`,"aria-label":`Capture mode`},this.#s,this.#c);this.#i=E(`span`,{class:`slicc-capture__timer`,hidden:!0}),this.#o=E(`button`,{type:`button`,class:`slicc-capture__close`,part:`cancel`,"aria-label":`Cancel`},n(`x`,{size:14})),this.#o.addEventListener(`click`,()=>this.#L()),this.#a=E(`button`,{type:`button`,class:`slicc-capture__btn slicc-capture__btn--primary`,part:`snap`,"aria-label":`Snap photo`}),this.#a.addEventListener(`click`,()=>this.#V());let t=E(`div`,{class:`slicc-capture__bar`},this.#t,this.#n,E(`span`,{class:`slicc-capture__spacer`}),this.#i,this.#a,e);this.replaceChildren(this.#e,this.#r,t,this.#o),this.#z(this.mode)}async#U(){if(this.mode=`video`,!this.#u||this.#u.getAudioTracks().length>0)return;let e=this.#v();if(!e)return;let t=this.#u.getVideoTracks()[0]?.getSettings?.().deviceId??this.preferredDevice??null,n=await this.#x(e,this.preferredAudioDevice,`video`);try{let r=t?await e.getUserMedia({video:{deviceId:{exact:t}},audio:n}):await e.getUserMedia({video:!0,audio:n});this.#I(),this.#u=r,this.#S(),this.#C(r),await this.#T(e)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}}});var rn=[`off`,`low`,`medium`,`high`,`xhigh`,`max`],I={off:{label:`Secco`,gloss:`bone dry — not a drop (ask any prosecco)`,tint:`var(--txt-3)`},low:{label:`Goccia`,gloss:`one drop — bar-speak: «macchiato, solo una goccia»`,tint:`color-mix(in srgb, var(--violet) 20%, var(--txt-3))`},medium:{label:`Bagnato`,gloss:`properly wet`,tint:`color-mix(in srgb, var(--violet) 40%, var(--txt-3))`},high:{label:`Affogato`,gloss:`drowned — the menu item itself`,tint:`color-mix(in srgb, var(--violet) 60%, var(--txt-3))`},xhigh:{label:`Inzuppato`,gloss:`soaked through, biscotto-style`,tint:`color-mix(in srgb, var(--violet) 80%, var(--txt-3))`},max:{label:`Sprofondato`,gloss:`sunk to the bottom`,tint:`var(--violet)`}},an=`max`,on=`Opus 4.8`,sn=[{name:`Opus 4.8`,provider:`Anthropic`,id:`claude-opus-4-8`},{name:`Sonnet 4.6`,provider:`Anthropic`,id:`claude-sonnet-4-6`},{name:`Haiku 4.5`,provider:`Anthropic`,id:`claude-haiku-4-5`}],cn=8;function ln(e){let t=typeof e==`string`?{name:e}:e;return{...t,name:t.name,id:t.id??t.name}}var un=`max`,dn=13;function fn(){return n(`sparkles`,{size:dn,class:`ic`,part:`model-icon`})}function pn(){return n(`brain`,{size:dn,class:`brain`,part:`brain`})}function mn(){return n(`chevron-down`,{size:11,part:`caret`})}var L=`http://www.w3.org/2000/svg`;function hn(){let e=document.createElementNS(L,`svg`);e.setAttribute(`width`,`0`),e.setAttribute(`height`,`0`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`style`,`position:absolute`);let t=document.createElementNS(L,`defs`),n=document.createElementNS(L,`linearGradient`);n.setAttribute(`id`,`meta-rainbow`),n.setAttribute(`x1`,`0`),n.setAttribute(`y1`,`0`),n.setAttribute(`x2`,`1`),n.setAttribute(`y2`,`0`);for(let[e,t]of[[`0%`,`#f43f5e`],[`28%`,`#f59e0b`],[`64%`,`#06b6d4`],[`100%`,`#8b5cf6`]]){let r=document.createElementNS(L,`stop`);r.setAttribute(`offset`,e),r.setAttribute(`stop-color`,t),n.appendChild(r)}return t.appendChild(n),e.appendChild(t),e}var gn=D(`
1846
+ `,tn=`slicc-composer-capture-style`;function nn(e){if(e.getElementById(tn))return;let t=e.createElement(`style`);t.id=tn,t.textContent=en,(e.head??e.documentElement).appendChild(t)}var rn=`photo`,an=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`,`video/webm`];function on(){if(typeof MediaRecorder>`u`)return`video/webm`;for(let e of an)if(MediaRecorder.isTypeSupported?.(e))return e;return`video/webm`}function sn(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,`0`)}`}S(`slicc-composer-capture`,class extends HTMLElement{static observedAttributes=[`mode`,`preferred-device`,`preferred-audio-device`];media=null;recorderFactory=null;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=!1;#u=null;#d=null;#f=null;#p=[];#m=0;#h=null;#g=null;#_=e=>{e.key===`Escape`&&this.#g&&this.#L()};connectedCallback(){nn(this.ownerDocument),this.#H(),this.ownerDocument.addEventListener(`keydown`,this.#_)}disconnectedCallback(){if(this.ownerDocument.removeEventListener(`keydown`,this.#_),this.#N(),this.#P(),this.#I(),this.#g){let e=this.#g;this.#g=null,e(null)}}attributeChangedCallback(e,t,n){e===`mode`&&this.#l&&this.#z(n??rn)}get mode(){return this.getAttribute(`mode`)===`video`?`video`:`photo`}set mode(e){e==null?this.removeAttribute(`mode`):this.setAttribute(`mode`,e)}get preferredDevice(){return this.getAttribute(`preferred-device`)}set preferredDevice(e){e==null?this.removeAttribute(`preferred-device`):this.setAttribute(`preferred-device`,e)}get preferredAudioDevice(){return this.getAttribute(`preferred-audio-device`)}set preferredAudioDevice(e){e==null?this.removeAttribute(`preferred-audio-device`):this.setAttribute(`preferred-audio-device`,e)}#v(){return this.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}#y(e,t){return this.recorderFactory?this.recorderFactory(e,t):new MediaRecorder(e,t)}async open(e){this.#H(),e&&(this.mode=e),this.#z(this.mode);let t=this.#v();if(!t)return null;try{this.#u=await this.#b(t,this.preferredDevice,this.preferredAudioDevice,this.mode)}catch{return null}return this.#S(),this.#C(this.#u),await this.#w(t),await this.#T(t),this.hidden=!1,new Promise(e=>{this.#g=e})}async#b(e,t,n,r){let i=await this.#x(e,n,r);if(t)try{return await e.getUserMedia({video:{deviceId:{exact:t}},audio:i})}catch{}try{return await e.getUserMedia({video:!0,audio:i})}catch(t){if(i===!1)throw t;return this.#r.textContent=`Microphone unavailable — recording video only.`,e.getUserMedia({video:!0,audio:!1})}}async#x(e,t,n){if(n!==`video`)return!1;if(t)return{deviceId:{exact:t}};let r=[];try{r=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{r=[]}let i=o(a(r,`microphone`));return!i||{deviceId:{exact:i}}}#S(){this.#d=this.#u?.getAudioTracks()[0]??null}#C(e){this.#e.srcObject=e,this.#e.muted=!0,this.#e.play?.()?.catch(()=>void 0);let t=e.getVideoTracks()[0]?.getSettings?.().facingMode;this.#e.toggleAttribute(`data-mirrored`,t!==`environment`)}async#w(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`videoinput`)}catch{t=[]}let n=a(t,`camera`);this.#t.replaceChildren(...n.map(e=>w(`option`,{value:e.deviceId},e.label)));let r=this.#u?.getVideoTracks()[0]?.getSettings?.().deviceId;r&&(this.#t.value=r),this.#t.toggleAttribute(`hidden`,!i(n))}async#T(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{t=[]}let n=a(t,`microphone`);this.#n.replaceChildren(...n.map(e=>w(`option`,{value:e.deviceId},e.label)));let r=this.#d?.getSettings?.().deviceId??this.preferredAudioDevice??o(n);r&&n.some(e=>e.deviceId===r)&&(this.#n.value=r),this.#E()}#E(){if(!this.#n)return;let e=this.#n.options.length>=2,t=this.mode===`video`&&e;this.#n.toggleAttribute(`hidden`,!t)}async#D(e){let t=this.#v();if(t){this.#r.textContent=``;try{let n=await t.getUserMedia({video:{deviceId:{exact:e}}});this.#F();let r=n;if(this.mode===`video`&&this.#d&&this.#d.readyState===`live`)r.addTrack(this.#d);else if(this.mode===`video`)try{let e=await t.getUserMedia({audio:await this.#x(t,this.preferredAudioDevice,`video`)});for(let t of e.getAudioTracks())this.#d=t,r.addTrack(t)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}this.#u=r,this.#C(r),this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`camera`},bubbles:!0,composed:!0}))}catch{this.#r.textContent=`Could not switch camera — keeping the current one.`}}}async#O(e){let t=this.#v();if(!t||!this.#u)return;this.#r.textContent=``;let n;try{n=await t.getUserMedia({audio:{deviceId:{exact:e}}})}catch{this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}let r=n.getAudioTracks()[0];if(!r){this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}if(this.#d){try{this.#u.removeTrack(this.#d)}catch{}this.#d.stop()}this.#u.addTrack(r),this.#d=r,this.preferredAudioDevice=e,this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`microphone`},bubbles:!0,composed:!0}))}#k(){let e=this.ownerDocument.createElement(`canvas`);if(e.width=this.#e.videoWidth,e.height=this.#e.videoHeight,e.width===0||e.height===0){this.#r.textContent=`No frame yet — give the camera a moment.`;return}e.getContext(`2d`)?.drawImage(this.#e,0,0);let t=`image/png`,n=e.toDataURL(t);this.#R({kind:`image`,dataUrl:n,mimeType:t,width:e.width,height:e.height})}#A(){if(!this.#u||this.#f)return;this.#p=[];let e=on(),t;try{t=this.#y(this.#u,{mimeType:e})}catch{this.#r.textContent=`Recording is not supported in this browser.`;return}t.ondataavailable=e=>{e.data&&e.data.size>0&&this.#p.push(e.data)},t.onstop=()=>this.#M(e);try{t.start()}catch{this.#r.textContent=`Could not start recording.`;return}this.#f=t,this.#m=Date.now(),this.#n.disabled=!0,this.#t.disabled=!0,this.#i.hidden=!1,this.#i.textContent=sn(0),this.#h=setInterval(()=>{this.#i.textContent=sn(Date.now()-this.#m)},250),this.#B()}#j(){let e=this.#f;if(e)try{e.state!==`inactive`&&e.stop()}catch{this.#M(e.mimeType||`video/webm`)}}#M(e){let t=this.#m?Date.now()-this.#m:0;this.#N();let n=this.#f?.mimeType||e||`video/webm`,r=new Blob(this.#p,{type:n});this.#p=[],this.#f=null,this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1);let i=typeof URL<`u`?URL.createObjectURL(r):void 0;this.#R({kind:`video`,blob:r,dataUrl:i,mimeType:n,width:this.#e.videoWidth,height:this.#e.videoHeight,durationMs:t})}#N(){this.#h!=null&&(clearInterval(this.#h),this.#h=null),this.#i.hidden=!0,this.#i.textContent=``,this.#m=0}#P(){let e=this.#f;if(this.#f=null,this.#p=[],this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1),e){e.ondataavailable=null,e.onstop=null;try{e.state!==`inactive`&&e.stop()}catch{}}}#F(){for(let e of this.#u?.getVideoTracks()??[])e.stop()}#I(){for(let e of this.#u?.getTracks()??[])e.stop();this.#u=null,this.#d=null,this.#e&&(this.#e.srcObject=null)}#L(){this.dispatchEvent(new CustomEvent(`slicc-capture-cancel`,{bubbles:!0,composed:!0})),this.#R(null)}#R(e){e&&this.dispatchEvent(new CustomEvent(`slicc-capture`,{detail:e,bubbles:!0,composed:!0})),this.#N(),this.#P(),this.#I();let t=this.#g;this.#g=null,this.hidden=!0,t?.(e)}#z(e){let t=e===`video`;this.#s.setAttribute(`aria-pressed`,String(!t)),this.#c.setAttribute(`aria-pressed`,String(t)),this.#r.textContent=t?`Mic on — video will record audio.`:``,this.#B(),this.#E()}#B(){let e=this.#a;if(e.replaceChildren(),this.mode===`photo`){e.className=`slicc-capture__btn slicc-capture__btn--primary`,e.setAttribute(`part`,`snap`),e.setAttribute(`aria-label`,`Snap photo`),e.append(n(`camera`,{size:14}),document.createTextNode(` Snap`));return}this.#f?(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`stop`),e.setAttribute(`aria-label`,`Stop recording`),e.append(w(`span`,{class:`slicc-capture__square`}),document.createTextNode(` Stop`))):(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`record`),e.setAttribute(`aria-label`,`Start recording`),e.append(w(`span`,{class:`slicc-capture__dot`}),document.createTextNode(` Record`)))}#V(){if(this.mode===`photo`){this.#k();return}this.#f?this.#j():this.#A()}#H(){if(this.#l)return;this.#l=!0,this.#e=w(`video`,{class:`slicc-capture__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#e.muted=!0,this.#r=w(`div`,{class:`slicc-capture__status`}),this.#t=w(`select`,{class:`slicc-capture__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#t.addEventListener(`change`,()=>{this.#D(this.#t.value)}),this.#n=w(`select`,{class:`slicc-capture__select`,part:`audio-picker`,"aria-label":`Microphone`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#O(this.#n.value)}),this.#s=w(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`true`,"aria-label":`Photo`},n(`image`,{size:14})),this.#s.addEventListener(`click`,()=>{this.mode=`photo`}),this.#c=w(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`false`,"aria-label":`Video`},n(`video`,{size:14})),this.#c.addEventListener(`click`,()=>{this.#U()});let e=w(`div`,{class:`slicc-capture__mode`,role:`group`,"aria-label":`Capture mode`},this.#s,this.#c);this.#i=w(`span`,{class:`slicc-capture__timer`,hidden:!0}),this.#o=w(`button`,{type:`button`,class:`slicc-capture__close`,part:`cancel`,"aria-label":`Cancel`},n(`x`,{size:14})),this.#o.addEventListener(`click`,()=>this.#L()),this.#a=w(`button`,{type:`button`,class:`slicc-capture__btn slicc-capture__btn--primary`,part:`snap`,"aria-label":`Snap photo`}),this.#a.addEventListener(`click`,()=>this.#V());let t=w(`div`,{class:`slicc-capture__bar`},this.#t,this.#n,w(`span`,{class:`slicc-capture__spacer`}),this.#i,this.#a,e);this.replaceChildren(this.#e,this.#r,t,this.#o),this.#z(this.mode)}async#U(){if(this.mode=`video`,!this.#u||this.#u.getAudioTracks().length>0)return;let e=this.#v();if(!e)return;let t=this.#u.getVideoTracks()[0]?.getSettings?.().deviceId??this.preferredDevice??null,n=await this.#x(e,this.preferredAudioDevice,`video`);try{let r=t?await e.getUserMedia({video:{deviceId:{exact:t}},audio:n}):await e.getUserMedia({video:!0,audio:n});this.#I(),this.#u=r,this.#S(),this.#C(r),await this.#T(e)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}}});var cn=[`off`,`low`,`medium`,`high`,`xhigh`,`max`],N={off:{label:`Secco`,gloss:`bone dry — not a drop (ask any prosecco)`,tint:`var(--txt-3)`},low:{label:`Goccia`,gloss:`one drop — bar-speak: «macchiato, solo una goccia»`,tint:`color-mix(in srgb, var(--violet) 20%, var(--txt-3))`},medium:{label:`Bagnato`,gloss:`properly wet`,tint:`color-mix(in srgb, var(--violet) 40%, var(--txt-3))`},high:{label:`Affogato`,gloss:`drowned — the menu item itself`,tint:`color-mix(in srgb, var(--violet) 60%, var(--txt-3))`},xhigh:{label:`Inzuppato`,gloss:`soaked through, biscotto-style`,tint:`color-mix(in srgb, var(--violet) 80%, var(--txt-3))`},max:{label:`Sprofondato`,gloss:`sunk to the bottom`,tint:`var(--violet)`}},ln=`max`,un=`Opus 4.8`,dn=[{name:`Opus 4.8`,provider:`Anthropic`,id:`claude-opus-4-8`},{name:`Sonnet 4.6`,provider:`Anthropic`,id:`claude-sonnet-4-6`},{name:`Haiku 4.5`,provider:`Anthropic`,id:`claude-haiku-4-5`}],fn=8;function pn(e){let t=typeof e==`string`?{name:e}:e;return{...t,name:t.name,id:t.id??t.name}}var mn=`max`,hn=13;function gn(){return n(`sparkles`,{size:hn,class:`ic`,part:`model-icon`})}function _n(){return n(`brain`,{size:hn,class:`brain`,part:`brain`})}function vn(){return n(`chevron-down`,{size:11,part:`caret`})}var P=`http://www.w3.org/2000/svg`;function yn(){let e=document.createElementNS(P,`svg`);e.setAttribute(`width`,`0`),e.setAttribute(`height`,`0`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`style`,`position:absolute`);let t=document.createElementNS(P,`defs`),n=document.createElementNS(P,`linearGradient`);n.setAttribute(`id`,`meta-rainbow`),n.setAttribute(`x1`,`0`),n.setAttribute(`y1`,`0`),n.setAttribute(`x2`,`1`),n.setAttribute(`y2`,`0`);for(let[e,t]of[[`0%`,`#f43f5e`],[`28%`,`#f59e0b`],[`64%`,`#06b6d4`],[`100%`,`#8b5cf6`]]){let r=document.createElementNS(P,`stop`);r.setAttribute(`offset`,e),r.setAttribute(`stop-color`,t),n.appendChild(r)}return t.appendChild(n),e.appendChild(t),e}var bn=T(`
1847
1847
  :host{display:block;}
1848
1848
  *{box-sizing:border-box;}
1849
1849
  .meta{display:flex;align-items:center;gap:8px;max-width:680px;margin:11px auto 0;font-family:var(--ui);}
@@ -1900,7 +1900,7 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
1900
1900
  /* Narrow / extension-sidebar: the ⏎ / ⇧⏎ keyboard hints don't fit (and touch
1901
1901
  users have no keyboard) — drop them regardless of the narrow-chat attribute. */
1902
1902
  @media (max-width: 560px){ .hint{display:none;} }
1903
- `);w(`slicc-composer-meta`,class extends HTMLElement{static observedAttributes=[`model`,`thinking`,`narrow`,`no-thinking`];#e;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=null;#c=null;#l=!1;#u=!1;#d=``;#f=e=>{let t=e.composedPath();this.#l&&!t.includes(this)&&this.#S(),this.#u&&!t.includes(this)&&this.#D()};#p=e=>{e.key===`Escape`&&(this.#l&&(e.stopPropagation(),this.#S(),this.#r?.focus()),this.#u&&(e.stopPropagation(),this.#D(),this.#i?.focus()))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[gn]}connectedCallback(){this.#g()}disconnectedCallback(){this.#y(),document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)}attributeChangedCallback(){this.isConnected&&this.#g()}get model(){return this.getAttribute(`model`)??on}set model(e){e==null?this.removeAttribute(`model`):this.setAttribute(`model`,e)}get models(){return(this.#c??[...sn]).map(e=>typeof e==`string`?e:{...e})}set models(e){this.#c=Array.isArray(e)?e.slice():null,this.isConnected&&this.#g()}get#m(){return(this.#c??sn).map(ln)}get#h(){return this.#c!==null&&this.#c.length===0}get thinking(){let e=this.getAttribute(`thinking`);return rn.includes(e??``)?e:un}set thinking(e){this.setAttribute(`thinking`,e)}get narrow(){return this.hasAttribute(`narrow`)}set narrow(e){this.toggleAttribute(`narrow`,e)}get noThinking(){return this.hasAttribute(`no-thinking`)}set noThinking(e){this.toggleAttribute(`no-thinking`,e)}get accented(){return this.thinking===an}#g(){this.#y();let e=this.model,t=this.thinking,r=I[t],i=t===an,a=this.#h,o=a?E(`button`,{type:`button`,class:`ctl msel`,part:`model`},fn(),` `,`Add AI`):E(`button`,{type:`button`,class:`ctl msel`,part:`model`,"aria-haspopup":`menu`,"aria-expanded":`false`},fn(),` `,e,` `,E(`span`,{class:`cx`},mn())),s=E(`div`,{class:`menu`,part:`model-menu`,role:`menu`});if(this.#m.length>cn){let e=E(`input`,{class:`msearch`,part:`model-search`,type:`text`,placeholder:`Search models…`,"aria-label":`Search models`});e.value=this.#d,e.addEventListener(`input`,()=>{this.#d=e.value,this.#_()}),e.addEventListener(`click`,e=>e.stopPropagation()),s.append(e)}this.#s=E(`div`,{class:`mlist`,role:`none`}),s.append(this.#s);let c=E(`div`,{class:`mwrap`},o,s),l=!this.noThinking&&!a,u=null;if(l){let e=pn();e.style.color=r.tint;let a=E(`button`,{type:`button`,class:`ctl tsel${i?` x`:``}`,part:`thinking`,title:r.gloss,"aria-haspopup":`menu`,"aria-expanded":`false`},e,` `,E(`span`,{class:`tlabel`},r.label),` `,E(`span`,{class:`cx`},mn()));a.style.setProperty(`--tw`,r.tint);let o=E(`div`,{class:`menu tmenu`,part:`thinking-menu`,role:`menu`}),s=E(`div`,{class:`mlist`,role:`none`});for(let e of rn){let r=I[e],i=E(`button`,{type:`button`,class:`mitem titem`,role:`menuitemradio`,"data-level":e,"aria-selected":e===t?`true`:`false`,title:r.gloss},E(`span`,{class:`mname`},r.label),E(`span`,{class:`tick`},n(`check`,{size:14})));i.addEventListener(`click`,()=>this.#k(e)),s.append(i)}o.append(s),u=E(`div`,{class:`twrap`},a,o)}let d=E(`slot`,{name:`hint`});T(d,[E(`span`,{class:`kbd`},`⏎`),` send `,E(`span`,{class:`sep`}),` `,E(`span`,{class:`kbd`},`⇧⏎`),` newline`]);let f=E(`div`,{class:`meta`,part:`meta`},c,u??!1,E(`div`,{class:`mspacer`}),E(`span`,{class:`hint`,part:`hint`},d));this.#e.replaceChildren(hn(),f),this.#a=c,this.#o=this.#e.querySelector(`.twrap`),this.#r=this.#e.querySelector(`.msel`),this.#i=this.#e.querySelector(`.tsel`),this.#_(),this.#C(),this.#O(),this.#v()}#_(){let e=this.#s;if(!e)return;let t=this.#d.trim().toLowerCase(),r=this.#m.filter(e=>!t||`${e.name} ${e.provider??``}`.toLowerCase().includes(t)),i=this.model,a=[];for(let e of r){let t=e.name===i,r=E(`button`,{type:`button`,class:`mitem`,role:`menuitemradio`,"data-id":e.id,"aria-selected":t?`true`:`false`},E(`span`,{class:`mname`},e.name),e.provider?E(`span`,{class:`mprov`},e.provider):!1,E(`span`,{class:`tick`},n(`check`,{size:14})));r.addEventListener(`click`,()=>this.#w(e.id)),a.push(r)}e.replaceChildren(...a.length?a:[E(`div`,{class:`mempty`},`No models match.`)])}#v(){this.#r&&(this.#t=e=>{if(e.stopPropagation(),this.#h){this.dispatchEvent(new CustomEvent(`add-ai`,{bubbles:!0,composed:!0}));return}this.#b()},this.#r.addEventListener(`click`,this.#t)),this.#i&&(this.#n=()=>this.#T(),this.#i.addEventListener(`click`,this.#n))}#y(){this.#r&&this.#t&&this.#r.removeEventListener(`click`,this.#t),this.#i&&this.#n&&this.#i.removeEventListener(`click`,this.#n),this.#t=null,this.#n=null,this.#r=null,this.#i=null,this.#a=null,this.#o=null,this.#s=null}get menuOpen(){return this.#l}openMenu(){this.#h||this.#x()}#b(){this.#l?this.#S():this.#x()}#x(){if(this.#l)return;this.#D(),this.#l=!0,this.#d=``,this.#_(),this.#C();let e=this.#e.querySelector(`.msearch`);e&&(e.value=``,requestAnimationFrame(()=>e.focus())),document.addEventListener(`mousedown`,this.#f),document.addEventListener(`keydown`,this.#p,!0)}#S(){this.#l&&(this.#l=!1,this.#C(),this.#u||(document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)))}#C(){this.#a?.classList.toggle(`open`,this.#l),this.#r?.setAttribute(`aria-expanded`,this.#l?`true`:`false`)}#w(e){let t=this.#m.find(t=>t.id===e)??{name:e,id:e,provider:void 0};this.#S(),t.name!==this.model&&(this.model=t.name),this.dispatchEvent(new CustomEvent(`model-change`,{detail:{model:t.name,provider:t.provider,id:t.id},bubbles:!0,composed:!0}))}#T(){this.#u?this.#D():this.#E()}#E(){this.#u||(this.#S(),this.#u=!0,this.#O(),document.addEventListener(`mousedown`,this.#f),document.addEventListener(`keydown`,this.#p,!0))}#D(){this.#u&&(this.#u=!1,this.#O(),this.#l||(document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)))}#O(){this.#o?.classList.toggle(`open`,this.#u),this.#i?.setAttribute(`aria-expanded`,this.#u?`true`:`false`)}#k(e){this.#D(),this.thinking=e,this.dispatchEvent(new CustomEvent(`thinking-change`,{detail:{thinking:e,label:I[e].label,accented:e===an},bubbles:!0,composed:!0}))}});async function _n(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function vn(e,t={}){let n=(e??``).trim().toLowerCase();if(n===``)return null;let r=await _n(n),i=t.size??80,a=t.fallback??`mp`;return`https://www.gravatar.com/avatar/${r}?s=${i}&d=${encodeURIComponent(a)}`}var yn=D(`
1903
+ `);S(`slicc-composer-meta`,class extends HTMLElement{static observedAttributes=[`model`,`thinking`,`narrow`,`no-thinking`];#e;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=null;#c=null;#l=!1;#u=!1;#d=``;#f=e=>{let t=e.composedPath();this.#l&&!t.includes(this)&&this.#S(),this.#u&&!t.includes(this)&&this.#D()};#p=e=>{e.key===`Escape`&&(this.#l&&(e.stopPropagation(),this.#S(),this.#r?.focus()),this.#u&&(e.stopPropagation(),this.#D(),this.#i?.focus()))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[bn]}connectedCallback(){this.#g()}disconnectedCallback(){this.#y(),document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)}attributeChangedCallback(){this.isConnected&&this.#g()}get model(){return this.getAttribute(`model`)??un}set model(e){e==null?this.removeAttribute(`model`):this.setAttribute(`model`,e)}get models(){return(this.#c??[...dn]).map(e=>typeof e==`string`?e:{...e})}set models(e){this.#c=Array.isArray(e)?e.slice():null,this.isConnected&&this.#g()}get#m(){return(this.#c??dn).map(pn)}get#h(){return this.#c!==null&&this.#c.length===0}get thinking(){let e=this.getAttribute(`thinking`);return cn.includes(e??``)?e:mn}set thinking(e){this.setAttribute(`thinking`,e)}get narrow(){return this.hasAttribute(`narrow`)}set narrow(e){this.toggleAttribute(`narrow`,e)}get noThinking(){return this.hasAttribute(`no-thinking`)}set noThinking(e){this.toggleAttribute(`no-thinking`,e)}get accented(){return this.thinking===ln}#g(){this.#y();let e=this.model,t=this.thinking,r=N[t],i=t===ln,a=this.#h,o=a?w(`button`,{type:`button`,class:`ctl msel`,part:`model`},gn(),` `,`Add AI`):w(`button`,{type:`button`,class:`ctl msel`,part:`model`,"aria-haspopup":`menu`,"aria-expanded":`false`},gn(),` `,e,` `,w(`span`,{class:`cx`},vn())),s=w(`div`,{class:`menu`,part:`model-menu`,role:`menu`});if(this.#m.length>fn){let e=w(`input`,{class:`msearch`,part:`model-search`,type:`text`,placeholder:`Search models…`,"aria-label":`Search models`});e.value=this.#d,e.addEventListener(`input`,()=>{this.#d=e.value,this.#_()}),e.addEventListener(`click`,e=>e.stopPropagation()),s.append(e)}this.#s=w(`div`,{class:`mlist`,role:`none`}),s.append(this.#s);let c=w(`div`,{class:`mwrap`},o,s),l=!this.noThinking&&!a,u=null;if(l){let e=_n();e.style.color=r.tint;let a=w(`button`,{type:`button`,class:`ctl tsel${i?` x`:``}`,part:`thinking`,title:r.gloss,"aria-haspopup":`menu`,"aria-expanded":`false`},e,` `,w(`span`,{class:`tlabel`},r.label),` `,w(`span`,{class:`cx`},vn()));a.style.setProperty(`--tw`,r.tint);let o=w(`div`,{class:`menu tmenu`,part:`thinking-menu`,role:`menu`}),s=w(`div`,{class:`mlist`,role:`none`});for(let e of cn){let r=N[e],i=w(`button`,{type:`button`,class:`mitem titem`,role:`menuitemradio`,"data-level":e,"aria-selected":e===t?`true`:`false`,title:r.gloss},w(`span`,{class:`mname`},r.label),w(`span`,{class:`tick`},n(`check`,{size:14})));i.addEventListener(`click`,()=>this.#k(e)),s.append(i)}o.append(s),u=w(`div`,{class:`twrap`},a,o)}let d=w(`slot`,{name:`hint`});C(d,[w(`span`,{class:`kbd`},`⏎`),` send `,w(`span`,{class:`sep`}),` `,w(`span`,{class:`kbd`},`⇧⏎`),` newline`]);let f=w(`div`,{class:`meta`,part:`meta`},c,u??!1,w(`div`,{class:`mspacer`}),w(`span`,{class:`hint`,part:`hint`},d));this.#e.replaceChildren(yn(),f),this.#a=c,this.#o=this.#e.querySelector(`.twrap`),this.#r=this.#e.querySelector(`.msel`),this.#i=this.#e.querySelector(`.tsel`),this.#_(),this.#C(),this.#O(),this.#v()}#_(){let e=this.#s;if(!e)return;let t=this.#d.trim().toLowerCase(),r=this.#m.filter(e=>!t||`${e.name} ${e.provider??``}`.toLowerCase().includes(t)),i=this.model,a=[];for(let e of r){let t=e.name===i,r=w(`button`,{type:`button`,class:`mitem`,role:`menuitemradio`,"data-id":e.id,"aria-selected":t?`true`:`false`},w(`span`,{class:`mname`},e.name),e.provider?w(`span`,{class:`mprov`},e.provider):!1,w(`span`,{class:`tick`},n(`check`,{size:14})));r.addEventListener(`click`,()=>this.#w(e.id)),a.push(r)}e.replaceChildren(...a.length?a:[w(`div`,{class:`mempty`},`No models match.`)])}#v(){this.#r&&(this.#t=e=>{if(e.stopPropagation(),this.#h){this.dispatchEvent(new CustomEvent(`add-ai`,{bubbles:!0,composed:!0}));return}this.#b()},this.#r.addEventListener(`click`,this.#t)),this.#i&&(this.#n=()=>this.#T(),this.#i.addEventListener(`click`,this.#n))}#y(){this.#r&&this.#t&&this.#r.removeEventListener(`click`,this.#t),this.#i&&this.#n&&this.#i.removeEventListener(`click`,this.#n),this.#t=null,this.#n=null,this.#r=null,this.#i=null,this.#a=null,this.#o=null,this.#s=null}get menuOpen(){return this.#l}openMenu(){this.#h||this.#x()}#b(){this.#l?this.#S():this.#x()}#x(){if(this.#l)return;this.#D(),this.#l=!0,this.#d=``,this.#_(),this.#C();let e=this.#e.querySelector(`.msearch`);e&&(e.value=``,requestAnimationFrame(()=>e.focus())),document.addEventListener(`mousedown`,this.#f),document.addEventListener(`keydown`,this.#p,!0)}#S(){this.#l&&(this.#l=!1,this.#C(),this.#u||(document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)))}#C(){this.#a?.classList.toggle(`open`,this.#l),this.#r?.setAttribute(`aria-expanded`,this.#l?`true`:`false`)}#w(e){let t=this.#m.find(t=>t.id===e)??{name:e,id:e,provider:void 0};this.#S(),t.name!==this.model&&(this.model=t.name),this.dispatchEvent(new CustomEvent(`model-change`,{detail:{model:t.name,provider:t.provider,id:t.id},bubbles:!0,composed:!0}))}#T(){this.#u?this.#D():this.#E()}#E(){this.#u||(this.#S(),this.#u=!0,this.#O(),document.addEventListener(`mousedown`,this.#f),document.addEventListener(`keydown`,this.#p,!0))}#D(){this.#u&&(this.#u=!1,this.#O(),this.#l||(document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)))}#O(){this.#o?.classList.toggle(`open`,this.#u),this.#i?.setAttribute(`aria-expanded`,this.#u?`true`:`false`)}#k(e){this.#D(),this.thinking=e,this.dispatchEvent(new CustomEvent(`thinking-change`,{detail:{thinking:e,label:N[e].label,accented:e===ln},bubbles:!0,composed:!0}))}});async function xn(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function Sn(e,t={}){let n=(e??``).trim().toLowerCase();if(n===``)return null;let r=await xn(n),i=t.size??80,a=t.fallback??`mp`;return`https://www.gravatar.com/avatar/${r}?s=${i}&d=${encodeURIComponent(a)}`}var Cn=T(`
1904
1904
  :host { display: inline-flex; }
1905
1905
  :host([hidden]) { display: none; }
1906
1906
 
@@ -2103,7 +2103,7 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
2103
2103
  }
2104
2104
  .glyph.is-press { transform: none; }
2105
2105
  }
2106
- `),R=18,bn=72,xn=`http://www.w3.org/2000/svg`,Sn=15,Cn=.25;function wn(e){let t=document.createElementNS(xn,`svg`);t.setAttribute(`width`,`36`),t.setAttribute(`height`,`36`),t.setAttribute(`viewBox`,`0 0 36 36`),t.setAttribute(`fill`,`none`),t.setAttribute(`aria-hidden`,`true`);let n=2*Math.PI*Sn,r=e=>{let t=document.createElementNS(xn,`circle`);return t.setAttribute(`cx`,`18`),t.setAttribute(`cy`,`18`),t.setAttribute(`r`,String(Sn)),t.setAttribute(`fill`,`none`),t.setAttribute(`stroke-width`,`2.5`),t.setAttribute(`stroke-linecap`,`round`),t.setAttribute(`class`,e),t};t.appendChild(r(`ring-track`));let i=r(`ring-arc`),a=e==null?Cn:Math.max(0,Math.min(1,e));return i.setAttribute(`stroke-dasharray`,`${n*a} ${n}`),e!=null&&i.setAttribute(`transform`,`rotate(-90 18 18)`),t.appendChild(i),t}function Tn(e){return e===`tool`?`tool`:`thinking`}function En(e){if(e==null||e.trim()===``)return null;let t=Number(e);return Number.isFinite(t)?Math.max(0,Math.min(1,t)):null}w(`slicc-send-button`,class extends HTMLElement{static observedAttributes=[`disabled`,`busy`,`phase`,`progress`,`email`,`src`,`label`];#e;#t=null;#n=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[yn]}connectedCallback(){this.#d()}attributeChangedCallback(){this.isConnected&&this.#d()}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,!!e)}get busy(){return this.hasAttribute(`busy`)}set busy(e){this.toggleAttribute(`busy`,!!e)}get phase(){return Tn(this.getAttribute(`phase`))}set phase(e){this.setAttribute(`phase`,Tn(e))}get progress(){return En(this.getAttribute(`progress`))}set progress(e){e==null?this.removeAttribute(`progress`):this.setAttribute(`progress`,String(e))}get email(){return this.getAttribute(`email`)}set email(e){e==null?this.removeAttribute(`email`):this.setAttribute(`email`,e)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#r=()=>{if(!this.disabled){if(this.busy){this.dispatchEvent(new CustomEvent(`stop`,{bubbles:!0,composed:!0}));return}this.#l(),this.dispatchEvent(new CustomEvent(`send`,{bubbles:!0,composed:!0}))}};#i(){return this.#e.querySelector(`.glyph`)}#a=()=>{this.disabled||this.busy||this.#i()?.classList.add(`is-hover`)};#o=()=>{this.#i()?.classList.remove(`is-hover`,`is-press`)};#s=()=>{if(this.disabled||this.busy)return;let e=this.#i();e?.classList.add(`is-press`),e?.classList.remove(`is-hover`)};#c=()=>{this.#i()?.classList.remove(`is-press`)};#l(){let e=this.#e.querySelector(`.glyph`);e&&(e.classList.remove(`is-whoosh`),e.offsetWidth,e.classList.add(`is-whoosh`),e.addEventListener(`animationend`,()=>e.classList.remove(`is-whoosh`),{once:!0}))}#u(){let e=++this.#n;if(!this.#t)return;let t=t=>{if(e!==this.#n)return;let n=this.#t;if(n)if(n.querySelector(`.face`)?.remove(),t){let e=document.createElement(`img`);e.className=`face`,e.setAttribute(`part`,`face`),e.alt=``,e.src=t,n.prepend(e),n.classList.add(`has-face`)}else n.classList.remove(`has-face`)},n=this.src;if(n){t(n);return}let r=this.email;if(!r||r.trim()===``){t(null);return}t(null),vn(r,{size:bn}).then(t).catch(()=>t(null))}#d(){let e=this.busy,t=this.disabled,r=e&&this.phase===`tool`,i=this.label??(e?`Stop`:`Send`),a;if(r){let e=this.progress,t=e==null;a=E(`slot`,{name:`busy`},E(`span`,{class:`stop`,part:`stop`},n(`square`,{size:R})),E(`span`,{class:`spinner${t?` is-indeterminate`:``}`,part:`spinner`},wn(e)))}else a=e?E(`slot`,{name:`busy`},E(`span`,{class:`stop`,part:`stop`},n(`square`,{size:R}),E(`span`,{class:`stop-fill`},n(`square`,{size:R})))):E(`slot`,null,E(`span`,{class:`glyph`,part:`glyph`},n(`arrow-up`,{size:R})));let o=E(`button`,{part:`button`,class:`send${e?` is-busy`:``}${r?` is-tool`:``}`,type:`button`,title:i,"aria-label":i,disabled:t||void 0},a);this.#e.replaceChildren(o),this.#t=o,this.#t.addEventListener(`click`,this.#r),this.#t.addEventListener(`pointerenter`,this.#a),this.#t.addEventListener(`pointerleave`,this.#o),this.#t.addEventListener(`pointerdown`,this.#s),this.#t.addEventListener(`pointerup`,this.#c),this.#u()}});var Dn=`
2106
+ `),F=18,wn=72,Tn=`http://www.w3.org/2000/svg`,En=15,Dn=.25;function On(e){let t=document.createElementNS(Tn,`svg`);t.setAttribute(`width`,`36`),t.setAttribute(`height`,`36`),t.setAttribute(`viewBox`,`0 0 36 36`),t.setAttribute(`fill`,`none`),t.setAttribute(`aria-hidden`,`true`);let n=2*Math.PI*En,r=e=>{let t=document.createElementNS(Tn,`circle`);return t.setAttribute(`cx`,`18`),t.setAttribute(`cy`,`18`),t.setAttribute(`r`,String(En)),t.setAttribute(`fill`,`none`),t.setAttribute(`stroke-width`,`2.5`),t.setAttribute(`stroke-linecap`,`round`),t.setAttribute(`class`,e),t};t.appendChild(r(`ring-track`));let i=r(`ring-arc`),a=e==null?Dn:Math.max(0,Math.min(1,e));return i.setAttribute(`stroke-dasharray`,`${n*a} ${n}`),e!=null&&i.setAttribute(`transform`,`rotate(-90 18 18)`),t.appendChild(i),t}function kn(e){return e===`tool`?`tool`:`thinking`}function An(e){if(e==null||e.trim()===``)return null;let t=Number(e);return Number.isFinite(t)?Math.max(0,Math.min(1,t)):null}S(`slicc-send-button`,class extends HTMLElement{static observedAttributes=[`disabled`,`busy`,`phase`,`progress`,`email`,`src`,`label`];#e;#t=null;#n=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Cn]}connectedCallback(){this.#d()}attributeChangedCallback(){this.isConnected&&this.#d()}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,!!e)}get busy(){return this.hasAttribute(`busy`)}set busy(e){this.toggleAttribute(`busy`,!!e)}get phase(){return kn(this.getAttribute(`phase`))}set phase(e){this.setAttribute(`phase`,kn(e))}get progress(){return An(this.getAttribute(`progress`))}set progress(e){e==null?this.removeAttribute(`progress`):this.setAttribute(`progress`,String(e))}get email(){return this.getAttribute(`email`)}set email(e){e==null?this.removeAttribute(`email`):this.setAttribute(`email`,e)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#r=()=>{if(!this.disabled){if(this.busy){this.dispatchEvent(new CustomEvent(`stop`,{bubbles:!0,composed:!0}));return}this.#l(),this.dispatchEvent(new CustomEvent(`send`,{bubbles:!0,composed:!0}))}};#i(){return this.#e.querySelector(`.glyph`)}#a=()=>{this.disabled||this.busy||this.#i()?.classList.add(`is-hover`)};#o=()=>{this.#i()?.classList.remove(`is-hover`,`is-press`)};#s=()=>{if(this.disabled||this.busy)return;let e=this.#i();e?.classList.add(`is-press`),e?.classList.remove(`is-hover`)};#c=()=>{this.#i()?.classList.remove(`is-press`)};#l(){let e=this.#e.querySelector(`.glyph`);e&&(e.classList.remove(`is-whoosh`),e.offsetWidth,e.classList.add(`is-whoosh`),e.addEventListener(`animationend`,()=>e.classList.remove(`is-whoosh`),{once:!0}))}#u(){let e=++this.#n;if(!this.#t)return;let t=t=>{if(e!==this.#n)return;let n=this.#t;if(n)if(n.querySelector(`.face`)?.remove(),t){let e=document.createElement(`img`);e.className=`face`,e.setAttribute(`part`,`face`),e.alt=``,e.src=t,n.prepend(e),n.classList.add(`has-face`)}else n.classList.remove(`has-face`)},n=this.src;if(n){t(n);return}let r=this.email;if(!r||r.trim()===``){t(null);return}t(null),Sn(r,{size:wn}).then(t).catch(()=>t(null))}#d(){let e=this.busy,t=this.disabled,r=e&&this.phase===`tool`,i=this.label??(e?`Stop`:`Send`),a;if(r){let e=this.progress,t=e==null;a=w(`slot`,{name:`busy`},w(`span`,{class:`stop`,part:`stop`},n(`square`,{size:F})),w(`span`,{class:`spinner${t?` is-indeterminate`:``}`,part:`spinner`},On(e)))}else a=e?w(`slot`,{name:`busy`},w(`span`,{class:`stop`,part:`stop`},n(`square`,{size:F}),w(`span`,{class:`stop-fill`},n(`square`,{size:F})))):w(`slot`,null,w(`span`,{class:`glyph`,part:`glyph`},n(`arrow-up`,{size:F})));let o=w(`button`,{part:`button`,class:`send${e?` is-busy`:``}${r?` is-tool`:``}`,type:`button`,title:i,"aria-label":i,disabled:t||void 0},a);this.#e.replaceChildren(o),this.#t=o,this.#t.addEventListener(`click`,this.#r),this.#t.addEventListener(`pointerenter`,this.#a),this.#t.addEventListener(`pointerleave`,this.#o),this.#t.addEventListener(`pointerdown`,this.#s),this.#t.addEventListener(`pointerup`,this.#c),this.#u()}});var jn=`
2107
2107
  slicc-input-card {
2108
2108
  display: block;
2109
2109
  }
@@ -2157,7 +2157,7 @@ slicc-input-card .toolbar slicc-add-menu {
2157
2157
  flex: 1;
2158
2158
  min-width: 0;
2159
2159
  }
2160
- `,On=`slicc-input-card-style`;function kn(e){if(e.getElementById(On))return;let t=e.createElement(`style`);t.id=On,t.textContent=Dn,(e.head??e.documentElement).appendChild(t)}var An=`Ask sliccy, or describe a change…`;w(`slicc-input-card`,class extends HTMLElement{static observedAttributes=[`value`,`placeholder`,`suggestion`,`disabled`];#e;#t;#n;#r=!1;connectedCallback(){kn(this.ownerDocument),this.#i(),this.#a(),this.#u()}attributeChangedCallback(e,t,n){!this.#r||t===n||(this.#a(),e===`value`&&this.#u())}get value(){return this.#r?this.#t.value:this.getAttribute(`value`)??``}set value(e){let t=e??``;this.#r&&(this.#t.value=t,this.#u()),t===``?this.removeAttribute(`value`):this.setAttribute(`value`,t)}get placeholder(){return this.getAttribute(`placeholder`)??An}set placeholder(e){e==null?this.removeAttribute(`placeholder`):this.setAttribute(`placeholder`,e)}get suggestion(){return this.getAttribute(`suggestion`)}set suggestion(e){e==null||e===``?this.removeAttribute(`suggestion`):this.setAttribute(`suggestion`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,!!e)}focus(e){this.#i(),this.#t.focus(e)}clear(){this.value=``}#i(){if(this.#r)return;this.#r=!0;let e=this.ownerDocument,t=Array.from(this.children).filter(e=>e.getAttribute(`slot`)===`toolbar`);if(this.replaceChildren(),this.#e=e.createElement(`div`),this.#e.className=`slicc-input-card__card`,this.#e.setAttribute(`part`,`card`),this.#t=e.createElement(`textarea`),this.#t.className=`ta`,this.#t.setAttribute(`part`,`textarea`),this.#t.rows=1,this.#n=e.createElement(`div`),this.#n.className=`toolbar`,this.#n.setAttribute(`part`,`toolbar`),t.length>0)for(let e of t)this.#n.appendChild(e);else this.#n.append(E(`slicc-add-menu`),E(`slicc-send-button`));this.#e.append(this.#t,this.#n),this.appendChild(this.#e),this.#t.addEventListener(`input`,this.#o),this.#t.addEventListener(`keydown`,this.#s),this.#n.addEventListener(`send`,this.#c)}#a(){if(!this.#r)return;let e=this.#t;e.placeholder=this.suggestion??this.placeholder,e.disabled=this.disabled;let t=this.getAttribute(`value`)??``;e.value!==t&&(e.value=t)}#o=e=>{e.stopPropagation();let t=this.#t.value;t===``?this.removeAttribute(`value`):this.setAttribute(`value`,t),this.#u(),this.dispatchEvent(new CustomEvent(`input`,{bubbles:!0,composed:!0,detail:{value:t}}))};#s=e=>{if(e.isComposing)return;if(e.key===`Enter`&&!e.shiftKey&&!e.altKey){e.preventDefault(),this.#l(void 0,e.ctrlKey||e.metaKey);return}if(e.key===`Tab`&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey){let t=this.suggestion;if(t&&this.#t.value===``){e.preventDefault(),this.removeAttribute(`suggestion`);let n=this.#t;n.value=t,n.setSelectionRange(t.length,t.length),n.dispatchEvent(new Event(`input`,{bubbles:!0}))}return}let t=this.#t,n=t.selectionStart===t.selectionEnd;e.key===`ArrowUp`&&n&&t.selectionStart===0?(e.preventDefault(),this.dispatchEvent(new CustomEvent(`history-up`,{bubbles:!0,composed:!0}))):e.key===`ArrowDown`&&n&&t.selectionStart===t.value.length&&this.dispatchEvent(new CustomEvent(`history-down`,{bubbles:!0,composed:!0}))};#c=e=>{e.stopPropagation(),this.#l()};submit(e){this.#i(),this.#l(e)}focusEnd(){if(!this.#r)return;let e=this.#t;e.focus();let t=e.value.length;e.setSelectionRange(t,t)}#l(e,t){if(this.disabled)return;let n=this.#t.value;n.trim()!==``&&(this.removeAttribute(`suggestion`),this.dispatchEvent(new CustomEvent(`submit`,{bubbles:!0,composed:!0,detail:{value:n,...e?{source:e}:{},...t?{steer:!0}:{}}})))}#u(){if(!this.#r)return;let e=this.#t;e.style.height=`auto`;let t=e.scrollHeight;e.style.height=`${Math.min(t,140)}px`,e.style.overflowY=t>140?`auto`:`hidden`}});var jn=D(`
2160
+ `,Mn=`slicc-input-card-style`;function Nn(e){if(e.getElementById(Mn))return;let t=e.createElement(`style`);t.id=Mn,t.textContent=jn,(e.head??e.documentElement).appendChild(t)}var Pn=`Ask sliccy, or describe a change…`;S(`slicc-input-card`,class extends HTMLElement{static observedAttributes=[`value`,`placeholder`,`suggestion`,`disabled`];#e;#t;#n;#r=!1;connectedCallback(){Nn(this.ownerDocument),this.#i(),this.#a(),this.#u()}attributeChangedCallback(e,t,n){!this.#r||t===n||(this.#a(),e===`value`&&this.#u())}get value(){return this.#r?this.#t.value:this.getAttribute(`value`)??``}set value(e){let t=e??``;this.#r&&(this.#t.value=t,this.#u()),t===``?this.removeAttribute(`value`):this.setAttribute(`value`,t)}get placeholder(){return this.getAttribute(`placeholder`)??Pn}set placeholder(e){e==null?this.removeAttribute(`placeholder`):this.setAttribute(`placeholder`,e)}get suggestion(){return this.getAttribute(`suggestion`)}set suggestion(e){e==null||e===``?this.removeAttribute(`suggestion`):this.setAttribute(`suggestion`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,!!e)}focus(e){this.#i(),this.#t.focus(e)}clear(){this.value=``}#i(){if(this.#r)return;this.#r=!0;let e=this.ownerDocument,t=Array.from(this.children).filter(e=>e.getAttribute(`slot`)===`toolbar`);if(this.replaceChildren(),this.#e=e.createElement(`div`),this.#e.className=`slicc-input-card__card`,this.#e.setAttribute(`part`,`card`),this.#t=e.createElement(`textarea`),this.#t.className=`ta`,this.#t.setAttribute(`part`,`textarea`),this.#t.rows=1,this.#n=e.createElement(`div`),this.#n.className=`toolbar`,this.#n.setAttribute(`part`,`toolbar`),t.length>0)for(let e of t)this.#n.appendChild(e);else this.#n.append(w(`slicc-add-menu`),w(`slicc-send-button`));this.#e.append(this.#t,this.#n),this.appendChild(this.#e),this.#t.addEventListener(`input`,this.#o),this.#t.addEventListener(`keydown`,this.#s),this.#n.addEventListener(`send`,this.#c)}#a(){if(!this.#r)return;let e=this.#t;e.placeholder=this.suggestion??this.placeholder,e.disabled=this.disabled;let t=this.getAttribute(`value`)??``;e.value!==t&&(e.value=t)}#o=e=>{e.stopPropagation();let t=this.#t.value;t===``?this.removeAttribute(`value`):this.setAttribute(`value`,t),this.#u(),this.dispatchEvent(new CustomEvent(`input`,{bubbles:!0,composed:!0,detail:{value:t}}))};#s=e=>{if(e.isComposing)return;if(e.key===`Enter`&&!e.shiftKey&&!e.altKey){e.preventDefault(),this.#l(void 0,e.ctrlKey||e.metaKey);return}if(e.key===`Tab`&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey){let t=this.suggestion;if(t&&this.#t.value===``){e.preventDefault(),this.removeAttribute(`suggestion`);let n=this.#t;n.value=t,n.setSelectionRange(t.length,t.length),n.dispatchEvent(new Event(`input`,{bubbles:!0}))}return}let t=this.#t,n=t.selectionStart===t.selectionEnd;e.key===`ArrowUp`&&n&&t.selectionStart===0?(e.preventDefault(),this.dispatchEvent(new CustomEvent(`history-up`,{bubbles:!0,composed:!0}))):e.key===`ArrowDown`&&n&&t.selectionStart===t.value.length&&this.dispatchEvent(new CustomEvent(`history-down`,{bubbles:!0,composed:!0}))};#c=e=>{e.stopPropagation(),this.#l()};submit(e){this.#i(),this.#l(e)}focusEnd(){if(!this.#r)return;let e=this.#t;e.focus();let t=e.value.length;e.setSelectionRange(t,t)}#l(e,t){if(this.disabled)return;let n=this.#t.value;n.trim()!==``&&(this.removeAttribute(`suggestion`),this.dispatchEvent(new CustomEvent(`submit`,{bubbles:!0,composed:!0,detail:{value:n,...e?{source:e}:{},...t?{steer:!0}:{}}})))}#u(){if(!this.#r)return;let e=this.#t;e.style.height=`auto`;let t=e.scrollHeight;e.style.height=`${Math.min(t,140)}px`,e.style.overflowY=t>140?`auto`:`hidden`}});var Fn=T(`
2161
2161
  :host{display:block;font-family:var(--ui);}
2162
2162
  :host(:not([count])),:host([count="0"]),:host([count="-0"]){display:none;}
2163
2163
  .wrap{display:flex;flex-direction:column;align-items:stretch;gap:6px;}
@@ -2178,7 +2178,7 @@ slicc-input-card .toolbar slicc-add-menu {
2178
2178
  :host-context(body.dark) .dismiss:hover,:host-context(body.dark) .dismiss:focus-visible,
2179
2179
  :host-context(.dark) .dismiss:hover,:host-context(.dark) .dismiss:focus-visible,
2180
2180
  :host-context([data-theme="dark"]) .dismiss:hover,:host-context([data-theme="dark"]) .dismiss:focus-visible{background:color-mix(in srgb,#0a0a0a 14%,transparent);}
2181
- `),Mn=[{rot:0,x:0,y:0},{rot:-2,x:-3,y:-2},{rot:2,x:3,y:-4},{rot:-3,x:-5,y:-6},{rot:3,x:5,y:-8},{rot:-1,x:-2,y:-10},{rot:1,x:2,y:-12}];function Nn(e){return Mn[Math.min(e,Mn.length-1)]??Mn[0]}w(`slicc-queued-stack`,class extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[jn]}connectedCallback(){this.#i()}get count(){return this.#t.length}setMessages(e){this.#t=e.slice(),this.setAttribute(`count`,String(this.#t.length)),this.#i()}#n(e){this.dispatchEvent(new CustomEvent(`slicc-queued-remove`,{detail:{id:e},bubbles:!0,composed:!0}))}#r(e,t,r,i){let{rot:a,x:o,y:s}=Nn(t),c=r?`none`:`translate(${o}px, ${s}px) rotate(${a}deg)`,l=`card${r?` is-front`:``}${t===0?``:t===1?` is-back`:` is-deep`}`,u=r?`card front`:`card`,d=`transform:${c};z-index:${i};`,f=[E(`span`,{class:`bubble`},e.text)];if(e.attachments&&e.attachments>0&&f.push(E(`span`,{class:`attach`},`+${e.attachments}`)),r){let t=E(`button`,{type:`button`,class:`dismiss`,part:`dismiss`,"aria-label":`Remove queued message`},n(`x`,{size:14}));t.addEventListener(`click`,t=>{t.stopPropagation(),this.#n(e.id)}),f.push(t)}return E(`div`,{class:l,part:u,style:d},...f)}#i(){if(this.#t.length===0){this.#e.replaceChildren();return}let e=this.#t.length,t=[];for(let n=e-1;n>=0;n--){let r=e-1-n,i=r===0,a=n+1,o=this.#t[n];o&&t.push(this.#r(o,r,i,a))}let r=E(`div`,{class:`stack`,part:`stack`},...t),i=E(`div`,{class:`wrap`},E(`span`,{class:`badge`,part:`badge`},n(`clock`,{size:11}),`${e} queued`),r);this.#e.replaceChildren(i)}});var Pn=1e3;function Fn(e,t){let n=t.longPressMs??1e3,r=t.modifierClickAsLongPress??!0,i=null,a=!1,o=()=>{t.onPressEnd?.()},s=()=>{i!==null&&(clearTimeout(i),i=null),o()},c=e=>{e.button===0&&(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(a=!1,s(),t.onPressStart?.(e),i=setTimeout(()=>{a=!0,o(),i=null,t.onLongPress()},n)))},l=()=>s(),u=()=>s(),d=()=>s(),f=()=>s(),p=e=>{if(a){a=!1,e.preventDefault();return}if((e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)&&r){e.preventDefault(),t.onLongPress();return}t.onShortClick(e)};return e.addEventListener(`mousedown`,c),e.addEventListener(`mouseup`,l),e.addEventListener(`mouseleave`,u),e.addEventListener(`blur`,d),e.addEventListener(`contextmenu`,f),e.addEventListener(`click`,p),{destroy:()=>{s(),e.removeEventListener(`mousedown`,c),e.removeEventListener(`mouseup`,l),e.removeEventListener(`mouseleave`,u),e.removeEventListener(`blur`,d),e.removeEventListener(`contextmenu`,f),e.removeEventListener(`click`,p)}}}var In=D(`
2181
+ `),In=[{rot:0,x:0,y:0},{rot:-2,x:-3,y:-2},{rot:2,x:3,y:-4},{rot:-3,x:-5,y:-6},{rot:3,x:5,y:-8},{rot:-1,x:-2,y:-10},{rot:1,x:2,y:-12}];function Ln(e){return In[Math.min(e,In.length-1)]??In[0]}S(`slicc-queued-stack`,class extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Fn]}connectedCallback(){this.#i()}get count(){return this.#t.length}setMessages(e){this.#t=e.slice(),this.setAttribute(`count`,String(this.#t.length)),this.#i()}#n(e){this.dispatchEvent(new CustomEvent(`slicc-queued-remove`,{detail:{id:e},bubbles:!0,composed:!0}))}#r(e,t,r,i){let{rot:a,x:o,y:s}=Ln(t),c=r?`none`:`translate(${o}px, ${s}px) rotate(${a}deg)`,l=`card${r?` is-front`:``}${t===0?``:t===1?` is-back`:` is-deep`}`,u=r?`card front`:`card`,d=`transform:${c};z-index:${i};`,f=[w(`span`,{class:`bubble`},e.text)];if(e.attachments&&e.attachments>0&&f.push(w(`span`,{class:`attach`},`+${e.attachments}`)),r){let t=w(`button`,{type:`button`,class:`dismiss`,part:`dismiss`,"aria-label":`Remove queued message`},n(`x`,{size:14}));t.addEventListener(`click`,t=>{t.stopPropagation(),this.#n(e.id)}),f.push(t)}return w(`div`,{class:l,part:u,style:d},...f)}#i(){if(this.#t.length===0){this.#e.replaceChildren();return}let e=this.#t.length,t=[];for(let n=e-1;n>=0;n--){let r=e-1-n,i=r===0,a=n+1,o=this.#t[n];o&&t.push(this.#r(o,r,i,a))}let r=w(`div`,{class:`stack`,part:`stack`},...t),i=w(`div`,{class:`wrap`},w(`span`,{class:`badge`,part:`badge`},n(`clock`,{size:11}),`${e} queued`),r);this.#e.replaceChildren(i)}});var Rn=1e3;function I(e,t){let n=t.longPressMs??1e3,r=t.modifierClickAsLongPress??!0,i=null,a=!1,o=()=>{t.onPressEnd?.()},s=()=>{i!==null&&(clearTimeout(i),i=null),o()},c=e=>{e.button===0&&(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(a=!1,s(),t.onPressStart?.(e),i=setTimeout(()=>{a=!0,o(),i=null,t.onLongPress()},n)))},l=()=>s(),u=()=>s(),d=()=>s(),f=()=>s(),p=e=>{if(a){a=!1,e.preventDefault();return}if((e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)&&r){e.preventDefault(),t.onLongPress();return}t.onShortClick(e)};return e.addEventListener(`mousedown`,c),e.addEventListener(`mouseup`,l),e.addEventListener(`mouseleave`,u),e.addEventListener(`blur`,d),e.addEventListener(`contextmenu`,f),e.addEventListener(`click`,p),{destroy:()=>{s(),e.removeEventListener(`mousedown`,c),e.removeEventListener(`mouseup`,l),e.removeEventListener(`mouseleave`,u),e.removeEventListener(`blur`,d),e.removeEventListener(`contextmenu`,f),e.removeEventListener(`click`,p)}}}var zn=T(`
2182
2182
  :host { display: inline-grid; }
2183
2183
  :host([hidden]) { display: none; }
2184
2184
 
@@ -2260,7 +2260,7 @@ slicc-input-card .toolbar slicc-add-menu {
2260
2260
 
2261
2261
  .glyph { display: grid; place-items: center; line-height: 1; }
2262
2262
  .glyph svg { display: block; }
2263
- `),Ln=`square`,Rn=18;w(`slicc-dock-item`,class extends HTMLElement{static observedAttributes=[`item-id`,`kind`,`hue`,`icon`,`tip`,`active`,`lit`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[In]}disconnectedCallback(){this.#t?.destroy(),this.#t=null}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get itemId(){return this.getAttribute(`item-id`)}set itemId(e){e==null?this.removeAttribute(`item-id`):this.setAttribute(`item-id`,e)}get kind(){return this.getAttribute(`kind`)===`sprinkle`?`sprinkle`:`tool`}set kind(e){this.setAttribute(`kind`,e===`sprinkle`?`sprinkle`:`tool`)}get hue(){return this.getAttribute(`hue`)}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get icon(){return this.getAttribute(`icon`)??Ln}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get tip(){return this.getAttribute(`tip`)}set tip(e){e==null?this.removeAttribute(`tip`):this.setAttribute(`tip`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,!!e)}get lit(){return this.hasAttribute(`lit`)}set lit(e){this.toggleAttribute(`lit`,!!e)}#n(){let e=[`di`];this.kind===`sprinkle`&&e.push(`sp`),this.active&&e.push(`on`),this.lit&&e.push(`lit`);let t=this.tip,r=n(this.icon,{size:Rn,part:`icon`}),i=t??this.itemId??`dock item`,a=E(`button`,{type:`button`,part:`button`,class:e.join(` `),"aria-label":i,"aria-pressed":this.active?`true`:`false`},E(`span`,{class:`glyph`,part:`glyph`},E(`slot`,null,r)),t?E(`span`,{class:`tip`,part:`tip`},t):null),o=this.hue;o&&a.style.setProperty(`--h`,o),this.#t?.destroy(),this.#t=Fn(a,{onShortClick:this.#r,onLongPress:()=>this.#i(`longpress`)}),this.#e.replaceChildren(a)}#r=()=>{this.#i(this.active?`collapse`:`select`)};#i(e){this.dispatchEvent(new CustomEvent(e,{detail:{id:this.itemId},bubbles:!0,composed:!0}))}});var zn=[{id:`browser`,icon:`globe`,label:`Browser · CDP`,kind:`tool`},{id:`files`,icon:`folder`,label:`Files · VFS`,kind:`tool`},{id:`term`,icon:`square-terminal`,label:`Terminal`,kind:`tool`},{id:`memory`,icon:`brain`,label:`Memory`,kind:`tool`},{id:`monitor`,icon:`activity`,label:`Monitor`,kind:`tool`}],Bn={id:`new`,icon:`plus`,label:`New sprinkle`,kind:`sprinkle`},Vn=`
2263
+ `),Bn=`square`,Vn=18;S(`slicc-dock-item`,class extends HTMLElement{static observedAttributes=[`item-id`,`kind`,`hue`,`icon`,`tip`,`active`,`lit`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[zn]}disconnectedCallback(){this.#t?.destroy(),this.#t=null}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get itemId(){return this.getAttribute(`item-id`)}set itemId(e){e==null?this.removeAttribute(`item-id`):this.setAttribute(`item-id`,e)}get kind(){return this.getAttribute(`kind`)===`sprinkle`?`sprinkle`:`tool`}set kind(e){this.setAttribute(`kind`,e===`sprinkle`?`sprinkle`:`tool`)}get hue(){return this.getAttribute(`hue`)}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get icon(){return this.getAttribute(`icon`)??Bn}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get tip(){return this.getAttribute(`tip`)}set tip(e){e==null?this.removeAttribute(`tip`):this.setAttribute(`tip`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,!!e)}get lit(){return this.hasAttribute(`lit`)}set lit(e){this.toggleAttribute(`lit`,!!e)}#n(){let e=[`di`];this.kind===`sprinkle`&&e.push(`sp`),this.active&&e.push(`on`),this.lit&&e.push(`lit`);let t=this.tip,r=n(this.icon,{size:Vn,part:`icon`}),i=t??this.itemId??`dock item`,a=w(`button`,{type:`button`,part:`button`,class:e.join(` `),"aria-label":i,"aria-pressed":this.active?`true`:`false`},w(`span`,{class:`glyph`,part:`glyph`},w(`slot`,null,r)),t?w(`span`,{class:`tip`,part:`tip`},t):null),o=this.hue;o&&a.style.setProperty(`--h`,o),this.#t?.destroy(),this.#t=I(a,{onShortClick:this.#r,onLongPress:()=>this.#i(`longpress`)}),this.#e.replaceChildren(a)}#r=()=>{this.#i(this.active?`collapse`:`select`)};#i(e){this.dispatchEvent(new CustomEvent(e,{detail:{id:this.itemId},bubbles:!0,composed:!0}))}});var Hn=[{id:`browser`,icon:`globe`,label:`Browser · CDP`,kind:`tool`},{id:`files`,icon:`folder`,label:`Files · VFS`,kind:`tool`},{id:`term`,icon:`square-terminal`,label:`Terminal`,kind:`tool`},{id:`memory`,icon:`brain`,label:`Memory`,kind:`tool`},{id:`monitor`,icon:`activity`,label:`Monitor`,kind:`tool`}],Un={id:`new`,icon:`plus`,label:`New sprinkle`,kind:`sprinkle`},Wn=`
2264
2264
  .slicc-dock {
2265
2265
  flex: 0 0 48px;
2266
2266
  box-sizing: border-box;
@@ -2281,7 +2281,7 @@ slicc-input-card .toolbar slicc-add-menu {
2281
2281
  margin: 2px 0;
2282
2282
  }
2283
2283
  .slicc-dock .grow { flex: 1; }
2284
- `,Hn=`slicc-dock-style`;function Un(e){if(e.getElementById(Hn))return;let t=e.createElement(`style`);t.id=Hn,t.textContent=Vn,(e.head??e.documentElement).appendChild(t)}function Wn(e){return e===`sprinkle`?`sprinkle`:`tool`}w(`slicc-dock`,class extends HTMLElement{static get observedAttributes(){return[`active`,`system-tools`]}#e=[];#t=null;#n=null;#r=null;#i=!1;connectedCallback(){Un(this.ownerDocument),this.classList.add(`slicc-dock`),this.setAttribute(`part`,`rail`),this.setAttribute(`role`,`toolbar`),this.setAttribute(`aria-orientation`,`vertical`),this.#i||=(this.#a(),!0),this.#t||(this.#t=e=>this.#u(e),this.#n=e=>this.#d(e),this.#r=e=>this.#f(e),this.addEventListener(`select`,this.#t),this.addEventListener(`collapse`,this.#n),this.addEventListener(`longpress`,this.#r)),this.#c()}disconnectedCallback(){this.#t&&=(this.removeEventListener(`select`,this.#t),null),this.#n&&=(this.removeEventListener(`collapse`,this.#n),null),this.#r&&=(this.removeEventListener(`longpress`,this.#r),null)}attributeChangedCallback(e){this.#i&&(e===`active`?this.#l():e===`system-tools`&&this.#c())}get items(){return this.#e.map(e=>({...e}))}set items(e){this.#e=Array.isArray(e)?e.map(e=>({...e})):[],this.#i&&this.isConnected&&this.#c()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get systemTools(){return this.hasAttribute(`system-tools`)}set systemTools(e){this.toggleAttribute(`system-tools`,!!e)}selectItem(e){this.active=e,this.dispatchEvent(new CustomEvent(`slicc-dock-select`,{detail:{id:e,kind:this.#o(e)},bubbles:!0,composed:!0}))}clearActive(){this.active=null}collapse(){let e=this.active;this.active=null,e!=null&&this.dispatchEvent(new CustomEvent(`slicc-dock-collapse`,{detail:{id:e},bubbles:!0,composed:!0}))}#a(){let e=[...this.querySelectorAll(`slicc-dock-item`)];if(e.length===0)return;let t=[];for(let n of e){let e=Wn(n.getAttribute(`kind`)),r=n.getAttribute(`item-id`)??n.dataset.t??n.getAttribute(`tip`)??``;e===`tool`||r===`new`||r===``||t.push({id:r,icon:n.getAttribute(`icon`)??void 0,label:n.getAttribute(`tip`)??void 0,kind:`sprinkle`,hue:n.getAttribute(`hue`)??void 0})}for(let t of e)t.remove();this.#e.length===0&&(this.#e=t)}#o(e){return zn.some(t=>t.id===e)?`tool`:e===Bn.id?`sprinkle`:this.#e.find(t=>t.id===e)?.kind??`tool`}#s(e,t){let n=e.id,r=Wn(e.kind),i=e.icon??``,a=e.label??n,o=t!=null&&t===n,s=e.hue;return E(`slicc-dock-item`,{"data-t":n,"item-id":n,kind:r,icon:i||!1,tip:a,hue:s||!1,active:o})}#c(){let e=this.active,t=[];for(let n of this.#e)Wn(n.kind)===`sprinkle`&&t.push(this.#s(n,e));if(t.push(this.#s(Bn,e)),t.push(E(`div`,{class:`grow`})),this.systemTools){t.push(E(`div`,{class:`div`}));for(let n of zn)t.push(this.#s(n,e))}this.replaceChildren(),T(this,t)}#l(){let e=this.active;for(let t of this.querySelectorAll(`slicc-dock-item`))t.toggleAttribute(`active`,t.dataset.t===e)}#u(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.selectItem(t))}#d(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.active!==t&&(this.active=t),this.collapse())}#f(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.active!==t&&this.selectItem(t),this.dispatchEvent(new CustomEvent(`slicc-dock-longpress`,{detail:{id:t,kind:this.#o(t)},bubbles:!0,composed:!0})))}#p(e){let t=e.detail;if(t&&typeof t.id==`string`)return t.id;let n=e.target?.closest(`slicc-dock-item`);return n&&this.contains(n)?n.dataset.t??null:null}});var Gn=D(`
2284
+ `,Gn=`slicc-dock-style`;function Kn(e){if(e.getElementById(Gn))return;let t=e.createElement(`style`);t.id=Gn,t.textContent=Wn,(e.head??e.documentElement).appendChild(t)}function qn(e){return e===`sprinkle`?`sprinkle`:`tool`}S(`slicc-dock`,class extends HTMLElement{static get observedAttributes(){return[`active`,`system-tools`]}#e=[];#t=null;#n=null;#r=null;#i=!1;connectedCallback(){Kn(this.ownerDocument),this.classList.add(`slicc-dock`),this.setAttribute(`part`,`rail`),this.setAttribute(`role`,`toolbar`),this.setAttribute(`aria-orientation`,`vertical`),this.#i||=(this.#a(),!0),this.#t||(this.#t=e=>this.#u(e),this.#n=e=>this.#d(e),this.#r=e=>this.#f(e),this.addEventListener(`select`,this.#t),this.addEventListener(`collapse`,this.#n),this.addEventListener(`longpress`,this.#r)),this.#c()}disconnectedCallback(){this.#t&&=(this.removeEventListener(`select`,this.#t),null),this.#n&&=(this.removeEventListener(`collapse`,this.#n),null),this.#r&&=(this.removeEventListener(`longpress`,this.#r),null)}attributeChangedCallback(e){this.#i&&(e===`active`?this.#l():e===`system-tools`&&this.#c())}get items(){return this.#e.map(e=>({...e}))}set items(e){this.#e=Array.isArray(e)?e.map(e=>({...e})):[],this.#i&&this.isConnected&&this.#c()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get systemTools(){return this.hasAttribute(`system-tools`)}set systemTools(e){this.toggleAttribute(`system-tools`,!!e)}selectItem(e){this.active=e,this.dispatchEvent(new CustomEvent(`slicc-dock-select`,{detail:{id:e,kind:this.#o(e)},bubbles:!0,composed:!0}))}clearActive(){this.active=null}collapse(){let e=this.active;this.active=null,e!=null&&this.dispatchEvent(new CustomEvent(`slicc-dock-collapse`,{detail:{id:e},bubbles:!0,composed:!0}))}#a(){let e=[...this.querySelectorAll(`slicc-dock-item`)];if(e.length===0)return;let t=[];for(let n of e){let e=qn(n.getAttribute(`kind`)),r=n.getAttribute(`item-id`)??n.dataset.t??n.getAttribute(`tip`)??``;e===`tool`||r===`new`||r===``||t.push({id:r,icon:n.getAttribute(`icon`)??void 0,label:n.getAttribute(`tip`)??void 0,kind:`sprinkle`,hue:n.getAttribute(`hue`)??void 0})}for(let t of e)t.remove();this.#e.length===0&&(this.#e=t)}#o(e){return Hn.some(t=>t.id===e)?`tool`:e===Un.id?`sprinkle`:this.#e.find(t=>t.id===e)?.kind??`tool`}#s(e,t){let n=e.id,r=qn(e.kind),i=e.icon??``,a=e.label??n,o=t!=null&&t===n,s=e.hue;return w(`slicc-dock-item`,{"data-t":n,"item-id":n,kind:r,icon:i||!1,tip:a,hue:s||!1,active:o})}#c(){let e=this.active,t=[];for(let n of this.#e)qn(n.kind)===`sprinkle`&&t.push(this.#s(n,e));if(t.push(this.#s(Un,e)),t.push(w(`div`,{class:`grow`})),this.systemTools){t.push(w(`div`,{class:`div`}));for(let n of Hn)t.push(this.#s(n,e))}this.replaceChildren(),C(this,t)}#l(){let e=this.active;for(let t of this.querySelectorAll(`slicc-dock-item`))t.toggleAttribute(`active`,t.dataset.t===e)}#u(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.selectItem(t))}#d(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.active!==t&&(this.active=t),this.collapse())}#f(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.active!==t&&this.selectItem(t),this.dispatchEvent(new CustomEvent(`slicc-dock-longpress`,{detail:{id:t,kind:this.#o(t)},bubbles:!0,composed:!0})))}#p(e){let t=e.detail;if(t&&typeof t.id==`string`)return t.id;let n=e.target?.closest(`slicc-dock-item`);return n&&this.contains(n)?n.dataset.t??null:null}});var Jn=T(`
2285
2285
  :host { display: none; }
2286
2286
  :host([open]) { display: block; }
2287
2287
  .overlay {
@@ -2358,7 +2358,7 @@ slicc-input-card .toolbar slicc-add-menu {
2358
2358
  color: rgba(255,255,255,.7); font-family: var(--ui); font-size: 14px;
2359
2359
  }
2360
2360
  @media (prefers-reduced-motion: reduce) { .overlay, .card { transition: none; } }
2361
- `),Kn=`Open tabs`;w(`slicc-tab-overlay`,class extends HTMLElement{static observedAttributes=[`open`,`heading`];#e;#t=[];#n=null;#r=null;#i=e=>{e.key===`Escape`&&this.open&&(e.stopPropagation(),this.#u(`escape`))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Gn]}connectedCallback(){this.#s(),this.#c()}disconnectedCallback(){document.removeEventListener(`keydown`,this.#i,!0)}attributeChangedCallback(e){this.isConnected&&(e===`open`?this.#c():this.#s())}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,!!e)}get heading(){return this.getAttribute(`heading`)??Kn}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get tabs(){return this.#t.map(e=>({...e}))}set tabs(e){this.#t=Array.isArray(e)?e.map(e=>({...e})):[],this.isConnected&&this.#s()}show(){this.open||=!0}hide(){this.open&&this.#u(`api`)}#a(){let e=E(`button`,{class:`close`,part:`close`,type:`button`,"aria-label":`Close tabs overlay`},n(`x`,{size:18}));return e.addEventListener(`click`,()=>this.#u(`close-button`)),e}#o(e){let t=e.title??e.id,r=e.screenshot?E(`img`,{class:`shot`,part:`shot`,src:e.screenshot,alt:t,loading:`lazy`}):E(`div`,{class:`shot ph`,part:`shot`},n(`globe`,{size:28})),i=E(`button`,{class:`x`,part:`card-close`,type:`button`,"aria-label":`Close ${t}`},n(`x`,{size:14}));i.addEventListener(`click`,t=>{t.stopPropagation(),this.#l(`tab-close`,e.id)});let a=E(`div`,{class:`label`},E(`span`,{class:`name`,part:`title`},t),e.url?E(`span`,{class:`url`},e.url):null),o=E(`div`,{class:e.active?`card on`:`card`,part:`card`,role:`button`,tabindex:`0`,"data-tab-id":e.id,"aria-label":t,"aria-current":e.active?`true`:!1},r,E(`div`,{class:`meta`},a,i));return o.addEventListener(`click`,()=>this.#l(`tab-activate`,e.id)),o.addEventListener(`keydown`,t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),this.#l(`tab-activate`,e.id))}),o}#s(){let e=E(`div`,{class:`bar`,part:`bar`},E(`span`,{class:`title`},this.heading),E(`span`,{class:`count`},String(this.#t.length)),E(`span`,{class:`grow`}),this.#a()),t;if(this.#t.length===0)t=E(`div`,{class:`empty`},`No open tabs.`);else{t=E(`div`,{class:`grid`,part:`grid`,role:`list`});for(let e of this.#t)t.appendChild(this.#o(e))}this.#n=E(`div`,{class:`overlay`,part:`overlay`},e,t),this.#n.addEventListener(`mousedown`,e=>{e.target===this.#n&&this.#u(`backdrop`)}),this.#e.replaceChildren(this.#n)}#c(){this.open?(this.#r=this.getRootNode().activeElement,document.addEventListener(`keydown`,this.#i,!0),requestAnimationFrame(()=>this.#n?.querySelector(`.close`)?.focus())):(document.removeEventListener(`keydown`,this.#i,!0),this.#r?.focus?.(),this.#r=null)}#l(e,t){this.dispatchEvent(new CustomEvent(e,{detail:{id:t},bubbles:!0,composed:!0}))}#u(e){this.open=!1,this.dispatchEvent(new CustomEvent(`overlay-close`,{detail:{reason:e},bubbles:!0,composed:!0}))}});var z=`#3b6cb2`,qn=`
2361
+ `),Yn=`Open tabs`;S(`slicc-tab-overlay`,class extends HTMLElement{static observedAttributes=[`open`,`heading`];#e;#t=[];#n=null;#r=null;#i=e=>{e.key===`Escape`&&this.open&&(e.stopPropagation(),this.#u(`escape`))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Jn]}connectedCallback(){this.#s(),this.#c()}disconnectedCallback(){document.removeEventListener(`keydown`,this.#i,!0)}attributeChangedCallback(e){this.isConnected&&(e===`open`?this.#c():this.#s())}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,!!e)}get heading(){return this.getAttribute(`heading`)??Yn}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get tabs(){return this.#t.map(e=>({...e}))}set tabs(e){this.#t=Array.isArray(e)?e.map(e=>({...e})):[],this.isConnected&&this.#s()}show(){this.open||=!0}hide(){this.open&&this.#u(`api`)}#a(){let e=w(`button`,{class:`close`,part:`close`,type:`button`,"aria-label":`Close tabs overlay`},n(`x`,{size:18}));return e.addEventListener(`click`,()=>this.#u(`close-button`)),e}#o(e){let t=e.title??e.id,r=e.screenshot?w(`img`,{class:`shot`,part:`shot`,src:e.screenshot,alt:t,loading:`lazy`}):w(`div`,{class:`shot ph`,part:`shot`},n(`globe`,{size:28})),i=w(`button`,{class:`x`,part:`card-close`,type:`button`,"aria-label":`Close ${t}`},n(`x`,{size:14}));i.addEventListener(`click`,t=>{t.stopPropagation(),this.#l(`tab-close`,e.id)});let a=w(`div`,{class:`label`},w(`span`,{class:`name`,part:`title`},t),e.url?w(`span`,{class:`url`},e.url):null),o=w(`div`,{class:e.active?`card on`:`card`,part:`card`,role:`button`,tabindex:`0`,"data-tab-id":e.id,"aria-label":t,"aria-current":e.active?`true`:!1},r,w(`div`,{class:`meta`},a,i));return o.addEventListener(`click`,()=>this.#l(`tab-activate`,e.id)),o.addEventListener(`keydown`,t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),this.#l(`tab-activate`,e.id))}),o}#s(){let e=w(`div`,{class:`bar`,part:`bar`},w(`span`,{class:`title`},this.heading),w(`span`,{class:`count`},String(this.#t.length)),w(`span`,{class:`grow`}),this.#a()),t;if(this.#t.length===0)t=w(`div`,{class:`empty`},`No open tabs.`);else{t=w(`div`,{class:`grid`,part:`grid`,role:`list`});for(let e of this.#t)t.appendChild(this.#o(e))}this.#n=w(`div`,{class:`overlay`,part:`overlay`},e,t),this.#n.addEventListener(`mousedown`,e=>{e.target===this.#n&&this.#u(`backdrop`)}),this.#e.replaceChildren(this.#n)}#c(){this.open?(this.#r=this.getRootNode().activeElement,document.addEventListener(`keydown`,this.#i,!0),requestAnimationFrame(()=>this.#n?.querySelector(`.close`)?.focus())):(document.removeEventListener(`keydown`,this.#i,!0),this.#r?.focus?.(),this.#r=null)}#l(e,t){this.dispatchEvent(new CustomEvent(e,{detail:{id:t},bubbles:!0,composed:!0}))}#u(e){this.open=!1,this.dispatchEvent(new CustomEvent(`overlay-close`,{detail:{reason:e},bubbles:!0,composed:!0}))}});var L=`#3b6cb2`,Xn=`
2362
2362
  .slicc-freezer {
2363
2363
  position: fixed;
2364
2364
  left: 0;
@@ -2442,12 +2442,12 @@ slicc-input-card .toolbar slicc-add-menu {
2442
2442
 
2443
2443
  /* ice-blue accent while a freezer context is active (prototype _ctxAccent) —
2444
2444
  tints the toggle + the new-chat icon; cards keep their snow palette. */
2445
- .slicc-freezer[ctx] .fztgl { color: var(--fz-ctx, ${z}); border-color: color-mix(in srgb, var(--fz-ctx, ${z}) 40%, var(--line)); }
2445
+ .slicc-freezer[ctx] .fztgl { color: var(--fz-ctx, ${L}); border-color: color-mix(in srgb, var(--fz-ctx, ${L}) 40%, var(--line)); }
2446
2446
  .slicc-freezer[ctx] ::part(new-icon),
2447
2447
  .slicc-freezer[ctx] slicc-freezer-new::part(new-icon) {
2448
- background: color-mix(in srgb, var(--fz-ctx, ${z}) 14%, var(--canvas));
2449
- border-color: color-mix(in srgb, var(--fz-ctx, ${z}) 40%, var(--line));
2450
- color: var(--fz-ctx, ${z});
2448
+ background: color-mix(in srgb, var(--fz-ctx, ${L}) 14%, var(--canvas));
2449
+ border-color: color-mix(in srgb, var(--fz-ctx, ${L}) 40%, var(--line));
2450
+ color: var(--fz-ctx, ${L});
2451
2451
  }
2452
2452
 
2453
2453
  /* match-hidden: search filtered a session row out (only meaningful when open,
@@ -2455,7 +2455,7 @@ slicc-input-card .toolbar slicc-add-menu {
2455
2455
  prototype .fzcard row. */
2456
2456
  .slicc-freezer[open] slicc-freezer-card.match-hidden,
2457
2457
  .slicc-freezer[open] .fzcard.match-hidden { display: none; }
2458
- `,Jn=`slicc-freezer-style`;function Yn(e){if(e.getElementById(Jn))return;let t=e.createElement(`style`);t.id=Jn,t.textContent=qn,(e.head??e.documentElement).appendChild(t)}var B=`http://www.w3.org/2000/svg`;function Xn(){let e=document.createElementNS(B,`svg`);for(let[t,n]of[[`width`,`14`],[`height`,`14`],[`viewBox`,`0 0 16 16`],[`fill`,`none`],[`stroke`,`currentColor`],[`stroke-width`,`1.6`],[`stroke-linecap`,`round`],[`stroke-linejoin`,`round`],[`aria-hidden`,`true`]])e.setAttribute(t,n);let t=document.createElementNS(B,`rect`);for(let[e,n]of[[`x`,`2.5`],[`y`,`3.5`],[`width`,`11`],[`height`,`9`],[`rx`,`1.5`]])t.setAttribute(e,n);let n=document.createElementNS(B,`line`);for(let[e,t]of[[`x1`,`6`],[`y1`,`3.5`],[`x2`,`6`],[`y2`,`12.5`]])n.setAttribute(e,t);let r=document.createElementNS(B,`polyline`);return r.setAttribute(`points`,`9,6.5 10.5,8 9,9.5`),e.append(t,n,r),e}w(`slicc-freezer`,class extends HTMLElement{static observedAttributes=[`open`,`ctx`,`search-placeholder`];#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){Yn(this.ownerDocument),this.classList.add(`slicc-freezer`),this.setAttribute(`part`,`freezer`),this.hasAttribute(`aria-label`)||this.setAttribute(`aria-label`,`Past sessions (freezer)`),this.#s(),this.#l(),this.#u()}disconnectedCallback(){this.#a&&this.#t&&(this.#t.removeEventListener(`click`,this.#a),this.#a=null),this.#o&&this.#n&&(this.#n.removeEventListener(`input`,this.#o),this.#o=null)}attributeChangedCallback(e,t,n){this.#i&&(e===`open`?(this.#l(),this.#u()):e===`search-placeholder`&&(this.#n.placeholder=n??`search past sessions`))}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get ctx(){return this.hasAttribute(`ctx`)}set ctx(e){this.toggleAttribute(`ctx`,e)}get searchPlaceholder(){return this.getAttribute(`search-placeholder`)??`search past sessions`}set searchPlaceholder(e){e==null?this.removeAttribute(`search-placeholder`):this.setAttribute(`search-placeholder`,e)}get query(){return this.#i?this.#n.value:``}set query(e){this.#s(),this.#n.value=e,this.#d()}get rail(){return this.#s(),this.#r}toggle(e){let t=e??!this.open;t===this.open&&this.#l(),this.open=t,this.#l(),this.#u(),this.dispatchEvent(new CustomEvent(`freezer-toggle`,{detail:{open:t},bubbles:!0,composed:!0}))}append(...e){this.#s(),this.#r.append(...e),this.#u()}#s(){if(this.#i)return;let e=this.querySelector(`:scope > .fzh`),t=this.querySelector(`:scope > .fzrail`);if(e instanceof HTMLElement&&t instanceof HTMLElement){this.#c(e,t);return}let n=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&(e.classList.contains(`fzh`)||e.classList.contains(`fzrail`)))),r=this.ownerDocument,i=r.createElement(`div`);i.className=`fzh`,i.setAttribute(`part`,`header`);let a=r.createElement(`button`);a.className=`fztgl`,a.type=`button`,a.setAttribute(`part`,`toggle`),a.setAttribute(`aria-label`,`Toggle freezer`),a.append(Xn());let o=r.createElement(`input`);o.className=`fzsearch`,o.type=`text`,o.setAttribute(`part`,`search`),o.placeholder=this.searchPlaceholder,o.setAttribute(`aria-label`,`Search past sessions`),i.append(a,o);let s=r.createElement(`div`);s.className=`fzrail`,s.setAttribute(`part`,`rail`);for(let e of n)s.appendChild(e);this.replaceChildren(i,s),this.#c(i,s)}#c(e,t){this.#i=!0,this.#e=e,this.#r=t;let n=e.querySelector(`.fztgl`),r=e.querySelector(`.fzsearch`);n&&(this.#t=n),r&&(this.#n=r),this.#t&&!this.#a&&(this.#a=()=>this.toggle(),this.#t.addEventListener(`click`,this.#a)),this.#n&&!this.#o&&(this.#o=()=>this.#d(),this.#n.addEventListener(`input`,this.#o))}#l(){if(!this.#t)return;let e=this.open;this.#t.setAttribute(`aria-expanded`,e?`true`:`false`),this.#t.title=e?`Collapse freezer`:`Expand freezer`}#u(){if(!this.#i)return;let e=this.open,t=this.#r.querySelectorAll(`slicc-freezer-card, slicc-freezer-new`);for(let n of t)n.toggleAttribute(`expanded`,e)}#d(){let e=this.#n.value.trim().toLowerCase(),t=this.#r.querySelectorAll(`slicc-freezer-card, .fzcard`);for(let n of t){let t=(n.textContent??``).toLowerCase();n.classList.toggle(`match-hidden`,e.length>0&&!t.includes(e))}}});var Zn=14,Qn=D(`
2458
+ `,Zn=`slicc-freezer-style`;function Qn(e){if(e.getElementById(Zn))return;let t=e.createElement(`style`);t.id=Zn,t.textContent=Xn,(e.head??e.documentElement).appendChild(t)}var R=`http://www.w3.org/2000/svg`;function $n(){let e=document.createElementNS(R,`svg`);for(let[t,n]of[[`width`,`14`],[`height`,`14`],[`viewBox`,`0 0 16 16`],[`fill`,`none`],[`stroke`,`currentColor`],[`stroke-width`,`1.6`],[`stroke-linecap`,`round`],[`stroke-linejoin`,`round`],[`aria-hidden`,`true`]])e.setAttribute(t,n);let t=document.createElementNS(R,`rect`);for(let[e,n]of[[`x`,`2.5`],[`y`,`3.5`],[`width`,`11`],[`height`,`9`],[`rx`,`1.5`]])t.setAttribute(e,n);let n=document.createElementNS(R,`line`);for(let[e,t]of[[`x1`,`6`],[`y1`,`3.5`],[`x2`,`6`],[`y2`,`12.5`]])n.setAttribute(e,t);let r=document.createElementNS(R,`polyline`);return r.setAttribute(`points`,`9,6.5 10.5,8 9,9.5`),e.append(t,n,r),e}S(`slicc-freezer`,class extends HTMLElement{static observedAttributes=[`open`,`ctx`,`search-placeholder`];#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){Qn(this.ownerDocument),this.classList.add(`slicc-freezer`),this.setAttribute(`part`,`freezer`),this.hasAttribute(`aria-label`)||this.setAttribute(`aria-label`,`Past sessions (freezer)`),this.#s(),this.#l(),this.#u()}disconnectedCallback(){this.#a&&this.#t&&(this.#t.removeEventListener(`click`,this.#a),this.#a=null),this.#o&&this.#n&&(this.#n.removeEventListener(`input`,this.#o),this.#o=null)}attributeChangedCallback(e,t,n){this.#i&&(e===`open`?(this.#l(),this.#u()):e===`search-placeholder`&&(this.#n.placeholder=n??`search past sessions`))}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get ctx(){return this.hasAttribute(`ctx`)}set ctx(e){this.toggleAttribute(`ctx`,e)}get searchPlaceholder(){return this.getAttribute(`search-placeholder`)??`search past sessions`}set searchPlaceholder(e){e==null?this.removeAttribute(`search-placeholder`):this.setAttribute(`search-placeholder`,e)}get query(){return this.#i?this.#n.value:``}set query(e){this.#s(),this.#n.value=e,this.#d()}get rail(){return this.#s(),this.#r}toggle(e){let t=e??!this.open;t===this.open&&this.#l(),this.open=t,this.#l(),this.#u(),this.dispatchEvent(new CustomEvent(`freezer-toggle`,{detail:{open:t},bubbles:!0,composed:!0}))}append(...e){this.#s(),this.#r.append(...e),this.#u()}#s(){if(this.#i)return;let e=this.querySelector(`:scope > .fzh`),t=this.querySelector(`:scope > .fzrail`);if(e instanceof HTMLElement&&t instanceof HTMLElement){this.#c(e,t);return}let n=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&(e.classList.contains(`fzh`)||e.classList.contains(`fzrail`)))),r=this.ownerDocument,i=r.createElement(`div`);i.className=`fzh`,i.setAttribute(`part`,`header`);let a=r.createElement(`button`);a.className=`fztgl`,a.type=`button`,a.setAttribute(`part`,`toggle`),a.setAttribute(`aria-label`,`Toggle freezer`),a.append($n());let o=r.createElement(`input`);o.className=`fzsearch`,o.type=`text`,o.setAttribute(`part`,`search`),o.placeholder=this.searchPlaceholder,o.setAttribute(`aria-label`,`Search past sessions`),i.append(a,o);let s=r.createElement(`div`);s.className=`fzrail`,s.setAttribute(`part`,`rail`);for(let e of n)s.appendChild(e);this.replaceChildren(i,s),this.#c(i,s)}#c(e,t){this.#i=!0,this.#e=e,this.#r=t;let n=e.querySelector(`.fztgl`),r=e.querySelector(`.fzsearch`);n&&(this.#t=n),r&&(this.#n=r),this.#t&&!this.#a&&(this.#a=()=>this.toggle(),this.#t.addEventListener(`click`,this.#a)),this.#n&&!this.#o&&(this.#o=()=>this.#d(),this.#n.addEventListener(`input`,this.#o))}#l(){if(!this.#t)return;let e=this.open;this.#t.setAttribute(`aria-expanded`,e?`true`:`false`),this.#t.title=e?`Collapse freezer`:`Expand freezer`}#u(){if(!this.#i)return;let e=this.open,t=this.#r.querySelectorAll(`slicc-freezer-card, slicc-freezer-new`);for(let n of t)n.toggleAttribute(`expanded`,e)}#d(){let e=this.#n.value.trim().toLowerCase(),t=this.#r.querySelectorAll(`slicc-freezer-card, .fzcard`);for(let n of t){let t=(n.textContent??``).toLowerCase();n.classList.toggle(`match-hidden`,e.length>0&&!t.includes(e))}}});var er=14,tr=T(`
2459
2459
  :host {
2460
2460
  display: inline-grid;
2461
2461
  place-items: center;
@@ -2491,7 +2491,7 @@ slicc-input-card .toolbar slicc-add-menu {
2491
2491
  nothing is slotted */
2492
2492
  ::slotted(*), .ic { line-height: 1; }
2493
2493
  .ic { display: block; }
2494
- `);w(`slicc-snowflake`,class extends HTMLElement{static observedAttributes=[`thawed`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Qn];let e=E(`span`,{class:`snow`,part:`badge`},E(`slot`,null,n(`snowflake`,{size:Zn,part:`glyph`,class:`ic`})));this.#e.replaceChildren(e)}get thawed(){return this.hasAttribute(`thawed`)}set thawed(e){this.toggleAttribute(`thawed`,e)}});var $n=`
2494
+ `);S(`slicc-snowflake`,class extends HTMLElement{static observedAttributes=[`thawed`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[tr];let e=w(`span`,{class:`snow`,part:`badge`},w(`slot`,null,n(`snowflake`,{size:er,part:`glyph`,class:`ic`})));this.#e.replaceChildren(e)}get thawed(){return this.hasAttribute(`thawed`)}set thawed(e){this.toggleAttribute(`thawed`,e)}});var nr=`
2495
2495
  slicc-freezer-card {
2496
2496
  position: relative;
2497
2497
  display: flex;
@@ -2584,7 +2584,7 @@ slicc-freezer-card .slicc-fzcard__meta {
2584
2584
  slicc-freezer-card[thawed] {
2585
2585
  background: color-mix(in srgb, var(--rose) 12%, transparent);
2586
2586
  }
2587
- `,er=`slicc-freezer-card-style`;function tr(e){if(e.getElementById(er))return;let t=e.createElement(`style`);t.id=er,t.textContent=$n,(e.head??e.documentElement).appendChild(t)}var nr=1400,rr=14;w(`slicc-freezer-card`,class extends HTMLElement{static observedAttributes=[`title`,`meta`,`slug`,`icon`,`thawed`];#e;#t;#n;#r;#i=null;#a=null;#o=!1;#s=null;#c=()=>this.#u();#l=()=>{if(!this.#i)return;let e=this.getBoundingClientRect();this.#i.style.setProperty(`--tip-x`,`${e.right+8}px`),this.#i.style.setProperty(`--tip-y`,`${e.top+e.height/2}px`)};connectedCallback(){tr(this.ownerDocument),this.#d(),this.#f()}disconnectedCallback(){this.removeEventListener(`click`,this.#c),this.removeEventListener(`pointerenter`,this.#l),this.removeEventListener(`focusin`,this.#l),this.#s!=null&&(clearTimeout(this.#s),this.#s=null)}attributeChangedCallback(e,t,n){t===n||!this.#o||(e===`thawed`?this.#e.toggleAttribute(`thawed`,n!==null):e===`icon`?this.#p():this.#f())}get title(){return this.getAttribute(`title`)??``}set title(e){e==null?this.removeAttribute(`title`):this.setAttribute(`title`,e)}get meta(){return this.getAttribute(`meta`)??``}set meta(e){e==null?this.removeAttribute(`meta`):this.setAttribute(`meta`,e)}get slug(){return this.getAttribute(`slug`)??``}set slug(e){e==null?this.removeAttribute(`slug`):this.setAttribute(`slug`,e)}get icon(){return this.getAttribute(`icon`)}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get expanded(){return this.hasAttribute(`expanded`)}set expanded(e){this.toggleAttribute(`expanded`,e)}get thawed(){return this.hasAttribute(`thawed`)}set thawed(e){this.toggleAttribute(`thawed`,e)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){this.toggleAttribute(`hidden`,e)}get badge(){return this.#d(),this.#e}#u(){this.dispatchEvent(new CustomEvent(`freezer-card-select`,{bubbles:!0,composed:!0,detail:{slug:this.slug}})),this.flashThaw()}flashThaw(e=nr){this.#s!=null&&clearTimeout(this.#s),this.thawed=!0,this.#s=setTimeout(()=>{this.thawed=!1,this.#s=null},e)}#d(){if(this.#o)return;this.#o=!0;let e=this.querySelector(`:scope > .slicc-fzcard__text`);if(e instanceof HTMLElement){this.#t=e,this.#n=e.querySelector(`.slicc-fzcard__title`),this.#r=e.querySelector(`.slicc-fzcard__meta`),this.#e=this.querySelector(`:scope > slicc-snowflake`),this.#i=this.querySelector(`:scope > .slicc-fzcard__tip`),this.addEventListener(`click`,this.#c),this.addEventListener(`pointerenter`,this.#l),this.addEventListener(`focusin`,this.#l);return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`slicc-snowflake`),this.#e.setAttribute(`part`,`badge`),this.#n=E(`div`,{class:`slicc-fzcard__title`,part:`title`}),this.#r=E(`div`,{class:`slicc-fzcard__meta`,part:`meta`}),this.#t=E(`div`,{class:`slicc-fzcard__text`,part:`text`},this.#n,this.#r);for(let e of t)this.#n.appendChild(e);this.#i=E(`span`,{class:`slicc-fzcard__tip`,part:`tip`,"aria-hidden":`true`}),this.replaceChildren(this.#e,this.#t,this.#i),this.addEventListener(`click`,this.#c),this.addEventListener(`pointerenter`,this.#l),this.addEventListener(`focusin`,this.#l)}#f(){if(!this.#o)return;let e=this.getAttribute(`title`);e!=null&&(this.#n.textContent=e),this.#r.textContent=this.meta,this.#i&&(this.#i.textContent=e??(this.#n.textContent||``)),this.#e.toggleAttribute(`thawed`,this.thawed),this.#p()}#p(){if(!this.#o)return;let e=this.getAttribute(`icon`);if(e){let t=n(e,{size:rr,class:`ic`,part:`icon`});this.#a?this.#a.replaceWith(t):this.#e.appendChild(t),this.#a=t}else this.#a&&=(this.#a.remove(),null)}});var ir=`square-pen`,ar=`loader-circle`,or=16,sr=`New chat`,cr=350,lr=[[`save`,`archive`,`Save & start new`],[`skip`,`fast-forward`,`New chat — skip memory`],[`erase`,`trash-2`,`Erase & start new`]],ur=D(`
2587
+ `,rr=`slicc-freezer-card-style`;function ir(e){if(e.getElementById(rr))return;let t=e.createElement(`style`);t.id=rr,t.textContent=nr,(e.head??e.documentElement).appendChild(t)}var ar=1400,or=14;S(`slicc-freezer-card`,class extends HTMLElement{static observedAttributes=[`title`,`meta`,`slug`,`icon`,`thawed`];#e;#t;#n;#r;#i=null;#a=null;#o=!1;#s=null;#c=()=>this.#u();#l=()=>{if(!this.#i)return;let e=this.getBoundingClientRect();this.#i.style.setProperty(`--tip-x`,`${e.right+8}px`),this.#i.style.setProperty(`--tip-y`,`${e.top+e.height/2}px`)};connectedCallback(){ir(this.ownerDocument),this.#d(),this.#f()}disconnectedCallback(){this.removeEventListener(`click`,this.#c),this.removeEventListener(`pointerenter`,this.#l),this.removeEventListener(`focusin`,this.#l),this.#s!=null&&(clearTimeout(this.#s),this.#s=null)}attributeChangedCallback(e,t,n){t===n||!this.#o||(e===`thawed`?this.#e.toggleAttribute(`thawed`,n!==null):e===`icon`?this.#p():this.#f())}get title(){return this.getAttribute(`title`)??``}set title(e){e==null?this.removeAttribute(`title`):this.setAttribute(`title`,e)}get meta(){return this.getAttribute(`meta`)??``}set meta(e){e==null?this.removeAttribute(`meta`):this.setAttribute(`meta`,e)}get slug(){return this.getAttribute(`slug`)??``}set slug(e){e==null?this.removeAttribute(`slug`):this.setAttribute(`slug`,e)}get icon(){return this.getAttribute(`icon`)}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get expanded(){return this.hasAttribute(`expanded`)}set expanded(e){this.toggleAttribute(`expanded`,e)}get thawed(){return this.hasAttribute(`thawed`)}set thawed(e){this.toggleAttribute(`thawed`,e)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){this.toggleAttribute(`hidden`,e)}get badge(){return this.#d(),this.#e}#u(){this.dispatchEvent(new CustomEvent(`freezer-card-select`,{bubbles:!0,composed:!0,detail:{slug:this.slug}})),this.flashThaw()}flashThaw(e=ar){this.#s!=null&&clearTimeout(this.#s),this.thawed=!0,this.#s=setTimeout(()=>{this.thawed=!1,this.#s=null},e)}#d(){if(this.#o)return;this.#o=!0;let e=this.querySelector(`:scope > .slicc-fzcard__text`);if(e instanceof HTMLElement){this.#t=e,this.#n=e.querySelector(`.slicc-fzcard__title`),this.#r=e.querySelector(`.slicc-fzcard__meta`),this.#e=this.querySelector(`:scope > slicc-snowflake`),this.#i=this.querySelector(`:scope > .slicc-fzcard__tip`),this.addEventListener(`click`,this.#c),this.addEventListener(`pointerenter`,this.#l),this.addEventListener(`focusin`,this.#l);return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`slicc-snowflake`),this.#e.setAttribute(`part`,`badge`),this.#n=w(`div`,{class:`slicc-fzcard__title`,part:`title`}),this.#r=w(`div`,{class:`slicc-fzcard__meta`,part:`meta`}),this.#t=w(`div`,{class:`slicc-fzcard__text`,part:`text`},this.#n,this.#r);for(let e of t)this.#n.appendChild(e);this.#i=w(`span`,{class:`slicc-fzcard__tip`,part:`tip`,"aria-hidden":`true`}),this.replaceChildren(this.#e,this.#t,this.#i),this.addEventListener(`click`,this.#c),this.addEventListener(`pointerenter`,this.#l),this.addEventListener(`focusin`,this.#l)}#f(){if(!this.#o)return;let e=this.getAttribute(`title`);e!=null&&(this.#n.textContent=e),this.#r.textContent=this.meta,this.#i&&(this.#i.textContent=e??(this.#n.textContent||``)),this.#e.toggleAttribute(`thawed`,this.thawed),this.#p()}#p(){if(!this.#o)return;let e=this.getAttribute(`icon`);if(e){let t=n(e,{size:or,class:`ic`,part:`icon`});this.#a?this.#a.replaceWith(t):this.#e.appendChild(t),this.#a=t}else this.#a&&=(this.#a.remove(),null)}});var sr=`square-pen`,cr=`loader-circle`,lr=16,ur=`New chat`,dr=350,fr=[[`save`,`archive`,`Save & start new`],[`skip`,`fast-forward`,`New chat — skip memory`],[`erase`,`trash-2`,`Erase & start new`]],pr=T(`
2588
2588
  :host { display: block; }
2589
2589
  :host([hidden]) { display: none; }
2590
2590
  *{ box-sizing: border-box; }
@@ -2729,19 +2729,19 @@ slicc-freezer-card[thawed] {
2729
2729
  .fznew, .nlbl { transition: none; }
2730
2730
  .fznew-spinner svg { animation: none; }
2731
2731
  }
2732
- `);w(`slicc-freezer-new`,class extends HTMLElement{static observedAttributes=[`expanded`,`label`,`busy`,`progress`];#e;#t=null;#n=null;#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ur]}connectedCallback(){this.#a()}disconnectedCallback(){this.#n?.destroy(),this.#n=null,this.#c()}attributeChangedCallback(e){e===`progress`&&this.#i()||this.isConnected&&this.#a()}get expanded(){return this.hasAttribute(`expanded`)}set expanded(e){this.toggleAttribute(`expanded`,e)}get label(){return this.getAttribute(`label`)??sr}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get busy(){return this.hasAttribute(`busy`)}set busy(e){this.toggleAttribute(`busy`,e)}get progress(){let e=this.getAttribute(`progress`);if(e==null)return null;let t=Number.parseFloat(e);return Number.isFinite(t)?Math.min(1,Math.max(0,t)):null}set progress(e){e==null?this.removeAttribute(`progress`):this.setAttribute(`progress`,String(Math.min(1,Math.max(0,e))))}#i(){let e=this.#e.querySelector(`.fznew-ring`);return!e||!this.busy||!this.hasAttribute(`progress`)?!1:(e.style.setProperty(`--fznew-progress`,String(this.progress??0)),!0)}#a(){let e=this.label,t=this.busy,r=t&&this.hasAttribute(`progress`),i=E(`span`,{class:`nico`,part:`badge`},t?E(`span`,{class:`fznew-spinner`,part:`spinner`},r?E(`span`,{class:`fznew-ring`,part:`ring`,style:`--fznew-progress:${this.progress??0}`}):null,n(ar,{size:or,part:`icon`})):E(`slot`,{name:`icon`},n(ir,{size:or,part:`icon`}))),a=E(`span`,{class:`nlbl`,part:`label`},E(`slot`,null,e)),o=E(`button`,{class:`fznew`,part:`button`,type:`button`,"aria-label":e,title:e,"aria-busy":t?`true`:void 0},i,a);this.#t=o,this.#s(o),this.#e.replaceChildren(o,this.#o())}#o(){let e=E(`div`,{class:`fznew-options`,part:`options`});for(let[t,r,i]of lr){let a=E(`button`,{class:`fznew-opt fznew-opt--${t}`,part:`option-${t}`,type:`button`},n(r,{size:13}),E(`span`,{class:`fznew-opt__text`},i));a.addEventListener(`click`,()=>this.#l(t)),e.appendChild(a)}return e}#s(e){this.#n?.destroy(),this.#c(),this.#n=Fn(e,{onLongPress:()=>{if(this.#r!==null){this.#c(),this.#l(`skip`);return}this.#l(`erase`)},onShortClick:()=>{if(this.#r!==null){this.#c(),this.#l(`skip`);return}this.#r=setTimeout(()=>{this.#r=null,this.#l(`save`)},cr)}})}#c(){this.#r!==null&&(clearTimeout(this.#r),this.#r=null)}#l(e){e===`save`&&(this.busy=!0),this.dispatchEvent(new CustomEvent(`new-chat-${e}`,{bubbles:!0,composed:!0}))}});var dr=`attribute vec2 a_pos; void main(){ gl_Position = vec4(a_pos,0.0,1.0); }`,fr=`precision highp float;
2732
+ `);S(`slicc-freezer-new`,class extends HTMLElement{static observedAttributes=[`expanded`,`label`,`busy`,`progress`];#e;#t=null;#n=null;#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[pr]}connectedCallback(){this.#a()}disconnectedCallback(){this.#n?.destroy(),this.#n=null,this.#c()}attributeChangedCallback(e){e===`progress`&&this.#i()||this.isConnected&&this.#a()}get expanded(){return this.hasAttribute(`expanded`)}set expanded(e){this.toggleAttribute(`expanded`,e)}get label(){return this.getAttribute(`label`)??ur}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get busy(){return this.hasAttribute(`busy`)}set busy(e){this.toggleAttribute(`busy`,e)}get progress(){let e=this.getAttribute(`progress`);if(e==null)return null;let t=Number.parseFloat(e);return Number.isFinite(t)?Math.min(1,Math.max(0,t)):null}set progress(e){e==null?this.removeAttribute(`progress`):this.setAttribute(`progress`,String(Math.min(1,Math.max(0,e))))}#i(){let e=this.#e.querySelector(`.fznew-ring`);return!e||!this.busy||!this.hasAttribute(`progress`)?!1:(e.style.setProperty(`--fznew-progress`,String(this.progress??0)),!0)}#a(){let e=this.label,t=this.busy,r=t&&this.hasAttribute(`progress`),i=w(`span`,{class:`nico`,part:`badge`},t?w(`span`,{class:`fznew-spinner`,part:`spinner`},r?w(`span`,{class:`fznew-ring`,part:`ring`,style:`--fznew-progress:${this.progress??0}`}):null,n(cr,{size:lr,part:`icon`})):w(`slot`,{name:`icon`},n(sr,{size:lr,part:`icon`}))),a=w(`span`,{class:`nlbl`,part:`label`},w(`slot`,null,e)),o=w(`button`,{class:`fznew`,part:`button`,type:`button`,"aria-label":e,title:e,"aria-busy":t?`true`:void 0},i,a);this.#t=o,this.#s(o),this.#e.replaceChildren(o,this.#o())}#o(){let e=w(`div`,{class:`fznew-options`,part:`options`});for(let[t,r,i]of fr){let a=w(`button`,{class:`fznew-opt fznew-opt--${t}`,part:`option-${t}`,type:`button`},n(r,{size:13}),w(`span`,{class:`fznew-opt__text`},i));a.addEventListener(`click`,()=>this.#l(t)),e.appendChild(a)}return e}#s(e){this.#n?.destroy(),this.#c(),this.#n=I(e,{onLongPress:()=>{if(this.#r!==null){this.#c(),this.#l(`skip`);return}this.#l(`erase`)},onShortClick:()=>{if(this.#r!==null){this.#c(),this.#l(`skip`);return}this.#r=setTimeout(()=>{this.#r=null,this.#l(`save`)},dr)}})}#c(){this.#r!==null&&(clearTimeout(this.#r),this.#r=null)}#l(e){e===`save`&&(this.busy=!0),this.dispatchEvent(new CustomEvent(`new-chat-${e}`,{bubbles:!0,composed:!0}))}});var mr=`attribute vec2 a_pos; void main(){ gl_Position = vec4(a_pos,0.0,1.0); }`,z=`precision highp float;
2733
2733
  uniform vec2 u_res; uniform float u_time; uniform float u_energy;
2734
2734
  uniform vec2 u_center; uniform vec3 u_evt; uniform float u_freeze; uniform float u_dark;
2735
2735
  uniform float u_density; uniform float u_falloff; uniform float u_life;
2736
2736
  uniform float u_blink; uniform float u_thick; uniform vec3 u_tint; uniform float u_scroll;
2737
2737
  uniform float u_brightness; uniform float u_contrast; uniform float u_noise; uniform float u_blur;
2738
- vec3 themeBg(){ return mix(vec3(0.97,0.95,0.89), vec3(0.09,0.08,0.06), u_dark); }`,V=`
2738
+ vec3 themeBg(){ return mix(vec3(0.97,0.95,0.89), vec3(0.09,0.08,0.06), u_dark); }`,B=`
2739
2739
  float hash21(vec2 p){ p=fract(p*vec2(123.34,456.21)); p+=dot(p,p+45.32); return fract(p.x*p.y); }
2740
2740
  float vnoise(vec2 p){ vec2 i=floor(p),f=fract(p);
2741
2741
  float a=hash21(i),b=hash21(i+vec2(1.,0.)),c=hash21(i+vec2(0.,1.)),d=hash21(i+vec2(1.,1.));
2742
2742
  vec2 u=f*f*(3.-2.*f); return mix(mix(a,b,u.x),mix(c,d,u.x),u.y); }
2743
2743
  float fbm(vec2 p){ float v=0.,a=0.5; for(int i=0;i<5;i++){ v+=a*vnoise(p); p=p*2.02+vec2(7.1,3.7); a*=0.5;} return v; }
2744
- vec2 warp(vec2 p, float t){ float a=fbm(p+vec2(0.0,1.7)+t*0.10); float b=fbm(p+vec2(5.2,1.3)-t*0.08); return p+0.85*vec2(a,b); }`,pr={cone:`${fr}${V}
2744
+ vec2 warp(vec2 p, float t){ float a=fbm(p+vec2(0.0,1.7)+t*0.10); float b=fbm(p+vec2(5.2,1.3)-t*0.08); return p+0.85*vec2(a,b); }`,hr={cone:`${z}${B}
2745
2745
  float cellCycle(vec2 q){ float s=hash21(q+11.7);
2746
2746
  return 0.5+0.32*sin(u_time*u_blink+s*6.2831)+0.18*sin(u_time*0.6*u_blink+s*19.0); }
2747
2747
  void main(){
@@ -2789,7 +2789,7 @@ void main(){
2789
2789
  col*=u_brightness;
2790
2790
  col=clamp(col,0.0,1.0);
2791
2791
  gl_FragColor=vec4(col,1.0);
2792
- }`,scoop:`${fr}${V}
2792
+ }`,scoop:`${z}${B}
2793
2793
  vec3 pal(float t){ vec3 strawberry=vec3(1.0,0.45,0.62); vec3 vanilla=vec3(1.0,0.95,0.82);
2794
2794
  vec3 pistachio=vec3(0.60,0.86,0.52);
2795
2795
  vec3 col=mix(strawberry,vanilla,smoothstep(0.0,0.5,t)); col=mix(col,pistachio,smoothstep(0.5,1.0,t)); return col; }
@@ -2808,7 +2808,7 @@ void main(){
2808
2808
  ice*=0.95+0.08*sin(u_time*0.4); float mask=smoothstep(0.62,0.0,r);
2809
2809
  vec3 col=mix(bg,ice,clamp(mask,0.0,1.0)*0.80); col+=ice*mask*hl*0.12;
2810
2810
  gl_FragColor=vec4(col,1.0);
2811
- }`,freezer:`${fr}${V}
2811
+ }`,freezer:`${z}${B}
2812
2812
  /* Inside-of-a-freezer ground: icy WHITE in light mode (never the warm theme
2813
2813
  canvas — blue-on-beige read as sand, not frost), cold blue-black in dark. */
2814
2814
  vec3 freezerBg(){ return mix(vec3(0.965,0.98,1.0), vec3(0.05,0.08,0.13), u_dark); }
@@ -2835,12 +2835,12 @@ void main(){
2835
2835
  deviation budget the cone lattice uses (strokes at 0.20 toward tint). */
2836
2836
  col=mix(freezerBg(),col,0.22);
2837
2837
  gl_FragColor=vec4(col,1.0);
2838
- }`},mr=new Set([`cone`,`scoop`,`freezer`]),hr={cone:`radial-gradient(120% 120% at 35% 45%, color-mix(in srgb,#e0a866 40%,var(--bg)) 0%, var(--bg) 60%)`,scoop:`radial-gradient(120% 120% at 40% 50%, color-mix(in srgb,#ff9bc0 40%,var(--bg)) 0%, var(--bg) 62%)`,freezer:`radial-gradient(120% 120% at 0% 100%, color-mix(in srgb,#7fb0e6 55%,var(--bg)) 0%, var(--bg) 70%)`},gr=D(`
2838
+ }`},gr=new Set([`cone`,`scoop`,`freezer`]),_r={cone:`radial-gradient(120% 120% at 35% 45%, color-mix(in srgb,#e0a866 40%,var(--bg)) 0%, var(--bg) 60%)`,scoop:`radial-gradient(120% 120% at 40% 50%, color-mix(in srgb,#ff9bc0 40%,var(--bg)) 0%, var(--bg) 62%)`,freezer:`radial-gradient(120% 120% at 0% 100%, color-mix(in srgb,#7fb0e6 55%,var(--bg)) 0%, var(--bg) 70%)`},vr=T(`
2839
2839
  :host { position: relative; display: block; pointer-events: none; }
2840
2840
  .canvas, .fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
2841
2841
  .fallback { display: none; }
2842
2842
  :host([no-webgl]) .canvas { display: none; }
2843
- :host([no-webgl]) .fallback { display: block; }`),_r=2,vr=.35,yr=[`u_res`,`u_scroll`,`u_time`,`u_energy`,`u_center`,`u_evt`,`u_freeze`,`u_dark`,`u_density`,`u_falloff`,`u_life`,`u_blink`,`u_thick`,`u_tint`,`u_brightness`,`u_contrast`,`u_noise`,`u_blur`];function H(e,t,n,r){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):r}function br(e,t){if(!e||typeof getComputedStyle!=`function`)return t;let n=document.createElement(`span`);n.style.color=e,n.style.display=`none`,document.body.appendChild(n);let r=getComputedStyle(n).color;n.remove();let i=r.match(/[\d.]+/g)?.map(Number);return!i||i.length<3?t:[i[0]/255,i[1]/255,i[2]/255]}var xr=class extends HTMLElement{static observedAttributes=[`mode`,`tint`,`coverage`,`intensity`,`scroll`,`brightness`,`contrast`,`noise`,`blur`];#e;#t=null;#n=null;#r=null;#i={};#a=null;#o={};#s=-1;#c=0;#l=0;#u=0;#d=null;#f=!1;#p=[.545,.361,.965];#m=[.957,.247,.369];#h=0;#g=null;#_=null;#v=null;#y=null;#b=null;#x=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[gr];let e=E(`canvas`,{class:`canvas`,part:`canvas`}),t=E(`div`,{class:`fallback`,part:`fallback`,"aria-hidden":`true`});this.#e.replaceChildren(e,t),this.#t=e}connectedCallback(){if(this.#f=typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,this.#S(),!this.#k()){this.setAttribute(`no-webgl`,``);return}this.removeAttribute(`no-webgl`),typeof ResizeObserver<`u`&&(this.#d=new ResizeObserver(()=>this.#C()),this.#d.observe(this)),this.#w(),this.#T(),this.#l=performance.now()/1e3,this.#f?this.#F():this.#I()}disconnectedCallback(){this.#L(),this.#d?.disconnect(),this.#d=null,this.#g?.disconnect(),this.#g=null,this.#_&&this.#v&&this.#_.removeEventListener(`change`,this.#v),this.#_=null,this.#v=null,this.#R()}attributeChangedCallback(e){if(this.isConnected){if(e===`tint`&&this.#w(),e===`mode`&&this.#n&&this.mode!==this.#y&&this.#O()){this.#F(),this.#S();return}this.#S(),this.#C()}}get mode(){let e=this.getAttribute(`mode`);return e&&mr.has(e)?e:`cone`}set mode(e){this.setAttribute(`mode`,e)}get coverage(){return H(Number.parseFloat(this.getAttribute(`coverage`)??``),0,1,.66)}set coverage(e){this.setAttribute(`coverage`,String(e))}get intensity(){return H(Number.parseFloat(this.getAttribute(`intensity`)??``),0,4,1)}set intensity(e){this.setAttribute(`intensity`,String(e))}get scrollOffset(){let e=Number.parseFloat(this.getAttribute(`scroll`)??``);return Number.isFinite(e)?e:0}set scrollOffset(e){this.setAttribute(`scroll`,String(e))}get brightness(){return H(Number.parseFloat(this.getAttribute(`brightness`)??``),.5,1.5,1.2)}set brightness(e){this.setAttribute(`brightness`,String(e))}get contrast(){return H(Number.parseFloat(this.getAttribute(`contrast`)??``),.5,2,.75)}set contrast(e){this.setAttribute(`contrast`,String(e))}get noise(){return H(Number.parseFloat(this.getAttribute(`noise`)??``),0,.3,.04)}set noise(e){this.setAttribute(`noise`,String(e))}get blurAmount(){return H(Number.parseFloat(this.getAttribute(`blur`)??``),0,1,.09)}set blurAmount(e){this.setAttribute(`blur`,String(e))}get noWebgl(){return this.hasAttribute(`no-webgl`)}pulse(e=1){this.#u=Math.min(1.4,this.#u+e),this.#f&&this.#F()}#S(){let e=this.#e.querySelector(`.fallback`);e&&(e.style.background=hr[this.mode])}#C(){this.#f&&this.#n&&this.#F()}#w(){let e=this.getAttribute(`tint`)??``;this.#p=br(e,[.545,.361,.965]),this.#m=br(e,[.957,.247,.369]),this.#h=this.#P()}#T(){let e=()=>{this.#w(),this.#C()};if(typeof MutationObserver<`u`){this.#g=new MutationObserver(e);for(let e of[document.documentElement,document.body])e&&this.#g.observe(e,{attributes:!0,attributeFilter:[`class`,`data-theme`]})}typeof matchMedia==`function`&&(this.#_=matchMedia(`(prefers-color-scheme: dark)`),this.#v=e,this.#_.addEventListener(`change`,this.#v))}#E(e,t,n){let r=e.createShader(t);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(e.deleteShader(r),null)):null}#D(e){let t=this.#n;if(!t)return null;let n=this.#E(t,t.VERTEX_SHADER,dr),r=this.#E(t,t.FRAGMENT_SHADER,pr[e]);if(!n||!r)return n&&t.deleteShader(n),r&&t.deleteShader(r),null;let i=t.createProgram();if(!i)return t.deleteShader(n),t.deleteShader(r),null;if(t.attachShader(i,n),t.attachShader(i,r),t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))return t.deleteProgram(i),t.deleteShader(n),t.deleteShader(r),null;let a=t.getAttribLocation(i,`a_pos`),o={};for(let e of yr)o[e]=t.getUniformLocation(i,e);return{program:i,vs:n,fs:r,aPos:a,loc:o}}#O(){let e=this.#n;if(!e)return!1;let t=this.mode,n=this.#i[t];if(!n){let e=this.#D(t);if(!e)return!1;this.#i[t]=e,n=e}return this.#r=n.program,this.#s=n.aPos,this.#o=n.loc,e.useProgram(n.program),this.#y=t,!0}#k(){let e=this.#t;if(!e)return!1;let t={premultipliedAlpha:!0,alpha:!0,antialias:!0},n=null;try{n=e.getContext(`webgl`,t)??e.getContext(`experimental-webgl`,t)}catch{n=null}return n?(this.#n=n,this.#j(e),this.#A()):!1}#A(){let e=this.#n;if(!e)return!1;if(!this.#O())return this.#n=null,!1;let t=e.createBuffer();return t?(this.#a=t,e.bindBuffer(e.ARRAY_BUFFER,t),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),e.STATIC_DRAW),!0):(this.#n=null,!1)}#j(e){this.#M(e),this.#b=e=>{e.preventDefault(),this.#L(),this.#i={},this.#r=null,this.#y=null,this.#o={},this.#a=null},this.#x=()=>{!this.isConnected||!this.#n||(this.#i={},this.#A()&&(this.#l=performance.now()/1e3,this.#f?this.#F():this.#I()))},e.addEventListener(`webglcontextlost`,this.#b,!1),e.addEventListener(`webglcontextrestored`,this.#x,!1)}#M(e){this.#b&&e.removeEventListener(`webglcontextlost`,this.#b),this.#x&&e.removeEventListener(`webglcontextrestored`,this.#x),this.#b=null,this.#x=null}#N(){let e=this.#t;if(!e)return;let t=Math.min(_r,typeof window<`u`&&window.devicePixelRatio||1),n=Math.max(1,e.clientWidth*t|0),r=Math.max(1,e.clientHeight*t|0);(e.width!==n||e.height!==r)&&(e.width=n,e.height=r)}#P(){if(typeof getComputedStyle!=`function`)return 0;let e=getComputedStyle(this).getPropertyValue(`--ink`).trim();if(!e)return 0;let[t,n,r]=br(e,[0,0,0]);return+(.2126*t+.7152*n+.0722*r>.5)}#F(){let e=this.#n,t=this.#t,n=this.#r;if(!e||!t||!n||!this.#a)return;this.#N();let r=performance.now()/1e3-this.#l,i=.5+.5*Math.sin(r*.12),a=.5+.5*Math.sin(r*.097+1),o=.2*(1-i)+.46*i,s=.74*(1-a)+.3*a,c=this.#h,l=this.#p,u=this.#m;e.viewport(0,0,t.width,t.height),e.useProgram(n),e.bindBuffer(e.ARRAY_BUFFER,this.#a),e.enableVertexAttribArray(this.#s),e.vertexAttribPointer(this.#s,2,e.FLOAT,!1,0,0);let d=this.#o;e.uniform2f(d.u_res??null,t.width,t.height),e.uniform1f(d.u_time??null,r),e.uniform1f(d.u_energy??null,this.#u),e.uniform2f(d.u_center??null,o,s),e.uniform3f(d.u_evt??null,u[0],u[1],u[2]),e.uniform1f(d.u_freeze??null,H(this.coverage*this.intensity,0,1,.66)*2.2),e.uniform1f(d.u_dark??null,c),e.uniform1f(d.u_scroll??null,this.scrollOffset*vr/Math.max(1,t.clientHeight||t.height)),e.uniform1f(d.u_density??null,.29),e.uniform1f(d.u_falloff??null,.3),e.uniform1f(d.u_life??null,.35),e.uniform1f(d.u_blink??null,.05),e.uniform1f(d.u_thick??null,.02),e.uniform3f(d.u_tint??null,l[0],l[1],l[2]),e.uniform1f(d.u_brightness??null,this.brightness),e.uniform1f(d.u_contrast??null,this.contrast),e.uniform1f(d.u_noise??null,this.noise),e.uniform1f(d.u_blur??null,this.blurAmount),e.drawArrays(e.TRIANGLES,0,3),this.#u*=.95,this.#u<.001&&(this.#u=0)}#I(){if(this.#c)return;let e=()=>{this.#F(),this.#c=requestAnimationFrame(e)};this.#c=requestAnimationFrame(e)}#L(){this.#c&&cancelAnimationFrame(this.#c),this.#c=0}#R(){let e=this.#n,t=this.#t;if(t&&this.#M(t),e){this.#a&&e.deleteBuffer(this.#a);for(let t of Object.values(this.#i))t&&(e.deleteProgram(t.program),e.deleteShader(t.vs),e.deleteShader(t.fs));e.getExtension(`WEBGL_lose_context`)?.loseContext()}this.#n=null,this.#r=null,this.#i={},this.#o={},this.#a=null,this.#y=null}};w(`slicc-shader`,xr),w(`slicc-frost-shader`,class extends xr{connectedCallback(){this.getAttribute(`mode`)!==`freezer`&&this.setAttribute(`mode`,`freezer`),super.connectedCallback()}});var Sr=new Set([`user`,`feedback`,`project`]),Cr={user:{hue:`--rose`,label:`user`},feedback:{hue:`--cyan`,label:`feedback`},project:{hue:`--violet`,label:`project`}};function wr(e){return e===`feedback`||e===`project`?e:`user`}var Tr=D(`
2843
+ :host([no-webgl]) .fallback { display: block; }`),yr=2,br=.35,xr=[`u_res`,`u_scroll`,`u_time`,`u_energy`,`u_center`,`u_evt`,`u_freeze`,`u_dark`,`u_density`,`u_falloff`,`u_life`,`u_blink`,`u_thick`,`u_tint`,`u_brightness`,`u_contrast`,`u_noise`,`u_blur`];function V(e,t,n,r){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):r}function H(e,t){if(!e||typeof getComputedStyle!=`function`)return t;let n=document.createElement(`span`);n.style.color=e,n.style.display=`none`,document.body.appendChild(n);let r=getComputedStyle(n).color;n.remove();let i=r.match(/[\d.]+/g)?.map(Number);return!i||i.length<3?t:[i[0]/255,i[1]/255,i[2]/255]}var Sr=class extends HTMLElement{static observedAttributes=[`mode`,`tint`,`coverage`,`intensity`,`scroll`,`brightness`,`contrast`,`noise`,`blur`];#e;#t=null;#n=null;#r=null;#i={};#a=null;#o={};#s=-1;#c=0;#l=0;#u=0;#d=null;#f=!1;#p=[.545,.361,.965];#m=[.957,.247,.369];#h=0;#g=null;#_=null;#v=null;#y=null;#b=null;#x=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[vr];let e=w(`canvas`,{class:`canvas`,part:`canvas`}),t=w(`div`,{class:`fallback`,part:`fallback`,"aria-hidden":`true`});this.#e.replaceChildren(e,t),this.#t=e}connectedCallback(){if(this.#f=typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,this.#S(),!this.#k()){this.setAttribute(`no-webgl`,``);return}this.removeAttribute(`no-webgl`),typeof ResizeObserver<`u`&&(this.#d=new ResizeObserver(()=>this.#C()),this.#d.observe(this)),this.#w(),this.#T(),this.#l=performance.now()/1e3,this.#f?this.#F():this.#I()}disconnectedCallback(){this.#L(),this.#d?.disconnect(),this.#d=null,this.#g?.disconnect(),this.#g=null,this.#_&&this.#v&&this.#_.removeEventListener(`change`,this.#v),this.#_=null,this.#v=null,this.#R()}attributeChangedCallback(e){if(this.isConnected){if(e===`tint`&&this.#w(),e===`mode`&&this.#n&&this.mode!==this.#y&&this.#O()){this.#F(),this.#S();return}this.#S(),this.#C()}}get mode(){let e=this.getAttribute(`mode`);return e&&gr.has(e)?e:`cone`}set mode(e){this.setAttribute(`mode`,e)}get coverage(){return V(Number.parseFloat(this.getAttribute(`coverage`)??``),0,1,.66)}set coverage(e){this.setAttribute(`coverage`,String(e))}get intensity(){return V(Number.parseFloat(this.getAttribute(`intensity`)??``),0,4,1)}set intensity(e){this.setAttribute(`intensity`,String(e))}get scrollOffset(){let e=Number.parseFloat(this.getAttribute(`scroll`)??``);return Number.isFinite(e)?e:0}set scrollOffset(e){this.setAttribute(`scroll`,String(e))}get brightness(){return V(Number.parseFloat(this.getAttribute(`brightness`)??``),.5,1.5,1.2)}set brightness(e){this.setAttribute(`brightness`,String(e))}get contrast(){return V(Number.parseFloat(this.getAttribute(`contrast`)??``),.5,2,.75)}set contrast(e){this.setAttribute(`contrast`,String(e))}get noise(){return V(Number.parseFloat(this.getAttribute(`noise`)??``),0,.3,.04)}set noise(e){this.setAttribute(`noise`,String(e))}get blurAmount(){return V(Number.parseFloat(this.getAttribute(`blur`)??``),0,1,.09)}set blurAmount(e){this.setAttribute(`blur`,String(e))}get noWebgl(){return this.hasAttribute(`no-webgl`)}pulse(e=1){this.#u=Math.min(1.4,this.#u+e),this.#f&&this.#F()}#S(){let e=this.#e.querySelector(`.fallback`);e&&(e.style.background=_r[this.mode])}#C(){this.#f&&this.#n&&this.#F()}#w(){let e=this.getAttribute(`tint`)??``;this.#p=H(e,[.545,.361,.965]),this.#m=H(e,[.957,.247,.369]),this.#h=this.#P()}#T(){let e=()=>{this.#w(),this.#C()};if(typeof MutationObserver<`u`){this.#g=new MutationObserver(e);for(let e of[document.documentElement,document.body])e&&this.#g.observe(e,{attributes:!0,attributeFilter:[`class`,`data-theme`]})}typeof matchMedia==`function`&&(this.#_=matchMedia(`(prefers-color-scheme: dark)`),this.#v=e,this.#_.addEventListener(`change`,this.#v))}#E(e,t,n){let r=e.createShader(t);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(e.deleteShader(r),null)):null}#D(e){let t=this.#n;if(!t)return null;let n=this.#E(t,t.VERTEX_SHADER,mr),r=this.#E(t,t.FRAGMENT_SHADER,hr[e]);if(!n||!r)return n&&t.deleteShader(n),r&&t.deleteShader(r),null;let i=t.createProgram();if(!i)return t.deleteShader(n),t.deleteShader(r),null;if(t.attachShader(i,n),t.attachShader(i,r),t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))return t.deleteProgram(i),t.deleteShader(n),t.deleteShader(r),null;let a=t.getAttribLocation(i,`a_pos`),o={};for(let e of xr)o[e]=t.getUniformLocation(i,e);return{program:i,vs:n,fs:r,aPos:a,loc:o}}#O(){let e=this.#n;if(!e)return!1;let t=this.mode,n=this.#i[t];if(!n){let e=this.#D(t);if(!e)return!1;this.#i[t]=e,n=e}return this.#r=n.program,this.#s=n.aPos,this.#o=n.loc,e.useProgram(n.program),this.#y=t,!0}#k(){let e=this.#t;if(!e)return!1;let t={premultipliedAlpha:!0,alpha:!0,antialias:!0},n=null;try{n=e.getContext(`webgl`,t)??e.getContext(`experimental-webgl`,t)}catch{n=null}return n?(this.#n=n,this.#j(e),this.#A()):!1}#A(){let e=this.#n;if(!e)return!1;if(!this.#O())return this.#n=null,!1;let t=e.createBuffer();return t?(this.#a=t,e.bindBuffer(e.ARRAY_BUFFER,t),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),e.STATIC_DRAW),!0):(this.#n=null,!1)}#j(e){this.#M(e),this.#b=e=>{e.preventDefault(),this.#L(),this.#i={},this.#r=null,this.#y=null,this.#o={},this.#a=null},this.#x=()=>{!this.isConnected||!this.#n||(this.#i={},this.#A()&&(this.#l=performance.now()/1e3,this.#f?this.#F():this.#I()))},e.addEventListener(`webglcontextlost`,this.#b,!1),e.addEventListener(`webglcontextrestored`,this.#x,!1)}#M(e){this.#b&&e.removeEventListener(`webglcontextlost`,this.#b),this.#x&&e.removeEventListener(`webglcontextrestored`,this.#x),this.#b=null,this.#x=null}#N(){let e=this.#t;if(!e)return;let t=Math.min(yr,typeof window<`u`&&window.devicePixelRatio||1),n=Math.max(1,e.clientWidth*t|0),r=Math.max(1,e.clientHeight*t|0);(e.width!==n||e.height!==r)&&(e.width=n,e.height=r)}#P(){if(typeof getComputedStyle!=`function`)return 0;let e=getComputedStyle(this).getPropertyValue(`--ink`).trim();if(!e)return 0;let[t,n,r]=H(e,[0,0,0]);return+(.2126*t+.7152*n+.0722*r>.5)}#F(){let e=this.#n,t=this.#t,n=this.#r;if(!e||!t||!n||!this.#a)return;this.#N();let r=performance.now()/1e3-this.#l,i=.5+.5*Math.sin(r*.12),a=.5+.5*Math.sin(r*.097+1),o=.2*(1-i)+.46*i,s=.74*(1-a)+.3*a,c=this.#h,l=this.#p,u=this.#m;e.viewport(0,0,t.width,t.height),e.useProgram(n),e.bindBuffer(e.ARRAY_BUFFER,this.#a),e.enableVertexAttribArray(this.#s),e.vertexAttribPointer(this.#s,2,e.FLOAT,!1,0,0);let d=this.#o;e.uniform2f(d.u_res??null,t.width,t.height),e.uniform1f(d.u_time??null,r),e.uniform1f(d.u_energy??null,this.#u),e.uniform2f(d.u_center??null,o,s),e.uniform3f(d.u_evt??null,u[0],u[1],u[2]),e.uniform1f(d.u_freeze??null,V(this.coverage*this.intensity,0,1,.66)*2.2),e.uniform1f(d.u_dark??null,c),e.uniform1f(d.u_scroll??null,this.scrollOffset*br/Math.max(1,t.clientHeight||t.height)),e.uniform1f(d.u_density??null,.29),e.uniform1f(d.u_falloff??null,.3),e.uniform1f(d.u_life??null,.35),e.uniform1f(d.u_blink??null,.05),e.uniform1f(d.u_thick??null,.02),e.uniform3f(d.u_tint??null,l[0],l[1],l[2]),e.uniform1f(d.u_brightness??null,this.brightness),e.uniform1f(d.u_contrast??null,this.contrast),e.uniform1f(d.u_noise??null,this.noise),e.uniform1f(d.u_blur??null,this.blurAmount),e.drawArrays(e.TRIANGLES,0,3),this.#u*=.95,this.#u<.001&&(this.#u=0)}#I(){if(this.#c)return;let e=()=>{this.#F(),this.#c=requestAnimationFrame(e)};this.#c=requestAnimationFrame(e)}#L(){this.#c&&cancelAnimationFrame(this.#c),this.#c=0}#R(){let e=this.#n,t=this.#t;if(t&&this.#M(t),e){this.#a&&e.deleteBuffer(this.#a);for(let t of Object.values(this.#i))t&&(e.deleteProgram(t.program),e.deleteShader(t.vs),e.deleteShader(t.fs));e.getExtension(`WEBGL_lose_context`)?.loseContext()}this.#n=null,this.#r=null,this.#i={},this.#o={},this.#a=null,this.#y=null}};S(`slicc-shader`,Sr),S(`slicc-frost-shader`,class extends Sr{connectedCallback(){this.getAttribute(`mode`)!==`freezer`&&this.setAttribute(`mode`,`freezer`),super.connectedCallback()}});var Cr=new Set([`user`,`feedback`,`project`]),wr={user:{hue:`--rose`,label:`user`},feedback:{hue:`--cyan`,label:`feedback`},project:{hue:`--violet`,label:`project`}};function Tr(e){return e===`feedback`||e===`project`?e:`user`}var Er=T(`
2844
2844
  :host {
2845
2845
  display: inline-flex;
2846
2846
  vertical-align: middle;
@@ -2862,13 +2862,13 @@ void main(){
2862
2862
  background: color-mix(in srgb, var(--mtag-hue, var(--rose)) var(--mtag-fill), var(--canvas));
2863
2863
  border: 1px solid color-mix(in srgb, var(--mtag-hue, var(--rose)) var(--mtag-border), var(--line));
2864
2864
  }
2865
- `),Er=`slicc-memtag-dark`,Dr=`
2865
+ `),Dr=`slicc-memtag-dark`,Or=`
2866
2866
  .dark slicc-memtag,
2867
2867
  [data-theme="dark"] slicc-memtag {
2868
2868
  --mtag-fill: 22%;
2869
2869
  --mtag-border: 38%;
2870
2870
  }
2871
- `;function Or(e){if(e.getElementById(Er))return;let t=e.createElement(`style`);t.id=Er,t.textContent=Dr,(e.head??e.documentElement).appendChild(t)}w(`slicc-memtag`,class extends HTMLElement{static observedAttributes=[`type`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Tr]}connectedCallback(){Or(this.ownerDocument),this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get type(){return wr(this.getAttribute(`type`))}set type(e){this.setAttribute(`type`,Sr.has(e)?e:`user`)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let{hue:e,label:t}=Cr[this.type],n=this.label??E(`slot`,null,t),r=E(`span`,{class:`mtag`,part:`tag`,style:`--mtag-hue:var(${e})`},n);this.#e.replaceChildren(r)}});var kr=`
2871
+ `;function kr(e){if(e.getElementById(Dr))return;let t=e.createElement(`style`);t.id=Dr,t.textContent=Or,(e.head??e.documentElement).appendChild(t)}S(`slicc-memtag`,class extends HTMLElement{static observedAttributes=[`type`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Er]}connectedCallback(){kr(this.ownerDocument),this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get type(){return Tr(this.getAttribute(`type`))}set type(e){this.setAttribute(`type`,Cr.has(e)?e:`user`)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let{hue:e,label:t}=wr[this.type],n=this.label??w(`slot`,null,t),r=w(`span`,{class:`mtag`,part:`tag`,style:`--mtag-hue:var(${e})`},n);this.#e.replaceChildren(r)}});var Ar=`
2872
2872
  slicc-memrow {
2873
2873
  display: block;
2874
2874
  border: 1px solid var(--line);
@@ -2942,7 +2942,7 @@ slicc-memrow.fresh {
2942
2942
  background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
2943
2943
  border-color: color-mix(in srgb, var(--violet) 38%, var(--line));
2944
2944
  }
2945
- `,Ar=`slicc-memrow-style`;function jr(e){if(e.getElementById(Ar))return;let t=e.createElement(`style`);t.id=Ar,t.textContent=kr,(e.head??e.documentElement).appendChild(t)}function Mr(e){return e===`feedback`||e===`project`?e:`user`}w(`slicc-memrow`,class extends HTMLElement{static get observedAttributes(){return[`title`,`summary`,`tag`,`fresh`]}#e=!1;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;connectedCallback(){jr(this.ownerDocument),this.#e||this.#s(),this.#c(),this.#l()}disconnectedCallback(){this.#u()}attributeChangedCallback(){this.#e&&this.#c()}get title(){return this.getAttribute(`title`)??``}set title(e){e==null?this.removeAttribute(`title`):this.setAttribute(`title`,e)}get summary(){return this.getAttribute(`summary`)??``}set summary(e){e==null?this.removeAttribute(`summary`):this.setAttribute(`summary`,e)}get tag(){return Mr(this.getAttribute(`tag`))}set tag(e){this.setAttribute(`tag`,e)}get fresh(){return this.hasAttribute(`fresh`)}set fresh(e){this.toggleAttribute(`fresh`,e)}#s(){this.#e=!0;let e=this.ownerDocument.createElement(`div`);e.className=`mt`;let t=this.ownerDocument.createElement(`b`),n=this.ownerDocument.createElement(`slicc-memtag`);e.append(t,n);let r=this.ownerDocument.createElement(`div`);for(r.className=`ms`;this.firstChild;)r.appendChild(this.firstChild);this.append(e,r),this.#t=e,this.#n=t,this.#r=n,this.#i=r}#c(){let e=this.#n,t=this.#r,n=this.#i;if(!e||!t||!n)return;e.textContent=this.title;let r=this.tag;t.className=``,t.setAttribute(`type`,r),t.textContent=``;let i=n.firstChild,a=this.summary;i&&i.nodeType===Node.TEXT_NODE?i.textContent=a:a&&n.insertBefore(this.ownerDocument.createTextNode(a),i),this.classList.toggle(`fresh`,this.fresh)}#l(){this.#a||(this.#a=e=>this.#d(e),this.addEventListener(`click`,this.#a)),this.#o||(this.#o=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.#d(e))},this.addEventListener(`keydown`,this.#o))}#u(){this.#a&&=(this.removeEventListener(`click`,this.#a),null),this.#o&&=(this.removeEventListener(`keydown`,this.#o),null)}#d(e){this.dispatchEvent(new CustomEvent(`select`,{bubbles:!0,composed:!0,detail:{title:this.title,summary:this.summary,tag:this.tag,sourceEvent:e}}))}});var Nr=`
2945
+ `,jr=`slicc-memrow-style`;function Mr(e){if(e.getElementById(jr))return;let t=e.createElement(`style`);t.id=jr,t.textContent=Ar,(e.head??e.documentElement).appendChild(t)}function Nr(e){return e===`feedback`||e===`project`?e:`user`}S(`slicc-memrow`,class extends HTMLElement{static get observedAttributes(){return[`title`,`summary`,`tag`,`fresh`]}#e=!1;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;connectedCallback(){Mr(this.ownerDocument),this.#e||this.#s(),this.#c(),this.#l()}disconnectedCallback(){this.#u()}attributeChangedCallback(){this.#e&&this.#c()}get title(){return this.getAttribute(`title`)??``}set title(e){e==null?this.removeAttribute(`title`):this.setAttribute(`title`,e)}get summary(){return this.getAttribute(`summary`)??``}set summary(e){e==null?this.removeAttribute(`summary`):this.setAttribute(`summary`,e)}get tag(){return Nr(this.getAttribute(`tag`))}set tag(e){this.setAttribute(`tag`,e)}get fresh(){return this.hasAttribute(`fresh`)}set fresh(e){this.toggleAttribute(`fresh`,e)}#s(){this.#e=!0;let e=this.ownerDocument.createElement(`div`);e.className=`mt`;let t=this.ownerDocument.createElement(`b`),n=this.ownerDocument.createElement(`slicc-memtag`);e.append(t,n);let r=this.ownerDocument.createElement(`div`);for(r.className=`ms`;this.firstChild;)r.appendChild(this.firstChild);this.append(e,r),this.#t=e,this.#n=t,this.#r=n,this.#i=r}#c(){let e=this.#n,t=this.#r,n=this.#i;if(!e||!t||!n)return;e.textContent=this.title;let r=this.tag;t.className=``,t.setAttribute(`type`,r),t.textContent=``;let i=n.firstChild,a=this.summary;i&&i.nodeType===Node.TEXT_NODE?i.textContent=a:a&&n.insertBefore(this.ownerDocument.createTextNode(a),i),this.classList.toggle(`fresh`,this.fresh)}#l(){this.#a||(this.#a=e=>this.#d(e),this.addEventListener(`click`,this.#a)),this.#o||(this.#o=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.#d(e))},this.addEventListener(`keydown`,this.#o))}#u(){this.#a&&=(this.removeEventListener(`click`,this.#a),null),this.#o&&=(this.removeEventListener(`keydown`,this.#o),null)}#d(e){this.dispatchEvent(new CustomEvent(`select`,{bubbles:!0,composed:!0,detail:{title:this.title,summary:this.summary,tag:this.tag,sourceEvent:e}}))}});var Pr=`
2946
2946
  slicc-palette-grid {
2947
2947
  display: block;
2948
2948
  flex: 1;
@@ -2961,7 +2961,7 @@ slicc-palette-grid .palgrid {
2961
2961
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
2962
2962
  gap: 10px;
2963
2963
  }
2964
- `,Pr=`slicc-palette-grid-style`;function Fr(e){if(e.getElementById(Pr))return;let t=e.createElement(`style`);t.id=Pr,t.textContent=Nr,(e.head??e.documentElement).appendChild(t)}var Ir=[{label:`canvas #faf6f1`,color:`#faf6f1`},{label:`cone #ef7000`,color:`#ef7000`},{label:`scoop #8b5cf6`,color:`#8b5cf6`},{label:`scoop #06b6d4`,color:`#06b6d4`},{label:`scoop #f43f5e`,color:`#f43f5e`},{label:`ink #0a0a0a`,color:`#0a0a0a`}],Lr=`brand palette · tokens`;w(`slicc-palette-grid`,class extends HTMLElement{static get observedAttributes(){return[`heading`]}#e=!1;#t=null;#n=null;#r=[];#i=null;#a=null;connectedCallback(){Fr(this.ownerDocument),this.#e||this.#o(),this.#s(),this.#l()}disconnectedCallback(){this.#u()}attributeChangedCallback(){this.#e&&this.#s()}get heading(){return this.getAttribute(`heading`)??Lr}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get tokens(){return(this.#i??Ir).map(e=>({...e}))}set tokens(e){this.#i=Array.isArray(e)?e.map(e=>({label:String(e.label??``),color:String(e.color??``)})):null,this.#e&&this.#c()}#o(){for(this.#e=!0,this.#r=[];this.firstChild;)this.#r.push(this.firstChild),this.removeChild(this.firstChild);let e=this.ownerDocument.createElement(`h4`),t=this.ownerDocument.createElement(`div`);t.className=`palgrid`,this.append(e,t),this.#t=e,this.#n=t,this.#c()}#s(){this.#t&&(this.#t.textContent=this.heading)}#c(){let e=this.#n;if(e){e.replaceChildren();for(let t of this.#r)e.appendChild(t);for(let t of this.tokens){let n=this.ownerDocument.createElement(`slicc-palette-cell`);n.setAttribute(`color`,t.color),n.setAttribute(`label`,t.label),e.appendChild(n)}}}#l(){this.#a||(this.#a=e=>{let t=e.detail??{};this.dispatchEvent(new CustomEvent(`select`,{bubbles:!0,composed:!0,detail:{label:t.label??``,color:t.color??``,sourceEvent:e}}))},this.addEventListener(`palette-select`,this.#a))}#u(){this.#a&&=(this.removeEventListener(`palette-select`,this.#a),null)}});var Rr=D(`
2964
+ `,Fr=`slicc-palette-grid-style`;function Ir(e){if(e.getElementById(Fr))return;let t=e.createElement(`style`);t.id=Fr,t.textContent=Pr,(e.head??e.documentElement).appendChild(t)}var Lr=[{label:`canvas #faf6f1`,color:`#faf6f1`},{label:`cone #ef7000`,color:`#ef7000`},{label:`scoop #8b5cf6`,color:`#8b5cf6`},{label:`scoop #06b6d4`,color:`#06b6d4`},{label:`scoop #f43f5e`,color:`#f43f5e`},{label:`ink #0a0a0a`,color:`#0a0a0a`}],Rr=`brand palette · tokens`;S(`slicc-palette-grid`,class extends HTMLElement{static get observedAttributes(){return[`heading`]}#e=!1;#t=null;#n=null;#r=[];#i=null;#a=null;connectedCallback(){Ir(this.ownerDocument),this.#e||this.#o(),this.#s(),this.#l()}disconnectedCallback(){this.#u()}attributeChangedCallback(){this.#e&&this.#s()}get heading(){return this.getAttribute(`heading`)??Rr}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get tokens(){return(this.#i??Lr).map(e=>({...e}))}set tokens(e){this.#i=Array.isArray(e)?e.map(e=>({label:String(e.label??``),color:String(e.color??``)})):null,this.#e&&this.#c()}#o(){for(this.#e=!0,this.#r=[];this.firstChild;)this.#r.push(this.firstChild),this.removeChild(this.firstChild);let e=this.ownerDocument.createElement(`h4`),t=this.ownerDocument.createElement(`div`);t.className=`palgrid`,this.append(e,t),this.#t=e,this.#n=t,this.#c()}#s(){this.#t&&(this.#t.textContent=this.heading)}#c(){let e=this.#n;if(e){e.replaceChildren();for(let t of this.#r)e.appendChild(t);for(let t of this.tokens){let n=this.ownerDocument.createElement(`slicc-palette-cell`);n.setAttribute(`color`,t.color),n.setAttribute(`label`,t.label),e.appendChild(n)}}}#l(){this.#a||(this.#a=e=>{let t=e.detail??{};this.dispatchEvent(new CustomEvent(`select`,{bubbles:!0,composed:!0,detail:{label:t.label??``,color:t.color??``,sourceEvent:e}}))},this.addEventListener(`palette-select`,this.#a))}#u(){this.#a&&=(this.removeEventListener(`palette-select`,this.#a),null)}});var zr=T(`
2965
2965
  :host { display: inline-block; position: relative; font-family: var(--ui); }
2966
2966
  .trigger {
2967
2967
  display: inline-flex; align-items: center; justify-content: center;
@@ -3002,7 +3002,7 @@ slicc-palette-grid .palgrid {
3002
3002
  .item .ic { flex: 0 0 auto; display: flex; color: var(--txt-2, #505050); }
3003
3003
  .item.danger .ic { color: var(--rose, #f43f5e); }
3004
3004
  @media (prefers-reduced-motion: reduce) { .pop { transition: none; } }
3005
- `);w(`slicc-avatar-menu`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t;#n;#r=[];#i=null;#a=e=>{this.open&&!e.composedPath().includes(this)&&this.hide()};#o=e=>{e.key===`Escape`&&this.open&&(this.hide(),this.#t.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Rr],this.#t=E(`button`,{class:`trigger`,part:`trigger`,type:`button`,"aria-haspopup":`menu`,"aria-expanded":`false`},E(`slot`)),this.#n=E(`div`,{class:`pop`,part:`popover`,role:`menu`}),this.#e.replaceChildren(this.#t,this.#n),this.#t.addEventListener(`click`,()=>this.toggle())}connectedCallback(){this.#c()}disconnectedCallback(){document.removeEventListener(`mousedown`,this.#a),document.removeEventListener(`keydown`,this.#o)}attributeChangedCallback(e){if(e===`open`){let e=this.open;this.#t.setAttribute(`aria-expanded`,e?`true`:`false`),e?(document.addEventListener(`mousedown`,this.#a),document.addEventListener(`keydown`,this.#o)):(document.removeEventListener(`mousedown`,this.#a),document.removeEventListener(`keydown`,this.#o))}}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get user(){return this.#i}set user(e){this.#i=e,this.#c()}get items(){return this.#r.map(e=>({...e}))}set items(e){this.#r=Array.isArray(e)?e.map(e=>({...e})):[],this.#c()}show(){this.open||(this.open=!0,this.#s())}hide(){this.open&&(this.open=!1,this.#s())}toggle(){this.open?this.hide():this.show()}#s(){this.dispatchEvent(new CustomEvent(`slicc-avatar-menu-toggle`,{detail:{open:this.open},bubbles:!0,composed:!0}))}#c(){let e=[];if(this.#i){let t=E(`div`,{class:`user`},E(`div`,{class:`name`},this.#i.name));this.#i.provider&&t.append(E(`div`,{class:`prov`},this.#i.provider)),e.push(t)}for(let t of this.#r)if(t.kind===`separator`)e.push(E(`div`,{class:`sep`,role:`separator`}));else if(t.kind===`caption`)e.push(E(`div`,{class:`cap`},t.label??``));else{let r=E(`button`,{class:`item${t.danger?` danger`:``}`,part:`item`,type:`button`,role:`menuitem`,"data-id":t.id??``,disabled:t.disabled?!0:void 0});t.icon&&r.append(E(`span`,{class:`ic`},n(t.icon,{size:16}))),r.append(E(`span`,{class:`lb`},t.label??``)),t.disabled||r.addEventListener(`click`,()=>this.#l(t.id??``)),e.push(r)}this.#n.replaceChildren(...e)}#l(e){this.dispatchEvent(new CustomEvent(`slicc-avatar-action`,{detail:{id:e},bubbles:!0,composed:!0})),this.hide()}});var zr=`
3005
+ `);S(`slicc-avatar-menu`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t;#n;#r=[];#i=null;#a=e=>{this.open&&!e.composedPath().includes(this)&&this.hide()};#o=e=>{e.key===`Escape`&&this.open&&(this.hide(),this.#t.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[zr],this.#t=w(`button`,{class:`trigger`,part:`trigger`,type:`button`,"aria-haspopup":`menu`,"aria-expanded":`false`},w(`slot`)),this.#n=w(`div`,{class:`pop`,part:`popover`,role:`menu`}),this.#e.replaceChildren(this.#t,this.#n),this.#t.addEventListener(`click`,()=>this.toggle())}connectedCallback(){this.#c()}disconnectedCallback(){document.removeEventListener(`mousedown`,this.#a),document.removeEventListener(`keydown`,this.#o)}attributeChangedCallback(e){if(e===`open`){let e=this.open;this.#t.setAttribute(`aria-expanded`,e?`true`:`false`),e?(document.addEventListener(`mousedown`,this.#a),document.addEventListener(`keydown`,this.#o)):(document.removeEventListener(`mousedown`,this.#a),document.removeEventListener(`keydown`,this.#o))}}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get user(){return this.#i}set user(e){this.#i=e,this.#c()}get items(){return this.#r.map(e=>({...e}))}set items(e){this.#r=Array.isArray(e)?e.map(e=>({...e})):[],this.#c()}show(){this.open||(this.open=!0,this.#s())}hide(){this.open&&(this.open=!1,this.#s())}toggle(){this.open?this.hide():this.show()}#s(){this.dispatchEvent(new CustomEvent(`slicc-avatar-menu-toggle`,{detail:{open:this.open},bubbles:!0,composed:!0}))}#c(){let e=[];if(this.#i){let t=w(`div`,{class:`user`},w(`div`,{class:`name`},this.#i.name));this.#i.provider&&t.append(w(`div`,{class:`prov`},this.#i.provider)),e.push(t)}for(let t of this.#r)if(t.kind===`separator`)e.push(w(`div`,{class:`sep`,role:`separator`}));else if(t.kind===`caption`)e.push(w(`div`,{class:`cap`},t.label??``));else{let r=w(`button`,{class:`item${t.danger?` danger`:``}`,part:`item`,type:`button`,role:`menuitem`,"data-id":t.id??``,disabled:t.disabled?!0:void 0});t.icon&&r.append(w(`span`,{class:`ic`},n(t.icon,{size:16}))),r.append(w(`span`,{class:`lb`},t.label??``)),t.disabled||r.addEventListener(`click`,()=>this.#l(t.id??``)),e.push(r)}this.#n.replaceChildren(...e)}#l(e){this.dispatchEvent(new CustomEvent(`slicc-avatar-action`,{detail:{id:e},bubbles:!0,composed:!0})),this.hide()}});var Br=`
3006
3006
  .slicc-nav {
3007
3007
  display: flex;
3008
3008
  align-items: center;
@@ -3029,7 +3029,7 @@ slicc-palette-grid .palgrid {
3029
3029
  @media (max-width: 560px) {
3030
3030
  .slicc-nav { gap: 8px; padding: 0 10px; }
3031
3031
  }
3032
- `,Br=`slicc-nav-style`;function Vr(e){if(e.getElementById(Br))return;let t=e.createElement(`style`);t.id=Br,t.textContent=zr,(e.head??e.documentElement).appendChild(t)}w(`slicc-nav`,class extends HTMLElement{static observedAttributes=[`accent`];#e=!1;connectedCallback(){Vr(this.ownerDocument),this.classList.add(`slicc-nav`),this.setAttribute(`part`,`bar`),this.#t(),this.#n(this.getAttribute(`accent`))}attributeChangedCallback(e,t,n){e!==`accent`||t===n||this.isConnected&&(this.#n(n),this.dispatchEvent(new CustomEvent(`slicc-nav-accent-change`,{detail:{accent:n},bubbles:!0,composed:!0})))}get accent(){return this.getAttribute(`accent`)}set accent(e){e==null?this.removeAttribute(`accent`):this.setAttribute(`accent`,e)}get spacer(){return this.#t(),this.querySelector(`:scope > .slicc-nav__spacer, :scope > .spacer`)}#t(){if(this.#e||(this.#e=!0,this.querySelector(`:scope > .slicc-nav__spacer, :scope > .spacer`)))return;let e=this.ownerDocument.createElement(`div`);e.className=`slicc-nav__spacer`,e.setAttribute(`part`,`spacer`),e.setAttribute(`aria-hidden`,`true`);let t=this.querySelector(`:scope > slicc-floatbar, :scope > slicc-theme-toggle, :scope > slicc-avatar`);t?this.insertBefore(e,t):this.appendChild(e)}#n(e){e==null||e.trim()===``?this.style.removeProperty(`--ctx`):this.style.setProperty(`--ctx`,e)}});var Hr=D(`
3032
+ `,Vr=`slicc-nav-style`;function Hr(e){if(e.getElementById(Vr))return;let t=e.createElement(`style`);t.id=Vr,t.textContent=Br,(e.head??e.documentElement).appendChild(t)}S(`slicc-nav`,class extends HTMLElement{static observedAttributes=[`accent`];#e=!1;connectedCallback(){Hr(this.ownerDocument),this.classList.add(`slicc-nav`),this.setAttribute(`part`,`bar`),this.#t(),this.#n(this.getAttribute(`accent`))}attributeChangedCallback(e,t,n){e!==`accent`||t===n||this.isConnected&&(this.#n(n),this.dispatchEvent(new CustomEvent(`slicc-nav-accent-change`,{detail:{accent:n},bubbles:!0,composed:!0})))}get accent(){return this.getAttribute(`accent`)}set accent(e){e==null?this.removeAttribute(`accent`):this.setAttribute(`accent`,e)}get spacer(){return this.#t(),this.querySelector(`:scope > .slicc-nav__spacer, :scope > .spacer`)}#t(){if(this.#e||(this.#e=!0,this.querySelector(`:scope > .slicc-nav__spacer, :scope > .spacer`)))return;let e=this.ownerDocument.createElement(`div`);e.className=`slicc-nav__spacer`,e.setAttribute(`part`,`spacer`),e.setAttribute(`aria-hidden`,`true`);let t=this.querySelector(`:scope > slicc-floatbar, :scope > slicc-theme-toggle, :scope > slicc-avatar`);t?this.insertBefore(e,t):this.appendChild(e)}#n(e){e==null||e.trim()===``?this.style.removeProperty(`--ctx`):this.style.setProperty(`--ctx`,e)}});var Ur=T(`
3033
3033
  :host {
3034
3034
  position: fixed;
3035
3035
  z-index: 110;
@@ -3067,7 +3067,7 @@ slicc-palette-grid .palgrid {
3067
3067
  .item.destructive {
3068
3068
  color: var(--red, #e53e3e);
3069
3069
  }
3070
- `),Ur=null,U=null,W=null,Wr=class e extends HTMLElement{#e;#t=void 0;#n=null;#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Hr]}connectedCallback(){this.#e.addEventListener(`click`,this.#i)}disconnectedCallback(){this.#e.removeEventListener(`click`,this.#i)}#i=t=>{let n=t.target.closest(`[data-action]`);if(!n)return;let r=n.dataset.action;(this.#r??this.#n??this).dispatchEvent(new CustomEvent(`overflow-action`,{bubbles:!0,composed:!0,detail:{action:r,context:this.#t}})),e.hide()};static show(t){e.hide();let r=document.createElement(`slicc-overflow-menu`);r.#t=t.context,r.#n=t.anchor,r.#r=t.dispatchTarget??null;let i=t.items.filter(e=>e.visible!==!1),a=E(`div`,{class:`menu`});for(let e of i){let t=e.destructive?`item destructive`:`item`,r=[];e.icon&&r.push(n(e.icon,{size:14})),r.push(e.label);let i=E(`button`,{class:t,"data-action":e.id},...r);a.appendChild(i)}r.#e.appendChild(a),document.body.appendChild(r),Ur=r;let o=t.anchor.getBoundingClientRect(),s=r.getBoundingClientRect(),c=o.bottom+4;c+s.height>window.innerHeight&&(c=o.top-s.height-4);let l=o.right-s.width;l<4&&(l=o.left),r.style.top=`${c}px`,r.style.left=`${l}px`,U=t=>{t.key===`Escape`&&e.hide()},W=n=>{let i=n.composedPath();!i.includes(r)&&!i.includes(t.anchor)&&e.hide()},document.addEventListener(`keydown`,U),document.addEventListener(`pointerdown`,W,{capture:!0})}static hide(){Ur&&=(Ur.remove(),null),U&&=(document.removeEventListener(`keydown`,U),null),W&&=(document.removeEventListener(`pointerdown`,W,{capture:!0}),null)}};w(`slicc-overflow-menu`,Wr);var Gr=D(`
3070
+ `),U=null,W=null,G=null,Wr=class e extends HTMLElement{#e;#t=void 0;#n=null;#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ur]}connectedCallback(){this.#e.addEventListener(`click`,this.#i)}disconnectedCallback(){this.#e.removeEventListener(`click`,this.#i)}#i=t=>{let n=t.target.closest(`[data-action]`);if(!n)return;let r=n.dataset.action;(this.#r??this.#n??this).dispatchEvent(new CustomEvent(`overflow-action`,{bubbles:!0,composed:!0,detail:{action:r,context:this.#t}})),e.hide()};static show(t){e.hide();let r=document.createElement(`slicc-overflow-menu`);r.#t=t.context,r.#n=t.anchor,r.#r=t.dispatchTarget??null;let i=t.items.filter(e=>e.visible!==!1),a=w(`div`,{class:`menu`});for(let e of i){let t=e.destructive?`item destructive`:`item`,r=[];e.icon&&r.push(n(e.icon,{size:14})),r.push(e.label);let i=w(`button`,{class:t,"data-action":e.id},...r);a.appendChild(i)}r.#e.appendChild(a),document.body.appendChild(r),U=r;let o=t.anchor.getBoundingClientRect(),s=r.getBoundingClientRect(),c=o.bottom+4;c+s.height>window.innerHeight&&(c=o.top-s.height-4);let l=o.right-s.width;l<4&&(l=o.left),r.style.top=`${c}px`,r.style.left=`${l}px`,W=t=>{t.key===`Escape`&&e.hide()},G=n=>{let i=n.composedPath();!i.includes(r)&&!i.includes(t.anchor)&&e.hide()},document.addEventListener(`keydown`,W),document.addEventListener(`pointerdown`,G,{capture:!0})}static hide(){U&&=(U.remove(),null),W&&=(document.removeEventListener(`keydown`,W),null),G&&=(document.removeEventListener(`pointerdown`,G,{capture:!0}),null)}};S(`slicc-overflow-menu`,Wr);var Gr=T(`
3071
3071
  :host { display: none; }
3072
3072
  :host([open]) { display: block; }
3073
3073
  .overlay {
@@ -3112,7 +3112,7 @@ slicc-palette-grid .palgrid {
3112
3112
  @media (prefers-reduced-motion: reduce) {
3113
3113
  .overlay, .dialog { transition: none; }
3114
3114
  }
3115
- `);w(`slicc-dialog`,class extends HTMLElement{static observedAttributes=[`open`,`heading`,`description`,`no-close-button`];#e;#t;#n;#r;#i;#a;#o=null;#s=e=>{e.key===`Escape`&&this.open&&(e.stopPropagation(),this.#c(`escape`))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Gr],this.#r=E(`div`,{class:`title`,part:`title`,id:`slicc-dialog-title`}),this.#i=E(`div`,{class:`desc`,part:`description`}),this.#a=E(`button`,{class:`x`,part:`close`,type:`button`,"aria-label":`Close`},n(`x`,{size:18}));let e=E(`div`,{class:`body`},E(`slot`)),t=E(`div`,{class:`footer`},E(`slot`,{name:`footer`}));this.#n=E(`div`,{class:`dialog`,part:`dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`slicc-dialog-title`,tabindex:`-1`},this.#a,this.#r,this.#i,e,t),this.#t=E(`div`,{class:`overlay`,part:`overlay`},this.#n),this.#e.replaceChildren(this.#t),this.#a.addEventListener(`click`,()=>this.#c(`close-button`)),this.#t.addEventListener(`mousedown`,e=>{e.target===this.#t&&!this.persistent&&this.#c(`backdrop`)})}connectedCallback(){this.#u()}disconnectedCallback(){document.removeEventListener(`keydown`,this.#s,!0)}attributeChangedCallback(e){e===`open`?this.#u():this.#l()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get heading(){return this.getAttribute(`heading`)}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get description(){return this.getAttribute(`description`)}set description(e){e==null?this.removeAttribute(`description`):this.setAttribute(`description`,e)}get persistent(){return this.hasAttribute(`persistent`)}set persistent(e){this.toggleAttribute(`persistent`,e)}show(){this.open||=!0}hide(){this.open&&this.#c(`api`)}#c(e){this.open=!1,this.dispatchEvent(new CustomEvent(`slicc-dialog-close`,{detail:{reason:e},bubbles:!0,composed:!0}))}#l(){this.#r.textContent=this.heading??``,this.#r.style.display=this.heading?``:`none`,this.#i.textContent=this.description??``,this.#i.style.display=this.description?``:`none`,this.#a.style.display=this.hasAttribute(`no-close-button`)?`none`:``}#u(){this.#l(),this.open?(this.#o=this.getRootNode().activeElement,document.addEventListener(`keydown`,this.#s,!0),requestAnimationFrame(()=>this.#n.focus())):(document.removeEventListener(`keydown`,this.#s,!0),this.#o?.focus?.(),this.#o=null)}});var Kr=`
3115
+ `);S(`slicc-dialog`,class extends HTMLElement{static observedAttributes=[`open`,`heading`,`description`,`no-close-button`];#e;#t;#n;#r;#i;#a;#o=null;#s=e=>{e.key===`Escape`&&this.open&&(e.stopPropagation(),this.#c(`escape`))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Gr],this.#r=w(`div`,{class:`title`,part:`title`,id:`slicc-dialog-title`}),this.#i=w(`div`,{class:`desc`,part:`description`}),this.#a=w(`button`,{class:`x`,part:`close`,type:`button`,"aria-label":`Close`},n(`x`,{size:18}));let e=w(`div`,{class:`body`},w(`slot`)),t=w(`div`,{class:`footer`},w(`slot`,{name:`footer`}));this.#n=w(`div`,{class:`dialog`,part:`dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`slicc-dialog-title`,tabindex:`-1`},this.#a,this.#r,this.#i,e,t),this.#t=w(`div`,{class:`overlay`,part:`overlay`},this.#n),this.#e.replaceChildren(this.#t),this.#a.addEventListener(`click`,()=>this.#c(`close-button`)),this.#t.addEventListener(`mousedown`,e=>{e.target===this.#t&&!this.persistent&&this.#c(`backdrop`)})}connectedCallback(){this.#u()}disconnectedCallback(){document.removeEventListener(`keydown`,this.#s,!0)}attributeChangedCallback(e){e===`open`?this.#u():this.#l()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get heading(){return this.getAttribute(`heading`)}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get description(){return this.getAttribute(`description`)}set description(e){e==null?this.removeAttribute(`description`):this.setAttribute(`description`,e)}get persistent(){return this.hasAttribute(`persistent`)}set persistent(e){this.toggleAttribute(`persistent`,e)}show(){this.open||=!0}hide(){this.open&&this.#c(`api`)}#c(e){this.open=!1,this.dispatchEvent(new CustomEvent(`slicc-dialog-close`,{detail:{reason:e},bubbles:!0,composed:!0}))}#l(){this.#r.textContent=this.heading??``,this.#r.style.display=this.heading?``:`none`,this.#i.textContent=this.description??``,this.#i.style.display=this.description?``:`none`,this.#a.style.display=this.hasAttribute(`no-close-button`)?`none`:``}#u(){this.#l(),this.open?(this.#o=this.getRootNode().activeElement,document.addEventListener(`keydown`,this.#s,!0),requestAnimationFrame(()=>this.#n.focus())):(document.removeEventListener(`keydown`,this.#s,!0),this.#o?.focus?.(),this.#o=null)}});var Kr=`
3116
3116
  slicc-camera-dialog slicc-dialog::part(dialog) {
3117
3117
  width: min(560px, 92vw);
3118
3118
  }
@@ -3179,7 +3179,7 @@ slicc-camera-dialog .slicc-camera__btn--snap {
3179
3179
  slicc-camera-dialog .slicc-camera__btn--snap:hover {
3180
3180
  background: color-mix(in srgb, var(--ink) 85%, var(--canvas));
3181
3181
  }
3182
- `,qr=`slicc-camera-dialog-style`;function Jr(e){if(e.getElementById(qr))return;let t=e.createElement(`style`);t.id=qr,t.textContent=Kr,(e.head??e.documentElement).appendChild(t)}var Yr=`Take a photo`;w(`slicc-camera-dialog`,class extends HTMLElement{static observedAttributes=[`heading`,`preferred-device`];media=null;#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){Jr(this.ownerDocument),this.#h()}disconnectedCallback(){this.#m()}attributeChangedCallback(e){e===`heading`&&this.#i&&this.#e.setAttribute(`heading`,this.heading)}get heading(){return this.getAttribute(`heading`)??Yr}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get preferredDevice(){return this.getAttribute(`preferred-device`)}set preferredDevice(e){e==null?this.removeAttribute(`preferred-device`):this.setAttribute(`preferred-device`,e)}#s(){return this.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}async open(){this.#h();let e=this.#s();if(!e)return null;try{this.#a=await this.#c(e,this.preferredDevice)}catch{return null}return this.#l(this.#a),await this.#u(e),this.#e.setAttribute(`heading`,this.heading),this.#e.show?.(),new Promise(e=>{this.#o=e})}async#c(e,t){if(t)try{return await e.getUserMedia({video:{deviceId:{exact:t}}})}catch{}return e.getUserMedia({video:!0})}#l(e){this.#t.srcObject=e,this.#t.play?.()?.catch(()=>void 0);let t=e.getVideoTracks()[0]?.getSettings?.().facingMode;this.#t.toggleAttribute(`data-mirrored`,t!==`environment`)}async#u(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`videoinput`)}catch{t=[]}this.#n.replaceChildren(...t.map((e,t)=>E(`option`,{value:e.deviceId},e.label||`Camera ${t+1}`)));let n=this.#a?.getVideoTracks()[0]?.getSettings?.().deviceId;n&&(this.#n.value=n),this.#n.toggleAttribute(`hidden`,t.length<2)}async#d(e){let t=this.#s();if(t){this.#r.textContent=``;try{let n=await t.getUserMedia({video:{deviceId:{exact:e}}});this.#m(),this.#a=n,this.#l(n),this.dispatchEvent(new CustomEvent(`slicc-camera-device-change`,{detail:{deviceId:e},bubbles:!0,composed:!0}))}catch{this.#r.textContent=`Could not switch camera — keeping the current one.`}}}#f(){let e=this.ownerDocument.createElement(`canvas`);if(e.width=this.#t.videoWidth,e.height=this.#t.videoHeight,e.width===0||e.height===0){this.#r.textContent=`No frame yet — give the camera a moment.`;return}e.getContext(`2d`)?.drawImage(this.#t,0,0);let t=e.toDataURL(`image/png`);this.dispatchEvent(new CustomEvent(`slicc-camera-capture`,{detail:{dataUrl:t},bubbles:!0,composed:!0})),this.#p(t)}#p(e){this.#m();let t=this.#o;this.#o=null,this.#e.hide?.(),t?.(e)}#m(){for(let e of this.#a?.getTracks()??[])e.stop();this.#a=null,this.#t&&(this.#t.srcObject=null)}#h(){if(this.#i)return;this.#i=!0,this.#t=E(`video`,{class:`slicc-camera__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#n=E(`select`,{class:`slicc-camera__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#d(this.#n.value)}),this.#r=E(`div`,{class:`slicc-camera__status`});let e=E(`button`,{type:`button`,class:`slicc-camera__btn`,part:`cancel`,slot:`footer`},`Cancel`);e.addEventListener(`click`,()=>this.#p(null));let t=E(`button`,{type:`button`,class:`slicc-camera__btn slicc-camera__btn--snap`,part:`snap`,slot:`footer`},n(`camera`,{size:14}),` Snap`);t.addEventListener(`click`,()=>this.#f());let r=E(`div`,{class:`slicc-camera__body`},this.#t,this.#n,this.#r);this.#e=this.ownerDocument.createElement(`slicc-dialog`),this.#e.setAttribute(`heading`,this.heading),this.#e.append(r,e,t),this.#e.addEventListener(`slicc-dialog-close`,()=>{this.#o&&this.#p(null)}),this.append(this.#e)}});var G={debug(e,t){t===void 0?console.debug(`[slicc-permissions] ${e}`):console.debug(`[slicc-permissions] ${e}`,t)},error(e,t){t===void 0?console.error(`[slicc-permissions] ${e}`):console.error(`[slicc-permissions] ${e}`,t)}},Xr=new Set([`microphone`,`camera`]);function Zr(e){return typeof navigator>`u`||!navigator.permissions?.query?Promise.resolve(`prompt`):navigator.permissions.query({name:e}).then(e=>e.state)}var Qr=`
3182
+ `,qr=`slicc-camera-dialog-style`;function Jr(e){if(e.getElementById(qr))return;let t=e.createElement(`style`);t.id=qr,t.textContent=Kr,(e.head??e.documentElement).appendChild(t)}var Yr=`Take a photo`;S(`slicc-camera-dialog`,class extends HTMLElement{static observedAttributes=[`heading`,`preferred-device`];media=null;#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){Jr(this.ownerDocument),this.#h()}disconnectedCallback(){this.#m()}attributeChangedCallback(e){e===`heading`&&this.#i&&this.#e.setAttribute(`heading`,this.heading)}get heading(){return this.getAttribute(`heading`)??Yr}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get preferredDevice(){return this.getAttribute(`preferred-device`)}set preferredDevice(e){e==null?this.removeAttribute(`preferred-device`):this.setAttribute(`preferred-device`,e)}#s(){return this.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}async open(){this.#h();let e=this.#s();if(!e)return null;try{this.#a=await this.#c(e,this.preferredDevice)}catch{return null}return this.#l(this.#a),await this.#u(e),this.#e.setAttribute(`heading`,this.heading),this.#e.show?.(),new Promise(e=>{this.#o=e})}async#c(e,t){if(t)try{return await e.getUserMedia({video:{deviceId:{exact:t}}})}catch{}return e.getUserMedia({video:!0})}#l(e){this.#t.srcObject=e,this.#t.play?.()?.catch(()=>void 0);let t=e.getVideoTracks()[0]?.getSettings?.().facingMode;this.#t.toggleAttribute(`data-mirrored`,t!==`environment`)}async#u(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`videoinput`)}catch{t=[]}this.#n.replaceChildren(...t.map((e,t)=>w(`option`,{value:e.deviceId},e.label||`Camera ${t+1}`)));let n=this.#a?.getVideoTracks()[0]?.getSettings?.().deviceId;n&&(this.#n.value=n),this.#n.toggleAttribute(`hidden`,t.length<2)}async#d(e){let t=this.#s();if(t){this.#r.textContent=``;try{let n=await t.getUserMedia({video:{deviceId:{exact:e}}});this.#m(),this.#a=n,this.#l(n),this.dispatchEvent(new CustomEvent(`slicc-camera-device-change`,{detail:{deviceId:e},bubbles:!0,composed:!0}))}catch{this.#r.textContent=`Could not switch camera — keeping the current one.`}}}#f(){let e=this.ownerDocument.createElement(`canvas`);if(e.width=this.#t.videoWidth,e.height=this.#t.videoHeight,e.width===0||e.height===0){this.#r.textContent=`No frame yet — give the camera a moment.`;return}e.getContext(`2d`)?.drawImage(this.#t,0,0);let t=e.toDataURL(`image/png`);this.dispatchEvent(new CustomEvent(`slicc-camera-capture`,{detail:{dataUrl:t},bubbles:!0,composed:!0})),this.#p(t)}#p(e){this.#m();let t=this.#o;this.#o=null,this.#e.hide?.(),t?.(e)}#m(){for(let e of this.#a?.getTracks()??[])e.stop();this.#a=null,this.#t&&(this.#t.srcObject=null)}#h(){if(this.#i)return;this.#i=!0,this.#t=w(`video`,{class:`slicc-camera__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#n=w(`select`,{class:`slicc-camera__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#d(this.#n.value)}),this.#r=w(`div`,{class:`slicc-camera__status`});let e=w(`button`,{type:`button`,class:`slicc-camera__btn`,part:`cancel`,slot:`footer`},`Cancel`);e.addEventListener(`click`,()=>this.#p(null));let t=w(`button`,{type:`button`,class:`slicc-camera__btn slicc-camera__btn--snap`,part:`snap`,slot:`footer`},n(`camera`,{size:14}),` Snap`);t.addEventListener(`click`,()=>this.#f());let r=w(`div`,{class:`slicc-camera__body`},this.#t,this.#n,this.#r);this.#e=this.ownerDocument.createElement(`slicc-dialog`),this.#e.setAttribute(`heading`,this.heading),this.#e.append(r,e,t),this.#e.addEventListener(`slicc-dialog-close`,()=>{this.#o&&this.#p(null)}),this.append(this.#e)}});var K={debug(e,t){t===void 0?console.debug(`[slicc-permissions] ${e}`):console.debug(`[slicc-permissions] ${e}`,t)},error(e,t){t===void 0?console.error(`[slicc-permissions] ${e}`):console.error(`[slicc-permissions] ${e}`,t)}},Xr=new Set([`microphone`,`camera`]);function Zr(e){return typeof navigator>`u`||!navigator.permissions?.query?Promise.resolve(`prompt`):navigator.permissions.query({name:e}).then(e=>e.state)}var Qr=`
3183
3183
  slicc-permissions {
3184
3184
  /* Invisible host by default — only the drop overlay paints, and only
3185
3185
  while a folder drag is in flight. Hosts can give the element a fixed
@@ -3350,7 +3350,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3350
3350
  transform: translateX(-50%) translateY(0);
3351
3351
  }
3352
3352
  }
3353
- `,$r=`slicc-permissions-style`;function ei(e){if(e.getElementById($r))return;let t=e.createElement(`style`);t.id=$r,t.textContent=Qr,(e.head??e.documentElement).appendChild(t)}function K(e){let t=e.dataTransfer?.types;if(!t)return!1;for(let e=0;e<t.length;e++)if(t[e]===`Files`)return!0;return!1}var ti=class extends HTMLElement{providers={};permissionQuery=null;#e;#t=!1;#n=0;#r=null;connectedCallback(){ei(this.ownerDocument),this.#C();let e=this.ownerDocument;e.addEventListener(`dragenter`,this.#v),e.addEventListener(`dragover`,this.#y),e.addEventListener(`dragleave`,this.#b),e.addEventListener(`drop`,this.#x)}disconnectedCallback(){let e=this.ownerDocument;e.removeEventListener(`dragenter`,this.#v),e.removeEventListener(`dragover`,this.#y),e.removeEventListener(`dragleave`,this.#b),e.removeEventListener(`drop`,this.#x),this.#n=0,this.removeAttribute(`data-dropping`),this.#r&&this.#r.cancel()}async request(e,t){switch(e){case`camera`:return this.#o(t);case`microphone`:return this.#s(t);case`screenshare`:return this.#l(t);case`usb`:return this.#u(t);case`hid`:return this.#d(t);case`serial`:return this.#f(t);case`filesystem`:return this.#p();case`popup`:return this.#m(t);default:return null}}async prompt(e){if(!e.kinds.length)return{status:`granted`,grants:[]};if(e.skipIfGranted){let t=await this.#i(e);if(t)return t}return this.#r&&this.#r.cancel(),new Promise(t=>{this.#w(e,t)})}async#i(e){if(!e.kinds.every(e=>Xr.has(e)))return G.debug(`prompt: showing dialog (a gesture-bound kind was requested)`,{kinds:e.kinds}),null;let t=this.permissionQuery??Zr,n;try{n=await Promise.all(e.kinds.map(e=>t(e)))}catch(e){return G.error(`prompt: permission query threw; showing dialog`,e),null}if(G.debug(`prompt: queried permission state`,{kinds:e.kinds,states:n}),!n.every(e=>e===`granted`))return G.debug(`prompt: not all kinds granted; showing dialog`),null;let r=[];for(let t of e.kinds){let n=await this.request(t,e.requestOptions?.[t]);if(!n)return G.error(`prompt: acquisition failed after granted state`,{kind:t}),{status:`error`,grants:r,reason:`error`};r.push(n)}return G.debug(`prompt: short-circuited dialog (already granted)`,{kinds:e.kinds}),{status:`granted`,grants:r}}#a(){return this.providers.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}async#o(e){let t=this.#a();if(!t)return this.#g(`camera`,`unavailable`,`mediaDevices unavailable`);try{let n=await t.getUserMedia(e?.constraints??{video:!0});return this.#h({kind:`camera`,stream:n})}catch(e){return this.#_(`camera`,e)}}async#s(e){let t=this.#a();if(!t)return this.#g(`microphone`,`unavailable`,`mediaDevices unavailable`);try{let n=await t.getUserMedia(e?.constraints??{audio:!0});return this.#h({kind:`microphone`,stream:n})}catch(e){return this.#_(`microphone`,e)}}#c(){if(this.providers.screenshare)return this.providers.screenshare;let e=typeof navigator<`u`?navigator.mediaDevices:void 0;return e&&typeof e.getDisplayMedia==`function`?{getDisplayMedia:t=>e.getDisplayMedia(t)}:null}async#l(e){let t=this.#c();if(!t)return this.#g(`screenshare`,`unavailable`,`getDisplayMedia unavailable`);try{let n=await t.getDisplayMedia(e?.constraints??{video:!0});return this.#h({kind:`screenshare`,stream:n})}catch(e){return this.#_(`screenshare`,e)}}async#u(e){let t=this.providers.usb??globalThis.navigator?.usb??null;if(!t?.requestDevice)return this.#g(`usb`,`unavailable`,`WebUSB unavailable`);try{let n=await t.requestDevice({filters:e?.filters??[]});return n?this.#h({kind:`usb`,device:n}):this.#g(`usb`,`cancelled`)}catch(e){return this.#_(`usb`,e)}}async#d(e){let t=this.providers.hid??globalThis.navigator?.hid??null;if(!t?.requestDevice)return this.#g(`hid`,`unavailable`,`WebHID unavailable`);try{let n=await t.requestDevice({filters:e?.filters??[]}),r=Array.isArray(n)?n:n?[n]:[];return r.length===0?this.#g(`hid`,`cancelled`):this.#h({kind:`hid`,device:r[0],devices:r})}catch(e){return this.#_(`hid`,e)}}async#f(e){let t=this.providers.serial??globalThis.navigator?.serial??null;if(!t?.requestPort)return this.#g(`serial`,`unavailable`,`Web Serial unavailable`);try{let n=await t.requestPort(e?.filters?.length?{filters:e.filters}:{});return n?this.#h({kind:`serial`,port:n}):this.#g(`serial`,`cancelled`)}catch(e){return this.#_(`serial`,e)}}async#p(){let e=this.providers.filesystem??(typeof window<`u`&&`showDirectoryPicker`in window&&window||null);if(!e?.showDirectoryPicker)return this.#g(`filesystem`,`unavailable`,`showDirectoryPicker unavailable`);try{let t=await e.showDirectoryPicker({mode:`readwrite`});return this.#h({kind:`filesystem`,handle:t,source:`picker`,permission:`granted`})}catch(e){return this.#_(`filesystem`,e)}}#m(e){let t=e?.url;if(!t)return this.#g(`popup`,`error`,`popup request missing url`);let n=e?.features??`width=500,height=700,popup=yes`,r=this.providers.popup??(typeof window<`u`?{open:(e,t)=>window.open(e,`_blank`,t)}:null);if(!r)return this.#g(`popup`,`unavailable`,`window.open unavailable`);let i;try{i=r.open(t,n)}catch(e){return this.#_(`popup`,e)}return i?this.#h({kind:`popup`,window:i}):this.#g(`popup`,`error`,`window.open returned null (popup blocked?)`)}#h(e){return this.dispatchEvent(new CustomEvent(`slicc-permission-grant`,{detail:e,bubbles:!0,composed:!0})),e}#g(e,t,n){return this.dispatchEvent(new CustomEvent(`slicc-permission-deny`,{detail:{kind:e,reason:t,message:n},bubbles:!0,composed:!0})),null}#_(e,t){return t instanceof Error&&(t.name===`AbortError`||t.name===`NotFoundError`)?this.#g(e,`cancelled`):this.#g(e,`error`,t instanceof Error?t.message:String(t))}#v=e=>{K(e)&&(e.preventDefault(),this.#n++,this.setAttribute(`data-dropping`,``))};#y=e=>{K(e)&&e.preventDefault()};#b=e=>{K(e)&&(this.#n=Math.max(0,this.#n-1),this.#n===0&&this.removeAttribute(`data-dropping`))};#x=e=>{if(!K(e))return;e.preventDefault(),this.#n=0,this.removeAttribute(`data-dropping`);let t=e.dataTransfer?.items;if(!t?.length)return;let n=[];for(let e=0;e<t.length;e++){let r=t[e];r.kind!==`file`||typeof r.getAsFileSystemHandle!=`function`||n.push(r.getAsFileSystemHandle())}n.length!==0&&this.#S(n)};async#S(e){let t;try{t=await Promise.all(e)}catch(e){this.#g(`filesystem`,`error`,e instanceof Error?e.message:String(e));return}let n=t.find(e=>e?.kind===`directory`);if(!n){this.#g(`filesystem`,`cancelled`,`no directory in drop`);return}let r=n,i;if(r.requestPermission)try{i=await r.requestPermission({mode:`readwrite`})}catch(e){this.#g(`filesystem`,`error`,e instanceof Error?e.message:String(e));return}else i=`granted`;if(i!==`granted`){this.#g(`filesystem`,`cancelled`,`permission ${i}`);return}this.#h({kind:`filesystem`,handle:n,source:`drop`,permission:i})}#C(){if(this.#t)return;this.#t=!0;let e=E(`div`,{class:`slicc-permissions__drop-inner`},n(`folder-up`,{size:32}),E(`div`,null,`Drop a folder to mount it (read-write)`));this.#e=E(`div`,{class:`slicc-permissions__drop`,part:`drop`,"aria-hidden":`true`},e),this.append(this.#e)}#w(e,t){let r=e.heading??ii(e.kinds),i=e.grantLabel??`Allow`,a=e.cancelLabel??`Cancel`,o=`slicc-permissions__heading-${Math.random().toString(36).slice(2,8)}`,s=`slicc-permissions__desc-${Math.random().toString(36).slice(2,8)}`,c=E(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`ghost`,part:`prompt-cancel`},a),l=E(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`primary`,part:`prompt-grant`},i),u=E(`div`,{class:`slicc-permissions__prompt-icons`,"aria-hidden":`true`},...e.kinds.map(e=>E(`span`,{class:`slicc-permissions__prompt-icon`},n(ni(e),{size:22})))),d=E(`div`,{class:`slicc-permissions__prompt`,part:`prompt`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":o,"aria-describedby":s,tabindex:`-1`,popover:`manual`},u,E(`h2`,{class:`slicc-permissions__prompt-heading`,id:o},r),E(`p`,{class:`slicc-permissions__prompt-desc`,id:s},e.description),E(`div`,{class:`slicc-permissions__prompt-actions`},c,l));this.append(d);let f=d;if(typeof f.showPopover==`function`)try{f.showPopover()}catch{}let p=!1,m=this.ownerDocument.activeElement??null,h=()=>{if(d.removeEventListener(`keydown`,_),d.remove(),m&&typeof m.focus==`function`)try{m.focus()}catch{}this.#r=null},g=(n,r)=>{if(!p){p=!0;for(let t of e.kinds)this.#g(t,n,r);h(),t({status:`cancelled`,grants:[],reason:n,message:r})}},_=e=>{if(e.key===`Escape`){e.preventDefault(),g(`cancelled`);return}if(e.key===`Tab`){let t=[c,l],n=this.ownerDocument.activeElement,r=t.indexOf(n);if(r===-1){t[0].focus(),e.preventDefault();return}(e.shiftKey?t[(r-1+t.length)%t.length]:t[(r+1)%t.length]).focus(),e.preventDefault()}};c.addEventListener(`click`,()=>g(`cancelled`)),l.addEventListener(`click`,async()=>{if(p)return;p=!0,l.disabled=!0,c.disabled=!0;let n=[],r=null;for(let t of e.kinds){let i=await this.request(t,e.requestOptions?.[t]);if(i)n.push(i);else{r={kind:t,reason:`cancelled`};break}}let i=r?e.kinds.indexOf(r.kind):-1;if(r&&i>=0)for(let t=i+1;t<e.kinds.length;t++)this.#g(e.kinds[t],`cancelled`);h(),t(r?{status:`cancelled`,grants:n,reason:`cancelled`}:{status:`granted`,grants:n})}),d.addEventListener(`keydown`,_),this.#r={cancel:()=>g(`cancelled`)},requestAnimationFrame(()=>{d.setAttribute(`data-open`,``),l.focus()})}};function ni(e){switch(e){case`camera`:return`camera`;case`microphone`:return`mic`;case`screenshare`:return`monitor-up`;case`usb`:return`usb`;case`hid`:return`keyboard`;case`serial`:return`cable`;case`filesystem`:return`folder`;case`popup`:return`external-link`}}function ri(e){switch(e){case`camera`:return`camera`;case`microphone`:return`microphone`;case`screenshare`:return`screen`;case`usb`:return`USB device`;case`hid`:return`HID device`;case`serial`:return`serial port`;case`filesystem`:return`folder`;case`popup`:return`sign-in window`}}function ii(e){if(e.length===1)return`Allow access to your ${ri(e[0])}?`;let t=e.map(ri),n=t.pop();return`Allow access to your ${t.join(`, `)} and ${n}?`}w(`slicc-permissions`,ti);var ai=new Set([`top`,`bottom`,`left`,`right`]),oi=D(`
3353
+ `,$r=`slicc-permissions-style`;function ei(e){if(e.getElementById($r))return;let t=e.createElement(`style`);t.id=$r,t.textContent=Qr,(e.head??e.documentElement).appendChild(t)}function q(e){let t=e.dataTransfer?.types;if(!t)return!1;for(let e=0;e<t.length;e++)if(t[e]===`Files`)return!0;return!1}var ti=class extends HTMLElement{providers={};permissionQuery=null;#e;#t=!1;#n=0;#r=null;connectedCallback(){ei(this.ownerDocument),this.#C();let e=this.ownerDocument;e.addEventListener(`dragenter`,this.#v),e.addEventListener(`dragover`,this.#y),e.addEventListener(`dragleave`,this.#b),e.addEventListener(`drop`,this.#x)}disconnectedCallback(){let e=this.ownerDocument;e.removeEventListener(`dragenter`,this.#v),e.removeEventListener(`dragover`,this.#y),e.removeEventListener(`dragleave`,this.#b),e.removeEventListener(`drop`,this.#x),this.#n=0,this.removeAttribute(`data-dropping`),this.#r&&this.#r.cancel()}async request(e,t){switch(e){case`camera`:return this.#o(t);case`microphone`:return this.#s(t);case`screenshare`:return this.#l(t);case`usb`:return this.#u(t);case`hid`:return this.#d(t);case`serial`:return this.#f(t);case`filesystem`:return this.#p();case`popup`:return this.#m(t);default:return null}}async prompt(e){if(!e.kinds.length)return{status:`granted`,grants:[]};if(e.skipIfGranted){let t=await this.#i(e);if(t)return t}return this.#r&&this.#r.cancel(),new Promise(t=>{this.#w(e,t)})}async#i(e){if(!e.kinds.every(e=>Xr.has(e)))return K.debug(`prompt: showing dialog (a gesture-bound kind was requested)`,{kinds:e.kinds}),null;let t=this.permissionQuery??Zr,n;try{n=await Promise.all(e.kinds.map(e=>t(e)))}catch(e){return K.error(`prompt: permission query threw; showing dialog`,e),null}if(K.debug(`prompt: queried permission state`,{kinds:e.kinds,states:n}),!n.every(e=>e===`granted`))return K.debug(`prompt: not all kinds granted; showing dialog`),null;let r=[];for(let t of e.kinds){let n=await this.request(t,e.requestOptions?.[t]);if(!n)return K.error(`prompt: acquisition failed after granted state`,{kind:t}),{status:`error`,grants:r,reason:`error`};r.push(n)}return K.debug(`prompt: short-circuited dialog (already granted)`,{kinds:e.kinds}),{status:`granted`,grants:r}}#a(){return this.providers.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}async#o(e){let t=this.#a();if(!t)return this.#g(`camera`,`unavailable`,`mediaDevices unavailable`);try{let n=await t.getUserMedia(e?.constraints??{video:!0});return this.#h({kind:`camera`,stream:n})}catch(e){return this.#_(`camera`,e)}}async#s(e){let t=this.#a();if(!t)return this.#g(`microphone`,`unavailable`,`mediaDevices unavailable`);try{let n=await t.getUserMedia(e?.constraints??{audio:!0});return this.#h({kind:`microphone`,stream:n})}catch(e){return this.#_(`microphone`,e)}}#c(){if(this.providers.screenshare)return this.providers.screenshare;let e=typeof navigator<`u`?navigator.mediaDevices:void 0;return e&&typeof e.getDisplayMedia==`function`?{getDisplayMedia:t=>e.getDisplayMedia(t)}:null}async#l(e){let t=this.#c();if(!t)return this.#g(`screenshare`,`unavailable`,`getDisplayMedia unavailable`);try{let n=await t.getDisplayMedia(e?.constraints??{video:!0});return this.#h({kind:`screenshare`,stream:n})}catch(e){return this.#_(`screenshare`,e)}}async#u(e){let t=this.providers.usb??globalThis.navigator?.usb??null;if(!t?.requestDevice)return this.#g(`usb`,`unavailable`,`WebUSB unavailable`);try{let n=await t.requestDevice({filters:e?.filters??[]});return n?this.#h({kind:`usb`,device:n}):this.#g(`usb`,`cancelled`)}catch(e){return this.#_(`usb`,e)}}async#d(e){let t=this.providers.hid??globalThis.navigator?.hid??null;if(!t?.requestDevice)return this.#g(`hid`,`unavailable`,`WebHID unavailable`);try{let n=await t.requestDevice({filters:e?.filters??[]}),r=Array.isArray(n)?n:n?[n]:[];return r.length===0?this.#g(`hid`,`cancelled`):this.#h({kind:`hid`,device:r[0],devices:r})}catch(e){return this.#_(`hid`,e)}}async#f(e){let t=this.providers.serial??globalThis.navigator?.serial??null;if(!t?.requestPort)return this.#g(`serial`,`unavailable`,`Web Serial unavailable`);try{let n=await t.requestPort(e?.filters?.length?{filters:e.filters}:{});return n?this.#h({kind:`serial`,port:n}):this.#g(`serial`,`cancelled`)}catch(e){return this.#_(`serial`,e)}}async#p(){let e=this.providers.filesystem??(typeof window<`u`&&`showDirectoryPicker`in window&&window||null);if(!e?.showDirectoryPicker)return this.#g(`filesystem`,`unavailable`,`showDirectoryPicker unavailable`);try{let t=await e.showDirectoryPicker({mode:`readwrite`});return this.#h({kind:`filesystem`,handle:t,source:`picker`,permission:`granted`})}catch(e){return this.#_(`filesystem`,e)}}#m(e){let t=e?.url;if(!t)return this.#g(`popup`,`error`,`popup request missing url`);let n=e?.features??`width=500,height=700,popup=yes`,r=this.providers.popup??(typeof window<`u`?{open:(e,t)=>window.open(e,`_blank`,t)}:null);if(!r)return this.#g(`popup`,`unavailable`,`window.open unavailable`);let i;try{i=r.open(t,n)}catch(e){return this.#_(`popup`,e)}return i?this.#h({kind:`popup`,window:i}):this.#g(`popup`,`error`,`window.open returned null (popup blocked?)`)}#h(e){return this.dispatchEvent(new CustomEvent(`slicc-permission-grant`,{detail:e,bubbles:!0,composed:!0})),e}#g(e,t,n){return this.dispatchEvent(new CustomEvent(`slicc-permission-deny`,{detail:{kind:e,reason:t,message:n},bubbles:!0,composed:!0})),null}#_(e,t){return t instanceof Error&&(t.name===`AbortError`||t.name===`NotFoundError`)?this.#g(e,`cancelled`):this.#g(e,`error`,t instanceof Error?t.message:String(t))}#v=e=>{q(e)&&(e.preventDefault(),this.#n++,this.setAttribute(`data-dropping`,``))};#y=e=>{q(e)&&e.preventDefault()};#b=e=>{q(e)&&(this.#n=Math.max(0,this.#n-1),this.#n===0&&this.removeAttribute(`data-dropping`))};#x=e=>{if(!q(e))return;e.preventDefault(),this.#n=0,this.removeAttribute(`data-dropping`);let t=e.dataTransfer?.items;if(!t?.length)return;let n=[];for(let e=0;e<t.length;e++){let r=t[e];r.kind!==`file`||typeof r.getAsFileSystemHandle!=`function`||n.push(r.getAsFileSystemHandle())}n.length!==0&&this.#S(n)};async#S(e){let t;try{t=await Promise.all(e)}catch(e){this.#g(`filesystem`,`error`,e instanceof Error?e.message:String(e));return}let n=t.find(e=>e?.kind===`directory`);if(!n){this.#g(`filesystem`,`cancelled`,`no directory in drop`);return}let r=n,i;if(r.requestPermission)try{i=await r.requestPermission({mode:`readwrite`})}catch(e){this.#g(`filesystem`,`error`,e instanceof Error?e.message:String(e));return}else i=`granted`;if(i!==`granted`){this.#g(`filesystem`,`cancelled`,`permission ${i}`);return}this.#h({kind:`filesystem`,handle:n,source:`drop`,permission:i})}#C(){if(this.#t)return;this.#t=!0;let e=w(`div`,{class:`slicc-permissions__drop-inner`},n(`folder-up`,{size:32}),w(`div`,null,`Drop a folder to mount it (read-write)`));this.#e=w(`div`,{class:`slicc-permissions__drop`,part:`drop`,"aria-hidden":`true`},e),this.append(this.#e)}#w(e,t){let r=e.heading??ii(e.kinds),i=e.grantLabel??`Allow`,a=e.cancelLabel??`Cancel`,o=`slicc-permissions__heading-${Math.random().toString(36).slice(2,8)}`,s=`slicc-permissions__desc-${Math.random().toString(36).slice(2,8)}`,c=w(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`ghost`,part:`prompt-cancel`},a),l=w(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`primary`,part:`prompt-grant`},i),u=w(`div`,{class:`slicc-permissions__prompt-icons`,"aria-hidden":`true`},...e.kinds.map(e=>w(`span`,{class:`slicc-permissions__prompt-icon`},n(ni(e),{size:22})))),d=w(`div`,{class:`slicc-permissions__prompt`,part:`prompt`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":o,"aria-describedby":s,tabindex:`-1`,popover:`manual`},u,w(`h2`,{class:`slicc-permissions__prompt-heading`,id:o},r),w(`p`,{class:`slicc-permissions__prompt-desc`,id:s},e.description),w(`div`,{class:`slicc-permissions__prompt-actions`},c,l));this.append(d);let f=d;if(typeof f.showPopover==`function`)try{f.showPopover()}catch{}let p=!1,m=this.ownerDocument.activeElement??null,h=()=>{if(d.removeEventListener(`keydown`,_),d.remove(),m&&typeof m.focus==`function`)try{m.focus()}catch{}this.#r=null},g=(n,r)=>{if(!p){p=!0;for(let t of e.kinds)this.#g(t,n,r);h(),t({status:`cancelled`,grants:[],reason:n,message:r})}},_=e=>{if(e.key===`Escape`){e.preventDefault(),g(`cancelled`);return}if(e.key===`Tab`){let t=[c,l],n=this.ownerDocument.activeElement,r=t.indexOf(n);if(r===-1){t[0].focus(),e.preventDefault();return}(e.shiftKey?t[(r-1+t.length)%t.length]:t[(r+1)%t.length]).focus(),e.preventDefault()}};c.addEventListener(`click`,()=>g(`cancelled`)),l.addEventListener(`click`,async()=>{if(p)return;p=!0,l.disabled=!0,c.disabled=!0;let n=[],r=null;for(let t of e.kinds){let i=await this.request(t,e.requestOptions?.[t]);if(i)n.push(i);else{r={kind:t,reason:`cancelled`};break}}let i=r?e.kinds.indexOf(r.kind):-1;if(r&&i>=0)for(let t=i+1;t<e.kinds.length;t++)this.#g(e.kinds[t],`cancelled`);h(),t(r?{status:`cancelled`,grants:n,reason:`cancelled`}:{status:`granted`,grants:n})}),d.addEventListener(`keydown`,_),this.#r={cancel:()=>g(`cancelled`)},requestAnimationFrame(()=>{d.setAttribute(`data-open`,``),l.focus()})}};function ni(e){switch(e){case`camera`:return`camera`;case`microphone`:return`mic`;case`screenshare`:return`monitor-up`;case`usb`:return`usb`;case`hid`:return`keyboard`;case`serial`:return`cable`;case`filesystem`:return`folder`;case`popup`:return`external-link`}}function ri(e){switch(e){case`camera`:return`camera`;case`microphone`:return`microphone`;case`screenshare`:return`screen`;case`usb`:return`USB device`;case`hid`:return`HID device`;case`serial`:return`serial port`;case`filesystem`:return`folder`;case`popup`:return`sign-in window`}}function ii(e){if(e.length===1)return`Allow access to your ${ri(e[0])}?`;let t=e.map(ri),n=t.pop();return`Allow access to your ${t.join(`, `)} and ${n}?`}S(`slicc-permissions`,ti);var ai=new Set([`top`,`bottom`,`left`,`right`]),oi=T(`
3354
3354
  :host { position: relative; display: inline-flex; }
3355
3355
  :host([hidden]) { display: none; }
3356
3356
  .tip {
@@ -3375,7 +3375,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3375
3375
  :host(:hover) .tip[data-p="right"], :host(:focus-within) .tip[data-p="right"], :host([open]) .tip[data-p="right"] { transform: translate(0, -50%); }
3376
3376
  .tip:empty { display: none; }
3377
3377
  @media (prefers-reduced-motion: reduce) { .tip { transition: none; } }
3378
- `);w(`slicc-tooltip`,class extends HTMLElement{static observedAttributes=[`label`,`placement`];#e;#t;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[oi],this.#t=E(`span`,{class:`tip`,part:`tip`,role:`tooltip`,"aria-hidden":`true`}),this.#e.replaceChildren(E(`slot`),this.#t)}connectedCallback(){this.#n()}attributeChangedCallback(){this.#n()}get label(){return this.getAttribute(`label`)??``}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get placement(){let e=this.getAttribute(`placement`);return e&&ai.has(e)?e:`top`}set placement(e){this.setAttribute(`placement`,e)}#n(){this.#t.textContent=this.label,this.#t.setAttribute(`data-p`,this.placement)}});var si=18,ci=16,li=50,ui=85,di=2.2,q={cx:55,cy:50,r:38},fi={cx:145,cy:50,r:38},pi=`http://www.w3.org/2000/svg`;function J(e,t,...n){let r=document.createElementNS(pi,e);if(t)for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));for(let e of n)r.appendChild(e);return r}var mi={cone:{vb:`70 330 440 570`,eyes:{top:-18.5,left:17,width:70,height:44},zoom:3,glyph:96},scoop:{vb:`0 0 580 470`,eyes:{top:30,left:15,width:70,height:45},zoom:2.65,glyph:96}},hi={cone:`#D2691E`,scoop:`#FFB6C1`};function gi(e){return e<=li?1:e>=ui?di:1+(e-li)/(ui-li)*(di-1)}function _i(e){let t=e.replace(`#`,``);t.length===3&&(t=t.split(``).map(e=>e+e).join(``));let n=Number.parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255}}function vi(e,t,n){return`#${[e,t,n].map(e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`)).join(``)}`}function yi(e,t){let{r:n,g:r,b:i}=_i(e),a=t<0?0:255,o=Math.abs(t);return vi(n+(a-n)*o,r+(a-r)*o,i+(a-i)*o)}function bi(e,t,n){return[J(`path`,{d:`M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z`,fill:e,stroke:t,"stroke-linejoin":`round`,"stroke-width":20}),J(`path`,{d:`M261.93,482.48h0c15.03-15.03,4.46-40.72-16.79-40.83h0c-21.37-.11-32.14,25.72-17.03,40.83h0c9.34,9.34,24.48,9.34,33.82,0Z`,fill:n}),J(`path`,{d:`M384.85,527.49l-51.82,51.82c-2.24,2.24-2.24,5.86,0,8.1l55.71,55.71c2.24,2.24,5.86,2.24,8.1,0h0c.62-.62,1.08-1.36,1.37-2.19l26.52-77.11c.71-2.07.18-4.36-1.37-5.91l-30.41-30.41c-2.24-2.24-5.86-2.24-8.1,0Z`,fill:n}),J(`rect`,{x:274.59,y:463.59,width:84.73,height:95.66,rx:42.36,ry:42.36,transform:`translate(-268.79 373.91) rotate(-45)`,fill:n}),J(`rect`,{x:291.06,y:603.84,width:72.24,height:90.24,rx:36.12,ry:36.12,transform:`translate(-363.06 421.43) rotate(-45)`,fill:n}),J(`path`,{d:`M371.7,684.58l-25.94,25.94c-2.24,2.24-2.24,5.86,0,8.1l12.67,12.67c2.99,2.99,8.09,1.82,9.46-2.19l13.28-38.61c1.97-5.74-5.17-10.2-9.46-5.91Z`,fill:n}),J(`path`,{d:`M159.42,564.14l2.73,6.83c1.52,3.82,6.46,4.83,9.37,1.93l2.05-2.05c2.24-2.24,2.24-5.86,0-8.1l-4.78-4.78c-4.4-4.4-11.67.39-9.37,6.17Z`,fill:n}),J(`path`,{d:`M243.92,633.11l-48.65-48.65c-5.24-5.24-13.74-5.24-18.99,0h0c-3.8,3.8-4.97,9.49-2.98,14.47l27.77,69.54c3.58,8.95,15.14,11.33,21.96,4.51l20.89-20.89c5.24-5.24,5.24-13.74,0-18.99Z`,fill:n}),J(`path`,{d:`M211.32,533.1h0c14.11-14.11,14.11-36.98,0-51.08l-34.94-34.94c-.72-.72-.72-1.89,0-2.62h0c1.16-1.16.34-3.15-1.3-3.16l-11.23-.06c-25.62-.13-43.23,25.72-33.73,49.51l5.37,13.45c1.82,4.55,4.54,8.68,8,12.15l16.74,16.74c14.11,14.11,36.98,14.11,51.08,0Z`,fill:n}),J(`path`,{d:`M263.74,792.53h0c-5.69,5.69-7.45,14.23-4.46,21.71l22.5,56.36c6.92,17.34,31.68,16.74,37.75-.92l8.66-25.2c2.5-7.28.64-15.35-4.8-20.79l-31.17-31.17c-7.87-7.87-20.62-7.87-28.48,0Z`,fill:n}),J(`path`,{d:`M392.94,503.07l40.81-40.81c2.24-2.24,5.86-2.24,8.1,0l.06.06c2.24,2.24,2.24,5.86,0,8.1l-40.81,40.81c-2.24,2.24-2.24,5.86,0,8.1l22.48,22.48c2.99,2.99,8.09,1.82,9.46-2.19l30.71-89.32c1.27-3.71-1.47-7.57-5.39-7.59l-120.63-.6c-5.11-.03-7.69,6.16-4.08,9.77l51.18,51.18c2.24,2.24,5.86,2.24,8.1,0Z`,fill:n}),J(`rect`,{x:217.18,y:527.25,width:72.24,height:95.66,rx:36.12,ry:36.12,transform:`translate(-332.45 347.55) rotate(-45)`,fill:n}),J(`path`,{d:`M350.28,739.46h0c-9.24-9.24-24.22-9.24-33.46,0l-13.94,13.94c-9.24,9.24-9.24,24.22,0,33.46l6.81,6.81c12.37,12.37,33.42,7.5,39.1-9.04l7.13-20.75c2.94-8.55.75-18.03-5.64-24.42Z`,fill:n}),J(`path`,{d:`M234.18,749.12l13.2,33.06c1.52,3.82,6.46,4.83,9.37,1.93l9.93-9.93c2.24-2.24,2.24-5.86,0-8.1l-23.13-23.13c-4.4-4.4-11.67.39-9.37,6.17Z`,fill:n}),J(`rect`,{x:236.26,y:661.25,width:67.04,height:90.24,rx:33.52,ry:33.52,transform:`translate(-420.46 397.65) rotate(-45)`,fill:n}),J(`ellipse`,{cx:288.37,cy:404.38,rx:182.34,ry:67.01,fill:e,stroke:t,"stroke-miterlimit":10,"stroke-width":20})]}function xi(e,t){return[J(`path`,{d:`M566.75,340.67c0-29.85-12.97-56.87-33.96-76.47,4.8-9.98,7.44-20.71,7.44-31.9,0-38.29-30.62-71.33-74.92-86.77.33-3.07.51-6.17.51-9.3,0-69.72-84.29-126.24-188.26-126.24s-188.26,56.52-188.26,126.24c0,4,.29,7.95.83,11.86-34.94,15.4-58.48,44.25-58.48,77.34,0,18.21,7.15,35.15,19.39,49.26-25.1,19.88-41.05,49.47-41.05,82.54,0,59.85,52.15,108.37,116.49,108.37,10.83,0,21.3-1.4,31.26-3.98,31.42,41.91,83.55,69.34,142.55,69.34,64.73,0,121.2-33,151.11-81.94,63.8-.57,115.34-48.85,115.34-108.34Z`,fill:e,stroke:t,"stroke-width":20})]}function Si(e,t,n,r,i){return[J(`g`,{class:`eye-blink eye-${r}`},J(`circle`,{cx:e,cy:t,r:n,fill:`#fff`,stroke:`#000`,"stroke-width":4}),J(`g`,{class:`pupil pupil-${r}`},J(`circle`,{cx:e,cy:t,r:i,fill:`#000`}),J(`circle`,{cx:e-i*.3,cy:t-i*.35,r:i*.4,fill:`#fff`})))]}function Ci(e,t,n){return[J(`circle`,{cx:e,cy:t,r:n,fill:`#fff`,stroke:`#000`,"stroke-width":4}),J(`line`,{x1:e-15,y1:t-15,x2:e+15,y2:t+15,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`}),J(`line`,{x1:e+15,y1:t-15,x2:e-15,y2:t+15,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`})]}function wi(e,t){if(e===`none`)return null;let n=q,r=fi;return J(`svg`,{class:`eyes-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...e===`dead`?[...Ci(n.cx,n.cy,n.r),...Ci(r.cx,r.cy,r.r)]:[...Si(n.cx,n.cy,n.r,`l`,t),...Si(r.cx,r.cy,r.r,`r`,t)])}function Ti(e,t,n,r,i,a){let o=r-t,s=i-n,c=Math.hypot(o,s),l=Math.min(c,a),u=c>0?o/c*l:0,d=c>0?s/c*l:0;e.setAttribute(`transform`,`translate(${u},${d})`)}var Ei=D(`
3378
+ `);S(`slicc-tooltip`,class extends HTMLElement{static observedAttributes=[`label`,`placement`];#e;#t;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[oi],this.#t=w(`span`,{class:`tip`,part:`tip`,role:`tooltip`,"aria-hidden":`true`}),this.#e.replaceChildren(w(`slot`),this.#t)}connectedCallback(){this.#n()}attributeChangedCallback(){this.#n()}get label(){return this.getAttribute(`label`)??``}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get placement(){let e=this.getAttribute(`placement`);return e&&ai.has(e)?e:`top`}set placement(e){this.setAttribute(`placement`,e)}#n(){this.#t.textContent=this.label,this.#t.setAttribute(`data-p`,this.placement)}});var si=18,ci=16,li=50,ui=85,di=2.2,J={cx:55,cy:50,r:38},fi={cx:145,cy:50,r:38},pi=`http://www.w3.org/2000/svg`;function Y(e,t,...n){let r=document.createElementNS(pi,e);if(t)for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));for(let e of n)r.appendChild(e);return r}var mi={cone:{vb:`70 330 440 570`,eyes:{top:-18.5,left:17,width:70,height:44},zoom:3,glyph:96},scoop:{vb:`0 0 580 470`,eyes:{top:30,left:15,width:70,height:45},zoom:2.65,glyph:96}},hi={cone:`#D2691E`,scoop:`#FFB6C1`};function gi(e){return e<=li?1:e>=ui?di:1+(e-li)/(ui-li)*(di-1)}function _i(e){let t=e.replace(`#`,``);t.length===3&&(t=t.split(``).map(e=>e+e).join(``));let n=Number.parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255}}function vi(e,t,n){return`#${[e,t,n].map(e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`)).join(``)}`}function yi(e,t){let{r:n,g:r,b:i}=_i(e),a=t<0?0:255,o=Math.abs(t);return vi(n+(a-n)*o,r+(a-r)*o,i+(a-i)*o)}function bi(e,t,n){return[Y(`path`,{d:`M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z`,fill:e,stroke:t,"stroke-linejoin":`round`,"stroke-width":20}),Y(`path`,{d:`M261.93,482.48h0c15.03-15.03,4.46-40.72-16.79-40.83h0c-21.37-.11-32.14,25.72-17.03,40.83h0c9.34,9.34,24.48,9.34,33.82,0Z`,fill:n}),Y(`path`,{d:`M384.85,527.49l-51.82,51.82c-2.24,2.24-2.24,5.86,0,8.1l55.71,55.71c2.24,2.24,5.86,2.24,8.1,0h0c.62-.62,1.08-1.36,1.37-2.19l26.52-77.11c.71-2.07.18-4.36-1.37-5.91l-30.41-30.41c-2.24-2.24-5.86-2.24-8.1,0Z`,fill:n}),Y(`rect`,{x:274.59,y:463.59,width:84.73,height:95.66,rx:42.36,ry:42.36,transform:`translate(-268.79 373.91) rotate(-45)`,fill:n}),Y(`rect`,{x:291.06,y:603.84,width:72.24,height:90.24,rx:36.12,ry:36.12,transform:`translate(-363.06 421.43) rotate(-45)`,fill:n}),Y(`path`,{d:`M371.7,684.58l-25.94,25.94c-2.24,2.24-2.24,5.86,0,8.1l12.67,12.67c2.99,2.99,8.09,1.82,9.46-2.19l13.28-38.61c1.97-5.74-5.17-10.2-9.46-5.91Z`,fill:n}),Y(`path`,{d:`M159.42,564.14l2.73,6.83c1.52,3.82,6.46,4.83,9.37,1.93l2.05-2.05c2.24-2.24,2.24-5.86,0-8.1l-4.78-4.78c-4.4-4.4-11.67.39-9.37,6.17Z`,fill:n}),Y(`path`,{d:`M243.92,633.11l-48.65-48.65c-5.24-5.24-13.74-5.24-18.99,0h0c-3.8,3.8-4.97,9.49-2.98,14.47l27.77,69.54c3.58,8.95,15.14,11.33,21.96,4.51l20.89-20.89c5.24-5.24,5.24-13.74,0-18.99Z`,fill:n}),Y(`path`,{d:`M211.32,533.1h0c14.11-14.11,14.11-36.98,0-51.08l-34.94-34.94c-.72-.72-.72-1.89,0-2.62h0c1.16-1.16.34-3.15-1.3-3.16l-11.23-.06c-25.62-.13-43.23,25.72-33.73,49.51l5.37,13.45c1.82,4.55,4.54,8.68,8,12.15l16.74,16.74c14.11,14.11,36.98,14.11,51.08,0Z`,fill:n}),Y(`path`,{d:`M263.74,792.53h0c-5.69,5.69-7.45,14.23-4.46,21.71l22.5,56.36c6.92,17.34,31.68,16.74,37.75-.92l8.66-25.2c2.5-7.28.64-15.35-4.8-20.79l-31.17-31.17c-7.87-7.87-20.62-7.87-28.48,0Z`,fill:n}),Y(`path`,{d:`M392.94,503.07l40.81-40.81c2.24-2.24,5.86-2.24,8.1,0l.06.06c2.24,2.24,2.24,5.86,0,8.1l-40.81,40.81c-2.24,2.24-2.24,5.86,0,8.1l22.48,22.48c2.99,2.99,8.09,1.82,9.46-2.19l30.71-89.32c1.27-3.71-1.47-7.57-5.39-7.59l-120.63-.6c-5.11-.03-7.69,6.16-4.08,9.77l51.18,51.18c2.24,2.24,5.86,2.24,8.1,0Z`,fill:n}),Y(`rect`,{x:217.18,y:527.25,width:72.24,height:95.66,rx:36.12,ry:36.12,transform:`translate(-332.45 347.55) rotate(-45)`,fill:n}),Y(`path`,{d:`M350.28,739.46h0c-9.24-9.24-24.22-9.24-33.46,0l-13.94,13.94c-9.24,9.24-9.24,24.22,0,33.46l6.81,6.81c12.37,12.37,33.42,7.5,39.1-9.04l7.13-20.75c2.94-8.55.75-18.03-5.64-24.42Z`,fill:n}),Y(`path`,{d:`M234.18,749.12l13.2,33.06c1.52,3.82,6.46,4.83,9.37,1.93l9.93-9.93c2.24-2.24,2.24-5.86,0-8.1l-23.13-23.13c-4.4-4.4-11.67.39-9.37,6.17Z`,fill:n}),Y(`rect`,{x:236.26,y:661.25,width:67.04,height:90.24,rx:33.52,ry:33.52,transform:`translate(-420.46 397.65) rotate(-45)`,fill:n}),Y(`ellipse`,{cx:288.37,cy:404.38,rx:182.34,ry:67.01,fill:e,stroke:t,"stroke-miterlimit":10,"stroke-width":20})]}function xi(e,t){return[Y(`path`,{d:`M566.75,340.67c0-29.85-12.97-56.87-33.96-76.47,4.8-9.98,7.44-20.71,7.44-31.9,0-38.29-30.62-71.33-74.92-86.77.33-3.07.51-6.17.51-9.3,0-69.72-84.29-126.24-188.26-126.24s-188.26,56.52-188.26,126.24c0,4,.29,7.95.83,11.86-34.94,15.4-58.48,44.25-58.48,77.34,0,18.21,7.15,35.15,19.39,49.26-25.1,19.88-41.05,49.47-41.05,82.54,0,59.85,52.15,108.37,116.49,108.37,10.83,0,21.3-1.4,31.26-3.98,31.42,41.91,83.55,69.34,142.55,69.34,64.73,0,121.2-33,151.11-81.94,63.8-.57,115.34-48.85,115.34-108.34Z`,fill:e,stroke:t,"stroke-width":20})]}function Si(e,t,n,r,i){return[Y(`g`,{class:`eye-blink eye-${r}`},Y(`circle`,{cx:e,cy:t,r:n,fill:`#fff`,stroke:`#000`,"stroke-width":4}),Y(`g`,{class:`pupil pupil-${r}`},Y(`circle`,{cx:e,cy:t,r:i,fill:`#000`}),Y(`circle`,{cx:e-i*.3,cy:t-i*.35,r:i*.4,fill:`#fff`})))]}function Ci(e,t,n){return[Y(`circle`,{cx:e,cy:t,r:n,fill:`#fff`,stroke:`#000`,"stroke-width":4}),Y(`line`,{x1:e-15,y1:t-15,x2:e+15,y2:t+15,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`}),Y(`line`,{x1:e+15,y1:t-15,x2:e-15,y2:t+15,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`})]}function wi(e,t){if(e===`none`)return null;let n=J,r=fi;return Y(`svg`,{class:`eyes-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...e===`dead`?[...Ci(n.cx,n.cy,n.r),...Ci(r.cx,r.cy,r.r)]:[...Si(n.cx,n.cy,n.r,`l`,t),...Si(r.cx,r.cy,r.r,`r`,t)])}function Ti(e,t,n,r,i,a){let o=r-t,s=i-n,c=Math.hypot(o,s),l=Math.min(c,a),u=c>0?o/c*l:0,d=c>0?s/c*l:0;e.setAttribute(`transform`,`translate(${u},${d})`)}var Ei=T(`
3379
3379
  :host{position:relative;display:inline-block;--pill-w:190px;--label:#eef1f6;--icon-tint:color-mix(in oklab,var(--accent) 22%,transparent);}
3380
3380
  @media (prefers-color-scheme: light){:host(:not([theme="dark"])){--label:#1b2030;--icon-tint:color-mix(in oklab,var(--accent) 30%,#fff);}}
3381
3381
  /* The library's class-based dark scope (body.dark / .dark / [data-theme=dark])
@@ -3422,7 +3422,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3422
3422
  :host([compact]:hover) .tip,:host([compact]:focus-within) .tip{opacity:1;transform:translateX(-50%);}
3423
3423
  @media (max-width:560px){ :host(:hover) .tip,:host(:focus-within) .tip{opacity:1;transform:translateX(-50%);} }
3424
3424
  @media (prefers-reduced-motion: reduce){ .tip{transition:none;} }
3425
- `);w(`slicc-pill`,class extends HTMLElement{static observedAttributes=[`type`,`color`,`eyes`,`active`,`label`,`pupil`,`fill`,`theme`];#e;#t=null;#n=null;#r=null;#i=null;#a=ci;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ei]}connectedCallback(){this.#o(),this.#s()}disconnectedCallback(){this.#c()}attributeChangedCallback(){this.isConnected&&(this.#o(),this.#s())}get type(){return this.getAttribute(`type`)===`cone`?`cone`:`scoop`}set type(e){this.setAttribute(`type`,e===`cone`?`cone`:`scoop`)}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get eyeState(){let e=this.getAttribute(`eyes`);return e===`none`||e===`dead`?e:`open`}set eyeState(e){this.setAttribute(`eyes`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get compact(){return this.hasAttribute(`compact`)}set compact(e){this.toggleAttribute(`compact`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get theme(){let e=this.getAttribute(`theme`);return e===`light`||e===`dark`?e:null}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}get pupilScale(){let e=Number.parseFloat(this.getAttribute(`pupil`)??``);if(Number.isFinite(e))return Math.max(.3,Math.min(2.4,e));let t=Number.parseFloat(this.getAttribute(`fill`)??``);return Number.isFinite(t)?gi(Math.max(0,Math.min(100,t))):1}#o(){let e=this.type,t=mi[e],n=this.color??hi[e],r=this.active,i=this.label,a=e===`cone`?bi(n,yi(n,-.38),yi(n,.3)):xi(n,yi(n,-.32)),o=t.eyes,s=(o.left+o.width/2)/100,c=(o.top+o.height/2)/100,l=((.5-t.zoom*s)*100).toFixed(2),u=((.5-t.zoom*c)*100).toFixed(2),d=o.left/100,f=(o.left+o.width)/100,p=o.top/100,m=(o.top+o.height)/100,h=Math.min(0,d),g=Math.max(1,f),_=Math.min(0,p),v=Math.max(1,m),y=Math.min(1,1/Math.max(g-h,v-_)),b=((.5-y*(h+g)/2)*100).toFixed(2),x=((.5-y*(_+v)/2)*100).toFixed(2),ee=si*this.pupilScale;this.#a=Math.max(2,Math.min(ci,q.r-ee-4));let te=J(`svg`,{class:`glyph`,viewBox:t.vb,preserveAspectRatio:`xMidYMid meet`,style:`--g:${t.glyph}%`},...a),ne=wi(this.eyeState,ee),re=E(`span`,{class:`eyes`,style:`top:${o.top}%;left:${o.left}%;width:${o.width}%;height:${o.height}%`});ne&&re.append(ne);let ie=E(`span`,{class:`icon`,part:`icon`},E(`span`,{class:`icon-inner`,style:`--tx:${l}%;--ty:${u}%;--zoom:${t.zoom};--ox:${b}%;--oy:${x}%;--ozoom:${y.toFixed(4)}`},te,re)),ae=E(`span`,{class:`label`,part:`label`},i??E(`slot`)),oe=E(`button`,{class:`pill ${r?`active`:``}`,part:`pill`,style:`--accent:${n}`,"aria-label":i||!1},ie,ae),S=i?E(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},i):null;this.#e.replaceChildren(oe,...S?[S]:[]),this.#n=this.#e.querySelector(`.pupil-l`),this.#r=this.#e.querySelector(`.pupil-r`),this.#i=this.#e.querySelector(`.eyes-svg`)}#s(){let e=this.eyeState===`open`&&this.type===`cone`;e&&!this.#t?(this.#t=e=>this.#l(e),document.addEventListener(`mousemove`,this.#t)):!e&&this.#t&&this.#c()}#c(){this.#t&&=(document.removeEventListener(`mousemove`,this.#t),null)}#l(e){if(!this.#i||!this.#n||!this.#r)return;let t=this.#i.getBoundingClientRect();if(!t.width||!t.height)return;let n=(e.clientX-t.left)*(200/t.width),r=(e.clientY-t.top)*(100/t.height);Ti(this.#n,q.cx,q.cy,n,r,this.#a),Ti(this.#r,fi.cx,fi.cy,n,r,this.#a)}});var Di=D(`
3425
+ `);S(`slicc-pill`,class extends HTMLElement{static observedAttributes=[`type`,`color`,`eyes`,`active`,`label`,`pupil`,`fill`,`theme`];#e;#t=null;#n=null;#r=null;#i=null;#a=ci;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ei]}connectedCallback(){this.#o(),this.#s()}disconnectedCallback(){this.#c()}attributeChangedCallback(){this.isConnected&&(this.#o(),this.#s())}get type(){return this.getAttribute(`type`)===`cone`?`cone`:`scoop`}set type(e){this.setAttribute(`type`,e===`cone`?`cone`:`scoop`)}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get eyeState(){let e=this.getAttribute(`eyes`);return e===`none`||e===`dead`?e:`open`}set eyeState(e){this.setAttribute(`eyes`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get compact(){return this.hasAttribute(`compact`)}set compact(e){this.toggleAttribute(`compact`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get theme(){let e=this.getAttribute(`theme`);return e===`light`||e===`dark`?e:null}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}get pupilScale(){let e=Number.parseFloat(this.getAttribute(`pupil`)??``);if(Number.isFinite(e))return Math.max(.3,Math.min(2.4,e));let t=Number.parseFloat(this.getAttribute(`fill`)??``);return Number.isFinite(t)?gi(Math.max(0,Math.min(100,t))):1}#o(){let e=this.type,t=mi[e],n=this.color??hi[e],r=this.active,i=this.label,a=e===`cone`?bi(n,yi(n,-.38),yi(n,.3)):xi(n,yi(n,-.32)),o=t.eyes,s=(o.left+o.width/2)/100,c=(o.top+o.height/2)/100,l=((.5-t.zoom*s)*100).toFixed(2),u=((.5-t.zoom*c)*100).toFixed(2),d=o.left/100,f=(o.left+o.width)/100,p=o.top/100,m=(o.top+o.height)/100,h=Math.min(0,d),g=Math.max(1,f),_=Math.min(0,p),v=Math.max(1,m),y=Math.min(1,1/Math.max(g-h,v-_)),ee=((.5-y*(h+g)/2)*100).toFixed(2),b=((.5-y*(_+v)/2)*100).toFixed(2),te=si*this.pupilScale;this.#a=Math.max(2,Math.min(ci,J.r-te-4));let ne=Y(`svg`,{class:`glyph`,viewBox:t.vb,preserveAspectRatio:`xMidYMid meet`,style:`--g:${t.glyph}%`},...a),re=wi(this.eyeState,te),ie=w(`span`,{class:`eyes`,style:`top:${o.top}%;left:${o.left}%;width:${o.width}%;height:${o.height}%`});re&&ie.append(re);let ae=w(`span`,{class:`icon`,part:`icon`},w(`span`,{class:`icon-inner`,style:`--tx:${l}%;--ty:${u}%;--zoom:${t.zoom};--ox:${ee}%;--oy:${b}%;--ozoom:${y.toFixed(4)}`},ne,ie)),oe=w(`span`,{class:`label`,part:`label`},i??w(`slot`)),se=w(`button`,{class:`pill ${r?`active`:``}`,part:`pill`,style:`--accent:${n}`,"aria-label":i||!1},ae,oe),ce=i?w(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},i):null;this.#e.replaceChildren(se,...ce?[ce]:[]),this.#n=this.#e.querySelector(`.pupil-l`),this.#r=this.#e.querySelector(`.pupil-r`),this.#i=this.#e.querySelector(`.eyes-svg`)}#s(){let e=this.eyeState===`open`&&this.type===`cone`;e&&!this.#t?(this.#t=e=>this.#l(e),document.addEventListener(`mousemove`,this.#t)):!e&&this.#t&&this.#c()}#c(){this.#t&&=(document.removeEventListener(`mousemove`,this.#t),null)}#l(e){if(!this.#i||!this.#n||!this.#r)return;let t=this.#i.getBoundingClientRect();if(!t.width||!t.height)return;let n=(e.clientX-t.left)*(200/t.width),r=(e.clientY-t.top)*(100/t.height);Ti(this.#n,J.cx,J.cy,n,r,this.#a),Ti(this.#r,fi.cx,fi.cy,n,r,this.#a)}});var Di=T(`
3426
3426
  :host {
3427
3427
  display: inline-grid;
3428
3428
  place-items: center;
@@ -3469,7 +3469,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3469
3469
  object-fit: cover;
3470
3470
  display: block;
3471
3471
  }
3472
- `),Oi=class extends HTMLElement{static observedAttributes=[`initials`,`name`,`src`,`email`,`size`,`label`];#e;#t=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Di],this.addEventListener(`click`,this.#i),this.addEventListener(`keydown`,this.#a)}connectedCallback(){this.hasAttribute(`role`)||this.setAttribute(`role`,`button`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`0`),this.#o()}disconnectedCallback(){this.#t++}attributeChangedCallback(e,t,n){e===`size`&&this.#r(n),this.isConnected&&this.#o()}get initials(){return this.getAttribute(`initials`)}set initials(e){e==null?this.removeAttribute(`initials`):this.setAttribute(`initials`,e)}get name(){return this.getAttribute(`name`)}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,e)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get email(){return this.getAttribute(`email`)}set email(e){e==null?this.removeAttribute(`email`):this.setAttribute(`email`,e)}get size(){return this.getAttribute(`size`)}set size(e){e==null?this.removeAttribute(`size`):this.setAttribute(`size`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get resolvedInitials(){let e=this.initials;return e!=null&&e.trim()!==``?e.trim().slice(0,2).toUpperCase():Ai(this.name)||`?`}async gravatarUrl(e=this.email){let t=e?.trim().toLowerCase();return t?`https://www.gravatar.com/avatar/${await ki(t)}?s=${this.#n()}&d=404`:null}#n(){let e=this.getBoundingClientRect().width;return Math.max(1,Math.round((e>0?e:30)*2))}#r(e){e==null||e.trim()===``?this.style.removeProperty(`--avatar-size`):this.style.setProperty(`--avatar-size`,e)}#i=()=>{this.dispatchEvent(new CustomEvent(`slicc-avatar-click`,{bubbles:!0,composed:!0}))};#a=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.click())};#o(){let e=++this.#t,t=this.src,n=this.email,r=this.resolvedInitials,i=this.label??this.name??(r===`?`?`Account`:r);this.setAttribute(`aria-label`,i);let a=[E(`span`,{class:`ini`,part:`initials`},r)];if(t){let n=E(`img`,{class:`img`,part:`image`,src:t,alt:i});n.addEventListener(`load`,()=>{e===this.#t&&this.#e.querySelector(`.me`)?.classList.add(`has-img`)}),n.addEventListener(`error`,()=>{e===this.#t&&(n.remove(),this.#e.querySelector(`.me`)?.classList.remove(`has-img`))}),a.push(n)}let o=E(`div`,{class:`me`,part:`avatar`},E(`slot`,null,...a));this.#e.replaceChildren(o),!t&&n&&this.#s(n,e)}#s(e,t){this.gravatarUrl(e).then(e=>{if(!e||t!==this.#t)return;let n=new Image;n.onload=()=>{if(t!==this.#t||!this.isConnected)return;let n=this.#e.querySelector(`.me`);n&&(n.style.backgroundImage=`url("${e}")`,n.classList.add(`has-img`))},n.src=e}).catch(()=>{})}};async function ki(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Ai(e){if(!e)return``;let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}w(`slicc-avatar`,Oi);var ji=D(`
3472
+ `),Oi=class extends HTMLElement{static observedAttributes=[`initials`,`name`,`src`,`email`,`size`,`label`];#e;#t=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Di],this.addEventListener(`click`,this.#i),this.addEventListener(`keydown`,this.#a)}connectedCallback(){this.hasAttribute(`role`)||this.setAttribute(`role`,`button`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`0`),this.#o()}disconnectedCallback(){this.#t++}attributeChangedCallback(e,t,n){e===`size`&&this.#r(n),this.isConnected&&this.#o()}get initials(){return this.getAttribute(`initials`)}set initials(e){e==null?this.removeAttribute(`initials`):this.setAttribute(`initials`,e)}get name(){return this.getAttribute(`name`)}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,e)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get email(){return this.getAttribute(`email`)}set email(e){e==null?this.removeAttribute(`email`):this.setAttribute(`email`,e)}get size(){return this.getAttribute(`size`)}set size(e){e==null?this.removeAttribute(`size`):this.setAttribute(`size`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get resolvedInitials(){let e=this.initials;return e!=null&&e.trim()!==``?e.trim().slice(0,2).toUpperCase():Ai(this.name)||`?`}async gravatarUrl(e=this.email){let t=e?.trim().toLowerCase();return t?`https://www.gravatar.com/avatar/${await ki(t)}?s=${this.#n()}&d=404`:null}#n(){let e=this.getBoundingClientRect().width;return Math.max(1,Math.round((e>0?e:30)*2))}#r(e){e==null||e.trim()===``?this.style.removeProperty(`--avatar-size`):this.style.setProperty(`--avatar-size`,e)}#i=()=>{this.dispatchEvent(new CustomEvent(`slicc-avatar-click`,{bubbles:!0,composed:!0}))};#a=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.click())};#o(){let e=++this.#t,t=this.src,n=this.email,r=this.resolvedInitials,i=this.label??this.name??(r===`?`?`Account`:r);this.setAttribute(`aria-label`,i);let a=[w(`span`,{class:`ini`,part:`initials`},r)];if(t){let n=w(`img`,{class:`img`,part:`image`,src:t,alt:i});n.addEventListener(`load`,()=>{e===this.#t&&this.#e.querySelector(`.me`)?.classList.add(`has-img`)}),n.addEventListener(`error`,()=>{e===this.#t&&(n.remove(),this.#e.querySelector(`.me`)?.classList.remove(`has-img`))}),a.push(n)}let o=w(`div`,{class:`me`,part:`avatar`},w(`slot`,null,...a));this.#e.replaceChildren(o),!t&&n&&this.#s(n,e)}#s(e,t){this.gravatarUrl(e).then(e=>{if(!e||t!==this.#t)return;let n=new Image;n.onload=()=>{if(t!==this.#t||!this.isConnected)return;let n=this.#e.querySelector(`.me`);n&&(n.style.backgroundImage=`url("${e}")`,n.classList.add(`has-img`))},n.src=e}).catch(()=>{})}};async function ki(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Ai(e){if(!e)return``;let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}S(`slicc-avatar`,Oi);var ji=T(`
3473
3473
  :host { display: inline-flex; flex: 0 0 auto; }
3474
3474
  :host([hidden]) { display: none; }
3475
3475
  .col {
@@ -3490,7 +3490,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3490
3490
  .col:hover { background: var(--ghost); color: var(--ink); }
3491
3491
  .icon { display: inline-flex; place-items: center; pointer-events: none; }
3492
3492
  .icon svg { display: block; }
3493
- `),Mi=`panel-right-close`,Ni=`Collapse`,Pi=16;w(`slicc-collapse-btn`,class extends HTMLElement{static observedAttributes=[`label`,`icon`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ji]}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get label(){return this.getAttribute(`label`)??Ni}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)??Mi}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}#n(){let e=this.label,t=n(this.icon,{size:Pi,part:`icon`}),r=E(`button`,{class:`col`,part:`button`,type:`button`,"aria-label":e,title:e},E(`slot`,null,E(`span`,{class:`icon`},t)));r.addEventListener(`click`,this.#r),this.#t=r,this.#e.replaceChildren(r)}#r=()=>{this.dispatchEvent(new CustomEvent(`collapse`,{bubbles:!0,composed:!0}))}});function Fi(e){return e.replace(`claude-`,``)}function Ii(e){return e==null||e===0?``:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(e)}var Li=D(`
3493
+ `),Mi=`panel-right-close`,Ni=`Collapse`,Pi=16;S(`slicc-collapse-btn`,class extends HTMLElement{static observedAttributes=[`label`,`icon`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ji]}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get label(){return this.getAttribute(`label`)??Ni}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)??Mi}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}#n(){let e=this.label,t=n(this.icon,{size:Pi,part:`icon`}),r=w(`button`,{class:`col`,part:`button`,type:`button`,"aria-label":e,title:e},w(`slot`,null,w(`span`,{class:`icon`},t)));r.addEventListener(`click`,this.#r),this.#t=r,this.#e.replaceChildren(r)}#r=()=>{this.dispatchEvent(new CustomEvent(`collapse`,{bubbles:!0,composed:!0}))}});function Fi(e){return e.replace(`claude-`,``)}function Ii(e){return e==null||e===0?``:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(e)}var Li=T(`
3494
3494
  :host {
3495
3495
  position: absolute;
3496
3496
  top: calc(100% + 8px);
@@ -3602,7 +3602,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3602
3602
  font-variant-numeric: tabular-nums;
3603
3603
  color: var(--ink);
3604
3604
  }
3605
- `);w(`slicc-cost-overlay`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Li]}connectedCallback(){this.#r()}attributeChangedCallback(){this.isConnected&&this.#r()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,!!e)}get models(){return this.#t}set models(e){this.#t=e,this.isConnected&&this.#r()}get scoops(){return this.#n}set scoops(e){this.#n=e,this.isConnected&&this.#r()}#r(){let e=[];if(this.#t.length>0){let t=this.#t.map(e=>{let t=Ii(e.tokens);return E(`div`,{class:`model-row`},E(`span`,{class:`model-name`},Fi(e.model)),t?E(`span`,{class:`model-tokens`},t):!1,E(`span`,{class:`model-cost`},`$${e.cost.toFixed(2)}`))});e.push(E(`div`,{class:`section section--models`},E(`div`,{class:`section-title`},`BY MODEL`),...t))}if(this.#n.length>0){let t=this.#n.map(e=>E(`div`,{class:`scoop-row`},E(`span`,{class:`scoop-name`},e.name),E(`span`,{class:`scoop-cost`},`$${e.cost.toFixed(2)}`)));e.push(E(`div`,{class:`section section--scoops`},E(`div`,{class:`section-title`},`BY AGENT`),...t))}let t=this.#t.reduce((e,t)=>e+t.cost,0);e.push(E(`div`,{class:`total-row`},E(`span`,{class:`total-label`},`Total`),E(`span`,{class:`total-cost`},`$${t.toFixed(2)}`)));let n=E(`div`,{class:`card`},...e);this.#e.replaceChildren(n)}});var Ri=D(`
3605
+ `);S(`slicc-cost-overlay`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Li]}connectedCallback(){this.#r()}attributeChangedCallback(){this.isConnected&&this.#r()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,!!e)}get models(){return this.#t}set models(e){this.#t=e,this.isConnected&&this.#r()}get scoops(){return this.#n}set scoops(e){this.#n=e,this.isConnected&&this.#r()}#r(){let e=[];if(this.#t.length>0){let t=this.#t.map(e=>{let t=Ii(e.tokens);return w(`div`,{class:`model-row`},w(`span`,{class:`model-name`},Fi(e.model)),t?w(`span`,{class:`model-tokens`},t):!1,w(`span`,{class:`model-cost`},`$${e.cost.toFixed(2)}`))});e.push(w(`div`,{class:`section section--models`},w(`div`,{class:`section-title`},`BY MODEL`),...t))}if(this.#n.length>0){let t=this.#n.map(e=>w(`div`,{class:`scoop-row`},w(`span`,{class:`scoop-name`},e.name),w(`span`,{class:`scoop-cost`},`$${e.cost.toFixed(2)}`)));e.push(w(`div`,{class:`section section--scoops`},w(`div`,{class:`section-title`},`BY AGENT`),...t))}let t=this.#t.reduce((e,t)=>e+t.cost,0);e.push(w(`div`,{class:`total-row`},w(`span`,{class:`total-label`},`Total`),w(`span`,{class:`total-cost`},`$${t.toFixed(2)}`)));let n=w(`div`,{class:`card`},...e);this.#e.replaceChildren(n)}});var Ri=T(`
3606
3606
  :host {
3607
3607
  display: flex;
3608
3608
  align-items: center;
@@ -3631,7 +3631,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3631
3631
  min-width: 0;
3632
3632
  background: var(--line, #e5e5e5);
3633
3633
  }
3634
- `);w(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ri]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label??E(`slot`);this.#e.replaceChildren(E(`span`,{class:`label`,part:`label`},e))}});var zi=`CLI float`;function Bi(e){if(e==null)return null;let t=e.trim();if(t===``)return null;let n=Number.parseFloat(t.replace(/^\$/,``));return Number.isFinite(n)?`$${n.toFixed(2)}`:null}var Vi=`(max-width: 560px)`,Hi=D(`
3634
+ `);S(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ri]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label??w(`slot`);this.#e.replaceChildren(w(`span`,{class:`label`,part:`label`},e))}});var zi=`CLI float`;function Bi(e){if(e==null)return null;let t=e.trim();if(t===``)return null;let n=Number.parseFloat(t.replace(/^\$/,``));return Number.isFinite(n)?`$${n.toFixed(2)}`:null}var Vi=`(max-width: 560px)`,Hi=T(`
3635
3635
  :host {
3636
3636
  position: relative;
3637
3637
  display: inline-flex;
@@ -3742,7 +3742,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3742
3742
  @media (prefers-reduced-motion: reduce) {
3743
3743
  .tip { transition: none; }
3744
3744
  }
3745
- `);w(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`online`,`spent`];#e;#t;#n=()=>{this.isConnected&&this.#c()};#r=null;#i=[];#a=[];#o;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Hi],this.#t=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(Vi):null}connectedCallback(){this.#t?.addEventListener(`change`,this.#n),this.#l()}disconnectedCallback(){this.#t?.removeEventListener(`change`,this.#n),clearTimeout(this.#o)}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.#l()}get label(){return this.getAttribute(`label`)??zi}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get linked(){return this.hasAttribute(`linked`)}set linked(e){this.toggleAttribute(`linked`,!!e)}get online(){return this.hasAttribute(`online`)}set online(e){this.toggleAttribute(`online`,!!e)}get spent(){return this.getAttribute(`spent`)}set spent(e){e==null?this.removeAttribute(`spent`):this.setAttribute(`spent`,String(e))}get costModels(){return this.#i}set costModels(e){this.#i=e,this.#r&&(this.#r.models=e)}get costScoops(){return this.#a}set costScoops(e){this.#a=e,this.#r&&(this.#r.scoops=e)}#s(){let e=[this.label],t=Bi(this.spent);return t!=null&&e.push(t),e.push(this.online?`online`:`offline`),e.join(` · `)}#c(){this.#t?.matches?this.setAttribute(`title`,this.#s()):this.removeAttribute(`title`)}#l(){let e=[];this.online&&e.push(E(`span`,{class:`fdot`,part:`dot`})),e.push(E(`span`,{class:`label`,part:`label`},E(`slot`,null,this.label)));let t=Bi(this.spent);if(t!=null){e.push(E(`span`,{class:`sep`,part:`sep`}));let r=E(`span`,{class:`spent`,part:`spent`},n(`circle-dollar-sign`,{size:12}),E(`span`,{class:`amount`},t));r.addEventListener(`mouseenter`,()=>this.#u()),r.addEventListener(`mouseleave`,()=>this.#d()),e.push(r)}e.push(E(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},this.#s())),this.#r=null,this.#e.replaceChildren(...e),this.#c()}#u(){if(clearTimeout(this.#o),!this.#r){let e=document.createElement(`slicc-cost-overlay`);e.models=this.#i,e.scoops=this.#a,e.addEventListener(`mouseenter`,()=>this.#u()),e.addEventListener(`mouseleave`,()=>this.#d()),this.#e.appendChild(e),this.#r=e}this.#r.toggleAttribute(`open`,!0)}#d(){this.#o=setTimeout(()=>{this.#r&&this.#r.removeAttribute(`open`)},150)}});var Ui=D(`
3745
+ `);S(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`online`,`spent`];#e;#t;#n=()=>{this.isConnected&&this.#c()};#r=null;#i=[];#a=[];#o;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Hi],this.#t=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(Vi):null}connectedCallback(){this.#t?.addEventListener(`change`,this.#n),this.#l()}disconnectedCallback(){this.#t?.removeEventListener(`change`,this.#n),clearTimeout(this.#o)}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.#l()}get label(){return this.getAttribute(`label`)??zi}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get linked(){return this.hasAttribute(`linked`)}set linked(e){this.toggleAttribute(`linked`,!!e)}get online(){return this.hasAttribute(`online`)}set online(e){this.toggleAttribute(`online`,!!e)}get spent(){return this.getAttribute(`spent`)}set spent(e){e==null?this.removeAttribute(`spent`):this.setAttribute(`spent`,String(e))}get costModels(){return this.#i}set costModels(e){this.#i=e,this.#r&&(this.#r.models=e)}get costScoops(){return this.#a}set costScoops(e){this.#a=e,this.#r&&(this.#r.scoops=e)}#s(){let e=[this.label],t=Bi(this.spent);return t!=null&&e.push(t),e.push(this.online?`online`:`offline`),e.join(` · `)}#c(){this.#t?.matches?this.setAttribute(`title`,this.#s()):this.removeAttribute(`title`)}#l(){let e=[];this.online&&e.push(w(`span`,{class:`fdot`,part:`dot`})),e.push(w(`span`,{class:`label`,part:`label`},w(`slot`,null,this.label)));let t=Bi(this.spent);if(t!=null){e.push(w(`span`,{class:`sep`,part:`sep`}));let r=w(`span`,{class:`spent`,part:`spent`},n(`circle-dollar-sign`,{size:12}),w(`span`,{class:`amount`},t));r.addEventListener(`mouseenter`,()=>this.#u()),r.addEventListener(`mouseleave`,()=>this.#d()),e.push(r)}e.push(w(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},this.#s())),this.#r=null,this.#e.replaceChildren(...e),this.#c()}#u(){if(clearTimeout(this.#o),!this.#r){let e=document.createElement(`slicc-cost-overlay`);e.models=this.#i,e.scoops=this.#a,e.addEventListener(`mouseenter`,()=>this.#u()),e.addEventListener(`mouseleave`,()=>this.#d()),this.#e.appendChild(e),this.#r=e}this.#r.toggleAttribute(`open`,!0)}#d(){this.#o=setTimeout(()=>{this.#r&&this.#r.removeAttribute(`open`)},150)}});var Ui=T(`
3746
3746
  :host { display: inline-grid; }
3747
3747
  :host([hidden]) { display: none; }
3748
3748
  .iconbtn {
@@ -3771,7 +3771,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3771
3771
  .iconbtn:disabled:hover { background: var(--canvas); color: var(--txt-2); }
3772
3772
  .icon { display: grid; place-items: center; pointer-events: none; }
3773
3773
  .icon svg { display: block; }
3774
- `),Wi=`plus`,Gi=16;w(`slicc-icon-button`,class extends HTMLElement{static observedAttributes=[`icon`,`disabled`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ui]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get icon(){return this.getAttribute(`icon`)??Wi}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){e?this.setAttribute(`disabled`,``):this.removeAttribute(`disabled`)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label,t=E(`slot`,null,E(`span`,{class:`icon`},n(this.icon,{size:Gi,part:`icon`}))),r=E(`button`,{type:`button`,class:`iconbtn`,part:`button`,"aria-label":e??void 0,title:e??void 0,disabled:this.disabled},t);this.#e.replaceChildren(r)}});var Ki=D(`
3774
+ `),Wi=`plus`,Gi=16;S(`slicc-icon-button`,class extends HTMLElement{static observedAttributes=[`icon`,`disabled`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ui]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get icon(){return this.getAttribute(`icon`)??Wi}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){e?this.setAttribute(`disabled`,``):this.removeAttribute(`disabled`)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label,t=w(`slot`,null,w(`span`,{class:`icon`},n(this.icon,{size:Gi,part:`icon`}))),r=w(`button`,{type:`button`,class:`iconbtn`,part:`button`,"aria-label":e??void 0,title:e??void 0,disabled:this.disabled},t);this.#e.replaceChildren(r)}});var Ki=T(`
3775
3775
  :host { display: inline-flex; align-items: center; height: var(--ctl-h, 30px); font-family: var(--ui); line-height: 1; }
3776
3776
  .logo { font-weight: 600; font-size: 14px; letter-spacing: -0.02em; color: var(--ink); }
3777
3777
  .b {
@@ -3780,7 +3780,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3780
3780
  }
3781
3781
  /* Narrow / extension-sidebar: drop the gradient suffix badge to save width. */
3782
3782
  @media (max-width: 560px) { .b { display: none; } }
3783
- `);w(`slicc-logo`,class extends HTMLElement{static observedAttributes=[`badge`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ki]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get badge(){return this.getAttribute(`badge`)}set badge(e){e==null?this.removeAttribute(`badge`):this.setAttribute(`badge`,e)}#t(){let e=E(`span`,{class:`logo`,part:`logo`},`sliccy`);this.badge&&e.append(E(`span`,{class:`b`,part:`badge`},this.badge)),this.#e.replaceChildren(e)}});var qi=`
3783
+ `);S(`slicc-logo`,class extends HTMLElement{static observedAttributes=[`badge`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ki]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get badge(){return this.getAttribute(`badge`)}set badge(e){e==null?this.removeAttribute(`badge`):this.setAttribute(`badge`,e)}#t(){let e=w(`span`,{class:`logo`,part:`logo`},`sliccy`);this.badge&&e.append(w(`span`,{class:`b`,part:`badge`},this.badge)),this.#e.replaceChildren(e)}});var qi=`
3784
3784
  slicc-pane {
3785
3785
  display: flex;
3786
3786
  flex-direction: column;
@@ -3819,7 +3819,7 @@ slicc-pane .slicc-pane__body {
3819
3819
  min-height: 0;
3820
3820
  overflow: auto;
3821
3821
  }
3822
- `,Ji=`slicc-pane-style`;function Yi(e){if(e.getElementById(Ji))return;let t=e.createElement(`style`);t.id=Ji,t.textContent=qi,(e.head??e.documentElement).appendChild(t)}w(`slicc-pane`,class extends HTMLElement{static observedAttributes=[`elevated`];#e;#t;#n=!1;connectedCallback(){Yi(this.ownerDocument),this.#r()}attributeChangedCallback(e,t,n){e===`elevated`&&t!==n&&this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-pane-change`,{bubbles:!0,composed:!0,detail:{elevated:n!==null}}))}get elevated(){return this.hasAttribute(`elevated`)}set elevated(e){e?this.setAttribute(`elevated`,``):this.removeAttribute(`elevated`)}#r(){if(this.#n)return;this.#n=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`slicc-pane__surface`))),t=this.ownerDocument.createElement(`div`);t.className=`slicc-pane__surface`,t.setAttribute(`part`,`surface`),this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-pane__header`,this.#e.setAttribute(`part`,`header`),this.#t=this.ownerDocument.createElement(`div`),this.#t.className=`slicc-pane__body`,this.#t.setAttribute(`part`,`body`),t.append(this.#e,this.#t);for(let t of e)t instanceof HTMLElement&&t.getAttribute(`slot`)===`header`?this.#e.appendChild(t):this.#t.appendChild(t);this.appendChild(t)}});function Xi(e){return e===`tool`||e===`sprinkle`}var Zi=D(`
3822
+ `,Ji=`slicc-pane-style`;function Yi(e){if(e.getElementById(Ji))return;let t=e.createElement(`style`);t.id=Ji,t.textContent=qi,(e.head??e.documentElement).appendChild(t)}S(`slicc-pane`,class extends HTMLElement{static observedAttributes=[`elevated`];#e;#t;#n=!1;connectedCallback(){Yi(this.ownerDocument),this.#r()}attributeChangedCallback(e,t,n){e===`elevated`&&t!==n&&this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-pane-change`,{bubbles:!0,composed:!0,detail:{elevated:n!==null}}))}get elevated(){return this.hasAttribute(`elevated`)}set elevated(e){e?this.setAttribute(`elevated`,``):this.removeAttribute(`elevated`)}#r(){if(this.#n)return;this.#n=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`slicc-pane__surface`))),t=this.ownerDocument.createElement(`div`);t.className=`slicc-pane__surface`,t.setAttribute(`part`,`surface`),this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-pane__header`,this.#e.setAttribute(`part`,`header`),this.#t=this.ownerDocument.createElement(`div`),this.#t.className=`slicc-pane__body`,this.#t.setAttribute(`part`,`body`),t.append(this.#e,this.#t);for(let t of e)t instanceof HTMLElement&&t.getAttribute(`slot`)===`header`?this.#e.appendChild(t):this.#t.appendChild(t);this.appendChild(t)}});function Xi(e){return e===`tool`||e===`sprinkle`}var Zi=T(`
3823
3823
  :host { display: none; flex: 0 0 auto; }
3824
3824
  :host([kind="tool"]), :host([kind="sprinkle"]) { display: inline-block; }
3825
3825
  .ptag {
@@ -3838,7 +3838,7 @@ slicc-pane .slicc-pane__body {
3838
3838
  background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
3839
3839
  border-color: color-mix(in srgb, var(--violet) 38%, var(--line));
3840
3840
  }
3841
- `);w(`slicc-pane-tag`,class extends HTMLElement{static observedAttributes=[`kind`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Zi]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){let e=this.getAttribute(`kind`);return Xi(e)?e:null}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}#t(){let e=E(`span`,{class:`ptag`,part:`tag`},E(`slot`,null,this.kind??``));this.#e.replaceChildren(e)}});var Qi=`
3841
+ `);S(`slicc-pane-tag`,class extends HTMLElement{static observedAttributes=[`kind`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Zi]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){let e=this.getAttribute(`kind`);return Xi(e)?e:null}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}#t(){let e=w(`span`,{class:`ptag`,part:`tag`},w(`slot`,null,this.kind??``));this.#e.replaceChildren(e)}});var Qi=`
3842
3842
  slicc-press-button {
3843
3843
  display: inline-flex;
3844
3844
  }
@@ -3930,7 +3930,7 @@ slicc-press-button {
3930
3930
  animation: none;
3931
3931
  }
3932
3932
  }
3933
- `,$i=`slicc-press-button-style`;function ea(e){if(e.getElementById($i))return;let t=e.createElement(`style`);t.id=$i,t.textContent=Qi,(e.head??e.documentElement).appendChild(t)}var ta=`slicc-press-btn`,na=`is-squish`,ra=`is-wobble`;w(`slicc-press-button`,class extends HTMLElement{static get observedAttributes(){return[`label`,`tooltip`,`tooltip-pos`,`disabled`]}innerBtn=null;pressLayer=null;handle=null;initialized=!1;pendingShortTimer=null;pendingShortEvent=null;animEndListener=null;connectedCallback(){ea(this.ownerDocument),this.initialized?this.handle===null&&this.attachGesture():this.initialize(),this.syncAttributes()}disconnectedCallback(){this.handle?.destroy(),this.handle=null,this.clearPendingShort(),this.clearRipple(),this.clearAnimation()}attributeChangedCallback(){this.initialized&&this.syncAttributes()}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get tooltip(){return this.getAttribute(`tooltip`)}set tooltip(e){e==null?this.removeAttribute(`tooltip`):this.setAttribute(`tooltip`,e)}setIcon(e){this.initialized||this.initialize();let t=this.innerBtn,n=this.pressLayer;for(let e of Array.from(t.childNodes))e!==n&&e.remove();let r=new DOMParser().parseFromString(e,`text/html`).body;for(;r.firstChild;)t.appendChild(r.firstChild)}focus(e){this.initialized||this.initialize(),this.innerBtn?.focus(e)}initialize(){this.initialized=!0;let e=E(`span`,{class:`${ta}__press-layer`,part:`press-layer`}),t=E(`button`,{type:`button`,class:`${ta}__btn`,part:`button`},e);for(;this.firstChild;)t.appendChild(this.firstChild);this.appendChild(t),this.innerBtn=t,this.pressLayer=e,this.attachGesture()}syncAttributes(){let e=this.innerBtn;if(!e)return;let t=this.getAttribute(`label`);t==null?e.removeAttribute(`aria-label`):e.setAttribute(`aria-label`,t);let n=this.getAttribute(`tooltip`);n==null?delete e.dataset.tooltip:e.dataset.tooltip=n;let r=this.getAttribute(`tooltip-pos`);r==null?delete e.dataset.tooltipPos:e.dataset.tooltipPos=r,this.hasAttribute(`disabled`)?e.setAttribute(`disabled`,``):e.removeAttribute(`disabled`)}longPressMs(){let e=this.getAttribute(`long-press-ms`);if(e==null)return Pn;let t=Number(e);return Number.isFinite(t)&&t>0?t:Pn}doubleClickMs(){let e=this.getAttribute(`double-click-ms`);if(e==null)return 350;let t=Number(e);return Number.isFinite(t)&&t>0?t:350}doubleClickDisabled(){return this.hasAttribute(`disable-double-click`)}emit(e,t){e===`short-click`?this.playAnimation(na):e===`double-click`&&this.playAnimation(ra);let n=t?{sourceEvent:t}:{};this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}))}playAnimation(e){let t=this.innerBtn;if(!t)return;this.clearAnimation(),t.offsetWidth,t.classList.add(e);let n=e=>{e.target===t&&this.clearAnimation()};this.animEndListener=n,t.addEventListener(`animationend`,n)}clearAnimation(){let e=this.innerBtn;e&&(this.animEndListener&&=(e.removeEventListener(`animationend`,this.animEndListener),null),e.classList.remove(na,ra))}clearPendingShort(){this.pendingShortTimer!==null&&(clearTimeout(this.pendingShortTimer),this.pendingShortTimer=null),this.pendingShortEvent=null}attachGesture(){this.handle=Fn(this,{longPressMs:this.longPressMs(),onPressStart:e=>this.paintRipple(e),onPressEnd:()=>this.clearRipple(),onLongPress:()=>{if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`);return}this.emit(`long-press`)},onShortClick:e=>{if(this.doubleClickDisabled()){this.emit(`short-click`,e);return}if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`,e);return}this.pendingShortEvent=e,this.pendingShortTimer=setTimeout(()=>{this.pendingShortTimer=null;let e=this.pendingShortEvent;this.pendingShortEvent=null,this.emit(`short-click`,e??void 0)},this.doubleClickMs())}})}paintRipple(e){this.clearRipple();let t=this.pressLayer;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top,a=Math.max(r,n.width-r),o=Math.max(i,n.height-i),s=Math.ceil(Math.hypot(a,o))+2,c=this.ownerDocument.createElement(`span`);c.className=`${ta}__press`,c.style.left=`${r}px`,c.style.top=`${i}px`,c.style.width=`0px`,c.style.height=`0px`,c.style.transitionDuration=`${this.longPressMs()}ms`,t.appendChild(c),requestAnimationFrame(()=>{c.isConnected&&(c.style.width=`${s*2}px`,c.style.height=`${s*2}px`)})}clearRipple(){let e=this.pressLayer;if(e)for(;e.firstChild;)e.firstChild.remove()}});var ia=D(`
3933
+ `,$i=`slicc-press-button-style`;function ea(e){if(e.getElementById($i))return;let t=e.createElement(`style`);t.id=$i,t.textContent=Qi,(e.head??e.documentElement).appendChild(t)}var ta=`slicc-press-btn`,na=`is-squish`,ra=`is-wobble`;S(`slicc-press-button`,class extends HTMLElement{static get observedAttributes(){return[`label`,`tooltip`,`tooltip-pos`,`disabled`]}innerBtn=null;pressLayer=null;handle=null;initialized=!1;pendingShortTimer=null;pendingShortEvent=null;animEndListener=null;connectedCallback(){ea(this.ownerDocument),this.initialized?this.handle===null&&this.attachGesture():this.initialize(),this.syncAttributes()}disconnectedCallback(){this.handle?.destroy(),this.handle=null,this.clearPendingShort(),this.clearRipple(),this.clearAnimation()}attributeChangedCallback(){this.initialized&&this.syncAttributes()}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get tooltip(){return this.getAttribute(`tooltip`)}set tooltip(e){e==null?this.removeAttribute(`tooltip`):this.setAttribute(`tooltip`,e)}setIcon(e){this.initialized||this.initialize();let t=this.innerBtn,n=this.pressLayer;for(let e of Array.from(t.childNodes))e!==n&&e.remove();let r=new DOMParser().parseFromString(e,`text/html`).body;for(;r.firstChild;)t.appendChild(r.firstChild)}focus(e){this.initialized||this.initialize(),this.innerBtn?.focus(e)}initialize(){this.initialized=!0;let e=w(`span`,{class:`${ta}__press-layer`,part:`press-layer`}),t=w(`button`,{type:`button`,class:`${ta}__btn`,part:`button`},e);for(;this.firstChild;)t.appendChild(this.firstChild);this.appendChild(t),this.innerBtn=t,this.pressLayer=e,this.attachGesture()}syncAttributes(){let e=this.innerBtn;if(!e)return;let t=this.getAttribute(`label`);t==null?e.removeAttribute(`aria-label`):e.setAttribute(`aria-label`,t);let n=this.getAttribute(`tooltip`);n==null?delete e.dataset.tooltip:e.dataset.tooltip=n;let r=this.getAttribute(`tooltip-pos`);r==null?delete e.dataset.tooltipPos:e.dataset.tooltipPos=r,this.hasAttribute(`disabled`)?e.setAttribute(`disabled`,``):e.removeAttribute(`disabled`)}longPressMs(){let e=this.getAttribute(`long-press-ms`);if(e==null)return Rn;let t=Number(e);return Number.isFinite(t)&&t>0?t:Rn}doubleClickMs(){let e=this.getAttribute(`double-click-ms`);if(e==null)return 350;let t=Number(e);return Number.isFinite(t)&&t>0?t:350}doubleClickDisabled(){return this.hasAttribute(`disable-double-click`)}emit(e,t){e===`short-click`?this.playAnimation(na):e===`double-click`&&this.playAnimation(ra);let n=t?{sourceEvent:t}:{};this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}))}playAnimation(e){let t=this.innerBtn;if(!t)return;this.clearAnimation(),t.offsetWidth,t.classList.add(e);let n=e=>{e.target===t&&this.clearAnimation()};this.animEndListener=n,t.addEventListener(`animationend`,n)}clearAnimation(){let e=this.innerBtn;e&&(this.animEndListener&&=(e.removeEventListener(`animationend`,this.animEndListener),null),e.classList.remove(na,ra))}clearPendingShort(){this.pendingShortTimer!==null&&(clearTimeout(this.pendingShortTimer),this.pendingShortTimer=null),this.pendingShortEvent=null}attachGesture(){this.handle=I(this,{longPressMs:this.longPressMs(),onPressStart:e=>this.paintRipple(e),onPressEnd:()=>this.clearRipple(),onLongPress:()=>{if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`);return}this.emit(`long-press`)},onShortClick:e=>{if(this.doubleClickDisabled()){this.emit(`short-click`,e);return}if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`,e);return}this.pendingShortEvent=e,this.pendingShortTimer=setTimeout(()=>{this.pendingShortTimer=null;let e=this.pendingShortEvent;this.pendingShortEvent=null,this.emit(`short-click`,e??void 0)},this.doubleClickMs())}})}paintRipple(e){this.clearRipple();let t=this.pressLayer;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top,a=Math.max(r,n.width-r),o=Math.max(i,n.height-i),s=Math.ceil(Math.hypot(a,o))+2,c=this.ownerDocument.createElement(`span`);c.className=`${ta}__press`,c.style.left=`${r}px`,c.style.top=`${i}px`,c.style.width=`0px`,c.style.height=`0px`,c.style.transitionDuration=`${this.longPressMs()}ms`,t.appendChild(c),requestAnimationFrame(()=>{c.isConnected&&(c.style.width=`${s*2}px`,c.style.height=`${s*2}px`)})}clearRipple(){let e=this.pressLayer;if(e)for(;e.firstChild;)e.firstChild.remove()}});var ia=T(`
3934
3934
  :host { display: inline-flex; }
3935
3935
  :host([hidden]) { display: none; }
3936
3936
 
@@ -3960,7 +3960,7 @@ slicc-press-button {
3960
3960
  outline: 2px solid var(--violet);
3961
3961
  outline-offset: 2px;
3962
3962
  }
3963
- `);w(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ia]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get hue(){return this.hasAttribute(`hue`)}set hue(e){this.toggleAttribute(`hue`,!!e)}get selected(){return this.hasAttribute(`selected`)}set selected(e){this.toggleAttribute(`selected`,!!e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.color,t=[`sw`];this.hue&&t.push(`hue`),this.selected&&t.push(`on`);let n=E(`button`,{type:`button`,part:`button`,class:t.join(` `),"aria-pressed":this.selected?`true`:`false`,"aria-label":this.label??e??`color swatch`},E(`slot`));e&&n.style.setProperty(`--swatch-color`,e),n.addEventListener(`click`,this.#n),this.#e.replaceChildren(n)}#n=()=>{this.selected=!0,this.dispatchEvent(new CustomEvent(`select`,{detail:{color:this.color},bubbles:!0,composed:!0}))}});var aa=new Set([`rose`,`cyan`,`violet`,`amber`,`waffle`,`green`]),oa=D(`
3963
+ `);S(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ia]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get hue(){return this.hasAttribute(`hue`)}set hue(e){this.toggleAttribute(`hue`,!!e)}get selected(){return this.hasAttribute(`selected`)}set selected(e){this.toggleAttribute(`selected`,!!e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.color,t=[`sw`];this.hue&&t.push(`hue`),this.selected&&t.push(`on`);let n=w(`button`,{type:`button`,part:`button`,class:t.join(` `),"aria-pressed":this.selected?`true`:`false`,"aria-label":this.label??e??`color swatch`},w(`slot`));e&&n.style.setProperty(`--swatch-color`,e),n.addEventListener(`click`,this.#n),this.#e.replaceChildren(n)}#n=()=>{this.selected=!0,this.dispatchEvent(new CustomEvent(`select`,{detail:{color:this.color},bubbles:!0,composed:!0}))}});var aa=new Set([`rose`,`cyan`,`violet`,`amber`,`waffle`,`green`]),oa=T(`
3964
3964
  :host {
3965
3965
  display: inline-flex;
3966
3966
  vertical-align: middle;
@@ -4020,7 +4020,7 @@ slicc-press-button {
4020
4020
  :host-context(.dark)[hue="amber"] .tag, :host-context([data-theme="dark"])[hue="amber"] .tag { background: color-mix(in srgb, var(--amber) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--amber) 38%, var(--line)); }
4021
4021
  :host-context(.dark)[hue="waffle"] .tag, :host-context([data-theme="dark"])[hue="waffle"] .tag { background: color-mix(in srgb, var(--waffle) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--waffle) 38%, var(--line)); }
4022
4022
  :host-context(.dark)[hue="green"] .tag, :host-context([data-theme="dark"])[hue="green"] .tag { background: color-mix(in srgb, var(--green) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--green) 38%, var(--line)); }
4023
- `);w(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[oa]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get hue(){let e=this.getAttribute(`hue`);return e&&aa.has(e)?e:null}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get dot(){return this.hasAttribute(`dot`)}set dot(e){e?this.setAttribute(`dot`,``):this.removeAttribute(`dot`)}#t(){let e=this.label??E(`slot`),t=E(`span`,{class:`tag`,part:`tag`},this.dot?E(`span`,{class:`dot`,part:`dot`}):null,E(`span`,{class:`label`,part:`label`},e));this.#e.replaceChildren(t)}});var sa=D(`
4023
+ `);S(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[oa]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get hue(){let e=this.getAttribute(`hue`);return e&&aa.has(e)?e:null}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get dot(){return this.hasAttribute(`dot`)}set dot(e){e?this.setAttribute(`dot`,``):this.removeAttribute(`dot`)}#t(){let e=this.label??w(`slot`),t=w(`span`,{class:`tag`,part:`tag`},this.dot?w(`span`,{class:`dot`,part:`dot`}):null,w(`span`,{class:`label`,part:`label`},e));this.#e.replaceChildren(t)}});var sa=T(`
4024
4024
  :host {
4025
4025
  position: fixed;
4026
4026
  inset: 0;
@@ -4115,7 +4115,7 @@ video {
4115
4115
  color: var(--txt-3, #717171);
4116
4116
  font-size: 13px;
4117
4117
  }
4118
- `),Y=null,X=null,ca=class e extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[sa]}disconnectedCallback(){for(let e of this.#t)URL.revokeObjectURL(e);this.#t.length=0,Y===this&&(Y=null)}static open(t){e.close();let r=document.createElement(`slicc-quick-look`),i=t.path.split(`/`).pop()||t.path,a=E(`div`,{class:`backdrop`}),o=E(`button`,{class:`x`});o.appendChild(n(`x`,{size:14}));let s=E(`div`,{class:`header`},i,o),c=E(`div`,{class:`content`});c.appendChild(r.#r(t));let l=E(`div`,{class:`panel`},s,c);l.tabIndex=-1,r.#e.append(a,l),document.body.appendChild(r),Y=r,l.focus(),a.addEventListener(`click`,()=>r.#n(`backdrop`)),o.addEventListener(`click`,()=>r.#n(`close-button`)),X&&document.removeEventListener(`keydown`,X),X=e=>{e.key===`Escape`&&r.#n(`escape`)},document.addEventListener(`keydown`,X)}static close(){if(Y){for(let e of Y.#t)URL.revokeObjectURL(e);Y.remove(),Y=null}X&&=(document.removeEventListener(`keydown`,X),null)}#n(t){this.dispatchEvent(new CustomEvent(`quick-look-close`,{bubbles:!0,composed:!0,detail:{reason:t}})),e.close()}#r(e){let t=e.mimeType;if(t.startsWith(`text/`)||t===`application/json`)return E(`pre`,null,typeof e.content==`string`?e.content:new TextDecoder().decode(e.content));if(t.startsWith(`image/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`img`),i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r.alt=e.path.split(`/`).pop()||``,r}if(t.startsWith(`audio/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`audio`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}if(t.startsWith(`video/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`video`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}return E(`div`,{class:`fallback`},`Preview not available for this file type (${la(typeof e.content==`string`?e.content.length:e.content.byteLength)})`)}};function la(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}w(`slicc-quick-look`,ca);var ua=`
4118
+ `),X=null,Z=null,ca=class e extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[sa]}disconnectedCallback(){for(let e of this.#t)URL.revokeObjectURL(e);this.#t.length=0,X===this&&(X=null)}static open(t){e.close();let r=document.createElement(`slicc-quick-look`),i=t.path.split(`/`).pop()||t.path,a=w(`div`,{class:`backdrop`}),o=w(`button`,{class:`x`});o.appendChild(n(`x`,{size:14}));let s=w(`div`,{class:`header`},i,o),c=w(`div`,{class:`content`});c.appendChild(r.#r(t));let l=w(`div`,{class:`panel`},s,c);l.tabIndex=-1,r.#e.append(a,l),document.body.appendChild(r),X=r,l.focus(),a.addEventListener(`click`,()=>r.#n(`backdrop`)),o.addEventListener(`click`,()=>r.#n(`close-button`)),Z&&document.removeEventListener(`keydown`,Z),Z=e=>{e.key===`Escape`&&r.#n(`escape`)},document.addEventListener(`keydown`,Z)}static close(){if(X){for(let e of X.#t)URL.revokeObjectURL(e);X.remove(),X=null}Z&&=(document.removeEventListener(`keydown`,Z),null)}#n(t){this.dispatchEvent(new CustomEvent(`quick-look-close`,{bubbles:!0,composed:!0,detail:{reason:t}})),e.close()}#r(e){let t=e.mimeType;if(t.startsWith(`text/`)||t===`application/json`)return w(`pre`,null,typeof e.content==`string`?e.content:new TextDecoder().decode(e.content));if(t.startsWith(`image/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`img`),i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r.alt=e.path.split(`/`).pop()||``,r}if(t.startsWith(`audio/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`audio`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}if(t.startsWith(`video/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`video`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}return w(`div`,{class:`fallback`},`Preview not available for this file type (${la(typeof e.content==`string`?e.content.length:e.content.byteLength)})`)}};function la(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}S(`slicc-quick-look`,ca);var ua=`
4119
4119
  .slicc-chatpane {
4120
4120
  flex: 0 0 auto;
4121
4121
  width: calc(100% - 48px);
@@ -4160,7 +4160,7 @@ video {
4160
4160
  -webkit-mask-image: none;
4161
4161
  mask-image: none;
4162
4162
  }
4163
- `,da=`slicc-chatpane-style`;function fa(e){if(e.getElementById(da))return;let t=e.createElement(`style`);t.id=da,t.textContent=ua,(e.head??e.documentElement).appendChild(t)}var pa=[`slicc-chat-thread`,`slicc-composer`];w(`slicc-chatpane`,class extends HTMLElement{static observedAttributes=[`narrow`];#e=null;#t=!1;connectedCallback(){fa(this.ownerDocument),this.classList.add(`slicc-chatpane`),this.setAttribute(`part`,`pane`),this.#t=!0,this.#n(),this.#r()}disconnectedCallback(){this.#e?.disconnect(),this.#e=null}attributeChangedCallback(e,t,n){e!==`narrow`||t===n||this.isConnected&&(this.#n(),this.dispatchEvent(new CustomEvent(`slicc-chatpane-narrow-change`,{detail:{narrow:this.narrow},bubbles:!0,composed:!0})))}get narrow(){return this.hasAttribute(`narrow`)}set narrow(e){e?this.setAttribute(`narrow`,``):this.removeAttribute(`narrow`)}get nav(){return this.querySelector(`:scope > slicc-nav`)}get thread(){return this.querySelector(`:scope > slicc-chat-thread`)}get composer(){return this.querySelector(`:scope > slicc-composer`)}#n(){if(!this.#t)return;let e=this.narrow;for(let t of pa)for(let n of this.querySelectorAll(`:scope > ${t}`))e?n.setAttribute(`open`,``):n.removeAttribute(`open`)}#r(){this.#e||(this.#e=new MutationObserver(()=>this.#n()),this.#e.observe(this,{childList:!0}))}});var ma=`
4163
+ `,da=`slicc-chatpane-style`;function fa(e){if(e.getElementById(da))return;let t=e.createElement(`style`);t.id=da,t.textContent=ua,(e.head??e.documentElement).appendChild(t)}var pa=[`slicc-chat-thread`,`slicc-composer`];S(`slicc-chatpane`,class extends HTMLElement{static observedAttributes=[`narrow`];#e=null;#t=!1;connectedCallback(){fa(this.ownerDocument),this.classList.add(`slicc-chatpane`),this.setAttribute(`part`,`pane`),this.#t=!0,this.#n(),this.#r()}disconnectedCallback(){this.#e?.disconnect(),this.#e=null}attributeChangedCallback(e,t,n){e!==`narrow`||t===n||this.isConnected&&(this.#n(),this.dispatchEvent(new CustomEvent(`slicc-chatpane-narrow-change`,{detail:{narrow:this.narrow},bubbles:!0,composed:!0})))}get narrow(){return this.hasAttribute(`narrow`)}set narrow(e){e?this.setAttribute(`narrow`,``):this.removeAttribute(`narrow`)}get nav(){return this.querySelector(`:scope > slicc-nav`)}get thread(){return this.querySelector(`:scope > slicc-chat-thread`)}get composer(){return this.querySelector(`:scope > slicc-composer`)}#n(){if(!this.#t)return;let e=this.narrow;for(let t of pa)for(let n of this.querySelectorAll(`:scope > ${t}`))e?n.setAttribute(`open`,``):n.removeAttribute(`open`)}#r(){this.#e||(this.#e=new MutationObserver(()=>this.#n()),this.#e.observe(this,{childList:!0}))}});var ma=`
4164
4164
  .slicc-shell { display: flex; flex: 1; min-height: 0; }
4165
4165
  .slicc-shell > slicc-chatpane,
4166
4166
  .slicc-shell > .chatpane {
@@ -4255,7 +4255,7 @@ video {
4255
4255
  /* Hide the resize divider on narrow viewports (overlay mode). */
4256
4256
  .slicc-shell > .slicc-shell__divider { display: none !important; }
4257
4257
  }
4258
- `,ha=`slicc-shell-style`;function ga(e){if(e.getElementById(ha))return;let t=e.createElement(`style`);t.id=ha,t.textContent=ma,(e.head??e.documentElement).appendChild(t)}w(`slicc-shell`,class e extends HTMLElement{static observedAttributes=[`open`,`url-state`];#e=null;#t=null;#n=!1;#r=null;#i=e=>{if(!this.urlState)return;let t=e.detail?.id;typeof t==`string`&&k(`ws`,t)};#a=()=>{this.urlState&&k(`ws`,null)};#o=()=>{if(!this.urlState)return;let e=O(`ws`);e?this.#s(e):this.open&&this.collapse()};connectedCallback(){if(ga(this.ownerDocument),this.classList.add(`slicc-shell`),this.setAttribute(`part`,`shell`),this.#n=!0,this.#p(),this.#m(),this.#c(),this.#e=e=>{let t=e.detail?.id;typeof t==`string`&&this.select(t)},this.#t=()=>this.collapse(),this.addEventListener(`dock-select`,this.#e),this.addEventListener(`dock-collapse`,this.#t),this.addEventListener(`slicc-dock-select`,this.#i),this.addEventListener(`slicc-dock-collapse`,this.#a),this.urlState){window.addEventListener(`popstate`,this.#o);let e=O(`ws`);e&&queueMicrotask(()=>this.#s(e))}}disconnectedCallback(){this.#e&&this.removeEventListener(`dock-select`,this.#e),this.#t&&this.removeEventListener(`dock-collapse`,this.#t),this.#e=null,this.#t=null,this.removeEventListener(`slicc-dock-select`,this.#i),this.removeEventListener(`slicc-dock-collapse`,this.#a),window.removeEventListener(`popstate`,this.#o),this.#r?.remove(),this.#r=null}get urlState(){return this.hasAttribute(`url-state`)}set urlState(e){this.toggleAttribute(`url-state`,e)}#s(e){this.dock?.selectItem?.(e)}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&this.isConnected&&this.#c()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get chatpane(){return this.querySelector(`:scope > slicc-chatpane, :scope > .chatpane`)}get workbench(){return this.querySelector(`:scope > slicc-workbench-pane, :scope > .workbench`)}get dock(){return this.querySelector(`:scope > slicc-dock, :scope > .dock`)}select(e){this.open=!0,this.#l(e),this.dispatchEvent(new CustomEvent(`slicc-shell-select`,{detail:{id:e},bubbles:!0,composed:!0}))}collapse(){this.open=!1,this.dock?.clearActive?.(),this.dispatchEvent(new CustomEvent(`slicc-shell-collapse`,{bubbles:!0,composed:!0}))}#c(){if(!this.#n)return;let e=this.open;this.chatpane?.toggleAttribute(`narrow`,e),this.workbench?.toggleAttribute(`open`,e)}#l(e){this.dock?.selectItem?.(e);let t=this.workbench;t?.selectSurface&&t.selectSurface(e),this.#c()}static#u=`slicc-shell-chat-w`;static#d=.2;static#f=.8;#p(){if(this.#r)return;let e=this.workbench;if(!e)return;let t=this.ownerDocument.createElement(`div`);t.className=`slicc-shell__divider`,t.setAttribute(`role`,`separator`),t.setAttribute(`aria-orientation`,`vertical`),this.insertBefore(t,e),this.#r=t,this.#h(t)}#m(){try{let t=localStorage.getItem(e.#u);t&&this.style.setProperty(`--slicc-chat-w`,t)}catch{}}#h(t){t.addEventListener(`pointerdown`,n=>{if(n.button!==0)return;n.preventDefault(),t.setPointerCapture(n.pointerId),this.toggleAttribute(`dragging`,!0);let r=t=>{let n=this.getBoundingClientRect();if(n.width<=0)return;let r=t.clientX-n.left,i=Math.max(e.#d,Math.min(e.#f,r/n.width));this.style.setProperty(`--slicc-chat-w`,`${(i*100).toFixed(1)}%`)},i=()=>{this.removeAttribute(`dragging`),t.removeEventListener(`pointermove`,r),t.removeEventListener(`pointerup`,i),t.removeEventListener(`pointercancel`,i);try{let t=this.style.getPropertyValue(`--slicc-chat-w`);t&&localStorage.setItem(e.#u,t)}catch{}};t.addEventListener(`pointermove`,r),t.addEventListener(`pointerup`,i),t.addEventListener(`pointercancel`,i)}),t.addEventListener(`dblclick`,()=>{this.style.removeProperty(`--slicc-chat-w`);try{localStorage.removeItem(e.#u)}catch{}})}});var _a=D(`
4258
+ `,ha=`slicc-shell-style`;function ga(e){if(e.getElementById(ha))return;let t=e.createElement(`style`);t.id=ha,t.textContent=ma,(e.head??e.documentElement).appendChild(t)}S(`slicc-shell`,class e extends HTMLElement{static observedAttributes=[`open`,`url-state`];#e=null;#t=null;#n=!1;#r=null;#i=e=>{if(!this.urlState)return;let t=e.detail?.id;typeof t==`string`&&D(`ws`,t)};#a=()=>{this.urlState&&D(`ws`,null)};#o=()=>{if(!this.urlState)return;let e=E(`ws`);e?this.#s(e):this.open&&this.collapse()};connectedCallback(){if(ga(this.ownerDocument),this.classList.add(`slicc-shell`),this.setAttribute(`part`,`shell`),this.#n=!0,this.#p(),this.#m(),this.#c(),this.#e=e=>{let t=e.detail?.id;typeof t==`string`&&this.select(t)},this.#t=()=>this.collapse(),this.addEventListener(`dock-select`,this.#e),this.addEventListener(`dock-collapse`,this.#t),this.addEventListener(`slicc-dock-select`,this.#i),this.addEventListener(`slicc-dock-collapse`,this.#a),this.urlState){window.addEventListener(`popstate`,this.#o);let e=E(`ws`);e&&queueMicrotask(()=>this.#s(e))}}disconnectedCallback(){this.#e&&this.removeEventListener(`dock-select`,this.#e),this.#t&&this.removeEventListener(`dock-collapse`,this.#t),this.#e=null,this.#t=null,this.removeEventListener(`slicc-dock-select`,this.#i),this.removeEventListener(`slicc-dock-collapse`,this.#a),window.removeEventListener(`popstate`,this.#o),this.#r?.remove(),this.#r=null}get urlState(){return this.hasAttribute(`url-state`)}set urlState(e){this.toggleAttribute(`url-state`,e)}#s(e){this.dock?.selectItem?.(e)}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&this.isConnected&&this.#c()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get chatpane(){return this.querySelector(`:scope > slicc-chatpane, :scope > .chatpane`)}get workbench(){return this.querySelector(`:scope > slicc-workbench-pane, :scope > .workbench`)}get dock(){return this.querySelector(`:scope > slicc-dock, :scope > .dock`)}select(e){this.open=!0,this.#l(e),this.dispatchEvent(new CustomEvent(`slicc-shell-select`,{detail:{id:e},bubbles:!0,composed:!0}))}collapse(){this.open=!1,this.dock?.clearActive?.(),this.dispatchEvent(new CustomEvent(`slicc-shell-collapse`,{bubbles:!0,composed:!0}))}#c(){if(!this.#n)return;let e=this.open;this.chatpane?.toggleAttribute(`narrow`,e),this.workbench?.toggleAttribute(`open`,e)}#l(e){this.dock?.selectItem?.(e);let t=this.workbench;t?.selectSurface&&t.selectSurface(e),this.#c()}static#u=`slicc-shell-chat-w`;static#d=.2;static#f=.8;#p(){if(this.#r)return;let e=this.workbench;if(!e)return;let t=this.ownerDocument.createElement(`div`);t.className=`slicc-shell__divider`,t.setAttribute(`role`,`separator`),t.setAttribute(`aria-orientation`,`vertical`),this.insertBefore(t,e),this.#r=t,this.#h(t)}#m(){try{let t=localStorage.getItem(e.#u);t&&this.style.setProperty(`--slicc-chat-w`,t)}catch{}}#h(t){t.addEventListener(`pointerdown`,n=>{if(n.button!==0)return;n.preventDefault(),t.setPointerCapture(n.pointerId),this.toggleAttribute(`dragging`,!0);let r=t=>{let n=this.getBoundingClientRect();if(n.width<=0)return;let r=t.clientX-n.left,i=Math.max(e.#d,Math.min(e.#f,r/n.width));this.style.setProperty(`--slicc-chat-w`,`${(i*100).toFixed(1)}%`)},i=()=>{this.removeAttribute(`dragging`),t.removeEventListener(`pointermove`,r),t.removeEventListener(`pointerup`,i),t.removeEventListener(`pointercancel`,i);try{let t=this.style.getPropertyValue(`--slicc-chat-w`);t&&localStorage.setItem(e.#u,t)}catch{}};t.addEventListener(`pointermove`,r),t.addEventListener(`pointerup`,i),t.addEventListener(`pointercancel`,i)}),t.addEventListener(`dblclick`,()=>{this.style.removeProperty(`--slicc-chat-w`);try{localStorage.removeItem(e.#u)}catch{}})}});var _a=T(`
4259
4259
  :host{display:inline-block;}
4260
4260
  .switcher-more{position:relative;}
4261
4261
  .morebtn{display:none;font:inherit;font-size:13px;font-weight:600;color:var(--txt-2);background:transparent;border:1px solid var(--line);border-radius:9999px;height:var(--ctl-h,30px);padding:0 11px;cursor:pointer;line-height:1;align-items:center;}
@@ -4277,7 +4277,7 @@ video {
4277
4277
  .pop slicc-pill::part(label){display:block;}
4278
4278
  .pop slicc-pill::part(tip){display:none;}
4279
4279
  }
4280
- `);w(`slicc-scoop-overflow`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n;#r;#i;#a=e=>{this.open&&!this.contains(e.target)&&this.close()};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[_a]}connectedCallback(){this.#o()}disconnectedCallback(){document.removeEventListener(`click`,this.#a)}attributeChangedCallback(e){e===`open`&&this.#n&&this.#c()}get items(){return this.#t}set items(e){this.#t=Array.isArray(e)?e:[],this.isConnected&&this.#s()}get count(){return this.#t.length}get hasOverflow(){return this.#t.length>0}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}show(){this.open||=!0}close(){this.open&&=!1}toggle(){this.open=!this.open}#o(){let e=E(`slot`,{name:`more`},`⋯`);this.#r=E(`button`,{class:`morebtn`,part:`more`,type:`button`,title:`More scoops`,"aria-haspopup":`true`,"aria-expanded":`false`},e),this.#i=E(`div`,{class:`pop`,part:`pop`}),this.#n=E(`div`,{class:`switcher-more`,part:`wrap`},this.#r,this.#i),this.#r.addEventListener(`click`,e=>{e.stopPropagation(),this.toggle()}),this.#e.replaceChildren(this.#n),this.#s(),this.#c()}#s(){let e=this.#t.length;if(e>0?this.setAttribute(`count`,String(e)):this.removeAttribute(`count`),this.#n.classList.toggle(`has-overflow`,e>0),this.#r.setAttribute(`aria-haspopup`,`true`),e===0){this.#i.replaceChildren(E(`slot`,{name:`empty`})),this.open&&this.close();return}let t=[];this.#t.forEach((e,n)=>{let r=e.id,i=e.label??e.id,a=E(`slicc-pill`,{class:`scoop`,part:`pill`,"data-k":r,type:e.type===`cone`?`cone`:`scoop`,eyes:e.eyes===`open`||e.eyes===`dead`?e.eyes:`none`,color:e.color??!1,label:i,style:`--i:${n}`});a.addEventListener(`click`,()=>{let e=a.dataset.k??``,t=this.#t.find(t=>t.id===e);this.#l(e,t?.label??e)}),t.push(a)}),this.#i.replaceChildren(...t)}#c(){let e=this.open;this.#n.classList.toggle(`open`,e),this.#r.setAttribute(`aria-expanded`,e?`true`:`false`),document.removeEventListener(`click`,this.#a),e&&document.addEventListener(`click`,this.#a)}#l(e,t){this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,label:t},bubbles:!0,composed:!0})),this.close()}});var va={cone:`var(--waffle)`,researcher:`var(--cyan)`,designer:`var(--violet)`,tester:`var(--amber)`,triage:`var(--green)`},ya=40,ba=6,xa=`
4280
+ `);S(`slicc-scoop-overflow`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n;#r;#i;#a=e=>{this.open&&!this.contains(e.target)&&this.close()};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[_a]}connectedCallback(){this.#o()}disconnectedCallback(){document.removeEventListener(`click`,this.#a)}attributeChangedCallback(e){e===`open`&&this.#n&&this.#c()}get items(){return this.#t}set items(e){this.#t=Array.isArray(e)?e:[],this.isConnected&&this.#s()}get count(){return this.#t.length}get hasOverflow(){return this.#t.length>0}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}show(){this.open||=!0}close(){this.open&&=!1}toggle(){this.open=!this.open}#o(){let e=w(`slot`,{name:`more`},`⋯`);this.#r=w(`button`,{class:`morebtn`,part:`more`,type:`button`,title:`More scoops`,"aria-haspopup":`true`,"aria-expanded":`false`},e),this.#i=w(`div`,{class:`pop`,part:`pop`}),this.#n=w(`div`,{class:`switcher-more`,part:`wrap`},this.#r,this.#i),this.#r.addEventListener(`click`,e=>{e.stopPropagation(),this.toggle()}),this.#e.replaceChildren(this.#n),this.#s(),this.#c()}#s(){let e=this.#t.length;if(e>0?this.setAttribute(`count`,String(e)):this.removeAttribute(`count`),this.#n.classList.toggle(`has-overflow`,e>0),this.#r.setAttribute(`aria-haspopup`,`true`),e===0){this.#i.replaceChildren(w(`slot`,{name:`empty`})),this.open&&this.close();return}let t=[];this.#t.forEach((e,n)=>{let r=e.id,i=e.label??e.id,a=w(`slicc-pill`,{class:`scoop`,part:`pill`,"data-k":r,type:e.type===`cone`?`cone`:`scoop`,eyes:e.eyes===`open`||e.eyes===`dead`?e.eyes:`none`,color:e.color??!1,label:i,style:`--i:${n}`});a.addEventListener(`click`,()=>{let e=a.dataset.k??``,t=this.#t.find(t=>t.id===e);this.#l(e,t?.label??e)}),t.push(a)}),this.#i.replaceChildren(...t)}#c(){let e=this.open;this.#n.classList.toggle(`open`,e),this.#r.setAttribute(`aria-expanded`,e?`true`:`false`),document.removeEventListener(`click`,this.#a),e&&document.addEventListener(`click`,this.#a)}#l(e,t){this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,label:t},bubbles:!0,composed:!0})),this.close()}});var va={cone:`var(--waffle)`,researcher:`var(--cyan)`,designer:`var(--violet)`,tester:`var(--amber)`,triage:`var(--green)`},ya=40,ba=6,xa=`
4281
4281
  .slicc-scoop-switcher {
4282
4282
  display: flex;
4283
4283
  gap: ${ba}px;
@@ -4328,7 +4328,7 @@ video {
4328
4328
  .slicc-scoop-switcher .scoop { width: 34px; }
4329
4329
  .slicc-scoop-switcher slicc-pill.scoop { --pill-w: 34px; }
4330
4330
  }
4331
- `,Sa=`slicc-scoop-switcher-style`;function Ca(e){if(e.getElementById(Sa))return;let t=e.createElement(`style`);t.id=Sa,t.textContent=xa,(e.head??e.documentElement).appendChild(t)}function wa(e){return va[e]??`var(--rose)`}function Ta(e,t){let n=e.getAttribute(`eyes`);return n===`open`||n===`none`||n===`dead`?n:t}w(`slicc-scoop-switcher`,class extends HTMLElement{static get observedAttributes(){return[`active`,`attention`]}#e=[];#t=null;#n=null;#r=!1;#i=null;#a=null;#o=!1;#s=null;#c=e=>{let t=this.#p(e);t!==this.#s&&(this.#s=t,this.#h())};#l=()=>{this.#s!==null&&(this.#s=null,this.#h())};connectedCallback(){Ca(this.ownerDocument),this.classList.add(`slicc-scoop-switcher`),this.setAttribute(`part`,`row`),this.#o||=(this.#d(),!0),this.#a||(this.#a=e=>this.#y(e),this.addEventListener(`click`,this.#a)),this.addEventListener(`pointerover`,this.#c),this.addEventListener(`pointerleave`,this.#l),this.#f(),this.#b(),requestAnimationFrame(()=>this.reflow())}disconnectedCallback(){this.#n?.disconnect(),this.#n=null,this.#i!==null&&(cancelAnimationFrame(this.#i),this.#i=null),this.#a&&=(this.removeEventListener(`click`,this.#a),null),this.removeEventListener(`pointerover`,this.#c),this.removeEventListener(`pointerleave`,this.#l)}attributeChangedCallback(e){this.#o&&(e===`active`?this.#g():e===`attention`&&this.#h())}get scoops(){return this.#e.map(e=>({...e}))}set scoops(e){this.#e=Array.isArray(e)?e.map(e=>({...e})):[],this.#o&&this.isConnected&&(this.#f(),this.reflow())}get attention(){return this.getAttribute(`attention`)}set attention(e){e==null?this.removeAttribute(`attention`):this.setAttribute(`attention`,e)}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}reflow(){if(!(!this.isConnected||this.#r)){this.#r=!0;try{this.#u()}finally{this.#r=!1}}}#u(){let e=[...this.querySelectorAll(`slicc-pill.scoop`)];for(let t of e)t.classList.remove(`hide`);let t=e.filter(e=>e.offsetParent!==null||e.offsetWidth>0);if(t.length===0){this.#_([]);return}let n=this.clientWidth;if(n<=0){this.#_([]),requestAnimationFrame(()=>{this.isConnected&&this.clientWidth>0&&this.reflow()});return}let r=t.map(e=>e.offsetWidth);if(r.reduce((e,t)=>e+t,0)+ba*Math.max(0,t.length-1)<=n+1){this.#_([]);return}let i=Math.max(0,n-ya),a=[],o=0;t.forEach((e,t)=>{if(t===0){o+=r[t];return}let n=ba+r[t];a.length===0&&o+n<=i?o+=n:(e.classList.add(`hide`),a.push(e))}),this.#_(a)}select(e){this.active=e;let t=this.#e.find(t=>t.key===e)?.label??e;this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,key:e,label:t},bubbles:!0,composed:!0}))}#d(){let e=[...this.querySelectorAll(`slicc-pill`)];if(e.length===0)return;let t=e.map(e=>{let t=e.dataset.k??e.getAttribute(`label`)??``,n=e.getAttribute(`type`)===`cone`?`cone`:`scoop`;return{key:t,type:n,color:e.getAttribute(`color`)??void 0,label:e.getAttribute(`label`)??t,eyes:Ta(e,n===`cone`?`open`:`none`),ephemeral:e.classList.contains(`ephemeral`)}});for(let t of e)t.remove();this.#e.length===0&&(this.#e=t)}#f(){let e=this.active,t=this.#e.map(t=>{let n=t.key,r=t.type===`cone`||n===`cone`?`cone`:`scoop`,i=t.label??n,a=t.eyes??(r===`cone`?`open`:`none`),o=e!=null&&e===n,s=wa(n);return E(`slicc-pill`,{class:`scoop${t.ephemeral?` ephemeral`:``}`,"data-k":n,type:r,color:t.color?t.color:!1,eyes:a,fill:typeof t.fill==`number`&&Number.isFinite(t.fill)?String(Math.round(Math.min(100,Math.max(0,t.fill)))):!1,label:i,active:o,style:`--h:${s}`})});this.replaceChildren(...t),this.#h()}#p(e){let t=e.target?.closest?.(`slicc-pill.scoop`);return t&&this.contains(t)?t.dataset.k??null:null}#m(e){let t=this.#e.find(t=>t.key===e),n=t?.type===`cone`||e===`cone`?`cone`:`scoop`;return t?.eyes??(n===`cone`?`open`:`none`)}#h(){let e=this.attention;for(let t of this.querySelectorAll(`slicc-pill.scoop`)){let n=t.dataset.k??``,r=this.#s===null?e!==null&&e===n:this.#s===n,i=this.#m(n);t.setAttribute(`eyes`,r?i:`none`),t.toggleAttribute(`blink`,r&&this.#s===null&&i===`open`)}}#g(){let e=this.active;for(let t of this.querySelectorAll(`slicc-pill.scoop`)){let n=t.dataset.k===e;t.classList.toggle(`active`,n),t.toggleAttribute(`active`,n)}}#_(e){if(e.length===0){this.#t&&(this.#t.items=[]);return}let t=this.#v();t.items=e.map(e=>{let t=e.dataset.k??``;return{id:t,label:e.getAttribute(`label`)??t,type:e.getAttribute(`type`)===`cone`?`cone`:`scoop`,color:e.getAttribute(`color`)??void 0,eyes:Ta(e,e.getAttribute(`type`)===`cone`?`open`:`none`)}})}#v(){if(this.#t)return this.#t;let e=this.ownerDocument.createElement(`slicc-scoop-overflow`);return e.addEventListener(`slicc-scoop-select`,e=>{let t=e.detail?.id;typeof t==`string`&&(e.stopPropagation(),this.select(t))}),this.after(e),this.#t=e,e}#y(e){let t=e.target?.closest(`slicc-pill.scoop`);if(!t||!this.contains(t))return;let n=t.dataset.k;n&&this.select(n)}#b(){this.#n||typeof ResizeObserver>`u`||(this.#n=new ResizeObserver(()=>{this.#i===null&&(this.#i=requestAnimationFrame(()=>{this.#i=null,this.reflow()}))}),this.#n.observe(this),this.parentElement&&this.#n.observe(this.parentElement))}});var Ea=`/**
4331
+ `,Sa=`slicc-scoop-switcher-style`;function Ca(e){if(e.getElementById(Sa))return;let t=e.createElement(`style`);t.id=Sa,t.textContent=xa,(e.head??e.documentElement).appendChild(t)}function wa(e){return va[e]??`var(--rose)`}function Ta(e,t){let n=e.getAttribute(`eyes`);return n===`open`||n===`none`||n===`dead`?n:t}S(`slicc-scoop-switcher`,class extends HTMLElement{static get observedAttributes(){return[`active`,`attention`]}#e=[];#t=null;#n=null;#r=!1;#i=null;#a=null;#o=!1;#s=null;#c=e=>{let t=this.#p(e);t!==this.#s&&(this.#s=t,this.#h())};#l=()=>{this.#s!==null&&(this.#s=null,this.#h())};connectedCallback(){Ca(this.ownerDocument),this.classList.add(`slicc-scoop-switcher`),this.setAttribute(`part`,`row`),this.#o||=(this.#d(),!0),this.#a||(this.#a=e=>this.#y(e),this.addEventListener(`click`,this.#a)),this.addEventListener(`pointerover`,this.#c),this.addEventListener(`pointerleave`,this.#l),this.#f(),this.#b(),requestAnimationFrame(()=>this.reflow())}disconnectedCallback(){this.#n?.disconnect(),this.#n=null,this.#i!==null&&(cancelAnimationFrame(this.#i),this.#i=null),this.#a&&=(this.removeEventListener(`click`,this.#a),null),this.removeEventListener(`pointerover`,this.#c),this.removeEventListener(`pointerleave`,this.#l)}attributeChangedCallback(e){this.#o&&(e===`active`?this.#g():e===`attention`&&this.#h())}get scoops(){return this.#e.map(e=>({...e}))}set scoops(e){this.#e=Array.isArray(e)?e.map(e=>({...e})):[],this.#o&&this.isConnected&&(this.#f(),this.reflow())}get attention(){return this.getAttribute(`attention`)}set attention(e){e==null?this.removeAttribute(`attention`):this.setAttribute(`attention`,e)}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}reflow(){if(!(!this.isConnected||this.#r)){this.#r=!0;try{this.#u()}finally{this.#r=!1}}}#u(){let e=[...this.querySelectorAll(`slicc-pill.scoop`)];for(let t of e)t.classList.remove(`hide`);let t=e.filter(e=>e.offsetParent!==null||e.offsetWidth>0);if(t.length===0){this.#_([]);return}let n=this.clientWidth;if(n<=0){this.#_([]),requestAnimationFrame(()=>{this.isConnected&&this.clientWidth>0&&this.reflow()});return}let r=t.map(e=>e.offsetWidth);if(r.reduce((e,t)=>e+t,0)+ba*Math.max(0,t.length-1)<=n+1){this.#_([]);return}let i=Math.max(0,n-ya),a=[],o=0;t.forEach((e,t)=>{if(t===0){o+=r[t];return}let n=ba+r[t];a.length===0&&o+n<=i?o+=n:(e.classList.add(`hide`),a.push(e))}),this.#_(a)}select(e){this.active=e;let t=this.#e.find(t=>t.key===e)?.label??e;this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,key:e,label:t},bubbles:!0,composed:!0}))}#d(){let e=[...this.querySelectorAll(`slicc-pill`)];if(e.length===0)return;let t=e.map(e=>{let t=e.dataset.k??e.getAttribute(`label`)??``,n=e.getAttribute(`type`)===`cone`?`cone`:`scoop`;return{key:t,type:n,color:e.getAttribute(`color`)??void 0,label:e.getAttribute(`label`)??t,eyes:Ta(e,n===`cone`?`open`:`none`),ephemeral:e.classList.contains(`ephemeral`)}});for(let t of e)t.remove();this.#e.length===0&&(this.#e=t)}#f(){let e=this.active,t=this.#e.map(t=>{let n=t.key,r=t.type===`cone`||n===`cone`?`cone`:`scoop`,i=t.label??n,a=t.eyes??(r===`cone`?`open`:`none`),o=e!=null&&e===n,s=wa(n);return w(`slicc-pill`,{class:`scoop${t.ephemeral?` ephemeral`:``}`,"data-k":n,type:r,color:t.color?t.color:!1,eyes:a,fill:typeof t.fill==`number`&&Number.isFinite(t.fill)?String(Math.round(Math.min(100,Math.max(0,t.fill)))):!1,label:i,active:o,style:`--h:${s}`})});this.replaceChildren(...t),this.#h()}#p(e){let t=e.target?.closest?.(`slicc-pill.scoop`);return t&&this.contains(t)?t.dataset.k??null:null}#m(e){let t=this.#e.find(t=>t.key===e),n=t?.type===`cone`||e===`cone`?`cone`:`scoop`;return t?.eyes??(n===`cone`?`open`:`none`)}#h(){let e=this.attention;for(let t of this.querySelectorAll(`slicc-pill.scoop`)){let n=t.dataset.k??``,r=this.#s===null?e!==null&&e===n:this.#s===n,i=this.#m(n);t.setAttribute(`eyes`,r?i:`none`),t.toggleAttribute(`blink`,r&&this.#s===null&&i===`open`)}}#g(){let e=this.active;for(let t of this.querySelectorAll(`slicc-pill.scoop`)){let n=t.dataset.k===e;t.classList.toggle(`active`,n),t.toggleAttribute(`active`,n)}}#_(e){if(e.length===0){this.#t&&(this.#t.items=[]);return}let t=this.#v();t.items=e.map(e=>{let t=e.dataset.k??``;return{id:t,label:e.getAttribute(`label`)??t,type:e.getAttribute(`type`)===`cone`?`cone`:`scoop`,color:e.getAttribute(`color`)??void 0,eyes:Ta(e,e.getAttribute(`type`)===`cone`?`open`:`none`)}})}#v(){if(this.#t)return this.#t;let e=this.ownerDocument.createElement(`slicc-scoop-overflow`);return e.addEventListener(`slicc-scoop-select`,e=>{let t=e.detail?.id;typeof t==`string`&&(e.stopPropagation(),this.select(t))}),this.after(e),this.#t=e,e}#y(e){let t=e.target?.closest(`slicc-pill.scoop`);if(!t||!this.contains(t))return;let n=t.dataset.k;n&&this.select(n)}#b(){this.#n||typeof ResizeObserver>`u`||(this.#n=new ResizeObserver(()=>{this.#i===null&&(this.#i=requestAnimationFrame(()=>{this.#i=null,this.reflow()}))}),this.#n.observe(this),this.parentElement&&this.#n.observe(this.parentElement))}});var Ea=`/**
4332
4332
  * SLICC design tokens — lifted verbatim from the prototype
4333
4333
  * (proto/StellarRubySwift.html :root + body.dark). Light is the default; dark is
4334
4334
  * opt-in. Per project decision the prototype's token vocabulary and light-default
@@ -4392,7 +4392,7 @@ video {
4392
4392
  --shaderbg: #171410;
4393
4393
  --shadow-pane: rgba(0, 0, 0, 0.35) 0 8px 26px -10px;
4394
4394
  }
4395
- `,Da=`slicc-tokens`;function Z(e=document){if(e.getElementById(Da))return;let t=e.createElement(`style`);t.id=Da,t.textContent=Ea,(e.head??e.documentElement).appendChild(t)}function Q(e,t=document.body){t.classList.toggle(`dark`,e===`dark`),t.setAttribute(`data-theme`,e)}function Oa(e=document.body){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>Q(t.matches?`dark`:`light`,e);return n(),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var ka=D(`
4395
+ `,Da=`slicc-tokens`;function Oa(e=document){if(e.getElementById(Da))return;let t=e.createElement(`style`);t.id=Da,t.textContent=Ea,(e.head??e.documentElement).appendChild(t)}function Q(e,t=document.body){t.classList.toggle(`dark`,e===`dark`),t.setAttribute(`data-theme`,e)}function ka(e=document.body){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>Q(t.matches?`dark`:`light`,e);return n(),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var Aa=T(`
4396
4396
  :host { display: inline-flex; flex: 0 0 auto; }
4397
4397
  .themetgl {
4398
4398
  font: inherit; font-family: var(--ui); font-size: 14px; line-height: 1;
@@ -4404,7 +4404,7 @@ video {
4404
4404
  }
4405
4405
  .themetgl:hover { background: color-mix(in srgb, var(--ink) 8%, var(--ghost)); }
4406
4406
  .themetgl svg { display: block; }
4407
- `),Aa=16,ja={light:`moon`,dark:`sun`},Ma={light:`Switch to dark mode`,dark:`Switch to light mode`};w(`slicc-theme-toggle`,class extends HTMLElement{static observedAttributes=[`theme`];#e;#t=null;#n=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ka];let e=E(`button`,{class:`themetgl`,part:`button`,type:`button`,"aria-pressed":`false`},E(`slot`,{name:`glyph-light`},n(ja.light,{size:Aa})),E(`slot`,{name:`glyph-dark`,hidden:!0},n(ja.dark,{size:Aa})));this.#e.replaceChildren(e),this.#t=e}connectedCallback(){this.#t?.addEventListener(`click`,this.#i),this.#a(this.theme??`light`,{silent:!0})}disconnectedCallback(){this.#t?.removeEventListener(`click`,this.#i)}attributeChangedCallback(e,t,n){e!==`theme`||t===n||this.#n||this.isConnected&&this.#a(this.#r(n)??`light`,{silent:!0})}get theme(){return this.#r(this.getAttribute(`theme`))}set theme(e){this.#a(e===`dark`?`dark`:`light`,{silent:!0})}get pressed(){return this.theme===`dark`}#r(e){return e===`dark`?`dark`:e===`light`?`light`:null}#i=()=>{this.#a(this.theme===`dark`?`light`:`dark`)};#a(e,t={}){this.#n=!0;try{if(Q(e),this.getAttribute(`theme`)!==e&&this.setAttribute(`theme`,e),this.#t){this.#t.setAttribute(`aria-pressed`,e===`dark`?`true`:`false`),this.#t.title=Ma[e];let t=this.#e.querySelector(`slot[name="glyph-light"]`),n=this.#e.querySelector(`slot[name="glyph-dark"]`);t?.toggleAttribute(`hidden`,e===`dark`),n?.toggleAttribute(`hidden`,e===`light`)}for(let t of document.querySelectorAll(`slicc-pill, slicc-add-menu`))t.setAttribute(`theme`,e)}finally{this.#n=!1}t.silent||this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}}),w(`slicc-theme`,class extends HTMLElement{static observedAttributes=[`theme`];connectedCallback(){Z(this.ownerDocument),this.classList.add(`slicc-theme`),this.#e()}attributeChangedCallback(e,t,n){e===`theme`&&t!==n&&this.isConnected&&this.#e()}get theme(){return this.getAttribute(`theme`)===`dark`?`dark`:`light`}set theme(e){this.setAttribute(`theme`,e===`dark`?`dark`:`light`)}#e(){let e=this.theme;Q(e,this),this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}});function Na(e){switch(e.slice(e.lastIndexOf(`.`)).toLowerCase()){case`.png`:case`.jpg`:case`.jpeg`:case`.gif`:case`.webp`:case`.svg`:return`image`;case`.mp3`:case`.wav`:case`.ogg`:case`.m4a`:case`.flac`:return`music`;case`.mp4`:case`.webm`:case`.mov`:case`.avi`:return`film`;case`.json`:return`braces`;case`.md`:return`file-text`;case`.html`:case`.htm`:return`globe`;case`.css`:return`palette`;case`.ts`:case`.js`:case`.tsx`:case`.jsx`:case`.mjs`:case`.cjs`:return`file-code`;case`.zip`:case`.tar`:case`.gz`:case`.bz2`:return`file-archive`;case`.pdf`:return`file-text`;default:return`file`}}function Pa(e){return e<1024?e+` B`:e<1024*1024?(e/1024).toFixed(1)+`K`:e<1024*1024*1024?(e/(1024*1024)).toFixed(1)+`M`:(e/(1024*1024*1024)).toFixed(1)+`G`}var Fa=`
4407
+ `),ja=16,Ma={light:`moon`,dark:`sun`},Na={light:`Switch to dark mode`,dark:`Switch to light mode`};S(`slicc-theme-toggle`,class extends HTMLElement{static observedAttributes=[`theme`];#e;#t=null;#n=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Aa];let e=w(`button`,{class:`themetgl`,part:`button`,type:`button`,"aria-pressed":`false`},w(`slot`,{name:`glyph-light`},n(Ma.light,{size:ja})),w(`slot`,{name:`glyph-dark`,hidden:!0},n(Ma.dark,{size:ja})));this.#e.replaceChildren(e),this.#t=e}connectedCallback(){this.#t?.addEventListener(`click`,this.#i),this.#a(this.theme??`light`,{silent:!0})}disconnectedCallback(){this.#t?.removeEventListener(`click`,this.#i)}attributeChangedCallback(e,t,n){e!==`theme`||t===n||this.#n||this.isConnected&&this.#a(this.#r(n)??`light`,{silent:!0})}get theme(){return this.#r(this.getAttribute(`theme`))}set theme(e){this.#a(e===`dark`?`dark`:`light`,{silent:!0})}get pressed(){return this.theme===`dark`}#r(e){return e===`dark`?`dark`:e===`light`?`light`:null}#i=()=>{this.#a(this.theme===`dark`?`light`:`dark`)};#a(e,t={}){this.#n=!0;try{if(Q(e),this.getAttribute(`theme`)!==e&&this.setAttribute(`theme`,e),this.#t){this.#t.setAttribute(`aria-pressed`,e===`dark`?`true`:`false`),this.#t.title=Na[e];let t=this.#e.querySelector(`slot[name="glyph-light"]`),n=this.#e.querySelector(`slot[name="glyph-dark"]`);t?.toggleAttribute(`hidden`,e===`dark`),n?.toggleAttribute(`hidden`,e===`light`)}for(let t of document.querySelectorAll(`slicc-pill, slicc-add-menu`))t.setAttribute(`theme`,e)}finally{this.#n=!1}t.silent||this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}}),S(`slicc-theme`,class extends HTMLElement{static observedAttributes=[`theme`];connectedCallback(){Oa(this.ownerDocument),this.classList.add(`slicc-theme`),this.#e()}attributeChangedCallback(e,t,n){e===`theme`&&t!==n&&this.isConnected&&this.#e()}get theme(){return this.getAttribute(`theme`)===`dark`?`dark`:`light`}set theme(e){this.setAttribute(`theme`,e===`dark`?`dark`:`light`)}#e(){let e=this.theme;Q(e,this),this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}});function Pa(e){switch(e.slice(e.lastIndexOf(`.`)).toLowerCase()){case`.png`:case`.jpg`:case`.jpeg`:case`.gif`:case`.webp`:case`.svg`:return`image`;case`.mp3`:case`.wav`:case`.ogg`:case`.m4a`:case`.flac`:return`music`;case`.mp4`:case`.webm`:case`.mov`:case`.avi`:return`film`;case`.json`:return`braces`;case`.md`:return`file-text`;case`.html`:case`.htm`:return`globe`;case`.css`:return`palette`;case`.ts`:case`.js`:case`.tsx`:case`.jsx`:case`.mjs`:case`.cjs`:return`file-code`;case`.zip`:case`.tar`:case`.gz`:case`.bz2`:return`file-archive`;case`.pdf`:return`file-text`;default:return`file`}}function Fa(e){return e<1024?e+` B`:e<1024*1024?(e/1024).toFixed(1)+`K`:e<1024*1024*1024?(e/(1024*1024)).toFixed(1)+`M`:(e/(1024*1024*1024)).toFixed(1)+`G`}var Ia=`
4408
4408
  slicc-file-tree {
4409
4409
  width: 190px;
4410
4410
  flex: 0 0 auto;
@@ -4552,7 +4552,7 @@ slicc-file-tree .actions button:active {
4552
4552
  [data-theme="dark"] slicc-file-tree .dir.on {
4553
4553
  background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
4554
4554
  }
4555
- `,Ia=`slicc-file-tree-style`;function La(e){if(e.getElementById(Ia))return;let t=e.createElement(`style`);t.id=Ia,t.textContent=Fa,(e.head??e.documentElement).appendChild(t)}function Ra(e,t){let r=[];for(let i of e)if(i.kind===`group`)r.push(E(`div`,{class:`grp`},i.label));else if(i.kind===`dir`){let e=t.has(i.id);r.push(E(`div`,{class:e?`dir open`:`dir`,"data-dir-id":i.id,"aria-expanded":e?`true`:`false`,tabindex:`0`},n(`chevron-right`,{size:14,class:`chev`}),i.label));let a=E(`div`,{class:`children`,hidden:!e||void 0});T(a,Ra(i.children??[],t)),r.push(a)}else{let e=E(`div`,{class:`actions`},E(`button`,{"data-action":`preview`,type:`button`},n(`eye`,{size:14})),E(`button`,{"data-action":`reference`,type:`button`},n(`at-sign`,{size:14})),E(`button`,{"data-action":`download`,type:`button`},n(`arrow-down-to-line`,{size:14})),E(`button`,{"data-action":`overflow`,type:`button`},n(`ellipsis`,{size:14}))),t=E(`div`,{class:`f`,"data-id":i.id,tabindex:`0`},n(Na(i.label),{size:12,class:`ficon`}),i.label,e);i.size!=null&&t.appendChild(E(`span`,{class:`sz`},Pa(i.size))),r.push(t)}return r}var za=class extends HTMLElement{static get observedAttributes(){return[`selected`]}#e=null;#t=new Map;#n=new Set;#r=!1;#i=null;#a=null;#o=null;connectedCallback(){La(this.ownerDocument),this.#r||=(this.#e??(this.#e=this.#l(),this.#f()),!0),this.#u(),this.#h(),this.#g()}disconnectedCallback(){this.#i&&=(this.removeEventListener(`click`,this.#i),null),this.#a&&=(this.removeEventListener(`keydown`,this.#a),null),this.#o!=null&&(clearTimeout(this.#o),this.#o=null)}attributeChangedCallback(e){e===`selected`&&this.#r&&this.isConnected&&this.#c()}get items(){return this.#e?this.#e.slice():[]}set items(e){let t=!this.#r;this.#e=Array.isArray(e)?e.slice():[],this.#r=!0,t&&this.#f(),this.isConnected&&(this.#u(),this.#h())}toggleDir(e){if(!this.#p(e,this.#e??[]))return;let t=!this.#n.has(e);t?this.#n.add(e):this.#n.delete(e),this.#u(),this.dispatchEvent(new CustomEvent(`dir-toggle`,{bubbles:!0,composed:!0,detail:{id:e,open:t}}))}isDirOpen(e){return this.#n.has(e)}get selected(){return this.getAttribute(`selected`)}set selected(e){e==null?this.removeAttribute(`selected`):this.setAttribute(`selected`,e)}selectFile(e){let t=this.querySelector(`.f[data-id="${$(e)}"]`);if(!t)return;this.#s(e,t);let n=this.#t.get(e)??e;this.dispatchEvent(new CustomEvent(`file-select`,{bubbles:!0,composed:!0,detail:{id:e,path:n}}))}#s(e,t){this.getAttribute(`selected`)!==e&&this.setAttribute(`selected`,e),this.#c(),t.focus()}#c(){let e=this.getAttribute(`selected`);for(let t of this.querySelectorAll(`.f, .dir`))t.classList.toggle(`on`,(t.dataset.id??t.dataset.dirId)===e)}#l(){let e=[];for(let t of Array.from(this.children)){if(!(t instanceof HTMLElement))continue;let n=(t.textContent??``).trim();if(n)if(t.classList.contains(`grp`)||t.hasAttribute(`data-group`)||t.dataset.group!=null)e.push({kind:`group`,label:n});else{let r=t.dataset.id??t.id??n;e.push({kind:`file`,id:r,label:n})}}return e}#u(){let e=this.contains(document.activeElement),t=this.#e??[];this.#t.clear(),this.#d(t),this.replaceChildren(...Ra(t,this.#n)),this.#c();let n=this.getAttribute(`selected`);e&&n!=null&&this.querySelector(`.f[data-id="${$(n)}"], .dir[data-dir-id="${$(n)}"]`)?.focus()}#d(e){for(let t of e)t.kind===`file`?this.#t.set(t.id,t.path??t.label):t.kind===`dir`&&(this.#t.set(t.id,t.path??t.id),this.#d(t.children??[]))}#f(){this.#n.clear();let e=t=>{for(let n of t)n.kind===`dir`&&(n.open&&this.#n.add(n.id),e(n.children??[]))};e(this.#e??[])}#p(e,t){for(let n of t)if(n.kind===`dir`&&(n.id===e||this.#p(e,n.children??[])))return!0;return!1}#m(e){let t=e.dataset.action,n=e.closest(`.f`);if(!n)return!1;let r=n.dataset.id;if(r==null)return!1;let i=this.#t.get(r)??r;return t===`preview`?this.dispatchEvent(new CustomEvent(`file-preview`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`reference`?this.dispatchEvent(new CustomEvent(`file-reference`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`download`?this.dispatchEvent(new CustomEvent(`file-download`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`overflow`&&this.dispatchEvent(new CustomEvent(`file-overflow`,{bubbles:!0,composed:!0,detail:{id:r,path:i,anchor:e}})),!0}#h(){this.#i||(this.#i=e=>{let t=e.target,n=t?.closest(`[data-action]`);if(n&&this.contains(n)&&this.#m(n))return;let r=t?.closest(`.dir`);if(r&&this.contains(r)){let e=r.dataset.dirId;e!=null&&(this.#s(e,r),this.toggleDir(e));return}let i=t?.closest(`.f`);if(!i||!this.contains(i))return;let a=i.dataset.id;a!=null&&this.selectFile(a)},this.addEventListener(`click`,this.#i))}#g(){this.#a||(this.#a=e=>{if(e.key!==`c`||!(e.ctrlKey||e.metaKey))return;let t=this.getAttribute(`selected`);if(t==null)return;let n=this.querySelector(`.f[data-id="${$(t)}"], .dir[data-dir-id="${$(t)}"]`);if(!n)return;e.preventDefault();let r=this.#t.get(t)??t;navigator.clipboard?.writeText(r).then(()=>{this.#o!=null&&clearTimeout(this.#o),n.classList.add(`ft-copy-flash`),this.#o=setTimeout(()=>{n.classList.remove(`ft-copy-flash`),this.#o=null},300)}).catch(()=>void 0)},this.addEventListener(`keydown`,this.#a))}};function $(e){return e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}w(`slicc-file-tree`,za);var Ba=`
4555
+ `,La=`slicc-file-tree-style`;function Ra(e){if(e.getElementById(La))return;let t=e.createElement(`style`);t.id=La,t.textContent=Ia,(e.head??e.documentElement).appendChild(t)}function za(e,t){let r=[];for(let i of e)if(i.kind===`group`)r.push(w(`div`,{class:`grp`},i.label));else if(i.kind===`dir`){let e=t.has(i.id);r.push(w(`div`,{class:e?`dir open`:`dir`,"data-dir-id":i.id,"aria-expanded":e?`true`:`false`,tabindex:`0`},n(`chevron-right`,{size:14,class:`chev`}),i.label));let a=w(`div`,{class:`children`,hidden:!e||void 0});C(a,za(i.children??[],t)),r.push(a)}else{let e=w(`div`,{class:`actions`},w(`button`,{"data-action":`preview`,type:`button`},n(`eye`,{size:14})),w(`button`,{"data-action":`reference`,type:`button`},n(`at-sign`,{size:14})),w(`button`,{"data-action":`download`,type:`button`},n(`arrow-down-to-line`,{size:14})),w(`button`,{"data-action":`overflow`,type:`button`},n(`ellipsis`,{size:14}))),t=w(`div`,{class:`f`,"data-id":i.id,tabindex:`0`},n(Pa(i.label),{size:12,class:`ficon`}),i.label,e);i.size!=null&&t.appendChild(w(`span`,{class:`sz`},Fa(i.size))),r.push(t)}return r}var Ba=class extends HTMLElement{static get observedAttributes(){return[`selected`]}#e=null;#t=new Map;#n=new Set;#r=!1;#i=null;#a=null;#o=null;connectedCallback(){Ra(this.ownerDocument),this.#r||=(this.#e??(this.#e=this.#l(),this.#f()),!0),this.#u(),this.#h(),this.#g()}disconnectedCallback(){this.#i&&=(this.removeEventListener(`click`,this.#i),null),this.#a&&=(this.removeEventListener(`keydown`,this.#a),null),this.#o!=null&&(clearTimeout(this.#o),this.#o=null)}attributeChangedCallback(e){e===`selected`&&this.#r&&this.isConnected&&this.#c()}get items(){return this.#e?this.#e.slice():[]}set items(e){let t=!this.#r;this.#e=Array.isArray(e)?e.slice():[],this.#r=!0,t&&this.#f(),this.isConnected&&(this.#u(),this.#h())}toggleDir(e){if(!this.#p(e,this.#e??[]))return;let t=!this.#n.has(e);t?this.#n.add(e):this.#n.delete(e),this.#u(),this.dispatchEvent(new CustomEvent(`dir-toggle`,{bubbles:!0,composed:!0,detail:{id:e,open:t}}))}isDirOpen(e){return this.#n.has(e)}get selected(){return this.getAttribute(`selected`)}set selected(e){e==null?this.removeAttribute(`selected`):this.setAttribute(`selected`,e)}selectFile(e){let t=this.querySelector(`.f[data-id="${$(e)}"]`);if(!t)return;this.#s(e,t);let n=this.#t.get(e)??e;this.dispatchEvent(new CustomEvent(`file-select`,{bubbles:!0,composed:!0,detail:{id:e,path:n}}))}#s(e,t){this.getAttribute(`selected`)!==e&&this.setAttribute(`selected`,e),this.#c(),t.focus()}#c(){let e=this.getAttribute(`selected`);for(let t of this.querySelectorAll(`.f, .dir`))t.classList.toggle(`on`,(t.dataset.id??t.dataset.dirId)===e)}#l(){let e=[];for(let t of Array.from(this.children)){if(!(t instanceof HTMLElement))continue;let n=(t.textContent??``).trim();if(n)if(t.classList.contains(`grp`)||t.hasAttribute(`data-group`)||t.dataset.group!=null)e.push({kind:`group`,label:n});else{let r=t.dataset.id??t.id??n;e.push({kind:`file`,id:r,label:n})}}return e}#u(){let e=this.contains(document.activeElement),t=this.#e??[];this.#t.clear(),this.#d(t),this.replaceChildren(...za(t,this.#n)),this.#c();let n=this.getAttribute(`selected`);e&&n!=null&&this.querySelector(`.f[data-id="${$(n)}"], .dir[data-dir-id="${$(n)}"]`)?.focus()}#d(e){for(let t of e)t.kind===`file`?this.#t.set(t.id,t.path??t.label):t.kind===`dir`&&(this.#t.set(t.id,t.path??t.id),this.#d(t.children??[]))}#f(){this.#n.clear();let e=t=>{for(let n of t)n.kind===`dir`&&(n.open&&this.#n.add(n.id),e(n.children??[]))};e(this.#e??[])}#p(e,t){for(let n of t)if(n.kind===`dir`&&(n.id===e||this.#p(e,n.children??[])))return!0;return!1}#m(e){let t=e.dataset.action,n=e.closest(`.f`);if(!n)return!1;let r=n.dataset.id;if(r==null)return!1;let i=this.#t.get(r)??r;return t===`preview`?this.dispatchEvent(new CustomEvent(`file-preview`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`reference`?this.dispatchEvent(new CustomEvent(`file-reference`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`download`?this.dispatchEvent(new CustomEvent(`file-download`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`overflow`&&this.dispatchEvent(new CustomEvent(`file-overflow`,{bubbles:!0,composed:!0,detail:{id:r,path:i,anchor:e}})),!0}#h(){this.#i||(this.#i=e=>{let t=e.target,n=t?.closest(`[data-action]`);if(n&&this.contains(n)&&this.#m(n))return;let r=t?.closest(`.dir`);if(r&&this.contains(r)){let e=r.dataset.dirId;e!=null&&(this.#s(e,r),this.toggleDir(e));return}let i=t?.closest(`.f`);if(!i||!this.contains(i))return;let a=i.dataset.id;a!=null&&this.selectFile(a)},this.addEventListener(`click`,this.#i))}#g(){this.#a||(this.#a=e=>{if(e.key!==`c`||!(e.ctrlKey||e.metaKey))return;let t=this.getAttribute(`selected`);if(t==null)return;let n=this.querySelector(`.f[data-id="${$(t)}"], .dir[data-dir-id="${$(t)}"]`);if(!n)return;e.preventDefault();let r=this.#t.get(t)??t;navigator.clipboard?.writeText(r).then(()=>{this.#o!=null&&clearTimeout(this.#o),n.classList.add(`ft-copy-flash`),this.#o=setTimeout(()=>{n.classList.remove(`ft-copy-flash`),this.#o=null},300)}).catch(()=>void 0)},this.addEventListener(`keydown`,this.#a))}};function $(e){return e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}S(`slicc-file-tree`,Ba);var Va=`
4556
4556
  slicc-surface {
4557
4557
  position: absolute;
4558
4558
  inset: 0;
@@ -4584,7 +4584,7 @@ slicc-surface:fullscreen {
4584
4584
  background: var(--canvas, #fff);
4585
4585
  position: fixed;
4586
4586
  }
4587
- `,Va=`slicc-surface-style`;function Ha(e){if(e.getElementById(Va))return;let t=e.createElement(`style`);t.id=Va,t.textContent=Ba,(e.head??e.documentElement).appendChild(t)}function Ua(e){return e===`block`||e===`column`?e:`flex`}w(`slicc-surface`,class extends HTMLElement{static observedAttributes=[`surface-id`,`active`,`layout`];connectedCallback(){Ha(this.ownerDocument),this.#e()}attributeChangedCallback(e,t,n){this.isConnected&&(e===`surface-id`?this.#e():e===`active`&&t!==n&&this.dispatchEvent(new CustomEvent(`surface-toggle`,{bubbles:!0,composed:!0,detail:{surfaceId:this.surfaceId,active:this.active,layout:this.layout}})))}get surfaceId(){return this.getAttribute(`surface-id`)}set surfaceId(e){e==null?this.removeAttribute(`surface-id`):this.setAttribute(`surface-id`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get layout(){return Ua(this.getAttribute(`layout`))}set layout(e){this.setAttribute(`layout`,Ua(e))}#e(){let e=this.surfaceId;e==null?delete this.dataset.s:this.dataset.s=e}});var Wa=D(`
4587
+ `,Ha=`slicc-surface-style`;function Ua(e){if(e.getElementById(Ha))return;let t=e.createElement(`style`);t.id=Ha,t.textContent=Va,(e.head??e.documentElement).appendChild(t)}function Wa(e){return e===`block`||e===`column`?e:`flex`}S(`slicc-surface`,class extends HTMLElement{static observedAttributes=[`surface-id`,`active`,`layout`];connectedCallback(){Ua(this.ownerDocument),this.#e()}attributeChangedCallback(e,t,n){this.isConnected&&(e===`surface-id`?this.#e():e===`active`&&t!==n&&this.dispatchEvent(new CustomEvent(`surface-toggle`,{bubbles:!0,composed:!0,detail:{surfaceId:this.surfaceId,active:this.active,layout:this.layout}})))}get surfaceId(){return this.getAttribute(`surface-id`)}set surfaceId(e){e==null?this.removeAttribute(`surface-id`):this.setAttribute(`surface-id`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get layout(){return Wa(this.getAttribute(`layout`))}set layout(e){this.setAttribute(`layout`,Wa(e))}#e(){let e=this.surfaceId;e==null?delete this.dataset.s:this.dataset.s=e}});var Ga=T(`
4588
4588
  :host{display:inline-flex;white-space:nowrap;}
4589
4589
  .tab{display:inline-flex;align-items:center;gap:7px;font-family:var(--ui);font-size:12px;color:var(--txt-2);background:transparent;border:1px solid transparent;border-radius:8px;padding:6px 10px;cursor:pointer;white-space:nowrap;}
4590
4590
  .tab:hover{background:var(--ghost);color:var(--ink);}
@@ -4600,7 +4600,7 @@ slicc-surface:fullscreen {
4600
4600
  .x{margin-left:3px;width:15px;height:15px;border-radius:4px;display:grid;place-items:center;color:var(--txt-3);}
4601
4601
  .x:hover{background:var(--line);color:var(--ink);}
4602
4602
  .sg svg,.x svg{display:block;}
4603
- `),Ga=13;w(`slicc-tab`,class extends HTMLElement{static observedAttributes=[`tab-id`,`kind`,`active`,`closable`,`badge`,`glyph`,`label`,`theme`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Wa]}connectedCallback(){this.#n(),this.#r()}disconnectedCallback(){this.#i()}attributeChangedCallback(){this.isConnected&&this.#n()}get tabId(){return this.getAttribute(`tab-id`)}set tabId(e){e==null?this.removeAttribute(`tab-id`):this.setAttribute(`tab-id`,e)}get kind(){return this.getAttribute(`kind`)===`sprinkle`?`sprinkle`:`tool`}set kind(e){this.setAttribute(`kind`,e===`sprinkle`?`sprinkle`:`tool`)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get closable(){return this.hasAttribute(`closable`)}set closable(e){this.toggleAttribute(`closable`,e)}get badge(){return this.getAttribute(`badge`)}set badge(e){e==null?this.removeAttribute(`badge`):this.setAttribute(`badge`,e)}get glyph(){return this.getAttribute(`glyph`)}set glyph(e){e==null?this.removeAttribute(`glyph`):this.setAttribute(`glyph`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#n(){let e=this.kind===`sprinkle`,t=E(`button`,{class:`tab${e?` sp`:``}${this.active?` on`:``}`,part:`tab`,type:`button`});if(this.tabId!=null&&t.setAttribute(`data-t`,this.tabId),e){let e=this.badge??`sparkles`;t.append(E(`span`,{class:`sg`,part:`badge`,"aria-hidden":`true`},n(e,{size:Ga})))}else this.glyph!=null&&t.append(E(`span`,{class:`gl`,part:`glyph`,"aria-hidden":`true`},this.glyph));let r=this.label;t.append(r==null?E(`slot`):document.createTextNode(r)),this.closable&&t.append(E(`span`,{class:`x`,part:`close`,"data-close":``,role:`button`,"aria-label":`Close tab`},n(`x`,{size:Ga}))),this.#e.replaceChildren(t)}#r(){this.#t||(this.#t=e=>this.#a(e),this.#e.addEventListener(`click`,this.#t))}#i(){this.#t&&=(this.#e.removeEventListener(`click`,this.#t),null)}#a(e){let t=e.target,n={tabId:this.tabId};if(t?.closest(`[data-close]`)){e.stopPropagation(),this.dispatchEvent(new CustomEvent(`close`,{detail:n,bubbles:!0,composed:!0}));return}this.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}});var Ka=`
4603
+ `),Ka=13;S(`slicc-tab`,class extends HTMLElement{static observedAttributes=[`tab-id`,`kind`,`active`,`closable`,`badge`,`glyph`,`label`,`theme`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ga]}connectedCallback(){this.#n(),this.#r()}disconnectedCallback(){this.#i()}attributeChangedCallback(){this.isConnected&&this.#n()}get tabId(){return this.getAttribute(`tab-id`)}set tabId(e){e==null?this.removeAttribute(`tab-id`):this.setAttribute(`tab-id`,e)}get kind(){return this.getAttribute(`kind`)===`sprinkle`?`sprinkle`:`tool`}set kind(e){this.setAttribute(`kind`,e===`sprinkle`?`sprinkle`:`tool`)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get closable(){return this.hasAttribute(`closable`)}set closable(e){this.toggleAttribute(`closable`,e)}get badge(){return this.getAttribute(`badge`)}set badge(e){e==null?this.removeAttribute(`badge`):this.setAttribute(`badge`,e)}get glyph(){return this.getAttribute(`glyph`)}set glyph(e){e==null?this.removeAttribute(`glyph`):this.setAttribute(`glyph`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#n(){let e=this.kind===`sprinkle`,t=w(`button`,{class:`tab${e?` sp`:``}${this.active?` on`:``}`,part:`tab`,type:`button`});if(this.tabId!=null&&t.setAttribute(`data-t`,this.tabId),e){let e=this.badge??`sparkles`;t.append(w(`span`,{class:`sg`,part:`badge`,"aria-hidden":`true`},n(e,{size:Ka})))}else this.glyph!=null&&t.append(w(`span`,{class:`gl`,part:`glyph`,"aria-hidden":`true`},this.glyph));let r=this.label;t.append(r==null?w(`slot`):document.createTextNode(r)),this.closable&&t.append(w(`span`,{class:`x`,part:`close`,"data-close":``,role:`button`,"aria-label":`Close tab`},n(`x`,{size:Ka}))),this.#e.replaceChildren(t)}#r(){this.#t||(this.#t=e=>this.#a(e),this.#e.addEventListener(`click`,this.#t))}#i(){this.#t&&=(this.#e.removeEventListener(`click`,this.#t),null)}#a(e){let t=e.target,n={tabId:this.tabId};if(t?.closest(`[data-close]`)){e.stopPropagation(),this.dispatchEvent(new CustomEvent(`close`,{detail:n,bubbles:!0,composed:!0}));return}this.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}});var qa=`
4604
4604
  slicc-tab-bar {
4605
4605
  display: flex;
4606
4606
  align-items: center;
@@ -4612,7 +4612,7 @@ slicc-tab-bar {
4612
4612
  slicc-tab-bar[hidden] {
4613
4613
  display: none;
4614
4614
  }
4615
- `,qa=`slicc-tab-bar-style`;function Ja(e){if(e.getElementById(qa))return;let t=e.createElement(`style`);t.id=qa,t.textContent=Ka,(e.head??e.documentElement).appendChild(t)}function Ya(e){return e===`sprinkle`?`sprinkle`:`tool`}w(`slicc-tab-bar`,class extends HTMLElement{static observedAttributes=[`active`];#e=[];#t=!1;#n=null;#r=null;#i=null;connectedCallback(){Ja(this.ownerDocument),this.#c(),this.#p()}disconnectedCallback(){this.#l(),this.#t=!1}attributeChangedCallback(e){e===`active`&&this.isConnected&&this.#o()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get tabs(){return this.#e.map(e=>({...e}))}set tabs(e){this.#e=(e??[]).map(e=>({...e})),this.active!=null&&!this.#e.some(e=>e.id===this.active)&&this.#a(this.#e[0]?.id??null),this.#t=!1,this.isConnected&&this.#p()}addTab(e){let t={...e,kind:Ya(e.kind)},n=this.#e.findIndex(e=>e.id===t.id);return n>=0?this.#e[n]=t:this.#e.push(t),this.#t=!1,this.isConnected&&this.#p(),this.selectTab(t.id),t}removeTab(e){let t=this.#e.findIndex(t=>t.id===e);if(t<0)return;let n=this.active===e;if(this.#e.splice(t,1),this.#t=!1,this.isConnected&&this.#p(),this.dispatchEvent(new CustomEvent(`tab-close`,{detail:{id:e},bubbles:!0,composed:!0})),n){let e=this.#e[0]?.id??null;e==null?this.#a(null):this.selectTab(e)}}selectTab(e){this.#e.some(t=>t.id===e)&&this.active!==e&&(this.#a(e),this.dispatchEvent(new CustomEvent(`tab-select`,{detail:{id:e},bubbles:!0,composed:!0})))}#a(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e),this.#o()}#o(){let e=this.active;for(let t of this.querySelectorAll(`:scope > slicc-tab`)){let n=t.getAttribute(`tab-id`);t.toggleAttribute(`active`,n!=null&&n===e)}}#s(e){if(!(e instanceof Element))return null;let t=e.closest(`slicc-tab`);return!t||t.parentElement!==this?null:t.getAttribute(`tab-id`)}#c(){this.#r||(this.#r=e=>this.#u(e),this.#i=e=>this.#d(e),this.addEventListener(`select`,this.#r),this.addEventListener(`close`,this.#i),this.#n=e=>this.#f(e),this.addEventListener(`click`,this.#n))}#l(){this.#r&&this.removeEventListener(`select`,this.#r),this.#i&&this.removeEventListener(`close`,this.#i),this.#n&&this.removeEventListener(`click`,this.#n),this.#r=null,this.#i=null,this.#n=null}#u(e){if(e.target===this)return;let t=this.#s(e.target);t!=null&&(e.stopPropagation(),this.selectTab(t))}#d(e){if(e.target===this)return;let t=this.#s(e.target);t!=null&&(e.stopPropagation(),this.removeTab(t))}#f(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`slicc-tab`);if(!n||n.parentElement!==this)return;let r=n.getAttribute(`tab-id`);if(r==null)return;let i=t.closest(`.x, [data-close]`);if(i&&n.contains(i)){e.stopPropagation(),this.removeTab(r);return}this.selectTab(r)}#p(){if(this.#t)return;this.#t=!0;let e=this.active,t=[];for(let n of this.#e){let r=Ya(n.kind);r!==`tool`&&t.push(E(`slicc-tab`,{"tab-id":n.id,kind:r,label:n.label,part:`tab`,closable:n.closable?!0:void 0,badge:n.badge||void 0,glyph:n.glyph||void 0,active:e!=null&&e===n.id||void 0}))}this.replaceChildren(...t)}});var Xa=`/**
4615
+ `,Ja=`slicc-tab-bar-style`;function Ya(e){if(e.getElementById(Ja))return;let t=e.createElement(`style`);t.id=Ja,t.textContent=qa,(e.head??e.documentElement).appendChild(t)}function Xa(e){return e===`sprinkle`?`sprinkle`:`tool`}S(`slicc-tab-bar`,class extends HTMLElement{static observedAttributes=[`active`];#e=[];#t=!1;#n=null;#r=null;#i=null;connectedCallback(){Ya(this.ownerDocument),this.#c(),this.#p()}disconnectedCallback(){this.#l(),this.#t=!1}attributeChangedCallback(e){e===`active`&&this.isConnected&&this.#o()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get tabs(){return this.#e.map(e=>({...e}))}set tabs(e){this.#e=(e??[]).map(e=>({...e})),this.active!=null&&!this.#e.some(e=>e.id===this.active)&&this.#a(this.#e[0]?.id??null),this.#t=!1,this.isConnected&&this.#p()}addTab(e){let t={...e,kind:Xa(e.kind)},n=this.#e.findIndex(e=>e.id===t.id);return n>=0?this.#e[n]=t:this.#e.push(t),this.#t=!1,this.isConnected&&this.#p(),this.selectTab(t.id),t}removeTab(e){let t=this.#e.findIndex(t=>t.id===e);if(t<0)return;let n=this.active===e;if(this.#e.splice(t,1),this.#t=!1,this.isConnected&&this.#p(),this.dispatchEvent(new CustomEvent(`tab-close`,{detail:{id:e},bubbles:!0,composed:!0})),n){let e=this.#e[0]?.id??null;e==null?this.#a(null):this.selectTab(e)}}selectTab(e){this.#e.some(t=>t.id===e)&&this.active!==e&&(this.#a(e),this.dispatchEvent(new CustomEvent(`tab-select`,{detail:{id:e},bubbles:!0,composed:!0})))}#a(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e),this.#o()}#o(){let e=this.active;for(let t of this.querySelectorAll(`:scope > slicc-tab`)){let n=t.getAttribute(`tab-id`);t.toggleAttribute(`active`,n!=null&&n===e)}}#s(e){if(!(e instanceof Element))return null;let t=e.closest(`slicc-tab`);return!t||t.parentElement!==this?null:t.getAttribute(`tab-id`)}#c(){this.#r||(this.#r=e=>this.#u(e),this.#i=e=>this.#d(e),this.addEventListener(`select`,this.#r),this.addEventListener(`close`,this.#i),this.#n=e=>this.#f(e),this.addEventListener(`click`,this.#n))}#l(){this.#r&&this.removeEventListener(`select`,this.#r),this.#i&&this.removeEventListener(`close`,this.#i),this.#n&&this.removeEventListener(`click`,this.#n),this.#r=null,this.#i=null,this.#n=null}#u(e){if(e.target===this)return;let t=this.#s(e.target);t!=null&&(e.stopPropagation(),this.selectTab(t))}#d(e){if(e.target===this)return;let t=this.#s(e.target);t!=null&&(e.stopPropagation(),this.removeTab(t))}#f(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`slicc-tab`);if(!n||n.parentElement!==this)return;let r=n.getAttribute(`tab-id`);if(r==null)return;let i=t.closest(`.x, [data-close]`);if(i&&n.contains(i)){e.stopPropagation(),this.removeTab(r);return}this.selectTab(r)}#p(){if(this.#t)return;this.#t=!0;let e=this.active,t=[];for(let n of this.#e){let r=Xa(n.kind);r!==`tool`&&t.push(w(`slicc-tab`,{"tab-id":n.id,kind:r,label:n.label,part:`tab`,closable:n.closable?!0:void 0,badge:n.badge||void 0,glyph:n.glyph||void 0,active:e!=null&&e===n.id||void 0}))}this.replaceChildren(...t)}});var Za=`/**
4616
4616
  * Copyright (c) 2014 The xterm.js authors. All rights reserved.
4617
4617
  * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
4618
4618
  * https://github.com/chjj/term.js
@@ -4897,7 +4897,7 @@ slicc-tab-bar[hidden] {
4897
4897
  .xterm .xterm-scrollable-element > .shadow.top.left {
4898
4898
  box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
4899
4899
  }
4900
- `,Za={background:`#0c0c0e`,foreground:`#e7e7ea`,cursor:`#e7e7ea`,cursorAccent:`#0c0c0e`,selectionBackground:`#8b5cf64d`,selectionForeground:`#ffffff`,black:`#0c0c0e`,red:`#f43f5e`,green:`#5bd17b`,yellow:`#f59e0b`,blue:`#3b82f6`,magenta:`#8b5cf6`,cyan:`#06b6d4`,white:`#e7e7ea`,brightBlack:`#8a8a93`,brightRed:`#fb7185`,brightGreen:`#86efac`,brightYellow:`#fbbf24`,brightBlue:`#60a5fa`,brightMagenta:`#a78bfa`,brightCyan:`#22d3ee`,brightWhite:`#ffffff`},Qa=`
4900
+ `,Qa={background:`#0c0c0e`,foreground:`#e7e7ea`,cursor:`#e7e7ea`,cursorAccent:`#0c0c0e`,selectionBackground:`#8b5cf64d`,selectionForeground:`#ffffff`,black:`#0c0c0e`,red:`#f43f5e`,green:`#5bd17b`,yellow:`#f59e0b`,blue:`#3b82f6`,magenta:`#8b5cf6`,cyan:`#06b6d4`,white:`#e7e7ea`,brightBlack:`#8a8a93`,brightRed:`#fb7185`,brightGreen:`#86efac`,brightYellow:`#fbbf24`,brightBlue:`#60a5fa`,brightMagenta:`#a78bfa`,brightCyan:`#22d3ee`,brightWhite:`#ffffff`},$a=`
4901
4901
  :host {
4902
4902
  display: flex;
4903
4903
  flex-direction: column;
@@ -4938,7 +4938,7 @@ slicc-tab-bar[hidden] {
4938
4938
  /* xterm.js wants its container to size the canvas; let it fill. */
4939
4939
  .host .xterm { height: 100%; }
4940
4940
  .host .xterm-viewport { overflow-y: auto; }
4941
- `,$a=null;function eo(){return $a||=[D(Xa),D(Qa)],$a}var to=class extends HTMLElement{static observedAttributes=[`label`,`hide-header`];#e;#t=null;#n=null;#r=null;#i=null;#a=[];#o=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`})}connectedCallback(){this.#o=!1,this.#s(),this.#c()}disconnectedCallback(){this.#l()}attributeChangedCallback(e){if(this.isConnected&&e===`label`){let e=this.#e.querySelector(`.title`);e&&(e.textContent=this.label)}}get label(){return this.getAttribute(`label`)??`Terminal`}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get hideHeader(){return this.hasAttribute(`hide-header`)}set hideHeader(e){this.toggleAttribute(`hide-header`,e)}get terminal(){return this.#n}write(e){this.#n?this.#n.write(e):this.#a.push(e)}writeln(e){this.#n?this.#n.writeln(e):this.#a.push(`${e}\r\n`)}clear(){this.#n?this.#n.clear():this.#a.length=0}focus(){this.#n?.focus()}fit(){this.#r?.fit()}#s(){if(this.#t)return;this.#e.adoptedStyleSheets=eo();let e=E(`div`,{class:`hd`,part:`header`},n(`terminal`,{size:14}),E(`span`,{class:`title`},this.label),E(`span`,{class:`spacer`})),t=E(`div`,{class:`host`,part:`host`});this.#e.replaceChildren(e,t),this.#t=t}async#c(){if(this.#n||this.#o)return;let[{Terminal:e},{FitAddon:n}]=await Promise.all([t(()=>import(`./xterm-U4TA8lIC.js`),[]),t(()=>import(`./addon-fit-DIOBYJe3.js`),[])]);if(this.#o||!this.#t)return;let r=new e({cursorBlink:!no(),fontSize:12,lineHeight:1.25,fontFamily:`'IBM Plex Mono', 'Source Code Pro', 'JetBrains Mono', ui-monospace, monospace`,theme:Za,convertEol:!0,scrollback:2e3}),i=new n;if(r.loadAddon(i),r.open(this.#t),r.onData(e=>{this.dispatchEvent(new CustomEvent(`terminal-data`,{detail:e,bubbles:!0,composed:!0}))}),this.#n=r,this.#r=i,i.fit(),this.#a.length){for(let e of this.#a)r.write(e);this.#a.length=0}typeof ResizeObserver==`function`&&(this.#i=new ResizeObserver(()=>this.#r?.fit()),this.#i.observe(this.#t))}#l(){this.#o=!0,this.#i?.disconnect(),this.#i=null,this.#n?.dispose(),this.#n=null,this.#r=null,this.#a.length=0}};function no(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}w(`slicc-terminal`,to);var ro=`
4941
+ `,eo=null;function to(){return eo||=[T(Za),T($a)],eo}var no=class extends HTMLElement{static observedAttributes=[`label`,`hide-header`];#e;#t=null;#n=null;#r=null;#i=null;#a=[];#o=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`})}connectedCallback(){this.#o=!1,this.#s(),this.#c()}disconnectedCallback(){this.#l()}attributeChangedCallback(e){if(this.isConnected&&e===`label`){let e=this.#e.querySelector(`.title`);e&&(e.textContent=this.label)}}get label(){return this.getAttribute(`label`)??`Terminal`}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get hideHeader(){return this.hasAttribute(`hide-header`)}set hideHeader(e){this.toggleAttribute(`hide-header`,e)}get terminal(){return this.#n}write(e){this.#n?this.#n.write(e):this.#a.push(e)}writeln(e){this.#n?this.#n.writeln(e):this.#a.push(`${e}\r\n`)}clear(){this.#n?this.#n.clear():this.#a.length=0}focus(){this.#n?.focus()}fit(){this.#r?.fit()}#s(){if(this.#t)return;this.#e.adoptedStyleSheets=to();let e=w(`div`,{class:`hd`,part:`header`},n(`terminal`,{size:14}),w(`span`,{class:`title`},this.label),w(`span`,{class:`spacer`})),t=w(`div`,{class:`host`,part:`host`});this.#e.replaceChildren(e,t),this.#t=t}async#c(){if(this.#n||this.#o)return;let[{Terminal:e},{FitAddon:n}]=await Promise.all([t(()=>import(`./xterm-U4TA8lIC.js`),[]),t(()=>import(`./addon-fit-DIOBYJe3.js`),[])]);if(this.#o||!this.#t)return;let r=new e({cursorBlink:!ro(),fontSize:12,lineHeight:1.25,fontFamily:`'IBM Plex Mono', 'Source Code Pro', 'JetBrains Mono', ui-monospace, monospace`,theme:Qa,convertEol:!0,scrollback:2e3}),i=new n;if(r.loadAddon(i),r.open(this.#t),r.onData(e=>{this.dispatchEvent(new CustomEvent(`terminal-data`,{detail:e,bubbles:!0,composed:!0}))}),this.#n=r,this.#r=i,i.fit(),this.#a.length){for(let e of this.#a)r.write(e);this.#a.length=0}typeof ResizeObserver==`function`&&(this.#i=new ResizeObserver(()=>this.#r?.fit()),this.#i.observe(this.#t))}#l(){this.#o=!0,this.#i?.disconnect(),this.#i=null,this.#n?.dispose(),this.#n=null,this.#r=null,this.#a.length=0}};function ro(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}S(`slicc-terminal`,no);var io=`
4942
4942
  slicc-workbench-body {
4943
4943
  flex: 1;
4944
4944
  min-height: 0;
@@ -4959,7 +4959,7 @@ slicc-workbench-body > * {
4959
4959
  slicc-workbench-body > .slicc-wbbody__active {
4960
4960
  display: flex;
4961
4961
  }
4962
- `,io=`slicc-workbench-body-style`,ao=`slicc-wbbody__active`,oo=`slicc-surface`;function so(e){if(e.getElementById(io))return;let t=e.createElement(`style`);t.id=io,t.textContent=ro,(e.head??e.documentElement).appendChild(t)}w(`slicc-workbench-body`,class extends HTMLElement{static observedAttributes=[`active`];#e=!1;#t=new MutationObserver(()=>this.#i());connectedCallback(){so(this.ownerDocument),this.#e=!0,this.#i(),this.#t.observe(this,{childList:!0})}disconnectedCallback(){this.#e=!1,this.#t.disconnect()}attributeChangedCallback(e,t,n){t!==n&&e===`active`&&this.#e&&this.#i()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get activeSurface(){let e=this.active;return e==null?null:this.#n().find(t=>this.#r(t)===e)??null}get surfaces(){return this.#n()}selectSurface(e){let t=this.active;e!==t&&(this.setAttribute(`active`,e),this.#e||this.#i(),this.dispatchEvent(new CustomEvent(`slicc-surface-change`,{bubbles:!0,composed:!0,detail:{id:e,previous:t}})))}#n(){let e=[];for(let t of Array.from(this.children))t instanceof HTMLElement&&t.localName===oo&&e.push(t);return e}#r(e){return e.getAttribute(`surface-id`)||e.getAttribute(`data-s`)||e.id}#i(){let e=this.active;for(let t of this.#n()){let n=e!=null&&this.#r(t)===e;t.classList.toggle(ao,n),t.toggleAttribute(`active`,n)}}});var co=`
4962
+ `,ao=`slicc-workbench-body-style`,oo=`slicc-wbbody__active`,so=`slicc-surface`;function co(e){if(e.getElementById(ao))return;let t=e.createElement(`style`);t.id=ao,t.textContent=io,(e.head??e.documentElement).appendChild(t)}S(`slicc-workbench-body`,class extends HTMLElement{static observedAttributes=[`active`];#e=!1;#t=new MutationObserver(()=>this.#i());connectedCallback(){co(this.ownerDocument),this.#e=!0,this.#i(),this.#t.observe(this,{childList:!0})}disconnectedCallback(){this.#e=!1,this.#t.disconnect()}attributeChangedCallback(e,t,n){t!==n&&e===`active`&&this.#e&&this.#i()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get activeSurface(){let e=this.active;return e==null?null:this.#n().find(t=>this.#r(t)===e)??null}get surfaces(){return this.#n()}selectSurface(e){let t=this.active;e!==t&&(this.setAttribute(`active`,e),this.#e||this.#i(),this.dispatchEvent(new CustomEvent(`slicc-surface-change`,{bubbles:!0,composed:!0,detail:{id:e,previous:t}})))}#n(){let e=[];for(let t of Array.from(this.children))t instanceof HTMLElement&&t.localName===so&&e.push(t);return e}#r(e){return e.getAttribute(`surface-id`)||e.getAttribute(`data-s`)||e.id}#i(){let e=this.active;for(let t of this.#n()){let n=e!=null&&this.#r(t)===e;t.classList.toggle(oo,n),t.toggleAttribute(`active`,n)}}});var lo=`
4963
4963
  slicc-workbench-header {
4964
4964
  flex: 0 0 auto;
4965
4965
  display: flex;
@@ -4986,7 +4986,7 @@ slicc-workbench-header > slicc-collapse-btn {
4986
4986
  slicc-workbench-header > slicc-tab-bar {
4987
4987
  min-width: 0;
4988
4988
  }
4989
- `,lo=`slicc-workbench-header-style`;function uo(e){if(e.getElementById(lo))return;let t=e.createElement(`style`);t.id=lo,t.textContent=co,(e.head??e.documentElement).appendChild(t)}w(`slicc-workbench-header`,class extends HTMLElement{static observedAttributes=[`kind`];#e;#t=!1;connectedCallback(){uo(this.ownerDocument),this.#n(),this.#r(),this.addEventListener(`collapse`,this.#i)}disconnectedCallback(){this.removeEventListener(`collapse`,this.#i)}attributeChangedCallback(e){e===`kind`&&this.isConnected&&this.#r()}get kind(){let e=this.getAttribute(`kind`);return e===`tool`||e===`sprinkle`?e:null}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}get spacer(){return this.#n(),this.#e}#n(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > .slicc-wbhead__spacer`);if(e instanceof HTMLElement){this.#e=e;return}this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-wbhead__spacer`,this.#e.setAttribute(`part`,`spacer`);let t=this.querySelector(`:scope > slicc-pane-tag`),n=this.querySelector(`:scope > slicc-collapse-btn`);this.appendChild(this.#e),t&&this.appendChild(t),n&&this.appendChild(n)}#r(){let e=this.querySelector(`:scope > slicc-pane-tag`);if(!e)return;let t=this.kind;t==null?e.removeAttribute(`kind`):e.setAttribute(`kind`,t)}#i=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`collapse`,{bubbles:!0,composed:!0})))}});var fo=`
4989
+ `,uo=`slicc-workbench-header-style`;function fo(e){if(e.getElementById(uo))return;let t=e.createElement(`style`);t.id=uo,t.textContent=lo,(e.head??e.documentElement).appendChild(t)}S(`slicc-workbench-header`,class extends HTMLElement{static observedAttributes=[`kind`];#e;#t=!1;connectedCallback(){fo(this.ownerDocument),this.#n(),this.#r(),this.addEventListener(`collapse`,this.#i)}disconnectedCallback(){this.removeEventListener(`collapse`,this.#i)}attributeChangedCallback(e){e===`kind`&&this.isConnected&&this.#r()}get kind(){let e=this.getAttribute(`kind`);return e===`tool`||e===`sprinkle`?e:null}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}get spacer(){return this.#n(),this.#e}#n(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > .slicc-wbhead__spacer`);if(e instanceof HTMLElement){this.#e=e;return}this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-wbhead__spacer`,this.#e.setAttribute(`part`,`spacer`);let t=this.querySelector(`:scope > slicc-pane-tag`),n=this.querySelector(`:scope > slicc-collapse-btn`);this.appendChild(this.#e),t&&this.appendChild(t),n&&this.appendChild(n)}#r(){let e=this.querySelector(`:scope > slicc-pane-tag`);if(!e)return;let t=this.kind;t==null?e.removeAttribute(`kind`):e.setAttribute(`kind`,t)}#i=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`collapse`,{bubbles:!0,composed:!0})))}});var po=`
4990
4990
  slicc-workbench-pane {
4991
4991
  display: flex;
4992
4992
  flex-direction: column;
@@ -5025,7 +5025,7 @@ slicc-workbench-pane slicc-pane .slicc-pane__body {
5025
5025
  flex-direction: column;
5026
5026
  min-height: 0;
5027
5027
  }
5028
- `,po=`slicc-workbench-pane-style`;function mo(e){if(e.getElementById(po))return;let t=e.createElement(`style`);t.id=po,t.textContent=fo,(e.head??e.documentElement).appendChild(t)}w(`slicc-workbench-pane`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=!1;connectedCallback(){mo(this.ownerDocument),this.#n()}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-workbench-pane-toggle`,{bubbles:!0,composed:!0,detail:{open:n!==null}}))}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get pane(){return this.#n(),this.#e}#n(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > slicc-pane`);if(e instanceof HTMLElement){this.#e=e;return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`slicc-pane`),this.#e.setAttribute(`elevated`,``),this.#e.setAttribute(`part`,`pane`);for(let e of t)this.#e.appendChild(e);this.appendChild(this.#e)}});var ho=`slicc_monitor_collapsed`;function go(){try{let e=localStorage.getItem(ho);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function _o(e){try{localStorage.setItem(ho,JSON.stringify([...e]))}catch{}}var vo=`
5028
+ `,mo=`slicc-workbench-pane-style`;function ho(e){if(e.getElementById(mo))return;let t=e.createElement(`style`);t.id=mo,t.textContent=po,(e.head??e.documentElement).appendChild(t)}S(`slicc-workbench-pane`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=!1;connectedCallback(){ho(this.ownerDocument),this.#n()}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-workbench-pane-toggle`,{bubbles:!0,composed:!0,detail:{open:n!==null}}))}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get pane(){return this.#n(),this.#e}#n(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > slicc-pane`);if(e instanceof HTMLElement){this.#e=e;return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`slicc-pane`),this.#e.setAttribute(`elevated`,``),this.#e.setAttribute(`part`,`pane`);for(let e of t)this.#e.appendChild(e);this.appendChild(this.#e)}});var go=`slicc_monitor_collapsed`;function _o(){try{let e=localStorage.getItem(go);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function vo(e){try{localStorage.setItem(go,JSON.stringify([...e]))}catch{}}var yo=`
5029
5029
  slicc-monitor {
5030
5030
  display: block;
5031
5031
  font-family: var(--ui);
@@ -5150,4 +5150,4 @@ slicc-monitor {
5150
5150
  color: var(--txt-3);
5151
5151
  font-size: 11px;
5152
5152
  }
5153
- `,yo=`slicc-monitor-style`;function bo(e){if(e.getElementById(yo))return;let t=e.createElement(`style`);t.id=yo,t.textContent=vo,(e.head??e.documentElement).appendChild(t)}function xo(e){return E(`div`,{class:`monitor-row`},E(`span`,{class:e.error?`monitor-row__dot monitor-row__dot--error`:e.active?`monitor-row__dot monitor-row__dot--active`:`monitor-row__dot`}),E(`span`,{class:`monitor-row__name`},e.name),E(`span`,{class:`monitor-row__meta`},e.meta))}function So(e,t,n){let r=t.has(e.id),i=e.count===0?`monitor-section monitor-section--empty`:`monitor-section`,a=[E(`span`,{class:`monitor-section__toggle`},r?`▸`:`▾`),E(`span`,{class:`monitor-section__title`},e.label)];e.meta&&a.push(E(`span`,{class:`monitor-section__meta`},e.meta)),a.push(E(`span`,{class:`monitor-section__count`},String(e.count)));let o=E(`button`,{class:`monitor-section__header`,type:`button`},...a);o.setAttribute(`aria-expanded`,String(!r)),o.addEventListener(`click`,()=>n(e.id));let s=E(`div`,{class:`monitor-section__body`});r&&s.setAttribute(`hidden`,``);for(let t of e.rows)s.appendChild(xo(t));return E(`div`,{class:i,"data-section":e.id},o,s)}w(`slicc-monitor`,class extends HTMLElement{#e=[];#t=new Set;#n=!1;connectedCallback(){bo(this.ownerDocument),this.#n||=(this.#t=go(),!0),this.#e.length>0&&this.#r()}get sections(){return this.#e.map(e=>({...e,rows:e.rows.slice()}))}set sections(e){this.#e=Array.isArray(e)?e.map(e=>({...e,rows:e.rows.slice()})):[],this.isConnected&&this.#r()}#r(){let e=E(`div`,{class:`monitor-toolbar`},E(`button`,{class:`monitor-toolbar__refresh`,type:`button`},`↻ Refresh`)),t=e.querySelector(`.monitor-toolbar__refresh`);t&&t.addEventListener(`click`,()=>{this.dispatchEvent(new CustomEvent(`slicc-monitor-refresh`,{bubbles:!0,composed:!0}))});let n=[e];for(let e of this.#e)n.push(So(e,this.#t,e=>{this.#t.has(e)?this.#t.delete(e):this.#t.add(e),_o(this.#t),this.#r()}));this.replaceChildren(),T(this,n)}});var Co=e({DEFAULT_LAUNCHER_CORNER:()=>u,DEFAULT_LAUNCHER_FOLLOWER_STATUS:()=>p,HOLD_TO_ENABLE_MS:()=>Ht,LAUNCHER_FOLLOWER_STATUS_ATTR:()=>m,SliccImagePreview:()=>N,TOKENS_CSS:()=>Ea,ensureGlobalTokens:()=>Z,followSystemTheme:()=>Oa,setTheme:()=>Q});export{Wr as a,ca as i,Z as n,Oa as r,Co as t};
5153
+ `,bo=`slicc-monitor-style`;function xo(e){if(e.getElementById(bo))return;let t=e.createElement(`style`);t.id=bo,t.textContent=yo,(e.head??e.documentElement).appendChild(t)}function So(e){return w(`div`,{class:`monitor-row`},w(`span`,{class:e.error?`monitor-row__dot monitor-row__dot--error`:e.active?`monitor-row__dot monitor-row__dot--active`:`monitor-row__dot`}),w(`span`,{class:`monitor-row__name`},e.name),w(`span`,{class:`monitor-row__meta`},e.meta))}function Co(e,t,n){let r=t.has(e.id),i=e.count===0?`monitor-section monitor-section--empty`:`monitor-section`,a=[w(`span`,{class:`monitor-section__toggle`},r?`▸`:`▾`),w(`span`,{class:`monitor-section__title`},e.label)];e.meta&&a.push(w(`span`,{class:`monitor-section__meta`},e.meta)),a.push(w(`span`,{class:`monitor-section__count`},String(e.count)));let o=w(`button`,{class:`monitor-section__header`,type:`button`},...a);o.setAttribute(`aria-expanded`,String(!r)),o.addEventListener(`click`,()=>n(e.id));let s=w(`div`,{class:`monitor-section__body`});r&&s.setAttribute(`hidden`,``);for(let t of e.rows)s.appendChild(So(t));return w(`div`,{class:i,"data-section":e.id},o,s)}S(`slicc-monitor`,class extends HTMLElement{#e=[];#t=new Set;#n=!1;connectedCallback(){xo(this.ownerDocument),this.#n||=(this.#t=_o(),!0),this.#e.length>0&&this.#r()}get sections(){return this.#e.map(e=>({...e,rows:e.rows.slice()}))}set sections(e){this.#e=Array.isArray(e)?e.map(e=>({...e,rows:e.rows.slice()})):[],this.isConnected&&this.#r()}#r(){let e=w(`div`,{class:`monitor-toolbar`},w(`button`,{class:`monitor-toolbar__refresh`,type:`button`},`↻ Refresh`)),t=e.querySelector(`.monitor-toolbar__refresh`);t&&t.addEventListener(`click`,()=>{this.dispatchEvent(new CustomEvent(`slicc-monitor-refresh`,{bubbles:!0,composed:!0}))});let n=[e];for(let e of this.#e)n.push(Co(e,this.#t,e=>{this.#t.has(e)?this.#t.delete(e):this.#t.add(e),vo(this.#t),this.#r()}));this.replaceChildren(),C(this,n)}});var wo=e({DEFAULT_LAUNCHER_CORNER:()=>u,DEFAULT_LAUNCHER_FOLLOWER_STATUS:()=>p,HOLD_TO_ENABLE_MS:()=>Kt,LAUNCHER_FOLLOWER_STATUS_ATTR:()=>m,SliccImagePreview:()=>zt,TOKENS_CSS:()=>Ea,ensureGlobalTokens:()=>Oa,followSystemTheme:()=>ka,setTheme:()=>Q});export{Wr as a,ca as i,Oa as n,ka as r,wo as t};