libre-webui 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -8
- package/backend/dist/routes/plugins.d.ts.map +1 -1
- package/backend/dist/routes/plugins.js +10 -3
- package/backend/dist/routes/plugins.js.map +1 -1
- package/backend/dist/routes/work.d.ts.map +1 -1
- package/backend/dist/routes/work.js +2 -1
- package/backend/dist/routes/work.js.map +1 -1
- package/backend/dist/services/pluginService.d.ts +42 -1
- package/backend/dist/services/pluginService.d.ts.map +1 -1
- package/backend/dist/services/pluginService.js +143 -12
- package/backend/dist/services/pluginService.js.map +1 -1
- package/backend/dist/services/workRuntimeService.d.ts +18 -1
- package/backend/dist/services/workRuntimeService.d.ts.map +1 -1
- package/backend/dist/services/workRuntimeService.js +62 -11
- package/backend/dist/services/workRuntimeService.js.map +1 -1
- package/backend/package.json +1 -1
- package/frontend/dist/assets/{index-CKV9Lnj8.js → index-BVgyQN3z.js} +4 -4
- package/frontend/dist/index.html +2 -2
- package/frontend/dist/js/{ArtifactContainer-B0uVR8Z9.js → ArtifactContainer-CbMAYwvr.js} +1 -1
- package/frontend/dist/js/{ArtifactDemoPage-DBVPHFxk.js → ArtifactDemoPage-CWDhGWrz.js} +1 -1
- package/frontend/dist/js/ArtifactSlideOutPanel-CzUpDM59.js +1 -0
- package/frontend/dist/js/{ChatPage-CPHlIZqU.js → ChatPage-D0fdzy7a.js} +4 -4
- package/frontend/dist/js/{FirstTimeSetup-DksL5arK.js → FirstTimeSetup-CfnOmy9w.js} +1 -1
- package/frontend/dist/js/{GalleryPage-1mdUGo_N.js → GalleryPage-CMkCur9v.js} +1 -1
- package/frontend/dist/js/{LibreClawPage-qGr1Jy8p.js → LibreClawPage-CHEfny1k.js} +1 -1
- package/frontend/dist/js/{ModelSelector-CUnwRmNU.js → ModelSelector-COnlNsVM.js} +1 -1
- package/frontend/dist/js/{ModelsPage-DMYVg3LT.js → ModelsPage-nxheiYJp.js} +1 -1
- package/frontend/dist/js/{PersonasPage-Ct-KKW-j.js → PersonasPage-C2pqDsWA.js} +1 -1
- package/frontend/dist/js/{RichMessageContent-CGBAcUES.js → RichMessageContent-Cz9y-bgl.js} +1 -1
- package/frontend/dist/js/SettingsModal-B6Se68Hd.js +1 -0
- package/frontend/dist/js/{UserManagementPage-D3tLGtTu.js → UserManagementPage-DQeL-Twp.js} +1 -1
- package/frontend/dist/js/WorkPage-AcZMp8OB.js +2 -0
- package/frontend/dist/js/{api-YWoSobKv.js → api-Fi-lJlfu.js} +3 -3
- package/frontend/dist/js/{estree-PDLT672k.js → estree-BRklD62a.js} +1 -1
- package/frontend/dist/js/{html-CkhF9wDQ.js → html-BgGIAGmn.js} +1 -1
- package/frontend/dist/js/{markdown-B1iNUbse.js → markdown-CM2nBJJi.js} +1 -1
- package/frontend/dist/js/{standalone-CCd6rkf-.js → standalone-CUBo-NGt.js} +1 -1
- package/frontend/dist/js/{typescript-DKJ1uM5L.js → typescript-Dcy9qxSB.js} +1 -1
- package/frontend/dist/js/{useBaseQuery-MuQj7vA5.js → useBaseQuery-CFTidwqz.js} +1 -1
- package/frontend/dist/js/useQuery-UsSBfWzs.js +1 -0
- package/package.json +2 -2
- package/frontend/dist/js/ArtifactSlideOutPanel-Cg5kAwv9.js +0 -1
- package/frontend/dist/js/SettingsModal-BVj3gFCS.js +0 -1
- package/frontend/dist/js/WorkPage-DhTjy-kf.js +0 -2
- package/frontend/dist/js/useQuery-CYGPkxWR.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,p as n}from"./router-vendor-BjDI9mRe.js";import{a as r}from"./utils-vendor-Cbaj0BC5.js";import{n as i}from"./demoMode-BhEpMVh5.js";import{n as a,t as o}from"./logger-DbNs3-DK.js";var s=o(`config`),c=window.location.protocol===`file:`?`http://localhost:3001/api`:`${window.location.origin}/api`,l=a(),u=()=>{l&&(s.debug(`API_BASE_URL configured as:`,c),s.debug(`Window location:`,window.location),s.debug(`Environment variables:`,{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.16.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BVgyQN3z.js","js/rolldown-runtime-QTnfLwEv.js","js/markdown-core-GI9BPwrB.js","js/react-vendor-DyG_ODzn.js","js/router-vendor-BjDI9mRe.js","js/useTranslation-Cs6iTP4m.js","js/ui-vendor-CAFEDSaO.js","js/utils-vendor-Cbaj0BC5.js","js/demoMode-BhEpMVh5.js","js/logger-DbNs3-DK.js","js/utils-pTFqSV8c.js","js/Button-DBk-AREB.js","assets/index-Dme2Ozol.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,p as n}from"./router-vendor-BjDI9mRe.js";import{a as r}from"./utils-vendor-Cbaj0BC5.js";import{n as i}from"./demoMode-BhEpMVh5.js";import{n as a,t as o}from"./logger-DbNs3-DK.js";var s=o(`config`),c=window.location.protocol===`file:`?`http://localhost:3001/api`:`${window.location.origin}/api`,l=a(),u=()=>{l&&(s.debug(`API_BASE_URL configured as:`,c),s.debug(`Window location:`,window.location),s.debug(`Environment variables:`,{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.16.1`}))},d=o(`api`);u(),d.debug(`User agent:`,navigator.userAgent),d.debug(`Demo mode detected:`,i());var f=(e,t=!0)=>new Promise(n=>{setTimeout(()=>{n({success:t,data:e,error:t?void 0:`Demo mode: Backend not available`})},500)}),p=r.create({baseURL:c,timeout:3e5});p.interceptors.request.use(e=>{let t=localStorage.getItem(`auth-token`);return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),p.interceptors.response.use(e=>e,e=>{if(e.response?.status===401){d.warn(`Session expired or unauthorized, logging out...`),localStorage.removeItem(`auth-token`),t(async()=>{let{useAuthStore:e}=await import(`../assets/index-BVgyQN3z.js`).then(e=>e.D);return{useAuthStore:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(({useAuthStore:e})=>{e.getState().logout()});let e=window.location.protocol===`file:`;return(e?window.location.hash:window.location.pathname).includes(`/login`)||(window.location.href=e?`#/login`:`/login`),Promise.reject(Error(`Session expired`))}return d.error(`API Error:`,e),Promise.reject(e)});var m=`0.16.1`,h={login:e=>i()?f({user:{id:`demo-user`,username:`demo`,email:`demo@example.com`,role:`admin`,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},token:`demo-token`,systemInfo:{requiresAuth:!0,hasUsers:!0,userCount:1,allowUserModelPull:!0,version:m}}):p.post(`/auth/login`,e).then(e=>e.data),signup:e=>i()?f({user:{id:`demo-user-new`,username:e.username,email:e.email||``,role:`user`,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},token:`demo-token-new`,systemInfo:{requiresAuth:!0,hasUsers:!0,userCount:1,allowUserModelPull:!0,version:m,turnstile:{enabled:!1}}}):p.post(`/auth/signup`,e).then(e=>e.data),logout:()=>i()?f(void 0):p.post(`/auth/logout`).then(e=>e.data),getSystemInfo:()=>(d.debug(`getSystemInfo called, demo mode:`,i()),i()?f({requiresAuth:!0,hasUsers:!0,userCount:1,allowUserModelPull:!0,version:m,turnstile:{enabled:!1}}):(d.debug(`Making API call to:`,c+`/auth/system-info`),d.debug(`Full URL from:`,window.location.origin,`-> API:`,c+`/auth/system-info`),p.get(`/auth/system-info`).then(e=>(d.debug(`getSystemInfo response:`,e.data),e.data)).catch(e=>{throw d.debug(`getSystemInfo error:`,e),e.response&&(d.debug(`Error response data:`,e.response.data),d.debug(`Error status:`,e.response.status),d.debug(`Error headers:`,e.response.headers)),e.request&&d.debug(`Network error - no response received:`,e.request),d.debug(`Error config:`,e.config),e}))),verifyToken:()=>i()?f({id:`demo-user`,username:`demo`,email:`demo@example.com`,role:`admin`,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}):p.get(`/auth/verify`).then(e=>e.data),getEncryptionKey:()=>i()?f({encryptionKey:`demo-encryption-key-not-real`}):p.get(`/auth/encryption-key`).then(e=>e.data),updateModelPullSetting:e=>i()?f({requiresAuth:!0,hasUsers:!0,userCount:1,allowUserModelPull:e,version:m,turnstile:{enabled:!1}}):p.patch(`/auth/system-settings/model-pull`,{allowUserModelPull:e}).then(e=>e.data)},ee={getUsers:()=>i()?f([{id:`demo-user`,username:`demo`,email:`demo@example.com`,role:`admin`,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}]):p.get(`/users`).then(e=>e.data),createUser:e=>i()?f({id:`new-user-`+Date.now(),username:e.username,email:e.email,role:e.role,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}):p.post(`/users`,e).then(e=>e.data),updateUser:(e,t)=>i()?f({id:e,username:t.username||`demo`,email:t.email||`demo@example.com`,role:t.role||`user`,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}):p.patch(`/users/${e}`,t).then(e=>e.data),deleteUser:e=>i()?f(void 0):p.delete(`/users/${e}`).then(e=>e.data),updateMyAvatar:e=>i()?f({id:`demo-user`,username:`demo`,email:`demo@example.com`,role:`admin`,avatar:e,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}):p.patch(`/users/me/avatar`,{avatar:e}).then(e=>e.data)},g=[{name:`llama3.2:3b`,size:2048e6,digest:`demo-digest-1`,modified_at:new Date().toISOString(),details:{format:`gguf`,family:`llama`,families:[`llama`],parameter_size:`3B`,quantization_level:`Q4_0`}},{name:`qwen2.5:7b`,size:4096e6,digest:`demo-digest-2`,modified_at:new Date().toISOString(),details:{format:`gguf`,family:`qwen`,families:[`qwen`],parameter_size:`7B`,quantization_level:`Q4_0`}}],_=()=>[{id:`demo-session-1`,title:`Demo Chat Session`,model:g[0].name,providerType:`ollama`,providerId:null,messages:[{id:`demo-msg-1`,role:`user`,content:`Hello! Can you tell me about this demo?`,timestamp:Date.now()},{id:`demo-msg-2`,role:`assistant`,content:`This is a demo of Libre WebUI! In a real deployment, I would be powered by Ollama running locally on your machine. This demo shows the beautiful interface and features without the backend connection.`,timestamp:Date.now()}],createdAt:Date.now(),updatedAt:Date.now()}],v=_(),y={theme:{mode:`dark`,adaptToAccent:!1,accent:`blue`,customAccent:`#2563eb`},defaultModel:`llama3.2:3b`,defaultProviderType:`ollama`,defaultProviderId:null,systemMessage:`You are a helpful assistant.`,generationOptions:{temperature:.7,top_p:.9,top_k:40,num_predict:1024},embeddingSettings:{enabled:!1,model:`nomic-embed-text`,chunkSize:1e3,chunkOverlap:200,similarityThreshold:.7},titleSettings:{autoTitle:!1,taskModel:``,taskProviderType:null,taskProviderId:null},showUsername:!1,workRemoteProviderDisclosureDismissed:!1,backgroundSettings:{enabled:!1,imageUrl:``,blurAmount:10,opacity:.6}},b={...y,theme:{...y.theme},generationOptions:{...y.generationOptions},embeddingSettings:{...y.embeddingSettings},titleSettings:{...y.titleSettings},backgroundSettings:{...y.backgroundSettings}},te=()=>b,x=e=>{let t=b.backgroundSettings||y.backgroundSettings;return b={...b,...e,theme:{...b.theme,...e.theme},generationOptions:{...b.generationOptions,...e.generationOptions},embeddingSettings:{...b.embeddingSettings,...e.embeddingSettings},titleSettings:e.titleSettings?{...b.titleSettings||y.titleSettings,...e.titleSettings}:b.titleSettings,backgroundSettings:e.backgroundSettings?{...t,...e.backgroundSettings}:b.backgroundSettings},b},S={getSessions:()=>p.get(`/chat/sessions`).then(e=>e.data),createSession:(e,t,n,r,i)=>p.post(`/chat/sessions`,{model:e,title:t,personaId:n,providerType:r,providerId:i}).then(e=>e.data),getSession:e=>{if(i()){let t=_().find(t=>t.id===e);return t?f(t):Promise.resolve({success:!1,error:`Session not found in demo mode`})}return p.get(`/chat/sessions/${e}`).then(e=>e.data)},updateSession:(e,t)=>{if(i()){let n=v.findIndex(t=>t.id===e),r=v[n];if(r){let e={...r,...t,updatedAt:Date.now()};return v[n]=e,f(e)}return Promise.resolve({success:!1,error:`Session not found in demo mode`})}return p.put(`/chat/sessions/${e}`,t).then(e=>e.data)},deleteSession:e=>i()?f(null):p.delete(`/chat/sessions/${e}`).then(e=>e.data),clearAllSessions:()=>p.delete(`/chat/sessions`).then(e=>e.data),generateTitle:(e,t,n,r,a)=>i()?f({title:n.substring(0,30)+(n.length>30?`...`:``),source:`fallback`,updatedAt:Date.now()}):p.post(`/chat/sessions/${e}/generate-title`,{model:t,message:n,providerType:r,providerId:a}).then(e=>e.data),sendMessage:(e,t,n)=>p.post(`/chat/sessions/${e}/messages`,{content:t,options:n}).then(e=>e.data),saveMessage:(e,t)=>p.post(`/chat/sessions/${e}/messages`,t).then(e=>e.data),updateMessage:(e,t,n)=>i()?f({}):p.put(`/chat/sessions/${e}/messages/${t}`,n).then(e=>e.data),generateChatResponse:(e,t,n)=>p.post(`/chat/sessions/${e}/generate`,{message:t,options:n}).then(e=>e.data),generateChatStreamResponse:(e,t,n)=>({subscribe:async(r,i,a)=>{try{let o=await fetch(`${c}/chat/sessions/${e}/generate/stream`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({message:t,options:n})});if(!o.ok)throw Error(`HTTP error! status: ${o.status}`);let s=o.body?.getReader();if(!s)throw Error(`No response body reader available`);let l=new TextDecoder,u=``,f=()=>{s.read().then(({done:e,value:t})=>{if(e){a?.();return}u+=l.decode(t,{stream:!0});let n=u.split(`
|
|
3
3
|
`);u=n.pop()||``;for(let e of n){let t=e.trim();if(t.startsWith(`data: `)){let e=t.slice(6);if(e===`[DONE]`){a?.();return}try{let t=JSON.parse(e);if(r(t),t.type===`done`||t.type===`error`){t.type===`error`?i?.(t.error):a?.();return}}catch(e){d.error(`Failed to parse SSE data:`,e)}}}f()}).catch(e=>{i?.(e instanceof Error?e:Error(String(e)))})};return f(),()=>s.cancel()}catch(e){return i?.(e instanceof Error?e:Error(String(e))),()=>{}}}}),getMessageBranches:(e,t)=>i()?f([]):p.get(`/chat/sessions/${e}/messages/${t}/branches`).then(e=>e.data),switchMessageBranch:(e,t,n)=>i()?f({}):p.post(`/chat/sessions/${e}/messages/${t}/branch`,{branchIndex:n}).then(e=>e.data),createMessageBranch:(e,t,n)=>i()?f({}):p.post(`/chat/sessions/${e}/messages/${t}/branches`,{...n}).then(e=>e.data)},C={uploadDocument:(e,t)=>{if(i())return f({id:`demo-doc-`+Date.now(),filename:e.name,fileType:e.name.endsWith(`.pdf`)?`pdf`:`txt`,size:e.size,sessionId:t,uploadedAt:Date.now()});let n=new FormData;return n.append(`document`,e),t&&n.append(`sessionId`,t),p.post(`/documents/upload`,n).then(e=>e.data)},getDocuments:e=>{if(i())return f([]);let t=e?`/documents/session/${e}`:`/documents`;return p.get(t).then(e=>e.data)},getDocument:e=>i()?f({id:e,filename:`demo-document.pdf`,fileType:`pdf`,size:1024,content:`Demo document content...`,uploadedAt:Date.now()}):p.get(`/documents/${e}`).then(e=>e.data),searchDocuments:(e,t,n)=>i()?f([]):p.post(`/documents/search`,{query:e,sessionId:t,limit:n}).then(e=>e.data),deleteDocument:e=>i()?f(void 0):p.delete(`/documents/${e}`).then(e=>e.data),getEmbeddingStatus:()=>i()?f({available:!1,model:`nomic-embed-text`,chunksWithEmbeddings:0,totalChunks:0}):p.get(`/documents/embeddings/status`).then(e=>e.data),regenerateEmbeddings:()=>i()?f(void 0):p.post(`/documents/embeddings/regenerate`).then(e=>e.data)},w={getModels:()=>i()?f([{id:`nomic-embed-text`,name:`nomic-embed-text`,description:`Ollama - Default embedding model`,provider:`ollama`,dimensions:0,isDetectedEmbedding:!0}]):p.get(`/embeddings/models`).then(e=>e.data)},T={getModels:e=>i()?f([{id:`meta-llama/Llama-3.3-70B-Instruct`,modelId:`meta-llama/Llama-3.3-70B-Instruct`,author:`meta-llama`,downloads:1e6,likes:5e3,tags:[`text-generation`,`llama`],pipeline_tag:`text-generation`,gated:!1}]):p.get(`/huggingface-hub/models`,{params:e}).then(e=>e.data),getTrending:e=>i()?f([]):p.get(`/huggingface-hub/trending`,{params:e}).then(e=>e.data),getModel:(e,t)=>i()?f({id:`${e}/${t}`,modelId:`${e}/${t}`,author:e,downloads:0,likes:0,tags:[],gated:!1}):p.get(`/huggingface-hub/models/${e}/${t}`).then(e=>e.data),getTasks:()=>i()?f([`text-generation`,`text-to-speech`,`text-to-image`]):p.get(`/huggingface-hub/tasks`).then(e=>e.data),clearCache:()=>i()?f(!0):p.post(`/huggingface-hub/cache/clear`).then(e=>e.data),getGgufFiles:(e,t)=>i()?f([{filename:`model-Q4_K_M.gguf`,size:45e8,sizeFormatted:`4.19 GB`,quantization:`Q4_K_M`,url:`https://huggingface.co/${e}/${t}/resolve/main/model-Q4_K_M.gguf`,ollamaCommand:`hf.co/${e}/${t}:Q4_K_M`}]):p.get(`/huggingface-hub/models/${e}/${t}/gguf`).then(e=>e.data),hasGgufFiles:(e,t)=>i()?f({hasGguf:!1,count:0}):p.get(`/huggingface-hub/models/${e}/${t}/has-gguf`).then(e=>e.data)},E=/^data:image\/[a-z0-9][a-z0-9.+-]*(?:;[a-z0-9!#$&^_.+-]+=[^;,]*)*;base64,[a-z0-9+/]+={0,2}$/i,D=/^data:(image\/[a-z0-9][a-z0-9.+-]*)(?:;[a-z0-9!#$&^_.+-]+=[^;,]*)*;base64,/i,ne={"image/jpg":`image/jpeg`,"image/x-png":`image/png`},re=new Set([`image/apng`,`image/avif`,`image/bmp`,`image/gif`,`image/heic`,`image/heif`,`image/jpeg`,`image/png`,`image/tiff`,`image/vnd.microsoft.icon`,`image/webp`,`image/x-icon`]);function O(e){if(!e)return null;let t=e.split(`;`,1)[0].trim().toLowerCase(),n=ne[t]||t;return re.has(n)?n:null}function k(e,t,n){if(t)return e.find(e=>e.model===t&&(!n||e.plugin===n))}function ie(e,t,n){let r=k(e,t,n);return r||n?r:e[0]}function ae(e,t){return t?.pluginId?e.find(e=>e.id===t.pluginId):(t?.model?e.find(e=>e.models.includes(t.model)):void 0)||e[0]}function oe(e){let t=e.b64_json?.trim();if(t)return`data:${O(e.mime_type)||`image/png`};base64,${t}`;let n=e.url?.trim();if(!n)return null;let r=D.exec(n)?.[1];if(E.test(n)&&O(r))return n;try{let e=new URL(n);return e.protocol===`http:`||e.protocol===`https:`?n:null}catch{return null}}function A(e){switch(D.exec(e.trim())?.[1].toLowerCase()){case`image/jpeg`:case`image/jpg`:return`jpg`;case`image/webp`:return`webp`;case`image/gif`:return`gif`;case`image/avif`:return`avif`;default:return`png`}}function j(e){return`${encodeURIComponent(e.plugin)}::${encodeURIComponent(e.model)}`}function M(e,t,n,r){let i=(e??[]).filter(Boolean);return i.length===0?t||n||r:t&&i.includes(t)?t:n&&i.includes(n)?n:i[0]}var N={getModels:()=>i()?f([{model:`gpt-image-2`,plugin:`openai`,config:{sizes:[`1024x1024`,`1536x1024`,`1024x1536`],default_size:`1024x1024`,qualities:[`auto`,`low`,`medium`,`high`],default_quality:`auto`}}]):p.get(`/image-gen/models`).then(e=>e.data),getPlugins:()=>i()?f([{id:`openai`,name:`OpenAI GPT Image`,models:[`gpt-image-2`,`gpt-image-1.5`,`gpt-image-1`,`gpt-image-1-mini`],config:{sizes:[`1024x1024`,`1536x1024`,`1024x1536`],default_size:`1024x1024`,qualities:[`auto`,`low`,`medium`,`high`],default_quality:`auto`}}]):p.get(`/image-gen/plugins`).then(e=>e.data),getConfig:e=>i()?f({sizes:[`1024x1024`,`1536x1024`,`1024x1536`],default_size:`1024x1024`,qualities:[`auto`,`low`,`medium`,`high`],default_quality:`auto`}):p.get(`/image-gen/config/${e}`).then(e=>e.data),generate:e=>i()?f({images:[{url:`https://placehold.co/1024x1024/purple/white?text=Demo+Image`,revised_prompt:e.prompt}],model:e.model,pluginId:e.pluginId}):p.post(`/image-gen/generate`,e).then(e=>e.data),getGallery:e=>i()?f({images:[],total:0}):p.get(`/image-gen/gallery`,{params:e}).then(e=>e.data),getGalleryImage:e=>i()?f({id:e,userId:`demo`,prompt:`Demo image prompt`,model:`dall-e-3`,imageData:`https://placehold.co/1024x1024/purple/white?text=Demo`,createdAt:Date.now()}):p.get(`/image-gen/gallery/${e}`).then(e=>e.data),deleteGalleryImage:e=>i()?f(void 0):p.delete(`/image-gen/gallery/${e}`).then(e=>e.data)},P={connected:!1,baseUrl:`http://127.0.0.1:8766`,dashboardUrl:`http://127.0.0.1:8766/dashboard`,error:`Libre Claw daemon is not connected in demo mode.`},F={status:()=>i()?f(P):p.get(`/libre-claw/status`).then(e=>e.data),dashboard:()=>i()?f({url:P.dashboardUrl}):p.get(`/libre-claw/dashboard`).then(e=>e.data),currentModel:()=>i()?f({provider:`openrouter`,model:`openrouter/auto`}):p.get(`/libre-claw/config/model`).then(e=>e.data),updateModel:(e,t,n=!1)=>i()?f({provider:e,model:t,persist_global:n}):p.patch(`/libre-claw/config/model`,{provider:e,model:t,persist_global:n}).then(e=>e.data),currentFallback:()=>i()?f({enabled:!1,routes:[]}):p.get(`/libre-claw/config/fallback`).then(e=>e.data),updateFallback:e=>i()?f(e):p.patch(`/libre-claw/config/fallback`,e).then(e=>e.data),updateTheme:(e,t=!0)=>i()?f({theme:e,label:e,persist_global:t}):p.patch(`/libre-claw/config/theme`,{theme:e,persist_global:t}).then(e=>e.data),usage:(e=``,t=250)=>{let n=new URLSearchParams({limit:String(t)});return e&&n.set(`provider`,e),i()?f({summary:{},records:[],text:``}):p.get(`/libre-claw/usage?${n.toString()}`).then(e=>e.data)},listRuns:(e=20)=>i()?f({runs:[]}):p.get(`/libre-claw/runs?limit=${e}`).then(e=>e.data),startRun:e=>{if(i()){let t=new Date().toISOString();return f({run:{run_id:`demo-${Date.now()}`,state:`queued`,title:e.message.slice(0,80)||`Libre Claw demo run`,kind:e.kind||`chat`,provider:e.provider||`openrouter`,model:e.model||`openrouter/auto`,working_directory:``,created_at:t,updated_at:t}})}return p.post(`/libre-claw/runs`,e).then(e=>e.data)},getRun:e=>i()?f({run_id:e}):p.get(`/libre-claw/runs/${encodeURIComponent(e)}`).then(e=>e.data),getEvents:(e,t=0)=>i()?f({events:[]}):p.get(`/libre-claw/runs/${encodeURIComponent(e)}/events?after=${t}`).then(e=>e.data),cancelRun:e=>i()?f({run_id:e,cancelled:!0}):p.post(`/libre-claw/runs/${encodeURIComponent(e)}/cancel`).then(e=>e.data),resolvePermission:(e,t,n)=>i()?f({run_id:e,tool_call_id:t,resolution:n}):p.post(`/libre-claw/runs/${encodeURIComponent(e)}/permissions/${encodeURIComponent(t)}`,{resolution:n}).then(e=>e.data),listAutomations:(e=50)=>i()?f({automations:[]}):p.get(`/libre-claw/automations?limit=${e}`).then(e=>e.data),createAutomation:e=>i()?f({...e,automation_id:`demo-${Date.now()}`}):p.post(`/libre-claw/automations`,e).then(e=>e.data),updateAutomation:(e,t)=>i()?f({...t,automation_id:e}):p.patch(`/libre-claw/automations/${encodeURIComponent(e)}`,t).then(e=>e.data),pauseAutomation:e=>i()?f({automation_id:e,status:`paused`}):p.post(`/libre-claw/automations/${encodeURIComponent(e)}/pause`).then(e=>e.data),resumeAutomation:e=>i()?f({automation_id:e,status:`active`}):p.post(`/libre-claw/automations/${encodeURIComponent(e)}/resume`).then(e=>e.data),runAutomationNow:e=>i()?f({automation_id:e,run:!0}):p.post(`/libre-claw/automations/${encodeURIComponent(e)}/run`).then(e=>e.data),deleteAutomation:e=>i()?f({automation_id:e,deleted:!0}):p.delete(`/libre-claw/automations/${encodeURIComponent(e)}`).then(e=>e.data)},I={checkHealth:()=>i()?f({status:`offline`},!1):p.get(`/ollama/health`).then(e=>e.data),getModels:()=>i()?f(g):p.get(`/ollama/models`).then(e=>e.data),pullModel:e=>i()?f(null,!1):p.post(`/ollama/models/pull`,{name:e}).then(e=>e.data),pullModelStream:(e,t,n,r)=>{if(i()){let e=0,r=setInterval(()=>{e+=Math.random()*20,e>=100?(e=100,t({status:`success`,total:100,completed:100,percent:100}),clearInterval(r),setTimeout(n,500)):t({status:`pulling`,total:100,completed:e,percent:Math.round(e)})},1e3);return()=>clearInterval(r)}let a=new URLSearchParams({model:e}),o=localStorage.getItem(`auth-token`);o&&a.set(`token`,o);let s=new EventSource(`${c}/ollama/pull/stream?${a.toString()}`);return s.onmessage=e=>{let i=JSON.parse(e.data);switch(i.type){case`progress`:t({status:i.status,digest:i.digest,total:i.total,completed:i.completed,percent:i.percent});break;case`complete`:s.close(),n();break;case`error`:s.close(),r(i.error);break}},s.onerror=()=>{s.close(),r(`Connection to server lost`)},()=>{s.close()}},deleteModel:e=>i()?f(null,!1):p.delete(`/ollama/models`,{params:{name:e}}).then(e=>e.data),showModel:(e,t=!1)=>{if(i()){let t=g.find(t=>t.name===e);return f(t||null,!!t)}return p.get(`/ollama/models/show`,{params:{name:e,verbose:t}}).then(e=>e.data)},createModel:e=>i()?f(null,!1):p.post(`/ollama/models`,e).then(e=>e.data),copyModel:(e,t)=>i()?f(null,!1):p.post(`/ollama/models/copy`,{source:e,destination:t}).then(e=>e.data),pushModel:e=>i()?f(null,!1):p.post(`/ollama/models/push`,{name:e}).then(e=>e.data),pullAllModels:()=>i()?f(null,!1):p.post(`/ollama/models/pull-all`).then(e=>e.data),pullAllModelsStream:(e,t,n)=>{if(i()){let n=g,r=0,i=setInterval(()=>{r++,r<=n.length&&e({current:r,total:n.length,modelName:n[r-1]?.name||`demo-model`,status:Math.random()>.1?`success`:`error`,error:Math.random()>.1?void 0:`Demo error`}),r>=n.length&&(clearInterval(i),setTimeout(t,500))},1e3);return}let r=new EventSource(`${c}/ollama/models/pull-all/stream`);r.onmessage=i=>{let a=JSON.parse(i.data);switch(a.type){case`progress`:e({current:a.current,total:a.total,modelName:a.modelName,status:a.status,error:a.error});break;case`complete`:r.close(),t();break;case`error`:r.close(),n(a.error);break}},r.onerror=()=>{r.close(),n(`Connection to server lost`)}},generateEmbeddings:e=>i()?f({embeddings:[[]]},!1):p.post(`/ollama/embed`,e).then(e=>e.data),listRunningModels:()=>i()?f([]):p.get(`/ollama/running`).then(e=>e.data),unloadModel:e=>i()?f(null):p.post(`/ollama/models/unload`,{name:e}).then(e=>e.data),unloadAllModels:()=>i()?f(null):p.post(`/ollama/models/unload-all`).then(e=>e.data),getVersion:()=>i()?f({version:`demo-mode`},!1):p.get(`/ollama/version`).then(e=>e.data),chatCompletion:e=>i()?f({message:{content:`Demo response`,role:`assistant`}},!1):p.post(`/ollama/chat`,e).then(e=>e.data),checkBlobExists:e=>i()?Promise.resolve(!1):p.head(`/ollama/blobs/${e}`).then(()=>!0).catch(()=>!1),pushBlob:(e,t)=>i()?f(null,!1):p.post(`/ollama/blobs/${e}`,t,{headers:{"Content-Type":`application/octet-stream`}}).then(e=>e.data),generateLegacyEmbeddings:e=>i()?f({embedding:[]},!1):p.post(`/ollama/embeddings`,e).then(e=>e.data),getLibraryModels:e=>{if(i())return e?.category===`cloud`?f([{name:`gpt-oss:cloud`,description:`Demo cloud model using Ollama cloud naming`,category:`cloud`,sizes:[`cloud`],pulls:`Cloud`,tags:[`cloud`]}]):f([{name:`llama3.2`,description:`Meta's latest Llama model`,category:`general`,sizes:[`1b`,`3b`],pulls:`50M+`,tags:[`general`]},{name:`deepseek-r1`,description:`Open reasoning model`,category:`reasoning`,sizes:[`7b`,`14b`,`32b`],pulls:`200M+`,tags:[`reasoning`]}]);let t=new URLSearchParams;e?.search&&t.set(`search`,e.search),e?.sort&&t.set(`sort`,e.sort),e?.category&&t.set(`category`,e.category);let n=t.toString();return p.get(`/ollama/library${n?`?${n}`:``}`).then(e=>e.data)}},L=[[`#2563eb`,`#7c3aed`],[`#0891b2`,`#2563eb`],[`#0f766e`,`#2563eb`],[`#be123c`,`#7c3aed`],[`#ff7b52`,`#dc2626`]],R=e=>{let t=0;for(let n=0;n<e.length;n+=1)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)},z=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`),B=e=>{let t=e.trim().split(/[\s._-]+/).filter(Boolean);return t.length===0?`AI`:t.slice(0,2).map(e=>e[0]?.toUpperCase()).join(``)||`AI`},V=(e,t=128)=>{let n=e.trim()||`AI Persona`,r=R(n),[i,a]=L[r%L.length],o=z(B(n)),s=`persona-avatar-${r}-${t}`,c=t>=96?44:24,l=`
|
|
4
4
|
<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 ${t} ${t}" role="img" aria-label="${z(n)} avatar">
|
|
5
5
|
<defs>
|
|
@@ -12,7 +12,7 @@ import{n as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,p as n}from"./r
|
|
|
12
12
|
<circle cx="${t*.22}" cy="${t*.22}" r="${t*.26}" fill="rgba(255,255,255,0.16)" />
|
|
13
13
|
<text x="50%" y="52%" dominant-baseline="middle" text-anchor="middle" fill="white" font-family="Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="${c}" font-weight="700">${o}</text>
|
|
14
14
|
</svg>
|
|
15
|
-
`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(l)}`},H=(e,t=128)=>e.avatar?.trim()||V(e.name,t),U=(e,t,n=128)=>{e.onerror=null,e.src=V(t,n)},W={getPersonas:()=>i()?f([{id:`demo-1`,user_id:`default`,name:`Creative Assistant`,description:`Helpful assistant for creative tasks`,model:`llama3.3:latest`,parameters:{temperature:.8,top_p:.9,context_window:4096,system_prompt:`You are a creative and helpful assistant. Provide thoughtful and engaging responses.`},avatar:V(`Creative Assistant`,128),created_at:Date.now()-864e5,updated_at:Date.now()-864e5},{id:`demo-2`,user_id:`default`,name:`Research Assistant`,description:`Academic assistant for research and learning`,model:`qwen3:7b`,parameters:{temperature:.3,top_p:.8,context_window:8192,system_prompt:`You are a knowledgeable research assistant. Provide detailed, informative explanations.`},avatar:V(`Research Assistant`,128),created_at:Date.now()-1728e5,updated_at:Date.now()-1728e5}]):p.get(`/personas`).then(e=>e.data),getPersona:e=>i()?f({id:e,user_id:`default`,name:`Sample Assistant`,description:`A sample assistant for demonstration`,model:`llama3.2:latest`,parameters:{temperature:.7,top_p:.9,context_window:4096,system_prompt:`You are a helpful assistant.`},created_at:Date.now(),updated_at:Date.now()}):p.get(`/personas/${e}`).then(e=>e.data),createPersona:e=>i()?f({id:`demo-`+Date.now(),user_id:`default`,...e,created_at:Date.now(),updated_at:Date.now()}):p.post(`/personas`,e).then(e=>e.data),updatePersona:(e,t)=>i()?f({id:e,user_id:`default`,name:t.name||`Updated Sample Assistant`,description:t.description,model:t.model||`llama3.2:latest`,parameters:t.parameters||{temperature:.7,top_p:.9,context_window:4096,system_prompt:`You are a helpful assistant.`},avatar:t.avatar,background:t.background,created_at:Date.now()-864e5,updated_at:Date.now()}):p.put(`/personas/${e}`,t).then(e=>e.data),deletePersona:e=>i()?f(void 0):p.delete(`/personas/${e}`).then(e=>e.data),exportPersona:e=>{if(i()){let e={name:`Sample Assistant`,description:`A sample assistant for demonstration`,model:`llama3.2:latest`,params:{temperature:.7,top_p:.9,context_window:4096,system_prompt:`You are a helpful assistant.`},exportedAt:Date.now(),version:`1.0.0`};return Promise.resolve(e)}return p.get(`/personas/${e}/export`).then(e=>e.data)},importPersona:e=>i()?f({id:`demo-imported-`+Date.now(),user_id:`default`,name:e.name,description:e.description,model:e.model,parameters:e.params,avatar:e.avatar,background:e.background,created_at:Date.now(),updated_at:Date.now(),embedding_model:e.embedding_model,memory_settings:e.memory_settings,mutation_settings:e.mutation_settings}):p.post(`/personas/import`,e).then(e=>e.data),getPersonasCount:()=>i()?f({count:2}):p.get(`/personas/stats/count`).then(e=>e.data),getDefaultParameters:()=>i()?f({temperature:.7,top_p:.9,top_k:40,context_window:4096,max_tokens:1024,system_prompt:``,repeat_penalty:1.1,presence_penalty:0,frequency_penalty:0}):p.get(`/personas/defaults/parameters`).then(e=>e.data),getMemoryStatus:e=>i()?f({status:`active`,memory_count:42,last_backup:Date.now()-864e5,size_mb:2.3}):p.get(`/personas/${e}/memory/status`).then(e=>e.data),wipeMemories:e=>i()?f({deleted_count:42}):p.delete(`/personas/${e}/memory`).then(e=>e.data),backupPersona:e=>{if(i()){let t=JSON.stringify({persona_id:e,backup_date:new Date().toISOString(),data:`demo backup data`});return Promise.resolve(new Blob([t],{type:`application/json`}))}return p.get(`/personas/${e}/backup`,{responseType:`blob`}).then(e=>e.data)},exportPersonaDNA:e=>{if(i()){let t=JSON.stringify({persona_id:e,export_date:new Date().toISOString(),dna:`demo DNA data`,memories:[],learned_behaviors:{}});return Promise.resolve(new Blob([t],{type:`application/json`}))}return p.get(`/personas/${e}/export/dna`,{responseType:`blob`}).then(e=>e.data)},importPersonaDNA:e=>{if(i())return f({id:`demo-dna-`+Date.now(),user_id:`default`,name:`Imported Persona`,description:`Persona imported from DNA`,model:`llama3.2:latest`,parameters:{temperature:.7,top_p:.9,context_window:4096,system_prompt:`You are a helpful assistant.`},created_at:Date.now(),updated_at:Date.now()});let t=new FormData;return t.append(`dnaFile`,e),p.post(`/personas/import/dna`,t).then(e=>e.data)},downloadPersona:async(e,t)=>{try{let n=await W.exportPersona(e),r=new Blob([JSON.stringify(n,null,2)],{type:`application/json`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${t}.json`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}catch(e){throw d.error(`Error while downloading persona:`,e),Error(`Failed to download persona: ${e instanceof Error?e.message:String(e)}`)}}},G={getAllPlugins:()=>i()?f([]):p.get(`/plugins`).then(e=>e.data),discoverModels:e=>i()?f([]):p.post(`/plugins/discover/${encodeURIComponent(e)}`).then(e=>e.data),uploadPlugin:e=>{if(i())return f({},!1);let t=new FormData;return t.append(`plugin`,e),p.post(`/plugins/upload`,t).then(e=>e.data)},installPlugin:e=>i()?f({},!1):p.post(`/plugins/install`,e).then(e=>e.data),updatePlugin:(e,t)=>i()?f({},!1):p.put(`/plugins/${e}`,t).then(e=>e.data),deletePlugin:e=>i()?f(void 0):p.delete(`/plugins/${e}`).then(e=>e.data),activatePlugin:e=>i()?f(!1,!1):p.post(`/plugins/activate/${e}`).then(e=>e.data),deactivatePlugin:e=>{if(i())return f(void 0);let t=e?`/plugins/deactivate/${e}`:`/plugins/deactivate`;return p.post(t).then(e=>e.data)},getActivePlugin:()=>i()?f(null):p.get(`/plugins/active`).then(e=>e.data),getPluginStatus:()=>i()?f([]):p.get(`/plugins/status`).then(e=>e.data),exportPlugin:e=>i()?Promise.resolve(new Blob([`{}`],{type:`application/json`})):p.get(`/plugins/${e}/export`,{responseType:`blob`}).then(e=>e.data),getCredentials:()=>i()?f([]):p.get(`/plugins/credentials/all`).then(e=>e.data),setApiKey:(e,t)=>i()?f(!1,!1):p.post(`/plugins/${e}/credentials`,{api_key:t}).then(e=>e.data),deleteApiKey:e=>i()?f(!1,!1):p.delete(`/plugins/${e}/credentials`).then(e=>e.data),checkApiKey:e=>i()?f(!1):p.get(`/plugins/${e}/credentials/check`).then(e=>e.data),getVariables:e=>i()?f({}):p.get(`/plugins/${e}/variables`).then(e=>e.data),setVariables:(e,t,n=[])=>i()?f(!0):p.put(`/plugins/${e}/variables`,{variables:t,unset:n}).then(e=>e.data),resetVariables:e=>i()?f(!0):p.delete(`/plugins/${e}/variables`).then(e=>e.data)},K={getPreferences:()=>i()?f(te()):p.get(`/preferences`).then(e=>e.data),updatePreferences:e=>i()?f(x(e)):p.put(`/preferences`,e).then(e=>e.data),setDefaultModel:(e,t,n)=>i()?f(x({defaultModel:e,defaultProviderType:t,defaultProviderId:t===`plugin`?n:null})):p.put(`/preferences/default-model`,{model:e,providerType:t,providerId:n}).then(e=>e.data),setSystemMessage:e=>i()?f(x({systemMessage:e})):p.put(`/preferences/system-message`,{message:e}).then(e=>e.data),setGenerationOptions:e=>i()?f(x({generationOptions:e})):p.put(`/preferences/generation-options`,e).then(e=>e.data),resetGenerationOptions:()=>i()?f(x({generationOptions:y.generationOptions})):p.post(`/preferences/generation-options/reset`).then(e=>e.data),setEmbeddingSettings:e=>i()?f(x({embeddingSettings:e})):p.put(`/preferences/embedding-settings`,e).then(e=>e.data),resetEmbeddingSettings:()=>i()?f(x({embeddingSettings:y.embeddingSettings})):p.post(`/preferences/embedding-settings/reset`).then(e=>e.data),importData:(e,t=`replace`)=>i()?f({theme:{mode:`dark`,adaptToAccent:!1,accent:`blue`,customAccent:`#2563eb`},defaultModel:`llama3.2`,systemMessage:`You are a helpful assistant.`,generationOptions:{},embeddingSettings:{enabled:!1,model:`nomic-embed-text`,chunkSize:1e3,chunkOverlap:200,similarityThreshold:.7},showUsername:!1,workRemoteProviderDisclosureDismissed:!1}):p.post(`/preferences/import`,{data:e,mergeStrategy:t}).then(e=>e.data)},se=new Set([`snapshot`,`run_state`,`reasoning_delta`,`assistant_delta`,`tool_call`,`tool_result`,`usage`,`skill_loaded`,`error`,`done`]),q=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:void 0,ce=e=>{if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number(e);if(Number.isFinite(t))return t;let n=Date.parse(e);if(Number.isFinite(n))return n}return Date.now()},J=(e,t,n,r,i)=>{let a=q(e);if(!a)return;let o=Number(a.id??t),s=String(a.type??n??``),c=String(a.taskId??r),l=String(a.runId??i);if(!Number.isSafeInteger(o)||o<0||!se.has(s)||c!==r||l!==i)return;let u=a.data;return{id:o,type:s,taskId:c,runId:l,timestamp:ce(a.timestamp),data:q(u)||(u===void 0?{}:{content:u})}},Y=(e,t,n)=>{let r,i,a=[];for(let t of e.split(`
|
|
15
|
+
`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(l)}`},H=(e,t=128)=>e.avatar?.trim()||V(e.name,t),U=(e,t,n=128)=>{e.onerror=null,e.src=V(t,n)},W={getPersonas:()=>i()?f([{id:`demo-1`,user_id:`default`,name:`Creative Assistant`,description:`Helpful assistant for creative tasks`,model:`llama3.3:latest`,parameters:{temperature:.8,top_p:.9,context_window:4096,system_prompt:`You are a creative and helpful assistant. Provide thoughtful and engaging responses.`},avatar:V(`Creative Assistant`,128),created_at:Date.now()-864e5,updated_at:Date.now()-864e5},{id:`demo-2`,user_id:`default`,name:`Research Assistant`,description:`Academic assistant for research and learning`,model:`qwen3:7b`,parameters:{temperature:.3,top_p:.8,context_window:8192,system_prompt:`You are a knowledgeable research assistant. Provide detailed, informative explanations.`},avatar:V(`Research Assistant`,128),created_at:Date.now()-1728e5,updated_at:Date.now()-1728e5}]):p.get(`/personas`).then(e=>e.data),getPersona:e=>i()?f({id:e,user_id:`default`,name:`Sample Assistant`,description:`A sample assistant for demonstration`,model:`llama3.2:latest`,parameters:{temperature:.7,top_p:.9,context_window:4096,system_prompt:`You are a helpful assistant.`},created_at:Date.now(),updated_at:Date.now()}):p.get(`/personas/${e}`).then(e=>e.data),createPersona:e=>i()?f({id:`demo-`+Date.now(),user_id:`default`,...e,created_at:Date.now(),updated_at:Date.now()}):p.post(`/personas`,e).then(e=>e.data),updatePersona:(e,t)=>i()?f({id:e,user_id:`default`,name:t.name||`Updated Sample Assistant`,description:t.description,model:t.model||`llama3.2:latest`,parameters:t.parameters||{temperature:.7,top_p:.9,context_window:4096,system_prompt:`You are a helpful assistant.`},avatar:t.avatar,background:t.background,created_at:Date.now()-864e5,updated_at:Date.now()}):p.put(`/personas/${e}`,t).then(e=>e.data),deletePersona:e=>i()?f(void 0):p.delete(`/personas/${e}`).then(e=>e.data),exportPersona:e=>{if(i()){let e={name:`Sample Assistant`,description:`A sample assistant for demonstration`,model:`llama3.2:latest`,params:{temperature:.7,top_p:.9,context_window:4096,system_prompt:`You are a helpful assistant.`},exportedAt:Date.now(),version:`1.0.0`};return Promise.resolve(e)}return p.get(`/personas/${e}/export`).then(e=>e.data)},importPersona:e=>i()?f({id:`demo-imported-`+Date.now(),user_id:`default`,name:e.name,description:e.description,model:e.model,parameters:e.params,avatar:e.avatar,background:e.background,created_at:Date.now(),updated_at:Date.now(),embedding_model:e.embedding_model,memory_settings:e.memory_settings,mutation_settings:e.mutation_settings}):p.post(`/personas/import`,e).then(e=>e.data),getPersonasCount:()=>i()?f({count:2}):p.get(`/personas/stats/count`).then(e=>e.data),getDefaultParameters:()=>i()?f({temperature:.7,top_p:.9,top_k:40,context_window:4096,max_tokens:1024,system_prompt:``,repeat_penalty:1.1,presence_penalty:0,frequency_penalty:0}):p.get(`/personas/defaults/parameters`).then(e=>e.data),getMemoryStatus:e=>i()?f({status:`active`,memory_count:42,last_backup:Date.now()-864e5,size_mb:2.3}):p.get(`/personas/${e}/memory/status`).then(e=>e.data),wipeMemories:e=>i()?f({deleted_count:42}):p.delete(`/personas/${e}/memory`).then(e=>e.data),backupPersona:e=>{if(i()){let t=JSON.stringify({persona_id:e,backup_date:new Date().toISOString(),data:`demo backup data`});return Promise.resolve(new Blob([t],{type:`application/json`}))}return p.get(`/personas/${e}/backup`,{responseType:`blob`}).then(e=>e.data)},exportPersonaDNA:e=>{if(i()){let t=JSON.stringify({persona_id:e,export_date:new Date().toISOString(),dna:`demo DNA data`,memories:[],learned_behaviors:{}});return Promise.resolve(new Blob([t],{type:`application/json`}))}return p.get(`/personas/${e}/export/dna`,{responseType:`blob`}).then(e=>e.data)},importPersonaDNA:e=>{if(i())return f({id:`demo-dna-`+Date.now(),user_id:`default`,name:`Imported Persona`,description:`Persona imported from DNA`,model:`llama3.2:latest`,parameters:{temperature:.7,top_p:.9,context_window:4096,system_prompt:`You are a helpful assistant.`},created_at:Date.now(),updated_at:Date.now()});let t=new FormData;return t.append(`dnaFile`,e),p.post(`/personas/import/dna`,t).then(e=>e.data)},downloadPersona:async(e,t)=>{try{let n=await W.exportPersona(e),r=new Blob([JSON.stringify(n,null,2)],{type:`application/json`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${t}.json`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}catch(e){throw d.error(`Error while downloading persona:`,e),Error(`Failed to download persona: ${e instanceof Error?e.message:String(e)}`)}}},G={getAllPlugins:()=>i()?f([]):p.get(`/plugins`).then(e=>e.data),discoverModels:e=>i()?f({models:[],outcome:`unavailable`}):p.post(`/plugins/discover/${encodeURIComponent(e)}`).then(e=>e.data),uploadPlugin:e=>{if(i())return f({},!1);let t=new FormData;return t.append(`plugin`,e),p.post(`/plugins/upload`,t).then(e=>e.data)},installPlugin:e=>i()?f({},!1):p.post(`/plugins/install`,e).then(e=>e.data),updatePlugin:(e,t)=>i()?f({},!1):p.put(`/plugins/${e}`,t).then(e=>e.data),deletePlugin:e=>i()?f(void 0):p.delete(`/plugins/${e}`).then(e=>e.data),activatePlugin:e=>i()?f(!1,!1):p.post(`/plugins/activate/${e}`).then(e=>e.data),deactivatePlugin:e=>{if(i())return f(void 0);let t=e?`/plugins/deactivate/${e}`:`/plugins/deactivate`;return p.post(t).then(e=>e.data)},getActivePlugin:()=>i()?f(null):p.get(`/plugins/active`).then(e=>e.data),getPluginStatus:()=>i()?f([]):p.get(`/plugins/status`).then(e=>e.data),exportPlugin:e=>i()?Promise.resolve(new Blob([`{}`],{type:`application/json`})):p.get(`/plugins/${e}/export`,{responseType:`blob`}).then(e=>e.data),getCredentials:()=>i()?f([]):p.get(`/plugins/credentials/all`).then(e=>e.data),setApiKey:(e,t)=>i()?f(!1,!1):p.post(`/plugins/${e}/credentials`,{api_key:t}).then(e=>e.data),deleteApiKey:e=>i()?f(!1,!1):p.delete(`/plugins/${e}/credentials`).then(e=>e.data),checkApiKey:e=>i()?f(!1):p.get(`/plugins/${e}/credentials/check`).then(e=>e.data),getVariables:e=>i()?f({}):p.get(`/plugins/${e}/variables`).then(e=>e.data),setVariables:(e,t,n=[])=>i()?f(!0):p.put(`/plugins/${e}/variables`,{variables:t,unset:n}).then(e=>e.data),resetVariables:e=>i()?f(!0):p.delete(`/plugins/${e}/variables`).then(e=>e.data)},K={getPreferences:()=>i()?f(te()):p.get(`/preferences`).then(e=>e.data),updatePreferences:e=>i()?f(x(e)):p.put(`/preferences`,e).then(e=>e.data),setDefaultModel:(e,t,n)=>i()?f(x({defaultModel:e,defaultProviderType:t,defaultProviderId:t===`plugin`?n:null})):p.put(`/preferences/default-model`,{model:e,providerType:t,providerId:n}).then(e=>e.data),setSystemMessage:e=>i()?f(x({systemMessage:e})):p.put(`/preferences/system-message`,{message:e}).then(e=>e.data),setGenerationOptions:e=>i()?f(x({generationOptions:e})):p.put(`/preferences/generation-options`,e).then(e=>e.data),resetGenerationOptions:()=>i()?f(x({generationOptions:y.generationOptions})):p.post(`/preferences/generation-options/reset`).then(e=>e.data),setEmbeddingSettings:e=>i()?f(x({embeddingSettings:e})):p.put(`/preferences/embedding-settings`,e).then(e=>e.data),resetEmbeddingSettings:()=>i()?f(x({embeddingSettings:y.embeddingSettings})):p.post(`/preferences/embedding-settings/reset`).then(e=>e.data),importData:(e,t=`replace`)=>i()?f({theme:{mode:`dark`,adaptToAccent:!1,accent:`blue`,customAccent:`#2563eb`},defaultModel:`llama3.2`,systemMessage:`You are a helpful assistant.`,generationOptions:{},embeddingSettings:{enabled:!1,model:`nomic-embed-text`,chunkSize:1e3,chunkOverlap:200,similarityThreshold:.7},showUsername:!1,workRemoteProviderDisclosureDismissed:!1}):p.post(`/preferences/import`,{data:e,mergeStrategy:t}).then(e=>e.data)},se=new Set([`snapshot`,`run_state`,`reasoning_delta`,`assistant_delta`,`tool_call`,`tool_result`,`usage`,`skill_loaded`,`error`,`done`]),q=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:void 0,ce=e=>{if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number(e);if(Number.isFinite(t))return t;let n=Date.parse(e);if(Number.isFinite(n))return n}return Date.now()},J=(e,t,n,r,i)=>{let a=q(e);if(!a)return;let o=Number(a.id??t),s=String(a.type??n??``),c=String(a.taskId??r),l=String(a.runId??i);if(!Number.isSafeInteger(o)||o<0||!se.has(s)||c!==r||l!==i)return;let u=a.data;return{id:o,type:s,taskId:c,runId:l,timestamp:ce(a.timestamp),data:q(u)||(u===void 0?{}:{content:u})}},Y=(e,t,n)=>{let r,i,a=[];for(let t of e.split(`
|
|
16
16
|
`)){if(!t||t.startsWith(`:`))continue;let e=t.indexOf(`:`),n=e===-1?t:t.slice(0,e),o=e===-1?``:t.slice(e+1),s=o.startsWith(` `)?o.slice(1):o;n===`id`&&(r=s),n===`event`&&(i=s),n===`data`&&a.push(s)}if(a.length===0)return;let o=a.join(`
|
|
17
17
|
`);if(o===`[DONE]`)return J({id:r,type:`done`,taskId:t,runId:n,timestamp:Date.now(),data:{}},r,i,t,n);try{return J(JSON.parse(o),r,i,t,n)}catch{return}},le=class{constructor(e,t,r){n(this,`taskId`,void 0),n(this,`runId`,void 0),n(this,`onEvent`,void 0),n(this,`buffer`,``),this.taskId=e,this.runId=t,this.onEvent=r}push(e){e&&(this.buffer+=e,this.drain())}finish(e=``){if(this.buffer+=e,this.drain(),!this.buffer.trim()){this.buffer=``;return}let t=Y(this.buffer.replace(/\r\n?/g,`
|
|
18
18
|
`),this.taskId,this.runId);this.buffer=``,t&&this.onEvent(t)}drain(){let e=/\r?\n\r?\n/.exec(this.buffer);for(;e?.index!==void 0;){let t=this.buffer.slice(0,e.index).replace(/\r\n?/g,`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-BjDI9mRe.js";import{
|
|
1
|
+
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-BjDI9mRe.js";import{ct as a}from"../assets/index-BVgyQN3z.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:()=>um,options:()=>cm,printers:()=>lm});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:()=>Xp});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:!1}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.imported===e&&t.imported!==t.local||t?.type===`ExportSpecifier`&&Ye(t)&&t.local===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-BjDI9mRe.js";import{
|
|
1
|
+
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-BjDI9mRe.js";import{ct as a}from"../assets/index-BVgyQN3z.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:()=>lo,options:()=>po,parsers:()=>mo,printers:()=>as});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),r(o,this,new Set(t))}getLeadingWhitespaceCount(e){let t=n(o,this),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=n(o,this),r=0;for(let n=e.length-1;n>=0&&t.has(e.charAt(n));n--)r++;return r}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 n(o,this).has(e.charAt(0))}hasTrailingWhitespace(e){return n(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 r=`[${Ue([...n(o,this)].join(``))}]+`,i=new RegExp(t?`(${r})`:r);return e.split(i)}hasWhitespaceCharacter(e){let t=n(o,this);return Array.prototype.some.call(e,e=>t.has(e))}hasNonWhitespaceCharacter(e){let t=n(o,this);return Array.prototype.some.call(e,e=>!t.has(e))}isWhitespaceOnly(e){let t=n(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-BjDI9mRe.js";import{
|
|
1
|
+
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-BjDI9mRe.js";import{ct as a}from"../assets/index-BVgyQN3z.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,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-BjDI9mRe.js";import{
|
|
1
|
+
import{_ as e,g as t,h as n,m as r,p as i}from"./router-vendor-BjDI9mRe.js";import{ct as a}from"../assets/index-BVgyQN3z.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}else 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-BjDI9mRe.js";import{
|
|
1
|
+
import{g as e,p as t}from"./router-vendor-BjDI9mRe.js";import{ct as n}from"../assets/index-BVgyQN3z.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:()=>Xm});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)?!1:(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;break}}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 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{d as t,f as n}from"./markdown-core-GI9BPwrB.js";import{_ as r,g as i,h as a,m as o}from"./router-vendor-BjDI9mRe.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{d as t,f as n}from"./markdown-core-GI9BPwrB.js";import{_ as r,g as i,h as a,m as o}from"./router-vendor-BjDI9mRe.js";import{Ct as s,St as c,_t as l,bt as u,ct as d,dt as f,ft as p,gt as m,ht as h,mt as g,ot as _,pt as v,st as ee,vt as y,wt as b,xt as x,yt as S}from"../assets/index-BVgyQN3z.js";var C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,te=(C=new WeakMap,w=new WeakMap,T=new WeakMap,E=new WeakMap,D=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,j=new WeakMap,M=new WeakMap,N=new WeakMap,P=new WeakMap,F=new WeakMap,I=new WeakMap,L=new WeakMap,R=new WeakSet,class extends g{constructor(e,t){super(),d(this,R),r(this,C,void 0),r(this,w,void 0),r(this,T,void 0),r(this,E,void 0),r(this,D,void 0),r(this,O,void 0),r(this,k,void 0),r(this,A,void 0),r(this,j,void 0),r(this,M,void 0),r(this,N,void 0),r(this,P,void 0),r(this,F,void 0),r(this,I,void 0),r(this,L,new Set),this.options=t,o(C,this,e),o(A,this,null),o(k,this,f()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(a(w,this).addObserver(this),q(a(w,this),this.options)?i(R,this,z).call(this):this.updateResult(),i(R,this,U).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return J(a(w,this),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return J(a(w,this),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,i(R,this,W).call(this),i(R,this,G).call(this),a(w,this).removeObserver(this)}setOptions(e){let t=this.options,n=a(w,this);if(this.options=a(C,this).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof S(this.options.enabled,a(w,this))!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);i(R,this,K).call(this),a(w,this).setOptions(this.options),t._defaulted&&!x(this.options,t)&&a(C,this).getQueryCache().notify({type:`observerOptionsUpdated`,query:a(w,this),observer:this});let r=this.hasListeners();r&&Y(a(w,this),n,this.options,t)&&i(R,this,z).call(this),this.updateResult(),r&&(a(w,this)!==n||S(this.options.enabled,a(w,this))!==S(t.enabled,a(w,this))||u(this.options.staleTime,a(w,this))!==u(t.staleTime,a(w,this)))&&i(R,this,B).call(this);let o=i(R,this,V).call(this);r&&(a(w,this)!==n||S(this.options.enabled,a(w,this))!==S(t.enabled,a(w,this))||o!==a(I,this))&&i(R,this,H).call(this,o)}getOptimisticResult(e){let t=a(C,this).getQueryCache().build(a(C,this),e),n=this.createResult(t,e);return ie(this,n)&&(o(E,this,n),o(O,this,this.options),o(D,this,a(w,this).state)),n}getCurrentResult(){return a(E,this)}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&a(k,this).status===`pending`&&a(k,this).reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){a(L,this).add(e)}getCurrentQuery(){return a(w,this)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=a(C,this).defaultQueryOptions(e),n=a(C,this).getQueryCache().build(a(C,this),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return i(R,this,z).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),a(E,this)))}createResult(e,t){let n=a(w,this),r=this.options,i=a(E,this),s=a(D,this),c=a(O,this),l=e===n?a(T,this):e.state,{state:u}=e,d={...u},p=!1,m;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&q(e,t),o=i&&Y(e,n,t,r);(a||o)&&(d={...d,...ee(u.data,e.options)}),t._optimisticResults===`isRestoring`&&(d.fetchStatus=`idle`)}let{error:h,errorUpdatedAt:g,status:_}=d;m=d.data;let v=!1;if(t.placeholderData!==void 0&&m===void 0&&_===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(e=i.data,v=!0):e=typeof t.placeholderData==`function`?t.placeholderData(a(N,this)?.state.data,a(N,this)):t.placeholderData,e!==void 0&&(_=`success`,m=y(i?.data,e,t),p=!0)}if(t.select&&m!==void 0&&!v)if(i&&m===s?.data&&t.select===a(j,this))m=a(M,this);else try{o(j,this,t.select),m=t.select(m),m=y(i?.data,m,t),o(M,this,m),o(A,this,null)}catch(e){o(A,this,e)}a(A,this)&&(h=a(A,this),m=a(M,this),g=Date.now(),_=`error`);let b=d.fetchStatus===`fetching`,x=_===`pending`,C=_===`error`,P=x&&b,F=m!==void 0,I={status:_,fetchStatus:d.fetchStatus,isPending:x,isSuccess:_===`success`,isError:C,isInitialLoading:P,isLoading:P,data:m,dataUpdatedAt:d.dataUpdatedAt,error:h,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:C&&!F,isPaused:d.fetchStatus===`paused`,isPlaceholderData:p,isRefetchError:C&&F,isStale:X(e,t),refetch:this.refetch,promise:a(k,this),isEnabled:S(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=I.data!==void 0,r=I.status===`error`&&!t,i=e=>{r?e.reject(I.error):t&&e.resolve(I.data)},s=()=>{i(o(k,this,I.promise=f()))},c=a(k,this);switch(c.status){case`pending`:e.queryHash===n.queryHash&&i(c);break;case`fulfilled`:(r||I.data!==c.value)&&s();break;case`rejected`:(!r||I.error!==c.reason)&&s();break}}return I}updateResult(){let e=a(E,this),t=this.createResult(a(w,this),this.options);o(D,this,a(w,this).state),o(O,this,this.options),a(D,this).data!==void 0&&o(N,this,a(w,this)),!x(t,e)&&(o(E,this,t),i(R,this,ne).call(this,{listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!a(L,this).size)return!0;let r=new Set(n??a(L,this));return this.options.throwOnError&&r.add(`error`),Object.keys(a(E,this)).some(t=>{let n=t;return a(E,this)[n]!==e[n]&&r.has(n)})})()}))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&i(R,this,U).call(this)}});function z(e){i(R,this,K).call(this);let t=a(w,this).fetch(this.options,e);return e?.throwOnError||(t=t.catch(l)),t}function B(){i(R,this,W).call(this);let e=u(this.options.staleTime,a(w,this));if(h.isServer()||a(E,this).isStale||!m(e))return;let t=s(a(E,this).dataUpdatedAt,e)+1;o(P,this,b.setTimeout(()=>{a(E,this).isStale||this.updateResult()},t))}function V(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(a(w,this)):this.options.refetchInterval)??!1}function H(e){i(R,this,G).call(this),o(I,this,e),!(h.isServer()||S(this.options.enabled,a(w,this))===!1||!m(a(I,this))||a(I,this)===0)&&o(F,this,b.setInterval(()=>{(this.options.refetchIntervalInBackground||v.isFocused())&&i(R,this,z).call(this)},a(I,this)))}function U(){i(R,this,B).call(this),i(R,this,H).call(this,i(R,this,V).call(this))}function W(){a(P,this)!==void 0&&(b.clearTimeout(a(P,this)),o(P,this,void 0))}function G(){a(F,this)!==void 0&&(b.clearInterval(a(F,this)),o(F,this,void 0))}function K(){let e=a(C,this).getQueryCache().build(a(C,this),this.options);if(e===a(w,this))return;let t=a(w,this);o(w,this,e),o(T,this,e.state),this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}function ne(e){p.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(a(E,this))}),a(C,this).getQueryCache().notify({query:a(w,this),type:`observerResultsUpdated`})})}function re(e,t){return S(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&S(t.retryOnMount,e)===!1)}function q(e,t){return re(e,t)||e.state.data!==void 0&&J(e,t,t.refetchOnMount)}function J(e,t,n){if(S(t.enabled,e)!==!1&&u(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&X(e,t)}return!1}function Y(e,t,n,r){return(e!==t||S(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&X(e,n)}function X(e,t){return S(t.enabled,e)!==!1&&e.isStaleByTime(u(t.staleTime,e))}function ie(e,t){return!x(e.getCurrentResult(),t)}var Z=e(n(),1);t();function ae(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var oe=Z.createContext(ae()),se=()=>Z.useContext(oe),ce=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?c(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},le=e=>{Z.useEffect(()=>{e.clearReset()},[e])},ue=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||c(n,[e.error,r])),Q=Z.createContext(!1),de=()=>Z.useContext(Q);Q.Provider;var fe=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},pe=(e,t)=>e.isLoading&&e.isFetching&&!t,me=(e,t)=>e?.suspense&&t.isPending,$=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function he(e,t,n){let r=de(),i=se(),a=_(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,fe(o),ce(o,i,s),le(i);let u=!a.getQueryCache().get(o.queryHash),[d]=Z.useState(()=>new t(a,o)),f=d.getOptimisticResult(o),m=!r&&c;if(Z.useSyncExternalStore(Z.useCallback(e=>{let t=m?d.subscribe(p.batchCalls(e)):l;return d.updateResult(),t},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),Z.useEffect(()=>{d.setOptions(o)},[o,d]),me(o,f))throw $(o,d,i);if(ue({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!h.isServer()&&pe(f,r)&&(u?$(o,d,i):s?.promise)?.catch(l).finally(()=>{d.updateResult()}),o.notifyOnChangeProps?f:d.trackResult(f)}export{te as n,he as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./useBaseQuery-CFTidwqz.js";function n(n,r){return t(n,e,r)}export{n as t};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libre-webui",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Privacy-first AI chat interface. Self-hosted, open source, extensible.",
|
|
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-helm-versioning.mjs && node --test scripts/test-tts-example-security.mjs && npm run test:unit --workspace=frontend && npm run build && 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-chat-provider-selection.mjs && node --test scripts/test-provider-api-modes.mjs && node --test scripts/test-plugin-variable-overrides.mjs && node --test scripts/test-tts-routing.mjs && node --test scripts/test-image-generation-routing.mjs && node --test scripts/test-work-runtime.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-helm-versioning.mjs && node --test scripts/test-tts-example-security.mjs && npm run test:unit --workspace=frontend && npm run build && 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-chat-provider-selection.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-runtime.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-runtime.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",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{d as t,f as n}from"./markdown-core-GI9BPwrB.js";import{n as r}from"./react-vendor-DyG_ODzn.js";import{t as ee}from"./useTranslation-Cs6iTP4m.js";import{Ft as i,Kt as a,X as o,Y as s,ct as te,it as c,lt as l,mt as u,n as d,pt as f,ut as p,xt as m}from"./ui-vendor-CAFEDSaO.js";import{t as h}from"./logger-DbNs3-DK.js";import{t as g}from"./utils-pTFqSV8c.js";import{t as _}from"./Button-DBk-AREB.js";import{$ as ne,F as re}from"../assets/index-CKV9Lnj8.js";import{t as v}from"./OptimizedSyntaxHighlighter-Ci9sRc78.js";import{n as y,r as b,t as x}from"./artifactHtml-B7Oy2e__.js";var S=e(n(),1),C=r(),w=t(),T=h(`components:artifact-slide-out-panel`),E=320,D=.9,O=600,k=()=>{let{t:e,i18n:t}=ee(),n=ne(t.language),{artifactPanelOpen:r,artifactPanelArtifact:h,closeArtifactPanel:k,theme:A}=re(),[ie,j]=(0,S.useState)(!1),[M,N]=(0,S.useState)(`preview`),[P,F]=(0,S.useState)(O),[I,L]=(0,S.useState)(!1),R=(0,S.useRef)(null),z=(0,S.useRef)(null),B=(0,S.useRef)(null),V=(0,S.useRef)(0),H=(0,S.useRef)(0),U=(0,S.useRef)(null),W=(0,S.useRef)(null),G=(0,S.useRef)(P),K=h?.id??null;K!==B.current&&(B.current=K,M!==`preview`&&N(`preview`));let q=(0,S.useCallback)(e=>{G.current=e,W.current===null&&(W.current=window.requestAnimationFrame(()=>{W.current=null,F(G.current)}))},[]),J=(0,S.useCallback)(()=>{U.current=null,L(!1),W.current!==null&&(window.cancelAnimationFrame(W.current),W.current=null,F(G.current))},[]),ae=(0,S.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),U.current=e.pointerId,H.current=P,V.current=e.clientX,G.current=P,e.currentTarget.setPointerCapture(e.pointerId),L(!0)},[P]),Y=(0,S.useCallback)(e=>{if(!I||U.current!==null&&e.pointerId!==U.current)return;e.preventDefault();let t=(V.current-e.clientX)*(n?-1:1),r=window.innerWidth*D;q(Math.min(r,Math.max(E,H.current+t)))},[I,n,q]);if((0,S.useEffect)(()=>{if(!I){document.body.style.userSelect=``,document.body.style.cursor=``;return}let e=e=>{(U.current===null||e.pointerId===U.current)&&J()};return window.addEventListener(`pointermove`,Y,{passive:!1}),window.addEventListener(`pointerup`,e),window.addEventListener(`pointercancel`,e),window.addEventListener(`blur`,J),document.body.style.userSelect=`none`,document.body.style.cursor=`col-resize`,()=>{window.removeEventListener(`pointermove`,Y),window.removeEventListener(`pointerup`,e),window.removeEventListener(`pointercancel`,e),window.removeEventListener(`blur`,J),document.body.style.userSelect=``,document.body.style.cursor=``}},[I,Y,J]),(0,S.useEffect)(()=>{let e=()=>{let e=window.innerWidth*D;P>e&&F(e)};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[P]),(0,S.useEffect)(()=>{let e=e=>{e.key===`Escape`&&r&&k()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r,k]),(0,S.useEffect)(()=>{let e=e=>{I||z.current&&!z.current.contains(e.target)&&r&&k()},t=setTimeout(()=>{window.addEventListener(`mousedown`,e)},100);return()=>{clearTimeout(t),window.removeEventListener(`mousedown`,e)}},[r,k,I]),!h)return null;let X=h,oe=async e=>{try{await navigator.clipboard.writeText(e),j(!0),setTimeout(()=>j(!1),2e3)}catch(e){T.error(`Failed to copy:`,e)}},se=()=>{let e=X.type===`html`?b(X.content,X.title):X.content,t=new Blob([e],{type:ce(X.type)}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`${X.title}.${le(X.type)}`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)},ce=e=>{switch(e){case`html`:return`text/html`;case`react`:return`text/javascript`;case`svg`:return`image/svg+xml`;case`css`:return`text/css`;case`json`:return`application/json`;default:return`text/plain`}},le=e=>{switch(e){case`html`:return`html`;case`react`:return`jsx`;case`svg`:return`svg`;case`css`:return`css`;case`json`:return`json`;default:return`txt`}},ue=()=>{switch(X.type){case`html`:return(0,w.jsx)(o,{className:`h-5 w-5`});case`react`:return(0,w.jsx)(u,{className:`h-5 w-5`});case`svg`:return(0,w.jsx)(c,{className:`h-5 w-5`});case`code`:return(0,w.jsx)(u,{className:`h-5 w-5`});default:return(0,w.jsx)(c,{className:`h-5 w-5`})}},de=()=>(0,w.jsx)(`div`,{"data-testid":`artifact-html-fallback`,className:`w-full h-full flex items-center justify-center bg-gray-50 dark:bg-dark-100 rounded-lg border border-gray-200 dark:border-dark-200 p-4`,children:(0,w.jsxs)(`div`,{className:`max-w-sm text-center`,children:[(0,w.jsx)(i,{className:`h-8 w-8 text-primary-500 mx-auto mb-3`}),(0,w.jsx)(`p`,{className:`text-sm font-medium text-gray-900 dark:text-gray-100`,children:e(`artifacts.previewUnavailable`)}),(0,w.jsx)(`p`,{className:`mt-1 text-sm text-gray-600 dark:text-gray-400`,children:e(`artifacts.previewUnavailableDescription`)}),(0,w.jsxs)(_,{variant:`outline`,size:`sm`,onClick:()=>N(`code`),className:`mt-4`,children:[(0,w.jsx)(a,{className:`h-3.5 w-3.5 me-1.5`}),e(`artifacts.code`)]})]})}),Z=()=>X.content.trim()?(0,w.jsx)(`iframe`,{ref:R,"data-testid":`artifact-html-preview`,srcDoc:b(X.content,X.title),className:g(`w-full h-full border-0 rounded-lg bg-white`,I&&`pointer-events-none`),sandbox:y,allow:x,allowFullScreen:!0,title:X.title}):de(),fe=()=>{try{return(0,w.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-gray-50 dark:bg-dark-100 rounded-lg overflow-auto p-4`,dangerouslySetInnerHTML:{__html:X.content}})}catch{return(0,w.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-gray-50 dark:bg-dark-100 rounded-lg`,children:(0,w.jsxs)(`div`,{className:`text-center`,children:[(0,w.jsx)(i,{className:`h-8 w-8 text-primary-500 mx-auto mb-2`}),(0,w.jsx)(`p`,{className:`text-sm text-gray-600 dark:text-dark-600`,children:e(`artifacts.invalidSvg`)})]})})}},Q=()=>(0,w.jsx)(`div`,{className:`h-full overflow-auto`,children:(0,w.jsx)(v,{language:(()=>{if(X.language)return X.language;switch(X.type){case`html`:return`html`;case`react`:return`jsx`;case`svg`:return`xml`;case`json`:return`json`;default:return`text`}})(),isDark:A.mode===`dark`,className:`!m-0 !rounded-lg !h-full`,children:X.content})}),pe=()=>{try{let e=JSON.parse(X.content),t=JSON.stringify(e,null,2);return(0,w.jsx)(`div`,{className:`h-full overflow-auto`,children:(0,w.jsx)(v,{language:`json`,isDark:A.mode===`dark`,className:`!m-0 !rounded-lg !h-full`,children:t})})}catch{return(0,w.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-gray-50 dark:bg-dark-100 rounded-lg`,children:(0,w.jsxs)(`div`,{className:`text-center`,children:[(0,w.jsx)(i,{className:`h-8 w-8 text-primary-500 mx-auto mb-2`}),(0,w.jsx)(`p`,{className:`text-sm text-gray-600 dark:text-dark-600`,children:e(`artifacts.invalidJson`)})]})})}},me=()=>{if(M===`code`)return Q();switch(X.type){case`html`:return Z();case`svg`:return fe();case`json`:return pe();default:return Q()}},he=()=>X.type===`html`||X.type===`svg`||X.type===`react`,$=typeof window<`u`&&window.innerWidth<640,ge=$?`100%`:`${P}px`;return(0,C.createPortal)((0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:g(`fixed inset-0 bg-black/30 dark:bg-black/50 z-40 transition-opacity duration-300`,r?`opacity-100`:`opacity-0 pointer-events-none`)}),I&&(0,w.jsx)(`div`,{className:`fixed inset-0 z-[55] cursor-col-resize select-none`,"aria-hidden":`true`}),(0,w.jsxs)(`div`,{ref:z,"data-testid":`artifact-slide-out-panel`,style:{width:ge},className:g(`fixed top-0 end-0 h-full z-50`,`bg-white dark:bg-dark-25`,`shadow-2xl border-s border-gray-200 dark:border-dark-200`,`flex flex-col`,`transform transition-transform duration-300 ease-out`,r?`translate-x-0`:`translate-x-full rtl:-translate-x-full`),children:[!$&&(0,w.jsxs)(`div`,{onPointerDown:ae,"data-testid":`artifact-resize-handle`,className:g(`absolute start-0 top-0 bottom-0 w-4 -ms-2 cursor-col-resize z-[56]`,`flex items-center justify-center`,`touch-none select-none group`),children:[(0,w.jsx)(`div`,{className:g(`w-1 h-16 rounded-full transition-all duration-200`,`bg-gray-300 dark:bg-dark-300`,`group-hover:bg-primary-500 group-hover:h-24`,I&&`bg-primary-500 h-24`)}),(0,w.jsx)(`div`,{className:g(`absolute left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity`,`text-gray-400 dark:text-dark-500`,I&&`opacity-100`),children:(0,w.jsx)(s,{className:`h-4 w-4`})})]}),(0,w.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-b border-gray-200 dark:border-dark-200`,children:[(0,w.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0 flex-1`,children:[(0,w.jsx)(`div`,{className:`text-gray-600 dark:text-gray-400 flex-shrink-0`,children:ue()}),(0,w.jsx)(`h2`,{className:`font-semibold text-gray-900 dark:text-gray-100 truncate`,children:X.title}),(0,w.jsx)(`span`,{className:`text-xs bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300 px-2 py-1 rounded-full font-medium flex-shrink-0`,children:X.type.toUpperCase()})]}),(0,w.jsx)(_,{variant:`ghost`,size:`sm`,onClick:k,className:`h-8 w-8 p-0 hover:bg-gray-100 dark:hover:bg-dark-200 flex-shrink-0`,title:e(`artifacts.closePanelEsc`),children:(0,w.jsx)(d,{className:`h-5 w-5`})})]}),(0,w.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2 border-b border-gray-100 dark:border-dark-200 bg-gray-50 dark:bg-dark-100/50`,children:[(0,w.jsx)(`div`,{className:`flex items-center gap-1`,children:he()&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(_,{variant:M===`preview`?`primary`:`ghost`,size:`sm`,onClick:()=>N(`preview`),className:`h-8 px-3 text-xs`,title:e(`artifacts.previewMode`),children:[(0,w.jsx)(te,{className:`h-3.5 w-3.5 me-1.5`}),e(`artifacts.preview`)]}),(0,w.jsxs)(_,{variant:M===`code`?`primary`:`ghost`,size:`sm`,onClick:()=>N(`code`),className:`h-8 px-3 text-xs`,title:e(`artifacts.codeMode`),children:[(0,w.jsx)(a,{className:`h-3.5 w-3.5 me-1.5`}),e(`artifacts.code`)]})]})}),(0,w.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,w.jsx)(_,{variant:`ghost`,size:`sm`,onClick:()=>oe(X.content),className:`h-8 px-3 text-xs hover:bg-gray-100 dark:hover:bg-dark-200`,title:e(`artifacts.copyContent`),children:ie?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(m,{className:`h-3.5 w-3.5 me-1.5 text-green-500`}),e(`artifacts.copied`)]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(f,{className:`h-3.5 w-3.5 me-1.5`}),e(`artifacts.copyButton`)]})}),(0,w.jsxs)(_,{variant:`ghost`,size:`sm`,onClick:se,className:`h-8 px-3 text-xs hover:bg-gray-100 dark:hover:bg-dark-200`,title:e(`artifacts.download`),children:[(0,w.jsx)(p,{className:`h-3.5 w-3.5 me-1.5`}),e(`artifacts.download`)]}),(X.type===`html`||X.type===`react`)&&(0,w.jsxs)(_,{variant:`ghost`,size:`sm`,onClick:()=>{let e=window.open(``,`_blank`);e&&(e.document.write(b(X.content,X.title)),e.document.close())},className:`h-8 px-3 text-xs hover:bg-gray-100 dark:hover:bg-dark-200`,title:e(`artifacts.openInNewWindow`),children:[(0,w.jsx)(l,{className:`h-3.5 w-3.5 me-1.5`}),e(`artifacts.open`)]})]})]}),X.description&&(0,w.jsx)(`div`,{className:`px-4 py-3 border-b border-gray-100 dark:border-dark-200`,children:(0,w.jsx)(`p`,{className:`text-sm text-gray-600 dark:text-gray-400`,children:X.description})}),(0,w.jsx)(`div`,{className:`flex-1 p-4 overflow-hidden`,children:me()}),(0,w.jsx)(`div`,{className:`px-4 py-2 border-t border-gray-100 dark:border-dark-200 bg-gray-50 dark:bg-dark-100/50`,children:(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsxs)(`div`,{className:`text-xs text-gray-500 dark:text-gray-400`,children:[e(`artifacts.created`),`:`,` `,new Date(X.createdAt).toLocaleString()]}),!$&&(0,w.jsx)(`div`,{className:`text-xs text-gray-400 dark:text-dark-500`,children:e(`artifacts.dragEdgeToResize`)})]})})]})]}),document.body)};export{k as ArtifactSlideOutPanel};
|