sliccy 5.7.0 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/assets/{account-store-DmK3LgMp.js → account-store-Dc1fxjXw.js} +2 -2
- package/dist/ui/assets/{account-store-BJkO32O7.js → account-store-Dxwe8EsY.js} +2 -2
- package/dist/ui/assets/{adobe-6Z_aDboT.js → adobe--oSW4CGI.js} +1 -1
- package/dist/ui/assets/{adobe-B-U9Z7NC.js → adobe-CLWBcgAB.js} +1 -1
- package/dist/ui/assets/{adobe-oauth-state-h_AqF9i-.js → adobe-oauth-state-BQvp5gzM.js} +1 -1
- package/dist/ui/assets/{agent-message-to-chat-Td59lifY.js → agent-message-to-chat-DJq4l5Os.js} +1 -1
- package/dist/ui/assets/{apps-BdKU9yrw.js → apps-3JIOI11m.js} +1 -1
- package/dist/ui/assets/{azure-openai-XgQhh4YC.js → azure-openai-B8O7vWcA.js} +1 -1
- package/dist/ui/assets/{azure-openai-CZb-VxU1.js → azure-openai-OuC2Ep8f.js} +1 -1
- package/dist/ui/assets/{connect-surface-CrfuJbto.js → connect-surface-CQ4FskrY.js} +1 -1
- package/dist/ui/assets/dip-BFmzIJYT.js +1 -0
- package/dist/ui/assets/{dist-_bYC3WAB.js → dist-B-7ogmSb.js} +1 -1
- package/dist/ui/assets/{dist-BtHSjf9T.js → dist-DYZ5RYTi.js} +1 -1
- package/dist/ui/assets/{ensure-speech-assets-DhDuBWSy.js → ensure-speech-assets-e2KUXG_d.js} +1 -1
- package/dist/ui/assets/esp8266-DDuafqfm.js +1 -0
- package/dist/ui/assets/{esptool-operations-_g9wUQVW.js → esptool-operations-piu4J4Nw.js} +2 -2
- package/dist/ui/assets/{fs-CFY4wEO_.js → fs-B2aOzJSq.js} +2 -2
- package/dist/ui/assets/{fs-DgQjjmE-.js → fs-DKB9QQ1D.js} +1 -1
- package/dist/ui/assets/{github-BPkNAJwT.js → github-CMrNiTg9.js} +1 -1
- package/dist/ui/assets/{github-B7ChXpkz.js → github-DFAGIZc9.js} +2 -2
- package/dist/ui/assets/{github-copilot-B-q_nSeT.js → github-copilot-BPysGtiF.js} +1 -1
- package/dist/ui/assets/{github-copilot-4C5xap18.js → github-copilot-DiEwl4Za.js} +1 -1
- package/dist/ui/assets/{hear-BcPyI9X4.js → hear-0TLf-NV2.js} +1 -1
- package/dist/ui/assets/{kernel-worker-B8y1hRLf.js → kernel-worker-BHTQbRVg.js} +7254 -7256
- package/dist/ui/assets/{kokoro-engine-BDDoej_R.js → kokoro-engine-Dqxzr1p_.js} +1 -1
- package/dist/ui/assets/{lick-ws-bridge-BuM5zVt2.js → lick-ws-bridge-BBdxtLkF.js} +1 -1
- package/dist/ui/assets/{lick-ws-bridge-li0y-Qye.js → lick-ws-bridge-BWgHB8Mm.js} +1 -1
- package/dist/ui/assets/{local-llm-BsJOdlFj.js → local-llm-B-wFy26p.js} +1 -1
- package/dist/ui/assets/{main-Ct6nBsvQ.js → main-Adg2tAFx.js} +4 -4
- package/dist/ui/assets/{mount-Gnby_wEO.js → mount-DEi0sp7Z.js} +2 -2
- package/dist/ui/assets/{mount-DYpob_0g.js → mount-DPWetasY.js} +1 -1
- package/dist/ui/assets/{new-session-B8odffPo.js → new-session-Cb6vBKth.js} +2 -2
- package/dist/ui/assets/{oauth-bootstrap-BGzgKxJZ.js → oauth-bootstrap-JRNDYo5M.js} +2 -2
- package/dist/ui/assets/{openai-codex-DdaCXndB.js → openai-codex-BR2wnaLC.js} +1 -1
- package/dist/ui/assets/{openai-codex-C8BnA09u.js → openai-codex-C_J0ka68.js} +1 -1
- package/dist/ui/assets/{page-follower-tray-BjnmCqi_.js → page-follower-tray-B8PlRSgj.js} +1 -1
- package/dist/ui/assets/{panel-rpc-handlers-CfTZEw-a.js → panel-rpc-handlers-DSix4MB0.js} +1 -1
- package/dist/ui/assets/{provider-gvuf6o1Y.js → provider-BHB2jXSJ.js} +1 -1
- package/dist/ui/assets/{provider-DSwqhbjh.js → provider-CKTI8xj9.js} +2 -2
- package/dist/ui/assets/provider-store-access-BTGmOGN3.js +1 -0
- package/dist/ui/assets/provider-store-access-D3cxgK3U.js +1 -0
- package/dist/ui/assets/{providers-DjA-mN3G.js → providers-Bs-uFcFP.js} +1 -1
- package/dist/ui/assets/{quick-llm-9git86en.js → quick-llm-CycdqfYy.js} +1 -1
- package/dist/ui/assets/session-freezer-DfS-tJMu.js +1 -0
- package/dist/ui/assets/{speak-CdPyAXkV.js → speak-BeDx_WsJ.js} +1 -1
- package/dist/ui/assets/{sprinkle-manager-CkAr6bdf.js → sprinkle-manager-DFmzxkMb.js} +1 -1
- package/dist/ui/assets/{store-BEA5HqCJ.js → store-n3jCQwXL.js} +1 -1
- package/dist/ui/assets/{sudo-B1yquPnV.js → sudo-QalJSmeJ.js} +1 -1
- package/dist/ui/assets/{transformers-env-Dd1RZAhD.js → transformers-env-D3a1ujzs.js} +1 -1
- package/dist/ui/assets/{tray-leader-DaZxCtDg.js → tray-leader-vew7MfYo.js} +1 -1
- package/dist/ui/assets/{tray-leave-runtime-CTl4wlyQ.js → tray-leave-runtime-D_Ie9yG4.js} +1 -1
- package/dist/ui/assets/{upgrade-detection-C3va2BdK.js → upgrade-detection-BVHP2OHZ.js} +1 -1
- package/dist/ui/assets/{wc-attach-DIniB15b.js → wc-attach-BSV3H-ll.js} +2 -2
- package/dist/ui/assets/{wc-detached-BJQ7m0Y6.js → wc-detached-Bp7JdDks.js} +1 -1
- package/dist/ui/assets/{wc-extension-B1ApIgx4.js → wc-extension-CvNRpyiG.js} +2 -2
- package/dist/ui/assets/{wc-follower-DM39T0r-.js → wc-follower-CDeOFfip.js} +2 -2
- package/dist/ui/assets/{wc-live-DotCFWrU.js → wc-live-D6xN2jey.js} +5 -5
- package/dist/ui/assets/{wc-nav-Ch90Rvla.js → wc-nav-CQCfsGJ-.js} +2 -2
- package/dist/ui/assets/{wc-onboarding-BSDbuTbO.js → wc-onboarding-DCFNFuNq.js} +2 -2
- package/dist/ui/assets/{wc-placeholder-BPJY188Z.js → wc-placeholder-Cu71r8Mz.js} +3 -3
- package/dist/ui/assets/{wc-settings-BB8Vcl7j.js → wc-settings-CK450rVK.js} +2 -2
- package/dist/ui/assets/{wc-shell-DWaOSP7s.js → wc-shell-DE5Fham9.js} +20 -19
- package/dist/ui/assets/{wc-sprinkles-CG56HT2Y.js → wc-sprinkles-FwmHOcRi.js} +2 -2
- package/dist/ui/assets/{wc-tray-BUt0av23.js → wc-tray-BDjVLrgj.js} +2 -2
- package/dist/ui/assets/{whisper-engine-CZ1KmpKz.js → whisper-engine-BJYgChx7.js} +1 -1
- package/dist/ui/assets/{xai-grok-Ct3YGNfR.js → xai-grok-DA2KaLdL.js} +1 -1
- package/dist/ui/assets/{xai-grok-CWqPBfAj.js → xai-grok-FXhgnguU.js} +1 -1
- package/dist/ui/electron-overlay-entry.js +84 -83
- package/dist/ui/index.html +2 -2
- package/dist/ui/packages/webapp/index.html +2 -2
- package/package.json +1 -1
- package/dist/ui/assets/dip-D1QS3U_R.js +0 -1
- package/dist/ui/assets/esp8266-C7eKVXw5.js +0 -1
- package/dist/ui/assets/provider-store-access-CFrROG9I.js +0 -1
- package/dist/ui/assets/provider-store-access-DN0BL-Eb.js +0 -1
- package/dist/ui/assets/session-freezer-D0WyVUhx.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/quick-llm-
|
|
2
|
-
import{n as e}from"./chunk-aKtaBQYM.js";import{t}from"./preload-helper-zJ_50EbN.js";import{o as n}from"./main-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/quick-llm-CycdqfYy.js","assets/chunk-aKtaBQYM.js","assets/account-store-Dxwe8EsY.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-x0cJ68Fe.js","assets/proxied-fetch-B5vr_AP8.js","assets/fetch-body-D2PwksUW.js","assets/secret-topology-Bp0wH2ni.js","assets/secrets-bridge-client-DXw32cXb.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/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-Adg2tAFx.js";import{n as r,t as i}from"./icons-BU6llBsN.js";import{n as a,r as o,t as s}from"./speech-CqQdPtyQ.js";import{t as c}from"./soundscape-cues-5_sT5Un6.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));
|
|
@@ -397,7 +397,7 @@ slicc-chat-table > .ctable code {
|
|
|
397
397
|
border-radius: 5px;
|
|
398
398
|
padding: 1px 5px;
|
|
399
399
|
}
|
|
400
|
-
`,
|
|
400
|
+
`,we=`slicc-chat-table-style`;function Te(e){if(e.getElementById(we))return;let t=e.createElement(`style`);t.id=we,t.textContent=Ce,(e.head??e.documentElement).appendChild(t)}function Ee(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(){Te(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?Ee(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 D(e){if(typeof window>`u`||!window.location)return null;try{return new URLSearchParams(window.location.search).get(e)}catch{return null}}function De(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 Oe=`
|
|
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
|
-
`,
|
|
476
|
+
`,ke=`slicc-chat-thread-style`;function Ae(e){if(e.getElementById(ke))return;let t=e.createElement(`style`);t.id=ke,t.textContent=Oe,(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,De(`at`,String(Math.round(this.scrollTop)))},300))};#s=()=>{if(!this.urlState)return;let e=D(`ctx`);if(e&&e!==this.context)this.dispatchEvent(new CustomEvent(`slicc-url-context`,{bubbles:!0,composed:!0,detail:{context:e}}));else{let e=D(`at`);e!=null&&(this.scrollTop=Number.parseInt(e,10)||0)}};#c=null;#l=new Map;connectedCallback(){Ae(this.ownerDocument),this.#m(),this.#p(),this.scrollToBottom(),this.urlState&&(this.#r=D(`at`),this.#i=D(`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),De(`ctx`,n,{push:!0})))}get urlState(){return this.hasAttribute(`url-state`)}set urlState(e){this.toggleAttribute(`url-state`,e)}get urlContext(){return this.urlState?D(`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 je=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
|
-
`),
|
|
512
|
+
`),Me=[`feed`,`scoop`,`drop`,`sprinkle`],Ne={feed:`arrow-right`,scoop:`circle-plus`,drop:`circle-check`,sprinkle:`sparkles`},O={feed:`Delegated to`,scoop:`Spun up`,drop:`Wrapped up`,sprinkle:``},Pe={feed_scoop:`Delegated to`,scoop_scoop:`Spun up`,drop_scoop:`Wrapped up`,"sprinkle-opened":`Opened`};function Fe(e){return Pe[e]??e}function Ie(e){return Me.includes(e??``)?e:`feed`}function Le(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=[je]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){return Ie(this.getAttribute(`kind`))}set kind(e){this.setAttribute(`kind`,Ie(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,i=n==null?O[e]:Fe(n),a=this.scoop,o=this.label,s=this.args?Le(this.args):[];t?this.style.setProperty(`--c`,t):this.style.removeProperty(`--c`);let c=b(`span`,{class:`darrow`,part:`arrow`},b(`slot`,{name:`arrow`},r(Ne[e],{size:13}))),l=b(`slot`,{name:`label`});i&&l.append(b(`span`,{class:`verb`},i)),a&&l.append(b(`b`,{class:`scoop`,part:`scoop`,style:t?`color:${t}`:void 0},a)),o&&l.append(b(`span`,{class:`prose`},o));let u=b(`span`,{class:`label`,part:`label`},l),d=b(`slot`,{name:`args`});for(let e of s)d.append(b(`code`,{part:`code`},e));this.#e.replaceChildren(c,u,d)}});var Re=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=[
|
|
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=[Re]}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 ze=[`#f43f5e`,`#f59e0b`,`#06b6d4`,`#8b5cf6`,`#ec4899`,`#22c55e`],Be=46,k=72,Ve=6.283185;function A(e,t){return e+Math.random()*(t-e)}var He=[{color:`#faf6f1`,label:`paper`},{color:`#fff7ed`,label:`cream`},{color:`#f5f3ff`,label:`lilac`},{color:`#fef2f2`,label:`blush`}],Ue=[{color:`#8b5cf6`,label:`violet`},{color:`#f43f5e`,label:`rose`},{color:`#06b6d4`,label:`cyan`},{color:`#ef7000`,label:`cone`}],We=0,Ge=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${++
|
|
625
|
+
`);v(`slicc-dip`,class extends HTMLElement{static observedAttributes=[`name`,`hue`,`prompt`];#e;#t=`d${++We}`;#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=[Ge]}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`},r(`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}`,He,`paper`),this.#g(`accent:${this.#t}`,Ue,`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<Be;e++)this.#o.push({x:A(0,this.#s),y:A(0,this.#c),vx:A(-.1,.1),vy:A(-.08,.08),rot:A(0,Ve),rv:A(-.014,.014),s:A(1.2,2.2),col:ze[e%ze.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<k*k){let e=Math.sqrt(i)||1,a=(k-e)/k*.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 Ke=14,qe=12,Je=`Something went wrong`,j={retry:`Try again`,settings:`Open Settings`,"change-model":`Change model`,login:`Log in again`},Ye={retry:`rotate-ccw`,settings:`settings`,"change-model":`sparkles`,login:`log-in`},Xe=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=[
|
|
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=[Xe]}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??Je,n=this.message,i=this.buttonLabel??j[e],a=Ye[e],o=b(`span`,{class:`ic`,part:`icon`,"aria-hidden":!0});o.append(r(`triangle-alert`,{size:Ke}));let s=b(`div`,{class:`err`,part:`card`},b(`div`,{class:`eh`,part:`header`},o,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":i},r(a,{size:qe}),i)));this.#e.replaceChildren(s),this.#r()}#r(){this.#i();let e=this.#e.querySelector(`.retry`);if(!e)return;let t=this.action;this.#t=()=>{t===`settings`?this.openSettings():t===`change-model`?this.changeModel():t===`login`?this.login():this.retry()},e.addEventListener(`click`,this.#t)}#i(){let e=this.#e.querySelector(`.retry`);e&&this.#t&&e.removeEventListener(`click`,this.#t),this.#t=null}});var Ze=9,Qe=3,$e=45,et=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=[
|
|
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=[et]}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:Ze}set size(e){this.setAttribute(`size`,String(e))}#r(){let e=this.size,t=1.3/Ze*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(Qe,Math.hypot(e.clientX-r,e.clientY-i)/$e);t.style.setProperty(`--px`,`${(Math.cos(a)*o).toFixed(2)}px`),t.style.setProperty(`--py`,`${(Math.sin(a)*o).toFixed(2)}px`)}}});var tt=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
|
-
`),
|
|
785
|
+
`),nt=`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=[tt]}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??nt,t=this.name,n=b(`slicc-googly-eyes`,{class:`eyes`});this.eyes===`dead`&&n.setAttribute(`eyes`,`dead`);let i=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`},r(`hand`,{size:13})),b(`span`,{class:`pre`},e),` `,t==null?null:b(`b`,{part:`name`},t))),a=b(`p`,{part:`text`},this.#n());this.#e.replaceChildren(b(`div`,{class:`handoff`,part:`card`},i,a))}#i(){let e=this.name,t=b(`span`,{class:`sg`,part:`glyph`,"aria-hidden":`true`},r(`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 M=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
|
-
`),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 i=this.eventLabel??rt,a=t>1?`${i} ×${t}`:i,o=this.body,s=this.collapsible,c=e?`lick ${ct} ${e}`:`lick ${ct}`,l=b(`span`,{class:`bell`,part:`bell`,"aria-hidden":!0});l.append(r(ot(e),{size:
|
|
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 i=this.eventLabel??rt,a=t>1?`${i} ×${t}`:i,o=this.body,s=this.collapsible,c=e?`lick ${ct} ${e}`:`lick ${ct}`,l=b(`span`,{class:`bell`,part:`bell`,"aria-hidden":!0});l.append(r(ot(e),{size:M}));let u={class:`lh`,part:`header`};s&&(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`},a)),f=this.state;if(f!==`pending`){let e=b(`span`,{class:`status`,part:`status`,"aria-hidden":!0});e.append(r(N[f],{size:M})),d.append(e)}let p=b(`div`,{class:`lick`,part:`card`},d,b(`div`,{class:`lb`,part:`body`},o??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;
|
|
@@ -1501,15 +1501,15 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
|
|
|
1501
1501
|
.brain{color:var(--violet);display:block;vertical-align:-2px;flex:0 0 auto;}
|
|
1502
1502
|
/* Model dropdown — anchored to the model pill and opening UPWARD (the meta row
|
|
1503
1503
|
sits at the very bottom of the composer, so a downward menu would clip). */
|
|
1504
|
-
.mwrap{position:relative;flex:0 0 auto;display:inline-flex;}
|
|
1504
|
+
.mwrap,.twrap{position:relative;flex:0 0 auto;display:inline-flex;}
|
|
1505
1505
|
.ctl .cx svg{transition:transform .15s ease;}
|
|
1506
|
-
.mwrap.open .ctl .cx svg{transform:rotate(180deg);}
|
|
1506
|
+
.mwrap.open .ctl .cx svg,.twrap.open .ctl .cx svg{transform:rotate(180deg);}
|
|
1507
1507
|
.menu{position:absolute;bottom:calc(100% + 6px);left:0;min-width:170px;
|
|
1508
1508
|
background:var(--canvas);border:1px solid var(--line);border-radius:10px;
|
|
1509
1509
|
box-shadow:0 -10px 28px -10px rgba(10,10,10,.22),0 -2px 8px -4px rgba(10,10,10,.12);
|
|
1510
1510
|
padding:5px;opacity:0;transform:translateY(4px);pointer-events:none;
|
|
1511
1511
|
transition:opacity .12s ease,transform .12s ease;z-index:20;}
|
|
1512
|
-
.mwrap.open .menu{opacity:1;transform:none;pointer-events:auto;}
|
|
1512
|
+
.mwrap.open .menu,.twrap.open .menu{opacity:1;transform:none;pointer-events:auto;}
|
|
1513
1513
|
/* type-ahead search (shown when the list is long) */
|
|
1514
1514
|
.msearch{width:100%;box-sizing:border-box;margin:0 0 5px;padding:6px 9px;border:1px solid var(--line);
|
|
1515
1515
|
border-radius:7px;background:var(--ghost);color:var(--ink);font:inherit;font-size:12.5px;outline:none;}
|
|
@@ -1524,6 +1524,7 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
|
|
|
1524
1524
|
.mitem .tick{margin-left:auto;display:inline-flex;color:var(--violet);visibility:hidden;}
|
|
1525
1525
|
.mitem[aria-selected="true"] .tick{visibility:visible;}
|
|
1526
1526
|
.mempty{padding:10px;color:var(--txt-3);font-size:12px;text-align:center;}
|
|
1527
|
+
.titem .mname{min-width:unset;overflow:visible;text-overflow:unset;}
|
|
1527
1528
|
@media (prefers-reduced-motion: reduce){.menu,.ctl .cx svg{transition:none;}}
|
|
1528
1529
|
.mspacer{flex:1;}
|
|
1529
1530
|
.hint{font-size:11px;color:var(--txt-3);display:inline-flex;align-items:center;gap:7px;}
|
|
@@ -1533,7 +1534,7 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
|
|
|
1533
1534
|
/* Narrow / extension-sidebar: the ⏎ / ⇧⏎ keyboard hints don't fit (and touch
|
|
1534
1535
|
users have no keyboard) — drop them regardless of the narrow-chat attribute. */
|
|
1535
1536
|
@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;#
|
|
1537
|
+
`);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=null;#l=!1;#u=!1;#d=``;#f=e=>{let t=e.composedPath();this.#l&&!t.includes(this)&&this.#S(),this.#u&&!t.includes(this)&&this.#D()};#p=e=>{e.key===`Escape`&&(this.#l&&(e.stopPropagation(),this.#S(),this.#r?.focus()),this.#u&&(e.stopPropagation(),this.#D(),this.#i?.focus()))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Yt]}connectedCallback(){this.#g()}disconnectedCallback(){this.#y(),document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)}attributeChangedCallback(){this.isConnected&&this.#g()}get model(){return this.getAttribute(`model`)??Rt}set model(e){e==null?this.removeAttribute(`model`):this.setAttribute(`model`,e)}get models(){return(this.#c??[...zt]).map(e=>typeof e==`string`?e:{...e})}set models(e){this.#c=Array.isArray(e)?e.slice():null,this.isConnected&&this.#g()}get#m(){return(this.#c??zt).map(Vt)}get#h(){return this.#c!==null&&this.#c.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}#g(){this.#y();let e=this.model,t=this.thinking,n=It[t],i=t===Lt,a=this.#h,o=a?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())),s=b(`div`,{class:`menu`,part:`model-menu`,role:`menu`});if(this.#m.length>Bt){let e=b(`input`,{class:`msearch`,part:`model-search`,type:`text`,placeholder:`Search models…`,"aria-label":`Search models`});e.value=this.#d,e.addEventListener(`input`,()=>{this.#d=e.value,this.#_()}),e.addEventListener(`click`,e=>e.stopPropagation()),s.append(e)}this.#s=b(`div`,{class:`mlist`,role:`none`}),s.append(this.#s);let c=b(`div`,{class:`mwrap`},o,s),l=!this.noThinking&&!a,u=null;if(l){let e=Gt();e.style.color=n.tint;let a=b(`button`,{type:`button`,class:`ctl tsel${i?` x`:``}`,part:`thinking`,title:n.gloss,"aria-haspopup":`menu`,"aria-expanded":`false`},e,` `,b(`span`,{class:`tlabel`},n.label),` `,b(`span`,{class:`cx`},Kt()));a.style.setProperty(`--tw`,n.tint);let o=b(`div`,{class:`menu tmenu`,part:`thinking-menu`,role:`menu`}),s=b(`div`,{class:`mlist`,role:`none`});for(let e of Ft){let n=It[e],i=b(`button`,{type:`button`,class:`mitem titem`,role:`menuitemradio`,"data-level":e,"aria-selected":e===t?`true`:`false`,title:n.gloss},b(`span`,{class:`mname`},n.label),b(`span`,{class:`tick`},r(`check`,{size:14})));i.addEventListener(`click`,()=>this.#k(e)),s.append(i)}o.append(s),u=b(`div`,{class:`twrap`},a,o)}let d=b(`slot`,{name:`hint`});y(d,[b(`span`,{class:`kbd`},`⏎`),` send `,b(`span`,{class:`sep`}),` `,b(`span`,{class:`kbd`},`⇧⏎`),` newline`]);let f=b(`div`,{class:`meta`,part:`meta`},c,u??!1,b(`div`,{class:`mspacer`}),b(`span`,{class:`hint`,part:`hint`},d));this.#e.replaceChildren(Jt(),f),this.#a=c,this.#o=this.#e.querySelector(`.twrap`),this.#r=this.#e.querySelector(`.msel`),this.#i=this.#e.querySelector(`.tsel`),this.#_(),this.#C(),this.#O(),this.#v()}#_(){let e=this.#s;if(!e)return;let t=this.#d.trim().toLowerCase(),n=this.#m.filter(e=>!t||`${e.name} ${e.provider??``}`.toLowerCase().includes(t)),i=this.model,a=[];for(let e of n){let t=e.name===i,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`},r(`check`,{size:14})));n.addEventListener(`click`,()=>this.#w(e.id)),a.push(n)}e.replaceChildren(...a.length?a:[b(`div`,{class:`mempty`},`No models match.`)])}#v(){this.#r&&(this.#t=e=>{if(e.stopPropagation(),this.#h){this.dispatchEvent(new CustomEvent(`add-ai`,{bubbles:!0,composed:!0}));return}this.#b()},this.#r.addEventListener(`click`,this.#t)),this.#i&&(this.#n=()=>this.#T(),this.#i.addEventListener(`click`,this.#n))}#y(){this.#r&&this.#t&&this.#r.removeEventListener(`click`,this.#t),this.#i&&this.#n&&this.#i.removeEventListener(`click`,this.#n),this.#t=null,this.#n=null,this.#r=null,this.#i=null,this.#a=null,this.#o=null,this.#s=null}get menuOpen(){return this.#l}openMenu(){this.#h||this.#x()}#b(){this.#l?this.#S():this.#x()}#x(){if(this.#l)return;this.#D(),this.#l=!0,this.#d=``,this.#_(),this.#C();let e=this.#e.querySelector(`.msearch`);e&&(e.value=``,requestAnimationFrame(()=>e.focus())),document.addEventListener(`mousedown`,this.#f),document.addEventListener(`keydown`,this.#p,!0)}#S(){this.#l&&(this.#l=!1,this.#C(),this.#u||(document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)))}#C(){this.#a?.classList.toggle(`open`,this.#l),this.#r?.setAttribute(`aria-expanded`,this.#l?`true`:`false`)}#w(e){let t=this.#m.find(t=>t.id===e)??{name:e,id:e,provider:void 0};this.#S(),t.name!==this.model&&(this.model=t.name),this.dispatchEvent(new CustomEvent(`model-change`,{detail:{model:t.name,provider:t.provider,id:t.id},bubbles:!0,composed:!0}))}#T(){this.#u?this.#D():this.#E()}#E(){this.#u||(this.#S(),this.#u=!0,this.#O(),document.addEventListener(`mousedown`,this.#f),document.addEventListener(`keydown`,this.#p,!0))}#D(){this.#u&&(this.#u=!1,this.#O(),this.#l||(document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)))}#O(){this.#o?.classList.toggle(`open`,this.#u),this.#i?.setAttribute(`aria-expanded`,this.#u?`true`:`false`)}#k(e){this.#D(),this.thinking=e,this.dispatchEvent(new CustomEvent(`thinking-change`,{detail:{thinking:e,label: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
1538
|
:host { display: inline-flex; }
|
|
1538
1539
|
:host([hidden]) { display: none; }
|
|
1539
1540
|
|
|
@@ -3927,7 +3928,7 @@ slicc-press-button {
|
|
|
3927
3928
|
background: var(--bg);
|
|
3928
3929
|
}
|
|
3929
3930
|
}
|
|
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`&&
|
|
3931
|
+
`,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`&&De(`ws`,t)};#i=()=>{this.urlState&&De(`ws`,null)};#a=()=>{if(!this.urlState)return;let e=D(`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=D(`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(`
|
|
3931
3932
|
:host{display:inline-block;}
|
|
3932
3933
|
.switcher-more{position:relative;}
|
|
3933
3934
|
.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;}
|
|
@@ -4627,8 +4628,8 @@ slicc-workbench-pane slicc-pane .slicc-pane__body {
|
|
|
4627
4628
|
flex-direction: column;
|
|
4628
4629
|
min-height: 0;
|
|
4629
4630
|
}
|
|
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]&<(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&&
|
|
4631
|
+
`,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,we=!1,Te=!1,Ee=!1,D=!1,De=!1,Oe=!1,ke=!0,Ae=!1,je=!0,Me=!1,Ne={},O=null,Pe=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`]),Fe=null,Ie=V({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Le=null,Re=V({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),ze=`http://www.w3.org/1998/Math/MathML`,Be=`http://www.w3.org/2000/svg`,k=`http://www.w3.org/1999/xhtml`,Ve=k,A=!1,He=null,Ue=V({},[ze,Be,k],zo),We=V({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Ge=V({},[`annotation-xml`]),Ke=V({},[`title`,`style`,`font`,`a`,`script`]),qe=null,Je=[`application/xhtml+xml`,`text/html`],j=null,Ye=null,Xe=n.createElement(`form`),Ze=function(e){return e instanceof RegExp||e instanceof Function},Qe=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ye&&Ye===e)){if((!e||typeof e!=`object`)&&(e={}),e=H(e),qe=Je.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,j=qe===`application/xhtml+xml`?zo:Ro,C=R(e,`ALLOWED_TAGS`)?V({},e.ALLOWED_TAGS,j):me,w=R(e,`ALLOWED_ATTR`)?V({},e.ALLOWED_ATTR,j):he,He=R(e,`ALLOWED_NAMESPACES`)?V({},e.ALLOWED_NAMESPACES,zo):Ue,Le=R(e,`ADD_URI_SAFE_ATTR`)?V(H(Re),e.ADD_URI_SAFE_ATTR,j):Re,Fe=R(e,`ADD_DATA_URI_TAGS`)?V(H(Ie),e.ADD_DATA_URI_TAGS,j):Ie,O=R(e,`FORBID_CONTENTS`)?V({},e.FORBID_CONTENTS,j):Pe,ge=R(e,`FORBID_TAGS`)?V({},e.FORBID_TAGS,j):H({}),_e=R(e,`FORBID_ATTR`)?V({},e.FORBID_ATTR,j):H({}),Ne=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,we=e.WHOLE_DOCUMENT||!1,D=e.RETURN_DOM||!1,De=e.RETURN_DOM_FRAGMENT||!1,Oe=e.RETURN_TRUSTED_TYPE||!1,Ee=e.FORCE_BODY||!1,ke=e.SANITIZE_DOM!==!1,Ae=e.SANITIZE_NAMED_PROPS||!1,je=e.KEEP_CONTENT!==!1,Me=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||us,Ve=e.NAMESPACE||k,We=e.MATHML_TEXT_INTEGRATION_POINTS||We,Ge=e.HTML_INTEGRATION_POINTS||Ge,T=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ze(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(T.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ze(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),De&&(D=!0),Ne&&(C=V({},es),w=Ao(null),Ne.html===!0&&(V(C,Jo),V(w,ts)),Ne.svg===!0&&(V(C,Yo),V(w,ns),V(w,is)),Ne.svgFilters===!0&&(V(C,Xo),V(w,ns),V(w,is)),Ne.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,j))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?E.attributeCheck=e.ADD_ATTR:(w===he&&(w=H(w)),V(w,e.ADD_ATTR,j))),e.ADD_URI_SAFE_ATTR&&V(Le,e.ADD_URI_SAFE_ATTR,j),e.FORBID_CONTENTS&&(O===Pe&&(O=H(O)),V(O,e.FORBID_CONTENTS,j)),e.ADD_FORBID_CONTENTS&&(O===Pe&&(O=H(O)),V(O,e.ADD_FORBID_CONTENTS,j)),je&&(C[`#text`]=!0),we&&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),Ye=e}},$e=V({},[...Yo,...Xo,...Zo]),et=V({},[...Qo,...$o]),tt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Ve,tagName:`template`});let n=Ro(e.tagName),r=Ro(t.tagName);return He[e.namespaceURI]?e.namespaceURI===Be?t.namespaceURI===k?n===`svg`:t.namespaceURI===ze?n===`svg`&&(r===`annotation-xml`||We[r]):!!$e[n]:e.namespaceURI===ze?t.namespaceURI===k?n===`math`:t.namespaceURI===Be?n===`math`&&Ge[r]:!!et[n]:e.namespaceURI===k?t.namespaceURI===Be&&!Ge[r]||t.namespaceURI===ze&&!We[r]?!1:!et[n]&&(Ke[n]||!$e[n]):!!(qe===`application/xhtml+xml`&&He[e.namespaceURI]):!1},nt=function(e){Io(t.removed,{element:e});try{_(e).removeChild(e)}catch{g(e)}},M=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(D||De)try{nt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},rt=function(e){let t=null,r=null;if(Ee)e=`<remove></remove>`+e;else{let t=Bo(e,/^[\r\n\t ]+/);r=t&&t[0]}qe===`application/xhtml+xml`&&Ve===k&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=v?v.createHTML(e):e;if(Ve===k)try{t=new f().parseFromString(i,qe)}catch{}if(!t||!t.documentElement){t=b.createDocument(Ve,`template`,null);try{t.documentElement.innerHTML=A?y:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ve===k?re.call(t,we?`html`:`body`)[0]:we?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,Ye)})}let st=function(e){let n=null;if(N(S.beforeSanitizeElements,e,null),at(e))return nt(e),!0;let r=j(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 nt(e),!0;if(!(E.tagCheck instanceof Function&&E.tagCheck(r))&&(!C[r]||ge[r])){if(!ge[r]&<(r)&&(T.tagNameCheck instanceof RegExp&&z(T.tagNameCheck,r)||T.tagNameCheck instanceof Function&&T.tagNameCheck(r)))return!1;if(je&&!O[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 nt(e),!0}return e instanceof c&&!tt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&z(/<\/no(script|embed|frames)/i,e.innerHTML)?(nt(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]||ke&&(t===`id`||t===`name`)&&(r in n||r in Xe))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(!Le[t]&&!z(pe,Vo(r,de,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Ho(r,`data:`)===0&&Fe[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=j(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,Ae&&(c===`id`||c===`name`)&&(M(a,e),u=`user-content-`+u),Ce&&z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){M(a,e);continue}if(c===`attributename`&&Bo(u,`href`)){M(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){M(a,e);continue}if(!xe&&z(/\/>/i,u)){M(a,e);continue}Se&&No([ae,oe,se],e=>{u=Vo(u,e,` `)});let d=j(e.nodeName);if(!ct(d,c,u)){M(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)?nt(e):Fo(t.removed)}catch{M(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(A=!e,A&&(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(Te||Qe(n),t.removed=[],typeof e==`string`&&(Me=!1),Me){if(e.nodeName){let t=j(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(!D&&!Se&&!we&&e.indexOf(`<`)===-1)return v&&Oe?v.createHTML(e):e;if(i=rt(e),!i)return D?null:Oe?y:``}i&&Ee&&nt(i.firstChild);let u=it(Me?e:i);for(;c=u.nextNode();)st(c),ut(c),c.content instanceof a&&dt(c.content);if(Me)return e;if(D){if(De)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=we?i.outerHTML:i.innerHTML;return we&&C[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&z(ps,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
4632
|
+
`+d),Se&&No([ae,oe,se],e=>{d=Vo(d,e,` `)}),v&&Oe?v.createHTML(d):d},t.setConfig=function(){Qe(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Te=!0},t.clearConfig=function(){Ye=null,Te=!1},t.isValidAttribute=function(e,t,n){return Ye||Qe({}),ct(j(e),j(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
4633
|
]`).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={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},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(`
|
|
4633
4634
|
`),n=t.length-1;for(;n>=0&&!t[n].trim();)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
4634
4635
|
`)}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(`
|
|
@@ -4699,7 +4700,7 @@ Example input:
|
|
|
4699
4700
|
2. bash: {"command":"ls /published"}
|
|
4700
4701
|
3. bash: {"command":"diff /drafts /published"}
|
|
4701
4702
|
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-
|
|
4703
|
+
`);t(async()=>{let{quickLabel:e}=await import(`./quick-llm-CycdqfYy.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])).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
4704
|
`),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
|
|
4704
4705
|
|
|
4705
4706
|
This is the contents that read_file returned.`},{id:`fx-tc-bash`,name:`bash`,input:{command:`ls -la /workspace`},result:`total 24
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/legacy-styles-4PP74ISo.js","assets/preload-helper-zJ_50EbN.js","assets/sprinkle-manager-
|
|
2
|
-
import{t as e}from"./preload-helper-zJ_50EbN.js";var t=`sprinkle:`,n=`slicc-sprinkle-icons`;function r(){try{let e=localStorage.getItem(n);if(!e)return{};let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let r={};for(let[e,n]of Object.entries(t))typeof n==`string`&&(r[e]=n);return r}catch{return{}}}function i(e){try{let t=new Set(e),i=Object.fromEntries(Object.entries(r()).filter(([e])=>t.has(e)));localStorage.setItem(n,JSON.stringify(i))}catch{}}function a(e,t){try{localStorage.setItem(n,JSON.stringify({...r(),[e]:t}))}catch{}}function o(e){return typeof e==`string`&&/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)}function s(e){return`${t}${e}`}function c(e){return e?.startsWith(t)?e.slice(9):null}var l=[{id:`files`,label:`files`,kind:`tool`},{id:`term`,label:`terminal`,kind:`tool`},{id:`memory`,label:`memory`,kind:`tool`}],u=class{#e;#t=new Map;#n=new Map;#r=new Map;#i=new Set;constructor(e){this.#e=e}seedDockItems(e){let t=r(),n=!1;for(let r of e)this.#n.has(r)||(this.#i.add(r),this.#n.set(r,{id:s(r),icon:t[r]??`sparkles`,label:r,kind:`sprinkle`}),n=!0);n&&this.#u()}dropUnconfirmedSeeds(){let e=!1;for(let t of this.#i)this.#r.has(t)||(this.#n.delete(t),e=!0);this.#i.clear(),e&&this.#u()}callbacks(){return{addSprinkle:(e,t,n,r,i)=>this.#a(e,t,n,i),removeSprinkle:e=>this.#o(e,{keepDockItem:!1}),minimizeSprinkle:e=>this.#s(e),registerSprinkle:(e,t,n)=>this.#c(e,t,n?.icon),unregisterSprinkle:e=>this.#l(e),closeSprinkleContent:e=>this.#o(e,{keepDockItem:!0})}}updateDockIcon(e,t){let n=this.#n.get(e);!n||n.icon===t||(this.#n.set(e,{...n,icon:t}),this.#u())}defaultIconNames(){return[...this.#n.entries()].filter(([,e])=>e.icon===`sparkles`).map(([e])=>e)}isOpen(e){return this.#r.has(e)}#a(e,t,n,r){let i=s(e),a=this.#r.get(e);a||(a=document.createElement(`slicc-surface`),a.setAttribute(`surface-id`,i),a.setAttribute(`layout`,`flex`),this.#e.workbenchBody.append(a),this.#r.set(e,a)),a.replaceChildren(n),this.#t.set(e,{id:i,label:t,kind:`sprinkle`,closable:!0}),this.#c(e,t,r?.icon),this.#u(),!r?.attention&&!r?.background&&this.#d(i)}#o(e,t){let n=s(e);this.#r.get(e)?.remove(),this.#r.delete(e),this.#t.delete(e),t.keepDockItem||this.#n.delete(e),this.#u(),this.#e.workbenchBody.getAttribute(`active`)===n&&this.#d(`files`)}#s(e){this.#e.workbenchBody.getAttribute(`active`)===s(e)&&(this.#e.shell.removeAttribute(`open`),this.#e.dock.removeAttribute(`active`))}#c(e,t,n){this.#i.delete(e);let i=o(n)?n:r()[e]??`sparkles`;this.#n.set(e,{id:s(e),icon:i,label:t,kind:`sprinkle`}),this.#u()}#l(e){this.#r.has(e)||(this.#n.delete(e),this.#u())}#u(){this.#e.tabBar.tabs=[...l,...this.#t.values()],this.#e.dock.items=[...this.#n.values()],this.#e.workbenchHeader.toggleAttribute(`hidden`,this.#t.size===0)}#d(e){this.#e.shell.setAttribute(`open`,``),this.#e.workbenchBody.setAttribute(`active`,e),this.#e.dock.setAttribute(`active`,e),this.#e.tabBar.setAttribute(`active`,e)}};async function d(t){let{refs:n,client:r,fs:a,instanceId:o,log:s}=t,l=new u(n),{loadSprinkleStyles:d}=await e(async()=>{let{loadSprinkleStyles:e}=await import(`./legacy-styles-4PP74ISo.js`);return{loadSprinkleStyles:e}},__vite__mapDeps([0,1]));await d();let{SprinkleManager:m,readKnownSprinkleNames:h}=await e(async()=>{let{SprinkleManager:e,readKnownSprinkleNames:t}=await import(`./sprinkle-manager-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/legacy-styles-4PP74ISo.js","assets/preload-helper-zJ_50EbN.js","assets/sprinkle-manager-DFmzxkMb.js","assets/main-Adg2tAFx.js","assets/chunk-aKtaBQYM.js","assets/modulepreload-polyfill-Dezn_h7o.js","assets/account-store-Dxwe8EsY.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-x0cJ68Fe.js","assets/proxied-fetch-B5vr_AP8.js","assets/fetch-body-D2PwksUW.js","assets/secret-topology-Bp0wH2ni.js","assets/secrets-bridge-client-DXw32cXb.js","assets/panel-rpc-DqT2FG7c.js","assets/bedrock-camp-9-QEmC9Z.js","assets/transform-messages-DzB_lMo-.js","assets/tool-ui-DfXu6quJ.js","assets/clipboard-DgFtRQbq.js","assets/sprinkle-bridge-Du2dCM8G.js","assets/hid-device-registry-D2LsJCRr.js","assets/usb-operations-CkcrNzZw.js","assets/serial-port-registry-Bc4wlwED.js","assets/usb-device-registry-BP58Vi0S.js","assets/shared-Bn9ltvMZ.js","assets/mime-types-ugOWOUZ9.js","assets/path-utils-DU6QhF_k.js","assets/sprinkle-renderer-GiRRbdBx.js","assets/theme-BBwuyzvz.js","assets/setup-sprinkle-exec-C7SBZY7y.js","assets/dip-BFmzIJYT.js","assets/wc-live-D6xN2jey.js","assets/wc-shell-DE5Fham9.js","assets/icons-BU6llBsN.js","assets/soundscape-cues-5_sT5Un6.js","assets/speech-CqQdPtyQ.js","assets/wc-shell-WkeczD9x.css","assets/tray-leader-vew7MfYo.js","assets/wc-permissions-registry-CR1rTd2H.js","assets/quick-llm-CycdqfYy.js","assets/llm-session-id-DVmZ9C2t.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./preload-helper-zJ_50EbN.js";var t=`sprinkle:`,n=`slicc-sprinkle-icons`;function r(){try{let e=localStorage.getItem(n);if(!e)return{};let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let r={};for(let[e,n]of Object.entries(t))typeof n==`string`&&(r[e]=n);return r}catch{return{}}}function i(e){try{let t=new Set(e),i=Object.fromEntries(Object.entries(r()).filter(([e])=>t.has(e)));localStorage.setItem(n,JSON.stringify(i))}catch{}}function a(e,t){try{localStorage.setItem(n,JSON.stringify({...r(),[e]:t}))}catch{}}function o(e){return typeof e==`string`&&/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)}function s(e){return`${t}${e}`}function c(e){return e?.startsWith(t)?e.slice(9):null}var l=[{id:`files`,label:`files`,kind:`tool`},{id:`term`,label:`terminal`,kind:`tool`},{id:`memory`,label:`memory`,kind:`tool`}],u=class{#e;#t=new Map;#n=new Map;#r=new Map;#i=new Set;constructor(e){this.#e=e}seedDockItems(e){let t=r(),n=!1;for(let r of e)this.#n.has(r)||(this.#i.add(r),this.#n.set(r,{id:s(r),icon:t[r]??`sparkles`,label:r,kind:`sprinkle`}),n=!0);n&&this.#u()}dropUnconfirmedSeeds(){let e=!1;for(let t of this.#i)this.#r.has(t)||(this.#n.delete(t),e=!0);this.#i.clear(),e&&this.#u()}callbacks(){return{addSprinkle:(e,t,n,r,i)=>this.#a(e,t,n,i),removeSprinkle:e=>this.#o(e,{keepDockItem:!1}),minimizeSprinkle:e=>this.#s(e),registerSprinkle:(e,t,n)=>this.#c(e,t,n?.icon),unregisterSprinkle:e=>this.#l(e),closeSprinkleContent:e=>this.#o(e,{keepDockItem:!0})}}updateDockIcon(e,t){let n=this.#n.get(e);!n||n.icon===t||(this.#n.set(e,{...n,icon:t}),this.#u())}defaultIconNames(){return[...this.#n.entries()].filter(([,e])=>e.icon===`sparkles`).map(([e])=>e)}isOpen(e){return this.#r.has(e)}#a(e,t,n,r){let i=s(e),a=this.#r.get(e);a||(a=document.createElement(`slicc-surface`),a.setAttribute(`surface-id`,i),a.setAttribute(`layout`,`flex`),this.#e.workbenchBody.append(a),this.#r.set(e,a)),a.replaceChildren(n),this.#t.set(e,{id:i,label:t,kind:`sprinkle`,closable:!0}),this.#c(e,t,r?.icon),this.#u(),!r?.attention&&!r?.background&&this.#d(i)}#o(e,t){let n=s(e);this.#r.get(e)?.remove(),this.#r.delete(e),this.#t.delete(e),t.keepDockItem||this.#n.delete(e),this.#u(),this.#e.workbenchBody.getAttribute(`active`)===n&&this.#d(`files`)}#s(e){this.#e.workbenchBody.getAttribute(`active`)===s(e)&&(this.#e.shell.removeAttribute(`open`),this.#e.dock.removeAttribute(`active`))}#c(e,t,n){this.#i.delete(e);let i=o(n)?n:r()[e]??`sparkles`;this.#n.set(e,{id:s(e),icon:i,label:t,kind:`sprinkle`}),this.#u()}#l(e){this.#r.has(e)||(this.#n.delete(e),this.#u())}#u(){this.#e.tabBar.tabs=[...l,...this.#t.values()],this.#e.dock.items=[...this.#n.values()],this.#e.workbenchHeader.toggleAttribute(`hidden`,this.#t.size===0)}#d(e){this.#e.shell.setAttribute(`open`,``),this.#e.workbenchBody.setAttribute(`active`,e),this.#e.dock.setAttribute(`active`,e),this.#e.tabBar.setAttribute(`active`,e)}};async function d(t){let{refs:n,client:r,fs:a,instanceId:o,log:s}=t,l=new u(n),{loadSprinkleStyles:d}=await e(async()=>{let{loadSprinkleStyles:e}=await import(`./legacy-styles-4PP74ISo.js`);return{loadSprinkleStyles:e}},__vite__mapDeps([0,1]));await d();let{SprinkleManager:m,readKnownSprinkleNames:h}=await e(async()=>{let{SprinkleManager:e,readKnownSprinkleNames:t}=await import(`./sprinkle-manager-DFmzxkMb.js`);return{SprinkleManager:e,readKnownSprinkleNames:t}},__vite__mapDeps([2,3,4,5,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]));l.seedDockItems(h());let{installSprinkleManagerHandlerOverChannel:g}=await e(async()=>{let{installSprinkleManagerHandlerOverChannel:e}=await import(`./sprinkle-bridge-channel-gxatjtur.js`);return{installSprinkleManagerHandlerOverChannel:e}},[]),{createSprinkleExecHandler:_}=await e(async()=>{let{createSprinkleExecHandler:e}=await import(`./setup-sprinkle-exec-C7SBZY7y.js`);return{createSprinkleExecHandler:e}},__vite__mapDeps([33,1])),{setDipExecHandler:v}=await e(async()=>{let{setDipExecHandler:e}=await import(`./dip-BFmzIJYT.js`);return{setDipExecHandler:e}},__vite__mapDeps([34,35,1,6,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,36,37,3,5,22,38,39,40,24,25,26,27,41,23,28,29,30,31,32,42])),y=typeof chrome<`u`&&!!chrome?.runtime?.id,b=_(r),x=new m(a,e=>{e.type===`sprinkle`&&e.sprinkleName&&r.sendSprinkleLick(e.sprinkleName,e.body,e.targetScoop)},l.callbacks(),()=>{let e=r.getScoops().find(e=>e.isCone);e&&r.stopScoop(e.jid)},{...y?{autoOpenBehavior:`attention`}:{},inlineSprinkles:new Set([`welcome`]),execHandler:b,onAttachImage:()=>{s.warn(`WC shell: image attachments from sprinkles are not wired yet`)}});if(window.__slicc_sprinkleManager=x,v(b),o!==void 0){let e=g(x,{instanceId:o});window.addEventListener(`beforeunload`,()=>e(),{once:!0})}else if(y){let{handleSprinkleOp:t}=await e(async()=>{let{handleSprinkleOp:e}=await import(`./sprinkle-op-handler-Dta4p7Tc.js`);return{handleSprinkleOp:e}},[]);r.setSprinkleOpHandler(e=>{let{id:n,op:r,name:i,data:a}=e;t(x,n,r,i,a)})}p(n.tabBar,e=>x.close(e)),n.dock.addEventListener(`slicc-dock-select`,e=>{let t=c(e.detail?.id);t&&x.activate(t).catch(e=>s.error(`WC sprinkle activate failed`,e))});let S=!1,C=async()=>{if(await x.refresh(),x.available().length>0){l.dropUnconfirmedSeeds();let t=x.available().map(e=>e.name),{pruneKnownSprinkleNames:n}=await e(async()=>{let{pruneKnownSprinkleNames:e}=await import(`./sprinkle-manager-DFmzxkMb.js`);return{pruneKnownSprinkleNames:e}},__vite__mapDeps([2,3,4,5,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]));n(t),i(t)}await x.restoreOpenSprinkles().catch(e=>{s.warn(`WC shell: failed to restore open sprinkles`,e)}),S||(S=!0,e(async()=>{let{pickLucideIcon:e}=await import(`./quick-llm-CycdqfYy.js`).then(e=>e.n);return{pickLucideIcon:e}},__vite__mapDeps([43,4,6,1,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,37,44])).then(({pickLucideIcon:e})=>f(l,x.available(),t=>e({subject:t}))).catch(()=>void 0).finally(()=>{S=!1}))};return C().catch(e=>s.warn(`WC shell: initial sprinkle resync failed`,e)),{manager:x,zone:l,resync:C}}async function f(e,t,n){let i=new Set(e.defaultIconNames()),s=r();for(let r of t){if(!i.has(r.name)||o(r.icon))continue;let t=s[r.name];if(t){e.updateDockIcon(r.name,t);continue}let c=await n(`"${r.title}" — a SLICC sprinkle panel (${r.name})`);c&&(a(r.name,c),e.updateDockIcon(r.name,c))}}function p(e,t){e.addEventListener(`tab-close`,e=>{let n=c(e.detail?.id);n&&t(n)})}export{u as WcSprinkleZone,d as wireWcSprinkles};
|