libre-webui 0.19.2 → 0.19.3

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 (91) hide show
  1. package/backend/dist/index.d.ts.map +1 -1
  2. package/backend/dist/index.js +61 -2
  3. package/backend/dist/index.js.map +1 -1
  4. package/backend/dist/routes/artifacts.d.ts +3 -0
  5. package/backend/dist/routes/artifacts.d.ts.map +1 -0
  6. package/backend/dist/routes/artifacts.js +167 -0
  7. package/backend/dist/routes/artifacts.js.map +1 -0
  8. package/backend/package.json +1 -1
  9. package/frontend/dist/apple-touch-icon.png +0 -0
  10. package/frontend/dist/artifact-runtime/.build-fingerprint +1 -0
  11. package/frontend/dist/artifact-runtime/babel.js +613 -0
  12. package/frontend/dist/artifact-runtime/chart.js +3 -0
  13. package/frontend/dist/artifact-runtime/d3.js +5 -0
  14. package/frontend/dist/artifact-runtime/fonts.js +255 -0
  15. package/frontend/dist/artifact-runtime/framer-motion.js +10 -0
  16. package/frontend/dist/artifact-runtime/lodash.js +20 -0
  17. package/frontend/dist/artifact-runtime/lucide-react.js +1 -0
  18. package/frontend/dist/artifact-runtime/mathjs.js +54 -0
  19. package/frontend/dist/artifact-runtime/mermaid.js +3535 -0
  20. package/frontend/dist/artifact-runtime/papaparse.js +10 -0
  21. package/frontend/dist/artifact-runtime/plotly.js +3790 -0
  22. package/frontend/dist/artifact-runtime/react.js +9 -0
  23. package/frontend/dist/artifact-runtime/recharts.js +69 -0
  24. package/frontend/dist/artifact-runtime/runtime.js +1 -0
  25. package/frontend/dist/artifact-runtime/tailwind.js +952 -0
  26. package/frontend/dist/artifact-runtime/three.js +5271 -0
  27. package/frontend/dist/artifact-runtime/tone.js +210 -0
  28. package/frontend/dist/assets/index-ZxtmHZ3Y.js +83 -0
  29. package/frontend/dist/assets/index-mBbb8flG.css +1 -0
  30. package/frontend/dist/favicon-dark.png +0 -0
  31. package/frontend/dist/favicon-light.png +0 -0
  32. package/frontend/dist/favicon.svg +1 -0
  33. package/frontend/dist/fonts/inter.css +254 -0
  34. package/frontend/dist/fonts/v20-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa0ZL7W0Q5n-wU.woff2 +0 -0
  35. package/frontend/dist/fonts/v20-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2 +0 -0
  36. package/frontend/dist/fonts/v20-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1pL7W0Q5n-wU.woff2 +0 -0
  37. package/frontend/dist/fonts/v20-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa25L7W0Q5n-wU.woff2 +0 -0
  38. package/frontend/dist/fonts/v20-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2JL7W0Q5n-wU.woff2 +0 -0
  39. package/frontend/dist/fonts/v20-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2ZL7W0Q5n-wU.woff2 +0 -0
  40. package/frontend/dist/fonts/v20-UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa2pL7W0Q5n-wU.woff2 +0 -0
  41. package/frontend/dist/icon-192.png +0 -0
  42. package/frontend/dist/icon-512.png +0 -0
  43. package/frontend/dist/index.html +15 -10
  44. package/frontend/dist/js/ArtifactContainer-DZV5ZT6g.js +1 -0
  45. package/frontend/dist/js/{ArtifactDemoPage-BlVBMy6a.js → ArtifactDemoPage-BX6d2sWa.js} +58 -2
  46. package/frontend/dist/js/ArtifactSandboxFrame-CSDSSxMI.js +151 -0
  47. package/frontend/dist/js/ArtifactSlideOutPanel-BYy4Yv_U.js +1 -0
  48. package/frontend/dist/js/ChatPage-Bk1fO2xt.js +16 -0
  49. package/frontend/dist/js/FirstTimeSetup-ByfcKmYo.js +1 -0
  50. package/frontend/dist/js/{GalleryPage-BnaFZERr.js → GalleryPage-DLLiZj6X.js} +1 -1
  51. package/frontend/dist/js/{HomePage-BvpoUzGG.js → HomePage-DHuuGx-r.js} +1 -1
  52. package/frontend/dist/js/{LibreClawPage-B-6rO5Jl.js → LibreClawPage-BfCXrQ-e.js} +1 -1
  53. package/frontend/dist/js/{ModelSelector-BV1kuaVg.js → ModelSelector-BET34RYg.js} +1 -1
  54. package/frontend/dist/js/{ModelsPage-D5H70fs3.js → ModelsPage-BxLpqELH.js} +1 -1
  55. package/frontend/dist/js/{NotesPage-D9b3JxCx.js → NotesPage-BC62unJU.js} +1 -1
  56. package/frontend/dist/js/{PersonasPage-CJOGnyQV.js → PersonasPage-BsOyNy8l.js} +2 -2
  57. package/frontend/dist/js/{PluginUsagePage-DHNMWquK.js → PluginUsagePage-CLpKYGwg.js} +1 -1
  58. package/frontend/dist/js/{RichMessageContent-C7NG7gs-.js → RichMessageContent-BTcjK7f1.js} +1 -1
  59. package/frontend/dist/js/SettingsModal-ao0lVJHy.js +1 -0
  60. package/frontend/dist/js/{SystemPage-BsPen2Qb.js → SystemPage-ZMCqqgBt.js} +1 -1
  61. package/frontend/dist/js/{UserManagementPage-I9i5r0V3.js → UserManagementPage-6PsAs-Uy.js} +1 -1
  62. package/frontend/dist/js/WorkPage-t7NVWt81.js +5 -0
  63. package/frontend/dist/js/api-F_fsjYA7.js +19 -0
  64. package/frontend/dist/js/{appStore-CLIS0fvz.js → appStore-ne0eCPTX.js} +2 -2
  65. package/frontend/dist/js/{authStore-CsCkBmaG.js → authStore-DqsiGpyN.js} +1 -1
  66. package/frontend/dist/js/{chatStore-DRY8C0J1.js → chatStore-DRg2vRDS.js} +2 -2
  67. package/frontend/dist/js/config-DZsEwEPX.js +1 -0
  68. package/frontend/dist/js/{estree-CrfVSazx.js → estree-CWs-Kavs.js} +1 -1
  69. package/frontend/dist/js/{html-BbJLJMaV.js → html-DrDcdqPC.js} +1 -1
  70. package/frontend/dist/js/{markdown-DiMg1QLf.js → markdown-CbB02VPB.js} +1 -1
  71. package/frontend/dist/js/{messageCodeStyles-CfzjQF-R.js → messageCodeStyles-D1gR4Bnk.js} +1 -1
  72. package/frontend/dist/js/{standalone-Vs6LnjM6.js → standalone-BIvqjowG.js} +1 -1
  73. package/frontend/dist/js/{typescript-BhVG1zGU.js → typescript-kUuRGkxH.js} +1 -1
  74. package/frontend/dist/js/{ui-Dj9IFugT.js → ui-D4PVoJDa.js} +2 -2
  75. package/frontend/dist/logo-dark.png +0 -0
  76. package/frontend/dist/logo-dark.svg +1 -0
  77. package/frontend/dist/logo-light.png +0 -0
  78. package/frontend/dist/logo-light.svg +1 -0
  79. package/frontend/dist/logo.svg +1 -6
  80. package/frontend/dist/maskable-512.png +0 -0
  81. package/package.json +2 -2
  82. package/frontend/dist/assets/index-B9H3vQ-n.css +0 -1
  83. package/frontend/dist/assets/index-D4LhtFTX.js +0 -38
  84. package/frontend/dist/js/ArtifactContainer-DvuGeXXu.js +0 -1
  85. package/frontend/dist/js/ArtifactSlideOutPanel-CaPMk1Qj.js +0 -1
  86. package/frontend/dist/js/ChatPage-D4UBhGLk.js +0 -16
  87. package/frontend/dist/js/FirstTimeSetup-DJiDNTXY.js +0 -1
  88. package/frontend/dist/js/SettingsModal-DEBxDPne.js +0 -1
  89. package/frontend/dist/js/WorkPage-e30yqvJe.js +0 -5
  90. package/frontend/dist/js/api-jwjnjqx6.js +0 -19
  91. package/frontend/dist/js/artifactHtml-C0Hu9I1u.js +0 -41
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/api-jwjnjqx6.js","js/rolldown-runtime-hePW80VL.js","js/router-vendor-Ca9zqOqT.js","js/markdown-core-DHnR5Hw8.js","js/utils-vendor-1zob7nK9.js","js/logger-DSXjF4ye.js"])))=>i.map(i=>d[i]);
2
- import{i as e}from"./router-vendor-Ca9zqOqT.js";import{Tn as t}from"./ui-vendor-D_pYT79f.js";import{o as n}from"./utils-vendor-1zob7nK9.js";import{t as r}from"./logger-DSXjF4ye.js";import{c as i,l as a,p as o,u as s,x as c}from"./api-jwjnjqx6.js";import{r as l}from"./utils-BhpNrGnR.js";var u=[`Chat`,`Image`,`Video`,`Audio`,`Speech`,`Transcription`,`Embedding`],d={chat:`Chat`,completion:`Chat`,embedding:`Embedding`,image:`Image`,audio:`Audio`,stt:`Transcription`,tts:`Speech`,video:`Video`},f={completion:`Chat`,embedding:`Embedding`,image:`Image`,audio:`Audio`,stt:`Transcription`,tts:`Speech`,video:`Video`};function p(e){let t=new Map,n=(e,n)=>{for(let r of e||[]){if(typeof r!=`string`||!r.trim())continue;let e=r.trim(),i=t.get(e)??new Set;i.add(n),t.set(e,i)}};n(e.model_map,d[e.type]);for(let t of Object.keys(e.capabilities||{}))n(e.capabilities?.[t]?.model_map,f[t]);return Array.from(t,([e,t])=>({id:e,capabilities:u.filter(e=>t.has(e))}))}function m(e){return e.type===`chat`||e.type===`completion`}var h=[`dall-e`,`embed`,`gpt-image`,`moderation`,`rerank`,`sora`,`stable-diffusion`,`text-to-speech`,`tts`,`whisper`];function g(e){let t=e.toLocaleLowerCase();return!h.some(e=>t.includes(e))}function _(e){let t=new Set;for(let[n,r]of Object.entries(e.capabilities||{}))if(n!==`completion`)for(let e of r?.model_map||[])t.add(e.trim());return(e.model_map||[]).filter(e=>typeof e==`string`&&e.trim().length>0&&!t.has(e.trim())&&g(e))}function v(e,t){let n=t.trim().toLocaleLowerCase();return!n||[e.name,e.id,e.type,...p(e).map(e=>e.id)].some(e=>e?.toLocaleLowerCase().includes(n))}var y=(e,t)=>{if(e&&typeof e==`object`&&`response`in e){let t=e;if(t.response?.data?.error)return t.response.data.error}return e instanceof Error?e.message:t};function b(e){return{...e,id:e.id||l(),timestamp:Date.now()}}function x(e,t){return e.currentSession?.isPrivate&&e.currentSession?.id===t}function S(e,t){return e.sessions.some(e=>e.id===t)}function C(e,t){return!!e.currentSession&&(x(e,t)||S(e,e.currentSession.id))}function w(e,t,n){if(x(e,t))return e.currentSession.messages.find(e=>e.id===n.id)?e:{currentSession:{...e.currentSession,messages:[...e.currentSession.messages,n],updatedAt:Date.now()},sessions:e.sessions};if(e.sessions.find(e=>e.id===t)?.messages.some(e=>e.id===n.id))return e;let r=e.sessions.map(e=>{if(e.id!==t)return e;let r=[...e.messages];if(n.parentId){let e=n.parentId;r=r.map(t=>t.id!==e&&t.parentId!==e?t:{...t,isActive:!1,branchIndex:t.branchIndex??0,siblingCount:(n.branchIndex||0)+1})}return{...e,messages:[...r,n],updatedAt:Date.now()}});return{sessions:r,currentSession:e.currentSession?.id===t&&r.find(e=>e.id===t)||e.currentSession}}function T(e,t,n,r){if(e.currentSession?.id!==t)return e;if(e.currentSession?.isPrivate){let t=e.currentSession.messages.find(e=>e.id===n);return!t||t.content===r?e:{sessions:e.sessions,currentSession:{...e.currentSession,messages:e.currentSession.messages.map(e=>e.id===n?{...e,content:r}:e),updatedAt:Date.now()}}}let i=e.sessions.find(e=>e.id===t),a=i?.messages.find(e=>e.id===n);if(!i||!a||a.content===r)return e;let o=e.sessions.map(e=>e.id===t?{...e,messages:e.messages.map(e=>e.id===n?{...e,content:r}:e),updatedAt:Date.now()}:e);return{sessions:o,currentSession:e.currentSession?.id===t&&o.find(e=>e.id===t)||e.currentSession}}function E(e,t,n,r,i,a,o){if(e.currentSession?.id!==t)return e;if(e.currentSession?.isPrivate)return{sessions:e.sessions,currentSession:{...e.currentSession,messages:e.currentSession.messages.map(e=>e.id===n?{...e,content:r,thinking:o,statistics:i,...a?{providerMetadata:a}:{}}:e),updatedAt:Date.now()}};let s=e.sessions.map(e=>e.id===t?{...e,messages:e.messages.map(e=>e.id===n?{...e,content:r,thinking:o,statistics:i,...a?{providerMetadata:a}:{}}:e),updatedAt:Date.now()}:e);return{sessions:s,currentSession:e.currentSession?.id===t&&s.find(e=>e.id===t)||e.currentSession}}function D(e){return e.reduce((e,t)=>(e[t.id]=t,e),{})}function O(e){return e.map(e=>({name:`persona:${e.id}`,model:e.model,size:0,digest:``,details:{parent_model:e.model,format:`persona`,family:`persona`,families:[`persona`],parameter_size:``,quantization_level:``},modified_at:new Date(e.updated_at).toISOString(),expires_at:new Date().toISOString(),size_vram:0,isPersona:!0,personaName:e.name,personaDescription:e.description}))}function k(e){return e.filter(e=>e.active&&e.type!==`tts`&&e.type!==`image`).flatMap(e=>_(e).map(t=>({name:t,model:t,size:0,digest:``,details:{parent_model:``,format:``,family:``,families:[],parameter_size:``,quantization_level:``},modified_at:new Date().toISOString(),expires_at:new Date().toISOString(),size_vram:0,isPlugin:!0,pluginId:e.id,pluginName:e.name})))}var A=`persona:`,j=`plugin:`,M=`ollama:`,N=`legacy:`,P=`agent:`,F=e=>{try{return decodeURIComponent(e)}catch{return null}};function I(e){return e.isLegacySelection?{model:e.name,providerType:null,providerId:null}:e.isPersona?{model:e.name,providerType:`ollama`,providerId:null}:e.isPlugin&&e.pluginId?{model:e.name,providerType:`plugin`,providerId:e.pluginId}:e.isAgent?{model:e.name,providerType:`agent`,providerId:e.agentId||e.name}:{model:e.name,providerType:`ollama`,providerId:null}}function L(e){return e.providerType?e.providerType===`plugin`&&e.providerId?`${j}${encodeURIComponent(e.providerId)}:${encodeURIComponent(e.model)}`:e.providerType===`agent`&&e.providerId?`${P}${encodeURIComponent(e.providerId)}:${encodeURIComponent(e.model)}`:e.providerType===`ollama`&&e.model.startsWith(A)?`${A}${encodeURIComponent(e.model.slice(8))}`:e.providerType===`ollama`?`${M}${encodeURIComponent(e.model)}`:`${N}${encodeURIComponent(e.model)}`:`${N}${encodeURIComponent(e.model)}`}function R(e){return L(I(e))}function z(e){if(e.startsWith(A)){let t=F(e.slice(8));return t===null?null:{model:`${A}${t}`,providerType:`ollama`,providerId:null}}if(e.startsWith(j)){let t=e.slice(7),n=t.indexOf(`:`);if(n<1)return null;let r=F(t.slice(0,n)),i=F(t.slice(n+1));return r&&i?{model:i,providerType:`plugin`,providerId:r}:null}if(e.startsWith(P)){let t=e.slice(6),n=t.indexOf(`:`);if(n<1)return null;let r=F(t.slice(0,n)),i=F(t.slice(n+1));return r&&i?{model:i,providerType:`agent`,providerId:r}:null}if(e.startsWith(M)){let t=F(e.slice(7));return t?{model:t,providerType:`ollama`,providerId:null}:null}if(e.startsWith(N)){let t=F(e.slice(7));return t?{model:t,providerType:null,providerId:null}:null}return null}function B(e,t){return t.providerType===`plugin`?e.find(e=>e.isPlugin&&e.pluginId===t.providerId&&e.name===t.model):t.providerType===`agent`?e.find(e=>e.isAgent&&e.name===t.model):t.providerType===`ollama`?t.model.startsWith(A)?e.find(e=>e.isPersona&&e.name===t.model):e.find(e=>!e.isPlugin&&!e.isPersona&&e.name===t.model):e.find(e=>e.isLegacySelection&&e.name===t.model)??e.find(e=>e.name===t.model)}function V(e,t){if(!t.providerType)return L(t);let n=B(e,t);return n?R(n):L(t)}function H(e,t){let n=e.find(e=>R(e)===t);return n?I(n):z(t)}function U(e){return!e.isPlugin&&!e.isPersona&&!e.isAgent&&!e.isLegacySelection&&!e.isUnavailable}function W(e,t){return t.model?!!B(e.filter(e=>!e.isLegacySelection&&!e.isUnavailable),t):!1}function G(e,t){if(!t.model)return e;if(!t.providerType){if(e.some(e=>e.isLegacySelection&&e.name===t.model))return e;let n=!!B(e,t);return[...e,{name:t.model,model:t.model,size:0,digest:``,modified_at:``,details:{},isLegacySelection:!0,isUnavailable:!n}]}if(B(e,t))return e;let n=t.providerType,r=n===`ollama`&&t.model.startsWith(A),i=n===`plugin`&&t.providerId||void 0;return[...e,{name:t.model,model:t.model,size:0,digest:``,modified_at:``,details:{},isPlugin:n===`plugin`,pluginId:i,pluginName:i,isAgent:n===`agent`,agentId:n===`agent`&&t.providerId||void 0,isPersona:r,personaName:r?t.model.slice(8):void 0,isUnavailable:!0}]}var K=r(`chat-store`),q=n((n,r)=>({sessions:[],currentSession:null,setCurrentSession:e=>{n({currentSession:e})},createSession:async(e,r,i,a,o)=>{try{n({loading:!0,error:null});let s=await c.createSession(e,r,i,a,o);if(s.success&&s.data){let e=s.data;return n(t=>({sessions:[e,...t.sessions],currentSession:e,loading:!1})),t.success(`New chat created`),e}}catch(e){let r=y(e,`Failed to create session`);n({error:r,loading:!1}),t.error(r)}},loadSessions:async()=>{try{n({loading:!0,error:null});let e=await c.getSessions();e.success&&e.data&&n(t=>{let n=e.data||[],r=n.map(e=>e.id),i=null;return t.currentSession?.isPrivate?i=t.currentSession:t.currentSession&&r.includes(t.currentSession.id)?i=n.find(e=>e.id===t.currentSession.id)||null:n.length>0&&(i=n[0],t.currentSession&&K.warn(`Previous currentSession not found in backend sessions:`,t.currentSession.id)),{sessions:n,currentSession:i,loading:!1}})}catch(e){let r=y(e,`Failed to load sessions`);n({error:r,loading:!1}),t.error(r)}},deleteSession:async e=>{try{let r=await c.deleteSession(e);r.success?(n(t=>{let n=t.sessions.filter(t=>t.id!==e),r=t.currentSession?.id===e?n[0]||null:t.currentSession;return K.debug(`Store: Updating state, sessions count:`,n.length),{sessions:n,currentSession:r}}),t.success(`Chat deleted`)):(K.error(`Store: deleteSession failed:`,r),t.error(`Failed to delete chat`))}catch(e){K.error(`Store: deleteSession error:`,e);let n=y(e,`Failed to delete session`);t.error(n)}},clearAllSessions:async()=>{try{n({loading:!0,error:null});let e=await c.clearAllSessions();e.success?(n({sessions:[],currentSession:null,loading:!1}),t.success(`All chat history cleared`)):(K.error(`Store: clearAllSessions failed:`,e),t.error(`Failed to clear chat history`),n({loading:!1}))}catch(e){K.error(`Store: clearAllSessions error:`,e);let r=y(e,`Failed to clear chat history`);t.error(r),n({loading:!1})}},clearAllState:()=>{n({sessions:[],currentSession:null,models:[],selectedModel:``,selectedProviderType:null,selectedProviderId:null,systemMessage:``,loading:!1,error:null})},applySessionTitle:(e,t,r=Date.now())=>{n(n=>({sessions:n.sessions.map(n=>n.id===e?{...n,title:t,updatedAt:r}:n),currentSession:n.currentSession?.id===e?{...n.currentSession,title:t,updatedAt:r}:n.currentSession}))},updateSessionTitle:async(e,n)=>{try{let i=await c.updateSession(e,{title:n});if(i.success&&i.data){let n=i.data.title,a=i.data.updatedAt??Date.now();r().applySessionTitle(e,n,a),t.success(`Chat title updated`)}}catch(e){let n=y(e,`Failed to update session`);t.error(n)}},addMessage:(e,i)=>{let a=r(),o=x(a,e);if(!C(a,e)){t.error(`No valid chat session. Please create or select a chat.`),K.error(`addMessage blocked: currentSession is not valid`,a.currentSession?.id);return}if(!o&&!S(a,e)){t.error(`Session not found or invalid. Please select or create a valid chat session.`),K.error(`addMessage blocked: sessionId not found in sessions`,e);return}let s=b(i);n(t=>w(t,e,s))},updateMessage:(e,t,r)=>{n(n=>T(n,e,t,r))},updateMessageWithStatistics:(e,t,r,i,a,o)=>{n(n=>E(n,e,t,r,i,a,o))},rateMessage:async(e,t,i)=>{let a=e=>e.map(e=>e.id===t?{...e,rating:i}:e),o=r().currentSession?.isPrivate;if(n(t=>({sessions:t.sessions.map(t=>t.id===e?{...t,messages:a(t.messages)}:t),currentSession:t.currentSession?.id===e?{...t.currentSession,messages:a(t.currentSession.messages)}:t.currentSession})),!o)try{await c.updateMessage(e,t,{rating:i??null})}catch(e){K.error(`Failed to save message rating:`,e)}},folders:[],loadFolders:async()=>{try{let e=await c.getFolders();e.success&&e.data&&n({folders:e.data})}catch(e){K.error(`Failed to load folders:`,e)}},createFolder:async e=>{try{let t=await c.createFolder(e);if(t.success&&t.data){let e=t.data;return n(t=>({folders:[...t.folders,e].sort((e,t)=>e.name.localeCompare(t.name))})),e}}catch(e){K.error(`Failed to create folder:`,e)}},renameFolder:async(e,t)=>{try{let r=await c.renameFolder(e,t);if(r.success&&r.data){let t=r.data;n(n=>({folders:n.folders.map(n=>n.id===e?t:n).sort((e,t)=>e.name.localeCompare(t.name))}))}}catch(e){K.error(`Failed to rename folder:`,e)}},deleteFolder:async e=>{try{(await c.deleteFolder(e)).success&&n(t=>({folders:t.folders.filter(t=>t.id!==e),sessions:t.sessions.map(t=>t.folderId===e?{...t,folderId:null}:t),currentSession:t.currentSession?.folderId===e?{...t.currentSession,folderId:null}:t.currentSession}))}catch(e){K.error(`Failed to delete folder:`,e)}},moveSessionToFolder:async(e,t)=>{n(n=>({sessions:n.sessions.map(n=>n.id===e?{...n,folderId:t}:n),currentSession:n.currentSession?.id===e?{...n.currentSession,folderId:t}:n.currentSession}));try{await c.updateSession(e,{folderId:t})}catch(e){K.error(`Failed to move session to folder:`,e)}},setSessionArchived:async(e,t)=>{n(n=>({sessions:n.sessions.map(n=>n.id===e?{...n,archived:t}:n),currentSession:n.currentSession?.id===e?{...n.currentSession,archived:t}:n.currentSession}));try{await c.updateSession(e,{archived:t})}catch(r){K.error(`Failed to update session archive state:`,r),n(n=>({sessions:n.sessions.map(n=>n.id===e?{...n,archived:!t}:n)}))}},truncateMessagesFrom:(e,t)=>{let r=e=>{let n=e.findIndex(e=>e.id===t);return n===-1?e:e.slice(0,n)};n(t=>({sessions:t.sessions.map(t=>t.id===e?{...t,messages:r(t.messages),updatedAt:Date.now()}:t),currentSession:t.currentSession?.id===e?{...t.currentSession,messages:r(t.currentSession.messages),updatedAt:Date.now()}:t.currentSession}))},models:[],loadModels:async()=>{try{n({loading:!0,error:null}),K.debug(`Loading models from API...`);let s=[],c;try{let e=await o.getModels();e.success&&e.data?(s=[...e.data],K.debug(`Ollama models loaded:`,e.data.length)):c=Error(e.error||e.message||`Ollama models are unavailable.`)}catch(e){c=e,K.warn(`Ollama models are unavailable; continuing with plugin models:`,e)}try{let e=await a.getAllPlugins();if(e.success&&e.data){let t=e.data.filter(e=>e.active&&e.type!==`tts`&&e.type!==`image`);K.debug(`🔌 Active plugins found:`,t.map(e=>e.name));let n=k(t);s.push(...n),K.debug(`Plugin models added:`,n.length)}}catch(e){K.error(`❌ Failed to load plugin models:`,e),e instanceof Error&&K.error(`❌ Plugin error details:`,{message:e.message,response:e.response?.data,status:e.response?.status,url:e.config?.url})}try{let{agentCliApi:t}=await e(async()=>{let{agentCliApi:e}=await import(`./api-jwjnjqx6.js`).then(e=>e.t);return{agentCliApi:e}},__vite__mapDeps([0,1,2,3,4,5])),n=await t.getModels();if(n.success&&n.data){let e=n.data.map(e=>({name:e.id,model:e.id,size:0,digest:``,modified_at:``,details:{},isAgent:!0,agentName:e.name,agentId:e.agentId}));s.push(...e),K.debug(`Agent CLI models added:`,e.length)}}catch(e){K.warn(`Agent CLI models unavailable:`,e)}let l=s.length;try{let{personaApi:t}=await e(async()=>{let{personaApi:e}=await import(`./api-jwjnjqx6.js`).then(e=>e.t);return{personaApi:e}},__vite__mapDeps([0,1,2,3,4,5])),r=await t.getPersonas();if(r.success&&r.data){let e=D(r.data),t=O(r.data);s.push(...t),n(t=>({...t,personas:e}))}}catch(e){K.error(`❌ Failed to load personas:`,e)}K.debug(`Total models loaded:`,s.length);let u=l===0&&c?y(c,`No model provider is available`):null,d=r(),f=d.selectedModel,p={model:f,providerType:d.selectedProviderType,providerId:d.selectedProviderId},m=!!B(s,p),h=d.selectedProviderType===`ollama`||d.selectedProviderType===`plugin`;if(f&&!m&&h){let e=`Selected model "${f}" is unavailable from ${d.selectedProviderType===`plugin`?d.selectedProviderId||`plugin`:`Ollama`}. Reactivate that provider or select another model.`;n({models:s,loading:!1,error:e}),t.error(e);return}if(f&&!m&&s.length>0){let e=I(s[0]);K.debug(`⚠️ Legacy selected model "${f}" no longer available, falling back to "${e.model}"`),n({models:s,loading:!1,selectedModel:e.model,selectedProviderType:e.providerType||null,selectedProviderId:e.providerId||null,error:u}),i.setDefaultModel(e.model,e.providerType,e.providerId).catch(e=>{K.warn(`Failed to save fallback default model:`,e)}),t.success(`Switched to ${e.model} (previous model no longer available)`)}else n({models:s,loading:!1,error:u});u&&t.error(u)}catch(e){K.error(`Error loading models:`,e);let r=y(e,`Failed to load models`);n({error:r,loading:!1}),t.error(r)}},loadPreferences:async()=>{try{let e=await i.getPreferences();if(e.success&&e.data){let{defaultModel:t,defaultProviderType:r,defaultProviderId:i,systemMessage:a}=e.data;t&&(n({selectedModel:t,selectedProviderType:r||null,selectedProviderId:r===`plugin`&&i||null}),K.debug(`✅ Loaded default model from backend:`,t)),a!==void 0&&(n({systemMessage:a}),K.debug(`✅ Loaded system message from backend`))}}catch(e){K.warn(`❌ Failed to load preferences from backend:`,e)}},selectedModel:``,selectedProviderType:null,selectedProviderId:null,setSelectedModel:(e,t=null,r=null)=>{let a=(t===`plugin`||t===`agent`)&&r||null;n({selectedModel:e,selectedProviderType:t,selectedProviderId:a}),i.setDefaultModel(e,t,a).catch(e=>{K.warn(`Failed to save default model to backend:`,e)})},updateCurrentSessionModel:async(e,i=null,a=null)=>{let o=r();if(!o.currentSession)throw Error(`No current session to update`);try{let r=await c.updateSession(o.currentSession.id,{model:e,providerType:i,providerId:i===`plugin`||i===`agent`?a:null});r.success&&r.data&&(n(t=>({sessions:t.sessions.map(e=>e.id===t.currentSession?.id?r.data:e),currentSession:r.data,selectedModel:e,selectedProviderType:i,selectedProviderId:(i===`plugin`||i===`agent`)&&a||null})),t.success(`Model updated for current chat`))}catch(e){let n=y(e,`Failed to update session model`);throw t.error(n),e}},personas:{},loadPersonas:async()=>{try{n({loading:!0,error:null});let e=await s.getPersonas();if(e.success&&e.data){let t=e.data;n({personas:D(t),loading:!1}),K.debug(`✅ Personas loaded:`,t.length)}}catch(e){let t=y(e,`Failed to load personas`);n({error:t,loading:!1}),K.error(`❌ Failed to load personas:`,t)}},getCurrentPersona:()=>{let e=r();if(!e.currentSession||!e.currentSession.model?.startsWith(`persona:`))return null;let t=e.currentSession.model.replace(`persona:`,``);return e.personas[t]||null},systemMessage:``,setSystemMessage:e=>{let t=r();if(n({systemMessage:e}),i.setSystemMessage(e).catch(e=>{K.warn(`Failed to save system message to backend:`,e)}),t.currentSession){let r=t.currentSession.messages.findIndex(e=>e.role===`system`);if(r!==-1){n(t=>{let n=t.sessions.map(n=>{if(n.id===t.currentSession?.id){let t=n.messages.map((t,n)=>n===r&&t.role===`system`?{...t,content:e,timestamp:Date.now()}:t);return{...n,messages:t,updatedAt:Date.now()}}return n});return{sessions:n,currentSession:t.currentSession?n.find(e=>e.id===t.currentSession.id)||t.currentSession:null}});let i=t.currentSession.messages[r];c.updateMessage(t.currentSession.id,i.id,{content:e}).catch(e=>{K.warn(`Failed to sync system message update to backend:`,e)}),K.debug(`✅ Updated system message in current session`)}}},loading:!1,error:null,setError:e=>n({error:e}),generatingTitleForSession:null,setGeneratingTitleForSession:e=>n({generatingTitleForSession:e}),...typeof window<`u`&&{testPluginApi:async()=>{try{K.debug(`🧪 Testing plugin API...`);let e=await a.getAllPlugins();return K.debug(`✅ Plugin API test result:`,e),e}catch(e){return K.error(`❌ Plugin API test failed:`,e),{error:e}}}}}));export{V as a,W as c,p as d,v as f,I as i,G as l,R as n,B as o,m as p,H as r,U as s,q as t,y as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/api-F_fsjYA7.js","js/rolldown-runtime-hePW80VL.js","js/router-vendor-Ca9zqOqT.js","js/markdown-core-DHnR5Hw8.js","js/utils-vendor-1zob7nK9.js","js/logger-DSXjF4ye.js","js/config-DZsEwEPX.js"])))=>i.map(i=>d[i]);
2
+ import{i as e}from"./router-vendor-Ca9zqOqT.js";import{Tn as t}from"./ui-vendor-D_pYT79f.js";import{o as n}from"./utils-vendor-1zob7nK9.js";import{t as r}from"./logger-DSXjF4ye.js";import{c as i,l as a,p as o,u as s,x as c}from"./api-F_fsjYA7.js";import{r as l}from"./utils-BhpNrGnR.js";var u=[`Chat`,`Image`,`Video`,`Audio`,`Speech`,`Transcription`,`Embedding`],d={chat:`Chat`,completion:`Chat`,embedding:`Embedding`,image:`Image`,audio:`Audio`,stt:`Transcription`,tts:`Speech`,video:`Video`},f={completion:`Chat`,embedding:`Embedding`,image:`Image`,audio:`Audio`,stt:`Transcription`,tts:`Speech`,video:`Video`};function p(e){let t=new Map,n=(e,n)=>{for(let r of e||[]){if(typeof r!=`string`||!r.trim())continue;let e=r.trim(),i=t.get(e)??new Set;i.add(n),t.set(e,i)}};n(e.model_map,d[e.type]);for(let t of Object.keys(e.capabilities||{}))n(e.capabilities?.[t]?.model_map,f[t]);return Array.from(t,([e,t])=>({id:e,capabilities:u.filter(e=>t.has(e))}))}function m(e){return e.type===`chat`||e.type===`completion`}var h=[`dall-e`,`embed`,`gpt-image`,`moderation`,`rerank`,`sora`,`stable-diffusion`,`text-to-speech`,`tts`,`whisper`];function g(e){let t=e.toLocaleLowerCase();return!h.some(e=>t.includes(e))}function _(e){let t=new Set;for(let[n,r]of Object.entries(e.capabilities||{}))if(n!==`completion`)for(let e of r?.model_map||[])t.add(e.trim());return(e.model_map||[]).filter(e=>typeof e==`string`&&e.trim().length>0&&!t.has(e.trim())&&g(e))}function v(e,t){let n=t.trim().toLocaleLowerCase();return!n||[e.name,e.id,e.type,...p(e).map(e=>e.id)].some(e=>e?.toLocaleLowerCase().includes(n))}var y=(e,t)=>{if(e&&typeof e==`object`&&`response`in e){let t=e;if(t.response?.data?.error)return t.response.data.error}return e instanceof Error?e.message:t};function b(e){return{...e,id:e.id||l(),timestamp:Date.now()}}function x(e,t){return e.currentSession?.isPrivate&&e.currentSession?.id===t}function S(e,t){return e.sessions.some(e=>e.id===t)}function C(e,t){return!!e.currentSession&&(x(e,t)||S(e,e.currentSession.id))}function w(e,t,n){if(x(e,t))return e.currentSession.messages.find(e=>e.id===n.id)?e:{currentSession:{...e.currentSession,messages:[...e.currentSession.messages,n],updatedAt:Date.now()},sessions:e.sessions};if(e.sessions.find(e=>e.id===t)?.messages.some(e=>e.id===n.id))return e;let r=e.sessions.map(e=>{if(e.id!==t)return e;let r=[...e.messages];if(n.parentId){let e=n.parentId;r=r.map(t=>t.id!==e&&t.parentId!==e?t:{...t,isActive:!1,branchIndex:t.branchIndex??0,siblingCount:(n.branchIndex||0)+1})}return{...e,messages:[...r,n],updatedAt:Date.now()}});return{sessions:r,currentSession:e.currentSession?.id===t&&r.find(e=>e.id===t)||e.currentSession}}function T(e,t,n,r){if(e.currentSession?.id!==t)return e;if(e.currentSession?.isPrivate){let t=e.currentSession.messages.find(e=>e.id===n);return!t||t.content===r?e:{sessions:e.sessions,currentSession:{...e.currentSession,messages:e.currentSession.messages.map(e=>e.id===n?{...e,content:r}:e),updatedAt:Date.now()}}}let i=e.sessions.find(e=>e.id===t),a=i?.messages.find(e=>e.id===n);if(!i||!a||a.content===r)return e;let o=e.sessions.map(e=>e.id===t?{...e,messages:e.messages.map(e=>e.id===n?{...e,content:r}:e),updatedAt:Date.now()}:e);return{sessions:o,currentSession:e.currentSession?.id===t&&o.find(e=>e.id===t)||e.currentSession}}function E(e,t,n,r,i,a,o){if(e.currentSession?.id!==t)return e;if(e.currentSession?.isPrivate)return{sessions:e.sessions,currentSession:{...e.currentSession,messages:e.currentSession.messages.map(e=>e.id===n?{...e,content:r,thinking:o,statistics:i,...a?{providerMetadata:a}:{}}:e),updatedAt:Date.now()}};let s=e.sessions.map(e=>e.id===t?{...e,messages:e.messages.map(e=>e.id===n?{...e,content:r,thinking:o,statistics:i,...a?{providerMetadata:a}:{}}:e),updatedAt:Date.now()}:e);return{sessions:s,currentSession:e.currentSession?.id===t&&s.find(e=>e.id===t)||e.currentSession}}function D(e){return e.reduce((e,t)=>(e[t.id]=t,e),{})}function O(e){return e.map(e=>({name:`persona:${e.id}`,model:e.model,size:0,digest:``,details:{parent_model:e.model,format:`persona`,family:`persona`,families:[`persona`],parameter_size:``,quantization_level:``},modified_at:new Date(e.updated_at).toISOString(),expires_at:new Date().toISOString(),size_vram:0,isPersona:!0,personaName:e.name,personaDescription:e.description}))}function k(e){return e.filter(e=>e.active&&e.type!==`tts`&&e.type!==`image`).flatMap(e=>_(e).map(t=>({name:t,model:t,size:0,digest:``,details:{parent_model:``,format:``,family:``,families:[],parameter_size:``,quantization_level:``},modified_at:new Date().toISOString(),expires_at:new Date().toISOString(),size_vram:0,isPlugin:!0,pluginId:e.id,pluginName:e.name})))}var A=`persona:`,j=`plugin:`,M=`ollama:`,N=`legacy:`,P=`agent:`,F=e=>{try{return decodeURIComponent(e)}catch{return null}};function I(e){return e.isLegacySelection?{model:e.name,providerType:null,providerId:null}:e.isPersona?{model:e.name,providerType:`ollama`,providerId:null}:e.isPlugin&&e.pluginId?{model:e.name,providerType:`plugin`,providerId:e.pluginId}:e.isAgent?{model:e.name,providerType:`agent`,providerId:e.agentId||e.name}:{model:e.name,providerType:`ollama`,providerId:null}}function L(e){return e.providerType?e.providerType===`plugin`&&e.providerId?`${j}${encodeURIComponent(e.providerId)}:${encodeURIComponent(e.model)}`:e.providerType===`agent`&&e.providerId?`${P}${encodeURIComponent(e.providerId)}:${encodeURIComponent(e.model)}`:e.providerType===`ollama`&&e.model.startsWith(A)?`${A}${encodeURIComponent(e.model.slice(8))}`:e.providerType===`ollama`?`${M}${encodeURIComponent(e.model)}`:`${N}${encodeURIComponent(e.model)}`:`${N}${encodeURIComponent(e.model)}`}function R(e){return L(I(e))}function z(e){if(e.startsWith(A)){let t=F(e.slice(8));return t===null?null:{model:`${A}${t}`,providerType:`ollama`,providerId:null}}if(e.startsWith(j)){let t=e.slice(7),n=t.indexOf(`:`);if(n<1)return null;let r=F(t.slice(0,n)),i=F(t.slice(n+1));return r&&i?{model:i,providerType:`plugin`,providerId:r}:null}if(e.startsWith(P)){let t=e.slice(6),n=t.indexOf(`:`);if(n<1)return null;let r=F(t.slice(0,n)),i=F(t.slice(n+1));return r&&i?{model:i,providerType:`agent`,providerId:r}:null}if(e.startsWith(M)){let t=F(e.slice(7));return t?{model:t,providerType:`ollama`,providerId:null}:null}if(e.startsWith(N)){let t=F(e.slice(7));return t?{model:t,providerType:null,providerId:null}:null}return null}function B(e,t){return t.providerType===`plugin`?e.find(e=>e.isPlugin&&e.pluginId===t.providerId&&e.name===t.model):t.providerType===`agent`?e.find(e=>e.isAgent&&e.name===t.model):t.providerType===`ollama`?t.model.startsWith(A)?e.find(e=>e.isPersona&&e.name===t.model):e.find(e=>!e.isPlugin&&!e.isPersona&&e.name===t.model):e.find(e=>e.isLegacySelection&&e.name===t.model)??e.find(e=>e.name===t.model)}function V(e,t){if(!t.providerType)return L(t);let n=B(e,t);return n?R(n):L(t)}function H(e,t){let n=e.find(e=>R(e)===t);return n?I(n):z(t)}function U(e){return!e.isPlugin&&!e.isPersona&&!e.isAgent&&!e.isLegacySelection&&!e.isUnavailable}function W(e,t){return t.model?!!B(e.filter(e=>!e.isLegacySelection&&!e.isUnavailable),t):!1}function G(e,t){if(!t.model)return e;if(!t.providerType){if(e.some(e=>e.isLegacySelection&&e.name===t.model))return e;let n=!!B(e,t);return[...e,{name:t.model,model:t.model,size:0,digest:``,modified_at:``,details:{},isLegacySelection:!0,isUnavailable:!n}]}if(B(e,t))return e;let n=t.providerType,r=n===`ollama`&&t.model.startsWith(A),i=n===`plugin`&&t.providerId||void 0;return[...e,{name:t.model,model:t.model,size:0,digest:``,modified_at:``,details:{},isPlugin:n===`plugin`,pluginId:i,pluginName:i,isAgent:n===`agent`,agentId:n===`agent`&&t.providerId||void 0,isPersona:r,personaName:r?t.model.slice(8):void 0,isUnavailable:!0}]}var K=r(`chat-store`),q=n((n,r)=>({sessions:[],currentSession:null,setCurrentSession:e=>{n({currentSession:e})},createSession:async(e,r,i,a,o)=>{try{n({loading:!0,error:null});let s=await c.createSession(e,r,i,a,o);if(s.success&&s.data){let e=s.data;return n(t=>({sessions:[e,...t.sessions],currentSession:e,loading:!1})),t.success(`New chat created`),e}}catch(e){let r=y(e,`Failed to create session`);n({error:r,loading:!1}),t.error(r)}},loadSessions:async()=>{try{n({loading:!0,error:null});let e=await c.getSessions();e.success&&e.data&&n(t=>{let n=e.data||[],r=n.map(e=>e.id),i=null;return t.currentSession?.isPrivate?i=t.currentSession:t.currentSession&&r.includes(t.currentSession.id)?i=n.find(e=>e.id===t.currentSession.id)||null:n.length>0&&(i=n[0],t.currentSession&&K.warn(`Previous currentSession not found in backend sessions:`,t.currentSession.id)),{sessions:n,currentSession:i,loading:!1}})}catch(e){let r=y(e,`Failed to load sessions`);n({error:r,loading:!1}),t.error(r)}},deleteSession:async e=>{try{let r=await c.deleteSession(e);r.success?(n(t=>{let n=t.sessions.filter(t=>t.id!==e),r=t.currentSession?.id===e?n[0]||null:t.currentSession;return K.debug(`Store: Updating state, sessions count:`,n.length),{sessions:n,currentSession:r}}),t.success(`Chat deleted`)):(K.error(`Store: deleteSession failed:`,r),t.error(`Failed to delete chat`))}catch(e){K.error(`Store: deleteSession error:`,e);let n=y(e,`Failed to delete session`);t.error(n)}},clearAllSessions:async()=>{try{n({loading:!0,error:null});let e=await c.clearAllSessions();e.success?(n({sessions:[],currentSession:null,loading:!1}),t.success(`All chat history cleared`)):(K.error(`Store: clearAllSessions failed:`,e),t.error(`Failed to clear chat history`),n({loading:!1}))}catch(e){K.error(`Store: clearAllSessions error:`,e);let r=y(e,`Failed to clear chat history`);t.error(r),n({loading:!1})}},clearAllState:()=>{n({sessions:[],currentSession:null,models:[],selectedModel:``,selectedProviderType:null,selectedProviderId:null,systemMessage:``,loading:!1,error:null})},applySessionTitle:(e,t,r=Date.now())=>{n(n=>({sessions:n.sessions.map(n=>n.id===e?{...n,title:t,updatedAt:r}:n),currentSession:n.currentSession?.id===e?{...n.currentSession,title:t,updatedAt:r}:n.currentSession}))},updateSessionTitle:async(e,n)=>{try{let i=await c.updateSession(e,{title:n});if(i.success&&i.data){let n=i.data.title,a=i.data.updatedAt??Date.now();r().applySessionTitle(e,n,a),t.success(`Chat title updated`)}}catch(e){let n=y(e,`Failed to update session`);t.error(n)}},addMessage:(e,i)=>{let a=r(),o=x(a,e);if(!C(a,e)){t.error(`No valid chat session. Please create or select a chat.`),K.error(`addMessage blocked: currentSession is not valid`,a.currentSession?.id);return}if(!o&&!S(a,e)){t.error(`Session not found or invalid. Please select or create a valid chat session.`),K.error(`addMessage blocked: sessionId not found in sessions`,e);return}let s=b(i);n(t=>w(t,e,s))},updateMessage:(e,t,r)=>{n(n=>T(n,e,t,r))},updateMessageWithStatistics:(e,t,r,i,a,o)=>{n(n=>E(n,e,t,r,i,a,o))},rateMessage:async(e,t,i)=>{let a=e=>e.map(e=>e.id===t?{...e,rating:i}:e),o=r().currentSession?.isPrivate;if(n(t=>({sessions:t.sessions.map(t=>t.id===e?{...t,messages:a(t.messages)}:t),currentSession:t.currentSession?.id===e?{...t.currentSession,messages:a(t.currentSession.messages)}:t.currentSession})),!o)try{await c.updateMessage(e,t,{rating:i??null})}catch(e){K.error(`Failed to save message rating:`,e)}},folders:[],loadFolders:async()=>{try{let e=await c.getFolders();e.success&&e.data&&n({folders:e.data})}catch(e){K.error(`Failed to load folders:`,e)}},createFolder:async e=>{try{let t=await c.createFolder(e);if(t.success&&t.data){let e=t.data;return n(t=>({folders:[...t.folders,e].sort((e,t)=>e.name.localeCompare(t.name))})),e}}catch(e){K.error(`Failed to create folder:`,e)}},renameFolder:async(e,t)=>{try{let r=await c.renameFolder(e,t);if(r.success&&r.data){let t=r.data;n(n=>({folders:n.folders.map(n=>n.id===e?t:n).sort((e,t)=>e.name.localeCompare(t.name))}))}}catch(e){K.error(`Failed to rename folder:`,e)}},deleteFolder:async e=>{try{(await c.deleteFolder(e)).success&&n(t=>({folders:t.folders.filter(t=>t.id!==e),sessions:t.sessions.map(t=>t.folderId===e?{...t,folderId:null}:t),currentSession:t.currentSession?.folderId===e?{...t.currentSession,folderId:null}:t.currentSession}))}catch(e){K.error(`Failed to delete folder:`,e)}},moveSessionToFolder:async(e,t)=>{n(n=>({sessions:n.sessions.map(n=>n.id===e?{...n,folderId:t}:n),currentSession:n.currentSession?.id===e?{...n.currentSession,folderId:t}:n.currentSession}));try{await c.updateSession(e,{folderId:t})}catch(e){K.error(`Failed to move session to folder:`,e)}},setSessionArchived:async(e,t)=>{n(n=>({sessions:n.sessions.map(n=>n.id===e?{...n,archived:t}:n),currentSession:n.currentSession?.id===e?{...n.currentSession,archived:t}:n.currentSession}));try{await c.updateSession(e,{archived:t})}catch(r){K.error(`Failed to update session archive state:`,r),n(n=>({sessions:n.sessions.map(n=>n.id===e?{...n,archived:!t}:n)}))}},truncateMessagesFrom:(e,t)=>{let r=e=>{let n=e.findIndex(e=>e.id===t);return n===-1?e:e.slice(0,n)};n(t=>({sessions:t.sessions.map(t=>t.id===e?{...t,messages:r(t.messages),updatedAt:Date.now()}:t),currentSession:t.currentSession?.id===e?{...t.currentSession,messages:r(t.currentSession.messages),updatedAt:Date.now()}:t.currentSession}))},models:[],loadModels:async()=>{try{n({loading:!0,error:null}),K.debug(`Loading models from API...`);let s=[],c;try{let e=await o.getModels();e.success&&e.data?(s=[...e.data],K.debug(`Ollama models loaded:`,e.data.length)):c=Error(e.error||e.message||`Ollama models are unavailable.`)}catch(e){c=e,K.warn(`Ollama models are unavailable; continuing with plugin models:`,e)}try{let e=await a.getAllPlugins();if(e.success&&e.data){let t=e.data.filter(e=>e.active&&e.type!==`tts`&&e.type!==`image`);K.debug(`🔌 Active plugins found:`,t.map(e=>e.name));let n=k(t);s.push(...n),K.debug(`Plugin models added:`,n.length)}}catch(e){K.error(`❌ Failed to load plugin models:`,e),e instanceof Error&&K.error(`❌ Plugin error details:`,{message:e.message,response:e.response?.data,status:e.response?.status,url:e.config?.url})}try{let{agentCliApi:t}=await e(async()=>{let{agentCliApi:e}=await import(`./api-F_fsjYA7.js`).then(e=>e.t);return{agentCliApi:e}},__vite__mapDeps([0,1,2,3,4,5,6])),n=await t.getModels();if(n.success&&n.data){let e=n.data.map(e=>({name:e.id,model:e.id,size:0,digest:``,modified_at:``,details:{},isAgent:!0,agentName:e.name,agentId:e.agentId}));s.push(...e),K.debug(`Agent CLI models added:`,e.length)}}catch(e){K.warn(`Agent CLI models unavailable:`,e)}let l=s.length;try{let{personaApi:t}=await e(async()=>{let{personaApi:e}=await import(`./api-F_fsjYA7.js`).then(e=>e.t);return{personaApi:e}},__vite__mapDeps([0,1,2,3,4,5,6])),r=await t.getPersonas();if(r.success&&r.data){let e=D(r.data),t=O(r.data);s.push(...t),n(t=>({...t,personas:e}))}}catch(e){K.error(`❌ Failed to load personas:`,e)}K.debug(`Total models loaded:`,s.length);let u=l===0&&c?y(c,`No model provider is available`):null,d=r(),f=d.selectedModel,p={model:f,providerType:d.selectedProviderType,providerId:d.selectedProviderId},m=!!B(s,p),h=d.selectedProviderType===`ollama`||d.selectedProviderType===`plugin`;if(f&&!m&&h){let e=`Selected model "${f}" is unavailable from ${d.selectedProviderType===`plugin`?d.selectedProviderId||`plugin`:`Ollama`}. Reactivate that provider or select another model.`;n({models:s,loading:!1,error:e}),t.error(e);return}if(f&&!m&&s.length>0){let e=I(s[0]);K.debug(`⚠️ Legacy selected model "${f}" no longer available, falling back to "${e.model}"`),n({models:s,loading:!1,selectedModel:e.model,selectedProviderType:e.providerType||null,selectedProviderId:e.providerId||null,error:u}),i.setDefaultModel(e.model,e.providerType,e.providerId).catch(e=>{K.warn(`Failed to save fallback default model:`,e)}),t.success(`Switched to ${e.model} (previous model no longer available)`)}else n({models:s,loading:!1,error:u});u&&t.error(u)}catch(e){K.error(`Error loading models:`,e);let r=y(e,`Failed to load models`);n({error:r,loading:!1}),t.error(r)}},loadPreferences:async()=>{try{let e=await i.getPreferences();if(e.success&&e.data){let{defaultModel:t,defaultProviderType:r,defaultProviderId:i,systemMessage:a}=e.data;t&&(n({selectedModel:t,selectedProviderType:r||null,selectedProviderId:r===`plugin`&&i||null}),K.debug(`✅ Loaded default model from backend:`,t)),a!==void 0&&(n({systemMessage:a}),K.debug(`✅ Loaded system message from backend`))}}catch(e){K.warn(`❌ Failed to load preferences from backend:`,e)}},selectedModel:``,selectedProviderType:null,selectedProviderId:null,setSelectedModel:(e,t=null,r=null)=>{let a=(t===`plugin`||t===`agent`)&&r||null;n({selectedModel:e,selectedProviderType:t,selectedProviderId:a}),i.setDefaultModel(e,t,a).catch(e=>{K.warn(`Failed to save default model to backend:`,e)})},updateCurrentSessionModel:async(e,i=null,a=null)=>{let o=r();if(!o.currentSession)throw Error(`No current session to update`);try{let r=await c.updateSession(o.currentSession.id,{model:e,providerType:i,providerId:i===`plugin`||i===`agent`?a:null});r.success&&r.data&&(n(t=>({sessions:t.sessions.map(e=>e.id===t.currentSession?.id?r.data:e),currentSession:r.data,selectedModel:e,selectedProviderType:i,selectedProviderId:(i===`plugin`||i===`agent`)&&a||null})),t.success(`Model updated for current chat`))}catch(e){let n=y(e,`Failed to update session model`);throw t.error(n),e}},personas:{},loadPersonas:async()=>{try{n({loading:!0,error:null});let e=await s.getPersonas();if(e.success&&e.data){let t=e.data;n({personas:D(t),loading:!1}),K.debug(`✅ Personas loaded:`,t.length)}}catch(e){let t=y(e,`Failed to load personas`);n({error:t,loading:!1}),K.error(`❌ Failed to load personas:`,t)}},getCurrentPersona:()=>{let e=r();if(!e.currentSession||!e.currentSession.model?.startsWith(`persona:`))return null;let t=e.currentSession.model.replace(`persona:`,``);return e.personas[t]||null},systemMessage:``,setSystemMessage:e=>{let t=r();if(n({systemMessage:e}),i.setSystemMessage(e).catch(e=>{K.warn(`Failed to save system message to backend:`,e)}),t.currentSession){let r=t.currentSession.messages.findIndex(e=>e.role===`system`);if(r!==-1){n(t=>{let n=t.sessions.map(n=>{if(n.id===t.currentSession?.id){let t=n.messages.map((t,n)=>n===r&&t.role===`system`?{...t,content:e,timestamp:Date.now()}:t);return{...n,messages:t,updatedAt:Date.now()}}return n});return{sessions:n,currentSession:t.currentSession?n.find(e=>e.id===t.currentSession.id)||t.currentSession:null}});let i=t.currentSession.messages[r];c.updateMessage(t.currentSession.id,i.id,{content:e}).catch(e=>{K.warn(`Failed to sync system message update to backend:`,e)}),K.debug(`✅ Updated system message in current session`)}}},loading:!1,error:null,setError:e=>n({error:e}),generatingTitleForSession:null,setGeneratingTitleForSession:e=>n({generatingTitleForSession:e}),...typeof window<`u`&&{testPluginApi:async()=>{try{K.debug(`🧪 Testing plugin API...`);let e=await a.getAllPlugins();return K.debug(`✅ Plugin API test result:`,e),e}catch(e){return K.error(`❌ Plugin API test failed:`,e),{error:e}}}}}));export{V as a,W as c,p as d,v as f,I as i,G as l,R as n,B as o,m as p,H as r,U as s,q as t,y as u};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./logger-DSXjF4ye.js";var n=t(`config`),r=window.location.protocol===`file:`?`http://localhost:3001/api`:`${window.location.origin}/api`,i=e(),a=()=>{i&&(n.debug(`API_BASE_URL configured as:`,r),n.debug(`Window location:`,window.location),n.debug(`Environment variables:`,{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.19.3`}))};export{a as n,r as t};
@@ -1,4 +1,4 @@
1
- import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-Ca9zqOqT.js";import{h as a}from"../assets/index-D4LhtFTX.js";var o,s,c,l,u,d,f,p,m=Object.defineProperty,h=(e,t)=>{for(var n in t)m(e,n,{get:t[n],enumerable:!0})},g={};h(g,{languages:()=>dm,options:()=>lm,printers:()=>um});var ee=[{name:`JavaScript`,type:`programming`,aceMode:`javascript`,extensions:`.js,._js,.bones,.cjs,.es,.es6,.gs,.jake,.javascript,.jsb,.jscad,.jsfl,.jslib,.jsm,.jspre,.jss,.mjs,.njs,.pac,.sjs,.ssjs,.xsjs,.xsjslib,.start.frag,.end.frag,.wxs`.split(`,`),filenames:[`Jakefile`,`start.frag`,`end.frag`],tmScope:`source.js`,aliases:[`js`,`node`],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,interpreters:[`bun`,`chakra`,`d8`,`deno`,`gjs`,`js`,`node`,`nodejs`,`qjs`,`rhino`,`v8`,`v8-shell`,`zx`],parsers:[`babel`,`acorn`,`espree`,`meriyah`,`babel-flow`,`babel-ts`,`flow`,`typescript`],vscodeLanguageIds:[`javascript`,`mongo`],linguistLanguageId:183},{name:`Flow`,type:`programming`,aceMode:`javascript`,extensions:[`.js.flow`],filenames:[],tmScope:`source.js`,aliases:[],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,interpreters:[`bun`,`chakra`,`d8`,`deno`,`gjs`,`js`,`node`,`nodejs`,`qjs`,`rhino`,`v8`,`v8-shell`],parsers:[`flow`,`babel-flow`],vscodeLanguageIds:[`javascript`],linguistLanguageId:183},{name:`JSX`,type:`programming`,aceMode:`javascript`,extensions:[`.jsx`],filenames:void 0,tmScope:`source.js.jsx`,aliases:void 0,codemirrorMode:`jsx`,codemirrorMimeType:`text/jsx`,interpreters:void 0,parsers:[`babel`,`babel-flow`,`babel-ts`,`flow`,`typescript`,`espree`,`meriyah`],vscodeLanguageIds:[`javascriptreact`],group:`JavaScript`,linguistLanguageId:183},{name:`TypeScript`,type:`programming`,aceMode:`typescript`,extensions:[`.ts`,`.cts`,`.mts`],tmScope:`source.ts`,aliases:[`ts`],codemirrorMode:`javascript`,codemirrorMimeType:`application/typescript`,interpreters:[`bun`,`deno`,`ts-node`,`tsx`],parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescript`],linguistLanguageId:378},{name:`TSX`,type:`programming`,aceMode:`tsx`,extensions:[`.tsx`],tmScope:`source.tsx`,aliases:[`typescriptreact`],codemirrorMode:`jsx`,codemirrorMimeType:`text/typescript-jsx`,group:`TypeScript`,parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescriptreact`],linguistLanguageId:94901924}],_={};h(_,{estree:()=>Zp});function te(e){return Array.isArray(e)&&e.length>0}var v=te,y=()=>{};function b(e){let t=new Set(e);return e=>t.has(e?.type)}var ne=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);function re(e){return this[e<0?this.length+e:e]}var x=ne(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return re});function S(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function ie(e){let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),t}var ae=new WeakMap;function C(e){return S(ae,e,ie)}function oe(e,t){let{node:n}=e,r=0,i=()=>t(e,r++);n.this&&e.call(i,`this`),e.each(i,`params`),n.rest&&e.call(i,`rest`)}function se(e){return e.rest?!0:x(0,C(e),-1)?.type===`RestElement`}var ce=e=>e?.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`;function le({node:e,parent:t}){return e?.type===`EmptyStatement`?t.type===`IfStatement`?t.consequent===e||t.alternate===e:t.type===`DoWhileStatement`||t.type===`ForInStatement`||t.type===`ForOfStatement`||t.type===`ForStatement`||t.type===`LabeledStatement`||t.type===`WithStatement`||t.type===`WhileStatement`?t.body===e:!1:!1}function ue(e){return e.method&&e.kind===`init`||e.kind===`get`||e.kind===`set`}var de=e=>Number.isSafeInteger(e)&&e>=0;function fe(e){return e.range?.[1]??e.end}function w(e){let t=e.range?.[0]??e.start,n=(e.declaration?.decorators??e.decorators)?.[0];return n?Math.min(w(n),t):t}var pe=5,me=8,he=8,ge=e=>t=>t.label?T(t.label):w(t)+e,_e=e=>e.__contentEnd??fe(e),ve=[`ExpressionStatement`,`Directive`,`ImportDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`ReturnStatement`,`ThrowStatement`,`DoWhileStatement`],ye=new Map([[`BreakStatement`,ge(pe)],[`ContinueStatement`,ge(me)],[`DebuggerStatement`,e=>w(e)+he],[`VariableDeclaration`,e=>T(x(0,e.declarations,-1))],...ve.map(e=>[e,_e])]),be=b(ve),xe=e=>{if(be(e)&&e.__contentEnd)return!0;let{type:t}=e;return t===`BreakStatement`||t===`ContinueStatement`||t===`DebuggerStatement`||t===`VariableDeclaration`?!0:t===`IfStatement`?xe(e.alternate??e.consequent):t===`ForInStatement`||t===`ForOfStatement`||t===`ForStatement`||t===`LabeledStatement`||t===`WithStatement`||t===`WhileStatement`?xe(e.body):!1};function T(e){let{type:t}=e;return t===`IfStatement`?T(e.alternate??e.consequent):t===`ForInStatement`||t===`ForOfStatement`||t===`ForStatement`||t===`LabeledStatement`||t===`WithStatement`||t===`WhileStatement`?T(e.body):ye.get(t)?.(e)??fe(e)}function Se(e,t){let n=w(e);return de(n)&&n===w(t)}function Ce(e,t){let n=T(e);return de(n)&&n===T(t)}function we(e,t){return Se(e,t)&&Ce(e,t)}function Te(e){return e.extra?.raw??e.raw}function Ee(e){return e.type===`BigIntLiteral`||e.type===`Literal`&&!!e.bigint}function De(e){return e.type===`BooleanLiteral`||e.type===`Literal`&&typeof e.value==`boolean`}function Oe(e){return e.type===`NumericLiteral`||e.type===`Literal`&&typeof e.value==`number`}function ke(e){return e.type===`RegExpLiteral`||e.type===`Literal`&&!!e.regex}function E(e){return e?.type===`StringLiteral`||e?.type===`Literal`&&typeof e.value==`string`}var Ae=b([`TSAsExpression`,`TSSatisfiesExpression`,`AsExpression`,`AsConstExpression`,`SatisfiesExpression`]),je=b([`SatisfiesExpression`,`TSSatisfiesExpression`]),Me=b([`TSUnionType`,`UnionTypeAnnotation`]),Ne=b([`TSIntersectionType`,`IntersectionTypeAnnotation`]),Pe=b([`TupleTypeAnnotation`,`TSTupleType`]),Fe=b([`TSConditionalType`,`ConditionalTypeAnnotation`]),Ie=b([`TSTypeAliasDeclaration`,`TypeAlias`]),Le=b([`ReturnStatement`,`ThrowStatement`]),Re=b([`ExportDefaultDeclaration`,`DeclareExportDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportAllDeclaration`]),D=b([`ArrayExpression`]),ze=b([`ObjectExpression`]),Be=b([`Literal`,`BooleanLiteral`,`BigIntLiteral`,`DirectiveLiteral`,`NullLiteral`,`NumericLiteral`,`RegExpLiteral`,`StringLiteral`]),Ve=b([`ObjectTypeAnnotation`,`TSTypeLiteral`,`TSMappedType`]),He=b([`FunctionExpression`,`ArrowFunctionExpression`]),O=b([`JSXElement`,`JSXFragment`]),Ue=b([`BinaryExpression`,`LogicalExpression`,`NGPipeExpression`]),k=b([`CallExpression`,`OptionalCallExpression`]),A=b([`MemberExpression`,`OptionalMemberExpression`]),We=b([`CallExpression`,`OptionalCallExpression`,`NewExpression`]),Ge=b([`CallExpression`,`OptionalCallExpression`,`NewExpression`,`ImportExpression`]),Ke=b([`ChainExpression`,`TSNonNullExpression`]),qe=b([`TSArrayType`,`ArrayTypeAnnotation`]),Je=b([`TSTypeParameterInstantiation`,`TypeParameterInstantiation`]);function Ye(e){if(e.type!==`ImportSpecifier`&&e.type!==`ExportSpecifier`)return!1;let{local:t,[e.type===`ImportSpecifier`?`imported`:`exported`]:n}=e;return t.type!==n.type||!we(t,n)?!1:E(t)?t.value===n.value&&Te(t)===Te(n):t.type===`Identifier`&&t.name===n.name}var Xe=b([`File`,`TemplateElement`,`TSEmptyBodyFunctionExpression`,`ChainExpression`]),Ze=(e,[t])=>t?.type===`ComponentParameter`&&t.shorthand&&t.name===e&&t.local!==t.name||t?.type===`MatchObjectPatternProperty`&&t.shorthand&&t.key===e||t?.type===`ObjectProperty`&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type===`Property`&&t.shorthand&&t.key===e&&!ue(t)&&t.value!==t.key||t?.type===`ImportSpecifier`&&Ye(t)&&t.local===e&&t.local!==t.imported||t?.type===`ExportSpecifier`&&Ye(t)&&t.exported===e&&t.local!==t.exported,Qe=(e,[t])=>!!(e.type===`FunctionExpression`&&t.type===`MethodDefinition`&&t.value===e&&C(e).length===0&&!e.returnType&&!v(e.typeParameters)&&e.body),$e=(e,[t])=>t?.typeAnnotation===e&&ce(t),et=(e,[t,...n])=>$e(e,[t])||t?.typeName===e&&$e(t,n);function tt(e,t){return Xe(e)||Ze(e,t)||Qe(e,t)?!1:e.type===`EmptyStatement`?le({node:e,parent:t[0]}):!(et(e,t)||e.type===`TSTypeAnnotation`&&t[0].type===`TSPropertySignature`)}var nt=tt;function rt(e){let t=e.type||e.kind||`(unknown type)`,n=String(e.name||e.id&&(typeof e.id==`object`?e.id.name:e.id)||e.key&&(typeof e.key==`object`?e.key.name:e.key)||e.value&&(typeof e.value==`object`?``:String(e.value))||e.operator||``);return n.length>20&&(n=n.slice(0,19)+`…`),t+(n?` `+n:``)}function it(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=rt(e)}function j(e,t){t.leading=!0,t.trailing=!1,it(e,t)}function at(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),it(e,t)}function M(e,t){t.leading=!1,t.trailing=!0,it(e,t)}function ot(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}var st=ot(` `),ct=ot(`,; `),lt=ot(/[^\n\r]/);function ut(e,t){if(t===!1)return!1;if(e.charAt(t)===`/`&&e.charAt(t+1)===`*`){for(let n=t+2;n<e.length;++n)if(e.charAt(n)===`*`&&e.charAt(n+1)===`/`)return n+2}return t}var dt=ut,ft=e=>e===`
1
+ import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-Ca9zqOqT.js";import{g as a}from"../assets/index-ZxtmHZ3Y.js";var o,s,c,l,u,d,f,p,m=Object.defineProperty,h=(e,t)=>{for(var n in t)m(e,n,{get:t[n],enumerable:!0})},g={};h(g,{languages:()=>dm,options:()=>lm,printers:()=>um});var ee=[{name:`JavaScript`,type:`programming`,aceMode:`javascript`,extensions:`.js,._js,.bones,.cjs,.es,.es6,.gs,.jake,.javascript,.jsb,.jscad,.jsfl,.jslib,.jsm,.jspre,.jss,.mjs,.njs,.pac,.sjs,.ssjs,.xsjs,.xsjslib,.start.frag,.end.frag,.wxs`.split(`,`),filenames:[`Jakefile`,`start.frag`,`end.frag`],tmScope:`source.js`,aliases:[`js`,`node`],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,interpreters:[`bun`,`chakra`,`d8`,`deno`,`gjs`,`js`,`node`,`nodejs`,`qjs`,`rhino`,`v8`,`v8-shell`,`zx`],parsers:[`babel`,`acorn`,`espree`,`meriyah`,`babel-flow`,`babel-ts`,`flow`,`typescript`],vscodeLanguageIds:[`javascript`,`mongo`],linguistLanguageId:183},{name:`Flow`,type:`programming`,aceMode:`javascript`,extensions:[`.js.flow`],filenames:[],tmScope:`source.js`,aliases:[],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,interpreters:[`bun`,`chakra`,`d8`,`deno`,`gjs`,`js`,`node`,`nodejs`,`qjs`,`rhino`,`v8`,`v8-shell`],parsers:[`flow`,`babel-flow`],vscodeLanguageIds:[`javascript`],linguistLanguageId:183},{name:`JSX`,type:`programming`,aceMode:`javascript`,extensions:[`.jsx`],filenames:void 0,tmScope:`source.js.jsx`,aliases:void 0,codemirrorMode:`jsx`,codemirrorMimeType:`text/jsx`,interpreters:void 0,parsers:[`babel`,`babel-flow`,`babel-ts`,`flow`,`typescript`,`espree`,`meriyah`],vscodeLanguageIds:[`javascriptreact`],group:`JavaScript`,linguistLanguageId:183},{name:`TypeScript`,type:`programming`,aceMode:`typescript`,extensions:[`.ts`,`.cts`,`.mts`],tmScope:`source.ts`,aliases:[`ts`],codemirrorMode:`javascript`,codemirrorMimeType:`application/typescript`,interpreters:[`bun`,`deno`,`ts-node`,`tsx`],parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescript`],linguistLanguageId:378},{name:`TSX`,type:`programming`,aceMode:`tsx`,extensions:[`.tsx`],tmScope:`source.tsx`,aliases:[`typescriptreact`],codemirrorMode:`jsx`,codemirrorMimeType:`text/typescript-jsx`,group:`TypeScript`,parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescriptreact`],linguistLanguageId:94901924}],_={};h(_,{estree:()=>Zp});function te(e){return Array.isArray(e)&&e.length>0}var v=te,y=()=>{};function b(e){let t=new Set(e);return e=>t.has(e?.type)}var ne=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);function re(e){return this[e<0?this.length+e:e]}var x=ne(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return re});function S(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function ie(e){let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),t}var ae=new WeakMap;function C(e){return S(ae,e,ie)}function oe(e,t){let{node:n}=e,r=0,i=()=>t(e,r++);n.this&&e.call(i,`this`),e.each(i,`params`),n.rest&&e.call(i,`rest`)}function se(e){return e.rest?!0:x(0,C(e),-1)?.type===`RestElement`}var ce=e=>e?.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`;function le({node:e,parent:t}){return e?.type===`EmptyStatement`?t.type===`IfStatement`?t.consequent===e||t.alternate===e:t.type===`DoWhileStatement`||t.type===`ForInStatement`||t.type===`ForOfStatement`||t.type===`ForStatement`||t.type===`LabeledStatement`||t.type===`WithStatement`||t.type===`WhileStatement`?t.body===e:!1:!1}function ue(e){return e.method&&e.kind===`init`||e.kind===`get`||e.kind===`set`}var de=e=>Number.isSafeInteger(e)&&e>=0;function fe(e){return e.range?.[1]??e.end}function w(e){let t=e.range?.[0]??e.start,n=(e.declaration?.decorators??e.decorators)?.[0];return n?Math.min(w(n),t):t}var pe=5,me=8,he=8,ge=e=>t=>t.label?T(t.label):w(t)+e,_e=e=>e.__contentEnd??fe(e),ve=[`ExpressionStatement`,`Directive`,`ImportDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`ReturnStatement`,`ThrowStatement`,`DoWhileStatement`],ye=new Map([[`BreakStatement`,ge(pe)],[`ContinueStatement`,ge(me)],[`DebuggerStatement`,e=>w(e)+he],[`VariableDeclaration`,e=>T(x(0,e.declarations,-1))],...ve.map(e=>[e,_e])]),be=b(ve),xe=e=>{if(be(e)&&e.__contentEnd)return!0;let{type:t}=e;return t===`BreakStatement`||t===`ContinueStatement`||t===`DebuggerStatement`||t===`VariableDeclaration`?!0:t===`IfStatement`?xe(e.alternate??e.consequent):t===`ForInStatement`||t===`ForOfStatement`||t===`ForStatement`||t===`LabeledStatement`||t===`WithStatement`||t===`WhileStatement`?xe(e.body):!1};function T(e){let{type:t}=e;return t===`IfStatement`?T(e.alternate??e.consequent):t===`ForInStatement`||t===`ForOfStatement`||t===`ForStatement`||t===`LabeledStatement`||t===`WithStatement`||t===`WhileStatement`?T(e.body):ye.get(t)?.(e)??fe(e)}function Se(e,t){let n=w(e);return de(n)&&n===w(t)}function Ce(e,t){let n=T(e);return de(n)&&n===T(t)}function we(e,t){return Se(e,t)&&Ce(e,t)}function Te(e){return e.extra?.raw??e.raw}function Ee(e){return e.type===`BigIntLiteral`||e.type===`Literal`&&!!e.bigint}function De(e){return e.type===`BooleanLiteral`||e.type===`Literal`&&typeof e.value==`boolean`}function Oe(e){return e.type===`NumericLiteral`||e.type===`Literal`&&typeof e.value==`number`}function ke(e){return e.type===`RegExpLiteral`||e.type===`Literal`&&!!e.regex}function E(e){return e?.type===`StringLiteral`||e?.type===`Literal`&&typeof e.value==`string`}var Ae=b([`TSAsExpression`,`TSSatisfiesExpression`,`AsExpression`,`AsConstExpression`,`SatisfiesExpression`]),je=b([`SatisfiesExpression`,`TSSatisfiesExpression`]),Me=b([`TSUnionType`,`UnionTypeAnnotation`]),Ne=b([`TSIntersectionType`,`IntersectionTypeAnnotation`]),Pe=b([`TupleTypeAnnotation`,`TSTupleType`]),Fe=b([`TSConditionalType`,`ConditionalTypeAnnotation`]),Ie=b([`TSTypeAliasDeclaration`,`TypeAlias`]),Le=b([`ReturnStatement`,`ThrowStatement`]),Re=b([`ExportDefaultDeclaration`,`DeclareExportDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportAllDeclaration`]),D=b([`ArrayExpression`]),ze=b([`ObjectExpression`]),Be=b([`Literal`,`BooleanLiteral`,`BigIntLiteral`,`DirectiveLiteral`,`NullLiteral`,`NumericLiteral`,`RegExpLiteral`,`StringLiteral`]),Ve=b([`ObjectTypeAnnotation`,`TSTypeLiteral`,`TSMappedType`]),He=b([`FunctionExpression`,`ArrowFunctionExpression`]),O=b([`JSXElement`,`JSXFragment`]),Ue=b([`BinaryExpression`,`LogicalExpression`,`NGPipeExpression`]),k=b([`CallExpression`,`OptionalCallExpression`]),A=b([`MemberExpression`,`OptionalMemberExpression`]),We=b([`CallExpression`,`OptionalCallExpression`,`NewExpression`]),Ge=b([`CallExpression`,`OptionalCallExpression`,`NewExpression`,`ImportExpression`]),Ke=b([`ChainExpression`,`TSNonNullExpression`]),qe=b([`TSArrayType`,`ArrayTypeAnnotation`]),Je=b([`TSTypeParameterInstantiation`,`TypeParameterInstantiation`]);function Ye(e){if(e.type!==`ImportSpecifier`&&e.type!==`ExportSpecifier`)return!1;let{local:t,[e.type===`ImportSpecifier`?`imported`:`exported`]:n}=e;return t.type!==n.type||!we(t,n)?!1:E(t)?t.value===n.value&&Te(t)===Te(n):t.type===`Identifier`&&t.name===n.name}var Xe=b([`File`,`TemplateElement`,`TSEmptyBodyFunctionExpression`,`ChainExpression`]),Ze=(e,[t])=>t?.type===`ComponentParameter`&&t.shorthand&&t.name===e&&t.local!==t.name||t?.type===`MatchObjectPatternProperty`&&t.shorthand&&t.key===e||t?.type===`ObjectProperty`&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type===`Property`&&t.shorthand&&t.key===e&&!ue(t)&&t.value!==t.key||t?.type===`ImportSpecifier`&&Ye(t)&&t.local===e&&t.local!==t.imported||t?.type===`ExportSpecifier`&&Ye(t)&&t.exported===e&&t.local!==t.exported,Qe=(e,[t])=>!!(e.type===`FunctionExpression`&&t.type===`MethodDefinition`&&t.value===e&&C(e).length===0&&!e.returnType&&!v(e.typeParameters)&&e.body),$e=(e,[t])=>t?.typeAnnotation===e&&ce(t),et=(e,[t,...n])=>$e(e,[t])||t?.typeName===e&&$e(t,n);function tt(e,t){return Xe(e)||Ze(e,t)||Qe(e,t)?!1:e.type===`EmptyStatement`?le({node:e,parent:t[0]}):!(et(e,t)||e.type===`TSTypeAnnotation`&&t[0].type===`TSPropertySignature`)}var nt=tt;function rt(e){let t=e.type||e.kind||`(unknown type)`,n=String(e.name||e.id&&(typeof e.id==`object`?e.id.name:e.id)||e.key&&(typeof e.key==`object`?e.key.name:e.key)||e.value&&(typeof e.value==`object`?``:String(e.value))||e.operator||``);return n.length>20&&(n=n.slice(0,19)+`…`),t+(n?` `+n:``)}function it(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=rt(e)}function j(e,t){t.leading=!0,t.trailing=!1,it(e,t)}function at(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),it(e,t)}function M(e,t){t.leading=!1,t.trailing=!0,it(e,t)}function ot(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}var st=ot(` `),ct=ot(`,; `),lt=ot(/[^\n\r]/);function ut(e,t){if(t===!1)return!1;if(e.charAt(t)===`/`&&e.charAt(t+1)===`*`){for(let n=t+2;n<e.length;++n)if(e.charAt(n)===`*`&&e.charAt(n+1)===`/`)return n+2}return t}var dt=ut,ft=e=>e===`
2
2
  `||e===`\r`||e===`\u2028`||e===`\u2029`;function pt(e,t,n){if(t===!1)return!1;let r=!!n?.backwards,i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
3
3
  `)return t-2;if(ft(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
4
4
  `)return t+2;if(ft(i))return t+1}return t}var mt=pt;function ht(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?lt(e,t):t}var gt=ht;function _t(e,t){let n=null,r=t;for(;r!==n;)n=r,r=st(e,r),r=dt(e,r),r=gt(e,r),r=mt(e,r);return r}var vt=_t;function yt(e,t){let n=vt(e,t);return n===!1?``:e.charAt(n)}var bt=yt;function xt(e,t,n={}){let r=st(e,n.backwards?t-1:t,n);return r!==mt(e,r,n)}var N=xt;function St(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
@@ -1,4 +1,4 @@
1
- import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-Ca9zqOqT.js";import{h as a}from"../assets/index-D4LhtFTX.js";var o,s,c=Object.defineProperty,l=e=>{throw TypeError(e)},u=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},f=(e,t,n)=>u(e,typeof t==`symbol`?t:t+``,n),p=(e,t,n)=>t.has(e)||l(`Cannot `+n),m=(e,t,n)=>(p(e,t,`read from private field`),n?n.call(e):t.get(e)),ee=(e,t,n)=>t.has(e)?l(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),te={};d(te,{languages:()=>fo,options:()=>ho,parsers:()=>go,printers:()=>ss});var ne=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),re=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},h=ne(`replaceAll`,function(){if(typeof this==`string`)return re});function ie(e){return this[e<0?this.length+e:e]}var g=ne(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return ie}),ae=()=>{},oe=`string`,se=`array`,ce=`cursor`,le=`indent`,ue=`align`,de=`trim`,fe=`group`,pe=`fill`,me=`if-break`,he=`indent-if-break`,ge=`line-suffix`,_e=`line-suffix-boundary`,_=`line`,ve=`label`,ye=`break-parent`,be=new Set([ce,le,ue,de,fe,pe,me,he,ge,_e,_,ve,ye]);function xe(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function Se(e){if(typeof e==`string`)return oe;if(Array.isArray(e))return se;if(!e)return;let{type:t}=e;if(be.has(t))return t}var Ce=Se,we=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function Te(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
1
+ import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-Ca9zqOqT.js";import{g as a}from"../assets/index-ZxtmHZ3Y.js";var o,s,c=Object.defineProperty,l=e=>{throw TypeError(e)},u=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},f=(e,t,n)=>u(e,typeof t==`symbol`?t:t+``,n),p=(e,t,n)=>t.has(e)||l(`Cannot `+n),m=(e,t,n)=>(p(e,t,`read from private field`),n?n.call(e):t.get(e)),ee=(e,t,n)=>t.has(e)?l(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),te={};d(te,{languages:()=>fo,options:()=>ho,parsers:()=>go,printers:()=>ss});var ne=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),re=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},h=ne(`replaceAll`,function(){if(typeof this==`string`)return re});function ie(e){return this[e<0?this.length+e:e]}var g=ne(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return ie}),ae=()=>{},oe=`string`,se=`array`,ce=`cursor`,le=`indent`,ue=`align`,de=`trim`,fe=`group`,pe=`fill`,me=`if-break`,he=`indent-if-break`,ge=`line-suffix`,_e=`line-suffix-boundary`,_=`line`,ve=`label`,ye=`break-parent`,be=new Set([ce,le,ue,de,fe,pe,me,he,ge,_e,_,ve,ye]);function xe(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function Se(e){if(typeof e==`string`)return oe;if(Array.isArray(e))return se;if(!e)return;let{type:t}=e;if(be.has(t))return t}var Ce=Se,we=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function Te(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
2
2
  Expected it to be 'string' or 'object'.`;if(Ce(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=we([...be].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
3
3
  Expected it to be ${r}.`}var Ee=class extends Error{constructor(e){((...e)=>(super(...e),i(this,`name`,`InvalidDocError`),this))(Te(e)),this.doc=e}};function De(e,t){if(typeof e==`string`)return t(e);let n=new Map;return r(e);function r(e){return xe(n,e,i)}function i(e){switch(Ce(e)){case se:return t(e.map(r));case pe:return t({...e,parts:e.parts.map(r)});case me:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case fe:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case ue:case le:case he:case ve:case ge:return t({...e,contents:r(e.contents)});case oe:case ce:case de:case _e:case _:case ye:return t(e);default:throw new Ee(e)}}}function v(e,t=Le){return De(e,e=>typeof e==`string`?S(t,e.split(`
4
4
  `)):e)}var y=ae,Oe=ae,ke=ae,Ae=ae;function b(e){return y(e),{type:le,contents:e}}function je(e,t){return Ae(e),y(t),{type:ue,contents:t,n:e}}function Me(e){return je(-1/0,e)}var Ne={type:ye};function Pe(e){return ke(e),{type:pe,parts:e}}function x(e,t={}){return y(e),Oe(t.expandedStates,!0),{type:fe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Fe(e,t=``,n={}){return y(e),t!==``&&y(t),{type:me,breakContents:e,flatContents:t,groupId:n.groupId}}function Ie(e,t){return y(e),{type:he,contents:e,groupId:t.groupId,negate:t.negate}}function S(e,t){y(e),Oe(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var C={type:_},w={type:_,soft:!0},T=[{type:_,hard:!0},Ne],Le=[{type:_,hard:!0,literal:!0},Ne],Re=Object.freeze({character:`'`,codePoint:39}),ze=Object.freeze({character:`"`,codePoint:34}),Be=Object.freeze({preferred:Re,alternate:ze}),Ve=Object.freeze({preferred:ze,alternate:Re});function He(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?Be:Ve,{length:i}=e,a=0,o=0;for(let t=0;t<i;t++){let i=e.charCodeAt(t);i===n.codePoint?a++:i===r.codePoint&&o++}return(a>o?r:n).character}function Ue(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var We=(o=new WeakMap,s=new WeakSet,class{constructor(t){a(this,s),e(this,o,void 0),n(o,this,new Set(t))}getLeadingWhitespaceCount(e){let t=r(o,this),n=0;for(let r=0;r<e.length&&t.has(e.charAt(r));r++)n++;return n}getTrailingWhitespaceCount(e){let t=r(o,this),n=0;for(let r=e.length-1;r>=0&&t.has(e.charAt(r));r--)n++;return n}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return r(o,this).has(e.charAt(0))}hasTrailingWhitespace(e){return r(o,this).has(g(0,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let n=`[${Ue([...r(o,this)].join(``))}]+`,i=new RegExp(t?`(${n})`:n);return e.split(i)}hasWhitespaceCharacter(e){let t=r(o,this);return Array.prototype.some.call(e,e=>t.has(e))}hasNonWhitespaceCharacter(e){let t=r(o,this);return Array.prototype.some.call(e,e=>!t.has(e))}isWhitespaceOnly(e){let t=r(o,this);return Array.prototype.every.call(e,e=>t.has(e))}dedentString(e){let n=t(s,this,Ge).call(this,e);return n===0?e:e.split(`
@@ -1,4 +1,4 @@
1
- import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-Ca9zqOqT.js";import{h as a}from"../assets/index-D4LhtFTX.js";var o,s,c,l,u,d,f,p,m=Object.create,h=Object.defineProperty,g=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyNames,v=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,b=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},x=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0})},S=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of _(t))!y.call(e,i)&&i!==n&&h(e,i,{get:()=>t[i],enumerable:!(r=g(t,i))||r.enumerable});return e},C=(e,t,n)=>(n=e==null?{}:m(v(e)),S(t||!e||!e.__esModule?h(n,`default`,{value:e,enumerable:!0}):n,e)),w=b((e,t)=>{t.exports=m;var n=9,r=10,i=32,a=33,o=58,s=91,c=92,l=93,u=94,d=96,f=4,p=1024;function m(e){var t=this.Parser,n=this.Compiler;h(t)&&_(t,e),g(n)&&v(n)}function h(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function g(e){return!!(e&&e.prototype&&e.prototype.visitors)}function _(e,t){for(var m=t||{},h=e.prototype,g=h.blockTokenizers,_=h.inlineTokenizers,v=h.blockMethods,x=h.inlineMethods,S=g.definition,C=_.reference,w=[],T=-1,E=v.length,D;++T<E;)D=v[T],D!==`newline`&&D!==`indentedCode`&&D!==`paragraph`&&D!==`footnoteDefinition`&&w.push([D]);w.push([`footnoteDefinition`]),m.inlineNotes&&(y(x,`reference`,`inlineNote`),_.inlineNote=A),y(v,`definition`,`footnoteDefinition`),y(x,`reference`,`footnoteCall`),g.definition=M,g.footnoteDefinition=O,_.footnoteCall=k,_.reference=j,h.interruptFootnoteDefinition=w,j.locator=C.locator,k.locator=N,A.locator=P;function O(e,t,a){for(var c=this,d=c.interruptFootnoteDefinition,m=c.offset,h=t.length+1,_=0,v=[],y,x,S,C,w,T,E,D,O,k,A,j,M;_<h&&(C=t.charCodeAt(_),C===n||C===i);)_++;if(t.charCodeAt(_++)===s&&t.charCodeAt(_++)===u){for(x=_;_<h;){if(C=t.charCodeAt(_),C!==C||C===r||C===n||C===i)return;if(C===l){S=_,_++;break}_++}if(S!==void 0&&x!==S&&t.charCodeAt(_++)===o){if(a)return!0;for(y=t.slice(x,S),w=e.now(),O=0,k=0,A=_,j=[];_<h;){if(C=t.charCodeAt(_),C!==C||C===r)M={start:O,contentStart:A||_,contentEnd:_,end:_},j.push(M),C===r&&(O=_+1,k=0,A=void 0,M.end=O);else if(k!==void 0)if(C===i||C===n)k+=C===i?1:f-k%f,k>f&&(k=void 0,A=_);else{if(k<f&&M&&(M.contentStart===M.contentEnd||b(d,g,c,[e,t.slice(_,p),!0])))break;k=void 0,A=_}_++}for(_=-1,h=j.length;h>0&&(M=j[h-1],M.contentStart===M.contentEnd);)h--;for(T=e(t.slice(0,M.contentEnd));++_<h;)M=j[_],m[w.line+_]=(m[w.line+_]||0)+(M.contentStart-M.start),v.push(t.slice(M.contentStart,M.end));return E=c.enterBlock(),D=c.tokenizeBlock(v.join(``),w),E(),T({type:`footnoteDefinition`,identifier:y.toLowerCase(),label:y,children:D})}}}function k(e,t,a){var o=t.length+1,c=0,d,f,p,m;if(t.charCodeAt(c++)===s&&t.charCodeAt(c++)===u){for(f=c;c<o;){if(m=t.charCodeAt(c),m!==m||m===r||m===n||m===i)return;if(m===l){p=c,c++;break}c++}if(p!==void 0&&f!==p)return a?!0:(d=t.slice(f,p),e(t.slice(0,c))({type:`footnoteReference`,identifier:d.toLowerCase(),label:d}))}}function A(e,t,n){var r=this,i=t.length+1,a=0,o=0,f,p,m,h,g,_,v;if(t.charCodeAt(a++)===u&&t.charCodeAt(a++)===s){for(m=a;a<i;){if(p=t.charCodeAt(a),p!==p)return;if(_===void 0)if(p===c)a+=2;else if(p===s)o++,a++;else if(p===l)if(o===0){h=a,a++;break}else o--,a++;else if(p===d){for(g=a,_=1;t.charCodeAt(g+_)===d;)_++;a+=_}else a++;else if(p===d){for(g=a,v=1;t.charCodeAt(g+v)===d;)v++;a+=v,_===v&&(_=void 0),v=void 0}else a++}if(h!==void 0)return n?!0:(f=e.now(),f.column+=2,f.offset+=2,e(t.slice(0,a))({type:`footnote`,children:r.tokenizeInline(t.slice(m,h),f)}))}}function j(e,t,n){var r=0;if(t.charCodeAt(r)===a&&r++,t.charCodeAt(r)===s&&t.charCodeAt(r+1)!==u)return C.call(this,e,t,n)}function M(e,t,r){for(var a=0,o=t.charCodeAt(a);o===i||o===n;)o=t.charCodeAt(++a);if(o===s&&t.charCodeAt(a+1)!==u)return S.call(this,e,t,r)}function N(e,t){return e.indexOf(`[`,t)}function P(e,t){return e.indexOf(`^[`,t)}}function v(e){var t=e.prototype.visitors,n=` `;t.footnote=r,t.footnoteReference=i,t.footnoteDefinition=a;function r(e){return`^[`+this.all(e).join(``)+`]`}function i(e){return`[^`+(e.label||e.identifier)+`]`}function a(e){for(var t=this.all(e).join(`
1
+ import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-Ca9zqOqT.js";import{g as a}from"../assets/index-ZxtmHZ3Y.js";var o,s,c,l,u,d,f,p,m=Object.create,h=Object.defineProperty,g=Object.getOwnPropertyDescriptor,_=Object.getOwnPropertyNames,v=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,b=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},x=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0})},S=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of _(t))!y.call(e,i)&&i!==n&&h(e,i,{get:()=>t[i],enumerable:!(r=g(t,i))||r.enumerable});return e},C=(e,t,n)=>(n=e==null?{}:m(v(e)),S(t||!e||!e.__esModule?h(n,`default`,{value:e,enumerable:!0}):n,e)),w=b((e,t)=>{t.exports=m;var n=9,r=10,i=32,a=33,o=58,s=91,c=92,l=93,u=94,d=96,f=4,p=1024;function m(e){var t=this.Parser,n=this.Compiler;h(t)&&_(t,e),g(n)&&v(n)}function h(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function g(e){return!!(e&&e.prototype&&e.prototype.visitors)}function _(e,t){for(var m=t||{},h=e.prototype,g=h.blockTokenizers,_=h.inlineTokenizers,v=h.blockMethods,x=h.inlineMethods,S=g.definition,C=_.reference,w=[],T=-1,E=v.length,D;++T<E;)D=v[T],D!==`newline`&&D!==`indentedCode`&&D!==`paragraph`&&D!==`footnoteDefinition`&&w.push([D]);w.push([`footnoteDefinition`]),m.inlineNotes&&(y(x,`reference`,`inlineNote`),_.inlineNote=A),y(v,`definition`,`footnoteDefinition`),y(x,`reference`,`footnoteCall`),g.definition=M,g.footnoteDefinition=O,_.footnoteCall=k,_.reference=j,h.interruptFootnoteDefinition=w,j.locator=C.locator,k.locator=N,A.locator=P;function O(e,t,a){for(var c=this,d=c.interruptFootnoteDefinition,m=c.offset,h=t.length+1,_=0,v=[],y,x,S,C,w,T,E,D,O,k,A,j,M;_<h&&(C=t.charCodeAt(_),C===n||C===i);)_++;if(t.charCodeAt(_++)===s&&t.charCodeAt(_++)===u){for(x=_;_<h;){if(C=t.charCodeAt(_),C!==C||C===r||C===n||C===i)return;if(C===l){S=_,_++;break}_++}if(S!==void 0&&x!==S&&t.charCodeAt(_++)===o){if(a)return!0;for(y=t.slice(x,S),w=e.now(),O=0,k=0,A=_,j=[];_<h;){if(C=t.charCodeAt(_),C!==C||C===r)M={start:O,contentStart:A||_,contentEnd:_,end:_},j.push(M),C===r&&(O=_+1,k=0,A=void 0,M.end=O);else if(k!==void 0)if(C===i||C===n)k+=C===i?1:f-k%f,k>f&&(k=void 0,A=_);else{if(k<f&&M&&(M.contentStart===M.contentEnd||b(d,g,c,[e,t.slice(_,p),!0])))break;k=void 0,A=_}_++}for(_=-1,h=j.length;h>0&&(M=j[h-1],M.contentStart===M.contentEnd);)h--;for(T=e(t.slice(0,M.contentEnd));++_<h;)M=j[_],m[w.line+_]=(m[w.line+_]||0)+(M.contentStart-M.start),v.push(t.slice(M.contentStart,M.end));return E=c.enterBlock(),D=c.tokenizeBlock(v.join(``),w),E(),T({type:`footnoteDefinition`,identifier:y.toLowerCase(),label:y,children:D})}}}function k(e,t,a){var o=t.length+1,c=0,d,f,p,m;if(t.charCodeAt(c++)===s&&t.charCodeAt(c++)===u){for(f=c;c<o;){if(m=t.charCodeAt(c),m!==m||m===r||m===n||m===i)return;if(m===l){p=c,c++;break}c++}if(p!==void 0&&f!==p)return a?!0:(d=t.slice(f,p),e(t.slice(0,c))({type:`footnoteReference`,identifier:d.toLowerCase(),label:d}))}}function A(e,t,n){var r=this,i=t.length+1,a=0,o=0,f,p,m,h,g,_,v;if(t.charCodeAt(a++)===u&&t.charCodeAt(a++)===s){for(m=a;a<i;){if(p=t.charCodeAt(a),p!==p)return;if(_===void 0)if(p===c)a+=2;else if(p===s)o++,a++;else if(p===l)if(o===0){h=a,a++;break}else o--,a++;else if(p===d){for(g=a,_=1;t.charCodeAt(g+_)===d;)_++;a+=_}else a++;else if(p===d){for(g=a,v=1;t.charCodeAt(g+v)===d;)v++;a+=v,_===v&&(_=void 0),v=void 0}else a++}if(h!==void 0)return n?!0:(f=e.now(),f.column+=2,f.offset+=2,e(t.slice(0,a))({type:`footnote`,children:r.tokenizeInline(t.slice(m,h),f)}))}}function j(e,t,n){var r=0;if(t.charCodeAt(r)===a&&r++,t.charCodeAt(r)===s&&t.charCodeAt(r+1)!==u)return C.call(this,e,t,n)}function M(e,t,r){for(var a=0,o=t.charCodeAt(a);o===i||o===n;)o=t.charCodeAt(++a);if(o===s&&t.charCodeAt(a+1)!==u)return S.call(this,e,t,r)}function N(e,t){return e.indexOf(`[`,t)}function P(e,t){return e.indexOf(`^[`,t)}}function v(e){var t=e.prototype.visitors,n=` `;t.footnote=r,t.footnoteReference=i,t.footnoteDefinition=a;function r(e){return`^[`+this.all(e).join(``)+`]`}function i(e){return`[^`+(e.label||e.identifier)+`]`}function a(e){for(var t=this.all(e).join(`
2
2
 
3
3
  `).split(`
4
4
  `),r=0,i=t.length,a;++r<i;)a=t[r],a!==``&&(t[r]=n+a);return`[^`+(e.label||e.identifier)+`]: `+t.join(`
@@ -1,2 +1,2 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{d as t,f as n}from"./markdown-core-DHnR5Hw8.js";import{t as r}from"./useTranslation-CdeLZqSW.js";import{Gt as i,Ht as a,Jt as o,Rt as s,en as c,on as l,tn as u}from"./ui-vendor-D_pYT79f.js";import{t as d}from"./logger-DSXjF4ye.js";import{r as f}from"./utils-BhpNrGnR.js";import{t as p}from"./appStore-CLIS0fvz.js";var m=e(n(),1),h={selection:8,impact:14,success:[10,28,12],warning:[18,42,18]},g=()=>typeof window>`u`||typeof navigator>`u`?!1:navigator.maxTouchPoints>0||window.matchMedia?.(`(pointer: coarse)`).matches===!0,_=()=>typeof navigator<`u`&&typeof navigator.vibrate==`function`&&g(),v=(e=`selection`)=>p.getState().preferences.hapticFeedbackEnabled!==!0||!_()?!1:navigator.vibrate(h[e]),y=[/^ {0,3}(?:`{3,}|~{3,})/m,/`[^`\n]+`/,/^\s{0,3}#{1,6}\s/m,/^\s{0,3}[-*+]\s/m,/^\s{0,3}\d+\.\s/m,/^\s{0,3}>\s/m,/\[[^\]]+\]\([^)]+\)/,/!\[[^\]]*]\([^)]+\)/,/\|.*\|/,/\*\*[^*]+\*\*/,/__[^_]+__/,/~~[^~]+~~/,/\\\[[\s\S]*?\\\]/,/\\\([\s\S]*?\\\)/,/\$\$[\s\S]*?\$\$/,/(^|[^$])\$[^$\n]+\$/],b=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function x(e){let t=[],n=/^( {0,3})(`{3,}|~{3,})([^\n\r]*)(?:\r?\n|$)/gm,r;for(;r=n.exec(e);){let i=r[1].length,a=r[2],o=a[0],s=r[3].trim();if(o==="`"&&s.includes("`"))continue;let c=n.lastIndex,l=RegExp(`^ {0,3}${b(o)}{${a.length},}[ \\t]*(?:\\r?\\n|$)`,`gm`);l.lastIndex=c;let u=l.exec(e),d=s.split(/\s+/)[0]||null;if(!u){t.push({start:r.index,end:e.length,codeStart:c,codeEnd:e.length,indent:i,language:d,complete:!1});break}t.push({start:r.index,end:l.lastIndex,codeStart:c,codeEnd:u.index,indent:i,language:d,complete:!0}),n.lastIndex=l.lastIndex}return t}function S(e){return/<(?:html|head|body)(?:\s|>)|<\/(?:head|body|html)\s*>/i.test(e)}function C(e,t){return e.start<t.end&&t.start<e.end}function w(e,t){let n=/^( {0,3})(<!doctype\s+html(?:\s|>|$)|<html(?:\s[^>\n\r]*)?>)/gim,r;for(;r=n.exec(e);){let n=r.index+r[1].length;if(t.some(e=>n>=e.start&&n<e.end))continue;let i=e.slice(n);if(!S(i.slice(r[2].length)))continue;let a=/<\/html\s*>/i.exec(i),o=a?n+a.index+a[0].length:e.length;return{start:r.index,end:o,codeStart:n,codeEnd:o,indent:0,language:`html`,complete:!!a}}return null}function T(e){let t=x(e),n=w(e,t);return n?[...t.filter(e=>!C(e,n)),n].sort((e,t)=>e.start-t.start):t}function E(e,t){return t===0?e:e.replace(RegExp(`^ {1,${t}}`,`gm`),``)}function D(e){return y.some(t=>t.test(e))}function O(e){let t=[],n=T(e),r=0;for(let i of n){let n=e.slice(r,i.start);n&&t.push({type:`text`,content:n}),t.push({type:`code`,language:i.language,content:E(e.slice(i.codeStart,i.codeEnd),i.indent),complete:i.complete}),r=i.end}let i=e.slice(r);return(i||t.length===0)&&t.push({type:`text`,content:i}),t}function k(e){let t=e=>e.replace(/\\\[([\s\S]*?)\\\]/g,(e,t)=>`$$${t}$$`).replace(/\\\(([\s\S]*?)\\\)/g,(e,t)=>`$${t}$`),n=e=>{let n=/`[^`\n]+`/g,r=``,i=0,a;for(;a=n.exec(e);)r+=t(e.slice(i,a.index)),r+=a[0],i=n.lastIndex;return r+t(e.slice(i))},r=x(e),i=``,a=0;for(let t of r)i+=n(e.slice(a,t.start)),i+=e.slice(t.start,t.end),a=t.end;return i+=n(e.slice(a)),i}var A=t(),j=d(`components:ui:message-code-block`),M=24,N={bash:`sh`,c:`c`,cpp:`cpp`,csharp:`cs`,css:`css`,go:`go`,html:`html`,htm:`html`,java:`java`,javascript:`js`,js:`js`,json:`json`,jsx:`jsx`,kotlin:`kt`,markdown:`md`,mermaid:`mmd`,php:`php`,python:`py`,py:`py`,ruby:`rb`,rust:`rs`,sh:`sh`,shell:`sh`,sql:`sql`,svg:`svg`,swift:`swift`,toml:`toml`,ts:`ts`,tsx:`tsx`,typescript:`ts`,xml:`xml`,yaml:`yaml`,yml:`yaml`,zsh:`sh`};function P(e,t){let n=(e||``).toLowerCase();if(n===`html`||n===`htm`)return`html`;if(n===`svg`)return`svg`;if(n===`mermaid`)return`mermaid`;let r=t.slice(0,500).toLowerCase();return(!n||n===`xml`)&&r.includes(`<svg`)?`svg`:!n&&(r.includes(`<!doctype html`)||r.includes(`<html`))?`html`:null}function F({code:e,language:t,state:n,children:d}){let{t:h}=r(),g=p(e=>e.openArtifactPanel),[_,y]=m.useState(null),[b,x]=m.useState(null),S=m.useRef(null),C=_===e,w=t||`text`,T=h(C?`artifacts.copied`:`artifacts.copy`),E=`${T}: ${w}`,D=m.useMemo(()=>e?e.split(`
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{d as t,f as n}from"./markdown-core-DHnR5Hw8.js";import{t as r}from"./useTranslation-CdeLZqSW.js";import{Gt as i,Ht as a,Jt as o,Rt as s,en as c,on as l,tn as u}from"./ui-vendor-D_pYT79f.js";import{t as d}from"./logger-DSXjF4ye.js";import{r as f}from"./utils-BhpNrGnR.js";import{t as p}from"./appStore-ne0eCPTX.js";var m=e(n(),1),h={selection:8,impact:14,success:[10,28,12],warning:[18,42,18]},g=()=>typeof window>`u`||typeof navigator>`u`?!1:navigator.maxTouchPoints>0||window.matchMedia?.(`(pointer: coarse)`).matches===!0,_=()=>typeof navigator<`u`&&typeof navigator.vibrate==`function`&&g(),v=(e=`selection`)=>p.getState().preferences.hapticFeedbackEnabled!==!0||!_()?!1:navigator.vibrate(h[e]),y=[/^ {0,3}(?:`{3,}|~{3,})/m,/`[^`\n]+`/,/^\s{0,3}#{1,6}\s/m,/^\s{0,3}[-*+]\s/m,/^\s{0,3}\d+\.\s/m,/^\s{0,3}>\s/m,/\[[^\]]+\]\([^)]+\)/,/!\[[^\]]*]\([^)]+\)/,/\|.*\|/,/\*\*[^*]+\*\*/,/__[^_]+__/,/~~[^~]+~~/,/\\\[[\s\S]*?\\\]/,/\\\([\s\S]*?\\\)/,/\$\$[\s\S]*?\$\$/,/(^|[^$])\$[^$\n]+\$/],b=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function x(e){let t=[],n=/^( {0,3})(`{3,}|~{3,})([^\n\r]*)(?:\r?\n|$)/gm,r;for(;r=n.exec(e);){let i=r[1].length,a=r[2],o=a[0],s=r[3].trim();if(o==="`"&&s.includes("`"))continue;let c=n.lastIndex,l=RegExp(`^ {0,3}${b(o)}{${a.length},}[ \\t]*(?:\\r?\\n|$)`,`gm`);l.lastIndex=c;let u=l.exec(e),d=s.split(/\s+/)[0]||null;if(!u){t.push({start:r.index,end:e.length,codeStart:c,codeEnd:e.length,indent:i,language:d,complete:!1});break}t.push({start:r.index,end:l.lastIndex,codeStart:c,codeEnd:u.index,indent:i,language:d,complete:!0}),n.lastIndex=l.lastIndex}return t}function S(e){return/<(?:html|head|body)(?:\s|>)|<\/(?:head|body|html)\s*>/i.test(e)}function C(e,t){return e.start<t.end&&t.start<e.end}function w(e,t){let n=/^( {0,3})(<!doctype\s+html(?:\s|>|$)|<html(?:\s[^>\n\r]*)?>)/gim,r;for(;r=n.exec(e);){let n=r.index+r[1].length;if(t.some(e=>n>=e.start&&n<e.end))continue;let i=e.slice(n);if(!S(i.slice(r[2].length)))continue;let a=/<\/html\s*>/i.exec(i),o=a?n+a.index+a[0].length:e.length;return{start:r.index,end:o,codeStart:n,codeEnd:o,indent:0,language:`html`,complete:!!a}}return null}function T(e){let t=x(e),n=w(e,t);return n?[...t.filter(e=>!C(e,n)),n].sort((e,t)=>e.start-t.start):t}function E(e,t){return t===0?e:e.replace(RegExp(`^ {1,${t}}`,`gm`),``)}function D(e){return y.some(t=>t.test(e))}function O(e){let t=[],n=T(e),r=0;for(let i of n){let n=e.slice(r,i.start);n&&t.push({type:`text`,content:n}),t.push({type:`code`,language:i.language,content:E(e.slice(i.codeStart,i.codeEnd),i.indent),complete:i.complete}),r=i.end}let i=e.slice(r);return(i||t.length===0)&&t.push({type:`text`,content:i}),t}function k(e){let t=e=>e.replace(/\\\[([\s\S]*?)\\\]/g,(e,t)=>`$$${t}$$`).replace(/\\\(([\s\S]*?)\\\)/g,(e,t)=>`$${t}$`),n=e=>{let n=/`[^`\n]+`/g,r=``,i=0,a;for(;a=n.exec(e);)r+=t(e.slice(i,a.index)),r+=a[0],i=n.lastIndex;return r+t(e.slice(i))},r=x(e),i=``,a=0;for(let t of r)i+=n(e.slice(a,t.start)),i+=e.slice(t.start,t.end),a=t.end;return i+=n(e.slice(a)),i}var A=t(),j=d(`components:ui:message-code-block`),M=24,N={bash:`sh`,c:`c`,cpp:`cpp`,csharp:`cs`,css:`css`,go:`go`,html:`html`,htm:`html`,java:`java`,javascript:`js`,js:`js`,json:`json`,jsx:`jsx`,kotlin:`kt`,markdown:`md`,mermaid:`mmd`,php:`php`,python:`py`,py:`py`,ruby:`rb`,rust:`rs`,sh:`sh`,shell:`sh`,sql:`sql`,svg:`svg`,swift:`swift`,toml:`toml`,ts:`ts`,tsx:`tsx`,typescript:`ts`,xml:`xml`,yaml:`yaml`,yml:`yaml`,zsh:`sh`};function P(e,t){let n=(e||``).toLowerCase();if(n===`html`||n===`htm`)return`html`;if(n===`svg`)return`svg`;if(n===`mermaid`)return`mermaid`;let r=t.slice(0,500).toLowerCase();return(!n||n===`xml`)&&r.includes(`<svg`)?`svg`:!n&&(r.includes(`<!doctype html`)||r.includes(`<html`))?`html`:null}function F({code:e,language:t,state:n,children:d}){let{t:h}=r(),g=p(e=>e.openArtifactPanel),[_,y]=m.useState(null),[b,x]=m.useState(null),S=m.useRef(null),C=_===e,w=t||`text`,T=h(C?`artifacts.copied`:`artifacts.copy`),E=`${T}: ${w}`,D=m.useMemo(()=>e?e.split(`
2
2
  `).length:0,[e]),O=b===null?n===`complete`&&D>M:!b,k=n===`complete`?P(t,e):null;return m.useEffect(()=>()=>{S.current!==null&&window.clearTimeout(S.current)},[]),(0,A.jsxs)(`div`,{dir:`ltr`,"data-testid":`code-block`,"data-state":n,"data-language":w,"data-collapsed":O,className:`group relative my-4 overflow-hidden rounded-xl border border-line bg-surface-subtle text-left text-ink shadow-[0_12px_32px_rgba(13,17,23,0.1)] dark:border-white/10 dark:bg-[#0D1117] dark:text-[#E6EDF3] dark:shadow-[0_12px_32px_rgba(13,17,23,0.16)]`,children:[(0,A.jsxs)(`div`,{className:`flex h-10 items-center justify-between border-b border-line bg-surface-raised/70 px-3.5 dark:border-white/10 dark:bg-white/[0.035]`,children:[(0,A.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,A.jsx)(o,{className:`h-3.5 w-3.5 shrink-0 text-ink-subtle dark:text-[#8B949E]`}),(0,A.jsx)(`span`,{className:`truncate font-mono text-[11px] font-medium lowercase tracking-[-0.01em] text-ink-muted dark:text-[#B1BAC4]`,children:w})]}),(0,A.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[n===`streaming`&&(0,A.jsx)(`span`,{role:`status`,"aria-label":h(`common.loading`),className:`flex h-7 w-7 items-center justify-center`,children:(0,A.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary-400`})}),D>M&&(0,A.jsx)(`button`,{type:`button`,onClick:()=>x(O),className:`flex h-7 w-7 items-center justify-center rounded-md text-ink-subtle transition-colors hover:bg-surface-subtle hover:text-ink focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-400/70 dark:text-[#8B949E] dark:hover:bg-white/[0.08] dark:hover:text-[#E6EDF3]`,title:h(O?`artifacts.expand`:`artifacts.collapse`),"aria-label":h(O?`artifacts.expand`:`artifacts.collapse`),"aria-expanded":!O,children:O?(0,A.jsx)(c,{className:`h-3.5 w-3.5`}):(0,A.jsx)(u,{className:`h-3.5 w-3.5`})}),(0,A.jsx)(`button`,{type:`button`,onClick:()=>{if(!e)return;let n=N[(t||``).toLowerCase()]||`txt`,r=new Blob([e],{type:`text/plain;charset=utf-8`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`snippet.${n}`,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)},disabled:!e,className:`flex h-7 w-7 items-center justify-center rounded-md text-ink-subtle transition-colors hover:bg-surface-subtle hover:text-ink focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-400/70 disabled:cursor-default disabled:opacity-35 dark:text-[#8B949E] dark:hover:bg-white/[0.08] dark:hover:text-[#E6EDF3]`,title:h(`common.download`),"aria-label":`${h(`common.download`)}: ${w}`,children:(0,A.jsx)(a,{className:`h-3.5 w-3.5`})}),k&&(0,A.jsx)(`button`,{type:`button`,onClick:()=>{if(!k||!e)return;let t=Date.now();g({id:f(),type:k,title:`${w} ${h(`artifacts.preview`)}`,content:e,language:w,createdAt:t,updatedAt:t})},className:`flex h-7 w-7 items-center justify-center rounded-md text-ink-subtle transition-colors hover:bg-surface-subtle hover:text-ink focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-400/70 dark:text-[#8B949E] dark:hover:bg-white/[0.08] dark:hover:text-[#E6EDF3]`,title:h(`artifacts.preview`),"aria-label":`${h(`artifacts.preview`)}: ${w}`,children:(0,A.jsx)(s,{className:`h-3.5 w-3.5`})}),(0,A.jsx)(`button`,{type:`button`,onClick:async()=>{if(e)try{await navigator.clipboard.writeText(e),v(`success`),y(e),S.current!==null&&window.clearTimeout(S.current),S.current=window.setTimeout(()=>{y(null),S.current=null},2e3)}catch(e){j.error(`Failed to copy code:`,e)}},disabled:!e,className:`flex h-7 w-7 items-center justify-center rounded-md text-ink-subtle transition-colors hover:bg-surface-subtle hover:text-ink focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-400/70 disabled:cursor-default disabled:opacity-35 dark:text-[#8B949E] dark:hover:bg-white/[0.08] dark:hover:text-[#E6EDF3]`,title:T,"aria-label":E,children:C?(0,A.jsx)(l,{className:`h-3.5 w-3.5 text-green-400`}):(0,A.jsx)(i,{className:`h-3.5 w-3.5`})}),(0,A.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,children:C?E:``})]})]}),O?(0,A.jsx)(`button`,{type:`button`,onClick:()=>x(!0),className:`block w-full px-3.5 py-2.5 text-left font-mono text-[11px] italic text-ink-subtle transition-colors hover:bg-surface-raised/70 hover:text-ink dark:text-[#8B949E] dark:hover:bg-white/[0.035] dark:hover:text-[#E6EDF3]`,children:h(`chatMessage.hiddenLines`,{count:D})}):d]})}var I=`#0D1117`,L=`rgb(var(--color-surface-subtle))`,R=`max-h-[60vh] min-h-12 overflow-auto bg-surface-subtle p-4 text-left font-mono text-[14px] leading-6 text-ink whitespace-pre tabular-nums dark:bg-[#0D1117] dark:text-[#E6EDF3]`,z={maxHeight:`60vh`,minHeight:`3rem`,overflow:`auto`,padding:`1rem`,fontSize:`14px`,lineHeight:`1.5rem`,fontFamily:`"JetBrains Mono", ui-monospace, SFMono-Regular, monospace`,whiteSpace:`pre`};export{F as a,D as c,z as i,v as l,L as n,O as o,R as r,k as s,I as t};
@@ -1,4 +1,4 @@
1
- import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-Ca9zqOqT.js";import{h as a}from"../assets/index-D4LhtFTX.js";var o,s,c,l,u,d,f,p=Object.defineProperty,m=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},h={};m(h,{__debug:()=>mo,check:()=>fo,doc:()=>Ea,format:()=>uo,formatWithCursor:()=>lo,getSupportInfo:()=>po,util:()=>ja,version:()=>Aa});var g=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),_=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},v=g(`replaceAll`,function(){if(typeof this==`string`)return _}),ee=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},te=new class extends ee{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function ne(e,t,n){return te.diff(e,t,n)}var re=()=>{},ie=`cr`,ae=`crlf`,oe=`lf`,se=`\r`,ce=`\r
1
+ import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-Ca9zqOqT.js";import{g as a}from"../assets/index-ZxtmHZ3Y.js";var o,s,c,l,u,d,f,p=Object.defineProperty,m=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},h={};m(h,{__debug:()=>mo,check:()=>fo,doc:()=>Ea,format:()=>uo,formatWithCursor:()=>lo,getSupportInfo:()=>po,util:()=>ja,version:()=>Aa});var g=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),_=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},v=g(`replaceAll`,function(){if(typeof this==`string`)return _}),ee=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},te=new class extends ee{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function ne(e,t,n){return te.diff(e,t,n)}var re=()=>{},ie=`cr`,ae=`crlf`,oe=`lf`,se=`\r`,ce=`\r
2
2
  `,le=`
3
3
  `,ue=le;function de(e){let t=e.indexOf(se);return t===-1?oe:e.charAt(t+1)===le?ae:ie}function fe(e){return e===ie?se:e===ae?ce:ue}var pe=new Map([[le,/\n/g],[se,/\r/g],[ce,/\r\n/g]]);function me(e,t){let n=pe.get(t);return e.match(n)?.length??0}var he=/\r\n?/g;function ge(e){return v(0,e,he,le)}var _e=Symbol.for(`comments`);function ve(e){return this[e<0?this.length+e:e]}var y=g(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return ve}),b=`string`,x=`array`,S=`cursor`,C=`indent`,w=`align`,T=`trim`,E=`group`,D=`fill`,O=`if-break`,k=`indent-if-break`,A=`line-suffix`,j=`line-suffix-boundary`,M=`line`,N=`label`,P=`break-parent`,ye=new Set([S,C,w,T,E,D,O,k,A,j,M,N,P]);function be(e){let t=e.length;for(;t>0&&(e[t-1]===`\r`||e[t-1]===`
4
4
  `);)t--;return t<e.length?e.slice(0,t):e}function xe(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function Se(e){if(typeof e==`string`)return b;if(Array.isArray(e))return x;if(!e)return;let{type:t}=e;if(ye.has(t))return t}var F=Se,Ce=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function we(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
@@ -1,4 +1,4 @@
1
- import{g as e,p as t}from"./router-vendor-Ca9zqOqT.js";import{h as n}from"../assets/index-D4LhtFTX.js";var r,i=Object.defineProperty,a=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},o={};a(o,{parsers:()=>s});var s={};a(s,{typescript:()=>Qm});var c=()=>()=>{},l=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),u=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},d=l(`replaceAll`,function(){if(typeof this==`string`)return u}),f=`6.0`,p=[],m=new Map;function h(e){return e===void 0?0:e.length}function ee(e,t){if(e!==void 0)for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r)return r}}function te(e,t){if(e!==void 0)for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!==void 0)return r}}function ne(e,t,n){let r=[];T.assertEqual(e.length,t.length);for(let i=0;i<e.length;i++)r.push(n(e[i],t[i],i));return r}function re(e,t){if(e!==void 0){for(let n=0;n<e.length;n++)if(!t(e[n],n))return!1}return!0}function g(e,t,n){if(e!==void 0)for(let r=n??0;r<e.length;r++){let n=e[r];if(t(n,r))return n}}function _(e,t,n){if(e===void 0)return-1;for(let r=n??0;r<e.length;r++)if(t(e[r],r))return r;return-1}function v(e,t,n=Ie){if(e!==void 0){for(let r=0;r<e.length;r++)if(n(e[r],t))return!0}return!1}function y(e,t){if(e!==void 0){let n=e.length,r=0;for(;r<n&&t(e[r]);)r++;if(r<n){let i=e.slice(0,r);for(r++;r<n;){let n=e[r];t(n)&&i.push(n),r++}return i}}return e}function b(e,t){let n;if(e!==void 0){n=[];for(let r=0;r<e.length;r++)n.push(t(e[r],r))}return n}function x(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];r&&(Oe(r)?S(t,r):t.push(r))}return t}function ie(e,t){let n;if(e!==void 0)for(let r=0;r<e.length;r++){let i=t(e[r],r);i&&(n=Oe(i)?S(n,i):ue(n,i))}return n??p}function ae(e,t){let n;if(e!==void 0)for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r);(n||i!==a||Oe(a))&&(n||(n=e.slice(0,r)),Oe(a)?S(n,a):n.push(a))}return n??e}function oe(e,t){let n=[];if(e!==void 0)for(let r=0;r<e.length;r++){let i=t(e[r],r);i!==void 0&&n.push(i)}return n}function se(e,t){if(e!==void 0)if(t!==void 0){for(let n=0;n<e.length;n++)if(t(e[n]))return!0}else return e.length>0;return!1}function ce(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function le(e,t,n=Ie){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r],r))return!1;return!0}function ue(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function de(e,t){return t<0?e.length+t:t}function S(e,t,n,r){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(n,r);n=n===void 0?0:de(t,n),r=r===void 0?t.length:de(t,r);for(let i=n;i<r&&i<t.length;i++)t[i]!==void 0&&e.push(t[i]);return e}function fe(e,t,n){return!v(e,t,n)&&(e.push(t),!0)}function pe(e,t,n){return e===void 0?[t]:(fe(e,t,n),e)}function me(e,t){return e.length===0?p:e.slice().sort(t)}Array.prototype.at;function he(e){return e===void 0||e.length===0?void 0:e[0]}function ge(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function _e(e){return T.assert(e.length!==0),e[e.length-1]}function ve(e){return e!==void 0&&e.length===1?e[0]:void 0}function ye(e,t,n,r,i){return be(e,n(t),n,r,i)}function be(e,t,n,r,i){if(!se(e))return-1;let a=i??0,o=e.length-1;for(;a<=o;){let i=a+(o-a>>1),s=n(e[i],i);switch(Math.sign(r(s,t))){case-1:a=i+1;break;case 0:return i;case 1:o=i-1}}return~a}function xe(e,t,n,r,i){if(e&&e.length>0){let a=e.length;if(a>0){let o=r===void 0||r<0?0:r,s=i===void 0||o+i>a-1?a-1:o+i,c;for(arguments.length<=2?(c=e[o],o++):c=n;o<=s;)c=t(c,e[o],o),o++;return c}}return n}var Se=Object.prototype.hasOwnProperty;function Ce(e,t){return Se.call(e,t)}function we(e){let t=[];for(let n in e)Se.call(e,n)&&t.push(n);return t}function Te(){let e=new Map;return e.add=Ee,e.remove=De,e}function Ee(e,t){let n=this.get(e);return n===void 0?this.set(e,n=[t]):n.push(t),n}function De(e,t){let n=this.get(e);n!==void 0&&(Ge(n,t),n.length||this.delete(e))}function Oe(e){return Array.isArray(e)}function ke(e){return Oe(e)?e:[e]}function C(e,t){return e!==void 0&&t(e)?e:void 0}function Ae(e,t){return e!==void 0&&t(e)?e:T.fail(`Invalid cast. The supplied value ${e} did not pass the test '${T.getFunctionName(t)}'.`)}function je(e){}function Me(){return!0}function Ne(e){return e}function Pe(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Fe(e){let t=new Map;return n=>{let r=`${typeof n}:${n}`,i=t.get(r);return i===void 0&&!t.has(r)&&(i=e(n),t.set(r,i)),i}}function Ie(e,t){return e===t}function Le(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function Re(e,t){return Ie(e,t)}function ze(e,t){return e===t?0:e===void 0?-1:t===void 0?1:e<t?-1:1}function w(e,t){return ze(e,t)}function Be(e,t,n){for(let r=0;r<e.length;r++)t=Math.max(t,n(e[r]));return t}function Ve(e,t,n){let r=Math.max(2,Math.floor(e.length*.34)),i=Math.floor(e.length*.4)+1,a;for(let o of t){let t=n(o);if(t!==void 0&&Math.abs(t.length-e.length)<=r){if(t===e||t.length<3&&t.toLowerCase()!==e.toLowerCase())continue;let n=He(e,t,i-.1);if(n===void 0)continue;T.assert(n<i),i=n,a=o}}return a}function He(e,t,n){let r=Array(t.length+1),i=Array(t.length+1),a=n+.01;for(let e=0;e<=t.length;e++)r[e]=e;for(let o=1;o<=e.length;o++){let s=e.charCodeAt(o-1),c=Math.ceil(o>n?o-n:1),l=Math.floor(t.length>n+o?n+o:t.length);i[0]=o;let u=o;for(let e=1;e<c;e++)i[e]=a;for(let n=c;n<=l;n++){let a=e[o-1].toLowerCase()===t[n-1].toLowerCase()?r[n-1]+.1:r[n-1]+2,c=s===t.charCodeAt(n-1)?r[n-1]:Math.min(r[n]+1,i[n-1]+1,a);i[n]=c,u=Math.min(u,c)}for(let e=l+1;e<=t.length;e++)i[e]=a;if(u>n)return;let d=r;r=i,i=d}let o=r[t.length];return o>n?void 0:o}function Ue(e,t,n){let r=e.length-t.length;return r>=0&&(n?Le(e.slice(r),t):e.indexOf(t,r)===r)}function We(e,t){e[t]=e[e.length-1],e.pop()}function Ge(e,t){return Ke(e,e=>e===t)}function Ke(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return We(e,n),!0;return!1}function qe(e,t,n){return n?Le(e.slice(0,t.length),t):e.lastIndexOf(t,0)===0}function Je(e){return e===void 0?void 0:[e]}var T;(e=>{let t=0;e.currentLogLevel=2,e.isDebugging=!1;function n(t){return e.currentLogLevel<=t}e.shouldLog=n;function r(t,r){e.loggingHost&&n(t)&&e.loggingHost.log(t,r)}function i(e){r(3,e)}e.log=i,(e=>{function t(e){r(1,e)}e.error=t;function n(e){r(2,e)}e.warn=n;function i(e){r(3,e)}e.log=i;function a(e){r(4,e)}e.trace=a})(i=e.log||(e.log={}));let a={};function o(){return t}e.getAssertionLevel=o;function s(n){let r=t;if(t=n,n>r)for(let t of we(a)){let r=a[t];r!==void 0&&e[t]!==r.assertion&&n>=r.level&&(e[t]=r,a[t]=void 0)}}e.setAssertionLevel=s;function c(e){return t>=e}e.shouldAssert=c;function l(t,n){return c(t)?!0:(a[n]={level:t,assertion:e[n]},e[n]=je,!1)}function u(e,t){let n=Error(e?`Debug Failure. ${e}`:`Debug Failure.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,t||u),n}e.fail=u;function d(e,t,n){return u(`${t||`Unexpected node.`}\r
1
+ import{g as e,p as t}from"./router-vendor-Ca9zqOqT.js";import{g as n}from"../assets/index-ZxtmHZ3Y.js";var r,i=Object.defineProperty,a=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},o={};a(o,{parsers:()=>s});var s={};a(s,{typescript:()=>Qm});var c=()=>()=>{},l=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),u=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},d=l(`replaceAll`,function(){if(typeof this==`string`)return u}),f=`6.0`,p=[],m=new Map;function h(e){return e===void 0?0:e.length}function ee(e,t){if(e!==void 0)for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r)return r}}function te(e,t){if(e!==void 0)for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!==void 0)return r}}function ne(e,t,n){let r=[];T.assertEqual(e.length,t.length);for(let i=0;i<e.length;i++)r.push(n(e[i],t[i],i));return r}function re(e,t){if(e!==void 0){for(let n=0;n<e.length;n++)if(!t(e[n],n))return!1}return!0}function g(e,t,n){if(e!==void 0)for(let r=n??0;r<e.length;r++){let n=e[r];if(t(n,r))return n}}function _(e,t,n){if(e===void 0)return-1;for(let r=n??0;r<e.length;r++)if(t(e[r],r))return r;return-1}function v(e,t,n=Ie){if(e!==void 0){for(let r=0;r<e.length;r++)if(n(e[r],t))return!0}return!1}function y(e,t){if(e!==void 0){let n=e.length,r=0;for(;r<n&&t(e[r]);)r++;if(r<n){let i=e.slice(0,r);for(r++;r<n;){let n=e[r];t(n)&&i.push(n),r++}return i}}return e}function b(e,t){let n;if(e!==void 0){n=[];for(let r=0;r<e.length;r++)n.push(t(e[r],r))}return n}function x(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];r&&(Oe(r)?S(t,r):t.push(r))}return t}function ie(e,t){let n;if(e!==void 0)for(let r=0;r<e.length;r++){let i=t(e[r],r);i&&(n=Oe(i)?S(n,i):ue(n,i))}return n??p}function ae(e,t){let n;if(e!==void 0)for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r);(n||i!==a||Oe(a))&&(n||(n=e.slice(0,r)),Oe(a)?S(n,a):n.push(a))}return n??e}function oe(e,t){let n=[];if(e!==void 0)for(let r=0;r<e.length;r++){let i=t(e[r],r);i!==void 0&&n.push(i)}return n}function se(e,t){if(e!==void 0)if(t!==void 0){for(let n=0;n<e.length;n++)if(t(e[n]))return!0}else return e.length>0;return!1}function ce(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function le(e,t,n=Ie){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r],r))return!1;return!0}function ue(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function de(e,t){return t<0?e.length+t:t}function S(e,t,n,r){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(n,r);n=n===void 0?0:de(t,n),r=r===void 0?t.length:de(t,r);for(let i=n;i<r&&i<t.length;i++)t[i]!==void 0&&e.push(t[i]);return e}function fe(e,t,n){return!v(e,t,n)&&(e.push(t),!0)}function pe(e,t,n){return e===void 0?[t]:(fe(e,t,n),e)}function me(e,t){return e.length===0?p:e.slice().sort(t)}Array.prototype.at;function he(e){return e===void 0||e.length===0?void 0:e[0]}function ge(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function _e(e){return T.assert(e.length!==0),e[e.length-1]}function ve(e){return e!==void 0&&e.length===1?e[0]:void 0}function ye(e,t,n,r,i){return be(e,n(t),n,r,i)}function be(e,t,n,r,i){if(!se(e))return-1;let a=i??0,o=e.length-1;for(;a<=o;){let i=a+(o-a>>1),s=n(e[i],i);switch(Math.sign(r(s,t))){case-1:a=i+1;break;case 0:return i;case 1:o=i-1}}return~a}function xe(e,t,n,r,i){if(e&&e.length>0){let a=e.length;if(a>0){let o=r===void 0||r<0?0:r,s=i===void 0||o+i>a-1?a-1:o+i,c;for(arguments.length<=2?(c=e[o],o++):c=n;o<=s;)c=t(c,e[o],o),o++;return c}}return n}var Se=Object.prototype.hasOwnProperty;function Ce(e,t){return Se.call(e,t)}function we(e){let t=[];for(let n in e)Se.call(e,n)&&t.push(n);return t}function Te(){let e=new Map;return e.add=Ee,e.remove=De,e}function Ee(e,t){let n=this.get(e);return n===void 0?this.set(e,n=[t]):n.push(t),n}function De(e,t){let n=this.get(e);n!==void 0&&(Ge(n,t),n.length||this.delete(e))}function Oe(e){return Array.isArray(e)}function ke(e){return Oe(e)?e:[e]}function C(e,t){return e!==void 0&&t(e)?e:void 0}function Ae(e,t){return e!==void 0&&t(e)?e:T.fail(`Invalid cast. The supplied value ${e} did not pass the test '${T.getFunctionName(t)}'.`)}function je(e){}function Me(){return!0}function Ne(e){return e}function Pe(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Fe(e){let t=new Map;return n=>{let r=`${typeof n}:${n}`,i=t.get(r);return i===void 0&&!t.has(r)&&(i=e(n),t.set(r,i)),i}}function Ie(e,t){return e===t}function Le(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function Re(e,t){return Ie(e,t)}function ze(e,t){return e===t?0:e===void 0?-1:t===void 0?1:e<t?-1:1}function w(e,t){return ze(e,t)}function Be(e,t,n){for(let r=0;r<e.length;r++)t=Math.max(t,n(e[r]));return t}function Ve(e,t,n){let r=Math.max(2,Math.floor(e.length*.34)),i=Math.floor(e.length*.4)+1,a;for(let o of t){let t=n(o);if(t!==void 0&&Math.abs(t.length-e.length)<=r){if(t===e||t.length<3&&t.toLowerCase()!==e.toLowerCase())continue;let n=He(e,t,i-.1);if(n===void 0)continue;T.assert(n<i),i=n,a=o}}return a}function He(e,t,n){let r=Array(t.length+1),i=Array(t.length+1),a=n+.01;for(let e=0;e<=t.length;e++)r[e]=e;for(let o=1;o<=e.length;o++){let s=e.charCodeAt(o-1),c=Math.ceil(o>n?o-n:1),l=Math.floor(t.length>n+o?n+o:t.length);i[0]=o;let u=o;for(let e=1;e<c;e++)i[e]=a;for(let n=c;n<=l;n++){let a=e[o-1].toLowerCase()===t[n-1].toLowerCase()?r[n-1]+.1:r[n-1]+2,c=s===t.charCodeAt(n-1)?r[n-1]:Math.min(r[n]+1,i[n-1]+1,a);i[n]=c,u=Math.min(u,c)}for(let e=l+1;e<=t.length;e++)i[e]=a;if(u>n)return;let d=r;r=i,i=d}let o=r[t.length];return o>n?void 0:o}function Ue(e,t,n){let r=e.length-t.length;return r>=0&&(n?Le(e.slice(r),t):e.indexOf(t,r)===r)}function We(e,t){e[t]=e[e.length-1],e.pop()}function Ge(e,t){return Ke(e,e=>e===t)}function Ke(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return We(e,n),!0;return!1}function qe(e,t,n){return n?Le(e.slice(0,t.length),t):e.lastIndexOf(t,0)===0}function Je(e){return e===void 0?void 0:[e]}var T;(e=>{let t=0;e.currentLogLevel=2,e.isDebugging=!1;function n(t){return e.currentLogLevel<=t}e.shouldLog=n;function r(t,r){e.loggingHost&&n(t)&&e.loggingHost.log(t,r)}function i(e){r(3,e)}e.log=i,(e=>{function t(e){r(1,e)}e.error=t;function n(e){r(2,e)}e.warn=n;function i(e){r(3,e)}e.log=i;function a(e){r(4,e)}e.trace=a})(i=e.log||(e.log={}));let a={};function o(){return t}e.getAssertionLevel=o;function s(n){let r=t;if(t=n,n>r)for(let t of we(a)){let r=a[t];r!==void 0&&e[t]!==r.assertion&&n>=r.level&&(e[t]=r,a[t]=void 0)}}e.setAssertionLevel=s;function c(e){return t>=e}e.shouldAssert=c;function l(t,n){return c(t)?!0:(a[n]={level:t,assertion:e[n]},e[n]=je,!1)}function u(e,t){let n=Error(e?`Debug Failure. ${e}`:`Debug Failure.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,t||u),n}e.fail=u;function d(e,t,n){return u(`${t||`Unexpected node.`}\r
2
2
  Node ${he(e.kind)} was unexpected.`,n||d)}e.failBadSyntaxKind=d;function f(e,t,n,r){e||(t=t?`False expression: ${t}`:`False expression.`,n&&(t+=`\r
3
3
  Verbose Debug Information: `+(typeof n==`string`?n:n())),u(t,r||f))}e.assert=f;function p(e,t,n,r,i){e!==t&&u(`Expected ${e} === ${t}. ${n?r?`${n} ${r}`:n:``}`,i||p)}e.assertEqual=p;function m(e,t,n,r){e>=t&&u(`Expected ${e} < ${t}. ${n||``}`,r||m)}e.assertLessThan=m;function h(e,t,n){e>t&&u(`Expected ${e} <= ${t}`,n||h)}e.assertLessThanOrEqual=h;function ee(e,t,n){e<t&&u(`Expected ${e} >= ${t}`,n||ee)}e.assertGreaterThanOrEqual=ee;function te(e,t,n){e??u(t,n||te)}e.assertIsDefined=te;function g(e,t,n){return te(e,t,n||g),e}e.checkDefined=g;function _(e,t,n){for(let r of e)te(r,t,n||_)}e.assertEachIsDefined=_;function v(e,t,n){return _(e,t,n||v),e}e.checkEachDefined=v;function y(e,t=`Illegal value:`,n){return u(`${t} ${typeof e==`object`&&Ce(e,`kind`)&&Ce(e,`pos`)?`SyntaxKind: `+he(e.kind):JSON.stringify(e)}`,n||y)}e.assertNever=y;function x(e,t,n,r){l(1,`assertEachNode`)&&f(t===void 0||re(e,t),n||`Unexpected node.`,()=>`Node array did not pass test '${ue(t)}'.`,r||x)}e.assertEachNode=x;function ie(e,t,n,r){l(1,`assertNode`)&&f(e!==void 0&&(t===void 0||t(e)),n||`Unexpected node.`,()=>`Node ${he(e?.kind)} did not pass test '${ue(t)}'.`,r||ie)}e.assertNode=ie;function ae(e,t,n,r){l(1,`assertNotNode`)&&f(e===void 0||t===void 0||!t(e),n||`Unexpected node.`,()=>`Node ${he(e.kind)} should not have passed test '${ue(t)}'.`,r||ae)}e.assertNotNode=ae;function oe(e,t,n,r){l(1,`assertOptionalNode`)&&f(t===void 0||e===void 0||t(e),n||`Unexpected node.`,()=>`Node ${he(e?.kind)} did not pass test '${ue(t)}'.`,r||oe)}e.assertOptionalNode=oe;function se(e,t,n,r){l(1,`assertOptionalToken`)&&f(t===void 0||e===void 0||e.kind===t,n||`Unexpected node.`,()=>`Node ${he(e?.kind)} was not a '${he(t)}' token.`,r||se)}e.assertOptionalToken=se;function ce(e,t,n){l(1,`assertMissingNode`)&&f(e===void 0,t||`Unexpected node.`,()=>`Node ${he(e.kind)} was unexpected'.`,n||ce)}e.assertMissingNode=ce;function le(e){}e.type=le;function ue(e){if(typeof e!=`function`)return``;if(Ce(e,`name`))return e.name;{let t=Function.prototype.toString.call(e),n=/^function\s+([\w$]+)\s*\(/.exec(t);return n?n[1]:``}}e.getFunctionName=ue;function de(e){return`{ name: ${Zn(e.escapedName)}; flags: ${Te(e.flags)}; declarations: ${b(e.declarations,e=>he(e.kind))} }`}e.formatSymbol=de;function S(e=0,t,n){let r=pe(t);if(e===0)return r.length>0&&r[0][0]===0?r[0][1]:`0`;if(n){let t=[],n=e;for(let[i,a]of r){if(i>e)break;i!==0&&i&e&&(t.push(a),n&=~i)}if(n===0)return t.join(`|`)}else for(let[t,n]of r)if(t===e)return n;return e.toString()}e.formatEnum=S;let fe=new Map;function pe(e){let t=fe.get(e);if(t)return t;let n=[];for(let t in e){let r=e[t];typeof r==`number`&&n.push([r,t])}let r=me(n,(e,t)=>w(e[0],t[0]));return fe.set(e,r),r}function he(e){return S(e,E,!1)}e.formatSyntaxKind=he;function ge(e){return S(e,lt,!1)}e.formatSnippetKind=ge;function _e(e){return S(e,it,!1)}e.formatScriptKind=_e;function ve(e){return S(e,D,!0)}e.formatNodeFlags=ve;function ye(e){return S(e,et,!0)}e.formatNodeCheckFlags=ye;function be(e){return S(e,Xe,!0)}e.formatModifierFlags=be;function xe(e){return S(e,ct,!0)}e.formatTransformFlags=xe;function Se(e){return S(e,ut,!0)}e.formatEmitFlags=Se;function Te(e){return S(e,$e,!0)}e.formatSymbolFlags=Te;function Ee(e){return S(e,tt,!0)}e.formatTypeFlags=Ee;function De(e){return S(e,rt,!0)}e.formatSignatureFlags=De;function Oe(e){return S(e,nt,!0)}e.formatObjectFlags=Oe;function ke(e){return S(e,Qe,!0)}e.formatFlowFlags=ke;function C(e){return S(e,Ze,!0)}e.formatRelationComparisonResult=C;function Ae(e){return S(e,CheckMode,!0)}e.formatCheckMode=Ae;function Me(e){return S(e,SignatureCheckMode,!0)}e.formatSignatureCheckMode=Me;function Ne(e){return S(e,TypeFacts,!0)}e.formatTypeFacts=Ne;let Pe=!1,Fe;function Ie(e){`__debugFlowFlags`in e||Object.defineProperties(e,{__tsDebuggerDisplay:{value(){let e=this.flags&2?`FlowStart`:this.flags&4?`FlowBranchLabel`:this.flags&8?`FlowLoopLabel`:this.flags&16?`FlowAssignment`:this.flags&32?`FlowTrueCondition`:this.flags&64?`FlowFalseCondition`:this.flags&128?`FlowSwitchClause`:this.flags&256?`FlowArrayMutation`:this.flags&512?`FlowCall`:this.flags&1024?`FlowReduceLabel`:this.flags&1?`FlowUnreachable`:`UnknownFlow`,t=this.flags&-2048;return`${e}${t?` (${ke(t)})`:``}`}},__debugFlowFlags:{get(){return S(this.flags,Qe,!0)}},__debugToString:{value(){return qe(this)}}})}function Le(e){return Pe&&(typeof Object.setPrototypeOf==`function`?(Fe||(Fe=Object.create(Object.prototype),Ie(Fe)),Object.setPrototypeOf(e,Fe)):Ie(e)),e}e.attachFlowNodeDebugInfo=Le;let Re;function ze(e){`__tsDebuggerDisplay`in e||Object.defineProperties(e,{__tsDebuggerDisplay:{value(e){return e=String(e).replace(/(?:,[\s\w]+:[^,]+)+\]$/,`]`),`NodeArray ${e}`}}})}function Ve(e){Pe&&(typeof Object.setPrototypeOf==`function`?(Re||(Re=Object.create(Array.prototype),ze(Re)),Object.setPrototypeOf(e,Re)):ze(e))}e.attachNodeArrayDebugInfo=Ve;function He(){if(Pe)return;let e=new WeakMap,t=new WeakMap;Object.defineProperties(So.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){let e=this.flags&33554432?`TransientSymbol`:`Symbol`,t=this.flags&-33554433;return`${e} '${er(this)}'${t?` (${Te(t)})`:``}`}},__debugFlags:{get(){return Te(this.flags)}}}),Object.defineProperties(So.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){let e=this.flags&402431?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:``}`:this.flags&12?`NullableType`:this.flags&3072?`LiteralType ${JSON.stringify(this.value)}`:this.flags&4096?`LiteralType ${this.value.negative?`-`:``}${this.value.base10Value}n`:this.flags&16384?`UniqueESSymbolType`:this.flags&65536?`EnumType`:this.flags&134217728?`UnionType`:this.flags&268435456?`IntersectionType`:this.flags&2097152?`IndexType`:this.flags&33554432?`IndexedAccessType`:this.flags&67108864?`ConditionalType`:this.flags&16777216?`SubstitutionType`:this.flags&524288?`TypeParameter`:this.flags&1048576?this.objectFlags&3?`InterfaceType`:this.objectFlags&4?`TypeReference`:this.objectFlags&8?`TupleType`:this.objectFlags&16?`AnonymousType`:this.objectFlags&32?`MappedType`:this.objectFlags&1024?`ReverseMappedType`:this.objectFlags&256?`EvolvingArrayType`:`ObjectType`:`Type`,t=this.flags&1048576?this.objectFlags&-142607680:0;return`${e}${this.symbol?` '${er(this.symbol)}'`:``}${t?` (${Oe(t)})`:``}`}},__debugFlags:{get(){return Ee(this.flags)}},__debugObjectFlags:{get(){return this.flags&1048576?Oe(this.objectFlags):``}},__debugTypeToString:{value(){let t=e.get(this);return t===void 0&&(t=this.checker.typeToString(this),e.set(this,t)),t}}}),Object.defineProperties(So.getSignatureConstructor().prototype,{__debugFlags:{get(){return De(this.flags)}},__debugSignatureToString:{value(){return this.checker?.signatureToString(this)}}});let n=[So.getNodeConstructor(),So.getIdentifierConstructor(),So.getTokenConstructor(),So.getSourceFileConstructor()];for(let e of n)Ce(e.prototype,`__debugKind`)||Object.defineProperties(e.prototype,{__tsDebuggerDisplay:{value(){return`${Hr(this)?`GeneratedIdentifier`:V(this)?`Identifier '${Qn(this)}'`:Ms(this)?`PrivateIdentifier '${Qn(this)}'`:Ds(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+`...`)}`:Ts(this)?`NumericLiteral ${this.text}`:Es(this)?`BigIntLiteral ${this.text}n`:zs(this)?`TypeParameterDeclaration`:Bs(this)?`ParameterDeclaration`:Ks(this)?`ConstructorDeclaration`:qs(this)?`GetAccessorDeclaration`:Js(this)?`SetAccessorDeclaration`:Ys(this)?`CallSignatureDeclaration`:Xs(this)?`ConstructSignatureDeclaration`:Zs(this)?`IndexSignatureDeclaration`:Qs(this)?`TypePredicateNode`:$s(this)?`TypeReferenceNode`:ec(this)?`FunctionTypeNode`:tc(this)?`ConstructorTypeNode`:nc(this)?`TypeQueryNode`:rc(this)?`TypeLiteralNode`:ic(this)?`ArrayTypeNode`:ac(this)?`TupleTypeNode`:sc(this)?`OptionalTypeNode`:cc(this)?`RestTypeNode`:lc(this)?`UnionTypeNode`:uc(this)?`IntersectionTypeNode`:dc(this)?`ConditionalTypeNode`:fc(this)?`InferTypeNode`:pc(this)?`ParenthesizedTypeNode`:mc(this)?`ThisTypeNode`:hc(this)?`TypeOperatorNode`:gc(this)?`IndexedAccessTypeNode`:_c(this)?`MappedTypeNode`:vc(this)?`LiteralTypeNode`:oc(this)?`NamedTupleMember`:yc(this)?`ImportTypeNode`:he(this.kind)}${this.flags?` (${ve(this.flags)})`:``}`}},__debugKind:{get(){return he(this.kind)}},__debugNodeFlags:{get(){return ve(this.flags)}},__debugModifierFlags:{get(){return be(eo(this))}},__debugTransformFlags:{get(){return xe(this.transformFlags)}},__debugIsParseTreeNode:{get(){return Jn(this)}},__debugEmitFlags:{get(){return Se(Bi(this))}},__debugGetText:{value(e){if(Ra(this))return``;let n=t.get(this);if(n===void 0){let r=Yn(this),i=r&&Ni(r);n=i?Li(i,r,e):``,t.set(this,n)}return n}}});Pe=!0}e.enableDebugInfo=He;function Ue(e){let t=e&7,n=t===0?`in out`:t===3?`[bivariant]`:t===2?`in`:t===1?`out`:t===4?`[independent]`:``;return e&8?n+=` (unmeasurable)`:e&16&&(n+=` (unreliable)`),n}e.formatVariance=Ue;class We{__debugToString(){switch(this.kind){case 3:return this.debugInfo?.call(this)||`(function mapper)`;case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return ne(this.sources,this.targets||b(this.sources,()=>`any`),(e,t)=>`${e.__debugTypeToString()} -> ${typeof t==`string`?t:t.__debugTypeToString()}`).join(`, `);case 2:return ne(this.sources,this.targets,(e,t)=>`${e.__debugTypeToString()} -> ${t().__debugTypeToString()}`).join(`, `);case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(`
4
4
  `).join(`
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/RichMessageContent-C7NG7gs-.js","js/rolldown-runtime-hePW80VL.js","js/markdown-core-DHnR5Hw8.js","js/router-vendor-Ca9zqOqT.js","js/utils-BhpNrGnR.js","js/utils-vendor-1zob7nK9.js","js/appStore-CLIS0fvz.js","js/logger-DSXjF4ye.js","js/messageCodeStyles-CfzjQF-R.js","js/useTranslation-CdeLZqSW.js","js/ui-vendor-D_pYT79f.js","js/markdown-math-B7FlYsmr.js","assets/markdown-math-ClQbWekD.css"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{d as t,f as n}from"./markdown-core-DHnR5Hw8.js";import{i as r}from"./router-vendor-Ca9zqOqT.js";import{t as i}from"./utils-BhpNrGnR.js";import{a,c as o,o as s,r as c}from"./messageCodeStyles-CfzjQF-R.js";import"./Button-X9TT9gTD.js";var l=e(n(),1),u=t(),d=({label:e,error:t,helper:n,className:r,id:a,...o})=>{let s=(0,l.useId)(),c=a||`input-${s}`;return(0,u.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,u.jsx)(`label`,{htmlFor:c,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,u.jsx)(`input`,{id:c,className:i(`block w-full rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`placeholder:text-ink-subtle transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,r),...o}),t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-ink-muted`,children:n})]})},f=l.forwardRef(({label:e,error:t,helper:n,className:r,id:a,...o},s)=>{let c=(0,l.useId)(),d=a||`textarea-${c}`;return(0,u.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,u.jsx)(`label`,{htmlFor:d,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,u.jsx)(`textarea`,{ref:s,id:d,className:i(`block w-full resize-none rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`placeholder:text-ink-subtle transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,r),...o}),t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-ink-muted`,children:n})]})});f.displayName=`Textarea`;var p=({label:e,error:t,helper:n,options:r,className:a,id:o,...s})=>{let c=(0,l.useId)(),d=o||`select-${c}`;return(0,u.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,u.jsx)(`label`,{htmlFor:d,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,u.jsx)(`select`,{id:d,className:i(`block w-full rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,a),...s,children:r.map((e,t)=>(0,u.jsx)(`option`,{value:e.value,children:e.label},e.key??`${e.value}-${t}`))}),t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-ink-muted`,children:n})]})};function m({content:e}){return e?(0,u.jsx)(`div`,{dir:`auto`,className:`whitespace-pre-wrap break-words leading-relaxed`,children:e}):null}function h({content:e,language:t,complete:n}){let r=n?e.replace(/\r?\n$/,``):e,i=l.useRef(null),o=l.useRef(!0);return l.useLayoutEffect(()=>{let e=i.current;e&&o.current&&(e.scrollTop=e.scrollHeight)},[r]),(0,u.jsx)(a,{code:r,language:t,state:n?`complete`:`streaming`,children:(0,u.jsx)(`pre`,{ref:i,onScroll:()=>{let e=i.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight;o.current=t<24},className:c,children:(0,u.jsx)(`code`,{children:r})})})}var g=({content:e,className:t,segments:n,isStreaming:r=!0})=>{let a=l.useMemo(()=>n??s(e),[e,n]),o=a[a.length-1],c=o?.type===`code`&&!o.complete;return(0,u.jsxs)(`div`,{className:i(`text-sm leading-relaxed text-gray-700 dark:text-dark-700`,t),children:[a.map((e,t)=>e.type===`code`?(0,u.jsx)(h,{...e},`${e.type}-${t}`):(0,u.jsx)(m,{content:e.content},`${e.type}-${t}`)),r&&!c&&(0,u.jsx)(`span`,{"data-testid":`message-streaming-cursor`,"aria-hidden":`true`,className:`ms-1 inline-block h-5 w-1 animate-pulse rounded-full bg-primary-500 align-text-bottom`})]})},_=l.lazy(()=>r(()=>import(`./RichMessageContent-C7NG7gs-.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])));function v({content:e,className:t}){return(0,u.jsx)(`div`,{dir:`auto`,className:i(`text-sm leading-relaxed text-gray-700 dark:text-dark-700 whitespace-pre-wrap break-words`,t),children:e})}var y=({content:e,className:t,isStreaming:n=!1})=>{let r=l.useMemo(()=>n?s(e):[],[e,n]),i=r.some(e=>e.type===`code`);if(n&&i)return(0,u.jsx)(g,{content:e,className:t,segments:r});let a;return a=o(e)?(0,u.jsx)(l.Suspense,{fallback:(0,u.jsx)(g,{content:e,className:t,isStreaming:!1}),children:(0,u.jsx)(_,{content:e,className:t})}):(0,u.jsx)(v,{content:e,className:t}),(0,u.jsxs)(u.Fragment,{children:[a,n&&(0,u.jsx)(`span`,{"data-testid":`message-streaming-cursor`,"aria-hidden":`true`,className:`ms-1 inline-block h-5 w-1 animate-pulse rounded-full bg-primary-500 align-text-bottom`})]})},b=({children:e,htmlFor:t,className:n=``})=>(0,u.jsx)(`label`,{htmlFor:t,className:i(`text-sm font-medium tracking-[-0.005em] text-ink-muted`,n),children:e}),x=({children:e,className:t=``,...n})=>(0,u.jsx)(`div`,{...n,className:i(`rounded-2xl border border-line bg-surface-raised shadow-card`,t),children:e}),S=({children:e,className:t=``})=>(0,u.jsx)(`div`,{className:i(`flex flex-col space-y-1.5 p-6`,t),children:e}),C=({children:e,className:t=``})=>(0,u.jsx)(`h3`,{className:i(`text-lg font-semibold leading-tight tracking-[-0.02em] text-ink`,t),children:e}),w=({children:e,className:t=``})=>(0,u.jsx)(`p`,{className:i(`text-sm leading-relaxed text-ink-muted`,t),children:e}),T=({children:e,className:t=``})=>(0,u.jsx)(`div`,{className:i(`p-6 pt-0`,t),children:e}),E={narrow:`max-w-4xl`,default:`max-w-6xl`,wide:`max-w-7xl`},D=({children:e,width:t=`default`,className:n,contentClassName:r,...a})=>(0,u.jsx)(`div`,{"data-testid":`page-scroll-region`,className:i(`scroll-region h-full min-h-0 scrollbar-thin`,n),...a,children:(0,u.jsx)(`div`,{className:i(`mx-auto w-full px-4 pb-16 pt-7 sm:px-6 sm:pb-20 sm:pt-10 lg:px-8`,E[t],r),children:e})}),O=({title:e,description:t,eyebrow:n,actions:r,meta:a,className:o,...s})=>(0,u.jsxs)(`header`,{className:i(`mb-8 flex flex-col gap-6 border-b border-gray-200/70 pb-7 text-start dark:border-white/[0.08] sm:mb-10 sm:pb-9 md:flex-row md:items-end md:justify-between`,o),...s,children:[(0,u.jsxs)(`div`,{className:`min-w-0 max-w-3xl`,children:[n&&(0,u.jsx)(`div`,{className:`mb-3 text-[11px] font-medium uppercase tracking-[0.18em] text-gray-500 dark:text-dark-500 rtl:tracking-normal`,children:n}),(0,u.jsx)(`h1`,{className:`text-balance text-3xl font-normal leading-[1.02] tracking-[-0.04em] text-gray-950 dark:text-dark-950 sm:text-5xl rtl:leading-[1.15] rtl:tracking-normal`,children:e}),t&&(0,u.jsx)(`p`,{className:`mt-4 max-w-2xl text-sm leading-6 text-gray-600 dark:text-dark-600 sm:text-base sm:leading-7`,children:t}),a&&(0,u.jsx)(`div`,{className:`mt-4`,children:a})]}),r&&(0,u.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 md:justify-end`,children:r})]});export{w as a,b as c,p as d,f,T as i,y as l,D as n,S as o,d as p,x as r,C as s,O as t,g as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/RichMessageContent-BTcjK7f1.js","js/rolldown-runtime-hePW80VL.js","js/markdown-core-DHnR5Hw8.js","js/router-vendor-Ca9zqOqT.js","js/utils-BhpNrGnR.js","js/utils-vendor-1zob7nK9.js","js/appStore-ne0eCPTX.js","js/logger-DSXjF4ye.js","js/messageCodeStyles-D1gR4Bnk.js","js/useTranslation-CdeLZqSW.js","js/ui-vendor-D_pYT79f.js","js/markdown-math-B7FlYsmr.js","assets/markdown-math-ClQbWekD.css"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{d as t,f as n}from"./markdown-core-DHnR5Hw8.js";import{i as r}from"./router-vendor-Ca9zqOqT.js";import{t as i}from"./utils-BhpNrGnR.js";import{a,c as o,o as s,r as c}from"./messageCodeStyles-D1gR4Bnk.js";import"./Button-X9TT9gTD.js";var l=e(n(),1),u=t(),d=({label:e,error:t,helper:n,className:r,id:a,...o})=>{let s=(0,l.useId)(),c=a||`input-${s}`;return(0,u.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,u.jsx)(`label`,{htmlFor:c,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,u.jsx)(`input`,{id:c,className:i(`block w-full rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`placeholder:text-ink-subtle transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,r),...o}),t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-ink-muted`,children:n})]})},f=l.forwardRef(({label:e,error:t,helper:n,className:r,id:a,...o},s)=>{let c=(0,l.useId)(),d=a||`textarea-${c}`;return(0,u.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,u.jsx)(`label`,{htmlFor:d,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,u.jsx)(`textarea`,{ref:s,id:d,className:i(`block w-full resize-none rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`placeholder:text-ink-subtle transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,r),...o}),t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-ink-muted`,children:n})]})});f.displayName=`Textarea`;var p=({label:e,error:t,helper:n,options:r,className:a,id:o,...s})=>{let c=(0,l.useId)(),d=o||`select-${c}`;return(0,u.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,u.jsx)(`label`,{htmlFor:d,className:`block text-sm font-medium tracking-[-0.005em] text-ink-muted`,children:e}),(0,u.jsx)(`select`,{id:d,className:i(`block w-full rounded-xl border border-line bg-surface-raised px-3.5 py-2.5 text-base text-ink shadow-none`,`transition-[background-color,border-color,box-shadow,color] duration-150 ease-out`,`focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus-visible:outline-none dark:focus:border-primary-400 dark:focus:ring-primary-400/20`,`disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-ink-subtle disabled:opacity-70`,t&&`border-error-500 focus:border-error-500 focus:ring-error-500/20`,a),...s,children:r.map((e,t)=>(0,u.jsx)(`option`,{value:e.value,children:e.label},e.key??`${e.value}-${t}`))}),t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-error-600 dark:text-error-400`,children:t}),n&&!t&&(0,u.jsx)(`p`,{className:`text-xs leading-relaxed text-ink-muted`,children:n})]})};function m({content:e}){return e?(0,u.jsx)(`div`,{dir:`auto`,className:`whitespace-pre-wrap break-words leading-relaxed`,children:e}):null}function h({content:e,language:t,complete:n}){let r=n?e.replace(/\r?\n$/,``):e,i=l.useRef(null),o=l.useRef(!0);return l.useLayoutEffect(()=>{let e=i.current;e&&o.current&&(e.scrollTop=e.scrollHeight)},[r]),(0,u.jsx)(a,{code:r,language:t,state:n?`complete`:`streaming`,children:(0,u.jsx)(`pre`,{ref:i,onScroll:()=>{let e=i.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight;o.current=t<24},className:c,children:(0,u.jsx)(`code`,{children:r})})})}var g=({content:e,className:t,segments:n,isStreaming:r=!0})=>{let a=l.useMemo(()=>n??s(e),[e,n]),o=a[a.length-1],c=o?.type===`code`&&!o.complete;return(0,u.jsxs)(`div`,{className:i(`text-sm leading-relaxed text-gray-700 dark:text-dark-700`,t),children:[a.map((e,t)=>e.type===`code`?(0,u.jsx)(h,{...e},`${e.type}-${t}`):(0,u.jsx)(m,{content:e.content},`${e.type}-${t}`)),r&&!c&&(0,u.jsx)(`span`,{"data-testid":`message-streaming-cursor`,"aria-hidden":`true`,className:`ms-1 inline-block h-5 w-1 animate-pulse rounded-full bg-primary-500 align-text-bottom`})]})},_=l.lazy(()=>r(()=>import(`./RichMessageContent-BTcjK7f1.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])));function v({content:e,className:t}){return(0,u.jsx)(`div`,{dir:`auto`,className:i(`text-sm leading-relaxed text-gray-700 dark:text-dark-700 whitespace-pre-wrap break-words`,t),children:e})}var y=({content:e,className:t,isStreaming:n=!1})=>{let r=l.useMemo(()=>n?s(e):[],[e,n]),i=r.some(e=>e.type===`code`);if(n&&i)return(0,u.jsx)(g,{content:e,className:t,segments:r});let a;return a=o(e)?(0,u.jsx)(l.Suspense,{fallback:(0,u.jsx)(g,{content:e,className:t,isStreaming:!1}),children:(0,u.jsx)(_,{content:e,className:t})}):(0,u.jsx)(v,{content:e,className:t}),(0,u.jsxs)(u.Fragment,{children:[a,n&&(0,u.jsx)(`span`,{"data-testid":`message-streaming-cursor`,"aria-hidden":`true`,className:`ms-1 inline-block h-5 w-1 animate-pulse rounded-full bg-primary-500 align-text-bottom`})]})},b=({children:e,htmlFor:t,className:n=``})=>(0,u.jsx)(`label`,{htmlFor:t,className:i(`text-sm font-medium tracking-[-0.005em] text-ink-muted`,n),children:e}),x=({children:e,className:t=``,...n})=>(0,u.jsx)(`div`,{...n,className:i(`rounded-2xl border border-line bg-surface-raised shadow-card`,t),children:e}),S=({children:e,className:t=``})=>(0,u.jsx)(`div`,{className:i(`flex flex-col space-y-1.5 p-6`,t),children:e}),C=({children:e,className:t=``})=>(0,u.jsx)(`h3`,{className:i(`text-lg font-semibold leading-tight tracking-[-0.02em] text-ink`,t),children:e}),w=({children:e,className:t=``})=>(0,u.jsx)(`p`,{className:i(`text-sm leading-relaxed text-ink-muted`,t),children:e}),T=({children:e,className:t=``})=>(0,u.jsx)(`div`,{className:i(`p-6 pt-0`,t),children:e}),E={narrow:`max-w-4xl`,default:`max-w-6xl`,wide:`max-w-7xl`},D=({children:e,width:t=`default`,className:n,contentClassName:r,...a})=>(0,u.jsx)(`div`,{"data-testid":`page-scroll-region`,className:i(`scroll-region h-full min-h-0 scrollbar-thin`,n),...a,children:(0,u.jsx)(`div`,{className:i(`mx-auto w-full px-4 pb-16 pt-7 sm:px-6 sm:pb-20 sm:pt-10 lg:px-8`,E[t],r),children:e})}),O=({title:e,description:t,eyebrow:n,actions:r,meta:a,className:o,...s})=>(0,u.jsxs)(`header`,{className:i(`mb-8 flex flex-col gap-6 border-b border-gray-200/70 pb-7 text-start dark:border-white/[0.08] sm:mb-10 sm:pb-9 md:flex-row md:items-end md:justify-between`,o),...s,children:[(0,u.jsxs)(`div`,{className:`min-w-0 max-w-3xl`,children:[n&&(0,u.jsx)(`div`,{className:`mb-3 text-[11px] font-medium uppercase tracking-[0.18em] text-gray-500 dark:text-dark-500 rtl:tracking-normal`,children:n}),(0,u.jsx)(`h1`,{className:`text-balance text-3xl font-normal leading-[1.02] tracking-[-0.04em] text-gray-950 dark:text-dark-950 sm:text-5xl rtl:leading-[1.15] rtl:tracking-normal`,children:e}),t&&(0,u.jsx)(`p`,{className:`mt-4 max-w-2xl text-sm leading-6 text-gray-600 dark:text-dark-600 sm:text-base sm:leading-7`,children:t}),a&&(0,u.jsx)(`div`,{className:`mt-4`,children:a})]}),r&&(0,u.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 md:justify-end`,children:r})]});export{w as a,b as c,p as d,f,T as i,y as l,D as n,S as o,d as p,x as r,C as s,O as t,g as u};
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64"><path d="M 11.5 18.0 L 11.5 32 A 20.5 20.5 0 0 0 50.58 40.66" fill="none" stroke="#ffffff" stroke-width="11" stroke-linecap="round"/><path d="M 50.58 18.0 L 50.58 25.66" fill="none" stroke="#ffffff" stroke-width="11" stroke-linecap="round"/></svg>
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64"><path d="M 11.5 18.0 L 11.5 32 A 20.5 20.5 0 0 0 50.58 40.66" fill="none" stroke="#000000" stroke-width="11" stroke-linecap="round"/><path d="M 50.58 18.0 L 50.58 25.66" fill="none" stroke="#000000" stroke-width="11" stroke-linecap="round"/></svg>
@@ -1,6 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 500 500">
2
- <rect width="500" height="500" rx="96" fill="#0a0a0a"/>
3
- <text x="250" y="250" text-anchor="middle" dominant-baseline="central" fill="#ffffff" font-family="'Inter', -apple-system, BlinkMacSystemFont, sans-serif" font-size="72" letter-spacing="-0.72">
4
- <tspan font-weight="700">Libre</tspan><tspan font-weight="400" dx="18">WebUI</tspan>
5
- </text>
6
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64"><path d="M 11.5 18.0 L 11.5 32 A 20.5 20.5 0 0 0 50.58 40.66" fill="none" stroke="currentColor" stroke-width="11" stroke-linecap="round"/><path d="M 50.58 18.0 L 50.58 25.66" fill="none" stroke="currentColor" stroke-width="11" stroke-linecap="round"/></svg>
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libre-webui",
3
- "version": "0.19.2",
3
+ "version": "0.19.3",
4
4
  "description": "A local-first workspace for chat, private knowledge, artifacts, and isolated model-driven work.",
5
5
  "main": "electron/main.js",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "build": "npm run build:frontend && npm run build:backend",
29
29
  "build:frontend": "cd frontend && npm run build",
30
30
  "build:backend": "cd backend && npm run build",
31
- "test:package": "node --test scripts/test-deprecated-dependencies.mjs && node --test scripts/test-typescript-toolchain.mjs && node --test scripts/test-helm-versioning.mjs && node --test scripts/test-tts-example-security.mjs && npm run test:unit --workspace=frontend && npm run build && node --test scripts/test-webpage-fetch-security.mjs && node --test scripts/test-content-resource-limits.mjs && node --test scripts/test-registration-policy.mjs && node --test scripts/test-user-approval.mjs && node --test scripts/test-turnstile-auth.mjs && node --test scripts/test-oauth-security.mjs && node --test scripts/test-password-security.mjs && node --test scripts/test-live-deployment-security.mjs && node --test scripts/test-ollama-library.mjs && node --test scripts/test-chat-context.mjs && node --test scripts/test-chat-rest-responses.mjs && node --test scripts/test-plugin-endpoint-routing.mjs && node --test scripts/test-plugin-capability-routing.mjs && node --test scripts/test-plugin-usage-analytics.mjs && node --test scripts/test-system-diagnostics.mjs && node --test scripts/test-openrouter-attribution.mjs && node --test scripts/test-openrouter-media-routing.mjs && node --test scripts/test-chat-provider-selection.mjs && node --test scripts/test-agent-cli-chat.mjs && node --test scripts/test-codex-oauth.mjs && node --test scripts/test-provider-api-modes.mjs && node --test scripts/test-plugin-variable-overrides.mjs && node --test scripts/test-plugin-model-refresh.mjs && node --test scripts/test-tts-routing.mjs && node --test scripts/test-image-generation-routing.mjs && node --test scripts/test-work-host-workspace.mjs && node --test scripts/test-work-runtime.mjs && node --test scripts/test-work-preview-proxy.mjs && node --test scripts/test-work-terminal.mjs && node --test scripts/test-work-provider.mjs && node --test scripts/test-work-agent-guidance.mjs && node --test scripts/test-work-agent-loop.mjs && node --test scripts/test-work-events.mjs && node --test scripts/test-package-layout.mjs && node --test scripts/test-release-notes.mjs && node --test scripts/test-release-status.mjs && node --test scripts/test-docker-layout.mjs && node --test scripts/test-electron-macos-signing.mjs && node --test scripts/test-pr-quality-gates.mjs && node --test scripts/test-homebrew-publishing.mjs && node --test scripts/test-forgejo-release-mirror.mjs",
31
+ "test:package": "node --test scripts/test-deprecated-dependencies.mjs && node --test scripts/test-typescript-toolchain.mjs && node --test scripts/test-helm-versioning.mjs && node --test scripts/test-tts-example-security.mjs && npm run test:unit --workspace=frontend && npm run build && node --test scripts/test-webpage-fetch-security.mjs && node --test scripts/test-content-resource-limits.mjs && node --test scripts/test-registration-policy.mjs && node --test scripts/test-user-approval.mjs && node --test scripts/test-turnstile-auth.mjs && node --test scripts/test-oauth-security.mjs && node --test scripts/test-password-security.mjs && node --test scripts/test-live-deployment-security.mjs && node --test scripts/test-ollama-library.mjs && node --test scripts/test-chat-context.mjs && node --test scripts/test-chat-rest-responses.mjs && node --test scripts/test-plugin-endpoint-routing.mjs && node --test scripts/test-plugin-capability-routing.mjs && node --test scripts/test-plugin-usage-analytics.mjs && node --test scripts/test-system-diagnostics.mjs && node --test scripts/test-openrouter-attribution.mjs && node --test scripts/test-openrouter-media-routing.mjs && node --test scripts/test-chat-provider-selection.mjs && node --test scripts/test-agent-cli-chat.mjs && node --test scripts/test-codex-oauth.mjs && node --test scripts/test-provider-api-modes.mjs && node --test scripts/test-plugin-variable-overrides.mjs && node --test scripts/test-plugin-model-refresh.mjs && node --test scripts/test-tts-routing.mjs && node --test scripts/test-image-generation-routing.mjs && node --test scripts/test-work-host-workspace.mjs && node --test scripts/test-work-runtime.mjs && node --test scripts/test-work-preview-proxy.mjs && node --test scripts/test-artifact-sandbox.mjs && node --test scripts/test-work-terminal.mjs && node --test scripts/test-work-provider.mjs && node --test scripts/test-work-agent-guidance.mjs && node --test scripts/test-work-agent-loop.mjs && node --test scripts/test-work-events.mjs && node --test scripts/test-package-layout.mjs && node --test scripts/test-release-notes.mjs && node --test scripts/test-release-status.mjs && node --test scripts/test-docker-layout.mjs && node --test scripts/test-electron-macos-signing.mjs && node --test scripts/test-pr-quality-gates.mjs && node --test scripts/test-homebrew-publishing.mjs && node --test scripts/test-forgejo-release-mirror.mjs",
32
32
  "test:e2e": "npm run e2e --workspace=frontend",
33
33
  "test:work": "npm run build:backend && node --test scripts/test-work-host-workspace.mjs && node --test scripts/test-work-runtime.mjs && node --test scripts/test-work-preview-proxy.mjs && node --test scripts/test-work-terminal.mjs && node --test scripts/test-work-provider.mjs && node --test scripts/test-work-agent-guidance.mjs && node --test scripts/test-work-agent-loop.mjs && node --test scripts/test-work-events.mjs",
34
34
  "security:audit": "npm audit --audit-level=moderate",