sliccy 5.4.0 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/ui/assets/{account-store-C6_gIZ9b.js → account-store-ek-8-vad.js} +2 -2
  2. package/dist/ui/assets/{account-store-DFegnWPt.js → account-store-uVmUnqVi.js} +2 -2
  3. package/dist/ui/assets/{adobe-CyL6g4I7.js → adobe-B53UUHRQ.js} +1 -1
  4. package/dist/ui/assets/{adobe-CCrNID9W.js → adobe-CUUUdCzq.js} +1 -1
  5. package/dist/ui/assets/{adobe-oauth-state-BPiIC94C.js → adobe-oauth-state-Cv45ZC7F.js} +1 -1
  6. package/dist/ui/assets/{agent-message-to-chat-BWe23vP6.js → agent-message-to-chat-EX33cDse.js} +1 -1
  7. package/dist/ui/assets/{apps-DgoHi_Jt.js → apps-CAEkkK-h.js} +1 -1
  8. package/dist/ui/assets/{azure-openai-B8RJsHT-.js → azure-openai-BKN7-_r9.js} +1 -1
  9. package/dist/ui/assets/{azure-openai-hJ0wnltF.js → azure-openai-DFKLOD9O.js} +1 -1
  10. package/dist/ui/assets/{connect-surface-w5IyESwF.js → connect-surface-D1ylnSSy.js} +1 -1
  11. package/dist/ui/assets/dip-B7G-yFNh.js +1 -0
  12. package/dist/ui/assets/{dist-CC-3PhWb.js → dist-BykthAQO.js} +1 -1
  13. package/dist/ui/assets/{dist-DVFuglk5.js → dist-DoIT4K9j.js} +1 -1
  14. package/dist/ui/assets/{ensure-speech-assets-Cis-PX6Z.js → ensure-speech-assets-BAMSo5xy.js} +1 -1
  15. package/dist/ui/assets/esp8266-qZDXfwS_.js +1 -0
  16. package/dist/ui/assets/{esptool-operations-9UQedhXq.js → esptool-operations-Dqz4H39j.js} +2 -2
  17. package/dist/ui/assets/{fs-RC1NWcFZ.js → fs-DUiVyDAh.js} +1 -1
  18. package/dist/ui/assets/{fs-B8VqdCUY.js → fs-DhW0sB4P.js} +2 -2
  19. package/dist/ui/assets/{github-DL1eb7HW.js → github-CEb6Ukrf.js} +2 -2
  20. package/dist/ui/assets/{github-BDhArZ5j.js → github-Djvp2KJc.js} +1 -1
  21. package/dist/ui/assets/{github-copilot-B9SO52A1.js → github-copilot-CwlFBczV.js} +1 -1
  22. package/dist/ui/assets/{github-copilot-C8u3akzN.js → github-copilot-D_nIJ9c2.js} +1 -1
  23. package/dist/ui/assets/{hear-C_Cy0mUe.js → hear-CwRsBtKX.js} +1 -1
  24. package/dist/ui/assets/{kernel-worker-BOiHtoD5.js → kernel-worker-BvRAudrx.js} +1085 -1085
  25. package/dist/ui/assets/{kokoro-engine-C39-3JHF.js → kokoro-engine-BI-6sX56.js} +1 -1
  26. package/dist/ui/assets/{lick-ws-bridge-BkAmRj1Z.js → lick-ws-bridge-CzKvgnBL.js} +1 -1
  27. package/dist/ui/assets/{lick-ws-bridge-Bix1ByUo.js → lick-ws-bridge-mMPXekwg.js} +1 -1
  28. package/dist/ui/assets/{local-llm-BSI0PlfX.js → local-llm-fqZ0fO9H.js} +1 -1
  29. package/dist/ui/assets/{main-Bpuh8nYF.js → main-FJNMV_71.js} +4 -4
  30. package/dist/ui/assets/{mount-Bax8wvuA.js → mount-CuXSlUe4.js} +1 -1
  31. package/dist/ui/assets/{mount-N_JmQdl5.js → mount-DU8rtYg8.js} +2 -2
  32. package/dist/ui/assets/{new-session-sPDR0jnx.js → new-session-RQLW9UpV.js} +2 -2
  33. package/dist/ui/assets/{oauth-bootstrap-Dm-vVRTU.js → oauth-bootstrap-BTpmul3n.js} +2 -2
  34. package/dist/ui/assets/{openai-codex-bYCB3ofj.js → openai-codex-BiuU54bP.js} +1 -1
  35. package/dist/ui/assets/{openai-codex-DUpVk0wP.js → openai-codex-Di_Wkz8P.js} +1 -1
  36. package/dist/ui/assets/{page-follower-tray-CgF4beVv.js → page-follower-tray-eZi5RMQE.js} +1 -1
  37. package/dist/ui/assets/{panel-rpc-handlers-DI4DAW21.js → panel-rpc-handlers-D11yFCCd.js} +1 -1
  38. package/dist/ui/assets/{provider-NnBB2k3A.js → provider-BG2yHao6.js} +1 -1
  39. package/dist/ui/assets/{provider-9p5HvPY9.js → provider-LWa4i1ss.js} +2 -2
  40. package/dist/ui/assets/provider-store-access-BiIwB6XY.js +1 -0
  41. package/dist/ui/assets/provider-store-access-mtb0ZoHI.js +1 -0
  42. package/dist/ui/assets/{providers-BYT33r_r.js → providers-InId80tM.js} +1 -1
  43. package/dist/ui/assets/{quick-llm-BtUslSmP.js → quick-llm-I3lG0JAs.js} +1 -1
  44. package/dist/ui/assets/{remote-terminal-view-DMnqOfIb.js → remote-terminal-view-DIEOCe9M.js} +3 -3
  45. package/dist/ui/assets/session-freezer-BBOMQDZu.js +1 -0
  46. package/dist/ui/assets/{speak-CT1k5FTD.js → speak-De8bZX3X.js} +1 -1
  47. package/dist/ui/assets/{sprinkle-manager-j1ikTeY0.js → sprinkle-manager-HrjQYffk.js} +1 -1
  48. package/dist/ui/assets/{store-ihd6OnKT.js → store-BcukSq0d.js} +1 -1
  49. package/dist/ui/assets/{sudo-D3T4jmgn.js → sudo-DTuVh1ES.js} +1 -1
  50. package/dist/ui/assets/{transformers-env-CoQS_92g.js → transformers-env-CLlJbteI.js} +1 -1
  51. package/dist/ui/assets/{tray-leader-CaTLZ0nn.js → tray-leader-C0t_8UvQ.js} +1 -1
  52. package/dist/ui/assets/{tray-leave-runtime-BsLt7Kau.js → tray-leave-runtime-C0haAPQt.js} +1 -1
  53. package/dist/ui/assets/{upgrade-detection-qlGMMdg_.js → upgrade-detection-Cf5EhzTd.js} +1 -1
  54. package/dist/ui/assets/{wc-attach-B6M5u9Mf.js → wc-attach-C9_tu3yw.js} +2 -2
  55. package/dist/ui/assets/{wc-detached-CvvTnnwH.js → wc-detached--tazk6dE.js} +1 -1
  56. package/dist/ui/assets/{wc-extension-CxcxNKVO.js → wc-extension-0ostIpBU.js} +2 -2
  57. package/dist/ui/assets/{wc-follower-Pgc81YTH.js → wc-follower-HC4qvoDl.js} +2 -2
  58. package/dist/ui/assets/{wc-live-Chbuwmqb.js → wc-live-CC1IJ9qx.js} +5 -5
  59. package/dist/ui/assets/{wc-nav-CkFqKz85.js → wc-nav-BGRbM4u_.js} +2 -2
  60. package/dist/ui/assets/{wc-onboarding-BEbuwhSQ.js → wc-onboarding-CJV5ViMw.js} +2 -2
  61. package/dist/ui/assets/{wc-permissions-Wqap3kzM.js → wc-permissions-DmHMvdiC.js} +2 -2
  62. package/dist/ui/assets/{wc-placeholder-Gu8g7ydZ.js → wc-placeholder-DLEqGc0p.js} +3 -3
  63. package/dist/ui/assets/{wc-settings-BteAfHGT.js → wc-settings-zWM-erHv.js} +2 -2
  64. package/dist/ui/assets/{wc-shell-DjTIqVcb.js → wc-shell-k8zT_CCv.js} +140 -112
  65. package/dist/ui/assets/{wc-sprinkles-DvkKhy2T.js → wc-sprinkles-BtPIBmNQ.js} +2 -2
  66. package/dist/ui/assets/{wc-tray-BVb6lvIH.js → wc-tray-BJZGo5tr.js} +2 -2
  67. package/dist/ui/assets/{whisper-engine-CyUutfK8.js → whisper-engine-DCpr74_i.js} +1 -1
  68. package/dist/ui/assets/{xai-grok-MczhRIwJ.js → xai-grok-BecRhwSG.js} +1 -1
  69. package/dist/ui/assets/{xai-grok-BvUbyyZg.js → xai-grok-frRBdi_g.js} +1 -1
  70. package/dist/ui/electron-overlay-entry.js +125 -97
  71. package/dist/ui/index.html +2 -2
  72. package/dist/ui/packages/webapp/index.html +2 -2
  73. package/package.json +1 -1
  74. package/dist/ui/assets/dip-BPGGcpgQ.js +0 -1
  75. package/dist/ui/assets/esp8266-CgUXgl1_.js +0 -1
  76. package/dist/ui/assets/provider-store-access-5pcZED05.js +0 -1
  77. package/dist/ui/assets/provider-store-access-Bv09jBJf.js +0 -1
  78. package/dist/ui/assets/session-freezer-Znp08p_F.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/quick-llm-BtUslSmP.js","assets/chunk-aKtaBQYM.js","assets/account-store-DFegnWPt.js","assets/preload-helper-zJ_50EbN.js","assets/dist-BmWy99kl.js","assets/event-stream-BJI_nGaK.js","assets/json-parse-BUunmmNl.js","assets/__vite-browser-external-C7iut881.js","assets/context-compaction-CFWyOzX1.js","assets/logger-DDBAeTLF.js","assets/src-DlEHAkLd.js","assets/proxied-fetch-CKDBmEMl.js","assets/fetch-body-D2PwksUW.js","assets/secret-topology-bwXIzzAK.js","assets/secrets-bridge-client-BSipj-5f.js","assets/panel-rpc-DqT2FG7c.js","assets/bedrock-camp-9-QEmC9Z.js","assets/transform-messages-DzB_lMo-.js","assets/tool-ui-DfXu6quJ.js","assets/icons-BU6llBsN.js","assets/main-Bpuh8nYF.js","assets/modulepreload-polyfill-Dezn_h7o.js","assets/clipboard-DgFtRQbq.js","assets/llm-session-id-DVmZ9C2t.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./chunk-aKtaBQYM.js";import{t}from"./preload-helper-zJ_50EbN.js";import{o as n}from"./main-Bpuh8nYF.js";import{n as r,r as i,t as a}from"./speech-CqQdPtyQ.js";import{t as o}from"./soundscape-cues-5_sT5Un6.js";import{n as s,t as c}from"./icons-BU6llBsN.js";var l=e({applyDictationMarkers:()=>m,consumeDictationFirst:()=>g,resetDictationPriming:()=>ee,stripDictationMarkers:()=>h}),u=`◁This message has been sent through text to speech, consider possible phonetic alternatives and transcription errors. Future dictated messages will have the 🎙️ emoji appended. Your responses to dictated messages will be read out loud, avoid urls, acronyms, numbers, formatting▷`,d=/\uD83C\uDF99\uFE0F?/g,f=/\u25C1[\s\S]*?\u25B7/g,p=!0;function m(e,t){let n=e.endsWith(` `)?e:`${e} `;return t?`${n}\uD83C\uDF99\uFE0F${u}`:`${n}\uD83C\uDF99\uFE0F`}function h(e){return e.replace(f,``).replace(d,``).replace(/[ \t]+$/g,``).trimEnd()}function g(){return p?(p=!1,!0):!1}function ee(){p=!0}var te=new Set([`webhook`,`cron`,`sprinkle`,`fswatch`,`session-reload`,`navigate`,`upgrade`,`workflow`,`scoop-notify`,`scoop-idle`,`scoop-wait`,`sudo-request`]);function _(e){return e!=null&&te.has(e)}function v(e,t){typeof customElements>`u`||customElements==null||customElements.get(e)||customElements.define(e,t)}function y(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 b(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 y(r,n),r}function x(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var ne=20,re=16,ie=18,S=x(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/quick-llm-I3lG0JAs.js","assets/chunk-aKtaBQYM.js","assets/account-store-uVmUnqVi.js","assets/preload-helper-zJ_50EbN.js","assets/dist-BmWy99kl.js","assets/event-stream-BJI_nGaK.js","assets/json-parse-BUunmmNl.js","assets/__vite-browser-external-C7iut881.js","assets/context-compaction-CFWyOzX1.js","assets/logger-DDBAeTLF.js","assets/src-DlEHAkLd.js","assets/proxied-fetch-CKDBmEMl.js","assets/fetch-body-D2PwksUW.js","assets/secret-topology-bwXIzzAK.js","assets/secrets-bridge-client-BSipj-5f.js","assets/panel-rpc-DqT2FG7c.js","assets/bedrock-camp-9-QEmC9Z.js","assets/transform-messages-DzB_lMo-.js","assets/tool-ui-DfXu6quJ.js","assets/icons-BU6llBsN.js","assets/main-FJNMV_71.js","assets/modulepreload-polyfill-Dezn_h7o.js","assets/clipboard-DgFtRQbq.js","assets/llm-session-id-DVmZ9C2t.js"])))=>i.map(i=>d[i]);
2
+ import{n as e}from"./chunk-aKtaBQYM.js";import{t}from"./preload-helper-zJ_50EbN.js";import{o as n}from"./main-FJNMV_71.js";import{n as r,r as i,t as a}from"./speech-CqQdPtyQ.js";import{t as o}from"./soundscape-cues-5_sT5Un6.js";import{n as s,t as c}from"./icons-BU6llBsN.js";var l=e({applyDictationMarkers:()=>m,consumeDictationFirst:()=>g,resetDictationPriming:()=>ee,stripDictationMarkers:()=>h}),u=`◁This message has been sent through text to speech, consider possible phonetic alternatives and transcription errors. Future dictated messages will have the 🎙️ emoji appended. Your responses to dictated messages will be read out loud, avoid urls, acronyms, numbers, formatting▷`,d=/\uD83C\uDF99\uFE0F?/g,f=/\u25C1[\s\S]*?\u25B7/g,p=!0;function m(e,t){let n=e.endsWith(` `)?e:`${e} `;return t?`${n}\uD83C\uDF99\uFE0F${u}`:`${n}\uD83C\uDF99\uFE0F`}function h(e){return e.replace(f,``).replace(d,``).replace(/[ \t]+$/g,``).trimEnd()}function g(){return p?(p=!1,!0):!1}function ee(){p=!0}var te=new Set([`webhook`,`cron`,`sprinkle`,`fswatch`,`session-reload`,`navigate`,`upgrade`,`workflow`,`scoop-notify`,`scoop-idle`,`scoop-wait`,`sudo-request`]);function _(e){return e!=null&&te.has(e)}function v(e,t){typeof customElements>`u`||customElements==null||customElements.get(e)||customElements.define(e,t)}function y(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 b(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 y(r,n),r}function x(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var ne=20,re=16,ie=18,S=x(`
3
3
  :host{display:block;width:100%;
4
4
  --am-accent:var(--accent,#3b63fb);
5
5
  --am-accent-subtle:color-mix(in oklab,var(--am-accent) 12%,var(--canvas,#fff));
@@ -358,7 +358,7 @@ slicc-agent-message .dots i:nth-child(3) { animation-delay: .32s; }
358
358
  @keyframes slicc-am-bdot { 0%, 75%, 100% { transform: translateY(0); opacity: .45; } 38% { transform: translateY(-8px); opacity: 1; } }
359
359
  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; }
360
360
  @keyframes slicc-am-cblink { 50% { opacity: 0; } }
361
- `,_e=`slicc-agent-message-style`;function ve(e){if(e.getElementById(_e))return;let t=e.createElement(`style`);t.id=_e,t.textContent=ge,(e.head??e.documentElement).appendChild(t)}var ye=[`#f43f5e`,`#06b6d4`,`#8b5cf6`],be=new Set([``,`r`,`cy`,`vi`,`am`]);function xe(){let e=b(`div`,{class:`dots`,part:`dots`,"aria-hidden":`true`});for(let t of ye)e.append(b(`i`,{style:`--d:${t}`}));return e}function Se(e){let t=b(`ul`,{class:`plan`,part:`plan`});for(let n of e)t.append(b(`li`,null,n));return t}function Ce(e){let t=b(`ul`,{class:`check`,part:`check`});for(let n of e){let e=n.variant&&be.has(n.variant)?n.variant:``,r=e?`ck ${e}`:`ck`,i=n.glyph??`✓`;t.append(b(`li`,null,b(`span`,{class:r},i),b(`span`,{class:`ctext`},n.text)))}return t}v(`slicc-agent-message`,class extends HTMLElement{static observedAttributes=[`thinking`,`streaming`,`progress`];#e;#t=null;#n=null;#r=null;#i=!1;connectedCallback(){ve(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}}))))}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(Se(e))}setCheck(e){this.#a(Ce(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`)));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(xe()),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)}});var we=`
361
+ `,_e=`slicc-agent-message-style`;function E(e){if(e.getElementById(_e))return;let t=e.createElement(`style`);t.id=_e,t.textContent=ge,(e.head??e.documentElement).appendChild(t)}var ve=[`#f43f5e`,`#06b6d4`,`#8b5cf6`],ye=new Set([``,`r`,`cy`,`vi`,`am`]);function be(){let e=b(`div`,{class:`dots`,part:`dots`,"aria-hidden":`true`});for(let t of ve)e.append(b(`i`,{style:`--d:${t}`}));return e}function xe(e){let t=b(`ul`,{class:`plan`,part:`plan`});for(let n of e)t.append(b(`li`,null,n));return t}function Se(e){let t=b(`ul`,{class:`check`,part:`check`});for(let n of e){let e=n.variant&&ye.has(n.variant)?n.variant:``,r=e?`ck ${e}`:`ck`,i=n.glyph??`✓`;t.append(b(`li`,null,b(`span`,{class:r},i),b(`span`,{class:`ctext`},n.text)))}return t}v(`slicc-agent-message`,class extends HTMLElement{static observedAttributes=[`thinking`,`streaming`,`progress`];#e;#t=null;#n=null;#r=null;#i=!1;connectedCallback(){E(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}}))))}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(xe(e))}setCheck(e){this.#a(Se(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`)));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)}});var Ce=`
362
362
  slicc-chat-table { display: block; }
363
363
  slicc-chat-table > .ctable {
364
364
  width: 100%;
@@ -397,7 +397,7 @@ slicc-chat-table > .ctable code {
397
397
  border-radius: 5px;
398
398
  padding: 1px 5px;
399
399
  }
400
- `,Te=`slicc-chat-table-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)}function De(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}v(`slicc-chat-table`,class extends HTMLElement{static observedAttributes=[`headers`];#e;#t;#n;#r=!1;connectedCallback(){Ee(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?De(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=b(`tr`,{"data-slicc-generated":``});for(let e of t)n.append(b(`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 Oe(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 ke=`
400
+ `,D=`slicc-chat-table-style`;function we(e){if(e.getElementById(D))return;let t=e.createElement(`style`);t.id=D,t.textContent=Ce,(e.head??e.documentElement).appendChild(t)}function Te(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}v(`slicc-chat-table`,class extends HTMLElement{static observedAttributes=[`headers`];#e;#t;#n;#r=!1;connectedCallback(){we(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?Te(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=b(`tr`,{"data-slicc-generated":``});for(let e of t)n.append(b(`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 Ee(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 De=`
401
401
  slicc-chat-thread {
402
402
  flex: 1 1 auto;
403
403
  display: block;
@@ -473,7 +473,7 @@ slicc-chat-thread[open] > .slicc-thread__inner {
473
473
  padding: 16px 14px;
474
474
  }
475
475
  }
476
- `,Ae=`slicc-chat-thread-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)}v(`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,Oe(`at`,String(Math.round(this.scrollTop)))},300))};#s=()=>{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)}};#c=null;#l=new Map;connectedCallback(){je(this.ownerDocument),this.#m(),this.#p(),this.scrollToBottom(),this.urlState&&(this.#r=E(`at`),this.#i=E(`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)}attributeChangedCallback(e,t,n){t!==n&&(e===`accent`&&this.#t&&this.#p(),e===`context`&&this.urlState&&n!=null&&this.isConnected&&(n!==this.#i&&(this.#r=null),Oe(`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.#m(),this.#e}switchContext(e){this.#m();let t=this.context;if(e===t)return;t!=null&&this.#l.set(t,this.#f());let n=this.#l.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.#m(),e.length>0&&(this.#r=null),this.#e.append(...e),this.requestFollow()}static FOLLOW_SLACK=80;#u(){return this.scrollHeight-this.scrollTop-this.clientHeight<=e.FOLLOW_SLACK}requestFollow(){this.#m(),this.#u()?(this.scrollToBottom(),this.removeAttribute(`has-new`)):this.setAttribute(`has-new`,``)}#d=()=>{this.hasAttribute(`has-new`)&&this.#u()&&this.removeAttribute(`has-new`)};replaceContent(...e){this.#m(),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}#f(){let e=this.ownerDocument.createDocumentFragment();for(let t of Array.from(this.#e.childNodes))e.appendChild(t.cloneNode(!0));return e}#p(){let e=this.accent;e?this.style.setProperty(`--ctx`,e):this.style.removeProperty(`--ctx`)}#m(){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`,t.append(`New messages ↓`),t.addEventListener(`click`,()=>{this.scrollToBottom(),this.removeAttribute(`has-new`)}),this.#c.append(t),this.appendChild(this.#c),this.addEventListener(`scroll`,this.#d,{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 Me=x(`
476
+ `,Oe=`slicc-chat-thread-style`;function ke(e){if(e.getElementById(Oe))return;let t=e.createElement(`style`);t.id=Oe,t.textContent=De,(e.head??e.documentElement).appendChild(t)}v(`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,Ee(`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=new Map;connectedCallback(){ke(this.ownerDocument),this.#m(),this.#p(),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)}attributeChangedCallback(e,t,n){t!==n&&(e===`accent`&&this.#t&&this.#p(),e===`context`&&this.urlState&&n!=null&&this.isConnected&&(n!==this.#i&&(this.#r=null),Ee(`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.#m(),this.#e}switchContext(e){this.#m();let t=this.context;if(e===t)return;t!=null&&this.#l.set(t,this.#f());let n=this.#l.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.#m(),e.length>0&&(this.#r=null),this.#e.append(...e),this.requestFollow()}static FOLLOW_SLACK=80;#u(){return this.scrollHeight-this.scrollTop-this.clientHeight<=e.FOLLOW_SLACK}requestFollow(){this.#m(),this.#u()?(this.scrollToBottom(),this.removeAttribute(`has-new`)):this.setAttribute(`has-new`,``)}#d=()=>{this.hasAttribute(`has-new`)&&this.#u()&&this.removeAttribute(`has-new`)};replaceContent(...e){this.#m(),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}#f(){let e=this.ownerDocument.createDocumentFragment();for(let t of Array.from(this.#e.childNodes))e.appendChild(t.cloneNode(!0));return e}#p(){let e=this.accent;e?this.style.setProperty(`--ctx`,e):this.style.removeProperty(`--ctx`)}#m(){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`,t.append(`New messages ↓`),t.addEventListener(`click`,()=>{this.scrollToBottom(),this.removeAttribute(`has-new`)}),this.#c.append(t),this.appendChild(this.#c),this.addEventListener(`scroll`,this.#d,{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 Ae=x(`
477
477
  :host {
478
478
  display: flex;
479
479
  align-items: center;
@@ -509,7 +509,7 @@ code {
509
509
  border-radius: 5px;
510
510
  padding: 1px 5px;
511
511
  }
512
- `),Ne=[`feed`,`scoop`,`drop`,`sprinkle`],Pe={feed:`arrow-right`,scoop:`circle-plus`,drop:`circle-check`,sprinkle:`sparkles`},D={feed:`Delegated to`,scoop:`Spun up`,drop:`Wrapped up`,sprinkle:``},Fe={feed_scoop:`Delegated to`,scoop_scoop:`Spun up`,drop_scoop:`Wrapped up`,"sprinkle-opened":`Opened`};function Ie(e){return Fe[e]??e}function Le(e){return Ne.includes(e??``)?e:`feed`}function Re(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}v(`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=[Me]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){return Le(this.getAttribute(`kind`))}set kind(e){this.setAttribute(`kind`,Le(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,n=this.verb,r=n==null?D[e]:Ie(n),i=this.scoop,a=this.label,o=this.args?Re(this.args):[];t?this.style.setProperty(`--c`,t):this.style.removeProperty(`--c`);let c=b(`span`,{class:`darrow`,part:`arrow`},b(`slot`,{name:`arrow`},s(Pe[e],{size:13}))),l=b(`slot`,{name:`label`});r&&l.append(b(`span`,{class:`verb`},r)),i&&l.append(b(`b`,{class:`scoop`,part:`scoop`,style:t?`color:${t}`:void 0},i)),a&&l.append(b(`span`,{class:`prose`},a));let u=b(`span`,{class:`label`,part:`label`},l),d=b(`slot`,{name:`args`});for(let e of o)d.append(b(`code`,{part:`code`},e));this.#e.replaceChildren(c,u,d)}});var ze=x(`
512
+ `),je=[`feed`,`scoop`,`drop`,`sprinkle`],Me={feed:`arrow-right`,scoop:`circle-plus`,drop:`circle-check`,sprinkle:`sparkles`},k={feed:`Delegated to`,scoop:`Spun up`,drop:`Wrapped up`,sprinkle:``},Ne={feed_scoop:`Delegated to`,scoop_scoop:`Spun up`,drop_scoop:`Wrapped up`,"sprinkle-opened":`Opened`};function Pe(e){return Ne[e]??e}function Fe(e){return je.includes(e??``)?e:`feed`}function Ie(e){return e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0)}v(`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=[Ae]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){return Fe(this.getAttribute(`kind`))}set kind(e){this.setAttribute(`kind`,Fe(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,n=this.verb,r=n==null?k[e]:Pe(n),i=this.scoop,a=this.label,o=this.args?Ie(this.args):[];t?this.style.setProperty(`--c`,t):this.style.removeProperty(`--c`);let c=b(`span`,{class:`darrow`,part:`arrow`},b(`slot`,{name:`arrow`},s(Me[e],{size:13}))),l=b(`slot`,{name:`label`});r&&l.append(b(`span`,{class:`verb`},r)),i&&l.append(b(`b`,{class:`scoop`,part:`scoop`,style:t?`color:${t}`:void 0},i)),a&&l.append(b(`span`,{class:`prose`},a));let u=b(`span`,{class:`label`,part:`label`},l),d=b(`slot`,{name:`args`});for(let e of o)d.append(b(`code`,{part:`code`},e));this.#e.replaceChildren(c,u,d)}});var Le=x(`
513
513
  :host {
514
514
  display: block;
515
515
  border: 1px solid var(--line);
@@ -535,7 +535,7 @@ code {
535
535
  /* palette chips carry inline-style light backgrounds — tone them down for dark mode */
536
536
  :host-context(.dark) .ch,
537
537
  :host-context([data-theme="dark"]) .ch { filter: brightness(.55) saturate(.85); }
538
- `);v(`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=[ze]}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=b(`div`,{class:`ch`,part:`chip`,style:`background:${e}`}),r=b(`div`,{class:`cl`,part:`label`},t??b(`slot`));this.#e.replaceChildren(n,r)}});var Be=[`#f43f5e`,`#f59e0b`,`#06b6d4`,`#8b5cf6`,`#ec4899`,`#22c55e`],Ve=46,O=72,He=6.283185;function k(e,t){return e+Math.random()*(t-e)}var Ue=[{color:`#faf6f1`,label:`paper`},{color:`#fff7ed`,label:`cream`},{color:`#f5f3ff`,label:`lilac`},{color:`#fef2f2`,label:`blush`}],We=[{color:`#8b5cf6`,label:`violet`},{color:`#f43f5e`,label:`rose`},{color:`#06b6d4`,label:`cyan`},{color:`#ef7000`,label:`cone`}],Ge=0,Ke=x(`
538
+ `);v(`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=[Le]}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=b(`div`,{class:`ch`,part:`chip`,style:`background:${e}`}),r=b(`div`,{class:`cl`,part:`label`},t??b(`slot`));this.#e.replaceChildren(n,r)}});var Re=[`#f43f5e`,`#f59e0b`,`#06b6d4`,`#8b5cf6`,`#ec4899`,`#22c55e`],ze=46,A=72,Be=6.283185;function j(e,t){return e+Math.random()*(t-e)}var Ve=[{color:`#faf6f1`,label:`paper`},{color:`#fff7ed`,label:`cream`},{color:`#f5f3ff`,label:`lilac`},{color:`#fef2f2`,label:`blush`}],He=[{color:`#8b5cf6`,label:`violet`},{color:`#f43f5e`,label:`rose`},{color:`#06b6d4`,label:`cyan`},{color:`#ef7000`,label:`cone`}],Ue=0,We=x(`
539
539
  :host {
540
540
  position: relative;
541
541
  display: block;
@@ -622,7 +622,7 @@ canvas.sprk {
622
622
  @media (prefers-reduced-motion: reduce) {
623
623
  canvas.sprk { display: none; }
624
624
  }
625
- `);v(`slicc-dip`,class extends HTMLElement{static observedAttributes=[`name`,`hue`,`prompt`];#e;#t=`d${++Ge}`;#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=[Ke]}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 `),b(`b`,null,`canvas`),document.createTextNode(` & `),b(`b`,null,`accent`),document.createTextNode(`, then apply:`)]}#v(){let e=this.hue,t=e?`--c:${e}`:void 0,n=b(`slot`,{name:`prompt`});this.prompt?n.append(this.prompt):n.append(...this.#_()),this.#e.replaceChildren(b(`canvas`,{class:`sprk`,part:`field`,"aria-hidden":`true`}),b(`div`,{class:`dh`,part:`header`,style:t},b(`span`,{class:`sg`,part:`glyph`},s(`sparkles`,{size:12})),b(`span`,{class:`nm`,part:`name`},this.name),b(`span`,{class:`tag`,part:`tag`},`sprinkle · dip`)),b(`div`,{class:`dbody`,part:`body`,style:t},b(`p`,{class:`dprompt`,part:`prompt`},n),b(`div`,{class:`pgrid canvas`,part:`grid-canvas`},b(`slot`,{name:`canvas`})),b(`div`,{class:`pgrid accent`,part:`grid-accent`},b(`slot`,{name:`accent`})),b(`div`,{class:`dfoot`},b(`button`,{class:`dapply`,part:`apply`,type:`button`},`Apply to hero →`),b(`span`,{class:`dnote`,part:`note`})))),this.#g(`canvas:${this.#t}`,Ue,`paper`),this.#g(`accent:${this.#t}`,We,`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<Ve;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,He),rv:k(-.014,.014),s:k(1.2,2.2),col:Be[e%Be.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 qe=14,Je=12,Ye=`Something went wrong`,A={retry:`Try again`,settings:`Open Settings`,"change-model":`Change model`,login:`Log in again`},Xe={retry:`rotate-ccw`,settings:`settings`,"change-model":`sparkles`,login:`log-in`},Ze=x(`
625
+ `);v(`slicc-dip`,class extends HTMLElement{static observedAttributes=[`name`,`hue`,`prompt`];#e;#t=`d${++Ue}`;#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=[We]}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 `),b(`b`,null,`canvas`),document.createTextNode(` & `),b(`b`,null,`accent`),document.createTextNode(`, then apply:`)]}#v(){let e=this.hue,t=e?`--c:${e}`:void 0,n=b(`slot`,{name:`prompt`});this.prompt?n.append(this.prompt):n.append(...this.#_()),this.#e.replaceChildren(b(`canvas`,{class:`sprk`,part:`field`,"aria-hidden":`true`}),b(`div`,{class:`dh`,part:`header`,style:t},b(`span`,{class:`sg`,part:`glyph`},s(`sparkles`,{size:12})),b(`span`,{class:`nm`,part:`name`},this.name),b(`span`,{class:`tag`,part:`tag`},`sprinkle · dip`)),b(`div`,{class:`dbody`,part:`body`,style:t},b(`p`,{class:`dprompt`,part:`prompt`},n),b(`div`,{class:`pgrid canvas`,part:`grid-canvas`},b(`slot`,{name:`canvas`})),b(`div`,{class:`pgrid accent`,part:`grid-accent`},b(`slot`,{name:`accent`})),b(`div`,{class:`dfoot`},b(`button`,{class:`dapply`,part:`apply`,type:`button`},`Apply to hero →`),b(`span`,{class:`dnote`,part:`note`})))),this.#g(`canvas:${this.#t}`,Ve,`paper`),this.#g(`accent:${this.#t}`,He,`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<ze;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,Be),rv:j(-.014,.014),s:j(1.2,2.2),col:Re[e%Re.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 Ge=14,Ke=12,qe=`Something went wrong`,M={retry:`Try again`,settings:`Open Settings`,"change-model":`Change model`,login:`Log in again`},Je={retry:`rotate-ccw`,settings:`settings`,"change-model":`sparkles`,login:`log-in`},Ye=x(`
626
626
  :host{
627
627
  /* Error cards sit in the assistant column (left-aligned). Tokens default to
628
628
  the light palette and flip in dark mode via the library's outer scopes
@@ -681,7 +681,7 @@ canvas.sprk {
681
681
  .retry:hover{filter:brightness(1.08);}
682
682
  .retry:focus-visible{outline:2px solid color-mix(in srgb,var(--err-btn-bg) 60%,var(--ink));outline-offset:2px;}
683
683
  .retry svg{display:block;}
684
- `);v(`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=[Ze]}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??Ye,n=this.message,r=this.buttonLabel??A[e],i=Xe[e],a=b(`span`,{class:`ic`,part:`icon`,"aria-hidden":!0});a.append(s(`triangle-alert`,{size:qe}));let o=b(`div`,{class:`err`,part:`card`},b(`div`,{class:`eh`,part:`header`},a,b(`span`,{class:`lbl`,part:`label`},t)),b(`div`,{class:`eb`,part:`body`},n??b(`slot`)),b(`div`,{class:`foot`},b(`button`,{type:`button`,class:`retry`,part:`button`,"aria-label":r},s(i,{size:Je}),r)));this.#e.replaceChildren(o),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 Qe=9,$e=3,et=45,tt=x(`
684
+ `);v(`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=[Ye]}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??qe,n=this.message,r=this.buttonLabel??M[e],i=Je[e],a=b(`span`,{class:`ic`,part:`icon`,"aria-hidden":!0});a.append(s(`triangle-alert`,{size:Ge}));let o=b(`div`,{class:`err`,part:`card`},b(`div`,{class:`eh`,part:`header`},a,b(`span`,{class:`lbl`,part:`label`},t)),b(`div`,{class:`eb`,part:`body`},n??b(`slot`)),b(`div`,{class:`foot`},b(`button`,{type:`button`,class:`retry`,part:`button`,"aria-label":r},s(i,{size:Ke}),r)));this.#e.replaceChildren(o),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 Xe=9,Ze=3,Qe=45,$e=x(`
685
685
  :host {
686
686
  display: inline-flex;
687
687
  align-items: center;
@@ -762,7 +762,7 @@ canvas.sprk {
762
762
  @media (prefers-reduced-motion: reduce) {
763
763
  :host([blink]) .eye { animation: none; }
764
764
  }
765
- `);v(`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=[tt]}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:Qe}set size(e){this.setAttribute(`size`,String(e))}#r(){let e=this.size,t=1.3/Qe*e,n=this.eyes===`dead`,r=e=>b(`span`,{class:`eye`,part:e},n?b(`span`,{class:`x`,"aria-hidden":`true`},`×`):null),i=b(`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`),b(`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($e,Math.hypot(e.clientX-r,e.clientY-i)/et);t.style.setProperty(`--px`,`${(Math.cos(a)*o).toFixed(2)}px`),t.style.setProperty(`--py`,`${(Math.sin(a)*o).toFixed(2)}px`)}}});var nt=x(`
765
+ `);v(`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=[$e]}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:Xe}set size(e){this.setAttribute(`size`,String(e))}#r(){let e=this.size,t=1.3/Xe*e,n=this.eyes===`dead`,r=e=>b(`span`,{class:`eye`,part:e},n?b(`span`,{class:`x`,"aria-hidden":`true`},`×`):null),i=b(`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`),b(`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(Ze,Math.hypot(e.clientX-r,e.clientY-i)/Qe);t.style.setProperty(`--px`,`${(Math.cos(a)*o).toFixed(2)}px`),t.style.setProperty(`--py`,`${(Math.sin(a)*o).toFixed(2)}px`)}}});var et=x(`
766
766
  :host{display:block;font-family:var(--ui);}
767
767
  :host([hidden]){display:none;}
768
768
  .handoff{border:1px solid var(--line);border-radius:13px;padding:13px 15px;margin:2px 0 18px;}
@@ -782,7 +782,7 @@ canvas.sprk {
782
782
  .opened .sg{width:20px;height:20px;border-radius:6px;display:grid;place-items:center;color:#fff;background:var(--rainbow);flex:0 0 auto;}
783
783
  .opened .sg svg{display:block;}
784
784
  .opened b{color:var(--ink);font-weight:600;}
785
- `),rt=`Handoff request from`;v(`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=[nt]}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?b(`slot`):document.createTextNode(e)}#r(){let e=this.pre??rt,t=this.name,n=b(`slicc-googly-eyes`,{class:`eyes`});this.eyes===`dead`&&n.setAttribute(`eyes`,`dead`);let r=b(`div`,{class:`top`,part:`top`},b(`span`,{class:`av`,part:`avatar`},n),b(`span`,{class:`lbl2`,part:`label`},b(`span`,{class:`hand`,part:`hand`,"aria-hidden":`true`},s(`hand`,{size:13})),b(`span`,{class:`pre`},e),` `,t==null?null:b(`b`,{part:`name`},t))),i=b(`p`,{part:`text`},this.#n());this.#e.replaceChildren(b(`div`,{class:`handoff`,part:`card`},r,i))}#i(){let e=this.name,t=b(`span`,{class:`sg`,part:`glyph`,"aria-hidden":`true`},s(`sparkles`,{size:12})),n=b(`span`,{part:`text`},e==null?null:b(`b`,{part:`name`},e),e==null?null:` `,this.#n());this.#e.replaceChildren(b(`div`,{class:`opened`,part:`card`},t,n))}});var j=14,it=`event`,at={webhook:`webhook`,cron:`clock`,workflow:`workflow`,"session-reload":`rotate-ccw`,navigate:`compass`,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 st(e){return e&&at[e.toLowerCase()]||ot}var M={confirmed:`circle-check`,dismissed:`circle-x`},ct=x(`
785
+ `),tt=`Handoff request from`;v(`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=[et]}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?b(`slot`):document.createTextNode(e)}#r(){let e=this.pre??tt,t=this.name,n=b(`slicc-googly-eyes`,{class:`eyes`});this.eyes===`dead`&&n.setAttribute(`eyes`,`dead`);let r=b(`div`,{class:`top`,part:`top`},b(`span`,{class:`av`,part:`avatar`},n),b(`span`,{class:`lbl2`,part:`label`},b(`span`,{class:`hand`,part:`hand`,"aria-hidden":`true`},s(`hand`,{size:13})),b(`span`,{class:`pre`},e),` `,t==null?null:b(`b`,{part:`name`},t))),i=b(`p`,{part:`text`},this.#n());this.#e.replaceChildren(b(`div`,{class:`handoff`,part:`card`},r,i))}#i(){let e=this.name,t=b(`span`,{class:`sg`,part:`glyph`,"aria-hidden":`true`},s(`sparkles`,{size:12})),n=b(`span`,{part:`text`},e==null?null:b(`b`,{part:`name`},e),e==null?null:` `,this.#n());this.#e.replaceChildren(b(`div`,{class:`opened`,part:`card`},t,n))}});var nt=14,rt=`event`,it={webhook:`webhook`,cron:`clock`,workflow:`workflow`,"session-reload":`rotate-ccw`,navigate:`compass`,upgrade:`circle-arrow-up`,sprinkle:`sparkles`,fswatch:`eye`,"scoop-notify":`bell-ring`,"scoop-idle":`moon`,"scoop-wait":`hourglass`,"sudo-request":`key-round`},at=`bell`;function ot(e){return e&&it[e.toLowerCase()]||at}var N={confirmed:`circle-check`,dismissed:`circle-x`},st=x(`
786
786
  :host{
787
787
  /* Licks are right-aligned in the chat column (mirroring the lickIn slide-in
788
788
  from the right): the host is a full-width flex row that pushes the card to
@@ -870,7 +870,7 @@ canvas.sprk {
870
870
  :host([collapsed]) .lb{display:none;}
871
871
 
872
872
  @keyframes lickIn{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:none}}
873
- `),lt=`·`;v(`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=[ct]}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,n=this.getAttribute(`hue`);n?(this.style.setProperty(`--lick-pill`,n),this.style.setProperty(`--lick-pill-ink`,`#fff`)):(this.style.removeProperty(`--lick-pill`),this.style.removeProperty(`--lick-pill-ink`));let r=this.eventLabel??it,i=t>1?`${r} ×${t}`:r,a=this.body,o=this.collapsible,c=e?`lick ${lt} ${e}`:`lick ${lt}`,l=b(`span`,{class:`bell`,part:`bell`,"aria-hidden":!0});l.append(s(st(e),{size:j}));let u={class:`lh`,part:`header`};o&&(u.tabindex=`0`,u.role=`button`,u[`aria-expanded`]=this.collapsed?`false`:`true`);let d=b(`div`,u,l,` `,b(`span`,{class:`kind`,part:`kind`},`${c} `),b(`span`,{class:`lk`,part:`event`},i)),f=this.state;if(f!==`pending`){let e=b(`span`,{class:`status`,part:`status`,"aria-hidden":!0});e.append(s(M[f],{size:j})),d.append(e)}let p=b(`div`,{class:`lick`,part:`card`},d,b(`div`,{class:`lb`,part:`body`},a??b(`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 ut=`
873
+ `),ct=`·`;v(`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=[st]}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,n=this.getAttribute(`hue`);n?(this.style.setProperty(`--lick-pill`,n),this.style.setProperty(`--lick-pill-ink`,`#fff`)):(this.style.removeProperty(`--lick-pill`),this.style.removeProperty(`--lick-pill-ink`));let r=this.eventLabel??rt,i=t>1?`${r} ×${t}`:r,a=this.body,o=this.collapsible,c=e?`lick ${ct} ${e}`:`lick ${ct}`,l=b(`span`,{class:`bell`,part:`bell`,"aria-hidden":!0});l.append(s(ot(e),{size:nt}));let u={class:`lh`,part:`header`};o&&(u.tabindex=`0`,u.role=`button`,u[`aria-expanded`]=this.collapsed?`false`:`true`);let d=b(`div`,u,l,` `,b(`span`,{class:`kind`,part:`kind`},`${c} `),b(`span`,{class:`lk`,part:`event`},i)),f=this.state;if(f!==`pending`){let e=b(`span`,{class:`status`,part:`status`,"aria-hidden":!0});e.append(s(N[f],{size:nt})),d.append(e)}let p=b(`div`,{class:`lick`,part:`card`},d,b(`div`,{class:`lb`,part:`body`},a??b(`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 lt=`
874
874
  slicc-tool-cluster {
875
875
  display: block;
876
876
  margin: -2px 0 16px;
@@ -946,7 +946,7 @@ slicc-tool-cluster[open] .slicc-cluster__body {
946
946
  slicc-tool-cluster .slicc-cluster__body slicc-action-row {
947
947
  margin-bottom: 4px;
948
948
  }
949
- `,dt=`slicc-tool-cluster-style`;function ft(e){if(e.getElementById(dt))return;let t=e.createElement(`style`);t.id=dt,t.textContent=ut,(e.head??e.documentElement).appendChild(t)}var pt=`A few quick steps`;v(`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`)??pt}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=b(`span`,{class:`slicc-cluster__label`,part:`label`}),this.#n=b(`span`,{class:`slicc-cluster__count`,part:`count`}),y(this.#e,[b(`span`,{class:`slicc-cluster__ic`,part:`icon`},s(`layers`,{size:12})),this.#t,this.#n,b(`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 mt=x(`
949
+ `,ut=`slicc-tool-cluster-style`;function dt(e){if(e.getElementById(ut))return;let t=e.createElement(`style`);t.id=ut,t.textContent=lt,(e.head??e.documentElement).appendChild(t)}var ft=`A few quick steps`;v(`slicc-tool-cluster`,class extends HTMLElement{static observedAttributes=[`open`,`label`,`count`];#e;#t;#n;#r;#i=!1;#a=()=>{this.open=!this.open};connectedCallback(){dt(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`)??ft}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=b(`span`,{class:`slicc-cluster__label`,part:`label`}),this.#n=b(`span`,{class:`slicc-cluster__count`,part:`count`}),y(this.#e,[b(`span`,{class:`slicc-cluster__ic`,part:`icon`},s(`layers`,{size:12})),this.#t,this.#n,b(`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=x(`
950
950
  :host{display:block;margin-bottom:18px;font-family:var(--ui);font-size:15px;line-height:1.5;}
951
951
  :host([hidden]){display:none;}
952
952
  .msg{display:flex;justify-content:flex-end;}
@@ -986,7 +986,7 @@ slicc-tool-cluster .slicc-cluster__body slicc-action-row {
986
986
  :host([queued]) .b{opacity:.62;}
987
987
  .queued-tag{display:inline-flex;align-items:center;gap:4px;font-size:10.5px;color:var(--txt-3);}
988
988
  .queued-tag svg{display:block;}
989
- `),ht={image:`image`,text:`file-text`,file:`file`};function gt(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}v(`slicc-user-message`,class extends HTMLElement{static observedAttributes=[`text`,`queued`];#e;#t=null;#n=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[mt]}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?b(`slot`):this.ownerDocument.createTextNode(e)}#i(e){let t=e.kind??`file`,n=b(`span`,{class:`attachment-chip__visual`});t===`image`&&e.src?n.append(b(`img`,{src:e.src,alt:e.name||`Attached image`})):n.append(s(ht[t],{size:16}));let r=e.size==null?e.mime:`${e.mime||`file`} · ${gt(e.size)}`,i=b(`span`,{class:`attachment-chip__body`},b(`span`,{class:`attachment-chip__name`},e.name),r?b(`span`,{class:`attachment-chip__meta`},r):null);return b(`div`,{class:`attachment-chip attachment-chip--${t}`},n,i)}#a(){let e=this.#n.length>0,t=this.text!=null||this.#t!=null,n=this.childNodes.length>0,r=t||n||!e,i=b(`div`,{class:`stack`,part:`stack`});if(e){let e=b(`div`,{class:`attachments`,part:`attachments`});for(let t of this.#n)e.append(this.#i(t));i.append(e)}r&&i.append(b(`div`,{class:`b`,part:`bubble`},this.#r())),this.queued&&i.append(b(`span`,{class:`queued-tag`,part:`queued`},s(`clock`,{size:11}),`queued`));let a=b(`div`,{class:`msg user`,part:`message`},i);this.#e.replaceChildren(a)}});var _t=`
989
+ `),mt={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`}v(`slicc-user-message`,class extends HTMLElement{static observedAttributes=[`text`,`queued`];#e;#t=null;#n=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[pt]}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?b(`slot`):this.ownerDocument.createTextNode(e)}#i(e){let t=e.kind??`file`,n=b(`span`,{class:`attachment-chip__visual`});t===`image`&&e.src?n.append(b(`img`,{src:e.src,alt:e.name||`Attached image`})):n.append(s(mt[t],{size:16}));let r=e.size==null?e.mime:`${e.mime||`file`} · ${ht(e.size)}`,i=b(`span`,{class:`attachment-chip__body`},b(`span`,{class:`attachment-chip__name`},e.name),r?b(`span`,{class:`attachment-chip__meta`},r):null);return b(`div`,{class:`attachment-chip attachment-chip--${t}`},n,i)}#a(){let e=this.#n.length>0,t=this.text!=null||this.#t!=null,n=this.childNodes.length>0,r=t||n||!e,i=b(`div`,{class:`stack`,part:`stack`});if(e){let e=b(`div`,{class:`attachments`,part:`attachments`});for(let t of this.#n)e.append(this.#i(t));i.append(e)}r&&i.append(b(`div`,{class:`b`,part:`bubble`},this.#r())),this.queued&&i.append(b(`span`,{class:`queued-tag`,part:`queued`},s(`clock`,{size:11}),`queued`));let a=b(`div`,{class:`msg user`,part:`message`},i);this.#e.replaceChildren(a)}});var gt=`
990
990
  slicc-composer {
991
991
  flex: 0 0 auto;
992
992
  display: block;
@@ -1273,7 +1273,7 @@ slicc-composer .slicc-composer__ptt.is-picking {
1273
1273
  animation-name: none;
1274
1274
  }
1275
1275
  }
1276
- `,vt=`slicc-composer-style`;function yt(e){if(e.getElementById(vt))return;let t=e.createElement(`style`);t.id=vt,t.textContent=_t,(e.head??e.documentElement).appendChild(t)}var bt=3e3,xt=60,St=1e4,Ct=45e3;function wt(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 Tt=`slicc-composer:mic-device`;function Et(){try{return typeof localStorage>`u`?null:localStorage.getItem(Tt)}catch{return null}}function Dt(e){try{if(typeof localStorage>`u`)return;e?localStorage.setItem(Tt,e):localStorage.removeItem(Tt)}catch{}}function Ot(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`}v(`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=Et();#p=null;#m=null;#h=null;#g=null;#_=null;#v=null;#y=null;#b=null;#x=null;#S=null;#C=[];connectedCallback(){yt(this.ownerDocument),this.#w(),this.addEventListener(`pointerdown`,this.#T)}disconnectedCallback(){this.removeEventListener(`pointerdown`,this.#T),this.#c?.cancel(),this.#c=null,this.#k(),this.#i=!1,this.#o=null,this.#a++,this.#L(),this.#F(),this.#p&&clearTimeout(this.#p),this.#p=null,this.#I(),this.#U(),this.#Q()}attributeChangedCallback(){}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get speech(){return this.#u??=a(),this.#u}set speech(e){this.#u=e,this.#d=`unknown`}get device(){return this.#f}set device(e){this.#f=e,Dt(e)}get inner(){return this.#w(),this.#e}append(...e){this.#w(),this.#e.append(...e)}#w(){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)}#T=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))return;this.#i=!0,this.#a++,this.#o=t,this.#s=e.pointerId;try{this.setPointerCapture(e.pointerId)}catch{}this.setAttribute(`data-ptt-pressed`,``),this.ownerDocument.addEventListener(`pointerup`,this.#A),this.addEventListener(`pointercancel`,this.#j);let n=this.#a;this.#m=setTimeout(()=>{this.#m=null,this.#E(this.speech,n)},100)};async#E(e,t){let n=await Promise.race([e.permission().then(e=>(this.#d=e,e)),new Promise(e=>setTimeout(()=>e(`pending`),xt))]);if(!(t!==this.#a||!this.#i)){if(n===`granted`){this.#O(e,t);return}if(n===`denied`){this.#G(`denied`);return}this.#G(`enable`),this.#p=setTimeout(()=>{this.#p=null,this.#D(e,t)},bt),n===`pending`&&e.permission().then(n=>{this.#d=n,!(t!==this.#a||!this.#i||this.#r!==`enable`)&&(n===`granted`?(this.#P(),this.#O(e,t)):n===`denied`&&(this.#P(),this.#G(`denied`)))})}}#D(e,t){t!==this.#a||!this.#i||this.#r!==`enable`||(this.#_=null,this.#G(`prompting`),wt(e.requestPermission(),St,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.#O(e,t):n?this.#Q():this.#i?this.#G(`denied`):this.#Q())}).catch(e=>{this.#d=`denied`,t===this.#a&&(this.#i?(this.#_=e instanceof Error?e.message:String(e),this.#G(`denied`)):this.#Q())}))}#O(e,t){this.#r=`recording`,this.#G(`recording`),e.warmup(),this.#h?.(),this.#h=e.onStatus(e=>{this.#g=e,this.#X()}),e.microphones().then(e=>{t===this.#a&&i(e)&&this.#Z(e)});let n=e.start({deviceId:this.#f??void 0,onPartial:e=>{t===this.#a&&this.#Y(e)},onError:e=>{t===this.#a&&this.#Y(e,!0)}});this.#l=n,n.then(e=>{if(this.#l===n){if(this.#l=null,t!==this.#a||this.#r!==`recording`){e.cancel();return}this.#c=e}}).catch(e=>{this.#l===n&&(this.#l=null,t===this.#a&&this.#Y(e instanceof Error?e.message:String(e),!0))})}#k(){let e=this.#l;this.#l=null,e&&e.then(e=>e.cancel(),()=>{})}#A=e=>{if(!this.#i||this.#s!=null&&e.pointerId!==this.#s)return;let t=this.#x,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.#L(),this.#I(),this.#c?.cancel(),this.#c=null,this.#k(),this.#o=null,this.#R();return}this.#M(!0)};#j=e=>{this.#s!=null&&e.pointerId!==this.#s||this.#M(!1)};#M(e){if(!this.#i)return;switch(this.#i=!1,this.#F(),this.#L(),this.#I(),this.#r){case`enable`:this.#P(),this.#o=null,this.#Q();return;case`prompting`:this.#o=null;return;case`denied`:this.#o=null,this.#Q();return;case`recording`:break;default:this.#o=null,this.#Q();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.#Q();return}if(!t&&!n){this.#o=null,this.#Q();return}this.#r=`finalizing`,this.#Y(`Transcribing…`);let r=this.#a;wt((t?Promise.resolve(t):n).then(e=>e.stop()),Ct,Error(`finalize timed out`)).then(e=>{r===this.#a&&(this.#Q(),this.#N(e))}).catch(()=>{r===this.#a&&(this.#Q(),this.#o=null)})}#N(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`}}))}#P(){this.#p&&clearTimeout(this.#p),this.#p=null}#F(){this.#m&&clearTimeout(this.#m),this.#m=null}#I(){this.ownerDocument.removeEventListener(`pointerup`,this.#A),this.removeEventListener(`pointercancel`,this.#j)}#L(){let e=this.#s;if(this.#s=null,this.removeAttribute(`data-ptt-pressed`),e!=null)try{this.releasePointerCapture(e)}catch{}}#R(){this.#r=`picking`,this.#J(`picking`),this.#v&&(this.#v.textContent=`Choose a microphone`),this.#y&&(this.#y.hidden=!0),this.#z();let e=this.ownerDocument;e.addEventListener(`pointerdown`,this.#V,!0),e.addEventListener(`keydown`,this.#H,!0)}#z(){let e=this.#x;if(!e||this.#S)return;let t=b(`div`,{class:`slicc-composer__ptt-device-menu`,role:`menu`}),n=null;for(let e of this.#C){let r=e.deviceId===this.#f,i=b(`button`,{type:`button`,class:`slicc-composer__ptt-device-item`,role:`menuitemradio`,"aria-checked":r?`true`:`false`,"data-device-id":e.deviceId},e.label,b(`span`,{class:`tick`},s(`check`,{size:14})));i.addEventListener(`click`,()=>{this.device=e.deviceId,this.#W()}),(r||!n)&&(n=i),t.appendChild(i)}this.#S=t,e.appendChild(t),this.#B(t,e),n?.focus()}#B(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`}#V=e=>{this.#x&&e.composedPath().includes(this.#x)||this.#W()};#H=e=>{e.key===`Escape`&&(e.stopPropagation(),this.#W())};#U(){let e=this.ownerDocument;e.removeEventListener(`pointerdown`,this.#V,!0),e.removeEventListener(`keydown`,this.#H,!0)}#W(){this.#U(),this.#Q()}#G(e){switch(this.#r=e,this.#n||(this.#n=b(`div`,{class:`slicc-composer__ptt`,"data-ptt":!0,role:`button`}),this.appendChild(this.#n)),this.#J(e),e){case`enable`:this.#K(s(`mic`,{size:28}),`Hold to enable push to talk`,this.#q(`Requesting microphone access when the bar fills`)),this.#n.setAttribute(`aria-label`,`Hold to enable push to talk`);break;case`prompting`:this.#K(s(`mic`,{size:28}),`Allow microphone access in the browser prompt`,this.#q(`Waiting for permission…`)),this.#n.setAttribute(`aria-label`,`Waiting for microphone permission`);break;case`denied`:{let e=this.#_?`Microphone unavailable`:`Microphone access is blocked`,t=this.#_??`Enable the microphone for this site in your browser settings, then hold again.`;this.#K(s(`mic-off`,{size:28}),e,b(`div`,{class:`slicc-composer__ptt-load-text`},t)),this.#n.setAttribute(`aria-label`,e);break}case`recording`:{this.#x=b(`div`,{class:`slicc-composer__ptt-device`,hidden:!0}),this.#y=b(`div`,{class:`slicc-composer__ptt-caption`,"aria-live":`polite`,hidden:!0}),this.#b=b(`div`,{class:`slicc-composer__ptt-status`,hidden:!0});let e=b(`div`,{class:`slicc-composer__ptt-microw`},b(`div`,{class:`slicc-composer__ptt-mic`},s(`mic`,{size:28})),this.#x);this.#v=b(`div`,{class:`slicc-composer__ptt-label`},`Listening — release to send`),this.#n.replaceChildren(e,this.#v,this.#y,this.#b),this.#n.setAttribute(`aria-label`,`Listening — release to send`),this.#X();break}}}#K(e,t,n){this.#n&&(this.#v=b(`div`,{class:`slicc-composer__ptt-label`},t),this.#y=null,this.#b=null,this.#x=null,this.#S=null,this.#C=[],this.#n.replaceChildren(b(`div`,{class:`slicc-composer__ptt-mic`},e),this.#v,n))}#q(e){return b(`div`,{class:`slicc-composer__ptt-load`},b(`span`,{class:`slicc-composer__ptt-load-text`},e),b(`div`,{class:`slicc-composer__ptt-bar`},b(`div`,{class:`slicc-composer__ptt-bar-fill`})))}#J(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}`))}#Y(e,t=!1){let n=this.#y;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}#X(){let e=this.#b;if(!e)return;let t=this.#g;if(t?.state===`downloading`){if(t.download){let n=Ot(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)}#Z(e){let t=this.#x;if(!t)return;this.#C=e;let n=b(`button`,{type:`button`,class:`slicc-composer__ptt-device-btn`,"aria-label":`Choose a microphone`,"aria-haspopup":`menu`,title:`Choose a microphone`},s(`chevron-down`,{size:12}));n.addEventListener(`pointerdown`,e=>e.stopPropagation()),t.replaceChildren(n),t.hidden=!1}#Q(){this.#h?.(),this.#h=null,this.#n?.remove(),this.#n=null,this.#v=null,this.#y=null,this.#b=null,this.#x=null,this.#S=null,this.#C=[],this.#_=null,this.#r=`idle`}});var kt=`
1276
+ `,_t=`slicc-composer-style`;function vt(e){if(e.getElementById(_t))return;let t=e.createElement(`style`);t.id=_t,t.textContent=gt,(e.head??e.documentElement).appendChild(t)}var yt=3e3,bt=60,xt=1e4,St=45e3;function Ct(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 wt=`slicc-composer:mic-device`;function Tt(){try{return typeof localStorage>`u`?null:localStorage.getItem(wt)}catch{return null}}function Et(e){try{if(typeof localStorage>`u`)return;e?localStorage.setItem(wt,e):localStorage.removeItem(wt)}catch{}}function Dt(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`}v(`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=Tt();#p=null;#m=null;#h=null;#g=null;#_=null;#v=null;#y=null;#b=null;#x=null;#S=null;#C=[];connectedCallback(){vt(this.ownerDocument),this.#w(),this.addEventListener(`pointerdown`,this.#T)}disconnectedCallback(){this.removeEventListener(`pointerdown`,this.#T),this.#c?.cancel(),this.#c=null,this.#k(),this.#i=!1,this.#o=null,this.#a++,this.#L(),this.#F(),this.#p&&clearTimeout(this.#p),this.#p=null,this.#I(),this.#U(),this.#Q()}attributeChangedCallback(){}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get speech(){return this.#u??=a(),this.#u}set speech(e){this.#u=e,this.#d=`unknown`}get device(){return this.#f}set device(e){this.#f=e,Et(e)}get inner(){return this.#w(),this.#e}append(...e){this.#w(),this.#e.append(...e)}#w(){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)}#T=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))return;this.#i=!0,this.#a++,this.#o=t,this.#s=e.pointerId;try{this.setPointerCapture(e.pointerId)}catch{}this.setAttribute(`data-ptt-pressed`,``),this.ownerDocument.addEventListener(`pointerup`,this.#A),this.addEventListener(`pointercancel`,this.#j);let n=this.#a;this.#m=setTimeout(()=>{this.#m=null,this.#E(this.speech,n)},100)};async#E(e,t){let n=await Promise.race([e.permission().then(e=>(this.#d=e,e)),new Promise(e=>setTimeout(()=>e(`pending`),bt))]);if(!(t!==this.#a||!this.#i)){if(n===`granted`){this.#O(e,t);return}if(n===`denied`){this.#G(`denied`);return}this.#G(`enable`),this.#p=setTimeout(()=>{this.#p=null,this.#D(e,t)},yt),n===`pending`&&e.permission().then(n=>{this.#d=n,!(t!==this.#a||!this.#i||this.#r!==`enable`)&&(n===`granted`?(this.#P(),this.#O(e,t)):n===`denied`&&(this.#P(),this.#G(`denied`)))})}}#D(e,t){t!==this.#a||!this.#i||this.#r!==`enable`||(this.#_=null,this.#G(`prompting`),Ct(e.requestPermission(),xt,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.#O(e,t):n?this.#Q():this.#i?this.#G(`denied`):this.#Q())}).catch(e=>{this.#d=`denied`,t===this.#a&&(this.#i?(this.#_=e instanceof Error?e.message:String(e),this.#G(`denied`)):this.#Q())}))}#O(e,t){this.#r=`recording`,this.#G(`recording`),e.warmup(),this.#h?.(),this.#h=e.onStatus(e=>{this.#g=e,this.#X()}),e.microphones().then(e=>{t===this.#a&&i(e)&&this.#Z(e)});let n=e.start({deviceId:this.#f??void 0,onPartial:e=>{t===this.#a&&this.#Y(e)},onError:e=>{t===this.#a&&this.#Y(e,!0)}});this.#l=n,n.then(e=>{if(this.#l===n){if(this.#l=null,t!==this.#a||this.#r!==`recording`){e.cancel();return}this.#c=e}}).catch(e=>{this.#l===n&&(this.#l=null,t===this.#a&&this.#Y(e instanceof Error?e.message:String(e),!0))})}#k(){let e=this.#l;this.#l=null,e&&e.then(e=>e.cancel(),()=>{})}#A=e=>{if(!this.#i||this.#s!=null&&e.pointerId!==this.#s)return;let t=this.#x,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.#L(),this.#I(),this.#c?.cancel(),this.#c=null,this.#k(),this.#o=null,this.#R();return}this.#M(!0)};#j=e=>{this.#s!=null&&e.pointerId!==this.#s||this.#M(!1)};#M(e){if(!this.#i)return;switch(this.#i=!1,this.#F(),this.#L(),this.#I(),this.#r){case`enable`:this.#P(),this.#o=null,this.#Q();return;case`prompting`:this.#o=null;return;case`denied`:this.#o=null,this.#Q();return;case`recording`:break;default:this.#o=null,this.#Q();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.#Q();return}if(!t&&!n){this.#o=null,this.#Q();return}this.#r=`finalizing`,this.#Y(`Transcribing…`);let r=this.#a;Ct((t?Promise.resolve(t):n).then(e=>e.stop()),St,Error(`finalize timed out`)).then(e=>{r===this.#a&&(this.#Q(),this.#N(e))}).catch(()=>{r===this.#a&&(this.#Q(),this.#o=null)})}#N(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`}}))}#P(){this.#p&&clearTimeout(this.#p),this.#p=null}#F(){this.#m&&clearTimeout(this.#m),this.#m=null}#I(){this.ownerDocument.removeEventListener(`pointerup`,this.#A),this.removeEventListener(`pointercancel`,this.#j)}#L(){let e=this.#s;if(this.#s=null,this.removeAttribute(`data-ptt-pressed`),e!=null)try{this.releasePointerCapture(e)}catch{}}#R(){this.#r=`picking`,this.#J(`picking`),this.#v&&(this.#v.textContent=`Choose a microphone`),this.#y&&(this.#y.hidden=!0),this.#z();let e=this.ownerDocument;e.addEventListener(`pointerdown`,this.#V,!0),e.addEventListener(`keydown`,this.#H,!0)}#z(){let e=this.#x;if(!e||this.#S)return;let t=b(`div`,{class:`slicc-composer__ptt-device-menu`,role:`menu`}),n=null;for(let e of this.#C){let r=e.deviceId===this.#f,i=b(`button`,{type:`button`,class:`slicc-composer__ptt-device-item`,role:`menuitemradio`,"aria-checked":r?`true`:`false`,"data-device-id":e.deviceId},e.label,b(`span`,{class:`tick`},s(`check`,{size:14})));i.addEventListener(`click`,()=>{this.device=e.deviceId,this.#W()}),(r||!n)&&(n=i),t.appendChild(i)}this.#S=t,e.appendChild(t),this.#B(t,e),n?.focus()}#B(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`}#V=e=>{this.#x&&e.composedPath().includes(this.#x)||this.#W()};#H=e=>{e.key===`Escape`&&(e.stopPropagation(),this.#W())};#U(){let e=this.ownerDocument;e.removeEventListener(`pointerdown`,this.#V,!0),e.removeEventListener(`keydown`,this.#H,!0)}#W(){this.#U(),this.#Q()}#G(e){switch(this.#r=e,this.#n||(this.#n=b(`div`,{class:`slicc-composer__ptt`,"data-ptt":!0,role:`button`}),this.appendChild(this.#n)),this.#J(e),e){case`enable`:this.#K(s(`mic`,{size:28}),`Hold to enable push to talk`,this.#q(`Requesting microphone access when the bar fills`)),this.#n.setAttribute(`aria-label`,`Hold to enable push to talk`);break;case`prompting`:this.#K(s(`mic`,{size:28}),`Allow microphone access in the browser prompt`,this.#q(`Waiting for permission…`)),this.#n.setAttribute(`aria-label`,`Waiting for microphone permission`);break;case`denied`:{let e=this.#_?`Microphone unavailable`:`Microphone access is blocked`,t=this.#_??`Enable the microphone for this site in your browser settings, then hold again.`;this.#K(s(`mic-off`,{size:28}),e,b(`div`,{class:`slicc-composer__ptt-load-text`},t)),this.#n.setAttribute(`aria-label`,e);break}case`recording`:{this.#x=b(`div`,{class:`slicc-composer__ptt-device`,hidden:!0}),this.#y=b(`div`,{class:`slicc-composer__ptt-caption`,"aria-live":`polite`,hidden:!0}),this.#b=b(`div`,{class:`slicc-composer__ptt-status`,hidden:!0});let e=b(`div`,{class:`slicc-composer__ptt-microw`},b(`div`,{class:`slicc-composer__ptt-mic`},s(`mic`,{size:28})),this.#x);this.#v=b(`div`,{class:`slicc-composer__ptt-label`},`Listening — release to send`),this.#n.replaceChildren(e,this.#v,this.#y,this.#b),this.#n.setAttribute(`aria-label`,`Listening — release to send`),this.#X();break}}}#K(e,t,n){this.#n&&(this.#v=b(`div`,{class:`slicc-composer__ptt-label`},t),this.#y=null,this.#b=null,this.#x=null,this.#S=null,this.#C=[],this.#n.replaceChildren(b(`div`,{class:`slicc-composer__ptt-mic`},e),this.#v,n))}#q(e){return b(`div`,{class:`slicc-composer__ptt-load`},b(`span`,{class:`slicc-composer__ptt-load-text`},e),b(`div`,{class:`slicc-composer__ptt-bar`},b(`div`,{class:`slicc-composer__ptt-bar-fill`})))}#J(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}`))}#Y(e,t=!1){let n=this.#y;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}#X(){let e=this.#b;if(!e)return;let t=this.#g;if(t?.state===`downloading`){if(t.download){let n=Dt(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)}#Z(e){let t=this.#x;if(!t)return;this.#C=e;let n=b(`button`,{type:`button`,class:`slicc-composer__ptt-device-btn`,"aria-label":`Choose a microphone`,"aria-haspopup":`menu`,title:`Choose a microphone`},s(`chevron-down`,{size:12}));n.addEventListener(`pointerdown`,e=>e.stopPropagation()),t.replaceChildren(n),t.hidden=!1}#Q(){this.#h?.(),this.#h=null,this.#n?.remove(),this.#n=null,this.#v=null,this.#y=null,this.#b=null,this.#x=null,this.#S=null,this.#C=[],this.#_=null,this.#r=`idle`}});var Ot=`
1277
1277
  slicc-composer-capture {
1278
1278
  position: relative;
1279
1279
  display: block;
@@ -1477,7 +1477,7 @@ slicc-composer-capture .slicc-capture__timer {
1477
1477
  slicc-composer-capture .slicc-capture__timer[hidden] {
1478
1478
  display: none;
1479
1479
  }
1480
- `,At=`slicc-composer-capture-style`;function jt(e){if(e.getElementById(At))return;let t=e.createElement(`style`);t.id=At,t.textContent=kt,(e.head??e.documentElement).appendChild(t)}var Mt=`photo`,Nt=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`,`video/webm`];function Pt(){if(typeof MediaRecorder>`u`)return`video/webm`;for(let e of Nt)if(MediaRecorder.isTypeSupported?.(e))return e;return`video/webm`}function Ft(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`)}`}v(`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(){jt(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??Mt)}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=this.#x(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})}}#x(e,t){return t===`video`?e?{deviceId:{exact:e}}:!0:!1}#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=r(t,`camera`);this.#t.replaceChildren(...n.map(e=>b(`option`,{value:e.deviceId},e.label)));let a=this.#u?.getVideoTracks()[0]?.getSettings?.().deviceId;a&&(this.#t.value=a),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=r(t,`microphone`);this.#n.replaceChildren(...n.map(e=>b(`option`,{value:e.deviceId},e.label)));let i=this.#d?.getSettings?.().deviceId??this.preferredAudioDevice??null;i&&n.some(e=>e.deviceId===i)&&(this.#n.value=i),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:this.#x(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=Pt(),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=Ft(0),this.#h=setInterval(()=>{this.#i.textContent=Ft(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(s(`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(b(`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(b(`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=b(`video`,{class:`slicc-capture__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#e.muted=!0,this.#r=b(`div`,{class:`slicc-capture__status`}),this.#t=b(`select`,{class:`slicc-capture__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#t.addEventListener(`change`,()=>{this.#D(this.#t.value)}),this.#n=b(`select`,{class:`slicc-capture__select`,part:`audio-picker`,"aria-label":`Microphone`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#O(this.#n.value)}),this.#s=b(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`true`,"aria-label":`Photo`},s(`image`,{size:14})),this.#s.addEventListener(`click`,()=>{this.mode=`photo`}),this.#c=b(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`false`,"aria-label":`Video`},s(`video`,{size:14})),this.#c.addEventListener(`click`,()=>{this.#U()});let e=b(`div`,{class:`slicc-capture__mode`,role:`group`,"aria-label":`Capture mode`},this.#s,this.#c);this.#i=b(`span`,{class:`slicc-capture__timer`,hidden:!0}),this.#o=b(`button`,{type:`button`,class:`slicc-capture__close`,part:`cancel`,"aria-label":`Cancel`},s(`x`,{size:14})),this.#o.addEventListener(`click`,()=>this.#L()),this.#a=b(`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=b(`div`,{class:`slicc-capture__bar`},this.#t,this.#n,b(`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=this.#x(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 It=[`off`,`low`,`medium`,`high`,`xhigh`,`max`],Lt={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)`}},Rt=`max`,zt=`Opus 4.8`,Bt=[{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`}],Vt=8;function Ht(e){let t=typeof e==`string`?{name:e}:e;return{...t,name:t.name,id:t.id??t.name}}var Ut=`max`,Wt=13;function Gt(){return s(`sparkles`,{size:Wt,class:`ic`,part:`model-icon`})}function Kt(){return s(`brain`,{size:Wt,class:`brain`,part:`brain`})}function qt(){return s(`chevron-down`,{size:11,part:`caret`})}var Jt=`http://www.w3.org/2000/svg`;function Yt(){let e=document.createElementNS(Jt,`svg`);e.setAttribute(`width`,`0`),e.setAttribute(`height`,`0`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`style`,`position:absolute`);let t=document.createElementNS(Jt,`defs`),n=document.createElementNS(Jt,`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(Jt,`stop`);r.setAttribute(`offset`,e),r.setAttribute(`stop-color`,t),n.appendChild(r)}return t.appendChild(n),e.appendChild(t),e}var Xt=x(`
1480
+ `,kt=`slicc-composer-capture-style`;function At(e){if(e.getElementById(kt))return;let t=e.createElement(`style`);t.id=kt,t.textContent=Ot,(e.head??e.documentElement).appendChild(t)}var jt=`photo`,Mt=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`,`video/webm`];function Nt(){if(typeof MediaRecorder>`u`)return`video/webm`;for(let e of Mt)if(MediaRecorder.isTypeSupported?.(e))return e;return`video/webm`}function Pt(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`)}`}v(`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(){At(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??jt)}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=this.#x(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})}}#x(e,t){return t===`video`?e?{deviceId:{exact:e}}:!0:!1}#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=r(t,`camera`);this.#t.replaceChildren(...n.map(e=>b(`option`,{value:e.deviceId},e.label)));let a=this.#u?.getVideoTracks()[0]?.getSettings?.().deviceId;a&&(this.#t.value=a),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=r(t,`microphone`);this.#n.replaceChildren(...n.map(e=>b(`option`,{value:e.deviceId},e.label)));let i=this.#d?.getSettings?.().deviceId??this.preferredAudioDevice??null;i&&n.some(e=>e.deviceId===i)&&(this.#n.value=i),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:this.#x(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=Nt(),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=Pt(0),this.#h=setInterval(()=>{this.#i.textContent=Pt(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(s(`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(b(`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(b(`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=b(`video`,{class:`slicc-capture__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#e.muted=!0,this.#r=b(`div`,{class:`slicc-capture__status`}),this.#t=b(`select`,{class:`slicc-capture__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#t.addEventListener(`change`,()=>{this.#D(this.#t.value)}),this.#n=b(`select`,{class:`slicc-capture__select`,part:`audio-picker`,"aria-label":`Microphone`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#O(this.#n.value)}),this.#s=b(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`true`,"aria-label":`Photo`},s(`image`,{size:14})),this.#s.addEventListener(`click`,()=>{this.mode=`photo`}),this.#c=b(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`false`,"aria-label":`Video`},s(`video`,{size:14})),this.#c.addEventListener(`click`,()=>{this.#U()});let e=b(`div`,{class:`slicc-capture__mode`,role:`group`,"aria-label":`Capture mode`},this.#s,this.#c);this.#i=b(`span`,{class:`slicc-capture__timer`,hidden:!0}),this.#o=b(`button`,{type:`button`,class:`slicc-capture__close`,part:`cancel`,"aria-label":`Cancel`},s(`x`,{size:14})),this.#o.addEventListener(`click`,()=>this.#L()),this.#a=b(`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=b(`div`,{class:`slicc-capture__bar`},this.#t,this.#n,b(`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=this.#x(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 Ft=[`off`,`low`,`medium`,`high`,`xhigh`,`max`],It={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)`}},Lt=`max`,Rt=`Opus 4.8`,zt=[{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`}],Bt=8;function Vt(e){let t=typeof e==`string`?{name:e}:e;return{...t,name:t.name,id:t.id??t.name}}var Ht=`max`,Ut=13;function Wt(){return s(`sparkles`,{size:Ut,class:`ic`,part:`model-icon`})}function Gt(){return s(`brain`,{size:Ut,class:`brain`,part:`brain`})}function Kt(){return s(`chevron-down`,{size:11,part:`caret`})}var qt=`http://www.w3.org/2000/svg`;function Jt(){let e=document.createElementNS(qt,`svg`);e.setAttribute(`width`,`0`),e.setAttribute(`height`,`0`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`style`,`position:absolute`);let t=document.createElementNS(qt,`defs`),n=document.createElementNS(qt,`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(qt,`stop`);r.setAttribute(`offset`,e),r.setAttribute(`stop-color`,t),n.appendChild(r)}return t.appendChild(n),e.appendChild(t),e}var Yt=x(`
1481
1481
  :host{display:block;}
1482
1482
  *{box-sizing:border-box;}
1483
1483
  .meta{display:flex;align-items:center;gap:8px;max-width:680px;margin:11px auto 0;font-family:var(--ui);}
@@ -1533,7 +1533,7 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
1533
1533
  /* Narrow / extension-sidebar: the ⏎ / ⇧⏎ keyboard hints don't fit (and touch
1534
1534
  users have no keyboard) — drop them regardless of the narrow-chat attribute. */
1535
1535
  @media (max-width: 560px){ .hint{display:none;} }
1536
- `);v(`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=!1;#l=``;#u=e=>{this.#c&&!e.composedPath().includes(this)&&this.#b()};#d=e=>{e.key===`Escape`&&this.#c&&(e.stopPropagation(),this.#b(),this.#r?.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Xt]}connectedCallback(){this.#m()}disconnectedCallback(){this.#_(),document.removeEventListener(`mousedown`,this.#u),document.removeEventListener(`keydown`,this.#d,!0)}attributeChangedCallback(){this.isConnected&&this.#m()}get model(){return this.getAttribute(`model`)??zt}set model(e){e==null?this.removeAttribute(`model`):this.setAttribute(`model`,e)}get models(){return(this.#s??[...Bt]).map(e=>typeof e==`string`?e:{...e})}set models(e){this.#s=Array.isArray(e)?e.slice():null,this.isConnected&&this.#m()}get#f(){return(this.#s??Bt).map(Ht)}get#p(){return this.#s!==null&&this.#s.length===0}get thinking(){let e=this.getAttribute(`thinking`);return It.includes(e??``)?e:Ut}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===Rt}#m(){this.#_();let e=this.model,t=this.thinking,n=Lt[t],r=t===Rt,i=this.#p,a=i?b(`button`,{type:`button`,class:`ctl msel`,part:`model`},Gt(),` `,`Add AI`):b(`button`,{type:`button`,class:`ctl msel`,part:`model`,"aria-haspopup":`menu`,"aria-expanded":`false`},Gt(),` `,e,` `,b(`span`,{class:`cx`},qt())),o=b(`div`,{class:`menu`,part:`model-menu`,role:`menu`});if(this.#f.length>Vt){let e=b(`input`,{class:`msearch`,part:`model-search`,type:`text`,placeholder:`Search models…`,"aria-label":`Search models`});e.value=this.#l,e.addEventListener(`input`,()=>{this.#l=e.value,this.#h()}),e.addEventListener(`click`,e=>e.stopPropagation()),o.append(e)}this.#o=b(`div`,{class:`mlist`,role:`none`}),o.append(this.#o);let s=b(`div`,{class:`mwrap`},a,o),c=!this.noThinking&&!i,l=null;if(c){let e=Kt();e.style.color=n.tint,l=b(`button`,{type:`button`,class:`ctl tsel${r?` x`:``}`,part:`thinking`,title:n.gloss},e,` `,b(`span`,{class:`tlabel`},n.label),` `,b(`span`,{class:`cx`},qt())),l.style.setProperty(`--tw`,n.tint)}let u=b(`slot`,{name:`hint`});y(u,[b(`span`,{class:`kbd`},`⏎`),` send `,b(`span`,{class:`sep`}),` `,b(`span`,{class:`kbd`},`⇧⏎`),` newline`]);let d=b(`div`,{class:`meta`,part:`meta`},s,l??!1,b(`div`,{class:`mspacer`}),b(`span`,{class:`hint`,part:`hint`},u));this.#e.replaceChildren(Yt(),d),this.#a=s,this.#r=this.#e.querySelector(`.msel`),this.#i=this.#e.querySelector(`.tsel`),this.#h(),this.#x(),this.#g()}#h(){let e=this.#o;if(!e)return;let t=this.#l.trim().toLowerCase(),n=this.#f.filter(e=>!t||`${e.name} ${e.provider??``}`.toLowerCase().includes(t)),r=this.model,i=[];for(let e of n){let t=e.name===r,n=b(`button`,{type:`button`,class:`mitem`,role:`menuitemradio`,"data-id":e.id,"aria-selected":t?`true`:`false`},b(`span`,{class:`mname`},e.name),e.provider?b(`span`,{class:`mprov`},e.provider):!1,b(`span`,{class:`tick`},s(`check`,{size:14})));n.addEventListener(`click`,()=>this.#S(e.id)),i.push(n)}e.replaceChildren(...i.length?i:[b(`div`,{class:`mempty`},`No models match.`)])}#g(){this.#r&&(this.#t=e=>{if(e.stopPropagation(),this.#p){this.dispatchEvent(new CustomEvent(`add-ai`,{bubbles:!0,composed:!0}));return}this.#v()},this.#r.addEventListener(`click`,this.#t)),this.#i&&(this.#n=()=>this.#C(),this.#i.addEventListener(`click`,this.#n))}#_(){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}get menuOpen(){return this.#c}openMenu(){this.#p||this.#y()}#v(){this.#c?this.#b():this.#y()}#y(){if(this.#c)return;this.#c=!0,this.#l=``,this.#h(),this.#x();let e=this.#e.querySelector(`.msearch`);e&&(e.value=``,requestAnimationFrame(()=>e.focus())),document.addEventListener(`mousedown`,this.#u),document.addEventListener(`keydown`,this.#d,!0)}#b(){this.#c&&(this.#c=!1,this.#x(),document.removeEventListener(`mousedown`,this.#u),document.removeEventListener(`keydown`,this.#d,!0))}#x(){this.#a?.classList.toggle(`open`,this.#c),this.#r?.setAttribute(`aria-expanded`,this.#c?`true`:`false`)}#S(e){let t=this.#f.find(t=>t.id===e)??{name:e,id:e,provider:void 0};this.#b(),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}))}#C(){let e=It[(It.indexOf(this.thinking)+1)%It.length];this.thinking=e,this.dispatchEvent(new CustomEvent(`thinking-change`,{detail:{thinking:e,label:Lt[e].label,accented:e===Rt},bubbles:!0,composed:!0}))}});async function Zt(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 Qt(e,t={}){let n=(e??``).trim().toLowerCase();if(n===``)return null;let r=await Zt(n),i=t.size??80,a=t.fallback??`mp`;return`https://www.gravatar.com/avatar/${r}?s=${i}&d=${encodeURIComponent(a)}`}var $t=x(`
1536
+ `);v(`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=!1;#l=``;#u=e=>{this.#c&&!e.composedPath().includes(this)&&this.#b()};#d=e=>{e.key===`Escape`&&this.#c&&(e.stopPropagation(),this.#b(),this.#r?.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Yt]}connectedCallback(){this.#m()}disconnectedCallback(){this.#_(),document.removeEventListener(`mousedown`,this.#u),document.removeEventListener(`keydown`,this.#d,!0)}attributeChangedCallback(){this.isConnected&&this.#m()}get model(){return this.getAttribute(`model`)??Rt}set model(e){e==null?this.removeAttribute(`model`):this.setAttribute(`model`,e)}get models(){return(this.#s??[...zt]).map(e=>typeof e==`string`?e:{...e})}set models(e){this.#s=Array.isArray(e)?e.slice():null,this.isConnected&&this.#m()}get#f(){return(this.#s??zt).map(Vt)}get#p(){return this.#s!==null&&this.#s.length===0}get thinking(){let e=this.getAttribute(`thinking`);return Ft.includes(e??``)?e:Ht}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===Lt}#m(){this.#_();let e=this.model,t=this.thinking,n=It[t],r=t===Lt,i=this.#p,a=i?b(`button`,{type:`button`,class:`ctl msel`,part:`model`},Wt(),` `,`Add AI`):b(`button`,{type:`button`,class:`ctl msel`,part:`model`,"aria-haspopup":`menu`,"aria-expanded":`false`},Wt(),` `,e,` `,b(`span`,{class:`cx`},Kt())),o=b(`div`,{class:`menu`,part:`model-menu`,role:`menu`});if(this.#f.length>Bt){let e=b(`input`,{class:`msearch`,part:`model-search`,type:`text`,placeholder:`Search models…`,"aria-label":`Search models`});e.value=this.#l,e.addEventListener(`input`,()=>{this.#l=e.value,this.#h()}),e.addEventListener(`click`,e=>e.stopPropagation()),o.append(e)}this.#o=b(`div`,{class:`mlist`,role:`none`}),o.append(this.#o);let s=b(`div`,{class:`mwrap`},a,o),c=!this.noThinking&&!i,l=null;if(c){let e=Gt();e.style.color=n.tint,l=b(`button`,{type:`button`,class:`ctl tsel${r?` x`:``}`,part:`thinking`,title:n.gloss},e,` `,b(`span`,{class:`tlabel`},n.label),` `,b(`span`,{class:`cx`},Kt())),l.style.setProperty(`--tw`,n.tint)}let u=b(`slot`,{name:`hint`});y(u,[b(`span`,{class:`kbd`},`⏎`),` send `,b(`span`,{class:`sep`}),` `,b(`span`,{class:`kbd`},`⇧⏎`),` newline`]);let d=b(`div`,{class:`meta`,part:`meta`},s,l??!1,b(`div`,{class:`mspacer`}),b(`span`,{class:`hint`,part:`hint`},u));this.#e.replaceChildren(Jt(),d),this.#a=s,this.#r=this.#e.querySelector(`.msel`),this.#i=this.#e.querySelector(`.tsel`),this.#h(),this.#x(),this.#g()}#h(){let e=this.#o;if(!e)return;let t=this.#l.trim().toLowerCase(),n=this.#f.filter(e=>!t||`${e.name} ${e.provider??``}`.toLowerCase().includes(t)),r=this.model,i=[];for(let e of n){let t=e.name===r,n=b(`button`,{type:`button`,class:`mitem`,role:`menuitemradio`,"data-id":e.id,"aria-selected":t?`true`:`false`},b(`span`,{class:`mname`},e.name),e.provider?b(`span`,{class:`mprov`},e.provider):!1,b(`span`,{class:`tick`},s(`check`,{size:14})));n.addEventListener(`click`,()=>this.#S(e.id)),i.push(n)}e.replaceChildren(...i.length?i:[b(`div`,{class:`mempty`},`No models match.`)])}#g(){this.#r&&(this.#t=e=>{if(e.stopPropagation(),this.#p){this.dispatchEvent(new CustomEvent(`add-ai`,{bubbles:!0,composed:!0}));return}this.#v()},this.#r.addEventListener(`click`,this.#t)),this.#i&&(this.#n=()=>this.#C(),this.#i.addEventListener(`click`,this.#n))}#_(){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}get menuOpen(){return this.#c}openMenu(){this.#p||this.#y()}#v(){this.#c?this.#b():this.#y()}#y(){if(this.#c)return;this.#c=!0,this.#l=``,this.#h(),this.#x();let e=this.#e.querySelector(`.msearch`);e&&(e.value=``,requestAnimationFrame(()=>e.focus())),document.addEventListener(`mousedown`,this.#u),document.addEventListener(`keydown`,this.#d,!0)}#b(){this.#c&&(this.#c=!1,this.#x(),document.removeEventListener(`mousedown`,this.#u),document.removeEventListener(`keydown`,this.#d,!0))}#x(){this.#a?.classList.toggle(`open`,this.#c),this.#r?.setAttribute(`aria-expanded`,this.#c?`true`:`false`)}#S(e){let t=this.#f.find(t=>t.id===e)??{name:e,id:e,provider:void 0};this.#b(),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}))}#C(){let e=Ft[(Ft.indexOf(this.thinking)+1)%Ft.length];this.thinking=e,this.dispatchEvent(new CustomEvent(`thinking-change`,{detail:{thinking:e,label:It[e].label,accented:e===Lt},bubbles:!0,composed:!0}))}});async function Xt(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 Zt(e,t={}){let n=(e??``).trim().toLowerCase();if(n===``)return null;let r=await Xt(n),i=t.size??80,a=t.fallback??`mp`;return`https://www.gravatar.com/avatar/${r}?s=${i}&d=${encodeURIComponent(a)}`}var Qt=x(`
1537
1537
  :host { display: inline-flex; }
1538
1538
  :host([hidden]) { display: none; }
1539
1539
 
@@ -1630,14 +1630,41 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
1630
1630
 
1631
1631
  /*
1632
1632
  * Busy 'surprise' glyph: the stop square breathes with a soft pulse so the
1633
- * streaming state reads as alive without being distracting.
1633
+ * streaming (LLM-wait, phase="thinking") state reads as alive without being
1634
+ * distracting. The tool phase (.is-tool) replaces this with a spinning ring, so
1635
+ * the pulse is scoped away from it.
1634
1636
  */
1635
- .send.is-busy .stop { animation: slicc-send-pulse 1.6s ease-in-out infinite; }
1637
+ .send.is-busy:not(.is-tool) .stop { animation: slicc-send-pulse 1.6s ease-in-out infinite; }
1636
1638
  @keyframes slicc-send-pulse {
1637
1639
  0%, 100% { transform: scale(1); opacity: 0.92; }
1638
1640
  50% { transform: scale(1.14); opacity: 1; }
1639
1641
  }
1640
1642
 
1643
+ /*
1644
+ * Busy tool phase: a distinct 'running a tool' treatment. A ring is overlaid on
1645
+ * the 36px button around the (static) stop square. When indeterminate the whole
1646
+ * ring spins; when a determinate \`progress\` (0–1) is supplied the arc length
1647
+ * encodes the fraction and the ring holds still. A faint full-circle track sits
1648
+ * behind the bright arc.
1649
+ */
1650
+ .spinner {
1651
+ position: absolute;
1652
+ inset: 0;
1653
+ z-index: 2;
1654
+ display: grid;
1655
+ place-items: center;
1656
+ pointer-events: none;
1657
+ color: #fff;
1658
+ }
1659
+ .spinner svg { display: block; }
1660
+ .spinner .ring-track { stroke: currentColor; opacity: 0.28; }
1661
+ .spinner .ring-arc { stroke: currentColor; }
1662
+ .send.is-tool .spinner.is-indeterminate { animation: slicc-send-spin 0.9s linear infinite; }
1663
+ @keyframes slicc-send-spin {
1664
+ from { transform: rotate(0deg); }
1665
+ to { transform: rotate(360deg); }
1666
+ }
1667
+
1641
1668
  /*
1642
1669
  * Busy slow fill: a solid (currentColor) copy of the stop square, stacked over
1643
1670
  * the outline copy, is revealed by an animated clip-path that runs twelve
@@ -1703,12 +1730,13 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
1703
1730
  .glyph.is-hover,
1704
1731
  .glyph.is-press,
1705
1732
  .send.is-busy .stop,
1706
- .send.is-busy .stop-fill {
1733
+ .send.is-busy .stop-fill,
1734
+ .send.is-tool .spinner.is-indeterminate {
1707
1735
  animation: none;
1708
1736
  }
1709
1737
  .glyph.is-press { transform: none; }
1710
1738
  }
1711
- `),en=18,tn=72;v(`slicc-send-button`,class extends HTMLElement{static observedAttributes=[`disabled`,`busy`,`email`,`src`,`label`];#e;#t=null;#n=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[$t]}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 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),Qt(r,{size:tn}).then(t).catch(()=>t(null))}#d(){let e=this.busy,t=this.disabled,n=this.label??(e?`Stop`:`Send`),r=e?b(`slot`,{name:`busy`},b(`span`,{class:`stop`,part:`stop`},s(`square`,{size:en}),b(`span`,{class:`stop-fill`},s(`square`,{size:en})))):b(`slot`,null,b(`span`,{class:`glyph`,part:`glyph`},s(`arrow-up`,{size:en}))),i=b(`button`,{part:`button`,class:`send${e?` is-busy`:``}`,type:`button`,title:n,"aria-label":n,disabled:t||void 0},r);this.#e.replaceChildren(i),this.#t=i,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 nn=`
1739
+ `),$t=18,en=72,tn=`http://www.w3.org/2000/svg`,nn=15,rn=.25;function an(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*nn,r=e=>{let t=document.createElementNS(tn,`circle`);return t.setAttribute(`cx`,`18`),t.setAttribute(`cy`,`18`),t.setAttribute(`r`,String(nn)),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?rn: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 on(e){return e===`tool`?`tool`:`thinking`}function sn(e){if(e==null||e.trim()===``)return null;let t=Number(e);return Number.isFinite(t)?Math.max(0,Math.min(1,t)):null}v(`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=[Qt]}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 on(this.getAttribute(`phase`))}set phase(e){this.setAttribute(`phase`,on(e))}get progress(){return sn(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),Zt(r,{size:en}).then(t).catch(()=>t(null))}#d(){let e=this.busy,t=this.disabled,n=e&&this.phase===`tool`,r=this.label??(e?`Stop`:`Send`),i;if(n){let e=this.progress,t=e==null;i=b(`slot`,{name:`busy`},b(`span`,{class:`stop`,part:`stop`},s(`square`,{size:$t})),b(`span`,{class:`spinner${t?` is-indeterminate`:``}`,part:`spinner`},an(e)))}else i=e?b(`slot`,{name:`busy`},b(`span`,{class:`stop`,part:`stop`},s(`square`,{size:$t}),b(`span`,{class:`stop-fill`},s(`square`,{size:$t})))):b(`slot`,null,b(`span`,{class:`glyph`,part:`glyph`},s(`arrow-up`,{size:$t})));let a=b(`button`,{part:`button`,class:`send${e?` is-busy`:``}${n?` is-tool`:``}`,type:`button`,title:r,"aria-label":r,disabled:t||void 0},i);this.#e.replaceChildren(a),this.#t=a,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 cn=`
1712
1740
  slicc-input-card {
1713
1741
  display: block;
1714
1742
  }
@@ -1762,7 +1790,7 @@ slicc-input-card .toolbar slicc-add-menu {
1762
1790
  flex: 1;
1763
1791
  min-width: 0;
1764
1792
  }
1765
- `,rn=`slicc-input-card-style`;function an(e){if(e.getElementById(rn))return;let t=e.createElement(`style`);t.id=rn,t.textContent=nn,(e.head??e.documentElement).appendChild(t)}var on=`Ask sliccy, or describe a change…`;v(`slicc-input-card`,class extends HTMLElement{static observedAttributes=[`value`,`placeholder`,`suggestion`,`disabled`];#e;#t;#n;#r=!1;connectedCallback(){an(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`)??on}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(b(`slicc-add-menu`),b(`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.preventDefault(),this.#l();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){if(this.disabled)return;let t=this.#t.value;t.trim()!==``&&(this.removeAttribute(`suggestion`),this.dispatchEvent(new CustomEvent(`submit`,{bubbles:!0,composed:!0,detail:{value:t,...e?{source:e}:{}}})))}#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 sn=x(`
1793
+ `,ln=`slicc-input-card-style`;function un(e){if(e.getElementById(ln))return;let t=e.createElement(`style`);t.id=ln,t.textContent=cn,(e.head??e.documentElement).appendChild(t)}var dn=`Ask sliccy, or describe a change…`;v(`slicc-input-card`,class extends HTMLElement{static observedAttributes=[`value`,`placeholder`,`suggestion`,`disabled`];#e;#t;#n;#r=!1;connectedCallback(){un(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`)??dn}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(b(`slicc-add-menu`),b(`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.preventDefault(),this.#l();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){if(this.disabled)return;let t=this.#t.value;t.trim()!==``&&(this.removeAttribute(`suggestion`),this.dispatchEvent(new CustomEvent(`submit`,{bubbles:!0,composed:!0,detail:{value:t,...e?{source:e}:{}}})))}#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=x(`
1766
1794
  :host{display:block;font-family:var(--ui);}
1767
1795
  :host(:not([count])),:host([count="0"]),:host([count="-0"]){display:none;}
1768
1796
  .wrap{display:flex;flex-direction:column;align-items:stretch;gap:6px;}
@@ -1783,7 +1811,7 @@ slicc-input-card .toolbar slicc-add-menu {
1783
1811
  :host-context(body.dark) .dismiss:hover,:host-context(body.dark) .dismiss:focus-visible,
1784
1812
  :host-context(.dark) .dismiss:hover,:host-context(.dark) .dismiss:focus-visible,
1785
1813
  :host-context([data-theme="dark"]) .dismiss:hover,:host-context([data-theme="dark"]) .dismiss:focus-visible{background:color-mix(in srgb,#0a0a0a 14%,transparent);}
1786
- `),cn=[{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 cn[Math.min(e,cn.length-1)]??cn[0]}v(`slicc-queued-stack`,class extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[sn]}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,n,r){let{rot:i,x:a,y:o}=ln(t),c=n?`none`:`translate(${a}px, ${o}px) rotate(${i}deg)`,l=`card${n?` is-front`:``}${t===0?``:t===1?` is-back`:` is-deep`}`,u=n?`card front`:`card`,d=`transform:${c};z-index:${r};`,f=[b(`span`,{class:`bubble`},e.text)];if(e.attachments&&e.attachments>0&&f.push(b(`span`,{class:`attach`},`+${e.attachments}`)),n){let t=b(`button`,{type:`button`,class:`dismiss`,part:`dismiss`,"aria-label":`Remove queued message`},s(`x`,{size:14}));t.addEventListener(`click`,t=>{t.stopPropagation(),this.#n(e.id)}),f.push(t)}return b(`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 n=b(`div`,{class:`stack`,part:`stack`},...t),r=b(`div`,{class:`wrap`},b(`span`,{class:`badge`,part:`badge`},s(`clock`,{size:11}),`${e} queued`),n);this.#e.replaceChildren(r)}});var un=1e3;function dn(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 fn=x(`
1814
+ `),pn=[{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 mn(e){return pn[Math.min(e,pn.length-1)]??pn[0]}v(`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,n,r){let{rot:i,x:a,y:o}=mn(t),c=n?`none`:`translate(${a}px, ${o}px) rotate(${i}deg)`,l=`card${n?` is-front`:``}${t===0?``:t===1?` is-back`:` is-deep`}`,u=n?`card front`:`card`,d=`transform:${c};z-index:${r};`,f=[b(`span`,{class:`bubble`},e.text)];if(e.attachments&&e.attachments>0&&f.push(b(`span`,{class:`attach`},`+${e.attachments}`)),n){let t=b(`button`,{type:`button`,class:`dismiss`,part:`dismiss`,"aria-label":`Remove queued message`},s(`x`,{size:14}));t.addEventListener(`click`,t=>{t.stopPropagation(),this.#n(e.id)}),f.push(t)}return b(`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 n=b(`div`,{class:`stack`,part:`stack`},...t),r=b(`div`,{class:`wrap`},b(`span`,{class:`badge`,part:`badge`},s(`clock`,{size:11}),`${e} queued`),n);this.#e.replaceChildren(r)}});var hn=1e3;function gn(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 _n=x(`
1787
1815
  :host { display: inline-grid; }
1788
1816
  :host([hidden]) { display: none; }
1789
1817
 
@@ -1865,7 +1893,7 @@ slicc-input-card .toolbar slicc-add-menu {
1865
1893
 
1866
1894
  .glyph { display: grid; place-items: center; line-height: 1; }
1867
1895
  .glyph svg { display: block; }
1868
- `),pn=`square`,mn=18;v(`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=[fn]}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`)??pn}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,n=s(this.icon,{size:mn,part:`icon`}),r=t??this.itemId??`dock item`,i=b(`button`,{type:`button`,part:`button`,class:e.join(` `),"aria-label":r,"aria-pressed":this.active?`true`:`false`},b(`span`,{class:`glyph`,part:`glyph`},b(`slot`,null,n)),t?b(`span`,{class:`tip`,part:`tip`},t):null),a=this.hue;a&&i.style.setProperty(`--h`,a),this.#t?.destroy(),this.#t=dn(i,{onShortClick:this.#r,onLongPress:()=>this.#i(`longpress`)}),this.#e.replaceChildren(i)}#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`}],gn={id:`new`,icon:`plus`,label:`New sprinkle`,kind:`sprinkle`},_n=`
1896
+ `),vn=`square`,yn=18;v(`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=[_n]}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`)??vn}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,n=s(this.icon,{size:yn,part:`icon`}),r=t??this.itemId??`dock item`,i=b(`button`,{type:`button`,part:`button`,class:e.join(` `),"aria-label":r,"aria-pressed":this.active?`true`:`false`},b(`span`,{class:`glyph`,part:`glyph`},b(`slot`,null,n)),t?b(`span`,{class:`tip`,part:`tip`},t):null),a=this.hue;a&&i.style.setProperty(`--h`,a),this.#t?.destroy(),this.#t=gn(i,{onShortClick:this.#r,onLongPress:()=>this.#i(`longpress`)}),this.#e.replaceChildren(i)}#r=()=>{this.#i(this.active?`collapse`:`select`)};#i(e){this.dispatchEvent(new CustomEvent(e,{detail:{id:this.itemId},bubbles:!0,composed:!0}))}});var bn=[{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`}],xn={id:`new`,icon:`plus`,label:`New sprinkle`,kind:`sprinkle`},Sn=`
1869
1897
  .slicc-dock {
1870
1898
  flex: 0 0 48px;
1871
1899
  box-sizing: border-box;
@@ -1886,7 +1914,7 @@ slicc-input-card .toolbar slicc-add-menu {
1886
1914
  margin: 2px 0;
1887
1915
  }
1888
1916
  .slicc-dock .grow { flex: 1; }
1889
- `,vn=`slicc-dock-style`;function yn(e){if(e.getElementById(vn))return;let t=e.createElement(`style`);t.id=vn,t.textContent=_n,(e.head??e.documentElement).appendChild(t)}function bn(e){return e===`sprinkle`?`sprinkle`:`tool`}v(`slicc-dock`,class extends HTMLElement{static get observedAttributes(){return[`active`,`system-tools`]}#e=[];#t=null;#n=null;#r=null;#i=!1;connectedCallback(){yn(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=bn(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===gn.id?`sprinkle`:this.#e.find(t=>t.id===e)?.kind??`tool`}#s(e,t){let n=e.id,r=bn(e.kind),i=e.icon??``,a=e.label??n,o=t!=null&&t===n,s=e.hue;return b(`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)bn(n.kind)===`sprinkle`&&t.push(this.#s(n,e));if(t.push(this.#s(gn,e)),t.push(b(`div`,{class:`grow`})),this.systemTools){t.push(b(`div`,{class:`div`}));for(let n of hn)t.push(this.#s(n,e))}this.replaceChildren(),y(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 xn=x(`
1917
+ `,Cn=`slicc-dock-style`;function wn(e){if(e.getElementById(Cn))return;let t=e.createElement(`style`);t.id=Cn,t.textContent=Sn,(e.head??e.documentElement).appendChild(t)}function Tn(e){return e===`sprinkle`?`sprinkle`:`tool`}v(`slicc-dock`,class extends HTMLElement{static get observedAttributes(){return[`active`,`system-tools`]}#e=[];#t=null;#n=null;#r=null;#i=!1;connectedCallback(){wn(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=Tn(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 bn.some(t=>t.id===e)?`tool`:e===xn.id?`sprinkle`:this.#e.find(t=>t.id===e)?.kind??`tool`}#s(e,t){let n=e.id,r=Tn(e.kind),i=e.icon??``,a=e.label??n,o=t!=null&&t===n,s=e.hue;return b(`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)Tn(n.kind)===`sprinkle`&&t.push(this.#s(n,e));if(t.push(this.#s(xn,e)),t.push(b(`div`,{class:`grow`})),this.systemTools){t.push(b(`div`,{class:`div`}));for(let n of bn)t.push(this.#s(n,e))}this.replaceChildren(),y(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 En=x(`
1890
1918
  :host { display: none; }
1891
1919
  :host([open]) { display: block; }
1892
1920
  .overlay {
@@ -1963,7 +1991,7 @@ slicc-input-card .toolbar slicc-add-menu {
1963
1991
  color: rgba(255,255,255,.7); font-family: var(--ui); font-size: 14px;
1964
1992
  }
1965
1993
  @media (prefers-reduced-motion: reduce) { .overlay, .card { transition: none; } }
1966
- `),Sn=`Open tabs`;v(`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=[xn]}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`)??Sn}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=b(`button`,{class:`close`,part:`close`,type:`button`,"aria-label":`Close tabs overlay`},s(`x`,{size:18}));return e.addEventListener(`click`,()=>this.#u(`close-button`)),e}#o(e){let t=e.title??e.id,n=e.screenshot?b(`img`,{class:`shot`,part:`shot`,src:e.screenshot,alt:t,loading:`lazy`}):b(`div`,{class:`shot ph`,part:`shot`},s(`globe`,{size:28})),r=b(`button`,{class:`x`,part:`card-close`,type:`button`,"aria-label":`Close ${t}`},s(`x`,{size:14}));r.addEventListener(`click`,t=>{t.stopPropagation(),this.#l(`tab-close`,e.id)});let i=b(`div`,{class:`label`},b(`span`,{class:`name`,part:`title`},t),e.url?b(`span`,{class:`url`},e.url):null),a=b(`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},n,b(`div`,{class:`meta`},i,r));return a.addEventListener(`click`,()=>this.#l(`tab-activate`,e.id)),a.addEventListener(`keydown`,t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),this.#l(`tab-activate`,e.id))}),a}#s(){let e=b(`div`,{class:`bar`,part:`bar`},b(`span`,{class:`title`},this.heading),b(`span`,{class:`count`},String(this.#t.length)),b(`span`,{class:`grow`}),this.#a()),t;if(this.#t.length===0)t=b(`div`,{class:`empty`},`No open tabs.`);else{t=b(`div`,{class:`grid`,part:`grid`,role:`list`});for(let e of this.#t)t.appendChild(this.#o(e))}this.#n=b(`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 Cn=`#3b6cb2`,wn=`
1994
+ `),Dn=`Open tabs`;v(`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=[En]}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`)??Dn}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=b(`button`,{class:`close`,part:`close`,type:`button`,"aria-label":`Close tabs overlay`},s(`x`,{size:18}));return e.addEventListener(`click`,()=>this.#u(`close-button`)),e}#o(e){let t=e.title??e.id,n=e.screenshot?b(`img`,{class:`shot`,part:`shot`,src:e.screenshot,alt:t,loading:`lazy`}):b(`div`,{class:`shot ph`,part:`shot`},s(`globe`,{size:28})),r=b(`button`,{class:`x`,part:`card-close`,type:`button`,"aria-label":`Close ${t}`},s(`x`,{size:14}));r.addEventListener(`click`,t=>{t.stopPropagation(),this.#l(`tab-close`,e.id)});let i=b(`div`,{class:`label`},b(`span`,{class:`name`,part:`title`},t),e.url?b(`span`,{class:`url`},e.url):null),a=b(`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},n,b(`div`,{class:`meta`},i,r));return a.addEventListener(`click`,()=>this.#l(`tab-activate`,e.id)),a.addEventListener(`keydown`,t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),this.#l(`tab-activate`,e.id))}),a}#s(){let e=b(`div`,{class:`bar`,part:`bar`},b(`span`,{class:`title`},this.heading),b(`span`,{class:`count`},String(this.#t.length)),b(`span`,{class:`grow`}),this.#a()),t;if(this.#t.length===0)t=b(`div`,{class:`empty`},`No open tabs.`);else{t=b(`div`,{class:`grid`,part:`grid`,role:`list`});for(let e of this.#t)t.appendChild(this.#o(e))}this.#n=b(`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 On=`#3b6cb2`,kn=`
1967
1995
  .slicc-freezer {
1968
1996
  position: fixed;
1969
1997
  left: 0;
@@ -2047,12 +2075,12 @@ slicc-input-card .toolbar slicc-add-menu {
2047
2075
 
2048
2076
  /* ice-blue accent while a freezer context is active (prototype _ctxAccent) —
2049
2077
  tints the toggle + the new-chat icon; cards keep their snow palette. */
2050
- .slicc-freezer[ctx] .fztgl { color: var(--fz-ctx, ${Cn}); border-color: color-mix(in srgb, var(--fz-ctx, ${Cn}) 40%, var(--line)); }
2078
+ .slicc-freezer[ctx] .fztgl { color: var(--fz-ctx, ${On}); border-color: color-mix(in srgb, var(--fz-ctx, ${On}) 40%, var(--line)); }
2051
2079
  .slicc-freezer[ctx] ::part(new-icon),
2052
2080
  .slicc-freezer[ctx] slicc-freezer-new::part(new-icon) {
2053
- background: color-mix(in srgb, var(--fz-ctx, ${Cn}) 14%, var(--canvas));
2054
- border-color: color-mix(in srgb, var(--fz-ctx, ${Cn}) 40%, var(--line));
2055
- color: var(--fz-ctx, ${Cn});
2081
+ background: color-mix(in srgb, var(--fz-ctx, ${On}) 14%, var(--canvas));
2082
+ border-color: color-mix(in srgb, var(--fz-ctx, ${On}) 40%, var(--line));
2083
+ color: var(--fz-ctx, ${On});
2056
2084
  }
2057
2085
 
2058
2086
  /* match-hidden: search filtered a session row out (only meaningful when open,
@@ -2060,7 +2088,7 @@ slicc-input-card .toolbar slicc-add-menu {
2060
2088
  prototype .fzcard row. */
2061
2089
  .slicc-freezer[open] slicc-freezer-card.match-hidden,
2062
2090
  .slicc-freezer[open] .fzcard.match-hidden { display: none; }
2063
- `,Tn=`slicc-freezer-style`;function En(e){if(e.getElementById(Tn))return;let t=e.createElement(`style`);t.id=Tn,t.textContent=wn,(e.head??e.documentElement).appendChild(t)}var Dn=`http://www.w3.org/2000/svg`;function On(){let e=document.createElementNS(Dn,`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(Dn,`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(Dn,`line`);for(let[e,t]of[[`x1`,`6`],[`y1`,`3.5`],[`x2`,`6`],[`y2`,`12.5`]])n.setAttribute(e,t);let r=document.createElementNS(Dn,`polyline`);return r.setAttribute(`points`,`9,6.5 10.5,8 9,9.5`),e.append(t,n,r),e}v(`slicc-freezer`,class extends HTMLElement{static observedAttributes=[`open`,`ctx`,`search-placeholder`];#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){En(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(On());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 kn=14,An=x(`
2091
+ `,An=`slicc-freezer-style`;function jn(e){if(e.getElementById(An))return;let t=e.createElement(`style`);t.id=An,t.textContent=kn,(e.head??e.documentElement).appendChild(t)}var Mn=`http://www.w3.org/2000/svg`;function Nn(){let e=document.createElementNS(Mn,`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(Mn,`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(Mn,`line`);for(let[e,t]of[[`x1`,`6`],[`y1`,`3.5`],[`x2`,`6`],[`y2`,`12.5`]])n.setAttribute(e,t);let r=document.createElementNS(Mn,`polyline`);return r.setAttribute(`points`,`9,6.5 10.5,8 9,9.5`),e.append(t,n,r),e}v(`slicc-freezer`,class extends HTMLElement{static observedAttributes=[`open`,`ctx`,`search-placeholder`];#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){jn(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(Nn());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 Pn=14,Fn=x(`
2064
2092
  :host {
2065
2093
  display: inline-grid;
2066
2094
  place-items: center;
@@ -2096,7 +2124,7 @@ slicc-input-card .toolbar slicc-add-menu {
2096
2124
  nothing is slotted */
2097
2125
  ::slotted(*), .ic { line-height: 1; }
2098
2126
  .ic { display: block; }
2099
- `);v(`slicc-snowflake`,class extends HTMLElement{static observedAttributes=[`thawed`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[An];let e=b(`span`,{class:`snow`,part:`badge`},b(`slot`,null,s(`snowflake`,{size:kn,part:`glyph`,class:`ic`})));this.#e.replaceChildren(e)}get thawed(){return this.hasAttribute(`thawed`)}set thawed(e){this.toggleAttribute(`thawed`,e)}});var jn=`
2127
+ `);v(`slicc-snowflake`,class extends HTMLElement{static observedAttributes=[`thawed`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Fn];let e=b(`span`,{class:`snow`,part:`badge`},b(`slot`,null,s(`snowflake`,{size:Pn,part:`glyph`,class:`ic`})));this.#e.replaceChildren(e)}get thawed(){return this.hasAttribute(`thawed`)}set thawed(e){this.toggleAttribute(`thawed`,e)}});var In=`
2100
2128
  slicc-freezer-card {
2101
2129
  position: relative;
2102
2130
  display: flex;
@@ -2189,7 +2217,7 @@ slicc-freezer-card .slicc-fzcard__meta {
2189
2217
  slicc-freezer-card[thawed] {
2190
2218
  background: color-mix(in srgb, var(--rose) 12%, transparent);
2191
2219
  }
2192
- `,Mn=`slicc-freezer-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=1400,Fn=14;v(`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(){Nn(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=Pn){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=b(`div`,{class:`slicc-fzcard__title`,part:`title`}),this.#r=b(`div`,{class:`slicc-fzcard__meta`,part:`meta`}),this.#t=b(`div`,{class:`slicc-fzcard__text`,part:`text`},this.#n,this.#r);for(let e of t)this.#n.appendChild(e);this.#i=b(`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=s(e,{size:Fn,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 In=`square-pen`,Ln=`loader-circle`,Rn=16,zn=`New chat`,Bn=350,Vn=[[`save`,`archive`,`Save & start new`],[`skip`,`fast-forward`,`New chat — skip memory`],[`erase`,`trash-2`,`Erase & start new`]],Hn=x(`
2220
+ `,Ln=`slicc-freezer-card-style`;function Rn(e){if(e.getElementById(Ln))return;let t=e.createElement(`style`);t.id=Ln,t.textContent=In,(e.head??e.documentElement).appendChild(t)}var zn=1400,Bn=14;v(`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(){Rn(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=zn){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=b(`div`,{class:`slicc-fzcard__title`,part:`title`}),this.#r=b(`div`,{class:`slicc-fzcard__meta`,part:`meta`}),this.#t=b(`div`,{class:`slicc-fzcard__text`,part:`text`},this.#n,this.#r);for(let e of t)this.#n.appendChild(e);this.#i=b(`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=s(e,{size:Bn,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 Vn=`square-pen`,Hn=`loader-circle`,Un=16,Wn=`New chat`,Gn=350,Kn=[[`save`,`archive`,`Save & start new`],[`skip`,`fast-forward`,`New chat — skip memory`],[`erase`,`trash-2`,`Erase & start new`]],qn=x(`
2193
2221
  :host { display: block; }
2194
2222
  :host([hidden]) { display: none; }
2195
2223
  *{ box-sizing: border-box; }
@@ -2334,19 +2362,19 @@ slicc-freezer-card[thawed] {
2334
2362
  .fznew, .nlbl { transition: none; }
2335
2363
  .fznew-spinner svg { animation: none; }
2336
2364
  }
2337
- `);v(`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=[Hn]}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`)??zn}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,n=t&&this.hasAttribute(`progress`),r=b(`span`,{class:`nico`,part:`badge`},t?b(`span`,{class:`fznew-spinner`,part:`spinner`},n?b(`span`,{class:`fznew-ring`,part:`ring`,style:`--fznew-progress:${this.progress??0}`}):null,s(Ln,{size:Rn,part:`icon`})):b(`slot`,{name:`icon`},s(In,{size:Rn,part:`icon`}))),i=b(`span`,{class:`nlbl`,part:`label`},b(`slot`,null,e)),a=b(`button`,{class:`fznew`,part:`button`,type:`button`,"aria-label":e,title:e,"aria-busy":t?`true`:void 0},r,i);this.#t=a,this.#s(a),this.#e.replaceChildren(a,this.#o())}#o(){let e=b(`div`,{class:`fznew-options`,part:`options`});for(let[t,n,r]of Vn){let i=b(`button`,{class:`fznew-opt fznew-opt--${t}`,part:`option-${t}`,type:`button`},s(n,{size:13}),b(`span`,{class:`fznew-opt__text`},r));i.addEventListener(`click`,()=>this.#l(t)),e.appendChild(i)}return e}#s(e){this.#n?.destroy(),this.#c(),this.#n=dn(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`)},Bn)}})}#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 Un=`attribute vec2 a_pos; void main(){ gl_Position = vec4(a_pos,0.0,1.0); }`,Wn=`precision highp float;
2365
+ `);v(`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=[qn]}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`)??Wn}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,n=t&&this.hasAttribute(`progress`),r=b(`span`,{class:`nico`,part:`badge`},t?b(`span`,{class:`fznew-spinner`,part:`spinner`},n?b(`span`,{class:`fznew-ring`,part:`ring`,style:`--fznew-progress:${this.progress??0}`}):null,s(Hn,{size:Un,part:`icon`})):b(`slot`,{name:`icon`},s(Vn,{size:Un,part:`icon`}))),i=b(`span`,{class:`nlbl`,part:`label`},b(`slot`,null,e)),a=b(`button`,{class:`fznew`,part:`button`,type:`button`,"aria-label":e,title:e,"aria-busy":t?`true`:void 0},r,i);this.#t=a,this.#s(a),this.#e.replaceChildren(a,this.#o())}#o(){let e=b(`div`,{class:`fznew-options`,part:`options`});for(let[t,n,r]of Kn){let i=b(`button`,{class:`fznew-opt fznew-opt--${t}`,part:`option-${t}`,type:`button`},s(n,{size:13}),b(`span`,{class:`fznew-opt__text`},r));i.addEventListener(`click`,()=>this.#l(t)),e.appendChild(i)}return e}#s(e){this.#n?.destroy(),this.#c(),this.#n=gn(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`)},Gn)}})}#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 Jn=`attribute vec2 a_pos; void main(){ gl_Position = vec4(a_pos,0.0,1.0); }`,Yn=`precision highp float;
2338
2366
  uniform vec2 u_res; uniform float u_time; uniform float u_energy;
2339
2367
  uniform vec2 u_center; uniform vec3 u_evt; uniform float u_freeze; uniform float u_dark;
2340
2368
  uniform float u_density; uniform float u_falloff; uniform float u_life;
2341
2369
  uniform float u_blink; uniform float u_thick; uniform vec3 u_tint; uniform float u_scroll;
2342
2370
  uniform float u_brightness; uniform float u_contrast; uniform float u_noise; uniform float u_blur;
2343
- vec3 themeBg(){ return mix(vec3(0.97,0.95,0.89), vec3(0.09,0.08,0.06), u_dark); }`,Gn=`
2371
+ vec3 themeBg(){ return mix(vec3(0.97,0.95,0.89), vec3(0.09,0.08,0.06), u_dark); }`,Xn=`
2344
2372
  float hash21(vec2 p){ p=fract(p*vec2(123.34,456.21)); p+=dot(p,p+45.32); return fract(p.x*p.y); }
2345
2373
  float vnoise(vec2 p){ vec2 i=floor(p),f=fract(p);
2346
2374
  float a=hash21(i),b=hash21(i+vec2(1.,0.)),c=hash21(i+vec2(0.,1.)),d=hash21(i+vec2(1.,1.));
2347
2375
  vec2 u=f*f*(3.-2.*f); return mix(mix(a,b,u.x),mix(c,d,u.x),u.y); }
2348
2376
  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; }
2349
- 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); }`,Kn={cone:`${Wn}${Gn}
2377
+ 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); }`,Zn={cone:`${Yn}${Xn}
2350
2378
  float cellCycle(vec2 q){ float s=hash21(q+11.7);
2351
2379
  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); }
2352
2380
  void main(){
@@ -2394,7 +2422,7 @@ void main(){
2394
2422
  col*=u_brightness;
2395
2423
  col=clamp(col,0.0,1.0);
2396
2424
  gl_FragColor=vec4(col,1.0);
2397
- }`,scoop:`${Wn}${Gn}
2425
+ }`,scoop:`${Yn}${Xn}
2398
2426
  vec3 pal(float t){ vec3 strawberry=vec3(1.0,0.45,0.62); vec3 vanilla=vec3(1.0,0.95,0.82);
2399
2427
  vec3 pistachio=vec3(0.60,0.86,0.52);
2400
2428
  vec3 col=mix(strawberry,vanilla,smoothstep(0.0,0.5,t)); col=mix(col,pistachio,smoothstep(0.5,1.0,t)); return col; }
@@ -2413,7 +2441,7 @@ void main(){
2413
2441
  ice*=0.95+0.08*sin(u_time*0.4); float mask=smoothstep(0.62,0.0,r);
2414
2442
  vec3 col=mix(bg,ice,clamp(mask,0.0,1.0)*0.80); col+=ice*mask*hl*0.12;
2415
2443
  gl_FragColor=vec4(col,1.0);
2416
- }`,freezer:`${Wn}${Gn}
2444
+ }`,freezer:`${Yn}${Xn}
2417
2445
  /* Inside-of-a-freezer ground: icy WHITE in light mode (never the warm theme
2418
2446
  canvas — blue-on-beige read as sand, not frost), cold blue-black in dark. */
2419
2447
  vec3 freezerBg(){ return mix(vec3(0.965,0.98,1.0), vec3(0.05,0.08,0.13), u_dark); }
@@ -2440,12 +2468,12 @@ void main(){
2440
2468
  deviation budget the cone lattice uses (strokes at 0.20 toward tint). */
2441
2469
  col=mix(freezerBg(),col,0.22);
2442
2470
  gl_FragColor=vec4(col,1.0);
2443
- }`},qn=new Set([`cone`,`scoop`,`freezer`]),Jn={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%)`},Yn=x(`
2471
+ }`},Qn=new Set([`cone`,`scoop`,`freezer`]),$n={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%)`},er=x(`
2444
2472
  :host { position: relative; display: block; pointer-events: none; }
2445
2473
  .canvas, .fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
2446
2474
  .fallback { display: none; }
2447
2475
  :host([no-webgl]) .canvas { display: none; }
2448
- :host([no-webgl]) .fallback { display: block; }`),Xn=2,Zn=.35,Qn=[`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 $n(e,t,n,r){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):r}function er(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 tr=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=null;#m=null;#h=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Yn];let e=b(`canvas`,{class:`canvas`,part:`canvas`}),t=b(`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.#g(),!this.#x()){this.setAttribute(`no-webgl`,``);return}this.removeAttribute(`no-webgl`),typeof ResizeObserver<`u`&&(this.#d=new ResizeObserver(()=>this.#_()),this.#d.observe(this)),this.#l=performance.now()/1e3,this.#f?this.#D():this.#O()}disconnectedCallback(){this.#k(),this.#d?.disconnect(),this.#d=null,this.#A()}attributeChangedCallback(e){if(this.isConnected){if(e===`mode`&&this.#n&&this.mode!==this.#p&&this.#b()){this.#D(),this.#g();return}this.#g(),this.#_()}}get mode(){let e=this.getAttribute(`mode`);return e&&qn.has(e)?e:`cone`}set mode(e){this.setAttribute(`mode`,e)}get coverage(){return $n(Number.parseFloat(this.getAttribute(`coverage`)??``),0,1,.66)}set coverage(e){this.setAttribute(`coverage`,String(e))}get intensity(){return $n(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 $n(Number.parseFloat(this.getAttribute(`brightness`)??``),.5,1.5,1.2)}set brightness(e){this.setAttribute(`brightness`,String(e))}get contrast(){return $n(Number.parseFloat(this.getAttribute(`contrast`)??``),.5,2,.75)}set contrast(e){this.setAttribute(`contrast`,String(e))}get noise(){return $n(Number.parseFloat(this.getAttribute(`noise`)??``),0,.3,.04)}set noise(e){this.setAttribute(`noise`,String(e))}get blurAmount(){return $n(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.#D()}#g(){let e=this.#e.querySelector(`.fallback`);e&&(e.style.background=Jn[this.mode])}#_(){this.#f&&this.#n&&this.#D()}#v(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}#y(e){let t=this.#n;if(!t)return null;let n=this.#v(t,t.VERTEX_SHADER,Un),r=this.#v(t,t.FRAGMENT_SHADER,Kn[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 Qn)o[e]=t.getUniformLocation(i,e);return{program:i,vs:n,fs:r,aPos:a,loc:o}}#b(){let e=this.#n;if(!e)return!1;let t=this.mode,n=this.#i[t];if(!n){let e=this.#y(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.#p=t,!0}#x(){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.#C(e),this.#S()):!1}#S(){let e=this.#n;if(!e)return!1;if(!this.#b())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)}#C(e){this.#w(e),this.#m=e=>{e.preventDefault(),this.#k(),this.#i={},this.#r=null,this.#p=null,this.#o={},this.#a=null},this.#h=()=>{!this.isConnected||!this.#n||(this.#i={},this.#S()&&(this.#l=performance.now()/1e3,this.#f?this.#D():this.#O()))},e.addEventListener(`webglcontextlost`,this.#m,!1),e.addEventListener(`webglcontextrestored`,this.#h,!1)}#w(e){this.#m&&e.removeEventListener(`webglcontextlost`,this.#m),this.#h&&e.removeEventListener(`webglcontextrestored`,this.#h),this.#m=null,this.#h=null}#T(){let e=this.#t;if(!e)return;let t=Math.min(Xn,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)}#E(){if(typeof getComputedStyle!=`function`)return 0;let e=getComputedStyle(this).getPropertyValue(`--ink`).trim();if(!e)return 0;let[t,n,r]=er(e,[0,0,0]);return+(.2126*t+.7152*n+.0722*r>.5)}#D(){let e=this.#n,t=this.#t,n=this.#r;if(!e||!t||!n||!this.#a)return;this.#T();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.#E(),l=er(this.getAttribute(`tint`)??``,[.545,.361,.965]),u=er(this.getAttribute(`tint`)??``,[.957,.247,.369]);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,$n(this.coverage*this.intensity,0,1,.66)*2.2),e.uniform1f(d.u_dark??null,c),e.uniform1f(d.u_scroll??null,this.scrollOffset*Zn/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)}#O(){if(this.#c)return;let e=()=>{this.#D(),this.#c=requestAnimationFrame(e)};this.#c=requestAnimationFrame(e)}#k(){this.#c&&cancelAnimationFrame(this.#c),this.#c=0}#A(){let e=this.#n,t=this.#t;if(t&&this.#w(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.#p=null}};v(`slicc-shader`,tr),v(`slicc-frost-shader`,class extends tr{connectedCallback(){this.getAttribute(`mode`)!==`freezer`&&this.setAttribute(`mode`,`freezer`),super.connectedCallback()}});var nr=[`top-left`,`top-right`,`bottom-left`,`bottom-right`,`top`,`right`,`bottom`,`left`],rr=`top-right`,ir=`slicc-launcher-corner`,ar=[`disconnected`,`connected`,`error`],or=`disconnected`,N=`follower-status`,sr=new Set(nr),cr=new Set(ar);function lr(e,t=rr){return e&&sr.has(e)?e:t}function ur(e,t=or){return e&&cr.has(e)?e:t}function dr(e,t){return e>=6||e>=12&&t>=.6}function fr({clientX:e,clientY:t,viewportWidth:n,viewportHeight:r,velocityXPxPerMs:i=0,velocityYPxPerMs:a=0,flickProjectionMs:o=180}){let s=pr(e+i*o,0,n),c=pr(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 pr(e,t,n){return Math.min(Math.max(e,t),n)}var mr=`<?xml version="1.0" encoding="UTF-8"?>
2476
+ :host([no-webgl]) .fallback { display: block; }`),tr=2,nr=.35,rr=[`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 ir(e,t,n,r){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):r}function ar(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 or=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=null;#m=null;#h=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[er];let e=b(`canvas`,{class:`canvas`,part:`canvas`}),t=b(`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.#g(),!this.#x()){this.setAttribute(`no-webgl`,``);return}this.removeAttribute(`no-webgl`),typeof ResizeObserver<`u`&&(this.#d=new ResizeObserver(()=>this.#_()),this.#d.observe(this)),this.#l=performance.now()/1e3,this.#f?this.#D():this.#O()}disconnectedCallback(){this.#k(),this.#d?.disconnect(),this.#d=null,this.#A()}attributeChangedCallback(e){if(this.isConnected){if(e===`mode`&&this.#n&&this.mode!==this.#p&&this.#b()){this.#D(),this.#g();return}this.#g(),this.#_()}}get mode(){let e=this.getAttribute(`mode`);return e&&Qn.has(e)?e:`cone`}set mode(e){this.setAttribute(`mode`,e)}get coverage(){return ir(Number.parseFloat(this.getAttribute(`coverage`)??``),0,1,.66)}set coverage(e){this.setAttribute(`coverage`,String(e))}get intensity(){return ir(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 ir(Number.parseFloat(this.getAttribute(`brightness`)??``),.5,1.5,1.2)}set brightness(e){this.setAttribute(`brightness`,String(e))}get contrast(){return ir(Number.parseFloat(this.getAttribute(`contrast`)??``),.5,2,.75)}set contrast(e){this.setAttribute(`contrast`,String(e))}get noise(){return ir(Number.parseFloat(this.getAttribute(`noise`)??``),0,.3,.04)}set noise(e){this.setAttribute(`noise`,String(e))}get blurAmount(){return ir(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.#D()}#g(){let e=this.#e.querySelector(`.fallback`);e&&(e.style.background=$n[this.mode])}#_(){this.#f&&this.#n&&this.#D()}#v(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}#y(e){let t=this.#n;if(!t)return null;let n=this.#v(t,t.VERTEX_SHADER,Jn),r=this.#v(t,t.FRAGMENT_SHADER,Zn[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 rr)o[e]=t.getUniformLocation(i,e);return{program:i,vs:n,fs:r,aPos:a,loc:o}}#b(){let e=this.#n;if(!e)return!1;let t=this.mode,n=this.#i[t];if(!n){let e=this.#y(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.#p=t,!0}#x(){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.#C(e),this.#S()):!1}#S(){let e=this.#n;if(!e)return!1;if(!this.#b())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)}#C(e){this.#w(e),this.#m=e=>{e.preventDefault(),this.#k(),this.#i={},this.#r=null,this.#p=null,this.#o={},this.#a=null},this.#h=()=>{!this.isConnected||!this.#n||(this.#i={},this.#S()&&(this.#l=performance.now()/1e3,this.#f?this.#D():this.#O()))},e.addEventListener(`webglcontextlost`,this.#m,!1),e.addEventListener(`webglcontextrestored`,this.#h,!1)}#w(e){this.#m&&e.removeEventListener(`webglcontextlost`,this.#m),this.#h&&e.removeEventListener(`webglcontextrestored`,this.#h),this.#m=null,this.#h=null}#T(){let e=this.#t;if(!e)return;let t=Math.min(tr,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)}#E(){if(typeof getComputedStyle!=`function`)return 0;let e=getComputedStyle(this).getPropertyValue(`--ink`).trim();if(!e)return 0;let[t,n,r]=ar(e,[0,0,0]);return+(.2126*t+.7152*n+.0722*r>.5)}#D(){let e=this.#n,t=this.#t,n=this.#r;if(!e||!t||!n||!this.#a)return;this.#T();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.#E(),l=ar(this.getAttribute(`tint`)??``,[.545,.361,.965]),u=ar(this.getAttribute(`tint`)??``,[.957,.247,.369]);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,ir(this.coverage*this.intensity,0,1,.66)*2.2),e.uniform1f(d.u_dark??null,c),e.uniform1f(d.u_scroll??null,this.scrollOffset*nr/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)}#O(){if(this.#c)return;let e=()=>{this.#D(),this.#c=requestAnimationFrame(e)};this.#c=requestAnimationFrame(e)}#k(){this.#c&&cancelAnimationFrame(this.#c),this.#c=0}#A(){let e=this.#n,t=this.#t;if(t&&this.#w(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.#p=null}};v(`slicc-shader`,or),v(`slicc-frost-shader`,class extends or{connectedCallback(){this.getAttribute(`mode`)!==`freezer`&&this.setAttribute(`mode`,`freezer`),super.connectedCallback()}});var sr=[`top-left`,`top-right`,`bottom-left`,`bottom-right`,`top`,`right`,`bottom`,`left`],cr=`top-right`,lr=`slicc-launcher-corner`,ur=[`disconnected`,`connected`,`error`],dr=`disconnected`,P=`follower-status`,fr=new Set(sr),pr=new Set(ur);function mr(e,t=cr){return e&&fr.has(e)?e:t}function hr(e,t=dr){return e&&pr.has(e)?e:t}function gr(e,t){return e>=6||e>=12&&t>=.6}function _r({clientX:e,clientY:t,viewportWidth:n,viewportHeight:r,velocityXPxPerMs:i=0,velocityYPxPerMs:a=0,flickProjectionMs:o=180}){let s=vr(e+i*o,0,n),c=vr(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 vr(e,t,n){return Math.min(Math.max(e,t),n)}var yr=`<?xml version="1.0" encoding="UTF-8"?>
2449
2477
  <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">
2450
2478
  <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>
2451
2479
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -2472,7 +2500,7 @@ void main(){
2472
2500
  <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>
2473
2501
 
2474
2502
  </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>
2475
- `,hr=`<?xml version="1.0" encoding="UTF-8"?>
2503
+ `,br=`<?xml version="1.0" encoding="UTF-8"?>
2476
2504
  <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">
2477
2505
  <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>
2478
2506
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -2499,7 +2527,7 @@ void main(){
2499
2527
  <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>
2500
2528
 
2501
2529
  </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>
2502
- `,gr=`<?xml version="1.0" encoding="UTF-8"?>
2530
+ `,xr=`<?xml version="1.0" encoding="UTF-8"?>
2503
2531
  <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">
2504
2532
  <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;"/>
2505
2533
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -2525,7 +2553,7 @@ void main(){
2525
2553
  </g><g id="Left_Eye" data-name="Left Eye">
2526
2554
  <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;"/>
2527
2555
  <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);"/>
2528
- </g></g></g></svg>`,_r=`<?xml version="1.0" encoding="UTF-8"?>
2556
+ </g></g></g></svg>`,Sr=`<?xml version="1.0" encoding="UTF-8"?>
2529
2557
  <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">
2530
2558
  <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;"/>
2531
2559
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -2551,7 +2579,7 @@ void main(){
2551
2579
  </g><g id="Left_Eye" data-name="Left Eye">
2552
2580
  <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;"/>
2553
2581
  <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);"/>
2554
- </g></g></g></svg>`,vr=`<?xml version="1.0" encoding="UTF-8"?>
2582
+ </g></g></g></svg>`,Cr=`<?xml version="1.0" encoding="UTF-8"?>
2555
2583
  <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">
2556
2584
  <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;"/>
2557
2585
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -2577,7 +2605,7 @@ void main(){
2577
2605
  </g><g id="Left_Eye" data-name="Left Eye">
2578
2606
  <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;"/>
2579
2607
  <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);"/>
2580
- </g></g></g></svg>`,yr=`<?xml version="1.0" encoding="UTF-8"?>
2608
+ </g></g></g></svg>`,wr=`<?xml version="1.0" encoding="UTF-8"?>
2581
2609
  <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">
2582
2610
  <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;"/>
2583
2611
  <g id="Waffle_Cross-Hatch" data-name="Waffle Cross-Hatch">
@@ -2603,7 +2631,7 @@ void main(){
2603
2631
  </g><g id="Left_Eye" data-name="Left Eye">
2604
2632
  <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;"/>
2605
2633
  <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);"/>
2606
- </g></g></g></svg>`,br=x(`
2634
+ </g></g></g></svg>`,Tr=x(`
2607
2635
  :host {
2608
2636
  all: initial;
2609
2637
  position: fixed;
@@ -2660,10 +2688,10 @@ void main(){
2660
2688
  .logo-icon { width: 32px; height: 32px; display: block; }
2661
2689
  .logo-icon svg { width: 100%; height: 100%; display: block; }
2662
2690
  .logo-state { display: none; }
2663
- :host(:not([${N}])) .logo-state-disconnected,
2664
- :host([${N}="disconnected"]) .logo-state-disconnected,
2665
- :host([${N}="connected"]) .logo-state-connected,
2666
- :host([${N}="error"]) .logo-state-error { display: contents; }
2691
+ :host(:not([${P}])) .logo-state-disconnected,
2692
+ :host([${P}="disconnected"]) .logo-state-disconnected,
2693
+ :host([${P}="connected"]) .logo-state-connected,
2694
+ :host([${P}="error"]) .logo-state-error { display: contents; }
2667
2695
  .logo-for-dark { display: block; }
2668
2696
  .logo-for-light { display: none; }
2669
2697
  @media (prefers-color-scheme: light) {
@@ -2766,7 +2794,7 @@ void main(){
2766
2794
  @media (prefers-reduced-motion: reduce) {
2767
2795
  .launcher, .sidebar, .backdrop { transition: none; }
2768
2796
  }
2769
- `);function xr(e){let t=e.replace(/<\?xml[^?]*\?>\s*/i,``),n=new DOMParser().parseFromString(t,`image/svg+xml`);return document.importNode(n.documentElement,!0)}var Sr=[{state:`disconnected`,darkSvg:gr,lightSvg:vr},{state:`connected`,darkSvg:_r,lightSvg:yr},{state:`error`,darkSvg:mr,lightSvg:hr}];function Cr(){let e=b(`span`,{class:`logo`,part:`logo`});for(let{state:t,darkSvg:n,lightSvg:r}of Sr){let i=b(`div`,{class:`logo-icon logo-for-dark`});i.appendChild(xr(n));let a=b(`div`,{class:`logo-icon logo-for-light`});a.appendChild(xr(r));let o=b(`span`,{class:`logo-state logo-state-${t}`,"aria-hidden":`true`},i,a);e.appendChild(o)}return e}function wr(e,t,n){return Math.min(Math.max(e,t),n)}function Tr(e){try{return lr(e?.localStorage.getItem(ir))}catch{return rr}}function Er(e,t){try{e?.localStorage.setItem(ir,t)}catch{}}v(`slicc-launcher`,class extends HTMLElement{static observedAttributes=[`open`,`corner`,`app-url`,N];#e;#t;#n;#r;#i;#a;#o=``;#s=null;#c=!1;#l=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[br],this.#u()}connectedCallback(){if(!this.hasAttribute(`corner`)){let e=Tr(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`&&Er(this.ownerDocument.defaultView,this.corner),e===`follower-status`)){let e=this.getAttribute(N);if(e!==null){let t=ur(e);t!==e&&(this.#l=!0,this.setAttribute(N,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 lr(this.getAttribute(`corner`))}set corner(e){let t=lr(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 ur(this.getAttribute(N))}set followerStatus(e){if(e==null){this.removeAttribute(N);return}let t=ur(e);this.getAttribute(`follower-status`)!==t&&this.setAttribute(N,t)}show(){this.open=!0}hide(){this.open=!1}toggle(){this.open=!this.open}#u(){this.#t=b(`button`,{class:`launcher`,part:`launcher`,type:`button`,"aria-label":`Toggle SLICC`},Cr(),b(`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=b(`div`,{class:`backdrop`,part:`backdrop`}),this.#n.addEventListener(`click`,()=>this.hide()),this.#i=b(`iframe`,{title:`SLICC overlay`}),this.#a=b(`div`,{class:`empty`},`Set the app-url attribute to load SLICC.`);let e=b(`div`,{class:`viewport`},this.#i,this.#a);this.#r=b(`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&&dr(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=wr(t.startLeft+n,18,c),d=wr(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||dr(r,i))){let t=fr({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=``}});var Dr=new Set([`user`,`feedback`,`project`]),Or={user:{hue:`--rose`,label:`user`},feedback:{hue:`--cyan`,label:`feedback`},project:{hue:`--violet`,label:`project`}};function kr(e){return e===`feedback`||e===`project`?e:`user`}var Ar=x(`
2797
+ `);function Er(e){let t=e.replace(/<\?xml[^?]*\?>\s*/i,``),n=new DOMParser().parseFromString(t,`image/svg+xml`);return document.importNode(n.documentElement,!0)}var Dr=[{state:`disconnected`,darkSvg:xr,lightSvg:Cr},{state:`connected`,darkSvg:Sr,lightSvg:wr},{state:`error`,darkSvg:yr,lightSvg:br}];function Or(){let e=b(`span`,{class:`logo`,part:`logo`});for(let{state:t,darkSvg:n,lightSvg:r}of Dr){let i=b(`div`,{class:`logo-icon logo-for-dark`});i.appendChild(Er(n));let a=b(`div`,{class:`logo-icon logo-for-light`});a.appendChild(Er(r));let o=b(`span`,{class:`logo-state logo-state-${t}`,"aria-hidden":`true`},i,a);e.appendChild(o)}return e}function kr(e,t,n){return Math.min(Math.max(e,t),n)}function Ar(e){try{return mr(e?.localStorage.getItem(lr))}catch{return cr}}function jr(e,t){try{e?.localStorage.setItem(lr,t)}catch{}}v(`slicc-launcher`,class extends HTMLElement{static observedAttributes=[`open`,`corner`,`app-url`,P];#e;#t;#n;#r;#i;#a;#o=``;#s=null;#c=!1;#l=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Tr],this.#u()}connectedCallback(){if(!this.hasAttribute(`corner`)){let e=Ar(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`&&jr(this.ownerDocument.defaultView,this.corner),e===`follower-status`)){let e=this.getAttribute(P);if(e!==null){let t=hr(e);t!==e&&(this.#l=!0,this.setAttribute(P,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 mr(this.getAttribute(`corner`))}set corner(e){let t=mr(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 hr(this.getAttribute(P))}set followerStatus(e){if(e==null){this.removeAttribute(P);return}let t=hr(e);this.getAttribute(`follower-status`)!==t&&this.setAttribute(P,t)}show(){this.open=!0}hide(){this.open=!1}toggle(){this.open=!this.open}#u(){this.#t=b(`button`,{class:`launcher`,part:`launcher`,type:`button`,"aria-label":`Toggle SLICC`},Or(),b(`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=b(`div`,{class:`backdrop`,part:`backdrop`}),this.#n.addEventListener(`click`,()=>this.hide()),this.#i=b(`iframe`,{title:`SLICC overlay`}),this.#a=b(`div`,{class:`empty`},`Set the app-url attribute to load SLICC.`);let e=b(`div`,{class:`viewport`},this.#i,this.#a);this.#r=b(`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&&gr(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=kr(t.startLeft+n,18,c),d=kr(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||gr(r,i))){let t=_r({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=``}});var Mr=new Set([`user`,`feedback`,`project`]),Nr={user:{hue:`--rose`,label:`user`},feedback:{hue:`--cyan`,label:`feedback`},project:{hue:`--violet`,label:`project`}};function Pr(e){return e===`feedback`||e===`project`?e:`user`}var Fr=x(`
2770
2798
  :host {
2771
2799
  display: inline-flex;
2772
2800
  vertical-align: middle;
@@ -2788,13 +2816,13 @@ void main(){
2788
2816
  background: color-mix(in srgb, var(--mtag-hue, var(--rose)) var(--mtag-fill), var(--canvas));
2789
2817
  border: 1px solid color-mix(in srgb, var(--mtag-hue, var(--rose)) var(--mtag-border), var(--line));
2790
2818
  }
2791
- `),jr=`slicc-memtag-dark`,Mr=`
2819
+ `),Ir=`slicc-memtag-dark`,Lr=`
2792
2820
  .dark slicc-memtag,
2793
2821
  [data-theme="dark"] slicc-memtag {
2794
2822
  --mtag-fill: 22%;
2795
2823
  --mtag-border: 38%;
2796
2824
  }
2797
- `;function Nr(e){if(e.getElementById(jr))return;let t=e.createElement(`style`);t.id=jr,t.textContent=Mr,(e.head??e.documentElement).appendChild(t)}v(`slicc-memtag`,class extends HTMLElement{static observedAttributes=[`type`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ar]}connectedCallback(){Nr(this.ownerDocument),this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get type(){return kr(this.getAttribute(`type`))}set type(e){this.setAttribute(`type`,Dr.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}=Or[this.type],n=this.label??b(`slot`,null,t),r=b(`span`,{class:`mtag`,part:`tag`,style:`--mtag-hue:var(${e})`},n);this.#e.replaceChildren(r)}});var Pr=`
2825
+ `;function Rr(e){if(e.getElementById(Ir))return;let t=e.createElement(`style`);t.id=Ir,t.textContent=Lr,(e.head??e.documentElement).appendChild(t)}v(`slicc-memtag`,class extends HTMLElement{static observedAttributes=[`type`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Fr]}connectedCallback(){Rr(this.ownerDocument),this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get type(){return Pr(this.getAttribute(`type`))}set type(e){this.setAttribute(`type`,Mr.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}=Nr[this.type],n=this.label??b(`slot`,null,t),r=b(`span`,{class:`mtag`,part:`tag`,style:`--mtag-hue:var(${e})`},n);this.#e.replaceChildren(r)}});var zr=`
2798
2826
  slicc-memrow {
2799
2827
  display: block;
2800
2828
  border: 1px solid var(--line);
@@ -2868,7 +2896,7 @@ slicc-memrow.fresh {
2868
2896
  background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
2869
2897
  border-color: color-mix(in srgb, var(--violet) 38%, var(--line));
2870
2898
  }
2871
- `,Fr=`slicc-memrow-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)}function Lr(e){return e===`feedback`||e===`project`?e:`user`}v(`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(){Ir(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 Lr(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 Rr=`
2899
+ `,Br=`slicc-memrow-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)}function Hr(e){return e===`feedback`||e===`project`?e:`user`}v(`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(){Vr(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 Hr(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 Ur=`
2872
2900
  slicc-palette-grid {
2873
2901
  display: block;
2874
2902
  flex: 1;
@@ -2887,7 +2915,7 @@ slicc-palette-grid .palgrid {
2887
2915
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
2888
2916
  gap: 10px;
2889
2917
  }
2890
- `,zr=`slicc-palette-grid-style`;function Br(e){if(e.getElementById(zr))return;let t=e.createElement(`style`);t.id=zr,t.textContent=Rr,(e.head??e.documentElement).appendChild(t)}var Vr=[{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`}],Hr=`brand palette · tokens`;v(`slicc-palette-grid`,class extends HTMLElement{static get observedAttributes(){return[`heading`]}#e=!1;#t=null;#n=null;#r=[];#i=null;#a=null;connectedCallback(){Br(this.ownerDocument),this.#e||this.#o(),this.#s(),this.#l()}disconnectedCallback(){this.#u()}attributeChangedCallback(){this.#e&&this.#s()}get heading(){return this.getAttribute(`heading`)??Hr}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get tokens(){return(this.#i??Vr).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 Ur=x(`
2918
+ `,Wr=`slicc-palette-grid-style`;function Gr(e){if(e.getElementById(Wr))return;let t=e.createElement(`style`);t.id=Wr,t.textContent=Ur,(e.head??e.documentElement).appendChild(t)}var Kr=[{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`}],qr=`brand palette · tokens`;v(`slicc-palette-grid`,class extends HTMLElement{static get observedAttributes(){return[`heading`]}#e=!1;#t=null;#n=null;#r=[];#i=null;#a=null;connectedCallback(){Gr(this.ownerDocument),this.#e||this.#o(),this.#s(),this.#l()}disconnectedCallback(){this.#u()}attributeChangedCallback(){this.#e&&this.#s()}get heading(){return this.getAttribute(`heading`)??qr}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get tokens(){return(this.#i??Kr).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 Jr=x(`
2891
2919
  :host { display: inline-block; position: relative; font-family: var(--ui); }
2892
2920
  .trigger {
2893
2921
  display: inline-flex; align-items: center; justify-content: center;
@@ -2928,7 +2956,7 @@ slicc-palette-grid .palgrid {
2928
2956
  .item .ic { flex: 0 0 auto; display: flex; color: var(--txt-2, #505050); }
2929
2957
  .item.danger .ic { color: var(--rose, #f43f5e); }
2930
2958
  @media (prefers-reduced-motion: reduce) { .pop { transition: none; } }
2931
- `);v(`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=[Ur],this.#t=b(`button`,{class:`trigger`,part:`trigger`,type:`button`,"aria-haspopup":`menu`,"aria-expanded":`false`},b(`slot`)),this.#n=b(`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=b(`div`,{class:`user`},b(`div`,{class:`name`},this.#i.name));this.#i.provider&&t.append(b(`div`,{class:`prov`},this.#i.provider)),e.push(t)}for(let t of this.#r)if(t.kind===`separator`)e.push(b(`div`,{class:`sep`,role:`separator`}));else if(t.kind===`caption`)e.push(b(`div`,{class:`cap`},t.label??``));else{let n=b(`button`,{class:`item${t.danger?` danger`:``}`,part:`item`,type:`button`,role:`menuitem`,"data-id":t.id??``,disabled:t.disabled?!0:void 0});t.icon&&n.append(b(`span`,{class:`ic`},s(t.icon,{size:16}))),n.append(b(`span`,{class:`lb`},t.label??``)),t.disabled||n.addEventListener(`click`,()=>this.#l(t.id??``)),e.push(n)}this.#n.replaceChildren(...e)}#l(e){this.dispatchEvent(new CustomEvent(`slicc-avatar-action`,{detail:{id:e},bubbles:!0,composed:!0})),this.hide()}});var Wr=`
2959
+ `);v(`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=[Jr],this.#t=b(`button`,{class:`trigger`,part:`trigger`,type:`button`,"aria-haspopup":`menu`,"aria-expanded":`false`},b(`slot`)),this.#n=b(`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=b(`div`,{class:`user`},b(`div`,{class:`name`},this.#i.name));this.#i.provider&&t.append(b(`div`,{class:`prov`},this.#i.provider)),e.push(t)}for(let t of this.#r)if(t.kind===`separator`)e.push(b(`div`,{class:`sep`,role:`separator`}));else if(t.kind===`caption`)e.push(b(`div`,{class:`cap`},t.label??``));else{let n=b(`button`,{class:`item${t.danger?` danger`:``}`,part:`item`,type:`button`,role:`menuitem`,"data-id":t.id??``,disabled:t.disabled?!0:void 0});t.icon&&n.append(b(`span`,{class:`ic`},s(t.icon,{size:16}))),n.append(b(`span`,{class:`lb`},t.label??``)),t.disabled||n.addEventListener(`click`,()=>this.#l(t.id??``)),e.push(n)}this.#n.replaceChildren(...e)}#l(e){this.dispatchEvent(new CustomEvent(`slicc-avatar-action`,{detail:{id:e},bubbles:!0,composed:!0})),this.hide()}});var Yr=`
2932
2960
  .slicc-nav {
2933
2961
  display: flex;
2934
2962
  align-items: center;
@@ -2955,7 +2983,7 @@ slicc-palette-grid .palgrid {
2955
2983
  @media (max-width: 560px) {
2956
2984
  .slicc-nav { gap: 8px; padding: 0 10px; }
2957
2985
  }
2958
- `,Gr=`slicc-nav-style`;function Kr(e){if(e.getElementById(Gr))return;let t=e.createElement(`style`);t.id=Gr,t.textContent=Wr,(e.head??e.documentElement).appendChild(t)}v(`slicc-nav`,class extends HTMLElement{static observedAttributes=[`accent`];#e=!1;connectedCallback(){Kr(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 qr=x(`
2986
+ `,Xr=`slicc-nav-style`;function Zr(e){if(e.getElementById(Xr))return;let t=e.createElement(`style`);t.id=Xr,t.textContent=Yr,(e.head??e.documentElement).appendChild(t)}v(`slicc-nav`,class extends HTMLElement{static observedAttributes=[`accent`];#e=!1;connectedCallback(){Zr(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 Qr=x(`
2959
2987
  :host { display: none; }
2960
2988
  :host([open]) { display: block; }
2961
2989
  .overlay {
@@ -3000,7 +3028,7 @@ slicc-palette-grid .palgrid {
3000
3028
  @media (prefers-reduced-motion: reduce) {
3001
3029
  .overlay, .dialog { transition: none; }
3002
3030
  }
3003
- `);v(`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=[qr],this.#r=b(`div`,{class:`title`,part:`title`,id:`slicc-dialog-title`}),this.#i=b(`div`,{class:`desc`,part:`description`}),this.#a=b(`button`,{class:`x`,part:`close`,type:`button`,"aria-label":`Close`},s(`x`,{size:18}));let e=b(`div`,{class:`body`},b(`slot`)),t=b(`div`,{class:`footer`},b(`slot`,{name:`footer`}));this.#n=b(`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=b(`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 Jr=`
3031
+ `);v(`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=[Qr],this.#r=b(`div`,{class:`title`,part:`title`,id:`slicc-dialog-title`}),this.#i=b(`div`,{class:`desc`,part:`description`}),this.#a=b(`button`,{class:`x`,part:`close`,type:`button`,"aria-label":`Close`},s(`x`,{size:18}));let e=b(`div`,{class:`body`},b(`slot`)),t=b(`div`,{class:`footer`},b(`slot`,{name:`footer`}));this.#n=b(`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=b(`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 $r=`
3004
3032
  slicc-camera-dialog slicc-dialog::part(dialog) {
3005
3033
  width: min(560px, 92vw);
3006
3034
  }
@@ -3067,7 +3095,7 @@ slicc-camera-dialog .slicc-camera__btn--snap {
3067
3095
  slicc-camera-dialog .slicc-camera__btn--snap:hover {
3068
3096
  background: color-mix(in srgb, var(--ink) 85%, var(--canvas));
3069
3097
  }
3070
- `,Yr=`slicc-camera-dialog-style`;function Xr(e){if(e.getElementById(Yr))return;let t=e.createElement(`style`);t.id=Yr,t.textContent=Jr,(e.head??e.documentElement).appendChild(t)}var Zr=`Take a photo`;v(`slicc-camera-dialog`,class extends HTMLElement{static observedAttributes=[`heading`,`preferred-device`];media=null;#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){Xr(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`)??Zr}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)=>b(`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=b(`video`,{class:`slicc-camera__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#n=b(`select`,{class:`slicc-camera__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#d(this.#n.value)}),this.#r=b(`div`,{class:`slicc-camera__status`});let e=b(`button`,{type:`button`,class:`slicc-camera__btn`,part:`cancel`,slot:`footer`},`Cancel`);e.addEventListener(`click`,()=>this.#p(null));let t=b(`button`,{type:`button`,class:`slicc-camera__btn slicc-camera__btn--snap`,part:`snap`,slot:`footer`},s(`camera`,{size:14}),` Snap`);t.addEventListener(`click`,()=>this.#f());let n=b(`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(n,e,t),this.#e.addEventListener(`slicc-dialog-close`,()=>{this.#o&&this.#p(null)}),this.append(this.#e)}});var Qr={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)}},$r=new Set([`microphone`,`camera`]);function ei(e){return typeof navigator>`u`||!navigator.permissions?.query?Promise.resolve(`prompt`):navigator.permissions.query({name:e}).then(e=>e.state)}var ti=`
3098
+ `,ei=`slicc-camera-dialog-style`;function ti(e){if(e.getElementById(ei))return;let t=e.createElement(`style`);t.id=ei,t.textContent=$r,(e.head??e.documentElement).appendChild(t)}var ni=`Take a photo`;v(`slicc-camera-dialog`,class extends HTMLElement{static observedAttributes=[`heading`,`preferred-device`];media=null;#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){ti(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`)??ni}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)=>b(`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=b(`video`,{class:`slicc-camera__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#n=b(`select`,{class:`slicc-camera__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#d(this.#n.value)}),this.#r=b(`div`,{class:`slicc-camera__status`});let e=b(`button`,{type:`button`,class:`slicc-camera__btn`,part:`cancel`,slot:`footer`},`Cancel`);e.addEventListener(`click`,()=>this.#p(null));let t=b(`button`,{type:`button`,class:`slicc-camera__btn slicc-camera__btn--snap`,part:`snap`,slot:`footer`},s(`camera`,{size:14}),` Snap`);t.addEventListener(`click`,()=>this.#f());let n=b(`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(n,e,t),this.#e.addEventListener(`slicc-dialog-close`,()=>{this.#o&&this.#p(null)}),this.append(this.#e)}});var ri={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)}},ii=new Set([`microphone`,`camera`]);function ai(e){return typeof navigator>`u`||!navigator.permissions?.query?Promise.resolve(`prompt`):navigator.permissions.query({name:e}).then(e=>e.state)}var oi=`
3071
3099
  slicc-permissions {
3072
3100
  /* Invisible host by default — only the drop overlay paints, and only
3073
3101
  while a folder drag is in flight. Hosts can give the element a fixed
@@ -3238,7 +3266,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3238
3266
  transform: translateX(-50%) translateY(0);
3239
3267
  }
3240
3268
  }
3241
- `,ni=`slicc-permissions-style`;function ri(e){if(e.getElementById(ni))return;let t=e.createElement(`style`);t.id=ni,t.textContent=ti,(e.head??e.documentElement).appendChild(t)}function ii(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 ai=class extends HTMLElement{providers={};permissionQuery=null;#e;#t=!1;#n=0;#r=null;connectedCallback(){ri(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=>$r.has(e)))return Qr.debug(`prompt: showing dialog (a gesture-bound kind was requested)`,{kinds:e.kinds}),null;let t=this.permissionQuery??ei,n;try{n=await Promise.all(e.kinds.map(e=>t(e)))}catch(e){return Qr.error(`prompt: permission query threw; showing dialog`,e),null}if(Qr.debug(`prompt: queried permission state`,{kinds:e.kinds,states:n}),!n.every(e=>e===`granted`))return Qr.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 Qr.error(`prompt: acquisition failed after granted state`,{kind:t}),{status:`error`,grants:r,reason:`error`};r.push(n)}return Qr.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=>{ii(e)&&(e.preventDefault(),this.#n++,this.setAttribute(`data-dropping`,``))};#y=e=>{ii(e)&&e.preventDefault()};#b=e=>{ii(e)&&(this.#n=Math.max(0,this.#n-1),this.#n===0&&this.removeAttribute(`data-dropping`))};#x=e=>{if(!ii(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=b(`div`,{class:`slicc-permissions__drop-inner`},s(`folder-up`,{size:32}),b(`div`,null,`Drop a folder to mount it (read-write)`));this.#e=b(`div`,{class:`slicc-permissions__drop`,part:`drop`,"aria-hidden":`true`},e),this.append(this.#e)}#w(e,t){let n=e.heading??ci(e.kinds),r=e.grantLabel??`Allow`,i=e.cancelLabel??`Cancel`,a=`slicc-permissions__heading-${Math.random().toString(36).slice(2,8)}`,o=`slicc-permissions__desc-${Math.random().toString(36).slice(2,8)}`,c=b(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`ghost`,part:`prompt-cancel`},i),l=b(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`primary`,part:`prompt-grant`},r),u=b(`div`,{class:`slicc-permissions__prompt-icons`,"aria-hidden":`true`},...e.kinds.map(e=>b(`span`,{class:`slicc-permissions__prompt-icon`},s(oi(e),{size:22})))),d=b(`div`,{class:`slicc-permissions__prompt`,part:`prompt`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":a,"aria-describedby":o,tabindex:`-1`,popover:`manual`},u,b(`h2`,{class:`slicc-permissions__prompt-heading`,id:a},n),b(`p`,{class:`slicc-permissions__prompt-desc`,id:o},e.description),b(`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`,ee),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})}},ee=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`,ee),this.#r={cancel:()=>g(`cancelled`)},requestAnimationFrame(()=>{d.setAttribute(`data-open`,``),l.focus()})}};function oi(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 si(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 ci(e){if(e.length===1)return`Allow access to your ${si(e[0])}?`;let t=e.map(si),n=t.pop();return`Allow access to your ${t.join(`, `)} and ${n}?`}v(`slicc-permissions`,ai);var li=new Set([`top`,`bottom`,`left`,`right`]),ui=x(`
3269
+ `,si=`slicc-permissions-style`;function ci(e){if(e.getElementById(si))return;let t=e.createElement(`style`);t.id=si,t.textContent=oi,(e.head??e.documentElement).appendChild(t)}function li(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 ui=class extends HTMLElement{providers={};permissionQuery=null;#e;#t=!1;#n=0;#r=null;connectedCallback(){ci(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=>ii.has(e)))return ri.debug(`prompt: showing dialog (a gesture-bound kind was requested)`,{kinds:e.kinds}),null;let t=this.permissionQuery??ai,n;try{n=await Promise.all(e.kinds.map(e=>t(e)))}catch(e){return ri.error(`prompt: permission query threw; showing dialog`,e),null}if(ri.debug(`prompt: queried permission state`,{kinds:e.kinds,states:n}),!n.every(e=>e===`granted`))return ri.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 ri.error(`prompt: acquisition failed after granted state`,{kind:t}),{status:`error`,grants:r,reason:`error`};r.push(n)}return ri.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=>{li(e)&&(e.preventDefault(),this.#n++,this.setAttribute(`data-dropping`,``))};#y=e=>{li(e)&&e.preventDefault()};#b=e=>{li(e)&&(this.#n=Math.max(0,this.#n-1),this.#n===0&&this.removeAttribute(`data-dropping`))};#x=e=>{if(!li(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=b(`div`,{class:`slicc-permissions__drop-inner`},s(`folder-up`,{size:32}),b(`div`,null,`Drop a folder to mount it (read-write)`));this.#e=b(`div`,{class:`slicc-permissions__drop`,part:`drop`,"aria-hidden":`true`},e),this.append(this.#e)}#w(e,t){let n=e.heading??pi(e.kinds),r=e.grantLabel??`Allow`,i=e.cancelLabel??`Cancel`,a=`slicc-permissions__heading-${Math.random().toString(36).slice(2,8)}`,o=`slicc-permissions__desc-${Math.random().toString(36).slice(2,8)}`,c=b(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`ghost`,part:`prompt-cancel`},i),l=b(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`primary`,part:`prompt-grant`},r),u=b(`div`,{class:`slicc-permissions__prompt-icons`,"aria-hidden":`true`},...e.kinds.map(e=>b(`span`,{class:`slicc-permissions__prompt-icon`},s(di(e),{size:22})))),d=b(`div`,{class:`slicc-permissions__prompt`,part:`prompt`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":a,"aria-describedby":o,tabindex:`-1`,popover:`manual`},u,b(`h2`,{class:`slicc-permissions__prompt-heading`,id:a},n),b(`p`,{class:`slicc-permissions__prompt-desc`,id:o},e.description),b(`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`,ee),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})}},ee=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`,ee),this.#r={cancel:()=>g(`cancelled`)},requestAnimationFrame(()=>{d.setAttribute(`data-open`,``),l.focus()})}};function di(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 fi(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 pi(e){if(e.length===1)return`Allow access to your ${fi(e[0])}?`;let t=e.map(fi),n=t.pop();return`Allow access to your ${t.join(`, `)} and ${n}?`}v(`slicc-permissions`,ui);var mi=new Set([`top`,`bottom`,`left`,`right`]),hi=x(`
3242
3270
  :host { position: relative; display: inline-flex; }
3243
3271
  :host([hidden]) { display: none; }
3244
3272
  .tip {
@@ -3263,7 +3291,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3263
3291
  :host(:hover) .tip[data-p="right"], :host(:focus-within) .tip[data-p="right"], :host([open]) .tip[data-p="right"] { transform: translate(0, -50%); }
3264
3292
  .tip:empty { display: none; }
3265
3293
  @media (prefers-reduced-motion: reduce) { .tip { transition: none; } }
3266
- `);v(`slicc-tooltip`,class extends HTMLElement{static observedAttributes=[`label`,`placement`];#e;#t;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ui],this.#t=b(`span`,{class:`tip`,part:`tip`,role:`tooltip`,"aria-hidden":`true`}),this.#e.replaceChildren(b(`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&&li.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 di=18,fi=16,pi=50,mi=85,hi=2.2,gi={cx:55,cy:50,r:38},_i={cx:145,cy:50,r:38},vi=`http://www.w3.org/2000/svg`;function P(e,t,...n){let r=document.createElementNS(vi,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 yi={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}},bi={cone:`#D2691E`,scoop:`#FFB6C1`};function xi(e){return e<=pi?1:e>=mi?hi:1+(e-pi)/(mi-pi)*(hi-1)}function Si(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 Ci(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 wi(e,t){let{r:n,g:r,b:i}=Si(e),a=t<0?0:255,o=Math.abs(t);return Ci(n+(a-n)*o,r+(a-r)*o,i+(a-i)*o)}function Ti(e,t,n){return[P(`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}),P(`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}),P(`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}),P(`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}),P(`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}),P(`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}),P(`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}),P(`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}),P(`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}),P(`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}),P(`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}),P(`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}),P(`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}),P(`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}),P(`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}),P(`ellipse`,{cx:288.37,cy:404.38,rx:182.34,ry:67.01,fill:e,stroke:t,"stroke-miterlimit":10,"stroke-width":20})]}function Ei(e,t){return[P(`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 Di(e,t,n,r,i){return[P(`g`,{class:`eye-blink eye-${r}`},P(`circle`,{cx:e,cy:t,r:n,fill:`#fff`,stroke:`#000`,"stroke-width":4}),P(`g`,{class:`pupil pupil-${r}`},P(`circle`,{cx:e,cy:t,r:i,fill:`#000`}),P(`circle`,{cx:e-i*.3,cy:t-i*.35,r:i*.4,fill:`#fff`})))]}function Oi(e,t,n){return[P(`circle`,{cx:e,cy:t,r:n,fill:`#fff`,stroke:`#000`,"stroke-width":4}),P(`line`,{x1:e-15,y1:t-15,x2:e+15,y2:t+15,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`}),P(`line`,{x1:e+15,y1:t-15,x2:e-15,y2:t+15,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`})]}function ki(e,t){if(e===`none`)return null;let n=gi,r=_i;return P(`svg`,{class:`eyes-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...e===`dead`?[...Oi(n.cx,n.cy,n.r),...Oi(r.cx,r.cy,r.r)]:[...Di(n.cx,n.cy,n.r,`l`,t),...Di(r.cx,r.cy,r.r,`r`,t)])}function Ai(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 ji=x(`
3294
+ `);v(`slicc-tooltip`,class extends HTMLElement{static observedAttributes=[`label`,`placement`];#e;#t;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[hi],this.#t=b(`span`,{class:`tip`,part:`tip`,role:`tooltip`,"aria-hidden":`true`}),this.#e.replaceChildren(b(`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&&mi.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 gi=18,_i=16,vi=50,yi=85,bi=2.2,xi={cx:55,cy:50,r:38},Si={cx:145,cy:50,r:38},Ci=`http://www.w3.org/2000/svg`;function F(e,t,...n){let r=document.createElementNS(Ci,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 wi={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}},Ti={cone:`#D2691E`,scoop:`#FFB6C1`};function Ei(e){return e<=vi?1:e>=yi?bi:1+(e-vi)/(yi-vi)*(bi-1)}function Di(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 Oi(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 ki(e,t){let{r:n,g:r,b:i}=Di(e),a=t<0?0:255,o=Math.abs(t);return Oi(n+(a-n)*o,r+(a-r)*o,i+(a-i)*o)}function Ai(e,t,n){return[F(`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}),F(`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}),F(`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}),F(`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}),F(`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}),F(`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}),F(`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}),F(`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}),F(`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}),F(`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}),F(`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}),F(`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}),F(`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}),F(`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}),F(`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}),F(`ellipse`,{cx:288.37,cy:404.38,rx:182.34,ry:67.01,fill:e,stroke:t,"stroke-miterlimit":10,"stroke-width":20})]}function ji(e,t){return[F(`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 Mi(e,t,n,r,i){return[F(`g`,{class:`eye-blink eye-${r}`},F(`circle`,{cx:e,cy:t,r:n,fill:`#fff`,stroke:`#000`,"stroke-width":4}),F(`g`,{class:`pupil pupil-${r}`},F(`circle`,{cx:e,cy:t,r:i,fill:`#000`}),F(`circle`,{cx:e-i*.3,cy:t-i*.35,r:i*.4,fill:`#fff`})))]}function Ni(e,t,n){return[F(`circle`,{cx:e,cy:t,r:n,fill:`#fff`,stroke:`#000`,"stroke-width":4}),F(`line`,{x1:e-15,y1:t-15,x2:e+15,y2:t+15,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`}),F(`line`,{x1:e+15,y1:t-15,x2:e-15,y2:t+15,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`})]}function Pi(e,t){if(e===`none`)return null;let n=xi,r=Si;return F(`svg`,{class:`eyes-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...e===`dead`?[...Ni(n.cx,n.cy,n.r),...Ni(r.cx,r.cy,r.r)]:[...Mi(n.cx,n.cy,n.r,`l`,t),...Mi(r.cx,r.cy,r.r,`r`,t)])}function Fi(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 Ii=x(`
3267
3295
  :host{position:relative;display:inline-block;--pill-w:190px;--label:#eef1f6;--icon-tint:color-mix(in oklab,var(--accent) 22%,transparent);}
3268
3296
  @media (prefers-color-scheme: light){:host(:not([theme="dark"])){--label:#1b2030;--icon-tint:color-mix(in oklab,var(--accent) 30%,#fff);}}
3269
3297
  /* The library's class-based dark scope (body.dark / .dark / [data-theme=dark])
@@ -3310,7 +3338,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3310
3338
  :host([compact]:hover) .tip,:host([compact]:focus-within) .tip{opacity:1;transform:translateX(-50%);}
3311
3339
  @media (max-width:560px){ :host(:hover) .tip,:host(:focus-within) .tip{opacity:1;transform:translateX(-50%);} }
3312
3340
  @media (prefers-reduced-motion: reduce){ .tip{transition:none;} }
3313
- `);v(`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=fi;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ji]}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)?xi(Math.max(0,Math.min(100,t))):1}#o(){let e=this.type,t=yi[e],n=this.color??bi[e],r=this.active,i=this.label,a=e===`cone`?Ti(n,wi(n,-.38),wi(n,.3)):Ei(n,wi(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),ee=Math.min(0,p),te=Math.max(1,m),_=Math.min(1,1/Math.max(g-h,te-ee)),v=((.5-_*(h+g)/2)*100).toFixed(2),y=((.5-_*(ee+te)/2)*100).toFixed(2),x=di*this.pupilScale;this.#a=Math.max(2,Math.min(fi,gi.r-x-4));let ne=P(`svg`,{class:`glyph`,viewBox:t.vb,preserveAspectRatio:`xMidYMid meet`,style:`--g:${t.glyph}%`},...a),re=ki(this.eyeState,x),ie=b(`span`,{class:`eyes`,style:`top:${o.top}%;left:${o.left}%;width:${o.width}%;height:${o.height}%`});re&&ie.append(re);let S=b(`span`,{class:`icon`,part:`icon`},b(`span`,{class:`icon-inner`,style:`--tx:${l}%;--ty:${u}%;--zoom:${t.zoom};--ox:${v}%;--oy:${y}%;--ozoom:${_.toFixed(4)}`},ne,ie)),ae=b(`span`,{class:`label`,part:`label`},i??b(`slot`)),oe=b(`button`,{class:`pill ${r?`active`:``}`,part:`pill`,style:`--accent:${n}`,"aria-label":i||!1},S,ae),se=i?b(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},i):null;this.#e.replaceChildren(oe,...se?[se]:[]),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);Ai(this.#n,gi.cx,gi.cy,n,r,this.#a),Ai(this.#r,_i.cx,_i.cy,n,r,this.#a)}});var Mi=x(`
3341
+ `);v(`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=_i;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ii]}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)?Ei(Math.max(0,Math.min(100,t))):1}#o(){let e=this.type,t=wi[e],n=this.color??Ti[e],r=this.active,i=this.label,a=e===`cone`?Ai(n,ki(n,-.38),ki(n,.3)):ji(n,ki(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),ee=Math.min(0,p),te=Math.max(1,m),_=Math.min(1,1/Math.max(g-h,te-ee)),v=((.5-_*(h+g)/2)*100).toFixed(2),y=((.5-_*(ee+te)/2)*100).toFixed(2),x=gi*this.pupilScale;this.#a=Math.max(2,Math.min(_i,xi.r-x-4));let ne=F(`svg`,{class:`glyph`,viewBox:t.vb,preserveAspectRatio:`xMidYMid meet`,style:`--g:${t.glyph}%`},...a),re=Pi(this.eyeState,x),ie=b(`span`,{class:`eyes`,style:`top:${o.top}%;left:${o.left}%;width:${o.width}%;height:${o.height}%`});re&&ie.append(re);let S=b(`span`,{class:`icon`,part:`icon`},b(`span`,{class:`icon-inner`,style:`--tx:${l}%;--ty:${u}%;--zoom:${t.zoom};--ox:${v}%;--oy:${y}%;--ozoom:${_.toFixed(4)}`},ne,ie)),ae=b(`span`,{class:`label`,part:`label`},i??b(`slot`)),oe=b(`button`,{class:`pill ${r?`active`:``}`,part:`pill`,style:`--accent:${n}`,"aria-label":i||!1},S,ae),se=i?b(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},i):null;this.#e.replaceChildren(oe,...se?[se]:[]),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);Fi(this.#n,xi.cx,xi.cy,n,r,this.#a),Fi(this.#r,Si.cx,Si.cy,n,r,this.#a)}});var Li=x(`
3314
3342
  :host {
3315
3343
  display: inline-grid;
3316
3344
  place-items: center;
@@ -3357,7 +3385,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3357
3385
  object-fit: cover;
3358
3386
  display: block;
3359
3387
  }
3360
- `),Ni=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=[Mi],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():Fi(this.name)||`?`}async gravatarUrl(e=this.email){let t=e?.trim().toLowerCase();return t?`https://www.gravatar.com/avatar/${await Pi(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=[b(`span`,{class:`ini`,part:`initials`},r)];if(t){let n=b(`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=b(`div`,{class:`me`,part:`avatar`},b(`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 Pi(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 Fi(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()}v(`slicc-avatar`,Ni);var Ii=x(`
3388
+ `),Ri=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=[Li],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():Bi(this.name)||`?`}async gravatarUrl(e=this.email){let t=e?.trim().toLowerCase();return t?`https://www.gravatar.com/avatar/${await zi(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=[b(`span`,{class:`ini`,part:`initials`},r)];if(t){let n=b(`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=b(`div`,{class:`me`,part:`avatar`},b(`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 zi(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 Bi(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()}v(`slicc-avatar`,Ri);var Vi=x(`
3361
3389
  :host { display: inline-flex; flex: 0 0 auto; }
3362
3390
  :host([hidden]) { display: none; }
3363
3391
  .col {
@@ -3378,7 +3406,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3378
3406
  .col:hover { background: var(--ghost); color: var(--ink); }
3379
3407
  .icon { display: inline-flex; place-items: center; pointer-events: none; }
3380
3408
  .icon svg { display: block; }
3381
- `),Li=`panel-right-close`,Ri=`Collapse`,zi=16;v(`slicc-collapse-btn`,class extends HTMLElement{static observedAttributes=[`label`,`icon`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ii]}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get label(){return this.getAttribute(`label`)??Ri}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)??Li}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}#n(){let e=this.label,t=s(this.icon,{size:zi,part:`icon`}),n=b(`button`,{class:`col`,part:`button`,type:`button`,"aria-label":e,title:e},b(`slot`,null,b(`span`,{class:`icon`},t)));n.addEventListener(`click`,this.#r),this.#t=n,this.#e.replaceChildren(n)}#r=()=>{this.dispatchEvent(new CustomEvent(`collapse`,{bubbles:!0,composed:!0}))}});var Bi=x(`
3409
+ `),Hi=`panel-right-close`,Ui=`Collapse`,Wi=16;v(`slicc-collapse-btn`,class extends HTMLElement{static observedAttributes=[`label`,`icon`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Vi]}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get label(){return this.getAttribute(`label`)??Ui}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)??Hi}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}#n(){let e=this.label,t=s(this.icon,{size:Wi,part:`icon`}),n=b(`button`,{class:`col`,part:`button`,type:`button`,"aria-label":e,title:e},b(`slot`,null,b(`span`,{class:`icon`},t)));n.addEventListener(`click`,this.#r),this.#t=n,this.#e.replaceChildren(n)}#r=()=>{this.dispatchEvent(new CustomEvent(`collapse`,{bubbles:!0,composed:!0}))}});var Gi=x(`
3382
3410
  :host {
3383
3411
  display: flex;
3384
3412
  align-items: center;
@@ -3407,7 +3435,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3407
3435
  min-width: 0;
3408
3436
  background: var(--line, #e5e5e5);
3409
3437
  }
3410
- `);v(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Bi]}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??b(`slot`);this.#e.replaceChildren(b(`span`,{class:`label`,part:`label`},e))}});var Vi=`CLI float`;function Hi(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 Ui=`(max-width: 560px)`,Wi=x(`
3438
+ `);v(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Gi]}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??b(`slot`);this.#e.replaceChildren(b(`span`,{class:`label`,part:`label`},e))}});var Ki=`CLI float`;function qi(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 Ji=`(max-width: 560px)`,Yi=x(`
3411
3439
  :host {
3412
3440
  position: relative;
3413
3441
  display: inline-flex;
@@ -3518,7 +3546,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3518
3546
  @media (prefers-reduced-motion: reduce) {
3519
3547
  .tip { transition: none; }
3520
3548
  }
3521
- `);v(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`online`,`spent`];#e;#t;#n=()=>{this.isConnected&&this.#i()};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Wi],this.#t=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(Ui):null}connectedCallback(){this.#t?.addEventListener(`change`,this.#n),this.#a()}disconnectedCallback(){this.#t?.removeEventListener(`change`,this.#n)}attributeChangedCallback(){this.isConnected&&this.#a()}get label(){return this.getAttribute(`label`)??Vi}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))}#r(){let e=[this.label],t=Hi(this.spent);return t!=null&&e.push(t),e.push(this.online?`online`:`offline`),e.join(` · `)}#i(){this.#t?.matches?this.setAttribute(`title`,this.#r()):this.removeAttribute(`title`)}#a(){let e=[];this.online&&e.push(b(`span`,{class:`fdot`,part:`dot`})),e.push(b(`span`,{class:`label`,part:`label`},b(`slot`,null,this.label)));let t=Hi(this.spent);t!=null&&(e.push(b(`span`,{class:`sep`,part:`sep`})),e.push(b(`span`,{class:`spent`,part:`spent`},s(`circle-dollar-sign`,{size:12}),b(`span`,{class:`amount`},t)))),e.push(b(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},this.#r())),this.#e.replaceChildren(...e),this.#i()}});var Gi=x(`
3549
+ `);v(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`online`,`spent`];#e;#t;#n=()=>{this.isConnected&&this.#i()};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Yi],this.#t=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(Ji):null}connectedCallback(){this.#t?.addEventListener(`change`,this.#n),this.#a()}disconnectedCallback(){this.#t?.removeEventListener(`change`,this.#n)}attributeChangedCallback(){this.isConnected&&this.#a()}get label(){return this.getAttribute(`label`)??Ki}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))}#r(){let e=[this.label],t=qi(this.spent);return t!=null&&e.push(t),e.push(this.online?`online`:`offline`),e.join(` · `)}#i(){this.#t?.matches?this.setAttribute(`title`,this.#r()):this.removeAttribute(`title`)}#a(){let e=[];this.online&&e.push(b(`span`,{class:`fdot`,part:`dot`})),e.push(b(`span`,{class:`label`,part:`label`},b(`slot`,null,this.label)));let t=qi(this.spent);t!=null&&(e.push(b(`span`,{class:`sep`,part:`sep`})),e.push(b(`span`,{class:`spent`,part:`spent`},s(`circle-dollar-sign`,{size:12}),b(`span`,{class:`amount`},t)))),e.push(b(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},this.#r())),this.#e.replaceChildren(...e),this.#i()}});var Xi=x(`
3522
3550
  :host { display: inline-grid; }
3523
3551
  :host([hidden]) { display: none; }
3524
3552
  .iconbtn {
@@ -3547,7 +3575,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3547
3575
  .iconbtn:disabled:hover { background: var(--canvas); color: var(--txt-2); }
3548
3576
  .icon { display: grid; place-items: center; pointer-events: none; }
3549
3577
  .icon svg { display: block; }
3550
- `),Ki=`plus`,qi=16;v(`slicc-icon-button`,class extends HTMLElement{static observedAttributes=[`icon`,`disabled`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Gi]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get icon(){return this.getAttribute(`icon`)??Ki}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=b(`slot`,null,b(`span`,{class:`icon`},s(this.icon,{size:qi,part:`icon`}))),n=b(`button`,{type:`button`,class:`iconbtn`,part:`button`,"aria-label":e??void 0,title:e??void 0,disabled:this.disabled},t);this.#e.replaceChildren(n)}});var Ji=400,Yi=x(`
3578
+ `),Zi=`plus`,Qi=16;v(`slicc-icon-button`,class extends HTMLElement{static observedAttributes=[`icon`,`disabled`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Xi]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get icon(){return this.getAttribute(`icon`)??Zi}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=b(`slot`,null,b(`span`,{class:`icon`},s(this.icon,{size:Qi,part:`icon`}))),n=b(`button`,{type:`button`,class:`iconbtn`,part:`button`,"aria-label":e??void 0,title:e??void 0,disabled:this.disabled},t);this.#e.replaceChildren(n)}});var $i=400,ea=x(`
3551
3579
  :host{position:fixed;inset:0;z-index:1000;display:none;}
3552
3580
  :host([open]){display:block;}
3553
3581
  .overlay{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;cursor:pointer;}
@@ -3555,7 +3583,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3555
3583
  .overlay.visible .backdrop{opacity:1;}
3556
3584
  .overlay.closing .backdrop{opacity:0;}
3557
3585
  .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);}
3558
- `),F=null,Xi=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=[Yi]}disconnectedCallback(){this.#l(),F===this&&(F=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){F&&F!==this&&F.#s(),this.#l(),this.#a=!1,this.src=e,this.setAttribute(`open`,``),F=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,ee=a.top+a.height/2,te=f+u/2,_=p+d/2,v=g-te,y=ee-_;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(${v}px, ${y}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||F!==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,Ji),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`),F===this&&(F=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()}};v(`slicc-image-preview`,Xi);var Zi=x(`
3586
+ `),ta=null,na=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=[ea]}disconnectedCallback(){this.#l(),ta===this&&(ta=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){ta&&ta!==this&&ta.#s(),this.#l(),this.#a=!1,this.src=e,this.setAttribute(`open`,``),ta=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,ee=a.top+a.height/2,te=f+u/2,_=p+d/2,v=g-te,y=ee-_;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(${v}px, ${y}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||ta!==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,$i),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`),ta===this&&(ta=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()}};v(`slicc-image-preview`,na);var ra=x(`
3559
3587
  :host { display: inline-flex; align-items: center; height: var(--ctl-h, 30px); font-family: var(--ui); line-height: 1; }
3560
3588
  .logo { font-weight: 600; font-size: 14px; letter-spacing: -0.02em; color: var(--ink); }
3561
3589
  .b {
@@ -3564,7 +3592,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
3564
3592
  }
3565
3593
  /* Narrow / extension-sidebar: drop the gradient suffix badge to save width. */
3566
3594
  @media (max-width: 560px) { .b { display: none; } }
3567
- `);v(`slicc-logo`,class extends HTMLElement{static observedAttributes=[`badge`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Zi]}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=b(`span`,{class:`logo`,part:`logo`},`sliccy`);this.badge&&e.append(b(`span`,{class:`b`,part:`badge`},this.badge)),this.#e.replaceChildren(e)}});var Qi=`
3595
+ `);v(`slicc-logo`,class extends HTMLElement{static observedAttributes=[`badge`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ra]}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=b(`span`,{class:`logo`,part:`logo`},`sliccy`);this.badge&&e.append(b(`span`,{class:`b`,part:`badge`},this.badge)),this.#e.replaceChildren(e)}});var ia=`
3568
3596
  slicc-pane {
3569
3597
  display: flex;
3570
3598
  flex-direction: column;
@@ -3603,7 +3631,7 @@ slicc-pane .slicc-pane__body {
3603
3631
  min-height: 0;
3604
3632
  overflow: auto;
3605
3633
  }
3606
- `,$i=`slicc-pane-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)}v(`slicc-pane`,class extends HTMLElement{static observedAttributes=[`elevated`];#e;#t;#n=!1;connectedCallback(){ea(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 ta(e){return e===`tool`||e===`sprinkle`}var na=x(`
3634
+ `,aa=`slicc-pane-style`;function oa(e){if(e.getElementById(aa))return;let t=e.createElement(`style`);t.id=aa,t.textContent=ia,(e.head??e.documentElement).appendChild(t)}v(`slicc-pane`,class extends HTMLElement{static observedAttributes=[`elevated`];#e;#t;#n=!1;connectedCallback(){oa(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 sa(e){return e===`tool`||e===`sprinkle`}var ca=x(`
3607
3635
  :host { display: none; flex: 0 0 auto; }
3608
3636
  :host([kind="tool"]), :host([kind="sprinkle"]) { display: inline-block; }
3609
3637
  .ptag {
@@ -3622,7 +3650,7 @@ slicc-pane .slicc-pane__body {
3622
3650
  background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
3623
3651
  border-color: color-mix(in srgb, var(--violet) 38%, var(--line));
3624
3652
  }
3625
- `);v(`slicc-pane-tag`,class extends HTMLElement{static observedAttributes=[`kind`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[na]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){let e=this.getAttribute(`kind`);return ta(e)?e:null}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}#t(){let e=b(`span`,{class:`ptag`,part:`tag`},b(`slot`,null,this.kind??``));this.#e.replaceChildren(e)}});var ra=`
3653
+ `);v(`slicc-pane-tag`,class extends HTMLElement{static observedAttributes=[`kind`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ca]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){let e=this.getAttribute(`kind`);return sa(e)?e:null}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}#t(){let e=b(`span`,{class:`ptag`,part:`tag`},b(`slot`,null,this.kind??``));this.#e.replaceChildren(e)}});var la=`
3626
3654
  slicc-press-button {
3627
3655
  display: inline-flex;
3628
3656
  }
@@ -3714,7 +3742,7 @@ slicc-press-button {
3714
3742
  animation: none;
3715
3743
  }
3716
3744
  }
3717
- `,ia=`slicc-press-button-style`;function aa(e){if(e.getElementById(ia))return;let t=e.createElement(`style`);t.id=ia,t.textContent=ra,(e.head??e.documentElement).appendChild(t)}var oa=`slicc-press-btn`,sa=`is-squish`,ca=`is-wobble`;v(`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(){aa(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=b(`span`,{class:`${oa}__press-layer`,part:`press-layer`}),t=b(`button`,{type:`button`,class:`${oa}__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 un;let t=Number(e);return Number.isFinite(t)&&t>0?t:un}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(sa):e===`double-click`&&this.playAnimation(ca);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(sa,ca))}clearPendingShort(){this.pendingShortTimer!==null&&(clearTimeout(this.pendingShortTimer),this.pendingShortTimer=null),this.pendingShortEvent=null}attachGesture(){this.handle=dn(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=`${oa}__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 la=x(`
3745
+ `,ua=`slicc-press-button-style`;function da(e){if(e.getElementById(ua))return;let t=e.createElement(`style`);t.id=ua,t.textContent=la,(e.head??e.documentElement).appendChild(t)}var fa=`slicc-press-btn`,pa=`is-squish`,ma=`is-wobble`;v(`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(){da(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=b(`span`,{class:`${fa}__press-layer`,part:`press-layer`}),t=b(`button`,{type:`button`,class:`${fa}__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 hn;let t=Number(e);return Number.isFinite(t)&&t>0?t:hn}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(pa):e===`double-click`&&this.playAnimation(ma);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(pa,ma))}clearPendingShort(){this.pendingShortTimer!==null&&(clearTimeout(this.pendingShortTimer),this.pendingShortTimer=null),this.pendingShortEvent=null}attachGesture(){this.handle=gn(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=`${fa}__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 ha=x(`
3718
3746
  :host { display: inline-flex; }
3719
3747
  :host([hidden]) { display: none; }
3720
3748
 
@@ -3744,7 +3772,7 @@ slicc-press-button {
3744
3772
  outline: 2px solid var(--violet);
3745
3773
  outline-offset: 2px;
3746
3774
  }
3747
- `);v(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[la]}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=b(`button`,{type:`button`,part:`button`,class:t.join(` `),"aria-pressed":this.selected?`true`:`false`,"aria-label":this.label??e??`color swatch`},b(`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 ua=new Set([`rose`,`cyan`,`violet`,`amber`,`waffle`,`green`]),da=x(`
3775
+ `);v(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ha]}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=b(`button`,{type:`button`,part:`button`,class:t.join(` `),"aria-pressed":this.selected?`true`:`false`,"aria-label":this.label??e??`color swatch`},b(`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 ga=new Set([`rose`,`cyan`,`violet`,`amber`,`waffle`,`green`]),_a=x(`
3748
3776
  :host {
3749
3777
  display: inline-flex;
3750
3778
  vertical-align: middle;
@@ -3804,7 +3832,7 @@ slicc-press-button {
3804
3832
  :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)); }
3805
3833
  :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)); }
3806
3834
  :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)); }
3807
- `);v(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[da]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get hue(){let e=this.getAttribute(`hue`);return e&&ua.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??b(`slot`),t=b(`span`,{class:`tag`,part:`tag`},this.dot?b(`span`,{class:`dot`,part:`dot`}):null,b(`span`,{class:`label`,part:`label`},e));this.#e.replaceChildren(t)}});var fa=`
3835
+ `);v(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[_a]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get hue(){let e=this.getAttribute(`hue`);return e&&ga.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??b(`slot`),t=b(`span`,{class:`tag`,part:`tag`},this.dot?b(`span`,{class:`dot`,part:`dot`}):null,b(`span`,{class:`label`,part:`label`},e));this.#e.replaceChildren(t)}});var va=`
3808
3836
  .slicc-chatpane {
3809
3837
  flex: 0 0 auto;
3810
3838
  width: calc(100% - 48px);
@@ -3847,7 +3875,7 @@ slicc-press-button {
3847
3875
  -webkit-mask-image: none;
3848
3876
  mask-image: none;
3849
3877
  }
3850
- `,pa=`slicc-chatpane-style`;function ma(e){if(e.getElementById(pa))return;let t=e.createElement(`style`);t.id=pa,t.textContent=fa,(e.head??e.documentElement).appendChild(t)}var ha=[`slicc-chat-thread`,`slicc-composer`];v(`slicc-chatpane`,class extends HTMLElement{static observedAttributes=[`narrow`];#e=null;#t=!1;connectedCallback(){ma(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 ha)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 ga=`
3878
+ `,ya=`slicc-chatpane-style`;function ba(e){if(e.getElementById(ya))return;let t=e.createElement(`style`);t.id=ya,t.textContent=va,(e.head??e.documentElement).appendChild(t)}var xa=[`slicc-chat-thread`,`slicc-composer`];v(`slicc-chatpane`,class extends HTMLElement{static observedAttributes=[`narrow`];#e=null;#t=!1;connectedCallback(){ba(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 xa)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 Sa=`
3851
3879
  .slicc-shell { display: flex; flex: 1; min-height: 0; }
3852
3880
  .slicc-shell > slicc-chatpane,
3853
3881
  .slicc-shell > .chatpane {
@@ -3899,7 +3927,7 @@ slicc-press-button {
3899
3927
  background: var(--bg);
3900
3928
  }
3901
3929
  }
3902
- `,_a=`slicc-shell-style`;function va(e){if(e.getElementById(_a))return;let t=e.createElement(`style`);t.id=_a,t.textContent=ga,(e.head??e.documentElement).appendChild(t)}v(`slicc-shell`,class extends HTMLElement{static observedAttributes=[`open`,`url-state`];#e=null;#t=null;#n=!1;#r=e=>{if(!this.urlState)return;let t=e.detail?.id;typeof t==`string`&&Oe(`ws`,t)};#i=()=>{this.urlState&&Oe(`ws`,null)};#a=()=>{if(!this.urlState)return;let e=E(`ws`);e?this.#o(e):this.open&&this.collapse()};connectedCallback(){if(va(this.ownerDocument),this.classList.add(`slicc-shell`),this.setAttribute(`part`,`shell`),this.#n=!0,this.#s(),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.#r),this.addEventListener(`slicc-dock-collapse`,this.#i),this.urlState){window.addEventListener(`popstate`,this.#a);let e=E(`ws`);e&&queueMicrotask(()=>this.#o(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.#r),this.removeEventListener(`slicc-dock-collapse`,this.#i),window.removeEventListener(`popstate`,this.#a)}get urlState(){return this.hasAttribute(`url-state`)}set urlState(e){this.toggleAttribute(`url-state`,e)}#o(e){this.dock?.selectItem?.(e)}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&this.isConnected&&this.#s()}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.#c(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}))}#s(){if(!this.#n)return;let e=this.open;this.chatpane?.toggleAttribute(`narrow`,e),this.workbench?.toggleAttribute(`open`,e)}#c(e){this.dock?.selectItem?.(e);let t=this.workbench;t?.selectSurface&&t.selectSurface(e),this.#s()}});var ya=x(`
3930
+ `,Ca=`slicc-shell-style`;function wa(e){if(e.getElementById(Ca))return;let t=e.createElement(`style`);t.id=Ca,t.textContent=Sa,(e.head??e.documentElement).appendChild(t)}v(`slicc-shell`,class extends HTMLElement{static observedAttributes=[`open`,`url-state`];#e=null;#t=null;#n=!1;#r=e=>{if(!this.urlState)return;let t=e.detail?.id;typeof t==`string`&&Ee(`ws`,t)};#i=()=>{this.urlState&&Ee(`ws`,null)};#a=()=>{if(!this.urlState)return;let e=O(`ws`);e?this.#o(e):this.open&&this.collapse()};connectedCallback(){if(wa(this.ownerDocument),this.classList.add(`slicc-shell`),this.setAttribute(`part`,`shell`),this.#n=!0,this.#s(),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.#r),this.addEventListener(`slicc-dock-collapse`,this.#i),this.urlState){window.addEventListener(`popstate`,this.#a);let e=O(`ws`);e&&queueMicrotask(()=>this.#o(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.#r),this.removeEventListener(`slicc-dock-collapse`,this.#i),window.removeEventListener(`popstate`,this.#a)}get urlState(){return this.hasAttribute(`url-state`)}set urlState(e){this.toggleAttribute(`url-state`,e)}#o(e){this.dock?.selectItem?.(e)}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&this.isConnected&&this.#s()}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.#c(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}))}#s(){if(!this.#n)return;let e=this.open;this.chatpane?.toggleAttribute(`narrow`,e),this.workbench?.toggleAttribute(`open`,e)}#c(e){this.dock?.selectItem?.(e);let t=this.workbench;t?.selectSurface&&t.selectSurface(e),this.#s()}});var Ta=x(`
3903
3931
  :host{display:inline-block;}
3904
3932
  .switcher-more{position:relative;}
3905
3933
  .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;}
@@ -3921,10 +3949,10 @@ slicc-press-button {
3921
3949
  .pop slicc-pill::part(label){display:block;}
3922
3950
  .pop slicc-pill::part(tip){display:none;}
3923
3951
  }
3924
- `);v(`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=[ya]}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=b(`slot`,{name:`more`},`⋯`);this.#r=b(`button`,{class:`morebtn`,part:`more`,type:`button`,title:`More scoops`,"aria-haspopup":`true`,"aria-expanded":`false`},e),this.#i=b(`div`,{class:`pop`,part:`pop`}),this.#n=b(`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(b(`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=b(`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 ba={cone:`var(--waffle)`,researcher:`var(--cyan)`,designer:`var(--violet)`,tester:`var(--amber)`,triage:`var(--green)`},xa=40,Sa=6,Ca=`
3952
+ `);v(`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=[Ta]}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=b(`slot`,{name:`more`},`⋯`);this.#r=b(`button`,{class:`morebtn`,part:`more`,type:`button`,title:`More scoops`,"aria-haspopup":`true`,"aria-expanded":`false`},e),this.#i=b(`div`,{class:`pop`,part:`pop`}),this.#n=b(`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(b(`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=b(`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 Ea={cone:`var(--waffle)`,researcher:`var(--cyan)`,designer:`var(--violet)`,tester:`var(--amber)`,triage:`var(--green)`},Da=40,Oa=6,ka=`
3925
3953
  .slicc-scoop-switcher {
3926
3954
  display: flex;
3927
- gap: ${Sa}px;
3955
+ gap: ${Oa}px;
3928
3956
  flex-wrap: nowrap;
3929
3957
  min-width: 0;
3930
3958
  overflow: hidden;
@@ -3972,7 +4000,7 @@ slicc-press-button {
3972
4000
  .slicc-scoop-switcher .scoop { width: 34px; }
3973
4001
  .slicc-scoop-switcher slicc-pill.scoop { --pill-w: 34px; }
3974
4002
  }
3975
- `,wa=`slicc-scoop-switcher-style`;function Ta(e){if(e.getElementById(wa))return;let t=e.createElement(`style`);t.id=wa,t.textContent=Ca,(e.head??e.documentElement).appendChild(t)}function Ea(e){return ba[e]??`var(--rose)`}function Da(e,t){let n=e.getAttribute(`eyes`);return n===`open`||n===`none`||n===`dead`?n:t}v(`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(){Ta(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)+Sa*Math.max(0,t.length-1)<=n+1){this.#_([]);return}let i=Math.max(0,n-xa),a=[],o=0;t.forEach((e,t)=>{if(t===0){o+=r[t];return}let n=Sa+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:Da(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=Ea(n);return b(`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:Da(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 Oa=`/**
4003
+ `,Aa=`slicc-scoop-switcher-style`;function ja(e){if(e.getElementById(Aa))return;let t=e.createElement(`style`);t.id=Aa,t.textContent=ka,(e.head??e.documentElement).appendChild(t)}function Ma(e){return Ea[e]??`var(--rose)`}function Na(e,t){let n=e.getAttribute(`eyes`);return n===`open`||n===`none`||n===`dead`?n:t}v(`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(){ja(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)+Oa*Math.max(0,t.length-1)<=n+1){this.#_([]);return}let i=Math.max(0,n-Da),a=[],o=0;t.forEach((e,t)=>{if(t===0){o+=r[t];return}let n=Oa+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:Na(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=Ma(n);return b(`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:Na(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 Pa=`/**
3976
4004
  * SLICC design tokens — lifted verbatim from the prototype
3977
4005
  * (proto/StellarRubySwift.html :root + body.dark). Light is the default; dark is
3978
4006
  * opt-in. Per project decision the prototype's token vocabulary and light-default
@@ -4036,7 +4064,7 @@ slicc-press-button {
4036
4064
  --shaderbg: #171410;
4037
4065
  --shadow-pane: rgba(0, 0, 0, 0.35) 0 8px 26px -10px;
4038
4066
  }
4039
- `,ka=`slicc-tokens`;function Aa(e=document){if(e.getElementById(ka))return;let t=e.createElement(`style`);t.id=ka,t.textContent=Oa,(e.head??e.documentElement).appendChild(t)}function ja(e,t=document.body){t.classList.toggle(`dark`,e===`dark`),t.setAttribute(`data-theme`,e)}function Ma(e=document.body){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>ja(t.matches?`dark`:`light`,e);return n(),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var Na=x(`
4067
+ `,Fa=`slicc-tokens`;function Ia(e=document){if(e.getElementById(Fa))return;let t=e.createElement(`style`);t.id=Fa,t.textContent=Pa,(e.head??e.documentElement).appendChild(t)}function La(e,t=document.body){t.classList.toggle(`dark`,e===`dark`),t.setAttribute(`data-theme`,e)}function Ra(e=document.body){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>La(t.matches?`dark`:`light`,e);return n(),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var za=x(`
4040
4068
  :host { display: inline-flex; flex: 0 0 auto; }
4041
4069
  .themetgl {
4042
4070
  font: inherit; font-family: var(--ui); font-size: 14px; line-height: 1;
@@ -4048,7 +4076,7 @@ slicc-press-button {
4048
4076
  }
4049
4077
  .themetgl:hover { background: color-mix(in srgb, var(--ink) 8%, var(--ghost)); }
4050
4078
  .themetgl svg { display: block; }
4051
- `),Pa=16,Fa={light:`moon`,dark:`sun`},Ia={light:`Switch to dark mode`,dark:`Switch to light mode`};v(`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=[Na];let e=b(`button`,{class:`themetgl`,part:`button`,type:`button`,"aria-pressed":`false`},b(`slot`,{name:`glyph-light`},s(Fa.light,{size:Pa})),b(`slot`,{name:`glyph-dark`,hidden:!0},s(Fa.dark,{size:Pa})));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(ja(e),this.getAttribute(`theme`)!==e&&this.setAttribute(`theme`,e),this.#t){this.#t.setAttribute(`aria-pressed`,e===`dark`?`true`:`false`),this.#t.title=Ia[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}))}}),v(`slicc-theme`,class extends HTMLElement{static observedAttributes=[`theme`];connectedCallback(){Aa(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;ja(e,this),this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}});var La=`
4079
+ `),Ba=16,Va={light:`moon`,dark:`sun`},Ha={light:`Switch to dark mode`,dark:`Switch to light mode`};v(`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=[za];let e=b(`button`,{class:`themetgl`,part:`button`,type:`button`,"aria-pressed":`false`},b(`slot`,{name:`glyph-light`},s(Va.light,{size:Ba})),b(`slot`,{name:`glyph-dark`,hidden:!0},s(Va.dark,{size:Ba})));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(La(e),this.getAttribute(`theme`)!==e&&this.setAttribute(`theme`,e),this.#t){this.#t.setAttribute(`aria-pressed`,e===`dark`?`true`:`false`),this.#t.title=Ha[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}))}}),v(`slicc-theme`,class extends HTMLElement{static observedAttributes=[`theme`];connectedCallback(){Ia(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;La(e,this),this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}});var Ua=`
4052
4080
  slicc-file-tree {
4053
4081
  width: 190px;
4054
4082
  flex: 0 0 auto;
@@ -4126,7 +4154,7 @@ slicc-file-tree .children[hidden] {
4126
4154
  [data-theme="dark"] slicc-file-tree .f.on {
4127
4155
  background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
4128
4156
  }
4129
- `,Ra=`slicc-file-tree-style`;function za(e){if(e.getElementById(Ra))return;let t=e.createElement(`style`);t.id=Ra,t.textContent=La,(e.head??e.documentElement).appendChild(t)}function Ba(e,t){let n=[];for(let r of e)if(r.kind===`group`)n.push(b(`div`,{class:`grp`},r.label));else if(r.kind===`dir`){let e=t.has(r.id);n.push(b(`div`,{class:e?`dir open`:`dir`,"data-dir-id":r.id,"aria-expanded":e?`true`:`false`},s(`chevron-right`,{size:14,class:`chev`}),r.label));let i=b(`div`,{class:`children`,hidden:e?void 0:!0});y(i,Ba(r.children??[],t)),n.push(i)}else n.push(b(`div`,{class:`f`,"data-id":r.id},r.label));return n}var Va=class extends HTMLElement{static get observedAttributes(){return[`selected`]}#e=null;#t=new Map;#n=new Set;#r=!1;#i=null;connectedCallback(){za(this.ownerDocument),this.#r||=(this.#e??(this.#e=this.#o(),this.#l()),!0),this.#s(),this.#d()}disconnectedCallback(){this.#i&&=(this.removeEventListener(`click`,this.#i),null)}attributeChangedCallback(e){e===`selected`&&this.#r&&this.isConnected&&this.#a()}get items(){return this.#e?this.#e.slice():[]}set items(e){this.#e=Array.isArray(e)?e.slice():[],this.#r=!0,this.#l(),this.isConnected&&(this.#s(),this.#d())}toggleDir(e){if(!this.#u(e,this.#e??[]))return;let t=!this.#n.has(e);t?this.#n.add(e):this.#n.delete(e),this.#s(),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){if(!this.querySelector(`.f[data-id="${Ha(e)}"]`))return;this.getAttribute(`selected`)!==e&&this.setAttribute(`selected`,e),this.#a();let t=this.#t.get(e)??e;this.dispatchEvent(new CustomEvent(`file-select`,{bubbles:!0,composed:!0,detail:{id:e,path:t}}))}#a(){let e=this.getAttribute(`selected`);for(let t of this.querySelectorAll(`.f`))t.classList.toggle(`on`,t.dataset.id===e)}#o(){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}#s(){let e=this.#e??[];this.#t.clear(),this.#c(e),this.replaceChildren(...Ba(e,this.#n)),this.#a()}#c(e){for(let t of e)t.kind===`file`?this.#t.set(t.id,t.path??t.label):t.kind===`dir`&&this.#c(t.children??[])}#l(){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??[])}#u(e,t){for(let n of t)if(n.kind===`dir`&&(n.id===e||this.#u(e,n.children??[])))return!0;return!1}#d(){this.#i||(this.#i=e=>{let t=e.target,n=t?.closest(`.dir`);if(n&&this.contains(n)){let e=n.dataset.dirId;e!=null&&this.toggleDir(e);return}let r=t?.closest(`.f`);if(!r||!this.contains(r))return;let i=r.dataset.id;i!=null&&this.selectFile(i)},this.addEventListener(`click`,this.#i))}};function Ha(e){return e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}v(`slicc-file-tree`,Va);var Ua=`
4157
+ `,Wa=`slicc-file-tree-style`;function Ga(e){if(e.getElementById(Wa))return;let t=e.createElement(`style`);t.id=Wa,t.textContent=Ua,(e.head??e.documentElement).appendChild(t)}function Ka(e,t){let n=[];for(let r of e)if(r.kind===`group`)n.push(b(`div`,{class:`grp`},r.label));else if(r.kind===`dir`){let e=t.has(r.id);n.push(b(`div`,{class:e?`dir open`:`dir`,"data-dir-id":r.id,"aria-expanded":e?`true`:`false`},s(`chevron-right`,{size:14,class:`chev`}),r.label));let i=b(`div`,{class:`children`,hidden:e?void 0:!0});y(i,Ka(r.children??[],t)),n.push(i)}else n.push(b(`div`,{class:`f`,"data-id":r.id},r.label));return n}var qa=class extends HTMLElement{static get observedAttributes(){return[`selected`]}#e=null;#t=new Map;#n=new Set;#r=!1;#i=null;connectedCallback(){Ga(this.ownerDocument),this.#r||=(this.#e??(this.#e=this.#o(),this.#l()),!0),this.#s(),this.#d()}disconnectedCallback(){this.#i&&=(this.removeEventListener(`click`,this.#i),null)}attributeChangedCallback(e){e===`selected`&&this.#r&&this.isConnected&&this.#a()}get items(){return this.#e?this.#e.slice():[]}set items(e){this.#e=Array.isArray(e)?e.slice():[],this.#r=!0,this.#l(),this.isConnected&&(this.#s(),this.#d())}toggleDir(e){if(!this.#u(e,this.#e??[]))return;let t=!this.#n.has(e);t?this.#n.add(e):this.#n.delete(e),this.#s(),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){if(!this.querySelector(`.f[data-id="${Ja(e)}"]`))return;this.getAttribute(`selected`)!==e&&this.setAttribute(`selected`,e),this.#a();let t=this.#t.get(e)??e;this.dispatchEvent(new CustomEvent(`file-select`,{bubbles:!0,composed:!0,detail:{id:e,path:t}}))}#a(){let e=this.getAttribute(`selected`);for(let t of this.querySelectorAll(`.f`))t.classList.toggle(`on`,t.dataset.id===e)}#o(){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}#s(){let e=this.#e??[];this.#t.clear(),this.#c(e),this.replaceChildren(...Ka(e,this.#n)),this.#a()}#c(e){for(let t of e)t.kind===`file`?this.#t.set(t.id,t.path??t.label):t.kind===`dir`&&this.#c(t.children??[])}#l(){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??[])}#u(e,t){for(let n of t)if(n.kind===`dir`&&(n.id===e||this.#u(e,n.children??[])))return!0;return!1}#d(){this.#i||(this.#i=e=>{let t=e.target,n=t?.closest(`.dir`);if(n&&this.contains(n)){let e=n.dataset.dirId;e!=null&&this.toggleDir(e);return}let r=t?.closest(`.f`);if(!r||!this.contains(r))return;let i=r.dataset.id;i!=null&&this.selectFile(i)},this.addEventListener(`click`,this.#i))}};function Ja(e){return e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}v(`slicc-file-tree`,qa);var Ya=`
4130
4158
  slicc-surface {
4131
4159
  position: absolute;
4132
4160
  inset: 0;
@@ -4158,7 +4186,7 @@ slicc-surface:fullscreen {
4158
4186
  background: var(--canvas, #fff);
4159
4187
  position: fixed;
4160
4188
  }
4161
- `,Wa=`slicc-surface-style`;function Ga(e){if(e.getElementById(Wa))return;let t=e.createElement(`style`);t.id=Wa,t.textContent=Ua,(e.head??e.documentElement).appendChild(t)}function Ka(e){return e===`block`||e===`column`?e:`flex`}v(`slicc-surface`,class extends HTMLElement{static observedAttributes=[`surface-id`,`active`,`layout`];connectedCallback(){Ga(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 Ka(this.getAttribute(`layout`))}set layout(e){this.setAttribute(`layout`,Ka(e))}#e(){let e=this.surfaceId;e==null?delete this.dataset.s:this.dataset.s=e}});var qa=x(`
4189
+ `,Xa=`slicc-surface-style`;function Za(e){if(e.getElementById(Xa))return;let t=e.createElement(`style`);t.id=Xa,t.textContent=Ya,(e.head??e.documentElement).appendChild(t)}function Qa(e){return e===`block`||e===`column`?e:`flex`}v(`slicc-surface`,class extends HTMLElement{static observedAttributes=[`surface-id`,`active`,`layout`];connectedCallback(){Za(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 Qa(this.getAttribute(`layout`))}set layout(e){this.setAttribute(`layout`,Qa(e))}#e(){let e=this.surfaceId;e==null?delete this.dataset.s:this.dataset.s=e}});var $a=x(`
4162
4190
  :host{display:inline-flex;white-space:nowrap;}
4163
4191
  .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;}
4164
4192
  .tab:hover{background:var(--ghost);color:var(--ink);}
@@ -4174,7 +4202,7 @@ slicc-surface:fullscreen {
4174
4202
  .x{margin-left:3px;width:15px;height:15px;border-radius:4px;display:grid;place-items:center;color:var(--txt-3);}
4175
4203
  .x:hover{background:var(--line);color:var(--ink);}
4176
4204
  .sg svg,.x svg{display:block;}
4177
- `),Ja=13;v(`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=[qa]}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=b(`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(b(`span`,{class:`sg`,part:`badge`,"aria-hidden":`true`},s(e,{size:Ja})))}else this.glyph!=null&&t.append(b(`span`,{class:`gl`,part:`glyph`,"aria-hidden":`true`},this.glyph));let n=this.label;t.append(n==null?b(`slot`):document.createTextNode(n)),this.closable&&t.append(b(`span`,{class:`x`,part:`close`,"data-close":``,role:`button`,"aria-label":`Close tab`},s(`x`,{size:Ja}))),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 Ya=`
4205
+ `),eo=13;v(`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=[$a]}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=b(`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(b(`span`,{class:`sg`,part:`badge`,"aria-hidden":`true`},s(e,{size:eo})))}else this.glyph!=null&&t.append(b(`span`,{class:`gl`,part:`glyph`,"aria-hidden":`true`},this.glyph));let n=this.label;t.append(n==null?b(`slot`):document.createTextNode(n)),this.closable&&t.append(b(`span`,{class:`x`,part:`close`,"data-close":``,role:`button`,"aria-label":`Close tab`},s(`x`,{size:eo}))),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 to=`
4178
4206
  slicc-tab-bar {
4179
4207
  display: flex;
4180
4208
  align-items: center;
@@ -4186,7 +4214,7 @@ slicc-tab-bar {
4186
4214
  slicc-tab-bar[hidden] {
4187
4215
  display: none;
4188
4216
  }
4189
- `,Xa=`slicc-tab-bar-style`;function Za(e){if(e.getElementById(Xa))return;let t=e.createElement(`style`);t.id=Xa,t.textContent=Ya,(e.head??e.documentElement).appendChild(t)}function Qa(e){return e===`sprinkle`?`sprinkle`:`tool`}v(`slicc-tab-bar`,class extends HTMLElement{static observedAttributes=[`active`];#e=[];#t=!1;#n=null;#r=null;#i=null;connectedCallback(){Za(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:Qa(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=Qa(n.kind);r!==`tool`&&t.push(b(`slicc-tab`,{"tab-id":n.id,kind:r,label:n.label,part:`tab`,closable:n.closable?!0:void 0,glyph:n.glyph||void 0,active:e!=null&&e===n.id?!0:void 0}))}this.replaceChildren(...t)}});var $a=`/**
4217
+ `,no=`slicc-tab-bar-style`;function ro(e){if(e.getElementById(no))return;let t=e.createElement(`style`);t.id=no,t.textContent=to,(e.head??e.documentElement).appendChild(t)}function io(e){return e===`sprinkle`?`sprinkle`:`tool`}v(`slicc-tab-bar`,class extends HTMLElement{static observedAttributes=[`active`];#e=[];#t=!1;#n=null;#r=null;#i=null;connectedCallback(){ro(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:io(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=io(n.kind);r!==`tool`&&t.push(b(`slicc-tab`,{"tab-id":n.id,kind:r,label:n.label,part:`tab`,closable:n.closable?!0:void 0,glyph:n.glyph||void 0,active:e!=null&&e===n.id?!0:void 0}))}this.replaceChildren(...t)}});var ao=`/**
4190
4218
  * Copyright (c) 2014 The xterm.js authors. All rights reserved.
4191
4219
  * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
4192
4220
  * https://github.com/chjj/term.js
@@ -4471,7 +4499,7 @@ slicc-tab-bar[hidden] {
4471
4499
  .xterm .xterm-scrollable-element > .shadow.top.left {
4472
4500
  box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
4473
4501
  }
4474
- `,eo={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`},to=`
4502
+ `,oo={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`},so=`
4475
4503
  :host {
4476
4504
  display: flex;
4477
4505
  flex-direction: column;
@@ -4512,7 +4540,7 @@ slicc-tab-bar[hidden] {
4512
4540
  /* xterm.js wants its container to size the canvas; let it fill. */
4513
4541
  .host .xterm { height: 100%; }
4514
4542
  .host .xterm-viewport { overflow-y: auto; }
4515
- `,no=null;function ro(){return no||=[x($a),x(to)],no}var io=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=ro();let e=b(`div`,{class:`hd`,part:`header`},s(`terminal`,{size:14}),b(`span`,{class:`title`},this.label),b(`span`,{class:`spacer`})),t=b(`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-DooSxjI5.js`),[]),t(()=>import(`./addon-fit-DthTIhi3.js`),[])]);if(this.#o||!this.#t)return;let r=new e({cursorBlink:!ao(),fontSize:12,lineHeight:1.25,fontFamily:`'IBM Plex Mono', 'Source Code Pro', 'JetBrains Mono', ui-monospace, monospace`,theme:eo,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 ao(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}v(`slicc-terminal`,io);var oo=`
4543
+ `,co=null;function lo(){return co||=[x(ao),x(so)],co}var uo=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=lo();let e=b(`div`,{class:`hd`,part:`header`},s(`terminal`,{size:14}),b(`span`,{class:`title`},this.label),b(`span`,{class:`spacer`})),t=b(`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-DooSxjI5.js`),[]),t(()=>import(`./addon-fit-DthTIhi3.js`),[])]);if(this.#o||!this.#t)return;let r=new e({cursorBlink:!fo(),fontSize:12,lineHeight:1.25,fontFamily:`'IBM Plex Mono', 'Source Code Pro', 'JetBrains Mono', ui-monospace, monospace`,theme:oo,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 fo(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}v(`slicc-terminal`,uo);var po=`
4516
4544
  slicc-workbench-body {
4517
4545
  flex: 1;
4518
4546
  min-height: 0;
@@ -4533,7 +4561,7 @@ slicc-workbench-body > * {
4533
4561
  slicc-workbench-body > .slicc-wbbody__active {
4534
4562
  display: flex;
4535
4563
  }
4536
- `,so=`slicc-workbench-body-style`,co=`slicc-wbbody__active`,lo=`slicc-surface`;function uo(e){if(e.getElementById(so))return;let t=e.createElement(`style`);t.id=so,t.textContent=oo,(e.head??e.documentElement).appendChild(t)}v(`slicc-workbench-body`,class extends HTMLElement{static observedAttributes=[`active`];#e=!1;#t=new MutationObserver(()=>this.#i());connectedCallback(){uo(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===lo&&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(co,n),t.toggleAttribute(`active`,n)}}});var fo=`
4564
+ `,mo=`slicc-workbench-body-style`,ho=`slicc-wbbody__active`,go=`slicc-surface`;function _o(e){if(e.getElementById(mo))return;let t=e.createElement(`style`);t.id=mo,t.textContent=po,(e.head??e.documentElement).appendChild(t)}v(`slicc-workbench-body`,class extends HTMLElement{static observedAttributes=[`active`];#e=!1;#t=new MutationObserver(()=>this.#i());connectedCallback(){_o(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===go&&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(ho,n),t.toggleAttribute(`active`,n)}}});var vo=`
4537
4565
  slicc-workbench-header {
4538
4566
  flex: 0 0 auto;
4539
4567
  display: flex;
@@ -4560,7 +4588,7 @@ slicc-workbench-header > slicc-collapse-btn {
4560
4588
  slicc-workbench-header > slicc-tab-bar {
4561
4589
  min-width: 0;
4562
4590
  }
4563
- `,po=`slicc-workbench-header-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)}v(`slicc-workbench-header`,class extends HTMLElement{static observedAttributes=[`kind`];#e;#t=!1;connectedCallback(){mo(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 ho=`
4591
+ `,yo=`slicc-workbench-header-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)}v(`slicc-workbench-header`,class extends HTMLElement{static observedAttributes=[`kind`];#e;#t=!1;connectedCallback(){bo(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 xo=`
4564
4592
  slicc-workbench-pane {
4565
4593
  display: flex;
4566
4594
  flex-direction: column;
@@ -4599,15 +4627,15 @@ slicc-workbench-pane slicc-pane .slicc-pane__body {
4599
4627
  flex-direction: column;
4600
4628
  min-height: 0;
4601
4629
  }
4602
- `,go=`slicc-workbench-pane-style`;function _o(e){if(e.getElementById(go))return;let t=e.createElement(`style`);t.id=go,t.textContent=ho,(e.head??e.documentElement).appendChild(t)}v(`slicc-workbench-pane`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=!1;connectedCallback(){_o(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 vo=e({DEFAULT_LAUNCHER_CORNER:()=>rr,DEFAULT_LAUNCHER_FOLLOWER_STATUS:()=>or,HOLD_TO_ENABLE_MS:()=>bt,LAUNCHER_FOLLOWER_STATUS_ATTR:()=>N,SliccImagePreview:()=>Xi,TOKENS_CSS:()=>Oa,ensureGlobalTokens:()=>Aa,followSystemTheme:()=>Ma,setTheme:()=>ja}),{entries:yo,setPrototypeOf:bo,isFrozen:xo,getPrototypeOf:So,getOwnPropertyDescriptor:Co}=Object,{freeze:I,seal:L,create:wo}=Object,{apply:To,construct:Eo}=typeof Reflect<`u`&&Reflect;I||=function(e){return e},L||=function(e){return e},To||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Eo||=function(e){return new e(...[...arguments].slice(1))};var Do=B(Array.prototype.forEach),Oo=B(Array.prototype.lastIndexOf),ko=B(Array.prototype.pop),Ao=B(Array.prototype.push),jo=B(Array.prototype.splice),Mo=B(String.prototype.toLowerCase),No=B(String.prototype.toString),Po=B(String.prototype.match),Fo=B(String.prototype.replace),Io=B(String.prototype.indexOf),Lo=B(String.prototype.trim),R=B(Object.prototype.hasOwnProperty),z=B(RegExp.prototype.test),Ro=zo(TypeError);function B(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return To(e,t,n)}}function zo(e){return function(){return Eo(e,[...arguments])}}function V(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Mo;bo&&bo(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(xo(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Bo(e){for(let t=0;t<e.length;t++)R(e,t)||(e[t]=null);return e}function H(e){let t=wo(null);for(let[n,r]of yo(e))R(e,n)&&(Array.isArray(r)?t[n]=Bo(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=H(r):t[n]=r);return t}function Vo(e,t){for(;e!==null;){let n=Co(e,t);if(n){if(n.get)return B(n.get);if(typeof n.value==`function`)return B(n.value)}e=So(e)}function n(){return null}return n}var Ho=I(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Uo=I(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Wo=I([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Go=I([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ko=I(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),qo=I([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Jo=I([`#text`]),Yo=I(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),Xo=I(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Zo=I(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Qo=I([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),$o=L(/\{\{[\w\W]*|[\w\W]*\}\}/gm),es=L(/<%[\w\W]*|[\w\W]*%>/gm),ts=L(/\$\{[\w\W]*/gm),ns=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),rs=L(/^aria-[\-\w]+$/),is=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),as=L(/^(?:\w+script|data):/i),os=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ss=L(/^html$/i),cs=L(/^[a-z][.\w]*(-[.\w]+)+$/i),ls=Object.freeze({__proto__:null,ARIA_ATTR:rs,ATTR_WHITESPACE:os,CUSTOM_ELEMENT:cs,DATA_ATTR:ns,DOCTYPE_NAME:ss,ERB_EXPR:es,IS_ALLOWED_URI:is,IS_SCRIPT_OR_DATA:as,MUSTACHE_EXPR:$o,TMPLIT_EXPR:ts}),us={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ds=function(){return typeof window>`u`?null:window},fs=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},ps=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ms(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ds(),t=e=>ms(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==us.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=Vo(m,`cloneNode`),g=Vo(m,`remove`),ee=Vo(m,`nextSibling`),te=Vo(m,`childNodes`),_=Vo(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let v,y=``,{implementation:b,createNodeIterator:x,createDocumentFragment:ne,getElementsByTagName:re}=n,{importNode:ie}=r,S=ps();t.isSupported=typeof yo==`function`&&typeof _==`function`&&b&&b.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ae,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:ce,ARIA_ATTR:le,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:de,CUSTOM_ELEMENT:fe}=ls,{IS_ALLOWED_URI:pe}=ls,C=null,me=V({},[...Ho,...Uo,...Wo,...Ko,...Jo]),w=null,he=V({},[...Yo,...Xo,...Zo,...Qo]),T=Object.seal(wo(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ge=null,_e=null,ve=Object.seal(wo(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ye=!0,be=!0,xe=!1,Se=!0,Ce=!1,we=!0,Te=!1,Ee=!1,De=!1,E=!1,Oe=!1,ke=!1,Ae=!0,je=!1,Me=!0,Ne=!1,Pe={},D=null,Fe=V({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Ie=null,Le=V({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Re=null,ze=V({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Be=`http://www.w3.org/1998/Math/MathML`,Ve=`http://www.w3.org/2000/svg`,O=`http://www.w3.org/1999/xhtml`,He=O,k=!1,Ue=null,We=V({},[Be,Ve,O],No),Ge=V({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Ke=V({},[`annotation-xml`]),qe=V({},[`title`,`style`,`font`,`a`,`script`]),Je=null,Ye=[`application/xhtml+xml`,`text/html`],A=null,Xe=null,Ze=n.createElement(`form`),Qe=function(e){return e instanceof RegExp||e instanceof Function},$e=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Xe&&Xe===e)){if((!e||typeof e!=`object`)&&(e={}),e=H(e),Je=Ye.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,A=Je===`application/xhtml+xml`?No:Mo,C=R(e,`ALLOWED_TAGS`)?V({},e.ALLOWED_TAGS,A):me,w=R(e,`ALLOWED_ATTR`)?V({},e.ALLOWED_ATTR,A):he,Ue=R(e,`ALLOWED_NAMESPACES`)?V({},e.ALLOWED_NAMESPACES,No):We,Re=R(e,`ADD_URI_SAFE_ATTR`)?V(H(ze),e.ADD_URI_SAFE_ATTR,A):ze,Ie=R(e,`ADD_DATA_URI_TAGS`)?V(H(Le),e.ADD_DATA_URI_TAGS,A):Le,D=R(e,`FORBID_CONTENTS`)?V({},e.FORBID_CONTENTS,A):Fe,ge=R(e,`FORBID_TAGS`)?V({},e.FORBID_TAGS,A):H({}),_e=R(e,`FORBID_ATTR`)?V({},e.FORBID_ATTR,A):H({}),Pe=R(e,`USE_PROFILES`)?e.USE_PROFILES:!1,ye=e.ALLOW_ARIA_ATTR!==!1,be=e.ALLOW_DATA_ATTR!==!1,xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ce=e.SAFE_FOR_TEMPLATES||!1,we=e.SAFE_FOR_XML!==!1,Te=e.WHOLE_DOCUMENT||!1,E=e.RETURN_DOM||!1,Oe=e.RETURN_DOM_FRAGMENT||!1,ke=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,Ae=e.SANITIZE_DOM!==!1,je=e.SANITIZE_NAMED_PROPS||!1,Me=e.KEEP_CONTENT!==!1,Ne=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||is,He=e.NAMESPACE||O,Ge=e.MATHML_TEXT_INTEGRATION_POINTS||Ge,Ke=e.HTML_INTEGRATION_POINTS||Ke,T=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(T.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(T.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(T.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(be=!1),Oe&&(E=!0),Pe&&(C=V({},Jo),w=wo(null),Pe.html===!0&&(V(C,Ho),V(w,Yo)),Pe.svg===!0&&(V(C,Uo),V(w,Xo),V(w,Qo)),Pe.svgFilters===!0&&(V(C,Wo),V(w,Xo),V(w,Qo)),Pe.mathMl===!0&&(V(C,Ko),V(w,Zo),V(w,Qo))),R(e,`ADD_TAGS`)||(ve.tagCheck=null),R(e,`ADD_ATTR`)||(ve.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?ve.tagCheck=e.ADD_TAGS:(C===me&&(C=H(C)),V(C,e.ADD_TAGS,A))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?ve.attributeCheck=e.ADD_ATTR:(w===he&&(w=H(w)),V(w,e.ADD_ATTR,A))),e.ADD_URI_SAFE_ATTR&&V(Re,e.ADD_URI_SAFE_ATTR,A),e.FORBID_CONTENTS&&(D===Fe&&(D=H(D)),V(D,e.FORBID_CONTENTS,A)),e.ADD_FORBID_CONTENTS&&(D===Fe&&(D=H(D)),V(D,e.ADD_FORBID_CONTENTS,A)),Me&&(C[`#text`]=!0),Te&&V(C,[`html`,`head`,`body`]),C.table&&(V(C,[`tbody`]),delete ge.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Ro(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Ro(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);v=e.TRUSTED_TYPES_POLICY,y=v.createHTML(``)}else v===void 0&&(v=fs(p,i)),v!==null&&typeof y==`string`&&(y=v.createHTML(``));I&&I(e),Xe=e}},et=V({},[...Uo,...Wo,...Go]),tt=V({},[...Ko,...qo]),nt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:He,tagName:`template`});let n=Mo(e.tagName),r=Mo(t.tagName);return Ue[e.namespaceURI]?e.namespaceURI===Ve?t.namespaceURI===O?n===`svg`:t.namespaceURI===Be?n===`svg`&&(r===`annotation-xml`||Ge[r]):!!et[n]:e.namespaceURI===Be?t.namespaceURI===O?n===`math`:t.namespaceURI===Ve?n===`math`&&Ke[r]:!!tt[n]:e.namespaceURI===O?t.namespaceURI===Ve&&!Ke[r]||t.namespaceURI===Be&&!Ge[r]?!1:!tt[n]&&(qe[n]||!et[n]):!!(Je===`application/xhtml+xml`&&Ue[e.namespaceURI]):!1},rt=function(e){Ao(t.removed,{element:e});try{_(e).removeChild(e)}catch{g(e)}},j=function(e,n){try{Ao(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Ao(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(E||Oe)try{rt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},it=function(e){let t=null,r=null;if(De)e=`<remove></remove>`+e;else{let t=Po(e,/^[\r\n\t ]+/);r=t&&t[0]}Je===`application/xhtml+xml`&&He===O&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=v?v.createHTML(e):e;if(He===O)try{t=new f().parseFromString(i,Je)}catch{}if(!t||!t.documentElement){t=b.createDocument(He,`template`,null);try{t.documentElement.innerHTML=k?y:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),He===O?re.call(t,Te?`html`:`body`)[0]:Te?t.documentElement:a},at=function(e){return x.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ot=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},st=function(e){return typeof s==`function`&&e instanceof s};function M(e,n,r){Do(e,e=>{e.call(t,n,r,Xe)})}let ct=function(e){let n=null;if(M(S.beforeSanitizeElements,e,null),ot(e))return rt(e),!0;let r=A(e.nodeName);if(M(S.uponSanitizeElement,e,{tagName:r,allowedTags:C}),we&&e.hasChildNodes()&&!st(e.firstElementChild)&&z(/<[/\w!]/g,e.innerHTML)&&z(/<[/\w!]/g,e.textContent)||e.nodeType===us.progressingInstruction||we&&e.nodeType===us.comment&&z(/<[/\w]/g,e.data))return rt(e),!0;if(!(ve.tagCheck instanceof Function&&ve.tagCheck(r))&&(!C[r]||ge[r])){if(!ge[r]&&ut(r)&&(T.tagNameCheck instanceof RegExp&&z(T.tagNameCheck,r)||T.tagNameCheck instanceof Function&&T.tagNameCheck(r)))return!1;if(Me&&!D[r]){let t=_(e)||e.parentNode,n=te(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ee(e))}}}return rt(e),!0}return e instanceof c&&!nt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&z(/<\/no(script|embed|frames)/i,e.innerHTML)?(rt(e),!0):(Ce&&e.nodeType===us.text&&(n=e.textContent,Do([ae,oe,se],e=>{n=Fo(n,e,` `)}),e.textContent!==n&&(Ao(t.removed,{element:e.cloneNode()}),e.textContent=n)),M(S.afterSanitizeElements,e,null),!1)},lt=function(e,t,r){if(_e[t]||Ae&&(t===`id`||t===`name`)&&(r in n||r in Ze))return!1;if(!(be&&!_e[t]&&z(ce,t))&&!(ye&&z(le,t))&&!(ve.attributeCheck instanceof Function&&ve.attributeCheck(t,e))){if(!w[t]||_e[t]){if(!(ut(e)&&(T.tagNameCheck instanceof RegExp&&z(T.tagNameCheck,e)||T.tagNameCheck instanceof Function&&T.tagNameCheck(e))&&(T.attributeNameCheck instanceof RegExp&&z(T.attributeNameCheck,t)||T.attributeNameCheck instanceof Function&&T.attributeNameCheck(t,e))||t===`is`&&T.allowCustomizedBuiltInElements&&(T.tagNameCheck instanceof RegExp&&z(T.tagNameCheck,r)||T.tagNameCheck instanceof Function&&T.tagNameCheck(r))))return!1}else if(!Re[t]&&!z(pe,Fo(r,de,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Io(r,`data:`)===0&&Ie[e])&&!(xe&&!z(ue,Fo(r,de,``)))&&r)return!1}return!0},ut=function(e){return e!==`annotation-xml`&&Po(e,fe)},dt=function(e){M(S.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||ot(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:w,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=A(a),l=s,u=a===`value`?l:Lo(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,M(S.uponSanitizeAttribute,e,r),u=r.attrValue,je&&(c===`id`||c===`name`)&&(j(a,e),u=`user-content-`+u),we&&z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){j(a,e);continue}if(c===`attributename`&&Po(u,`href`)){j(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){j(a,e);continue}if(!Se&&z(/\/>/i,u)){j(a,e);continue}Ce&&Do([ae,oe,se],e=>{u=Fo(u,e,` `)});let d=A(e.nodeName);if(!lt(d,c,u)){j(a,e);continue}if(v&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=v.createHTML(u);break;case`TrustedScriptURL`:u=v.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),ot(e)?rt(e):ko(t.removed)}catch{j(a,e)}}M(S.afterSanitizeAttributes,e,null)},ft=function e(t){let n=null,r=at(t);for(M(S.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)M(S.uponSanitizeShadowNode,n,null),ct(n),dt(n),n.content instanceof a&&e(n.content);M(S.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(k=!e,k&&(e=`<!-->`),typeof e!=`string`&&!st(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Ro(`dirty is not a string, aborting`)}else throw Ro(`toString is not a function`);if(!t.isSupported)return e;if(Ee||$e(n),t.removed=[],typeof e==`string`&&(Ne=!1),Ne){if(e.nodeName){let t=A(e.nodeName);if(!C[t]||ge[t])throw Ro(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=it(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===us.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!E&&!Ce&&!Te&&e.indexOf(`<`)===-1)return v&&ke?v.createHTML(e):e;if(i=it(e),!i)return E?null:ke?y:``}i&&De&&rt(i.firstChild);let u=at(Ne?e:i);for(;c=u.nextNode();)ct(c),dt(c),c.content instanceof a&&ft(c.content);if(Ne)return e;if(E){if(Oe)for(l=ne.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(w.shadowroot||w.shadowrootmode)&&(l=ie.call(r,l,!0)),l}let d=Te?i.outerHTML:i.innerHTML;return Te&&C[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&z(ss,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
4603
- `+d),Ce&&Do([ae,oe,se],e=>{d=Fo(d,e,` `)}),v&&ke?v.createHTML(d):d},t.setConfig=function(){$e(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Ee=!0},t.clearConfig=function(){Xe=null,Ee=!1},t.isValidAttribute=function(e,t,n){return Xe||$e({}),lt(A(e),A(t),n)},t.addHook=function(e,t){typeof t==`function`&&Ao(S[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=Oo(S[e],t);return n===-1?void 0:jo(S[e],n,1)[0]}return ko(S[e])},t.removeHooks=function(e){S[e]=[]},t.removeAllHooks=function(){S=ps()},t}var U=ms(),hs=U.sanitize.bind(U);U.isSupported,U.addHook.bind(U),U.removeHook.bind(U),U.removeHooks.bind(U),U.removeAllHooks.bind(U),U.setConfig.bind(U),U.clearConfig.bind(U),U.isValidAttribute.bind(U),U.version,U.removed;function gs(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _s=gs();function vs(e){_s=e}var ys={exec:()=>null};function W(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(G.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var bs=(()=>{try{return!0}catch{return!1}})(),G={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},xs=/^(?:[ \t]*(?:\n|$))+/,Ss=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Cs=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ws=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ts=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Es=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ds=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Os=W(Ds).replace(/bull/g,Es).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),ks=W(Ds).replace(/bull/g,Es).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),As=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,js=/^[^\n]+/,Ms=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ns=W(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Ms).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ps=W(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Es).getRegex(),Fs=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Is=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ls=W(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Is).replace(`tag`,Fs).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Rs=W(As).replace(`hr`,ws).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Fs).getRegex(),zs={blockquote:W(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Rs).getRegex(),code:Ss,def:Ns,fences:Cs,heading:Ts,hr:ws,html:Ls,lheading:Os,list:Ps,newline:xs,paragraph:Rs,table:ys,text:js},Bs=W(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,ws).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Fs).getRegex(),Vs={...zs,lheading:ks,table:Bs,paragraph:W(As).replace(`hr`,ws).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Bs).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Fs).getRegex()},Hs={...zs,html:W(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Is).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ys,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:W(As).replace(`hr`,ws).replace(`heading`,` *#{1,6} *[^
4604
- ]`).replace(`lheading`,Os).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Us=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ws=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Gs=/^( {2,}|\\)\n(?!\s*$)/,Ks=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qs=/[\p{P}\p{S}]/u,Js=/[\s\p{P}\p{S}]/u,Ys=/[^\s\p{P}\p{S}]/u,Xs=W(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Js).getRegex(),Zs=/(?!~)[\p{P}\p{S}]/u,Qs=/(?!~)[\s\p{P}\p{S}]/u,$s=/(?:[^\s\p{P}\p{S}]|~)/u,ec=W(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,bs?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),tc=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,nc=W(tc,`u`).replace(/punct/g,qs).getRegex(),rc=W(tc,`u`).replace(/punct/g,Zs).getRegex(),ic=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,ac=W(ic,`gu`).replace(/notPunctSpace/g,Ys).replace(/punctSpace/g,Js).replace(/punct/g,qs).getRegex(),oc=W(ic,`gu`).replace(/notPunctSpace/g,$s).replace(/punctSpace/g,Qs).replace(/punct/g,Zs).getRegex(),sc=W(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Ys).replace(/punctSpace/g,Js).replace(/punct/g,qs).getRegex(),cc=W(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,qs).getRegex(),lc=W(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Ys).replace(/punctSpace/g,Js).replace(/punct/g,qs).getRegex(),uc=W(/\\(punct)/,`gu`).replace(/punct/g,qs).getRegex(),dc=W(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),fc=W(Is).replace(`(?:-->|$)`,`-->`).getRegex(),pc=W(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,fc).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),mc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,hc=W(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,mc).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gc=W(/^!?\[(label)\]\[(ref)\]/).replace(`label`,mc).replace(`ref`,Ms).getRegex(),_c=W(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Ms).getRegex(),vc=W(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,gc).replace(`nolink`,_c).getRegex(),yc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,bc={_backpedal:ys,anyPunctuation:uc,autolink:dc,blockSkip:ec,br:Gs,code:Ws,del:ys,delLDelim:ys,delRDelim:ys,emStrongLDelim:nc,emStrongRDelimAst:ac,emStrongRDelimUnd:sc,escape:Us,link:hc,nolink:_c,punctuation:Xs,reflink:gc,reflinkSearch:vc,tag:pc,text:Ks,url:ys},xc={...bc,link:W(/^!?\[(label)\]\((.*?)\)/).replace(`label`,mc).getRegex(),reflink:W(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,mc).getRegex()},Sc={...bc,emStrongRDelimAst:oc,emStrongLDelim:rc,delLDelim:cc,delRDelim:lc,url:W(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,yc).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:W(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,yc).getRegex()},Cc={...Sc,br:W(Gs).replace(`{2,}`,`*`).getRegex(),text:W(Sc.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},wc={normal:zs,gfm:Vs,pedantic:Hs},Tc={normal:bc,gfm:Sc,breaks:Cc,pedantic:xc},Ec={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Dc=e=>Ec[e];function K(e,t){if(t){if(G.escapeTest.test(e))return e.replace(G.escapeReplace,Dc)}else if(G.escapeTestNoEncode.test(e))return e.replace(G.escapeReplaceNoEncode,Dc);return e}function Oc(e){try{e=encodeURI(e).replace(G.percentDecode,`%`)}catch{return null}return e}function kc(e,t){let n=e.replace(G.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(G.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(G.slashPipe,`|`);return n}function Ac(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function jc(e){let t=e.split(`
4630
+ `,So=`slicc-workbench-pane-style`;function Co(e){if(e.getElementById(So))return;let t=e.createElement(`style`);t.id=So,t.textContent=xo,(e.head??e.documentElement).appendChild(t)}v(`slicc-workbench-pane`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=!1;connectedCallback(){Co(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 wo=e({DEFAULT_LAUNCHER_CORNER:()=>cr,DEFAULT_LAUNCHER_FOLLOWER_STATUS:()=>dr,HOLD_TO_ENABLE_MS:()=>yt,LAUNCHER_FOLLOWER_STATUS_ATTR:()=>P,SliccImagePreview:()=>na,TOKENS_CSS:()=>Pa,ensureGlobalTokens:()=>Ia,followSystemTheme:()=>Ra,setTheme:()=>La}),{entries:To,setPrototypeOf:Eo,isFrozen:Do,getPrototypeOf:Oo,getOwnPropertyDescriptor:ko}=Object,{freeze:I,seal:L,create:Ao}=Object,{apply:jo,construct:Mo}=typeof Reflect<`u`&&Reflect;I||=function(e){return e},L||=function(e){return e},jo||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Mo||=function(e){return new e(...[...arguments].slice(1))};var No=B(Array.prototype.forEach),Po=B(Array.prototype.lastIndexOf),Fo=B(Array.prototype.pop),Io=B(Array.prototype.push),Lo=B(Array.prototype.splice),Ro=B(String.prototype.toLowerCase),zo=B(String.prototype.toString),Bo=B(String.prototype.match),Vo=B(String.prototype.replace),Ho=B(String.prototype.indexOf),Uo=B(String.prototype.trim),R=B(Object.prototype.hasOwnProperty),z=B(RegExp.prototype.test),Wo=Go(TypeError);function B(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return jo(e,t,n)}}function Go(e){return function(){return Mo(e,[...arguments])}}function V(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ro;Eo&&Eo(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Do(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ko(e){for(let t=0;t<e.length;t++)R(e,t)||(e[t]=null);return e}function H(e){let t=Ao(null);for(let[n,r]of To(e))R(e,n)&&(Array.isArray(r)?t[n]=Ko(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=H(r):t[n]=r);return t}function qo(e,t){for(;e!==null;){let n=ko(e,t);if(n){if(n.get)return B(n.get);if(typeof n.value==`function`)return B(n.value)}e=Oo(e)}function n(){return null}return n}var Jo=I(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Yo=I(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Xo=I([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Zo=I([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Qo=I(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),$o=I([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),es=I([`#text`]),ts=I(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),ns=I(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),rs=I(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),is=I([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),as=L(/\{\{[\w\W]*|[\w\W]*\}\}/gm),os=L(/<%[\w\W]*|[\w\W]*%>/gm),ss=L(/\$\{[\w\W]*/gm),cs=L(/^data-[\-\w.\u00B7-\uFFFF]+$/),ls=L(/^aria-[\-\w]+$/),us=L(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ds=L(/^(?:\w+script|data):/i),fs=L(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ps=L(/^html$/i),ms=L(/^[a-z][.\w]*(-[.\w]+)+$/i),hs=Object.freeze({__proto__:null,ARIA_ATTR:ls,ATTR_WHITESPACE:fs,CUSTOM_ELEMENT:ms,DATA_ATTR:cs,DOCTYPE_NAME:ps,ERB_EXPR:os,IS_ALLOWED_URI:us,IS_SCRIPT_OR_DATA:ds,MUSTACHE_EXPR:as,TMPLIT_EXPR:ss}),gs={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},_s=function(){return typeof window>`u`?null:window},vs=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},ys=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function bs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_s(),t=e=>bs(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==gs.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=qo(m,`cloneNode`),g=qo(m,`remove`),ee=qo(m,`nextSibling`),te=qo(m,`childNodes`),_=qo(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let v,y=``,{implementation:b,createNodeIterator:x,createDocumentFragment:ne,getElementsByTagName:re}=n,{importNode:ie}=r,S=ys();t.isSupported=typeof To==`function`&&typeof _==`function`&&b&&b.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ae,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:ce,ARIA_ATTR:le,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:de,CUSTOM_ELEMENT:fe}=hs,{IS_ALLOWED_URI:pe}=hs,C=null,me=V({},[...Jo,...Yo,...Xo,...Qo,...es]),w=null,he=V({},[...ts,...ns,...rs,...is]),T=Object.seal(Ao(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ge=null,_e=null,E=Object.seal(Ao(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ve=!0,ye=!0,be=!1,xe=!0,Se=!1,Ce=!0,D=!1,we=!1,Te=!1,O=!1,Ee=!1,De=!1,Oe=!0,ke=!1,Ae=!0,je=!1,Me={},k=null,Ne=V({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Pe=null,Fe=V({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ie=null,Le=V({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Re=`http://www.w3.org/1998/Math/MathML`,ze=`http://www.w3.org/2000/svg`,A=`http://www.w3.org/1999/xhtml`,Be=A,j=!1,Ve=null,He=V({},[Re,ze,A],zo),Ue=V({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),We=V({},[`annotation-xml`]),Ge=V({},[`title`,`style`,`font`,`a`,`script`]),Ke=null,qe=[`application/xhtml+xml`,`text/html`],M=null,Je=null,Ye=n.createElement(`form`),Xe=function(e){return e instanceof RegExp||e instanceof Function},Ze=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Je&&Je===e)){if((!e||typeof e!=`object`)&&(e={}),e=H(e),Ke=qe.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,M=Ke===`application/xhtml+xml`?zo:Ro,C=R(e,`ALLOWED_TAGS`)?V({},e.ALLOWED_TAGS,M):me,w=R(e,`ALLOWED_ATTR`)?V({},e.ALLOWED_ATTR,M):he,Ve=R(e,`ALLOWED_NAMESPACES`)?V({},e.ALLOWED_NAMESPACES,zo):He,Ie=R(e,`ADD_URI_SAFE_ATTR`)?V(H(Le),e.ADD_URI_SAFE_ATTR,M):Le,Pe=R(e,`ADD_DATA_URI_TAGS`)?V(H(Fe),e.ADD_DATA_URI_TAGS,M):Fe,k=R(e,`FORBID_CONTENTS`)?V({},e.FORBID_CONTENTS,M):Ne,ge=R(e,`FORBID_TAGS`)?V({},e.FORBID_TAGS,M):H({}),_e=R(e,`FORBID_ATTR`)?V({},e.FORBID_ATTR,M):H({}),Me=R(e,`USE_PROFILES`)?e.USE_PROFILES:!1,ve=e.ALLOW_ARIA_ATTR!==!1,ye=e.ALLOW_DATA_ATTR!==!1,be=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=e.SAFE_FOR_TEMPLATES||!1,Ce=e.SAFE_FOR_XML!==!1,D=e.WHOLE_DOCUMENT||!1,O=e.RETURN_DOM||!1,Ee=e.RETURN_DOM_FRAGMENT||!1,De=e.RETURN_TRUSTED_TYPE||!1,Te=e.FORCE_BODY||!1,Oe=e.SANITIZE_DOM!==!1,ke=e.SANITIZE_NAMED_PROPS||!1,Ae=e.KEEP_CONTENT!==!1,je=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||us,Be=e.NAMESPACE||A,Ue=e.MATHML_TEXT_INTEGRATION_POINTS||Ue,We=e.HTML_INTEGRATION_POINTS||We,T=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Xe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(T.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Xe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(T.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(T.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(ye=!1),Ee&&(O=!0),Me&&(C=V({},es),w=Ao(null),Me.html===!0&&(V(C,Jo),V(w,ts)),Me.svg===!0&&(V(C,Yo),V(w,ns),V(w,is)),Me.svgFilters===!0&&(V(C,Xo),V(w,ns),V(w,is)),Me.mathMl===!0&&(V(C,Qo),V(w,rs),V(w,is))),R(e,`ADD_TAGS`)||(E.tagCheck=null),R(e,`ADD_ATTR`)||(E.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?E.tagCheck=e.ADD_TAGS:(C===me&&(C=H(C)),V(C,e.ADD_TAGS,M))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?E.attributeCheck=e.ADD_ATTR:(w===he&&(w=H(w)),V(w,e.ADD_ATTR,M))),e.ADD_URI_SAFE_ATTR&&V(Ie,e.ADD_URI_SAFE_ATTR,M),e.FORBID_CONTENTS&&(k===Ne&&(k=H(k)),V(k,e.FORBID_CONTENTS,M)),e.ADD_FORBID_CONTENTS&&(k===Ne&&(k=H(k)),V(k,e.ADD_FORBID_CONTENTS,M)),Ae&&(C[`#text`]=!0),D&&V(C,[`html`,`head`,`body`]),C.table&&(V(C,[`tbody`]),delete ge.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Wo(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Wo(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);v=e.TRUSTED_TYPES_POLICY,y=v.createHTML(``)}else v===void 0&&(v=vs(p,i)),v!==null&&typeof y==`string`&&(y=v.createHTML(``));I&&I(e),Je=e}},Qe=V({},[...Yo,...Xo,...Zo]),$e=V({},[...Qo,...$o]),et=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Be,tagName:`template`});let n=Ro(e.tagName),r=Ro(t.tagName);return Ve[e.namespaceURI]?e.namespaceURI===ze?t.namespaceURI===A?n===`svg`:t.namespaceURI===Re?n===`svg`&&(r===`annotation-xml`||Ue[r]):!!Qe[n]:e.namespaceURI===Re?t.namespaceURI===A?n===`math`:t.namespaceURI===ze?n===`math`&&We[r]:!!$e[n]:e.namespaceURI===A?t.namespaceURI===ze&&!We[r]||t.namespaceURI===Re&&!Ue[r]?!1:!$e[n]&&(Ge[n]||!Qe[n]):!!(Ke===`application/xhtml+xml`&&Ve[e.namespaceURI]):!1},tt=function(e){Io(t.removed,{element:e});try{_(e).removeChild(e)}catch{g(e)}},nt=function(e,n){try{Io(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Io(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(O||Ee)try{tt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},rt=function(e){let t=null,r=null;if(Te)e=`<remove></remove>`+e;else{let t=Bo(e,/^[\r\n\t ]+/);r=t&&t[0]}Ke===`application/xhtml+xml`&&Be===A&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=v?v.createHTML(e):e;if(Be===A)try{t=new f().parseFromString(i,Ke)}catch{}if(!t||!t.documentElement){t=b.createDocument(Be,`template`,null);try{t.documentElement.innerHTML=j?y:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Be===A?re.call(t,D?`html`:`body`)[0]:D?t.documentElement:a},it=function(e){return x.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},at=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},ot=function(e){return typeof s==`function`&&e instanceof s};function N(e,n,r){No(e,e=>{e.call(t,n,r,Je)})}let st=function(e){let n=null;if(N(S.beforeSanitizeElements,e,null),at(e))return tt(e),!0;let r=M(e.nodeName);if(N(S.uponSanitizeElement,e,{tagName:r,allowedTags:C}),Ce&&e.hasChildNodes()&&!ot(e.firstElementChild)&&z(/<[/\w!]/g,e.innerHTML)&&z(/<[/\w!]/g,e.textContent)||e.nodeType===gs.progressingInstruction||Ce&&e.nodeType===gs.comment&&z(/<[/\w]/g,e.data))return tt(e),!0;if(!(E.tagCheck instanceof Function&&E.tagCheck(r))&&(!C[r]||ge[r])){if(!ge[r]&&lt(r)&&(T.tagNameCheck instanceof RegExp&&z(T.tagNameCheck,r)||T.tagNameCheck instanceof Function&&T.tagNameCheck(r)))return!1;if(Ae&&!k[r]){let t=_(e)||e.parentNode,n=te(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ee(e))}}}return tt(e),!0}return e instanceof c&&!et(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&z(/<\/no(script|embed|frames)/i,e.innerHTML)?(tt(e),!0):(Se&&e.nodeType===gs.text&&(n=e.textContent,No([ae,oe,se],e=>{n=Vo(n,e,` `)}),e.textContent!==n&&(Io(t.removed,{element:e.cloneNode()}),e.textContent=n)),N(S.afterSanitizeElements,e,null),!1)},ct=function(e,t,r){if(_e[t]||Oe&&(t===`id`||t===`name`)&&(r in n||r in Ye))return!1;if(!(ye&&!_e[t]&&z(ce,t))&&!(ve&&z(le,t))&&!(E.attributeCheck instanceof Function&&E.attributeCheck(t,e))){if(!w[t]||_e[t]){if(!(lt(e)&&(T.tagNameCheck instanceof RegExp&&z(T.tagNameCheck,e)||T.tagNameCheck instanceof Function&&T.tagNameCheck(e))&&(T.attributeNameCheck instanceof RegExp&&z(T.attributeNameCheck,t)||T.attributeNameCheck instanceof Function&&T.attributeNameCheck(t,e))||t===`is`&&T.allowCustomizedBuiltInElements&&(T.tagNameCheck instanceof RegExp&&z(T.tagNameCheck,r)||T.tagNameCheck instanceof Function&&T.tagNameCheck(r))))return!1}else if(!Ie[t]&&!z(pe,Vo(r,de,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Ho(r,`data:`)===0&&Pe[e])&&!(be&&!z(ue,Vo(r,de,``)))&&r)return!1}return!0},lt=function(e){return e!==`annotation-xml`&&Bo(e,fe)},ut=function(e){N(S.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||at(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:w,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=M(a),l=s,u=a===`value`?l:Uo(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,N(S.uponSanitizeAttribute,e,r),u=r.attrValue,ke&&(c===`id`||c===`name`)&&(nt(a,e),u=`user-content-`+u),Ce&&z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){nt(a,e);continue}if(c===`attributename`&&Bo(u,`href`)){nt(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){nt(a,e);continue}if(!xe&&z(/\/>/i,u)){nt(a,e);continue}Se&&No([ae,oe,se],e=>{u=Vo(u,e,` `)});let d=M(e.nodeName);if(!ct(d,c,u)){nt(a,e);continue}if(v&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=v.createHTML(u);break;case`TrustedScriptURL`:u=v.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),at(e)?tt(e):Fo(t.removed)}catch{nt(a,e)}}N(S.afterSanitizeAttributes,e,null)},dt=function e(t){let n=null,r=it(t);for(N(S.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)N(S.uponSanitizeShadowNode,n,null),st(n),ut(n),n.content instanceof a&&e(n.content);N(S.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(j=!e,j&&(e=`<!-->`),typeof e!=`string`&&!ot(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Wo(`dirty is not a string, aborting`)}else throw Wo(`toString is not a function`);if(!t.isSupported)return e;if(we||Ze(n),t.removed=[],typeof e==`string`&&(je=!1),je){if(e.nodeName){let t=M(e.nodeName);if(!C[t]||ge[t])throw Wo(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=rt(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===gs.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!O&&!Se&&!D&&e.indexOf(`<`)===-1)return v&&De?v.createHTML(e):e;if(i=rt(e),!i)return O?null:De?y:``}i&&Te&&tt(i.firstChild);let u=it(je?e:i);for(;c=u.nextNode();)st(c),ut(c),c.content instanceof a&&dt(c.content);if(je)return e;if(O){if(Ee)for(l=ne.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(w.shadowroot||w.shadowrootmode)&&(l=ie.call(r,l,!0)),l}let d=D?i.outerHTML:i.innerHTML;return D&&C[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&z(ps,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
4631
+ `+d),Se&&No([ae,oe,se],e=>{d=Vo(d,e,` `)}),v&&De?v.createHTML(d):d},t.setConfig=function(){Ze(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),we=!0},t.clearConfig=function(){Je=null,we=!1},t.isValidAttribute=function(e,t,n){return Je||Ze({}),ct(M(e),M(t),n)},t.addHook=function(e,t){typeof t==`function`&&Io(S[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=Po(S[e],t);return n===-1?void 0:Lo(S[e],n,1)[0]}return Fo(S[e])},t.removeHooks=function(e){S[e]=[]},t.removeAllHooks=function(){S=ys()},t}var U=bs(),xs=U.sanitize.bind(U);U.isSupported,U.addHook.bind(U),U.removeHook.bind(U),U.removeHooks.bind(U),U.removeAllHooks.bind(U),U.setConfig.bind(U),U.clearConfig.bind(U),U.isValidAttribute.bind(U),U.version,U.removed;function Ss(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Cs=Ss();function ws(e){Cs=e}var Ts={exec:()=>null};function W(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(G.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Es=(()=>{try{return!0}catch{return!1}})(),G={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Ds=/^(?:[ \t]*(?:\n|$))+/,Os=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ks=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,As=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,js=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ms=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ns=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ps=W(Ns).replace(/bull/g,Ms).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Fs=W(Ns).replace(/bull/g,Ms).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Is=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ls=/^[^\n]+/,Rs=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,zs=W(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Rs).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Bs=W(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ms).getRegex(),Vs=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Hs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Us=W(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Hs).replace(`tag`,Vs).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ws=W(Is).replace(`hr`,As).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Vs).getRegex(),Gs={blockquote:W(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Ws).getRegex(),code:Os,def:zs,fences:ks,heading:js,hr:As,html:Us,lheading:Ps,list:Bs,newline:Ds,paragraph:Ws,table:Ts,text:Ls},Ks=W(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,As).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Vs).getRegex(),qs={...Gs,lheading:Fs,table:Ks,paragraph:W(Is).replace(`hr`,As).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Ks).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Vs).getRegex()},Js={...Gs,html:W(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Hs).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ts,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:W(Is).replace(`hr`,As).replace(`heading`,` *#{1,6} *[^
4632
+ ]`).replace(`lheading`,Ps).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Ys=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Xs=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Zs=/^( {2,}|\\)\n(?!\s*$)/,Qs=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,$s=/[\p{P}\p{S}]/u,ec=/[\s\p{P}\p{S}]/u,tc=/[^\s\p{P}\p{S}]/u,nc=W(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,ec).getRegex(),rc=/(?!~)[\p{P}\p{S}]/u,ic=/(?!~)[\s\p{P}\p{S}]/u,ac=/(?:[^\s\p{P}\p{S}]|~)/u,oc=W(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Es?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),sc=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,cc=W(sc,`u`).replace(/punct/g,$s).getRegex(),lc=W(sc,`u`).replace(/punct/g,rc).getRegex(),uc=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,dc=W(uc,`gu`).replace(/notPunctSpace/g,tc).replace(/punctSpace/g,ec).replace(/punct/g,$s).getRegex(),fc=W(uc,`gu`).replace(/notPunctSpace/g,ac).replace(/punctSpace/g,ic).replace(/punct/g,rc).getRegex(),pc=W(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,tc).replace(/punctSpace/g,ec).replace(/punct/g,$s).getRegex(),mc=W(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,$s).getRegex(),hc=W(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,tc).replace(/punctSpace/g,ec).replace(/punct/g,$s).getRegex(),gc=W(/\\(punct)/,`gu`).replace(/punct/g,$s).getRegex(),_c=W(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),vc=W(Hs).replace(`(?:-->|$)`,`-->`).getRegex(),yc=W(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,vc).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),bc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,xc=W(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,bc).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Sc=W(/^!?\[(label)\]\[(ref)\]/).replace(`label`,bc).replace(`ref`,Rs).getRegex(),Cc=W(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Rs).getRegex(),wc=W(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Sc).replace(`nolink`,Cc).getRegex(),Tc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ec={_backpedal:Ts,anyPunctuation:gc,autolink:_c,blockSkip:oc,br:Zs,code:Xs,del:Ts,delLDelim:Ts,delRDelim:Ts,emStrongLDelim:cc,emStrongRDelimAst:dc,emStrongRDelimUnd:pc,escape:Ys,link:xc,nolink:Cc,punctuation:nc,reflink:Sc,reflinkSearch:wc,tag:yc,text:Qs,url:Ts},Dc={...Ec,link:W(/^!?\[(label)\]\((.*?)\)/).replace(`label`,bc).getRegex(),reflink:W(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,bc).getRegex()},Oc={...Ec,emStrongRDelimAst:fc,emStrongLDelim:lc,delLDelim:mc,delRDelim:hc,url:W(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Tc).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:W(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Tc).getRegex()},kc={...Oc,br:W(Zs).replace(`{2,}`,`*`).getRegex(),text:W(Oc.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Ac={normal:Gs,gfm:qs,pedantic:Js},jc={normal:Ec,gfm:Oc,breaks:kc,pedantic:Dc},Mc={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Nc=e=>Mc[e];function K(e,t){if(t){if(G.escapeTest.test(e))return e.replace(G.escapeReplace,Nc)}else if(G.escapeTestNoEncode.test(e))return e.replace(G.escapeReplaceNoEncode,Nc);return e}function Pc(e){try{e=encodeURI(e).replace(G.percentDecode,`%`)}catch{return null}return e}function Fc(e,t){let n=e.replace(G.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(G.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(G.slashPipe,`|`);return n}function Ic(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Lc(e){let t=e.split(`
4605
4633
  `),n=t.length-1;for(;n>=0&&!t[n].trim();)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
4606
- `)}function Mc(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Nc(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function Pc(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Fc(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
4634
+ `)}function Rc(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function zc(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function Bc(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Vc(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
4607
4635
  `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
4608
- `)}var Ic=class{options;rules;lexer;constructor(e){this.options=e||_s}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:jc(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Fc(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Ac(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:Ac(t[0],`
4609
- `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Ac(t[0],`
4610
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Ac(t[0],`
4636
+ `)}var Hc=class{options;rules;lexer;constructor(e){this.options=e||Cs}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:Lc(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Vc(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Ic(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:Ic(t[0],`
4637
+ `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Ic(t[0],`
4638
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Ic(t[0],`
4611
4639
  `).split(`
4612
4640
  `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
4613
4641
  `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
@@ -4618,19 +4646,19 @@ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
4618
4646
  `),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
4619
4647
  `+e.join(`
4620
4648
  `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
4621
- `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=Nc(t[2].split(`
4649
+ `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=zc(t[2].split(`
4622
4650
  `,1)[0],t[1].length),l=e.split(`
4623
4651
  `,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
4624
4652
  `,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
4625
4653
  `,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
4626
4654
  `+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
4627
4655
  `+l}u=!l.trim(),r+=p+`
4628
- `,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=jc(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:Ac(t[0],`
4629
- `),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=kc(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
4630
- `):[],a={type:`table`,raw:Ac(t[0],`
4631
- `),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(kc(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:Ac(t[0],`
4656
+ `,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=Lc(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:Ic(t[0],`
4657
+ `),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Fc(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
4658
+ `):[],a={type:`table`,raw:Ic(t[0],`
4659
+ `),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Fc(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:Ic(t[0],`
4632
4660
  `),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
4633
- `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Ac(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Mc(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Pc(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Pc(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},q=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_s,this.options.tokenizer=this.options.tokenizer||new Ic,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:G,block:wc.normal,inline:Tc.normal};this.options.pedantic?(t.block=wc.pedantic,t.inline=Tc.pedantic):this.options.gfm&&(t.block=wc.gfm,this.options.breaks?t.inline=Tc.breaks:t.inline=Tc.gfm),this.tokenizer.rules=t}static get rules(){return{block:wc,inline:Tc}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(G.carriageReturn,`
4661
+ `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Ic(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Rc(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Bc(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Bc(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},q=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Cs,this.options.tokenizer=this.options.tokenizer||new Hc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:G,block:Ac.normal,inline:jc.normal};this.options.pedantic?(t.block=Ac.pedantic,t.inline=jc.pedantic):this.options.gfm&&(t.block=Ac.gfm,this.options.breaks?t.inline=jc.breaks:t.inline=jc.gfm),this.tokenizer.rules=t}static get rules(){return{block:Ac,inline:jc}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(G.carriageReturn,`
4634
4662
  `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(G.tabCharGlobal,` `).replace(G.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
4635
4663
  `:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
4636
4664
  `)?``:`
@@ -4644,7 +4672,7 @@ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
4644
4672
  `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
4645
4673
  `)?``:`
4646
4674
  `)+r.raw,n.text+=`
4647
- `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},Lc=class{options;parser;constructor(e){this.options=e||_s}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(G.notSpaceStart)?.[0],i=e.replace(G.endingNewline,``)+`
4675
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},Uc=class{options;parser;constructor(e){this.options=e||Cs}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(G.notSpaceStart)?.[0],i=e.replace(G.endingNewline,``)+`
4648
4676
  `;return r?`<pre><code class="language-`+K(r)+`">`+(n?i:K(i,!0))+`</code></pre>
4649
4677
  `:`<pre><code>`+(n?i:K(i,!0))+`</code></pre>
4650
4678
  `}blockquote({tokens:e}){return`<blockquote>
@@ -4662,30 +4690,30 @@ ${this.parser.parse(e)}</blockquote>
4662
4690
  `}tablerow({text:e}){return`<tr>
4663
4691
  ${e}</tr>
4664
4692
  `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
4665
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${K(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Oc(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+K(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Oc(e);if(i===null)return K(n);e=i;let a=`<img src="${e}" alt="${K(n)}"`;return t&&(a+=` title="${K(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:K(e.text)}},Rc=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},J=class e{options;renderer;textRenderer;constructor(e){this.options=e||_s,this.options.renderer=this.options.renderer||new Lc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Rc}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},zc=class{options;block;constructor(e){this.options=e||_s}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?q.lex:q.lexInline}provideParser(e=this.block){return e?J.parse:J.parseInline}},Bc=class{defaults=gs();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=J;Renderer=Lc;TextRenderer=Rc;Lexer=q;Tokenizer=Ic;Hooks=zc;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Lc(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Ic(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new zc;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];zc.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&zc.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return q.lex(e,t??this.defaults)}parser(e,t){return J.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?q.lex:q.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?J.parse:J.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?q.lex:q.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?J.parse:J.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
4666
- Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+K(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Vc=new Bc;function Y(e,t){return Vc.parse(e,t)}Y.options=Y.setOptions=function(e){return Vc.setOptions(e),Y.defaults=Vc.defaults,vs(Y.defaults),Y},Y.getDefaults=gs,Y.defaults=_s,Y.use=function(...e){return Vc.use(...e),Y.defaults=Vc.defaults,vs(Y.defaults),Y},Y.walkTokens=function(e,t){return Vc.walkTokens(e,t)},Y.parseInline=Vc.parseInline,Y.Parser=J,Y.parser=J.parse,Y.Renderer=Lc,Y.TextRenderer=Rc,Y.Lexer=q,Y.lexer=q.lex,Y.Tokenizer=Ic,Y.Hooks=zc,Y.parse=Y,Y.options,Y.setOptions,Y.use,Y.walkTokens,Y.parseInline,J.parse,q.lex;function Hc(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`)}function Uc(e,t){let n=Hc(e);return t===`shtml`||([`js`,`javascript`,`ts`,`typescript`,`jsx`,`tsx`].includes(t)?n=Gc(n):t===`json`?n=Kc(n):[`bash`,`sh`,`shell`,`zsh`].includes(t)&&(n=qc(n))),n}function Wc(e){let t=[];return{html:e.replace(/<span class="tok-(?:comment|string)">[\s\S]*?<\/span>/g,e=>{let n=String.fromCharCode(57344+t.length);return t.push(e),n}),restore:e=>e.replace(/[\ue000-\uf8ff]/g,e=>t[e.charCodeAt(0)-57344]??e)}}function Gc(e){e=e.replace(/(\/\/[^\n]*)/g,`<span class="tok-comment">$1</span>`),e=e.replace(/(\/\*[\s\S]*?\*\/)/g,`<span class="tok-comment">$1</span>`),e=e.replace(/(&quot;[^&]*?&quot;|&#x27;[^&]*?&#x27;|`[^`]*?`)/g,`<span class="tok-string">$1</span>`);let t=Wc(e);return e=t.html,e=e.replace(RegExp(`\\b(${`const.let.var.function.return.if.else.for.while.class.extends.import.export.from.default.new.this.async.await.try.catch.throw.typeof.instanceof.interface.type.enum.implements.abstract.public.private.protected.readonly.static.void.null.undefined.true.false`.split(`.`).join(`|`)})\\b`,`g`),`<span class="tok-keyword">$1</span>`),e=e.replace(/\b(\d+\.?\d*)\b/g,`<span class="tok-number">$1</span>`),e=e.replace(/\b([a-zA-Z_$][\w$]*)\s*(?=\()/g,`<span class="tok-fn">$1</span>`),t.restore(e)}function Kc(e){return e=e.replace(/(&quot;[^&]*?&quot;)\s*:/g,`<span class="tok-keyword">$1</span>:`),e=e.replace(/:\s*(&quot;[^&]*?&quot;)/g,`: <span class="tok-string">$1</span>`),e=e.replace(/\b(\d+\.?\d*)\b/g,`<span class="tok-number">$1</span>`),e=e.replace(/\b(true|false|null)\b/g,`<span class="tok-keyword">$1</span>`),e}function qc(e){return e=e.replace(/(#[^\n]*)/g,`<span class="tok-comment">$1</span>`),e=e.replace(/(&quot;[^&]*?&quot;|&#x27;[^&]*?&#x27;)/g,`<span class="tok-string">$1</span>`),e=e.replace(RegExp(`\\b(${[`if`,`then`,`else`,`fi`,`for`,`do`,`done`,`while`,`case`,`esac`,`echo`,`export`,`cd`,`ls`,`mkdir`,`rm`,`cp`,`mv`,`cat`,`grep`,`npm`,`node`,`git`].join(`|`)})\\b`,`g`),`<span class="tok-keyword">$1</span>`),e}var Jc=new Bc({gfm:!0,breaks:!0,async:!1,renderer:{code({text:e,lang:t}){let n=t??``,r=Uc(e,n);return`<pre><code${n?` class="language-${Hc(n)}"`:``}>${r}</code></pre>\n`},link({href:e,title:t,tokens:n}){let r=e??``;if(r.startsWith(`javascript:`))return this.parser.parseInline(n);let i=t?` title="${Hc(t)}"`:``,a=this.parser.parseInline(n);return`<a href="${Hc(r)}"${i} target="_blank" rel="noopener noreferrer">${a}</a>`},image({href:e,title:t,text:n}){let r=e??``,i=n?` alt="${Hc(n)}"`:``,a=t?` title="${Hc(t)}"`:``;return`<img src="${Hc(r)}"${i}${a}>`}}}),Yc={ALLOWED_TAGS:`a.b.i.em.strong.p.br.code.pre.ul.ol.li.h1.h2.h3.h4.h5.h6.table.thead.tbody.tr.th.td.del.blockquote.hr.img.span.div.details.summary.input`.split(`.`),ALLOWED_ATTR:[`href`,`src`,`alt`,`title`,`class`,`target`,`rel`,`type`,`checked`,`disabled`],ALLOW_DATA_ATTR:!1};function Xc(e){return hs(e,Yc)}function Zc(e){return e.replace(/<a\s([^>]*?)>/g,(e,t)=>{let n=t;return/(^|\s)target\s*=/i.test(n)?n=n.replace(/(^|\s)target\s*=\s*(['"])[^'"]*\2/gi,`$1target="_blank"`):n+=` target="_blank"`,/(^|\s)rel\s*=/i.test(n)?n=n.replace(/(^|\s)rel\s*=\s*(['"])[^'"]*\2/gi,`$1rel="noopener noreferrer"`):n+=` rel="noopener noreferrer"`,`<a ${n}>`})}var Qc=/<p><strong>Error:<\/strong>\s*([\s\S]*?)<\/p>/g,$c=/<pre><code class="language-shtml">[\s\S]*?<\/code><\/pre>/g,el=`<div class="msg__dip-pending" role="status" aria-live="polite" aria-label="Pouring a dip"><span class="msg__dip-pending-label">Pouring a dip…</span><span class="msg__dip-pending-status" aria-hidden="true"></span></div>`;function tl(e){return Zc(Xc(Jc.parse(e)))}function nl(e){return e.replace(Qc,(e,t)=>`<div class="msg__error" role="alert"><div class="msg__error-label">Error</div><div class="msg__error-body">${t}</div></div>`)}function rl(e){return e.replace($c,el)}function il(e){return tl(e)}function al(e,t=!1){let n=nl(tl(e));return t&&(n=rl(n)),n}function ol(e){let t=/^\[@[^\]\s]+ (completed|idle)\]/.exec(e);return t?t[1]===`idle`?`scoop-idle`:`scoop-notify`:/^\[@[^\]\s]+ sudo-request\]/.test(e)?`sudo-request`:/^\[scoop_wait [^\]]+\]/.test(e)?`scoop-wait`:e.startsWith(`[Session Reload]`)?`session-reload`:null}var sl=`#b07823`,cl=[`#06b6d4`,`#8b5cf6`,`#f59e0b`,`#10b981`,`#3b82f6`,`#ef4444`];function ll(e){if(e.isCone)return sl;let t=0;for(let n of e.name)t=t*31+n.charCodeAt(0)>>>0;return cl[t%cl.length]}var ul=new Set,dl=/^\[([^:\]]+):\s*([^\]]+)\]\s*\n?/,fl=/^\[([^\]]+)\]\s*/;function pl(e){let t=dl.exec(e)??fl.exec(e);return t?e.slice(t[0].length):e}function ml(e){if(typeof e!=`string`||e.length===0)return null;let t=ol(e);if(t)return t;let n=dl.exec(e);if(n){let e=n[1].trim().toLowerCase().replace(/\s+event$/,``).replace(/\s+/g,`-`);if(_(e))return e}return null}var hl=/^\[@([^\]\s]+) (?:completed|idle|sudo-request)\]/;function gl(e){return e.replace(/-scoop$/,``)}function X(e,t={}){let n=document.createElement(e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function _l(e){let t=e.split(`
4667
- `,1)[0]??``;return t.length>80?`${t.slice(0,79)}…`:t}function Z(e,t){if(typeof e!=`object`||!e)return``;let n=e[t];return typeof n==`string`?n:``}function vl(e){return e.split(`/`).filter(Boolean).pop()??e}function yl(e){return typeof e==`string`?e:Z(e,`command`)}function bl(e){for(let t of e.trim().split(/\s+/))if(!(t===`sudo`||/^[A-Za-z_][A-Za-z0-9_]*=/.test(t)))return t.split(`/`).pop()??t;return``}var xl=new Set([`cd`,`echo`,`export`,`pwd`,`true`,`:`,`set`]);function Sl(e){let t=e.split(/&&|\|\||[;|\n]/),n=null;for(let e of t){let t=bl(e);if(!t)continue;let r=xl.has(t)?1:Object.hasOwn(Cl,t)?3:2;(!n||r>n.score)&&(n={program:t,score:r})}return n?.program??``}var Cl={git:`git-branch`,gh:`git-pull-request`,ls:`folder-open`,cat:`file-text`,head:`file-text`,tail:`file-text`,cd:`corner-down-right`,pwd:`map-pin`,mkdir:`folder-plus`,rm:`trash-2`,mv:`move`,cp:`copy`,grep:`search`,rg:`search`,find:`search`,curl:`globe`,wget:`globe`,open:`external-link`,"tab-new":`app-window`,"playwright-cli":`app-window`,playwright:`app-window`,npm:`package`,npx:`package`,node:`hexagon`,python3:`code`,python:`code`,echo:`quote`,say:`volume-2`,afplay:`music`,screencapture:`camera`,ffmpeg:`film`,convert:`image`,pdftk:`file-text`,sqlite3:`database`,serve:`server`,tsc:`braces`,test:`flask-conical`,biome:`paintbrush`,esbuild:`zap`,webhook:`webhook`,crontask:`clock`,fswatch:`eye`,workflow:`workflow`,mount:`hard-drive`,usb:`usb`,serial:`cable`,hid:`keyboard`,esptool:`cpu`,agent:`bot`,mcp:`plug`,host:`radio`,ps:`activity`,kill:`octagon-x`,secret:`key-round`,"oauth-token":`key-round`,sed:`scissors`,awk:`filter`,diff:`git-compare`,pbcopy:`clipboard-copy`,pbpaste:`clipboard-paste`},wl={read_file:`file-text`,write_file:`file-plus`,edit_file:`file-pen`,send_message:`message-circle`,list_scoops:`ice-cream-cone`,scoop_scoop:`ice-cream-cone`,feed_scoop:`utensils`,drop_scoop:`trash-2`,scoop_mute:`bell-off`,scoop_unmute:`bell-ring`,scoop_wait:`hourglass`,update_global_memory:`brain`,lick_confirm:`shield-check`,lick_dismiss:`shield-x`,sudo_request:`shield-question`,list_sudo_requests:`list-checks`};function Tl(e){if(e.name===`bash`){let t=Sl(yl(e.input)),n=Object.hasOwn(Cl,t)?Cl[t]:`terminal`;return c(n)?n:`terminal`}let t=Object.hasOwn(wl,e.name)?wl[e.name]:`wrench`;return c(t)?t:`wrench`}function El(e){let t=Z(e.input,`path`)||Z(e.input,`file_path`);switch(e.name){case`bash`:return`Use Sliccy's computer`;case`read_file`:return t?`Read ${vl(t)}`:`Read a file`;case`write_file`:return t?`Write ${vl(t)}`:`Write a file`;case`edit_file`:return t?`Edit ${vl(t)}`:`Edit a file`;case`send_message`:return`Send a message to Sliccy`;case`list_scoops`:return`Check on the scoops`;case`scoop_scoop`:{let t=Z(e.input,`name`);return t?`Scoop up "${t}"`:`Scoop a new scoop`}case`feed_scoop`:{let t=Z(e.input,`name`)||Z(e.input,`scoop`);return t?`Feed the ${t} scoop`:`Feed a scoop`}case`drop_scoop`:{let t=Z(e.input,`name`)||Z(e.input,`scoop`);return t?`Drop the ${t} scoop`:`Drop a scoop`}case`scoop_mute`:{let t=Z(e.input,`name`)||Z(e.input,`scoop`);return t?`Mute the ${t} scoop`:`Mute a scoop`}case`scoop_unmute`:{let t=Z(e.input,`name`)||Z(e.input,`scoop`);return t?`Unmute the ${t} scoop`:`Unmute a scoop`}case`scoop_wait`:return`Wait for the scoops`;case`update_global_memory`:return`Update the shared memory`;case`lick_confirm`:return`Grant the scoop access`;case`lick_dismiss`:return`Hold the scoop back`;case`sudo_request`:{let t=Z(e.input,`kind`);return t?`Ask for ${t} access`:`Ask for more access`}case`list_sudo_requests`:return`Check access requests`;default:{let t=e.name.replace(/[_-]+/g,` `).trim();return t.charAt(0).toUpperCase()+t.slice(1)}}}var Dl=4e3;function Ol(e){return e.length>Dl?`${e.slice(0,Dl)}…`:e}var kl=`slicc-wcmsg-style`,Al=[`slicc-action-row .slicc-act__body:has(> .wcmsg-bash){background:#141414;`,`border-color:#2a2a2a;color:#f2f2f2;}`,`.wcmsg-bash{white-space:pre-wrap;}`,`.wcmsg-bash .wcmsg-cmd{color:#9ad17e;}`,`.wcmsg-bash .wcmsg-out{color:#f2f2f2;}`,`.wcmsg-path{color:var(--txt-3);margin-bottom:4px;}`].join(``);function jl(){if(document.getElementById(kl))return;let e=document.createElement(`style`);e.id=kl,e.textContent=Al,document.head.appendChild(e)}function Ml(e){let t=yl(e.input),n=bl(t),r=`slicc-bash-renderer-${n}`;if(n&&customElements.get(r)){let n=document.createElement(r);return n.setAttribute(`slot`,`body`),n.setAttribute(`command`,t),n.command=t,n.output=e.result??``,n}let i=X(`div`,{slot:`body`,class:`wcmsg-bash`}),a=X(`div`,{class:`wcmsg-cmd`});if(a.textContent=`$ ${Ol(t)}`,i.append(a),e.result){let t=X(`div`,{class:`wcmsg-out`});t.textContent=Ol(e.result),i.append(t)}return i}function Nl(e){if(jl(),e.name===`bash`)return Ml(e);let t=X(`div`,{slot:`body`}),n=Z(e.input,`path`)||Z(e.input,`file_path`);if(n){let e=X(`div`,{class:`wcmsg-path`});e.textContent=n,t.append(e)}if(e.name===`write_file`){let n=X(`span`,{class:`add`});return n.textContent=Ol(Z(e.input,`content`)),t.append(n),t}if(e.name===`edit_file`){let n=X(`div`,{class:`del`});n.textContent=Ol(Z(e.input,`old_string`));let r=X(`div`,{class:`add`});return r.textContent=Ol(Z(e.input,`new_string`)),t.append(n,r),t}if(e.name===`read_file`){let n=X(`div`);return n.textContent=Ol(e.result??``),t.append(n),t}if(e.name===`send_message`){let n=X(`div`);return n.textContent=Ol(Z(e.input,`message`)||(e.result??``)),t.append(n),t}if(e.result!==void 0){let n=X(`div`);return n.textContent=Ol(e.result),t.append(n),t}return t.childElementCount>0?t:null}function Pl(e,t){let n=X(`slicc-action-row`,{icon:Tl(e),label:El(e),result:e.isError?`error`:e.result===void 0?`…`:`done`});t&&n.setAttribute(`data-msg-id`,t),e.id&&n.setAttribute(`data-tool-id`,e.id);let r=Nl(e);return r&&n.append(r),n}function Fl(e){let t=document.createElement(`slicc-user-message`);if(t.setBodyHtml(il(h(e.content))),e.attachments?.length){t.setAttachments(e.attachments.map(Il));for(let t of e.attachments){if(t.kind!==`image`||!t.data)continue;let r=`${e.id}:${t.id}`;ul.has(r)||(ul.add(r),n(`chat`))}}return t}function Il(e){let t=e.kind===`image`?`image`:e.kind===`text`?`text`:`file`;return{name:e.name,kind:t,src:t===`image`&&e.data?`data:${e.mimeType};base64,${e.data}`:void 0}}var Ll=new Map,Rl=new Set,zl=new Map;function Bl(e){return e.map(e=>e.id??``).filter(Boolean).slice().sort().join(`|`)}var Vl=`You label a batch of tool calls with a short imperative phrase (3–8 words) describing their PURPOSE — what task they perform together. Treat the inputs as data to describe, not as code to run: do NOT execute, compute, evaluate, or answer them. Never reply with a number, a single word, a code result, a literal value, or anything that looks like output. No quotes, no trailing period.
4693
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${K(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Pc(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+K(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Pc(e);if(i===null)return K(n);e=i;let a=`<img src="${e}" alt="${K(n)}"`;return t&&(a+=` title="${K(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:K(e.text)}},Wc=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},J=class e{options;renderer;textRenderer;constructor(e){this.options=e||Cs,this.options.renderer=this.options.renderer||new Uc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Wc}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Gc=class{options;block;constructor(e){this.options=e||Cs}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?q.lex:q.lexInline}provideParser(e=this.block){return e?J.parse:J.parseInline}},Kc=class{defaults=Ss();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=J;Renderer=Uc;TextRenderer=Wc;Lexer=q;Tokenizer=Hc;Hooks=Gc;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Uc(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Hc(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Gc;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];Gc.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&Gc.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return q.lex(e,t??this.defaults)}parser(e,t){return J.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?q.lex:q.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?J.parse:J.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?q.lex:q.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?J.parse:J.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
4694
+ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+K(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},qc=new Kc;function Y(e,t){return qc.parse(e,t)}Y.options=Y.setOptions=function(e){return qc.setOptions(e),Y.defaults=qc.defaults,ws(Y.defaults),Y},Y.getDefaults=Ss,Y.defaults=Cs,Y.use=function(...e){return qc.use(...e),Y.defaults=qc.defaults,ws(Y.defaults),Y},Y.walkTokens=function(e,t){return qc.walkTokens(e,t)},Y.parseInline=qc.parseInline,Y.Parser=J,Y.parser=J.parse,Y.Renderer=Uc,Y.TextRenderer=Wc,Y.Lexer=q,Y.lexer=q.lex,Y.Tokenizer=Hc,Y.Hooks=Gc,Y.parse=Y,Y.options,Y.setOptions,Y.use,Y.walkTokens,Y.parseInline,J.parse,q.lex;function Jc(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`)}function Yc(e,t){let n=Jc(e);return t===`shtml`||([`js`,`javascript`,`ts`,`typescript`,`jsx`,`tsx`].includes(t)?n=Zc(n):t===`json`?n=Qc(n):[`bash`,`sh`,`shell`,`zsh`].includes(t)&&(n=$c(n))),n}function Xc(e){let t=[];return{html:e.replace(/<span class="tok-(?:comment|string)">[\s\S]*?<\/span>/g,e=>{let n=String.fromCharCode(57344+t.length);return t.push(e),n}),restore:e=>e.replace(/[\ue000-\uf8ff]/g,e=>t[e.charCodeAt(0)-57344]??e)}}function Zc(e){e=e.replace(/(\/\/[^\n]*)/g,`<span class="tok-comment">$1</span>`),e=e.replace(/(\/\*[\s\S]*?\*\/)/g,`<span class="tok-comment">$1</span>`),e=e.replace(/(&quot;[^&]*?&quot;|&#x27;[^&]*?&#x27;|`[^`]*?`)/g,`<span class="tok-string">$1</span>`);let t=Xc(e);return e=t.html,e=e.replace(RegExp(`\\b(${`const.let.var.function.return.if.else.for.while.class.extends.import.export.from.default.new.this.async.await.try.catch.throw.typeof.instanceof.interface.type.enum.implements.abstract.public.private.protected.readonly.static.void.null.undefined.true.false`.split(`.`).join(`|`)})\\b`,`g`),`<span class="tok-keyword">$1</span>`),e=e.replace(/\b(\d+\.?\d*)\b/g,`<span class="tok-number">$1</span>`),e=e.replace(/\b([a-zA-Z_$][\w$]*)\s*(?=\()/g,`<span class="tok-fn">$1</span>`),t.restore(e)}function Qc(e){return e=e.replace(/(&quot;[^&]*?&quot;)\s*:/g,`<span class="tok-keyword">$1</span>:`),e=e.replace(/:\s*(&quot;[^&]*?&quot;)/g,`: <span class="tok-string">$1</span>`),e=e.replace(/\b(\d+\.?\d*)\b/g,`<span class="tok-number">$1</span>`),e=e.replace(/\b(true|false|null)\b/g,`<span class="tok-keyword">$1</span>`),e}function $c(e){return e=e.replace(/(#[^\n]*)/g,`<span class="tok-comment">$1</span>`),e=e.replace(/(&quot;[^&]*?&quot;|&#x27;[^&]*?&#x27;)/g,`<span class="tok-string">$1</span>`),e=e.replace(RegExp(`\\b(${[`if`,`then`,`else`,`fi`,`for`,`do`,`done`,`while`,`case`,`esac`,`echo`,`export`,`cd`,`ls`,`mkdir`,`rm`,`cp`,`mv`,`cat`,`grep`,`npm`,`node`,`git`].join(`|`)})\\b`,`g`),`<span class="tok-keyword">$1</span>`),e}var el=new Kc({gfm:!0,breaks:!0,async:!1,renderer:{code({text:e,lang:t}){let n=t??``,r=Yc(e,n);return`<pre><code${n?` class="language-${Jc(n)}"`:``}>${r}</code></pre>\n`},link({href:e,title:t,tokens:n}){let r=e??``;if(r.startsWith(`javascript:`))return this.parser.parseInline(n);let i=t?` title="${Jc(t)}"`:``,a=this.parser.parseInline(n);return`<a href="${Jc(r)}"${i} target="_blank" rel="noopener noreferrer">${a}</a>`},image({href:e,title:t,text:n}){let r=e??``,i=n?` alt="${Jc(n)}"`:``,a=t?` title="${Jc(t)}"`:``;return`<img src="${Jc(r)}"${i}${a}>`}}}),tl={ALLOWED_TAGS:`a.b.i.em.strong.p.br.code.pre.ul.ol.li.h1.h2.h3.h4.h5.h6.table.thead.tbody.tr.th.td.del.blockquote.hr.img.span.div.details.summary.input`.split(`.`),ALLOWED_ATTR:[`href`,`src`,`alt`,`title`,`class`,`target`,`rel`,`type`,`checked`,`disabled`],ALLOW_DATA_ATTR:!1};function nl(e){return xs(e,tl)}function rl(e){return e.replace(/<a\s([^>]*?)>/g,(e,t)=>{let n=t;return/(^|\s)target\s*=/i.test(n)?n=n.replace(/(^|\s)target\s*=\s*(['"])[^'"]*\2/gi,`$1target="_blank"`):n+=` target="_blank"`,/(^|\s)rel\s*=/i.test(n)?n=n.replace(/(^|\s)rel\s*=\s*(['"])[^'"]*\2/gi,`$1rel="noopener noreferrer"`):n+=` rel="noopener noreferrer"`,`<a ${n}>`})}var il=/<p><strong>Error:<\/strong>\s*([\s\S]*?)<\/p>/g,al=/<pre><code class="language-shtml">[\s\S]*?<\/code><\/pre>/g,ol=`<div class="msg__dip-pending" role="status" aria-live="polite" aria-label="Pouring a dip"><span class="msg__dip-pending-label">Pouring a dip…</span><span class="msg__dip-pending-status" aria-hidden="true"></span></div>`;function sl(e){return rl(nl(el.parse(e)))}function cl(e){return e.replace(il,(e,t)=>`<div class="msg__error" role="alert"><div class="msg__error-label">Error</div><div class="msg__error-body">${t}</div></div>`)}function ll(e){return e.replace(al,ol)}function ul(e){return sl(e)}function dl(e,t=!1){let n=cl(sl(e));return t&&(n=ll(n)),n}function fl(e){let t=/^\[@[^\]\s]+ (completed|idle)\]/.exec(e);return t?t[1]===`idle`?`scoop-idle`:`scoop-notify`:/^\[@[^\]\s]+ sudo-request\]/.test(e)?`sudo-request`:/^\[scoop_wait [^\]]+\]/.test(e)?`scoop-wait`:e.startsWith(`[Session Reload]`)?`session-reload`:null}var pl=`#b07823`,ml=[`#06b6d4`,`#8b5cf6`,`#f59e0b`,`#10b981`,`#3b82f6`,`#ef4444`];function hl(e){if(e.isCone)return pl;let t=0;for(let n of e.name)t=t*31+n.charCodeAt(0)>>>0;return ml[t%ml.length]}var gl=new Set,_l=/^\[([^:\]]+):\s*([^\]]+)\]\s*\n?/,vl=/^\[([^\]]+)\]\s*/;function yl(e){let t=_l.exec(e)??vl.exec(e);return t?e.slice(t[0].length):e}function bl(e){if(typeof e!=`string`||e.length===0)return null;let t=fl(e);if(t)return t;let n=_l.exec(e);if(n){let e=n[1].trim().toLowerCase().replace(/\s+event$/,``).replace(/\s+/g,`-`);if(_(e))return e}return null}var xl=/^\[@([^\]\s]+) (?:completed|idle|sudo-request)\]/;function Sl(e){return e.replace(/-scoop$/,``)}function X(e,t={}){let n=document.createElement(e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function Cl(e){let t=e.split(`
4695
+ `,1)[0]??``;return t.length>80?`${t.slice(0,79)}…`:t}function Z(e,t){if(typeof e!=`object`||!e)return``;let n=e[t];return typeof n==`string`?n:``}function wl(e){return e.split(`/`).filter(Boolean).pop()??e}function Tl(e){return typeof e==`string`?e:Z(e,`command`)}function El(e){for(let t of e.trim().split(/\s+/))if(!(t===`sudo`||/^[A-Za-z_][A-Za-z0-9_]*=/.test(t)))return t.split(`/`).pop()??t;return``}var Dl=new Set([`cd`,`echo`,`export`,`pwd`,`true`,`:`,`set`]);function Ol(e){let t=e.split(/&&|\|\||[;|\n]/),n=null;for(let e of t){let t=El(e);if(!t)continue;let r=Dl.has(t)?1:Object.hasOwn(kl,t)?3:2;(!n||r>n.score)&&(n={program:t,score:r})}return n?.program??``}var kl={git:`git-branch`,gh:`git-pull-request`,ls:`folder-open`,cat:`file-text`,head:`file-text`,tail:`file-text`,cd:`corner-down-right`,pwd:`map-pin`,mkdir:`folder-plus`,rm:`trash-2`,mv:`move`,cp:`copy`,grep:`search`,rg:`search`,find:`search`,curl:`globe`,wget:`globe`,open:`external-link`,"tab-new":`app-window`,"playwright-cli":`app-window`,playwright:`app-window`,npm:`package`,npx:`package`,node:`hexagon`,python3:`code`,python:`code`,echo:`quote`,say:`volume-2`,afplay:`music`,screencapture:`camera`,ffmpeg:`film`,convert:`image`,pdftk:`file-text`,sqlite3:`database`,serve:`server`,tsc:`braces`,test:`flask-conical`,biome:`paintbrush`,esbuild:`zap`,webhook:`webhook`,crontask:`clock`,fswatch:`eye`,workflow:`workflow`,mount:`hard-drive`,usb:`usb`,serial:`cable`,hid:`keyboard`,esptool:`cpu`,agent:`bot`,mcp:`plug`,host:`radio`,ps:`activity`,kill:`octagon-x`,secret:`key-round`,"oauth-token":`key-round`,sed:`scissors`,awk:`filter`,diff:`git-compare`,pbcopy:`clipboard-copy`,pbpaste:`clipboard-paste`},Al={read_file:`file-text`,write_file:`file-plus`,edit_file:`file-pen`,send_message:`message-circle`,list_scoops:`ice-cream-cone`,scoop_scoop:`ice-cream-cone`,feed_scoop:`utensils`,drop_scoop:`trash-2`,scoop_mute:`bell-off`,scoop_unmute:`bell-ring`,scoop_wait:`hourglass`,update_global_memory:`brain`,lick_confirm:`shield-check`,lick_dismiss:`shield-x`,sudo_request:`shield-question`,list_sudo_requests:`list-checks`};function jl(e){if(e.name===`bash`){let t=Ol(Tl(e.input)),n=Object.hasOwn(kl,t)?kl[t]:`terminal`;return c(n)?n:`terminal`}let t=Object.hasOwn(Al,e.name)?Al[e.name]:`wrench`;return c(t)?t:`wrench`}function Ml(e){let t=Z(e.input,`path`)||Z(e.input,`file_path`);switch(e.name){case`bash`:return`Use Sliccy's computer`;case`read_file`:return t?`Read ${wl(t)}`:`Read a file`;case`write_file`:return t?`Write ${wl(t)}`:`Write a file`;case`edit_file`:return t?`Edit ${wl(t)}`:`Edit a file`;case`send_message`:return`Send a message to Sliccy`;case`list_scoops`:return`Check on the scoops`;case`scoop_scoop`:{let t=Z(e.input,`name`);return t?`Scoop up "${t}"`:`Scoop a new scoop`}case`feed_scoop`:{let t=Z(e.input,`name`)||Z(e.input,`scoop`);return t?`Feed the ${t} scoop`:`Feed a scoop`}case`drop_scoop`:{let t=Z(e.input,`name`)||Z(e.input,`scoop`);return t?`Drop the ${t} scoop`:`Drop a scoop`}case`scoop_mute`:{let t=Z(e.input,`name`)||Z(e.input,`scoop`);return t?`Mute the ${t} scoop`:`Mute a scoop`}case`scoop_unmute`:{let t=Z(e.input,`name`)||Z(e.input,`scoop`);return t?`Unmute the ${t} scoop`:`Unmute a scoop`}case`scoop_wait`:return`Wait for the scoops`;case`update_global_memory`:return`Update the shared memory`;case`lick_confirm`:return`Grant the scoop access`;case`lick_dismiss`:return`Hold the scoop back`;case`sudo_request`:{let t=Z(e.input,`kind`);return t?`Ask for ${t} access`:`Ask for more access`}case`list_sudo_requests`:return`Check access requests`;default:{let t=e.name.replace(/[_-]+/g,` `).trim();return t.charAt(0).toUpperCase()+t.slice(1)}}}var Nl=4e3;function Pl(e){return e.length>Nl?`${e.slice(0,Nl)}…`:e}var Fl=`slicc-wcmsg-style`,Il=[`slicc-action-row .slicc-act__body:has(> .wcmsg-bash){background:#141414;`,`border-color:#2a2a2a;color:#f2f2f2;}`,`.wcmsg-bash{white-space:pre-wrap;}`,`.wcmsg-bash .wcmsg-cmd{color:#9ad17e;}`,`.wcmsg-bash .wcmsg-out{color:#f2f2f2;}`,`.wcmsg-path{color:var(--txt-3);margin-bottom:4px;}`].join(``);function Ll(){if(document.getElementById(Fl))return;let e=document.createElement(`style`);e.id=Fl,e.textContent=Il,document.head.appendChild(e)}function Rl(e){let t=Tl(e.input),n=El(t),r=`slicc-bash-renderer-${n}`;if(n&&customElements.get(r)){let n=document.createElement(r);return n.setAttribute(`slot`,`body`),n.setAttribute(`command`,t),n.command=t,n.output=e.result??``,n}let i=X(`div`,{slot:`body`,class:`wcmsg-bash`}),a=X(`div`,{class:`wcmsg-cmd`});if(a.textContent=`$ ${Pl(t)}`,i.append(a),e.result){let t=X(`div`,{class:`wcmsg-out`});t.textContent=Pl(e.result),i.append(t)}return i}function zl(e){if(Ll(),e.name===`bash`)return Rl(e);let t=X(`div`,{slot:`body`}),n=Z(e.input,`path`)||Z(e.input,`file_path`);if(n){let e=X(`div`,{class:`wcmsg-path`});e.textContent=n,t.append(e)}if(e.name===`write_file`){let n=X(`span`,{class:`add`});return n.textContent=Pl(Z(e.input,`content`)),t.append(n),t}if(e.name===`edit_file`){let n=X(`div`,{class:`del`});n.textContent=Pl(Z(e.input,`old_string`));let r=X(`div`,{class:`add`});return r.textContent=Pl(Z(e.input,`new_string`)),t.append(n,r),t}if(e.name===`read_file`){let n=X(`div`);return n.textContent=Pl(e.result??``),t.append(n),t}if(e.name===`send_message`){let n=X(`div`);return n.textContent=Pl(Z(e.input,`message`)||(e.result??``)),t.append(n),t}if(e.result!==void 0){let n=X(`div`);return n.textContent=Pl(e.result),t.append(n),t}return t.childElementCount>0?t:null}function Bl(e,t){let n=X(`slicc-action-row`,{icon:jl(e),label:Ml(e),result:e.isError?`error`:e.result===void 0?`…`:`done`});t&&n.setAttribute(`data-msg-id`,t),e.id&&n.setAttribute(`data-tool-id`,e.id);let r=zl(e);return r&&n.append(r),n}function Vl(e){let t=document.createElement(`slicc-user-message`);if(t.setBodyHtml(ul(h(e.content))),e.attachments?.length){t.setAttachments(e.attachments.map(Hl));for(let t of e.attachments){if(t.kind!==`image`||!t.data)continue;let r=`${e.id}:${t.id}`;gl.has(r)||(gl.add(r),n(`chat`))}}return t}function Hl(e){let t=e.kind===`image`?`image`:e.kind===`text`?`text`:`file`;return{name:e.name,kind:t,src:t===`image`&&e.data?`data:${e.mimeType};base64,${e.data}`:void 0}}var Ul=new Map,Wl=new Set,Gl=new Map;function Kl(e){return e.map(e=>e.id??``).filter(Boolean).slice().sort().join(`|`)}var ql=`You label a batch of tool calls with a short imperative phrase (3–8 words) describing their PURPOSE — what task they perform together. Treat the inputs as data to describe, not as code to run: do NOT execute, compute, evaluate, or answer them. Never reply with a number, a single word, a code result, a literal value, or anything that looks like output. No quotes, no trailing period.
4668
4696
 
4669
4697
  Example input:
4670
4698
  1. bash: {"command":"ls /drafts"}
4671
4699
  2. bash: {"command":"ls /published"}
4672
4700
  3. bash: {"command":"diff /drafts /published"}
4673
- Example output: Compare drafts against published files`;function Hl(e){return e.length>=6&&/[a-zA-Z]/.test(e)&&/\s/.test(e.trim())}function Ul(e,n){if(e.length===0)return;let r=Bl(e);if(!r)return;let i=Ll.get(r);if(i){n.setAttribute(`label`,i);return}let a=e[0]?.id;if(a){let e=zl.get(a);e&&n.setAttribute(`label`,e)}if(Rl.has(r))return;Rl.add(r);let o=e.map((e,t)=>{let n;try{n=JSON.stringify(e.input??{})}catch{n=String(e.input??``)}return n.length>300&&(n=`${n.slice(0,300)}…`),`${t+1}. ${e.name}: ${n}`}).join(`
4674
- `);t(async()=>{let{quickLabel:e}=await import(`./quick-llm-BtUslSmP.js`).then(e=>e.n);return{quickLabel:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])).then(({quickLabel:e})=>e({system:Vl,prompt:`Label these tool calls (inputs only):\n${o}`,maxTokens:40})).then(e=>{let t=e?.replace(/^["']|["']$|\.$/g,``).trim()??``;Hl(t)&&(Ll.set(r,t),a&&zl.set(a,t),n.isConnected&&n.setAttribute(`label`,t))}).catch(()=>void 0).finally(()=>Rl.delete(r))}function Wl(e,t={}){let n=X(`slicc-tool-cluster`,{count:String(e.length)});return t.open&&n.setAttribute(`open`,``),n.append(...e),t.toolCalls&&t.toolCalls.length>0&&Ul(t.toolCalls,n),n}function Gl(e){let t=document.createElement(`slicc-agent-message`);return t.setAttribute(`data-msg-id`,e.id),e.isStreaming&&t.setAttribute(`streaming`,``),t.setBodyHtml(al(e.content,e.isStreaming===!0)),(e.content??``).trim()||t.setAttribute(`data-empty`,``),[t,...(e.toolCalls??[]).map(t=>Pl(t,e.id))]}function Kl(e,t){let n=e.querySelectorAll(`:scope > slicc-tool-cluster`);for(let e of n){let n=Array.from(e.querySelectorAll(`slicc-action-row`));ql(e,n,t);let r=e.parentNode;if(!r){e.remove();continue}for(let t of n)Jl(t,r,e);e.remove()}}function ql(e,t,n){if(!e.hasAttribute(`open`))return;let r=t[0]?.dataset.msgId;if(!r)return;let i=t.length>0&&t.every(e=>e.dataset.msgId===r),a=e.parentElement?.querySelector(`slicc-agent-message[data-msg-id="${r}"]`);i&&a?.hasAttribute(`streaming`)===!0||n.add(r)}function Jl(e,t,n){let r=e.dataset.msgId,i=r&&t instanceof Element?t.querySelector(`:scope > slicc-agent-message[data-msg-id="${r}"]`):null;if(!i||i.parentNode!==t){t.insertBefore(e,n);return}let a=i;for(;a.nextSibling instanceof HTMLElement&&a.nextSibling.tagName.toLowerCase()===`slicc-action-row`&&a.nextSibling.dataset.msgId===r;)a=a.nextSibling;t.insertBefore(e,a.nextSibling)}var Yl=new Set([`slicc-user-message`,`slicc-lick-card`,`slicc-error-card`,`slicc-delegation-line`,`slicc-day-separator`]);function Xl(e){return e instanceof HTMLElement?Yl.has(e.tagName.toLowerCase()):!0}function Zl(e){return e instanceof HTMLElement&&e.tagName.toLowerCase()===`slicc-action-row`}function Ql(e){return e instanceof HTMLElement&&e.tagName.toLowerCase()===`slicc-agent-message`}function $l(e){let t=[],n=[];for(let r of e)Ql(r)?!r.hasAttribute(`data-empty`)&&n.length>0&&(t.push(n),n=[]):Zl(r)&&n.push(r);return n.length>0&&t.push(n),t}function eu(e,t){let n=t[0]?.dataset.msgId;return!n||!t.every(e=>e.dataset.msgId===n)?!1:e.querySelector(`slicc-agent-message[data-msg-id="${n}"]`)?.hasAttribute(`streaming`)===!0}function tu(e,t){let n=[];for(let r of e){let e=r.dataset.msgId,i=r.dataset.toolId;if(!e||!i)return;let a=t(e,i);if(!a)return;n.push(a)}return n}function nu(e,t){let n=e[0],r=n.parentNode;if(!r)return;let i=new Set(e),a=n.nextSibling;for(;a&&i.has(a);)a=a.nextSibling;let o=n.dataset.msgId,s=Wl(e,{open:!!(o&&t.openClusterAnchors.has(o))||eu(r,e),toolCalls:t.toolCallLookup?tu(e,t.toolCallLookup):void 0});r.insertBefore(s,a)}function ru(e,t){Kl(e,t.openClusterAnchors);let n=Array.from(e.children),r=0;for(;r<n.length;){if(Xl(n[r])){r++;continue}let e=r;for(;e<n.length&&!Xl(n[e]);)e++;let i=$l(n.slice(r,e));for(let e of i)e.length>=3&&nu(e,t);r=e}t.openClusterAnchors.clear()}function iu(e){let t=dl.exec(e.content),n=e.lickCount??1,r=hl.exec(e.content),i=r?gl(r[1]):null,a=X(`slicc-lick-card`,{kind:e.channel??`webhook`,"event-label":i??t?.[2]??e.channel??`event`,collapsible:``,collapsed:``});i&&a.setAttribute(`hue`,ll({isCone:!1,name:i})),n>1&&a.setAttribute(`count`,String(n)),e.lickState&&e.lickState!==`pending`&&a.setAttribute(`state`,e.lickState);let o=e.lickParts??[e.content];for(let e of o){let t=document.createElement(`div`);t.innerHTML=il(pl(e)),a.append(t)}return a}function au(e){let t=X(`slicc-delegation-line`,{kind:`feed`,verb:`feed_scoop`,label:_l(e.content.replace(/\*\*\[[^\]]*\]\*\*\s*/,``))}),n=document.createElement(`slicc-user-message`);return n.setBodyHtml(il(e.content)),[t,n]}function ou(e){return typeof e==`string`&&e.startsWith(`No API key configured`)}function su(e){return e?e.toLowerCase().includes(`the provided model identifier is invalid`):!1}function cu(e){return e?e.toLowerCase().includes(`please log in again`):!1}function lu(e){let t={message:e.content,"message-id":e.id};return ou(e.content)?t.action=`settings`:su(e.content)?t.action=`change-model`:cu(e.content)&&(t.action=`login`),X(`slicc-error-card`,t)}function uu(e){if(e.source===`lick`)return[iu(e)];if(e.source===`delegation`||e.channel===`delegation`)return au(e);if(e.error)return[lu(e)];if(e.role===`assistant`)return Gl(e);let t=ml(e.content);return t?[iu({...e,source:`lick`,channel:t})]:[Fl(e)]}function du(e){let t=[];for(let n of e){let e=n;if(!n.source&&n.role===`user`){let t=ml(n.content);t&&(e={...n,source:`lick`,channel:t})}let r=t[t.length-1];if(!(e.lickId||r?.lickId)&&e.source===`lick`&&r?.source===`lick`&&r.channel===e.channel){r.lickParts=[...r.lickParts??[r.content],e.content],r.lickCount=r.lickParts.length,r.content+=`\n\n${e.content}`;continue}t.push({...e})}return t}function fu(e){return new Date(e).toLocaleDateString(void 0,{weekday:`short`,month:`short`,day:`numeric`})}function pu(e){return X(`slicc-day-separator`,{label:fu(e)})}function mu(e){let t=[],n=``;for(let r of e){let e=new Date(r.timestamp).toDateString();e!==n&&(t.push(pu(r.timestamp)),n=e),t.push(...uu(r))}let r=document.createElement(`div`);return r.append(...t),ru(r,{openClusterAnchors:new Set,toolCallLookup:(t,n)=>e.find(e=>e.id===t)?.toolCalls?.find(e=>e.id===n)}),Array.from(r.children)}var hu=new Uint8Array([137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,1,0,0,0,1,8,4,0,0,0,181,28,12,2,0,0,0,11,73,68,65,84,120,218,99,100,96,0,0,0,6,0,2,48,129,208,47,0,0,0,0,73,69,78,68,174,66,96,130]);function gu(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return typeof btoa==`function`?btoa(t):Buffer.from(t,`binary`).toString(`base64`)}var _u=new Date(`2024-01-01T10:00:00`).getTime();function Q(e){return _u+e*6e4}var vu=`ui-fixture`;function yu(){return[{id:`fx-user-1`,role:`user`,content:`Hey sliccy — can you summarize what this fixture covers?`,timestamp:Q(0)},{id:`fx-assistant-1`,role:`assistant`,content:`Sure! This session walks through every chat UI variant I know about. You'll see user and assistant bubbles, tool calls in every status, the six lick channels, a delegation, queued messages, and a streaming tail at the end so you can inspect the live state.`,timestamp:Q(.2)}]}function bu(){return[{id:`fx-user-2`,role:`user`,content:`Show me some **markdown** — headings, lists, code, a blockquote.`,timestamp:Q(1)},{id:`fx-user-attachment`,role:`user`,content:`Use these attachments as visual and text context.`,timestamp:Q(1.1),attachments:[{id:`fx-att-image`,name:`dot.png`,mimeType:`image/png`,size:hu.byteLength,kind:`image`,data:gu(hu)},{id:`fx-att-text`,name:`notes.txt`,mimeType:`text/plain`,size:21,kind:`text`,text:`Fixture attachment text`}]},{id:`fx-assistant-2`,role:`assistant`,content:"## Rich content sample,,Here is a short list:,,- `renderAssistantMessageContent` handles GFM markdown,- Code blocks get syntax highlighting,- Inline `code` uses the mono token,,A fenced code block:,,```ts,import { createChatFixture } from './chat-fixture.js';,,const msgs = createChatFixture();,console.log(msgs.length);,```,,> Blockquotes should feel quieter than regular text.,,And a nested ordered list:,,1. First step,2. Second step, 1. Sub-step A, 2. Sub-step B,3. Third step".split(`,`).join(`
4675
- `),timestamp:Q(1.3)}]}function xu(){return[{id:`fx-assistant-3`,role:`assistant`,content:`Let me check a few things before I answer.`,timestamp:Q(2),toolCalls:[{id:`fx-tc-read`,name:`read_file`,input:{path:`/workspace/README.md`},result:`# Sample README
4701
+ Example output: Compare drafts against published files`;function Jl(e){return e.length>=6&&/[a-zA-Z]/.test(e)&&/\s/.test(e.trim())}function Yl(e,n){if(e.length===0)return;let r=Kl(e);if(!r)return;let i=Ul.get(r);if(i){n.setAttribute(`label`,i);return}let a=e[0]?.id;if(a){let e=Gl.get(a);e&&n.setAttribute(`label`,e)}if(Wl.has(r))return;Wl.add(r);let o=e.map((e,t)=>{let n;try{n=JSON.stringify(e.input??{})}catch{n=String(e.input??``)}return n.length>300&&(n=`${n.slice(0,300)}…`),`${t+1}. ${e.name}: ${n}`}).join(`
4702
+ `);t(async()=>{let{quickLabel:e}=await import(`./quick-llm-I3lG0JAs.js`).then(e=>e.n);return{quickLabel:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])).then(({quickLabel:e})=>e({system:ql,prompt:`Label these tool calls (inputs only):\n${o}`,maxTokens:40})).then(e=>{let t=e?.replace(/^["']|["']$|\.$/g,``).trim()??``;Jl(t)&&(Ul.set(r,t),a&&Gl.set(a,t),n.isConnected&&n.setAttribute(`label`,t))}).catch(()=>void 0).finally(()=>Wl.delete(r))}function Xl(e,t={}){let n=X(`slicc-tool-cluster`,{count:String(e.length)});return t.open&&n.setAttribute(`open`,``),n.append(...e),t.toolCalls&&t.toolCalls.length>0&&Yl(t.toolCalls,n),n}function Zl(e){let t=document.createElement(`slicc-agent-message`);return t.setAttribute(`data-msg-id`,e.id),e.isStreaming&&t.setAttribute(`streaming`,``),t.setBodyHtml(dl(e.content,e.isStreaming===!0)),(e.content??``).trim()||t.setAttribute(`data-empty`,``),[t,...(e.toolCalls??[]).map(t=>Bl(t,e.id))]}function Ql(e,t){let n=e.querySelectorAll(`:scope > slicc-tool-cluster`);for(let e of n){let n=Array.from(e.querySelectorAll(`slicc-action-row`));$l(e,n,t);let r=e.parentNode;if(!r){e.remove();continue}for(let t of n)eu(t,r,e);e.remove()}}function $l(e,t,n){if(!e.hasAttribute(`open`))return;let r=t[0]?.dataset.msgId;if(!r)return;let i=t.length>0&&t.every(e=>e.dataset.msgId===r),a=e.parentElement?.querySelector(`slicc-agent-message[data-msg-id="${r}"]`);i&&a?.hasAttribute(`streaming`)===!0||n.add(r)}function eu(e,t,n){let r=e.dataset.msgId,i=r&&t instanceof Element?t.querySelector(`:scope > slicc-agent-message[data-msg-id="${r}"]`):null;if(!i||i.parentNode!==t){t.insertBefore(e,n);return}let a=i;for(;a.nextSibling instanceof HTMLElement&&a.nextSibling.tagName.toLowerCase()===`slicc-action-row`&&a.nextSibling.dataset.msgId===r;)a=a.nextSibling;t.insertBefore(e,a.nextSibling)}var tu=new Set([`slicc-user-message`,`slicc-lick-card`,`slicc-error-card`,`slicc-delegation-line`,`slicc-day-separator`]);function nu(e){return e instanceof HTMLElement?tu.has(e.tagName.toLowerCase()):!0}function ru(e){return e instanceof HTMLElement&&e.tagName.toLowerCase()===`slicc-action-row`}function iu(e){return e instanceof HTMLElement&&e.tagName.toLowerCase()===`slicc-agent-message`}function au(e){let t=[],n=[];for(let r of e)iu(r)?!r.hasAttribute(`data-empty`)&&n.length>0&&(t.push(n),n=[]):ru(r)&&n.push(r);return n.length>0&&t.push(n),t}function ou(e,t){let n=t[0]?.dataset.msgId;return!n||!t.every(e=>e.dataset.msgId===n)?!1:e.querySelector(`slicc-agent-message[data-msg-id="${n}"]`)?.hasAttribute(`streaming`)===!0}function su(e,t){let n=[];for(let r of e){let e=r.dataset.msgId,i=r.dataset.toolId;if(!e||!i)return;let a=t(e,i);if(!a)return;n.push(a)}return n}function cu(e,t){let n=e[0],r=n.parentNode;if(!r)return;let i=new Set(e),a=n.nextSibling;for(;a&&i.has(a);)a=a.nextSibling;let o=n.dataset.msgId,s=Xl(e,{open:!!(o&&t.openClusterAnchors.has(o))||ou(r,e),toolCalls:t.toolCallLookup?su(e,t.toolCallLookup):void 0});r.insertBefore(s,a)}function lu(e,t){Ql(e,t.openClusterAnchors);let n=Array.from(e.children),r=0;for(;r<n.length;){if(nu(n[r])){r++;continue}let e=r;for(;e<n.length&&!nu(n[e]);)e++;let i=au(n.slice(r,e));for(let e of i)e.length>=3&&cu(e,t);r=e}t.openClusterAnchors.clear()}function uu(e){let t=_l.exec(e.content),n=e.lickCount??1,r=xl.exec(e.content),i=r?Sl(r[1]):null,a=X(`slicc-lick-card`,{kind:e.channel??`webhook`,"event-label":i??t?.[2]??e.channel??`event`,collapsible:``,collapsed:``});i&&a.setAttribute(`hue`,hl({isCone:!1,name:i})),n>1&&a.setAttribute(`count`,String(n)),e.lickState&&e.lickState!==`pending`&&a.setAttribute(`state`,e.lickState);let o=e.lickParts??[e.content];for(let e of o){let t=document.createElement(`div`);t.innerHTML=ul(yl(e)),a.append(t)}return a}function du(e){let t=X(`slicc-delegation-line`,{kind:`feed`,verb:`feed_scoop`,label:Cl(e.content.replace(/\*\*\[[^\]]*\]\*\*\s*/,``))}),n=document.createElement(`slicc-user-message`);return n.setBodyHtml(ul(e.content)),[t,n]}function fu(e){return typeof e==`string`&&e.startsWith(`No API key configured`)}function pu(e){return e?e.toLowerCase().includes(`the provided model identifier is invalid`):!1}function mu(e){return e?e.toLowerCase().includes(`please log in again`):!1}function hu(e){let t={message:e.content,"message-id":e.id};return fu(e.content)?t.action=`settings`:pu(e.content)?t.action=`change-model`:mu(e.content)&&(t.action=`login`),X(`slicc-error-card`,t)}function gu(e){if(e.source===`lick`)return[uu(e)];if(e.source===`delegation`||e.channel===`delegation`)return du(e);if(e.error)return[hu(e)];if(e.role===`assistant`)return Zl(e);let t=bl(e.content);return t?[uu({...e,source:`lick`,channel:t})]:[Vl(e)]}function _u(e){let t=[];for(let n of e){let e=n;if(!n.source&&n.role===`user`){let t=bl(n.content);t&&(e={...n,source:`lick`,channel:t})}let r=t[t.length-1];if(!(e.lickId||r?.lickId)&&e.source===`lick`&&r?.source===`lick`&&r.channel===e.channel){r.lickParts=[...r.lickParts??[r.content],e.content],r.lickCount=r.lickParts.length,r.content+=`\n\n${e.content}`;continue}t.push({...e})}return t}function vu(e){return new Date(e).toLocaleDateString(void 0,{weekday:`short`,month:`short`,day:`numeric`})}function yu(e){return X(`slicc-day-separator`,{label:vu(e)})}function bu(e){let t=[],n=``;for(let r of e){let e=new Date(r.timestamp).toDateString();e!==n&&(t.push(yu(r.timestamp)),n=e),t.push(...gu(r))}let r=document.createElement(`div`);return r.append(...t),lu(r,{openClusterAnchors:new Set,toolCallLookup:(t,n)=>e.find(e=>e.id===t)?.toolCalls?.find(e=>e.id===n)}),Array.from(r.children)}var xu=new Uint8Array([137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,1,0,0,0,1,8,4,0,0,0,181,28,12,2,0,0,0,11,73,68,65,84,120,218,99,100,96,0,0,0,6,0,2,48,129,208,47,0,0,0,0,73,69,78,68,174,66,96,130]);function Su(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return typeof btoa==`function`?btoa(t):Buffer.from(t,`binary`).toString(`base64`)}var Cu=new Date(`2024-01-01T10:00:00`).getTime();function Q(e){return Cu+e*6e4}var wu=`ui-fixture`;function Tu(){return[{id:`fx-user-1`,role:`user`,content:`Hey sliccy — can you summarize what this fixture covers?`,timestamp:Q(0)},{id:`fx-assistant-1`,role:`assistant`,content:`Sure! This session walks through every chat UI variant I know about. You'll see user and assistant bubbles, tool calls in every status, the six lick channels, a delegation, queued messages, and a streaming tail at the end so you can inspect the live state.`,timestamp:Q(.2)}]}function Eu(){return[{id:`fx-user-2`,role:`user`,content:`Show me some **markdown** — headings, lists, code, a blockquote.`,timestamp:Q(1)},{id:`fx-user-attachment`,role:`user`,content:`Use these attachments as visual and text context.`,timestamp:Q(1.1),attachments:[{id:`fx-att-image`,name:`dot.png`,mimeType:`image/png`,size:xu.byteLength,kind:`image`,data:Su(xu)},{id:`fx-att-text`,name:`notes.txt`,mimeType:`text/plain`,size:21,kind:`text`,text:`Fixture attachment text`}]},{id:`fx-assistant-2`,role:`assistant`,content:"## Rich content sample,,Here is a short list:,,- `renderAssistantMessageContent` handles GFM markdown,- Code blocks get syntax highlighting,- Inline `code` uses the mono token,,A fenced code block:,,```ts,import { createChatFixture } from './chat-fixture.js';,,const msgs = createChatFixture();,console.log(msgs.length);,```,,> Blockquotes should feel quieter than regular text.,,And a nested ordered list:,,1. First step,2. Second step, 1. Sub-step A, 2. Sub-step B,3. Third step".split(`,`).join(`
4703
+ `),timestamp:Q(1.3)}]}function Du(){return[{id:`fx-assistant-3`,role:`assistant`,content:`Let me check a few things before I answer.`,timestamp:Q(2),toolCalls:[{id:`fx-tc-read`,name:`read_file`,input:{path:`/workspace/README.md`},result:`# Sample README
4676
4704
 
4677
4705
  This is the contents that read_file returned.`},{id:`fx-tc-bash`,name:`bash`,input:{command:`ls -la /workspace`},result:`total 24
4678
4706
  drwxr-xr-x 4 user user 4096 Jan 01 10:00 .
4679
4707
  drwxr-xr-x 6 user user 4096 Jan 01 10:00 ..
4680
4708
  -rw-r--r-- 1 user user 187 Jan 01 10:00 README.md
4681
- drwxr-xr-x 2 user user 4096 Jan 01 10:00 src`},{id:`fx-tc-err`,name:`edit_file`,input:{path:`/workspace/missing.ts`,old_str:`x`,new_str:`y`},result:`ENOENT: no such file or directory, open "/workspace/missing.ts"`,isError:!0},{id:`fx-tc-run`,name:`bash`,input:{command:`npm run test -- --coverage`}},{id:`fx-tc-shot`,name:`bash`,input:{command:`playwright-cli screenshot`},result:`Screenshot saved to /tmp/shot.png`,_screenshotDataUrl:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=`}]}]}function Su(){return[{id:`fx-assistant-scoop-mgmt`,role:`assistant`,content:`Spinning up the scoops I need and handing out the work.`,timestamp:Q(3),toolCalls:[{id:`fx-tc-list-scoops`,name:`list_scoops`,input:{},result:`Registered scoops:
4709
+ drwxr-xr-x 2 user user 4096 Jan 01 10:00 src`},{id:`fx-tc-err`,name:`edit_file`,input:{path:`/workspace/missing.ts`,old_str:`x`,new_str:`y`},result:`ENOENT: no such file or directory, open "/workspace/missing.ts"`,isError:!0},{id:`fx-tc-run`,name:`bash`,input:{command:`npm run test -- --coverage`}},{id:`fx-tc-shot`,name:`bash`,input:{command:`playwright-cli screenshot`},result:`Screenshot saved to /tmp/shot.png`,_screenshotDataUrl:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=`}]}]}function Ou(){return[{id:`fx-assistant-scoop-mgmt`,role:`assistant`,content:`Spinning up the scoops I need and handing out the work.`,timestamp:Q(3),toolCalls:[{id:`fx-tc-list-scoops`,name:`list_scoops`,input:{},result:`Registered scoops:
4682
4710
  - sliccy (cone) [CONE] — ready (since Jan 1, 9:58 AM)
4683
4711
  - Hero Block (hero-block-scoop) — ready (since Jan 1, 9:59 AM)
4684
4712
  - Install Doc Writer (install-doc-writer-scoop) — idle`},{id:`fx-tc-scoop-scoop`,name:`scoop_scoop`,input:{name:`Release Notes`,model:`claude-sonnet-4-6`,prompt:`Draft release notes for v0.3.2 using the merged PR titles from the last 7 days.`,visiblePaths:[`/workspace/`,`/shared/releases/`],writablePaths:[`/scoops/release-notes-scoop/`,`/shared/releases/`]},result:`Scoop "Release Notes" created as "release-notes-scoop" and task sent. It is now working on it.`},{id:`fx-tc-scoop-scoop-err`,name:`scoop_scoop`,input:{name:`Release Notes`},result:`Failed to create scoop: a scoop named "release-notes-scoop" already exists.`,isError:!0},{id:`fx-tc-feed`,name:`feed_scoop`,input:{scoop_name:`hero-block-scoop`,prompt:`Update the hero block to use the new gradient background defined in /shared/tokens/brand.css. Preserve the existing copy. Run the snapshot tests when done.`},result:`Task sent to hero-block-scoop. You will be notified when it completes.`},{id:`fx-tc-send`,name:`send_message`,input:{text:`Checkpoint: finished the CSS token pass, starting on the test snapshots.`,sender:`hero-block-scoop`},result:`Message sent.`},{id:`fx-tc-drop`,name:`drop_scoop`,input:{scoop_name:`install-doc-writer-scoop`},result:`Scoop "Install Doc Writer" (install-doc-writer-scoop) has been dropped.`},{id:`fx-tc-memory`,name:`update_global_memory`,input:{content:`# Global Memory
4685
4713
 
4686
4714
  - Brand colors now live in /shared/tokens/brand.css
4687
4715
  - Release notes ship on Wednesdays
4688
- `},result:`Global memory updated successfully.`}]}]}function Cu(){return[{id:`fx-delegation-1`,role:`user`,content:"**[Instructions from sliccy]**\n\nRead `/workspace/README.md` and extract the install steps into `/shared/install.md`.",timestamp:Q(4),source:`delegation`,channel:`delegation`},{id:`fx-assistant-delegated`,role:`assistant`,content:"Extracted the install steps. Wrote them to `/shared/install.md`. The section covers prerequisites, npm install, and the dev server launch.",timestamp:Q(4.4),source:`cone`}]}function wu(){return[{id:`fx-lick-webhook`,role:`user`,content:"[Webhook Event: github-push]\n```json\n"+JSON.stringify({ref:`refs/heads/main`,repository:{full_name:`example/repo`},head_commit:{message:`fix(ui): tighten button contrast in dark mode`}},null,2)+"\n```",timestamp:Q(6),source:`lick`,channel:`webhook`},{id:`fx-lick-cron`,role:`user`,content:"[Cron Event: daily-digest]\n```json\n"+JSON.stringify({time:new Date(Q(8)).toISOString()},null,2)+"\n```",timestamp:Q(8),source:`lick`,channel:`cron`},{id:`fx-lick-sprinkle`,role:`user`,content:"[Sprinkle Event: welcome]\n```json\n"+JSON.stringify({action:`onboarding-complete`,data:{mountWorkspace:!0}},null,2)+"\n```",timestamp:Q(10),source:`lick`,channel:`sprinkle`},{id:`fx-lick-fswatch`,role:`user`,content:"[File Watch Event: src-watch]\n```json\n"+JSON.stringify({changes:[{type:`modified`,path:`/workspace/src/app.ts`},{type:`created`,path:`/workspace/src/utils.ts`}]},null,2)+"\n```",timestamp:Q(12),source:`lick`,channel:`fswatch`},{id:`fx-lick-navigate`,role:`user`,content:"[Navigate Event: https://www.sliccy.ai/handoff?handoff=demo]\n```json\n"+JSON.stringify({url:`https://www.sliccy.ai/handoff?handoff=demo`,verb:`handoff`,target:`https://www.sliccy.ai/handoff?handoff=demo`,instruction:`demo`,title:`Handoff`},null,2)+"\n```",timestamp:Q(14),source:`lick`,channel:`navigate`},{id:`fx-lick-session-reload`,role:`user`,content:`[Session Reload: mount-recovery]
4716
+ `},result:`Global memory updated successfully.`}]}]}function ku(){return[{id:`fx-delegation-1`,role:`user`,content:"**[Instructions from sliccy]**\n\nRead `/workspace/README.md` and extract the install steps into `/shared/install.md`.",timestamp:Q(4),source:`delegation`,channel:`delegation`},{id:`fx-assistant-delegated`,role:`assistant`,content:"Extracted the install steps. Wrote them to `/shared/install.md`. The section covers prerequisites, npm install, and the dev server launch.",timestamp:Q(4.4),source:`cone`}]}function Au(){return[{id:`fx-lick-webhook`,role:`user`,content:"[Webhook Event: github-push]\n```json\n"+JSON.stringify({ref:`refs/heads/main`,repository:{full_name:`example/repo`},head_commit:{message:`fix(ui): tighten button contrast in dark mode`}},null,2)+"\n```",timestamp:Q(6),source:`lick`,channel:`webhook`},{id:`fx-lick-cron`,role:`user`,content:"[Cron Event: daily-digest]\n```json\n"+JSON.stringify({time:new Date(Q(8)).toISOString()},null,2)+"\n```",timestamp:Q(8),source:`lick`,channel:`cron`},{id:`fx-lick-sprinkle`,role:`user`,content:"[Sprinkle Event: welcome]\n```json\n"+JSON.stringify({action:`onboarding-complete`,data:{mountWorkspace:!0}},null,2)+"\n```",timestamp:Q(10),source:`lick`,channel:`sprinkle`},{id:`fx-lick-fswatch`,role:`user`,content:"[File Watch Event: src-watch]\n```json\n"+JSON.stringify({changes:[{type:`modified`,path:`/workspace/src/app.ts`},{type:`created`,path:`/workspace/src/utils.ts`}]},null,2)+"\n```",timestamp:Q(12),source:`lick`,channel:`fswatch`},{id:`fx-lick-navigate`,role:`user`,content:"[Navigate Event: https://www.sliccy.ai/handoff?handoff=demo]\n```json\n"+JSON.stringify({url:`https://www.sliccy.ai/handoff?handoff=demo`,verb:`handoff`,target:`https://www.sliccy.ai/handoff?handoff=demo`,instruction:`demo`,title:`Handoff`},null,2)+"\n```",timestamp:Q(14),source:`lick`,channel:`navigate`},{id:`fx-lick-session-reload`,role:`user`,content:`[Session Reload: mount-recovery]
4689
4717
 
4690
4718
  A previously-mounted directory needs to be reauthorized:
4691
4719
 
@@ -4714,4 +4742,4 @@ Kind: read
4714
4742
  Detail: /shared/secrets/api-key.txt
4715
4743
  Suggested pattern: /shared/secrets/**
4716
4744
 
4717
- Use the lick_confirm tool with lick_id="lick-1700000000002-req44" to approve (or always-approve with a pattern), or lick_dismiss with lick_id="lick-1700000000002-req44" to deny.`,timestamp:Q(17.9),source:`lick`,channel:`sudo-request`,lickId:`lick-1700000000002-req44`,lickState:`dismissed`}]}function Tu(){return[{id:`fx-queued-1`,role:`user`,content:`Also double-check the install.md formatting after you finish.`,timestamp:Q(18),queued:!0}]}function Eu(){return[{id:`fx-assistant-streaming`,role:`assistant`,content:`Great, running the coverage suite now. I'll report back as soon as it `,timestamp:Q(20),isStreaming:!0,toolCalls:[{id:`fx-tc-streaming`,name:`bash`,input:{command:`npm run test -- --coverage`}}]}]}function Du(){return[...yu(),...bu(),...xu(),...Su(),...Cu(),...wu(),...Tu(),...Eu()]}var Ou=e({FREEZER_TINT:()=>ku,applyShellContext:()=>Vu,mountWcShell:()=>Bu,mountWcUiPreview:()=>Uu,submittedText:()=>Hu}),ku=`#3b6cb2`,Au=`slicc-wcui-style`,ju=[`html,body{margin:0;padding:0;height:100%;}`,`.wcui-frame{position:relative;transform:translateZ(0);width:100%;height:100vh;`,`overflow:hidden;background:var(--bg);font-family:var(--ui);}`,`.wcui-shader{position:absolute;inset:0;z-index:0;}`,`.wcui-frame slicc-chatpane{position:relative;background:transparent;}`,`.wcui-appcol{position:relative;z-index:1;height:100%;display:flex;flex-direction:column;`,`box-sizing:border-box;padding-left:var(--rail-w,44px);`,`transition:padding-left .4s cubic-bezier(.4,0,.2,1);}`,`@media (max-width:560px){.wcui-appcol{padding-left:44px;}}`,`.wcui-term{flex:1;min-height:0;display:flex;flex-direction:column;padding:8px 4px 8px 10px;`,`box-sizing:border-box;background:#141414;}`,`.wcui-term .terminal-panel__terminal-host{flex:1 1 auto;min-height:0;}`,`.wcui-term .terminal-panel__preview{flex:0 0 auto;}`,`.wcui-frame slicc-file-tree{width:100%;border-right:none;}`,`.wcui-memory{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;`,`gap:8px;padding:10px;}`,`.wcui-placeholder{flex:1;display:flex;align-items:center;justify-content:center;`,`padding:24px;color:var(--txt-2);font-size:13px;text-align:center;}`].join(``);function Mu(e){if(e.getElementById(Au))return;let t=e.createElement(`style`);t.id=Au,t.textContent=ju,e.head.appendChild(t)}var Nu=null;function Pu(){Nu?.(),Nu=Ma()}function $(e,t={}){let n=document.createElement(e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function Fu(e){let t=$(`slicc-nav`,{accent:`var(--waffle)`}),n=$(`slicc-scoop-switcher`);n.scoops=[...e.scoops];let r=$(`slicc-floatbar`,{label:e.floatLabel,spent:`0.00`}),i=document.createElement(`slicc-avatar-menu`);return i.append($(`slicc-avatar`,{name:`SLICC`})),t.append(...e.badge?[$(`slicc-logo`,{badge:e.badge})]:[],n,r,i),{nav:t,switcher:n,floatbar:r,avatarMenu:i}}function Iu(e){let t=$(`slicc-composer`),n=$(`slicc-queued-stack`);n.style.position=`relative`,n.style.zIndex=`0`,n.style.marginBottom=`-32px`,n.style.minHeight=`76px`;let r=$(`slicc-input-card`,{placeholder:e.placeholder});r.style.position=`relative`,r.style.zIndex=`1`;let i=$(`slicc-composer-meta`,{model:`Preview`,thinking:`off`});return t.append(n,r,i),{composer:t,inputCard:r,composerMeta:i,queuedStack:n}}function Lu(){let e=$(`slicc-workbench-pane`),t=$(`slicc-workbench-header`,{slot:`header`,hidden:``}),n=$(`slicc-tab-bar`,{active:`files`});t.append(n);let r=$(`slicc-workbench-body`,{active:`files`}),i=$(`slicc-surface`,{"surface-id":`files`,layout:`flex`,active:``}),a=$(`slicc-file-tree`);i.append(a);let o=$(`slicc-surface`,{"surface-id":`term`,layout:`flex`}),s=$(`div`,{class:`wcui-term`});o.append(s);let c=$(`slicc-surface`,{"surface-id":`memory`,layout:`flex`}),l=$(`div`,{class:`wcui-memory`});c.append(l);let u=$(`slicc-surface`,{"surface-id":`browser`,layout:`flex`}),d=$(`div`,{class:`wcui-placeholder`});return d.textContent=`The Browser dock item opens the full-screen tab switcher: every open tab — local and tray followers — with live screenshot thumbnails. Click a card to focus it, ✕ to close it.`,u.append(d),r.append(i,o,c,u),e.append(t,r),{workbench:e,body:r,header:t,tree:a,termSurface:s,memoryHost:l,tabBar:n}}function Ru(e,t,n,r){e.addEventListener(`slicc-dock-select`,e=>{let i=e.detail?.id;i&&i!==`browser`&&(t.setAttribute(`open`,``),n.setAttribute(`active`,i),r?.(i))}),e.addEventListener(`slicc-dock-collapse`,()=>{t.removeAttribute(`open`)}),e.addEventListener(`slicc-dock-longpress`,e=>{let i=e.detail?.id;if(!i?.startsWith(`sprinkle:`))return;t.setAttribute(`open`,``),n.setAttribute(`active`,i),r?.(i);let a=i.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`);n.querySelector(`[surface-id="${a}"]`)?.requestFullscreen?.().catch(()=>{})})}function zu(e,t,n){e.addEventListener(`tab-select`,e=>{let r=e.detail?.id;r&&(t.setAttribute(`active`,r),n?.(r))})}function Bu(e,t){Aa(document),Mu(document),Pu();let n=$(`div`,{class:`wcui-frame`}),r=$(`slicc-shader`,{mode:`cone`,tint:`var(--waffle)`,class:`wcui-shader`}),i=$(`slicc-freezer`);i.append($(`slicc-freezer-new`));let a=$(`div`,{class:`wcui-appcol`}),o=t.urlState?{"url-state":``}:{},s=$(`slicc-shell`,o),c=$(`slicc-chatpane`),l=$(`slicc-chat-thread`,{context:`cone`,accent:`var(--waffle)`,...o});l.append(...mu(t.messages));let{composer:u,inputCard:d,composerMeta:f,queuedStack:p}=Iu(t);c.append(l,u);let{workbench:m,body:h,header:g,tree:ee,termSurface:te,memoryHost:_,tabBar:v}=Lu(),y=$(`slicc-dock`,{"system-tools":``});s.append(c,m,y),Ru(y,s,h,t.onSurfaceActivate),zu(g,h,t.onSurfaceActivate),i.addEventListener(`freezer-toggle`,e=>{let t=e.detail?.open===!0;a.style.setProperty(`--rail-w`,t?`260px`:`44px`)});let b=0;l.addEventListener(`scroll`,()=>{b||=requestAnimationFrame(()=>{b=0,r.setAttribute(`scroll`,String(Math.round(l.scrollTop)))})},{passive:!0});let{nav:x,switcher:ne,floatbar:re,avatarMenu:ie}=Fu(t);return a.append(x,s),n.append(r,i,a),e.replaceChildren(n),{frame:n,shader:r,chatPane:c,thread:l,composer:u,inputCard:d,composerMeta:f,queuedStack:p,switcher:ne,floatbar:re,shell:s,workbenchBody:h,workbenchHeader:g,dock:y,freezer:i,fileTree:ee,termSurface:te,memoryHost:_,tabBar:v,avatarMenu:ie}}function Vu(e,t){let{shader:n,frame:r,freezer:i}=e;t.kind===`cone`?(n.setAttribute(`mode`,`cone`),n.setAttribute(`tint`,`var(--waffle)`),r.style.removeProperty(`--ctx`),i.removeAttribute(`ctx`)):t.kind===`scoop`?(n.setAttribute(`mode`,`scoop`),n.setAttribute(`tint`,t.accent),r.style.setProperty(`--ctx`,t.accent),i.removeAttribute(`ctx`)):(n.setAttribute(`mode`,`freezer`),n.setAttribute(`tint`,ku),r.style.setProperty(`--ctx`,ku),i.setAttribute(`ctx`,``))}function Hu(e){return e.detail?.value}function Uu(e){let t=Bu(e,{messages:Du(),scoops:[{key:`cone`,type:`cone`,color:`#b07823`,label:`sliccy`,eyes:`open`},{key:vu,type:`scoop`,color:`#06b6d4`,label:vu,eyes:`open`}],floatLabel:`standalone · preview`,placeholder:`Preview harness — submissions echo into the thread…`,badge:`fixture`});t.fileTree.items=[{kind:`group`,label:`workspace/`},{kind:`file`,id:`/workspace/CLAUDE.md`,label:`CLAUDE.md`},{kind:`group`,label:`shared/`},{kind:`file`,id:`/shared/CLAUDE.md`,label:`CLAUDE.md`}],t.switcher.setAttribute(`attention`,`cone`),t.inputCard.addEventListener(`submit`,e=>{let n=Hu(e)?.trim();if(!n)return;let r={id:`wc-echo-${t.thread.childElementCount}`,role:`user`,content:n,timestamp:Date.now()};t.thread.append(...uu(r))})}export{m as _,Ou as a,h as b,cu as c,uu as d,ru as f,_ as g,vo as h,Hu as i,su as l,ll as m,Vu as n,du as o,Kl as p,Bu as r,pu as s,ku as t,ou as u,g as v,l as y};
4745
+ Use the lick_confirm tool with lick_id="lick-1700000000002-req44" to approve (or always-approve with a pattern), or lick_dismiss with lick_id="lick-1700000000002-req44" to deny.`,timestamp:Q(17.9),source:`lick`,channel:`sudo-request`,lickId:`lick-1700000000002-req44`,lickState:`dismissed`}]}function ju(){return[{id:`fx-queued-1`,role:`user`,content:`Also double-check the install.md formatting after you finish.`,timestamp:Q(18),queued:!0}]}function Mu(){return[{id:`fx-assistant-streaming`,role:`assistant`,content:`Great, running the coverage suite now. I'll report back as soon as it `,timestamp:Q(20),isStreaming:!0,toolCalls:[{id:`fx-tc-streaming`,name:`bash`,input:{command:`npm run test -- --coverage`}}]}]}function Nu(){return[...Tu(),...Eu(),...Du(),...Ou(),...ku(),...Au(),...ju(),...Mu()]}var Pu=e({FREEZER_TINT:()=>Fu,applyShellContext:()=>qu,mountWcShell:()=>Ku,mountWcUiPreview:()=>Yu,submittedText:()=>Ju}),Fu=`#3b6cb2`,Iu=`slicc-wcui-style`,Lu=[`html,body{margin:0;padding:0;height:100%;}`,`.wcui-frame{position:relative;transform:translateZ(0);width:100%;height:100vh;`,`overflow:hidden;background:var(--bg);font-family:var(--ui);}`,`.wcui-shader{position:absolute;inset:0;z-index:0;}`,`.wcui-frame slicc-chatpane{position:relative;background:transparent;}`,`.wcui-appcol{position:relative;z-index:1;height:100%;display:flex;flex-direction:column;`,`box-sizing:border-box;padding-left:var(--rail-w,44px);`,`transition:padding-left .4s cubic-bezier(.4,0,.2,1);}`,`@media (max-width:560px){.wcui-appcol{padding-left:44px;}}`,`.wcui-term{flex:1;min-height:0;display:flex;flex-direction:column;padding:8px 4px 8px 10px;`,`box-sizing:border-box;background:#141414;}`,`.wcui-term .terminal-panel__terminal-host{flex:1 1 auto;min-height:0;}`,`.wcui-term .terminal-panel__preview{flex:0 0 auto;}`,`.wcui-frame slicc-file-tree{width:100%;border-right:none;}`,`.wcui-memory{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;`,`gap:8px;padding:10px;}`,`.wcui-placeholder{flex:1;display:flex;align-items:center;justify-content:center;`,`padding:24px;color:var(--txt-2);font-size:13px;text-align:center;}`].join(``);function Ru(e){if(e.getElementById(Iu))return;let t=e.createElement(`style`);t.id=Iu,t.textContent=Lu,e.head.appendChild(t)}var zu=null;function Bu(){zu?.(),zu=Ra()}function $(e,t={}){let n=document.createElement(e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function Vu(e){let t=$(`slicc-nav`,{accent:`var(--waffle)`}),n=$(`slicc-scoop-switcher`);n.scoops=[...e.scoops];let r=$(`slicc-floatbar`,{label:e.floatLabel,spent:`0.00`}),i=document.createElement(`slicc-avatar-menu`);return i.append($(`slicc-avatar`,{name:`SLICC`})),t.append(...e.badge?[$(`slicc-logo`,{badge:e.badge})]:[],n,r,i),{nav:t,switcher:n,floatbar:r,avatarMenu:i}}function Hu(e){let t=$(`slicc-composer`),n=$(`slicc-queued-stack`);n.style.position=`relative`,n.style.zIndex=`0`,n.style.marginBottom=`-32px`,n.style.minHeight=`76px`;let r=$(`slicc-input-card`,{placeholder:e.placeholder});r.style.position=`relative`,r.style.zIndex=`1`;let i=$(`slicc-composer-meta`,{model:`Preview`,thinking:`off`});return t.append(n,r,i),{composer:t,inputCard:r,composerMeta:i,queuedStack:n}}function Uu(){let e=$(`slicc-workbench-pane`),t=$(`slicc-workbench-header`,{slot:`header`,hidden:``}),n=$(`slicc-tab-bar`,{active:`files`});t.append(n);let r=$(`slicc-workbench-body`,{active:`files`}),i=$(`slicc-surface`,{"surface-id":`files`,layout:`flex`,active:``}),a=$(`slicc-file-tree`);i.append(a);let o=$(`slicc-surface`,{"surface-id":`term`,layout:`flex`}),s=$(`div`,{class:`wcui-term`});o.append(s);let c=$(`slicc-surface`,{"surface-id":`memory`,layout:`flex`}),l=$(`div`,{class:`wcui-memory`});c.append(l);let u=$(`slicc-surface`,{"surface-id":`browser`,layout:`flex`}),d=$(`div`,{class:`wcui-placeholder`});return d.textContent=`The Browser dock item opens the full-screen tab switcher: every open tab — local and tray followers — with live screenshot thumbnails. Click a card to focus it, ✕ to close it.`,u.append(d),r.append(i,o,c,u),e.append(t,r),{workbench:e,body:r,header:t,tree:a,termSurface:s,memoryHost:l,tabBar:n}}function Wu(e,t,n,r){e.addEventListener(`slicc-dock-select`,e=>{let i=e.detail?.id;i&&i!==`browser`&&(t.setAttribute(`open`,``),n.setAttribute(`active`,i),r?.(i))}),e.addEventListener(`slicc-dock-collapse`,()=>{t.removeAttribute(`open`)}),e.addEventListener(`slicc-dock-longpress`,e=>{let i=e.detail?.id;if(!i?.startsWith(`sprinkle:`))return;t.setAttribute(`open`,``),n.setAttribute(`active`,i),r?.(i);let a=i.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`);n.querySelector(`[surface-id="${a}"]`)?.requestFullscreen?.().catch(()=>{})})}function Gu(e,t,n){e.addEventListener(`tab-select`,e=>{let r=e.detail?.id;r&&(t.setAttribute(`active`,r),n?.(r))})}function Ku(e,t){Ia(document),Ru(document),Bu();let n=$(`div`,{class:`wcui-frame`}),r=$(`slicc-shader`,{mode:`cone`,tint:`var(--waffle)`,class:`wcui-shader`}),i=$(`slicc-freezer`);i.append($(`slicc-freezer-new`));let a=$(`div`,{class:`wcui-appcol`}),o=t.urlState?{"url-state":``}:{},s=$(`slicc-shell`,o),c=$(`slicc-chatpane`),l=$(`slicc-chat-thread`,{context:`cone`,accent:`var(--waffle)`,...o});l.append(...bu(t.messages));let{composer:u,inputCard:d,composerMeta:f,queuedStack:p}=Hu(t);c.append(l,u);let{workbench:m,body:h,header:g,tree:ee,termSurface:te,memoryHost:_,tabBar:v}=Uu(),y=$(`slicc-dock`,{"system-tools":``});s.append(c,m,y),Wu(y,s,h,t.onSurfaceActivate),Gu(g,h,t.onSurfaceActivate),i.addEventListener(`freezer-toggle`,e=>{let t=e.detail?.open===!0;a.style.setProperty(`--rail-w`,t?`260px`:`44px`)});let b=0;l.addEventListener(`scroll`,()=>{b||=requestAnimationFrame(()=>{b=0,r.setAttribute(`scroll`,String(Math.round(l.scrollTop)))})},{passive:!0});let{nav:x,switcher:ne,floatbar:re,avatarMenu:ie}=Vu(t);return a.append(x,s),n.append(r,i,a),e.replaceChildren(n),{frame:n,shader:r,chatPane:c,thread:l,composer:u,inputCard:d,composerMeta:f,queuedStack:p,switcher:ne,floatbar:re,shell:s,workbenchBody:h,workbenchHeader:g,dock:y,freezer:i,fileTree:ee,termSurface:te,memoryHost:_,tabBar:v,avatarMenu:ie}}function qu(e,t){let{shader:n,frame:r,freezer:i}=e;t.kind===`cone`?(n.setAttribute(`mode`,`cone`),n.setAttribute(`tint`,`var(--waffle)`),r.style.removeProperty(`--ctx`),i.removeAttribute(`ctx`)):t.kind===`scoop`?(n.setAttribute(`mode`,`scoop`),n.setAttribute(`tint`,t.accent),r.style.setProperty(`--ctx`,t.accent),i.removeAttribute(`ctx`)):(n.setAttribute(`mode`,`freezer`),n.setAttribute(`tint`,Fu),r.style.setProperty(`--ctx`,Fu),i.setAttribute(`ctx`,``))}function Ju(e){return e.detail?.value}function Yu(e){let t=Ku(e,{messages:Nu(),scoops:[{key:`cone`,type:`cone`,color:`#b07823`,label:`sliccy`,eyes:`open`},{key:wu,type:`scoop`,color:`#06b6d4`,label:wu,eyes:`open`}],floatLabel:`standalone · preview`,placeholder:`Preview harness — submissions echo into the thread…`,badge:`fixture`});t.fileTree.items=[{kind:`group`,label:`workspace/`},{kind:`file`,id:`/workspace/CLAUDE.md`,label:`CLAUDE.md`},{kind:`group`,label:`shared/`},{kind:`file`,id:`/shared/CLAUDE.md`,label:`CLAUDE.md`}],t.switcher.setAttribute(`attention`,`cone`),t.inputCard.addEventListener(`submit`,e=>{let n=Ju(e)?.trim();if(!n)return;let r={id:`wc-echo-${t.thread.childElementCount}`,role:`user`,content:n,timestamp:Date.now()};t.thread.append(...gu(r))})}export{m as _,Pu as a,h as b,mu as c,gu as d,lu as f,_ as g,wo as h,Ju as i,pu as l,hl as m,qu as n,_u as o,Ql as p,Ku as r,yu as s,Fu as t,fu as u,g as v,l as y};