@runtypelabs/persona 4.33.0 → 4.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/activity-ui.d.cts +3 -15
  2. package/dist/activity-ui.d.ts +3 -15
  3. package/dist/animations/glyph-cycle.d.cts +1 -3
  4. package/dist/animations/glyph-cycle.d.ts +1 -3
  5. package/dist/animations/wipe.d.cts +1 -3
  6. package/dist/animations/wipe.d.ts +1 -3
  7. package/dist/approval-ui.cjs +2 -2
  8. package/dist/approval-ui.d.cts +3 -15
  9. package/dist/approval-ui.d.ts +3 -15
  10. package/dist/approval-ui.js +1 -1
  11. package/dist/artifacts-ui.cjs +1 -1
  12. package/dist/artifacts-ui.d.cts +3 -21
  13. package/dist/artifacts-ui.d.ts +3 -21
  14. package/dist/background-runtime.d.cts +2 -3
  15. package/dist/background-runtime.d.ts +2 -3
  16. package/dist/{chunk-gu34lr-P.js → chunk-Brdx4NCz.js} +1 -1
  17. package/dist/{chunk-dLJWKfOb.js → chunk-C-rux8Q9.js} +1 -1
  18. package/dist/{chunk-Ds_twaZn.js → chunk-C4v-HNhS.js} +1 -1
  19. package/dist/{chunk-Bkma5hIU.js → chunk-CE4seJxF.js} +1 -1
  20. package/dist/{chunk-D6U0E82p.js → chunk-CV8EPIhT.js} +1 -1
  21. package/dist/{chunk-ql5N2I_t.js → chunk-CWzHNuVK.js} +1 -1
  22. package/dist/{chunk-DbGLjU2P.js → chunk-CYpt7PsO.js} +1 -1
  23. package/dist/{chunk-DOZmcve8.js → chunk-Csr59G5V.js} +1 -1
  24. package/dist/{chunk-DW7Vg_l2.js → chunk-CxNPSY-b.js} +1 -1
  25. package/dist/chunk-Dqa_GOcj.js +1 -0
  26. package/dist/chunk-DsWv3EGF.js +1 -0
  27. package/dist/{chunk-C7-m0EmI.js → chunk-NUNdcnAZ.js} +1 -1
  28. package/dist/{chunk-CXQJG7pb.js → chunk-YMkMvAsa.js} +2 -2
  29. package/dist/{chunk-C-EHtpbB.js → chunk-h5aOI_Pa.js} +1 -1
  30. package/dist/chunk-kizhspe5.js +1 -0
  31. package/dist/client-dispatch.js +1 -1
  32. package/dist/client-history.js +1 -1
  33. package/dist/client-stream.js +1 -1
  34. package/dist/{code-generators-DqauYyfX.d.cts → code-generators-DPAqTcAz.d.cts} +0 -2
  35. package/dist/{code-generators-DqauYyfX.d.ts → code-generators-DPAqTcAz.d.ts} +0 -2
  36. package/dist/codegen.cjs +1 -1
  37. package/dist/codegen.d.cts +1 -1
  38. package/dist/codegen.d.ts +1 -1
  39. package/dist/codegen.js +1 -1
  40. package/dist/composer-actions-runtime.cjs +1 -1
  41. package/dist/composer-actions-runtime.d.cts +4 -20
  42. package/dist/composer-actions-runtime.d.ts +4 -20
  43. package/dist/composer-actions-runtime.js +1 -1
  44. package/dist/{composer-input-DnqGCXZz.d.ts → composer-input-i_FiUp6J.d.cts} +1 -7
  45. package/dist/{composer-input-DnqGCXZz.d.cts → composer-input-i_FiUp6J.d.ts} +1 -7
  46. package/dist/{composer-store-6Iwy6WLI.d.ts → composer-store-DhGNgG7Z.d.cts} +1 -3
  47. package/dist/{composer-store-6Iwy6WLI.d.cts → composer-store-DhGNgG7Z.d.ts} +1 -3
  48. package/dist/config-diagnostics.d.cts +0 -2
  49. package/dist/config-diagnostics.d.ts +0 -2
  50. package/dist/{context-mention-manager-B-rHF98n.d.ts → context-mention-manager-DL-xwGfL.d.cts} +2 -6
  51. package/dist/{context-mention-manager-B-rHF98n.d.cts → context-mention-manager-DL-xwGfL.d.ts} +2 -6
  52. package/dist/context-mentions-inline.cjs +1 -1
  53. package/dist/context-mentions-inline.d.cts +2 -4
  54. package/dist/context-mentions-inline.d.ts +2 -4
  55. package/dist/context-mentions-inline.js +1 -1
  56. package/dist/context-mentions.cjs +1 -1
  57. package/dist/context-mentions.d.cts +3 -9
  58. package/dist/context-mentions.d.ts +3 -9
  59. package/dist/{defaults-BuOjqUAG.d.ts → defaults-Bga2Xrsp.d.cts} +1 -5
  60. package/dist/{defaults-BuOjqUAG.d.cts → defaults-Bga2Xrsp.d.ts} +1 -5
  61. package/dist/dictation-runtime.cjs +1 -1
  62. package/dist/dictation-runtime.d.cts +4 -13
  63. package/dist/dictation-runtime.d.ts +4 -13
  64. package/dist/dictation-runtime.js +1 -1
  65. package/dist/{dom-context-DHTabIn7.d.cts → dom-context-Bw-_9Evh.d.cts} +0 -2
  66. package/dist/{dom-context-DHTabIn7.d.ts → dom-context-Bw-_9Evh.d.ts} +0 -2
  67. package/dist/event-stream-view.cjs +1 -1
  68. package/dist/event-stream-view.d.cts +3 -16
  69. package/dist/event-stream-view.d.ts +3 -16
  70. package/dist/{fallback-speech-engine-SqEfkGda.d.ts → fallback-speech-engine-kLdyPcmk.d.cts} +1 -3
  71. package/dist/{fallback-speech-engine-SqEfkGda.d.cts → fallback-speech-engine-kLdyPcmk.d.ts} +1 -3
  72. package/dist/{feature-preferences-DqAmje-2.d.ts → feature-preferences-CmwZGKrf.d.cts} +1 -5
  73. package/dist/{feature-preferences-DqAmje-2.d.cts → feature-preferences-CmwZGKrf.d.ts} +1 -5
  74. package/dist/forms-ui.d.cts +2 -4
  75. package/dist/forms-ui.d.ts +2 -4
  76. package/dist/{history-confirm-dialog-B3L7QNcO.d.cts → history-confirm-dialog-i46-lPN_.d.cts} +2 -14
  77. package/dist/{history-confirm-dialog-B3L7QNcO.d.ts → history-confirm-dialog-i46-lPN_.d.ts} +2 -14
  78. package/dist/history-shell.cjs +1 -1
  79. package/dist/history-shell.d.cts +8 -27
  80. package/dist/history-shell.d.ts +8 -27
  81. package/dist/history-shell.js +1 -1
  82. package/dist/history-view.d.cts +1 -1
  83. package/dist/history-view.d.ts +1 -1
  84. package/dist/icons-extra.cjs +1 -1
  85. package/dist/icons-extra.d.cts +0 -2
  86. package/dist/icons-extra.d.ts +0 -2
  87. package/dist/index.cjs +45 -45
  88. package/dist/index.cjs.map +1 -1
  89. package/dist/index.d.cts +10 -10
  90. package/dist/index.d.ts +10 -10
  91. package/dist/index.global.js +1 -1
  92. package/dist/index.global.js.map +1 -1
  93. package/dist/index.js +49 -49
  94. package/dist/index.js.map +1 -1
  95. package/dist/install.global.js +1 -1
  96. package/dist/install.global.js.map +1 -1
  97. package/dist/launcher.global.js +2 -2
  98. package/dist/launcher.global.js.map +1 -1
  99. package/dist/{loading-label-runtime-loader-JecjOfJS.d.ts → loading-label-runtime-loader-Ccr3ETd3.d.cts} +1 -3
  100. package/dist/{loading-label-runtime-loader-JecjOfJS.d.cts → loading-label-runtime-loader-Ccr3ETd3.d.ts} +1 -3
  101. package/dist/loading-label-runtime.cjs +1 -1
  102. package/dist/loading-label-runtime.d.cts +1 -1
  103. package/dist/loading-label-runtime.d.ts +1 -1
  104. package/dist/loading-label-runtime.js +1 -1
  105. package/dist/markdown-parsers.js +1 -1
  106. package/dist/{message-bubble-CBYtpDsT.d.ts → message-bubble-C6AVaH7f.d.cts} +20 -3
  107. package/dist/{message-bubble-CBYtpDsT.d.cts → message-bubble-C6AVaH7f.d.ts} +20 -3
  108. package/dist/{plugin-kit-C1mRjLgW.d.cts → plugin-kit-BVggqE3C.d.cts} +0 -2
  109. package/dist/{plugin-kit-C1mRjLgW.d.ts → plugin-kit-BVggqE3C.d.ts} +0 -2
  110. package/dist/plugin-kit.d.cts +1 -1
  111. package/dist/plugin-kit.d.ts +1 -1
  112. package/dist/preferences-runtime.cjs +1 -1
  113. package/dist/preferences-runtime.d.cts +1 -1
  114. package/dist/preferences-runtime.d.ts +1 -1
  115. package/dist/preferences-runtime.js +1 -1
  116. package/dist/{preview-_UJwwt2L.d.cts → preview-BMdRffo4.d.cts} +2 -6
  117. package/dist/{preview-_UJwwt2L.d.ts → preview-BMdRffo4.d.ts} +2 -6
  118. package/dist/{registry-B5ZV3K-h.d.ts → registry-B16l8s1b.d.cts} +1 -8
  119. package/dist/{registry-B5ZV3K-h.d.cts → registry-B16l8s1b.d.ts} +1 -8
  120. package/dist/{session-Bys8_XuB.d.cts → session-CtZHe7fc.d.cts} +8 -92
  121. package/dist/{session-Bys8_XuB.d.ts → session-CtZHe7fc.d.ts} +8 -92
  122. package/dist/session-reconnect.d.cts +2 -4
  123. package/dist/session-reconnect.d.ts +2 -4
  124. package/dist/smart-dom-reader.d.cts +2 -8
  125. package/dist/smart-dom-reader.d.ts +2 -8
  126. package/dist/testing.d.cts +0 -2
  127. package/dist/testing.d.ts +0 -2
  128. package/dist/theme-editor-preview.cjs +42 -42
  129. package/dist/theme-editor-preview.d.cts +1 -1
  130. package/dist/theme-editor-preview.d.ts +1 -1
  131. package/dist/theme-editor-preview.js +25 -25
  132. package/dist/theme-editor.cjs +25 -5
  133. package/dist/theme-editor.d.cts +2 -22
  134. package/dist/theme-editor.d.ts +2 -22
  135. package/dist/theme-editor.js +1 -1
  136. package/dist/theme-reference.cjs +1 -1
  137. package/dist/theme-reference.d.cts +2 -4
  138. package/dist/theme-reference.d.ts +2 -4
  139. package/dist/theme-reference.js +1 -1
  140. package/dist/{tool-loading-animation-d5qAQcwv.d.ts → tool-loading-animation-D2cyFvmM.d.cts} +1 -7
  141. package/dist/{tool-loading-animation-d5qAQcwv.d.cts → tool-loading-animation-D2cyFvmM.d.ts} +1 -7
  142. package/dist/{tooltip-BkW-8MnD.d.cts → tooltip-DbXkAuJL.d.cts} +0 -2
  143. package/dist/{tooltip-BkW-8MnD.d.ts → tooltip-DbXkAuJL.d.ts} +0 -2
  144. package/dist/{turn-activity-ui-q6fHVnx-.d.cts → turn-activity-ui-Do1Nd-Ow.d.cts} +2 -12
  145. package/dist/{turn-activity-ui-q6fHVnx-.d.ts → turn-activity-ui-Do1Nd-Ow.d.ts} +2 -12
  146. package/dist/turn-activity-ui.d.cts +1 -1
  147. package/dist/turn-activity-ui.d.ts +1 -1
  148. package/dist/{types-B_mj21jg.d.cts → types-BC7MRxO5.d.cts} +76 -29
  149. package/dist/{types-B_mj21jg.d.ts → types-BC7MRxO5.d.ts} +76 -29
  150. package/dist/ui-extras.js +3 -3
  151. package/dist/voice-client-tools.d.cts +1 -3
  152. package/dist/voice-client-tools.d.ts +1 -3
  153. package/dist/voice-runtime.cjs +1 -1
  154. package/dist/voice-runtime.d.cts +2 -12
  155. package/dist/voice-runtime.d.ts +2 -12
  156. package/dist/voice-runtime.js +2 -2
  157. package/dist/voice-worklet-player.d.cts +2 -6
  158. package/dist/voice-worklet-player.d.ts +2 -6
  159. package/dist/{webmcp-runtime-entry-ClEO3qdI.d.ts → webmcp-runtime-entry-B8g46vS0.d.cts} +1 -5
  160. package/dist/{webmcp-runtime-entry-ClEO3qdI.d.cts → webmcp-runtime-entry-B8g46vS0.d.ts} +1 -5
  161. package/dist/webmcp-runtime.d.cts +1 -1
  162. package/dist/webmcp-runtime.d.ts +1 -1
  163. package/dist/widget.css +1 -1
  164. package/package.json +4 -4
  165. package/src/components/event-stream-view.test.ts +5 -0
  166. package/src/components/message-bubble.ts +26 -6
  167. package/src/components/scroll-to-bottom.test.ts +135 -0
  168. package/src/components/scroll-to-bottom.ts +50 -13
  169. package/src/components/user-message-collapse.ts +117 -0
  170. package/src/defaults.ts +6 -0
  171. package/src/styles/widget.css +56 -0
  172. package/src/theme-reference.ts +2 -2
  173. package/src/types/theme.ts +29 -0
  174. package/src/types.ts +49 -5
  175. package/src/ui.scroll-additive.test.ts +219 -117
  176. package/src/ui.scroll.test.ts +176 -13
  177. package/src/ui.ts +230 -107
  178. package/src/ui.turn-activity.test.ts +7 -7
  179. package/src/ui.user-message-collapse.test.ts +540 -0
  180. package/src/utils/auto-follow.test.ts +0 -38
  181. package/src/utils/auto-follow.ts +0 -35
  182. package/src/utils/theme.test.ts +23 -0
  183. package/src/utils/tokens.ts +16 -0
  184. package/dist/chunk-CVMIncEY.js +0 -1
  185. package/dist/chunk-DVgzoVCB.js +0 -1
  186. package/dist/chunk-d54BJdKd.js +0 -1
@@ -1,5 +1,4 @@
1
- import { n as createLoadingLabelLifecycle, r as applyLoadingLabel, t as applyLoadingAnimation } from "./tool-loading-animation-d5qAQcwv.js";
2
- //#region src/loading-label-runtime-loader.d.ts
1
+ import { n as createLoadingLabelLifecycle, r as applyLoadingLabel, t as applyLoadingAnimation } from "./tool-loading-animation-D2cyFvmM.cjs";
3
2
  /** Internal contract: resolve/decorate fresh labels, then manage committed hooks.
4
3
  * A future renderer replacement must preserve this lifecycle and readiness boundary.
5
4
  * Artifact builtin rendering is a separate, deliberate export of the same module.
@@ -9,6 +8,5 @@ type LoadingLabelRuntime = {
9
8
  createLoadingLabelLifecycle: typeof createLoadingLabelLifecycle;
10
9
  applyLoadingAnimation: typeof applyLoadingAnimation;
11
10
  };
12
- //#endregion
13
11
  export { LoadingLabelRuntime as t };
14
12
  export {}
@@ -1,5 +1,4 @@
1
- import { n as createLoadingLabelLifecycle, r as applyLoadingLabel, t as applyLoadingAnimation } from "./tool-loading-animation-d5qAQcwv.cjs";
2
- //#region src/loading-label-runtime-loader.d.ts
1
+ import { n as createLoadingLabelLifecycle, r as applyLoadingLabel, t as applyLoadingAnimation } from "./tool-loading-animation-D2cyFvmM.js";
3
2
  /** Internal contract: resolve/decorate fresh labels, then manage committed hooks.
4
3
  * A future renderer replacement must preserve this lifecycle and readiness boundary.
5
4
  * Artifact builtin rendering is a separate, deliberate export of the same module.
@@ -9,6 +8,5 @@ type LoadingLabelRuntime = {
9
8
  createLoadingLabelLifecycle: typeof createLoadingLabelLifecycle;
10
9
  applyLoadingAnimation: typeof applyLoadingAnimation;
11
10
  };
12
- //#endregion
13
11
  export { LoadingLabelRuntime as t };
14
12
  export {}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=(e,t)=>{let n=document.createElement(e);return t&&(n.className=t),n},t=(t,n,r)=>{let i=r;for(let r of n){let n=e(`span`,`persona-tool-char`);n.style.setProperty(`--char-index`,String(i)),n.textContent=r===` `?`\xA0`:r,t.appendChild(n),i++}return i};function n(e,n){let{animation:r,duration:i,color:a,secondaryColor:o}=n;if(r===`none`||(e.setAttribute(`data-preserve-animation`,`true`),e.classList.add(`persona-tool-loading-${r}`),i&&e.style.setProperty(`--persona-tool-anim-duration`,i),a&&e.style.setProperty(`--persona-tool-anim-color`,a),o&&e.style.setProperty(`--persona-tool-anim-secondary-color`,o),r===`pulse`))return;let s=0,c=e=>{for(let n of Array.from(e.childNodes))if(n.nodeType===3){let e=document.createElement(`span`);s=t(e,n.textContent??``,s),n.replaceWith(...Array.from(e.childNodes))}else n instanceof HTMLElement&&!n.hasAttribute(`data-tool-elapsed`)&&c(n)};c(e)}const r=e=>{if(typeof e!=`string`)return;let t=e.trim(),n=/^#([\da-f]{3}|[\da-f]{6})$/i.exec(t)?.[1];if(n){let e=n.length===3?[...n].map(e=>e+e).join(``):n;return[0,2,4].map(t=>parseInt(e.slice(t,t+2),16))}let r=/^rgba?\(\s*([^)]*)\)$/i.exec(t);if(!r)return;let i=r[1].trim().split(/\s*[,/]\s*|\s+/);if(i.length===4&&/^(?:1(?:\.0+)?|100%)$/.test(i[3])&&i.pop(),i.length!==3)return;let a=i.map(e=>/^\d+(?:\.\d+)?%?$/.test(e)?Number.parseFloat(e)*(e.endsWith(`%`)?2.55:1):NaN);if(!a.some(e=>!Number.isFinite(e)||e<0||e>255))return a},i=e=>e.reduce((e,t,n)=>{let r=t/255;return e+(r<=.04045?r/12.92:((r+.055)/1.055)**2.4)*[.2126,.7152,.0722][n]},0),a=e=>{let t=r(e?.neutral);return t?i(t)<.18?`dark`:`light`:void 0},o=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function s(e,t){let n=t.split(`.`);for(let t=0;t<n.length;t++){let r=n[t];if(!o(e)||!Object.prototype.hasOwnProperty.call(e,r))return`absent`;if(e=e[r],e===void 0||t<n.length-1&&!o(e))return`clear`}return`explicit`}const c=Symbol.for(`persona.styleProvenance`),l=(e,t)=>{for(let n of t.split(`.`)){if(typeof e!=`object`||!e)return;e=e[n]}return e},u=(e,t)=>{let n=e?.[c];return!n||!Object.prototype.hasOwnProperty.call(n.values,t)||l(e,t)!==n.values[t]?s(e,t)===`explicit`:n.explicit.includes(t)},d=(e,t)=>u(e,t)?l(e,t):void 0,f=(e,t,n)=>{let r=e,i=n??r?.colorScheme??a(r?.brand)??`light`,o=i===`dark`||i===`auto`&&(typeof document<`u`&&document.documentElement.classList.contains(`dark`)||typeof window<`u`&&window.matchMedia?.(`(prefers-color-scheme: dark)`).matches);return u(e,`theme.components.${t}`)||o&&u(e,`darkTheme.components.${t}`)},p={backgroundColor:`background`,borderColor:`borderColor`,borderWidth:`borderWidth`,borderRadius:`borderRadius`,headerBackgroundColor:`header.background`,headerTextColor:`header.foreground`,contentBackgroundColor:`content.background`,contentTextColor:`content.foreground`,codeBlockBackgroundColor:`codeBlock.background`,codeBlockBorderColor:`codeBlock.borderColor`,codeBlockTextColor:`codeBlock.foreground`,toggleTextColor:`toggleForeground`,labelTextColor:`labelForeground`,loadingAnimationColor:`loading.primary`,loadingAnimationSecondaryColor:`loading.secondary`};function m({getExplicitLegacyStyle:e,hasExplicitThemeStyle:t}){function n(n){let r={...n?.toolCall};for(let[i,a]of Object.entries(p))e(n,`toolCall.${i}`)===void 0&&t(n,`toolBubble.${a}`)&&(r[i]=`var(--persona-components-toolBubble-${a.split(`.`).join(`-`)})`);return r}function r(n,r,i){n.classList.remove(`persona-theme-padding`),n.style.removeProperty(`--persona-theme-padding`);for(let e of[`padding-left`,`padding-right`,`padding-top`,`padding-bottom`])n.style.removeProperty(e);t(r,`toolBubble.${i}.padding`)&&(n.classList.add(`persona-theme-padding`),n.style.setProperty(`--persona-theme-padding`,`var(--persona-components-toolBubble-${i}-padding)`));let a=e(r,`toolCall.${i}PaddingX`),o=e(r,`toolCall.${i}PaddingY`);typeof a==`string`&&a&&(n.style.paddingLeft=a,n.style.paddingRight=a),typeof o==`string`&&o&&(n.style.paddingTop=o,n.style.paddingBottom=o)}function i(e){let n=e?.toolCall?.loadingAnimationDuration;return n===void 0?t(e,`toolBubble.loading.duration`)?`var(--persona-components-toolBubble-loading-duration)`:`2000ms`:`${n}ms`}return{resolveToolStyles:n,applyToolPadding:r,toolLoadingDuration:i}}const{resolveToolStyles:h,applyToolPadding:g,toolLoadingDuration:_}=m({getExplicitLegacyStyle:d,hasExplicitThemeStyle:f});function v(e,t,r){let i=t?.loadingLabel,a=r===`reasoning`,o=a?t?.reasoning:h(t),s=r===`waiting`?void 0:a?t?.features?.reasoningDisplay:t?.features?.toolCallDisplay,c=i?.animation??s?.loadingAnimation??(r===`waiting`||t?.future?.v5Defaults?`shimmer`:`none`);if(c===`none`)return;let l={animation:c,duration:i?.duration===void 0?a?`${o?.loadingAnimationDuration??2e3}ms`:_(t):`${i.duration}ms`,color:i?.color??o?.loadingAnimationColor,secondaryColor:i?.secondaryColor??o?.loadingAnimationSecondaryColor};e.dataset.personaLoadingLabel=r,e.dataset.personaLoadingText=e.textContent??``,e.dataset.personaLoadingAnimation=JSON.stringify([r,e.textContent,l,!!i?.animate,e.className,e.getAttribute(`style`)]),i?.animate?e.setAttribute(`data-preserve-animation`,`true`):n(e,l)}function y(e,t){let n=!1,r=/* @__PURE__ */ new Map,i=e.ownerDocument.defaultView?.matchMedia?.(`(prefers-reduced-motion: reduce)`),a=e=>{try{e()}catch(e){console.warn(`[persona] Loading label animation failed`,e)}},o=e=>{let t=r.get(e);r.delete(e),t?.handle&&a(()=>t.handle?.destroy())},s=e=>`${e.closest(`[data-wrapper-id]`)?.dataset.wrapperId??``}:${e.dataset.personaLoadingLabel}`,c=e=>{if(n)return;let a=i?.matches?void 0:t().loadingLabel?.animate;if(!a&&!r.size)return;let c=new Set(Array.from(e.querySelectorAll(`[data-persona-loading-label]`),s)),l=new Set(Array.from(e.querySelectorAll(`[data-persona-reuse]`),e=>e.dataset.wrapperId));for(let[e,t]of r){let n=l.has(e.closest(`[data-wrapper-id]`)?.dataset.wrapperId);(t.start!==a||!n&&!c.has(s(e)))&&o(e)}},l=()=>{if(n)return;let s=t(),c=i?.matches?void 0:s.loadingLabel?.animate;if(!c&&!r.size)return;let l=new Set(e.querySelectorAll(`[data-persona-loading-label]`));for(let[e,t]of r)(!c||t.start!==c||!l.has(e)||e.dataset.personaLoadingLabel!==t.kind)&&o(e);if(c)for(let e of l){if(n||t().loadingLabel?.animate!==c)break;let i={element:e,config:s,text:e.dataset.personaLoadingText??``,kind:e.dataset.personaLoadingLabel,reducedMotion:!1},o=r.get(e);if(o)a(()=>o.handle?.update?.(i));else{let t={start:c,kind:i.kind,handle:void 0};r.set(e,t),a(()=>{let n=c(i);r.get(e)===t?t.handle=n:n?.destroy()})}}};return i?.addEventListener?.(`change`,l),{prepare:c,sync:l,destroy(){n=!0,i?.removeEventListener?.(`change`,l);for(let e of r.keys())o(e)}}}exports.applyLoadingAnimation=n,exports.applyLoadingLabel=v,exports.createLoadingLabelLifecycle=y;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=(e,t)=>{let n=document.createElement(e);return t&&(n.className=t),n},t=(t,n,r)=>{let i=r;for(let r of n){let n=e(`span`,`persona-tool-char`);n.style.setProperty(`--char-index`,String(i)),n.textContent=r===` `?`\xA0`:r,t.appendChild(n),i++}return i};function n(e,n){let{animation:r,duration:i,color:a,secondaryColor:o}=n;if(r===`none`||(e.setAttribute(`data-preserve-animation`,`true`),e.classList.add(`persona-tool-loading-${r}`),i&&e.style.setProperty(`--persona-tool-anim-duration`,i),a&&e.style.setProperty(`--persona-tool-anim-color`,a),o&&e.style.setProperty(`--persona-tool-anim-secondary-color`,o),r===`pulse`))return;let s=0,c=e=>{for(let n of Array.from(e.childNodes))if(n.nodeType===3){let e=document.createElement(`span`);s=t(e,n.textContent??``,s),n.replaceWith(...Array.from(e.childNodes))}else n instanceof HTMLElement&&!n.hasAttribute(`data-tool-elapsed`)&&c(n)};c(e)}const r=e=>{if(typeof e!=`string`)return;let t=e.trim(),n=/^#([\da-f]{3}|[\da-f]{6})$/i.exec(t)?.[1];if(n){let e=n.length===3?[...n].map(e=>e+e).join(``):n;return[0,2,4].map(t=>parseInt(e.slice(t,t+2),16))}let r=/^rgba?\(\s*([^)]*)\)$/i.exec(t);if(!r)return;let i=r[1].trim().split(/\s*[,/]\s*|\s+/);if(i.length===4&&/^(?:1(?:\.0+)?|100%)$/.test(i[3])&&i.pop(),i.length!==3)return;let a=i.map(e=>/^\d+(?:\.\d+)?%?$/.test(e)?Number.parseFloat(e)*(e.endsWith(`%`)?2.55:1):NaN);if(!a.some(e=>!Number.isFinite(e)||e<0||e>255))return a},i=e=>e.reduce((e,t,n)=>{let r=t/255;return e+(r<=.04045?r/12.92:((r+.055)/1.055)**2.4)*[.2126,.7152,.0722][n]},0),a=e=>{let t=r(e?.neutral);return t?i(t)<.18?`dark`:`light`:void 0},o=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function s(e,t){let n=t.split(`.`);for(let t=0;t<n.length;t++){let r=n[t];if(!o(e)||!Object.prototype.hasOwnProperty.call(e,r))return`absent`;if(e=e[r],e===void 0||t<n.length-1&&!o(e))return`clear`}return`explicit`}const c=Symbol.for(`persona.styleProvenance`),l=(e,t)=>{for(let n of t.split(`.`)){if(typeof e!=`object`||!e)return;e=e[n]}return e},u=(e,t)=>{let n=e?.[c];return!n||!Object.prototype.hasOwnProperty.call(n.values,t)||l(e,t)!==n.values[t]?s(e,t)===`explicit`:n.explicit.includes(t)},d=(e,t)=>u(e,t)?l(e,t):void 0,f=(e,t,n)=>{let r=e,i=n??r?.colorScheme??a(r?.brand)??`light`,o=i===`dark`||i===`auto`&&(typeof document<`u`&&document.documentElement.classList.contains(`dark`)||typeof window<`u`&&window.matchMedia?.(`(prefers-color-scheme: dark)`).matches);return u(e,`theme.components.${t}`)||o&&u(e,`darkTheme.components.${t}`)},p={backgroundColor:`background`,borderColor:`borderColor`,borderWidth:`borderWidth`,borderRadius:`borderRadius`,headerBackgroundColor:`header.background`,headerTextColor:`header.foreground`,contentBackgroundColor:`content.background`,contentTextColor:`content.foreground`,codeBlockBackgroundColor:`codeBlock.background`,codeBlockBorderColor:`codeBlock.borderColor`,codeBlockTextColor:`codeBlock.foreground`,toggleTextColor:`toggleForeground`,labelTextColor:`labelForeground`,loadingAnimationColor:`loading.primary`,loadingAnimationSecondaryColor:`loading.secondary`};function m({getExplicitLegacyStyle:e,hasExplicitThemeStyle:t}){function n(n){let r={...n?.toolCall};for(let[i,a]of Object.entries(p))e(n,`toolCall.${i}`)===void 0&&t(n,`toolBubble.${a}`)&&(r[i]=`var(--persona-components-toolBubble-${a.split(`.`).join(`-`)})`);return r}function r(n,r,i){n.classList.remove(`persona-theme-padding`),n.style.removeProperty(`--persona-theme-padding`);for(let e of[`padding-left`,`padding-right`,`padding-top`,`padding-bottom`])n.style.removeProperty(e);t(r,`toolBubble.${i}.padding`)&&(n.classList.add(`persona-theme-padding`),n.style.setProperty(`--persona-theme-padding`,`var(--persona-components-toolBubble-${i}-padding)`));let a=e(r,`toolCall.${i}PaddingX`),o=e(r,`toolCall.${i}PaddingY`);typeof a==`string`&&a&&(n.style.paddingLeft=a,n.style.paddingRight=a),typeof o==`string`&&o&&(n.style.paddingTop=o,n.style.paddingBottom=o)}function i(e){let n=e?.toolCall?.loadingAnimationDuration;return n===void 0?t(e,`toolBubble.loading.duration`)?`var(--persona-components-toolBubble-loading-duration)`:`2000ms`:`${n}ms`}return{resolveToolStyles:n,applyToolPadding:r,toolLoadingDuration:i}}const{resolveToolStyles:h,applyToolPadding:g,toolLoadingDuration:_}=m({getExplicitLegacyStyle:d,hasExplicitThemeStyle:f});function v(e,t,r){let i=t?.loadingLabel,a=r===`reasoning`,o=a?t?.reasoning:h(t),s=r===`waiting`?void 0:a?t?.features?.reasoningDisplay:t?.features?.toolCallDisplay,c=i?.animation??s?.loadingAnimation??(r===`waiting`||t?.future?.v5Defaults?`shimmer`:`none`);if(c===`none`)return;let l={animation:c,duration:i?.duration===void 0?a?`${o?.loadingAnimationDuration??2e3}ms`:_(t):`${i.duration}ms`,color:i?.color??o?.loadingAnimationColor,secondaryColor:i?.secondaryColor??o?.loadingAnimationSecondaryColor};e.dataset.personaLoadingLabel=r,e.dataset.personaLoadingText=e.textContent??``,e.dataset.personaLoadingAnimation=JSON.stringify([r,e.textContent,l,!!i?.animate,e.className,e.getAttribute(`style`)]),i?.animate?e.setAttribute(`data-preserve-animation`,`true`):n(e,l)}function y(e,t){let n=!1,r=/* @__PURE__ */ new Map,i=e.ownerDocument.defaultView?.matchMedia?.(`(prefers-reduced-motion: reduce)`),a=e=>{try{e()}catch(e){console.warn(`[persona] Loading label animation failed`,e)}},o=e=>{let t=r.get(e);r.delete(e),t?.handle&&a(()=>t.handle?.destroy())},s=e=>`${e.closest(`[data-wrapper-id]`)?.dataset.wrapperId??``}:${e.dataset.personaLoadingLabel}`,c=e=>{if(n)return;let a=i?.matches?void 0:t().loadingLabel?.animate;if(!a&&!r.size)return;let c=new Set(Array.from(e.querySelectorAll(`[data-persona-loading-label]`),s)),l=new Set(Array.from(e.querySelectorAll(`[data-persona-reuse]`),e=>e.dataset.wrapperId));for(let[e,t]of r){let n=l.has(e.closest(`[data-wrapper-id]`)?.dataset.wrapperId);(t.start!==a||!n&&!c.has(s(e)))&&o(e)}},l=()=>{if(n)return;let s=t(),c=i?.matches?void 0:s.loadingLabel?.animate;if(!c&&!r.size)return;let l=new Set(e.querySelectorAll(`[data-persona-loading-label]`));for(let[e,t]of r)c&&t.start===c&&l.has(e)&&e.dataset.personaLoadingLabel===t.kind||o(e);if(c)for(let e of l){if(n||t().loadingLabel?.animate!==c)break;let i={element:e,config:s,text:e.dataset.personaLoadingText??``,kind:e.dataset.personaLoadingLabel,reducedMotion:!1},o=r.get(e);if(o)a(()=>o.handle?.update?.(i));else{let t={start:c,kind:i.kind,handle:void 0};r.set(e,t),a(()=>{let n=c(i);r.get(e)===t?t.handle=n:n?.destroy()})}}};return i?.addEventListener?.(`change`,l),{prepare:c,sync:l,destroy(){n=!0,i?.removeEventListener?.(`change`,l);for(let e of r.keys())o(e)}}}exports.applyLoadingAnimation=n,exports.applyLoadingLabel=v,exports.createLoadingLabelLifecycle=y;
@@ -1,3 +1,3 @@
1
- import { n as createLoadingLabelLifecycle, r as applyLoadingLabel, t as applyLoadingAnimation } from "./tool-loading-animation-d5qAQcwv.cjs";
1
+ import { n as createLoadingLabelLifecycle, r as applyLoadingLabel, t as applyLoadingAnimation } from "./tool-loading-animation-D2cyFvmM.cjs";
2
2
  export { applyLoadingAnimation, applyLoadingLabel, createLoadingLabelLifecycle };
3
3
  export {}
@@ -1,3 +1,3 @@
1
- import { n as createLoadingLabelLifecycle, r as applyLoadingLabel, t as applyLoadingAnimation } from "./tool-loading-animation-d5qAQcwv.js";
1
+ import { n as createLoadingLabelLifecycle, r as applyLoadingLabel, t as applyLoadingAnimation } from "./tool-loading-animation-D2cyFvmM.js";
2
2
  export { applyLoadingAnimation, applyLoadingLabel, createLoadingLabelLifecycle };
3
3
  export {}
@@ -1 +1 @@
1
- const e=(e,t)=>{let n=document.createElement(e);return t&&(n.className=t),n},t=(t,n,r)=>{let i=r;for(let r of n){let n=e(`span`,`persona-tool-char`);n.style.setProperty(`--char-index`,String(i)),n.textContent=r===` `?`\xA0`:r,t.appendChild(n),i++}return i};function n(e,n){let{animation:r,duration:i,color:a,secondaryColor:o}=n;if(r===`none`||(e.setAttribute(`data-preserve-animation`,`true`),e.classList.add(`persona-tool-loading-${r}`),i&&e.style.setProperty(`--persona-tool-anim-duration`,i),a&&e.style.setProperty(`--persona-tool-anim-color`,a),o&&e.style.setProperty(`--persona-tool-anim-secondary-color`,o),r===`pulse`))return;let s=0,c=e=>{for(let n of Array.from(e.childNodes))if(n.nodeType===3){let e=document.createElement(`span`);s=t(e,n.textContent??``,s),n.replaceWith(...Array.from(e.childNodes))}else n instanceof HTMLElement&&!n.hasAttribute(`data-tool-elapsed`)&&c(n)};c(e)}const r=e=>{if(typeof e!=`string`)return;let t=e.trim(),n=/^#([\da-f]{3}|[\da-f]{6})$/i.exec(t)?.[1];if(n){let e=n.length===3?[...n].map(e=>e+e).join(``):n;return[0,2,4].map(t=>parseInt(e.slice(t,t+2),16))}let r=/^rgba?\(\s*([^)]*)\)$/i.exec(t);if(!r)return;let i=r[1].trim().split(/\s*[,/]\s*|\s+/);if(i.length===4&&/^(?:1(?:\.0+)?|100%)$/.test(i[3])&&i.pop(),i.length!==3)return;let a=i.map(e=>/^\d+(?:\.\d+)?%?$/.test(e)?Number.parseFloat(e)*(e.endsWith(`%`)?2.55:1):NaN);if(!a.some(e=>!Number.isFinite(e)||e<0||e>255))return a},i=e=>e.reduce((e,t,n)=>{let r=t/255;return e+(r<=.04045?r/12.92:((r+.055)/1.055)**2.4)*[.2126,.7152,.0722][n]},0),a=e=>{let t=r(e?.neutral);return t?i(t)<.18?`dark`:`light`:void 0},o=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function s(e,t){let n=t.split(`.`);for(let t=0;t<n.length;t++){let r=n[t];if(!o(e)||!Object.prototype.hasOwnProperty.call(e,r))return`absent`;if(e=e[r],e===void 0||t<n.length-1&&!o(e))return`clear`}return`explicit`}const c=Symbol.for(`persona.styleProvenance`),l=(e,t)=>{for(let n of t.split(`.`)){if(typeof e!=`object`||!e)return;e=e[n]}return e},u=(e,t)=>{let n=e?.[c];return!n||!Object.prototype.hasOwnProperty.call(n.values,t)||l(e,t)!==n.values[t]?s(e,t)===`explicit`:n.explicit.includes(t)},d=(e,t)=>u(e,t)?l(e,t):void 0,f=(e,t,n)=>{let r=e,i=n??r?.colorScheme??a(r?.brand)??`light`,o=i===`dark`||i===`auto`&&(typeof document<`u`&&document.documentElement.classList.contains(`dark`)||typeof window<`u`&&window.matchMedia?.(`(prefers-color-scheme: dark)`).matches);return u(e,`theme.components.${t}`)||o&&u(e,`darkTheme.components.${t}`)},p={backgroundColor:`background`,borderColor:`borderColor`,borderWidth:`borderWidth`,borderRadius:`borderRadius`,headerBackgroundColor:`header.background`,headerTextColor:`header.foreground`,contentBackgroundColor:`content.background`,contentTextColor:`content.foreground`,codeBlockBackgroundColor:`codeBlock.background`,codeBlockBorderColor:`codeBlock.borderColor`,codeBlockTextColor:`codeBlock.foreground`,toggleTextColor:`toggleForeground`,labelTextColor:`labelForeground`,loadingAnimationColor:`loading.primary`,loadingAnimationSecondaryColor:`loading.secondary`};function m({getExplicitLegacyStyle:e,hasExplicitThemeStyle:t}){function n(n){let r={...n?.toolCall};for(let[i,a]of Object.entries(p))e(n,`toolCall.${i}`)===void 0&&t(n,`toolBubble.${a}`)&&(r[i]=`var(--persona-components-toolBubble-${a.split(`.`).join(`-`)})`);return r}function r(n,r,i){n.classList.remove(`persona-theme-padding`),n.style.removeProperty(`--persona-theme-padding`);for(let e of[`padding-left`,`padding-right`,`padding-top`,`padding-bottom`])n.style.removeProperty(e);t(r,`toolBubble.${i}.padding`)&&(n.classList.add(`persona-theme-padding`),n.style.setProperty(`--persona-theme-padding`,`var(--persona-components-toolBubble-${i}-padding)`));let a=e(r,`toolCall.${i}PaddingX`),o=e(r,`toolCall.${i}PaddingY`);typeof a==`string`&&a&&(n.style.paddingLeft=a,n.style.paddingRight=a),typeof o==`string`&&o&&(n.style.paddingTop=o,n.style.paddingBottom=o)}function i(e){let n=e?.toolCall?.loadingAnimationDuration;return n===void 0?t(e,`toolBubble.loading.duration`)?`var(--persona-components-toolBubble-loading-duration)`:`2000ms`:`${n}ms`}return{resolveToolStyles:n,applyToolPadding:r,toolLoadingDuration:i}}const{resolveToolStyles:h,applyToolPadding:g,toolLoadingDuration:_}=m({getExplicitLegacyStyle:d,hasExplicitThemeStyle:f});function v(e,t,r){let i=t?.loadingLabel,a=r===`reasoning`,o=a?t?.reasoning:h(t),s=r===`waiting`?void 0:a?t?.features?.reasoningDisplay:t?.features?.toolCallDisplay,c=i?.animation??s?.loadingAnimation??(r===`waiting`||t?.future?.v5Defaults?`shimmer`:`none`);if(c===`none`)return;let l={animation:c,duration:i?.duration===void 0?a?`${o?.loadingAnimationDuration??2e3}ms`:_(t):`${i.duration}ms`,color:i?.color??o?.loadingAnimationColor,secondaryColor:i?.secondaryColor??o?.loadingAnimationSecondaryColor};e.dataset.personaLoadingLabel=r,e.dataset.personaLoadingText=e.textContent??``,e.dataset.personaLoadingAnimation=JSON.stringify([r,e.textContent,l,!!i?.animate,e.className,e.getAttribute(`style`)]),i?.animate?e.setAttribute(`data-preserve-animation`,`true`):n(e,l)}function y(e,t){let n=!1,r=/* @__PURE__ */ new Map,i=e.ownerDocument.defaultView?.matchMedia?.(`(prefers-reduced-motion: reduce)`),a=e=>{try{e()}catch(e){console.warn(`[persona] Loading label animation failed`,e)}},o=e=>{let t=r.get(e);r.delete(e),t?.handle&&a(()=>t.handle?.destroy())},s=e=>`${e.closest(`[data-wrapper-id]`)?.dataset.wrapperId??``}:${e.dataset.personaLoadingLabel}`,c=e=>{if(n)return;let a=i?.matches?void 0:t().loadingLabel?.animate;if(!a&&!r.size)return;let c=new Set(Array.from(e.querySelectorAll(`[data-persona-loading-label]`),s)),l=new Set(Array.from(e.querySelectorAll(`[data-persona-reuse]`),e=>e.dataset.wrapperId));for(let[e,t]of r){let n=l.has(e.closest(`[data-wrapper-id]`)?.dataset.wrapperId);(t.start!==a||!n&&!c.has(s(e)))&&o(e)}},l=()=>{if(n)return;let s=t(),c=i?.matches?void 0:s.loadingLabel?.animate;if(!c&&!r.size)return;let l=new Set(e.querySelectorAll(`[data-persona-loading-label]`));for(let[e,t]of r)(!c||t.start!==c||!l.has(e)||e.dataset.personaLoadingLabel!==t.kind)&&o(e);if(c)for(let e of l){if(n||t().loadingLabel?.animate!==c)break;let i={element:e,config:s,text:e.dataset.personaLoadingText??``,kind:e.dataset.personaLoadingLabel,reducedMotion:!1},o=r.get(e);if(o)a(()=>o.handle?.update?.(i));else{let t={start:c,kind:i.kind,handle:void 0};r.set(e,t),a(()=>{let n=c(i);r.get(e)===t?t.handle=n:n?.destroy()})}}};return i?.addEventListener?.(`change`,l),{prepare:c,sync:l,destroy(){n=!0,i?.removeEventListener?.(`change`,l);for(let e of r.keys())o(e)}}}export{n as applyLoadingAnimation,v as applyLoadingLabel,y as createLoadingLabelLifecycle};
1
+ const e=(e,t)=>{let n=document.createElement(e);return t&&(n.className=t),n},t=(t,n,r)=>{let i=r;for(let r of n){let n=e(`span`,`persona-tool-char`);n.style.setProperty(`--char-index`,String(i)),n.textContent=r===` `?`\xA0`:r,t.appendChild(n),i++}return i};function n(e,n){let{animation:r,duration:i,color:a,secondaryColor:o}=n;if(r===`none`||(e.setAttribute(`data-preserve-animation`,`true`),e.classList.add(`persona-tool-loading-${r}`),i&&e.style.setProperty(`--persona-tool-anim-duration`,i),a&&e.style.setProperty(`--persona-tool-anim-color`,a),o&&e.style.setProperty(`--persona-tool-anim-secondary-color`,o),r===`pulse`))return;let s=0,c=e=>{for(let n of Array.from(e.childNodes))if(n.nodeType===3){let e=document.createElement(`span`);s=t(e,n.textContent??``,s),n.replaceWith(...Array.from(e.childNodes))}else n instanceof HTMLElement&&!n.hasAttribute(`data-tool-elapsed`)&&c(n)};c(e)}const r=e=>{if(typeof e!=`string`)return;let t=e.trim(),n=/^#([\da-f]{3}|[\da-f]{6})$/i.exec(t)?.[1];if(n){let e=n.length===3?[...n].map(e=>e+e).join(``):n;return[0,2,4].map(t=>parseInt(e.slice(t,t+2),16))}let r=/^rgba?\(\s*([^)]*)\)$/i.exec(t);if(!r)return;let i=r[1].trim().split(/\s*[,/]\s*|\s+/);if(i.length===4&&/^(?:1(?:\.0+)?|100%)$/.test(i[3])&&i.pop(),i.length!==3)return;let a=i.map(e=>/^\d+(?:\.\d+)?%?$/.test(e)?Number.parseFloat(e)*(e.endsWith(`%`)?2.55:1):NaN);if(!a.some(e=>!Number.isFinite(e)||e<0||e>255))return a},i=e=>e.reduce((e,t,n)=>{let r=t/255;return e+(r<=.04045?r/12.92:((r+.055)/1.055)**2.4)*[.2126,.7152,.0722][n]},0),a=e=>{let t=r(e?.neutral);return t?i(t)<.18?`dark`:`light`:void 0},o=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function s(e,t){let n=t.split(`.`);for(let t=0;t<n.length;t++){let r=n[t];if(!o(e)||!Object.prototype.hasOwnProperty.call(e,r))return`absent`;if(e=e[r],e===void 0||t<n.length-1&&!o(e))return`clear`}return`explicit`}const c=Symbol.for(`persona.styleProvenance`),l=(e,t)=>{for(let n of t.split(`.`)){if(typeof e!=`object`||!e)return;e=e[n]}return e},u=(e,t)=>{let n=e?.[c];return!n||!Object.prototype.hasOwnProperty.call(n.values,t)||l(e,t)!==n.values[t]?s(e,t)===`explicit`:n.explicit.includes(t)},d=(e,t)=>u(e,t)?l(e,t):void 0,f=(e,t,n)=>{let r=e,i=n??r?.colorScheme??a(r?.brand)??`light`,o=i===`dark`||i===`auto`&&(typeof document<`u`&&document.documentElement.classList.contains(`dark`)||typeof window<`u`&&window.matchMedia?.(`(prefers-color-scheme: dark)`).matches);return u(e,`theme.components.${t}`)||o&&u(e,`darkTheme.components.${t}`)},p={backgroundColor:`background`,borderColor:`borderColor`,borderWidth:`borderWidth`,borderRadius:`borderRadius`,headerBackgroundColor:`header.background`,headerTextColor:`header.foreground`,contentBackgroundColor:`content.background`,contentTextColor:`content.foreground`,codeBlockBackgroundColor:`codeBlock.background`,codeBlockBorderColor:`codeBlock.borderColor`,codeBlockTextColor:`codeBlock.foreground`,toggleTextColor:`toggleForeground`,labelTextColor:`labelForeground`,loadingAnimationColor:`loading.primary`,loadingAnimationSecondaryColor:`loading.secondary`};function m({getExplicitLegacyStyle:e,hasExplicitThemeStyle:t}){function n(n){let r={...n?.toolCall};for(let[i,a]of Object.entries(p))e(n,`toolCall.${i}`)===void 0&&t(n,`toolBubble.${a}`)&&(r[i]=`var(--persona-components-toolBubble-${a.split(`.`).join(`-`)})`);return r}function r(n,r,i){n.classList.remove(`persona-theme-padding`),n.style.removeProperty(`--persona-theme-padding`);for(let e of[`padding-left`,`padding-right`,`padding-top`,`padding-bottom`])n.style.removeProperty(e);t(r,`toolBubble.${i}.padding`)&&(n.classList.add(`persona-theme-padding`),n.style.setProperty(`--persona-theme-padding`,`var(--persona-components-toolBubble-${i}-padding)`));let a=e(r,`toolCall.${i}PaddingX`),o=e(r,`toolCall.${i}PaddingY`);typeof a==`string`&&a&&(n.style.paddingLeft=a,n.style.paddingRight=a),typeof o==`string`&&o&&(n.style.paddingTop=o,n.style.paddingBottom=o)}function i(e){let n=e?.toolCall?.loadingAnimationDuration;return n===void 0?t(e,`toolBubble.loading.duration`)?`var(--persona-components-toolBubble-loading-duration)`:`2000ms`:`${n}ms`}return{resolveToolStyles:n,applyToolPadding:r,toolLoadingDuration:i}}const{resolveToolStyles:h,applyToolPadding:g,toolLoadingDuration:_}=m({getExplicitLegacyStyle:d,hasExplicitThemeStyle:f});function v(e,t,r){let i=t?.loadingLabel,a=r===`reasoning`,o=a?t?.reasoning:h(t),s=r===`waiting`?void 0:a?t?.features?.reasoningDisplay:t?.features?.toolCallDisplay,c=i?.animation??s?.loadingAnimation??(r===`waiting`||t?.future?.v5Defaults?`shimmer`:`none`);if(c===`none`)return;let l={animation:c,duration:i?.duration===void 0?a?`${o?.loadingAnimationDuration??2e3}ms`:_(t):`${i.duration}ms`,color:i?.color??o?.loadingAnimationColor,secondaryColor:i?.secondaryColor??o?.loadingAnimationSecondaryColor};e.dataset.personaLoadingLabel=r,e.dataset.personaLoadingText=e.textContent??``,e.dataset.personaLoadingAnimation=JSON.stringify([r,e.textContent,l,!!i?.animate,e.className,e.getAttribute(`style`)]),i?.animate?e.setAttribute(`data-preserve-animation`,`true`):n(e,l)}function y(e,t){let n=!1,r=/* @__PURE__ */ new Map,i=e.ownerDocument.defaultView?.matchMedia?.(`(prefers-reduced-motion: reduce)`),a=e=>{try{e()}catch(e){console.warn(`[persona] Loading label animation failed`,e)}},o=e=>{let t=r.get(e);r.delete(e),t?.handle&&a(()=>t.handle?.destroy())},s=e=>`${e.closest(`[data-wrapper-id]`)?.dataset.wrapperId??``}:${e.dataset.personaLoadingLabel}`,c=e=>{if(n)return;let a=i?.matches?void 0:t().loadingLabel?.animate;if(!a&&!r.size)return;let c=new Set(Array.from(e.querySelectorAll(`[data-persona-loading-label]`),s)),l=new Set(Array.from(e.querySelectorAll(`[data-persona-reuse]`),e=>e.dataset.wrapperId));for(let[e,t]of r){let n=l.has(e.closest(`[data-wrapper-id]`)?.dataset.wrapperId);(t.start!==a||!n&&!c.has(s(e)))&&o(e)}},l=()=>{if(n)return;let s=t(),c=i?.matches?void 0:s.loadingLabel?.animate;if(!c&&!r.size)return;let l=new Set(e.querySelectorAll(`[data-persona-loading-label]`));for(let[e,t]of r)c&&t.start===c&&l.has(e)&&e.dataset.personaLoadingLabel===t.kind||o(e);if(c)for(let e of l){if(n||t().loadingLabel?.animate!==c)break;let i={element:e,config:s,text:e.dataset.personaLoadingText??``,kind:e.dataset.personaLoadingLabel,reducedMotion:!1},o=r.get(e);if(o)a(()=>o.handle?.update?.(i));else{let t={start:c,kind:i.kind,handle:void 0};r.set(e,t),a(()=>{let n=c(i);r.get(e)===t?t.handle=n:n?.destroy()})}}};return i?.addEventListener?.(`change`,l),{prepare:c,sync:l,destroy(){n=!0,i?.removeEventListener?.(`change`,l);for(let e of r.keys())o(e)}}}export{n as applyLoadingAnimation,v as applyLoadingLabel,y as createLoadingLabelLifecycle};
@@ -38,7 +38,7 @@ function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedanti
38
38
  Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+l(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};const M=new ze;function N(e,t){return M.parse(e,t)}N.options=N.setOptions=function(e){return M.setOptions(e),N.defaults=M.defaults,n(N.defaults),N},N.getDefaults=e,N.defaults=t,N.use=function(...e){return M.use(...e),N.defaults=M.defaults,n(N.defaults),N},N.walkTokens=function(e,t){return M.walkTokens(e,t)},N.parseInline=M.parseInline,N.Parser=j,N.parser=j.parse,N.Renderer=Ie,N.TextRenderer=Le,N.Lexer=A,N.lexer=A.lex,N.Tokenizer=v,N.Hooks=Re,N.parse=N,N.options,N.setOptions,N.use,N.walkTokens,N.parseInline,j.parse,A.lex;
39
39
  /*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */
40
40
  function P(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(e){if(Array.isArray(e))return e}function Be(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Ve(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
41
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function He(e,t){return F(e)||Be(e,t)||Ue(e,t)||Ve()}function Ue(e,t){if(e){if(typeof e==`string`)return P(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}const We=Object.entries,Ge=Object.setPrototypeOf,Ke=Object.isFrozen,qe=Object.getPrototypeOf,I=Object.getOwnPropertyDescriptor;let L=Object.freeze,R=Object.seal,Je=Object.create,z=typeof Reflect<`u`&&Reflect,Ye=z.apply,Xe=z.construct;L||=function(e){return e},R||=function(e){return e},Ye||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Xe||=function(e){return new e(...[...arguments].slice(1))};const Ze=W(Array.prototype.forEach),Qe=W(Array.prototype.lastIndexOf),$e=W(Array.prototype.pop),et=W(Array.prototype.push),tt=W(Array.prototype.splice),B=Array.isArray,nt=W(String.prototype.toLowerCase),rt=W(String.prototype.toString),it=W(String.prototype.match),at=W(String.prototype.replace),ot=W(String.prototype.indexOf),st=W(String.prototype.trim),ct=W(Number.prototype.toString),lt=W(Boolean.prototype.toString),ut=typeof BigInt>`u`?null:W(BigInt.prototype.toString),dt=typeof Symbol>`u`?null:W(Symbol.prototype.toString),V=W(Object.prototype.hasOwnProperty),H=W(Object.prototype.toString),U=W(RegExp.prototype.test),ft=pt(TypeError);function W(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return Ye(e,t,n)}}function pt(e){return function(){return Xe(e,[...arguments])}}function G(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:nt;if(Ge&&Ge(e,null),!B(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Ke(t)||(t[r]=e),i=e)}e[i]=!0}return e}function mt(e){for(let t=0;t<e.length;t++)V(e,t)||(e[t]=null);return e}function K(e){let t=Je(null);for(let r of We(e)){var n=He(r,2);let i=n[0],a=n[1];V(e,i)&&(t[i]=B(a)?mt(a):a&&typeof a==`object`&&a.constructor===Object?K(a):a)}return t}function ht(e){switch(typeof e){case`string`:return e;case`number`:return ct(e);case`boolean`:return lt(e);case`bigint`:return ut?ut(e):`0`;case`symbol`:return dt?dt(e):`Symbol()`;case`undefined`:return H(e);case`function`:case`object`:{if(e===null)return H(e);let t=e,n=q(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:H(e)}return H(e)}default:return H(e)}}function q(e,t){for(;e!==null;){let n=I(e,t);if(n){if(n.get)return W(n.get);if(typeof n.value==`function`)return W(n.value)}e=qe(e)}function n(){return null}return n}function gt(e){try{return U(e,``),!0}catch{return!1}}const _t=L(/* @__PURE__ */ `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(`.`)),vt=L(/* @__PURE__ */ `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(`.`)),yt=L([`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`]),bt=L([`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`]),xt=L(/* @__PURE__ */ `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(`.`)),St=L([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Ct=L([`#text`]),wt=L(/* @__PURE__ */ `accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.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`.split(`.`)),Tt=L(/* @__PURE__ */ `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.dominant-baseline.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-orientation.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(`.`)),Et=L(/* @__PURE__ */ `accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.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(`.`)),Dt=L([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ot=R(/{{[\w\W]*|^[\w\W]*}}/g),kt=R(/<%[\w\W]*|^[\w\W]*%>/g),At=R(/\${[\w\W]*/g),jt=R(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mt=R(/^aria-[\-\w]+$/),Nt=R(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Pt=R(/^(?:\w+script|data):/i),Ft=R(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),It=R(/^html$/i),Lt=R(/^[a-z][.\w]*(-[.\w]+)+$/i),Rt=R(/<[/\w!]/g),zt=R(/<[/\w]/g),Bt=R(/<\/no(script|embed|frames)/i),Vt=R(/\/>/i),J={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ht=function(){return typeof window>`u`?null:window},Ut=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}},Wt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Gt=function(e,t,n,r){return V(e,t)&&B(e[t])?G(r.base?K(r.base):{},e[t],r.transform):n};function Kt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ht(),t=e=>Kt(e);if(t.version=`3.4.13`,t.removed=[],!e||!e.document||e.document.nodeType!==J.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=q(d,`cloneNode`),p=q(d,`remove`),ee=q(d,`nextSibling`),m=q(d,`childNodes`),h=q(d,`parentNode`),te=q(d,`shadowRoot`),ne=q(d,`attributes`),g=o&&o.prototype?q(o.prototype,`nodeType`):null,_=o&&o.prototype?q(o.prototype,`nodeName`):null,v=o&&o.prototype?q(o.prototype,`ownerDocument`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let y,b=``,re,ie=!1,ae=0,oe=function(){if(ae>0)throw ft(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},x=function(e){oe(),ae++;try{return y.createHTML(e)}finally{ae--}},se=function(e){oe(),ae++;try{return y.createScriptURL(e)}finally{ae--}},ce=function(){return ie||=(re=Ut(u,i),!0),re},le=n,ue=le.implementation,de=le.createNodeIterator,fe=le.createDocumentFragment,pe=le.getElementsByTagName,me=r.importNode,S=Wt();t.isSupported=typeof We==`function`&&typeof h==`function`&&ue&&ue.createHTMLDocument!==void 0;let he=Ot,ge=kt,_e=At,ve=jt,ye=Mt,be=Pt,xe=Ft,Se=Lt,Ce=Nt,C=null,we=G({},[..._t,...vt,...yt,...xt,...Ct]),w=null,Te=G({},[...wt,...Tt,...Et,...Dt]),T=Object.seal(Je(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}})),Ee=null,De=null,E=Object.seal(Je(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Oe=!0,ke=!0,Ae=!1,je=!0,D=!1,O=!0,k=!1,Me=!1,Ne=null,Pe=null,Fe=!1,A=!1,Ie=!1,Le=!1,j=!0,Re=!1,ze=`user-content-`,M=!0,N=!1,P={},F=null,Be=G({},/* @__PURE__ */ `annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ve=null,He=G({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ue=null,Ge=G({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ke=`http://www.w3.org/1998/Math/MathML`,qe=`http://www.w3.org/2000/svg`,I=`http://www.w3.org/1999/xhtml`,z=I,Ye=!1,Xe=null,ct=G({},[Ke,qe,I],rt),lt=L([`mi`,`mo`,`mn`,`ms`,`mtext`]),ut=G({},lt),dt=L([`annotation-xml`]),H=G({},dt),W=G({},[`title`,`style`,`font`,`a`,`script`]),pt=null,mt=[`application/xhtml+xml`,`text/html`],Y=null,X=null,qt=n.createElement(`form`),Jt=function(e){return e instanceof RegExp||e instanceof Function},Yt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(X&&X===e)return;(!e||typeof e!=`object`)&&(e={}),e=K(e),pt=mt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Y=pt===`application/xhtml+xml`?rt:nt,C=Gt(e,`ALLOWED_TAGS`,we,{transform:Y}),w=Gt(e,`ALLOWED_ATTR`,Te,{transform:Y}),Xe=Gt(e,`ALLOWED_NAMESPACES`,ct,{transform:rt}),Ue=Gt(e,`ADD_URI_SAFE_ATTR`,Ge,{transform:Y,base:Ge}),Ve=Gt(e,`ADD_DATA_URI_TAGS`,He,{transform:Y,base:He}),F=Gt(e,`FORBID_CONTENTS`,Be,{transform:Y}),Ee=Gt(e,`FORBID_TAGS`,K({}),{transform:Y}),De=Gt(e,`FORBID_ATTR`,K({}),{transform:Y}),P=V(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?K(e.USE_PROFILES):e.USE_PROFILES:!1,Oe=e.ALLOW_ARIA_ATTR!==!1,ke=e.ALLOW_DATA_ATTR!==!1,Ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,je=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,D=e.SAFE_FOR_TEMPLATES||!1,O=e.SAFE_FOR_XML!==!1,k=e.WHOLE_DOCUMENT||!1,A=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Le=e.RETURN_TRUSTED_TYPE||!1,Fe=e.FORCE_BODY||!1,j=e.SANITIZE_DOM!==!1,Re=e.SANITIZE_NAMED_PROPS||!1,M=e.KEEP_CONTENT!==!1,N=e.IN_PLACE||!1,Ce=gt(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Nt,z=typeof e.NAMESPACE==`string`?e.NAMESPACE:I,ut=V(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?K(e.MATHML_TEXT_INTEGRATION_POINTS):G({},lt),H=V(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?K(e.HTML_INTEGRATION_POINTS):G({},dt);let t=V(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?K(e.CUSTOM_ELEMENT_HANDLING):Je(null);if(T=Je(null),V(t,`tagNameCheck`)&&Jt(t.tagNameCheck)&&(T.tagNameCheck=t.tagNameCheck),V(t,`attributeNameCheck`)&&Jt(t.attributeNameCheck)&&(T.attributeNameCheck=t.attributeNameCheck),V(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(T.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),R(T),D&&(ke=!1),Ie&&(A=!0),P&&(C=G({},Ct),w=Je(null),P.html===!0&&(G(C,_t),G(w,wt)),P.svg===!0&&(G(C,vt),G(w,Tt),G(w,Dt)),P.svgFilters===!0&&(G(C,yt),G(w,Tt),G(w,Dt)),P.mathMl===!0&&(G(C,xt),G(w,Et),G(w,Dt))),E.tagCheck=null,E.attributeCheck=null,V(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?E.tagCheck=e.ADD_TAGS:B(e.ADD_TAGS)&&(C===we&&(C=K(C)),G(C,e.ADD_TAGS,Y))),V(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?E.attributeCheck=e.ADD_ATTR:B(e.ADD_ATTR)&&(w===Te&&(w=K(w)),G(w,e.ADD_ATTR,Y))),V(e,`ADD_URI_SAFE_ATTR`)&&B(e.ADD_URI_SAFE_ATTR)&&G(Ue,e.ADD_URI_SAFE_ATTR,Y),V(e,`FORBID_CONTENTS`)&&B(e.FORBID_CONTENTS)&&(F===Be&&(F=K(F)),G(F,e.FORBID_CONTENTS,Y)),V(e,`ADD_FORBID_CONTENTS`)&&B(e.ADD_FORBID_CONTENTS)&&(F===Be&&(F=K(F)),G(F,e.ADD_FORBID_CONTENTS,Y)),M&&(C[`#text`]=!0),k&&G(C,[`html`,`head`,`body`]),C.table&&(G(C,[`tbody`]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ft(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ft(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=y;y=e.TRUSTED_TYPES_POLICY;try{b=x(``)}catch(e){throw y=t,e}}else e.TRUSTED_TYPES_POLICY===null?(y=void 0,b=``):(y===void 0&&(y=ce()),y&&typeof b==`string`&&(b=x(``)));L&&L(e),X=e},Xt=G({},[...vt,...yt,...bt]),Zt=G({},[...xt,...St]),Qt=function(e,t,n){return t.namespaceURI===I?e===`svg`:t.namespaceURI===Ke?e===`svg`&&(n===`annotation-xml`||ut[n]):!!Xt[e]},Z=function(e,t,n){return t.namespaceURI===I?e===`math`:t.namespaceURI===qe?e===`math`&&H[n]:!!Zt[e]},$t=function(e,t,n){return t.namespaceURI===qe&&!H[n]||t.namespaceURI===Ke&&!ut[n]?!1:!Zt[e]&&(W[e]||!Xt[e])},en=function(e){let t=h(e);(!t||!t.tagName)&&(t={namespaceURI:z,tagName:`template`});let n=nt(e.tagName),r=nt(t.tagName);return Xe[e.namespaceURI]?e.namespaceURI===qe?Qt(n,t,r):e.namespaceURI===Ke?Z(n,t,r):e.namespaceURI===I?$t(n,t,r):!!(pt===`application/xhtml+xml`&&Xe[e.namespaceURI]):!1},Q=function(e){et(t.removed,{element:e});try{h(e).removeChild(e)}catch{if(p(e),!h(e))throw ft(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},tn=function(e){an(e);let t=m(e);if(t){let e=[];Ze(t,t=>{et(e,t)}),Ze(e,e=>{try{p(e)}catch{}})}let n=ne(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},nn=function(e,n){try{et(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{et(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`){if(A||Ie)try{Q(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},rn=function(e){let t=ne(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||w[Y(i)]))try{e.removeAttribute(i)}catch{}}},an=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(g?g(e):e.nodeType)===J.element&&rn(e);let n=m(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},on=function(e){if(!O)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=g?g(e):e.nodeType;if(n===J.processingInstruction||n===J.comment&&U(zt,e.data)){try{p(e)}catch{}continue}if(n===J.element){let t=e,n=Y(_?_(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&n!==`label`&&n!==`output`&&t.removeAttribute(`for`)}catch{}}let r=m(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},sn=function(e){let t=null,r=null;if(Fe)e=`<remove></remove>`+e;else{let t=it(e,/^[\r\n\t ]+/);r=t&&t[0]}pt===`application/xhtml+xml`&&z===I&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=y?x(e):e;if(z===I)try{t=new l().parseFromString(i,pt)}catch{}if(!t||!t.documentElement){t=ue.createDocument(z,`template`,null);try{t.documentElement.innerHTML=Ye?b:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),z===I?pe.call(t,k?`html`:`body`)[0]:k?t.documentElement:a},cn=function(e){let t=v?v(e):e.ownerDocument;return de.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ln=function(e){return e=at(e,he,` `),e=at(e,ge,` `),e=at(e,_e,` `),e},un=function(e){e.normalize();let t=v?v(e):e.ownerDocument,n=de.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=ln(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&Ze(i,e=>{fn(e.content)&&un(e.content)})},dn=function(e){let t=_?_(e):null;return typeof t!=`string`||Y(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==ne(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==g(e)||e.childNodes!==m(e)},fn=function(e){if(!g||typeof e!=`object`||!e)return!1;try{return g(e)===J.documentFragment}catch{return!1}},pn=function(e){if(!g||typeof e!=`object`||!e)return!1;try{return typeof g(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&Ze(e,e=>{e.call(t,n,r,X)})}let mn=function(e,t){return!!(O&&e.hasChildNodes()&&!pn(e.firstElementChild)&&U(Rt,e.textContent)&&U(Rt,e.innerHTML)||O&&e.namespaceURI===I&&t===`style`&&pn(e.firstElementChild)||e.nodeType===J.processingInstruction||O&&e.nodeType===J.comment&&U(zt,e.data))},hn=function(e,t,n){if(!Ee[t]&&bn(t)&&(T.tagNameCheck instanceof RegExp&&U(T.tagNameCheck,t)||T.tagNameCheck instanceof Function&&T.tagNameCheck(t)))return!1;if(M&&!F[t]){let t=h(e),r=m(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,ee(e))}}}return Q(e),!0},gn=function(e,t,n,r){return e.length===0?t:t===n||t===r?K(t):t},_n=function(e,n){if($(S.beforeSanitizeElements,e,null),e!==n&&h(e)===null)return N&&an(e),!0;if(dn(e))return Q(e),!0;let r=Y(_?_(e):e.nodeName);if(C=gn(S.uponSanitizeElement,C,we,Ne),$(S.uponSanitizeElement,e,{tagName:r,allowedTags:C}),e!==n&&h(e)===null)return N&&an(e),!0;if(mn(e,r))return Q(e),!0;if(Ee[r]||!(E.tagCheck instanceof Function&&E.tagCheck(r))&&!C[r]){let t=hn(e,r,n);return t===!1&&$(S.afterSanitizeElements,e,null),t}if((g?g(e):e.nodeType)===J.element&&!en(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&U(Bt,e.innerHTML))return Q(e),!0;if(D&&e.nodeType===J.text){let n=ln(e.textContent);e.textContent!==n&&(et(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(S.afterSanitizeElements,e,null),!1},vn=function(e,t,r){if(De[t]||O&&t===`patchsrc`||O&&t===`for`&&e!==`label`&&e!==`output`||j&&(t===`id`||t===`name`)&&(r in n||r in qt))return!1;let i=w[t]||E.attributeCheck instanceof Function&&E.attributeCheck(t,e);if(!(ke&&U(ve,t))&&!(Oe&&U(ye,t))){if(!i){if(!(bn(e)&&(T.tagNameCheck instanceof RegExp&&U(T.tagNameCheck,e)||T.tagNameCheck instanceof Function&&T.tagNameCheck(e))&&(T.attributeNameCheck instanceof RegExp&&U(T.attributeNameCheck,t)||T.attributeNameCheck instanceof Function&&T.attributeNameCheck(t,e))||t===`is`&&T.allowCustomizedBuiltInElements&&(T.tagNameCheck instanceof RegExp&&U(T.tagNameCheck,r)||T.tagNameCheck instanceof Function&&T.tagNameCheck(r))))return!1}else if(!Ue[t]&&!U(Ce,at(r,xe,``))&&(t!==`src`&&t!==`xlink:href`&&t!==`href`||e===`script`||ot(r,`data:`)!==0||!Ve[e])&&(!Ae||U(be,at(r,xe,``)))&&r)return!1}return!0},yn=G({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),bn=function(e){return!yn[nt(e)]&&U(Se,e)},xn=function(e,t,n,r){if(y&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return x(r);case`TrustedScriptURL`:return se(r)}return r},Sn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),dn(e)?Q(e):$e(t.removed)}catch{nn(n,e)}},Cn=function(e){$(S.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||dn(e))return;w=gn(S.uponSanitizeAttribute,w,Te,Pe);let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:w,forceKeepAttr:void 0},r=t.length,i=Y(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=Y(o),u=c,d=o===`value`?u:st(u);n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,$(S.uponSanitizeAttribute,e,n),d=n.attrValue,Re&&(l===`id`||l===`name`)&&ot(d,ze)!==0&&(nn(o,e),d=ze+d),O&&U(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)||l===`attributename`&&it(d,`href`)?nn(o,e):n.forceKeepAttr||(n.keepAttr?!je&&U(Vt,d)?nn(o,e):(D&&(d=ln(d)),vn(i,l,d)?(d=xn(i,l,s,d),d!==u&&Sn(e,o,s,d)):nn(o,e)):nn(o,e))}$(S.afterSanitizeAttributes,e,null)},wn=function(e){let t=null,n=cn(e);for($(S.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(S.uponSanitizeShadowNode,t,null),_n(t,e),Cn(t),fn(t.content)&&wn(t.content),(g?g(t):t.nodeType)===J.element){let e=te(t);fn(e)&&(Tn(e),wn(e))}$(S.afterSanitizeShadowDOM,e,null)},Tn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){wn(e.shadow);continue}let n=e.node,r=(g?g(n):n.nodeType)===J.element,i=m(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=_?_(n):null;if(typeof e==`string`&&Y(e)===`template`){let e=n.content;fn(e)&&t.push({node:e,shadow:null})}}if(r){let e=te(n);fn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ye=!e,Ye&&(e=`<!-->`),typeof e!=`string`&&!pn(e)&&(e=ht(e),typeof e!=`string`))throw ft(`dirty is not a string, aborting`);if(!t.isSupported)return e;Me?(C=Ne,w=Pe):Yt(n),(S.uponSanitizeElement.length>0||S.uponSanitizeAttribute.length>0)&&(C=K(C)),S.uponSanitizeAttribute.length>0&&(w=K(w)),t.removed=[];let c=N&&typeof e!=`string`&&pn(e);if(c){on(e);let t=_?_(e):e.nodeName;if(typeof t==`string`){let n=Y(t);if(!C[n]||Ee[n])throw tn(e),ft(`root node is forbidden and cannot be sanitized in-place`)}if(dn(e))throw tn(e),ft(`root node is clobbered and cannot be sanitized in-place`);try{Tn(e)}catch(t){throw tn(e),t}}else if(pn(e))i=sn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===J.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Tn(a);else{if(!A&&!D&&!k&&e.indexOf(`<`)===-1)return y&&Le?x(e):e;if(i=sn(e),!i)return A?null:Le?b:``}i&&Fe&&Q(i.firstChild);let l=c?e:i;try{let e=cn(l);for(;o=e.nextNode();)_n(o,l),Cn(o),fn(o.content)&&wn(o.content)}catch(n){throw c&&(tn(e),Ze(t.removed,e=>{e.element&&an(e.element)})),n}if(c)return Ze(t.removed,e=>{e.element&&an(e.element)}),D&&un(e),e;if(A){if(D&&un(i),Ie)for(s=fe.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(w.shadowroot||w.shadowrootmode)&&(s=me.call(r,s,!0)),s}let u=k?i.outerHTML:i.innerHTML;return k&&C[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&U(It,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
41
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function He(e,t){return F(e)||Be(e,t)||Ue(e,t)||Ve()}function Ue(e,t){if(e){if(typeof e==`string`)return P(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}const We=Object.entries,Ge=Object.setPrototypeOf,Ke=Object.isFrozen,qe=Object.getPrototypeOf,I=Object.getOwnPropertyDescriptor;let L=Object.freeze,R=Object.seal,Je=Object.create,z=typeof Reflect<`u`&&Reflect,Ye=z.apply,Xe=z.construct;L||=function(e){return e},R||=function(e){return e},Ye||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Xe||=function(e){return new e(...[...arguments].slice(1))};const Ze=W(Array.prototype.forEach),Qe=W(Array.prototype.lastIndexOf),$e=W(Array.prototype.pop),et=W(Array.prototype.push),tt=W(Array.prototype.splice),B=Array.isArray,nt=W(String.prototype.toLowerCase),rt=W(String.prototype.toString),it=W(String.prototype.match),at=W(String.prototype.replace),ot=W(String.prototype.indexOf),st=W(String.prototype.trim),ct=W(Number.prototype.toString),lt=W(Boolean.prototype.toString),ut=typeof BigInt>`u`?null:W(BigInt.prototype.toString),dt=typeof Symbol>`u`?null:W(Symbol.prototype.toString),V=W(Object.prototype.hasOwnProperty),H=W(Object.prototype.toString),U=W(RegExp.prototype.test),ft=pt(TypeError);function W(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return Ye(e,t,n)}}function pt(e){return function(){return Xe(e,[...arguments])}}function G(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:nt;if(Ge&&Ge(e,null),!B(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Ke(t)||(t[r]=e),i=e)}e[i]=!0}return e}function mt(e){for(let t=0;t<e.length;t++)V(e,t)||(e[t]=null);return e}function K(e){let t=Je(null);for(let r of We(e)){var n=He(r,2);let i=n[0],a=n[1];V(e,i)&&(t[i]=B(a)?mt(a):a&&typeof a==`object`&&a.constructor===Object?K(a):a)}return t}function ht(e){switch(typeof e){case`string`:return e;case`number`:return ct(e);case`boolean`:return lt(e);case`bigint`:return ut?ut(e):`0`;case`symbol`:return dt?dt(e):`Symbol()`;case`undefined`:return H(e);case`function`:case`object`:{if(e===null)return H(e);let t=e,n=q(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:H(e)}return H(e)}default:return H(e)}}function q(e,t){for(;e!==null;){let n=I(e,t);if(n){if(n.get)return W(n.get);if(typeof n.value==`function`)return W(n.value)}e=qe(e)}function n(){return null}return n}function gt(e){try{return U(e,``),!0}catch{return!1}}const _t=L(/* @__PURE__ */ `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(`.`)),vt=L(/* @__PURE__ */ `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(`.`)),yt=L([`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`]),bt=L([`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`]),xt=L(/* @__PURE__ */ `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(`.`)),St=L([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Ct=L([`#text`]),wt=L(/* @__PURE__ */ `accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.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`.split(`.`)),Tt=L(/* @__PURE__ */ `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.dominant-baseline.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-orientation.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(`.`)),Et=L(/* @__PURE__ */ `accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.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(`.`)),Dt=L([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ot=R(/{{[\w\W]*|^[\w\W]*}}/g),kt=R(/<%[\w\W]*|^[\w\W]*%>/g),At=R(/\${[\w\W]*/g),jt=R(/^data-[\-\w.\u00B7-\uFFFF]+$/),Mt=R(/^aria-[\-\w]+$/),Nt=R(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Pt=R(/^(?:\w+script|data):/i),Ft=R(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),It=R(/^html$/i),Lt=R(/^[a-z][.\w]*(-[.\w]+)+$/i),Rt=R(/<[/\w!]/g),zt=R(/<[/\w]/g),Bt=R(/<\/no(script|embed|frames)/i),Vt=R(/\/>/i),J={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ht=function(){return typeof window>`u`?null:window},Ut=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}},Wt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Gt=function(e,t,n,r){return V(e,t)&&B(e[t])?G(r.base?K(r.base):{},e[t],r.transform):n};function Kt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ht(),t=e=>Kt(e);if(t.version=`3.4.13`,t.removed=[],!e||!e.document||e.document.nodeType!==J.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=q(d,`cloneNode`),p=q(d,`remove`),ee=q(d,`nextSibling`),m=q(d,`childNodes`),h=q(d,`parentNode`),te=q(d,`shadowRoot`),ne=q(d,`attributes`),g=o&&o.prototype?q(o.prototype,`nodeType`):null,_=o&&o.prototype?q(o.prototype,`nodeName`):null,v=o&&o.prototype?q(o.prototype,`ownerDocument`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let y,b=``,re,ie=!1,ae=0,oe=function(){if(ae>0)throw ft(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},x=function(e){oe(),ae++;try{return y.createHTML(e)}finally{ae--}},se=function(e){oe(),ae++;try{return y.createScriptURL(e)}finally{ae--}},ce=function(){return ie||=(re=Ut(u,i),!0),re},le=n,ue=le.implementation,de=le.createNodeIterator,fe=le.createDocumentFragment,pe=le.getElementsByTagName,me=r.importNode,S=Wt();t.isSupported=typeof We==`function`&&typeof h==`function`&&ue&&ue.createHTMLDocument!==void 0;let he=Ot,ge=kt,_e=At,ve=jt,ye=Mt,be=Pt,xe=Ft,Se=Lt,Ce=Nt,C=null,we=G({},[..._t,...vt,...yt,...xt,...Ct]),w=null,Te=G({},[...wt,...Tt,...Et,...Dt]),T=Object.seal(Je(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}})),Ee=null,De=null,E=Object.seal(Je(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Oe=!0,ke=!0,Ae=!1,je=!0,D=!1,O=!0,k=!1,Me=!1,Ne=null,Pe=null,Fe=!1,A=!1,Ie=!1,Le=!1,j=!0,Re=!1,ze=`user-content-`,M=!0,N=!1,P={},F=null,Be=G({},/* @__PURE__ */ `annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ve=null,He=G({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ue=null,Ge=G({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ke=`http://www.w3.org/1998/Math/MathML`,qe=`http://www.w3.org/2000/svg`,I=`http://www.w3.org/1999/xhtml`,z=I,Ye=!1,Xe=null,ct=G({},[Ke,qe,I],rt),lt=L([`mi`,`mo`,`mn`,`ms`,`mtext`]),ut=G({},lt),dt=L([`annotation-xml`]),H=G({},dt),W=G({},[`title`,`style`,`font`,`a`,`script`]),pt=null,mt=[`application/xhtml+xml`,`text/html`],Y=null,X=null,qt=n.createElement(`form`),Jt=function(e){return e instanceof RegExp||e instanceof Function},Yt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(X&&X===e)return;e&&typeof e==`object`||(e={}),e=K(e),pt=mt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Y=pt===`application/xhtml+xml`?rt:nt,C=Gt(e,`ALLOWED_TAGS`,we,{transform:Y}),w=Gt(e,`ALLOWED_ATTR`,Te,{transform:Y}),Xe=Gt(e,`ALLOWED_NAMESPACES`,ct,{transform:rt}),Ue=Gt(e,`ADD_URI_SAFE_ATTR`,Ge,{transform:Y,base:Ge}),Ve=Gt(e,`ADD_DATA_URI_TAGS`,He,{transform:Y,base:He}),F=Gt(e,`FORBID_CONTENTS`,Be,{transform:Y}),Ee=Gt(e,`FORBID_TAGS`,K({}),{transform:Y}),De=Gt(e,`FORBID_ATTR`,K({}),{transform:Y}),P=V(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?K(e.USE_PROFILES):e.USE_PROFILES:!1,Oe=e.ALLOW_ARIA_ATTR!==!1,ke=e.ALLOW_DATA_ATTR!==!1,Ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,je=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,D=e.SAFE_FOR_TEMPLATES||!1,O=e.SAFE_FOR_XML!==!1,k=e.WHOLE_DOCUMENT||!1,A=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Le=e.RETURN_TRUSTED_TYPE||!1,Fe=e.FORCE_BODY||!1,j=e.SANITIZE_DOM!==!1,Re=e.SANITIZE_NAMED_PROPS||!1,M=e.KEEP_CONTENT!==!1,N=e.IN_PLACE||!1,Ce=gt(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Nt,z=typeof e.NAMESPACE==`string`?e.NAMESPACE:I,ut=V(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?K(e.MATHML_TEXT_INTEGRATION_POINTS):G({},lt),H=V(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?K(e.HTML_INTEGRATION_POINTS):G({},dt);let t=V(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?K(e.CUSTOM_ELEMENT_HANDLING):Je(null);if(T=Je(null),V(t,`tagNameCheck`)&&Jt(t.tagNameCheck)&&(T.tagNameCheck=t.tagNameCheck),V(t,`attributeNameCheck`)&&Jt(t.attributeNameCheck)&&(T.attributeNameCheck=t.attributeNameCheck),V(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(T.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),R(T),D&&(ke=!1),Ie&&(A=!0),P&&(C=G({},Ct),w=Je(null),P.html===!0&&(G(C,_t),G(w,wt)),P.svg===!0&&(G(C,vt),G(w,Tt),G(w,Dt)),P.svgFilters===!0&&(G(C,yt),G(w,Tt),G(w,Dt)),P.mathMl===!0&&(G(C,xt),G(w,Et),G(w,Dt))),E.tagCheck=null,E.attributeCheck=null,V(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?E.tagCheck=e.ADD_TAGS:B(e.ADD_TAGS)&&(C===we&&(C=K(C)),G(C,e.ADD_TAGS,Y))),V(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?E.attributeCheck=e.ADD_ATTR:B(e.ADD_ATTR)&&(w===Te&&(w=K(w)),G(w,e.ADD_ATTR,Y))),V(e,`ADD_URI_SAFE_ATTR`)&&B(e.ADD_URI_SAFE_ATTR)&&G(Ue,e.ADD_URI_SAFE_ATTR,Y),V(e,`FORBID_CONTENTS`)&&B(e.FORBID_CONTENTS)&&(F===Be&&(F=K(F)),G(F,e.FORBID_CONTENTS,Y)),V(e,`ADD_FORBID_CONTENTS`)&&B(e.ADD_FORBID_CONTENTS)&&(F===Be&&(F=K(F)),G(F,e.ADD_FORBID_CONTENTS,Y)),M&&(C[`#text`]=!0),k&&G(C,[`html`,`head`,`body`]),C.table&&(G(C,[`tbody`]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ft(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ft(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=y;y=e.TRUSTED_TYPES_POLICY;try{b=x(``)}catch(e){throw y=t,e}}else e.TRUSTED_TYPES_POLICY===null?(y=void 0,b=``):(y===void 0&&(y=ce()),y&&typeof b==`string`&&(b=x(``)));L&&L(e),X=e},Xt=G({},[...vt,...yt,...bt]),Zt=G({},[...xt,...St]),Qt=function(e,t,n){return t.namespaceURI===I?e===`svg`:t.namespaceURI===Ke?e===`svg`&&(n===`annotation-xml`||ut[n]):!!Xt[e]},Z=function(e,t,n){return t.namespaceURI===I?e===`math`:t.namespaceURI===qe?e===`math`&&H[n]:!!Zt[e]},$t=function(e,t,n){return t.namespaceURI===qe&&!H[n]||t.namespaceURI===Ke&&!ut[n]?!1:!Zt[e]&&(W[e]||!Xt[e])},en=function(e){let t=h(e);t&&t.tagName||(t={namespaceURI:z,tagName:`template`});let n=nt(e.tagName),r=nt(t.tagName);return Xe[e.namespaceURI]?e.namespaceURI===qe?Qt(n,t,r):e.namespaceURI===Ke?Z(n,t,r):e.namespaceURI===I?$t(n,t,r):!!(pt===`application/xhtml+xml`&&Xe[e.namespaceURI]):!1},Q=function(e){et(t.removed,{element:e});try{h(e).removeChild(e)}catch{if(p(e),!h(e))throw ft(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},tn=function(e){an(e);let t=m(e);if(t){let e=[];Ze(t,t=>{et(e,t)}),Ze(e,e=>{try{p(e)}catch{}})}let n=ne(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},nn=function(e,n){try{et(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{et(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`){if(A||Ie)try{Q(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},rn=function(e){let t=ne(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||w[Y(i)]))try{e.removeAttribute(i)}catch{}}},an=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(g?g(e):e.nodeType)===J.element&&rn(e);let n=m(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},on=function(e){if(!O)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=g?g(e):e.nodeType;if(n===J.processingInstruction||n===J.comment&&U(zt,e.data)){try{p(e)}catch{}continue}if(n===J.element){let t=e,n=Y(_?_(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&n!==`label`&&n!==`output`&&t.removeAttribute(`for`)}catch{}}let r=m(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},sn=function(e){let t=null,r=null;if(Fe)e=`<remove></remove>`+e;else{let t=it(e,/^[\r\n\t ]+/);r=t&&t[0]}pt===`application/xhtml+xml`&&z===I&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=y?x(e):e;if(z===I)try{t=new l().parseFromString(i,pt)}catch{}if(!t||!t.documentElement){t=ue.createDocument(z,`template`,null);try{t.documentElement.innerHTML=Ye?b:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),z===I?pe.call(t,k?`html`:`body`)[0]:k?t.documentElement:a},cn=function(e){let t=v?v(e):e.ownerDocument;return de.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ln=function(e){return e=at(e,he,` `),e=at(e,ge,` `),e=at(e,_e,` `),e},un=function(e){e.normalize();let t=v?v(e):e.ownerDocument,n=de.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=ln(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&Ze(i,e=>{fn(e.content)&&un(e.content)})},dn=function(e){let t=_?_(e):null;return typeof t!=`string`||Y(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==ne(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==g(e)||e.childNodes!==m(e)},fn=function(e){if(!g||typeof e!=`object`||!e)return!1;try{return g(e)===J.documentFragment}catch{return!1}},pn=function(e){if(!g||typeof e!=`object`||!e)return!1;try{return typeof g(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&Ze(e,e=>{e.call(t,n,r,X)})}let mn=function(e,t){return!!(O&&e.hasChildNodes()&&!pn(e.firstElementChild)&&U(Rt,e.textContent)&&U(Rt,e.innerHTML)||O&&e.namespaceURI===I&&t===`style`&&pn(e.firstElementChild)||e.nodeType===J.processingInstruction||O&&e.nodeType===J.comment&&U(zt,e.data))},hn=function(e,t,n){if(!Ee[t]&&bn(t)&&(T.tagNameCheck instanceof RegExp&&U(T.tagNameCheck,t)||T.tagNameCheck instanceof Function&&T.tagNameCheck(t)))return!1;if(M&&!F[t]){let t=h(e),r=m(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,ee(e))}}}return Q(e),!0},gn=function(e,t,n,r){return e.length===0?t:t===n||t===r?K(t):t},_n=function(e,n){if($(S.beforeSanitizeElements,e,null),e!==n&&h(e)===null)return N&&an(e),!0;if(dn(e))return Q(e),!0;let r=Y(_?_(e):e.nodeName);if(C=gn(S.uponSanitizeElement,C,we,Ne),$(S.uponSanitizeElement,e,{tagName:r,allowedTags:C}),e!==n&&h(e)===null)return N&&an(e),!0;if(mn(e,r))return Q(e),!0;if(Ee[r]||!(E.tagCheck instanceof Function&&E.tagCheck(r))&&!C[r]){let t=hn(e,r,n);return t===!1&&$(S.afterSanitizeElements,e,null),t}if((g?g(e):e.nodeType)===J.element&&!en(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&U(Bt,e.innerHTML))return Q(e),!0;if(D&&e.nodeType===J.text){let n=ln(e.textContent);e.textContent!==n&&(et(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(S.afterSanitizeElements,e,null),!1},vn=function(e,t,r){if(De[t]||O&&t===`patchsrc`||O&&t===`for`&&e!==`label`&&e!==`output`||j&&(t===`id`||t===`name`)&&(r in n||r in qt))return!1;let i=w[t]||E.attributeCheck instanceof Function&&E.attributeCheck(t,e);if(!(ke&&U(ve,t))&&!(Oe&&U(ye,t))){if(!i){if(!(bn(e)&&(T.tagNameCheck instanceof RegExp&&U(T.tagNameCheck,e)||T.tagNameCheck instanceof Function&&T.tagNameCheck(e))&&(T.attributeNameCheck instanceof RegExp&&U(T.attributeNameCheck,t)||T.attributeNameCheck instanceof Function&&T.attributeNameCheck(t,e))||t===`is`&&T.allowCustomizedBuiltInElements&&(T.tagNameCheck instanceof RegExp&&U(T.tagNameCheck,r)||T.tagNameCheck instanceof Function&&T.tagNameCheck(r))))return!1}else if(!Ue[t]&&!U(Ce,at(r,xe,``))&&(t!==`src`&&t!==`xlink:href`&&t!==`href`||e===`script`||ot(r,`data:`)!==0||!Ve[e])&&(!Ae||U(be,at(r,xe,``)))&&r)return!1}return!0},yn=G({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),bn=function(e){return!yn[nt(e)]&&U(Se,e)},xn=function(e,t,n,r){if(y&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return x(r);case`TrustedScriptURL`:return se(r)}return r},Sn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),dn(e)?Q(e):$e(t.removed)}catch{nn(n,e)}},Cn=function(e){$(S.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||dn(e))return;w=gn(S.uponSanitizeAttribute,w,Te,Pe);let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:w,forceKeepAttr:void 0},r=t.length,i=Y(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=Y(o),u=c,d=o===`value`?u:st(u);n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,$(S.uponSanitizeAttribute,e,n),d=n.attrValue,Re&&(l===`id`||l===`name`)&&ot(d,ze)!==0&&(nn(o,e),d=ze+d),O&&U(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)||l===`attributename`&&it(d,`href`)?nn(o,e):n.forceKeepAttr||(n.keepAttr?!je&&U(Vt,d)?nn(o,e):(D&&(d=ln(d)),vn(i,l,d)?(d=xn(i,l,s,d),d!==u&&Sn(e,o,s,d)):nn(o,e)):nn(o,e))}$(S.afterSanitizeAttributes,e,null)},wn=function(e){let t=null,n=cn(e);for($(S.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(S.uponSanitizeShadowNode,t,null),_n(t,e),Cn(t),fn(t.content)&&wn(t.content),(g?g(t):t.nodeType)===J.element){let e=te(t);fn(e)&&(Tn(e),wn(e))}$(S.afterSanitizeShadowDOM,e,null)},Tn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){wn(e.shadow);continue}let n=e.node,r=(g?g(n):n.nodeType)===J.element,i=m(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=_?_(n):null;if(typeof e==`string`&&Y(e)===`template`){let e=n.content;fn(e)&&t.push({node:e,shadow:null})}}if(r){let e=te(n);fn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ye=!e,Ye&&(e=`<!-->`),typeof e!=`string`&&!pn(e)&&(e=ht(e),typeof e!=`string`))throw ft(`dirty is not a string, aborting`);if(!t.isSupported)return e;Me?(C=Ne,w=Pe):Yt(n),(S.uponSanitizeElement.length>0||S.uponSanitizeAttribute.length>0)&&(C=K(C)),S.uponSanitizeAttribute.length>0&&(w=K(w)),t.removed=[];let c=N&&typeof e!=`string`&&pn(e);if(c){on(e);let t=_?_(e):e.nodeName;if(typeof t==`string`){let n=Y(t);if(!C[n]||Ee[n])throw tn(e),ft(`root node is forbidden and cannot be sanitized in-place`)}if(dn(e))throw tn(e),ft(`root node is clobbered and cannot be sanitized in-place`);try{Tn(e)}catch(t){throw tn(e),t}}else if(pn(e))i=sn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===J.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Tn(a);else{if(!A&&!D&&!k&&e.indexOf(`<`)===-1)return y&&Le?x(e):e;if(i=sn(e),!i)return A?null:Le?b:``}i&&Fe&&Q(i.firstChild);let l=c?e:i;try{let e=cn(l);for(;o=e.nextNode();)_n(o,l),Cn(o),fn(o.content)&&wn(o.content)}catch(n){throw c&&(tn(e),Ze(t.removed,e=>{e.element&&an(e.element)})),n}if(c)return Ze(t.removed,e=>{e.element&&an(e.element)}),D&&un(e),e;if(A){if(D&&un(i),Ie)for(s=fe.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(w.shadowroot||w.shadowrootmode)&&(s=me.call(r,s,!0)),s}let u=k?i.outerHTML:i.innerHTML;return k&&C[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&U(It,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
42
42
  `+u),D&&(u=ln(u)),y&&Le?x(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yt(e),Me=!0,Ne=C,Pe=w},t.clearConfig=function(){X=null,Me=!1,Ne=null,Pe=null,y=re,b=``},t.isValidAttribute=function(e,t,n){X||Yt({});let r=Y(e),i=Y(t);return vn(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&V(S,e)&&et(S[e],t)},t.removeHook=function(e,t){if(V(S,e)){if(t!==void 0){let n=Qe(S[e],t);return n===-1?void 0:tt(S[e],n,1)[0]}return $e(S[e])}},t.removeHooks=function(e){V(S,e)&&(S[e]=[])},t.removeAllHooks=function(){S=Wt()},t}var Y=Kt();const X=/^\s*\|?[\s:|-]*-[\s:|-]*$/,qt=e=>e.includes(`|`),Jt=e=>{let t=e.trim();return t.startsWith(`|`)&&(t=t.slice(1)),t.endsWith(`|`)&&(t=t.slice(0,-1)),t.split(`|`).map(e=>e.trim())},Yt=e=>`| ${e.join(` | `)} |`,Xt=e=>`| ${Array.from({length:e},()=>`---`).join(` | `)} |`,Zt=(e,t)=>e.length>=t?e.slice(0,t):e.concat(Array.from({length:t-e.length},()=>``)),Qt=e=>{if(!e||!e.includes(`|`))return e;let t=e.split(`
43
43
  `),n=!1;for(let e=0;e<t.length-1;e++){let r=t[e],i=t[e+1];if(!qt(r)||X.test(r)||!X.test(i))continue;let a=Jt(r).length;if(a<1)continue;let o=Xt(a);t[e+1]!==o&&(t[e+1]=o,n=!0);let s=e+2;for(;s<t.length;s++){let e=t[s];if(e.trim()===``||!qt(e))break;let r=Yt(Zt(Jt(e),a));t[s]!==r&&(t[s]=r,n=!0)}e=s-1}return n?t.join(`
44
44
  `):e},Z=e=>!e||/\s/.test(e),$t=e=>!!e&&/[\p{P}\p{S}]/u.test(e),en=(e,t,n)=>{let r=e.slice(t,n),i=n;for(;(i=e.indexOf(r,i))!==-1;){if(e[i-1]!=="`"&&e[i+r.length]!=="`")return i+r.length;i+=r.length}return-1},Q=(e,t=!0)=>{let n=[],r=/* @__PURE__ */ new Set,i=``;for(let a=0;a<e.length;){let o=e[a];if(o===`\\`)i+=e.slice(a,a+2),a+=2;else if(o==="`"){let t=a+1;for(;e[t]==="`";)t++;let n=e.slice(a,t),r=en(e,a,t);if(r!==-1)i+=e.slice(a,r),a=r;else{let r=e.slice(t);i+=r?`${n}${r}${r.endsWith("`")?` `:``}${n}`:``,a=e.length}}else if(o===`<`){let t=e.indexOf(`>`,a+1);i+=e.slice(a,t<0?e.length:t+1),a=t<0?e.length:t+1}else if(t&&(o===`[`||o===`!`&&e[a+1]===`[`)){let t=o===`!`,n=a+(t?2:1),r=1,s=n;for(;s<e.length;s++)if(e[s]===`\\`)s++;else if(e[s]==="`"){let t=s+1;for(;e[t]==="`";)t++;let n=en(e,s,t);s=(n<0?t:n)-1}else if(e[s]===`[`&&r++,e[s]===`]`&&--r===0)break;if(s>=e.length){i+=t?``:Q(e.slice(n),!1);break}if(e[s+1]===`(`){let r=1,o=``,c=!1,l=s+2;for(;l<e.length;l++){let t=e[l];if(t===`\\`)l++;else if(o)t===o&&(o=``);else if((t===`"`||t===`'`)&&Z(e[l-1]))o=t;else if(t===`<`&&(c=!0),t===`>`&&(c=!1),!c&&t===`(`&&r++,!c&&t===`)`&&--r===0)break}if(l>=e.length){i+=t?``:Q(e.slice(n,s),!1);break}i+=e.slice(a,l+1),a=l+1;continue}if(s===e.length-1){i+=t?``:Q(e.slice(n,s),!1);break}i+=e.slice(a,s+1),a=s+1}else if(o===`*`||o===`_`){let t=a+1;for(;e[t]===o;)t++;let s=e.slice(a,t),c=e[a-1]??``,l=e[t]??``,u=!Z(l)&&(!$t(l)||Z(c)||$t(c)),d=!Z(c)&&(!$t(c)||Z(l)||$t(l)),f=s.length;if(d&&(o!==`_`||!u||$t(l)))for(;f&&n[n.length-1]?.marker[0]===o;){let e=n[n.length-1],t=Math.min(f,e.marker.length);f-=t,e.marker=e.marker.slice(t),e.marker||n.pop()}if(f&&s.length<=3&&u&&!d)n.push({marker:o.repeat(f)});else if(f===s.length&&t===e.length&&Z(c)&&e.slice(e.lastIndexOf(`
@@ -1,5 +1,18 @@
1
- import { Ct as AgentWidgetMessage, Dt as AgentWidgetMessageLayoutConfig, Et as AgentWidgetMessageFeedback, Ot as AgentWidgetMessageRole, bo as MessageGeometryTokens, k as AgentWidgetConfig, wt as AgentWidgetMessageActionsConfig, xi as LoadingIndicatorRenderContext } from "./types-B_mj21jg.js";
2
- //#region src/components/message-bubble.d.ts
1
+ import { Ct as AgentWidgetMessage, Dt as AgentWidgetMessageLayoutConfig, Et as AgentWidgetMessageFeedback, Ot as AgentWidgetMessageRole, bo as MessageGeometryTokens, k as AgentWidgetConfig, wt as AgentWidgetMessageActionsConfig, xi as LoadingIndicatorRenderContext } from "./types-BC7MRxO5.cjs";
2
+ /**
3
+ * - `fit`: not measured yet, or short enough; no toggle.
4
+ * - `live`: an interim voice transcript; expanded so the speaker can watch it.
5
+ * - `settling`: the transcript's first final render, still expanded; the
6
+ * post-morph measurement settles it in the same pass, holding the viewport.
7
+ * - `collapsed` / `expanded`: overflowing, with the toggle.
8
+ */
9
+ type UserMessageCollapseState = "fit" | "live" | "settling" | "collapsed" | "expanded";
10
+ type UserMessageCollapseRender = {
11
+ state: UserMessageCollapseState;
12
+ maxHeight: number;
13
+ showMoreLabel: string;
14
+ showLessLabel: string;
15
+ };
3
16
  type LoadingIndicatorRenderer = (context: LoadingIndicatorRenderContext) => HTMLElement | null;
4
17
  type MessageTransform = (context: {
5
18
  text: string;
@@ -66,6 +79,11 @@ type CreateStandardBubbleOptions = {
66
79
  * Full widget config (needed for loading indicator context)
67
80
  */
68
81
  widgetConfig?: AgentWidgetConfig;
82
+ /**
83
+ * Long user message collapse (`features.userMessageCollapse`). When set on
84
+ * a user bubble, its content is wrapped in a clip region with the toggle.
85
+ */
86
+ userCollapse?: UserMessageCollapseRender;
69
87
  };
70
88
  /**
71
89
  * Create standard message bubble
@@ -77,6 +95,5 @@ declare const createStandardBubble: (message: AgentWidgetMessage, transform: Mes
77
95
  * Uses custom renderer if provided in layout config, otherwise falls back to standard bubble
78
96
  */
79
97
  declare const createBubbleWithLayout: (message: AgentWidgetMessage, transform: MessageTransform, layoutConfig?: AgentWidgetMessageLayoutConfig, actionsConfig?: AgentWidgetMessageActionsConfig, actionCallbacks?: MessageActionCallbacks, options?: CreateStandardBubbleOptions) => HTMLElement;
80
- //#endregion
81
98
  export { applyBubbleGeometry as a, createStandardBubble as c, renderLoadingIndicatorWithFallback as d, MessageTransform as i, createTypingIndicator as l, LoadingIndicatorRenderer as n, createBubbleWithLayout as o, MessageActionCallbacks as r, createMessageActions as s, CreateStandardBubbleOptions as t, getBubbleClasses as u };
82
99
  export {}
@@ -1,5 +1,18 @@
1
- import { Ct as AgentWidgetMessage, Dt as AgentWidgetMessageLayoutConfig, Et as AgentWidgetMessageFeedback, Ot as AgentWidgetMessageRole, bo as MessageGeometryTokens, k as AgentWidgetConfig, wt as AgentWidgetMessageActionsConfig, xi as LoadingIndicatorRenderContext } from "./types-B_mj21jg.cjs";
2
- //#region src/components/message-bubble.d.ts
1
+ import { Ct as AgentWidgetMessage, Dt as AgentWidgetMessageLayoutConfig, Et as AgentWidgetMessageFeedback, Ot as AgentWidgetMessageRole, bo as MessageGeometryTokens, k as AgentWidgetConfig, wt as AgentWidgetMessageActionsConfig, xi as LoadingIndicatorRenderContext } from "./types-BC7MRxO5.js";
2
+ /**
3
+ * - `fit`: not measured yet, or short enough; no toggle.
4
+ * - `live`: an interim voice transcript; expanded so the speaker can watch it.
5
+ * - `settling`: the transcript's first final render, still expanded; the
6
+ * post-morph measurement settles it in the same pass, holding the viewport.
7
+ * - `collapsed` / `expanded`: overflowing, with the toggle.
8
+ */
9
+ type UserMessageCollapseState = "fit" | "live" | "settling" | "collapsed" | "expanded";
10
+ type UserMessageCollapseRender = {
11
+ state: UserMessageCollapseState;
12
+ maxHeight: number;
13
+ showMoreLabel: string;
14
+ showLessLabel: string;
15
+ };
3
16
  type LoadingIndicatorRenderer = (context: LoadingIndicatorRenderContext) => HTMLElement | null;
4
17
  type MessageTransform = (context: {
5
18
  text: string;
@@ -66,6 +79,11 @@ type CreateStandardBubbleOptions = {
66
79
  * Full widget config (needed for loading indicator context)
67
80
  */
68
81
  widgetConfig?: AgentWidgetConfig;
82
+ /**
83
+ * Long user message collapse (`features.userMessageCollapse`). When set on
84
+ * a user bubble, its content is wrapped in a clip region with the toggle.
85
+ */
86
+ userCollapse?: UserMessageCollapseRender;
69
87
  };
70
88
  /**
71
89
  * Create standard message bubble
@@ -77,6 +95,5 @@ declare const createStandardBubble: (message: AgentWidgetMessage, transform: Mes
77
95
  * Uses custom renderer if provided in layout config, otherwise falls back to standard bubble
78
96
  */
79
97
  declare const createBubbleWithLayout: (message: AgentWidgetMessage, transform: MessageTransform, layoutConfig?: AgentWidgetMessageLayoutConfig, actionsConfig?: AgentWidgetMessageActionsConfig, actionCallbacks?: MessageActionCallbacks, options?: CreateStandardBubbleOptions) => HTMLElement;
80
- //#endregion
81
98
  export { applyBubbleGeometry as a, createStandardBubble as c, renderLoadingIndicatorWithFallback as d, MessageTransform as i, createTypingIndicator as l, LoadingIndicatorRenderer as n, createBubbleWithLayout as o, MessageActionCallbacks as r, createMessageActions as s, CreateStandardBubbleOptions as t, getBubbleClasses as u };
82
99
  export {}
@@ -1,4 +1,3 @@
1
- //#region src/plugin-kit.d.ts
2
1
  declare function getStyleRoot(node: Node): Document | ShadowRoot;
3
2
  /**
4
3
  * Inject a plugin's CSS once into the correct root: the widget's shadow root
@@ -110,6 +109,5 @@ declare function createPopover(options: PopoverOptions): PopoverHandle;
110
109
  * Shadow-DOM boundary (where `event.target` is retargeted to the host).
111
110
  */
112
111
  declare function isEditableEventTarget(event: Event): boolean;
113
- //#endregion
114
112
  export { getStyleRoot as a, createPopover as i, PopoverOptions as n, injectStyles as o, PopoverPlacement as r, isEditableEventTarget as s, PopoverHandle as t };
115
113
  export {}
@@ -1,4 +1,3 @@
1
- //#region src/plugin-kit.d.ts
2
1
  declare function getStyleRoot(node: Node): Document | ShadowRoot;
3
2
  /**
4
3
  * Inject a plugin's CSS once into the correct root: the widget's shadow root
@@ -110,6 +109,5 @@ declare function createPopover(options: PopoverOptions): PopoverHandle;
110
109
  * Shadow-DOM boundary (where `event.target` is retargeted to the host).
111
110
  */
112
111
  declare function isEditableEventTarget(event: Event): boolean;
113
- //#endregion
114
112
  export { getStyleRoot as a, createPopover as i, PopoverOptions as n, injectStyles as o, PopoverPlacement as r, isEditableEventTarget as s, PopoverHandle as t };
115
113
  export {}
@@ -1,3 +1,3 @@
1
- import { a as getStyleRoot, i as createPopover, n as PopoverOptions, o as injectStyles, r as PopoverPlacement, s as isEditableEventTarget, t as PopoverHandle } from "./plugin-kit-C1mRjLgW.cjs";
1
+ import { a as getStyleRoot, i as createPopover, n as PopoverOptions, o as injectStyles, r as PopoverPlacement, s as isEditableEventTarget, t as PopoverHandle } from "./plugin-kit-BVggqE3C.cjs";
2
2
  export { PopoverHandle, PopoverOptions, PopoverPlacement, createPopover, getStyleRoot, injectStyles, isEditableEventTarget };
3
3
  export {}
@@ -1,3 +1,3 @@
1
- import { a as getStyleRoot, i as createPopover, n as PopoverOptions, o as injectStyles, r as PopoverPlacement, s as isEditableEventTarget, t as PopoverHandle } from "./plugin-kit-C1mRjLgW.js";
1
+ import { a as getStyleRoot, i as createPopover, n as PopoverOptions, o as injectStyles, r as PopoverPlacement, s as isEditableEventTarget, t as PopoverHandle } from "./plugin-kit-BVggqE3C.js";
2
2
  export { PopoverHandle, PopoverOptions, PopoverPlacement, createPopover, getStyleRoot, injectStyles, isEditableEventTarget };
3
3
  export {}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){return e===`card`?`collapsed`:e}function t(e){return e.split(`;`,1)[0].trim().toLowerCase()}const n=[`__proto__`,`prototype`,`constructor`],r=[`collapsed`,`card`,`panel`,`inline`],i=[`markdown`,`component`],a=/^[a-z0-9][a-z0-9!#$&^_.+-]*\/(\*|[a-z0-9!#$&^_.+-]+)$/,o=e=>typeof e==`object`&&!!e&&!Array.isArray(e),s=e=>!n.includes(e),c=e=>r.includes(e),l=e=>Object.keys(e).length>0;function u(e,t,n,r){e.push({path:t,code:n,message:r})}const d=`Ignored an unsupported value.`,f={kind:`mode`},p={kind:`string`,message:`Expected a CSS length string.`},m={kind:`boolean`},h=(...e)=>({kind:`value`,accepts:t=>e.includes(t)}),g={paneWidth:p,paneMaxWidth:p,paneMinWidth:p,expandedPanelWidth:p,resizableMinWidth:p,resizableMaxWidth:p,expandLauncherPanelWhenOpen:m,resizable:m},_={kind:`object`,message:`Expected a preference object.`,children:{showToolCalls:m,showReasoning:m,toolCallDisplay:{kind:`object`,children:{layout:h(`row`,`card`),collapsedMode:h(`tool-call`,`tool-name`,`tool-preview`),groupedMode:h(`stack`,`summary`,`collapsible`),groupAppearance:h(`plain`,`inset`),groupSummary:h(`current-action`,`aggregate`),groupBoundary:h(`adjacent`,`iteration`),groupSummaryMaxItems:{kind:`value`,accepts:e=>Number.isInteger(e)&&e>=0},loadingAnimation:h(`none`,`pulse`,`shimmer`,`shimmer-color`,`rainbow`),expandable:m,grouped:m}},reasoningDisplay:{kind:`object`,children:{layout:h(`row`,`card`),appearance:h(`plain`,`inset`,`panel`),expandable:m,activePreview:m}},artifacts:{kind:`object`,children:{display:{kind:`object`,bareMode:!0,message:`Expected an artifact display rules object.`,children:{default:f,files:{kind:`object`,bareMode:!0,message:`Expected collapsed, panel, inline, or a file display rules object.`,children:{default:f,byMediaType:{kind:`modeMap`,keys:`mediaType`}}},byType:{kind:`modeMap`,keys:i,alias:`byKind`,deprecated:`Use byKind. The legacy selector was normalized automatically.`},byKind:{kind:`modeMap`,keys:i}}},filePreview:{kind:`object`,children:{enabled:m}},layout:{kind:`object`,children:g}}}}};function v(n,r,i,f){if(n!==void 0)switch(r.kind){case`boolean`:return typeof n==`boolean`?n:u(f,i,`invalid_type`,`Expected a boolean.`);case`string`:return typeof n==`string`?n:u(f,i,`invalid_type`,r.message);case`value`:return r.accepts(n)?n:u(f,i,`invalid_value`,d);case`mode`:return c(n)?e(n):u(f,i,`invalid_value`,d);case`modeMap`:{if(!o(n))return u(f,i,`invalid_type`,`Expected an object.`);let d=r.keys===`mediaType`?void 0:r.keys,p={};for(let[r,o]of Object.entries(n)){let n=d?r:t(r);s(r)&&(d?d.includes(r):a.test(n))?c(o)?p[n]=e(o):u(f,`${i}.${r}`,`invalid_value`,`Expected collapsed, panel, or inline.`):u(f,`${i}.${r}`,d?`unknown_key`:`invalid_value`,d?`Ignored an unsupported selector.`:`Expected a MIME type such as "text/html" or a wildcard such as "image/*".`)}return l(p)?p:void 0}case`object`:{if(r.bareMode&&c(n))return e(n);if(!o(n))return u(f,i,`invalid_type`,r.message??`Expected an object.`);let t=Object.keys(r.children),a=e=>i?`${i}.${e}`:e;for(let e of Object.keys(n))(!s(e)||!t.includes(e))&&u(f,a(e),`unknown_key`,`Ignored because this key is not part of the persisted preference schema.`);let d={};for(let e of t){let t=r.children[e],i=v(n[e],t,a(e),f);if(t.deprecated&&n[e]!==void 0&&u(f,a(e),`deprecated_key`,t.deprecated),i===void 0)continue;let s=t.alias??e,c=d[s];d[s]=o(c)&&o(i)?{...c,...i}:i}return l(d)?d:void 0}}}function y(e){let t=[];return{preferences:(e===null?void 0:v(e,_,``,t))??{},issues:t}}function b(e){if(Array.isArray(e))return e.map(b);if(!o(e))return e;let t={};for(let[n,r]of Object.entries(e))s(n)&&r!==void 0&&(t[n]=b(r));return t}function x(e,t){let n=b(e);for(let[e,r]of Object.entries(t)){if(!s(e)||r===void 0)continue;let t=n[e];n[e]=o(t)&&o(r)?x(t,r):b(r)}return n}function S(e){let t={},n;for(let r of e){let e=y(r).preferences;n=w(n,e.artifacts?.display),t=x(t,e)}let r=t;return r.artifacts&&(n===void 0?delete r.artifacts.display:r.artifacts.display=n),r}function C(e,t){if(t===void 0)return b(e);if(typeof t==`string`)return t;let n=typeof e==`string`?{default:e}:e??{},r=t.default??n.default,i={...n.byMediaType,...t.byMediaType},a={...r?{default:r}:{},...l(i)?{byMediaType:i}:{}};return l(a)?a:void 0}function w(e,t){if(t===void 0)return b(e);if(typeof t==`string`)return t;let n=typeof e==`string`?{default:e}:e??{},r=t.default??n.default,i={...n.byType,...n.byKind,...t.byType,...t.byKind},a=C(n.files,t.files),o={...r?{default:r}:{},...l(i)?{byKind:i}:{},...a===void 0?{}:{files:a}};return l(o)?o:void 0}function T(e={},t){let n=S(t),r={...e};for(let e of[`showToolCalls`,`showReasoning`])n[e]!==void 0&&(r[e]=n[e]);for(let t of[`toolCallDisplay`,`reasoningDisplay`])n[t]&&Object.assign(r,{[t]:{...e[t],...n[t]}});if(n.artifacts){let t=e.artifacts??{},i={...t};if(n.artifacts.display!==void 0){let e=w(t.display,n.artifacts.display);e!==void 0&&(i.display=e)}for(let e of[`filePreview`,`layout`])n.artifacts[e]&&(i[e]={...t[e],...n.artifacts[e]});r.artifacts=i}return r}exports.applyFeaturePreferences=T;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){return e===`card`?`collapsed`:e}function t(e){return e.split(`;`,1)[0].trim().toLowerCase()}const n=[`__proto__`,`prototype`,`constructor`],r=[`collapsed`,`card`,`panel`,`inline`],i=[`markdown`,`component`],a=/^[a-z0-9][a-z0-9!#$&^_.+-]*\/(\*|[a-z0-9!#$&^_.+-]+)$/,o=e=>typeof e==`object`&&!!e&&!Array.isArray(e),s=e=>!n.includes(e),c=e=>r.includes(e),l=e=>Object.keys(e).length>0;function u(e,t,n,r){e.push({path:t,code:n,message:r})}const d=`Ignored an unsupported value.`,f={kind:`mode`},p={kind:`string`,message:`Expected a CSS length string.`},m={kind:`boolean`},h=(...e)=>({kind:`value`,accepts:t=>e.includes(t)}),g={paneWidth:p,paneMaxWidth:p,paneMinWidth:p,expandedPanelWidth:p,resizableMinWidth:p,resizableMaxWidth:p,expandLauncherPanelWhenOpen:m,resizable:m},_={kind:`object`,message:`Expected a preference object.`,children:{showToolCalls:m,showReasoning:m,toolCallDisplay:{kind:`object`,children:{layout:h(`row`,`card`),collapsedMode:h(`tool-call`,`tool-name`,`tool-preview`),groupedMode:h(`stack`,`summary`,`collapsible`),groupAppearance:h(`plain`,`inset`),groupSummary:h(`current-action`,`aggregate`),groupBoundary:h(`adjacent`,`iteration`),groupSummaryMaxItems:{kind:`value`,accepts:e=>Number.isInteger(e)&&e>=0},loadingAnimation:h(`none`,`pulse`,`shimmer`,`shimmer-color`,`rainbow`),expandable:m,grouped:m}},reasoningDisplay:{kind:`object`,children:{layout:h(`row`,`card`),appearance:h(`plain`,`inset`,`panel`),expandable:m,activePreview:m}},artifacts:{kind:`object`,children:{display:{kind:`object`,bareMode:!0,message:`Expected an artifact display rules object.`,children:{default:f,files:{kind:`object`,bareMode:!0,message:`Expected collapsed, panel, inline, or a file display rules object.`,children:{default:f,byMediaType:{kind:`modeMap`,keys:`mediaType`}}},byType:{kind:`modeMap`,keys:i,alias:`byKind`,deprecated:`Use byKind. The legacy selector was normalized automatically.`},byKind:{kind:`modeMap`,keys:i}}},filePreview:{kind:`object`,children:{enabled:m}},layout:{kind:`object`,children:g}}}}};function v(n,r,i,f){if(n!==void 0)switch(r.kind){case`boolean`:return typeof n==`boolean`?n:u(f,i,`invalid_type`,`Expected a boolean.`);case`string`:return typeof n==`string`?n:u(f,i,`invalid_type`,r.message);case`value`:return r.accepts(n)?n:u(f,i,`invalid_value`,d);case`mode`:return c(n)?e(n):u(f,i,`invalid_value`,d);case`modeMap`:{if(!o(n))return u(f,i,`invalid_type`,`Expected an object.`);let d=r.keys===`mediaType`?void 0:r.keys,p={};for(let[r,o]of Object.entries(n)){let n=d?r:t(r);s(r)&&(d?d.includes(r):a.test(n))?c(o)?p[n]=e(o):u(f,`${i}.${r}`,`invalid_value`,`Expected collapsed, panel, or inline.`):u(f,`${i}.${r}`,d?`unknown_key`:`invalid_value`,d?`Ignored an unsupported selector.`:`Expected a MIME type such as "text/html" or a wildcard such as "image/*".`)}return l(p)?p:void 0}case`object`:{if(r.bareMode&&c(n))return e(n);if(!o(n))return u(f,i,`invalid_type`,r.message??`Expected an object.`);let t=Object.keys(r.children),a=e=>i?`${i}.${e}`:e;for(let e of Object.keys(n))s(e)&&t.includes(e)||u(f,a(e),`unknown_key`,`Ignored because this key is not part of the persisted preference schema.`);let d={};for(let e of t){let t=r.children[e],i=v(n[e],t,a(e),f);if(t.deprecated&&n[e]!==void 0&&u(f,a(e),`deprecated_key`,t.deprecated),i===void 0)continue;let s=t.alias??e,c=d[s];d[s]=o(c)&&o(i)?{...c,...i}:i}return l(d)?d:void 0}}}function y(e){let t=[];return{preferences:(e===null?void 0:v(e,_,``,t))??{},issues:t}}function b(e){if(Array.isArray(e))return e.map(b);if(!o(e))return e;let t={};for(let[n,r]of Object.entries(e))s(n)&&r!==void 0&&(t[n]=b(r));return t}function x(e,t){let n=b(e);for(let[e,r]of Object.entries(t)){if(!s(e)||r===void 0)continue;let t=n[e];n[e]=o(t)&&o(r)?x(t,r):b(r)}return n}function S(e){let t={},n;for(let r of e){let e=y(r).preferences;n=w(n,e.artifacts?.display),t=x(t,e)}let r=t;return r.artifacts&&(n===void 0?delete r.artifacts.display:r.artifacts.display=n),r}function C(e,t){if(t===void 0)return b(e);if(typeof t==`string`)return t;let n=typeof e==`string`?{default:e}:e??{},r=t.default??n.default,i={...n.byMediaType,...t.byMediaType},a={...r?{default:r}:{},...l(i)?{byMediaType:i}:{}};return l(a)?a:void 0}function w(e,t){if(t===void 0)return b(e);if(typeof t==`string`)return t;let n=typeof e==`string`?{default:e}:e??{},r=t.default??n.default,i={...n.byType,...n.byKind,...t.byType,...t.byKind},a=C(n.files,t.files),o={...r?{default:r}:{},...l(i)?{byKind:i}:{},...a===void 0?{}:{files:a}};return l(o)?o:void 0}function T(e={},t){let n=S(t),r={...e};for(let e of[`showToolCalls`,`showReasoning`])n[e]!==void 0&&(r[e]=n[e]);for(let t of[`toolCallDisplay`,`reasoningDisplay`])n[t]&&Object.assign(r,{[t]:{...e[t],...n[t]}});if(n.artifacts){let t=e.artifacts??{},i={...t};if(n.artifacts.display!==void 0){let e=w(t.display,n.artifacts.display);e!==void 0&&(i.display=e)}for(let e of[`filePreview`,`layout`])n.artifacts[e]&&(i[e]={...t[e],...n.artifacts[e]});r.artifacts=i}return r}exports.applyFeaturePreferences=T;
@@ -1,3 +1,3 @@
1
- import { i as applyFeaturePreferences } from "./feature-preferences-DqAmje-2.cjs";
1
+ import { i as applyFeaturePreferences } from "./feature-preferences-CmwZGKrf.cjs";
2
2
  export { applyFeaturePreferences };
3
3
  export {}
@@ -1,3 +1,3 @@
1
- import { i as applyFeaturePreferences } from "./feature-preferences-DqAmje-2.js";
1
+ import { i as applyFeaturePreferences } from "./feature-preferences-CmwZGKrf.js";
2
2
  export { applyFeaturePreferences };
3
3
  export {}
@@ -1 +1 @@
1
- function e(e){return e===`card`?`collapsed`:e}function t(e){return e.split(`;`,1)[0].trim().toLowerCase()}const n=[`__proto__`,`prototype`,`constructor`],r=[`collapsed`,`card`,`panel`,`inline`],i=[`markdown`,`component`],a=/^[a-z0-9][a-z0-9!#$&^_.+-]*\/(\*|[a-z0-9!#$&^_.+-]+)$/,o=e=>typeof e==`object`&&!!e&&!Array.isArray(e),s=e=>!n.includes(e),c=e=>r.includes(e),l=e=>Object.keys(e).length>0;function u(e,t,n,r){e.push({path:t,code:n,message:r})}const d=`Ignored an unsupported value.`,f={kind:`mode`},p={kind:`string`,message:`Expected a CSS length string.`},m={kind:`boolean`},h=(...e)=>({kind:`value`,accepts:t=>e.includes(t)}),g={paneWidth:p,paneMaxWidth:p,paneMinWidth:p,expandedPanelWidth:p,resizableMinWidth:p,resizableMaxWidth:p,expandLauncherPanelWhenOpen:m,resizable:m},_={kind:`object`,message:`Expected a preference object.`,children:{showToolCalls:m,showReasoning:m,toolCallDisplay:{kind:`object`,children:{layout:h(`row`,`card`),collapsedMode:h(`tool-call`,`tool-name`,`tool-preview`),groupedMode:h(`stack`,`summary`,`collapsible`),groupAppearance:h(`plain`,`inset`),groupSummary:h(`current-action`,`aggregate`),groupBoundary:h(`adjacent`,`iteration`),groupSummaryMaxItems:{kind:`value`,accepts:e=>Number.isInteger(e)&&e>=0},loadingAnimation:h(`none`,`pulse`,`shimmer`,`shimmer-color`,`rainbow`),expandable:m,grouped:m}},reasoningDisplay:{kind:`object`,children:{layout:h(`row`,`card`),appearance:h(`plain`,`inset`,`panel`),expandable:m,activePreview:m}},artifacts:{kind:`object`,children:{display:{kind:`object`,bareMode:!0,message:`Expected an artifact display rules object.`,children:{default:f,files:{kind:`object`,bareMode:!0,message:`Expected collapsed, panel, inline, or a file display rules object.`,children:{default:f,byMediaType:{kind:`modeMap`,keys:`mediaType`}}},byType:{kind:`modeMap`,keys:i,alias:`byKind`,deprecated:`Use byKind. The legacy selector was normalized automatically.`},byKind:{kind:`modeMap`,keys:i}}},filePreview:{kind:`object`,children:{enabled:m}},layout:{kind:`object`,children:g}}}}};function v(n,r,i,f){if(n!==void 0)switch(r.kind){case`boolean`:return typeof n==`boolean`?n:u(f,i,`invalid_type`,`Expected a boolean.`);case`string`:return typeof n==`string`?n:u(f,i,`invalid_type`,r.message);case`value`:return r.accepts(n)?n:u(f,i,`invalid_value`,d);case`mode`:return c(n)?e(n):u(f,i,`invalid_value`,d);case`modeMap`:{if(!o(n))return u(f,i,`invalid_type`,`Expected an object.`);let d=r.keys===`mediaType`?void 0:r.keys,p={};for(let[r,o]of Object.entries(n)){let n=d?r:t(r);s(r)&&(d?d.includes(r):a.test(n))?c(o)?p[n]=e(o):u(f,`${i}.${r}`,`invalid_value`,`Expected collapsed, panel, or inline.`):u(f,`${i}.${r}`,d?`unknown_key`:`invalid_value`,d?`Ignored an unsupported selector.`:`Expected a MIME type such as "text/html" or a wildcard such as "image/*".`)}return l(p)?p:void 0}case`object`:{if(r.bareMode&&c(n))return e(n);if(!o(n))return u(f,i,`invalid_type`,r.message??`Expected an object.`);let t=Object.keys(r.children),a=e=>i?`${i}.${e}`:e;for(let e of Object.keys(n))(!s(e)||!t.includes(e))&&u(f,a(e),`unknown_key`,`Ignored because this key is not part of the persisted preference schema.`);let d={};for(let e of t){let t=r.children[e],i=v(n[e],t,a(e),f);if(t.deprecated&&n[e]!==void 0&&u(f,a(e),`deprecated_key`,t.deprecated),i===void 0)continue;let s=t.alias??e,c=d[s];d[s]=o(c)&&o(i)?{...c,...i}:i}return l(d)?d:void 0}}}function y(e){let t=[];return{preferences:(e===null?void 0:v(e,_,``,t))??{},issues:t}}function b(e){if(Array.isArray(e))return e.map(b);if(!o(e))return e;let t={};for(let[n,r]of Object.entries(e))s(n)&&r!==void 0&&(t[n]=b(r));return t}function x(e,t){let n=b(e);for(let[e,r]of Object.entries(t)){if(!s(e)||r===void 0)continue;let t=n[e];n[e]=o(t)&&o(r)?x(t,r):b(r)}return n}function S(e){let t={},n;for(let r of e){let e=y(r).preferences;n=w(n,e.artifacts?.display),t=x(t,e)}let r=t;return r.artifacts&&(n===void 0?delete r.artifacts.display:r.artifacts.display=n),r}function C(e,t){if(t===void 0)return b(e);if(typeof t==`string`)return t;let n=typeof e==`string`?{default:e}:e??{},r=t.default??n.default,i={...n.byMediaType,...t.byMediaType},a={...r?{default:r}:{},...l(i)?{byMediaType:i}:{}};return l(a)?a:void 0}function w(e,t){if(t===void 0)return b(e);if(typeof t==`string`)return t;let n=typeof e==`string`?{default:e}:e??{},r=t.default??n.default,i={...n.byType,...n.byKind,...t.byType,...t.byKind},a=C(n.files,t.files),o={...r?{default:r}:{},...l(i)?{byKind:i}:{},...a===void 0?{}:{files:a}};return l(o)?o:void 0}function T(e={},t){let n=S(t),r={...e};for(let e of[`showToolCalls`,`showReasoning`])n[e]!==void 0&&(r[e]=n[e]);for(let t of[`toolCallDisplay`,`reasoningDisplay`])n[t]&&Object.assign(r,{[t]:{...e[t],...n[t]}});if(n.artifacts){let t=e.artifacts??{},i={...t};if(n.artifacts.display!==void 0){let e=w(t.display,n.artifacts.display);e!==void 0&&(i.display=e)}for(let e of[`filePreview`,`layout`])n.artifacts[e]&&(i[e]={...t[e],...n.artifacts[e]});r.artifacts=i}return r}export{T as applyFeaturePreferences};
1
+ function e(e){return e===`card`?`collapsed`:e}function t(e){return e.split(`;`,1)[0].trim().toLowerCase()}const n=[`__proto__`,`prototype`,`constructor`],r=[`collapsed`,`card`,`panel`,`inline`],i=[`markdown`,`component`],a=/^[a-z0-9][a-z0-9!#$&^_.+-]*\/(\*|[a-z0-9!#$&^_.+-]+)$/,o=e=>typeof e==`object`&&!!e&&!Array.isArray(e),s=e=>!n.includes(e),c=e=>r.includes(e),l=e=>Object.keys(e).length>0;function u(e,t,n,r){e.push({path:t,code:n,message:r})}const d=`Ignored an unsupported value.`,f={kind:`mode`},p={kind:`string`,message:`Expected a CSS length string.`},m={kind:`boolean`},h=(...e)=>({kind:`value`,accepts:t=>e.includes(t)}),g={paneWidth:p,paneMaxWidth:p,paneMinWidth:p,expandedPanelWidth:p,resizableMinWidth:p,resizableMaxWidth:p,expandLauncherPanelWhenOpen:m,resizable:m},_={kind:`object`,message:`Expected a preference object.`,children:{showToolCalls:m,showReasoning:m,toolCallDisplay:{kind:`object`,children:{layout:h(`row`,`card`),collapsedMode:h(`tool-call`,`tool-name`,`tool-preview`),groupedMode:h(`stack`,`summary`,`collapsible`),groupAppearance:h(`plain`,`inset`),groupSummary:h(`current-action`,`aggregate`),groupBoundary:h(`adjacent`,`iteration`),groupSummaryMaxItems:{kind:`value`,accepts:e=>Number.isInteger(e)&&e>=0},loadingAnimation:h(`none`,`pulse`,`shimmer`,`shimmer-color`,`rainbow`),expandable:m,grouped:m}},reasoningDisplay:{kind:`object`,children:{layout:h(`row`,`card`),appearance:h(`plain`,`inset`,`panel`),expandable:m,activePreview:m}},artifacts:{kind:`object`,children:{display:{kind:`object`,bareMode:!0,message:`Expected an artifact display rules object.`,children:{default:f,files:{kind:`object`,bareMode:!0,message:`Expected collapsed, panel, inline, or a file display rules object.`,children:{default:f,byMediaType:{kind:`modeMap`,keys:`mediaType`}}},byType:{kind:`modeMap`,keys:i,alias:`byKind`,deprecated:`Use byKind. The legacy selector was normalized automatically.`},byKind:{kind:`modeMap`,keys:i}}},filePreview:{kind:`object`,children:{enabled:m}},layout:{kind:`object`,children:g}}}}};function v(n,r,i,f){if(n!==void 0)switch(r.kind){case`boolean`:return typeof n==`boolean`?n:u(f,i,`invalid_type`,`Expected a boolean.`);case`string`:return typeof n==`string`?n:u(f,i,`invalid_type`,r.message);case`value`:return r.accepts(n)?n:u(f,i,`invalid_value`,d);case`mode`:return c(n)?e(n):u(f,i,`invalid_value`,d);case`modeMap`:{if(!o(n))return u(f,i,`invalid_type`,`Expected an object.`);let d=r.keys===`mediaType`?void 0:r.keys,p={};for(let[r,o]of Object.entries(n)){let n=d?r:t(r);s(r)&&(d?d.includes(r):a.test(n))?c(o)?p[n]=e(o):u(f,`${i}.${r}`,`invalid_value`,`Expected collapsed, panel, or inline.`):u(f,`${i}.${r}`,d?`unknown_key`:`invalid_value`,d?`Ignored an unsupported selector.`:`Expected a MIME type such as "text/html" or a wildcard such as "image/*".`)}return l(p)?p:void 0}case`object`:{if(r.bareMode&&c(n))return e(n);if(!o(n))return u(f,i,`invalid_type`,r.message??`Expected an object.`);let t=Object.keys(r.children),a=e=>i?`${i}.${e}`:e;for(let e of Object.keys(n))s(e)&&t.includes(e)||u(f,a(e),`unknown_key`,`Ignored because this key is not part of the persisted preference schema.`);let d={};for(let e of t){let t=r.children[e],i=v(n[e],t,a(e),f);if(t.deprecated&&n[e]!==void 0&&u(f,a(e),`deprecated_key`,t.deprecated),i===void 0)continue;let s=t.alias??e,c=d[s];d[s]=o(c)&&o(i)?{...c,...i}:i}return l(d)?d:void 0}}}function y(e){let t=[];return{preferences:(e===null?void 0:v(e,_,``,t))??{},issues:t}}function b(e){if(Array.isArray(e))return e.map(b);if(!o(e))return e;let t={};for(let[n,r]of Object.entries(e))s(n)&&r!==void 0&&(t[n]=b(r));return t}function x(e,t){let n=b(e);for(let[e,r]of Object.entries(t)){if(!s(e)||r===void 0)continue;let t=n[e];n[e]=o(t)&&o(r)?x(t,r):b(r)}return n}function S(e){let t={},n;for(let r of e){let e=y(r).preferences;n=w(n,e.artifacts?.display),t=x(t,e)}let r=t;return r.artifacts&&(n===void 0?delete r.artifacts.display:r.artifacts.display=n),r}function C(e,t){if(t===void 0)return b(e);if(typeof t==`string`)return t;let n=typeof e==`string`?{default:e}:e??{},r=t.default??n.default,i={...n.byMediaType,...t.byMediaType},a={...r?{default:r}:{},...l(i)?{byMediaType:i}:{}};return l(a)?a:void 0}function w(e,t){if(t===void 0)return b(e);if(typeof t==`string`)return t;let n=typeof e==`string`?{default:e}:e??{},r=t.default??n.default,i={...n.byType,...n.byKind,...t.byType,...t.byKind},a=C(n.files,t.files),o={...r?{default:r}:{},...l(i)?{byKind:i}:{},...a===void 0?{}:{files:a}};return l(o)?o:void 0}function T(e={},t){let n=S(t),r={...e};for(let e of[`showToolCalls`,`showReasoning`])n[e]!==void 0&&(r[e]=n[e]);for(let t of[`toolCallDisplay`,`reasoningDisplay`])n[t]&&Object.assign(r,{[t]:{...e[t],...n[t]}});if(n.artifacts){let t=e.artifacts??{},i={...t};if(n.artifacts.display!==void 0){let e=w(t.display,n.artifacts.display);e!==void 0&&(i.display=e)}for(let e of[`filePreview`,`layout`])n.artifacts[e]&&(i[e]={...t[e],...n.artifacts[e]});r.artifacts=i}return r}export{T as applyFeaturePreferences};
@@ -1,6 +1,5 @@
1
- import { Ct as AgentWidgetMessage, So as PersonaTheme, _o as DeepPartial, k as AgentWidgetConfig } from "./types-B_mj21jg.cjs";
2
- import { Tn as AgentWidgetController } from "./session-Bys8_XuB.cjs";
3
- //#region src/theme-editor/preview-utils.d.ts
1
+ import { Ct as AgentWidgetMessage, So as PersonaTheme, _o as DeepPartial, k as AgentWidgetConfig } from "./types-BC7MRxO5.cjs";
2
+ import { Tn as AgentWidgetController } from "./session-CtZHe7fc.cjs";
4
3
  declare const DEVICE_DIMENSIONS: Record<string, {
5
4
  w: number;
6
5
  h: number;
@@ -78,8 +77,6 @@ interface PreviewConfigOptions {
78
77
  }
79
78
  declare function buildPreviewConfig(options: PreviewConfigOptions, shellModeOverride?: 'light' | 'dark'): AgentWidgetConfig;
80
79
  declare function buildPreviewConfigWithMessages(options: PreviewConfigOptions, messages: AgentWidgetMessage[], shellModeOverride?: 'light' | 'dark'): AgentWidgetConfig;
81
- //#endregion
82
- //#region src/theme-editor/preview.d.ts
83
80
  type PreviewDevice = 'desktop' | 'mobile';
84
81
  type PreviewShellMode = 'light' | 'dark';
85
82
  type CompareMode = 'off' | 'baseline' | 'themes';
@@ -143,6 +140,5 @@ interface ThemePreviewHandle {
143
140
  setZoom(zoom: number | undefined): void;
144
141
  }
145
142
  declare function createThemePreview(container: HTMLElement, initialOptions: ThemePreviewOptions): ThemePreviewHandle;
146
- //#endregion
147
143
  export { createPreviewMessages as A, applySceneConfig as C, buildShellCss as D, buildPreviewConfigWithMessages as E, presetStreamsText as F, escapeHtml as M, getPreviewTranscriptPresetLabel as N, buildSrcdoc as O, getShellPalette as P, appendPreviewTranscriptEntry as S, buildPreviewConfig as T, PreviewTranscriptEntryPreset as _, ThemePreviewHandle as a, ZOOM_MAX as b, BuildTranscriptStreamFramesOptions as c, MOCK_BROWSER_CONTENT as d, MOCK_WORKSPACE_CONTENT as f, PreviewShellPalette as g, PreviewScene as h, PreviewShellMode as i, createPreviewTranscriptEntry as j, buildTranscriptStreamFrames as k, DEVICE_DIMENSIONS as l, PreviewConfigOptions as m, PreviewDevice as n, ThemePreviewOptions as o, PREVIEW_STORAGE_ADAPTER as p, PreviewLifecycleContext as r, createThemePreview as s, CompareMode as t, HOME_SUGGESTION_CHIPS as u, SHELL_STYLE_ID as v, applyShellTheme as w, ZOOM_MIN as x, TranscriptStreamFrame as y };
148
144
  export {}
@@ -1,6 +1,5 @@
1
- import { Ct as AgentWidgetMessage, So as PersonaTheme, _o as DeepPartial, k as AgentWidgetConfig } from "./types-B_mj21jg.js";
2
- import { Tn as AgentWidgetController } from "./session-Bys8_XuB.js";
3
- //#region src/theme-editor/preview-utils.d.ts
1
+ import { Ct as AgentWidgetMessage, So as PersonaTheme, _o as DeepPartial, k as AgentWidgetConfig } from "./types-BC7MRxO5.js";
2
+ import { Tn as AgentWidgetController } from "./session-CtZHe7fc.js";
4
3
  declare const DEVICE_DIMENSIONS: Record<string, {
5
4
  w: number;
6
5
  h: number;
@@ -78,8 +77,6 @@ interface PreviewConfigOptions {
78
77
  }
79
78
  declare function buildPreviewConfig(options: PreviewConfigOptions, shellModeOverride?: 'light' | 'dark'): AgentWidgetConfig;
80
79
  declare function buildPreviewConfigWithMessages(options: PreviewConfigOptions, messages: AgentWidgetMessage[], shellModeOverride?: 'light' | 'dark'): AgentWidgetConfig;
81
- //#endregion
82
- //#region src/theme-editor/preview.d.ts
83
80
  type PreviewDevice = 'desktop' | 'mobile';
84
81
  type PreviewShellMode = 'light' | 'dark';
85
82
  type CompareMode = 'off' | 'baseline' | 'themes';
@@ -143,6 +140,5 @@ interface ThemePreviewHandle {
143
140
  setZoom(zoom: number | undefined): void;
144
141
  }
145
142
  declare function createThemePreview(container: HTMLElement, initialOptions: ThemePreviewOptions): ThemePreviewHandle;
146
- //#endregion
147
143
  export { createPreviewMessages as A, applySceneConfig as C, buildShellCss as D, buildPreviewConfigWithMessages as E, presetStreamsText as F, escapeHtml as M, getPreviewTranscriptPresetLabel as N, buildSrcdoc as O, getShellPalette as P, appendPreviewTranscriptEntry as S, buildPreviewConfig as T, PreviewTranscriptEntryPreset as _, ThemePreviewHandle as a, ZOOM_MAX as b, BuildTranscriptStreamFramesOptions as c, MOCK_BROWSER_CONTENT as d, MOCK_WORKSPACE_CONTENT as f, PreviewShellPalette as g, PreviewScene as h, PreviewShellMode as i, createPreviewTranscriptEntry as j, buildTranscriptStreamFrames as k, DEVICE_DIMENSIONS as l, PreviewConfigOptions as m, PreviewDevice as n, ThemePreviewOptions as o, PREVIEW_STORAGE_ADAPTER as p, PreviewLifecycleContext as r, createThemePreview as s, CompareMode as t, HOME_SUGGESTION_CHIPS as u, SHELL_STYLE_ID as v, applyShellTheme as w, ZOOM_MIN as x, TranscriptStreamFrame as y };
148
144
  export {}
@@ -1,8 +1,6 @@
1
- import { D as AgentWidgetComponentRenderer, T as AgentWidgetComponentRenderContext } from "./types-B_mj21jg.js";
1
+ import { D as AgentWidgetComponentRenderer, T as AgentWidgetComponentRenderContext } from "./types-BC7MRxO5.cjs";
2
2
  import { Marked } from "marked";
3
3
  import DOMPurify from "dompurify";
4
- //#endregion
5
- //#region src/markdown-parsers-loader.d.ts
6
4
  type MarkdownParsersModule = {
7
5
  Marked: typeof Marked;
8
6
  DOMPurify: typeof DOMPurify;
@@ -45,8 +43,6 @@ declare const onMarkdownParsersReady: (cb: () => void) => (() => void);
45
43
  * it lazy-loads the `markdown-parsers.js` chunk instead.
46
44
  */
47
45
  declare const provideMarkdownParsers: (mod: MarkdownParsersModule) => void;
48
- //#endregion
49
- //#region src/utils/dropdown.d.ts
50
46
  interface DropdownMenuItem {
51
47
  id: string;
52
48
  label: string;
@@ -347,8 +343,6 @@ interface ComboButtonHandle {
347
343
  * ```
348
344
  */
349
345
  declare function createComboButton(options: CreateComboButtonOptions): ComboButtonHandle;
350
- //#endregion
351
- //#region src/components/registry.d.ts
352
346
  /**
353
347
  * Context provided to component renderers
354
348
  */
@@ -418,6 +412,5 @@ declare class ComponentRegistry {
418
412
  * instead.
419
413
  */
420
414
  declare const componentRegistry: ComponentRegistry;
421
- //#endregion
422
415
  export { loadMarkdownParsers as C, MarkdownParsersModule as S, provideMarkdownParsers as T, createToggleGroup as _, ComboButtonHandle as a, DropdownMenuItem as b, CreateLabelButtonOptions as c, ToggleGroupItem as d, buttons_d_exports as f, createSplitButton as g, createLabelButton as h, componentRegistry as i, CreateToggleGroupOptions as l, createIconButton as m, ComponentRegistrationOptions as n, CreateComboButtonOptions as o, createComboButton as p, ComponentRenderer as r, CreateIconButtonOptions as s, ComponentContext as t, ToggleGroupHandle as u, CreateDropdownOptions as v, onMarkdownParsersReady as w, createDropdownMenu as x, DropdownMenuHandle as y };
423
416
  export {}
@@ -1,8 +1,6 @@
1
- import { D as AgentWidgetComponentRenderer, T as AgentWidgetComponentRenderContext } from "./types-B_mj21jg.cjs";
1
+ import { D as AgentWidgetComponentRenderer, T as AgentWidgetComponentRenderContext } from "./types-BC7MRxO5.js";
2
2
  import { Marked } from "marked";
3
3
  import DOMPurify from "dompurify";
4
- //#endregion
5
- //#region src/markdown-parsers-loader.d.ts
6
4
  type MarkdownParsersModule = {
7
5
  Marked: typeof Marked;
8
6
  DOMPurify: typeof DOMPurify;
@@ -45,8 +43,6 @@ declare const onMarkdownParsersReady: (cb: () => void) => (() => void);
45
43
  * it lazy-loads the `markdown-parsers.js` chunk instead.
46
44
  */
47
45
  declare const provideMarkdownParsers: (mod: MarkdownParsersModule) => void;
48
- //#endregion
49
- //#region src/utils/dropdown.d.ts
50
46
  interface DropdownMenuItem {
51
47
  id: string;
52
48
  label: string;
@@ -347,8 +343,6 @@ interface ComboButtonHandle {
347
343
  * ```
348
344
  */
349
345
  declare function createComboButton(options: CreateComboButtonOptions): ComboButtonHandle;
350
- //#endregion
351
- //#region src/components/registry.d.ts
352
346
  /**
353
347
  * Context provided to component renderers
354
348
  */
@@ -418,6 +412,5 @@ declare class ComponentRegistry {
418
412
  * instead.
419
413
  */
420
414
  declare const componentRegistry: ComponentRegistry;
421
- //#endregion
422
415
  export { loadMarkdownParsers as C, MarkdownParsersModule as S, provideMarkdownParsers as T, createToggleGroup as _, ComboButtonHandle as a, DropdownMenuItem as b, CreateLabelButtonOptions as c, ToggleGroupItem as d, buttons_d_exports as f, createSplitButton as g, createLabelButton as h, componentRegistry as i, CreateToggleGroupOptions as l, createIconButton as m, ComponentRegistrationOptions as n, CreateComboButtonOptions as o, createComboButton as p, ComponentRenderer as r, CreateIconButtonOptions as s, ComponentContext as t, ToggleGroupHandle as u, CreateDropdownOptions as v, onMarkdownParsersReady as w, createDropdownMenu as x, DropdownMenuHandle as y };
423
416
  export {}