@kitn.ai/ui 0.22.0 → 0.22.2

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 (194) hide show
  1. package/dist/{create-tween-qs-jjvNA.js → create-tween-BmBnlg25.js} +1 -1
  2. package/dist/{create-tween-COnPwAQN.js → create-tween-CTT5l1bo.js} +1 -1
  3. package/dist/{create-tween-DmTUaXWE.js → create-tween-vA7upv0h.js} +1 -1
  4. package/dist/elements/agent-card.js +1 -1
  5. package/dist/elements/artifact.js +1 -1
  6. package/dist/elements/attachments.js +1 -1
  7. package/dist/elements/audio-visualizer.js +1 -1
  8. package/dist/elements/avatar.js +1 -1
  9. package/dist/elements/badge.js +1 -1
  10. package/dist/elements/button.js +1 -1
  11. package/dist/elements/card.js +1 -1
  12. package/dist/elements/cards.js +1 -1
  13. package/dist/elements/chain-of-thought.js +1 -1
  14. package/dist/elements/chat-scope-picker.js +1 -1
  15. package/dist/elements/chat-workspace.js +1 -1
  16. package/dist/elements/chat.js +1 -1
  17. package/dist/elements/checkpoint.js +1 -1
  18. package/dist/elements/choice.js +1 -1
  19. package/dist/elements/chunks/{Icon-CHG5z5L7.js → Icon-b5A8hlHs.js} +1 -1
  20. package/dist/elements/chunks/{action-icons-BAtCEEgg.js → action-icons-DW9muWrY.js} +1 -1
  21. package/dist/elements/chunks/arrow-left-iJVnQmxA.js +1 -0
  22. package/dist/elements/chunks/{artifact-fBZOE4SO.js → artifact-BhJIuh3D.js} +1 -1
  23. package/dist/elements/chunks/{attachments-DpYMe5VQ.js → attachments-CL6TaqIb.js} +1 -1
  24. package/dist/elements/chunks/{audio-visualizer-DFwzAcuL.js → audio-visualizer-BuUqQmaO.js} +1 -1
  25. package/dist/elements/chunks/{badge-D6zodm6E.js → badge-TIMiJFKc.js} +1 -1
  26. package/dist/elements/chunks/{button-C42vrGvO.js → button-B9okqG73.js} +1 -1
  27. package/dist/elements/chunks/{card-renderer-DMZsSuvU.js → card-renderer-aNA0WRFH.js} +1 -1
  28. package/dist/elements/chunks/{chat-thread-CNNEhol-.js → chat-thread-DN9evldr.js} +1 -1
  29. package/dist/elements/chunks/check-MdLzbxrm.js +1 -0
  30. package/dist/elements/chunks/chevron-down-MK7IzDqe.js +1 -0
  31. package/dist/elements/chunks/chevron-right-C5jXhmtV.js +1 -0
  32. package/dist/elements/chunks/{choice-card-YoWjpsFV.js → choice-card-kNsjU2m8.js} +1 -1
  33. package/dist/elements/chunks/circle-BG7VkPep.js +1 -0
  34. package/dist/elements/chunks/circle-check-GqvO2UBs.js +1 -0
  35. package/dist/elements/chunks/{circle-x-QIxXda6k.js → circle-x-mhH7pOK2.js} +1 -1
  36. package/dist/elements/chunks/{code-block-CqeugReY.js → code-block-ClhQO9RW.js} +1 -1
  37. package/dist/elements/chunks/{collapsible-sTv-_5lF.js → collapsible-DBcBkFPh.js} +1 -1
  38. package/dist/elements/chunks/{composer-ldQyeVEB.js → composer-CZZmtYOT.js} +1 -1
  39. package/dist/elements/chunks/{confirm-card-C0RNOwfn.js → confirm-card-CEvFmVhz.js} +1 -1
  40. package/dist/elements/chunks/{context-5qgypNHC.js → context-hKjNqiyQ.js} +1 -1
  41. package/dist/elements/chunks/{conversation-list-DLzOacXz.js → conversation-list-CsGJjSKG.js} +1 -1
  42. package/dist/elements/chunks/{create-tween-V4TXZ93X.js → create-tween-CUrM6D_o.js} +1 -1
  43. package/dist/elements/chunks/{default-input-DeeRSDHc.js → default-input-B1Mem5wu.js} +1 -1
  44. package/dist/elements/chunks/{define-lE-QvQFn.js → define-B_tXMYRm.js} +1 -1
  45. package/dist/elements/chunks/{disclosure-DZSa9jog.js → disclosure-DAoYOKew.js} +1 -1
  46. package/dist/elements/chunks/{download-B2ZmnGqW.js → download-DnCyWFJE.js} +1 -1
  47. package/dist/elements/chunks/{dropdown-R3B7cSRE.js → dropdown-CmNna5lT.js} +1 -1
  48. package/dist/elements/chunks/{ellipsis-BmxceY4l.js → ellipsis-CVxqfsDZ.js} +1 -1
  49. package/dist/elements/chunks/{embed-BVrtTZPo.js → embed-CjAD2jSi.js} +1 -1
  50. package/dist/elements/chunks/{external-link-BbdR7YO7.js → external-link-DG2sRdQL.js} +1 -1
  51. package/dist/elements/chunks/{file-text-D7dijo1A.js → file-text-D0J9F6M7.js} +1 -1
  52. package/dist/elements/chunks/file-tree-yGWNK0Js.js +1 -0
  53. package/dist/elements/chunks/{folder-D8z58t7B.js → folder-NV1pi_ud.js} +1 -1
  54. package/dist/elements/chunks/{form-p5BKJNw5.js → form-lUuJjz6s.js} +1 -1
  55. package/dist/elements/chunks/{hover-card-CN9s2md5.js → hover-card-6KtXpLwT.js} +1 -1
  56. package/dist/elements/chunks/{icon-CNiKP37E.js → icon-97R8SR2p.js} +1 -1
  57. package/dist/elements/chunks/{info-BSnuJiHI.js → info-C8r5Q6cc.js} +1 -1
  58. package/dist/elements/chunks/{input-BauDmzxX.js → input-DrseEjhp.js} +1 -1
  59. package/dist/elements/chunks/{kbd-BlHJaP9b.js → kbd-OGJDUT-O.js} +1 -1
  60. package/dist/elements/chunks/{link-DEi5iUWC.js → link-BdsfLB7b.js} +1 -1
  61. package/dist/elements/chunks/{link-preview-BaHyM6W4.js → link-preview-C9-jNJBf.js} +1 -1
  62. package/dist/elements/chunks/{loader-CmJG_Fkq.js → loader-B5QzK_8_.js} +1 -1
  63. package/dist/elements/chunks/{markdown-D2jaMpCN.js → markdown-BpAHnBJz.js} +1 -1
  64. package/dist/elements/chunks/{message-C5UfXZ2Z.js → message-CoqLuLkd.js} +1 -1
  65. package/dist/elements/chunks/{message-CXWLmmLn.js → message-_oYx5mk1.js} +1 -1
  66. package/dist/elements/chunks/message-square-C9ovmtOo.js +1 -0
  67. package/dist/elements/chunks/{minimize-2-C9ytZFMU.js → minimize-2-SegJ_oku.js} +1 -1
  68. package/dist/elements/chunks/{model-switcher-CivGfD7-.js → model-switcher-D7JrFFHp.js} +1 -1
  69. package/dist/elements/chunks/{overlay-DJL_sbOm.js → overlay-CV7z2YuX.js} +1 -1
  70. package/dist/elements/chunks/{paperclip-CFaB8naM.js → paperclip-Bg0ITU3b.js} +1 -1
  71. package/dist/elements/chunks/{progress-bar-Br5SksfR.js → progress-bar-D1_rzt6N.js} +1 -1
  72. package/dist/elements/chunks/{prompt-suggestion-CMIvtAhU.js → prompt-suggestion-D5Sm8xF1.js} +1 -1
  73. package/dist/elements/chunks/{reasoning-DpZcNzLq.js → reasoning-D26Bb4p6.js} +1 -1
  74. package/dist/elements/chunks/{resizable-Q8i3T9a_.js → resizable-Dpzjlvp4.js} +1 -1
  75. package/dist/elements/chunks/{rotate-cw-B5IHCBFV.js → rotate-cw-DzVDJOA1.js} +1 -1
  76. package/dist/elements/chunks/{scroll-area-eLeydBje.js → scroll-area-93A1bbeG.js} +1 -1
  77. package/dist/elements/chunks/{scroll-button-DWbz0yA1.js → scroll-button-CrTo7wm4.js} +1 -1
  78. package/dist/elements/chunks/{separator-Xic78AD_.js → separator-DH2r_ZSZ.js} +1 -1
  79. package/dist/elements/chunks/{settings-B8H51pAx.js → settings-BFMOd6yB.js} +1 -1
  80. package/dist/elements/chunks/{settings-group-CsG9eYLe.js → settings-group-B3VZKIcz.js} +1 -1
  81. package/dist/elements/chunks/{share-CNTx0z__.js → share-DgNbkJKY.js} +1 -1
  82. package/dist/elements/chunks/{skeleton-CLlHTcMI.js → skeleton-N8BuWYmf.js} +1 -1
  83. package/dist/elements/chunks/{source-BoVcU5ok.js → source-eJurW_-L.js} +1 -1
  84. package/dist/elements/chunks/{star-CxQVTVhI.js → star-DHvACxtm.js} +1 -1
  85. package/dist/elements/chunks/{store-CLtS5CUG.js → store-HIPGhNz9.js} +1 -1
  86. package/dist/elements/chunks/{tasks-card-CzlkLmUt.js → tasks-card-CfqrkoVO.js} +1 -1
  87. package/dist/elements/chunks/{text-shimmer-D5NhpIQ1.js → text-shimmer-BY_rI3s5.js} +1 -1
  88. package/dist/elements/chunks/{textarea-x5Uxsmtm.js → textarea-DPfuhswM.js} +1 -1
  89. package/dist/elements/chunks/{thumbs-up-UobcJnx9.js → thumbs-up-DQe0hvkZ.js} +1 -1
  90. package/dist/elements/chunks/{toast-store-BOfs9eXq.js → toast-store-VUZZBhzH.js} +1 -1
  91. package/dist/elements/chunks/{tool-Be6Dh_dt.js → tool-C1YtxwPu.js} +1 -1
  92. package/dist/elements/chunks/{tooltip-RxMxyCLF.js → tooltip-BqwnFWhn.js} +1 -1
  93. package/dist/elements/chunks/{triangle-alert-C4yxH2XN.js → triangle-alert-B6or7F5u.js} +1 -1
  94. package/dist/elements/chunks/{use-card-resolution-jva9ehH6.js → use-card-resolution-DJg32jGH.js} +1 -1
  95. package/dist/elements/chunks/{variant-aurora-Dx4VRcjS.js → variant-aurora-QXTZPyST.js} +1 -1
  96. package/dist/elements/chunks/{variant-custom-Y1ZTWgEa.js → variant-custom-D5ZlmziF.js} +1 -1
  97. package/dist/elements/chunks/{variant-wave-B9gml9Cg.js → variant-wave-DDCwhLas.js} +1 -1
  98. package/dist/elements/chunks/{video-CrPHsytT.js → video-Bb86fVYI.js} +1 -1
  99. package/dist/elements/chunks/x-BOhjBeOd.js +1 -0
  100. package/dist/elements/coachmark.js +1 -1
  101. package/dist/elements/code-block.js +1 -1
  102. package/dist/elements/command.js +1 -1
  103. package/dist/elements/compare.js +1 -1
  104. package/dist/elements/composer.js +1 -1
  105. package/dist/elements/confirm-card.js +1 -1
  106. package/dist/elements/context-meter.js +1 -1
  107. package/dist/elements/conversation-list.js +1 -1
  108. package/dist/elements/dialog.js +1 -1
  109. package/dist/elements/editable-label.js +1 -1
  110. package/dist/elements/embed.js +1 -1
  111. package/dist/elements/empty.js +1 -1
  112. package/dist/elements/feedback-bar.js +1 -1
  113. package/dist/elements/file-tree.js +1 -1
  114. package/dist/elements/file-upload.js +1 -1
  115. package/dist/elements/form.js +1 -1
  116. package/dist/elements/hover-card.js +1 -1
  117. package/dist/elements/icon.js +1 -1
  118. package/dist/elements/image.js +1 -1
  119. package/dist/elements/input.js +1 -1
  120. package/dist/elements/kbd.js +1 -1
  121. package/dist/elements/link-preview.js +1 -1
  122. package/dist/elements/loader.js +1 -1
  123. package/dist/elements/markdown.js +1 -1
  124. package/dist/elements/menu.js +1 -1
  125. package/dist/elements/message-skills.js +1 -1
  126. package/dist/elements/message.js +1 -1
  127. package/dist/elements/model-switcher.js +1 -1
  128. package/dist/elements/nav.js +1 -1
  129. package/dist/elements/notice.js +1 -1
  130. package/dist/elements/pane-group.js +1 -1
  131. package/dist/elements/pane.js +1 -1
  132. package/dist/elements/popover.js +1 -1
  133. package/dist/elements/progress-bar.js +1 -1
  134. package/dist/elements/prompt-dock.js +1 -1
  135. package/dist/elements/prompt-input.js +1 -1
  136. package/dist/elements/prompt-suggestions.js +1 -1
  137. package/dist/elements/reasoning.js +1 -1
  138. package/dist/elements/remote.js +1 -1
  139. package/dist/elements/resizable.js +1 -1
  140. package/dist/elements/response-stream.js +1 -1
  141. package/dist/elements/screen.js +1 -1
  142. package/dist/elements/scroll-area.js +1 -1
  143. package/dist/elements/scroll-button.js +1 -1
  144. package/dist/elements/search.js +1 -1
  145. package/dist/elements/segmented.js +1 -1
  146. package/dist/elements/separator.js +1 -1
  147. package/dist/elements/setting-item.js +1 -1
  148. package/dist/elements/settings-group.js +1 -1
  149. package/dist/elements/skeleton.js +1 -1
  150. package/dist/elements/source.js +1 -1
  151. package/dist/elements/status.js +1 -1
  152. package/dist/elements/switch.js +1 -1
  153. package/dist/elements/tabs.js +1 -1
  154. package/dist/elements/tasks.js +1 -1
  155. package/dist/elements/text-shimmer.js +1 -1
  156. package/dist/elements/thinking-bar.js +1 -1
  157. package/dist/elements/thread.js +1 -1
  158. package/dist/elements/toast.js +1 -1
  159. package/dist/elements/tool.js +1 -1
  160. package/dist/elements/tooltip.js +1 -1
  161. package/dist/elements/voice-input.js +1 -1
  162. package/dist/elements/voice-output.js +1 -1
  163. package/dist/index.js +1423 -1425
  164. package/dist/index.server.js +1212 -1214
  165. package/dist/kai.es.js +1 -1
  166. package/dist/mcp.es.js +99 -11
  167. package/dist/{register-impl-AxIlqjo7.js → register-impl-C96AnOJn.js} +18 -18
  168. package/dist/{solid-Dt2nEwfl.js → solid-BuqWLn6x.js} +1034 -1036
  169. package/dist/{solid-BGYSJyHG.js → solid-C76UXJuy.js} +1719 -1721
  170. package/dist/solid.js +1 -1
  171. package/dist/solid.server.js +1 -1
  172. package/dist/{variant-aurora-Ds5ou9BH.js → variant-aurora-CD35fdJF.js} +2 -2
  173. package/dist/{variant-aurora-B44X69AG.js → variant-aurora-Dau5Z4yR.js} +1 -1
  174. package/dist/{variant-aurora-BRhV8Flk.js → variant-aurora-Dc-2RVH9.js} +2 -2
  175. package/dist/{variant-custom-D6Rtvneb.js → variant-custom-CHr_jbMU.js} +2 -2
  176. package/dist/{variant-custom-B20FhtYj.js → variant-custom-Cyu8zx4A.js} +2 -2
  177. package/dist/{variant-custom-BvA1Schl.js → variant-custom-Df7QvXyZ.js} +1 -1
  178. package/dist/{variant-wave-DXC6_LcH.js → variant-wave-BkVpxkVF.js} +2 -2
  179. package/dist/{variant-wave-BUQtkryq.js → variant-wave-CXcaP_9W.js} +1 -1
  180. package/dist/{variant-wave-BVYnqy9L.js → variant-wave-DcGqjVnK.js} +2 -2
  181. package/package.json +3 -1
  182. package/src/agent-tooling/mcp/tools/scaffold.ts +81 -11
  183. package/src/components/file-tree.tsx +7 -3
  184. package/src/elements/compiled.css +1 -1
  185. package/src/wire/encode.ts +5 -0
  186. package/dist/elements/chunks/arrow-left-CFPTeL1Y.js +0 -1
  187. package/dist/elements/chunks/check-7Q3K-iXE.js +0 -1
  188. package/dist/elements/chunks/chevron-down-CpNYLn7E.js +0 -1
  189. package/dist/elements/chunks/chevron-right-DrH85Fha.js +0 -1
  190. package/dist/elements/chunks/circle-C9KRjKYv.js +0 -1
  191. package/dist/elements/chunks/circle-check-Dmi7Y4zw.js +0 -1
  192. package/dist/elements/chunks/file-tree-0upJ5jeb.js +0 -1
  193. package/dist/elements/chunks/message-square-hXylwsy0.js +0 -1
  194. package/dist/elements/chunks/x-_-OPHept.js +0 -1
package/dist/kai.es.js CHANGED
@@ -1 +1 @@
1
- const Sn={bash:()=>import("./bash-InADTalH.js"),javascript:()=>import("./javascript-C25yR2R2.js"),typescript:()=>import("./typescript-RycA9KXf.js"),tsx:()=>import("./tsx-B8rCNbgL.js"),html:()=>import("./html-CPZ3oZQ7.js"),css:()=>import("./css-M7EaDHN_.js"),json:()=>import("./json-DxJze_jm.js"),vue:()=>import("./vue-BmIZj4XD.js"),svelte:()=>import("./svelte--5p79yCD.js")},On={"github-dark-dimmed":()=>import("./github-dark-dimmed-DUshB20C.js"),"github-light":()=>import("./github-light-JYsPkUQd.js")},xn={js:"javascript",ts:"typescript",jsx:"tsx",sh:"bash",shell:"bash"},Nt="github-dark-dimmed";let Ot=!0,xt={...Sn},At={...On},kt={...xn},jt=null;const zt=new Set,Ft=new Set;function An(){return jt||(jt=(async()=>{const[{createHighlighterCore:t},{createJavaScriptRegexEngine:n}]=await Promise.all([import("./core-C8fzo39E.js"),import("./engine-javascript-C1x7zo1_.js")]);return t({themes:[],langs:[],engine:n()})})()),jt}function Lt(t){return kt[t]??t}async function kn(t,n){const e=Lt(n);if(zt.has(e))return!0;const r=xt[e];return r?(await t.loadLanguage(r()),zt.add(e),!0):!1}async function Rt(t,n){if(Ft.has(n))return!0;const e=At[n];return e?(await t.loadTheme(e()),Ft.add(n),!0):!1}function jn(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function lt(t){return`<pre><code>${jn(t)}</code></pre>`}async function Pn(t,n,e){if(!Ot||!t)return lt(t);try{const r=await An();if(!await kn(r,n))return lt(t);const o=await Rt(r,e)?e:await Rt(r,Nt)?Nt:null;return o?r.codeToHtml(t,{lang:Lt(n),theme:o}):lt(t)}catch{return lt(t)}}function _n(t){t.enabled!==void 0&&(Ot=t.enabled),t.languages&&(xt={...xt,...t.languages}),t.themes&&(At={...At,...t.themes}),t.aliases&&(kt={...kt,...t.aliases})}function qn(){return Ot}function Cn(t){const n=t.toLowerCase();return n?n.includes("bash")||n.includes("command")||n.includes("shell")||n.includes("terminal")||n.includes("exec")?"command":n.includes("edit")||n.includes("write")||n.includes("patch")||n.includes("replace")||n.includes("delete")?"file-change":n.includes("search")||n.includes("grep")||n.includes("glob")||n.includes("find")?"search":n.includes("fetch")||n.includes("http")||n.includes("browse")||n.includes("crawl")?"fetch":n.includes("mcp")?"mcp":n.includes("image")||n.includes("screenshot")||n.includes("vision")?"image":"generic":"generic"}const p={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Kt(this.context.count)},getNextContextId(){return Kt(this.context.count++)}};function Kt(t){const n=String(t),e=n.length-1;return p.context.id+(e?String.fromCharCode(96+e):"")+n}function Pt(t){p.context=t}function Vn(){return{...p.context,id:p.getNextContextId(),count:0}}const Oe=!1,En=(t,n)=>t===n,E=Symbol("solid-proxy"),Jt=typeof Proxy=="function",X=Symbol("solid-track"),xe=Symbol("solid-dev-component"),at={equals:En};let Y=null,Ut=en;const P=1,Z=2,Wt={owned:null,cleanups:null,context:null,owner:null},_t={};var f=null;let c=null,J=null,U=null,g=null,b=null,O=null,ft=0;function F(t,n){const e=g,r=f,o=t.length===0,s=n===void 0?r:n,i=o?Wt:{owned:null,cleanups:null,context:s?s.context:null,owner:s},u=o?t:()=>t(()=>m(()=>z(i)));f=i,g=null;try{return k(u,!0)}finally{g=e,f=r}}function M(t,n){n=n?Object.assign({},at,n):at;const e={value:t,observers:null,observerSlots:null,comparator:n.equals||void 0},r=o=>(typeof o=="function"&&(c&&c.running&&c.sources.has(e)?o=o(e.tValue):o=o(e.value)),tn(e,o));return[Zt.bind(e),r]}function Bt(t,n,e){const r=et(t,n,!0,P);J&&c&&c.running?b.push(r):W(r)}function Gt(t,n,e){const r=et(t,n,!1,P);J&&c&&c.running?b.push(r):W(r)}function Qt(t,n,e){Ut=Kn;const r=et(t,n,!1,P),o=nt&&Ct(nt);o&&(r.suspense=o),(!e||!e.render)&&(r.user=!0),O?O.push(r):W(r)}function A(t,n,e){e=e?Object.assign({},at,e):at;const r=et(t,n,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=e.equals||void 0,J&&c&&c.running?(r.tState=P,b.push(r)):W(r),Zt.bind(r)}function Mn(t){return t&&typeof t=="object"&&"then"in t}function $n(t,n,e){let r,o,s;typeof n=="function"?(r=t,o=n,s=e||{}):(r=!0,o=t,s=n||{});let i=null,u=_t,l=null,d=!1,h=!1,a="initialValue"in s,w=typeof r=="function"&&A(r);const S=new Set,[_,D]=(s.storage||M)(s.initialValue),[N,K]=M(void 0),[q,C]=M(void 0,{equals:!1}),[V,T]=M(a?"ready":"unresolved");p.context&&(l=p.getNextContextId(),s.ssrLoadFrom==="initial"?u=s.initialValue:p.load&&p.has(l)&&(u=p.load(l)));function H(y,v,$,x){return i===y&&(i=null,x!==void 0&&(a=!0),(y===u||v===u)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(x,{value:v})),u=_t,c&&y&&d?(c.promises.delete(y),d=!1,k(()=>{c.running=!0,Tt(v,$)},!1)):Tt(v,$)),v}function Tt(y,v){k(()=>{v===void 0&&D(()=>y),T(v!==void 0?"errored":a?"ready":"unresolved"),K(v);for(const $ of S.keys())$.decrement();S.clear()},!1)}function mt(){const y=nt&&Ct(nt),v=_(),$=N();if($!==void 0&&!i)throw $;return g&&!g.user&&y&&Bt(()=>{q(),i&&(y.resolved&&c&&d?c.promises.add(i):S.has(y)||(y.increment(),S.add(y)))}),v}function St(y=!0){if(y!==!1&&h)return;h=!1;const v=w?w():r;if(d=c&&c.running,v==null||v===!1){H(i,m(_));return}c&&i&&c.promises.delete(i);let $;const x=u!==_t?u:m(()=>{try{return o(v,{value:_(),refetching:y})}catch(Q){$=Q}});if($!==void 0){H(i,void 0,ht($),v);return}else if(!Mn(x))return H(i,x,void 0,v),x;return i=x,"v"in x?(x.s===1?H(i,x.v,void 0,v):H(i,void 0,ht(x.v),v),x):(h=!0,queueMicrotask(()=>h=!1),k(()=>{T(a?"refreshing":"pending"),C()},!1),x.then(Q=>H(x,Q,void 0,v),Q=>H(x,void 0,ht(Q),v)))}Object.defineProperties(mt,{state:{get:()=>V()},error:{get:()=>N()},loading:{get(){const y=V();return y==="pending"||y==="refreshing"}},latest:{get(){if(!a)return mt();const y=N();if(y&&!i)throw y;return _()}}});let Ht=f;return w?Bt(()=>(Ht=f,St(!1))):St(!1),[mt,{refetch:y=>Xt(Ht,()=>St(y)),mutate:D}]}function Dn(t){return k(t,!1)}function m(t){if(!U&&g===null)return t();const n=g;g=null;try{return U?U.untrack(t):t()}finally{g=n}}function In(t,n,e){const r=Array.isArray(t);let o,s=e&&e.defer;return i=>{let u;if(r){u=Array(t.length);for(let d=0;d<t.length;d++)u[d]=t[d]()}else u=t();if(s)return s=!1,i;const l=m(()=>n(u,o,i));return o=u,l}}function Tn(t){Qt(()=>m(t))}function tt(t){return f===null||(f.cleanups===null?f.cleanups=[t]:f.cleanups.push(t)),t}function Hn(t,n){Y||(Y=Symbol("error")),f=et(void 0,void 0,!0),f.context={...f.context,[Y]:[n]},c&&c.running&&c.sources.add(f);try{return t()}catch(e){ot(e)}finally{f=f.owner}}function qt(){return g}function Nn(){return f}function Xt(t,n){const e=f,r=g;f=t,g=null;try{return k(n,!0)}catch(o){ot(o)}finally{f=e,g=r}}function zn(t){if(c&&c.running)return t(),c.done;const n=g,e=f;return Promise.resolve().then(()=>{g=n,f=e;let r;return(J||nt)&&(r=c||(c={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),k(t,!1),g=f=null,r?r.done:void 0})}const[Ae,Yt]=M(!1);function Fn(t,n){const e=Symbol("context");return{id:e,Provider:Jn(e),defaultValue:t}}function Ct(t){let n;return f&&f.context&&(n=f.context[t.id])!==void 0?n:t.defaultValue}function Vt(t){const n=A(t),e=A(()=>Et(n()));return e.toArray=()=>{const r=e();return Array.isArray(r)?r:r!=null?[r]:[]},e}let nt;function Zt(){const t=c&&c.running;if(this.sources&&(t?this.tState:this.state))if((t?this.tState:this.state)===P)W(this);else{const n=b;b=null,k(()=>dt(this),!1),b=n}if(g){const n=this.observers;if(!n||n[n.length-1]!==g){const e=n?n.length:0;g.sources?(g.sources.push(this),g.sourceSlots.push(e)):(g.sources=[this],g.sourceSlots=[e]),n?(n.push(g),this.observerSlots.push(g.sources.length-1)):(this.observers=[g],this.observerSlots=[g.sources.length-1])}}return t&&c.sources.has(this)?this.tValue:this.value}function tn(t,n,e){let r=c&&c.running&&c.sources.has(t)?t.tValue:t.value;if(!t.comparator||!t.comparator(r,n)){if(c){const o=c.running;(o||!e&&c.sources.has(t))&&(c.sources.add(t),t.tValue=n),o||(t.value=n)}else t.value=n;t.observers&&t.observers.length&&k(()=>{for(let o=0;o<t.observers.length;o+=1){const s=t.observers[o],i=c&&c.running;i&&c.disposed.has(s)||((i?!s.tState:!s.state)&&(s.pure?b.push(s):O.push(s),s.observers&&rn(s)),i?s.tState=P:s.state=P)}if(b.length>1e6)throw b=[],new Error},!1)}return n}function W(t){if(!t.fn)return;z(t);const n=ft;nn(t,c&&c.running&&c.sources.has(t)?t.tValue:t.value,n),c&&!c.running&&c.sources.has(t)&&queueMicrotask(()=>{k(()=>{c&&(c.running=!0),g=f=t,nn(t,t.tValue,n),g=f=null},!1)})}function nn(t,n,e){let r;const o=f,s=g;g=f=t;try{r=t.fn(n)}catch(i){return t.pure&&(c&&c.running?(t.tState=P,t.tOwned&&t.tOwned.forEach(z),t.tOwned=void 0):(t.state=P,t.owned&&t.owned.forEach(z),t.owned=null)),t.updatedAt=e+1,ot(i)}finally{g=s,f=o}(!t.updatedAt||t.updatedAt<=e)&&(t.updatedAt!=null&&"observers"in t?tn(t,r,!0):c&&c.running&&t.pure?(c.sources.has(t)||(t.value=r),c.sources.add(t),t.tValue=r):t.value=r,t.updatedAt=e)}function et(t,n,e,r=P,o){const s={fn:t,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:n,owner:f,context:f?f.context:null,pure:e};if(c&&c.running&&(s.state=0,s.tState=r),f===null||f!==Wt&&(c&&c.running&&f.pure?f.tOwned?f.tOwned.push(s):f.tOwned=[s]:f.owned?f.owned.push(s):f.owned=[s]),U&&s.fn){const i=s.fn,[u,l]=M(void 0,{equals:!1}),d=U.factory(i,l);tt(()=>d.dispose());let h;const a=()=>zn(l).then(()=>{h&&(h.dispose(),h=void 0)});s.fn=w=>(u(),c&&c.running?(h||(h=U.factory(i,a)),h.track(w)):d.track(w))}return s}function rt(t){const n=c&&c.running;if((n?t.tState:t.state)===0)return;if((n?t.tState:t.state)===Z)return dt(t);if(t.suspense&&m(t.suspense.inFallback))return t.suspense.effects.push(t);const e=[t];for(;(t=t.owner)&&(!t.updatedAt||t.updatedAt<ft);){if(n&&c.disposed.has(t))return;(n?t.tState:t.state)&&e.push(t)}for(let r=e.length-1;r>=0;r--){if(t=e[r],n){let o=t,s=e[r+1];for(;(o=o.owner)&&o!==s;)if(c.disposed.has(o))return}if((n?t.tState:t.state)===P)W(t);else if((n?t.tState:t.state)===Z){const o=b;b=null,k(()=>dt(t,e[0]),!1),b=o}}}function k(t,n){if(b)return t();let e=!1;n||(b=[]),O?e=!0:O=[],ft++;try{const r=t();return Ln(e),r}catch(r){e||(O=null),b=null,ot(r)}}function Ln(t){if(b&&(J&&c&&c.running?Rn(b):en(b),b=null),t)return;let n;if(c){if(!c.promises.size&&!c.queue.size){const r=c.sources,o=c.disposed;O.push.apply(O,c.effects),n=c.resolve;for(const s of O)"tState"in s&&(s.state=s.tState),delete s.tState;c=null,k(()=>{for(const s of o)z(s);for(const s of r){if(s.value=s.tValue,s.owned)for(let i=0,u=s.owned.length;i<u;i++)z(s.owned[i]);s.tOwned&&(s.owned=s.tOwned),delete s.tValue,delete s.tOwned,s.tState=0}Yt(!1)},!1)}else if(c.running){c.running=!1,c.effects.push.apply(c.effects,O),O=null,Yt(!0);return}}const e=O;O=null,e.length&&k(()=>Ut(e),!1),n&&n()}function en(t){for(let n=0;n<t.length;n++)rt(t[n])}function Rn(t){for(let n=0;n<t.length;n++){const e=t[n],r=c.queue;r.has(e)||(r.add(e),J(()=>{r.delete(e),k(()=>{c.running=!0,rt(e)},!1),c&&(c.running=!1)}))}}function Kn(t){let n,e=0;for(n=0;n<t.length;n++){const r=t[n];r.user?t[e++]=r:rt(r)}if(p.context){if(p.count){p.effects||(p.effects=[]),p.effects.push(...t.slice(0,e));return}Pt()}for(p.effects&&(p.done||!p.count)&&(t=[...p.effects,...t],e+=p.effects.length,delete p.effects),n=0;n<e;n++)rt(t[n])}function dt(t,n){const e=c&&c.running;e?t.tState=0:t.state=0;for(let r=0;r<t.sources.length;r+=1){const o=t.sources[r];if(o.sources){const s=e?o.tState:o.state;s===P?o!==n&&(!o.updatedAt||o.updatedAt<ft)&&rt(o):s===Z&&dt(o,n)}}}function rn(t){const n=c&&c.running;for(let e=0;e<t.observers.length;e+=1){const r=t.observers[e];(n?!r.tState:!r.state)&&(n?r.tState=Z:r.state=Z,r.pure?b.push(r):O.push(r),r.observers&&rn(r))}}function z(t){let n;if(t.sources)for(;t.sources.length;){const e=t.sources.pop(),r=t.sourceSlots.pop(),o=e.observers;if(o&&o.length){const s=o.pop(),i=e.observerSlots.pop();r<o.length&&(s.sourceSlots[i]=r,o[r]=s,e.observerSlots[r]=i)}}if(t.tOwned){for(n=t.tOwned.length-1;n>=0;n--)z(t.tOwned[n]);delete t.tOwned}if(c&&c.running&&t.pure)on(t,!0);else if(t.owned){for(n=t.owned.length-1;n>=0;n--)z(t.owned[n]);t.owned=null}if(t.cleanups){for(n=t.cleanups.length-1;n>=0;n--)t.cleanups[n]();t.cleanups=null}c&&c.running?t.tState=0:t.state=0}function on(t,n){if(n||(t.tState=0,c.disposed.add(t)),t.owned)for(let e=0;e<t.owned.length;e++)on(t.owned[e])}function ht(t){return t instanceof Error?t:new Error(typeof t=="string"?t:"Unknown error",{cause:t})}function sn(t,n,e){try{for(const r of n)r(t)}catch(r){ot(r,e&&e.owner||null)}}function ot(t,n=f){const e=Y&&n&&n.context&&n.context[Y],r=ht(t);if(!e)throw r;O?O.push({fn(){sn(r,e,n)},state:P}):sn(r,e,n)}function Et(t){if(typeof t=="function"&&!t.length)return Et(t());if(Array.isArray(t)){const n=[];for(let e=0;e<t.length;e++){const r=Et(t[e]);if(Array.isArray(r))if(r.length<32768)n.push.apply(n,r);else for(let o=0;o<r.length;o++)n.push(r[o]);else n.push(r)}return n}return t}function Jn(t,n){return function(e){let r;return Gt(()=>r=m(()=>(f.context={...f.context,[t]:e.value},Vt(()=>e.children))),void 0),r}}const Mt=Symbol("fallback");function gt(t){for(let n=0;n<t.length;n++)t[n]()}function Un(t,n,e={}){let r=[],o=[],s=[],i=0,u=n.length>1?[]:null;return tt(()=>gt(s)),()=>{let l=t()||[],d=l.length,h,a;return l[X],m(()=>{let S,_,D,N,K,q,C,V,T;if(d===0)i!==0&&(gt(s),s=[],r=[],o=[],i=0,u&&(u=[])),e.fallback&&(r=[Mt],o[0]=F(H=>(s[0]=H,e.fallback())),i=1);else if(i===0){for(o=new Array(d),a=0;a<d;a++)r[a]=l[a],o[a]=F(w);i=d}else{for(D=new Array(d),N=new Array(d),u&&(K=new Array(d)),q=0,C=Math.min(i,d);q<C&&r[q]===l[q];q++);for(C=i-1,V=d-1;C>=q&&V>=q&&r[C]===l[V];C--,V--)D[V]=o[C],N[V]=s[C],u&&(K[V]=u[C]);for(S=new Map,_=new Array(V+1),a=V;a>=q;a--)T=l[a],h=S.get(T),_[a]=h===void 0?-1:h,S.set(T,a);for(h=q;h<=C;h++)T=r[h],a=S.get(T),a!==void 0&&a!==-1?(D[a]=o[h],N[a]=s[h],u&&(K[a]=u[h]),a=_[a],S.set(T,a)):s[h]();for(a=q;a<d;a++)a in D?(o[a]=D[a],s[a]=N[a],u&&(u[a]=K[a],u[a](a))):o[a]=F(w);o=o.slice(0,i=d),r=l.slice(0)}return o});function w(S){if(s[a]=S,u){const[_,D]=M(a);return u[a]=D,n(l[a],_)}return n(l[a])}}}function Wn(t,n,e={}){let r=[],o=[],s=[],i=[],u=0,l;return tt(()=>gt(s)),()=>{const d=t()||[],h=d.length;return d[X],m(()=>{if(h===0)return u!==0&&(gt(s),s=[],r=[],o=[],u=0,i=[]),e.fallback&&(r=[Mt],o[0]=F(w=>(s[0]=w,e.fallback())),u=1),o;for(r[0]===Mt&&(s[0](),s=[],r=[],o=[],u=0),l=0;l<h;l++)l<r.length&&r[l]!==d[l]?i[l](()=>d[l]):l>=r.length&&(o[l]=F(a));for(;l<r.length;l++)s[l]();return u=i.length=s.length=h,r=d.slice(0),o=o.slice(0,u)});function a(w){s[l]=w;const[S,_]=M(d[l]);return i[l]=_,n(S,l)}}}let un=!1;function Bn(){un=!0}function Gn(t,n){if(un&&p.context){const e=p.context;Pt(Vn());const r=m(()=>t(n||{}));return Pt(e),r}return m(()=>t(n||{}))}function pt(){return!0}const $t={get(t,n,e){return n===E?e:t.get(n)},has(t,n){return n===E?!0:t.has(n)},set:pt,deleteProperty:pt,getOwnPropertyDescriptor(t,n){return{configurable:!0,enumerable:!0,get(){return t.get(n)},set:pt,deleteProperty:pt}},ownKeys(t){return t.keys()}};function Dt(t){return(t=typeof t=="function"?t():t)?t:{}}function Qn(){for(let t=0,n=this.length;t<n;++t){const e=this[t]();if(e!==void 0)return e}}function Xn(...t){let n=!1;for(let i=0;i<t.length;i++){const u=t[i];n=n||!!u&&E in u,t[i]=typeof u=="function"?(n=!0,A(u)):u}if(Jt&&n)return new Proxy({get(i){for(let u=t.length-1;u>=0;u--){const l=Dt(t[u])[i];if(l!==void 0)return l}},has(i){for(let u=t.length-1;u>=0;u--)if(i in Dt(t[u]))return!0;return!1},keys(){const i=[];for(let u=0;u<t.length;u++)i.push(...Object.keys(Dt(t[u])));return[...new Set(i)]}},$t);const e={},r=Object.create(null);for(let i=t.length-1;i>=0;i--){const u=t[i];if(!u)continue;const l=Object.getOwnPropertyNames(u);for(let d=l.length-1;d>=0;d--){const h=l[d];if(h==="__proto__"||h==="constructor")continue;const a=Object.getOwnPropertyDescriptor(u,h);if(!r[h])r[h]=a.get?{enumerable:!0,configurable:!0,get:Qn.bind(e[h]=[a.get.bind(u)])}:a.value!==void 0?a:void 0;else{const w=e[h];w&&(a.get?w.push(a.get.bind(u)):a.value!==void 0&&w.push(()=>a.value))}}}const o={},s=Object.keys(r);for(let i=s.length-1;i>=0;i--){const u=s[i],l=r[u];l&&l.get?Object.defineProperty(o,u,l):o[u]=l?l.value:void 0}return o}function Yn(t,...n){const e=n.length;if(Jt&&E in t){const o=e>1?n.flat():n[0],s=n.map(i=>new Proxy({get(u){return i.includes(u)?t[u]:void 0},has(u){return i.includes(u)&&u in t},keys(){return i.filter(u=>u in t)}},$t));return s.push(new Proxy({get(i){return o.includes(i)?void 0:t[i]},has(i){return o.includes(i)?!1:i in t},keys(){return Object.keys(t).filter(i=>!o.includes(i))}},$t)),s}const r=[];for(let o=0;o<=e;o++)r[o]={};for(const o of Object.getOwnPropertyNames(t)){let s=e;for(let u=0;u<n.length;u++)if(n[u].includes(o)){s=u;break}const i=Object.getOwnPropertyDescriptor(t,o);!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable?r[s][o]=i.value:Object.defineProperty(r[s],o,i)}return r}let Zn=0;function te(){return p.context?p.getNextContextId():`cl-${Zn++}`}const cn=t=>`Stale read from <${t}>.`;function ne(t){const n="fallback"in t&&{fallback:()=>t.fallback};return A(Un(()=>t.each,t.children,n||void 0))}function ee(t){const n="fallback"in t&&{fallback:()=>t.fallback};return A(Wn(()=>t.each,t.children,n||void 0))}function re(t){const n=t.keyed,e=A(()=>t.when,void 0,void 0),r=n?e:A(e,void 0,{equals:(o,s)=>!o==!s});return A(()=>{const o=r();if(o){const s=t.children;return typeof s=="function"&&s.length>0?m(()=>s(n?o:()=>{if(!m(r))throw cn("Show");return e()})):s}return t.fallback},void 0,void 0)}function oe(t){const n=Vt(()=>t.children),e=A(()=>{const r=n(),o=Array.isArray(r)?r:[r];let s=()=>{};for(let i=0;i<o.length;i++){const u=i,l=o[i],d=s,h=A(()=>d()?void 0:l.when,void 0,void 0),a=l.keyed?h:A(h,void 0,{equals:(w,S)=>!w==!S});s=()=>d()||(a()?[u,h,l]:void 0)}return s});return A(()=>{const r=e()();if(!r)return t.fallback;const[o,s,i]=r,u=i.children;return typeof u=="function"&&u.length>0?m(()=>u(i.keyed?s():()=>{var l;if(((l=m(e)())==null?void 0:l[0])!==o)throw cn("Match");return s()})):u},void 0,void 0)}function se(t){return t}let yt;function ie(t){let n;p.context&&p.load&&(n=p.load(p.getContextId()));const[e,r]=M(n,void 0);return yt||(yt=new Set),yt.add(r),tt(()=>yt.delete(r)),A(()=>{let o;if(o=e()){const s=t.fallback;return typeof s=="function"&&s.length?m(()=>s(o,()=>r())):s}return Hn(()=>t.children,r)},void 0,void 0)}const vt=Symbol("store-raw"),L=Symbol("store-node"),I=Symbol("store-has"),ln=Symbol("store-self");function an(t){let n=t[E];if(!n&&(Object.defineProperty(t,E,{value:n=new Proxy(t,le)}),!Array.isArray(t))){const e=Object.keys(t),r=Object.getOwnPropertyDescriptors(t),o=Object.getPrototypeOf(t),s=o!==null&&t!==null&&typeof t=="object"&&!Array.isArray(t)&&o!==Object.prototype;if(s){const i=Object.getOwnPropertyDescriptors(o);e.push(...Object.keys(i)),Object.assign(r,i)}for(let i=0,u=e.length;i<u;i++){const l=e[i];s&&l==="constructor"||r[l].get&&Object.defineProperty(t,l,{configurable:!0,enumerable:r[l].enumerable,get:r[l].get.bind(n)})}}return n}function B(t){let n;return t!=null&&typeof t=="object"&&(t[E]||!(n=Object.getPrototypeOf(t))||n===Object.prototype||Array.isArray(t))}function R(t,n=new Set){let e,r,o,s;if(e=t!=null&&t[vt])return e;if(!B(t)||n.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):n.add(t);for(let i=0,u=t.length;i<u;i++)o=t[i],(r=R(o,n))!==o&&(t[i]=r)}else{Object.isFrozen(t)?t=Object.assign({},t):n.add(t);const i=Object.keys(t),u=Object.getOwnPropertyDescriptors(t);for(let l=0,d=i.length;l<d;l++)s=i[l],!u[s].get&&(o=t[s],(r=R(o,n))!==o&&(t[s]=r))}return t}function bt(t,n){let e=t[n];return e||Object.defineProperty(t,n,{value:e=Object.create(null)}),e}function st(t,n,e){if(t[n])return t[n];const[r,o]=M(e,{equals:!1,internal:!0});return r.$=o,t[n]=r}function ue(t,n){const e=Reflect.getOwnPropertyDescriptor(t,n);return!e||e.get||!e.configurable||n===E||n===L||(delete e.value,delete e.writable,e.get=()=>t[E][n]),e}function fn(t){qt()&&st(bt(t,L),ln)()}function ce(t){return fn(t),Reflect.ownKeys(t)}const le={get(t,n,e){if(n===vt)return t;if(n===E)return e;if(n===X)return fn(t),e;const r=bt(t,L),o=r[n];let s=o?o():t[n];if(n===L||n===I||n==="__proto__")return s;if(!o){const i=Object.getOwnPropertyDescriptor(t,n);qt()&&(typeof s!="function"||t.hasOwnProperty(n))&&!(i&&i.get)&&(s=st(r,n,s)())}return B(s)?an(s):s},has(t,n){return n===vt||n===E||n===X||n===L||n===I||n==="__proto__"?!0:(qt()&&st(bt(t,I),n)(),n in t)},set(){return!0},deleteProperty(){return!0},ownKeys:ce,getOwnPropertyDescriptor:ue};function G(t,n,e,r=!1){if(n==="__proto__"||!r&&t[n]===e)return;const o=t[n],s=t.length;e===void 0?(delete t[n],t[I]&&t[I][n]&&o!==void 0&&t[I][n].$()):(t[n]=e,t[I]&&t[I][n]&&o===void 0&&t[I][n].$());let i=bt(t,L),u;if((u=st(i,n,o))&&u.$(()=>e),Array.isArray(t)&&t.length!==s){for(let l=t.length;l<s;l++)(u=i[l])&&u.$();(u=st(i,"length",s))&&u.$(t.length)}(u=i[ln])&&u.$()}function dn(t,n){const e=Object.keys(n);for(let r=0;r<e.length;r+=1){const o=e[r];hn(o)||G(t,o,n[o])}}function hn(t){return t==="__proto__"||t==="constructor"||t==="prototype"}function ae(t,n){if(typeof n=="function"&&(n=n(t)),n=R(n),Array.isArray(n)){if(t===n)return;let e=0,r=n.length;for(;e<r;e++){const o=n[e];t[e]!==o&&G(t,e,o)}G(t,"length",r)}else dn(t,n)}function it(t,n,e=[]){let r,o=t;if(n.length>1){r=n.shift();const i=typeof r,u=Array.isArray(t);if(i==="string"&&(r==="__proto__"||n.length>1&&hn(r)))return;if(Array.isArray(r)){for(let l=0;l<r.length;l++)it(t,[r[l]].concat(n),e);return}else if(u&&i==="function"){for(let l=0;l<t.length;l++)r(t[l],l)&&it(t,[l].concat(n),e);return}else if(u&&i==="object"){const{from:l=0,to:d=t.length-1,by:h=1}=r;for(let a=l;a<=d;a+=h)it(t,[a].concat(n),e);return}else if(n.length>1){it(t[r],n,[r].concat(e));return}o=t[r],e=[r].concat(e)}let s=n[0];typeof s=="function"&&(s=s(o,e),s===o)||r===void 0&&s==null||(s=R(s),r===void 0||B(o)&&B(s)&&!Array.isArray(s)?dn(o,s):G(t,r,s))}function gn(...[t,n]){const e=R(t||{}),r=Array.isArray(e),o=an(e);function s(...i){Dn(()=>{r&&i.length===1?ae(e,i[0]):it(e,i)})}return[o,s]}const ke=Symbol("store-root"),wt=new WeakMap,pn={get(t,n){if(n===vt)return t;const e=t[n];if(n===E||n===X||n===L||n===I||n==="__proto__")return e;let r;return B(e)?wt.get(e)||(wt.set(e,r=new Proxy(e,pn)),r):e},set(t,n,e){return G(t,n,R(e)),!0},deleteProperty(t,n){return G(t,n,void 0,!0),!0}};function yn(t){return n=>{if(B(n)){let e;(e=wt.get(n))||wt.set(n,e=new Proxy(n,pn)),t(e)}return n}}let j={};function vn(t){j.stack&&t.setAttribute("stack",j.stack),j.position&&t.setAttribute("position",j.position),j.max!==void 0&&t.setAttribute("max",String(j.max)),j.appearance&&t.setAttribute("appearance",j.appearance),j.inverse!==void 0&&(j.inverse?t.setAttribute("inverse",""):t.removeAttribute("inverse"))}function fe(t){j={...j,...t},!(typeof document>"u")&&document.querySelectorAll("kai-toast-region").forEach(n=>vn(n))}const de=5e3,he=7e3,{toasts:It,setToasts:ut,mounted:je,setMounted:ge}=F(()=>{const[t,n]=gn([]),[e,r]=M(!1);return{toasts:t,setToasts:n,mounted:e,setMounted:r}});let bn=0;function pe(){return bn+=1,`toast-${bn}`}function ye(t){const n=t.duration??de;return n===0?0:t.action?Math.max(n,he):n}const wn=new Map;function ve(t=null){if(typeof document>"u")return;const n=wn.get(t);if(n&&n.isConnected)return n;const e=document.createElement("kai-toast-region");return document.body.appendChild(e),e.toasts=It,t&&(e.target=t),vn(e),wn.set(t,e),ge(!0),e}function be(t){const n=It.findIndex(e=>e.id===t.id);n>=0?ut(n,t):ut(yn(e=>{e.push(t)}))}function mn(t){ut(n=>n.filter(e=>e.id!==t))}function we(t){return{id:t,dismiss:()=>mn(t),update:n=>{const e=It.findIndex(r=>r.id===t);e>=0&&ut(e,r=>({...r,...n}))}}}function ct(t,n,e){ve(n?.target??null);const r=n?.id??pe(),o={id:r,message:t,variant:n?.variant??e,appearance:n?.appearance??j.appearance??"pill",inverse:n?.inverse??j.inverse??!1,description:n?.description,action:n?.action,duration:n?.duration,dismissible:n?.dismissible,target:n?.target};return be(o),we(r)}const me=Object.assign((t,n)=>ct(t,n,"neutral"),{success:(t,n)=>ct(t,n,"success"),warning:(t,n)=>ct(t,n,"warning"),error:(t,n)=>ct(t,n,"error"),info:(t,n)=>ct(t,n,"info"),dismiss:mn,clear:()=>ut([])}),Se=typeof window<"u"&&typeof customElements<"u"?import("./register-impl-AxIlqjo7.js").then(t=>t.r):Promise.resolve();export{ye as A,ie as E,ne as F,ee as I,se as M,re as S,F as a,Gt as b,A as c,Cn as classifyTool,_n as configureCodeHighlighting,fe as configureToasts,Qt as d,Bn as e,Se as elementsReady,M as f,Nn as g,Yn as h,Fn as i,qn as isCodeHighlightingEnabled,Gn as j,Ct as k,te as l,Xn as m,Tn as n,tt as o,In as p,$n as q,Xt as r,p as s,Pn as t,me as toast,m as u,oe as v,gn as w,yn as x,R as y,Vt as z};
1
+ const Sn={bash:()=>import("./bash-InADTalH.js"),javascript:()=>import("./javascript-C25yR2R2.js"),typescript:()=>import("./typescript-RycA9KXf.js"),tsx:()=>import("./tsx-B8rCNbgL.js"),html:()=>import("./html-CPZ3oZQ7.js"),css:()=>import("./css-M7EaDHN_.js"),json:()=>import("./json-DxJze_jm.js"),vue:()=>import("./vue-BmIZj4XD.js"),svelte:()=>import("./svelte--5p79yCD.js")},On={"github-dark-dimmed":()=>import("./github-dark-dimmed-DUshB20C.js"),"github-light":()=>import("./github-light-JYsPkUQd.js")},xn={js:"javascript",ts:"typescript",jsx:"tsx",sh:"bash",shell:"bash"},Nt="github-dark-dimmed";let Ot=!0,xt={...Sn},At={...On},kt={...xn},jt=null;const zt=new Set,Ft=new Set;function An(){return jt||(jt=(async()=>{const[{createHighlighterCore:t},{createJavaScriptRegexEngine:n}]=await Promise.all([import("./core-C8fzo39E.js"),import("./engine-javascript-C1x7zo1_.js")]);return t({themes:[],langs:[],engine:n()})})()),jt}function Lt(t){return kt[t]??t}async function kn(t,n){const e=Lt(n);if(zt.has(e))return!0;const r=xt[e];return r?(await t.loadLanguage(r()),zt.add(e),!0):!1}async function Rt(t,n){if(Ft.has(n))return!0;const e=At[n];return e?(await t.loadTheme(e()),Ft.add(n),!0):!1}function jn(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function lt(t){return`<pre><code>${jn(t)}</code></pre>`}async function Pn(t,n,e){if(!Ot||!t)return lt(t);try{const r=await An();if(!await kn(r,n))return lt(t);const o=await Rt(r,e)?e:await Rt(r,Nt)?Nt:null;return o?r.codeToHtml(t,{lang:Lt(n),theme:o}):lt(t)}catch{return lt(t)}}function _n(t){t.enabled!==void 0&&(Ot=t.enabled),t.languages&&(xt={...xt,...t.languages}),t.themes&&(At={...At,...t.themes}),t.aliases&&(kt={...kt,...t.aliases})}function qn(){return Ot}function Cn(t){const n=t.toLowerCase();return n?n.includes("bash")||n.includes("command")||n.includes("shell")||n.includes("terminal")||n.includes("exec")?"command":n.includes("edit")||n.includes("write")||n.includes("patch")||n.includes("replace")||n.includes("delete")?"file-change":n.includes("search")||n.includes("grep")||n.includes("glob")||n.includes("find")?"search":n.includes("fetch")||n.includes("http")||n.includes("browse")||n.includes("crawl")?"fetch":n.includes("mcp")?"mcp":n.includes("image")||n.includes("screenshot")||n.includes("vision")?"image":"generic":"generic"}const p={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Kt(this.context.count)},getNextContextId(){return Kt(this.context.count++)}};function Kt(t){const n=String(t),e=n.length-1;return p.context.id+(e?String.fromCharCode(96+e):"")+n}function Pt(t){p.context=t}function Vn(){return{...p.context,id:p.getNextContextId(),count:0}}const Oe=!1,En=(t,n)=>t===n,E=Symbol("solid-proxy"),Jt=typeof Proxy=="function",X=Symbol("solid-track"),xe=Symbol("solid-dev-component"),at={equals:En};let Y=null,Ut=en;const P=1,Z=2,Wt={owned:null,cleanups:null,context:null,owner:null},_t={};var f=null;let c=null,J=null,U=null,g=null,b=null,O=null,ft=0;function F(t,n){const e=g,r=f,o=t.length===0,s=n===void 0?r:n,i=o?Wt:{owned:null,cleanups:null,context:s?s.context:null,owner:s},u=o?t:()=>t(()=>m(()=>z(i)));f=i,g=null;try{return k(u,!0)}finally{g=e,f=r}}function M(t,n){n=n?Object.assign({},at,n):at;const e={value:t,observers:null,observerSlots:null,comparator:n.equals||void 0},r=o=>(typeof o=="function"&&(c&&c.running&&c.sources.has(e)?o=o(e.tValue):o=o(e.value)),tn(e,o));return[Zt.bind(e),r]}function Bt(t,n,e){const r=et(t,n,!0,P);J&&c&&c.running?b.push(r):W(r)}function Gt(t,n,e){const r=et(t,n,!1,P);J&&c&&c.running?b.push(r):W(r)}function Qt(t,n,e){Ut=Kn;const r=et(t,n,!1,P),o=nt&&Ct(nt);o&&(r.suspense=o),(!e||!e.render)&&(r.user=!0),O?O.push(r):W(r)}function A(t,n,e){e=e?Object.assign({},at,e):at;const r=et(t,n,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=e.equals||void 0,J&&c&&c.running?(r.tState=P,b.push(r)):W(r),Zt.bind(r)}function Mn(t){return t&&typeof t=="object"&&"then"in t}function $n(t,n,e){let r,o,s;typeof n=="function"?(r=t,o=n,s=e||{}):(r=!0,o=t,s=n||{});let i=null,u=_t,l=null,d=!1,h=!1,a="initialValue"in s,w=typeof r=="function"&&A(r);const S=new Set,[_,D]=(s.storage||M)(s.initialValue),[N,K]=M(void 0),[q,C]=M(void 0,{equals:!1}),[V,T]=M(a?"ready":"unresolved");p.context&&(l=p.getNextContextId(),s.ssrLoadFrom==="initial"?u=s.initialValue:p.load&&p.has(l)&&(u=p.load(l)));function H(y,v,$,x){return i===y&&(i=null,x!==void 0&&(a=!0),(y===u||v===u)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(x,{value:v})),u=_t,c&&y&&d?(c.promises.delete(y),d=!1,k(()=>{c.running=!0,Tt(v,$)},!1)):Tt(v,$)),v}function Tt(y,v){k(()=>{v===void 0&&D(()=>y),T(v!==void 0?"errored":a?"ready":"unresolved"),K(v);for(const $ of S.keys())$.decrement();S.clear()},!1)}function mt(){const y=nt&&Ct(nt),v=_(),$=N();if($!==void 0&&!i)throw $;return g&&!g.user&&y&&Bt(()=>{q(),i&&(y.resolved&&c&&d?c.promises.add(i):S.has(y)||(y.increment(),S.add(y)))}),v}function St(y=!0){if(y!==!1&&h)return;h=!1;const v=w?w():r;if(d=c&&c.running,v==null||v===!1){H(i,m(_));return}c&&i&&c.promises.delete(i);let $;const x=u!==_t?u:m(()=>{try{return o(v,{value:_(),refetching:y})}catch(Q){$=Q}});if($!==void 0){H(i,void 0,ht($),v);return}else if(!Mn(x))return H(i,x,void 0,v),x;return i=x,"v"in x?(x.s===1?H(i,x.v,void 0,v):H(i,void 0,ht(x.v),v),x):(h=!0,queueMicrotask(()=>h=!1),k(()=>{T(a?"refreshing":"pending"),C()},!1),x.then(Q=>H(x,Q,void 0,v),Q=>H(x,void 0,ht(Q),v)))}Object.defineProperties(mt,{state:{get:()=>V()},error:{get:()=>N()},loading:{get(){const y=V();return y==="pending"||y==="refreshing"}},latest:{get(){if(!a)return mt();const y=N();if(y&&!i)throw y;return _()}}});let Ht=f;return w?Bt(()=>(Ht=f,St(!1))):St(!1),[mt,{refetch:y=>Xt(Ht,()=>St(y)),mutate:D}]}function Dn(t){return k(t,!1)}function m(t){if(!U&&g===null)return t();const n=g;g=null;try{return U?U.untrack(t):t()}finally{g=n}}function In(t,n,e){const r=Array.isArray(t);let o,s=e&&e.defer;return i=>{let u;if(r){u=Array(t.length);for(let d=0;d<t.length;d++)u[d]=t[d]()}else u=t();if(s)return s=!1,i;const l=m(()=>n(u,o,i));return o=u,l}}function Tn(t){Qt(()=>m(t))}function tt(t){return f===null||(f.cleanups===null?f.cleanups=[t]:f.cleanups.push(t)),t}function Hn(t,n){Y||(Y=Symbol("error")),f=et(void 0,void 0,!0),f.context={...f.context,[Y]:[n]},c&&c.running&&c.sources.add(f);try{return t()}catch(e){ot(e)}finally{f=f.owner}}function qt(){return g}function Nn(){return f}function Xt(t,n){const e=f,r=g;f=t,g=null;try{return k(n,!0)}catch(o){ot(o)}finally{f=e,g=r}}function zn(t){if(c&&c.running)return t(),c.done;const n=g,e=f;return Promise.resolve().then(()=>{g=n,f=e;let r;return(J||nt)&&(r=c||(c={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),k(t,!1),g=f=null,r?r.done:void 0})}const[Ae,Yt]=M(!1);function Fn(t,n){const e=Symbol("context");return{id:e,Provider:Jn(e),defaultValue:t}}function Ct(t){let n;return f&&f.context&&(n=f.context[t.id])!==void 0?n:t.defaultValue}function Vt(t){const n=A(t),e=A(()=>Et(n()));return e.toArray=()=>{const r=e();return Array.isArray(r)?r:r!=null?[r]:[]},e}let nt;function Zt(){const t=c&&c.running;if(this.sources&&(t?this.tState:this.state))if((t?this.tState:this.state)===P)W(this);else{const n=b;b=null,k(()=>dt(this),!1),b=n}if(g){const n=this.observers;if(!n||n[n.length-1]!==g){const e=n?n.length:0;g.sources?(g.sources.push(this),g.sourceSlots.push(e)):(g.sources=[this],g.sourceSlots=[e]),n?(n.push(g),this.observerSlots.push(g.sources.length-1)):(this.observers=[g],this.observerSlots=[g.sources.length-1])}}return t&&c.sources.has(this)?this.tValue:this.value}function tn(t,n,e){let r=c&&c.running&&c.sources.has(t)?t.tValue:t.value;if(!t.comparator||!t.comparator(r,n)){if(c){const o=c.running;(o||!e&&c.sources.has(t))&&(c.sources.add(t),t.tValue=n),o||(t.value=n)}else t.value=n;t.observers&&t.observers.length&&k(()=>{for(let o=0;o<t.observers.length;o+=1){const s=t.observers[o],i=c&&c.running;i&&c.disposed.has(s)||((i?!s.tState:!s.state)&&(s.pure?b.push(s):O.push(s),s.observers&&rn(s)),i?s.tState=P:s.state=P)}if(b.length>1e6)throw b=[],new Error},!1)}return n}function W(t){if(!t.fn)return;z(t);const n=ft;nn(t,c&&c.running&&c.sources.has(t)?t.tValue:t.value,n),c&&!c.running&&c.sources.has(t)&&queueMicrotask(()=>{k(()=>{c&&(c.running=!0),g=f=t,nn(t,t.tValue,n),g=f=null},!1)})}function nn(t,n,e){let r;const o=f,s=g;g=f=t;try{r=t.fn(n)}catch(i){return t.pure&&(c&&c.running?(t.tState=P,t.tOwned&&t.tOwned.forEach(z),t.tOwned=void 0):(t.state=P,t.owned&&t.owned.forEach(z),t.owned=null)),t.updatedAt=e+1,ot(i)}finally{g=s,f=o}(!t.updatedAt||t.updatedAt<=e)&&(t.updatedAt!=null&&"observers"in t?tn(t,r,!0):c&&c.running&&t.pure?(c.sources.has(t)||(t.value=r),c.sources.add(t),t.tValue=r):t.value=r,t.updatedAt=e)}function et(t,n,e,r=P,o){const s={fn:t,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:n,owner:f,context:f?f.context:null,pure:e};if(c&&c.running&&(s.state=0,s.tState=r),f===null||f!==Wt&&(c&&c.running&&f.pure?f.tOwned?f.tOwned.push(s):f.tOwned=[s]:f.owned?f.owned.push(s):f.owned=[s]),U&&s.fn){const i=s.fn,[u,l]=M(void 0,{equals:!1}),d=U.factory(i,l);tt(()=>d.dispose());let h;const a=()=>zn(l).then(()=>{h&&(h.dispose(),h=void 0)});s.fn=w=>(u(),c&&c.running?(h||(h=U.factory(i,a)),h.track(w)):d.track(w))}return s}function rt(t){const n=c&&c.running;if((n?t.tState:t.state)===0)return;if((n?t.tState:t.state)===Z)return dt(t);if(t.suspense&&m(t.suspense.inFallback))return t.suspense.effects.push(t);const e=[t];for(;(t=t.owner)&&(!t.updatedAt||t.updatedAt<ft);){if(n&&c.disposed.has(t))return;(n?t.tState:t.state)&&e.push(t)}for(let r=e.length-1;r>=0;r--){if(t=e[r],n){let o=t,s=e[r+1];for(;(o=o.owner)&&o!==s;)if(c.disposed.has(o))return}if((n?t.tState:t.state)===P)W(t);else if((n?t.tState:t.state)===Z){const o=b;b=null,k(()=>dt(t,e[0]),!1),b=o}}}function k(t,n){if(b)return t();let e=!1;n||(b=[]),O?e=!0:O=[],ft++;try{const r=t();return Ln(e),r}catch(r){e||(O=null),b=null,ot(r)}}function Ln(t){if(b&&(J&&c&&c.running?Rn(b):en(b),b=null),t)return;let n;if(c){if(!c.promises.size&&!c.queue.size){const r=c.sources,o=c.disposed;O.push.apply(O,c.effects),n=c.resolve;for(const s of O)"tState"in s&&(s.state=s.tState),delete s.tState;c=null,k(()=>{for(const s of o)z(s);for(const s of r){if(s.value=s.tValue,s.owned)for(let i=0,u=s.owned.length;i<u;i++)z(s.owned[i]);s.tOwned&&(s.owned=s.tOwned),delete s.tValue,delete s.tOwned,s.tState=0}Yt(!1)},!1)}else if(c.running){c.running=!1,c.effects.push.apply(c.effects,O),O=null,Yt(!0);return}}const e=O;O=null,e.length&&k(()=>Ut(e),!1),n&&n()}function en(t){for(let n=0;n<t.length;n++)rt(t[n])}function Rn(t){for(let n=0;n<t.length;n++){const e=t[n],r=c.queue;r.has(e)||(r.add(e),J(()=>{r.delete(e),k(()=>{c.running=!0,rt(e)},!1),c&&(c.running=!1)}))}}function Kn(t){let n,e=0;for(n=0;n<t.length;n++){const r=t[n];r.user?t[e++]=r:rt(r)}if(p.context){if(p.count){p.effects||(p.effects=[]),p.effects.push(...t.slice(0,e));return}Pt()}for(p.effects&&(p.done||!p.count)&&(t=[...p.effects,...t],e+=p.effects.length,delete p.effects),n=0;n<e;n++)rt(t[n])}function dt(t,n){const e=c&&c.running;e?t.tState=0:t.state=0;for(let r=0;r<t.sources.length;r+=1){const o=t.sources[r];if(o.sources){const s=e?o.tState:o.state;s===P?o!==n&&(!o.updatedAt||o.updatedAt<ft)&&rt(o):s===Z&&dt(o,n)}}}function rn(t){const n=c&&c.running;for(let e=0;e<t.observers.length;e+=1){const r=t.observers[e];(n?!r.tState:!r.state)&&(n?r.tState=Z:r.state=Z,r.pure?b.push(r):O.push(r),r.observers&&rn(r))}}function z(t){let n;if(t.sources)for(;t.sources.length;){const e=t.sources.pop(),r=t.sourceSlots.pop(),o=e.observers;if(o&&o.length){const s=o.pop(),i=e.observerSlots.pop();r<o.length&&(s.sourceSlots[i]=r,o[r]=s,e.observerSlots[r]=i)}}if(t.tOwned){for(n=t.tOwned.length-1;n>=0;n--)z(t.tOwned[n]);delete t.tOwned}if(c&&c.running&&t.pure)on(t,!0);else if(t.owned){for(n=t.owned.length-1;n>=0;n--)z(t.owned[n]);t.owned=null}if(t.cleanups){for(n=t.cleanups.length-1;n>=0;n--)t.cleanups[n]();t.cleanups=null}c&&c.running?t.tState=0:t.state=0}function on(t,n){if(n||(t.tState=0,c.disposed.add(t)),t.owned)for(let e=0;e<t.owned.length;e++)on(t.owned[e])}function ht(t){return t instanceof Error?t:new Error(typeof t=="string"?t:"Unknown error",{cause:t})}function sn(t,n,e){try{for(const r of n)r(t)}catch(r){ot(r,e&&e.owner||null)}}function ot(t,n=f){const e=Y&&n&&n.context&&n.context[Y],r=ht(t);if(!e)throw r;O?O.push({fn(){sn(r,e,n)},state:P}):sn(r,e,n)}function Et(t){if(typeof t=="function"&&!t.length)return Et(t());if(Array.isArray(t)){const n=[];for(let e=0;e<t.length;e++){const r=Et(t[e]);if(Array.isArray(r))if(r.length<32768)n.push.apply(n,r);else for(let o=0;o<r.length;o++)n.push(r[o]);else n.push(r)}return n}return t}function Jn(t,n){return function(e){let r;return Gt(()=>r=m(()=>(f.context={...f.context,[t]:e.value},Vt(()=>e.children))),void 0),r}}const Mt=Symbol("fallback");function gt(t){for(let n=0;n<t.length;n++)t[n]()}function Un(t,n,e={}){let r=[],o=[],s=[],i=0,u=n.length>1?[]:null;return tt(()=>gt(s)),()=>{let l=t()||[],d=l.length,h,a;return l[X],m(()=>{let S,_,D,N,K,q,C,V,T;if(d===0)i!==0&&(gt(s),s=[],r=[],o=[],i=0,u&&(u=[])),e.fallback&&(r=[Mt],o[0]=F(H=>(s[0]=H,e.fallback())),i=1);else if(i===0){for(o=new Array(d),a=0;a<d;a++)r[a]=l[a],o[a]=F(w);i=d}else{for(D=new Array(d),N=new Array(d),u&&(K=new Array(d)),q=0,C=Math.min(i,d);q<C&&r[q]===l[q];q++);for(C=i-1,V=d-1;C>=q&&V>=q&&r[C]===l[V];C--,V--)D[V]=o[C],N[V]=s[C],u&&(K[V]=u[C]);for(S=new Map,_=new Array(V+1),a=V;a>=q;a--)T=l[a],h=S.get(T),_[a]=h===void 0?-1:h,S.set(T,a);for(h=q;h<=C;h++)T=r[h],a=S.get(T),a!==void 0&&a!==-1?(D[a]=o[h],N[a]=s[h],u&&(K[a]=u[h]),a=_[a],S.set(T,a)):s[h]();for(a=q;a<d;a++)a in D?(o[a]=D[a],s[a]=N[a],u&&(u[a]=K[a],u[a](a))):o[a]=F(w);o=o.slice(0,i=d),r=l.slice(0)}return o});function w(S){if(s[a]=S,u){const[_,D]=M(a);return u[a]=D,n(l[a],_)}return n(l[a])}}}function Wn(t,n,e={}){let r=[],o=[],s=[],i=[],u=0,l;return tt(()=>gt(s)),()=>{const d=t()||[],h=d.length;return d[X],m(()=>{if(h===0)return u!==0&&(gt(s),s=[],r=[],o=[],u=0,i=[]),e.fallback&&(r=[Mt],o[0]=F(w=>(s[0]=w,e.fallback())),u=1),o;for(r[0]===Mt&&(s[0](),s=[],r=[],o=[],u=0),l=0;l<h;l++)l<r.length&&r[l]!==d[l]?i[l](()=>d[l]):l>=r.length&&(o[l]=F(a));for(;l<r.length;l++)s[l]();return u=i.length=s.length=h,r=d.slice(0),o=o.slice(0,u)});function a(w){s[l]=w;const[S,_]=M(d[l]);return i[l]=_,n(S,l)}}}let un=!1;function Bn(){un=!0}function Gn(t,n){if(un&&p.context){const e=p.context;Pt(Vn());const r=m(()=>t(n||{}));return Pt(e),r}return m(()=>t(n||{}))}function pt(){return!0}const $t={get(t,n,e){return n===E?e:t.get(n)},has(t,n){return n===E?!0:t.has(n)},set:pt,deleteProperty:pt,getOwnPropertyDescriptor(t,n){return{configurable:!0,enumerable:!0,get(){return t.get(n)},set:pt,deleteProperty:pt}},ownKeys(t){return t.keys()}};function Dt(t){return(t=typeof t=="function"?t():t)?t:{}}function Qn(){for(let t=0,n=this.length;t<n;++t){const e=this[t]();if(e!==void 0)return e}}function Xn(...t){let n=!1;for(let i=0;i<t.length;i++){const u=t[i];n=n||!!u&&E in u,t[i]=typeof u=="function"?(n=!0,A(u)):u}if(Jt&&n)return new Proxy({get(i){for(let u=t.length-1;u>=0;u--){const l=Dt(t[u])[i];if(l!==void 0)return l}},has(i){for(let u=t.length-1;u>=0;u--)if(i in Dt(t[u]))return!0;return!1},keys(){const i=[];for(let u=0;u<t.length;u++)i.push(...Object.keys(Dt(t[u])));return[...new Set(i)]}},$t);const e={},r=Object.create(null);for(let i=t.length-1;i>=0;i--){const u=t[i];if(!u)continue;const l=Object.getOwnPropertyNames(u);for(let d=l.length-1;d>=0;d--){const h=l[d];if(h==="__proto__"||h==="constructor")continue;const a=Object.getOwnPropertyDescriptor(u,h);if(!r[h])r[h]=a.get?{enumerable:!0,configurable:!0,get:Qn.bind(e[h]=[a.get.bind(u)])}:a.value!==void 0?a:void 0;else{const w=e[h];w&&(a.get?w.push(a.get.bind(u)):a.value!==void 0&&w.push(()=>a.value))}}}const o={},s=Object.keys(r);for(let i=s.length-1;i>=0;i--){const u=s[i],l=r[u];l&&l.get?Object.defineProperty(o,u,l):o[u]=l?l.value:void 0}return o}function Yn(t,...n){const e=n.length;if(Jt&&E in t){const o=e>1?n.flat():n[0],s=n.map(i=>new Proxy({get(u){return i.includes(u)?t[u]:void 0},has(u){return i.includes(u)&&u in t},keys(){return i.filter(u=>u in t)}},$t));return s.push(new Proxy({get(i){return o.includes(i)?void 0:t[i]},has(i){return o.includes(i)?!1:i in t},keys(){return Object.keys(t).filter(i=>!o.includes(i))}},$t)),s}const r=[];for(let o=0;o<=e;o++)r[o]={};for(const o of Object.getOwnPropertyNames(t)){let s=e;for(let u=0;u<n.length;u++)if(n[u].includes(o)){s=u;break}const i=Object.getOwnPropertyDescriptor(t,o);!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable?r[s][o]=i.value:Object.defineProperty(r[s],o,i)}return r}let Zn=0;function te(){return p.context?p.getNextContextId():`cl-${Zn++}`}const cn=t=>`Stale read from <${t}>.`;function ne(t){const n="fallback"in t&&{fallback:()=>t.fallback};return A(Un(()=>t.each,t.children,n||void 0))}function ee(t){const n="fallback"in t&&{fallback:()=>t.fallback};return A(Wn(()=>t.each,t.children,n||void 0))}function re(t){const n=t.keyed,e=A(()=>t.when,void 0,void 0),r=n?e:A(e,void 0,{equals:(o,s)=>!o==!s});return A(()=>{const o=r();if(o){const s=t.children;return typeof s=="function"&&s.length>0?m(()=>s(n?o:()=>{if(!m(r))throw cn("Show");return e()})):s}return t.fallback},void 0,void 0)}function oe(t){const n=Vt(()=>t.children),e=A(()=>{const r=n(),o=Array.isArray(r)?r:[r];let s=()=>{};for(let i=0;i<o.length;i++){const u=i,l=o[i],d=s,h=A(()=>d()?void 0:l.when,void 0,void 0),a=l.keyed?h:A(h,void 0,{equals:(w,S)=>!w==!S});s=()=>d()||(a()?[u,h,l]:void 0)}return s});return A(()=>{const r=e()();if(!r)return t.fallback;const[o,s,i]=r,u=i.children;return typeof u=="function"&&u.length>0?m(()=>u(i.keyed?s():()=>{var l;if(((l=m(e)())==null?void 0:l[0])!==o)throw cn("Match");return s()})):u},void 0,void 0)}function se(t){return t}let yt;function ie(t){let n;p.context&&p.load&&(n=p.load(p.getContextId()));const[e,r]=M(n,void 0);return yt||(yt=new Set),yt.add(r),tt(()=>yt.delete(r)),A(()=>{let o;if(o=e()){const s=t.fallback;return typeof s=="function"&&s.length?m(()=>s(o,()=>r())):s}return Hn(()=>t.children,r)},void 0,void 0)}const vt=Symbol("store-raw"),L=Symbol("store-node"),I=Symbol("store-has"),ln=Symbol("store-self");function an(t){let n=t[E];if(!n&&(Object.defineProperty(t,E,{value:n=new Proxy(t,le)}),!Array.isArray(t))){const e=Object.keys(t),r=Object.getOwnPropertyDescriptors(t),o=Object.getPrototypeOf(t),s=o!==null&&t!==null&&typeof t=="object"&&!Array.isArray(t)&&o!==Object.prototype;if(s){const i=Object.getOwnPropertyDescriptors(o);e.push(...Object.keys(i)),Object.assign(r,i)}for(let i=0,u=e.length;i<u;i++){const l=e[i];s&&l==="constructor"||r[l].get&&Object.defineProperty(t,l,{configurable:!0,enumerable:r[l].enumerable,get:r[l].get.bind(n)})}}return n}function B(t){let n;return t!=null&&typeof t=="object"&&(t[E]||!(n=Object.getPrototypeOf(t))||n===Object.prototype||Array.isArray(t))}function R(t,n=new Set){let e,r,o,s;if(e=t!=null&&t[vt])return e;if(!B(t)||n.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):n.add(t);for(let i=0,u=t.length;i<u;i++)o=t[i],(r=R(o,n))!==o&&(t[i]=r)}else{Object.isFrozen(t)?t=Object.assign({},t):n.add(t);const i=Object.keys(t),u=Object.getOwnPropertyDescriptors(t);for(let l=0,d=i.length;l<d;l++)s=i[l],!u[s].get&&(o=t[s],(r=R(o,n))!==o&&(t[s]=r))}return t}function bt(t,n){let e=t[n];return e||Object.defineProperty(t,n,{value:e=Object.create(null)}),e}function st(t,n,e){if(t[n])return t[n];const[r,o]=M(e,{equals:!1,internal:!0});return r.$=o,t[n]=r}function ue(t,n){const e=Reflect.getOwnPropertyDescriptor(t,n);return!e||e.get||!e.configurable||n===E||n===L||(delete e.value,delete e.writable,e.get=()=>t[E][n]),e}function fn(t){qt()&&st(bt(t,L),ln)()}function ce(t){return fn(t),Reflect.ownKeys(t)}const le={get(t,n,e){if(n===vt)return t;if(n===E)return e;if(n===X)return fn(t),e;const r=bt(t,L),o=r[n];let s=o?o():t[n];if(n===L||n===I||n==="__proto__")return s;if(!o){const i=Object.getOwnPropertyDescriptor(t,n);qt()&&(typeof s!="function"||t.hasOwnProperty(n))&&!(i&&i.get)&&(s=st(r,n,s)())}return B(s)?an(s):s},has(t,n){return n===vt||n===E||n===X||n===L||n===I||n==="__proto__"?!0:(qt()&&st(bt(t,I),n)(),n in t)},set(){return!0},deleteProperty(){return!0},ownKeys:ce,getOwnPropertyDescriptor:ue};function G(t,n,e,r=!1){if(n==="__proto__"||!r&&t[n]===e)return;const o=t[n],s=t.length;e===void 0?(delete t[n],t[I]&&t[I][n]&&o!==void 0&&t[I][n].$()):(t[n]=e,t[I]&&t[I][n]&&o===void 0&&t[I][n].$());let i=bt(t,L),u;if((u=st(i,n,o))&&u.$(()=>e),Array.isArray(t)&&t.length!==s){for(let l=t.length;l<s;l++)(u=i[l])&&u.$();(u=st(i,"length",s))&&u.$(t.length)}(u=i[ln])&&u.$()}function dn(t,n){const e=Object.keys(n);for(let r=0;r<e.length;r+=1){const o=e[r];hn(o)||G(t,o,n[o])}}function hn(t){return t==="__proto__"||t==="constructor"||t==="prototype"}function ae(t,n){if(typeof n=="function"&&(n=n(t)),n=R(n),Array.isArray(n)){if(t===n)return;let e=0,r=n.length;for(;e<r;e++){const o=n[e];t[e]!==o&&G(t,e,o)}G(t,"length",r)}else dn(t,n)}function it(t,n,e=[]){let r,o=t;if(n.length>1){r=n.shift();const i=typeof r,u=Array.isArray(t);if(i==="string"&&(r==="__proto__"||n.length>1&&hn(r)))return;if(Array.isArray(r)){for(let l=0;l<r.length;l++)it(t,[r[l]].concat(n),e);return}else if(u&&i==="function"){for(let l=0;l<t.length;l++)r(t[l],l)&&it(t,[l].concat(n),e);return}else if(u&&i==="object"){const{from:l=0,to:d=t.length-1,by:h=1}=r;for(let a=l;a<=d;a+=h)it(t,[a].concat(n),e);return}else if(n.length>1){it(t[r],n,[r].concat(e));return}o=t[r],e=[r].concat(e)}let s=n[0];typeof s=="function"&&(s=s(o,e),s===o)||r===void 0&&s==null||(s=R(s),r===void 0||B(o)&&B(s)&&!Array.isArray(s)?dn(o,s):G(t,r,s))}function gn(...[t,n]){const e=R(t||{}),r=Array.isArray(e),o=an(e);function s(...i){Dn(()=>{r&&i.length===1?ae(e,i[0]):it(e,i)})}return[o,s]}const ke=Symbol("store-root"),wt=new WeakMap,pn={get(t,n){if(n===vt)return t;const e=t[n];if(n===E||n===X||n===L||n===I||n==="__proto__")return e;let r;return B(e)?wt.get(e)||(wt.set(e,r=new Proxy(e,pn)),r):e},set(t,n,e){return G(t,n,R(e)),!0},deleteProperty(t,n){return G(t,n,void 0,!0),!0}};function yn(t){return n=>{if(B(n)){let e;(e=wt.get(n))||wt.set(n,e=new Proxy(n,pn)),t(e)}return n}}let j={};function vn(t){j.stack&&t.setAttribute("stack",j.stack),j.position&&t.setAttribute("position",j.position),j.max!==void 0&&t.setAttribute("max",String(j.max)),j.appearance&&t.setAttribute("appearance",j.appearance),j.inverse!==void 0&&(j.inverse?t.setAttribute("inverse",""):t.removeAttribute("inverse"))}function fe(t){j={...j,...t},!(typeof document>"u")&&document.querySelectorAll("kai-toast-region").forEach(n=>vn(n))}const de=5e3,he=7e3,{toasts:It,setToasts:ut,mounted:je,setMounted:ge}=F(()=>{const[t,n]=gn([]),[e,r]=M(!1);return{toasts:t,setToasts:n,mounted:e,setMounted:r}});let bn=0;function pe(){return bn+=1,`toast-${bn}`}function ye(t){const n=t.duration??de;return n===0?0:t.action?Math.max(n,he):n}const wn=new Map;function ve(t=null){if(typeof document>"u")return;const n=wn.get(t);if(n&&n.isConnected)return n;const e=document.createElement("kai-toast-region");return document.body.appendChild(e),e.toasts=It,t&&(e.target=t),vn(e),wn.set(t,e),ge(!0),e}function be(t){const n=It.findIndex(e=>e.id===t.id);n>=0?ut(n,t):ut(yn(e=>{e.push(t)}))}function mn(t){ut(n=>n.filter(e=>e.id!==t))}function we(t){return{id:t,dismiss:()=>mn(t),update:n=>{const e=It.findIndex(r=>r.id===t);e>=0&&ut(e,r=>({...r,...n}))}}}function ct(t,n,e){ve(n?.target??null);const r=n?.id??pe(),o={id:r,message:t,variant:n?.variant??e,appearance:n?.appearance??j.appearance??"pill",inverse:n?.inverse??j.inverse??!1,description:n?.description,action:n?.action,duration:n?.duration,dismissible:n?.dismissible,target:n?.target};return be(o),we(r)}const me=Object.assign((t,n)=>ct(t,n,"neutral"),{success:(t,n)=>ct(t,n,"success"),warning:(t,n)=>ct(t,n,"warning"),error:(t,n)=>ct(t,n,"error"),info:(t,n)=>ct(t,n,"info"),dismiss:mn,clear:()=>ut([])}),Se=typeof window<"u"&&typeof customElements<"u"?import("./register-impl-C96AnOJn.js").then(t=>t.r):Promise.resolve();export{ye as A,ie as E,ne as F,ee as I,se as M,re as S,F as a,Gt as b,A as c,Cn as classifyTool,_n as configureCodeHighlighting,fe as configureToasts,Qt as d,Bn as e,Se as elementsReady,M as f,Nn as g,Yn as h,Fn as i,qn as isCodeHighlightingEnabled,Gn as j,Ct as k,te as l,Xn as m,Tn as n,tt as o,In as p,$n as q,Xt as r,p as s,Pn as t,me as toast,m as u,oe as v,gn as w,yn as x,R as y,Vt as z};
package/dist/mcp.es.js CHANGED
@@ -737,14 +737,14 @@ Call component_reference with no name (or name: "list") to list all ${all.length
737
737
  lines.push(`- **${slot.name}**${desc ? ` — ${desc}` : ""}`);
738
738
  }
739
739
  }
740
- const parts = el.cssParts ?? [];
741
- if (parts.length > 0) {
740
+ const parts2 = el.cssParts ?? [];
741
+ if (parts2.length > 0) {
742
742
  lines.push(
743
743
  "",
744
744
  "### Styleable parts (`::part`)",
745
745
  "Restyle these from outside the Shadow DOM via `" + tag + "::part(name) { … }`."
746
746
  );
747
- for (const part of parts) {
747
+ for (const part of parts2) {
748
748
  const desc = part.description?.trim() ?? "";
749
749
  lines.push(`- **${part.name}**${desc ? ` — ${desc}` : ""}`);
750
750
  if (part.recipe) {
@@ -2594,6 +2594,83 @@ function listIntegrations() {
2594
2594
  function listArchetypes() {
2595
2595
  return archetypes;
2596
2596
  }
2597
+ const ENCODABLE = [
2598
+ { pattern: "image/jpeg", kind: "image" },
2599
+ { pattern: "image/png", kind: "image" },
2600
+ { pattern: "image/gif", kind: "image" },
2601
+ { pattern: "image/webp", kind: "image" },
2602
+ { pattern: "application/pdf", kind: "document" },
2603
+ { pattern: "text/*", kind: "text" },
2604
+ { pattern: "application/json", kind: "text" },
2605
+ { pattern: "application/xml", kind: "text" },
2606
+ { pattern: "application/x-yaml", kind: "text" },
2607
+ { pattern: "application/yaml", kind: "text" }
2608
+ ];
2609
+ const UNNAMED_TEXT_MEDIA_TYPE = "text/plain";
2610
+ const NAMES_NOTHING = ["", "application/octet-stream"];
2611
+ const normalize = (value) => value.trim().toLowerCase();
2612
+ const namesNothing = (mediaType) => NAMES_NOTHING.includes(mediaType === void 0 ? "" : normalize(mediaType));
2613
+ const assertMediaType = (entry) => {
2614
+ if (!entry.startsWith(".")) return entry;
2615
+ throw new Error(
2616
+ `\`accept\` entry "${entry}" is a file extension, and this kit takes media types only. HTML's own accept attribute does take extensions, which is exactly why this throws rather than quietly matching nothing. Use a media type instead -- "text/*" covers source files, "image/*" images, "application/pdf" PDFs, and \`encodableMediaTypes()\` is the full set. You lose nothing by dropping the extension: a file the browser cannot name is decided by decoding its bytes, which is stronger than matching its name.`
2617
+ );
2618
+ };
2619
+ const splitFilter = (filter) => (typeof filter === "string" ? filter.split(",") : filter).map(normalize).filter((v2) => v2 !== "").map(assertMediaType);
2620
+ const parts = (pattern) => {
2621
+ const slash = pattern.indexOf("/");
2622
+ return slash === -1 ? [pattern, ""] : [pattern.slice(0, slash), pattern.slice(slash + 1)];
2623
+ };
2624
+ const matches = (pattern, mediaType) => {
2625
+ const [pType, pSub] = parts(pattern);
2626
+ const [mType, mSub] = parts(mediaType);
2627
+ if (pType !== "*" && pType !== mType) return false;
2628
+ return pSub === "*" || pSub === mSub;
2629
+ };
2630
+ const intersect = (capability, filter) => {
2631
+ if (matches(capability, filter)) return filter;
2632
+ if (matches(filter, capability)) return capability;
2633
+ return void 0;
2634
+ };
2635
+ function encodableMediaTypes() {
2636
+ return ENCODABLE.map((entry) => entry.pattern);
2637
+ }
2638
+ function resolveMediaPolicy(options = {}) {
2639
+ const filter = options.accept === void 0 ? void 0 : splitFilter(options.accept);
2640
+ const effective = [];
2641
+ for (const capability of ENCODABLE) {
2642
+ if (filter === void 0) {
2643
+ effective.push({ ...capability });
2644
+ continue;
2645
+ }
2646
+ for (const wanted of filter) {
2647
+ const overlap = intersect(capability.pattern, wanted);
2648
+ if (overlap !== void 0 && !effective.some((e) => e.pattern === overlap)) {
2649
+ effective.push({ pattern: overlap, kind: capability.kind });
2650
+ }
2651
+ }
2652
+ }
2653
+ return {
2654
+ types: effective.map((e) => e.pattern),
2655
+ accept: effective.map((e) => e.pattern).join(","),
2656
+ decide(mediaType) {
2657
+ const type = mediaType === void 0 ? "" : normalize(mediaType);
2658
+ if (namesNothing(type)) {
2659
+ return effective.some((e) => matches(e.pattern, UNNAMED_TEXT_MEDIA_TYPE)) ? { status: "undetermined" } : (
2660
+ // `unsupported` rather than `filtered`, deliberately: `filtered`
2661
+ // claims the kit COULD have encoded this file, and nobody has
2662
+ // established what it is. Unread and unnamed, it is not a text
2663
+ // file the filter excluded -- it is a file with no known type.
2664
+ { status: "unsupported" }
2665
+ );
2666
+ }
2667
+ const hit = effective.find((e) => matches(e.pattern, type));
2668
+ if (hit) return { status: "allowed", kind: hit.kind };
2669
+ return ENCODABLE.some((e) => matches(e.pattern, type)) ? { status: "filtered" } : { status: "unsupported" };
2670
+ }
2671
+ };
2672
+ }
2673
+ resolveMediaPolicy();
2597
2674
  const text = (s) => ({
2598
2675
  content: [{ type: "text", text: s }]
2599
2676
  });
@@ -3015,6 +3092,7 @@ const ATTACHMENT_TAGS = /* @__PURE__ */ new Set(["kai-file-upload", "kai-attachm
3015
3092
  function hasAttachments(components) {
3016
3093
  return components.includes("kai-file-upload") && components.includes("kai-attachments");
3017
3094
  }
3095
+ const ATTACHMENT_ACCEPT = encodableMediaTypes().join(",");
3018
3096
  const ATTACHMENT_WIRE_NOTE = [
3019
3097
  "// The staged files ride along on the message as `file` parts, so they RENDER",
3020
3098
  "// in the thread AND reach the model: toOpenAIMessages / toAnthropicMessages",
@@ -3119,7 +3197,7 @@ function componentTags(components, chatFill) {
3119
3197
  ` <!-- Drop files here to stage them for the NEXT message. src/main.ts wires`,
3120
3198
  ` kai-files-added -> the staged list -> kai-attachments' items property. -->`,
3121
3199
  ` <div style="flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem;">`,
3122
- ` <kai-file-upload id="upload" accept="image/*,application/pdf"></kai-file-upload>`,
3200
+ ` <kai-file-upload id="upload" accept="${ATTACHMENT_ACCEPT}"></kai-file-upload>`,
3123
3201
  ` <!-- items is a JS PROPERTY (arrays can't be attributes); 'removable' fires kai-remove. -->`,
3124
3202
  ` <kai-attachments id="attachments" variant="inline" removable></kai-attachments>`,
3125
3203
  ` </div>`
@@ -3382,7 +3460,7 @@ function renderJsx(components, ctx, framework) {
3382
3460
  const attachmentJsx = attachments ? [
3383
3461
  ` {/* Drop files here to stage them for the NEXT message. */}`,
3384
3462
  ` <div style={{ flex: '0 0 auto', display: 'flex', flexDirection: 'column', gap: '0.5rem', padding: '0.75rem' }}>`,
3385
- ` <FileUpload accept="image/*,application/pdf" onFilesAdded={onFilesAdded} />`,
3463
+ ` <FileUpload accept="${ATTACHMENT_ACCEPT}" onFilesAdded={onFilesAdded} />`,
3386
3464
  ` {/* items is an ARRAY, so the wrapper sets it as a DOM property, never an attribute. */}`,
3387
3465
  ` <Attachments items={staged} variant="inline" removable onRemove={onRemoveAttachment} />`,
3388
3466
  ` </div>`
@@ -3659,7 +3737,7 @@ function renderVue(components, ctx) {
3659
3737
  const attachmentTemplate = attachments ? [
3660
3738
  ` <!-- Drop files here to stage them for the NEXT message. -->`,
3661
3739
  ` <div style="flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem;">`,
3662
- ` <kai-file-upload accept="image/*,application/pdf" @kai-files-added="onFilesAdded" />`,
3740
+ ` <kai-file-upload accept="${ATTACHMENT_ACCEPT}" @kai-files-added="onFilesAdded" />`,
3663
3741
  ` <kai-attachments :items.prop="staged" variant="inline" removable @kai-remove="onRemoveAttachment" />`,
3664
3742
  ` </div>`
3665
3743
  ].join("\n") : "";
@@ -3914,7 +3992,7 @@ function renderSvelte(components, ctx) {
3914
3992
  const attachmentMarkup = attachments ? [
3915
3993
  ` <!-- Drop files here to stage them for the NEXT message. -->`,
3916
3994
  ` <div style="flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem;">`,
3917
- ` <kai-file-upload accept="image/*,application/pdf" onkai-files-added={onFilesAdded}></kai-file-upload>`,
3995
+ ` <kai-file-upload accept="${ATTACHMENT_ACCEPT}" onkai-files-added={onFilesAdded}></kai-file-upload>`,
3918
3996
  ` <kai-attachments bind:this={attachmentsEl} variant="inline" removable onkai-remove={onRemoveAttachment}></kai-attachments>`,
3919
3997
  ` </div>`
3920
3998
  ] : [];
@@ -4033,7 +4111,7 @@ function renderTanstackStart(components, ctx) {
4033
4111
  const attachmentJsx = attachments ? [
4034
4112
  ` {/* Drop files here to stage them for the NEXT message. */}`,
4035
4113
  ` <div style={{ flex: '0 0 auto', display: 'flex', flexDirection: 'column', gap: '0.5rem', padding: '0.75rem' }}>`,
4036
- ` <FileUpload accept="image/*,application/pdf" onFilesAdded={onFilesAdded} />`,
4114
+ ` <FileUpload accept="${ATTACHMENT_ACCEPT}" onFilesAdded={onFilesAdded} />`,
4037
4115
  ` {/* items is an ARRAY, so the wrapper sets it as a DOM property, never an attribute. */}`,
4038
4116
  ` <Attachments items={staged} variant="inline" removable onRemove={onRemoveAttachment} />`,
4039
4117
  ` </div>`
@@ -4235,7 +4313,7 @@ function renderAngular(components, ctx) {
4235
4313
  const attachmentTemplate = attachments ? [
4236
4314
  ` <!-- Drop files here to stage them for the NEXT message. -->`,
4237
4315
  ` <div style="flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem;">`,
4238
- ` <kai-file-upload accept="image/*,application/pdf" (kai-files-added)="onFilesAdded($event)"></kai-file-upload>`,
4316
+ ` <kai-file-upload accept="${ATTACHMENT_ACCEPT}" (kai-files-added)="onFilesAdded($event)"></kai-file-upload>`,
4239
4317
  ` <kai-attachments [items]="staged()" variant="inline" removable (kai-remove)="onRemoveAttachment($event)"></kai-attachments>`,
4240
4318
  ` </div>`
4241
4319
  ] : [];
@@ -4542,7 +4620,17 @@ function renderSolid(components, ctx) {
4542
4620
  ` // shortened the array.`,
4543
4621
  ` <Show when={messages()[i()]}>`,
4544
4622
  ` {(m) => (`,
4545
- ` <Message class={\`mx-auto flex w-full max-w-3xl flex-col gap-2 px-6 \${m().role === 'user' ? 'items-end' : 'items-start'}\`}>`,
4623
+ ` <Message`,
4624
+ ` // \`role\` is the SPEAKER, not an ARIA role — <Message> turns it`,
4625
+ ` // into role="article" plus an aria-label naming the speaker, and`,
4626
+ ` // a data-role hook for styling. Omit it and the row is an`,
4627
+ ` // unlabelled <div> that tells a screen reader nothing about who`,
4628
+ ` // is talking. The alignment class below reads the SAME value: if`,
4629
+ ` // you are deriving CSS from a semantic field, the semantics have`,
4630
+ ` // to reach the DOM too.`,
4631
+ ` role={m().role}`,
4632
+ ` class={\`mx-auto flex w-full max-w-3xl flex-col gap-2 px-6 \${m().role === 'user' ? 'items-end' : 'items-start'}\`}`,
4633
+ ` >`,
4546
4634
  ` {/* <Index>, not <For>, INSIDE a message. The state folds only`,
4547
4635
  ` ever append a part or patch one in place — they never`,
4548
4636
  ` reorder — so a part's POSITION is a stable identity, and`,
@@ -4598,7 +4686,7 @@ function renderSolid(components, ctx) {
4598
4686
  ` {/* Read every file BEFORE appending: a per-file append would order`,
4599
4687
  ` the list by whichever finished reading first. */}`,
4600
4688
  ` <FileUpload`,
4601
- ` accept="image/*,application/pdf"`,
4689
+ ` accept="${ATTACHMENT_ACCEPT}"`,
4602
4690
  ` onFilesAdded={async (files) => setStaged([...staged(), ...(await Promise.all(files.map(toAttachment)))])}`,
4603
4691
  ` >`,
4604
4692
  ` <FileUploadTrigger class="border-border text-muted-foreground w-full rounded-xl border border-dashed px-4 py-3 text-center text-sm">`,